@powerhousedao/workflow 6.2.3-dev.54 → 6.2.3-dev.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{BlockSelector-CzJnQWsh.js → BlockSelector-DnBab95a.js} +3 -3
- package/dist/browser/{BlockSelector-CzJnQWsh.js.map → BlockSelector-DnBab95a.js.map} +1 -1
- package/dist/browser/block-type-kX-27vVt.js +44 -0
- package/dist/browser/block-type-kX-27vVt.js.map +1 -0
- package/dist/browser/{connection-BP17lpt3.js → connection-BXV8I017.js} +2 -2
- package/dist/browser/{connection-BP17lpt3.js.map → connection-BXV8I017.js.map} +1 -1
- package/dist/browser/{connection-form-cCgfAa1A.js → connection-form-Cy2fyFUR.js} +24 -28
- package/dist/browser/connection-form-Cy2fyFUR.js.map +1 -0
- package/dist/browser/{data-tree-S_SwaRve.js → data-tree-BvFLAMyE.js} +2 -2
- package/dist/browser/{data-tree-S_SwaRve.js.map → data-tree-BvFLAMyE.js.map} +1 -1
- package/dist/browser/document-models/connection/index.js +3 -3
- package/dist/browser/document-models/index.js +3 -3
- package/dist/browser/document-models/workflow/index.js +3 -3
- package/dist/browser/{document-models-B08jDa_s.js → document-models-DAAo3Bln.js} +40 -6
- package/dist/browser/{document-models-B08jDa_s.js.map → document-models-DAAo3Bln.js.map} +1 -1
- package/dist/browser/{editor-CQyfDOIN.js → editor-CEJO-2Ue.js} +138 -127
- package/dist/browser/editor-CEJO-2Ue.js.map +1 -0
- package/dist/{node/editor-EeTeVS3A.mjs → browser/editor-DVBnS8YM.js} +360 -319
- package/dist/browser/editor-DVBnS8YM.js.map +1 -0
- package/dist/browser/{editor-CVXRNht0.js → editor-Dc9Q55q1.js} +7 -7
- package/dist/browser/{editor-CVXRNht0.js.map → editor-Dc9Q55q1.js.map} +1 -1
- package/dist/browser/editors/connection-editor/module.js +1 -1
- package/dist/browser/editors/runtime/index.js +2 -0
- package/dist/browser/editors/workflow-editor/module.js +1 -1
- package/dist/browser/editors/workflow-studio/module.js +1 -1
- package/dist/browser/index.js +4 -4
- package/dist/browser/{module-B2BMwu5E.js → module-DIQ3tQ2M.js} +97 -2
- package/dist/browser/module-DIQ3tQ2M.js.map +1 -0
- package/dist/browser/{module-ozS5EVRx.js → module-DxQBeqBh.js} +211 -83
- package/dist/browser/module-DxQBeqBh.js.map +1 -0
- package/dist/browser/reactor/index.js +2 -2
- package/dist/browser/{runtime-queries-2hn7fcKn.js → runtime-queries-DehIdatq.js} +3 -3
- package/dist/browser/{runtime-queries-2hn7fcKn.js.map → runtime-queries-DehIdatq.js.map} +1 -1
- package/dist/browser/{trigger-text-Cfyx8tMq.js → trigger-text-CfRbN-DV.js} +5 -5
- package/dist/browser/trigger-text-CfRbN-DV.js.map +1 -0
- package/dist/browser/upgrade-manifests-CAE3ivDp.js +8 -0
- package/dist/browser/{upgrade-manifests-DHGmgHKW.js.map → upgrade-manifests-CAE3ivDp.js.map} +1 -1
- package/dist/browser/{workflow-DoewHe4K.js → workflow-C003Wutu.js} +2 -2
- package/dist/browser/{workflow-DoewHe4K.js.map → workflow-C003Wutu.js.map} +1 -1
- package/dist/node/{BlockSelector-g9m3yaJj.mjs → BlockSelector-B77i85CO.mjs} +3 -3
- package/dist/node/{BlockSelector-g9m3yaJj.mjs.map → BlockSelector-B77i85CO.mjs.map} +1 -1
- package/dist/node/block-type-kX-27vVt.mjs +44 -0
- package/dist/node/block-type-kX-27vVt.mjs.map +1 -0
- package/dist/node/{connection-BxJoL8js.mjs → connection-BzW9OpKx.mjs} +2 -2
- package/dist/node/{connection-BxJoL8js.mjs.map → connection-BzW9OpKx.mjs.map} +1 -1
- package/dist/node/{connection-form-h0PidbTI.mjs → connection-form-BCwEO3ll.mjs} +24 -28
- package/dist/node/connection-form-BCwEO3ll.mjs.map +1 -0
- package/dist/node/{data-tree-CKKeR7qj.mjs → data-tree-CH8KnNSz.mjs} +2 -2
- package/dist/node/{data-tree-CKKeR7qj.mjs.map → data-tree-CH8KnNSz.mjs.map} +1 -1
- package/dist/node/document-models/connection/index.mjs +3 -3
- package/dist/node/document-models/index.mjs +3 -3
- package/dist/node/document-models/workflow/index.mjs +3 -3
- package/dist/node/{editor-BAbYXi7T.mjs → editor-BYzFMCB8.mjs} +7 -7
- package/dist/node/{editor-BAbYXi7T.mjs.map → editor-BYzFMCB8.mjs.map} +1 -1
- package/dist/{browser/editor-CbpyTAEC.js → node/editor-CsMRho-A.mjs} +360 -319
- package/dist/node/editor-CsMRho-A.mjs.map +1 -0
- package/dist/node/{editor-DCsT8WsQ.mjs → editor-DtLyolUn.mjs} +138 -127
- package/dist/node/editor-DtLyolUn.mjs.map +1 -0
- package/dist/node/editors/connection-editor/module.mjs +1 -1
- package/dist/node/editors/runtime/index.mjs +2 -0
- package/dist/node/editors/workflow-editor/module.mjs +1 -1
- package/dist/node/editors/workflow-studio/module.mjs +1 -1
- package/dist/node/index.mjs +41 -7
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/{module-BlT-atBQ.mjs → module-Bl_4mnxR.mjs} +97 -2
- package/dist/node/module-Bl_4mnxR.mjs.map +1 -0
- package/dist/node/{module-uKdoLIga.mjs → module-DPg8IYIn.mjs} +211 -83
- package/dist/node/module-DPg8IYIn.mjs.map +1 -0
- package/dist/node/pieces/reactor/descriptor.json +1 -1
- package/dist/node/pieces/reactor/package.json +1 -1
- package/dist/node/{runtime-queries-BtTx8FU3.mjs → runtime-queries-CJSpbsBq.mjs} +3 -3
- package/dist/node/{runtime-queries-BtTx8FU3.mjs.map → runtime-queries-CJSpbsBq.mjs.map} +1 -1
- package/dist/node/{trigger-text-CtSXg0KB.mjs → trigger-text-C6BlOwck.mjs} +5 -5
- package/dist/node/trigger-text-C6BlOwck.mjs.map +1 -0
- package/dist/node/upgrade-manifests-7SFwDrhd.mjs +8 -0
- package/dist/node/{upgrade-manifests-D-pLniUG.mjs.map → upgrade-manifests-7SFwDrhd.mjs.map} +1 -1
- package/dist/node/{workflow-Dy-309pE.mjs → workflow-7pmOvHmg.mjs} +2 -2
- package/dist/node/{workflow-Dy-309pE.mjs.map → workflow-7pmOvHmg.mjs.map} +1 -1
- package/dist/powerhouse.manifest.json +38 -4
- package/dist/style.css +29 -14
- package/dist/types/document-models/connection/v1/actions.d.ts +2 -0
- package/dist/types/document-models/connection/v1/actions.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/config/actions.d.ts +10 -2
- package/dist/types/document-models/connection/v1/gen/config/actions.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/config/creators.d.ts +4 -2
- package/dist/types/document-models/connection/v1/gen/config/creators.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/config/error.d.ts +15 -1
- package/dist/types/document-models/connection/v1/gen/config/error.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/config/operations.d.ts +3 -1
- package/dist/types/document-models/connection/v1/gen/config/operations.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/document-model.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/reducer.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/schema/types.d.ts +7 -0
- package/dist/types/document-models/connection/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts +3 -1
- package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/module.d.ts +2 -0
- package/dist/types/document-models/connection/v1/module.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/src/reducers/config.d.ts.map +1 -1
- package/dist/types/document-models/connection/v1/tests/config-values.test.d.ts +2 -0
- package/dist/types/document-models/connection/v1/tests/config-values.test.d.ts.map +1 -0
- package/dist/types/document-models/document-models.d.ts +5 -0
- package/dist/types/document-models/document-models.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/actions.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/document-model.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/reducer.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts +16 -0
- package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts +5 -1
- package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/actions.d.ts +14 -2
- package/dist/types/document-models/workflow/v1/gen/trigger/actions.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/creators.d.ts +5 -2
- package/dist/types/document-models/workflow/v1/gen/trigger/creators.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts +32 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/operations.d.ts +4 -1
- package/dist/types/document-models/workflow/v1/gen/trigger/operations.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/module.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/src/reducers/trigger.d.ts.map +1 -1
- package/dist/types/document-models/workflow/v1/tests/trigger-fields.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/trigger-fields.test.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/ReactorConnectionSettings.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -1
- package/dist/types/editors/connection-editor/connection-form.d.ts +2 -2
- package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
- package/dist/types/editors/runtime/index.d.ts +21 -0
- package/dist/types/editors/runtime/index.d.ts.map +1 -0
- package/dist/types/editors/runtime/runtime-export.test.d.ts +2 -0
- package/dist/types/editors/runtime/runtime-export.test.d.ts.map +1 -0
- package/dist/types/editors/shared/pending-echo.d.ts +9 -0
- package/dist/types/editors/shared/pending-echo.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
- package/dist/types/editors/workflow-editor/ui/model.d.ts +6 -0
- package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/WorkflowGraph.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/chain.d.ts +3 -1
- package/dist/types/editors/workflow-studio/components/chain.d.ts.map +1 -1
- package/dist/types/editors/workflow-studio/components/tips.d.ts +23 -0
- package/dist/types/editors/workflow-studio/components/tips.d.ts.map +1 -0
- package/dist/types/scripts/ui-stack.d.ts.map +1 -1
- package/dist/types/test/ui/harness/property-form-echo.d.ts +12 -0
- package/dist/types/test/ui/harness/property-form-echo.d.ts.map +1 -0
- package/dist/types/test/ui/harness/schedule-builder.d.ts +8 -0
- package/dist/types/test/ui/harness/schedule-builder.d.ts.map +1 -0
- package/dist/types/test/ui/property-form-echo.spec.d.ts +2 -0
- package/dist/types/test/ui/property-form-echo.spec.d.ts.map +1 -0
- package/dist/types/test/ui/schedule-builder.spec.d.ts +2 -0
- package/dist/types/test/ui/schedule-builder.spec.d.ts.map +1 -0
- package/package.json +14 -8
- package/dist/browser/connection-form-cCgfAa1A.js.map +0 -1
- package/dist/browser/editor-CQyfDOIN.js.map +0 -1
- package/dist/browser/editor-CbpyTAEC.js.map +0 -1
- package/dist/browser/module-B2BMwu5E.js.map +0 -1
- package/dist/browser/module-ozS5EVRx.js.map +0 -1
- package/dist/browser/trigger-text-Cfyx8tMq.js.map +0 -1
- package/dist/browser/upgrade-manifests-DHGmgHKW.js +0 -8
- package/dist/node/connection-form-h0PidbTI.mjs.map +0 -1
- package/dist/node/editor-DCsT8WsQ.mjs.map +0 -1
- package/dist/node/editor-EeTeVS3A.mjs.map +0 -1
- package/dist/node/module-BlT-atBQ.mjs.map +0 -1
- package/dist/node/module-uKdoLIga.mjs.map +0 -1
- package/dist/node/trigger-text-CtSXg0KB.mjs.map +0 -1
- package/dist/node/upgrade-manifests-D-pLniUG.mjs +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-DPg8IYIn.mjs","names":["z","workflowWorkflowActions","workflowTriggerActions","workflowStepsActions","workflowEdgesActions","workflowVariablesActions","workflowPolicyActions","workflowRuntimeActions","workflowPublishingActions","utils","genUtils","customUtils"],"sources":["../../document-models/workflow/v1/gen/schema/zod.ts","../../document-models/workflow/v1/gen/edges/creators.ts","../../document-models/workflow/v1/gen/policy/creators.ts","../../document-models/workflow/v1/gen/publishing/creators.ts","../../document-models/workflow/v1/gen/runtime/creators.ts","../../document-models/workflow/v1/gen/steps/creators.ts","../../document-models/workflow/v1/gen/trigger/creators.ts","../../document-models/workflow/v1/gen/variables/creators.ts","../../document-models/workflow/v1/gen/workflow/creators.ts","../../document-models/workflow/v1/actions.ts","../../document-models/workflow/v1/gen/document-model.ts","../../document-models/workflow/v1/gen/edges/error.ts","../../document-models/workflow/v1/src/reducers/edges.ts","../../document-models/workflow/v1/src/reducers/policy.ts","../../document-models/workflow/v1/gen/publishing/error.ts","../../document-models/workflow/v1/src/helpers.ts","../../document-models/workflow/v1/src/reducers/publishing.ts","../../document-models/workflow/v1/gen/runtime/error.ts","../../document-models/workflow/v1/src/reducers/runtime.ts","../../document-models/workflow/v1/gen/steps/error.ts","../../document-models/workflow/v1/src/reducers/steps.ts","../../document-models/workflow/v1/gen/trigger/error.ts","../../document-models/workflow/v1/src/reducers/trigger.ts","../../document-models/workflow/v1/gen/variables/error.ts","../../document-models/workflow/v1/src/reducers/variables.ts","../../document-models/workflow/v1/gen/workflow/error.ts","../../document-models/workflow/v1/src/reducers/workflow.ts","../../document-models/workflow/v1/gen/reducer.ts","../../document-models/workflow/upgrades/versions.ts","../../document-models/workflow/upgrades/upgrade-manifest.ts","../../document-models/workflow/v1/gen/document-type.ts","../../document-models/workflow/v1/gen/document-schema.ts","../../document-models/workflow/v1/gen/utils.ts","../../document-models/workflow/v1/src/utils.ts","../../document-models/workflow/v1/utils.ts","../../document-models/workflow/v1/module.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-object-type */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport * as z from \"zod\";\nimport type {\n AddEdgeInput,\n AddStepInput,\n AddStepPositionInput,\n AddStepPropertySettingInput,\n AddStepRetryPolicyInput,\n BackoffKind,\n ClearTriggerInput,\n ConcurrencyMode,\n FailureMode,\n Point,\n PropertyMode,\n PropertySetting,\n PublishWorkflowInput,\n PublishedWorkflow,\n RemoveEdgeInput,\n RemoveStepInput,\n RemoveVariableInput,\n RetryPolicy,\n RevertToPublishedInput,\n RunStatus,\n SetLastRunInput,\n SetLastTestInput,\n SetPolicyInput,\n SetPolicyRetryPolicyInput,\n SetStepConfigInput,\n SetStepConfigPropertySettingInput,\n SetTriggerConfigInput,\n SetTriggerConfigPropertySettingInput,\n SetTriggerConnectionInput,\n SetTriggerInput,\n SetTriggerPieceVersionInput,\n SetTriggerPropertySettingInput,\n SetVariableInput,\n SetWorkflowDescriptionInput,\n SetWorkflowNameInput,\n SetWorkflowStatusInput,\n StepTestRecord,\n TriggerBinding,\n UpdateStepInput,\n UpdateStepPositionInput,\n UpdateStepRetryPolicyInput,\n VariableType,\n WorkflowEdge,\n WorkflowPolicy,\n WorkflowState,\n WorkflowStatus,\n WorkflowStep,\n WorkflowVariable,\n} from \"./types.js\";\n\ntype Properties<T> = Required<{\n [K in keyof T]: z.ZodType<T[K]>;\n}>;\n\ntype definedNonNullAny = {};\n\nexport const isDefinedNonNullAny = (v: any): v is definedNonNullAny =>\n v !== undefined && v !== null;\n\nexport const definedNonNullAnySchema = z\n .any()\n .refine((v) => isDefinedNonNullAny(v));\n\nexport const BackoffKindSchema = z.enum([\"EXPONENTIAL\", \"FIXED\"]);\n\nexport const ConcurrencyModeSchema = z.enum([\"PARALLEL\", \"QUEUE\", \"SINGLETON\"]);\n\nexport const FailureModeSchema = z.enum([\"IGNORE\", \"NOTIFY\", \"PARK\"]);\n\nexport const PropertyModeSchema = z.enum([\"EXPRESSION\", \"MANUAL\"]);\n\nexport const RunStatusSchema = z.enum([\n \"CANCELLED\",\n \"FAILED\",\n \"PARKED\",\n \"PENDING\",\n \"RUNNING\",\n \"SUCCEEDED\",\n \"WAITING\",\n]);\n\nexport const VariableTypeSchema = z.enum([\n \"BOOLEAN\",\n \"JSON\",\n \"NUMBER\",\n \"SECRET\",\n \"TEXT\",\n]);\n\nexport const WorkflowStatusSchema = z.enum([\n \"ARCHIVED\",\n \"DISABLED\",\n \"DRAFT\",\n \"ENABLED\",\n]);\n\nexport function AddEdgeInputSchema(): z.ZodObject<Properties<AddEdgeInput>> {\n return z.object({\n condition: z.string().nullish(),\n from: z.string(),\n id: z.string(),\n port: z.string(),\n to: z.string(),\n });\n}\n\nexport function AddStepInputSchema(): z.ZodObject<Properties<AddStepInput>> {\n return z.object({\n actionName: z.string(),\n config: z.unknown(),\n connectionId: z.string().nullish(),\n id: z.string(),\n idempotencyKeyExpression: z.string().nullish(),\n key: z.string(),\n name: z.string(),\n pieceName: z.string(),\n pieceVersion: z.string(),\n position: z.lazy(() => AddStepPositionInputSchema().nullish()),\n propertySettings: z\n .array(z.lazy(() => AddStepPropertySettingInputSchema()))\n .nullish(),\n reactorConnectionId: z.string().nullish(),\n retry: z.lazy(() => AddStepRetryPolicyInputSchema().nullish()),\n skip: z.boolean().nullish(),\n timeoutSeconds: z.number().nullish(),\n });\n}\n\nexport function AddStepPositionInputSchema(): z.ZodObject<\n Properties<AddStepPositionInput>\n> {\n return z.object({\n x: z.number(),\n y: z.number(),\n });\n}\n\nexport function AddStepPropertySettingInputSchema(): z.ZodObject<\n Properties<AddStepPropertySettingInput>\n> {\n return z.object({\n mode: PropertyModeSchema,\n prop: z.string(),\n schema: z.unknown().nullish(),\n });\n}\n\nexport function AddStepRetryPolicyInputSchema(): z.ZodObject<\n Properties<AddStepRetryPolicyInput>\n> {\n return z.object({\n backoff: BackoffKindSchema,\n initialDelaySeconds: z.number(),\n maxAttempts: z.number(),\n maxDelaySeconds: z.number(),\n retryOn: z.array(z.string()),\n });\n}\n\nexport function ClearTriggerInputSchema(): z.ZodObject<\n Properties<ClearTriggerInput>\n> {\n return z.object({\n _: z.boolean().nullish(),\n });\n}\n\nexport function PointSchema(): z.ZodObject<Properties<Point>> {\n return z.object({\n __typename: z.literal(\"Point\").optional(),\n x: z.number(),\n y: z.number(),\n });\n}\n\nexport function PropertySettingSchema(): z.ZodObject<\n Properties<PropertySetting>\n> {\n return z.object({\n __typename: z.literal(\"PropertySetting\").optional(),\n mode: PropertyModeSchema,\n prop: z.string(),\n schema: z.unknown().nullish(),\n });\n}\n\nexport function PublishWorkflowInputSchema(): z.ZodObject<\n Properties<PublishWorkflowInput>\n> {\n return z.object({\n publishedAt: z.iso.datetime(),\n });\n}\n\nexport function PublishedWorkflowSchema(): z.ZodObject<\n Properties<PublishedWorkflow>\n> {\n return z.object({\n __typename: z.literal(\"PublishedWorkflow\").optional(),\n edges: z.array(z.lazy(() => WorkflowEdgeSchema())),\n policy: z.lazy(() => WorkflowPolicySchema()),\n publishedAt: z.iso.datetime(),\n steps: z.array(z.lazy(() => WorkflowStepSchema())),\n trigger: z.lazy(() => TriggerBindingSchema().nullish()),\n variables: z.array(z.lazy(() => WorkflowVariableSchema())),\n version: z.number(),\n });\n}\n\nexport function RemoveEdgeInputSchema(): z.ZodObject<\n Properties<RemoveEdgeInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RemoveStepInputSchema(): z.ZodObject<\n Properties<RemoveStepInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RemoveVariableInputSchema(): z.ZodObject<\n Properties<RemoveVariableInput>\n> {\n return z.object({\n id: z.string(),\n });\n}\n\nexport function RetryPolicySchema(): z.ZodObject<Properties<RetryPolicy>> {\n return z.object({\n __typename: z.literal(\"RetryPolicy\").optional(),\n backoff: BackoffKindSchema,\n initialDelaySeconds: z.number(),\n maxAttempts: z.number(),\n maxDelaySeconds: z.number(),\n retryOn: z.array(z.string()),\n });\n}\n\nexport function RevertToPublishedInputSchema(): z.ZodObject<\n Properties<RevertToPublishedInput>\n> {\n return z.object({\n _: z.boolean().nullish(),\n });\n}\n\nexport function SetLastRunInputSchema(): z.ZodObject<\n Properties<SetLastRunInput>\n> {\n return z.object({\n lastRunAt: z.iso.datetime(),\n lastRunStatus: RunStatusSchema,\n });\n}\n\nexport function SetLastTestInputSchema(): z.ZodObject<\n Properties<SetLastTestInput>\n> {\n return z.object({\n id: z.string(),\n runId: z.string(),\n testedAt: z.iso.datetime(),\n });\n}\n\nexport function SetPolicyInputSchema(): z.ZodObject<\n Properties<SetPolicyInput>\n> {\n return z.object({\n concurrency: ConcurrencyModeSchema.nullish(),\n defaultRetry: z.lazy(() => SetPolicyRetryPolicyInputSchema().nullish()),\n journalAsDocument: z.boolean().nullish(),\n maxParallelRuns: z.number().nullish(),\n maxSuspensionDays: z.number().nullish(),\n onFailure: FailureModeSchema.nullish(),\n retainRunsDays: z.number().nullish(),\n runTimeoutSeconds: z.number().nullish(),\n });\n}\n\nexport function SetPolicyRetryPolicyInputSchema(): z.ZodObject<\n Properties<SetPolicyRetryPolicyInput>\n> {\n return z.object({\n backoff: BackoffKindSchema,\n initialDelaySeconds: z.number(),\n maxAttempts: z.number(),\n maxDelaySeconds: z.number(),\n retryOn: z.array(z.string()),\n });\n}\n\nexport function SetStepConfigInputSchema(): z.ZodObject<\n Properties<SetStepConfigInput>\n> {\n return z.object({\n config: z.unknown(),\n id: z.string(),\n propertySettings: z\n .array(z.lazy(() => SetStepConfigPropertySettingInputSchema()))\n .nullish(),\n });\n}\n\nexport function SetStepConfigPropertySettingInputSchema(): z.ZodObject<\n Properties<SetStepConfigPropertySettingInput>\n> {\n return z.object({\n mode: PropertyModeSchema,\n prop: z.string(),\n schema: z.unknown().nullish(),\n });\n}\n\nexport function SetTriggerConfigInputSchema(): z.ZodObject<\n Properties<SetTriggerConfigInput>\n> {\n return z.object({\n config: z.unknown(),\n propertySettings: z\n .array(z.lazy(() => SetTriggerConfigPropertySettingInputSchema()))\n .nullish(),\n });\n}\n\nexport function SetTriggerConfigPropertySettingInputSchema(): z.ZodObject<\n Properties<SetTriggerConfigPropertySettingInput>\n> {\n return z.object({\n mode: PropertyModeSchema,\n prop: z.string(),\n schema: z.unknown().nullish(),\n });\n}\n\nexport function SetTriggerConnectionInputSchema(): z.ZodObject<\n Properties<SetTriggerConnectionInput>\n> {\n return z.object({\n connectionId: z.string().nullish(),\n reactorConnectionId: z.string().nullish(),\n });\n}\n\nexport function SetTriggerInputSchema(): z.ZodObject<\n Properties<SetTriggerInput>\n> {\n return z.object({\n config: z.unknown(),\n connectionId: z.string().nullish(),\n id: z.string(),\n pieceName: z.string(),\n pieceVersion: z.string(),\n propertySettings: z\n .array(z.lazy(() => SetTriggerPropertySettingInputSchema()))\n .nullish(),\n reactorConnectionId: z.string().nullish(),\n triggerName: z.string(),\n });\n}\n\nexport function SetTriggerPieceVersionInputSchema(): z.ZodObject<\n Properties<SetTriggerPieceVersionInput>\n> {\n return z.object({\n pieceVersion: z.string(),\n });\n}\n\nexport function SetTriggerPropertySettingInputSchema(): z.ZodObject<\n Properties<SetTriggerPropertySettingInput>\n> {\n return z.object({\n mode: PropertyModeSchema,\n prop: z.string(),\n schema: z.unknown().nullish(),\n });\n}\n\nexport function SetVariableInputSchema(): z.ZodObject<\n Properties<SetVariableInput>\n> {\n return z.object({\n description: z.string().nullish(),\n id: z.string(),\n key: z.string(),\n type: VariableTypeSchema.nullish(),\n value: z.unknown().nullish(),\n });\n}\n\nexport function SetWorkflowDescriptionInputSchema(): z.ZodObject<\n Properties<SetWorkflowDescriptionInput>\n> {\n return z.object({\n description: z.string().nullish(),\n });\n}\n\nexport function SetWorkflowNameInputSchema(): z.ZodObject<\n Properties<SetWorkflowNameInput>\n> {\n return z.object({\n name: z.string(),\n });\n}\n\nexport function SetWorkflowStatusInputSchema(): z.ZodObject<\n Properties<SetWorkflowStatusInput>\n> {\n return z.object({\n status: WorkflowStatusSchema,\n });\n}\n\nexport function StepTestRecordSchema(): z.ZodObject<\n Properties<StepTestRecord>\n> {\n return z.object({\n __typename: z.literal(\"StepTestRecord\").optional(),\n runId: z.string(),\n testedAt: z.iso.datetime(),\n });\n}\n\nexport function TriggerBindingSchema(): z.ZodObject<\n Properties<TriggerBinding>\n> {\n return z.object({\n __typename: z.literal(\"TriggerBinding\").optional(),\n config: z.unknown(),\n connectionId: z.string().nullish(),\n id: z.string(),\n lastTest: z.lazy(() => StepTestRecordSchema().nullish()),\n pieceName: z.string(),\n pieceVersion: z.string(),\n propertySettings: z.array(z.lazy(() => PropertySettingSchema())).nullish(),\n reactorConnectionId: z.string().nullish(),\n triggerName: z.string(),\n updatedAt: z.iso.datetime().nullish(),\n });\n}\n\nexport function UpdateStepInputSchema(): z.ZodObject<\n Properties<UpdateStepInput>\n> {\n return z.object({\n actionName: z.string().nullish(),\n config: z.unknown().nullish(),\n connectionId: z.string().nullish(),\n id: z.string(),\n idempotencyKeyExpression: z.string().nullish(),\n key: z.string().nullish(),\n name: z.string().nullish(),\n pieceName: z.string().nullish(),\n pieceVersion: z.string().nullish(),\n position: z.lazy(() => UpdateStepPositionInputSchema().nullish()),\n reactorConnectionId: z.string().nullish(),\n retry: z.lazy(() => UpdateStepRetryPolicyInputSchema().nullish()),\n skip: z.boolean().nullish(),\n timeoutSeconds: z.number().nullish(),\n });\n}\n\nexport function UpdateStepPositionInputSchema(): z.ZodObject<\n Properties<UpdateStepPositionInput>\n> {\n return z.object({\n x: z.number(),\n y: z.number(),\n });\n}\n\nexport function UpdateStepRetryPolicyInputSchema(): z.ZodObject<\n Properties<UpdateStepRetryPolicyInput>\n> {\n return z.object({\n backoff: BackoffKindSchema,\n initialDelaySeconds: z.number(),\n maxAttempts: z.number(),\n maxDelaySeconds: z.number(),\n retryOn: z.array(z.string()),\n });\n}\n\nexport function WorkflowEdgeSchema(): z.ZodObject<Properties<WorkflowEdge>> {\n return z.object({\n __typename: z.literal(\"WorkflowEdge\").optional(),\n condition: z.string().nullish(),\n from: z.string(),\n id: z.string(),\n port: z.string(),\n to: z.string(),\n });\n}\n\nexport function WorkflowPolicySchema(): z.ZodObject<\n Properties<WorkflowPolicy>\n> {\n return z.object({\n __typename: z.literal(\"WorkflowPolicy\").optional(),\n concurrency: ConcurrencyModeSchema,\n defaultRetry: z.lazy(() => RetryPolicySchema()),\n journalAsDocument: z.boolean(),\n maxParallelRuns: z.number().nullish(),\n maxSuspensionDays: z.number(),\n onFailure: FailureModeSchema,\n retainRunsDays: z.number(),\n runTimeoutSeconds: z.number(),\n });\n}\n\nexport function WorkflowStateSchema(): z.ZodObject<Properties<WorkflowState>> {\n return z.object({\n __typename: z.literal(\"WorkflowState\").optional(),\n description: z.string().nullish(),\n edges: z.array(z.lazy(() => WorkflowEdgeSchema())),\n lastRunAt: z.iso.datetime().nullish(),\n lastRunStatus: RunStatusSchema.nullish(),\n name: z.string(),\n policy: z.lazy(() => WorkflowPolicySchema()),\n published: z.lazy(() => PublishedWorkflowSchema().nullish()),\n status: WorkflowStatusSchema,\n steps: z.array(z.lazy(() => WorkflowStepSchema())),\n trigger: z.lazy(() => TriggerBindingSchema().nullish()),\n variables: z.array(z.lazy(() => WorkflowVariableSchema())),\n version: z.number(),\n });\n}\n\nexport function WorkflowStepSchema(): z.ZodObject<Properties<WorkflowStep>> {\n return z.object({\n __typename: z.literal(\"WorkflowStep\").optional(),\n actionName: z.string(),\n config: z.unknown(),\n connectionId: z.string().nullish(),\n id: z.string(),\n idempotencyKeyExpression: z.string().nullish(),\n key: z.string(),\n lastTest: z.lazy(() => StepTestRecordSchema().nullish()),\n name: z.string(),\n pieceName: z.string(),\n pieceVersion: z.string(),\n position: z.lazy(() => PointSchema().nullish()),\n propertySettings: z.array(z.lazy(() => PropertySettingSchema())).nullish(),\n reactorConnectionId: z.string().nullish(),\n retry: z.lazy(() => RetryPolicySchema().nullish()),\n skip: z.boolean().nullish(),\n timeoutSeconds: z.number().nullish(),\n updatedAt: z.iso.datetime().nullish(),\n });\n}\n\nexport function WorkflowVariableSchema(): z.ZodObject<\n Properties<WorkflowVariable>\n> {\n return z.object({\n __typename: z.literal(\"WorkflowVariable\").optional(),\n description: z.string().nullish(),\n id: z.string(),\n key: z.string(),\n type: VariableTypeSchema.nullish(),\n value: z.unknown().nullish(),\n });\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport { AddEdgeInputSchema, RemoveEdgeInputSchema } from \"../schema/zod.js\";\nimport type { AddEdgeInput, RemoveEdgeInput } from \"../types.js\";\nimport type { AddEdgeAction, RemoveEdgeAction } from \"./actions.js\";\n\nexport const addEdge = (input: AddEdgeInput) =>\n createAction<AddEdgeAction>(\n \"ADD_EDGE\",\n { ...input },\n undefined,\n AddEdgeInputSchema,\n \"global\",\n );\n\nexport const removeEdge = (input: RemoveEdgeInput) =>\n createAction<RemoveEdgeAction>(\n \"REMOVE_EDGE\",\n { ...input },\n undefined,\n RemoveEdgeInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport { SetPolicyInputSchema } from \"../schema/zod.js\";\nimport type { SetPolicyInput } from \"../types.js\";\nimport type { SetPolicyAction } from \"./actions.js\";\n\nexport const setPolicy = (input: SetPolicyInput) =>\n createAction<SetPolicyAction>(\n \"SET_POLICY\",\n { ...input },\n undefined,\n SetPolicyInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n PublishWorkflowInputSchema,\n RevertToPublishedInputSchema,\n} from \"../schema/zod.js\";\nimport type { PublishWorkflowInput, RevertToPublishedInput } from \"../types.js\";\nimport type {\n PublishWorkflowAction,\n RevertToPublishedAction,\n} from \"./actions.js\";\n\nexport const publishWorkflow = (input: PublishWorkflowInput) =>\n createAction<PublishWorkflowAction>(\n \"PUBLISH_WORKFLOW\",\n { ...input },\n undefined,\n PublishWorkflowInputSchema,\n \"global\",\n );\n\nexport const revertToPublished = (input: RevertToPublishedInput) =>\n createAction<RevertToPublishedAction>(\n \"REVERT_TO_PUBLISHED\",\n { ...input },\n undefined,\n RevertToPublishedInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n SetLastRunInputSchema,\n SetLastTestInputSchema,\n} from \"../schema/zod.js\";\nimport type { SetLastRunInput, SetLastTestInput } from \"../types.js\";\nimport type { SetLastRunAction, SetLastTestAction } from \"./actions.js\";\n\nexport const setLastRun = (input: SetLastRunInput) =>\n createAction<SetLastRunAction>(\n \"SET_LAST_RUN\",\n { ...input },\n undefined,\n SetLastRunInputSchema,\n \"global\",\n );\n\nexport const setLastTest = (input: SetLastTestInput) =>\n createAction<SetLastTestAction>(\n \"SET_LAST_TEST\",\n { ...input },\n undefined,\n SetLastTestInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n AddStepInputSchema,\n RemoveStepInputSchema,\n SetStepConfigInputSchema,\n UpdateStepInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n AddStepInput,\n RemoveStepInput,\n SetStepConfigInput,\n UpdateStepInput,\n} from \"../types.js\";\nimport type {\n AddStepAction,\n RemoveStepAction,\n SetStepConfigAction,\n UpdateStepAction,\n} from \"./actions.js\";\n\nexport const addStep = (input: AddStepInput) =>\n createAction<AddStepAction>(\n \"ADD_STEP\",\n { ...input },\n undefined,\n AddStepInputSchema,\n \"global\",\n );\n\nexport const updateStep = (input: UpdateStepInput) =>\n createAction<UpdateStepAction>(\n \"UPDATE_STEP\",\n { ...input },\n undefined,\n UpdateStepInputSchema,\n \"global\",\n );\n\nexport const removeStep = (input: RemoveStepInput) =>\n createAction<RemoveStepAction>(\n \"REMOVE_STEP\",\n { ...input },\n undefined,\n RemoveStepInputSchema,\n \"global\",\n );\n\nexport const setStepConfig = (input: SetStepConfigInput) =>\n createAction<SetStepConfigAction>(\n \"SET_STEP_CONFIG\",\n { ...input },\n undefined,\n SetStepConfigInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n ClearTriggerInputSchema,\n SetTriggerConfigInputSchema,\n SetTriggerConnectionInputSchema,\n SetTriggerInputSchema,\n SetTriggerPieceVersionInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n ClearTriggerInput,\n SetTriggerConfigInput,\n SetTriggerConnectionInput,\n SetTriggerInput,\n SetTriggerPieceVersionInput,\n} from \"../types.js\";\nimport type {\n ClearTriggerAction,\n SetTriggerAction,\n SetTriggerConfigAction,\n SetTriggerConnectionAction,\n SetTriggerPieceVersionAction,\n} from \"./actions.js\";\n\nexport const setTrigger = (input: SetTriggerInput) =>\n createAction<SetTriggerAction>(\n \"SET_TRIGGER\",\n { ...input },\n undefined,\n SetTriggerInputSchema,\n \"global\",\n );\n\nexport const clearTrigger = (input: ClearTriggerInput) =>\n createAction<ClearTriggerAction>(\n \"CLEAR_TRIGGER\",\n { ...input },\n undefined,\n ClearTriggerInputSchema,\n \"global\",\n );\n\nexport const setTriggerConfig = (input: SetTriggerConfigInput) =>\n createAction<SetTriggerConfigAction>(\n \"SET_TRIGGER_CONFIG\",\n { ...input },\n undefined,\n SetTriggerConfigInputSchema,\n \"global\",\n );\n\nexport const setTriggerConnection = (input: SetTriggerConnectionInput) =>\n createAction<SetTriggerConnectionAction>(\n \"SET_TRIGGER_CONNECTION\",\n { ...input },\n undefined,\n SetTriggerConnectionInputSchema,\n \"global\",\n );\n\nexport const setTriggerPieceVersion = (input: SetTriggerPieceVersionInput) =>\n createAction<SetTriggerPieceVersionAction>(\n \"SET_TRIGGER_PIECE_VERSION\",\n { ...input },\n undefined,\n SetTriggerPieceVersionInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n RemoveVariableInputSchema,\n SetVariableInputSchema,\n} from \"../schema/zod.js\";\nimport type { RemoveVariableInput, SetVariableInput } from \"../types.js\";\nimport type { RemoveVariableAction, SetVariableAction } from \"./actions.js\";\n\nexport const setVariable = (input: SetVariableInput) =>\n createAction<SetVariableAction>(\n \"SET_VARIABLE\",\n { ...input },\n undefined,\n SetVariableInputSchema,\n \"global\",\n );\n\nexport const removeVariable = (input: RemoveVariableInput) =>\n createAction<RemoveVariableAction>(\n \"REMOVE_VARIABLE\",\n { ...input },\n undefined,\n RemoveVariableInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { createAction } from \"document-model\";\nimport {\n SetWorkflowDescriptionInputSchema,\n SetWorkflowNameInputSchema,\n SetWorkflowStatusInputSchema,\n} from \"../schema/zod.js\";\nimport type {\n SetWorkflowDescriptionInput,\n SetWorkflowNameInput,\n SetWorkflowStatusInput,\n} from \"../types.js\";\nimport type {\n SetWorkflowDescriptionAction,\n SetWorkflowNameAction,\n SetWorkflowStatusAction,\n} from \"./actions.js\";\n\nexport const setWorkflowName = (input: SetWorkflowNameInput) =>\n createAction<SetWorkflowNameAction>(\n \"SET_WORKFLOW_NAME\",\n { ...input },\n undefined,\n SetWorkflowNameInputSchema,\n \"global\",\n );\n\nexport const setWorkflowDescription = (input: SetWorkflowDescriptionInput) =>\n createAction<SetWorkflowDescriptionAction>(\n \"SET_WORKFLOW_DESCRIPTION\",\n { ...input },\n undefined,\n SetWorkflowDescriptionInputSchema,\n \"global\",\n );\n\nexport const setWorkflowStatus = (input: SetWorkflowStatusInput) =>\n createAction<SetWorkflowStatusAction>(\n \"SET_WORKFLOW_STATUS\",\n { ...input },\n undefined,\n SetWorkflowStatusInputSchema,\n \"global\",\n );\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { baseActions } from \"document-model\";\nimport {\n workflowEdgesActions,\n workflowPolicyActions,\n workflowPublishingActions,\n workflowRuntimeActions,\n workflowStepsActions,\n workflowTriggerActions,\n workflowVariablesActions,\n workflowWorkflowActions,\n} from \"./gen/creators.js\";\n\n/** Actions for the Workflow document model */\n\nexport const actions = {\n ...baseActions,\n ...workflowWorkflowActions,\n ...workflowTriggerActions,\n ...workflowStepsActions,\n ...workflowEdgesActions,\n ...workflowVariablesActions,\n ...workflowPolicyActions,\n ...workflowRuntimeActions,\n ...workflowPublishingActions,\n};\n","import type { DocumentModelGlobalState } from \"document-model\";\n\nexport const documentModel: DocumentModelGlobalState = {\n id: \"powerhouse/workflow\",\n name: \"Workflow\",\n author: {\n name: \"Powerhouse\",\n website: \"https://www.powerhouse.inc\",\n },\n extension: \".flow\",\n description:\n \"Workflow definition: trigger, steps, edges, variables and execution policy for the Powerhouse workflow automation runtime.\",\n specifications: [\n {\n state: {\n local: {\n schema: \"\",\n examples: [],\n initialValue: \"\",\n },\n global: {\n schema:\n 'enum WorkflowStatus {\\n DRAFT\\n ENABLED\\n DISABLED\\n ARCHIVED\\n}\\n\\nenum RunStatus {\\n PENDING\\n RUNNING\\n WAITING\\n SUCCEEDED\\n FAILED\\n CANCELLED\\n PARKED\\n}\\n\\nenum ConcurrencyMode {\\n SINGLETON\\n QUEUE\\n PARALLEL\\n}\\n\\nenum FailureMode {\\n PARK\\n NOTIFY\\n IGNORE\\n}\\n\\nenum BackoffKind {\\n FIXED\\n EXPONENTIAL\\n}\\n\\ntype RetryPolicy {\\n \"Attempts, not retries: 1 is no retry. Clamped to 10 by the runtime, since each attempt re-runs a side effect and holds the run\\'s worker slot.\"\\n maxAttempts: Int!\\n backoff: BackoffKind!\\n initialDelaySeconds: Int!\\n maxDelaySeconds: Int!\\n \"Error classes that are retryable, matched against the error\\'s class name or anywhere in its message, case-insensitively. EMPTY admits every error: an empty list with maxAttempts > 1 means retry, not never-retry.\"\\n retryOn: [String!]!\\n}\\n\\nenum PropertyMode {\\n \"The field\\'s own control.\"\\n MANUAL\\n \"The author switched the field to a free {{\\u2026}} expression.\"\\n EXPRESSION\\n}\\n\\ntype PropertySetting {\\n prop: String!\\n mode: PropertyMode!\\n \"Resolved DynamicProperties children, options stripped.\"\\n schema: Unknown\\n}\\n\\n\"Reference to the latest test run in the run store.\"\\ntype StepTestRecord {\\n runId: String!\\n testedAt: DateTime!\\n}\\n\\n\"Layout only. The runtime ignores it.\"\\ntype Point {\\n x: Float!\\n y: Float!\\n}\\n\\ntype TriggerBinding {\\n id: OID!\\n \"Package name of the trigger\\'s piece, e.g. \\'@powerhousedao/piece-core\\' or \\'@acme/piece-imap\\'.\"\\n pieceName: String!\\n \"Exact semver of the piece, e.g. \\'1.2.0\\'.\"\\n pieceVersion: String!\\n \"Trigger name within the piece, e.g. \\'schedule\\' or \\'new_message\\'.\"\\n triggerName: String!\\n \"Connection document id, when the trigger\\'s connector requires one.\"\\n connectionId: PHID\\n \"Reactor connection document id, when the trigger declares requireReactor.\"\\n reactorConnectionId: PHID\\n \"Validated against the trigger\\'s configSchema.\"\\n config: Unknown!\\n propertySettings: [PropertySetting!]\\n lastTest: StepTestRecord\\n \"Timestamp of the last real edit; a lastTest before it is stale.\"\\n updatedAt: DateTime\\n}\\n\\ntype WorkflowStep {\\n id: OID!\\n \"Author-visible label; unique within the workflow; used in expressions.\"\\n key: String!\\n name: String!\\n \"Package name of the step\\'s piece, e.g. \\'@powerhousedao/piece-core\\' or \\'@activepieces/piece-http\\'.\"\\n pieceName: String!\\n \"Exact semver of the piece, e.g. \\'0.11.19\\'.\"\\n pieceVersion: String!\\n \"Action name within the piece, e.g. \\'branch\\' or \\'send_request\\'.\"\\n actionName: String!\\n connectionId: PHID\\n \"Reactor connection document id, when the action declares requireReactor.\"\\n reactorConnectionId: PHID\\n config: Unknown!\\n \"ENFORCED. Per-step override of the workflow default retry policy.\"\\n retry: RetryPolicy\\n \"ENFORCED. Also raises the cap on each host call the step\\'s piece makes, which is never shorter than the step\\'s own timeout.\"\\n timeoutSeconds: Int\\n \"NOT YET ENFORCED. Expression yielding a stable key; two executions with the same key are one side effect. A fire is deduplicated on its trigger operation or a trigger item\\'s _dedupe_key, never on a step expression.\"\\n idempotencyKeyExpression: String\\n position: Point\\n propertySettings: [PropertySetting!]\\n lastTest: StepTestRecord\\n \"Skipped steps are passed over at run time.\"\\n skip: Boolean\\n \"Timestamp of the last real edit; a lastTest before it is stale.\"\\n updatedAt: DateTime\\n}\\n\\ntype WorkflowEdge {\\n id: OID!\\n \"Source step id, or the trigger id for the entry edge.\"\\n from: OID!\\n to: OID!\\n \"Output port of the source, one it declares: \\'next\\' and \\'error\\' for a piece action, \\'next\\' for the trigger, \\'true\\', \\'false\\' and \\'error\\' for a branch.\"\\n port: String!\\n \"Optional guard expression; the edge is taken only when it evaluates truthy.\"\\n condition: String\\n}\\n\\nenum VariableType {\\n TEXT\\n NUMBER\\n BOOLEAN\\n JSON\\n \"value is a secret-provider handle (the format of a connection SecretRef.ref), never the plaintext.\"\\n SECRET\\n}\\n\\ntype WorkflowVariable {\\n id: OID!\\n \"Name used in expressions.\"\\n key: String!\\n \"The value a run reads as variables.<key>.\"\\n value: Unknown\\n description: String\\n \"Null means untyped; consumers infer the kind of value it holds.\"\\n type: VariableType\\n}\\n\\ntype WorkflowPolicy {\\n \"ENFORCED. SINGLETON drops a firing while a run is active (journaled CANCELLED, not dropped silently); QUEUE serialises; PARALLEL runs concurrently.\"\\n concurrency: ConcurrencyMode!\\n \"ENFORCED under PARALLEL: how many runs of this workflow may execute at once; null is unbounded. SINGLETON and QUEUE are 1 by definition.\"\\n maxParallelRuns: Int\\n \"ENFORCED. Checked between steps and while a retry waits; past it the run ends CANCELLED.\"\\n runTimeoutSeconds: Int!\\n \"NOT YET ENFORCED. Bounds how long a run may stay suspended on a waitpoint - but nothing suspends: waitpoints, run.pause and generateResumeUrl all throw, so there is no suspended state to bound.\"\\n maxSuspensionDays: Int!\\n \"ENFORCED. The fallback for a step with no retry of its own.\"\\n defaultRetry: RetryPolicy!\\n \"ENFORCED. What happens to a run whose steps have all failed terminally: PARK takes the trigger out of the supervisor\\'s ENABLED set until the workflow is re-published or re-enabled, NOTIFY logs at error level (the only notification channel this engine has), IGNORE does nothing.\"\\n onFailure: FailureMode!\\n \"NOT YET ENFORCED per workflow. Retention is a journal-wide sweep on the relational handle, which has no reactor read to resolve a per-workflow window with; PH_WORKFLOWS_RUN_RETENTION_DAYS (30 days by default) is the control that applies.\"\\n retainRunsDays: Int!\\n \"NOT YET ENFORCED. The run journal is relational; there is no run document model to write.\"\\n journalAsDocument: Boolean!\\n}\\n\\n\"Snapshot of the draft taken by PUBLISH_WORKFLOW.\"\\ntype PublishedWorkflow {\\n \"Draft version the snapshot was taken at.\"\\n version: Int!\\n publishedAt: DateTime!\\n trigger: TriggerBinding\\n steps: [WorkflowStep!]!\\n edges: [WorkflowEdge!]!\\n variables: [WorkflowVariable!]!\\n policy: WorkflowPolicy!\\n}\\n\\ntype WorkflowState {\\n name: String!\\n description: String\\n \"Only ENABLED workflows get trigger instances.\"\\n status: WorkflowStatus!\\n \"Bumped on every draft edit; REVERT_TO_PUBLISHED resets it to published.version. A run records the version it executed.\"\\n version: Int!\\n trigger: TriggerBinding\\n steps: [WorkflowStep!]!\\n edges: [WorkflowEdge!]!\\n variables: [WorkflowVariable!]!\\n policy: WorkflowPolicy!\\n \"Last published snapshot; version !== published.version means unpublished changes.\"\\n published: PublishedWorkflow\\n \"Denormalised for inspectors; written by the runtime.\"\\n lastRunAt: DateTime\\n lastRunStatus: RunStatus\\n}',\n examples: [],\n initialValue:\n '{\\n \"name\": \"\",\\n \"description\": null,\\n \"status\": \"DRAFT\",\\n \"version\": 0,\\n \"trigger\": null,\\n \"steps\": [],\\n \"edges\": [],\\n \"variables\": [],\\n \"policy\": {\\n \"concurrency\": \"QUEUE\",\\n \"maxParallelRuns\": null,\\n \"runTimeoutSeconds\": 3600,\\n \"maxSuspensionDays\": 30,\\n \"defaultRetry\": {\\n \"maxAttempts\": 1,\\n \"backoff\": \"FIXED\",\\n \"initialDelaySeconds\": 5,\\n \"maxDelaySeconds\": 300,\\n \"retryOn\": []\\n },\\n \"onFailure\": \"PARK\",\\n \"retainRunsDays\": 30,\\n \"journalAsDocument\": false\\n },\\n \"published\": null,\\n \"lastRunAt\": null,\\n \"lastRunStatus\": null\\n}',\n },\n },\n modules: [\n {\n id: \"2bcbeac5-6a42-4dd7-ad9a-a11401acfa67\",\n name: \"workflow\",\n description: \"Workflow identity and lifecycle status.\",\n operations: [\n {\n id: \"63c4df18-df11-4f17-8afa-69da90129dd9\",\n name: \"SET_WORKFLOW_NAME\",\n description: \"Sets the workflow name.\",\n schema: \"input SetWorkflowNameInput {\\n name: String!\\n}\",\n template: \"Sets the workflow name.\",\n reducer: \"state.name = action.input.name;\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"2875c3ae-6fc6-4ebb-9274-6f8318227945\",\n name: \"SET_WORKFLOW_DESCRIPTION\",\n description: \"Sets or clears the workflow description.\",\n schema:\n \"input SetWorkflowDescriptionInput {\\n description: String\\n}\",\n template: \"Sets or clears the workflow description.\",\n reducer: \"state.description = action.input.description || null;\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"6b4f8fb2-db70-4707-985d-47cff171dbec\",\n name: \"SET_WORKFLOW_STATUS\",\n description:\n \"Sets the lifecycle status. The trigger supervisor watches this to create or tear down trigger instances.\",\n schema:\n \"input SetWorkflowStatusInput {\\n status: WorkflowStatus!\\n}\",\n template:\n \"Sets the lifecycle status. The trigger supervisor watches this to create or tear down trigger instances.\",\n reducer: \"state.status = action.input.status;\",\n errors: [\n {\n id: \"ceb06c52-61b3-4c92-826f-9d2f87fb64d6\",\n name: \"WorkflowNotPublishedError\",\n code: \"WORKFLOW_NOT_PUBLISHED\",\n description:\n \"ENABLED needs a published snapshot; publish the workflow first.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"e1dc35a8-a050-4773-a6a2-6b41f0a6210c\",\n name: \"trigger\",\n description: \"Binding of the workflow's single trigger.\",\n operations: [\n {\n id: \"f1f2ac35-7d6f-4b2c-b1a4-f220f290fdad\",\n name: \"SET_TRIGGER\",\n description:\n \"Sets or replaces the trigger binding. Omitted propertySettings and lastTest carry over when the id, piece, version and trigger name are unchanged.\",\n schema:\n \"input SetTriggerPropertySettingInput {\\n prop: String!\\n mode: PropertyMode!\\n schema: Unknown\\n}\\n\\ninput SetTriggerInput {\\n id: OID!\\n pieceName: String!\\n pieceVersion: String!\\n triggerName: String!\\n connectionId: PHID\\n reactorConnectionId: PHID\\n config: Unknown!\\n propertySettings: [SetTriggerPropertySettingInput!]\\n}\",\n template:\n \"Sets or replaces the trigger binding. Omitted propertySettings and lastTest carry over when the id, piece, version and trigger name are unchanged.\",\n reducer:\n \"state.trigger = {\\n id: action.input.id,\\n pieceName: action.input.pieceName,\\n pieceVersion: action.input.pieceVersion,\\n triggerName: action.input.triggerName,\\n connectionId: action.input.connectionId || null,\\n config: action.input.config,\\n filter: action.input.filter ?? null,\\n};\\nstate.version += 1;\",\n errors: [\n {\n id: \"2191e673-e5b7-4e27-921d-3534f95fc095\",\n name: \"InvalidTriggerBlockError\",\n code: \"INVALID_TRIGGER_BLOCK\",\n description:\n \"The trigger names no piece or trigger, or its piece version is not an exact semver.\",\n template: \"\",\n },\n {\n id: \"cf3fced2-61c0-41a1-a0de-664ee00b2e25\",\n name: \"TriggerConfigNotObjectError\",\n code: \"TRIGGER_CONFIG_NOT_OBJECT\",\n description: \"The trigger's config is not a JSON object.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"351e16a9-78c3-4466-a25f-e8b09eb0b956\",\n name: \"CLEAR_TRIGGER\",\n description: \"Removes the trigger binding.\",\n schema: \"input ClearTriggerInput {\\n _: Boolean\\n}\",\n template: \"Removes the trigger binding.\",\n reducer:\n 'if (!state.trigger) {\\n throw new TriggerNotSetError(\"Workflow has no trigger to clear\");\\n}\\nstate.trigger = null;\\nstate.version += 1;',\n errors: [\n {\n id: \"fe485734-5e01-4af9-aaa9-adcc45e3160a\",\n name: \"TriggerNotSetError\",\n code: \"TRIGGER_NOT_SET\",\n description: \"The workflow has no trigger binding to clear.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"0a3d9845-efae-4044-b982-e7c653d1c40f\",\n name: \"SET_TRIGGER_CONFIG\",\n description:\n \"Replaces the trigger's block configuration, and optionally its property settings. The binding and connections stay as they are.\",\n schema:\n \"input SetTriggerConfigPropertySettingInput {\\n prop: String!\\n mode: PropertyMode!\\n schema: Unknown\\n}\\n\\ninput SetTriggerConfigInput {\\n config: Unknown!\\n propertySettings: [SetTriggerConfigPropertySettingInput!]\\n}\",\n template:\n \"Replaces the trigger's block configuration, and optionally its property settings. The binding and connections stay as they are.\",\n reducer: \"\",\n errors: [\n {\n id: \"b7896214-5bca-45ce-ac86-81da570070e7\",\n name: \"ConfigTriggerNotSetError\",\n code: \"CONFIG_TRIGGER_NOT_SET\",\n description: \"The workflow has no trigger to configure.\",\n template: \"\",\n },\n {\n id: \"ca5698b1-74c6-4abf-9712-db3010fa61cd\",\n name: \"SetTriggerConfigNotObjectError\",\n code: \"SET_TRIGGER_CONFIG_NOT_OBJECT\",\n description: \"The trigger's config is not a JSON object.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"14cb5145-22b9-47b9-8356-1fc59b52bf4b\",\n name: \"SET_TRIGGER_CONNECTION\",\n description:\n \"Sets the trigger's connections. Null clears one; an omitted one stays as it is.\",\n schema:\n \"input SetTriggerConnectionInput {\\n connectionId: PHID\\n reactorConnectionId: PHID\\n}\",\n template:\n \"Sets the trigger's connections. Null clears one; an omitted one stays as it is.\",\n reducer: \"\",\n errors: [\n {\n id: \"dc9f0c47-5091-44ae-b3f9-c9f658a50ce3\",\n name: \"ConnectionTriggerNotSetError\",\n code: \"CONNECTION_TRIGGER_NOT_SET\",\n description: \"The workflow has no trigger to connect.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"7ea44254-4aa1-4019-a2ce-0576418bcde0\",\n name: \"SET_TRIGGER_PIECE_VERSION\",\n description:\n \"Moves the trigger to another version of its piece, keeping its config, connections and property settings.\",\n schema:\n \"input SetTriggerPieceVersionInput {\\n pieceVersion: String!\\n}\",\n template:\n \"Moves the trigger to another version of its piece, keeping its config, connections and property settings.\",\n reducer: \"\",\n errors: [\n {\n id: \"f530e924-bfdd-4588-b7f5-73d087f162c2\",\n name: \"VersionTriggerNotSetError\",\n code: \"VERSION_TRIGGER_NOT_SET\",\n description: \"The workflow has no trigger to update.\",\n template: \"\",\n },\n {\n id: \"2e0bb17c-418b-459a-96e7-c0fc341fea46\",\n name: \"InvalidTriggerPieceVersionError\",\n code: \"INVALID_TRIGGER_PIECE_VERSION\",\n description: \"The piece version is not an exact semver.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"e3c8b542-657d-44b9-ad8c-472f8e01dbbf\",\n name: \"steps\",\n description: \"Step instances of blocks in the workflow graph.\",\n operations: [\n {\n id: \"d71c412f-9c48-4c1d-9d5b-f7c3cd18cecc\",\n name: \"ADD_STEP\",\n description: \"Adds a step to the workflow graph.\",\n schema:\n \"input AddStepRetryPolicyInput {\\n maxAttempts: Int!\\n backoff: BackoffKind!\\n initialDelaySeconds: Int!\\n maxDelaySeconds: Int!\\n retryOn: [String!]!\\n}\\n\\ninput AddStepPositionInput {\\n x: Float!\\n y: Float!\\n}\\n\\ninput AddStepPropertySettingInput {\\n prop: String!\\n mode: PropertyMode!\\n schema: Unknown\\n}\\n\\ninput AddStepInput {\\n id: OID!\\n key: String!\\n name: String!\\n pieceName: String!\\n pieceVersion: String!\\n actionName: String!\\n connectionId: PHID\\n reactorConnectionId: PHID\\n config: Unknown!\\n retry: AddStepRetryPolicyInput\\n timeoutSeconds: Int\\n idempotencyKeyExpression: String\\n position: AddStepPositionInput\\n skip: Boolean\\n propertySettings: [AddStepPropertySettingInput!]\\n}\",\n template: \"Adds a step to the workflow graph.\",\n reducer:\n 'if (state.steps.some((step) => step.id === action.input.id)) {\\n throw new DuplicateStepIdError(\"A step with this id already exists\");\\n}\\nif (state.steps.some((step) => step.key === action.input.key)) {\\n throw new DuplicateStepKeyError(\"A step with this key already exists\");\\n}\\nstate.steps.push({\\n id: action.input.id,\\n key: action.input.key,\\n name: action.input.name,\\n pieceName: action.input.pieceName,\\n pieceVersion: action.input.pieceVersion,\\n actionName: action.input.actionName,\\n connectionId: action.input.connectionId || null,\\n config: action.input.config,\\n retry: action.input.retry ?? null,\\n timeoutSeconds: action.input.timeoutSeconds ?? null,\\n idempotencyKeyExpression: action.input.idempotencyKeyExpression || null,\\n position: action.input.position ?? null,\\n});\\nstate.version += 1;',\n errors: [\n {\n id: \"9f42bbac-54a9-42bc-b6e6-86f158d1a474\",\n name: \"DuplicateStepIdError\",\n code: \"DUPLICATE_STEP_ID\",\n description: \"A step with the given id already exists.\",\n template: \"\",\n },\n {\n id: \"e9ef62ad-2b63-43f7-ac25-b0ab81f833c5\",\n name: \"DuplicateStepKeyError\",\n code: \"DUPLICATE_STEP_KEY\",\n description: \"A step with the given key already exists.\",\n template: \"\",\n },\n {\n id: \"62bbe509-cb42-47b4-92a9-9f407cee5128\",\n name: \"InvalidStepBlockError\",\n code: \"INVALID_STEP_BLOCK\",\n description:\n \"The step names no piece or action, or its piece version is not an exact semver.\",\n template: \"\",\n },\n {\n id: \"a802cfa8-43e7-4d4d-a1eb-13f6406dde63\",\n name: \"StepConfigNotObjectError\",\n code: \"STEP_CONFIG_NOT_OBJECT\",\n description: \"The new step's config is not a JSON object.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"12b4dad9-4a89-4a94-b2ff-fadbf492f555\",\n name: \"UPDATE_STEP\",\n description: \"Updates the provided fields of an existing step.\",\n schema:\n \"input UpdateStepRetryPolicyInput {\\n maxAttempts: Int!\\n backoff: BackoffKind!\\n initialDelaySeconds: Int!\\n maxDelaySeconds: Int!\\n retryOn: [String!]!\\n}\\n\\ninput UpdateStepPositionInput {\\n x: Float!\\n y: Float!\\n}\\n\\ninput UpdateStepInput {\\n id: OID!\\n key: String\\n name: String\\n pieceName: String\\n pieceVersion: String\\n actionName: String\\n connectionId: PHID\\n reactorConnectionId: PHID\\n config: Unknown\\n retry: UpdateStepRetryPolicyInput\\n timeoutSeconds: Int\\n idempotencyKeyExpression: String\\n position: UpdateStepPositionInput\\n skip: Boolean\\n}\",\n template: \"Updates the provided fields of an existing step.\",\n reducer:\n 'const step = state.steps.find((step) => step.id === action.input.id);\\nif (!step) {\\n throw new StepNotFoundError(\"Step not found\");\\n}\\nif (action.input.key) {\\n const conflict = state.steps.some(\\n (other) => other.key === action.input.key && other.id !== action.input.id,\\n );\\n if (conflict) {\\n throw new StepKeyConflictError(\"Another step already uses this key\");\\n }\\n step.key = action.input.key;\\n}\\nif (action.input.name) step.name = action.input.name;\\nif (action.input.pieceName) step.pieceName = action.input.pieceName;\\nif (action.input.pieceVersion) step.pieceVersion = action.input.pieceVersion;\\nif (action.input.actionName) step.actionName = action.input.actionName;\\nif (action.input.connectionId) step.connectionId = action.input.connectionId;\\nif (action.input.config !== undefined && action.input.config !== null) {\\n step.config = action.input.config;\\n}\\n// For the optional runtime fields null clears; undefined leaves as is.\\nif (action.input.retry !== undefined) {\\n step.retry = action.input.retry ?? null;\\n}\\nif (action.input.timeoutSeconds !== undefined) {\\n step.timeoutSeconds = action.input.timeoutSeconds ?? null;\\n}\\nif (action.input.idempotencyKeyExpression !== undefined) {\\n step.idempotencyKeyExpression = action.input.idempotencyKeyExpression || null;\\n}\\nif (action.input.position) step.position = action.input.position;\\nstate.version += 1;',\n errors: [\n {\n id: \"2f3f0a0b-555a-4350-86b4-5e7e86de8b8a\",\n name: \"StepNotFoundError\",\n code: \"STEP_NOT_FOUND\",\n description: \"No step exists with the given id.\",\n template: \"\",\n },\n {\n id: \"74f45aaf-68ae-49a9-bd3c-d1e5a50b0ea3\",\n name: \"StepKeyConflictError\",\n code: \"STEP_KEY_CONFLICT\",\n description: \"Another step already uses the given key.\",\n template: \"\",\n },\n {\n id: \"3db35060-c54a-445d-9202-3613bf90c8f4\",\n name: \"InvalidUpdateBlockError\",\n code: \"INVALID_UPDATE_BLOCK\",\n description:\n \"The update leaves the step with no piece or action, or with a piece version that is not an exact semver.\",\n template: \"\",\n },\n {\n id: \"3841fa5a-d989-43d0-90fa-dfb224f3c463\",\n name: \"UpdateConfigNotObjectError\",\n code: \"UPDATE_CONFIG_NOT_OBJECT\",\n description: \"The step's new config is not a JSON object.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"d01c89ca-3934-43b5-9540-9e45b415c772\",\n name: \"REMOVE_STEP\",\n description: \"Removes a step and every edge attached to it.\",\n schema: \"input RemoveStepInput {\\n id: OID!\\n}\",\n template: \"Removes a step and every edge attached to it.\",\n reducer:\n 'const index = state.steps.findIndex((step) => step.id === action.input.id);\\nif (index === -1) {\\n throw new RemoveStepNotFoundError(\"Step not found\");\\n}\\nstate.steps.splice(index, 1);\\nstate.edges = state.edges.filter(\\n (edge) => edge.from !== action.input.id && edge.to !== action.input.id,\\n);\\nstate.version += 1;',\n errors: [\n {\n id: \"2bc5f26f-975b-46a0-9df9-1dbac5bbd6eb\",\n name: \"RemoveStepNotFoundError\",\n code: \"REMOVE_STEP_NOT_FOUND\",\n description: \"No step exists with the given id.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"c83eb80e-8086-40e5-b8ed-fe3f72b664a6\",\n name: \"SET_STEP_CONFIG\",\n description:\n \"Replaces a step's block configuration, and optionally its property settings.\",\n schema:\n \"input SetStepConfigPropertySettingInput {\\n prop: String!\\n mode: PropertyMode!\\n schema: Unknown\\n}\\n\\ninput SetStepConfigInput {\\n id: OID!\\n config: Unknown!\\n propertySettings: [SetStepConfigPropertySettingInput!]\\n}\",\n template:\n \"Replaces a step's block configuration, and optionally its property settings.\",\n reducer:\n 'const step = state.steps.find((step) => step.id === action.input.id);\\nif (!step) {\\n throw new ConfigStepNotFoundError(\"Step not found\");\\n}\\nstep.config = action.input.config;\\nstate.version += 1;',\n errors: [\n {\n id: \"8ba30ce9-510e-4765-9955-23b4d76595ab\",\n name: \"ConfigStepNotFoundError\",\n code: \"CONFIG_STEP_NOT_FOUND\",\n description: \"No step exists with the given id.\",\n template: \"\",\n },\n {\n id: \"f6d05410-a1a8-4cab-8d7c-ea14506aa479\",\n name: \"SetConfigNotObjectError\",\n code: \"SET_CONFIG_NOT_OBJECT\",\n description: \"The step's config is not a JSON object.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"5f6223ad-23d1-4e2c-9680-8fd91234d785\",\n name: \"edges\",\n description: \"Directed edges between steps (and from the trigger).\",\n operations: [\n {\n id: \"293bcd32-7c85-42c9-846a-8c4ecde33154\",\n name: \"ADD_EDGE\",\n description:\n \"Adds an edge. The source may be a step or the trigger; the target must be a step.\",\n schema:\n \"input AddEdgeInput {\\n id: OID!\\n from: OID!\\n to: OID!\\n port: String!\\n condition: String\\n}\",\n template:\n \"Adds an edge. The source may be a step or the trigger; the target must be a step.\",\n reducer:\n 'if (state.edges.some((edge) => edge.id === action.input.id)) {\\n throw new DuplicateEdgeIdError(\"An edge with this id already exists\");\\n}\\nconst fromExists =\\n state.steps.some((step) => step.id === action.input.from) ||\\n state.trigger?.id === action.input.from;\\nif (!fromExists) {\\n throw new EdgeSourceNotFoundError(\"Edge source step or trigger not found\");\\n}\\nif (!state.steps.some((step) => step.id === action.input.to)) {\\n throw new EdgeTargetNotFoundError(\"Edge target step not found\");\\n}\\nif (wouldCycle(state.edges, action.input.from, action.input.to)) {\\n throw new EdgeCycleError(\"Edge would create a cycle in the workflow graph\");\\n}\\nstate.edges.push({\\n id: action.input.id,\\n from: action.input.from,\\n to: action.input.to,\\n port: action.input.port,\\n condition: action.input.condition || null,\\n});\\nstate.version += 1;',\n errors: [\n {\n id: \"aa22b9b5-bbd7-4d80-b6b6-573c5f761ed7\",\n name: \"DuplicateEdgeIdError\",\n code: \"DUPLICATE_EDGE_ID\",\n description: \"An edge with the given id already exists.\",\n template: \"\",\n },\n {\n id: \"5207d810-062d-4b83-82e3-e3f89d905a83\",\n name: \"EdgeSourceNotFoundError\",\n code: \"EDGE_SOURCE_NOT_FOUND\",\n description:\n \"The edge source references no existing step or trigger.\",\n template: \"\",\n },\n {\n id: \"39149b92-84b9-4429-a631-4d7e1981270c\",\n name: \"EdgeTargetNotFoundError\",\n code: \"EDGE_TARGET_NOT_FOUND\",\n description: \"The edge target references no existing step.\",\n template: \"\",\n },\n {\n id: \"6e4a5f2b-3c7d-4e19-9a2b-8d0c1f5e7a6b\",\n name: \"EdgeCycleError\",\n code: \"EDGE_CYCLE\",\n description:\n \"The edge would create a cycle in the workflow graph.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"ba545d3b-796d-4af3-b4c6-016401a691ff\",\n name: \"REMOVE_EDGE\",\n description: \"Removes an edge.\",\n schema: \"input RemoveEdgeInput {\\n id: OID!\\n}\",\n template: \"Removes an edge.\",\n reducer:\n 'const index = state.edges.findIndex((edge) => edge.id === action.input.id);\\nif (index === -1) {\\n throw new EdgeNotFoundError(\"Edge not found\");\\n}\\nstate.edges.splice(index, 1);\\nstate.version += 1;',\n errors: [\n {\n id: \"b7e2ffa4-7775-460d-aae8-0d82dce5ffcf\",\n name: \"EdgeNotFoundError\",\n code: \"EDGE_NOT_FOUND\",\n description: \"No edge exists with the given id.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"c003c578-94fd-40d1-8964-ea151ee56486\",\n name: \"variables\",\n description: \"Workflow-level inputs and defaults.\",\n operations: [\n {\n id: \"50745ece-569a-4d49-b649-8ec2de3dd2d9\",\n name: \"SET_VARIABLE\",\n description:\n \"Creates the variable with this id, or updates it (its key included). Keys are unique.\",\n schema:\n 'input SetVariableInput {\\n id: OID!\\n key: String!\\n value: Unknown\\n description: String\\n \"Undefined leaves an existing variable\\'s type unchanged; null clears it.\"\\n type: VariableType\\n}',\n template: \"Creates or updates a variable, keyed by its key.\",\n reducer:\n \"const existing = state.variables.find(\\n (variable) => variable.key === action.input.key,\\n);\\nif (existing) {\\n existing.value = action.input.value ?? null;\\n if (action.input.description) existing.description = action.input.description;\\n} else {\\n state.variables.push({\\n id: action.input.id,\\n key: action.input.key,\\n value: action.input.value ?? null,\\n description: action.input.description || null,\\n });\\n}\\nstate.version += 1;\",\n errors: [\n {\n id: \"50fa86ce-2616-47d3-9e9a-225c63efc08c\",\n name: \"SecretVariableValueError\",\n code: \"SECRET_VARIABLE_VALUE\",\n description:\n \"A SECRET variable's value must be a secret reference string or null.\",\n template: \"\",\n },\n {\n id: \"868842e4-3df4-4e62-9b98-adf70cd1acbb\",\n name: \"DuplicateVariableKeyError\",\n code: \"DUPLICATE_VARIABLE_KEY\",\n description: \"Another variable already uses the given key.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"d85b2b0a-085b-482e-a4be-401fa7e5faa2\",\n name: \"REMOVE_VARIABLE\",\n description: \"Removes a variable.\",\n schema: \"input RemoveVariableInput {\\n id: OID!\\n}\",\n template: \"Removes a variable.\",\n reducer:\n 'const index = state.variables.findIndex(\\n (variable) => variable.id === action.input.id,\\n);\\nif (index === -1) {\\n throw new VariableNotFoundError(\"Variable not found\");\\n}\\nstate.variables.splice(index, 1);\\nstate.version += 1;',\n errors: [\n {\n id: \"2b1913d2-6490-48f5-8bdb-5ec8e062c855\",\n name: \"VariableNotFoundError\",\n code: \"VARIABLE_NOT_FOUND\",\n description: \"No variable exists with the given id.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"956e2432-13b1-417a-b932-4286082ef7d4\",\n name: \"policy\",\n description: \"Execution policy for runs of this workflow.\",\n operations: [\n {\n id: \"e0a331e7-a4b0-4b93-8af7-d25e602932b8\",\n name: \"SET_POLICY\",\n description:\n \"Updates the provided fields of the execution policy.\",\n schema:\n \"input SetPolicyRetryPolicyInput {\\n maxAttempts: Int!\\n backoff: BackoffKind!\\n initialDelaySeconds: Int!\\n maxDelaySeconds: Int!\\n retryOn: [String!]!\\n}\\n\\ninput SetPolicyInput {\\n concurrency: ConcurrencyMode\\n maxParallelRuns: Int\\n runTimeoutSeconds: Int\\n maxSuspensionDays: Int\\n defaultRetry: SetPolicyRetryPolicyInput\\n onFailure: FailureMode\\n retainRunsDays: Int\\n journalAsDocument: Boolean\\n}\",\n template: \"Updates the provided fields of the execution policy.\",\n reducer:\n \"if (action.input.concurrency) state.policy.concurrency = action.input.concurrency;\\nif (action.input.maxParallelRuns !== undefined && action.input.maxParallelRuns !== null) {\\n state.policy.maxParallelRuns = action.input.maxParallelRuns;\\n}\\nif (action.input.runTimeoutSeconds !== undefined && action.input.runTimeoutSeconds !== null) {\\n state.policy.runTimeoutSeconds = action.input.runTimeoutSeconds;\\n}\\nif (action.input.maxSuspensionDays !== undefined && action.input.maxSuspensionDays !== null) {\\n state.policy.maxSuspensionDays = action.input.maxSuspensionDays;\\n}\\nif (action.input.defaultRetry) state.policy.defaultRetry = action.input.defaultRetry;\\nif (action.input.onFailure) state.policy.onFailure = action.input.onFailure;\\nif (action.input.retainRunsDays !== undefined && action.input.retainRunsDays !== null) {\\n state.policy.retainRunsDays = action.input.retainRunsDays;\\n}\\nif (action.input.journalAsDocument !== undefined && action.input.journalAsDocument !== null) {\\n state.policy.journalAsDocument = action.input.journalAsDocument;\\n}\\nstate.version += 1;\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"4c4656ac-62bb-498a-9a64-567a8e09ac09\",\n name: \"runtime\",\n description: \"Denormalised run info written by the workflow runtime.\",\n operations: [\n {\n id: \"cdaf7978-b846-4c3e-ae30-c5d87eac66a4\",\n name: \"SET_LAST_RUN\",\n description: \"Records the outcome of the most recent run.\",\n schema:\n \"input SetLastRunInput {\\n lastRunAt: DateTime!\\n lastRunStatus: RunStatus!\\n}\",\n template: \"Records the outcome of the most recent run.\",\n reducer:\n \"state.lastRunAt = action.input.lastRunAt;\\nstate.lastRunStatus = action.input.lastRunStatus;\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"a370b78b-53b6-4344-9a92-a600d8eda77e\",\n name: \"SET_LAST_TEST\",\n description:\n \"Records the latest test run of a step or the trigger. Does not bump version.\",\n schema:\n 'input SetLastTestInput {\\n \"Step id or trigger id.\"\\n id: OID!\\n runId: String!\\n testedAt: DateTime!\\n}',\n template:\n \"Records the latest test run of a step or the trigger. Does not bump version.\",\n reducer: \"\",\n errors: [\n {\n id: \"53f18e15-1623-4cd0-8be4-44d4286d5eab\",\n name: \"LastTestTargetNotFoundError\",\n code: \"LAST_TEST_TARGET_NOT_FOUND\",\n description: \"No step or trigger exists with the given id.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n {\n id: \"d08ad3f2-8985-4b36-baae-4b870407bba8\",\n name: \"publishing\",\n description: \"Draft versus published snapshot of the workflow.\",\n operations: [\n {\n id: \"a0cc29cc-259a-4bc8-814d-0847883700eb\",\n name: \"PUBLISH_WORKFLOW\",\n description:\n \"Snapshots the draft trigger, steps, edges, variables and policy into published at the current version.\",\n schema:\n \"input PublishWorkflowInput {\\n publishedAt: DateTime!\\n}\",\n template:\n \"Snapshots the draft trigger, steps, edges, variables and policy into published at the current version.\",\n reducer: \"\",\n errors: [],\n examples: [],\n scope: \"global\",\n },\n {\n id: \"b4642462-2652-4a6e-a6ba-8e299d830d92\",\n name: \"REVERT_TO_PUBLISHED\",\n description:\n \"Replaces the draft with the published snapshot and resets version to published.version.\",\n schema: \"input RevertToPublishedInput {\\n _: Boolean\\n}\",\n template:\n \"Replaces the draft with the published snapshot and resets version to published.version.\",\n reducer: \"\",\n errors: [\n {\n id: \"f0056b3a-549d-4063-b8e5-2978279168e7\",\n name: \"NothingPublishedError\",\n code: \"NOTHING_PUBLISHED\",\n description: \"The workflow has never been published.\",\n template: \"\",\n },\n ],\n examples: [],\n scope: \"global\",\n },\n ],\n },\n ],\n version: 1,\n changeLog: [],\n },\n ],\n};\n","export type ErrorCode =\n | \"DuplicateEdgeIdError\"\n | \"EdgeSourceNotFoundError\"\n | \"EdgeTargetNotFoundError\"\n | \"EdgeCycleError\"\n | \"EdgeNotFoundError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class DuplicateEdgeIdError extends Error implements ReducerError {\n errorCode = \"DuplicateEdgeIdError\" as ErrorCode;\n constructor(message = \"DuplicateEdgeIdError\") {\n super(message);\n }\n}\n\nexport class EdgeSourceNotFoundError extends Error implements ReducerError {\n errorCode = \"EdgeSourceNotFoundError\" as ErrorCode;\n constructor(message = \"EdgeSourceNotFoundError\") {\n super(message);\n }\n}\n\nexport class EdgeTargetNotFoundError extends Error implements ReducerError {\n errorCode = \"EdgeTargetNotFoundError\" as ErrorCode;\n constructor(message = \"EdgeTargetNotFoundError\") {\n super(message);\n }\n}\n\nexport class EdgeCycleError extends Error implements ReducerError {\n errorCode = \"EdgeCycleError\" as ErrorCode;\n constructor(message = \"EdgeCycleError\") {\n super(message);\n }\n}\n\nexport class EdgeNotFoundError extends Error implements ReducerError {\n errorCode = \"EdgeNotFoundError\" as ErrorCode;\n constructor(message = \"EdgeNotFoundError\") {\n super(message);\n }\n}\n\nexport const errors = {\n AddEdge: {\n DuplicateEdgeIdError,\n EdgeSourceNotFoundError,\n EdgeTargetNotFoundError,\n EdgeCycleError,\n },\n\n RemoveEdge: { EdgeNotFoundError },\n};\n","import type {\n WorkflowEdge,\n WorkflowEdgesOperations,\n} from \"document-models/workflow/v1\";\nimport {\n DuplicateEdgeIdError,\n EdgeCycleError,\n EdgeNotFoundError,\n EdgeSourceNotFoundError,\n EdgeTargetNotFoundError,\n} from \"../../gen/edges/error.js\";\n\n// True when `to` already reaches `from` via existing edges, i.e. the new\n// from->to edge would close a cycle (mirrors the editor's acyclicTargets).\nfunction wouldCycle(edges: WorkflowEdge[], from: string, to: string): boolean {\n const seen = new Set<string>([to]);\n const queue = [to];\n while (queue.length > 0) {\n const current = queue.pop()!;\n if (current === from) return true;\n for (const edge of edges) {\n if (edge.from === current && !seen.has(edge.to)) {\n seen.add(edge.to);\n queue.push(edge.to);\n }\n }\n }\n return false;\n}\n\nexport const workflowEdgesOperations: WorkflowEdgesOperations = {\n addEdgeOperation(state, action) {\n // Ports go unchecked: they are declared in descriptors, and a reducer has none.\n if (state.edges.some((edge) => edge.id === action.input.id)) {\n throw new DuplicateEdgeIdError(\"An edge with this id already exists\");\n }\n const fromExists =\n state.steps.some((step) => step.id === action.input.from) ||\n state.trigger?.id === action.input.from;\n if (!fromExists) {\n throw new EdgeSourceNotFoundError(\n \"Edge source step or trigger not found\",\n );\n }\n if (!state.steps.some((step) => step.id === action.input.to)) {\n throw new EdgeTargetNotFoundError(\"Edge target step not found\");\n }\n if (wouldCycle(state.edges, action.input.from, action.input.to)) {\n throw new EdgeCycleError(\n \"Edge would create a cycle in the workflow graph\",\n );\n }\n state.edges.push({\n id: action.input.id,\n from: action.input.from,\n to: action.input.to,\n port: action.input.port,\n condition: action.input.condition || null,\n });\n state.version += 1;\n },\n removeEdgeOperation(state, action) {\n const index = state.edges.findIndex((edge) => edge.id === action.input.id);\n if (index === -1) {\n throw new EdgeNotFoundError(\"Edge not found\");\n }\n state.edges.splice(index, 1);\n state.version += 1;\n },\n};\n","import type { WorkflowPolicyOperations } from \"document-models/workflow/v1\";\n\nexport const workflowPolicyOperations: WorkflowPolicyOperations = {\n setPolicyOperation(state, action) {\n if (action.input.concurrency)\n state.policy.concurrency = action.input.concurrency;\n if (\n action.input.maxParallelRuns !== undefined &&\n action.input.maxParallelRuns !== null\n ) {\n state.policy.maxParallelRuns = action.input.maxParallelRuns;\n }\n if (\n action.input.runTimeoutSeconds !== undefined &&\n action.input.runTimeoutSeconds !== null\n ) {\n state.policy.runTimeoutSeconds = action.input.runTimeoutSeconds;\n }\n if (\n action.input.maxSuspensionDays !== undefined &&\n action.input.maxSuspensionDays !== null\n ) {\n state.policy.maxSuspensionDays = action.input.maxSuspensionDays;\n }\n if (action.input.defaultRetry)\n state.policy.defaultRetry = action.input.defaultRetry;\n if (action.input.onFailure) state.policy.onFailure = action.input.onFailure;\n if (\n action.input.retainRunsDays !== undefined &&\n action.input.retainRunsDays !== null\n ) {\n state.policy.retainRunsDays = action.input.retainRunsDays;\n }\n if (\n action.input.journalAsDocument !== undefined &&\n action.input.journalAsDocument !== null\n ) {\n state.policy.journalAsDocument = action.input.journalAsDocument;\n }\n state.version += 1;\n },\n};\n","export type ErrorCode = \"NothingPublishedError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class NothingPublishedError extends Error implements ReducerError {\n errorCode = \"NothingPublishedError\" as ErrorCode;\n constructor(message = \"NothingPublishedError\") {\n super(message);\n }\n}\n\nexport const errors = {\n RevertToPublished: { NothingPublishedError },\n};\n","import { isExactVersion } from \"@powerhousedao/pieces-framework/block-type\";\nimport type {\n PropertyMode,\n PropertySetting,\n TriggerBinding,\n WorkflowGlobalState,\n WorkflowStep,\n} from \"../gen/types.js\";\n\n// Why a block reference can't be stored, or undefined when it can: every\n// block names its piece and itself, and pins an exact piece version.\nexport function invalidBlock(\n kind: \"action\" | \"trigger\",\n block: {\n pieceName?: string | null;\n pieceVersion?: string | null;\n name?: string | null;\n },\n): string | undefined {\n if (!block.pieceName) return `The ${kind} names no piece`;\n if (!block.name) return `The ${kind} names no ${kind} of ${block.pieceName}`;\n if (!block.pieceVersion || !isExactVersion(block.pieceVersion)) {\n return `\"${block.pieceVersion ?? \"\"}\" is not an exact semver version of ${block.pieceName}`;\n }\n return undefined;\n}\n\nexport function findStepOrTrigger(\n state: WorkflowGlobalState,\n id: string,\n): WorkflowStep | TriggerBinding | undefined {\n if (state.trigger?.id === id) return state.trigger;\n return state.steps.find((step) => step.id === id);\n}\n\nexport function toPropertySettings(\n input: readonly { prop: string; mode: PropertyMode; schema?: unknown }[],\n): PropertySetting[] {\n return input.map((setting) => ({\n prop: setting.prop,\n mode: setting.mode,\n schema: setting.schema ?? null,\n }));\n}\n\n// Plain copy that is safe to take from an immer draft.\nexport function cloneJson<T>(value: T): T {\n return JSON.parse(JSON.stringify(value)) as T;\n}\n\n// Block config is always a JSON object: a string or array is a writer's bug.\nexport function isConfigObject(config: unknown): boolean {\n return (\n config !== null && typeof config === \"object\" && !Array.isArray(config)\n );\n}\n","import type { WorkflowPublishingOperations } from \"document-models/workflow/v1\";\nimport { NothingPublishedError } from \"../../gen/publishing/error.js\";\nimport { cloneJson } from \"../helpers.js\";\n\nexport const workflowPublishingOperations: WorkflowPublishingOperations = {\n publishWorkflowOperation(state, action) {\n state.published = cloneJson({\n version: state.version,\n publishedAt: action.input.publishedAt,\n trigger: state.trigger,\n steps: state.steps,\n edges: state.edges,\n variables: state.variables,\n policy: state.policy,\n });\n },\n revertToPublishedOperation(state, _action) {\n if (!state.published) {\n throw new NothingPublishedError(\"Workflow has never been published\");\n }\n const snapshot = cloneJson(state.published);\n state.trigger = snapshot.trigger;\n state.steps = snapshot.steps;\n state.edges = snapshot.edges;\n state.variables = snapshot.variables;\n state.policy = snapshot.policy;\n state.version = snapshot.version;\n },\n};\n","export type ErrorCode = \"LastTestTargetNotFoundError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class LastTestTargetNotFoundError extends Error implements ReducerError {\n errorCode = \"LastTestTargetNotFoundError\" as ErrorCode;\n constructor(message = \"LastTestTargetNotFoundError\") {\n super(message);\n }\n}\n\nexport const errors = {\n SetLastTest: { LastTestTargetNotFoundError },\n};\n","import type { WorkflowRuntimeOperations } from \"document-models/workflow/v1\";\nimport { LastTestTargetNotFoundError } from \"../../gen/runtime/error.js\";\nimport { findStepOrTrigger } from \"../helpers.js\";\n\nexport const workflowRuntimeOperations: WorkflowRuntimeOperations = {\n setLastRunOperation(state, action) {\n state.lastRunAt = action.input.lastRunAt;\n state.lastRunStatus = action.input.lastRunStatus;\n },\n setLastTestOperation(state, action) {\n const target = findStepOrTrigger(state, action.input.id);\n if (!target) {\n throw new LastTestTargetNotFoundError(\"Step or trigger not found\");\n }\n target.lastTest = {\n runId: action.input.runId,\n testedAt: action.input.testedAt,\n };\n },\n};\n","export type ErrorCode =\n | \"DuplicateStepIdError\"\n | \"DuplicateStepKeyError\"\n | \"InvalidStepBlockError\"\n | \"StepConfigNotObjectError\"\n | \"StepNotFoundError\"\n | \"StepKeyConflictError\"\n | \"InvalidUpdateBlockError\"\n | \"UpdateConfigNotObjectError\"\n | \"RemoveStepNotFoundError\"\n | \"ConfigStepNotFoundError\"\n | \"SetConfigNotObjectError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class DuplicateStepIdError extends Error implements ReducerError {\n errorCode = \"DuplicateStepIdError\" as ErrorCode;\n constructor(message = \"DuplicateStepIdError\") {\n super(message);\n }\n}\n\nexport class DuplicateStepKeyError extends Error implements ReducerError {\n errorCode = \"DuplicateStepKeyError\" as ErrorCode;\n constructor(message = \"DuplicateStepKeyError\") {\n super(message);\n }\n}\n\nexport class InvalidStepBlockError extends Error implements ReducerError {\n errorCode = \"InvalidStepBlockError\" as ErrorCode;\n constructor(message = \"InvalidStepBlockError\") {\n super(message);\n }\n}\n\nexport class StepConfigNotObjectError extends Error implements ReducerError {\n errorCode = \"StepConfigNotObjectError\" as ErrorCode;\n constructor(message = \"StepConfigNotObjectError\") {\n super(message);\n }\n}\n\nexport class StepNotFoundError extends Error implements ReducerError {\n errorCode = \"StepNotFoundError\" as ErrorCode;\n constructor(message = \"StepNotFoundError\") {\n super(message);\n }\n}\n\nexport class StepKeyConflictError extends Error implements ReducerError {\n errorCode = \"StepKeyConflictError\" as ErrorCode;\n constructor(message = \"StepKeyConflictError\") {\n super(message);\n }\n}\n\nexport class InvalidUpdateBlockError extends Error implements ReducerError {\n errorCode = \"InvalidUpdateBlockError\" as ErrorCode;\n constructor(message = \"InvalidUpdateBlockError\") {\n super(message);\n }\n}\n\nexport class UpdateConfigNotObjectError extends Error implements ReducerError {\n errorCode = \"UpdateConfigNotObjectError\" as ErrorCode;\n constructor(message = \"UpdateConfigNotObjectError\") {\n super(message);\n }\n}\n\nexport class RemoveStepNotFoundError extends Error implements ReducerError {\n errorCode = \"RemoveStepNotFoundError\" as ErrorCode;\n constructor(message = \"RemoveStepNotFoundError\") {\n super(message);\n }\n}\n\nexport class ConfigStepNotFoundError extends Error implements ReducerError {\n errorCode = \"ConfigStepNotFoundError\" as ErrorCode;\n constructor(message = \"ConfigStepNotFoundError\") {\n super(message);\n }\n}\n\nexport class SetConfigNotObjectError extends Error implements ReducerError {\n errorCode = \"SetConfigNotObjectError\" as ErrorCode;\n constructor(message = \"SetConfigNotObjectError\") {\n super(message);\n }\n}\n\nexport const errors = {\n AddStep: {\n DuplicateStepIdError,\n DuplicateStepKeyError,\n InvalidStepBlockError,\n StepConfigNotObjectError,\n },\n\n UpdateStep: {\n StepNotFoundError,\n StepKeyConflictError,\n InvalidUpdateBlockError,\n UpdateConfigNotObjectError,\n },\n\n RemoveStep: { RemoveStepNotFoundError },\n\n SetStepConfig: { ConfigStepNotFoundError, SetConfigNotObjectError },\n};\n","import type { WorkflowStepsOperations } from \"document-models/workflow/v1\";\nimport {\n ConfigStepNotFoundError,\n DuplicateStepIdError,\n DuplicateStepKeyError,\n InvalidStepBlockError,\n InvalidUpdateBlockError,\n RemoveStepNotFoundError,\n SetConfigNotObjectError,\n StepConfigNotObjectError,\n StepKeyConflictError,\n StepNotFoundError,\n UpdateConfigNotObjectError,\n} from \"../../gen/steps/error.js\";\nimport {\n invalidBlock,\n isConfigObject,\n toPropertySettings,\n} from \"../helpers.js\";\n\nexport const workflowStepsOperations: WorkflowStepsOperations = {\n addStepOperation(state, action) {\n if (state.steps.some((step) => step.id === action.input.id)) {\n throw new DuplicateStepIdError(\"A step with this id already exists\");\n }\n if (state.steps.some((step) => step.key === action.input.key)) {\n throw new DuplicateStepKeyError(\"A step with this key already exists\");\n }\n const invalid = invalidBlock(\"action\", {\n pieceName: action.input.pieceName,\n pieceVersion: action.input.pieceVersion,\n name: action.input.actionName,\n });\n if (invalid) throw new InvalidStepBlockError(invalid);\n if (!isConfigObject(action.input.config)) {\n throw new StepConfigNotObjectError(\"A step config must be an object\");\n }\n state.steps.push({\n id: action.input.id,\n key: action.input.key,\n name: action.input.name,\n pieceName: action.input.pieceName,\n pieceVersion: action.input.pieceVersion,\n actionName: action.input.actionName,\n connectionId: action.input.connectionId || null,\n reactorConnectionId: action.input.reactorConnectionId || null,\n config: action.input.config,\n retry: action.input.retry ?? null,\n timeoutSeconds: action.input.timeoutSeconds ?? null,\n idempotencyKeyExpression: action.input.idempotencyKeyExpression || null,\n position: action.input.position ?? null,\n propertySettings: action.input.propertySettings\n ? toPropertySettings(action.input.propertySettings)\n : null,\n lastTest: null,\n skip: action.input.skip ?? null,\n updatedAt: action.timestampUtcMs,\n });\n state.version += 1;\n },\n updateStepOperation(state, action) {\n const step = state.steps.find((step) => step.id === action.input.id);\n if (!step) {\n throw new StepNotFoundError(\"Step not found\");\n }\n // Null or undefined leaves a field as it is; the result must still be valid.\n const pieceName = action.input.pieceName ?? step.pieceName;\n const pieceVersion = action.input.pieceVersion ?? step.pieceVersion;\n const actionName = action.input.actionName ?? step.actionName;\n const invalid = invalidBlock(\"action\", {\n pieceName,\n pieceVersion,\n name: actionName,\n });\n if (invalid) throw new InvalidUpdateBlockError(invalid);\n const { config } = action.input;\n if (config !== undefined && config !== null && !isConfigObject(config)) {\n throw new UpdateConfigNotObjectError(\"A step config must be an object\");\n }\n if (action.input.key) {\n const conflict = state.steps.some(\n (other) =>\n other.key === action.input.key && other.id !== action.input.id,\n );\n if (conflict) {\n throw new StepKeyConflictError(\"Another step already uses this key\");\n }\n step.key = action.input.key;\n }\n if (action.input.name) step.name = action.input.name;\n step.pieceName = pieceName;\n step.pieceVersion = pieceVersion;\n step.actionName = actionName;\n // null clears a connection; undefined leaves it unchanged.\n if (action.input.connectionId !== undefined)\n step.connectionId = action.input.connectionId || null;\n if (action.input.reactorConnectionId !== undefined)\n step.reactorConnectionId = action.input.reactorConnectionId || null;\n if (action.input.config !== undefined && action.input.config !== null) {\n step.config = action.input.config;\n }\n // For the optional runtime fields null clears; undefined leaves as is.\n if (action.input.retry !== undefined) {\n step.retry = action.input.retry ?? null;\n }\n if (action.input.timeoutSeconds !== undefined) {\n step.timeoutSeconds = action.input.timeoutSeconds ?? null;\n }\n if (action.input.idempotencyKeyExpression !== undefined) {\n step.idempotencyKeyExpression =\n action.input.idempotencyKeyExpression || null;\n }\n if (action.input.position !== undefined) {\n step.position = action.input.position ?? null;\n }\n if (action.input.skip !== undefined) {\n step.skip = action.input.skip ?? null;\n }\n step.updatedAt = action.timestampUtcMs;\n state.version += 1;\n },\n removeStepOperation(state, action) {\n const index = state.steps.findIndex((step) => step.id === action.input.id);\n if (index === -1) {\n throw new RemoveStepNotFoundError(\"Step not found\");\n }\n state.steps.splice(index, 1);\n state.edges = state.edges.filter(\n (edge) => edge.from !== action.input.id && edge.to !== action.input.id,\n );\n state.version += 1;\n },\n setStepConfigOperation(state, action) {\n const step = state.steps.find((step) => step.id === action.input.id);\n if (!step) {\n throw new ConfigStepNotFoundError(\"Step not found\");\n }\n if (!isConfigObject(action.input.config)) {\n throw new SetConfigNotObjectError(\"A step config must be an object\");\n }\n if (JSON.stringify(step.config) !== JSON.stringify(action.input.config)) {\n step.updatedAt = action.timestampUtcMs;\n }\n step.config = action.input.config;\n // Undefined leaves the settings unchanged; null clears them.\n if (action.input.propertySettings !== undefined) {\n step.propertySettings = action.input.propertySettings\n ? toPropertySettings(action.input.propertySettings)\n : null;\n }\n state.version += 1;\n },\n};\n","export type ErrorCode =\n | \"InvalidTriggerBlockError\"\n | \"TriggerConfigNotObjectError\"\n | \"TriggerNotSetError\"\n | \"ConfigTriggerNotSetError\"\n | \"SetTriggerConfigNotObjectError\"\n | \"ConnectionTriggerNotSetError\"\n | \"VersionTriggerNotSetError\"\n | \"InvalidTriggerPieceVersionError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class InvalidTriggerBlockError extends Error implements ReducerError {\n errorCode = \"InvalidTriggerBlockError\" as ErrorCode;\n constructor(message = \"InvalidTriggerBlockError\") {\n super(message);\n }\n}\n\nexport class TriggerConfigNotObjectError extends Error implements ReducerError {\n errorCode = \"TriggerConfigNotObjectError\" as ErrorCode;\n constructor(message = \"TriggerConfigNotObjectError\") {\n super(message);\n }\n}\n\nexport class TriggerNotSetError extends Error implements ReducerError {\n errorCode = \"TriggerNotSetError\" as ErrorCode;\n constructor(message = \"TriggerNotSetError\") {\n super(message);\n }\n}\n\nexport class ConfigTriggerNotSetError extends Error implements ReducerError {\n errorCode = \"ConfigTriggerNotSetError\" as ErrorCode;\n constructor(message = \"ConfigTriggerNotSetError\") {\n super(message);\n }\n}\n\nexport class SetTriggerConfigNotObjectError\n extends Error\n implements ReducerError\n{\n errorCode = \"SetTriggerConfigNotObjectError\" as ErrorCode;\n constructor(message = \"SetTriggerConfigNotObjectError\") {\n super(message);\n }\n}\n\nexport class ConnectionTriggerNotSetError\n extends Error\n implements ReducerError\n{\n errorCode = \"ConnectionTriggerNotSetError\" as ErrorCode;\n constructor(message = \"ConnectionTriggerNotSetError\") {\n super(message);\n }\n}\n\nexport class VersionTriggerNotSetError extends Error implements ReducerError {\n errorCode = \"VersionTriggerNotSetError\" as ErrorCode;\n constructor(message = \"VersionTriggerNotSetError\") {\n super(message);\n }\n}\n\nexport class InvalidTriggerPieceVersionError\n extends Error\n implements ReducerError\n{\n errorCode = \"InvalidTriggerPieceVersionError\" as ErrorCode;\n constructor(message = \"InvalidTriggerPieceVersionError\") {\n super(message);\n }\n}\n\nexport const errors = {\n SetTrigger: { InvalidTriggerBlockError, TriggerConfigNotObjectError },\n\n ClearTrigger: { TriggerNotSetError },\n\n SetTriggerConfig: {\n ConfigTriggerNotSetError,\n SetTriggerConfigNotObjectError,\n },\n\n SetTriggerConnection: { ConnectionTriggerNotSetError },\n\n SetTriggerPieceVersion: {\n VersionTriggerNotSetError,\n InvalidTriggerPieceVersionError,\n },\n};\n","import type { WorkflowTriggerOperations } from \"document-models/workflow/v1\";\nimport {\n ConfigTriggerNotSetError,\n ConnectionTriggerNotSetError,\n InvalidTriggerBlockError,\n InvalidTriggerPieceVersionError,\n SetTriggerConfigNotObjectError,\n TriggerConfigNotObjectError,\n TriggerNotSetError,\n VersionTriggerNotSetError,\n} from \"../../gen/trigger/error.js\";\nimport {\n invalidBlock,\n isConfigObject,\n toPropertySettings,\n} from \"../helpers.js\";\n\nexport const workflowTriggerOperations: WorkflowTriggerOperations = {\n setTriggerOperation(state, action) {\n const { input } = action;\n const invalid = invalidBlock(\"trigger\", {\n pieceName: input.pieceName,\n pieceVersion: input.pieceVersion,\n name: input.triggerName,\n });\n if (invalid) throw new InvalidTriggerBlockError(invalid);\n if (!isConfigObject(input.config)) {\n throw new TriggerConfigNotObjectError(\n \"The trigger config must be an object\",\n );\n }\n // Same binding: omitted settings and last test carry over.\n const current = state.trigger;\n const previous =\n current &&\n current.id === input.id &&\n current.pieceName === input.pieceName &&\n current.pieceVersion === input.pieceVersion &&\n current.triggerName === input.triggerName\n ? current\n : null;\n state.trigger = {\n id: input.id,\n pieceName: input.pieceName,\n pieceVersion: input.pieceVersion,\n triggerName: input.triggerName,\n connectionId: input.connectionId || null,\n reactorConnectionId: input.reactorConnectionId || null,\n config: input.config,\n propertySettings:\n input.propertySettings === undefined\n ? (previous?.propertySettings ?? null)\n : input.propertySettings\n ? toPropertySettings(input.propertySettings)\n : null,\n lastTest: previous?.lastTest ?? null,\n updatedAt: action.timestampUtcMs,\n };\n state.version += 1;\n },\n clearTriggerOperation(state, _action) {\n if (!state.trigger) {\n throw new TriggerNotSetError(\"Workflow has no trigger to clear\");\n }\n const triggerId = state.trigger.id;\n state.trigger = null;\n state.edges = state.edges.filter((edge) => edge.from !== triggerId);\n state.version += 1;\n },\n setTriggerConfigOperation(state, action) {\n const trigger = state.trigger;\n if (!trigger) {\n throw new ConfigTriggerNotSetError(\n \"Workflow has no trigger to configure\",\n );\n }\n if (!isConfigObject(action.input.config)) {\n throw new SetTriggerConfigNotObjectError(\n \"The trigger config must be an object\",\n );\n }\n if (\n JSON.stringify(trigger.config) !== JSON.stringify(action.input.config)\n ) {\n trigger.updatedAt = action.timestampUtcMs;\n }\n trigger.config = action.input.config;\n // Undefined leaves the settings unchanged; null clears them.\n if (action.input.propertySettings !== undefined) {\n trigger.propertySettings = action.input.propertySettings\n ? toPropertySettings(action.input.propertySettings)\n : null;\n }\n state.version += 1;\n },\n setTriggerConnectionOperation(state, action) {\n const trigger = state.trigger;\n if (!trigger) {\n throw new ConnectionTriggerNotSetError(\n \"Workflow has no trigger to connect\",\n );\n }\n // null clears a connection; undefined leaves it unchanged.\n if (action.input.connectionId !== undefined)\n trigger.connectionId = action.input.connectionId || null;\n if (action.input.reactorConnectionId !== undefined)\n trigger.reactorConnectionId = action.input.reactorConnectionId || null;\n trigger.updatedAt = action.timestampUtcMs;\n state.version += 1;\n },\n setTriggerPieceVersionOperation(state, action) {\n const trigger = state.trigger;\n if (!trigger) {\n throw new VersionTriggerNotSetError(\"Workflow has no trigger to update\");\n }\n const invalid = invalidBlock(\"trigger\", {\n pieceName: trigger.pieceName,\n pieceVersion: action.input.pieceVersion,\n name: trigger.triggerName,\n });\n if (invalid) throw new InvalidTriggerPieceVersionError(invalid);\n if (trigger.pieceVersion === action.input.pieceVersion) return;\n trigger.pieceVersion = action.input.pieceVersion;\n // A test of the old version says nothing about the new one.\n trigger.lastTest = null;\n trigger.updatedAt = action.timestampUtcMs;\n state.version += 1;\n },\n};\n","export type ErrorCode =\n | \"SecretVariableValueError\"\n | \"DuplicateVariableKeyError\"\n | \"VariableNotFoundError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class SecretVariableValueError extends Error implements ReducerError {\n errorCode = \"SecretVariableValueError\" as ErrorCode;\n constructor(message = \"SecretVariableValueError\") {\n super(message);\n }\n}\n\nexport class DuplicateVariableKeyError extends Error implements ReducerError {\n errorCode = \"DuplicateVariableKeyError\" as ErrorCode;\n constructor(message = \"DuplicateVariableKeyError\") {\n super(message);\n }\n}\n\nexport class VariableNotFoundError extends Error implements ReducerError {\n errorCode = \"VariableNotFoundError\" as ErrorCode;\n constructor(message = \"VariableNotFoundError\") {\n super(message);\n }\n}\n\nexport const errors = {\n SetVariable: { SecretVariableValueError, DuplicateVariableKeyError },\n\n RemoveVariable: { VariableNotFoundError },\n};\n","import type { WorkflowVariablesOperations } from \"document-models/workflow/v1\";\nimport {\n DuplicateVariableKeyError,\n SecretVariableValueError,\n VariableNotFoundError,\n} from \"../../gen/variables/error.js\";\n\nexport const workflowVariablesOperations: WorkflowVariablesOperations = {\n setVariableOperation(state, action) {\n // Upserted by id; the key may change, but no two variables share one.\n const existing = state.variables.find(\n (variable) => variable.id === action.input.id,\n );\n const taken = state.variables.some(\n (variable) =>\n variable.key === action.input.key && variable.id !== action.input.id,\n );\n if (taken) {\n throw new DuplicateVariableKeyError(\n `Another variable already uses the key \"${action.input.key}\"`,\n );\n }\n const value = action.input.value ?? null;\n const type =\n action.input.type === undefined\n ? (existing?.type ?? null)\n : action.input.type;\n if (type === \"SECRET\" && value !== null && typeof value !== \"string\") {\n throw new SecretVariableValueError(\n \"A SECRET variable's value must be a secret reference string\",\n );\n }\n if (existing) {\n existing.key = action.input.key;\n existing.value = value;\n existing.type = type;\n // Undefined leaves it unchanged; an explicit null or \"\" clears it.\n if (action.input.description !== undefined) {\n existing.description = action.input.description || null;\n }\n } else {\n state.variables.push({\n id: action.input.id,\n key: action.input.key,\n value,\n description: action.input.description || null,\n type,\n });\n }\n state.version += 1;\n },\n removeVariableOperation(state, action) {\n const index = state.variables.findIndex(\n (variable) => variable.id === action.input.id,\n );\n if (index === -1) {\n throw new VariableNotFoundError(\"Variable not found\");\n }\n state.variables.splice(index, 1);\n state.version += 1;\n },\n};\n","export type ErrorCode = \"WorkflowNotPublishedError\";\n\nexport interface ReducerError {\n errorCode: ErrorCode;\n}\n\nexport class WorkflowNotPublishedError extends Error implements ReducerError {\n errorCode = \"WorkflowNotPublishedError\" as ErrorCode;\n constructor(message = \"WorkflowNotPublishedError\") {\n super(message);\n }\n}\n\nexport const errors = {\n SetWorkflowStatus: { WorkflowNotPublishedError },\n};\n","import type { WorkflowWorkflowOperations } from \"document-models/workflow/v1\";\nimport { WorkflowNotPublishedError } from \"../../gen/workflow/error.js\";\n\nexport const workflowWorkflowOperations: WorkflowWorkflowOperations = {\n setWorkflowNameOperation(state, action) {\n state.name = action.input.name;\n },\n setWorkflowDescriptionOperation(state, action) {\n state.description = action.input.description || null;\n },\n setWorkflowStatusOperation(state, action) {\n // Runs execute the published snapshot, so there must be one to run.\n if (action.input.status === \"ENABLED\" && !state.published) {\n throw new WorkflowNotPublishedError(\n \"Publish the workflow before enabling it\",\n );\n }\n state.status = action.input.status;\n },\n};\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-unsafe-argument */\nimport type { Reducer, StateReducer } from \"document-model\";\nimport { createReducer, isDocumentAction } from \"document-model\";\nimport type { WorkflowPHState } from \"document-models/workflow/v1\";\n\nimport { workflowEdgesOperations } from \"../src/reducers/edges.js\";\nimport { workflowPolicyOperations } from \"../src/reducers/policy.js\";\nimport { workflowPublishingOperations } from \"../src/reducers/publishing.js\";\nimport { workflowRuntimeOperations } from \"../src/reducers/runtime.js\";\nimport { workflowStepsOperations } from \"../src/reducers/steps.js\";\nimport { workflowTriggerOperations } from \"../src/reducers/trigger.js\";\nimport { workflowVariablesOperations } from \"../src/reducers/variables.js\";\nimport { workflowWorkflowOperations } from \"../src/reducers/workflow.js\";\n\nimport {\n AddEdgeInputSchema,\n AddStepInputSchema,\n ClearTriggerInputSchema,\n PublishWorkflowInputSchema,\n RemoveEdgeInputSchema,\n RemoveStepInputSchema,\n RemoveVariableInputSchema,\n RevertToPublishedInputSchema,\n SetLastRunInputSchema,\n SetLastTestInputSchema,\n SetPolicyInputSchema,\n SetStepConfigInputSchema,\n SetTriggerConfigInputSchema,\n SetTriggerConnectionInputSchema,\n SetTriggerInputSchema,\n SetTriggerPieceVersionInputSchema,\n SetVariableInputSchema,\n SetWorkflowDescriptionInputSchema,\n SetWorkflowNameInputSchema,\n SetWorkflowStatusInputSchema,\n UpdateStepInputSchema,\n} from \"./schema/zod.js\";\n\nconst schemaMemo = new Map<() => unknown, unknown>();\n\nfunction memoizedSchema<T>(makeSchema: () => T): T {\n let schema = schemaMemo.get(makeSchema) as T | undefined;\n if (schema === undefined) {\n schema = makeSchema();\n schemaMemo.set(makeSchema, schema);\n }\n return schema;\n}\n\nconst stateReducer: StateReducer<WorkflowPHState> = (\n state,\n action,\n dispatch,\n) => {\n if (isDocumentAction(action)) {\n return state;\n }\n switch (action.type) {\n case \"SET_WORKFLOW_NAME\": {\n memoizedSchema(SetWorkflowNameInputSchema).parse(action.input);\n\n workflowWorkflowOperations.setWorkflowNameOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_WORKFLOW_DESCRIPTION\": {\n memoizedSchema(SetWorkflowDescriptionInputSchema).parse(action.input);\n\n workflowWorkflowOperations.setWorkflowDescriptionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_WORKFLOW_STATUS\": {\n memoizedSchema(SetWorkflowStatusInputSchema).parse(action.input);\n\n workflowWorkflowOperations.setWorkflowStatusOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_TRIGGER\": {\n memoizedSchema(SetTriggerInputSchema).parse(action.input);\n\n workflowTriggerOperations.setTriggerOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"CLEAR_TRIGGER\": {\n memoizedSchema(ClearTriggerInputSchema).parse(action.input);\n\n workflowTriggerOperations.clearTriggerOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_TRIGGER_CONFIG\": {\n memoizedSchema(SetTriggerConfigInputSchema).parse(action.input);\n\n workflowTriggerOperations.setTriggerConfigOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_TRIGGER_CONNECTION\": {\n memoizedSchema(SetTriggerConnectionInputSchema).parse(action.input);\n\n workflowTriggerOperations.setTriggerConnectionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_TRIGGER_PIECE_VERSION\": {\n memoizedSchema(SetTriggerPieceVersionInputSchema).parse(action.input);\n\n workflowTriggerOperations.setTriggerPieceVersionOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_STEP\": {\n memoizedSchema(AddStepInputSchema).parse(action.input);\n\n workflowStepsOperations.addStepOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"UPDATE_STEP\": {\n memoizedSchema(UpdateStepInputSchema).parse(action.input);\n\n workflowStepsOperations.updateStepOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_STEP\": {\n memoizedSchema(RemoveStepInputSchema).parse(action.input);\n\n workflowStepsOperations.removeStepOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_STEP_CONFIG\": {\n memoizedSchema(SetStepConfigInputSchema).parse(action.input);\n\n workflowStepsOperations.setStepConfigOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"ADD_EDGE\": {\n memoizedSchema(AddEdgeInputSchema).parse(action.input);\n\n workflowEdgesOperations.addEdgeOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_EDGE\": {\n memoizedSchema(RemoveEdgeInputSchema).parse(action.input);\n\n workflowEdgesOperations.removeEdgeOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_VARIABLE\": {\n memoizedSchema(SetVariableInputSchema).parse(action.input);\n\n workflowVariablesOperations.setVariableOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REMOVE_VARIABLE\": {\n memoizedSchema(RemoveVariableInputSchema).parse(action.input);\n\n workflowVariablesOperations.removeVariableOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_POLICY\": {\n memoizedSchema(SetPolicyInputSchema).parse(action.input);\n\n workflowPolicyOperations.setPolicyOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_LAST_RUN\": {\n memoizedSchema(SetLastRunInputSchema).parse(action.input);\n\n workflowRuntimeOperations.setLastRunOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"SET_LAST_TEST\": {\n memoizedSchema(SetLastTestInputSchema).parse(action.input);\n\n workflowRuntimeOperations.setLastTestOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"PUBLISH_WORKFLOW\": {\n memoizedSchema(PublishWorkflowInputSchema).parse(action.input);\n\n workflowPublishingOperations.publishWorkflowOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n case \"REVERT_TO_PUBLISHED\": {\n memoizedSchema(RevertToPublishedInputSchema).parse(action.input);\n\n workflowPublishingOperations.revertToPublishedOperation(\n (state as any)[action.scope],\n action as any,\n dispatch,\n );\n\n break;\n }\n\n default:\n return state;\n }\n};\n\nexport const reducer: Reducer<WorkflowPHState> = createReducer(stateReducer);\n","export const supportedVersions = [1] as const;\n\nexport const latestVersion = supportedVersions[0];\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { UpgradeManifest } from \"document-model\";\nimport { latestVersion, supportedVersions } from \"./versions.js\";\n\nexport const workflowUpgradeManifest: UpgradeManifest<\n typeof supportedVersions\n> = {\n documentType: \"powerhouse/workflow\",\n latestVersion,\n supportedVersions,\n upgrades: {},\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nexport const workflowDocumentType = \"powerhouse/workflow\";\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport {\n BaseDocumentHeaderSchema,\n BaseDocumentStateSchema,\n} from \"document-model\";\nimport { z } from \"zod\";\nimport { workflowDocumentType } from \"./document-type.js\";\nimport { WorkflowStateSchema } from \"./schema/zod.js\";\nimport type { WorkflowDocument, WorkflowPHState } from \"./types.js\";\n\n/** Schema for validating the header object of a Workflow document */\nexport const WorkflowDocumentHeaderSchema = BaseDocumentHeaderSchema.extend({\n documentType: z.literal(workflowDocumentType),\n});\n\n/** Schema for validating the state object of a Workflow document */\nexport const WorkflowPHStateSchema = BaseDocumentStateSchema.extend({\n global: WorkflowStateSchema(),\n});\n\nexport const WorkflowDocumentSchema = z.object({\n header: WorkflowDocumentHeaderSchema,\n state: WorkflowPHStateSchema,\n initialState: WorkflowPHStateSchema,\n});\n\n/** Simple helper function to check if a state object is a Workflow document state object */\nexport function isWorkflowState(state: unknown): state is WorkflowPHState {\n return WorkflowPHStateSchema.safeParse(state).success;\n}\n\n/** Simple helper function to assert that a document state object is a Workflow document state object */\nexport function assertIsWorkflowState(\n state: unknown,\n): asserts state is WorkflowPHState {\n WorkflowPHStateSchema.parse(state);\n}\n\n/** Simple helper function to check if a document is a Workflow document */\nexport function isWorkflowDocument(\n document: unknown,\n): document is WorkflowDocument {\n return WorkflowDocumentSchema.safeParse(document).success;\n}\n\n/** Simple helper function to assert that a document is a Workflow document */\nexport function assertIsWorkflowDocument(\n document: unknown,\n): asserts document is WorkflowDocument {\n WorkflowDocumentSchema.parse(document);\n}\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils, PHBaseState, Reducer } from \"document-model\";\nimport {\n baseCreateDocument,\n baseLoadFromInputVersioned,\n baseSaveToFileHandle,\n createBaseState,\n} from \"document-model\";\nimport { workflowUpgradeManifest } from \"../../upgrades/upgrade-manifest.js\";\nimport {\n assertIsWorkflowDocument,\n assertIsWorkflowState,\n isWorkflowDocument,\n isWorkflowState,\n} from \"./document-schema.js\";\nimport { workflowDocumentType } from \"./document-type.js\";\nimport { reducer } from \"./reducer.js\";\nimport type {\n WorkflowGlobalState,\n WorkflowLocalState,\n WorkflowPHState,\n} from \"./types.js\";\n\nexport const initialGlobalState: WorkflowGlobalState = {\n name: \"\",\n description: null,\n status: \"DRAFT\",\n version: 0,\n trigger: null,\n steps: [],\n edges: [],\n variables: [],\n policy: {\n concurrency: \"QUEUE\",\n maxParallelRuns: null,\n runTimeoutSeconds: 3600,\n maxSuspensionDays: 30,\n defaultRetry: {\n maxAttempts: 1,\n backoff: \"FIXED\",\n initialDelaySeconds: 5,\n maxDelaySeconds: 300,\n retryOn: [],\n },\n onFailure: \"PARK\",\n retainRunsDays: 30,\n journalAsDocument: false,\n },\n published: null,\n lastRunAt: null,\n lastRunStatus: null,\n};\nexport const initialLocalState: WorkflowLocalState = {};\n\nexport const utils: DocumentModelUtils<WorkflowPHState> = {\n fileExtension: \".flow\",\n createState(state) {\n return {\n ...createBaseState(state?.auth, { version: 1, ...state?.document }),\n global: { ...initialGlobalState, ...state?.global },\n local: { ...initialLocalState, ...state?.local },\n };\n },\n createDocument(state) {\n return baseCreateDocument(utils.createState, state, workflowDocumentType);\n },\n saveToFileHandle(document, input) {\n return baseSaveToFileHandle(document, input);\n },\n loadFromInput(input) {\n return baseLoadFromInputVersioned(input, {\n reducers: { 1: reducer as unknown as Reducer<PHBaseState> },\n upgradeManifest: workflowUpgradeManifest,\n });\n },\n isStateOfType(state) {\n return isWorkflowState(state);\n },\n assertIsStateOfType(state) {\n return assertIsWorkflowState(state);\n },\n isDocumentOfType(document) {\n return isWorkflowDocument(document);\n },\n assertIsDocumentOfType(document) {\n return assertIsWorkflowDocument(document);\n },\n};\n","export {};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelUtils } from \"document-model\";\nimport type { WorkflowPHState } from \"./gen/types.js\";\nimport { utils as genUtils } from \"./gen/utils.js\";\nimport * as customUtils from \"./src/utils.js\";\n\n/** Utils for the Workflow document model */\nexport const utils: DocumentModelUtils<WorkflowPHState> = {\n ...genUtils,\n ...customUtils,\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { DocumentModelModule } from \"document-model\";\nimport { createState, defaultBaseState } from \"document-model\";\nimport { actions } from \"./actions.js\";\nimport { documentModel } from \"./gen/document-model.js\";\nimport { reducer } from \"./gen/reducer.js\";\nimport type { WorkflowPHState } from \"./gen/types.js\";\nimport { utils } from \"./utils.js\";\n\n/** Document model module for the Workflow document type */\nexport const Workflow = {\n version: 1,\n reducer,\n actions,\n utils,\n documentModel: createState(defaultBaseState(), documentModel),\n} as const satisfies DocumentModelModule<WorkflowPHState>;\n"],"mappings":";;;;;;AA4DA,MAAa,uBAAuB,MAClC,MAAM,KAAA,KAAa,MAAM;AAE3B,MAAa,0BAA0BA,IACpC,IAAI,CAAC,CACL,QAAQ,MAAM,oBAAoB,CAAC,CAAC;AAEvC,MAAa,oBAAoBA,IAAE,KAAK,CAAC,eAAe,OAAO,CAAC;AAEhE,MAAa,w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,MAAM;IACN,aAAa;IACb,YAAY;KACV;MACE,IAAI;MACJ,MAAM;MACN,aAAa;MACb,QAAQ;MACR,UAAU;MACV,SAAS;MACT,QAAQ,CAAC;MACT,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aAAa;MACb,QACE;MACF,UAAU;MACV,SAAS;MACT,QAAQ,CAAC;MACT,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aACE;MACF,QACE;MACF,UACE;MACF,SAAS;MACT,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aACE;OACF,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;IACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY;KACV;MACE,IAAI;MACJ,MAAM;MACN,aACE;MACF,QACE;MACF,UACE;MACF,SACE;MACF,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aACE;OACF,UAAU;MACZ,GACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aAAa;MACb,QAAQ;MACR,UAAU;MACV,SACE;MACF,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aACE;MACF,QACE;MACF,UACE;MACF,SAAS;MACT,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,GACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aACE;MACF,QACE;MACF,UACE;MACF,SAAS;MACT,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aACE;MACF,QACE;MACF,UACE;MACF,SAAS;MACT,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,GACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;IACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY;KACV;MACE,IAAI;MACJ,MAAM;MACN,aAAa;MACb,QACE;MACF,UAAU;MACV,SACE;MACF,QAAQ;OACN;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;OACZ;OACA;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;OACZ;OACA;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aACE;QACF,UAAU;OACZ;OACA;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;OACZ;MACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aAAa;MACb,QACE;MACF,UAAU;MACV,SACE;MACF,QAAQ;OACN;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;OACZ;OACA;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;OACZ;OACA;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aACE;QACF,UAAU;OACZ;OACA;QACE,IAAI;QACJ,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;OACZ;MACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aAAa;MACb,QAAQ;MACR,UAAU;MACV,SACE;MACF,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;KACA;MACE,IAAI;MACJ,MAAM;MACN,aACE;MACF,QACE;MACF,UACE;MACF,SACE;MACF,QAAQ,CACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,GACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ,CACF;MACA,UAAU,CAAC;MACX,OAAO;KACT;IACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY,CACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UACE;KACF,SACE;KACF,QAAQ;MACN;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ;MACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aACE;OACF,UAAU;MACZ;MACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aAAa;OACb,UAAU;MACZ;MACA;OACE,IAAI;OACJ,MAAM;OACN,MAAM;OACN,aACE;OACF,UAAU;MACZ;KACF;KACA,UAAU,CAAC;KACX,OAAO;IACT,GACA;KACE,IAAI;KACJ,MAAM;KACN,aAAa;KACb,QAAQ;KACR,UAAU;KACV,SACE;KACF,QAAQ,CACN;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aAAa;MACb,UAAU;KACZ,CACF;KACA,UAAU,CAAC;KACX,OAAO;IACT,CACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY,CACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SACE;KACF,QAAQ,CACN;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aACE;MACF,UAAU;KACZ,GACA;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aAAa;MACb,UAAU;KACZ,CACF;KACA,UAAU,CAAC;KACX,OAAO;IACT,GACA;KACE,IAAI;KACJ,MAAM;KACN,aAAa;KACb,QAAQ;KACR,UAAU;KACV,SACE;KACF,QAAQ,CACN;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aAAa;MACb,UAAU;KACZ,CACF;KACA,UAAU,CAAC;KACX,OAAO;IACT,CACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY,CACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UAAU;KACV,SACE;KACF,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT,CACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY,CACV;KACE,IAAI;KACJ,MAAM;KACN,aAAa;KACb,QACE;KACF,UAAU;KACV,SACE;KACF,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT,GACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UACE;KACF,SAAS;KACT,QAAQ,CACN;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aAAa;MACb,UAAU;KACZ,CACF;KACA,UAAU,CAAC;KACX,OAAO;IACT,CACF;GACF;GACA;IACE,IAAI;IACJ,MAAM;IACN,aAAa;IACb,YAAY,CACV;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QACE;KACF,UACE;KACF,SAAS;KACT,QAAQ,CAAC;KACT,UAAU,CAAC;KACX,OAAO;IACT,GACA;KACE,IAAI;KACJ,MAAM;KACN,aACE;KACF,QAAQ;KACR,UACE;KACF,SAAS;KACT,QAAQ,CACN;MACE,IAAI;MACJ,MAAM;MACN,MAAM;MACN,aAAa;MACb,UAAU;KACZ,CACF;KACA,UAAU,CAAC;KACX,OAAO;IACT,CACF;GACF;EACF;EACA,SAAS;EACT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se Reactor",
|
|
5
5
|
"logoUrl": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMTQgMTE0IiBmaWxsPSJub25lIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzE2MTYxNiIgZD0iTTcxLjI5MTkgMEwyNC4zNDE1IDM4Ljg3NzJDMTcuNDU0OCA0NC41Nzk4IDE2Ljk1MzkgNTQuOTY1OSAyMy4yNiA2MS4zMDQ3TDM5LjUwMjggNzcuNjMxOEM0NC4yNjg0IDgyLjQyMjEgNDUuMjk5NiA4OS43ODM0IDQyLjAzMzUgOTUuNjk4OEwzMS45MjkgMTE0SDE1LjJDNi44MDUyNyAxMTQgMCAxMDcuMTk1IDAgOTguOFYxNS4yQzAgNi44MDUyNyA2LjgwNTI3IDAgMTUuMiAwSDcxLjI5MTlaTTgwLjExMSAwTDcxLjM0MTIgMTUuOTc1OEM2OC4xMDc4IDIxLjg2NiA2OS4xMjU1IDI5LjE4MDQgNzMuODQ0MSAzMy45NjQxTDkxLjA3NTEgNTEuNDMzMUM5Ny4zNjc0IDU3LjgxMjQgOTYuODA0NCA2OC4yMjI3IDg5Ljg2MDcgNzMuODg2MUw0MC42NzgyIDExNEg5OC44QzEwNy4xOTUgMTE0IDExNCAxMDcuMTk1IDExNCA5OC44VjE1LjJDMTE0IDYuODA1MjcgMTA3LjE5NSAwIDk4LjggMEg4MC4xMTFaIi8+PC9zdmc+",
|
|
6
6
|
"actions": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/piece-reactor",
|
|
3
|
-
"version": "6.2.3-dev.
|
|
3
|
+
"version": "6.2.3-dev.56",
|
|
4
4
|
"description": "Read and write Powerhouse documents on the reactor this workflow runs in: create documents, dispatch actions, read state and schemas, and fire on document events.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as blockKey } from "./block-type-kX-27vVt.mjs";
|
|
2
2
|
import { ambientRenownTokenProvider } from "@powerhousedao/reactor-browser/graphql-client";
|
|
3
3
|
//#region editors/workflow-editor/ui/forms.ts
|
|
4
4
|
const POLL_INTERVAL_PROP = {
|
|
@@ -2619,6 +2619,6 @@ const secretStatQuery = (client, ref) => queryOptions({
|
|
|
2619
2619
|
staleTime: 0
|
|
2620
2620
|
});
|
|
2621
2621
|
//#endregion
|
|
2622
|
-
export {
|
|
2622
|
+
export { SCHEDULE_TRIGGER as $, keepPreviousData as A, Subscribable as B, infiniteQueryBehavior as C, focusManager as D, pendingThenable as E, resolveStaleTime as F, fetchRuns as G, RuntimeRequestError as H, shallowEqualObjects as I, ASSERT_BLOCK as J, fetchRunsPage as K, shouldThrowError as L, replaceData as M, replaceEqualDeep as N, isServer as O, resolveEnabled as P, REACTOR_PIECE as Q, timeUntilStale as R, hasPreviousPage as S, notifyManager as T, createRuntimeClient as U, DEFAULT_RUNTIME_URL as V, fetchRun as W, CORE_PIECE as X, BRANCH_BLOCK as Y, MANUAL_TRIGGER as Z, runtimeKeys as _, isDocumentRefMarker as _t, pieceActionsQuery as a, sameBlock as at, QueryClient as b, scheduleConfigIssue as bt, runQuery as c, triggerBlock as ct, secretStatQuery as d, DOCUMENT_REF_KEY as dt, STEP_PRESETS as et, stepOutputTreeQuery as f, NEXT_PORT as ft, queryKind as g, flowPorts as gt, blockRefKey as h, expandDocumentRefs as ht, outputTreeQuery as i, pinBlock as it, noop as j, isValidTimeout as k, runsOfPages as l, triggerFields as lt, SHARED_STALE_MS as m, documentRefsIn as mt, catalogQuery as n, WEBHOOK_TRIGGER as nt, pieceTriggersQuery as o, stepBlock as ot, RESOLVER_STALE_MS as p, checkTriggerStrategy as pt, isSyncingError as q, createRuntimeQueryClient as r, isCoreBlock as rt, runPagesQuery as s, stepFields as st, blockFormQuery as t, TRIGGER_PRESETS as tt, runsQuery as u, CORE_PIECE_NAME as ut, TEST_TRIGGER_KIND as v, knownPorts as vt, fetchState as w, hasNextPage as x, realRuns as y, parseScheduleConfig as yt, timeoutManager as z };
|
|
2623
2623
|
|
|
2624
|
-
//# sourceMappingURL=runtime-queries-
|
|
2624
|
+
//# sourceMappingURL=runtime-queries-CJSpbsBq.mjs.map
|