Skip to content
88 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Merge branch 'worktree-agent-a8752162fea25f63f' into spend-guardrails1import type { RateLimitBinding, RunnerApi, ServiceBinding } from "@g1t/contracts";
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays2
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> };
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member9 /** Also serves the container registry (`/v2/`) through `fetch`. */
10 PACKAGES: ServiceBinding & { fetch(request: Request): Promise<Response> };
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays11 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 /** The context hub: catalog, search and scorecards. */
22 CONTEXT: ServiceBinding;
23 /** Search across all of g1t, and Explore. */
24 SEARCH: ServiceBinding;
Chat and workspace agents: channels, DMs and named agents you talk to25 /**
26 * Chat: channels, messages and read state over RPC, and the live
27 * socket, forwarded as it is (app/lib/chat-live.server.ts).
28 */
29 CHAT: ServiceBinding & { fetch(request: Request): Promise<Response> };
The artifacts service is services/artifacts, the Worker g1t-artifacts, bound as ARTIFACTS by the API, the site and the agents; its live rooms move to it with a Durable Object transfer from g1t-docs-service, and its database, bucket, indexes and queue keep their names. The git store's binding and settings are GITSTORE, its ops scripts gitstore-*, and workflow run artifacts keep their compatible API under run_artifacts modules. The deploy tool puts a Worker that has never deployed before the Workers in its stage that bind to it, and the deploy guide gives the cutover runbook.30 /** Artifacts (services/artifacts): RPC, each artifact's live socket, and files in them. */
31 ARTIFACTS: ServiceBinding & { fetch(request: Request | string, init?: RequestInit): Promise<Response> };
Chat and workspace agents: channels, DMs and named agents you talk to32 /** The workspace's own agents: definitions, templates and desks. */
33 AGENTS: ServiceBinding;
Merge the workspace shell: navigation and phone shell, g1t as orchestrator, agents in roles with audience-checked reads, reactions and custom emoji, live notifications and browser push, the homepage tour (agents 0002, chat 0002)34 /**
35 * Live notifications, counts and browser push (services/notify): RPC,
36 * and each tab's feed socket, forwarded as it is (routes/notify/live.ts).
37 * Absent where it is not deployed: pages work without it.
38 */
39 NOTIFY?: ServiceBinding & { fetch(request: Request): Promise<Response> };
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays40 /** Production screenshots, from the og service's `Screenshots` entrypoint. */
41 SCREENSHOTS?: {
Production thumbnails follow each deploy, not each commit, and old ones are cleared daily42 image(input: { host: string; commit: string; since?: string }): Promise<{
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays43 body: ArrayBuffer;
44 contentType: string;
45 commit: string;
46 capturedAt: string;
47 } | null>;
Merge branch 'worktree-agent-a5b0d9e2733e9e382'48 /** A production deployed elsewhere, at its address; `commit` is a deploy's commit or a UTC day. */
49 externalImage(input: { url: string; commit: string; since?: string }): Promise<{
50 body: ArrayBuffer;
51 contentType: string;
52 commit: string;
53 capturedAt: string;
54 } | null>;
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays55 };
56 BLOBS: KVNamespace;
57 /** Uploaded avatars by SHA-256, with `{ contentType }`; written by identity. */
58 AVATARS: KVNamespace;
59 /** The self-hosted runner's releases (scripts/runner-release.mjs). Absent when self-hosted. */
60 DOWNLOADS?: R2Bucket;
Merge branch 'worktree-agent-aaf03bdceac799c89'61 /** The site's own origin. Unset on g1t.sh, which is https://g1t.sh (app/lib/addresses.server.ts). */
62 SITE_URL?: string;
63 /** The REST API's origin, which is also the OAuth issuer. Unset on g1t.sh. */
64 API_URL?: string;
65 /** The MCP server's URL, as agents are told to add it. Unset on g1t.sh. */
66 MCP_URL?: string;
67 /** The social-card image service; an empty string for none. Unset on g1t.sh. */
68 OG_URL?: string;
Merge branch 'worktree-agent-a8752162fea25f63f' into spend-guardrails69 /** The front door's rate limits (app/lib/front-door-limits.ts). Absent when self-hosted. */
70 WEB_ANONYMOUS_LIMIT?: RateLimitBinding;
71 WEB_HEAVY_LIMIT?: RateLimitBinding;
72 WEB_SESSION_LIMIT?: RateLimitBinding;
73 WEB_ADDRESS_LIMIT?: RateLimitBinding;
Merge main into Artifacts Phase 274 WEB_TOKEN_LIMIT?: RateLimitBinding;
Merge branch 'worktree-agent-a8752162fea25f63f' into spend-guardrails75 GIT_ANONYMOUS_LIMIT?: RateLimitBinding;
76 GIT_SIGNED_LIMIT?: RateLimitBinding;
Merge g1tusercontent.com: registry answers run nothing in a browser, the site's pages run only their own scripts, repository files and avatars on their own origin, raw files rate limited per address77 /**
78 * Where repository files and avatars are served (app/lib/usercontent.ts).
79 * Unset on g1t.sh, which is https://g1tusercontent.com; unset on another
80 * site, `<SITE_URL>/-/usercontent`.
81 */
82 USERCONTENT_URL?: string;
83 /** Signs the short-lived addresses of private repositories' files. A secret. */
84 USERCONTENT_KEY?: string;
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays85 }
86 }
87 interface Env extends Cloudflare.Env {}
88}

This file's history is long; its oldest lines are credited to the oldest commit read.