g1t/services/billing/wrangler.jsonc

107 lines5,359 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.

Agents as a team: lifecycle, merge queue, billing and a new shell1{
2 "$schema": "../../node_modules/wrangler/config-schema.json",
3 "name": "g1t-billing",
4 "account_id": "1e6f2cffa3f445920836e8ebe446bb58",
5 "compatibility_date": "2026-09-26",
6 // 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" },
Agents as a team: lifecycle, merge queue, billing and a new shell9 "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" },
Agents as a team: lifecycle, merge queue, billing and a new shell11 // Reached only through service bindings.
12 "workers_dev": false,
13 "d1_databases": [
14 {
15 "binding": "DB",
16 "database_name": "g1t-billing",
17 "database_id": "695a6979-fd07-4850-bc97-904a6b4b7a04",
18 "migrations_dir": "migrations"
19 }
20 ],
Billing on Stripe's pages, month-end charges, warnings; sudo by workspace21 // Identity emails owners as their workspace nears its usage limit.
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put22 // Repos says which repositories are public (the open-source pool pays
23 // for work on those) and what private ones hold (the storage meter).
24 "services": [
25 { "binding": "IDENTITY", "service": "g1t-identity" },
26 { "binding": "REPOS", "service": "g1t-repos" }
27 ],
Agents and memory, checks and conflicts, profiles, slug renames, custom domains28 // Events from the bus: a workspace renamed moves its billing to the
29 // new slug (src/rename.rs).
30 "queues": {
31 "consumers": [{ "queue": "g1t-events-billing", "max_batch_size": 20, "max_batch_timeout": 1 }]
32 },
Agents as a team: lifecycle, merge queue, billing and a new shell33 "vars": {
Prices are what g1t pays plus 20%, from the first second34 // What is added to a model run's cost, in percent: g1t's overhead for
35 // running and building it. The price book's markups are the same.
Integrations: your own model provider, alerts that open issues, tickets agents read36 "MARGIN_PERCENT": "20",
Free while g1t is being built out; agents can check out their own forks37 // While g1t is being built out, workspaces pay nothing: runs are
38 // recorded with what they cost, and nothing is charged. Set to
39 // "false" when pricing starts.
Billing accounts, terms and enterprises; g1t is no longer free40 // Off: workspaces are charged as their account's terms say. g1t's own
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look41 // (flagon-io, Flagon, Inc.'s) is comped in sudo.g1t.sh, not by this switch.
Billing accounts, terms and enterprises; g1t is no longer free42 "FREE_WHILE_BUILDING": "false",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look43 // The g1t plan (src/features.rs): $20 a month per workspace, never
44 // per person. It includes $10 of usage a month at cost plus 20%, used
45 // first and not rolled over; the other $10 pays for running g1t, the
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas46 // free forge for everyone, and the people building it. No quotas:
47 // builds, requests, CPU, custom domains, storage and git operations
48 // are all metered at cost plus 20% and drawn from the $10 first; only
49 // the workspace's spend limit stops it. Projects are not metered.
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look50 "PLAN_MONTHLY_CENTS": "2000",
51 "PLAN_INCLUDED_MICROS": "10000000",
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas52 // 1 GB of private storage free for every workspace: past it, the plan
53 // pays at cost plus the margin, and a free workspace's pushes to
54 // private repositories stop. The audit log is kept 90 days on every plan.
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look55 "FREE_PRIVATE_STORAGE_BYTES": "1000000000",
56 "AUDIT_RETENTION_DAYS": "90",
57 // The trial (src/credits.rs, src/cards.rs): $5 of usage once per new
58 // workspace, granted after a card check (one per card), out of a pool
59 // for everyone ($100) that resets each calendar month (UTC). Either at
60 // 0 turns new trials off. Never for deployments.
61 "TRIAL_WORKSPACE_MICROS": "5000000",
62 "TRIAL_MONTHLY_POOL_MICROS": "100000000",
63 // g1t's open-source pool: checks, workflows and the merge queue on
64 // public repositories, for any workspace with a card check, up to $25
65 // a month in all and $2 a month for any one repository.
66 "OSS_POOL_MICROS": "25000000",
67 "OSS_REPO_MICROS": "2000000",
68 // Ceilings on usage not yet paid for (src/limits.rs): $3 for a free
69 // workspace (it has no on-demand compute), $100 for a paid one's first
70 // month, then twice what it has paid as payments clear, between the
71 // start and $1,000 (Established: its monthly spend, up to $10,000).
Usage limits: unpaid usage can only go so far72 "LIMIT_NEW_MICROS": "3000000",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look73 "LIMIT_PAID_START_MICROS": "100000000",
Usage limits: unpaid usage can only go so far74 "LIMIT_PAID_MIN_MICROS": "25000000",
75 "LIMIT_PAID_MAX_MICROS": "1000000000",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look76 // Caps on agents (src/compute.rs): one run's spend, and what the
77 // agents on one issue may spend in all. Owners and staff can change them.
78 "RUN_CAP_MICROS": "2000000",
79 "ISSUE_CAP_MICROS": "10000000",
80 // A spike: an hour's spend above 5 times the usual hour over the last
81 // week, and at least $5, pauses new compute until an owner confirms.
82 "SPIKE_FACTOR": "5",
83 "SPIKE_FLOOR_MICROS": "5000000",
84 // The most of an overage's real cost a one-click goodwill credit
85 // covers (src/overages.rs); it always gives back the margin too.
86 "OVERAGE_FORGIVE_COST_MICROS": "50000000",
status.g1t.sh with incident management, invites that land you in the workspace, settings as pages, usage without quotas87 // Git operations through g1t (src/storage.rs): 50,000 a month free for
88 // every workspace; past it the plan pays at cost plus 20% and is never
89 // slowed, and a free workspace is slowed down by the repos service
90 // (its GIT_OPERATIONS_FREE_CAP, the same number), never charged.
91 "GIT_OPERATIONS_INCLUDED": "50000",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look92 // A month's close charges no less than $5, so a payment's fee is never
93 // most of it: smaller amounts carry over. Charges at a limit always go
94 // through.
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put95 "MIN_CHARGE_MICROS": "5000000",
Prices keep themselves current with what g1t pays96 // Where the keeper reads what g1t pays (src/keeper.rs). Its token,
97 // CLOUDFLARE_USAGE_TOKEN, is a secret: Billing, Account Analytics
98 // and AI Gateway, read only.
99 "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58",
100 "AI_GATEWAY_ID": "g1t"
Agents as a team: lifecycle, merge queue, billing and a new shell101 },
Prices keep themselves current with what g1t pays102 // Settling runs every 15 minutes; checking costs daily (keeper::DAILY).
103 "triggers": { "crons": ["*/15 * * * *", "17 4 * * *"] },
Agents as a team: lifecycle, merge queue, billing and a new shell104 // Secret: STRIPE_SECRET_KEY. Without it nothing is charged and the
105 // runner decides who may start agents some other way.
106 "observability": { "enabled": true }
107}