@earendil-works/pi-codemode 1.4.0 → 1.5.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 +2 -2
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -275,7 +275,7 @@ import {
|
|
|
275
275
|
type CodemodeTool,
|
|
276
276
|
renderDeclarations,
|
|
277
277
|
} from "@earendil-works/pi-codemode";
|
|
278
|
-
import {
|
|
278
|
+
import { obj, str } from "@earendil-works/pi-schema";
|
|
279
279
|
|
|
280
280
|
const sandboxTools: CodemodeTool[] = agentTools.map((tool) => ({
|
|
281
281
|
name: tool.name,
|
|
@@ -293,7 +293,7 @@ const codemodeTool: AgentTool = {
|
|
|
293
293
|
name: "codemode",
|
|
294
294
|
label: "Codemode",
|
|
295
295
|
description: `Run JavaScript that calls tools as \`await tools.<name>(args)\`. Output with text() or return.\n\n${renderDeclarations({ tools: sandboxTools })}`,
|
|
296
|
-
parameters:
|
|
296
|
+
parameters: obj({ code: str() }),
|
|
297
297
|
execute: async (_toolCallId, { code }, signal) => {
|
|
298
298
|
const sandbox = new CodemodeSandbox({ tools: sandboxTools });
|
|
299
299
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-codemode",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Sandboxed JavaScript execution where the only capability is calling injected tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"README.md"
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
45
|
-
"clean": "
|
|
45
|
+
"clean": "node ../../scripts/package-files.mjs clean dist",
|
|
46
46
|
"build": "tsc -p tsconfig.build.json",
|
|
47
47
|
"test": "vitest --run",
|
|
48
48
|
"prepublishOnly": "npm run clean && npm run build"
|
|
@@ -70,7 +70,6 @@
|
|
|
70
70
|
"quickjs-wasi": "3.6.2"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"
|
|
74
|
-
"vitest": "4.1.11"
|
|
73
|
+
"vitest": "4.1.12"
|
|
75
74
|
}
|
|
76
75
|
}
|