oh-my-opencode 5.1.81 → 5.1.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/cli/index.js +443 -276
  2. package/dist/cli-node/index.js +443 -276
  3. package/dist/hooks/claude-code-hooks/handlers/empty-hook-config.fixture.d.ts +1 -0
  4. package/dist/index.js +650 -431
  5. package/dist/shared/opencode-message-dir.d.ts +1 -1
  6. package/dist/skills/browser/references/owned-engine/README.md +4 -2
  7. package/dist/skills/browser/references/owned-engine/frames-and-humans.md +9 -3
  8. package/dist/skills/browser/runtime/omowright/index.js +8 -8
  9. package/dist/skills/browser/runtime/omowright/manifest.json +4 -4
  10. package/dist/skills/frontend/SKILL.md +4 -2
  11. package/dist/skills/frontend/references/perfection/state-and-flow.md +120 -0
  12. package/dist/skills/visual-qa/AGENTS.md +2 -1
  13. package/dist/skills/visual-qa/SKILL.md +43 -11
  14. package/dist/skills/visual-qa/references/behaviour-evidence.md +189 -0
  15. package/dist/tui.js +15 -15
  16. package/package.json +15 -15
  17. package/packages/lsp-core/src/lsp/client-key.ts +14 -0
  18. package/packages/lsp-core/src/lsp/client-startup.ts +139 -0
  19. package/packages/lsp-core/src/lsp/client-wrapper.ts +4 -4
  20. package/packages/lsp-core/src/lsp/config-loader.ts +15 -0
  21. package/packages/lsp-core/src/lsp/directory-diagnostics-group-scan.test.ts +388 -0
  22. package/packages/lsp-core/src/lsp/directory-diagnostics-mixed-typescript.test.ts +124 -0
  23. package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +4 -4
  24. package/packages/lsp-core/src/lsp/directory-diagnostics.ts +38 -41
  25. package/packages/lsp-core/src/lsp/directory-group-scan.ts +124 -0
  26. package/packages/lsp-core/src/lsp/directory-server-groups.ts +84 -0
  27. package/packages/lsp-core/src/lsp/manager-acquisition.test.ts +115 -0
  28. package/packages/lsp-core/src/lsp/manager-lifecycle.test.ts +9 -9
  29. package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +41 -16
  30. package/packages/lsp-core/src/lsp/manager-reaping.test.ts +119 -0
  31. package/packages/lsp-core/src/lsp/manager-test-support.ts +108 -0
  32. package/packages/lsp-core/src/lsp/manager.ts +80 -249
  33. package/packages/lsp-core/src/lsp/native-typescript.ts +88 -0
  34. package/packages/lsp-core/src/lsp/server-installation.ts +15 -7
  35. package/packages/lsp-core/src/lsp/server-resolution-typescript-native.test.ts +327 -0
  36. package/packages/lsp-core/src/lsp/server-resolution.ts +28 -2
  37. package/packages/lsp-core/src/lsp/timer-provider.ts +17 -0
  38. package/packages/lsp-core/src/lsp/typescript-project-test-support.ts +52 -0
  39. package/packages/lsp-daemon/dist/cli.js +486 -310
  40. package/packages/lsp-daemon/dist/client.js +472 -296
  41. package/packages/lsp-daemon/dist/index.js +476 -300
  42. package/packages/lsp-tools-mcp/dist/cli.js +467 -291
  43. package/packages/lsp-tools-mcp/dist/lsp/manager.js +160 -193
  44. package/packages/lsp-tools-mcp/dist/mcp.js +467 -291
  45. package/packages/lsp-tools-mcp/dist/tools.js +467 -291
  46. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  47. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  48. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  49. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  50. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  51. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  52. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  54. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  56. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +478 -313
  57. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  58. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  59. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  60. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  61. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  62. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  63. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  64. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  65. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  66. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  67. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  68. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  69. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  70. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  92. package/packages/omo-codex/plugin/package-lock.json +12 -12
  93. package/packages/omo-codex/plugin/package.json +1 -1
  94. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +4 -2
  95. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +9 -3
  96. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +8 -8
  97. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +4 -4
  98. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +4 -2
  99. package/packages/omo-codex/plugin/skills/frontend/references/perfection/state-and-flow.md +120 -0
  100. package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +2 -1
  101. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +43 -11
  102. package/packages/omo-codex/plugin/skills/visual-qa/references/behaviour-evidence.md +189 -0
  103. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  104. package/packages/shared-skills/skills/browser/references/owned-engine/README.md +4 -2
  105. package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +9 -3
  106. package/packages/shared-skills/skills/browser/runtime/omowright/index.js +8 -8
  107. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +4 -4
  108. package/packages/shared-skills/skills/frontend/SKILL.md +4 -2
  109. package/packages/shared-skills/skills/frontend/references/perfection/state-and-flow.md +120 -0
  110. package/packages/shared-skills/skills/visual-qa/AGENTS.md +2 -1
  111. package/packages/shared-skills/skills/visual-qa/SKILL.md +43 -11
  112. package/packages/shared-skills/skills/visual-qa/references/behaviour-evidence.md +189 -0
