@yemi33/minions 0.1.636 → 0.1.638

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.638 (2026-04-08)
4
+
5
+ ### Other
6
+ - refactor: unify retry bypass pattern in discoverCentralWorkItems
7
+ - perf: reduce CC/doc-chat tool eagerness and max-turns
8
+
3
9
  ## 0.1.636 (2026-04-08)
4
10
 
5
11
  ### Fixes
package/dashboard.js CHANGED
@@ -538,10 +538,10 @@ Additional: pause-plan, approve-plan, reject-plan, archive-plan, edit-prd-item,
538
538
  Terms like schedules, pipelines, agents, inbox, work items, plans, PRD, PRs, dispatch, routing, KB, notes, pinned, meetings have Minions-specific meanings. Always resolve against Minions state first (read files or call APIs). Fall back to generic only if no Minions context exists.
539
539
 
540
540
  ## Rules
541
- 1. Use tools proactivelyread files before answering.
541
+ 1. Answer from the state preamble and context first. Only use tools for specific file lookups the user asked about not to explore or investigate.
542
542
  2. Be specific — cite IDs, names, filenames, line numbers.
543
543
  3. Never modify engine source. Never push to git without user confirmation.
544
- 4. Delegate exploration to agents. You are the dispatcher, not the worker.`;
544
+ 4. Delegate exploration to agents. You are the dispatcher, not the worker. If answering requires reading more than 2-3 files, dispatch an agent instead.`;
545
545
 
546
546
  // Hash the system prompt so we can detect changes and invalidate stale sessions
547
547
  const _ccPromptHash = require('crypto').createHash('md5').update(CC_STATIC_SYSTEM_PROMPT).digest('hex').slice(0, 8);
@@ -694,7 +694,7 @@ function updateSession(store, key, sessionId, existing) {
694
694
  * @param {number} opts.maxTurns - Max tool-use turns
695
695
  * @param {string} opts.allowedTools - Comma-separated tool list
696
696
  */
697
- async function ccCall(message, { store = 'cc', sessionKey, extraContext, label = 'command-center', timeout = 900000, maxTurns = 50, allowedTools = 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch', skipStatePreamble = false, model } = {}) {
697
+ async function ccCall(message, { store = 'cc', sessionKey, extraContext, label = 'command-center', timeout = 900000, maxTurns = 25, allowedTools = 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch', skipStatePreamble = false, model } = {}) {
698
698
  if (!model) model = CONFIG.engine?.ccModel || shared.ENGINE_DEFAULTS.ccModel;
699
699
  const ccEffort = CONFIG.engine?.ccEffort || shared.ENGINE_DEFAULTS.ccEffort;
700
700
  const existing = resolveSession(store, sessionKey);
@@ -792,6 +792,9 @@ async function ccDocCall({ message, document, title, filePath, selection, canEdi
792
792
  const result = await ccCall(message, {
793
793
  store: 'doc', sessionKey,
794
794
  extraContext: docContext, label: 'doc-chat',
795
+ allowedTools: canEdit ? 'Read,Write,Edit,Glob,Grep' : 'Read,Glob,Grep',
796
+ maxTurns: canEdit ? 15 : 10,
797
+ skipStatePreamble: true,
795
798
  ...(model ? { model } : {}),
796
799
  });
797
800
  // Store doc hash for next call's unchanged check
@@ -3356,7 +3359,7 @@ What would you like to discuss or change? When you're happy, say "approve" and I
3356
3359
  const streamModel = CONFIG.engine?.ccModel || shared.ENGINE_DEFAULTS.ccModel;
3357
3360
  const streamEffort = CONFIG.engine?.ccEffort || shared.ENGINE_DEFAULTS.ccEffort;
3358
3361
  const llmPromise = callLLMStreaming(prompt, CC_STATIC_SYSTEM_PROMPT, {
3359
- timeout: 900000, label: 'command-center', model: streamModel, maxTurns: 50,
3362
+ timeout: 900000, label: 'command-center', model: streamModel, maxTurns: 25,
3360
3363
  allowedTools: 'Bash,Read,Write,Edit,Glob,Grep,WebFetch,WebSearch',
3361
3364
  sessionId, effort: streamEffort, direct: true,
3362
3365
  onChunk: (text) => {
package/engine.js CHANGED
@@ -2142,23 +2142,25 @@ function discoverCentralWorkItems(config) {
2142
2142
  if (item.status !== WI_STATUS.QUEUED && item.status !== WI_STATUS.PENDING) continue;
2143
2143
 
2144
2144
  const key = `central-work-${item.id}`;
2145
- // Self-heal: if already dispatched but work item is still pending, fix the status
2146
2145
  // Skip dedup for items explicitly marked for retry (_retryCount set by engine)
2147
- if (!item._retryCount && isAlreadyDispatched(key)) {
2148
- // Only self-heal to DISPATCHED if actually in dispatch.active (agent spawned) (#480)
2149
- const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
2150
- if (existingActive) {
2151
- const m = {};
2152
- if (item.status === WI_STATUS.PENDING) { m.status = WI_STATUS.DISPATCHED; }
2153
- if (!item.dispatched_to && existingActive.agent) { m.dispatched_to = existingActive.agent; }
2154
- if (Object.keys(m).length > 0) mutations.set(item.id, m);
2146
+ const isRetry = !!item._retryCount;
2147
+ if (isAlreadyDispatched(key)) {
2148
+ if (isRetry) {
2149
+ // Retry items bypass completed-dedup but still block if in-flight
2150
+ const inFlight = [...(getDispatch().pending || []), ...(getDispatch().active || [])];
2151
+ if (inFlight.some(d => d.meta?.dispatchKey === key)) continue;
2152
+ // Not in-flight fall through to dispatch
2153
+ } else {
2154
+ // Self-heal: set DISPATCHED only when in dispatch.active (agent spawned) (#480)
2155
+ const existingActive = getDispatch().active?.find(d => d.meta?.dispatchKey === key);
2156
+ if (existingActive) {
2157
+ const m = {};
2158
+ if (item.status === WI_STATUS.PENDING) { m.status = WI_STATUS.DISPATCHED; }
2159
+ if (!item.dispatched_to && existingActive.agent) { m.dispatched_to = existingActive.agent; }
2160
+ if (Object.keys(m).length > 0) mutations.set(item.id, m);
2161
+ }
2162
+ continue;
2155
2163
  }
2156
- continue;
2157
- }
2158
- // Still block if actively in flight (pending or active dispatch)
2159
- if (item._retryCount && isAlreadyDispatched(key)) {
2160
- const inFlight = [...(getDispatch().pending || []), ...(getDispatch().active || [])];
2161
- if (inFlight.some(d => d.meta?.dispatchKey === key)) continue;
2162
2164
  }
2163
2165
  if (isOnCooldown(key, 0)) continue;
2164
2166
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yemi33/minions",
3
- "version": "0.1.636",
3
+ "version": "0.1.638",
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"