@yemi33/minions 0.1.1081 → 0.1.1082
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 +3 -1
- package/dashboard/js/render-work-items.js +1 -1
- package/engine/llm.js +2 -2
- package/engine/spawn-agent.js +23 -27
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.1082 (2026-04-18)
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
- seed realActivityMap at spawn time, stamp pid in live-output (#1200)
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
- harden settings save and migrate pr poll config
|
|
19
19
|
|
|
20
20
|
### Other
|
|
21
|
+
- refactor: extract _probeClaudePackage helper, use shared.log for spawn errors
|
|
22
|
+
- Make work item descriptions scrollable
|
|
21
23
|
- Use PAT for publish merges
|
|
22
24
|
- test(queries): add unit tests for invalidateDispatchCache/getInbox/getAgentCharter (#1214)
|
|
23
25
|
- test(shared): add unit tests for truncateTextBytes/tailTextBytes/execSilent/trackReviewMetric/parseCanonicalPrId (#1215)
|
|
@@ -453,7 +453,7 @@ function openWorkItemDetail(id) {
|
|
|
453
453
|
'<span class="dispatch-type ' + (item.type || 'implement') + '">' + escHtml(item.type || 'implement') + '</span>' +
|
|
454
454
|
'<span class="prd-item-priority ' + (item.priority || '') + '">' + escHtml(item.priority || 'medium') + '</span>' +
|
|
455
455
|
'</div>';
|
|
456
|
-
html += field('Description', '<div style="font-size:12px">' + renderMd(
|
|
456
|
+
html += field('Description', '<div style="font-size:12px;max-height:320px;overflow-y:auto;padding:8px 10px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--radius-sm)">' + renderMd(item.description || item.title || '—') + '</div>');
|
|
457
457
|
html += field('Agent', escHtml(item.dispatched_to || item.agent || 'Auto'));
|
|
458
458
|
html += field('Source', escHtml(item._source || 'central'));
|
|
459
459
|
if (item.created) html += field('Created', escHtml(new Date(item.created).toLocaleString()));
|
package/engine/llm.js
CHANGED
|
@@ -246,7 +246,7 @@ function callLLM(promptText, sysPromptText, { timeout = 120000, label = 'llm', m
|
|
|
246
246
|
proc.on('error', (err) => {
|
|
247
247
|
clearTimeout(timer);
|
|
248
248
|
for (const f of cleanupFiles) safeUnlink(f);
|
|
249
|
-
|
|
249
|
+
shared.log('error', `LLM spawn error (${label}): ${err.message}`);
|
|
250
250
|
resolve({ text: '', usage: null, sessionId: null, code: 1, stderr: err.message, raw: '', toolUses: [] });
|
|
251
251
|
});
|
|
252
252
|
});
|
|
@@ -308,7 +308,7 @@ function callLLMStreaming(promptText, sysPromptText, { timeout = 120000, label =
|
|
|
308
308
|
proc.on('error', (err) => {
|
|
309
309
|
clearTimeout(timer);
|
|
310
310
|
for (const f of cleanupFiles) safeUnlink(f);
|
|
311
|
-
|
|
311
|
+
shared.log('error', `LLM-stream spawn error (${label}): ${err.message}`);
|
|
312
312
|
resolve({ text: '', usage: null, sessionId: null, code: 1, stderr: err.message, raw: '', toolUses: [] });
|
|
313
313
|
});
|
|
314
314
|
});
|
package/engine/spawn-agent.js
CHANGED
|
@@ -27,6 +27,16 @@ let claudeBin;
|
|
|
27
27
|
let claudeIsNative = false; // true = native binary, false = node cli.js
|
|
28
28
|
const capsCachePath = path.join(__dirname, 'claude-caps.json');
|
|
29
29
|
let _cacheHit = false;
|
|
30
|
+
const isWin = process.platform === 'win32';
|
|
31
|
+
|
|
32
|
+
// Probe a @anthropic-ai/claude-code package dir for the best binary: native exe > cli.js
|
|
33
|
+
function _probeClaudePackage(pkgDir) {
|
|
34
|
+
const nativeBin = path.join(pkgDir, 'bin', isWin ? 'claude.exe' : 'claude');
|
|
35
|
+
if (fs.existsSync(nativeBin)) return { bin: nativeBin, native: true };
|
|
36
|
+
const cliJs = path.join(pkgDir, 'cli.js');
|
|
37
|
+
if (fs.existsSync(cliJs)) return { bin: cliJs, native: false };
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
30
40
|
|
|
31
41
|
// Fast path: use cached binary path if it still exists on disk
|
|
32
42
|
const caps = safeJson(capsCachePath);
|
|
@@ -36,31 +46,21 @@ if (caps?.claudeBin && fs.existsSync(caps.claudeBin)) {
|
|
|
36
46
|
_cacheHit = true;
|
|
37
47
|
}
|
|
38
48
|
|
|
39
|
-
// Strategy 1: Find `claude` on PATH, then
|
|
40
|
-
// Don't parse wrapper scripts — probe known binary locations relative to the wrapper's directory.
|
|
49
|
+
// Strategy 1: Find `claude` on PATH, then probe known binary locations relative to the wrapper's directory
|
|
41
50
|
if (!claudeBin) try {
|
|
42
|
-
const isWin = process.platform === 'win32';
|
|
43
51
|
const cmd = isWin ? 'where claude 2>NUL' : 'which claude 2>/dev/null';
|
|
44
52
|
const which = exec(cmd, { encoding: 'utf8', env, timeout: 10000 }).trim().split('\n')[0].trim();
|
|
45
53
|
if (which) {
|
|
54
|
+
// On non-Windows under Git Bash/MSYS, `which` returns POSIX paths (/c/Users/...) — normalize
|
|
46
55
|
const whichNative = isWin ? which : which.replace(/^\/([a-zA-Z])\//, (_, d) => d.toUpperCase() + ':/').replace(/\//g, path.sep);
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const cliJs = path.join(ccPkg, 'cli.js');
|
|
53
|
-
|
|
54
|
-
if (fs.existsSync(nativeBin)) {
|
|
55
|
-
claudeBin = nativeBin;
|
|
56
|
-
claudeIsNative = true;
|
|
57
|
-
} else if (fs.existsSync(cliJs)) {
|
|
58
|
-
claudeBin = cliJs;
|
|
56
|
+
const ccPkg = path.join(path.dirname(whichNative), 'node_modules', '@anthropic-ai', 'claude-code');
|
|
57
|
+
const found = _probeClaudePackage(ccPkg);
|
|
58
|
+
if (found) {
|
|
59
|
+
claudeBin = found.bin;
|
|
60
|
+
claudeIsNative = found.native;
|
|
59
61
|
} else {
|
|
60
|
-
// Not an npm wrapper —
|
|
61
|
-
|
|
62
|
-
const ext = path.extname(whichNative).toLowerCase();
|
|
63
|
-
if (!isWin || ext === '.exe') {
|
|
62
|
+
// Not an npm wrapper — on Windows, only trust .exe files (shell scripts can't be spawned directly)
|
|
63
|
+
if (!isWin || path.extname(whichNative).toLowerCase() === '.exe') {
|
|
64
64
|
claudeBin = whichNative;
|
|
65
65
|
claudeIsNative = true;
|
|
66
66
|
}
|
|
@@ -69,9 +69,7 @@ if (!claudeBin) try {
|
|
|
69
69
|
} catch { /* optional */ }
|
|
70
70
|
|
|
71
71
|
// Strategy 2: Known node_modules locations (npm global installs)
|
|
72
|
-
// Check for native binary first, then cli.js
|
|
73
72
|
if (!claudeBin) {
|
|
74
|
-
const isWin = process.platform === 'win32';
|
|
75
73
|
const prefixes = [
|
|
76
74
|
process.env.npm_config_prefix ? path.join(process.env.npm_config_prefix, 'node_modules', '@anthropic-ai', 'claude-code') : '',
|
|
77
75
|
process.env.APPDATA ? path.join(process.env.APPDATA, 'npm', 'node_modules', '@anthropic-ai', 'claude-code') : '',
|
|
@@ -84,10 +82,8 @@ if (!claudeBin) {
|
|
|
84
82
|
].filter(Boolean);
|
|
85
83
|
for (const pkg of prefixes) {
|
|
86
84
|
try {
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
const cliJs = path.join(pkg, 'cli.js');
|
|
90
|
-
if (fs.existsSync(cliJs)) { claudeBin = cliJs; break; }
|
|
85
|
+
const found = _probeClaudePackage(pkg);
|
|
86
|
+
if (found) { claudeBin = found.bin; claudeIsNative = found.native; break; }
|
|
91
87
|
} catch {}
|
|
92
88
|
}
|
|
93
89
|
}
|
|
@@ -96,8 +92,8 @@ if (!claudeBin) {
|
|
|
96
92
|
if (!claudeBin) {
|
|
97
93
|
try {
|
|
98
94
|
const globalRoot = exec('npm root -g', { encoding: 'utf8', env, timeout: 10000 }).trim();
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
95
|
+
const found = _probeClaudePackage(path.join(globalRoot, '@anthropic-ai', 'claude-code'));
|
|
96
|
+
if (found) { claudeBin = found.bin; claudeIsNative = found.native; }
|
|
101
97
|
} catch { /* optional */ }
|
|
102
98
|
}
|
|
103
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1082",
|
|
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"
|