/** * Projects a converted {@link RegistryWorkflowEntry} into the * `core/contract` {@link WorkflowContract} shape {@link buildRegistrySnapshot} * feeds to `buildWorkflowRevisionManifest`. * * Split out of `core/registry-snapshot.ts` specifically to stay under the * repository's implementation-file-size ceiling once WFT-6's workflow-scoped * activity folding (`buildRegistrySnapshot` reading * `Engine.listWorkflowActivityDefinitions`) was added there. * * @module core/registry-workflow-contract-draft */ import type { WorkflowActivityContract, WorkflowContract } from './contract/index.ts'; import type { RegistryWorkflowEntry } from './registry-snapshot.ts'; /** * Project a converted {@link RegistryWorkflowEntry} (schemas already turned * into JSON Schema by `buildWorkflowEntry`) into the `core/contract` * {@link WorkflowContract} shape `buildWorkflowRevisionManifest` consumes. * Deliberately does not re-run schema conversion — `entry`'s schemas are * already `Record` JSON Schema, structurally identical to * what `WorkflowContract` expects, so re-converting through * `buildWorkflowContract` (which expects raw `DefinitionSchema`) would * double-convert and risk a different error shape for the same failure. * * `workflowScopedActivities`, when non-empty, becomes the draft's * `activities` — the workflow's own `.activities({...})` registrations * (`Engine.listWorkflowActivityDefinitions`), never the flat, * workflow-independent `RegistrySnapshot.activities` catalog. Omitted * (rather than `{}`) when empty, matching this module's "absent fields * omitted" convention. */ export declare function toWorkflowContractDraft(workflowType: string, workflowVersion: string, entry: RegistryWorkflowEntry, workflowScopedActivities: Readonly>): WorkflowContract;