@sandagent/runner-cli 0.9.16-beta.0 → 0.9.16-beta.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/bundle.mjs +21 -13
- package/package.json +5 -5
package/dist/bundle.mjs
CHANGED
|
@@ -1209,7 +1209,7 @@ function createOpenCodeRunner(options = {}) {
|
|
|
1209
1209
|
import { appendFileSync as appendFileSync2, existsSync as existsSync4, unlinkSync as unlinkSync3 } from "node:fs";
|
|
1210
1210
|
import { join as join5 } from "node:path";
|
|
1211
1211
|
import { getModel } from "@mariozechner/pi-ai";
|
|
1212
|
-
import { AuthStorage, createAgentSession,
|
|
1212
|
+
import { AuthStorage, createAgentSession, createBashTool, ModelRegistry, SessionManager } from "@mariozechner/pi-coding-agent";
|
|
1213
1213
|
|
|
1214
1214
|
// ../../packages/runner-pi/dist/sandagent-resource-loader.js
|
|
1215
1215
|
import { existsSync as existsSync3 } from "node:fs";
|
|
@@ -1297,6 +1297,24 @@ var SandagentResourceLoader = class {
|
|
|
1297
1297
|
};
|
|
1298
1298
|
|
|
1299
1299
|
// ../../packages/runner-pi/dist/pi-runner.js
|
|
1300
|
+
function buildEnvInjectedBashTool(cwd, extraEnv) {
|
|
1301
|
+
const bashAgentTool = createBashTool(cwd, {
|
|
1302
|
+
spawnHook: (ctx) => ({
|
|
1303
|
+
...ctx,
|
|
1304
|
+
env: { ...ctx.env, ...extraEnv }
|
|
1305
|
+
})
|
|
1306
|
+
});
|
|
1307
|
+
return {
|
|
1308
|
+
name: bashAgentTool.name,
|
|
1309
|
+
label: bashAgentTool.label ?? "bash",
|
|
1310
|
+
description: bashAgentTool.description,
|
|
1311
|
+
// biome-ignore lint/suspicious/noExplicitAny: schema is a TypeBox object from pi internals
|
|
1312
|
+
parameters: bashAgentTool.parameters,
|
|
1313
|
+
execute(toolCallId, params, signal, onUpdate) {
|
|
1314
|
+
return bashAgentTool.execute(toolCallId, params, signal, onUpdate);
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1300
1318
|
var LOG_PREFIX2 = "[sandagent:pi]";
|
|
1301
1319
|
function parseModelSpec(model) {
|
|
1302
1320
|
const trimmed = model.trim();
|
|
@@ -1467,24 +1485,14 @@ function createPiRunner(options = {}) {
|
|
|
1467
1485
|
if (resourceLoader) {
|
|
1468
1486
|
await resourceLoader.reload();
|
|
1469
1487
|
}
|
|
1470
|
-
const
|
|
1471
|
-
bash: {
|
|
1472
|
-
spawnHook: (ctx) => ({
|
|
1473
|
-
...ctx,
|
|
1474
|
-
env: {
|
|
1475
|
-
...ctx.env,
|
|
1476
|
-
...options.env ?? {}
|
|
1477
|
-
}
|
|
1478
|
-
})
|
|
1479
|
-
}
|
|
1480
|
-
});
|
|
1488
|
+
const customTools = options.env && Object.keys(options.env).length > 0 ? [buildEnvInjectedBashTool(cwd, options.env)] : [];
|
|
1481
1489
|
const { session } = await createAgentSession({
|
|
1482
1490
|
cwd,
|
|
1483
1491
|
model,
|
|
1484
1492
|
sessionManager,
|
|
1485
1493
|
modelRegistry,
|
|
1486
1494
|
resourceLoader,
|
|
1487
|
-
|
|
1495
|
+
customTools
|
|
1488
1496
|
});
|
|
1489
1497
|
if (options.systemPrompt != null && options.systemPrompt !== "") {
|
|
1490
1498
|
const existing = session.agent.state.systemPrompt ?? "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sandagent/runner-cli",
|
|
3
|
-
"version": "0.9.16-beta.
|
|
3
|
+
"version": "0.9.16-beta.2",
|
|
4
4
|
"description": "SandAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"esbuild": "^0.27.2",
|
|
54
54
|
"typescript": "^5.3.0",
|
|
55
55
|
"vitest": "^1.6.1",
|
|
56
|
-
"@sandagent/runner-gemini": "0.6.2",
|
|
57
|
-
"@sandagent/runner-pi": "0.6.4-beta.0",
|
|
58
56
|
"@sandagent/runner-core": "0.1.1-beta.0",
|
|
59
|
-
"@sandagent/runner-
|
|
57
|
+
"@sandagent/runner-claude": "0.6.2",
|
|
60
58
|
"@sandagent/runner-codex": "0.6.2",
|
|
61
|
-
"@sandagent/runner-
|
|
59
|
+
"@sandagent/runner-gemini": "0.6.2",
|
|
60
|
+
"@sandagent/runner-opencode": "0.6.2",
|
|
61
|
+
"@sandagent/runner-pi": "0.6.4-beta.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc && pnpm bundle",
|