@blade-hq/agent-client 2612.0.0-beta.63 → 2612.0.0-beta.65

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.
@@ -224,7 +224,7 @@ var ToolProvider = class {
224
224
 
225
225
  // src/version.ts
226
226
  var SDK_NAME = "agent-client";
227
- var SDK_VERSION = true ? "2612.0.0-beta.63" : "1.1.1";
227
+ var SDK_VERSION = true ? "2612.0.0-beta.65" : "1.1.1";
228
228
 
229
229
  // src/auth-login.ts
230
230
  function isAuthCallbackMessage(value) {
@@ -1502,6 +1502,11 @@ var ClientProjectionBuilder = class {
1502
1502
  /** A durable snapshot supersedes only this turn's temporary overlay. */
1503
1503
  acceptDurableTurn(turn) {
1504
1504
  this.seedSequence(turn.sequence);
1505
+ if (turn.kind === "compaction") {
1506
+ this.turnsById.set(turn.turn_id, turn);
1507
+ if (turn.status !== "streaming") this.activeCompactions.delete(turn.compaction_id ?? "");
1508
+ return;
1509
+ }
1505
1510
  if (!isConversationTurn(turn)) return;
1506
1511
  const active = this.activeTurns.get(turn.loop_id);
1507
1512
  if (active?.turnId === turn.turn_id) this.activeTurns.delete(turn.loop_id);
@@ -1522,6 +1527,7 @@ var ClientProjectionBuilder = class {
1522
1527
  const turnsById = /* @__PURE__ */ new Map();
1523
1528
  for (const turn of turns) {
1524
1529
  this.seedSequence(turn.sequence);
1530
+ if (turn.kind === "compaction") turnsById.set(turn.turn_id, turn);
1525
1531
  if (!isConversationTurn(turn)) continue;
1526
1532
  turnsById.set(turn.turn_id, turn);
1527
1533
  const current = latestTurns.get(turn.loop_id);
@@ -2137,6 +2143,8 @@ var ClientProjectionBuilder = class {
2137
2143
  onCompaction(eventType, loopId, payload) {
2138
2144
  const compactionId = String(payload.compaction_id ?? "");
2139
2145
  if (!compactionId) return null;
2146
+ const previous = this.turnsById.get(`compaction:${compactionId}`);
2147
+ if (eventType === "compaction:start" && previous && previous.status !== "streaming") return null;
2140
2148
  let current = {
2141
2149
  ...this.activeCompactions.get(compactionId) ?? {},
2142
2150
  ...payload,
@@ -9348,4 +9356,4 @@ export {
9348
9356
  parseAskUserQuestion,
9349
9357
  formatAskUserAnswer
9350
9358
  };
9351
- //# sourceMappingURL=chunk-VRAKDCAT.js.map
9359
+ //# sourceMappingURL=chunk-GW5JCLPW.js.map