Skip to content

Commit e07c040

Browse files
committed
feat(runtime-host): broker nested capability forms
Route Client Capability interaction requests through the Runtime-owned form callback. Pause provider execution time only while the canonical form is pending, bound result delivery, and rearm a fresh execution timeout after delivery.\n\nClose the exact producer-owned form before settling provider failure, cancellation, or connection loss, while preserving Runtime Host as the only Interaction authority.\n\nPart of #4364.\n\nGenerated-by: OpenAI Codex
1 parent ca09f64 commit e07c040

8 files changed

Lines changed: 753 additions & 68 deletions

File tree

apps/desktop/src/main/__tests__/runtime-host-desktop-candidate.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,7 @@ function connectionHarness(
12071207
return provider.call(frame, {
12081208
signal: new AbortController().signal,
12091209
accept: async () => undefined,
1210+
requestInteraction: async () => assert.fail('Unexpected provider interaction'),
12101211
});
12111212
},
12121213
disconnect: () => resolveClosed?.(),

apps/desktop/src/main/__tests__/runtime-host-native-capabilities.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ test('forwards Host cancellation to an admitted Desktop invocation', async () =>
528528
const inFlight = provider.call(capabilityFrame(), {
529529
signal: controller.signal,
530530
accept: async () => undefined,
531+
requestInteraction: async () => assert.fail('Unexpected provider interaction'),
531532
});
532533

533534
await started;
@@ -649,5 +650,6 @@ async function call(
649650
return provider.call(frame, {
650651
signal: new AbortController().signal,
651652
accept: async () => accept(),
653+
requestInteraction: async () => assert.fail('Unexpected provider interaction'),
652654
});
653655
}

packages/cli/src/__tests__/runtime-host-capability-provider-command.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ test('MCP capability publication freezes an accepted callable tool snapshot', as
8787
accept: async () => {
8888
accepted = true;
8989
},
90+
requestInteraction: async () => assert.fail('Unexpected provider interaction'),
9091
},
9192
);
9293
assert.deepEqual(result, { content: [{ type: 'text', text: '{"path":"README.md"}' }] });

0 commit comments

Comments
 (0)