1import {
2 AuthAccessReadScope,
3 AuthAccessWriteScope,
4 AuthDiagnosticsReadScope,
5 AuthEnvironmentMaintainScope,
6 AuthFilesystemReadScope,
7 AuthFilesystemWriteScope,
8 type AuthGrantScope,
9 AuthOrchestrationOperateScope,
10 AuthOrchestrationReadScope,
11 AuthPreviewOperateScope,
12 AuthProvidersManageScope,
13 AuthRelayReadScope,
14 AuthRelayWriteScope,
15 AuthSettingsWriteScope,
16 AuthSourceControlWriteScope,
17 AuthTerminalOperateScope,
18 AuthTerminalReadScope,
19} from "@t3tools/contracts";
20
21export const AUTH_SCOPE_OPTIONS: ReadonlyArray<{
22 readonly scope: AuthGrantScope;
23 readonly title: string;
24 readonly description: string;
25}> = [
26 {
27 scope: AuthOrchestrationReadScope,
28 title: "View environment",
29 description: "Read threads, status, checkpoints, and configuration.",
30 },
31 {
32 scope: AuthOrchestrationOperateScope,
33 title: "Operate tasks",
34 description: "Start, update, and stop tasks.",
35 },
36 {
37 scope: AuthSettingsWriteScope,
38 title: "Change environment settings",
39 description: "Edit environment preferences and keybindings.",
40 },
41 {
42 scope: AuthProvidersManageScope,
43 title: "Manage providers",
44 description: "Configure, install, sign in to, and update providers and usage sources.",
45 },
46 {
47 scope: AuthEnvironmentMaintainScope,
48 title: "Maintain environment",
49 description: "Update the server and control environment processes.",
50 },
51 {
52 scope: AuthPreviewOperateScope,
53 title: "Control previews",
54 description: "Open browser previews and host browser automation.",
55 },
56 {
57 scope: AuthDiagnosticsReadScope,
58 title: "View diagnostics and usage",
59 description: "Read process diagnostics, resource history, and usage totals.",
60 },
61 {
62 scope: AuthTerminalReadScope,
63 title: "View terminals",
64 description: "Read existing terminal output and status.",
65 },
66 {
67 scope: AuthTerminalOperateScope,
68 title: "Use terminals",
69 description: "Create terminals and send input to running shells.",
70 },
71 {
72 scope: AuthSourceControlWriteScope,
73 title: "Change source control",
74 description: "Commit, push, manage branches and repositories, and change pull requests.",
75 },
76 {
77 scope: AuthFilesystemReadScope,
78 title: "Read files",
79 description: "Browse host files, search workspaces, and inspect local changes.",
80 },
81 {
82 scope: AuthFilesystemWriteScope,
83 title: "Write files",
84 description: "Edit workspace files and save plans to disk.",
85 },
86 {
87 scope: AuthAccessReadScope,
88 title: "View access",
89 description: "Inspect pairing links and authorized clients.",
90 },
91 {
92 scope: AuthAccessWriteScope,
93 title: "Manage access",
94 description: "Issue and revoke credentials for other clients.",
95 },
96 {
97 scope: AuthRelayReadScope,
98 title: "View relay",
99 description: "Inspect managed relay connectivity.",
100 },
101 {
102 scope: AuthRelayWriteScope,
103 title: "Manage relay",
104 description: "Change managed tunnel connectivity.",
105 },
106];