flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/services/billing/wrangler.jsonc

106 lines5,219 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.
8 "placement": { "mode": "smart" },
9 "main": "build/index.js",
10 "build": { "command": "cargo install -q worker-build@0.8.7 && worker-build --release" },
11 // 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
46 // free forge for everyone, and the people building it. With it: 10 GB
47 // of private storage, and deployments (200 build minutes a month).
48 "PLAN_MONTHLY_CENTS": "2000",
49 "PLAN_INCLUDED_MICROS": "10000000",
50 "PLAN_PRIVATE_STORAGE_BYTES": "10000000000",
51 "DEPLOYMENTS_BUILD_SECONDS": "12000",
52 // Without the plan: 1 GB of private storage free, charged past it at
53 // cost plus the margin. The audit log is kept 90 days on every plan.
54 "FREE_PRIVATE_STORAGE_BYTES": "1000000000",
55 "AUDIT_RETENTION_DAYS": "90",
56 // The trial (src/credits.rs, src/cards.rs): $5 of usage once per new
57 // workspace, granted after a card check (one per card), out of a pool
58 // for everyone ($100) that resets each calendar month (UTC). Either at
59 // 0 turns new trials off. Never for deployments.
60 "TRIAL_WORKSPACE_MICROS": "5000000",
61 "TRIAL_MONTHLY_POOL_MICROS": "100000000",
62 // g1t's open-source pool: checks, workflows and the merge queue on
63 // public repositories, for any workspace with a card check, up to $25
64 // a month in all and $2 a month for any one repository.
65 "OSS_POOL_MICROS": "25000000",
66 "OSS_REPO_MICROS": "2000000",
67 // Ceilings on usage not yet paid for (src/limits.rs): $3 for a free
68 // workspace (it has no on-demand compute), $100 for a paid one's first
69 // month, then twice what it has paid as payments clear, between the
70 // start and $1,000 (Established: its monthly spend, up to $10,000).
Usage limits: unpaid usage can only go so far71 "LIMIT_NEW_MICROS": "3000000",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look72 "LIMIT_PAID_START_MICROS": "100000000",
Usage limits: unpaid usage can only go so far73 "LIMIT_PAID_MIN_MICROS": "25000000",
74 "LIMIT_PAID_MAX_MICROS": "1000000000",
Invite-only launch: sign in with GitHub, repository access and lifecycle, many emails, a new look75 // Caps on agents (src/compute.rs): one run's spend, and what the
76 // agents on one issue may spend in all. Owners and staff can change them.
77 "RUN_CAP_MICROS": "2000000",
78 "ISSUE_CAP_MICROS": "10000000",
79 // A spike: an hour's spend above 5 times the usual hour over the last
80 // week, and at least $5, pauses new compute until an owner confirms.
81 "SPIKE_FACTOR": "5",
82 "SPIKE_FLOOR_MICROS": "5000000",
83 // The most of an overage's real cost a one-click goodwill credit
84 // covers (src/overages.rs); it always gives back the margin too.
85 "OVERAGE_FORGIVE_COST_MICROS": "50000000",
86 // Git operations through g1t (src/storage.rs): 10,000 a month on every
87 // plan; past it the plan pays at cost plus 20%; a free workspace past
88 // 50,000 is slowed down by the repos service, never charged.
89 "GIT_OPERATIONS_INCLUDED": "10000",
90 "GIT_OPERATIONS_FREE_CAP": "50000",
91 // A month's close charges no less than $5, so a payment's fee is never
92 // most of it: smaller amounts carry over. Charges at a limit always go
93 // through.
Team plan, an open-source pool, monthly trials and honest metering; the sidebar for everyone; a workspace that stays put94 "MIN_CHARGE_MICROS": "5000000",
Prices keep themselves current with what g1t pays95 // Where the keeper reads what g1t pays (src/keeper.rs). Its token,
96 // CLOUDFLARE_USAGE_TOKEN, is a secret: Billing, Account Analytics
97 // and AI Gateway, read only.
98 "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58",
99 "AI_GATEWAY_ID": "g1t"
Agents as a team: lifecycle, merge queue, billing and a new shell100 },
Prices keep themselves current with what g1t pays101 // Settling runs every 15 minutes; checking costs daily (keeper::DAILY).
102 "triggers": { "crons": ["*/15 * * * *", "17 4 * * *"] },
Agents as a team: lifecycle, merge queue, billing and a new shell103 // Secret: STRIPE_SECRET_KEY. Without it nothing is charged and the
104 // runner decides who may start agents some other way.
105 "observability": { "enabled": true }
106}