agentbox-sdk 0.1.301 → 0.1.303

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-B3N-Qo2q.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, aa as TextPart, ae as UserContent, af as UserContentPart } from '../types-B3N-Qo2q.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,11 +1,11 @@
1
1
  import {
2
2
  Agent
3
- } from "../chunk-4MBB6QHD.js";
4
- import "../chunk-ZOWBRUQR.js";
3
+ } from "../chunk-GBM7LKZF.js";
4
+ import "../chunk-NWAXQ7UD.js";
5
5
  import {
6
6
  AGENT_RESERVED_PORTS,
7
7
  collectAllAgentReservedPorts
8
- } from "../chunk-INMA52FV.js";
8
+ } from "../chunk-AVXJMCBC.js";
9
9
  import "../chunk-NSJM57Z4.js";
10
10
  import {
11
11
  AgentProvider
@@ -188,6 +188,22 @@ async function readStreamAsText(stream) {
188
188
  result += decoder.decode();
189
189
  return result;
190
190
  }
191
+ async function readStreamAsBytes(stream) {
192
+ const reader = stream.getReader();
193
+ const chunks = [];
194
+ try {
195
+ while (true) {
196
+ const { done, value } = await reader.read();
197
+ if (done) {
198
+ break;
199
+ }
200
+ chunks.push(Buffer.isBuffer(value) ? value : Buffer.from(value));
201
+ }
202
+ } finally {
203
+ reader.releaseLock();
204
+ }
205
+ return Buffer.concat(chunks);
206
+ }
191
207
  async function pipeReadableStream(stream, onChunk) {
192
208
  const reader = stream.getReader();
193
209
  const decoder = new TextDecoder();
@@ -256,6 +272,7 @@ export {
256
272
  sleep,
257
273
  waitFor,
258
274
  readStreamAsText,
275
+ readStreamAsBytes,
259
276
  pipeReadableStream,
260
277
  readNodeStream,
261
278
  linesFromTextChunks,