@codemation/core 0.13.2 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +167 -0
- package/dist/{CostCatalogContract-Dxq1BTyi.d.cts → CostCatalogContract-Dwo-ZamG.d.cts} +2 -2
- package/dist/EngineRuntimeRegistration.types-BiNasx3G.d.cts +54 -0
- package/dist/EngineRuntimeRegistration.types-Dq4ucrdo.d.ts +21 -0
- package/dist/{InMemoryRunDataFactory-Csy2evr_.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts} +4 -20
- package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs.map → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs.map} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js → InMemoryRunEventBusRegistry-Layt2xgm.js} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js.map → InMemoryRunEventBusRegistry-Layt2xgm.js.map} +1 -1
- package/dist/{ItemsInputNormalizer-Bi8m-Ijs.d.cts → ItemsInputNormalizer-A5txcOWX.d.cts} +3 -98
- package/dist/{ItemsInputNormalizer-BbQTSEkZ.cjs → ItemsInputNormalizer-C1fv3sMW.cjs} +2 -2
- package/dist/ItemsInputNormalizer-C1fv3sMW.cjs.map +1 -0
- package/dist/{ItemsInputNormalizer-BYljnXU0.d.ts → ItemsInputNormalizer-D2vrMrX1.d.ts} +2 -62
- package/dist/{ItemsInputNormalizer-CSZGMgl3.js → ItemsInputNormalizer-fUYo4GLV.js} +2 -2
- package/dist/ItemsInputNormalizer-fUYo4GLV.js.map +1 -0
- package/dist/{RunIntentService-BitgkKaT.d.cts → RunIntentService-DKxuHTUz.d.cts} +2 -15
- package/dist/{RunIntentService-DYpqfu6D.d.ts → RunIntentService-DrpKli2k.d.ts} +2 -22
- package/dist/{agentMcpTypes-DGIwk6Ue.d.cts → agentMcpTypes-BHX4RQCC.d.cts} +25 -518
- package/dist/bootstrap/index.cjs +9 -5
- package/dist/bootstrap/index.d.cts +32 -106
- package/dist/bootstrap/index.d.ts +18 -17
- package/dist/bootstrap/index.js +6 -5
- package/dist/{bootstrap-DIv-vloi.cjs → bootstrap-CTB53rEF.cjs} +9 -60
- package/dist/bootstrap-CTB53rEF.cjs.map +1 -0
- package/dist/{bootstrap-Bkd-Nfbn.js → bootstrap-DmqKheCI.js} +6 -57
- package/dist/bootstrap-DmqKheCI.js.map +1 -0
- package/dist/browser.cjs +12 -11
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +3 -2
- package/dist/contracts-7L1wJHdk.cjs +569 -0
- package/dist/contracts-7L1wJHdk.cjs.map +1 -0
- package/dist/contracts-CjJ5CZ7N.js +447 -0
- package/dist/contracts-CjJ5CZ7N.js.map +1 -0
- package/dist/contracts.cjs +9 -2
- package/dist/contracts.d.cts +5 -5
- package/dist/contracts.d.ts +2 -2
- package/dist/contracts.js +3 -2
- package/dist/{executionPersistenceContracts-CN9d7AnL.d.cts → deploymentManifestTypes-B8CDmZZK.d.cts} +65 -81
- package/dist/di-C6Ubf9o5.cjs +179 -0
- package/dist/di-C6Ubf9o5.cjs.map +1 -0
- package/dist/di-Cjiil7U-.js +114 -0
- package/dist/di-Cjiil7U-.js.map +1 -0
- package/dist/{index-rllWL4r-.d.ts → index-CRv3_pY3.d.ts} +112 -808
- package/dist/{index-BSQ2LoIh.d.ts → index-mnLS0iQl.d.ts} +39 -372
- package/dist/index.cjs +53 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -438
- package/dist/index.d.ts +5 -5
- package/dist/index.js +28 -94
- package/dist/index.js.map +1 -1
- package/dist/{params-DRUr0F5v.d.cts → params-CrK4iuG1.d.cts} +3 -13
- package/dist/{runtime-CWPdvJpC.js → runtime-CBFDpmiz.js} +112 -648
- package/dist/runtime-CBFDpmiz.js.map +1 -0
- package/dist/{runtime-_VdHwGkJ.cjs → runtime-Due-FOZ2.cjs} +137 -717
- package/dist/runtime-Due-FOZ2.cjs.map +1 -0
- package/dist/testing.cjs +8 -40
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +3 -32
- package/dist/testing.d.ts +3 -32
- package/dist/testing.js +6 -38
- package/dist/testing.js.map +1 -1
- package/dist/{di-LP2qSHkY.cjs → workflowTypes-BW6Hhee7.cjs} +4 -230
- package/dist/workflowTypes-BW6Hhee7.cjs.map +1 -0
- package/dist/{di-tom0pM2h.js → workflowTypes-DZtBTmKf.js} +3 -163
- package/dist/workflowTypes-DZtBTmKf.js.map +1 -0
- package/package.json +1 -1
- package/src/ai/AgentConnectionNodeCollector.ts +0 -4
- package/src/ai/AgentMessageConfigNormalizerFactory.ts +0 -4
- package/src/ai/AiHost.ts +0 -38
- package/src/ai/CallableToolConfig.ts +0 -9
- package/src/ai/CallableToolKindToken.ts +0 -4
- package/src/authoring/callableTool.types.ts +0 -3
- package/src/authoring/defineCollection.types.ts +0 -11
- package/src/authoring/defineHumanApprovalNode.types.ts +0 -116
- package/src/authoring/defineNode.types.ts +18 -32
- package/src/authoring/definePollingTrigger.types.ts +36 -155
- package/src/authoring/definePollingTriggerInternals.ts +0 -4
- package/src/authoring/index.ts +1 -0
- package/src/authoring/nodeBaseOptions.types.ts +4 -0
- package/src/binaries/boundedReadBinary.types.ts +0 -16
- package/src/bootstrap/index.ts +8 -2
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +0 -5
- package/src/bootstrap/runtime/EngineRuntimeRegistration.types.ts +0 -23
- package/src/browser.ts +0 -3
- package/src/contracts/AgentBindError.ts +0 -5
- package/src/contracts/Clock.ts +0 -1
- package/src/contracts/CodemationTelemetryAttributeNames.ts +0 -10
- package/src/contracts/NoOpAgentMcpIntegration.ts +0 -6
- package/src/contracts/NoOpTelemetrySpanScope.ts +0 -7
- package/src/contracts/RetryPolicy.ts +0 -2
- package/src/contracts/agentMcpTypes.ts +0 -34
- package/src/contracts/assertionTypes.ts +0 -33
- package/src/contracts/baseTypes.ts +0 -6
- package/src/contracts/collectionTypes.ts +0 -25
- package/src/contracts/credentialTypes.ts +13 -60
- package/src/contracts/deploymentManifestTypes.ts +158 -0
- package/src/contracts/dispatchTypes.ts +29 -0
- package/src/contracts/executionPersistenceContracts.ts +0 -33
- package/src/contracts/hitlSeamTypes.ts +0 -14
- package/src/contracts/humanTaskStoreTypes.ts +0 -2
- package/src/contracts/inboxChannelTypes.ts +0 -9
- package/src/contracts/index.ts +3 -0
- package/src/contracts/itemExpr.ts +7 -21
- package/src/contracts/itemMeta.ts +0 -3
- package/src/contracts/mcpTypes.ts +0 -16
- package/src/contracts/retryPolicySpec.types.ts +0 -10
- package/src/contracts/runFinishedAtFactory.ts +0 -1
- package/src/contracts/runTypes.ts +0 -74
- package/src/contracts/runtimeTypes.ts +4 -131
- package/src/contracts/telemetryTypes.ts +0 -7
- package/src/contracts/testTriggerTypes.ts +0 -43
- package/src/contracts/triggerInvokerTypes.ts +6 -0
- package/src/contracts/webhookTypes.ts +0 -8
- package/src/contracts/workflowActivationPolicy.ts +0 -5
- package/src/contracts/workflowTypes.ts +5 -80
- package/src/contracts/workspaceFileTypes.ts +10 -42
- package/src/contracts.ts +18 -10
- package/src/credentials/CredentialMaterialProvider.types.ts +0 -28
- package/src/credentials/ManagedCredentialMaterialWriteError.ts +0 -6
- package/src/credentials/ManagedMaterialFetchError.ts +0 -6
- package/src/credentials/OAuthFlowExecutor.types.ts +0 -15
- package/src/di/CoreTokens.ts +2 -6
- package/src/events/ConnectionInvocationEventPublisher.ts +0 -7
- package/src/events/NodeEventPublisher.ts +0 -1
- package/src/events/runEvents.ts +0 -8
- package/src/execution/ActivationEnqueueService.ts +0 -10
- package/src/execution/ChildExecutionScopeFactory.ts +0 -13
- package/src/execution/FanInMergeByOriginMerger.ts +0 -11
- package/src/execution/InProcessRetryRunner.ts +0 -1
- package/src/execution/ItemExprResolver.ts +0 -3
- package/src/execution/NodeActivationRequestComposer.ts +0 -3
- package/src/execution/NodeActivationRequestInputPreparer.ts +0 -5
- package/src/execution/NodeExecutionSnapshotFactory.ts +0 -1
- package/src/execution/NodeExecutor.ts +1 -17
- package/src/execution/NodeOutputNormalizer.ts +8 -1
- package/src/execution/NodeSuspensionHandler.ts +1 -39
- package/src/execution/PersistedRunStateTerminalBuilder.ts +0 -5
- package/src/execution/RunSuspendedError.ts +0 -10
- package/src/execution/RunnableOutputBehaviorResolver.ts +12 -0
- package/src/execution/WorkflowRunExecutionContextFactory.ts +0 -3
- package/src/index.ts +10 -2
- package/src/orchestration/AbortControllerFactory.ts +0 -4
- package/src/orchestration/Engine.ts +0 -9
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +3 -4
- package/src/orchestration/RunContinuationService.ts +7 -39
- package/src/orchestration/RunStartService.ts +0 -7
- package/src/orchestration/TestSuiteOrchestrator.ts +0 -18
- package/src/orchestration/TestSuiteRunIdFactory.ts +0 -4
- package/src/orchestration/TriggerRuntimeService.ts +3 -2
- package/src/planning/CurrentStateFrontierPlanner.ts +0 -1
- package/src/planning/RunQueuePlanner.ts +0 -6
- package/src/policies/executionLimits/EngineExecutionLimitsPolicy.ts +0 -8
- package/src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.ts +0 -3
- package/src/runStorage/RunSummaryMapper.ts +0 -1
- package/src/runtime/EngineFactory.ts +6 -11
- package/src/runtime/RunIntentService.ts +0 -4
- package/src/runtime/WorkflowRepositoryWebhookTriggerMatcher.ts +0 -4
- package/src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.ts +0 -4
- package/src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.ts +0 -4
- package/src/runtime-types/PersistedRuntimeTypeNameResolver.ts +0 -1
- package/src/runtime-types/persistedRuntimeTypeModelRegistry.ts +0 -4
- package/src/runtime-types/runtimeTypeDecorators.types.ts +0 -12
- package/src/scheduler/ConfigDrivenOffloadPolicy.ts +0 -1
- package/src/scheduler/DefaultDrivingScheduler.ts +0 -6
- package/src/scheduler/InlineDrivingScheduler.ts +0 -13
- package/src/serialization/ItemsInputNormalizer.ts +0 -5
- package/src/testing/CapturingScheduler.ts +0 -3
- package/src/testing/EngineTestKitRunIdFactory.ts +0 -3
- package/src/testing/ItemHarnessNode.ts +0 -3
- package/src/testing/ItemHarnessNodeConfig.ts +0 -4
- package/src/testing/PrefixedSequentialIdGenerator.ts +0 -3
- package/src/testing/RegistrarEngineTestKit.types.ts +0 -2
- package/src/testing/RejectingCredentialSessionService.ts +0 -4
- package/src/testing/SubWorkflowRunnerTestNode.ts +0 -3
- package/src/testing/WorkflowTestHarnessManualTrigger.ts +0 -3
- package/src/testing/WorkflowTestKitBuilder.ts +0 -4
- package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +0 -3
- package/src/testing.ts +0 -3
- package/src/triggers/polling/PollingTriggerDedupWindow.ts +0 -4
- package/src/triggers/polling/PollingTriggerLogger.ts +0 -5
- package/src/triggers/polling/PollingTriggerRuntime.ts +0 -5
- package/src/types/index.ts +0 -6
- package/src/validation/WorkflowEdgePortValidator.ts +0 -5
- package/src/workflow/definition/ConnectionInvocationIdFactory.ts +0 -7
- package/src/workflow/definition/ConnectionNodeIdFactory.ts +0 -6
- package/src/workflow/definition/NodeIterationIdFactory.ts +0 -13
- package/src/workflow/definition/WorkflowExecutableNodeClassifier.ts +0 -6
- package/src/workflow/dsl/ChainCursorResolver.ts +8 -15
- package/src/workflow/dsl/NodeIdSlugifier.ts +0 -9
- package/src/workflow/dsl/WhenBuilder.ts +49 -2
- package/src/workflow/dsl/WorkflowDefinitionError.ts +0 -9
- package/src/workflow/dsl/workflowBuilderTypes.ts +5 -0
- package/src/workflowSnapshots/MissingRuntimeParityGuard.ts +24 -0
- package/src/workflowSnapshots/PersistedWorkflowTokenRegistry.ts +0 -6
- package/src/workflowSnapshots/WorkflowParityMismatchError.ts +18 -0
- package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +1 -5
- package/src/workflowSnapshots/index.ts +3 -0
- package/dist/EngineRuntimeRegistration.types-CqcTWexS.d.cts +0 -81
- package/dist/EngineRuntimeRegistration.types-Cr75cSfL.d.ts +0 -44
- package/dist/ItemsInputNormalizer-BbQTSEkZ.cjs.map +0 -1
- package/dist/ItemsInputNormalizer-CSZGMgl3.js.map +0 -1
- package/dist/bootstrap-Bkd-Nfbn.js.map +0 -1
- package/dist/bootstrap-DIv-vloi.cjs.map +0 -1
- package/dist/contracts-CK0x6w_G.cjs +0 -74
- package/dist/contracts-CK0x6w_G.cjs.map +0 -1
- package/dist/contracts-DXdfTdpW.js +0 -50
- package/dist/contracts-DXdfTdpW.js.map +0 -1
- package/dist/di-LP2qSHkY.cjs.map +0 -1
- package/dist/di-tom0pM2h.js.map +0 -1
- package/dist/runtime-CWPdvJpC.js.map +0 -1
- package/dist/runtime-_VdHwGkJ.cjs.map +0 -1
|
@@ -1,48 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Expr } from "./params-
|
|
1
|
+
import { Et as Items, Ii as CredentialRequirement, Pt as NodeConfigBase, Qi as NodeId, Wt as NodeOutputs, Y as TypeToken, Zi as NodeConnectionName, a as ConnectionInvocationId, ar as NodeExecutionContext, b as PersistedRunState, jt as JsonValue, nn as RunnableNodeInputJson, ti as TelemetrySpanScope, tn as RunnableNodeConfig, wt as Item } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
|
+
import { t as Expr } from "./params-CrK4iuG1.cjs";
|
|
3
3
|
import { ZodType, input, output } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/mcpTypes.d.ts
|
|
6
6
|
type McpServerTransport = "http";
|
|
7
7
|
interface McpServerDeclaration {
|
|
8
|
-
/** Globally unique slug, e.g. "gmail". Workflow authors reference this. */
|
|
9
8
|
id: string;
|
|
10
9
|
displayName: string;
|
|
11
10
|
description: string;
|
|
12
11
|
transport: McpServerTransport;
|
|
13
12
|
url: string;
|
|
14
|
-
/**
|
|
15
|
-
* Credential types accepted by this MCP server, matching CredentialRequirement.acceptedTypes.
|
|
16
|
-
* Absent or empty means no credential is required.
|
|
17
|
-
*/
|
|
18
13
|
acceptedCredentialTypes?: ReadonlyArray<string>;
|
|
19
|
-
/**
|
|
20
|
-
* Documentation only in MVP. The bind-time validator checks
|
|
21
|
-
* requiredScopes ⊆ CredentialInstance.scopesGranted.
|
|
22
|
-
*/
|
|
23
14
|
requiredScopes?: string[];
|
|
24
|
-
/** Non-secret static headers merged onto every MCP request. */
|
|
25
15
|
staticHeaders?: Record<string, string>;
|
|
26
|
-
/**
|
|
27
|
-
* Overrides for tool descriptions advertised by the MCP server.
|
|
28
|
-
* Applied by the connection pool after tools/list.
|
|
29
|
-
* Key: exact tool name as returned by the server.
|
|
30
|
-
*/
|
|
31
16
|
toolDescriptionOverrides?: Record<string, string>;
|
|
32
17
|
}
|
|
33
18
|
//#endregion
|
|
34
19
|
//#region src/contracts/runFinishedAtFactory.d.ts
|
|
35
20
|
type RunFinishedAtSource = Pick<PersistedRunState, "status" | "nodeSnapshotsByNodeId" | "finishedAt">;
|
|
36
|
-
/** Derives workflow end time from persisted run root or node snapshots for run listings. */
|
|
37
21
|
declare class RunFinishedAtFactory {
|
|
38
22
|
static resolveIso(state: RunFinishedAtSource): string | undefined;
|
|
39
23
|
}
|
|
40
24
|
//#endregion
|
|
41
25
|
//#region src/workflow/definition/ConnectionNodeIdFactory.d.ts
|
|
42
|
-
/**
|
|
43
|
-
* Deterministic ids for workflow connection-owned child nodes (LLM slot, tools, etc.).
|
|
44
|
-
* These are stable across loads.
|
|
45
|
-
*/
|
|
46
26
|
declare class ConnectionNodeIdFactory {
|
|
47
27
|
static readonly connectionSegment: "__conn__";
|
|
48
28
|
static languageModelConnectionNodeId(parentNodeId: NodeId): NodeId;
|
|
@@ -62,29 +42,14 @@ declare class ConnectionNodeIdFactory {
|
|
|
62
42
|
parentNodeId: NodeId;
|
|
63
43
|
normalizedToolName: string;
|
|
64
44
|
}> | undefined;
|
|
65
|
-
/** True when `nodeId` is a connection-owned child of `parentNodeId` (LLM or tool slot). */
|
|
66
45
|
static isConnectionOwnedDescendantOf(parentNodeId: NodeId, nodeId: NodeId): boolean;
|
|
67
|
-
/** Normalizes a tool display name to a stable id segment. */
|
|
68
46
|
static normalizeToolName(toolName: string): string;
|
|
69
47
|
}
|
|
70
48
|
//#endregion
|
|
71
49
|
//#region src/workflow/definition/NodeIterationIdFactory.d.ts
|
|
72
|
-
/**
|
|
73
|
-
* Unique ids for one per-item iteration of a runnable node's execute loop.
|
|
74
|
-
*
|
|
75
|
-
* Activations are per-batch (one scheduled execution of a node, possibly with N items).
|
|
76
|
-
* Iterations refine that to one identifier per item-index inside the batch loop, so per-item
|
|
77
|
-
* connection invocations and telemetry can be grouped without time-window heuristics.
|
|
78
|
-
*
|
|
79
|
-
* Uses Web Crypto's `randomUUID` (Node 19+ and all modern browsers) so this module is safe
|
|
80
|
-
* to include in the browser entry. Importing `node:crypto` here previously leaked into the
|
|
81
|
-
* canvas client bundle through `browser.ts` and OOM'd consumers' Turbopack builds.
|
|
82
|
-
*/
|
|
83
50
|
declare class NodeIterationIdFactory {
|
|
84
51
|
static create(): string;
|
|
85
|
-
/** Deterministic id for tests when a stable sequence is needed. */
|
|
86
52
|
static createForTest(seed: string, sequence: number): string;
|
|
87
|
-
/** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
|
|
88
53
|
static createForConnection(connectionNodeId: NodeId, sequence: number): string;
|
|
89
54
|
}
|
|
90
55
|
//#endregion
|
|
@@ -119,15 +84,9 @@ type CallableToolConfigOptions<TInputSchema extends ZodSchemaAny, TOutputSchema
|
|
|
119
84
|
presentation?: AgentCanvasPresentation;
|
|
120
85
|
inputSchema: TInputSchema;
|
|
121
86
|
outputSchema: TOutputSchema;
|
|
122
|
-
/**
|
|
123
|
-
* Optional credential slots for this tool (same contract as other {@link ToolConfig} shapes).
|
|
124
|
-
*/
|
|
125
87
|
credentialRequirements?: ReadonlyArray<CredentialRequirement>;
|
|
126
88
|
execute: CallableToolExecuteHandler<TInputSchema, TOutputSchema>;
|
|
127
89
|
}>;
|
|
128
|
-
/**
|
|
129
|
-
* Inline callable agent tool: DSL sugar over {@link ToolConfig} without a separate {@link NodeResolver}-registered {@link Tool} class.
|
|
130
|
-
*/
|
|
131
90
|
declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig {
|
|
132
91
|
readonly name: string;
|
|
133
92
|
readonly type: TypeToken<unknown>;
|
|
@@ -142,9 +101,6 @@ declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchem
|
|
|
142
101
|
getCredentialRequirements(): ReadonlyArray<CredentialRequirement>;
|
|
143
102
|
getInputSchema(): TInputSchema;
|
|
144
103
|
getOutputSchema(): TOutputSchema;
|
|
145
|
-
/**
|
|
146
|
-
* Parses tool input and output with the configured Zod schemas.
|
|
147
|
-
*/
|
|
148
104
|
executeTool(args: ToolExecuteArgs<CallableToolConfig<TInputSchema, TOutputSchema>, input<TInputSchema>>): Promise<output<TOutputSchema>>;
|
|
149
105
|
private parseInput;
|
|
150
106
|
private parseOutput;
|
|
@@ -158,10 +114,6 @@ declare class CallableToolFactoryImpl {
|
|
|
158
114
|
declare const CallableToolFactory: CallableToolFactoryImpl;
|
|
159
115
|
//#endregion
|
|
160
116
|
//#region src/ai/CallableToolKindToken.d.ts
|
|
161
|
-
/**
|
|
162
|
-
* Shared {@link import("../di").TypeToken} marker for {@link CallableToolConfig}.
|
|
163
|
-
* Callable tools are not registered in {@link NodeResolver}; this class only satisfies {@link ToolConfig#type}.
|
|
164
|
-
*/
|
|
165
117
|
declare class CallableToolKindToken {}
|
|
166
118
|
//#endregion
|
|
167
119
|
//#region src/ai/AgentToolFactory.d.ts
|
|
@@ -177,10 +129,6 @@ declare const AgentToolFactory: AgentToolFactoryImpl;
|
|
|
177
129
|
//#endregion
|
|
178
130
|
//#region src/ai/AgentMessageConfigNormalizerFactory.d.ts
|
|
179
131
|
declare class AgentMessageConfigNormalizer {
|
|
180
|
-
/**
|
|
181
|
-
* Prefer {@code input.messages} when present (ItemNode / engine-mapped payloads); otherwise resolve from
|
|
182
|
-
* {@link AgentNodeConfig.messages} templates.
|
|
183
|
-
*/
|
|
184
132
|
static resolveFromInputOrConfig<TInputJson, TOutputJson>(input: unknown, config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
185
133
|
static normalize<TInputJson, TOutputJson>(config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
186
134
|
private static tryMessagesFromStructuredInput;
|
|
@@ -214,11 +162,6 @@ type ToolExecuteArgs<TConfig extends ToolConfig = ToolConfig, TInput = unknown>
|
|
|
214
162
|
item: Item;
|
|
215
163
|
itemIndex: number;
|
|
216
164
|
items: Items;
|
|
217
|
-
/**
|
|
218
|
-
* Optional sub-agent boundary hooks: when present, the live `agent.tool.call` span and the
|
|
219
|
-
* planned tool-call invocationId are forwarded so node-backed runtimes can re-root their child
|
|
220
|
-
* execution scope. Plain function tools may safely ignore these hooks.
|
|
221
|
-
*/
|
|
222
165
|
hooks?: Readonly<{
|
|
223
166
|
parentSpan?: TelemetrySpanScope;
|
|
224
167
|
parentInvocationId?: ConnectionInvocationId;
|
|
@@ -249,12 +192,7 @@ interface AgentMessageTemplate<TInputJson = unknown> {
|
|
|
249
192
|
readonly role: AgentMessageRole;
|
|
250
193
|
readonly content: AgentMessageTemplateContent<TInputJson>;
|
|
251
194
|
}
|
|
252
|
-
/** A single prompt line: fixed DTO or template with optional function `content`. */
|
|
253
195
|
type AgentMessageLine<TInputJson = unknown> = AgentMessageDto | AgentMessageTemplate<TInputJson>;
|
|
254
|
-
/**
|
|
255
|
-
* Message list for an agent. Prefer a **plain array** of `{ role, content }` (optionally with function `content` for templates).
|
|
256
|
-
* Use the object form only when you need `buildMessages` to append messages after optional `prompt` lines.
|
|
257
|
-
*/
|
|
258
196
|
type AgentMessageConfig<TInputJson = unknown> = Expr<ReadonlyArray<AgentMessageLine<TInputJson>>, TInputJson> | ReadonlyArray<AgentMessageLine<TInputJson>> | {
|
|
259
197
|
readonly prompt?: ReadonlyArray<AgentMessageLine<TInputJson>>;
|
|
260
198
|
readonly buildMessages?: (args: AgentMessageBuildArgs<TInputJson>) => ReadonlyArray<AgentMessageDto>;
|
|
@@ -269,7 +207,6 @@ interface AgentGuardrailConfig {
|
|
|
269
207
|
readonly onTurnLimitReached?: AgentTurnLimitBehavior;
|
|
270
208
|
readonly modelInvocationOptions?: AgentModelInvocationOptions;
|
|
271
209
|
}
|
|
272
|
-
/** Defaults aligned with common tool-agent iteration limits (many products use ~10 max rounds). */
|
|
273
210
|
declare const AgentGuardrailDefaults: {
|
|
274
211
|
readonly maxTurns: 10;
|
|
275
212
|
readonly onTurnLimitReached: AgentTurnLimitBehavior;
|
|
@@ -293,25 +230,10 @@ interface ChatModelConfig {
|
|
|
293
230
|
readonly presentation?: AgentCanvasPresentation;
|
|
294
231
|
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
295
232
|
}
|
|
296
|
-
/**
|
|
297
|
-
* Provider-neutral chat language model wrapper returned by a {@link ChatModelFactory}.
|
|
298
|
-
*
|
|
299
|
-
* Thin adapter around an AI SDK `LanguageModelV2` (from `@ai-sdk/provider`) plus the call-site
|
|
300
|
-
* defaults Codemation needs at every generate/stream: the provider label, the model name used for
|
|
301
|
-
* pricing / telemetry, and the default invocation options (max output tokens, temperature,
|
|
302
|
-
* provider-specific overrides).
|
|
303
|
-
*
|
|
304
|
-
* The consumer (AIAgentNode / AgentStructuredOutputRunner) passes `languageModel` directly into
|
|
305
|
-
* `generateText({ model, ... })` from the `ai` package.
|
|
306
|
-
*/
|
|
307
233
|
interface ChatLanguageModel {
|
|
308
|
-
/** AI SDK `LanguageModelV2` instance (kept `unknown` to avoid leaking the SDK type into `@codemation/core`). */
|
|
309
234
|
readonly languageModel: unknown;
|
|
310
|
-
/** Stable pricing/telemetry key — e.g. `"gpt-4.1-nano"`. */
|
|
311
235
|
readonly modelName: string;
|
|
312
|
-
/** Provider label — e.g. `"openai"`. Used for cost tracking. */
|
|
313
236
|
readonly provider?: string;
|
|
314
|
-
/** Defaults merged into every call. Consumers may override per-invocation. */
|
|
315
237
|
readonly defaultCallOptions?: ChatLanguageModelCallOptions;
|
|
316
238
|
}
|
|
317
239
|
interface ChatLanguageModelCallOptions {
|
|
@@ -319,14 +241,8 @@ interface ChatLanguageModelCallOptions {
|
|
|
319
241
|
readonly temperature?: number;
|
|
320
242
|
readonly providerOptions?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
|
|
321
243
|
}
|
|
322
|
-
/**
|
|
323
|
-
* Options for a structured-output generate call. Mirrors
|
|
324
|
-
* `generateText({ output: Output.object(...) })` from the `ai` package.
|
|
325
|
-
*/
|
|
326
244
|
interface StructuredOutputOptions {
|
|
327
|
-
/** Optional schema name — used by some providers as the JSON schema name attribute. */
|
|
328
245
|
readonly schemaName?: string;
|
|
329
|
-
/** When `true`, the consumer should pass a strict-mode-compatible JSON Schema record. */
|
|
330
246
|
readonly strict?: boolean;
|
|
331
247
|
}
|
|
332
248
|
interface ChatModelFactory<TConfig extends ChatModelConfig = ChatModelConfig> {
|
|
@@ -361,12 +277,6 @@ type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any
|
|
|
361
277
|
outputSchema: TOutputSchema;
|
|
362
278
|
mapInput?: NodeBackedToolInputMapper<TNodeConfig, input<TInputSchema>>;
|
|
363
279
|
mapOutput?: NodeBackedToolOutputMapper<TNodeConfig, input<TInputSchema>, output<TOutputSchema>>;
|
|
364
|
-
/**
|
|
365
|
-
* Marks THIS tool binding as human-in-the-loop and sets the behavior when a human rejects the
|
|
366
|
-
* approval: `"return"` feeds the rejection back to the agent as a tool result, `"halt"` stops the
|
|
367
|
-
* run. Set per binding, so two tools backed by the same node can reject differently. When set, it
|
|
368
|
-
* takes precedence over any `humanApprovalToolBehavior` marker carried by the backing node.
|
|
369
|
-
*/
|
|
370
280
|
onRejected?: "halt" | "return";
|
|
371
281
|
}>;
|
|
372
282
|
interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends RunnableNodeConfig<TInputJson, TOutputJson> {
|
|
@@ -400,11 +310,6 @@ type AgentConnectionNodeCollectorApi = Readonly<{
|
|
|
400
310
|
declare const AgentConnectionNodeCollector: AgentConnectionNodeCollectorApi;
|
|
401
311
|
//#endregion
|
|
402
312
|
//#region src/serialization/ItemsInputNormalizer.d.ts
|
|
403
|
-
/**
|
|
404
|
-
* Normalizes external inputs into the engine's canonical `Items` shape.
|
|
405
|
-
* Used at host and builder boundaries where callers may provide either a raw value,
|
|
406
|
-
* a single item-like object, or an array of item-like values.
|
|
407
|
-
*/
|
|
408
313
|
declare class ItemsInputNormalizer {
|
|
409
314
|
normalize(raw: unknown): Items;
|
|
410
315
|
private normalizeItem;
|
|
@@ -412,4 +317,4 @@ declare class ItemsInputNormalizer {
|
|
|
412
317
|
}
|
|
413
318
|
//#endregion
|
|
414
319
|
export { McpServerDeclaration as $, ChatModelFactory as A, ZodSchemaAny as B, AgentToolDefinition as C, ChatLanguageModel as D, AgentTurnLimitBehavior as E, NodeBackedToolOutputMapperArgs as F, CallableToolFactory as G, AgentMessageConfigNormalizer as H, StructuredOutputOptions as I, CallableToolExecuteHandler as J, CallableToolConfig as K, Tool as L, NodeBackedToolInputMapper as M, NodeBackedToolInputMapperArgs as N, ChatLanguageModelCallOptions as O, NodeBackedToolOutputMapper as P, RunFinishedAtFactory as Q, ToolConfig as R, AgentToolCallPlanner as S, AgentToolToken as T, AgentToolFactory as U, AgentConfigInspector as V, CallableToolKindToken as W, NodeIterationIdFactory as X, NodeBackedToolConfig as Y, ConnectionNodeIdFactory as Z, AgentMessageTemplateContent as _, AgentConnectionNodeRole as a, AgentTool as b, AgentCanvasPresentation as c, AgentMessageBuildArgs as d, McpServerTransport as et, AgentMessageConfig as f, AgentMessageTemplate as g, AgentMessageRole as h, AgentConnectionNodeDescriptor as i, NodeBackedToolConfigOptions as j, ChatModelConfig as k, AgentGuardrailConfig as l, AgentMessageLine as m, AgentConnectionCredentialSource as n, McpServerResolver as o, AgentMessageDto as p, CallableToolConfigOptions as q, AgentConnectionNodeCollector as r, AgentAttachmentRole as s, ItemsInputNormalizer as t, AgentGuardrailDefaults as u, AgentModelInvocationOptions as v, AgentToolExecuteArgs as w, AgentToolCall as x, AgentNodeConfig as y, ToolExecuteArgs as z };
|
|
415
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
320
|
+
//# sourceMappingURL=ItemsInputNormalizer-A5txcOWX.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_di = require('./di-
|
|
1
|
+
const require_di = require('./di-C6Ubf9o5.cjs');
|
|
2
2
|
let tsyringe = require("tsyringe");
|
|
3
3
|
tsyringe = require_di.__toESM(tsyringe);
|
|
4
4
|
|
|
@@ -40,4 +40,4 @@ Object.defineProperty(exports, 'ItemsInputNormalizer', {
|
|
|
40
40
|
return ItemsInputNormalizer;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
43
|
+
//# sourceMappingURL=ItemsInputNormalizer-C1fv3sMW.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemsInputNormalizer-C1fv3sMW.cjs","names":["ItemsInputNormalizer"],"sources":["../src/serialization/ItemsInputNormalizer.ts"],"sourcesContent":["import type { Item, Items } from \"../contracts/workflowTypes\";\nimport { injectable } from \"../di\";\n\n@injectable()\nexport class ItemsInputNormalizer {\n normalize(raw: unknown): Items {\n if (raw === undefined || raw === null) {\n return [];\n }\n if (Array.isArray(raw)) {\n return raw.map((value) => this.normalizeItem(value));\n }\n return [this.normalizeItem(raw)];\n }\n\n private normalizeItem(raw: unknown): Item {\n if (!this.isItem(raw)) {\n return { json: raw };\n }\n return {\n json: raw.json,\n ...(raw.binary === undefined ? {} : { binary: raw.binary }),\n ...(raw.meta === undefined ? {} : { meta: raw.meta }),\n ...(raw.paired === undefined ? {} : { paired: raw.paired }),\n };\n }\n\n private isItem(raw: unknown): raw is Item {\n return typeof raw === \"object\" && raw !== null && Object.prototype.hasOwnProperty.call(raw, \"json\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAIO,iCAAMA,uBAAqB;CAChC,UAAU,KAAqB;AAC7B,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,EAAE;AAEX,MAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC;AAEtD,SAAO,CAAC,KAAK,cAAc,IAAI,CAAC;;CAGlC,AAAQ,cAAc,KAAoB;AACxC,MAAI,CAAC,KAAK,OAAO,IAAI,CACnB,QAAO,EAAE,MAAM,KAAK;AAEtB,SAAO;GACL,MAAM,IAAI;GACV,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC1D,GAAI,IAAI,SAAS,SAAY,EAAE,GAAG,EAAE,MAAM,IAAI,MAAM;GACpD,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC3D;;CAGH,AAAQ,OAAO,KAA2B;AACxC,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO;;;6DAzB1F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $i as NodeExecutionContext, $t as ConnectionInvocationId, Ao as CredentialRequirement, Et as Expr, Go as NodeConnectionName, Ko as NodeId, Or as NodeConfigBase, Rr as NodeOutputs, Tr as JsonValue, Un as TypeToken, Xr as RunnableNodeInputJson, Y as McpServerDeclaration, Ya as TelemetrySpanScope, Yr as RunnableNodeConfig, br as Items, vr as Item } from "./index-CRv3_pY3.js";
|
|
2
2
|
import { ZodType, input, output } from "zod";
|
|
3
3
|
|
|
4
4
|
//#region src/ai/NodeBackedToolConfig.d.ts
|
|
@@ -33,15 +33,9 @@ type CallableToolConfigOptions<TInputSchema extends ZodSchemaAny, TOutputSchema
|
|
|
33
33
|
presentation?: AgentCanvasPresentation;
|
|
34
34
|
inputSchema: TInputSchema;
|
|
35
35
|
outputSchema: TOutputSchema;
|
|
36
|
-
/**
|
|
37
|
-
* Optional credential slots for this tool (same contract as other {@link ToolConfig} shapes).
|
|
38
|
-
*/
|
|
39
36
|
credentialRequirements?: ReadonlyArray<CredentialRequirement>;
|
|
40
37
|
execute: CallableToolExecuteHandler<TInputSchema, TOutputSchema>;
|
|
41
38
|
}>;
|
|
42
|
-
/**
|
|
43
|
-
* Inline callable agent tool: DSL sugar over {@link ToolConfig} without a separate {@link NodeResolver}-registered {@link Tool} class.
|
|
44
|
-
*/
|
|
45
39
|
declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig {
|
|
46
40
|
readonly name: string;
|
|
47
41
|
readonly type: TypeToken<unknown>;
|
|
@@ -56,9 +50,6 @@ declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchem
|
|
|
56
50
|
getCredentialRequirements(): ReadonlyArray<CredentialRequirement>;
|
|
57
51
|
getInputSchema(): TInputSchema;
|
|
58
52
|
getOutputSchema(): TOutputSchema;
|
|
59
|
-
/**
|
|
60
|
-
* Parses tool input and output with the configured Zod schemas.
|
|
61
|
-
*/
|
|
62
53
|
executeTool(args: ToolExecuteArgs<CallableToolConfig<TInputSchema, TOutputSchema>, input<TInputSchema>>): Promise<output<TOutputSchema>>;
|
|
63
54
|
private parseInput;
|
|
64
55
|
private parseOutput;
|
|
@@ -72,10 +63,6 @@ declare class CallableToolFactoryImpl {
|
|
|
72
63
|
declare const CallableToolFactory: CallableToolFactoryImpl;
|
|
73
64
|
//#endregion
|
|
74
65
|
//#region src/ai/CallableToolKindToken.d.ts
|
|
75
|
-
/**
|
|
76
|
-
* Shared {@link import("../di").TypeToken} marker for {@link CallableToolConfig}.
|
|
77
|
-
* Callable tools are not registered in {@link NodeResolver}; this class only satisfies {@link ToolConfig#type}.
|
|
78
|
-
*/
|
|
79
66
|
declare class CallableToolKindToken {}
|
|
80
67
|
//#endregion
|
|
81
68
|
//#region src/ai/AgentToolFactory.d.ts
|
|
@@ -91,10 +78,6 @@ declare const AgentToolFactory: AgentToolFactoryImpl;
|
|
|
91
78
|
//#endregion
|
|
92
79
|
//#region src/ai/AgentMessageConfigNormalizerFactory.d.ts
|
|
93
80
|
declare class AgentMessageConfigNormalizer {
|
|
94
|
-
/**
|
|
95
|
-
* Prefer {@code input.messages} when present (ItemNode / engine-mapped payloads); otherwise resolve from
|
|
96
|
-
* {@link AgentNodeConfig.messages} templates.
|
|
97
|
-
*/
|
|
98
81
|
static resolveFromInputOrConfig<TInputJson, TOutputJson>(input: unknown, config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
99
82
|
static normalize<TInputJson, TOutputJson>(config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
100
83
|
private static tryMessagesFromStructuredInput;
|
|
@@ -128,11 +111,6 @@ type ToolExecuteArgs<TConfig extends ToolConfig = ToolConfig, TInput = unknown>
|
|
|
128
111
|
item: Item;
|
|
129
112
|
itemIndex: number;
|
|
130
113
|
items: Items;
|
|
131
|
-
/**
|
|
132
|
-
* Optional sub-agent boundary hooks: when present, the live `agent.tool.call` span and the
|
|
133
|
-
* planned tool-call invocationId are forwarded so node-backed runtimes can re-root their child
|
|
134
|
-
* execution scope. Plain function tools may safely ignore these hooks.
|
|
135
|
-
*/
|
|
136
114
|
hooks?: Readonly<{
|
|
137
115
|
parentSpan?: TelemetrySpanScope;
|
|
138
116
|
parentInvocationId?: ConnectionInvocationId;
|
|
@@ -163,12 +141,7 @@ interface AgentMessageTemplate<TInputJson = unknown> {
|
|
|
163
141
|
readonly role: AgentMessageRole;
|
|
164
142
|
readonly content: AgentMessageTemplateContent<TInputJson>;
|
|
165
143
|
}
|
|
166
|
-
/** A single prompt line: fixed DTO or template with optional function `content`. */
|
|
167
144
|
type AgentMessageLine<TInputJson = unknown> = AgentMessageDto | AgentMessageTemplate<TInputJson>;
|
|
168
|
-
/**
|
|
169
|
-
* Message list for an agent. Prefer a **plain array** of `{ role, content }` (optionally with function `content` for templates).
|
|
170
|
-
* Use the object form only when you need `buildMessages` to append messages after optional `prompt` lines.
|
|
171
|
-
*/
|
|
172
145
|
type AgentMessageConfig<TInputJson = unknown> = Expr<ReadonlyArray<AgentMessageLine<TInputJson>>, TInputJson> | ReadonlyArray<AgentMessageLine<TInputJson>> | {
|
|
173
146
|
readonly prompt?: ReadonlyArray<AgentMessageLine<TInputJson>>;
|
|
174
147
|
readonly buildMessages?: (args: AgentMessageBuildArgs<TInputJson>) => ReadonlyArray<AgentMessageDto>;
|
|
@@ -183,7 +156,6 @@ interface AgentGuardrailConfig {
|
|
|
183
156
|
readonly onTurnLimitReached?: AgentTurnLimitBehavior;
|
|
184
157
|
readonly modelInvocationOptions?: AgentModelInvocationOptions;
|
|
185
158
|
}
|
|
186
|
-
/** Defaults aligned with common tool-agent iteration limits (many products use ~10 max rounds). */
|
|
187
159
|
declare const AgentGuardrailDefaults: {
|
|
188
160
|
readonly maxTurns: 10;
|
|
189
161
|
readonly onTurnLimitReached: AgentTurnLimitBehavior;
|
|
@@ -207,25 +179,10 @@ interface ChatModelConfig {
|
|
|
207
179
|
readonly presentation?: AgentCanvasPresentation;
|
|
208
180
|
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
209
181
|
}
|
|
210
|
-
/**
|
|
211
|
-
* Provider-neutral chat language model wrapper returned by a {@link ChatModelFactory}.
|
|
212
|
-
*
|
|
213
|
-
* Thin adapter around an AI SDK `LanguageModelV2` (from `@ai-sdk/provider`) plus the call-site
|
|
214
|
-
* defaults Codemation needs at every generate/stream: the provider label, the model name used for
|
|
215
|
-
* pricing / telemetry, and the default invocation options (max output tokens, temperature,
|
|
216
|
-
* provider-specific overrides).
|
|
217
|
-
*
|
|
218
|
-
* The consumer (AIAgentNode / AgentStructuredOutputRunner) passes `languageModel` directly into
|
|
219
|
-
* `generateText({ model, ... })` from the `ai` package.
|
|
220
|
-
*/
|
|
221
182
|
interface ChatLanguageModel {
|
|
222
|
-
/** AI SDK `LanguageModelV2` instance (kept `unknown` to avoid leaking the SDK type into `@codemation/core`). */
|
|
223
183
|
readonly languageModel: unknown;
|
|
224
|
-
/** Stable pricing/telemetry key — e.g. `"gpt-4.1-nano"`. */
|
|
225
184
|
readonly modelName: string;
|
|
226
|
-
/** Provider label — e.g. `"openai"`. Used for cost tracking. */
|
|
227
185
|
readonly provider?: string;
|
|
228
|
-
/** Defaults merged into every call. Consumers may override per-invocation. */
|
|
229
186
|
readonly defaultCallOptions?: ChatLanguageModelCallOptions;
|
|
230
187
|
}
|
|
231
188
|
interface ChatLanguageModelCallOptions {
|
|
@@ -233,14 +190,8 @@ interface ChatLanguageModelCallOptions {
|
|
|
233
190
|
readonly temperature?: number;
|
|
234
191
|
readonly providerOptions?: Readonly<Record<string, Readonly<Record<string, JsonValue>>>>;
|
|
235
192
|
}
|
|
236
|
-
/**
|
|
237
|
-
* Options for a structured-output generate call. Mirrors
|
|
238
|
-
* `generateText({ output: Output.object(...) })` from the `ai` package.
|
|
239
|
-
*/
|
|
240
193
|
interface StructuredOutputOptions {
|
|
241
|
-
/** Optional schema name — used by some providers as the JSON schema name attribute. */
|
|
242
194
|
readonly schemaName?: string;
|
|
243
|
-
/** When `true`, the consumer should pass a strict-mode-compatible JSON Schema record. */
|
|
244
195
|
readonly strict?: boolean;
|
|
245
196
|
}
|
|
246
197
|
interface ChatModelFactory<TConfig extends ChatModelConfig = ChatModelConfig> {
|
|
@@ -275,12 +226,6 @@ type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any
|
|
|
275
226
|
outputSchema: TOutputSchema;
|
|
276
227
|
mapInput?: NodeBackedToolInputMapper<TNodeConfig, input<TInputSchema>>;
|
|
277
228
|
mapOutput?: NodeBackedToolOutputMapper<TNodeConfig, input<TInputSchema>, output<TOutputSchema>>;
|
|
278
|
-
/**
|
|
279
|
-
* Marks THIS tool binding as human-in-the-loop and sets the behavior when a human rejects the
|
|
280
|
-
* approval: `"return"` feeds the rejection back to the agent as a tool result, `"halt"` stops the
|
|
281
|
-
* run. Set per binding, so two tools backed by the same node can reject differently. When set, it
|
|
282
|
-
* takes precedence over any `humanApprovalToolBehavior` marker carried by the backing node.
|
|
283
|
-
*/
|
|
284
229
|
onRejected?: "halt" | "return";
|
|
285
230
|
}>;
|
|
286
231
|
interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends RunnableNodeConfig<TInputJson, TOutputJson> {
|
|
@@ -314,11 +259,6 @@ type AgentConnectionNodeCollectorApi = Readonly<{
|
|
|
314
259
|
declare const AgentConnectionNodeCollector: AgentConnectionNodeCollectorApi;
|
|
315
260
|
//#endregion
|
|
316
261
|
//#region src/serialization/ItemsInputNormalizer.d.ts
|
|
317
|
-
/**
|
|
318
|
-
* Normalizes external inputs into the engine's canonical `Items` shape.
|
|
319
|
-
* Used at host and builder boundaries where callers may provide either a raw value,
|
|
320
|
-
* a single item-like object, or an array of item-like values.
|
|
321
|
-
*/
|
|
322
262
|
declare class ItemsInputNormalizer {
|
|
323
263
|
normalize(raw: unknown): Items;
|
|
324
264
|
private normalizeItem;
|
|
@@ -326,4 +266,4 @@ declare class ItemsInputNormalizer {
|
|
|
326
266
|
}
|
|
327
267
|
//#endregion
|
|
328
268
|
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 };
|
|
329
|
-
//# sourceMappingURL=ItemsInputNormalizer-
|
|
269
|
+
//# sourceMappingURL=ItemsInputNormalizer-D2vrMrX1.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as injectable } from "./di-
|
|
1
|
+
import { a as injectable } from "./di-Cjiil7U-.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-fUYo4GLV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ItemsInputNormalizer-fUYo4GLV.js","names":["ItemsInputNormalizer"],"sources":["../src/serialization/ItemsInputNormalizer.ts"],"sourcesContent":["import type { Item, Items } from \"../contracts/workflowTypes\";\nimport { injectable } from \"../di\";\n\n@injectable()\nexport class ItemsInputNormalizer {\n normalize(raw: unknown): Items {\n if (raw === undefined || raw === null) {\n return [];\n }\n if (Array.isArray(raw)) {\n return raw.map((value) => this.normalizeItem(value));\n }\n return [this.normalizeItem(raw)];\n }\n\n private normalizeItem(raw: unknown): Item {\n if (!this.isItem(raw)) {\n return { json: raw };\n }\n return {\n json: raw.json,\n ...(raw.binary === undefined ? {} : { binary: raw.binary }),\n ...(raw.meta === undefined ? {} : { meta: raw.meta }),\n ...(raw.paired === undefined ? {} : { paired: raw.paired }),\n };\n }\n\n private isItem(raw: unknown): raw is Item {\n return typeof raw === \"object\" && raw !== null && Object.prototype.hasOwnProperty.call(raw, \"json\");\n }\n}\n"],"mappings":";;;;;;;;;;;;AAIO,iCAAMA,uBAAqB;CAChC,UAAU,KAAqB;AAC7B,MAAI,QAAQ,UAAa,QAAQ,KAC/B,QAAO,EAAE;AAEX,MAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,KAAK,UAAU,KAAK,cAAc,MAAM,CAAC;AAEtD,SAAO,CAAC,KAAK,cAAc,IAAI,CAAC;;CAGlC,AAAQ,cAAc,KAAoB;AACxC,MAAI,CAAC,KAAK,OAAO,IAAI,CACnB,QAAO,EAAE,MAAM,KAAK;AAEtB,SAAO;GACL,MAAM,IAAI;GACV,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC1D,GAAI,IAAI,SAAS,SAAY,EAAE,GAAG,EAAE,MAAM,IAAI,MAAM;GACpD,GAAI,IAAI,WAAW,SAAY,EAAE,GAAG,EAAE,QAAQ,IAAI,QAAQ;GAC3D;;CAGH,AAAQ,OAAO,KAA2B;AACxC,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,OAAO,UAAU,eAAe,KAAK,KAAK,OAAO;;;mCAzBtG,YAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $n as NodeActivationContinuation, $t as RunId, D as RunCurrentState, Et as Items, H as WorkflowExecutionRepository, I as RunStopCondition, Jt as ParentExecutionRef, Lr as WebhookInvocationMatch, N as RunResult, Nr as WorkflowSnapshotResolver, Nt as NodeActivationId, Pr as HttpMethod, Qi as NodeId, Rr as WebhookTriggerMatcher, Wt as NodeOutputs, Zn as LiveWorkflowRepository, cn as WorkflowDefinition, hr as ResumeContext, k as RunExecutionOptions, kr as WorkflowRepository, or as NodeExecutionRequest, p as NodeInputsByPort, s as CurrentStateExecutionRequest, sr as NodeExecutionRequestHandler, ta as WorkflowId, w as PersistedWorkflowTokenRegistryLike, z as WebhookRunResult, zr as WebhookTriggerResolution } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/orchestration/Engine.d.ts
|
|
4
4
|
interface EngineTriggerRuntime {
|
|
@@ -71,11 +71,6 @@ interface EngineFacadeDeps {
|
|
|
71
71
|
runContinuationService: EngineRunContinuationService;
|
|
72
72
|
nodeExecutionRequestHandler: EngineNodeExecutionRequestHandler;
|
|
73
73
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Runtime facade for orchestration, continuation, triggers, and webhook routing.
|
|
76
|
-
* Prefer {@link import("../intents/RunIntentService").RunIntentService} for host/HTTP invocation boundaries.
|
|
77
|
-
* The class token is exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
78
|
-
*/
|
|
79
74
|
declare class Engine implements NodeActivationContinuation, NodeExecutionRequestHandler {
|
|
80
75
|
private readonly deps;
|
|
81
76
|
constructor(deps: EngineFacadeDeps);
|
|
@@ -136,10 +131,6 @@ declare class Engine implements NodeActivationContinuation, NodeExecutionRequest
|
|
|
136
131
|
status: "completed" | "failed" | "halted";
|
|
137
132
|
}>>;
|
|
138
133
|
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
134
|
resumeRun(args: {
|
|
144
135
|
runId: RunId;
|
|
145
136
|
taskId: string;
|
|
@@ -209,12 +200,8 @@ declare class RunIntentService {
|
|
|
209
200
|
}): WebhookTriggerResolution;
|
|
210
201
|
runMatchedWebhook(args: MatchedWebhookRunIntent): Promise<WebhookRunResult>;
|
|
211
202
|
runWebhookMatch(args: WebhookMatchRunIntent): Promise<WebhookRunResult>;
|
|
212
|
-
/**
|
|
213
|
-
* Webhook-triggered runs always force inline execution first.
|
|
214
|
-
* This is the highest-precedence scheduler override: it wins over node hints and container defaults.
|
|
215
|
-
*/
|
|
216
203
|
private createWebhookExecutionOptions;
|
|
217
204
|
}
|
|
218
205
|
//#endregion
|
|
219
206
|
export { InMemoryLiveWorkflowRepository as n, Engine as r, RunIntentService as t };
|
|
220
|
-
//# sourceMappingURL=RunIntentService-
|
|
207
|
+
//# sourceMappingURL=RunIntentService-DKxuHTUz.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as RunStopCondition, Ar as NodeErrorHandler, Ca as WorkflowRepository, Cn as RunExecutionOptions, Da as WorkflowSnapshotResolver, Dn as RunResult, Dr as NodeActivationId, Gi as LiveWorkflowRepository, Hr as ParentExecutionRef, In as WorkflowExecutionRepository, Ko as NodeId, Ma as WebhookTriggerMatcher, Mr as NodeErrorHandlerSpec, Na as WebhookTriggerResolution, Nn as WebhookRunResult, Oa as HttpMethod, Or as NodeConfigBase, Rr as NodeOutputs, Ur as PersistedRunPolicySnapshot, Yo as WorkflowId, _n as PersistedWorkflowSnapshotNode, aa as NodeResolver, ai as WorkflowErrorHandlerSpec, br as Items, di as WorkflowStoragePolicyDecisionArgs, ea as NodeExecutionRequest, gn as PersistedWorkflowSnapshot, ii as WorkflowErrorHandler, ir as EngineExecutionLimitsPolicyConfig, ja as WebhookInvocationMatch, la as ResumeContext, li as WorkflowPolicyRuntimeDefaults, mn as PersistedRunState, ni as WorkflowDefinition, qi as NodeActivationContinuation, qr as RunId, rr as EngineExecutionLimitsPolicy, sn as NodeInputsByPort, ta as NodeExecutionRequestHandler, tn as CurrentStateExecutionRequest, vn as PersistedWorkflowTokenRegistryLike, xn as RunCurrentState } from "./index-CRv3_pY3.js";
|
|
2
2
|
|
|
3
3
|
//#region src/orchestration/Engine.d.ts
|
|
4
4
|
interface EngineTriggerRuntime {
|
|
@@ -71,11 +71,6 @@ interface EngineFacadeDeps {
|
|
|
71
71
|
runContinuationService: EngineRunContinuationService;
|
|
72
72
|
nodeExecutionRequestHandler: EngineNodeExecutionRequestHandler;
|
|
73
73
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Runtime facade for orchestration, continuation, triggers, and webhook routing.
|
|
76
|
-
* Prefer {@link import("../intents/RunIntentService").RunIntentService} for host/HTTP invocation boundaries.
|
|
77
|
-
* The class token is exported from `@codemation/core/bootstrap` (not the main `@codemation/core` barrel).
|
|
78
|
-
*/
|
|
79
74
|
declare class Engine implements NodeActivationContinuation, NodeExecutionRequestHandler {
|
|
80
75
|
private readonly deps;
|
|
81
76
|
constructor(deps: EngineFacadeDeps);
|
|
@@ -136,10 +131,6 @@ declare class Engine implements NodeActivationContinuation, NodeExecutionRequest
|
|
|
136
131
|
status: "completed" | "failed" | "halted";
|
|
137
132
|
}>>;
|
|
138
133
|
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
134
|
resumeRun(args: {
|
|
144
135
|
runId: RunId;
|
|
145
136
|
taskId: string;
|
|
@@ -178,9 +169,6 @@ declare class WorkflowPolicyErrorServices {
|
|
|
178
169
|
}
|
|
179
170
|
//#endregion
|
|
180
171
|
//#region src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.d.ts
|
|
181
|
-
/**
|
|
182
|
-
* Builds {@link EngineExecutionLimitsPolicy} by merging {@link ENGINE_EXECUTION_LIMITS_DEFAULTS} with optional `overrides` (e.g. host `runtime.engineExecutionLimits`).
|
|
183
|
-
*/
|
|
184
172
|
declare class EngineExecutionLimitsPolicyFactory {
|
|
185
173
|
create(overrides?: Partial<EngineExecutionLimitsPolicyConfig>): EngineExecutionLimitsPolicy;
|
|
186
174
|
}
|
|
@@ -197,10 +185,6 @@ declare class WorkflowSnapshotCodec {
|
|
|
197
185
|
create(workflow: WorkflowDefinition): PersistedWorkflowSnapshot;
|
|
198
186
|
hydrate(snapshotNode: PersistedWorkflowSnapshotNode, liveConfig: NodeConfigBase): NodeConfigBase;
|
|
199
187
|
private serializeConfig;
|
|
200
|
-
/**
|
|
201
|
-
* Safely call `config.inspectorSummary()` and return a plain JSON-safe array, or undefined.
|
|
202
|
-
* Returns undefined if the method is absent, throws, or produces no valid rows.
|
|
203
|
-
*/
|
|
204
188
|
private safeInspectorSummary;
|
|
205
189
|
private injectTokenIds;
|
|
206
190
|
private mergeValue;
|
|
@@ -288,12 +272,8 @@ declare class RunIntentService {
|
|
|
288
272
|
}): WebhookTriggerResolution;
|
|
289
273
|
runMatchedWebhook(args: MatchedWebhookRunIntent): Promise<WebhookRunResult>;
|
|
290
274
|
runWebhookMatch(args: WebhookMatchRunIntent): Promise<WebhookRunResult>;
|
|
291
|
-
/**
|
|
292
|
-
* Webhook-triggered runs always force inline execution first.
|
|
293
|
-
* This is the highest-precedence scheduler override: it wins over node hints and container defaults.
|
|
294
|
-
*/
|
|
295
275
|
private createWebhookExecutionOptions;
|
|
296
276
|
}
|
|
297
277
|
//#endregion
|
|
298
278
|
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 };
|
|
299
|
-
//# sourceMappingURL=RunIntentService-
|
|
279
|
+
//# sourceMappingURL=RunIntentService-DrpKli2k.d.ts.map
|