@yemi33/minions 0.1.571 → 0.1.573
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 +7 -1
- package/engine/spawn-agent.js +7 -40
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.573 (2026-04-08)
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
- remove dead stdin prepend path, clean up spawn-agent cache logic
|
|
7
|
+
|
|
8
|
+
## 0.1.572 (2026-04-08)
|
|
4
9
|
|
|
5
10
|
### Features
|
|
6
11
|
- include agent dispatches in LLM Call Performance tile
|
|
@@ -9,6 +14,7 @@
|
|
|
9
14
|
- add ccModel/ccEffort settings and agent runtime tracking
|
|
10
15
|
|
|
11
16
|
### Fixes
|
|
17
|
+
- always use --system-prompt-file, remove spawnSync --help check
|
|
12
18
|
- remove dead Context Pressure tile from engine page
|
|
13
19
|
|
|
14
20
|
### Other
|
package/engine/spawn-agent.js
CHANGED
|
@@ -26,14 +26,14 @@ const env = cleanChildEnv();
|
|
|
26
26
|
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
|
-
let
|
|
29
|
+
let _cacheHit = false;
|
|
30
30
|
|
|
31
31
|
// Fast path: use cached binary path if it still exists on disk
|
|
32
32
|
const caps = safeJson(capsCachePath);
|
|
33
33
|
if (caps?.claudeBin && fs.existsSync(caps.claudeBin)) {
|
|
34
34
|
claudeBin = caps.claudeBin;
|
|
35
35
|
claudeIsNative = !!caps.claudeIsNative;
|
|
36
|
-
|
|
36
|
+
_cacheHit = true;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// Strategy 1: Check if `claude` is on PATH (native installer or npm global bin)
|
|
@@ -114,38 +114,10 @@ if (!claudeBin) {
|
|
|
114
114
|
process.exit(78); // 78 = configuration error (distinct from runtime failures)
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
//
|
|
117
|
+
// Save binary path cache on first resolution (subsequent spawns use fast path)
|
|
118
118
|
let actualArgs = cliArgs;
|
|
119
|
-
if (
|
|
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
|
|
119
|
+
if (!_cacheHit) {
|
|
120
|
+
try { safeWrite(capsCachePath, { claudeBin, claudeIsNative }); } catch {}
|
|
149
121
|
}
|
|
150
122
|
|
|
151
123
|
const proc = claudeIsNative
|
|
@@ -158,14 +130,9 @@ fs.appendFile(debugPath, `PID=${proc.pid || 'none'}\nargs=${actualArgs.join(' ')
|
|
|
158
130
|
const pidFile = promptFile.replace(/prompt-/, 'pid-').replace(/\.md$/, '.pid');
|
|
159
131
|
fs.writeFileSync(pidFile, String(proc.pid || ''));
|
|
160
132
|
|
|
161
|
-
// Send prompt via stdin
|
|
133
|
+
// Send prompt via stdin
|
|
162
134
|
try {
|
|
163
|
-
|
|
164
|
-
// System prompt was too large for CLI — prepend full context to user prompt
|
|
165
|
-
proc.stdin.write(`## Full Agent Context\n\n${sysPrompt}\n\n---\n\n## Your Task\n\n${prompt}`);
|
|
166
|
-
} else {
|
|
167
|
-
proc.stdin.write(prompt);
|
|
168
|
-
}
|
|
135
|
+
proc.stdin.write(prompt);
|
|
169
136
|
proc.stdin.end();
|
|
170
137
|
} catch (err) {
|
|
171
138
|
console.error(`FATAL: stdin write failed (broken pipe): ${err.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.573",
|
|
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"
|