@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/dist/bootstrap/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
require('../di-
|
|
2
|
-
require('../
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
require('../di-C6Ubf9o5.cjs');
|
|
2
|
+
require('../workflowTypes-BW6Hhee7.cjs');
|
|
3
|
+
const require_contracts = require('../contracts-7L1wJHdk.cjs');
|
|
4
|
+
const require_runtime = require('../runtime-Due-FOZ2.cjs');
|
|
5
|
+
const require_bootstrap = require('../bootstrap-CTB53rEF.cjs');
|
|
5
6
|
|
|
6
7
|
exports.AbortControllerFactory = require_bootstrap.AbortControllerFactory;
|
|
7
8
|
exports.CatalogBackedCostTrackingTelemetryFactory = require_runtime.CatalogBackedCostTrackingTelemetryFactory;
|
|
@@ -26,10 +27,11 @@ exports.InMemoryWorkflowExecutionRepository = require_bootstrap.InMemoryWorkflow
|
|
|
26
27
|
exports.InProcessRetryRunner = require_runtime.InProcessRetryRunner;
|
|
27
28
|
exports.InlineDrivingScheduler = require_runtime.InlineDrivingScheduler;
|
|
28
29
|
exports.LocalOnlyScheduler = require_runtime.LocalOnlyScheduler;
|
|
30
|
+
exports.MissingRuntimeParityGuard = require_runtime.MissingRuntimeParityGuard;
|
|
29
31
|
exports.MissingRuntimeTriggerToken = require_runtime.MissingRuntimeTriggerToken;
|
|
30
32
|
exports.NodeExecutor = require_runtime.NodeExecutor;
|
|
31
33
|
exports.NodeInstanceFactory = require_runtime.NodeInstanceFactory;
|
|
32
|
-
exports.PersistedWorkflowTokenRegistry =
|
|
34
|
+
exports.PersistedWorkflowTokenRegistry = require_contracts.PersistedWorkflowTokenRegistry;
|
|
33
35
|
exports.RunIntentService = require_runtime.RunIntentService;
|
|
34
36
|
exports.RunPolicySnapshotFactory = require_runtime.RunPolicySnapshotFactory;
|
|
35
37
|
exports.RunSummaryMapper = require_bootstrap.RunSummaryMapper;
|
|
@@ -38,6 +40,8 @@ exports.StaticCostCatalog = require_runtime.StaticCostCatalog;
|
|
|
38
40
|
exports.TestSuiteOrchestrator = require_bootstrap.TestSuiteOrchestrator;
|
|
39
41
|
exports.TestSuiteRunIdFactory = require_bootstrap.TestSuiteRunIdFactory;
|
|
40
42
|
exports.UnavailableBinaryStorage = require_runtime.UnavailableBinaryStorage;
|
|
43
|
+
exports.WorkflowParityMismatchError = require_runtime.WorkflowParityMismatchError;
|
|
41
44
|
exports.WorkflowPolicyErrorServices = require_runtime.WorkflowPolicyErrorServices;
|
|
42
45
|
exports.WorkflowRepositoryWebhookTriggerMatcher = require_runtime.WorkflowRepositoryWebhookTriggerMatcher;
|
|
46
|
+
exports.WorkflowSnapshotCodec = require_contracts.WorkflowSnapshotCodec;
|
|
43
47
|
exports.WorkflowStoragePolicyEvaluator = require_runtime.WorkflowStoragePolicyEvaluator;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { $n as
|
|
2
|
-
import { n as CostCatalogEntry, t as CostCatalog } from "../CostCatalogContract-
|
|
3
|
-
import { n as InMemoryLiveWorkflowRepository, r as Engine, t as RunIntentService } from "../RunIntentService-
|
|
4
|
-
import { a as ItemExprResolver, c as DefaultAsyncSleeper, d as UnavailableBinaryStorage, f as HitlResumeTokenSignerSeam, i as RunnableOutputBehaviorResolver, l as AsyncSleeper, m as HitlTimeoutJobSchedulerSeam, n as InMemoryBinaryStorage, o as InProcessRetryRunner, s as DefaultExecutionContextFactory, t as InMemoryRunDataFactory, u as DefaultExecutionBinaryService, x as CredentialResolverFactory, y as HumanTaskStore } from "../InMemoryRunDataFactory-
|
|
5
|
-
import { a as WorkflowSnapshotCodec, i as EngineWorkflowRunnerService, n as TriggerRuntimeDiagnosticsProvider, r as WebhookTriggerMatcherProvider, t as EngineRuntimeRegistrationOptions } from "../EngineRuntimeRegistration.types-
|
|
1
|
+
import { $n as NodeActivationContinuation, $t as RunId, B as WorkflowExecutionListingRepository, Bn as EngineDeps, Br as WebhookTriggerRoutingDiagnostics, C as PersistedWorkflowSnapshotNode, Ct as ExecutionMode, Et as Items, Ft as NodeDefinition, H as WorkflowExecutionRepository, Hr as WorkflowActivationPolicy, It as NodeErrorHandler, Jt as ParentExecutionRef, Kt as NodeSchedulerDecision, L as RunSummary, Lr as WebhookInvocationMatch, N as RunResult, Nt as NodeActivationId, Or as WorkflowNodeInstanceFactory, Pr as HttpMethod, Pt as NodeConfigBase, Qi as NodeId, Qr as TelemetryScope, Rr as WebhookTriggerMatcher, Rt as NodeErrorHandlerSpec, Ur as ExecutionTelemetry, Ut as NodeOffloadPolicy, V as WorkflowExecutionPruneRepository, W as DependencyContainer, Wt as NodeOutputs, Y as TypeToken, Yt as PersistedRunPolicySnapshot, _n as WorkflowStoragePolicyDecisionArgs, b as PersistedRunState, c as EngineRunCounters, cn as WorkflowDefinition, cr as NodeExecutionScheduler, ct as ENGINE_EXECUTION_LIMITS_DEFAULTS, dn as WorkflowErrorHandlerSpec, dr as NodeResolver, ea as PersistedTokenId, fi as CostTrackingTelemetry, ft as RunEventBus, gi as CostTrackingUsageRecord, gt as TestSuiteRunId, hn as WorkflowPolicyRuntimeDefaults, ht as TestSuiteRunStatus, j as RunPruneCandidate, k as RunExecutionOptions, kr as WorkflowRepository, lt as EngineExecutionLimitsPolicy, mi as CostTrackingTelemetryFactory, mr as PreparedNodeActivationDispatch, mt as TestCaseRunStatus, or as NodeExecutionRequest, rr as NodeActivationScheduler, ta as WorkflowId, tr as NodeActivationRequest, un as WorkflowErrorHandler, ut as EngineExecutionLimitsPolicyConfig, vr as SuspensionRequest, y as PersistedRunSchedulingState } from "../agentMcpTypes-BHX4RQCC.cjs";
|
|
2
|
+
import { n as CostCatalogEntry, t as CostCatalog } from "../CostCatalogContract-Dwo-ZamG.cjs";
|
|
3
|
+
import { n as InMemoryLiveWorkflowRepository, r as Engine, t as RunIntentService } from "../RunIntentService-DKxuHTUz.cjs";
|
|
4
|
+
import { a as ItemExprResolver, c as DefaultAsyncSleeper, d as UnavailableBinaryStorage, f as HitlResumeTokenSignerSeam, i as RunnableOutputBehaviorResolver, l as AsyncSleeper, m as HitlTimeoutJobSchedulerSeam, n as InMemoryBinaryStorage, o as InProcessRetryRunner, s as DefaultExecutionContextFactory, t as InMemoryRunDataFactory, u as DefaultExecutionBinaryService, x as CredentialResolverFactory, y as HumanTaskStore } from "../InMemoryRunDataFactory-D2U9azmZ.cjs";
|
|
5
|
+
import { a as WorkflowSnapshotCodec, i as EngineWorkflowRunnerService, n as TriggerRuntimeDiagnosticsProvider, r as WebhookTriggerMatcherProvider, t as EngineRuntimeRegistrationOptions } from "../EngineRuntimeRegistration.types-BiNasx3G.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/orchestration/AbortControllerFactory.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Mints fresh {@link AbortController}s. Injected (rather than direct `new`) to honor the
|
|
10
|
-
* codebase's no-direct-construction rule and to give tests a seam for substituting a fake.
|
|
11
|
-
*/
|
|
12
8
|
declare class AbortControllerFactory {
|
|
13
9
|
create(): AbortController;
|
|
14
10
|
}
|
|
@@ -42,6 +38,11 @@ declare class WorkflowPolicyErrorServices {
|
|
|
42
38
|
resolveWorkflowErrorHandler(spec: WorkflowErrorHandlerSpec | undefined): WorkflowErrorHandler | undefined;
|
|
43
39
|
}
|
|
44
40
|
//#endregion
|
|
41
|
+
//#region src/workflowSnapshots/MissingRuntimeExecutionMarker.d.ts
|
|
42
|
+
declare class MissingRuntimeExecutionMarker {
|
|
43
|
+
isMarked(config: unknown): boolean;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
45
46
|
//#region src/execution/CatalogBackedCostTrackingTelemetryFactory.d.ts
|
|
46
47
|
declare class CatalogBackedCostTrackingTelemetryFactory implements CostTrackingTelemetryFactory {
|
|
47
48
|
private readonly costCatalog;
|
|
@@ -52,35 +53,13 @@ declare class CatalogBackedCostTrackingTelemetryFactory implements CostTrackingT
|
|
|
52
53
|
}
|
|
53
54
|
//#endregion
|
|
54
55
|
//#region src/execution/NodeSuspensionHandler.d.ts
|
|
55
|
-
/**
|
|
56
|
-
* Handles per-item `SuspensionRequest` catches in the engine's item execution loop.
|
|
57
|
-
*
|
|
58
|
-
* Responsibilities:
|
|
59
|
-
* 1. Generate a `taskId` (UUID v4).
|
|
60
|
-
* 2. Persist a `HumanTask` row via `HumanTaskStore.create`.
|
|
61
|
-
* 3. Sign a resume URL via `HitlResumeTokenSigner.sign`.
|
|
62
|
-
* 4. Enqueue a delayed BullMQ timeout job via `HitlTimeoutJobScheduler.enqueue`.
|
|
63
|
-
* 5. Build a `HumanTaskHandle` and call `deliver`.
|
|
64
|
-
* 6. Append a `PersistedSuspensionEntry` to the run state and flip status to `"suspended"`.
|
|
65
|
-
* 7. Persist via `WorkflowExecutionRepository.save`.
|
|
66
|
-
* 8. Throw `RunSuspendedError` so the caller can exit cleanly.
|
|
67
|
-
*
|
|
68
|
-
* If `deliver` throws, the error propagates up to `NodeExecutionRequestHandlerService`
|
|
69
|
-
* which routes it through `resumeFromNodeError` → run status becomes `"failed"`.
|
|
70
|
-
*
|
|
71
|
-
* `humanTaskStore`, `tokenSigner`, and `timeoutScheduler` are optional —
|
|
72
|
-
* when not registered (e.g. in unit tests), the handler still suspends the run but
|
|
73
|
-
* skips persistence, token signing, and job scheduling.
|
|
74
|
-
*/
|
|
75
56
|
declare class NodeSuspensionHandler {
|
|
76
57
|
private readonly workflowExecutionRepository;
|
|
77
58
|
private readonly humanTaskStore?;
|
|
78
59
|
private readonly tokenSigner?;
|
|
79
60
|
private readonly timeoutScheduler?;
|
|
80
|
-
/** Workspace ID to stamp on HumanTaskRecord in managed mode (T7 security fix). Null in non-managed mode. */
|
|
81
61
|
private readonly workspaceId?;
|
|
82
|
-
constructor(workflowExecutionRepository: WorkflowExecutionRepository, humanTaskStore?: HumanTaskStore | undefined, tokenSigner?: HitlResumeTokenSignerSeam | undefined, timeoutScheduler?: HitlTimeoutJobSchedulerSeam | undefined,
|
|
83
|
-
workspaceId?: string | undefined);
|
|
62
|
+
constructor(workflowExecutionRepository: WorkflowExecutionRepository, humanTaskStore?: HumanTaskStore | undefined, tokenSigner?: HitlResumeTokenSignerSeam | undefined, timeoutScheduler?: HitlTimeoutJobSchedulerSeam | undefined, workspaceId?: string | undefined);
|
|
84
63
|
handle(args: {
|
|
85
64
|
runId: RunId;
|
|
86
65
|
nodeId: NodeId;
|
|
@@ -88,14 +67,8 @@ declare class NodeSuspensionHandler {
|
|
|
88
67
|
itemIndex: number;
|
|
89
68
|
suspensionRequest: SuspensionRequest;
|
|
90
69
|
state: PersistedRunState;
|
|
91
|
-
/** Telemetry scope of the node's per-item span. Used to emit `hitl.task.*` span events. */
|
|
92
70
|
telemetry?: TelemetryScope;
|
|
93
71
|
}): Promise<never>;
|
|
94
|
-
/**
|
|
95
|
-
* Parse a duration string into milliseconds.
|
|
96
|
-
* Accepts ISO 8601 durations ("PT24H", "PT30M") and shorthand ("24h", "30m", "1d").
|
|
97
|
-
* Throws for unrecognised formats.
|
|
98
|
-
*/
|
|
99
72
|
private parseDurationMs;
|
|
100
73
|
private hashSchema;
|
|
101
74
|
private schemaToJson;
|
|
@@ -105,17 +78,13 @@ declare class NodeSuspensionHandler {
|
|
|
105
78
|
declare class NodeExecutor {
|
|
106
79
|
private readonly nodeInstanceFactory;
|
|
107
80
|
private readonly retryRunner;
|
|
108
|
-
/** Required for HITL suspension support. When omitted, `SuspensionRequest` throws upward. */
|
|
109
81
|
private readonly suspensionHandler?;
|
|
110
|
-
/** Required alongside `suspensionHandler`. */
|
|
111
82
|
private readonly loadRunState?;
|
|
112
83
|
private readonly fanInMerger;
|
|
113
84
|
private readonly outputNormalizer;
|
|
114
85
|
private readonly itemExprResolver;
|
|
115
86
|
private readonly outputBehaviorResolver;
|
|
116
|
-
constructor(nodeInstanceFactory: WorkflowNodeInstanceFactory, retryRunner: InProcessRetryRunner, itemExprResolver?: ItemExprResolver, outputBehaviorResolver?: RunnableOutputBehaviorResolver,
|
|
117
|
-
suspensionHandler?: NodeSuspensionHandler | undefined, /** Required alongside `suspensionHandler`. */
|
|
118
|
-
loadRunState?: ((runId: RunId) => Promise<PersistedRunState | undefined>) | undefined);
|
|
87
|
+
constructor(nodeInstanceFactory: WorkflowNodeInstanceFactory, retryRunner: InProcessRetryRunner, itemExprResolver?: ItemExprResolver, outputBehaviorResolver?: RunnableOutputBehaviorResolver, suspensionHandler?: NodeSuspensionHandler | undefined, loadRunState?: ((runId: RunId) => Promise<PersistedRunState | undefined>) | undefined);
|
|
119
88
|
execute(request: NodeActivationRequest): Promise<NodeOutputs>;
|
|
120
89
|
private assertRequiredCredentialsBound;
|
|
121
90
|
private isCredentialError;
|
|
@@ -126,7 +95,6 @@ declare class NodeExecutor {
|
|
|
126
95
|
private hasExecuteMulti;
|
|
127
96
|
private asMultiFromSingleActivation;
|
|
128
97
|
private executeRunnableActivation;
|
|
129
|
-
/** Use resolver ctx only when {@link NodeExecutionContext.config} is non-nullish. */
|
|
130
98
|
private pickExecutionContext;
|
|
131
99
|
private resolveInputSchema;
|
|
132
100
|
private assertItemJsonNotTopLevelArray;
|
|
@@ -173,14 +141,6 @@ declare class InlineDrivingScheduler implements NodeActivationScheduler {
|
|
|
173
141
|
private readonly activeDrainPromises;
|
|
174
142
|
constructor(nodeExecutor: NodeExecutor);
|
|
175
143
|
setContinuation(continuation: NodeActivationContinuation): void;
|
|
176
|
-
/**
|
|
177
|
-
* Prevents new drain cycles from being scheduled and waits for all currently-running
|
|
178
|
-
* drains to complete. Call before closing the DB connection or rolling back test transactions
|
|
179
|
-
* to ensure no in-flight writes hit a closed/rolled-back connection.
|
|
180
|
-
*
|
|
181
|
-
* Bounded: only the drains already in-flight at call time are awaited. Runs that keep
|
|
182
|
-
* re-scheduling will not schedule new work once stopped is set.
|
|
183
|
-
*/
|
|
184
144
|
stop(): Promise<void>;
|
|
185
145
|
prepareDispatch(request: NodeActivationRequest): Promise<PreparedNodeActivationDispatch>;
|
|
186
146
|
private drainRun;
|
|
@@ -200,12 +160,6 @@ declare class DefaultDrivingScheduler implements NodeActivationScheduler {
|
|
|
200
160
|
constructor(offloadPolicy: NodeOffloadPolicy, workerScheduler: NodeExecutionScheduler, inline: InlineDrivingScheduler);
|
|
201
161
|
setContinuation(continuation: NodeActivationContinuation): void;
|
|
202
162
|
prepareDispatch(request: NodeActivationRequest): Promise<PreparedNodeActivationDispatch>;
|
|
203
|
-
/**
|
|
204
|
-
* Scheduler precedence is explicit:
|
|
205
|
-
* 1. run-intent override (`executionOptions.localOnly`)
|
|
206
|
-
* 2. node-level execution hint / queue policy
|
|
207
|
-
* 3. container-default scheduler policy fallback
|
|
208
|
-
*/
|
|
209
163
|
private selectScheduler;
|
|
210
164
|
private hasNodeSchedulingPreference;
|
|
211
165
|
private prepareInlineDispatch;
|
|
@@ -228,9 +182,6 @@ declare class LocalOnlyScheduler implements NodeExecutionScheduler {
|
|
|
228
182
|
}
|
|
229
183
|
//#endregion
|
|
230
184
|
//#region src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.d.ts
|
|
231
|
-
/**
|
|
232
|
-
* Builds {@link EngineExecutionLimitsPolicy} by merging {@link ENGINE_EXECUTION_LIMITS_DEFAULTS} with optional `overrides` (e.g. host `runtime.engineExecutionLimits`).
|
|
233
|
-
*/
|
|
234
185
|
declare class EngineExecutionLimitsPolicyFactory {
|
|
235
186
|
create(overrides?: Partial<EngineExecutionLimitsPolicyConfig>): EngineExecutionLimitsPolicy;
|
|
236
187
|
}
|
|
@@ -271,7 +222,6 @@ declare class InMemoryWorkflowExecutionRepository implements WorkflowExecutionRe
|
|
|
271
222
|
}
|
|
272
223
|
//#endregion
|
|
273
224
|
//#region src/runStorage/RunSummaryMapper.d.ts
|
|
274
|
-
/** Maps persisted run state to API run summaries for listings. */
|
|
275
225
|
declare class RunSummaryMapper {
|
|
276
226
|
static fromPersistedState(state: PersistedRunState): RunSummary;
|
|
277
227
|
}
|
|
@@ -282,30 +232,16 @@ declare class MissingRuntimeFallbacks {
|
|
|
282
232
|
}
|
|
283
233
|
//#endregion
|
|
284
234
|
//#region src/runtime/EngineFactory.d.ts
|
|
285
|
-
/**
|
|
286
|
-
* {@link EngineDeps} plus optional overrides for workflow-snapshot materialization.
|
|
287
|
-
* Overrides keep default construction in this factory while allowing tests or advanced wiring to inject instances.
|
|
288
|
-
*/
|
|
289
235
|
type EngineCompositionDeps = EngineDeps & {
|
|
290
236
|
workflowSnapshotCodec?: WorkflowSnapshotCodec;
|
|
291
237
|
missingRuntimeFallbacks?: MissingRuntimeFallbacks;
|
|
292
|
-
/** When set, used for run-start, trigger, and continuation limit defaults. */
|
|
293
238
|
executionLimitsPolicy?: EngineExecutionLimitsPolicy;
|
|
294
239
|
};
|
|
295
|
-
/**
|
|
296
|
-
* Composes the {@link Engine} graph from {@link EngineCompositionDeps}. Production wiring usually goes through
|
|
297
|
-
* {@link import("../bootstrap/runtime/EngineRuntimeRegistrar").EngineRuntimeRegistrar}; this factory remains for tests and custom composition.
|
|
298
|
-
* Exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
299
|
-
*/
|
|
300
240
|
declare class EngineFactory {
|
|
301
241
|
create(deps: EngineCompositionDeps): Engine;
|
|
302
242
|
}
|
|
303
243
|
//#endregion
|
|
304
244
|
//#region src/runtime/WorkflowRepositoryWebhookTriggerMatcher.d.ts
|
|
305
|
-
/**
|
|
306
|
-
* Resolves webhook HTTP routes from the live workflow repository (no trigger setup / registration).
|
|
307
|
-
* Maintains an in-memory index keyed by user-defined endpoint path for O(1) lookups after reload.
|
|
308
|
-
*/
|
|
309
245
|
declare class WorkflowRepositoryWebhookTriggerMatcher implements WebhookTriggerMatcher {
|
|
310
246
|
private readonly workflowRepository;
|
|
311
247
|
private readonly workflowActivationPolicy;
|
|
@@ -327,20 +263,19 @@ declare class WorkflowRepositoryWebhookTriggerMatcher implements WebhookTriggerM
|
|
|
327
263
|
private normalizeEndpointPath;
|
|
328
264
|
}
|
|
329
265
|
//#endregion
|
|
266
|
+
//#region src/workflowSnapshots/MissingRuntimeParityGuard.d.ts
|
|
267
|
+
declare class MissingRuntimeParityGuard {
|
|
268
|
+
private readonly marker;
|
|
269
|
+
constructor(marker: MissingRuntimeExecutionMarker);
|
|
270
|
+
assertNone(workflow: WorkflowDefinition, nodeIds?: ReadonlyArray<NodeId>): void;
|
|
271
|
+
}
|
|
272
|
+
//#endregion
|
|
330
273
|
//#region src/orchestration/TestSuiteRunIdFactory.d.ts
|
|
331
|
-
/**
|
|
332
|
-
* Mints unique TestSuiteRun identifiers. Separated from {@link import("../types").RunIdFactory}
|
|
333
|
-
* so suite ids and per-case workflow run ids never alias.
|
|
334
|
-
*/
|
|
335
274
|
declare class TestSuiteRunIdFactory {
|
|
336
275
|
makeTestSuiteRunId(): TestSuiteRunId;
|
|
337
276
|
}
|
|
338
277
|
//#endregion
|
|
339
278
|
//#region src/orchestration/TestSuiteOrchestrator.d.ts
|
|
340
|
-
/**
|
|
341
|
-
* Engine-facade subset the orchestrator needs. Kept narrow on purpose so unit tests can
|
|
342
|
-
* substitute a fake without depending on the full Engine wiring.
|
|
343
|
-
*/
|
|
344
279
|
interface TestSuiteOrchestratorEngine {
|
|
345
280
|
runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions): Promise<RunResult>;
|
|
346
281
|
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
@@ -369,15 +304,6 @@ interface RunTestSuiteArgs {
|
|
|
369
304
|
readonly concurrency?: number;
|
|
370
305
|
readonly signal?: AbortSignal;
|
|
371
306
|
}
|
|
372
|
-
/**
|
|
373
|
-
* Drives a {@link TestTriggerNodeConfig.generateItems} iterable into one workflow run per item,
|
|
374
|
-
* with bounded concurrency. Pure engine logic — no persistence, no HTTP, no UI. Hosts adapt by
|
|
375
|
-
* subscribing to {@link RunEventBus} and writing rows on `testSuite*` / `testCase*` / `nodeCompleted`.
|
|
376
|
-
*
|
|
377
|
-
* Cancellation: the supplied `AbortSignal` aborts the source iterable (so credentialed pulls bail)
|
|
378
|
-
* and stops scheduling further cases. In-flight cases are awaited; engine-level cancellation of
|
|
379
|
-
* an already-dispatched run is not yet wired (Phase 2).
|
|
380
|
-
*/
|
|
381
307
|
declare class TestSuiteOrchestrator {
|
|
382
308
|
private readonly engine;
|
|
383
309
|
private readonly testSuiteRunIdFactory;
|
|
@@ -390,17 +316,11 @@ declare class TestSuiteOrchestrator {
|
|
|
390
316
|
private runOneCase;
|
|
391
317
|
private deriveSuiteStatus;
|
|
392
318
|
private now;
|
|
393
|
-
/** Defensive label resolver — author-supplied callbacks throw / return non-strings; we tolerate both. */
|
|
394
319
|
private resolveCaseLabel;
|
|
395
320
|
private publish;
|
|
396
321
|
}
|
|
397
322
|
//#endregion
|
|
398
323
|
//#region src/bootstrap/runtime/EngineRuntimeRegistrar.d.ts
|
|
399
|
-
/**
|
|
400
|
-
* Container-first entry: call on a host/test container **after** workflow, run, node, and credential
|
|
401
|
-
* ports are registered. The registrar owns the default inline scheduler, engine binding,
|
|
402
|
-
* and intent-surface wiring so hosts only override the seams they actually replace.
|
|
403
|
-
*/
|
|
404
324
|
declare class EngineRuntimeRegistrar {
|
|
405
325
|
register(container: DependencyContainer, options?: EngineRuntimeRegistrationOptions): void;
|
|
406
326
|
private registerAgentMcpIntegration;
|
|
@@ -421,13 +341,7 @@ declare class MissingRuntimeTriggerToken {}
|
|
|
421
341
|
declare class PersistedWorkflowTokenRegistry {
|
|
422
342
|
private readonly tokensById;
|
|
423
343
|
private readonly tokenIdsByToken;
|
|
424
|
-
/**
|
|
425
|
-
* Register a token with its package ID. Token ID is inferred as `packageId::tokenName`.
|
|
426
|
-
*/
|
|
427
344
|
register(type: TypeToken<unknown>, packageId: string, persistedNameOverride?: string): PersistedTokenId;
|
|
428
|
-
/**
|
|
429
|
-
* Register all decorated runtime types discovered in workflows.
|
|
430
|
-
*/
|
|
431
345
|
registerFromWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
|
|
432
346
|
private registerDecoratedType;
|
|
433
347
|
private registerNestedTypes;
|
|
@@ -437,5 +351,17 @@ declare class PersistedWorkflowTokenRegistry {
|
|
|
437
351
|
resolve(tokenId: PersistedTokenId): TypeToken<unknown> | undefined;
|
|
438
352
|
}
|
|
439
353
|
//#endregion
|
|
440
|
-
|
|
354
|
+
//#region src/workflowSnapshots/WorkflowParityMismatchError.d.ts
|
|
355
|
+
type MissingRuntimeNodeDetail = {
|
|
356
|
+
nodeId: NodeId;
|
|
357
|
+
kind: "node" | "trigger";
|
|
358
|
+
missingTokenId: string | undefined;
|
|
359
|
+
};
|
|
360
|
+
declare class WorkflowParityMismatchError extends Error {
|
|
361
|
+
readonly name = "WorkflowParityMismatchError";
|
|
362
|
+
readonly missingNodes: ReadonlyArray<MissingRuntimeNodeDetail>;
|
|
363
|
+
constructor(missingNodes: ReadonlyArray<MissingRuntimeNodeDetail>);
|
|
364
|
+
}
|
|
365
|
+
//#endregion
|
|
366
|
+
export { AbortControllerFactory, type AsyncSleeper, CatalogBackedCostTrackingTelemetryFactory, ConfigDrivenOffloadPolicy, CredentialResolverFactory, DefaultAsyncSleeper, DefaultDrivingScheduler, DefaultExecutionBinaryService, DefaultExecutionContextFactory, ENGINE_EXECUTION_LIMITS_DEFAULTS, Engine, type EngineCompositionDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineExecutionLimitsPolicyFactory, EngineFactory, EngineRuntimeRegistrar, type EngineRuntimeRegistrationOptions, EngineWorkflowRunnerService, HintOnlyOffloadPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryWorkflowExecutionRepository, InProcessRetryRunner, InlineDrivingScheduler, LocalOnlyScheduler, type MissingRuntimeNodeDetail, MissingRuntimeParityGuard, MissingRuntimeTriggerToken, NodeExecutor, NodeInstanceFactory, PersistedWorkflowTokenRegistry, RunIntentService, RunPolicySnapshotFactory, RunSummaryMapper, RunTerminalPersistenceCoordinator, type RunTestSuiteArgs, StaticCostCatalog, type TestSuiteCaseOutcome, TestSuiteOrchestrator, type TestSuiteOrchestratorEngine, TestSuiteRunIdFactory, type TestSuiteRunResult, type TriggerRuntimeDiagnosticsProvider, UnavailableBinaryStorage, type WebhookTriggerMatcherProvider, WorkflowParityMismatchError, WorkflowPolicyErrorServices, WorkflowRepositoryWebhookTriggerMatcher, WorkflowSnapshotCodec, WorkflowStoragePolicyEvaluator };
|
|
441
367
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as RunPolicySnapshotFactory, c as RunTerminalPersistenceCoordinator, l as WorkflowStoragePolicyEvaluator, n as InMemoryLiveWorkflowRepository, o as EngineExecutionLimitsPolicyFactory, r as EngineWorkflowRunnerService, s as WorkflowPolicyErrorServices, t as RunIntentService, u as Engine } from "../RunIntentService-
|
|
3
|
-
import {
|
|
4
|
-
import "../ItemsInputNormalizer-
|
|
5
|
-
import { n as TriggerRuntimeDiagnosticsProvider, r as WebhookTriggerMatcherProvider, t as EngineRuntimeRegistrationOptions } from "../EngineRuntimeRegistration.types-
|
|
1
|
+
import { Jo as PersistedTokenId, Ko as NodeId, Rn as DependencyContainer, Un as TypeToken, ir as EngineExecutionLimitsPolicyConfig, ni as WorkflowDefinition, nr as ENGINE_EXECUTION_LIMITS_DEFAULTS, rr as EngineExecutionLimitsPolicy } from "../index-CRv3_pY3.js";
|
|
2
|
+
import { a as RunPolicySnapshotFactory, c as RunTerminalPersistenceCoordinator, i as WorkflowSnapshotCodec, l as WorkflowStoragePolicyEvaluator, n as InMemoryLiveWorkflowRepository, o as EngineExecutionLimitsPolicyFactory, r as EngineWorkflowRunnerService, s as WorkflowPolicyErrorServices, t as RunIntentService, u as Engine } from "../RunIntentService-DrpKli2k.js";
|
|
3
|
+
import { $ as DefaultExecutionContextFactory, B as LocalOnlyScheduler, F as EngineFactory, G as StaticCostCatalog, H as DefaultDrivingScheduler, I as RunSummaryMapper, K as NodeInstanceFactory, L as InMemoryWorkflowExecutionRepository, N as WorkflowRepositoryWebhookTriggerMatcher, P as EngineCompositionDeps, Q as CatalogBackedCostTrackingTelemetryFactory, R as InMemoryRunDataFactory, U as InlineDrivingScheduler, V as HintOnlyOffloadPolicy, W as ConfigDrivenOffloadPolicy, Z as InProcessRetryRunner, a as TestSuiteRunResult, cn as AbortControllerFactory, et as DefaultAsyncSleeper, i as TestSuiteOrchestratorEngine, it as UnavailableBinaryStorage, n as TestSuiteCaseOutcome, o as TestSuiteRunIdFactory, q as NodeExecutor, r as TestSuiteOrchestrator, rt as DefaultExecutionBinaryService, s as MissingRuntimeParityGuard, sn as CredentialResolverFactory, t as RunTestSuiteArgs, tt as AsyncSleeper, z as InMemoryBinaryStorage } from "../index-mnLS0iQl.js";
|
|
4
|
+
import "../ItemsInputNormalizer-D2vrMrX1.js";
|
|
5
|
+
import { n as TriggerRuntimeDiagnosticsProvider, r as WebhookTriggerMatcherProvider, t as EngineRuntimeRegistrationOptions } from "../EngineRuntimeRegistration.types-Dq4ucrdo.js";
|
|
6
6
|
|
|
7
7
|
//#region src/bootstrap/runtime/EngineRuntimeRegistrar.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Container-first entry: call on a host/test container **after** workflow, run, node, and credential
|
|
10
|
-
* ports are registered. The registrar owns the default inline scheduler, engine binding,
|
|
11
|
-
* and intent-surface wiring so hosts only override the seams they actually replace.
|
|
12
|
-
*/
|
|
13
8
|
declare class EngineRuntimeRegistrar {
|
|
14
9
|
register(container: DependencyContainer, options?: EngineRuntimeRegistrationOptions): void;
|
|
15
10
|
private registerAgentMcpIntegration;
|
|
@@ -30,13 +25,7 @@ declare class MissingRuntimeTriggerToken {}
|
|
|
30
25
|
declare class PersistedWorkflowTokenRegistry {
|
|
31
26
|
private readonly tokensById;
|
|
32
27
|
private readonly tokenIdsByToken;
|
|
33
|
-
/**
|
|
34
|
-
* Register a token with its package ID. Token ID is inferred as `packageId::tokenName`.
|
|
35
|
-
*/
|
|
36
28
|
register(type: TypeToken<unknown>, packageId: string, persistedNameOverride?: string): PersistedTokenId;
|
|
37
|
-
/**
|
|
38
|
-
* Register all decorated runtime types discovered in workflows.
|
|
39
|
-
*/
|
|
40
29
|
registerFromWorkflows(workflows: ReadonlyArray<WorkflowDefinition>): void;
|
|
41
30
|
private registerDecoratedType;
|
|
42
31
|
private registerNestedTypes;
|
|
@@ -46,5 +35,17 @@ declare class PersistedWorkflowTokenRegistry {
|
|
|
46
35
|
resolve(tokenId: PersistedTokenId): TypeToken<unknown> | undefined;
|
|
47
36
|
}
|
|
48
37
|
//#endregion
|
|
49
|
-
|
|
38
|
+
//#region src/workflowSnapshots/WorkflowParityMismatchError.d.ts
|
|
39
|
+
type MissingRuntimeNodeDetail = {
|
|
40
|
+
nodeId: NodeId;
|
|
41
|
+
kind: "node" | "trigger";
|
|
42
|
+
missingTokenId: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
declare class WorkflowParityMismatchError extends Error {
|
|
45
|
+
readonly name = "WorkflowParityMismatchError";
|
|
46
|
+
readonly missingNodes: ReadonlyArray<MissingRuntimeNodeDetail>;
|
|
47
|
+
constructor(missingNodes: ReadonlyArray<MissingRuntimeNodeDetail>);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { AbortControllerFactory, type AsyncSleeper, CatalogBackedCostTrackingTelemetryFactory, ConfigDrivenOffloadPolicy, CredentialResolverFactory, DefaultAsyncSleeper, DefaultDrivingScheduler, DefaultExecutionBinaryService, DefaultExecutionContextFactory, ENGINE_EXECUTION_LIMITS_DEFAULTS, Engine, type EngineCompositionDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineExecutionLimitsPolicyFactory, EngineFactory, EngineRuntimeRegistrar, type EngineRuntimeRegistrationOptions, EngineWorkflowRunnerService, HintOnlyOffloadPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryWorkflowExecutionRepository, InProcessRetryRunner, InlineDrivingScheduler, LocalOnlyScheduler, type MissingRuntimeNodeDetail, MissingRuntimeParityGuard, MissingRuntimeTriggerToken, NodeExecutor, NodeInstanceFactory, PersistedWorkflowTokenRegistry, RunIntentService, RunPolicySnapshotFactory, RunSummaryMapper, RunTerminalPersistenceCoordinator, type RunTestSuiteArgs, StaticCostCatalog, type TestSuiteCaseOutcome, TestSuiteOrchestrator, type TestSuiteOrchestratorEngine, TestSuiteRunIdFactory, type TestSuiteRunResult, type TriggerRuntimeDiagnosticsProvider, UnavailableBinaryStorage, type WebhookTriggerMatcherProvider, WorkflowParityMismatchError, WorkflowPolicyErrorServices, WorkflowRepositoryWebhookTriggerMatcher, WorkflowSnapshotCodec, WorkflowStoragePolicyEvaluator };
|
|
50
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/bootstrap/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
1
|
+
import "../workflowTypes-DZtBTmKf.js";
|
|
2
|
+
import "../di-Cjiil7U-.js";
|
|
3
|
+
import { a as WorkflowSnapshotCodec, o as PersistedWorkflowTokenRegistry } from "../contracts-CjJ5CZ7N.js";
|
|
4
|
+
import { A as WorkflowParityMismatchError, B as CatalogBackedCostTrackingTelemetryFactory, C as DefaultDrivingScheduler, E as StaticCostCatalog, N as NodeExecutor, O as NodeInstanceFactory, S as HintOnlyOffloadPolicy, T as RunPolicySnapshotFactory, V as DefaultExecutionContextFactory, _ as RunTerminalPersistenceCoordinator, a as InMemoryLiveWorkflowRepository, b as LocalOnlyScheduler, c as EngineFactory, ct as CredentialResolverFactory, dt as DefaultExecutionBinaryService, ft as UnavailableBinaryStorage, g as WorkflowPolicyErrorServices, h as WorkflowStoragePolicyEvaluator, i as RunIntentService, j as MissingRuntimeTriggerToken, k as MissingRuntimeParityGuard, l as Engine, m as InMemoryBinaryStorage, n as WorkflowRepositoryWebhookTriggerMatcher, p as InMemoryRunDataFactory, s as EngineWorkflowRunnerService, st as DefaultAsyncSleeper, v as ENGINE_EXECUTION_LIMITS_DEFAULTS, w as ConfigDrivenOffloadPolicy, x as InlineDrivingScheduler, y as EngineExecutionLimitsPolicy, z as InProcessRetryRunner } from "../runtime-CBFDpmiz.js";
|
|
5
|
+
import { a as InMemoryWorkflowExecutionRepository, i as AbortControllerFactory, n as TestSuiteRunIdFactory, o as RunSummaryMapper, r as TestSuiteOrchestrator, s as EngineExecutionLimitsPolicyFactory, t as EngineRuntimeRegistrar } from "../bootstrap-DmqKheCI.js";
|
|
5
6
|
|
|
6
|
-
export { AbortControllerFactory, CatalogBackedCostTrackingTelemetryFactory, ConfigDrivenOffloadPolicy, CredentialResolverFactory, DefaultAsyncSleeper, DefaultDrivingScheduler, DefaultExecutionBinaryService, DefaultExecutionContextFactory, ENGINE_EXECUTION_LIMITS_DEFAULTS, Engine, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyFactory, EngineFactory, EngineRuntimeRegistrar, EngineWorkflowRunnerService, HintOnlyOffloadPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryWorkflowExecutionRepository, InProcessRetryRunner, InlineDrivingScheduler, LocalOnlyScheduler, MissingRuntimeTriggerToken, NodeExecutor, NodeInstanceFactory, PersistedWorkflowTokenRegistry, RunIntentService, RunPolicySnapshotFactory, RunSummaryMapper, RunTerminalPersistenceCoordinator, StaticCostCatalog, TestSuiteOrchestrator, TestSuiteRunIdFactory, UnavailableBinaryStorage, WorkflowPolicyErrorServices, WorkflowRepositoryWebhookTriggerMatcher, WorkflowStoragePolicyEvaluator };
|
|
7
|
+
export { AbortControllerFactory, CatalogBackedCostTrackingTelemetryFactory, ConfigDrivenOffloadPolicy, CredentialResolverFactory, DefaultAsyncSleeper, DefaultDrivingScheduler, DefaultExecutionBinaryService, DefaultExecutionContextFactory, ENGINE_EXECUTION_LIMITS_DEFAULTS, Engine, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyFactory, EngineFactory, EngineRuntimeRegistrar, EngineWorkflowRunnerService, HintOnlyOffloadPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryWorkflowExecutionRepository, InProcessRetryRunner, InlineDrivingScheduler, LocalOnlyScheduler, MissingRuntimeParityGuard, MissingRuntimeTriggerToken, NodeExecutor, NodeInstanceFactory, PersistedWorkflowTokenRegistry, RunIntentService, RunPolicySnapshotFactory, RunSummaryMapper, RunTerminalPersistenceCoordinator, StaticCostCatalog, TestSuiteOrchestrator, TestSuiteRunIdFactory, UnavailableBinaryStorage, WorkflowParityMismatchError, WorkflowPolicyErrorServices, WorkflowRepositoryWebhookTriggerMatcher, WorkflowSnapshotCodec, WorkflowStoragePolicyEvaluator };
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
const require_di = require('./di-
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
zod = require_di.__toESM(zod);
|
|
1
|
+
const require_di = require('./di-C6Ubf9o5.cjs');
|
|
2
|
+
const require_workflowTypes = require('./workflowTypes-BW6Hhee7.cjs');
|
|
3
|
+
const require_contracts = require('./contracts-7L1wJHdk.cjs');
|
|
4
|
+
const require_runtime = require('./runtime-Due-FOZ2.cjs');
|
|
6
5
|
let node_crypto = require("node:crypto");
|
|
7
6
|
node_crypto = require_di.__toESM(node_crypto);
|
|
7
|
+
let zod = require("zod");
|
|
8
|
+
zod = require_di.__toESM(zod);
|
|
8
9
|
let tsyringe = require("tsyringe");
|
|
9
10
|
tsyringe = require_di.__toESM(tsyringe);
|
|
10
11
|
|
|
11
12
|
//#region src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.ts
|
|
12
|
-
/**
|
|
13
|
-
* Builds {@link EngineExecutionLimitsPolicy} by merging {@link ENGINE_EXECUTION_LIMITS_DEFAULTS} with optional `overrides` (e.g. host `runtime.engineExecutionLimits`).
|
|
14
|
-
*/
|
|
15
13
|
var EngineExecutionLimitsPolicyFactory = class {
|
|
16
14
|
create(overrides) {
|
|
17
15
|
return new require_runtime.EngineExecutionLimitsPolicy({
|
|
@@ -23,7 +21,6 @@ var EngineExecutionLimitsPolicyFactory = class {
|
|
|
23
21
|
|
|
24
22
|
//#endregion
|
|
25
23
|
//#region src/runStorage/RunSummaryMapper.ts
|
|
26
|
-
/** Maps persisted run state to API run summaries for listings. */
|
|
27
24
|
var RunSummaryMapper = class {
|
|
28
25
|
static fromPersistedState(state) {
|
|
29
26
|
return {
|
|
@@ -31,7 +28,7 @@ var RunSummaryMapper = class {
|
|
|
31
28
|
workflowId: state.workflowId,
|
|
32
29
|
startedAt: state.startedAt,
|
|
33
30
|
status: state.status,
|
|
34
|
-
finishedAt:
|
|
31
|
+
finishedAt: require_workflowTypes.RunFinishedAtFactory.resolveIso(state),
|
|
35
32
|
parent: state.parent,
|
|
36
33
|
executionOptions: state.executionOptions
|
|
37
34
|
};
|
|
@@ -91,7 +88,7 @@ var InMemoryWorkflowExecutionRepository = class {
|
|
|
91
88
|
const out = [];
|
|
92
89
|
for (const s of this.runs.values()) {
|
|
93
90
|
if (s.status !== "completed" && s.status !== "failed") continue;
|
|
94
|
-
const finishedAt =
|
|
91
|
+
const finishedAt = require_workflowTypes.RunFinishedAtFactory.resolveIso(s);
|
|
95
92
|
const retentionSeconds = s.policySnapshot?.retentionSeconds ?? args.defaultRetentionSeconds;
|
|
96
93
|
const cutoffIso = (/* @__PURE__ */ new Date(new Date(args.nowIso).getTime() - retentionSeconds * 1e3)).toISOString();
|
|
97
94
|
if (!finishedAt || finishedAt >= cutoffIso) continue;
|
|
@@ -109,10 +106,6 @@ var InMemoryWorkflowExecutionRepository = class {
|
|
|
109
106
|
|
|
110
107
|
//#endregion
|
|
111
108
|
//#region src/orchestration/AbortControllerFactory.ts
|
|
112
|
-
/**
|
|
113
|
-
* Mints fresh {@link AbortController}s. Injected (rather than direct `new`) to honor the
|
|
114
|
-
* codebase's no-direct-construction rule and to give tests a seam for substituting a fake.
|
|
115
|
-
*/
|
|
116
109
|
var AbortControllerFactory = class {
|
|
117
110
|
create() {
|
|
118
111
|
return new AbortController();
|
|
@@ -122,15 +115,6 @@ var AbortControllerFactory = class {
|
|
|
122
115
|
//#endregion
|
|
123
116
|
//#region src/orchestration/TestSuiteOrchestrator.ts
|
|
124
117
|
const DEFAULT_CONCURRENCY = 4;
|
|
125
|
-
/**
|
|
126
|
-
* Drives a {@link TestTriggerNodeConfig.generateItems} iterable into one workflow run per item,
|
|
127
|
-
* with bounded concurrency. Pure engine logic — no persistence, no HTTP, no UI. Hosts adapt by
|
|
128
|
-
* subscribing to {@link RunEventBus} and writing rows on `testSuite*` / `testCase*` / `nodeCompleted`.
|
|
129
|
-
*
|
|
130
|
-
* Cancellation: the supplied `AbortSignal` aborts the source iterable (so credentialed pulls bail)
|
|
131
|
-
* and stops scheduling further cases. In-flight cases are awaited; engine-level cancellation of
|
|
132
|
-
* an already-dispatched run is not yet wired (Phase 2).
|
|
133
|
-
*/
|
|
134
118
|
var TestSuiteOrchestrator = class {
|
|
135
119
|
constructor(engine, testSuiteRunIdFactory, credentialResolverFactory, abortControllerFactory, eventBus, currentDate = () => /* @__PURE__ */ new Date()) {
|
|
136
120
|
this.engine = engine;
|
|
@@ -307,7 +291,6 @@ var TestSuiteOrchestrator = class {
|
|
|
307
291
|
now() {
|
|
308
292
|
return this.currentDate().toISOString();
|
|
309
293
|
}
|
|
310
|
-
/** Defensive label resolver — author-supplied callbacks throw / return non-strings; we tolerate both. */
|
|
311
294
|
resolveCaseLabel(config, item) {
|
|
312
295
|
if (typeof config.caseLabel !== "function") return void 0;
|
|
313
296
|
try {
|
|
@@ -327,10 +310,6 @@ var TestSuiteOrchestrator = class {
|
|
|
327
310
|
|
|
328
311
|
//#endregion
|
|
329
312
|
//#region src/orchestration/TestSuiteRunIdFactory.ts
|
|
330
|
-
/**
|
|
331
|
-
* Mints unique TestSuiteRun identifiers. Separated from {@link import("../types").RunIdFactory}
|
|
332
|
-
* so suite ids and per-case workflow run ids never alias.
|
|
333
|
-
*/
|
|
334
313
|
var TestSuiteRunIdFactory = class {
|
|
335
314
|
makeTestSuiteRunId() {
|
|
336
315
|
return `tsr_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
@@ -339,26 +318,6 @@ var TestSuiteRunIdFactory = class {
|
|
|
339
318
|
|
|
340
319
|
//#endregion
|
|
341
320
|
//#region src/execution/NodeSuspensionHandler.ts
|
|
342
|
-
/**
|
|
343
|
-
* Handles per-item `SuspensionRequest` catches in the engine's item execution loop.
|
|
344
|
-
*
|
|
345
|
-
* Responsibilities:
|
|
346
|
-
* 1. Generate a `taskId` (UUID v4).
|
|
347
|
-
* 2. Persist a `HumanTask` row via `HumanTaskStore.create`.
|
|
348
|
-
* 3. Sign a resume URL via `HitlResumeTokenSigner.sign`.
|
|
349
|
-
* 4. Enqueue a delayed BullMQ timeout job via `HitlTimeoutJobScheduler.enqueue`.
|
|
350
|
-
* 5. Build a `HumanTaskHandle` and call `deliver`.
|
|
351
|
-
* 6. Append a `PersistedSuspensionEntry` to the run state and flip status to `"suspended"`.
|
|
352
|
-
* 7. Persist via `WorkflowExecutionRepository.save`.
|
|
353
|
-
* 8. Throw `RunSuspendedError` so the caller can exit cleanly.
|
|
354
|
-
*
|
|
355
|
-
* If `deliver` throws, the error propagates up to `NodeExecutionRequestHandlerService`
|
|
356
|
-
* which routes it through `resumeFromNodeError` → run status becomes `"failed"`.
|
|
357
|
-
*
|
|
358
|
-
* `humanTaskStore`, `tokenSigner`, and `timeoutScheduler` are optional —
|
|
359
|
-
* when not registered (e.g. in unit tests), the handler still suspends the run but
|
|
360
|
-
* skips persistence, token signing, and job scheduling.
|
|
361
|
-
*/
|
|
362
321
|
var NodeSuspensionHandler = class {
|
|
363
322
|
constructor(workflowExecutionRepository, humanTaskStore, tokenSigner, timeoutScheduler, workspaceId) {
|
|
364
323
|
this.workflowExecutionRepository = workflowExecutionRepository;
|
|
@@ -464,11 +423,6 @@ var NodeSuspensionHandler = class {
|
|
|
464
423
|
await this.workflowExecutionRepository.save(updatedState);
|
|
465
424
|
throw new require_runtime.RunSuspendedError(args.runId, taskId);
|
|
466
425
|
}
|
|
467
|
-
/**
|
|
468
|
-
* Parse a duration string into milliseconds.
|
|
469
|
-
* Accepts ISO 8601 durations ("PT24H", "PT30M") and shorthand ("24h", "30m", "1d").
|
|
470
|
-
* Throws for unrecognised formats.
|
|
471
|
-
*/
|
|
472
426
|
parseDurationMs(duration) {
|
|
473
427
|
const shorthand = /^(\d+(?:\.\d+)?)(s|m|h|d)$/i.exec(duration);
|
|
474
428
|
if (shorthand) return parseFloat(shorthand[1]) * {
|
|
@@ -508,11 +462,6 @@ var InlineDrivingSchedulerFactory = class {
|
|
|
508
462
|
|
|
509
463
|
//#endregion
|
|
510
464
|
//#region src/bootstrap/runtime/EngineRuntimeRegistrar.ts
|
|
511
|
-
/**
|
|
512
|
-
* Container-first entry: call on a host/test container **after** workflow, run, node, and credential
|
|
513
|
-
* ports are registered. The registrar owns the default inline scheduler, engine binding,
|
|
514
|
-
* and intent-surface wiring so hosts only override the seams they actually replace.
|
|
515
|
-
*/
|
|
516
465
|
var EngineRuntimeRegistrar = class {
|
|
517
466
|
register(container, options) {
|
|
518
467
|
this.registerSupportFactories(container);
|
|
@@ -672,4 +621,4 @@ Object.defineProperty(exports, 'TestSuiteRunIdFactory', {
|
|
|
672
621
|
return TestSuiteRunIdFactory;
|
|
673
622
|
}
|
|
674
623
|
});
|
|
675
|
-
//# sourceMappingURL=bootstrap-
|
|
624
|
+
//# sourceMappingURL=bootstrap-CTB53rEF.cjs.map
|