@tangle-network/agent-app 0.63.16 → 0.63.17

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.
@@ -79,7 +79,7 @@ import {
79
79
  turnCarriesFiles,
80
80
  turnPromptText,
81
81
  withProducerStream
82
- } from "../chunk-PVEB4UJI.js";
82
+ } from "../chunk-6GX3UHQW.js";
83
83
  import "../chunk-KH4QSBNI.js";
84
84
  import {
85
85
  sniffMimeFromName
@@ -26,7 +26,7 @@ export type RouterTurnProducerOptions = Omit<RouterTurnOptions, 'onEvent' | 'sys
26
26
  systemPrompt: RouterTurnPrompt | Promise<RouterTurnPrompt>;
27
27
  /** Final admission: model text may start earlier, but every tool waits for this request's committed domain state. */
28
28
  admitted?: Promise<unknown>;
29
- /** Observe the finished turn or supply domain-authored final text/failure; projection and persistence stay shared. */
29
+ /** Observe the finished turn or supply domain-authored final text/failure. An unfinished checkpoint is a turn_deadline failure here; durable continuation belongs to runRouterTurn callers. */
30
30
  onOutcome?: (outcome: RouterTurnOutcome) => void | {
31
31
  trailingText?: string;
32
32
  failure?: RouterTurnFailure;
@@ -291,6 +291,9 @@ function createRouterTurnProducer(options) {
291
291
  }
292
292
  });
293
293
  }).then(async (result) => {
294
+ if (result.continuation && !result.failure) {
295
+ result.failure = { code: "turn_deadline", message: "The reply was stopped before it finished." };
296
+ }
294
297
  outcome = result;
295
298
  const final = await options.onOutcome?.(result);
296
299
  if (final && final.trailingText) {
@@ -3909,4 +3912,4 @@ export {
3909
3912
  createChatTurnRoutes,
3910
3913
  streamChatRouteAsSandboxEvents
3911
3914
  };
3912
- //# sourceMappingURL=chunk-PVEB4UJI.js.map
3915
+ //# sourceMappingURL=chunk-6GX3UHQW.js.map