@yemi33/minions 0.1.876 → 0.1.877

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,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.876 (2026-04-11)
3
+ ## 0.1.877 (2026-04-11)
4
4
 
5
5
  ### Features
6
6
  - add 13 missing CC action types for full dashboard parity
7
7
 
8
8
  ### Fixes
9
+ - CC action bugs + security guard on generic fallback
9
10
  - reset central work-items.json on agent kill (closes #890) (#891)
10
11
  - include started_at in done/error agent status so duration renders
11
12
 
@@ -1119,14 +1119,14 @@ async function ccExecuteAction(action, targetTabId) {
1119
1119
  break;
1120
1120
  }
1121
1121
  case 'reopen-prd-item': {
1122
- await _ccFetch('/api/prd-items/update', { id: action.id, file: action.file, status: 'updated' });
1122
+ await _ccFetch('/api/prd-items/update', { source: action.file, itemId: action.id, status: 'updated' });
1123
1123
  status.innerHTML = '&#10003; PRD item reopened: <strong>' + escHtml(action.id) + '</strong>';
1124
1124
  status.style.color = 'var(--green)';
1125
1125
  wakeEngine();
1126
1126
  break;
1127
1127
  }
1128
1128
  case 'promote-to-kb': {
1129
- await _ccFetch('/api/inbox/promote-kb', { file: action.file, category: action.category || 'project-notes' });
1129
+ await _ccFetch('/api/inbox/promote-kb', { name: action.file, category: action.category || 'project-notes' });
1130
1130
  status.innerHTML = '&#10003; Promoted to KB: <strong>' + escHtml(action.file) + '</strong>';
1131
1131
  status.style.color = 'var(--green)';
1132
1132
  refresh();
@@ -1186,9 +1186,21 @@ async function ccExecuteAction(action, targetTabId) {
1186
1186
  status.style.color = 'var(--green)';
1187
1187
  break;
1188
1188
  }
1189
- default:
1190
- status.innerHTML = '? Unknown action: ' + escHtml(action.type);
1191
- status.style.color = 'var(--muted)';
1189
+ default: {
1190
+ // Generic fallback: if action has an `endpoint` field, call it directly (local API only)
1191
+ if (action.endpoint && action.endpoint.startsWith('/api/') && !action.endpoint.includes('..')) {
1192
+ var genRes = await _ccFetch(action.endpoint, action.params || {});
1193
+ var genData = await genRes.json().catch(function() { return {}; });
1194
+ status.innerHTML = '&#10003; ' + escHtml(action.type) + ': ' + escHtml(genData.message || genData.id || 'done');
1195
+ status.style.color = 'var(--green)';
1196
+ } else if (action.endpoint) {
1197
+ status.innerHTML = '&#10007; Blocked: endpoint must be a local /api/ path';
1198
+ status.style.color = 'var(--red)';
1199
+ } else {
1200
+ status.innerHTML = '? Unknown action: <strong>' + escHtml(action.type) + '</strong>';
1201
+ status.style.color = 'var(--muted)';
1202
+ }
1203
+ }
1192
1204
  }
1193
1205
  } catch (e) {
1194
1206
  status.innerHTML = '&#10007; Action failed: ' + escHtml(e.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.876",
3
+ "version": "0.1.877",
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"
@@ -43,6 +43,8 @@ I'll dispatch dallas to fix that bug.
43
43
  ===ACTIONS===
44
44
  [{"type": "dispatch", "title": "Fix login bug", "workType": "fix", "agents": ["dallas"], "project": "MyApp", "description": "..."}]
45
45
 
46
+ **Generic fallback:** For any action not listed below, include `"endpoint": "/api/..."` and `"params": {...}` to call the API directly. Example: `{"type": "custom-op", "endpoint": "/api/some/endpoint", "params": {"key": "value"}}`.
47
+
46
48
  Core action types:
47
49
  - **dispatch**: title, workType, priority (low/medium/high), agents[] (optional), project, description
48
50
  workTypes: `explore` (research, NO PR), `ask` (answer/report, NO PR), `implement` (new code, PR REQUIRED), `fix` (bug fix, PR REQUIRED), `review` (code review, NO PR), `test` (tests, PR if new), `verify` (merge/build/maintenance, NO PR)