import type { WorkflowCallStep, WorkflowConfig } from '../../../core/models/index.js'; import type { WorkflowCallResolver } from '../../../core/workflow/types.js'; import type { RunPaths } from '../../../core/workflow/run/run-paths.js'; /** * Inspection must not turn a persisted run into an unbounded JSON parser. * These limits are deliberately per-file so a normal bundle may still contain * many nodes/resources while a single manifest/object cannot exhaust memory. */ export declare const MAX_WORKFLOW_BUNDLE_MANIFEST_BYTES: number; export declare const MAX_WORKFLOW_BUNDLE_OBJECT_BYTES: number; /** * Resource descriptors are validated before a full execution loader allocates * their contents. The metadata-only reader uses the same bounds while it * intentionally never reads resource bytes. */ export declare const MAX_WORKFLOW_BUNDLE_RESOURCE_BYTES: number; export declare const MAX_WORKFLOW_BUNDLE_RESOURCES_BYTES: number; interface BundleManifest { readonly version: 1; readonly root: { readonly nodeId: string; readonly workflowName: string; readonly originalWorkflowRef: string; }; readonly nodes: Readonly>; readonly resources: Readonly>; } export interface PreparedWorkflowExecutionBundle { readonly manifest: BundleManifest; readonly objects: ReadonlyMap; readonly resources: ReadonlyMap; } export interface LoadedWorkflowExecutionBundle { readonly manifest: BundleManifest; readonly rootWorkflow: WorkflowConfig; /** Every verified node config, including parallel/fixed/pool children. */ readonly workflows: readonly WorkflowConfig[]; readonly workflowCallResolver: WorkflowCallResolver; readonly prepared: PreparedWorkflowExecutionBundle; readonly resourceRoot: string; } export interface LoadedWorkflowExecutionBundleMetadata { readonly manifest: BundleManifest; readonly rootWorkflow: WorkflowConfig; /** Every verified node config, including parallel/fixed/pool children. */ readonly workflows: readonly WorkflowConfig[]; } export declare function prepareWorkflowExecutionBundle(input: { readonly rootWorkflow: WorkflowConfig; readonly workflowCallResolver: WorkflowCallResolver; readonly projectCwd: string; readonly lookupCwd: string; /** Reject durable legacy MCP credential literals for central state runs. */ readonly centralExecution?: boolean; readonly rootWorkflowRefOverride?: string; readonly workflowRefResolver?: (workflow: WorkflowConfig, context: undefined | { readonly parentWorkflowRef: string; readonly step: WorkflowCallStep; }) => string | undefined; }): PreparedWorkflowExecutionBundle; export declare function publishWorkflowExecutionBundle(runPaths: RunPaths, prepared: PreparedWorkflowExecutionBundle): void; export declare function loadWorkflowExecutionBundle(runPaths: RunPaths): LoadedWorkflowExecutionBundle; /** * Validate the persisted bundle identity and workflow graph for read-only * inspection without materializing any prompt/arpeggio resource bytes. */ export declare function loadWorkflowExecutionBundleMetadata(runPaths: RunPaths): LoadedWorkflowExecutionBundleMetadata; /** * Read-only consumers such as the Web UI intentionally fail closed when a * legacy, missing, or corrupted bundle cannot pass the same validation used * by execution. Execution callers should continue using the throwing loader * so corruption remains visible at the execution boundary. */ export declare function tryLoadWorkflowExecutionBundle(runPaths: RunPaths): LoadedWorkflowExecutionBundle | undefined; export declare function tryLoadWorkflowExecutionBundleMetadata(runPaths: RunPaths): LoadedWorkflowExecutionBundleMetadata | undefined; export {}; //# sourceMappingURL=workflowExecutionBundle.d.ts.map