fix(native-chat): preserve rpc defaults across main merge

This commit is contained in:
Brennan Benson
2026-08-26 14:01:44 -07:00
parent cbefe2feca
commit 86ea2e04a4
2 changed files with 11 additions and 9 deletions
@@ -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),
+3 -2
View File
@@ -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<RpcDispatchStreamingOptions, 'signal' | 'clientId' | 'clientKind' | 'clientCapabilities' | 'authenticatedCallerFingerprint'>
@@ -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)