Skip to content
491 linesCodeBlameRaw
1/**
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 *
6 * A token reaches whatever its owner can reach (a workspace's token, that
7 * workspace); what a request may do is the intersection of the owner's
8 * role and the token's scopes.
9 */
10
11export type ScopeResource =
12 | "repo"
13 | "code"
14 | "security"
15 | "packages"
16 | "issues"
17 | "pull_requests"
18 | "agents"
19 | "workflows"
20 | "checks"
21 | "deployments"
22 | "memory"
23 | "account"
24 | "notifications"
25 | "workspace"
26 | "billing"
27 | "access"
28 | "webhooks"
29 | "secrets"
30 | "runners"
31 | "models";
32
33export type ScopeLevel = "read" | "write" | "run" | "delete" | "admin";
34
35/** Every scope, grouped by resource, least first. */
36export const SCOPES = [
37 { scope: "repo:read", description: "See repositories, their settings, labels, timelines, releases, languages, contributors and security alerts, and search" },
38 { scope: "repo:write", description: "Create repositories, rename branches, change how pull requests merge and publish releases" },
39 { scope: "repo:admin", description: "Rename, archive, transfer, delete or change who can see a repository, change its rulesets, and dismiss security alerts" },
40 { scope: "code:read", description: "Clone and fetch private repositories with git" },
41 { scope: "code:write", description: "Push commits with git" },
42 { scope: "security:read", description: "See secret scanning, code scanning and vulnerability alerts, custom patterns, the dependency graph and SBOM, and security settings" },
43 { scope: "security:write", description: "Dismiss and reopen alerts, bypass push protection, review bypass requests, manage custom patterns, upload SARIF and change security settings" },
44 { scope: "packages:read", description: "Pull container images and install private packages" },
45 { scope: "packages:write", description: "Push container images and publish packages" },
46 { scope: "packages:delete", description: "Delete packages and their versions" },
47 { scope: "issues:read", description: "Read issues, comments and plans" },
48 { scope: "issues:write", description: "Open, edit, close and comment on issues" },
49 { scope: "pull_requests:read", description: "Read pull requests, their changes, sessions and merge queues" },
50 { scope: "pull_requests:write", description: "Open, review, close and merge pull requests" },
51 { scope: "agents:run", description: "Put g1t agents to work and message them, which uses the workspace's money" },
52 { scope: "workflows:read", description: "Read workflows, runs and logs" },
53 { scope: "workflows:write", description: "Run, cancel, rerun and turn workflows on or off" },
54 { scope: "checks:read", description: "Read commits' statuses, check runs, check suites and annotations" },
55 { scope: "checks:write", description: "Report statuses and check runs on commits, and ask for checks to run again" },
56 { scope: "deployments:read", description: "See deployments, their statuses and environments" },
57 { scope: "deployments:write", description: "Report deployments and their statuses, from any CI" },
58 { scope: "memory:read", description: "Recall memory and search the workspace's context" },
59 { scope: "memory:write", description: "Save memory for the next agent" },
60 { scope: "account:read", description: "Read your email addresses, invites, invitations, pinned projects and stars" },
61 { scope: "account:write", description: "Change your email addresses, make invites, answer invitations, pin projects and star repositories" },
62 { scope: "notifications:read", description: "See your inbox, its threads, and what you subscribe to and watch" },
63 { scope: "notifications:write", description: "Mark notifications read, done, saved or snoozed, subscribe to threads and watch repositories" },
64 { scope: "workspace:read", description: "Read workspace settings, invites, integrations, model routes, teams and rulesets" },
65 { scope: "workspace:admin", description: "Create and delete workspaces, invite members, connect integrations, create, change and delete teams, and change the workspace's rulesets" },
66 { scope: "billing:read", description: "See a workspace's usage, budget, AI credit and invoices" },
67 { scope: "billing:write", description: "Change a workspace's budget and buy AI credit" },
68 { scope: "access:read", description: "See who has access to repositories" },
69 { scope: "access:admin", description: "Give and take away access to repositories, a team's included" },
70 { scope: "webhooks:read", description: "See webhooks and their deliveries" },
71 { scope: "webhooks:admin", description: "Create, change and delete webhooks" },
72 { scope: "secrets:read", description: "List secrets (never their values) and read variables" },
73 { scope: "secrets:admin", description: "Set and delete secrets and variables" },
74 { scope: "runners:read", description: "See self-hosted runners, their groups and where agents run" },
75 { scope: "runners:admin", description: "Register and remove self-hosted runners, change their groups and settings" },
76 { scope: "models:read", description: "See the workspace's AI Gateway requests: their models, tokens, cost and status" },
77 { scope: "models:write", description: "Send model requests through the AI Gateway, which uses the workspace's AI credit" },
78] as const;
79
80export type Scope = (typeof SCOPES)[number]["scope"];
81
82/** Resources in the order settings show them, with their names for people. */
83export const SCOPE_RESOURCES: { resource: ScopeResource; label: string }[] = [
84 { resource: "repo", label: "Repositories" },
85 { resource: "code", label: "Code" },
86 { resource: "security", label: "Security" },
87 { resource: "packages", label: "Packages" },
88 { resource: "issues", label: "Issues" },
89 { resource: "pull_requests", label: "Pull requests" },
90 { resource: "agents", label: "g1t agents" },
91 { resource: "workflows", label: "Workflows" },
92 { resource: "checks", label: "Checks and statuses" },
93 { resource: "deployments", label: "Deployments" },
94 { resource: "memory", label: "Memory and context" },
95 { resource: "account", label: "Your account" },
96 { resource: "notifications", label: "Notifications" },
97 { resource: "workspace", label: "Workspaces" },
98 { resource: "billing", label: "Billing" },
99 { resource: "access", label: "Who has access" },
100 { resource: "webhooks", label: "Webhooks" },
101 { resource: "secrets", label: "Secrets and variables" },
102 { resource: "runners", label: "Self-hosted runners" },
103 { resource: "models", label: "AI Gateway" },
104];
105
106const LEVEL_ORDER: Record<ScopeLevel, number> = { read: 0, write: 1, run: 2, delete: 3, admin: 4 };
107
108export function scopeResource(scope: Scope): ScopeResource {
109 return scope.split(":")[0] as ScopeResource;
110}
111
112export function scopeLevel(scope: Scope): ScopeLevel {
113 return scope.split(":")[1] as ScopeLevel;
114}
115
116export function isScope(text: string): text is Scope {
117 return SCOPES.some((row) => row.scope === text);
118}
119
120/** Changes that are hard to undo, or decide who can reach what. */
121export function isDangerous(scope: Scope): boolean {
122 const level = scopeLevel(scope);
123 return level === "admin" || level === "delete";
124}
125
126export function describeScope(scope: Scope): string {
127 return SCOPES.find((row) => row.scope === scope)?.description ?? scope;
128}
129
130/** Whether holding `held` gives `needed`: the same resource, at its level or lower. */
131export function scopeIncludes(held: Scope, needed: Scope): boolean {
132 return (
133 scopeResource(held) === scopeResource(needed) &&
134 LEVEL_ORDER[scopeLevel(held)] >= LEVEL_ORDER[scopeLevel(needed)]
135 );
136}
137
138/** The levels a resource has, least first. */
139export function levelsOf(resource: ScopeResource): ScopeLevel[] {
140 return SCOPES.filter((row) => scopeResource(row.scope) === resource).map((row) => scopeLevel(row.scope));
141}
142
143/** Scopes from text separated by spaces or commas, in table order; unknown ones are left out. */
144export function parseScopes(text: string): Scope[] {
145 const given = new Set(text.split(/[\s,]+/).map((part) => part.trim().toLowerCase()));
146 return SCOPES.map((row) => row.scope).filter((scope) => given.has(scope));
147}
148
149/** What a token stores for full access. */
150export const FULL_ACCESS = "*";
151
152export type PresetId = "read_only" | "agent" | "ci" | "full";
153
154/** Starting points for choosing scopes. `*` is full access. */
155export const PRESET_SCOPES = {
156 read_only: [
157 "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",
158 ] as const,
159 agent: [
160 "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",
161 ] as const,
162 ci: [
163 "repo:read", "code:read", "code:write", "packages:read", "packages:write", "workflows:read", "workflows:write", "checks:read", "checks:write", "deployments:read", "deployments:write",
164 ] as const,
165 full: [
166 "*",
167 ] as const,
168};
169
170export const PRESETS: { id: PresetId; label: string; description: string }[] = [
171 { id: "read_only", label: "Read only", description: "Read everything you can read; change nothing." },
172 { id: "agent", label: "Agent", description: "Read everything, work on issues and pull requests, push code and run g1t agents." },
173 { id: "ci", label: "CI", description: "Clone and push code, push and pull packages, run workflows, and report checks and deployments." },
174 { id: "full", label: "Full access", description: "Everything you can do, including deleting repositories and changing who has access." },
175];
176
177/** The scopes of a preset, or null for full access. */
178export function presetScopes(id: PresetId): Scope[] | null {
179 if (id === "full") return null;
180 return [...PRESET_SCOPES[id]] as Scope[];
181}
182
183/** What an OAuth client gets when it asks for nothing in particular. */
184export const OAUTH_DEFAULT_SCOPES: Scope[] = [...PRESET_SCOPES.agent];
185
186/** The operation each scope gates, by the API's operation names. */
187export const OPERATION_SCOPES = [
188 ["list_emails", "account:read"],
189 ["add_email", "account:write"],
190 ["remove_email", "account:write"],
191 ["update_email_settings", "account:write"],
192 ["list_invites", "account:read"],
193 ["create_invite", "account:write"],
194 ["revoke_invite", "account:write"],
195 ["list_my_repo_invitations", "account:read"],
196 ["accept_repo_invitation", "account:write"],
197 ["decline_repo_invitation", "account:write"],
198 // Your pinned projects: a preference of your account.
199 ["list_pinned_projects", "account:read"],
200 ["pin_project", "account:write"],
201 // Your stars: a preference of your account.
202 ["list_starred", "account:read"],
203 ["check_starred", "account:read"],
204 ["star_repo", "account:write"],
205 ["unstar_repo", "account:write"],
206 ["unpin_project", "account:write"],
207 ["reorder_pinned_projects", "account:write"],
208 // Your inbox: notifications, subscriptions and watching.
209 ["list_notifications", "notifications:read"],
210 ["get_notification_thread", "notifications:read"],
211 ["get_thread_subscription", "notifications:read"],
212 ["get_repo_subscription", "notifications:read"],
213 ["list_watched_repos", "notifications:read"],
214 ["mark_notifications_read", "notifications:write"],
215 ["mark_thread_read", "notifications:write"],
216 ["mark_thread_done", "notifications:write"],
217 ["save_thread", "notifications:write"],
218 ["snooze_thread", "notifications:write"],
219 ["set_thread_subscription", "notifications:write"],
220 ["delete_thread_subscription", "notifications:write"],
221 ["set_repo_subscription", "notifications:write"],
222 ["delete_repo_subscription", "notifications:write"],
223 ["create_workspace", "workspace:admin"],
224 ["delete_workspace", "workspace:admin"],
225 ["get_workspace", "workspace:read"],
226 ["update_workspace", "workspace:admin"],
227 ["list_workspace_invites", "workspace:read"],
228 ["invite_member", "workspace:admin"],
229 ["revoke_workspace_invite", "workspace:admin"],
230 ["list_integrations", "workspace:read"],
231 ["connect_integration", "workspace:admin"],
232 ["disconnect_integration", "workspace:admin"],
233 ["test_integration", "workspace:admin"],
234 ["get_model_routes", "workspace:read"],
235 ["set_model_routes", "workspace:admin"],
236 ["list_teams", "workspace:read"],
237 ["get_team", "workspace:read"],
238 ["list_team_members", "workspace:read"],
239 ["list_child_teams", "workspace:read"],
240 ["list_team_repos", "workspace:read"],
241 ["list_user_teams", "workspace:read"],
242 ["create_team", "workspace:admin"],
243 ["list_workspace_rulesets", "workspace:read"],
244 ["get_workspace_ruleset", "workspace:read"],
245 ["list_workspace_rule_evaluations", "workspace:read"],
246 ["create_workspace_ruleset", "workspace:admin"],
247 ["update_workspace_ruleset", "workspace:admin"],
248 ["delete_workspace_ruleset", "workspace:admin"],
249 ["update_team", "workspace:admin"],
250 ["delete_team", "workspace:admin"],
251 ["set_team_member", "workspace:admin"],
252 ["remove_team_member", "workspace:admin"],
253 ["set_team_review_assignment", "workspace:admin"],
254 // A workspace's billing: usage, budget, AI credit and invoices.
255 ["get_usage", "billing:read"],
256 ["get_budget", "billing:read"],
257 ["get_ai_credit", "billing:read"],
258 ["list_invoices", "billing:read"],
259 ["get_billing_details", "billing:read"],
260 ["set_budget", "billing:write"],
261 ["buy_ai_credit", "billing:write"],
262 ["list_repos", "repo:read"],
263 ["get_repo", "repo:read"],
264 // Projects follow their repositories.
265 ["list_projects", "repo:read"],
266 ["get_project", "repo:read"],
267 ["search", "repo:read"],
268 ["list_events", "repo:read"],
269 // What the default branch says about a repository, who starred it, and
270 // its releases.
271 ["get_languages", "repo:read"],
272 ["list_contributors", "repo:read"],
273 ["get_license", "repo:read"],
274 ["list_stargazers", "repo:read"],
275 ["list_releases", "repo:read"],
276 ["get_latest_release", "repo:read"],
277 ["get_release_by_tag", "repo:read"],
278 ["get_release", "repo:read"],
279 ["create_release", "repo:write"],
280 ["update_release", "repo:write"],
281 ["delete_release", "repo:write"],
282 ["list_labels", "repo:read"],
283 ["list_milestones", "repo:read"],
284 ["get_milestone", "repo:read"],
285 ["create_label", "issues:write"],
286 ["update_label", "issues:write"],
287 ["delete_label", "issues:write"],
288 ["add_default_labels", "issues:write"],
289 ["create_milestone", "issues:write"],
290 ["update_milestone", "issues:write"],
291 ["delete_milestone", "issues:write"],
292 ["get_repo_settings", "repo:read"],
293 ["list_check_names", "repo:read"],
294 ["list_deleted_repos", "repo:read"],
295 ["list_security_alerts", "repo:read"],
296 ["get_codeowners_errors", "repo:read"],
297 ["create_repo", "repo:write"],
298 ["update_repo", "repo:write"],
299 ["update_project", "repo:write"],
300 ["update_repo_settings", "repo:write"],
301 ["list_repo_rulesets", "repo:read"],
302 ["get_repo_ruleset", "repo:read"],
303 ["get_branch_rules", "repo:read"],
304 ["list_rule_evaluations", "repo:read"],
305 ["create_repo_ruleset", "repo:admin"],
306 ["update_repo_ruleset", "repo:admin"],
307 ["delete_repo_ruleset", "repo:admin"],
308 ["rename_branch", "repo:write"],
309 ["rename_repo", "repo:admin"],
310 ["transfer_repo", "repo:admin"],
311 ["archive_repo", "repo:admin"],
312 ["unarchive_repo", "repo:admin"],
313 ["set_repo_visibility", "repo:admin"],
314 ["delete_repo", "repo:admin"],
315 ["restore_repo", "repo:admin"],
316 ["purge_repo", "repo:admin"],
317 ["dismiss_security_alert", "repo:admin"],
318 ["reopen_security_alert", "repo:admin"],
319 // The security suite.
320 ["list_secret_scanning_alerts", "security:read"],
321 ["get_secret_scanning_alert", "security:read"],
322 ["list_secret_scanning_locations", "security:read"],
323 ["list_bypass_requests", "security:read"],
324 ["list_custom_patterns", "security:read"],
325 ["list_code_scanning_alerts", "security:read"],
326 ["get_code_scanning_alert", "security:read"],
327 ["list_code_scanning_analyses", "security:read"],
328 ["get_sarif_upload", "security:read"],
329 ["list_vulnerability_alerts", "security:read"],
330 ["get_vulnerability_alert", "security:read"],
331 ["get_dependency_graph", "security:read"],
332 ["get_sbom", "security:read"],
333 ["compare_dependencies", "security:read"],
334 ["get_security_settings", "security:read"],
335 ["get_workspace_security_settings", "security:read"],
336 ["get_security_overview", "security:read"],
337 ["update_secret_scanning_alert", "security:write"],
338 ["bypass_push_protection", "security:write"],
339 ["check_secret_validity", "security:write"],
340 ["review_bypass_request", "security:write"],
341 ["create_custom_pattern", "security:write"],
342 ["update_custom_pattern", "security:write"],
343 ["delete_custom_pattern", "security:write"],
344 ["dry_run_custom_pattern", "security:write"],
345 ["update_code_scanning_alert", "security:write"],
346 ["upload_sarif", "security:write"],
347 ["update_vulnerability_alert", "security:write"],
348 ["fix_security_alert", "security:write"],
349 ["update_security_settings", "security:write"],
350 ["update_workspace_security_settings", "security:write"],
351 ["list_issues", "issues:read"],
352 ["get_issue", "issues:read"],
353 ["get_plan", "issues:read"],
354 ["create_issue", "issues:write"],
355 ["update_issue", "issues:write"],
356 ["list_issue_labels", "issues:read"],
357 ["add_issue_labels", "issues:write"],
358 ["set_issue_labels", "issues:write"],
359 ["remove_issue_labels", "issues:write"],
360 ["close_issue", "issues:write"],
361 ["reopen_issue", "issues:write"],
362 ["add_comment", "issues:write"],
363 ["import_issue", "issues:write"],
364 ["apply_plan", "issues:write"],
365 ["list_pull_requests", "pull_requests:read"],
366 ["get_pull_request", "pull_requests:read"],
367 ["get_pull_request_changes", "pull_requests:read"],
368 ["read_session", "pull_requests:read"],
369 ["get_merge_queue", "pull_requests:read"],
370 ["create_pull_request", "pull_requests:write"],
371 ["update_pull_request", "pull_requests:write"],
372 ["record_session", "pull_requests:write"],
373 ["mark_pull_request_ready", "pull_requests:write"],
374 ["close_pull_request", "pull_requests:write"],
375 ["review_pull_request", "pull_requests:write"],
376 ["merge_pull_request", "pull_requests:write"],
377 ["request_reviewers", "pull_requests:write"],
378 ["remove_requested_reviewers", "pull_requests:write"],
379 ["assign_issue", "agents:run"],
380 ["delegate", "agents:run"],
381 ["plan_work", "agents:run"],
382 ["message_agent", "agents:run"],
383 ["answer_message", "agents:run"],
384 ["take_messages", "agents:run"],
385 ["list_workflows", "workflows:read"],
386 ["list_workflow_runs", "workflows:read"],
387 ["get_workflow_run", "workflows:read"],
388 ["get_job_logs", "workflows:read"],
389 ["dispatch_workflow", "workflows:write"],
390 ["cancel_workflow_run", "workflows:write"],
391 ["rerun_workflow_run", "workflows:write"],
392 ["update_workflow", "workflows:write"],
393 ["list_commit_statuses", "checks:read"],
394 ["get_combined_status", "checks:read"],
395 ["list_check_runs_for_ref", "checks:read"],
396 ["get_check_run", "checks:read"],
397 ["list_check_run_annotations", "checks:read"],
398 ["list_check_suites_for_ref", "checks:read"],
399 ["get_check_suite", "checks:read"],
400 ["create_commit_status", "checks:write"],
401 ["create_check_run", "checks:write"],
402 ["update_check_run", "checks:write"],
403 ["rerequest_check_run", "checks:write"],
404 ["rerequest_check_suite", "checks:write"],
405 // Deployments, wherever they run: reading them, and reporting them.
406 ["list_deployments", "deployments:read"],
407 ["get_deployment", "deployments:read"],
408 ["list_deployment_statuses", "deployments:read"],
409 ["list_environments", "deployments:read"],
410 ["get_environment", "deployments:read"],
411 ["create_deployment", "deployments:write"],
412 ["create_deployment_status", "deployments:write"],
413 ["recall", "memory:read"],
414 ["search_context", "memory:read"],
415 ["get_entity", "memory:read"],
416 ["get_context", "memory:read"],
417 ["remember", "memory:write"],
418 ["list_collaborators", "access:read"],
419 ["get_collaborator_permission", "access:read"],
420 ["list_repo_invitations", "access:read"],
421 ["list_outside_collaborators", "access:read"],
422 ["add_collaborator", "access:admin"],
423 ["update_collaborator", "access:admin"],
424 ["remove_collaborator", "access:admin"],
425 ["revoke_repo_invitation", "access:admin"],
426 ["set_base_permission", "access:admin"],
427 ["set_team_repo", "access:admin"],
428 ["remove_team_repo", "access:admin"],
429 ["list_webhooks", "webhooks:read"],
430 ["list_webhook_deliveries", "webhooks:read"],
431 ["create_webhook", "webhooks:admin"],
432 ["update_webhook", "webhooks:admin"],
433 ["delete_webhook", "webhooks:admin"],
434 ["ping_webhook", "webhooks:admin"],
435 ["redeliver_webhook", "webhooks:admin"],
436 ["list_actions_secrets", "secrets:read"],
437 ["list_actions_variables", "secrets:read"],
438 ["set_actions_secret", "secrets:admin"],
439 ["delete_actions_secret", "secrets:admin"],
440 ["set_actions_variable", "secrets:admin"],
441 ["delete_actions_variable", "secrets:admin"],
442 // Self-hosted runners.
443 ["list_runners", "runners:read"],
444 ["list_runner_groups", "runners:read"],
445 ["get_runner_settings", "runners:read"],
446 ["create_runner_registration_token", "runners:admin"],
447 ["remove_runner", "runners:admin"],
448 ["create_runner_group", "runners:admin"],
449 ["update_runner_group", "runners:admin"],
450 ["delete_runner_group", "runners:admin"],
451 ["update_runner_settings", "runners:admin"],
452 // The AI Gateway. Sending a request to a model needs `models:write`,
453 // checked by the model proxy at models.g1t.sh.
454 ["list_gateway_requests", "models:read"],
455] as const;
456
457/**
458 * The scopes a token or grant holds, as stored: null for full access, or
459 * the list. `legacy` marks a token made before scopes, which has full
460 * access until someone narrows it.
461 */
462export type TokenScopes = {
463 scopes: Scope[] | null;
464 legacy: boolean;
465};
466
467/**
468 * How settings group scopes into a checklist: each group's scopes, least
469 * first. Admin scopes are not here; they are under "Dangerous" on their
470 * own (see `DANGEROUS_SCOPES`). Every other scope is in exactly one group.
471 */
472export const SCOPE_GROUPS: { id: string; label: string; scopes: Scope[] }[] = [
473 { id: "code", label: "Repositories & code", scopes: ["repo:read", "repo:write", "code:read", "code:write"] },
474 { id: "security", label: "Security", scopes: ["security:read", "security:write"] },
475 { id: "packages", label: "Packages", scopes: ["packages:read", "packages:write"] },
476 { id: "work", label: "Issues & pull requests", scopes: ["issues:read", "issues:write", "pull_requests:read", "pull_requests:write"] },
477 { id: "agents", label: "Agents", scopes: ["agents:run"] },
478 { id: "workflows", label: "Workflows", scopes: ["workflows:read", "workflows:write"] },
479 { id: "checks", label: "Checks", scopes: ["checks:read", "checks:write"] },
480 { id: "deployments", label: "Deployments", scopes: ["deployments:read", "deployments:write"] },
481 { id: "memory", label: "Memory & search", scopes: ["memory:read", "memory:write"] },
482 { id: "account", label: "Account", scopes: ["account:read", "account:write"] },
483 { id: "notifications", label: "Notifications", scopes: ["notifications:read", "notifications:write"] },
484 { id: "workspace", label: "Workspace", scopes: ["workspace:read", "access:read", "webhooks:read", "secrets:read"] },
485 { id: "billing", label: "Billing", scopes: ["billing:read", "billing:write"] },
486 { id: "runners", label: "Runners", scopes: ["runners:read"] },
487 { id: "models", label: "AI Gateway", scopes: ["models:read", "models:write"] },
488];
489
490/** The admin and delete scopes, shown under "Dangerous" behind a warning. */
491export const DANGEROUS_SCOPES: Scope[] = SCOPES.map((row) => row.scope).filter(isDangerous);