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.
| 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. | 1 | { |
| 2 | "$schema": "../../node_modules/wrangler/config-schema.json", | |
| 3 | // Artifacts: docs (and later slides, designs and dashboards), their | |
| 4 | // spaces, sharing and live editing. Until 2026-10 this Worker was | |
| 5 | // g1t-docs-service (services/docs); its database, bucket, indexes and | |
| 6 | // queue kept their names, and its live rooms moved here with the | |
| 7 | // transfer migration below. | |
| 8 | "name": "g1t-artifacts", | |
| 9 | "account_id": "1e6f2cffa3f445920836e8ebe446bb58", | |
| 10 | "compatibility_date": "2026-09-26", | |
| 11 | "main": "./src/index.ts", | |
| 12 | // Reached only through service bindings. The live socket's and uploads' | |
| 13 | // viewer comes in a header the site sets after checking the session, | |
| 14 | // which is only safe to trust because nothing else can reach this Worker. | |
| 15 | "workers_dev": false, | |
| 16 | "placement": { "mode": "off" }, | |
| 17 | "d1_databases": [ | |
| 18 | { | |
| 19 | "binding": "DB", | |
| 20 | "database_name": "g1t-docs", | |
| 21 | // Create it once, then put its id here: | |
| 22 | // npx wrangler d1 create g1t-docs | |
| 23 | // npx wrangler d1 migrations apply g1t-docs --remote | |
| 24 | "database_id": "8f2193ed-fd2b-4322-b6cb-c79090e7603d", | |
| 25 | "migrations_dir": "migrations" | |
| 26 | } | |
| 27 | ], | |
| 28 | // Files people put in pages (images, attachments), served from the | |
| 29 | // usercontent origin at /docs-files/<key> (apps/web/workers/usercontent.ts). | |
| 30 | // Create it once: npx wrangler r2 bucket create g1t-docs-files | |
| 31 | // Self-hosted, any S3-compatible store instead: DOCS_FILES=s3 and the | |
| 32 | // DOCS_S3_* settings (src/files.ts, | |
| 33 | // docs.g1t.sh/guides/self-hosting-architecture/, "Storage"). | |
| 34 | "r2_buckets": [{ "binding": "FILES", "bucket_name": "g1t-docs-files" }], | |
| Chat, artifacts and notifications no longer serve g1t's own agents. Direct messages and conversation invites take people only, and a space or folio is shared with people and teams. Chat stops waking agents, drops the RPCs agents posted, read, searched and handed off through, and stops answering buttons on agent cards; old cards keep their links. An agent's old messages still show, under its saved name or as "A deleted agent". Artifacts drops the folio and docs RPCs agents read and edited pages with, and an old agent member of a space can still be removed. Notifications drop "an agent is waiting on you". A deployment no longer trusts a pull request with secrets just because g1t's agent opened it, and the sign-up card no longer promises a team of agents. | 35 | // The semantic index search reads by meaning (src/indexer.ts, src/vectors.ts): |
| 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. | 36 | // Workers AI embeds passages (@cf/baai/bge-base-en-v1.5, 768 dimensions) |
| 37 | // into Vectorize, with metadata indexes on workspace_id and space_id so a | |
| 38 | // query only reads spaces its reader may. Create it once: | |
| 39 | // npx wrangler vectorize create g1t-docs --dimensions=768 --metric=cosine | |
| 40 | // npx wrangler vectorize create-metadata-index g1t-docs --property-name=workspace_id --type=string | |
| 41 | // npx wrangler vectorize create-metadata-index g1t-docs --property-name=space_id --type=string | |
| Chat, artifacts and notifications no longer serve g1t's own agents. Direct messages and conversation invites take people only, and a space or folio is shared with people and teams. Chat stops waking agents, drops the RPCs agents posted, read, searched and handed off through, and stops answering buttons on agent cards; old cards keep their links. An agent's old messages still show, under its saved name or as "A deleted agent". Artifacts drops the folio and docs RPCs agents read and edited pages with, and an old agent member of a space can still be removed. Notifications drop "an agent is waiting on you". A deployment no longer trusts a pull request with secrets just because g1t's agent opened it, and the sign-up card no longer promises a team of agents. | 42 | // Without them Docs still keeps passages in D1 and search matches words. |
| 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. | 43 | // |
| 44 | // Folios (Artifacts mode) have an index of their own, filtered by | |
| 45 | // workspace, scope and kind. Create it once, before the first deploy that | |
| 46 | // has this binding: | |
| 47 | // npx wrangler vectorize create g1t-folios --dimensions=768 --metric=cosine | |
| 48 | // npx wrangler vectorize create-metadata-index g1t-folios --property-name=workspace_id --type=string | |
| 49 | // npx wrangler vectorize create-metadata-index g1t-folios --property-name=scope --type=string | |
| 50 | // npx wrangler vectorize create-metadata-index g1t-folios --property-name=kind --type=string | |
| Chat, artifacts and notifications no longer serve g1t's own agents. Direct messages and conversation invites take people only, and a space or folio is shared with people and teams. Chat stops waking agents, drops the RPCs agents posted, read, searched and handed off through, and stops answering buttons on agent cards; old cards keep their links. An agent's old messages still show, under its saved name or as "A deleted agent". Artifacts drops the folio and docs RPCs agents read and edited pages with, and an old agent member of a space can still be removed. Notifications drop "an agent is waiting on you". A deployment no longer trusts a pull request with secrets just because g1t's agent opened it, and the sign-up card no longer promises a team of agents. | 51 | // Without FOLIO_VECTORS, artifacts are searched by words. |
| 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. | 52 | "ai": { "binding": "AI" }, |
| 53 | "vectorize": [ | |
| 54 | { "binding": "VECTORS", "index_name": "g1t-docs" }, | |
| 55 | { "binding": "FOLIO_VECTORS", "index_name": "g1t-folios" } | |
| 56 | ], | |
| 57 | "services": [ | |
| 58 | // Workspaces by slug, people's names and avatars, and teams. | |
| 59 | { "binding": "IDENTITY", "service": "g1t-identity" }, | |
| 60 | // Mentions and suggestions reach people's inboxes (services/notify). | |
| 61 | { "binding": "NOTIFY", "service": "g1t-notify" }, | |
| 62 | // Who may read a repository, what a change touched, and a project's | |
| 63 | // docs folder (src/staleness.ts, src/repo-spaces.ts). | |
| 64 | { "binding": "REPOS", "service": "g1t-repos" }, | |
| 65 | // What a merged pull request changed. | |
| 66 | { "binding": "WORK", "service": "g1t-work" }, | |
| 67 | // doc.page.* events on the bus (src/events.ts). | |
| Merge main into rm-agents: mirroring removal, open signups, free-tier limits, the g1t CLI and runner fixes, with the agent removal kept. The CLI's table of operations is regenerated from the API without the agent, customize and AI credit operations; no CLI command used them. | 68 | { "binding": "EVENTS", "service": "g1t-events" }, |
| 69 | // Whether a workspace has the plan, once its files pass the free cap (src/quota.ts). | |
| 70 | { "binding": "BILLING", "service": "g1t-billing" } | |
| 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. | 71 | ], |
| Merge main into rm-agents: mirroring removal, open signups, free-tier limits, the g1t CLI and runner fixes, with the agent removal kept. The CLI's table of operations is regenerated from the API without the agent, customize and AI credit operations; no CLI command used them. | 72 | // What a workspace without the plan may keep in files put in its pages |
| 73 | // and artifacts, in bytes; past it, new uploads are refused (src/quota.ts). | |
| 74 | // 0 is no cap. | |
| 75 | "vars": { "FREE_DOC_FILES_BYTES": "1073741824" }, | |
| 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. | 76 | // Merges and pushes to default branches: pages whose cited code |
| 77 | // changed, and projects' docs read again (src/staleness.ts). The events | |
| 78 | // service sends it what g1t_contracts::subscribers routes to | |
| 79 | // SUBSCRIBER_DOCS. Create it once: npx wrangler queues create g1t-events-docs | |
| 80 | "queues": { | |
| 81 | // Its own backfill jobs ride the same queue (`docs.index`, | |
| 82 | // src/indexer.ts): a workspace's pages and projects' docs indexed in | |
| 83 | // batches, and waiting out the hourly embedding cap. | |
| 84 | "producers": [{ "binding": "JOBS", "queue": "g1t-events-docs" }], | |
| 85 | "consumers": [{ "queue": "g1t-events-docs", "max_batch_size": 20, "max_batch_timeout": 2, "max_retries": 3, "dead_letter_queue": "g1t-events-dlq" }] | |
| 86 | }, | |
| 87 | // One room per page: it holds the page's Yjs document and open sockets, | |
| 88 | // hibernating while nobody types (src/room.ts). And one per folio | |
| 89 | // (Artifacts mode, src/folios/room.ts): PageRoom stays until Phase 7 | |
| 90 | // deletes it (`deleted_classes` in a v4 migration). | |
| 91 | "durable_objects": { | |
| 92 | "bindings": [ | |
| 93 | { "name": "PAGES", "class_name": "PageRoom" }, | |
| 94 | { "name": "FOLIOS", "class_name": "FolioRoom" } | |
| 95 | ] | |
| 96 | }, | |
| 97 | // Both classes were made on g1t-docs-service (v1 PageRoom, v2 FolioRoom, | |
| 98 | // both SQLite). v3 transfers them, every room's storage with them, when | |
| 99 | // this Worker first deploys; until the old Worker is deleted, its own | |
| 100 | // bindings to them forward here. Never add new_sqlite_classes for them: | |
| 101 | // the transfer makes them. A new Cloudflare account has no | |
| 102 | // g1t-docs-service to transfer from, and `wrangler dev` learns a class | |
| 103 | // is SQLite only from new_sqlite_classes: both use | |
| 104 | // { "tag": "v3", "new_sqlite_classes": ["PageRoom", "FolioRoom"] } | |
| 105 | // instead (docs.g1t.sh/guides/deploy-to-cloudflare/, "A first deploy"). | |
| 106 | "migrations": [ | |
| 107 | { | |
| 108 | "tag": "v3", | |
| 109 | "transferred_classes": [ | |
| 110 | { "from": "PageRoom", "from_script": "g1t-docs-service", "to": "PageRoom" }, | |
| 111 | { "from": "FolioRoom", "from_script": "g1t-docs-service", "to": "FolioRoom" } | |
| 112 | ] | |
| 113 | } | |
| 114 | ], | |
| 115 | // Daily: folios in the trash for over 30 days are deleted for good. | |
| 116 | "triggers": { "crons": ["17 3 * * *"] }, | |
| 117 | "observability": { "enabled": true, "head_sampling_rate": 0.1 } | |
| 118 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.