@kortyx/agent 0.22.1 → 0.23.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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.23.0](https://github.com/kortyx-io/kortyx/compare/agent-v0.22.2...agent-v0.23.0) (2026-09-16)
4
+
5
+
6
+ ### Features
7
+
8
+ * **runtime:** support durable child calls in parallel DAGs ([#203](https://github.com/kortyx-io/kortyx/issues/203)) ([525e0e7](https://github.com/kortyx-io/kortyx/commit/525e0e7a73fa5f9d78232ca3155d86be7bc1022d))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @kortyx/runtime bumped to 0.18.0
16
+
17
+ ## [0.22.2](https://github.com/kortyx-io/kortyx/compare/agent-v0.22.1...agent-v0.22.2) (2026-09-15)
18
+
19
+
20
+ ### Dependencies
21
+
22
+ * The following workspace dependencies were updated
23
+ * dependencies
24
+ * @kortyx/runtime bumped to 0.17.2
25
+ * devDependencies
26
+ * @kortyx/hooks bumped to 0.25.2
27
+
3
28
  ## [0.22.1](https://github.com/kortyx-io/kortyx/compare/agent-v0.22.0...agent-v0.22.1) (2026-09-14)
4
29
 
5
30
 
package/dist/index.js CHANGED
@@ -3540,6 +3540,7 @@ async function* transformGraphStreamForUI(stream, options = {}) {
3540
3540
  let latestGraphState = null;
3541
3541
  for await (const event of stream) {
3542
3542
  const { event: type, name, data } = event ?? {};
3543
+ if (name?.startsWith("__kortyx_parallel_")) continue;
3543
3544
  if (debug) console.log(`[debug:event]`, JSON.stringify(event, null, 2));
3544
3545
  switch (type) {
3545
3546
  case "on_chain_start":
@@ -3897,6 +3898,10 @@ async function orchestrateGraphStream({
3897
3898
  }) {
3898
3899
  const out = new import_node_stream.PassThrough({ objectMode: true });
3899
3900
  const write = (chunk) => {
3901
+ if (isRecord3(chunk) && chunk.type === "done" && isGraphState(chunk.data)) {
3902
+ const { __kortyxParallelGraph: _journal, ...runtime } = chunk.data.runtime;
3903
+ chunk = { ...chunk, data: { ...chunk.data, runtime } };
3904
+ }
3900
3905
  if (emitOutput && !response.closed && !out.destroyed) out.write(chunk);
3901
3906
  };
3902
3907
  let outcomeState = state;
@@ -4226,6 +4231,8 @@ async function orchestrateGraphStream({
4226
4231
  return;
4227
4232
  }
4228
4233
  if (event === "status") {
4234
+ const statusNode = payload?.node;
4235
+ if (typeof statusNode === "string") touchedNodes.add(statusNode);
4229
4236
  if (!debugEnabled) return;
4230
4237
  const statusMessage = payload?.message;
4231
4238
  const msg = statusMessage === null || statusMessage === void 0 ? "" : String(statusMessage);
@@ -4821,6 +4828,12 @@ async function orchestrateGraphStream({
4821
4828
  out.end();
4822
4829
  };
4823
4830
  const completion = runPromise.catch(async (err) => {
4831
+ const runtimePatch = err?.__kortyxHookStatePatch;
4832
+ if (runtimePatch)
4833
+ outcomeState = {
4834
+ ...outcomeState,
4835
+ runtime: { ...outcomeState.runtime, ...runtimePatch }
4836
+ };
4824
4837
  if (abortSignal?.aborted || (0, import_core2.isExecutionCancelled)(err)) {
4825
4838
  await finishCancelled();
4826
4839
  return;