omnius 1.0.564 → 1.0.565

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/dist/index.js CHANGED
@@ -301014,11 +301014,13 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
301014
301014
  const oldKey = canonicalize2(oldTodos);
301015
301015
  const newKey = canonicalize2(incoming);
301016
301016
  if (oldKey === newKey && oldTodos.length > 0) {
301017
+ const active = oldTodos.find((todo) => todo.status === "in_progress");
301017
301018
  return {
301018
301019
  success: true,
301019
301020
  output: JSON.stringify({
301020
301021
  reminder: "[NO-OP] You called todo_write with the same plan you already have. The list is unchanged. Use todo_write ONLY to add new tasks, mark a task in_progress / completed, or record a blocker — not as a way to re-read your plan (use todo_read for that, but the current plan is also surfaced automatically in your context). Proceed with the current in_progress task.",
301021
- todos: oldTodos,
301022
+ todoCount: oldTodos.length,
301023
+ activeTodoId: active?.id ?? null,
301022
301024
  noop: true,
301023
301025
  noProgress: true
301024
301026
  }),
@@ -301037,11 +301039,23 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
301037
301039
  });
301038
301040
  const verificationNudgeNeeded = justClosed >= 3 && !hasStructuredEvidence;
301039
301041
  const reminder = "Todos have been modified successfully. Ensure that you continue to use the todo list to track your progress. Mark the current task in_progress and the next task pending. Proceed with the current task.";
301042
+ const oldById = new Map(result.oldTodos.map((todo) => [todo.id, todo]));
301043
+ const changedTodoIds = result.newTodos.filter((todo) => {
301044
+ const previous = oldById.get(todo.id);
301045
+ return !previous || previous.status !== todo.status || previous.blocker !== todo.blocker || previous.parentId !== todo.parentId || previous.verifyCommand !== todo.verifyCommand || JSON.stringify(previous.declaredArtifacts ?? []) !== JSON.stringify(todo.declaredArtifacts ?? []);
301046
+ }).map((todo) => todo.id).slice(0, 20);
301047
+ const statusCounts = result.newTodos.reduce((counts, todo) => {
301048
+ counts[todo.status]++;
301049
+ return counts;
301050
+ }, { pending: 0, in_progress: 0, completed: 0, blocked: 0 });
301051
+ const activeTodo = result.newTodos.find((todo) => todo.status === "in_progress");
301040
301052
  const payload = {
301041
301053
  reminder,
301042
301054
  decompositionContract: "Use parentId for sub-todos. Split the active objective into concrete child leaf todos whenever it contains multiple remaining actions. Keep the active in_progress status on one concrete leaf; parent status is derived from children in the UI/context. Use activeForm for the currently-doing wording, owner for assigned agent/sub-agent, and blocks/blockedBy for cross-todo dependencies. When tool evidence invalidates a child, rewrite that child as blocked or split it into new children instead of overclaiming completion.",
301043
- oldTodos: result.oldTodos,
301044
- newTodos: result.newTodos,
301055
+ todoCount: result.newTodos.length,
301056
+ statusCounts,
301057
+ activeTodoId: activeTodo?.id ?? null,
301058
+ changedTodoIds,
301045
301059
  storageMode: "file-per-task+legacy-mirror",
301046
301060
  verificationNudgeNeeded
301047
301061
  };
