@rivet-dev/pi 0.5.0 → 0.5.2
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/actions.d.ts +188 -77
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +276 -101
- package/dist/actions.js.map +1 -1
- package/dist/actor-config.d.ts +1 -2
- package/dist/actor-config.d.ts.map +1 -1
- package/dist/actor-config.js +1 -2
- package/dist/actor-config.js.map +1 -1
- package/dist/actor-sqlite.d.ts +16 -0
- package/dist/actor-sqlite.d.ts.map +1 -0
- package/dist/actor-sqlite.js +52 -0
- package/dist/actor-sqlite.js.map +1 -0
- package/dist/actor.d.ts +21 -17
- package/dist/actor.d.ts.map +1 -1
- package/dist/actor.js +62 -34
- package/dist/actor.js.map +1 -1
- package/dist/credentials.d.ts +5 -5
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +12 -41
- package/dist/credentials.js.map +1 -1
- package/dist/database-env.d.ts +14 -0
- package/dist/database-env.d.ts.map +1 -0
- package/dist/database-env.js +173 -0
- package/dist/database-env.js.map +1 -0
- package/dist/drain.d.ts +1 -1
- package/dist/drain.js +1 -1
- package/dist/durable.d.ts +24 -0
- package/dist/durable.d.ts.map +1 -0
- package/dist/durable.js +5 -0
- package/dist/durable.js.map +1 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +4 -35
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +0 -70
- package/dist/models.js.map +1 -1
- package/dist/runtime.d.ts +84 -81
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +399 -406
- package/dist/runtime.js.map +1 -1
- package/dist/storage.d.ts +29 -45
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +52 -99
- package/dist/storage.js.map +1 -1
- package/dist/tracing.d.ts +4 -9
- package/dist/tracing.d.ts.map +1 -1
- package/dist/tracing.js +4 -40
- package/dist/tracing.js.map +1 -1
- package/dist/{durable/watches.d.ts → watches.d.ts} +5 -5
- package/dist/watches.d.ts.map +1 -0
- package/dist/{durable/watches.js → watches.js} +4 -5
- package/dist/watches.js.map +1 -0
- package/package.json +10 -18
- package/dist/durable/actions.d.ts +0 -192
- package/dist/durable/actions.d.ts.map +0 -1
- package/dist/durable/actions.js +0 -289
- package/dist/durable/actions.js.map +0 -1
- package/dist/durable/actor-sqlite.d.ts +0 -10
- package/dist/durable/actor-sqlite.d.ts.map +0 -1
- package/dist/durable/actor-sqlite.js +0 -32
- package/dist/durable/actor-sqlite.js.map +0 -1
- package/dist/durable/actor.d.ts +0 -36
- package/dist/durable/actor.d.ts.map +0 -1
- package/dist/durable/actor.js +0 -107
- package/dist/durable/actor.js.map +0 -1
- package/dist/durable/env.d.ts +0 -13
- package/dist/durable/env.d.ts.map +0 -1
- package/dist/durable/env.js +0 -178
- package/dist/durable/env.js.map +0 -1
- package/dist/durable/errors.d.ts.map +0 -1
- package/dist/durable/errors.js.map +0 -1
- package/dist/durable/index.d.ts +0 -5
- package/dist/durable/index.d.ts.map +0 -1
- package/dist/durable/index.js +0 -2
- package/dist/durable/index.js.map +0 -1
- package/dist/durable/runtime.d.ts +0 -92
- package/dist/durable/runtime.d.ts.map +0 -1
- package/dist/durable/runtime.js +0 -435
- package/dist/durable/runtime.js.map +0 -1
- package/dist/durable/storage.d.ts +0 -31
- package/dist/durable/storage.d.ts.map +0 -1
- package/dist/durable/storage.js +0 -53
- package/dist/durable/storage.js.map +0 -1
- package/dist/durable/watches.d.ts.map +0 -1
- package/dist/durable/watches.js.map +0 -1
- package/dist/sandbox.d.ts +0 -27
- package/dist/sandbox.d.ts.map +0 -1
- package/dist/sandbox.js +0 -224
- package/dist/sandbox.js.map +0 -1
- /package/dist/{durable/errors.d.ts → errors.d.ts} +0 -0
- /package/dist/{durable/errors.js → errors.js} +0 -0
package/dist/sandbox.js
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
import { posix } from "node:path";
|
|
2
|
-
import { createBashToolDefinition, createEditToolDefinition, createFindToolDefinition, createGrepToolDefinition, createLsToolDefinition, createReadToolDefinition, createWriteToolDefinition, } from "@earendil-works/pi-coding-agent";
|
|
3
|
-
const MAX_FIND_RESULTS = 1_000;
|
|
4
|
-
const MAX_GREP_MATCHES = 1_000;
|
|
5
|
-
const MAX_GREP_OUTPUT_BYTES = 512 * 1024;
|
|
6
|
-
const IGNORED_DIRECTORIES = [".git", "node_modules"];
|
|
7
|
-
/**
|
|
8
|
-
* Builds Pi's seven built-in coding tools with every file and shell operation
|
|
9
|
-
* routed into the sandbox. Passed as `customTools`, they replace the built-in
|
|
10
|
-
* tools of the same names.
|
|
11
|
-
*
|
|
12
|
-
* The tools see the session's `root`. Each operation connects the sandbox on
|
|
13
|
-
* first use and runs at the same path under the sandbox's own working
|
|
14
|
-
* directory, so a replaced sandbox with another working directory still works.
|
|
15
|
-
*/
|
|
16
|
-
export function createSandboxTools(sessionRoot, connect) {
|
|
17
|
-
const root = normalizeRoot(sessionRoot);
|
|
18
|
-
const inSandbox = async (path) => {
|
|
19
|
-
const sandbox = await connect();
|
|
20
|
-
return { sandbox, path: toSandboxPath(root, sandbox.cwd, path) };
|
|
21
|
-
};
|
|
22
|
-
const access = async (path) => {
|
|
23
|
-
const target = await inSandbox(path);
|
|
24
|
-
if (!(await target.sandbox.exists(target.path))) {
|
|
25
|
-
throw new Error(`Path not found: ${resolveSandboxPath(root, path)}`);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const readFile = async (path) => {
|
|
29
|
-
const target = await inSandbox(path);
|
|
30
|
-
return Buffer.from(await target.sandbox.readFile(target.path));
|
|
31
|
-
};
|
|
32
|
-
const writeFile = async (path, content) => {
|
|
33
|
-
const target = await inSandbox(path);
|
|
34
|
-
await target.sandbox.writeFile(target.path, content);
|
|
35
|
-
};
|
|
36
|
-
const read = createReadToolDefinition(root, {
|
|
37
|
-
operations: {
|
|
38
|
-
access,
|
|
39
|
-
readFile,
|
|
40
|
-
detectImageMimeType: async (path) => imageMimeType(path),
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
const write = createWriteToolDefinition(root, {
|
|
44
|
-
operations: {
|
|
45
|
-
writeFile,
|
|
46
|
-
mkdir: async (path) => {
|
|
47
|
-
const target = await inSandbox(path);
|
|
48
|
-
await target.sandbox.mkdir(target.path);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
const edit = createEditToolDefinition(root, {
|
|
53
|
-
operations: { access, readFile, writeFile },
|
|
54
|
-
});
|
|
55
|
-
const bash = createBashToolDefinition(root, {
|
|
56
|
-
operations: createSandboxBashOperations(root, connect),
|
|
57
|
-
});
|
|
58
|
-
const ls = createLsToolDefinition(root, {
|
|
59
|
-
operations: {
|
|
60
|
-
exists: async (path) => {
|
|
61
|
-
const target = await inSandbox(path);
|
|
62
|
-
return target.sandbox.exists(target.path);
|
|
63
|
-
},
|
|
64
|
-
readdir: async (path) => {
|
|
65
|
-
const target = await inSandbox(path);
|
|
66
|
-
return target.sandbox.readdir(target.path);
|
|
67
|
-
},
|
|
68
|
-
stat: async (path) => {
|
|
69
|
-
const target = await inSandbox(path);
|
|
70
|
-
const stat = await target.sandbox.stat(target.path);
|
|
71
|
-
return { isDirectory: () => stat.isDirectory };
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
const find = createFindToolDefinition(root, {
|
|
76
|
-
operations: {
|
|
77
|
-
exists: async (path) => {
|
|
78
|
-
const target = await inSandbox(path);
|
|
79
|
-
return target.sandbox.exists(target.path);
|
|
80
|
-
},
|
|
81
|
-
glob: async (pattern, searchDirectory, options) => {
|
|
82
|
-
const target = await inSandbox(searchDirectory);
|
|
83
|
-
const result = await target.sandbox.exec(`find . -type f ${IGNORED_DIRECTORIES.map((directory) => `-not -path ${shellQuote(`*/${directory}/*`)}`).join(" ")}`, { cwd: target.path });
|
|
84
|
-
if (result.exitCode !== 0) {
|
|
85
|
-
throw new Error(result.stderr.trim() || `find exited with ${result.exitCode}`);
|
|
86
|
-
}
|
|
87
|
-
return result.stdout
|
|
88
|
-
.split("\n")
|
|
89
|
-
.map(stripDotSlash)
|
|
90
|
-
.filter((path) => path.length > 0 && matchesToolGlob(path, pattern))
|
|
91
|
-
.slice(0, Math.min(options.limit, MAX_FIND_RESULTS));
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
const grepBase = createGrepToolDefinition(root);
|
|
96
|
-
const grep = {
|
|
97
|
-
...grepBase,
|
|
98
|
-
execute: async (_toolCallId, params, signal) => {
|
|
99
|
-
const searchPath = resolveSandboxPath(root, params.path ?? ".");
|
|
100
|
-
const limit = Math.min(Math.max(1, params.limit ?? 100), MAX_GREP_MATCHES);
|
|
101
|
-
const args = ["-r", "-n", "-I", "-H"];
|
|
102
|
-
if (params.ignoreCase)
|
|
103
|
-
args.push("-i");
|
|
104
|
-
if (params.literal)
|
|
105
|
-
args.push("-F");
|
|
106
|
-
if (params.glob)
|
|
107
|
-
args.push(`--include=${params.glob}`);
|
|
108
|
-
if (params.context && params.context > 0) {
|
|
109
|
-
args.push("-C", String(Math.floor(params.context)));
|
|
110
|
-
}
|
|
111
|
-
for (const directory of IGNORED_DIRECTORIES) {
|
|
112
|
-
args.push(`--exclude-dir=${directory}`);
|
|
113
|
-
}
|
|
114
|
-
args.push("-e", params.pattern, "--", posix.relative(root, searchPath) || ".");
|
|
115
|
-
const target = await inSandbox(root);
|
|
116
|
-
const result = await target.sandbox.exec(`grep ${args.map(shellQuote).join(" ")}`, {
|
|
117
|
-
cwd: target.path,
|
|
118
|
-
signal,
|
|
119
|
-
});
|
|
120
|
-
if (result.exitCode !== 0 && result.exitCode !== 1) {
|
|
121
|
-
throw new Error(result.stderr.trim() || `grep exited with ${result.exitCode}`);
|
|
122
|
-
}
|
|
123
|
-
const lines = result.stdout.replace(/\n$/, "").split("\n");
|
|
124
|
-
const matched = lines[0] === "" ? [] : lines.map(stripDotSlash);
|
|
125
|
-
const selected = matched.slice(0, limit);
|
|
126
|
-
let output = selected.join("\n");
|
|
127
|
-
let linesTruncated = false;
|
|
128
|
-
if (Buffer.byteLength(output) > MAX_GREP_OUTPUT_BYTES) {
|
|
129
|
-
output = Buffer.from(output)
|
|
130
|
-
.subarray(0, MAX_GREP_OUTPUT_BYTES)
|
|
131
|
-
.toString();
|
|
132
|
-
linesTruncated = true;
|
|
133
|
-
}
|
|
134
|
-
const details = {};
|
|
135
|
-
if (matched.length > selected.length)
|
|
136
|
-
details.matchLimitReached = limit;
|
|
137
|
-
if (linesTruncated)
|
|
138
|
-
details.linesTruncated = true;
|
|
139
|
-
return {
|
|
140
|
-
content: [{ type: "text", text: output || "No matches found" }],
|
|
141
|
-
details: Object.keys(details).length > 0 ? details : undefined,
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
return [read, bash, edit, write, grep, find, ls];
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Command execution for Pi's bash tool and `executeBash`, inside the sandbox.
|
|
149
|
-
* Follows Pi's `BashOperations` contract: `timeout` is in seconds, and abort
|
|
150
|
-
* and timeout reject with `aborted` and `timeout:<seconds>`.
|
|
151
|
-
*
|
|
152
|
-
* Pi passes the actor host's environment as `options.env`. It is not
|
|
153
|
-
* forwarded, because it holds the host's provider keys; commands run with the
|
|
154
|
-
* sandbox's own environment. Paths map from `sessionRoot` as in
|
|
155
|
-
* `createSandboxTools`.
|
|
156
|
-
*/
|
|
157
|
-
export function createSandboxBashOperations(sessionRoot, connect) {
|
|
158
|
-
const root = normalizeRoot(sessionRoot);
|
|
159
|
-
return {
|
|
160
|
-
async exec(command, requestedCwd, options) {
|
|
161
|
-
const sandbox = await connect();
|
|
162
|
-
const result = await sandbox.exec(command, {
|
|
163
|
-
cwd: toSandboxPath(root, sandbox.cwd, requestedCwd),
|
|
164
|
-
timeoutMs: options.timeout === undefined ? undefined : options.timeout * 1000,
|
|
165
|
-
signal: options.signal,
|
|
166
|
-
onData: (chunk) => options.onData(Buffer.from(chunk)),
|
|
167
|
-
});
|
|
168
|
-
if (result.timedOut) {
|
|
169
|
-
throw new Error(`timeout:${options.timeout}`);
|
|
170
|
-
}
|
|
171
|
-
return { exitCode: result.exitCode };
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
/** Resolves `path` against `root` and rejects anything outside it. */
|
|
176
|
-
export function resolveSandboxPath(root, path) {
|
|
177
|
-
const normalizedRoot = normalizeRoot(root);
|
|
178
|
-
const resolved = posix.resolve(normalizedRoot, path);
|
|
179
|
-
const prefix = normalizedRoot === "/" ? "/" : `${normalizedRoot}/`;
|
|
180
|
-
if (resolved !== normalizedRoot && !resolved.startsWith(prefix)) {
|
|
181
|
-
throw new Error(`Path escapes the sandbox working directory: ${path}`);
|
|
182
|
-
}
|
|
183
|
-
return resolved;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Maps `path`, resolved against the session's `root`, to the same place under
|
|
187
|
-
* the sandbox's working directory. Paths outside `root` are rejected.
|
|
188
|
-
*/
|
|
189
|
-
function toSandboxPath(root, sandboxCwd, path) {
|
|
190
|
-
const relative = posix.relative(normalizeRoot(root), resolveSandboxPath(root, path));
|
|
191
|
-
return posix.join(normalizeRoot(sandboxCwd), relative);
|
|
192
|
-
}
|
|
193
|
-
function normalizeRoot(path) {
|
|
194
|
-
if (!posix.isAbsolute(path)) {
|
|
195
|
-
throw new Error(`sandbox cwd must be an absolute POSIX path, received ${path}`);
|
|
196
|
-
}
|
|
197
|
-
return posix.normalize(path);
|
|
198
|
-
}
|
|
199
|
-
/** Pi's find semantics: a pattern without a slash matches the file name at any depth. */
|
|
200
|
-
function matchesToolGlob(relativePath, pattern) {
|
|
201
|
-
if (pattern.includes("/")) {
|
|
202
|
-
return (posix.matchesGlob(relativePath, pattern) ||
|
|
203
|
-
posix.matchesGlob(relativePath, `**/${pattern}`));
|
|
204
|
-
}
|
|
205
|
-
return posix.matchesGlob(posix.basename(relativePath), pattern);
|
|
206
|
-
}
|
|
207
|
-
function stripDotSlash(path) {
|
|
208
|
-
return path.startsWith("./") ? path.slice(2) : path;
|
|
209
|
-
}
|
|
210
|
-
function imageMimeType(path) {
|
|
211
|
-
const extension = posix.extname(path).toLowerCase();
|
|
212
|
-
return {
|
|
213
|
-
".bmp": "image/bmp",
|
|
214
|
-
".gif": "image/gif",
|
|
215
|
-
".jpeg": "image/jpeg",
|
|
216
|
-
".jpg": "image/jpeg",
|
|
217
|
-
".png": "image/png",
|
|
218
|
-
".webp": "image/webp",
|
|
219
|
-
}[extension];
|
|
220
|
-
}
|
|
221
|
-
export function shellQuote(value) {
|
|
222
|
-
return `'${value.replaceAll("'", `'"'"'`)}'`;
|
|
223
|
-
}
|
|
224
|
-
//# sourceMappingURL=sandbox.js.map
|
package/dist/sandbox.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAEN,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,GAIzB,MAAM,iCAAiC,CAAC;AAGzC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,qBAAqB,GAAG,GAAG,GAAG,IAAI,CAAC;AACzC,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CACjC,WAAmB,EACnB,OAA+B;IAE/B,MAAM,IAAI,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IACxC,MAAM,SAAS,GAA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