Skip to content

Commit 0fe5bab

Browse files
committed
fixup! feat(server): owner-approved external MCP clients over DPoP device grants (#1636)
1 parent a42e986 commit 0fe5bab

3 files changed

Lines changed: 11 additions & 19 deletions

File tree

‎apps/server/src/auth/DeviceAuthorization.fork.ts‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,9 @@ export class DeviceAuthorizationStore extends Context.Service<
138138
DeviceAuthorizationStoreError
139139
>;
140140
/**
141-
* Grants `scopes` when given, else the requested scopes, else the standard
142-
* client scopes. `scopes` may narrow a request but never widen it; with no
143-
* request it may name any environment scope.
144-
*
145-
* `mcpPolicy` instead grants an external MCP client: no scopes, and the
141+
* Grants `scopes` when given, else the requested scopes, else the standard client scopes.
142+
* `scopes` may narrow a request but never widen it; with no request it may name any
143+
* environment scope. `mcpPolicy` instead grants an external MCP client no scopes, with the
146144
* policy as the session's only authority.
147145
*/
148146
readonly approve: (input: {

‎apps/server/src/mcp/external/ExternalMcpRequestLedger.fork.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ export const makeExternalMcpRequestLedger = Effect.gen(function* () {
4848
const lock = yield* Semaphore.make(1);
4949

5050
/**
51-
* Runs `execute` once per `(session, operation, key)`. A retry with the same
52-
* fingerprint replays the stored result; a different fingerprint fails. A
53-
* request whose earlier attempt never recorded a result runs again, so
54-
* `execute` must recover what that attempt already committed, through its
55-
* stable ids or its pin, before it selects anything from the live thread.
51+
* Runs `execute` once per `(session, operation, key)`: the same fingerprint replays the stored
52+
* result and a different one fails. An attempt that never recorded a result runs again, so
53+
* `execute` must recover what it already committed, through its stable ids or its pin, before
54+
* it selects anything from the live thread.
5655
*/
5756
const run = <A, I>(
5857
input: {

‎apps/server/src/orchestration-v2/steerTarget.fork.ts‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
// Fork-owned send guards (RSI-Software/t3code-hyprws device-auth domain) for a
2-
// caller that vetted a thread before sending to it. `steerTarget` on
3-
// `ThreadManagementService.sendToThread` names the one provider attempt the
4-
// message may join: `auto` queues instead of joining another, and `steer` or
5-
// `restart` fails. `expectedModes` names the thread modes the caller vetted.
6-
// Both ride on `message.dispatch`, and the orchestrator refuses the send under
7-
// the thread lock once the run has moved to another attempt or the modes have
8-
// changed. The guard holds at dispatch commit; modes the owner sets afterwards
9-
// govern turns that resolve their runtime policy later, as for any message.
1+
// Fork-owned send guards for a caller that vetted a thread before sending. `steerTarget` names
2+
// the one provider attempt the message may join (`auto` queues instead; `steer` or `restart`
3+
// fails) and `expectedModes` the vetted modes. Both ride on `message.dispatch`, which refuses
4+
// the send under the thread lock once the attempt or modes changed before commit.
105
import type {
116
OrchestrationV2AppThread,
127
OrchestrationV2Command,

0 commit comments

Comments
 (0)