Skip to content
65 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.

Rust repos service with shipping; pull requests kept in the model1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-events",
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" },
Events service in Rust, with RFC 3339 times and accurate push events9 "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" },
Rust repos service with shipping; pull requests kept in the model11 "workers_dev": false,
12 "d1_databases": [
13 {
14 "binding": "DB",
15 "database_name": "g1t-events",
16 "database_id": "dd889749-0d01-4c94-8b9b-d789dec1c0e4",
17 "migrations_dir": "migrations"
18 }
19 ],
20 "queues": {
21 "producers": [
22 { "binding": "BUS", "queue": "g1t-events" },
23 // One queue per subscribing service, so each consumes, retries
24 // and scales on its own. Bindings named SUBSCRIBER_* receive
Merge branch 'worktree-agent-ad8a36dfcd4176015' into spend-guardrails25 // the event types g1t_contracts::subscribers routes to them.
Acceptance checks in sandboxes, line comments and review verdicts26 { "binding": "SUBSCRIBER_WORK", "queue": "g1t-events-work" },
Integrations: your own model provider, alerts that open issues, tickets agents read27 { "binding": "SUBSCRIBER_RUNNER", "queue": "g1t-events-runner" },
Webhooks: every event, to your own addresses, signed and retried28 { "binding": "SUBSCRIBER_INTEGRATIONS", "queue": "g1t-events-integrations" },
Automations: rules in .g1t/automations that act when something happens29 { "binding": "SUBSCRIBER_WEBHOOKS", "queue": "g1t-events-webhooks" },
Deployments: a preview for every pull request, production on g1t.page30 { "binding": "SUBSCRIBER_ACTIONS", "queue": "g1t-events-actions" },
Projects: what a workspace builds and runs, first on every page31 { "binding": "SUBSCRIBER_DEPLOYMENTS", "queue": "g1t-events-deployments" },
Agents and memory, checks and conflicts, profiles, slug renames, custom domains32 { "binding": "SUBSCRIBER_PROJECTS", "queue": "g1t-events-projects" },
33 { "binding": "SUBSCRIBER_REPOS", "queue": "g1t-events-repos" },
Agents get guardrails, run credentials, an audit log, a context hub, repository instructions and mentions; security upkeep; snake_case API34 { "binding": "SUBSCRIBER_BILLING", "queue": "g1t-events-billing" },
35 { "binding": "SUBSCRIBER_SECURITY", "queue": "g1t-events-security" },
Search across all of g1t, Explore, and a command palette36 { "binding": "SUBSCRIBER_CONTEXT", "queue": "g1t-events-context" },
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member37 { "binding": "SUBSCRIBER_SEARCH", "queue": "g1t-events-search" },
Routines run when something happens: a pull request ready for review or merged, checks or a deploy failing, an issue opened38 { "binding": "SUBSCRIBER_PACKAGES", "queue": "g1t-events-packages" },
39 // Agents' routines that run on events (services/agents/src/triggers.ts).
40 { "binding": "SUBSCRIBER_AGENTS", "queue": "g1t-events-agents" }
Rust repos service with shipping; pull requests kept in the model41 ],
Merge branch 'worktree-agent-ad8a36dfcd4176015' into spend-guardrails42 "consumers": [{ "queue": "g1t-events", "max_batch_size": 100, "max_batch_timeout": 1, "max_retries": 3, "dead_letter_queue": "g1t-events-dlq" }]
Rust repos service with shipping; pull requests kept in the model43 },
Audit logs are kept by plan: a week on free, 90 days on the plan, and what staff set for an account in sudo44 // Each workspace's audit log keeps as many days as billing says (7 free,
45 // 90 on the plan, or what staff set), asked for over this binding.
Inbox: the events service tells people what needs them as events arrive46 // The inbox (src/inbox.rs) reads what each event names from work, where
47 // its repository is from repos, and who acted from identity; listing
48 // asks repos which repositories the person can still read.
49 "services": [
50 { "binding": "BILLING", "service": "g1t-billing" },
51 { "binding": "WORK", "service": "g1t-work" },
52 { "binding": "REPOS", "service": "g1t-repos" },
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)53 { "binding": "IDENTITY", "service": "g1t-identity" },
54 // Each new inbox item, told live in the person's tabs and pushed (services/notify).
55 { "binding": "NOTIFY", "service": "g1t-notify" }
Inbox: the events service tells people what needs them as events arrive56 ],
Audit logs are kept by plan: a week on free, 90 days on the plan, and what staff set for an account in sudo57 // Once a day, audit entries older than AUDIT_MAX_DAYS are removed for
58 // everyone (keep it at least billing's AUDIT_MAX_DAYS), then each
59 // workspace's older than its own days. Only workspaces with entries
60 // older than AUDIT_MIN_DAYS, the shortest any plan keeps, are asked about.
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put61 "triggers": { "crons": ["41 3 * * *"] },
Audit logs are kept by plan: a week on free, 90 days on the plan, and what staff set for an account in sudo62 "vars": { "AUDIT_MAX_DAYS": "400", "AUDIT_MIN_DAYS": "7" },
Merge branch 'worktree-agent-a8752162fea25f63f' into spend-guardrails63 // Logs of a tenth of requests: every change in g1t is an event.
64 "observability": { "enabled": true, "head_sampling_rate": 0.1 }
Rust repos service with shipping; pull requests kept in the model65}

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