omnius 1.0.159 → 1.0.160

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.
Files changed (51) hide show
  1. package/.aiwg/addons/omnius-docs/README.md +5 -0
  2. package/.aiwg/addons/omnius-docs/manifest.json +32 -0
  3. package/.aiwg/addons/omnius-docs/skills/omnius-docs/SKILL.md +48 -0
  4. package/.aiwg/addons/omnius-docs/skills/omnius-ops-docs/SKILL.md +32 -0
  5. package/.aiwg/addons/omnius-docs/skills/omnius-realtime-docs/SKILL.md +30 -0
  6. package/.aiwg/addons/omnius-docs/skills/omnius-sponsor-docs/SKILL.md +31 -0
  7. package/.aiwg/addons/omnius-docs/skills/omnius-telegram-docs/SKILL.md +30 -0
  8. package/.aiwg/addons/omnius-rest-docs/README.md +7 -0
  9. package/.aiwg/addons/omnius-rest-docs/manifest.json +24 -0
  10. package/.aiwg/addons/omnius-rest-docs/skills/omnius-rest-docs/SKILL.md +72 -0
  11. package/README.md +115 -5011
  12. package/dist/index.js +561 -74
  13. package/docs/.vitepress/config.mts +108 -0
  14. package/docs/agent-memory/INDEX.md +38 -0
  15. package/docs/agent-memory/index.md +14 -0
  16. package/docs/architecture/overview.md +30 -0
  17. package/docs/getting-started/first-run.md +38 -0
  18. package/docs/getting-started/install.md +58 -0
  19. package/docs/getting-started/model-providers.md +48 -0
  20. package/docs/guides/media-generation.md +88 -0
  21. package/docs/guides/realtime.md +138 -0
  22. package/docs/guides/sponsor-and-cohere.md +123 -0
  23. package/docs/guides/telegram.md +95 -0
  24. package/docs/guides/tui-workflows.md +48 -0
  25. package/docs/index.md +30 -0
  26. package/docs/operations/runtime-hygiene.md +75 -0
  27. package/docs/operations/security-and-remote-access.md +70 -0
  28. package/docs/reference/configuration.md +45 -0
  29. package/docs/reference/rest-api.md +225 -0
  30. package/docs/reference/slash-commands.md +2095 -0
  31. package/docs/rest/INDEX.md +129 -0
  32. package/docs/rest/QUICKREF.md +125 -0
  33. package/docs/rest/REST-DOCS-MANIFEST.json +27 -0
  34. package/docs/rest/auth-and-scopes.md +101 -0
  35. package/docs/rest/endpoints/aims.md +26 -0
  36. package/docs/rest/endpoints/aiwg.md +44 -0
  37. package/docs/rest/endpoints/chat.md +101 -0
  38. package/docs/rest/endpoints/config.md +53 -0
  39. package/docs/rest/endpoints/events.md +63 -0
  40. package/docs/rest/endpoints/files.md +18 -0
  41. package/docs/rest/endpoints/memory.md +42 -0
  42. package/docs/rest/endpoints/run.md +52 -0
  43. package/docs/rest/endpoints/skills.md +41 -0
  44. package/docs/rest/endpoints/tools.md +62 -0
  45. package/docs/rest/endpoints/voice-vision.md +80 -0
  46. package/docs/rest/errors-pagination-etags.md +84 -0
  47. package/docs/rest/examples/curl.md +84 -0
  48. package/docs/rest/examples/openai-sdk.md +59 -0
  49. package/docs/rest/openapi-source.md +36 -0
  50. package/npm-shrinkwrap.json +2 -2
  51. package/package.json +5 -2
