@yemi33/minions 0.1.570 → 0.1.572

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/CHANGELOG.md CHANGED
@@ -1,12 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.570 (2026-04-08)
3
+ ## 0.1.572 (2026-04-08)
4
4
 
5
5
  ### Features
6
+ - include agent dispatches in LLM Call Performance tile
7
+ - add CC model and effort level to settings page
6
8
  - add LLM Call Performance tile to engine page
7
9
  - add ccModel/ccEffort settings and agent runtime tracking
8
10
 
9
11
  ### Fixes
12
+ - always use --system-prompt-file, remove spawnSync --help check
10
13
  - remove dead Context Pressure tile from engine page
11
14
 
12
15
  ### Other
@@ -55,6 +55,29 @@ async function openSettings() {
55
55
  settingsField('Version Check Interval', 'set-versionCheckInterval', e.versionCheckInterval || 3600000, 'ms', 'How often to check npm for updates (default: 1 hour)') +
56
56
  '</div>' +
57
57
 
58
+ '<h3 style="font-size:13px;color:var(--blue);margin-bottom:8px">Command Center / Doc Chat</h3>' +
59
+ '<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px">' +
60
+ '<div>' +
61
+ '<label style="font-size:10px;color:var(--muted);display:block;margin-bottom:2px">Model</label>' +
62
+ '<select id="set-ccModel" style="width:100%;padding:4px 6px;background:var(--surface);border:1px solid var(--border);border-radius:4px;color:var(--text);font-size:12px">' +
63
+ '<option value="sonnet"' + ((e.ccModel || 'sonnet') === 'sonnet' ? ' selected' : '') + '>Sonnet (default)</option>' +
64
+ '<option value="haiku"' + (e.ccModel === 'haiku' ? ' selected' : '') + '>Haiku (faster, cheaper)</option>' +
65
+ '<option value="opus"' + (e.ccModel === 'opus' ? ' selected' : '') + '>Opus (most capable)</option>' +
66
+ '</select>' +
67
+ '<div style="font-size:9px;color:var(--muted);margin-top:1px">Model used for CC and doc-chat conversations</div>' +
68
+ '</div>' +
69
+ '<div>' +
70
+ '<label style="font-size:10px;color:var(--muted);display:block;margin-bottom:2px">Effort Level</label>' +
71
+ '<select id="set-ccEffort" style="width:100%;padding:4px 6px;background:var(--surface);border:1px solid var(--border);border-radius:4px;color:var(--text);font-size:12px">' +
72
+ '<option value=""' + (!e.ccEffort ? ' selected' : '') + '>Default</option>' +
73
+ '<option value="low"' + (e.ccEffort === 'low' ? ' selected' : '') + '>Low (quick responses)</option>' +
74
+ '<option value="medium"' + (e.ccEffort === 'medium' ? ' selected' : '') + '>Medium</option>' +
75
+ '<option value="high"' + (e.ccEffort === 'high' ? ' selected' : '') + '>High (thorough)</option>' +
76
+ '</select>' +
77
+ '<div style="font-size:9px;color:var(--muted);margin-top:1px">Controls response depth and reasoning effort</div>' +
78
+ '</div>' +
79
+ '</div>' +
80
+
58
81
  '<h3 style="font-size:13px;color:var(--blue);margin-bottom:8px">Claude CLI</h3>' +
59
82
  '<div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px">' +
60
83
  settingsField('Output Format', 'set-outputFormat', c.outputFormat || 'stream-json', '', '') +
@@ -172,6 +195,8 @@ async function saveSettings() {
172
195
  evalMaxCost: document.getElementById('set-evalMaxCost').value || null,
173
196
  maxBuildFixAttempts: document.getElementById('set-maxBuildFixAttempts').value,
174
197
  versionCheckInterval: document.getElementById('set-versionCheckInterval').value,
198
+ ccModel: document.getElementById('set-ccModel').value,
199
+ ccEffort: document.getElementById('set-ccEffort').value || null,
175
200
  };
176
201
 
177
202
  const claudePayload = {
@@ -1040,6 +1040,22 @@ function updateMetrics(agentId, dispatchItem, result, taskUsage, prsCreatedCount
1040
1040
  m.totalOutputTokens = (m.totalOutputTokens || 0) + (taskUsage.outputTokens || 0);
1041
1041
  m.totalCacheRead = (m.totalCacheRead || 0) + (taskUsage.cacheRead || 0);
1042
1042
  }
1043
+ // Track agent runs in _engine for LLM performance tile (alongside CC/doc-chat)
1044
+ if (!metrics._engine) metrics._engine = {};
1045
+ if (!metrics._engine['agent-dispatch']) {
1046
+ metrics._engine['agent-dispatch'] = { calls: 0, costUsd: 0, inputTokens: 0, outputTokens: 0, cacheRead: 0, cacheCreation: 0, totalDurationMs: 0 };
1047
+ }
1048
+ const eng = metrics._engine['agent-dispatch'];
1049
+ eng.calls++;
1050
+ if (runtimeMs > 0) eng.totalDurationMs = (eng.totalDurationMs || 0) + runtimeMs;
1051
+ if (taskUsage) {
1052
+ eng.costUsd += taskUsage.costUsd || 0;
1053
+ eng.inputTokens += taskUsage.inputTokens || 0;
1054
+ eng.outputTokens += taskUsage.outputTokens || 0;
1055
+ eng.cacheRead += taskUsage.cacheRead || 0;
1056
+ eng.cacheCreation = (eng.cacheCreation || 0) + (taskUsage.cacheCreation || 0);
1057
+ }
1058
+
1043
1059
  const today = dateStamp();
1044
1060
  if (!metrics._daily) metrics._daily = {};
1045
1061
  if (!metrics._daily[today]) metrics._daily[today] = { costUsd: 0, inputTokens: 0, outputTokens: 0, cacheRead: 0, tasks: 0, runtimeMs: 0 };
@@ -114,38 +114,12 @@ if (!claudeBin) {
114
114
  process.exit(78); // 78 = configuration error (distinct from runtime failures)
115
115
  }
116
116
 
117
- // Check if --system-prompt-file is supported (cached alongside binary path above)
117
+ // --system-prompt-file is supported in all Claude CLI versions (not listed in --help but works)
118
118
  let actualArgs = cliArgs;
119
+ // Save binary path cache (no capability check needed — spawnSync for --help was a bottleneck)
119
120
  if (_sysPromptFileSupported === null) {
120
- try {
121
- const { spawnSync } = require('child_process');
122
- const testResult = claudeIsNative
123
- ? spawnSync(claudeBin, ['--help'], { encoding: 'utf8', timeout: 10000, windowsHide: true })
124
- : spawnSync(process.execPath, [claudeBin, '--help'], { encoding: 'utf8', timeout: 10000, windowsHide: true });
125
- _sysPromptFileSupported = (testResult.stdout || '').includes('system-prompt-file');
126
- } catch { _sysPromptFileSupported = true; /* assume supported */ }
127
- // Save binary path + capability flag together
128
- try { safeWrite(capsCachePath, { claudeBin, claudeIsNative, sysPromptFile: _sysPromptFileSupported }); } catch {}
129
- }
130
- if (!isResume) try {
131
- if (!_sysPromptFileSupported) {
132
- // Not supported — fall back to inline but safe: use --append-system-prompt with chunking
133
- // or just inline if under 30KB
134
- fs.unlinkSync(sysTmpPath);
135
- if (Buffer.byteLength(sysPrompt) < 30000) {
136
- actualArgs = ['-p', '--system-prompt', sysPrompt, ...extraArgs];
137
- } else {
138
- // Too large for inline — split: short identity as --system-prompt, rest prepended to user prompt
139
- // Extract first section (agent identity) as the system prompt, rest goes into user context
140
- const splitIdx = sysPrompt.indexOf('\n---\n');
141
- const shortSys = splitIdx > 0 && splitIdx < 2000
142
- ? sysPrompt.slice(0, splitIdx)
143
- : sysPrompt.slice(0, 1500) + '\n\n[System prompt truncated for CLI arg limit — full context provided below in user message]';
144
- actualArgs = ['-p', '--system-prompt', shortSys, ...extraArgs];
145
- }
146
- }
147
- } catch {
148
- // If help check fails, try file approach anyway
121
+ _sysPromptFileSupported = true;
122
+ try { safeWrite(capsCachePath, { claudeBin, claudeIsNative, sysPromptFile: true }); } catch {}
149
123
  }
150
124
 
151
125
  const proc = claudeIsNative
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.570",
3
+ "version": "0.1.572",
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"