@yemi33/minions 0.1.2038 → 0.1.2040

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.
@@ -98,7 +98,7 @@ async function openSettings() {
98
98
  settingsToggle('Allow Temp Agents', 'set-allowTempAgents', !!e.allowTempAgents, 'Spawn ephemeral agents when all permanent agents are busy') +
99
99
  settingsToggle('Auto-archive Plans', 'set-autoArchive', !!e.autoArchive, 'Automatically archive plans after verify completes (off = manual archive via dashboard)') +
100
100
  settingsToggle('Auto-complete PRs', 'set-autoCompletePrs', !!e.autoCompletePrs, 'Auto-merge PRs when builds pass and review is approved (opt-in)') +
101
- settingsToggle('CC Worker Pool', 'set-ccUseWorkerPool', (e.ccUseWorkerPool === undefined ? ((e.ccCli || e.defaultCli) === 'copilot') : !!e.ccUseWorkerPool), 'Route Command Center / doc-chat through a persistent copilot --acp worker per tab instead of spawning a fresh CLI per turn. Default ON for copilot runtime (cold-spawn is ~20s on Windows); default OFF for claude.') +
101
+ settingsToggle('CC Worker Pool', 'set-ccUseWorkerPool', (e.ccUseWorkerPool === undefined ? ((e.ccCli || e.defaultCli) === 'copilot') : !!e.ccUseWorkerPool), 'Route Command Center / doc-chat through a persistent copilot --acp worker per tab instead of spawning a fresh CLI per turn. Copilot-only (Agent Client Protocol transport); Claude does not implement ACP, so this toggle has no effect when CC runtime is Claude. Default ON for copilot (cold-spawn ~20s on Windows); forced OFF for non-copilot CC runtimes regardless of this toggle.') +
102
102
  '</div>' +
103
103
 
104
104
  '<h3 style="font-size:13px;color:var(--blue);margin-bottom:8px">PR Polling &amp; Dispatch Gates</h3>' +
@@ -35,14 +35,23 @@ const FEATURES = {
35
35
  // ccUseWorkerPool — sub-tasks B/C/D of W-mp2w003600196c51 (CC perf).
36
36
  // Routes Command Center / doc-chat through engine/cc-worker-pool.js
37
37
  // (persistent `copilot --acp` per CC tab) instead of spawning a fresh CLI
38
- // per turn. Saves ~14 s of cold-start cost. Copilot-only — the pool drives
39
- // ACP which Claude does not implement.
38
+ // per turn. Saves ~14 s of cold-start cost.
39
+ //
40
+ // **Copilot-only — structural, not just a UX preference.** The pool's
41
+ // transport is Agent Client Protocol (JSON-RPC over stdin/stdout, framed
42
+ // initialize → session/new → session/prompt → session/update). Claude Code
43
+ // has no equivalent `--acp` mode; its only session-reuse path is
44
+ // per-invocation `--resume <id>` against `~/.claude/projects/<dir>/<id>.jsonl`.
45
+ // Honoring this flag on a Claude CC runtime would silently switch the
46
+ // operator's CC turns to copilot — see `shared.resolveCcUseWorkerPool`
47
+ // which now refuses the override when CC runtime is not copilot
48
+ // (W-mphlriic00095f69).
40
49
  //
41
50
  // Resolution: `shared.resolveCcUseWorkerPool(engine)` (engine/shared.js)
42
51
  // is the canonical predicate every dashboard.js call site uses. Explicit
43
- // `engine.ccUseWorkerPool` true/false in config wins; otherwise the helper
44
- // defaults ON for `copilot` and OFF for `claude`. PR #2492 flipped the
45
- // default ON for copilot; see that PR for the cold-spawn measurements.
52
+ // `engine.ccUseWorkerPool` true/false in config wins ONLY when CC runtime
53
+ // is copilot; otherwise the helper forces `false`. PR #2492 flipped the
54
+ // copilot default ON; see that PR for the cold-spawn measurements.
46
55
  //
47
56
  // `requiredCcRuntime: 'copilot'` here is a UX hint — the Settings panel
48
57
  // greys out the toggle when the resolved CC runtime mismatches so users
@@ -58,13 +67,17 @@ const FEATURES = {
58
67
  // ETag/status/bytes/render-duration capture, visibility-transition tracking,
59
68
  // a small "diag" footer chip that opens a table modal, and a "send to engine"
60
69
  // button that POSTs the buffer to /api/diagnostics/refresh for offline triage.
61
- // Default OFF in production; flip ON in dev (or via env-var override) before
62
- // reproducing a "didn't auto-update" complaint so the telemetry is captured.
63
- // Disabled => the poll loop is byte-identical to its pre-flag steady state
64
- // (the diagnostic helpers no-op via _isRefreshDiagOn() at the top of refresh()).
70
+ // Default ON (W-mphlr4lv0008c24f) the diagnostic capture is cheap (in-memory
71
+ // ring buffer, no network, no DOM writes) and is gated by _isRefreshDiagOn()
72
+ // at the top of refresh() so the disabled path remains byte-identical to the
73
+ // pre-flag steady state. Having it always-on means the next staleness
74
+ // complaint can be diagnosed immediately from window._refreshDiagnostics
75
+ // without needing a settings flip first.
76
+ // Disable via config.features['dashboard-refresh-diagnostics']: false or
77
+ // env MINIONS_FEATURE_DASHBOARD_REFRESH_DIAGNOSTICS=0.
65
78
  'dashboard-refresh-diagnostics': {
66
79
  description: 'Capture the last 50 dashboard /api/status poll cycles (timing, ETag, status code, render duration, per-renderer change flags) in a browser-side ring buffer accessible via window._refreshDiagnostics, a footer "diag" chip, and POST /api/diagnostics/refresh.',
67
- default: false,
80
+ default: true,
68
81
  addedIn: '0.1.2034',
69
82
  },
70
83
  };
package/engine/shared.js CHANGED
@@ -1865,7 +1865,7 @@ const ENGINE_DEFAULTS = {
1865
1865
  copilotSuppressAgentsMd: true, // Copilot --no-custom-instructions: stop AGENTS.md auto-load from fighting Minions playbook prompts
1866
1866
  copilotStreamMode: 'on', // Copilot --stream <on|off>: 'on' streams assistant.message_delta events live; 'off' batches them
1867
1867
  copilotReasoningSummaries: false, // Copilot --enable-reasoning-summaries (Anthropic-family models only)
1868
- ccUseWorkerPool: false, // Sub-task C of W-mp2w003600196c51 (CC perf): when true, _invokeCcStream routes through engine/cc-worker-pool.js (persistent `copilot --acp` per CC tab) instead of spawning a fresh CLI per turn. Off by default — opt-in feature flag. Engine/agent dispatch path stays per-process regardless.
1868
+ ccUseWorkerPool: false, // Sub-task C of W-mp2w003600196c51 (CC perf): when true AND CC runtime is copilot, _invokeCcStream routes through engine/cc-worker-pool.js (persistent `copilot --acp` per CC tab) instead of spawning a fresh CLI per turn. Off by default — opt-in feature flag. **Structurally copilot-only**: the pool spawns `copilot --acp` (Agent Client Protocol); Claude Code does not implement ACP, so resolveCcUseWorkerPool returns false on non-copilot CC runtimes even with explicit-true (W-mphlriic00095f69 — prevents silent runtime switch). Engine/agent dispatch path stays per-process regardless.
1869
1869
  maxBudgetUsd: undefined, // fleet USD ceiling for --max-budget-usd (per-agent override: agents.<id>.maxBudgetUsd). Honors 0 via ?? so a literal cap of $0 works
1870
1870
  disableModelDiscovery: false, // skip runtime.listModels() REST calls fleet-wide (settings UI falls back to free-text)
1871
1871
  maxPendingContexts: 20, // cap pendingContexts arrays in cooldowns.json to prevent unbounded growth
@@ -2097,22 +2097,31 @@ function resolveCcCli(engine) {
2097
2097
  /**
2098
2098
  * Resolve whether the Command Center / doc-chat path should route through the
2099
2099
  * persistent ACP worker pool. Priority:
2100
- * 1. `engine.ccUseWorkerPool` explicit true/falseoperator override always wins
2101
- * 2. Runtime-aware default: ON when CC runtime resolves to `copilot`
2100
+ * 1. CC runtime guardpool spawns `copilot --acp` (Agent Client Protocol).
2101
+ * Claude Code does not implement ACP, and `_invokeCcStream` would silently
2102
+ * switch a Claude operator's CC turns to copilot if the pool ran for them.
2103
+ * Refuse the pool when CC runtime is not copilot, even if explicit-true is
2104
+ * set. Future runtimes that don't implement ACP fall into the same bucket.
2105
+ * (W-mphlriic00095f69)
2106
+ * 2. `engine.ccUseWorkerPool` explicit true/false — operator override wins
2107
+ * *within* the copilot runtime
2108
+ * 3. Runtime-aware default: ON when CC runtime resolves to `copilot`
2102
2109
  * (Copilot's cold-spawn is 18-21s on Windows — pool turns subsequent turns
2103
- * from 47-140s back into a few seconds). Claude's cold-spawn is much
2104
- * cheaper and the ACP pool wasn't designed for it, so it stays OFF there.
2105
- * 3. ENGINE_DEFAULTS.ccUseWorkerPool — final fallback
2110
+ * from 47-140s back into a few seconds).
2111
+ * 4. ENGINE_DEFAULTS.ccUseWorkerPool final fallback
2106
2112
  *
2107
2113
  * Strict boolean check on the override so a literal `false` opts out even on
2108
2114
  * Copilot, matching `_isMeaningful` semantics for boolean flags.
2109
2115
  */
2110
2116
  function resolveCcUseWorkerPool(engine) {
2117
+ // Guard 1 (W-mphlriic00095f69): pool transport is ACP-only. If CC runtime
2118
+ // isn't copilot, the pool cannot run regardless of operator opt-in — don't
2119
+ // silently switch their runtime to copilot.
2120
+ if (resolveCcCli(engine) !== 'copilot') return false;
2111
2121
  if (engine && (engine.ccUseWorkerPool === true || engine.ccUseWorkerPool === false)) {
2112
2122
  return engine.ccUseWorkerPool;
2113
2123
  }
2114
- if (resolveCcCli(engine) === 'copilot') return true;
2115
- return !!ENGINE_DEFAULTS.ccUseWorkerPool;
2124
+ return true; // CC runtime is copilot default ON (cold-start savings)
2116
2125
  }
2117
2126
 
2118
2127
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.2038",
3
+ "version": "0.1.2040",
4
4
  "description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
5
5
  "bin": {
6
6
  "minions": "bin/minions.js"