experimental-agent 0.0.0
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/README.md +243 -0
- package/dist/agent-workflow.d.mts +21 -0
- package/dist/agent-workflow.d.ts +21 -0
- package/dist/agent-workflow.js +2659 -0
- package/dist/agent-workflow.mjs +9 -0
- package/dist/chunk-2YI7MQGZ.mjs +261 -0
- package/dist/chunk-36X6L7SK.mjs +1 -0
- package/dist/chunk-DPPQO7DA.mjs +343 -0
- package/dist/chunk-JQPR6M7D.mjs +649 -0
- package/dist/chunk-MR4UWCJT.mjs +878 -0
- package/dist/client-FCFZYOOB.mjs +9 -0
- package/dist/client-RRX3GDQD.mjs +9 -0
- package/dist/index.d.mts +128 -0
- package/dist/index.d.ts +128 -0
- package/dist/index.js +3078 -0
- package/dist/index.mjs +421 -0
- package/dist/lifecycle-workflow-steps-6BLGTYVB.mjs +20 -0
- package/dist/lifecycle-workflow.d.mts +17 -0
- package/dist/lifecycle-workflow.d.ts +17 -0
- package/dist/lifecycle-workflow.js +1690 -0
- package/dist/lifecycle-workflow.mjs +44 -0
- package/dist/local-J6QFWSWB.mjs +244 -0
- package/dist/process-manager-H2HF6G4G.mjs +153 -0
- package/dist/sandbox-Y3ENCNUA.mjs +10 -0
- package/dist/storage-QSTSE2ZB.mjs +27 -0
- package/dist/types-Lwut_0_u.d.mts +80 -0
- package/dist/types-ctZeJ3iQ.d.ts +80 -0
- package/dist/types-vRxN1Qz1.d.mts +805 -0
- package/dist/types-vRxN1Qz1.d.ts +805 -0
- package/dist/vercel-2CFDMEHB.mjs +18 -0
- package/package.json +59 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { a as StorageConfig, e as SandboxConfig, k as SandboxRecord, h as SandboxError, f as Storage } from './types-vRxN1Qz1.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Summary of a discovered skill, used in the system prompt
|
|
5
|
+
* to inform the LLM about available skills.
|
|
6
|
+
*/
|
|
7
|
+
type SkillSummary = {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
/** Full path to the SKILL.md file inside the sandbox */
|
|
11
|
+
skillMdPath: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A file ready to be uploaded to the sandbox.
|
|
15
|
+
* Content can be text (string) or binary (Buffer).
|
|
16
|
+
*/
|
|
17
|
+
type UploadableFile = {
|
|
18
|
+
/** Relative path within the upload destination */
|
|
19
|
+
path: string;
|
|
20
|
+
content: string | Buffer;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Path or paths to skills directories inside the sandbox.
|
|
24
|
+
*/
|
|
25
|
+
type SkillsDir = string | string[];
|
|
26
|
+
|
|
27
|
+
type SandboxLifecycleInput = {
|
|
28
|
+
id: string;
|
|
29
|
+
storageConfig: StorageConfig;
|
|
30
|
+
initialConfig: SandboxConfig;
|
|
31
|
+
};
|
|
32
|
+
type LogEntry = {
|
|
33
|
+
stream: "stdout" | "stderr";
|
|
34
|
+
data: string;
|
|
35
|
+
};
|
|
36
|
+
type ExecResult = {
|
|
37
|
+
commandId: string;
|
|
38
|
+
logs: () => AsyncIterable<LogEntry>;
|
|
39
|
+
result: Promise<{
|
|
40
|
+
stdout: string;
|
|
41
|
+
stderr: string;
|
|
42
|
+
exitCode: number;
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
type SandboxStatus = "pending" | "running" | "stopping" | "stopped" | "failed";
|
|
46
|
+
interface SandboxLifecycle {
|
|
47
|
+
start: () => Promise<SandboxError | SandboxStatus>;
|
|
48
|
+
snapshot: () => Promise<SandboxError | {
|
|
49
|
+
snapshotId: string;
|
|
50
|
+
}>;
|
|
51
|
+
stop: () => Promise<SandboxError | undefined>;
|
|
52
|
+
getStatus: () => Promise<SandboxError | SandboxStatus>;
|
|
53
|
+
getCreatedAt: () => Promise<SandboxError | Date>;
|
|
54
|
+
getRemainingTimeout: () => Promise<SandboxError | number>;
|
|
55
|
+
}
|
|
56
|
+
interface Sandbox {
|
|
57
|
+
id: SandboxRecord["id"];
|
|
58
|
+
config: SandboxRecord["config"];
|
|
59
|
+
exec: (opts: {
|
|
60
|
+
command: string;
|
|
61
|
+
args?: string[];
|
|
62
|
+
signal?: AbortSignal;
|
|
63
|
+
}) => Promise<SandboxError | ExecResult>;
|
|
64
|
+
/**
|
|
65
|
+
* Get the public domain URL for an exposed port.
|
|
66
|
+
* Only available for Vercel sandboxes with exposed ports.
|
|
67
|
+
*/
|
|
68
|
+
getDomain: (port: number) => Promise<SandboxError | string>;
|
|
69
|
+
kill: (opts: {
|
|
70
|
+
commandId: string;
|
|
71
|
+
storage: Storage;
|
|
72
|
+
}) => Promise<SandboxError | undefined>;
|
|
73
|
+
writeFiles: (opts: {
|
|
74
|
+
files: UploadableFile[];
|
|
75
|
+
destPath: string;
|
|
76
|
+
}) => Promise<void>;
|
|
77
|
+
lifecycle?: SandboxLifecycle;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type { ExecResult as E, Sandbox as S, UploadableFile as U, SkillsDir as a, SkillSummary as b, SandboxLifecycleInput as c };
|