agentbox-sdk 0.1.515 → 0.1.516

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.
@@ -4,8 +4,8 @@ import {
4
4
  getAgentLayout,
5
5
  harnessCapabilities,
6
6
  resolveHarnessCommand
7
- } from "../chunk-HVXPNGSC.js";
8
- import "../chunk-775FIGGL.js";
7
+ } from "../chunk-SERVEWIE.js";
8
+ import "../chunk-V4M4LPPT.js";
9
9
  import {
10
10
  AGENT_RESERVED_PORTS,
11
11
  collectAllAgentReservedPorts
@@ -2,7 +2,7 @@ import {
2
2
  createNormalizedEvent,
3
3
  normalizeRawAgentEvent,
4
4
  toAISDKStream
5
- } from "./chunk-775FIGGL.js";
5
+ } from "./chunk-V4M4LPPT.js";
6
6
  import {
7
7
  AgentBoxError,
8
8
  AsyncQueue,
@@ -646,6 +646,7 @@ function isClaudeNoiseEvent(event) {
646
646
  }
647
647
  var ClaudeCodeLogAssembler = class {
648
648
  currentMessageId = null;
649
+ modelByMessageId = /* @__PURE__ */ new Map();
649
650
  textByMessageId = /* @__PURE__ */ new Map();
650
651
  thinkingByMessageId = /* @__PURE__ */ new Map();
651
652
  parentToolUseIdByMessageId = /* @__PURE__ */ new Map();
@@ -682,6 +683,9 @@ var ClaudeCodeLogAssembler = class {
682
683
  const id = message && typeof message.id === "string" ? message.id : null;
683
684
  if (!id) return [];
684
685
  this.currentMessageId = id;
686
+ if (typeof message?.model === "string") {
687
+ this.modelByMessageId.set(id, message.model);
688
+ }
685
689
  this.setParentToolUseId(id, event);
686
690
  if (!this.textByMessageId.has(id)) this.textByMessageId.set(id, "");
687
691
  if (!this.thinkingByMessageId.has(id))
@@ -713,6 +717,9 @@ var ClaudeCodeLogAssembler = class {
713
717
  if (!id || !message) {
714
718
  return [this.pushPassThrough(event)];
715
719
  }
720
+ if (typeof message.model === "string") {
721
+ this.modelByMessageId.set(id, message.model);
722
+ }
716
723
  this.setParentToolUseId(id, event);
717
724
  const final = extractClaudeAssistantContent(message);
718
725
  const streamedText = this.textByMessageId.get(id) ?? "";
@@ -740,6 +747,7 @@ var ClaudeCodeLogAssembler = class {
740
747
  }
741
748
  seed(snapshots) {
742
749
  this.currentMessageId = null;
750
+ this.modelByMessageId.clear();
743
751
  this.textByMessageId.clear();
744
752
  this.thinkingByMessageId.clear();
745
753
  this.parentToolUseIdByMessageId.clear();
@@ -769,6 +777,9 @@ var ClaudeCodeLogAssembler = class {
769
777
  const parentToolUseId = typeof snapshot.parent_tool_use_id === "string" ? snapshot.parent_tool_use_id : null;
770
778
  this.parentToolUseIdByMessageId.set(messageId, parentToolUseId);
771
779
  const message = isRecord(snapshot.message) ? snapshot.message : null;
780
+ if (typeof message?.model === "string") {
781
+ this.modelByMessageId.set(messageId, message.model);
782
+ }
772
783
  const content = message && Array.isArray(message.content) ? message.content : [];
773
784
  let text = "";
774
785
  let thinking = "";
@@ -828,6 +839,7 @@ var ClaudeCodeLogAssembler = class {
828
839
  message: {
829
840
  id: messageId,
830
841
  role: "assistant",
842
+ ...this.modelByMessageId.has(messageId) ? { model: this.modelByMessageId.get(messageId) } : {},
831
843
  content
832
844
  }
833
845
  };
@@ -4,7 +4,7 @@ import {
4
4
  normalizeRawAgentEvent,
5
5
  toAISDKEvent,
6
6
  toAISDKStream
7
- } from "../chunk-775FIGGL.js";
7
+ } from "../chunk-V4M4LPPT.js";
8
8
  import "../chunk-GOFJNFAD.js";
9
9
  export {
10
10
  ProviderLogAssembler,
package/dist/index.js CHANGED
@@ -4,14 +4,14 @@ import {
4
4
  getAgentLayout,
5
5
  harnessCapabilities,
6
6
  resolveHarnessCommand
7
- } from "./chunk-HVXPNGSC.js";
7
+ } from "./chunk-SERVEWIE.js";
8
8
  import {
9
9
  ProviderLogAssembler,
10
10
  createNormalizedEvent,
11
11
  normalizeRawAgentEvent,
12
12
  toAISDKEvent,
13
13
  toAISDKStream
14
- } from "./chunk-775FIGGL.js";
14
+ } from "./chunk-V4M4LPPT.js";
15
15
  import {
16
16
  Sandbox,
17
17
  SandboxAdapter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentbox-sdk",
3
- "version": "0.1.515",
3
+ "version": "0.1.516",
4
4
  "description": "Swappable coding agents and sandbox providers for Bun and TypeScript.",
5
5
  "license": "MIT",
6
6
  "repository": {