@yemi33/minions 0.1.672 → 0.1.673

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.673 (2026-04-09)
4
+
5
+ ### Fixes
6
+ - output log matching used work item ID suffix, not dispatch ID
7
+
3
8
  ## 0.1.672 (2026-04-09)
4
9
 
5
10
  ### Features
package/engine/queries.js CHANGED
@@ -707,22 +707,33 @@ function getWorkItems(config) {
707
707
  }
708
708
 
709
709
  // Populate _artifacts for the work item detail modal
710
- // Cache directory listings to avoid N × readdirSync
710
+ // Build dispatch ID work item ID lookup from completed dispatches
711
+ const dispatchByWiId = {};
712
+ for (const d of (dispatch.completed || [])) {
713
+ const wiId = d.meta?.item?.id;
714
+ if (wiId) dispatchByWiId[wiId] = d.id; // last completed dispatch wins
715
+ }
716
+ for (const d of (dispatch.active || [])) {
717
+ const wiId = d.meta?.item?.id;
718
+ if (wiId) dispatchByWiId[wiId] = d.id;
719
+ }
711
720
  const _agentDirCache = {};
712
721
  const _inboxFiles = safeReadDir(INBOX_DIR);
713
722
  for (const item of allItems) {
714
723
  const arts = {};
715
724
  const agentId = item.dispatched_to || item.agent;
716
725
  if (agentId) {
717
- const idSuffix = item.id?.slice(-8) || '___';
718
- // Output log
719
- if (!_agentDirCache[agentId]) {
720
- _agentDirCache[agentId] = safeReadDir(path.join(MINIONS_DIR, 'agents', agentId)).filter(f => f.startsWith('output-') && f.endsWith('.log'));
726
+ // Output log — match by dispatch ID (output-{dispatchId}.log)
727
+ const dispatchId = dispatchByWiId[item.id];
728
+ if (dispatchId) {
729
+ if (!_agentDirCache[agentId]) {
730
+ _agentDirCache[agentId] = safeReadDir(path.join(MINIONS_DIR, 'agents', agentId)).filter(f => f.startsWith('output-') && f.endsWith('.log'));
731
+ }
732
+ const matchLog = _agentDirCache[agentId].find(f => f.includes(dispatchId));
733
+ if (matchLog) arts.outputLog = agentId + '/' + matchLog;
721
734
  }
722
- const matchLog = _agentDirCache[agentId].filter(f => f.includes(idSuffix));
723
- if (matchLog.length > 0) arts.outputLog = agentId + '/' + matchLog[matchLog.length - 1];
724
- // Inbox notes
725
- const matchNotes = _inboxFiles.filter(f => f.includes(agentId) && (f.includes(item.id || '___') || f.includes(idSuffix)));
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 || '___'));
726
737
  if (matchNotes.length > 0) arts.notes = matchNotes;
727
738
  }
728
739
  if (item.branch) arts.branch = item.branch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.672",
3
+ "version": "0.1.673",
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"