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

Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays1/**
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.
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays10 */
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"
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member16 | "packages"
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays17 | "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"
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays24 | "memory"
25 | "account"
API: notifications over REST and MCP, with notifications scopes26 | "notifications"
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)27 | "chat"
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays28 | "workspace"
Usage, Billing settings and prepaid AI credit; fixes from the UX audit29 | "billing"
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays30 | "access"
31 | "webhooks"
32 | "secrets"
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens33 | "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 yet34 | "models"
35 | "artifacts";
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays36
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member37export type ScopeLevel = "read" | "write" | "run" | "delete" | "admin";
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays38
39/** Every scope, grouped by resource, least first. */
40export const SCOPES = [
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9741 { 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.42 { 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 merge43 { scope: "repo:admin", description: "Rename, archive, transfer, delete or change who can see a repository, change its rulesets, and dismiss security alerts" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays44 { scope: "code:read", description: "Clone and fetch private repositories with git" },
45 { scope: "code:write", description: "Push commits with git" },
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar46 { scope: "security:read", description: "See secret scanning, code scanning and vulnerability alerts, custom patterns, the dependency graph and SBOM, and security settings" },
47 { scope: "security:write", description: "Dismiss and reopen alerts, bypass push protection, review bypass requests, manage custom patterns, upload SARIF and change security settings" },
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member48 { scope: "packages:read", description: "Pull container images and install private packages" },
49 { scope: "packages:write", description: "Push container images and publish packages" },
Merge packages: roles, Actions access, source label, soft delete, API50 { scope: "packages:delete", description: "Delete and restore packages and their versions" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays51 { scope: "issues:read", description: "Read issues, comments and plans" },
52 { scope: "issues:write", description: "Open, edit, close and comment on issues" },
53 { scope: "pull_requests:read", description: "Read pull requests, their changes, sessions and merge queues" },
54 { scope: "pull_requests:write", description: "Open, review, close and merge pull requests" },
55 { scope: "agents:run", description: "Put g1t agents to work and message them, which uses the workspace's money" },
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" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays63 { scope: "memory:read", description: "Recall memory and search the workspace's context" },
64 { scope: "memory:write", description: "Save memory for the next agent" },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb9765 { scope: "account:read", description: "Read your email addresses, invites, invitations, pinned projects and stars" },
66 { 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 scopes67 { scope: "notifications:read", description: "See your inbox, its threads, and what you subscribe to and watch" },
68 { 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)69 { scope: "chat:read", description: "Read the conversations you are in: channels, direct messages, threads and reactions, live" },
70 { scope: "chat:write", description: "Send, edit and delete your messages, react, mark conversations read, and answer cards in chat" },
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge71 { scope: "workspace:read", description: "Read workspace settings, invites, integrations, model routes, teams and rulesets" },
72 { scope: "workspace:admin", description: "Create and delete workspaces, invite members, connect integrations, create, change and delete teams, and change the workspace's rulesets" },
Usage, Billing settings and prepaid AI credit; fixes from the UX audit73 { scope: "billing:read", description: "See a workspace's usage, budget, AI credit and invoices" },
74 { scope: "billing:write", description: "Change a workspace's budget and buy AI credit" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays75 { 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 bar76 { scope: "access:admin", description: "Give and take away access to repositories, a team's included" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays77 { scope: "webhooks:read", description: "See webhooks and their deliveries" },
78 { scope: "webhooks:admin", description: "Create, change and delete webhooks" },
79 { scope: "secrets:read", description: "List secrets (never their values) and read variables" },
80 { scope: "secrets:admin", description: "Set and delete secrets and variables" },
81 { scope: "runners:read", description: "See self-hosted runners, their groups and where agents run" },
82 { scope: "runners:admin", description: "Register and remove self-hosted runners, change their groups and settings" },
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens83 { scope: "models:read", description: "See the workspace's AI Gateway requests: their models, tokens, cost and status" },
84 { scope: "models:write", description: "Send model requests through the AI Gateway, which uses the workspace's AI credit" },
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" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays88] 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
Merge main into Artifacts Phase 2100export type Scope = (typeof SCOPES)[number]["scope"];
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays101
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers102/** Where a resource sits on the token form; only a person's token may hold account ones. */
103export type ResourceGroup = "repository" | "workspace" | "account";
104
105/** Resources in the order settings show them, with their names for people and their group. */
106export const SCOPE_RESOURCES: { resource: ScopeResource; label: string; group: ResourceGroup }[] = [
107 { resource: "repo", label: "Repositories", group: "repository" },
108 { resource: "code", label: "Code", group: "repository" },
109 { resource: "security", label: "Security", group: "repository" },
110 { resource: "packages", label: "Packages", group: "repository" },
111 { resource: "issues", label: "Issues", group: "repository" },
112 { resource: "pull_requests", label: "Pull requests", group: "repository" },
113 { resource: "agents", label: "g1t agents", group: "repository" },
114 { resource: "workflows", label: "Workflows", group: "repository" },
115 { resource: "workflow_files", label: "Workflow files", group: "repository" },
116 { resource: "checks", label: "Checks and statuses", group: "repository" },
117 { resource: "deployments", label: "Deployments", group: "repository" },
118 { resource: "memory", label: "Memory and context", group: "repository" },
119 { resource: "account", label: "Your account", group: "account" },
120 { resource: "notifications", label: "Notifications", group: "account" },
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)121 { 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 managers122 { resource: "workspace", label: "Workspaces", group: "workspace" },
123 { resource: "billing", label: "Billing", group: "workspace" },
124 { resource: "access", label: "Who has access", group: "repository" },
125 { resource: "webhooks", label: "Webhooks", group: "repository" },
126 { resource: "secrets", label: "Secrets and variables", group: "repository" },
127 { resource: "runners", label: "Self-hosted runners", group: "workspace" },
128 { resource: "models", label: "AI Gateway", group: "workspace" },
Merge main into Artifacts Phase 2129 { resource: "artifacts", label: "Artifacts", group: "workspace" },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays130];
131
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 yet132/** Resources not offered yet, as `UPCOMING_SCOPES`: settings never show them. */
133export const UPCOMING_RESOURCES: { resource: ScopeResource; label: string; group: ResourceGroup }[] = [
134];
135
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member136const LEVEL_ORDER: Record<ScopeLevel, number> = { read: 0, write: 1, run: 2, delete: 3, admin: 4 };
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays137
138export function scopeResource(scope: Scope): ScopeResource {
139 return scope.split(":")[0] as ScopeResource;
140}
141
142export function scopeLevel(scope: Scope): ScopeLevel {
143 return scope.split(":")[1] as ScopeLevel;
144}
145
146export function isScope(text: string): text is Scope {
147 return SCOPES.some((row) => row.scope === text);
148}
149
150/** Changes that are hard to undo, or decide who can reach what. */
151export function isDangerous(scope: Scope): boolean {
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member152 const level = scopeLevel(scope);
153 return level === "admin" || level === "delete";
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays154}
155
156export 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 yet157 return [...SCOPES, ...UPCOMING_SCOPES].find((row) => row.scope === scope)?.description ?? scope;
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays158}
159
160/** Whether holding `held` gives `needed`: the same resource, at its level or lower. */
161export function scopeIncludes(held: Scope, needed: Scope): boolean {
162 return (
163 scopeResource(held) === scopeResource(needed) &&
164 LEVEL_ORDER[scopeLevel(held)] >= LEVEL_ORDER[scopeLevel(needed)]
165 );
166}
167
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)168/**
169 * Whether a token holding `scopes` may do what `needed` gates (Rust:
170 * `TokenAccess::allows`). Null or absent scopes are full access, which
171 * holds every scope; unknown names give nothing.
172 */
173export function tokenAllows(scopes: readonly string[] | null | undefined, needed: Scope): boolean {
174 if (scopes === null || scopes === undefined) return true;
175 return scopes.some((held) => isScope(held) && scopeIncludes(held, needed));
176}
177
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays178/** The levels a resource has, least first. */
179export function levelsOf(resource: ScopeResource): ScopeLevel[] {
180 return SCOPES.filter((row) => scopeResource(row.scope) === resource).map((row) => scopeLevel(row.scope));
181}
182
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers183/** The token form's groups, in order. */
184export const RESOURCE_GROUPS: { group: ResourceGroup; label: string; about: string }[] = [
185 { group: "repository", label: "Repository permissions", about: "What it may do in the repositories it reaches." },
186 { group: "workspace", label: "Workspace permissions", about: "What it may do with the workspaces it reaches themselves." },
187 { group: "account", label: "Account permissions", about: "What it may do with your own account. Personal tokens only." },
188];
189
190/** A token's permissions: each resource held, at its highest level; left out is none. */
191export type Permissions = Partial<Record<ScopeResource, ScopeLevel>>;
192
193/** Scopes as permissions. Null scopes (full access) are every resource at its highest. */
194export function permissionsOf(scopes: readonly string[] | null): Permissions {
195 const permissions: Permissions = {};
196 const held = scopes === null ? SCOPES.map((row) => row.scope) : parseScopes(scopes.join(" "));
197 for (const scope of held) {
198 const resource = scopeResource(scope);
199 const now = permissions[resource];
200 if (!now || LEVEL_ORDER[scopeLevel(scope)] > LEVEL_ORDER[now]) permissions[resource] = scopeLevel(scope);
201 }
202 return permissions;
203}
204
205/** Permissions as the scopes a token stores: the highest of each resource, in table order. */
206export function scopesOfPermissions(permissions: Permissions): Scope[] {
207 const wanted = new Set(
208 Object.entries(permissions)
209 .filter(([, level]) => level)
210 .map(([resource, level]) => `${resource}:${level}`),
211 );
212 return SCOPES.map((row) => row.scope).filter((scope) => wanted.has(scope));
213}
214
215/** The longest a token with an expiry may last, in days. */
216export const MAX_TOKEN_LIFETIME_DAYS = 366;
217
218/** The most repositories a token may select. */
219export const MAX_SELECTED_REPOSITORIES = 50;
220
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays221/** Scopes from text separated by spaces or commas, in table order; unknown ones are left out. */
222export function parseScopes(text: string): Scope[] {
223 const given = new Set(text.split(/[\s,]+/).map((part) => part.trim().toLowerCase()));
224 return SCOPES.map((row) => row.scope).filter((scope) => given.has(scope));
225}
226
227/** What a token stores for full access. */
228export const FULL_ACCESS = "*";
229
230export type PresetId = "read_only" | "agent" | "ci" | "full";
231
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)232/** Starting points for choosing scopes. `*` is full access. No preset gives chat: an application gets it only by asking for it. */
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays233export const PRESET_SCOPES = {
234 read_only: [
Merge main into Artifacts Phase 2235 "repo:read", "code:read", "security:read", "packages:read", "issues:read", "pull_requests:read", "workflows:read", "checks:read", "deployments:read", "memory:read", "account:read", "notifications:read", "workspace:read", "billing:read", "access:read", "webhooks:read", "secrets:read", "runners:read", "models:read", "artifacts:read",
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays236 ] as const,
237 agent: [
Merge main into Artifacts Phase 2238 "repo:read", "code:read", "code:write", "security:read", "packages:read", "issues:read", "issues:write", "pull_requests:read", "pull_requests:write", "agents:run", "workflows:read", "checks:read", "deployments:read", "memory:read", "memory:write", "account:read", "notifications:read", "notifications:write", "workspace:read", "billing:read", "access:read", "webhooks:read", "secrets:read", "models:read", "artifacts:read",
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays239 ] as const,
240 ci: [
Merge checks: statuses and check runs on every commit241 "repo:read", "code:read", "code:write", "packages:read", "packages:write", "workflows:read", "workflows:write", "checks:read", "checks:write", "deployments:read", "deployments:write",
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays242 ] as const,
243 full: [
244 "*",
245 ] as const,
246};
247
248export const PRESETS: { id: PresetId; label: string; description: string }[] = [
249 { id: "read_only", label: "Read only", description: "Read everything you can read; change nothing." },
250 { id: "agent", label: "Agent", description: "Read everything, work on issues and pull requests, push code and run g1t agents." },
Merge checks: statuses and check runs on every commit251 { id: "ci", label: "CI", description: "Clone and push code, push and pull packages, run workflows, and report checks and deployments." },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays252 { id: "full", label: "Full access", description: "Everything you can do, including deleting repositories and changing who has access." },
253];
254
255/** The scopes of a preset, or null for full access. */
256export function presetScopes(id: PresetId): Scope[] | null {
257 if (id === "full") return null;
258 return [...PRESET_SCOPES[id]] as Scope[];
259}
260
261/** What an OAuth client gets when it asks for nothing in particular. */
262export const OAUTH_DEFAULT_SCOPES: Scope[] = [...PRESET_SCOPES.agent];
263
264/** The operation each scope gates, by the API's operation names. */
265export const OPERATION_SCOPES = [
266 ["list_emails", "account:read"],
267 ["add_email", "account:write"],
Merge email confirmation gate: a code and a link, nothing until confirmed (identity 0036)268 ["confirm_email", "account:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays269 ["remove_email", "account:write"],
270 ["update_email_settings", "account:write"],
271 ["list_invites", "account:read"],
272 ["create_invite", "account:write"],
273 ["revoke_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)274 ["list_invitations", "account:read"],
275 ["accept_invitation", "account:write"],
276 ["decline_invitation", "account:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays277 ["list_my_repo_invitations", "account:read"],
278 ["accept_repo_invitation", "account:write"],
279 ["decline_repo_invitation", "account:write"],
API: pinned projects over REST and MCP280 // Your pinned projects: a preference of your account.
281 ["list_pinned_projects", "account:read"],
282 ["pin_project", "account:write"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97283 // Your stars: a preference of your account.
284 ["list_starred", "account:read"],
285 ["check_starred", "account:read"],
286 ["star_repo", "account:write"],
287 ["unstar_repo", "account:write"],
API: pinned projects over REST and MCP288 ["unpin_project", "account:write"],
289 ["reorder_pinned_projects", "account:write"],
API: notifications over REST and MCP, with notifications scopes290 // Your inbox: notifications, subscriptions and watching.
291 ["list_notifications", "notifications:read"],
292 ["get_notification_thread", "notifications:read"],
293 ["get_thread_subscription", "notifications:read"],
294 ["get_repo_subscription", "notifications:read"],
295 ["list_watched_repos", "notifications:read"],
296 ["mark_notifications_read", "notifications:write"],
297 ["mark_thread_read", "notifications:write"],
298 ["mark_thread_done", "notifications:write"],
299 ["save_thread", "notifications:write"],
300 ["snooze_thread", "notifications:write"],
301 ["set_thread_subscription", "notifications:write"],
302 ["delete_thread_subscription", "notifications:write"],
303 ["set_repo_subscription", "notifications:write"],
304 ["delete_repo_subscription", "notifications:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays305 ["create_workspace", "workspace:admin"],
306 ["delete_workspace", "workspace:admin"],
Merge branch 'worktree-agent-ad7c6d88d93adc817'307 ["get_workspace", "workspace:read"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays308 ["update_workspace", "workspace:admin"],
Merge main (membership, two-factor, GitHub repo roles) into tokens309 ["list_members", "workspace:read"],
310 ["update_member", "workspace:admin"],
311 ["remove_member", "workspace:admin"],
312 ["transfer_ownership", "workspace:admin"],
313 ["leave_workspace", "account:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays314 ["list_workspace_invites", "workspace:read"],
315 ["invite_member", "workspace:admin"],
316 ["revoke_workspace_invite", "workspace:admin"],
317 ["list_integrations", "workspace:read"],
318 ["connect_integration", "workspace:admin"],
AI Gateway: OpenAI's format, open models, and your own providers319 ["update_integration", "workspace:admin"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays320 ["disconnect_integration", "workspace:admin"],
321 ["test_integration", "workspace:admin"],
322 ["get_model_routes", "workspace:read"],
323 ["set_model_routes", "workspace:admin"],
Merge remote-tracking branch 'origin/claude/cool-newton-7nm8r9' into claude/cool-newton-7nm8r9324 ["list_marketplaces", "workspace:read"],
325 ["add_marketplace", "workspace:admin"],
326 ["remove_marketplace", "workspace:admin"],
327 ["refresh_marketplace", "workspace:admin"],
328 ["discover", "workspace:read"],
329 ["list_plugins", "workspace:read"],
330 ["get_plugin", "workspace:read"],
331 ["install_plugin", "workspace:admin"],
332 ["set_plugin_enabled", "workspace:admin"],
333 ["uninstall_plugin", "workspace:admin"],
334 ["update_plugin", "workspace:admin"],
335 ["list_plugin_agents", "workspace:read"],
336 ["list_connectors", "workspace:read"],
337 ["get_connector", "workspace:read"],
338 ["add_connector", "workspace:admin"],
339 ["set_connector_key", "workspace:admin"],
340 ["remove_connector", "workspace:admin"],
341 ["refresh_connector", "workspace:admin"],
342 ["grant_connector", "workspace:admin"],
343 ["revoke_connector", "workspace:admin"],
344 ["customize_bundle", "agents:run"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar345 ["list_teams", "workspace:read"],
346 ["get_team", "workspace:read"],
347 ["list_team_members", "workspace:read"],
348 ["list_child_teams", "workspace:read"],
349 ["list_team_repos", "workspace:read"],
350 ["list_user_teams", "workspace:read"],
351 ["create_team", "workspace:admin"],
Merge rulesets: branch and tag rules, agent-first, enforced on push and merge352 ["list_workspace_rulesets", "workspace:read"],
353 ["get_workspace_ruleset", "workspace:read"],
354 ["list_workspace_rule_evaluations", "workspace:read"],
355 ["create_workspace_ruleset", "workspace:admin"],
356 ["update_workspace_ruleset", "workspace:admin"],
357 ["delete_workspace_ruleset", "workspace:admin"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar358 ["update_team", "workspace:admin"],
359 ["delete_team", "workspace:admin"],
360 ["set_team_member", "workspace:admin"],
361 ["remove_team_member", "workspace:admin"],
362 ["set_team_review_assignment", "workspace:admin"],
Usage, Billing settings and prepaid AI credit; fixes from the UX audit363 // A workspace's billing: usage, budget, AI credit and invoices.
364 ["get_usage", "billing:read"],
365 ["get_budget", "billing:read"],
366 ["get_ai_credit", "billing:read"],
367 ["list_invoices", "billing:read"],
368 ["get_billing_details", "billing:read"],
369 ["set_budget", "billing:write"],
370 ["buy_ai_credit", "billing:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays371 ["list_repos", "repo:read"],
372 ["get_repo", "repo: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.373 ["download_tarball_archive", "code:read"],
374 ["download_zipball_archive", "code:read"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97375 // Projects follow their repositories.
376 ["list_projects", "repo:read"],
377 ["get_project", "repo:read"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays378 ["search", "repo:read"],
379 ["list_events", "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"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays393 ["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"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays403 ["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"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays408 ["create_repo", "repo:write"],
409 ["update_repo", "repo:write"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97410 ["update_project", "repo:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays411 ["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"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays419 ["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"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays422 ["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 ["fix_security_alert", "security:write"],
465 ["update_security_settings", "security:write"],
466 ["update_workspace_security_settings", "security:write"],
Merge remote-tracking branch 'origin/claude/cool-newton-7nm8r9' into claude/cool-newton-7nm8r9467 ["create_security_advisory", "security:write"],
468 ["update_security_advisory", "security:write"],
469 ["set_security_advisory_state", "security:write"],
470 ["report_vulnerability", "security:write"],
471 ["review_vulnerability_report", "security:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays472 ["list_issues", "issues:read"],
473 ["get_issue", "issues:read"],
474 ["get_plan", "issues:read"],
475 ["create_issue", "issues:write"],
476 ["update_issue", "issues:write"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar477 ["list_issue_labels", "issues:read"],
478 ["add_issue_labels", "issues:write"],
479 ["set_issue_labels", "issues:write"],
480 ["remove_issue_labels", "issues:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays481 ["close_issue", "issues:write"],
482 ["reopen_issue", "issues:write"],
483 ["add_comment", "issues:write"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts484 ["edit_comment", "issues:write"],
485 ["delete_comment", "issues:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays486 ["import_issue", "issues:write"],
487 ["apply_plan", "issues:write"],
488 ["list_pull_requests", "pull_requests:read"],
489 ["get_pull_request", "pull_requests:read"],
490 ["get_pull_request_changes", "pull_requests:read"],
491 ["read_session", "pull_requests:read"],
492 ["get_merge_queue", "pull_requests:read"],
493 ["create_pull_request", "pull_requests:write"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar494 ["update_pull_request", "pull_requests:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays495 ["record_session", "pull_requests:write"],
496 ["mark_pull_request_ready", "pull_requests:write"],
497 ["close_pull_request", "pull_requests:write"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts498 ["reopen_pull_request", "pull_requests:write"],
499 ["convert_pull_request_to_draft", "pull_requests:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays500 ["review_pull_request", "pull_requests:write"],
501 ["merge_pull_request", "pull_requests:write"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar502 ["request_reviewers", "pull_requests:write"],
503 ["remove_requested_reviewers", "pull_requests:write"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays504 ["assign_issue", "agents:run"],
505 ["delegate", "agents:run"],
506 ["plan_work", "agents:run"],
507 ["message_agent", "agents:run"],
508 ["answer_message", "agents:run"],
CI is green again: the agent computer landed with its five operations in the Rust scope table but not the TypeScript mirror, and with its shell and files switched on while the ability tests still expected every computer ability to be coming. The mirror lists them under agents:run, and the tests say what ships: commands run when asked for and files change on its own, while the browser and web search are still coming.509 // A workspace agent's own computer: waking it spends the workspace's
510 // money, so the same scope covers reading and managing it.
511 ["get_agent_computer", "agents:run"],
512 ["wake_agent_computer", "agents:run"],
513 ["sleep_agent_computer", "agents:run"],
514 ["reset_agent_computer", "agents:run"],
515 ["list_agent_computer_commands", "agents:run"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays516 ["take_messages", "agents:run"],
517 ["list_workflows", "workflows:read"],
518 ["list_workflow_runs", "workflows:read"],
519 ["get_workflow_run", "workflows:read"],
520 ["get_job_logs", "workflows:read"],
521 ["dispatch_workflow", "workflows:write"],
522 ["cancel_workflow_run", "workflows:write"],
523 ["rerun_workflow_run", "workflows:write"],
524 ["update_workflow", "workflows:write"],
Actions: OIDC tokens, the toolkit's cache and artifact services, and artifacts in R2525 ["list_artifacts", "workflows:read"],
526 ["list_workflow_run_artifacts", "workflows:read"],
527 ["get_artifact", "workflows:read"],
528 ["download_artifact", "workflows:read"],
529 ["get_artifact_retention", "workflows:read"],
530 ["delete_artifact", "workflows:write"],
531 ["set_artifact_retention", "workflows:write"],
Merge checks: statuses and check runs on every commit532 ["list_commit_statuses", "checks:read"],
533 ["get_combined_status", "checks:read"],
534 ["list_check_runs_for_ref", "checks:read"],
535 ["get_check_run", "checks:read"],
536 ["list_check_run_annotations", "checks:read"],
537 ["list_check_suites_for_ref", "checks:read"],
538 ["get_check_suite", "checks:read"],
539 ["create_commit_status", "checks:write"],
540 ["create_check_run", "checks:write"],
541 ["update_check_run", "checks:write"],
542 ["rerequest_check_run", "checks:write"],
543 ["rerequest_check_suite", "checks:write"],
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97544 // Deployments, wherever they run: reading them, and reporting them.
545 ["list_deployments", "deployments:read"],
546 ["get_deployment", "deployments:read"],
547 ["list_deployment_statuses", "deployments:read"],
548 ["list_environments", "deployments:read"],
549 ["get_environment", "deployments:read"],
550 ["create_deployment", "deployments:write"],
551 ["create_deployment_status", "deployments:write"],
Merge branch 'worktree-agent-a4d35ee70c50683d0' into claude/cool-newton-7nm8r9552 ["start_deployment_build", "deployments:write"],
Merge branch 'worktree-agent-a3abfcce648e87dca'553 // What keeps runs safe: the runs environments hold and reviewing them,
554 // approving a pull request's run, and a repository's own rules for its
555 // environments and tokens, which are an admin's.
556 ["get_pending_deployments", "workflows:read"],
557 ["review_pending_deployments", "workflows:write"],
558 ["approve_workflow_run", "workflows:write"],
559 ["get_workflow_permissions", "repo:read"],
560 ["get_fork_pr_approval", "repo:read"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts561 ["get_actions_access", "repo:read"],
Merge branch 'worktree-agent-a3abfcce648e87dca'562 ["update_environment", "repo:admin"],
563 ["delete_environment", "repo:admin"],
564 ["set_workflow_permissions", "repo:admin"],
565 ["set_fork_pr_approval", "repo:admin"],
Merge Actions: cross-repo workflows and actions, release and deployment triggers, step timeouts566 ["set_actions_access", "repo:admin"],
Merge branch 'worktree-agent-a3abfcce648e87dca'567 // Starting workflows from outside, as a push would.
568 ["create_repository_dispatch", "code:write"],
569 // A workspace's policy for its repositories' tokens.
570 ["get_workspace_workflow_permissions", "workspace:read"],
571 ["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.572 ["list_workspace_managed_workflows", "workspace:read"],
573 ["create_workspace_managed_workflow", "workspace:admin"],
574 ["update_workspace_managed_workflow", "workspace:admin"],
575 ["delete_workspace_managed_workflow", "workspace:admin"],
API and MCP for a workspace's personal access token rules, members' tokens and approvals576 // A workspace's rules for personal access tokens, and its members' tokens.
577 ["get_token_policy", "workspace:read"],
578 ["set_token_policy", "workspace:admin"],
579 ["list_member_tokens", "access:read"],
580 ["list_token_requests", "access:read"],
581 ["review_token_request", "access:admin"],
582 ["revoke_member_token", "access:admin"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays583 ["recall", "memory:read"],
584 ["search_context", "memory:read"],
585 ["get_entity", "memory:read"],
586 ["get_context", "memory:read"],
587 ["remember", "memory:write"],
588 ["list_collaborators", "access:read"],
589 ["get_collaborator_permission", "access:read"],
590 ["list_repo_invitations", "access:read"],
591 ["list_outside_collaborators", "access:read"],
592 ["add_collaborator", "access:admin"],
593 ["update_collaborator", "access:admin"],
594 ["remove_collaborator", "access:admin"],
595 ["revoke_repo_invitation", "access:admin"],
596 ["set_base_permission", "access:admin"],
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar597 ["set_team_repo", "access:admin"],
598 ["remove_team_repo", "access:admin"],
Merge branch 'worktree-agent-a5a5de74d8863d554' into worktree-agent-a16631325aecf58ca599 ["list_deploy_keys", "access:read"],
600 ["get_deploy_key", "access:read"],
601 ["create_deploy_key", "access:admin"],
602 ["delete_deploy_key", "access:admin"],
Merge branch 'mirroring' into artifacts-mode603 ["get_mirror", "repo:read"],
604 ["sync_mirror", "code:write"],
605 ["get_hand_back_plan", "repo:admin"],
606 ["take_over_mirror", "repo:admin"],
607 ["set_ci_failover", "repo:admin"],
608 ["hand_back_mirror", "repo:admin"],
609 ["move_mirror_to_g1t", "repo:admin"],
610 ["add_mirror_remote", "repo:admin"],
611 ["update_mirror_remote", "repo:admin"],
612 ["remove_mirror_remote", "repo:admin"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays613 ["list_webhooks", "webhooks:read"],
614 ["list_webhook_deliveries", "webhooks:read"],
615 ["create_webhook", "webhooks:admin"],
616 ["update_webhook", "webhooks:admin"],
617 ["delete_webhook", "webhooks:admin"],
618 ["ping_webhook", "webhooks:admin"],
619 ["redeliver_webhook", "webhooks:admin"],
620 ["list_actions_secrets", "secrets:read"],
621 ["list_actions_variables", "secrets:read"],
622 ["set_actions_secret", "secrets:admin"],
623 ["delete_actions_secret", "secrets:admin"],
624 ["set_actions_variable", "secrets:admin"],
625 ["delete_actions_variable", "secrets:admin"],
626 // Self-hosted runners.
627 ["list_runners", "runners:read"],
628 ["list_runner_groups", "runners:read"],
629 ["get_runner_settings", "runners:read"],
630 ["create_runner_registration_token", "runners:admin"],
631 ["remove_runner", "runners:admin"],
632 ["create_runner_group", "runners:admin"],
633 ["update_runner_group", "runners:admin"],
634 ["delete_runner_group", "runners:admin"],
635 ["update_runner_settings", "runners:admin"],
Merge packages: roles, Actions access, source label, soft delete, API636 // Packages: reading them, their versions and who may use them needs
637 // `packages:read`; changing their settings, access and Manage Actions
638 // access `packages:write` (and the Admin role on the package, which the
639 // packages service checks); deleting and restoring packages and
640 // versions `packages:delete`, as the registries' own deletes do.
641 ["list_packages", "packages:read"],
642 ["get_package", "packages:read"],
643 ["list_package_versions", "packages:read"],
644 ["get_package_version", "packages:read"],
645 ["list_package_access", "packages:read"],
646 ["list_package_actions_access", "packages:read"],
647 ["update_package", "packages:write"],
648 ["link_package", "packages:write"],
649 ["unlink_package", "packages:write"],
650 ["set_package_access", "packages:write"],
651 ["remove_package_access", "packages:write"],
652 ["set_package_actions_access", "packages:write"],
653 ["remove_package_actions_access", "packages:write"],
654 ["delete_package", "packages:delete"],
655 ["restore_package", "packages:delete"],
656 ["delete_package_version", "packages:delete"],
657 ["restore_package_version", "packages:delete"],
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens658 // The AI Gateway. Sending a request to a model needs `models:write`,
659 // checked by the model proxy at models.g1t.sh.
660 ["list_gateway_requests", "models:read"],
Merge main into Artifacts Phase 2661 // 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.662 // MCP tool). The artifacts service then checks the person's role on each.
Merge main into Artifacts Phase 2663 ["list_workspace_artifacts", "artifacts:read"],
664 ["search_workspace_artifacts", "artifacts:read"],
665 ["get_workspace_artifact", "artifacts:read"],
666 ["get_workspace_artifact_content", "artifacts:read"],
667 ["list_workspace_artifact_versions", "artifacts:read"],
668 ["get_workspace_artifact_access", "artifacts:read"],
669 ["list_workspace_artifact_templates", "artifacts:read"],
670 ["list_workspace_artifact_spaces", "artifacts:read"],
671 ["query_workspace_dataset", "artifacts:read"],
672 ["create_workspace_artifact", "artifacts:write"],
673 ["update_workspace_artifact", "artifacts:write"],
674 ["edit_workspace_artifact", "artifacts:write"],
675 ["trash_workspace_artifact", "artifacts:write"],
676 ["restore_workspace_artifact", "artifacts:write"],
677 ["restore_workspace_artifact_version", "artifacts:write"],
678 ["set_workspace_artifact_access", "artifacts:admin"],
679 ["purge_workspace_artifact", "artifacts:admin"],
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays680] as const;
681
682/**
683 * The scopes a token or grant holds, as stored: null for full access, or
684 * the list. `legacy` marks a token made before scopes, which has full
685 * access until someone narrows it.
686 */
687export type TokenScopes = {
688 scopes: Scope[] | null;
689 legacy: boolean;
690};
691
692/**
693 * How settings group scopes into a checklist: each group's scopes, least
694 * first. Admin scopes are not here; they are under "Dangerous" on their
695 * own (see `DANGEROUS_SCOPES`). Every other scope is in exactly one group.
696 */
697export const SCOPE_GROUPS: { id: string; label: string; scopes: Scope[] }[] = [
698 { 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 bar699 { id: "security", label: "Security", scopes: ["security:read", "security:write"] },
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member700 { id: "packages", label: "Packages", scopes: ["packages:read", "packages:write"] },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays701 { id: "work", label: "Issues & pull requests", scopes: ["issues:read", "issues:write", "pull_requests:read", "pull_requests:write"] },
702 { id: "agents", label: "Agents", scopes: ["agents:run"] },
Token reach: workflow_files scope, fine-grained reach, workspace token cap703 { id: "workflows", label: "Workflows", scopes: ["workflows:read", "workflows:write", "workflow_files:write"] },
Merge checks: statuses and check runs on every commit704 { id: "checks", label: "Checks", scopes: ["checks:read", "checks:write"] },
Merge branch 'main' into worktree-agent-a69aeabc4b0deeb97705 { id: "deployments", label: "Deployments", scopes: ["deployments:read", "deployments:write"] },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays706 { id: "memory", label: "Memory & search", scopes: ["memory:read", "memory:write"] },
707 { id: "account", label: "Account", scopes: ["account:read", "account:write"] },
API: notifications over REST and MCP, with notifications scopes708 { id: "notifications", label: "Notifications", scopes: ["notifications:read", "notifications:write"] },
The phone app: Chat in full with phone notifications, plus Code and Customize (#4)709 { id: "chat", label: "Chat", scopes: ["chat:read", "chat:write"] },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays710 { id: "workspace", label: "Workspace", scopes: ["workspace:read", "access:read", "webhooks:read", "secrets:read"] },
Usage, Billing settings and prepaid AI credit; fixes from the UX audit711 { id: "billing", label: "Billing", scopes: ["billing:read", "billing:write"] },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays712 { id: "runners", label: "Runners", scopes: ["runners:read"] },
Merge the AI Gateway: Anthropic's Messages API on a workspace's tokens713 { id: "models", label: "AI Gateway", scopes: ["models:read", "models:write"] },
Merge main into Artifacts Phase 2714 { id: "artifacts", label: "Artifacts", scopes: ["artifacts:read", "artifacts:write"] },
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays715];
716
Packages, with a container registry on g1t.sh; workspaces deleted whole and kept 30 days; Members for every member717/** The admin and delete scopes, shown under "Dangerous" behind a warning. */
Spend caps: a monthly budget for comped workspaces and a daily breaker on what g1t pays718export 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.