@yemi33/minions 0.1.438 → 0.1.440

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,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.438 (2026-04-06)
3
+ ## 0.1.440 (2026-04-06)
4
+
5
+ ### Fixes
6
+ - safeFetch compat — drop AbortSignal.any, avoid opts mutation
7
+
8
+ ## 0.1.439 (2026-04-06)
4
9
 
5
10
  ### Features
6
11
  - version check interval on settings page
@@ -11,6 +16,7 @@
11
16
  - Convert remaining lifecycle.js safeWrite calls to mutateJsonFileLocked
12
17
 
13
18
  ### Fixes
19
+ - prevent HTTP/1.1 connection exhaustion with safeFetch timeout
14
20
  - KB sweep failed state visible for 60s, auto-release stale guard
15
21
  - agent detail fetch error shows retry and close buttons
16
22
  - New Session fully resets command center state
@@ -115,7 +115,7 @@ async function refreshLiveOutput() {
115
115
  if (!currentAgentId || currentTab !== 'live') { stopLivePolling(); return; }
116
116
  if (_steerInFlight) return; // Don't clobber immediate steering feedback
117
117
  try {
118
- const text = await fetch('/api/agent/' + currentAgentId + '/live?tail=16384').then(r => r.text());
118
+ const text = await safeFetch('/api/agent/' + currentAgentId + '/live?tail=16384').then(r => r.text());
119
119
  const el = document.getElementById('live-messages');
120
120
  if (el) {
121
121
  const wasAtBottom = el.scrollHeight - el.scrollTop - el.clientHeight < 150;
@@ -95,7 +95,7 @@ function _processStatusUpdate(data) {
95
95
 
96
96
  async function refresh() {
97
97
  try {
98
- const data = await fetch('/api/status').then(r => r.json());
98
+ const data = await safeFetch('/api/status').then(r => r.json());
99
99
  _processStatusUpdate(data);
100
100
  } catch(e) { console.error('refresh error', e); }
101
101
  }
@@ -34,7 +34,7 @@ async function openAgentDetail(id) {
34
34
  (agent.resultSummary ? '<div style="margin-top:4px;font-size:11px;color:var(--text);line-height:1.4">' + renderMd(agent.resultSummary.slice(0, 300)) + '</div>' : '');
35
35
 
36
36
  try {
37
- const detail = await fetch('/api/agent/' + id).then(r => r.json());
37
+ const detail = await safeFetch('/api/agent/' + id).then(r => r.json());
38
38
  renderDetailTabs(detail);
39
39
  renderDetailContent(detail, currentTab);
40
40
  } catch(e) {
@@ -93,4 +93,15 @@ function rerenderPrdFromCache() {
93
93
  renderPrd(window._lastStatus.prd, window._lastStatus.prdProgress);
94
94
  }
95
95
 
96
- window.MinionsState = { getPageFromUrl, switchPage, getPrdRequeueState, setPrdRequeueState, clearPrdRequeueState, prunePrdRequeueState, rerenderPrdFromCache };
96
+ // Global fetch wrapper with timeout prevents connection exhaustion from hung requests.
97
+ // Use for all short API calls. Long-lived streams (CC, doc-chat) manage their own AbortControllers.
98
+ function safeFetch(url, opts) {
99
+ var timeout = (opts && opts.timeout) || 15000;
100
+ var controller = new AbortController();
101
+ var timer = setTimeout(function() { controller.abort(); }, timeout);
102
+ var fetchOpts = Object.assign({}, opts, { signal: controller.signal });
103
+ delete fetchOpts.timeout;
104
+ return fetch(url, fetchOpts).finally(function() { clearTimeout(timer); });
105
+ }
106
+
107
+ window.MinionsState = { getPageFromUrl, switchPage, getPrdRequeueState, setPrdRequeueState, clearPrdRequeueState, prunePrdRequeueState, rerenderPrdFromCache, safeFetch };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.438",
3
+ "version": "0.1.440",
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"