/** * Compiled MiniMax specialized-vision conformance registry (DESIGN.md §15, * phases/05-specialized-vision.md P5-02). * * This module is the single source of truth for which specialized * MiniMax Vision operations are supported at runtime. Help text, doctor * `capabilityMatrix`, MiniMax descriptor capability metadata, and the * Adapter support check all derive from this registry through the two * pure queries below. There is no environment override and no runtime * filesystem lookup. * * Boundary rules: * - Pure module: no `process.env`, no I/O, no Provider calls. * - Imports only the compiled revisions map, the compiled attestation * manifest, and the shared capability type. It does not import the * MiniMax Adapter, the Vision command, the doctor command, or any * Provider transport. * - The registry is built once at module load from immutable sources * and frozen; support queries are pure functions over that snapshot. * * Support contract (DESIGN.md §15): * `isMiniMaxVisionOperationSupported(op)` is true iff every condition * holds: * 1. `op` is one of the five specialized operations * (`ui-artifact`, `extract-text`, `diagnose-error`, `diagram`, * `chart`); `interpret-image`, `diff`, and `video` are not * registry entries. * 2. The entry's `offline` state is `"pass"`. * 3. The entry's `live` state is `"pass"`. * 4. A compiled attestation exists whose `operation` matches. * 5. The attestation's `fixtureVersion` equals the entry's * `fixtureVersion`. * 6. The attestation's `implementationId` equals the entry's * `implementationId` (which equals * {@link MINIMAX_VISION_IMPLEMENTATION_ID}). * 7. The attestation's `mappingRevision` equals the entry's * `mappingRevision` (sourced from `vision-revisions.ts`). * 8. Every entry in `attestation.assertions` has `passed: true`. * * At P5-02 every entry begins `pending/pending` with no attestation, * so every specialized operation is unsupported. P5-03 flips entries * to `pass/pass` and appends sanitized attestations one at a time. */ import type { VisionOperation } from "../../capabilities/vision.js"; /** * Conformance state for an offline or live test leg. `pending` means * the test has not been run; `pass` means it has run and the operation * is eligible for support; `fail` means it ran and the semantics did * not hold. */ export type ConformanceState = "pending" | "pass" | "fail"; /** * A specialized MiniMax Vision operation id. `interpret-image`, `diff`, * and `video` are excluded by design: `interpret-image` is supported * unconditionally by the MiniMax Adapter, and `diff`/`video` remain * Z.AI-only (DESIGN.md §15). */ export type SpecializedVisionOperation = Exclude; /** * Sanitized attestation shape (DESIGN.md §15). Attestations contain * ONLY these fields and never include returned prose, credentials, * URLs with credentials, headers, raw response bodies, local paths, * or stacks. */ export interface VisionAttestation { readonly schemaVersion: 1; readonly provider: "minimax"; readonly operation: SpecializedVisionOperation; readonly fixtureVersion: number; readonly implementationId: string; readonly mappingRevision: string; readonly testedAt: string; readonly resultDigest: string; readonly assertions: readonly { id: string; passed: true; }[]; } /** * A registry entry. Each immutable entry contains the fixture version, * the current Implementation identity, the generated mapping revision, * the offline/live conformance states, and an optional compiled * attestation attached at registry assembly time. */ export interface VisionConformanceEntry { readonly fixtureVersion: number; readonly implementationId: string; readonly mappingRevision: string; readonly offline: ConformanceState; readonly live: ConformanceState; readonly attestation?: VisionAttestation; } /** * The Implementation identity for the direct MiniMax Vision transport * maintained by Scoutline itself (Phase B — critique C3). The previous * SDK-backed identity (`mmx-cli-sdk@1.0.16`) pinned the bundled * `mmx-cli` runtime; this release replaces it with Scoutline's * maintained direct transport. Changing this value (e.g. swapping * transports again) invalidates every attestation until each mapping is * re-attested (DESIGN.md §17). */ export declare const MINIMAX_VISION_IMPLEMENTATION_ID = "scoutline-direct@0.5.0"; /** * The five specialized MiniMax Vision operations governed by this * registry, in stable canonical order. `interpret-image`, `diff`, and * `video` are deliberately absent. */ export declare const SPECIALIZED_VISION_OPERATIONS: readonly ["ui-artifact", "extract-text", "diagnose-error", "diagram", "chart"]; /** * Readonly set form of {@link SPECIALIZED_VISION_OPERATIONS} for fast * membership checks. Used by the Adapter and by the support query. */ export declare const SPECIALIZED_VISION_OPERATION_SET: ReadonlySet; /** * The immutable MiniMax specialized-vision conformance registry. Pure * snapshot; reading it performs no Provider call and inspects no * environment value. */ export declare const MINIMAX_VISION_CONFORMANCE_REGISTRY: Readonly>; /** * Validate a candidate registry against the structural contract. Used * by tests to prove invariants: the production registry is built from * frozen sources and is always valid. Returns a list of human-readable * errors; an empty list means the candidate is structurally valid. * * Validation rules: * - Exactly the five specialized operation keys are present. * - `diff`, `video`, and `interpret-image` never appear. * - `offline` and `live` are each one of `pending|pass|fail`. * - `fixtureVersion` is a positive integer. * - `implementationId` equals {@link MINIMAX_VISION_IMPLEMENTATION_ID}. * - `mappingRevision` is a non-empty string. * - If an attestation is present, it may NOT be attached to an entry * whose `live` state is not `pass` (an attestation is the proof of * a passing live run). * * NOTE: this function intentionally does NOT cross-check the * attestation's `mappingRevision` against the generated revisions map * or its `implementationId` against the constant; those checks are the * `isMiniMaxVisionOperationSupported` query's job. The validator only * checks structural integrity of a candidate registry. Tests that need * to assert the attestation/revision match semantics use the support * query directly. */ export declare function validateConformanceRegistry(candidate: Readonly>): string[]; /** * Validate a candidate attestation against the schema contract. * Returns a list of human-readable errors; an empty list means the * attestation is structurally valid. Used by tests to prove the * support contract fails closed on malformed attestations. */ export declare function validateAttestation(candidate: unknown): string[]; /** * Options for {@link isMiniMaxVisionOperationSupported}. Tests pass a * synthetic `registry` and `attestations` to exercise pending/pass/fail * combinations without mutating compiled sources. Production calls * with no options; the compiled registry and manifest are used. */ export interface MiniMaxVisionSupportOptions { readonly registry?: Readonly>; readonly revisions?: Readonly>; readonly implementationId?: string; } /** * Return true iff `operation` is currently a supported MiniMax * specialized Vision operation, per DESIGN.md §15. Pure: no Provider * call, no env read, no I/O. `interpret-image`, `diff`, and `video` * always return false (they are not registry entries). */ export declare function isMiniMaxVisionOperationSupported(operation: VisionOperation, options?: MiniMaxVisionSupportOptions): boolean; /** * Return a snapshot of every specialized operation's registry entry. * The returned record is the same frozen object as the compiled * registry; callers MUST NOT mutate it. Use this for help text, * diagnostics, and packaging tests so there is a single source of * truth for registry metadata. */ export declare function getMiniMaxVisionConformanceMetadata(): Readonly>; /** * Return the subset of specialized operations currently supported by * the MiniMax Vision conformance registry, in canonical order. Used by * the Adapter descriptor, Vision help, and doctor `capabilityMatrix` * so they all derive from a single query. */ export declare function listSupportedMiniMaxVisionOperations(): readonly SpecializedVisionOperation[]; //# sourceMappingURL=vision-conformance.d.ts.map