@sandagent/runner-cli 0.9.19-beta.4 → 0.9.19
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 +13 -14
- package/package.json +8 -8
package/dist/bundle.mjs
CHANGED
|
@@ -1246,6 +1246,7 @@ var SandagentResourceLoader = class {
|
|
|
1246
1246
|
this.cwd = options.cwd ?? process.cwd();
|
|
1247
1247
|
this.agentDir = options.agentDir ?? join4(homedir(), ".pi", "agent");
|
|
1248
1248
|
this.skillPaths = options.skillPaths ?? [];
|
|
1249
|
+
this.extraAppendPrompt = options.appendSystemPrompt;
|
|
1249
1250
|
this.delegate = new DefaultResourceLoader({
|
|
1250
1251
|
cwd: this.cwd,
|
|
1251
1252
|
agentDir: this.agentDir,
|
|
@@ -1286,10 +1287,12 @@ var SandagentResourceLoader = class {
|
|
|
1286
1287
|
return this.delegate.getSystemPrompt();
|
|
1287
1288
|
}
|
|
1288
1289
|
getAppendSystemPrompt() {
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1290
|
+
const base = this.delegate.getAppendSystemPrompt();
|
|
1291
|
+
if (this.extraAppendPrompt) {
|
|
1292
|
+
console.error(`${LOG_PREFIX} getAppendSystemPrompt: appending extra prompt (${this.extraAppendPrompt.length} chars)`);
|
|
1293
|
+
return [...base, this.extraAppendPrompt];
|
|
1294
|
+
}
|
|
1295
|
+
return base;
|
|
1293
1296
|
}
|
|
1294
1297
|
extendResources(paths) {
|
|
1295
1298
|
this.delegate.extendResources(paths);
|
|
@@ -1447,7 +1450,7 @@ function createPiRunner(options = {}) {
|
|
|
1447
1450
|
const cwd = options.cwd || process.cwd();
|
|
1448
1451
|
const apiKeyEnvKey = `${provider.toUpperCase().replace(/-/g, "_")}_API_KEY`;
|
|
1449
1452
|
const inlineApiKey = typeof options.env?.[apiKeyEnvKey] === "string" && options.env[apiKeyEnvKey].length > 0 ? options.env[apiKeyEnvKey] : void 0;
|
|
1450
|
-
const modelRegistry =
|
|
1453
|
+
const modelRegistry = ModelRegistry.inMemory(AuthStorage.create());
|
|
1451
1454
|
const defaultModel = getModel(provider, modelName);
|
|
1452
1455
|
let model = defaultModel ?? modelRegistry.find(provider, modelName);
|
|
1453
1456
|
if (model == null) {
|
|
@@ -1497,7 +1500,11 @@ function createPiRunner(options = {}) {
|
|
|
1497
1500
|
}
|
|
1498
1501
|
return SessionManager.create(cwd);
|
|
1499
1502
|
})();
|
|
1500
|
-
const resourceLoader = options.skillPaths ? new SandagentResourceLoader({
|
|
1503
|
+
const resourceLoader = options.skillPaths ? new SandagentResourceLoader({
|
|
1504
|
+
cwd,
|
|
1505
|
+
skillPaths: options.skillPaths,
|
|
1506
|
+
appendSystemPrompt: options.systemPrompt
|
|
1507
|
+
}) : void 0;
|
|
1501
1508
|
if (options.skillPaths && options.skillPaths.length > 0) {
|
|
1502
1509
|
console.error(`${LOG_PREFIX2} runner: cwd=${cwd} skillPaths=${JSON.stringify(options.skillPaths)}`);
|
|
1503
1510
|
}
|
|
@@ -1513,14 +1520,6 @@ function createPiRunner(options = {}) {
|
|
|
1513
1520
|
resourceLoader,
|
|
1514
1521
|
customTools
|
|
1515
1522
|
});
|
|
1516
|
-
if (options.systemPrompt != null && options.systemPrompt !== "") {
|
|
1517
|
-
const existing = session.agent.state.systemPrompt ?? "";
|
|
1518
|
-
session.agent.setSystemPrompt(existing ? `${existing}
|
|
1519
|
-
|
|
1520
|
-
---
|
|
1521
|
-
|
|
1522
|
-
${options.systemPrompt}` : options.systemPrompt);
|
|
1523
|
-
}
|
|
1524
1523
|
const eventQueue = [];
|
|
1525
1524
|
let isComplete = false;
|
|
1526
1525
|
let aborted = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sandagent/runner-cli",
|
|
3
|
-
"version": "0.9.19
|
|
3
|
+
"version": "0.9.19",
|
|
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": {
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@anthropic-ai/claude-agent-sdk": "0.2.70",
|
|
44
|
-
"@mariozechner/pi-agent-core": "
|
|
45
|
-
"@mariozechner/pi-ai": "
|
|
46
|
-
"@mariozechner/pi-coding-agent": "
|
|
44
|
+
"@mariozechner/pi-agent-core": "0.64.0",
|
|
45
|
+
"@mariozechner/pi-ai": "0.64.0",
|
|
46
|
+
"@mariozechner/pi-coding-agent": "0.64.0",
|
|
47
47
|
"@openai/codex-sdk": "^0.110.0",
|
|
48
48
|
"dotenv": "^17.3.1",
|
|
49
49
|
"zod": "^4.0.0"
|
|
@@ -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
56
|
"@sandagent/runner-codex": "0.6.2",
|
|
59
|
-
"@sandagent/runner-gemini": "0.6.2",
|
|
60
57
|
"@sandagent/runner-opencode": "0.6.2",
|
|
61
|
-
"@sandagent/runner-
|
|
58
|
+
"@sandagent/runner-gemini": "0.6.2",
|
|
59
|
+
"@sandagent/runner-core": "0.1.1-beta.0",
|
|
60
|
+
"@sandagent/runner-pi": "0.6.4-beta.0",
|
|
61
|
+
"@sandagent/runner-claude": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc && pnpm bundle",
|