omnius 1.0.102 → 1.0.103

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
@@ -651869,6 +651869,16 @@ async function startInteractive(config, repoPath) {
651869
651869
  } catch {
651870
651870
  }
651871
651871
  let restoredSessionContext = null;
651872
+ let terminalRestoredForExit = false;
651873
+ let interactiveExiting = false;
651874
+ const restoreTerminalForExit = () => {
651875
+ if (!process.stdout.isTTY || terminalRestoredForExit) return;
651876
+ terminalRestoredForExit = true;
651877
+ process.stdout.write(
651878
+ "\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[r\x1B[0m\x1B[?1049l\x1B[2J\x1B[3J\x1B]50;ClearScrollback\x07\x1B[H\x1B[?25h"
651879
+ // show cursor
651880
+ );
651881
+ };
651872
651882
  if (process.stdout.isTTY) {
651873
651883
  setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
651874
651884
  process.stdout.write(
@@ -651884,13 +651894,8 @@ async function startInteractive(config, repoPath) {
651884
651894
  // wizard completes and MouseFilterStream is created. Enabling mouse
651885
651895
  // here would leak SGR coordinate sequences into readline prompts.
651886
651896
  );
651887
- const restoreScreen = () => {
651888
- process.stdout.write(
651889
- "\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?25h\x1B[?1049l"
651890
- // leave alt screen
651891
- );
651892
- };
651893
651897
  const cleanupAndExit = (code8) => {
651898
+ interactiveExiting = true;
651894
651899
  if (_shellToolRef) _shellToolRef.killAll();
651895
651900
  killAllFullSubAgents();
651896
651901
  taskManager.stopAll();
@@ -651905,10 +651910,10 @@ async function startInteractive(config, repoPath) {
651905
651910
  teardownTuiTasks();
651906
651911
  } catch {
651907
651912
  }
651908
- restoreScreen();
651913
+ restoreTerminalForExit();
651909
651914
  process.exit(code8);
651910
651915
  };
651911
- process.on("exit", restoreScreen);
651916
+ process.on("exit", restoreTerminalForExit);
651912
651917
  process.on("SIGINT", () => cleanupAndExit(130));
651913
651918
  process.on("SIGTERM", () => cleanupAndExit(143));
651914
651919
  }
@@ -656264,6 +656269,7 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
656264
656269
  if (input.startsWith("/")) {
656265
656270
  const quitMatch = input.trim().replace(/^\//, "").toLowerCase();
656266
656271
  if (quitMatch === "quit" || quitMatch === "exit" || quitMatch === "q") {
656272
+ interactiveExiting = true;
656267
656273
  if (activeTask) activeTask.runner.abort();
656268
656274
  taskManager.stopAll();
656269
656275
  if (blessEngine?.isActive) blessEngine.stop();
@@ -656272,25 +656278,18 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
656272
656278
  dmnEngine = null;
656273
656279
  killAllFullSubAgents();
656274
656280
  statusBar.deactivate();
656275
- process.stdout.write(
656276
- `\x1B[?1002l\x1B[?1006l\x1B[r\x1B[?25h\x1B[2J\x1B[H${c3.dim("Goodbye!")}
656277
- `
656278
- );
656279
- rl.close();
656281
+ restoreTerminalForExit();
656280
656282
  process.exit(0);
656281
656283
  }
656282
656284
  const cmdResult = await writeContentAsync(
656283
656285
  () => handleSlashCommand(input, commandCtx)
656284
656286
  );
656285
656287
  if (cmdResult === "exit") {
656288
+ interactiveExiting = true;
656286
656289
  if (activeTask) activeTask.runner.abort();
656287
656290
  taskManager.stopAll();
656288
656291
  statusBar.deactivate();
656289
- process.stdout.write(
656290
- `\x1B[?1002l\x1B[?1006l\x1B[r\x1B[?25h\x1B[2J\x1B[H${c3.dim("Goodbye!")}
656291
- `
656292
- );
656293
- rl.close();
656292
+ restoreTerminalForExit();
656294
656293
  process.exit(0);
656295
656294
  }
656296
656295
  if (cmdResult === "handled") {
@@ -657006,6 +657005,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
657006
657005
  }
657007
657006
  });
657008
657007
  rl.on("close", () => {
657008
+ if (interactiveExiting) return;
657009
+ interactiveExiting = true;
657009
657010
  if (peerMesh) {
657010
657011
  peerMesh.stop().catch(() => {
657011
657012
  });
@@ -657013,10 +657014,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
657013
657014
  inferenceRouter = null;
657014
657015
  }
657015
657016
  statusBar.deactivate();
657016
- process.stdout.write("\x1B[?1049l");
657017
- process.stdout.write(`
657018
- ${c3.dim("Goodbye!")}
657019
- `);
657017
+ restoreTerminalForExit();
657020
657018
  process.exit(0);
657021
657019
  });
657022
657020
  rl.on("SIGINT", () => {
@@ -658649,7 +658647,6 @@ function createCli(options2) {
658649
658647
  return;
658650
658648
  }
658651
658649
  if (input === "exit" || input === "quit") {
658652
- console.log("Goodbye.");
658653
658650
  rl.close();
658654
658651
  return;
658655
658652
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.102",
3
+ "version": "1.0.103",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.102",
9
+ "version": "1.0.103",
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.102",
3
+ "version": "1.0.103",
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",