import type { ContextOperationRequest } from '../context.ts'; import type { EngineInternals } from './internals.ts'; import type { ActivityOperationCallbacks } from './operations-activity.ts'; import type { OperationWithCallerStack } from './operations-router.ts'; type MemoOperation = Extract; type OffloadOperation = Extract; type LoadOperation = Extract; type ArchiveOperation = Extract; export type DataOperationCallbacks = { runOperationWithResult: (workflowId: string, operation: OperationWithCallerStack, execute: () => Promise) => Promise; persistCheckpoint: (workflowId: string, operation: ContextOperationRequest) => Promise; getActivityOperationCallbacks?: () => ActivityOperationCallbacks; }; export declare function processMemoOperation(internals: EngineInternals, workflowId: string, operation: MemoOperation, callbacks: DataOperationCallbacks): Promise; export declare function processOffloadOperation(internals: EngineInternals, workflowId: string, operation: OffloadOperation, callbacks: DataOperationCallbacks): Promise; export declare function processLoadOperation(internals: EngineInternals, workflowId: string, operation: LoadOperation, callbacks: DataOperationCallbacks): Promise; /** * Read an offloaded value back out of storage by `workflowId` + `key`, decoding * it with the same codec {@link processOffloadOperation} wrote it with. * * This is the post-completion sibling of the in-workflow `ctx.load()` read * (see {@link processLoadOperation}): `ctx.load()` is restricted to the running * workflow's own offloads and throws on a miss, whereas this external reader * lets a consumer read a *terminal* workflow's offloaded output after * `handle.result()` resolves — the artifact survives normal completion * (`completeWorkflow`/`failWorkflow` preserve `offload:` keys) and is swept only * when the workflow is terminated/cancelled. * * @returns The decoded offload value, or `null` when no value is stored under * that key (either the key was never written, or the artifact was swept). */ export declare function getOffloadFromInternals(internals: EngineInternals, workflowId: string, key: string): Promise; export declare function processArchiveOperation(internals: EngineInternals, workflowId: string, operation: ArchiveOperation, callbacks: DataOperationCallbacks): Promise; export {};