@yemi33/minions 0.1.565 → 0.1.566

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,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.566 (2026-04-08)
4
+
5
+ ### Other
6
+ - refactor: use safeJson/safeWrite for spawn-agent cache, remove unused checkedAt
7
+
3
8
  ## 0.1.565 (2026-04-08)
4
9
 
5
10
  ### Fixes
@@ -8,7 +8,7 @@
8
8
 
9
9
  const fs = require('fs');
10
10
  const path = require('path');
11
- const { exec, runFile, cleanChildEnv, killGracefully, killImmediate, ts } = require('./shared');
11
+ const { exec, runFile, cleanChildEnv, killGracefully, killImmediate, ts, safeJson, safeWrite } = require('./shared');
12
12
 
13
13
  const [,, promptFile, sysPromptFile, ...extraArgs] = process.argv;
14
14
 
@@ -29,14 +29,12 @@ const capsCachePath = path.join(__dirname, 'claude-caps.json');
29
29
  let _sysPromptFileSupported = null;
30
30
 
31
31
  // Fast path: use cached binary path if it still exists on disk
32
- try {
33
- const caps = JSON.parse(fs.readFileSync(capsCachePath, 'utf8'));
34
- if (caps.claudeBin && fs.existsSync(caps.claudeBin)) {
35
- claudeBin = caps.claudeBin;
36
- claudeIsNative = !!caps.claudeIsNative;
37
- _sysPromptFileSupported = caps.sysPromptFile ?? null;
38
- }
39
- } catch {}
32
+ const caps = safeJson(capsCachePath);
33
+ if (caps?.claudeBin && fs.existsSync(caps.claudeBin)) {
34
+ claudeBin = caps.claudeBin;
35
+ claudeIsNative = !!caps.claudeIsNative;
36
+ _sysPromptFileSupported = caps.sysPromptFile ?? null;
37
+ }
40
38
 
41
39
  // Strategy 1: Check if `claude` is on PATH (native installer or npm global bin)
42
40
  if (!claudeBin) try {
@@ -127,7 +125,7 @@ if (_sysPromptFileSupported === null) {
127
125
  _sysPromptFileSupported = (testResult.stdout || '').includes('system-prompt-file');
128
126
  } catch { _sysPromptFileSupported = true; /* assume supported */ }
129
127
  // Save binary path + capability flag together
130
- try { fs.writeFileSync(capsCachePath, JSON.stringify({ claudeBin, claudeIsNative, sysPromptFile: _sysPromptFileSupported, checkedAt: ts() })); } catch {}
128
+ try { safeWrite(capsCachePath, { claudeBin, claudeIsNative, sysPromptFile: _sysPromptFileSupported }); } catch {}
131
129
  }
132
130
  if (!isResume) try {
133
131
  if (!_sysPromptFileSupported) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.565",
3
+ "version": "0.1.566",
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"