@yemi33/minions 0.1.682 → 0.1.684

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,17 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.682 (2026-04-09)
3
+ ## 0.1.684 (2026-04-09)
4
+
5
+ ### Fixes
6
+ - link work item artifacts to KB entries, not raw archive copies
7
+
8
+ ## 0.1.683 (2026-04-09)
4
9
 
5
10
  ### Features
6
11
  - horizontal node chain pipeline visualization (TDD)
7
12
 
8
13
  ### Fixes
14
+ - search notes/archive for consolidated learnings in artifacts
9
15
  - pipeline node chain overlap — truncate labels, remove old stageFlow
10
16
 
11
17
  ## 0.1.678 (2026-04-09)
@@ -458,8 +458,17 @@ 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
- var noteLabel = noteFile.replace(/\.md$/, '').slice(0, 30);
462
- artPills += '<span onclick="openInboxNote(\'' + escHtml(noteFile) + '\')" style="' + pillStyle + '">📝 ' + escHtml(noteLabel) + '</span> ';
461
+ // KB entries prefixed with 'kb:category/file'
462
+ if (noteFile.startsWith('kb:')) {
463
+ var kbParts = noteFile.slice(3).split('/');
464
+ var kbCat = kbParts[0];
465
+ var kbFile = kbParts.slice(1).join('/');
466
+ var kbLabel = kbFile.replace(/\.md$/, '').slice(0, 30);
467
+ artPills += '<span onclick="kbOpenItem(\'' + escHtml(kbCat) + '\',\'' + escHtml(kbFile) + '\')" style="' + pillStyle + '">📚 ' + escHtml(kbLabel) + '</span> ';
468
+ } else {
469
+ var noteLabel = noteFile.replace(/\.md$/, '').slice(0, 30);
470
+ artPills += '<span onclick="openInboxNote(\'' + escHtml(noteFile) + '\')" style="' + pillStyle + '">📝 ' + escHtml(noteLabel) + '</span> ';
471
+ }
463
472
  });
464
473
  if (arts.skills && arts.skills.length > 0) arts.skills.forEach(function(s) { artPills += '<span onclick="openSkill(\'' + escHtml(s) + '\',\'minions\',\'\')" style="' + pillStyle + '">⚙ ' + escHtml(s) + '</span> '; });
465
474
  if (artPills) html += field('Artifacts', '<div style="display:flex;flex-wrap:wrap;gap:4px">' + artPills + '</div>');
@@ -503,15 +512,10 @@ function viewAgentOutput(logPath) {
503
512
  }
504
513
 
505
514
  function openInboxNote(filename) {
506
- // Find in inboxData by filename, or open directly via fetch
507
515
  var idx = (inboxData || []).findIndex(function(item) { return item.name === filename; });
508
- if (idx >= 0) {
509
- openModal(idx);
510
- } else {
511
- // Fallback: switch to inbox page
512
- closeModal();
513
- switchPage('inbox');
514
- }
516
+ if (idx >= 0) { openModal(idx); return; }
517
+ closeModal();
518
+ switchPage('inbox');
515
519
  }
516
520
 
517
521
  window.MinionsWork = { wiRow, renderWorkItems, editWorkItem, submitWorkItemEdit, deleteWorkItem, archiveWorkItem, toggleWorkItemArchive, retryWorkItem, wiPrev, wiNext, feedbackWorkItem, submitFeedback, openCreateWorkItemModal, openWorkItemDetail, openAllWorkItems, viewAgentOutput, openInboxNote };
package/engine/queries.js CHANGED
@@ -592,10 +592,12 @@ function getKnowledgeBaseEntries() {
592
592
  const title = titleMatch ? titleMatch[1].trim() : f.replace(/\.md$/, '');
593
593
  const agentMatch = f.match(/^\d{4}-\d{2}-\d{2}-(\w+)-/);
594
594
  const dateMatch = f.match(/^(\d{4}-\d{2}-\d{2})/);
595
+ const sourceMatch = content.match(/^source:\s*(.+)/m);
595
596
  entries.push({
596
597
  cat, file: f, title,
597
598
  agent: agentMatch ? agentMatch[1] : '',
598
599
  date: dateMatch ? dateMatch[1] : '',
600
+ source: sourceMatch ? sourceMatch[1].trim() : '',
599
601
  preview: content.slice(0, 200),
600
602
  size: content.length,
601
603
  });
@@ -719,6 +721,8 @@ function getWorkItems(config) {
719
721
  }
720
722
  const _agentDirCache = {};
721
723
  const _inboxFiles = safeReadDir(INBOX_DIR);
724
+ // Use cached KB entries (includes source frontmatter field)
725
+ const _kbEntries = getKnowledgeBaseEntries();
722
726
  for (const item of allItems) {
723
727
  const arts = {};
724
728
  const agentId = item.dispatched_to || item.agent;
@@ -732,9 +736,15 @@ function getWorkItems(config) {
732
736
  const matchLog = _agentDirCache[agentId].find(f => f.includes(dispatchId));
733
737
  if (matchLog) arts.outputLog = agentId + '/' + matchLog;
734
738
  }
735
- // Inbox notes match by agent ID + work item ID in filename
736
- const matchNotes = _inboxFiles.filter(f => f.includes(agentId) && f.includes(item.id || '___'));
737
- if (matchNotes.length > 0) arts.notes = matchNotes;
739
+ // Notes: check inbox first, then KB (consolidated destination) via source field
740
+ const itemId = item.id || '___';
741
+ const matchInbox = _inboxFiles.filter(f => f.includes(agentId) && f.includes(itemId));
742
+ const matchKb = _kbEntries.filter(kb => kb.source && kb.source.includes(agentId) && kb.source.includes(itemId));
743
+ const allNotes = [
744
+ ...matchInbox,
745
+ ...matchKb.map(kb => 'kb:' + kb.cat + '/' + kb.file),
746
+ ];
747
+ if (allNotes.length > 0) arts.notes = allNotes;
738
748
  }
739
749
  if (item.branch || item.featureBranch) arts.branch = item.branch || item.featureBranch;
740
750
  if (item.sourcePlan) arts.sourcePlan = item.sourcePlan;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.682",
3
+ "version": "0.1.684",
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"