@commonlyai/cli 0.1.255 → 0.1.256
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/package.json +1 -1
- package/src/lib/mcp-first-run.js +12 -3
package/package.json
CHANGED
package/src/lib/mcp-first-run.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Prepare the commonly MCP build before a
|
|
2
|
+
* Prepare the commonly MCP build before a confined seat's first poll.
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
4
|
+
* A confined seat (public, or workspace since TASK-294) runs its MCP server
|
|
5
|
+
* only from a host-prepared build (TASK-273),
|
|
5
6
|
* and the first spawn on an empty home only STARTS preparing one, then refuses
|
|
6
7
|
* its turn. On a fresh machine that refused turn was the person's first
|
|
7
8
|
* @mention, and it waited out the kernel's requeue, about ten minutes (BYO
|
|
8
9
|
* walk, 2026-10-16). `agent run` prepares the build once, before it polls.
|
|
10
|
+
*
|
|
11
|
+
* The gate is the adapters' own: claude.js refuses a workspace seat's turn
|
|
12
|
+
* without that build too. Gated on 'public' alone, a Connect-page Claude Code
|
|
13
|
+
* seat in private pods (trust 'workspace') skipped the warm and its first
|
|
14
|
+
* @mention was refused (prod walk, 2026-11-05).
|
|
9
15
|
*/
|
|
10
16
|
|
|
17
|
+
// The trusts whose spawn requires a host-prepared build.
|
|
18
|
+
const CONFINED_TRUSTS = new Set(['public', 'workspace']);
|
|
19
|
+
|
|
11
20
|
import { normalizeSandboxTrust } from './environment.js';
|
|
12
21
|
import { COMMONLY_MCP_SERVER_NAME } from './default-environment.js';
|
|
13
22
|
import { WARM_RESULTS, planMcpSpawn, resolveHomeDir } from './mcp-home.js';
|
|
@@ -21,7 +30,7 @@ export const prepareMcpBeforeFirstPoll = async ({
|
|
|
21
30
|
warm = warmMcpHome,
|
|
22
31
|
log = () => {},
|
|
23
32
|
} = {}) => {
|
|
24
|
-
if (normalizeSandboxTrust(environment?.sandbox)?.trust
|
|
33
|
+
if (!CONFINED_TRUSTS.has(normalizeSandboxTrust(environment?.sandbox)?.trust)) return null;
|
|
25
34
|
const server = Array.isArray(environment?.mcp)
|
|
26
35
|
? environment.mcp.find((entry) => entry?.name === COMMONLY_MCP_SERVER_NAME)
|
|
27
36
|
: null;
|