/** Exit codes for `vat skill test` (spec §6d). */ export declare const SkillTestExitCode: { readonly Ok: 0; readonly Internal: 1; readonly Preflight: 2; readonly Bootstrap: 3; /** * At least one eval FAILED. This is the DEFAULT verdict for a completed run * whose expectations did not all pass (fail-closed) — suppress it with the * interactive opt-out `--allow-eval-failure`. Distinct from the harness-broke * codes (1/2/3): the harness ran to completion and produced a valid * grading.json — the skill's expectations simply did not all pass. This * differentiation lets a CI consumer treat 4 as tolerable while still failing * closed on every other non-zero code: * `case $? in 0) ;; 4) tolerate/warn ;; *) hard fail ;; esac` * Returned DIRECTLY by the harness verdict (see verdictExitCode in * run-harness.ts), not via mapErrorToExitCode, because it is an outcome, not a * thrown error. */ readonly EvalFailure: 4; }; export type SkillTestExitCodeValue = (typeof SkillTestExitCode)[keyof typeof SkillTestExitCode]; /** * A required input is absent in a way vat can scaffold (missing evals.json). * Exit 3, NOT a failure. `expectedPath` is the persistent location of the * annotated starter template. * * In a real run the harness has already written that template, and the message * says so. Under `--dry-run` nothing is written — a dry run must never touch the * filesystem — so the message instead describes what a real run *would* scaffold * and where, while surfacing the same exit-3 "bootstrap needed" signal. */ export declare class BootstrapNeededError extends Error { readonly expectedPath: string; readonly exitCode: 3; constructor(expectedPath: string, opts?: { dryRun?: boolean; }); } /** Thrown when building a declared skill (pool packageSkill or plugin build) fails. Exit 2 (preflight class). */ export declare class SkillBuildError extends Error { readonly exitCode: 2; constructor(message: string); } /** * The §12 security acknowledgment is required but absent, thrown BEFORE any * build/pre-stage command (which executes untrusted repo code) runs for a * buildable subject. Exit 2 (preflight class). Mirrors the harness Step-6 ack * message wording so the two enforcement points read identically. */ export declare class SecurityAckError extends Error { readonly exitCode: 2; constructor(); } /** * A skill name is staged more than once in a single run — the subject, a * `--with` companion, and a `--with-optional` companion must all have distinct * names. Both `--with` and `--with-optional` STAGE the named companion and make * it invocable (issue #153: they differ only in required-vs-optional resolution, * not in whether they are staged), so a colliding name would silently overwrite * an earlier staged copy under the same slot — never an error, never a manifest * trace — which makes a routing/deferral eval look correct while testing * something else. Exit 2 (preflight class): user-correctable input, like a bad * env token or missing security ack. */ export declare class DuplicateStagedSkillError extends Error { readonly skillName: string; readonly exitCode: 2; constructor(skillName: string); } /** Internal harness failure (an executor/grader spawn error, watchdog timeout/stall, or a missing grader fragment). Exit 1. */ export declare class InternalHarnessError extends Error { readonly exitCode: 1; constructor(message: string); } /** * Map any thrown error to the process exit code. Errors that carry their own * `exitCode` (Bootstrap/Auth/HarnessLocation/Internal) are authoritative; * a PromptInvariantError is a defense-in-depth failure over VAT's OWN generated * executor/grader prompts (a required safety directive missing from a prompt VAT * built) — surfaced as a user-visible preflight-class problem → 2; a BuildHookError * is a pre-stage build failure → 2; a SkillBuildError is a declared-skill build * failure → 2; a SecurityAckError is a missing security ack before a build → 2; * an UnknownEnvTokenError is a bad ${token} in a * declared env value → 2; a DuplicateStagedSkillError is a staged-name collision * across subject/--with/--with-optional → 2; GradingSkewError (aggregate grading.json shape skew), * EvalFragmentError (per-eval grader fragment parse failure), and * GradingNonceError (forged/mismatched per-fragment grader nonce) are all → 1; * everything unknown → 1. * * Note: SkillTestExitCode.EvalFailure (4) is NOT produced here — it is an * outcome of a completed run (an eval failed, the fail-closed default unless * `--allow-eval-failure`), not a thrown error, so the harness returns it * directly (see verdictExitCode). */ export declare function mapErrorToExitCode(err: unknown): number; //# sourceMappingURL=exit-codes.d.ts.map