@yemi33/minions 0.1.304 → 0.1.306

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.306 (2026-04-03)
4
+
5
+ ### Features
6
+ - Add null guards to dashboard.js request handlers
7
+
8
+ ### Fixes
9
+ - normalize acceptanceCriteria to array (string from doc-chat crashed tick)
10
+
3
11
  ## 0.1.304 (2026-04-03)
4
12
 
5
13
  ### Features
package/dashboard.js CHANGED
@@ -845,9 +845,9 @@ const server = http.createServer(async (req, res) => {
845
845
 
846
846
  // Check if verify was created
847
847
  const project = PROJECTS.find(p => {
848
- const plan = JSON.parse(safeRead(activePath) || safeRead(prdPath) || '{}');
849
- return p.name?.toLowerCase() === (plan.project || '').toLowerCase();
850
- }) || PROJECTS[0];
848
+ const plan = safeJson(activePath) || safeJson(prdPath);
849
+ return plan && p.name?.toLowerCase() === (plan.project || '').toLowerCase();
850
+ }) || PROJECTS[0] || null;
851
851
  if (project) {
852
852
  const wiPath = shared.projectWorkItemsPath(project);
853
853
  const items = JSON.parse(safeRead(wiPath) || '[]');
@@ -1037,6 +1037,7 @@ const server = http.createServer(async (req, res) => {
1037
1037
  if (body.project) {
1038
1038
  // Write to project-specific queue
1039
1039
  const targetProject = PROJECTS.find(p => p.name === body.project) || PROJECTS[0];
1040
+ if (!targetProject) return jsonReply(res, 400, { error: 'No projects configured' });
1040
1041
  wiPath = shared.projectWorkItemsPath(targetProject);
1041
1042
  } else {
1042
1043
  // Write to central queue — agent decides which project
package/engine.js CHANGED
@@ -1484,7 +1484,7 @@ function discoverFromWorkItems(config, project) {
1484
1484
  '- [' + (r.title || r.url) + '](' + r.url + ')' + (r.type ? ' (' + r.type + ')' : '')
1485
1485
  ).join('\n');
1486
1486
  vars.references = refs ? '## References\n\n' + refs : '';
1487
- const ac = (item.acceptanceCriteria || []).map(c => '- [ ] ' + c).join('\n');
1487
+ const ac = normalizeAc(item.acceptanceCriteria).map(c => '- [ ] ' + c).join('\n');
1488
1488
  vars.acceptance_criteria = ac ? '## Acceptance Criteria\n\n' + ac : '';
1489
1489
 
1490
1490
  // Inject checkpoint context if agent left a checkpoint.json from a prior run
@@ -1585,6 +1585,12 @@ function discoverFromWorkItems(config, project) {
1585
1585
  * Build the multi-project context section for central work items.
1586
1586
  * Inserted into the playbook via {{scope_section}}.
1587
1587
  */
1588
+ function normalizeAc(ac) {
1589
+ if (Array.isArray(ac)) return ac;
1590
+ if (typeof ac === 'string') return ac.split('\n').map(s => s.replace(/^[-*]\s*/, '').trim()).filter(Boolean);
1591
+ return [];
1592
+ }
1593
+
1588
1594
  function buildProjectContext(projects, assignedProject, isFanOut, agentName, agentRole) {
1589
1595
  const projectList = projects.map(p => {
1590
1596
  let line = `### ${p.name}\n`;
@@ -1811,7 +1817,7 @@ function discoverCentralWorkItems(config) {
1811
1817
  '- [' + (r.title || r.url) + '](' + r.url + ')' + (r.type ? ' (' + r.type + ')' : '')
1812
1818
  ).join('\n');
1813
1819
  vars.references = fanRefs ? '## References\n\n' + fanRefs : '';
1814
- const fanAc = (item.acceptanceCriteria || []).map(c => '- [ ] ' + c).join('\n');
1820
+ const fanAc = normalizeAc(item.acceptanceCriteria).map(c => '- [ ] ' + c).join('\n');
1815
1821
  vars.acceptance_criteria = fanAc ? '## Acceptance Criteria\n\n' + fanAc : '';
1816
1822
 
1817
1823
  if (workType === 'ask') {
@@ -1887,7 +1893,7 @@ function discoverCentralWorkItems(config) {
1887
1893
  '- [' + (r.title || r.url) + '](' + r.url + ')' + (r.type ? ' (' + r.type + ')' : '')
1888
1894
  ).join('\n');
1889
1895
  vars.references = normRefs ? '## References\n\n' + normRefs : '';
1890
- const normAc = (item.acceptanceCriteria || []).map(c => '- [ ] ' + c).join('\n');
1896
+ const normAc = normalizeAc(item.acceptanceCriteria).map(c => '- [ ] ' + c).join('\n');
1891
1897
  vars.acceptance_criteria = normAc ? '## Acceptance Criteria\n\n' + normAc : '';
1892
1898
 
1893
1899
  // Inject checkpoint context if agent left a checkpoint.json from a prior run
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.304",
3
+ "version": "0.1.306",
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"