omnius 1.0.565 → 1.0.567

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -55754,10 +55754,10 @@ var init_parser = __esm({
55754
55754
  * the separator character will only be read on index > 0 (see
55755
55755
  * readIPv4Addr for an example)
55756
55756
  */
55757
- readSeparator(sep10, index, inner) {
55757
+ readSeparator(sep11, index, inner) {
55758
55758
  return this.readAtomically(() => {
55759
55759
  if (index > 0) {
55760
- if (this.readGivenChar(sep10) === void 0) {
55760
+ if (this.readGivenChar(sep11) === void 0) {
55761
55761
  return void 0;
55762
55762
  }
55763
55763
  }
@@ -115474,8 +115474,8 @@ var require_follow_redirects = __commonJS({
115474
115474
  }
115475
115475
  return parsed;
115476
115476
  }
115477
- function resolveUrl(relative23, base3) {
115478
- return useNativeURL ? new URL3(relative23, base3) : parseUrl(url.resolve(base3, relative23));
115477
+ function resolveUrl(relative24, base3) {
115478
+ return useNativeURL ? new URL3(relative24, base3) : parseUrl(url.resolve(base3, relative24));
115479
115479
  }
115480
115480
  function validateUrl(input) {
115481
115481
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -274249,15 +274249,15 @@ var require_pattern = __commonJS({
274249
274249
  exports.removeDuplicateSlashes = removeDuplicateSlashes;
274250
274250
  function partitionAbsoluteAndRelative(patterns) {
274251
274251
  const absolute = [];
274252
- const relative23 = [];
274252
+ const relative24 = [];
274253
274253
  for (const pattern of patterns) {
274254
274254
  if (isAbsolute18(pattern)) {
274255
274255
  absolute.push(pattern);
274256
274256
  } else {
274257
- relative23.push(pattern);
274257
+ relative24.push(pattern);
274258
274258
  }
274259
274259
  }
274260
- return [absolute, relative23];
274260
+ return [absolute, relative24];
274261
274261
  }
274262
274262
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
274263
274263
  function isAbsolute18(pattern) {
@@ -295165,8 +295165,8 @@ function formatLocalDateTime(date) {
295165
295165
  timeZoneName: "short"
295166
295166
  }).format(date);
295167
295167
  }
295168
- function withAbsoluteDue(relative23, target) {
295169
- return `${relative23} (${formatLocalDateTime(target)})`;
295168
+ function withAbsoluteDue(relative24, target) {
295169
+ return `${relative24} (${formatLocalDateTime(target)})`;
295170
295170
  }
295171
295171
  function parseRelativeDueTime(input, now2) {
295172
295172
  const lower = input.toLowerCase().trim().replace(/[.!?]+$/g, "").replace(/\s+/g, " ");
@@ -295191,11 +295191,11 @@ function parseRelativeDueTime(input, now2) {
295191
295191
  function parseDueTime(due) {
295192
295192
  const lower = due.toLowerCase().trim();
295193
295193
  const now2 = /* @__PURE__ */ new Date();
295194
- const relative23 = parseRelativeDueTime(lower, now2);
295195
- if (relative23) {
295194
+ const relative24 = parseRelativeDueTime(lower, now2);
295195
+ if (relative24) {
295196
295196
  return {
295197
- isoDate: relative23.target.toISOString(),
295198
- description: withAbsoluteDue(relative23.description, relative23.target)
295197
+ isoDate: relative24.target.toISOString(),
295198
+ description: withAbsoluteDue(relative24.description, relative24.target)
295199
295199
  };
295200
295200
  }
295201
295201
  if (lower === "tomorrow") {
@@ -300559,6 +300559,103 @@ function coerceStringList(value2) {
300559
300559
  const out = value2.filter((item) => typeof item === "string" && item.trim().length > 0).map((item) => item.trim());
300560
300560
  return out.length > 0 ? Array.from(new Set(out)) : void 0;
300561
300561
  }
300562
+ function normalizeDeclaredVerifyCommand(value2) {
300563
+ if (typeof value2 !== "string")
300564
+ return {};
300565
+ if (!value2.trim())
300566
+ return { command: "" };
300567
+ if (/[\r\n]/.test(value2)) {
300568
+ return { error: "must be one shell command, without line breaks" };
300569
+ }
300570
+ let command = value2.trim();
300571
+ let repairNote;
300572
+ const inlineCode = /^`([^`]+)`$/.exec(command);
300573
+ if (inlineCode) {
300574
+ command = inlineCode[1].trim();
300575
+ repairNote = "removed Markdown backticks around verifyCommand";
300576
+ }
300577
+ if (looksLikeVerifierResultProse(command)) {
300578
+ return {
300579
+ error: "must be the executable command only, not a claimed result (for example use `pio run -e esp32`, not `pio run -e esp32 -> SUCCESS`)"
300580
+ };
300581
+ }
300582
+ const fallback = stripTopLevelFallback(command);
300583
+ if (fallback.removed) {
300584
+ command = fallback.command;
300585
+ repairNote = "removed a `||` fallback from verifyCommand so its exit status remains meaningful";
300586
+ }
300587
+ if (!command) {
300588
+ return { error: "must include an executable command before any fallback" };
300589
+ }
300590
+ const unsafeSyntax = unsupportedVerifierShellSyntax(command);
300591
+ if (unsafeSyntax) {
300592
+ return { error: unsafeSyntax };
300593
+ }
300594
+ return { command, repairNote };
300595
+ }
300596
+ function looksLikeVerifierResultProse(command) {
300597
+ const result = "(?:success(?:ful(?:ly)?)?|succeed(?:ed|s)?|pass(?:ed)?|ok|done|fail(?:ed|ure)?|error)";
300598
+ const trailingResult = new RegExp(String.raw`(?:\s*(?:->|=>|→|⇒|—)\s*|\s*:\s*|\s+\(|\s+\[)${result}(?:\)|\])?\s*$`, "i");
300599
+ if (trailingResult.test(command))
300600
+ return true;
300601
+ const inlineResult = new RegExp(String.raw`(?:->|=>|→|⇒|—)\s*${result}\b|\b${result}\b\s+(?:on|for|in|with)\b`, "i");
300602
+ if (inlineResult.test(command))
300603
+ return true;
300604
+ if (/\s+\((?:compiles?|compiled|builds?|built|passes?|passed|works?|working|succeeds?|succeeded|success(?:fully)?)\b[^)]*\)\s*$/i.test(command)) {
300605
+ return true;
300606
+ }
300607
+ if (/^(?:verify(?:\s+command)?|verification|command|result|status)\s*[:=-]/i.test(command)) {
300608
+ return true;
300609
+ }
300610
+ return /^(?:the\s+)?(?:build|tests?|verification)\s+(?:has\s+)?(?:passed|succeeded|failed|is\s+successful)\b/i.test(command);
300611
+ }
300612
+ function stripTopLevelFallback(command) {
300613
+ let quote2 = null;
300614
+ for (let index = 0; index < command.length - 1; index++) {
300615
+ const ch = command[index];
300616
+ if (quote2) {
300617
+ if (ch === quote2 && command[index - 1] !== "\\")
300618
+ quote2 = null;
300619
+ continue;
300620
+ }
300621
+ if (ch === "'" || ch === '"') {
300622
+ quote2 = ch;
300623
+ continue;
300624
+ }
300625
+ if (ch === "|" && command[index + 1] === "|") {
300626
+ return { command: command.slice(0, index).trim(), removed: true };
300627
+ }
300628
+ }
300629
+ return { command, removed: false };
300630
+ }
300631
+ function unsupportedVerifierShellSyntax(command) {
300632
+ let quote2 = null;
300633
+ for (let index = 0; index < command.length; index++) {
300634
+ const ch = command[index];
300635
+ if (quote2) {
300636
+ if (ch === quote2 && command[index - 1] !== "\\")
300637
+ quote2 = null;
300638
+ continue;
300639
+ }
300640
+ if (ch === "'" || ch === '"') {
300641
+ quote2 = ch;
300642
+ continue;
300643
+ }
300644
+ if (ch === "|") {
300645
+ return "must not use a pipeline; its final status may hide a failed verifier";
300646
+ }
300647
+ if (ch === ";") {
300648
+ return "must not chain commands with `;`; use a single command or a failure-preserving `&&` suffix";
300649
+ }
300650
+ if (ch === "&" && command[index + 1] !== "&" && command[index - 1] !== "&" && !isFileDescriptorRedirectionAmpersand(command, index)) {
300651
+ return "must not background the verifier";
300652
+ }
300653
+ }
300654
+ return null;
300655
+ }
300656
+ function isFileDescriptorRedirectionAmpersand(command, index) {
300657
+ return command[index - 1] === ">" && /[0-9-]/.test(command[index + 1] ?? "");
300658
+ }
300562
300659
  function todoChildrenByParent(todos) {
300563
300660
  const ids = new Set(todos.map((todo) => todo.id).filter((id2) => typeof id2 === "string" && id2.trim().length > 0));
300564
300661
  const byParent = /* @__PURE__ */ new Map();
@@ -300889,7 +300986,7 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
300889
300986
  },
300890
300987
  verifyCommand: {
300891
300988
  type: "string",
300892
- description: "REG-37: optional shell command that PROVES this todo is complete. When you mark this todo 'completed', the orchestrator checks recent shell history; if verifyCommand has not run successfully recently, you'll be prompted to run it before the completion is accepted. Use for any todo where 'done' has an objective check (e.g. 'tsc --noEmit' for typecheck-pass, 'test -d dist' for build-output-present, 'pytest tests/x.py' for tests-pass). Generic across stacks."
300989
+ description: "REG-37: optional executable shell command that PROVES this todo is complete. Enter only the command (e.g. 'tsc --noEmit', 'test -d dist', 'pytest tests/x.py') — never result prose such as 'pio run -> SUCCESS'. When you mark this todo 'completed', the orchestrator checks recent shell history; if this command has not run successfully recently, you'll be prompted to run it before completion is accepted. Pipelines and success-masking fallbacks are not valid verifier evidence."
300893
300990
  },
300894
300991
  declaredArtifacts: {
300895
300992
  type: "array",
@@ -300971,6 +301068,18 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
300971
301068
  durationMs: performance.now() - start2
300972
301069
  };
300973
301070
  }
301071
+ const declaredVerifier = normalizeDeclaredVerifyCommand(entry["verifyCommand"]);
301072
+ if (declaredVerifier.error) {
301073
+ return {
301074
+ success: false,
301075
+ output: "",
301076
+ error: `invalid verifyCommand for todo "${content.slice(0, 80)}": ` + declaredVerifier.error,
301077
+ durationMs: performance.now() - start2
301078
+ };
301079
+ }
301080
+ if (declaredVerifier.repairNote) {
301081
+ repairNotes.push(declaredVerifier.repairNote);
301082
+ }
300974
301083
  incoming.push({
300975
301084
  id: typeof entry["id"] === "string" ? entry["id"] : void 0,
300976
301085
  content,
@@ -300982,7 +301091,7 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
300982
301091
  blocks: coerceStringList(entry["blocks"]),
300983
301092
  blockedBy: coerceStringList(entry["blockedBy"] ?? entry["dependsOn"]),
300984
301093
  // REG-37: verification-aware planning
300985
- verifyCommand: typeof entry["verifyCommand"] === "string" ? entry["verifyCommand"] : void 0,
301094
+ verifyCommand: declaredVerifier.command,
300986
301095
  // REG-38: declared artifact list for supervisor inspection
300987
301096
  declaredArtifacts: Array.isArray(entry["declaredArtifacts"]) ? entry["declaredArtifacts"].filter((x) => typeof x === "string") : void 0
300988
301097
  });
@@ -301994,7 +302103,7 @@ var require_util9 = __commonJS({
301994
302103
  exports.isAbsolute = function(aPath) {
301995
302104
  return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
301996
302105
  };
301997
- function relative23(aRoot, aPath) {
302106
+ function relative24(aRoot, aPath) {
301998
302107
  if (aRoot === "") {
301999
302108
  aRoot = ".";
302000
302109
  }
@@ -302013,7 +302122,7 @@ var require_util9 = __commonJS({
302013
302122
  }
302014
302123
  return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
302015
302124
  }
302016
- exports.relative = relative23;
302125
+ exports.relative = relative24;
302017
302126
  var supportsNullProto = (function() {
302018
302127
  var obj = /* @__PURE__ */ Object.create(null);
302019
302128
  return !("__proto__" in obj);
@@ -313444,11 +313553,11 @@ ${lanes.join("\n")}
313444
313553
  return toComponents2;
313445
313554
  }
313446
313555
  const components = toComponents2.slice(start2);
313447
- const relative23 = [];
313556
+ const relative24 = [];
313448
313557
  for (; start2 < fromComponents.length; start2++) {
313449
- relative23.push("..");
313558
+ relative24.push("..");
313450
313559
  }
313451
- return ["", ...relative23, ...components];
313560
+ return ["", ...relative24, ...components];
313452
313561
  }
313453
313562
  function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
313454
313563
  Debug.assert(getRootLength(fromDirectory) > 0 === getRootLength(to) > 0, "Paths must either both be absolute or both be relative");
@@ -352144,11 +352253,11 @@ ${lanes.join("\n")}
352144
352253
  if (i2 < rootLength) {
352145
352254
  return void 0;
352146
352255
  }
352147
- const sep10 = directory.lastIndexOf(directorySeparator, i2 - 1);
352148
- if (sep10 === -1) {
352256
+ const sep11 = directory.lastIndexOf(directorySeparator, i2 - 1);
352257
+ if (sep11 === -1) {
352149
352258
  return void 0;
352150
352259
  }
352151
- return directory.substr(0, Math.max(sep10, rootLength));
352260
+ return directory.substr(0, Math.max(sep11, rootLength));
352152
352261
  }
352153
352262
  }
352154
352263
  }
@@ -357991,9 +358100,9 @@ ${lanes.join("\n")}
357991
358100
  if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) {
357992
358101
  return;
357993
358102
  }
357994
- const relative23 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);
358103
+ const relative24 = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName);
357995
358104
  for (const symlinkDirectory of symlinkDirectories) {
357996
- const option = resolvePath5(symlinkDirectory, relative23);
358105
+ const option = resolvePath5(symlinkDirectory, relative24);
357997
358106
  const result2 = cb(option, target === referenceRedirect);
357998
358107
  shouldFilterIgnoredPaths = true;
357999
358108
  if (result2) return result2;
@@ -517516,7 +517625,7 @@ var require_path_browserify = __commonJS({
517516
517625
  }
517517
517626
  return res;
517518
517627
  }
517519
- function _format(sep10, pathObject) {
517628
+ function _format(sep11, pathObject) {
517520
517629
  var dir = pathObject.dir || pathObject.root;
517521
517630
  var base3 = pathObject.base || (pathObject.name || "") + (pathObject.ext || "");
517522
517631
  if (!dir) {
@@ -517525,7 +517634,7 @@ var require_path_browserify = __commonJS({
517525
517634
  if (dir === pathObject.root) {
517526
517635
  return dir + base3;
517527
517636
  }
517528
- return dir + sep10 + base3;
517637
+ return dir + sep11 + base3;
517529
517638
  }
517530
517639
  var posix = {
517531
517640
  // path.resolve([from ...], to)
@@ -517594,7 +517703,7 @@ var require_path_browserify = __commonJS({
517594
517703
  return ".";
517595
517704
  return posix.normalize(joined);
517596
517705
  },
517597
- relative: function relative23(from3, to) {
517706
+ relative: function relative24(from3, to) {
517598
517707
  assertPath(from3);
517599
517708
  assertPath(to);
517600
517709
  if (from3 === to) return "";
@@ -520424,12 +520533,12 @@ var require_dist3 = __commonJS({
520424
520533
  return patterns.length > 0 ? buildCrawler(options2, patterns) : [];
520425
520534
  }
520426
520535
  async function glob3(globInput, options2) {
520427
- const [crawler, relative23] = getCrawler(globInput, options2);
520428
- return crawler ? formatPaths(await crawler.withPromise(), relative23) : [];
520536
+ const [crawler, relative24] = getCrawler(globInput, options2);
520537
+ return crawler ? formatPaths(await crawler.withPromise(), relative24) : [];
520429
520538
  }
520430
520539
  function globSync(globInput, options2) {
520431
- const [crawler, relative23] = getCrawler(globInput, options2);
520432
- return crawler ? formatPaths(crawler.sync(), relative23) : [];
520540
+ const [crawler, relative24] = getCrawler(globInput, options2);
520541
+ return crawler ? formatPaths(crawler.sync(), relative24) : [];
520433
520542
  }
520434
520543
  exports.convertPathToPattern = convertPathToPattern;
520435
520544
  exports.escapePath = escapePath;
@@ -556485,10 +556594,10 @@ var init_transport5 = __esm({
556485
556594
  if (done)
556486
556595
  break;
556487
556596
  buf += decoder.decode(value2, { stream: true });
556488
- let sep10;
556489
- while ((sep10 = buf.indexOf("\n\n")) !== -1) {
556490
- const event = buf.slice(0, sep10);
556491
- buf = buf.slice(sep10 + 2);
556597
+ let sep11;
556598
+ while ((sep11 = buf.indexOf("\n\n")) !== -1) {
556599
+ const event = buf.slice(0, sep11);
556600
+ buf = buf.slice(sep11 + 2);
556492
556601
  const dataLines = [];
556493
556602
  for (const line of event.split("\n")) {
556494
556603
  if (line.startsWith("data:"))
@@ -568622,6 +568731,96 @@ function normalizeShellCommand(command) {
568622
568731
  function splitConjunctiveVerifyCommand(command) {
568623
568732
  return normalizeShellCommand(command).split(/\s+&&\s+/).map((part) => part.trim()).filter(Boolean);
568624
568733
  }
568734
+ function splitTopLevelAnd(command) {
568735
+ const parts = [];
568736
+ let current = "";
568737
+ let quote2 = null;
568738
+ for (let i2 = 0; i2 < command.length; i2++) {
568739
+ const ch = command[i2];
568740
+ if (quote2) {
568741
+ current += ch;
568742
+ if (ch === quote2 && command[i2 - 1] !== "\\")
568743
+ quote2 = null;
568744
+ continue;
568745
+ }
568746
+ if (ch === "'" || ch === '"') {
568747
+ quote2 = ch;
568748
+ current += ch;
568749
+ continue;
568750
+ }
568751
+ if (ch === "&" && command[i2 + 1] === "&") {
568752
+ parts.push(current.trim());
568753
+ current = "";
568754
+ i2++;
568755
+ continue;
568756
+ }
568757
+ current += ch;
568758
+ }
568759
+ parts.push(current.trim());
568760
+ return parts.filter(Boolean);
568761
+ }
568762
+ function hasUnsafeVerifierShellSyntax(command) {
568763
+ let quote2 = null;
568764
+ for (let i2 = 0; i2 < command.length; i2++) {
568765
+ const ch = command[i2];
568766
+ if (quote2) {
568767
+ if (ch === quote2 && command[i2 - 1] !== "\\")
568768
+ quote2 = null;
568769
+ continue;
568770
+ }
568771
+ if (ch === "'" || ch === '"') {
568772
+ quote2 = ch;
568773
+ continue;
568774
+ }
568775
+ if (ch === "`" || ch === "$" && command[i2 + 1] === "(") {
568776
+ return true;
568777
+ }
568778
+ if (ch === "|" || ch === ";" || ch === "\n" || ch === "\r") {
568779
+ return true;
568780
+ }
568781
+ if (ch === "&" && command[i2 + 1] !== "&" && command[i2 - 1] !== "&" && !isFileDescriptorRedirectionAmpersand2(command, i2)) {
568782
+ return true;
568783
+ }
568784
+ }
568785
+ return false;
568786
+ }
568787
+ function isFileDescriptorRedirectionAmpersand2(command, index) {
568788
+ return command[index - 1] === ">" && /[0-9-]/.test(command[index + 1] ?? "");
568789
+ }
568790
+ function isExecutableVerifyCommand(command) {
568791
+ const source = stripVerifierFallbackSuffix(command);
568792
+ const normalized = normalizeShellCommand(source);
568793
+ if (!normalized || hasUnsafeVerifierShellSyntax(normalized))
568794
+ return false;
568795
+ return !looksLikeVerifierResultProse2(normalized);
568796
+ }
568797
+ function looksLikeVerifierResultProse2(command) {
568798
+ const result = "(?:success(?:ful(?:ly)?)?|succeed(?:ed|s)?|pass(?:ed)?|ok|done|fail(?:ed|ure)?|error)";
568799
+ const trailingResult = new RegExp(String.raw`(?:\s*(?:->|=>|→|⇒|—)\s*|\s*:\s*|\s+\(|\s+\[)${result}(?:\)|\])?\s*$`, "i");
568800
+ if (trailingResult.test(command))
568801
+ return true;
568802
+ const inlineResult = new RegExp(String.raw`(?:->|=>|→|⇒|—)\s*${result}\b|\b${result}\b\s+(?:on|for|in|with)\b`, "i");
568803
+ if (inlineResult.test(command))
568804
+ return true;
568805
+ if (/\s+\((?:compiles?|compiled|builds?|built|passes?|passed|works?|working|succeeds?|succeeded|success(?:fully)?)\b[^)]*\)\s*$/i.test(command)) {
568806
+ return true;
568807
+ }
568808
+ if (/^(?:file_(?:edit|write)|todo_write|task_complete)\b/i.test(command)) {
568809
+ return true;
568810
+ }
568811
+ return /^(?:the\s+)?(?:build|tests?|verification)\s+(?:has\s+)?(?:passed|succeeded|failed|is\s+successful)\b/i.test(command);
568812
+ }
568813
+ function isDirectoryChangeCommand(command) {
568814
+ return /^cd(?:\s+--)?\s+(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[^\s;&|]+)\s*$/.test(command);
568815
+ }
568816
+ function stripSafeLeadingDirectoryChanges(command) {
568817
+ const parts = splitTopLevelAnd(command);
568818
+ let firstVerifierPart = 0;
568819
+ while (firstVerifierPart < parts.length - 1 && isDirectoryChangeCommand(parts[firstVerifierPart])) {
568820
+ firstVerifierPart++;
568821
+ }
568822
+ return firstVerifierPart === 0 ? command : parts.slice(firstVerifierPart).join(" && ");
568823
+ }
568625
568824
  function stripVerifierFallbackSuffix(command) {
568626
568825
  let quote2 = null;
568627
568826
  for (let i2 = 0; i2 < command.length - 1; i2++) {
@@ -568715,13 +568914,24 @@ function commandIsPureReadOnlyPipeline(command) {
568715
568914
  });
568716
568915
  }
568717
568916
  function commandReliablySatisfiesVerifyCommand(observedCommand, verifyCommand) {
568917
+ if (/[\r\n]/.test(observedCommand))
568918
+ return false;
568718
568919
  const observed = normalizeShellCommand(observedCommand);
568719
- const expected = normalizeShellCommand(stripVerifierFallbackSuffix(verifyCommand));
568920
+ if (hasUnsafeVerifierShellSyntax(observed))
568921
+ return false;
568922
+ const expectedSource = stripVerifierFallbackSuffix(verifyCommand);
568923
+ const expected = normalizeShellCommand(expectedSource);
568924
+ if (/[\r\n]/.test(expectedSource) || !isExecutableVerifyCommand(expectedSource)) {
568925
+ return false;
568926
+ }
568720
568927
  if (!observed || !expected)
568721
568928
  return false;
568722
568929
  if (observed === expected)
568723
568930
  return true;
568724
- if (observed.startsWith(`${expected} && `) && !observed.includes(" || ")) {
568931
+ const withoutLeadingCd = stripSafeLeadingDirectoryChanges(observed);
568932
+ if (withoutLeadingCd === expected)
568933
+ return true;
568934
+ if (withoutLeadingCd.startsWith(`${expected} && `)) {
568725
568935
  return true;
568726
568936
  }
568727
568937
  return false;
@@ -571557,7 +571767,8 @@ var init_mast_tagger = __esm({
571557
571767
 
571558
571768
  // packages/orchestrator/dist/artifact-inspector.js
571559
571769
  import { existsSync as existsSync90, statSync as statSync33 } from "node:fs";
571560
- import { isAbsolute as isAbsolute11, resolve as resolve53 } from "node:path";
571770
+ import { isAbsolute as isAbsolute11, relative as relative10, resolve as resolve53, sep as sep5 } from "node:path";
571771
+ import { tmpdir as tmpdir21 } from "node:os";
571561
571772
  function extractCandidatePaths(content) {
571562
571773
  const out = /* @__PURE__ */ new Set();
571563
571774
  for (const m2 of content.matchAll(/(?<![\w/])((?:\/|\.\/|\.\.\/|src\/|tests?\/|lib\/|app\/|public\/|prisma\/|docs?\/|build\/|dist\/|out\/|target\/|bin\/)[\w./-]+\.[a-z0-9]{1,8})\b/gi)) {
@@ -571574,9 +571785,20 @@ function extractCandidatePaths(content) {
571574
571785
  function resolveAgainstWorkingDir(workingDir, p2) {
571575
571786
  return isAbsolute11(p2) ? p2 : resolve53(workingDir, p2);
571576
571787
  }
571788
+ function isPathInside(path16, parent) {
571789
+ const rel = relative10(parent, path16);
571790
+ return rel === "" || !rel.startsWith(`..${sep5}`) && rel !== ".." && !isAbsolute11(rel);
571791
+ }
571792
+ function isExternalSystemTempArtifact(workingDir, candidate) {
571793
+ const resolved = resolveAgainstWorkingDir(workingDir, candidate);
571794
+ const workspace = resolve53(workingDir);
571795
+ if (isPathInside(resolved, workspace))
571796
+ return false;
571797
+ return [resolve53(tmpdir21()), resolve53("/var/tmp")].some((tempRoot) => isPathInside(resolved, tempRoot));
571798
+ }
571577
571799
  function inspectClaimedArtifacts(input) {
571578
571800
  const staleTurnsMax = input.staleTurnsMax ?? 30;
571579
- const candidates = input.declaredArtifacts && input.declaredArtifacts.length > 0 ? [...input.declaredArtifacts] : extractCandidatePaths(input.todoContent);
571801
+ const candidates = (input.declaredArtifacts && input.declaredArtifacts.length > 0 ? [...input.declaredArtifacts] : extractCandidatePaths(input.todoContent)).filter((candidate) => !isExternalSystemTempArtifact(input.workingDir, candidate));
571580
571802
  const missing = [];
571581
571803
  const empty2 = [];
571582
571804
  const stale = [];
@@ -571602,7 +571824,7 @@ function inspectClaimedArtifacts(input) {
571602
571824
  stale.push(p2);
571603
571825
  }
571604
571826
  }
571605
- const ok3 = missing.length === 0 && empty2.length === 0 && stale.length === 0;
571827
+ const ok3 = missing.length === 0 && empty2.length === 0;
571606
571828
  const lines = [];
571607
571829
  if (!ok3) {
571608
571830
  lines.push(`[ARTIFACT INSPECTION FAILED — REG-38]`);
@@ -571623,7 +571845,7 @@ function inspectClaimedArtifacts(input) {
571623
571845
  lines.push(` ... +${empty2.length - 5} more`);
571624
571846
  }
571625
571847
  if (stale.length > 0) {
571626
- lines.push(` • Stale: ${stale.length} path(s) exist but were last written ${staleTurnsMax}+ turns ago`);
571848
+ lines.push(` • Stale (advisory only): ${stale.length} path(s) were last written ${staleTurnsMax}+ turns ago`);
571627
571849
  for (const m2 of stale.slice(0, 5))
571628
571850
  lines.push(` - ${m2}`);
571629
571851
  if (stale.length > 5)
@@ -571870,7 +572092,7 @@ var init_intervention_replay = __esm({
571870
572092
 
571871
572093
  // packages/orchestrator/dist/world-state-disk-scan.js
571872
572094
  import { existsSync as existsSync93, readFileSync as readFileSync71, readdirSync as readdirSync30, statSync as statSync34 } from "node:fs";
571873
- import { join as join103, relative as relative10, basename as basename23 } from "node:path";
572095
+ import { join as join103, relative as relative11, basename as basename23 } from "node:path";
571874
572096
  function loadIgnoreFile(path16) {
571875
572097
  if (!existsSync93(path16))
571876
572098
  return [];
@@ -571961,7 +572183,7 @@ function scanWorkspace(opts) {
571961
572183
  const st = statSync34(dir);
571962
572184
  dirs.push({
571963
572185
  abs: dir,
571964
- rel: relative10(root, dir) || ".",
572186
+ rel: relative11(root, dir) || ".",
571965
572187
  mtimeMs: st.mtimeMs
571966
572188
  });
571967
572189
  } catch {
@@ -571977,7 +572199,7 @@ function scanWorkspace(opts) {
571977
572199
  const dirsToVisit = [];
571978
572200
  for (const entry of entries) {
571979
572201
  const abs = join103(dir, entry);
571980
- const rel = relative10(root, abs);
572202
+ const rel = relative11(root, abs);
571981
572203
  const base3 = basename23(abs);
571982
572204
  if (shouldIgnore(rel, base3, abs, patterns))
571983
572205
  continue;
@@ -573359,7 +573581,7 @@ var init_process_async2 = __esm({
573359
573581
 
573360
573582
  // packages/orchestrator/dist/backward-pass-runner.js
573361
573583
  import { existsSync as existsSync96, readFileSync as readFileSync73, statSync as statSync37 } from "node:fs";
573362
- import { isAbsolute as isAbsolute14, join as join106, relative as relative11 } from "node:path";
573584
+ import { isAbsolute as isAbsolute14, join as join106, relative as relative12 } from "node:path";
573363
573585
  function collectDiff(opts) {
573364
573586
  const cap = Math.max(1, opts.maxFiles);
573365
573587
  if (opts.explicitFiles && opts.explicitFiles.length > 0) {
@@ -573373,7 +573595,7 @@ function collectDiff(opts) {
573373
573595
  bytes = statSync37(abs).size;
573374
573596
  } catch {
573375
573597
  }
573376
- files.push({ path: relative11(opts.workingDir, abs), bytes, status: "modified" });
573598
+ files.push({ path: relative12(opts.workingDir, abs), bytes, status: "modified" });
573377
573599
  }
573378
573600
  return { files, strategy: "explicit" };
573379
573601
  }
@@ -578838,6 +579060,9 @@ function computeNoProgressCompletionGate(input) {
578838
579060
  const successfulDiscovery = input.toolCallLog.filter((call) => call.success === true && DISCOVERY_TOOLS.has(call.name));
578839
579061
  if (successfulDiscovery.length < 3)
578840
579062
  return { shouldInject: false };
579063
+ const hasReadEvidence = successfulDiscovery.some((call) => typeof call.outputPreview === "string" && call.outputPreview.trim().length > 0);
579064
+ if (hasReadEvidence)
579065
+ return { shouldInject: false };
578841
579066
  const summary = (input.summary ?? "").trim();
578842
579067
  if (summary.startsWith("BLOCKED:") || summary.startsWith("NO FILE CHANGES REQUIRED:")) {
578843
579068
  return { shouldInject: false };
@@ -580410,7 +580635,7 @@ ${body}
580410
580635
  // packages/orchestrator/dist/contentAddressedArtifactStore.js
580411
580636
  import { createHash as createHash32 } from "node:crypto";
580412
580637
  import { existsSync as existsSync102, mkdirSync as mkdirSync58, readFileSync as readFileSync78, readdirSync as readdirSync32, renameSync as renameSync10, statSync as statSync39, unlinkSync as unlinkSync17, writeFileSync as writeFileSync48 } from "node:fs";
580413
- import { join as join111, resolve as resolve55, sep as sep5 } from "node:path";
580638
+ import { join as join111, resolve as resolve55, sep as sep6 } from "node:path";
580414
580639
  function contentAddressedArtifactStoreRoot(cwd4 = process.cwd(), stateDir) {
580415
580640
  const stateRoot = stateDir?.trim() ? resolve55(stateDir) : join111(resolve55(cwd4), ".omnius");
580416
580641
  return join111(stateRoot, "artifact-store");
@@ -580541,7 +580766,7 @@ function sliceExactLines(content, requested, totalLines) {
580541
580766
  return content.slice(startOffset, endOffset);
580542
580767
  }
580543
580768
  function isWithinRoot(root, target) {
580544
- return target === root || target.startsWith(`${root}${sep5}`);
580769
+ return target === root || target.startsWith(`${root}${sep6}`);
580545
580770
  }
580546
580771
  function safeJoin(root, ...segments) {
580547
580772
  const target = resolve55(root, ...segments);
@@ -582410,7 +582635,7 @@ var init_memory_compiler = __esm({
582410
582635
  // packages/orchestrator/dist/debugArtifactLibrary.js
582411
582636
  import { appendFileSync as appendFileSync10, existsSync as existsSync104, mkdirSync as mkdirSync60, readFileSync as readFileSync80, statSync as statSync41, writeFileSync as writeFileSync50 } from "node:fs";
582412
582637
  import { createHash as createHash35 } from "node:crypto";
582413
- import { basename as basename24, join as join113, relative as relative12, resolve as resolve57 } from "node:path";
582638
+ import { basename as basename24, join as join113, relative as relative13, resolve as resolve57 } from "node:path";
582414
582639
  function debugArtifactRoot(cwd4 = process.cwd(), stateDir) {
582415
582640
  const envDir = process.env["OMNIUS_DEBUG_ARTIFACT_DIR"]?.trim();
582416
582641
  if (envDir)
@@ -582852,7 +583077,7 @@ function buildAnchors(cwd4, runId, paths, extra = []) {
582852
583077
  return {
582853
583078
  ...item,
582854
583079
  path: absolute,
582855
- relativePath: relative12(cwd4, absolute) || basename24(absolute),
583080
+ relativePath: relative13(cwd4, absolute) || basename24(absolute),
582856
583081
  exists: item.kind === "event" && item.label === "event_json" ? true : pathExists(absolute)
582857
583082
  };
582858
583083
  });
@@ -583183,7 +583408,7 @@ function writeGlobalReadme(paths, latestRun) {
583183
583408
  "This directory indexes run-level debugging artifacts and links back to raw Omnius state.",
583184
583409
  "",
583185
583410
  `Latest run: ${latestRun.runId}`,
583186
- `Contract: ${relative12(paths.root, paths.contractPath)}`,
583411
+ `Contract: ${relative13(paths.root, paths.contractPath)}`,
583187
583412
  "",
583188
583413
  "## Recent Runs",
583189
583414
  "",
@@ -587882,7 +588107,7 @@ var init_prompt_cache = __esm({
587882
588107
  // packages/orchestrator/dist/git-progress.js
587883
588108
  import { existsSync as existsSync105, readFileSync as readFileSync81, statSync as statSync42 } from "node:fs";
587884
588109
  import { createHash as createHash38 } from "node:crypto";
587885
- import { relative as relative13, resolve as resolve58, sep as sep6 } from "node:path";
588110
+ import { relative as relative14, resolve as resolve58, sep as sep7 } from "node:path";
587886
588111
  function isRunnerOwnedGitPath(path16) {
587887
588112
  const normalized = normalizeGitPath(path16);
587888
588113
  return RUNNER_OWNED_PREFIXES.some((prefix) => normalized.startsWith(prefix));
@@ -587987,8 +588212,8 @@ function normalizeMutatedPath(repoRoot, path16) {
587987
588212
  if (!normalized)
587988
588213
  return "";
587989
588214
  const absolute = resolve58(repoRoot, normalized);
587990
- let rel = relative13(repoRoot, absolute);
587991
- if (!rel || rel.startsWith("..") || rel === "." || rel.includes(`..${sep6}`)) {
588215
+ let rel = relative14(repoRoot, absolute);
588216
+ if (!rel || rel.startsWith("..") || rel === "." || rel.includes(`..${sep7}`)) {
587992
588217
  rel = normalized;
587993
588218
  }
587994
588219
  return normalizeGitPath(rel);
@@ -589920,6 +590145,43 @@ function isCompilerLikeVerifierCommand(command) {
589920
590145
  const normalized = command.toLowerCase();
589921
590146
  return /\b(?:pio|platformio|tsc|gcc|g\+\+|clang\+\+?|clang|cargo\s+(?:build|check)|go\s+(?:build|test)|javac|gradle|mvn|msbuild|dotnet\s+build|python(?:3)?\s+-m\s+(?:py_compile|compileall)|mypy|pyright)\b/.test(normalized);
589922
590147
  }
590148
+ function compilerVerifierFamily(command) {
590149
+ const normalized = stripShellQuotedSegments(command).toLowerCase();
590150
+ if (/\b(?:pio|platformio)\b/.test(normalized))
590151
+ return "platformio";
590152
+ if (/\btsc\b/.test(normalized))
590153
+ return "tsc";
590154
+ if (/\bg\+\+(?=\s|$)/.test(normalized))
590155
+ return "g++";
590156
+ if (/\bgcc\b/.test(normalized))
590157
+ return "gcc";
590158
+ if (/\bclang\+\+(?=\s|$)/.test(normalized))
590159
+ return "clang++";
590160
+ if (/\bclang\b/.test(normalized))
590161
+ return "clang";
590162
+ if (/\bcargo\s+(?:build|check)\b/.test(normalized))
590163
+ return "cargo";
590164
+ if (/\bgo\s+(?:build|test)\b/.test(normalized))
590165
+ return "go";
590166
+ if (/\bjavac\b/.test(normalized))
590167
+ return "javac";
590168
+ if (/\bgradle\b/.test(normalized))
590169
+ return "gradle";
590170
+ if (/\bmvn\b/.test(normalized))
590171
+ return "maven";
590172
+ if (/\bmsbuild\b/.test(normalized))
590173
+ return "msbuild";
590174
+ if (/\bdotnet\s+build\b/.test(normalized))
590175
+ return "dotnet";
590176
+ if (/\bpython(?:3)?\s+-m\s+(?:py_compile|compileall)\b/.test(normalized)) {
590177
+ return "python-compile";
590178
+ }
590179
+ if (/\bmypy\b/.test(normalized))
590180
+ return "mypy";
590181
+ if (/\bpyright\b/.test(normalized))
590182
+ return "pyright";
590183
+ return null;
590184
+ }
589923
590185
  function isRecoveryCriticalRuntimeOutcome(content) {
589924
590186
  return /\[(?:COMPILE ERROR FIX LOOP BLOCKED|EXPLORATION ADMISSION BLOCK|PARENT(?:\s+[^\]]*)?\s+BLOCK(?:ED)?|FOCUS SUPERVISOR BLOCK|STEERING RECONCILIATION REQUIRED|STALE EDIT LOOP BLOCKED|FULL FILE WRITE LOOP BLOCKED)\b/i.test(content);
589925
590187
  }
@@ -595004,6 +595266,8 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
595004
595266
  const verifyCommand = typeof todo.verifyCommand === "string" ? todo.verifyCommand.trim() : "";
595005
595267
  if (!verifyCommand)
595006
595268
  continue;
595269
+ if (!isExecutableVerifyCommand(verifyCommand))
595270
+ continue;
595007
595271
  const declaredArtifacts = Array.isArray(todo.declaredArtifacts) ? todo.declaredArtifacts.filter((p2) => typeof p2 === "string" && p2.trim().length > 0).map((p2) => this._normalizeEvidencePath(p2)) : [];
595008
595272
  let lastMutationTurn = -1;
595009
595273
  let lastMutationIndex = -1;
@@ -595050,7 +595314,7 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
595050
595314
  `Run the listed verifier command(s) now. If one fails, keep the todo in_progress or blocked and make one targeted fix before retrying.`
595051
595315
  ].join("\n");
595052
595316
  }
595053
- _declaredVerifierCommandForShell(command, output = "") {
595317
+ _declaredVerifierCommandForShell(command, output = "", success = false) {
595054
595318
  const trimmed = command.trim();
595055
595319
  if (!trimmed)
595056
595320
  return null;
@@ -595068,6 +595332,11 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
595068
595332
  if (this._declaredVerifierCommand && commandReliablySatisfiesVerifyCommand(trimmed, this._declaredVerifierCommand)) {
595069
595333
  return this._declaredVerifierCommand;
595070
595334
  }
595335
+ const activeCompileVerifier = this._compileFixLoop;
595336
+ if (success && this._isFreshCompatibleCompileVerifier(trimmed, activeCompileVerifier)) {
595337
+ const latched = stripVerifierFallbackSuffix(trimmed);
595338
+ return latched || trimmed;
595339
+ }
595071
595340
  const diagnostics = parseCompilerDiagnostics(output);
595072
595341
  if (diagnostics.length > 0 && isCompilerLikeVerifierCommand(trimmed) && !commandIsPureReadOnlyPipeline(trimmed)) {
595073
595342
  const latched = stripVerifierFallbackSuffix(trimmed);
@@ -595079,7 +595348,28 @@ Pick the SMALLEST concrete deliverable from the spec — typically the project e
595079
595348
  const state = this._compileFixLoop;
595080
595349
  if (!state?.active || state.verifierDirtySinceTurn === null)
595081
595350
  return false;
595082
- return commandReliablySatisfiesVerifyCommand(command.trim(), state.verifierCommand);
595351
+ const trimmed = command.trim();
595352
+ return commandReliablySatisfiesVerifyCommand(trimmed, state.verifierCommand) || this._isFreshCompatibleCompileVerifier(trimmed, state);
595353
+ }
595354
+ /**
595355
+ * A fresh successful rerun may be a simpler spelling of the build command
595356
+ * that originally failed (for example `cd firmware && pio run | tee log` →
595357
+ * `pio run -e esp32`). Permit that recovery only after a mutation and only
595358
+ * for the same compiler family; arbitrary successful tests remain unable to
595359
+ * discharge a compile-error card.
595360
+ */
595361
+ _isFreshCompatibleCompileVerifier(command, state = this._compileFixLoop) {
595362
+ if (!state?.active || state.verifierDirtySinceTurn === null)
595363
+ return false;
595364
+ if (commandIsPureReadOnlyPipeline(command))
595365
+ return false;
595366
+ if (!commandReliablySatisfiesVerifyCommand(command, command))
595367
+ return false;
595368
+ if (stripVerifierFallbackSuffix(command) !== command.trim())
595369
+ return false;
595370
+ const observedFamily = compilerVerifierFamily(command);
595371
+ const latchedFamily = compilerVerifierFamily(state.verifierCommand);
595372
+ return observedFamily !== null && observedFamily === latchedFamily;
595083
595373
  }
595084
595374
  /**
595085
595375
  * When a tool result was triaged for size (full payload saved to
@@ -595514,7 +595804,7 @@ ${extras.join("\n")}`;
595514
595804
  };
595515
595805
  if (toolName === "shell") {
595516
595806
  const command = String(args["command"] ?? args["cmd"] ?? "").trim();
595517
- if (commandReliablySatisfiesVerifyCommand(command, state.verifierCommand)) {
595807
+ if (commandReliablySatisfiesVerifyCommand(command, state.verifierCommand) || this._isFreshCompatibleCompileVerifier(command, state)) {
595518
595808
  if (state.verifierStasisBlocked) {
595519
595809
  return blocked("The same verifier action/result is in stasis. Change the owned source or obtain fresh prerequisite evidence before rerunning this unchanged verifier.");
595520
595810
  }
@@ -596482,16 +596772,25 @@ ${context2 ?? ""}`;
596482
596772
  if (/^\s*(BLOCKED|INCOMPLETE|NEEDS_INPUT)\b\s*:?/i.test(proposedSummary)) {
596483
596773
  return { proceed: true };
596484
596774
  }
596485
- const actionable = toolCallLog.some((e2) => e2.mutated || e2.name === "shell" || e2.name === "file_write" || e2.name === "file_edit");
596775
+ const actionable = toolCallLog.some((e2) => e2.success === true && (e2.mutated || e2.name === "shell" || e2.name === "file_write" || e2.name === "file_edit"));
596486
596776
  if (!actionable)
596487
596777
  return { proceed: true };
596488
596778
  const filesChanged = [...this._taskState.modifiedFiles.entries()].map(([p2, action]) => ` - ${action} ${p2}`).slice(0, 40);
596489
596779
  const shellLines = toolCallLog.filter((e2) => e2.name === "shell").slice(-12).map((e2) => ` - shell: ${e2.success ? "ok" : "FAIL"} — ${(e2.outputPreview || "").slice(0, 120)}`);
596780
+ const readOnlyEvidence = /* @__PURE__ */ new Map();
596781
+ for (const entry of toolCallLog) {
596782
+ if (entry.success === true && !entry.mutated && entry.name !== "shell" && entry.name !== "file_write" && entry.name !== "file_edit" && entry.name !== "task_complete" && entry.name !== "todo_write") {
596783
+ readOnlyEvidence.set(entry.name, (readOnlyEvidence.get(entry.name) ?? 0) + 1);
596784
+ }
596785
+ }
596786
+ const readOnlyLines = [...readOnlyEvidence.entries()].slice(0, 12).map(([name10, count]) => ` - ${name10}: ${count} successful result${count === 1 ? "" : "s"}`);
596490
596787
  const actionsDigest = [
596491
596788
  filesChanged.length ? `Files changed (${filesChanged.length}):
596492
596789
  ${filesChanged.join("\n")}` : "Files changed: none",
596493
596790
  shellLines.length ? `Recent commands:
596494
- ${shellLines.join("\n")}` : "Commands run: none"
596791
+ ${shellLines.join("\n")}` : "Commands run: none",
596792
+ readOnlyLines.length ? `Successful read-only evidence:
596793
+ ${readOnlyLines.join("\n")}` : "Successful read-only evidence: none"
596495
596794
  ].join("\n");
596496
596795
  const wf = this._worldFacts;
596497
596796
  const evidenceParts = [];
@@ -603260,7 +603559,10 @@ ${dynamicProjectContext}`
603260
603559
  const newFailures = [
603261
603560
  .../* @__PURE__ */ new Set([
603262
603561
  ...[...this._verifyFailures].filter((f2) => !this._verifyFailuresBaseline.has(f2)),
603263
- ...freshGapFailures
603562
+ // Keep the same task-start baseline rule for recomputed gaps. The
603563
+ // old form re-added every gap unconditionally, which let a restored
603564
+ // completed todo bypass the very stale-state exclusion above.
603565
+ ...freshGapFailures.filter((f2) => !this._verifyFailuresBaseline.has(f2))
603264
603566
  ])
603265
603567
  ];
603266
603568
  if (newFailures.length === 0)
@@ -607460,7 +607762,7 @@ ${cachedResult}`,
607460
607762
  if (_t.status !== "completed")
607461
607763
  continue;
607462
607764
  const _vc = _t.verifyCommand;
607463
- if (_vc && typeof _vc === "string" && !this._verifyHintInjectedThisTurn.has(_t.content)) {
607765
+ if (_vc && typeof _vc === "string" && isExecutableVerifyCommand(_vc) && !this._verifyHintInjectedThisTurn.has(_t.content)) {
607464
607766
  const _history = toolCallLog.slice(-15).filter((c9) => c9.name === "shell").map((c9) => ({
607465
607767
  command: this._shellCommandFromArgsKey(c9.argsKey),
607466
607768
  success: c9.success === true
@@ -608079,7 +608381,7 @@ ${structuralGuardGuidance}` : structuralGuardGuidance;
608079
608381
  if (tc.name === "shell" && result.runtimeAuthored !== true) {
608080
608382
  const shellCommand = String(tc.arguments?.["command"] ?? tc.arguments?.["cmd"] ?? "");
608081
608383
  const compileOutput = this._expandTriagedPayloadForDiagnostics([result.output, result.llmContent, result.error].filter((part) => typeof part === "string" && part.length > 0).join("\n"));
608082
- const verifierCommand = this._declaredVerifierCommandForShell(shellCommand, compileOutput);
608384
+ const verifierCommand = this._declaredVerifierCommandForShell(shellCommand, compileOutput, result.success === true);
608083
608385
  if (verifierCommand) {
608084
608386
  const compileGuidance = this._observeCompileVerifierResult({
608085
608387
  verifierCommand,
@@ -615425,9 +615727,9 @@ ${result}`
615425
615727
  try {
615426
615728
  const { writeFileSync: writeFileSync98, readFileSync: readFileSync145, unlinkSync: unlinkSync40 } = await import("node:fs");
615427
615729
  const { join: join191 } = await import("node:path");
615428
- const { tmpdir: tmpdir26 } = await import("node:os");
615429
- const tmpIn = join191(tmpdir26(), `omnius_img_in_${Date.now()}.png`);
615430
- const tmpOut = join191(tmpdir26(), `omnius_img_out_${Date.now()}.jpg`);
615730
+ const { tmpdir: tmpdir27 } = await import("node:os");
615731
+ const tmpIn = join191(tmpdir27(), `omnius_img_in_${Date.now()}.png`);
615732
+ const tmpOut = join191(tmpdir27(), `omnius_img_out_${Date.now()}.jpg`);
615431
615733
  writeFileSync98(tmpIn, buffer2);
615432
615734
  const pyBin = process.platform === "win32" ? "python" : "python3";
615433
615735
  const resizeScript = [
@@ -617160,7 +617462,7 @@ var init_constraint_learner = __esm({
617160
617462
  import { existsSync as existsSync108, statSync as statSync45, openSync, readSync, closeSync, unlinkSync as unlinkSync19, writeFileSync as writeFileSync51 } from "node:fs";
617161
617463
  import { watch as fsWatch } from "node:fs";
617162
617464
  import { join as join116 } from "node:path";
617163
- import { tmpdir as tmpdir21 } from "node:os";
617465
+ import { tmpdir as tmpdir22 } from "node:os";
617164
617466
  import { randomBytes as randomBytes21 } from "node:crypto";
617165
617467
  var NexusAgenticBackend;
617166
617468
  var init_nexusBackend = __esm({
@@ -617339,7 +617641,7 @@ var init_nexusBackend = __esm({
617339
617641
  * Falls back to unary + word-split if streaming setup fails.
617340
617642
  */
617341
617643
  async *chatCompletionStream(request) {
617342
- const streamFile = join116(tmpdir21(), `nexus-stream-${randomBytes21(6).toString("hex")}.jsonl`);
617644
+ const streamFile = join116(tmpdir22(), `nexus-stream-${randomBytes21(6).toString("hex")}.jsonl`);
617343
617645
  writeFileSync51(streamFile, "", "utf8");
617344
617646
  const effectiveThink = this.effectiveThink(request);
617345
617647
  const daemonArgs = {
@@ -622460,7 +622762,7 @@ var init_missionSystem = __esm({
622460
622762
  // packages/orchestrator/dist/context-references.js
622461
622763
  import { readFileSync as readFileSync90, readdirSync as readdirSync36, statSync as statSync46 } from "node:fs";
622462
622764
  import { homedir as homedir38 } from "node:os";
622463
- import { join as join124, resolve as resolve59, relative as relative14, sep as sep7, extname as extname13 } from "node:path";
622765
+ import { join as join124, resolve as resolve59, relative as relative15, sep as sep8, extname as extname13 } from "node:path";
622464
622766
  function estimateTokens8(text2) {
622465
622767
  return Math.ceil(text2.length / CHARS_PER_TOKEN);
622466
622768
  }
@@ -622498,7 +622800,7 @@ function resolvePath4(cwd4, target, allowedRoot) {
622498
622800
  const resolved = resolve59(expanded);
622499
622801
  if (allowedRoot) {
622500
622802
  const allowed = resolve59(allowedRoot);
622501
- if (!resolved.startsWith(allowed + sep7) && resolved !== allowed) {
622803
+ if (!resolved.startsWith(allowed + sep8) && resolved !== allowed) {
622502
622804
  throw new Error("path is outside the allowed workspace");
622503
622805
  }
622504
622806
  }
@@ -622514,7 +622816,7 @@ function ensureReferencePathAllowed(filePath) {
622514
622816
  }
622515
622817
  for (const dir of SENSITIVE_HOME_DIRS) {
622516
622818
  const blockedDir = resolve59(join124(home, dir));
622517
- if (filePath.startsWith(blockedDir + sep7) || filePath === blockedDir) {
622819
+ if (filePath.startsWith(blockedDir + sep8) || filePath === blockedDir) {
622518
622820
  throw new Error("path is a sensitive credential or internal path and cannot be attached");
622519
622821
  }
622520
622822
  }
@@ -622586,7 +622888,7 @@ function codeFenceLanguage(filePath) {
622586
622888
  }
622587
622889
  function buildFolderListing(dirPath, cwd4, limit = 200) {
622588
622890
  const lines = [];
622589
- const cwdRel = relative14(cwd4, dirPath) || ".";
622891
+ const cwdRel = relative15(cwd4, dirPath) || ".";
622590
622892
  lines.push(`${cwdRel}/`);
622591
622893
  let count = 0;
622592
622894
  const walkDir = (current, depth) => {
@@ -628040,7 +628342,7 @@ var init_live_resource_arbiter = __esm({
628040
628342
  // packages/cli/src/tui/live-sensors.ts
628041
628343
  import { existsSync as existsSync119, mkdirSync as mkdirSync72, readFileSync as readFileSync96, writeFileSync as writeFileSync60 } from "node:fs";
628042
628344
  import { arch as arch3, freemem as freemem5 } from "node:os";
628043
- import { basename as basename25, join as join130, relative as relative15 } from "node:path";
628345
+ import { basename as basename25, join as join130, relative as relative16 } from "node:path";
628044
628346
  function liveDir(repoRoot) {
628045
628347
  return join130(repoRoot, ".omnius", "live");
628046
628348
  }
@@ -630680,7 +630982,7 @@ var init_live_sensors = __esm({
630680
630982
  const rotation = orientation?.rotation ?? 0;
630681
630983
  const streamFrame = this.cameraStreamers?.latestFrame(source);
630682
630984
  if (streamFrame && Date.now() - streamFrame.mtimeMs < 3e3) {
630683
- const displayPath2 = relative15(this.repoRoot, streamFrame.path).startsWith("..") ? streamFrame.path : relative15(this.repoRoot, streamFrame.path);
630985
+ const displayPath2 = relative16(this.repoRoot, streamFrame.path).startsWith("..") ? streamFrame.path : relative16(this.repoRoot, streamFrame.path);
630684
630986
  const previewWidth2 = Math.max(42, Math.min(120, Math.floor(Number(options2.previewWidth ?? (process.stdout.columns || 100) - 14))));
630685
630987
  const preview2 = await buildImageAsciiPreview(streamFrame.path, { width: previewWidth2 });
630686
630988
  if (!this.isVideoWorkCurrent(generation)) return { ok: false, message: "Video context is disabled." };
@@ -630771,7 +631073,7 @@ var init_live_sensors = __esm({
630771
631073
  }
630772
631074
  const framePath = extractSavedImagePath(result.output, this.repoRoot);
630773
631075
  if (!framePath) return { ok: false, message: "Camera capture succeeded but no saved image path was returned." };
630774
- const displayPath = relative15(this.repoRoot, framePath).startsWith("..") ? framePath : relative15(this.repoRoot, framePath);
631076
+ const displayPath = relative16(this.repoRoot, framePath).startsWith("..") ? framePath : relative16(this.repoRoot, framePath);
630775
631077
  const previewWidth = Math.max(42, Math.min(120, Math.floor(Number(options2.previewWidth ?? (process.stdout.columns || 100) - 14))));
630776
631078
  const preview = await buildImageAsciiPreview(framePath, { width: previewWidth });
630777
631079
  if (!this.isVideoWorkCurrent(generation)) return { ok: false, message: "Video context is disabled." };
@@ -631388,7 +631690,7 @@ ${analysis}` : ""
631388
631690
  this.lastStreamFrameMtime.set(source, frame.mtimeMs);
631389
631691
  const observedAt = Date.now();
631390
631692
  const orientation = this.getCameraOrientation(source);
631391
- const displayPath = relative15(this.repoRoot, frame.path).startsWith("..") ? frame.path : relative15(this.repoRoot, frame.path);
631693
+ const displayPath = relative16(this.repoRoot, frame.path).startsWith("..") ? frame.path : relative16(this.repoRoot, frame.path);
631392
631694
  const existing = this.snapshot.cameras?.[source] ?? { updatedAt: observedAt, source };
631393
631695
  const camera = {
631394
631696
  ...existing,
@@ -632173,9 +632475,9 @@ var init_tool_adapter = __esm({
632173
632475
 
632174
632476
  // packages/cli/src/tui/runtime-verification.ts
632175
632477
  import { existsSync as existsSync120, readFileSync as readFileSync97, readdirSync as readdirSync38 } from "node:fs";
632176
- import { dirname as dirname38, extname as extname14, join as join131, relative as relative16, resolve as resolve61 } from "node:path";
632478
+ import { dirname as dirname38, extname as extname14, join as join131, relative as relative17, resolve as resolve61 } from "node:path";
632177
632479
  function safeRelative(root, file) {
632178
- const rel = relative16(root, file);
632480
+ const rel = relative17(root, file);
632179
632481
  return rel && !rel.startsWith("..") ? rel : file;
632180
632482
  }
632181
632483
  function collectHtmlFiles(root, maxFiles) {
@@ -632219,7 +632521,7 @@ function resolveScriptSource(root, htmlFile, src2) {
632219
632521
  const clean5 = withoutHash.split("?", 1)[0] ?? "";
632220
632522
  if (!clean5 || !SCRIPT_EXTS.has(extname14(clean5).toLowerCase())) return null;
632221
632523
  const abs = clean5.startsWith("/") ? resolve61(root, `.${clean5}`) : resolve61(dirname38(htmlFile), clean5);
632222
- const rel = relative16(root, abs);
632524
+ const rel = relative17(root, abs);
632223
632525
  if (rel.startsWith("..") || rel === "") return null;
632224
632526
  return existsSync120(abs) ? abs : null;
632225
632527
  }
@@ -638030,11 +638332,11 @@ function wrapToWidth(text2, width) {
638030
638332
  }
638031
638333
  function wrapListItems(items, width) {
638032
638334
  if (items.length === 0) return [];
638033
- const sep10 = " · ";
638335
+ const sep11 = " · ";
638034
638336
  const lines = [];
638035
638337
  let current = "";
638036
638338
  for (const item of items) {
638037
- const candidate = current === "" ? item : current + sep10 + item;
638339
+ const candidate = current === "" ? item : current + sep11 + item;
638038
638340
  if (visibleLength(candidate) <= width) {
638039
638341
  current = candidate;
638040
638342
  } else {
@@ -640387,13 +640689,13 @@ function stripTrustTierWrapperForTui(text2, maxWrapperChars = 400) {
640387
640689
  ).replace(/^---[ \t]*(?:\n)?/, "").replace(/(?:\n)?---[ \t]*$/, "");
640388
640690
  }
640389
640691
  function wrapFooterItems(items, width) {
640390
- const sep10 = " · ";
640692
+ const sep11 = " · ";
640391
640693
  const lines = [];
640392
640694
  let current = "";
640393
640695
  for (const item of items) {
640394
640696
  const clean5 = item.replace(/\s+/g, " ").trim();
640395
640697
  if (!clean5) continue;
640396
- const candidate = current ? `${current}${sep10}${clean5}` : clean5;
640698
+ const candidate = current ? `${current}${sep11}${clean5}` : clean5;
640397
640699
  if (visibleLen(candidate) <= width) {
640398
640700
  current = candidate;
640399
640701
  continue;
@@ -641490,14 +641792,14 @@ function renderRichHeader(opts) {
641490
641792
  let lineLen = 14;
641491
641793
  for (let i2 = 0; i2 < TOOL_NAMES.length; i2++) {
641492
641794
  const name10 = TOOL_NAMES[i2];
641493
- const sep10 = i2 < TOOL_NAMES.length - 1 ? " " : "";
641795
+ const sep11 = i2 < TOOL_NAMES.length - 1 ? " " : "";
641494
641796
  if (lineLen + name10.length + 1 > w - 4) {
641495
641797
  process.stdout.write(`
641496
641798
  ${" ".repeat(14)}`);
641497
641799
  lineLen = 14;
641498
641800
  lines++;
641499
641801
  }
641500
- process.stdout.write(`${c3.cyan(name10)}${sep10}`);
641802
+ process.stdout.write(`${c3.cyan(name10)}${sep11}`);
641501
641803
  lineLen += name10.length + 1;
641502
641804
  }
641503
641805
  process.stdout.write("\n");
@@ -647867,7 +648169,7 @@ __export(omnius_directory_exports, {
647867
648169
  writeTaskHandoff: () => writeTaskHandoff2
647868
648170
  });
647869
648171
  import { appendFileSync as appendFileSync14, cpSync as cpSync2, existsSync as existsSync126, mkdirSync as mkdirSync77, readFileSync as readFileSync103, writeFileSync as writeFileSync65, readdirSync as readdirSync42, statSync as statSync52, unlinkSync as unlinkSync24, openSync as openSync4, closeSync as closeSync4, renameSync as renameSync12, watch as fsWatch3 } from "node:fs";
647870
- import { join as join137, relative as relative17, basename as basename27, dirname as dirname40, resolve as resolve64 } from "node:path";
648172
+ import { join as join137, relative as relative18, basename as basename27, dirname as dirname40, resolve as resolve64 } from "node:path";
647871
648173
  import { homedir as homedir43 } from "node:os";
647872
648174
  import { createHash as createHash50 } from "node:crypto";
647873
648175
  function isGitRoot(dir) {
@@ -647933,7 +648235,7 @@ function ensureOmniusIgnored(repoRoot) {
647933
648235
  const gitignorePath = findNearestExistingGitignore(repoRoot, gitRoot);
647934
648236
  if (!gitignorePath) return;
647935
648237
  const gitignoreDir = dirname40(gitignorePath);
647936
- const relDir = relative17(gitignoreDir || ".", repoRoot).replace(/\\/g, "/");
648238
+ const relDir = relative18(gitignoreDir || ".", repoRoot).replace(/\\/g, "/");
647937
648239
  const ignorePattern = relDir && relDir !== "." ? `${relDir}/.omnius/` : ".omnius/";
647938
648240
  const content = readFileSync103(gitignorePath, "utf-8");
647939
648241
  const normalizedTarget = normalizeIgnoreRule(ignorePattern);
@@ -648112,7 +648414,7 @@ function discoverContextFiles(repoRoot, maxContentLen = 8e3) {
648112
648414
  }
648113
648415
  const type = normalizedName.includes("agents") ? "agents" : normalizedName === "omnius.md" || normalizedName === ".omnius.md" ? "omnius" : normalizedName.includes("claude") ? "claude" : normalizedName.includes("readme") ? "readme" : normalizedName.includes("architect") ? "architecture" : normalizedName.includes("contribut") ? "contributing" : "other";
648114
648416
  found.push({
648115
- path: relative17(repoRoot, filePath) || name10,
648417
+ path: relative18(repoRoot, filePath) || name10,
648116
648418
  content,
648117
648419
  type
648118
648420
  });
@@ -664446,7 +664748,7 @@ var init_platforms = __esm({
664446
664748
 
664447
664749
  // packages/cli/src/tui/workspace-explorer.ts
664448
664750
  import { existsSync as existsSync135, readdirSync as readdirSync45, readFileSync as readFileSync111, statSync as statSync56 } from "node:fs";
664449
- import { basename as basename31, extname as extname17, join as join145, relative as relative18, resolve as resolve67 } from "node:path";
664751
+ import { basename as basename31, extname as extname17, join as join145, relative as relative19, resolve as resolve67 } from "node:path";
664450
664752
  function exploreWorkspace(root, options2 = {}) {
664451
664753
  const query = (options2.query ?? "").trim().toLowerCase();
664452
664754
  const maxResults = options2.maxResults ?? 80;
@@ -664479,7 +664781,7 @@ function exploreWorkspace(root, options2 = {}) {
664479
664781
  }
664480
664782
  if (!dirent.isFile()) continue;
664481
664783
  totalScanned++;
664482
- const rel = relative18(root, full).replace(/\\/g, "/");
664784
+ const rel = relative19(root, full).replace(/\\/g, "/");
664483
664785
  if (query && !rel.toLowerCase().includes(query)) continue;
664484
664786
  try {
664485
664787
  const st = statSync56(full);
@@ -667707,7 +668009,7 @@ var init_audio_waveform = __esm({
667707
668009
 
667708
668010
  // packages/cli/src/tui/neovim-mode.ts
667709
668011
  import { existsSync as existsSync139, unlinkSync as unlinkSync26 } from "node:fs";
667710
- import { tmpdir as tmpdir22 } from "node:os";
668012
+ import { tmpdir as tmpdir23 } from "node:os";
667711
668013
  import { join as join148 } from "node:path";
667712
668014
  function isNeovimActive() {
667713
668015
  return _state2 !== null && !_state2.cleanedUp;
@@ -667753,7 +668055,7 @@ async function startNeovimMode(opts) {
667753
668055
  );
667754
668056
  } catch {
667755
668057
  }
667756
- const socketPath = join148(tmpdir22(), `omnius-nvim-${process.pid}-${Date.now()}.sock`);
668058
+ const socketPath = join148(tmpdir23(), `omnius-nvim-${process.pid}-${Date.now()}.sock`);
667757
668059
  try {
667758
668060
  if (existsSync139(socketPath)) unlinkSync26(socketPath);
667759
668061
  } catch {
@@ -671845,7 +672147,7 @@ import {
671845
672147
  rmSync as rmSync12
671846
672148
  } from "node:fs";
671847
672149
  import { join as join156, dirname as dirname48, resolve as resolve69 } from "node:path";
671848
- import { homedir as homedir54, tmpdir as tmpdir23, platform as platform7 } from "node:os";
672150
+ import { homedir as homedir54, tmpdir as tmpdir24, platform as platform7 } from "node:os";
671849
672151
  import {
671850
672152
  spawn as nodeSpawn
671851
672153
  } from "node:child_process";
@@ -673959,7 +674261,7 @@ except Exception as exc:
673959
674261
  }
673960
674262
  this.onPCMOutput(Buffer.from(int16.buffer), sampleRate);
673961
674263
  }
673962
- const wavPath = join156(tmpdir23(), `omnius-voice-${Date.now()}.wav`);
674264
+ const wavPath = join156(tmpdir24(), `omnius-voice-${Date.now()}.wav`);
673963
674265
  this.writeStereoWav(stereo.left, stereo.right, sampleRate, wavPath);
673964
674266
  await this.playWav(wavPath);
673965
674267
  try {
@@ -674530,7 +674832,7 @@ except Exception as exc:
674530
674832
  const cleaned = injectExpressionTags ? applySupertonicExpressionTags(baseText, settings.expression, emotion) : baseText;
674531
674833
  if (!cleaned) return null;
674532
674834
  const wavPath = join156(
674533
- tmpdir23(),
674835
+ tmpdir24(),
674534
674836
  `omnius-supertonic3-${Date.now()}-${Math.random().toString(36).slice(2, 6)}.wav`
674535
674837
  );
674536
674838
  try {
@@ -674601,7 +674903,7 @@ except Exception as exc:
674601
674903
  return new Promise((resolve84, reject) => {
674602
674904
  const proc = nodeSpawn("sh", ["-c", command], {
674603
674905
  stdio: ["ignore", "pipe", "pipe"],
674604
- cwd: tmpdir23(),
674906
+ cwd: tmpdir24(),
674605
674907
  env: voicePythonEnv()
674606
674908
  });
674607
674909
  let stdout = "";
@@ -674688,7 +674990,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`
674688
674990
  const mlxModelId = model.mlxModelId ?? "mlx-community/Kokoro-82M-bf16";
674689
674991
  const mlxVoice = model.mlxVoice ?? "af_heart";
674690
674992
  const mlxLangCode = model.mlxLangCode ?? "a";
674691
- const wavPath = join156(tmpdir23(), `omnius-mlx-${Date.now()}.wav`);
674993
+ const wavPath = join156(tmpdir24(), `omnius-mlx-${Date.now()}.wav`);
674692
674994
  const pyScript = [
674693
674995
  "import sys, json",
674694
674996
  "from mlx_audio.tts import generate as tts_gen",
@@ -674769,7 +675071,7 @@ Error: ${err instanceof Error ? err.message : String(err)}`
674769
675071
  const mlxModelId = model.mlxModelId ?? "mlx-community/Kokoro-82M-bf16";
674770
675072
  const mlxVoice = model.mlxVoice ?? "af_heart";
674771
675073
  const mlxLangCode = model.mlxLangCode ?? "a";
674772
- const wavPath = join156(tmpdir23(), `omnius-mlx-buf-${Date.now()}.wav`);
675074
+ const wavPath = join156(tmpdir24(), `omnius-mlx-buf-${Date.now()}.wav`);
674773
675075
  const pyScript = [
674774
675076
  "import sys, json",
674775
675077
  "from mlx_audio.tts import generate as tts_gen",
@@ -675568,7 +675870,7 @@ if __name__ == '__main__':
675568
675870
  const env2 = voicePythonEnv({ LUXTTS_REPO_PATH: luxttsRepoDir2() });
675569
675871
  const daemon = nodeSpawn(venvPy, [luxttsInferScript2()], {
675570
675872
  stdio: ["pipe", "pipe", "pipe"],
675571
- cwd: tmpdir23(),
675873
+ cwd: tmpdir24(),
675572
675874
  env: env2
675573
675875
  });
675574
675876
  this._luxttsDaemon = daemon;
@@ -675658,7 +675960,7 @@ if __name__ == '__main__':
675658
675960
  const ready = await this.ensureLuxttsDaemon();
675659
675961
  if (!ready) return null;
675660
675962
  const wavPath = join156(
675661
- tmpdir23(),
675963
+ tmpdir24(),
675662
675964
  `omnius-luxtts-${Date.now()}-${Math.random().toString(36).slice(2, 6)}.wav`
675663
675965
  );
675664
675966
  try {
@@ -675799,7 +676101,7 @@ if __name__ == '__main__':
675799
676101
  if (!cleaned) return null;
675800
676102
  const ready = await this.ensureLuxttsDaemon();
675801
676103
  if (!ready) return null;
675802
- const wavPath = join156(tmpdir23(), `omnius-luxtts-buf-${Date.now()}.wav`);
676104
+ const wavPath = join156(tmpdir24(), `omnius-luxtts-buf-${Date.now()}.wav`);
675803
676105
  try {
675804
676106
  await this.luxttsRequest({
675805
676107
  action: "synthesize",
@@ -675933,7 +676235,7 @@ if __name__ == "__main__":
675933
676235
  });
675934
676236
  const daemon = nodeSpawn(venvPy, [misottsInferScript2()], {
675935
676237
  stdio: ["pipe", "pipe", "pipe"],
675936
- cwd: tmpdir23(),
676238
+ cwd: tmpdir24(),
675937
676239
  env: env2
675938
676240
  });
675939
676241
  this._misottsDaemon = daemon;
@@ -676017,7 +676319,7 @@ if __name__ == "__main__":
676017
676319
  const ready = await this.ensureMisottsDaemon();
676018
676320
  if (!ready) return null;
676019
676321
  const wavPath = join156(
676020
- tmpdir23(),
676322
+ tmpdir24(),
676021
676323
  `omnius-misotts-${Date.now()}-${Math.random().toString(36).slice(2, 6)}.wav`
676022
676324
  );
676023
676325
  try {
@@ -676167,7 +676469,7 @@ if __name__ == "__main__":
676167
676469
  if (!cleaned) return null;
676168
676470
  const ready = await this.ensureMisottsDaemon();
676169
676471
  if (!ready) return null;
676170
- const wavPath = join156(tmpdir23(), `omnius-misotts-buf-${Date.now()}.wav`);
676472
+ const wavPath = join156(tmpdir24(), `omnius-misotts-buf-${Date.now()}.wav`);
676171
676473
  try {
676172
676474
  const settings = this.getMisottsSettings();
676173
676475
  const cloneName = this.misottsCloneRef.split("/").pop() ?? "";
@@ -676539,7 +676841,7 @@ import {
676539
676841
  appendFileSync as appendFileSync16,
676540
676842
  writeSync as writeSync3
676541
676843
  } from "node:fs";
676542
- import { basename as basename32, dirname as dirname49, relative as relative19, join as join157 } from "node:path";
676844
+ import { basename as basename32, dirname as dirname49, relative as relative20, join as join157 } from "node:path";
676543
676845
  function omniusPinnedDependencyVersion(name10) {
676544
676846
  const spec = OMNIUS_PINNED_DEPENDENCY_SPECS[name10];
676545
676847
  if (!spec) return null;
@@ -677008,10 +677310,10 @@ async function ensureVoiceDeps(ctx3) {
677008
677310
  if (existsSync178(venvPy)) {
677009
677311
  process.env.TRANSCRIBE_PYTHON = venvPy;
677010
677312
  const venvBin = dirname59(venvPy);
677011
- const sep10 = process.platform === "win32" ? ";" : ":";
677313
+ const sep11 = process.platform === "win32" ? ";" : ":";
677012
677314
  const cur = process.env.PATH || "";
677013
- if (!cur.split(sep10).includes(venvBin)) {
677014
- process.env.PATH = `${venvBin}${sep10}${cur}`;
677315
+ if (!cur.split(sep11).includes(venvBin)) {
677316
+ process.env.PATH = `${venvBin}${sep11}${cur}`;
677015
677317
  }
677016
677318
  }
677017
677319
  }
@@ -685587,7 +685889,7 @@ async function handleImageCommand(ctx3, arg, hasLocal) {
685587
685889
  const imagePath = extractSavedImagePath2(result.output, ctx3.repoRoot);
685588
685890
  if (imagePath) {
685589
685891
  const preview = await buildImageAsciiPreview2(imagePath);
685590
- const displayPath = relative19(ctx3.repoRoot, imagePath).startsWith("..") ? imagePath : relative19(ctx3.repoRoot, imagePath);
685892
+ const displayPath = relative20(ctx3.repoRoot, imagePath).startsWith("..") ? imagePath : relative20(ctx3.repoRoot, imagePath);
685591
685893
  if (preview) {
685592
685894
  renderImageAsciiPreview(
685593
685895
  "Generated image",
@@ -703211,9 +703513,9 @@ import {
703211
703513
  extname as extname20,
703212
703514
  isAbsolute as isAbsolute16,
703213
703515
  join as join168,
703214
- relative as relative20,
703516
+ relative as relative21,
703215
703517
  resolve as resolve74,
703216
- sep as sep8
703518
+ sep as sep9
703217
703519
  } from "node:path";
703218
703520
  function telegramCreativeWorkspaceRoot(repoRoot, chatId) {
703219
703521
  const raw = chatId === void 0 ? "unknown" : String(chatId);
@@ -703505,7 +703807,7 @@ function guardPath(root, rawPath) {
703505
703807
  error: `Path escapes the public creative workspace. Use a relative path under ${rootAbs}.`
703506
703808
  };
703507
703809
  }
703508
- const rel = relative20(rootAbs, abs) || ".";
703810
+ const rel = relative21(rootAbs, abs) || ".";
703509
703811
  if (rel.startsWith("..") || isAbsolute16(rel)) {
703510
703812
  return {
703511
703813
  ok: false,
@@ -703523,7 +703825,7 @@ function guardPath(root, rawPath) {
703523
703825
  function isInside(root, path16) {
703524
703826
  const rootAbs = resolve74(root);
703525
703827
  const pathAbs = resolve74(path16);
703526
- return pathAbs === rootAbs || pathAbs.startsWith(rootAbs.endsWith(sep8) ? rootAbs : rootAbs + sep8);
703828
+ return pathAbs === rootAbs || pathAbs.startsWith(rootAbs.endsWith(sep9) ? rootAbs : rootAbs + sep9);
703527
703829
  }
703528
703830
  function looksLikeLocalPath(value2) {
703529
703831
  return value2.startsWith("/") || value2.startsWith("./") || value2.startsWith("../");
@@ -707377,7 +707679,7 @@ import {
707377
707679
  dirname as dirname53,
707378
707680
  resolve as resolve75,
707379
707681
  basename as basename42,
707380
- relative as relative21,
707682
+ relative as relative22,
707381
707683
  isAbsolute as isAbsolute17,
707382
707684
  extname as extname21
707383
707685
  } from "node:path";
@@ -709455,8 +709757,8 @@ function telegramCachedMediaIsVideo(entry) {
709455
709757
  extname21(entry.localPath).toLowerCase()
709456
709758
  );
709457
709759
  }
709458
- function isPathInside(root, path16) {
709459
- const rel = relative21(resolve75(root), resolve75(path16));
709760
+ function isPathInside2(root, path16) {
709761
+ const rel = relative22(resolve75(root), resolve75(path16));
709460
709762
  return rel === "" || Boolean(rel) && !rel.startsWith("..") && !isAbsolute17(rel);
709461
709763
  }
709462
709764
  function extractTelegramMentionedUsernames(message2, text2) {
@@ -714858,7 +715160,7 @@ ${mediaContext}` : ""
714858
715160
  });
714859
715161
  if (matchingEntry) return { ok: true, path: matchingEntry.localPath };
714860
715162
  const creativeCandidate = isAbsolute17(raw) ? resolve75(raw) : resolve75(creativeRoot, raw);
714861
- if (isPathInside(creativeRoot, creativeCandidate) && existsSync161(creativeCandidate)) {
715163
+ if (isPathInside2(creativeRoot, creativeCandidate) && existsSync161(creativeCandidate)) {
714862
715164
  return { ok: true, path: creativeCandidate };
714863
715165
  }
714864
715166
  return {
@@ -714968,7 +715270,7 @@ ${mediaContext}` : ""
714968
715270
  const creativeRoot = telegramCreativeWorkspaceRoot(repoRoot, chatId);
714969
715271
  const raw = String(rawValue || fallbackName).trim() || fallbackName;
714970
715272
  const outputPath3 = isAbsolute17(raw) ? resolve75(raw) : resolve75(creativeRoot, raw);
714971
- if (!isPathInside(creativeRoot, outputPath3)) {
715273
+ if (!isPathInside2(creativeRoot, outputPath3)) {
714972
715274
  return {
714973
715275
  ok: false,
714974
715276
  error: `Output path must stay inside this Telegram chat's creative workspace: ${raw}`
@@ -724866,7 +725168,7 @@ ${knownList}` : "Private-user telegram_send_file target must be this DM or a kno
724866
725168
  const trimmed = rawPath.trim().replace(/^["']|["']$/g, "");
724867
725169
  if (scopedRoot) {
724868
725170
  const logicalPath = isAbsolute17(trimmed) ? resolve75(trimmed) : resolve75(base3, trimmed);
724869
- if (!isPathInside(base3, logicalPath)) {
725171
+ if (!isPathInside2(base3, logicalPath)) {
724870
725172
  return {
724871
725173
  ok: false,
724872
725174
  error: `Path escapes the scoped Telegram creative workspace: ${trimmed}`
@@ -725700,7 +726002,7 @@ Content-Type: ${contentType}\r
725700
726002
  );
725701
726003
  for (const path16 of paths) {
725702
726004
  const abs = resolve75(path16);
725703
- if (!isPathInside(rootAbs, abs)) continue;
726005
+ if (!isPathInside2(rootAbs, abs)) continue;
725704
726006
  if (alreadyDelivered.has(abs)) continue;
725705
726007
  if (!includeMentioned && alreadySentByText.has(abs)) continue;
725706
726008
  const materialized = materializeTelegramCreativeArtifactForSend(
@@ -726017,15 +726319,15 @@ Content-Type: ${mimeForPath(pathOrFileId, field === "photo" ? "image" : "video")
726017
726319
  let filename = "response.wav";
726018
726320
  let mimeType = "audio/wav";
726019
726321
  try {
726020
- const { tmpdir: tmpdir26 } = await import("node:os");
726322
+ const { tmpdir: tmpdir27 } = await import("node:os");
726021
726323
  const { join: joinPath } = await import("node:path");
726022
726324
  const {
726023
726325
  writeFileSync: writeFs,
726024
726326
  readFileSync: readFs,
726025
726327
  unlinkSync: unlinkFs
726026
726328
  } = await import("node:fs");
726027
- const tmpWav = joinPath(tmpdir26(), `omnius-tg-voice-${Date.now()}.wav`);
726028
- const tmpOgg = joinPath(tmpdir26(), `omnius-tg-voice-${Date.now()}.ogg`);
726329
+ const tmpWav = joinPath(tmpdir27(), `omnius-tg-voice-${Date.now()}.wav`);
726330
+ const tmpOgg = joinPath(tmpdir27(), `omnius-tg-voice-${Date.now()}.ogg`);
726029
726331
  writeFs(tmpWav, wavBuffer);
726030
726332
  await execFileText5(
726031
726333
  "ffmpeg",
@@ -731284,7 +731586,7 @@ __export(graphical_sudo_exports, {
731284
731586
  import { spawn as spawn36 } from "node:child_process";
731285
731587
  import { existsSync as existsSync170, mkdirSync as mkdirSync106, writeFileSync as writeFileSync90, chmodSync as chmodSync6 } from "node:fs";
731286
731588
  import { join as join179 } from "node:path";
731287
- import { tmpdir as tmpdir24 } from "node:os";
731589
+ import { tmpdir as tmpdir25 } from "node:os";
731288
731590
  function detectSudoHelper() {
731289
731591
  if (process.platform === "win32") return null;
731290
731592
  if (process.platform === "darwin") return "osascript";
@@ -731305,7 +731607,7 @@ function which2(cmd) {
731305
731607
  return null;
731306
731608
  }
731307
731609
  function ensureAskpassShim(helper, description) {
731308
- const shimDir = join179(tmpdir24(), "omnius-askpass");
731610
+ const shimDir = join179(tmpdir25(), "omnius-askpass");
731309
731611
  mkdirSync106(shimDir, { recursive: true });
731310
731612
  const shim = join179(shimDir, `${helper}.sh`);
731311
731613
  let body;
@@ -754397,11 +754699,11 @@ async function handleRequest(req3, res, ollamaUrl, verbose, runtimeDefaults = {}
754397
754699
  });
754398
754700
  return;
754399
754701
  }
754400
- const { tmpdir: tmpdir26 } = await import("node:os");
754702
+ const { tmpdir: tmpdir27 } = await import("node:os");
754401
754703
  const { writeFileSync: writeFileSync98, unlinkSync: unlinkSync40 } = await import("node:fs");
754402
754704
  const { join: pjoin } = await import("node:path");
754403
754705
  const tmpPath = pjoin(
754404
- tmpdir26(),
754706
+ tmpdir27(),
754405
754707
  `omnius-clone-upload-${Date.now()}-${safeName3}`
754406
754708
  );
754407
754709
  writeFileSync98(tmpPath, buf);
@@ -759153,7 +759455,7 @@ var init_clipboard_media = __esm({
759153
759455
 
759154
759456
  // packages/cli/src/tui/interactive.ts
759155
759457
  import { cwd } from "node:process";
759156
- import { resolve as resolve80, join as join186, dirname as dirname57, extname as extname22, relative as relative22, sep as sep9 } from "node:path";
759458
+ import { resolve as resolve80, join as join186, dirname as dirname57, extname as extname22, relative as relative23, sep as sep10 } from "node:path";
759157
759459
  import { createRequire as createRequire9 } from "node:module";
759158
759460
  import { fileURLToPath as fileURLToPath24 } from "node:url";
759159
759461
  import { createHash as createHash59 } from "node:crypto";
@@ -761434,7 +761736,7 @@ async function renderAsciiPreviewForToolResult(toolName, output, repoRoot, write
761434
761736
  }
761435
761737
  return;
761436
761738
  }
761437
- const displayPath = relative22(repoRoot, imagePath).startsWith("..") ? imagePath : relative22(repoRoot, imagePath);
761739
+ const displayPath = relative23(repoRoot, imagePath).startsWith("..") ? imagePath : relative23(repoRoot, imagePath);
761438
761740
  const title = toolName === "generate_image" ? "Generated image" : toolName === "screenshot" ? "Screenshot" : toolName === "vision_action_loop" ? "Vision loop screenshot" : toolName === "camera_capture" ? "Camera frame" : "Image";
761439
761741
  await renderAsciiPreviewForImage(imagePath, displayPath, title, writer);
761440
761742
  } catch (err) {
@@ -761458,7 +761760,7 @@ async function playGeneratedAudioForToolResult(toolName, output, repoRoot, write
761458
761760
  return;
761459
761761
  const audioPath = extractGeneratedAudioPath(output, repoRoot);
761460
761762
  if (!audioPath) return;
761461
- const displayPath = relative22(repoRoot, audioPath).startsWith("..") ? audioPath : relative22(repoRoot, audioPath);
761763
+ const displayPath = relative23(repoRoot, audioPath).startsWith("..") ? audioPath : relative23(repoRoot, audioPath);
761462
761764
  const waveform = renderAudioWaveform(audioPath, {
761463
761765
  widthChars: Math.max(32, Math.min(96, termCols() - 4)),
761464
761766
  heightChars: 8
@@ -765251,7 +765553,7 @@ This is an independent background session started from /background.`
765251
765553
  try {
765252
765554
  const st = statSync70(full);
765253
765555
  const suffix = st.isDirectory() ? "/" : "";
765254
- const display = isAbsolute18 ? full : full.startsWith(repoRoot + sep9) ? full.slice(repoRoot.length + 1) : full;
765556
+ const display = isAbsolute18 ? full : full.startsWith(repoRoot + sep10) ? full.slice(repoRoot.length + 1) : full;
765255
765557
  completions.push(display + suffix);
765256
765558
  } catch {
765257
765559
  }
@@ -766422,7 +766724,7 @@ This is an independent background session started from /background.`
766422
766724
  ok: false,
766423
766725
  message: "Clipboard does not contain a supported image or no clipboard reader is available."
766424
766726
  };
766425
- const relPath = relative22(repoRoot, pasted.path).startsWith("..") ? pasted.path : relative22(repoRoot, pasted.path);
766727
+ const relPath = relative23(repoRoot, pasted.path).startsWith("..") ? pasted.path : relative23(repoRoot, pasted.path);
766426
766728
  const asciiContextPromise = renderAsciiPreviewForImage(
766427
766729
  pasted.path,
766428
766730
  relPath,
@@ -771352,7 +771654,7 @@ __export(eval_exports, {
771352
771654
  evalCommand: () => evalCommand,
771353
771655
  expectedStatusesForEvalTask: () => expectedStatusesForEvalTask
771354
771656
  });
771355
- import { tmpdir as tmpdir25 } from "node:os";
771657
+ import { tmpdir as tmpdir26 } from "node:os";
771356
771658
  import { mkdirSync as mkdirSync114, writeFileSync as writeFileSync97 } from "node:fs";
771357
771659
  import { join as join189 } from "node:path";
771358
771660
  function expectedStatusesForEvalTask(task, live) {
@@ -771496,7 +771798,7 @@ async function evalCommand(opts, config) {
771496
771798
  process.exit(failed > 0 ? 1 : 0);
771497
771799
  }
771498
771800
  function createTempEvalRepo() {
771499
- const dir = join189(tmpdir25(), `omnius-eval-${Date.now()}`);
771801
+ const dir = join189(tmpdir26(), `omnius-eval-${Date.now()}`);
771500
771802
  mkdirSync114(dir, { recursive: true });
771501
771803
  mkdirSync114(join189(dir, "src"), { recursive: true });
771502
771804
  mkdirSync114(join189(dir, "tests"), { recursive: true });