@cabane/companion 0.6.3 → 0.6.5
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/README.md +1 -1
- package/dist/cli.js +10 -4
- package/dist/pairing-config.js +2 -2
- package/dist/runtime.js +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cli.js
CHANGED
|
@@ -900,7 +900,7 @@ async function postJson(baseUrl, path3, body) {
|
|
|
900
900
|
if (res.status >= 400) {
|
|
901
901
|
if (res.status === 404 && path3.endsWith("/code")) {
|
|
902
902
|
throw new CompanionError(
|
|
903
|
-
`
|
|
903
|
+
`no device-flow pairing endpoint at ${baseUrl}. Either that server predates \`cabane-companion pair\`, or it isn't a Cabane API origin \u2014 the hosted app is https://app.cabane.ai (pass \`--server <url>\` for your own instance).`
|
|
904
904
|
);
|
|
905
905
|
}
|
|
906
906
|
const msg = parsed && typeof parsed === "object" && "error" in parsed ? String(parsed.error) : `${res.status}`;
|
|
@@ -959,7 +959,7 @@ async function runDeviceFlow(baseUrl, print, opts = {}) {
|
|
|
959
959
|
}
|
|
960
960
|
|
|
961
961
|
// src/pairing-config.ts
|
|
962
|
-
var DEFAULT_BASE_URL = "https://cabane.ai";
|
|
962
|
+
var DEFAULT_BASE_URL = "https://app.cabane.ai";
|
|
963
963
|
function resolvePairBaseUrl(server) {
|
|
964
964
|
const raw = (server ?? process.env.CABANE_BASE_URL ?? DEFAULT_BASE_URL).trim();
|
|
965
965
|
if (!isAllowedBaseUrl(raw)) {
|
|
@@ -4980,6 +4980,7 @@ function buildConfig(req) {
|
|
|
4980
4980
|
}
|
|
4981
4981
|
const policy = codexToolPolicy(req.policy);
|
|
4982
4982
|
const tmpDir = req.local.env?.TMPDIR;
|
|
4983
|
+
const gateLockDir = req.local.env?.CABANE_GATE_LOCK_DIR;
|
|
4983
4984
|
return {
|
|
4984
4985
|
mcp_servers,
|
|
4985
4986
|
experimental_use_rmcp_client: true,
|
|
@@ -4997,7 +4998,9 @@ function buildConfig(req) {
|
|
|
4997
4998
|
[policy.permissionProfile]: {
|
|
4998
4999
|
filesystem: {
|
|
4999
5000
|
":root": "read",
|
|
5000
|
-
":workspace_roots": { ".": "write", ".git": "write" }
|
|
5001
|
+
":workspace_roots": { ".": "write", ".git": "write" },
|
|
5002
|
+
// The one absolute-path grant — see the CT612-fallout note above.
|
|
5003
|
+
...gateLockDir ? { [gateLockDir]: "write" } : {}
|
|
5001
5004
|
},
|
|
5002
5005
|
network: { enabled: policy.networkAccessEnabled, mode: "full" }
|
|
5003
5006
|
}
|
|
@@ -7254,6 +7257,9 @@ ${reason}`,
|
|
|
7254
7257
|
);
|
|
7255
7258
|
}
|
|
7256
7259
|
}
|
|
7260
|
+
if (turnContext.runtime === "codex" && process.env.CABANE_GATE_LOCK_DIR) {
|
|
7261
|
+
turnEnv = { ...turnEnv, CABANE_GATE_LOCK_DIR: process.env.CABANE_GATE_LOCK_DIR };
|
|
7262
|
+
}
|
|
7257
7263
|
const key = runKey(payload.conversationId, payload.agentId);
|
|
7258
7264
|
const abortController = new AbortController();
|
|
7259
7265
|
this.aborts.set(key, abortController);
|
|
@@ -9815,7 +9821,7 @@ program.name("cabane-companion").description(
|
|
|
9815
9821
|
).version(COMPANION_VERSION);
|
|
9816
9822
|
program.command("pair").description(
|
|
9817
9823
|
"pair this device with cabane \u2014 shows a short code you confirm in Settings \u2192 Devices."
|
|
9818
|
-
).allowExcessArguments(false).option("--server <url>", "the cabane instance to pair with (default https://cabane.ai)").action(async (opts) => {
|
|
9824
|
+
).allowExcessArguments(false).option("--server <url>", "the cabane instance to pair with (default https://app.cabane.ai)").action(async (opts) => {
|
|
9819
9825
|
await pair({
|
|
9820
9826
|
...opts.server !== void 0 ? { server: opts.server } : {}
|
|
9821
9827
|
});
|
package/dist/pairing-config.js
CHANGED
|
@@ -292,7 +292,7 @@ async function postJson(baseUrl, path, body) {
|
|
|
292
292
|
if (res.status >= 400) {
|
|
293
293
|
if (res.status === 404 && path.endsWith("/code")) {
|
|
294
294
|
throw new CompanionError(
|
|
295
|
-
`
|
|
295
|
+
`no device-flow pairing endpoint at ${baseUrl}. Either that server predates \`cabane-companion pair\`, or it isn't a Cabane API origin \u2014 the hosted app is https://app.cabane.ai (pass \`--server <url>\` for your own instance).`
|
|
296
296
|
);
|
|
297
297
|
}
|
|
298
298
|
const msg = parsed && typeof parsed === "object" && "error" in parsed ? String(parsed.error) : `${res.status}`;
|
|
@@ -351,7 +351,7 @@ async function runDeviceFlow(baseUrl, print, opts = {}) {
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
// src/pairing-config.ts
|
|
354
|
-
var DEFAULT_BASE_URL = "https://cabane.ai";
|
|
354
|
+
var DEFAULT_BASE_URL = "https://app.cabane.ai";
|
|
355
355
|
function resolvePairBaseUrl(server) {
|
|
356
356
|
const raw = (server ?? process.env.CABANE_BASE_URL ?? DEFAULT_BASE_URL).trim();
|
|
357
357
|
if (!isAllowedBaseUrl(raw)) {
|
package/dist/runtime.js
CHANGED
|
@@ -4633,6 +4633,7 @@ function buildConfig(req) {
|
|
|
4633
4633
|
}
|
|
4634
4634
|
const policy = codexToolPolicy(req.policy);
|
|
4635
4635
|
const tmpDir = req.local.env?.TMPDIR;
|
|
4636
|
+
const gateLockDir = req.local.env?.CABANE_GATE_LOCK_DIR;
|
|
4636
4637
|
return {
|
|
4637
4638
|
mcp_servers,
|
|
4638
4639
|
experimental_use_rmcp_client: true,
|
|
@@ -4650,7 +4651,9 @@ function buildConfig(req) {
|
|
|
4650
4651
|
[policy.permissionProfile]: {
|
|
4651
4652
|
filesystem: {
|
|
4652
4653
|
":root": "read",
|
|
4653
|
-
":workspace_roots": { ".": "write", ".git": "write" }
|
|
4654
|
+
":workspace_roots": { ".": "write", ".git": "write" },
|
|
4655
|
+
// The one absolute-path grant — see the CT612-fallout note above.
|
|
4656
|
+
...gateLockDir ? { [gateLockDir]: "write" } : {}
|
|
4654
4657
|
},
|
|
4655
4658
|
network: { enabled: policy.networkAccessEnabled, mode: "full" }
|
|
4656
4659
|
}
|
|
@@ -6907,6 +6910,9 @@ ${reason}`,
|
|
|
6907
6910
|
);
|
|
6908
6911
|
}
|
|
6909
6912
|
}
|
|
6913
|
+
if (turnContext.runtime === "codex" && process.env.CABANE_GATE_LOCK_DIR) {
|
|
6914
|
+
turnEnv = { ...turnEnv, CABANE_GATE_LOCK_DIR: process.env.CABANE_GATE_LOCK_DIR };
|
|
6915
|
+
}
|
|
6910
6916
|
const key = runKey(payload.conversationId, payload.agentId);
|
|
6911
6917
|
const abortController = new AbortController();
|
|
6912
6918
|
this.aborts.set(key, abortController);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/companion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
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",
|