Skip to content

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.sh
726 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.

Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running1/**
2 * Scopes: what an access token may do on its owner's behalf. Mirrors
3 * `crates/contracts/src/scopes.rs`, which is the source of truth; a Rust
4 * test keeps the tables here the same.
5 *
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers6 * A token's permissions are its scopes read per resource: each resource
7 * at none or one level, such as issues: write. What a request may do is
8 * the intersection of the owner's role, the token's reach (the workspace
9 * it is made for, and its repositories) and its permissions.
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running10 */
11
12export type ScopeResource =
13 | "repo"
14 | "code"
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar15 | "security"
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running16 | "packages"
17 | "issues"
18 | "pull_requests"
19 | "agents"
20 | "workflows"
Token reach: workflow_files scope, fine-grained reach, workspace token cap21 | "workflow_files"
Merge checks: statuses and check runs on every commit22 | "checks"
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9723 | "deployments"
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.24 | "observability"
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running25 | "memory"
26 | "account"
API: notifications over REST and MCP, with notifications scopes27 | "notifications"
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)28 | "chat"
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running29 | "workspace"
Usage, Billing settings and prepaid AI credit; fixes from the UX audit30 | "billing"
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running31 | "access"
32 | "webhooks"
33 | "secrets"
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens34 | "runners"
Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet35 | "models"
36 | "artifacts";
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running37
38export type ScopeLevel = "read" | "write" | "run" | "delete" | "admin";
39
40/** Every scope, grouped by resource, least first. */
41export const SCOPES = [
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9742 { scope: "repo:read", description: "See repositories, their settings, labels, timelines, releases, languages, contributors and security alerts, and search" },
The Branches page does things to branches now. It has tabs (Overview, Yours, Active, Stale, All, kept in the address as ?tab=) and search; Overview shows the default branch, then the first five of your branches, the active ones and the stale ones, each linking to the rest. Each branch is a row with its name in a code chip with a copy button, who made its latest commit and when, that commit's checks, behind and ahead counts with bars drawn against the largest shown, and its pull request (the open one, else the newest merged or closed) with its state; on a phone the columns fold under the name. Yours is branches whose latest commit is the viewer's; stale is no commit in 90 days.43 { scope: "repo:write", description: "Create repositories, create, rename and delete branches, change how pull requests merge and publish releases" },
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge44 { scope: "repo:admin", description: "Rename, archive, transfer, delete or change who can see a repository, change its rulesets, and dismiss security alerts" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running45 { scope: "code:read", description: "Clone and fetch private repositories with git" },
46 { scope: "code:write", description: "Push commits with git" },
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar47 { scope: "security:read", description: "See secret scanning, code scanning and vulnerability alerts, custom patterns, the dependency graph and SBOM, and security settings" },
48 { scope: "security:write", description: "Dismiss and reopen alerts, bypass push protection, review bypass requests, manage custom patterns, upload SARIF and change security settings" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running49 { scope: "packages:read", description: "Pull container images and install private packages" },
50 { scope: "packages:write", description: "Push container images and publish packages" },
Merge packages: roles, Actions access, source label, soft delete, API51 { scope: "packages:delete", description: "Delete and restore packages and their versions" },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.52 { scope: "issues:read", description: "Read issues and comments" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running53 { scope: "issues:write", description: "Open, edit, close and comment on issues" },
54 { scope: "pull_requests:read", description: "Read pull requests, their changes, sessions and merge queues" },
55 { scope: "pull_requests:write", description: "Open, review, close and merge pull requests" },
56 { scope: "workflows:read", description: "Read workflows, runs and logs" },
57 { scope: "workflows:write", description: "Run, cancel, rerun and turn workflows on or off" },
Token reach: workflow_files scope, fine-grained reach, workspace token cap58 { scope: "workflow_files:write", description: "Add, change and delete workflow files under .g1t/workflows and .github/workflows, with git or the API" },
Merge checks: statuses and check runs on every commit59 { scope: "checks:read", description: "Read commits' statuses, check runs, check suites and annotations" },
60 { scope: "checks:write", description: "Report statuses and check runs on commits, and ask for checks to run again" },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9761 { scope: "deployments:read", description: "See deployments, their statuses and environments" },
62 { scope: "deployments:write", description: "Report deployments and their statuses, from any CI" },
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.63 { scope: "observability:read", description: "See projects' requests, logs, traces, errors and metrics, and their observability settings, ingest tokens and exports" },
64 { scope: "observability:write", description: "Resolve and ignore errors, and change projects' observability settings, ingest tokens and exports" },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.65 { scope: "memory:read", description: "Recall memory" },
66 { scope: "memory:write", description: "Save memory for whoever works on the project next" },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9767 { scope: "account:read", description: "Read your email addresses, invites, invitations, pinned projects and stars" },
68 { scope: "account:write", description: "Change your email addresses, make invites, answer invitations, pin projects and star repositories" },
API: notifications over REST and MCP, with notifications scopes69 { scope: "notifications:read", description: "See your inbox, its threads, and what you subscribe to and watch" },
70 { scope: "notifications:write", description: "Mark notifications read, done, saved or snoozed, subscribe to threads and watch repositories" },
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)71 { scope: "chat:read", description: "Read the conversations you are in: channels, direct messages, threads and reactions, live" },
72 { scope: "chat:write", description: "Send, edit and delete your messages, react, mark conversations read, and answer cards in chat" },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.73 { scope: "workspace:read", description: "Read workspace settings, invites, integrations, teams and rulesets" },
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge74 { scope: "workspace:admin", description: "Create and delete workspaces, invite members, connect integrations, create, change and delete teams, and change the workspace's rulesets" },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.75 { scope: "billing:read", description: "See a workspace's usage, budget and invoices" },
76 { scope: "billing:write", description: "Change a workspace's budget" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running77 { scope: "access:read", description: "See who has access to repositories" },
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar78 { scope: "access:admin", description: "Give and take away access to repositories, a team's included" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running79 { scope: "webhooks:read", description: "See webhooks and their deliveries" },
80 { scope: "webhooks:admin", description: "Create, change and delete webhooks" },
81 { scope: "secrets:read", description: "List secrets (never their values) and read variables" },
82 { scope: "secrets:admin", description: "Set and delete secrets and variables" },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.83 { scope: "runners:read", description: "See self-hosted runners and their groups" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running84 { scope: "runners:admin", description: "Register and remove self-hosted runners, change their groups and settings" },
Merge main into Artifacts Phase 285 { scope: "artifacts:read", description: "List, read and search artifacts you can see, their versions, and the numbers their dashboards show" },
86 { scope: "artifacts:write", description: "Create, rename, move, edit, trash and restore artifacts, and propose changes to them" },
87 { scope: "artifacts:admin", description: "Share artifacts, change who can open them, and delete them for good" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running88] as const;
89
Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet90/**
91 * Scopes of resources being built that tokens are not offered yet (Rust:
92 * `Resource::offered`). They parse in Rust and are typed here, but no
93 * preset, full access, OAuth request or token form hands them out, and no
94 * operation needs them. When one ships, its rows move to the end of
Merge main into Artifacts Phase 295 * `SCOPES` and `SCOPE_RESOURCES`. Empty now: Artifacts shipped last.
Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet96 */
Merge main into Artifacts Phase 297export const UPCOMING_SCOPES: readonly { scope: Scope; description: string }[] = [
Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet98] as const;
99
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.100/**
101 * Scopes of what g1t no longer has (Rust: `Resource::retired`): `agents`
102 * (g1t's own agents) and `models` (its model proxy and AI Gateway). Tokens
103 * and OAuth grants that stored them still read, but they are never offered
104 * or granted and no operation needs them: they give nothing. `isScope` and
105 * `parseScopes` leave them out.
106 */
107export const RETIRED_SCOPES = [
108 { scope: "agents:run", description: "Retired: put g1t's own agents to work. Grants nothing now" },
109 { scope: "models:read", description: "Retired: see the AI Gateway's requests. Grants nothing now" },
110 { scope: "models:write", description: "Retired: send requests through the AI Gateway. Grants nothing now" },
111] as const;
112
Merge main into Artifacts Phase 2113export type Scope = (typeof SCOPES)[number]["scope"];
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running114
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers115/** Where a resource sits on the token form; only a person's token may hold account ones. */
116export type ResourceGroup = "repository" | "workspace" | "account";
117
118/** Resources in the order settings show them, with their names for people and their group. */
119export const SCOPE_RESOURCES: { resource: ScopeResource; label: string; group: ResourceGroup }[] = [
120 { resource: "repo", label: "Repositories", group: "repository" },
121 { resource: "code", label: "Code", group: "repository" },
122 { resource: "security", label: "Security", group: "repository" },
123 { resource: "packages", label: "Packages", group: "repository" },
124 { resource: "issues", label: "Issues", group: "repository" },
125 { resource: "pull_requests", label: "Pull requests", group: "repository" },
126 { resource: "workflows", label: "Workflows", group: "repository" },
127 { resource: "workflow_files", label: "Workflow files", group: "repository" },
128 { resource: "checks", label: "Checks and statuses", group: "repository" },
129 { resource: "deployments", label: "Deployments", group: "repository" },
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.130 { resource: "observability", label: "Observability", group: "repository" },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.131 { resource: "memory", label: "Memory", group: "repository" },
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers132 { resource: "account", label: "Your account", group: "account" },
133 { resource: "notifications", label: "Notifications", group: "account" },
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)134 { resource: "chat", label: "Chat", group: "account" },
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers135 { resource: "workspace", label: "Workspaces", group: "workspace" },
136 { resource: "billing", label: "Billing", group: "workspace" },
137 { resource: "access", label: "Who has access", group: "repository" },
138 { resource: "webhooks", label: "Webhooks", group: "repository" },
139 { resource: "secrets", label: "Secrets and variables", group: "repository" },
140 { resource: "runners", label: "Self-hosted runners", group: "workspace" },
Merge main into Artifacts Phase 2141 { resource: "artifacts", label: "Artifacts", group: "workspace" },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running142];
143
Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet144/** Resources not offered yet, as `UPCOMING_SCOPES`: settings never show them. */
145export const UPCOMING_RESOURCES: { resource: ScopeResource; label: string; group: ResourceGroup }[] = [
146];
147
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.148/** Resources of what g1t no longer has, as `RETIRED_SCOPES`: settings never show them. */
149export const RETIRED_RESOURCES: { resource: ScopeResource; label: string; group: ResourceGroup }[] = [
150 { resource: "agents", label: "g1t agents", group: "repository" },
151 { resource: "models", label: "AI Gateway", group: "workspace" },
152];
153
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running154const LEVEL_ORDER: Record<ScopeLevel, number> = { read: 0, write: 1, run: 2, delete: 3, admin: 4 };
155
156export function scopeResource(scope: Scope): ScopeResource {
157 return scope.split(":")[0] as ScopeResource;
158}
159
160export function scopeLevel(scope: Scope): ScopeLevel {
161 return scope.split(":")[1] as ScopeLevel;
162}
163
164export function isScope(text: string): text is Scope {
165 return SCOPES.some((row) => row.scope === text);
166}
167
168/** Changes that are hard to undo, or decide who can reach what. */
169export function isDangerous(scope: Scope): boolean {
170 const level = scopeLevel(scope);
171 return level === "admin" || level === "delete";
172}
173
174export function describeScope(scope: Scope): string {
Artifacts contracts: folios, their four kinds, dashboard datasets, folio events and the artifacts scopes are typed and validated the same in TypeScript and Rust, with nothing using them yet175 return [...SCOPES, ...UPCOMING_SCOPES].find((row) => row.scope === scope)?.description ?? scope;
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running176}
177
178/** Whether holding `held` gives `needed`: the same resource, at its level or lower. */
179export function scopeIncludes(held: Scope, needed: Scope): boolean {
180 return (
181 scopeResource(held) === scopeResource(needed) &&
182 LEVEL_ORDER[scopeLevel(held)] >= LEVEL_ORDER[scopeLevel(needed)]
183 );
184}
185
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)186/**
187 * Whether a token holding `scopes` may do what `needed` gates (Rust:
188 * `TokenAccess::allows`). Null or absent scopes are full access, which
189 * holds every scope; unknown names give nothing.
190 */
191export function tokenAllows(scopes: readonly string[] | null | undefined, needed: Scope): boolean {
192 if (scopes === null || scopes === undefined) return true;
193 return scopes.some((held) => isScope(held) && scopeIncludes(held, needed));
194}
195
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running196/** The levels a resource has, least first. */
197export function levelsOf(resource: ScopeResource): ScopeLevel[] {
198 return SCOPES.filter((row) => scopeResource(row.scope) === resource).map((row) => scopeLevel(row.scope));
199}
200
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers201/** The token form's groups, in order. */
202export const RESOURCE_GROUPS: { group: ResourceGroup; label: string; about: string }[] = [
203 { group: "repository", label: "Repository permissions", about: "What it may do in the repositories it reaches." },
204 { group: "workspace", label: "Workspace permissions", about: "What it may do with the workspaces it reaches themselves." },
205 { group: "account", label: "Account permissions", about: "What it may do with your own account. Personal tokens only." },
206];
207
208/** A token's permissions: each resource held, at its highest level; left out is none. */
209export type Permissions = Partial<Record<ScopeResource, ScopeLevel>>;
210
211/** Scopes as permissions. Null scopes (full access) are every resource at its highest. */
212export function permissionsOf(scopes: readonly string[] | null): Permissions {
213 const permissions: Permissions = {};
214 const held = scopes === null ? SCOPES.map((row) => row.scope) : parseScopes(scopes.join(" "));
215 for (const scope of held) {
216 const resource = scopeResource(scope);
217 const now = permissions[resource];
218 if (!now || LEVEL_ORDER[scopeLevel(scope)] > LEVEL_ORDER[now]) permissions[resource] = scopeLevel(scope);
219 }
220 return permissions;
221}
222
223/** Permissions as the scopes a token stores: the highest of each resource, in table order. */
224export function scopesOfPermissions(permissions: Permissions): Scope[] {
225 const wanted = new Set(
226 Object.entries(permissions)
227 .filter(([, level]) => level)
228 .map(([resource, level]) => `${resource}:${level}`),
229 );
230 return SCOPES.map((row) => row.scope).filter((scope) => wanted.has(scope));
231}
232
233/** The longest a token with an expiry may last, in days. */
234export const MAX_TOKEN_LIFETIME_DAYS = 366;
235
236/** The most repositories a token may select. */
237export const MAX_SELECTED_REPOSITORIES = 50;
238
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running239/** Scopes from text separated by spaces or commas, in table order; unknown ones are left out. */
240export function parseScopes(text: string): Scope[] {
241 const given = new Set(text.split(/[\s,]+/).map((part) => part.trim().toLowerCase()));
242 return SCOPES.map((row) => row.scope).filter((scope) => given.has(scope));
243}
244
245/** What a token stores for full access. */
246export const FULL_ACCESS = "*";
247
248export type PresetId = "read_only" | "agent" | "ci" | "full";
249
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)250/** Starting points for choosing scopes. `*` is full access. No preset gives chat: an application gets it only by asking for it. */
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running251export const PRESET_SCOPES = {
252 read_only: [
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.253 "repo:read", "code:read", "security:read", "packages:read", "issues:read", "pull_requests:read", "workflows:read", "checks:read", "deployments:read", "observability:read", "memory:read", "account:read", "notifications:read", "workspace:read", "billing:read", "access:read", "webhooks:read", "secrets:read", "runners:read", "artifacts:read",
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running254 ] as const,
255 agent: [
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.256 "repo:read", "code:read", "code:write", "security:read", "packages:read", "issues:read", "issues:write", "pull_requests:read", "pull_requests:write", "workflows:read", "checks:read", "deployments:read", "observability:read", "memory:read", "memory:write", "account:read", "notifications:read", "notifications:write", "workspace:read", "billing:read", "access:read", "webhooks:read", "secrets:read", "artifacts:read",
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running257 ] as const,
258 ci: [
Merge checks: statuses and check runs on every commit259 "repo:read", "code:read", "code:write", "packages:read", "packages:write", "workflows:read", "workflows:write", "checks:read", "checks:write", "deployments:read", "deployments:write",
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running260 ] as const,
261 full: [
262 "*",
263 ] as const,
264};
265
266export const PRESETS: { id: PresetId; label: string; description: string }[] = [
267 { id: "read_only", label: "Read only", description: "Read everything you can read; change nothing." },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.268 { id: "agent", label: "Agent", description: "Read everything, work on issues and pull requests, and push code." },
Merge checks: statuses and check runs on every commit269 { id: "ci", label: "CI", description: "Clone and push code, push and pull packages, run workflows, and report checks and deployments." },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running270 { id: "full", label: "Full access", description: "Everything you can do, including deleting repositories and changing who has access." },
271];
272
273/** The scopes of a preset, or null for full access. */
274export function presetScopes(id: PresetId): Scope[] | null {
275 if (id === "full") return null;
276 return [...PRESET_SCOPES[id]] as Scope[];
277}
278
279/** What an OAuth client gets when it asks for nothing in particular. */
280export const OAUTH_DEFAULT_SCOPES: Scope[] = [...PRESET_SCOPES.agent];
281
282/** The operation each scope gates, by the API's operation names. */
283export const OPERATION_SCOPES = [
284 ["list_emails", "account:read"],
285 ["add_email", "account:write"],
Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036)286 ["confirm_email", "account:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running287 ["remove_email", "account:write"],
288 ["update_email_settings", "account:write"],
Anyone on g1t can invite a friend again: Invite a friend, in the account menu with how many are left beside it, opens Settings → Invites to g1t with a dialog for their email address and a note. The friend gets an email from them whose link opens sign-up with the address filled in and, because it came from that email, confirmed; their account starts with a workspace of its own, and the page lists every invite sent with where it stands (Pending, confirming their email, Joined as @them), with Copy link, Send again and Revoke on each. It is word of mouth, never a gate: sign-ups stay open to everyone, nothing asks for an invite, and running out says friends can still sign up without one.289 ["list_invites", "account:read"],
290 ["create_invite", "account:write"],
291 ["revoke_invite", "account:write"],
292 ["resend_invite", "account:write"],
Merge workspace invitations: nobody joins a workspace without saying yes, people are found by username, your own invites can bring someone in, and nobody is left without a workspace (identity 0040)293 ["list_invitations", "account:read"],
294 ["accept_invitation", "account:write"],
295 ["decline_invitation", "account:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running296 ["list_my_repo_invitations", "account:read"],
297 ["accept_repo_invitation", "account:write"],
298 ["decline_repo_invitation", "account:write"],
API: pinned projects over REST and MCP299 // Your pinned projects: a preference of your account.
300 ["list_pinned_projects", "account:read"],
301 ["pin_project", "account:write"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97302 // Your stars: a preference of your account.
303 ["list_starred", "account:read"],
304 ["check_starred", "account:read"],
305 ["star_repo", "account:write"],
306 ["unstar_repo", "account:write"],
API: pinned projects over REST and MCP307 ["unpin_project", "account:write"],
308 ["reorder_pinned_projects", "account:write"],
API: notifications over REST and MCP, with notifications scopes309 // Your inbox: notifications, subscriptions and watching.
310 ["list_notifications", "notifications:read"],
311 ["get_notification_thread", "notifications:read"],
312 ["get_thread_subscription", "notifications:read"],
313 ["get_repo_subscription", "notifications:read"],
314 ["list_watched_repos", "notifications:read"],
315 ["mark_notifications_read", "notifications:write"],
316 ["mark_thread_read", "notifications:write"],
317 ["mark_thread_done", "notifications:write"],
318 ["save_thread", "notifications:write"],
319 ["snooze_thread", "notifications:write"],
320 ["set_thread_subscription", "notifications:write"],
321 ["delete_thread_subscription", "notifications:write"],
322 ["set_repo_subscription", "notifications:write"],
323 ["delete_repo_subscription", "notifications:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running324 ["create_workspace", "workspace:admin"],
325 ["delete_workspace", "workspace:admin"],
Merge branch 'worktree-agent-ad7c6d88d93adc817'326 ["get_workspace", "workspace:read"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running327 ["update_workspace", "workspace:admin"],
Merge main (membership, two-factor, GitHub repo roles) into tokens328 ["list_members", "workspace:read"],
329 ["update_member", "workspace:admin"],
330 ["remove_member", "workspace:admin"],
331 ["transfer_ownership", "workspace:admin"],
332 ["leave_workspace", "account:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running333 ["list_workspace_invites", "workspace:read"],
334 ["invite_member", "workspace:admin"],
335 ["revoke_workspace_invite", "workspace:admin"],
336 ["list_integrations", "workspace:read"],
337 ["connect_integration", "workspace:admin"],
AI Gateway: OpenAI's format, open models, and your own providers338 ["update_integration", "workspace:admin"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running339 ["disconnect_integration", "workspace:admin"],
340 ["test_integration", "workspace:admin"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar341 ["list_teams", "workspace:read"],
342 ["get_team", "workspace:read"],
343 ["list_team_members", "workspace:read"],
344 ["list_child_teams", "workspace:read"],
345 ["list_team_repos", "workspace:read"],
346 ["list_user_teams", "workspace:read"],
347 ["create_team", "workspace:admin"],
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge348 ["list_workspace_rulesets", "workspace:read"],
349 ["get_workspace_ruleset", "workspace:read"],
350 ["list_workspace_rule_evaluations", "workspace:read"],
351 ["create_workspace_ruleset", "workspace:admin"],
352 ["update_workspace_ruleset", "workspace:admin"],
353 ["delete_workspace_ruleset", "workspace:admin"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar354 ["update_team", "workspace:admin"],
355 ["delete_team", "workspace:admin"],
356 ["set_team_member", "workspace:admin"],
357 ["remove_team_member", "workspace:admin"],
358 ["set_team_review_assignment", "workspace:admin"],
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.359 // A workspace's billing: usage, budget and invoices.
Usage, Billing settings and prepaid AI credit; fixes from the UX audit360 ["get_usage", "billing:read"],
361 ["get_budget", "billing:read"],
362 ["list_invoices", "billing:read"],
363 ["get_billing_details", "billing:read"],
364 ["set_budget", "billing:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running365 ["list_repos", "repo:read"],
366 ["get_repo", "repo:read"],
g1t coordinates the work and the person's own sessions do it: Ask g1t reads g1t with the same tools any agent gets, answers in one conversation shared with the @g1t direct message in Chat, and hands work to sessions in the person's own harness, whose subagents g1t records, ties to issues and pull requests, and lets see each other.367 // A file or directory of a repository, as clone and fetch would give it.
368 ["get_contents", "code:read"],
369 ["list_commits", "code:read"],
Merge GitHub pull request #8 (claude/cool-newton-7nm8r9): Docker deployments on g1t.page behind a switch that stays off until Cloudflare's container APIs are checked live, workflows a workspace manages in its repositories, tarball and zipball downloads, refs/pull/* kept to g1t alone, framework detection for g1t.page builds, and a workflow's event payload matching GitHub's.370 ["download_tarball_archive", "code:read"],
371 ["download_zipball_archive", "code:read"],
Merge branch 'worktree-agent-ab8033ab973f8d99a'372 ["why", "code:read"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97373 // Projects follow their repositories.
374 ["list_projects", "repo:read"],
375 ["get_project", "repo:read"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running376 ["search", "repo:read"],
377 ["list_events", "repo:read"],
g1t coordinates the work and the person's own sessions do it: Ask g1t reads g1t with the same tools any agent gets, answers in one conversation shared with the @g1t direct message in Chat, and hands work to sessions in the person's own harness, whose subagents g1t records, ties to issues and pull requests, and lets see each other.378 // A workspace's activity: the events of its repositories the caller can read.
379 ["get_workspace_activity", "repo:read"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97380 // What the default branch says about a repository, who starred it, and
381 // its releases.
382 ["get_languages", "repo:read"],
383 ["list_contributors", "repo:read"],
384 ["get_license", "repo:read"],
385 ["list_stargazers", "repo:read"],
386 ["list_releases", "repo:read"],
387 ["get_latest_release", "repo:read"],
388 ["get_release_by_tag", "repo:read"],
389 ["get_release", "repo:read"],
390 ["create_release", "repo:write"],
391 ["update_release", "repo:write"],
392 ["delete_release", "repo:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running393 ["list_labels", "repo:read"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar394 ["list_milestones", "repo:read"],
395 ["get_milestone", "repo:read"],
396 ["create_label", "issues:write"],
397 ["update_label", "issues:write"],
398 ["delete_label", "issues:write"],
399 ["add_default_labels", "issues:write"],
400 ["create_milestone", "issues:write"],
401 ["update_milestone", "issues:write"],
402 ["delete_milestone", "issues:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running403 ["get_repo_settings", "repo:read"],
404 ["list_check_names", "repo:read"],
405 ["list_deleted_repos", "repo:read"],
406 ["list_security_alerts", "repo:read"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar407 ["get_codeowners_errors", "repo:read"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running408 ["create_repo", "repo:write"],
409 ["update_repo", "repo:write"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97410 ["update_project", "repo:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running411 ["update_repo_settings", "repo:write"],
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge412 ["list_repo_rulesets", "repo:read"],
413 ["get_repo_ruleset", "repo:read"],
414 ["get_branch_rules", "repo:read"],
415 ["list_rule_evaluations", "repo:read"],
416 ["create_repo_ruleset", "repo:admin"],
417 ["update_repo_ruleset", "repo:admin"],
418 ["delete_repo_ruleset", "repo:admin"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running419 ["rename_branch", "repo:write"],
The Branches page does things to branches now. It has tabs (Overview, Yours, Active, Stale, All, kept in the address as ?tab=) and search; Overview shows the default branch, then the first five of your branches, the active ones and the stale ones, each linking to the rest. Each branch is a row with its name in a code chip with a copy button, who made its latest commit and when, that commit's checks, behind and ahead counts with bars drawn against the largest shown, and its pull request (the open one, else the newest merged or closed) with its state; on a phone the columns fold under the name. Yours is branches whose latest commit is the viewer's; stale is no commit in 90 days.420 ["create_branch", "repo:write"],
421 ["delete_branch", "repo:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running422 ["rename_repo", "repo:admin"],
423 ["transfer_repo", "repo:admin"],
424 ["archive_repo", "repo:admin"],
425 ["unarchive_repo", "repo:admin"],
426 ["set_repo_visibility", "repo:admin"],
427 ["delete_repo", "repo:admin"],
428 ["restore_repo", "repo:admin"],
429 ["purge_repo", "repo:admin"],
430 ["dismiss_security_alert", "repo:admin"],
431 ["reopen_security_alert", "repo:admin"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar432 // The security suite.
433 ["list_secret_scanning_alerts", "security:read"],
434 ["get_secret_scanning_alert", "security:read"],
435 ["list_secret_scanning_locations", "security:read"],
436 ["list_bypass_requests", "security:read"],
437 ["list_custom_patterns", "security:read"],
438 ["list_code_scanning_alerts", "security:read"],
439 ["get_code_scanning_alert", "security:read"],
440 ["list_code_scanning_analyses", "security:read"],
441 ["get_sarif_upload", "security:read"],
442 ["list_vulnerability_alerts", "security:read"],
443 ["get_vulnerability_alert", "security:read"],
444 ["get_dependency_graph", "security:read"],
445 ["get_sbom", "security:read"],
446 ["compare_dependencies", "security:read"],
447 ["get_security_settings", "security:read"],
448 ["get_workspace_security_settings", "security:read"],
449 ["get_security_overview", "security:read"],
Merge remote-tracking branch 'origin/claude/cool-newton-7nm8r9' into claude/cool-newton-7nm8r9450 ["list_security_advisories", "security:read"],
451 ["get_security_advisory", "security:read"],
452 ["list_vulnerability_reports", "security:read"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar453 ["update_secret_scanning_alert", "security:write"],
454 ["bypass_push_protection", "security:write"],
455 ["check_secret_validity", "security:write"],
456 ["review_bypass_request", "security:write"],
457 ["create_custom_pattern", "security:write"],
458 ["update_custom_pattern", "security:write"],
459 ["delete_custom_pattern", "security:write"],
460 ["dry_run_custom_pattern", "security:write"],
461 ["update_code_scanning_alert", "security:write"],
462 ["upload_sarif", "security:write"],
463 ["update_vulnerability_alert", "security:write"],
464 ["update_security_settings", "security:write"],
465 ["update_workspace_security_settings", "security:write"],
Merge remote-tracking branch 'origin/claude/cool-newton-7nm8r9' into claude/cool-newton-7nm8r9466 ["create_security_advisory", "security:write"],
467 ["update_security_advisory", "security:write"],
468 ["set_security_advisory_state", "security:write"],
469 ["report_vulnerability", "security:write"],
470 ["review_vulnerability_report", "security:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running471 ["list_issues", "issues:read"],
472 ["get_issue", "issues:read"],
473 ["create_issue", "issues:write"],
474 ["update_issue", "issues:write"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar475 ["list_issue_labels", "issues:read"],
476 ["add_issue_labels", "issues:write"],
477 ["set_issue_labels", "issues:write"],
478 ["remove_issue_labels", "issues:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running479 ["close_issue", "issues:write"],
480 ["reopen_issue", "issues:write"],
481 ["add_comment", "issues:write"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts482 ["edit_comment", "issues:write"],
483 ["delete_comment", "issues:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running484 ["import_issue", "issues:write"],
Merge branch 'worktree-agent-a6ec0a89d7fe7a9ae'485 ["list_claims", "issues:read"],
486 ["get_work", "issues:read"],
487 ["claim_issue", "issues:write"],
488 ["release_claim", "issues:write"],
489 ["hand_off_issue", "issues:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running490 ["list_pull_requests", "pull_requests:read"],
491 ["get_pull_request", "pull_requests:read"],
492 ["get_pull_request_changes", "pull_requests:read"],
493 ["read_session", "pull_requests:read"],
494 ["get_merge_queue", "pull_requests:read"],
Merge branch 'worktree-agent-ab8033ab973f8d99a'495 ["list_decisions", "pull_requests:read"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running496 ["create_pull_request", "pull_requests:write"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar497 ["update_pull_request", "pull_requests:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running498 ["record_session", "pull_requests:write"],
Merge branch 'worktree-agent-ab8033ab973f8d99a'499 ["record_decision", "pull_requests:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running500 ["mark_pull_request_ready", "pull_requests:write"],
501 ["close_pull_request", "pull_requests:write"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts502 ["reopen_pull_request", "pull_requests:write"],
503 ["convert_pull_request_to_draft", "pull_requests:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running504 ["review_pull_request", "pull_requests:write"],
505 ["merge_pull_request", "pull_requests:write"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar506 ["request_reviewers", "pull_requests:write"],
507 ["remove_requested_reviewers", "pull_requests:write"],
Merge branch 'worktree-agent-a6ec0a89d7fe7a9ae'508 ["get_session", "pull_requests:read"],
509 ["list_sessions", "pull_requests:read"],
510 ["start_session", "pull_requests:write"],
511 ["update_session", "pull_requests:write"],
512 ["end_session", "pull_requests:write"],
513 ["record_session_entries", "pull_requests:write"],
g1t coordinates the work and the person's own sessions do it: Ask g1t reads g1t with the same tools any agent gets, answers in one conversation shared with the @g1t direct message in Chat, and hands work to sessions in the person's own harness, whose subagents g1t records, ties to issues and pull requests, and lets see each other.514 ["start_agent_session", "pull_requests:write"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running515 ["list_workflows", "workflows:read"],
Merge branch 'worktree-agent-a4db4b523bb973765'516 ["get_workflow", "workflows:read"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running517 ["list_workflow_runs", "workflows:read"],
518 ["get_workflow_run", "workflows:read"],
519 ["get_job_logs", "workflows:read"],
520 ["dispatch_workflow", "workflows:write"],
521 ["cancel_workflow_run", "workflows:write"],
522 ["rerun_workflow_run", "workflows:write"],
523 ["update_workflow", "workflows:write"],
Actions: OIDC tokens, the toolkit's cache and artifact services, and artifacts in R2524 ["list_artifacts", "workflows:read"],
525 ["list_workflow_run_artifacts", "workflows:read"],
526 ["get_artifact", "workflows:read"],
527 ["download_artifact", "workflows:read"],
528 ["get_artifact_retention", "workflows:read"],
529 ["delete_artifact", "workflows:write"],
530 ["set_artifact_retention", "workflows:write"],
Merge branch 'worktree-agent-a3b9b1f730f55b5bf'531 ["list_caches", "workflows:read"],
532 ["get_cache_usage", "workflows:read"],
533 ["delete_caches_by_key", "workflows:write"],
534 ["delete_cache", "workflows:write"],
Merge checks: statuses and check runs on every commit535 ["list_commit_statuses", "checks:read"],
536 ["get_combined_status", "checks:read"],
537 ["list_check_runs_for_ref", "checks:read"],
538 ["get_check_run", "checks:read"],
539 ["list_check_run_annotations", "checks:read"],
540 ["list_check_suites_for_ref", "checks:read"],
541 ["get_check_suite", "checks:read"],
542 ["create_commit_status", "checks:write"],
543 ["create_check_run", "checks:write"],
544 ["update_check_run", "checks:write"],
545 ["rerequest_check_run", "checks:write"],
546 ["rerequest_check_suite", "checks:write"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97547 // Deployments, wherever they run: reading them, and reporting them.
548 ["list_deployments", "deployments:read"],
549 ["get_deployment", "deployments:read"],
550 ["list_deployment_statuses", "deployments:read"],
551 ["list_environments", "deployments:read"],
552 ["get_environment", "deployments:read"],
553 ["create_deployment", "deployments:write"],
554 ["create_deployment_status", "deployments:write"],
Merge branch 'worktree-agent-a4d35ee70c50683d0' into claude/cool-newton-7nm8r9555 ["start_deployment_build", "deployments:write"],
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.556 // Observability: what a project's software did, and how it is collected.
557 ["get_observability_overview", "observability:read"],
558 ["list_requests", "observability:read"],
559 ["get_request", "observability:read"],
560 ["list_logs", "observability:read"],
561 ["list_traces", "observability:read"],
562 ["get_trace", "observability:read"],
563 ["list_errors", "observability:read"],
564 ["list_metrics", "observability:read"],
565 ["get_metric", "observability:read"],
566 ["get_observability_settings", "observability:read"],
567 ["list_ingest_tokens", "observability:read"],
568 ["list_telemetry_exports", "observability:read"],
569 ["get_observability_usage", "observability:read"],
570 ["update_error", "observability:write"],
571 ["update_observability_settings", "observability:write"],
572 ["create_ingest_token", "observability:write"],
573 ["delete_ingest_token", "observability:write"],
574 ["create_telemetry_export", "observability:write"],
575 ["update_telemetry_export", "observability:write"],
576 ["delete_telemetry_export", "observability:write"],
Merge branch 'worktree-agent-a3abfcce648e87dca'577 // What keeps runs safe: the runs environments hold and reviewing them,
578 // approving a pull request's run, and a repository's own rules for its
579 // environments and tokens, which are an admin's.
580 ["get_pending_deployments", "workflows:read"],
581 ["review_pending_deployments", "workflows:write"],
582 ["approve_workflow_run", "workflows:write"],
583 ["get_workflow_permissions", "repo:read"],
584 ["get_fork_pr_approval", "repo:read"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts585 ["get_actions_access", "repo:read"],
Merge branch 'worktree-agent-a3abfcce648e87dca'586 ["update_environment", "repo:admin"],
587 ["delete_environment", "repo:admin"],
588 ["set_workflow_permissions", "repo:admin"],
589 ["set_fork_pr_approval", "repo:admin"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts590 ["set_actions_access", "repo:admin"],
Merge branch 'worktree-agent-a3abfcce648e87dca'591 // Starting workflows from outside, as a push would.
592 ["create_repository_dispatch", "code:write"],
593 // A workspace's policy for its repositories' tokens.
594 ["get_workspace_workflow_permissions", "workspace:read"],
595 ["set_workspace_workflow_permissions", "workspace:admin"],
Merge GitHub pull request #8 (claude/cool-newton-7nm8r9): Docker deployments on g1t.page behind a switch that stays off until Cloudflare's container APIs are checked live, workflows a workspace manages in its repositories, tarball and zipball downloads, refs/pull/* kept to g1t alone, framework detection for g1t.page builds, and a workflow's event payload matching GitHub's.596 ["list_workspace_managed_workflows", "workspace:read"],
597 ["create_workspace_managed_workflow", "workspace:admin"],
598 ["update_workspace_managed_workflow", "workspace:admin"],
599 ["delete_workspace_managed_workflow", "workspace:admin"],
API and MCP for a workspace's personal access token rules, members' tokens and approvals600 // A workspace's rules for personal access tokens, and its members' tokens.
601 ["get_token_policy", "workspace:read"],
602 ["set_token_policy", "workspace:admin"],
603 ["list_member_tokens", "access:read"],
604 ["list_token_requests", "access:read"],
605 ["review_token_request", "access:admin"],
606 ["revoke_member_token", "access:admin"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running607 ["recall", "memory:read"],
608 ["get_context", "memory:read"],
609 ["remember", "memory:write"],
610 ["list_collaborators", "access:read"],
611 ["get_collaborator_permission", "access:read"],
612 ["list_repo_invitations", "access:read"],
613 ["list_outside_collaborators", "access:read"],
614 ["add_collaborator", "access:admin"],
615 ["update_collaborator", "access:admin"],
616 ["remove_collaborator", "access:admin"],
617 ["revoke_repo_invitation", "access:admin"],
618 ["set_base_permission", "access:admin"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar619 ["set_team_repo", "access:admin"],
620 ["remove_team_repo", "access:admin"],
Merge branch 'worktree-agent-a5a5de74d8863d554' into worktree-agent-a16631325aecf58ca621 ["list_deploy_keys", "access:read"],
622 ["get_deploy_key", "access:read"],
623 ["create_deploy_key", "access:admin"],
624 ["delete_deploy_key", "access:admin"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running625 ["list_webhooks", "webhooks:read"],
626 ["list_webhook_deliveries", "webhooks:read"],
627 ["create_webhook", "webhooks:admin"],
628 ["update_webhook", "webhooks:admin"],
629 ["delete_webhook", "webhooks:admin"],
630 ["ping_webhook", "webhooks:admin"],
631 ["redeliver_webhook", "webhooks:admin"],
632 ["list_actions_secrets", "secrets:read"],
633 ["list_actions_variables", "secrets:read"],
634 ["set_actions_secret", "secrets:admin"],
635 ["delete_actions_secret", "secrets:admin"],
636 ["set_actions_variable", "secrets:admin"],
637 ["delete_actions_variable", "secrets:admin"],
638 // Self-hosted runners.
639 ["list_runners", "runners:read"],
640 ["list_runner_groups", "runners:read"],
641 ["get_runner_settings", "runners:read"],
642 ["create_runner_registration_token", "runners:admin"],
643 ["remove_runner", "runners:admin"],
644 ["create_runner_group", "runners:admin"],
645 ["update_runner_group", "runners:admin"],
646 ["delete_runner_group", "runners:admin"],
647 ["update_runner_settings", "runners:admin"],
Merge packages: roles, Actions access, source label, soft delete, API648 // Packages: reading them, their versions and who may use them needs
649 // `packages:read`; changing their settings, access and Manage Actions
650 // access `packages:write` (and the Admin role on the package, which the
651 // packages service checks); deleting and restoring packages and
652 // versions `packages:delete`, as the registries' own deletes do.
653 ["list_packages", "packages:read"],
654 ["get_package", "packages:read"],
655 ["list_package_versions", "packages:read"],
656 ["get_package_version", "packages:read"],
657 ["list_package_access", "packages:read"],
658 ["list_package_actions_access", "packages:read"],
659 ["update_package", "packages:write"],
660 ["link_package", "packages:write"],
661 ["unlink_package", "packages:write"],
662 ["set_package_access", "packages:write"],
663 ["remove_package_access", "packages:write"],
664 ["set_package_actions_access", "packages:write"],
665 ["remove_package_actions_access", "packages:write"],
666 ["delete_package", "packages:delete"],
667 ["restore_package", "packages:delete"],
668 ["delete_package_version", "packages:delete"],
669 ["restore_package_version", "packages:delete"],
Merge main into Artifacts Phase 2670 // Artifacts mode's docs, slides, designs and dashboards (the `artifact`
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.671 // MCP tool). The artifacts service then checks the person's role on each.
Merge main into Artifacts Phase 2672 ["list_workspace_artifacts", "artifacts:read"],
673 ["search_workspace_artifacts", "artifacts:read"],
674 ["get_workspace_artifact", "artifacts:read"],
675 ["get_workspace_artifact_content", "artifacts:read"],
676 ["list_workspace_artifact_versions", "artifacts:read"],
677 ["get_workspace_artifact_access", "artifacts:read"],
678 ["list_workspace_artifact_templates", "artifacts:read"],
679 ["list_workspace_artifact_spaces", "artifacts:read"],
680 ["query_workspace_dataset", "artifacts:read"],
681 ["create_workspace_artifact", "artifacts:write"],
682 ["update_workspace_artifact", "artifacts:write"],
683 ["edit_workspace_artifact", "artifacts:write"],
684 ["trash_workspace_artifact", "artifacts:write"],
685 ["restore_workspace_artifact", "artifacts:write"],
686 ["restore_workspace_artifact_version", "artifacts:write"],
687 ["set_workspace_artifact_access", "artifacts:admin"],
688 ["purge_workspace_artifact", "artifacts:admin"],
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running689] as const;
690
691/**
692 * The scopes a token or grant holds, as stored: null for full access, or
693 * the list. `legacy` marks a token made before scopes, which has full
694 * access until someone narrows it.
695 */
696export type TokenScopes = {
697 scopes: Scope[] | null;
698 legacy: boolean;
699};
700
701/**
702 * How settings group scopes into a checklist: each group's scopes, least
703 * first. Admin scopes are not here; they are under "Dangerous" on their
704 * own (see `DANGEROUS_SCOPES`). Every other scope is in exactly one group.
705 */
706export const SCOPE_GROUPS: { id: string; label: string; scopes: Scope[] }[] = [
707 { id: "code", label: "Repositories & code", scopes: ["repo:read", "repo:write", "code:read", "code:write"] },
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar708 { id: "security", label: "Security", scopes: ["security:read", "security:write"] },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running709 { id: "packages", label: "Packages", scopes: ["packages:read", "packages:write"] },
710 { id: "work", label: "Issues & pull requests", scopes: ["issues:read", "issues:write", "pull_requests:read", "pull_requests:write"] },
Token reach: workflow_files scope, fine-grained reach, workspace token cap711 { id: "workflows", label: "Workflows", scopes: ["workflows:read", "workflows:write", "workflow_files:write"] },
Merge checks: statuses and check runs on every commit712 { id: "checks", label: "Checks", scopes: ["checks:read", "checks:write"] },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97713 { id: "deployments", label: "Deployments", scopes: ["deployments:read", "deployments:write"] },
Projects have Observability: their requests, logs, traces, metrics and errors, from apps on g1t.page with nothing to set up, and from software anywhere else over OpenTelemetry.714 { id: "observability", label: "Observability", scopes: ["observability:read", "observability:write"] },
The contracts no longer describe g1t's own agents, and workspaces can keep their AI providers. Every consumer had already stopped using them, so the TypeScript and Rust contracts drop the workspace-agent, ability, look, skill-library, context, runner-agent and mention modules, the chat and docs RPCs agents posted and read through, the folio agent methods, the agent_waiting notification, agent.asked and memory.changed events, AI credit, token and gateway billing types, model routes and sessions, team agents, agent tokens, plan, review, message and confidence types, command rules, cost caps and confidence rules. The agents:run and models:* scopes are no longer offered by any preset, OAuth default or permission form, but a stored token or grant that names them still reads; and the removed operations are gone from the scope table, so the API's check that every operation has exactly one scope is strict again. What stored data needs in order to parse (old run and credential kinds, an agent team lead, retired rules and webhook events, old guardrail and integration settings) still parses, and a run's token is still PrincipalKind::Agent, which now means a run's token and the @g1t rows written before. The customize, marketplace, skills and claude-plugin contracts stay only until the mobile app drops its Customize screens.715 { id: "memory", label: "Memory", scopes: ["memory:read", "memory:write"] },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running716 { id: "account", label: "Account", scopes: ["account:read", "account:write"] },
API: notifications over REST and MCP, with notifications scopes717 { id: "notifications", label: "Notifications", scopes: ["notifications:read", "notifications:write"] },
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)718 { id: "chat", label: "Chat", scopes: ["chat:read", "chat:write"] },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running719 { id: "workspace", label: "Workspace", scopes: ["workspace:read", "access:read", "webhooks:read", "secrets:read"] },
Usage, Billing settings and prepaid AI credit; fixes from the UX audit720 { id: "billing", label: "Billing", scopes: ["billing:read", "billing:write"] },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running721 { id: "runners", label: "Runners", scopes: ["runners:read"] },
Merge main into Artifacts Phase 2722 { id: "artifacts", label: "Artifacts", scopes: ["artifacts:read", "artifacts:write"] },
Costs: a statement that keeps usage sold, running g1t, subscriptions and what was given away (comped, free use, trial, pool) apart, and says who was paid; free use carries its own cost; the run button says it is running723];
724
725/** The admin and delete scopes, shown under "Dangerous" behind a warning. */
726export const DANGEROUS_SCOPES: Scope[] = SCOPES.map((row) => row.scope).filter(isDangerous);

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