omnius 1.0.371 → 1.0.372

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
@@ -295288,8 +295288,12 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
295288
295288
  const closedCount = result.newTodos.filter((t2) => t2.status === "completed").length;
295289
295289
  const oldClosedCount = oldTodos.filter((t2) => t2.status === "completed").length;
295290
295290
  const justClosed = closedCount - oldClosedCount;
295291
- const hasVerifyItem = result.newTodos.some((t2) => /verif|test|check|confirm|validate/i.test(t2.content));
295292
- const verificationNudgeNeeded = justClosed >= 3 && !hasVerifyItem;
295291
+ const hasStructuredEvidence = result.newTodos.some((t2) => {
295292
+ const verifyCommand = t2.verifyCommand;
295293
+ const declaredArtifacts = t2.declaredArtifacts;
295294
+ return typeof verifyCommand === "string" && verifyCommand.trim().length > 0 || Array.isArray(declaredArtifacts) && declaredArtifacts.length > 0;
295295
+ });
295296
+ const verificationNudgeNeeded = justClosed >= 3 && !hasStructuredEvidence;
295293
295297
  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.";
295294
295298
  const payload = {
295295
295299
  reminder,
@@ -559107,6 +559111,99 @@ var init_completionLedger = __esm({
559107
559111
  }
559108
559112
  });
559109
559113
 
559114
+ // packages/orchestrator/dist/completionAutoFinalize.js
559115
+ function buildTruthBasedCompletion(input) {
559116
+ const maxAge = input.maxValidationAgeTurns ?? 8;
559117
+ if (input.todos.length === 0) {
559118
+ return { ready: false, reason: "no active todo tree" };
559119
+ }
559120
+ const open2 = input.todos.filter((todo) => todo.status !== "completed");
559121
+ if (open2.length > 0) {
559122
+ return { ready: false, reason: `${open2.length} open todo(s)` };
559123
+ }
559124
+ if (input.verifyFailureCount > 0) {
559125
+ return {
559126
+ ready: false,
559127
+ reason: `${input.verifyFailureCount} unresolved verification failure(s)`
559128
+ };
559129
+ }
559130
+ if (input.lastValidationTurn < 0 || !input.lastValidationCommand.trim()) {
559131
+ return { ready: false, reason: "no successful declared validation" };
559132
+ }
559133
+ const age = input.currentTurn - input.lastValidationTurn;
559134
+ if (age < 0 || age > maxAge) {
559135
+ return {
559136
+ ready: false,
559137
+ reason: `validation is stale (${age} turn(s) old)`
559138
+ };
559139
+ }
559140
+ const files = (input.filesEdited ?? []).filter((file) => file.path.trim().length > 0).slice(0, 12);
559141
+ const todoLines = input.todos.slice(0, 12).map((todo) => {
559142
+ const id = todo.id ? `${todo.id}: ` : "";
559143
+ return `- ${id}${todo.content}`;
559144
+ }).join("\n");
559145
+ const fileLines = files.map((file) => `- ${file.action ? `${file.action} ` : ""}${file.path}`).join("\n");
559146
+ const summary = [
559147
+ "Completed with structured task evidence.",
559148
+ `Todos completed: ${input.todos.length}/${input.todos.length}`,
559149
+ todoLines ? `Completed todo tree:
559150
+ ${todoLines}` : null,
559151
+ fileLines ? `Files changed:
559152
+ ${fileLines}` : null,
559153
+ `Validation passed: ${input.lastValidationCommand}`
559154
+ ].filter((line) => Boolean(line)).join("\n\n");
559155
+ return {
559156
+ ready: true,
559157
+ reason: `all todos completed with validation ${age} turn(s) ago`,
559158
+ summary
559159
+ };
559160
+ }
559161
+ var init_completionAutoFinalize = __esm({
559162
+ "packages/orchestrator/dist/completionAutoFinalize.js"() {
559163
+ "use strict";
559164
+ }
559165
+ });
559166
+
559167
+ // packages/orchestrator/dist/verificationCommand.js
559168
+ function normalizeShellCommand(command) {
559169
+ return command.replace(/\s+/g, " ").trim();
559170
+ }
559171
+ function splitConjunctiveVerifyCommand(command) {
559172
+ return normalizeShellCommand(command).split(/\s+&&\s+/).map((part) => part.trim()).filter(Boolean);
559173
+ }
559174
+ function commandReliablySatisfiesVerifyCommand(observedCommand, verifyCommand) {
559175
+ const observed = normalizeShellCommand(observedCommand);
559176
+ const expected = normalizeShellCommand(verifyCommand);
559177
+ if (!observed || !expected)
559178
+ return false;
559179
+ if (expected.includes(" || "))
559180
+ return false;
559181
+ if (observed === expected)
559182
+ return true;
559183
+ if (observed.startsWith(`${expected} && `) && !observed.includes(" || ")) {
559184
+ return true;
559185
+ }
559186
+ return false;
559187
+ }
559188
+ function verifyCommandSatisfiedByShellHistory(verifyCommand, history) {
559189
+ const expected = normalizeShellCommand(verifyCommand);
559190
+ if (!expected)
559191
+ return false;
559192
+ const successful = history.filter((entry) => entry.success);
559193
+ if (successful.some((entry) => commandReliablySatisfiesVerifyCommand(entry.command, expected))) {
559194
+ return true;
559195
+ }
559196
+ const parts = splitConjunctiveVerifyCommand(expected);
559197
+ if (parts.length <= 1)
559198
+ return false;
559199
+ return parts.every((part) => successful.some((entry) => commandReliablySatisfiesVerifyCommand(entry.command, part)));
559200
+ }
559201
+ var init_verificationCommand = __esm({
559202
+ "packages/orchestrator/dist/verificationCommand.js"() {
559203
+ "use strict";
559204
+ }
559205
+ });
559206
+
559110
559207
  // packages/orchestrator/dist/ollama-pool-cleanup.js