@@ -579624,6 +579638,13 @@ function retireHistoricalRunEvidence(messages2) {
579624
579638
  if (message2.role !== "system" || typeof message2.content !== "string" || !message2.content.includes("[RUN EVIDENCE]")) {
579625
579639
  continue;
579626
579640
  }
579641
+ if (/\btool=todo_write\b/i.test(message2.content) && /"(?:oldTodos|newTodos)"\s*:/i.test(message2.content)) {
579642
+ out[index] = {
579643
+ ...message2,
579644
+ content: "[RUN EVIDENCE] tool=todo_write status=ok; historical todo payload retired. Use the current todo plan for active state."
579645
+ };
579646
+ continue;
579647
+ }
579627
579648
  const text2 = message2.content.toLowerCase();
579628
579649
  const bucket2 = /\b(?:file_edit|file_write|patch|apply_patch)\b/.test(text2) ? "mutation" : /\b(?:shell|verifier|compile|build|test)\b/.test(text2) ? "verification" : "discovery";
579629
579650
  const retained = retainedByBucket.get(bucket2) ?? 0;
@@ -579944,8 +579965,8 @@ var init_context_compiler = __esm({
579944
579965
  MODEL_FACING_ACTION_GROUND_TRUTH_CHAR_CAP = 5500;
579945
579966
  CONTROLLER_STATE_MARKER = "[CONTROLLER STATE v1]";
579946
579967
  ACTION_GROUND_TRUTH_MARKER = "[RECENT ACTION GROUND TRUTH]";
579947
- LEGACY_RUNTIME_CONTROL_FRAGMENT_RE = /(?:\bREG-\d+\b|\bfocus supervisor\b|\bworld[ -]state\b|\brecent tool failures\b|\bstop\s*[—-]\s*retry loop\b|\bstagnation replan\b|\bfirst-edit nudge\b|\bintra-run lesson\b|\blocal error-informed nudge\b|\b(?:failure|failing)\s+(?:recovery|replan|loop|recap)\b|\b(?:controller|admin)\s+(?:summary|recap|reflection)\b|\bdoom-loop\b|\b(?:prior\s+)?failure reflection\b|\breflexion\b|\b(?:cross-session|prior)\s+lessons?\b|\bprogress gate\b|\bforecast\b)/i;
579948
- LEGACY_RUNTIME_CONTROL_BLOCK_START_RE = /(?:\[(?:REG-\d+|FOCUS SUPERVISOR[^\]]*|WORLD[ -]STATE[^\]]*|RECENT TOOL FAILURES|STOP\s*[—-]\s*RETRY LOOP|STAGNATION REPLAN[^\]]*|FIRST-EDIT NUDGE[^\]]*|INTRA-RUN LESSON[^\]]*|LOCAL ERROR-INFORMED NUDGE[^\]]*|FORECAST[^\]]*|PROGRESS GATE[^\]]*|FAIL(?:URE|ING)[^\]]*(?:RECOVERY|REPLAN|LOOP)[^\]]*|DOOM-LOOP[^\]]*)\]|<(?:world-state|focus-supervisor|failure-recovery|reflection|lessons?)[^>]*>)/i;
579968
+ LEGACY_RUNTIME_CONTROL_FRAGMENT_RE = /(?:\bREG-\d+\b|\bfocus supervisor\b|\bworld[ -]state\b|\brecent tool failures\b|\bstop\s*[—-]\s*retry loop\b|\bstagnation replan\b|\bfirst-edit nudge\b|\bintra-run lesson\b|\blocal error-informed nudge\b|\b(?:failure|failing)\s+(?:recovery|replan|loop|recap)\b|\b(?:controller|admin)\s+(?:summary|recap|reflection)\b|\bdoom-loop\b|\b(?:prior\s+)?failure reflection\b|\breflexion\b|\b(?:cross-session|prior)\s+lessons?\b|\bprogress (?:gate|check)\b|\brestored todo verification\b|\bforecast\b)/i;
579969
+ LEGACY_RUNTIME_CONTROL_BLOCK_START_RE = /(?:\[(?:REG-\d+|FOCUS SUPERVISOR[^\]]*|WORLD[ -]STATE[^\]]*|RECENT TOOL FAILURES|STOP\s*[—-]\s*RETRY LOOP|STAGNATION REPLAN[^\]]*|FIRST-EDIT NUDGE[^\]]*|INTRA-RUN LESSON[^\]]*|LOCAL ERROR-INFORMED NUDGE[^\]]*|FORECAST[^\]]*|PROGRESS (?:GATE|CHECK)[^\]]*|RESTORED TODO VERIFICATION[^\]]*|FAIL(?:URE|ING)[^\]]*(?:RECOVERY|REPLAN|LOOP)[^\]]*|DOOM-LOOP[^\]]*)\]|<(?:world-state|focus-supervisor|failure-recovery|reflection|lessons?)[^>]*>)/i;
579949
579970
  ASSISTANT_READ_INTENT_RETIRED_MARKER = "[assistant read intent retired: the linked tool result is already available; decide from that evidence instead of restating a read plan]";
