export type SurfaceKind = "skill" | "agent" | "hook"; /** The cheapest meaningful tier for a surface kind (mirrors the test-harness skill). */ export type TestTier = "unit" | "harness" | "eval"; /** One field of a subagent's `result()` contract, parsed from its compiled `.md`. */ export interface ContractField { readonly name: string; /** The `OutputFieldType` literal: `"string" | "number" | "boolean" | "string[]"`. */ readonly type: string; } /** * A subagent's typed `result(ok, err)` outcome contract — the typed-spec payoff * the generator turns into a real `assertAgentOk` test (no LLM judge). Parsed from * the `vigiles:ok` / `vigiles:err` blocks the compiler emits into the agent `.md`. */ export interface ResultContract { readonly ok: readonly ContractField[]; readonly err: readonly ContractField[]; } /** What the generator needs to know about a surface to scaffold its test. */ export interface ScaffoldInput { readonly kind: SurfaceKind; /** Skill dir name / agent name / hook-script basename. */ readonly name: string; /** Extension to write, from `core/test-file-ext.ts`. Defaults to `mjs`, so a * caller written before TypeScript support keeps its behaviour byte for byte. */ readonly ext?: string; /** Repo-relative path to the surface (SKILL.md / agent .md / hook script). */ readonly path: string; /** Plugin name for the namespaced skill id; a placeholder TODO when unknown. */ readonly pluginName?: string; /** A user-invoked skill — trigger-rate is for model-invocable skills, so note it. */ readonly userInvoked?: boolean; /** A subagent's declared tool contract (drives the assertion hint); null = inherits all. */ readonly tools?: readonly string[] | null; /** * The side-effecting tools in the contract (`effectSurface(tools).sideEffecting`, * computed by the CLI with the resolved dialect — kept harness-agnostic here). A * non-empty list drives a generated SAFETY check: the agent's "hole" is mocked/denied * and asserted to stay in its lane — the typed `tools` contract writing its own test. */ readonly sideEffectingTools?: readonly string[]; /** * The subagent's `result()` contract parsed from its compiled `.md`. Present → * the generator emits a deterministic `assertAgentOk` outcome test (no LLM judge); * the single most-concrete "the typed spec wrote your test" payoff. */ readonly resultContract?: ResultContract | null; /** How the CLI invokes the hook (e.g. `bash hooks/pre-edit.sh`); a TODO when unknown. */ readonly hookCommand?: string; } export interface Scaffold { readonly path: string; readonly content: string; readonly kind: SurfaceKind; readonly tier: TestTier; } /** Scaffold a starter test for one surface. Pure: path + content, no I/O. */ export declare function scaffoldTest(input: ScaffoldInput): Scaffold; /** Render a set of scaffolds for the CLI (what was generated, where, which tier). */ export declare function formatScaffolds(scaffolds: readonly Scaffold[]): string; //# sourceMappingURL=scaffold-test.d.ts.map