559111
559208
  var ollama_pool_cleanup_exports = {};
559112
559209
  __export(ollama_pool_cleanup_exports, {
@@ -570135,7 +570232,7 @@ RECOVERY: cd to the directory containing '${file}', run a plain install with no
570135
570232
  });
570136
570233
 
570137
570234
  // packages/orchestrator/dist/agenticRunner.js
570138
- import { existsSync as _fsExistsSync, readFileSync as _fsReadFileSync, writeFileSync as _fsWriteFileSync, appendFileSync as _fsAppendFileSync, unlinkSync as _fsUnlinkSync, mkdirSync as _fsMkdirSync, statSync as _fsStatSync } from "node:fs";
570235
+ import { existsSync as _fsExistsSync, readFileSync as _fsReadFileSync, writeFileSync as _fsWriteFileSync, appendFileSync as _fsAppendFileSync, unlinkSync as _fsUnlinkSync, mkdirSync as _fsMkdirSync, statSync as _fsStatSync, readdirSync as _fsReaddirSync } from "node:fs";
570139
570236
  import { execFile as _execFile, spawn as _spawn } from "node:child_process";
570140
570237
  import { createHash as _createHash } from "node:crypto";
570141
570238
  import { join as _pathJoin, resolve as _pathResolve } from "node:path";
