From 86ea2e04a4e7444d07d7c355f5939f16832ad098 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:01:44 -0700 Subject: [PATCH] fix(native-chat): preserve rpc defaults across main merge --- .../orchestration-structured-chat-lease.test.ts | 15 ++++++++------- src/main/runtime/rpc/dispatcher.ts | 5 +++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/runtime/orchestration-structured-chat-lease.test.ts b/src/main/runtime/orchestration-structured-chat-lease.test.ts index c7e407b317f..b3a78b08a5c 100644 --- a/src/main/runtime/orchestration-structured-chat-lease.test.ts +++ b/src/main/runtime/orchestration-structured-chat-lease.test.ts @@ -317,13 +317,14 @@ describe('orchestration while Structured Chat owns an agent session', () => { it('settles worker_done while its pane remains in Structured Chat', async () => { const run = createRun() const task = db.createTask({ spec: 'Finish from Structured Chat', runId: run.id }) - const dispatch = db.createDispatchContext( - task.id, - WORKER.handle, - paneKey(WORKER), - undefined, - runtime.getTerminalProcessIncarnation(WORKER.handle) ?? undefined - ) + const dispatch = db.createDispatchContext({ + taskId: task.id, + assigneeHandle: WORKER.handle, + assigneePaneKey: paneKey(WORKER), + processIncarnation: runtime.getTerminalProcessIncarnation(WORKER.handle) ?? undefined, + creator: { kind: 'system' }, + maxDepth: Number.MAX_SAFE_INTEGER + }) const capability = db.mintDispatchCapability({ dispatchId: dispatch.id, paneKey: paneKey(WORKER), diff --git a/src/main/runtime/rpc/dispatcher.ts b/src/main/runtime/rpc/dispatcher.ts index 606e387de76..007c5751809 100644 --- a/src/main/runtime/rpc/dispatcher.ts +++ b/src/main/runtime/rpc/dispatcher.ts @@ -9,6 +9,7 @@ import { } from './core' import { errorResponse, successResponse } from './errors' +import { ALL_RPC_METHODS } from './methods' import { emulatorProbe, emulatorProbeError } from '../../emulator/emulator-probe' import type { OrcaRuntimeService } from '../orca-runtime' import { @@ -26,7 +27,7 @@ import { routeDispatcherClientHostedBrowserRpc } from './dispatcher-client-brows import { needsLocalCallerFingerprint } from './dispatcher-caller-fingerprint' import { createDispatcherStreamingFeatureEmitter } from './dispatcher-streaming-feature-emitter' -export type DispatcherOptions = { runtime: OrcaRuntimeService; methods: readonly RpcAnyMethod[] } +export type DispatcherOptions = { runtime: OrcaRuntimeService; methods?: readonly RpcAnyMethod[] } // oxfmt-ignore type DispatchCallOptions = Pick @@ -37,7 +38,7 @@ export class RpcDispatcher { private readonly orchestrationMutations: OrchestrationMutationExecutor private readonly legacyOrchestration: OrchestrationLegacyCompatibility - constructor({ runtime, methods }: DispatcherOptions) { + constructor({ runtime, methods = ALL_RPC_METHODS }: DispatcherOptions) { this.runtime = runtime this.registry = buildRegistry(methods) this.orchestrationMutations = getOrchestrationMutationExecutor(runtime)