omnius 1.0.627 → 1.0.629

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.
@@ -52,6 +52,13 @@ var init_model_broker = __esm({
52
52
  }
53
53
  });
54
54
 
55
+ // packages/execution/dist/process-async.js
56
+ var init_process_async = __esm({
57
+ "packages/execution/dist/process-async.js"() {
58
+ "use strict";
59
+ }
60
+ });
61
+
55
62
  // packages/execution/dist/venv-paths.js
56
63
  var isWin;
57
64
  var init_venv_paths = __esm({
@@ -61,6 +68,44 @@ var init_venv_paths = __esm({
61
68
  }
62
69
  });
63
70
 
71
+ // packages/execution/dist/tools/model-store.js
72
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, statSync, statfsSync, readdirSync, rmSync, rmdirSync, renameSync, cpSync } from "node:fs";
73
+ import { homedir, platform } from "node:os";
74
+ import { join, sep } from "node:path";
75
+ function omniusHomeDir() {
76
+ const override = process.env["OMNIUS_HOME"]?.trim();
77
+ if (override)
78
+ return override;
79
+ return join(homedir(), ".omnius");
80
+ }
81
+ function mediaStoreRoot() {
82
+ const env = process.env["OMNIUS_MEDIA_HOME"]?.trim();
83
+ if (env)
84
+ return env;
85
+ try {
86
+ const pointer = join(omniusHomeDir(), MEDIA_ROOT_POINTER);
87
+ if (existsSync(pointer)) {
88
+ const parsed = JSON.parse(readFileSync(pointer, "utf8"));
89
+ if (typeof parsed?.root === "string" && parsed.root.trim()) {
90
+ return parsed.root.trim();
91
+ }
92
+ }
93
+ } catch {
94
+ }
95
+ return omniusHomeDir();
96
+ }
97
+ function unifiedRuntimeDir(kind, backend) {
98
+ return join(mediaStoreRoot(), "runtimes", kind, `.venv-${backend}`);
99
+ }
100
+ var MEDIA_ROOT_POINTER, platformId;
101
+ var init_model_store = __esm({
102
+ "packages/execution/dist/tools/model-store.js"() {
103
+ "use strict";
104
+ MEDIA_ROOT_POINTER = "media-store.json";
105
+ platformId = platform();
106
+ }
107
+ });
108
+
64
109
  // packages/execution/dist/process-kill.js
65
110
  import { execSync } from "node:child_process";
