flagon-io/g1t

public

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/apps/web/app/lib/services.server.ts

65 lines2,517 bytesCodeBlame
1import { env } from "cloudflare:workers";
2
3import {
4 accountsClient,
5 actionsClient,
6 agentsClient,
7 billingClient,
8 contextClient,
9 deploymentsClient,
10 memoryReviewClient,
11 projectsClient,
12 eventsClient,
13 guardrailsClient,
14 identityClient,
15 integrationsClient,
16 reposClient,
17 searchClient,
18 securityClient,
19 webhooksClient,
20 workClient,
21} from "@g1t/contracts";
22
23import { instrumented } from "./perf.server";
24
25/**
26 * Each binding the clients use, timed for `Server-Timing` and, for the
27 * services that read D1 with sessions, told where to read (lib/perf.ts).
28 */
29const IDENTITY = instrumented("identity", env.IDENTITY);
30const REPOS = instrumented("repos", env.REPOS);
31const WORK = instrumented("work", env.WORK);
32const BILLING = instrumented("billing", env.BILLING);
33const EVENTS = instrumented("events", env.EVENTS);
34const INTEGRATIONS = instrumented("integrations", env.INTEGRATIONS);
35const WEBHOOKS = instrumented("webhooks", env.WEBHOOKS);
36const ACTIONS = instrumented("actions", env.ACTIONS);
37const DEPLOYMENTS = instrumented("deployments", env.DEPLOYMENTS);
38const PROJECTS = instrumented("projects", env.PROJECTS);
39const SECURITY = instrumented("security", env.SECURITY);
40const CONTEXT = instrumented("context", env.CONTEXT);
41const SEARCH = instrumented("search", env.SEARCH);
42
43export const identity = identityClient(IDENTITY);
44/** A person's email addresses and account security: methods of identity. */
45export const accounts = accountsClient(IDENTITY);
46export const repos = reposClient(REPOS);
47export const work = workClient(WORK);
48export const billing = billingClient(BILLING);
49export const events = eventsClient(EVENTS);
50export const integrations = integrationsClient(INTEGRATIONS);
51export const webhooks = webhooksClient(WEBHOOKS);
52export const actions = actionsClient(ACTIONS);
53export const deployments = deploymentsClient(DEPLOYMENTS);
54export const projects = projectsClient(PROJECTS);
55export const security = securityClient(SECURITY);
56/** Agent runs, sessions and memory: methods of the work service. */
57export const agents = agentsClient(WORK);
58/** What agents may do in a sandbox: methods of the work service. */
59export const guardrails = guardrailsClient(WORK);
60/** The context hub: catalog, search and scorecards. */
61export const context = contextClient(CONTEXT);
62/** Search across all of g1t, and Explore. */
63export const search = searchClient(SEARCH);
64/** Memory candidates and their review: methods of the work service. */
65export const memoryReview = memoryReviewClient(WORK);