@yemi33/minions 0.1.373 → 0.1.375

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.375 (2026-04-06)
4
+
5
+ ### Fixes
6
+ - show red notification dot on Notes & KB when note is created
7
+ - medium bugs — KB declaration, meeting phantom archive, lifecycle race (#216)
8
+
3
9
  ## 0.1.373 (2026-04-06)
4
10
 
5
11
  ### Features
@@ -377,6 +377,8 @@ async function ccExecuteAction(action) {
377
377
  await _ccFetch('/api/notes', { title: action.title, what: action.content || action.description, author: 'command-center' });
378
378
  status.innerHTML = '&#10003; Note saved: <strong>' + escHtml(action.title) + '</strong>';
379
379
  status.style.color = 'var(--green)';
380
+ var notePageLink = document.querySelector('.sidebar-link[data-page="inbox"]');
381
+ if (notePageLink && !notePageLink.querySelector('.notif-badge')) { var noteCurPage = document.querySelector('.sidebar-link.active')?.getAttribute('data-page'); if (noteCurPage !== 'inbox') showNotifBadge(notePageLink); }
380
382
  break;
381
383
  }
382
384
  case 'pin': {
@@ -201,7 +201,14 @@ async function submitQuickNote() {
201
201
  method: 'POST', headers: { 'Content-Type': 'application/json' },
202
202
  body: JSON.stringify({ title: title || 'Quick note', what: content || title })
203
203
  });
204
- if (res.ok) { refresh(); }
204
+ if (res.ok) {
205
+ refresh();
206
+ const currentPage = document.querySelector('.sidebar-link.active')?.getAttribute('data-page');
207
+ if (currentPage !== 'inbox') {
208
+ const link = document.querySelector('.sidebar-link[data-page="inbox"]');
209
+ if (link && !link.querySelector('.notif-badge')) showNotifBadge(link);
210
+ }
211
+ }
205
212
  else { const d = await res.json().catch(() => ({})); alert('Note failed: ' + (d.error || 'unknown')); openQuickNoteModal(); }
206
213
  } catch (e) { alert('Error saving note: ' + e.message); openQuickNoteModal(); }
207
214
  }
@@ -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.375",
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"