1+ import { SessionPermissions } from "./SessionPermissions" ;
2+ import { AUTH_SCOPE_OPTIONS as PAIRING_SCOPE_OPTIONS } from "@t3tools/shared/authScopeOptions" ;
13import {
24 ChevronRightIcon ,
35 ChevronsLeftRightEllipsisIcon ,
@@ -23,20 +25,13 @@ import {
2325import {
2426 AuthAccessReadScope ,
2527 AuthAccessWriteScope ,
26- AuthSettingsWriteScope ,
27- AuthProvidersManageScope ,
2828 AuthEnvironmentMaintainScope ,
2929 AuthDiagnosticsReadScope ,
30- AuthOrchestrationOperateScope ,
3130 AuthOrchestrationReadScope ,
32- AuthPreviewOperateScope ,
3331 AuthRelayReadScope ,
3432 AuthRelayWriteScope ,
35- AuthSourceControlWriteScope ,
3633 AuthFilesystemReadScope ,
37- AuthFilesystemWriteScope ,
3834 AuthStandardClientScopes ,
39- AuthTerminalOperateScope ,
4035 AuthTerminalReadScope ,
4136 type AuthClientSession ,
4237 type AuthEnvironmentScope ,
@@ -231,93 +226,6 @@ function formatAccessTimestamp(value: string): string {
231226 return accessTimestampFormatter . format ( parsed ) ;
232227}
233228
234- const PAIRING_SCOPE_OPTIONS : ReadonlyArray < {
235- readonly scope : AuthGrantScope ;
236- readonly title : string ;
237- readonly description : string ;
238- } > = [
239- {
240- scope : AuthOrchestrationReadScope ,
241- title : "View environment" ,
242- description : "Read threads, status, checkpoints, and configuration." ,
243- } ,
244- {
245- scope : AuthOrchestrationOperateScope ,
246- title : "Operate tasks" ,
247- description : "Start, update, and stop tasks." ,
248- } ,
249- {
250- scope : AuthSettingsWriteScope ,
251- title : "Change environment settings" ,
252- description : "Edit environment preferences and keybindings." ,
253- } ,
254- {
255- scope : AuthProvidersManageScope ,
256- title : "Manage providers" ,
257- description : "Configure, install, sign in to, and update providers and usage sources." ,
258- } ,
259- {
260- scope : AuthEnvironmentMaintainScope ,
261- title : "Maintain environment" ,
262- description : "Update the server and control environment processes." ,
263- } ,
264- {
265- scope : AuthPreviewOperateScope ,
266- title : "Control previews" ,
267- description : "Open browser previews and host browser automation." ,
268- } ,
269- {
270- scope : AuthDiagnosticsReadScope ,
271- title : "View diagnostics and usage" ,
272- description : "Read process diagnostics, resource history, and usage totals." ,
273- } ,
274- {
275- scope : AuthTerminalReadScope ,
276- title : "View terminals" ,
277- description : "Read existing terminal output and status." ,
278- } ,
279- {
280- scope : AuthTerminalOperateScope ,
281- title : "Use terminals" ,
282- description : "Create terminals and send input to running shells." ,
283- } ,
284- {
285- scope : AuthSourceControlWriteScope ,
286- title : "Change source control" ,
287- description : "Commit, push, manage branches and repositories, and change pull requests." ,
288- } ,
289- {
290- scope : AuthFilesystemReadScope ,
291- title : "Read files" ,
292- description : "Browse host files, search workspaces, and inspect local changes." ,
293- } ,
294- {
295- scope : AuthFilesystemWriteScope ,
296- title : "Write files" ,
297- description : "Edit workspace files and save plans to disk." ,
298- } ,
299- {
300- scope : AuthAccessReadScope ,
301- title : "View access" ,
302- description : "Inspect pairing links and authorized clients." ,
303- } ,
304- {
305- scope : AuthAccessWriteScope ,
306- title : "Manage access" ,
307- description : "Issue and revoke credentials for other clients." ,
308- } ,
309- {
310- scope : AuthRelayReadScope ,
311- title : "View relay" ,
312- description : "Inspect managed relay connectivity." ,
313- } ,
314- {
315- scope : AuthRelayWriteScope ,
316- title : "Manage relay" ,
317- description : "Change managed tunnel connectivity." ,
318- } ,
319- ] ;
320-
321229function AccessScopeSummary ( {
322230 scopes,
323231 label,
@@ -3776,6 +3684,14 @@ export function ConnectionsSettings() {
37763684 ) : null }
37773685 </ SettingsSection >
37783686
3687+ { primaryEnvironment ? (
3688+ < SessionPermissions
3689+ environmentId = { primaryEnvironment . environmentId }
3690+ label = { primaryEnvironment . label }
3691+ connected = { primaryEnvironment . connection . phase === "connected" }
3692+ />
3693+ ) : null }
3694+
37793695 { canReadAccess || canWriteAccess ? (
37803696 < FoldedSettingsSection
37813697 id = "authorized-clients"
0 commit comments