/** * Run-artifact contract for the grounded single-run ledger (mmnto-ai/totem#2100, * strategy#474 slice 1). * * The artifact is the immutable bridge between the deterministic substrate and * non-deterministic LLM execution: a verifiable, offline record of exactly what * was sent (post-DLP — the MASKED prompt, never raw) and what came back. * Everything downstream (post-checks #2103, panel synthesis #2104, the Phase-2 * disposition ledger) consumes this shape, so it stays minimal but versioned. * * Schema-evolution policy (strategy review F1 on the #2100 design, 0253Z * dispatch): the reader is version-tolerant WITHIN the major — * - `schemaVersion` validates as `1.x` (never a literal pin), * - every post-1.0.0 field must be additive-optional, * - a MAJOR bump requires a migration entry in the loader before the writer * ships (`loadRunArtifact`'s migration-on-read registry). * Hard-reject only unknown majors. Rationale: an append-only ledger whose * reader rejects its own history isn't append-only in practice — a literal pin * would orphan the accumulated eval-fixture corpus at #2101's first bump. * * Zod here is a system boundary (persisted JSON read back from disk), per the * repo's Zod-at-boundaries-only rule. */ import { z } from 'zod'; /** * The schemaVersion WRITTEN by this code. Readers accept any 1.x (F1). * 1.3.0 (mmnto-ai/totem#2700): `grounding` gained the optional `anchor` + * `floor`, bundle items the optional `relevance` (which enters * `grounding.hash`), `runMetadata` the optional `promptSource`. * 1.2.0 (mmnto-ai/totem#2452): `output` gained optional execution-attempt * evidence for fallback/configured-shell provenance. 1.1.0 * (mmnto-ai/totem#2101): `grounding` gained the optional per-item * `bundle`, and `grounding.hash` semantics changed from hash-of-raw-context * to hash-of-bundle — the minor is the observable marker for that meaning * change; the registry stays empty because the tolerant reader parses both. */ export declare const RUN_ARTIFACT_SCHEMA_VERSION = "1.3.0"; /** * Schema version for the distinct terminal-invocation failure ledger. The * exact 1.0.0 literal is deliberate fail-closed behavior: before accepting a * future version, add an explicit versioned union and migration path rather * than widening this schema in place. */ export declare const INVOCATION_FAILURE_ARTIFACT_SCHEMA_VERSION = "1.0.0"; /** Persisted evidence bounds (mmnto-ai/totem#2452 slice B). */ export declare const MAX_INVOKE_ATTEMPTS = 8; export declare const INVOKE_STREAM_EVIDENCE_LIMIT_BYTES: number; export declare const INVOKE_MESSAGE_EVIDENCE_LIMIT_BYTES: number; /** Stable machine-readable failure taxonomy shared by CLI producers and artifact readers. */ export declare const INVOKE_FAILURE_KINDS: readonly ["auth", "quota", "model", "process-spawn", "process-exit", "timeout", "unknown"]; /** Persisted provider codes are bounded identifiers, never arbitrary provider prose. */ export declare const SAFE_PROVIDER_CODE_RE: RegExp; export declare const InvokeFailureKindSchema: z.ZodEnum<["auth", "quota", "model", "process-spawn", "process-exit", "timeout", "unknown"]>; /** The major this reader understands; other majors need a migration entry. */ export declare const RUN_ARTIFACT_KNOWN_MAJOR = 1; /** * Canonical provenance classes (mmnto-ai/totem#2101, strategy#474 items 1+7). * `similarity-only` is the honest class for today's retrieval; the others are * reserved for graduation — `structurally-verified` lands via mmnto-ai/totem#344/#375 * resolvers, `spec-contract`/`compiled-rule` via their respective delivery * paths. Schema-level validation stays an open string (extensible without a * major — the same reasoning that kept slice 1's `provenanceSummary` free). * * Fail-safe-down rider (strategy review F2 on mmnto-ai/totem#2101): every consumer * (summaries, eval thresholds, future conformance sensing) must treat a * non-canonical class string as NOT-upgraded — lowest trust — so an invented * class can never confer trust absent code-side graduation. Safe today * because classes are builder-emitted constants, never model-supplied; the * enforcement test rides mmnto-ai/totem#2103. */ export declare const PROVENANCE_SIMILARITY_ONLY = "similarity-only"; export declare const PROVENANCE_STRUCTURALLY_VERIFIED = "structurally-verified"; export declare const PROVENANCE_SPEC_CONTRACT = "spec-contract"; export declare const PROVENANCE_COMPILED_RULE = "compiled-rule"; export declare const PROVENANCE_CLASSES: readonly ["similarity-only", "structurally-verified", "spec-contract", "compiled-rule"]; /** * `provenanceSummary` for a bundle with zero items: the run was UNGROUNDED — * abstention named epistemically (what the absence means), not mechanically * ("empty"). Honest-absent: a degraded run says so in its own record. */ export declare const PROVENANCE_UNGROUNDED = "ungrounded"; /** * What the run was ANCHORED on (mmnto-ai/totem#2700). A closed vocabulary — * these four strings are the single spelling shared by the writer, the strict * pre-commit evidence reader and the artifact verbs, so a gate and a producer * can never disagree about the word. * * `issue` — every resolved input was an issue; `record` — a hand-authored * design record bound with `--from` (the only kind carrying a `sha256`); * `free-text` — every input was a topic; `mixed` — issues AND topics together. * `mixed` is the honest fourth kind, NOT evidence: its free-text half is the * confabulation surface. */ export declare const GROUNDING_ANCHOR_ISSUE = "issue"; export declare const GROUNDING_ANCHOR_RECORD = "record"; export declare const GROUNDING_ANCHOR_FREE_TEXT = "free-text"; export declare const GROUNDING_ANCHOR_MIXED = "mixed"; export declare const GROUNDING_ANCHOR_KINDS: readonly ["issue", "record", "free-text", "mixed"]; /** * Which system prompt drafted the output (mmnto-ai/totem#2700). Closed * vocabulary, derived at the writer (`getSystemPrompt(...) === SYSTEM_PROMPT` * → `builtin`, read BEFORE the code-blind directive is folded in). The CLI's * `spec` command sets it and the strict pre-commit reader chooses the TEMPLATE * or the DOCUMENT shape on it. */ export declare const PROMPT_SOURCE_BUILTIN = "builtin"; export declare const PROMPT_SOURCE_OVERRIDE = "override"; export declare const PROMPT_SOURCES: readonly ["builtin", "override"]; /** * Slice-1 admission class for both migrated callers (spec + review): factually * completion-only today. #2102 (backend admission contract) changes who * supplies the value, not the field. Day-one self-description, same retrofit * argument as provenance. */ export declare const ADMISSION_COMPLETION_ONLY: "completion_only"; /** * Elevated admission class (mmnto-ai/totem#2102, strategy#474 slice 3): the * backend is admitted to ground itself (agentic retrieval/tool use) rather * than complete over caller-delivered context. Requestable only when declared * in `orchestrator.capabilities.admissionClasses` — the admission gate in * `runOrchestrator` fails loud pre-invoke otherwise. */ export declare const ADMISSION_SELF_GROUNDING_AGENT: "self_grounding_agent"; /** * Closed two-value enum this slice — single source of truth for both * `BackendSchema.admissionClass` and the config-side capability declaration * (`orchestrator.capabilities.admissionClasses`); a parallel definition is * the drift vector the #1429 model-validation review named. */ export declare const ADMISSION_CLASSES: readonly ["completion_only", "self_grounding_agent"]; /** * The assembled prompt inputs, POST-DLP. `maskedPrompt`/`maskedSystemPrompt` * are what actually crossed the wire (`maskSecrets` output) — recording the * raw prompt would persist secrets to disk. */ export declare const InputBundleSchema: z.ZodObject<{ maskedPrompt: z.ZodString; maskedSystemPrompt: z.ZodOptional; /** Deterministic diff input when the caller ran with a forced scope (#2098). */ diffScope: z.ZodOptional; /** The grounded spec contract, when present (review sensing against a spec doc). */ specContract: z.ZodOptional; }, "strip", z.ZodTypeAny, { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }, { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }>; /** * One delivered evidence item (mmnto-ai/totem#2101): identity + content hash * + provenance class. NO content bytes — `inputBundle.maskedPrompt` already * carries the bytes once; duplicating them bloats every artifact and creates * a second DLP surface. Identity fields are required: fabricated or absent * identity is the illusion-of-grounding trap the bundle exists to close. */ export declare const GroundingItemSchema: z.ZodObject<{ /** Provenance class — open vocabulary, canonical values in {@link PROVENANCE_CLASSES}; consumers fail-safe-down on unknown strings (F2). */ provenance: z.ZodString; /** Deterministic hash of the delivered snippet content (identity, not bytes). */ contentHash: z.ZodString; /** Retrieval partition the item entered the prompt under (`spec` | `session_log` | `code` | `lesson`). */ sourceType: z.ZodString; /** Path relative to the owning repo root — display + structural-resolution identity. */ filePath: z.ZodString; /** Linked-index name for cross-repo hits; ABSENT = the run's own repo (F1) — post-checks resolve `filePath` against the run's config root when absent. */ sourceRepo: z.ZodOptional; /** * The vector-leg relevance from `relevanceFromDistance(VECTOR_DISTANCE_METRIC, * _distance)`; on unit-norm vectors under `l2` it lies in [0.2, 1]; the schema * bounds it to [0, 1] and the bundle omits a value outside it * (mmnto-ai/totem#2700, metric-bound in mmnto-ai/totem#2738). ABSENT in two * cases: the hit had no vector leg (FTS-only), or its vector relevance was * non-finite or outside [0, 1] and `buildGroundingBundle` omitted it rather * than clamp a fault into a plausible number. The artifact does not tell the * two apart; the run's floor does — `evaluateGroundingFloor` (cli `spec.ts`) * sees the raw hit, treats the FTS-only absence as floor-EXEMPT (one such hit * saves a run) and the faulted value as neither signal nor exemption (it can * never save a run, and a run whose hits are all faulted refuses). "No * signal" stays distinguishable from "weak signal" * (mmnto-ai/totem#2463 / mmnto-ai/totem#2494), so absence is the disclosure, * never a zero. Identical bytes across stores need not give identical * relevance (a linked store embeds with its own embedder), which is why the * value lives on the item rather than in a hash-keyed map. */ relevance: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }>; /** * The per-item grounding record. No stored summary/count fields — counts are * derived by `summarizeProvenance` (derive-or-couple: a stored mirror can * drift from `items`). */ export declare const GroundingBundleSchema: z.ZodObject<{ items: z.ZodArray; /** * The vector-leg relevance from `relevanceFromDistance(VECTOR_DISTANCE_METRIC, * _distance)`; on unit-norm vectors under `l2` it lies in [0.2, 1]; the schema * bounds it to [0, 1] and the bundle omits a value outside it * (mmnto-ai/totem#2700, metric-bound in mmnto-ai/totem#2738). ABSENT in two * cases: the hit had no vector leg (FTS-only), or its vector relevance was * non-finite or outside [0, 1] and `buildGroundingBundle` omitted it rather * than clamp a fault into a plausible number. The artifact does not tell the * two apart; the run's floor does — `evaluateGroundingFloor` (cli `spec.ts`) * sees the raw hit, treats the FTS-only absence as floor-EXEMPT (one such hit * saves a run) and the faulted value as neither signal nor exemption (it can * never save a run, and a run whose hits are all faulted refuses). "No * signal" stays distinguishable from "weak signal" * (mmnto-ai/totem#2463 / mmnto-ai/totem#2494), so absence is the disclosure, * never a zero. Identical bytes across stores need not give identical * relevance (a linked store embeds with its own embedder), which is why the * value lives on the item rather than in a hash-keyed map. */ relevance: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }>; export declare const GroundingAnchorSchema: z.ZodEffects; /** `#` / the input as typed for a URL or `owner/repo#N` (comma-joined for several); the repo-relative record path for `record`; the topic text for `free-text`. Never carries a control character — it is echoed by the pre-commit hook. */ ref: z.ZodEffects, string, string>; /** sha256 of the bound record's bytes — `record` anchors only. */ sha256: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>; /** What KIND of grounding the run had — day-one field, never retrofittable. */ export declare const GroundingSchema: z.ZodObject<{ /** * Deterministic hash of the grounding surface. From 1.1.0 this is * `calculateDeterministicHash(bundle)` over the canonically SORTED items — * sorted BECAUSE the hash is order-significant for arrays (the sort key * `sourceType, sourceRepo, filePath, contentHash` is unchanged). The * verifier recomputes it from the artifact surface ALONE (one enumeration, * two readers) — an invariant mmnto-ai/totem#2700 leaves untouched. Each * item's `relevance` is part of the item, so it ENTERS this hash; `anchor` * and `floor` sit BESIDE the bundle and do NOT (they enter the artifact's * content address like every other field, as `output.metrics.durationMs` * already does). Slice-1 artifacts (no `bundle`) carry their original * hash-of-raw-context, which is self-consistent but not recomputable * offline. */ hash: z.ZodString; /** Derived from the bundle since 1.1.0 (sorted class counts, or `ungrounded`); wholesale string in slice-1 artifacts. */ provenanceSummary: z.ZodString; /** Per-item provenance record (mmnto-ai/totem#2101). Optional: slice-1 artifacts predate it and cannot be re-classed. */ bundle: z.ZodOptional; /** * The vector-leg relevance from `relevanceFromDistance(VECTOR_DISTANCE_METRIC, * _distance)`; on unit-norm vectors under `l2` it lies in [0.2, 1]; the schema * bounds it to [0, 1] and the bundle omits a value outside it * (mmnto-ai/totem#2700, metric-bound in mmnto-ai/totem#2738). ABSENT in two * cases: the hit had no vector leg (FTS-only), or its vector relevance was * non-finite or outside [0, 1] and `buildGroundingBundle` omitted it rather * than clamp a fault into a plausible number. The artifact does not tell the * two apart; the run's floor does — `evaluateGroundingFloor` (cli `spec.ts`) * sees the raw hit, treats the FTS-only absence as floor-EXEMPT (one such hit * saves a run) and the faulted value as neither signal nor exemption (it can * never save a run, and a run whose hits are all faulted refuses). "No * signal" stays distinguishable from "weak signal" * (mmnto-ai/totem#2463 / mmnto-ai/totem#2494), so absence is the disclosure, * never a zero. Identical bytes across stores need not give identical * relevance (a linked store embeds with its own embedder), which is why the * value lives on the item rather than in a hash-keyed map. */ relevance: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }>>; /** What the run was anchored on (mmnto-ai/totem#2700). Optional: artifacts written before the anchored-evidence rule predate it, and the gate reads that absence as not-evidence. */ anchor: z.ZodOptional; /** `#` / the input as typed for a URL or `owner/repo#N` (comma-joined for several); the repo-relative record path for `record`; the topic text for `free-text`. Never carries a control character — it is echoed by the pre-commit hook. */ ref: z.ZodEffects, string, string>; /** sha256 of the bound record's bytes — `record` anchors only. */ sha256: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>>; /** The relevance floor the run was judged against (`searchRelevanceFloor`) — a number when one was configured, ABSENT when none was (since mmnto-ai/totem#2727 the key carries no default, and unset means no floor). */ floor: z.ZodOptional; }, "strip", z.ZodTypeAny, { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }, { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }>; /** Backend identity as RESOLVED (post quota-fallback), not as requested. */ export declare const BackendSchema: z.ZodObject<{ provider: z.ZodString; model: z.ZodString; /** The full provider-qualified string telemetry/cache key on (`provider:model`). */ qualifiedModel: z.ZodString; admissionClass: z.ZodEnum<["completion_only", "self_grounding_agent"]>; /** The command tag the run served (`Spec`, `Review`, ...) — the task profile. */ taskProfile: z.ZodString; temperature: z.ZodOptional; }, "strip", z.ZodTypeAny, { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }, { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }>; /** * A byte-bounded, post-DLP text fragment safe to persist. `head` and optional * `tail` preserve both structured envelopes and terminal diagnostics without * retaining an unbounded provider response. */ export declare const BoundedTextEvidenceSchema: z.ZodEffects; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>; /** Process-level facts captured by configured-shell and CLI-fallback routes. */ export declare const InvokeProcessEvidenceSchema: z.ZodEffects; signal: z.ZodNullable; timedOut: z.ZodBoolean; timeoutMs: z.ZodOptional; stdout: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; stderr: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>; /** One ordered invocation leg, retained after DLP and byte bounding. */ export declare const InvokeAttemptEvidenceSchema: z.ZodEffects; provider: z.ZodString; model: z.ZodString; status: z.ZodEnum<["succeeded", "failed"]>; durationMs: z.ZodNumber; failureKind: z.ZodOptional>; providerStatus: z.ZodOptional; providerCode: z.ZodOptional; process: z.ZodOptional; signal: z.ZodNullable; timedOut: z.ZodBoolean; timeoutMs: z.ZodOptional; stdout: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; stderr: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>>; }, "strip", z.ZodTypeAny, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>; export declare const RunExecutionEvidenceSchema: z.ZodEffects; provider: z.ZodString; model: z.ZodString; status: z.ZodEnum<["succeeded", "failed"]>; durationMs: z.ZodNumber; failureKind: z.ZodOptional>; providerStatus: z.ZodOptional; providerCode: z.ZodOptional; process: z.ZodOptional; signal: z.ZodNullable; timedOut: z.ZodBoolean; timeoutMs: z.ZodOptional; stdout: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; stderr: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>>; }, "strip", z.ZodTypeAny, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, "many">, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[], { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]>; }, "strip", z.ZodTypeAny, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }>, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }>; /** * Caller-declared output contract (mmnto-ai/totem#2102): the citations-or- * `VERIFY:` declaration. Callers write; #2103 post-checks read; providers * transport, never enforce (Totem is not zero-user — backend cooperation is * never assumed, enforcement is caller-side post-invocation). Closed object: * extensible by additive optional fields, not an index signature. */ export declare const OutputContractSchema: z.ZodObject<{ /** Response claims must carry citations into the delivered grounding. */ citationsRequired: z.ZodOptional; /** Whether an explicit `VERIFY:` escalation is an acceptable fallback for an uncitable claim. */ verifyFallback: z.ZodOptional; /** JSON-Schema definition for structured output. */ schema: z.ZodOptional>; }, "strip", z.ZodTypeAny, { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; }, { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; }>; /** * Caller-declared context policy (mmnto-ai/totem#2102). Advisory this slice — * recorded for honesty, enforced by nothing yet — but validated so * declared-not-enforced never means accepting nonsense. */ export declare const ContextPolicySchema: z.ZodObject<{ /** Advisory context budget. Unit: INPUT TOKENS. */ budget: z.ZodOptional; }, "strip", z.ZodTypeAny, { budget?: number | undefined; }, { budget?: number | undefined; }>; /** * Caller identity metadata (mmnto-ai/totem#2102, the #2100 runMetadata * target) — recorded verbatim into the artifact. */ export declare const RunMetadataSchema: z.ZodObject<{ /** The command/module that issued the run (e.g. `spec`, `review`). */ caller: z.ZodOptional; /** The CLI command identity the run served, when distinct from `caller`. */ command: z.ZodOptional; /** * Whether the code-blind grounding guard fired for this run (mmnto-ai/totem#2106): * zero code chunks were retrieved, so the prompt carried the suppression * directive and the output is degraded/caveated. Recorded so run artifacts * (eval fixtures, #2100) are filterable by guard activation without * recomputing `code.length === 0` from the grounding bundle. */ codeBlind: z.ZodOptional; /** * Which system prompt drafted the output (mmnto-ai/totem#2700): `builtin` * when `getSystemPrompt(...) === SYSTEM_PROMPT`, `override` otherwise — * derived at the writer, read BEFORE the code-blind directive is folded in. * The strict evidence reader chooses the TEMPLATE vs DOCUMENT shape on it: * a draft written under a custom prompt cannot be held to the built-in * template's headings. Absent on pre-existing artifacts (which block on the * missing anchor first, so the shape choice is never reached for them). */ promptSource: z.ZodOptional>; }, "strip", z.ZodTypeAny, { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; }, { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; }>; /** * Token counts mirror `OrchestratorResult`: `null` means the provider did not * report (honest-absent), distinct from the field being absent entirely. */ export declare const RunMetricsSchema: z.ZodObject<{ inputTokens: z.ZodOptional>; outputTokens: z.ZodOptional>; cacheReadInputTokens: z.ZodOptional>; durationMs: z.ZodNumber; finishReason: z.ZodOptional; }, "strip", z.ZodTypeAny, { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }, { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }>; /** * Terminal invocation evidence is deliberately NOT a RunArtifact: it has no * successful semantic output and lives under `artifacts/runs/failures/`. */ export declare const InvocationFailureArtifactSchema: z.ZodEffects; inputBundle: z.ZodObject<{ maskedPrompt: z.ZodString; maskedSystemPrompt: z.ZodOptional; /** Deterministic diff input when the caller ran with a forced scope (#2098). */ diffScope: z.ZodOptional; /** The grounded spec contract, when present (review sensing against a spec doc). */ specContract: z.ZodOptional; }, "strip", z.ZodTypeAny, { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }, { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }>; inputHash: z.ZodString; grounding: z.ZodObject<{ /** * Deterministic hash of the grounding surface. From 1.1.0 this is * `calculateDeterministicHash(bundle)` over the canonically SORTED items — * sorted BECAUSE the hash is order-significant for arrays (the sort key * `sourceType, sourceRepo, filePath, contentHash` is unchanged). The * verifier recomputes it from the artifact surface ALONE (one enumeration, * two readers) — an invariant mmnto-ai/totem#2700 leaves untouched. Each * item's `relevance` is part of the item, so it ENTERS this hash; `anchor` * and `floor` sit BESIDE the bundle and do NOT (they enter the artifact's * content address like every other field, as `output.metrics.durationMs` * already does). Slice-1 artifacts (no `bundle`) carry their original * hash-of-raw-context, which is self-consistent but not recomputable * offline. */ hash: z.ZodString; /** Derived from the bundle since 1.1.0 (sorted class counts, or `ungrounded`); wholesale string in slice-1 artifacts. */ provenanceSummary: z.ZodString; /** Per-item provenance record (mmnto-ai/totem#2101). Optional: slice-1 artifacts predate it and cannot be re-classed. */ bundle: z.ZodOptional; /** * The vector-leg relevance from `relevanceFromDistance(VECTOR_DISTANCE_METRIC, * _distance)`; on unit-norm vectors under `l2` it lies in [0.2, 1]; the schema * bounds it to [0, 1] and the bundle omits a value outside it * (mmnto-ai/totem#2700, metric-bound in mmnto-ai/totem#2738). ABSENT in two * cases: the hit had no vector leg (FTS-only), or its vector relevance was * non-finite or outside [0, 1] and `buildGroundingBundle` omitted it rather * than clamp a fault into a plausible number. The artifact does not tell the * two apart; the run's floor does — `evaluateGroundingFloor` (cli `spec.ts`) * sees the raw hit, treats the FTS-only absence as floor-EXEMPT (one such hit * saves a run) and the faulted value as neither signal nor exemption (it can * never save a run, and a run whose hits are all faulted refuses). "No * signal" stays distinguishable from "weak signal" * (mmnto-ai/totem#2463 / mmnto-ai/totem#2494), so absence is the disclosure, * never a zero. Identical bytes across stores need not give identical * relevance (a linked store embeds with its own embedder), which is why the * value lives on the item rather than in a hash-keyed map. */ relevance: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }>>; /** What the run was anchored on (mmnto-ai/totem#2700). Optional: artifacts written before the anchored-evidence rule predate it, and the gate reads that absence as not-evidence. */ anchor: z.ZodOptional; /** `#` / the input as typed for a URL or `owner/repo#N` (comma-joined for several); the repo-relative record path for `record`; the topic text for `free-text`. Never carries a control character — it is echoed by the pre-commit hook. */ ref: z.ZodEffects, string, string>; /** sha256 of the bound record's bytes — `record` anchors only. */ sha256: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>>; /** The relevance floor the run was judged against (`searchRelevanceFloor`) — a number when one was configured, ABSENT when none was (since mmnto-ai/totem#2727 the key carries no default, and unset means no floor). */ floor: z.ZodOptional; }, "strip", z.ZodTypeAny, { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }, { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }>; requestedBackend: z.ZodObject<{ provider: z.ZodString; model: z.ZodString; /** The full provider-qualified string telemetry/cache key on (`provider:model`). */ qualifiedModel: z.ZodString; admissionClass: z.ZodEnum<["completion_only", "self_grounding_agent"]>; /** The command tag the run served (`Spec`, `Review`, ...) — the task profile. */ taskProfile: z.ZodString; temperature: z.ZodOptional; }, "strip", z.ZodTypeAny, { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }, { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }>; attempts: z.ZodEffects; provider: z.ZodString; model: z.ZodString; status: z.ZodEnum<["succeeded", "failed"]>; durationMs: z.ZodNumber; failureKind: z.ZodOptional>; providerStatus: z.ZodOptional; providerCode: z.ZodOptional; process: z.ZodOptional; signal: z.ZodNullable; timedOut: z.ZodBoolean; timeoutMs: z.ZodOptional; stdout: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; stderr: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>>; }, "strip", z.ZodTypeAny, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, "many">, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[], { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]>; terminal: z.ZodObject<{ kind: z.ZodEnum<["auth", "quota", "model", "process-spawn", "process-exit", "timeout", "unknown"]>; attempt: z.ZodNumber; message: z.ZodEffects; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>; }, "strip", z.ZodTypeAny, { message: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }; kind: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout"; attempt: number; }, { message: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }; kind: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout"; attempt: number; }>; admission: z.ZodOptional; /** Whether an explicit `VERIFY:` escalation is an acceptable fallback for an uncitable claim. */ verifyFallback: z.ZodOptional; /** JSON-Schema definition for structured output. */ schema: z.ZodOptional>; }, "strip", z.ZodTypeAny, { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; }, { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; }>>; contextPolicy: z.ZodOptional; }, "strip", z.ZodTypeAny, { budget?: number | undefined; }, { budget?: number | undefined; }>>; runMetadata: z.ZodOptional; /** The CLI command identity the run served, when distinct from `caller`. */ command: z.ZodOptional; /** * Whether the code-blind grounding guard fired for this run (mmnto-ai/totem#2106): * zero code chunks were retrieved, so the prompt carried the suppression * directive and the output is degraded/caveated. Recorded so run artifacts * (eval fixtures, #2100) are filterable by guard activation without * recomputing `code.length === 0` from the grounding bundle. */ codeBlind: z.ZodOptional; /** * Which system prompt drafted the output (mmnto-ai/totem#2700): `builtin` * when `getSystemPrompt(...) === SYSTEM_PROMPT`, `override` otherwise — * derived at the writer, read BEFORE the code-blind directive is folded in. * The strict evidence reader chooses the TEMPLATE vs DOCUMENT shape on it: * a draft written under a custom prompt cannot be held to the built-in * template's headings. Absent on pre-existing artifacts (which block on the * missing anchor first, so the shape choice is never reached for them). */ promptSource: z.ZodOptional>; }, "strip", z.ZodTypeAny, { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; }, { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; }>>; }, "strip", z.ZodTypeAny, { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; }, { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; }>>; createdAt: z.ZodString; }, "strip", z.ZodTypeAny, { createdAt: string; attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; schemaVersion: "1.0.0"; inputBundle: { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }; inputHash: string; grounding: { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }; requestedBackend: { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }; terminal: { message: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }; kind: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout"; attempt: number; }; admission?: { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; } | undefined; }, { createdAt: string; attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; schemaVersion: "1.0.0"; inputBundle: { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }; inputHash: string; grounding: { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }; requestedBackend: { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }; terminal: { message: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }; kind: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout"; attempt: number; }; admission?: { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; } | undefined; }>, { createdAt: string; attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; schemaVersion: "1.0.0"; inputBundle: { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }; inputHash: string; grounding: { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }; requestedBackend: { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }; terminal: { message: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }; kind: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout"; attempt: number; }; admission?: { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; } | undefined; }, { createdAt: string; attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; schemaVersion: "1.0.0"; inputBundle: { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }; inputHash: string; grounding: { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }; requestedBackend: { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }; terminal: { message: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }; kind: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout"; attempt: number; }; admission?: { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; } | undefined; }>; export declare const RunArtifactSchema: z.ZodObject<{ schemaVersion: z.ZodEffects; inputBundle: z.ZodObject<{ maskedPrompt: z.ZodString; maskedSystemPrompt: z.ZodOptional; /** Deterministic diff input when the caller ran with a forced scope (#2098). */ diffScope: z.ZodOptional; /** The grounded spec contract, when present (review sensing against a spec doc). */ specContract: z.ZodOptional; }, "strip", z.ZodTypeAny, { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }, { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }>; /** Deterministic hash of `inputBundle` alone — the rerun identity. */ inputHash: z.ZodString; grounding: z.ZodObject<{ /** * Deterministic hash of the grounding surface. From 1.1.0 this is * `calculateDeterministicHash(bundle)` over the canonically SORTED items — * sorted BECAUSE the hash is order-significant for arrays (the sort key * `sourceType, sourceRepo, filePath, contentHash` is unchanged). The * verifier recomputes it from the artifact surface ALONE (one enumeration, * two readers) — an invariant mmnto-ai/totem#2700 leaves untouched. Each * item's `relevance` is part of the item, so it ENTERS this hash; `anchor` * and `floor` sit BESIDE the bundle and do NOT (they enter the artifact's * content address like every other field, as `output.metrics.durationMs` * already does). Slice-1 artifacts (no `bundle`) carry their original * hash-of-raw-context, which is self-consistent but not recomputable * offline. */ hash: z.ZodString; /** Derived from the bundle since 1.1.0 (sorted class counts, or `ungrounded`); wholesale string in slice-1 artifacts. */ provenanceSummary: z.ZodString; /** Per-item provenance record (mmnto-ai/totem#2101). Optional: slice-1 artifacts predate it and cannot be re-classed. */ bundle: z.ZodOptional; /** * The vector-leg relevance from `relevanceFromDistance(VECTOR_DISTANCE_METRIC, * _distance)`; on unit-norm vectors under `l2` it lies in [0.2, 1]; the schema * bounds it to [0, 1] and the bundle omits a value outside it * (mmnto-ai/totem#2700, metric-bound in mmnto-ai/totem#2738). ABSENT in two * cases: the hit had no vector leg (FTS-only), or its vector relevance was * non-finite or outside [0, 1] and `buildGroundingBundle` omitted it rather * than clamp a fault into a plausible number. The artifact does not tell the * two apart; the run's floor does — `evaluateGroundingFloor` (cli `spec.ts`) * sees the raw hit, treats the FTS-only absence as floor-EXEMPT (one such hit * saves a run) and the faulted value as neither signal nor exemption (it can * never save a run, and a run whose hits are all faulted refuses). "No * signal" stays distinguishable from "weak signal" * (mmnto-ai/totem#2463 / mmnto-ai/totem#2494), so absence is the disclosure, * never a zero. Identical bytes across stores need not give identical * relevance (a linked store embeds with its own embedder), which is why the * value lives on the item rather than in a hash-keyed map. */ relevance: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }, { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }, { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; }>>; /** What the run was anchored on (mmnto-ai/totem#2700). Optional: artifacts written before the anchored-evidence rule predate it, and the gate reads that absence as not-evidence. */ anchor: z.ZodOptional; /** `#` / the input as typed for a URL or `owner/repo#N` (comma-joined for several); the repo-relative record path for `record`; the topic text for `free-text`. Never carries a control character — it is echoed by the pre-commit hook. */ ref: z.ZodEffects, string, string>; /** sha256 of the bound record's bytes — `record` anchors only. */ sha256: z.ZodOptional; }, "strip", z.ZodTypeAny, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }, { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; }>>; /** The relevance floor the run was judged against (`searchRelevanceFloor`) — a number when one was configured, ABSENT when none was (since mmnto-ai/totem#2727 the key carries no default, and unset means no floor). */ floor: z.ZodOptional; }, "strip", z.ZodTypeAny, { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }, { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }>; backend: z.ZodObject<{ provider: z.ZodString; model: z.ZodString; /** The full provider-qualified string telemetry/cache key on (`provider:model`). */ qualifiedModel: z.ZodString; admissionClass: z.ZodEnum<["completion_only", "self_grounding_agent"]>; /** The command tag the run served (`Spec`, `Review`, ...) — the task profile. */ taskProfile: z.ZodString; temperature: z.ZodOptional; }, "strip", z.ZodTypeAny, { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }, { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }>; output: z.ZodObject<{ content: z.ZodString; metrics: z.ZodObject<{ inputTokens: z.ZodOptional>; outputTokens: z.ZodOptional>; cacheReadInputTokens: z.ZodOptional>; durationMs: z.ZodNumber; finishReason: z.ZodOptional; }, "strip", z.ZodTypeAny, { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }, { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }>; /** Additive 1.2 execution provenance; absent on ordinary one-shot SDK success. */ execution: z.ZodOptional; provider: z.ZodString; model: z.ZodString; status: z.ZodEnum<["succeeded", "failed"]>; durationMs: z.ZodNumber; failureKind: z.ZodOptional>; providerStatus: z.ZodOptional; providerCode: z.ZodOptional; process: z.ZodOptional; signal: z.ZodNullable; timedOut: z.ZodBoolean; timeoutMs: z.ZodOptional; stdout: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; stderr: z.ZodOptional; head: z.ZodString; tail: z.ZodOptional; observedBytes: z.ZodNumber; retainedBytes: z.ZodNumber; limitBytes: z.ZodNumber; truncated: z.ZodBoolean; dlp: z.ZodEnum<["masked", "omitted-on-mask-failure"]>; }, "strip", z.ZodTypeAny, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }, { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }, { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; }>>; }, "strip", z.ZodTypeAny, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }>, "many">, { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[], { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]>; }, "strip", z.ZodTypeAny, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }>, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }, { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; }>>; }, "strip", z.ZodTypeAny, { content: string; metrics: { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }; execution?: { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; } | undefined; }, { content: string; metrics: { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }; execution?: { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; } | undefined; }>; /** Admitted contract group (mmnto-ai/totem#2102) — additive 1.x optional; slice-1/2 artifacts predate it. */ admission: z.ZodOptional; /** Whether an explicit `VERIFY:` escalation is an acceptable fallback for an uncitable claim. */ verifyFallback: z.ZodOptional; /** JSON-Schema definition for structured output. */ schema: z.ZodOptional>; }, "strip", z.ZodTypeAny, { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; }, { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; }>>; contextPolicy: z.ZodOptional; }, "strip", z.ZodTypeAny, { budget?: number | undefined; }, { budget?: number | undefined; }>>; runMetadata: z.ZodOptional; /** The CLI command identity the run served, when distinct from `caller`. */ command: z.ZodOptional; /** * Whether the code-blind grounding guard fired for this run (mmnto-ai/totem#2106): * zero code chunks were retrieved, so the prompt carried the suppression * directive and the output is degraded/caveated. Recorded so run artifacts * (eval fixtures, #2100) are filterable by guard activation without * recomputing `code.length === 0` from the grounding bundle. */ codeBlind: z.ZodOptional; /** * Which system prompt drafted the output (mmnto-ai/totem#2700): `builtin` * when `getSystemPrompt(...) === SYSTEM_PROMPT`, `override` otherwise — * derived at the writer, read BEFORE the code-blind directive is folded in. * The strict evidence reader chooses the TEMPLATE vs DOCUMENT shape on it: * a draft written under a custom prompt cannot be held to the built-in * template's headings. Absent on pre-existing artifacts (which block on the * missing anchor first, so the shape choice is never reached for them). */ promptSource: z.ZodOptional>; }, "strip", z.ZodTypeAny, { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; }, { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; }>>; }, "strip", z.ZodTypeAny, { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; }, { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; }>>; /** * ISO-8601 emission time. EXCLUDED from the content address (identical runs * dedup to one artifact regardless of when they ran) — observability only. */ createdAt: z.ZodString; }, "strip", z.ZodTypeAny, { createdAt: string; schemaVersion: string; inputBundle: { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }; inputHash: string; grounding: { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }; backend: { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }; output: { content: string; metrics: { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }; execution?: { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; } | undefined; }; admission?: { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; } | undefined; }, { createdAt: string; schemaVersion: string; inputBundle: { maskedPrompt: string; maskedSystemPrompt?: string | undefined; diffScope?: string | undefined; specContract?: string | undefined; }; inputHash: string; grounding: { hash: string; provenanceSummary: string; anchor?: { kind: "record" | "issue" | "free-text" | "mixed"; ref: string; sha256?: string | undefined; } | undefined; bundle?: { items: { filePath: string; contentHash: string; provenance: string; sourceType: string; sourceRepo?: string | undefined; relevance?: number | undefined; }[]; } | undefined; floor?: number | undefined; }; backend: { model: string; provider: string; qualifiedModel: string; admissionClass: "completion_only" | "self_grounding_agent"; taskProfile: string; temperature?: number | undefined; }; output: { content: string; metrics: { durationMs: number; inputTokens?: number | null | undefined; outputTokens?: number | null | undefined; cacheReadInputTokens?: number | null | undefined; finishReason?: string | undefined; }; execution?: { attempts: { status: "succeeded" | "failed"; model: string; provider: string; sequence: number; route: "sdk" | "cli-fallback" | "configured-shell" | "quota-model-fallback"; durationMs: number; failureKind?: "unknown" | "auth" | "quota" | "model" | "process-spawn" | "process-exit" | "timeout" | undefined; providerStatus?: number | undefined; providerCode?: string | undefined; process?: { exitCode: number | null; signal: string | null; timedOut: boolean; stdout?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; timeoutMs?: number | undefined; stderr?: { encoding: "utf-8"; head: string; observedBytes: number; retainedBytes: number; limitBytes: number; truncated: boolean; dlp: "masked" | "omitted-on-mask-failure"; tail?: string | undefined; } | undefined; } | undefined; }[]; } | undefined; }; admission?: { outputContract?: { citationsRequired?: boolean | undefined; verifyFallback?: boolean | undefined; schema?: Record | undefined; } | undefined; contextPolicy?: { budget?: number | undefined; } | undefined; runMetadata?: { caller?: string | undefined; command?: string | undefined; codeBlind?: boolean | undefined; promptSource?: "builtin" | "override" | undefined; } | undefined; } | undefined; }>; export type RunArtifact = z.infer; export type InvokeFailureKind = z.infer; export type BoundedTextEvidence = z.infer; export type InvokeProcessEvidence = z.infer; export type InvokeAttemptEvidence = z.infer; export type RunExecutionEvidence = z.infer; export type InvocationFailureArtifact = z.infer; export type InputBundle = z.infer; export type GroundingItem = z.infer; export type GroundingBundle = z.infer; export type GroundingAnchor = z.infer; /** Inferred from the anchor schema's enum — the canonical anchor-kind union (mmnto-ai/totem#2700). */ export type GroundingAnchorKind = GroundingAnchor['kind']; /** Inferred from the tuple the `RunMetadataSchema.promptSource` enum is built from — the canonical prompt-source union (mmnto-ai/totem#2700). */ export type PromptSource = (typeof PROMPT_SOURCES)[number]; export type OutputContract = z.infer; export type ContextPolicy = z.infer; export type RunMetadata = z.infer; /** Inferred from the `BackendSchema` enum — the canonical admission-class union (mmnto-ai/totem#2102). */ export type BackendAdmissionClass = z.infer['admissionClass']; //# sourceMappingURL=schema.d.ts.map