@yemi33/minions 0.1.850 → 0.1.851

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.850 (2026-04-11)
3
+ ## 0.1.851 (2026-04-11)
4
4
 
5
5
  ### Features
6
+ - per-type heartbeat timeouts for read-heavy work types (#652)
6
7
  - Replace raw status strings with WI_STATUS constants in dashboard.js (#657)
7
8
  - fix dispatch.json race condition in CLI kill-all (#653)
8
9
  - optimistic UI updates for all remaining dashboard pages
package/engine/shared.js CHANGED
@@ -552,6 +552,7 @@ const ENGINE_DEFAULTS = {
552
552
  ignoredCommentAuthors: [], // comments from these authors are auto-closed and never trigger fixes
553
553
  ccModel: 'sonnet', // model for Command Center and doc-chat (sonnet, haiku, opus)
554
554
  ccEffort: null, // effort level for CC/doc-chat (null, 'low', 'medium', 'high')
555
+ heartbeatTimeouts: {}, // populated after WORK_TYPE is defined (below)
555
556
  ccMaxTurns: 50, // max tool-use turns for CC/doc-chat before CLI stops
556
557
  // Teams integration — config.teams shape: { enabled, appId, appPassword, notifyEvents, ccMirror, inboxPollInterval }
557
558
  teams: {
@@ -582,6 +583,15 @@ const WORK_TYPE = {
582
583
  VERIFY: 'verify', PLAN: 'plan', PLAN_TO_PRD: 'plan-to-prd', DECOMPOSE: 'decompose',
583
584
  MEETING: 'meeting', EXPLORE: 'explore', ASK: 'ask', TEST: 'test', DOCS: 'docs',
584
585
  };
586
+
587
+ // Per-work-type heartbeat timeouts (ms) — read-heavy tasks need longer silence windows.
588
+ // Keyed by WORK_TYPE constants; types not listed fall back to ENGINE_DEFAULTS.heartbeatTimeout.
589
+ Object.assign(ENGINE_DEFAULTS.heartbeatTimeouts, {
590
+ [WORK_TYPE.EXPLORE]: 600000, // 10 min — spends most time reading/analyzing, minimal stdout
591
+ [WORK_TYPE.ASK]: 600000, // 10 min — research-heavy, long silent analysis periods
592
+ [WORK_TYPE.REVIEW]: 480000, // 8 min — code review reads extensively before producing output
593
+ });
594
+
585
595
  const PLAN_STATUS = {
586
596
  ACTIVE: 'active', AWAITING_APPROVAL: 'awaiting-approval', APPROVED: 'approved',
587
597
  PAUSED: 'paused', REJECTED: 'rejected', COMPLETED: 'completed',
package/engine/timeout.js CHANGED
@@ -9,7 +9,7 @@ const shared = require('./shared');
9
9
  const queries = require('./queries');
10
10
 
11
11
  const { safeRead, safeWrite, safeJson, mutateJsonFileLocked, getProjects, projectWorkItemsPath, log, ts,
12
- ENGINE_DEFAULTS: DEFAULTS, WI_STATUS, DISPATCH_RESULT, AGENT_STATUS } = shared;
12
+ ENGINE_DEFAULTS: DEFAULTS, WI_STATUS, WORK_TYPE, DISPATCH_RESULT, AGENT_STATUS } = shared;
13
13
  const { getDispatch, getAgentStatus } = queries;
14
14
  const AGENTS_DIR = queries.AGENTS_DIR;
15
15
  const MINIONS_DIR = shared.MINIONS_DIR;
@@ -130,7 +130,7 @@ function checkTimeouts(config) {
130
130
  const { runPostCompletionHooks } = require('./lifecycle');
131
131
 
132
132
  const timeout = config.engine?.agentTimeout || DEFAULTS.agentTimeout;
133
- const heartbeatTimeout = config.engine?.heartbeatTimeout || DEFAULTS.heartbeatTimeout;
133
+ const defaultHeartbeatTimeout = config.engine?.heartbeatTimeout || DEFAULTS.heartbeatTimeout;
134
134
 
135
135
  // Per-type heartbeat timeouts: merge ENGINE_DEFAULTS ← config overrides
136
136
  const perTypeTimeouts = { ...DEFAULTS.heartbeatTimeouts, ...(config.engine?.heartbeatTimeouts || {}) };
@@ -155,6 +155,10 @@ function checkTimeouts(config) {
155
155
  for (const item of (dispatchData.active || [])) {
156
156
  if (!item.agent) continue;
157
157
 
158
+ // Per-type heartbeat: look up work type from dispatch item, fall back to default
159
+ const workType = item.workType || item.meta?.item?.type;
160
+ const heartbeatTimeout = (workType && perTypeTimeouts[workType]) || defaultHeartbeatTimeout;
161
+
158
162
  const hasProcess = activeProcesses.has(item.id);
159
163
  const liveLogPath = path.join(AGENTS_DIR, item.agent, 'live-output.log');
160
164
  let lastActivity = item.started_at ? new Date(item.started_at).getTime() : 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.850",
3
+ "version": "0.1.851",
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"