agentbox-sdk 0.1.312 → 0.1.313

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.
@@ -2,8 +2,8 @@ import {
2
2
  Agent,
3
3
  agentboxRoot,
4
4
  getAgentLayout
5
- } from "../chunk-3M5SPIRD.js";
6
- import "../chunk-A52XCBGW.js";
5
+ } from "../chunk-ZJKJ7XFX.js";
6
+ import "../chunk-2DH5OVG4.js";
7
7
  import {
8
8
  AGENT_RESERVED_PORTS,
9
9
  collectAllAgentReservedPorts
@@ -558,6 +558,13 @@ var ClaudeCodeLogAssembler = class {
558
558
  // tool_use blocks, and the UI's dedup-by-messageId would wipe the running
559
559
  // command from the trace.
560
560
  extraBlocksByMessageId = /* @__PURE__ */ new Map();
561
+ // Non-message events emitted by `process()` (e.g. `type: "user"` tool_result
562
+ // blocks, `type: "result"`, `type: "system"`). These carry data downstream
563
+ // consumers need to render the full trace — most importantly the Bash /
564
+ // tool_use output captured by `tool_result` user messages. Tracked in
565
+ // insertion order so `getSnapshots()` returns the full trace, not just the
566
+ // deduped assistant messages.
567
+ passThroughSnapshots = [];
561
568
  process(event) {
562
569
  if (!isRecord(event)) return [];
563
570
  const type = typeof event.type === "string" ? event.type : "";
@@ -599,7 +606,9 @@ var ClaudeCodeLogAssembler = class {
599
606
  const message = isRecord(event.message) ? event.message : null;
600
607
  const id = message && typeof message.id === "string" ? message.id : null;
601
608
  if (!id || !message) {
602
- return [clone(event)];
609
+ const passthrough2 = clone(event);
610
+ this.passThroughSnapshots.push(passthrough2);
611
+ return [clone(passthrough2)];
603
612
  }
604
613
  this.setParentToolUseId(id, event);
605
614
  const final = extractClaudeAssistantContent(message);
@@ -612,7 +621,9 @@ var ClaudeCodeLogAssembler = class {
612
621
  this.currentMessageId = null;
613
622
  return [snapshot];
614
623
  }
615
- return [clone(event)];
624
+ const passthrough = clone(event);
625
+ this.passThroughSnapshots.push(passthrough);
626
+ return [clone(passthrough)];
616
627
  }
617
628
  seed(snapshots) {
618
629
  this.currentMessageId = null;
@@ -621,9 +632,13 @@ var ClaudeCodeLogAssembler = class {
621
632
  this.parentToolUseIdByMessageId.clear();
622
633
  this.byMessageId.clear();
623
634
  this.extraBlocksByMessageId.clear();
635
+ this.passThroughSnapshots.length = 0;
624
636
  for (const snapshot of snapshots) {
625
637
  if (!isRecord(snapshot)) continue;
626
- if (snapshot.type !== "message.updated") continue;
638
+ if (snapshot.type !== "message.updated") {
639
+ this.passThroughSnapshots.push(clone(snapshot));
640
+ continue;
641
+ }
627
642
  const messageId = typeof snapshot.messageId === "string" ? snapshot.messageId : null;
628
643
  if (!messageId) continue;
629
644
  this.byMessageId.set(messageId, clone(snapshot));
@@ -696,7 +711,10 @@ var ClaudeCodeLogAssembler = class {
696
711
  return clone(next);
697
712
  }
698
713
  getSnapshots() {
699
- return Array.from(this.byMessageId.values()).map(clone);
714
+ const out = [];
715
+ for (const snapshot of this.byMessageId.values()) out.push(clone(snapshot));
716
+ for (const snapshot of this.passThroughSnapshots) out.push(clone(snapshot));
717
+ return out;
700
718
  }
701
719
  };
702
720
  function extractClaudeAssistantContent(message) {
@@ -2,7 +2,7 @@ import {
2
2
  createNormalizedEvent,
3
3
  normalizeRawAgentEvent,
4
4
  toAISDKStream
5
- } from "./chunk-A52XCBGW.js";
5
+ } from "./chunk-2DH5OVG4.js";
6
6
  import {
7
7
  AgentBoxError,
8
8
  AsyncQueue,
@@ -4,7 +4,7 @@ import {
4
4
  normalizeRawAgentEvent,
5
5
  toAISDKEvent,
6
6
  toAISDKStream
7
- } from "../chunk-A52XCBGW.js";
7
+ } from "../chunk-2DH5OVG4.js";
8
8
  import "../chunk-GOFJNFAD.js";
9
9
  export {
10
10
  ProviderLogAssembler,
package/dist/index.js CHANGED
@@ -2,14 +2,14 @@ import {
2
2
  Agent,
3
3
  agentboxRoot,
4
4
  getAgentLayout
5
- } from "./chunk-3M5SPIRD.js";
5
+ } from "./chunk-ZJKJ7XFX.js";
6
6
  import {
7
7
  ProviderLogAssembler,
8
8
  createNormalizedEvent,
9
9
  normalizeRawAgentEvent,
10
10
  toAISDKEvent,
11
11
  toAISDKStream
12
- } from "./chunk-A52XCBGW.js";
12
+ } from "./chunk-2DH5OVG4.js";
13
13
  import {
14
14
  Sandbox,
15
15
  SandboxAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentbox-sdk",
3
- "version": "0.1.312",
3
+ "version": "0.1.313",
4
4
  "description": "Swappable coding agents and sandbox providers for Bun and TypeScript.",
5
5
  "license": "MIT",
6
6
  "repository": {