@codemation/core 0.11.1 → 0.13.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 +28 -0
- package/dist/{CostCatalogContract-DZgcUBE4.d.cts → CostCatalogContract-Dxq1BTyi.d.cts} +2 -2
- package/dist/{EngineRuntimeRegistration.types-Cggm5GVY.d.cts → EngineRuntimeRegistration.types-CqcTWexS.d.cts} +3 -3
- package/dist/{EngineRuntimeRegistration.types-BQbS9_gs.d.ts → EngineRuntimeRegistration.types-Cr75cSfL.d.ts} +2 -2
- package/dist/InMemoryRunDataFactory-Csy2evr_.d.cts +205 -0
- package/dist/{ItemsInputNormalizer-CwdOhSAK.cjs → ItemsInputNormalizer-57EdA1ad.cjs} +2 -2
- package/dist/{ItemsInputNormalizer-CwdOhSAK.cjs.map → ItemsInputNormalizer-57EdA1ad.cjs.map} +1 -1
- package/dist/{ItemsInputNormalizer-_Mfcd3YU.d.ts → ItemsInputNormalizer-BWtlwdVI.d.ts} +2 -2
- package/dist/{ItemsInputNormalizer-D-MH8MBs.js → ItemsInputNormalizer-BkSvmfAW.js} +2 -2
- package/dist/{ItemsInputNormalizer-D-MH8MBs.js.map → ItemsInputNormalizer-BkSvmfAW.js.map} +1 -1
- package/dist/{ItemsInputNormalizer-C_dpn76M.d.cts → ItemsInputNormalizer-pLrWwUAP.d.cts} +3 -3
- package/dist/{RunIntentService-CEF-sFfI.d.cts → RunIntentService-BitgkKaT.d.cts} +18 -4
- package/dist/{RunIntentService-BVur7x9n.d.ts → RunIntentService-DYpqfu6D.d.ts} +18 -4
- package/dist/{agentMcpTypes-ZiNbNsEi.d.cts → agentMcpTypes-DGIwk6Ue.d.cts} +201 -4
- package/dist/bootstrap/index.cjs +3 -3
- package/dist/bootstrap/index.d.cts +63 -7
- package/dist/bootstrap/index.d.ts +5 -5
- package/dist/bootstrap/index.js +3 -3
- package/dist/{bootstrap-BxuTFTLB.cjs → bootstrap-BEu1fJBM.cjs} +175 -4
- package/dist/bootstrap-BEu1fJBM.cjs.map +1 -0
- package/dist/{bootstrap-D_Yyi0wL.js → bootstrap-CSeInbj1.js} +173 -4
- package/dist/bootstrap-CSeInbj1.js.map +1 -0
- package/dist/browser.cjs +4 -2
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +3 -3
- package/dist/contracts.d.cts +5 -5
- package/dist/contracts.d.ts +2 -2
- package/dist/{di-BlEKdoZS.cjs → di-C-2ep8NZ.cjs} +44 -1
- package/dist/di-C-2ep8NZ.cjs.map +1 -0
- package/dist/{di-0Wop7z1y.js → di-D9Mv3kF3.js} +33 -2
- package/dist/di-D9Mv3kF3.js.map +1 -0
- package/dist/{executionPersistenceContracts-BgZMRsTa.d.cts → executionPersistenceContracts-CN9d7AnL.d.cts} +2 -2
- package/dist/{index-62Ba9f7D.d.ts → index-CqZeNGAp.d.ts} +343 -101
- package/dist/{index-zWGtEhrf.d.ts → index-rllWL4r-.d.ts} +459 -5
- package/dist/index.cjs +91 -161
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +458 -97
- package/dist/index.d.ts +5 -5
- package/dist/index.js +74 -159
- package/dist/index.js.map +1 -1
- package/dist/{params-B5SENSzZ.d.cts → params-DRUr0F5v.d.cts} +2 -2
- package/dist/{runtime-cxmUkk0l.js → runtime-6-U2Cou5.js} +690 -18
- package/dist/runtime-6-U2Cou5.js.map +1 -0
- package/dist/{runtime-DBzq5YBi.cjs → runtime-DjYXgOo0.cjs} +749 -17
- package/dist/runtime-DjYXgOo0.cjs.map +1 -0
- package/dist/testing.cjs +3 -3
- package/dist/testing.d.cts +3 -3
- package/dist/testing.d.ts +3 -3
- package/dist/testing.js +3 -3
- package/package.json +1 -1
- package/src/authoring/defineHumanApprovalNode.types.ts +379 -0
- package/src/authoring/index.ts +6 -0
- package/src/binaries/DefaultExecutionBinaryServiceFactory.ts +27 -2
- package/src/binaries/DefaultNodeBinaryAttachmentServiceFactory.ts +14 -0
- package/src/binaries/boundedReadBinary.types.ts +90 -0
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +29 -0
- package/src/contracts/CodemationTelemetryAttributeNames.ts +10 -0
- package/src/contracts/credentialTypes.ts +10 -0
- package/src/contracts/hitlSeamTypes.ts +34 -0
- package/src/contracts/humanTaskStoreTypes.ts +48 -0
- package/src/contracts/inboxChannelTypes.ts +58 -0
- package/src/contracts/index.ts +3 -0
- package/src/contracts/runTypes.ts +61 -3
- package/src/contracts/runtimeTypes.ts +131 -0
- package/src/contracts/workspaceFileTypes.ts +73 -0
- package/src/credentials/CredentialMaterialProvider.types.ts +61 -0
- package/src/credentials/ManagedCredentialMaterialWriteError.ts +14 -0
- package/src/credentials/ManagedMaterialFetchError.ts +16 -0
- package/src/execution/ActivationEnqueueService.ts +16 -0
- package/src/execution/DefaultExecutionContextFactory.ts +11 -0
- package/src/execution/NodeExecutionSnapshotFactory.ts +7 -1
- package/src/execution/NodeExecutor.ts +60 -1
- package/src/execution/NodeExecutorFactory.ts +12 -2
- package/src/execution/NodeSuspensionHandler.ts +220 -0
- package/src/execution/PersistedRunStateTerminalBuilder.ts +5 -2
- package/src/execution/RunStateSemantics.ts +5 -0
- package/src/execution/RunSuspendedError.ts +21 -0
- package/src/index.ts +42 -0
- package/src/orchestration/Engine.ts +12 -2
- package/src/orchestration/EngineWaiters.ts +1 -1
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +25 -2
- package/src/orchestration/RunContinuationService.ts +226 -2
- package/src/orchestration/TestSuiteOrchestrator.ts +5 -4
- package/src/runtime/RunIntentService.ts +3 -0
- package/src/workflow/dsl/ChainCursorResolver.ts +36 -0
- package/dist/InMemoryRunDataFactory-C7YItvHG.d.cts +0 -123
- package/dist/bootstrap-BxuTFTLB.cjs.map +0 -1
- package/dist/bootstrap-D_Yyi0wL.js.map +0 -1
- package/dist/di-0Wop7z1y.js.map +0 -1
- package/dist/di-BlEKdoZS.cjs.map +0 -1
- package/dist/runtime-DBzq5YBi.cjs.map +0 -1
- package/dist/runtime-cxmUkk0l.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import { DependencyContainer as Container, DependencyContainer as DependencyContainer$1, Disposable, InjectionToken as InjectionToken$1, InjectionToken as TypeToken, Lifecycle, RegistrationOptions, container as container$1, delay, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, predicateAwareClassFactory, registry, singleton } from "tsyringe";
|
|
3
|
-
import { ZodType } from "zod";
|
|
3
|
+
import { ZodType, z } from "zod";
|
|
4
4
|
import { ReadableStream } from "node:stream/web";
|
|
5
5
|
|
|
6
6
|
//#region src/contracts/baseTypes.d.ts
|
|
@@ -190,6 +190,19 @@ type CredentialInstanceRecord<TPublicConfig extends CredentialJsonRecord = Crede
|
|
|
190
190
|
setupStatus: CredentialSetupStatus;
|
|
191
191
|
createdAt: string;
|
|
192
192
|
updatedAt: string;
|
|
193
|
+
/**
|
|
194
|
+
* Pointer to where the credential material bytes live. For OSS / standalone
|
|
195
|
+
* rows this is `{source: "local", ref: instanceId}` and the bytes co-locate
|
|
196
|
+
* with the row in the workspace DB. For managed-mode rows this is
|
|
197
|
+
* `{source: "control-plane", ref: <cp_id>}` and the bytes live at CP.
|
|
198
|
+
*
|
|
199
|
+
* The seam is read through `CredentialMaterialProvider`. See
|
|
200
|
+
* `docs/design/credentials-oauth-unification.md` ("Material provider seam").
|
|
201
|
+
*/
|
|
202
|
+
material: Readonly<{
|
|
203
|
+
source: "local" | "control-plane";
|
|
204
|
+
ref: string;
|
|
205
|
+
}>;
|
|
193
206
|
}>;
|
|
194
207
|
/**
|
|
195
208
|
* Arguments passed to `CredentialType.createSession` and `CredentialType.test`.
|
|
@@ -397,6 +410,16 @@ declare class CodemationTelemetryAttributeNames {
|
|
|
397
410
|
static readonly mcpServerId = "mcp.server_id";
|
|
398
411
|
/** MCP tool name on spans created for callTool invocations. */
|
|
399
412
|
static readonly mcpToolName = "mcp.tool_name";
|
|
413
|
+
/** Terminal node-execution status (e.g. `"hitl-approved"`, `"hitl-rejected"`) on HITL outcome spans. */
|
|
414
|
+
static readonly nodeExecutionStatus = "codemation.node.execution_status";
|
|
415
|
+
/** Populated on run-halted spans; discriminates the halt reason (e.g. `"hitl-rejected"`). */
|
|
416
|
+
static readonly runHaltReason = "codemation.run.halt_reason";
|
|
417
|
+
/** Human task ID on `hitl.task.*` span events. */
|
|
418
|
+
static readonly hitlTaskId = "codemation.hitl.task_id";
|
|
419
|
+
/** HITL channel name (e.g. `"inbox"`, `"control-plane-inbox"`) on `hitl.task.*` span events. */
|
|
420
|
+
static readonly hitlChannel = "codemation.hitl.channel";
|
|
421
|
+
/** Decision outcome (e.g. `"approved"`, `"rejected"`) on `hitl.task.decided` span events. */
|
|
422
|
+
static readonly hitlDecisionStatus = "codemation.hitl.decision_status";
|
|
400
423
|
}
|
|
401
424
|
//#endregion
|
|
402
425
|
//#region src/contracts/GenAiTelemetryAttributeNames.d.ts
|
|
@@ -573,6 +596,100 @@ interface WebhookTriggerMatcher {
|
|
|
573
596
|
}
|
|
574
597
|
//#endregion
|
|
575
598
|
//#region src/contracts/runtimeTypes.d.ts
|
|
599
|
+
/** Opaque unique identifier for a single HumanTask instance. */
|
|
600
|
+
type HumanTaskId = string;
|
|
601
|
+
/**
|
|
602
|
+
* Duration string — ISO 8601 duration ("PT24H") or shorthand ("24h").
|
|
603
|
+
* Parsed by the timeout job; stored as-is in the suspension record.
|
|
604
|
+
*/
|
|
605
|
+
type Duration = string;
|
|
606
|
+
/**
|
|
607
|
+
* Minimal handle handed to the `deliver` callback so it can route to the correct
|
|
608
|
+
* inbox channel.
|
|
609
|
+
*/
|
|
610
|
+
interface HumanTaskHandle {
|
|
611
|
+
readonly taskId: HumanTaskId;
|
|
612
|
+
readonly runId: string;
|
|
613
|
+
readonly nodeId: string;
|
|
614
|
+
readonly expiresAt: Date;
|
|
615
|
+
/** TODO: real signed URL; placeholder empty string for now. */
|
|
616
|
+
readonly resumeUrl: string;
|
|
617
|
+
/**
|
|
618
|
+
* Arbitrary JSON metadata copied from `SuspensionRequest.request.metadata` at suspension time.
|
|
619
|
+
* Used by the agent runtime to round-trip the `agentCheckpoint` back to the
|
|
620
|
+
* resumed node via `ctx.resumeContext.task.metadata`.
|
|
621
|
+
*/
|
|
622
|
+
readonly metadata?: Readonly<Record<string, JsonValue>>;
|
|
623
|
+
}
|
|
624
|
+
/** Human-readable description surface shown to the reviewer. */
|
|
625
|
+
interface HumanTaskSubject {
|
|
626
|
+
readonly title: string;
|
|
627
|
+
readonly summary: string;
|
|
628
|
+
readonly attributes?: JsonValue;
|
|
629
|
+
}
|
|
630
|
+
/** Identity of the person who made a decision on the task. */
|
|
631
|
+
interface HumanTaskActor {
|
|
632
|
+
readonly actorId: string;
|
|
633
|
+
readonly displayName?: string;
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* Resume context injected into `NodeExecutionContext` when the engine re-activates
|
|
637
|
+
* a previously suspended node. `defineHumanApprovalNode` wraps this with parsed
|
|
638
|
+
* `TDecision`; at the engine layer `decision.value` is `unknown`.
|
|
639
|
+
*/
|
|
640
|
+
interface ResumeContext {
|
|
641
|
+
readonly decision: Readonly<{
|
|
642
|
+
kind: "decided";
|
|
643
|
+
value: unknown;
|
|
644
|
+
actor: HumanTaskActor;
|
|
645
|
+
decidedAt: Date;
|
|
646
|
+
}> | Readonly<{
|
|
647
|
+
kind: "timed_out";
|
|
648
|
+
at: Date;
|
|
649
|
+
}> | Readonly<{
|
|
650
|
+
kind: "auto_accepted";
|
|
651
|
+
at: Date;
|
|
652
|
+
}>;
|
|
653
|
+
readonly delivery: JsonValue;
|
|
654
|
+
readonly task: HumanTaskHandle;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Thrown by a node's `execute()` to request durable suspension of the current item.
|
|
658
|
+
* The engine catches this, persists the suspension entry, calls `deliver`, and
|
|
659
|
+
* continues to the next item (per-item semantics).
|
|
660
|
+
*
|
|
661
|
+
* @example
|
|
662
|
+
* ```ts
|
|
663
|
+
* throw new SuspensionRequest({
|
|
664
|
+
* decisionSchema: z.object({ approved: z.boolean() }),
|
|
665
|
+
* timeout: "PT24H",
|
|
666
|
+
* onTimeout: "halt",
|
|
667
|
+
* subject: { title: "Approve invoice", summary: "Invoice #1234 needs approval" },
|
|
668
|
+
* deliver: async (handle) => {
|
|
669
|
+
* await notifySlack(handle);
|
|
670
|
+
* return { channel: "slack", ts: "..." };
|
|
671
|
+
* },
|
|
672
|
+
* });
|
|
673
|
+
* ```
|
|
674
|
+
*/
|
|
675
|
+
declare class SuspensionRequest<TDecision = unknown, TDelivery extends JsonValue = JsonValue> extends Error {
|
|
676
|
+
readonly request: Readonly<{
|
|
677
|
+
decisionSchema: ZodType<TDecision>;
|
|
678
|
+
timeout: Duration;
|
|
679
|
+
onTimeout: "halt" | "auto-accept";
|
|
680
|
+
subject: HumanTaskSubject;
|
|
681
|
+
metadata?: Readonly<Record<string, JsonValue>>;
|
|
682
|
+
deliver: (handle: HumanTaskHandle) => Promise<TDelivery>;
|
|
683
|
+
}>;
|
|
684
|
+
constructor(request: Readonly<{
|
|
685
|
+
decisionSchema: ZodType<TDecision>;
|
|
686
|
+
timeout: Duration;
|
|
687
|
+
onTimeout: "halt" | "auto-accept";
|
|
688
|
+
subject: HumanTaskSubject;
|
|
689
|
+
metadata?: Readonly<Record<string, JsonValue>>;
|
|
690
|
+
deliver: (handle: HumanTaskHandle) => Promise<TDelivery>;
|
|
691
|
+
}>);
|
|
692
|
+
}
|
|
576
693
|
interface WorkflowRunnerService {
|
|
577
694
|
runById(args: {
|
|
578
695
|
workflowId: WorkflowId;
|
|
@@ -668,12 +785,30 @@ interface NodeBinaryAttachmentService extends ExecutionBinaryService {
|
|
|
668
785
|
attach(args: BinaryAttachmentCreateRequest): Promise<BinaryAttachment>;
|
|
669
786
|
withAttachment<TJson>(item: Item<TJson>, name: string, attachment: BinaryAttachment): Item<TJson>;
|
|
670
787
|
}
|
|
788
|
+
/** Default maximum bytes read into memory by the bounded helpers (50 MiB). */
|
|
789
|
+
declare const BINARY_DEFAULT_MAX_BYTES: number;
|
|
671
790
|
interface ExecutionBinaryService {
|
|
672
791
|
forNode(args: {
|
|
673
792
|
nodeId: NodeId;
|
|
674
793
|
activationId: NodeActivationId;
|
|
675
794
|
}): NodeBinaryAttachmentService;
|
|
676
795
|
openReadStream(attachment: BinaryAttachment): Promise<BinaryStorageReadResult | undefined>;
|
|
796
|
+
/**
|
|
797
|
+
* Reads all bytes from the attachment into a contiguous `Uint8Array`.
|
|
798
|
+
* Checks `attachment.size` against `maxBytes` *before* any allocation; throws a bounded-read
|
|
799
|
+
* error when exceeded (no OOM). Throws if the stream is unavailable or the byte count mismatches.
|
|
800
|
+
*/
|
|
801
|
+
getBytes(attachment: BinaryAttachment, maxBytes?: number): Promise<Uint8Array>;
|
|
802
|
+
/**
|
|
803
|
+
* Reads the attachment and decodes the bytes as UTF-8 text.
|
|
804
|
+
* Subject to the same bounded-read safety as `getBytes`.
|
|
805
|
+
*/
|
|
806
|
+
getText(attachment: BinaryAttachment, maxBytes?: number): Promise<string>;
|
|
807
|
+
/**
|
|
808
|
+
* Reads the attachment, decodes as UTF-8 text, and parses as JSON.
|
|
809
|
+
* Throws a clear error on invalid JSON. Subject to the same bounded-read safety.
|
|
810
|
+
*/
|
|
811
|
+
getJson<T = unknown>(attachment: BinaryAttachment, maxBytes?: number): Promise<T>;
|
|
677
812
|
}
|
|
678
813
|
interface ExecutionContext {
|
|
679
814
|
runId: RunId;
|
|
@@ -706,6 +841,14 @@ interface ExecutionContext {
|
|
|
706
841
|
* Collections registered in the codemation config, keyed by collection name.
|
|
707
842
|
*/
|
|
708
843
|
readonly collections?: CollectionsContext;
|
|
844
|
+
/**
|
|
845
|
+
* Resolve a DI token from the host container.
|
|
846
|
+
* Allows nodes to reach host-side services (e.g. `InboxChannelResolverToken`)
|
|
847
|
+
* without importing host code. Wired by `DefaultExecutionContextFactory`; throws
|
|
848
|
+
* a clear error when no resolver is configured (e.g. in unit tests that don't
|
|
849
|
+
* set up the full container).
|
|
850
|
+
*/
|
|
851
|
+
resolve<T>(token: TypeToken<T>): T;
|
|
709
852
|
}
|
|
710
853
|
interface ExecutionContextFactory {
|
|
711
854
|
create(args: {
|
|
@@ -729,6 +872,11 @@ interface NodeExecutionContext<TConfig extends NodeConfigBase = NodeConfigBase>
|
|
|
729
872
|
config: TConfig;
|
|
730
873
|
telemetry: NodeExecutionTelemetry;
|
|
731
874
|
binary: NodeBinaryAttachmentService;
|
|
875
|
+
/**
|
|
876
|
+
* Present when this node activation is a HITL resume.
|
|
877
|
+
* The node checks `ctx.resumeContext !== undefined` and takes the resume branch.
|
|
878
|
+
*/
|
|
879
|
+
resumeContext?: ResumeContext;
|
|
732
880
|
}
|
|
733
881
|
interface PollingTriggerHandle {
|
|
734
882
|
/**
|
|
@@ -1635,7 +1783,7 @@ interface RunQueueEntry {
|
|
|
1635
1783
|
received: Readonly<Record<InputPortKey, Items>>;
|
|
1636
1784
|
}>;
|
|
1637
1785
|
}
|
|
1638
|
-
type NodeExecutionStatus = "pending" | "queued" | "running" | "completed" | "failed" | "skipped";
|
|
1786
|
+
type NodeExecutionStatus = "pending" | "queued" | "running" | "completed" | "failed" | "skipped" | "hitl-approved" | "hitl-rejected" | "hitl-timeout" | "hitl-auto-accepted" | "hitl-cancelled";
|
|
1639
1787
|
interface NodeExecutionError {
|
|
1640
1788
|
message: string;
|
|
1641
1789
|
name?: string;
|
|
@@ -1743,7 +1891,9 @@ interface ExecutionFrontierPlan {
|
|
|
1743
1891
|
clearedNodeIds: ReadonlyArray<NodeId>;
|
|
1744
1892
|
preservedPinnedNodeIds: ReadonlyArray<NodeId>;
|
|
1745
1893
|
}
|
|
1746
|
-
type RunStatus = "running" | "pending" | "completed" | "failed";
|
|
1894
|
+
type RunStatus = "running" | "pending" | "completed" | "failed" | "suspended" | "halted";
|
|
1895
|
+
/** Reason a run transitioned to {@link RunStatus} `"halted"`. */
|
|
1896
|
+
type RunHaltReason = "hitl-rejected" | "hitl-timeout" | "hitl-cancelled";
|
|
1747
1897
|
interface RunSummary {
|
|
1748
1898
|
runId: RunId;
|
|
1749
1899
|
workflowId: WorkflowId;
|
|
@@ -1777,6 +1927,35 @@ interface PersistedRunSchedulingState {
|
|
|
1777
1927
|
pending?: PendingNodeExecution;
|
|
1778
1928
|
queue: RunQueueEntry[];
|
|
1779
1929
|
}
|
|
1930
|
+
/** One persisted suspension entry per suspended item. */
|
|
1931
|
+
interface PersistedSuspensionEntry {
|
|
1932
|
+
/** Opaque task identifier (UUID v4). */
|
|
1933
|
+
readonly taskId: string;
|
|
1934
|
+
readonly nodeId: NodeId;
|
|
1935
|
+
readonly activationId: NodeActivationId;
|
|
1936
|
+
readonly itemIndex: number;
|
|
1937
|
+
/** SHA-256 hex digest of the decision schema JSON (for schema-drift detection). */
|
|
1938
|
+
readonly decisionSchemaHash: string;
|
|
1939
|
+
/** Serialized return value from `SuspensionRequest.deliver` (stored on the HumanTask row). */
|
|
1940
|
+
readonly deliveryRef: JsonValue;
|
|
1941
|
+
/** ISO timestamp when the task expires. */
|
|
1942
|
+
readonly timeoutAt: string;
|
|
1943
|
+
readonly onTimeout: "halt" | "auto-accept";
|
|
1944
|
+
}
|
|
1945
|
+
/**
|
|
1946
|
+
* When a node is re-activated after suspension, the engine writes the resume context here
|
|
1947
|
+
* so `NodeExecutionRequestHandlerService` can splice `resumeContext` into ctx.
|
|
1948
|
+
* Cleared once the re-activation is consumed.
|
|
1949
|
+
*/
|
|
1950
|
+
interface PendingResumeEntry {
|
|
1951
|
+
readonly activationId: NodeActivationId;
|
|
1952
|
+
readonly nodeId: NodeId;
|
|
1953
|
+
/**
|
|
1954
|
+
* Typed as `unknown` here to avoid a circular import between runTypes ↔ runtimeTypes.
|
|
1955
|
+
* `NodeExecutionRequestHandlerService` casts this to `ResumeContext` from runtimeTypes.
|
|
1956
|
+
*/
|
|
1957
|
+
readonly resumeContext: unknown;
|
|
1958
|
+
}
|
|
1780
1959
|
interface PersistedRunState {
|
|
1781
1960
|
runId: RunId;
|
|
1782
1961
|
workflowId: WorkflowId;
|
|
@@ -1795,12 +1974,24 @@ interface PersistedRunState {
|
|
|
1795
1974
|
/** Successful node completions so far (for activation budget). */
|
|
1796
1975
|
engineCounters?: EngineRunCounters;
|
|
1797
1976
|
status: RunStatus;
|
|
1977
|
+
/** Populated when `status === "halted"` to discriminate why the run was halted. */
|
|
1978
|
+
reason?: RunHaltReason;
|
|
1798
1979
|
pending?: PendingNodeExecution;
|
|
1799
1980
|
queue: RunQueueEntry[];
|
|
1800
1981
|
outputsByNode: Record<NodeId, NodeOutputs>;
|
|
1801
1982
|
nodeSnapshotsByNodeId: Record<NodeId, NodeExecutionSnapshot>;
|
|
1802
1983
|
/** Append-only history of connection invocations (LLM/tool) nested under owning nodes. */
|
|
1803
1984
|
connectionInvocations?: ReadonlyArray<ConnectionInvocationRecord>;
|
|
1985
|
+
/**
|
|
1986
|
+
* One entry per outstanding HITL suspension (per-item).
|
|
1987
|
+
* Present and non-empty iff `status === "suspended"`.
|
|
1988
|
+
*/
|
|
1989
|
+
suspension?: ReadonlyArray<PersistedSuspensionEntry>;
|
|
1990
|
+
/**
|
|
1991
|
+
* Written by `resumeRun()` so `NodeExecutionRequestHandlerService` can splice `resumeContext`
|
|
1992
|
+
* into the ctx when re-executing the suspended node. Cleared once consumed.
|
|
1993
|
+
*/
|
|
1994
|
+
pendingResume?: PendingResumeEntry;
|
|
1804
1995
|
}
|
|
1805
1996
|
interface WorkflowExecutionRepository {
|
|
1806
1997
|
createRun(args: {
|
|
@@ -1860,6 +2051,12 @@ type RunResult = {
|
|
|
1860
2051
|
error: {
|
|
1861
2052
|
message: string;
|
|
1862
2053
|
};
|
|
2054
|
+
} | {
|
|
2055
|
+
runId: RunId;
|
|
2056
|
+
workflowId: WorkflowId;
|
|
2057
|
+
startedAt: string;
|
|
2058
|
+
status: "halted";
|
|
2059
|
+
reason: RunHaltReason;
|
|
1863
2060
|
};
|
|
1864
2061
|
type WebhookRunResult = Readonly<{
|
|
1865
2062
|
runId: RunId;
|
|
@@ -2367,6 +2564,244 @@ declare class RunFinishedAtFactory {
|
|
|
2367
2564
|
static resolveIso(state: RunFinishedAtSource): string | undefined;
|
|
2368
2565
|
}
|
|
2369
2566
|
//#endregion
|
|
2567
|
+
//#region src/authoring/defineNode.types.d.ts
|
|
2568
|
+
type MaybePromise<TValue> = TValue | Promise<TValue>;
|
|
2569
|
+
type ResolvableCredentialType = AnyCredentialType | CredentialTypeId;
|
|
2570
|
+
type SessionForCredentialType<TCredential extends ResolvableCredentialType> = TCredential extends AnyCredentialType ? Awaited<ReturnType<TCredential["createSession"]>> : unknown;
|
|
2571
|
+
type DefinedNodeCredentialBinding = ResolvableCredentialType | Readonly<{
|
|
2572
|
+
readonly type: ResolvableCredentialType | ReadonlyArray<ResolvableCredentialType>;
|
|
2573
|
+
readonly label?: string;
|
|
2574
|
+
readonly optional?: true;
|
|
2575
|
+
readonly helpText?: string;
|
|
2576
|
+
readonly helpUrl?: string;
|
|
2577
|
+
}>;
|
|
2578
|
+
type DefinedNodeCredentialBindings = Readonly<Record<string, DefinedNodeCredentialBinding>>;
|
|
2579
|
+
type SessionForBinding<TBinding extends DefinedNodeCredentialBinding> = TBinding extends Readonly<{
|
|
2580
|
+
type: infer TType;
|
|
2581
|
+
}> ? TType extends ReadonlyArray<infer TEntry> ? SessionForCredentialType<TEntry & ResolvableCredentialType> : SessionForCredentialType<TType & ResolvableCredentialType> : SessionForCredentialType<TBinding & ResolvableCredentialType>;
|
|
2582
|
+
type DefinedNodeCredentialAccessors<TBindings extends DefinedNodeCredentialBindings | undefined> = TBindings extends DefinedNodeCredentialBindings ? Readonly<{ [TKey in keyof TBindings]: () => Promise<SessionForBinding<TBindings[TKey]>> }> : Readonly<Record<string, never>>;
|
|
2583
|
+
interface DefinedNodeRunContext<TConfig extends CredentialJsonRecord, TBindings extends DefinedNodeCredentialBindings | undefined> {
|
|
2584
|
+
readonly config: TConfig;
|
|
2585
|
+
readonly credentials: DefinedNodeCredentialAccessors<TBindings>;
|
|
2586
|
+
readonly execution: NodeExecutionContext<RunnableNodeConfig<TConfig, unknown>>;
|
|
2587
|
+
}
|
|
2588
|
+
/**
|
|
2589
|
+
* Arguments for {@link defineNode} `execute` (engine `ctx` matches {@link RunnableNode.execute};
|
|
2590
|
+
* the second callback parameter adds {@link DefinedNodeRunContext} for credential accessors).
|
|
2591
|
+
*/
|
|
2592
|
+
type DefineNodeExecuteArgs<TConfig extends CredentialJsonRecord, TInputJson$1> = Readonly<{
|
|
2593
|
+
input: TInputJson$1;
|
|
2594
|
+
item: Item;
|
|
2595
|
+
itemIndex: number;
|
|
2596
|
+
items: Items;
|
|
2597
|
+
ctx: NodeExecutionContext<RunnableNodeConfig<TInputJson$1, unknown> & Readonly<{
|
|
2598
|
+
config: TConfig;
|
|
2599
|
+
}>>;
|
|
2600
|
+
}>;
|
|
2601
|
+
type DefinedNodeConfigInput<TConfigResolved extends CredentialJsonRecord, TItemJson> = ParamDeep<TConfigResolved, TItemJson>;
|
|
2602
|
+
interface DefinedNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, _TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
|
|
2603
|
+
readonly kind: "defined-node";
|
|
2604
|
+
readonly key: TKey$1;
|
|
2605
|
+
readonly title: string;
|
|
2606
|
+
readonly description?: string;
|
|
2607
|
+
create<TConfigItemJson = TInputJson$1>(config: DefinedNodeConfigInput<TConfig, TConfigItemJson>, name?: string, id?: string): RunnableNodeConfig<TInputJson$1, TOutputJson$1>;
|
|
2608
|
+
register(context: {
|
|
2609
|
+
registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
|
|
2610
|
+
}): void;
|
|
2611
|
+
}
|
|
2612
|
+
/**
|
|
2613
|
+
* Plugin / DSL-friendly node: per-item `execute` with optional {@link RunnableNodeConfig.inputSchema}.
|
|
2614
|
+
*/
|
|
2615
|
+
interface DefineNodeOptions<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
|
|
2616
|
+
readonly key: TKey$1;
|
|
2617
|
+
readonly title: string;
|
|
2618
|
+
readonly description?: string;
|
|
2619
|
+
/**
|
|
2620
|
+
* Canvas icon for this node (same contract as `NodeConfigBase.icon` on runnable configs).
|
|
2621
|
+
* The Next host resolves Lucide (`lucide:…`), built-in SVGs (`builtin:…`), Simple Icons (`si:…`), and image URLs (`https:`, `data:`, `/…`).
|
|
2622
|
+
*/
|
|
2623
|
+
readonly icon?: string;
|
|
2624
|
+
/** Default values / form hints for **static** node configuration (credentials, retry, IDs), not per-item payload. */
|
|
2625
|
+
readonly input?: Readonly<Record<keyof TConfig & string, unknown>>;
|
|
2626
|
+
readonly configSchema?: z.ZodType<TConfig>;
|
|
2627
|
+
readonly credentials?: TBindings;
|
|
2628
|
+
/**
|
|
2629
|
+
* Validates **`input`** (engine also accepts `inputSchema` on the node class).
|
|
2630
|
+
*/
|
|
2631
|
+
readonly inputSchema?: ZodType<TInputJson$1>;
|
|
2632
|
+
/** Preserve inbound `item.binary` when `execute` returns plain JSON or item-shaped results without `binary`. */
|
|
2633
|
+
readonly keepBinaries?: boolean;
|
|
2634
|
+
/**
|
|
2635
|
+
* Static configuration summary surfaced in the workflow inspector — see
|
|
2636
|
+
* {@link import("../contracts/workflowTypes").NodeConfigBase.inspectorSummary}.
|
|
2637
|
+
*
|
|
2638
|
+
* Receives the static config; returns 2–6 short label/value pairs (or `undefined` to skip).
|
|
2639
|
+
*/
|
|
2640
|
+
readonly inspectorSummary?: (args: Readonly<{
|
|
2641
|
+
config: TConfig;
|
|
2642
|
+
}>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
|
|
2643
|
+
execute(args: DefineNodeExecuteArgs<TConfig, TInputJson$1>, context: DefinedNodeRunContext<TConfig, TBindings>): MaybePromise<TOutputJson$1>;
|
|
2644
|
+
}
|
|
2645
|
+
/**
|
|
2646
|
+
* Batch-oriented defined node: `run` receives all item JSON once (last item in activation); emits one output per input row.
|
|
2647
|
+
*/
|
|
2648
|
+
interface DefineBatchNodeOptions<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
|
|
2649
|
+
readonly key: TKey$1;
|
|
2650
|
+
readonly title: string;
|
|
2651
|
+
readonly description?: string;
|
|
2652
|
+
readonly icon?: string;
|
|
2653
|
+
readonly input?: Readonly<Record<keyof TConfig & string, unknown>>;
|
|
2654
|
+
readonly configSchema?: z.ZodType<TConfig>;
|
|
2655
|
+
readonly credentials?: TBindings;
|
|
2656
|
+
readonly inspectorSummary?: (args: Readonly<{
|
|
2657
|
+
config: TConfig;
|
|
2658
|
+
}>) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
|
|
2659
|
+
run(items: ReadonlyArray<TInputJson$1>, context: DefinedNodeRunContext<TConfig, TBindings>): MaybePromise<ReadonlyArray<TOutputJson$1>>;
|
|
2660
|
+
}
|
|
2661
|
+
declare function defineNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(options: DefineNodeOptions<TKey$1, TConfig, TInputJson$1, TOutputJson$1, TBindings>): DefinedNode<TKey$1, TConfig, TInputJson$1, TOutputJson$1, TBindings>;
|
|
2662
|
+
declare function defineBatchNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1, TOutputJson$1, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(options: DefineBatchNodeOptions<TKey$1, TConfig, TInputJson$1, TOutputJson$1, TBindings>): DefinedNode<TKey$1, TConfig, TInputJson$1, TOutputJson$1, TBindings>;
|
|
2663
|
+
//#endregion
|
|
2664
|
+
//#region src/authoring/defineHumanApprovalNode.types.d.ts
|
|
2665
|
+
/**
|
|
2666
|
+
* Decision shape merged into `item.json` after a HITL approval task resolves.
|
|
2667
|
+
*
|
|
2668
|
+
* - `"approved"` / `"rejected"` — from a human decision (uses `approvedPredicate`).
|
|
2669
|
+
* - `"timed-out"` — timeout fired with `onTimeout: "halt"`.
|
|
2670
|
+
* - `"auto-accepted"` — timeout fired with `onTimeout: "auto-accept"`.
|
|
2671
|
+
*/
|
|
2672
|
+
interface HumanApprovalDecisionResult {
|
|
2673
|
+
readonly status: "approved" | "rejected" | "timed-out" | "auto-accepted";
|
|
2674
|
+
/** Identity of the person who decided; absent for automated outcomes. */
|
|
2675
|
+
readonly actor?: HumanTaskActor;
|
|
2676
|
+
/** ISO 8601 timestamp of the decision. */
|
|
2677
|
+
readonly decidedAt?: Date;
|
|
2678
|
+
/** Optional free-text note from the reviewer. */
|
|
2679
|
+
readonly note?: string;
|
|
2680
|
+
/**
|
|
2681
|
+
* Full raw decision payload (only present for `"approved"` / `"rejected"`).
|
|
2682
|
+
* Shape is determined by the channel's `decisionSchema`.
|
|
2683
|
+
*/
|
|
2684
|
+
readonly payload?: Record<string, unknown>;
|
|
2685
|
+
}
|
|
2686
|
+
/**
|
|
2687
|
+
* Output item shape emitted by a `defineHumanApprovalNode`-based node.
|
|
2688
|
+
* Original `item.json` fields are preserved and `decision` is merged in.
|
|
2689
|
+
* If the input `item.json` already contained a `decision` key it is **overwritten**.
|
|
2690
|
+
*/
|
|
2691
|
+
type HumanApprovalOutputJson<TInputJson$1 extends Record<string, unknown>> = TInputJson$1 & {
|
|
2692
|
+
readonly decision: HumanApprovalDecisionResult;
|
|
2693
|
+
};
|
|
2694
|
+
/**
|
|
2695
|
+
* Extends {@link DefinedNode} with the `humanApprovalToolBehavior` metadata marker.
|
|
2696
|
+
* Story 10 reads this field when attaching the node as an agent tool.
|
|
2697
|
+
*/
|
|
2698
|
+
interface DefinedHumanApprovalNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1 extends Record<string, unknown>, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> extends DefinedNode<TKey$1, TConfig, TInputJson$1, HumanApprovalOutputJson<TInputJson$1>, TBindings> {
|
|
2699
|
+
/**
|
|
2700
|
+
* Behavior hint consumed by the agent runtime (story 10) when this node is attached as a tool.
|
|
2701
|
+
* `"return"` (default) — return the rejection to the agent as a tool result.
|
|
2702
|
+
* `"halt"` — halt the agent run on rejection.
|
|
2703
|
+
*
|
|
2704
|
+
* Standalone DSL usage ignores this field.
|
|
2705
|
+
*/
|
|
2706
|
+
readonly humanApprovalToolBehavior: {
|
|
2707
|
+
onRejected: "return" | "halt";
|
|
2708
|
+
};
|
|
2709
|
+
}
|
|
2710
|
+
/**
|
|
2711
|
+
* Returns `true` when `node` was created by {@link defineHumanApprovalNode}.
|
|
2712
|
+
* Uses the `humanApprovalToolBehavior` typed field as the discriminant.
|
|
2713
|
+
*/
|
|
2714
|
+
declare function isHumanApprovalNode(node: unknown): node is DefinedHumanApprovalNode<string, Record<string, unknown>, Record<string, unknown>, undefined>;
|
|
2715
|
+
/**
|
|
2716
|
+
* Authoring helper that compiles a HITL approval channel down to a regular
|
|
2717
|
+
* {@link defineNode}-backed node with `SuspensionRequest` semantics.
|
|
2718
|
+
*
|
|
2719
|
+
* **Fast-forward decision semantics:**
|
|
2720
|
+
* - On the first `execute` call (no `ctx.resumeContext`): throws a `SuspensionRequest`
|
|
2721
|
+
* that calls the author's `deliver`. The engine persists the suspension and continues.
|
|
2722
|
+
* - On resume (`ctx.resumeContext` set): calls `onDecision`/`onTimeout` as appropriate,
|
|
2723
|
+
* merges a `decision` key into `item.json`, and returns an item with the original
|
|
2724
|
+
* `binary` map passed by reference (no copy).
|
|
2725
|
+
*
|
|
2726
|
+
* **Output shape per item:**
|
|
2727
|
+
* ```ts
|
|
2728
|
+
* // Input: { json: { invoiceId: 42 }, binary?: {...} }
|
|
2729
|
+
* // Output: { json: { invoiceId: 42, decision: { status: "approved", actor, decidedAt } }, binary: <unchanged> }
|
|
2730
|
+
* ```
|
|
2731
|
+
* If `item.json` already has a `decision` key it is **overwritten**. Namespace as
|
|
2732
|
+
* needed if your schema reserves that key for another purpose.
|
|
2733
|
+
*
|
|
2734
|
+
* **Predicate persistence:**
|
|
2735
|
+
* The `approvedPredicate` function is NOT serialized to the suspension record (except
|
|
2736
|
+
* as an audit-only string via `toString()`). On resume, the workflow definition is
|
|
2737
|
+
* reloaded from code at process start and the predicate closure is rebuilt naturally.
|
|
2738
|
+
* If a deploy ships a changed predicate between suspend and resume, the *new* predicate
|
|
2739
|
+
* runs — document this in your runbook when the predicate carries business logic that
|
|
2740
|
+
* may change across deploys.
|
|
2741
|
+
*
|
|
2742
|
+
* @example
|
|
2743
|
+
* ```ts
|
|
2744
|
+
* export const slackApprovalNode = defineHumanApprovalNode({
|
|
2745
|
+
* key: "my-plugin.slackApproval",
|
|
2746
|
+
* title: "Slack Approval",
|
|
2747
|
+
* channel: "slack",
|
|
2748
|
+
* configSchema: z.object({ channel: z.string(), message: z.string() }),
|
|
2749
|
+
* decisionSchema: z.object({ approved: z.boolean(), note: z.string().optional() }),
|
|
2750
|
+
*
|
|
2751
|
+
* async deliver({ task, config, item }, ctx) {
|
|
2752
|
+
* const ts = await postSlackMessage(config.channel, `Approve? <${task.resumeUrl}>`);
|
|
2753
|
+
* return { channel: config.channel, ts };
|
|
2754
|
+
* },
|
|
2755
|
+
*
|
|
2756
|
+
* async onDecision({ decision, actor, delivery }, ctx) {
|
|
2757
|
+
* await updateSlackMessage(delivery.channel, delivery.ts, decision.approved ? "✅" : "❌");
|
|
2758
|
+
* },
|
|
2759
|
+
* });
|
|
2760
|
+
* ```
|
|
2761
|
+
*/
|
|
2762
|
+
declare function defineHumanApprovalNode<TKey$1 extends string, TConfig extends CredentialJsonRecord, TInputJson$1 extends Record<string, unknown>, TDecision extends Record<string, unknown>, TDelivery extends JsonValue, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(opts: {
|
|
2763
|
+
key: TKey$1;
|
|
2764
|
+
title: string;
|
|
2765
|
+
description?: string;
|
|
2766
|
+
icon?: string;
|
|
2767
|
+
channel: string;
|
|
2768
|
+
configSchema: ZodType<TConfig>;
|
|
2769
|
+
inputSchema?: ZodType<TInputJson$1>;
|
|
2770
|
+
decisionSchema: ZodType<TDecision>;
|
|
2771
|
+
credentials?: TBindings;
|
|
2772
|
+
/**
|
|
2773
|
+
* Custom predicate that decides whether a decision counts as "approved".
|
|
2774
|
+
* When omitted, the helper checks if `decisionSchema` is a Zod object with an
|
|
2775
|
+
* `approved: boolean` field; if so it uses `decision.approved === true`.
|
|
2776
|
+
* If neither holds, `defineHumanApprovalNode` throws at **definition time** (not runtime).
|
|
2777
|
+
*/
|
|
2778
|
+
approvedPredicate?: (decision: TDecision) => boolean;
|
|
2779
|
+
/** Default suspension timeout. Defaults to `"24h"`. */
|
|
2780
|
+
defaultTimeout?: Duration;
|
|
2781
|
+
/** What to do when the task times out. Defaults to `"halt"`. */
|
|
2782
|
+
defaultOnTimeout?: "halt" | "auto-accept";
|
|
2783
|
+
inspectorSummary?: (config: TConfig) => ReadonlyArray<NodeInspectorSummaryRow> | undefined;
|
|
2784
|
+
deliver: (args: {
|
|
2785
|
+
task: HumanTaskHandle;
|
|
2786
|
+
config: TConfig;
|
|
2787
|
+
input: TInputJson$1;
|
|
2788
|
+
item: Item;
|
|
2789
|
+
}, ctx: ExecutionContext) => Promise<TDelivery>;
|
|
2790
|
+
onDecision?: (args: {
|
|
2791
|
+
decision: TDecision;
|
|
2792
|
+
actor: HumanTaskActor;
|
|
2793
|
+
task: HumanTaskHandle;
|
|
2794
|
+
delivery: TDelivery;
|
|
2795
|
+
item: Item;
|
|
2796
|
+
}, ctx: ExecutionContext) => Promise<void>;
|
|
2797
|
+
onTimeout?: (args: {
|
|
2798
|
+
task: HumanTaskHandle;
|
|
2799
|
+
delivery: TDelivery;
|
|
2800
|
+
item: Item;
|
|
2801
|
+
policy: "halt" | "auto-accept";
|
|
2802
|
+
}, ctx: ExecutionContext) => Promise<void>;
|
|
2803
|
+
}): DefinedHumanApprovalNode<TKey$1, TConfig, TInputJson$1, TBindings>;
|
|
2804
|
+
//#endregion
|
|
2370
2805
|
//#region src/workflow/dsl/workflowBuilderTypes.d.ts
|
|
2371
2806
|
type AnyRunnableNodeConfig = RunnableNodeConfig<any, any>;
|
|
2372
2807
|
type AnyTriggerNodeConfig = TriggerNodeConfig<any>;
|
|
@@ -2412,6 +2847,25 @@ declare class ChainCursor<TCurrentJson> {
|
|
|
2412
2847
|
thenIntoInputHints<TOutputJson$1, TConfig extends RunnableNodeConfig<any, TOutputJson$1>>(config: TConfig): ChainCursor<RunnableNodeOutputJson<TConfig>>;
|
|
2413
2848
|
readonly when: ChainCursorWhenOverloads<TCurrentJson>;
|
|
2414
2849
|
route<TNextJson$1>(branches: Readonly<Record<OutputPortKey, (branch: ChainCursor<TCurrentJson>) => ChainCursor<TNextJson$1> | undefined>>): ChainCursor<TNextJson$1>;
|
|
2850
|
+
/**
|
|
2851
|
+
* Chainable shorthand for `.then(node.create(config, metadata?.name, metadata?.nodeId))`.
|
|
2852
|
+
*
|
|
2853
|
+
* Signals to readers that this step suspends the run and waits for a human decision.
|
|
2854
|
+
* Throws at workflow-build time if `node` was not created via `defineHumanApprovalNode`.
|
|
2855
|
+
*
|
|
2856
|
+
* @example
|
|
2857
|
+
* ```ts
|
|
2858
|
+
* workflow
|
|
2859
|
+
* .trigger(...)
|
|
2860
|
+
* .humanApproval(inboxApproval, { title: "Approve?", body: "...", priority: "normal" })
|
|
2861
|
+
* .then(nextStep.create(...))
|
|
2862
|
+
* .build();
|
|
2863
|
+
* ```
|
|
2864
|
+
*/
|
|
2865
|
+
humanApproval<TKey$1 extends string, TConfig extends Record<string, unknown>, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(node: DefinedHumanApprovalNode<TKey$1, TConfig, TCurrentJson & Record<string, unknown>, TBindings>, config: TConfig, metadata?: {
|
|
2866
|
+
name?: string;
|
|
2867
|
+
nodeId?: string;
|
|
2868
|
+
}): ChainCursor<HumanApprovalOutputJson<TCurrentJson & Record<string, unknown>>>;
|
|
2415
2869
|
build(): WorkflowDefinition;
|
|
2416
2870
|
private resolveSharedInputPortHint;
|
|
2417
2871
|
}
|
|
@@ -2554,5 +3008,5 @@ declare class DefaultWorkflowGraphFactory implements WorkflowGraphFactory {
|
|
|
2554
3008
|
create(def: WorkflowDefinition): WorkflowGraph;
|
|
2555
3009
|
}
|
|
2556
3010
|
//#endregion
|
|
2557
|
-
export {
|
|
2558
|
-
//# sourceMappingURL=index-
|
|
3011
|
+
export { ExecutionPayloadPolicyFields as $, CredentialBindingKey as $a, TriggerRuntimeDiagnostics as $i, BinaryPreviewKind as $n, nodeRef as $r, PersistedRunState as $t, DefinedNodeCredentialAccessors as A, TelemetrySpanEventRecord as Aa, NodeActivationContinuation as Ai, delay as An, RunId as Ar, DEFAULT_ASSERTION_PASS_THRESHOLD as At, RetryPolicy as B, CostTrackingComponent as Ba, NodeExecutionStatePublisher as Bi, ENGINE_EXECUTION_LIMITS_DEFAULTS as Bn, WorkflowErrorContext as Br, CurrentStateExecutionRequest as Bt, defineHumanApprovalNode as C, TelemetryArtifactReference as Ca, HumanTaskActor as Ci, DependencyContainer$1 as Cn, PollingTriggerDedupWindow as Co, NodeRef as Cr, ItemExprResolvedContext as Ct, DefineNodeOptions as D, TelemetryMetricRecord as Da, ItemNode as Di, RegistrationOptions as Dn, OutputPortKey as Do, PersistedRunPolicySnapshot as Dr, resolveItemExprsInUnknown as Dt, DefineNodeExecuteArgs as E, TelemetryChildSpanStart as Ea, HumanTaskSubject as Ei, Lifecycle as En, NodeId as Eo, ParentExecutionRef as Er, resolveItemExprsForExecution as Et, defineNode as F, NoOpExecutionTelemetryFactory as Fa, NodeBinaryAttachmentService as Fi, instancePerContainerCachingFactory as Fn, TriggerNodeConfig as Fr, AgentMcpToolMap as Ft, isPortsEmission as G, CostTrackingTelemetryMetricNames as Ga, PreparedNodeActivationDispatch as Gi, RunEventSubscription as Gn, WorkflowNodeConnection as Gr, NodeExecutionStatus as Gt, getOriginIndexFromItem as H, CostTrackingTelemetry as Ha, NodeResolver as Hi, EngineExecutionLimitsPolicyConfig as Hn, WorkflowErrorHandlerSpec as Hr, ExecutionFrontierPlan as Ht, RunFinishedAtFactory as I, NoOpExecutionTelemetry as Ia, NodeExecutionContext as Ii, predicateAwareClassFactory as In, TriggerNodeOutputJson as Ir, NeedsReconsentEvent as It, McpServerTransport as J, CollectionsContext as Ja, RunnableNodeExecuteArgs as Ji, TestSuiteRunId as Jn, WorkflowStoragePolicyDecisionArgs as Jr, PendingResumeEntry as Jt, isUnbrandedPortsEmissionShape as K, CostTrackingUsageRecord as Ka, ResumeContext as Ki, TestCaseRunStatus as Kn, WorkflowPolicyRuntimeDefaults as Kr, NodeInputsByPort as Kt, NoOpCostTrackingTelemetryFactory as L, NoOpNodeExecutionTelemetry as La, NodeExecutionRequest as Li, registry as Ln, TriggerNodeSetupState as Lr, ConnectionInvocationAppendArgs as Lt, DefinedNodeCredentialBindings as M, CodemationTelemetryMetricNames as Ma, NodeActivationRequest as Mi, injectAll as Mn, RunnableNodeConfig as Mr, NoOpAgentMcpIntegration as Mt, DefinedNodeRunContext as N, GenAiTelemetryAttributeNames as Na, NodeActivationRequestBase as Ni, injectable as Nn, RunnableNodeInputJson as Nr, AgentBindError as Nt, DefinedNode as O, TelemetryScope as Oa, LiveWorkflowRepository as Oi, TypeToken as On, PersistedTokenId as Oo, RunDataFactory as Or, AssertionResult as Ot, defineBatchNode as P, CodemationTelemetryAttributeNames as Pa, NodeActivationScheduler as Pi, instanceCachingFactory as Pn, RunnableNodeOutputJson as Pr, AgentMcpIntegration as Pt, ExecutionInstanceId as Q, CredentialBinding as Qa, TriggerNode as Qi, BinaryAttachment as Qn, branchRef as Qr, PersistedRunSchedulingState as Qt, NoOpCostTrackingTelemetry as R, NoOpTelemetrySpanScope as Ra, NodeExecutionRequestHandler as Ri, singleton as Rn, UpstreamRefPlaceholder as Rr, ConnectionInvocationId as Rt, HumanApprovalOutputJson as S, TelemetryArtifactAttachment as Sa, ExecutionContextFactory as Si, Container as Sn, PollingTriggerLogger as So, NodeOutputs as Sr, ItemExprContext as St, DefineBatchNodeOptions as T, TelemetryAttributes as Ta, HumanTaskId as Ti, InjectionToken$1 as Tn, NodeConnectionName as To, PairedItemRef as Tr, itemExpr as Tt, PortsEmission as U, CostTrackingTelemetryAttributeNames as Ua, PersistedTriggerSetupState as Ui, RunEvent as Un, WorkflowGraph as Ur, NodeExecutionError as Ut, NoRetryPolicy as V, CostTrackingPriceQuote as Va, NodeExecutor as Vi, EngineExecutionLimitsPolicy as Vn, WorkflowErrorHandler as Vr, EngineRunCounters as Vt, emitPorts as W, CostTrackingTelemetryFactory as Wa, PollingTriggerHandle as Wi, RunEventBus as Wn, WorkflowGraphFactory as Wr, NodeExecutionSnapshot as Wt, ConnectionInvocationKind as X, CredentialAdvancedSectionPresentation as Xa, TestableTriggerNode as Xi, TestTriggerSetupContext as Xn, WorkflowStoragePolicyResolver as Xr, PersistedMutableRunState as Xt, BatchId as Y, AnyCredentialType as Ya, SuspensionRequest as Yi, TestTriggerNodeConfig as Yn, WorkflowStoragePolicyMode as Yr, PersistedMutableNodeState as Yt, ExecutionInstanceDto as Z, CredentialAuthDefinition as Za, TriggerCleanupHandle as Zi, ActivationIdFactory as Zn, WorkflowStoragePolicySpec as Zr, PersistedRunControlState as Zt, BranchStepsArg as _, AllWorkflowsActiveWorkflowActivationPolicy as _a, EngineDeps as _i, RunTestContext as _n, CredentialTypeId as _o, NodeIdRef as _r, Param as _t, ConnectionNodeIdFactory as a, WorkflowRepository as aa, FixedRetryPolicySpec as ai, RunCompletionNotifier as an, CredentialInstanceRecord as ao, JsonArray as ar, PersistedRunWorkItemRecord as at, DefinedHumanApprovalNode as b, ExecutionTelemetryFactory as ba, ExecutionBinaryService as bi, WorkflowExecutionPruneRepository as bn, OAuth2ProviderFromPublicConfig as bo, NodeKind as br, ItemExprArgs as bt, WorkflowDefinitionError as c, WorkflowSnapshotFactory as ca, BINARY_DEFAULT_MAX_BYTES as ci, RunExecutionOptions as cn, CredentialOAuth2AuthDefinition as co, JsonPrimitive as cr, RunSlotProjectionState as ct, WhenBuilder as d, TriggerInstanceId as da, BinaryStorage as di, RunQueueEntry as dn, CredentialSessionFactory as do, NodeActivationId as dr, WorkItemStatus as dt, TriggerSetupContext as ea, runnableNodeInputType as ei, PersistedSuspensionEntry as en, CredentialFieldSchema as eo, Edge as er, PayloadStorageKind as et, AnyRunnableNodeConfig as f, WebhookControlSignal as fa, BinaryStorageReadResult as fi, RunResult as fn, CredentialSessionFactoryArgs as fo, NodeConfigBase as fr, WorkflowDetailSelectionState as ft, BranchOutputGuard as g, WebhookTriggerRoutingDiagnostics as ga, Duration as gi, RunSummary as gn, CredentialTypeDefinition as go, NodeErrorHandlerSpec as gr, Expr as gt, BranchMoreArgs as h, WebhookTriggerResolution as ha, BinaryStorageWriteResult as hi, RunStopCondition as hn, CredentialType as ho, NodeErrorHandlerArgs as hr, CostCatalogEntry as ht, NodeIterationIdFactory as i, WorkflowNodeInstanceFactory as ia, ExponentialRetryPolicySpec as ii, PinnedNodeOutputsByPort as in, CredentialInstanceId as io, Items as ir, PersistedRunWorkItemKind as it, DefinedNodeCredentialBinding as j, TelemetrySpanScope as ja, NodeActivationReceipt as ji, inject as jn, RunIdFactory as jr, deriveAssertionPassed as jt, DefinedNodeConfigInput as k, TelemetrySpanEnd as ka, MultiInputNode as ki, container$1 as kn, WorkflowId as ko, RunDataSnapshot as kr, AssertionResultProvenance as kt, WorkflowBuilder as l, WorkflowSnapshotResolver as la, BinaryAttachmentCreateRequest as li, RunHaltReason as ln, CredentialOAuth2ScopesFromPublicConfig as lo, JsonValue as lr, SlotExecutionStateDto as lt, BooleanWhenOverloads as m, WebhookTriggerMatcher as ma, BinaryStorageWriteRequest as mi, RunStatus as mn, CredentialSetupStatus as mo, NodeErrorHandler as mr, CostCatalog as mt, WorkflowExecutableNodeClassifierFactory as n, TriggerSetupStateRepository as na, triggerNodeOutputType as ni, PersistedWorkflowSnapshotNode as nn, CredentialHealthStatus as no, Item as nr, PersistedExecutionInstanceRecord as nt, ConnectionInvocationIdFactory as o, WorkflowRunnerResolver as oa, NoneRetryPolicySpec as oi, RunCurrentState as on, CredentialJsonRecord as oo, JsonNonArray as or, RunIterationDto as ot, AnyTriggerNodeConfig as p, WebhookInvocationMatch as pa, BinaryStorageStatResult as pi, RunStateResetRequest as pn, CredentialSessionService as po, NodeDefinition as pr, WorkflowRunDetailDto as pt, McpServerDeclaration as q, CollectionStore as qa, RunnableNode as qi, TestSuiteRunStatus as qn, WorkflowPrunePolicySpec as qr, PendingNodeExecution as qt, WorkflowExecutableNodeClassifier as r, TriggerTestItemsContext as ra, triggerNodeSetupStateType as ri, PersistedWorkflowTokenRegistryLike as rn, CredentialHealthTester as ro, ItemBinary as rr, PersistedRunSlotProjectionRecord as rt, NodeIdSlugifier as s, WorkflowRunnerService as sa, RetryPolicySpec as si, RunEventPublisherDeps as sn, CredentialMaterialSourceKind as so, JsonObject as sr, RunRevision as st, DefaultWorkflowGraphFactory as t, TriggerSetupStateFor as ta, runnableNodeOutputType as ti, PersistedWorkflowSnapshot as tn, CredentialHealth as to, ExecutionMode as tr, PersistedExecutionInstanceKind as tt, ChainCursor as u, HttpMethod as ua, BinaryBody as ui, RunPruneCandidate as un, CredentialRequirement as uo, MutableRunData as ur, WorkItemId as ut, StepSequenceOutput as v, WorkflowActivationPolicy as va, EngineHost as vi, WebhookRunResult as vn, CredentialTypeRegistry as vo, NodeInspectorSummaryRow as vr, ParamDeep as vt, isHumanApprovalNode as w, TelemetryAttributePrimitive as wa, HumanTaskHandle as wi, Disposable as wn, InputPortKey as wo, NodeSchedulerDecision as wr, isItemExpr as wt, HumanApprovalDecisionResult as x, NodeExecutionTelemetry as xa, ExecutionContext as xi, WorkflowExecutionRepository as xn, NoOpPollingTriggerLogger as xo, NodeOffloadPolicy as xr, ItemExprCallback as xt, ValidStepSequence as y, ExecutionTelemetry as ya, ExecutableTriggerNode as yi, WorkflowExecutionListingRepository as yn, CredentialUnboundError as yo, NodeIterationId as yr, ItemExpr as yt, ExpRetryPolicy as z, NoOpTelemetryArtifactReference as za, NodeExecutionScheduler as zi, CoreTokens as zn, WorkflowDefinition as zr, ConnectionInvocationRecord as zt };
|
|
3012
|
+
//# sourceMappingURL=index-rllWL4r-.d.ts.map
|