agentbox-sdk 0.1.302 → 0.1.304

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.
@@ -250,7 +250,7 @@ declare class Sandbox<P extends SandboxProviderName = SandboxProviderName> {
250
250
  * idempotent setup that the previous run already performed (e.g.
251
251
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
252
252
  */
253
- get wasFound(): boolean;
253
+ get isWarm(): boolean;
254
254
  /**
255
255
  * Attach to an existing tagged sandbox or create a new one. Must be
256
256
  * called before `run`, `runAsync`, `gitClone`, `uploadAndRun`,
@@ -1,6 +1,6 @@
1
- import { o as AgentProviderName, h as AgentOptions, v as AgentSetupConfig, t as AgentRunConfig, s as AgentRun, r as AgentResult, a3 as RawAgentEvent, b as AgentAttachRequest, z as AttachedRun } from '../types-Dj_HCr6Q.js';
2
- export { a as AgentApprovalMode, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, u as AgentRunSink, w as AgentSetupRequest, x as AgentSkillConfig, y as AgentSubAgentConfig, C as ClaudeCodeAgentOptions, B as ClaudeCodeHookConfig, D as ClaudeCodeHookEvent, E as ClaudeCodeHookHandler, F as ClaudeCodeHookMatcherGroup, G as ClaudeCodeHooksConfig, H as ClaudeCodeProviderOptions, I as CodexAgentOptions, J as CodexCommandHook, K as CodexHookEvent, L as CodexHookMatcherGroup, M as CodexHooksConfig, N as CodexProviderOptions, O as DataContent, P as EmbeddedSkillConfig, Q as FilePart, R as ImagePart, Y as OpenCodeAgentOptions, Z as OpenCodePluginConfig, _ as OpenCodePluginEvent, $ as OpenCodePluginHookConfig, a0 as OpenCodeProviderOptions, a5 as RepoSkillConfig, ab as TextPart, af as UserContent, ag as UserContentPart } from '../types-Dj_HCr6Q.js';
3
- import { S as Sandbox } from '../Sandbox-CByFJI8X.js';
1
+ import { o as AgentProviderName, h as AgentOptions, t as AgentRunConfig, s as AgentRun, r as AgentResult, a2 as RawAgentEvent, b as AgentAttachRequest, y as AttachedRun } from '../types-Ozo1rHKs.js';
2
+ export { a as AgentApprovalMode, c as AgentCommandConfig, d as AgentCostData, e as AgentExecutionRequest, f as AgentLocalMcpConfig, g as AgentMcpConfig, i as AgentOptionsBase, j as AgentOptionsMap, k as AgentPermissionDecision, l as AgentPermissionKind, m as AgentPermissionResponse, n as AgentProviderAdapter, p as AgentReasoningEffort, q as AgentRemoteMcpConfig, u as AgentRunSink, v as AgentSetupRequest, w as AgentSkillConfig, x as AgentSubAgentConfig, C as ClaudeCodeAgentOptions, z as ClaudeCodeHookConfig, B as ClaudeCodeHookEvent, D as ClaudeCodeHookHandler, E as ClaudeCodeHookMatcherGroup, F as ClaudeCodeHooksConfig, G as ClaudeCodeProviderOptions, H as CodexAgentOptions, I as CodexCommandHook, J as CodexHookEvent, K as CodexHookMatcherGroup, L as CodexHooksConfig, M as CodexProviderOptions, N as DataContent, O as EmbeddedSkillConfig, P as FilePart, Q as ImagePart, X as OpenCodeAgentOptions, Y as OpenCodePluginConfig, Z as OpenCodePluginEvent, _ as OpenCodePluginHookConfig, $ as OpenCodeProviderOptions, a4 as RepoSkillConfig, aa as TextPart, ae as UserContent, af as UserContentPart } from '../types-Ozo1rHKs.js';
3
+ import { S as Sandbox } from '../Sandbox-K6VNqKeo.js';
4
4
  export { AgentProvider } from '../enums.js';
5
5
  import 'e2b';
6
6
  import '@vercel/sandbox';
@@ -41,7 +41,7 @@ declare class Agent<P extends AgentProviderName = AgentProviderName> {
41
41
  * second `setup()` against the same sandbox does ~one round-trip of
42
42
  * work.
43
43
  */
44
- setup(config?: AgentSetupConfig): Promise<void>;
44
+ setup(): Promise<void>;
45
45
  stream(runConfig: AgentRunConfig): AgentRun;
46
46
  run(runConfig: AgentRunConfig): Promise<AgentResult>;
47
47
  rawEvents(runConfig: AgentRunConfig): AsyncIterable<RawAgentEvent>;
@@ -85,4 +85,4 @@ declare class Agent<P extends AgentProviderName = AgentProviderName> {
85
85
  declare const AGENT_RESERVED_PORTS: Record<AgentProviderName, readonly number[]>;
86
86
  declare function collectAllAgentReservedPorts(): number[];
87
87
 
88
- export { AGENT_RESERVED_PORTS, Agent, AgentAttachRequest, AgentOptions, AgentProviderName, AgentResult, AgentRun, AgentRunConfig, AgentSetupConfig, AttachedRun, collectAllAgentReservedPorts };
88
+ export { AGENT_RESERVED_PORTS, Agent, AgentAttachRequest, AgentOptions, AgentProviderName, AgentResult, AgentRun, AgentRunConfig, AttachedRun, collectAllAgentReservedPorts };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Agent
3
- } from "../chunk-YAMFJAU6.js";
4
- import "../chunk-NWAXQ7UD.js";
3
+ } from "../chunk-T7C77LCW.js";
4
+ import "../chunk-EK6GC6YA.js";
5
5
  import {
6
6
  AGENT_RESERVED_PORTS,
7
7
  collectAllAgentReservedPorts
@@ -426,7 +426,9 @@ var ClaudeCodeLogAssembler = class {
426
426
  }
427
427
  const final = extractClaudeAssistantContent(message);
428
428
  this.textByMessageId.set(id, final.text);
429
- this.thinkingByMessageId.set(id, final.thinking);
429
+ if (final.thinking) {
430
+ this.thinkingByMessageId.set(id, final.thinking);
431
+ }
430
432
  const snapshot = this.upsertMessage(id, final.extraBlocks);
431
433
  this.currentMessageId = null;
432
434
  return [snapshot];
@@ -69,7 +69,7 @@ var SandboxAdapter = class {
69
69
  * `provision()` implementations. Stays `false` until `findOrProvision()`
70
70
  * has resolved.
71
71
  */
72
- wasFoundFlag = false;
72
+ isWarmFlag = false;
73
73
  constructor(options) {
74
74
  this.options = options;
75
75
  this.baseEnv = { ...options.env ?? {} };
@@ -168,8 +168,8 @@ var SandboxAdapter = class {
168
168
  * idempotent setup that the previous run already performed (e.g.
169
169
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
170
170
  */
171
- get wasFound() {
172
- return this.wasFoundFlag;
171
+ get isWarm() {
172
+ return this.isWarmFlag;
173
173
  }
174
174
  /**
175
175
  * Headers that callers should attach to HTTP / WebSocket requests they make
@@ -242,8 +242,9 @@ var DaytonaSandboxAdapter = class extends SandboxAdapter {
242
242
  const existing = await this.findMatchingSandbox();
243
243
  if (existing) {
244
244
  this.sandbox = existing;
245
+ const isWarm = existing.state === "started";
245
246
  await existing.start();
246
- this.wasFoundFlag = true;
247
+ this.isWarmFlag = isWarm;
247
248
  return;
248
249
  }
249
250
  const labels = this.getLabels();
@@ -518,7 +519,7 @@ var E2bSandboxAdapter = class extends SandboxAdapter {
518
519
  const existing = await this.findMatchingSandbox();
519
520
  if (existing) {
520
521
  this.sandbox = existing;
521
- this.wasFoundFlag = true;
522
+ this.isWarmFlag = true;
522
523
  return;
523
524
  }
524
525
  const template = resolveSandboxImage(this.options.image);
@@ -1352,7 +1353,7 @@ var ModalSandboxAdapter = class extends SandboxAdapter {
1352
1353
  const existing = await this.findMatchingSandbox();
1353
1354
  if (existing) {
1354
1355
  this.sandbox = existing;
1355
- this.wasFoundFlag = true;
1356
+ this.isWarmFlag = true;
1356
1357
  return;
1357
1358
  }
1358
1359
  const appName = this.options.provider?.appName ?? "agentbox";
@@ -2102,8 +2103,8 @@ var Sandbox = class {
2102
2103
  * idempotent setup that the previous run already performed (e.g.
2103
2104
  * `agent.setup()`). Always `false` before `findOrProvision()` resolves.
2104
2105
  */
2105
- get wasFound() {
2106
- return this.adapter.wasFound;
2106
+ get isWarm() {
2107
+ return this.adapter.isWarm;
2107
2108
  }
2108
2109
  /**
2109
2110
  * Attach to an existing tagged sandbox or create a new one. Must be