@yemi33/minions 0.1.685 → 0.1.686

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,11 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.685 (2026-04-09)
3
+ ## 0.1.686 (2026-04-09)
4
4
 
5
5
  ### Features
6
6
  - collapsible doc-chat thread in modal
7
7
 
8
8
  ### Fixes
9
+ - add archive fallback for artifact notes when KB entry was swept
9
10
  - link work item artifacts to KB entries, not raw archive copies
10
11
 
11
12
  ## 0.1.683 (2026-04-09)
@@ -458,13 +458,15 @@ function openWorkItemDetail(id) {
458
458
  if (arts.sourcePlan) artPills += '<span onclick="planView(\'' + escHtml(arts.sourcePlan) + '\')" style="' + pillStyle + '">📋 Source Plan</span> ';
459
459
  if (arts.notes && arts.notes.length > 0) arts.notes.forEach(function(n) {
460
460
  var noteFile = (n && typeof n === 'object') ? (n.file || n) : String(n || '');
461
- // KB entries prefixed with 'kb:category/file'
462
461
  if (noteFile.startsWith('kb:')) {
463
462
  var kbParts = noteFile.slice(3).split('/');
464
463
  var kbCat = kbParts[0];
465
464
  var kbFile = kbParts.slice(1).join('/');
466
465
  var kbLabel = kbFile.replace(/\.md$/, '').slice(0, 30);
467
466
  artPills += '<span onclick="kbOpenItem(\'' + escHtml(kbCat) + '\',\'' + escHtml(kbFile) + '\')" style="' + pillStyle + '">📚 ' + escHtml(kbLabel) + '</span> ';
467
+ } else if (noteFile.startsWith('archive:')) {
468
+ var archLabel = noteFile.slice(8).replace(/\.md$/, '').replace(/^\d{4}-\d{2}-\d{2}-/, '').slice(0, 30);
469
+ artPills += '<span onclick="openInboxNote(\'' + escHtml(noteFile.slice(8)) + '\')" style="' + pillStyle + ';opacity:0.7">📄 ' + escHtml(archLabel) + ' <span style="font-size:8px">(archived)</span></span> ';
468
470
  } else {
469
471
  var noteLabel = noteFile.replace(/\.md$/, '').slice(0, 30);
470
472
  artPills += '<span onclick="openInboxNote(\'' + escHtml(noteFile) + '\')" style="' + pillStyle + '">📝 ' + escHtml(noteLabel) + '</span> ';
package/engine/queries.js CHANGED
@@ -721,6 +721,7 @@ function getWorkItems(config) {
721
721
  }
722
722
  const _agentDirCache = {};
723
723
  const _inboxFiles = safeReadDir(INBOX_DIR);
724
+ const _archiveFiles = safeReadDir(ARCHIVE_DIR);
724
725
  // Use cached KB entries (includes source frontmatter field)
725
726
  const _kbEntries = getKnowledgeBaseEntries();
726
727
  for (const item of allItems) {
@@ -736,7 +737,7 @@ function getWorkItems(config) {
736
737
  const matchLog = _agentDirCache[agentId].find(f => f.includes(dispatchId));
737
738
  if (matchLog) arts.outputLog = agentId + '/' + matchLog;
738
739
  }
739
- // Notes: check inbox first, then KB (consolidated destination) via source field
740
+ // Notes: inbox KB (via source field) archive (fallback if KB was swept)
740
741
  const itemId = item.id || '___';
741
742
  const matchInbox = _inboxFiles.filter(f => f.includes(agentId) && f.includes(itemId));
742
743
  const matchKb = _kbEntries.filter(kb => kb.source && kb.source.includes(agentId) && kb.source.includes(itemId));
@@ -744,6 +745,11 @@ function getWorkItems(config) {
744
745
  ...matchInbox,
745
746
  ...matchKb.map(kb => 'kb:' + kb.cat + '/' + kb.file),
746
747
  ];
748
+ // Archive fallback — only if nothing found in inbox or KB
749
+ if (allNotes.length === 0) {
750
+ const matchArchive = _archiveFiles.filter(f => f.includes(agentId) && f.includes(itemId));
751
+ for (const f of matchArchive) allNotes.push('archive:' + f);
752
+ }
747
753
  if (allNotes.length > 0) arts.notes = allNotes;
748
754
  }
749
755
  if (item.branch || item.featureBranch) arts.branch = item.branch || item.featureBranch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.685",
3
+ "version": "0.1.686",
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"