@botconnector/bccli 0.4.8 → 0.4.9
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/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import "./chunk-WSSJH765.js";
|
|
|
13
13
|
import "./chunk-PSO7R5AD.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HCW67S5M.js";
|
|
17
17
|
import {
|
|
18
18
|
helpText,
|
|
19
19
|
parseCliArgs
|
|
@@ -109,7 +109,7 @@ async function main() {
|
|
|
109
109
|
return runModelsCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), fetch: globalThis.fetch });
|
|
110
110
|
}
|
|
111
111
|
if (args.command === "update") {
|
|
112
|
-
const { runUpdateCommand } = await import("./update-
|
|
112
|
+
const { runUpdateCommand } = await import("./update-DIYDD7LT.js");
|
|
113
113
|
return runUpdateCommand({ env: process.env });
|
|
114
114
|
}
|
|
115
115
|
if (args.command === "acp") {
|
|
@@ -118,7 +118,7 @@ async function main() {
|
|
|
118
118
|
return 0;
|
|
119
119
|
}
|
|
120
120
|
if (args.command === "serve") {
|
|
121
|
-
const { serveBanner, startServe } = await import("./serve-
|
|
121
|
+
const { serveBanner, startServe } = await import("./serve-JYXPQAVY.js");
|
|
122
122
|
const handle = await startServe({ port: args.port, host: args.host, token: args.token, cwd, env: process.env });
|
|
123
123
|
process.stderr.write(serveBanner(handle, { token: args.token }));
|
|
124
124
|
await new Promise((resolve) => {
|
|
@@ -215,7 +215,7 @@ async function main() {
|
|
|
215
215
|
let updateMessage;
|
|
216
216
|
if (rt.config.updateCheck !== "off" && !process.env.BCCLI_NO_UPDATE_CHECK) {
|
|
217
217
|
try {
|
|
218
|
-
const { checkForUpdate } = await import("./update-
|
|
218
|
+
const { checkForUpdate } = await import("./update-DIYDD7LT.js");
|
|
219
219
|
const update = await checkForUpdate({ home: rt.home, fetch: globalThis.fetch, now: /* @__PURE__ */ new Date() });
|
|
220
220
|
updateMessage = update;
|
|
221
221
|
} catch {
|
|
@@ -8,7 +8,7 @@ import "./chunk-WSSJH765.js";
|
|
|
8
8
|
import "./chunk-PSO7R5AD.js";
|
|
9
9
|
import {
|
|
10
10
|
VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HCW67S5M.js";
|
|
12
12
|
import {
|
|
13
13
|
LOOPBACK_BIND,
|
|
14
14
|
MAX_FRAME_BYTES,
|
|
@@ -79,6 +79,7 @@ function createHeartbeat(intervalMs, ping, terminate) {
|
|
|
79
79
|
|
|
80
80
|
// src/serve.ts
|
|
81
81
|
var MAX_BODY_BYTES = 1024 * 1024;
|
|
82
|
+
var DISPLAY_MAX = 1e5;
|
|
82
83
|
function json(res, status, value) {
|
|
83
84
|
const body = JSON.stringify(value);
|
|
84
85
|
res.writeHead(status, { "content-type": "application/json", "content-length": Buffer.byteLength(body) });
|
|
@@ -404,7 +405,17 @@ Connection: close\r
|
|
|
404
405
|
call.output = event.output;
|
|
405
406
|
call.isError = event.isError;
|
|
406
407
|
}
|
|
407
|
-
|
|
408
|
+
const item = {
|
|
409
|
+
type: "tool_result",
|
|
410
|
+
tool: event.tool,
|
|
411
|
+
output: event.output,
|
|
412
|
+
isError: event.isError
|
|
413
|
+
};
|
|
414
|
+
if (typeof event.display === "string") {
|
|
415
|
+
item.display = event.display.length > DISPLAY_MAX ? `${event.display.slice(0, DISPLAY_MAX)}
|
|
416
|
+
[truncated]` : event.display;
|
|
417
|
+
}
|
|
418
|
+
broadcast(s, item);
|
|
408
419
|
break;
|
|
409
420
|
}
|
|
410
421
|
case "usage":
|