@codemation/core 0.14.0 → 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 +68 -0
- package/dist/{CostCatalogContract-B9aYIqJu.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-C3rIszrW.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts} +2 -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-UCpn7luX.d.cts → ItemsInputNormalizer-A5txcOWX.d.cts} +3 -98
- package/dist/{ItemsInputNormalizer-B9SdLG24.cjs → ItemsInputNormalizer-C1fv3sMW.cjs} +2 -2
- package/dist/ItemsInputNormalizer-C1fv3sMW.cjs.map +1 -0
- package/dist/{ItemsInputNormalizer-DoOawd9R.d.ts → ItemsInputNormalizer-D2vrMrX1.d.ts} +2 -62
- package/dist/{ItemsInputNormalizer-CZEODg94.js → ItemsInputNormalizer-fUYo4GLV.js} +2 -2
- package/dist/ItemsInputNormalizer-fUYo4GLV.js.map +1 -0
- package/dist/{RunIntentService-0f3ICjAz.d.cts → RunIntentService-DKxuHTUz.d.cts} +2 -15
- package/dist/{RunIntentService-Dx_HHxDX.d.ts → RunIntentService-DrpKli2k.d.ts} +2 -22
- package/dist/{agentMcpTypes-B11B3Hd-.d.cts → agentMcpTypes-BHX4RQCC.d.cts} +24 -524
- 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-Be0LB0nh.cjs → bootstrap-CTB53rEF.cjs} +9 -60
- package/dist/bootstrap-CTB53rEF.cjs.map +1 -0
- package/dist/{bootstrap-pSQdsMfa.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-CX9Ql8N1.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-CbJdbIHe.d.ts → index-CRv3_pY3.d.ts} +87 -870
- package/dist/{index-uPnD9EE6.d.ts → index-mnLS0iQl.d.ts} +27 -400
- package/dist/index.cjs +44 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -524
- package/dist/index.d.ts +5 -5
- package/dist/index.js +21 -98
- package/dist/index.js.map +1 -1
- package/dist/{params-Dwl10Ws9.d.cts → params-CrK4iuG1.d.cts} +2 -11
- package/dist/{runtime-CSunvf7A.js → runtime-CBFDpmiz.js} +46 -679
- package/dist/runtime-CBFDpmiz.js.map +1 -0
- package/dist/{runtime-n2tqRwaf.cjs → runtime-Due-FOZ2.cjs} +69 -752
- 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-DhwtDRgs.cjs → workflowTypes-BW6Hhee7.cjs} +4 -229
- package/dist/workflowTypes-BW6Hhee7.cjs.map +1 -0
- package/dist/{di-CEV6wTc4.js → workflowTypes-DZtBTmKf.js} +3 -162
- 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 +0 -25
- package/src/authoring/definePollingTrigger.types.ts +18 -152
- package/src/authoring/definePollingTriggerInternals.ts +0 -4
- package/src/authoring/nodeBaseOptions.types.ts +0 -14
- 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 +0 -18
- 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 +4 -86
- package/src/contracts/workspaceFileTypes.ts +0 -72
- 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/NodeSuspensionHandler.ts +1 -39
- package/src/execution/PersistedRunStateTerminalBuilder.ts +0 -5
- package/src/execution/RunSuspendedError.ts +0 -10
- package/src/execution/WorkflowRunExecutionContextFactory.ts +0 -3
- 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 +0 -20
- package/src/workflow/dsl/NodeIdSlugifier.ts +0 -9
- package/src/workflow/dsl/WhenBuilder.ts +0 -17
- package/src/workflow/dsl/WorkflowDefinitionError.ts +0 -9
- package/src/workflow/dsl/workflowBuilderTypes.ts +0 -24
- 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 +0 -5
- package/src/workflowSnapshots/index.ts +3 -0
- package/dist/EngineRuntimeRegistration.types-BYAmGMdS.d.cts +0 -81
- package/dist/EngineRuntimeRegistration.types-CVLI8DsJ.d.ts +0 -44
- package/dist/ItemsInputNormalizer-B9SdLG24.cjs.map +0 -1
- package/dist/ItemsInputNormalizer-CZEODg94.js.map +0 -1
- package/dist/bootstrap-Be0LB0nh.cjs.map +0 -1
- package/dist/bootstrap-pSQdsMfa.js.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-CEV6wTc4.js.map +0 -1
- package/dist/di-DhwtDRgs.cjs.map +0 -1
- package/dist/runtime-CSunvf7A.js.map +0 -1
- package/dist/runtime-n2tqRwaf.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,73 @@
|
|
|
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
|
+
|
|
3
71
|
## 0.14.0
|
|
4
72
|
|
|
5
73
|
### Minor 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-C3rIszrW.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
|
}
|
|
@@ -204,4 +186,4 @@ declare class InMemoryRunDataFactory implements RunDataFactory {
|
|
|
204
186
|
}
|
|
205
187
|
//#endregion
|
|
206
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 };
|
|
207
|
-
//# 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"}
|
|
@@ -1,48 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Expr } from "./params-
|
|
1
|
+
import { Et as Items, Ii as CredentialRequirement, Pt as NodeConfigBase, Qi as NodeId, Wt as NodeOutputs, Y as TypeToken, Zi as NodeConnectionName, a as ConnectionInvocationId, ar as NodeExecutionContext, b as PersistedRunState, jt as JsonValue, nn as RunnableNodeInputJson, ti as TelemetrySpanScope, tn as RunnableNodeConfig, wt as Item } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
|
+
import { t as Expr } from "./params-CrK4iuG1.cjs";
|
|
3
3
|
import { ZodType, input, output } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/mcpTypes.d.ts
|
|
6
6
|
type McpServerTransport = "http";
|
|
7
7
|
interface McpServerDeclaration {
|
|
8
|
-
/** Globally unique slug, e.g. "gmail". Workflow authors reference this. */
|
|
9
8
|
id: string;
|
|
10
9
|
displayName: string;
|
|
11
10
|
description: string;
|
|
12
11
|
transport: McpServerTransport;
|
|
13
12
|
url: string;
|
|
14
|
-
/**
|
|
15
|
-
* Credential types accepted by this MCP server, matching CredentialRequirement.acceptedTypes.
|
|
16
|
-
* Absent or empty means no credential is required.
|
|
17
|
-
*/
|
|
18
13
|
acceptedCredentialTypes?: ReadonlyArray<string>;
|
|
19
|
-
/**
|
|
20
|
-
* Documentation only in MVP. The bind-time validator checks
|
|
21
|
-
* requiredScopes ⊆ CredentialInstance.scopesGranted.
|
|
22
|
-
*/
|
|
23
14
|
requiredScopes?: string[];
|
|
24
|
-
/** Non-secret static headers merged onto every MCP request. */
|
|
25
15
|
staticHeaders?: Record<string, string>;
|
|
26
|
-
/**
|
|
27
|
-
* Overrides for tool descriptions advertised by the MCP server.
|
|
28
|
-
* Applied by the connection pool after tools/list.
|
|
29
|
-
* Key: exact tool name as returned by the server.
|
|
30
|
-
*/
|
|
31
16
|
toolDescriptionOverrides?: Record<string, string>;
|
|
32
17
|
}
|
|
33
18
|
//#endregion
|
|
34
19
|
//#region src/contracts/runFinishedAtFactory.d.ts
|
|
35
20
|
type RunFinishedAtSource = Pick<PersistedRunState, "status" | "nodeSnapshotsByNodeId" | "finishedAt">;
|
|
36
|
-
/** Derives workflow end time from persisted run root or node snapshots for run listings. */
|
|
37
21
|
declare class RunFinishedAtFactory {
|
|
38
22
|
static resolveIso(state: RunFinishedAtSource): string | undefined;
|
|
39
23
|
}
|
|
40
24
|
//#endregion
|
|
41
25
|
//#region src/workflow/definition/ConnectionNodeIdFactory.d.ts
|
|
42
|
-
/**
|
|
43
|
-
* Deterministic ids for workflow connection-owned child nodes (LLM slot, tools, etc.).
|
|
44
|
-
* These are stable across loads.
|
|
45
|
-
*/
|
|
46
26
|
declare class ConnectionNodeIdFactory {
|
|
47
27
|
static readonly connectionSegment: "__conn__";
|
|
48
28
|
static languageModelConnectionNodeId(parentNodeId: NodeId): NodeId;
|
|
@@ -62,29 +42,14 @@ declare class ConnectionNodeIdFactory {
|
|
|
62
42
|
parentNodeId: NodeId;
|
|
63
43
|
normalizedToolName: string;
|
|
64
44
|
}> | undefined;
|
|
65
|
-
/** True when `nodeId` is a connection-owned child of `parentNodeId` (LLM or tool slot). */
|
|
66
45
|
static isConnectionOwnedDescendantOf(parentNodeId: NodeId, nodeId: NodeId): boolean;
|
|
67
|
-
/** Normalizes a tool display name to a stable id segment. */
|
|
68
46
|
static normalizeToolName(toolName: string): string;
|
|
69
47
|
}
|
|
70
48
|
//#endregion
|
|
71
49
|
//#region src/workflow/definition/NodeIterationIdFactory.d.ts
|
|
72
|
-
/**
|
|
73
|
-
* Unique ids for one per-item iteration of a runnable node's execute loop.
|
|
74
|
-
*
|
|
75
|
-
* Activations are per-batch (one scheduled execution of a node, possibly with N items).
|
|
76
|
-
* Iterations refine that to one identifier per item-index inside the batch loop, so per-item
|
|
77
|
-
* connection invocations and telemetry can be grouped without time-window heuristics.
|
|
78
|
-
*
|
|
79
|
-
* Uses Web Crypto's `randomUUID` (Node 19+ and all modern browsers) so this module is safe
|
|
80
|
-
* to include in the browser entry. Importing `node:crypto` here previously leaked into the
|
|
81
|
-
* canvas client bundle through `browser.ts` and OOM'd consumers' Turbopack builds.
|
|
82
|
-
*/
|
|
83
50
|
declare class NodeIterationIdFactory {
|
|
84
51
|
static create(): string;
|
|
85
|
-
/** Deterministic id for tests when a stable sequence is needed. */
|
|
86
52
|
static createForTest(seed: string, sequence: number): string;
|
|
87
|
-
/** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
|
|
88
53
|
static createForConnection(connectionNodeId: NodeId, sequence: number): string;
|
|
89
54
|
}
|
|
90
55
|
//#endregion
|
|
@@ -119,15 +84,9 @@ type CallableToolConfigOptions<TInputSchema extends ZodSchemaAny, TOutputSchema
|
|
|
119
84
|
presentation?: AgentCanvasPresentation;
|
|
120
85
|
inputSchema: TInputSchema;
|
|
121
86
|
outputSchema: TOutputSchema;
|
|
122
|
-
/**
|
|
123
|
-
* Optional credential slots for this tool (same contract as other {@link ToolConfig} shapes).
|
|
124
|
-
*/
|
|
125
87
|
credentialRequirements?: ReadonlyArray<CredentialRequirement>;
|
|
126
88
|
execute: CallableToolExecuteHandler<TInputSchema, TOutputSchema>;
|
|
127
89
|
}>;
|
|
128
|
-
/**
|
|
129
|
-
* Inline callable agent tool: DSL sugar over {@link ToolConfig} without a separate {@link NodeResolver}-registered {@link Tool} class.
|
|
130
|
-
*/
|
|
131
90
|
declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig {
|
|
132
91
|
readonly name: string;
|
|
133
92
|
readonly type: TypeToken<unknown>;
|
|
@@ -142,9 +101,6 @@ declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchem
|
|
|
142
101
|
getCredentialRequirements(): ReadonlyArray<CredentialRequirement>;
|
|
143
102
|
getInputSchema(): TInputSchema;
|
|
144
103
|
getOutputSchema(): TOutputSchema;
|
|
145
|
-
/**
|
|
146
|
-
* Parses tool input and output with the configured Zod schemas.
|
|
147
|
-
*/
|
|
148
104
|
executeTool(args: ToolExecuteArgs<CallableToolConfig<TInputSchema, TOutputSchema>, input<TInputSchema>>): Promise<output<TOutputSchema>>;
|
|
149
105
|
private parseInput;
|
|
150
106
|
private parseOutput;
|
|
@@ -158,10 +114,6 @@ declare class CallableToolFactoryImpl {
|
|
|
158
114
|
declare const CallableToolFactory: CallableToolFactoryImpl;
|
|
159
115
|
//#endregion
|
|
160
116
|
//#region src/ai/CallableToolKindToken.d.ts
|
|
161
|
-
/**
|
|
162
|
-
* Shared {@link import("../di").TypeToken} marker for {@link CallableToolConfig}.
|
|
163
|
-
* Callable tools are not registered in {@link NodeResolver}; this class only satisfies {@link ToolConfig#type}.
|
|
164
|
-
*/
|
|
165
117
|
declare class CallableToolKindToken {}
|
|
166
118
|
//#endregion
|
|
167
119
|
//#region src/ai/AgentToolFactory.d.ts
|
|
@@ -177,10 +129,6 @@ declare const AgentToolFactory: AgentToolFactoryImpl;
|
|
|
177
129
|
//#endregion
|
|
178
130
|
//#region src/ai/AgentMessageConfigNormalizerFactory.d.ts
|
|
179
131
|
declare class AgentMessageConfigNormalizer {
|
|
180
|
-
/**
|
|
181
|
-
* Prefer {@code input.messages} when present (ItemNode / engine-mapped payloads); otherwise resolve from
|
|
182
|
-
* {@link AgentNodeConfig.messages} templates.
|
|
183
|
-
*/
|
|
184
132
|
static resolveFromInputOrConfig<TInputJson, TOutputJson>(input: unknown, config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
185
133
|
static normalize<TInputJson, TOutputJson>(config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
186
134
|
private static tryMessagesFromStructuredInput;
|
|
@@ -214,11 +162,6 @@ type ToolExecuteArgs<TConfig extends ToolConfig = ToolConfig, TInput = unknown>
|
|
|
214
162
|
item: Item;
|
|
215
163
|
itemIndex: number;
|
|
216
164
|
items: Items;
|
|
217
|
-
/**
|
|
218
|
-
* Optional sub-agent boundary hooks: when present, the live `agent.tool.call` span and the
|
|
219
|
-
* planned tool-call invocationId are forwarded so node-backed runtimes can re-root their child
|
|
220
|
-
* execution scope. Plain function tools may safely ignore these hooks.
|
|
221
|
-
*/
|
|
222
165
|
hooks?: Readonly<{
|
|
223
166
|
parentSpan?: TelemetrySpanScope;
|
|
224
167
|
parentInvocationId?: ConnectionInvocationId;
|
|
@@ -249,12 +192,7 @@ interface AgentMessageTemplate<TInputJson = unknown> {
|
|
|
249
192
|
readonly role: AgentMessageRole;
|
|
250
193
|
readonly content: AgentMessageTemplateContent<TInputJson>;
|
|
251
194
|
}
|
|
252
|
-
/** A single prompt line: fixed DTO or template with optional function `content`. */
|
|
253
195
|
type AgentMessageLine<TInputJson = unknown> = AgentMessageDto | AgentMessageTemplate<TInputJson>;
|
|
254
|
-
/**
|
|
255
|
-
* Message list for an agent. Prefer a **plain array** of `{ role, content }` (optionally with function `content` for templates).
|
|
256
|
-
* Use the object form only when you need `buildMessages` to append messages after optional `prompt` lines.
|
|
257
|
-
*/
|
|
258
196
|
type AgentMessageConfig<TInputJson = unknown> = Expr<ReadonlyArray<AgentMessageLine<TInputJson>>, TInputJson> | ReadonlyArray<AgentMessageLine<TInputJson>> | {
|
|
259
197
|
readonly prompt?: ReadonlyArray<AgentMessageLine<TInputJson>>;
|
|
260
198
|
readonly buildMessages?: (args: AgentMessageBuildArgs<TInputJson>) => ReadonlyArray<AgentMessageDto>;
|
|
@@ -269,7 +207,6 @@ interface AgentGuardrailConfig {
|
|
|
269
207
|
readonly onTurnLimitReached?: AgentTurnLimitBehavior;
|
|
270
208
|
readonly modelInvocationOptions?: AgentModelInvocationOptions;
|
|
271
209
|
}
|
|
272
|
-
/** Defaults aligned with common tool-agent iteration limits (many products use ~10 max rounds). */
|
|
273
210
|
declare const AgentGuardrailDefaults: {
|
|
274
211
|
readonly maxTurns: 10;
|
|
275
212
|
readonly onTurnLimitReached: AgentTurnLimitBehavior;
|
|
@@ -293,25 +230,10 @@ interface ChatModelConfig {
|
|
|
293
230
|
readonly presentation?: AgentCanvasPresentation;
|
|
294
231
|
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
295
232
|
}
|
|
296
|
-
/**
|
|
297
|
-
* Provider-neutral chat language model wrapper returned by a {@link ChatModelFactory}.
|
|
298
|
-
*
|
|
299
|
-
* Thin adapter around an AI SDK `LanguageModelV2` (from `@ai-sdk/provider`) plus the call-site
|
|
300
|
-
* defaults Codemation needs at every generate/stream: the provider label, the model name used for
|
|
301
|
-
* pricing / telemetry, and the default invocation options (max output tokens, temperature,
|
|
302
|
-
* provider-specific overrides).
|
|
303
|
-
*
|
|
304
|
-
* The consumer (AIAgentNode / AgentStructuredOutputRunner) passes `languageModel` directly into
|
|
305
|
-
* `generateText({ model, ... })` from the `ai` package.
|
|
306
|
-
*/
|
|
307
233
|
interface ChatLanguageModel {
|
|
308
|
-
/** AI SDK `LanguageModelV2` instance (kept `unknown` to avoid leaking the SDK type into `@codemation/core`). */
|
|
309
234
|
readonly languageModel: unknown;
|
|
310
|
-
/** Stable pricing/telemetry key — e.g. `"gpt-4.1-nano"`. */
|
|
311
235
|
readonly modelName: string;
|
|
312
|
-
/** Provider label — e.g. `"openai"`. Used for cost tracking. */
|
|
313
236
|
readonly provider?: string;
|
|
314
|
-
/** Defaults merged into every call. Consumers may override per-invocation. */
|
|
315
237
|
readonly defaultCallOptions?: ChatLanguageModelCallOptions;
|
|
316
238
|
}
|
|
317
239
|
interface ChatLanguageModelCallOptions {
|
|
@@ -319,14 +241,8 @@ interface ChatLanguageModelCallOptions {
|
|
|
319
241
|
readonly temperature?: number;
|
|
320
242
|
readonly providerOptions?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
|
|
321
243
|
}
|
|
322
|
-
/**
|
|
323
|
-
* Options for a structured-output generate call. Mirrors
|
|
324
|
-
* `generateText({ output: Output.object(...) })` from the `ai` package.
|
|
325
|
-
*/
|
|
326
244
|
interface StructuredOutputOptions {
|
|
327
|
-
/** Optional schema name — used by some providers as the JSON schema name attribute. */
|
|
328
245
|
readonly schemaName?: string;
|
|
329
|
-
/** When `true`, the consumer should pass a strict-mode-compatible JSON Schema record. */
|
|
330
246
|
readonly strict?: boolean;
|
|
331
247
|
}
|
|
332
248
|
interface ChatModelFactory<TConfig extends ChatModelConfig = ChatModelConfig> {
|
|
@@ -361,12 +277,6 @@ type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any
|
|
|
361
277
|
outputSchema: TOutputSchema;
|
|
362
278
|
mapInput?: NodeBackedToolInputMapper<TNodeConfig, input<TInputSchema>>;
|
|
363
279
|
mapOutput?: NodeBackedToolOutputMapper<TNodeConfig, input<TInputSchema>, output<TOutputSchema>>;
|
|
364
|
-
/**
|
|
365
|
-
* Marks THIS tool binding as human-in-the-loop and sets the behavior when a human rejects the
|
|
366
|
-
* approval: `"return"` feeds the rejection back to the agent as a tool result, `"halt"` stops the
|
|
367
|
-
* run. Set per binding, so two tools backed by the same node can reject differently. When set, it
|
|
368
|
-
* takes precedence over any `humanApprovalToolBehavior` marker carried by the backing node.
|
|
369
|
-
*/
|
|
370
280
|
onRejected?: "halt" | "return";
|
|
371
281
|
}>;
|
|
372
282
|
interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends RunnableNodeConfig<TInputJson, TOutputJson> {
|
|
@@ -400,11 +310,6 @@ type AgentConnectionNodeCollectorApi = Readonly<{
|
|
|
400
310
|
declare const AgentConnectionNodeCollector: AgentConnectionNodeCollectorApi;
|
|
401
311
|
//#endregion
|
|
402
312
|
//#region src/serialization/ItemsInputNormalizer.d.ts
|
|
403
|
-
/**
|
|
404
|
-
* Normalizes external inputs into the engine's canonical `Items` shape.
|
|
405
|
-
* Used at host and builder boundaries where callers may provide either a raw value,
|
|
406
|
-
* a single item-like object, or an array of item-like values.
|
|
407
|
-
*/
|
|
408
313
|
declare class ItemsInputNormalizer {
|
|
409
314
|
normalize(raw: unknown): Items;
|
|
410
315
|
private normalizeItem;
|
|
@@ -412,4 +317,4 @@ declare class ItemsInputNormalizer {
|
|
|
412
317
|
}
|
|
413
318
|
//#endregion
|
|
414
319
|
export { McpServerDeclaration as $, ChatModelFactory as A, ZodSchemaAny as B, AgentToolDefinition as C, ChatLanguageModel as D, AgentTurnLimitBehavior as E, NodeBackedToolOutputMapperArgs as F, CallableToolFactory as G, AgentMessageConfigNormalizer as H, StructuredOutputOptions as I, CallableToolExecuteHandler as J, CallableToolConfig as K, Tool as L, NodeBackedToolInputMapper as M, NodeBackedToolInputMapperArgs as N, ChatLanguageModelCallOptions as O, NodeBackedToolOutputMapper as P, RunFinishedAtFactory as Q, ToolConfig as R, AgentToolCallPlanner as S, AgentToolToken as T, AgentToolFactory as U, AgentConfigInspector as V, CallableToolKindToken as W, NodeIterationIdFactory as X, NodeBackedToolConfig as Y, ConnectionNodeIdFactory as Z, AgentMessageTemplateContent as _, AgentConnectionNodeRole as a, AgentTool as b, AgentCanvasPresentation as c, AgentMessageBuildArgs as d, McpServerTransport as et, AgentMessageConfig as f, AgentMessageTemplate as g, AgentMessageRole as h, AgentConnectionNodeDescriptor as i, NodeBackedToolConfigOptions as j, ChatModelConfig as k, AgentGuardrailConfig as l, AgentMessageLine as m, AgentConnectionCredentialSource as n, McpServerResolver as o, AgentMessageDto as p, CallableToolConfigOptions as q, AgentConnectionNodeCollector as r, AgentAttachmentRole as s, ItemsInputNormalizer as t, AgentGuardrailDefaults as u, AgentModelInvocationOptions as v, AgentToolExecuteArgs as w, AgentToolCall as x, AgentNodeConfig as y, ToolExecuteArgs as z };
|
|
415
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
320
|
+
//# sourceMappingURL=ItemsInputNormalizer-A5txcOWX.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_di = require('./di-
|
|
1
|
+
const require_di = require('./di-C6Ubf9o5.cjs');
|
|
2
2
|
let tsyringe = require("tsyringe");
|
|
3
3
|
tsyringe = require_di.__toESM(tsyringe);
|
|
4
4
|
|
|
@@ -40,4 +40,4 @@ Object.defineProperty(exports, 'ItemsInputNormalizer', {
|
|
|
40
40
|
return ItemsInputNormalizer;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
43
|
+
//# sourceMappingURL=ItemsInputNormalizer-C1fv3sMW.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemsInputNormalizer-C1fv3sMW.cjs","names":["ItemsInputNormalizer"],"sources":["../src/serialization/ItemsInputNormalizer.ts"],"sourcesContent":["import type { Item, Items } from \"../contracts/workflowTypes\";\nimport { injectable } from \"../di\";\n\n@injectable()\nexport class ItemsInputNormalizer {\n normalize(raw: unknown): Items {\n if (raw === undefined || raw === null) {\n return [];\n }\n if (Array.isArray(raw)) {\n return raw.map((value) => this.normalizeItem(value));\n }\n return [this.normalizeItem(raw)];\n }\n\n private normalizeItem(raw: unknown): Item {\n if (!this.isItem(raw)) {\n return { json: raw };\n }\n return {\n json: raw.json,\n ...(raw.binary === undefined ? {} : { binary: raw.binary }),\n ...(raw.meta === undefined ? {} : { meta: raw.meta }),\n ...(raw.paired === undefined ? {} : { paired: raw.paired }),\n };\n }\n\n private isItem(raw: unknown): raw is Item {\n return typeof raw === \"object\" && raw !== null && Object.prototype.hasOwnProperty.call(raw, \"json\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAIO,iCAAMA,uBAAqB;CAChC,UAAU,KAAqB;AAC7B,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,EAAE;AAEX,MAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC;AAEtD,SAAO,CAAC,KAAK,cAAc,IAAI,CAAC;;CAGlC,AAAQ,cAAc,KAAoB;AACxC,MAAI,CAAC,KAAK,OAAO,IAAI,CACnB,QAAO,EAAE,MAAM,KAAK;AAEtB,SAAO;GACL,MAAM,IAAI;GACV,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC1D,GAAI,IAAI,SAAS,SAAY,EAAE,GAAG,EAAE,MAAM,IAAI,MAAM;GACpD,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC3D;;CAGH,AAAQ,OAAO,KAA2B;AACxC,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO;;;6DAzB1F"}
|