@tangle-network/agent-app 0.56.1 → 0.56.2

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.
@@ -64,7 +64,7 @@ import {
64
64
  rowIdOf,
65
65
  storeSupportsDraftPersistence,
66
66
  streamChatRouteAsSandboxEvents
67
- } from "../chunk-3LOTQCW7.js";
67
+ } from "../chunk-RNHXRPHO.js";
68
68
  import "../chunk-6VRVRWYN.js";
69
69
  import "../chunk-YNSPVKMS.js";
70
70
  import "../chunk-3NCPXNBZ.js";
@@ -131,7 +131,7 @@ import {
131
131
  import {
132
132
  coalesceDeltas,
133
133
  createBufferedTurnTap
134
- } from "../chunk-GBOHTAQH.js";
134
+ } from "../chunk-OEHEHPPA.js";
135
135
 
136
136
  // src/chat-routes/model-failover-stream.ts
137
137
  var TERMINAL_FAILURE_TYPES = /* @__PURE__ */ new Set(["error", "session.run.failed"]);
@@ -1886,8 +1886,14 @@ function resolvePlanFollowUpRequest(input) {
1886
1886
  }
1887
1887
  function unwrapSessionEventPayload(event) {
1888
1888
  const data = event.data && typeof event.data === "object" && !Array.isArray(event.data) ? event.data : void 0;
1889
- const properties = data?.properties && typeof data.properties === "object" && !Array.isArray(data.properties) ? data.properties : void 0;
1890
- return properties ? { ...event, data: properties } : event;
1889
+ if (!data) return event;
1890
+ const properties = data.properties && typeof data.properties === "object" && !Array.isArray(data.properties) ? data.properties : void 0;
1891
+ if (properties) return { ...event, data: properties };
1892
+ if (typeof data.type === "string") {
1893
+ const { type: _type, ...rest } = data;
1894
+ return { ...event, data: rest };
1895
+ }
1896
+ return event;
1891
1897
  }
1892
1898
  async function* streamPlanFollowUpEvents(box, sessionId, executionId, options = {}) {
1893
1899
  const timeoutMs = options.timeoutMs ?? PLAN_FOLLOW_UP_ATTACH_TIMEOUT_MS;