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
90 linesCodeBlameRaw
1import type { RateLimitBinding, RunnerApi, ServiceBinding } from "@g1t/contracts";
2
3declare global {
4 namespace Cloudflare {
5 interface Env {
6 IDENTITY: ServiceBinding;
7 /** Also serves git over HTTPS through `fetch`. */
8 REPOS: ServiceBinding & { fetch(request: Request): Promise<Response> };
9 /** Also serves the container registry (`/v2/`) through `fetch`. */
10 PACKAGES: ServiceBinding & { fetch(request: Request): Promise<Response> };
11 WORK: ServiceBinding;
12 RUNNER: RunnerApi;
13 BILLING: ServiceBinding;
14 EVENTS: ServiceBinding;
15 INTEGRATIONS: ServiceBinding;
16 WEBHOOKS: ServiceBinding;
17 ACTIONS: ServiceBinding;
18 DEPLOYMENTS: ServiceBinding;
19 PROJECTS: ServiceBinding;
20 SECURITY: ServiceBinding;
21 /** Search across all of g1t, and Explore. */
22 SEARCH: ServiceBinding;
23 /**
24 * Chat: channels, messages and read state over RPC, and the live
25 * socket, forwarded as it is (app/lib/chat-live.server.ts).
26 */
27 CHAT: ServiceBinding & { fetch(request: Request): Promise<Response> };
28 /** Artifacts (services/artifacts): RPC, each artifact's live socket, and files in them. */
29 ARTIFACTS: ServiceBinding & { fetch(request: Request | string, init?: RequestInit): Promise<Response> };
30 /**
31 * Live notifications, counts and browser push (services/notify): RPC,
32 * and each tab's feed socket, forwarded as it is (routes/notify/live.ts).
33 * Absent where it is not deployed: pages work without it.
34 */
35 NOTIFY?: ServiceBinding & { fetch(request: Request): Promise<Response> };
36 /**
37 * Observability (services/telemetry): RPC, and a project's live tail,
38 * forwarded as it is (routes/repo/observability/live.ts). Absent where
39 * it is not deployed: the pages say so.
40 */
41 TELEMETRY?: ServiceBinding & { fetch(request: Request): Promise<Response> };
42 /** Production screenshots, from the og service's `Screenshots` entrypoint. */
43 SCREENSHOTS?: {
44 image(input: { host: string; commit: string; since?: string }): Promise<{
45 body: ArrayBuffer;
46 contentType: string;
47 commit: string;
48 capturedAt: string;
49 } | null>;
50 /** A production deployed elsewhere, at its address; `commit` is a deploy's commit or a UTC day. */
51 externalImage(input: { url: string; commit: string; since?: string }): Promise<{
52 body: ArrayBuffer;
53 contentType: string;
54 commit: string;
55 capturedAt: string;
56 } | null>;
57 };
58 BLOBS: KVNamespace;
59 /** Uploaded avatars by SHA-256, with `{ contentType }`; written by identity. */
60 AVATARS: KVNamespace;
61 /** The self-hosted runner's releases (scripts/runner-release.mjs). Absent when self-hosted. */
62 DOWNLOADS?: R2Bucket;
63 /** The site's own origin. Unset on g1t.sh, which is https://g1t.sh (app/lib/addresses.server.ts). */
64 SITE_URL?: string;
65 /** The REST API's origin, which is also the OAuth issuer. Unset on g1t.sh. */
66 API_URL?: string;
67 /** The MCP server's URL, as agents are told to add it. Unset on g1t.sh. */
68 MCP_URL?: string;
69 /** The social-card image service; an empty string for none. Unset on g1t.sh. */
70 OG_URL?: string;
71 /** The front door's rate limits (app/lib/front-door-limits.ts). Absent when self-hosted. */
72 WEB_ANONYMOUS_LIMIT?: RateLimitBinding;
73 WEB_HEAVY_LIMIT?: RateLimitBinding;
74 WEB_SESSION_LIMIT?: RateLimitBinding;
75 WEB_ADDRESS_LIMIT?: RateLimitBinding;
76 WEB_TOKEN_LIMIT?: RateLimitBinding;
77 GIT_ANONYMOUS_LIMIT?: RateLimitBinding;
78 GIT_SIGNED_LIMIT?: RateLimitBinding;
79 /**
80 * Where repository files and avatars are served (app/lib/usercontent.ts).
81 * Unset on g1t.sh, which is https://g1tusercontent.com; unset on another
82 * site, `<SITE_URL>/-/usercontent`.
83 */
84 USERCONTENT_URL?: string;
85 /** Signs the short-lived addresses of private repositories' files. A secret. */
86 USERCONTENT_KEY?: string;
87 }
88 }
89 interface Env extends Cloudflare.Env {}
90}