Close supervisor review loop and add handoff eval

This commit is contained in:
dahyeon committed 2026-05-18 18:04:01 -07:00
1 parent c14adac162
commit f0b00e5fd2
20 files changed
+2017 -129

No files matched your search

+16
View File
@@ -151,6 +151,10 @@ describe("Agent handoff dispatch", () => {
expect(nats.responses).toHaveLength(1);
expect(nats.responses[0]?.text).toBe("final answer");
expect(nats.responses[0]?.metadata).toMatchObject({
handoffChain: ["source", "target"],
handoffDepth: 1,
});
expect(store.messages.map((message) => message.content)).toEqual([
"final answer",
]);
@@ -189,6 +193,10 @@ describe("Agent handoff dispatch", () => {
expect(nats.responses[0]?.text).toBe("handled elsewhere");
expect(nats.responses[0]?.metadata?.["packetSeen"]).toBe(true);
expect(nats.responses[0]?.metadata).toMatchObject({
handoffChain: ["source", "target"],
handoffDepth: 1,
});
});
it("routes runtime verifier escalations to supervisor", async () => {
@@ -228,6 +236,10 @@ describe("Agent handoff dispatch", () => {
expect(nats.responses[0]?.text).toBe("sent to review");
expect(nats.responses[0]?.metadata?.["packetSeen"]).toBe(true);
expect(nats.responses[0]?.metadata).toMatchObject({
handoffChain: ["moderation", "supervisor"],
handoffDepth: 1,
});
} finally {
if (previous === undefined) {
delete process.env["AGENT_RUNTIME_VERIFIER_ENABLED"];
@@ -297,5 +309,9 @@ describe("Agent handoff dispatch", () => {
expect(nats.responses[0]?.text).toBe("supervisor review");
expect(nats.responses[0]?.metadata?.["packetSeen"]).toBe(true);
expect(nats.responses[0]?.metadata).toMatchObject({
handoffChain: ["source", "supervisor"],
handoffDepth: 1,
});
});
});