@cabane/companion 0.6.240 → 0.6.241
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 +16 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12338,7 +12338,7 @@ async function verifyInstall(root, version, harnesses, deps) {
|
|
|
12338
12338
|
env: { ...process.env, CABANE_LAUNCH_SELF: "1" }
|
|
12339
12339
|
});
|
|
12340
12340
|
if (answered.code !== 0 || answered.stdout.trim() !== version) {
|
|
12341
|
-
return `it doesn't start: ${
|
|
12341
|
+
return `it doesn't start: ${errorLine(answered.stderr) || "no version printed"}`;
|
|
12342
12342
|
}
|
|
12343
12343
|
if (harnesses.length === 0) return null;
|
|
12344
12344
|
const probed = await deps.run(deps.execPath, [join24(root, "dist", "postinstall.js"), "--json"], {
|
|
@@ -12360,8 +12360,21 @@ function harnessName(h) {
|
|
|
12360
12360
|
return h === "claude-code" ? "Claude Code" : "Codex";
|
|
12361
12361
|
}
|
|
12362
12362
|
function lastLine(text) {
|
|
12363
|
-
|
|
12364
|
-
|
|
12363
|
+
return nonEmptyLines(text).at(-1)?.slice(0, 300) ?? "";
|
|
12364
|
+
}
|
|
12365
|
+
function errorLine(stderr) {
|
|
12366
|
+
const lines2 = nonEmptyLines(stderr).filter(
|
|
12367
|
+
(l) => !/^Node\.js v\d|^\(Use `node |^\(node:\d+\) /.test(l)
|
|
12368
|
+
);
|
|
12369
|
+
const caret = lines2.findIndex((l) => /^\^+$/.test(l));
|
|
12370
|
+
const rest = caret >= 0 && caret <= 2 ? lines2.slice(caret + 1) : lines2;
|
|
12371
|
+
const named = rest.find(
|
|
12372
|
+
(l) => /^(?:[A-Z][\w$]*)?(?:Error|Exception)(?: \[[A-Z0-9_]+\])?(?::|$)/.test(l)
|
|
12373
|
+
);
|
|
12374
|
+
return (named ?? rest[0])?.slice(0, 300) ?? "";
|
|
12375
|
+
}
|
|
12376
|
+
function nonEmptyLines(text) {
|
|
12377
|
+
return text.split("\n").map((l) => l.trim()).filter(Boolean);
|
|
12365
12378
|
}
|
|
12366
12379
|
var CompanionUpdater = class {
|
|
12367
12380
|
constructor(deps) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/companion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.241",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Cabane Companion (headless): connect an agent on your machine to your Cabane workspace as a responder — drive work against your own codebase, files, and MCP servers without putting any of it in Cabane.",
|
|
6
6
|
"license": "UNLICENSED",
|