import type { OperationExecutionContext } from '@cleocode/contracts/jobs'; import { type DocsProjectionCapture, type DocsProjectionOutcome, type DocsProjectionPreparation, type DocsProjectionReceipt, type DocsProjectionSource } from '@cleocode/contracts/operations/docs'; /** * Capture a canonical project identity and one optional-maintenance deadline before storage. * @param projectRoot - Explicit root captured synchronously by the calling surface. * @param actor - Foreground caller provenance. * @param idempotencyKey - Immutable operation key; explicit resume reuses the prepared job identity. * @param budgetMs - Shared foreground budget, defaulting to two seconds. * @returns Captured scope or explicit missing coverage; no guessed project identity. * @throws RangeError when the caller supplies an invalid foreground budget. * @remarks The metadata read is read-only. Its elapsed time is charged to the same * deadline; slow filesystem I/O is not claimed to be synchronously preempted. Missing, * malformed or mismatched identity never prevents the independent canonical attachment write. * @example * ```ts * const captured = await captureDocumentProjection(root, actor, invocationId); * ``` */ export declare function captureDocumentProjection(projectRoot: string, actor: string, idempotencyKey: string, budgetMs?: number): Promise; /** * Persist authentic optional work before an executor can be scheduled. * * @param context - Captured project, actor, retry identity and shared deadline. * @param source - Canonical attachment and owner to independently verify. * @returns Durable pending or coalesced job identity, never projection completion. * @throws Error - Missing/changed canonical evidence, cancellation, storage or retry conflict. * @remarks Canonical bytes are only read. The existing job store owns the atomic * proposal insertion and immutable retry check. No executor, embedding or model * starts here. An admitted synchronous store call cannot be timer-preempted; * committed preparation is returned with its actual deadline observation. * @example * ```ts * const pending = await prepareDocumentProjection(context, source); * // Inspect pending.jobId before explicitly resuming this domain operation. * ``` */ export declare function prepareDocumentProjection(context: OperationExecutionContext, source: DocsProjectionSource): Promise; /** * Execute only the authentic supported document proposal using its original foreground scope. * @param context - Captured routing and shared lifetime; a resume may use a new caller lifetime. * @param jobId - Existing durable pending or explicitly expired job identity. * @returns Actual verified domain result after the existing job store records completion. * @throws Error on stale inputs, ownership, cancellation, unavailable workers or verification failure. * @remarks The graph writes (node, canonical `documents` edge, optional `embeds` edge) commit * separately and are idempotent; a lost acknowledgement leaves the job inspectable and requires * explicit resume after expiry. Since T13985 no "Doc attached" observation is written. * No uncertain worker write is replayed inline and no model is used. The receipt is not an * atomic cross-database repair guarantee. Synchronous SQLite is cooperatively guarded only. * @example * ```ts * const receipt = await resumeDocumentProjection(capturedContext, pending.jobId); * ``` */ export declare function resumeDocumentProjection(context: OperationExecutionContext, jobId: string): Promise; /** * Prepare authentic optional work and observe its execution within one shared budget. * @param context - Context captured before canonical attachment storage or other awaits. * @param source - The accepted canonical attachment, preserved on every optional failure. * @returns Explicit completion, durable pending identity, or a diagnostic with missing preparation. * @remarks A timeout ends observation, not arbitrary work. The hardcoded domain executor * guards later handles and writes; teardown cancellation reaches its worker. No model starts. * @example * ```ts * const projection = await projectDocumentAttachment(context, acceptedSource); * ``` */ export declare function projectDocumentAttachment(context: OperationExecutionContext, source: DocsProjectionSource): Promise; //# sourceMappingURL=projection.d.ts.map