/** * Host-owned application service for Workflow v3 parameter distillation. * * The model is only a suggestion provider. Source authentication, baseline * construction, compilation, approval, and library publication all stay in * this host process and are revalidated at every mutation boundary. */ import { type V3DistillationModelFieldV1 } from './distillation-compiler.js'; import { type V3DistillationCompiledBodyV1 } from './distillation-schema.js'; import { type LoadedV3DistillationProposal, type V3DistillationReplyTargetV1 } from './distillation-store.js'; import { type V3DistillationActorContext } from './distillation-source.js'; export type V3DistillationServiceErrorCode = 'invalid_request' | 'unsafe_display_name' | 'source_changed' | 'proposal_not_ready' | 'approval_denied' | 'commit_conflict'; export declare class V3DistillationServiceError extends Error { readonly code: V3DistillationServiceErrorCode; constructor(code: V3DistillationServiceErrorCode); } export interface PreparedV3WorkflowDistillation { proposalId: string; sourceRunDir: string; fields: V3DistillationModelFieldV1[]; state: LoadedV3DistillationProposal['state']['state']; } export interface ProposedV3WorkflowDistillation { proposalId: string; proposalHash: string; nonce: string; displayName: string; sourceRunId: string; compiled: V3DistillationCompiledBodyV1; } export interface CommittedV3WorkflowDistillation { workflowId: string; revisionId: string; contentHash: string; displayName: string; created: boolean; } export type V3DistillationSuggestionProvider = (fields: readonly V3DistillationModelFieldV1[]) => Promise; export declare function v3DistillationProposalNonce(loaded: LoadedV3DistillationProposal): string; export declare function prepareV3WorkflowDistillation(input: { dataDir: string; baseDir: string; source: 'last' | string; displayName: string; requestKey: string; context: V3DistillationActorContext; replyTarget?: V3DistillationReplyTargetV1; now?: Date; }): Promise; export declare function generateV3WorkflowDistillationProposal(input: { dataDir: string; baseDir: string; proposalId: string; suggest: V3DistillationSuggestionProvider; now?: Date; }): Promise; export declare function acceptV3WorkflowDistillation(input: { dataDir: string; baseDir: string; proposalId: string; proposalHash: string; nonce: string; operatorOpenId: string; larkAppId: string; chatId: string; now?: Date; }): Promise; export declare function rejectV3WorkflowDistillation(input: { dataDir: string; proposalId: string; proposalHash: string; nonce: string; operatorOpenId: string; larkAppId: string; chatId: string; now?: Date; }): LoadedV3DistillationProposal; //# sourceMappingURL=distillation-service.d.ts.map