mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
test(cli): reopen the idle agent explicitly after a supervisor restart
Fetching an agent's timeline now reads stored history without loading the agent, so the agent stays closed until it is reopened.
This commit is contained in:
@@ -210,7 +210,12 @@ try {
|
||||
console.log("Foreground SIGINT reached the supervisor. The worker and ACP processes exited.");
|
||||
|
||||
daemon = await startSupervisor();
|
||||
const restoredIdle = (await daemon.client.fetchAgentTimeline(idle.id)).agent;
|
||||
// The stored timeline is served without reopening the agent.
|
||||
const storedIdle = (await daemon.client.fetchAgentTimeline(idle.id)).agent;
|
||||
assert.equal(storedIdle?.status, "closed");
|
||||
assert.equal(storedIdle?.requiresAttention, false);
|
||||
await daemon.client.refreshAgent(idle.id);
|
||||
const restoredIdle = (await daemon.client.fetchAgent(idle.id))?.agent;
|
||||
assert.equal(restoredIdle?.status, "idle");
|
||||
assert.equal(restoredIdle?.requiresAttention, false);
|
||||
await waitFor(async () => {
|
||||
|
||||
Reference in New Issue
Block a user