@yemi33/minions 0.1.1631 → 0.1.1632

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,8 +1,9 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.1631 (2026-04-30)
3
+ ## 0.1.1632 (2026-04-30)
4
4
 
5
5
  ### Features
6
+ - guard malformed PR context
6
7
  - clear stale pending reason on retry
7
8
 
8
9
  ## 0.1.1629 (2026-04-29)
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "runtime": "copilot",
3
3
  "models": null,
4
- "cachedAt": "2026-04-30T08:43:57.738Z"
4
+ "cachedAt": "2026-04-30T08:44:52.884Z"
5
5
  }
@@ -570,7 +570,7 @@ function buildAgentContext(agentId, config, project) {
570
570
  } catch (e) { log('warn', 'read central pull-requests: ' + e.message); }
571
571
  if (allPrs.length > 0) {
572
572
  const prLines = allPrs.map(pr =>
573
- `- **${pr.id}** (${pr._project}): ${(pr.title || '').slice(0, 80)} [${(pr.reviewStatus || 'pending')}${pr.buildStatus === 'failing' ? ', BUILD FAILING' : ''}]${pr.branch ? ' branch: `' + pr.branch + '`' : ''}${pr._context ? ' — ' + pr._context.slice(0, 100) : ''}`
573
+ `- **${pr.id}** (${pr._project}): ${(pr.title || '').slice(0, 80)} [${(pr.reviewStatus || 'pending')}${pr.buildStatus === 'failing' ? ', BUILD FAILING' : ''}]${pr.branch ? ' branch: `' + pr.branch + '`' : ''}${formatPrContextSuffix(pr)}`
574
574
  );
575
575
  context += `## Active Pull Requests\n\n${prLines.join('\n')}\n\n`;
576
576
  }
@@ -589,6 +589,18 @@ function buildAgentContext(agentId, config, project) {
589
589
  return context;
590
590
  }
591
591
 
592
+ function formatPrContextSuffix(pr) {
593
+ if (!Object.prototype.hasOwnProperty.call(pr, '_context')) return '';
594
+ const value = pr._context;
595
+ if (value === undefined || value === '') return '';
596
+ if (typeof value === 'string') return ` — ${value.slice(0, 100)}`;
597
+
598
+ const type = value === null ? 'null' : Array.isArray(value) ? 'array' : typeof value;
599
+ const serialized = (value !== null && typeof value === 'object') ? JSON.stringify(value) : String(value);
600
+ const preview = serialized ? `: ${serialized.slice(0, 100)}` : '';
601
+ return ` — [invalid _context: expected string, got ${type}${preview}]`;
602
+ }
603
+
592
604
  // ─── Work Discovery Helpers ──────────────────────────────────────────────────
593
605
 
594
606
  function buildBaseVars(agentId, config, project) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.1631",
3
+ "version": "0.1.1632",
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"