@yemi33/minions 0.1.373 → 0.1.374

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.374 (2026-04-06)
4
+
5
+ ### Fixes
6
+ - medium bugs — KB declaration, meeting phantom archive, lifecycle race (#216)
7
+
3
8
  ## 0.1.373 (2026-04-06)
4
9
 
5
10
  ### Features
@@ -12,6 +12,7 @@ const KB_CAT_ICONS = {
12
12
  reviews: '\u{1F50D}', learnings: '\u{1F4A1}', decisions: '\u{2696}',
13
13
  incidents: '\u{1F6A8}', 'api-notes': '\u{1F517}',
14
14
  };
15
+ let _kbData = {};
15
16
  let _kbActiveTab = 'all';
16
17
  const KB_PER_PAGE = 30;
17
18
  let _kbPage = 0;
@@ -86,7 +87,7 @@ function renderKnowledgeBase() {
86
87
  '<div class="kb-item-title">' + icon + ' ' + escHtml(item.title) + '</div>' +
87
88
  '<div class="kb-item-meta">' +
88
89
  '<span>' + label + '</span>' +
89
- (item.agent ? '<span>' + item.agent + '</span>' : '') +
90
+ (item.agent ? '<span>' + escHtml(item.agent) + '</span>' : '') +
90
91
  '<span>' + (item.date || '') + '</span>' +
91
92
  '<span>' + Math.round(item.size / 1024) + 'KB</span>' +
92
93
  '</div>' +
@@ -344,8 +344,8 @@ async function _archiveMeeting(id) {
344
344
  method: 'POST', headers: { 'Content-Type': 'application/json' },
345
345
  body: JSON.stringify({ id })
346
346
  });
347
- if (!res.ok) { const d = await res.json().catch(() => ({})); alert('Failed: ' + (d.error || 'unknown')); refresh(); }
348
- } catch (e) { alert('Error: ' + e.message); refresh(); }
347
+ if (!res.ok) { _deletedIds.delete('mtg:' + id); const d = await res.json().catch(() => ({})); alert('Failed: ' + (d.error || 'unknown')); refresh(); }
348
+ } catch (e) { _deletedIds.delete('mtg:' + id); alert('Error: ' + e.message); refresh(); }
349
349
  }
350
350
 
351
351
  async function _unarchiveMeeting(id) {
@@ -457,24 +457,22 @@ function chainPlanToPrd(dispatchItem, meta, config) {
457
457
 
458
458
  log('info', `Plan chaining: queuing plan-to-prd for next tick (chained from ${dispatchItem.id})`);
459
459
  const wiPath = path.join(MINIONS_DIR, 'work-items.json');
460
- let items = [];
461
- try { items = JSON.parse(fs.readFileSync(wiPath, 'utf8')); } catch (err) {
462
- log('warn', `Failed to parse ${wiPath}: ${err.message}`);
463
- try { fs.copyFileSync(wiPath, wiPath + '.bak'); } catch {}
464
- }
465
- items.push({
466
- id: 'W-' + shared.uid(),
467
- title: `Convert plan to PRD: ${meta?.item?.title || planFile.name}`,
468
- type: 'plan-to-prd',
469
- priority: meta?.item?.priority || 'high',
470
- description: `Plan file: plans/${planFile.name}\nChained from plan task ${dispatchItem.id}`,
471
- status: WI_STATUS.PENDING,
472
- created: ts(),
473
- createdBy: 'engine:chain',
474
- project: targetProject.name,
475
- planFile: planFile.name,
476
- });
477
- shared.safeWrite(wiPath, items);
460
+ shared.mutateJsonFileLocked(wiPath, (items) => {
461
+ if (!Array.isArray(items)) items = [];
462
+ items.push({
463
+ id: 'W-' + shared.uid(),
464
+ title: `Convert plan to PRD: ${meta?.item?.title || planFile.name}`,
465
+ type: 'plan-to-prd',
466
+ priority: meta?.item?.priority || 'high',
467
+ description: `Plan file: plans/${planFile.name}\nChained from plan task ${dispatchItem.id}`,
468
+ status: WI_STATUS.PENDING,
469
+ created: ts(),
470
+ createdBy: 'engine:chain',
471
+ project: targetProject.name,
472
+ planFile: planFile.name,
473
+ });
474
+ return items;
475
+ }, { defaultValue: [] });
478
476
  }
479
477
 
480
478
  // ─── Work Item Path Resolution ───────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.373",
3
+ "version": "0.1.374",
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"