66
111
  function killProcessTree(pid, signal = "SIGKILL") {
@@ -103,9 +148,9 @@ var init_process_kill = __esm({
103
148
 
104
149
  // packages/execution/dist/process-lifecycle.js
105
150
  import { randomUUID, createHash } from "node:crypto";
106
- import { appendFileSync, existsSync, mkdirSync, readFileSync, readlinkSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
107
- import { homedir } from "node:os";
108
- import { dirname, isAbsolute, join, relative, resolve } from "node:path";
151
+ import { appendFileSync, existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, readlinkSync, renameSync as renameSync2, rmSync as rmSync2, statSync as statSync2, writeFileSync as writeFileSync2 } from "node:fs";
152
+ import { homedir as homedir2 } from "node:os";
153
+ import { dirname, isAbsolute, join as join2, relative, resolve } from "node:path";
109
154
  function nowFrom(system) {
110
155
  return system?.now?.() ?? Date.now();
111
156
  }
@@ -113,18 +158,18 @@ function realSleep(ms) {
113
158
  return new Promise((resolveSleep) => setTimeout(resolveSleep, ms));
114
159
  }
115
160
  function registryDir(options) {
116
- return options?.storeDir || process.env["OMNIUS_PROCESS_REGISTRY_DIR"] || join(process.env["OMNIUS_HOME"] || join(homedir(), ".omnius"), "processes");
161
+ return options?.storeDir || process.env["OMNIUS_PROCESS_REGISTRY_DIR"] || join2(process.env["OMNIUS_HOME"] || join2(homedir2(), ".omnius"), "processes");
117
162
  }
118
163
  function ensureStoreDir(options) {
119
164
  const dir = registryDir(options);
120
- mkdirSync(dir, { recursive: true });
165
+ mkdirSync2(dir, { recursive: true });
121
166
  return dir;
122
167
  }
123
168
  function activeFilePath(options) {
124
- return join(ensureStoreDir(options), ACTIVE_FILE);
169
+ return join2(ensureStoreDir(options), ACTIVE_FILE);
125
170
  }
126
171
  function jsonlFilePath(options) {
127
- return join(ensureStoreDir(options), JSONL_FILE);
172
+ return join2(ensureStoreDir(options), JSONL_FILE);
128
173
  }
129
174
  function safeParseJson(text) {
130
175
  try {
@@ -135,8 +180,8 @@ function safeParseJson(text) {
135
180
  }
136
181
  function readActiveStore(options) {
137
182
  const activePath = activeFilePath(options);
138
- if (existsSync(activePath)) {
139
- const parsed = safeParseJson(readFileSync(activePath, "utf8"));
183
+ if (existsSync2(activePath)) {
184
+ const parsed = safeParseJson(readFileSync2(activePath, "utf8"));
140
185
  if (parsed?.version === 1 && Array.isArray(parsed.leases))
141
186
  return parsed;
142
187
  }
@@ -145,8 +190,8 @@ function readActiveStore(options) {
145
190
  function rebuildActiveStoreFromLog(options) {
146
191
  const logPath = jsonlFilePath(options);
147
192
  const byId = /* @__PURE__ */ new Map();
148
- if (existsSync(logPath)) {
149
- const text = readFileSync(logPath, "utf8");
193
+ if (existsSync2(logPath)) {
194
+ const text = readFileSync2(logPath, "utf8");
150
195
  for (const line of text.split("\n")) {
151
196
  const trimmed = line.trim();
152
197
  if (!trimmed)
@@ -167,10 +212,10 @@ function rebuildActiveStoreFromLog(options) {
167
212
  }
168
213
  function writeActiveStore(store, options) {
169
214
  const target = activeFilePath(options);
170
- mkdirSync(dirname(target), { recursive: true });
215
+ mkdirSync2(dirname(target), { recursive: true });
171
216
  const tmp = `${target}.${process.pid}.${randomUUID()}.tmp`;
172
- writeFileSync(tmp, JSON.stringify(store, null, 2));
173
- renameSync(tmp, target);
217
+ writeFileSync2(tmp, JSON.stringify(store, null, 2));
218
+ renameSync2(tmp, target);
174
219
  }
175
220
  function appendLeaseEvent(type, lease, options) {
176
221
  const event = { type, at: nowFrom(options?.system), lease };
@@ -441,13 +486,13 @@ function inspectRealProcess(pid) {
441
486
  const now = Date.now();
442
487
  const procDir = `/proc/${pid}`;
443
488
  const identity = { pid, collectedAt: now };
444
- if (process.platform !== "win32" && existsSync(procDir)) {
489
+ if (process.platform !== "win32" && existsSync2(procDir)) {
445
490
  try {
446
- identity.cwd = readlinkSync(join(procDir, "cwd"));
491
+ identity.cwd = readlinkSync(join2(procDir, "cwd"));
447
492
  } catch {
448
493
  }
449
494
  try {
450
- const cmdline = readFileSync(join(procDir, "cmdline"));
495
+ const cmdline = readFileSync2(join2(procDir, "cmdline"));
451
496
  const command = cmdline.toString("utf8").split("\0").filter(Boolean).join(" ");
452
497
  if (command) {
453
498
  identity.command = command;
@@ -456,14 +501,14 @@ function inspectRealProcess(pid) {
456
501
  } catch {
457
502
  }
458
503
  try {
459
- const environ = readFileSync(join(procDir, "environ")).toString("utf8");
504
+ const environ = readFileSync2(join2(procDir, "environ")).toString("utf8");
460
505
  const envLeaseId = environ.split("\0").find((entry) => entry.startsWith("OMNIUS_PROCESS_LEASE_ID="))?.slice("OMNIUS_PROCESS_LEASE_ID=".length);
461
506
  if (envLeaseId)
462
507
  identity.envLeaseId = envLeaseId;
463
508
  } catch {
464
509
  }
465
510
  try {
466
- const stat = readFileSync(join(procDir, "stat"), "utf8");
511
+ const stat = readFileSync2(join2(procDir, "stat"), "utf8");
467
512
  const afterComm = stat.slice(stat.lastIndexOf(")") + 2).trim().split(/\s+/);
468
513
  const ppid = Number(afterComm[1]);
469
514
  const pgid = Number(afterComm[2]);
@@ -499,13 +544,6 @@ var init_system_deps = __esm({
499
544
  }
500
545
  });
501
546
 
502
- // packages/execution/dist/process-async.js
503
- var init_process_async = __esm({
504
- "packages/execution/dist/process-async.js"() {
505
- "use strict";
506
- }
507
- });
508
-
509
547
  // packages/execution/dist/tools/cuda-device-filter.js
510
548
  var init_cuda_device_filter = __esm({
511
549
  "packages/execution/dist/tools/cuda-device-filter.js"() {
@@ -514,16 +552,6 @@ var init_cuda_device_filter = __esm({
514
552
  }
515
553
  });
516
554
 
517
- // packages/execution/dist/tools/model-store.js
518
- import { homedir as homedir2, platform } from "node:os";
519
- var platformId;
520
- var init_model_store = __esm({
521
- "packages/execution/dist/tools/model-store.js"() {
522
- "use strict";
523
- platformId = platform();
524
- }
525
- });
526
-
527
555
  // packages/execution/dist/tools/camera-capture.js
528
556
  var DEFAULT_CAMERA_PROFILE, CAMERA_PROFILES;
529
557
  var init_camera_capture = __esm({
@@ -11932,7 +11960,7 @@ ${lanes.join("\n")}
11932
11960
  return process.memoryUsage().heapUsed;
11933
11961
  },
11934
11962
  getFileSize(path) {
11935
- const stat = statSync4(path);
11963
+ const stat = statSync5(path);
11936
11964
  if (stat == null ? void 0 : stat.isFile()) {
11937
11965
  return stat.size;
11938
11966
  }
@@ -11976,7 +12004,7 @@ ${lanes.join("\n")}
11976
12004
  }
11977
12005
  };
11978
12006
  return nodeSystem;
11979
- function statSync4(path) {
12007
+ function statSync5(path) {
11980
12008
  try {
11981
12009
  return _fs.statSync(path, statSyncOptions);
11982
12010
  } catch {
@@ -12035,7 +12063,7 @@ ${lanes.join("\n")}
12035
12063
  activeSession.post("Profiler.stop", (err, { profile }) => {
12036
12064
  var _a2;
12037
12065
  if (!err) {
12038
- if ((_a2 = statSync4(profilePath)) == null ? void 0 : _a2.isDirectory()) {
12066
+ if ((_a2 = statSync5(profilePath)) == null ? void 0 : _a2.isDirectory()) {
12039
12067
  profilePath = _path.join(profilePath, `${(/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-")}+P${process.pid}.cpuprofile`);
12040
12068
  }
12041
12069
  try {
@@ -12155,7 +12183,7 @@ ${lanes.join("\n")}
12155
12183
  let stat;
12156
12184
  if (typeof dirent === "string" || dirent.isSymbolicLink()) {
12157
12185
  const name = combinePaths(path, entry);
12158
- stat = statSync4(name);
12186
+ stat = statSync5(name);
12159
12187
  if (!stat) {
12160
12188
  continue;
12161
12189
  }
@@ -12179,7 +12207,7 @@ ${lanes.join("\n")}
12179
12207
  return matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
12180
12208
  }
12181
12209
  function fileSystemEntryExists(path, entryKind) {
12182
- const stat = statSync4(path);
12210
+ const stat = statSync5(path);
12183
12211
  if (!stat) {
12184
12212
  return false;
12185
12213
  }
@@ -12221,7 +12249,7 @@ ${lanes.join("\n")}
12221
12249
  }
12222
12250
  function getModifiedTime3(path) {
12223
12251
  var _a2;
12224
- return (_a2 = statSync4(path)) == null ? void 0 : _a2.mtime;
12252
+ return (_a2 = statSync5(path)) == null ? void 0 : _a2.mtime;
12225
12253
  }
12226
12254
  function setModifiedTime(path, time) {
12227
12255
  try {
@@ -51385,11 +51413,11 @@ ${lanes.join("\n")}
51385
51413
  if (i < rootLength) {
51386
51414
  return void 0;
51387
51415
  }
51388
- const sep = directory.lastIndexOf(directorySeparator, i - 1);
51389
- if (sep === -1) {
51416
+ const sep2 = directory.lastIndexOf(directorySeparator, i - 1);
51417
+ if (sep2 === -1) {
51390
51418
  return void 0;
51391
51419
  }
51392
- return directory.substr(0, Math.max(sep, rootLength));
51420
+ return directory.substr(0, Math.max(sep2, rootLength));
51393
51421
  }
51394
51422
  }
51395
51423
  }
@@ -127572,7 +127600,7 @@ ${lanes.join("\n")}
127572
127600
  }
127573
127601
  }
127574
127602
  function createImportCallExpressionAMD(arg2, containsLexicalThis) {
127575
- const resolve12 = factory2.createUniqueName("resolve");
127603
+ const resolve11 = factory2.createUniqueName("resolve");
127576
127604
  const reject = factory2.createUniqueName("reject");
127577
127605
  const parameters = [
127578
127606
  factory2.createParameterDeclaration(
@@ -127581,7 +127609,7 @@ ${lanes.join("\n")}
127581
127609
  /*dotDotDotToken*/
127582
127610
  void 0,
127583
127611
  /*name*/
127584
- resolve12
127612
+ resolve11
127585
127613
  ),
127586
127614
  factory2.createParameterDeclaration(
127587
127615
  /*modifiers*/
@@ -127598,7 +127626,7 @@ ${lanes.join("\n")}
127598
127626
  factory2.createIdentifier("require"),
127599
127627
  /*typeArguments*/
127600
127628
  void 0,
127601
- [factory2.createArrayLiteralExpression([arg2 || factory2.createOmittedExpression()]), resolve12, reject]
127629
+ [factory2.createArrayLiteralExpression([arg2 || factory2.createOmittedExpression()]), resolve11, reject]
127602
127630
  )
127603
127631
  )
127604
127632
  ]);
@@ -140409,9 +140437,9 @@ ${lanes.join("\n")}
140409
140437
  /*ignoreCase*/
140410
140438
  false
140411
140439
  )) {
140412
- const basename10 = getBaseFileName(a.fileName);
140413
- if (basename10 === "lib.d.ts" || basename10 === "lib.es6.d.ts") return 0;
140414
- const name = removeSuffix(removePrefix(basename10, "lib."), ".d.ts");
140440
+ const basename9 = getBaseFileName(a.fileName);
140441
+ if (basename9 === "lib.d.ts" || basename9 === "lib.es6.d.ts") return 0;
140442
+ const name = removeSuffix(removePrefix(basename9, "lib."), ".d.ts");
140415
140443
  const index = libs.indexOf(name);
140416
140444
  if (index !== -1) return index + 1;
140417
140445
  }
@@ -204337,8 +204365,8 @@ ${options.prefix}` : "\n" : options.prefix
204337
204365
  }
204338
204366
  };
204339
204367
  for (const file of files) {
204340
- const basename10 = getBaseFileName(file);
204341
- if (basename10 === "package.json" || basename10 === "bower.json") {
204368
+ const basename9 = getBaseFileName(file);
204369
+ if (basename9 === "package.json" || basename9 === "bower.json") {
204342
204370
  createProjectWatcher(
204343
204371
  file,
204344
204372
  "FileWatcher"
@@ -208022,8 +208050,8 @@ All files are: ${JSON.stringify(names)}`,
208022
208050
  var _a2;
208023
208051
  const fileOrDirectoryPath = removeIgnoredPath(this.toPath(fileOrDirectory));
208024
208052
  if (!fileOrDirectoryPath) return;
208025
- const basename10 = getBaseFileName(fileOrDirectoryPath);
208026
- if (((_a2 = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a2.size) && (basename10 === "package.json" || basename10 === "node_modules")) {
208053
+ const basename9 = getBaseFileName(fileOrDirectoryPath);
208054
+ if (((_a2 = result.affectedModuleSpecifierCacheProjects) == null ? void 0 : _a2.size) && (basename9 === "package.json" || basename9 === "node_modules")) {
208027
208055
  result.affectedModuleSpecifierCacheProjects.forEach((project) => {
208028
208056
  var _a22;
208029
208057
  (_a22 = project.getModuleSpecifierCache()) == null ? void 0 : _a22.clear();
@@ -214509,8 +214537,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
214509
214537
  installPackage(options) {
214510
214538
  this.packageInstallId++;
214511
214539
  const request = { kind: "installPackage", ...options, id: this.packageInstallId };
214512
- const promise = new Promise((resolve12, reject) => {
214513
- (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve12, reject });
214540
+ const promise = new Promise((resolve11, reject) => {
214541
+ (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve11, reject });
214514
214542
  });
214515
214543
  this.installer.send(request);
214516
214544
  return promise;
@@ -216757,7 +216785,7 @@ var require_path_browserify = __commonJS({
216757
216785
  }
216758
216786
  return res;
216759
216787
  }
216760
- function _format(sep, pathObject) {
216788
+ function _format(sep2, pathObject) {
216761
216789
  var dir = pathObject.dir || pathObject.root;
216762
216790
  var base = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
216763
216791
  if (!dir) {
@@ -216766,11 +216794,11 @@ var require_path_browserify = __commonJS({
216766
216794
  if (dir === pathObject.root) {
216767
216795
  return dir + base;
216768
216796
  }
216769
- return dir + sep + base;
216797
+ return dir + sep2 + base;
216770
216798
  }
216771
216799
  var posix = {
216772
216800
  // path.resolve([from ...], to)
216773
- resolve: function resolve12() {
216801
+ resolve: function resolve11() {
216774
216802
  var resolvedPath = "";
216775
216803
  var resolvedAbsolute = false;
216776
216804
  var cwd;
@@ -216904,7 +216932,7 @@ var require_path_browserify = __commonJS({
216904
216932
  _makeLong: function _makeLong(path) {
216905
216933
  return path;
216906
216934
  },
216907
- dirname: function dirname11(path) {
216935
+ dirname: function dirname10(path) {
216908
216936
  assertPath(path);
216909
216937
  if (path.length === 0) return ".";
216910
216938
  var code = path.charCodeAt(0);
@@ -216926,7 +216954,7 @@ var require_path_browserify = __commonJS({
216926
216954
  if (hasRoot && end === 1) return "//";
216927
216955
  return path.slice(0, end);
216928
216956
  },
216929
- basename: function basename10(path, ext) {
216957
+ basename: function basename9(path, ext) {
216930
216958
  if (ext !== void 0 && typeof ext !== "string") throw new TypeError('"ext" argument must be a string');
216931
216959
  assertPath(path);
216932
216960
  var start = 0;
@@ -220961,12 +220989,12 @@ ${nodeLocation}` : message;
220961
220989
  };
220962
220990
  var NodeRuntimeFileSystem = class {
220963
220991
  delete(path2) {
220964
- return new Promise((resolve12, reject) => {
220992
+ return new Promise((resolve11, reject) => {
220965
220993
  fs__namespace.rm(path2, { recursive: true }, (err) => {
220966
220994
  if (err)
220967
220995
  reject(err);
220968
220996
  else
220969
- resolve12();
220997
+ resolve11();
220970
220998
  });
220971
220999
  });
220972
221000
  }
@@ -220985,12 +221013,12 @@ ${nodeLocation}` : message;
220985
221013
  }));
220986
221014
  }
220987
221015
  readFile(filePath, encoding = "utf-8") {
220988
- return new Promise((resolve12, reject) => {
221016
+ return new Promise((resolve11, reject) => {
220989
221017
  fs__namespace.readFile(filePath, encoding, (err, data) => {
220990
221018
  if (err)
220991
221019
  reject(err);
220992
221020
  else
220993
- resolve12(data);
221021
+ resolve11(data);
220994
221022
  });
220995
221023
  });
220996
221024
  }
@@ -220998,12 +221026,12 @@ ${nodeLocation}` : message;
220998
221026
  return fs__namespace.readFileSync(filePath, encoding);
220999
221027
  }
221000
221028
  async writeFile(filePath, fileText) {
221001
- await new Promise((resolve12, reject) => {
221029
+ await new Promise((resolve11, reject) => {
221002
221030
  fs__namespace.writeFile(filePath, fileText, (err) => {
221003
221031
  if (err)
221004
221032
  reject(err);
221005
221033
  else
221006
- resolve12();
221034
+ resolve11();
221007
221035
  });
221008
221036
  });
221009
221037
  }
@@ -221017,12 +221045,12 @@ ${nodeLocation}` : message;
221017
221045
  fs__namespace.mkdirSync(dirPath, { recursive: true });
221018
221046
  }
221019
221047
  move(srcPath, destPath) {
221020
- return new Promise((resolve12, reject) => {
221048
+ return new Promise((resolve11, reject) => {
221021
221049
  fs__namespace.rename(srcPath, destPath, (err) => {
221022
221050
  if (err)
221023
221051
  reject(err);
221024
221052
  else
221025
- resolve12();
221053
+ resolve11();
221026
221054
  });
221027
221055
  });
221028
221056
  }
@@ -221030,12 +221058,12 @@ ${nodeLocation}` : message;
221030
221058
  fs__namespace.renameSync(srcPath, destPath);
221031
221059
  }
221032
221060
  copy(srcPath, destPath) {
221033
- return new Promise((resolve12, reject) => {
221061
+ return new Promise((resolve11, reject) => {
221034
221062
  fs__namespace.copyFile(srcPath, destPath, (err) => {
221035
221063
  if (err)
221036
221064
  reject(err);
221037
221065
  else
221038
- resolve12();
221066
+ resolve11();
221039
221067
  });
221040
221068
  });
221041
221069
  }
@@ -221043,15 +221071,15 @@ ${nodeLocation}` : message;
221043
221071
  fs__namespace.copyFileSync(srcPath, destPath);
221044
221072
  }
221045
221073
  stat(path2) {
221046
- return new Promise((resolve12, reject) => {
221074
+ return new Promise((resolve11, reject) => {
221047
221075
  fs__namespace.stat(path2, (err, stat) => {
221048
221076
  if (err) {
221049
221077
  if (err.code === "ENOENT" || err.code === "ENOTDIR")
221050
- resolve12(void 0);
221078
+ resolve11(void 0);
221051
221079
  else
221052
221080
  reject(err);
221053
221081
  } else {
221054
- resolve12(stat);
221082
+ resolve11(stat);
221055
221083
  }
221056
221084
  });
221057
221085
  });
@@ -245023,7 +245051,7 @@ var init_jibberlink = __esm({
245023
245051
  });
245024
245052
 
245025
245053
  // packages/execution/dist/tools/nexus.js
245026
- import { existsSync as existsSync3, readFileSync as readFileSync3, watch as fsWatchLocal } from "node:fs";
245054
+ import { existsSync as existsSync4, readFileSync as readFileSync4, watch as fsWatchLocal } from "node:fs";
245027
245055
  function readBundledDependencySpec(packageName, fallback) {
245028
245056
  const candidates = [
245029
245057
  new URL("../package.json", import.meta.url),
@@ -245032,7 +245060,7 @@ function readBundledDependencySpec(packageName, fallback) {
245032
245060
  ];
245033
245061
  for (const candidate of candidates) {
245034
245062
  try {
245035
- const pkg = JSON.parse(readFileSync3(candidate, "utf8"));
245063
+ const pkg = JSON.parse(readFileSync4(candidate, "utf8"));
245036
245064
  const spec = pkg?.dependencies?.[packageName] ?? pkg?.optionalDependencies?.[packageName];
245037
245065
  if (typeof spec === "string" && spec.trim())
245038
245066
  return spec.trim();
@@ -245058,21 +245086,32 @@ import { join as join18 } from "node:path";
245058
245086
 
245059
245087
  // packages/cli/src/daemon.ts
245060
245088
  import { spawn } from "node:child_process";
245061
- import { existsSync as existsSync4, readFileSync as readFileSync4, writeFileSync as writeFileSync2, mkdirSync as mkdirSync3, unlinkSync, openSync, closeSync, writeSync, statSync as statSync2, renameSync as renameSync2 } from "node:fs";
245089
+ import { existsSync as existsSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync3, mkdirSync as mkdirSync4, unlinkSync, openSync, closeSync, writeSync, statSync as statSync3, renameSync as renameSync3 } from "node:fs";
245062
245090
  import { join as join14 } from "node:path";
245063
- import { homedir as homedir14 } from "node:os";
245091
+ import { homedir as homedir13 } from "node:os";
245064
245092
  import { createServer as createNetServer } from "node:net";
245065
245093
  import { fileURLToPath as fileURLToPath2 } from "node:url";
245066
- import { dirname as dirname8 } from "node:path";
245094
+ import { dirname as dirname7 } from "node:path";
245067
245095
 
245068
245096
  // packages/execution/dist/index.js
245069
245097
  init_model_broker();
245070
245098
  init_jetson_monitor();
245071
245099
 
245100
+ // packages/execution/dist/audio-classifier-runtime.js
245101
+ init_process_async();
245102
+
245072
245103
  // packages/execution/dist/python-cuda-runtime.js
245073
245104
  init_jetson_monitor();
245074
245105
  init_venv_paths();
245075
245106
 
245107
+ // packages/execution/dist/audio-classifier-runtime.js
245108
+ init_jetson_monitor();
245109
+ init_model_store();
245110
+ var MODEL_REVISION = "ac2ca3bd45d12ec1f19f1144205ea529b4e9dedf";
245111
+ var MODEL_URL = `https://huggingface.co/zeropointnine/yamnet-onnx/resolve/${MODEL_REVISION}/yamnet.onnx`;
245112
+ var CLASS_MAP_URL = `https://huggingface.co/zeropointnine/yamnet-onnx/resolve/${MODEL_REVISION}/yamnet_class_map.csv`;
245113
+ var SETUP_TIMEOUT_MS = 20 * 6e4;
245114
+
245076
245115
  // packages/execution/dist/broker-mediated-backend.js
245077
245116
  init_model_broker();
245078
245117
 
@@ -290290,22 +290329,22 @@ for (const resource of OSINT_CATALOG_RESOURCES) {
290290
290329
 
290291
290330
  // packages/execution/dist/tools/carbonyl-browser.js
290292
290331
  import { homedir as homedir4 } from "node:os";
290293
- import { join as join3 } from "node:path";
290332
+ import { join as join4 } from "node:path";
290294
290333
  init_venv_paths();
290295
290334
  init_process_lifecycle();
290296
290335
 
290297
290336
  // packages/execution/dist/tools/playwright-browser.js
290298
- import { dirname as dirname2, join as join2, resolve as resolve3 } from "node:path";
290337
+ import { dirname as dirname2, join as join3, resolve as resolve3 } from "node:path";
290299
290338
  import { homedir as homedir3, tmpdir } from "node:os";
290300
290339
  init_vision();
290301
290340
  var dynamicImport = new Function("mod", "return import(mod)");
290302
- var PLAYWRIGHT_RUNTIME_DIR = join2(homedir3(), ".omnius", "playwright-runtime");
290303
- var PLAYWRIGHT_BROWSERS_DIR = join2(PLAYWRIGHT_RUNTIME_DIR, "browsers");
290341
+ var PLAYWRIGHT_RUNTIME_DIR = join3(homedir3(), ".omnius", "playwright-runtime");
290342
+ var PLAYWRIGHT_BROWSERS_DIR = join3(PLAYWRIGHT_RUNTIME_DIR, "browsers");
290304
290343
 
290305
290344
  // packages/execution/dist/tools/carbonyl-browser.js
290306
290345
  init_process_async();
290307
- var CARBONYL_VENV = join3(homedir4(), ".omnius", "venv");
290308
- var CARBONYL_RUNTIME_MARKER = join3(CARBONYL_VENV, ".omnius-carbonyl-runtime-installed");
290346
+ var CARBONYL_VENV = join4(homedir4(), ".omnius", "venv");
290347
+ var CARBONYL_RUNTIME_MARKER = join4(CARBONYL_VENV, ".omnius-carbonyl-runtime-installed");
290309
290348
  var INSTALL_TIMEOUT_MS = 10 * 6e4;
290310
290349
  var CARBONYL_DRIVER_PY = String.raw`
290311
290350
  import json, sys, traceback
@@ -291267,7 +291306,7 @@ init_hf_media_models();
291267
291306
 
291268
291307
  // packages/execution/dist/tools/transcribe-tool.js
291269
291308
  init_model_broker();
291270
- import { join as join4, basename, dirname as dirname3, extname, resolve as resolve4 } from "node:path";
291309
+ import { join as join5, basename, dirname as dirname3, extname, resolve as resolve4 } from "node:path";
291271
291310
  import { homedir as homedir5, tmpdir as tmpdir2 } from "node:os";
291272
291311
  init_cuda_device_filter();
291273
291312
  init_process_async();
@@ -291278,9 +291317,9 @@ init_process_async();
291278
291317
 
291279
291318
  // packages/execution/dist/tools/transcribe-tool.js
291280
291319
  var MAX_TRANSCRIBE_URL_BYTES = 100 * 1024 * 1024;
291281
- var MANAGED_ASR_VENV = join4(homedir5(), ".omnius", "runtimes", "asr", ".venv-whisper");
291282
- var MANAGED_TRANSCRIBE_CLI_DIR = join4(homedir5(), ".omnius", "runtimes", "asr", "transcribe-cli-node");
291283
- var YT_DLP_VENV = join4(homedir5(), ".omnius", "runtimes", "media-tools", ".venv-ytdlp");
291320
+ var MANAGED_ASR_VENV = join5(homedir5(), ".omnius", "runtimes", "asr", ".venv-whisper");
291321
+ var MANAGED_TRANSCRIBE_CLI_DIR = join5(homedir5(), ".omnius", "runtimes", "asr", "transcribe-cli-node");
291322
+ var YT_DLP_VENV = join5(homedir5(), ".omnius", "runtimes", "media-tools", ".venv-ytdlp");
291284
291323
 
291285
291324
  // packages/execution/dist/tools/safe-math-eval.js
291286
291325
  var CONSTANTS = {
@@ -293023,19 +293062,22 @@ init_process_async();
293023
293062
  var MAX_IMAGE_BYTES = 8 * 1024 * 1024;
293024
293063
 
293025
293064
  // packages/execution/dist/tools/ocr-image-advanced.js
293026
- import { resolve as resolve5, basename as basename2, dirname as dirname4, join as join5 } from "node:path";
293027
293065
  init_system_deps();
293028
293066
  init_venv_paths();
293029
- import { homedir as homedir6, tmpdir as tmpdir3 } from "node:os";
293030
- var OCR_VENV_DIR = join5(homedir6(), ".omnius", "venv");
293067
+ init_process_async();
293068
+ init_jetson_monitor();
293069
+ init_model_store();
293070
+ var OCR_VENV_DIR = unifiedRuntimeDir("vision", "ocr-advanced");
293071
+ var OCR_SETUP_TIMEOUT_MS = 5 * 6e4;
293072
+ var OCR_PIPELINE_TIMEOUT_MS = 5 * 6e4;
293031
293073
 
293032
293074
  // packages/execution/dist/tools/browser-action.js
293033
293075
  init_process_lifecycle();
293034
- import { copyFileSync, existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2 } from "node:fs";
293035
- import { basename as basename3, dirname as dirname5, join as join6, resolve as resolve6 } from "node:path";
293076
+ import { copyFileSync, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3 } from "node:fs";
293077
+ import { basename as basename2, dirname as dirname4, join as join6, resolve as resolve5 } from "node:path";
293036
293078
  import { fileURLToPath } from "node:url";
293037
293079
  init_model_store();
293038
- var __dirname2 = dirname5(fileURLToPath(import.meta.url));
293080
+ var __dirname2 = dirname4(fileURLToPath(import.meta.url));
293039
293081
  var DEFAULT_PORT = 8130;
293040
293082
  function findScrapeScript() {
293041
293083
  const candidates = [
@@ -293048,7 +293090,7 @@ function findScrapeScript() {
293048
293090
  // Dev monorepo alt: packages/execution/scripts/
293049
293091
  join6(__dirname2, "..", "scripts", "web_scrape.py")
293050
293092
  ];
293051
- return candidates.find((p) => existsSync2(p)) || candidates[0];
293093
+ return candidates.find((p) => existsSync3(p)) || candidates[0];
293052
293094
  }
293053
293095
  var SCRAPE_SCRIPT = findScrapeScript();
293054
293096
  var BASE_URL = `http://localhost:${DEFAULT_PORT}`;
@@ -293330,28 +293372,28 @@ var MESH_VENV = "/tmp/mesh-venv";
293330
293372
  var MESH_CLI = `${MESH_VENV}/bin/meshtastic`;
293331
293373
 
293332
293374
  // packages/execution/dist/tools/audio-analyze.js
293333
- import { basename as basename4, isAbsolute as isAbsolute2, join as join7, resolve as resolve7 } from "node:path";
293334
- import { homedir as homedir7, tmpdir as tmpdir4 } from "node:os";
293375
+ import { basename as basename3, isAbsolute as isAbsolute2, join as join7, resolve as resolve6 } from "node:path";
293376
+ import { homedir as homedir6, tmpdir as tmpdir3 } from "node:os";
293335
293377
  init_cuda_device_filter();
293336
293378
  init_process_async();
293337
- var VENV_DIR = join7(homedir7(), ".omnius", "audio-ml-venv");
293379
+ var VENV_DIR = join7(homedir6(), ".omnius", "audio-ml-venv");
293338
293380
  var VENV_PIP = join7(VENV_DIR, "bin", "pip");
293339
293381
  var VENV_PYTHON = join7(VENV_DIR, "bin", "python3");
293340
293382
 
293341
293383
  // packages/execution/dist/tools/visual-memory.js
293342
293384
  init_cuda_device_filter();
293343
293385
  import { join as join8 } from "node:path";
293344
- import { homedir as homedir8, tmpdir as tmpdir5 } from "node:os";
293345
- var VMEM_DIR = join8(homedir8(), ".omnius", "visual-memory");
293346
- var VENV_DIR2 = join8(homedir8(), ".omnius", "vision-ml-venv");
293386
+ import { homedir as homedir7, tmpdir as tmpdir4 } from "node:os";
293387
+ var VMEM_DIR = join8(homedir7(), ".omnius", "visual-memory");
293388
+ var VENV_DIR2 = join8(homedir7(), ".omnius", "vision-ml-venv");
293347
293389
  var VENV_PY = join8(VENV_DIR2, "bin", "python3");
293348
293390
  var VENV_PIP2 = join8(VENV_DIR2, "bin", "pip");
293349
293391
 
293350
293392
  // packages/execution/dist/tools/multimodal-memory.js
293351
293393
  import { join as join9 } from "node:path";
293352
- import { homedir as homedir9, tmpdir as tmpdir6 } from "node:os";
293394
+ import { homedir as homedir8, tmpdir as tmpdir5 } from "node:os";
293353
293395
  init_camera_capture();
293354
- var MM_DIR = join9(homedir9(), ".omnius", "multimodal-episodes");
293396
+ var MM_DIR = join9(homedir8(), ".omnius", "multimodal-episodes");
293355
293397
  var MM_INDEX = join9(MM_DIR, "index.json");
293356
293398
 
293357
293399
  // packages/execution/dist/asr/registry.js
@@ -293616,32 +293658,32 @@ init_secret_quarantine();
293616
293658
  init_agent_tools();
293617
293659
 
293618
293660
  // packages/execution/dist/tools/video-understand.js
293619
- import { join as join10, basename as basename5, isAbsolute as isAbsolute3, resolve as resolve8 } from "node:path";
293620
- import { homedir as homedir10 } from "node:os";
293661
+ import { join as join10, basename as basename4, isAbsolute as isAbsolute3, resolve as resolve7 } from "node:path";
293662
+ import { homedir as homedir9 } from "node:os";
293621
293663
  init_model_broker();
293622
293664
  init_vision();
293623
293665
  init_process_async();
293624
293666
  init_venv_paths();
293625
- var YT_DLP_VENV2 = join10(homedir10(), ".omnius", "runtimes", "media-tools", ".venv-ytdlp");
293667
+ var YT_DLP_VENV2 = join10(homedir9(), ".omnius", "runtimes", "media-tools", ".venv-ytdlp");
293626
293668
 
293627
293669
  // packages/execution/dist/tools/video-scan.js
293628
- import { resolve as resolve9, dirname as dirname6, join as join11, basename as basename6 } from "node:path";
293629
- import { homedir as homedir11 } from "node:os";
293630
- var CONFIG_PATH = join11(homedir11(), ".omnius", "video-scan.json");
293670
+ import { resolve as resolve8, dirname as dirname5, join as join11, basename as basename5 } from "node:path";
293671
+ import { homedir as homedir10 } from "node:os";
293672
+ var CONFIG_PATH = join11(homedir10(), ".omnius", "video-scan.json");
293631
293673
 
293632
293674
  // packages/execution/dist/tools/live-media-loop.js
293633
293675
  init_process_async();
293634
293676
  init_venv_paths();
293635
- import { homedir as homedir12, tmpdir as tmpdir7 } from "node:os";
293636
- import { basename as basename7, isAbsolute as isAbsolute4, join as join12, resolve as resolve10 } from "node:path";
293677
+ import { homedir as homedir11, tmpdir as tmpdir6 } from "node:os";
293678
+ import { basename as basename6, isAbsolute as isAbsolute4, join as join12, resolve as resolve9 } from "node:path";
293637
293679
  init_camera_capture();
293638
- var LIVE_MEDIA_ROOT = join12(homedir12(), ".omnius", "runtimes", "live-media");
293680
+ var LIVE_MEDIA_ROOT = join12(homedir11(), ".omnius", "runtimes", "live-media");
293639
293681
  var YOLO26_VENV = join12(LIVE_MEDIA_ROOT, ".venv-yolo26");
293640
293682
 
293641
293683
  // packages/execution/dist/tools/lance.js
293642
- import { resolve as resolve11, dirname as dirname7, join as join13, basename as basename8 } from "node:path";
293643
- import { homedir as homedir13 } from "node:os";
293644
- var CONFIG_PATH2 = join13(homedir13(), ".omnius", "lance.json");
293684
+ import { resolve as resolve10, dirname as dirname6, join as join13, basename as basename7 } from "node:path";
293685
+ import { homedir as homedir12 } from "node:os";
293686
+ var CONFIG_PATH2 = join13(homedir12(), ".omnius", "lance.json");
293645
293687
  var RUN_TIMEOUT_MS = 30 * 60 * 1e3;
293646
293688
 
293647
293689
  // packages/execution/dist/index.js
@@ -293651,7 +293693,7 @@ init_system_deps();
293651
293693
  init_process_kill();
293652
293694
 
293653
293695
  // packages/cli/src/daemon.ts
293654
- var OMNIUS_DIR = process.env["OMNIUS_HOME"]?.trim() || join14(homedir14(), ".omnius");
293696
+ var OMNIUS_DIR = process.env["OMNIUS_HOME"]?.trim() || join14(homedir13(), ".omnius");
293655
293697
  var PID_FILE = join14(OMNIUS_DIR, "daemon.pid");
293656
293698
  var DEFAULT_PORT2 = 11435;
293657
293699
  var LOCK_INITIALIZATION_GRACE_MS = 5e3;
@@ -293681,7 +293723,7 @@ function processIsAlive(pid) {
293681
293723
  }
293682
293724
  function readDaemonLock(lockFile) {
293683
293725
  try {
293684
- const value = JSON.parse(readFileSync4(lockFile, "utf8"));
293726
+ const value = JSON.parse(readFileSync5(lockFile, "utf8"));
293685
293727
  if (typeof value.endpoint !== "string" || typeof value.pid !== "number" || !Number.isInteger(value.pid) || value.pid <= 0 || typeof value.token !== "string" || typeof value.startedAt !== "number") {
293686
293728
  return null;
293687
293729
  }
@@ -293692,7 +293734,7 @@ function readDaemonLock(lockFile) {
293692
293734
  }
293693
293735
  function daemonLockIsInitializing(lockFile) {
293694
293736
  try {
293695
- return Date.now() - statSync2(lockFile).mtimeMs < LOCK_INITIALIZATION_GRACE_MS;
293737
+ return Date.now() - statSync3(lockFile).mtimeMs < LOCK_INITIALIZATION_GRACE_MS;
293696
293738
  } catch {
293697
293739
  return false;
293698
293740
  }
@@ -293701,7 +293743,7 @@ function newDaemonLockToken() {
293701
293743
  return `${process.pid}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
293702
293744
  }
293703
293745
  function claimDaemonEndpoint(port = getDaemonPort(), inheritedToken) {
293704
- mkdirSync3(OMNIUS_DIR, { recursive: true });
293746
+ mkdirSync4(OMNIUS_DIR, { recursive: true });
293705
293747
  const endpoint = daemonEndpoint(port);
293706
293748
  const lockFile = daemonLockFile(port);
293707
293749
  for (let attempt = 0; attempt < 3; attempt++) {
@@ -293735,7 +293777,7 @@ function claimDaemonEndpoint(port = getDaemonPort(), inheritedToken) {
293735
293777
  const existing = readDaemonLock(lockFile);
293736
293778
  if (existing?.endpoint === endpoint && inheritedToken && existing.token === inheritedToken) {
293737
293779
  const transferred = { ...existing, pid: process.pid, startedAt: Date.now() };
293738
- writeFileSync2(lockFile, JSON.stringify(transferred), { encoding: "utf8", mode: 384 });
293780
+ writeFileSync3(lockFile, JSON.stringify(transferred), { encoding: "utf8", mode: 384 });
293739
293781
  return { endpoint, lockFile, pid: process.pid, port, token: inheritedToken };
293740
293782
  }
293741
293783
  if (existing && processIsAlive(existing.pid) || !existing && daemonLockIsInitializing(lockFile)) {
@@ -293792,7 +293834,7 @@ async function getDaemonReportedVersion(port) {
293792
293834
  async function waitForDaemonReady(port, expectedVersion, attempts = 24) {
293793
293835
  let observedVersion = null;
293794
293836
  for (let attempt = 0; attempt < attempts; attempt++) {
293795
- await new Promise((resolve12) => setTimeout(resolve12, 500));
293837
+ await new Promise((resolve11) => setTimeout(resolve11, 500));
293796
293838
  if (!await isDaemonRunning(port)) continue;
293797
293839
  observedVersion = await getDaemonReportedVersion(port);
293798
293840
  if (!expectedVersion || expectedVersion === "0.0.0" || observedVersion === expectedVersion) {
@@ -293802,7 +293844,7 @@ async function waitForDaemonReady(port, expectedVersion, attempts = 24) {
293802
293844
  return { ok: false, observedVersion };
293803
293845
  }
293804
293846
  function delay(ms) {
293805
- return new Promise((resolve12) => setTimeout(resolve12, ms));
293847
+ return new Promise((resolve11) => setTimeout(resolve11, ms));
293806
293848
  }
293807
293849
  async function runUserSystemctl(args, timeout = 2e4) {
293808
293850
  try {
@@ -293865,7 +293907,7 @@ function pidIsInManagedDaemonUnit(pid, readCgroup = defaultReadProcCgroup) {
293865
293907
  }
293866
293908
  function defaultReadProcCgroup(pid) {
293867
293909
  try {
293868
- return readFileSync4(`/proc/${pid}/cgroup`, "utf8");
293910
+ return readFileSync5(`/proc/${pid}/cgroup`, "utf8");
293869
293911
  } catch {
293870
293912
  return null;
293871
293913
  }
@@ -293888,12 +293930,12 @@ async function repairManagedDaemonUnit(port, preferredEntrypoint) {
293888
293930
  const command = await resolveDaemonCommand(process.execPath, preferredEntrypoint);
293889
293931
  if (!command) return false;
293890
293932
  try {
293891
- const configHome = process.env["XDG_CONFIG_HOME"] || join14(homedir14(), ".config");
293933
+ const configHome = process.env["XDG_CONFIG_HOME"] || join14(homedir13(), ".config");
293892
293934
  const unitDir = join14(configHome, "systemd", "user");
293893
293935
  const unitPath = join14(unitDir, "omnius-daemon.service");
293894
293936
  const logDir = join14(OMNIUS_DIR);
293895
- mkdirSync3(unitDir, { recursive: true });
293896
- mkdirSync3(logDir, { recursive: true });
293937
+ mkdirSync4(unitDir, { recursive: true });
293938
+ mkdirSync4(logDir, { recursive: true });
293897
293939
  const execStart = [command.command, ...command.args].map(systemdQuote).join(" ");
293898
293940
  const unit = [
293899
293941
  "[Unit]",
@@ -293919,8 +293961,8 @@ async function repairManagedDaemonUnit(port, preferredEntrypoint) {
293919
293961
  ""
293920
293962
  ].join("\n");
293921
293963
  const tmp = `${unitPath}.tmp.${process.pid}.${Date.now()}`;
293922
- writeFileSync2(tmp, unit, { encoding: "utf8", mode: 384 });
293923
- renameSync2(tmp, unitPath);
293964
+ writeFileSync3(tmp, unit, { encoding: "utf8", mode: 384 });
293965
+ renameSync3(tmp, unitPath);
293924
293966
  return (await runUserSystemctl(["daemon-reload"], 1e4)).ok;
293925
293967
  } catch {
293926
293968
  return false;
@@ -293951,13 +293993,13 @@ ${fuser.stderr ?? ""}`;
293951
293993
  }
293952
293994
  }
293953
293995
  async function daemonPortIsFree(port) {
293954
- return new Promise((resolve12) => {
293996
+ return new Promise((resolve11) => {
293955
293997
  const probe = createNetServer();
293956
293998
  let settled = false;
293957
293999
  const finish = (free) => {
293958
294000
  if (settled) return;
293959
294001
  settled = true;
293960
- resolve12(free);
294002
+ resolve11(free);
293961
294003
  };
293962
294004
  probe.once("error", () => finish(false));
293963
294005
  probe.once("listening", () => {
@@ -294135,7 +294177,7 @@ async function restartDaemon(port, expectedVersion, preferredEntrypoint) {
294135
294177
  function looksLikeNodeEntrypoint(path) {
294136
294178
  if (/\.(?:mjs|cjs|js)$/i.test(path)) return true;
294137
294179
  try {
294138
- const firstBytes = readFileSync4(path, "utf8").slice(0, 200);
294180
+ const firstBytes = readFileSync5(path, "utf8").slice(0, 200);
294139
294181
  return /^#!.*\bnode\b/.test(firstBytes);
294140
294182
  } catch {
294141
294183
  return false;
@@ -294151,7 +294193,7 @@ function commandForEntrypoint(path, nodeExe) {
294151
294193
  async function resolveDaemonCommand(nodeExe, preferredEntrypoint) {
294152
294194
  const candidates = [];
294153
294195
  if (preferredEntrypoint) candidates.push(preferredEntrypoint);
294154
- const thisDir = dirname8(fileURLToPath2(import.meta.url));
294196
+ const thisDir = dirname7(fileURLToPath2(import.meta.url));
294155
294197
  candidates.push(join14(thisDir, "index.js"));
294156
294198
  if (process.argv[1]) candidates.push(process.argv[1]);
294157
294199
  try {
@@ -294168,13 +294210,13 @@ async function resolveDaemonCommand(nodeExe, preferredEntrypoint) {
294168
294210
  for (const candidate of candidates) {
294169
294211
  if (!candidate || seen.has(candidate)) continue;
294170
294212
  seen.add(candidate);
294171
- if (!existsSync4(candidate)) continue;
294213
+ if (!existsSync5(candidate)) continue;
294172
294214
  return commandForEntrypoint(candidate, nodeExe);
294173
294215
  }
294174
294216
  return null;
294175
294217
  }
294176
294218
  async function startDaemon(port = getDaemonPort(), preferredEntrypoint) {
294177
- mkdirSync3(OMNIUS_DIR, { recursive: true });
294219
+ mkdirSync4(OMNIUS_DIR, { recursive: true });
294178
294220
  const daemonPort = port;
294179
294221
  const endpointClaim = claimDaemonEndpoint(daemonPort);
294180
294222
  if (!endpointClaim) return null;
@@ -294210,7 +294252,7 @@ async function startDaemon(port = getDaemonPort(), preferredEntrypoint) {
294210
294252
  child.unref();
294211
294253
  const pid = child.pid ?? null;
294212
294254
  if (pid) {
294213
- writeFileSync2(PID_FILE, String(pid), "utf8");
294255
+ writeFileSync3(PID_FILE, String(pid), "utf8");
294214
294256
  registerProcessLease({
294215
294257
  leaseId,
294216
294258
  pid,
@@ -294268,18 +294310,18 @@ import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypt
294268
294310
  import {
294269
294311
  chmodSync,
294270
294312
  closeSync as closeSync2,
294271
- existsSync as existsSync5,
294272
- mkdirSync as mkdirSync4,
294313
+ existsSync as existsSync6,
294314
+ mkdirSync as mkdirSync5,
294273
294315
  openSync as openSync2,
294274
- readFileSync as readFileSync5,
294275
- renameSync as renameSync3,
294276
- statSync as statSync3,
294316
+ readFileSync as readFileSync6,
294317
+ renameSync as renameSync4,
294318
+ statSync as statSync4,
294277
294319
  unlinkSync as unlinkSync2,
294278
- writeFileSync as writeFileSync3,
294320
+ writeFileSync as writeFileSync4,
294279
294321
  writeSync as writeSync2
294280
294322
  } from "node:fs";
294281
- import { homedir as homedir15 } from "node:os";
294282
- import { dirname as dirname9, join as join15 } from "node:path";
294323
+ import { homedir as homedir14 } from "node:os";
294324
+ import { dirname as dirname8, join as join15 } from "node:path";
294283
294325
 
294284
294326
  // packages/cli/src/service-version.ts
294285
294327
  var OmniusVersionError = class extends Error {
@@ -294335,7 +294377,7 @@ function compareOmniusVersions(left, right) {
294335
294377
  }
294336
294378
 
294337
294379
  // packages/cli/src/update-service.ts
294338
- function resolveUpdatePaths(env = process.env, platform2 = process.platform, home = homedir15()) {
294380
+ function resolveUpdatePaths(env = process.env, platform2 = process.platform, home = homedir14()) {
294339
294381
  const stateBase = platform2 === "win32" ? env["LOCALAPPDATA"] || join15(home, "AppData", "Local") : platform2 === "darwin" ? join15(home, "Library", "Application Support") : env["XDG_STATE_HOME"] || join15(home, ".local", "state");
294340
294382
  const cacheBase = platform2 === "win32" ? env["LOCALAPPDATA"] || join15(home, "AppData", "Local") : platform2 === "darwin" ? join15(home, "Library", "Caches") : env["XDG_CACHE_HOME"] || join15(home, ".cache");
294341
294383
  const stateDir = join15(stateBase, platform2 === "win32" ? "Omnius" : "omnius", "update");
@@ -294349,8 +294391,8 @@ function resolveUpdatePaths(env = process.env, platform2 = process.platform, hom
294349
294391
  };
294350
294392
  }
294351
294393
  function ensurePrivateDirectories(paths) {
294352
- mkdirSync4(paths.stateDir, { recursive: true, mode: 448 });
294353
- mkdirSync4(paths.cacheDir, { recursive: true, mode: 448 });
294394
+ mkdirSync5(paths.stateDir, { recursive: true, mode: 448 });
294395
+ mkdirSync5(paths.cacheDir, { recursive: true, mode: 448 });
294354
294396
  try {
294355
294397
  chmodSync(paths.stateDir, 448);
294356
294398
  } catch {
@@ -294363,27 +294405,27 @@ function ensurePrivateDirectories(paths) {
294363
294405
  function atomicPrivateJson(path, value) {
294364
294406
  const temp = `${path}.${process.pid}.${randomUUID2()}.tmp`;
294365
294407
  try {
294366
- writeFileSync3(temp, `${JSON.stringify(value, null, 2)}
294408
+ writeFileSync4(temp, `${JSON.stringify(value, null, 2)}
294367
294409
  `, {
294368
294410
  encoding: "utf8",
294369
294411
  mode: 384,
294370
294412
  flag: "wx"
294371
294413
  });
294372
- renameSync3(temp, path);
294414
+ renameSync4(temp, path);
294373
294415
  try {
294374
294416
  chmodSync(path, 384);
294375
294417
  } catch {
294376
294418
  }
294377
294419
  } finally {
294378
294420
  try {
294379
- if (existsSync5(temp)) unlinkSync2(temp);
294421
+ if (existsSync6(temp)) unlinkSync2(temp);
294380
294422
  } catch {
294381
294423
  }
294382
294424
  }
294383
294425
  }
294384
294426
  function readUpdateState(paths = resolveUpdatePaths()) {
294385
294427
  try {
294386
- return JSON.parse(readFileSync5(paths.stateFile, "utf8"));
294428
+ return JSON.parse(readFileSync6(paths.stateFile, "utf8"));
294387
294429
  } catch {
294388
294430
  return null;
294389
294431
  }
@@ -294408,7 +294450,7 @@ function adoptUpdateWorker(operationId, pid, paths = resolveUpdatePaths()) {
294408
294450
  function releaseUpdateLock(paths = resolveUpdatePaths(), operationId) {
294409
294451
  try {
294410
294452
  if (operationId) {
294411
- const lock = JSON.parse(readFileSync5(paths.lockFile, "utf8"));
294453
+ const lock = JSON.parse(readFileSync6(paths.lockFile, "utf8"));
294412
294454
  if (lock.operation_id !== operationId) return;
294413
294455
  }
294414
294456
  unlinkSync2(paths.lockFile);
@@ -294426,11 +294468,11 @@ function assertExactUpdateTarget(targetVersion, fromVersion) {
294426
294468
  return target;
294427
294469
  }
294428
294470
  function npmCandidates(execPath = process.execPath) {
294429
- const nodeDir = dirname9(execPath);
294471
+ const nodeDir = dirname8(execPath);
294430
294472
  return process.platform === "win32" ? [join15(nodeDir, "npm.cmd"), join15(nodeDir, "npm.exe"), "npm.cmd", "npm"] : [join15(nodeDir, "npm"), "/usr/local/bin/npm", "/usr/bin/npm", "npm"];
294431
294473
  }
294432
294474
  function runnableCommand(candidate) {
294433
- return candidate.includes("/") || candidate.includes("\\") ? existsSync5(candidate) : true;
294475
+ return candidate.includes("/") || candidate.includes("\\") ? existsSync6(candidate) : true;
294434
294476
  }
294435
294477
  function resolveNpmPath(execPath = process.execPath) {
294436
294478
  const candidate = npmCandidates(execPath).find(runnableCommand);
@@ -294463,14 +294505,14 @@ function inspectGlobalOmniusInstall(expectedVersion, options = {}) {
294463
294505
  throw new Error(`Could not resolve npm global prefix: ${prefixResult.stderr.trim() || "npm prefix -g failed"}`);
294464
294506
  }
294465
294507
  const npmPrefix = prefixResult.stdout.trim();
294466
- const packageJsonPath = globalPackageCandidates(npmPrefix).find(existsSync5);
294508
+ const packageJsonPath = globalPackageCandidates(npmPrefix).find(existsSync6);
294467
294509
  if (!packageJsonPath) throw new Error(`Global omnius package.json not found under ${npmPrefix}`);
294468
- const packageJsonRaw = readFileSync5(packageJsonPath, "utf8");
294510
+ const packageJsonRaw = readFileSync6(packageJsonPath, "utf8");
294469
294511
  const installedVersion = String(JSON.parse(packageJsonRaw)?.version ?? "");
294470
294512
  if (installedVersion !== expectedVersion) {
294471
294513
  throw new Error(`Global package verification failed: expected ${expectedVersion}, found ${installedVersion || "unknown"}`);
294472
294514
  }
294473
- const executablePath = globalExecutableCandidates(npmPrefix).find(existsSync5);
294515
+ const executablePath = globalExecutableCandidates(npmPrefix).find(existsSync6);
294474
294516
  if (!executablePath) throw new Error(`Global Omnius executable not found under ${npmPrefix}`);
294475
294517
  const versionResult = runSync(executablePath, ["--version"], { env: options.env, timeout: 1e4 });
294476
294518
  const executableVersion = commandVersion(`${versionResult.stdout}
@@ -294499,7 +294541,7 @@ function permissionRemediation(evidence) {
294499
294541
  return /EACCES|EPERM|permission denied/i.test(evidence) ? "The discovered npm global prefix is not writable. Configure a user-owned npm prefix or rerun the explicit update from a privileged terminal; Omnius never silently elevates." : void 0;
294500
294542
  }
294501
294543
  function installGlobalPackageStreaming(input) {
294502
- return new Promise((resolve12) => {
294544
+ return new Promise((resolve11) => {
294503
294545
  const stderrTail = [];
294504
294546
  let settled = false;
294505
294547
  let timedOut = false;
@@ -294507,7 +294549,7 @@ function installGlobalPackageStreaming(input) {
294507
294549
  if (settled) return;
294508
294550
  settled = true;
294509
294551
  clearTimeout(timer);
294510
- resolve12({ exitCode, ...error ? { error } : {} });
294552
+ resolve11({ exitCode, ...error ? { error } : {} });
294511
294553
  };
294512
294554
  const child = spawn2(
294513
294555
  input.npmPath,
@@ -294567,7 +294609,7 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
294567
294609
  const npmPath = resolveNpmPath();
294568
294610
  const env = {
294569
294611
  ...process.env,
294570
- PATH: [dirname9(process.execPath), process.env.PATH ?? ""].filter(Boolean).join(process.platform === "win32" ? ";" : ":"),
294612
+ PATH: [dirname8(process.execPath), process.env.PATH ?? ""].filter(Boolean).join(process.platform === "win32" ? ";" : ":"),
294571
294613
  NPM_CONFIG_CACHE: paths.cacheDir,
294572
294614
  npm_config_cache: paths.cacheDir,
294573
294615
  npm_config_prefer_online: "true",
@@ -294614,7 +294656,7 @@ async function runVerifiedUpdateTransaction(initial, dependencies, paths = resol
294614
294656
  if (daemon?.bootVersion === target && daemon.bootPackageHash === evidence.packageHash) {
294615
294657
  break;
294616
294658
  }
294617
- if (attempt < 3) await new Promise((resolve12) => setTimeout(resolve12, 1e3));
294659
+ if (attempt < 3) await new Promise((resolve11) => setTimeout(resolve11, 1e3));
294618
294660
  }
294619
294661
  if (!daemon || daemon.bootVersion !== target) {
294620
294662
  const observed = daemon?.bootVersion ?? "unreachable";
@@ -294681,18 +294723,18 @@ import { spawn as spawn3, spawnSync as spawnSync2 } from "node:child_process";
294681
294723
  import {
294682
294724
  closeSync as closeSync3,
294683
294725
  chmodSync as chmodSync2,
294684
- existsSync as existsSync6,
294685
- mkdirSync as mkdirSync5,
294726
+ existsSync as existsSync7,
294727
+ mkdirSync as mkdirSync6,
294686
294728
  openSync as openSync3,
294687
- readFileSync as readFileSync6,
294729
+ readFileSync as readFileSync7,
294688
294730
  realpathSync,
294689
- renameSync as renameSync4,
294731
+ renameSync as renameSync5,
294690
294732
  unlinkSync as unlinkSync3,
294691
- writeFileSync as writeFileSync4,
294733
+ writeFileSync as writeFileSync5,
294692
294734
  writeSync as writeSync3
294693
294735
  } from "node:fs";
294694
- import { homedir as homedir16, tmpdir as tmpdir8 } from "node:os";
294695
- import { basename as basename9, dirname as dirname10, join as join17 } from "node:path";
294736
+ import { homedir as homedir15, tmpdir as tmpdir7 } from "node:os";
294737
+ import { basename as basename8, dirname as dirname9, join as join17 } from "node:path";
294696
294738
 
294697
294739
  // packages/cli/src/updater.ts
294698
294740
  import { join as join16 } from "node:path";
@@ -294705,8 +294747,8 @@ var DEFAULT_ENDPOINT = "http://127.0.0.1:11435";
294705
294747
  function uidSuffix() {
294706
294748
  return typeof process.getuid === "function" ? String(process.getuid()) : "user";
294707
294749
  }
294708
- function resolveTrayPaths(env = process.env, platform2 = process.platform, home = homedir16()) {
294709
- const runtimeBase = env["XDG_RUNTIME_DIR"] || join17(tmpdir8(), `omnius-${uidSuffix()}`);
294750
+ function resolveTrayPaths(env = process.env, platform2 = process.platform, home = homedir15()) {
294751
+ const runtimeBase = env["XDG_RUNTIME_DIR"] || join17(tmpdir7(), `omnius-${uidSuffix()}`);
294710
294752
  const stateBase = platform2 === "win32" ? env["LOCALAPPDATA"] || join17(home, "AppData", "Local") : env["XDG_STATE_HOME"] || join17(home, ".local", "state");
294711
294753
  const configBase = platform2 === "win32" ? env["APPDATA"] || join17(home, "AppData", "Roaming") : env["XDG_CONFIG_HOME"] || join17(home, ".config");
294712
294754
  const runtimeDir = join17(runtimeBase, "omnius");
@@ -294792,7 +294834,7 @@ function isProcessAlive2(pid) {
294792
294834
  }
294793
294835
  function readPid(path) {
294794
294836
  try {
294795
- const pid = Number(readFileSync6(path, "utf8").trim());
294837
+ const pid = Number(readFileSync7(path, "utf8").trim());
294796
294838
  return Number.isInteger(pid) && pid > 0 ? pid : null;
294797
294839
  } catch {
294798
294840
  return null;
@@ -294800,7 +294842,7 @@ function readPid(path) {
294800
294842
  }
294801
294843
  function readProcessState(path) {
294802
294844
  try {
294803
- return JSON.parse(readFileSync6(path, "utf8"));
294845
+ return JSON.parse(readFileSync7(path, "utf8"));
294804
294846
  } catch {
294805
294847
  return null;
294806
294848
  }
@@ -294808,7 +294850,7 @@ function readProcessState(path) {
294808
294850
  function processCommandLine(pid) {
294809
294851
  try {
294810
294852
  if (process.platform === "linux") {
294811
- return readFileSync6(`/proc/${pid}/cmdline`, "utf8").replace(/\0/g, " ");
294853
+ return readFileSync7(`/proc/${pid}/cmdline`, "utf8").replace(/\0/g, " ");
294812
294854
  }
294813
294855
  if (process.platform !== "win32") {
294814
294856
  return spawnSync2("ps", ["-p", String(pid), "-o", "command="], {
@@ -294850,7 +294892,7 @@ async function getTrayStatus(explicitEndpoint) {
294850
294892
  // requested endpoint. This previously kept resurrecting an obsolete
294851
294893
  // custom port (for example 11535) after the daemon had returned to 11435.
294852
294894
  endpoint: running || !explicitEndpoint ? state?.endpoint || requestedEndpoint : requestedEndpoint,
294853
- registered: existsSync6(paths.autostartFile),
294895
+ registered: existsSync7(paths.autostartFile),
294854
294896
  registrationFile: paths.autostartFile,
294855
294897
  ...state?.health ? { health: state.health } : {},
294856
294898
  supported: support.supported,
@@ -294893,7 +294935,7 @@ async function stopTray() {
294893
294935
  }
294894
294936
  return true;
294895
294937
  }
294896
- await new Promise((resolve12) => setTimeout(resolve12, 100));
294938
+ await new Promise((resolve11) => setTimeout(resolve11, 100));
294897
294939
  }
294898
294940
  if (!trayProcessCommandLooksOwned(processCommandLine(pid))) return false;
294899
294941
  try {
@@ -294912,7 +294954,7 @@ async function stopTray() {
294912
294954
  }
294913
294955
  return true;
294914
294956
  }
294915
- await new Promise((resolve12) => setTimeout(resolve12, 100));
294957
+ await new Promise((resolve11) => setTimeout(resolve11, 100));
294916
294958
  }
294917
294959
  return false;
294918
294960
  }
@@ -294936,7 +294978,7 @@ function pathsFromEnvironment() {
294936
294978
  }
294937
294979
  async function restartTrayWithInstalledExecutable(executable, endpoint) {
294938
294980
  await stopTray();
294939
- const launched = await new Promise((resolve12) => {
294981
+ const launched = await new Promise((resolve11) => {
294940
294982
  const child = spawn4(executable, ["tray", "start", "--endpoint", endpoint], {
294941
294983
  stdio: "ignore",
294942
294984
  windowsHide: true
@@ -294947,22 +294989,22 @@ async function restartTrayWithInstalledExecutable(executable, endpoint) {
294947
294989
  } catch {
294948
294990
  }
294949
294991
  ;
294950
- resolve12(false);
294992
+ resolve11(false);
294951
294993
  }, 15e3);
294952
294994
  child.once("error", () => {
294953
294995
  clearTimeout(timer);
294954
- resolve12(false);
294996
+ resolve11(false);
294955
294997
  });
294956
294998
  child.once("close", (code) => {
294957
294999
  clearTimeout(timer);
294958
- resolve12(code === 0);
295000
+ resolve11(code === 0);
294959
295001
  });
294960
295002
  });
294961
295003
  if (!launched) return false;
294962
295004
  for (let attempt = 0; attempt < 30; attempt++) {
294963
295005
  const status = await getTrayStatus(endpoint);
294964
295006
  if (status.running && status.ready && status.endpoint === endpoint) return true;
294965
- await new Promise((resolve12) => setTimeout(resolve12, 250));
295007
+ await new Promise((resolve11) => setTimeout(resolve11, 250));
294966
295008
  }
294967
295009
  return false;
294968
295010
  }