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.
- 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 +2 -2
- package/dist/{chunk-NWAXQ7UD.js → chunk-EK6GC6YA.js} +3 -1
- package/dist/{chunk-DDGBIACF.js → chunk-QNNAAVJV.js} +9 -8
- package/dist/{chunk-YAMFJAU6.js → chunk-T7C77LCW.js} +440 -277
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/sandboxes/index.d.ts +4 -4
- package/dist/sandboxes/index.js +1 -1
- package/dist/{types-Dj_HCr6Q.d.ts → types-Ozo1rHKs.d.ts} +2 -11
- 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
|
@@ -426,7 +426,9 @@ var ClaudeCodeLogAssembler = class {
|
|
|
426
426
|
}
|
|
427
427
|
const final = extractClaudeAssistantContent(message);
|
|
428
428
|
this.textByMessageId.set(id, final.text);
|
|
429
|
-
|
|
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
|
-
|
|
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
|
|
172
|
-
return this.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
2106
|
-
return this.adapter.
|
|
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
|