import type { SavedWorkflowRevisionDraft } from './library-schema.js'; export declare const V3_DISTILLATION_COMPILER_VERSION: "v1"; export declare const V3_DISTILLATION_SUGGESTION_SCHEMA_VERSION: 1; export declare const V3_DISTILLATION_COMPILED_SCHEMA_VERSION: 1; export type V3DistillationReasonCode = 'SOURCE_NOT_ELIGIBLE' | 'MALFORMED_SUGGESTION' | 'ZERO_CANDIDATES' | 'UNSUPPORTED_PATH' | 'SOURCE_LITERAL_NOT_FOUND' | 'DUPLICATE_CANDIDATE' | 'OVERLAPPING_REPLACEMENTS' | 'SECRET_OR_IDENTITY_LITERAL' | 'SOURCE_VALUE_RESIDUE' | 'BASELINE_ALREADY_PARAMETERIZED' | 'TEMPLATE_VALIDATION_FAILED' | 'REVERSE_FILL_MISMATCH' | 'MALFORMED_COMPILED_BODY'; /** Safe to surface: the message contains the stable class only. */ export declare class V3DistillationCompileError extends Error { readonly code: V3DistillationReasonCode; constructor(code: V3DistillationReasonCode); } export interface V3DistillationCandidateV1 { path: string; literal: string; occurrence: number; type: 'string'; } export interface V3DistillationSuggestionV1 { schemaVersion: typeof V3_DISTILLATION_SUGGESTION_SCHEMA_VERSION; candidates: V3DistillationCandidateV1[]; } export type V3DistillationFieldCategory = 'goal' | 'instruction' | 'spec'; export interface DistilledReplacementV1 { /** Numeric-ordinal JSON pointer; it never carries a raw node/sketch id. */ path: string; startUtf8: number; endUtf8: number; literalSha256: string; replacement: `\${params.${string}}`; paramName: string; fieldCategory: V3DistillationFieldCategory; } export interface V3DistillationSafeFieldRefV1 { nodeOrdinal: number; field: 'goal' | 'instruction'; } export interface V3DistillationSafeParameterSummaryV1 { name: string; type: 'string'; required: true; hasDefault: false; replacementCount: number; fields: V3DistillationSafeFieldRefV1[]; } export interface V3DistillationSafeSummaryV1 { parameters: V3DistillationSafeParameterSummaryV1[]; roundTripVerified: true; structuralFieldsUnchanged: true; } /** Immutable compiler-owned body. Store/approval identity wraps this object. */ export interface V3DistillationCompiledBodyV1 { schemaVersion: typeof V3_DISTILLATION_COMPILED_SCHEMA_VERSION; compilerVersion: typeof V3_DISTILLATION_COMPILER_VERSION; baselineRevisionSha256: string; revisionDraft: SavedWorkflowRevisionDraft; replacements: DistilledReplacementV1[]; safeSummary: V3DistillationSafeSummaryV1; } export declare function isAllowedV3DistillationDagPath(path: string): boolean; export declare function isAllowedV3DistillationSpecPath(path: string): boolean; export declare function fieldCategoryForV3DistillationPath(path: string): V3DistillationFieldCategory | undefined; export declare function parseV3DistillationSuggestion(raw: unknown): V3DistillationSuggestionV1; export declare function parseV3DistillationCompiledBody(raw: unknown): V3DistillationCompiledBodyV1; //# sourceMappingURL=distillation-schema.d.ts.map