iosm-cli 0.3.2 → 0.3.3

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.
@@ -111,9 +111,17 @@ function deriveMetaRequiredTopLevelTaskCalls(userInput, taskPlanSnapshot) {
111
111
  const requested = parseRequestedParallelAgentCount(userInput);
112
112
  if (requested)
113
113
  return requested;
114
- if (!taskPlanSnapshot)
114
+ if (taskPlanSnapshot) {
115
+ return Math.max(2, Math.min(3, taskPlanSnapshot.totalSteps));
116
+ }
117
+ const normalized = userInput.trim();
118
+ if (!normalized || normalized.startsWith("/"))
119
+ return undefined;
120
+ // Language-agnostic conversational guard: direct question prompts should stay chat-first.
121
+ if (/[??]\s*$/.test(normalized))
115
122
  return undefined;
116
- return Math.max(2, Math.min(3, taskPlanSnapshot.totalSteps));
123
+ // Meta mode is orchestration-first for actionable work; enforce a minimal default fan-out.
124
+ return 2;
117
125
  }
118
126
  function extractTaskToolErrorText(result) {
119
127
  if (!result || typeof result !== "object")
@@ -10395,9 +10403,8 @@ export class InteractiveMode {
10395
10403
  return;
10396
10404
  }
10397
10405
  const explicitRequested = parseRequestedParallelAgentCount(userInput);
10398
- const hasComplexSignal = /\b(audit|security|hardening|refactor|migration|orchestrat|parallel|delegate|multi[-\s]?agent)\b/i.test(userInput);
10399
10406
  const fallbackParallel = Math.max(1, explicitRequested ??
10400
- (hasComplexSignal
10407
+ (details.nestedDelegationMissing
10401
10408
  ? Math.max(details.requiredTopLevelTasks, 6)
10402
10409
  : Math.max(details.requiredTopLevelTasks, 3)));
10403
10410
  this.showWarning(`META enforcement fallback: orchestration contract not satisfied (${details.launchedTopLevelTasks}/${details.requiredTopLevelTasks} task calls). Launching /swarm run.`);