579950
579971
  RESTORE_NOISE_LINE_RE = /^\s*(?:🔊|E Task timeout reached|E Incomplete:|⚠ Task incomplete|Tokens:\s*[\d,]+|▹\s*continue\b|·\s*(?:Starting fresh|Context (?:auto-)?restored|Nexus P2P network connected|REST API:|Voice feedback enabled|Memory maintenance:)|.*\bSHELL TRANSCRIPT\b.*|.*speaker emoji.*).*$/i;
579951
579972
  RUNTIME_GUIDANCE_RE = /\[RUNTIME_GUIDANCE_INTAKE v\d+\][\s\S]*?<<<RUNTIME_GUIDANCE>>>\s*([\s\S]*?)\s*<<<END_RUNTIME_GUIDANCE>>>[\s\S]*?\[\/RUNTIME_GUIDANCE_INTAKE\]/g;
@@ -600658,6 +600679,65 @@ ${notice}`;
600658
600679
  this._supersededTodoIds.add(todo.id);
600659
600680
  this._workboard = null;
600660
600681
  }
600682
+ /**
600683
+ * A new run may share a TUI/session identifier with its predecessor, but it
600684
+ * does not thereby inherit that predecessor's checklist. Keep the old tree
600685
+ * auditable on disk and hide it from every active guard/context surface.
600686
+ *
600687
+ * Explicit continuation is the sole exception. This prevents an old
600688
+ * implementation checklist from being reinterpreted as a blocker for a new
600689
+ * dashboard, catalog, or unrelated request in the same workspace.
600690
+ */
600691
+ _hidePriorSessionTodosForFreshTask(goal) {
600692
+ const todos = this.readSessionTodos() ?? [];
600693
+ if (todos.length === 0)
600694
+ return;
600695
+ const archivedAt = (/* @__PURE__ */ new Date()).toISOString();
600696
+ try {
600697
+ const dir = _pathJoin(this.omniusStateDir(), "task-epoch-archives");
600698
+ _fsMkdirSync(dir, { recursive: true });
600699
+ _fsWriteFileSync(_pathJoin(dir, `${this._activeRunId || this._sessionId}-prior-todos.json`), JSON.stringify({
600700
+ runId: this._activeRunId || this._sessionId,
600701
+ sessionId: this._sessionId,
600702
+ taskEpoch: this._taskEpoch,
600703
+ archivedAt,
600704
+ reason: "fresh_task_boundary",
600705
+ newGoal: goal.slice(0, 800),
600706
+ todos
600707
+ }, null, 2), "utf8");
600708
+ } catch {
600709
+ }
600710
+ for (const todo of todos)
600711
+ this._supersededTodoIds.add(todo.id);
600712
+ this._workboard = null;
600713
+ this.emit({
600714
+ type: "status",
600715
+ content: `Fresh task boundary archived ${todos.length} prior todo(s); their blockers and verifier requirements are historical, not active state.`,
600716
+ timestamp: archivedAt
600717
+ });
600718
+ }
600719
+ /** Clear verifier and recovery state that is meaningful only for one task epoch. */
600720
+ _resetTaskScopedVerifierState() {
600721
+ this._compileFixLoop = null;
600722
+ this._pendingCompileDelegationCardId = null;
600723
+ this._declaredVerifierCommand = null;
600724
+ this._lastDeclaredVerifierOutput = null;
600725
+ this._lastDeclaredVerifierDiagnostics = [];
600726
+ this._lastBuildOutput = null;
600727
+ this._preFoldErrorCount = null;
600728
+ this._preFoldFixerDescription = null;
600729
+ this._recentFailures = [];
600730
+ this._failureReflections.clear();
600731
+ this._verifyFailures.clear();
600732
+ this._verifyCommandFailures.clear();
600733
+ this._artifactInspectionFailures.clear();
600734
+ this._artifactInspectionDoneThisTurn.clear();
600735
+ this._verifyFailuresBaseline.clear();
600736
+ this._lastBuildSuccessTurn = -1;
600737
+ this._lastBuildSuccessCommand = "";
600738
+ this._worldFacts.lastTest = {};
600739
+ delete this._lastVerifierResult;
600740
+ }
600661
600741
  _activateSteering(record, turn) {
600662
600742
  const requiresReconciliation = steeringRequiresReconciliation(record.intent);
600663
600743
  const gatesOldPlan = steeringGatesOldPlan(record.intent);
@@ -600771,6 +600851,7 @@ ${notice}`;
600771
600851
  }
