Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
104 linesCodeBlameRaw
1import { env } from "cloudflare:workers";
2
3import {
4 accountsClient,
5 actionsClient,
6 advisoriesClient,
7 agentsClient,
8 billingClient,
9 chatClient,
10 contextClient,
11 deploymentsClient,
12 docsClient,
13 foliosClient,
14 memoryReviewClient,
15 packagesClient,
16 projectsClient,
17 eventsClient,
18 guardrailsClient,
19 identityClient,
20 inboxClient,
21 integrationsClient,
22 reposClient,
23 searchClient,
24 securityClient,
25 securitySuiteClient,
26 webhooksClient,
27 workClient,
28 skillLibraryClient,
29 workspaceAgentsClient,
30} from "@g1t/contracts";
31import { telemetryClient } from "@g1t/contracts/telemetry";
32
33import { instrumented } from "./perf.server";
34
35/**
36 * Each binding the clients use, timed for `Server-Timing` and, for the
37 * services that read D1 with sessions, told where to read (lib/perf.ts).
38 */
39const IDENTITY = instrumented("identity", env.IDENTITY);
40const REPOS = instrumented("repos", env.REPOS);
41const WORK = instrumented("work", env.WORK);
42const BILLING = instrumented("billing", env.BILLING);
43const EVENTS = instrumented("events", env.EVENTS);
44const INTEGRATIONS = instrumented("integrations", env.INTEGRATIONS);
45const WEBHOOKS = instrumented("webhooks", env.WEBHOOKS);
46const ACTIONS = instrumented("actions", env.ACTIONS);
47const DEPLOYMENTS = instrumented("deployments", env.DEPLOYMENTS);
48const PROJECTS = instrumented("projects", env.PROJECTS);
49const SECURITY = instrumented("security", env.SECURITY);
50const CONTEXT = instrumented("context", env.CONTEXT);
51const SEARCH = instrumented("search", env.SEARCH);
52const PACKAGES = instrumented("packages", env.PACKAGES);
53const CHAT = instrumented("chat", env.CHAT);
54const AGENTS = instrumented("agents", env.AGENTS);
55const ARTIFACTS = instrumented("artifacts", env.ARTIFACTS);
56const TELEMETRY = env.TELEMETRY ? instrumented("telemetry", env.TELEMETRY) : null;
57
58export const identity = identityClient(IDENTITY);
59/** A person's email addresses and account security: methods of identity. */
60export const accounts = accountsClient(IDENTITY);
61export const repos = reposClient(REPOS);
62export const work = workClient(WORK);
63export const billing = billingClient(BILLING);
64export const events = eventsClient(EVENTS);
65/** Each person's inbox, which the events service keeps. */
66export const inbox = inboxClient(EVENTS);
67export const integrations = integrationsClient(INTEGRATIONS);
68export const webhooks = webhooksClient(WEBHOOKS);
69export const actions = actionsClient(ACTIONS);
70export const deployments = deploymentsClient(DEPLOYMENTS);
71export const projects = projectsClient(PROJECTS);
72export const security = securityClient(SECURITY);
73/** The security suite: patterns, bypasses, code scanning, the dependency graph, settings. */
74export const securitySuite = securitySuiteClient(SECURITY);
75/** Security advisories and private vulnerability reports: methods of the security service. */
76export const advisories = advisoriesClient(SECURITY);
77/** Agent runs, sessions and memory: methods of the work service. */
78export const agents = agentsClient(WORK);
79/** What agents may do in a sandbox: methods of the work service. */
80export const guardrails = guardrailsClient(WORK);
81/** The context hub: catalog, search and scorecards. */
82export const context = contextClient(CONTEXT);
83/** Search across all of g1t, and Explore. */
84export const search = searchClient(SEARCH);
85/** The workspace's registries: container images, and more to come. */
86export const packages = packagesClient(PACKAGES);
87/** Memory candidates and their review: methods of the work service. */
88export const memoryReview = memoryReviewClient(WORK);
89/** Channels, direct messages and threads, where people and agents talk. */
90export const chat = chatClient(CHAT);
91/** The workspace's own agents: who they are, their limits and their desks. */
92export const workspaceAgents = workspaceAgentsClient(AGENTS);
93/** The workspace's skill library: skills, their versions and where they are attached (the agents service). */
94export const skillLibrary = skillLibraryClient(AGENTS);
95/** The artifacts service's spaces (Artifacts' spaces) and projects' docs. Its old pages are no longer read. */
96export const docs = docsClient(ARTIFACTS);
97/** Artifacts (folios): docs, and later slides, designs and dashboards, kept by the artifacts service. */
98export const folios = foliosClient(ARTIFACTS);
99
100/**
101 * Observability (services/telemetry): a project's requests, logs, traces,
102 * metrics and errors. Null where it is not deployed; the pages say so.
103 */
104export const telemetry = TELEMETRY ? telemetryClient(TELEMETRY) : null;