@yemi33/minions 0.1.402 → 0.1.404

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.404 (2026-04-06)
4
+
5
+ ### Fixes
6
+ - PR delete searches all project files, not just the first project
7
+
8
+ ## 0.1.403 (2026-04-06)
9
+
10
+ ### Fixes
11
+ - version check works on pure npm installs without package.json in ~/.minions
12
+
3
13
  ## 0.1.402 (2026-04-06)
4
14
 
5
15
  ### Features
package/bin/minions.js CHANGED
@@ -233,9 +233,9 @@ function init() {
233
233
  '.npmignore', '.gitignore', '.github',
234
234
  ]);
235
235
 
236
- // Files that are always overwritten (engine code)
236
+ // Files that are always overwritten (engine code + version metadata)
237
237
  const alwaysUpdate = (name) =>
238
- name.endsWith('.js') || name.endsWith('.html');
238
+ name.endsWith('.js') || name.endsWith('.html') || name === 'package.json';
239
239
 
240
240
  // Files that should be added if missing but never overwritten (user customizations)
241
241
  const neverOverwrite = (name) =>
package/dashboard.js CHANGED
@@ -13,7 +13,7 @@ const llm = require('./engine/llm');
13
13
 
14
14
  // Dashboard version stamp — captured at module load so it reflects the code actually running
15
15
  const _dashboardVersion = {
16
- codeVersion: (() => { try { return require('./package.json').version; } catch { return null; } })(),
16
+ codeVersion: (() => { try { return require('./package.json').version; } catch {} try { return require('@yemi33/minions/package.json').version; } catch {} return null; })(),
17
17
  codeCommit: (() => { try { return require('child_process').execSync('git rev-parse --short HEAD', { cwd: __dirname, encoding: 'utf8', timeout: 5000, windowsHide: true }).trim(); } catch { return null; } })(),
18
18
  startedAt: new Date().toISOString(),
19
19
  pid: process.pid,
@@ -224,6 +224,10 @@ function getDiskVersion() {
224
224
  delete require.cache[pkgPath]; // bust Node's require cache so npm updates are detected
225
225
  diskVersion = require('./package.json').version;
226
226
  } catch {}
227
+ // Fallback: if no local package.json (e.g. ~/.minions/ missing it), try the npm package root
228
+ if (!diskVersion) {
229
+ try { diskVersion = require('@yemi33/minions/package.json').version; } catch {}
230
+ }
227
231
  let diskCommit = null;
228
232
  try { diskCommit = require('child_process').execSync('git rev-parse --short HEAD', { cwd: MINIONS_DIR, encoding: 'utf8', timeout: 5000, windowsHide: true }).trim(); } catch {}
229
233
  _diskVersionCache = { diskVersion, diskCommit };
@@ -3633,19 +3637,24 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3633
3637
 
3634
3638
  { method: 'POST', path: '/api/pull-requests/delete', desc: 'Remove a PR from tracking', params: 'id, project?', handler: async (req, res) => {
3635
3639
  const body = await readBody(req);
3636
- const { id, project: projectName } = body;
3640
+ const { id } = body;
3637
3641
  if (!id) return jsonReply(res, 400, { error: 'id required' });
3638
3642
  reloadConfig();
3639
- const projects = shared.getProjects(CONFIG);
3640
- const targetProject = projectName ? projects.find(p => p.name?.toLowerCase() === projectName.toLowerCase()) : projects[0];
3641
- const prPath = targetProject ? shared.projectPrPath(targetProject) : path.join(MINIONS_DIR, 'pull-requests.json');
3643
+ // Search all project PR files and central file
3644
+ const prPaths = [
3645
+ ...shared.getProjects(CONFIG).map(p => shared.projectPrPath(p)),
3646
+ path.join(MINIONS_DIR, 'pull-requests.json'),
3647
+ ];
3642
3648
  let found = false;
3643
- mutateJsonFileLocked(prPath, (prs) => {
3644
- if (!Array.isArray(prs)) return prs;
3645
- const idx = prs.findIndex(p => p.id === id);
3646
- if (idx >= 0) { prs.splice(idx, 1); found = true; }
3647
- return prs;
3648
- }, { defaultValue: [] });
3649
+ for (const prPath of prPaths) {
3650
+ if (found) break;
3651
+ mutateJsonFileLocked(prPath, (prs) => {
3652
+ if (!Array.isArray(prs)) return prs;
3653
+ const idx = prs.findIndex(p => p.id === id);
3654
+ if (idx >= 0) { prs.splice(idx, 1); found = true; }
3655
+ return prs;
3656
+ }, { defaultValue: [] });
3657
+ }
3649
3658
  if (!found) return jsonReply(res, 404, { error: 'PR not found' });
3650
3659
  invalidateStatusCache();
3651
3660
  return jsonReply(res, 200, { ok: true });
package/engine/cli.js CHANGED
@@ -87,6 +87,7 @@ const commands = {
87
87
  // Record version + git commit so dashboard can detect stale engine code
88
88
  let codeVersion = null;
89
89
  try { codeVersion = require('../package.json').version; } catch {}
90
+ if (!codeVersion) { try { codeVersion = require('@yemi33/minions/package.json').version; } catch {} }
90
91
  let codeCommit = null;
91
92
  try { codeCommit = require('child_process').execSync('git rev-parse --short HEAD', { cwd: path.resolve(__dirname, '..'), encoding: 'utf8', timeout: 5000, windowsHide: true }).trim(); } catch {}
92
93
  safeWrite(CONTROL_PATH, { state: 'running', pid: process.pid, started_at: e.ts(), codeVersion, codeCommit });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.402",
3
+ "version": "0.1.404",
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"