@@ -570660,6 +570757,8 @@ var init_agenticRunner = __esm({
570660
570757
  init_permissionRuleset();
570661
570758
  init_steeringIntake();
570662
570759
  init_completionLedger();
570760
+ init_completionAutoFinalize();
570761
+ init_verificationCommand();
570663
570762
  init_dist6();
570664
570763
  init_ollama_pool();
570665
570764
  init_personality();
@@ -570898,6 +570997,7 @@ var init_agenticRunner = __esm({
570898
570997
  _lastBuildSuccessCommand = "";
570899
570998
  // REG-31: prevent duplicate completion suggestion per turn
570900
570999
  _completionPromptInjectedThisTurn = false;
571000
+ _truthAutoCompleteBlockedValidationTurn = -1;
570901
571001
  // REG-32: one-shot per-stem nudge toward local triage on opaque errors.
570902
571002
  // Closes the gap where qwen3.6 pivots away from a single failure (different
570903
571003
  // stem on next turn) and never triggers REG-26/28's retry-based local
@@ -570938,6 +571038,8 @@ var init_agenticRunner = __esm({
570938
571038
  // unresolved verification failure. Effectively gates task_complete
570939
571039
  // suggestion behind real verification, not just self-report.
570940
571040
  _verifyFailures = /* @__PURE__ */ new Set();
571041
+ _verifyCommandFailures = /* @__PURE__ */ new Set();
571042
+ _artifactInspectionFailures = /* @__PURE__ */ new Set();
570941
571043
  // REG-37e: track whether we've already nudged the agent about the
570942
571044
  // verifyCommand / declaredArtifacts fields. Empirical observation
570943
571045
  // from run #15: across 30 todo_writes, agent set neither field
@@ -572560,6 +572662,35 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
572560
572662
  return null;
572561
572663
  }
572562
572664
  }
572665
+ _normalizeCommandForValidationMatch(command) {
572666
+ return normalizeShellCommand(command);
572667
+ }
572668
+ _matchedDeclaredVerifyCommand(command) {
572669
+ if (!this._normalizeCommandForValidationMatch(command))
572670
+ return null;
572671
+ const todos = this.readSessionTodos() || [];
572672
+ let best = null;
572673
+ for (const todo of todos) {
572674
+ const verifyCommand = typeof todo.verifyCommand === "string" ? todo.verifyCommand : "";
572675
+ if (commandReliablySatisfiesVerifyCommand(command, verifyCommand)) {
572676
+ const trimmed = verifyCommand.trim();
572677
+ if (!best || trimmed.length > best.length)
572678
+ best = trimmed;
572679
+ }
572680
+ }
572681
+ return best;
572682
+ }
572683
+ _shellCommandFromArgsKey(argsKey) {
572684
+ const parsed = this._parseExactArgsKey(argsKey);
572685
+ return parsed.get("command") ?? parsed.get("cmd") ?? "";
572686
+ }
572687
+ _refreshTodoVerificationFailure(content) {
572688
+ if (this._verifyCommandFailures.has(content) || this._artifactInspectionFailures.has(content)) {
572689
+ this._verifyFailures.add(content);
572690
+ } else {
572691
+ this._verifyFailures.delete(content);
572692
+ }
572693
+ }
572563
572694
  _isProjectEditTool(toolName) {
572564
572695
  return toolName === "file_write" || toolName === "file_edit" || toolName === "batch_edit" || toolName === "file_patch";
572565
572696
  }
@@ -577231,12 +577362,36 @@ TASK: ${scrubbedTask}` : scrubbedTask;
577231
577362
  });
577232
577363
  return true;
577233
577364
  };
577365
+ const holdUnresolvedVerificationTaskComplete = (turn) => {
577366
+ if (this._verifyFailures.size === 0)
577367
+ return false;
577368
+ const failures = [...this._verifyFailures].slice(0, 8);
577369
+ const feedback = [
577370
+ `[COMPLETION BLOCKED — unresolved todo verification]`,
577371
+ `The active todo list still contains completed items whose required evidence has not been satisfied.`,
577372
+ ``,
577373
+ `Unresolved verification item(s):`,
577374
+ ...failures.map((item) => ` - ${item}`),
577375
+ ``,
577376
+ `Run the missing verifyCommand exactly, repair the todo evidence, or mark the todo blocked. Do not call task_complete until the verification state is clean.`
577377
+ ].join("\n");
577378
+ lastCompletionGateReason = `${this._verifyFailures.size} unresolved todo verification failure(s)`;
577379
+ lastCompletionGateFeedback = feedback;
577380
+ messages2.push({ role: "system", content: feedback });
577381
+ this.emit({
577382
+ type: "status",
577383
+ content: `task_complete held by todo verification gate: ${lastCompletionGateReason}`,
577384
+ turn,
577385
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
577386
+ });
577387
+ return true;
577388
+ };
577234
577389
  const completionHoldEscapeMax = (() => {
577235
577390
  const raw = Number(process.env["OMNIUS_COMPLETION_HOLD_MAX"]);
577236
577391
  return Number.isFinite(raw) && raw >= 1 ? Math.floor(raw) : 3;
577237
577392
  })();
577238
577393
  const holdTaskCompleteGates = (args, turn) => {
577239
- const held = holdNoProgressTaskComplete(args, turn) || holdProvenanceTaskComplete(args, turn);
577394
+ const held = holdUnresolvedVerificationTaskComplete(turn) || holdNoProgressTaskComplete(args, turn) || holdProvenanceTaskComplete(args, turn);
577240
577395
  if (!held) {
577241
577396
  this._completionHoldState.count = 0;
577242
577397
  this._completionHoldState.lastKey = "";
@@ -577375,6 +577530,59 @@ TASK: ${scrubbedTask}` : scrubbedTask;
577375
577530
  this._artifactInspectionDoneThisTurn.clear();
577376
577531
  try {
577377
577532
  const _todos = this.readSessionTodos() || [];
577533
+ const _truthCompletion = buildTruthBasedCompletion({
577534
+ todos: _todos,
577535
+ currentTurn: turn,
577536
+ lastValidationTurn: this._lastBuildSuccessTurn,
577537
+ lastValidationCommand: this._lastBuildSuccessCommand,
577538
+ verifyFailureCount: this._verifyFailures.size,
577539
+ filesEdited: [...this._taskState.modifiedFiles.entries()].map(([path12, action]) => ({ path: path12, action }))
577540
+ });
577541
+ if (process.env["OMNIUS_DISABLE_TRUTH_AUTOCOMPLETE"] !== "1" && _truthCompletion.ready && this._truthAutoCompleteBlockedValidationTurn !== this._lastBuildSuccessTurn) {
577542
+ const _summary = _truthCompletion.summary || "Completed.";
577543
+ const _args = { summary: _summary };
577544
+ if (holdTaskCompleteGates(_args, turn)) {
577545
+ this._truthAutoCompleteBlockedValidationTurn = this._lastBuildSuccessTurn;
577546
+ if (this._completionIncompleteVerification)
577547
+ break;
577548
+ continue;
577549
+ }
577550
+ const _bpTruth = await this._runBackwardPassReview(turn, toolCallLog, _summary);
577551
+ if (_bpTruth && !_bpTruth.proceed) {
577552
+ this._truthAutoCompleteBlockedValidationTurn = this._lastBuildSuccessTurn;
577553
+ if (_bpTruth.feedback)
577554
+ emitBackwardPassAdvisory(_bpTruth.feedback, turn);
577555
+ if (this._completionIncompleteVerification)
577556
+ break;
577557
+ continue;
577558
+ }
577559
+ completed = true;
577560
+ summary = _summary;
577561
+ this.emit({
577562
+ type: "status",
577563
+ content: `REG-31: truth-based completion synthesized (${_truthCompletion.reason})`,
577564
+ turn,
577565
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
577566
+ });
577567
+ this._onTypedEvent?.({
577568
+ type: "completion_requested",
577569
+ runId: this._sessionId ?? "unknown",
577570
+ summary: summary.slice(0, 500),
577571
+ sourcePath: "direct",
577572
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
577573
+ });
577574
+ if (summary && !this._assistantTextEmitted) {
577575
+ this.emit({
577576
+ type: "assistant_text",
577577
+ content: summary,
577578
+ source: "task_complete_summary",
577579
+ turn,
577580
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
577581
+ });
577582
+ this._assistantTextEmitted = true;
577583
+ }
577584
+ break;
577585
+ }
577378
577586
  if (_todos.length > 0 && _todos.every((t2) => t2.status === "completed") && this._lastBuildSuccessTurn >= 0 && turn - this._lastBuildSuccessTurn <= 8 && this._verifyFailures.size === 0 && !this._completionPromptInjectedThisTurn) {
577379
577587
  this._completionPromptInjectedThisTurn = true;
577380
577588
  messages2.push({
@@ -579388,14 +579596,14 @@ Corrective action: try a different approach first: read relevant files, adjust a
579388
579596
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
579389
579597
  });
579390
579598
  try {
579391
- const archDir = __require("node:path").join(this.omniusStateDir(), "phases");
579392
- __require("node:fs").mkdirSync(archDir, { recursive: true });
579599
+ const archDir = _pathJoin(this.omniusStateDir(), "phases");
579600
+ _fsMkdirSync(archDir, { recursive: true });
579393
579601
  for (const phaseName of contracted) {
579394
579602
  const node = this._contextTree.getSnapshot().phases[phaseName];
579395
579603
  if (!node)
579396
579604
  continue;
579397
579605
  const stamp = `${phaseName}-${Date.now().toString(36)}-turn${turn}`;
579398
- const archPath = __require("node:path").join(archDir, `${stamp}.jsonl`);
579606
+ const archPath = _pathJoin(archDir, `${stamp}.jsonl`);
579399
579607
  const archived = {
579400
579608
  phase: phaseName,
579401
579609
  contractedAtTurn: turn,
@@ -579404,7 +579612,7 @@ Corrective action: try a different approach first: read relevant files, adjust a
579404
579612
  summary: node.summary ?? null,
579405
579613
  messages: node.messages ?? []
579406
579614
  };
579407
- __require("node:fs").writeFileSync(archPath, JSON.stringify(archived) + "\n", "utf-8");
579615
+ _fsWriteFileSync(archPath, JSON.stringify(archived) + "\n", "utf-8");
579408
579616
  this._contextTree.archive(phaseName, archPath);
579409
579617
  }
579410
579618
  this.emit({
@@ -580521,9 +580729,12 @@ Respond with EXACTLY this structure before your next tool call:
580521
580729
  }
580522
580730
  if (tc.name === "shell") {
580523
580731
  const _shellCmd2 = String(tc.arguments?.["command"] ?? tc.arguments?.["cmd"] ?? "");
580524
- if (/\b(build|test|run\b|start\b|serve\b|verify|check)\b/i.test(_shellCmd2)) {
580732
+ const _declaredVerify = this._matchedDeclaredVerifyCommand(_shellCmd2);
580733
+ const _legacyGenericValidation = process.env["OMNIUS_ENABLE_GENERIC_COMPLETION_COMMAND_HEURISTIC"] === "1" && /\b(build|test|run\b|start\b|serve\b|verify|check)\b/i.test(_shellCmd2);
580734
+ if (_declaredVerify || _legacyGenericValidation) {
580525
580735
  this._lastBuildSuccessTurn = turn;
580526
- this._lastBuildSuccessCommand = _shellCmd2.slice(0, 200);
580736
+ this._lastBuildSuccessCommand = (_declaredVerify || _shellCmd2).slice(0, 200);
580737
+ this._truthAutoCompleteBlockedValidationTurn = -1;
580527
580738
  }
580528
580739
  }
580529
580740
  if (tc.name === "todo_write") {
@@ -580594,16 +580805,17 @@ Respond with EXACTLY this structure before your next tool call:
580594
580805
  continue;
580595
580806
  const _vc = _t.verifyCommand;
580596
580807
  if (_vc && typeof _vc === "string" && !this._verifyHintInjectedThisTurn.has(_t.content)) {
580597
- const _verified = toolCallLog.slice(-15).some((c8) => {
580598
- if (c8.name !== "shell" || c8.success !== true)
580599
- return false;
580600
- const _argsStr = c8.argsKey ?? "";
580601
- return _argsStr.includes(_vc.slice(0, 80));
580602
- });
580808
+ const _history = toolCallLog.slice(-15).filter((c8) => c8.name === "shell").map((c8) => ({
580809
+ command: this._shellCommandFromArgsKey(c8.argsKey),
580810
+ success: c8.success === true
580811
+ }));
580812
+ const _verified = verifyCommandSatisfiedByShellHistory(_vc, _history);
580603
580813
  if (_verified) {
580604
- this._verifyFailures.delete(_t.content);
580814
+ this._verifyCommandFailures.delete(_t.content);
580815
+ this._refreshTodoVerificationFailure(_t.content);
580605
580816
  } else {
580606
- this._verifyFailures.add(_t.content);
580817
+ this._verifyCommandFailures.add(_t.content);
580818
+ this._refreshTodoVerificationFailure(_t.content);
580607
580819
  this._verifyHintInjectedThisTurn.add(_t.content);
580608
580820
  messages2.push({
580609
580821
  role: "system",
@@ -580620,6 +580832,9 @@ Respond with EXACTLY this structure before your next tool call:
580620
580832
  ].join("\n")
580621
580833
  });
580622
580834
  }
580835
+ } else {
580836
+ this._verifyCommandFailures.delete(_t.content);
580837
+ this._refreshTodoVerificationFailure(_t.content);
580623
580838
  }
580624
580839
  if (!this._artifactInspectionDoneThisTurn.has(_t.content)) {
580625
580840
  this._artifactInspectionDoneThisTurn.add(_t.content);
@@ -580639,13 +580854,15 @@ Respond with EXACTLY this structure before your next tool call:
580639
580854
  });
580640
580855
  const _hadSomethingToCheck = Array.isArray(_declared) && _declared.length > 0 || extractCandidatePaths(_t.content).length > 0;
580641
580856
  if (!_inspect.ok) {
580642
- this._verifyFailures.add(_t.content);
580857
+ this._artifactInspectionFailures.add(_t.content);
580858
+ this._refreshTodoVerificationFailure(_t.content);
580643
580859
  messages2.push({
580644
580860
  role: "system",
580645
580861
  content: _inspect.critique
580646
580862
  });
580647
580863
  } else if (_hadSomethingToCheck) {
580648
- this._verifyFailures.delete(_t.content);
580864
+ this._artifactInspectionFailures.delete(_t.content);
580865
+ this._refreshTodoVerificationFailure(_t.content);
580649
580866
  }
580650
580867
  }
580651
580868
  }
@@ -582627,8 +582844,9 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
582627
582844
  }
582628
582845
  }
582629
582846
  const durationMs = Date.now() - start2;
582630
- if (this._completionIncompleteVerification && !summary) {
582631
- summary = this._completionIncompleteVerification.summary;
582847
+ const incompleteVerification = this._completionIncompleteVerification;
582848
+ if (incompleteVerification && !summary) {
582849
+ summary = incompleteVerification.summary;
582632
582850
  }
582633
582851
  if (completed && this._completionCaveat) {
582634
582852
  summary = summary ? `${summary}
@@ -583166,10 +583384,8 @@ ${caveat}` : caveat;
583166
583384
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
583167
583385
  });
583168
583386
  try {
583169
- const { mkdirSync: mkdirSync106, readdirSync: readdirSync59, statSync: statSync59, unlinkSync: unlinkSync36, writeFileSync: writeFileSync90 } = __require("node:fs");
583170
- const { join: join179 } = __require("node:path");
583171
- const contextDir = join179(this._workingDirectory || process.cwd(), ".omnius", "context");
583172
- mkdirSync106(contextDir, { recursive: true });
583387
+ const contextDir = _pathJoin(this._workingDirectory || process.cwd(), ".omnius", "context");
583388
+ _fsMkdirSync(contextDir, { recursive: true });
583173
583389
  const topEntities = this._temporalGraph.nodesByType("entity", 3);
583174
583390
  const topFiles = this._temporalGraph.nodesByType("file", 3);
583175
583391
  const topConcepts = this._temporalGraph.nodesByType("concept", 3);
@@ -583209,18 +583425,18 @@ ${caveat}` : caveat;
583209
583425
  section("Top Files", topFiles);
583210
583426
  section("Top Concepts", topConcepts);
583211
583427
  lines.push("(Use file_read on this file for quick recall. See provenance JSON for full edge detail.)");
583212
- const kgSummaryDir = join179(contextDir, "kg-summary");
583213
- mkdirSync106(kgSummaryDir, { recursive: true });
583428
+ const kgSummaryDir = _pathJoin(contextDir, "kg-summary");
583429
+ _fsMkdirSync(kgSummaryDir, { recursive: true });
583214
583430
  const summaryFilename = `kg-summary-${this._sessionId}.md`;
583215
- const outPath = join179(kgSummaryDir, summaryFilename);
583216
- writeFileSync90(outPath, lines.join("\n"), "utf-8");
583217
- writeFileSync90(join179(kgSummaryDir, "latest.md"), lines.join("\n"), "utf-8");
583218
- writeFileSync90(join179(contextDir, `kg-summary-latest.md`), [
583431
+ const outPath = _pathJoin(kgSummaryDir, summaryFilename);
583432
+ _fsWriteFileSync(outPath, lines.join("\n"), "utf-8");
583433
+ _fsWriteFileSync(_pathJoin(kgSummaryDir, "latest.md"), lines.join("\n"), "utf-8");
583434
+ _fsWriteFileSync(_pathJoin(contextDir, `kg-summary-latest.md`), [
583219
583435
  "Latest KG summary moved to `.omnius/context/kg-summary/latest.md`.",
583220
583436
  "",
583221
583437
  lines.join("\n")
583222
583438
  ].join("\n"), "utf-8");
583223
- writeFileSync90(join179(kgSummaryDir, "index.json"), JSON.stringify({
583439
+ _fsWriteFileSync(_pathJoin(kgSummaryDir, "index.json"), JSON.stringify({
583224
583440
  schema: "omnius.kg-summary-index.v1",
583225
583441
  latest: "latest.md",
583226
583442
  latestSessionFile: summaryFilename,
@@ -583231,9 +583447,9 @@ ${caveat}` : caveat;
583231
583447
  const maxAgeDays = parseInt(process.env["OMNIUS_KG_SUMMARY_MAX_AGE_DAYS"] || "7", 10) || 7;
583232
583448
  const maxFiles = parseInt(process.env["OMNIUS_KG_SUMMARY_MAX_FILES"] || "60", 10) || 60;
583233
583449
  const cutoff = Date.now() - maxAgeDays * 24 * 60 * 60 * 1e3;
583234
- const summaries = readdirSync59(kgSummaryDir).filter((name10) => name10.startsWith("kg-summary-") && name10.endsWith(".md")).map((name10) => {
583235
- const filePath = join179(kgSummaryDir, name10);
583236
- const stat8 = statSync59(filePath);
583450
+ const summaries = _fsReaddirSync(kgSummaryDir).filter((name10) => name10.startsWith("kg-summary-") && name10.endsWith(".md")).map((name10) => {
583451
+ const filePath = _pathJoin(kgSummaryDir, name10);
583452
+ const stat8 = _fsStatSync(filePath);
583237
583453
  return { filePath, mtimeMs: stat8.mtimeMs };
583238
583454
  }).sort((a2, b) => b.mtimeMs - a2.mtimeMs);
583239
583455
  const toDelete = /* @__PURE__ */ new Set();
@@ -583246,7 +583462,7 @@ ${caveat}` : caveat;
583246
583462
  }
583247
583463
  for (const filePath of toDelete) {
583248
583464
  try {
583249
- unlinkSync36(filePath);
583465
+ _fsUnlinkSync(filePath);
583250
583466
  } catch {
583251
583467
  }
583252
583468
  }
@@ -584057,10 +584273,8 @@ Actions: (1) list_directory on the parent directory to see what's there, (2) Che
584057
584273
  if (!this._workingDirectory)
584058
584274
  return;
584059
584275
  try {
584060
- const { mkdirSync: mkdirSync106, writeFileSync: writeFileSync90 } = __require("node:fs");
584061
- const { join: join179 } = __require("node:path");
584062
- const sessionDir2 = this.options.stateDir ? join179(this.omniusStateDir(), "session", this._sessionId) : join179(this._workingDirectory, ".omnius", "session", this._sessionId);
584063
- mkdirSync106(sessionDir2, { recursive: true });
584276
+ const sessionDir2 = this.options.stateDir ? _pathJoin(this.omniusStateDir(), "session", this._sessionId) : _pathJoin(this._workingDirectory, ".omnius", "session", this._sessionId);
584277
+ _fsMkdirSync(sessionDir2, { recursive: true });
584064
584278
  const checkpoint = {
584065
584279
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
584066
584280
  sessionId: this._sessionId,
@@ -584072,7 +584286,7 @@ Actions: (1) list_directory on the parent directory to see what's there, (2) Che
584072
584286
  memexEntryCount: this._memexArchive.size,
584073
584287
  fileRegistrySize: this._fileRegistry.size
584074
584288
  };
584075
- writeFileSync90(join179(sessionDir2, "checkpoint.json"), JSON.stringify(checkpoint, null, 2));
584289
+ _fsWriteFileSync(_pathJoin(sessionDir2, "checkpoint.json"), JSON.stringify(checkpoint, null, 2));
584076
584290
  } catch {
584077
584291
  }
584078
584292
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.371",
3
+ "version": "1.0.372",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.371",
9
+ "version": "1.0.372",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
@@ -502,9 +502,9 @@
502
502
  }
503
503
  },
504
504
  "node_modules/@ipld/dag-pb/node_modules/multiformats": {
505
- "version": "14.0.2",
506
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
507
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
505
+ "version": "14.0.3",
506
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
507
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
508
508
  "license": "Apache-2.0 OR MIT"
509
509
  },
510
510
  "node_modules/@ipshipyard/libp2p-auto-tls": {
@@ -553,9 +553,9 @@
553
553
  }
554
554
  },
555
555
  "node_modules/@ipshipyard/libp2p-auto-tls/node_modules/multiformats": {
556
- "version": "14.0.2",
557
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
558
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
556
+ "version": "14.0.3",
557
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
558
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
559
559
  "license": "Apache-2.0 OR MIT"
560
560
  },
561
561
  "node_modules/@ipshipyard/libp2p-auto-tls/node_modules/uint8arrays": {
@@ -765,9 +765,9 @@
765
765
  }
766
766
  },
767
767
  "node_modules/@libp2p/http-utils/node_modules/multiformats": {
768
- "version": "14.0.2",
769
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
770
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
768
+ "version": "14.0.3",
769
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
770
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
771
771
  "license": "Apache-2.0 OR MIT"
772
772
  },
773
773
  "node_modules/@libp2p/http-utils/node_modules/uint8arraylist": {
@@ -807,9 +807,9 @@
807
807
  }
808
808
  },
809
809
  "node_modules/@libp2p/http-websocket/node_modules/multiformats": {
810
- "version": "14.0.2",
811
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
812
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
810
+ "version": "14.0.3",
811
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
812
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
813
813
  "license": "Apache-2.0 OR MIT"
814
814
  },
815
815
  "node_modules/@libp2p/http-websocket/node_modules/uint8arraylist": {
@@ -1045,9 +1045,9 @@
1045
1045
  }
1046
1046
  },
1047
1047
  "node_modules/@libp2p/peer-record/node_modules/multiformats": {
1048
- "version": "14.0.2",
1049
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
1050
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
1048
+ "version": "14.0.3",
1049
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
1050
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
1051
1051
  "license": "Apache-2.0 OR MIT"
1052
1052
  },
1053
1053
  "node_modules/@libp2p/peer-record/node_modules/protons-runtime": {
@@ -1155,9 +1155,9 @@
1155
1155
  }
1156
1156
  },
1157
1157
  "node_modules/@libp2p/record/node_modules/multiformats": {
1158
- "version": "14.0.2",
1159
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
1160
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
1158
+ "version": "14.0.3",
1159
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
1160
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
1161
1161
  "license": "Apache-2.0 OR MIT"
1162
1162
  },
1163
1163
  "node_modules/@libp2p/record/node_modules/protons-runtime": {
@@ -1393,9 +1393,9 @@
1393
1393
  }
1394
1394
  },
1395
1395
  "node_modules/@libp2p/webrtc/node_modules/multiformats": {
1396
- "version": "14.0.2",
1397
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
1398
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
1396
+ "version": "14.0.3",
1397
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
1398
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
1399
1399
  "license": "Apache-2.0 OR MIT"
1400
1400
  },
1401
1401
  "node_modules/@libp2p/webrtc/node_modules/node-datachannel": {
@@ -1534,9 +1534,9 @@
1534
1534
  }
1535
1535
  },
1536
1536
  "node_modules/@multiformats/dns/node_modules/multiformats": {
1537
- "version": "14.0.2",
1538
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
1539
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
1537
+ "version": "14.0.3",
1538
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
1539
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
1540
1540
  "license": "Apache-2.0 OR MIT"
1541
1541
  },
1542
1542
  "node_modules/@multiformats/dns/node_modules/uint8arrays": {
@@ -1579,9 +1579,9 @@
1579
1579
  }
1580
1580
  },
1581
1581
  "node_modules/@multiformats/multiaddr/node_modules/multiformats": {
1582
- "version": "14.0.2",
1583
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
1584
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
1582
+ "version": "14.0.3",
1583
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
1584
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
1585
1585
  "license": "Apache-2.0 OR MIT"
1586
1586
  },
1587
1587
  "node_modules/@multiformats/multiaddr/node_modules/uint8-varint": {
@@ -1626,9 +1626,9 @@
1626
1626
  }
1627
1627
  },
1628
1628
  "node_modules/@multiformats/murmur3/node_modules/multiformats": {
1629
- "version": "14.0.2",
1630
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
1631
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
1629
+ "version": "14.0.3",
1630
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
1631
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
1632
1632
  "license": "Apache-2.0 OR MIT"
1633
1633
  },
1634
1634
  "node_modules/@multiformats/uri-to-multiaddr": {
@@ -3919,9 +3919,9 @@
3919
3919
  }
3920
3920
  },
3921
3921
  "node_modules/hamt-sharding/node_modules/multiformats": {
3922
- "version": "14.0.2",
3923
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
3924
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
3922
+ "version": "14.0.3",
3923
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
3924
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
3925
3925
  "license": "Apache-2.0 OR MIT"
3926
3926
  },
3927
3927
  "node_modules/hamt-sharding/node_modules/uint8arrays": {
@@ -4685,9 +4685,9 @@
4685
4685
  }
4686
4686
  },
4687
4687
  "node_modules/it-protobuf-stream/node_modules/multiformats": {
4688
- "version": "14.0.2",
4689
- "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.2.tgz",
4690
- "integrity": "sha512-sF7F3gBKCyehzIhDwVuTRf79TZ8qWRz5NXwWYBX+4a+n22KcFqqcDYJvZr7tySrI0MhuTBXVOlo3qMTiAHC78g==",
4688
+ "version": "14.0.3",
4689
+ "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-14.0.3.tgz",
4690
+ "integrity": "sha512-l7FEUCJb3tx1UWeovywhaidQdOGQOOKTfl51G2y6CQbcOHe9dp3z90NHqQ3v2SKetKgkxwa3wI+2jsyJrjJjTg==",
4691
4691
  "license": "Apache-2.0 OR MIT"
4692
4692
  },
4693
4693
  "node_modules/it-protobuf-stream/node_modules/uint8arraylist": {
@@ -5388,9 +5388,9 @@
5388
5388
  }
5389
5389
  },
5390
5390
  "node_modules/node-abi": {
5391
- "version": "3.92.0",
5392
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz",
5393
- "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",
5391
+ "version": "3.93.0",
5392
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.93.0.tgz",
5393
+ "integrity": "sha512-Cu6yUpX5Iavugm8BeX7c0wgU9CvOqfd1yM6A1d2q2ZMjym7GjpASv2GdRcTq3Fx+Sb5OgBkEEpw4VnAbY6Y5RA==",
5394
5394
  "license": "MIT",
5395
5395
  "dependencies": {
5396
5396
  "semver": "^7.3.5"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.371",
3
+ "version": "1.0.372",
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",