Skip to content

g1t/services/repos/wrangler.jsonc

128 lines6,765 bytesCodeBlame

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.

Initial g1t: services, event bus, intents and attempts1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-repos",
4 "account_id": "1e6f2cffa3f445920836e8ebe446bb58",
5 "compatibility_date": "2026-09-26",
Agents as a team: lifecycle, merge queue, billing and a new shell6 // Runs next to its database: a request makes several queries in turn,
7 // and each would otherwise cross the distance to it.
Fast pages, required checks on the branch, self-hosted runners, honest incidents8 "placement": { "mode": "off" },
Rust repos service with shipping; pull requests kept in the model9 "main": "build/index.js",
Deploys as code: a manifest of every Worker, a deploy tool that ships only what changed in parallel stages, and a g1t Actions workflow10 "build": { "command": "node ../../scripts/build-rust-worker.mjs" },
Initial g1t: services, event bus, intents and attempts11 "workers_dev": false,
12 "d1_databases": [
13 {
14 "binding": "DB",
15 "database_name": "g1t-repos",
16 "database_id": "f9544c51-c3bf-4621-a96f-8a6d5cf24a97",
17 "migrations_dir": "migrations"
18 }
19 ],
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily20 // The git store. Every repository made before sharding is in `g1t`.
21 // More namespaces (src/shards.rs) are more bindings, named in
22 // ARTIFACTS_NAMESPACES below, e.g.
23 // { "binding": "ARTIFACTS_1", "namespace": "g1t-us-1" },
Merge branch 'worktree-agent-a2013627e5ea4ab13'24 // { "binding": "ARTIFACTS_EU", "namespace": "g1t-eu" }
25 // and new repositories go to those named in ARTIFACTS_NEW_REPOS. A
26 // namespace's jurisdiction is set when it is made (docs/ARTIFACTS.md,
27 // R7), never in the binding.
Initial g1t: services, event bus, intents and attempts28 "artifacts": [{ "binding": "ARTIFACTS", "namespace": "g1t" }],
Mission control shows where you are needed and what agents landed without you; git answers in about 200ms29 // Shared between isolates (src/shared.rs): the git store's credentials
30 // (src/store.rs) and the ref listings git asks for first
31 // (src/refs_cache.rs), every value sealed with the REPOS_KEY secret (64
32 // hex characters). Without the binding or the secret each isolate keeps
33 // only its own. Made by `npx wrangler kv namespace create g1t-repos-git-cache`:
34 "kv_namespaces": [{ "binding": "GIT_CACHE", "id": "be765052d0124c2a935b3db4dff99f1f" }],
Merge branch 'worktree-agent-a1b995daa94e4e1b7'35 // Packs for fresh clones (wants and no haves), kept under the
36 // repository's refs version so the next clone of the same commit skips
37 // the git store (src/pack_cache.rs). Without the binding nothing is
38 // kept. Made with a lifecycle rule that deletes packs after 7 days and
39 // unfinished uploads after 1:
40 // npx wrangler r2 bucket create g1t-git-packs
41 // npx wrangler r2 bucket lifecycle add g1t-git-packs expire-packs packs/ --expire-days 7 --abort-multipart-days 1
repos binds both buckets in one r2_buckets list (the merge left two keys, and the second would have won)42 // Nightly backups go to the second bucket: a git bundle per repository
43 // and a manifest of each chain (src/backups.rs). Made by
44 // `npx wrangler r2 bucket create g1t-backups`.
45 "r2_buckets": [
46 { "binding": "GIT_PACKS", "bucket_name": "g1t-git-packs" },
47 { "binding": "BACKUPS", "bucket_name": "g1t-backups" }
48 ],
Initial g1t: services, event bus, intents and attempts49 "services": [
50 { "binding": "IDENTITY", "service": "g1t-identity" },
Agents get guardrails, run credentials, an audit log, a context hub, repository instructions and mentions; security upkeep; snake_case API51 { "binding": "EVENTS", "service": "g1t-events" },
52 // Push protection asks which secrets were allowed, and records the rest.
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look53 { "binding": "SECURITY", "service": "g1t-security" },
54 // Whether a workspace far past its free git operations is on the
55 // plan (src/git_ops.rs); asked only then.
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge56 { "binding": "BILLING", "service": "g1t-billing" },
57 // Rulesets: which hold for a push or another change to a branch or
58 // tag, and where how they judged it is kept (src/rules.rs).
59 { "binding": "WORK", "service": "g1t-work" }
Initial g1t: services, event bus, intents and attempts60 ],
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look61 // A free workspace past this many git operations in a month is slowed
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas62 // to this many an hour, never charged (src/git_ops.rs). It is billing's
63 // GIT_OPERATIONS_INCLUDED, the amount free for every workspace: past it,
64 // a workspace on the plan pays at cost plus 20% and is never slowed.
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look65 // FREE_PRIVATE_STORAGE_BYTES: a free workspace's private repositories may
66 // hold this much (1 GB); past it, pushes to them stop. Billing reads the
67 // same amount.
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily68 //
69 // The git store (docs/ARTIFACTS.md):
70 // REPO_STORAGE_LIMIT_BYTES: pushes stop before a repository holds this
71 // much; the store holds 1 GB (src/pack_limits.rs).
72 // LARGE_PUSHES: a push too large to scan for secrets (24 MiB) is
73 // "refuse"d, or streamed to the store "unscanned" (src/git_http.rs).
74 // FORK_RETENTION_DAYS: a pull request working copy is removed this long
75 // after its pull request merges or closes (src/forks.rs).
76 // ARTIFACTS_NAMESPACES: JSON, each Artifacts binding and its namespace;
77 // ARTIFACTS_NEW_REPOS: comma-separated namespaces new repositories go
Merge branch 'worktree-agent-a2013627e5ea4ab13'78 // to, the emptier healthy ones first (empty: g1t); ARTIFACTS_EU_NAMESPACE:
79 // where workspaces that keep their data in the EU put new repositories,
80 // and unset until that namespace exists (src/shards.rs);
81 // ARTIFACTS_NAMESPACE_LIMITS (optional): JSON, {"g1t": {"max_repos": N}},
82 // past which a namespace takes no new repositories while another can.
83 //
84 // The fallback git store (src/fallback.rs; docs/ARTIFACTS.md, R12), all
85 // unset: nothing changes. Set as secrets, so switching takes no build:
86 // npx wrangler secret put GIT_FALLBACK_URL # https://gitstore.example
87 // npx wrangler secret put GIT_FALLBACK_SECRET # the store's API secret
88 // npx wrangler secret put GIT_FALLBACK_NAMESPACES # g1t (or g1t,g1t-us-1, or *)
89 // GIT_FALLBACK_WRITES: unset or "refuse" keeps a switched namespace
90 // read-only; "allow" lets it take pushes (reconcile them afterwards).
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily91 // ARTIFACTS_REMOTE_BASE (optional): where remotes start,
92 // https://<account>.artifacts.cloudflare.net/git, so a new isolate
93 // needs no info() call before its first credential (src/store.rs).
Merge branch 'worktree-agent-ac5b181a013e54348'94 //
95 // Backups (src/backups.rs):
96 // BACKUP_STORE: r2 (the BACKUPS bucket) or s3 (BACKUP_S3_BUCKET on the
97 // installation's S3_ENDPOINT, as self-hosting uses).
98 // BACKUPS_PER_NIGHT: how many repositories one night queues, those
99 // longest since their last backup first.
100 // BACKUP_FULL_EVERY: incremental bundles before a full one again.
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look101 "vars": {
Merge branch 'worktree-agent-ac5b181a013e54348'102 "BACKUP_STORE": "r2",
103 "BACKUPS_PER_NIGHT": "200",
104 "BACKUP_FULL_EVERY": "30",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look105 "GIT_OPERATIONS_FREE_CAP": "50000",
106 "GIT_OPERATIONS_FREE_HOURLY": "60",
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily107 "FREE_PRIVATE_STORAGE_BYTES": "1000000000",
108 "REPO_STORAGE_LIMIT_BYTES": "950000000",
109 "LARGE_PUSHES": "unscanned",
Pull request forks are removed a day after they merge or close, not a week110 "FORK_RETENTION_DAYS": "1",
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily111 "ARTIFACTS_NAMESPACES": "{\"ARTIFACTS\":\"g1t\"}",
112 "ARTIFACTS_NEW_REPOS": ""
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look113 },
114 // Every hour, deleted repositories whose 30 days to be restored have
Git storage hardened, pages in tens of milliseconds, honest security alerts, and costs reconciled daily115 // passed are purged, their git data with them (src/lifecycle.rs), and
116 // pull request working copies past FORK_RETENTION_DAYS are removed
Merge branch 'worktree-agent-a2013627e5ea4ab13'117 // (src/forks.rs), and a repository queued to move to another namespace
118 // is moved (src/moves.rs). At 02:53 UTC, the repositories whose refs moved since
Merge branch 'worktree-agent-ac5b181a013e54348'119 // their last backup are queued for one (src/backups.rs, BACKUP_CRON);
120 // the runner's sweep starts them a few at a time.
121 "triggers": { "crons": ["23 * * * *", "53 2 * * *"] },
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look122 // A workspace renamed moves its repositories to the new slug; one
123 // deleted purges the repositories it left in Recently deleted.
Agents and memory, checks and conflicts, profiles, slug renames, custom domains124 "queues": {
125 "consumers": [{ "queue": "g1t-events-repos", "max_batch_size": 20, "max_batch_timeout": 1 }]
126 },
Initial g1t: services, event bus, intents and attempts127 "observability": { "enabled": true }
128}

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