@yemi33/minions 0.1.1916 → 0.1.1917

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/dashboard.js CHANGED
@@ -6909,7 +6909,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
6909
6909
 
6910
6910
  if (body.claude) {
6911
6911
  if (!config.claude) config.claude = {};
6912
- for (const key of ['allowedTools', 'outputFormat']) {
6912
+ for (const key of ['allowedTools']) {
6913
6913
  if (body.claude[key] !== undefined) config.claude[key] = String(body.claude[key]);
6914
6914
  }
6915
6915
  shared.pruneDefaultClaudeConfig(config);
@@ -7103,18 +7103,36 @@ What would you like to discuss or change? When you're happy, say "approve" and I
7103
7103
  }
7104
7104
 
7105
7105
  async function handleHealth(req, res) {
7106
+ // /api/health is on the restart-verification hot path (polled every 250ms
7107
+ // for 15s after `minions restart`). The previous implementation called
7108
+ // getAgents() which does per-agent file IO: inbox dir readDir, charter
7109
+ // existsSync, live-output.log readHeadTail, steering messages list, work-
7110
+ // items.json fallback read. Under tick contention with shared-JSON locks
7111
+ // held by the engine, a single request stretches to 15-20s, which fails
7112
+ // the 3s per-attempt timeout. Build a minimal agents array inline from
7113
+ // config + dispatch only (two cached reads, no file enumeration). Full
7114
+ // agent metadata stays available via /api/status. Reference to
7115
+ // MINIONS_DIR is load-bearing for the integration-harness root guard
7116
+ // test in test/unit/integration-harness-root-guard.test.js.
7106
7117
  const engine = getEngineState();
7107
- const agents = getAgents();
7108
- const health = {
7118
+ const agentDefs = (CONFIG.agents && Object.keys(CONFIG.agents).length > 0)
7119
+ ? CONFIG.agents
7120
+ : shared.DEFAULT_AGENTS;
7121
+ const dispatch = getDispatchQueue();
7122
+ const activeAgentIds = new Set((dispatch.active || []).map(d => d.agent));
7123
+ const agents = Object.entries(agentDefs).map(([id, info]) => ({
7124
+ id,
7125
+ name: (info && info.name) || id,
7126
+ status: activeAgentIds.has(id) ? 'working' : 'idle',
7127
+ }));
7128
+ return jsonReply(res, 200, {
7109
7129
  status: engine.state === 'running' ? 'healthy' : (engine.state === 'paused' || engine.state === 'stopping') ? 'degraded' : 'stopped',
7110
7130
  engine: { state: engine.state, pid: engine.pid },
7111
- agents: agents.map(a => ({ id: a.id, name: a.name, status: a.status })),
7112
- projects: PROJECTS.map(p => ({ name: p.name, reachable: fs.existsSync(p.localPath) })),
7131
+ agents,
7113
7132
  minionsDir: MINIONS_DIR,
7114
7133
  uptime: process.uptime(),
7115
7134
  timestamp: new Date().toISOString()
7116
- };
7117
- return jsonReply(res, 200, health);
7135
+ });
7118
7136
  }
7119
7137
 
7120
7138
  async function handleAgentDetail(req, res, match) {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "runtime": "copilot",
3
3
  "models": null,
4
- "cachedAt": "2026-05-13T21:49:07.029Z"
4
+ "cachedAt": "2026-05-13T22:15:26.685Z"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1916",
3
+ "version": "0.1.1917",
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"