@codemation/core 0.11.1 → 0.12.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 +6 -0
- package/dist/{CostCatalogContract-DZgcUBE4.d.cts → CostCatalogContract-DD7fQ4FF.d.cts} +2 -2
- package/dist/{EngineRuntimeRegistration.types-Cggm5GVY.d.cts → EngineRuntimeRegistration.types-DTV5_7Jw.d.cts} +3 -3
- package/dist/{EngineRuntimeRegistration.types-BQbS9_gs.d.ts → EngineRuntimeRegistration.types-Dl92Hdoi.d.ts} +2 -2
- package/dist/InMemoryRunDataFactory-qMiYjhCK.d.cts +202 -0
- package/dist/{ItemsInputNormalizer-D-MH8MBs.js → ItemsInputNormalizer-BhuxvZh5.js} +2 -2
- package/dist/{ItemsInputNormalizer-D-MH8MBs.js.map → ItemsInputNormalizer-BhuxvZh5.js.map} +1 -1
- package/dist/{ItemsInputNormalizer-_Mfcd3YU.d.ts → ItemsInputNormalizer-C09a7iFP.d.ts} +2 -2
- package/dist/{ItemsInputNormalizer-C_dpn76M.d.cts → ItemsInputNormalizer-DLaD6rTl.d.cts} +3 -3
- package/dist/{ItemsInputNormalizer-CwdOhSAK.cjs → ItemsInputNormalizer-Div-fb6a.cjs} +2 -2
- package/dist/{ItemsInputNormalizer-CwdOhSAK.cjs.map → ItemsInputNormalizer-Div-fb6a.cjs.map} +1 -1
- package/dist/{RunIntentService-BVur7x9n.d.ts → RunIntentService-BOSGwmqn.d.ts} +18 -4
- package/dist/{RunIntentService-CEF-sFfI.d.cts → RunIntentService-CWMMrAP4.d.cts} +18 -4
- package/dist/{agentMcpTypes-ZiNbNsEi.d.cts → agentMcpTypes-DUmniLOY.d.cts} +183 -4
- package/dist/bootstrap/index.cjs +3 -3
- package/dist/bootstrap/index.d.cts +63 -7
- package/dist/bootstrap/index.d.ts +5 -5
- package/dist/bootstrap/index.js +3 -3
- package/dist/{bootstrap-D_Yyi0wL.js → bootstrap-CKTMMNmL.js} +173 -4
- package/dist/bootstrap-CKTMMNmL.js.map +1 -0
- package/dist/{bootstrap-BxuTFTLB.cjs → bootstrap-D460dCgS.cjs} +175 -4
- package/dist/bootstrap-D460dCgS.cjs.map +1 -0
- package/dist/browser.cjs +3 -2
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +3 -3
- package/dist/contracts.d.cts +5 -5
- package/dist/contracts.d.ts +2 -2
- package/dist/{di-0Wop7z1y.js → di-DdsgWfVy.js} +31 -2
- package/dist/di-DdsgWfVy.js.map +1 -0
- package/dist/{di-BlEKdoZS.cjs → di-tO6R7VJV.cjs} +36 -1
- package/dist/di-tO6R7VJV.cjs.map +1 -0
- package/dist/{executionPersistenceContracts-BgZMRsTa.d.cts → executionPersistenceContracts-DenJJK2T.d.cts} +2 -2
- package/dist/{index-62Ba9f7D.d.ts → index-BZDhEQ6W.d.ts} +277 -101
- package/dist/{index-zWGtEhrf.d.ts → index-CSKKuK60.d.ts} +441 -5
- package/dist/index.cjs +71 -161
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +395 -97
- package/dist/index.d.ts +5 -5
- package/dist/index.js +56 -159
- package/dist/index.js.map +1 -1
- package/dist/{params-B5SENSzZ.d.cts → params-DqRvku2h.d.cts} +2 -2
- package/dist/{runtime-cxmUkk0l.js → runtime-BPZgnZ9G.js} +611 -16
- package/dist/runtime-BPZgnZ9G.js.map +1 -0
- package/dist/{runtime-DBzq5YBi.cjs → runtime-CyW9c9XM.cjs} +670 -15
- package/dist/runtime-CyW9c9XM.cjs.map +1 -0
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.cts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js +3 -3
- package/package.json +1 -1
- package/src/authoring/defineHumanApprovalNode.types.ts +379 -0
- package/src/authoring/index.ts +6 -0
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +29 -0
- package/src/contracts/CodemationTelemetryAttributeNames.ts +10 -0
- package/src/contracts/credentialTypes.ts +10 -0
- package/src/contracts/hitlSeamTypes.ts +34 -0
- package/src/contracts/humanTaskStoreTypes.ts +48 -0
- package/src/contracts/inboxChannelTypes.ts +58 -0
- package/src/contracts/index.ts +3 -0
- package/src/contracts/runTypes.ts +61 -3
- package/src/contracts/runtimeTypes.ts +112 -0
- package/src/credentials/CredentialMaterialProvider.types.ts +61 -0
- package/src/credentials/ManagedCredentialMaterialWriteError.ts +14 -0
- package/src/credentials/ManagedMaterialFetchError.ts +16 -0
- package/src/execution/ActivationEnqueueService.ts +16 -0
- package/src/execution/DefaultExecutionContextFactory.ts +11 -0
- package/src/execution/NodeExecutionSnapshotFactory.ts +7 -1
- package/src/execution/NodeExecutor.ts +60 -1
- package/src/execution/NodeExecutorFactory.ts +12 -2
- package/src/execution/NodeSuspensionHandler.ts +220 -0
- package/src/execution/PersistedRunStateTerminalBuilder.ts +5 -2
- package/src/execution/RunStateSemantics.ts +5 -0
- package/src/execution/RunSuspendedError.ts +21 -0
- package/src/index.ts +40 -0
- package/src/orchestration/Engine.ts +12 -2
- package/src/orchestration/EngineWaiters.ts +1 -1
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +25 -2
- package/src/orchestration/RunContinuationService.ts +226 -2
- package/src/orchestration/TestSuiteOrchestrator.ts +5 -4
- package/src/runtime/RunIntentService.ts +3 -0
- package/src/workflow/dsl/ChainCursorResolver.ts +36 -0
- package/dist/InMemoryRunDataFactory-C7YItvHG.d.cts +0 -123
- package/dist/bootstrap-BxuTFTLB.cjs.map +0 -1
- package/dist/bootstrap-D_Yyi0wL.js.map +0 -1
- package/dist/di-0Wop7z1y.js.map +0 -1
- package/dist/di-BlEKdoZS.cjs.map +0 -1
- package/dist/runtime-DBzq5YBi.cjs.map +0 -1
- package/dist/runtime-cxmUkk0l.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @codemation/core
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#167](https://github.com/MadeRelevant/codemation/pull/167) [`3044474`](https://github.com/MadeRelevant/codemation/commit/3044474495525490735510ff74500b53761284b6) Thanks [@cblokland90](https://github.com/cblokland90)! - feat(hitl): Human-in-the-Loop — engine suspend/resume, inbox approval node + channels (local + control-plane), agent-as-tool, decision/timeout handling, inbox decision UX (toast + node status icons + "waiting for approval"), plus the consolidated dev/canvas/host fixes shipped alongside.
|
|
8
|
+
|
|
3
9
|
## 0.11.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fi as CostTrackingUsageRecord } from "./agentMcpTypes-DUmniLOY.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/contracts/CostCatalogContract.d.ts
|
|
4
4
|
interface CostCatalogEntry {
|
|
@@ -16,4 +16,4 @@ interface CostCatalog {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
export { CostCatalogEntry as n, CostCatalog as t };
|
|
19
|
-
//# sourceMappingURL=CostCatalogContract-
|
|
19
|
+
//# sourceMappingURL=CostCatalogContract-DD7fQ4FF.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as Engine } from "./RunIntentService-
|
|
1
|
+
import { C as PersistedWorkflowSnapshotNode, Ir as WebhookTriggerRoutingDiagnostics, Ki as NodeId, N as RunResult, Nt as NodeConfigBase, Pr as WebhookTriggerMatcher, S as PersistedWorkflowSnapshot, Tr as WorkflowRepository, Tt as Items, W as DependencyContainer, Yi as WorkflowId, lt as EngineExecutionLimitsPolicyConfig, on as WorkflowDefinition, pn as WorkflowPolicyRuntimeDefaults, qt as ParentExecutionRef, w as PersistedWorkflowTokenRegistryLike, yr as TriggerRuntimeDiagnostics } from "./agentMcpTypes-DUmniLOY.cjs";
|
|
2
|
+
import { r as Engine } from "./RunIntentService-CWMMrAP4.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/workflowSnapshots/WorkflowSnapshotCodec.d.ts
|
|
5
5
|
declare class WorkflowSnapshotCodec {
|
|
@@ -78,4 +78,4 @@ interface EngineRuntimeRegistrationOptions {
|
|
|
78
78
|
}
|
|
79
79
|
//#endregion
|
|
80
80
|
export { WorkflowSnapshotCodec as a, EngineWorkflowRunnerService as i, TriggerRuntimeDiagnosticsProvider as n, WebhookTriggerMatcherProvider as r, EngineRuntimeRegistrationOptions as t };
|
|
81
|
-
//# sourceMappingURL=EngineRuntimeRegistration.types-
|
|
81
|
+
//# sourceMappingURL=EngineRuntimeRegistration.types-DTV5_7Jw.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cn as EngineExecutionLimitsPolicyConfig,
|
|
1
|
+
import { Cn as DependencyContainer, Hn as EngineExecutionLimitsPolicyConfig, Kr as WorkflowPolicyRuntimeDefaults, Qi as TriggerRuntimeDiagnostics, ha as WebhookTriggerRoutingDiagnostics, pa as WebhookTriggerMatcher } from "./index-CSKKuK60.js";
|
|
2
2
|
|
|
3
3
|
//#region src/bootstrap/runtime/EngineRuntimeRegistration.types.d.ts
|
|
4
4
|
|
|
@@ -41,4 +41,4 @@ interface EngineRuntimeRegistrationOptions {
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
export { TriggerRuntimeDiagnosticsProvider as n, WebhookTriggerMatcherProvider as r, EngineRuntimeRegistrationOptions as t };
|
|
44
|
-
//# sourceMappingURL=EngineRuntimeRegistration.types-
|
|
44
|
+
//# sourceMappingURL=EngineRuntimeRegistration.types-Dl92Hdoi.d.ts.map
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { $t as RunnableNodeConfig, An as BinaryBody, At as JsonValue, Bn as ExecutionBinaryService, Br as ExecutionTelemetryFactory, Ct as Item, Fn as BinaryStorageWriteResult, Hn as ExecutionContextFactory, Jt as PersistedRunPolicySnapshot, Ki as NodeId, Kn as HumanTaskSubject, Mn as BinaryStorageReadResult, Mt as NodeActivationId, Ni as CredentialSessionService, Nn as BinaryStorageStatResult, On as RetryPolicySpec, R as RunTestContext, Un as HumanTaskActor, Ut as NodeOutputs, Vn as ExecutionContext, Xt as RunDataSnapshot, Y as TypeToken, Yi as WorkflowId, Yt as RunDataFactory, Zt as RunId, cr as NodeResolver, jn as BinaryStorage, jt as MutableRunData, mi as CollectionsContext, nr as NodeExecutionContext, or as NodeExecutionStatePublisher, qt as ParentExecutionRef, tr as NodeBinaryAttachmentService, ui as CostTrackingTelemetryFactory, yt as BinaryAttachment } from "./agentMcpTypes-DUmniLOY.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/execution/CredentialResolverFactory.d.ts
|
|
4
|
+
declare class CredentialResolverFactory {
|
|
5
|
+
private readonly credentialSessions;
|
|
6
|
+
constructor(credentialSessions: CredentialSessionService);
|
|
7
|
+
create(workflowId: WorkflowId, nodeId: NodeId, config?: NodeExecutionContext["config"]): NodeExecutionContext["getCredential"];
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/contracts/humanTaskStoreTypes.d.ts
|
|
11
|
+
type HumanTaskStatus = "pending" | "decided" | "timed_out" | "auto_accepted" | "cancelled";
|
|
12
|
+
/** Persisted record for a single HITL task instance. */
|
|
13
|
+
interface HumanTaskRecord {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly runId: string;
|
|
16
|
+
readonly workflowId: string;
|
|
17
|
+
readonly workspaceId?: string;
|
|
18
|
+
readonly nodeId: string;
|
|
19
|
+
readonly activationId: string;
|
|
20
|
+
readonly itemIndex: number;
|
|
21
|
+
readonly status: HumanTaskStatus;
|
|
22
|
+
readonly channel: string;
|
|
23
|
+
readonly subject: HumanTaskSubject;
|
|
24
|
+
readonly metadata: Record<string, JsonValue>;
|
|
25
|
+
readonly decisionSchemaJson: string;
|
|
26
|
+
readonly decisionSchemaHash: string;
|
|
27
|
+
readonly onTimeout: "halt" | "auto-accept";
|
|
28
|
+
readonly deliveryRef?: JsonValue;
|
|
29
|
+
readonly decision?: JsonValue;
|
|
30
|
+
readonly decidedAt?: Date;
|
|
31
|
+
readonly decidedBy?: HumanTaskActor;
|
|
32
|
+
readonly resumeTokenHash: string;
|
|
33
|
+
readonly expiresAt: Date;
|
|
34
|
+
readonly createdAt: Date;
|
|
35
|
+
}
|
|
36
|
+
interface HumanTaskStore {
|
|
37
|
+
create(record: HumanTaskRecord): Promise<void>;
|
|
38
|
+
findById(taskId: string): Promise<HumanTaskRecord | undefined>;
|
|
39
|
+
findByResumeTokenHash(tokenHash: string): Promise<HumanTaskRecord | undefined>;
|
|
40
|
+
findPendingForWorkspace(workspaceId: string): Promise<ReadonlyArray<HumanTaskRecord>>;
|
|
41
|
+
/** Returns all pending tasks regardless of workspace. Used by the local dev inbox (non-managed mode). */
|
|
42
|
+
findAllPending(): Promise<ReadonlyArray<HumanTaskRecord>>;
|
|
43
|
+
markDecided(args: {
|
|
44
|
+
taskId: string;
|
|
45
|
+
decision: JsonValue;
|
|
46
|
+
decidedBy: HumanTaskActor;
|
|
47
|
+
decidedAt: Date;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
markTimedOut(taskId: string): Promise<void>;
|
|
50
|
+
markAutoAccepted(taskId: string): Promise<void>;
|
|
51
|
+
markCancelled(taskId: string): Promise<void>;
|
|
52
|
+
cancelPendingForRun(runId: string): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
declare const HumanTaskStoreToken: TypeToken<HumanTaskStore | undefined>;
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/contracts/hitlSeamTypes.d.ts
|
|
57
|
+
/**
|
|
58
|
+
* Seam interfaces for HITL collaborators that are implemented in `@codemation/host`
|
|
59
|
+
* and injected into `NodeSuspensionHandler` at runtime. Core defines the interface only —
|
|
60
|
+
* no HTTP, vendor SDK, or Prisma dependencies here.
|
|
61
|
+
*/
|
|
62
|
+
/** Signs and hashes a HITL resume token. Core only needs the sign and hash operations. */
|
|
63
|
+
interface HitlResumeTokenSignerSeam {
|
|
64
|
+
sign(args: {
|
|
65
|
+
taskId: string;
|
|
66
|
+
expiresAt: Date;
|
|
67
|
+
schemaHash: string;
|
|
68
|
+
}): string;
|
|
69
|
+
hashToken(token: string): string;
|
|
70
|
+
}
|
|
71
|
+
/** Schedules a delayed BullMQ job that drives the timeout path. */
|
|
72
|
+
interface HitlTimeoutJobSchedulerSeam {
|
|
73
|
+
enqueueTimeoutJob(args: {
|
|
74
|
+
taskId: string;
|
|
75
|
+
expiresAt: Date;
|
|
76
|
+
}): Promise<void>;
|
|
77
|
+
}
|
|
78
|
+
declare const HitlResumeTokenSignerToken: TypeToken<HitlResumeTokenSignerSeam | undefined>;
|
|
79
|
+
declare const HitlTimeoutJobSchedulerToken: TypeToken<HitlTimeoutJobSchedulerSeam | undefined>;
|
|
80
|
+
/**
|
|
81
|
+
* Optional workspace ID injected into NodeSuspensionHandler in managed mode (T7 security fix).
|
|
82
|
+
* Allows the handler to stamp the workspaceId on each HumanTaskRecord so HitlCallbackHandler
|
|
83
|
+
* can assert workspace identity independently of the HMAC middleware.
|
|
84
|
+
* Not registered in non-managed mode; NodeSuspensionHandler defaults to null.
|
|
85
|
+
*/
|
|
86
|
+
declare const HitlWorkspaceIdToken: TypeToken<string | undefined>;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/binaries/UnavailableBinaryStorage.d.ts
|
|
89
|
+
declare class UnavailableBinaryStorage implements BinaryStorage {
|
|
90
|
+
readonly driverName = "unavailable";
|
|
91
|
+
write(): Promise<never>;
|
|
92
|
+
openReadStream(): Promise<undefined>;
|
|
93
|
+
stat(): Promise<{
|
|
94
|
+
exists: false;
|
|
95
|
+
}>;
|
|
96
|
+
delete(): Promise<void>;
|
|
97
|
+
deleteMany(): Promise<void>;
|
|
98
|
+
listByPrefix(): Promise<ReadonlyArray<string>>;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region src/binaries/DefaultExecutionBinaryServiceFactory.d.ts
|
|
102
|
+
declare class DefaultExecutionBinaryService implements ExecutionBinaryService {
|
|
103
|
+
private readonly storage;
|
|
104
|
+
private readonly workflowId;
|
|
105
|
+
private readonly runId;
|
|
106
|
+
private readonly now;
|
|
107
|
+
constructor(storage: BinaryStorage, workflowId: WorkflowId, runId: RunId, now: () => Date);
|
|
108
|
+
forNode(args: {
|
|
109
|
+
nodeId: NodeId;
|
|
110
|
+
activationId: NodeActivationId;
|
|
111
|
+
}): NodeBinaryAttachmentService;
|
|
112
|
+
openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/execution/asyncSleeper.types.d.ts
|
|
116
|
+
interface AsyncSleeper {
|
|
117
|
+
sleep(ms: number): Promise<void>;
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/execution/DefaultAsyncSleeper.d.ts
|
|
121
|
+
declare class DefaultAsyncSleeper implements AsyncSleeper {
|
|
122
|
+
sleep(ms: number): Promise<void>;
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/execution/DefaultExecutionContextFactory.d.ts
|
|
126
|
+
declare class DefaultExecutionContextFactory implements ExecutionContextFactory {
|
|
127
|
+
private readonly binaryStorage;
|
|
128
|
+
private readonly telemetryFactory;
|
|
129
|
+
private readonly costTrackingFactory;
|
|
130
|
+
private readonly currentDate;
|
|
131
|
+
private readonly collections?;
|
|
132
|
+
private readonly nodeResolver?;
|
|
133
|
+
private readonly telemetryDecoratorFactory;
|
|
134
|
+
constructor(binaryStorage?: BinaryStorage, telemetryFactory?: ExecutionTelemetryFactory, costTrackingFactory?: CostTrackingTelemetryFactory, currentDate?: () => Date, collections?: CollectionsContext | undefined, nodeResolver?: NodeResolver | undefined);
|
|
135
|
+
create(args: {
|
|
136
|
+
runId: RunId;
|
|
137
|
+
workflowId: WorkflowId;
|
|
138
|
+
parent?: ParentExecutionRef;
|
|
139
|
+
policySnapshot?: PersistedRunPolicySnapshot;
|
|
140
|
+
subworkflowDepth: number;
|
|
141
|
+
engineMaxNodeActivations: number;
|
|
142
|
+
engineMaxSubworkflowDepth: number;
|
|
143
|
+
data: RunDataSnapshot;
|
|
144
|
+
nodeState?: NodeExecutionStatePublisher;
|
|
145
|
+
telemetry?: ExecutionContext["telemetry"];
|
|
146
|
+
getCredential<TSession = unknown>(slotKey: string): Promise<TSession>;
|
|
147
|
+
testContext?: RunTestContext;
|
|
148
|
+
}): ExecutionContext;
|
|
149
|
+
}
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/execution/InProcessRetryRunner.d.ts
|
|
152
|
+
declare class InProcessRetryRunner {
|
|
153
|
+
private readonly sleeper;
|
|
154
|
+
constructor(sleeper: AsyncSleeper);
|
|
155
|
+
run<T>(policy: RetryPolicySpec | undefined, work: () => Promise<T>, shouldRetry?: (error: unknown) => boolean, warn?: (message: string) => void): Promise<T>;
|
|
156
|
+
private static delayAfterFailureMs;
|
|
157
|
+
private static normalizePolicy;
|
|
158
|
+
private static clampMaxAttempts;
|
|
159
|
+
private static assertPositiveInt;
|
|
160
|
+
private static assertNonNegativeFinite;
|
|
161
|
+
private static assertMultiplier;
|
|
162
|
+
}
|
|
163
|
+
//#endregion
|
|
164
|
+
//#region src/execution/ItemExprResolver.d.ts
|
|
165
|
+
/**
|
|
166
|
+
* Resolves {@link import("../contracts/itemExpr").ItemExpr} leaves on runnable config before {@link RunnableNode.execute}.
|
|
167
|
+
*/
|
|
168
|
+
declare class ItemExprResolver {
|
|
169
|
+
resolveConfigForItem<TConfig extends RunnableNodeConfig<any, any>>(ctx: NodeExecutionContext<TConfig>, item: Item, itemIndex: number, items: ReadonlyArray<Item>): Promise<NodeExecutionContext<TConfig>>;
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
//#region src/execution/RunnableOutputBehaviorResolver.d.ts
|
|
173
|
+
type RunnableOutputBehavior = Readonly<{
|
|
174
|
+
keepBinaries: boolean;
|
|
175
|
+
}>;
|
|
176
|
+
declare class RunnableOutputBehaviorResolver {
|
|
177
|
+
resolve(config: RunnableNodeConfig): RunnableOutputBehavior;
|
|
178
|
+
private isKeepBinariesEnabled;
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/runStorage/InMemoryBinaryStorageRegistry.d.ts
|
|
182
|
+
declare class InMemoryBinaryStorage implements BinaryStorage {
|
|
183
|
+
readonly driverName = "memory";
|
|
184
|
+
private readonly values;
|
|
185
|
+
write(args: {
|
|
186
|
+
storageKey: string;
|
|
187
|
+
body: BinaryBody;
|
|
188
|
+
}): Promise<BinaryStorageWriteResult>;
|
|
189
|
+
openReadStream(storageKey: string): Promise<BinaryStorageReadResult | undefined>;
|
|
190
|
+
stat(storageKey: string): Promise<BinaryStorageStatResult>;
|
|
191
|
+
delete(storageKey: string): Promise<void>;
|
|
192
|
+
deleteMany(storageKeys: ReadonlyArray<string>): Promise<void>;
|
|
193
|
+
listByPrefix(prefix: string): Promise<ReadonlyArray<string>>;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/runStorage/InMemoryRunDataFactory.d.ts
|
|
197
|
+
declare class InMemoryRunDataFactory implements RunDataFactory {
|
|
198
|
+
create(initial?: Record<NodeId, NodeOutputs>): MutableRunData;
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
export { HumanTaskRecord as _, ItemExprResolver as a, HumanTaskStoreToken as b, DefaultAsyncSleeper as c, UnavailableBinaryStorage as d, HitlResumeTokenSignerSeam as f, HitlWorkspaceIdToken as g, HitlTimeoutJobSchedulerToken as h, RunnableOutputBehaviorResolver as i, AsyncSleeper as l, HitlTimeoutJobSchedulerSeam as m, InMemoryBinaryStorage as n, InProcessRetryRunner as o, HitlResumeTokenSignerToken as p, RunnableOutputBehavior as r, DefaultExecutionContextFactory as s, InMemoryRunDataFactory as t, DefaultExecutionBinaryService as u, HumanTaskStatus as v, CredentialResolverFactory as x, HumanTaskStore as y };
|
|
202
|
+
//# sourceMappingURL=InMemoryRunDataFactory-qMiYjhCK.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as injectable } from "./di-
|
|
1
|
+
import { a as injectable } from "./di-DdsgWfVy.js";
|
|
2
2
|
|
|
3
3
|
//#region \0@oxc-project+runtime@0.95.0/helpers/decorate.js
|
|
4
4
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -33,4 +33,4 @@ ItemsInputNormalizer = __decorate([injectable()], ItemsInputNormalizer);
|
|
|
33
33
|
|
|
34
34
|
//#endregion
|
|
35
35
|
export { ItemsInputNormalizer as t };
|
|
36
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
36
|
+
//# sourceMappingURL=ItemsInputNormalizer-BhuxvZh5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemsInputNormalizer-
|
|
1
|
+
{"version":3,"file":"ItemsInputNormalizer-BhuxvZh5.js","names":["ItemsInputNormalizer"],"sources":["../src/serialization/ItemsInputNormalizer.ts"],"sourcesContent":["import type { Item, Items } from \"../contracts/workflowTypes\";\nimport { injectable } from \"../di\";\n\n/**\n * Normalizes external inputs into the engine's canonical `Items` shape.\n * Used at host and builder boundaries where callers may provide either a raw value,\n * a single item-like object, or an array of item-like values.\n */\n@injectable()\nexport class ItemsInputNormalizer {\n normalize(raw: unknown): Items {\n if (raw === undefined || raw === null) {\n return [];\n }\n if (Array.isArray(raw)) {\n return raw.map((value) => this.normalizeItem(value));\n }\n return [this.normalizeItem(raw)];\n }\n\n private normalizeItem(raw: unknown): Item {\n if (!this.isItem(raw)) {\n return { json: raw };\n }\n return {\n json: raw.json,\n ...(raw.binary === undefined ? {} : { binary: raw.binary }),\n ...(raw.meta === undefined ? {} : { meta: raw.meta }),\n ...(raw.paired === undefined ? {} : { paired: raw.paired }),\n };\n }\n\n private isItem(raw: unknown): raw is Item {\n return typeof raw === \"object\" && raw !== null && Object.prototype.hasOwnProperty.call(raw, \"json\");\n }\n}\n"],"mappings":";;;;;;;;;;;;AASO,iCAAMA,uBAAqB;CAChC,UAAU,KAAqB;AAC7B,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,EAAE;AAEX,MAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC;AAEtD,SAAO,CAAC,KAAK,cAAc,IAAI,CAAC;;CAGlC,AAAQ,cAAc,KAAoB;AACxC,MAAI,CAAC,KAAK,OAAO,IAAI,CACnB,QAAO,EAAE,MAAM,KAAK;AAEtB,SAAO;GACL,MAAM,IAAI;GACV,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC1D,GAAI,IAAI,SAAS,SAAY,EAAE,GAAG,EAAE,MAAM,IAAI,MAAM;GACpD,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC3D;;CAGH,AAAQ,OAAO,KAA2B;AACxC,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO;;;mCAzBtG,YAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Aa as TelemetrySpanScope, Fi as NodeExecutionContext, Mr as RunnableNodeConfig, Nr as RunnableNodeInputJson, On as TypeToken, Rt as ConnectionInvocationId, Sr as NodeOutputs, To as NodeId, fr as NodeConfigBase, gt as Expr, ir as Items, lo as CredentialRequirement, lr as JsonValue, nr as Item, q as McpServerDeclaration, wo as NodeConnectionName } from "./index-CSKKuK60.js";
|
|
2
2
|
import { ZodType, input, output } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/ai/NodeBackedToolConfig.d.ts
|
|
@@ -318,4 +318,4 @@ declare class ItemsInputNormalizer {
|
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
export { ChatModelFactory as A, ZodSchemaAny as B, AgentToolDefinition as C, ChatLanguageModel as D, AgentTurnLimitBehavior as E, NodeBackedToolOutputMapperArgs as F, CallableToolFactory as G, AgentMessageConfigNormalizer as H, StructuredOutputOptions as I, CallableToolExecuteHandler as J, CallableToolConfig as K, Tool as L, NodeBackedToolInputMapper as M, NodeBackedToolInputMapperArgs as N, ChatLanguageModelCallOptions as O, NodeBackedToolOutputMapper as P, ToolConfig as R, AgentToolCallPlanner as S, AgentToolToken as T, AgentToolFactory as U, AgentConfigInspector as V, CallableToolKindToken as W, NodeBackedToolConfig as Y, AgentMessageTemplateContent as _, AgentConnectionNodeRole as a, AgentTool as b, AgentCanvasPresentation as c, AgentMessageBuildArgs as d, AgentMessageConfig as f, AgentMessageTemplate as g, AgentMessageRole as h, AgentConnectionNodeDescriptor as i, NodeBackedToolConfigOptions as j, ChatModelConfig as k, AgentGuardrailConfig as l, AgentMessageLine as m, AgentConnectionCredentialSource as n, McpServerResolver as o, AgentMessageDto as p, CallableToolConfigOptions as q, AgentConnectionNodeCollector as r, AgentAttachmentRole as s, ItemsInputNormalizer as t, AgentGuardrailDefaults as u, AgentModelInvocationOptions as v, AgentToolExecuteArgs as w, AgentToolCall as x, AgentNodeConfig as y, ToolExecuteArgs as z };
|
|
321
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
321
|
+
//# sourceMappingURL=ItemsInputNormalizer-C09a7iFP.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Expr } from "./params-
|
|
1
|
+
import { $t as RunnableNodeConfig, Ai as CredentialRequirement, At as JsonValue, Ct as Item, Gi as NodeConnectionName, Ki as NodeId, Nt as NodeConfigBase, Tt as Items, Ut as NodeOutputs, Y as TypeToken, Zr as TelemetrySpanScope, a as ConnectionInvocationId, b as PersistedRunState, en as RunnableNodeInputJson, nr as NodeExecutionContext } from "./agentMcpTypes-DUmniLOY.cjs";
|
|
2
|
+
import { t as Expr } from "./params-DqRvku2h.cjs";
|
|
3
3
|
import { ZodType, input, output } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/mcpTypes.d.ts
|
|
@@ -404,4 +404,4 @@ declare class ItemsInputNormalizer {
|
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
406
|
export { McpServerDeclaration as $, ChatModelFactory as A, ZodSchemaAny as B, AgentToolDefinition as C, ChatLanguageModel as D, AgentTurnLimitBehavior as E, NodeBackedToolOutputMapperArgs as F, CallableToolFactory as G, AgentMessageConfigNormalizer as H, StructuredOutputOptions as I, CallableToolExecuteHandler as J, CallableToolConfig as K, Tool as L, NodeBackedToolInputMapper as M, NodeBackedToolInputMapperArgs as N, ChatLanguageModelCallOptions as O, NodeBackedToolOutputMapper as P, RunFinishedAtFactory as Q, ToolConfig as R, AgentToolCallPlanner as S, AgentToolToken as T, AgentToolFactory as U, AgentConfigInspector as V, CallableToolKindToken as W, NodeIterationIdFactory as X, NodeBackedToolConfig as Y, ConnectionNodeIdFactory as Z, AgentMessageTemplateContent as _, AgentConnectionNodeRole as a, AgentTool as b, AgentCanvasPresentation as c, AgentMessageBuildArgs as d, McpServerTransport as et, AgentMessageConfig as f, AgentMessageTemplate as g, AgentMessageRole as h, AgentConnectionNodeDescriptor as i, NodeBackedToolConfigOptions as j, ChatModelConfig as k, AgentGuardrailConfig as l, AgentMessageLine as m, AgentConnectionCredentialSource as n, McpServerResolver as o, AgentMessageDto as p, CallableToolConfigOptions as q, AgentConnectionNodeCollector as r, AgentAttachmentRole as s, ItemsInputNormalizer as t, AgentGuardrailDefaults as u, AgentModelInvocationOptions as v, AgentToolExecuteArgs as w, AgentToolCall as x, AgentNodeConfig as y, ToolExecuteArgs as z };
|
|
407
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
407
|
+
//# sourceMappingURL=ItemsInputNormalizer-DLaD6rTl.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_di = require('./di-
|
|
1
|
+
const require_di = require('./di-tO6R7VJV.cjs');
|
|
2
2
|
let tsyringe = require("tsyringe");
|
|
3
3
|
tsyringe = require_di.__toESM(tsyringe);
|
|
4
4
|
|
|
@@ -40,4 +40,4 @@ Object.defineProperty(exports, 'ItemsInputNormalizer', {
|
|
|
40
40
|
return ItemsInputNormalizer;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
43
|
+
//# sourceMappingURL=ItemsInputNormalizer-Div-fb6a.cjs.map
|
package/dist/{ItemsInputNormalizer-CwdOhSAK.cjs.map → ItemsInputNormalizer-Div-fb6a.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemsInputNormalizer-
|
|
1
|
+
{"version":3,"file":"ItemsInputNormalizer-Div-fb6a.cjs","names":["ItemsInputNormalizer"],"sources":["../src/serialization/ItemsInputNormalizer.ts"],"sourcesContent":["import type { Item, Items } from \"../contracts/workflowTypes\";\nimport { injectable } from \"../di\";\n\n/**\n * Normalizes external inputs into the engine's canonical `Items` shape.\n * Used at host and builder boundaries where callers may provide either a raw value,\n * a single item-like object, or an array of item-like values.\n */\n@injectable()\nexport class ItemsInputNormalizer {\n normalize(raw: unknown): Items {\n if (raw === undefined || raw === null) {\n return [];\n }\n if (Array.isArray(raw)) {\n return raw.map((value) => this.normalizeItem(value));\n }\n return [this.normalizeItem(raw)];\n }\n\n private normalizeItem(raw: unknown): Item {\n if (!this.isItem(raw)) {\n return { json: raw };\n }\n return {\n json: raw.json,\n ...(raw.binary === undefined ? {} : { binary: raw.binary }),\n ...(raw.meta === undefined ? {} : { meta: raw.meta }),\n ...(raw.paired === undefined ? {} : { paired: raw.paired }),\n };\n }\n\n private isItem(raw: unknown): raw is Item {\n return typeof raw === \"object\" && raw !== null && Object.prototype.hasOwnProperty.call(raw, \"json\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AASO,iCAAMA,uBAAqB;CAChC,UAAU,KAAqB;AAC7B,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,EAAE;AAEX,MAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC;AAEtD,SAAO,CAAC,KAAK,cAAc,IAAI,CAAC;;CAGlC,AAAQ,cAAc,KAAoB;AACxC,MAAI,CAAC,KAAK,OAAO,IAAI,CACnB,QAAO,EAAE,MAAM,KAAK;AAEtB,SAAO;GACL,MAAM,IAAI;GACV,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC1D,GAAI,IAAI,SAAS,SAAY,EAAE,GAAG,EAAE,MAAM,IAAI,MAAM;GACpD,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC3D;;CAGH,AAAQ,OAAO,KAA2B;AACxC,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO;;;6DAzB1F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $t as PersistedRunState, Ar as RunId, Bt as CurrentStateExecutionRequest, Di as LiveWorkflowRepository, Dr as PersistedRunPolicySnapshot, Er as ParentExecutionRef, Gi as ResumeContext, Hn as EngineExecutionLimitsPolicyConfig, Hr as WorkflowErrorHandlerSpec, Ii as NodeExecutionRequest, Jr as WorkflowStoragePolicyDecisionArgs, Kr as WorkflowPolicyRuntimeDefaults, Kt as NodeInputsByPort, Li as NodeExecutionRequestHandler, Oo as WorkflowId, Sr as NodeOutputs, To as NodeId, Vi as NodeResolver, Vn as EngineExecutionLimitsPolicy, Vr as WorkflowErrorHandler, ca as WorkflowSnapshotResolver, cn as RunExecutionOptions, dr as NodeActivationId, fa as WebhookInvocationMatch, fn as RunResult, fr as NodeConfigBase, gr as NodeErrorHandlerSpec, hn as RunStopCondition, ia as WorkflowRepository, ir as Items, ki as NodeActivationContinuation, la as HttpMethod, ma as WebhookTriggerResolution, mr as NodeErrorHandler, nn as PersistedWorkflowSnapshotNode, on as RunCurrentState, pa as WebhookTriggerMatcher, rn as PersistedWorkflowTokenRegistryLike, tn as PersistedWorkflowSnapshot, vn as WebhookRunResult, xn as WorkflowExecutionRepository, zr as WorkflowDefinition } from "./index-CSKKuK60.js";
|
|
2
2
|
|
|
3
3
|
//#region src/orchestration/Engine.d.ts
|
|
4
4
|
interface EngineTriggerRuntime {
|
|
@@ -49,9 +49,14 @@ interface EngineRunContinuationService {
|
|
|
49
49
|
error: Error;
|
|
50
50
|
}): Promise<RunResult>;
|
|
51
51
|
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
52
|
-
status: "completed" | "failed";
|
|
52
|
+
status: "completed" | "failed" | "halted";
|
|
53
53
|
}>>;
|
|
54
54
|
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
55
|
+
resumeRun(args: {
|
|
56
|
+
runId: RunId;
|
|
57
|
+
taskId: string;
|
|
58
|
+
resumeContext: ResumeContext;
|
|
59
|
+
}): Promise<RunResult>;
|
|
55
60
|
}
|
|
56
61
|
interface EngineNodeExecutionRequestHandler {
|
|
57
62
|
handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
|
|
@@ -128,9 +133,18 @@ declare class Engine implements NodeActivationContinuation, NodeExecutionRequest
|
|
|
128
133
|
error: Error;
|
|
129
134
|
}): Promise<RunResult>;
|
|
130
135
|
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
131
|
-
status: "completed" | "failed";
|
|
136
|
+
status: "completed" | "failed" | "halted";
|
|
132
137
|
}>>;
|
|
133
138
|
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
139
|
+
/**
|
|
140
|
+
* Re-activate a suspended run item with a human decision (HITL).
|
|
141
|
+
* The HTTP resume endpoint calls this; this method exposes the engine primitive.
|
|
142
|
+
*/
|
|
143
|
+
resumeRun(args: {
|
|
144
|
+
runId: RunId;
|
|
145
|
+
taskId: string;
|
|
146
|
+
resumeContext: ResumeContext;
|
|
147
|
+
}): Promise<RunResult>;
|
|
134
148
|
handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
|
|
135
149
|
}
|
|
136
150
|
//#endregion
|
|
@@ -282,4 +296,4 @@ declare class RunIntentService {
|
|
|
282
296
|
}
|
|
283
297
|
//#endregion
|
|
284
298
|
export { RunPolicySnapshotFactory as a, RunTerminalPersistenceCoordinator as c, WorkflowSnapshotCodec as i, WorkflowStoragePolicyEvaluator as l, InMemoryLiveWorkflowRepository as n, EngineExecutionLimitsPolicyFactory as o, EngineWorkflowRunnerService as r, WorkflowPolicyErrorServices as s, RunIntentService as t, Engine as u };
|
|
285
|
-
//# sourceMappingURL=RunIntentService-
|
|
299
|
+
//# sourceMappingURL=RunIntentService-BOSGwmqn.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ar as HttpMethod, D as RunCurrentState, Fr as WebhookTriggerResolution, H as WorkflowExecutionRepository, I as RunStopCondition, Jn as LiveWorkflowRepository, Ki as NodeId, Mt as NodeActivationId, N as RunResult, Nr as WebhookInvocationMatch, Pr as WebhookTriggerMatcher, Tr as WorkflowRepository, Tt as Items, Ut as NodeOutputs, Xn as NodeActivationContinuation, Yi as WorkflowId, Zt as RunId, fr as ResumeContext, ir as NodeExecutionRequestHandler, k as RunExecutionOptions, kr as WorkflowSnapshotResolver, on as WorkflowDefinition, p as NodeInputsByPort, qt as ParentExecutionRef, rr as NodeExecutionRequest, s as CurrentStateExecutionRequest, w as PersistedWorkflowTokenRegistryLike, z as WebhookRunResult } from "./agentMcpTypes-DUmniLOY.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/orchestration/Engine.d.ts
|
|
4
4
|
interface EngineTriggerRuntime {
|
|
@@ -49,9 +49,14 @@ interface EngineRunContinuationService {
|
|
|
49
49
|
error: Error;
|
|
50
50
|
}): Promise<RunResult>;
|
|
51
51
|
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
52
|
-
status: "completed" | "failed";
|
|
52
|
+
status: "completed" | "failed" | "halted";
|
|
53
53
|
}>>;
|
|
54
54
|
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
55
|
+
resumeRun(args: {
|
|
56
|
+
runId: RunId;
|
|
57
|
+
taskId: string;
|
|
58
|
+
resumeContext: ResumeContext;
|
|
59
|
+
}): Promise<RunResult>;
|
|
55
60
|
}
|
|
56
61
|
interface EngineNodeExecutionRequestHandler {
|
|
57
62
|
handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
|
|
@@ -128,9 +133,18 @@ declare class Engine implements NodeActivationContinuation, NodeExecutionRequest
|
|
|
128
133
|
error: Error;
|
|
129
134
|
}): Promise<RunResult>;
|
|
130
135
|
waitForCompletion(runId: RunId): Promise<Extract<RunResult, {
|
|
131
|
-
status: "completed" | "failed";
|
|
136
|
+
status: "completed" | "failed" | "halted";
|
|
132
137
|
}>>;
|
|
133
138
|
waitForWebhookResponse(runId: RunId): Promise<WebhookRunResult>;
|
|
139
|
+
/**
|
|
140
|
+
* Re-activate a suspended run item with a human decision (HITL).
|
|
141
|
+
* The HTTP resume endpoint calls this; this method exposes the engine primitive.
|
|
142
|
+
*/
|
|
143
|
+
resumeRun(args: {
|
|
144
|
+
runId: RunId;
|
|
145
|
+
taskId: string;
|
|
146
|
+
resumeContext: ResumeContext;
|
|
147
|
+
}): Promise<RunResult>;
|
|
134
148
|
handleNodeExecutionRequest(request: NodeExecutionRequest): Promise<void>;
|
|
135
149
|
}
|
|
136
150
|
//#endregion
|
|
@@ -203,4 +217,4 @@ declare class RunIntentService {
|
|
|
203
217
|
}
|
|
204
218
|
//#endregion
|
|
205
219
|
export { InMemoryLiveWorkflowRepository as n, Engine as r, RunIntentService as t };
|
|
206
|
-
//# sourceMappingURL=RunIntentService-
|
|
220
|
+
//# sourceMappingURL=RunIntentService-CWMMrAP4.d.cts.map
|