omnius 1.0.703 → 1.0.705

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/README.md CHANGED
@@ -191,6 +191,29 @@ package/boot hashes, and tray runtime are reconciled. See the
191
191
  [complete dashboard guide](docs/guides/dashboard.md) for state ownership,
192
192
  security, page-by-page behavior, and exact REST flows.
193
193
 
194
+ ## Terminal Over SSH
195
+
196
+ The TUI paints for a local terminal, where a full-area repaint costs nothing.
197
+ Over a network the same cadence has to share the link with your keystrokes, so
198
+ Omnius detects a remote session (`SSH_TTY` / `SSH_CONNECTION` / `SSH_CLIENT`)
199
+ and paces itself: decorative chrome animates slower, a wheel-scroll burst is
200
+ collapsed into a single repaint, unchanged footer frames are not re-sent, and
201
+ the mouse filter allows more time for escape sequences split across packets.
202
+ Nothing changes about how the TUI looks, and local sessions are unaffected.
203
+
204
+ Detection is environment-based, so it can miss a session where those variables
205
+ do not reach the process — most often tmux or mosh, whose panes may inherit a
206
+ stale environment from the server. Force the profile when that happens:
207
+
208
+ ```bash
209
+ OMNIUS_TUI_PACING=remote omnius # pace for a network link
210
+ OMNIUS_TUI_PACING=local omnius # force local cadence
211
+ ```
212
+
213
+ If scrolling or typing still feels heavy, `OMNIUS_TUI_PROFILE=compatible`
214
+ additionally drops the animated truecolor chrome, and `OMNIUS_TUI_PERF=1` logs
215
+ any content reflow that overruns its frame budget to stderr.
216
+
194
217
  ## Shared Media Dependencies
195
218
 
196
219
  Image, video, audio, and music generation share a **single, system-wide dependency store** instead of duplicating heavy runtimes per project or per Telegram group.
