Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

872 B
Raw Blame
import { defineEval } from "eve/evals";

// The action.result must carry the structured object (not a JSON
// string), and the fixture's tool-result-narrowing hook matches it via
// toolResultFrom: a symbol-identity miss throws inside the hook, which
// surfaces as turn.failed and trips the succeeded check.
export default defineEval({
  tags: ["real-model"],
  description: "Static tools smoke: structured tool-result narrowing via toolResultFrom.",
  async test(t) {
    await t.send(
      'Call the `structured-echo` tool with label "smoke-test". Reply with the echoed value verbatim.',
    );

    t.succeeded();
    t.calledTool("structured-echo", {
      output: (value: unknown) =>
        typeof value === "object" &&
        value !== null &&
        !Array.isArray(value) &&
        (value as Record<string, unknown>).echoed === "smoke-test",
    });
  },
});