@cabane/companion 0.6.47 → 0.6.48
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 +11 -5
- package/dist/runtime.js +11 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -149,6 +149,7 @@ var runPrepareHook = (hook, input) => {
|
|
|
149
149
|
CABANE_AGENT_ID: input.agentId,
|
|
150
150
|
CABANE_AGENT_USERNAME: input.agentUsername,
|
|
151
151
|
CABANE_RUNTIME: input.runtime ?? "",
|
|
152
|
+
CABANE_HOST_ACCESS: input.hostAccess ? "1" : "0",
|
|
152
153
|
// CT319: the conversation anchor is gone. These are kept as DEPRECATED
|
|
153
154
|
// back-compat constants so an old user prepare script that still reads
|
|
154
155
|
// them doesn't crash; a hook should key off CABANE_TRIGGER_ENTRY_PATHS.
|
|
@@ -5777,7 +5778,8 @@ var ENV_ENVELOPE_KEYS = [
|
|
|
5777
5778
|
"CABANE_PLAYGROUND_BIN",
|
|
5778
5779
|
"CABANE_CONVERSATION_ID",
|
|
5779
5780
|
"CABANE_AGENT_ID",
|
|
5780
|
-
"CABANE_CONVERSATION_TITLE"
|
|
5781
|
+
"CABANE_CONVERSATION_TITLE",
|
|
5782
|
+
"CABANE_HOST_ACCESS"
|
|
5781
5783
|
];
|
|
5782
5784
|
function buildRunSpec2(req, resumeThreadId, instructionsFile = null, threadPromptFingerprint = null) {
|
|
5783
5785
|
const { policy, config } = req;
|
|
@@ -7861,6 +7863,7 @@ var Dispatcher = class {
|
|
|
7861
7863
|
agentId: payload.agentId,
|
|
7862
7864
|
agentUsername: this.opts.agentUsername,
|
|
7863
7865
|
runtime: turnContext.runtime,
|
|
7866
|
+
hostAccess: turnContext.policy.hostFs,
|
|
7864
7867
|
triggerEntryPaths: turnContext.conversation.triggerEntryPaths ?? [],
|
|
7865
7868
|
title: turnContext.conversation.title,
|
|
7866
7869
|
messageBody: message.body,
|
|
@@ -7922,6 +7925,7 @@ ${reason}`,
|
|
|
7922
7925
|
agentId: payload.agentId,
|
|
7923
7926
|
agentUsername: this.opts.agentUsername,
|
|
7924
7927
|
runtime: turnContext.runtime,
|
|
7928
|
+
hostAccess: turnContext.policy.hostFs,
|
|
7925
7929
|
// CT317/CT319: the trigger message's referenced-entry paths — what the
|
|
7926
7930
|
// tasker prepare hook keys its per-task env off. Defaults to `[]` for
|
|
7927
7931
|
// an older API. The conversation anchor is gone (CT319).
|
|
@@ -7965,7 +7969,10 @@ ${reason}`,
|
|
|
7965
7969
|
}
|
|
7966
7970
|
}
|
|
7967
7971
|
}
|
|
7968
|
-
const turnEnv =
|
|
7972
|
+
const turnEnv = {
|
|
7973
|
+
...hookEnv,
|
|
7974
|
+
CABANE_HOST_ACCESS: turnContext.policy.hostFs ? "1" : "0"
|
|
7975
|
+
};
|
|
7969
7976
|
const key = runKey(payload.conversationId, payload.agentId);
|
|
7970
7977
|
const abortController = new AbortController();
|
|
7971
7978
|
this.aborts.set(key, abortController);
|
|
@@ -8028,9 +8035,8 @@ ${reason}`,
|
|
|
8028
8035
|
...turnContext.turnToken ? { turnToken: turnContext.turnToken } : {},
|
|
8029
8036
|
// SJ524: the hook-resolved cwd overrides the static local cwd.
|
|
8030
8037
|
...effectiveCwd ? { cwd: effectiveCwd } : {},
|
|
8031
|
-
//
|
|
8032
|
-
|
|
8033
|
-
...turnEnv ? { env: turnEnv } : {},
|
|
8038
|
+
// CT1103: the prepare-hook env plus the authoritative host-access token.
|
|
8039
|
+
env: turnEnv,
|
|
8034
8040
|
mcpServers: resolvedMcpServers,
|
|
8035
8041
|
summonServer,
|
|
8036
8042
|
// CT238: this turn's conversation, forwarded as the active-conversation
|
package/dist/runtime.js
CHANGED
|
@@ -141,6 +141,7 @@ var runPrepareHook = (hook, input) => {
|
|
|
141
141
|
CABANE_AGENT_ID: input.agentId,
|
|
142
142
|
CABANE_AGENT_USERNAME: input.agentUsername,
|
|
143
143
|
CABANE_RUNTIME: input.runtime ?? "",
|
|
144
|
+
CABANE_HOST_ACCESS: input.hostAccess ? "1" : "0",
|
|
144
145
|
// CT319: the conversation anchor is gone. These are kept as DEPRECATED
|
|
145
146
|
// back-compat constants so an old user prepare script that still reads
|
|
146
147
|
// them doesn't crash; a hook should key off CABANE_TRIGGER_ENTRY_PATHS.
|
|
@@ -5285,7 +5286,8 @@ var ENV_ENVELOPE_KEYS = [
|
|
|
5285
5286
|
"CABANE_PLAYGROUND_BIN",
|
|
5286
5287
|
"CABANE_CONVERSATION_ID",
|
|
5287
5288
|
"CABANE_AGENT_ID",
|
|
5288
|
-
"CABANE_CONVERSATION_TITLE"
|
|
5289
|
+
"CABANE_CONVERSATION_TITLE",
|
|
5290
|
+
"CABANE_HOST_ACCESS"
|
|
5289
5291
|
];
|
|
5290
5292
|
function buildRunSpec2(req, resumeThreadId, instructionsFile = null, threadPromptFingerprint = null) {
|
|
5291
5293
|
const { policy, config } = req;
|
|
@@ -7369,6 +7371,7 @@ var Dispatcher = class {
|
|
|
7369
7371
|
agentId: payload.agentId,
|
|
7370
7372
|
agentUsername: this.opts.agentUsername,
|
|
7371
7373
|
runtime: turnContext.runtime,
|
|
7374
|
+
hostAccess: turnContext.policy.hostFs,
|
|
7372
7375
|
triggerEntryPaths: turnContext.conversation.triggerEntryPaths ?? [],
|
|
7373
7376
|
title: turnContext.conversation.title,
|
|
7374
7377
|
messageBody: message.body,
|
|
@@ -7430,6 +7433,7 @@ ${reason}`,
|
|
|
7430
7433
|
agentId: payload.agentId,
|
|
7431
7434
|
agentUsername: this.opts.agentUsername,
|
|
7432
7435
|
runtime: turnContext.runtime,
|
|
7436
|
+
hostAccess: turnContext.policy.hostFs,
|
|
7433
7437
|
// CT317/CT319: the trigger message's referenced-entry paths — what the
|
|
7434
7438
|
// tasker prepare hook keys its per-task env off. Defaults to `[]` for
|
|
7435
7439
|
// an older API. The conversation anchor is gone (CT319).
|
|
@@ -7473,7 +7477,10 @@ ${reason}`,
|
|
|
7473
7477
|
}
|
|
7474
7478
|
}
|
|
7475
7479
|
}
|
|
7476
|
-
const turnEnv =
|
|
7480
|
+
const turnEnv = {
|
|
7481
|
+
...hookEnv,
|
|
7482
|
+
CABANE_HOST_ACCESS: turnContext.policy.hostFs ? "1" : "0"
|
|
7483
|
+
};
|
|
7477
7484
|
const key = runKey(payload.conversationId, payload.agentId);
|
|
7478
7485
|
const abortController = new AbortController();
|
|
7479
7486
|
this.aborts.set(key, abortController);
|
|
@@ -7536,9 +7543,8 @@ ${reason}`,
|
|
|
7536
7543
|
...turnContext.turnToken ? { turnToken: turnContext.turnToken } : {},
|
|
7537
7544
|
// SJ524: the hook-resolved cwd overrides the static local cwd.
|
|
7538
7545
|
...effectiveCwd ? { cwd: effectiveCwd } : {},
|
|
7539
|
-
//
|
|
7540
|
-
|
|
7541
|
-
...turnEnv ? { env: turnEnv } : {},
|
|
7546
|
+
// CT1103: the prepare-hook env plus the authoritative host-access token.
|
|
7547
|
+
env: turnEnv,
|
|
7542
7548
|
mcpServers: resolvedMcpServers,
|
|
7543
7549
|
summonServer,
|
|
7544
7550
|
// CT238: this turn's conversation, forwarded as the active-conversation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cabane/companion",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.48",
|
|
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",
|