@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
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { i as WorkflowSnapshotCodec, u as Engine } from "./RunIntentService-
|
|
3
|
-
import { B as ZodSchemaAny, K as CallableToolConfig, q as CallableToolConfigOptions } from "./ItemsInputNormalizer-
|
|
1
|
+
import { $i as NodeExecutionContext, $t as ConnectionInvocationId, Ai as BinaryStorageStatResult, Ao as CredentialRequirement, Bi as HumanTaskActor, Br as NodeSchedulerDecision, Ca as WorkflowRepository, Cn as RunExecutionOptions, Cr as JsonObject, Di as BinaryBody, Dn as RunResult, Dr as NodeActivationId, Eo as CredentialJsonRecord, Er as MutableRunData, Fn as WorkflowExecutionPruneRepository, Fo as CredentialType, Gr as RunDataFactory, Ho as PollingTriggerLogger, Hr as ParentExecutionRef, Ia as WorkflowActivationPolicy, In as WorkflowExecutionRepository, Io as CredentialTypeDefinition, Ka as TelemetryScope, Ko as NodeId, Kr as RunDataSnapshot, L as NodeBaseOptions, La as ExecutionTelemetry, Li as ExecutionBinaryService, Lr as NodeOffloadPolicy, Ma as WebhookTriggerMatcher, Mi as BinaryStorageWriteResult, Mn as RunTestContext, Mo as CredentialSessionFactoryArgs, N as DefinedNodeCredentialBindings, No as CredentialSessionService, Oa as HttpMethod, Oi as BinaryStorage, Or as NodeConfigBase, Pa as WebhookTriggerRoutingDiagnostics, Pi as EngineDeps, Pn as WorkflowExecutionListingRepository, Pr as NodeInspectorSummaryRow, Qi as NodeBinaryAttachmentService, Qr as TriggerNodeConfig, Ra as ExecutionTelemetryFactory, Ri as ExecutionContext, Rr as NodeOutputs, Sa as WorkflowNodeInstanceFactory, Tn as RunPruneCandidate, Tr as JsonValue, Tt as CostCatalogEntry, Ui as HumanTaskSubject, Un as TypeToken, Ur as PersistedRunPolicySnapshot, Vi as HumanTaskHandle, Wr as PollingTriggerConfig, Ya as TelemetrySpanScope, Yi as NodeActivationRequest, Yo as WorkflowId, Yr as RunnableNodeConfig, Zi as NodeActivationScheduler, _n as PersistedWorkflowSnapshotNode, _r as ExecutionMode, aa as NodeResolver, an as NodeExecutionSnapshot, ar as RunEvent, ba as TriggerSetupStateRepository, bo as CredentialFieldSchema, br as Items, ca as PreparedNodeActivationDispatch, co as CostTrackingTelemetryFactory, cr as TestCaseRunStatus, ea as NodeExecutionRequest, en as ConnectionInvocationRecord, fa as SuspensionRequest, fo as CollectionsContext, gr as Edge, j as DefinedNodeCredentialAccessors, ja as WebhookInvocationMatch, jn as RunSummary, k as DefinedNode, ka as TriggerInstanceId, ki as BinaryStorageReadResult, kr as NodeDefinition, lr as TestSuiteRunStatus, mn as PersistedRunState, mr as BinaryAttachment, na as NodeExecutionScheduler, ni as WorkflowDefinition, nn as EngineRunCounters, oo as CostTrackingTelemetry, or as RunEventBus, pn as PersistedRunSchedulingState, pr as ActivationIdFactory, qi as NodeActivationContinuation, qo as OutputPortKey, qr as RunId, ra as NodeExecutionStatePublisher, rr as EngineExecutionLimitsPolicy, sr as RunEventSubscription, uo as CostTrackingUsageRecord, ur as TestSuiteRunId, vr as Item, wi as RetryPolicySpec, wt as CostCatalog, xa as TriggerTestItemsContext, xo as CredentialHealth, zi as ExecutionContextFactory } from "./index-CRv3_pY3.js";
|
|
2
|
+
import { i as WorkflowSnapshotCodec, u as Engine } from "./RunIntentService-DrpKli2k.js";
|
|
3
|
+
import { B as ZodSchemaAny, K as CallableToolConfig, q as CallableToolConfigOptions } from "./ItemsInputNormalizer-D2vrMrX1.js";
|
|
4
4
|
import { ZodType, z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/orchestration/AbortControllerFactory.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Mints fresh {@link AbortController}s. Injected (rather than direct `new`) to honor the
|
|
9
|
-
* codebase's no-direct-construction rule and to give tests a seam for substituting a fake.
|
|
10
|
-
*/
|
|
11
7
|
declare class AbortControllerFactory {
|
|
12
8
|
create(): AbortController;
|
|
13
9
|
}
|
|
@@ -20,15 +16,18 @@ declare class CredentialResolverFactory {
|
|
|
20
16
|
}
|
|
21
17
|
//#endregion
|
|
22
18
|
//#region src/events/NodeEventPublisher.d.ts
|
|
23
|
-
/** Publishes node lifecycle snapshots onto the run {@link RunEventBus}. */
|
|
24
19
|
declare class NodeEventPublisher {
|
|
25
20
|
private readonly eventBus;
|
|
26
21
|
constructor(eventBus: RunEventBus | undefined);
|
|
27
22
|
publish(kind: "nodeQueued" | "nodeStarted" | "nodeCompleted" | "nodeFailed", snapshot: NodeExecutionSnapshot): Promise<void>;
|
|
28
23
|
}
|
|
29
24
|
//#endregion
|
|
25
|
+
//#region src/workflowSnapshots/MissingRuntimeExecutionMarker.d.ts
|
|
26
|
+
declare class MissingRuntimeExecutionMarker {
|
|
27
|
+
isMarked(config: unknown): boolean;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
30
|
//#region src/contracts/Clock.d.ts
|
|
31
|
-
/** Port for time; inject `SystemClock` in production and a fake/test clock in tests. */
|
|
32
31
|
interface Clock {
|
|
33
32
|
now(): Date;
|
|
34
33
|
}
|
|
@@ -38,7 +37,6 @@ declare class SystemClock implements Clock {
|
|
|
38
37
|
//#endregion
|
|
39
38
|
//#region src/contracts/humanTaskStoreTypes.d.ts
|
|
40
39
|
type HumanTaskStatus = "pending" | "decided" | "timed_out" | "auto_accepted" | "cancelled";
|
|
41
|
-
/** Persisted record for a single HITL task instance. */
|
|
42
40
|
interface HumanTaskRecord {
|
|
43
41
|
readonly id: string;
|
|
44
42
|
readonly runId: string;
|
|
@@ -67,7 +65,6 @@ interface HumanTaskStore {
|
|
|
67
65
|
findById(taskId: string): Promise<HumanTaskRecord | undefined>;
|
|
68
66
|
findByResumeTokenHash(tokenHash: string): Promise<HumanTaskRecord | undefined>;
|
|
69
67
|
findPendingForWorkspace(workspaceId: string): Promise<ReadonlyArray<HumanTaskRecord>>;
|
|
70
|
-
/** Returns all pending tasks regardless of workspace. Used by the local dev inbox (non-managed mode). */
|
|
71
68
|
findAllPending(): Promise<ReadonlyArray<HumanTaskRecord>>;
|
|
72
69
|
markDecided(args: {
|
|
73
70
|
taskId: string;
|
|
@@ -83,12 +80,6 @@ interface HumanTaskStore {
|
|
|
83
80
|
declare const HumanTaskStoreToken: TypeToken<HumanTaskStore | undefined>;
|
|
84
81
|
//#endregion
|
|
85
82
|
//#region src/contracts/hitlSeamTypes.d.ts
|
|
86
|
-
/**
|
|
87
|
-
* Seam interfaces for HITL collaborators that are implemented in `@codemation/host`
|
|
88
|
-
* and injected into `NodeSuspensionHandler` at runtime. Core defines the interface only —
|
|
89
|
-
* no HTTP, vendor SDK, or Prisma dependencies here.
|
|
90
|
-
*/
|
|
91
|
-
/** Signs and hashes a HITL resume token. Core only needs the sign and hash operations. */
|
|
92
83
|
interface HitlResumeTokenSignerSeam {
|
|
93
84
|
sign(args: {
|
|
94
85
|
taskId: string;
|
|
@@ -97,7 +88,6 @@ interface HitlResumeTokenSignerSeam {
|
|
|
97
88
|
}): string;
|
|
98
89
|
hashToken(token: string): string;
|
|
99
90
|
}
|
|
100
|
-
/** Schedules a delayed BullMQ job that drives the timeout path. */
|
|
101
91
|
interface HitlTimeoutJobSchedulerSeam {
|
|
102
92
|
enqueueTimeoutJob(args: {
|
|
103
93
|
taskId: string;
|
|
@@ -106,19 +96,9 @@ interface HitlTimeoutJobSchedulerSeam {
|
|
|
106
96
|
}
|
|
107
97
|
declare const HitlResumeTokenSignerToken: TypeToken<HitlResumeTokenSignerSeam | undefined>;
|
|
108
98
|
declare const HitlTimeoutJobSchedulerToken: TypeToken<HitlTimeoutJobSchedulerSeam | undefined>;
|
|
109
|
-
/**
|
|
110
|
-
* Optional workspace ID injected into NodeSuspensionHandler in managed mode (T7 security fix).
|
|
111
|
-
* Allows the handler to stamp the workspaceId on each HumanTaskRecord so HitlCallbackHandler
|
|
112
|
-
* can assert workspace identity independently of the HMAC middleware.
|
|
113
|
-
* Not registered in non-managed mode; NodeSuspensionHandler defaults to null.
|
|
114
|
-
*/
|
|
115
99
|
declare const HitlWorkspaceIdToken: TypeToken<string | undefined>;
|
|
116
100
|
//#endregion
|
|
117
101
|
//#region src/contracts/inboxChannelTypes.d.ts
|
|
118
|
-
/**
|
|
119
|
-
* A single inbox delivery channel.
|
|
120
|
-
* Implementations: `LocalInboxChannel`, `ControlPlaneInboxChannel`.
|
|
121
|
-
*/
|
|
122
102
|
interface InboxChannel {
|
|
123
103
|
readonly kind: "local" | "control-plane-inbox";
|
|
124
104
|
deliver(args: InboxDeliverArgs): Promise<InboxDelivery>;
|
|
@@ -130,7 +110,6 @@ type InboxDeliverArgs = Readonly<{
|
|
|
130
110
|
subject: HumanTaskSubject;
|
|
131
111
|
priority: "low" | "normal" | "high";
|
|
132
112
|
item: Item;
|
|
133
|
-
/** Present in managed mode (from `PairingConfig.workspaceId`). */
|
|
134
113
|
workspaceId?: string;
|
|
135
114
|
}>;
|
|
136
115
|
type InboxDelivery = {
|
|
@@ -153,10 +132,6 @@ type InboxOnTimeoutArgs = Readonly<{
|
|
|
153
132
|
delivery: InboxDelivery;
|
|
154
133
|
policy: "halt" | "auto-accept";
|
|
155
134
|
}>;
|
|
156
|
-
/**
|
|
157
|
-
* Resolves the correct `InboxChannel` for the current deployment mode
|
|
158
|
-
* (local dev vs. managed/CP). Implemented in `@codemation/host`.
|
|
159
|
-
*/
|
|
160
135
|
interface InboxChannelResolverSeam {
|
|
161
136
|
resolve(): {
|
|
162
137
|
channel: InboxChannel;
|
|
@@ -196,9 +171,6 @@ declare function defineCredential<TPublicSource extends CredentialFieldMap<any>
|
|
|
196
171
|
};
|
|
197
172
|
//#endregion
|
|
198
173
|
//#region src/authoring/callableTool.types.d.ts
|
|
199
|
-
/**
|
|
200
|
-
* Workflow-facing helper for inline Zod-typed agent tools (same as {@link CallableToolFactory.callableTool}).
|
|
201
|
-
*/
|
|
202
174
|
declare function callableTool<TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny>(options: CallableToolConfigOptions<TInputSchema, TOutputSchema>): CallableToolConfig<TInputSchema, TOutputSchema>;
|
|
203
175
|
//#endregion
|
|
204
176
|
//#region src/authoring/defineCollection.types.d.ts
|
|
@@ -262,179 +234,74 @@ declare class DefinedCollectionRegistry {
|
|
|
262
234
|
//#endregion
|
|
263
235
|
//#region src/authoring/definePollingTrigger.types.d.ts
|
|
264
236
|
type MaybePromise<TValue> = TValue | Promise<TValue>;
|
|
265
|
-
/**
|
|
266
|
-
* Context passed into the `poll` callback on each tick.
|
|
267
|
-
*/
|
|
268
237
|
interface DefinePollingTriggerPollContext<TConfig$1 extends CredentialJsonRecord, TState extends JsonValue | undefined, TBindings extends DefinedNodeCredentialBindings | undefined> {
|
|
269
238
|
readonly config: TConfig$1;
|
|
270
239
|
readonly state: TState;
|
|
271
240
|
readonly credentials: DefinedNodeCredentialAccessors<TBindings>;
|
|
272
241
|
}
|
|
273
|
-
/**
|
|
274
|
-
* What `poll` must return each tick.
|
|
275
|
-
*/
|
|
276
242
|
interface DefinePollingTriggerPollResult<TItemJson, TState extends JsonValue | undefined> {
|
|
277
|
-
/**
|
|
278
|
-
* New items to emit. Each item may carry an optional `dedupKey`; duplicate keys are
|
|
279
|
-
* filtered out against a rolling dedup window (managed internally by the runtime).
|
|
280
|
-
* Items without a `dedupKey` are always emitted.
|
|
281
|
-
*/
|
|
282
243
|
readonly items: ReadonlyArray<{
|
|
283
244
|
json: TItemJson;
|
|
284
245
|
dedupKey?: string;
|
|
285
246
|
}>;
|
|
286
|
-
/** Persisted as the trigger's setup state for the next tick. */
|
|
287
247
|
readonly nextState: TState;
|
|
288
248
|
}
|
|
289
|
-
/**
|
|
290
|
-
* Context passed into the `execute` callback for post-emit enrichment (e.g. fetching
|
|
291
|
-
* attachment bytes). Mirrors `NodeExecutionContext` so plugin authors use familiar patterns.
|
|
292
|
-
*/
|
|
293
249
|
type DefinePollingTriggerExecuteContext<TConfig$1 extends TriggerNodeConfig<any, any>> = NodeExecutionContext<TConfig$1>;
|
|
294
|
-
/**
|
|
295
|
-
* Context passed into the `testItems` callback.
|
|
296
|
-
*/
|
|
297
250
|
type DefinePollingTriggerTestItemsContext<TConfig$1 extends TriggerNodeConfig<any, any>> = TriggerTestItemsContext<TConfig$1>;
|
|
298
|
-
/**
|
|
299
|
-
* Options accepted by `definePollingTrigger`.
|
|
300
|
-
*/
|
|
301
251
|
interface DefinePollingTriggerOptions<TKey extends string, TConfig$1 extends CredentialJsonRecord, TItemJson, TState extends JsonValue | undefined, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
|
|
302
|
-
/**
|
|
303
|
-
* Unique node-token-id-style key, e.g. `"msgraph-mail.on-new-mail"`.
|
|
304
|
-
* Used as the persisted runtime type name — must be stable across deployments.
|
|
305
|
-
*/
|
|
306
252
|
readonly key: TKey;
|
|
253
|
+
readonly packageName?: string;
|
|
307
254
|
readonly title: string;
|
|
308
255
|
readonly description?: string;
|
|
309
|
-
/** Canvas icon (same contract as `NodeConfigBase.icon`). */
|
|
310
256
|
readonly icon?: string;
|
|
311
|
-
/**
|
|
312
|
-
* Zod schema for the trigger's user-facing configuration.
|
|
313
|
-
* When provided, the returned `create()` method is typed against the inferred config type.
|
|
314
|
-
*/
|
|
315
257
|
readonly configSchema?: ZodType<TConfig$1>;
|
|
316
|
-
/** Credential bindings keyed by slot (same format as `defineNode`). */
|
|
317
258
|
readonly credentials?: TBindings;
|
|
318
|
-
/**
|
|
319
|
-
* Static configuration summary surfaced in the workflow inspector — see
|
|
320
|
-
* {@link import("../contracts/workflowTypes").NodeConfigBase.inspectorSummary}.
|
|
321
|
-
*
|
|
322
|
-
* Receives the static config; returns 2–6 short label/value pairs (or `undefined` to skip).
|
|
323
|
-
*/
|
|
324
259
|
readonly inspectorSummary?: (args: Readonly<{
|
|
325
260
|
config: TConfig$1;
|
|
326
261
|
}>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
|
|
327
|
-
/**
|
|
328
|
-
* Called once when the trigger arms (or re-arms after a server restart) to provide the
|
|
329
|
-
* initial value for `state` when no persisted state exists.
|
|
330
|
-
*/
|
|
331
262
|
initialState?(): TState;
|
|
332
|
-
/**
|
|
333
|
-
* Polling interval in milliseconds. The runtime enforces a minimum of 25 ms.
|
|
334
|
-
* @default 60_000
|
|
335
|
-
*/
|
|
336
263
|
readonly pollIntervalMs?: number;
|
|
337
|
-
/**
|
|
338
|
-
* The per-tick poll logic. Called by the runtime each interval.
|
|
339
|
-
* Must return new items plus the next persisted state.
|
|
340
|
-
*/
|
|
341
264
|
poll(pollCtx: DefinePollingTriggerPollContext<TConfig$1, TState, TBindings>): MaybePromise<DefinePollingTriggerPollResult<TItemJson, TState>>;
|
|
342
|
-
/**
|
|
343
|
-
* Optional post-emit enrichment step (runs in the normal node-execute phase after the
|
|
344
|
-
* trigger fires and the workflow run starts). Use for expensive per-item work such as
|
|
345
|
-
* fetching attachment bytes via `ctx.binary.attach`. When omitted, the trigger passes
|
|
346
|
-
* items through unchanged.
|
|
347
|
-
*/
|
|
348
265
|
execute?(items: Items<TItemJson>, ctx: NodeExecutionContext<DefinedPollingTriggerConfig<TConfig$1, TItemJson>>): MaybePromise<NodeOutputs>;
|
|
349
|
-
/**
|
|
350
|
-
* Optional implementation for the workflow UI's "Test" button. Should return a small
|
|
351
|
-
* sample of current items without consulting or mutating polling state.
|
|
352
|
-
*/
|
|
353
266
|
testItems?(ctx: TriggerTestItemsContext<DefinedPollingTriggerConfig<TConfig$1, TItemJson>>): MaybePromise<Items<TItemJson>>;
|
|
354
267
|
}
|
|
355
|
-
/**
|
|
356
|
-
* The object returned by `definePollingTrigger`. Register it via
|
|
357
|
-
* `definePlugin({ nodes: [myTrigger] })` or call `.register(ctx)` directly.
|
|
358
|
-
*
|
|
359
|
-
* `poll` is also directly callable for unit-testing — no runtime needed.
|
|
360
|
-
*/
|
|
361
268
|
interface DefinedPollingTrigger<TKey extends string, TConfig$1 extends CredentialJsonRecord, TItemJson, TState extends JsonValue | undefined, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
|
|
362
269
|
readonly kind: "defined-polling-trigger";
|
|
363
270
|
readonly key: TKey;
|
|
364
271
|
readonly title: string;
|
|
365
272
|
readonly description?: string;
|
|
366
|
-
|
|
367
|
-
* Create the trigger config for use in workflow definitions.
|
|
368
|
-
* @param cfg - User-facing trigger configuration.
|
|
369
|
-
* @param name - Display name (defaults to `title`).
|
|
370
|
-
* @param id - Optional stable node id.
|
|
371
|
-
*/
|
|
372
|
-
create(cfg: TConfig$1, name?: string, id?: string): DefinedPollingTriggerConfig<TConfig$1, TItemJson>;
|
|
373
|
-
/**
|
|
374
|
-
* Test seam: call `poll` directly without starting the runtime.
|
|
375
|
-
* Returns `{ items, nextState }` just like the real runtime receives.
|
|
376
|
-
*/
|
|
273
|
+
create(cfg: TConfig$1, name?: string, idOrOptions?: string | NodeBaseOptions): DefinedPollingTriggerConfig<TConfig$1, TItemJson>;
|
|
377
274
|
poll(pollCtx: Omit<DefinePollingTriggerPollContext<TConfig$1, TState, TBindings>, "credentials"> & {
|
|
378
275
|
credentials?: DefinedNodeCredentialAccessors<TBindings>;
|
|
379
276
|
}): MaybePromise<DefinePollingTriggerPollResult<TItemJson, TState>>;
|
|
380
|
-
/** Registers the synthesised runtime class with the plugin container. */
|
|
381
277
|
register(context: {
|
|
382
278
|
registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
|
|
383
279
|
}): void;
|
|
384
280
|
}
|
|
385
|
-
|
|
386
|
-
* TriggerNodeConfig produced by `DefinedPollingTrigger.create(...)`.
|
|
387
|
-
* Holds user configuration and credential requirements for the engine.
|
|
388
|
-
* The setup state type is opaque `JsonValue | undefined` — the runtime
|
|
389
|
-
* uses an internal wrapped shape that plugin authors never see.
|
|
390
|
-
*/
|
|
391
|
-
declare class DefinedPollingTriggerConfig<TConfig$1 extends CredentialJsonRecord, TItemJson> implements TriggerNodeConfig<TItemJson, JsonValue | undefined> {
|
|
281
|
+
declare class DefinedPollingTriggerConfig<TConfig$1 extends CredentialJsonRecord, TItemJson> implements TriggerNodeConfig<TItemJson, JsonValue | undefined>, PollingTriggerConfig {
|
|
392
282
|
readonly name: string;
|
|
393
283
|
readonly cfg: TConfig$1;
|
|
394
284
|
private readonly credentialRequirements;
|
|
395
|
-
readonly id?: string | undefined;
|
|
396
285
|
private readonly inspectorSummaryFn?;
|
|
286
|
+
private readonly defaultPollIntervalMs?;
|
|
397
287
|
readonly kind: "trigger";
|
|
398
288
|
readonly type: TypeToken<unknown>;
|
|
399
289
|
readonly icon: string | undefined;
|
|
400
|
-
|
|
290
|
+
readonly id?: string;
|
|
291
|
+
readonly description?: string;
|
|
292
|
+
constructor(name: string, cfg: TConfig$1, typeToken: TypeToken<unknown>, icon: string | undefined, credentialRequirements: ReadonlyArray<CredentialRequirement>, idOrOptions?: string | NodeBaseOptions, inspectorSummaryFn?: ((args: Readonly<{
|
|
401
293
|
config: TConfig$1;
|
|
402
|
-
}>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined) | undefined);
|
|
294
|
+
}>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined) | undefined, defaultPollIntervalMs?: number | undefined);
|
|
403
295
|
getCredentialRequirements(): ReadonlyArray<CredentialRequirement>;
|
|
296
|
+
getTriggerPollConfig(): Readonly<{
|
|
297
|
+
config: JsonObject;
|
|
298
|
+
pollIntervalMs?: number;
|
|
299
|
+
}>;
|
|
404
300
|
inspectorSummary(): ReadonlyArray<NodeInspectorSummaryRow> | undefined;
|
|
405
301
|
}
|
|
406
|
-
/**
|
|
407
|
-
* Declarative helper for authoring polling triggers.
|
|
408
|
-
*
|
|
409
|
-
* ```ts
|
|
410
|
-
* export const onNewMail = definePollingTrigger({
|
|
411
|
-
* key: "my-plugin.on-new-mail",
|
|
412
|
-
* title: "On new mail",
|
|
413
|
-
* configSchema: z.object({ folder: z.string() }),
|
|
414
|
-
* credentials: { auth: myOAuthCredentialType },
|
|
415
|
-
* initialState: () => ({ lastSeenId: undefined }),
|
|
416
|
-
* pollIntervalMs: 60_000,
|
|
417
|
-
* async poll({ config, state, credentials }) {
|
|
418
|
-
* const session = await credentials.auth();
|
|
419
|
-
* const messages = await fetchMessages(session, config.folder, state.lastSeenId);
|
|
420
|
-
* return {
|
|
421
|
-
* items: messages.map(m => ({ json: m, dedupKey: m.id })),
|
|
422
|
-
* nextState: { lastSeenId: messages[0]?.id ?? state.lastSeenId },
|
|
423
|
-
* };
|
|
424
|
-
* },
|
|
425
|
-
* });
|
|
426
|
-
* ```
|
|
427
|
-
*/
|
|
428
302
|
declare function definePollingTrigger<TKey extends string, TConfig$1 extends CredentialJsonRecord, TItemJson, TState extends JsonValue | undefined, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(options: DefinePollingTriggerOptions<TKey, TConfig$1, TItemJson, TState, TBindings>): DefinedPollingTrigger<TKey, TConfig$1, TItemJson, TState, TBindings>;
|
|
429
303
|
//#endregion
|
|
430
304
|
//#region src/events/ConnectionInvocationEventPublisher.d.ts
|
|
431
|
-
/**
|
|
432
|
-
* Publishes per-invocation lifecycle records onto the run {@link RunEventBus}.
|
|
433
|
-
*
|
|
434
|
-
* Surgical, per-invocation events let the UI update the right-side inspector
|
|
435
|
-
* timeline as each LLM round / tool call transitions through `running` → `completed`
|
|
436
|
-
* (or `failed`) without depending on a coarse `runSaved` poll.
|
|
437
|
-
*/
|
|
438
305
|
declare class ConnectionInvocationEventPublisher {
|
|
439
306
|
private readonly eventBus;
|
|
440
307
|
private readonly parent;
|
|
@@ -478,14 +345,12 @@ declare class EventPublishingWorkflowExecutionRepository implements WorkflowExec
|
|
|
478
345
|
type DecoratedRuntimeType = Readonly<{
|
|
479
346
|
name?: string;
|
|
480
347
|
}> & object;
|
|
481
|
-
/** Categories of runtime classes that can be discovered and rehydrated from persisted snapshots. */
|
|
482
348
|
type PersistedRuntimeTypeKind = "node" | "tool" | "chatModel";
|
|
483
349
|
interface PersistedRuntimeTypeDecoratorOptions {
|
|
484
350
|
readonly name?: string;
|
|
485
351
|
readonly packageName?: string;
|
|
486
352
|
readonly moduleUrl?: string;
|
|
487
353
|
}
|
|
488
|
-
/** Serialized metadata attached to a decorated runtime type. */
|
|
489
354
|
interface PersistedRuntimeTypeMetadata {
|
|
490
355
|
readonly persistedName: string;
|
|
491
356
|
readonly kind: PersistedRuntimeTypeKind;
|
|
@@ -494,26 +359,17 @@ interface PersistedRuntimeTypeMetadata {
|
|
|
494
359
|
}
|
|
495
360
|
//#endregion
|
|
496
361
|
//#region src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.d.ts
|
|
497
|
-
/**
|
|
498
|
-
* Applies both tsyringe injectability and persisted runtime metadata in one decorator.
|
|
499
|
-
* This keeps runtime-type decorators thin while still recording enough data for snapshot hydration.
|
|
500
|
-
*/
|
|
501
362
|
declare class InjectableRuntimeDecoratorComposer {
|
|
502
363
|
static compose(kind: PersistedRuntimeTypeKind, options: PersistedRuntimeTypeDecoratorOptions, decoratorFileUrl: string): ClassDecorator;
|
|
503
364
|
}
|
|
504
365
|
//#endregion
|
|
505
366
|
//#region src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.d.ts
|
|
506
|
-
/**
|
|
507
|
-
* Defines and retrieves persisted runtime metadata on decorated classes.
|
|
508
|
-
* The metadata is attached as a non-enumerable property so runtime objects stay serializable.
|
|
509
|
-
*/
|
|
510
367
|
declare class PersistedRuntimeTypeMetadataStore {
|
|
511
368
|
static define(target: DecoratedRuntimeType, kind: PersistedRuntimeTypeKind, options: PersistedRuntimeTypeDecoratorOptions, decoratorFileUrl: string): void;
|
|
512
369
|
static get(target: unknown): PersistedRuntimeTypeMetadata | undefined;
|
|
513
370
|
}
|
|
514
371
|
//#endregion
|
|
515
372
|
//#region src/runtime-types/PersistedRuntimeTypeNameResolver.d.ts
|
|
516
|
-
/** Resolves the persisted type name from either an explicit override or the class name itself. */
|
|
517
373
|
declare class PersistedRuntimeTypeNameResolver {
|
|
518
374
|
static resolve(target: DecoratedRuntimeType, override: string | undefined): string;
|
|
519
375
|
}
|
|
@@ -525,13 +381,9 @@ declare class StackTraceCallSitePathResolver {
|
|
|
525
381
|
}
|
|
526
382
|
//#endregion
|
|
527
383
|
//#region src/runtime-types/runtimeTypeDecorators.types.d.ts
|
|
528
|
-
/** Reads persisted runtime metadata from a decorated class or object. */
|
|
529
384
|
declare function getPersistedRuntimeTypeMetadata(target: unknown): PersistedRuntimeTypeMetadata | undefined;
|
|
530
|
-
/** Marks a class as a persisted node runtime type and an injectable tsyringe service. */
|
|
531
385
|
declare function node(options?: PersistedRuntimeTypeDecoratorOptions): ClassDecorator;
|
|
532
|
-
/** Marks a class as a persisted tool runtime type and an injectable tsyringe service. */
|
|
533
386
|
declare function tool(options?: PersistedRuntimeTypeDecoratorOptions): ClassDecorator;
|
|
534
|
-
/** Marks a class as a persisted chat-model runtime type and an injectable tsyringe service. */
|
|
535
387
|
declare function chatModel(options?: PersistedRuntimeTypeDecoratorOptions): ClassDecorator;
|
|
536
388
|
//#endregion
|
|
537
389
|
//#region src/binaries/UnavailableBinaryStorage.d.ts
|
|
@@ -565,19 +417,6 @@ declare class DefaultExecutionBinaryService implements ExecutionBinaryService {
|
|
|
565
417
|
}
|
|
566
418
|
//#endregion
|
|
567
419
|
//#region src/execution/ChildExecutionScopeFactory.d.ts
|
|
568
|
-
/**
|
|
569
|
-
* Builds a re-rooted child execution context for sub-agent (and other deeply-nested) invocations.
|
|
570
|
-
*
|
|
571
|
-
* At the orchestrator's `agent.tool.call` boundary the inner runtime needs a ctx whose:
|
|
572
|
-
* - `nodeId` is the tool's connection node id (so inner LLM/tool connection ids derive correctly),
|
|
573
|
-
* - `activationId` is fresh (so its connection-invocation rows are uniquely identifiable),
|
|
574
|
-
* - `telemetry` parents children under the tool-call span (not the orchestrator's node span),
|
|
575
|
-
* - `binary` is scoped to the new (nodeId, activationId),
|
|
576
|
-
* - `parentInvocationId` points back to the tool-call invocation for downstream lineage.
|
|
577
|
-
*
|
|
578
|
-
* Registered via factory in {@link EngineRuntimeRegistrar} so constructors stay free of parameter
|
|
579
|
-
* decorators (Next/SWC and coverage tooling cannot parse them on in-repo sources).
|
|
580
|
-
*/
|
|
581
420
|
declare class ChildExecutionScopeFactory {
|
|
582
421
|
private readonly activationIdFactory;
|
|
583
422
|
constructor(activationIdFactory: ActivationIdFactory);
|
|
@@ -649,9 +488,6 @@ declare class InProcessRetryRunner {
|
|
|
649
488
|
}
|
|
650
489
|
//#endregion
|
|
651
490
|
//#region src/execution/ItemExprResolver.d.ts
|
|
652
|
-
/**
|
|
653
|
-
* Resolves {@link import("../contracts/itemExpr").ItemExpr} leaves on runnable config before {@link RunnableNode.execute}.
|
|
654
|
-
*/
|
|
655
491
|
declare class ItemExprResolver {
|
|
656
492
|
resolveConfigForItem<TConfig$1 extends RunnableNodeConfig<any, any>>(ctx: NodeExecutionContext<TConfig$1>, item: Item, itemIndex: number, items: ReadonlyArray<Item>): Promise<NodeExecutionContext<TConfig$1>>;
|
|
657
493
|
}
|
|
@@ -659,10 +495,12 @@ declare class ItemExprResolver {
|
|
|
659
495
|
//#region src/execution/RunnableOutputBehaviorResolver.d.ts
|
|
660
496
|
type RunnableOutputBehavior = Readonly<{
|
|
661
497
|
keepBinaries: boolean;
|
|
498
|
+
mergeJson: boolean;
|
|
662
499
|
}>;
|
|
663
500
|
declare class RunnableOutputBehaviorResolver {
|
|
664
501
|
resolve(config: RunnableNodeConfig): RunnableOutputBehavior;
|
|
665
502
|
private isKeepBinariesEnabled;
|
|
503
|
+
private isMergeJsonEnabled;
|
|
666
504
|
}
|
|
667
505
|
//#endregion
|
|
668
506
|
//#region src/execution/NodeOutputNormalizer.d.ts
|
|
@@ -676,39 +514,18 @@ declare class NodeOutputNormalizer {
|
|
|
676
514
|
private emitPortsToOutputs;
|
|
677
515
|
private normalizePortPayload;
|
|
678
516
|
private isItemLike;
|
|
517
|
+
private isPlainJsonObject;
|
|
679
518
|
private applyOutput;
|
|
680
519
|
}
|
|
681
520
|
//#endregion
|
|
682
521
|
//#region src/execution/NodeSuspensionHandler.d.ts
|
|
683
|
-
/**
|
|
684
|
-
* Handles per-item `SuspensionRequest` catches in the engine's item execution loop.
|
|
685
|
-
*
|
|
686
|
-
* Responsibilities:
|
|
687
|
-
* 1. Generate a `taskId` (UUID v4).
|
|
688
|
-
* 2. Persist a `HumanTask` row via `HumanTaskStore.create`.
|
|
689
|
-
* 3. Sign a resume URL via `HitlResumeTokenSigner.sign`.
|
|
690
|
-
* 4. Enqueue a delayed BullMQ timeout job via `HitlTimeoutJobScheduler.enqueue`.
|
|
691
|
-
* 5. Build a `HumanTaskHandle` and call `deliver`.
|
|
692
|
-
* 6. Append a `PersistedSuspensionEntry` to the run state and flip status to `"suspended"`.
|
|
693
|
-
* 7. Persist via `WorkflowExecutionRepository.save`.
|
|
694
|
-
* 8. Throw `RunSuspendedError` so the caller can exit cleanly.
|
|
695
|
-
*
|
|
696
|
-
* If `deliver` throws, the error propagates up to `NodeExecutionRequestHandlerService`
|
|
697
|
-
* which routes it through `resumeFromNodeError` → run status becomes `"failed"`.
|
|
698
|
-
*
|
|
699
|
-
* `humanTaskStore`, `tokenSigner`, and `timeoutScheduler` are optional —
|
|
700
|
-
* when not registered (e.g. in unit tests), the handler still suspends the run but
|
|
701
|
-
* skips persistence, token signing, and job scheduling.
|
|
702
|
-
*/
|
|
703
522
|
declare class NodeSuspensionHandler {
|
|
704
523
|
private readonly workflowExecutionRepository;
|
|
705
524
|
private readonly humanTaskStore?;
|
|
706
525
|
private readonly tokenSigner?;
|
|
707
526
|
private readonly timeoutScheduler?;
|
|
708
|
-
/** Workspace ID to stamp on HumanTaskRecord in managed mode (T7 security fix). Null in non-managed mode. */
|
|
709
527
|
private readonly workspaceId?;
|
|
710
|
-
constructor(workflowExecutionRepository: WorkflowExecutionRepository, humanTaskStore?: HumanTaskStore | undefined, tokenSigner?: HitlResumeTokenSignerSeam | undefined, timeoutScheduler?: HitlTimeoutJobSchedulerSeam | undefined,
|
|
711
|
-
workspaceId?: string | undefined);
|
|
528
|
+
constructor(workflowExecutionRepository: WorkflowExecutionRepository, humanTaskStore?: HumanTaskStore | undefined, tokenSigner?: HitlResumeTokenSignerSeam | undefined, timeoutScheduler?: HitlTimeoutJobSchedulerSeam | undefined, workspaceId?: string | undefined);
|
|
712
529
|
handle(args: {
|
|
713
530
|
runId: RunId;
|
|
714
531
|
nodeId: NodeId;
|
|
@@ -716,14 +533,8 @@ declare class NodeSuspensionHandler {
|
|
|
716
533
|
itemIndex: number;
|
|
717
534
|
suspensionRequest: SuspensionRequest;
|
|
718
535
|
state: PersistedRunState;
|
|
719
|
-
/** Telemetry scope of the node's per-item span. Used to emit `hitl.task.*` span events. */
|
|
720
536
|
telemetry?: TelemetryScope;
|
|
721
537
|
}): Promise<never>;
|
|
722
|
-
/**
|
|
723
|
-
* Parse a duration string into milliseconds.
|
|
724
|
-
* Accepts ISO 8601 durations ("PT24H", "PT30M") and shorthand ("24h", "30m", "1d").
|
|
725
|
-
* Throws for unrecognised formats.
|
|
726
|
-
*/
|
|
727
538
|
private parseDurationMs;
|
|
728
539
|
private hashSchema;
|
|
729
540
|
private schemaToJson;
|
|
@@ -733,17 +544,13 @@ declare class NodeSuspensionHandler {
|
|
|
733
544
|
declare class NodeExecutor {
|
|
734
545
|
private readonly nodeInstanceFactory;
|
|
735
546
|
private readonly retryRunner;
|
|
736
|
-
/** Required for HITL suspension support. When omitted, `SuspensionRequest` throws upward. */
|
|
737
547
|
private readonly suspensionHandler?;
|
|
738
|
-
/** Required alongside `suspensionHandler`. */
|
|
739
548
|
private readonly loadRunState?;
|
|
740
549
|
private readonly fanInMerger;
|
|
741
550
|
private readonly outputNormalizer;
|
|
742
551
|
private readonly itemExprResolver;
|
|
743
552
|
private readonly outputBehaviorResolver;
|
|
744
|
-
constructor(nodeInstanceFactory: WorkflowNodeInstanceFactory, retryRunner: InProcessRetryRunner, itemExprResolver?: ItemExprResolver, outputBehaviorResolver?: RunnableOutputBehaviorResolver,
|
|
745
|
-
suspensionHandler?: NodeSuspensionHandler | undefined, /** Required alongside `suspensionHandler`. */
|
|
746
|
-
loadRunState?: ((runId: RunId) => Promise<PersistedRunState | undefined>) | undefined);
|
|
553
|
+
constructor(nodeInstanceFactory: WorkflowNodeInstanceFactory, retryRunner: InProcessRetryRunner, itemExprResolver?: ItemExprResolver, outputBehaviorResolver?: RunnableOutputBehaviorResolver, suspensionHandler?: NodeSuspensionHandler | undefined, loadRunState?: ((runId: RunId) => Promise<PersistedRunState | undefined>) | undefined);
|
|
747
554
|
execute(request: NodeActivationRequest): Promise<NodeOutputs>;
|
|
748
555
|
private assertRequiredCredentialsBound;
|
|
749
556
|
private isCredentialError;
|
|
@@ -754,7 +561,6 @@ declare class NodeExecutor {
|
|
|
754
561
|
private hasExecuteMulti;
|
|
755
562
|
private asMultiFromSingleActivation;
|
|
756
563
|
private executeRunnableActivation;
|
|
757
|
-
/** Use resolver ctx only when {@link NodeExecutionContext.config} is non-nullish. */
|
|
758
564
|
private pickExecutionContext;
|
|
759
565
|
private resolveInputSchema;
|
|
760
566
|
private assertItemJsonNotTopLevelArray;
|
|
@@ -801,14 +607,6 @@ declare class InlineDrivingScheduler implements NodeActivationScheduler {
|
|
|
801
607
|
private readonly activeDrainPromises;
|
|
802
608
|
constructor(nodeExecutor: NodeExecutor);
|
|
803
609
|
setContinuation(continuation: NodeActivationContinuation): void;
|
|
804
|
-
/**
|
|
805
|
-
* Prevents new drain cycles from being scheduled and waits for all currently-running
|
|
806
|
-
* drains to complete. Call before closing the DB connection or rolling back test transactions
|
|
807
|
-
* to ensure no in-flight writes hit a closed/rolled-back connection.
|
|
808
|
-
*
|
|
809
|
-
* Bounded: only the drains already in-flight at call time are awaited. Runs that keep
|
|
810
|
-
* re-scheduling will not schedule new work once stopped is set.
|
|
811
|
-
*/
|
|
812
610
|
stop(): Promise<void>;
|
|
813
611
|
prepareDispatch(request: NodeActivationRequest): Promise<PreparedNodeActivationDispatch>;
|
|
814
612
|
private drainRun;
|
|
@@ -828,12 +626,6 @@ declare class DefaultDrivingScheduler implements NodeActivationScheduler {
|
|
|
828
626
|
constructor(offloadPolicy: NodeOffloadPolicy, workerScheduler: NodeExecutionScheduler, inline: InlineDrivingScheduler);
|
|
829
627
|
setContinuation(continuation: NodeActivationContinuation): void;
|
|
830
628
|
prepareDispatch(request: NodeActivationRequest): Promise<PreparedNodeActivationDispatch>;
|
|
831
|
-
/**
|
|
832
|
-
* Scheduler precedence is explicit:
|
|
833
|
-
* 1. run-intent override (`executionOptions.localOnly`)
|
|
834
|
-
* 2. node-level execution hint / queue policy
|
|
835
|
-
* 3. container-default scheduler policy fallback
|
|
836
|
-
*/
|
|
837
629
|
private selectScheduler;
|
|
838
630
|
private hasNodeSchedulingPreference;
|
|
839
631
|
private prepareInlineDispatch;
|
|
@@ -906,7 +698,6 @@ declare class InMemoryWorkflowExecutionRepository implements WorkflowExecutionRe
|
|
|
906
698
|
}
|
|
907
699
|
//#endregion
|
|
908
700
|
//#region src/runStorage/RunSummaryMapper.d.ts
|
|
909
|
-
/** Maps persisted run state to API run summaries for listings. */
|
|
910
701
|
declare class RunSummaryMapper {
|
|
911
702
|
static fromPersistedState(state: PersistedRunState): RunSummary;
|
|
912
703
|
}
|
|
@@ -917,30 +708,16 @@ declare class MissingRuntimeFallbacks {
|
|
|
917
708
|
}
|
|
918
709
|
//#endregion
|
|
919
710
|
//#region src/runtime/EngineFactory.d.ts
|
|
920
|
-
/**
|
|
921
|
-
* {@link EngineDeps} plus optional overrides for workflow-snapshot materialization.
|
|
922
|
-
* Overrides keep default construction in this factory while allowing tests or advanced wiring to inject instances.
|
|
923
|
-
*/
|
|
924
711
|
type EngineCompositionDeps = EngineDeps & {
|
|
925
712
|
workflowSnapshotCodec?: WorkflowSnapshotCodec;
|
|
926
713
|
missingRuntimeFallbacks?: MissingRuntimeFallbacks;
|
|
927
|
-
/** When set, used for run-start, trigger, and continuation limit defaults. */
|
|
928
714
|
executionLimitsPolicy?: EngineExecutionLimitsPolicy;
|
|
929
715
|
};
|
|
930
|
-
/**
|
|
931
|
-
* Composes the {@link Engine} graph from {@link EngineCompositionDeps}. Production wiring usually goes through
|
|
932
|
-
* {@link import("../bootstrap/runtime/EngineRuntimeRegistrar").EngineRuntimeRegistrar}; this factory remains for tests and custom composition.
|
|
933
|
-
* Exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
934
|
-
*/
|
|
935
716
|
declare class EngineFactory {
|
|
936
717
|
create(deps: EngineCompositionDeps): Engine;
|
|
937
718
|
}
|
|
938
719
|
//#endregion
|
|
939
720
|
//#region src/runtime/WorkflowRepositoryWebhookTriggerMatcher.d.ts
|
|
940
|
-
/**
|
|
941
|
-
* Resolves webhook HTTP routes from the live workflow repository (no trigger setup / registration).
|
|
942
|
-
* Maintains an in-memory index keyed by user-defined endpoint path for O(1) lookups after reload.
|
|
943
|
-
*/
|
|
944
721
|
declare class WorkflowRepositoryWebhookTriggerMatcher implements WebhookTriggerMatcher {
|
|
945
722
|
private readonly workflowRepository;
|
|
946
723
|
private readonly workflowActivationPolicy;
|
|
@@ -978,11 +755,6 @@ interface PollingTriggerStartArgs<TState, TItem> {
|
|
|
978
755
|
runCycle: (cycleCtx: PollingRunCycleArgs<TState>) => Promise<PollingRunCycleResult<TState, TItem>>;
|
|
979
756
|
emit: (items: Items) => Promise<void>;
|
|
980
757
|
}
|
|
981
|
-
/**
|
|
982
|
-
* Generic polling-trigger runtime. Owns the set-interval loop, overlap guard, and persistence.
|
|
983
|
-
* Constructed by {@link import("../../runtime/EngineFactory").EngineFactory} and exposed to plugin
|
|
984
|
-
* authors via {@link import("../../contracts/runtimeTypes").TriggerSetupContext}.polling.
|
|
985
|
-
*/
|
|
986
758
|
declare class PollingTriggerRuntime {
|
|
987
759
|
private readonly triggerSetupStateRepository;
|
|
988
760
|
private readonly logger;
|
|
@@ -1020,23 +792,10 @@ declare class WorkflowEdgePortValidator {
|
|
|
1020
792
|
nodes: ReadonlyArray<NodeDefinition>;
|
|
1021
793
|
edges: ReadonlyArray<Edge>;
|
|
1022
794
|
}): WorkflowEdgePortValidationResult;
|
|
1023
|
-
/**
|
|
1024
|
-
* Returns the declared output ports for a node, or null if the node is
|
|
1025
|
-
* unknown / has no declared ports (legacy nodes — treat as unconstrained).
|
|
1026
|
-
*/
|
|
1027
795
|
private allowedOutputPorts;
|
|
1028
796
|
}
|
|
1029
797
|
//#endregion
|
|
1030
798
|
//#region src/credentials/OAuthFlowExecutor.types.d.ts
|
|
1031
|
-
/**
|
|
1032
|
-
* Four-concept model for credentials (see docs/design/credentials-oauth-unification.md):
|
|
1033
|
-
* 1. CredentialType — schema for stored material (e.g. "oauth.google.gmail").
|
|
1034
|
-
* 2. Credential slot requirement — which types a node or MCP server accepts.
|
|
1035
|
-
* 3. CredentialInstance — a stored, usable token row in the host's credential store.
|
|
1036
|
-
* 4. OAuthFlowExecutor (this file) — the only concept that differs between deployment
|
|
1037
|
-
* modes. DI selects one implementation at boot; the rest of the system programs
|
|
1038
|
-
* against this interface alone.
|
|
1039
|
-
*/
|
|
1040
799
|
interface OAuthFlowStartArgs {
|
|
1041
800
|
readonly typeId: string;
|
|
1042
801
|
readonly scopes: ReadonlyArray<string>;
|
|
@@ -1059,11 +818,6 @@ interface OAuthMaterial {
|
|
|
1059
818
|
}
|
|
1060
819
|
interface OAuthFlowExecutor {
|
|
1061
820
|
start(args: OAuthFlowStartArgs): Promise<OAuthFlowStartResult>;
|
|
1062
|
-
/**
|
|
1063
|
-
* Returns the instanceId associated with a pending stateToken without consuming it.
|
|
1064
|
-
* Used by callback routes to identify the target instance before calling completeCallback.
|
|
1065
|
-
* Returns undefined when the stateToken is unknown or already consumed.
|
|
1066
|
-
*/
|
|
1067
821
|
lookupInstanceId(stateToken: string): string | undefined;
|
|
1068
822
|
completeCallback(args: OAuthFlowCallbackArgs): Promise<OAuthMaterial>;
|
|
1069
823
|
refresh(args: {
|
|
@@ -1074,33 +828,11 @@ interface OAuthFlowExecutor {
|
|
|
1074
828
|
}
|
|
1075
829
|
//#endregion
|
|
1076
830
|
//#region src/credentials/CredentialMaterialProvider.types.d.ts
|
|
1077
|
-
/**
|
|
1078
|
-
* Material provider seam — see `docs/design/credentials-oauth-unification.md`,
|
|
1079
|
-
* "Material provider seam" section. Sits beside the workspace's
|
|
1080
|
-
* `CredentialStore`; persistence of the row stays at the store, persistence of
|
|
1081
|
-
* the bytes goes through this provider so they can live at the control plane
|
|
1082
|
-
* in managed mode.
|
|
1083
|
-
*/
|
|
1084
|
-
/**
|
|
1085
|
-
* Pointer to material bytes. For local rows `ref` is the workspace instance id
|
|
1086
|
-
* and the bytes co-locate with the row (existing `CredentialOAuth2Material` /
|
|
1087
|
-
* `CredentialSecretMaterial` tables). For control-plane rows `ref` is the
|
|
1088
|
-
* CP-side credential id; the workspace stores only the pointer.
|
|
1089
|
-
*/
|
|
1090
831
|
type CredentialMaterialRef = Readonly<{
|
|
1091
832
|
source: "local" | "control-plane";
|
|
1092
833
|
id: string;
|
|
1093
834
|
}>;
|
|
1094
|
-
/**
|
|
1095
|
-
* Decrypted material bytes returned by a provider. Shape matches
|
|
1096
|
-
* `OAuthMaterial` — every supported credential type today is OAuth-shaped.
|
|
1097
|
-
*/
|
|
1098
835
|
type MaterialBundle = OAuthMaterial;
|
|
1099
|
-
/**
|
|
1100
|
-
* Caller context recorded by the CP material endpoint per fetch (D5 in the
|
|
1101
|
-
* `credentials-vault` sprint README). The local provider accepts but ignores
|
|
1102
|
-
* it; standalone mode has no audit log.
|
|
1103
|
-
*/
|
|
1104
836
|
type CallerContext = Readonly<{
|
|
1105
837
|
workspaceId: string;
|
|
1106
838
|
caller: Readonly<{
|
|
@@ -1123,11 +855,6 @@ interface CredentialMaterialProvider {
|
|
|
1123
855
|
getMaterial(ref: CredentialMaterialRef, context: CallerContext): Promise<MaterialBundle>;
|
|
1124
856
|
setMaterial(ref: CredentialMaterialRef, material: MaterialBundle): Promise<void>;
|
|
1125
857
|
}
|
|
1126
|
-
/**
|
|
1127
|
-
* Thrown by a provider when asked to operate on a `ref.source` it does not
|
|
1128
|
-
* handle (e.g. the local provider being asked to read `control-plane` bytes).
|
|
1129
|
-
* Exported so `instanceof`-checks work across the workspace boundary.
|
|
1130
|
-
*/
|
|
1131
858
|
declare class IllegalMaterialSourceError extends Error {
|
|
1132
859
|
readonly source: CredentialMaterialRef["source"];
|
|
1133
860
|
readonly providerName: string;
|
|
@@ -1135,23 +862,11 @@ declare class IllegalMaterialSourceError extends Error {
|
|
|
1135
862
|
}
|
|
1136
863
|
//#endregion
|
|
1137
864
|
//#region src/credentials/ManagedCredentialMaterialWriteError.d.ts
|
|
1138
|
-
/**
|
|
1139
|
-
* Thrown by managed-mode providers when `setMaterial` is called. Managed
|
|
1140
|
-
* credential bytes are owned by the control plane; the workspace must not
|
|
1141
|
-
* mutate them. See `docs/design/credentials-oauth-unification.md` and
|
|
1142
|
-
* `planning/sprints/credentials-vault/02-controlplane-material-provider.md`.
|
|
1143
|
-
*/
|
|
1144
865
|
declare class ManagedCredentialMaterialWriteError extends Error {
|
|
1145
866
|
constructor(message?: string);
|
|
1146
867
|
}
|
|
1147
868
|
//#endregion
|
|
1148
869
|
//#region src/credentials/ManagedMaterialFetchError.d.ts
|
|
1149
|
-
/**
|
|
1150
|
-
* Thrown by `ControlPlaneCredentialMaterialProvider` when the control-plane
|
|
1151
|
-
* material endpoint returns a non-2xx response or a malformed body. Exposes
|
|
1152
|
-
* the HTTP status and the raw error body so call sites can surface actionable
|
|
1153
|
-
* detail without parsing strings.
|
|
1154
|
-
*/
|
|
1155
870
|
declare class ManagedMaterialFetchError extends Error {
|
|
1156
871
|
readonly status: number;
|
|
1157
872
|
readonly providerErrorBody: string;
|
|
@@ -1159,82 +874,44 @@ declare class ManagedMaterialFetchError extends Error {
|
|
|
1159
874
|
}
|
|
1160
875
|
//#endregion
|
|
1161
876
|
//#region src/contracts/workspaceFileTypes.d.ts
|
|
1162
|
-
/**
|
|
1163
|
-
* Metadata returned for a workspace file object.
|
|
1164
|
-
* Filename and contentType come from the S3 object's custom metadata
|
|
1165
|
-
* (stamped by the control plane at upload time — story 03).
|
|
1166
|
-
* The local-fs driver reads them from a companion .meta.json sidecar.
|
|
1167
|
-
*/
|
|
1168
877
|
interface WorkspaceFileMetadata {
|
|
1169
|
-
/** Storage key: `<workspaceId>/files/<fileId>` */
|
|
1170
878
|
readonly key: string;
|
|
1171
|
-
/** Last path segment of the storage key. */
|
|
1172
879
|
readonly fileId: string;
|
|
1173
|
-
/** Original filename as stamped by the CP at upload time. Empty string if not yet stamped (pre-story-03). */
|
|
1174
880
|
readonly filename: string;
|
|
1175
881
|
readonly contentType: string;
|
|
1176
882
|
readonly size: number;
|
|
1177
883
|
readonly lastModified: Date;
|
|
1178
884
|
}
|
|
1179
|
-
/**
|
|
1180
|
-
* Read-only, workspace-scoped port for accessing the shared workspace file pool.
|
|
1181
|
-
* Implemented in `@codemation/host`; nodes reach it via `ctx.resolve(WorkspaceFileStorageToken)`.
|
|
1182
|
-
*
|
|
1183
|
-
* Key scheme: `<workspaceId>/files/<fileId>` — but nodes never construct raw keys.
|
|
1184
|
-
* Use the workspace-level helpers (`listFiles`, `getFileByName`, `getFileById`) instead.
|
|
1185
|
-
*
|
|
1186
|
-
* This adapter is SEPARATE from the run-scoped BinaryStorage — do not confuse the two.
|
|
1187
|
-
*/
|
|
1188
885
|
interface IWorkspaceFileStorage {
|
|
1189
|
-
/**
|
|
1190
|
-
* Lists all files in this workspace, sorted newest-first by lastModified.
|
|
1191
|
-
* Optional case-insensitive substring filter on filename.
|
|
1192
|
-
*/
|
|
1193
886
|
listFiles(filenameFilter?: string): Promise<ReadonlyArray<WorkspaceFileMetadata>>;
|
|
1194
|
-
/**
|
|
1195
|
-
* Returns metadata for the newest file with the given filename in this workspace.
|
|
1196
|
-
* @throws WorkspaceFileNotFoundError when no file with that name exists.
|
|
1197
|
-
*/
|
|
1198
887
|
getFileByName(filename: string): Promise<WorkspaceFileMetadata>;
|
|
1199
|
-
/**
|
|
1200
|
-
* Returns metadata for the file with the given fileId in this workspace.
|
|
1201
|
-
* @throws WorkspaceFileNotFoundError when no file with that id exists.
|
|
1202
|
-
*/
|
|
1203
888
|
getFileById(fileId: string): Promise<WorkspaceFileMetadata>;
|
|
1204
|
-
/**
|
|
1205
|
-
* Returns a non-buffered stream of the stored object's bytes.
|
|
1206
|
-
* Accepts a full storage key or a fileId (prefixes as needed).
|
|
1207
|
-
* @throws WorkspaceFileNotFoundError when the key does not exist.
|
|
1208
|
-
*/
|
|
1209
889
|
getStream(key: string): Promise<ReadableStream<Uint8Array>>;
|
|
890
|
+
writeFile(filename: string, body: Uint8Array, contentType: string): Promise<WorkspaceFileMetadata>;
|
|
1210
891
|
}
|
|
1211
|
-
/**
|
|
1212
|
-
* Error thrown when a requested workspace file key does not exist.
|
|
1213
|
-
*/
|
|
1214
892
|
declare class WorkspaceFileNotFoundError extends Error {
|
|
1215
893
|
readonly key: string;
|
|
1216
894
|
constructor(key: string);
|
|
1217
895
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
*/
|
|
896
|
+
interface IWorkspaceFileRegistrar {
|
|
897
|
+
register(meta: WorkspaceFileMetadata): Promise<void>;
|
|
898
|
+
}
|
|
1222
899
|
declare const WorkspaceFileStorageToken: TypeToken<IWorkspaceFileStorage | undefined>;
|
|
900
|
+
declare const WorkspaceFileRegistrarToken: TypeToken<IWorkspaceFileRegistrar | undefined>;
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region src/workflowSnapshots/MissingRuntimeParityGuard.d.ts
|
|
903
|
+
declare class MissingRuntimeParityGuard {
|
|
904
|
+
private readonly marker;
|
|
905
|
+
constructor(marker: MissingRuntimeExecutionMarker);
|
|
906
|
+
assertNone(workflow: WorkflowDefinition, nodeIds?: ReadonlyArray<NodeId>): void;
|
|
907
|
+
}
|
|
1223
908
|
//#endregion
|
|
1224
909
|
//#region src/orchestration/TestSuiteRunIdFactory.d.ts
|
|
1225
|
-
/**
|
|
1226
|
-
* Mints unique TestSuiteRun identifiers. Separated from {@link import("../types").RunIdFactory}
|
|
1227
|
-
* so suite ids and per-case workflow run ids never alias.
|
|
1228
|
-
*/
|
|
1229
910
|
declare class TestSuiteRunIdFactory {
|
|
1230
911
|
makeTestSuiteRunId(): TestSuiteRunId;
|
|
1231
912
|
}
|
|
1232
913
|
//#endregion
|
|
1233
914
|
//#region src/orchestration/TestSuiteOrchestrator.d.ts
|
|
1234
|
-
/**
|
|
1235
|
-
* Engine-facade subset the orchestrator needs. Kept narrow on purpose so unit tests can
|
|
1236
|
-
* substitute a fake without depending on the full Engine wiring.
|
|
1237
|
-
*/
|
|
1238
915
|
interface TestSuiteOrchestratorEngine {
|
|
1239
916
|
runWorkflow(wf: WorkflowDefinition, startAt: NodeId, items: Items, parent?: ParentExecutionRef, executionOptions?: RunExecutionOptions): Promise<RunResult>;
|
|
1240
917
|
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
@@ -1263,15 +940,6 @@ interface RunTestSuiteArgs {
|
|
|
1263
940
|
readonly concurrency?: number;
|
|
1264
941
|
readonly signal?: AbortSignal;
|
|
1265
942
|
}
|
|
1266
|
-
/**
|
|
1267
|
-
* Drives a {@link TestTriggerNodeConfig.generateItems} iterable into one workflow run per item,
|
|
1268
|
-
* with bounded concurrency. Pure engine logic — no persistence, no HTTP, no UI. Hosts adapt by
|
|
1269
|
-
* subscribing to {@link RunEventBus} and writing rows on `testSuite*` / `testCase*` / `nodeCompleted`.
|
|
1270
|
-
*
|
|
1271
|
-
* Cancellation: the supplied `AbortSignal` aborts the source iterable (so credentialed pulls bail)
|
|
1272
|
-
* and stops scheduling further cases. In-flight cases are awaited; engine-level cancellation of
|
|
1273
|
-
* an already-dispatched run is not yet wired (Phase 2).
|
|
1274
|
-
*/
|
|
1275
943
|
declare class TestSuiteOrchestrator {
|
|
1276
944
|
private readonly engine;
|
|
1277
945
|
private readonly testSuiteRunIdFactory;
|
|
@@ -1284,10 +952,9 @@ declare class TestSuiteOrchestrator {
|
|
|
1284
952
|
private runOneCase;
|
|
1285
953
|
private deriveSuiteStatus;
|
|
1286
954
|
private now;
|
|
1287
|
-
/** Defensive label resolver — author-supplied callbacks throw / return non-strings; we tolerate both. */
|
|
1288
955
|
private resolveCaseLabel;
|
|
1289
956
|
private publish;
|
|
1290
957
|
}
|
|
1291
958
|
//#endregion
|
|
1292
|
-
export {
|
|
1293
|
-
//# sourceMappingURL=index-
|
|
959
|
+
export { DefaultExecutionContextFactory as $, HitlWorkspaceIdToken as $t, PollingRunCycleResult as A, CollectionFieldDefinition as At, LocalOnlyScheduler as B, ControlPlaneInboxChannelToken as Bt, OAuthFlowStartArgs as C, DefinePollingTriggerTestItemsContext as Ct, WorkflowEdgePortError as D, DefinedCollectionRegistry as Dt, WorkflowEdgePortValidator as E, definePollingTrigger as Et, EngineFactory as F, defineCollection as Ft, StaticCostCatalog as G, InboxDelivery as Gt, DefaultDrivingScheduler as H, InboxChannelResolverSeam as Ht, RunSummaryMapper as I, callableTool as It, NodeOutputNormalizer as J, LocalInboxChannelToken as Jt, NodeInstanceFactory as K, InboxOnDecisionArgs as Kt, InMemoryWorkflowExecutionRepository as L, DefineCredentialOptions as Lt, PollingTriggerStartArgs as M, DefineCollectionOptions as Mt, WorkflowRepositoryWebhookTriggerMatcher as N, DefinedCollection as Nt, WorkflowEdgePortValidationResult as O, CollectionColumnBuilder as Ot, EngineCompositionDeps as P, c as Pt, CatalogBackedCostTrackingTelemetryFactory as Q, HitlTimeoutJobSchedulerToken as Qt, InMemoryRunDataFactory as R, defineCredential as Rt, OAuthFlowExecutor as S, DefinePollingTriggerPollResult as St, OAuthMaterial as T, DefinedPollingTriggerConfig as Tt, InlineDrivingScheduler as U, InboxChannelResolverToken as Ut, HintOnlyOffloadPolicy as V, InboxChannel as Vt, ConfigDrivenOffloadPolicy as W, InboxDeliverArgs as Wt, ItemExprResolver as X, HitlResumeTokenSignerToken as Xt, RunnableOutputBehaviorResolver as Y, HitlResumeTokenSignerSeam as Yt, InProcessRetryRunner as Z, HitlTimeoutJobSchedulerSeam as Zt, CredentialMaterialProvider as _, InMemoryRunEventBus as _t, TestSuiteRunResult as a, SystemClock as an, chatModel as at, MaterialBundle as b, DefinePollingTriggerOptions as bt, IWorkspaceFileRegistrar as c, AbortControllerFactory as cn, tool as ct, WorkspaceFileNotFoundError as d, PersistedRuntimeTypeMetadataStore as dt, HumanTaskRecord as en, DefaultAsyncSleeper as et, WorkspaceFileRegistrarToken as f, InjectableRuntimeDecoratorComposer as ft, CallerContext as g, EventPublishingWorkflowExecutionRepository as gt, ManagedCredentialMaterialWriteError as h, PersistedRuntimeTypeMetadata as ht, TestSuiteOrchestratorEngine as i, Clock as in, UnavailableBinaryStorage as it, PollingTriggerRuntime as j, CollectionIndexDefinition as jt, PollingRunCycleArgs as k, CollectionDefinition as kt, IWorkspaceFileStorage as l, StackTraceCallSitePathResolver as lt, ManagedMaterialFetchError as m, PersistedRuntimeTypeKind as mt, TestSuiteCaseOutcome as n, HumanTaskStore as nn, ChildExecutionScopeFactory as nt, TestSuiteRunIdFactory as o, NodeEventPublisher as on, getPersistedRuntimeTypeMetadata as ot, WorkspaceFileStorageToken as p, PersistedRuntimeTypeDecoratorOptions as pt, NodeExecutor as q, InboxOnTimeoutArgs as qt, TestSuiteOrchestrator as r, HumanTaskStoreToken as rn, DefaultExecutionBinaryService as rt, MissingRuntimeParityGuard as s, CredentialResolverFactory as sn, node as st, RunTestSuiteArgs as t, HumanTaskStatus as tn, AsyncSleeper as tt, WorkspaceFileMetadata as u, PersistedRuntimeTypeNameResolver as ut, CredentialMaterialRef as v, ConnectionInvocationEventPublisher as vt, OAuthFlowStartResult as w, DefinedPollingTrigger as wt, OAuthFlowCallbackArgs as x, DefinePollingTriggerPollContext as xt, IllegalMaterialSourceError as y, DefinePollingTriggerExecuteContext as yt, InMemoryBinaryStorage as z, DefinedNodeRegistry as zt };
|
|
960
|
+
//# sourceMappingURL=index-mnLS0iQl.d.ts.map
|