@cabane/companion 0.6.44 → 0.6.46
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 +8 -7
- package/dist/runtime.js +8 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6678,7 +6678,6 @@ var SUMMON_AGENT_TOOL = "summon_agent";
|
|
|
6678
6678
|
var SUMMON_AGENT_TOOL_NAME = `mcp__${COMPANION_LOCAL_MCP_SERVER}__${SUMMON_AGENT_TOOL}`;
|
|
6679
6679
|
var COMPANION_LOCAL_TOOL_GLOB = `mcp__${COMPANION_LOCAL_MCP_SERVER}__*`;
|
|
6680
6680
|
var SKIP_TURN_TOOL = "skip_turn";
|
|
6681
|
-
var SKIP_TURN_TOOL_NAME = `mcp__${COMPANION_LOCAL_MCP_SERVER}__${SKIP_TURN_TOOL}`;
|
|
6682
6681
|
var ASK_TOOL = "ask";
|
|
6683
6682
|
var ASK_TOOL_NAME = `mcp__${COMPANION_LOCAL_MCP_SERVER}__${ASK_TOOL}`;
|
|
6684
6683
|
var SUB_AGENT_TOOL = "sub_agent";
|
|
@@ -8828,11 +8827,7 @@ var mcpSseServerSchema = z15.object({
|
|
|
8828
8827
|
url: z15.string().url(),
|
|
8829
8828
|
headers: z15.record(z15.string(), z15.string()).optional()
|
|
8830
8829
|
});
|
|
8831
|
-
var mcpServerDefSchema = z15.union([
|
|
8832
|
-
mcpHttpServerSchema,
|
|
8833
|
-
mcpSseServerSchema,
|
|
8834
|
-
mcpStdioServerSchema
|
|
8835
|
-
]);
|
|
8830
|
+
var mcpServerDefSchema = z15.union([mcpHttpServerSchema, mcpSseServerSchema, mcpStdioServerSchema]);
|
|
8836
8831
|
var thinkingConfigSchema = z15.discriminatedUnion("type", [
|
|
8837
8832
|
z15.object({ type: z15.literal("adaptive") }),
|
|
8838
8833
|
z15.object({ type: z15.literal("enabled"), budgetTokens: z15.number().int().positive().optional() }),
|
|
@@ -9009,6 +9004,7 @@ var CompanionSupervisor = class {
|
|
|
9009
9004
|
// NOT the cached beat signal — someone connecting right after installing Claude
|
|
9010
9005
|
// Code shouldn't be refused by a snapshot up to a heartbeat old.
|
|
9011
9006
|
probeClaudePresence;
|
|
9007
|
+
probeCodexPresence;
|
|
9012
9008
|
exitFn;
|
|
9013
9009
|
reexecFn;
|
|
9014
9010
|
dispatcherFactory;
|
|
@@ -9041,6 +9037,7 @@ var CompanionSupervisor = class {
|
|
|
9041
9037
|
this.hub = opts.hub;
|
|
9042
9038
|
this.claudeCode = opts.claudeCode ?? true;
|
|
9043
9039
|
this.probeClaudePresence = opts.probeClaudePresence ?? claudeOnPath;
|
|
9040
|
+
this.probeCodexPresence = opts.probeCodexPresence ?? codexOnPath;
|
|
9044
9041
|
this.harnessVersions = opts.harnessVersions ?? emptyHarnessVersions();
|
|
9045
9042
|
this.exitFn = opts.exit ?? ((code) => process.exit(code));
|
|
9046
9043
|
this.reexecFn = opts.reexec ?? defaultReexec;
|
|
@@ -9788,7 +9785,8 @@ var CompanionSupervisor = class {
|
|
|
9788
9785
|
// - claude-code (CT1082): set `claudeCode.enabled`, after checking `claude` is
|
|
9789
9786
|
// on PATH. This is the callable the terminal offer ("We found Claude Code.
|
|
9790
9787
|
// Connect it? [Y/n]") and the web pairing flow both wire to.
|
|
9791
|
-
// - codex: set `codex.enabled`
|
|
9788
|
+
// - codex: set `codex.enabled` after checking `codex` is on PATH (the CLI +
|
|
9789
|
+
// `codex login` remain the user's).
|
|
9792
9790
|
// - opencode: set `opencode.serverUrl` — but ONLY after health-probing the URL,
|
|
9793
9791
|
// so we never advertise a serve that isn't there. An unreachable URL is a
|
|
9794
9792
|
// typed failure the UI shows in place, not a silent bad write.
|
|
@@ -9806,6 +9804,9 @@ var CompanionSupervisor = class {
|
|
|
9806
9804
|
}
|
|
9807
9805
|
next = { ...this.config, claudeCode: { enabled: true } };
|
|
9808
9806
|
} else if (input.runtime === "codex") {
|
|
9807
|
+
if (!await this.probeCodexPresence()) {
|
|
9808
|
+
return { ok: false, error: absentLine("codex") };
|
|
9809
|
+
}
|
|
9809
9810
|
next = { ...this.config, codex: { enabled: true } };
|
|
9810
9811
|
} else {
|
|
9811
9812
|
const serverUrl = input.serverUrl.trim();
|
package/dist/runtime.js
CHANGED
|
@@ -6187,7 +6187,6 @@ var SUMMON_AGENT_TOOL = "summon_agent";
|
|
|
6187
6187
|
var SUMMON_AGENT_TOOL_NAME = `mcp__${COMPANION_LOCAL_MCP_SERVER}__${SUMMON_AGENT_TOOL}`;
|
|
6188
6188
|
var COMPANION_LOCAL_TOOL_GLOB = `mcp__${COMPANION_LOCAL_MCP_SERVER}__*`;
|
|
6189
6189
|
var SKIP_TURN_TOOL = "skip_turn";
|
|
6190
|
-
var SKIP_TURN_TOOL_NAME = `mcp__${COMPANION_LOCAL_MCP_SERVER}__${SKIP_TURN_TOOL}`;
|
|
6191
6190
|
var ASK_TOOL = "ask";
|
|
6192
6191
|
var ASK_TOOL_NAME = `mcp__${COMPANION_LOCAL_MCP_SERVER}__${ASK_TOOL}`;
|
|
6193
6192
|
var SUB_AGENT_TOOL = "sub_agent";
|
|
@@ -8337,11 +8336,7 @@ var mcpSseServerSchema = z15.object({
|
|
|
8337
8336
|
url: z15.string().url(),
|
|
8338
8337
|
headers: z15.record(z15.string(), z15.string()).optional()
|
|
8339
8338
|
});
|
|
8340
|
-
var mcpServerDefSchema = z15.union([
|
|
8341
|
-
mcpHttpServerSchema,
|
|
8342
|
-
mcpSseServerSchema,
|
|
8343
|
-
mcpStdioServerSchema
|
|
8344
|
-
]);
|
|
8339
|
+
var mcpServerDefSchema = z15.union([mcpHttpServerSchema, mcpSseServerSchema, mcpStdioServerSchema]);
|
|
8345
8340
|
var thinkingConfigSchema = z15.discriminatedUnion("type", [
|
|
8346
8341
|
z15.object({ type: z15.literal("adaptive") }),
|
|
8347
8342
|
z15.object({ type: z15.literal("enabled"), budgetTokens: z15.number().int().positive().optional() }),
|
|
@@ -8518,6 +8513,7 @@ var CompanionSupervisor = class {
|
|
|
8518
8513
|
// NOT the cached beat signal — someone connecting right after installing Claude
|
|
8519
8514
|
// Code shouldn't be refused by a snapshot up to a heartbeat old.
|
|
8520
8515
|
probeClaudePresence;
|
|
8516
|
+
probeCodexPresence;
|
|
8521
8517
|
exitFn;
|
|
8522
8518
|
reexecFn;
|
|
8523
8519
|
dispatcherFactory;
|
|
@@ -8550,6 +8546,7 @@ var CompanionSupervisor = class {
|
|
|
8550
8546
|
this.hub = opts.hub;
|
|
8551
8547
|
this.claudeCode = opts.claudeCode ?? true;
|
|
8552
8548
|
this.probeClaudePresence = opts.probeClaudePresence ?? claudeOnPath;
|
|
8549
|
+
this.probeCodexPresence = opts.probeCodexPresence ?? codexOnPath;
|
|
8553
8550
|
this.harnessVersions = opts.harnessVersions ?? emptyHarnessVersions();
|
|
8554
8551
|
this.exitFn = opts.exit ?? ((code) => process.exit(code));
|
|
8555
8552
|
this.reexecFn = opts.reexec ?? defaultReexec;
|
|
@@ -9297,7 +9294,8 @@ var CompanionSupervisor = class {
|
|
|
9297
9294
|
// - claude-code (CT1082): set `claudeCode.enabled`, after checking `claude` is
|
|
9298
9295
|
// on PATH. This is the callable the terminal offer ("We found Claude Code.
|
|
9299
9296
|
// Connect it? [Y/n]") and the web pairing flow both wire to.
|
|
9300
|
-
// - codex: set `codex.enabled`
|
|
9297
|
+
// - codex: set `codex.enabled` after checking `codex` is on PATH (the CLI +
|
|
9298
|
+
// `codex login` remain the user's).
|
|
9301
9299
|
// - opencode: set `opencode.serverUrl` — but ONLY after health-probing the URL,
|
|
9302
9300
|
// so we never advertise a serve that isn't there. An unreachable URL is a
|
|
9303
9301
|
// typed failure the UI shows in place, not a silent bad write.
|
|
@@ -9315,6 +9313,9 @@ var CompanionSupervisor = class {
|
|
|
9315
9313
|
}
|
|
9316
9314
|
next = { ...this.config, claudeCode: { enabled: true } };
|
|
9317
9315
|
} else if (input.runtime === "codex") {
|
|
9316
|
+
if (!await this.probeCodexPresence()) {
|
|
9317
|
+
return { ok: false, error: absentLine("codex") };
|
|
9318
|
+
}
|
|
9318
9319
|
next = { ...this.config, codex: { enabled: true } };
|
|
9319
9320
|
} else {
|
|
9320
9321
|
const serverUrl = input.serverUrl.trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/companion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.46",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Cabane Companion (headless): connect a coding 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",
|