@kortyx/runtime 0.11.1 → 0.14.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 CHANGED
@@ -1,5 +1,53 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.14.0](https://github.com/kortyx-io/kortyx/compare/runtime-v0.13.0...runtime-v0.14.0) (2026-09-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * **runtime:** add shared execution limits and checkpoint continuation ([#163](https://github.com/kortyx-io/kortyx/issues/163)) ([e22232c](https://github.com/kortyx-io/kortyx/commit/e22232c059fae4f7df1bd36423902bd365887942))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @kortyx/stream bumped to 0.11.0
16
+ * @kortyx/core bumped to 0.8.0
17
+ * @kortyx/hooks bumped to 0.21.0
18
+
19
+ ## [0.13.0](https://github.com/kortyx-io/kortyx/compare/runtime-v0.12.0...runtime-v0.13.0) (2026-09-10)
20
+
21
+
22
+ ### Features
23
+
24
+ * cancel workflow trees and reflect cancellation in Studio ([#161](https://github.com/kortyx-io/kortyx/issues/161)) ([699ad18](https://github.com/kortyx-io/kortyx/commit/699ad18905955c6340c3d85b9fae7f0bffd00a0d))
25
+ * execute and resume workflows without chat transport ([#159](https://github.com/kortyx-io/kortyx/issues/159)) ([6decb17](https://github.com/kortyx-io/kortyx/commit/6decb1714fedc021ac9e125b6ed9f75475ed928a))
26
+
27
+
28
+ ### Dependencies
29
+
30
+ * The following workspace dependencies were updated
31
+ * dependencies
32
+ * @kortyx/stream bumped to 0.10.0
33
+ * @kortyx/core bumped to 0.7.0
34
+ * @kortyx/hooks bumped to 0.20.0
35
+
36
+ ## [0.12.0](https://github.com/kortyx-io/kortyx/compare/runtime-v0.11.1...runtime-v0.12.0) (2026-09-09)
37
+
38
+
39
+ ### Features
40
+
41
+ * add resumable child workflows and Studio inspection ([#157](https://github.com/kortyx-io/kortyx/issues/157)) ([542ba29](https://github.com/kortyx-io/kortyx/commit/542ba29b3b57217e6e5d98c1b409bbec5ce3261f))
42
+
43
+
44
+ ### Dependencies
45
+
46
+ * The following workspace dependencies were updated
47
+ * dependencies
48
+ * @kortyx/core bumped to 0.6.0
49
+ * @kortyx/hooks bumped to 0.19.0
50
+
3
51
  ## [0.11.1](https://github.com/kortyx-io/kortyx/compare/runtime-v0.11.0...runtime-v0.11.1) (2026-08-02)
4
52
 
5
53
 
package/dist/index.d.ts CHANGED
@@ -1,10 +1,16 @@
1
- import { BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
1
+ import { BaseCheckpointSaver, CheckpointTuple } from '@langchain/langgraph-checkpoint';
2
+ import * as _kortyx_core from '@kortyx/core';
2
3
  import { GraphState, WorkflowDefinition, NodeFn, RuntimeEnvelope } from '@kortyx/core';
3
4
  import { ReasonTraceAdapter, KortyxTelemetryConfig } from '@kortyx/hooks';
4
5
  import { GetProviderFn } from '@kortyx/providers';
5
6
 
6
7
  declare function getCheckpointer(key: string): BaseCheckpointSaver;
7
8
 
9
+ /** A self-contained, JSON snapshot, including pending writes needed for replay. */
10
+ type GraphSnapshotBundle = CheckpointTuple;
11
+ declare function captureGraphSnapshot(saver: BaseCheckpointSaver, threadId: string, checkpointId?: string): Promise<GraphSnapshotBundle | undefined>;
12
+ declare function restoreGraphSnapshot(saver: BaseCheckpointSaver, snapshot: GraphSnapshotBundle, threadId: string): Promise<void>;
13
+
8
14
  type HumanInputKind = "choice" | "multi-choice" | "text";
9
15
  interface HumanInputOption {
10
16
  id: string;
@@ -26,6 +32,7 @@ interface PendingRequestRecord {
26
32
  * Used to resume from the correct interrupt after session rollback.
27
33
  */
28
34
  graphCheckpointId?: string | undefined;
35
+ graphSnapshot?: GraphSnapshotBundle;
29
36
  workflow: string;
30
37
  node: string;
31
38
  state?: GraphState;
@@ -43,6 +50,7 @@ interface PendingRequestRecord {
43
50
  ttlMs: number;
44
51
  }
45
52
  interface PendingRequestStore {
53
+ take?: (token: string) => Promise<PendingRequestRecord | null>;
46
54
  save: (rec: PendingRequestRecord) => Promise<void>;
47
55
  get: (token: string) => Promise<PendingRequestRecord | null>;
48
56
  delete: (token: string) => Promise<void>;
@@ -143,31 +151,42 @@ declare function createRedisFrameworkAdapter(options: CreateRedisFrameworkAdapte
143
151
  declare function createFrameworkAdapterFromEnv(env?: Record<string, string | undefined>): FrameworkAdapter;
144
152
 
145
153
  interface CompiledGraphBase {
146
- invoke(state: unknown): Promise<unknown>;
154
+ invoke(state: unknown, options?: Record<string, unknown>): Promise<unknown>;
147
155
  streamEvents(state: GraphState, options?: {
148
156
  version?: string;
149
157
  configurable?: Record<string, unknown>;
150
158
  }): AsyncIterable<unknown> | AsyncGenerator<unknown>;
151
159
  }
160
+ type ExecutionControl = {
161
+ abortSignal?: AbortSignal | undefined;
162
+ budget?: _kortyx_core.ExecutionBudget | undefined;
163
+ };
152
164
  interface GraphExtensions {
165
+ execution: ExecutionControl;
153
166
  name: string;
154
167
  config: ExecutionRuntimeConfig;
155
168
  resume(state: GraphState, input: unknown): Promise<GraphState>;
156
169
  timeTravelTo(state: GraphState, checkpointId: string): Promise<GraphState>;
157
170
  }
158
171
  interface ExecutionRuntimeConfig {
172
+ executionRunId?: string | undefined;
173
+ executionBranchId?: string | undefined;
174
+ prepareChildTelemetry?: ((workflow: WorkflowDefinition, config: ExecutionRuntimeConfig) => ExecutionRuntimeConfig) | undefined;
175
+ selectWorkflow?: ((id: string) => Promise<WorkflowDefinition>) | undefined;
176
+ workflowCallDepth?: number;
177
+ invocationPath?: string;
159
178
  emit?: (event: string, payload: unknown) => void;
160
179
  onCheckpoint?: (args: {
161
180
  nodeId: string;
162
181
  state: GraphState;
163
182
  }) => void;
164
183
  checkpointer?: BaseCheckpointSaver;
165
- reasonTrace?: ReasonTraceAdapter;
166
- telemetry?: KortyxTelemetryConfig;
167
- getProvider?: GetProviderFn;
184
+ reasonTrace?: ReasonTraceAdapter | undefined;
185
+ telemetry?: KortyxTelemetryConfig | undefined;
186
+ getProvider?: GetProviderFn | undefined;
168
187
  [key: string]: unknown;
169
188
  }
170
- declare function createExecutionGraph(workflow: WorkflowDefinition, config: ExecutionRuntimeConfig): Promise<CompiledGraphBase & GraphExtensions>;
189
+ declare function createExecutionGraph(workflow: WorkflowDefinition, config: ExecutionRuntimeConfig, execution?: ExecutionControl): Promise<CompiledGraphBase & GraphExtensions>;
171
190
 
172
191
  declare function makeResumeToken(): string;
173
192
  declare function makeRequestId(prefix?: string): string;
@@ -212,4 +231,4 @@ interface InitialStateArgs<Config = unknown> {
212
231
  }
213
232
  declare function buildInitialGraphState<Config>({ input, runtime, config, defaultWorkflowId, }: InitialStateArgs<Config>): Promise<GraphState>;
214
233
 
215
- export { type AppendSessionCheckpointArgs, type CheckpointId, type CheckpointSummary, type CreateInMemoryFrameworkAdapterOptions, type CreateRedisFrameworkAdapterOptions, type ExecutionRuntimeConfig, type FileWorkflowRegistryOptions, type ForkSessionCheckpointResult, type FrameworkAdapter, type HumanInputKind, type HumanInputOption, type InitialStateArgs, type PendingRequestRecord, type PendingRequestStore, type RollbackSessionCheckpointResult, type SessionCheckpointRecord, type SessionCheckpointStore, type SessionCheckpointStoreOptions, type WorkflowRegistry, buildInitialGraphState, clearRegisteredNodes, createExecutionGraph, createFileWorkflowRegistry, createFrameworkAdapterFromEnv, createInMemoryFrameworkAdapter, createInMemoryPendingRequestStore, createInMemorySessionCheckpointStore, createInMemoryWorkflowRegistry, createRedisFrameworkAdapter, getCheckpointer, getRegisteredNode, listRegisteredNodes, makeRequestId, makeResumeToken, registerNode, resolveNode };
234
+ export { type AppendSessionCheckpointArgs, type CheckpointId, type CheckpointSummary, type CreateInMemoryFrameworkAdapterOptions, type CreateRedisFrameworkAdapterOptions, type ExecutionControl, type ExecutionRuntimeConfig, type FileWorkflowRegistryOptions, type ForkSessionCheckpointResult, type FrameworkAdapter, type GraphSnapshotBundle, type HumanInputKind, type HumanInputOption, type InitialStateArgs, type PendingRequestRecord, type PendingRequestStore, type RollbackSessionCheckpointResult, type SessionCheckpointRecord, type SessionCheckpointStore, type SessionCheckpointStoreOptions, type WorkflowRegistry, buildInitialGraphState, captureGraphSnapshot, clearRegisteredNodes, createExecutionGraph, createFileWorkflowRegistry, createFrameworkAdapterFromEnv, createInMemoryFrameworkAdapter, createInMemoryPendingRequestStore, createInMemorySessionCheckpointStore, createInMemoryWorkflowRegistry, createRedisFrameworkAdapter, getCheckpointer, getRegisteredNode, listRegisteredNodes, makeRequestId, makeResumeToken, registerNode, resolveNode, restoreGraphSnapshot };