@codemation/core 0.13.2 → 0.15.0
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/CHANGELOG.md +167 -0
- package/dist/{CostCatalogContract-Dxq1BTyi.d.cts → CostCatalogContract-Dwo-ZamG.d.cts} +2 -2
- package/dist/EngineRuntimeRegistration.types-BiNasx3G.d.cts +54 -0
- package/dist/EngineRuntimeRegistration.types-Dq4ucrdo.d.ts +21 -0
- package/dist/{InMemoryRunDataFactory-Csy2evr_.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts} +4 -20
- package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs.map → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs.map} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js → InMemoryRunEventBusRegistry-Layt2xgm.js} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js.map → InMemoryRunEventBusRegistry-Layt2xgm.js.map} +1 -1
- package/dist/{ItemsInputNormalizer-Bi8m-Ijs.d.cts → ItemsInputNormalizer-A5txcOWX.d.cts} +3 -98
- package/dist/{ItemsInputNormalizer-BbQTSEkZ.cjs → ItemsInputNormalizer-C1fv3sMW.cjs} +2 -2
- package/dist/ItemsInputNormalizer-C1fv3sMW.cjs.map +1 -0
- package/dist/{ItemsInputNormalizer-BYljnXU0.d.ts → ItemsInputNormalizer-D2vrMrX1.d.ts} +2 -62
- package/dist/{ItemsInputNormalizer-CSZGMgl3.js → ItemsInputNormalizer-fUYo4GLV.js} +2 -2
- package/dist/ItemsInputNormalizer-fUYo4GLV.js.map +1 -0
- package/dist/{RunIntentService-BitgkKaT.d.cts → RunIntentService-DKxuHTUz.d.cts} +2 -15
- package/dist/{RunIntentService-DYpqfu6D.d.ts → RunIntentService-DrpKli2k.d.ts} +2 -22
- package/dist/{agentMcpTypes-DGIwk6Ue.d.cts → agentMcpTypes-BHX4RQCC.d.cts} +25 -518
- package/dist/bootstrap/index.cjs +9 -5
- package/dist/bootstrap/index.d.cts +32 -106
- package/dist/bootstrap/index.d.ts +18 -17
- package/dist/bootstrap/index.js +6 -5
- package/dist/{bootstrap-DIv-vloi.cjs → bootstrap-CTB53rEF.cjs} +9 -60
- package/dist/bootstrap-CTB53rEF.cjs.map +1 -0
- package/dist/{bootstrap-Bkd-Nfbn.js → bootstrap-DmqKheCI.js} +6 -57
- package/dist/bootstrap-DmqKheCI.js.map +1 -0
- package/dist/browser.cjs +12 -11
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +3 -2
- package/dist/contracts-7L1wJHdk.cjs +569 -0
- package/dist/contracts-7L1wJHdk.cjs.map +1 -0
- package/dist/contracts-CjJ5CZ7N.js +447 -0
- package/dist/contracts-CjJ5CZ7N.js.map +1 -0
- package/dist/contracts.cjs +9 -2
- package/dist/contracts.d.cts +5 -5
- package/dist/contracts.d.ts +2 -2
- package/dist/contracts.js +3 -2
- package/dist/{executionPersistenceContracts-CN9d7AnL.d.cts → deploymentManifestTypes-B8CDmZZK.d.cts} +65 -81
- package/dist/di-C6Ubf9o5.cjs +179 -0
- package/dist/di-C6Ubf9o5.cjs.map +1 -0
- package/dist/di-Cjiil7U-.js +114 -0
- package/dist/di-Cjiil7U-.js.map +1 -0
- package/dist/{index-rllWL4r-.d.ts → index-CRv3_pY3.d.ts} +112 -808
- package/dist/{index-BSQ2LoIh.d.ts → index-mnLS0iQl.d.ts} +39 -372
- package/dist/index.cjs +53 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -438
- package/dist/index.d.ts +5 -5
- package/dist/index.js +28 -94
- package/dist/index.js.map +1 -1
- package/dist/{params-DRUr0F5v.d.cts → params-CrK4iuG1.d.cts} +3 -13
- package/dist/{runtime-CWPdvJpC.js → runtime-CBFDpmiz.js} +112 -648
- package/dist/runtime-CBFDpmiz.js.map +1 -0
- package/dist/{runtime-_VdHwGkJ.cjs → runtime-Due-FOZ2.cjs} +137 -717
- package/dist/runtime-Due-FOZ2.cjs.map +1 -0
- package/dist/testing.cjs +8 -40
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +3 -32
- package/dist/testing.d.ts +3 -32
- package/dist/testing.js +6 -38
- package/dist/testing.js.map +1 -1
- package/dist/{di-LP2qSHkY.cjs → workflowTypes-BW6Hhee7.cjs} +4 -230
- package/dist/workflowTypes-BW6Hhee7.cjs.map +1 -0
- package/dist/{di-tom0pM2h.js → workflowTypes-DZtBTmKf.js} +3 -163
- package/dist/workflowTypes-DZtBTmKf.js.map +1 -0
- package/package.json +1 -1
- package/src/ai/AgentConnectionNodeCollector.ts +0 -4
- package/src/ai/AgentMessageConfigNormalizerFactory.ts +0 -4
- package/src/ai/AiHost.ts +0 -38
- package/src/ai/CallableToolConfig.ts +0 -9
- package/src/ai/CallableToolKindToken.ts +0 -4
- package/src/authoring/callableTool.types.ts +0 -3
- package/src/authoring/defineCollection.types.ts +0 -11
- package/src/authoring/defineHumanApprovalNode.types.ts +0 -116
- package/src/authoring/defineNode.types.ts +18 -32
- package/src/authoring/definePollingTrigger.types.ts +36 -155
- package/src/authoring/definePollingTriggerInternals.ts +0 -4
- package/src/authoring/index.ts +1 -0
- package/src/authoring/nodeBaseOptions.types.ts +4 -0
- package/src/binaries/boundedReadBinary.types.ts +0 -16
- package/src/bootstrap/index.ts +8 -2
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +0 -5
- package/src/bootstrap/runtime/EngineRuntimeRegistration.types.ts +0 -23
- package/src/browser.ts +0 -3
- package/src/contracts/AgentBindError.ts +0 -5
- package/src/contracts/Clock.ts +0 -1
- package/src/contracts/CodemationTelemetryAttributeNames.ts +0 -10
- package/src/contracts/NoOpAgentMcpIntegration.ts +0 -6
- package/src/contracts/NoOpTelemetrySpanScope.ts +0 -7
- package/src/contracts/RetryPolicy.ts +0 -2
- package/src/contracts/agentMcpTypes.ts +0 -34
- package/src/contracts/assertionTypes.ts +0 -33
- package/src/contracts/baseTypes.ts +0 -6
- package/src/contracts/collectionTypes.ts +0 -25
- package/src/contracts/credentialTypes.ts +13 -60
- package/src/contracts/deploymentManifestTypes.ts +158 -0
- package/src/contracts/dispatchTypes.ts +29 -0
- package/src/contracts/executionPersistenceContracts.ts +0 -33
- package/src/contracts/hitlSeamTypes.ts +0 -14
- package/src/contracts/humanTaskStoreTypes.ts +0 -2
- package/src/contracts/inboxChannelTypes.ts +0 -9
- package/src/contracts/index.ts +3 -0
- package/src/contracts/itemExpr.ts +7 -21
- package/src/contracts/itemMeta.ts +0 -3
- package/src/contracts/mcpTypes.ts +0 -16
- package/src/contracts/retryPolicySpec.types.ts +0 -10
- package/src/contracts/runFinishedAtFactory.ts +0 -1
- package/src/contracts/runTypes.ts +0 -74
- package/src/contracts/runtimeTypes.ts +4 -131
- package/src/contracts/telemetryTypes.ts +0 -7
- package/src/contracts/testTriggerTypes.ts +0 -43
- package/src/contracts/triggerInvokerTypes.ts +6 -0
- package/src/contracts/webhookTypes.ts +0 -8
- package/src/contracts/workflowActivationPolicy.ts +0 -5
- package/src/contracts/workflowTypes.ts +5 -80
- package/src/contracts/workspaceFileTypes.ts +10 -42
- package/src/contracts.ts +18 -10
- package/src/credentials/CredentialMaterialProvider.types.ts +0 -28
- package/src/credentials/ManagedCredentialMaterialWriteError.ts +0 -6
- package/src/credentials/ManagedMaterialFetchError.ts +0 -6
- package/src/credentials/OAuthFlowExecutor.types.ts +0 -15
- package/src/di/CoreTokens.ts +2 -6
- package/src/events/ConnectionInvocationEventPublisher.ts +0 -7
- package/src/events/NodeEventPublisher.ts +0 -1
- package/src/events/runEvents.ts +0 -8
- package/src/execution/ActivationEnqueueService.ts +0 -10
- package/src/execution/ChildExecutionScopeFactory.ts +0 -13
- package/src/execution/FanInMergeByOriginMerger.ts +0 -11
- package/src/execution/InProcessRetryRunner.ts +0 -1
- package/src/execution/ItemExprResolver.ts +0 -3
- package/src/execution/NodeActivationRequestComposer.ts +0 -3
- package/src/execution/NodeActivationRequestInputPreparer.ts +0 -5
- package/src/execution/NodeExecutionSnapshotFactory.ts +0 -1
- package/src/execution/NodeExecutor.ts +1 -17
- package/src/execution/NodeOutputNormalizer.ts +8 -1
- package/src/execution/NodeSuspensionHandler.ts +1 -39
- package/src/execution/PersistedRunStateTerminalBuilder.ts +0 -5
- package/src/execution/RunSuspendedError.ts +0 -10
- package/src/execution/RunnableOutputBehaviorResolver.ts +12 -0
- package/src/execution/WorkflowRunExecutionContextFactory.ts +0 -3
- package/src/index.ts +10 -2
- package/src/orchestration/AbortControllerFactory.ts +0 -4
- package/src/orchestration/Engine.ts +0 -9
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +3 -4
- package/src/orchestration/RunContinuationService.ts +7 -39
- package/src/orchestration/RunStartService.ts +0 -7
- package/src/orchestration/TestSuiteOrchestrator.ts +0 -18
- package/src/orchestration/TestSuiteRunIdFactory.ts +0 -4
- package/src/orchestration/TriggerRuntimeService.ts +3 -2
- package/src/planning/CurrentStateFrontierPlanner.ts +0 -1
- package/src/planning/RunQueuePlanner.ts +0 -6
- package/src/policies/executionLimits/EngineExecutionLimitsPolicy.ts +0 -8
- package/src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.ts +0 -3
- package/src/runStorage/RunSummaryMapper.ts +0 -1
- package/src/runtime/EngineFactory.ts +6 -11
- package/src/runtime/RunIntentService.ts +0 -4
- package/src/runtime/WorkflowRepositoryWebhookTriggerMatcher.ts +0 -4
- package/src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.ts +0 -4
- package/src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.ts +0 -4
- package/src/runtime-types/PersistedRuntimeTypeNameResolver.ts +0 -1
- package/src/runtime-types/persistedRuntimeTypeModelRegistry.ts +0 -4
- package/src/runtime-types/runtimeTypeDecorators.types.ts +0 -12
- package/src/scheduler/ConfigDrivenOffloadPolicy.ts +0 -1
- package/src/scheduler/DefaultDrivingScheduler.ts +0 -6
- package/src/scheduler/InlineDrivingScheduler.ts +0 -13
- package/src/serialization/ItemsInputNormalizer.ts +0 -5
- package/src/testing/CapturingScheduler.ts +0 -3
- package/src/testing/EngineTestKitRunIdFactory.ts +0 -3
- package/src/testing/ItemHarnessNode.ts +0 -3
- package/src/testing/ItemHarnessNodeConfig.ts +0 -4
- package/src/testing/PrefixedSequentialIdGenerator.ts +0 -3
- package/src/testing/RegistrarEngineTestKit.types.ts +0 -2
- package/src/testing/RejectingCredentialSessionService.ts +0 -4
- package/src/testing/SubWorkflowRunnerTestNode.ts +0 -3
- package/src/testing/WorkflowTestHarnessManualTrigger.ts +0 -3
- package/src/testing/WorkflowTestKitBuilder.ts +0 -4
- package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +0 -3
- package/src/testing.ts +0 -3
- package/src/triggers/polling/PollingTriggerDedupWindow.ts +0 -4
- package/src/triggers/polling/PollingTriggerLogger.ts +0 -5
- package/src/triggers/polling/PollingTriggerRuntime.ts +0 -5
- package/src/types/index.ts +0 -6
- package/src/validation/WorkflowEdgePortValidator.ts +0 -5
- package/src/workflow/definition/ConnectionInvocationIdFactory.ts +0 -7
- package/src/workflow/definition/ConnectionNodeIdFactory.ts +0 -6
- package/src/workflow/definition/NodeIterationIdFactory.ts +0 -13
- package/src/workflow/definition/WorkflowExecutableNodeClassifier.ts +0 -6
- package/src/workflow/dsl/ChainCursorResolver.ts +8 -15
- package/src/workflow/dsl/NodeIdSlugifier.ts +0 -9
- package/src/workflow/dsl/WhenBuilder.ts +49 -2
- package/src/workflow/dsl/WorkflowDefinitionError.ts +0 -9
- package/src/workflow/dsl/workflowBuilderTypes.ts +5 -0
- package/src/workflowSnapshots/MissingRuntimeParityGuard.ts +24 -0
- package/src/workflowSnapshots/PersistedWorkflowTokenRegistry.ts +0 -6
- package/src/workflowSnapshots/WorkflowParityMismatchError.ts +18 -0
- package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +1 -5
- package/src/workflowSnapshots/index.ts +3 -0
- package/dist/EngineRuntimeRegistration.types-CqcTWexS.d.cts +0 -81
- package/dist/EngineRuntimeRegistration.types-Cr75cSfL.d.ts +0 -44
- package/dist/ItemsInputNormalizer-BbQTSEkZ.cjs.map +0 -1
- package/dist/ItemsInputNormalizer-CSZGMgl3.js.map +0 -1
- package/dist/bootstrap-Bkd-Nfbn.js.map +0 -1
- package/dist/bootstrap-DIv-vloi.cjs.map +0 -1
- package/dist/contracts-CK0x6w_G.cjs +0 -74
- package/dist/contracts-CK0x6w_G.cjs.map +0 -1
- package/dist/contracts-DXdfTdpW.js +0 -50
- package/dist/contracts-DXdfTdpW.js.map +0 -1
- package/dist/di-LP2qSHkY.cjs.map +0 -1
- package/dist/di-tom0pM2h.js.map +0 -1
- package/dist/runtime-CWPdvJpC.js.map +0 -1
- package/dist/runtime-_VdHwGkJ.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,172 @@
|
|
|
1
1
|
# @codemation/core
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#270](https://github.com/MadeRelevant/codemation/pull/270) [`60f23a3`](https://github.com/MadeRelevant/codemation/commit/60f23a37660cdda34e3d61acca8b2bf581a9db0e) Thanks [@cblokland90](https://github.com/cblokland90)! - Enrich deployment manifest with real trigger poll config and interval (B3c/[#310](https://github.com/MadeRelevant/codemation/issues/310)).
|
|
8
|
+
|
|
9
|
+
`emitWorkflowManifest` now captures each polling trigger node's actual config object and poll interval into `ManifestTriggerConfig`. `ManifestTriggerConfig` gains an optional `pollIntervalMs` field. A dedicated `PollingTriggerConfig` interface carries `getTriggerPollConfig()` — only polling trigger nodes implement it; `NodeConfigBase` stays clean. `DefinedPollingTriggerConfig` implements `PollingTriggerConfig`, resolving `cfg.pollIntervalMs` (user instance override) falling back to the node-author default from `definePollingTrigger({ pollIntervalMs })`. The emitter narrows to `PollingTriggerConfig` via a type guard before calling the method. Bare trigger nodes that do not implement the interface continue to emit `config: {}` and no interval.
|
|
10
|
+
|
|
11
|
+
- [#254](https://github.com/MadeRelevant/codemation/pull/254) [`510e0d8`](https://github.com/MadeRelevant/codemation/commit/510e0d8a5f137a4fe10f43cbf46e40d05fea4977) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): code-parity guard — fail loudly when nodes resolve to MissingRuntime during run resume ([#271](https://github.com/MadeRelevant/codemation/issues/271))
|
|
12
|
+
|
|
13
|
+
A woken runner must run the exact built code. Any node that resolves to MissingRuntime during resume or worker execution now causes a loud WorkflowParityMismatchError with the mismatched node ids and token ids, persisted as a failed run. Previously these nodes were silently skipped and the run completed as if nothing went wrong.
|
|
14
|
+
|
|
15
|
+
New exports: `WorkflowParityMismatchError`, `MissingRuntimeParityGuard`, `MissingRuntimeNodeDetail`.
|
|
16
|
+
|
|
17
|
+
- [#263](https://github.com/MadeRelevant/codemation/pull/263) [`0dc8a9d`](https://github.com/MadeRelevant/codemation/commit/0dc8a9def376e4cd1821f3b92b0f887720e0c842) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): remove credentialHealthSeeds from WorkflowDeploymentManifest ([#304](https://github.com/MadeRelevant/codemation/issues/304))
|
|
18
|
+
|
|
19
|
+
The manifest carries credential shapes only. Health is CP-side concern computed from the vault at query time.
|
|
20
|
+
|
|
21
|
+
- [#262](https://github.com/MadeRelevant/codemation/pull/262) [`3facadf`](https://github.com/MadeRelevant/codemation/commit/3facadf3bc09d21f33e698213a521fb64168d5dd) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): optional `createSessionFromAccessToken` on the OAuth credential type contract (E2 [#279](https://github.com/MadeRelevant/codemation/issues/279))
|
|
22
|
+
|
|
23
|
+
OAuth credential types can now build an authenticated session from a bearer access token alone, with no client secret. This is the seam the scale-to-zero trigger-service uses: the control-plane is the sole credential store and the OAuth client secret never leaves it (epic [#261](https://github.com/MadeRelevant/codemation/issues/261) LD19) — the runner/trigger-service receives only a short-lived access token and constructs the vendor session from it.
|
|
24
|
+
|
|
25
|
+
`CredentialType` gains an optional `createSessionFromAccessToken(args: { accessToken, grantedScopes, publicConfig })` method. It is additive and non-breaking — existing credential types are unaffected. `@codemation/core-nodes-gmail` implements it (the Google client accepts a bearer token directly). Microsoft Graph is intentionally not implemented yet: it builds its session through `ConfidentialClientApplication` + refresh-token exchange and genuinely requires the client secret, so it stays on the secret-bearing `createSession` path until a token-only path exists.
|
|
26
|
+
|
|
27
|
+
- [#269](https://github.com/MadeRelevant/codemation/pull/269) [`c08cf33`](https://github.com/MadeRelevant/codemation/commit/c08cf33ead44fec64d3d43b9294fccfdf6674156) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core-nodes-gmail): rewrite Gmail trigger to plain-node definePollingTrigger ([#306](https://github.com/MadeRelevant/codemation/issues/306))
|
|
28
|
+
|
|
29
|
+
Converts OnNewGmailTriggerNode from a DI class with 6 injected deps to a definePollingTrigger definition (matching the msgraph pattern). Identity preserved byte-identical: @codemation/core-nodes-gmail::OnNewGmailTriggerNode.
|
|
30
|
+
- Removes 8 DI registrations from GmailNodesRegistry (trigger services inlined)
|
|
31
|
+
- Module-scope singletons preserve GmailConfiguredLabelService label cache across poll cycles
|
|
32
|
+
- OnNewGmailTrigger legacy DSL config class still works; its type token points at the new runtime
|
|
33
|
+
- Adds packageName? option to DefinePollingTriggerOptions in core to enable cross-package identity stamping
|
|
34
|
+
|
|
35
|
+
- [#282](https://github.com/MadeRelevant/codemation/pull/282) [`597fa8f`](https://github.com/MadeRelevant/codemation/commit/597fa8f697300d8d861a02c11e9819892f7947fa) Thanks [@cblokland90](https://github.com/cblokland90)! - Enrich `ManifestCanvas` nodes with `type`, `role`, `triggerKind`, `declaredOutputPorts`, and `declaredInputPorts` so the CP can render a faithful workflow diagram while the workspace pod is asleep. Bumps `DEPLOYMENT_MANIFEST_SCHEMA_VERSION` to 2; v1 manifests still deserialize gracefully (new fields are optional).
|
|
36
|
+
|
|
37
|
+
- [#268](https://github.com/MadeRelevant/codemation/pull/268) [`b15f8c6`](https://github.com/MadeRelevant/codemation/commit/b15f8c68125e3ec3082bab8d79414871f942e409) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): emitWorkflowManifest — pure build-time manifest emit function
|
|
38
|
+
|
|
39
|
+
- [#279](https://github.com/MadeRelevant/codemation/pull/279) [`ab5185a`](https://github.com/MadeRelevant/codemation/commit/ab5185a839118868eda1aab42b82f7a921037f37) Thanks [@cblokland90](https://github.com/cblokland90)! - Carry trigger item data through the trigger→runner dispatch ([#321](https://github.com/MadeRelevant/codemation/issues/321) JSON payload, [#317](https://github.com/MadeRelevant/codemation/issues/317) binaries via shared S3).
|
|
40
|
+
|
|
41
|
+
`DispatchItemMeta` is reshaped from a per-attachment `{ id, mimeType?, filename? }` into a per-item shape `{ id, json?, binary? }`, where `binary` is a name-keyed map of `BinaryAttachment` refs (`DispatchBinaryRef`). The trigger service now sends each item's real `item.json` inline and one dispatch entry per item; `TriggerDispatchRegistrar` reconstructs `{ json, binary }` for the runner so downstream nodes receive the trigger's actual data instead of `undefined`.
|
|
42
|
+
|
|
43
|
+
For binaries the metadata-first contract is kept: only the storage ref (`storageKey`/`storageDriver`/…) crosses the wire, never bytes/base64. The trigger runtime is wired symmetrically to the runner's shared `BinaryStorage` — `TriggerRuntimeContainerFactory` accepts a `BinaryStorage` and registers it at `CoreTokens.BinaryStorage` and into its `DefaultExecutionContextFactory`, and `InProcessTriggerInvoker` node-scopes `ctx.binary` so a trigger node's `ctx.binary.attach()` writes to the shared bucket. The `BINARY_STORAGE_KIND` / `BINARY_STORAGE_S3_*` keys are validated in the trigger-service `AppConfig` Zod schema (fail-fast at boot, the single `process.env` port), the same keys the host runner reads, so both sides share one bucket and the runner re-fetches bytes purely by `storageKey`. The composition root selects an in-memory store (default) or builds S3 via `S3TriggerBinaryStorageFactory` from the validated config; the factory never touches `process.env`.
|
|
44
|
+
|
|
45
|
+
- [#265](https://github.com/MadeRelevant/codemation/pull/265) [`fd188a2`](https://github.com/MadeRelevant/codemation/commit/fd188a2bac65c86dd62cf2f540034769c5bc0ac7) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core,host): TriggerInvoker port + InProcessTriggerInvoker slim impl (B2 PR1, [#274](https://github.com/MadeRelevant/codemation/issues/274))
|
|
46
|
+
|
|
47
|
+
Adds a `TriggerInvoker` port to `@codemation/core` contracts (`invoke(trigger, config, lastRanAt) → Items`) and a `CoreTokens.TriggerInvoker` DI symbol.
|
|
48
|
+
|
|
49
|
+
`@codemation/host` ships `InProcessTriggerInvoker`: a slim host implementation that runs one poll cycle for a given `TriggerNode` (no setInterval loop), captures items via the emit callback, persists the resulting state to `TriggerSetupStateRepository`, and returns the collected items. Registered lazily under `CoreTokens.TriggerInvoker` in `AppContainerFactory`.
|
|
50
|
+
|
|
51
|
+
Open: `lastRanAt` → opaque node state reconstruction is PR2's responsibility.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [#257](https://github.com/MadeRelevant/codemation/pull/257) [`a5457bb`](https://github.com/MadeRelevant/codemation/commit/a5457bb58edafec01e85cdcf6d30f9ca54521e27) Thanks [@cblokland90](https://github.com/cblokland90)! - Wire parity guard into HITL suspension resume path — resumeRun now fails loudly on missing-runtime nodes, preventing silent completions against mismatched code.
|
|
56
|
+
|
|
57
|
+
- [#253](https://github.com/MadeRelevant/codemation/pull/253) [`d5f49f7`](https://github.com/MadeRelevant/codemation/commit/d5f49f7f80deafc109dbc29f16ff0d571ee8591a) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): add WorkflowDeploymentManifest schema + serializer (CT1a)
|
|
58
|
+
|
|
59
|
+
- [#249](https://github.com/MadeRelevant/codemation/pull/249) [`364507a`](https://github.com/MadeRelevant/codemation/commit/364507a9fba45fd66cb208d5a41ee1f3bdc68311) Thanks [@cblokland90](https://github.com/cblokland90)! - Add transport-agnostic WorkflowDispatch contract (CT2, scale-to-zero [#263](https://github.com/MadeRelevant/codemation/issues/263))
|
|
60
|
+
|
|
61
|
+
- [#247](https://github.com/MadeRelevant/codemation/pull/247) [`bfdd759`](https://github.com/MadeRelevant/codemation/commit/bfdd7590b4903676b223c2f302b9bcd0f4a4583c) Thanks [@cblokland90](https://github.com/cblokland90)! - Remove all human-written comments from TypeScript source files and add `codemation/no-comments` ESLint rule to enforce self-describing code going forward.
|
|
62
|
+
|
|
63
|
+
- [#276](https://github.com/MadeRelevant/codemation/pull/276) [`0a681b3`](https://github.com/MadeRelevant/codemation/commit/0a681b357afd7b15ba3925788c732fd439d8e6b0) Thanks [@cblokland90](https://github.com/cblokland90)! - Add `schedulePollingTrigger` to core-nodes — a credential-less polling trigger that emits one `{ firedAt, tick }` item per cycle with a configurable `pollIntervalMs` (default 60 s). Its title is "Run on schedule" and it fires one tick item on every poll cycle. Fix missing `packageName` on `onNewMsGraphMailTrigger` so its `nodeTypeId` resolves correctly in `PersistedWorkflowTokenRegistry`. Add `nodeTypeId` field to `ManifestTriggerConfig` and populate it in `emitWorkflowManifest` so the CP scheduler can source the correct value to forward to the trigger-service `/poll` endpoint. Swap the legacy `CronTrigger` out of the builder agent-skills and examples in favour of `schedulePollingTrigger.create(...)` so the building agent is steered to the interval trigger.
|
|
64
|
+
|
|
65
|
+
- [#248](https://github.com/MadeRelevant/codemation/pull/248) [`f2aa0c4`](https://github.com/MadeRelevant/codemation/commit/f2aa0c42b2f9d2e9eb7bc4f3393f74342f7ef460) Thanks [@cblokland90](https://github.com/cblokland90)! - Extract `TriggerPollingPort` interface from `PollingTriggerHandle` as the explicit seam for the Trigger Service. `TriggerSetupContext.polling` stays typed as `PollingTriggerHandle` (no breaking change); `TriggerPollingPort` is the minimum contract the Trigger Service needs to implement.
|
|
66
|
+
|
|
67
|
+
- [#275](https://github.com/MadeRelevant/codemation/pull/275) [`cf2b146`](https://github.com/MadeRelevant/codemation/commit/cf2b146b452317e1ccaa1dfeaaa1a0e153181e30) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): populate webhook trigger config in deployment manifest
|
|
68
|
+
|
|
69
|
+
`emitWorkflowManifest` now writes `{ endpointKey, methods }` into `ManifestTriggerConfig.config` for webhook-based trigger nodes, giving CP the data it needs to build the path→workspace index.
|
|
70
|
+
|
|
71
|
+
## 0.14.0
|
|
72
|
+
|
|
73
|
+
### Minor Changes
|
|
74
|
+
|
|
75
|
+
- [#225](https://github.com/MadeRelevant/codemation/pull/225) [`675260a`](https://github.com/MadeRelevant/codemation/commit/675260aa7a30c55a34b5a6107ad2222937f4a769) Thanks [@cblokland90](https://github.com/cblokland90)! - DSL `mergeForward(config)` — the config-level twin of `.thenMerge`, usable inside `.when([...])` branch arms to merge a node's output onto item.json instead of replacing it.
|
|
76
|
+
|
|
77
|
+
- [#234](https://github.com/MadeRelevant/codemation/pull/234) [`13f9f11`](https://github.com/MadeRelevant/codemation/commit/13f9f11454855f44cd0849ea7e8f0c60f4a28964) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): make `description` a first-class config option every authorable node accepts directly
|
|
78
|
+
|
|
79
|
+
A node's plain-language `description` (the non-technical "what does this step do" line rendered in
|
|
80
|
+
the node properties sidebar) is now a normal option passed inline alongside `id`, exactly like any
|
|
81
|
+
other config field — no wrapper or clone helper:
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
new Callback("Tag order as received", markReceived, { id: "mark", description: "Tags the order." });
|
|
85
|
+
new If("High value?", (i) => i.json.total > 1000, { id: "gate", description: "Routes big orders." });
|
|
86
|
+
new CronTrigger("Nightly", { schedule: "0 2 * * *" }, { id: "nightly", description: "Runs nightly." });
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- `NodeConfigBase` gains `readonly description?: string` (mirrors `icon`), and the
|
|
90
|
+
`WorkflowSnapshotCodec` carries it into the persisted snapshot config the host / canvas mappers
|
|
91
|
+
read — so the sidebar renders it. (`description` was added to the codec's non-serializable
|
|
92
|
+
fallback whitelist for parity with `icon`.)
|
|
93
|
+
- Every authorable built-in node threads `description` into its config: options-object nodes
|
|
94
|
+
(`Callback`, `MapData`, `Assertion`, `HttpRequest`, `AIAgent`, `TestTrigger`) accept it in their
|
|
95
|
+
options; bare-id nodes (`If`, `Split`, `Filter`, `Aggregate`, `Wait`, `Switch`, `SubWorkflow`,
|
|
96
|
+
`Merge`, `NoOp`, `IsTestRun`, `CronTrigger`, `WebhookTrigger`, `ManualTrigger`) now take a final
|
|
97
|
+
`string | { id?: string; description?: string }` argument — a bare `"id"` string still works
|
|
98
|
+
(back-compat).
|
|
99
|
+
- The `define*` factory helpers carry it too: `defineNode`, `defineBatchNode`,
|
|
100
|
+
`definePollingTrigger` (and everything layered on `defineNode` — `defineRestNode`,
|
|
101
|
+
`defineHumanApprovalNode`/`inboxApproval`, and the collection CRUD nodes) now accept
|
|
102
|
+
`{ id?, description? }` in the trailing `create(config, name, idOrOptions)` slot, so a per-instance
|
|
103
|
+
`description` survives into the persisted snapshot. A bare string id still works (back-compat).
|
|
104
|
+
- The `workflow-dsl` skill teaches business-action node titles and a one-line `description` set
|
|
105
|
+
directly in each node's options.
|
|
106
|
+
|
|
107
|
+
This supersedes the rejected `present(node, { description })` clone-helper approach (PR [#232](https://github.com/MadeRelevant/codemation/issues/232)/[#233](https://github.com/MadeRelevant/codemation/issues/233)):
|
|
108
|
+
`description` is a normal inline option, not a prototype clone.
|
|
109
|
+
|
|
110
|
+
- [#225](https://github.com/MadeRelevant/codemation/pull/225) [`675260a`](https://github.com/MadeRelevant/codemation/commit/675260aa7a30c55a34b5a6107ad2222937f4a769) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(core): DSL `.thenMerge(node)` + engine merge-json behavior
|
|
111
|
+
|
|
112
|
+
Adds a clean carry-forward mechanism mirroring `keepBinaries`. A node appended with
|
|
113
|
+
`.thenMerge(...)` has its output **merged onto `item.json`** (shallow, output-wins)
|
|
114
|
+
instead of replacing it, so earlier fields survive a transform/OCR/extraction node —
|
|
115
|
+
e.g. Gmail trigger metadata captured upstream survives `codemationDocumentScannerNode`
|
|
116
|
+
(`{ markdown, fields }`) or an `AIAgent` extraction step.
|
|
117
|
+
- Engine: `NodeOutputNormalizer.applyOutput` honors a new `mergeJson` behavior flag,
|
|
118
|
+
shallow-merging node output onto the input json when both are plain objects (falls back
|
|
119
|
+
to replace otherwise). Merge applies per fanned-out element.
|
|
120
|
+
- `RunnableOutputBehaviorResolver` resolves `mergeJson` off the node config the same way
|
|
121
|
+
it resolves `keepBinaries`.
|
|
122
|
+
- DSL: `ChainCursor.thenMerge(config)` stamps the flag on the config and returns a cursor
|
|
123
|
+
typed as the intersection `TCurrentJson & RunnableNodeOutputJson<TConfig>` so downstream
|
|
124
|
+
steps see both the prior fields and the node's output.
|
|
125
|
+
|
|
126
|
+
- [#225](https://github.com/MadeRelevant/codemation/pull/225) [`675260a`](https://github.com/MadeRelevant/codemation/commit/675260aa7a30c55a34b5a6107ad2222937f4a769) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(dsl): boolean `.when` branches auto-merge when you continue the chain
|
|
127
|
+
|
|
128
|
+
A boolean `.when(true, [...]).when(false, [...])` chain is no longer terminal. Continuing the
|
|
129
|
+
trunk with `.then(...)` or `.humanApproval(...)` now connects ALL accumulated branch tails into
|
|
130
|
+
the next node — the same fan-in merge the object form `.when({ true: [...], false: [...] })`
|
|
131
|
+
already produced.
|
|
132
|
+
|
|
133
|
+
```ts
|
|
134
|
+
workflow
|
|
135
|
+
.start(...)
|
|
136
|
+
.then(checkOrder.create(...)) // an If node
|
|
137
|
+
.when(true, [enrich.create(...)])
|
|
138
|
+
.when(false, [flag.create(...)])
|
|
139
|
+
.then(notify.create(...)) // BOTH branch tails merge into `notify`
|
|
140
|
+
.build();
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
An empty arm (`.when(true, [])`) contributes the branch port off the If node, so it rejoins
|
|
144
|
+
straight from the port on continuation — the old empty-arm "rejoin" hack is no longer needed.
|
|
145
|
+
`.build()` on a branch chain (without continuation) still terminates as before, and the object
|
|
146
|
+
form / `.route(...)` paths are unchanged.
|
|
147
|
+
|
|
148
|
+
The continued cursor is typed `ChainCursor<TCurrentJson>` (the pre-branch item type): boolean
|
|
149
|
+
arms carry no output guard, so the merged item type is underdetermined — use the object form when
|
|
150
|
+
you need a precise merged type inline.
|
|
151
|
+
|
|
152
|
+
- [#222](https://github.com/MadeRelevant/codemation/pull/222) [`0881b46`](https://github.com/MadeRelevant/codemation/commit/0881b4676d2db29f36415d9b47709128d4c15e0e) Thanks [@cblokland90](https://github.com/cblokland90)! - feat: add writeFile capability to workspace file storage + writeWorkspaceFileNode
|
|
153
|
+
|
|
154
|
+
Adds a `writeFile` method to `IWorkspaceFileStorage` (and all three adapters:
|
|
155
|
+
`LocalFilesystemWorkspaceFileStorage`, `S3WorkspaceFileStorage`,
|
|
156
|
+
`PresignedS3WorkspaceFileStorage`) that writes bytes into the workspace file pool
|
|
157
|
+
under a new, randomly-generated fileId.
|
|
158
|
+
|
|
159
|
+
Adds `IWorkspaceFileRegistrar` / `WorkspaceFileRegistrarToken` for the optional
|
|
160
|
+
CP registry hook (post a WorkspaceFile row so the concierge can see the file).
|
|
161
|
+
|
|
162
|
+
Adds `writeWorkspaceFileNode` (`workspace-files.write`) to
|
|
163
|
+
`@codemation/core-nodes-workspace-files`: reads from a binary slot, calls
|
|
164
|
+
`writeFile`, optionally calls the registrar, returns metadata with a `registered`
|
|
165
|
+
flag.
|
|
166
|
+
|
|
167
|
+
The `/internal/workspace-files/register` CP endpoint is NOT yet implemented —
|
|
168
|
+
the node will set `registered: false` until it is added to the control plane.
|
|
169
|
+
|
|
3
170
|
## 0.13.2
|
|
4
171
|
|
|
5
172
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { gi as CostTrackingUsageRecord } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/contracts/CostCatalogContract.d.ts
|
|
4
4
|
interface CostCatalogEntry {
|
|
@@ -16,4 +16,4 @@ interface CostCatalog {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
export { CostCatalogEntry as n, CostCatalog as t };
|
|
19
|
-
//# sourceMappingURL=CostCatalogContract-
|
|
19
|
+
//# sourceMappingURL=CostCatalogContract-Dwo-ZamG.d.cts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Br as WebhookTriggerRoutingDiagnostics, C as PersistedWorkflowSnapshotNode, Cr as TriggerRuntimeDiagnostics, Et as Items, Jt as ParentExecutionRef, N as RunResult, Pt as NodeConfigBase, Qi as NodeId, Rr as WebhookTriggerMatcher, S as PersistedWorkflowSnapshot, W as DependencyContainer, cn as WorkflowDefinition, hn as WorkflowPolicyRuntimeDefaults, kr as WorkflowRepository, ta as WorkflowId, ut as EngineExecutionLimitsPolicyConfig, w as PersistedWorkflowTokenRegistryLike } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
|
+
import { r as Engine } from "./RunIntentService-DKxuHTUz.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/workflowSnapshots/WorkflowSnapshotCodec.d.ts
|
|
5
|
+
declare class WorkflowSnapshotCodec {
|
|
6
|
+
private readonly tokenRegistry;
|
|
7
|
+
constructor(tokenRegistry: PersistedWorkflowTokenRegistryLike);
|
|
8
|
+
create(workflow: WorkflowDefinition): PersistedWorkflowSnapshot;
|
|
9
|
+
hydrate(snapshotNode: PersistedWorkflowSnapshotNode, liveConfig: NodeConfigBase): NodeConfigBase;
|
|
10
|
+
private serializeConfig;
|
|
11
|
+
private safeInspectorSummary;
|
|
12
|
+
private injectTokenIds;
|
|
13
|
+
private mergeValue;
|
|
14
|
+
private mergeNestedValue;
|
|
15
|
+
private restoreNonSerializableProperties;
|
|
16
|
+
private restoreTypeProperty;
|
|
17
|
+
private resolveTokenId;
|
|
18
|
+
private resolveTokenName;
|
|
19
|
+
private asTypeToken;
|
|
20
|
+
private asRecord;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/runtime/EngineWorkflowRunnerService.d.ts
|
|
24
|
+
declare class EngineWorkflowRunnerService {
|
|
25
|
+
private readonly engine;
|
|
26
|
+
private readonly workflowRepository;
|
|
27
|
+
constructor(engine: Engine, workflowRepository: WorkflowRepository);
|
|
28
|
+
runById(args: {
|
|
29
|
+
workflowId: WorkflowId;
|
|
30
|
+
startAt?: NodeId;
|
|
31
|
+
items: Items;
|
|
32
|
+
parent?: ParentExecutionRef;
|
|
33
|
+
}): Promise<RunResult>;
|
|
34
|
+
private findDefaultStartNodeId;
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/bootstrap/runtime/EngineRuntimeRegistration.types.d.ts
|
|
38
|
+
interface WebhookTriggerMatcherProvider {
|
|
39
|
+
createMatcher(container: DependencyContainer): WebhookTriggerMatcher;
|
|
40
|
+
}
|
|
41
|
+
interface TriggerRuntimeDiagnosticsProvider {
|
|
42
|
+
create(container: DependencyContainer): TriggerRuntimeDiagnostics | undefined;
|
|
43
|
+
}
|
|
44
|
+
interface EngineRuntimeRegistrationOptions {
|
|
45
|
+
engineExecutionLimits?: Partial<EngineExecutionLimitsPolicyConfig>;
|
|
46
|
+
resolveEngineExecutionLimits?: () => Partial<EngineExecutionLimitsPolicyConfig> | undefined;
|
|
47
|
+
webhookTriggerRoutingDiagnostics?: WebhookTriggerRoutingDiagnostics;
|
|
48
|
+
webhookTriggerMatcherProvider?: WebhookTriggerMatcherProvider;
|
|
49
|
+
triggerRuntimeDiagnosticsProvider?: TriggerRuntimeDiagnosticsProvider;
|
|
50
|
+
workflowPolicyRuntimeDefaults?: WorkflowPolicyRuntimeDefaults;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { WorkflowSnapshotCodec as a, EngineWorkflowRunnerService as i, TriggerRuntimeDiagnosticsProvider as n, WebhookTriggerMatcherProvider as r, EngineRuntimeRegistrationOptions as t };
|
|
54
|
+
//# sourceMappingURL=EngineRuntimeRegistration.types-BiNasx3G.d.cts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Ma as WebhookTriggerMatcher, Pa as WebhookTriggerRoutingDiagnostics, Rn as DependencyContainer, _a as TriggerRuntimeDiagnostics, ir as EngineExecutionLimitsPolicyConfig, li as WorkflowPolicyRuntimeDefaults } from "./index-CRv3_pY3.js";
|
|
2
|
+
|
|
3
|
+
//#region src/bootstrap/runtime/EngineRuntimeRegistration.types.d.ts
|
|
4
|
+
|
|
5
|
+
interface WebhookTriggerMatcherProvider {
|
|
6
|
+
createMatcher(container: DependencyContainer): WebhookTriggerMatcher;
|
|
7
|
+
}
|
|
8
|
+
interface TriggerRuntimeDiagnosticsProvider {
|
|
9
|
+
create(container: DependencyContainer): TriggerRuntimeDiagnostics | undefined;
|
|
10
|
+
}
|
|
11
|
+
interface EngineRuntimeRegistrationOptions {
|
|
12
|
+
engineExecutionLimits?: Partial<EngineExecutionLimitsPolicyConfig>;
|
|
13
|
+
resolveEngineExecutionLimits?: () => Partial<EngineExecutionLimitsPolicyConfig> | undefined;
|
|
14
|
+
webhookTriggerRoutingDiagnostics?: WebhookTriggerRoutingDiagnostics;
|
|
15
|
+
webhookTriggerMatcherProvider?: WebhookTriggerMatcherProvider;
|
|
16
|
+
triggerRuntimeDiagnosticsProvider?: TriggerRuntimeDiagnosticsProvider;
|
|
17
|
+
workflowPolicyRuntimeDefaults?: WorkflowPolicyRuntimeDefaults;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TriggerRuntimeDiagnosticsProvider as n, WebhookTriggerMatcherProvider as r, EngineRuntimeRegistrationOptions as t };
|
|
21
|
+
//# sourceMappingURL=EngineRuntimeRegistration.types-Dq4ucrdo.d.ts.map
|
package/dist/{InMemoryRunDataFactory-Csy2evr_.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as
|
|
1
|
+
import { $t as RunId, An as RetryPolicySpec, Fn as BinaryStorageReadResult, Gn as ExecutionContextFactory, In as BinaryStorageStatResult, Jt as ParentExecutionRef, Kn as HumanTaskActor, Mt as MutableRunData, Nn as BinaryBody, Nt as NodeActivationId, Pn as BinaryStorage, Qi as NodeId, Qt as RunDataSnapshot, R as RunTestContext, Rn as BinaryStorageWriteResult, Un as ExecutionBinaryService, Wn as ExecutionContext, Wr as ExecutionTelemetryFactory, Wt as NodeOutputs, Y as TypeToken, Yn as HumanTaskSubject, Yt as PersistedRunPolicySnapshot, Zt as RunDataFactory, ar as NodeExecutionContext, bt as BinaryAttachment, dr as NodeResolver, ir as NodeBinaryAttachmentService, jt as JsonValue, lr as NodeExecutionStatePublisher, mi as CostTrackingTelemetryFactory, ta as WorkflowId, tn as RunnableNodeConfig, vi as CollectionsContext, wt as Item, zi as CredentialSessionService } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/execution/CredentialResolverFactory.d.ts
|
|
4
4
|
declare class CredentialResolverFactory {
|
|
@@ -9,7 +9,6 @@ declare class CredentialResolverFactory {
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/contracts/humanTaskStoreTypes.d.ts
|
|
11
11
|
type HumanTaskStatus = "pending" | "decided" | "timed_out" | "auto_accepted" | "cancelled";
|
|
12
|
-
/** Persisted record for a single HITL task instance. */
|
|
13
12
|
interface HumanTaskRecord {
|
|
14
13
|
readonly id: string;
|
|
15
14
|
readonly runId: string;
|
|
@@ -38,7 +37,6 @@ interface HumanTaskStore {
|
|
|
38
37
|
findById(taskId: string): Promise<HumanTaskRecord | undefined>;
|
|
39
38
|
findByResumeTokenHash(tokenHash: string): Promise<HumanTaskRecord | undefined>;
|
|
40
39
|
findPendingForWorkspace(workspaceId: string): Promise<ReadonlyArray<HumanTaskRecord>>;
|
|
41
|
-
/** Returns all pending tasks regardless of workspace. Used by the local dev inbox (non-managed mode). */
|
|
42
40
|
findAllPending(): Promise<ReadonlyArray<HumanTaskRecord>>;
|
|
43
41
|
markDecided(args: {
|
|
44
42
|
taskId: string;
|
|
@@ -54,12 +52,6 @@ interface HumanTaskStore {
|
|
|
54
52
|
declare const HumanTaskStoreToken: TypeToken<HumanTaskStore | undefined>;
|
|
55
53
|
//#endregion
|
|
56
54
|
//#region src/contracts/hitlSeamTypes.d.ts
|
|
57
|
-
/**
|
|
58
|
-
* Seam interfaces for HITL collaborators that are implemented in `@codemation/host`
|
|
59
|
-
* and injected into `NodeSuspensionHandler` at runtime. Core defines the interface only —
|
|
60
|
-
* no HTTP, vendor SDK, or Prisma dependencies here.
|
|
61
|
-
*/
|
|
62
|
-
/** Signs and hashes a HITL resume token. Core only needs the sign and hash operations. */
|
|
63
55
|
interface HitlResumeTokenSignerSeam {
|
|
64
56
|
sign(args: {
|
|
65
57
|
taskId: string;
|
|
@@ -68,7 +60,6 @@ interface HitlResumeTokenSignerSeam {
|
|
|
68
60
|
}): string;
|
|
69
61
|
hashToken(token: string): string;
|
|
70
62
|
}
|
|
71
|
-
/** Schedules a delayed BullMQ job that drives the timeout path. */
|
|
72
63
|
interface HitlTimeoutJobSchedulerSeam {
|
|
73
64
|
enqueueTimeoutJob(args: {
|
|
74
65
|
taskId: string;
|
|
@@ -77,12 +68,6 @@ interface HitlTimeoutJobSchedulerSeam {
|
|
|
77
68
|
}
|
|
78
69
|
declare const HitlResumeTokenSignerToken: TypeToken<HitlResumeTokenSignerSeam | undefined>;
|
|
79
70
|
declare const HitlTimeoutJobSchedulerToken: TypeToken<HitlTimeoutJobSchedulerSeam | undefined>;
|
|
80
|
-
/**
|
|
81
|
-
* Optional workspace ID injected into NodeSuspensionHandler in managed mode (T7 security fix).
|
|
82
|
-
* Allows the handler to stamp the workspaceId on each HumanTaskRecord so HitlCallbackHandler
|
|
83
|
-
* can assert workspace identity independently of the HMAC middleware.
|
|
84
|
-
* Not registered in non-managed mode; NodeSuspensionHandler defaults to null.
|
|
85
|
-
*/
|
|
86
71
|
declare const HitlWorkspaceIdToken: TypeToken<string | undefined>;
|
|
87
72
|
//#endregion
|
|
88
73
|
//#region src/binaries/UnavailableBinaryStorage.d.ts
|
|
@@ -165,9 +150,6 @@ declare class InProcessRetryRunner {
|
|
|
165
150
|
}
|
|
166
151
|
//#endregion
|
|
167
152
|
//#region src/execution/ItemExprResolver.d.ts
|
|
168
|
-
/**
|
|
169
|
-
* Resolves {@link import("../contracts/itemExpr").ItemExpr} leaves on runnable config before {@link RunnableNode.execute}.
|
|
170
|
-
*/
|
|
171
153
|
declare class ItemExprResolver {
|
|
172
154
|
resolveConfigForItem<TConfig extends RunnableNodeConfig<any, any>>(ctx: NodeExecutionContext<TConfig>, item: Item, itemIndex: number, items: ReadonlyArray<Item>): Promise<NodeExecutionContext<TConfig>>;
|
|
173
155
|
}
|
|
@@ -175,10 +157,12 @@ declare class ItemExprResolver {
|
|
|
175
157
|
//#region src/execution/RunnableOutputBehaviorResolver.d.ts
|
|
176
158
|
type RunnableOutputBehavior = Readonly<{
|
|
177
159
|
keepBinaries: boolean;
|
|
160
|
+
mergeJson: boolean;
|
|
178
161
|
}>;
|
|
179
162
|
declare class RunnableOutputBehaviorResolver {
|
|
180
163
|
resolve(config: RunnableNodeConfig): RunnableOutputBehavior;
|
|
181
164
|
private isKeepBinariesEnabled;
|
|
165
|
+
private isMergeJsonEnabled;
|
|
182
166
|
}
|
|
183
167
|
//#endregion
|
|
184
168
|
//#region src/runStorage/InMemoryBinaryStorageRegistry.d.ts
|
|
@@ -202,4 +186,4 @@ declare class InMemoryRunDataFactory implements RunDataFactory {
|
|
|
202
186
|
}
|
|
203
187
|
//#endregion
|
|
204
188
|
export { HumanTaskRecord as _, ItemExprResolver as a, HumanTaskStoreToken as b, DefaultAsyncSleeper as c, UnavailableBinaryStorage as d, HitlResumeTokenSignerSeam as f, HitlWorkspaceIdToken as g, HitlTimeoutJobSchedulerToken as h, RunnableOutputBehaviorResolver as i, AsyncSleeper as l, HitlTimeoutJobSchedulerSeam as m, InMemoryBinaryStorage as n, InProcessRetryRunner as o, HitlResumeTokenSignerToken as p, RunnableOutputBehavior as r, DefaultExecutionContextFactory as s, InMemoryRunDataFactory as t, DefaultExecutionBinaryService as u, HumanTaskStatus as v, CredentialResolverFactory as x, HumanTaskStore as y };
|
|
205
|
-
//# sourceMappingURL=InMemoryRunDataFactory-
|
|
189
|
+
//# sourceMappingURL=InMemoryRunDataFactory-D2U9azmZ.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryRunEventBusRegistry-
|
|
1
|
+
{"version":3,"file":"InMemoryRunEventBusRegistry-DO0WM9Lw.cjs","names":["onClose: () => void"],"sources":["../src/events/InMemoryRunEventSubscription.ts","../src/events/InMemoryRunEventBusRegistry.ts"],"sourcesContent":["import type { RunEventSubscription } from \"./runEvents\";\n\nexport class InMemoryRunEventSubscription implements RunEventSubscription {\n constructor(private readonly onClose: () => void) {}\n\n async close(): Promise<void> {\n this.onClose();\n }\n}\n","import type { WorkflowId } from \"../types\";\n\nimport type { RunEvent, RunEventBus, RunEventSubscription } from \"./runEvents\";\n\nimport { InMemoryRunEventSubscription } from \"./InMemoryRunEventSubscription\";\n\nexport class InMemoryRunEventBus implements RunEventBus {\n private readonly globalListeners = new Set<(event: RunEvent) => void>();\n private readonly listenersByWorkflowId = new Map<WorkflowId, Set<(event: RunEvent) => void>>();\n\n async publish(event: RunEvent): Promise<void> {\n for (const listener of this.globalListeners) listener(event);\n for (const listener of this.listenersByWorkflowId.get(event.workflowId) ?? []) listener(event);\n }\n\n async subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription> {\n this.globalListeners.add(onEvent);\n return new InMemoryRunEventSubscription(() => {\n this.globalListeners.delete(onEvent);\n });\n }\n\n async subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription> {\n const existing = this.listenersByWorkflowId.get(workflowId) ?? new Set<(event: RunEvent) => void>();\n existing.add(onEvent);\n this.listenersByWorkflowId.set(workflowId, existing);\n\n return new InMemoryRunEventSubscription(() => {\n const listeners = this.listenersByWorkflowId.get(workflowId);\n if (!listeners) return;\n listeners.delete(onEvent);\n if (listeners.size === 0) this.listenersByWorkflowId.delete(workflowId);\n });\n }\n}\n\nexport { InMemoryRunEventSubscription } from \"./InMemoryRunEventSubscription\";\n"],"mappings":";;AAEA,IAAa,+BAAb,MAA0E;CACxE,YAAY,AAAiBA,SAAqB;EAArB;;CAE7B,MAAM,QAAuB;AAC3B,OAAK,SAAS;;;;;;ACAlB,IAAa,sBAAb,MAAwD;CACtD,AAAiB,kCAAkB,IAAI,KAAgC;CACvE,AAAiB,wCAAwB,IAAI,KAAiD;CAE9F,MAAM,QAAQ,OAAgC;AAC5C,OAAK,MAAM,YAAY,KAAK,gBAAiB,UAAS,MAAM;AAC5D,OAAK,MAAM,YAAY,KAAK,sBAAsB,IAAI,MAAM,WAAW,IAAI,EAAE,CAAE,UAAS,MAAM;;CAGhG,MAAM,UAAU,SAAmE;AACjF,OAAK,gBAAgB,IAAI,QAAQ;AACjC,SAAO,IAAI,mCAAmC;AAC5C,QAAK,gBAAgB,OAAO,QAAQ;IACpC;;CAGJ,MAAM,oBAAoB,YAAwB,SAAmE;EACnH,MAAM,WAAW,KAAK,sBAAsB,IAAI,WAAW,oBAAI,IAAI,KAAgC;AACnG,WAAS,IAAI,QAAQ;AACrB,OAAK,sBAAsB,IAAI,YAAY,SAAS;AAEpD,SAAO,IAAI,mCAAmC;GAC5C,MAAM,YAAY,KAAK,sBAAsB,IAAI,WAAW;AAC5D,OAAI,CAAC,UAAW;AAChB,aAAU,OAAO,QAAQ;AACzB,OAAI,UAAU,SAAS,EAAG,MAAK,sBAAsB,OAAO,WAAW;IACvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryRunEventBusRegistry-
|
|
1
|
+
{"version":3,"file":"InMemoryRunEventBusRegistry-Layt2xgm.js","names":["onClose: () => void"],"sources":["../src/events/InMemoryRunEventSubscription.ts","../src/events/InMemoryRunEventBusRegistry.ts"],"sourcesContent":["import type { RunEventSubscription } from \"./runEvents\";\n\nexport class InMemoryRunEventSubscription implements RunEventSubscription {\n constructor(private readonly onClose: () => void) {}\n\n async close(): Promise<void> {\n this.onClose();\n }\n}\n","import type { WorkflowId } from \"../types\";\n\nimport type { RunEvent, RunEventBus, RunEventSubscription } from \"./runEvents\";\n\nimport { InMemoryRunEventSubscription } from \"./InMemoryRunEventSubscription\";\n\nexport class InMemoryRunEventBus implements RunEventBus {\n private readonly globalListeners = new Set<(event: RunEvent) => void>();\n private readonly listenersByWorkflowId = new Map<WorkflowId, Set<(event: RunEvent) => void>>();\n\n async publish(event: RunEvent): Promise<void> {\n for (const listener of this.globalListeners) listener(event);\n for (const listener of this.listenersByWorkflowId.get(event.workflowId) ?? []) listener(event);\n }\n\n async subscribe(onEvent: (event: RunEvent) => void): Promise<RunEventSubscription> {\n this.globalListeners.add(onEvent);\n return new InMemoryRunEventSubscription(() => {\n this.globalListeners.delete(onEvent);\n });\n }\n\n async subscribeToWorkflow(workflowId: WorkflowId, onEvent: (event: RunEvent) => void): Promise<RunEventSubscription> {\n const existing = this.listenersByWorkflowId.get(workflowId) ?? new Set<(event: RunEvent) => void>();\n existing.add(onEvent);\n this.listenersByWorkflowId.set(workflowId, existing);\n\n return new InMemoryRunEventSubscription(() => {\n const listeners = this.listenersByWorkflowId.get(workflowId);\n if (!listeners) return;\n listeners.delete(onEvent);\n if (listeners.size === 0) this.listenersByWorkflowId.delete(workflowId);\n });\n }\n}\n\nexport { InMemoryRunEventSubscription } from \"./InMemoryRunEventSubscription\";\n"],"mappings":";AAEA,IAAa,+BAAb,MAA0E;CACxE,YAAY,AAAiBA,SAAqB;EAArB;;CAE7B,MAAM,QAAuB;AAC3B,OAAK,SAAS;;;;;;ACAlB,IAAa,sBAAb,MAAwD;CACtD,AAAiB,kCAAkB,IAAI,KAAgC;CACvE,AAAiB,wCAAwB,IAAI,KAAiD;CAE9F,MAAM,QAAQ,OAAgC;AAC5C,OAAK,MAAM,YAAY,KAAK,gBAAiB,UAAS,MAAM;AAC5D,OAAK,MAAM,YAAY,KAAK,sBAAsB,IAAI,MAAM,WAAW,IAAI,EAAE,CAAE,UAAS,MAAM;;CAGhG,MAAM,UAAU,SAAmE;AACjF,OAAK,gBAAgB,IAAI,QAAQ;AACjC,SAAO,IAAI,mCAAmC;AAC5C,QAAK,gBAAgB,OAAO,QAAQ;IACpC;;CAGJ,MAAM,oBAAoB,YAAwB,SAAmE;EACnH,MAAM,WAAW,KAAK,sBAAsB,IAAI,WAAW,oBAAI,IAAI,KAAgC;AACnG,WAAS,IAAI,QAAQ;AACrB,OAAK,sBAAsB,IAAI,YAAY,SAAS;AAEpD,SAAO,IAAI,mCAAmC;GAC5C,MAAM,YAAY,KAAK,sBAAsB,IAAI,WAAW;AAC5D,OAAI,CAAC,UAAW;AAChB,aAAU,OAAO,QAAQ;AACzB,OAAI,UAAU,SAAS,EAAG,MAAK,sBAAsB,OAAO,WAAW;IACvE"}
|