Recover paused supervision and tighten approval boundaries

Restore bindings before model availability checks, require explicit reconnect/restart recovery, detach inactive plans, remove the general Intercom actuator, and reject placeholder evidence without hashing the plan log. Preserve synchronous handoff-before-ack; document that the void SDK cannot confirm durable message delivery.
This commit is contained in:
wassname
2026-09-08 18:57:43 +08:00
parent 2824396a71
commit 325b93983f
12 changed files with 403 additions and 39 deletions
+5
View File
@@ -47,12 +47,14 @@ it("runs a forked Pi supervisor and receives its exact instruction in another Pi
let supervisor: Driver | undefined;
let workerFile: string | undefined;
let supervisorFile: string | undefined;
let supervisorTools: string[] = [];
const server = createServer(async (request, response) => {
let body = "";
for await (const chunk of request) body += chunk;
const input = JSON.parse(body);
const latest = input.messages.at(-1);
const steer = latest.role === "user" && JSON.stringify(latest.content).includes("The worker stopped.");
if (steer) supervisorTools = input.tools.map((tool: any) => tool.function.name);
response.writeHead(200, { "content-type": "text/event-stream" });
const delta = steer ? { tool_calls: [{ index: 0, id: "test-steer", type: "function", function: { name: "SteerWorker", arguments: JSON.stringify({ instruction: advice }) } }] } : { content: "Test context retained. Actual outputs still need inspection." };
response.write(`data: ${JSON.stringify({ choices: [{ index: 0, delta, finish_reason: null }] })}\n\n`);
@@ -92,6 +94,9 @@ it("runs a forked Pi supervisor and receives its exact instruction in another Pi
expect(JSON.stringify(received)).toContain(advice);
const result = await supervisor.wait(message => message.type === "tool_execution_end" && message.toolName === "SteerWorker");
expect(result.isError).toBe(false);
expect(supervisorTools).toContain("SteerWorker");
expect(supervisorTools).not.toContain("intercom");
expect(supervisorTools).not.toContain("bash");
supervisor.send({ type: "get_state", id: "supervisor-state" });
const supervisorState = await supervisor.wait(message => message.type === "response" && message.id === "supervisor-state");
supervisorFile = supervisorState.data.sessionFile;