package/dist/index.js CHANGED
@@ -20856,6 +20856,7 @@ import { existsSync as existsSync24, readdirSync as readdirSync10, readFileSync
20856
20856
  import { join as join27, basename as basename4, dirname as dirname5 } from "node:path";
20857
20857
  import { homedir as homedir8 } from "node:os";
20858
20858
  import { execSync as execSync14 } from "node:child_process";
20859
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
20859
20860
  function getAiwgPaths() {
20860
20861
  const dataDir = join27(homedir8(), ".local", "share", "ai-writing-guide");
20861
20862
  return {
@@ -20910,6 +20911,24 @@ function findAiwgPackageRoot() {
20910
20911
  _cachedAiwgPkgRoot = null;
20911
20912
  return null;
20912
20913
  }
20914
+ function hasBundledOmniusDocs(root) {
20915
+ return existsSync24(join27(root, ".aiwg", "addons", "omnius-docs", "skills", "omnius-docs", "SKILL.md")) && existsSync24(join27(root, ".aiwg", "addons", "omnius-rest-docs", "skills", "omnius-rest-docs", "SKILL.md")) && existsSync24(join27(root, "docs", "agent-memory", "INDEX.md"));
20916
+ }
20917
+ function findBundledOmniusDocsRoot() {
20918
+ const envRoot = process.env["OMNIUS_DOCS_ROOT"];
20919
+ if (envRoot && hasBundledOmniusDocs(envRoot))
20920
+ return envRoot;
20921
+ let current = dirname5(fileURLToPath2(import.meta.url));
20922
+ for (let depth = 0; depth < 8; depth++) {
20923
+ if (hasBundledOmniusDocs(current))
20924
+ return current;
20925
+ const parent = dirname5(current);
20926
+ if (parent === current)
20927
+ break;
20928
+ current = parent;
20929
+ }
20930
+ return null;
20931
+ }
20913
20932
  function discoverSkills(repoRoot) {
20914
20933
  const skills = /* @__PURE__ */ new Map();
20915
20934
  const { frameworksDir, addonsDir, pluginsDir } = getAiwgPaths();
@@ -20953,9 +20972,29 @@ function discoverSkills(repoRoot) {
20953
20972
  loadComponent(join27(pluginsDir, plugin), `plugin:${plugin}`);
20954
20973
  }
20955
20974
  }
20975
+ const bundledDocsRoot = findBundledOmniusDocsRoot();
20976
+ if (bundledDocsRoot) {
20977
+ const bundledAddons = join27(bundledDocsRoot, ".aiwg", "addons");
20978
+ for (const addon of safeReaddir2(bundledAddons, true)) {
20979
+ if (addon !== "omnius-docs" && addon !== "omnius-rest-docs")
20980
+ continue;
20981
+ loadComponent(join27(bundledAddons, addon), `bundled-addon:${addon}`);
20982
+ }
20983
+ }
20956
20984
  const projectAiwg = join27(repoRoot, ".aiwg");
20957
20985
  loadSkillsFromDir(join27(projectAiwg, "skills"), "project", skills);
20958
20986
  loadCommandsFromDir(join27(projectAiwg, "commands"), "project", skills);
20987
+ for (const [kind, sourcePrefix] of [
20988
+ ["addons", "project-addon"],
20989
+ ["extensions", "project-extension"],
20990
+ ["frameworks", "project-framework"],
20991
+ ["plugins", "project-plugin"]
20992
+ ]) {
20993
+ const bundleRoot = join27(projectAiwg, kind);
20994
+ for (const bundle of safeReaddir2(bundleRoot, true)) {
20995
+ loadComponent(join27(bundleRoot, bundle), `${sourcePrefix}:${bundle}`);
20996
+ }
20997
+ }
20959
20998
  const projectOmniusSkills = join27(repoRoot, ".omnius", "skills");
20960
20999
  loadSkillsFromDir(projectOmniusSkills, "local", skills);
20961
21000
  return Array.from(skills.values());
@@ -91796,7 +91835,7 @@ var require_axios = __commonJS({
91796
91835
  var isNumber2 = typeOfTest("number");
91797
91836
  var isObject = (thing) => thing !== null && typeof thing === "object";
91798
91837
  var isBoolean = (thing) => thing === true || thing === false;
91799
- var isPlainObject = (val) => {
91838
+ var isPlainObject2 = (val) => {
91800
91839
  if (kindOf(val) !== "object") {
91801
91840
  return false;
91802
91841
  }
@@ -91901,9 +91940,9 @@ var require_axios = __commonJS({
91901
91940
  return;
91902
91941
  }
91903
91942
  const targetKey = caseless && findKey(result, key) || key;
91904
- if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
91943
+ if (isPlainObject2(result[targetKey]) && isPlainObject2(val)) {
91905
91944
  result[targetKey] = merge2(result[targetKey], val);
91906
- } else if (isPlainObject(val)) {
91945
+ } else if (isPlainObject2(val)) {
91907
91946
  result[targetKey] = merge2({}, val);
91908
91947
  } else if (isArray(val)) {
91909
91948
  result[targetKey] = val.slice();
@@ -92137,7 +92176,7 @@ var require_axios = __commonJS({
92137
92176
  isNumber: isNumber2,
92138
92177
  isBoolean,
92139
92178
  isObject,
92140
- isPlainObject,
92179
+ isPlainObject: isPlainObject2,
92141
92180
  isEmptyObject,
92142
92181
  isReadableStream,
92143
92182
  isRequest,
@@ -225156,7 +225195,7 @@ var require_defaults = __commonJS({
225156
225195
  var require_Utility = __commonJS({
225157
225196
  "../node_modules/xmlbuilder/lib/Utility.js"(exports, module) {
225158
225197
  (function() {
225159
- var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject, slice2 = [].slice, hasProp = {}.hasOwnProperty;
225198
+ var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject2, slice2 = [].slice, hasProp = {}.hasOwnProperty;
225160
225199
  assign = function() {
225161
225200
  var i2, key, len, source, sources, target;
225162
225201
  target = arguments[0], sources = 2 <= arguments.length ? slice2.call(arguments, 1) : [];
@@ -225201,7 +225240,7 @@ var require_Utility = __commonJS({
225201
225240
  return true;
225202
225241
  }
225203
225242
  };
225204
- isPlainObject = function(val) {
225243
+ isPlainObject2 = function(val) {
225205
225244
  var ctor, proto;
225206
225245
  return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && typeof ctor === "function" && ctor instanceof ctor && Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object);
225207
225246
  };
@@ -225217,7 +225256,7 @@ var require_Utility = __commonJS({
225217
225256
  module.exports.isObject = isObject;
225218
225257
  module.exports.isArray = isArray;
225219
225258
  module.exports.isEmpty = isEmpty;
225220
- module.exports.isPlainObject = isPlainObject;
225259
+ module.exports.isPlainObject = isPlainObject2;
225221
225260
  module.exports.getValue = getValue;
225222
225261
  }).call(exports);
225223
225262
  }
@@ -228031,7 +228070,7 @@ var require_XMLStringWriter = __commonJS({
228031
228070
  var require_XMLDocument = __commonJS({
228032
228071
  "../node_modules/xmlbuilder/lib/XMLDocument.js"(exports, module) {
228033
228072
  (function() {
228034
- var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = function(child, parent) {
228073
+ var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject2, extend = function(child, parent) {
228035
228074
  for (var key in parent) {
228036
228075
  if (hasProp.call(parent, key)) child[key] = parent[key];
228037
228076
  }
@@ -228043,7 +228082,7 @@ var require_XMLDocument = __commonJS({
228043
228082
  child.__super__ = parent.prototype;
228044
228083
  return child;
228045
228084
  }, hasProp = {}.hasOwnProperty;
228046
- isPlainObject = require_Utility().isPlainObject;
228085
+ isPlainObject2 = require_Utility().isPlainObject;
228047
228086
  XMLDOMImplementation = require_XMLDOMImplementation();
228048
228087
  XMLDOMConfiguration = require_XMLDOMConfiguration();
228049
228088
  XMLNode = require_XMLNode();
@@ -228153,7 +228192,7 @@ var require_XMLDocument = __commonJS({
228153
228192
  writerOptions = {};
228154
228193
  if (!writer) {
228155
228194
  writer = this.options.writer;
228156
- } else if (isPlainObject(writer)) {
228195
+ } else if (isPlainObject2(writer)) {
228157
228196
  writerOptions = writer;
228158
228197
  writer = this.options.writer;
228159
228198
  }
@@ -228238,8 +228277,8 @@ var require_XMLDocument = __commonJS({
228238
228277
  var require_XMLDocumentCB = __commonJS({
228239
228278
  "../node_modules/xmlbuilder/lib/XMLDocumentCB.js"(exports, module) {
228240
228279
  (function() {
228241
- var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref, hasProp = {}.hasOwnProperty;
228242
- ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue;
228280
+ var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject2, ref, hasProp = {}.hasOwnProperty;
228281
+ ref = require_Utility(), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject2 = ref.isPlainObject, getValue = ref.getValue;
228243
228282
  NodeType = require_NodeType();
228244
228283
  XMLDocument = require_XMLDocument();
228245
228284
  XMLElement = require_XMLElement();
@@ -228267,7 +228306,7 @@ var require_XMLDocumentCB = __commonJS({
228267
228306
  writerOptions = {};
228268
228307
  if (!options2.writer) {
228269
228308
  options2.writer = new XMLStringWriter();
228270
- } else if (isPlainObject(options2.writer)) {
228309
+ } else if (isPlainObject2(options2.writer)) {
228271
228310
  writerOptions = options2.writer;
228272
228311
  options2.writer = new XMLStringWriter();
228273
228312
  }
@@ -247631,8 +247670,8 @@ var require_fill_range = __commonJS({
247631
247670
  var util2 = __require("util");
247632
247671
  var toRegexRange = require_to_regex_range();
247633
247672
  var isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
247634
- var transform = (toNumber) => {
247635
- return (value2) => toNumber === true ? Number(value2) : String(value2);
247673
+ var transform = (toNumber2) => {
247674
+ return (value2) => toNumber2 === true ? Number(value2) : String(value2);
247636
247675
  };
247637
247676
  var isValidValue = (value2) => {
247638
247677
  return typeof value2 === "number" || typeof value2 === "string" && value2 !== "";
@@ -247652,13 +247691,13 @@ var require_fill_range = __commonJS({
247652
247691
  }
247653
247692
  return options2.stringify === true;
247654
247693
  };
247655
- var pad = (input, maxLength, toNumber) => {
247694
+ var pad = (input, maxLength, toNumber2) => {
247656
247695
  if (maxLength > 0) {
247657
247696
  let dash = input[0] === "-" ? "-" : "";
247658
247697
  if (dash) input = input.slice(1);
247659
247698
  input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
247660
247699
  }
247661
- if (toNumber === false) {
247700
+ if (toNumber2 === false) {
247662
247701
  return String(input);
247663
247702
  }
247664
247703
  return input;
@@ -247741,8 +247780,8 @@ var require_fill_range = __commonJS({
247741
247780
  step = Math.max(Math.abs(step), 1);
247742
247781
  let padded = zeros(startString) || zeros(endString) || zeros(stepString);
247743
247782
  let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
247744
- let toNumber = padded === false && stringify2(start2, end, options2) === false;
247745
- let format3 = options2.transform || transform(toNumber);
247783
+ let toNumber2 = padded === false && stringify2(start2, end, options2) === false;
247784
+ let format3 = options2.transform || transform(toNumber2);
247746
247785
  if (options2.toRegex && step === 1) {
247747
247786
  return toRange(toMaxLen(start2, maxLen), toMaxLen(end, maxLen), true, options2);
247748
247787
  }
@@ -247754,7 +247793,7 @@ var require_fill_range = __commonJS({
247754
247793
  if (options2.toRegex === true && step > 1) {
247755
247794
  push(a2);
247756
247795
  } else {
247757
- range.push(pad(format3(a2, index), maxLen, toNumber));
247796
+ range.push(pad(format3(a2, index), maxLen, toNumber2));
247758
247797
  }
247759
247798
  a2 = descending ? a2 - step : a2 + step;
247760
247799
  index++;
@@ -252908,9 +252947,9 @@ var init_src107 = __esm({
252908
252947
  // ../node_modules/steno/lib/index.js
252909
252948
  import { rename as rename3, writeFile as writeFile10 } from "node:fs/promises";
252910
252949
  import { basename as basename6, dirname as dirname8, join as join31 } from "node:path";
252911
- import { fileURLToPath as fileURLToPath2 } from "node:url";
252950
+ import { fileURLToPath as fileURLToPath3 } from "node:url";
252912
252951
  function getTempFilename(file) {
252913
- const f2 = file instanceof URL ? fileURLToPath2(file) : file.toString();
252952
+ const f2 = file instanceof URL ? fileURLToPath3(file) : file.toString();
252914
252953
  return join31(dirname8(f2), `.${basename6(f2)}.tmp`);
252915
252954
  }
252916
252955
  async function retryAsyncOperation(fn, maxRetries, delayMs) {
@@ -263698,7 +263737,7 @@ __export(vision_exports, {
263698
263737
  import { readFileSync as readFileSync23, existsSync as existsSync31, statSync as statSync14, unlinkSync as unlinkSync5, writeFileSync as writeFileSync14 } from "node:fs";
263699
263738
  import { execSync as execSync16, spawn as spawn11, spawnSync as spawnSync3 } from "node:child_process";
263700
263739
  import { resolve as resolve22, extname as extname6, basename as basename7, dirname as dirname9, join as join42 } from "node:path";
263701
- import { fileURLToPath as fileURLToPath3 } from "node:url";
263740
+ import { fileURLToPath as fileURLToPath4 } from "node:url";
263702
263741
  async function probeStation(endpoint) {
263703
263742
  try {
263704
263743
  const healthUrl = endpoint.replace(/\/v1\/?$/, "/health");
@@ -263726,7 +263765,7 @@ function findStationBinary() {
263726
263765
  const omniusVenvBin = isWin2 ? join42(venvBase, "Scripts", "moondream-station.exe") : join42(venvBase, "bin", "moondream-station");
263727
263766
  if (existsSync31(omniusVenvBin))
263728
263767
  return omniusVenvBin;
263729
- const thisDir = dirname9(fileURLToPath3(import.meta.url));
263768
+ const thisDir = dirname9(fileURLToPath4(import.meta.url));
263730
263769
  const pyBin = isWin2 ? "Scripts/python.exe" : "bin/python";
263731
263770
  const localVenvPaths = [
263732
263771
  resolve22(thisDir, `../../../../.moondream-venv/${pyBin}`),
@@ -263763,7 +263802,7 @@ async function autoLaunchStation(port = 2020) {
263763
263802
  const pythonBin = findStationBinary();
263764
263803
  if (!pythonBin)
263765
263804
  return false;
263766
- const thisDir = dirname9(fileURLToPath3(import.meta.url));
263805
+ const thisDir = dirname9(fileURLToPath4(import.meta.url));
263767
263806
  const launcherScript = resolve22(thisDir, "../../scripts/start-moondream.py");
263768
263807
  if (!existsSync31(launcherScript))
263769
263808
  return false;
@@ -265352,10 +265391,10 @@ ${text}`,
265352
265391
  import { existsSync as existsSync34, statSync as statSync17 } from "node:fs";
265353
265392
  import { resolve as resolve25, basename as basename10, dirname as dirname10, join as join45 } from "node:path";
265354
265393
  import { execSync as execSync20 } from "node:child_process";
265355
- import { fileURLToPath as fileURLToPath4 } from "node:url";
265394
+ import { fileURLToPath as fileURLToPath5 } from "node:url";
265356
265395
  import { homedir as homedir12, tmpdir as tmpdir8 } from "node:os";
265357
265396
  function findOcrScript() {
265358
- const thisDir = dirname10(fileURLToPath4(import.meta.url));
265397
+ const thisDir = dirname10(fileURLToPath5(import.meta.url));
265359
265398
  const devPath3 = resolve25(thisDir, "../../scripts/ocr-advanced.py");
265360
265399
  if (existsSync34(devPath3))
265361
265400
  return devPath3;
@@ -265656,7 +265695,7 @@ Note: Advanced Python pipeline not available — install pytesseract, opencv-pyt
265656
265695
  import { execSync as execSync21, spawn as spawn12 } from "node:child_process";
265657
265696
  import { copyFileSync, existsSync as existsSync35, mkdirSync as mkdirSync13, readFileSync as readFileSync26 } from "node:fs";
265658
265697
  import { basename as basename11, dirname as dirname11, join as join46, resolve as resolve26 } from "node:path";
265659
- import { fileURLToPath as fileURLToPath5 } from "node:url";
265698
+ import { fileURLToPath as fileURLToPath6 } from "node:url";
265660
265699
  function findScrapeScript() {
265661
265700
  const candidates = [
265662
265701
  // Published npm package: dist/scripts/web_scrape.py
@@ -265810,7 +265849,7 @@ var init_browser_action = __esm({
265810
265849
  "use strict";
265811
265850
  init_dom_summary();
265812
265851
  init_network_egress_policy();
265813
- __dirname3 = dirname11(fileURLToPath5(import.meta.url));
265852
+ __dirname3 = dirname11(fileURLToPath6(import.meta.url));
265814
265853
  DEFAULT_PORT = 8130;
265815
265854
  SCRAPE_SCRIPT = findScrapeScript();
265816
265855
  BASE_URL = `http://localhost:${DEFAULT_PORT}`;
@@ -266173,9 +266212,9 @@ var init_browser_action = __esm({
266173
266212
  import { execSync as execSync22, spawn as spawn13 } from "node:child_process";
266174
266213
  import { existsSync as existsSync36, readFileSync as readFileSync27, writeFileSync as writeFileSync15, mkdirSync as mkdirSync14, appendFileSync, copyFileSync as copyFileSync2 } from "node:fs";
266175
266214
  import { join as join47, resolve as resolve27, dirname as dirname12 } from "node:path";
266176
- import { fileURLToPath as fileURLToPath6 } from "node:url";
266215
+ import { fileURLToPath as fileURLToPath7 } from "node:url";
266177
266216
  function findAutoresearchScript(scriptName) {
266178
- const thisDir = dirname12(fileURLToPath6(import.meta.url));
266217
+ const thisDir = dirname12(fileURLToPath7(import.meta.url));
266179
266218
  const devPath3 = resolve27(thisDir, "../../scripts", scriptName);
266180
266219
  if (existsSync36(devPath3))
266181
266220
  return devPath3;
@@ -522366,11 +522405,11 @@ import { execSync as execSync40, spawnSync as spawnSync6 } from "node:child_proc
522366
522405
  import { existsSync as existsSync51, mkdirSync as mkdirSync25, writeFileSync as writeFileSync23, readFileSync as readFileSync38, unlinkSync as unlinkSync11 } from "node:fs";
522367
522406
  import { dirname as dirname15, join as join67, resolve as resolve34 } from "node:path";
522368
522407
  import { tmpdir as tmpdir17, homedir as homedir21 } from "node:os";
522369
- import { fileURLToPath as fileURLToPath7 } from "node:url";
522408
+ import { fileURLToPath as fileURLToPath8 } from "node:url";
522370
522409
  function _findNemotronScript() {
522371
522410
  const candidates = [];
522372
522411
  try {
522373
- const here = dirname15(fileURLToPath7(import.meta.url));
522412
+ const here = dirname15(fileURLToPath8(import.meta.url));
522374
522413
  candidates.push(resolve34(here, "../../scripts/live-nemotron.py"));
522375
522414
  candidates.push(resolve34(here, "../../../scripts/live-nemotron.py"));
522376
522415
  } catch {
@@ -526320,7 +526359,7 @@ Topic: ${segments.slice(0, 5).map((s2) => s2.text).join(" ").slice(0, 300)}`,
526320
526359
  import { existsSync as existsSync58, readFileSync as readFileSync44, statSync as statSync25 } from "node:fs";
526321
526360
  import { spawn as spawn19 } from "node:child_process";
526322
526361
  import { resolve as resolve36, dirname as dirname18, join as join73, basename as basename16 } from "node:path";
526323
- import { fileURLToPath as fileURLToPath8 } from "node:url";
526362
+ import { fileURLToPath as fileURLToPath9 } from "node:url";
526324
526363
  import { homedir as homedir25 } from "node:os";
526325
526364
  function loadConfig2() {
526326
526365
  if (!existsSync58(CONFIG_PATH))
@@ -526343,7 +526382,7 @@ async function probeSidecar(port) {
526343
526382
  }
526344
526383
  }
526345
526384
  function findLauncherScript() {
526346
- const here = dirname18(fileURLToPath8(import.meta.url));
526385
+ const here = dirname18(fileURLToPath9(import.meta.url));
526347
526386
  const candidates = [
526348
526387
  resolve36(here, "../../scripts/start-video-scan.py"),
526349
526388
  resolve36(here, "../scripts/start-video-scan.py")
@@ -526571,7 +526610,7 @@ Format OK: ${r2.format_ok}`;
526571
526610
  import { existsSync as existsSync59, readFileSync as readFileSync45 } from "node:fs";
526572
526611
  import { spawn as spawn20 } from "node:child_process";
526573
526612
  import { resolve as resolve37, dirname as dirname19, join as join74, basename as basename17 } from "node:path";
526574
- import { fileURLToPath as fileURLToPath9 } from "node:url";
526613
+ import { fileURLToPath as fileURLToPath10 } from "node:url";
526575
526614
  import { homedir as homedir26 } from "node:os";
526576
526615
  function loadConfig3() {
526577
526616
  if (!existsSync59(CONFIG_PATH2))
@@ -526594,7 +526633,7 @@ async function probeSidecar2(port) {
526594
526633
  }
526595
526634
  }
526596
526635
  function findLauncherScript2() {
526597
- const here = dirname19(fileURLToPath9(import.meta.url));
526636
+ const here = dirname19(fileURLToPath10(import.meta.url));
526598
526637
  const candidates = [
526599
526638
  resolve37(here, "../../scripts/start-lance.py"),
526600
526639
  resolve37(here, "../scripts/start-lance.py")
@@ -528913,7 +528952,7 @@ var init_dist6 = __esm({
528913
528952
  // packages/orchestrator/dist/promptLoader.js
528914
528953
  import { readFileSync as readFileSync49, existsSync as existsSync63 } from "node:fs";
528915
528954
  import { join as join77, dirname as dirname21 } from "node:path";
528916
- import { fileURLToPath as fileURLToPath10 } from "node:url";
528955
+ import { fileURLToPath as fileURLToPath11 } from "node:url";
528917
528956
  function loadPrompt(promptPath, vars) {
528918
528957
  let content = cache5.get(promptPath);
528919
528958
  if (content === void 0) {
@@ -528932,7 +528971,7 @@ var __filename3, __dirname4, PROMPTS_DIR, cache5;
528932
528971
  var init_promptLoader = __esm({
528933
528972
  "packages/orchestrator/dist/promptLoader.js"() {
528934
528973
  "use strict";
528935
- __filename3 = fileURLToPath10(import.meta.url);
528974
+ __filename3 = fileURLToPath11(import.meta.url);
528936
528975
  __dirname4 = dirname21(__filename3);
528937
528976
  PROMPTS_DIR = join77(__dirname4, "..", "prompts");
528938
528977
  cache5 = /* @__PURE__ */ new Map();
@@ -532148,7 +532187,7 @@ var init_personality = __esm({
532148
532187
  // packages/orchestrator/dist/critic.js
532149
532188
  function buildForceProgressBlockMessage(call, hits) {
532150
532189
  const argPreview = JSON.stringify(call.args ?? {}).slice(0, 200);
532151
- return `[FORCED PROGRESS BLOCK — duplicate ${call.tool} call skipped; this is not a tool failure. You have called ${call.tool}(${argPreview}) ${hits} times with identical arguments. The runtime did not re-run the tool; it is returning the cached result below so you can proceed without retrying.
532190
+ return `[FORCED PROGRESS BLOCK — duplicate ${call.tool} call skipped; this is not a tool failure. You have called ${call.tool}(${argPreview}) ${hits} times with identical arguments. The runtime did not re-run the tool; it is returning the prior result below so you can proceed without retrying.
532152
532191
 
532153
532192
  Progress is REQUIRED before this tool will run again with the same arguments. To proceed, do one of these:
532154
532193
  • file_write or file_edit to make progress, OR
@@ -532157,7 +532196,7 @@ Progress is REQUIRED before this tool will run again with the same arguments. To
532157
532196
  • Call a different tool or use different arguments.]`;
532158
532197
  }
532159
532198
  function buildCachedResultEnvelope(result) {
532160
- return `[CACHED RESULT — you already have this information from a prior successful call. Do NOT call this tool again with the same arguments.]
532199
+ return `[CACHED RESULT — you already have this information from a prior identical call. Do NOT call this tool again with the same arguments.]
532161
532200
  ${result}`;
532162
532201
  }
532163
532202
  function evaluate(inputs) {
@@ -532170,7 +532209,8 @@ function evaluate(inputs) {
532170
532209
  cachedResult: cached ? buildCachedResultEnvelope(cached.result) : null
532171
532210
  };
532172
532211
  }
532173
- if (isReadLike) {
532212
+ const cacheEligible = isReadLike || proposedCall.tool === "shell";
532213
+ if (cacheEligible) {
532174
532214
  const cached = recentToolResults.get(fingerprint);
532175
532215
  if (cached !== void 0) {
532176
532216
  const hits = (dedupHitCount.get(fingerprint) ?? 0) + 1;
@@ -544478,6 +544518,242 @@ var init_modelProfile = __esm({
544478
544518
  }
544479
544519
  });
544480
544520
 
544521
+ // packages/orchestrator/dist/failureHandoff.js
544522
+ function isPlainObject(value2) {
544523
+ return !!value2 && typeof value2 === "object" && !Array.isArray(value2);
544524
+ }
544525
+ function toEntries(patterns) {
544526
+ if (!patterns)
544527
+ return [];
544528
+ if (patterns instanceof Map)
544529
+ return Array.from(patterns.entries());
544530
+ if (isPlainObject(patterns))
544531
+ return Object.entries(patterns);
544532
+ return [];
544533
+ }
544534
+ function toNumber(value2, fallback = 0) {
544535
+ return typeof value2 === "number" && Number.isFinite(value2) ? value2 : fallback;
544536
+ }
544537
+ function toOptionalNumber(value2) {
544538
+ return typeof value2 === "number" && Number.isFinite(value2) ? value2 : void 0;
544539
+ }
544540
+ function cleanInline(value2, max = 220) {
544541
+ if (typeof value2 !== "string")
544542
+ return "";
544543
+ const normalized = value2.split("\n").map((line) => line.trim()).filter(Boolean).join(" ");
544544
+ return normalized.length > max ? `${normalized.slice(0, max - 3)}...` : normalized;
544545
+ }
544546
+ function normalizeModifiedFiles(modifiedFiles) {
544547
+ if (!modifiedFiles)
544548
+ return [];
544549
+ if (modifiedFiles instanceof Map)
544550
+ return Array.from(modifiedFiles.entries());
544551
+ if (Array.isArray(modifiedFiles))
544552
+ return modifiedFiles;
544553
+ if (isPlainObject(modifiedFiles))
544554
+ return Object.entries(modifiedFiles);
544555
+ return [];
544556
+ }
544557
+ function recordEntry(merged, entry) {
544558
+ const existing = merged.get(entry.signature);
544559
+ if (!existing || entry.count > existing.count) {
544560
+ merged.set(entry.signature, entry);
544561
+ return;
544562
+ }
544563
+ if (existing.guidance.length === 0 && entry.guidance.length > 0) {
544564
+ merged.set(entry.signature, { ...existing, guidance: entry.guidance });
544565
+ }
544566
+ }
544567
+ function normalizeFailurePatterns(patterns) {
544568
+ const merged = /* @__PURE__ */ new Map();
544569
+ for (const [signature, raw] of toEntries(patterns)) {
544570
+ if (signature === "patterns" && isPlainObject(raw)) {
544571
+ for (const legacyRaw of Object.values(raw)) {
544572
+ if (!isPlainObject(legacyRaw))
544573
+ continue;
544574
+ const legacyId = cleanInline(legacyRaw["id"], 120);
544575
+ const pattern = cleanInline(legacyRaw["pattern"], 220);
544576
+ const cause = cleanInline(legacyRaw["cause"], 220);
544577
+ const solution = cleanInline(legacyRaw["solution"], 260);
544578
+ const legacySignature = legacyId || pattern;
544579
+ if (!legacySignature)
544580
+ continue;
544581
+ const guidanceParts = [cause, solution].filter(Boolean);
544582
+ recordEntry(merged, {
544583
+ signature: legacySignature,
544584
+ count: toNumber(legacyRaw["count"], 1),
544585
+ guidance: guidanceParts.length > 0 ? guidanceParts.join(" ") : pattern,
544586
+ lastSeen: toOptionalNumber(legacyRaw["lastSeen"]),
544587
+ source: "legacy"
544588
+ });
544589
+ }
544590
+ continue;
544591
+ }
544592
+ if (!isPlainObject(raw))
544593
+ continue;
544594
+ const count = toNumber(raw["count"], 0);
544595
+ if (count <= 0)
544596
+ continue;
544597
+ recordEntry(merged, {
544598
+ signature,
544599
+ count,
544600
+ guidance: cleanInline(raw["guidance"], 300),
544601
+ tool: cleanInline(raw["tool"], 80) || void 0,
544602
+ errorType: cleanInline(raw["errorType"], 80) || void 0,
544603
+ lastSeen: toOptionalNumber(raw["lastSeen"]),
544604
+ source: "direct"
544605
+ });
544606
+ }
544607
+ return Array.from(merged.values()).sort((a2, b) => {
544608
+ if (b.count !== a2.count)
544609
+ return b.count - a2.count;
544610
+ return a2.signature.localeCompare(b.signature);
544611
+ });
544612
+ }
544613
+ function buildFailureModeHandoff(input) {
544614
+ const patterns = normalizeFailurePatterns(input.errorPatterns).slice(0, input.maxPatterns ?? 10);
544615
+ const toolCalls = input.toolCallLog ?? [];
544616
+ const maxRecentCalls = input.maxRecentCalls ?? 8;
544617
+ const recentCalls = maxRecentCalls > 0 ? toolCalls.slice(-maxRecentCalls) : [];
544618
+ const failedCalls = toolCalls.filter((call) => call.success === false);
544619
+ const modified = normalizeModifiedFiles(input.taskState?.modifiedFiles);
544620
+ const failedApproaches = input.taskState?.failedApproaches ?? [];
544621
+ const completedSteps = input.taskState?.completedSteps ?? [];
544622
+ const pendingSteps = input.taskState?.pendingSteps ?? [];
544623
+ const currentStep = cleanInline(input.taskState?.currentStep, 180);
544624
+ const nextAction = cleanInline(input.taskState?.nextAction, 180);
544625
+ const goal = cleanInline(input.taskGoal || input.taskState?.goal || input.taskState?.originalGoal || "", 260);
544626
+ if (patterns.length === 0 && recentCalls.length === 0 && modified.length === 0 && failedApproaches.length === 0 && !goal) {
544627
+ return null;
544628
+ }
544629
+ const lines = ["[FAILURE-MODE INTAKE]"];
544630
+ if (goal)
544631
+ lines.push(`Goal: ${goal}`);
544632
+ if (patterns.length > 0) {
544633
+ lines.push("Top persisted failure modes:");
544634
+ for (const p2 of patterns) {
544635
+ const guidance = p2.guidance ? ` - ${p2.guidance}` : "";
544636
+ lines.push(`- ${p2.signature} x${p2.count}${guidance}`);
544637
+ }
544638
+ }
544639
+ if (recentCalls.length > 0) {
544640
+ const total = toolCalls.length;
544641
+ const failed = failedCalls.length;
544642
+ const mutations = toolCalls.filter((call) => call.mutated || (call.mutatedFiles?.length ?? 0) > 0).length;
544643
+ lines.push(`Current run: ${total} tool calls, ${failed} failed, ${mutations} mutation calls.`);
544644
+ const lastFailure = failedCalls[failedCalls.length - 1];
544645
+ if (lastFailure) {
544646
+ const preview = cleanInline(lastFailure.outputPreview, 240);
544647
+ lines.push(`Last raw failure: ${lastFailure.name}${preview ? ` - ${preview}` : ""}`);
544648
+ }
544649
+ }
544650
+ if (modified.length > 0) {
544651
+ lines.push(`Files touched: ${modified.slice(-8).map(([path12, action]) => `${path12} (${action})`).join(", ")}`);
544652
+ } else {
544653
+ lines.push("Files touched: none recorded.");
544654
+ }
544655
+ if (completedSteps.length > 0) {
544656
+ lines.push(`Recent completed steps: ${completedSteps.slice(-4).join("; ")}`);
544657
+ }
544658
+ if (currentStep)
544659
+ lines.push(`Current step: ${currentStep}`);
544660
+ if (failedApproaches.length > 0) {
544661
+ lines.push(`Failed approaches: ${failedApproaches.slice(-4).join("; ")}`);
544662
+ }
544663
+ if (pendingSteps.length > 0) {
544664
+ lines.push(`Remaining work: ${pendingSteps.slice(0, 5).join("; ")}`);
544665
+ } else if (nextAction) {
544666
+ lines.push(`Next action: ${nextAction}`);
544667
+ }
544668
+ lines.push("Operating rule: base the next move on the raw failure/output state above; do not repeat the same failed approach unchanged.");
544669
+ lines.push("[/FAILURE-MODE INTAKE]");
544670
+ return lines.join("\n");
544671
+ }
544672
+ function computeCommitProgressGate(input) {
544673
+ const cooldown = input.cooldownTurns ?? 4;
544674
+ if (typeof input.lastInjectedTurn === "number" && input.lastInjectedTurn >= 0 && input.turn - input.lastInjectedTurn < cooldown) {
544675
+ return { shouldInject: false };
544676
+ }
544677
+ const touched = normalizeModifiedFiles(input.taskState?.modifiedFiles);
544678
+ const mutationCalls = input.toolCallLog.filter((call) => call.mutated || (call.mutatedFiles?.length ?? 0) > 0);
544679
+ if (touched.length > 0 || mutationCalls.length > 0) {
544680
+ return { shouldInject: false };
544681
+ }
544682
+ const successfulDiscovery = input.toolCallLog.filter((call) => call.success === true && DISCOVERY_TOOLS.has(call.name));
544683
+ if (successfulDiscovery.length < 3)
544684
+ return { shouldInject: false };
544685
+ const lastTools = input.toolCallLog.slice(-5).map((call) => `${call.name}:${call.success === false ? "failed" : "ok"}`).join(", ");
544686
+ return {
544687
+ shouldInject: true,
544688
+ content: [
544689
+ "[PROGRESS GATE - evidence gathered, no files changed]",
544690
+ `Successful discovery calls: ${successfulDiscovery.length}. Files touched: none recorded.`,
544691
+ lastTools ? `Recent tools: ${lastTools}.` : "",
544692
+ "If the current task requires a repo change, make the smallest direct edit now. If no edit is required, or a blocker prevents one, state that explicitly in the next action instead of doing generic discovery.",
544693
+ "[/PROGRESS GATE]"
544694
+ ].filter(Boolean).join("\n")
544695
+ };
544696
+ }
544697
+ function computeShellFailurePivot(input) {
544698
+ const cooldown = input.cooldownTurns ?? 3;
544699
+ if (typeof input.lastInjectedTurn === "number" && input.lastInjectedTurn >= 0 && input.turn - input.lastInjectedTurn < cooldown) {
544700
+ return { shouldInject: false };
544701
+ }
544702
+ const recentShellFailures = input.toolCallLog.slice(-4).filter((call) => call.name === "shell" && call.success === false);
544703
+ if (recentShellFailures.length < 2)
544704
+ return { shouldInject: false };
544705
+ const raw = recentShellFailures.map((call) => cleanInline(call.outputPreview, 220)).filter(Boolean).slice(-2);
544706
+ return {
544707
+ shouldInject: true,
544708
+ content: [
544709
+ "[SHELL FAILURE PIVOT - raw output repeated]",
544710
+ `Recent failed shell calls: ${recentShellFailures.length}.`,
544711
+ raw.length > 0 ? `Raw failure preview: ${raw.join(" | ")}` : "",
544712
+ "Switch approach before issuing another shell command with similar intent. Prefer a direct file/tool action when it can make progress, or run one simpler command that isolates a single missing fact.",
544713
+ "[/SHELL FAILURE PIVOT]"
544714
+ ].filter(Boolean).join("\n")
544715
+ };
544716
+ }
544717
+ function computeNoProgressCompletionGate(input) {
544718
+ const touched = normalizeModifiedFiles(input.taskState?.modifiedFiles);
544719
+ const mutationCalls = input.toolCallLog.filter((call) => call.mutated || (call.mutatedFiles?.length ?? 0) > 0);
544720
+ if (touched.length > 0 || mutationCalls.length > 0) {
544721
+ return { shouldInject: false };
544722
+ }
544723
+ const successfulDiscovery = input.toolCallLog.filter((call) => call.success === true && DISCOVERY_TOOLS.has(call.name));
544724
+ if (successfulDiscovery.length < 3)
544725
+ return { shouldInject: false };
544726
+ const summary = (input.summary ?? "").trim();
544727
+ if (summary.startsWith("BLOCKED:") || summary.startsWith("NO FILE CHANGES REQUIRED:")) {
544728
+ return { shouldInject: false };
544729
+ }
544730
+ return {
544731
+ shouldInject: true,
544732
+ content: [
544733
+ "[TASK_COMPLETE HELD - no recorded deliverable]",
544734
+ `This run has ${successfulDiscovery.length} successful discovery calls and no recorded file mutations.`,
544735
+ "If the requested work truly needs no file change, retry task_complete with summary starting `NO FILE CHANGES REQUIRED:` and explain the evidence. If you are blocked, retry with `BLOCKED:` and the blocker. Otherwise make the smallest direct change before completing.",
544736
+ "[/TASK_COMPLETE HELD]"
544737
+ ].join("\n")
544738
+ };
544739
+ }
544740
+ var DISCOVERY_TOOLS;
544741
+ var init_failureHandoff = __esm({
544742
+ "packages/orchestrator/dist/failureHandoff.js"() {
544743
+ "use strict";
544744
+ DISCOVERY_TOOLS = /* @__PURE__ */ new Set([
544745
+ "file_read",
544746
+ "grep_search",
544747
+ "find_files",
544748
+ "list_directory",
544749
+ "file_explore",
544750
+ "memory_read",
544751
+ "working_notes",
544752
+ "memex_retrieve"
544753
+ ]);
544754
+ }
544755
+ });
544756
+
544481
544757
  // packages/orchestrator/dist/preflightSnapshot.js
544482
544758
  var preflightSnapshot_exports = {};
544483
544759
  __export(preflightSnapshot_exports, {
@@ -545826,6 +546102,7 @@ var init_agenticRunner = __esm({
545826
546102
  init_streaming_executor();
545827
546103
  init_specDecomposer();
545828
546104
  init_modelProfile();
546105
+ init_failureHandoff();
545829
546106
  TOOL_SUBSETS = {
545830
546107
  web: ["web_search", "web_fetch", "web_crawl"],
545831
546108
  code: [
@@ -548717,6 +548994,24 @@ ${blob}
548717
548994
  return "undefined";
548718
548995
  return value2;
548719
548996
  }
548997
+ _buildShellCacheResult(args, result) {
548998
+ const command = String(args["command"] ?? args["cmd"] ?? "").slice(0, 800);
548999
+ const status = result.success ? "success" : "failure";
549000
+ const error = String(result.error ?? "").trim();
549001
+ const output = String(result.output ?? "").trim();
549002
+ const lines = [
549003
+ "[SHELL RESULT CACHE]",
549004
+ `status: ${status}`,
549005
+ command ? `command: ${command}` : "",
549006
+ error ? "error:" : "",
549007
+ error ? error.slice(0, 3e3) : "",
549008
+ output ? "output:" : "",
549009
+ output ? output.slice(0, 5e3) : ""
549010
+ ].filter(Boolean);
549011
+ const body = lines.join("\n");
549012
+ return body.length > 8e3 ? `${body.slice(0, 8e3)}
549013
+ ... [shell cache payload truncated; full output was already captured by the original tool result/log packet if applicable]` : body;
549014
+ }
548720
549015
  _isStatefulBrowserTool(name10) {
548721
549016
  return name10 === "playwright_browser" || name10 === "browser_action";
548722
549017
  }
@@ -549292,10 +549587,16 @@ Respond with your assessment, then take action.`;
549292
549587
  try {
549293
549588
  if (fs11.existsSync(patternsFile)) {
549294
549589
  const saved = JSON.parse(fs11.readFileSync(patternsFile, "utf8"));
549295
- for (const [sig, pattern] of Object.entries(saved)) {
549296
- const existing = this._errorPatterns.get(sig);
549297
- if (!existing || (pattern.count ?? 0) > (existing.count ?? 0)) {
549298
- this._errorPatterns.set(sig, pattern);
549590
+ for (const pattern of normalizeFailurePatterns(saved)) {
549591
+ const existing = this._errorPatterns.get(pattern.signature);
549592
+ if (!existing || pattern.count > (existing.count ?? 0)) {
549593
+ this._errorPatterns.set(pattern.signature, {
549594
+ count: pattern.count,
549595
+ guidance: pattern.guidance,
549596
+ lastSeen: pattern.lastSeen,
549597
+ tool: pattern.tool,
549598
+ errorType: pattern.errorType
549599
+ });
549299
549600
  }
549300
549601
  }
549301
549602
  }
@@ -549578,6 +549879,22 @@ TASK: ${scrubbedTask}` : scrubbedTask;
549578
549879
  }
549579
549880
  } catch {
549580
549881
  }
549882
+ if (process.env["OMNIUS_DISABLE_FAILURE_HANDOFF"] !== "1") {
549883
+ try {
549884
+ const failureHandoff = buildFailureModeHandoff({
549885
+ taskGoal: cleanedTask,
549886
+ errorPatterns: this._errorPatterns,
549887
+ toolCallLog,
549888
+ taskState: this._taskState,
549889
+ maxPatterns: 10,
549890
+ maxRecentCalls: 0
549891
+ });
549892
+ if (failureHandoff) {
549893
+ messages2.push({ role: "system", content: failureHandoff });
549894
+ }
549895
+ } catch {
549896
+ }
549897
+ }
549581
549898
  let toolDefs = await this.buildToolDefinitions();
549582
549899
  const baseInstructions = getSystemPromptForTier(this.options.modelTier);
549583
549900
  this.checkPromptToolParity(baseInstructions, toolDefs);
@@ -549635,6 +549952,9 @@ TASK: ${scrubbedTask}` : scrubbedTask;
549635
549952
  let consecutiveEmptyResponses = 0;
549636
549953
  let sameToolFailStreak = 0;
549637
549954
  let sameToolFailName = null;
549955
+ let lastFailureHandoffTurn = -1;
549956
+ let lastCommitGateTurn = -1;
549957
+ let lastShellPivotTurn = -1;
549638
549958
  const recentToolResults = /* @__PURE__ */ new Map();
549639
549959
  const dedupHitCount = /* @__PURE__ */ new Map();
549640
549960
  const DEDUP_ESCALATION_THRESHOLD = 3;
@@ -549690,6 +550010,26 @@ TASK: ${scrubbedTask}` : scrubbedTask;
549690
550010
  }
549691
550011
  return false;
549692
550012
  };
550013
+ const holdNoProgressTaskComplete = (args, turn) => {
550014
+ if (process.env["OMNIUS_DISABLE_PROGRESS_GATES"] === "1")
550015
+ return false;
550016
+ const proposedSummary = extractTaskCompleteSummary(args);
550017
+ const gate = computeNoProgressCompletionGate({
550018
+ summary: proposedSummary,
550019
+ toolCallLog,
550020
+ taskState: this._taskState
550021
+ });
550022
+ if (!gate.shouldInject || !gate.content)
550023
+ return false;
550024
+ messages2.push({ role: "system", content: gate.content });
550025
+ this.emit({
550026
+ type: "status",
550027
+ content: "task_complete held: discovery happened but no deliverable or explicit blocker is recorded",
550028
+ turn,
550029
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
550030
+ });
550031
+ return true;
550032
+ };
549693
550033
  const turnCap = this.options.maxTurns && this.options.maxTurns > 0 ? this.options.maxTurns : Number.MAX_SAFE_INTEGER;
549694
550034
  for (let turn = 0; turn < turnCap; turn++) {
549695
550035
  clearTurnState(this._appState);
@@ -551705,6 +552045,15 @@ ${memoryLines.join("\n")}`
551705
552045
  if (observerRedundantBlock) {
551706
552046
  this._littlemanRedundantBlocks.delete(toolFingerprint);
551707
552047
  }
552048
+ const markSyntheticToolLog = (outputPreview) => {
552049
+ const lastLog = toolCallLog[_toolLogTailIdx];
552050
+ if (!lastLog)
552051
+ return;
552052
+ lastLog.success = true;
552053
+ lastLog.mutated = false;
552054
+ lastLog.mutatedFiles = [];
552055
+ lastLog.outputPreview = outputPreview.slice(0, 100);
552056
+ };
551708
552057
  {
551709
552058
  const _reflStem = buildStem(tc.name, tc.arguments ?? {});
551710
552059
  if (!this._reflectionsInjectedThisTurn.has(_reflStem)) {
@@ -551773,6 +552122,7 @@ ${memoryLines.join("\n")}`
551773
552122
  const blockMsg = criticDecision.cachedResult ? `[BLOCKED — this tool+args already succeeded. Re-served from cache:]
551774
552123
 
551775
552124
  ${criticDecision.cachedResult.slice(0, 500)}` : `[BLOCKED — the observer confirmed this tool already succeeded with these arguments on a prior turn. Do NOT re-run. Use your prior findings to proceed.]`;
552125
+ markSyntheticToolLog(blockMsg);
551776
552126
  this.emit({
551777
552127
  type: "tool_result",
551778
552128
  toolName: tc.name,
@@ -551820,6 +552170,9 @@ ${criticDecision.cachedResult.slice(0, 500)}` : `[BLOCKED — the observer confi
551820
552170
  `;
551821
552171
  const truncatedCache = criticDecision.cachedResult.length > 500 ? criticDecision.cachedResult.slice(0, 500) + `
551822
552172
  ... [${criticDecision.cachedResult.length - 500} chars omitted — same as before]` : criticDecision.cachedResult;
552173
+ markSyntheticToolLog(`${criticDecision.blockMessage}
552174
+
552175
+ ${truncatedCache}`);
551823
552176
  return {
551824
552177
  tc,
551825
552178
  output: `${criticDecision.blockMessage}
@@ -551849,6 +552202,7 @@ ${header}${truncatedCache}`
551849
552202
  const truncatedCache = criticDecision.cachedResult.length > 500 ? criticDecision.cachedResult.slice(0, 500) + `
551850
552203
  ... [${criticDecision.cachedResult.length - 500} chars omitted — same as before]` : criticDecision.cachedResult;
551851
552204
  const dedupOutput = header + truncatedCache;
552205
+ markSyntheticToolLog(dedupOutput);
551852
552206
  this.emit({
551853
552207
  type: "tool_result",
551854
552208
  toolName: tc.name,
@@ -552689,9 +553043,9 @@ Respond with EXACTLY this structure before your next tool call:
552689
553043
  }
552690
553044
  }
552691
553045
  }
552692
- if (isReadLike && result.success) {
553046
+ if (isReadLike && result.success || tc.name === "shell") {
552693
553047
  recentToolResults.set(toolFingerprint, {
552694
- result: (result.output ?? "").slice(0, 2e3),
553048
+ result: tc.name === "shell" ? this._buildShellCacheResult(tc.arguments, result) : (result.output ?? "").slice(0, 2e3),
552695
553049
  compacted: false
552696
553050
  });
552697
553051
  if (recentToolResults.size > 500) {
@@ -552706,6 +553060,12 @@ Respond with EXACTLY this structure before your next tool call:
552706
553060
  if (isFileMutation && dedupHitCount.size > 0) {
552707
553061
  dedupHitCount.clear();
552708
553062
  }
553063
+ if (isFileMutation && recentToolResults.size > 0) {
553064
+ for (const key of Array.from(recentToolResults.keys())) {
553065
+ if (key.startsWith("shell:"))
553066
+ recentToolResults.delete(key);
553067
+ }
553068
+ }
552709
553069
  if (isFileMutation) {
552710
553070
  this._fileWritesSinceLastWorldState += Math.max(1, realMutationPaths.length);
552711
553071
  this._fileWritesThisRun += Math.max(1, realMutationPaths.length);
@@ -553112,6 +553472,52 @@ Then use file_read on individual FILES inside it.`);
553112
553472
  } else if (!isEisdir) {
553113
553473
  this._consecutiveEnoent = 0;
553114
553474
  }
553475
+ if (process.env["OMNIUS_DISABLE_PROGRESS_GATES"] !== "1") {
553476
+ const commitGate = computeCommitProgressGate({
553477
+ toolCallLog,
553478
+ taskState: this._taskState,
553479
+ turn,
553480
+ lastInjectedTurn: lastCommitGateTurn
553481
+ });
553482
+ if (commitGate.shouldInject && commitGate.content) {
553483
+ messages2.push({ role: "system", content: commitGate.content });
553484
+ lastCommitGateTurn = turn;
553485
+ this.emit({
553486
+ type: "status",
553487
+ content: "Progress gate injected: discovery succeeded but no file changes are recorded",
553488
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
553489
+ });
553490
+ }
553491
+ const shellPivot = computeShellFailurePivot({
553492
+ toolCallLog,
553493
+ taskState: this._taskState,
553494
+ turn,
553495
+ lastInjectedTurn: lastShellPivotTurn
553496
+ });
553497
+ if (shellPivot.shouldInject && shellPivot.content) {
553498
+ messages2.push({ role: "system", content: shellPivot.content });
553499
+ lastShellPivotTurn = turn;
553500
+ this.emit({
553501
+ type: "status",
553502
+ content: "Shell failure pivot injected from recent raw shell failures",
553503
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
553504
+ });
553505
+ }
553506
+ }
553507
+ if (process.env["OMNIUS_DISABLE_FAILURE_HANDOFF"] !== "1" && !result.success && turn - lastFailureHandoffTurn >= 4) {
553508
+ const runtimeHandoff = buildFailureModeHandoff({
553509
+ taskGoal: cleanedTask,
553510
+ errorPatterns: this._errorPatterns,
553511
+ toolCallLog,
553512
+ taskState: this._taskState,
553513
+ maxPatterns: 5,
553514
+ maxRecentCalls: 6
553515
+ });
553516
+ if (runtimeHandoff) {
553517
+ messages2.push({ role: "system", content: runtimeHandoff });
553518
+ lastFailureHandoffTurn = turn;
553519
+ }
553520
+ }
553115
553521
  return { tc, output };
553116
553522
  };
553117
553523
  const rawToolCalls = msg.toolCalls;
@@ -553171,6 +553577,9 @@ ${sr.result.output}`;
553171
553577
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
553172
553578
  });
553173
553579
  } else {
553580
+ if (holdNoProgressTaskComplete(matchTc.arguments, turn)) {
553581
+ continue;
553582
+ }
553174
553583
  const _bp1 = await this._runBackwardPassReview(turn);
553175
553584
  if (_bp1 && !_bp1.proceed && _bp1.feedback) {
553176
553585
  messages2.push({ role: "system", content: _bp1.feedback });
@@ -553212,6 +553621,9 @@ ${sr.result.output}`;
553212
553621
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
553213
553622
  });
553214
553623
  } else {
553624
+ if (holdNoProgressTaskComplete(r2.tc.arguments, turn)) {
553625
+ continue;
553626
+ }
553215
553627
  const _bp2 = await this._runBackwardPassReview(turn);
553216
553628
  if (_bp2 && !_bp2.proceed && _bp2.feedback) {
553217
553629
  messages2.push({ role: "system", content: _bp2.feedback });
@@ -553288,6 +553700,9 @@ ${sr.result.output}`;
553288
553700
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
553289
553701
  });
553290
553702
  } else {
553703
+ if (holdNoProgressTaskComplete(r2.tc.arguments, turn)) {
553704
+ continue;
553705
+ }
553291
553706
  const _bp3 = await this._runBackwardPassReview(turn);
553292
553707
  if (_bp3 && !_bp3.proceed && _bp3.feedback) {
553293
553708
  messages2.push({ role: "system", content: _bp3.feedback });
@@ -554026,6 +554441,9 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
554026
554441
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
554027
554442
  });
554028
554443
  } else {
554444
+ if (holdNoProgressTaskComplete(tc.arguments, turn)) {
554445
+ continue;
554446
+ }
554029
554447
  const _bp4 = await this._runBackwardPassReview(turn);
554030
554448
  if (_bp4 && !_bp4.proceed && _bp4.feedback) {
554031
554449
  messages2.push({ role: "system", content: _bp4.feedback });
@@ -554076,6 +554494,23 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
554076
554494
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
554077
554495
  });
554078
554496
  } else {
554497
+ if (process.env["OMNIUS_DISABLE_PROGRESS_GATES"] !== "1") {
554498
+ const gate = computeNoProgressCompletionGate({
554499
+ summary: content,
554500
+ toolCallLog,
554501
+ taskState: this._taskState
554502
+ });
554503
+ if (gate.shouldInject && gate.content) {
554504
+ messages2.push({ role: "system", content: gate.content });
554505
+ this.emit({
554506
+ type: "status",
554507
+ content: "text completion held: discovery happened but no deliverable or explicit blocker is recorded",
554508
+ turn,
554509
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
554510
+ });
554511
+ continue;
554512
+ }
554513
+ }
554079
554514
  completed = true;
554080
554515
  summary = content;
554081
554516
  break;
@@ -554629,7 +555064,7 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
554629
555064
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
554630
555065
  });
554631
555066
  try {
554632
- const { mkdirSync: mkdirSync84, writeFileSync: writeFileSync76 } = __require("node:fs");
555067
+ const { mkdirSync: mkdirSync84, readdirSync: readdirSync51, statSync: statSync49, unlinkSync: unlinkSync29, writeFileSync: writeFileSync76 } = __require("node:fs");
554633
555068
  const { join: join155 } = __require("node:path");
554634
555069
  const contextDir = join155(this._workingDirectory || process.cwd(), ".omnius", "context");
554635
555070
  mkdirSync84(contextDir, { recursive: true });
@@ -554675,6 +555110,40 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
554675
555110
  const outPath = join155(contextDir, `kg-summary-${this._sessionId}.md`);
554676
555111
  writeFileSync76(outPath, lines.join("\n"), "utf-8");
554677
555112
  writeFileSync76(join155(contextDir, `kg-summary-latest.md`), lines.join("\n"), "utf-8");
555113
+ if (process.env["OMNIUS_DISABLE_KG_SUMMARY_PRUNE"] !== "1") {
555114
+ try {
555115
+ const maxAgeDays = parseInt(process.env["OMNIUS_KG_SUMMARY_MAX_AGE_DAYS"] || "7", 10) || 7;
555116
+ const maxFiles = parseInt(process.env["OMNIUS_KG_SUMMARY_MAX_FILES"] || "20", 10) || 20;
555117
+ const cutoff = Date.now() - maxAgeDays * 24 * 60 * 60 * 1e3;
555118
+ const summaries = readdirSync51(contextDir).filter((name10) => name10.startsWith("kg-summary-") && name10.endsWith(".md") && name10 !== "kg-summary-latest.md").map((name10) => {
555119
+ const filePath = join155(contextDir, name10);
555120
+ const stat7 = statSync49(filePath);
555121
+ return { filePath, mtimeMs: stat7.mtimeMs };
555122
+ }).sort((a2, b) => b.mtimeMs - a2.mtimeMs);
555123
+ const toDelete = /* @__PURE__ */ new Set();
555124
+ for (const entry of summaries) {
555125
+ if (entry.mtimeMs < cutoff)
555126
+ toDelete.add(entry.filePath);
555127
+ }
555128
+ for (const entry of summaries.slice(maxFiles)) {
555129
+ toDelete.add(entry.filePath);
555130
+ }
555131
+ for (const filePath of toDelete) {
555132
+ try {
555133
+ unlinkSync29(filePath);
555134
+ } catch {
555135
+ }
555136
+ }
555137
+ if (toDelete.size > 0) {
555138
+ this.emit({
555139
+ type: "status",
555140
+ content: `Knowledge graph summaries pruned: ${toDelete.size} old file(s) removed`,
555141
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
555142
+ });
555143
+ }
555144
+ } catch {
555145
+ }
555146
+ }
554678
555147
  } catch {
554679
555148
  }
554680
555149
  }
@@ -555973,6 +556442,24 @@ ${content.slice(0, 8e3)}
555973
556442
  content: goalParts.join("\n")
555974
556443
  });
555975
556444
  }
556445
+ if (process.env["OMNIUS_DISABLE_FAILURE_HANDOFF"] !== "1") {
556446
+ try {
556447
+ const compactFailureHandoff = buildFailureModeHandoff({
556448
+ taskGoal: this._taskState.goal,
556449
+ errorPatterns: this._errorPatterns,
556450
+ taskState: this._taskState,
556451
+ maxPatterns: 6,
556452
+ maxRecentCalls: 0
556453
+ });
556454
+ if (compactFailureHandoff) {
556455
+ result.push({
556456
+ role: "system",
556457
+ content: compactFailureHandoff
556458
+ });
556459
+ }
556460
+ } catch {
556461
+ }
556462
+ }
555976
556463
  const ctxWindow = this.options.contextWindowSize;
555977
556464
  if (ctxWindow > 0) {
555978
556465
  const _safetyImgPat = /\[IMAGE_BASE64:[^\]]+\]/g;
@@ -563466,7 +563953,7 @@ import { spawn as spawn24, execSync as execSync47 } from "node:child_process";
563466
563953
  import { accessSync, constants, existsSync as existsSync87, mkdirSync as mkdirSync48, writeFileSync as writeFileSync43, readdirSync as readdirSync28 } from "node:fs";
563467
563954
  import { join as join102, dirname as dirname27 } from "node:path";
563468
563955
  import { homedir as homedir32 } from "node:os";
563469
- import { fileURLToPath as fileURLToPath11 } from "node:url";
563956
+ import { fileURLToPath as fileURLToPath12 } from "node:url";
563470
563957
  import { EventEmitter as EventEmitter6 } from "node:events";
563471
563958
  import { createInterface as createInterface2 } from "node:readline";
563472
563959
  function isAudioPath(path12) {
@@ -563548,7 +564035,7 @@ function findMicCaptureCommand() {
563548
564035
  return null;
563549
564036
  }
563550
564037
  function findTranscribeFileScript() {
563551
- const thisDir = dirname27(fileURLToPath11(import.meta.url));
564038
+ const thisDir = dirname27(fileURLToPath12(import.meta.url));
563552
564039
  const candidates = [
563553
564040
  join102(thisDir, "../../../../packages/execution/scripts/transcribe-file.py"),
563554
564041
  join102(thisDir, "../../../packages/execution/scripts/transcribe-file.py"),
@@ -563633,7 +564120,7 @@ async function transcribeFileViaWhisper(filePath, model) {
563633
564120
  });
563634
564121
  }
563635
564122
  function findLiveWhisperScript() {
563636
- const thisDir = dirname27(fileURLToPath11(import.meta.url));
564123
+ const thisDir = dirname27(fileURLToPath12(import.meta.url));
563637
564124
  const candidates = [
563638
564125
  join102(thisDir, "../../../../packages/execution/scripts/live-whisper.py"),
563639
564126
  join102(thisDir, "../../../packages/execution/scripts/live-whisper.py"),
@@ -577183,7 +577670,7 @@ var init_render2 = __esm({
577183
577670
  // packages/prompts/dist/promptLoader.js
577184
577671
  import { readFileSync as readFileSync74, existsSync as existsSync93 } from "node:fs";
577185
577672
  import { join as join108, dirname as dirname29 } from "node:path";
577186
- import { fileURLToPath as fileURLToPath12 } from "node:url";
577673
+ import { fileURLToPath as fileURLToPath13 } from "node:url";
577187
577674
  function loadPrompt2(promptPath, vars) {
577188
577675
  let content = cache6.get(promptPath);
577189
577676
  if (content === void 0) {
@@ -577202,7 +577689,7 @@ var __filename4, __dirname5, devPath, publishedPath, PROMPTS_DIR2, cache6;
577202
577689
  var init_promptLoader2 = __esm({
577203
577690
  "packages/prompts/dist/promptLoader.js"() {
577204
577691
  "use strict";
577205
- __filename4 = fileURLToPath12(import.meta.url);
577692
+ __filename4 = fileURLToPath13(import.meta.url);
577206
577693
  __dirname5 = dirname29(__filename4);
577207
577694
  devPath = join108(__dirname5, "..", "templates");
577208
577695
  publishedPath = join108(__dirname5, "..", "prompts", "templates");
@@ -577318,7 +577805,7 @@ var init_task_templates = __esm({
577318
577805
 
577319
577806
  // packages/prompts/dist/index.js
577320
577807
  import { join as join109, dirname as dirname30 } from "node:path";
577321
- import { fileURLToPath as fileURLToPath13 } from "node:url";
577808
+ import { fileURLToPath as fileURLToPath14 } from "node:url";
577322
577809
  var _dir, _packageRoot;
577323
577810
  var init_dist9 = __esm({
577324
577811
  "packages/prompts/dist/index.js"() {
@@ -577327,7 +577814,7 @@ var init_dist9 = __esm({
577327
577814
  init_render2();
577328
577815
  init_task_templates();
577329
577816
  init_render2();
577330
- _dir = dirname30(fileURLToPath13(import.meta.url));
577817
+ _dir = dirname30(fileURLToPath14(import.meta.url));
577331
577818
  _packageRoot = join109(_dir, "..");
577332
577819
  }
577333
577820
  });
@@ -584689,7 +585176,7 @@ import { existsSync as existsSync96, writeFileSync as writeFileSync49, readFileS
584689
585176
  import { join as join112, dirname as dirname32 } from "node:path";
584690
585177
  import { homedir as homedir36 } from "node:os";
584691
585178
  import { execSync as execSync50, spawn as spawn27 } from "node:child_process";
584692
- import { fileURLToPath as fileURLToPath14 } from "node:url";
585179
+ import { fileURLToPath as fileURLToPath15 } from "node:url";
584693
585180
  function execAsync(cmd, opts = {}) {
584694
585181
  return new Promise((resolve57, reject) => {
584695
585182
  const child = spawn27("bash", ["-c", cmd], {
@@ -585500,7 +585987,7 @@ function getShippedVoicesDir() {
585500
585987
  // repo root
585501
585988
  ];
585502
585989
  try {
585503
- const modDir = dirname32(fileURLToPath14(import.meta.url));
585990
+ const modDir = dirname32(fileURLToPath15(import.meta.url));
585504
585991
  candidates.push(join112(modDir, "..", "..", "..", "voices", "personaplex"));
585505
585992
  candidates.push(join112(modDir, "..", "..", "..", "..", "voices", "personaplex"));
585506
585993
  } catch {
@@ -592424,7 +592911,7 @@ import { spawn as spawn29 } from "node:child_process";
592424
592911
  import { existsSync as existsSync103, readFileSync as readFileSync82, writeFileSync as writeFileSync51, mkdirSync as mkdirSync56, unlinkSync as unlinkSync19, openSync as openSync3, closeSync as closeSync3 } from "node:fs";
592425
592912
  import { join as join117 } from "node:path";
592426
592913
  import { homedir as homedir39 } from "node:os";
592427
- import { fileURLToPath as fileURLToPath15 } from "node:url";
592914
+ import { fileURLToPath as fileURLToPath16 } from "node:url";
592428
592915
  import { dirname as dirname33 } from "node:path";
592429
592916
  function getDaemonPort() {
592430
592917
  const env2 = process.env["OMNIUS_HOST"];
@@ -592490,7 +592977,7 @@ async function resolveDaemonCommand(nodeExe) {
592490
592977
  if (first2) candidates.push(first2);
592491
592978
  } catch {
592492
592979
  }
592493
- const thisDir = dirname33(fileURLToPath15(import.meta.url));
592980
+ const thisDir = dirname33(fileURLToPath16(import.meta.url));
592494
592981
  candidates.push(join117(thisDir, "index.js"));
592495
592982
  const seen = /* @__PURE__ */ new Set();
592496
592983
  for (const candidate of candidates) {
@@ -609920,11 +610407,11 @@ async function handleUpdate(subcommand, ctx3) {
609920
610407
  let currentVersion = "0.0.0";
609921
610408
  try {
609922
610409
  const { createRequire: createRequire10 } = await import("node:module");
609923
- const { fileURLToPath: fileURLToPath21 } = await import("node:url");
610410
+ const { fileURLToPath: fileURLToPath22 } = await import("node:url");
609924
610411
  const { dirname: dirname44, join: join155 } = await import("node:path");
609925
610412
  const { existsSync: existsSync138 } = await import("node:fs");
609926
610413
  const req2 = createRequire10(import.meta.url);
609927
- const thisDir = dirname44(fileURLToPath21(import.meta.url));
610414
+ const thisDir = dirname44(fileURLToPath22(import.meta.url));
609928
610415
  const candidates = [
609929
610416
  join155(thisDir, "..", "package.json"),
609930
610417
  join155(thisDir, "..", "..", "package.json"),
@@ -611554,10 +612041,10 @@ var init_commands = __esm({
611554
612041
  }
611555
612042
  try {
611556
612043
  const { createRequire: createRequire10 } = await import("node:module");
611557
- const { fileURLToPath: fileURLToPath21 } = await import("node:url");
612044
+ const { fileURLToPath: fileURLToPath22 } = await import("node:url");
611558
612045
  const { dirname: pathDirname, join: pathJoin } = await import("node:path");
611559
612046
  const localRequire = createRequire10(import.meta.url);
611560
- const here = pathDirname(fileURLToPath21(import.meta.url));
612047
+ const here = pathDirname(fileURLToPath22(import.meta.url));
611561
612048
  let version4 = "?";
611562
612049
  for (const up of ["..", "../..", "../../.."]) {
611563
612050
  try {
@@ -615148,7 +615635,7 @@ var init_edit_history = __esm({
615148
615635
  // packages/cli/src/tui/promptLoader.ts
615149
615636
  import { readFileSync as readFileSync91, existsSync as existsSync113 } from "node:fs";
615150
615637
  import { join as join127, dirname as dirname36 } from "node:path";
615151
- import { fileURLToPath as fileURLToPath16 } from "node:url";
615638
+ import { fileURLToPath as fileURLToPath17 } from "node:url";
615152
615639
  function loadPrompt3(promptPath, vars) {
615153
615640
  let content = cache7.get(promptPath);
615154
615641
  if (content === void 0) {
@@ -615166,7 +615653,7 @@ var __filename5, __dirname6, devPath2, publishedPath2, PROMPTS_DIR3, cache7;
615166
615653
  var init_promptLoader3 = __esm({
615167
615654
  "packages/cli/src/tui/promptLoader.ts"() {
615168
615655
  "use strict";
615169
- __filename5 = fileURLToPath16(import.meta.url);
615656
+ __filename5 = fileURLToPath17(import.meta.url);
615170
615657
  __dirname6 = dirname36(__filename5);
615171
615658
  devPath2 = join127(__dirname6, "..", "..", "prompts");
615172
615659
  publishedPath2 = join127(__dirname6, "..", "prompts");
@@ -652305,7 +652792,7 @@ import { execSync as execSync57, spawn as spawn31 } from "node:child_process";
652305
652792
  import { existsSync as existsSync133, mkdirSync as mkdirSync78, writeFileSync as writeFileSync70 } from "node:fs";
652306
652793
  import { join as join146, resolve as resolve51, dirname as dirname40 } from "node:path";
652307
652794
  import { homedir as homedir52 } from "node:os";
652308
- import { fileURLToPath as fileURLToPath17 } from "node:url";
652795
+ import { fileURLToPath as fileURLToPath18 } from "node:url";
652309
652796
  function getDockerDir() {
652310
652797
  try {
652311
652798
  if (typeof __dirname !== "undefined") {
@@ -652314,7 +652801,7 @@ function getDockerDir() {
652314
652801
  } catch {
652315
652802
  }
652316
652803
  try {
652317
- const thisDir = dirname40(fileURLToPath17(import.meta.url));
652804
+ const thisDir = dirname40(fileURLToPath18(import.meta.url));
652318
652805
  return join146(thisDir, "..", "..", "..", "docker");
652319
652806
  } catch {
652320
652807
  }
@@ -652782,7 +653269,7 @@ __export(serve_exports, {
652782
653269
  import * as http5 from "node:http";
652783
653270
  import * as https3 from "node:https";
652784
653271
  import { createRequire as createRequire7 } from "node:module";
652785
- import { fileURLToPath as fileURLToPath18 } from "node:url";
653272
+ import { fileURLToPath as fileURLToPath19 } from "node:url";
652786
653273
  import { dirname as dirname41, join as join148, resolve as resolve52 } from "node:path";
652787
653274
  import { homedir as homedir53 } from "node:os";
652788
653275
  import { spawn as spawn32, execSync as execSync58 } from "node:child_process";
@@ -652799,7 +653286,7 @@ function memoryDbPaths3(baseDir = process.cwd()) {
652799
653286
  }
652800
653287
  function getVersion3() {
652801
653288
  try {
652802
- const thisDir = dirname41(fileURLToPath18(import.meta.url));
653289
+ const thisDir = dirname41(fileURLToPath19(import.meta.url));
652803
653290
  const candidates = [
652804
653291
  join148(thisDir, "..", "package.json"),
652805
653292
  join148(thisDir, "..", "..", "package.json"),
@@ -660640,7 +661127,7 @@ var init_clipboard_media = __esm({
660640
661127
  import { cwd } from "node:process";
660641
661128
  import { resolve as resolve53, join as join150, dirname as dirname42, extname as extname17, relative as relative14 } from "node:path";
660642
661129
  import { createRequire as createRequire8 } from "node:module";
660643
- import { fileURLToPath as fileURLToPath19 } from "node:url";
661130
+ import { fileURLToPath as fileURLToPath20 } from "node:url";
660644
661131
  import {
660645
661132
  readFileSync as readFileSync111,
660646
661133
  writeFileSync as writeFileSync73,
@@ -660665,7 +661152,7 @@ function formatTimeAgo2(date) {
660665
661152
  function getVersion4() {
660666
661153
  try {
660667
661154
  const require5 = createRequire8(import.meta.url);
660668
- const thisDir = dirname42(fileURLToPath19(import.meta.url));
661155
+ const thisDir = dirname42(fileURLToPath20(import.meta.url));
660669
661156
  const candidates = [
660670
661157
  join150(thisDir, "..", "package.json"),
660671
661158
  join150(thisDir, "..", "..", "package.json"),
@@ -670653,7 +671140,7 @@ init_updater();
670653
671140
  init_typed_node_events();
670654
671141
  import { createRequire as createRequire9 } from "node:module";
670655
671142
  import { parseArgs as nodeParseArgs2 } from "node:util";
670656
- import { fileURLToPath as fileURLToPath20 } from "node:url";
671143
+ import { fileURLToPath as fileURLToPath21 } from "node:url";
670657
671144
  import { dirname as dirname43, join as join154 } from "node:path";
670658
671145
 
670659
671146
  // packages/cli/src/cli.ts
@@ -670802,7 +671289,7 @@ try {
670802
671289
  function getVersion5() {
670803
671290
  try {
670804
671291
  const require5 = createRequire9(import.meta.url);
670805
- const pkgPath = join154(dirname43(fileURLToPath20(import.meta.url)), "..", "package.json");
671292
+ const pkgPath = join154(dirname43(fileURLToPath21(import.meta.url)), "..", "package.json");
670806
671293
  const pkg = require5(pkgPath);
670807
671294
  return pkg.version;
670808
671295
  } catch {