The Open Framework for Building Agents
fix(eve): tolerate legacy agent info effects (#4007)
OwenKephart50afc41b9370
diff --git a/.changeset/tolerate-legacy-agent-info-effects.md b/.changeset/tolerate-legacy-agent-info-effects.mdnew file mode 100644index 000000000..475928557--- /dev/null+++ b/.changeset/tolerate-legacy-agent-info-effects.md@@ -0,0 +1,5 @@+---+"eve": patch+---++Allow `eve remote info` to inspect deployments that report retired kernel-effect options, marking those options as unrecognized instead of rejecting the agent-info response.diff --git a/packages/eve/src/client/agent-info-schema.ts b/packages/eve/src/client/agent-info-schema.tsindex 8a32a83d9..98b5407bf 100644--- a/packages/eve/src/client/agent-info-schema.ts+++ b/packages/eve/src/client/agent-info-schema.ts@@ -250,11 +250,21 @@ const remoteAgent = entry}).strict();+// Kernel effects are inspection metadata only. Deployments can retain removed+// effects across framework versions, so preserve the response and identify an+// option this client cannot interpret instead of rejecting agent info entirely.const kernelEffect = z.object({- action: z.enum(["subagent-call", "workflow-tool-call"]).optional(),- audience: z.array(z.literal("root-session")),- kind: z.enum(["dispatch", "provider-tool"]),+ action: z+ .union([z.enum(["subagent-call", "workflow-tool-call"]), z.literal("unrecognized")])+ .catch("unrecognized")+ .optional(),+ audience: z.array(+ z.union([z.literal("root-session"), z.literal("unrecognized")]).catch("unrecognized"),+ ),+ kind: z+ .union([z.enum(["dispatch", "provider-tool"]), z.literal("unrecognized")])+ .catch("unrecognized"),sourceId: z.string(),}).strict();diff --git a/packages/eve/src/client/client.test.ts b/packages/eve/src/client/client.test.tsindex 8c4ad455d..22163b1da 100644--- a/packages/eve/src/client/client.test.ts+++ b/packages/eve/src/client/client.test.ts@@ -265,6 +265,34 @@ describe("Client request policy", () => {expect(info.instrumentation?.logicalPath).toBe("instrumentation.ts");});+ it("marks legacy kernel effect options as unrecognized", async () => {+ vi.spyOn(globalThis, "fetch").mockResolvedValue(+ Response.json({+ ...AGENT_INFO,+ kernelEffects: [+ {+ action: "task-cancel",+ audience: ["root-session", "delegated-task-child"],+ kind: "background-task",+ sourceId: "tools/task.ts",+ },+ ],+ }),+ );+ const client = new Client({ host: "https://eve.test" });++ const info = await client.info();++ expect(info.kernelEffects).toEqual([+ {+ action: "unrecognized",+ audience: ["root-session", "unrecognized"],+ kind: "unrecognized",+ sourceId: "tools/task.ts",+ },+ ]);+ });+it("rejects unknown fields in the agent info payload", async () => {vi.spyOn(globalThis, "fetch").mockResolvedValue(Response.json({ ...AGENT_INFO, ignoredByClient: true }),