@bunny-agent/runner-cli 0.9.38-beta.1 → 0.9.38
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 +16 -7
- package/package.json +3 -3
package/dist/bundle.mjs
CHANGED
|
@@ -5228,7 +5228,6 @@ __export(type_exports2, {
|
|
|
5228
5228
|
var Type = type_exports2;
|
|
5229
5229
|
|
|
5230
5230
|
// ../../packages/runner-pi/dist/tool-refs.js
|
|
5231
|
-
var LOG_PREFIX2 = "[bunny-agent:pi-tool-ref]";
|
|
5232
5231
|
var PiToolRefError = class extends Error {
|
|
5233
5232
|
constructor(message, opts) {
|
|
5234
5233
|
super(message);
|
|
@@ -5254,15 +5253,25 @@ function buildOne(spec) {
|
|
|
5254
5253
|
response = await executeToolRef(spec, params, signal);
|
|
5255
5254
|
} catch (error) {
|
|
5256
5255
|
const message = error instanceof Error ? error.message : String(error);
|
|
5257
|
-
throw new PiToolRefError(
|
|
5256
|
+
throw new PiToolRefError(`Tool "${spec.name}" transport error: ${message}`, { toolName: spec.name });
|
|
5258
5257
|
}
|
|
5259
5258
|
if (response.status < 200 || response.status >= 300) {
|
|
5260
|
-
throw new PiToolRefError(
|
|
5259
|
+
throw new PiToolRefError(formatToolRuntimeErrorMessage(response), {
|
|
5260
|
+
toolName: spec.name,
|
|
5261
|
+
status: response.status,
|
|
5262
|
+
body: response.body
|
|
5263
|
+
});
|
|
5261
5264
|
}
|
|
5262
5265
|
return okResult(response.body);
|
|
5263
5266
|
}
|
|
5264
5267
|
};
|
|
5265
5268
|
}
|
|
5269
|
+
function formatToolRuntimeErrorMessage(response) {
|
|
5270
|
+
const body = response.body.trim();
|
|
5271
|
+
if (body.length > 0)
|
|
5272
|
+
return body;
|
|
5273
|
+
return `Tool execution failed with status ${response.status}`;
|
|
5274
|
+
}
|
|
5266
5275
|
async function executeToolRef(spec, params, signal) {
|
|
5267
5276
|
switch (spec.runtime.type) {
|
|
5268
5277
|
case "http":
|
|
@@ -5310,7 +5319,7 @@ function serializeResult(result) {
|
|
|
5310
5319
|
}
|
|
5311
5320
|
|
|
5312
5321
|
// ../../packages/runner-pi/dist/pi-runner.js
|
|
5313
|
-
var
|
|
5322
|
+
var LOG_PREFIX2 = "[bunny-agent:pi]";
|
|
5314
5323
|
function applyAllowedTools(tools, allowedTools) {
|
|
5315
5324
|
if (!allowedTools)
|
|
5316
5325
|
return tools;
|
|
@@ -5441,11 +5450,11 @@ function createPiRunner(options = {}) {
|
|
|
5441
5450
|
return SessionManager2.open(resume);
|
|
5442
5451
|
}
|
|
5443
5452
|
const sessionPath2 = resolveSessionPathById(cwd, resume);
|
|
5444
|
-
console.error(`${
|
|
5453
|
+
console.error(`${LOG_PREFIX2} resume: id=${resume} path=${sessionPath2 ?? "(not found)"}`);
|
|
5445
5454
|
if (sessionPath2) {
|
|
5446
5455
|
if (isSessionFileTooLarge(sessionPath2)) {
|
|
5447
5456
|
const context = extractSessionContext(sessionPath2);
|
|
5448
|
-
console.error(`${
|
|
5457
|
+
console.error(`${LOG_PREFIX2} session file too large, starting fresh${context ? " (with context)" : ""}`);
|
|
5449
5458
|
const newMgr = SessionManager2.create(cwd);
|
|
5450
5459
|
if (context) {
|
|
5451
5460
|
const firstId = newMgr.getEntries()[0]?.id ?? "";
|
|
@@ -5465,7 +5474,7 @@ function createPiRunner(options = {}) {
|
|
|
5465
5474
|
appendSystemPrompt: options.systemPrompt
|
|
5466
5475
|
}) : void 0;
|
|
5467
5476
|
if (options.skillPaths && options.skillPaths.length > 0) {
|
|
5468
|
-
console.error(`${
|
|
5477
|
+
console.error(`${LOG_PREFIX2} runner: cwd=${cwd} skillPaths=${JSON.stringify(options.skillPaths)}`);
|
|
5469
5478
|
}
|
|
5470
5479
|
if (resourceLoader) {
|
|
5471
5480
|
await resourceLoader.reload();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bunny-agent/runner-cli",
|
|
3
|
-
"version": "0.9.38
|
|
3
|
+
"version": "0.9.38",
|
|
4
4
|
"description": "BunnyAgent 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": {
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"@bunny-agent/runner-harness": "0.1.1-beta.0",
|
|
57
57
|
"@bunny-agent/runner-claude": "0.6.2",
|
|
58
58
|
"@bunny-agent/runner-codex": "0.6.2",
|
|
59
|
-
"@bunny-agent/runner-opencode": "0.6.2",
|
|
60
59
|
"@bunny-agent/runner-gemini": "0.6.2",
|
|
61
|
-
"@bunny-agent/runner-pi": "0.6.4-beta.0"
|
|
60
|
+
"@bunny-agent/runner-pi": "0.6.4-beta.0",
|
|
61
|
+
"@bunny-agent/runner-opencode": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "tsc && pnpm bundle",
|