fix(api): preserve dynamic defaults after rebase

This commit is contained in:
imccyu
2026-08-07 19:44:47 +08:00
parent 8bbbb6fe59
commit 55ccfb5a48
2 changed files with 5 additions and 5 deletions

View File

@@ -20,8 +20,8 @@ export type ApiRemoteAgentResult =
/** Resume configuration supplied by the owning Host composition. */
export interface ApiRemoteAgentOptions {
/** Per-Agent defaults used when a cold identity must resume. */
readonly agentOptions?: AgentOptions
/** Read the per-Agent defaults when a cold identity must resume. */
readonly agentOptions?: () => AgentOptions
/** Host-specific Agent-scope composition completed before publication. */
readonly setup?: AgentSetup
}
@@ -144,7 +144,7 @@ export function createApiRemoteAgentResolver(
}
const handle = await ctx.agents.resume({
resumeSessionId: sessionId,
...options.agentOptions === undefined ? {} : { agentOptions: options.agentOptions },
...options.agentOptions === undefined ? {} : { agentOptions: options.agentOptions() },
...options.setup === undefined ? {} : { setup: options.setup },
})
return handle.agent