@yemi33/minions 0.1.2420 → 0.1.2422

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.
@@ -595,6 +595,21 @@ async function openSettings() {
595
595
  'Permission bypass is runtime-owned: Claude agents use <code>--dangerously-skip-permissions</code>; Copilot agents use <code>--autopilot --allow-all --no-ask-user</code>. There is no dashboard permission-mode setting.' +
596
596
  '</div>';
597
597
 
598
+ const paneCodex =
599
+ '<h3>Codex Tuning</h3>' +
600
+ '<div class="settings-pane-sub">Command Center and doc-chat need broader host access than dispatched agents. This setting only affects Codex-backed CC calls.</div>' +
601
+ '<div class="settings-grid-2">' +
602
+ '<div data-search="codex command center doc chat sandbox danger full access workspace write read only">' +
603
+ '<label style="font-size:var(--text-sm);color:var(--muted);display:block;margin-bottom:2px">CC sandbox</label>' +
604
+ '<select id="set-codexCcSandbox" style="width:100%;padding:4px 6px;background:var(--surface);border:1px solid var(--border);border-radius:4px;color:var(--text);font-size:var(--text-md)">' +
605
+ '<option value="danger-full-access"' + ((e.codexCcSandbox || 'danger-full-access') === 'danger-full-access' ? ' selected' : '') + '>danger-full-access (default)</option>' +
606
+ '<option value="workspace-write"' + (e.codexCcSandbox === 'workspace-write' ? ' selected' : '') + '>workspace-write</option>' +
607
+ '<option value="read-only"' + (e.codexCcSandbox === 'read-only' ? ' selected' : '') + '>read-only</option>' +
608
+ '</select>' +
609
+ '<div style="font-size:var(--text-xs);color:var(--muted);margin-top:4px"><strong>Security:</strong> <code>danger-full-access</code> lets Codex CC reach localhost Minions APIs and operator-authorized paths outside <code>~/.minions</code>. Dispatched Codex agents and non-CC calls remain <code>workspace-write</code>. The adapter emits an explicit <code>--sandbox</code> CLI flag, which takes precedence over Codex config-file values.</div>' +
610
+ '</div>' +
611
+ '</div>';
612
+
598
613
  const paneHarness =
599
614
  '<h3>Native Runtime Integration</h3>' +
600
615
  '<div class="settings-pane-sub">Repository instructions, skills, commands, and MCPs are discovered by the selected CLI in the dispatched checkout. Minions does not inject or suppress them.</div>' +
@@ -735,6 +750,7 @@ async function openSettings() {
735
750
  { id: 'features', label: 'Feature Flags', html: paneFeatures },
736
751
  { id: 'copilot', label: 'Copilot Tuning', html: paneCopilot, group: 'advanced' },
737
752
  { id: 'claude', label: 'Claude Tuning', html: paneClaude, group: 'advanced' },
753
+ { id: 'codex', label: 'Codex Tuning', html: paneCodex, group: 'advanced' },
738
754
  { id: 'budget', label: 'Budget', html: paneBudget, group: 'advanced' },
739
755
  { id: 'advanced', label: 'Advanced', html: paneAdvanced, group: 'advanced' },
740
756
  ];
@@ -1536,6 +1552,7 @@ async function saveSettings() {
1536
1552
  ccCli: (document.getElementById('set-ccCli')?.value ?? '').trim(),
1537
1553
  ccModel: (document.getElementById('set-ccModel')?.value ?? '').trim(),
1538
1554
  ccEffort: document.getElementById('set-ccEffort').value || null,
1555
+ codexCcSandbox: document.getElementById('set-codexCcSandbox')?.value || 'danger-full-access',
1539
1556
  ccTurnTimeoutMs: document.getElementById('set-ccTurnTimeoutMs')?.value,
1540
1557
  // Settings UI presents the idle timeout in minutes for readability; the
1541
1558
  // engine stores ms (ENGINE_DEFAULTS.ccWorkerIdleTimeoutMs). Convert here;
package/dashboard.js CHANGED
@@ -5072,7 +5072,7 @@ async function ccCall(message, { store = 'cc', sessionKey, extraContext, label =
5072
5072
  outOfBandOnly: !resumeNeedsCarryover,
5073
5073
  }), '', {
5074
5074
  timeout, label, model, maxTurns, allowedTools, sessionId, effort: ccEffort, direct: true,
5075
- engineConfig: CONFIG.engine, images,
5075
+ engineConfig: CONFIG.engine, invocationScope: 'cc', images,
5076
5076
  });
5077
5077
  if (onAbortReady) onAbortReady(p1.abort);
5078
5078
  result = await p1;
@@ -5110,7 +5110,7 @@ async function ccCall(message, { store = 'cc', sessionKey, extraContext, label =
5110
5110
  const freshPrompt = buildPrompt({ includeCarryover: freshNeedsCarryover });
5111
5111
  const p2 = llm.callLLM(freshPrompt, systemPrompt, {
5112
5112
  timeout, label, model, maxTurns, allowedTools, effort: ccEffort, direct: true,
5113
- engineConfig: CONFIG.engine, images,
5113
+ engineConfig: CONFIG.engine, invocationScope: 'cc', images,
5114
5114
  });
5115
5115
  if (onAbortReady) onAbortReady(p2.abort);
5116
5116
  result = await p2;
@@ -5128,7 +5128,7 @@ async function ccCall(message, { store = 'cc', sessionKey, extraContext, label =
5128
5128
  await new Promise(r => setTimeout(r, 2000));
5129
5129
  const p3 = llm.callLLM(freshPrompt, systemPrompt, {
5130
5130
  timeout, label, model, maxTurns, allowedTools, effort: ccEffort, direct: true,
5131
- engineConfig: CONFIG.engine, images,
5131
+ engineConfig: CONFIG.engine, invocationScope: 'cc', images,
5132
5132
  });
5133
5133
  if (onAbortReady) onAbortReady(p3.abort);
5134
5134
  result = await p3;
@@ -5220,7 +5220,7 @@ async function ccCallStreaming(message, { store = 'cc', sessionKey, extraContext
5220
5220
  outOfBandOnly: !resumeNeedsCarryover,
5221
5221
  }), '', {
5222
5222
  timeout, label, model, maxTurns, allowedTools, sessionId, effort: ccEffort, direct: true,
5223
- engineConfig: CONFIG.engine,
5223
+ engineConfig: CONFIG.engine, invocationScope: 'cc',
5224
5224
  onChunk,
5225
5225
  onToolUse,
5226
5226
  onToolUpdate,
@@ -5259,7 +5259,7 @@ async function ccCallStreaming(message, { store = 'cc', sessionKey, extraContext
5259
5259
  const freshPrompt = buildPrompt({ includeCarryover: freshNeedsCarryover });
5260
5260
  const p2 = llm.callLLMStreaming(freshPrompt, systemPrompt, {
5261
5261
  timeout, label, model, maxTurns, allowedTools, effort: ccEffort, direct: true,
5262
- engineConfig: CONFIG.engine,
5262
+ engineConfig: CONFIG.engine, invocationScope: 'cc',
5263
5263
  onChunk,
5264
5264
  onToolUse,
5265
5265
  onToolUpdate,
@@ -5280,7 +5280,7 @@ async function ccCallStreaming(message, { store = 'cc', sessionKey, extraContext
5280
5280
  if (onRetry) onRetry(3);
5281
5281
  const p3 = llm.callLLMStreaming(freshPrompt, systemPrompt, {
5282
5282
  timeout, label, model, maxTurns, allowedTools, effort: ccEffort, direct: true,
5283
- engineConfig: CONFIG.engine,
5283
+ engineConfig: CONFIG.engine, invocationScope: 'cc',
5284
5284
  onChunk,
5285
5285
  onToolUse,
5286
5286
  onToolUpdate,
@@ -9895,7 +9895,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
9895
9895
  label, model, maxTurns,
9896
9896
  allowedTools: 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch',
9897
9897
  effort, direct: true,
9898
- engineConfig: CONFIG.engine,
9898
+ engineConfig: CONFIG.engine, invocationScope: 'cc',
9899
9899
  });
9900
9900
  llm.trackEngineUsage(label, result.usage);
9901
9901
 
@@ -9985,7 +9985,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
9985
9985
  timeout: CC_CALL_TIMEOUT_MS, label: 'command-center', model, maxTurns,
9986
9986
  allowedTools: 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch',
9987
9987
  sessionId: directSessionId, effort, direct: true,
9988
- engineConfig, images,
9988
+ engineConfig, images, invocationScope: 'cc',
9989
9989
  onProgress: () => _touchCcLiveStream(liveState),
9990
9990
  onChunk: (text, segmentId) => {
9991
9991
  if (liveState.statusMessage) {
@@ -11406,6 +11406,10 @@ What would you like to discuss or change? When you're happy, say "approve" and I
11406
11406
  else if (valid.includes(e.copilotStreamMode)) _setEngineConfig('copilotStreamMode', e.copilotStreamMode);
11407
11407
  else _clamped.push(`copilotStreamMode: "${e.copilotStreamMode}" not in [on, off] (kept previous value)`);
11408
11408
  }
11409
+ if (e.codexCcSandbox !== undefined) {
11410
+ if (_isClear(e.codexCcSandbox)) _deleteEngineConfig('codexCcSandbox');
11411
+ else _setEngineConfig('codexCcSandbox', shared.validateCodexSandbox(e.codexCcSandbox));
11412
+ }
11409
11413
  // W-mpmwxkrw000872ec — fontSize allowlist. Clamps invalid values
11410
11414
  // (rather than silently failing) so the dashboard bootstrap never
11411
11415
  // ends up with an unknown data-font-size attribute.
@@ -6,6 +6,24 @@ CC is intentionally a thin wrapper around the runtime CLI: state changes happen
6
6
 
7
7
  For canonical detail (system prompt, session lifecycle, turn-ID surfacing pipeline, doc-chat integration, and CC API contract), read [`CLAUDE.md`](../CLAUDE.md) — see the **CC API Contract** and **Sessions** sections — and the source in [`dashboard/js/command-center.js`](../dashboard/js/command-center.js), [`dashboard.js`](../dashboard.js) (`handleCommandCenter`), and [`prompts/cc-system.md`](../prompts/cc-system.md).
8
8
 
9
+ ## Codex sandbox policy
10
+
11
+ Codex-backed Command Center and doc-chat calls default to
12
+ `engine.codexCcSandbox: "danger-full-access"`. This elevated interactive policy
13
+ lets CC reach the dashboard's localhost APIs and operator-authorized paths
14
+ outside `~/.minions`; it does not grant blanket permission for unsolicited
15
+ writes, which remain governed by the CC system prompt and the
16
+ [operator-checkout write authority](#operator-checkout-write-authority-interactive-turns)
17
+ rules below.
18
+
19
+ The setting accepts `read-only`, `workspace-write`, or `danger-full-access` and
20
+ is available under **Settings → Advanced → Codex Tuning**. It is scoped by the
21
+ runtime invocation, not by the selected model: dispatched Codex agents and
22
+ non-CC direct calls still default to `workspace-write`, while Claude and Copilot
23
+ arguments are unchanged. The Codex adapter emits an explicit `--sandbox` flag;
24
+ an explicit invocation-level sandbox takes precedence over this engine default
25
+ and the CLI flag intentionally wins over Codex config-file values.
26
+
9
27
  ## Error surfacing contract (W-mpmwxni2000c25c7-d)
10
28
 
11
29
  Both CC and Doc-Chat emit a typed error envelope so the dashboard can render a red `.cc-error` bubble (role=alert) with a Retry button and stop the spinner immediately. Errors arrive in two shapes: