@sandagent/runner-cli 0.9.16-beta.2 → 0.9.16-beta.4
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 +15 -2
- package/package.json +5 -5
package/dist/bundle.mjs
CHANGED
|
@@ -1297,6 +1297,18 @@ var SandagentResourceLoader = class {
|
|
|
1297
1297
|
};
|
|
1298
1298
|
|
|
1299
1299
|
// ../../packages/runner-pi/dist/pi-runner.js
|
|
1300
|
+
function redactSecrets(text, secrets) {
|
|
1301
|
+
if (Object.keys(secrets).length === 0)
|
|
1302
|
+
return text;
|
|
1303
|
+
let result = text;
|
|
1304
|
+
for (const [k, v] of Object.entries(secrets)) {
|
|
1305
|
+
const keyPattern = new RegExp(`${k}\\s*=\\s*\\S*`, "g");
|
|
1306
|
+
result = result.replace(keyPattern, "");
|
|
1307
|
+
if (v.length > 0)
|
|
1308
|
+
result = result.split(v).join("");
|
|
1309
|
+
}
|
|
1310
|
+
return result;
|
|
1311
|
+
}
|
|
1300
1312
|
function buildEnvInjectedBashTool(cwd, extraEnv) {
|
|
1301
1313
|
const bashAgentTool = createBashTool(cwd, {
|
|
1302
1314
|
spawnHook: (ctx) => ({
|
|
@@ -1308,7 +1320,7 @@ function buildEnvInjectedBashTool(cwd, extraEnv) {
|
|
|
1308
1320
|
name: bashAgentTool.name,
|
|
1309
1321
|
label: bashAgentTool.label ?? "bash",
|
|
1310
1322
|
description: bashAgentTool.description,
|
|
1311
|
-
// biome-ignore lint/suspicious/noExplicitAny:
|
|
1323
|
+
// biome-ignore lint/suspicious/noExplicitAny: TypeBox schema from pi internals
|
|
1312
1324
|
parameters: bashAgentTool.parameters,
|
|
1313
1325
|
execute(toolCallId, params, signal, onUpdate) {
|
|
1314
1326
|
return bashAgentTool.execute(toolCallId, params, signal, onUpdate);
|
|
@@ -1649,7 +1661,8 @@ ${options.systemPrompt}` : options.systemPrompt);
|
|
|
1649
1661
|
|
|
1650
1662
|
`;
|
|
1651
1663
|
} else if (event.type === "tool_execution_end") {
|
|
1652
|
-
const
|
|
1664
|
+
const rawOutput = extractToolResultText(event.result);
|
|
1665
|
+
const output = event.toolName === "bash" && options.env && Object.keys(options.env).length > 0 ? redactSecrets(rawOutput, options.env) : rawOutput;
|
|
1653
1666
|
yield `data: ${JSON.stringify({ type: "tool-output-available", toolCallId: event.toolCallId, output, isError: event.isError, dynamic: true, providerExecuted: true })}
|
|
1654
1667
|
|
|
1655
1668
|
`;
|
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.4",
|
|
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-core": "0.1.1-beta.0",
|
|
57
|
-
"@sandagent/runner-claude": "0.6.2",
|
|
58
|
-
"@sandagent/runner-codex": "0.6.2",
|
|
59
56
|
"@sandagent/runner-gemini": "0.6.2",
|
|
60
57
|
"@sandagent/runner-opencode": "0.6.2",
|
|
61
|
-
"@sandagent/runner-pi": "0.6.4-beta.0"
|
|
58
|
+
"@sandagent/runner-pi": "0.6.4-beta.0",
|
|
59
|
+
"@sandagent/runner-core": "0.1.1-beta.0",
|
|
60
|
+
"@sandagent/runner-codex": "0.6.2",
|
|
61
|
+
"@sandagent/runner-claude": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc && pnpm bundle",
|