@yemi33/minions 0.1.56 → 0.1.57

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/engine.js +15 -18
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.57 (2026-03-30)
4
+
5
+ ### Engine
6
+ - engine.js
7
+
3
8
  ## 0.1.56 (2026-03-30)
4
9
 
5
10
  ### Other
package/engine.js CHANGED
@@ -356,16 +356,23 @@ function renderPlaybook(type, vars) {
356
356
  return null;
357
357
  }
358
358
 
359
- // Inject pinned context (always visible to agents)
359
+ // Inject pinned context (always visible to agents) — capped at 4KB
360
360
  let pinnedContent = '';
361
361
  try { pinnedContent = fs.readFileSync(path.join(MINIONS_DIR, 'pinned.md'), 'utf8'); } catch {}
362
362
  if (pinnedContent) {
363
+ if (pinnedContent.length > 4096) pinnedContent = pinnedContent.slice(0, 4096) + '\n\n_...pinned.md truncated (read full file if needed)_';
363
364
  content += '\n\n---\n\n## Pinned Context (CRITICAL — READ FIRST)\n\n' + pinnedContent;
364
365
  }
365
366
 
366
- // Inject team notes context
367
- const notes = getNotes();
367
+ // Inject team notes (single injection point — not in buildAgentContext) — capped at 8KB
368
+ let notes = getNotes();
368
369
  if (notes) {
370
+ if (notes.length > 8192) {
371
+ const sections = notes.split(/(?=^### )/m);
372
+ const recent = sections.slice(-10).join('');
373
+ notes = recent.length > 8192 ? recent.slice(0, 8192) + '\n\n_...notes truncated_' : recent;
374
+ notes += '\n\n_' + Math.max(0, sections.length - 10) + ' older entries in `notes.md` — Read if needed._';
375
+ }
369
376
  content += '\n\n---\n\n## Team Notes (MUST READ)\n\n' + notes;
370
377
  }
371
378
 
@@ -621,18 +628,8 @@ function buildAgentContext(agentId, config, project) {
621
628
  context += `## Pending Work Queue (${(dispatch.pending || []).length} items)\n\n${pendingItems.join('\n')}${(dispatch.pending || []).length > 10 ? '\n- ... and ' + ((dispatch.pending || []).length - 10) + ' more' : ''}\n\n`;
622
629
  }
623
630
 
624
- // Team notes last 5 sections only (recent learnings, not the full history)
625
- const notes = getNotes();
626
- if (notes) {
627
- const sections = notes.split(/(?=^### )/m);
628
- const header = sections[0] && !sections[0].startsWith('### ') ? sections.shift() : '';
629
- if (sections.length > 5) {
630
- const recent = sections.slice(-5).join('');
631
- context += `## Team Notes (last 5 of ${sections.length})\n\n${recent}\n\n_${sections.length - 5} older entries in \`notes.md\` — Read if needed._\n\n`;
632
- } else {
633
- context += `## Team Notes\n\n${notes}\n\n`;
634
- }
635
- }
631
+ // Team notes injected via renderPlaybook (single injection point, with truncation)
632
+ // Not duplicated here to avoid double-injection and token waste
636
633
 
637
634
  return context;
638
635
  }
@@ -2815,7 +2812,7 @@ function discoverFromWorkItems(config, project) {
2815
2812
  try { vars.notes_content = fs.readFileSync(path.join(MINIONS_DIR, 'notes.md'), 'utf8'); } catch {}
2816
2813
 
2817
2814
  // Inject references and acceptance criteria
2818
- const refs = (item.references || []).map(r =>
2815
+ const refs = (item.references || []).filter(r => r && r.url).map(r =>
2819
2816
  '- [' + (r.title || r.url) + '](' + r.url + ')' + (r.type ? ' (' + r.type + ')' : '')
2820
2817
  ).join('\n');
2821
2818
  vars.references = refs ? '## References\n\n' + refs : '';
@@ -3110,7 +3107,7 @@ function discoverCentralWorkItems(config) {
3110
3107
  };
3111
3108
 
3112
3109
  // Inject references and acceptance criteria
3113
- const fanRefs = (item.references || []).map(r =>
3110
+ const fanRefs = (item.references || []).filter(r => r && r.url).map(r =>
3114
3111
  '- [' + (r.title || r.url) + '](' + r.url + ')' + (r.type ? ' (' + r.type + ')' : '')
3115
3112
  ).join('\n');
3116
3113
  vars.references = fanRefs ? '## References\n\n' + fanRefs : '';
@@ -3185,7 +3182,7 @@ function discoverCentralWorkItems(config) {
3185
3182
  try { vars.notes_content = fs.readFileSync(path.join(MINIONS_DIR, 'notes.md'), 'utf8'); } catch {}
3186
3183
 
3187
3184
  // Inject references and acceptance criteria
3188
- const normRefs = (item.references || []).map(r =>
3185
+ const normRefs = (item.references || []).filter(r => r && r.url).map(r =>
3189
3186
  '- [' + (r.title || r.url) + '](' + r.url + ')' + (r.type ? ' (' + r.type + ')' : '')
3190
3187
  ).join('\n');
3191
3188
  vars.references = normRefs ? '## References\n\n' + normRefs : '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
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"