Update tests for steering capability and send-path routing

Test drift surfaced by rebasing onto main:

- client SDK agent fixture now expects supportsSteering: false (the steering feature adds this capability flag, schema-defaulted).

- permission-response fake AgentManager gains startAgentRun, since the shared startAgentRun helper now routes through AgentManager.startAgentRun (the steer-vs-replace-vs-stream dispatch) instead of calling streamAgent/replaceAgentRun directly.
This commit is contained in:
Mohamed Boudra
2026-05-31 10:27:13 +07:00
parent 091350544d
commit d1278aa856
2 changed files with 17 additions and 0 deletions

View File

@@ -152,6 +152,7 @@ function createAgent(input: Partial<PaseoAgent> = {}): PaseoAgent {
supportsRewindBoth: false,
supportsRewindConversation: false,
supportsRewindFiles: false,
supportsSteering: false,
supportsToolInvocations: true,
},
currentModeId: null,

View File

@@ -8,6 +8,7 @@ import type {
AgentPermissionResponse,
} from "./agent-sdk-types.js";
import type { AgentStreamEvent } from "../messages.js";
import type { StartAgentRunOptions, StartAgentRunResult } from "./agent-manager.js";
import { respondToAgentPermission } from "./permission-response.js";
class FakePermissionAgentManager {
@@ -61,6 +62,21 @@ class FakePermissionAgentManager {
this.replacementRuns.push({ agentId, prompt, options });
return emptyAgentStream();
}
startAgentRun(
agentId: string,
prompt: AgentPromptInput,
options?: StartAgentRunOptions,
): StartAgentRunResult {
if (this.tryRunOutOfBand()) {
return { outOfBand: true };
}
const shouldReplace = Boolean(options?.replaceRunning && this.hasInFlightRun());
const events = shouldReplace
? this.replaceAgentRun(agentId, prompt, options?.runOptions)
: this.streamAgent(agentId, prompt, options?.runOptions);
return { outOfBand: false, events };
}
}
async function* emptyAgentStream(): AsyncGenerator<AgentStreamEvent> {}