import { GuardrailEngine } from '../engines/guardrails-bridge.js';
import type { MemoryCheckResult, MemoryDeleteResult, MemoryFeedbackResult, MemoryHistoryEntry, MemoryStats, MemoryUpdateResult } from '../engines/memory.js';
import { MemoryEngine } from '../engines/memory.js';
import { SessionDNAManager } from '../engines/session-dna.js';
import { type BackendMode, type CompressionBackend, type CompressionShadow, type DSLCompilerBackend, type MemoryBackend } from '../engines/runtime-backends.js';
import { SkillRuntime, type SkillArtifact, type SkillBinding, type SkillCheckpoint } from '../engines/skill-runtime.js';
import { WorkflowRuntime, type WorkflowArtifact } from '../engines/workflow-runtime.js';
import { HookRuntime, type HookArtifact } from '../engines/hook-runtime.js';
import { AutomationRuntime, type AutomationArtifact, type AutomationDispatch, type ConnectorBinding, type ScheduledAutomationSnapshot, type ScheduledDispatchContext } from '../engines/automation-runtime.js';
import { SecurityShield, type ShieldDecision, type ShieldPolicyMode } from '../engines/security-shield.js';
import { FederationEngine } from '../engines/federation.js';
import { type HookTrigger, type SkillScope } from '../engines/runtime-assets.js';
import { type ContinuationProposal, type FallbackPlan, type OptimizationProfile, type PlanningLedgerRow, type ReviewGateResult, type SelectedCrew, type SelectedSpecialist } from '../engines/specialist-roster.js';
import { type TaskPlannerState } from '../engines/task-planner.js';
import { type RuntimeArtifactSelectionAudit, type RuntimeArtifactOutcomeSnapshot, type RuntimeCatalogHealthSnapshot, type RuntimeClientInstructionStatus, type RuntimeMemoryHealthSnapshot, type RuntimeMemoryReconciliationSummary, type RuntimeMemoryScopeUsageSnapshot, type RuntimeRagUsageSummary, type RuntimeRegistrySnapshot, type RuntimeOrchestrationSnapshot, type RuntimePrimaryClientSnapshot, type RuntimeSourceAwareTokenBudgetSnapshot, type RuntimeTaskGraphSnapshot, type RuntimeTokenRunSnapshot, type RuntimeTokenSummarySnapshot, type RuntimeWorkerPlanSnapshot } from '../engines/runtime-registry.js';
import { type ExecutionLedger, type InstructionPacket, type OrchestrationExecutionMode } from '../engines/instruction-gateway.js';
import { type UserWorkflowTrace } from '../engines/user-workflow-trace.js';
import { type ContextLogEntry, type DecisionLogEntry, type ExecutionPolicy, type ModelTier, type RequestBrief, type SelectionPlan } from '../engines/orchestrator/decision-spine.js';
import { type LearningPacket, type LearningNetworkEnvelope, type LearningPolicyDelta } from '../engines/learning-network.js';
import type { KnowledgeFabricBundle, KnowledgeFabricSnapshot } from '../engines/knowledge-fabric.js';
import type { BootstrapManifestStatus } from '../engines/client-bootstrap.js';
import { type WorktreeHealthSnapshot } from '../engines/worktree-health.js';
import type { MergeDecision, WorkerResult } from './index.js';
import type { FileRef } from '../engines/token-supremacy.js';
import type { GhostReport } from './index.js';
import { type CommandRecord } from './runtime/worker.js';
export type ExecutionMode = 'real' | 'analysis';
export type ExecutionState = 'planned' | 'bootstrapping' | 'running' | 'verifying' | 'merged' | 'inspected' | 'rolled_back' | 'failed';
export type WorkerRole = 'planner' | 'coder' | 'verifier' | 'skill-maker' | 'research-shadow';
export interface BackendSelection {
    memoryBackend: string;
    compressionBackend: string;
    consensusPolicy: string;
    dslCompiler: string;
}
export interface SkillPolicy {
    mode: 'guarded-hot' | 'session-only' | 'manual';
    allowMutateSkills: boolean;
}
export interface PromotionPolicy {
    autoPromoteSkills: boolean;
    autoPromoteWorkflows: boolean;
    globalThreshold: number;
}
export interface DerivationPolicy {
    mode: 'auto' | 'manual' | 'disabled';
}
export interface MemoryPolicy {
    mode: 'balanced' | 'strict' | 'off';
    quarantineTag: string;
}
export interface ReviewPolicy {
    mode: 'full' | 'runtime-only';
}
export interface ReleasePolicy {
    mode: 'ship-ready' | 'skip';
}
export interface ContinuationPolicy {
    mode: 'suggest' | 'manual';
}
export interface ExecutionTask {
    goal: string;
    files: string[];
    workers: number;
    roles: string[];
    strategies: string[];
    verifyCommands: string[];
    successCriteria: string[];
    rollbackPolicy: 'patch-revert';
    timeoutMs: number;
    skillPolicy: SkillPolicy;
    backendSelectors: Partial<BackendSelection>;
    skillNames: string[];
    workflowSelectors: string[];
    hookSelectors: string[];
    automationSelectors: string[];
    connectorBindings: ConnectorBinding[];
    actions: SkillBinding[];
    inlineSkills: SkillArtifact[];
    nxlScript?: string;
    promotionPolicy: PromotionPolicy;
    derivationPolicy: DerivationPolicy;
    checkpointPolicy: SkillCheckpoint[];
    backendMode: BackendMode;
    shieldPolicy: ShieldPolicyMode;
    memoryPolicy: MemoryPolicy;
    crewSelectors: string[];
    specialistSelectors: string[];
    optimizationProfile: OptimizationProfile;
    reviewPolicy: ReviewPolicy;
    releasePolicy: ReleasePolicy;
    continuationPolicy: ContinuationPolicy;
    parentRunId?: string;
    sourceAutomationId?: string;
    continuationDepth: number;
    suppressedAutomationIds: string[];
    allowedToolsOverride?: string[];
    intent?: 'inspect' | 'plan' | 'mutate';
    topology?: 'auto' | 'manager-tools' | 'handoff' | 'dag-pool' | 'worktree-swarm';
    executionMode: OrchestrationExecutionMode;
    manualOverrides: string[];
    instructionPacket?: InstructionPacket;
    executionLedger?: ExecutionLedger;
    knowledgeFabric?: KnowledgeFabricBundle;
    activeLearning?: ActiveLearningPolicy;
    autoGhostPass?: GhostReport;
    autoGhostPassDecision?: {
        enabled: boolean;
        reason: string;
        contextHash?: string;
    };
}
export interface ActiveLearningPolicy {
    generatedAt: number;
    sourceRunIds: string[];
    packets: Array<Pick<LearningPacket, 'id' | 'runId' | 'lesson' | 'scope' | 'confidence' | 'action' | 'nextRunEffect' | 'evidenceRefs'>>;
    policyDeltas: LearningPolicyDelta[];
}
export interface WorkerSkillOverlay {
    base: string[];
    session: string[];
    worker: string[];
    runtimeHot: string[];
}
export interface WorkerExecutionPolicy {
    modelTier: ModelTier;
    authority: 'read' | 'write' | 'verify';
    reviewRequired: boolean;
    allowedTools: string[];
    escalationPolicy: string[];
}
export interface WorkerManifest {
    workerId: string;
    role: WorkerRole;
    strategy: string;
    worktreeDir: string | null;
    specialistId?: string;
    specialistName?: string;
    files: FileRef[];
    skillOverlays: WorkerSkillOverlay;
    workflowOverlays: string[];
    allowedTools: string[];
    executionPolicy?: WorkerExecutionPolicy;
    tokenBudget: number;
    verifyCommands: string[];
    checkpoints: SkillCheckpoint[];
    actions: SkillBinding[];
    inlineSkills: SkillArtifact[];
    workflows: WorkflowArtifact[];
    context: WorkerContextPacket;
    targetWorkerId?: string;
    podId?: string;
}
export interface SpecialistContextPacket {
    specialistId?: string;
    name?: string;
    authority?: SelectedSpecialist['authority'];
    division?: string;
    mission?: string;
    rules: string[];
    workflow: string[];
    deliverables: string[];
}
export interface WorkflowContextPacket {
    workflowId: string;
    name: string;
    description: string;
    guardrails: string[];
    expectedOutputs: string[];
    steps: string[];
}
export interface WorkerPhasePacket {
    trigger: HookTrigger;
    notes: string[];
    addedSkillNames: string[];
    addedWorkflowNames: string[];
    addedBindings: string[];
}
export interface WorkerContextPacket {
    goal: string;
    runtimeId: string;
    runId: string;
    workerId: string;
    role: WorkerRole;
    strategy: string;
    selectedCrew?: SelectedCrew;
    specialist: SpecialistContextPacket;
    activeSkills: Array<{
        skillId: string;
        name: string;
        riskClass: SkillArtifact['riskClass'];
        scope: SkillScope;
        instructions: string;
        toolBindings: SkillBinding[];
    }>;
    activeWorkflows: WorkflowContextPacket[];
    reviewGates: ReviewGateResult[];
    continuation?: ContinuationProposal;
    phasePackets: WorkerPhasePacket[];
    activeLearning?: ActiveLearningPolicy;
    sharedMemory: Array<{
        id: string;
        excerpt: string;
        scope: string;
        state: string;
        importanceScore: number;
        relevanceScore: number;
        tags: string[];
    }>;
}
export interface WorkerVerification {
    workerId: string;
    verifierId: string;
    passed: boolean;
    status: 'passed' | 'failed' | 'skipped';
    skippedReason?: string;
    commands: CommandRecord[];
    summary: string;
    artifactsPath: string;
}
export interface RuntimeWorkerResult extends WorkerResult {
    role: WorkerRole;
    verified: boolean;
    verification?: WorkerVerification;
    artifactsPath: string;
    modifiedFiles: string[];
    commandRecords?: CommandRecord[];
}
export interface PlannerResult {
    summary: string;
    domains: string[];
    selectedFiles: string[];
    selectedWorkflows: string[];
    selectedSkills: string[];
    selectedTools: string[];
    executionPolicy?: ExecutionPolicy;
    selectedCrew?: SelectedCrew;
    selectedSpecialists: SelectedSpecialist[];
    fallbackPlan?: FallbackPlan;
    reviewGates: ReviewGateResult[];
    continuation?: ContinuationProposal;
    ledger: PlanningLedgerRow[];
    strategyMap: Array<{
        workerId: string;
        strategy: string;
    }>;
    risks: string[];
}
export interface BackendEvidence {
    notes: string[];
    memory: Record<string, unknown>;
    compression: Record<string, unknown> | CompressionShadow;
    consensus: Record<string, unknown>;
    dsl?: Record<string, unknown>;
    fallbacks: string[];
}
export interface PromotionDecision {
    kind: 'skill' | 'workflow' | 'backend' | 'hook' | 'automation';
    target: string;
    scope: SkillScope | 'backend';
    approved: boolean;
    rationale: string;
}
export interface ExecutionRun {
    runId: string;
    state: ExecutionState;
    mode: ExecutionMode;
    goal: string;
    parentRunId?: string;
    sourceAutomationId?: string;
    artifactsPath: string;
    workerManifests: WorkerManifest[];
    activeSkills: SkillArtifact[];
    activeWorkflows: WorkflowArtifact[];
    activeHooks: HookArtifact[];
    activeAutomations: AutomationArtifact[];
    selectedBackends: BackendSelection;
    finalDecision?: MergeDecision;
    workerResults: RuntimeWorkerResult[];
    plannerResult?: PlannerResult;
    verificationResults: WorkerVerification[];
    skillEvents: Array<Record<string, unknown>>;
    workflowEvents: Array<Record<string, unknown>>;
    hookEvents: Array<Record<string, unknown>>;
    automationEvents: Array<Record<string, unknown>>;
    backendEvidence: BackendEvidence;
    promotionDecisions: PromotionDecision[];
    shieldDecisions: ShieldDecision[];
    memoryChecks: MemoryCheckResult[];
    federationState?: unknown;
    artifactsIndex: Record<string, string>;
    result: string;
    plannerState?: TaskPlannerState;
    continuationChildren: Array<{
        automationId: string;
        runId?: string;
        status: 'queued' | 'completed' | 'suppressed' | 'failed';
        error?: string;
    }>;
    tokenTelemetry?: RuntimeTokenRunSnapshot;
    instructionPacket?: InstructionPacket;
    executionLedger?: ExecutionLedger;
    knowledgeFabric?: KnowledgeFabricBundle;
    taskGraph?: RuntimeTaskGraphSnapshot;
    workerPlan?: RuntimeWorkerPlanSnapshot;
    artifactOutcome?: RuntimeArtifactOutcomeSnapshot;
    ragUsageSummary?: RuntimeRagUsageSummary;
    memoryScopeUsage?: RuntimeMemoryScopeUsageSnapshot;
    memoryReconciliationSummary?: RuntimeMemoryReconciliationSummary;
    autoGhostPass?: GhostReport;
    userWorkflowTrace?: UserWorkflowTrace;
    requestBrief?: RequestBrief;
    selectionPlan?: SelectionPlan;
    contextLog?: ContextLogEntry[];
    decisionLog?: DecisionLogEntry[];
    learningNetwork?: LearningNetworkEnvelope;
    activeLearning?: ActiveLearningPolicy;
}
export interface SubAgentRuntimeOptions {
    repoRoot?: string;
    memory?: MemoryEngine | MemoryBackend;
    compressionBackend?: CompressionBackend;
    dslCompiler?: DSLCompilerBackend;
    guardrails?: GuardrailEngine;
    sessionDNA?: SessionDNAManager;
    skillRuntime?: SkillRuntime;
    workflowRuntime?: WorkflowRuntime;
    hookRuntime?: HookRuntime;
    automationRuntime?: AutomationRuntime;
    securityShield?: SecurityShield;
    federation?: FederationEngine;
    artifactsRoot?: string;
}
export declare class SubAgentRuntime {
    private repoRoot;
    private runtimeId;
    private startedAt;
    private defaultMemoryBackend;
    private memoryEngine?;
    private defaultCompressionBackend?;
    private defaultDslCompiler?;
    private guardrails;
    private sessionDNA?;
    private skillRuntime;
    private workflowRuntime;
    private hookRuntime;
    private automationRuntime;
    private securityShield;
    private federation;
    private artifactsRoot?;
    private backendRegistry;
    private runtimeRegistry;
    private runtimeSnapshot;
    private runs;
    private instructionGateway;
    private repoIdentity;
    constructor(options?: SubAgentRuntimeOptions);
    run(input: Partial<ExecutionTask> & {
        goal: string;
    }): Promise<ExecutionRun>;
    runNXL(goal: string, rawScript?: string, useCase?: string): Promise<ExecutionRun>;
    listRuns(limit?: number): ExecutionRun[];
    getRun(runId: string): Promise<ExecutionRun | undefined>;
    getUserWorkflowTrace(runId: string): Promise<UserWorkflowTrace | undefined>;
    private persistUserWorkflowTrace;
    private persistDecisionSpineLogs;
    private persistLearningNetwork;
    getRuntimeId(): string;
    getUsageSnapshot(): RuntimeRegistrySnapshot;
    getInstructionPacket(): InstructionPacket | undefined;
    getExecutionLedger(): ExecutionLedger | undefined;
    getKnowledgeFabricSnapshot(): KnowledgeFabricSnapshot | undefined;
    getTokenTelemetrySummary(): RuntimeTokenSummarySnapshot;
    getTokenTelemetryTimeline(limit?: number): RuntimeTokenRunSnapshot[];
    getTokenTelemetryForRun(runId: string): Promise<RuntimeTokenRunSnapshot | undefined>;
    recordOrchestrationSnapshot(snapshot: RuntimeOrchestrationSnapshot): RuntimeRegistrySnapshot;
    recordKnowledgeFabricSnapshot(snapshot: KnowledgeFabricSnapshot | undefined): RuntimeRegistrySnapshot;
    recordPrimaryClient(snapshot: RuntimePrimaryClientSnapshot | undefined, detected?: RuntimePrimaryClientSnapshot[]): RuntimeRegistrySnapshot;
    recordClientInstructionStatus(status: RuntimeClientInstructionStatus): RuntimeRegistrySnapshot;
    recordCatalogHealth(snapshot: RuntimeCatalogHealthSnapshot | undefined): RuntimeRegistrySnapshot;
    recordArtifactSelectionAudit(snapshot: RuntimeArtifactSelectionAudit | undefined): RuntimeRegistrySnapshot;
    recordArtifactOutcome(snapshot: RuntimeArtifactOutcomeSnapshot | undefined): RuntimeRegistrySnapshot;
    recordMemoryHealth(snapshot: RuntimeMemoryHealthSnapshot | undefined): RuntimeRegistrySnapshot;
    recordMemoryScopeUsage(snapshot: RuntimeMemoryScopeUsageSnapshot | undefined): RuntimeRegistrySnapshot;
    recordMemoryReconciliationSummary(snapshot: RuntimeMemoryReconciliationSummary | undefined): RuntimeRegistrySnapshot;
    recordBootstrapManifestStatus(snapshot: BootstrapManifestStatus | undefined): RuntimeRegistrySnapshot;
    recordSourceAwareTokenBudget(snapshot: RuntimeSourceAwareTokenBudgetSnapshot | undefined): RuntimeRegistrySnapshot;
    recordTaskGraph(snapshot: RuntimeTaskGraphSnapshot | undefined): RuntimeRegistrySnapshot;
    recordWorkerPlan(snapshot: RuntimeWorkerPlanSnapshot | undefined): RuntimeRegistrySnapshot;
    recordRagUsageSummary(snapshot: RuntimeRagUsageSummary | undefined): RuntimeRegistrySnapshot;
    recordWorktreeHealth(snapshot: WorktreeHealthSnapshot | undefined): RuntimeRegistrySnapshot;
    recordClientToolCall(toolName: string, options?: {
        bootstrapCalled?: boolean;
        orchestrateCalled?: boolean;
        plannerCalled?: boolean;
        tokenOptimizationApplied?: boolean;
        tokenAutoApplied?: boolean;
        toolProfile?: 'autonomous' | 'full';
        instructionFiles?: string[];
        detailLevel?: 'compact' | 'standard' | 'debug' | 'full';
        intent?: 'inspect' | 'plan' | 'mutate';
        topology?: 'auto' | 'manager-tools' | 'handoff' | 'dag-pool' | 'worktree-swarm';
    }): RuntimeRegistrySnapshot;
    recordInstructionPacket(packet: InstructionPacket | undefined, options?: {
        executionMode?: OrchestrationExecutionMode;
        plannerApplied?: boolean;
        tokenOptimizationApplied?: boolean;
    }): RuntimeRegistrySnapshot;
    recordExecutionLedger(ledger: ExecutionLedger | undefined, executionMode?: OrchestrationExecutionMode): RuntimeRegistrySnapshot;
    updateExecutionMetadata(runId: string, patch: {
        instructionPacket?: InstructionPacket;
        executionLedger?: ExecutionLedger;
        knowledgeFabric?: KnowledgeFabricBundle;
    }): ExecutionRun | undefined;
    listSkills(): SkillArtifact[];
    listSkillsForSelection(): SkillArtifact[];
    listWorkflows(): WorkflowArtifact[];
    listWorkflowsForSelection(): WorkflowArtifact[];
    listHooks(): HookArtifact[];
    listHooksForSelection(): HookArtifact[];
    listAutomations(): AutomationArtifact[];
    listAutomationsForSelection(): AutomationArtifact[];
    listSpecialists(): import("../engines/specialist-roster.js").SpecialistProfile[];
    listCrews(): import("../engines/specialist-roster.js").CrewTemplate[];
    planExecution(input: Partial<ExecutionTask> & {
        goal: string;
    }): Promise<TaskPlannerState>;
    generateSkill(input: {
        name: string;
        instructions: string;
        riskClass?: SkillArtifact['riskClass'];
        scope?: SkillScope;
        provenance?: string;
    }): SkillArtifact;
    deploySkill(skillId: string, scope?: SkillScope): SkillArtifact | undefined;
    revokeSkill(skillId: string): SkillArtifact | undefined;
    generateWorkflow(input: {
        name: string;
        description: string;
        domain?: string;
        scope?: SkillScope;
    }): WorkflowArtifact;
    deployWorkflow(workflowId: string, scope?: SkillScope): WorkflowArtifact | undefined;
    revokeWorkflow(workflowId: string): WorkflowArtifact | undefined;
    generateHook(input: {
        name: string;
        description: string;
        trigger: HookTrigger;
        riskClass?: HookArtifact['riskClass'];
        scope?: SkillScope;
    }): HookArtifact;
    deployHook(hookId: string, scope?: SkillScope): HookArtifact | undefined;
    revokeHook(hookId: string): HookArtifact | undefined;
    generateAutomation(input: {
        name: string;
        description: string;
        triggerMode?: AutomationArtifact['triggerMode'];
        eventTrigger?: HookTrigger;
        scope?: SkillScope;
        workflowSelectors?: string[];
        hookSelectors?: string[];
        skillSelectors?: string[];
        connectors?: ConnectorBinding[];
    }): AutomationArtifact;
    deployAutomation(automationId: string, scope?: SkillScope): AutomationArtifact | undefined;
    revokeAutomation(automationId: string): AutomationArtifact | undefined;
    runAutomation(automationId: string, goal?: string): Promise<ExecutionRun>;
    listScheduledAutomations(options?: {
        now?: number;
    }): ScheduledAutomationSnapshot[];
    dispatchScheduledAutomations(options?: ScheduledDispatchContext & {
        runQueued?: boolean;
    }): Promise<{
        dispatches: AutomationDispatch[];
        runs: ExecutionRun[];
        failures: Array<{
            automationId: string;
            error: string;
        }>;
    }>;
    auditMemory(limit?: number): ReturnType<MemoryEngine['audit']> | undefined;
    listMemoryQuarantine(limit?: number): ReturnType<MemoryEngine['listQuarantined']>;
    runMemoryHygiene(options?: {
        mode?: 'report' | 'apply';
        batchSize?: number;
        states?: Array<'active' | 'quarantined' | 'scrap' | 'expired'>;
        auditLimit?: number;
    }): ReturnType<MemoryEngine['runHygiene']>;
    getNetworkStatus(): unknown;
    previewGovernancePreflight(input: {
        goal: string;
        files: string[];
        tokenCount: number;
        isDestructive?: boolean;
    }): ReturnType<GuardrailEngine['check']>;
    getMemoryHealth(): RuntimeMemoryHealthSnapshot;
    getMemoryScopeUsage(): RuntimeMemoryScopeUsageSnapshot;
    getSharedMemorySnapshot(limit?: number): {
        id: string;
        excerpt: string;
        scope: string;
        state: string;
        importanceScore: number;
        relevanceScore: number;
        tags: string[];
    }[];
    getMemoryReconciliationSummary(): RuntimeMemoryReconciliationSummary;
    traceMemory(id: string): import("../engines/memory.js").MemoryTraceDetail;
    updateMemory(id: string, patch: Parameters<MemoryEngine['updateMemory']>[1]): MemoryUpdateResult;
    deleteMemory(id: string, options?: Parameters<MemoryEngine['deleteMemory']>[1]): MemoryDeleteResult;
    getMemoryHistory(id: string, limit?: number): MemoryHistoryEntry[];
    submitMemoryFeedback(id: string, input?: Parameters<MemoryEngine['submitMemoryFeedback']>[1]): MemoryFeedbackResult;
    maintainMemory(): import("../engines/memory-control-plane.js").MemoryMaintenanceResult;
    exportMemoryBundle(options?: {
        limit?: number;
        scope?: 'session' | 'project' | 'user' | 'promoted' | 'shared';
        state?: 'active' | 'quarantined' | 'scrap';
        sessionId?: string;
    }): import("../engines/memory.js").MemoryExportBundle;
    backupMemoryBundle(options?: {
        limit?: number;
        scope?: 'session' | 'project' | 'user' | 'promoted' | 'shared';
        state?: 'active' | 'quarantined' | 'scrap';
        sessionId?: string;
    }): {
        path: string;
        bundle: import("../engines/memory.js").MemoryExportBundle;
    };
    importMemoryBundle(input: {
        path?: string;
        bundle?: unknown;
    }): Promise<import("../engines/memory.js").MemoryImportResult | {
        imported: number;
        duplicates: number;
        quarantined: number;
        importedIds: any[];
    }>;
    storeMemoryAndDispatch(content: string, priority?: number, tags?: string[], parentId?: string, depth?: number, options?: {
        continuationDepth?: number;
        sourceAutomationId?: string;
        suppressAutomationContinuations?: boolean;
    }): Promise<{
        id: string;
        hookEvents: Array<Record<string, unknown>>;
        automationDispatches: Awaited<ReturnType<AutomationRuntime['dispatch']>>;
        continuationRuns: ExecutionRun[];
    }>;
    dispatchStoredMemory(id: string, content: string, priority?: number, tags?: string[], options?: {
        continuationDepth?: number;
        sourceAutomationId?: string;
        suppressAutomationContinuations?: boolean;
    }): Promise<{
        hookEvents: Array<Record<string, unknown>>;
        automationDispatches: Awaited<ReturnType<AutomationRuntime['dispatch']>>;
        continuationRuns: ExecutionRun[];
    }>;
    runWorkflow(workflowId: string, goal?: string): Promise<ExecutionRun>;
    getBackendCatalog(): Record<string, unknown>;
    getHealth(): Record<string, unknown>;
    private resolveArtifactsRoot;
    private loadActiveLearningPolicy;
    private renderActiveLearningMatches;
    private _warmPersistedRuns;
    private normalizeTask;
    private executionTaskFromCompiled;
    private resolveBackends;
    private defaultVerifyCommands;
    private createWorkerManifests;
    private createPlannerResult;
    private deployRuntimeSkill;
    private runCoderWorker;
    private estimateRuntimeWorkerTokens;
    private runVerifierWorker;
    private applyDecision;
    private evaluatePromotions;
    private resolveCandidateDiff;
    private isCommandOnlyOperationalSuccess;
    private resolveFileRefs;
    private discoverTargetFiles;
    private collectLibraryCounts;
    private createManualLedger;
    private syncExecutionMetadata;
    private collectSkipReasons;
    private deriveSequenceCompliance;
    private persistRuntimeSnapshot;
    private markUsage;
    private recordFederationUsage;
    private attachLatestRun;
    private recordRunTokenTelemetry;
    private mergeTokenBreakdown;
    private buildRunTokenTelemetry;
    private buildWorkerContext;
    private shareWorkerLearnings;
    private getSharedMemoryContext;
    private writeManifestContexts;
    private writeWorktreeContext;
    private writeWorktreePacket;
    private gatherSkillBindings;
    private applyPhaseHookEffects;
    private evaluateReviewGates;
    private shouldEnforceBlockingReviewGate;
    private buildMemoryRecallFilters;
    private resolveMemoryContainer;
    private stableContainerId;
    private executeAutomationContinuations;
    private resolveCompressionBackend;
}
export * from './runtime/worker.js';
export * from './runtime/worktree.js';
export * from './runtime/diff-preview.js';
export * from './runtime/ghost-pass.js';
export declare function summarizeExecution(run: ExecutionRun): string;
export declare function executionStats(run: ExecutionRun): {
    verifiedWorkers: number;
    modifiedFiles: number;
    totalLearnings: number;
    memoryStats?: MemoryStats | Record<string, unknown>;
};
export declare const createSubAgentRuntime: (options?: SubAgentRuntimeOptions) => SubAgentRuntime;
