mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
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:
@@ -152,6 +152,7 @@ function createAgent(input: Partial<PaseoAgent> = {}): PaseoAgent {
|
||||
supportsRewindBoth: false,
|
||||
supportsRewindConversation: false,
|
||||
supportsRewindFiles: false,
|
||||
supportsSteering: false,
|
||||
supportsToolInvocations: true,
|
||||
},
|
||||
currentModeId: null,
|
||||
|
||||
@@ -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> {}
|
||||
|
||||
Reference in New Issue
Block a user