import { type CatalogOrigin, type CatalogSelectionPolicy, type RuntimeBinding, type SkillCheckpoint, type SkillScope } from './runtime-assets.js';
export interface WorkflowStep {
    title: string;
    command?: string;
    checkpoint?: SkillCheckpoint;
    role?: string;
    bindings: RuntimeBinding[];
}
export interface WorkflowDeploymentRecord {
    runId: string;
    deployedAt: number;
    scope: SkillScope;
}
export interface WorkflowArtifact {
    workflowId: string;
    version: number;
    name: string;
    domain: string;
    description: string;
    triggerConditions: string[];
    expectedOutputs: string[];
    guardrails: string[];
    verifierHooks: string[];
    roleAffinity: string[];
    steps: WorkflowStep[];
    scope: SkillScope;
    provenance: string;
    validationStatus: 'pending' | 'validated' | 'rejected';
    rolloutStatus: 'staged' | 'hot' | 'promoted' | 'revoked';
    catalogOrigin: CatalogOrigin;
    catalogPath?: string;
    catalogPriority: number;
    effectiveness: {
        successes: number;
        failures: number;
        retriesAvoided: number;
        verificationPasses: number;
    };
    deploymentPoints: WorkflowDeploymentRecord[];
}
export interface WorkflowRuntimeMetrics {
    success: boolean;
    retriesAvoided?: number;
    verificationPassed?: boolean;
}
export interface WorkflowDerivationSignal {
    goal: string;
    memoryMatches?: string[];
    repeatedFailures?: number;
    sessionHints?: string[];
}
export declare class WorkflowRuntime {
    private rootDir;
    private workspaceRoot;
    private artifacts;
    private bootstrapped;
    constructor(rootDir?: string, workspaceRoot?: string);
    listArtifacts(options?: {
        selectionPolicy?: CatalogSelectionPolicy;
        dedupe?: boolean;
    }): WorkflowArtifact[];
    getArtifact(workflowId: string): WorkflowArtifact | undefined;
    findByName(name: string): WorkflowArtifact | undefined;
    createWorkflow(input: Omit<WorkflowArtifact, 'workflowId' | 'version' | 'validationStatus' | 'rolloutStatus' | 'catalogOrigin' | 'catalogPath' | 'catalogPriority' | 'effectiveness' | 'deploymentPoints'>): WorkflowArtifact;
    stage(artifact: WorkflowArtifact): WorkflowArtifact;
    deploy(workflowId: string, runId: string, scope?: SkillScope): WorkflowArtifact | undefined;
    recordOutcome(workflowId: string, metrics: WorkflowRuntimeMetrics): WorkflowArtifact | undefined;
    revoke(workflowId: string): WorkflowArtifact | undefined;
    resolveWorkflowSelectors(names: string[], goal: string): WorkflowArtifact[];
    deriveFromSignals(signal: WorkflowDerivationSignal): WorkflowArtifact[];
    applyToTask(workflows: WorkflowArtifact[], currentVerifyCommands: string[], currentActions: RuntimeBinding[]): {
        verifyCommands: string[];
        actions: RuntimeBinding[];
        events: Array<Record<string, unknown>>;
    };
    private validate;
    private lastLocalRefresh;
    private ensureBootstrapped;
    private loadBundledDefaults;
    private loadLocalOverrides;
    private ingestSeed;
    private persistArtifact;
    private persistCanonicalArtifact;
    private renderMarkdown;
}
export declare const createWorkflowRuntime: (rootDir?: string, workspaceRoot?: string) => WorkflowRuntime;
