import { BaseReport } from "../contracts/result/base-report.type.mjs"; import { END } from "../contracts/end.type.mjs"; import { StandardSchemaV1 } from "@standard-schema/spec"; //#region ../ai/src/testing/matcher-logic.d.ts /** * Normalized matcher verdict — the library-agnostic shape every * matcher in this module returns. Vitest's `expect.extend` consumes * the same `{ pass, message }` contract, so the registration layer * forwards these verbatim. */ type MatcherVerdict = { /** Whether the assertion passed. */pass: boolean; /** Lazy message factory — Vitest calls it only when reporting. */ message: () => string; }; /** * Any unified result envelope a matcher can be handed. Accepts the * full `{ report, ... }` result or a bare `BaseReport` so callers can * assert against either `await x.execute()` or `result.report`. */ type ReportLike = BaseReport | { report: BaseReport; }; /** * Assert that a supervisor routed to (dispatched) the named intent at * least once across its iterations. Targets a `SupervisorResult` or a * `SupervisorReport`. * * @example * expect(await supervisor.execute(input)).toRouteTo("critic"); */ declare function matchRouteTo(received: ReportLike, intent: string): MatcherVerdict; /** * Assert that a supervisor converged — terminated on its own decision * (`router` / `route` / `evaluate` / `classifier`) with a * `"completed"` status, rather than hitting the iteration cap, being * cancelled, or erroring. Targets a `SupervisorResult` or * `SupervisorReport`. * * @example * expect(await supervisor.execute(input)).toConverge(); */ declare function matchConverge(received: ReportLike): MatcherVerdict; /** * Assert that a workflow step completed successfully. Targets a * `WorkflowResult` or `WorkflowReport`; looks the step up by name in * `report.steps` and checks its status is `"completed"`. * * @example * expect(await workflow.execute(input)).toPassStep("draft"); */ declare function matchPassStep(received: ReportLike, stepName: string): MatcherVerdict; /** * Result envelope carrying a typed `data` payload — what * `matchOutputShape` validates against a schema. */ type DataResult = { data?: unknown; }; /** * Assert that a result's `data` validates against a Standard Schema. * Targets any result envelope with a `data` field (agent / workflow / * supervisor). Runs the schema's `~standard.validate` and passes only * when it reports no issues. * * Synchronous-only: a schema whose `validate` returns a Promise is * rejected with a clear message rather than silently passing — the * async variant belongs on a dedicated async matcher if needed. * * @example * expect(await agent.execute(input, { output: schema })).toOutputShape(schema); */ declare function matchOutputShape(received: DataResult, schema: StandardSchemaV1): MatcherVerdict; //#endregion export { MatcherVerdict, matchConverge, matchOutputShape, matchPassStep, matchRouteTo }; //# sourceMappingURL=matcher-logic.d.mts.map