@cabane/companion 0.6.206 → 0.6.207
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 +59 -2
- package/dist/runtime.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11067,7 +11067,7 @@ init_bundled_binaries();
|
|
|
11067
11067
|
init_cabane_command();
|
|
11068
11068
|
init_config();
|
|
11069
11069
|
import { homedir as homedir6 } from "os";
|
|
11070
|
-
import { join as join7 } from "path";
|
|
11070
|
+
import { join as join7, win32 } from "path";
|
|
11071
11071
|
|
|
11072
11072
|
// src/device-state.ts
|
|
11073
11073
|
var DEVICE_STATES = ["waiting", "online", "offline", "deactivated"];
|
|
@@ -11157,7 +11157,8 @@ function ctx(c = {}) {
|
|
|
11157
11157
|
install: c.install ?? companionInstall(),
|
|
11158
11158
|
profile: "profile" in c ? c.profile ?? null : profileFile({ home }),
|
|
11159
11159
|
reload: "reload" in c ? c.reload ?? null : reloadLine(),
|
|
11160
|
-
hasNpm: c.hasNpm ?? firstOnPath("npm", path) !== null
|
|
11160
|
+
hasNpm: c.hasNpm ?? firstOnPath("npm", path) !== null,
|
|
11161
|
+
windows: (c.platform ?? process.platform) === "win32"
|
|
11161
11162
|
};
|
|
11162
11163
|
}
|
|
11163
11164
|
function loginCommand(runtime) {
|
|
@@ -11224,6 +11225,7 @@ var CHOOSE_AGENT = "Cabane needs one of them. Which will you set up?";
|
|
|
11224
11225
|
var SETUP_AGAIN = `Then ${cabane("status")} shows it signed in; nothing else to run.`;
|
|
11225
11226
|
function agentNote(runtime, c = {}) {
|
|
11226
11227
|
const k = ctx(c);
|
|
11228
|
+
if (k.windows) return windowsAgentNote(runtime, k);
|
|
11227
11229
|
if (runtime === "claude-code") {
|
|
11228
11230
|
const commands = ["curl -fsSL https://claude.ai/install.sh | bash"];
|
|
11229
11231
|
const localBin = join7(k.home, ".local", "bin");
|
|
@@ -11287,6 +11289,61 @@ function agentNote(runtime, c = {}) {
|
|
|
11287
11289
|
]
|
|
11288
11290
|
};
|
|
11289
11291
|
}
|
|
11292
|
+
function windowsAgentNote(runtime, k) {
|
|
11293
|
+
if (runtime === "claude-code") {
|
|
11294
|
+
const commands = ["irm https://claude.ai/install.ps1 | iex"];
|
|
11295
|
+
if (!windowsDirOnPath(win32.join(k.home, ".local", "bin"), k.path)) {
|
|
11296
|
+
commands.push(
|
|
11297
|
+
`$bin = "$env:USERPROFILE\\.local\\bin"`,
|
|
11298
|
+
`$p = [Environment]::GetEnvironmentVariable('PATH', 'User')`,
|
|
11299
|
+
`[Environment]::SetEnvironmentVariable('PATH', "$p;$bin", 'User')`,
|
|
11300
|
+
`$env:PATH += ";$bin"`
|
|
11301
|
+
);
|
|
11302
|
+
}
|
|
11303
|
+
commands.push("claude auth login");
|
|
11304
|
+
return {
|
|
11305
|
+
title: "Set up Claude Code",
|
|
11306
|
+
lines: [
|
|
11307
|
+
"Run these lines in PowerShell. The last one opens your browser",
|
|
11308
|
+
"to sign in with your Claude account.",
|
|
11309
|
+
"",
|
|
11310
|
+
...commands.map(indent),
|
|
11311
|
+
"",
|
|
11312
|
+
SETUP_AGAIN
|
|
11313
|
+
]
|
|
11314
|
+
};
|
|
11315
|
+
}
|
|
11316
|
+
if (runtime === "codex") {
|
|
11317
|
+
return {
|
|
11318
|
+
title: "Set up Codex",
|
|
11319
|
+
lines: [
|
|
11320
|
+
"Run these lines here. The last one opens your browser",
|
|
11321
|
+
"to sign in with your ChatGPT account.",
|
|
11322
|
+
"",
|
|
11323
|
+
indent("npm i -g @openai/codex"),
|
|
11324
|
+
indent("codex login"),
|
|
11325
|
+
"",
|
|
11326
|
+
SETUP_AGAIN
|
|
11327
|
+
]
|
|
11328
|
+
};
|
|
11329
|
+
}
|
|
11330
|
+
return {
|
|
11331
|
+
title: "Set up OpenCode",
|
|
11332
|
+
lines: [
|
|
11333
|
+
"Run the first line here. Then open a second terminal",
|
|
11334
|
+
"window, run the last line there, and leave that window open.",
|
|
11335
|
+
"",
|
|
11336
|
+
indent("npm i -g opencode-ai"),
|
|
11337
|
+
indent("opencode serve --port 4096"),
|
|
11338
|
+
"",
|
|
11339
|
+
`Then ${cabane("status")} shows it signed in; nothing else to run.`
|
|
11340
|
+
]
|
|
11341
|
+
};
|
|
11342
|
+
}
|
|
11343
|
+
function windowsDirOnPath(dir2, path) {
|
|
11344
|
+
const norm = (entry) => entry.replace(/[\\/]+$/, "").toLowerCase();
|
|
11345
|
+
return (path ?? "").split(";").some((entry) => norm(entry) === norm(dir2));
|
|
11346
|
+
}
|
|
11290
11347
|
function indent(line) {
|
|
11291
11348
|
return ` ${line}`;
|
|
11292
11349
|
}
|
package/dist/runtime.js
CHANGED
|
@@ -8875,7 +8875,7 @@ function checkReason(check) {
|
|
|
8875
8875
|
|
|
8876
8876
|
// src/harness-copy.ts
|
|
8877
8877
|
import { homedir as homedir8 } from "os";
|
|
8878
|
-
import { join as join21 } from "path";
|
|
8878
|
+
import { join as join21, win32 } from "path";
|
|
8879
8879
|
var HARNESS_LABELS = {
|
|
8880
8880
|
"claude-code": "Claude Code",
|
|
8881
8881
|
codex: "Codex",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/companion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.207",
|
|
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",
|