Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(server): work a linked environment starts stays within its link #16695

Mergedjuliusmarmingemerged 3 commits intot3code/peer/forwarding fromrefs/pull/16695/headmerged by juliusmarminge View on GitHub

Showing 37 changed files with 37 additions and 4 deletions (loading 34).

x
0 of 37 viewed, 37 left
5 additions and 0 deletionsapps/server/src/auth/EnvironmentAuth.tsModified
View file
@@ -92,6 +92,8 @@
readonly sessionId: AuthSessionId;
readonly label: string;
readonly access: AuthMcpClientAccess;
+ /** Another T3 Code environment's link, whose work here stays within it. */
+ readonly peerLink: boolean;
​
export interface AuthenticatedSession {
@@ -555,6 +557,7 @@
readonly issueMcpClientSession: (input: {
readonly label: string;
readonly access: AuthMcpClientAccess;
+ readonly peerLink: boolean;
readonly client: AuthClientMetadata;
}) => Effect.Effect<
@@ -1305,6 +1308,7 @@
access: session.scopes.includes(AuthOrchestrationOperateScope)
? (session.runtimeModeCeiling ?? "approval-required")
: "read-only",
+ peerLink: session.peerLink === true,
} satisfies McpClientSession)
: Effect.fail(
new ServerAuthInvalidCredentialError({
@@ -1324,6 +1328,7 @@
scopes: mcpClientScopes(input.access),