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.
- package/dist/{Sandbox-CByFJI8X.d.ts → Sandbox-K6VNqKeo.d.ts} +1 -1
- package/dist/agents/index.d.ts +5 -5
- package/dist/agents/index.js +3 -3
- package/dist/{chunk-INMA52FV.js → chunk-AVXJMCBC.js} +17 -0
- package/dist/{chunk-4MBB6QHD.js → chunk-GBM7LKZF.js} +539 -161
- package/dist/{chunk-ZOWBRUQR.js → chunk-NWAXQ7UD.js} +136 -2
- package/dist/{chunk-LPKKT6YT.js → chunk-QNNAAVJV.js} +80 -9
- package/dist/events/index.d.ts +4 -4
- package/dist/events/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/sandboxes/index.d.ts +4 -4
- package/dist/sandboxes/index.js +2 -2
- package/dist/{types-B3N-Qo2q.d.ts → types-Ozo1rHKs.d.ts} +34 -13
- package/package.json +2 -2
|
@@ -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
|
|
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`,
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as AgentProviderName, h as AgentOptions,
|
|
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,
|
|
3
|
-
import { S as Sandbox } from '../Sandbox-
|
|
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(
|
|
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,
|
|
88
|
+
export { AGENT_RESERVED_PORTS, Agent, AgentAttachRequest, AgentOptions, AgentProviderName, AgentResult, AgentRun, AgentRunConfig, AttachedRun, collectAllAgentReservedPorts };
|
package/dist/agents/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Agent
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GBM7LKZF.js";
|
|
4
|
+
import "../chunk-NWAXQ7UD.js";
|
|
5
5
|
import {
|
|
6
6
|
AGENT_RESERVED_PORTS,
|
|
7
7
|
collectAllAgentReservedPorts
|
|
8
|
-
} from "../chunk-
|
|
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,
|