@tangle-network/agent-app 0.46.49 → 0.46.51

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChatEmptyState,
3
3
  ChatMessages
4
- } from "../chunk-NGYEVU6R.js";
4
+ } from "../chunk-NOME5ZPG.js";
5
5
  import "../chunk-J35PLM4G.js";
6
6
  import "../chunk-3HUFJ5LO.js";
7
7
  import "../chunk-FBVLEGEG.js";
@@ -100,7 +100,7 @@ import {
100
100
  createBufferedTurnTap,
101
101
  replayTurnEvents,
102
102
  stampReplaySeq
103
- } from "../chunk-SDEADFHZ.js";
103
+ } from "../chunk-B5KMUXRM.js";
104
104
  import {
105
105
  ModelFailoverExhaustedError,
106
106
  buildModelChain,
@@ -112,7 +112,7 @@ import {
112
112
  flattenHistory,
113
113
  readSandboxBinaryBytes,
114
114
  statSandboxFileSize
115
- } from "../chunk-FS6YF4ZV.js";
115
+ } from "../chunk-TCNH6XDK.js";
116
116
  import "../chunk-MCYJON3F.js";
117
117
  import "../chunk-LWSJK546.js";
118
118
  import "../chunk-P5PIAQVS.js";
@@ -561,6 +561,10 @@ function createChatTurnRoutes(options) {
561
561
  produceArgs = { ...produceArgs, userMessageId };
562
562
  if (options.contextGate) {
563
563
  const gate = await options.contextGate(produceArgs);
564
+ if (gate.proceed === "handoff") {
565
+ await releaseLock();
566
+ return gate.response;
567
+ }
564
568
  if (!gate.proceed) {
565
569
  await releaseLock();
566
570
  gatedTurn = true;
@@ -792,7 +796,8 @@ function createChatTurnRoutes(options) {
792
796
  return new Response(body, {
793
797
  headers: {
794
798
  "Content-Type": result.contentType,
795
- "Cache-Control": "no-cache"
799
+ "Cache-Control": "no-cache",
800
+ "X-Turn-Id": turnStreamId
796
801
  }
797
802
  });
798
803
  } catch (err) {