g1t/apps/web/workers/env.d.ts

50 lines2,053 bytesCodeBlame
1import type { 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 /** The context hub: catalog, search and scorecards. */
22 CONTEXT: ServiceBinding;
23 /** Search across all of g1t, and Explore. */
24 SEARCH: ServiceBinding;
25 /** Production screenshots, from the og service's `Screenshots` entrypoint. */
26 SCREENSHOTS?: {
27 image(input: { host: string; commit: string; since?: string }): Promise<{
28 body: ArrayBuffer;
29 contentType: string;
30 commit: string;
31 capturedAt: string;
32 } | null>;
33 };
34 BLOBS: KVNamespace;
35 /** Uploaded avatars by SHA-256, with `{ contentType }`; written by identity. */
36 AVATARS: KVNamespace;
37 /** The self-hosted runner's releases (scripts/runner-release.mjs). Absent when self-hosted. */
38 DOWNLOADS?: R2Bucket;
39 /** The site's own origin. Unset on g1t.sh, which is https://g1t.sh (app/lib/addresses.server.ts). */
40 SITE_URL?: string;
41 /** The REST API's origin, which is also the OAuth issuer. Unset on g1t.sh. */
42 API_URL?: string;
43 /** The MCP server's URL, as agents are told to add it. Unset on g1t.sh. */
44 MCP_URL?: string;
45 /** The social-card image service; an empty string for none. Unset on g1t.sh. */
46 OG_URL?: string;
47 }
48 }
49 interface Env extends Cloudflare.Env {}
50}