600772
600852
  const previousEpoch = this._taskEpoch;
600773
600853
  this._archiveSupersededTaskState(previousEpoch, record);
600854
+ this._resetTaskScopedVerifierState();
600774
600855
  this._allowImplicitContinuation = false;
600775
600856
  this._taskEpoch += 1;
600776
600857
  this._contextMemoryTaskRecordId = null;
@@ -602257,11 +602338,7 @@ Respond with the assessment and take the selected evidence-backed action.`;
602257
602338
  this._completionCaveat = null;
602258
602339
  this._completionLedger = null;
602259
602340
  this._focusTerminalLedgerRecorded = false;
602260
- this._compileFixLoop = null;
602261
- this._pendingCompileDelegationCardId = null;
602262
- this._declaredVerifierCommand = null;
602263
- this._lastDeclaredVerifierOutput = null;
602264
- this._lastDeclaredVerifierDiagnostics = [];
602341
+ this._resetTaskScopedVerifierState();
602265
602342
  this._staleEditFamilies.clear();
602266
602343
  this._blockedFullWriteAttempts.clear();
602267
602344
  this._lastReadTurnByPathKey.clear();
@@ -602269,7 +602346,7 @@ Respond with the assessment and take the selected evidence-backed action.`;
602269
602346
  this._lastWorldStateTurn = -1;
602270
602347
  this._fileWritesSinceLastWorldState = 0;
602271
602348
  this._resetVisualEvidenceState();
602272
- this._verifyFailuresBaseline = new Set(this._verifyFailures);
602349
+ this._verifyFailuresBaseline = /* @__PURE__ */ new Set();
602273
602350
  if (typeof this.backend.setAbortSignal === "function") {
602274
602351
  this.backend.setAbortSignal(this._turnAbortController.signal);
602275
602352
  }
