@sandagent/runner-cli 0.9.16-beta.3 → 0.9.16-beta.5
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 +14 -8
- package/package.json +4 -4
package/dist/bundle.mjs
CHANGED
|
@@ -1298,11 +1298,14 @@ var SandagentResourceLoader = class {
|
|
|
1298
1298
|
|
|
1299
1299
|
// ../../packages/runner-pi/dist/pi-runner.js
|
|
1300
1300
|
function redactSecrets(text, secrets) {
|
|
1301
|
+
if (Object.keys(secrets).length === 0)
|
|
1302
|
+
return text;
|
|
1301
1303
|
let result = text;
|
|
1302
|
-
for (const
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
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("");
|
|
1306
1309
|
}
|
|
1307
1310
|
return result;
|
|
1308
1311
|
}
|
|
@@ -1319,8 +1322,12 @@ function buildEnvInjectedBashTool(cwd, extraEnv) {
|
|
|
1319
1322
|
description: bashAgentTool.description,
|
|
1320
1323
|
// biome-ignore lint/suspicious/noExplicitAny: TypeBox schema from pi internals
|
|
1321
1324
|
parameters: bashAgentTool.parameters,
|
|
1322
|
-
execute(toolCallId, params, signal, onUpdate) {
|
|
1323
|
-
|
|
1325
|
+
async execute(toolCallId, params, signal, onUpdate) {
|
|
1326
|
+
const result = await bashAgentTool.execute(toolCallId, params, signal, onUpdate);
|
|
1327
|
+
if (result?.content && Array.isArray(result.content)) {
|
|
1328
|
+
result.content = result.content.map((c) => c.type === "text" && typeof c.text === "string" ? { ...c, text: redactSecrets(c.text, extraEnv) } : c);
|
|
1329
|
+
}
|
|
1330
|
+
return result;
|
|
1324
1331
|
}
|
|
1325
1332
|
};
|
|
1326
1333
|
}
|
|
@@ -1658,8 +1665,7 @@ ${options.systemPrompt}` : options.systemPrompt);
|
|
|
1658
1665
|
|
|
1659
1666
|
`;
|
|
1660
1667
|
} else if (event.type === "tool_execution_end") {
|
|
1661
|
-
const
|
|
1662
|
-
const output = event.toolName === "bash" && options.env && Object.keys(options.env).length > 0 ? redactSecrets(rawOutput, options.env) : rawOutput;
|
|
1668
|
+
const output = extractToolResultText(event.result);
|
|
1663
1669
|
yield `data: ${JSON.stringify({ type: "tool-output-available", toolCallId: event.toolCallId, output, isError: event.isError, dynamic: true, providerExecuted: true })}
|
|
1664
1670
|
|
|
1665
1671
|
`;
|
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.5",
|
|
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-
|
|
56
|
+
"@sandagent/runner-core": "0.1.1-beta.0",
|
|
57
|
+
"@sandagent/runner-codex": "0.6.2",
|
|
57
58
|
"@sandagent/runner-gemini": "0.6.2",
|
|
58
59
|
"@sandagent/runner-opencode": "0.6.2",
|
|
59
|
-
"@sandagent/runner-core": "0.1.1-beta.0",
|
|
60
60
|
"@sandagent/runner-pi": "0.6.4-beta.0",
|
|
61
|
-
"@sandagent/runner-
|
|
61
|
+
"@sandagent/runner-claude": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc && pnpm bundle",
|