package/dist/index.js CHANGED
@@ -83355,6 +83355,10 @@ var init_metabolism = __esm({
83355
83355
  // packages/memory/dist/maintenance.js
83356
83356
  import { appendFileSync as appendFileSync2, closeSync as closeSync2, existsSync as existsSync32, mkdirSync as mkdirSync25, openSync as openSync2, readFileSync as readFileSync27, readSync, readdirSync as readdirSync11, renameSync as renameSync10, statSync as statSync13, unlinkSync as unlinkSync9, writeFileSync as writeFileSync24 } from "node:fs";
83357
83357
  import { dirname as dirname15, join as join32 } from "node:path";
83358
+ function envInt(name10, fallback) {
83359
+ const raw = Number.parseInt(process.env[name10] ?? "", 10);
83360
+ return Number.isFinite(raw) && raw >= 0 ? raw : fallback;
83361
+ }
83358
83362
  function runMemoryMaintenance(options2) {
83359
83363
  const started = Date.now();
83360
83364
  const result = emptyResult(options2, started);
@@ -83793,7 +83797,7 @@ function maintainGraph(dbPath, options2, shouldStop) {
83793
83797
  stats.edgesDeduped = dedupeGraphEdges(db, options2.maxGraphDeletes ?? 2e3, !!options2.dryRun);
83794
83798
  }
83795
83799
  if (!shouldStop()) {
83796
- stats.inactiveEdgesDeleted = pruneInactiveEdges(db, options2.maxGraphDeletes ?? 2e3, !!options2.dryRun);
83800
+ stats.inactiveEdgesDeleted = pruneInactiveEdges(db, options2.maxInactiveEdgeDeletes ?? envInt("OMNIUS_KG_MAX_INACTIVE_EDGE_DELETES", 5e4), !!options2.dryRun, options2.supersededRetentionMs ?? envInt("OMNIUS_KG_SUPERSEDED_RETENTION_DAYS", 30) * DAY);
83797
83801
  }
83798
83802
  if (!shouldStop()) {
83799
83803
  stats.orphanNodesDeleted = pruneOrphanNodes(db, options2.maxGraphDeletes ?? 2e3, !!options2.dryRun);
@@ -83915,17 +83919,19 @@ function dedupeGraphEdges(db, limit2, dryRun) {
83915
83919
  return ids.length;
83916
83920
  return deleteById(db, "kg_edges", ids);
83917
83921
  }
83918
- function pruneInactiveEdges(db, limit2, dryRun) {
83919
- const cutoff = Date.now() - 14 * DAY;
83922
+ function pruneInactiveEdges(db, limit2, dryRun, supersededRetentionMs = 30 * DAY) {
83923
+ const now2 = Date.now();
83924
+ const lowConfidenceCutoff = now2 - 14 * DAY;
83925
+ const supersededCutoff = supersededRetentionMs > 0 ? now2 - supersededRetentionMs : null;
83920
83926
  let ids = [];
83921
83927
  try {
83922
83928
  ids = db.prepare(`SELECT id
83923
83929
  FROM kg_edges
83924
83930
  WHERE valid_until IS NOT NULL
83925
- AND valid_until < ?
83926
- AND COALESCE(confidence, 1) < 0.55
83931
+ AND ( (valid_until < ? AND COALESCE(confidence, 1) < 0.55)
83932
+ OR (? IS NOT NULL AND valid_until < ?) )
83927
83933
  ORDER BY valid_until ASC
83928
- LIMIT ?`).all(cutoff, Math.max(1, limit2)).map((row2) => row2.id);
83934
+ LIMIT ?`).all(lowConfidenceCutoff, supersededCutoff, supersededCutoff, Math.max(1, limit2)).map((row2) => row2.id);
83929
83935
  } catch {
83930
83936
  return 0;
83931
83937
  }
@@ -636053,7 +636059,7 @@ function renderTerminalTaskReport(report2, options2 = {}) {
636053
636059
  return `${outcome}${exit}${primary}${check.freshness !== "current" ? `; ${check.freshness}` : ""}: ${check.command}.`;
636054
636060
  }), omitted: report2.omitted.checks, weight: 0.23 },
636055
636061
  { label: "Files changed:", rows: report2.changes.map((change) => change.path), omitted: report2.omitted.changes, weight: 0.19 },
636056
- { label: "Observed work:", rows: report2.observations.map((observation) => `${observation.toolName}${observation.paths.length ? `: ${observation.paths.join(", ")}` : " completed"}.`), omitted: report2.omitted.observations, weight: 0.08 }
636062
+ { label: "Observed work:", rows: (options2.includeToolTelemetry === true ? report2.observations : report2.observations.filter((observation) => observation.paths.length > 0)).map((observation) => `${observation.toolName}${observation.paths.length ? `: ${observation.paths.join(", ")}` : " completed"}.`), omitted: report2.omitted.observations, weight: 0.08 }
636057
636063
  ].filter((item) => item.rows.length || item.omitted);
636058
636064
  const totalWeight = sections.reduce((sum2, item) => sum2 + item.weight, 0);
636059
636065
  const available = maxChars - headline.length - 30;
@@ -734658,6 +734664,9 @@ function resolvedEffect(kind, options2) {
734658
734664
  }
734659
734665
  return profileEffect(env2) ?? _effects[kind];
734660
734666
  }
734667
+ function isRemoteTerminalSession(env2 = process.env) {
734668
+ return Boolean(env2["SSH_TTY"] || env2["SSH_CONNECTION"] || env2["SSH_CLIENT"]);
734669
+ }
734661
734670
  function prefersStaticTuiChrome(options2 = {}) {
734662
734671
  const env2 = options2.env ?? process.env;
734663
734672
  if (!resolvedEffect("boxColorFlow", options2)) return true;
@@ -734673,13 +734682,42 @@ function supportsOrnamentalTuiButtonEdges(options2 = {}) {
734673
734682
  if (locale && !/utf-?8/i.test(locale)) return false;
734674
734683
  return true;
734675
734684
  }
734676
- var _effects;
734685
+ function pacingOverride(env2) {
734686
+ const mode = (env2["OMNIUS_TUI_PACING"] ?? "").trim().toLowerCase();
734687
+ if (mode === "remote" || mode === "slow") return REMOTE_PACING;
734688
+ if (mode === "local" || mode === "fast") return LOCAL_PACING;
734689
+ return void 0;
734690
+ }
734691
+ function resolveTuiPacing(env2 = process.env) {
734692
+ return pacingOverride(env2) ?? (isRemoteTerminalSession(env2) ? REMOTE_PACING : LOCAL_PACING);
734693
+ }
734694
+ var _effects, LOCAL_PACING, REMOTE_PACING;
734677
734695
  var init_terminal_capabilities = __esm({
734678
734696
  "packages/cli/src/tui/terminal-capabilities.ts"() {
734679
734697
  _effects = {
734680
734698
  buttonFrill: false,
734681
734699
  boxColorFlow: false
734682
734700
  };
734701
+ LOCAL_PACING = {
734702
+ remote: false,
734703
+ footerAnimationIntervalMs: 100,
734704
+ headerSpinnerIntervalMs: 110,
734705
+ scrollCoalesceMs: 0,
734706
+ mouseFlushMs: 50,
734707
+ mousePrefixlessWindowMs: 250
734708
+ };
734709
+ REMOTE_PACING = {
734710
+ remote: true,
734711
+ // Decorative motion drops to ~2 fps: still alive, ~5x fewer bytes on the wire.
734712
+ footerAnimationIntervalMs: 500,
734713
+ headerSpinnerIntervalMs: 400,
734714
+ // One wheel notch emits several events; merge them into a single repaint.
734715
+ scrollCoalesceMs: 40,
734716
+ // TCP fragments escape sequences across reads, so give partials more room
734717
+ // before judging them.
734718
+ mouseFlushMs: 150,
734719
+ mousePrefixlessWindowMs: 250
734720
+ };
734683
734721
  }
734684
734722
  });
734685
734723
 
@@ -746034,6 +746072,21 @@ var init_status_bar = __esm({
746034
746072
  static FOOTER_DEBUG_LAST_PAGE = 4;
746035
746073
  static FOOTER_ANIMATION_INTERVAL_MS = 100;
746036
746074
  _footerAnimationTimer = null;
746075
+ /**
746076
+ * Render pacing for this session. On a remote terminal every repaint byte
746077
+ * crosses the network and queues ahead of the user's keystrokes, so the
746078
+ * decorative cadences slow down and burst repaints are coalesced.
746079
+ */
746080
+ _pacing = resolveTuiPacing();
746081
+ /**
746082
+ * Last footer frame actually written. The animation timer fires on a fixed
746083
+ * cadence whether or not anything changed; with static chrome (the default)
746084
+ * the frame is usually byte-identical to the previous one, and rewriting it
746085
+ * is pure noise on the wire. `null` forces the next frame to paint.
746086
+ */
746087
+ _footerPaintCache = null;
746088
+ /** Pending coalesced scroll repaint (remote pacing only). */
746089
+ _scrollRepaintTimer = null;
746037
746090
  /** The pre-expansion seed text, restored when the user rejects the expansion. */
746038
746091
  _enhanceOriginal = null;
746039
746092
  /** Transient press-flash target for visual click feedback. */
@@ -747199,7 +747252,7 @@ var init_status_bar = __esm({
747199
747252
  this._headerSpinnerTimer = setInterval(() => {
747200
747253
  this._headerSpinnerFrame = (this._headerSpinnerFrame + 1) % _StatusBar.HEADER_SPINNER_FRAMES.length;
747201
747254
  if (this.active) this.refreshHeaderPanels();
747202
- }, 110);
747255
+ }, this._pacing.headerSpinnerIntervalMs);
747203
747256
  this._headerSpinnerTimer.unref?.();
747204
747257
  }
747205
747258
  /** Stop the header inference glyph and repaint once so it disappears cleanly. */
@@ -747212,8 +747265,10 @@ var init_status_bar = __esm({
747212
747265
  }
747213
747266
  startFooterAnimationTimer() {
747214
747267
  if (this._footerAnimationTimer) return;
747268
+ const intervalMs = this._pacing.remote ? this._pacing.footerAnimationIntervalMs : _StatusBar.FOOTER_ANIMATION_INTERVAL_MS;
747215
747269
  this._footerAnimationTimer = setInterval(() => {
747216
747270
  if (!this.active || this._resizing || _globalFooterLock || isOverlayActive()) {
747271
+ this._footerPaintCache = null;
747217
747272
  return;
747218
747273
  }
747219
747274
  this.advanceStagePhase();
@@ -747225,7 +747280,7 @@ var init_status_bar = __esm({
747225
747280
  if (this._agentViews.size > 1 && (String(this.currentHeaderPanel).startsWith("sys-") || this._headerExpanded)) {
747226
747281
  this.refreshHeaderContent();
747227
747282
  }
747228
- }, _StatusBar.FOOTER_ANIMATION_INTERVAL_MS);
747283
+ }, intervalMs);
747229
747284
  this._footerAnimationTimer.unref?.();
747230
747285
  }
747231
747286
  stopFooterAnimationTimer() {
@@ -747876,6 +747931,11 @@ var init_status_bar = __esm({
747876
747931
  this.active = false;
747877
747932
  this._resizing = false;
747878
747933
  this.stopFooterAnimationTimer();
747934
+ if (this._scrollRepaintTimer) {
747935
+ clearTimeout(this._scrollRepaintTimer);
747936
+ this._scrollRepaintTimer = null;
747937
+ }
747938
+ this._footerPaintCache = null;
747879
747939
  if (this._resizeTimer) {
747880
747940
  clearTimeout(this._resizeTimer);
747881
747941
  this._resizeTimer = null;
@@ -749642,7 +749702,7 @@ ${CONTENT_BG_SEQ}`);
749642
749702
  this._contentScrollOffset + lines
749643
749703
  );
749644
749704
  this._syncPagerScope();
749645
- this.repaintContent();
749705
+ this.scheduleScrollRepaint();
749646
749706
  }
749647
749707
  /** Scroll down through content history */
749648
749708
  scrollContentDown(lines = 1) {
@@ -749659,7 +749719,7 @@ ${CONTENT_BG_SEQ}`);
749659
749719
  );
749660
749720
  if (this._contentScrollOffset === 0) this._autoScroll = true;
749661
749721
  this._syncPagerScope();
749662
- this.repaintContent();
749722
+ this.scheduleScrollRepaint();
749663
749723
  }
749664
749724
  /** Page up — scroll by visible height */
749665
749725
  pageUpContent() {
@@ -749742,6 +749802,31 @@ ${CONTENT_BG_SEQ}`);
749742
749802
  Promise.resolve().then(() => (init_tui_tasks_renderer(), tui_tasks_renderer_exports)).then((m2) => m2.setTuiTasksScope({ pagerActive: pagerOn })).catch(() => {
749743
749803
  });
749744
749804
  }
749805
+ /**
749806
+ * Repaint after a scroll.
749807
+ *
749808
+ * A single wheel notch emits several scroll events, and each repaint
749809
+ * rewrites every visible row. Locally those bytes are free, so the paint
749810
+ * stays synchronous and behaviour is unchanged. On a remote terminal the
749811
+ * same burst becomes several full-screen writes queued ahead of the user's
749812
+ * keystrokes, so it is collapsed into one paint. The scroll offset is
749813
+ * already updated synchronously by the caller — only the paint waits, and
749814
+ * it always renders current state, so a deferred paint is never stale.
749815
+ */
749816
+ scheduleScrollRepaint() {
749817
+ const delay5 = this._pacing.scrollCoalesceMs;
749818
+ if (delay5 <= 0) {
749819
+ this.repaintContent();
749820
+ return;
749821
+ }
749822
+ if (this._scrollRepaintTimer) return;
749823
+ this._scrollRepaintTimer = setTimeout(() => {
749824
+ this._scrollRepaintTimer = null;
749825
+ if (!this.active) return;
749826
+ this.repaintContent();
749827
+ }, delay5);
749828
+ this._scrollRepaintTimer.unref?.();
749829
+ }
749745
749830
  /**
749746
749831
  * Repaint content area from buffer at current scroll position.
749747
749832
  *
@@ -749756,6 +749841,10 @@ ${CONTENT_BG_SEQ}`);
749756
749841
  this.withTreePresentation(() => this.repaintContent());
749757
749842
  return;
749758
749843
  }
749844
+ if (this._scrollRepaintTimer) {
749845
+ clearTimeout(this._scrollRepaintTimer);
749846
+ this._scrollRepaintTimer = null;
749847
+ }
749759
749848
  const h = this.contentHeight;
749760
749849
  const livePartialLine = this.getLiveBufferedLine();
749761
749850
  const w = termCols();
@@ -750663,6 +750752,7 @@ ${CONTENT_BG_SEQ}`);
750663
750752
  */
750664
750753
  rememberFooterPaint(top) {
750665
750754
  this._lastFooterPaintTop = top;
750755
+ this._footerPaintCache = null;
750666
750756
  }
750667
750757
  /** Return the top row of the footer that is actually painted on screen. */
750668
750758
  paintedFooterTop(rows) {
@@ -750822,8 +750912,11 @@ ${CONTENT_BG_SEQ}`);
750822
750912
  const cursorTermRow = pos.inputStartRow + 1 + inputWrap.cursorRow;
750823
750913
  buf += `\x1B[${cursorTermRow};${inputWrap.cursorCol}H${CURSOR_BLINK_BLOCK}\x1B[?25h`;
750824
750914
  }
750825
- this.termWrite(buf);
750826
- this.rememberFooterPaint(pos.inputStartRow);
750915
+ if (force || buf !== this._footerPaintCache) {
750916
+ this.termWrite(buf);
750917
+ this.rememberFooterPaint(pos.inputStartRow);
750918
+ this._footerPaintCache = buf;
750919
+ }
750827
750920
  if (pos.tabBarRow > 0) this.renderAgentTabs();
750828
750921
  }
750829
750922
  /**
@@ -797472,7 +797565,7 @@ function telegramCommittedTerminalMaterial(result, owner, modelReply) {
797472
797565
  readinessHash: result.completionReadiness?.readinessHash
797473
797566
  }) ? result.terminalReport : void 0;
797474
797567
  const report2 = validReport ? renderTerminalTaskReport(validReport) : "";
797475
- const reportEvidence = validReport ? renderTerminalTaskReport(validReport, { maxChars: 24e3 }) : "";
797568
+ const reportEvidence = validReport ? renderTerminalTaskReport(validReport, { maxChars: 24e3, includeToolTelemetry: true }) : "";
797476
797569
  if (!result.completed || result.status !== "completed") return { ...empty2, report: report2, reportEvidence };
797477
797570
  const accepted = result.acceptedUserReply;
797478
797571
  const acceptedReply = accepted && accepted.runId === owner.runId && accepted.taskEpoch === owner.taskEpoch && accepted.terminalReceiptId === result.terminalReceiptId && typeof accepted.toolCallId === "string" && accepted.toolCallId.trim() && typeof accepted.text === "string" ? accepted.text : "";
@@ -838635,6 +838728,7 @@ import { Transform } from "node:stream";
838635
838728
  var MouseFilterStream;
838636
838729
  var init_mouse_filter = __esm({
838637
838730
  "packages/cli/src/tui/mouse-filter.ts"() {
838731
+ init_terminal_capabilities();
838638
838732
  MouseFilterStream = class extends Transform {
838639
838733
  buffer = "";
838640
838734
  onScroll = null;
@@ -838643,8 +838737,15 @@ var init_mouse_filter = __esm({
838643
838737
  onKeyboard = null;
838644
838738
  flushTimer = null;
838645
838739
  expectPrefixlessMouseUntil = 0;
838646
- constructor(scrollHandler, activityHandler, pointerHandler, keyboardHandler) {
838740
+ /** How long an ambiguous partial is held before it is judged. */
838741
+ flushMs;
838742
+ /** How long a fragmented mouse report keeps the prefixless parse open. */
838743
+ prefixlessWindowMs;
838744
+ constructor(scrollHandler, activityHandler, pointerHandler, keyboardHandler, timing) {
838647
838745
  super();
838746
+ const pacing = timing ?? resolveTuiPacing();
838747
+ this.flushMs = pacing.mouseFlushMs;
838748
+ this.prefixlessWindowMs = pacing.mousePrefixlessWindowMs;
838648
838749
  this.onScroll = scrollHandler;
838649
838750
  this.onActivity = activityHandler ?? null;
838650
838751
  this.onPointer = pointerHandler ?? null;
@@ -838712,10 +838813,10 @@ var init_mouse_filter = __esm({
838712
838813
  this.flushTimer = setTimeout(() => {
838713
838814
  if (this.buffer.length > 0) {
838714
838815
  if (this.buffer.startsWith("\x1B[<") || this.buffer.startsWith("\x1B[M")) {
838715
- this.expectPrefixlessMouseUntil = Date.now() + 1e3;
838816
+ this.expectPrefixlessMouseUntil = Date.now() + this.prefixlessWindowMs;
838716
838817
  this.buffer = "";
838717
838818
  } else if (this.buffer === "\x1B[") {
838718
- this.expectPrefixlessMouseUntil = Date.now() + 1e3;
838819
+ this.expectPrefixlessMouseUntil = Date.now() + this.prefixlessWindowMs;
838719
838820
  this.buffer = "";
838720
838821
  } else if (this.looksLikePartialPrefixlessSgrMouse(this.buffer)) {
838721
838822
  this.buffer = "";
@@ -838727,10 +838828,23 @@ var init_mouse_filter = __esm({
838727
838828
  this.buffer = "";
838728
838829
  }
838729
838830
  }
838730
- }, 50);
838831
+ }, this.flushDelayFor(this.buffer));
838731
838832
  }
838732
838833
  callback();
838733
838834
  }
838835
+ /**
838836
+ * How long to hold an ambiguous partial before judging it.
838837
+ *
838838
+ * A lone ESC is the Escape *key* far more often than it is the head of a
838839
+ * fragmented mouse report, and the user is waiting on it, so it keeps the
838840
+ * short local delay even on a slow link. Everything else uses the session
838841
+ * pacing: over SSH a real escape sequence is routinely split across reads,
838842
+ * and judging it too early is what turns a keypress into dropped input.
838843
+ */
838844
+ flushDelayFor(buffer2) {
838845
+ if (buffer2 === "\x1B") return Math.min(50, this.flushMs);
838846
+ return this.flushMs;
838847
+ }
838734
838848
  _flush(callback) {
838735
838849
  if (this.flushTimer) {
838736
838850
  clearTimeout(this.flushTimer);
@@ -2919,6 +2919,10 @@ import { appendFileSync, closeSync, existsSync as existsSync2, mkdirSync as mkdi
2919
2919
  import { dirname, join as join2 } from "node:path";
2920
2920
  var HOUR = 36e5;
2921
2921
  var DAY = 24 * HOUR;
2922
+ function envInt(name, fallback) {
2923
+ const raw = Number.parseInt(process.env[name] ?? "", 10);
2924
+ return Number.isFinite(raw) && raw >= 0 ? raw : fallback;
2925
+ }
2922
2926
  var DECAY_TAU2 = {
2923
2927
  session: HOUR,
2924
2928
  daily: DAY,
@@ -3363,7 +3367,7 @@ function maintainGraph(dbPath, options, shouldStop) {
3363
3367
  stats.edgesDeduped = dedupeGraphEdges(db, options.maxGraphDeletes ?? 2e3, !!options.dryRun);
3364
3368
  }
3365
3369
  if (!shouldStop()) {
3366
- stats.inactiveEdgesDeleted = pruneInactiveEdges(db, options.maxGraphDeletes ?? 2e3, !!options.dryRun);
3370
+ stats.inactiveEdgesDeleted = pruneInactiveEdges(db, options.maxInactiveEdgeDeletes ?? envInt("OMNIUS_KG_MAX_INACTIVE_EDGE_DELETES", 5e4), !!options.dryRun, options.supersededRetentionMs ?? envInt("OMNIUS_KG_SUPERSEDED_RETENTION_DAYS", 30) * DAY);
3367
3371
  }
3368
3372
  if (!shouldStop()) {
3369
3373
  stats.orphanNodesDeleted = pruneOrphanNodes(db, options.maxGraphDeletes ?? 2e3, !!options.dryRun);
@@ -3485,17 +3489,19 @@ function dedupeGraphEdges(db, limit, dryRun) {
3485
3489
  return ids.length;
3486
3490
  return deleteById(db, "kg_edges", ids);
3487
3491
  }
3488
- function pruneInactiveEdges(db, limit, dryRun) {
3489
- const cutoff = Date.now() - 14 * DAY;
3492
+ function pruneInactiveEdges(db, limit, dryRun, supersededRetentionMs = 30 * DAY) {
3493
+ const now = Date.now();
3494
+ const lowConfidenceCutoff = now - 14 * DAY;
3495
+ const supersededCutoff = supersededRetentionMs > 0 ? now - supersededRetentionMs : null;
3490
3496
  let ids = [];
3491
3497
  try {
3492
3498
  ids = db.prepare(`SELECT id
3493
3499
  FROM kg_edges
3494
3500
  WHERE valid_until IS NOT NULL
3495
- AND valid_until < ?
3496
- AND COALESCE(confidence, 1) < 0.55
3501
+ AND ( (valid_until < ? AND COALESCE(confidence, 1) < 0.55)
3502
+ OR (? IS NOT NULL AND valid_until < ?) )
3497
3503
  ORDER BY valid_until ASC
3498
- LIMIT ?`).all(cutoff, Math.max(1, limit)).map((row) => row.id);
3504
+ LIMIT ?`).all(lowConfidenceCutoff, supersededCutoff, supersededCutoff, Math.max(1, limit)).map((row) => row.id);
3499
3505
  } catch {
3500
3506
  return 0;
3501
3507
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.703",
3
+ "version": "1.0.705",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.703",
9
+ "version": "1.0.705",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
@@ -169,9 +169,9 @@
169
169
  }
170
170
  },
171
171
  "node_modules/@colors/colors": {
172
- "version": "1.6.0",
173
- "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz",
174
- "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==",
172
+ "version": "1.6.1",
173
+ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.1.tgz",
174
+ "integrity": "sha512-dTmUJzXSuayBK+hZydEaXd2mhx61qWQwkwaBBY6LyEOVx/L9aQU5ac8eFNEsd9nrD1+zb9zvDCphLSe8g1F4Qw==",
175
175
  "license": "MIT",
176
176
  "optional": true,
177
177
  "engines": {
@@ -179,9 +179,9 @@
179
179
  }
180
180
  },
181
181
  "node_modules/@dabh/diagnostics": {
182
- "version": "2.0.8",
183
- "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.8.tgz",
184
- "integrity": "sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q==",
182
+ "version": "2.0.9",
183
+ "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.9.tgz",
184
+ "integrity": "sha512-R6siwR65Hm+3yfgP7o8DKhNvputQAwfoz9zTc3kyDudnomj2/BcLmD+uGQQPICjuFUp8ounPBU+jmKsocwVVAg==",
185
185
  "license": "MIT",
186
186
  "optional": true,
187
187
  "dependencies": {
@@ -2426,12 +2426,12 @@
2426
2426
  }
2427
2427
  },
2428
2428
  "node_modules/@types/node": {
2429
- "version": "26.4.1",
2430
- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.1.tgz",
2431
- "integrity": "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==",
2429
+ "version": "26.5.0",
2430
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.5.0.tgz",
2431
+ "integrity": "sha512-dVSGpriSoCgz8WnDNTuSSuSv1PC/ALXihO4ulRZt7Md8k9mlbdin3lGOcDE8SnWOgf513ByWlXd7BK4azmyg/A==",
2432
2432
  "license": "MIT",
2433
2433
  "dependencies": {
2434
- "undici-types": "~8.3.0"
2434
+ "undici-types": "~8.9.0"
2435
2435
  }
2436
2436
  },
2437
2437
  "node_modules/@types/sinon": {
@@ -4432,9 +4432,9 @@
4432
4432
  "license": "BSD-3-Clause"
4433
4433
  },
4434
4434
  "node_modules/ignore": {
4435
- "version": "7.0.8",
4436
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.8.tgz",
4437
- "integrity": "sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==",
4435
+ "version": "7.0.9",
4436
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.9.tgz",
4437
+ "integrity": "sha512-brTTsvFRt5C1gGHtPst/281UjPD5t9fBqbgoMPlVWy11ZLTPfu7HxK4ZYqO9H7o/yC9rSTCI85EaQ4OoY12qYw==",
4438
4438
  "license": "MIT",
4439
4439
  "engines": {
4440
4440
  "node": ">= 4"
@@ -5392,6 +5392,16 @@
5392
5392
  "node": ">= 12.0.0"
5393
5393
  }
5394
5394
  },
5395
+ "node_modules/logform/node_modules/@colors/colors": {
5396
+ "version": "1.6.0",
5397
+ "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz",
5398
+ "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==",
5399
+ "license": "MIT",
5400
+ "optional": true,
5401
+ "engines": {
5402
+ "node": ">=0.1.90"
5403
+ }
5404
+ },
5395
5405
  "node_modules/lru-cache": {
5396
5406
  "version": "11.5.2",
5397
5407
  "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
@@ -7633,9 +7643,9 @@
7633
7643
  }
7634
7644
  },
7635
7645
  "node_modules/undici-types": {
7636
- "version": "8.3.0",
7637
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
7638
- "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
7646
+ "version": "8.9.0",
7647
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
7648
+ "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
7639
7649
  "license": "MIT"
7640
7650
  },
7641
7651
  "node_modules/universalify": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.703",
3
+ "version": "1.0.705",
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/library.js",
@@ -164,5 +164,5 @@
164
164
  "transcribe-cli": "^2.0.1",
165
165
  "viem": "2.47.4"
166
166
  },
167
- "readme": "# Omnius\n\nOmnius is a local-first agentic coding runtime: terminal UI, autonomous coding loop, REST daemon, model router, memory layer, media tools, Telegram bridge, and peer-to-peer inference mesh in one CLI.\n\nIt is designed for open-weight and user-controlled models first, while still routing cleanly through Ollama, vLLM, OpenAI-compatible endpoints, OpenRouter, Groq, Chutes, sponsor peers, COHERE peers, and other configured providers.\n\n[![npm](https://img.shields.io/npm/v/omnius.svg)](https://www.npmjs.com/package/omnius)\n[![Node](https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg)](https://nodejs.org/)\n[![License](https://img.shields.io/badge/license-CC--BY--NC--4.0-blue.svg)](LICENSE)\n\n## Install\n\n```bash\nnpm install -g omnius\nomnius\n```\n\nRequirements:\n\n- Node.js 22 or newer\n- npm 10 or newer for published CLI use\n- pnpm 9 or newer for workspace development\n- A local model or configured remote endpoint\n\nStart the REST daemon:\n\n```bash\nomnius serve\n```\n\nThe daemon defaults to `http://127.0.0.1:11435`. Open the interactive API docs at `http://127.0.0.1:11435/docs`.\n\nRegister the native system tray indicator (Linux, macOS, and Windows x64):\n\n```bash\nomnius tray install\nomnius tray status\n```\n\nThe per-login indicator observes the daemon over loopback, checks health and npm\nupdates every 10 seconds, and provides dashboard, logs, and explicit daemon\ncontrols. Its version row is passive when current and becomes a verified global\nupdate action only when a newer exact semver is available. See the\n[system tray guide](docs/guides/system-tray.md), including Ubuntu/GNOME setup.\n\n## Agent Discovery\n\nThe npm package ships its complete documentation and a machine-readable\ncapability catalog. An agent does not need to inspect Omnius source or guess\nwhich endpoint owns a capability:\n\n```bash\nomnius discover \"bring your own inference\"\nomnius show workflow.choose-entrypoint\nomnius show layer.orchestration\nomnius show store.project\nomnius show provider.anthropic\nomnius show provider.gemini\nomnius show tool.web-search\nomnius discover \"evidence-bound decision impasse\"\nomnius show tool.adjudicate\nomnius discover \"osint research\"\nomnius show capability.osint-research\nomnius capabilities --json\n```\n\nWith the daemon running, begin at `GET /v1/discovery/bootstrap`. The same\ndiscovery cascade is available at `GET /v1/discovery`, with exact entry expansion at\n`GET /v1/discovery/{id}`. The live API contract remains available at\n`/openapi.json`, direct tool metadata at `/v1/tools`, and skills at\n`/v1/skills`.\n\nStart with [the discovery guide](docs/DISCOVERY.md) when integrating another\nagent or service, and use the [agent system map](docs/architecture/agent-system-map.md)\nto trace layers, modules, runtimes, and state ownership. Use [bring-your-own inference](docs/guides/bring-your-own-inference.md)\nfor provider protocols and keys, and [tools and web search](docs/guides/tools-and-web-search.md)\nfor the distinction between direct tools and agent-bound tools. The\n[evidence-bound adjudication guide](docs/ADJUDICATION.md) explains how a\ntop-level full agent freezes an admissible record, isolates a genuine decision\nimpasse from accumulated working context, fans review out across fresh\nevidence-scoped constituents, validates evidence citations and quorum, and\nproduces a durable verdict receipt. Top-level runtimes execute constituents in\na dedicated `full_sub_agent` process profile that cannot load tools, project\ncontext, memory, or the ambient parent environment. The process runs outside\nthe project directory. Cancellation and deadlines terminate its child processes;\nordinary child transport failure is recorded before bounded direct fallback.\nPlanner schema drift uses a deterministic question-framing fallback, and\ndurable artifact replay verifies the case, findings, verdict, and receipt\nhashes without new inference. The\n[categorized OSINT research guide](docs/guides/osint-research.md) documents\nthe local discover → exact expansion → explicit web-tool workflow.\n\n## What Omnius Does\n\n- Runs autonomous coding tasks, edits files, executes tools, tests changes, and iterates on failures.\n- Resolves genuine decision impasses in fresh evidence-scoped contexts that reduce parent-context anchoring, with host-validated citations, quorum, preserved dissent, and durable verdict receipts.\n- Provides a dense terminal UI for model selection, endpoint routing, task control, shell output, voice, sponsors, Telegram, and system telemetry.\n- Exposes a REST daemon with OpenAI/Ollama-compatible inference, agentic task execution, memory, skills, tools, MCP, events, voice, projects, and governance endpoints.\n- Routes models through local, cloud, sponsor, and peer-to-peer endpoints without assuming local Ollama is the only source.\n- Supports realtime spoken conversation for ASR/TTS clients through `/realtime` and REST `realtime: true`.\n- Supports image, video, sound, music, TTS, ASR, voice clone references, Telegram media workflows, and sponsor-provided media generation.\n- Keeps project runtime state in `.omnius/`, which is intentionally ignored by git.\n\n## Common Workflows\n\n```bash\nomnius \"inspect this repo and summarize the main entrypoints\"\nomnius serve\n```\n\n```text\n/help command help\n/model select or inspect the active model\n/endpoint select or configure local, cloud, sponsor, or peer endpoints\n/title name the current session\n/realtime toggle short ASR/TTS-oriented conversation mode\n/voice choose TTS, voice-clone, voicechat, and ASR controls\n/voice asr select, set up, activate, or test an exact ASR engine/model\n/indicator reconcile the daemon, then start the native tray indicator\n/update check force an update availability check\n/update quick run the verified global update with live TUI progress\n/update full run the full clean/build/install/restart verification flow\n/broker inspect model broker, RAM/VRAM thresholds, and loaded models\n/sponsor expose local or upstream capacity to peers\n/cohere participate in distributed COHERE inference\n/telegram configure or toggle the Telegram bridge\n/skills list explorable skills and docs memories\n/pause pause after the current turn boundary\n/stop interrupt the active run\n/resume resume saved state\n```\n\n## Current Feature Areas\n\n| Area | What to read |\n| --- | --- |\n| Install and setup | [Install](docs/getting-started/install.md), [First run](docs/getting-started/first-run.md), [Model providers](docs/getting-started/model-providers.md) |\n| Agent discovery | [Discovery cascade](docs/DISCOVERY.md), [machine catalog](docs/DISCOVERY.json), [agent integration](docs/guides/agent-integration.md) |\n| Bring your own inference | [Provider protocols and keys](docs/guides/bring-your-own-inference.md) |\n| Tools and web search | [Tool discovery and invocation](docs/guides/tools-and-web-search.md) |\n| Evidence-bound adjudication | [Adjudication tool, panel workflow, verdict contract, and harness](docs/ADJUDICATION.md) |\n| Terminal workflows | [TUI workflows](docs/guides/tui-workflows.md), [Slash commands](docs/reference/slash-commands.md) |\n| Web dashboard | [All dashboard routes, workspaces, sessions, Voice, Generate, updates, and observability](docs/guides/dashboard.md) |\n| REST daemon | [REST reference](docs/reference/rest-api.md), [REST quickref](docs/rest/QUICKREF.md), [OpenAPI source](docs/rest/openapi-source.md) |\n| System tray | [Cross-platform tray and Ubuntu setup](docs/guides/system-tray.md) |\n| Realtime voice chat | [Realtime guide](docs/guides/realtime.md) |\n| TTS and selectable ASR | [Voice/vision REST guide](docs/rest/endpoints/voice-vision.md), [Dashboard Voice page](docs/guides/dashboard.md#voice-and-asr) |\n| Sponsor and COHERE mesh | [Sponsor and COHERE guide](docs/guides/sponsor-and-cohere.md) |\n| Telegram bridge | [Telegram guide](docs/guides/telegram.md) |\n| Media generation | [Media guide](docs/guides/media-generation.md) |\n| Operations | [Runtime hygiene](docs/operations/runtime-hygiene.md), [Security and remote access](docs/operations/security-and-remote-access.md) |\n| Service compatibility | [Runtime version gate](docs/operations/version-compatibility.md) |\n| Architecture | [Architecture overview](docs/architecture/overview.md) |\n| Agent-explorable docs | [Agent memory docs index](docs/agent-memory/INDEX.md) |\n\n## Web Dashboard\n\n`omnius serve` exposes a self-contained operational dashboard at\n`http://127.0.0.1:11435/`. All pages use the same compact NOCLIP-derived style\ntokens and responsive observability-card grid, while keeping workspace, model,\nsession, run, service, and update state visible instead of hiding it behind\ndecorative pages.\n\n| Route | Purpose |\n| --- | --- |\n| `/chat` (`/`) | Stateful browser and imported TUI chats, full-history hydration, live run recovery, attachments, files, plan/context, and steering check-ins |\n| `/agent` | One-shot task contracts, personas/profiles, tool/isolation controls, run records, output, and events |\n| `/voice` | Voicechat, exact TTS model/options, clone references, ASR engine/model setup and activation, real-file ASR testing, transcript, and TTS testing |\n| `/generate` | Image/video/audio/music jobs, AV analysis, model/store controls, relocation progress, and global gallery |\n| `/projects` | Scan, register, rename, activate, and remove workspaces |\n| `/dashboard` (`/jobs`) | CPU/RAM/GPU/VRAM, processes, scheduler, services, usage, and verified updates |\n| `/activity` | Live run/tool/memory/engine event observability |\n| `/discover` | Agent bootstrap, capability intent search, and exact entry expansion |\n| `/settings` (`/config`) | Models, endpoints, voice, runtime, access, keys, appearance, and services |\n\nThe clickable sidebar brand opens the registered-workspace picker. Workspace\nselection scopes preferences, files, session history, chat pins/folders/search,\nand agent defaults. Chats, TUI visual history, and one-shot agent runs are\ndistinct records: `/quit`, `/exit`, manual-save noise, empty histories, and\nduplicate TUI transcripts are rejected from the chat projection; selecting a\nvalid session loads its full history and in-flight status from the daemon.\nThe chat top bar also reports the effective API base path and authentication\nmode. Streams retain split frames, Stop terminates the daemon-owned process\nlease, and assistant-provided web/file links stay inert until the daemon\nreturns a validation receipt.\n\nThe dashboard checks for updates every 10 seconds. An update button appears only\nfor a newer exact semver and drives `POST /v1/update`, then polls the durable\ntransaction until the global npm package, resolved executable, restarted daemon,\npackage/boot hashes, and tray runtime are reconciled. See the\n[complete dashboard guide](docs/guides/dashboard.md) for state ownership,\nsecurity, page-by-page behavior, and exact REST flows.\n\n## Shared Media Dependencies\n\nImage, video, audio, and music generation share a **single, system-wide dependency store** instead of duplicating heavy runtimes per project or per Telegram group.\n\nEarlier builds wrote a private Python venv plus Hugging Face / Torch / pip caches under every scoped working directory (for example `…/telegram-creative/<group-id>/.omnius/image-gen/.venv`). On a busy machine the same multi-gigabyte diffusers stack and model weights were re-downloaded once per group — tens of gigabytes of pure duplication.\n\nEverything now resolves to one source of truth under `~/.omnius` (override with `OMNIUS_HOME`):\n\n| Location | Holds |\n| --- | --- |\n| `~/.omnius/runtimes/<kind>/.venv-<backend>` | One shared Python venv per kind+backend (image/video/audio) |\n| `~/.omnius/models/huggingface/{hub,transformers,diffusers}` | Shared model weights — downloaded once, reused everywhere |\n| `~/.omnius/models/{torch,cache,pip-cache}` | Shared Torch hub, XDG, and pip caches |\n| `~/.omnius/models/_meta.json` | LRU usage index for automatic disk-pressure eviction |\n| `~/.omnius/media/{images,videos,audio,music}` | Global generated-media gallery (project-independent) |\n\nProject directories keep only lightweight session artifacts; no venvs or model weights are written per project.\n\n**Migrate and dedup existing machines.** A one-time cleanup consolidates any legacy per-group caches into the unified store — unique weights are moved (never re-downloaded), duplicates and stale venvs are reclaimed:\n\n```bash\n# TUI — current project only\n/models cleanup\n# TUI — every project + nested scoped group on this machine (dry-run first)\n/models cleanup --all --dry-run\n/models cleanup --all\n```\n\n```bash\n# REST — preview, then apply\ncurl -s -X POST localhost:11435/v1/media/migrate -H 'content-type: application/json' -d '{\"dryRun\":true}'\ncurl -s -X POST localhost:11435/v1/media/migrate -H 'content-type: application/json' -d '{}'\n# Inspect store + reclaimable legacy caches\ncurl -s localhost:11435/v1/media/store\n```\n\n**Generate over REST.** The daemon (default `127.0.0.1:11435`, a port in the IANA dynamic/private range that avoids common system-service collisions) exposes the local generators so any user on the machine can list models, generate, and browse the global gallery without the CLI:\n\n```bash\ncurl -s localhost:11435/v1/media/models\ncurl -s -X POST localhost:11435/v1/media/image -H 'content-type: application/json' -d '{\"prompt\":\"a compact robot painter\"}'\ncurl -s -X POST localhost:11435/v1/media/music -H 'content-type: application/json' -d '{\"prompt\":\"warm lo-fi piano loop\"}'\ncurl -s localhost:11435/v1/media/gallery\n```\n\nThe same surface drives the **Generate** tab in the web UI (`http://127.0.0.1:11435`) — pick a kind (image/video/audio/music), choose a model loaded from the system, generate, and review every previously generated file in one global gallery.\n\n## Recent Highlights\n\n- The dashboard now has nine route-level operational surfaces with shared modular observability grids, a searchable workspace picker, and project-scoped navigation state.\n- Chat history unifies persisted browser sessions with quality-filtered TUI transcripts, rejects command/noise sessions such as `/quit`, hydrates full history on selection, and exposes summaries, follow-up suggestions, reactive live deltas, and canonical deletion.\n- `/indicator` reconciles daemon ownership and health before launching the tray; the tray polls every 10 seconds and turns its version row into a retryable verified-update action only when an update exists.\n- Dashboard, tray, and TUI update actions now share an exact-version global transaction with live phase/output and package, executable, daemon, hash, restart, and tray verification.\n- TTS exposes GLaDOS, Overwatch, `luxtts:announcer-testchamber03`, and configurable Voicebox models; ASR independently exposes Whisper, managed `transcribe-cli`, Nemotron readiness, and pinned Microsoft VibeVoice ASR with Jetson/ARM64 CUDA-aware setup.\n- LuxTTS auto-setup on Jetson ARM64 requires CPU ONNX Runtime at import time, validates CUDA Torch separately against the host runtime, preserves existing caches during repair, and never substitutes generic PyPI Torch or automatic sudo for an AGX Orin deployment.\n- `/realtime` and REST `realtime: true` provide short, natural, SOUL.md-aware conversation for ASR/TTS clients.\n- Endpoint setup and sponsor setup aggregate models from all enabled endpoints, including external OpenAI-compatible routers.\n- `/sponsor` can expose text inference and media generation for image, video, sound, and music with per-modality limits.\n- Sponsor and COHERE status surfaces now use shared telemetry concepts: concurrency, request rate, daily tokens, peer usage, model usage, and remote system metrics.\n- The TUI reports token production rate as `t/s`, supports Shift+Enter multiline input, and renders dynamic shell output inside bounded Unicode cards.\n- Telegram state is scoped by user and group, supports durable reply preferences, and feeds raw platform/tool failures back into the agent loop.\n- Telegram media ingress is byte- and duration-bounded, cache-only before routing, deduplicated by Telegram file identity, and evidence-gated after admission. Speech uses scoped transcription; music/general audio uses typed semantic or explicitly acoustic-only analysis without false listening claims.\n- Telegram public creative work now includes typed PDF/DOCX creation and hash-guarded review, fixed-operation FFmpeg audio editing, and root-confined image crop/resize/mask/composite workflows. Host-signed content capabilities bind review evidence and durable Telegram delivery to the exact artifact bytes.\n- Ollama pool cleanup now accounts for process groups and orphan runner processes that can keep VRAM pinned.\n- REST documentation is available both as human docs and as Omnius-discoverable docs skills.\n\n## REST API\n\nStart the daemon (default `http://127.0.0.1:11435`; interactive docs at `/docs`, machine spec at `/openapi.json`):\n\n```bash\nomnius serve\n```\n\nFor shared deployments, gate access with scoped bearer keys (`read` < `run` < `admin`):\n\n```bash\nOMNIUS_REST_API_KEYS=\"read-key:read:grafana,run-key:run:ci:60:100000:3,admin-key:admin:ops\" omnius serve\n# then: Authorization: Bearer <key>\n```\n\nThe complete supported endpoint inventory follows. The canonical machine\ncontract is generated from [`packages/cli/src/api/openapi.ts`](packages/cli/src/api/openapi.ts),\nvalidated against [`docs/reference/rest-api.md`](docs/reference/rest-api.md),\nand projected into the generated block below. `pnpm docs:check` now fails when\nany of those three surfaces drift. Browser HTML pages, Swagger static assets,\nand implementation-only compatibility bridges are intentionally outside this\nstable REST contract.\n\n<!-- BEGIN GENERATED REST INVENTORY -->\n### Docs And Compatibility Aliases\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/docs` | Swagger UI |\n| `GET` | `/api/docs` | Swagger UI alias |\n| `GET` | `/openapi.json` | OpenAPI JSON |\n| `GET` | `/openapi.yaml` | OpenAPI YAML |\n| `GET` | `/v3/api-docs` | OpenAPI alias |\n| `GET` | `/swagger.json` | Swagger-era alias |\n| `GET` | `/api-docs` | OpenAPI alias |\n| `GET` | `/swagger-ui` | Swagger UI alias |\n| `GET` | `/redoc` | ReDoc renderer |\n| `GET` | `/` | HATEOAS API root when the client does not request HTML |\n| `GET` | `/help` | Compact daemon integration help |\n| `GET` | `/v1/routes` | Flat grep-friendly daemon route summary |\n| `GET` | `/routes` | Route-summary compatibility alias |\n| `GET` | `/asyncapi.json` | AsyncAPI 2.6 voicechat WebSocket contract |\n| `GET` | `/asyncapi` | AsyncAPI compatibility alias |\n\n### Health And Observability\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/health` | Liveness probe |\n| `GET` | `/health/ready` | Backend readiness |\n| `GET` | `/health/startup` | Startup probe |\n| `GET` | `/version` | Package version and platform |\n| `GET` | `/metrics` | Prometheus metrics |\n| `GET` | `/v1/events` | Server-sent event stream |\n| `GET` | `/v1/usage` | Token usage and rate limits |\n| `GET` | `/v1/audit` | Audit log query |\n| `GET` | `/v1/cost` | Cost tracker |\n| `GET` | `/v1/system` | CPU, RAM, GPU, and system snapshot |\n\n### Discovery\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/discovery/bootstrap` | Compact agent bootstrap and start-here map |\n| `GET` | `/v1/discovery` | Search layers, workflows, runtimes, modules, stores, and capabilities |\n| `GET` | `/v1/discovery/{id}` | Expand one stable capability entry |\n\n### Inference And Chat\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/models` | Aggregated model list |\n| `POST` | `/v1/chat/completions` | OpenAI-compatible chat completion |\n| `POST` | `/v1/chat` | Stateful Omnius chat |\n| `POST` | `/api/chat` | Ollama-compatible chat alias |\n| `POST` | `/v1/generate` | Ollama-compatible one-shot generation |\n| `POST` | `/api/generate` | Ollama-compatible generate alias |\n| `POST` | `/v1/embeddings` | OpenAI-compatible embeddings |\n| `POST` | `/api/embed` | Ollama-compatible embeddings alias |\n| `GET` | `/api/tags` | Ollama-compatible model tags |\n| `POST` | `/realtime` | Text-only voice-adapter reply from a transcript |\n| `POST` | `/v1/realtime` | Auth-scoped realtime adapter alias |\n| `GET` | `/v1/chat/sessions` | Workspace-scoped persisted browser chats and importable TUI sessions |\n| `GET` | `/v1/chat/sessions/{id}` | Hydrate full session history, transcript, and in-flight state |\n| `DELETE` | `/v1/chat/sessions/{id}` | Permanently delete a canonical chat or TUI history session |\n| `POST` | `/v1/chat/sessions/{id}/summarize` | Generate + cache an inference-based session title/summary |\n| `POST` | `/v1/chat/suggest-followup` | Suggest one short next-message follow-up (ghost-text input) |\n| `GET` | `/v1/chat/sessions/{id}/status` | Reactive recall: live run status + unseen deltas (`?since=<seq>`) |\n| `POST` | `/v1/chat/sessions/{id}/pause` | Pause the exact daemon-owned chat generation at a safe admission boundary |\n| `POST` | `/v1/chat/sessions/{id}/resume` | Resume the exact paused daemon-owned chat generation |\n| `POST` | `/v1/chat/sessions/{id}/stop` | Stop the daemon-owned chat process lease; idle/terminal calls are idempotent |\n| `POST` | `/v1/chat/check-in` | Steering check-in for active chat |\n| `POST` | `/v1/chat/attachments` | Upload an attachment for a stateful chat |\n| `POST` | `/v1/links/validate` | Validate an external HTTP(S) destination under the daemon egress policy |\n\n#### Session History Contract\n\n`GET /v1/chat/sessions` is a history index, not merely a list of processes that\nare currently active. It returns canonical persisted browser chats for the\nselected workspace and, by default, quality-filtered TUI visual sessions that\ncan be imported on demand. Pass `?root=/absolute/workspace` to scope the list and\n`?include_tui=0` to omit TUI history. Exit-only inputs such as `/quit` and\n`/exit`, manual-save noise, empty transcripts, and duplicate normalized TUI\nsessions are rejected by the session-quality projection rather than presented as\nchats.\n\nSelecting a row should call `GET /v1/chat/sessions/{id}`. That response hydrates\nthe complete public message history (system prompts are intentionally omitted),\nthe original TUI transcript when applicable, token counts, timestamps, source\nand project identity, and any in-flight run with a bounded partial-output tail.\nUse the `status` endpoint with `?since=<seq>` for cheap reactive polling while a\nrun is active. `DELETE /v1/chat/sessions/{id}` is an admin operation and removes\nthe canonical record; deleting only a browser-side row does not remove daemon\nhistory.\n\nPause and resume use the exact session and active external-run identity. Both\noperations require `run` scope. An idle session returns `200`. An accepted\nrequest returns `200` with the lifecycle acknowledgement, owner generation,\ncurrent phase, resumability, and pending acknowledgement count. A lifecycle\nrejection returns `409`. A live owner that does not acknowledge within the\ncontrol deadline returns `504`. Clients must not treat a local UI pause as a\ndaemon pause.\n\n`POST /realtime` and `/v1/realtime` are text-only conversation adapters. They\naccept transcript text through `message`, `text`, `recent_turn`, `asr_text`, or\n`callerText`, optionally accept adapter-local `soul_md`, and can return plain\ntext with `Accept: text/plain` or `format: \"text\"`. ASR and TTS remain separate\noperations.\n\n### Agentic Runs\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `POST` | `/v1/run` | Submit agentic task |\n| `GET` | `/v1/runs` | List runs |\n| `GET` | `/v1/runs/{id}` | Get run details |\n| `GET` | `/v1/runs/{id}/output` | Read captured run output and status |\n| `DELETE` | `/v1/runs/{id}` | Abort run |\n| `POST` | `/v1/todos` | Create or update todos for current session |\n| `GET` | `/v1/todos` | List sessions with todos |\n| `GET` | `/v1/todos/{session_id}` | Get session todos |\n| `DELETE` | `/v1/todos/{session_id}` | Delete session todos |\n| `POST` | `/v1/evaluate` | Evaluate a run |\n| `POST` | `/v1/index` | Trigger repository indexing |\n\n### Configuration, Keys, Profiles, Projects\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/config` | Read daemon config |\n| `PATCH` | `/v1/config` | Update daemon config |\n| `GET` | `/v1/config/model` | Current model |\n| `PUT` | `/v1/config/model` | Switch model |\n| `POST` | `/v1/config/model/check` | Probe model readiness with non-empty text |\n| `GET` | `/v1/config/endpoint` | Current endpoint |\n| `PUT` | `/v1/config/endpoint` | Switch endpoint |\n| `POST` | `/v1/config/endpoint/test` | Probe endpoint |\n| `GET` | `/v1/config/endpoint/history` | Endpoint history |\n| `DELETE` | `/v1/config/endpoint/history` | Remove endpoint history item |\n| `POST` | `/v1/share/generate` | Generate remote-access share URL |\n| `GET` | `/v1/keys` | List runtime API keys |\n| `POST` | `/v1/keys` | Mint runtime API key |\n| `DELETE` | `/v1/keys/{prefix}` | Revoke runtime API keys by prefix |\n| `GET` | `/v1/profiles` | List tool profiles |\n| `POST` | `/v1/profiles` | Create tool profile |\n| `GET` | `/v1/profiles/{name}` | Get profile |\n| `DELETE` | `/v1/profiles/{name}` | Delete profile |\n| `GET` | `/v1/projects` | List known projects |\n| `DELETE` | `/v1/projects` | Unregister a project |\n| `GET` | `/v1/projects/current` | Current project |\n| `POST` | `/v1/projects/switch` | Switch project |\n| `POST` | `/v1/projects/register` | Register project |\n| `POST` | `/v1/projects/rename` | Rename project |\n| `GET` | `/v1/projects/preferences` | Read project preferences |\n| `PUT` | `/v1/projects/preferences` | Patch project preferences |\n| `DELETE` | `/v1/projects/preferences` | Reset project preferences |\n| `GET` | `/v1/projects/scan` | Scan configured roots for discoverable workspaces |\n| `GET` | `/v1/admin/access` | Read the daemon network access mode |\n| `POST` | `/v1/admin/access` | Change and persist access mode from loopback only |\n\n### Skills, Commands, Tools, MCP\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/skills` | List skills |\n| `GET` | `/v1/skills/{name}` | Load skill content |\n| `GET` | `/v1/commands` | List slash commands |\n| `POST` | `/v1/commands/{cmd}` | Execute slash command |\n| `GET` | `/v1/tools` | List tools (built-in + external) |\n| `POST` | `/v1/tools/register` | Register an application-specific external tool |\n| `GET` | `/v1/tools/{name}` | Tool metadata |\n| `DELETE` | `/v1/tools/{name}` | Unregister an external tool |\n| `POST` | `/v1/tools/{name}/call` | Call tool |\n| `POST` | `/v1/tools/{name}/eval` | Evaluate an external tool against test cases |\n| `GET` | `/v1/mcps` | List MCP servers |\n| `GET` | `/v1/mcps/{name}` | MCP server details |\n| `POST` | `/v1/mcps/{name}/call` | Call MCP tool |\n| `GET` | `/v1/hooks` | Hook registry |\n| `GET` | `/v1/agents` | Agent type registry |\n| `GET` | `/v1/codegraph/snapshot` | Code graph snapshot |\n| `GET` | `/v1/codegraph/events` | Code graph SSE |\n\n#### Registering Application-Specific Tools\n\nApplications can register their own tools so Omnius agents can discover and\ninvoke them alongside built-ins. `transport.type` selects the bridge:\n\n- `http` makes Omnius POST `{name, args, session_id}` to the application's\n `callback_url` and relay the result.\n- `mcp` proxies to a named tool on an MCP server and can auto-connect from the\n supplied connection descriptor.\n\nRegistrations persist per workspace at `.omnius/external-tools.json`, appear in\n`GET /v1/tools`, and use the same scope and off-device security gates as built-in\ntools. Registration needs `run` scope; a non-loopback caller needs `admin`.\n\n```bash\ncurl -s -X POST localhost:11435/v1/tools/register -H 'content-type: application/json' -d '{\n \"name\": \"lookup_order\",\n \"description\": \"Look up an order by id\",\n \"parameters\": {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]},\n \"security\": {\"requires_scope\":\"run\",\"risk\":\"low\"},\n \"transport\": {\"type\":\"http\",\"callback_url\":\"https://app.internal/tools/lookup_order\",\"auth_header\":\"Bearer …\"}\n}'\ncurl -s localhost:11435/v1/tools/lookup_order\ncurl -s -X POST localhost:11435/v1/tools/lookup_order/call -H 'content-type: application/json' -d '{\"args\":{\"id\":\"A-1001\"}}'\ncurl -s -X POST localhost:11435/v1/tools/lookup_order/eval -H 'content-type: application/json' -d '{\"cases\":[{\"name\":\"known\",\"args\":{\"id\":\"A-1001\"},\"expect\":{\"success\":true}}]}'\ncurl -s -X DELETE localhost:11435/v1/tools/lookup_order\n```\n\nThe MCP equivalent uses a transport such as\n`{\"type\":\"mcp\",\"server\":\"acme\",\"tool\":\"search\",\"connect\":{\"url\":\"https://app.internal/mcp\",\"transport\":\"streamable-http\"}}`.\n\n### AIWG\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/aiwg` | AIWG root and control map |\n| `GET` | `/v1/aiwg/frameworks` | List frameworks |\n| `GET` | `/v1/aiwg/frameworks/{name}` | Framework details |\n| `GET` | `/v1/aiwg/frameworks/{name}/content` | Tier-aware content |\n| `GET` | `/v1/aiwg/skills` | List AIWG skills |\n| `GET` | `/v1/aiwg/skills/{name}` | Load AIWG skill |\n| `GET` | `/v1/aiwg/agents` | List AIWG agents |\n| `GET` | `/v1/aiwg/agents/{name}` | Load AIWG agent |\n| `GET` | `/v1/aiwg/addons` | List AIWG addons |\n| `POST` | `/v1/aiwg/use` | Tier-sized activation bundle |\n| `POST` | `/v1/aiwg/expand` | Expand matching AIWG item |\n\n### Memory, Sessions, Context\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/memory` | Memory backend summary |\n| `POST` | `/v1/memory/search` | Search memory |\n| `POST` | `/v1/memory/write` | Write memory |\n| `GET` | `/v1/memory/episodes` | List episodes |\n| `GET` | `/v1/memory/failures` | List failure records |\n| `POST` | `/v1/memory/ingest` | Ingest content or files into memory |\n| `GET` | `/v1/memory/entities` | List extracted memory entities |\n| `POST` | `/v1/memory/jobs/run` | Run a named memory-maintenance job |\n| `POST` | `/v1/memory/feedback` | Record relevance or quality feedback for a memory item |\n| `POST` | `/v1/memory/speaker-identities/enroll` | Admin-only, explicit-consent speaker exemplar enrollment in one exact vector space |\n| `POST` | `/v1/memory/speaker-identities/match` | Admin-only provisional speaker candidate matching without durable assignment |\n| `GET` | `/v1/sessions` | List task sessions |\n| `GET` | `/v1/sessions/{id}` | Get session history |\n| `GET` | `/v1/context` | Current context snapshot |\n| `GET` | `/v1/context/window-dumps` | List persisted outbound model context-window dumps |\n| `GET` | `/v1/context/window-dumps/{id}` | Fetch a full outbound model context-window dump |\n| `POST` | `/v1/context/save` | Save context entry |\n| `GET` | `/v1/context/restore` | Build restore prompt |\n| `POST` | `/v1/context/compact` | Request compaction |\n\nContext-window dumps are written before backend inference for main agents, sub-agents, internal runners, and adversary audits. Query\n`GET /v1/context/window-dumps?agent_type=main` for summaries with signal/noise\nmetrics, or fetch a full payload by id. Dumps include focus-supervisor state when\na next-action contract is active. Set `OMNIUS_CONTEXT_WINDOW_DUMP_DIR` to move\nthe store, `OMNIUS_DISABLE_CONTEXT_WINDOW_DUMPS=1` to disable it, and\n`OMNIUS_FOCUS_SUPERVISOR=off|auto|strict` to tune focus enforcement.\n\n### Files, Web, Nexus, Ollama Pool\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/files` | List workspace directory |\n| `POST` | `/v1/files/read` | Read workspace file |\n| `GET` | `/v1/files/raw` | Stream raw workspace bytes with content type and range support |\n| `HEAD` | `/v1/files/raw` | Inspect raw-file response metadata |\n| `GET` | `/v1/web/search` | Inspect web-search availability, schema, and security policy |\n| `POST` | `/v1/web/search` | Search the web directly through the Omnius tool runtime |\n| `GET` | `/v1/web/fetch` | Inspect web-fetch availability, schema, and security policy |\n| `POST` | `/v1/web/fetch` | Fetch a URL directly through the Omnius tool runtime |\n| `GET` | `/v1/web/crawl` | Inspect web-crawl availability, schema, and security policy |\n| `POST` | `/v1/web/crawl` | Crawl a website directly through the Omnius tool runtime |\n| `GET` | `/v1/nexus/status` | Nexus peer state |\n| `GET` | `/v1/sponsors` | Sponsor directory cache |\n| `GET` | `/v1/ollama/pool/processes` | Ollama process inventory |\n| `POST` | `/v1/ollama/pool/cleanup` | Cleanup stale Ollama pool processes |\n\nThe `/v1/web/*` routes are stable aliases of the shared tool registry. `GET`\nreturns the corresponding tool metadata. `POST` uses the same authentication,\nprofile, origin, timeout, output-size, audit, and network-egress policy as a\ndirect tool call. Send search requests as\n`{\"args\":{\"query\":\"...\",\"num_results\":5,\"provider\":\"duckduckgo\"}}` and\nfetch requests as `{\"args\":{\"url\":\"https://example.com\"}}`. Crawl uses the\nschema returned by its `GET` route and requires the browser dependencies that\nthe metadata reports. POST responses use the standard `ToolResult` envelope.\n\n### Voice, Audio, Vision\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/voice/state` | Voice runtime status |\n| `POST` | `/v1/voice/start` | Select an optional model, enable voice, and wait for readiness |\n| `POST` | `/v1/voice/stop` | Pause daemon voice input while leaving TTS warm |\n| `GET` | `/v1/voice/models` | TTS models |\n| `POST` | `/v1/voice/models/switch` | Switch and enable an exact TTS model by default |\n| `POST` | `/v1/voice/models/{modelId}/pull` | Install runtime prerequisites and pull one managed TTS model |\n| `POST` | `/v1/voice/models/{modelId}/deploy` | Pull and deploy one managed CUDA TTS model |\n| `GET` | `/v1/voice/supertonic-settings` | Voice tuning settings |\n| `POST` | `/v1/voice/supertonic-settings` | Update voice tuning settings |\n| `GET` | `/v1/asr/engines` | Canonical ASR engines/models, capabilities, readiness, and selection |\n| `GET` | `/v1/asr/status` · `/v1/asr/selection` | Selected engine/model and runtime status |\n| `GET` | `/v1/asr/downloads` | List persistent ASR weight download and deployment transitions |\n| `POST` | `/v1/asr/downloads` | Start or resume an ASR weight download |\n| `GET` | `/v1/asr/downloads/{engineId}/{modelId}` | Poll one ASR download and deployment transition |\n| `POST` | `/v1/asr/downloads/{engineId}/{modelId}` | Start or resume this model download |\n| `POST` | `/v1/asr/downloads/{engineId}/{modelId}/retry` | Retry or resume a failed or interrupted ASR weight download |\n| `PATCH` | `/v1/asr/selection` | Persist and activate an exact engine/model |\n| `POST` | `/v1/asr/activate` | Activate and persist an exact engine/model |\n| `POST` | `/v1/asr/engines/{engineId}/setup` | Install a managed runtime and pinned weights |\n| `POST` | `/v1/asr/engines/{engineId}/models/{modelId}/pull` | Pull one exact ASR model and validate its managed runtime |\n| `POST` | `/v1/asr/engines/{engineId}/models/{modelId}/deploy` | Pull, select, and activate one exact ASR model |\n| `POST` | `/v1/asr/transcriptions` · `/v1/asr/test` | Transcribe/test using the real selected backend |\n| `GET` | `/v1/voice/asr-models` | Compatibility registry alias |\n| `POST` | `/v1/voice/asr-models/switch` | Compatibility activation alias |\n| `POST` | `/v1/voice/tts` | Synthesize speech |\n| `POST` | `/v1/audio/speech` | OpenAI-compatible TTS alias |\n| `GET` | `/v1/audio/classify/health` | Jetson CUDA/TensorRT YAMNet readiness |\n| `POST` | `/v1/audio/classify/setup` | Provision and warm the pinned JetPack TensorRT YAMNet runtime |\n| `POST` | `/v1/audio/classify` | Direct-tool compatible CUDA audio classification |\n| `GET` | `/v1/audio/embed/health` | Role-typed embedding readiness (`?kind=acoustic|speaker|semantic`) |\n| `POST` | `/v1/audio/embed/setup` | Provision/warm one role-typed embedding runtime (admin; `?kind=...`) |\n| `POST` | `/v1/audio/embed` | Managed role-typed audio embedding (`?kind=...`) |\n| `GET` | `/v1/audio/diarization/live/readiness` | Non-mutating managed Sortformer worker readiness |\n| `POST` | `/v1/audio/diarization/live/setup` | Verify and warm a local Sortformer runtime (admin) |\n| `POST` | `/v1/audio/diarization/live` | Managed live/session-local speaker-turn diarization |\n| `POST` | `/v1/audio/diarization/live/cancel` | Terminate live worker work and clear its queue |\n| `GET` | `/v1/audio/diarization/reconcile/readiness` | Non-mutating managed Community-1 worker readiness |\n| `POST` | `/v1/audio/diarization/reconcile/setup` | Verify and warm a local Community-1 runtime (admin) |\n| `POST` | `/v1/audio/diarization/reconcile` | Managed offline/dream reconciliation proposals |\n| `POST` | `/v1/audio/diarization/reconcile/cancel` | Terminate reconciliation work and clear its queue |\n| `POST` | `/v1/voice/transcribe` | Transcribe audio |\n| `POST` | `/v1/voice/asr` | Legacy transcription alias |\n| `POST` | `/v1/audio/transcriptions` | OpenAI-compatible transcription alias |\n| `POST` | `/v1/voice/transcribe/stream` | Isolated final transcription over SSE (no shared mic state or fake partials) |\n| `POST` | `/v1/voice/clone-refs` | Upload voice clone reference |\n| `GET` | `/v1/voice/clone-refs` | List clone references |\n| `POST` | `/v1/voice/clone-refs/upload` | Upload clone reference |\n| `POST` | `/v1/voice/clone-refs/from-url` | Fetch clone reference |\n| `POST` | `/v1/voice/clone-refs/{filename}/activate` | Activate clone reference |\n| `POST` | `/v1/voice/clone-refs/{filename}/rename` | Rename clone reference |\n| `DELETE` | `/v1/voice/clone-refs/{filename}` | Delete clone reference |\n| `POST` | `/v1/voice/speak` | Broadcast speech to voicechat clients |\n| `GET` | `/v1/voicechat/ws` | WebSocket upgrade for full-duplex voicechat |\n| `POST` | `/v1/vision/describe` | Vision describe placeholder |\n| `GET` | `/v1/vision/embed/readiness` | Non-mutating isolated OpenCLIP readiness |\n| `POST` | `/v1/vision/embed/setup` | Explicit isolated OpenCLIP setup (admin scope) |\n| `POST` | `/v1/vision/embed` | Create a vision embedding from media |\n| `GET` | `/v1/ocr/readiness` | Non-mutating advanced-OCR dependency and backend readiness |\n| `POST` | `/v1/ocr/setup` | Create and verify the isolated OCR venv (admin scope) |\n| `POST` | `/v1/ocr/advanced` | Agent-equivalent managed advanced OCR (alias of `/v1/tools/ocr_image_advanced/call`) |\n\n`POST /v1/voice/tts` and `/v1/audio/speech` automatically warm the daemon.\nAn explicit model must render exactly or the request fails; Omnius does not\nsilently synthesize with another voice. Responses include `X-Voice-Model`,\n`X-Voice-Backend`, and `X-Sample-Rate`. Available models include GLaDOS,\nOverwatch, `luxtts:announcer-testchamber03`, and the selected Voicebox suite.\nSet `OMNIUS_VOICEBOX_MODELS=all` for every carried-in Voicebox model, leave it\nat `stable` for the default set, or provide a comma-separated subset.\n\nASR selection is independent from TTS selection. The registry currently exposes\nOpenAI Whisper, managed `transcribe-cli`, NVIDIA Nemotron (reported unavailable\nuntil its legacy bootstrap is migrated), and Microsoft VibeVoice ASR. VibeVoice\nuses the exact pinned `microsoft/VibeVoice-ASR` checkpoint, reports setup and\nactivation separately, supports completed files up to 60 minutes with speakers,\ntimestamps, and `?context=` hotwords, and is deliberately not advertised as an\nincremental PCM backend. Its managed setup inherits the host CUDA-enabled Torch\nbuild (needed on Jetson/ARM64), never installs generic PyPI Torch, and activation\nrequires one explicit capable GPU. Discrete Linux uses `nvidia-smi` process/GPU\nevidence; Jetson/L4T uses NVIDIA's documented `tegrastats` plus CUDA Torch device\nproperties because `nvidia-smi` is unavailable there. Model weights live under\nthe unified Omnius ASR cache and are not shipped in the npm package.\n\n### Generative Media\n\nAll generation is backed by the unified `~/.omnius` model store and shared venvs (single source of truth — no per-project duplication). Generated files are consolidated into the global gallery at `~/.omnius/media/{images,videos,audio,music}`.\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/media/models` | List available image/video/audio/music models |\n| `GET` | `/v1/media/store` | Unified store disk usage + reclaimable legacy caches |\n| `POST` | `/v1/media/migrate` | Dedup + migrate legacy per-group caches into the unified store |\n| `POST` | `/v1/media/relocate` | Relocate the whole media store (weights/venvs/gallery) to a chosen folder |\n| `GET` | `/v1/media/relocate/status` | Status + progress of the media-store relocation job |\n| `POST` | `/v1/media/av/analyze` | Analyze a media file into a grounded entity/event answer (AV comprehension) |\n| `POST` | `/v1/media/image` | Generate an image |\n| `POST` | `/v1/media/video` | Generate a video |\n| `POST` | `/v1/media/audio` | Generate a sound effect |\n| `POST` | `/v1/media/music` | Generate music |\n| `GET` | `/v1/media/gallery` | List previously generated media (global, newest first) |\n| `GET` | `/v1/media/file` | Stream one generated media file |\n\nManaged TTS `pull` installs the model's runtime prerequisites and weights. It\ndoes not start inference. Managed TTS `deploy` also verifies the selected CUDA\ndevice and starts the persistent runtime. Both operations return `200` when\nready, `404` when the model has no matching managed adapter, and `500` when\ninstallation, download, CUDA preflight, or startup fails.\n\nASR download requests use `{engineId, modelId, device?}`. A collection POST\nreturns `200` when weights are ready or `202` with `statusUrl`, `retryUrl`, and\n`pollAfterMs` while work is pending. Duplicate work coalesces. Poll the model\nURL until its download is ready and its deployment is active. A missing job\nreturns `404`. Model-specific POST and retry requests return `200` when ready or\n`202` when accepted. The model `pull` and `deploy` routes accept optional\n`{device}`. Pull validates the managed runtime and CUDA placement. Deploy also\npersists the selection after readiness and returns a pollable `202` transition\nwhen activation is pending.\n\n### Engines And Scheduled Jobs\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/engines` | Long-running engine status |\n| `GET` | `/v1/services` | List all active daemon-owned REST services and their routes |\n| `GET` | `/v1/services/{id}` | Get one daemon-owned REST service contract |\n| `GET` | `/v1/scheduled` | List scheduled jobs |\n| `DELETE` | `/v1/scheduled/all` | Delete all tasks, timers, cron entries, and persisted sources |\n| `GET` | `/v1/scheduled/status` | Scheduler status |\n| `POST` | `/v1/scheduled/{id}` | Enable or disable one scheduled task or user timer |\n| `DELETE` | `/v1/scheduled/{id}` | Delete one scheduled task or user timer |\n| `POST` | `/v1/scheduled/kill` | Kill scheduled job |\n| `POST` | `/v1/scheduled/fixup` | Reconcile scheduled state |\n| `GET` | `/v1/scheduled/reconcile` | Preview scheduled reconciliation |\n| `POST` | `/v1/scheduled/reconcile` | Preview or apply scheduled reconciliation |\n| `GET` | `/v1/services/systemd` | Systemd service status |\n| `POST` | `/v1/services/systemd/{unit}` | Act on one user-level systemd unit |\n| `GET` | `/v1/update` | Self-update status |\n| `POST` | `/v1/update` | Start an exact-version verified global update transaction |\n\n`GET /v1/services` is the agent-readable service inventory generated from the\nOpenAPI document. Each entry states lifecycle ownership, interactive-session\ndependency, registered routes, and a readiness or status route when one exists.\n`GET /v1/services/{id}` returns one service contract or `404` for an unknown\nservice ID. These discovery routes do not mutate services. `/listen` and\n`/hangup` control voice sessions only and do not own the REST daemon.\n\n#### Verified Global Update Transaction\n\n`POST /v1/update` is not a CLI-local package edit. It starts one durable\ntransaction that installs the requested exact npm version globally, verifies\nthe installed package and resolved `omnius` executable, restarts and verifies\nthe daemon, verifies package/hash/runtime agreement, and relaunches the tray if\nit was running. The response is `202` with operation state; poll\n`GET /v1/update` for live phase, subprocess output, verification evidence, and\nthe final success or failure. Concurrent transactions and requests with no\navailable target return `409`.\n\nThe web dashboard and native tray both use this same endpoint. Update discovery\nis shared and semver-aware, so an older cached registry result cannot downgrade\nor falsely present an update. A completed transaction means the global package,\nexecutable, daemon, and tray runtime were all reconciled—not merely that `npm`\nexited successfully.\n\n### AIMS Governance\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/aims` | AIMS root and endpoint index |\n| `GET` | `/v1/aims/policies` | Policy register |\n| `PUT` | `/v1/aims/policies` | Replace policy register |\n| `GET` | `/v1/aims/roles` | Roles and responsibilities |\n| `GET` | `/v1/aims/resources` | Resource inventory |\n| `GET` | `/v1/aims/impact-assessments` | Impact assessments |\n| `POST` | `/v1/aims/impact-assessments` | File impact assessment |\n| `GET` | `/v1/aims/lifecycle` | Lifecycle state |\n| `GET` | `/v1/aims/data-quality` | Data quality controls |\n| `GET` | `/v1/aims/transparency` | Model cards and transparency |\n| `GET` | `/v1/aims/usage` | AIMS usage view |\n| `GET` | `/v1/aims/suppliers` | Supplier inventory |\n| `GET` | `/v1/aims/incidents` | Incident records |\n| `POST` | `/v1/aims/incidents` | File incident |\n| `GET` | `/v1/aims/oversight` | Human oversight gates |\n| `GET` | `/v1/aims/decisions` | Consequential decision log |\n| `GET` | `/v1/aims/config-history` | Config change history |\n\n### Browser And Compatibility Surfaces\n\nThe dashboard HTML routes (`/`, `/chat`, `/agent`, `/voice`, `/generate`,\n`/projects`, `/dashboard`, `/jobs`, `/activity`, `/discover`, `/settings`, and\n`/config`) are documented in the [dashboard guide](../guides/dashboard.md). They\nare pages, not JSON API operations; `/` returns the HATEOAS JSON root when the\nclient does not request HTML.\n\nSwagger/ReDoc trailing-slash variants, `/api/docs/*` static assets, and\n`/favicon.ico` exist for browsers. They are delivery details rather than stable\nintegration endpoints. The daemon also retains browser/legacy bridges at\n`/v1/model`, `/v1/endpoint`, `/v1/theme`, `/v1/tor/*`, `/v1/remote-proxy`, and\n`/v1/command`. New clients should prefer `/v1/config/model`,\n`/v1/config/endpoint`, `/v1/config`, and `/v1/commands/{cmd}`. Compatibility\nhandlers may accept additional HTTP verbs for old dashboard bundles; only the\nmethods in the supported inventory above are contractual.\n<!-- END GENERATED REST INVENTORY -->\n## Agent-Explorable Documentation\n\nOmnius discovers project-local docs skills from `.aiwg/addons/*/skills`. The docs bundles in this repo expose high-signal entrypoints for agents:\n\n```text\n/skills omnius docs\nskill_execute name=\"omnius-docs\"\nskill_execute name=\"omnius-rest-docs\"\nskill_extract name=\"omnius-realtime-docs\" query=\"How does realtime REST mode work?\"\n```\n\nThe intended pattern is index first, targeted document second, not loading the whole manual into the active context.\n\n## Development\n\n```bash\npnpm install\npnpm -r build\npnpm docs:check\n```\n\nFocused checks used for the docs skill surface:\n\n```bash\npnpm --filter @omnius/execution exec vitest run tests/skill-discovery.test.ts\npnpm --filter omnius exec vitest run tests/realtime-mode.test.ts tests/command-registry.test.ts\n```\n\n## Publishing\n\nPublish only from `publish/`.\n\n```bash\ncd omnius\npnpm -r clean || true\nfind . -name 'tsconfig.tsbuildinfo' -not -path '*/node_modules/*' -delete\npnpm -r build\nnode scripts/build-publish.mjs\ncd publish\nmkdir -p .npm-cache\nNPM_CONFIG_CACHE=$(pwd)/.npm-cache npm pack --prefer-online --cache-min=0 --registry https://registry.npmjs.org/\nNPM_CONFIG_CACHE=$(pwd)/.npm-cache npm publish --access public --prefer-online --cache-min=0 --registry https://registry.npmjs.org/\n```\n\nBefore publishing, verify `README.md`, `package.json`, `dist/index.js`, and `dist/launcher.cjs` are in the tarball, and that `package.json` includes `readmeFilename: \"README.md\"` plus a string `readme`.\n\n## License\n\nOmnius is released under [CC-BY-NC-4.0](LICENSE) for non-commercial use. Commercial use, redistribution, hosted services, and enterprise deployment require a commercial license.\n"
167
+ "readme": "# Omnius\n\nOmnius is a local-first agentic coding runtime: terminal UI, autonomous coding loop, REST daemon, model router, memory layer, media tools, Telegram bridge, and peer-to-peer inference mesh in one CLI.\n\nIt is designed for open-weight and user-controlled models first, while still routing cleanly through Ollama, vLLM, OpenAI-compatible endpoints, OpenRouter, Groq, Chutes, sponsor peers, COHERE peers, and other configured providers.\n\n[![npm](https://img.shields.io/npm/v/omnius.svg)](https://www.npmjs.com/package/omnius)\n[![Node](https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg)](https://nodejs.org/)\n[![License](https://img.shields.io/badge/license-CC--BY--NC--4.0-blue.svg)](LICENSE)\n\n## Install\n\n```bash\nnpm install -g omnius\nomnius\n```\n\nRequirements:\n\n- Node.js 22 or newer\n- npm 10 or newer for published CLI use\n- pnpm 9 or newer for workspace development\n- A local model or configured remote endpoint\n\nStart the REST daemon:\n\n```bash\nomnius serve\n```\n\nThe daemon defaults to `http://127.0.0.1:11435`. Open the interactive API docs at `http://127.0.0.1:11435/docs`.\n\nRegister the native system tray indicator (Linux, macOS, and Windows x64):\n\n```bash\nomnius tray install\nomnius tray status\n```\n\nThe per-login indicator observes the daemon over loopback, checks health and npm\nupdates every 10 seconds, and provides dashboard, logs, and explicit daemon\ncontrols. Its version row is passive when current and becomes a verified global\nupdate action only when a newer exact semver is available. See the\n[system tray guide](docs/guides/system-tray.md), including Ubuntu/GNOME setup.\n\n## Agent Discovery\n\nThe npm package ships its complete documentation and a machine-readable\ncapability catalog. An agent does not need to inspect Omnius source or guess\nwhich endpoint owns a capability:\n\n```bash\nomnius discover \"bring your own inference\"\nomnius show workflow.choose-entrypoint\nomnius show layer.orchestration\nomnius show store.project\nomnius show provider.anthropic\nomnius show provider.gemini\nomnius show tool.web-search\nomnius discover \"evidence-bound decision impasse\"\nomnius show tool.adjudicate\nomnius discover \"osint research\"\nomnius show capability.osint-research\nomnius capabilities --json\n```\n\nWith the daemon running, begin at `GET /v1/discovery/bootstrap`. The same\ndiscovery cascade is available at `GET /v1/discovery`, with exact entry expansion at\n`GET /v1/discovery/{id}`. The live API contract remains available at\n`/openapi.json`, direct tool metadata at `/v1/tools`, and skills at\n`/v1/skills`.\n\nStart with [the discovery guide](docs/DISCOVERY.md) when integrating another\nagent or service, and use the [agent system map](docs/architecture/agent-system-map.md)\nto trace layers, modules, runtimes, and state ownership. Use [bring-your-own inference](docs/guides/bring-your-own-inference.md)\nfor provider protocols and keys, and [tools and web search](docs/guides/tools-and-web-search.md)\nfor the distinction between direct tools and agent-bound tools. The\n[evidence-bound adjudication guide](docs/ADJUDICATION.md) explains how a\ntop-level full agent freezes an admissible record, isolates a genuine decision\nimpasse from accumulated working context, fans review out across fresh\nevidence-scoped constituents, validates evidence citations and quorum, and\nproduces a durable verdict receipt. Top-level runtimes execute constituents in\na dedicated `full_sub_agent` process profile that cannot load tools, project\ncontext, memory, or the ambient parent environment. The process runs outside\nthe project directory. Cancellation and deadlines terminate its child processes;\nordinary child transport failure is recorded before bounded direct fallback.\nPlanner schema drift uses a deterministic question-framing fallback, and\ndurable artifact replay verifies the case, findings, verdict, and receipt\nhashes without new inference. The\n[categorized OSINT research guide](docs/guides/osint-research.md) documents\nthe local discover → exact expansion → explicit web-tool workflow.\n\n## What Omnius Does\n\n- Runs autonomous coding tasks, edits files, executes tools, tests changes, and iterates on failures.\n- Resolves genuine decision impasses in fresh evidence-scoped contexts that reduce parent-context anchoring, with host-validated citations, quorum, preserved dissent, and durable verdict receipts.\n- Provides a dense terminal UI for model selection, endpoint routing, task control, shell output, voice, sponsors, Telegram, and system telemetry.\n- Exposes a REST daemon with OpenAI/Ollama-compatible inference, agentic task execution, memory, skills, tools, MCP, events, voice, projects, and governance endpoints.\n- Routes models through local, cloud, sponsor, and peer-to-peer endpoints without assuming local Ollama is the only source.\n- Supports realtime spoken conversation for ASR/TTS clients through `/realtime` and REST `realtime: true`.\n- Supports image, video, sound, music, TTS, ASR, voice clone references, Telegram media workflows, and sponsor-provided media generation.\n- Keeps project runtime state in `.omnius/`, which is intentionally ignored by git.\n\n## Common Workflows\n\n```bash\nomnius \"inspect this repo and summarize the main entrypoints\"\nomnius serve\n```\n\n```text\n/help command help\n/model select or inspect the active model\n/endpoint select or configure local, cloud, sponsor, or peer endpoints\n/title name the current session\n/realtime toggle short ASR/TTS-oriented conversation mode\n/voice choose TTS, voice-clone, voicechat, and ASR controls\n/voice asr select, set up, activate, or test an exact ASR engine/model\n/indicator reconcile the daemon, then start the native tray indicator\n/update check force an update availability check\n/update quick run the verified global update with live TUI progress\n/update full run the full clean/build/install/restart verification flow\n/broker inspect model broker, RAM/VRAM thresholds, and loaded models\n/sponsor expose local or upstream capacity to peers\n/cohere participate in distributed COHERE inference\n/telegram configure or toggle the Telegram bridge\n/skills list explorable skills and docs memories\n/pause pause after the current turn boundary\n/stop interrupt the active run\n/resume resume saved state\n```\n\n## Current Feature Areas\n\n| Area | What to read |\n| --- | --- |\n| Install and setup | [Install](docs/getting-started/install.md), [First run](docs/getting-started/first-run.md), [Model providers](docs/getting-started/model-providers.md) |\n| Agent discovery | [Discovery cascade](docs/DISCOVERY.md), [machine catalog](docs/DISCOVERY.json), [agent integration](docs/guides/agent-integration.md) |\n| Bring your own inference | [Provider protocols and keys](docs/guides/bring-your-own-inference.md) |\n| Tools and web search | [Tool discovery and invocation](docs/guides/tools-and-web-search.md) |\n| Evidence-bound adjudication | [Adjudication tool, panel workflow, verdict contract, and harness](docs/ADJUDICATION.md) |\n| Terminal workflows | [TUI workflows](docs/guides/tui-workflows.md), [Slash commands](docs/reference/slash-commands.md) |\n| Web dashboard | [All dashboard routes, workspaces, sessions, Voice, Generate, updates, and observability](docs/guides/dashboard.md) |\n| REST daemon | [REST reference](docs/reference/rest-api.md), [REST quickref](docs/rest/QUICKREF.md), [OpenAPI source](docs/rest/openapi-source.md) |\n| System tray | [Cross-platform tray and Ubuntu setup](docs/guides/system-tray.md) |\n| Realtime voice chat | [Realtime guide](docs/guides/realtime.md) |\n| TTS and selectable ASR | [Voice/vision REST guide](docs/rest/endpoints/voice-vision.md), [Dashboard Voice page](docs/guides/dashboard.md#voice-and-asr) |\n| Sponsor and COHERE mesh | [Sponsor and COHERE guide](docs/guides/sponsor-and-cohere.md) |\n| Telegram bridge | [Telegram guide](docs/guides/telegram.md) |\n| Media generation | [Media guide](docs/guides/media-generation.md) |\n| Operations | [Runtime hygiene](docs/operations/runtime-hygiene.md), [Security and remote access](docs/operations/security-and-remote-access.md) |\n| Service compatibility | [Runtime version gate](docs/operations/version-compatibility.md) |\n| Architecture | [Architecture overview](docs/architecture/overview.md) |\n| Agent-explorable docs | [Agent memory docs index](docs/agent-memory/INDEX.md) |\n\n## Web Dashboard\n\n`omnius serve` exposes a self-contained operational dashboard at\n`http://127.0.0.1:11435/`. All pages use the same compact NOCLIP-derived style\ntokens and responsive observability-card grid, while keeping workspace, model,\nsession, run, service, and update state visible instead of hiding it behind\ndecorative pages.\n\n| Route | Purpose |\n| --- | --- |\n| `/chat` (`/`) | Stateful browser and imported TUI chats, full-history hydration, live run recovery, attachments, files, plan/context, and steering check-ins |\n| `/agent` | One-shot task contracts, personas/profiles, tool/isolation controls, run records, output, and events |\n| `/voice` | Voicechat, exact TTS model/options, clone references, ASR engine/model setup and activation, real-file ASR testing, transcript, and TTS testing |\n| `/generate` | Image/video/audio/music jobs, AV analysis, model/store controls, relocation progress, and global gallery |\n| `/projects` | Scan, register, rename, activate, and remove workspaces |\n| `/dashboard` (`/jobs`) | CPU/RAM/GPU/VRAM, processes, scheduler, services, usage, and verified updates |\n| `/activity` | Live run/tool/memory/engine event observability |\n| `/discover` | Agent bootstrap, capability intent search, and exact entry expansion |\n| `/settings` (`/config`) | Models, endpoints, voice, runtime, access, keys, appearance, and services |\n\nThe clickable sidebar brand opens the registered-workspace picker. Workspace\nselection scopes preferences, files, session history, chat pins/folders/search,\nand agent defaults. Chats, TUI visual history, and one-shot agent runs are\ndistinct records: `/quit`, `/exit`, manual-save noise, empty histories, and\nduplicate TUI transcripts are rejected from the chat projection; selecting a\nvalid session loads its full history and in-flight status from the daemon.\nThe chat top bar also reports the effective API base path and authentication\nmode. Streams retain split frames, Stop terminates the daemon-owned process\nlease, and assistant-provided web/file links stay inert until the daemon\nreturns a validation receipt.\n\nThe dashboard checks for updates every 10 seconds. An update button appears only\nfor a newer exact semver and drives `POST /v1/update`, then polls the durable\ntransaction until the global npm package, resolved executable, restarted daemon,\npackage/boot hashes, and tray runtime are reconciled. See the\n[complete dashboard guide](docs/guides/dashboard.md) for state ownership,\nsecurity, page-by-page behavior, and exact REST flows.\n\n## Terminal Over SSH\n\nThe TUI paints for a local terminal, where a full-area repaint costs nothing.\nOver a network the same cadence has to share the link with your keystrokes, so\nOmnius detects a remote session (`SSH_TTY` / `SSH_CONNECTION` / `SSH_CLIENT`)\nand paces itself: decorative chrome animates slower, a wheel-scroll burst is\ncollapsed into a single repaint, unchanged footer frames are not re-sent, and\nthe mouse filter allows more time for escape sequences split across packets.\nNothing changes about how the TUI looks, and local sessions are unaffected.\n\nDetection is environment-based, so it can miss a session where those variables\ndo not reach the process — most often tmux or mosh, whose panes may inherit a\nstale environment from the server. Force the profile when that happens:\n\n```bash\nOMNIUS_TUI_PACING=remote omnius # pace for a network link\nOMNIUS_TUI_PACING=local omnius # force local cadence\n```\n\nIf scrolling or typing still feels heavy, `OMNIUS_TUI_PROFILE=compatible`\nadditionally drops the animated truecolor chrome, and `OMNIUS_TUI_PERF=1` logs\nany content reflow that overruns its frame budget to stderr.\n\n## Shared Media Dependencies\n\nImage, video, audio, and music generation share a **single, system-wide dependency store** instead of duplicating heavy runtimes per project or per Telegram group.\n\nEarlier builds wrote a private Python venv plus Hugging Face / Torch / pip caches under every scoped working directory (for example `…/telegram-creative/<group-id>/.omnius/image-gen/.venv`). On a busy machine the same multi-gigabyte diffusers stack and model weights were re-downloaded once per group — tens of gigabytes of pure duplication.\n\nEverything now resolves to one source of truth under `~/.omnius` (override with `OMNIUS_HOME`):\n\n| Location | Holds |\n| --- | --- |\n| `~/.omnius/runtimes/<kind>/.venv-<backend>` | One shared Python venv per kind+backend (image/video/audio) |\n| `~/.omnius/models/huggingface/{hub,transformers,diffusers}` | Shared model weights — downloaded once, reused everywhere |\n| `~/.omnius/models/{torch,cache,pip-cache}` | Shared Torch hub, XDG, and pip caches |\n| `~/.omnius/models/_meta.json` | LRU usage index for automatic disk-pressure eviction |\n| `~/.omnius/media/{images,videos,audio,music}` | Global generated-media gallery (project-independent) |\n\nProject directories keep only lightweight session artifacts; no venvs or model weights are written per project.\n\n**Migrate and dedup existing machines.** A one-time cleanup consolidates any legacy per-group caches into the unified store — unique weights are moved (never re-downloaded), duplicates and stale venvs are reclaimed:\n\n```bash\n# TUI — current project only\n/models cleanup\n# TUI — every project + nested scoped group on this machine (dry-run first)\n/models cleanup --all --dry-run\n/models cleanup --all\n```\n\n```bash\n# REST — preview, then apply\ncurl -s -X POST localhost:11435/v1/media/migrate -H 'content-type: application/json' -d '{\"dryRun\":true}'\ncurl -s -X POST localhost:11435/v1/media/migrate -H 'content-type: application/json' -d '{}'\n# Inspect store + reclaimable legacy caches\ncurl -s localhost:11435/v1/media/store\n```\n\n**Generate over REST.** The daemon (default `127.0.0.1:11435`, a port in the IANA dynamic/private range that avoids common system-service collisions) exposes the local generators so any user on the machine can list models, generate, and browse the global gallery without the CLI:\n\n```bash\ncurl -s localhost:11435/v1/media/models\ncurl -s -X POST localhost:11435/v1/media/image -H 'content-type: application/json' -d '{\"prompt\":\"a compact robot painter\"}'\ncurl -s -X POST localhost:11435/v1/media/music -H 'content-type: application/json' -d '{\"prompt\":\"warm lo-fi piano loop\"}'\ncurl -s localhost:11435/v1/media/gallery\n```\n\nThe same surface drives the **Generate** tab in the web UI (`http://127.0.0.1:11435`) — pick a kind (image/video/audio/music), choose a model loaded from the system, generate, and review every previously generated file in one global gallery.\n\n## Recent Highlights\n\n- The dashboard now has nine route-level operational surfaces with shared modular observability grids, a searchable workspace picker, and project-scoped navigation state.\n- Chat history unifies persisted browser sessions with quality-filtered TUI transcripts, rejects command/noise sessions such as `/quit`, hydrates full history on selection, and exposes summaries, follow-up suggestions, reactive live deltas, and canonical deletion.\n- `/indicator` reconciles daemon ownership and health before launching the tray; the tray polls every 10 seconds and turns its version row into a retryable verified-update action only when an update exists.\n- Dashboard, tray, and TUI update actions now share an exact-version global transaction with live phase/output and package, executable, daemon, hash, restart, and tray verification.\n- TTS exposes GLaDOS, Overwatch, `luxtts:announcer-testchamber03`, and configurable Voicebox models; ASR independently exposes Whisper, managed `transcribe-cli`, Nemotron readiness, and pinned Microsoft VibeVoice ASR with Jetson/ARM64 CUDA-aware setup.\n- LuxTTS auto-setup on Jetson ARM64 requires CPU ONNX Runtime at import time, validates CUDA Torch separately against the host runtime, preserves existing caches during repair, and never substitutes generic PyPI Torch or automatic sudo for an AGX Orin deployment.\n- `/realtime` and REST `realtime: true` provide short, natural, SOUL.md-aware conversation for ASR/TTS clients.\n- Endpoint setup and sponsor setup aggregate models from all enabled endpoints, including external OpenAI-compatible routers.\n- `/sponsor` can expose text inference and media generation for image, video, sound, and music with per-modality limits.\n- Sponsor and COHERE status surfaces now use shared telemetry concepts: concurrency, request rate, daily tokens, peer usage, model usage, and remote system metrics.\n- The TUI reports token production rate as `t/s`, supports Shift+Enter multiline input, and renders dynamic shell output inside bounded Unicode cards.\n- Telegram state is scoped by user and group, supports durable reply preferences, and feeds raw platform/tool failures back into the agent loop.\n- Telegram media ingress is byte- and duration-bounded, cache-only before routing, deduplicated by Telegram file identity, and evidence-gated after admission. Speech uses scoped transcription; music/general audio uses typed semantic or explicitly acoustic-only analysis without false listening claims.\n- Telegram public creative work now includes typed PDF/DOCX creation and hash-guarded review, fixed-operation FFmpeg audio editing, and root-confined image crop/resize/mask/composite workflows. Host-signed content capabilities bind review evidence and durable Telegram delivery to the exact artifact bytes.\n- Ollama pool cleanup now accounts for process groups and orphan runner processes that can keep VRAM pinned.\n- REST documentation is available both as human docs and as Omnius-discoverable docs skills.\n\n## REST API\n\nStart the daemon (default `http://127.0.0.1:11435`; interactive docs at `/docs`, machine spec at `/openapi.json`):\n\n```bash\nomnius serve\n```\n\nFor shared deployments, gate access with scoped bearer keys (`read` < `run` < `admin`):\n\n```bash\nOMNIUS_REST_API_KEYS=\"read-key:read:grafana,run-key:run:ci:60:100000:3,admin-key:admin:ops\" omnius serve\n# then: Authorization: Bearer <key>\n```\n\nThe complete supported endpoint inventory follows. The canonical machine\ncontract is generated from [`packages/cli/src/api/openapi.ts`](packages/cli/src/api/openapi.ts),\nvalidated against [`docs/reference/rest-api.md`](docs/reference/rest-api.md),\nand projected into the generated block below. `pnpm docs:check` now fails when\nany of those three surfaces drift. Browser HTML pages, Swagger static assets,\nand implementation-only compatibility bridges are intentionally outside this\nstable REST contract.\n\n<!-- BEGIN GENERATED REST INVENTORY -->\n### Docs And Compatibility Aliases\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/docs` | Swagger UI |\n| `GET` | `/api/docs` | Swagger UI alias |\n| `GET` | `/openapi.json` | OpenAPI JSON |\n| `GET` | `/openapi.yaml` | OpenAPI YAML |\n| `GET` | `/v3/api-docs` | OpenAPI alias |\n| `GET` | `/swagger.json` | Swagger-era alias |\n| `GET` | `/api-docs` | OpenAPI alias |\n| `GET` | `/swagger-ui` | Swagger UI alias |\n| `GET` | `/redoc` | ReDoc renderer |\n| `GET` | `/` | HATEOAS API root when the client does not request HTML |\n| `GET` | `/help` | Compact daemon integration help |\n| `GET` | `/v1/routes` | Flat grep-friendly daemon route summary |\n| `GET` | `/routes` | Route-summary compatibility alias |\n| `GET` | `/asyncapi.json` | AsyncAPI 2.6 voicechat WebSocket contract |\n| `GET` | `/asyncapi` | AsyncAPI compatibility alias |\n\n### Health And Observability\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/health` | Liveness probe |\n| `GET` | `/health/ready` | Backend readiness |\n| `GET` | `/health/startup` | Startup probe |\n| `GET` | `/version` | Package version and platform |\n| `GET` | `/metrics` | Prometheus metrics |\n| `GET` | `/v1/events` | Server-sent event stream |\n| `GET` | `/v1/usage` | Token usage and rate limits |\n| `GET` | `/v1/audit` | Audit log query |\n| `GET` | `/v1/cost` | Cost tracker |\n| `GET` | `/v1/system` | CPU, RAM, GPU, and system snapshot |\n\n### Discovery\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/discovery/bootstrap` | Compact agent bootstrap and start-here map |\n| `GET` | `/v1/discovery` | Search layers, workflows, runtimes, modules, stores, and capabilities |\n| `GET` | `/v1/discovery/{id}` | Expand one stable capability entry |\n\n### Inference And Chat\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/models` | Aggregated model list |\n| `POST` | `/v1/chat/completions` | OpenAI-compatible chat completion |\n| `POST` | `/v1/chat` | Stateful Omnius chat |\n| `POST` | `/api/chat` | Ollama-compatible chat alias |\n| `POST` | `/v1/generate` | Ollama-compatible one-shot generation |\n| `POST` | `/api/generate` | Ollama-compatible generate alias |\n| `POST` | `/v1/embeddings` | OpenAI-compatible embeddings |\n| `POST` | `/api/embed` | Ollama-compatible embeddings alias |\n| `GET` | `/api/tags` | Ollama-compatible model tags |\n| `POST` | `/realtime` | Text-only voice-adapter reply from a transcript |\n| `POST` | `/v1/realtime` | Auth-scoped realtime adapter alias |\n| `GET` | `/v1/chat/sessions` | Workspace-scoped persisted browser chats and importable TUI sessions |\n| `GET` | `/v1/chat/sessions/{id}` | Hydrate full session history, transcript, and in-flight state |\n| `DELETE` | `/v1/chat/sessions/{id}` | Permanently delete a canonical chat or TUI history session |\n| `POST` | `/v1/chat/sessions/{id}/summarize` | Generate + cache an inference-based session title/summary |\n| `POST` | `/v1/chat/suggest-followup` | Suggest one short next-message follow-up (ghost-text input) |\n| `GET` | `/v1/chat/sessions/{id}/status` | Reactive recall: live run status + unseen deltas (`?since=<seq>`) |\n| `POST` | `/v1/chat/sessions/{id}/pause` | Pause the exact daemon-owned chat generation at a safe admission boundary |\n| `POST` | `/v1/chat/sessions/{id}/resume` | Resume the exact paused daemon-owned chat generation |\n| `POST` | `/v1/chat/sessions/{id}/stop` | Stop the daemon-owned chat process lease; idle/terminal calls are idempotent |\n| `POST` | `/v1/chat/check-in` | Steering check-in for active chat |\n| `POST` | `/v1/chat/attachments` | Upload an attachment for a stateful chat |\n| `POST` | `/v1/links/validate` | Validate an external HTTP(S) destination under the daemon egress policy |\n\n#### Session History Contract\n\n`GET /v1/chat/sessions` is a history index, not merely a list of processes that\nare currently active. It returns canonical persisted browser chats for the\nselected workspace and, by default, quality-filtered TUI visual sessions that\ncan be imported on demand. Pass `?root=/absolute/workspace` to scope the list and\n`?include_tui=0` to omit TUI history. Exit-only inputs such as `/quit` and\n`/exit`, manual-save noise, empty transcripts, and duplicate normalized TUI\nsessions are rejected by the session-quality projection rather than presented as\nchats.\n\nSelecting a row should call `GET /v1/chat/sessions/{id}`. That response hydrates\nthe complete public message history (system prompts are intentionally omitted),\nthe original TUI transcript when applicable, token counts, timestamps, source\nand project identity, and any in-flight run with a bounded partial-output tail.\nUse the `status` endpoint with `?since=<seq>` for cheap reactive polling while a\nrun is active. `DELETE /v1/chat/sessions/{id}` is an admin operation and removes\nthe canonical record; deleting only a browser-side row does not remove daemon\nhistory.\n\nPause and resume use the exact session and active external-run identity. Both\noperations require `run` scope. An idle session returns `200`. An accepted\nrequest returns `200` with the lifecycle acknowledgement, owner generation,\ncurrent phase, resumability, and pending acknowledgement count. A lifecycle\nrejection returns `409`. A live owner that does not acknowledge within the\ncontrol deadline returns `504`. Clients must not treat a local UI pause as a\ndaemon pause.\n\n`POST /realtime` and `/v1/realtime` are text-only conversation adapters. They\naccept transcript text through `message`, `text`, `recent_turn`, `asr_text`, or\n`callerText`, optionally accept adapter-local `soul_md`, and can return plain\ntext with `Accept: text/plain` or `format: \"text\"`. ASR and TTS remain separate\noperations.\n\n### Agentic Runs\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `POST` | `/v1/run` | Submit agentic task |\n| `GET` | `/v1/runs` | List runs |\n| `GET` | `/v1/runs/{id}` | Get run details |\n| `GET` | `/v1/runs/{id}/output` | Read captured run output and status |\n| `DELETE` | `/v1/runs/{id}` | Abort run |\n| `POST` | `/v1/todos` | Create or update todos for current session |\n| `GET` | `/v1/todos` | List sessions with todos |\n| `GET` | `/v1/todos/{session_id}` | Get session todos |\n| `DELETE` | `/v1/todos/{session_id}` | Delete session todos |\n| `POST` | `/v1/evaluate` | Evaluate a run |\n| `POST` | `/v1/index` | Trigger repository indexing |\n\n### Configuration, Keys, Profiles, Projects\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/config` | Read daemon config |\n| `PATCH` | `/v1/config` | Update daemon config |\n| `GET` | `/v1/config/model` | Current model |\n| `PUT` | `/v1/config/model` | Switch model |\n| `POST` | `/v1/config/model/check` | Probe model readiness with non-empty text |\n| `GET` | `/v1/config/endpoint` | Current endpoint |\n| `PUT` | `/v1/config/endpoint` | Switch endpoint |\n| `POST` | `/v1/config/endpoint/test` | Probe endpoint |\n| `GET` | `/v1/config/endpoint/history` | Endpoint history |\n| `DELETE` | `/v1/config/endpoint/history` | Remove endpoint history item |\n| `POST` | `/v1/share/generate` | Generate remote-access share URL |\n| `GET` | `/v1/keys` | List runtime API keys |\n| `POST` | `/v1/keys` | Mint runtime API key |\n| `DELETE` | `/v1/keys/{prefix}` | Revoke runtime API keys by prefix |\n| `GET` | `/v1/profiles` | List tool profiles |\n| `POST` | `/v1/profiles` | Create tool profile |\n| `GET` | `/v1/profiles/{name}` | Get profile |\n| `DELETE` | `/v1/profiles/{name}` | Delete profile |\n| `GET` | `/v1/projects` | List known projects |\n| `DELETE` | `/v1/projects` | Unregister a project |\n| `GET` | `/v1/projects/current` | Current project |\n| `POST` | `/v1/projects/switch` | Switch project |\n| `POST` | `/v1/projects/register` | Register project |\n| `POST` | `/v1/projects/rename` | Rename project |\n| `GET` | `/v1/projects/preferences` | Read project preferences |\n| `PUT` | `/v1/projects/preferences` | Patch project preferences |\n| `DELETE` | `/v1/projects/preferences` | Reset project preferences |\n| `GET` | `/v1/projects/scan` | Scan configured roots for discoverable workspaces |\n| `GET` | `/v1/admin/access` | Read the daemon network access mode |\n| `POST` | `/v1/admin/access` | Change and persist access mode from loopback only |\n\n### Skills, Commands, Tools, MCP\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/skills` | List skills |\n| `GET` | `/v1/skills/{name}` | Load skill content |\n| `GET` | `/v1/commands` | List slash commands |\n| `POST` | `/v1/commands/{cmd}` | Execute slash command |\n| `GET` | `/v1/tools` | List tools (built-in + external) |\n| `POST` | `/v1/tools/register` | Register an application-specific external tool |\n| `GET` | `/v1/tools/{name}` | Tool metadata |\n| `DELETE` | `/v1/tools/{name}` | Unregister an external tool |\n| `POST` | `/v1/tools/{name}/call` | Call tool |\n| `POST` | `/v1/tools/{name}/eval` | Evaluate an external tool against test cases |\n| `GET` | `/v1/mcps` | List MCP servers |\n| `GET` | `/v1/mcps/{name}` | MCP server details |\n| `POST` | `/v1/mcps/{name}/call` | Call MCP tool |\n| `GET` | `/v1/hooks` | Hook registry |\n| `GET` | `/v1/agents` | Agent type registry |\n| `GET` | `/v1/codegraph/snapshot` | Code graph snapshot |\n| `GET` | `/v1/codegraph/events` | Code graph SSE |\n\n#### Registering Application-Specific Tools\n\nApplications can register their own tools so Omnius agents can discover and\ninvoke them alongside built-ins. `transport.type` selects the bridge:\n\n- `http` makes Omnius POST `{name, args, session_id}` to the application's\n `callback_url` and relay the result.\n- `mcp` proxies to a named tool on an MCP server and can auto-connect from the\n supplied connection descriptor.\n\nRegistrations persist per workspace at `.omnius/external-tools.json`, appear in\n`GET /v1/tools`, and use the same scope and off-device security gates as built-in\ntools. Registration needs `run` scope; a non-loopback caller needs `admin`.\n\n```bash\ncurl -s -X POST localhost:11435/v1/tools/register -H 'content-type: application/json' -d '{\n \"name\": \"lookup_order\",\n \"description\": \"Look up an order by id\",\n \"parameters\": {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]},\n \"security\": {\"requires_scope\":\"run\",\"risk\":\"low\"},\n \"transport\": {\"type\":\"http\",\"callback_url\":\"https://app.internal/tools/lookup_order\",\"auth_header\":\"Bearer …\"}\n}'\ncurl -s localhost:11435/v1/tools/lookup_order\ncurl -s -X POST localhost:11435/v1/tools/lookup_order/call -H 'content-type: application/json' -d '{\"args\":{\"id\":\"A-1001\"}}'\ncurl -s -X POST localhost:11435/v1/tools/lookup_order/eval -H 'content-type: application/json' -d '{\"cases\":[{\"name\":\"known\",\"args\":{\"id\":\"A-1001\"},\"expect\":{\"success\":true}}]}'\ncurl -s -X DELETE localhost:11435/v1/tools/lookup_order\n```\n\nThe MCP equivalent uses a transport such as\n`{\"type\":\"mcp\",\"server\":\"acme\",\"tool\":\"search\",\"connect\":{\"url\":\"https://app.internal/mcp\",\"transport\":\"streamable-http\"}}`.\n\n### AIWG\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/aiwg` | AIWG root and control map |\n| `GET` | `/v1/aiwg/frameworks` | List frameworks |\n| `GET` | `/v1/aiwg/frameworks/{name}` | Framework details |\n| `GET` | `/v1/aiwg/frameworks/{name}/content` | Tier-aware content |\n| `GET` | `/v1/aiwg/skills` | List AIWG skills |\n| `GET` | `/v1/aiwg/skills/{name}` | Load AIWG skill |\n| `GET` | `/v1/aiwg/agents` | List AIWG agents |\n| `GET` | `/v1/aiwg/agents/{name}` | Load AIWG agent |\n| `GET` | `/v1/aiwg/addons` | List AIWG addons |\n| `POST` | `/v1/aiwg/use` | Tier-sized activation bundle |\n| `POST` | `/v1/aiwg/expand` | Expand matching AIWG item |\n\n### Memory, Sessions, Context\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/memory` | Memory backend summary |\n| `POST` | `/v1/memory/search` | Search memory |\n| `POST` | `/v1/memory/write` | Write memory |\n| `GET` | `/v1/memory/episodes` | List episodes |\n| `GET` | `/v1/memory/failures` | List failure records |\n| `POST` | `/v1/memory/ingest` | Ingest content or files into memory |\n| `GET` | `/v1/memory/entities` | List extracted memory entities |\n| `POST` | `/v1/memory/jobs/run` | Run a named memory-maintenance job |\n| `POST` | `/v1/memory/feedback` | Record relevance or quality feedback for a memory item |\n| `POST` | `/v1/memory/speaker-identities/enroll` | Admin-only, explicit-consent speaker exemplar enrollment in one exact vector space |\n| `POST` | `/v1/memory/speaker-identities/match` | Admin-only provisional speaker candidate matching without durable assignment |\n| `GET` | `/v1/sessions` | List task sessions |\n| `GET` | `/v1/sessions/{id}` | Get session history |\n| `GET` | `/v1/context` | Current context snapshot |\n| `GET` | `/v1/context/window-dumps` | List persisted outbound model context-window dumps |\n| `GET` | `/v1/context/window-dumps/{id}` | Fetch a full outbound model context-window dump |\n| `POST` | `/v1/context/save` | Save context entry |\n| `GET` | `/v1/context/restore` | Build restore prompt |\n| `POST` | `/v1/context/compact` | Request compaction |\n\nContext-window dumps are written before backend inference for main agents, sub-agents, internal runners, and adversary audits. Query\n`GET /v1/context/window-dumps?agent_type=main` for summaries with signal/noise\nmetrics, or fetch a full payload by id. Dumps include focus-supervisor state when\na next-action contract is active. Set `OMNIUS_CONTEXT_WINDOW_DUMP_DIR` to move\nthe store, `OMNIUS_DISABLE_CONTEXT_WINDOW_DUMPS=1` to disable it, and\n`OMNIUS_FOCUS_SUPERVISOR=off|auto|strict` to tune focus enforcement.\n\n### Files, Web, Nexus, Ollama Pool\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/files` | List workspace directory |\n| `POST` | `/v1/files/read` | Read workspace file |\n| `GET` | `/v1/files/raw` | Stream raw workspace bytes with content type and range support |\n| `HEAD` | `/v1/files/raw` | Inspect raw-file response metadata |\n| `GET` | `/v1/web/search` | Inspect web-search availability, schema, and security policy |\n| `POST` | `/v1/web/search` | Search the web directly through the Omnius tool runtime |\n| `GET` | `/v1/web/fetch` | Inspect web-fetch availability, schema, and security policy |\n| `POST` | `/v1/web/fetch` | Fetch a URL directly through the Omnius tool runtime |\n| `GET` | `/v1/web/crawl` | Inspect web-crawl availability, schema, and security policy |\n| `POST` | `/v1/web/crawl` | Crawl a website directly through the Omnius tool runtime |\n| `GET` | `/v1/nexus/status` | Nexus peer state |\n| `GET` | `/v1/sponsors` | Sponsor directory cache |\n| `GET` | `/v1/ollama/pool/processes` | Ollama process inventory |\n| `POST` | `/v1/ollama/pool/cleanup` | Cleanup stale Ollama pool processes |\n\nThe `/v1/web/*` routes are stable aliases of the shared tool registry. `GET`\nreturns the corresponding tool metadata. `POST` uses the same authentication,\nprofile, origin, timeout, output-size, audit, and network-egress policy as a\ndirect tool call. Send search requests as\n`{\"args\":{\"query\":\"...\",\"num_results\":5,\"provider\":\"duckduckgo\"}}` and\nfetch requests as `{\"args\":{\"url\":\"https://example.com\"}}`. Crawl uses the\nschema returned by its `GET` route and requires the browser dependencies that\nthe metadata reports. POST responses use the standard `ToolResult` envelope.\n\n### Voice, Audio, Vision\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/voice/state` | Voice runtime status |\n| `POST` | `/v1/voice/start` | Select an optional model, enable voice, and wait for readiness |\n| `POST` | `/v1/voice/stop` | Pause daemon voice input while leaving TTS warm |\n| `GET` | `/v1/voice/models` | TTS models |\n| `POST` | `/v1/voice/models/switch` | Switch and enable an exact TTS model by default |\n| `POST` | `/v1/voice/models/{modelId}/pull` | Install runtime prerequisites and pull one managed TTS model |\n| `POST` | `/v1/voice/models/{modelId}/deploy` | Pull and deploy one managed CUDA TTS model |\n| `GET` | `/v1/voice/supertonic-settings` | Voice tuning settings |\n| `POST` | `/v1/voice/supertonic-settings` | Update voice tuning settings |\n| `GET` | `/v1/asr/engines` | Canonical ASR engines/models, capabilities, readiness, and selection |\n| `GET` | `/v1/asr/status` · `/v1/asr/selection` | Selected engine/model and runtime status |\n| `GET` | `/v1/asr/downloads` | List persistent ASR weight download and deployment transitions |\n| `POST` | `/v1/asr/downloads` | Start or resume an ASR weight download |\n| `GET` | `/v1/asr/downloads/{engineId}/{modelId}` | Poll one ASR download and deployment transition |\n| `POST` | `/v1/asr/downloads/{engineId}/{modelId}` | Start or resume this model download |\n| `POST` | `/v1/asr/downloads/{engineId}/{modelId}/retry` | Retry or resume a failed or interrupted ASR weight download |\n| `PATCH` | `/v1/asr/selection` | Persist and activate an exact engine/model |\n| `POST` | `/v1/asr/activate` | Activate and persist an exact engine/model |\n| `POST` | `/v1/asr/engines/{engineId}/setup` | Install a managed runtime and pinned weights |\n| `POST` | `/v1/asr/engines/{engineId}/models/{modelId}/pull` | Pull one exact ASR model and validate its managed runtime |\n| `POST` | `/v1/asr/engines/{engineId}/models/{modelId}/deploy` | Pull, select, and activate one exact ASR model |\n| `POST` | `/v1/asr/transcriptions` · `/v1/asr/test` | Transcribe/test using the real selected backend |\n| `GET` | `/v1/voice/asr-models` | Compatibility registry alias |\n| `POST` | `/v1/voice/asr-models/switch` | Compatibility activation alias |\n| `POST` | `/v1/voice/tts` | Synthesize speech |\n| `POST` | `/v1/audio/speech` | OpenAI-compatible TTS alias |\n| `GET` | `/v1/audio/classify/health` | Jetson CUDA/TensorRT YAMNet readiness |\n| `POST` | `/v1/audio/classify/setup` | Provision and warm the pinned JetPack TensorRT YAMNet runtime |\n| `POST` | `/v1/audio/classify` | Direct-tool compatible CUDA audio classification |\n| `GET` | `/v1/audio/embed/health` | Role-typed embedding readiness (`?kind=acoustic|speaker|semantic`) |\n| `POST` | `/v1/audio/embed/setup` | Provision/warm one role-typed embedding runtime (admin; `?kind=...`) |\n| `POST` | `/v1/audio/embed` | Managed role-typed audio embedding (`?kind=...`) |\n| `GET` | `/v1/audio/diarization/live/readiness` | Non-mutating managed Sortformer worker readiness |\n| `POST` | `/v1/audio/diarization/live/setup` | Verify and warm a local Sortformer runtime (admin) |\n| `POST` | `/v1/audio/diarization/live` | Managed live/session-local speaker-turn diarization |\n| `POST` | `/v1/audio/diarization/live/cancel` | Terminate live worker work and clear its queue |\n| `GET` | `/v1/audio/diarization/reconcile/readiness` | Non-mutating managed Community-1 worker readiness |\n| `POST` | `/v1/audio/diarization/reconcile/setup` | Verify and warm a local Community-1 runtime (admin) |\n| `POST` | `/v1/audio/diarization/reconcile` | Managed offline/dream reconciliation proposals |\n| `POST` | `/v1/audio/diarization/reconcile/cancel` | Terminate reconciliation work and clear its queue |\n| `POST` | `/v1/voice/transcribe` | Transcribe audio |\n| `POST` | `/v1/voice/asr` | Legacy transcription alias |\n| `POST` | `/v1/audio/transcriptions` | OpenAI-compatible transcription alias |\n| `POST` | `/v1/voice/transcribe/stream` | Isolated final transcription over SSE (no shared mic state or fake partials) |\n| `POST` | `/v1/voice/clone-refs` | Upload voice clone reference |\n| `GET` | `/v1/voice/clone-refs` | List clone references |\n| `POST` | `/v1/voice/clone-refs/upload` | Upload clone reference |\n| `POST` | `/v1/voice/clone-refs/from-url` | Fetch clone reference |\n| `POST` | `/v1/voice/clone-refs/{filename}/activate` | Activate clone reference |\n| `POST` | `/v1/voice/clone-refs/{filename}/rename` | Rename clone reference |\n| `DELETE` | `/v1/voice/clone-refs/{filename}` | Delete clone reference |\n| `POST` | `/v1/voice/speak` | Broadcast speech to voicechat clients |\n| `GET` | `/v1/voicechat/ws` | WebSocket upgrade for full-duplex voicechat |\n| `POST` | `/v1/vision/describe` | Vision describe placeholder |\n| `GET` | `/v1/vision/embed/readiness` | Non-mutating isolated OpenCLIP readiness |\n| `POST` | `/v1/vision/embed/setup` | Explicit isolated OpenCLIP setup (admin scope) |\n| `POST` | `/v1/vision/embed` | Create a vision embedding from media |\n| `GET` | `/v1/ocr/readiness` | Non-mutating advanced-OCR dependency and backend readiness |\n| `POST` | `/v1/ocr/setup` | Create and verify the isolated OCR venv (admin scope) |\n| `POST` | `/v1/ocr/advanced` | Agent-equivalent managed advanced OCR (alias of `/v1/tools/ocr_image_advanced/call`) |\n\n`POST /v1/voice/tts` and `/v1/audio/speech` automatically warm the daemon.\nAn explicit model must render exactly or the request fails; Omnius does not\nsilently synthesize with another voice. Responses include `X-Voice-Model`,\n`X-Voice-Backend`, and `X-Sample-Rate`. Available models include GLaDOS,\nOverwatch, `luxtts:announcer-testchamber03`, and the selected Voicebox suite.\nSet `OMNIUS_VOICEBOX_MODELS=all` for every carried-in Voicebox model, leave it\nat `stable` for the default set, or provide a comma-separated subset.\n\nASR selection is independent from TTS selection. The registry currently exposes\nOpenAI Whisper, managed `transcribe-cli`, NVIDIA Nemotron (reported unavailable\nuntil its legacy bootstrap is migrated), and Microsoft VibeVoice ASR. VibeVoice\nuses the exact pinned `microsoft/VibeVoice-ASR` checkpoint, reports setup and\nactivation separately, supports completed files up to 60 minutes with speakers,\ntimestamps, and `?context=` hotwords, and is deliberately not advertised as an\nincremental PCM backend. Its managed setup inherits the host CUDA-enabled Torch\nbuild (needed on Jetson/ARM64), never installs generic PyPI Torch, and activation\nrequires one explicit capable GPU. Discrete Linux uses `nvidia-smi` process/GPU\nevidence; Jetson/L4T uses NVIDIA's documented `tegrastats` plus CUDA Torch device\nproperties because `nvidia-smi` is unavailable there. Model weights live under\nthe unified Omnius ASR cache and are not shipped in the npm package.\n\n### Generative Media\n\nAll generation is backed by the unified `~/.omnius` model store and shared venvs (single source of truth — no per-project duplication). Generated files are consolidated into the global gallery at `~/.omnius/media/{images,videos,audio,music}`.\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/media/models` | List available image/video/audio/music models |\n| `GET` | `/v1/media/store` | Unified store disk usage + reclaimable legacy caches |\n| `POST` | `/v1/media/migrate` | Dedup + migrate legacy per-group caches into the unified store |\n| `POST` | `/v1/media/relocate` | Relocate the whole media store (weights/venvs/gallery) to a chosen folder |\n| `GET` | `/v1/media/relocate/status` | Status + progress of the media-store relocation job |\n| `POST` | `/v1/media/av/analyze` | Analyze a media file into a grounded entity/event answer (AV comprehension) |\n| `POST` | `/v1/media/image` | Generate an image |\n| `POST` | `/v1/media/video` | Generate a video |\n| `POST` | `/v1/media/audio` | Generate a sound effect |\n| `POST` | `/v1/media/music` | Generate music |\n| `GET` | `/v1/media/gallery` | List previously generated media (global, newest first) |\n| `GET` | `/v1/media/file` | Stream one generated media file |\n\nManaged TTS `pull` installs the model's runtime prerequisites and weights. It\ndoes not start inference. Managed TTS `deploy` also verifies the selected CUDA\ndevice and starts the persistent runtime. Both operations return `200` when\nready, `404` when the model has no matching managed adapter, and `500` when\ninstallation, download, CUDA preflight, or startup fails.\n\nASR download requests use `{engineId, modelId, device?}`. A collection POST\nreturns `200` when weights are ready or `202` with `statusUrl`, `retryUrl`, and\n`pollAfterMs` while work is pending. Duplicate work coalesces. Poll the model\nURL until its download is ready and its deployment is active. A missing job\nreturns `404`. Model-specific POST and retry requests return `200` when ready or\n`202` when accepted. The model `pull` and `deploy` routes accept optional\n`{device}`. Pull validates the managed runtime and CUDA placement. Deploy also\npersists the selection after readiness and returns a pollable `202` transition\nwhen activation is pending.\n\n### Engines And Scheduled Jobs\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/engines` | Long-running engine status |\n| `GET` | `/v1/services` | List all active daemon-owned REST services and their routes |\n| `GET` | `/v1/services/{id}` | Get one daemon-owned REST service contract |\n| `GET` | `/v1/scheduled` | List scheduled jobs |\n| `DELETE` | `/v1/scheduled/all` | Delete all tasks, timers, cron entries, and persisted sources |\n| `GET` | `/v1/scheduled/status` | Scheduler status |\n| `POST` | `/v1/scheduled/{id}` | Enable or disable one scheduled task or user timer |\n| `DELETE` | `/v1/scheduled/{id}` | Delete one scheduled task or user timer |\n| `POST` | `/v1/scheduled/kill` | Kill scheduled job |\n| `POST` | `/v1/scheduled/fixup` | Reconcile scheduled state |\n| `GET` | `/v1/scheduled/reconcile` | Preview scheduled reconciliation |\n| `POST` | `/v1/scheduled/reconcile` | Preview or apply scheduled reconciliation |\n| `GET` | `/v1/services/systemd` | Systemd service status |\n| `POST` | `/v1/services/systemd/{unit}` | Act on one user-level systemd unit |\n| `GET` | `/v1/update` | Self-update status |\n| `POST` | `/v1/update` | Start an exact-version verified global update transaction |\n\n`GET /v1/services` is the agent-readable service inventory generated from the\nOpenAPI document. Each entry states lifecycle ownership, interactive-session\ndependency, registered routes, and a readiness or status route when one exists.\n`GET /v1/services/{id}` returns one service contract or `404` for an unknown\nservice ID. These discovery routes do not mutate services. `/listen` and\n`/hangup` control voice sessions only and do not own the REST daemon.\n\n#### Verified Global Update Transaction\n\n`POST /v1/update` is not a CLI-local package edit. It starts one durable\ntransaction that installs the requested exact npm version globally, verifies\nthe installed package and resolved `omnius` executable, restarts and verifies\nthe daemon, verifies package/hash/runtime agreement, and relaunches the tray if\nit was running. The response is `202` with operation state; poll\n`GET /v1/update` for live phase, subprocess output, verification evidence, and\nthe final success or failure. Concurrent transactions and requests with no\navailable target return `409`.\n\nThe web dashboard and native tray both use this same endpoint. Update discovery\nis shared and semver-aware, so an older cached registry result cannot downgrade\nor falsely present an update. A completed transaction means the global package,\nexecutable, daemon, and tray runtime were all reconciled—not merely that `npm`\nexited successfully.\n\n### AIMS Governance\n\n| Method | Path | Purpose |\n| --- | --- | --- |\n| `GET` | `/v1/aims` | AIMS root and endpoint index |\n| `GET` | `/v1/aims/policies` | Policy register |\n| `PUT` | `/v1/aims/policies` | Replace policy register |\n| `GET` | `/v1/aims/roles` | Roles and responsibilities |\n| `GET` | `/v1/aims/resources` | Resource inventory |\n| `GET` | `/v1/aims/impact-assessments` | Impact assessments |\n| `POST` | `/v1/aims/impact-assessments` | File impact assessment |\n| `GET` | `/v1/aims/lifecycle` | Lifecycle state |\n| `GET` | `/v1/aims/data-quality` | Data quality controls |\n| `GET` | `/v1/aims/transparency` | Model cards and transparency |\n| `GET` | `/v1/aims/usage` | AIMS usage view |\n| `GET` | `/v1/aims/suppliers` | Supplier inventory |\n| `GET` | `/v1/aims/incidents` | Incident records |\n| `POST` | `/v1/aims/incidents` | File incident |\n| `GET` | `/v1/aims/oversight` | Human oversight gates |\n| `GET` | `/v1/aims/decisions` | Consequential decision log |\n| `GET` | `/v1/aims/config-history` | Config change history |\n\n### Browser And Compatibility Surfaces\n\nThe dashboard HTML routes (`/`, `/chat`, `/agent`, `/voice`, `/generate`,\n`/projects`, `/dashboard`, `/jobs`, `/activity`, `/discover`, `/settings`, and\n`/config`) are documented in the [dashboard guide](../guides/dashboard.md). They\nare pages, not JSON API operations; `/` returns the HATEOAS JSON root when the\nclient does not request HTML.\n\nSwagger/ReDoc trailing-slash variants, `/api/docs/*` static assets, and\n`/favicon.ico` exist for browsers. They are delivery details rather than stable\nintegration endpoints. The daemon also retains browser/legacy bridges at\n`/v1/model`, `/v1/endpoint`, `/v1/theme`, `/v1/tor/*`, `/v1/remote-proxy`, and\n`/v1/command`. New clients should prefer `/v1/config/model`,\n`/v1/config/endpoint`, `/v1/config`, and `/v1/commands/{cmd}`. Compatibility\nhandlers may accept additional HTTP verbs for old dashboard bundles; only the\nmethods in the supported inventory above are contractual.\n<!-- END GENERATED REST INVENTORY -->\n## Agent-Explorable Documentation\n\nOmnius discovers project-local docs skills from `.aiwg/addons/*/skills`. The docs bundles in this repo expose high-signal entrypoints for agents:\n\n```text\n/skills omnius docs\nskill_execute name=\"omnius-docs\"\nskill_execute name=\"omnius-rest-docs\"\nskill_extract name=\"omnius-realtime-docs\" query=\"How does realtime REST mode work?\"\n```\n\nThe intended pattern is index first, targeted document second, not loading the whole manual into the active context.\n\n## Development\n\n```bash\npnpm install\npnpm -r build\npnpm docs:check\n```\n\nFocused checks used for the docs skill surface:\n\n```bash\npnpm --filter @omnius/execution exec vitest run tests/skill-discovery.test.ts\npnpm --filter omnius exec vitest run tests/realtime-mode.test.ts tests/command-registry.test.ts\n```\n\n## Publishing\n\nPublish only from `publish/`.\n\n```bash\ncd omnius\npnpm -r clean || true\nfind . -name 'tsconfig.tsbuildinfo' -not -path '*/node_modules/*' -delete\npnpm -r build\nnode scripts/build-publish.mjs\ncd publish\nmkdir -p .npm-cache\nNPM_CONFIG_CACHE=$(pwd)/.npm-cache npm pack --prefer-online --cache-min=0 --registry https://registry.npmjs.org/\nNPM_CONFIG_CACHE=$(pwd)/.npm-cache npm publish --access public --prefer-online --cache-min=0 --registry https://registry.npmjs.org/\n```\n\nBefore publishing, verify `README.md`, `package.json`, `dist/index.js`, and `dist/launcher.cjs` are in the tarball, and that `package.json` includes `readmeFilename: \"README.md\"` plus a string `readme`.\n\n## License\n\nOmnius is released under [CC-BY-NC-4.0](LICENSE) for non-commercial use. Commercial use, redistribution, hosted services, and enterprise deployment require a commercial license.\n"
168
168
  }