@@ -602498,6 +602575,10 @@ Respond with the assessment and take the selected evidence-backed action.`;
602498
602575
  this._memexArchive.clear();
602499
602576
  this._todoOutputLedger.clear();
602500
602577
  this._sessionId = this.options.sessionId && String(this.options.sessionId) || process.env["OMNIUS_SESSION_ID"] && String(process.env["OMNIUS_SESSION_ID"]) || `session-${Date.now()}`;
602578
+ const continuesPriorTask = this._allowImplicitContinuation || this._isContinuationResumeGoal(persistentTaskGoal);
602579
+ if (!continuesPriorTask) {
602580
+ this._hidePriorSessionTodosForFreshTask(persistentTaskGoal);
602581
+ }
602501
602582
  this._appState = createAppState({
602502
602583
  sessionId: this._sessionId,
602503
602584
  model: this.backend.model ?? "",
@@ -613613,7 +613694,7 @@ ${trimmedNew}`;
613613
613694
  _isLegacyControlMessage(message2) {
613614
613695
  if (message2.role !== "system" || typeof message2.content !== "string")
613615
613696
  return false;
613616
- return /^(?:\[(?:FIRST-EDIT NUDGE|STAGNATION(?: REPLAN| RECIPE)|STUCK DETECTOR HALT|STUCK-STATE META-ANALYZER|WRITE-THRASH HALT|EDIT-FAIL-THRASH HALT|PROBLEM-FRAME VALIDATION|STICKY ESCALATION|INTRA-RUN LESSON|LEARNED FROM EXPERIENCE|FOCUS SUPERVISOR|REG-\d+ directive active|OPAQUE LOCAL ERROR|LOCAL ERROR-INFORMED NUDGE|PRIOR LESSONS|FAILURE-MODE INTAKE|REFLECTION|Associative Memory)|LOOP CIRCUIT BREAKER)/.test(message2.content);
613697
+ return /^(?:\[(?:FIRST-EDIT NUDGE|STAGNATION(?: REPLAN| RECIPE)|STUCK DETECTOR HALT|STUCK-STATE META-ANALYZER|WRITE-THRASH HALT|EDIT-FAIL-THRASH HALT|PROBLEM-FRAME VALIDATION|STICKY ESCALATION|INTRA-RUN LESSON|LEARNED FROM EXPERIENCE|FOCUS SUPERVISOR|REG-\d+ directive active|OPAQUE LOCAL ERROR|LOCAL ERROR-INFORMED NUDGE|PRIOR LESSONS|FAILURE-MODE INTAKE|REFLECTION|Associative Memory|PROGRESS CHECK|RESTORED TODO VERIFICATION)|LOOP CIRCUIT BREAKER)/.test(message2.content);
613617
613698
  }
613618
613699
  _stripLegacyControlMessages(messages2) {
613619
613700
  for (let index = messages2.length - 1; index >= 0; index--) {
@@ -761430,7 +761511,10 @@ async function runSelfImprovementCycle(repoRoot) {
761430
761511
  } catch {
761431
761512
  }
761432
761513
  }
761433
- function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality, deepContext, onCompaction, emotionEngine, flowEnabled, slashCommandHandler, thinkingEnabled, askUserCallback, selfModifyEnabled, sessionMetrics, realtimeEnabled, restoredRunSessionId, restoredOrientation) {
761514
+ function isExplicitRestoredTaskContinuation(input) {
761515
+ return /^(?:continue|resume|pick\s+up|carry\s+on)\b/i.test(input.trim());
761516
+ }
761517
+ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality, deepContext, onCompaction, emotionEngine, flowEnabled, slashCommandHandler, thinkingEnabled, askUserCallback, selfModifyEnabled, sessionMetrics, realtimeEnabled, restoredRunSessionId, restoredOrientation, actualUserGoal) {
761434
761518
  const voiceStyleMap = {
761435
761519
  concise: 1,
761436
761520
  balanced: 3,
@@ -763202,7 +763286,11 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
763202
763286
  ownerId: `session:${sessionId}`
763203
763287
  },
763204
763288
  async () => {
763205
- const result = await runner.run(effectiveTask, systemContext);
763289
+ const result = await runner.run(
763290
+ effectiveTask,
763291
+ systemContext,
763292
+ actualUserGoal ?? task
763293
+ );
763206
763294
  _apiCallbacks?.onRunResult?.(result);
763207
763295
  const tokens = {
763208
763296
  total: result.totalTokens,
@@ -769459,7 +769547,8 @@ ${formatTaskCompletionMeta(previousMetaForIntake)}`
769459
769547
  } catch {
769460
769548
  }
769461
769549
  let taskInput = fullInput;
769462
- let taskSessionId = restoredTaskSessionId;
769550
+ const reuseRestoredTaskSession = Boolean(restoredTaskSessionId) && isExplicitRestoredTaskContinuation(fullInput);
769551
+ let taskSessionId = reuseRestoredTaskSession ? restoredTaskSessionId : null;
769463
769552
  let restoredOrientation = null;
769464
769553
  if (restoredSessionContext) {
769465
769554
  restoredOrientation = sanitizeRestorePromptForModel(restoredSessionContext);
@@ -769516,7 +769605,8 @@ ${taskInput}`;
769516
769605
  sessionMetrics,
769517
769606
  realtimeEnabled,
769518
769607
  taskSessionId,
769519
- restoredOrientation
769608
+ restoredOrientation,
769609
+ fullInput
769520
769610
  );
769521
769611
  activeTask = task;
769522
769612
  _recallText = null;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.564",
3
+ "version": "1.0.565",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.564",
9
+ "version": "1.0.565",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.564",
3
+ "version": "1.0.565",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",