agent-neckbeard 1.1.28 → 1.1.30
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/CHANGELOG.md +12 -0
- package/README.md +28 -30
- package/dist/archil.d.ts +73 -0
- package/dist/archil.js +673 -0
- package/dist/build.cjs +129 -5160
- package/dist/build.d.cts +9 -5
- package/dist/build.d.ts +9 -5
- package/dist/build.js +4 -6
- package/dist/{chunk-JF5YPOBY.js → chunk-FHNQ5DNA.js} +3235 -511
- package/dist/{chunk-M7XNBKG4.js → chunk-I5GIWADK.js} +29 -7
- package/dist/chunk-I5NULOJP.js +129 -0
- package/dist/chunk-PKUGXECR.js +13 -0
- package/dist/chunk-QA4L7ZI2.js +72 -0
- package/dist/{chunk-KG6SJM74.js → chunk-VHBDBB3N.js} +8 -5
- package/dist/cli.cjs +124 -5154
- package/dist/cli.js +7 -8
- package/dist/define-gdmBe9RA.d.ts +227 -0
- package/dist/durable.d.ts +53 -0
- package/dist/durable.js +92 -0
- package/dist/index.cjs +720 -833
- package/dist/index.d.cts +139 -78
- package/dist/index.d.ts +139 -78
- package/dist/index.js +12 -11
- package/dist/inside.d.ts +15 -0
- package/dist/inside.js +530 -0
- package/dist/{invoke-client-P2CPBYTF.js → invoke-client-QB2NTZ3L.js} +1 -2
- package/dist/pi-watch-legacy.d.ts +4503 -0
- package/dist/serve.cjs +9 -309
- package/dist/serve.d.cts +14 -1
- package/dist/serve.d.ts +14 -1
- package/dist/serve.js +3 -5
- package/docs/AGENT.md +95 -59
- package/docs/DAYTONA.md +2 -0
- package/docs/DOCKER.md +0 -1
- package/docs/E2B.md +1 -1
- package/docs/LEGACY.md +1 -8
- package/docs/MODAL.md +1 -1
- package/package.json +57 -23
- package/types/pi-watch.d.cts +68 -0
- package/dist/chunk-33IXN6MM.js +0 -21
- package/dist/chunk-6P5I7ZCH.js +0 -2552
- package/dist/chunk-M3FISP7J.js +0 -377
- package/dist/sandbox-capabilities-CFjnZ_kB.d.cts +0 -77
- package/dist/sandbox-capabilities-CFjnZ_kB.d.ts +0 -77
- package/dist/serve-Dan1HQKN.d.cts +0 -89
- package/dist/serve-Dan1HQKN.d.ts +0 -89
- package/dist/supervisor.cjs +0 -5731
- package/dist/supervisor.d.cts +0 -482
- package/dist/supervisor.d.ts +0 -482
- package/dist/supervisor.js +0 -3187
- package/docs/SUPERVISOR.md +0 -258
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,53 @@
|
|
|
1
1
|
import { Buffer } from 'node:buffer';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
2
|
+
import * as agent_neckbeard_pi_watch from 'agent-neckbeard/pi-watch';
|
|
3
|
+
import { HostStartOptions, Context, HostSession } from 'agent-neckbeard/pi-watch';
|
|
4
|
+
export { HostExecutionFactory, HostSession, HostStartOptions, PiWatchEvent, RemoteConversation, RemoteInput } from 'agent-neckbeard/pi-watch';
|
|
5
|
+
import { ServeHandle } from './serve.cjs';
|
|
6
|
+
|
|
7
|
+
/** File content accepted by the public sandbox client. */
|
|
8
|
+
type SandboxFileContent$1 = string | ArrayBuffer | Uint8Array;
|
|
9
|
+
interface SandboxCommandOptions {
|
|
10
|
+
cwd?: string;
|
|
11
|
+
envs?: Record<string, string>;
|
|
12
|
+
timeoutMs: number;
|
|
13
|
+
onStdout?: (data: string) => void;
|
|
14
|
+
onStderr?: (data: string) => void;
|
|
15
|
+
}
|
|
16
|
+
/** Result from running a sandbox command with captured output. */
|
|
17
|
+
interface SandboxCommandResult {
|
|
18
|
+
exitCode: number;
|
|
19
|
+
stdout: string;
|
|
20
|
+
stderr: string;
|
|
21
|
+
}
|
|
22
|
+
interface SandboxDetachedCommandOptions {
|
|
23
|
+
cwd?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Environment applied only when the requested payload is spawned. Detached
|
|
26
|
+
* lifecycle preparation and its persistent reaper use a fixed clean
|
|
27
|
+
* environment.
|
|
28
|
+
*/
|
|
29
|
+
envs?: Record<string, string>;
|
|
30
|
+
/**
|
|
31
|
+
* Stable semantic identity for this launch. Providers hash this value before
|
|
32
|
+
* using it in sandbox paths so retries can adopt an already-prepared process
|
|
33
|
+
* without exposing the raw identity.
|
|
34
|
+
*/
|
|
35
|
+
launchId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Runs after the provider has captured a birth-fenced process identity but
|
|
38
|
+
* before the sandbox process is allowed to execute the requested command.
|
|
39
|
+
*/
|
|
40
|
+
beforeRelease?: (command: SandboxDetachedCommand) => void | Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
interface SandboxDetachedCommand {
|
|
43
|
+
/**
|
|
44
|
+
* Provider-owned opaque session identity. Pass the complete handle to
|
|
45
|
+
* follow-up APIs instead of separating this value from `commandId`.
|
|
46
|
+
*/
|
|
47
|
+
readonly sessionId: string;
|
|
48
|
+
/** Provider-owned command identity, when the underlying provider has one. */
|
|
49
|
+
readonly commandId?: string;
|
|
50
|
+
}
|
|
5
51
|
|
|
6
52
|
/** Sandbox providers supported by the public and in-sandbox runtimes. */
|
|
7
53
|
type SandboxProvider = 'e2b' | 'daytona' | 'modal' | 'docker';
|
|
@@ -19,9 +65,7 @@ interface SandboxContext {
|
|
|
19
65
|
interface CreateAttachedSessionOptions {
|
|
20
66
|
/**
|
|
21
67
|
* Attached sessions are owned by this client process and stop when their
|
|
22
|
-
* active request is cancelled.
|
|
23
|
-
* deprecated `agent-neckbeard/supervisor` entrypoint because their control
|
|
24
|
-
* plane must outlive this object.
|
|
68
|
+
* active request is cancelled.
|
|
25
69
|
*/
|
|
26
70
|
durability?: 'attached';
|
|
27
71
|
/** Existing sandbox runtime to reconnect to. Defaults to the deployed sandbox. */
|
|
@@ -104,6 +148,24 @@ type ModalSandboxConnectOptions = ModalClientCredentials & {
|
|
|
104
148
|
sandboxId: string;
|
|
105
149
|
};
|
|
106
150
|
|
|
151
|
+
/**
|
|
152
|
+
* The image tag a host should run: `NECKBEARD_IMAGE_TAG`, else the commit its platform deployed,
|
|
153
|
+
* which is the commit CI tagged the image with.
|
|
154
|
+
*/
|
|
155
|
+
declare function resolveImageTag(env?: NodeJS.ProcessEnv): string | undefined;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Wire contract between `Agent` on the host and `serve()` in the sandbox. See docs/AGENT.md.
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
declare const TURN_PROTOCOL_VERSION = 6;
|
|
162
|
+
interface TurnHealth {
|
|
163
|
+
ok: true;
|
|
164
|
+
protocolVersion: number;
|
|
165
|
+
busy: boolean;
|
|
166
|
+
turnId: string | null;
|
|
167
|
+
}
|
|
168
|
+
|
|
107
169
|
type DaytonaCreateOptions = Extract<SandboxClientCreateOptions, {
|
|
108
170
|
provider: 'daytona';
|
|
109
171
|
}>;
|
|
@@ -143,40 +205,28 @@ interface AgentOptions {
|
|
|
143
205
|
/** Port `serve()` listens on, passed to it as `NECKBEARD_PORT`. Defaults to 8080. */
|
|
144
206
|
port?: number;
|
|
145
207
|
/** Environment of every sandbox. Secrets go here or in `start()`, never in the image. */
|
|
146
|
-
|
|
208
|
+
env?: Record<string, string | undefined>;
|
|
147
209
|
/** How long `start()` waits for the runtime to answer. Defaults to two minutes. */
|
|
148
210
|
startTimeoutMs?: number;
|
|
149
211
|
/** How long `prepare()` waits for a Daytona snapshot or E2B template build. Defaults to 30 minutes. */
|
|
150
212
|
prepareTimeoutMs?: number;
|
|
151
213
|
}
|
|
214
|
+
interface SandboxSession {
|
|
215
|
+
sandboxId: string;
|
|
216
|
+
conversation: agent_neckbeard_pi_watch.RemoteConversation;
|
|
217
|
+
}
|
|
152
218
|
interface StartOptions {
|
|
153
|
-
|
|
219
|
+
env?: Record<string, string | undefined>;
|
|
154
220
|
/** Names the conversation a persisted Pi session keeps, given to the runtime as `NECKBEARD_SESSION_ID`. */
|
|
155
221
|
sessionId?: string;
|
|
156
222
|
signal?: AbortSignal;
|
|
157
223
|
}
|
|
158
|
-
interface RunOptions<TEvent> extends Omit<TurnStreamOptions, 'after'> {
|
|
159
|
-
/** Receives each record as it streams, for example to store or show it, keyed by `seq`. */
|
|
160
|
-
onRecord?: (record: TurnRecord<TEvent>) => void | Promise<void>;
|
|
161
|
-
}
|
|
162
|
-
interface TurnStreamOptions {
|
|
163
|
-
/** Stops reading the stream; the turn keeps running. Use `abort()` to stop the turn. */
|
|
164
|
-
signal?: AbortSignal;
|
|
165
|
-
/** Resume after this record's `seq`. Defaults to -1, the start of the turn. */
|
|
166
|
-
after?: number;
|
|
167
|
-
/**
|
|
168
|
-
* How long to keep reconnecting without a healthy connection. Defaults to two minutes. A
|
|
169
|
-
* connection that sends nothing, not even the runtime's heartbeat every 15 seconds, for this long
|
|
170
|
-
* is abandoned, so keep it above 15 seconds.
|
|
171
|
-
*/
|
|
172
|
-
reconnectTimeoutMs?: number;
|
|
173
|
-
}
|
|
174
224
|
/**
|
|
175
225
|
* Runs a Pi agent from a prebuilt image whose main process is `serve()` from
|
|
176
226
|
* `agent-neckbeard/serve`. Every method takes the sandbox ID, so any host process can drive a
|
|
177
227
|
* sandbox another one started.
|
|
178
228
|
*/
|
|
179
|
-
declare class Agent
|
|
229
|
+
declare class Agent {
|
|
180
230
|
private readonly options;
|
|
181
231
|
readonly name: string;
|
|
182
232
|
readonly image: string;
|
|
@@ -203,26 +253,16 @@ declare class Agent<TEvent = unknown> {
|
|
|
203
253
|
onLog?: (line: string) => void;
|
|
204
254
|
refresh?: boolean;
|
|
205
255
|
}): Promise<void>;
|
|
206
|
-
/**
|
|
207
|
-
start(options?: StartOptions): Promise<
|
|
208
|
-
/**
|
|
209
|
-
* Starts a turn and streams its records until its `end` record. Starting a turn whose
|
|
210
|
-
* `turnId` the runtime already has resumes it instead of running it again.
|
|
211
|
-
*/
|
|
212
|
-
prompt(sandboxId: string, turn: StartTurnRequest, options?: TurnStreamOptions): AsyncGenerator<TurnRecord<TEvent>>;
|
|
213
|
-
/**
|
|
214
|
-
* Runs a Pi turn to its end and returns its final assistant text, or null when it had none.
|
|
215
|
-
* Throws `ExecutionError` when the turn did not complete or its model did not stop on its own.
|
|
216
|
-
* Running a turn again with the same `turnId` replays its records from the start.
|
|
217
|
-
*/
|
|
218
|
-
run(sandboxId: string, turn: StartTurnRequest, options?: RunOptions<TEvent>): Promise<string | null>;
|
|
256
|
+
/** Launches a sandbox. To reconnect to one, call `attach()`. */
|
|
257
|
+
start(options?: StartOptions): Promise<SandboxSession>;
|
|
219
258
|
/**
|
|
220
|
-
*
|
|
221
|
-
*
|
|
259
|
+
* Reconnects to a running sandbox by its provider ID, including while it is busy. Never creates,
|
|
260
|
+
* starts or kills a sandbox, and admits no input.
|
|
222
261
|
*/
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
262
|
+
attach(sandboxId: string, options?: {
|
|
263
|
+
signal?: AbortSignal;
|
|
264
|
+
}): Promise<SandboxSession>;
|
|
265
|
+
private handle;
|
|
226
266
|
health(sandboxId: string, signal?: AbortSignal): Promise<TurnHealth>;
|
|
227
267
|
/** Waits until no turn runs, for example before reading files a turn writes. */
|
|
228
268
|
waitForIdle(sandboxId: string, options?: {
|
|
@@ -234,8 +274,9 @@ declare class Agent<TEvent = unknown> {
|
|
|
234
274
|
* failure throws, so cleanup can be retried, since a Daytona sandbox need not expire on its own.
|
|
235
275
|
*/
|
|
236
276
|
kill(sandboxId: string): Promise<void>;
|
|
237
|
-
/** File and command access to a sandbox, for staging inputs and reading results. */
|
|
277
|
+
/** File and command access to a sandbox, for staging inputs and reading results. Starts a stopped Daytona sandbox and resumes a paused E2B one. */
|
|
238
278
|
sandbox(sandboxId: string): Promise<SandboxClient>;
|
|
279
|
+
private connect;
|
|
239
280
|
/**
|
|
240
281
|
* Deletes this agent's Daytona snapshots or E2B templates except the newest `keep` and the
|
|
241
282
|
* current one. Returns the names it deleted.
|
|
@@ -246,9 +287,12 @@ declare class Agent<TEvent = unknown> {
|
|
|
246
287
|
}): Promise<string[]>;
|
|
247
288
|
private createSandbox;
|
|
248
289
|
private startE2bRuntime;
|
|
290
|
+
private requireProtocol;
|
|
249
291
|
private waitForRuntime;
|
|
250
292
|
private endpoint;
|
|
251
293
|
private request;
|
|
294
|
+
private throwIfGone;
|
|
295
|
+
private lookup;
|
|
252
296
|
private prepareDaytonaSnapshot;
|
|
253
297
|
private prepareE2bTemplate;
|
|
254
298
|
private listDaytonaSnapshots;
|
|
@@ -258,11 +302,6 @@ declare class Agent<TEvent = unknown> {
|
|
|
258
302
|
|
|
259
303
|
/** Where `neckbeard build` installs an agent's skills in its image. */
|
|
260
304
|
declare const SKILLS_DIR = "/app/.agents/skills";
|
|
261
|
-
/**
|
|
262
|
-
* The image tag a host should run: `NECKBEARD_IMAGE_TAG`, else the commit its platform deployed,
|
|
263
|
-
* which is the commit CI tagged the image with.
|
|
264
|
-
*/
|
|
265
|
-
declare function resolveImageTag(env?: NodeJS.ProcessEnv): string | undefined;
|
|
266
305
|
type ThinkingLevel = 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
267
306
|
/** A Pi session for `defineAgent()` to create in the sandbox. */
|
|
268
307
|
interface PiSessionConfig {
|
|
@@ -286,6 +325,7 @@ interface PiSessionConfig {
|
|
|
286
325
|
}
|
|
287
326
|
/** An agent: its image, sandbox, and either a Pi session config or its own session factory. */
|
|
288
327
|
interface AgentDefinition {
|
|
328
|
+
mode: 'harness-inside-sandbox' | 'harness-outside-sandbox';
|
|
289
329
|
/** Names the image and the provider's snapshots or templates; lowercase letters, digits, and dashes. */
|
|
290
330
|
name: string;
|
|
291
331
|
/** Registry the image lives under, such as `ghcr.io/acme`; the image is `<registry>/<name>:<tag>`. */
|
|
@@ -293,13 +333,13 @@ interface AgentDefinition {
|
|
|
293
333
|
/** A full image reference instead of `registry`, such as one built elsewhere. */
|
|
294
334
|
image?: string;
|
|
295
335
|
/** The sandbox, or a function returning it, read only on the host. */
|
|
296
|
-
sandbox
|
|
336
|
+
sandbox?: AgentSandbox | (() => AgentSandbox);
|
|
297
337
|
/**
|
|
298
338
|
* Environment of every sandbox, or a function returning it, read only on the host, so the image
|
|
299
339
|
* needs none of the host's configuration. Never secrets in the image. A `pi` agent is traced in
|
|
300
340
|
* Braintrust when this has BRAINTRUST_API_KEY and BRAINTRUST_PROJECT_NAME; see docs/AGENT.md#tracing.
|
|
301
341
|
*/
|
|
302
|
-
|
|
342
|
+
env?: Record<string, string | undefined> | (() => Record<string, string | undefined>);
|
|
303
343
|
/** The image's main process. Defaults to `node /app/agent.mjs`, the entry point `neckbeard build` writes. */
|
|
304
344
|
command?: string[];
|
|
305
345
|
/** The port the runtime listens on, given to it as NECKBEARD_PORT. Defaults to 8080. */
|
|
@@ -308,14 +348,12 @@ interface AgentDefinition {
|
|
|
308
348
|
startTimeoutMs?: number;
|
|
309
349
|
/** How long `prepare()` may take to create a Daytona snapshot or E2B template. Defaults to 30 minutes. */
|
|
310
350
|
prepareTimeoutMs?: number;
|
|
311
|
-
/**
|
|
351
|
+
/** Aborts an inside-sandbox Pi submission when it exceeds this duration. Host-side workers own native submission deadlines. */
|
|
312
352
|
maxTurnDurationMs?: number;
|
|
313
|
-
/** See `ServeOptions.abortGraceMs`. */
|
|
314
|
-
abortGraceMs?: number;
|
|
315
353
|
/** The agent's Pi session. */
|
|
316
354
|
pi?: PiSessionConfig;
|
|
317
355
|
/** Creates the session instead of `pi`, for one that config can't express. */
|
|
318
|
-
createSession?: () => Promise<
|
|
356
|
+
createSession?: () => Promise<agent_neckbeard_pi_watch.ServedConversation>;
|
|
319
357
|
build?: {
|
|
320
358
|
/** Packages the image installs instead of bundling; Pi's always are, and for a `pi` agent Braintrust when its package depends on it. */
|
|
321
359
|
external?: string[];
|
|
@@ -329,32 +367,44 @@ declare const definedAgentMarker: unique symbol;
|
|
|
329
367
|
* its `Agent` the first time one is needed, so importing it in the image requires no image tag or
|
|
330
368
|
* host configuration. In the image, `serve()` serves its session.
|
|
331
369
|
*/
|
|
332
|
-
declare class
|
|
370
|
+
declare class AgentImage {
|
|
333
371
|
readonly definition: AgentDefinition;
|
|
334
372
|
readonly [definedAgentMarker] = true;
|
|
335
|
-
private client?;
|
|
336
|
-
private braintrustChecked;
|
|
337
373
|
constructor(definition: AgentDefinition);
|
|
338
374
|
get name(): string;
|
|
339
375
|
/** The image this host runs: `image`, else `<registry>/<name>:<tag>` with the tag `resolveImageTag()` finds. */
|
|
340
376
|
imageRef(tag?: string | undefined): string;
|
|
377
|
+
}
|
|
378
|
+
interface HostAgentDefinition extends AgentDefinition {
|
|
379
|
+
mode: 'harness-outside-sandbox';
|
|
380
|
+
pi: PiSessionConfig;
|
|
381
|
+
sandbox?: never;
|
|
382
|
+
createSession?: never;
|
|
383
|
+
env?: never;
|
|
384
|
+
}
|
|
385
|
+
declare class DefinedHostAgent extends AgentImage {
|
|
386
|
+
constructor(definition: HostAgentDefinition);
|
|
387
|
+
start(options: HostStartOptions, context: Context): Promise<HostSession>;
|
|
388
|
+
}
|
|
389
|
+
declare class DefinedAgent extends AgentImage {
|
|
390
|
+
private client?;
|
|
391
|
+
private braintrustChecked;
|
|
341
392
|
/** The `Agent` for an image, by default the one this host runs. */
|
|
342
|
-
forImage(image?: string): Agent
|
|
393
|
+
forImage(image?: string): Agent;
|
|
343
394
|
private get agent();
|
|
344
395
|
get artifactName(): string;
|
|
345
|
-
prepare(options?: Parameters<Agent
|
|
346
|
-
start(options?: StartOptions): Promise<
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
abort(sandboxId: string, turnId: string, signal?: AbortSignal): Promise<void>;
|
|
396
|
+
prepare(options?: Parameters<Agent['prepare']>[0]): Promise<void>;
|
|
397
|
+
start(options?: StartOptions): Promise<SandboxSession>;
|
|
398
|
+
attach(sandboxId: string, options?: {
|
|
399
|
+
signal?: AbortSignal;
|
|
400
|
+
}): Promise<SandboxSession>;
|
|
351
401
|
health(sandboxId: string, signal?: AbortSignal): Promise<TurnHealth>;
|
|
352
402
|
waitForIdle(sandboxId: string, options?: {
|
|
353
403
|
timeoutMs?: number;
|
|
354
404
|
signal?: AbortSignal;
|
|
355
405
|
}): Promise<void>;
|
|
356
406
|
kill(sandboxId: string): Promise<void>;
|
|
357
|
-
sandbox(sandboxId: string): ReturnType<Agent
|
|
407
|
+
sandbox(sandboxId: string): ReturnType<Agent['sandbox']>;
|
|
358
408
|
gc(options?: {
|
|
359
409
|
keep?: number;
|
|
360
410
|
alsoKeep?: string[];
|
|
@@ -365,10 +415,19 @@ declare class DefinedAgent<TEvent = unknown> {
|
|
|
365
415
|
serve(options?: {
|
|
366
416
|
port?: number;
|
|
367
417
|
host?: string;
|
|
418
|
+
createSession?: () => Promise<agent_neckbeard_pi_watch.ServedConversation>;
|
|
368
419
|
}): Promise<ServeHandle>;
|
|
369
420
|
}
|
|
370
|
-
declare function defineAgent
|
|
371
|
-
declare function
|
|
421
|
+
declare function defineAgent(definition: HostAgentDefinition): DefinedHostAgent;
|
|
422
|
+
declare function defineAgent(definition: AgentDefinition & {
|
|
423
|
+
mode: 'harness-inside-sandbox';
|
|
424
|
+
}): DefinedAgent;
|
|
425
|
+
declare function isDefinedAgent(value: unknown): value is DefinedAgent | DefinedHostAgent;
|
|
426
|
+
|
|
427
|
+
declare class RemoteAdmissionRejected extends Error {
|
|
428
|
+
}
|
|
429
|
+
declare class RemoteSubmissionNotFound extends Error {
|
|
430
|
+
}
|
|
372
431
|
|
|
373
432
|
interface DockerSandboxConfig {
|
|
374
433
|
provider: 'docker';
|
|
@@ -416,6 +475,13 @@ declare class DeploymentError extends NeckbeardError {
|
|
|
416
475
|
/** A sandbox the failure left behind, for `kill()`. */
|
|
417
476
|
constructor(message: string, cause?: Error | undefined, sandboxId?: string | undefined);
|
|
418
477
|
}
|
|
478
|
+
/**
|
|
479
|
+
* Error thrown by `attach()` when the provider reports the sandbox absent, terminated or not
|
|
480
|
+
* running. Any other failure, such as a provider outage, surfaces as itself.
|
|
481
|
+
*/
|
|
482
|
+
declare class SandboxGoneError extends DeploymentError {
|
|
483
|
+
constructor(message: string, cause?: Error);
|
|
484
|
+
}
|
|
419
485
|
/**
|
|
420
486
|
* Error thrown when input or output schema validation fails.
|
|
421
487
|
*/
|
|
@@ -437,13 +503,6 @@ declare class ExecutionError extends NeckbeardError {
|
|
|
437
503
|
declare class RuntimeBusyError extends ExecutionError {
|
|
438
504
|
constructor(message: string);
|
|
439
505
|
}
|
|
440
|
-
/**
|
|
441
|
-
* Thrown when a sandbox's runtime no longer knows a turn, because the sandbox restarted or was
|
|
442
|
-
* replaced. The turn's outcome is unknown.
|
|
443
|
-
*/
|
|
444
|
-
declare class TurnLostError extends ExecutionError {
|
|
445
|
-
constructor(message: string);
|
|
446
|
-
}
|
|
447
506
|
/**
|
|
448
507
|
* Error thrown when required environment variables are missing.
|
|
449
508
|
*/
|
|
@@ -844,7 +903,9 @@ declare class SandboxClient {
|
|
|
844
903
|
}>): Promise<SandboxClient & {
|
|
845
904
|
readonly provider: 'e2b';
|
|
846
905
|
}>;
|
|
847
|
-
static connect(options: SandboxClientConnectOptions
|
|
906
|
+
static connect(options: SandboxClientConnectOptions, mode?: {
|
|
907
|
+
wake?: boolean;
|
|
908
|
+
}): Promise<SandboxClient>;
|
|
848
909
|
get id(): string;
|
|
849
910
|
get provider(): SandboxProvider;
|
|
850
911
|
get paths(): AgentSandboxContext;
|
|
@@ -892,7 +953,7 @@ declare class SandboxClient {
|
|
|
892
953
|
/** @deprecated Use `AgentKind` for user-facing task/session terminology. */
|
|
893
954
|
type AgentMode = 'run' | 'stream';
|
|
894
955
|
type AgentKind = 'task' | 'session';
|
|
895
|
-
/** @deprecated
|
|
956
|
+
/** @deprecated Only attached sessions exist; the durable-session supervisor was removed. */
|
|
896
957
|
type SessionDurability = 'attached' | 'durable';
|
|
897
958
|
/**
|
|
898
959
|
* @deprecated Bundles the agent's code on the host and uploads it, its dependencies, and its
|
|
@@ -1035,4 +1096,4 @@ declare class LegacyBundledAgent<TInput, TOutput = unknown, TFrame = unknown> {
|
|
|
1035
1096
|
}): AsyncGenerator<TFrame>;
|
|
1036
1097
|
}
|
|
1037
1098
|
|
|
1038
|
-
export { Agent, type AgentConfig, type AgentDefinition, type AgentKind, type AgentMode, type AgentOptions, type AgentRunContext, type AgentRunResult, type AgentSandbox, type AgentSandboxContext, type AgentSessionHandler, type AttachedAgentSession, type BuildOptions, ConfigurationError, type CreateAttachedSessionOptions, DEFAULT_DEPENDENCIES, type DaytonaAgentSandbox, type DaytonaSandboxConfig, DefinedAgent, DeploymentError, type DockerSandboxConfig, type E2BSandboxConfig, type E2bAgentSandbox, ExecutionError, type FileDownload, LegacyBundledAgent, type LocalDirectoryUpload, type ModalAgentSandbox, type ModalSandboxConfig, NeckbeardError, type NeckbeardNextConfigOptions, type OsDependencies, type PiSessionConfig,
|
|
1099
|
+
export { Agent, type AgentConfig, type AgentDefinition, type AgentKind, type AgentMode, type AgentOptions, type AgentRunContext, type AgentRunResult, type AgentSandbox, type AgentSandboxContext, type AgentSessionHandler, type AttachedAgentSession, type BuildOptions, ConfigurationError, type CreateAttachedSessionOptions, DEFAULT_DEPENDENCIES, type DaytonaAgentSandbox, type DaytonaSandboxConfig, DefinedAgent, DefinedHostAgent, DeploymentError, type DockerSandboxConfig, type E2BSandboxConfig, type E2bAgentSandbox, ExecutionError, type FileDownload, type HostAgentDefinition, LegacyBundledAgent, type LocalDirectoryUpload, type ModalAgentSandbox, type ModalSandboxConfig, NeckbeardError, type NeckbeardNextConfigOptions, type OsDependencies, type PiSessionConfig, RemoteAdmissionRejected, RemoteSubmissionNotFound, type ResolveAgentSourceFileOptions, type RunAgentConfig, RuntimeBusyError, SKILLS_DIR, SandboxClient, type SandboxClientConnectOptions, type SandboxClientCreateOptions, type SandboxCommandOptions, type SandboxCommandResult, type SandboxConfig, type SandboxDetachedCommand, type SandboxDetachedCommandOptions, type SandboxFileContent, SandboxGoneError, type SandboxProvider, type SandboxServerEndpoint, type SandboxSession, type ServerAgentConfig, type SessionAgentConfig, type SessionDurability, type StartOptions, TURN_PROTOCOL_VERSION, type TurnHealth, ValidationError, defineAgent, isDefinedAgent, resolveAgentSourceFile, resolveImageTag, withNeckbeardNextConfig };
|