@codemation/core 0.10.2 → 0.11.1
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 +183 -0
- package/dist/CostCatalogContract-DZgcUBE4.d.cts +19 -0
- package/dist/{EngineRuntimeRegistration.types-ClLuY1FG.d.ts → EngineRuntimeRegistration.types-BQbS9_gs.d.ts} +2 -2
- package/dist/{EngineRuntimeRegistration.types-BryWi2mA.d.cts → EngineRuntimeRegistration.types-Cggm5GVY.d.cts} +8 -2
- package/dist/{InMemoryRunDataFactory-DeXNJt1O.d.cts → InMemoryRunDataFactory-C7YItvHG.d.cts} +9 -19
- package/dist/{InMemoryRunEventBusRegistry-sM4z4n_i.js → InMemoryRunEventBusRegistry-Bwunvt1T.js} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-sM4z4n_i.js.map → InMemoryRunEventBusRegistry-Bwunvt1T.js.map} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-VM3OWnHo.cjs → InMemoryRunEventBusRegistry-Sa86VxuV.cjs} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-VM3OWnHo.cjs.map → InMemoryRunEventBusRegistry-Sa86VxuV.cjs.map} +1 -1
- package/dist/ItemsInputNormalizer-C_dpn76M.d.cts +407 -0
- package/dist/ItemsInputNormalizer-CwdOhSAK.cjs +43 -0
- package/dist/ItemsInputNormalizer-CwdOhSAK.cjs.map +1 -0
- package/dist/ItemsInputNormalizer-D-MH8MBs.js +36 -0
- package/dist/ItemsInputNormalizer-D-MH8MBs.js.map +1 -0
- package/dist/ItemsInputNormalizer-_Mfcd3YU.d.ts +321 -0
- package/dist/RunIntentService-BVur7x9n.d.ts +285 -0
- package/dist/RunIntentService-CEF-sFfI.d.cts +206 -0
- package/dist/{RunIntentService-BqNjrksF.d.cts → agentMcpTypes-ZiNbNsEi.d.cts} +1717 -1809
- package/dist/bootstrap/index.cjs +4 -2
- package/dist/bootstrap/index.d.cts +8 -3
- package/dist/bootstrap/index.d.ts +6 -4
- package/dist/bootstrap/index.js +4 -2
- package/dist/{bootstrap-DtjQtuvi.cjs → bootstrap-BxuTFTLB.cjs} +41 -34
- package/dist/bootstrap-BxuTFTLB.cjs.map +1 -0
- package/dist/{bootstrap-BfFKGzyj.js → bootstrap-D_Yyi0wL.js} +9 -2
- package/dist/bootstrap-D_Yyi0wL.js.map +1 -0
- package/dist/browser.cjs +16 -0
- package/dist/browser.d.cts +4 -0
- package/dist/browser.d.ts +3 -0
- package/dist/browser.js +4 -0
- package/dist/contracts-CK0x6w_G.cjs +74 -0
- package/dist/contracts-CK0x6w_G.cjs.map +1 -0
- package/dist/contracts-DXdfTdpW.js +50 -0
- package/dist/contracts-DXdfTdpW.js.map +1 -0
- package/dist/contracts.cjs +6 -0
- package/dist/contracts.d.cts +5 -0
- package/dist/contracts.d.ts +2 -0
- package/dist/contracts.js +3 -0
- package/dist/di-0Wop7z1y.js +376 -0
- package/dist/di-0Wop7z1y.js.map +1 -0
- package/dist/di-BlEKdoZS.cjs +489 -0
- package/dist/di-BlEKdoZS.cjs.map +1 -0
- package/dist/executionPersistenceContracts-BgZMRsTa.d.cts +275 -0
- package/dist/{index-CJQtTY_M.d.ts → index-62Ba9f7D.d.ts} +114 -320
- package/dist/{RunIntentService-CI-F8qQ7.d.ts → index-zWGtEhrf.d.ts} +1811 -1914
- package/dist/index.cjs +76 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +112 -656
- package/dist/index.d.ts +5 -3
- package/dist/index.js +52 -50
- package/dist/index.js.map +1 -1
- package/dist/params-B5SENSzZ.d.cts +44 -0
- package/dist/{runtime-_ywksLa6.cjs → runtime-DBzq5YBi.cjs} +125 -489
- package/dist/runtime-DBzq5YBi.cjs.map +1 -0
- package/dist/{runtime-DbMjpb5d.js → runtime-cxmUkk0l.js} +117 -369
- package/dist/runtime-cxmUkk0l.js.map +1 -0
- package/dist/testing.cjs +23 -21
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +4 -3
- package/dist/testing.d.ts +3 -2
- package/dist/testing.js +5 -3
- package/dist/testing.js.map +1 -1
- package/package.json +12 -17
- package/src/ai/AgentConnectionNodeCollector.ts +47 -5
- package/src/authoring/defineNode.types.ts +21 -1
- package/src/authoring/definePollingTrigger.types.ts +20 -0
- package/src/binaries/UnavailableBinaryStorage.ts +6 -0
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +9 -0
- package/src/browser.ts +1 -0
- package/src/contracts/AgentBindError.ts +11 -0
- package/src/contracts/CodemationTelemetryAttributeNames.ts +4 -0
- package/src/contracts/NoOpAgentMcpIntegration.ts +13 -0
- package/src/contracts/agentMcpTypes.ts +64 -0
- package/src/contracts/index.ts +4 -0
- package/src/contracts/mcpTypes.ts +29 -0
- package/src/contracts/runTypes.ts +8 -0
- package/src/contracts/runtimeTypes.ts +4 -0
- package/src/contracts/workflowTypes.ts +21 -0
- package/src/contracts.ts +3 -0
- package/src/credentials/OAuthFlowExecutor.types.ts +45 -0
- package/src/di/CoreTokens.ts +7 -0
- package/src/execution/InProcessRetryRunner.ts +31 -5
- package/src/execution/NodeExecutor.ts +27 -7
- package/src/execution/NodeRunStateWriter.ts +2 -0
- package/src/index.ts +10 -0
- package/src/orchestration/RunContinuationService.ts +6 -2
- package/src/runStorage/InMemoryBinaryStorageRegistry.ts +10 -0
- package/src/scheduler/InlineDrivingScheduler.ts +26 -22
- package/src/types/index.ts +1 -0
- package/src/validation/WorkflowEdgePortError.types.ts +16 -0
- package/src/validation/WorkflowEdgePortValidator.ts +52 -0
- package/src/workflow/definition/ConnectionInvocationIdFactory.ts +4 -3
- package/src/workflow/definition/ConnectionNodeIdFactory.ts +25 -0
- package/src/workflow/definition/NodeIterationIdFactory.ts +5 -3
- package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +42 -10
- package/tsdown.config.ts +1 -1
- package/dist/bootstrap-BfFKGzyj.js.map +0 -1
- package/dist/bootstrap-DtjQtuvi.cjs.map +0 -1
- package/dist/runtime-DbMjpb5d.js.map +0 -1
- package/dist/runtime-_ywksLa6.cjs.map +0 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/contracts/AgentBindError.ts
|
|
3
|
+
/**
|
|
4
|
+
* Thrown at agent bind time when mcpServers declarations cannot be resolved.
|
|
5
|
+
* Causes include: unknown server id, missing credential instance, insufficient scopes,
|
|
6
|
+
* and ambiguous shorthand binding (multiple credential instances match).
|
|
7
|
+
*/
|
|
8
|
+
var AgentBindError = class extends Error {
|
|
9
|
+
constructor(message) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = "AgentBindError";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/contracts/NoOpAgentMcpIntegration.ts
|
|
17
|
+
/**
|
|
18
|
+
* No-op implementation of AgentMcpIntegration.
|
|
19
|
+
* Registered by the core engine runtime as a fallback when the host does not
|
|
20
|
+
* supply a real implementation (e.g. in unit tests or headless engine setups).
|
|
21
|
+
* Always returns an empty tool map so the agent runs with node-backed tools only.
|
|
22
|
+
*/
|
|
23
|
+
var NoOpAgentMcpIntegration = class {
|
|
24
|
+
async prepareMcpTools() {
|
|
25
|
+
return /* @__PURE__ */ new Map();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/contracts/assertionTypes.ts
|
|
31
|
+
/**
|
|
32
|
+
* Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions
|
|
33
|
+
* (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;
|
|
34
|
+
* AI-judge assertions are expected to set their own threshold.
|
|
35
|
+
*/
|
|
36
|
+
const DEFAULT_ASSERTION_PASS_THRESHOLD = .5;
|
|
37
|
+
/**
|
|
38
|
+
* Derive whether an assertion result is considered "passing" using the score-based contract:
|
|
39
|
+
* `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical
|
|
40
|
+
* derivation — UI and rollup code should call it rather than inlining the comparison so future
|
|
41
|
+
* tweaks (e.g. NaN handling) land in one place.
|
|
42
|
+
*/
|
|
43
|
+
function deriveAssertionPassed(result) {
|
|
44
|
+
if (result.errored === true) return false;
|
|
45
|
+
const threshold = result.passThreshold ?? DEFAULT_ASSERTION_PASS_THRESHOLD;
|
|
46
|
+
return result.score >= threshold;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
Object.defineProperty(exports, 'AgentBindError', {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () {
|
|
53
|
+
return AgentBindError;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, 'DEFAULT_ASSERTION_PASS_THRESHOLD', {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () {
|
|
59
|
+
return DEFAULT_ASSERTION_PASS_THRESHOLD;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
Object.defineProperty(exports, 'NoOpAgentMcpIntegration', {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () {
|
|
65
|
+
return NoOpAgentMcpIntegration;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, 'deriveAssertionPassed', {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () {
|
|
71
|
+
return deriveAssertionPassed;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=contracts-CK0x6w_G.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts-CK0x6w_G.cjs","names":[],"sources":["../src/contracts/AgentBindError.ts","../src/contracts/NoOpAgentMcpIntegration.ts","../src/contracts/assertionTypes.ts"],"sourcesContent":["/**\n * Thrown at agent bind time when mcpServers declarations cannot be resolved.\n * Causes include: unknown server id, missing credential instance, insufficient scopes,\n * and ambiguous shorthand binding (multiple credential instances match).\n */\nexport class AgentBindError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"AgentBindError\";\n }\n}\n","import type { AgentMcpIntegration, AgentMcpToolMap } from \"./agentMcpTypes\";\n\n/**\n * No-op implementation of AgentMcpIntegration.\n * Registered by the core engine runtime as a fallback when the host does not\n * supply a real implementation (e.g. in unit tests or headless engine setups).\n * Always returns an empty tool map so the agent runs with node-backed tools only.\n */\nexport class NoOpAgentMcpIntegration implements AgentMcpIntegration {\n async prepareMcpTools(): Promise<AgentMcpToolMap> {\n return new Map();\n }\n}\n","import type { JsonValue, NodeId } from \"./workflowTypes\";\n\n/**\n * One assertion emitted by an assertion-emitting node (a node whose config sets\n * `emitsAssertions: true`). Each emitted item on `main` carries one of these as `item.json`.\n *\n * Pass/fail is derived from `score >= (passThreshold ?? 0.5)` — see {@link deriveAssertionPassed}.\n * The `errored` marker is for cases where the assertion code itself threw (distinct from\n * \"the assertion was evaluated and the score was low\") and is treated as a hard fail in rollups\n * regardless of `score`.\n */\nexport interface AssertionResult {\n readonly name: string;\n /** 0..1 score. Source of truth for pass/fail (compared against `passThreshold`). */\n readonly score: number;\n /** 0..1 threshold for \"passed\". When omitted, consumers default to 0.5. */\n readonly passThreshold?: number;\n /** True when evaluating the assertion threw — treated as fail regardless of `score`. */\n readonly errored?: true;\n /** What the assertion expected. Free-form JSON; UIs render with a JSON viewer. */\n readonly expected?: JsonValue;\n /** What the workflow actually produced. */\n readonly actual?: JsonValue;\n /** Short human-readable explanation, especially for fails / errors. */\n readonly message?: string;\n /** Bag of supplemental fields (e.g. judge prompt, judge raw response, comparison method). */\n readonly details?: Readonly<Record<string, JsonValue>>;\n}\n\n/**\n * Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions\n * (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;\n * AI-judge assertions are expected to set their own threshold.\n */\nexport const DEFAULT_ASSERTION_PASS_THRESHOLD = 0.5;\n\n/**\n * Derive whether an assertion result is considered \"passing\" using the score-based contract:\n * `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical\n * derivation — UI and rollup code should call it rather than inlining the comparison so future\n * tweaks (e.g. NaN handling) land in one place.\n */\nexport function deriveAssertionPassed(result: {\n readonly score: number;\n readonly passThreshold?: number;\n readonly errored?: true;\n}): boolean {\n if (result.errored === true) return false;\n const threshold = result.passThreshold ?? DEFAULT_ASSERTION_PASS_THRESHOLD;\n return result.score >= threshold;\n}\n\n/**\n * Provenance for a persisted {@link AssertionResult}: which node produced it and where in the\n * per-item iteration tree it landed. Filled in by the host-side persister, not the node itself.\n */\nexport interface AssertionResultProvenance {\n readonly nodeId: NodeId;\n /** Per-item iteration id when the emitting node ran inside a per-item loop. */\n readonly iterationId?: string;\n /** Item index (0-based) within the activation that produced this assertion. */\n readonly itemIndex?: number;\n}\n"],"mappings":";;;;;;;AAKA,IAAa,iBAAb,cAAoC,MAAM;CACxC,YAAY,SAAiB;AAC3B,QAAM,QAAQ;AACd,OAAK,OAAO;;;;;;;;;;;;ACAhB,IAAa,0BAAb,MAAoE;CAClE,MAAM,kBAA4C;AAChD,yBAAO,IAAI,KAAK;;;;;;;;;;;ACwBpB,MAAa,mCAAmC;;;;;;;AAQhD,SAAgB,sBAAsB,QAI1B;AACV,KAAI,OAAO,YAAY,KAAM,QAAO;CACpC,MAAM,YAAY,OAAO,iBAAiB;AAC1C,QAAO,OAAO,SAAS"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region src/contracts/AgentBindError.ts
|
|
2
|
+
/**
|
|
3
|
+
* Thrown at agent bind time when mcpServers declarations cannot be resolved.
|
|
4
|
+
* Causes include: unknown server id, missing credential instance, insufficient scopes,
|
|
5
|
+
* and ambiguous shorthand binding (multiple credential instances match).
|
|
6
|
+
*/
|
|
7
|
+
var AgentBindError = class extends Error {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "AgentBindError";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/contracts/NoOpAgentMcpIntegration.ts
|
|
16
|
+
/**
|
|
17
|
+
* No-op implementation of AgentMcpIntegration.
|
|
18
|
+
* Registered by the core engine runtime as a fallback when the host does not
|
|
19
|
+
* supply a real implementation (e.g. in unit tests or headless engine setups).
|
|
20
|
+
* Always returns an empty tool map so the agent runs with node-backed tools only.
|
|
21
|
+
*/
|
|
22
|
+
var NoOpAgentMcpIntegration = class {
|
|
23
|
+
async prepareMcpTools() {
|
|
24
|
+
return /* @__PURE__ */ new Map();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/contracts/assertionTypes.ts
|
|
30
|
+
/**
|
|
31
|
+
* Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions
|
|
32
|
+
* (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;
|
|
33
|
+
* AI-judge assertions are expected to set their own threshold.
|
|
34
|
+
*/
|
|
35
|
+
const DEFAULT_ASSERTION_PASS_THRESHOLD = .5;
|
|
36
|
+
/**
|
|
37
|
+
* Derive whether an assertion result is considered "passing" using the score-based contract:
|
|
38
|
+
* `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical
|
|
39
|
+
* derivation — UI and rollup code should call it rather than inlining the comparison so future
|
|
40
|
+
* tweaks (e.g. NaN handling) land in one place.
|
|
41
|
+
*/
|
|
42
|
+
function deriveAssertionPassed(result) {
|
|
43
|
+
if (result.errored === true) return false;
|
|
44
|
+
const threshold = result.passThreshold ?? DEFAULT_ASSERTION_PASS_THRESHOLD;
|
|
45
|
+
return result.score >= threshold;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { AgentBindError as i, deriveAssertionPassed as n, NoOpAgentMcpIntegration as r, DEFAULT_ASSERTION_PASS_THRESHOLD as t };
|
|
50
|
+
//# sourceMappingURL=contracts-DXdfTdpW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts-DXdfTdpW.js","names":[],"sources":["../src/contracts/AgentBindError.ts","../src/contracts/NoOpAgentMcpIntegration.ts","../src/contracts/assertionTypes.ts"],"sourcesContent":["/**\n * Thrown at agent bind time when mcpServers declarations cannot be resolved.\n * Causes include: unknown server id, missing credential instance, insufficient scopes,\n * and ambiguous shorthand binding (multiple credential instances match).\n */\nexport class AgentBindError extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"AgentBindError\";\n }\n}\n","import type { AgentMcpIntegration, AgentMcpToolMap } from \"./agentMcpTypes\";\n\n/**\n * No-op implementation of AgentMcpIntegration.\n * Registered by the core engine runtime as a fallback when the host does not\n * supply a real implementation (e.g. in unit tests or headless engine setups).\n * Always returns an empty tool map so the agent runs with node-backed tools only.\n */\nexport class NoOpAgentMcpIntegration implements AgentMcpIntegration {\n async prepareMcpTools(): Promise<AgentMcpToolMap> {\n return new Map();\n }\n}\n","import type { JsonValue, NodeId } from \"./workflowTypes\";\n\n/**\n * One assertion emitted by an assertion-emitting node (a node whose config sets\n * `emitsAssertions: true`). Each emitted item on `main` carries one of these as `item.json`.\n *\n * Pass/fail is derived from `score >= (passThreshold ?? 0.5)` — see {@link deriveAssertionPassed}.\n * The `errored` marker is for cases where the assertion code itself threw (distinct from\n * \"the assertion was evaluated and the score was low\") and is treated as a hard fail in rollups\n * regardless of `score`.\n */\nexport interface AssertionResult {\n readonly name: string;\n /** 0..1 score. Source of truth for pass/fail (compared against `passThreshold`). */\n readonly score: number;\n /** 0..1 threshold for \"passed\". When omitted, consumers default to 0.5. */\n readonly passThreshold?: number;\n /** True when evaluating the assertion threw — treated as fail regardless of `score`. */\n readonly errored?: true;\n /** What the assertion expected. Free-form JSON; UIs render with a JSON viewer. */\n readonly expected?: JsonValue;\n /** What the workflow actually produced. */\n readonly actual?: JsonValue;\n /** Short human-readable explanation, especially for fails / errors. */\n readonly message?: string;\n /** Bag of supplemental fields (e.g. judge prompt, judge raw response, comparison method). */\n readonly details?: Readonly<Record<string, JsonValue>>;\n}\n\n/**\n * Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions\n * (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;\n * AI-judge assertions are expected to set their own threshold.\n */\nexport const DEFAULT_ASSERTION_PASS_THRESHOLD = 0.5;\n\n/**\n * Derive whether an assertion result is considered \"passing\" using the score-based contract:\n * `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical\n * derivation — UI and rollup code should call it rather than inlining the comparison so future\n * tweaks (e.g. NaN handling) land in one place.\n */\nexport function deriveAssertionPassed(result: {\n readonly score: number;\n readonly passThreshold?: number;\n readonly errored?: true;\n}): boolean {\n if (result.errored === true) return false;\n const threshold = result.passThreshold ?? DEFAULT_ASSERTION_PASS_THRESHOLD;\n return result.score >= threshold;\n}\n\n/**\n * Provenance for a persisted {@link AssertionResult}: which node produced it and where in the\n * per-item iteration tree it landed. Filled in by the host-side persister, not the node itself.\n */\nexport interface AssertionResultProvenance {\n readonly nodeId: NodeId;\n /** Per-item iteration id when the emitting node ran inside a per-item loop. */\n readonly iterationId?: string;\n /** Item index (0-based) within the activation that produced this assertion. */\n readonly itemIndex?: number;\n}\n"],"mappings":";;;;;;AAKA,IAAa,iBAAb,cAAoC,MAAM;CACxC,YAAY,SAAiB;AAC3B,QAAM,QAAQ;AACd,OAAK,OAAO;;;;;;;;;;;;ACAhB,IAAa,0BAAb,MAAoE;CAClE,MAAM,kBAA4C;AAChD,yBAAO,IAAI,KAAK;;;;;;;;;;;ACwBpB,MAAa,mCAAmC;;;;;;;AAQhD,SAAgB,sBAAsB,QAI1B;AACV,KAAI,OAAO,YAAY,KAAM,QAAO;CACpC,MAAM,YAAY,OAAO,iBAAiB;AAC1C,QAAO,OAAO,SAAS"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const require_contracts = require('./contracts-CK0x6w_G.cjs');
|
|
2
|
+
|
|
3
|
+
exports.AgentBindError = require_contracts.AgentBindError;
|
|
4
|
+
exports.DEFAULT_ASSERTION_PASS_THRESHOLD = require_contracts.DEFAULT_ASSERTION_PASS_THRESHOLD;
|
|
5
|
+
exports.NoOpAgentMcpIntegration = require_contracts.NoOpAgentMcpIntegration;
|
|
6
|
+
exports.deriveAssertionPassed = require_contracts.deriveAssertionPassed;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { $n as NodeExecutor, $t as TriggerNodeConfig, A as RunResult, Ai as OAuth2ProviderFromPublicConfig, An as BinaryStorageStatResult, Ar as ExecutionTelemetryFactory, At as NodeConfigBase, Bn as LiveWorkflowRepository, Br as TelemetrySpanEventRecord, Bt as NodeOutputs, C as PinnedNodeOutputsByPort, Ci as CredentialSessionService, Cn as FixedRetryPolicySpec, Cr as WebhookInvocationMatch, Ct as JsonArray, D as RunExecutionOptions, Di as CredentialTypeId, Dn as BinaryBody, Dt as JsonValue, E as RunEventPublisherDeps, Ei as CredentialTypeDefinition, En as BinaryAttachmentCreateRequest, Er as WebhookTriggerRoutingDiagnostics, Et as JsonPrimitive, F as RunTestContext, Fi as NodeConnectionName, Fn as ExecutableTriggerNode, Fr as TelemetryAttributes, Ft as NodeIdRef, Gn as NodeActivationRequestBase, Gr as NoOpExecutionTelemetryFactory, Gt as PersistedRunPolicySnapshot, Hn as NodeActivationContinuation, Hr as CodemationTelemetryMetricNames, Ht as NodeSchedulerDecision, I as WebhookRunResult, Ii as NodeId, In as ExecutionBinaryService, Ir as TelemetryChildSpanStart, It as NodeInspectorSummaryRow, Jn as NodeExecutionContext, Jr as NoOpTelemetrySpanScope, Jt as RunId, Kn as NodeActivationScheduler, Kr as NoOpExecutionTelemetry, Kt as RunDataFactory, L as WorkflowExecutionListingRepository, Li as OutputPortKey, Ln as ExecutionContext, Lr as TelemetryMetricRecord, Lt as NodeIterationId, M as RunStatus, Mn as BinaryStorageWriteResult, Mr as TelemetryArtifactAttachment, Mt as NodeErrorHandler, N as RunStopCondition, Nn as EngineDeps, Nr as TelemetryArtifactReference, Nt as NodeErrorHandlerArgs, O as RunPruneCandidate, Oi as CredentialTypeRegistry, On as BinaryStorage, Ot as MutableRunData, P as RunSummary, Pi as InputPortKey, Pn as EngineHost, Pr as TelemetryAttributePrimitive, Pt as NodeErrorHandlerSpec, Qn as NodeExecutionStatePublisher, Qr as CostTrackingTelemetry, Qt as RunnableNodeOutputJson, R as WorkflowExecutionPruneRepository, Ri as PersistedTokenId, Rn as ExecutionContextFactory, Rr as TelemetryScope, Rt as NodeKind, S as PersistedWorkflowTokenRegistryLike, Si as CredentialSessionFactoryArgs, Sn as ExponentialRetryPolicySpec, Sr as WebhookControlSignal, St as Items, T as RunCurrentState, Ti as CredentialType, Tn as RetryPolicySpec, Tr as WebhookTriggerResolution, Tt as JsonObject, Un as NodeActivationReceipt, Ur as GenAiTelemetryAttributeNames, Ut as PairedItemRef, Vn as MultiInputNode, Vr as TelemetrySpanScope, Vt as NodeRef, Wn as NodeActivationRequest, Wr as CodemationTelemetryAttributeNames, Wt as ParentExecutionRef, Xn as NodeExecutionRequestHandler, Xr as CostTrackingComponent, Xt as RunnableNodeConfig, Yn as NodeExecutionRequest, Yr as NoOpTelemetryArtifactReference, Yt as RunIdFactory, Zn as NodeExecutionScheduler, Zr as CostTrackingPriceQuote, Zt as RunnableNodeInputJson, _ as PersistedRunControlState, _i as CredentialMaterialSourceKind, _n as nodeRef, _r as WorkflowRunnerService, _t as BinaryPreviewKind, a as ConnectionInvocationId, ai as AnyCredentialType, an as WorkflowErrorHandler, ar as RunnableNodeExecuteArgs, b as PersistedWorkflowSnapshot, bi as CredentialRequirement, bn as triggerNodeOutputType, br as HttpMethod, bt as Item, c as EngineRunCounters, ci as CredentialBinding, cn as WorkflowGraphFactory, cr as TriggerNode, d as NodeExecutionSnapshot, di as CredentialHealth, dn as WorkflowPrunePolicySpec, dr as TriggerSetupStateFor, ei as CostTrackingTelemetryFactory, en as TriggerNodeOutputJson, er as NodeResolver, f as NodeExecutionStatus, fi as CredentialHealthStatus, fn as WorkflowStoragePolicyDecisionArgs, fr as TriggerSetupStateRepository, ft as TestSuiteRunId, g as PersistedMutableRunState, gi as CredentialJsonRecord, gn as branchRef, gr as WorkflowRunnerResolver, gt as BinaryAttachment, h as PersistedMutableNodeState, hi as CredentialInstanceRecord, hn as WorkflowStoragePolicySpec, hr as WorkflowRepository, ht as ActivationIdFactory, i as ConnectionInvocationAppendArgs, in as WorkflowErrorContext, ir as RunnableNode, j as RunStateResetRequest, jn as BinaryStorageWriteRequest, jr as NodeExecutionTelemetry, jt as NodeDefinition, k as RunQueueEntry, kn as BinaryStorageReadResult, kr as ExecutionTelemetry, kt as NodeActivationId, l as ExecutionFrontierPlan, li as CredentialBindingKey, ln as WorkflowNodeConnection, lr as TriggerRuntimeDiagnostics, m as PendingNodeExecution, mi as CredentialInstanceId, mn as WorkflowStoragePolicyResolver, mr as WorkflowNodeInstanceFactory, mt as TestTriggerSetupContext, n as AgentMcpToolMap, ni as CostTrackingUsageRecord, nn as UpstreamRefPlaceholder, nr as PollingTriggerHandle, o as ConnectionInvocationRecord, oi as CredentialAdvancedSectionPresentation, on as WorkflowErrorHandlerSpec, or as TestableTriggerNode, p as NodeInputsByPort, pi as CredentialHealthTester, pn as WorkflowStoragePolicyMode, pr as TriggerTestItemsContext, pt as TestTriggerNodeConfig, qn as NodeBinaryAttachmentService, qr as NoOpNodeExecutionTelemetry, qt as RunDataSnapshot, r as NeedsReconsentEvent, rn as WorkflowDefinition, rr as PreparedNodeActivationDispatch, s as CurrentStateExecutionRequest, si as CredentialAuthDefinition, sn as WorkflowGraph, sr as TriggerCleanupHandle, t as AgentMcpIntegration, tn as TriggerNodeSetupState, tr as PersistedTriggerSetupState, u as NodeExecutionError, ui as CredentialFieldSchema, un as WorkflowPolicyRuntimeDefaults, ur as TriggerSetupContext, v as PersistedRunSchedulingState, vi as CredentialOAuth2AuthDefinition, vn as runnableNodeInputType, vr as WorkflowSnapshotFactory, vt as Edge, w as RunCompletionNotifier, wi as CredentialSetupStatus, wn as NoneRetryPolicySpec, wr as WebhookTriggerMatcher, wt as JsonNonArray, x as PersistedWorkflowSnapshotNode, xi as CredentialSessionFactory, xn as triggerNodeSetupStateType, xr as TriggerInstanceId, xt as ItemBinary, y as PersistedRunState, yi as CredentialOAuth2ScopesFromPublicConfig, yn as runnableNodeOutputType, yr as WorkflowSnapshotResolver, yt as ExecutionMode, z as WorkflowExecutionRepository, zi as WorkflowId, zn as ItemNode, zr as TelemetrySpanEnd, zt as NodeOffloadPolicy } from "./agentMcpTypes-ZiNbNsEi.cjs";
|
|
2
|
+
import { C as deriveAssertionPassed, S as DEFAULT_ASSERTION_PASS_THRESHOLD, T as AgentBindError, _ as WorkItemStatus, a as ExecutionPayloadPolicyFields, b as AssertionResult, c as PersistedExecutionInstanceRecord, d as PersistedRunWorkItemRecord, f as RunIterationDto, g as WorkItemId, h as SlotExecutionStateDto, i as ExecutionInstanceId, l as PersistedRunSlotProjectionRecord, m as RunSlotProjectionState, n as ConnectionInvocationKind, o as PayloadStorageKind, p as RunRevision, r as ExecutionInstanceDto, s as PersistedExecutionInstanceKind, t as BatchId, u as PersistedRunWorkItemKind, v as WorkflowDetailSelectionState, w as NoOpAgentMcpIntegration, x as AssertionResultProvenance, y as WorkflowRunDetailDto } from "./executionPersistenceContracts-BgZMRsTa.cjs";
|
|
3
|
+
import { n as Param, r as ParamDeep, t as Expr } from "./params-B5SENSzZ.cjs";
|
|
4
|
+
import { n as CostCatalogEntry, t as CostCatalog } from "./CostCatalogContract-DZgcUBE4.cjs";
|
|
5
|
+
export { ActivationIdFactory, AgentBindError, AgentMcpIntegration, AgentMcpToolMap, type AnyCredentialType, AssertionResult, AssertionResultProvenance, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationKind, ConnectionInvocationRecord, CostCatalog, CostCatalogEntry, type CostTrackingComponent, type CostTrackingPriceQuote, type CostTrackingTelemetry, type CostTrackingTelemetryFactory, type CostTrackingUsageRecord, type CredentialAdvancedSectionPresentation, type CredentialAuthDefinition, type CredentialBinding, type CredentialBindingKey, type CredentialFieldSchema, type CredentialHealth, type CredentialHealthStatus, type CredentialHealthTester, type CredentialInstanceId, type CredentialInstanceRecord, type CredentialJsonRecord, type CredentialMaterialSourceKind, type CredentialOAuth2AuthDefinition, type CredentialOAuth2ScopesFromPublicConfig, type CredentialRequirement, type CredentialSessionFactory, type CredentialSessionFactoryArgs, type CredentialSessionService, type CredentialSetupStatus, type CredentialType, type CredentialTypeDefinition, type CredentialTypeId, type CredentialTypeRegistry, CurrentStateExecutionRequest, DEFAULT_ASSERTION_PASS_THRESHOLD, Edge, EngineDeps, EngineHost, EngineRunCounters, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExecutionTelemetry, ExecutionTelemetryFactory, ExponentialRetryPolicySpec, Expr, FixedRetryPolicySpec, GenAiTelemetryAttributeNames, HttpMethod, InputPortKey, Item, ItemBinary, ItemNode, Items, JsonArray, JsonNonArray, JsonObject, JsonPrimitive, JsonValue, LiveWorkflowRepository, MultiInputNode, MutableRunData, NeedsReconsentEvent, NoOpAgentMcpIntegration, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutionTelemetry, NodeExecutor, NodeId, NodeIdRef, NodeInputsByPort, NodeInspectorSummaryRow, NodeIterationId, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, type OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, Param, ParamDeep, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PollingTriggerHandle, PreparedNodeActivationDispatch, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEventPublisherDeps, RunExecutionOptions, RunId, RunIdFactory, RunIterationDto, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunTestContext, RunnableNode, RunnableNodeConfig, RunnableNodeExecuteArgs, RunnableNodeInputJson, RunnableNodeOutputJson, SlotExecutionStateDto, TelemetryArtifactAttachment, TelemetryArtifactReference, TelemetryAttributePrimitive, TelemetryAttributes, TelemetryChildSpanStart, TelemetryMetricRecord, TelemetryScope, TelemetrySpanEnd, TelemetrySpanEventRecord, TelemetrySpanScope, TestSuiteRunId, TestTriggerNodeConfig, TestTriggerSetupContext, TestableTriggerNode, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, UpstreamRefPlaceholder, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WorkItemId, WorkItemStatus, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, branchRef, deriveAssertionPassed, nodeRef, runnableNodeInputType, runnableNodeOutputType, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as CostCatalogEntry, $a as NodeId, $i as TelemetryChildSpanStart, $n as NodeInspectorSummaryRow, $r as ExecutionBinaryService, $t as WebhookRunResult, Aa as CredentialHealthTester, Ai as TriggerTestItemsContext, An as TestTriggerNodeConfig, Ar as WorkflowStoragePolicyMode, At as NodeInputsByPort, B as PersistedExecutionInstanceRecord, Ba as CredentialSessionService, Bi as WebhookInvocationMatch, Bn as JsonArray, Br as FixedRetryPolicySpec, Bt as PinnedNodeOutputsByPort, Ca as CredentialAdvancedSectionPresentation, Ci as TestableTriggerNode, Cr as WorkflowErrorHandlerSpec, Ct as ConnectionInvocationRecord, Da as CredentialFieldSchema, Di as TriggerSetupContext, Dr as WorkflowPolicyRuntimeDefaults, Dt as NodeExecutionError, Ea as CredentialBindingKey, Ei as TriggerRuntimeDiagnostics, Er as WorkflowNodeConnection, Et as ExecutionFrontierPlan, F as ExecutionInstanceDto, Fa as CredentialOAuth2AuthDefinition, Fi as WorkflowSnapshotFactory, Fn as Edge, Fr as runnableNodeInputType, Ft as PersistedRunSchedulingState, G as RunRevision, Ga as CredentialTypeRegistry, Gn as MutableRunData, Gr as BinaryStorage, Gt as RunPruneCandidate, H as PersistedRunWorkItemKind, Ha as CredentialType, Hi as WebhookTriggerResolution, Hn as JsonObject, Hr as RetryPolicySpec, Ht as RunCurrentState, I as ExecutionInstanceId, Ia as CredentialOAuth2ScopesFromPublicConfig, Ii as WorkflowSnapshotResolver, In as ExecutionMode, Ir as runnableNodeOutputType, It as PersistedRunState, J as WorkItemId, Ji as NodeExecutionTelemetry, Jn as NodeDefinition, Jr as BinaryStorageWriteRequest, Jt as RunStateResetRequest, K as RunSlotProjectionState, Ki as ExecutionTelemetry, Kn as NodeActivationId, Kr as BinaryStorageReadResult, Kt as RunQueueEntry, L as ExecutionPayloadPolicyFields, La as CredentialRequirement, Li as HttpMethod, Ln as Item, Lr as triggerNodeOutputType, Lt as PersistedWorkflowSnapshot, Ma as CredentialInstanceRecord, Mi as WorkflowRepository, Mn as ActivationIdFactory, Mr as WorkflowStoragePolicySpec, Mt as PersistedMutableNodeState, N as BatchId, Na as CredentialJsonRecord, Ni as WorkflowRunnerResolver, Nn as BinaryAttachment, Nr as branchRef, Nt as PersistedMutableRunState, Oa as CredentialHealth, Oi as TriggerSetupStateFor, Or as WorkflowPrunePolicySpec, Ot as NodeExecutionSnapshot, P as ConnectionInvocationKind, Pa as CredentialMaterialSourceKind, Pi as WorkflowRunnerService, Pn as BinaryPreviewKind, Pr as nodeRef, Pt as PersistedRunControlState, Q as CostCatalog, Qa as NodeConnectionName, Qi as TelemetryAttributes, Qn as NodeIdRef, Qr as ExecutableTriggerNode, Qt as RunTestContext, R as PayloadStorageKind, Ra as CredentialSessionFactory, Ri as TriggerInstanceId, Rn as ItemBinary, Rr as triggerNodeSetupStateType, Rt as PersistedWorkflowSnapshotNode, Sa as AnyCredentialType, Si as RunnableNodeExecuteArgs, Sr as WorkflowErrorHandler, St as ConnectionInvocationId, Ta as CredentialBinding, Ti as TriggerNode, Tr as WorkflowGraphFactory, Tt as EngineRunCounters, U as PersistedRunWorkItemRecord, Ua as CredentialTypeDefinition, Ui as WebhookTriggerRoutingDiagnostics, Un as JsonPrimitive, Ur as BinaryAttachmentCreateRequest, Ut as RunEventPublisherDeps, V as PersistedRunSlotProjectionRecord, Va as CredentialSetupStatus, Vi as WebhookTriggerMatcher, Vn as JsonNonArray, Vr as NoneRetryPolicySpec, Vt as RunCompletionNotifier, W as RunIterationDto, Wa as CredentialTypeId, Wn as JsonValue, Wr as BinaryBody, Wt as RunExecutionOptions, X as WorkflowDetailSelectionState, Xi as TelemetryArtifactReference, Xn as NodeErrorHandlerArgs, Xr as EngineDeps, Xt as RunStopCondition, Y as WorkItemStatus, Yi as TelemetryArtifactAttachment, Yn as NodeErrorHandler, Yr as BinaryStorageWriteResult, Yt as RunStatus, Z as WorkflowRunDetailDto, Za as InputPortKey, Zi as TelemetryAttributePrimitive, Zn as NodeErrorHandlerSpec, Zr as EngineHost, Zt as RunSummary, _a as CostTrackingTelemetryFactory, _i as NodeResolver, _r as TriggerNodeOutputJson, _t as AgentBindError, aa as CodemationTelemetryMetricNames, ai as NodeActivationContinuation, ar as NodeSchedulerDecision, bi as PreparedNodeActivationDispatch, br as WorkflowDefinition, bt as NeedsReconsentEvent, ca as NoOpExecutionTelemetryFactory, ci as NodeActivationRequestBase, cr as PersistedRunPolicySnapshot, da as NoOpTelemetrySpanScope, di as NodeExecutionContext, dr as RunId, ea as TelemetryMetricRecord, ei as ExecutionContext, en as WorkflowExecutionListingRepository, eo as OutputPortKey, er as NodeIterationId, et as Expr, fa as NoOpTelemetryArtifactReference, fi as NodeExecutionRequest, fr as RunIdFactory, ft as AssertionResult, gi as NodeExecutor, gr as TriggerNodeConfig, gt as NoOpAgentMcpIntegration, ha as CostTrackingTelemetry, hi as NodeExecutionStatePublisher, hr as RunnableNodeOutputJson, ht as deriveAssertionPassed, ia as TelemetrySpanScope, ii as MultiInputNode, ir as NodeRef, ja as CredentialInstanceId, ji as WorkflowNodeInstanceFactory, jn as TestTriggerSetupContext, jr as WorkflowStoragePolicyResolver, jt as PendingNodeExecution, ka as CredentialHealthStatus, ki as TriggerSetupStateRepository, kn as TestSuiteRunId, kr as WorkflowStoragePolicyDecisionArgs, kt as NodeExecutionStatus, la as NoOpExecutionTelemetry, li as NodeActivationScheduler, lr as RunDataFactory, ma as CostTrackingPriceQuote, mi as NodeExecutionScheduler, mr as RunnableNodeInputJson, mt as DEFAULT_ASSERTION_PASS_THRESHOLD, na as TelemetrySpanEnd, ni as ItemNode, nn as WorkflowExecutionRepository, no as WorkflowId, nr as NodeOffloadPolicy, nt as ParamDeep, oa as GenAiTelemetryAttributeNames, oi as NodeActivationReceipt, or as PairedItemRef, pa as CostTrackingComponent, pi as NodeExecutionRequestHandler, pr as RunnableNodeConfig, pt as AssertionResultProvenance, q as SlotExecutionStateDto, qa as OAuth2ProviderFromPublicConfig, qi as ExecutionTelemetryFactory, qn as NodeConfigBase, qr as BinaryStorageStatResult, qt as RunResult, ra as TelemetrySpanEventRecord, ri as LiveWorkflowRepository, rr as NodeOutputs, sa as CodemationTelemetryAttributeNames, si as NodeActivationRequest, sr as ParentExecutionRef, ta as TelemetryScope, ti as ExecutionContextFactory, tn as WorkflowExecutionPruneRepository, to as PersistedTokenId, tr as NodeKind, tt as Param, ua as NoOpNodeExecutionTelemetry, ui as NodeBinaryAttachmentService, ur as RunDataSnapshot, vi as PersistedTriggerSetupState, vr as TriggerNodeSetupState, vt as AgentMcpIntegration, wa as CredentialAuthDefinition, wi as TriggerCleanupHandle, wr as WorkflowGraph, wt as CurrentStateExecutionRequest, xi as RunnableNode, xr as WorkflowErrorContext, xt as ConnectionInvocationAppendArgs, ya as CostTrackingUsageRecord, yi as PollingTriggerHandle, yr as UpstreamRefPlaceholder, yt as AgentMcpToolMap, z as PersistedExecutionInstanceKind, za as CredentialSessionFactoryArgs, zi as WebhookControlSignal, zn as Items, zr as ExponentialRetryPolicySpec, zt as PersistedWorkflowTokenRegistryLike } from "./index-zWGtEhrf.js";
|
|
2
|
+
export { ActivationIdFactory, AgentBindError, AgentMcpIntegration, AgentMcpToolMap, AnyCredentialType, AssertionResult, AssertionResultProvenance, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationKind, ConnectionInvocationRecord, CostCatalog, CostCatalogEntry, CostTrackingComponent, CostTrackingPriceQuote, CostTrackingTelemetry, CostTrackingTelemetryFactory, CostTrackingUsageRecord, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CurrentStateExecutionRequest, DEFAULT_ASSERTION_PASS_THRESHOLD, Edge, EngineDeps, EngineHost, EngineRunCounters, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExecutionTelemetry, ExecutionTelemetryFactory, ExponentialRetryPolicySpec, Expr, FixedRetryPolicySpec, GenAiTelemetryAttributeNames, HttpMethod, InputPortKey, Item, ItemBinary, ItemNode, Items, JsonArray, JsonNonArray, JsonObject, JsonPrimitive, JsonValue, LiveWorkflowRepository, MultiInputNode, MutableRunData, NeedsReconsentEvent, NoOpAgentMcpIntegration, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutionTelemetry, NodeExecutor, NodeId, NodeIdRef, NodeInputsByPort, NodeInspectorSummaryRow, NodeIterationId, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, Param, ParamDeep, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PollingTriggerHandle, PreparedNodeActivationDispatch, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEventPublisherDeps, RunExecutionOptions, RunId, RunIdFactory, RunIterationDto, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunTestContext, RunnableNode, RunnableNodeConfig, RunnableNodeExecuteArgs, RunnableNodeInputJson, RunnableNodeOutputJson, SlotExecutionStateDto, TelemetryArtifactAttachment, TelemetryArtifactReference, TelemetryAttributePrimitive, TelemetryAttributes, TelemetryChildSpanStart, TelemetryMetricRecord, TelemetryScope, TelemetrySpanEnd, TelemetrySpanEventRecord, TelemetrySpanScope, TestSuiteRunId, TestTriggerNodeConfig, TestTriggerSetupContext, TestableTriggerNode, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, UpstreamRefPlaceholder, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WorkItemId, WorkItemStatus, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, branchRef, deriveAssertionPassed, nodeRef, runnableNodeInputType, runnableNodeOutputType, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { container as container$1, delay, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, predicateAwareClassFactory, registry, singleton } from "tsyringe";
|
|
3
|
+
|
|
4
|
+
//#region src/workflow/definition/ConnectionNodeIdFactory.ts
|
|
5
|
+
/**
|
|
6
|
+
* Deterministic ids for workflow connection-owned child nodes (LLM slot, tools, etc.).
|
|
7
|
+
* These are stable across loads.
|
|
8
|
+
*/
|
|
9
|
+
var ConnectionNodeIdFactory = class {
|
|
10
|
+
static connectionSegment = "__conn__";
|
|
11
|
+
static languageModelConnectionNodeId(parentNodeId) {
|
|
12
|
+
return `${parentNodeId}${this.connectionSegment}llm`;
|
|
13
|
+
}
|
|
14
|
+
static toolConnectionNodeId(parentNodeId, toolName) {
|
|
15
|
+
const normalized = this.normalizeToolName(toolName);
|
|
16
|
+
return `${parentNodeId}${this.connectionSegment}tool${this.connectionSegment}${normalized}`;
|
|
17
|
+
}
|
|
18
|
+
static mcpConnectionNodeId(parentNodeId, serverId) {
|
|
19
|
+
return `${parentNodeId}${this.connectionSegment}mcp${this.connectionSegment}${serverId}`;
|
|
20
|
+
}
|
|
21
|
+
static isMcpConnectionNodeId(nodeId) {
|
|
22
|
+
return nodeId.includes(`${this.connectionSegment}mcp${this.connectionSegment}`);
|
|
23
|
+
}
|
|
24
|
+
static parseMcpConnectionNodeId(nodeId) {
|
|
25
|
+
if (!this.isMcpConnectionNodeId(nodeId)) return;
|
|
26
|
+
const marker = `${this.connectionSegment}mcp${this.connectionSegment}`;
|
|
27
|
+
const idx = nodeId.lastIndexOf(marker);
|
|
28
|
+
if (idx < 0) return;
|
|
29
|
+
const parentNodeId = nodeId.slice(0, idx);
|
|
30
|
+
const serverId = nodeId.slice(idx + marker.length);
|
|
31
|
+
if (!parentNodeId || !serverId) return;
|
|
32
|
+
return {
|
|
33
|
+
parentNodeId,
|
|
34
|
+
serverId
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static isLanguageModelConnectionNodeId(nodeId) {
|
|
38
|
+
return nodeId.endsWith(`${this.connectionSegment}llm`);
|
|
39
|
+
}
|
|
40
|
+
static isToolConnectionNodeId(nodeId) {
|
|
41
|
+
return nodeId.includes(`${this.connectionSegment}tool${this.connectionSegment}`);
|
|
42
|
+
}
|
|
43
|
+
static parseLanguageModelConnectionNodeId(nodeId) {
|
|
44
|
+
if (!this.isLanguageModelConnectionNodeId(nodeId)) return;
|
|
45
|
+
const suffix = `${this.connectionSegment}llm`;
|
|
46
|
+
const parentNodeId = nodeId.slice(0, -suffix.length);
|
|
47
|
+
return parentNodeId ? { parentNodeId } : void 0;
|
|
48
|
+
}
|
|
49
|
+
static parseToolConnectionNodeId(nodeId) {
|
|
50
|
+
if (!this.isToolConnectionNodeId(nodeId)) return;
|
|
51
|
+
const marker = `${this.connectionSegment}tool${this.connectionSegment}`;
|
|
52
|
+
const idx = nodeId.lastIndexOf(marker);
|
|
53
|
+
if (idx < 0) return;
|
|
54
|
+
const parentNodeId = nodeId.slice(0, idx);
|
|
55
|
+
const normalizedToolName = nodeId.slice(idx + marker.length);
|
|
56
|
+
if (!parentNodeId || !normalizedToolName) return;
|
|
57
|
+
return {
|
|
58
|
+
parentNodeId,
|
|
59
|
+
normalizedToolName
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** True when `nodeId` is a connection-owned child of `parentNodeId` (LLM or tool slot). */
|
|
63
|
+
static isConnectionOwnedDescendantOf(parentNodeId, nodeId) {
|
|
64
|
+
return nodeId.startsWith(`${parentNodeId}${this.connectionSegment}`);
|
|
65
|
+
}
|
|
66
|
+
/** Normalizes a tool display name to a stable id segment. */
|
|
67
|
+
static normalizeToolName(toolName) {
|
|
68
|
+
return toolName.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "tool";
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/contracts/itemExpr.ts
|
|
74
|
+
const ITEM_EXPR_BRAND = Symbol.for("codemation.itemExpr");
|
|
75
|
+
function itemExpr(fn) {
|
|
76
|
+
return {
|
|
77
|
+
[ITEM_EXPR_BRAND]: true,
|
|
78
|
+
fn
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function isItemExpr(value) {
|
|
82
|
+
if (typeof value !== "object" || value === null) return false;
|
|
83
|
+
const v = value;
|
|
84
|
+
if (v[ITEM_EXPR_BRAND] === true) return true;
|
|
85
|
+
const keys = Object.keys(v);
|
|
86
|
+
if (keys.length === 1 && keys[0] === "fn" && typeof v.fn === "function") return true;
|
|
87
|
+
for (const sym of Object.getOwnPropertySymbols(v)) if (sym.description === "codemation.itemExpr" && v[sym] === true) return true;
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
function containsItemExprInUnknown(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
91
|
+
if (isItemExpr(value)) return true;
|
|
92
|
+
if (value === null || typeof value !== "object") return false;
|
|
93
|
+
if (seen.has(value)) return false;
|
|
94
|
+
seen.add(value);
|
|
95
|
+
if (Array.isArray(value)) return value.some((entry) => containsItemExprInUnknown(entry, seen));
|
|
96
|
+
for (const entry of Object.values(value)) if (containsItemExprInUnknown(entry, seen)) return true;
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Deep-resolves {@link itemExpr} leaves. Returns a new graph (does not mutate the original config object).
|
|
101
|
+
*/
|
|
102
|
+
async function resolveItemExprsInUnknown(value, args, seen = /* @__PURE__ */ new WeakSet()) {
|
|
103
|
+
if (isItemExpr(value)) return await Promise.resolve(value.fn(args));
|
|
104
|
+
if (value === null || typeof value !== "object") return value;
|
|
105
|
+
if (seen.has(value)) return value;
|
|
106
|
+
seen.add(value);
|
|
107
|
+
if (Array.isArray(value)) {
|
|
108
|
+
const out$1 = [];
|
|
109
|
+
for (let i = 0; i < value.length; i++) out$1.push(await resolveItemExprsInUnknown(value[i], args, seen));
|
|
110
|
+
return out$1;
|
|
111
|
+
}
|
|
112
|
+
const rec = value;
|
|
113
|
+
const entries = Object.entries(rec);
|
|
114
|
+
const proto = Object.getPrototypeOf(value);
|
|
115
|
+
if (proto !== Object.prototype && proto !== null && entries.length === 0) return value;
|
|
116
|
+
const out = Object.create(proto);
|
|
117
|
+
for (const [k, v] of entries) out[k] = await resolveItemExprsInUnknown(v, args, seen);
|
|
118
|
+
return out;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Clones runnable config (best-effort) so per-item {@link itemExpr} resolution never mutates shared instances.
|
|
122
|
+
*/
|
|
123
|
+
async function resolveItemExprsForExecution(config, nodeCtx, item, itemIndex, items) {
|
|
124
|
+
const exprArgs = {
|
|
125
|
+
item,
|
|
126
|
+
itemIndex,
|
|
127
|
+
items,
|
|
128
|
+
ctx: {
|
|
129
|
+
runId: nodeCtx.runId,
|
|
130
|
+
workflowId: nodeCtx.workflowId,
|
|
131
|
+
nodeId: nodeCtx.nodeId,
|
|
132
|
+
activationId: nodeCtx.activationId,
|
|
133
|
+
data: nodeCtx.data
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
if (!containsItemExprInUnknown(config)) return;
|
|
137
|
+
return await resolveItemExprsInUnknown(config, exprArgs);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/ai/AgentConfigInspectorFactory.ts
|
|
142
|
+
var AgentConfigInspector = class {
|
|
143
|
+
static isAgentNodeConfig(config) {
|
|
144
|
+
if (!config) return false;
|
|
145
|
+
const candidate = config;
|
|
146
|
+
return !!candidate.chatModel && this.hasCompatibleMessageConfiguration(candidate);
|
|
147
|
+
}
|
|
148
|
+
static hasCompatibleMessageConfiguration(candidate) {
|
|
149
|
+
const messages = candidate.messages;
|
|
150
|
+
if (messages === void 0 || messages === null) return false;
|
|
151
|
+
if (Array.isArray(messages)) return messages.length > 0;
|
|
152
|
+
if (typeof messages === "object") {
|
|
153
|
+
if (isItemExpr(messages)) return true;
|
|
154
|
+
const o = messages;
|
|
155
|
+
return Array.isArray(o.prompt) && o.prompt.length > 0 || typeof o.buildMessages === "function";
|
|
156
|
+
}
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/ai/NodeBackedToolConfig.ts
|
|
163
|
+
var NodeBackedToolConfig = class {
|
|
164
|
+
type;
|
|
165
|
+
toolKind = "nodeBacked";
|
|
166
|
+
description;
|
|
167
|
+
presentation;
|
|
168
|
+
inputSchemaValue;
|
|
169
|
+
outputSchemaValue;
|
|
170
|
+
mapInputValue;
|
|
171
|
+
mapOutputValue;
|
|
172
|
+
constructor(name, node, options) {
|
|
173
|
+
this.name = name;
|
|
174
|
+
this.node = node;
|
|
175
|
+
this.type = node.type;
|
|
176
|
+
this.description = options.description;
|
|
177
|
+
this.presentation = options.presentation;
|
|
178
|
+
this.inputSchemaValue = options.inputSchema;
|
|
179
|
+
this.outputSchemaValue = options.outputSchema;
|
|
180
|
+
this.mapInputValue = options.mapInput;
|
|
181
|
+
this.mapOutputValue = options.mapOutput;
|
|
182
|
+
}
|
|
183
|
+
getCredentialRequirements() {
|
|
184
|
+
return this.node.getCredentialRequirements?.() ?? [];
|
|
185
|
+
}
|
|
186
|
+
getInputSchema() {
|
|
187
|
+
return this.inputSchemaValue;
|
|
188
|
+
}
|
|
189
|
+
getOutputSchema() {
|
|
190
|
+
return this.outputSchemaValue;
|
|
191
|
+
}
|
|
192
|
+
toNodeItem(args) {
|
|
193
|
+
const mapped = this.mapInputValue?.(args) ?? args.input;
|
|
194
|
+
if (this.isItem(mapped)) return mapped;
|
|
195
|
+
return { json: mapped };
|
|
196
|
+
}
|
|
197
|
+
toToolOutput(args) {
|
|
198
|
+
const raw = this.mapOutputValue?.(args) ?? this.readDefaultToolOutput(args.outputs);
|
|
199
|
+
return this.outputSchemaValue.parse(raw);
|
|
200
|
+
}
|
|
201
|
+
readDefaultToolOutput(outputs) {
|
|
202
|
+
const firstMainItem = outputs.main?.[0];
|
|
203
|
+
if (!firstMainItem) throw new Error(`Node-backed tool "${this.name}" did not produce a main output item.`);
|
|
204
|
+
return firstMainItem.json;
|
|
205
|
+
}
|
|
206
|
+
isItem(value) {
|
|
207
|
+
return typeof value === "object" && value !== null && "json" in value;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/ai/AgentConnectionNodeCollector.ts
|
|
213
|
+
const AgentConnectionNodeCollector = new class {
|
|
214
|
+
collect(parentNodeId, agentConfig, mcpServerResolver) {
|
|
215
|
+
const collected = [];
|
|
216
|
+
this.collectInto(parentNodeId, agentConfig, collected, mcpServerResolver);
|
|
217
|
+
return collected;
|
|
218
|
+
}
|
|
219
|
+
collectInto(parentNodeId, agentConfig, collected, mcpServerResolver) {
|
|
220
|
+
collected.push({
|
|
221
|
+
nodeId: ConnectionNodeIdFactory.languageModelConnectionNodeId(parentNodeId),
|
|
222
|
+
parentNodeId,
|
|
223
|
+
connectionName: "llm",
|
|
224
|
+
role: "languageModel",
|
|
225
|
+
name: agentConfig.chatModel.presentation?.label ?? agentConfig.chatModel.name,
|
|
226
|
+
typeName: agentConfig.chatModel.name,
|
|
227
|
+
icon: agentConfig.chatModel.presentation?.icon,
|
|
228
|
+
credentialSource: agentConfig.chatModel
|
|
229
|
+
});
|
|
230
|
+
for (const tool of agentConfig.tools ?? []) {
|
|
231
|
+
const toolNodeId = ConnectionNodeIdFactory.toolConnectionNodeId(parentNodeId, tool.name);
|
|
232
|
+
const isNestedAgent = this.isNodeBackedAgentTool(tool);
|
|
233
|
+
collected.push({
|
|
234
|
+
nodeId: toolNodeId,
|
|
235
|
+
parentNodeId,
|
|
236
|
+
connectionName: "tools",
|
|
237
|
+
role: isNestedAgent ? "nestedAgent" : "tool",
|
|
238
|
+
name: tool.presentation?.label ?? tool.name,
|
|
239
|
+
typeName: tool.name,
|
|
240
|
+
icon: tool.presentation?.icon,
|
|
241
|
+
credentialSource: tool
|
|
242
|
+
});
|
|
243
|
+
this.collectNestedAgentTools(toolNodeId, tool, collected, mcpServerResolver);
|
|
244
|
+
}
|
|
245
|
+
if (mcpServerResolver) {
|
|
246
|
+
const mcpServers = agentConfig.mcpServers;
|
|
247
|
+
for (const serverId of mcpServers ?? []) {
|
|
248
|
+
const decl = mcpServerResolver(serverId);
|
|
249
|
+
if (!decl) continue;
|
|
250
|
+
const acceptedTypes = decl.acceptedCredentialTypes ?? [];
|
|
251
|
+
collected.push({
|
|
252
|
+
nodeId: ConnectionNodeIdFactory.mcpConnectionNodeId(parentNodeId, serverId),
|
|
253
|
+
parentNodeId,
|
|
254
|
+
connectionName: "tools",
|
|
255
|
+
role: "tool",
|
|
256
|
+
name: decl.displayName,
|
|
257
|
+
typeName: "MCP server",
|
|
258
|
+
icon: "lucide:plug",
|
|
259
|
+
credentialSource: { getCredentialRequirements: () => [{
|
|
260
|
+
slotKey: "credential",
|
|
261
|
+
label: decl.displayName,
|
|
262
|
+
acceptedTypes
|
|
263
|
+
}] }
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
collectNestedAgentTools(toolNodeId, tool, collected, mcpServerResolver) {
|
|
269
|
+
if (!this.isNodeBackedAgentTool(tool)) return;
|
|
270
|
+
const innerAgent = tool instanceof NodeBackedToolConfig ? tool.node : tool.node;
|
|
271
|
+
this.collectInto(toolNodeId, innerAgent, collected, mcpServerResolver);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* After JSON round-trip (persisted snapshots), tools are plain objects — `instanceof NodeBackedToolConfig` fails.
|
|
275
|
+
* Detect node-backed tools structurally via {@link NodeBackedToolConfig#toolKind}.
|
|
276
|
+
*/
|
|
277
|
+
isNodeBackedAgentTool(tool) {
|
|
278
|
+
if (tool instanceof NodeBackedToolConfig) return AgentConfigInspector.isAgentNodeConfig(tool.node);
|
|
279
|
+
if (!tool || typeof tool !== "object") return false;
|
|
280
|
+
const t = tool;
|
|
281
|
+
if (t.toolKind !== "nodeBacked") return false;
|
|
282
|
+
return AgentConfigInspector.isAgentNodeConfig(t.node);
|
|
283
|
+
}
|
|
284
|
+
}();
|
|
285
|
+
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region src/workflow/definition/NodeIterationIdFactory.ts
|
|
288
|
+
/**
|
|
289
|
+
* Unique ids for one per-item iteration of a runnable node's execute loop.
|
|
290
|
+
*
|
|
291
|
+
* Activations are per-batch (one scheduled execution of a node, possibly with N items).
|
|
292
|
+
* Iterations refine that to one identifier per item-index inside the batch loop, so per-item
|
|
293
|
+
* connection invocations and telemetry can be grouped without time-window heuristics.
|
|
294
|
+
*
|
|
295
|
+
* Uses Web Crypto's `randomUUID` (Node 19+ and all modern browsers) so this module is safe
|
|
296
|
+
* to include in the browser entry. Importing `node:crypto` here previously leaked into the
|
|
297
|
+
* canvas client bundle through `browser.ts` and OOM'd consumers' Turbopack builds.
|
|
298
|
+
*/
|
|
299
|
+
var NodeIterationIdFactory = class {
|
|
300
|
+
static create() {
|
|
301
|
+
return `iter_${globalThis.crypto.randomUUID()}`;
|
|
302
|
+
}
|
|
303
|
+
/** Deterministic id for tests when a stable sequence is needed. */
|
|
304
|
+
static createForTest(seed, sequence) {
|
|
305
|
+
return `iter_${seed}_${sequence}`;
|
|
306
|
+
}
|
|
307
|
+
/** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
|
|
308
|
+
static createForConnection(connectionNodeId, sequence) {
|
|
309
|
+
return `iter_${connectionNodeId}_${sequence}`;
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
|
|
313
|
+
//#endregion
|
|
314
|
+
//#region src/contracts/credentialTypes.ts
|
|
315
|
+
var CredentialUnboundError = class CredentialUnboundError extends Error {
|
|
316
|
+
constructor(bindingKey, acceptedTypes = []) {
|
|
317
|
+
super(CredentialUnboundError.createMessage(bindingKey, acceptedTypes));
|
|
318
|
+
this.bindingKey = bindingKey;
|
|
319
|
+
this.acceptedTypes = acceptedTypes;
|
|
320
|
+
this.name = "CredentialUnboundError";
|
|
321
|
+
}
|
|
322
|
+
static createMessage(bindingKey, acceptedTypes) {
|
|
323
|
+
const acceptedTypesSuffix = acceptedTypes.length > 0 ? ` Accepted credential types: ${acceptedTypes.join(", ")}.` : "";
|
|
324
|
+
return `Credential slot "${bindingKey.slotKey}" is not bound for workflow ${bindingKey.workflowId} node ${bindingKey.nodeId}.${acceptedTypesSuffix}`;
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
//#endregion
|
|
329
|
+
//#region src/contracts/runFinishedAtFactory.ts
|
|
330
|
+
/** Derives workflow end time from persisted run root or node snapshots for run listings. */
|
|
331
|
+
var RunFinishedAtFactory = class {
|
|
332
|
+
static resolveIso(state) {
|
|
333
|
+
if (state.finishedAt && state.status !== "running" && state.status !== "pending") return state.finishedAt;
|
|
334
|
+
if (state.status === "running" || state.status === "pending") return;
|
|
335
|
+
let max;
|
|
336
|
+
for (const snap of Object.values(state.nodeSnapshotsByNodeId)) if (snap?.finishedAt && (!max || snap.finishedAt > max)) max = snap.finishedAt;
|
|
337
|
+
return max;
|
|
338
|
+
}
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/contracts/workflowTypes.ts
|
|
343
|
+
function nodeRef(nodeId) {
|
|
344
|
+
return nodeId;
|
|
345
|
+
}
|
|
346
|
+
const branchRef = (index) => `$${index}`;
|
|
347
|
+
|
|
348
|
+
//#endregion
|
|
349
|
+
//#region src/di/CoreTokens.ts
|
|
350
|
+
const CoreTokens = {
|
|
351
|
+
PersistedWorkflowTokenRegistry: Symbol.for("codemation.core.PersistedWorkflowTokenRegistry"),
|
|
352
|
+
CredentialSessionService: Symbol.for("codemation.core.CredentialSessionService"),
|
|
353
|
+
CredentialTypeRegistry: Symbol.for("codemation.core.CredentialTypeRegistry"),
|
|
354
|
+
WorkflowRunnerService: Symbol.for("codemation.core.WorkflowRunnerService"),
|
|
355
|
+
LiveWorkflowRepository: Symbol.for("codemation.core.LiveWorkflowRepository"),
|
|
356
|
+
WorkflowRepository: Symbol.for("codemation.core.WorkflowRepository"),
|
|
357
|
+
NodeResolver: Symbol.for("codemation.core.NodeResolver"),
|
|
358
|
+
WorkflowNodeInstanceFactory: Symbol.for("codemation.core.WorkflowNodeInstanceFactory"),
|
|
359
|
+
RunIdFactory: Symbol.for("codemation.core.RunIdFactory"),
|
|
360
|
+
ActivationIdFactory: Symbol.for("codemation.core.ActivationIdFactory"),
|
|
361
|
+
WorkflowExecutionRepository: Symbol.for("codemation.core.WorkflowExecutionRepository"),
|
|
362
|
+
TriggerSetupStateRepository: Symbol.for("codemation.core.TriggerSetupStateRepository"),
|
|
363
|
+
NodeActivationScheduler: Symbol.for("codemation.core.NodeActivationScheduler"),
|
|
364
|
+
RunDataFactory: Symbol.for("codemation.core.RunDataFactory"),
|
|
365
|
+
ExecutionContextFactory: Symbol.for("codemation.core.ExecutionContextFactory"),
|
|
366
|
+
RunEventBus: Symbol.for("codemation.core.RunEventBus"),
|
|
367
|
+
BinaryStorage: Symbol.for("codemation.core.BinaryStorage"),
|
|
368
|
+
WebhookBasePath: Symbol.for("codemation.core.WebhookBasePath"),
|
|
369
|
+
EngineExecutionLimitsPolicy: Symbol.for("codemation.core.EngineExecutionLimitsPolicy"),
|
|
370
|
+
WorkflowActivationPolicy: Symbol.for("codemation.core.WorkflowActivationPolicy"),
|
|
371
|
+
AgentMcpIntegration: Symbol.for("codemation.core.AgentMcpIntegration")
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
//#endregion
|
|
375
|
+
export { resolveItemExprsInUnknown as C, resolveItemExprsForExecution as S, AgentConnectionNodeCollector as _, injectable as a, isItemExpr as b, predicateAwareClassFactory as c, CoreTokens as d, branchRef as f, NodeIterationIdFactory as g, CredentialUnboundError as h, injectAll as i, registry as l, RunFinishedAtFactory as m, delay as n, instanceCachingFactory as o, nodeRef as p, inject as r, instancePerContainerCachingFactory as s, container$1 as t, singleton as u, NodeBackedToolConfig as v, ConnectionNodeIdFactory as w, itemExpr as x, AgentConfigInspector as y };
|
|
376
|
+
//# sourceMappingURL=di-0Wop7z1y.js.map
|