@@ -2133,7 +2133,7 @@ var package_default;
2133
2133
  var init_package = __esm(() => {
2134
2134
  package_default = {
2135
2135
  name: "oh-my-opencode",
2136
- version: "5.1.81",
2136
+ version: "5.1.83",
2137
2137
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2138
2138
  main: "./dist/index.js",
2139
2139
  types: "dist/index.d.ts",
@@ -2333,7 +2333,7 @@ var init_package = __esm(() => {
2333
2333
  },
2334
2334
  devDependencies: {
2335
2335
  "@clack/prompts": "^1.8.1",
2336
- "@code-yeongyu/senpi": "2026.11.19-5",
2336
+ "@code-yeongyu/senpi": "2026.11.23",
2337
2337
  "@modelcontextprotocol/sdk": "^1.30.0",
2338
2338
  "@oh-my-opencode/agents-md-core": "workspace:*",
2339
2339
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
@@ -2397,7 +2397,7 @@ var init_package = __esm(() => {
2397
2397
  "jsonc-parser": "^3.3.1",
2398
2398
  knip: "6.43.0",
2399
2399
  "node-pty": "^1.1.0",
2400
- omowright: "^0.3.1",
2400
+ omowright: "^0.3.2",
2401
2401
  "oxc-parser": "0.148.0",
2402
2402
  oxlint: "1.89.0",
2403
2403
  picocolors: "^1.1.1",
@@ -2407,18 +2407,18 @@ var init_package = __esm(() => {
2407
2407
  typescript: "^7.0.2"
2408
2408
  },
2409
2409
  optionalDependencies: {
2410
- "oh-my-opencode-darwin-arm64": "5.1.81",
2411
- "oh-my-opencode-darwin-x64": "5.1.81",
2412
- "oh-my-opencode-darwin-x64-baseline": "5.1.81",
2413
- "oh-my-opencode-linux-arm64": "5.1.81",
2414
- "oh-my-opencode-linux-arm64-musl": "5.1.81",
2415
- "oh-my-opencode-linux-x64": "5.1.81",
2416
- "oh-my-opencode-linux-x64-baseline": "5.1.81",
2417
- "oh-my-opencode-linux-x64-musl": "5.1.81",
2418
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.81",
2419
- "oh-my-opencode-windows-arm64": "5.1.81",
2420
- "oh-my-opencode-windows-x64": "5.1.81",
2421
- "oh-my-opencode-windows-x64-baseline": "5.1.81"
2410
+ "oh-my-opencode-darwin-arm64": "5.1.83",
2411
+ "oh-my-opencode-darwin-x64": "5.1.83",
2412
+ "oh-my-opencode-darwin-x64-baseline": "5.1.83",
2413
+ "oh-my-opencode-linux-arm64": "5.1.83",
2414
+ "oh-my-opencode-linux-arm64-musl": "5.1.83",
2415
+ "oh-my-opencode-linux-x64": "5.1.83",
2416
+ "oh-my-opencode-linux-x64-baseline": "5.1.83",
2417
+ "oh-my-opencode-linux-x64-musl": "5.1.83",
2418
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.83",
2419
+ "oh-my-opencode-windows-arm64": "5.1.83",
2420
+ "oh-my-opencode-windows-x64": "5.1.83",
2421
+ "oh-my-opencode-windows-x64-baseline": "5.1.83"
2422
2422
  },
2423
2423
  overrides: {
2424
2424
  hono: "^4.13.8",
@@ -67815,20 +67815,20 @@ var init_hook_message_injector = __esm(() => {
67815
67815
  // packages/omo-opencode/src/shared/opencode-message-dir.ts
67816
67816
  import { existsSync as existsSync12, readdirSync as readdirSync3 } from "node:fs";
67817
67817
  import { join as join14 } from "node:path";
67818
- function getMessageDir(sessionID) {
67818
+ function getMessageDir(sessionID, messageStorage = MESSAGE_STORAGE) {
67819
67819
  if (!sessionID.startsWith("ses_"))
67820
67820
  return null;
67821
67821
  if (/[/\\]|\.\./.test(sessionID))
67822
67822
  return null;
67823
- if (!existsSync12(MESSAGE_STORAGE))
67823
+ if (!existsSync12(messageStorage))
67824
67824
  return null;
67825
- const directPath = join14(MESSAGE_STORAGE, sessionID);
67825
+ const directPath = join14(messageStorage, sessionID);
67826
67826
  if (existsSync12(directPath)) {
67827
67827
  return directPath;
67828
67828
  }
67829
67829
  try {
67830
- for (const dir of readdirSync3(MESSAGE_STORAGE)) {
67831
- const sessionPath = join14(MESSAGE_STORAGE, dir, sessionID);
67830
+ for (const dir of readdirSync3(messageStorage)) {
67831
+ const sessionPath = join14(messageStorage, dir, sessionID);
67832
67832
  if (existsSync12(sessionPath)) {
67833
67833
  return sessionPath;
67834
67834
  }
@@ -93029,7 +93029,7 @@ var package_default2;
93029
93029
  var init_package2 = __esm(() => {
93030
93030
  package_default2 = {
93031
93031
  name: "@oh-my-opencode/omo-codex",
93032
- version: "5.1.81",
93032
+ version: "5.1.83",
93033
93033
  type: "module",
93034
93034
  private: true,
93035
93035
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -94028,7 +94028,7 @@ var init_update_toasts = __esm(() => {
94028
94028
  });
94029
94029
 
94030
94030
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
94031
- import { existsSync as existsSync50 } from "node:fs";
94031
+ import { existsSync as existsSync49 } from "node:fs";
94032
94032
  import { dirname as dirname36, join as join87 } from "node:path";
94033
94033
  import { fileURLToPath as fileURLToPath5 } from "node:url";
94034
94034
  function defaultGetModuleHostingWorkspace() {
@@ -94188,7 +94188,7 @@ var init_background_update_check = __esm(() => {
94188
94188
  init_semver_compare();
94189
94189
  init_update_toasts();
94190
94190
  defaultDeps4 = {
94191
- existsSync: existsSync50,
94191
+ existsSync: existsSync49,
94192
94192
  join: join87,
94193
94193
  runBunInstallWithDetails,
94194
94194
  log: log2,
@@ -94276,6 +94276,7 @@ var init_errors4 = __esm(() => {
94276
94276
  candidates;
94277
94277
  incomplete;
94278
94278
  sign_in_reason;
94279
+ insecure_cause;
94279
94280
  constructor(code, reason, extra = {}) {
94280
94281
  super(`${code}: ${reason}`);
94281
94282
  this.name = "LocalApiError";
@@ -94294,6 +94295,8 @@ var init_errors4 = __esm(() => {
94294
94295
  this.incomplete = extra.incomplete;
94295
94296
  if (extra.sign_in_reason !== undefined)
94296
94297
  this.sign_in_reason = extra.sign_in_reason;
94298
+ if (extra.insecure_cause !== undefined)
94299
+ this.insecure_cause = extra.insecure_cause;
94297
94300
  }
94298
94301
  };
94299
94302
  });
@@ -94367,20 +94370,43 @@ var init_proof = __esm(() => {
94367
94370
  init_errors4();
94368
94371
  });
94369
94372
 
94370
- // packages/device-service-core/src/local-api/dacl.ts
94373
+ // packages/device-service-core/src/local-api/powershell.ts
94371
94374
  import { spawn as spawn6 } from "node:child_process";
94372
- var runPowerShell = async (script, env) => {
94375
+ var inheritedEnv = () => Object.fromEntries(Object.entries(process.env).filter(([name]) => name.toUpperCase() !== "PSMODULEPATH")), runPowerShell = async (script, env) => {
94373
94376
  const encoded = Buffer.from(script, "utf16le").toString("base64");
94374
- const proc = spawn6("powershell.exe", ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", encoded], { env: { ...process.env, ...env }, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });
94377
+ const proc = spawn6("powershell.exe", ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", encoded], { env: { ...inheritedEnv(), ...env }, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });
94375
94378
  const chunks = [];
94379
+ const errChunks = [];
94376
94380
  proc.stdout.on("data", (chunk) => chunks.push(chunk));
94377
- proc.stderr.resume();
94381
+ proc.stderr.on("data", (chunk) => errChunks.push(chunk));
94378
94382
  const code = await new Promise((resolve, reject) => {
94379
94383
  proc.once("error", reject);
94380
94384
  proc.once("close", (exitCode) => resolve(exitCode ?? -1));
94381
94385
  });
94382
- return { code, out: new TextDecoder().decode(Buffer.concat(chunks)) };
94383
- }, APPLY_DACL_SCRIPT, DESCRIBE_DACL_SCRIPT, CURRENT_USER_SID_SCRIPT = "[System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value", ACE_TYPES, DACL_FLAG, SID_TOKEN, aceEnd = (text, start) => {
94386
+ const decoder = new TextDecoder;
94387
+ return {
94388
+ code,
94389
+ out: decoder.decode(Buffer.concat(chunks)),
94390
+ err: decoder.decode(Buffer.concat(errChunks))
94391
+ };
94392
+ }, XML_ENTITIES, clixmlText = (line) => [...line.matchAll(/<S(?: S="[^"]*")?>([^<]*)<\/S>/g)].map((match) => match[1] ?? "").join("").replace(/_x([0-9A-Fa-f]{4})_/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16))).replace(/&(lt|gt|quot|apos|amp);/g, (_, entity) => XML_ENTITIES[entity] ?? ""), POSITION_LINE, MAX_CHARS = 300, powerShellError = (err) => {
94393
+ const lines = (err ?? "").split(/\r?\n/).filter((text) => !text.trim().startsWith("#< CLIXML")).flatMap((text) => text.trim().startsWith("<") ? clixmlText(text).split(/\r?\n/) : [text]).map((text) => text.trim()).filter((text) => text !== "");
94394
+ const end = lines.findIndex((text) => POSITION_LINE.test(text));
94395
+ return lines.slice(0, end === -1 ? lines.length : end).join(" ").slice(0, MAX_CHARS);
94396
+ };
94397
+ var init_powershell = __esm(() => {
94398
+ XML_ENTITIES = {
94399
+ lt: "<",
94400
+ gt: ">",
94401
+ quot: '"',
94402
+ apos: "'",
94403
+ amp: "&"
94404
+ };
94405
+ POSITION_LINE = /^(?:At line:\d|At .*char:\d|\+ )/;
94406
+ });
94407
+
94408
+ // packages/device-service-core/src/local-api/dacl.ts
94409
+ var APPLY_DACL_SCRIPT, DESCRIBE_DACL_SCRIPT, CURRENT_USER_SID_SCRIPT = "[System.Security.Principal.WindowsIdentity]::GetCurrent().User.Value", ACE_TYPES, DACL_FLAG, SID_TOKEN, aceEnd = (text, start) => {
94384
94410
  let depth = 0;
94385
94411
  for (let i = start;i < text.length; i += 1) {
94386
94412
  if (text[i] === '"') {
@@ -94446,19 +94472,35 @@ var runPowerShell = async (script, env) => {
94446
94472
  const { code, out } = await run(CURRENT_USER_SID_SCRIPT, {});
94447
94473
  const sid = out.trim();
94448
94474
  if (code !== 0 || !/^S-1-[0-9-]+$/.test(sid))
94449
- throw new LocalApiError("insecure_state_dir", "the user SID is unreadable");
94475
+ throw new LocalApiError("insecure_state_dir", "the user SID is unreadable", {
94476
+ insecure_cause: "unreadable"
94477
+ });
94450
94478
  return sid;
94479
+ }, applyExactDacl = async (path, userSid, kind, run = runPowerShell) => {
94480
+ const { code, err } = await run(APPLY_DACL_SCRIPT, {
94481
+ LA_PATH: path,
94482
+ LA_SID: userSid,
94483
+ LA_KIND: kind
94484
+ });
94485
+ if (code !== 0) {
94486
+ const line = powerShellError(err);
94487
+ throw new LocalApiError("insecure_state_dir", `the exact DACL could not be applied${line === "" ? "" : `: ${line}`}`, { insecure_cause: "dacl_not_exact" });
94488
+ }
94451
94489
  }, describeDacl = async (path, run = runPowerShell) => {
94452
94490
  const { code, out } = await run(DESCRIBE_DACL_SCRIPT, { LA_PATH: path });
94453
94491
  const dacl = code === 0 ? parseSddl(out.trim()) : undefined;
94454
94492
  if (dacl === undefined)
94455
- throw new LocalApiError("insecure_state_dir", "the DACL could not be read back");
94493
+ throw new LocalApiError("insecure_state_dir", "the DACL could not be read back", {
94494
+ insecure_cause: "unreadable"
94495
+ });
94456
94496
  return dacl;
94457
94497
  };
94458
94498
  var init_dacl = __esm(() => {
94459
94499
  init_errors4();
94500
+ init_powershell();
94460
94501
  APPLY_DACL_SCRIPT = String.raw`
94461
94502
  $ErrorActionPreference = 'Stop'
94503
+ $ProgressPreference = 'SilentlyContinue'
94462
94504
  $sid = New-Object System.Security.Principal.SecurityIdentifier($env:LA_SID)
94463
94505
  if ($env:LA_KIND -eq 'dir') {
94464
94506
  $acl = New-Object System.Security.AccessControl.DirectorySecurity
@@ -94471,9 +94513,10 @@ $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($sid,
94471
94513
  [System.Security.AccessControl.FileSystemRights]::FullControl, $inherit,
94472
94514
  [System.Security.AccessControl.PropagationFlags]::None, [System.Security.AccessControl.AccessControlType]::Allow)
94473
94515
  $acl.SetAccessRuleProtection($true, $false)
94474
- $acl.SetOwner($sid)
94475
94516
  $acl.AddAccessRule($rule)
94476
- Set-Acl -LiteralPath $env:LA_PATH -AclObject $acl
94517
+ $ownerSet = & { $ErrorActionPreference = 'Continue'; & icacls.exe $env:LA_PATH /setowner "*$($env:LA_SID)" 2>&1 | ForEach-Object { "$_" } }
94518
+ if ($LASTEXITCODE -ne 0) { throw "setowner failed: $ownerSet" }
94519
+ (Get-Item -LiteralPath $env:LA_PATH -Force).SetAccessControl($acl)
94477
94520
  Write-Output 'applied'
94478
94521
  `;
94479
94522
  DESCRIBE_DACL_SCRIPT = String.raw`
@@ -94530,36 +94573,51 @@ public static class LaSddl {
94530
94573
  GUID_FIELD = /^(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})?$/;
94531
94574
  });
94532
94575
 
94576
+ // packages/device-service-core/src/local-api/secure-windows.ts
94577
+ var REPARSE_POINT = 1024, LEVEL_READ, ADMINISTRATORS;
94578
+ var init_secure_windows = __esm(() => {
94579
+ init_dacl();
94580
+ init_errors4();
94581
+ LEVEL_READ = String.raw`$attributes = [int](Get-Item -LiteralPath $env:OMO_LEVEL_PATH -Force).Attributes
94582
+ $sddl = ''
94583
+ if (($attributes -band ${REPARSE_POINT}) -eq 0) { $sddl = [LaSddl]::Read($env:OMO_LEVEL_PATH) }
94584
+ ConvertTo-Json -Compress -InputObject ([pscustomobject]@{ attributes = $attributes; sddl = $sddl })`;
94585
+ ADMINISTRATORS = new Set(["BA", "S-1-5-32-544"]);
94586
+ });
94587
+
94533
94588
  // packages/device-service-core/src/local-api/access.ts
94534
94589
  import {
94535
94590
  chmodSync as chmodSync8,
94536
- closeSync as closeSync5,
94537
- lstatSync as lstatSync7,
94538
- openSync as openSync5,
94539
- readFileSync as readFileSync46,
94591
+ closeSync as closeSync6,
94592
+ lstatSync as lstatSync8,
94593
+ mkdirSync as mkdirSync21,
94594
+ openSync as openSync6,
94595
+ readFileSync as readFileSync45,
94540
94596
  renameSync as renameSync10,
94541
94597
  rmSync as rmSync10,
94542
94598
  writeFileSync as writeFileSync18
94543
94599
  } from "node:fs";
94544
- import { join as join121 } from "node:path";
94545
- var TOKEN_FILE = "token", TOKEN_BYTES = 32, SOCKET_FILE = "service.sock", insecure = (detail) => {
94546
- throw new LocalApiError("insecure_state_dir", detail);
94547
- }, UNIX_ENDPOINT = "unix", tcpEndpoint = (port) => `tcp:${port}`, isMissing = (error) => typeof error === "object" && error !== null && ("code" in error) && (error.code === "ENOENT" || error.code === "ENOTDIR"), currentUid = () => process.getuid?.() ?? insecure("this platform has no uid"), privateEntry = (path, kind, uid, checkMode = true) => {
94600
+ import { dirname as dirname50, join as join121 } from "node:path";
94601
+ var TOKEN_FILE = "token", TOKEN_BYTES = 32, SOCKET_FILE = "service.sock", insecure = (detail, cause) => {
94602
+ throw new LocalApiError("insecure_state_dir", detail, {
94603
+ ...cause === undefined ? {} : { insecure_cause: cause }
94604
+ });
94605
+ }, UNIX_ENDPOINT = "unix", tcpEndpoint = (port) => `tcp:${port}`, isMissing = (error) => typeof error === "object" && error !== null && ("code" in error) && (error.code === "ENOENT" || error.code === "ENOTDIR"), currentUid = () => process.getuid?.() ?? insecure("this platform has no uid", "unreadable"), privateEntry = (path, kind, uid, checkMode = true) => {
94548
94606
  let stat;
94549
94607
  try {
94550
- stat = lstatSync7(path);
94608
+ stat = lstatSync8(path);
94551
94609
  } catch (error) {
94552
94610
  if (isMissing(error))
94553
- return insecure(`the ${kind} is missing`);
94611
+ return insecure(`the ${kind} is missing`, "unreadable");
94554
94612
  throw error;
94555
94613
  }
94556
94614
  const isKind = kind === "dir" ? stat.isDirectory() : kind === "socket" ? stat.isSocket() : stat.isFile();
94557
94615
  if (!isKind)
94558
- insecure(`the ${kind} is not a plain ${kind}`);
94616
+ insecure(`the ${kind} is not a plain ${kind}`, "reparse");
94559
94617
  if (stat.uid !== uid)
94560
- insecure(`the ${kind} belongs to another user`);
94618
+ insecure(`the ${kind} belongs to another user`, "owner_other");
94561
94619
  if (checkMode && (stat.mode & 63) !== 0)
94562
- insecure(`the ${kind} is open to group or others`);
94620
+ insecure(`the ${kind} is open to group or others`, "dacl_not_exact");
94563
94621
  }, checkPosixAccess = (stateDir) => {
94564
94622
  const uid = currentUid();
94565
94623
  privateEntry(stateDir, "dir", uid);
@@ -94573,7 +94631,7 @@ var TOKEN_FILE = "token", TOKEN_BYTES = 32, SOCKET_FILE = "service.sock", insecu
94573
94631
  }, readToken = (stateDir) => {
94574
94632
  let value;
94575
94633
  try {
94576
- value = readFileSync46(join121(stateDir, TOKEN_FILE), "utf8");
94634
+ value = readFileSync45(join121(stateDir, TOKEN_FILE), "utf8");
94577
94635
  } catch (error) {
94578
94636
  if (isMissing(error))
94579
94637
  return insecure("the token is missing");
@@ -94591,6 +94649,7 @@ var init_access = __esm(() => {
94591
94649
  init_errors4();
94592
94650
  init_proof();
94593
94651
  init_dacl();
94652
+ init_secure_windows();
94594
94653
  init_proof();
94595
94654
  });
94596
94655
 
@@ -94637,9 +94696,32 @@ var init_limits = __esm(() => {
94637
94696
  encoder2 = new TextEncoder;
94638
94697
  });
94639
94698
 
94699
+ // packages/device-service-core/src/local-api/policy.ts
94700
+ var POLICY_STATES, THIS_DEVICE_STATES, POLICY_WAITING_STATES, POLICY_WAIT_REASONS;
94701
+ var init_policy = __esm(() => {
94702
+ POLICY_STATES = ["off", "pending", "active"];
94703
+ THIS_DEVICE_STATES = [
94704
+ "unclassified",
94705
+ "desktop_unregistered",
94706
+ "indeterminate",
94707
+ "desktop",
94708
+ "cli_only",
94709
+ "acked"
94710
+ ];
94711
+ POLICY_WAITING_STATES = ["reported", "not_reported"];
94712
+ POLICY_WAIT_REASONS = [
94713
+ "not_acked",
94714
+ "discovery_missing",
94715
+ "discovery_incomplete",
94716
+ "inventory_mismatch",
94717
+ "other"
94718
+ ];
94719
+ });
94720
+
94640
94721
  // packages/device-service-core/src/local-api/vocabulary.ts
94641
- var LOCAL_API_VERSION = 1, STATUS_STATES, STATUS_UPDATE_PHASES, POLICY_STATES, THIS_DEVICE_STATES, CAPABILITIES, OPTIONAL_CAPABILITIES, REFUSED_REASONS, ROUND_STATES, ROUND_DEVICE_STATES, LISTING_SOURCES, SESSION_ROW_STATES, FILTER_KEYS, LISTING_SETTLED_BY_KINDS, BLOB_OF, BLOB_ABORT_REASONS, UPLOAD_ABORT_REASONS, DETACH_REASONS, UPDATE_NOTICE_PHASES, UPDATE_POLICIES, ATTACH_PENDING_REASONS, COMMAND_ID_CHARS = 22, COMMAND_STATES, COMMAND_UNCERTAIN_REASONS, COMMAND_REFUSAL_REASONS, RETRYABLE_STATES, ERROR_CODES, ALIAS_INCOMPLETE_REASONS, PATH_REFUSAL_PROBLEMS, MACHINE_OP_STATES, MACHINE_STATES, MACHINE_LOOKUP_STATES, MACHINE_BLOB_ABORT_REASONS, CHANNEL_CLOSED_REASONS;
94722
+ var LOCAL_API_VERSION = 1, STATUS_STATES, STATUS_UPDATE_PHASES, CAPABILITIES, OPTIONAL_CAPABILITIES, REFUSED_REASONS, ROUND_STATES, ROUND_DEVICE_STATES, LISTING_SOURCES, SESSION_ROW_STATES, FILTER_KEYS, LISTING_SETTLED_BY_KINDS, BLOB_OF, BLOB_ABORT_REASONS, UPLOAD_ABORT_REASONS, DETACH_REASONS, UPDATE_NOTICE_PHASES, UPDATE_POLICIES, ATTACH_PENDING_REASONS, COMMAND_ID_CHARS = 22, COMMAND_STATES, COMMAND_UNCERTAIN_REASONS, COMMAND_REFUSAL_REASONS, RETRYABLE_STATES, ERROR_CODES, ALIAS_INCOMPLETE_REASONS, PATH_REFUSAL_PROBLEMS, MACHINE_OP_STATES, MACHINE_STATES, MACHINE_LOOKUP_STATES, MACHINE_BLOB_ABORT_REASONS, CHANNEL_CLOSED_REASONS;
94642
94723
  var init_vocabulary = __esm(() => {
94724
+ init_policy();
94643
94725
  STATUS_STATES = [
94644
94726
  "not_configured",
94645
94727
  "disabled",
@@ -94657,15 +94739,6 @@ var init_vocabulary = __esm(() => {
94657
94739
  "fail_closed"
94658
94740
  ];
94659
94741
  STATUS_UPDATE_PHASES = ["trial", "committed"];
94660
- POLICY_STATES = ["off", "pending", "active"];
94661
- THIS_DEVICE_STATES = [
94662
- "unclassified",
94663
- "desktop_unregistered",
94664
- "indeterminate",
94665
- "desktop",
94666
- "cli_only",
94667
- "acked"
94668
- ];
94669
94742
  CAPABILITIES = ["sessions", "devices", "enforcement", "upgrade", "control"];
94670
94743
  OPTIONAL_CAPABILITIES = ["machine"];
94671
94744
  REFUSED_REASONS = ["version", "data_home_required", "malformed"];
@@ -94767,6 +94840,7 @@ var init_vocabulary = __esm(() => {
94767
94840
  "epoch_step_exceeded",
94768
94841
  "route_unlisted",
94769
94842
  "rate_limited",
94843
+ "unbound",
94770
94844
  "unknown_reason"
94771
94845
  ];
94772
94846
  RETRYABLE_STATES = [
@@ -95102,7 +95176,7 @@ var init_client_listing = __esm(() => {
95102
95176
  });
95103
95177
 
95104
95178
  // packages/device-service-core/src/local-api/session-ref.ts
95105
- var KEY_CHARS = 22, MIN_CHARS, MAX_CHARS, isStreamSessionKey = (v) => {
95179
+ var KEY_CHARS = 22, MIN_CHARS, MAX_CHARS2, isStreamSessionKey = (v) => {
95106
95180
  try {
95107
95181
  validateStreamSessionKey(v);
95108
95182
  return true;
@@ -95114,7 +95188,7 @@ var KEY_CHARS = 22, MIN_CHARS, MAX_CHARS, isStreamSessionKey = (v) => {
95114
95188
  }, parseSessionRef = (v) => {
95115
95189
  if (typeof v !== "string" || !v.isWellFormed())
95116
95190
  return;
95117
- if (v.length < MIN_CHARS || v.length > MAX_CHARS || v[v.length - KEY_CHARS - 1] !== ".")
95191
+ if (v.length < MIN_CHARS || v.length > MAX_CHARS2 || v[v.length - KEY_CHARS - 1] !== ".")
95118
95192
  return;
95119
95193
  const device = v.slice(0, -KEY_CHARS - 1);
95120
95194
  const key = v.slice(-KEY_CHARS);
@@ -95127,7 +95201,7 @@ var KEY_CHARS = 22, MIN_CHARS, MAX_CHARS, isStreamSessionKey = (v) => {
95127
95201
  var init_session_ref = __esm(() => {
95128
95202
  init_spec_proto();
95129
95203
  MIN_CHARS = KEY_CHARS + 2;
95130
- MAX_CHARS = KEY_CHARS + 65;
95204
+ MAX_CHARS2 = KEY_CHARS + 65;
95131
95205
  CONTROL = /[\u0000-\u001f\u007f-\u009f]/;
95132
95206
  });
95133
95207
 
@@ -95216,11 +95290,20 @@ var CODE, ATTACH_ID_MAX = 4294967295, MILLIS_MAX, deviceId = (v, what = "device"
95216
95290
  id: deviceId(m["id"], `${what}.id`),
95217
95291
  name: text(m["name"], LABEL_MAX_CHARS, `${what}.name`)
95218
95292
  };
95293
+ }, blockerOf = (v) => {
95294
+ const m = known(v, ["device", "label", "reason", "action"], [], "policy.blocker");
95295
+ return {
95296
+ device: deviceId(m["device"]),
95297
+ label: text(m["label"], LABEL_MAX_CHARS, "policy.blocker.label", 0),
95298
+ reason: oneOf(POLICY_WAIT_REASONS, m["reason"], "policy.blocker.reason"),
95299
+ action: nullable2(m["action"], (a) => text(a, REASON_MAX_CHARS, "policy.blocker.action"))
95300
+ };
95219
95301
  }, policyOf = (v) => {
95220
- const m = known(v, ["state", "generation", "this_device", "homes_pending", "unacked"], [], "policy");
95302
+ const m = known(v, ["state", "generation", "this_device", "homes_pending", "unacked"], ["waiting", "blocker"], "policy");
95221
95303
  const unacked = m["unacked"];
95222
95304
  if (!Array.isArray(unacked))
95223
95305
  return fail("policy.unacked");
95306
+ const { waiting, blocker } = m;
95224
95307
  return {
95225
95308
  state: oneOf(POLICY_STATES, m["state"], "policy.state"),
95226
95309
  generation: millis(m["generation"], "policy.generation"),
@@ -95232,7 +95315,9 @@ var CODE, ATTACH_ID_MAX = 4294967295, MILLIS_MAX, deviceId = (v, what = "device"
95232
95315
  device: deviceId(entry["device"]),
95233
95316
  label: text(entry["label"], LABEL_MAX_CHARS, "label", 0)
95234
95317
  };
95235
- })
95318
+ }),
95319
+ ...waiting === undefined ? {} : { waiting: oneOf(POLICY_WAITING_STATES, waiting, "policy.waiting") },
95320
+ ...blocker === undefined ? {} : { blocker: blockerOf(blocker) }
95236
95321
  };
95237
95322
  }, statusOf = (v) => {
95238
95323
  const m = known(v, ["state", "since_ms", "device", "origin_configured", "enabled"], ["detail", "policy", "update", "exe"], "status");
@@ -96266,14 +96351,47 @@ var ROW_FIELDS, ROW_KIND, rowLinks = (m) => {
96266
96351
  return fail("settled_by");
96267
96352
  const by = settledByOf(reason);
96268
96353
  return by === undefined ? { settled } : { settled, settled_by: by };
96354
+ }, ENGINE_VERSION_MAX_CHARS = 128, WAIT_KINDS, WAIT_UNTIL_MAX_CHARS = 27, waitUntil = (v) => {
96355
+ const until = text(v, WAIT_UNTIL_MAX_CHARS, "waiting until");
96356
+ const ms = Date.parse(until);
96357
+ return Number.isFinite(ms) && new Date(ms).toISOString() === until ? until : fail("waiting until");
96358
+ }, waitingOf = (v) => {
96359
+ const m = known(v, ["kind", "attempt", "maxAttempts", "delayMs", "until"], [], "waiting");
96360
+ const maxAttempts = uint(m["maxAttempts"], 1, Number.MAX_SAFE_INTEGER, "waiting maxAttempts");
96361
+ return {
96362
+ kind: oneOf(WAIT_KINDS, m["kind"], "waiting kind"),
96363
+ attempt: uint(m["attempt"], 1, maxAttempts, "waiting attempt"),
96364
+ maxAttempts,
96365
+ delayMs: uint(m["delayMs"], 0, Number.MAX_SAFE_INTEGER, "waiting delayMs"),
96366
+ until: waitUntil(m["until"])
96367
+ };
96368
+ }, rowHolder = (m) => {
96369
+ const waiting = m["waiting"];
96370
+ const version = m["engine_version"];
96371
+ return {
96372
+ ...waiting === undefined ? {} : { waiting: waitingOf(waiting) },
96373
+ ...version === undefined ? {} : { engine_version: text(version, ENGINE_VERSION_MAX_CHARS, "engine_version") }
96374
+ };
96269
96375
  }, listingRowOf = (v) => {
96270
- const m = known(v, ROW_FIELDS, ["kind", "parent", "parent_listed", "durable_id", "model", "archived", "settled", "settled_by"], "listing row");
96376
+ const m = known(v, ROW_FIELDS, [
96377
+ "kind",
96378
+ "parent",
96379
+ "parent_listed",
96380
+ "durable_id",
96381
+ "model",
96382
+ "archived",
96383
+ "settled",
96384
+ "settled_by",
96385
+ "waiting",
96386
+ "engine_version"
96387
+ ], "listing row");
96271
96388
  const durable = m["durable_id"];
96272
96389
  const archived = m["archived"];
96273
96390
  return {
96274
96391
  ...rowLinks(m),
96275
96392
  ...rowModel(m["model"]),
96276
96393
  ...rowSettled(m),
96394
+ ...rowHolder(m),
96277
96395
  ...archived === undefined ? {} : { archived: archived === true ? true : fail("archived") },
96278
96396
  ...durable === undefined ? {} : { durable_id: text(durable, SESSION_ID_MAX_CHARS, "durable_id") },
96279
96397
  device: deviceId(m["device"]),
@@ -96304,6 +96422,7 @@ var init_validate_listing_row = __esm(() => {
96304
96422
  "as_of"
96305
96423
  ];
96306
96424
  ROW_KIND = new RegExp(`^[a-z][a-z0-9_-]{0,${SESSION_KIND_MAX_CHARS - 1}}$`);
96425
+ WAIT_KINDS = ["rate_limit", "retry"];
96307
96426
  });
96308
96427
 
96309
96428
  // packages/device-service-core/src/local-api/validate-events.ts
@@ -96513,7 +96632,7 @@ var init_validate_session_wake = __esm(() => {
96513
96632
  });
96514
96633
 
96515
96634
  // packages/device-service-core/src/local-api/validate-requests.ts
96516
- var ENVIRONMENTS_MAX2 = 1024, PKCS8_KEY_BYTES = 48, PKCS8_PREFIX, pkcs8 = (v, algorithm, what) => {
96635
+ var ENVIRONMENTS_MAX2 = 1024, LISTING_ROWS, PKCS8_KEY_BYTES = 48, PKCS8_PREFIX, pkcs8 = (v, algorithm, what) => {
96517
96636
  const bytes = base64Bytes(v, PKCS8_KEY_BYTES, what);
96518
96637
  const prefix = toHex(bytes.subarray(0, 16));
96519
96638
  const exact = bytes.length === PKCS8_KEY_BYTES && prefix === PKCS8_PREFIX[algorithm];
@@ -96561,6 +96680,7 @@ var init_validate_requests = __esm(() => {
96561
96680
  init_validate_session_wake();
96562
96681
  init_validate_update();
96563
96682
  init_vocabulary();
96683
+ LISTING_ROWS = [2, 3, 4, 5, 6, 7];
96564
96684
  PKCS8_PREFIX = {
96565
96685
  ed25519: "302e020100300506032b657004220420",
96566
96686
  x25519: "302e020100300506032b656e04220420"
@@ -96659,13 +96779,11 @@ var init_validate_requests = __esm(() => {
96659
96779
  },
96660
96780
  "sessions.list": (v, id) => {
96661
96781
  const { filter, rows } = requestFields(v, [], ["filter", "rows"]);
96662
- if (rows !== undefined && rows !== 2 && rows !== 3 && rows !== 4 && rows !== 5)
96663
- return fail("rows");
96664
96782
  return {
96665
96783
  id,
96666
96784
  type: "sessions.list",
96667
96785
  ...filter === undefined ? {} : { filter: filterOf(filter) },
96668
- ...rows === undefined ? {} : { rows }
96786
+ ...rows === undefined ? {} : { rows: LISTING_ROWS.find((r) => r === rows) ?? fail("rows") }
96669
96787
  };
96670
96788
  },
96671
96789
  "session.attach": (v, id) => {
@@ -97396,7 +97514,7 @@ var init_client_open = __esm(() => {
97396
97514
  });
97397
97515
 
97398
97516
  // packages/device-service-core/src/local-api/transport.ts
97399
- import { lstatSync as lstatSync8, readFileSync as readFileSync47, unlinkSync as unlinkSync11 } from "node:fs";
97517
+ import { lstatSync as lstatSync9, readFileSync as readFileSync46, unlinkSync as unlinkSync11 } from "node:fs";
97400
97518
  import { createConnection, createServer as createServer4 } from "node:net";
97401
97519
  import { join as join122 } from "node:path";
97402
97520
  var ENDPOINT_FILE = "endpoint.json", wrap = (socket, endpoint) => {
@@ -97431,7 +97549,7 @@ var ENDPOINT_FILE = "endpoint.json", wrap = (socket, endpoint) => {
97431
97549
  }
97432
97550
  };
97433
97551
  }, readEndpointPort = (stateDir) => {
97434
- const parsed = JSON.parse(readFileSync47(join122(stateDir, ENDPOINT_FILE), "utf8"));
97552
+ const parsed = JSON.parse(readFileSync46(join122(stateDir, ENDPOINT_FILE), "utf8"));
97435
97553
  const port = typeof parsed === "object" && parsed !== null ? Reflect.get(parsed, "port") : undefined;
97436
97554
  if (typeof port !== "number" || !Number.isInteger(port) || port < 1 || port > 65535)
97437
97555
  throw new LocalApiError("insecure_state_dir", "endpoint.json holds no port");
@@ -97939,7 +98057,7 @@ var init_refused_before_sending = __esm(() => {
97939
98057
 
97940
98058
  // packages/device-service-core/src/listing-rows.ts
97941
98059
  function newestRowsListing(client) {
97942
- let rows = 4;
98060
+ let rows = 7;
97943
98061
  return async function list(filter, onRevision) {
97944
98062
  for (;; ) {
97945
98063
  try {
@@ -97947,13 +98065,15 @@ function newestRowsListing(client) {
97947
98065
  } catch (error) {
97948
98066
  if (rows === undefined || !(error instanceof LocalApiError) || error.code !== "invalid_request")
97949
98067
  throw error;
97950
- rows = rows === 4 ? 3 : rows === 3 ? 2 : undefined;
98068
+ rows = OLDER[rows];
97951
98069
  }
97952
98070
  }
97953
98071
  };
97954
98072
  }
98073
+ var OLDER;
97955
98074
  var init_listing_rows = __esm(() => {
97956
98075
  init_errors4();
98076
+ OLDER = { 7: 6, 6: 5, 5: 4, 4: 3, 3: 2, 2: undefined };
97957
98077
  });
97958
98078
 
97959
98079
  // packages/device-service-core/src/minimum-in-effect.ts
@@ -97998,9 +98118,9 @@ var init_version2 = __esm(() => {
97998
98118
  });
97999
98119
 
98000
98120
  // packages/device-service-core/src/state-dir.ts
98001
- import { readFileSync as readFileSync48, statSync as statSync10 } from "node:fs";
98121
+ import { readFileSync as readFileSync47, statSync as statSync10 } from "node:fs";
98002
98122
  import { homedir as homedir36 } from "node:os";
98003
- import { dirname as dirname50, join as join124, posix as posix17, win32 as win3212 } from "node:path";
98123
+ import { dirname as dirname51, join as join124, posix as posix17, win32 as win3212 } from "node:path";
98004
98124
  function defaultStateDir(platform, env, home) {
98005
98125
  if (platform !== "win32")
98006
98126
  return join124(home, ".omo", "device-service");
@@ -98009,7 +98129,7 @@ function defaultStateDir(platform, env, home) {
98009
98129
  }
98010
98130
  function discoveredStateDir(platform, defaultDir) {
98011
98131
  try {
98012
- const parsed = JSON.parse(readFileSync48(join124(dirname50(defaultDir), LOCATION_FILE), "utf8"));
98132
+ const parsed = JSON.parse(readFileSync47(join124(dirname51(defaultDir), LOCATION_FILE), "utf8"));
98013
98133
  if (typeof parsed !== "object" || parsed === null || !("v" in parsed) || !("state_dir" in parsed))
98014
98134
  return;
98015
98135
  const { v, state_dir: stateDir } = parsed;
@@ -103795,6 +103915,10 @@ var PERMISSION_PRESETS;
103795
103915
  var init_permission_presets = __esm(() => {
103796
103916
  PERMISSION_PRESETS = ["full-access", "workspace", "accept-edits", "auto", "read-only", "ask"];
103797
103917
  });
103918
+
103919
+ // packages/omo-senpi/src/components/thread/remote/ports.ts
103920
+ var init_ports = () => {};
103921
+
103798
103922
  // packages/omo-senpi/src/components/thread/errors.ts
103799
103923
  function isThreadErrorCode(value) {
103800
103924
  return typeof value === "string" && CODE_SET.has(value);
@@ -103913,6 +104037,7 @@ var init_refusals = __esm(() => {
103913
104037
  // packages/omo-senpi/src/components/thread/remote/address-book.ts
103914
104038
  var REMOTE_NOT_SET_UP;
103915
104039
  var init_address_book = __esm(() => {
104040
+ init_ports();
103916
104041
  REMOTE_NOT_SET_UP = new Set(["not_configured", "disabled", "signed_out", "sign_in_required"]);
103917
104042
  });
103918
104043
 
@@ -108901,6 +109026,7 @@ var init_session_host = __esm(() => {
108901
109026
 
108902
109027
  // packages/omo-senpi/src/components/thread/control/relay-session-host.ts
108903
109028
  var init_relay_session_host = __esm(() => {
109029
+ init_ports();
108904
109030
  init_errors5();
108905
109031
  init_initial_skills();
108906
109032
  init_outcome();
@@ -109196,6 +109322,7 @@ var init_find_session = __esm(() => {
109196
109322
  // packages/omo-senpi/src/components/thread/remote/relay-transport.ts
109197
109323
  var ADMIT_UNSUPPORTED, WAITS;
109198
109324
  var init_relay_transport = __esm(() => {
109325
+ init_ports();
109199
109326
  init_errors5();
109200
109327
  init_bindings();
109201
109328
  init_provenance2();
@@ -109279,6 +109406,7 @@ var init_factories = __esm(() => {
109279
109406
  var init_holder = __esm(() => {
109280
109407
  init_account();
109281
109408
  init_outcome();
109409
+ init_ports();
109282
109410
  init_refusals();
109283
109411
  });
109284
109412
 
@@ -109292,6 +109420,7 @@ var init_ladder = __esm(() => {
109292
109420
  var init_probe = __esm(() => {
109293
109421
  init_errors5();
109294
109422
  init_address_book();
109423
+ init_ports();
109295
109424
  init_remote_ops();
109296
109425
  init_account();
109297
109426
  init_refusals();
@@ -115300,14 +115429,69 @@ function nodeErrorCode6(error) {
115300
115429
  // packages/omo-senpi/src/install/install-senpi.ts
115301
115430
  init_resolve_agent_home();
115302
115431
  import { execFile as execFile3 } from "node:child_process";
115303
- import { existsSync as existsSync31 } from "node:fs";
115432
+ import { existsSync as existsSync30 } from "node:fs";
115304
115433
  import { homedir as homedir12 } from "node:os";
115305
115434
  import { dirname as dirname26, join as join67, resolve as resolve20 } from "node:path";
115306
115435
  import { fileURLToPath } from "node:url";
115307
115436
  import { promisify as promisify2 } from "node:util";
115308
115437
 
115438
+ // packages/omo-senpi/src/install/launcher-ownership.ts
115439
+ import { closeSync as closeSync4, lstatSync as lstatSync4, openSync as openSync4, readSync } from "node:fs";
115440
+ var SHEBANG = `#!/usr/bin/env node
115441
+ `;
115442
+ var MARKER_TAIL = `: generated by the omo-senpi installer. Delete this file to remove the local launcher.
115443
+ `;
115444
+ var LAUNCHER_HEADER = `${SHEBANG}// omo-local-launcher v2${MARKER_TAIL}`;
115445
+ var LEGACY_LAUNCHER_HEADER = `${SHEBANG}// omo-local-launcher${MARKER_TAIL}`;
115446
+ var OWNED_HEADERS = [LAUNCHER_HEADER, LEGACY_LAUNCHER_HEADER].map((header) => Buffer.from(header, "utf8"));
115447
+ var LAUNCHER_CMD_SHIM = `@echo off\r
115448
+ node "%~dp0omo" %*\r
115449
+ `;
115450
+ var OWNED_CMD = Buffer.from(LAUNCHER_CMD_SHIM, "utf8");
115451
+ var MAX_SHIM_BYTES = 64 * 1024;
115452
+ function readPrefix(path, length) {
115453
+ const fd = openSync4(path, "r");
115454
+ try {
115455
+ const buffer = Buffer.alloc(length);
115456
+ const read = readSync(fd, buffer, 0, length, 0);
115457
+ return buffer.subarray(0, read);
115458
+ } finally {
115459
+ closeSync4(fd);
115460
+ }
115461
+ }
115462
+ function classify(path, isOwned, prefixBytes, io) {
115463
+ let stat;
115464
+ try {
115465
+ stat = lstatSync4(path);
115466
+ } catch (error) {
115467
+ if (error.code === "ENOENT")
115468
+ return { kind: "absent" };
115469
+ return { kind: "foreign", reason: `it cannot be inspected (${error.code ?? "error"})` };
115470
+ }
115471
+ if (stat.isSymbolicLink())
115472
+ return { kind: "foreign", reason: "it is a symbolic link to another file" };
115473
+ if (!stat.isFile())
115474
+ return { kind: "foreign", reason: "it is not a regular file" };
115475
+ if (stat.size > MAX_SHIM_BYTES)
115476
+ return { kind: "foreign", reason: `it is ${stat.size} bytes, larger than any launcher this installer writes` };
115477
+ let prefix;
115478
+ try {
115479
+ prefix = io.readPrefix(path, prefixBytes);
115480
+ } catch (error) {
115481
+ return { kind: "foreign", reason: `it cannot be read (${error.code ?? "error"})` };
115482
+ }
115483
+ return isOwned(prefix, stat.size) ? { kind: "owned" } : { kind: "foreign", reason: "it does not start with this installer's launcher header" };
115484
+ }
115485
+ var HEADER_BYTES = Math.max(...OWNED_HEADERS.map((header) => header.length));
115486
+ function launcherOwnership(path, io = { readPrefix }) {
115487
+ return classify(path, (prefix) => OWNED_HEADERS.some((header) => prefix.subarray(0, header.length).equals(header)), HEADER_BYTES, io);
115488
+ }
115489
+ function launcherCmdOwnership(path, io = { readPrefix }) {
115490
+ return classify(path, (prefix, size) => size === OWNED_CMD.length && prefix.equals(OWNED_CMD), OWNED_CMD.length, io);
115491
+ }
115492
+
115309
115493
  // packages/omo-senpi/src/install/local-launcher.ts
115310
- import { chmodSync as chmodSync4, existsSync as existsSync30, mkdirSync as mkdirSync13, readFileSync as readFileSync15, rmSync as rmSync5, writeFileSync as writeFileSync9 } from "node:fs";
115494
+ import { chmodSync as chmodSync4, mkdirSync as mkdirSync13, rmSync as rmSync5, writeFileSync as writeFileSync9 } from "node:fs";
115311
115495
  import { homedir as homedir11 } from "node:os";
115312
115496
  import { dirname as dirname23, join as join64, resolve as resolve18 } from "node:path";
115313
115497
 
@@ -115315,7 +115499,6 @@ import { dirname as dirname23, join as join64, resolve as resolve18 } from "node
115315
115499
  var OMO_BRAND_LOGO = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDI0IDEwMjQiPgogIDxwYXRoIGZpbGw9IiNGNEY0RjQiIGQ9Ik01MTIuMDAgMTAwLjUwIEM1OTEuMTMgMTAwLjUwIDY5Ny42NiAxMDIuMzcgNzQ5LjM5IDEwNi4yNyBDODAxLjExIDExMC4xNyA4MDIuMzUgMTE1Ljg0IDgyMi4zNSAxMjMuOTAgQzg0Mi4zNCAxMzEuOTYgODU2LjQwIDE0MS42OCA4NjkuMzYgMTU0LjY0IEM4ODIuMzIgMTY3LjYwIDg5Mi4wNCAxODEuNjYgOTAwLjEwIDIwMS42NSBDOTA4LjE2IDIyMS42NSA5MTMuODMgMjIyLjg5IDkxNy43MyAyNzQuNjEgQzkyMS42MyAzMjYuMzQgOTIzLjUwIDQzMi44NyA5MjMuNTAgNTEyLjAwIEM5MjMuNTAgNTkxLjEzIDkyMS42MyA2OTcuNjYgOTE3LjczIDc0OS4zOSBDOTEzLjgzIDgwMS4xMSA5MDguMTYgODAyLjM1IDkwMC4xMCA4MjIuMzUgQzg5Mi4wNCA4NDIuMzQgODgyLjMyIDg1Ni40MCA4NjkuMzYgODY5LjM2IEM4NTYuNDAgODgyLjMyIDg0Mi4zNCA4OTIuMDQgODIyLjM1IDkwMC4xMCBDODAyLjM1IDkwOC4xNiA4MDEuMTEgOTEzLjgzIDc0OS4zOSA5MTcuNzMgQzY5Ny42NiA5MjEuNjMgNTkxLjEzIDkyMy41MCA1MTIuMDAgOTIzLjUwIEM0MzIuODcgOTIzLjUwIDMyNi4zNCA5MjEuNjMgMjc0LjYxIDkxNy43MyBDMjIyLjg5IDkxMy44MyAyMjEuNjUgOTA4LjE2IDIwMS42NSA5MDAuMTAgQzE4MS42NiA4OTIuMDQgMTY3LjYwIDg4Mi4zMiAxNTQuNjQgODY5LjM2IEMxNDEuNjggODU2LjQwIDEzMS45NiA4NDIuMzQgMTIzLjkwIDgyMi4zNSBDMTE1Ljg0IDgwMi4zNSAxMTAuMTcgODAxLjExIDEwNi4yNyA3NDkuMzkgQzEwMi4zNyA2OTcuNjYgMTAwLjUwIDU5MS4xMyAxMDAuNTAgNTEyLjAwIEMxMDAuNTAgNDMyLjg3IDEwMi4zNyAzMjYuMzQgMTA2LjI3IDI3NC42MSBDMTEwLjE3IDIyMi44OSAxMTUuODQgMjIxLjY1IDEyMy45MCAyMDEuNjUgQzEzMS45NiAxODEuNjYgMTQxLjY4IDE2Ny42MCAxNTQuNjQgMTU0LjY0IEMxNjcuNjAgMTQxLjY4IDE4MS42NiAxMzEuOTYgMjAxLjY1IDEyMy45MCBDMjIxLjY1IDExNS44NCAyMjIuODkgMTEwLjE3IDI3NC42MSAxMDYuMjcgQzMyNi4zNCAxMDIuMzcgNDMyLjg3IDEwMC41MCA1MTIuMDAgMTAwLjUwWiIvPgogIDxnIHRyYW5zZm9ybT0ic2NhbGUoMC41KSI+CiAgICA8ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwyMDQ4LjAwMDAwMCkgc2NhbGUoMC4wNTAwMDAsLTAuMDUwMDAwKSI+CiAgICAgIDxwYXRoIGZpbGw9IiMwNDE2MTciIGZpbGwtcnVsZT0iZXZlbm9kZCIgZD0iTTkyNzAgMzIxNjcgYy0zMDkgLTY0IC00NTYgLTE1MiAtNjIxIC0zNzMgLTU2MiAtNzQ4IC03NzYgLTI2ODkKLTU0NyAtNDk4NCAxMTggLTExODcgMzI1IC0yNjAwIDU3MCAtMzg5MCAxNDMgLTc1MyAxNTIgLTY1MyAtMTI4IC0xMzgwIC00MDMKLTEwNDUgLTY0MyAtMTg3MyAtODEyIC0yODAwIC04NTMgLTQ2ODkgMTk3OSAtNzk4NiA3ODU4IC05MTQ4IDExNDAgLTIyNSAyNTE0Ci0zOTcgMzIwMiAtNDAwIGwzNjEgLTIgNzkgNTUgYzI2NCAxODIgMjEwIDY0MiAtMTExIDk0MiAtMzg3IDM2MiAtOTUwIDUzMgotMjgwMSA4NDUgLTMwMDQgNTA3IC00MjQ5IDk2NSAtNTUyMCAyMDMwIC0xMzU4IDExMzggLTIwMTIgMjg3OCAtMTgwOSA0ODEwCjU0NSA1MTk1IDY2MTcgODcyNiAxMzUyOSA3ODY2IDU1MDYgLTY4NCA5NDgwIC00MjU1IDk0ODAgLTg1MTggMCAtMjYwNyAtMTQ2MgotNDUyMiAtNDE1NyAtNTQ0OCAtOTI3IC0zMTggLTE1MzQgLTQ1OSAtMzIwMyAtNzQwIC0xODUxIC0zMTMgLTI0MTQgLTQ4MwotMjgwMSAtODQ1IC0zMjEgLTMwMCAtMzc1IC03NjAgLTExMSAtOTQyIGw3OSAtNTUgMzYxIDIgYzY4OCAzIDIwNjIgMTc1IDMyMDIKNDAwIDU4NzkgMTE2MiA4NzExIDQ0NTkgNzg1OCA5MTQ4IC0xNjkgOTI3IC00MDkgMTc1NSAtODEyIDI4MDAgLTI4MCA3MjcKLTI3MSA2MjcgLTEyOCAxMzgwIDI0NSAxMjkwIDQ1MiAyNzAzIDU3MCAzODkwIDI3MSAyNzIwIC03NyA0ODYxIC04NTUgNTI1OQotNzU4IDM4OCAtMjMxMCAtMjM4IC01MDIxIC0yMDI0IC04NjggLTU3MSAtNzY0IC01NTcgLTE0ODkgLTIxMSAtMzI3MSAxNTU4Ci02NzU1IDE1NTggLTEwMDI2IDAgLTcyNSAtMzQ2IC02MjEgLTM2MCAtMTQ4OSAyMTEgLTIzNzEgMTU2MiAtMzk1OSAyMjc4Ci00NzA4IDIxMjJ6IG00MTMyIC0zMzQ1IGMxNzUgLTE3NSAxMjQgLTI2OCAtNDA5IC03MzkgLTEwMjggLTkxMCAtMTk5NSAtMjA1MwotMjcxMyAtMzIwOSAtOTcgLTE1NiAtMjAwIC0zMTggLTIyOCAtMzU5IC0yMjEgLTMyMSAtNjQ2IC03NiAtNDY5IDI3MCAxNTMKMzAxIDg4MyAxMzM0IDEzODggMTk2NSA1NzggNzIzIDE0NjYgMTYxNCAyMDI5IDIwMzUgMTkxIDE0MiAyODggMTUxIDQwMiAzN3oKbTE0NTA3IC0xIGM0OTYgLTM0MSAxNDgyIC0xMzIzIDIwODAgLTIwNzEgNTA1IC02MzEgMTIzNSAtMTY2NCAxMzg4IC0xOTY1CjE3NyAtMzQ2IC0yNDggLTU5MSAtNDY5IC0yNzAgLTI4IDQxIC0xMzEgMjAzIC0yMjggMzU5IC03MTggMTE1NiAtMTY4NSAyMjk5Ci0yNzEzIDMyMDkgLTUzNSA0NzMgLTU4NSA1NjQgLTQwNyA3NDIgMTAwIDEwMCAxOTkgOTkgMzQ5IC00eiBNMTk5MTAgMjUzMDggYy00MDM5IC0yMDUgLTcyMTIgLTE2NjYgLTkwODYgLTQxODQgLTE4NDAgLTI0NzMgLTE3NTMKLTU3OTQgMTk2IC03NTQwIDExNjEgLTEwNDAgMjQ0NyAtMTUxOCA1NDIwIC0yMDE1IDEzNzQgLTIyOSAxOTk4IC0zODAgMjQ1NgotNTkxIDc1NCAtMzQ4IDExNjMgLTEwMDAgMTAzMyAtMTY1MCAtMTAgLTQ5IC0xIC03MiA0NyAtMTI0IGw2MCAtNjQgNDQ0IDAKNDQ0IDAgNjAgNjQgYzQ4IDUyIDU3IDc1IDQ3IDEyNCAtMTMwIDY1MCAyNzkgMTMwMiAxMDMzIDE2NTAgNDU4IDIxMSAxMDgyCjM2MiAyNDU2IDU5MSAyOTczIDQ5NyA0MjU5IDk3NSA1NDIwIDIwMTUgMjA4NCAxODY2IDIwMjYgNTM3NCAtMTMxIDc5NTYKLTIwNjMgMjQ2OSAtNTk5NSAzOTY2IC05ODk5IDM3Njh6IG0tNDY0NCAtNDM3NCBjMTM1NiAtMzYwIDIyNzIgLTE5MDkgMTk5OAotMzM3OCAtNDI2IC0yMjc4IC0yODU2IC0zMTQ0IC00NDI0IC0xNTc2IC0xNDk3IDE0OTYgLTkyNCA0MjE4IDEwMzEgNDg5OSAzOTMKMTM3IDk5NiAxNjEgMTM5NSA1NXogbTExNDgwIDM1IGMxNDkxIC0yNjEgMjUwNCAtMTkyMSAyMTU0IC0zNTMyIC00ODcgLTIyNDcKLTMxMDggLTMwMjQgLTQ1MjUgLTEzNDEgLTE3MTkgMjA0MiAtMTI5IDUzMTAgMjM3MSA0ODczeiBtLTY5NDggLTI5ODAgYzE3MgotNDAgMzQxIC0xMzMgNDk1IC0yNzMgOTUgLTg2IDE0MyAtMTE2IDE4NyAtMTE2IDQ0IDAgOTIgMzAgMTg3IDExNiA3MTggNjUwCjE3MTYgMTg4IDE4NTQgLTg2MCAzNSAtMjY3IDE4IC05NjggLTI1IC0xMDQ4IC0xMTkgLTIxOSAtMzUwIC0yNTEgLTQ5MSAtNjgKLTY4IDg5IC03MyAxMjQgLTg1IDY3MCAtMTMgNjIzIC0yNSA2NzUgLTIwMCA4MzggLTIxMiAxOTggLTUxNiAxOTkgLTczNSAyCi0xODAgLTE2MSAtMTkyIC0yMTIgLTIwNSAtODQwIC0xMiAtNTQ2IC0xNyAtNTgxIC04NSAtNjcwIC0xMjIgLTE1OSAtMzA4Ci0xNTkgLTQzMCAwIC02OCA4OSAtNzMgMTI0IC04NSA2NzAgLTEzIDYyOCAtMjUgNjc5IC0yMDUgODQwIC0yMTkgMTk3IC01MjMKMTk2IC03MzUgLTIgLTE3NSAtMTYzIC0xODcgLTIxNSAtMjAwIC04MzggLTEyIC01NDYgLTE3IC01ODEgLTg1IC02NzAgLTE0MQotMTgzIC0zNzIgLTE1MSAtNDkxIDY4IC03NCAxMzYgLTU0IDEwMzkgMzAgMTMzMiAxNzAgNTk0IDc1OCA5NzggMTMwNCA4NDl6IE0xNDM0MCAyMDI5MCBjLTE4NTggLTM3MiAtMjIzMCAtMzIyOCAtNTQ2IC00MTkxIDEyODAgLTczMiAyNzg2IDMzOAoyNzg2IDE5ODEgMCAxMzkxIC0xMDY4IDI0NDUgLTIyNDAgMjIxMHogTTI1OTkwIDIwMjkxIGMtMTczMyAtMzQzIC0yMjA4IC0yOTgxIC03MzIgLTQwNjkgMTI4NyAtOTQ5IDI5ODEgMTA4CjI5ODIgMTg2MCAwIDEzOTIgLTEwNzAgMjQ0MyAtMjI1MCAyMjA5eiIvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg==";
115316
115500
 
115317
115501
  // packages/omo-senpi/src/install/local-launcher.ts
115318
- var MARKER = "omo-local-launcher";
115319
115502
  function localLauncherPath(homeDir = homedir11()) {
115320
115503
  return join64(homeDir, ".local", "bin", "omo");
115321
115504
  }
@@ -115348,9 +115531,7 @@ function renderLocalLauncher(options) {
115348
115531
  changelogUrl: "https://github.com/code-yeongyu/oh-my-openagent/releases"
115349
115532
  }
115350
115533
  };
115351
- return `#!/usr/bin/env node
115352
- // ${MARKER}: generated by the omo-senpi installer. Delete this file to remove the local launcher.
115353
- import { spawn } from "node:child_process"
115534
+ return `${LAUNCHER_HEADER}import { spawn } from "node:child_process"
115354
115535
  import { homedir } from "node:os"
115355
115536
  import { join } from "node:path"
115356
115537
 
@@ -115396,15 +115577,15 @@ child.on("close", (code, signal) => {
115396
115577
  }
115397
115578
  function installLocalLauncher(options) {
115398
115579
  const path = localLauncherPath(options.homeDir);
115399
- if (existsSync30(path) && !readFileSync15(path, "utf8").includes(MARKER))
115580
+ if (launcherOwnership(path).kind === "foreign")
115400
115581
  return;
115401
115582
  mkdirSync13(dirname23(path), { recursive: true });
115402
115583
  writeFileSync9(path, renderLocalLauncher(options));
115403
115584
  chmodSync4(path, 493);
115404
115585
  if ((options.platform ?? process.platform) === "win32") {
115405
- writeFileSync9(localLauncherCmdPath(options.homeDir), `@echo off\r
115406
- node "%~dp0omo" %*\r
115407
- `);
115586
+ const cmd = localLauncherCmdPath(options.homeDir);
115587
+ if (launcherCmdOwnership(cmd).kind !== "foreign")
115588
+ writeFileSync9(cmd, LAUNCHER_CMD_SHIM);
115408
115589
  }
115409
115590
  return path;
115410
115591
  }
@@ -115723,11 +115904,13 @@ async function runSenpiInstaller(options = {}) {
115723
115904
  const launcherPath = installLocalLauncher({
115724
115905
  pluginPath: context.pluginPath,
115725
115906
  senpiCliPath: join67(context.repoRoot, "packages", "coding-agent", "dist", "cli.js"),
115726
- homeDir: context.homeDir
115907
+ homeDir: context.homeDir,
115908
+ platform: context.platform
115727
115909
  });
115728
115910
  return {
115729
115911
  ok: true,
115730
115912
  action: "install",
115913
+ ...leftAloneReport(context.homeDir, context.platform),
115731
115914
  agentDir: context.agentDir,
115732
115915
  settingsPath: context.settingsPath,
115733
115916
  pluginPath: context.pluginPath,
@@ -115772,14 +115955,38 @@ function findRepoRoot2(importerDir) {
115772
115955
  throw new Error("Unable to locate packages/omo-senpi/plugin/package.json from installer module");
115773
115956
  }
115774
115957
  function fileExistsSync(path) {
115775
- return existsSync31(path);
115958
+ return existsSync30(path);
115959
+ }
115960
+ function leftAloneReport(homeDir, platform) {
115961
+ const candidates = [
115962
+ {
115963
+ file: "omo",
115964
+ path: localLauncherPath(homeDir),
115965
+ ownership: launcherOwnership(localLauncherPath(homeDir))
115966
+ },
115967
+ ...platform === "win32" ? [
115968
+ {
115969
+ file: "omo.cmd",
115970
+ path: localLauncherCmdPath(homeDir),
115971
+ ownership: launcherCmdOwnership(localLauncherCmdPath(homeDir))
115972
+ }
115973
+ ] : []
115974
+ ];
115975
+ const leftAlone = candidates.flatMap(({ file, path, ownership }) => ownership.kind === "foreign" ? [
115976
+ {
115977
+ file,
115978
+ path,
115979
+ reason: file === "omo.cmd" ? `${path} was left alone: it is not a wrapper this installer wrote (${ownership.reason}); the command omo still resolves to it` : `${path} was left alone: it is not a launcher this installer wrote (${ownership.reason})`
115980
+ }
115981
+ ] : []);
115982
+ return leftAlone.length === 0 ? {} : { launchersLeftAlone: leftAlone };
115776
115983
  }
115777
115984
  // packages/omo-opencode/src/cli/install-native-dev/index.ts
115778
115985
  async function runNativeDevInstaller(options) {
115779
115986
  return runSenpiInstaller(options);
115780
115987
  }
115781
115988
  // packages/omo-opencode/src/cli/install-native/legacy-omo-bin.ts
115782
- import { lstatSync as lstatSync4, readFileSync as readFileSync16, realpathSync as realpathSync8, statSync as statSync4 } from "node:fs";
115989
+ import { lstatSync as lstatSync5, readFileSync as readFileSync15, realpathSync as realpathSync8, statSync as statSync4 } from "node:fs";
115783
115990
  import { dirname as dirname27, isAbsolute as isAbsolute12, join as join68, posix as posix9, win32 as win325 } from "node:path";
115784
115991
  var NATIVE_OMO_PACKAGE = "omo-ai";
115785
115992
  var LEGACY_OMO_BIN_PACKAGES = ["oh-my-openagent", "oh-my-opencode", "lazycodex"];
@@ -115815,7 +116022,7 @@ function scanOmoBins(environment) {
115815
116022
  binPath,
115816
116023
  directory,
115817
116024
  onPath,
115818
- kind: classify(owner),
116025
+ kind: classify2(owner),
115819
116026
  packageName: owner?.name ?? null,
115820
116027
  packageVersion: owner?.version ?? null,
115821
116028
  shimPaths
@@ -115836,7 +116043,7 @@ function nativeOmoBin(entries) {
115836
116043
  function firstOmoBinOnPath(entries) {
115837
116044
  return entries.find((entry) => entry.onPath) ?? null;
115838
116045
  }
115839
- function classify(owner) {
116046
+ function classify2(owner) {
115840
116047
  if (owner === null)
115841
116048
  return "foreign";
115842
116049
  if (owner.name === NATIVE_OMO_PACKAGE)
@@ -115849,7 +116056,7 @@ function omoShimPathsIn(directory, isWindows) {
115849
116056
  }
115850
116057
  function pathExists(path) {
115851
116058
  try {
115852
- lstatSync4(path);
116059
+ lstatSync5(path);
115853
116060
  return true;
115854
116061
  } catch {
115855
116062
  return false;
@@ -115894,7 +116101,7 @@ function bunxEntryPaths(binPath) {
115894
116101
  try {
115895
116102
  if (!statSync4(sidecar).isFile())
115896
116103
  return [];
115897
- contents = readFileSync16(sidecar).toString("utf16le");
116104
+ contents = readFileSync15(sidecar).toString("utf16le");
115898
116105
  } catch {
115899
116106
  return [];
115900
116107
  }
@@ -115953,7 +116160,7 @@ function readShimText(path) {
115953
116160
  }
115954
116161
  function readWholeFile(path) {
115955
116162
  try {
115956
- return readFileSync16(path, "utf8");
116163
+ return readFileSync15(path, "utf8");
115957
116164
  } catch {
115958
116165
  return null;
115959
116166
  }
@@ -116211,12 +116418,12 @@ async function starGitHubRepositories(platform = "both", runCommand = runGitHubS
116211
116418
  init_provider_availability();
116212
116419
 
116213
116420
  // packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
116214
- import { existsSync as existsSync33, mkdirSync as mkdirSync14, readFileSync as readFileSync18 } from "node:fs";
116421
+ import { existsSync as existsSync32, mkdirSync as mkdirSync14, readFileSync as readFileSync17 } from "node:fs";
116215
116422
  import { join as join70 } from "node:path";
116216
116423
 
116217
116424
  // packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
116218
116425
  init_shared();
116219
- import { existsSync as existsSync32, readFileSync as readFileSync17 } from "node:fs";
116426
+ import { existsSync as existsSync31, readFileSync as readFileSync16 } from "node:fs";
116220
116427
  import { join as join69 } from "node:path";
116221
116428
  var TUI_SUBPATH = "tui";
116222
116429
  var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
@@ -116240,10 +116447,10 @@ function fileEntryPackageJsonPath(entry) {
116240
116447
  return join69(path, "package.json");
116241
116448
  }
116242
116449
  function packageJsonExportsTui(pkgJsonPath) {
116243
- if (!existsSync32(pkgJsonPath))
116450
+ if (!existsSync31(pkgJsonPath))
116244
116451
  return null;
116245
116452
  try {
116246
- const parsed = JSON.parse(readFileSync17(pkgJsonPath, "utf-8"));
116453
+ const parsed = JSON.parse(readFileSync16(pkgJsonPath, "utf-8"));
116247
116454
  if (parsed.exports === undefined)
116248
116455
  return null;
116249
116456
  if (typeof parsed.exports === "string")
@@ -116283,9 +116490,9 @@ function isOurFilePluginEntry(entry) {
116283
116490
  return false;
116284
116491
  try {
116285
116492
  const pkgJsonPath = fileEntryPackageJsonPath(entry);
116286
- if (!existsSync32(pkgJsonPath))
116493
+ if (!existsSync31(pkgJsonPath))
116287
116494
  return false;
116288
- const parsed = JSON.parse(readFileSync17(pkgJsonPath, "utf-8"));
116495
+ const parsed = JSON.parse(readFileSync16(pkgJsonPath, "utf-8"));
116289
116496
  return typeof parsed.name === "string" && ACCEPTED_PACKAGE_NAMES.includes(parsed.name);
116290
116497
  } catch (error) {
116291
116498
  log2("[tui-plugin-config] Failed to inspect file plugin package", {
@@ -116333,12 +116540,12 @@ function isCanonicalNamedTuiPluginEntry(entry) {
116333
116540
  }
116334
116541
  function detectServerPluginRegistration() {
116335
116542
  const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
116336
- const configPath = existsSync32(paths.configJsonc) ? paths.configJsonc : existsSync32(paths.configJson) ? paths.configJson : null;
116543
+ const configPath = existsSync31(paths.configJsonc) ? paths.configJsonc : existsSync31(paths.configJson) ? paths.configJson : null;
116337
116544
  if (!configPath) {
116338
116545
  return { registered: false, configPath: null, entry: null, packageExportsTui: null };
116339
116546
  }
116340
116547
  try {
116341
- const parsed = parseJsonc(readFileSync17(configPath, "utf-8"));
116548
+ const parsed = parseJsonc(readFileSync16(configPath, "utf-8"));
116342
116549
  const plugins = parsed.plugin ?? [];
116343
116550
  let serverEntry;
116344
116551
  for (const entry of plugins) {
@@ -116364,7 +116571,7 @@ function detectServerPluginRegistration() {
116364
116571
  }
116365
116572
  function detectTuiPluginRegistration() {
116366
116573
  const tuiJsonPath = join69(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
116367
- if (!existsSync32(tuiJsonPath)) {
116574
+ if (!existsSync31(tuiJsonPath)) {
116368
116575
  return {
116369
116576
  registered: false,
116370
116577
  configPath: tuiJsonPath,
@@ -116376,7 +116583,7 @@ function detectTuiPluginRegistration() {
116376
116583
  };
116377
116584
  }
116378
116585
  try {
116379
- const parsed = parseJsonc(readFileSync17(tuiJsonPath, "utf-8"));
116586
+ const parsed = parseJsonc(readFileSync16(tuiJsonPath, "utf-8"));
116380
116587
  const plugins = parsed.plugin ?? [];
116381
116588
  return {
116382
116589
  registered: plugins.some(isTuiPluginEntry),
@@ -116528,7 +116735,7 @@ init_shared();
116528
116735
  init_write_file_atomically();
116529
116736
  function readConfig(path) {
116530
116737
  try {
116531
- const parsed = parseJsonc(readFileSync18(path, "utf-8"));
116738
+ const parsed = parseJsonc(readFileSync17(path, "utf-8"));
116532
116739
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
116533
116740
  return parsed;
116534
116741
  }
@@ -116540,10 +116747,10 @@ function readConfig(path) {
116540
116747
  }
116541
116748
  function readServerConfig(configDir) {
116542
116749
  const jsoncPath = join70(configDir, "opencode.jsonc");
116543
- if (existsSync33(jsoncPath))
116750
+ if (existsSync32(jsoncPath))
116544
116751
  return readConfig(jsoncPath);
116545
116752
  const jsonPath = join70(configDir, "opencode.json");
116546
- if (existsSync33(jsonPath))
116753
+ if (existsSync32(jsonPath))
116547
116754
  return readConfig(jsonPath);
116548
116755
  return null;
116549
116756
  }
@@ -116578,7 +116785,7 @@ function desiredTuiEntry(serverEntry) {
116578
116785
  return null;
116579
116786
  }
116580
116787
  function readTuiConfig(tuiJsonPath) {
116581
- if (!existsSync33(tuiJsonPath)) {
116788
+ if (!existsSync32(tuiJsonPath)) {
116582
116789
  return { config: {}, malformed: false };
116583
116790
  }
116584
116791
  const config = readConfig(tuiJsonPath);
@@ -116619,15 +116826,15 @@ function ensureTuiPluginEntry(opts = {}) {
116619
116826
  // packages/omo-opencode/src/cli/config-manager/refresh-opencode-plugin-sandbox.ts
116620
116827
  init_shared();
116621
116828
  init_config_context();
116622
- import { existsSync as existsSync34, readFileSync as readFileSync19 } from "node:fs";
116829
+ import { existsSync as existsSync33, readFileSync as readFileSync18 } from "node:fs";
116623
116830
  import { join as join71 } from "node:path";
116624
116831
  function readPluginEntries(configDir) {
116625
116832
  for (const name of ["opencode.jsonc", "opencode.json"]) {
116626
116833
  const configPath = join71(configDir, name);
116627
- if (!existsSync34(configPath))
116834
+ if (!existsSync33(configPath))
116628
116835
  continue;
116629
116836
  try {
116630
- const parsed = parseJsonc(readFileSync19(configPath, "utf-8"));
116837
+ const parsed = parseJsonc(readFileSync18(configPath, "utf-8"));
116631
116838
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
116632
116839
  continue;
116633
116840
  return (parsed.plugin ?? []).filter((entry) => typeof entry === "string");
@@ -116674,12 +116881,12 @@ import { homedir as homedir14 } from "node:os";
116674
116881
  import { join as join72 } from "node:path";
116675
116882
 
116676
116883
  // packages/shared-skills/index.mjs
116677
- import { existsSync as existsSync35 } from "node:fs";
116884
+ import { existsSync as existsSync34 } from "node:fs";
116678
116885
  import { fileURLToPath as fileURLToPath2 } from "node:url";
116679
116886
  var SKILLS_PROBE_SPECIFIERS = ["./skills/", "../skills/", "../../skills/"];
116680
116887
  function sharedSkillsRootPath() {
116681
116888
  const candidates = SKILLS_PROBE_SPECIFIERS.map((specifier) => fileURLToPath2(new URL(specifier, import.meta.url)));
116682
- return candidates.find((candidate) => existsSync35(candidate)) ?? candidates[0];
116889
+ return candidates.find((candidate) => existsSync34(candidate)) ?? candidates[0];
116683
116890
  }
116684
116891
 
116685
116892
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
@@ -119291,7 +119498,7 @@ function getClaudeConfigDir() {
119291
119498
  return join73(getHomeDirectory(), ".claude");
119292
119499
  }
119293
119500
  // packages/skills-loader-core/src/shared/opencode-config-dir.ts
119294
- import { existsSync as existsSync36, realpathSync as realpathSync9 } from "node:fs";
119501
+ import { existsSync as existsSync35, realpathSync as realpathSync9 } from "node:fs";
119295
119502
  import { homedir as homedir15 } from "node:os";
119296
119503
  import { join as join74, posix as posix10, resolve as resolve21, win32 as win326 } from "node:path";
119297
119504
 
@@ -119343,7 +119550,7 @@ function resolveConfigPath2(pathValue) {
119343
119550
  return posix10.normalize(pathValue);
119344
119551
  }
119345
119552
  const resolvedPath = resolve21(pathValue);
119346
- if (!existsSync36(resolvedPath))
119553
+ if (!existsSync35(resolvedPath))
119347
119554
  return resolvedPath;
119348
119555
  try {
119349
119556
  return realpathSync9(resolvedPath);
@@ -119410,7 +119617,7 @@ function getOpenCodeConfigDir2(options) {
119410
119617
  const legacyDir = getCliConfigDir2();
119411
119618
  const legacyConfig = join74(legacyDir, "opencode.json");
119412
119619
  const legacyConfigC = join74(legacyDir, "opencode.jsonc");
119413
- if (existsSync36(legacyConfig) || existsSync36(legacyConfigC)) {
119620
+ if (existsSync35(legacyConfig) || existsSync35(legacyConfigC)) {
119414
119621
  return legacyDir;
119415
119622
  }
119416
119623
  }
@@ -119418,12 +119625,12 @@ function getOpenCodeConfigDir2(options) {
119418
119625
  }
119419
119626
  // packages/skills-loader-core/src/shared/project-discovery-dirs.ts
119420
119627
  import { execFileSync as execFileSync3 } from "node:child_process";
119421
- import { existsSync as existsSync37, realpathSync as realpathSync10 } from "node:fs";
119628
+ import { existsSync as existsSync36, realpathSync as realpathSync10 } from "node:fs";
119422
119629
  import { dirname as dirname28, join as join75, resolve as resolve22, win32 as win327 } from "node:path";
119423
119630
  var worktreePathCache2 = new Map;
119424
119631
  function normalizePath(path) {
119425
119632
  const resolvedPath = process.platform !== "win32" && win327.isAbsolute(path) ? path : resolve22(path);
119426
- if (!existsSync37(resolvedPath)) {
119633
+ if (!existsSync36(resolvedPath)) {
119427
119634
  return resolvedPath;
119428
119635
  }
119429
119636
  try {
@@ -119454,7 +119661,7 @@ function detectWorktreePath(directory) {
119454
119661
  }
119455
119662
  let ancestor = normalizePath(resolvedDirectory);
119456
119663
  while (true) {
119457
- if (existsSync37(join75(ancestor, ".git"))) {
119664
+ if (existsSync36(join75(ancestor, ".git"))) {
119458
119665
  worktreePathCache2.set(cacheKey, ancestor);
119459
119666
  return ancestor;
119460
119667
  }
@@ -121417,20 +121624,20 @@ function buildTaskRef(section, label) {
121417
121624
  };
121418
121625
  }
121419
121626
  // packages/boulder-state/src/top-level-task.ts
121420
- import { existsSync as existsSync38, readFileSync as readFileSync20 } from "node:fs";
121627
+ import { existsSync as existsSync37, readFileSync as readFileSync19 } from "node:fs";
121421
121628
  function readCurrentTopLevelTask(planPath) {
121422
- if (!existsSync38(planPath)) {
121629
+ if (!existsSync37(planPath)) {
121423
121630
  return null;
121424
121631
  }
121425
121632
  try {
121426
- const content = readFileSync20(planPath, "utf-8");
121633
+ const content = readFileSync19(planPath, "utf-8");
121427
121634
  return parseCurrentTopLevelTask(content);
121428
121635
  } catch {
121429
121636
  return null;
121430
121637
  }
121431
121638
  }
121432
121639
  // packages/boulder-state/src/storage/path.ts
121433
- import { existsSync as existsSync39 } from "node:fs";
121640
+ import { existsSync as existsSync38 } from "node:fs";
121434
121641
  import { isAbsolute as isAbsolute14, join as join78, relative as relative9, resolve as resolve24 } from "node:path";
121435
121642
  function getBoulderFilePath(directory) {
121436
121643
  return join78(directory, BOULDER_DIR, BOULDER_FILE);
@@ -121451,19 +121658,19 @@ function resolveBoulderPlanPath(directory, state) {
121451
121658
  }
121452
121659
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
121453
121660
  const worktreePlanPath = resolve24(absoluteWorktreePath, relativePlanPath);
121454
- return existsSync39(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
121661
+ return existsSync38(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
121455
121662
  }
121456
121663
  function resolveBoulderPlanPathForWork(directory, work) {
121457
121664
  return resolveBoulderPlanPath(directory, work);
121458
121665
  }
121459
121666
  // packages/boulder-state/src/storage/plan-progress.ts
121460
- import { existsSync as existsSync40, readFileSync as readFileSync21, readdirSync as readdirSync9, statSync as statSync5 } from "node:fs";
121667
+ import { existsSync as existsSync39, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as statSync5 } from "node:fs";
121461
121668
  function getPlanProgress(planPath) {
121462
- if (!existsSync40(planPath)) {
121669
+ if (!existsSync39(planPath)) {
121463
121670
  return { total: 0, completed: 0, isComplete: false };
121464
121671
  }
121465
121672
  try {
121466
- const content = readFileSync21(planPath, "utf-8");
121673
+ const content = readFileSync20(planPath, "utf-8");
121467
121674
  const checklist = parsePlanChecklist(content);
121468
121675
  return {
121469
121676
  total: checklist.total,
@@ -121542,14 +121749,14 @@ function selectMirrorWork(state) {
121542
121749
  return sorted[0] ?? null;
121543
121750
  }
121544
121751
  // packages/boulder-state/src/storage/read-state.ts
121545
- import { existsSync as existsSync41, readFileSync as readFileSync22 } from "node:fs";
121752
+ import { existsSync as existsSync40, readFileSync as readFileSync21 } from "node:fs";
121546
121753
  function readBoulderState(directory) {
121547
121754
  const filePath = getBoulderFilePath(directory);
121548
- if (!existsSync41(filePath)) {
121755
+ if (!existsSync40(filePath)) {
121549
121756
  return null;
121550
121757
  }
121551
121758
  try {
121552
- const content = readFileSync22(filePath, "utf-8");
121759
+ const content = readFileSync21(filePath, "utf-8");
121553
121760
  const parsed = JSON.parse(content);
121554
121761
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed) || Object.keys(parsed).length === 0) {
121555
121762
  return null;
@@ -121617,17 +121824,17 @@ init_state();
121617
121824
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
121618
121825
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
121619
121826
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
121620
- import { existsSync as existsSync42, mkdirSync as mkdirSync15, readFileSync as readFileSync23, rmSync as rmSync7, writeFileSync as writeFileSync10 } from "node:fs";
121827
+ import { existsSync as existsSync41, mkdirSync as mkdirSync15, readFileSync as readFileSync22, rmSync as rmSync7, writeFileSync as writeFileSync10 } from "node:fs";
121621
121828
  import { join as join79 } from "node:path";
121622
121829
  function getMarkerPath(directory, sessionID) {
121623
121830
  return join79(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
121624
121831
  }
121625
121832
  function readContinuationMarker(directory, sessionID) {
121626
121833
  const markerPath = getMarkerPath(directory, sessionID);
121627
- if (!existsSync42(markerPath))
121834
+ if (!existsSync41(markerPath))
121628
121835
  return null;
121629
121836
  try {
121630
- const raw = readFileSync23(markerPath, "utf-8");
121837
+ const raw = readFileSync22(markerPath, "utf-8");
121631
121838
  const parsed = JSON.parse(raw);
121632
121839
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
121633
121840
  return null;
@@ -121692,7 +121899,7 @@ async function isSessionInBoulderLineage(input) {
121692
121899
  // packages/omo-opencode/src/hooks/atlas/session-last-agent.ts
121693
121900
  init_shared();
121694
121901
  init_compaction_marker();
121695
- import { readFileSync as readFileSync24, readdirSync as readdirSync10 } from "node:fs";
121902
+ import { readFileSync as readFileSync23, readdirSync as readdirSync10 } from "node:fs";
121696
121903
  import { join as join80 } from "node:path";
121697
121904
  var defaultSessionLastAgentDeps = {
121698
121905
  getMessageDir,
@@ -121753,7 +121960,7 @@ async function getLastAgentFromSession(sessionID, client, deps = {}) {
121753
121960
  try {
121754
121961
  const messages = readdirSync10(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
121755
121962
  try {
121756
- const content = readFileSync24(join80(messageDir, fileName), "utf-8");
121963
+ const content = readFileSync23(join80(messageDir, fileName), "utf-8");
121757
121964
  const parsed = JSON.parse(content);
121758
121965
  return {
121759
121966
  fileName,
@@ -121796,7 +122003,7 @@ init_agent_display_names();
121796
122003
 
121797
122004
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
121798
122005
  init_frontmatter2();
121799
- import { existsSync as existsSync43, readFileSync as readFileSync25, writeFileSync as writeFileSync11, unlinkSync as unlinkSync6, mkdirSync as mkdirSync16 } from "node:fs";
122006
+ import { existsSync as existsSync42, readFileSync as readFileSync24, writeFileSync as writeFileSync11, unlinkSync as unlinkSync6, mkdirSync as mkdirSync16 } from "node:fs";
121800
122007
  import { dirname as dirname32, join as join81 } from "node:path";
121801
122008
 
121802
122009
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
@@ -121810,11 +122017,11 @@ function getStateFilePath(directory, customPath) {
121810
122017
  }
121811
122018
  function readState(directory, customPath) {
121812
122019
  const filePath = getStateFilePath(directory, customPath);
121813
- if (!existsSync43(filePath)) {
122020
+ if (!existsSync42(filePath)) {
121814
122021
  return null;
121815
122022
  }
121816
122023
  try {
121817
- const content = readFileSync25(filePath, "utf-8");
122024
+ const content = readFileSync24(filePath, "utf-8");
121818
122025
  const { data, body } = parseFrontmatter(content);
121819
122026
  const active = data.active;
121820
122027
  const iteration = data.iteration;
@@ -122940,12 +123147,12 @@ async function getLocalVersion(options = {}) {
122940
123147
  }
122941
123148
  }
122942
123149
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
122943
- import { existsSync as existsSync54, readFileSync as readFileSync35 } from "node:fs";
123150
+ import { existsSync as existsSync53, readFileSync as readFileSync34 } from "node:fs";
122944
123151
 
122945
123152
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
122946
123153
  init_extract_semver();
122947
123154
  init_bun_which_shim();
122948
- import { existsSync as existsSync51, accessSync as accessSync4, constants as constants12 } from "node:fs";
123155
+ import { existsSync as existsSync50, accessSync as accessSync4, constants as constants12 } from "node:fs";
122949
123156
  import { homedir as homedir19 } from "node:os";
122950
123157
  import { join as join88 } from "node:path";
122951
123158
 
@@ -123070,7 +123277,7 @@ function buildVersionCommand(binaryPath, platform) {
123070
123277
  }
123071
123278
  return [binaryPath, "--version"];
123072
123279
  }
123073
- function findDesktopBinary(platform = process.platform, checkExists = existsSync51) {
123280
+ function findDesktopBinary(platform = process.platform, checkExists = existsSync50) {
123074
123281
  for (const desktopPath of getDesktopAppPaths(platform)) {
123075
123282
  if (checkExists(desktopPath)) {
123076
123283
  return { binary: "opencode", path: desktopPath };
@@ -123078,7 +123285,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
123078
123285
  }
123079
123286
  return null;
123080
123287
  }
123081
- async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync51) {
123288
+ async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync50) {
123082
123289
  for (const binary of OPENCODE_BINARIES2) {
123083
123290
  const path = bunWhich(binary);
123084
123291
  if (path && checkExists(path)) {
@@ -123136,12 +123343,12 @@ function compareVersions3(current, minimum) {
123136
123343
 
123137
123344
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
123138
123345
  init_shared();
123139
- import { existsSync as existsSync52, readFileSync as readFileSync33 } from "node:fs";
123346
+ import { existsSync as existsSync51, readFileSync as readFileSync32 } from "node:fs";
123140
123347
  function detectConfigPath() {
123141
123348
  const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
123142
- if (existsSync52(paths.configJsonc))
123349
+ if (existsSync51(paths.configJsonc))
123143
123350
  return paths.configJsonc;
123144
- if (existsSync52(paths.configJson))
123351
+ if (existsSync51(paths.configJson))
123145
123352
  return paths.configJson;
123146
123353
  return null;
123147
123354
  }
@@ -123189,7 +123396,7 @@ function getPluginInfo() {
123189
123396
  };
123190
123397
  }
123191
123398
  try {
123192
- const content = readFileSync33(configPath, "utf-8");
123399
+ const content = readFileSync32(configPath, "utf-8");
123193
123400
  const parsedConfig = parseJsonc(content);
123194
123401
  const pluginEntry = findPluginEntry2(parsedConfig.plugin ?? []);
123195
123402
  if (!pluginEntry) {
@@ -123231,7 +123438,7 @@ init_file_utils2();
123231
123438
  init_checker();
123232
123439
  init_auto_update_checker();
123233
123440
  init_package_json_locator();
123234
- import { existsSync as existsSync53, readFileSync as readFileSync34, readdirSync as readdirSync12 } from "node:fs";
123441
+ import { existsSync as existsSync52, readFileSync as readFileSync33, readdirSync as readdirSync12 } from "node:fs";
123235
123442
  import { createRequire as createRequire2 } from "node:module";
123236
123443
  import { homedir as homedir20 } from "node:os";
123237
123444
  import { join as join89 } from "node:path";
@@ -123250,20 +123457,20 @@ function resolveOpenCodeCacheDir() {
123250
123457
  return join89(xdgCacheHome, "opencode");
123251
123458
  const fromShared = getOpenCodeCacheDir();
123252
123459
  const platformDefault = join89(getPlatformDefaultCacheDir(), "opencode");
123253
- if (existsSync53(fromShared) || !existsSync53(platformDefault))
123460
+ if (existsSync52(fromShared) || !existsSync52(platformDefault))
123254
123461
  return fromShared;
123255
123462
  return platformDefault;
123256
123463
  }
123257
123464
  function resolveExistingDir(dirPath) {
123258
- if (!existsSync53(dirPath))
123465
+ if (!existsSync52(dirPath))
123259
123466
  return dirPath;
123260
123467
  return resolveSymlink(dirPath);
123261
123468
  }
123262
123469
  function readPackageJson(filePath) {
123263
- if (!existsSync53(filePath))
123470
+ if (!existsSync52(filePath))
123264
123471
  return null;
123265
123472
  try {
123266
- const content = readFileSync34(filePath, "utf-8");
123473
+ const content = readFileSync33(filePath, "utf-8");
123267
123474
  return parseJsonc(content);
123268
123475
  } catch (error) {
123269
123476
  if (!(error instanceof Error)) {
@@ -123286,7 +123493,7 @@ function createPackageCandidates(rootDir) {
123286
123493
  }
123287
123494
  function createTaggedInstallCandidates(rootDir) {
123288
123495
  const packagesDir = join89(rootDir, "packages");
123289
- if (!existsSync53(packagesDir))
123496
+ if (!existsSync52(packagesDir))
123290
123497
  return [];
123291
123498
  const candidates = [];
123292
123499
  for (const entryName of readdirSync12(packagesDir).sort()) {
@@ -123308,7 +123515,7 @@ function createTaggedInstallCandidates(rootDir) {
123308
123515
  return candidates;
123309
123516
  }
123310
123517
  function selectInstalledPackage(candidate) {
123311
- return candidate.packageCandidates.find((packageCandidate) => existsSync53(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
123518
+ return candidate.packageCandidates.find((packageCandidate) => existsSync52(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
123312
123519
  }
123313
123520
  function getExpectedVersion(cachePackage, packageName) {
123314
123521
  return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
@@ -123319,7 +123526,7 @@ function resolveInstalledPackageJsonPath() {
123319
123526
  for (const packageName of ACCEPTED_PACKAGE_NAMES) {
123320
123527
  try {
123321
123528
  const packageJsonPath = require2.resolve(`${packageName}/package.json`);
123322
- if (existsSync53(packageJsonPath)) {
123529
+ if (existsSync52(packageJsonPath)) {
123323
123530
  return { packageName, packageJsonPath };
123324
123531
  }
123325
123532
  } catch {
@@ -123356,11 +123563,11 @@ function getLoadedPluginVersion() {
123356
123563
  },
123357
123564
  ...createTaggedInstallCandidates(cacheDir)
123358
123565
  ];
123359
- const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync53(packageCandidate.installedPackagePath))) ?? candidates[0];
123566
+ const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync52(packageCandidate.installedPackagePath))) ?? candidates[0];
123360
123567
  const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
123361
123568
  const selectedPackage = selectInstalledPackage(selectedCandidate);
123362
123569
  const candidateInstalledPath = selectedPackage.installedPackagePath;
123363
- const candidateExists = existsSync53(candidateInstalledPath);
123570
+ const candidateExists = existsSync52(candidateInstalledPath);
123364
123571
  const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
123365
123572
  const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
123366
123573
  const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
@@ -123396,8 +123603,8 @@ var defaultDeps5 = {
123396
123603
  getLoadedPluginVersion,
123397
123604
  getLatestPluginVersion,
123398
123605
  getSuggestedInstallTag,
123399
- configExists: existsSync54,
123400
- readConfigFile: (path) => readFileSync35(path, "utf-8"),
123606
+ configExists: existsSync53,
123607
+ readConfigFile: (path) => readFileSync34(path, "utf-8"),
123401
123608
  parseConfigContent: (content) => parseJsonc(content)
123402
123609
  };
123403
123610
  function isConfigValid(configPath, deps) {
@@ -123536,7 +123743,7 @@ async function checkSystem(deps = defaultDeps5) {
123536
123743
 
123537
123744
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
123538
123745
  init_shared();
123539
- import { existsSync as existsSync55, readFileSync as readFileSync36 } from "node:fs";
123746
+ import { existsSync as existsSync54, readFileSync as readFileSync35 } from "node:fs";
123540
123747
  import { homedir as homedir21 } from "node:os";
123541
123748
  import { join as join90 } from "node:path";
123542
123749
  function getUserConfigDir2() {
@@ -123549,10 +123756,10 @@ function loadCustomProviderNames() {
123549
123756
  const configDir = getUserConfigDir2();
123550
123757
  const candidatePaths = [join90(configDir, "opencode.json"), join90(configDir, "opencode.jsonc")];
123551
123758
  for (const configPath of candidatePaths) {
123552
- if (!existsSync55(configPath))
123759
+ if (!existsSync54(configPath))
123553
123760
  continue;
123554
123761
  try {
123555
- const content = readFileSync36(configPath, "utf-8");
123762
+ const content = readFileSync35(configPath, "utf-8");
123556
123763
  const data = parseJsonc(content);
123557
123764
  if (data?.provider && typeof data.provider === "object") {
123558
123765
  return Object.keys(data.provider);
@@ -123569,14 +123776,14 @@ function loadCustomProviderNames() {
123569
123776
  function loadAvailableModelsFromCache() {
123570
123777
  const cacheFile = join90(getOpenCodeCacheDir(), "models.json");
123571
123778
  const customProviders = loadCustomProviderNames();
123572
- if (!existsSync55(cacheFile)) {
123779
+ if (!existsSync54(cacheFile)) {
123573
123780
  if (customProviders.length > 0) {
123574
123781
  return { providers: customProviders, modelCount: 0, cacheExists: true };
123575
123782
  }
123576
123783
  return { providers: [], modelCount: 0, cacheExists: false };
123577
123784
  }
123578
123785
  try {
123579
- const content = readFileSync36(cacheFile, "utf-8");
123786
+ const content = readFileSync35(cacheFile, "utf-8");
123580
123787
  const data = parseJsonc(content);
123581
123788
  const cacheProviders = Object.keys(data);
123582
123789
  let modelCount = 0;
@@ -124018,7 +124225,7 @@ async function checkBrowserProvider() {
124018
124225
  init_src4();
124019
124226
  init_main();
124020
124227
  init_config_migration();
124021
- import { existsSync as existsSync56, readFileSync as readFileSync37 } from "node:fs";
124228
+ import { existsSync as existsSync55, readFileSync as readFileSync36 } from "node:fs";
124022
124229
  import { join as join92 } from "node:path";
124023
124230
  var CANONICAL_REPLACEMENT = new Map([
124024
124231
  ["variant", "reasoning"],
@@ -124086,10 +124293,10 @@ async function checkDeprecatedReasoningKeys() {
124086
124293
  const issues = [];
124087
124294
  const scanned = [];
124088
124295
  for (const configPath of userConfigPaths()) {
124089
- if (!existsSync56(configPath))
124296
+ if (!existsSync55(configPath))
124090
124297
  continue;
124091
124298
  scanned.push(configPath);
124092
- const parsed = parse2(readFileSync37(configPath, "utf-8"));
124299
+ const parsed = parse2(readFileSync36(configPath, "utf-8"));
124093
124300
  issues.push(...collectIssues(configPath, parsed, "", migrateFixSuffix(parsed)));
124094
124301
  }
124095
124302
  return {
@@ -124102,7 +124309,7 @@ async function checkDeprecatedReasoningKeys() {
124102
124309
  }
124103
124310
 
124104
124311
  // packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
124105
- import { existsSync as existsSync57 } from "node:fs";
124312
+ import { existsSync as existsSync56 } from "node:fs";
124106
124313
  import { createRequire as createRequire4 } from "node:module";
124107
124314
  import { homedir as homedir23 } from "node:os";
124108
124315
  import { join as join97 } from "node:path";
@@ -124122,10 +124329,10 @@ function commentCheckerCacheDir(input) {
124122
124329
  return join93(base, input.cacheDirName, "bin");
124123
124330
  }
124124
124331
  // packages/comment-checker-core/src/cached-release.ts
124125
- import { readFileSync as readFileSync38, writeFileSync as writeFileSync14 } from "node:fs";
124332
+ import { readFileSync as readFileSync37, writeFileSync as writeFileSync14 } from "node:fs";
124126
124333
  import { join as join94 } from "node:path";
124127
124334
  var COMMENT_CHECKER_VERSION_MARKER = "comment-checker.version";
124128
- function isCachedCommentCheckerCurrent(cacheDir, readFile = (path) => readFileSync38(path, "utf-8")) {
124335
+ function isCachedCommentCheckerCurrent(cacheDir, readFile = (path) => readFileSync37(path, "utf-8")) {
124129
124336
  try {
124130
124337
  return readFile(join94(cacheDir, COMMENT_CHECKER_VERSION_MARKER)).trim() === COMMENT_CHECKER_RELEASE_VERSION;
124131
124338
  } catch {
@@ -124262,7 +124469,7 @@ function findCommentCheckerPackageBinary2(baseDirOverride, resolvePackageJsonPat
124262
124469
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
124263
124470
  try {
124264
124471
  const packageJsonPath = baseDirOverride === undefined ? resolvePackageJsonPath() : join97(baseDirOverride, "package.json");
124265
- return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync57 });
124472
+ return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync56 });
124266
124473
  } catch (error) {
124267
124474
  if (!(error instanceof Error) && !isModuleResolutionFailure(error))
124268
124475
  throw error;
@@ -124411,7 +124618,7 @@ async function getGhCliInfo(dependencies = {}) {
124411
124618
  // packages/omo-opencode/src/mcp/lsp.ts
124412
124619
  init_zod();
124413
124620
  init_opencode_config_dir();
124414
- import { existsSync as existsSync58, readFileSync as readFileSync39 } from "node:fs";
124621
+ import { existsSync as existsSync57, readFileSync as readFileSync38 } from "node:fs";
124415
124622
  import { delimiter as delimiter3, dirname as dirname39, resolve as resolve26 } from "node:path";
124416
124623
  import { fileURLToPath as fileURLToPath7 } from "node:url";
124417
124624
 
@@ -124555,7 +124762,7 @@ function findBootstrapRoot(candidates, pathExists) {
124555
124762
  }
124556
124763
  function readDaemonPackageVersion(root) {
124557
124764
  try {
124558
- const packageJson = JSON.parse(readFileSync39(resolve26(root, PACKAGE_REL, "package.json"), "utf-8"));
124765
+ const packageJson = JSON.parse(readFileSync38(resolve26(root, PACKAGE_REL, "package.json"), "utf-8"));
124559
124766
  return DaemonPackageSchema.parse(packageJson).version;
124560
124767
  } catch (error) {
124561
124768
  if (!(error instanceof Error))
@@ -124577,7 +124784,7 @@ function createBootstrapCandidate(root, pathExists, resolveExecutable) {
124577
124784
  };
124578
124785
  }
124579
124786
  function resolveLspCommand(options = {}) {
124580
- const pathExists = options.exists ?? existsSync58;
124787
+ const pathExists = options.exists ?? existsSync57;
124581
124788
  const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
124582
124789
  const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
124583
124790
  const candidates = moduleDirectory ? createAncestorCliCandidates({
@@ -124638,7 +124845,7 @@ function getInstalledLspServers(options = {}) {
124638
124845
 
124639
124846
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
124640
124847
  init_shared();
124641
- import { existsSync as existsSync59, readFileSync as readFileSync40 } from "node:fs";
124848
+ import { existsSync as existsSync58, readFileSync as readFileSync39 } from "node:fs";
124642
124849
  import { homedir as homedir24 } from "node:os";
124643
124850
  import { join as join98 } from "node:path";
124644
124851
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
@@ -124652,10 +124859,10 @@ function getMcpConfigPaths() {
124652
124859
  function loadUserMcpConfig() {
124653
124860
  const servers = {};
124654
124861
  for (const configPath of getMcpConfigPaths()) {
124655
- if (!existsSync59(configPath))
124862
+ if (!existsSync58(configPath))
124656
124863
  continue;
124657
124864
  try {
124658
- const content = readFileSync40(configPath, "utf-8");
124865
+ const content = readFileSync39(configPath, "utf-8");
124659
124866
  const config = parseJsonc(content);
124660
124867
  if (config.mcpServers) {
124661
124868
  Object.assign(servers, config.mcpServers);
@@ -124790,17 +124997,17 @@ async function checkTools() {
124790
124997
 
124791
124998
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
124792
124999
  init_src5();
124793
- import { existsSync as existsSync60, readFileSync as readFileSync41 } from "node:fs";
125000
+ import { existsSync as existsSync59, readFileSync as readFileSync40 } from "node:fs";
124794
125001
  function isTelemetryState(value) {
124795
125002
  return value !== null && typeof value === "object" && !Array.isArray(value);
124796
125003
  }
124797
125004
  function readLastActiveDay(stateFilePath) {
124798
- if (!existsSync60(stateFilePath)) {
125005
+ if (!existsSync59(stateFilePath)) {
124799
125006
  return "never";
124800
125007
  }
124801
125008
  let parsed;
124802
125009
  try {
124803
- parsed = JSON.parse(readFileSync41(stateFilePath, "utf-8"));
125010
+ parsed = JSON.parse(readFileSync40(stateFilePath, "utf-8"));
124804
125011
  } catch (error) {
124805
125012
  if (error instanceof Error) {
124806
125013
  return "unreadable";
@@ -124925,7 +125132,7 @@ async function pathExists2(dir) {
124925
125132
 
124926
125133
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
124927
125134
  init_src();
124928
- import { existsSync as existsSync61 } from "node:fs";
125135
+ import { existsSync as existsSync60 } from "node:fs";
124929
125136
  import { lstat as lstat17, readdir as readdir15, readFile as readFile31 } from "node:fs/promises";
124930
125137
  import { homedir as homedir26 } from "node:os";
124931
125138
  import { basename as basename13, join as join99, resolve as resolve27 } from "node:path";
@@ -124945,6 +125152,10 @@ var package_default3 = {
124945
125152
  types: "./src/cli/service-auth/index.ts",
124946
125153
  import: "./src/cli/service-auth/index.ts"
124947
125154
  },
125155
+ "./account-home": {
125156
+ types: "./src/cli/service-auth/account-home.ts",
125157
+ import: "./src/cli/service-auth/account-home.ts"
125158
+ },
124948
125159
  "./binary-downloader": {
124949
125160
  types: "./src/shared/binary-downloader.ts",
124950
125161
  import: "./src/shared/binary-downloader.ts"
@@ -124955,8 +125166,8 @@ var package_default3 = {
124955
125166
  },
124956
125167
  dependencies: {
124957
125168
  "@clack/prompts": "^1.8.1",
124958
- "@code-yeongyu/senpi": "2026.11.19-5",
124959
- "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.19-5",
125169
+ "@code-yeongyu/senpi": "2026.11.23",
125170
+ "@earendil-works/pi-ai": "npm:@code-yeongyu/senpi-ai@2026.11.23",
124960
125171
  "@modelcontextprotocol/sdk": "^1.30.0",
124961
125172
  "@oh-my-opencode/agents-md-core": "workspace:*",
124962
125173
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -125134,14 +125345,14 @@ function buildCodexIssues(summary) {
125134
125345
  }
125135
125346
  async function resolveInstalledPluginRoot(codexHome) {
125136
125347
  const pluginRoot = join99(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME3);
125137
- if (!existsSync61(pluginRoot))
125348
+ if (!existsSync60(pluginRoot))
125138
125349
  return null;
125139
125350
  const versions = await readdir15(pluginRoot, { withFileTypes: true });
125140
125351
  const candidates = versions.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
125141
125352
  return candidates.length === 0 ? null : join99(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
125142
125353
  }
125143
125354
  async function readCodexConfigSummary(configPath) {
125144
- if (!existsSync61(configPath)) {
125355
+ if (!existsSync60(configPath)) {
125145
125356
  return {
125146
125357
  exists: false,
125147
125358
  marketplaceConfigured: false,
@@ -125173,7 +125384,7 @@ async function readLinkedBins(binDir) {
125173
125384
  }
125174
125385
  async function readLinkedAgents(codexHome) {
125175
125386
  const agentsDir = join99(codexHome, "agents");
125176
- if (!existsSync61(agentsDir))
125387
+ if (!existsSync60(agentsDir))
125177
125388
  return [];
125178
125389
  const entries = await readdir15(agentsDir, { withFileTypes: true });
125179
125390
  return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename13(entry.name, ".toml")).sort();
@@ -125586,7 +125797,7 @@ function isRecord18(value) {
125586
125797
  }
125587
125798
 
125588
125799
  // packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
125589
- import { existsSync as existsSync62 } from "node:fs";
125800
+ import { existsSync as existsSync61 } from "node:fs";
125590
125801
  import { readFile as readFile33 } from "node:fs/promises";
125591
125802
  import { homedir as homedir28 } from "node:os";
125592
125803
  import { join as join101, resolve as resolve29 } from "node:path";
@@ -125606,7 +125817,7 @@ async function checkCodexRuntimeWrapper(deps = {}) {
125606
125817
  const issues = [];
125607
125818
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
125608
125819
  const targetPath = parseRuntimeTargetPath(wrapper);
125609
- if (targetPath !== null && !existsSync62(targetPath)) {
125820
+ if (targetPath !== null && !existsSync61(targetPath)) {
125610
125821
  issues.push({
125611
125822
  title: "omo-agent-toolkit runtime wrapper target is missing",
125612
125823
  description: `Generated omo-agent-toolkit runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
@@ -126168,10 +126379,10 @@ init_commander();
126168
126379
  import { createHash as createHash8 } from "node:crypto";
126169
126380
  import {
126170
126381
  chmodSync as chmodSync6,
126171
- existsSync as existsSync65,
126382
+ existsSync as existsSync64,
126172
126383
  mkdirSync as mkdirSync18,
126173
126384
  readdirSync as readdirSync13,
126174
- readFileSync as readFileSync43,
126385
+ readFileSync as readFileSync42,
126175
126386
  renameSync as renameSync8,
126176
126387
  unlinkSync as unlinkSync9,
126177
126388
  writeFileSync as writeFileSync16
@@ -126179,12 +126390,12 @@ import {
126179
126390
  import { basename as basename14, dirname as dirname41, join as join104 } from "node:path";
126180
126391
 
126181
126392
  // packages/mcp-client-core/src/config-dir.ts
126182
- import { existsSync as existsSync63, realpathSync as realpathSync12 } from "node:fs";
126393
+ import { existsSync as existsSync62, realpathSync as realpathSync12 } from "node:fs";
126183
126394
  import { homedir as homedir29 } from "node:os";
126184
126395
  import { join as join102, resolve as resolve30 } from "node:path";
126185
126396
  function resolveConfigPath3(pathValue) {
126186
126397
  const resolvedPath = resolve30(pathValue);
126187
- if (!existsSync63(resolvedPath))
126398
+ if (!existsSync62(resolvedPath))
126188
126399
  return resolvedPath;
126189
126400
  try {
126190
126401
  return realpathSync12(resolvedPath);
@@ -126204,7 +126415,7 @@ function getOpenCodeCliConfigDir(env = process.env) {
126204
126415
  }
126205
126416
 
126206
126417
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
126207
- import { chmodSync as chmodSync5, existsSync as existsSync64, readFileSync as readFileSync42, renameSync as renameSync7, writeFileSync as writeFileSync15 } from "node:fs";
126418
+ import { chmodSync as chmodSync5, existsSync as existsSync63, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync15 } from "node:fs";
126208
126419
  import { join as join103 } from "node:path";
126209
126420
  var INDEX_FILE_NAME = "index.json";
126210
126421
  function isTokenIndex(value) {
@@ -126217,10 +126428,10 @@ function getIndexPath(storageDir) {
126217
126428
  }
126218
126429
  function readTokenIndex(storageDir) {
126219
126430
  const indexPath = getIndexPath(storageDir);
126220
- if (!existsSync64(indexPath))
126431
+ if (!existsSync63(indexPath))
126221
126432
  return {};
126222
126433
  try {
126223
- const parsed = JSON.parse(readFileSync42(indexPath, "utf-8"));
126434
+ const parsed = JSON.parse(readFileSync41(indexPath, "utf-8"));
126224
126435
  return isTokenIndex(parsed) ? parsed : {};
126225
126436
  } catch (readError) {
126226
126437
  if (!(readError instanceof Error))
@@ -126331,10 +126542,10 @@ function isOAuthTokenData(value) {
126331
126542
  return clientSecret === undefined || typeof clientSecret === "string";
126332
126543
  }
126333
126544
  function readTokenFile(filePath) {
126334
- if (!existsSync65(filePath))
126545
+ if (!existsSync64(filePath))
126335
126546
  return null;
126336
126547
  try {
126337
- const parsed = JSON.parse(readFileSync43(filePath, "utf-8"));
126548
+ const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
126338
126549
  return isOAuthTokenData(parsed) ? parsed : null;
126339
126550
  } catch (readError) {
126340
126551
  if (!(readError instanceof Error))
@@ -126344,10 +126555,10 @@ function readTokenFile(filePath) {
126344
126555
  }
126345
126556
  function readLegacyStore() {
126346
126557
  const filePath = getLegacyStoragePath();
126347
- if (!existsSync65(filePath))
126558
+ if (!existsSync64(filePath))
126348
126559
  return null;
126349
126560
  try {
126350
- const parsed = JSON.parse(readFileSync43(filePath, "utf-8"));
126561
+ const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
126351
126562
  if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
126352
126563
  return null;
126353
126564
  const result = {};
@@ -126365,7 +126576,7 @@ function readLegacyStore() {
126365
126576
  function writeTokenFile(filePath, token) {
126366
126577
  try {
126367
126578
  const dir = dirname41(filePath);
126368
- if (!existsSync65(dir)) {
126579
+ if (!existsSync64(dir)) {
126369
126580
  mkdirSync18(dir, { recursive: true });
126370
126581
  }
126371
126582
  const tempPath = `${filePath}.tmp.${Date.now()}`;
@@ -126389,7 +126600,7 @@ function saveToken(serverHost, resource, token) {
126389
126600
  }
126390
126601
  function deleteToken(serverHost, resource) {
126391
126602
  const filePath = getMcpOauthStoragePath(serverHost, resource);
126392
- if (!existsSync65(filePath))
126603
+ if (!existsSync64(filePath))
126393
126604
  return deleteLegacyToken(serverHost, resource);
126394
126605
  try {
126395
126606
  unlinkSync9(filePath);
@@ -126413,7 +126624,7 @@ function deleteLegacyToken(serverHost, resource) {
126413
126624
  if (Object.keys(store).length === 0) {
126414
126625
  try {
126415
126626
  const filePath = getLegacyStoragePath();
126416
- if (existsSync65(filePath))
126627
+ if (existsSync64(filePath))
126417
126628
  unlinkSync9(filePath);
126418
126629
  return true;
126419
126630
  } catch (deleteError) {
@@ -126460,7 +126671,7 @@ function listTokensByHost(serverHost) {
126460
126671
  function listAllTokens() {
126461
126672
  const result = { ...readLegacyStore() ?? {} };
126462
126673
  const dir = getMcpOauthStorageDir();
126463
- if (!existsSync65(dir))
126674
+ if (!existsSync64(dir))
126464
126675
  return result;
126465
126676
  const index = readTokenIndex(dir);
126466
126677
  for (const entry of readdirSync13(dir, { withFileTypes: true })) {
@@ -128329,9 +128540,9 @@ var {
128329
128540
  chmodSync: chmodSync7,
128330
128541
  fsyncSync: fsyncSync3,
128331
128542
  linkSync,
128332
- lstatSync: lstatSync5,
128543
+ lstatSync: lstatSync6,
128333
128544
  mkdirSync: mkdirSync19,
128334
- readFileSync: readFileSync44,
128545
+ readFileSync: readFileSync43,
128335
128546
  readdirSync: readdirSync14,
128336
128547
  realpathSync: realpathSync13,
128337
128548
  statSync: statSync8,
@@ -128406,7 +128617,7 @@ import { join as join111 } from "node:path";
128406
128617
 
128407
128618
  // packages/omo-opencode/src/cli/service-auth/account-home.ts
128408
128619
  import { execFileSync as execFileSync5 } from "node:child_process";
128409
- import { accessSync as accessSync6, constants as constants13, mkdirSync as mkdirSync20, readFileSync as readFileSync45, statSync as statSync9 } from "node:fs";
128620
+ import { accessSync as accessSync6, constants as constants13, mkdirSync as mkdirSync20, readFileSync as readFileSync44, statSync as statSync9 } from "node:fs";
128410
128621
  import { homedir as homedir31 } from "node:os";
128411
128622
  import { join as join106, posix as posix13, win32 as win3210 } from "node:path";
128412
128623
  var lockDirectoryIn = (home) => join106(home, ".omo", "session-locks");
@@ -128476,7 +128687,7 @@ var systemPlatformFacts = {
128476
128687
  platform: process.platform,
128477
128688
  uid: process.getuid?.(),
128478
128689
  env: process.env,
128479
- readFile: (path) => readFileSync45(path, "utf8"),
128690
+ readFile: (path) => readFileSync44(path, "utf8"),
128480
128691
  isFile: (path) => statSync9(path, { throwIfNoEntry: false })?.isFile() ?? false,
128481
128692
  run: (command, args) => execFileSync5(command, args, {
128482
128693
  encoding: "utf8",
@@ -129021,7 +129232,7 @@ var processApprovalCache = () => {
129021
129232
  };
129022
129233
 
129023
129234
  // packages/omo-opencode/src/cli/service-auth/keychain-helper/dedicated-store.ts
129024
- import { lstatSync as lstatSync6 } from "node:fs";
129235
+ import { lstatSync as lstatSync7 } from "node:fs";
129025
129236
  import { userInfo as userInfo2 } from "node:os";
129026
129237
  import { join as join109 } from "node:path";
129027
129238
  var DEDICATED_STORE_DIRECTORY = join109("Library", "Application Support", "OmO", "credential-keychain");
@@ -129029,7 +129240,7 @@ var accountHomeDirectory = () => userInfo2().homedir;
129029
129240
  var dedicatedStoreRoot = (home = accountHomeDirectory()) => join109(home, DEDICATED_STORE_DIRECTORY);
129030
129241
  var exists7 = (path) => {
129031
129242
  try {
129032
- lstatSync6(path);
129243
+ lstatSync7(path);
129033
129244
  return true;
129034
129245
  } catch {
129035
129246
  return false;
@@ -132239,7 +132450,7 @@ function configureServiceAuthCommands(program, open = serviceAccountsOpen(), hoo
132239
132450
  }
132240
132451
 
132241
132452
  // packages/omo-native/device-service-handoff.ts
132242
- import { existsSync as existsSync68 } from "node:fs";
132453
+ import { existsSync as existsSync67 } from "node:fs";
132243
132454
 
132244
132455
  // packages/device-service-core/src/index.ts
132245
132456
  init_device_service2();
@@ -132249,12 +132460,12 @@ init_client4();
132249
132460
  init_background_transport();
132250
132461
  init_device_service2();
132251
132462
  // packages/device-service-core/src/bootstrap.ts
132252
- import { existsSync as existsSync67 } from "node:fs";
132463
+ import { existsSync as existsSync66 } from "node:fs";
132253
132464
  init_device_service2();
132254
132465
 
132255
132466
  // packages/device-service-core/src/hand-device-keys.ts
132256
132467
  init_device_service2();
132257
- import { existsSync as existsSync66 } from "node:fs";
132468
+ import { existsSync as existsSync65 } from "node:fs";
132258
132469
  var DEAD_ENDPOINT_CODES = new Set(["ENOENT", "ECONNREFUSED", "ECONNRESET", "EPIPE"]);
132259
132470
  var connectFailure = (error) => {
132260
132471
  const detail = error instanceof Error ? error.message : String(error);
@@ -132281,7 +132492,7 @@ var connectOrNotRunning = async (connect, log) => {
132281
132492
  };
132282
132493
  var adopted = (status) => status.device !== null && status.state !== "sign_in_required";
132283
132494
  var handDeviceKeys = async (options) => {
132284
- if (!existsSync66(deviceServiceEndpointPath(options.stateDir)))
132495
+ if (!existsSync65(deviceServiceEndpointPath(options.stateDir)))
132285
132496
  return "not_running";
132286
132497
  const service = await connectOrNotRunning(options.connect, options.log);
132287
132498
  if (service === "not_running")
@@ -132299,7 +132510,7 @@ var handDeviceKeys = async (options) => {
132299
132510
  // packages/device-service-core/src/bootstrap.ts
132300
132511
  init_version2();
132301
132512
  var forgetDeviceService = async (options) => {
132302
- if (!existsSync67(deviceServiceEndpointPath(options.stateDir)))
132513
+ if (!existsSync66(deviceServiceEndpointPath(options.stateDir)))
132303
132514
  return "not_running";
132304
132515
  const service = await connectOrNotRunning(options.connect, options.log);
132305
132516
  if (service === "not_running")
@@ -132326,34 +132537,11 @@ init_dacl();
132326
132537
  // packages/device-service-core/src/release/windows-dacl.ts
132327
132538
  init_errors4();
132328
132539
  init_dacl();
132329
- import { spawn as spawn7 } from "node:child_process";
132330
132540
  var SID_TOKEN_SCRIPT = String.raw`
132331
132541
  $ErrorActionPreference = 'Stop'
132332
132542
  (New-Object System.Security.AccessControl.RawSecurityDescriptor("O:$env:LA_SID")).GetSddlForm('Owner')
132333
132543
  `;
132334
- var runPowerShell2 = async (script, env) => {
132335
- const encoded = Buffer.from(script, "utf16le").toString("base64");
132336
- const proc = spawn7("powershell.exe", ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", encoded], { env: { ...process.env, ...env }, stdio: ["ignore", "pipe", "pipe"], windowsHide: true });
132337
- const chunks = [];
132338
- const errChunks = [];
132339
- proc.stdout.on("data", (chunk) => chunks.push(chunk));
132340
- proc.stderr.on("data", (chunk) => errChunks.push(chunk));
132341
- const code = await new Promise((resolve, reject) => {
132342
- proc.once("error", reject);
132343
- proc.once("close", (exitCode) => resolve(exitCode ?? -1));
132344
- });
132345
- return { code, out: Buffer.concat(chunks).toString("utf8"), err: Buffer.concat(errChunks).toString("utf8") };
132346
- };
132347
- var XML_ENTITIES = { lt: "<", gt: ">", quot: '"', apos: "'", amp: "&" };
132348
- var clixmlText = (line) => [...line.matchAll(/<S(?: S="[^"]*")?>([^<]*)<\/S>/g)].map((match) => match[1] ?? "").join("").replace(/_x([0-9A-Fa-f]{4})_/g, (_, hex) => String.fromCharCode(Number.parseInt(hex, 16))).replace(/&(lt|gt|quot|apos|amp);/g, (_, entity) => XML_ENTITIES[entity] ?? "");
132349
- var POSITION_LINE = /^(?:At line:\d|At .*char:\d|\+ )/;
132350
- var errorMessage = (err) => {
132351
- const lines = (err ?? "").split(/\r?\n/).filter((text) => !text.trim().startsWith("#< CLIXML")).flatMap((text) => text.trim().startsWith("<") ? clixmlText(text).split(/\r?\n/) : [text]).map((text) => text.trim()).filter((text) => text !== "");
132352
- const end = lines.findIndex((text) => POSITION_LINE.test(text));
132353
- const message = lines.slice(0, end === -1 ? lines.length : end).join(" ");
132354
- return message === "" ? "" : `: ${message.slice(0, 300)}`;
132355
- };
132356
- var userSidToken = async (userSid, run = runPowerShell2) => {
132544
+ var userSidToken = async (userSid, run = runPowerShell) => {
132357
132545
  const { code, out } = await run(SID_TOKEN_SCRIPT, { LA_SID: userSid });
132358
132546
  const match = code === 0 ? /^O:(S-1-\d+(?:-\d+)+|[A-Z]{2})$/.exec(out.trim()) : null;
132359
132547
  return match?.[1];
@@ -132362,28 +132550,7 @@ var aliasedDaclVerdict = (dacl, userSid, kind, userAlias) => {
132362
132550
  const asSid = (token) => userAlias !== undefined && token === userAlias ? userSid : token;
132363
132551
  return exactDaclVerdict({ ...dacl, owner: asSid(dacl.owner), aces: dacl.aces.map((ace) => ({ ...ace, sid: asSid(ace.sid) })) }, userSid, kind);
132364
132552
  };
132365
- var OWNER_LINE = `$acl.SetOwner($sid)
132366
- `;
132367
- var SET_ACL_LINE = `Set-Acl -LiteralPath $env:LA_PATH -AclObject $acl
132368
- `;
132369
- var SET_DACL_LINE = `(Get-Item -LiteralPath $env:LA_PATH -Force).SetAccessControl($acl)
132370
- `;
132371
- var RUNNER_PREFIX = String.raw`$ProgressPreference = 'SilentlyContinue'
132372
- $ErrorActionPreference = 'Stop'
132373
- $ownerSet = & icacls.exe $env:LA_PATH /setowner "*$($env:LA_SID)" 2>&1
132374
- if ($LASTEXITCODE -ne 0) { throw "setowner failed: $ownerSet" }
132375
- `;
132376
- if (!APPLY_DACL_SCRIPT.includes(OWNER_LINE) || !APPLY_DACL_SCRIPT.includes(SET_ACL_LINE)) {
132377
- throw new Error("the vendored DACL script no longer sets the owner and the ACL on their own lines");
132378
- }
132379
- var RUNNER_APPLY_SCRIPT = APPLY_DACL_SCRIPT.replace(`$ErrorActionPreference = 'Stop'
132380
- `, RUNNER_PREFIX).replace(OWNER_LINE, "").replace(SET_ACL_LINE, SET_DACL_LINE);
132381
- var applyExactDacl2 = async (path, userSid, kind, run = runPowerShell2) => {
132382
- const { code, err } = await run(RUNNER_APPLY_SCRIPT, { LA_PATH: path, LA_SID: userSid, LA_KIND: kind });
132383
- if (code !== 0)
132384
- throw new LocalApiError("insecure_state_dir", `the exact DACL could not be applied${errorMessage(err)}`);
132385
- };
132386
- var verifyExactDacl2 = async (path, userSid, kind, run = runPowerShell2) => {
132553
+ var verifyExactDacl2 = async (path, userSid, kind, run = runPowerShell) => {
132387
132554
  let dacl;
132388
132555
  try {
132389
132556
  dacl = await describeDacl(path, run);
@@ -132394,9 +132561,9 @@ var verifyExactDacl2 = async (path, userSid, kind, run = runPowerShell2) => {
132394
132561
  }
132395
132562
  return aliasedDaclVerdict(dacl, userSid, kind, await userSidToken(userSid, run));
132396
132563
  };
132397
- var windowsSecureFile2 = (userSid, run = runPowerShell2) => async (path, kind) => {
132564
+ var windowsSecureFile2 = (userSid, run = runPowerShell) => async (path, kind) => {
132398
132565
  const target = kind === "dir" ? "dir" : "file";
132399
- await applyExactDacl2(path, userSid, target, run);
132566
+ await applyExactDacl(path, userSid, target, run);
132400
132567
  if (!await verifyExactDacl2(path, userSid, target, run))
132401
132568
  throw new LocalApiError("insecure_state_dir", "the DACL is not exactly one ACE for the user");
132402
132569
  };
@@ -132469,7 +132636,7 @@ var DEVICE_SERVICE_RELEASE_KEYS = parseReleaseKeySet(release_key_default);
132469
132636
 
132470
132637
  // packages/device-service-core/src/release/acquire.ts
132471
132638
  init_version2();
132472
- var platformSecure = process.platform === "win32" ? async (path, kind) => windowsSecureFile2(await currentUserSid())(path, kind) : posixSecureFile;
132639
+ var platformSecure = process.platform === "win32" ? async (path, kind, origin) => windowsSecureFile2(await currentUserSid())(path, kind, origin) : posixSecureFile;
132473
132640
  // packages/device-service-core/src/registrant.ts
132474
132641
  init_device_service2();
132475
132642
  var NONE2 = Symbol("none registered");
@@ -132479,7 +132646,7 @@ init_timers();
132479
132646
  // packages/omo-native/package.json
132480
132647
  var package_default4 = {
132481
132648
  name: "omo-ai",
132482
- version: "5.1.81",
132649
+ version: "5.1.83",
132483
132650
  type: "module",
132484
132651
  description: "OmO Native - the standalone omo command with the OMO extension built in: bun add -g omo-ai",
132485
132652
  bin: {
@@ -132496,7 +132663,7 @@ var package_default4 = {
132496
132663
  postinstall: "node bin/senpi-patch.mjs"
132497
132664
  },
132498
132665
  dependencies: {
132499
- "@code-yeongyu/senpi": "2026.11.19-5"
132666
+ "@code-yeongyu/senpi": "2026.11.23"
132500
132667
  },
132501
132668
  repository: {
132502
132669
  type: "git",
@@ -132528,7 +132695,7 @@ function cliDeviceServiceHandoff(options) {
132528
132695
  };
132529
132696
  return {
132530
132697
  adopt: async (credentials) => {
132531
- if (!existsSync68(deviceServiceEndpointPath(stateDir)))
132698
+ if (!existsSync67(deviceServiceEndpointPath(stateDir)))
132532
132699
  return;
132533
132700
  try {
132534
132701
  const account = await accountOf(options.api, credentials, doFetch);
@@ -132549,7 +132716,7 @@ function cliDeviceServiceHandoff(options) {
132549
132716
  }
132550
132717
  },
132551
132718
  machineDevice: async () => {
132552
- if (!existsSync68(deviceServiceEndpointPath(stateDir)))
132719
+ if (!existsSync67(deviceServiceEndpointPath(stateDir)))
132553
132720
  return { kind: "absent" };
132554
132721
  let failure;
132555
132722
  const service = await connectOrNotRunning(connect, (line) => {
@@ -132871,7 +133038,7 @@ function resolveInstallArgs(options, invocationName = process.env.OMO_INVOCATION
132871
133038
  init_commander();
132872
133039
 
132873
133040
  // packages/omo-opencode/src/cli/boulder/boulder.ts
132874
- import { existsSync as existsSync69 } from "node:fs";
133041
+ import { existsSync as existsSync68 } from "node:fs";
132875
133042
 
132876
133043
  // packages/omo-opencode/src/cli/boulder/formatter.ts
132877
133044
  var import_picocolors22 = __toESM(require_picocolors(), 1);
@@ -133008,10 +133175,10 @@ async function boulder(options) {
133008
133175
  const boulderFilePath = getBoulderFilePath(directory);
133009
133176
  const state = readBoulderState(directory);
133010
133177
  if (!state) {
133011
- const message = existsSync69(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
133178
+ const message = existsSync68(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
133012
133179
  process.stderr.write(`${message}
133013
133180
  `);
133014
- return existsSync69(boulderFilePath) ? 2 : 1;
133181
+ return existsSync68(boulderFilePath) ? 2 : 1;
133015
133182
  }
133016
133183
  const works = getBoulderWorks(state);
133017
133184
  const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
@@ -133028,8 +133195,8 @@ async function boulder(options) {
133028
133195
  return 0;
133029
133196
  }
133030
133197
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
133031
- import { spawn as spawn8 } from "node:child_process";
133032
- import { existsSync as existsSync70, readFileSync as readFileSync49, realpathSync as realpathSync14 } from "node:fs";
133198
+ import { spawn as spawn7 } from "node:child_process";
133199
+ import { existsSync as existsSync69, readFileSync as readFileSync48, realpathSync as realpathSync14 } from "node:fs";
133033
133200
  import { homedir as homedir37 } from "node:os";
133034
133201
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
133035
133202
  function resolveCodexUlwLoopCommand(input = {}) {
@@ -133058,7 +133225,7 @@ async function codexUlwLoop(args) {
133058
133225
  return 1;
133059
133226
  }
133060
133227
  const { promise, resolve } = Promise.withResolvers();
133061
- const child = spawn8(command.executable, [...command.argsPrefix, ...args], {
133228
+ const child = spawn7(command.executable, [...command.argsPrefix, ...args], {
133062
133229
  stdio: "inherit",
133063
133230
  env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }
133064
133231
  });
@@ -133071,15 +133238,15 @@ async function codexUlwLoop(args) {
133071
133238
  }
133072
133239
  function resolveLocalUlwLoopBin(env, homeDir) {
133073
133240
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env, homeDir });
133074
- return candidates.find((candidate) => existsSync70(candidate)) ?? null;
133241
+ return candidates.find((candidate) => existsSync69(candidate)) ?? null;
133075
133242
  }
133076
133243
  function resolveLegacyLocalOmoBin(env, homeDir, currentExecutablePaths) {
133077
133244
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env, homeDir });
133078
- return candidates.find((candidate) => existsSync70(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;
133245
+ return candidates.find((candidate) => existsSync69(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;
133079
133246
  }
133080
133247
  function isGeneratedRuntimeWrapper(candidate) {
133081
133248
  try {
133082
- return readFileSync49(candidate, "utf8").includes(RUNTIME_WRAPPER_MARKER);
133249
+ return readFileSync48(candidate, "utf8").includes(RUNTIME_WRAPPER_MARKER);
133083
133250
  } catch (error) {
133084
133251
  if (error instanceof Error)
133085
133252
  return false;
@@ -133273,7 +133440,7 @@ function linkedWorktrees(records) {
133273
133440
  return records.slice(1);
133274
133441
  }
133275
133442
  // packages/omo-opencode/src/cli/worktree-sweep/sweep.ts
133276
- import { existsSync as existsSync71 } from "node:fs";
133443
+ import { existsSync as existsSync70 } from "node:fs";
133277
133444
  import { stat as stat12 } from "node:fs/promises";
133278
133445
  import os7 from "node:os";
133279
133446
  import { normalize as normalize2 } from "node:path";
@@ -133353,7 +133520,7 @@ async function isOlderThan(worktreePath, days, now) {
133353
133520
  }
133354
133521
  }
133355
133522
  async function classifyRecord(repo, record, defaultBranch, options) {
133356
- const pathExists = existsSync71(record.path);
133523
+ const pathExists = existsSync70(record.path);
133357
133524
  const external = isExcludedPath(record.path, options.excludePrefixes, options.home);
133358
133525
  const current = options.currentWorktree !== undefined && record.path === options.currentWorktree;
133359
133526
  if (record.locked || !pathExists || external || current) {
@@ -133382,7 +133549,7 @@ async function sweepRepo(repo, options) {
133382
133549
  const records = linkedWorktrees(allRecords);
133383
133550
  const startedInLinked = records.some((record) => record.path === toplevel);
133384
133551
  const mainWorktree = allRecords[0]?.path;
133385
- const root = startedInLinked && mainWorktree !== undefined && existsSync71(mainWorktree) ? mainWorktree : toplevel;
133552
+ const root = startedInLinked && mainWorktree !== undefined && existsSync70(mainWorktree) ? mainWorktree : toplevel;
133386
133553
  const currentWorktree = startedInLinked ? toplevel : undefined;
133387
133554
  const classifications = [];
133388
133555
  for (const record of records) {