oh-my-opencode 5.0.0-beta.7 → 5.0.0-beta.8

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 (106) hide show
  1. package/.agents/skills/work-with-pr/SKILL.md +37 -23
  2. package/.opencode/skills/work-with-pr/SKILL.md +37 -23
  3. package/dist/agents/sisyphus/grok-4.d.ts +20 -0
  4. package/dist/agents/sisyphus/index.d.ts +2 -0
  5. package/dist/agents/sisyphus-agent-config.d.ts +6 -0
  6. package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
  7. package/dist/agents/types.d.ts +2 -2
  8. package/dist/cli/index.js +446 -336
  9. package/dist/cli-node/index.js +446 -336
  10. package/dist/index.js +272 -28
  11. package/dist/shared/normalize-sdk-response.d.ts +1 -0
  12. package/dist/skills/frontend/SKILL.md +10 -7
  13. package/dist/skills/frontend/references/design/_INDEX.md +1 -0
  14. package/dist/skills/frontend/references/design/stylegallery.md +80 -0
  15. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  16. package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
  17. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  18. package/dist/skills/ulw-plan/SKILL.md +2 -2
  19. package/dist/skills/ulw-plan/references/full-workflow.md +27 -3
  20. package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
  21. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  22. package/dist/tui.js +75 -7
  23. package/package.json +19 -19
  24. package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
  25. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
  26. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  27. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  28. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  29. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +24 -2
  30. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +24 -2
  31. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  33. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  34. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  35. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  37. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  38. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  39. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  40. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  41. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  42. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  43. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  44. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  45. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  46. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  47. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  48. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  49. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  50. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  51. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -2
  52. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +27 -3
  53. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
  54. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
  55. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  56. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +5 -3
  58. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -1
  59. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  60. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  61. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  62. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  63. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  64. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  65. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  66. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  82. package/packages/omo-codex/plugin/package-lock.json +13 -13
  83. package/packages/omo-codex/plugin/package.json +1 -1
  84. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
  85. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
  86. package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
  87. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  88. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
  89. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  90. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +5 -3
  91. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -1
  92. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -2
  93. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +27 -3
  94. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
  95. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
  96. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  97. package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
  98. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
  99. package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
  100. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  101. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
  102. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  103. package/packages/shared-skills/skills/ulw-plan/SKILL.md +2 -2
  104. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +27 -3
  105. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
  106. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
@@ -2146,7 +2146,7 @@ var package_default;
2146
2146
  var init_package = __esm(() => {
2147
2147
  package_default = {
2148
2148
  name: "oh-my-opencode",
2149
- version: "5.0.0-beta.7",
2149
+ version: "5.0.0-beta.8",
2150
2150
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2151
2151
  main: "./dist/index.js",
2152
2152
  types: "dist/index.d.ts",
@@ -2326,7 +2326,7 @@ var init_package = __esm(() => {
2326
2326
  zod: "^4.4.3"
2327
2327
  },
2328
2328
  devDependencies: {
2329
- "@code-yeongyu/senpi": "2026.8.12-4",
2329
+ "@code-yeongyu/senpi": "2026.8.16",
2330
2330
  "@oh-my-opencode/agents-md-core": "workspace:*",
2331
2331
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
2332
2332
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -2358,7 +2358,7 @@ var init_package = __esm(() => {
2358
2358
  "@oh-my-opencode/utils": "workspace:*",
2359
2359
  "@types/js-yaml": "^4.0.9",
2360
2360
  "@types/picomatch": "^4.0.3",
2361
- "@typescript/native-preview": "7.0.0-dev.20260518.1",
2361
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
2362
2362
  "@xterm/addon-unicode11": "^0.9.0",
2363
2363
  "@xterm/xterm": "^6.0.0",
2364
2364
  "bun-types": "1.3.14",
@@ -2367,24 +2367,24 @@ var init_package = __esm(() => {
2367
2367
  typescript: "^7.0.2"
2368
2368
  },
2369
2369
  optionalDependencies: {
2370
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.7",
2371
- "oh-my-opencode-darwin-x64": "5.0.0-beta.7",
2372
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.7",
2373
- "oh-my-opencode-linux-arm64": "5.0.0-beta.7",
2374
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.7",
2375
- "oh-my-opencode-linux-x64": "5.0.0-beta.7",
2376
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.7",
2377
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.7",
2378
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.7",
2379
- "oh-my-opencode-windows-arm64": "5.0.0-beta.7",
2380
- "oh-my-opencode-windows-x64": "5.0.0-beta.7",
2381
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.7"
2370
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.8",
2371
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.8",
2372
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.8",
2373
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.8",
2374
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.8",
2375
+ "oh-my-opencode-linux-x64": "5.0.0-beta.8",
2376
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.8",
2377
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.8",
2378
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.8",
2379
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.8",
2380
+ "oh-my-opencode-windows-x64": "5.0.0-beta.8",
2381
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.8"
2382
2382
  },
2383
2383
  overrides: {
2384
- "@earendil-works/pi-agent-core": "0.80.3",
2385
- "@earendil-works/pi-ai": "0.80.3",
2386
- "@earendil-works/pi-coding-agent": "0.80.3",
2387
- "@earendil-works/pi-tui": "0.80.3",
2384
+ "@earendil-works/pi-agent-core": "0.84.2",
2385
+ "@earendil-works/pi-ai": "0.84.2",
2386
+ "@earendil-works/pi-coding-agent": "0.84.2",
2387
+ "@earendil-works/pi-tui": "0.84.2",
2388
2388
  hono: "^4.12.18",
2389
2389
  "@hono/node-server": "^1.19.13",
2390
2390
  "express-rate-limit": "^8.5.1",
@@ -22585,7 +22585,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
22585
22585
  residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
22586
22586
  });
22587
22587
  }
22588
- var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskSettingsSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
22588
+ var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskDagSettingsSchema, OmoTaskSettingsSchema, OmoTaskDagSettingsLayerSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
22589
22589
  var init_task = __esm(() => {
22590
22590
  init_zod();
22591
22591
  ResidencyMaxChildrenInputSchema = union([number2().int().positive(), literal("unlimited")]);
@@ -22602,6 +22602,16 @@ var init_task = __esm(() => {
22602
22602
  OmoTaskWarningsSchema = object({
22603
22603
  unavailable_categories: boolean2().default(true)
22604
22604
  }).strict();
22605
+ OmoTaskDagSettingsSchema = object({
22606
+ max_nodes_per_run: number2().int().positive().default(64),
22607
+ max_runs_per_session: number2().int().positive().default(16),
22608
+ subscriber_ring: number2().int().positive().default(1000),
22609
+ heartbeat_ms: number2().int().positive().default(15000),
22610
+ history_default_limit: number2().int().positive().default(256),
22611
+ history_max_limit: number2().int().positive().default(1000),
22612
+ retention_days: number2().int().positive().default(7),
22613
+ max_prompt_bytes: number2().int().positive().default(262144)
22614
+ }).strict();
22605
22615
  OmoTaskSettingsSchema = object({
22606
22616
  default_execution_mode: _enum2(["in-process", "process"]).default("in-process"),
22607
22617
  default_concurrency: number2().int().positive().default(5),
@@ -22619,7 +22629,18 @@ var init_task = __esm(() => {
22619
22629
  max_members: 8,
22620
22630
  max_parallel_members: 4,
22621
22631
  max_wall_clock_minutes: 120
22622
- })
22632
+ }),
22633
+ dag: OmoTaskDagSettingsSchema.optional()
22634
+ }).strict();
22635
+ OmoTaskDagSettingsLayerSchema = object({
22636
+ max_nodes_per_run: number2().int().positive().optional(),
22637
+ max_runs_per_session: number2().int().positive().optional(),
22638
+ subscriber_ring: number2().int().positive().optional(),
22639
+ heartbeat_ms: number2().int().positive().optional(),
22640
+ history_default_limit: number2().int().positive().optional(),
22641
+ history_max_limit: number2().int().positive().optional(),
22642
+ retention_days: number2().int().positive().optional(),
22643
+ max_prompt_bytes: number2().int().positive().optional()
22623
22644
  }).strict();
22624
22645
  OmoTaskWaitLayerSchema = object({
22625
22646
  min_ms: number2().int().positive().optional(),
@@ -22647,7 +22668,8 @@ var init_task = __esm(() => {
22647
22668
  resume_children: boolean2().optional(),
22648
22669
  warnings: OmoTaskWarningsLayerSchema.optional(),
22649
22670
  wait: OmoTaskWaitLayerSchema.optional(),
22650
- team: OmoTaskTeamSettingsLayerSchema.optional()
22671
+ team: OmoTaskTeamSettingsLayerSchema.optional(),
22672
+ dag: OmoTaskDagSettingsLayerSchema.optional()
22651
22673
  }).strict();
22652
22674
  });
22653
22675
 
@@ -26472,10 +26494,10 @@ var init_category_model_requirements = __esm(() => {
26472
26494
  quick: {
26473
26495
  fallbackChain: [
26474
26496
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed" },
26475
- { providers: ["quotio-openai"], model: "gpt-5.6-luna-fast", variant: "low" },
26497
+ { providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
26476
26498
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
26477
26499
  {
26478
- providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "opencode-go", "vercel"],
26500
+ providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "vercel"],
26479
26501
  model: "qwen3.6-flash",
26480
26502
  variant: "low"
26481
26503
  },
@@ -26491,6 +26513,11 @@ var init_category_model_requirements = __esm(() => {
26491
26513
  },
26492
26514
  "unspecified-low": {
26493
26515
  fallbackChain: [
26516
+ {
26517
+ providers: ["xai", "github-copilot", "opencode", "vercel"],
26518
+ model: "grok-4.6",
26519
+ variant: "xhigh"
26520
+ },
26494
26521
  {
26495
26522
  providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
26496
26523
  model: "gpt-5.6-terra",
@@ -27725,6 +27752,7 @@ var init_context_limit_resolver2 = () => {};
27725
27752
 
27726
27753
  // packages/omo-opencode/src/shared/normalize-sdk-response.ts
27727
27754
  function normalizeSDKResponse(response, fallback, options) {
27755
+ const fallbackIsArray = Array.isArray(fallback);
27728
27756
  if (response == null) {
27729
27757
  return fallback;
27730
27758
  }
@@ -27734,14 +27762,17 @@ function normalizeSDKResponse(response, fallback, options) {
27734
27762
  if (typeof response === "object" && "data" in response) {
27735
27763
  const data = response.data;
27736
27764
  if (data != null) {
27765
+ if (fallbackIsArray && !Array.isArray(data)) {
27766
+ return fallback;
27767
+ }
27737
27768
  return data;
27738
27769
  }
27739
- if (options?.preferResponseOnMissingData === true) {
27770
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
27740
27771
  return response;
27741
27772
  }
27742
27773
  return fallback;
27743
27774
  }
27744
- if (options?.preferResponseOnMissingData === true) {
27775
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
27745
27776
  return response;
27746
27777
  }
27747
27778
  return fallback;
@@ -28221,7 +28252,7 @@ This is NOT a default choice - it's for genuinely unclassifiable moderate-effort
28221
28252
  </Category_Context>
28222
28253
 
28223
28254
  <Caller_Warning>
28224
- THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
28255
+ THIS CATEGORY USES GROK 4.6 (xhigh).
28225
28256
 
28226
28257
  **PROVIDE CLEAR STRUCTURE:**
28227
28258
  1. MUST DO: Enumerate required actions explicitly
@@ -28253,7 +28284,7 @@ var init_openai_categories = __esm(() => {
28253
28284
  },
28254
28285
  {
28255
28286
  name: "unspecified-low",
28256
- config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
28287
+ config: { model: "xai/grok-4.6", variant: "xhigh" },
28257
28288
  description: "Tasks that don't fit other categories, low effort required",
28258
28289
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
28259
28290
  }
@@ -83150,6 +83181,47 @@ var init_model_capabilities_generated = __esm(() => {
83150
83181
  input: 272000,
83151
83182
  output: 128000
83152
83183
  }
83184
+ },
83185
+ "grok-4.6": {
83186
+ id: "grok-4.6",
83187
+ family: "grok",
83188
+ reasoning: true,
83189
+ temperature: true,
83190
+ toolCall: true,
83191
+ modalities: {
83192
+ input: [
83193
+ "text",
83194
+ "image"
83195
+ ],
83196
+ output: [
83197
+ "text"
83198
+ ]
83199
+ },
83200
+ limit: {
83201
+ context: 500000,
83202
+ output: 500000
83203
+ }
83204
+ },
83205
+ "xai/grok-4.6": {
83206
+ id: "xai/grok-4.6",
83207
+ family: "grok",
83208
+ reasoning: true,
83209
+ temperature: true,
83210
+ toolCall: true,
83211
+ modalities: {
83212
+ input: [
83213
+ "text",
83214
+ "image",
83215
+ "pdf"
83216
+ ],
83217
+ output: [
83218
+ "text"
83219
+ ]
83220
+ },
83221
+ limit: {
83222
+ context: 500000,
83223
+ output: 500000
83224
+ }
83153
83225
  }
83154
83226
  }
83155
83227
  };
@@ -94613,7 +94685,7 @@ var package_default2;
94613
94685
  var init_package2 = __esm(() => {
94614
94686
  package_default2 = {
94615
94687
  name: "@oh-my-opencode/omo-codex",
94616
- version: "5.0.0-beta.7",
94688
+ version: "5.0.0-beta.8",
94617
94689
  type: "module",
94618
94690
  private: true,
94619
94691
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -95582,8 +95654,8 @@ var init_update_toasts = __esm(() => {
95582
95654
  });
95583
95655
 
95584
95656
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
95585
- import { existsSync as existsSync47 } from "node:fs";
95586
- import { dirname as dirname30, join as join75 } from "node:path";
95657
+ import { existsSync as existsSync48 } from "node:fs";
95658
+ import { dirname as dirname30, join as join76 } from "node:path";
95587
95659
  import { fileURLToPath as fileURLToPath5 } from "node:url";
95588
95660
  function defaultGetModuleHostingWorkspace() {
95589
95661
  try {
@@ -95736,8 +95808,8 @@ var init_background_update_check = __esm(() => {
95736
95808
  init_package_json_locator();
95737
95809
  init_update_toasts();
95738
95810
  defaultDeps4 = {
95739
- existsSync: existsSync47,
95740
- join: join75,
95811
+ existsSync: existsSync48,
95812
+ join: join76,
95741
95813
  runBunInstallWithDetails,
95742
95814
  log: log2,
95743
95815
  getOpenCodeCacheDir,
@@ -95900,7 +95972,7 @@ async function showSpinnerToast(ctx, version3, message) {
95900
95972
  duration: frameInterval + 50
95901
95973
  }
95902
95974
  }).catch(ignoreToastError);
95903
- await new Promise((resolve21) => setTimeout(resolve21, frameInterval));
95975
+ await new Promise((resolve22) => setTimeout(resolve22, frameInterval));
95904
95976
  }
95905
95977
  }
95906
95978
  var SISYPHUS_SPINNER;
@@ -101512,29 +101584,55 @@ function nodeErrorCode6(error51) {
101512
101584
  var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
101513
101585
  // packages/omo-senpi/src/install/install-senpi.ts
101514
101586
  import { execFile as execFile4 } from "node:child_process";
101515
- import { existsSync as existsSync31 } from "node:fs";
101516
- import { homedir as homedir10 } from "node:os";
101517
- import { dirname as dirname24, join as join62, resolve as resolve19 } from "node:path";
101587
+ import { existsSync as existsSync32 } from "node:fs";
101588
+ import { homedir as homedir11 } from "node:os";
101589
+ import { dirname as dirname24, join as join63, resolve as resolve20 } from "node:path";
101518
101590
  import { fileURLToPath } from "node:url";
101519
101591
  import { promisify as promisify2 } from "node:util";
101520
101592
 
101521
- // packages/omo-senpi/src/install/local-launcher.ts
101522
- import { chmodSync as chmodSync3, existsSync as existsSync30, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "node:fs";
101593
+ // packages/omo-senpi/src/components/agent-home/resolve-agent-home.ts
101594
+ import { existsSync as existsSync30 } from "node:fs";
101523
101595
  import { homedir as homedir9 } from "node:os";
101524
- import { dirname as dirname21, join as join59, resolve as resolve17 } from "node:path";
101596
+ import { join as join59, resolve as resolve17 } from "node:path";
101597
+ var AGENT_DIR_ENV_NAMES = [
101598
+ "OMO_CODING_AGENT_DIR",
101599
+ "SENPI_CODING_AGENT_DIR",
101600
+ "PI_CODING_AGENT_DIR"
101601
+ ];
101602
+ var AGENT_HOME_SENTINEL = "settings.json";
101603
+ function resolveAgentHome(options) {
101604
+ const { env: env3, homeDir = homedir9(), exists: exists7 = existsSync30 } = options;
101605
+ for (const name of AGENT_DIR_ENV_NAMES) {
101606
+ const configured = env3[name]?.trim();
101607
+ if (configured)
101608
+ return resolve17(configured);
101609
+ }
101610
+ const brandedHome = join59(homeDir, ".omo");
101611
+ const canonical = join59(brandedHome, "agent");
101612
+ if (exists7(join59(canonical, AGENT_HOME_SENTINEL)))
101613
+ return canonical;
101614
+ if (exists7(join59(brandedHome, AGENT_HOME_SENTINEL)))
101615
+ return brandedHome;
101616
+ return join59(homeDir, ".senpi", "agent");
101617
+ }
101618
+
101619
+ // packages/omo-senpi/src/install/local-launcher.ts
101620
+ import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "node:fs";
101621
+ import { homedir as homedir10 } from "node:os";
101622
+ import { dirname as dirname21, join as join60, resolve as resolve18 } from "node:path";
101525
101623
  var MARKER = "omo-local-launcher";
101526
- function localLauncherPath(homeDir = homedir9()) {
101527
- return join59(homeDir, ".local", "bin", "omo");
101624
+ function localLauncherPath(homeDir = homedir10()) {
101625
+ return join60(homeDir, ".local", "bin", "omo");
101528
101626
  }
101529
- function localLauncherCmdPath(homeDir = homedir9()) {
101530
- return join59(homeDir, ".local", "bin", "omo.cmd");
101627
+ function localLauncherCmdPath(homeDir = homedir10()) {
101628
+ return join60(homeDir, ".local", "bin", "omo.cmd");
101531
101629
  }
101532
101630
  function renderLocalLauncher(options) {
101533
101631
  const brand = {
101534
101632
  name: "omo",
101535
101633
  displayVersion: options.version ?? "local",
101536
101634
  configDir: ".omo",
101537
- flatLayout: true,
101635
+ flatLayout: false,
101538
101636
  envPrefix: "OMO",
101539
101637
  userAgent: "omo",
101540
101638
  originator: "omo",
@@ -101548,11 +101646,23 @@ function renderLocalLauncher(options) {
101548
101646
  return `#!/usr/bin/env node
101549
101647
  // ${MARKER}: generated by the omo-senpi installer. Delete this file to remove the local launcher.
101550
101648
  import { spawn } from "node:child_process"
101649
+ import { homedir } from "node:os"
101650
+ import { join } from "node:path"
101551
101651
 
101552
101652
  const brand = ${JSON.stringify(brand)}
101553
101653
  const cli = process.env.OMO_SENPI_CLI_PATH ?? ${JSON.stringify(options.senpiCliPath)}
101554
101654
  const plugin = process.env.OMO_PLUGIN_ROOT ?? ${JSON.stringify(options.pluginPath)}
101555
- const env = { ...process.env, SENPI_BRAND: JSON.stringify(brand), OMO_NATIVE: "1" }
101655
+ // The same directory the published launcher pins, so a local install shares one state location
101656
+ // with the published one and with anything either of them spawns.
101657
+ const agentDir = process.env.OMO_CODING_AGENT_DIR ?? process.env.SENPI_CODING_AGENT_DIR
101658
+ ?? process.env.PI_CODING_AGENT_DIR ?? join(homedir(), ".omo", "agent")
101659
+ const env = {
101660
+ ...process.env,
101661
+ SENPI_BRAND: JSON.stringify(brand),
101662
+ OMO_NATIVE: "1",
101663
+ OMO_CODING_AGENT_DIR: agentDir,
101664
+ SENPI_CODING_AGENT_DIR: agentDir,
101665
+ }
101556
101666
  // Anything resolving the product by name must re-enter through this launcher, never the engine.
101557
101667
  env.OMO_BIN = process.argv[1]
101558
101668
  const selfUpdate = process.argv[2] === "update"
@@ -101577,7 +101687,7 @@ child.on("close", (code, signal) => {
101577
101687
  }
101578
101688
  function installLocalLauncher(options) {
101579
101689
  const path6 = localLauncherPath(options.homeDir);
101580
- if (existsSync30(path6) && !readFileSync14(path6, "utf8").includes(MARKER))
101690
+ if (existsSync31(path6) && !readFileSync14(path6, "utf8").includes(MARKER))
101581
101691
  return;
101582
101692
  mkdirSync10(dirname21(path6), { recursive: true });
101583
101693
  writeFileSync6(path6, renderLocalLauncher(options));
@@ -101594,16 +101704,16 @@ node "%~dp0omo" %*\r
101594
101704
  import { createHash as createHash5 } from "node:crypto";
101595
101705
  import { constants as constants8 } from "node:fs";
101596
101706
  import { access as access2, readFile as readFile26, stat as stat6 } from "node:fs/promises";
101597
- import { dirname as dirname23, join as join61 } from "node:path";
101707
+ import { dirname as dirname23, join as join62 } from "node:path";
101598
101708
 
101599
101709
  // packages/omo-senpi/src/install/senpi-settings.ts
101600
101710
  import { constants as constants7 } from "node:fs";
101601
101711
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "node:fs/promises";
101602
- import { dirname as dirname22, join as join60, resolve as resolve18 } from "node:path";
101712
+ import { dirname as dirname22, join as join61, resolve as resolve19 } from "node:path";
101603
101713
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
101604
101714
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
101605
- join60("packages", "pi-goal"),
101606
- join60("packages", "pi-webfetch")
101715
+ join61("packages", "pi-goal"),
101716
+ join61("packages", "pi-webfetch")
101607
101717
  ];
101608
101718
  async function readSettings(settingsPath) {
101609
101719
  let raw;
@@ -101632,13 +101742,13 @@ function dedupePackages(packages) {
101632
101742
  return [...new Set(packages)];
101633
101743
  }
101634
101744
  function removeLegacyBuiltinShadows(packages, repoRoot, agentDir) {
101635
- const shadowPaths = new Set(LEGACY_BUILTIN_SHADOW_PACKAGES.map((path6) => resolve18(repoRoot, path6)));
101636
- return packages.filter((entry) => !shadowPaths.has(resolve18(agentDir, entry)));
101745
+ const shadowPaths = new Set(LEGACY_BUILTIN_SHADOW_PACKAGES.map((path6) => resolve19(repoRoot, path6)));
101746
+ return packages.filter((entry) => !shadowPaths.has(resolve19(agentDir, entry)));
101637
101747
  }
101638
101748
  async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir) {
101639
- const currentPath = resolve18(currentPluginPath);
101749
+ const currentPath = resolve19(currentPluginPath);
101640
101750
  const entries = await Promise.all(packages.map(async (entry) => {
101641
- const packagePath = resolve18(agentDir, entry);
101751
+ const packagePath = resolve19(agentDir, entry);
101642
101752
  if (packagePath === currentPath)
101643
101753
  return currentPath;
101644
101754
  return await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME ? undefined : entry;
@@ -101678,7 +101788,7 @@ function isRecord10(value) {
101678
101788
  async function readPackageName(packagePath) {
101679
101789
  let raw;
101680
101790
  try {
101681
- raw = await readFile25(join60(packagePath, "package.json"), "utf8");
101791
+ raw = await readFile25(join61(packagePath, "package.json"), "utf8");
101682
101792
  } catch (error51) {
101683
101793
  if (isErrno(error51, "ENOENT") || isErrno(error51, "ENOTDIR"))
101684
101794
  return;
@@ -101703,54 +101813,54 @@ function isErrno(error51, code) {
101703
101813
 
101704
101814
  // packages/omo-senpi/src/install/plugin-artifacts.ts
101705
101815
  var REQUIRED_PLUGIN_ARTIFACTS = [
101706
- join61("extensions", "omo.js"),
101707
- join61("extensions", "omo-task.js"),
101708
- join61("extensions", "omo-member.js"),
101709
- join61("extensions", "memory-run-supervisor.mjs"),
101710
- join61("extensions", "reflection-persona.md"),
101711
- join61("extensions", "dream-persona.md"),
101712
- join61("extensions", "facts-persona.md"),
101713
- join61("skills", "ast-grep", "SKILL.md"),
101714
- join61("skills", "coding-agent-sessions", "SKILL.md"),
101715
- join61("skills", "debugging", "SKILL.md"),
101716
- join61("skills", "frontend", "SKILL.md"),
101717
- join61("skills", "git-master", "SKILL.md"),
101718
- join61("skills", "init-deep", "SKILL.md"),
101719
- join61("skills", "lsp-setup", "SKILL.md"),
101720
- join61("skills", "programming", "SKILL.md"),
101721
- join61("skills", "refactor", "SKILL.md"),
101722
- join61("skills", "remove-ai-slops", "SKILL.md"),
101723
- join61("skills", "review-work", "SKILL.md"),
101724
- join61("skills", "start-work", "SKILL.md"),
101725
- join61("skills", "ultimate-browsing", "SKILL.md"),
101726
- join61("skills", "ultrawork", "SKILL.md"),
101727
- join61("skills", "ulw-loop", "SKILL.md"),
101728
- join61("skills", "ulw-plan", "SKILL.md"),
101729
- join61("skills", "ulw-research", "SKILL.md"),
101730
- join61("skills", "visual-qa", "SKILL.md"),
101731
- join61("runtime", "ast-grep-mcp", "cli.js"),
101732
- join61("runtime", "agent-toolkit", "cli.js"),
101733
- join61("runtime", "agent-toolkit", "ulw-loop", "cli.js"),
101734
- join61("runtime", "agent-toolkit", "omo-agent-toolkit"),
101735
- join61("runtime", "agent-toolkit", "omo-agent-toolkit.cmd"),
101736
- join61("runtime", "lsp-daemon", "dist", "cli.js"),
101737
- join61("runtime", "lsp-daemon", "dist", "index.js"),
101738
- join61("runtime", "lsp-daemon", "dist", "index.d.ts"),
101739
- join61("runtime", "lsp-daemon", "dist", "daemon-client.js"),
101740
- join61("runtime", "lsp-daemon", "dist", "daemon-client.d.ts"),
101741
- join61("runtime", "lsp-daemon", "dist", "package.json"),
101742
- join61("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
101743
- join61("scripts", "install.mjs")
101816
+ join62("extensions", "omo.js"),
101817
+ join62("extensions", "omo-task.js"),
101818
+ join62("extensions", "omo-member.js"),
101819
+ join62("extensions", "memory-run-supervisor.mjs"),
101820
+ join62("extensions", "reflection-persona.md"),
101821
+ join62("extensions", "dream-persona.md"),
101822
+ join62("extensions", "facts-persona.md"),
101823
+ join62("skills", "ast-grep", "SKILL.md"),
101824
+ join62("skills", "coding-agent-sessions", "SKILL.md"),
101825
+ join62("skills", "debugging", "SKILL.md"),
101826
+ join62("skills", "frontend", "SKILL.md"),
101827
+ join62("skills", "git-master", "SKILL.md"),
101828
+ join62("skills", "init-deep", "SKILL.md"),
101829
+ join62("skills", "lsp-setup", "SKILL.md"),
101830
+ join62("skills", "programming", "SKILL.md"),
101831
+ join62("skills", "refactor", "SKILL.md"),
101832
+ join62("skills", "remove-ai-slops", "SKILL.md"),
101833
+ join62("skills", "review-work", "SKILL.md"),
101834
+ join62("skills", "start-work", "SKILL.md"),
101835
+ join62("skills", "ultimate-browsing", "SKILL.md"),
101836
+ join62("skills", "ultrawork", "SKILL.md"),
101837
+ join62("skills", "ulw-loop", "SKILL.md"),
101838
+ join62("skills", "ulw-plan", "SKILL.md"),
101839
+ join62("skills", "ulw-research", "SKILL.md"),
101840
+ join62("skills", "visual-qa", "SKILL.md"),
101841
+ join62("runtime", "ast-grep-mcp", "cli.js"),
101842
+ join62("runtime", "agent-toolkit", "cli.js"),
101843
+ join62("runtime", "agent-toolkit", "ulw-loop", "cli.js"),
101844
+ join62("runtime", "agent-toolkit", "omo-agent-toolkit"),
101845
+ join62("runtime", "agent-toolkit", "omo-agent-toolkit.cmd"),
101846
+ join62("runtime", "lsp-daemon", "dist", "cli.js"),
101847
+ join62("runtime", "lsp-daemon", "dist", "index.js"),
101848
+ join62("runtime", "lsp-daemon", "dist", "index.d.ts"),
101849
+ join62("runtime", "lsp-daemon", "dist", "daemon-client.js"),
101850
+ join62("runtime", "lsp-daemon", "dist", "daemon-client.d.ts"),
101851
+ join62("runtime", "lsp-daemon", "dist", "package.json"),
101852
+ join62("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
101853
+ join62("scripts", "install.mjs")
101744
101854
  ];
101745
101855
  async function ensurePluginArtifacts(context) {
101746
101856
  if (context.allowBuild) {
101747
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
101748
- await context.runCommand("node", [join61("packages", "omo-codex", "plugin", "scripts", "materialize-shared-upstreams.mjs")], { cwd: context.repoRoot });
101749
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
101750
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-install.mjs")], { cwd: context.repoRoot });
101751
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-lsp-daemon-runtime.mjs")], { cwd: context.repoRoot });
101752
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-ast-grep-mcp-runtime.mjs")], { cwd: context.repoRoot });
101753
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-agent-toolkit.mjs")], { cwd: context.repoRoot });
101857
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
101858
+ await context.runCommand("node", [join62("packages", "omo-codex", "plugin", "scripts", "materialize-shared-upstreams.mjs")], { cwd: context.repoRoot });
101859
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
101860
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "build-install.mjs")], { cwd: context.repoRoot });
101861
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "stage-lsp-daemon-runtime.mjs")], { cwd: context.repoRoot });
101862
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "stage-ast-grep-mcp-runtime.mjs")], { cwd: context.repoRoot });
101863
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "stage-agent-toolkit.mjs")], { cwd: context.repoRoot });
101754
101864
  }
101755
101865
  if (await hasMissingPluginArtifact(context.pluginPath)) {
101756
101866
  throw new Error(`Packed omo-senpi plugin is missing required runtime artifacts at ${context.pluginPath}`);
@@ -101759,14 +101869,14 @@ async function ensurePluginArtifacts(context) {
101759
101869
  }
101760
101870
  async function hasMissingPluginArtifact(pluginPath) {
101761
101871
  for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {
101762
- if (!await fileExists2(join61(pluginPath, artifact)))
101872
+ if (!await fileExists2(join62(pluginPath, artifact)))
101763
101873
  return true;
101764
101874
  }
101765
101875
  return false;
101766
101876
  }
101767
101877
  async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
101768
- const runtimeEntry = join61(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
101769
- const manifestPath = join61(dirname23(runtimeEntry), "manifest.json");
101878
+ const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
101879
+ const manifestPath = join62(dirname23(runtimeEntry), "manifest.json");
101770
101880
  let runtimeStat;
101771
101881
  try {
101772
101882
  runtimeStat = await stat6(runtimeEntry);
@@ -101841,7 +101951,7 @@ async function runSenpiInstaller(options = {}) {
101841
101951
  const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101842
101952
  installLocalLauncher({
101843
101953
  pluginPath: context.pluginPath,
101844
- senpiCliPath: join62(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101954
+ senpiCliPath: join63(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101845
101955
  });
101846
101956
  return {
101847
101957
  ok: true,
@@ -101856,14 +101966,14 @@ async function runSenpiInstaller(options = {}) {
101856
101966
  function resolveInstallContext(options) {
101857
101967
  const env3 = options.env ?? process.env;
101858
101968
  const allowBuild = options.pluginPath === undefined;
101859
- const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve19(options.pluginPath))));
101860
- const agentDir = resolve19(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join62(homedir10(), ".senpi", "agent"));
101861
- const pluginPath = resolve19(options.pluginPath ?? join62(repoRoot, "packages", "omo-senpi", "plugin"));
101969
+ const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve20(options.pluginPath))));
101970
+ const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
101971
+ const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
101862
101972
  return {
101863
101973
  env: env3,
101864
101974
  repoRoot,
101865
101975
  agentDir,
101866
- settingsPath: join62(agentDir, "settings.json"),
101976
+ settingsPath: join63(agentDir, "settings.json"),
101867
101977
  pluginPath,
101868
101978
  platform: options.platform ?? process.platform,
101869
101979
  allowBuild,
@@ -101880,14 +101990,14 @@ async function defaultRunCommand3(command, args, options) {
101880
101990
  function findRepoRoot2(importerDir) {
101881
101991
  let current = importerDir;
101882
101992
  for (let depth = 0;depth <= 7; depth += 1) {
101883
- if (fileExistsSync(join62(current, "packages", "omo-senpi", "plugin", "package.json")))
101993
+ if (fileExistsSync(join63(current, "packages", "omo-senpi", "plugin", "package.json")))
101884
101994
  return current;
101885
- current = resolve19(current, "..");
101995
+ current = resolve20(current, "..");
101886
101996
  }
101887
101997
  throw new Error("Unable to locate packages/omo-senpi/plugin/package.json from installer module");
101888
101998
  }
101889
101999
  function fileExistsSync(path6) {
101890
- return existsSync31(path6);
102000
+ return existsSync32(path6);
101891
102001
  }
101892
102002
  // packages/omo-opencode/src/cli/star-request.ts
101893
102003
  import { execFile as execFile5 } from "node:child_process";
@@ -101923,23 +102033,23 @@ async function starGitHubRepositories(platform = "both", runCommand = runGitHubS
101923
102033
  init_provider_availability();
101924
102034
 
101925
102035
  // packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
101926
- import { existsSync as existsSync33, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "node:fs";
101927
- import { join as join64 } from "node:path";
102036
+ import { existsSync as existsSync34, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "node:fs";
102037
+ import { join as join65 } from "node:path";
101928
102038
 
101929
102039
  // packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
101930
102040
  init_shared();
101931
- import { existsSync as existsSync32, readFileSync as readFileSync15 } from "node:fs";
101932
- import { join as join63 } from "node:path";
102041
+ import { existsSync as existsSync33, readFileSync as readFileSync15 } from "node:fs";
102042
+ import { join as join64 } from "node:path";
101933
102043
  var TUI_SUBPATH = "tui";
101934
102044
  var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
101935
102045
  function fileEntryPackageJsonPath(entry) {
101936
102046
  let path6 = entry.slice("file:".length);
101937
102047
  if (path6.startsWith("//"))
101938
102048
  path6 = path6.slice(2);
101939
- return join63(path6, "package.json");
102049
+ return join64(path6, "package.json");
101940
102050
  }
101941
102051
  function packageJsonExportsTui(pkgJsonPath) {
101942
- if (!existsSync32(pkgJsonPath))
102052
+ if (!existsSync33(pkgJsonPath))
101943
102053
  return null;
101944
102054
  try {
101945
102055
  const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
@@ -101974,14 +102084,14 @@ function packageExportsTuiForServerEntry(entry) {
101974
102084
  const packageName = packageNameFromServerEntry(entry);
101975
102085
  if (packageName === null)
101976
102086
  return null;
101977
- return packageJsonExportsTui(join63(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
102087
+ return packageJsonExportsTui(join64(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
101978
102088
  }
101979
102089
  function isOurFilePluginEntry(entry) {
101980
102090
  if (typeof entry !== "string" || !entry.startsWith("file:"))
101981
102091
  return false;
101982
102092
  try {
101983
102093
  const pkgJsonPath = fileEntryPackageJsonPath(entry);
101984
- if (!existsSync32(pkgJsonPath))
102094
+ if (!existsSync33(pkgJsonPath))
101985
102095
  return false;
101986
102096
  const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
101987
102097
  return typeof parsed.name === "string" && ACCEPTED_PACKAGE_NAMES.includes(parsed.name);
@@ -102016,7 +102126,7 @@ function isCanonicalNamedTuiPluginEntry(entry) {
102016
102126
  }
102017
102127
  function detectServerPluginRegistration() {
102018
102128
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
102019
- const configPath = existsSync32(paths2.configJsonc) ? paths2.configJsonc : existsSync32(paths2.configJson) ? paths2.configJson : null;
102129
+ const configPath = existsSync33(paths2.configJsonc) ? paths2.configJsonc : existsSync33(paths2.configJson) ? paths2.configJson : null;
102020
102130
  if (!configPath) {
102021
102131
  return { registered: false, configPath: null, entry: null, packageExportsTui: null };
102022
102132
  }
@@ -102039,8 +102149,8 @@ function detectServerPluginRegistration() {
102039
102149
  }
102040
102150
  }
102041
102151
  function detectTuiPluginRegistration() {
102042
- const tuiJsonPath = join63(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
102043
- if (!existsSync32(tuiJsonPath)) {
102152
+ const tuiJsonPath = join64(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
102153
+ if (!existsSync33(tuiJsonPath)) {
102044
102154
  return {
102045
102155
  registered: false,
102046
102156
  configPath: tuiJsonPath,
@@ -102195,11 +102305,11 @@ function readConfig(path6) {
102195
102305
  return null;
102196
102306
  }
102197
102307
  function readServerConfig(configDir) {
102198
- const jsoncPath = join64(configDir, "opencode.jsonc");
102199
- if (existsSync33(jsoncPath))
102308
+ const jsoncPath = join65(configDir, "opencode.jsonc");
102309
+ if (existsSync34(jsoncPath))
102200
102310
  return readConfig(jsoncPath);
102201
- const jsonPath = join64(configDir, "opencode.json");
102202
- if (existsSync33(jsonPath))
102311
+ const jsonPath = join65(configDir, "opencode.json");
102312
+ if (existsSync34(jsonPath))
102203
102313
  return readConfig(jsonPath);
102204
102314
  return null;
102205
102315
  }
@@ -102219,7 +102329,7 @@ function desiredTuiEntry(serverEntry) {
102219
102329
  return null;
102220
102330
  }
102221
102331
  function readTuiConfig(tuiJsonPath) {
102222
- if (!existsSync33(tuiJsonPath)) {
102332
+ if (!existsSync34(tuiJsonPath)) {
102223
102333
  return { config: {}, malformed: false };
102224
102334
  }
102225
102335
  const config3 = readConfig(tuiJsonPath);
@@ -102240,7 +102350,7 @@ function ensureTuiPluginEntry(opts = {}) {
102240
102350
  if (!desiredEntry) {
102241
102351
  return { changed: false, reason: "no-server-entry" };
102242
102352
  }
102243
- const tuiJsonPath = join64(configDir, "tui.json");
102353
+ const tuiJsonPath = join65(configDir, "tui.json");
102244
102354
  const { config: config3, malformed } = readTuiConfig(tuiJsonPath);
102245
102355
  if (malformed) {
102246
102356
  return { changed: false, reason: "malformed" };
@@ -102255,16 +102365,16 @@ function ensureTuiPluginEntry(opts = {}) {
102255
102365
  }
102256
102366
 
102257
102367
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
102258
- import { homedir as homedir11 } from "node:os";
102259
- import { join as join65 } from "node:path";
102368
+ import { homedir as homedir12 } from "node:os";
102369
+ import { join as join66 } from "node:path";
102260
102370
 
102261
102371
  // packages/shared-skills/index.mjs
102262
- import { existsSync as existsSync34 } from "node:fs";
102372
+ import { existsSync as existsSync35 } from "node:fs";
102263
102373
  import { fileURLToPath as fileURLToPath2 } from "node:url";
102264
102374
  var SKILLS_PROBE_SPECIFIERS = ["./skills/", "../skills/", "../../skills/"];
102265
102375
  function sharedSkillsRootPath() {
102266
102376
  const candidates = SKILLS_PROBE_SPECIFIERS.map((specifier) => fileURLToPath2(new URL(specifier, import.meta.url)));
102267
- return candidates.find((candidate2) => existsSync34(candidate2)) ?? candidates[0];
102377
+ return candidates.find((candidate2) => existsSync35(candidate2)) ?? candidates[0];
102268
102378
  }
102269
102379
 
102270
102380
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
@@ -102278,9 +102388,9 @@ function describeResult2(result) {
102278
102388
  }
102279
102389
  async function installAstGrepForOpenCode(options = {}) {
102280
102390
  const platform = options.platform ?? process.platform;
102281
- const baseDir = join65(options.homeDir ?? homedir11(), ".omo");
102391
+ const baseDir = join66(options.homeDir ?? homedir12(), ".omo");
102282
102392
  const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
102283
- const skillDir = join65(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102393
+ const skillDir = join66(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102284
102394
  const installer = options.installer ?? runAstGrepSkillInstall;
102285
102395
  try {
102286
102396
  const result = await installer({ platform, skillDir, targetDir });
@@ -106310,7 +106420,7 @@ async function resolveSession(options) {
106310
106420
  if (attempt < SESSION_CREATE_MAX_RETRIES) {
106311
106421
  const delay2 = retryDelayMs * attempt;
106312
106422
  console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
106313
- await new Promise((resolve20) => setTimeout(resolve20, delay2));
106423
+ await new Promise((resolve21) => setTimeout(resolve21, delay2));
106314
106424
  }
106315
106425
  continue;
106316
106426
  }
@@ -106321,7 +106431,7 @@ async function resolveSession(options) {
106321
106431
  if (attempt < SESSION_CREATE_MAX_RETRIES) {
106322
106432
  const delay2 = retryDelayMs * attempt;
106323
106433
  console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
106324
- await new Promise((resolve20) => setTimeout(resolve20, delay2));
106434
+ await new Promise((resolve21) => setTimeout(resolve21, delay2));
106325
106435
  }
106326
106436
  }
106327
106437
  throw new Error("Failed to create session after all retries");
@@ -106719,9 +106829,9 @@ function isClosingFence(line, fence) {
106719
106829
  return run?.charAt(0) === fence.marker && run.length >= fence.length;
106720
106830
  }
106721
106831
  // packages/boulder-state/src/top-level-task.ts
106722
- import { existsSync as existsSync35, readFileSync as readFileSync17 } from "node:fs";
106832
+ import { existsSync as existsSync36, readFileSync as readFileSync17 } from "node:fs";
106723
106833
  function readCurrentTopLevelTask(planPath) {
106724
- if (!existsSync35(planPath)) {
106834
+ if (!existsSync36(planPath)) {
106725
106835
  return null;
106726
106836
  }
106727
106837
  try {
@@ -106732,13 +106842,13 @@ function readCurrentTopLevelTask(planPath) {
106732
106842
  }
106733
106843
  }
106734
106844
  // packages/boulder-state/src/storage/path.ts
106735
- import { existsSync as existsSync36 } from "node:fs";
106736
- import { isAbsolute as isAbsolute11, join as join66, relative as relative8, resolve as resolve20 } from "node:path";
106845
+ import { existsSync as existsSync37 } from "node:fs";
106846
+ import { isAbsolute as isAbsolute11, join as join67, relative as relative8, resolve as resolve21 } from "node:path";
106737
106847
  function getBoulderFilePath(directory) {
106738
- return join66(directory, BOULDER_DIR, BOULDER_FILE);
106848
+ return join67(directory, BOULDER_DIR, BOULDER_FILE);
106739
106849
  }
106740
106850
  function resolveTrackedPath(baseDirectory, trackedPath) {
106741
- return isAbsolute11(trackedPath) ? resolve20(trackedPath) : resolve20(baseDirectory, trackedPath);
106851
+ return isAbsolute11(trackedPath) ? resolve21(trackedPath) : resolve21(baseDirectory, trackedPath);
106742
106852
  }
106743
106853
  function resolveBoulderPlanPath(directory, state) {
106744
106854
  const absolutePlanPath = resolveTrackedPath(directory, state.active_plan);
@@ -106746,22 +106856,22 @@ function resolveBoulderPlanPath(directory, state) {
106746
106856
  if (!worktreePath) {
106747
106857
  return absolutePlanPath;
106748
106858
  }
106749
- const absoluteDirectory = resolve20(directory);
106859
+ const absoluteDirectory = resolve21(directory);
106750
106860
  const relativePlanPath = relative8(absoluteDirectory, absolutePlanPath);
106751
106861
  if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute11(relativePlanPath)) {
106752
106862
  return absolutePlanPath;
106753
106863
  }
106754
106864
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
106755
- const worktreePlanPath = resolve20(absoluteWorktreePath, relativePlanPath);
106756
- return existsSync36(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
106865
+ const worktreePlanPath = resolve21(absoluteWorktreePath, relativePlanPath);
106866
+ return existsSync37(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
106757
106867
  }
106758
106868
  function resolveBoulderPlanPathForWork(directory, work) {
106759
106869
  return resolveBoulderPlanPath(directory, work);
106760
106870
  }
106761
106871
  // packages/boulder-state/src/storage/plan-progress.ts
106762
- import { existsSync as existsSync37, readFileSync as readFileSync18, readdirSync as readdirSync7, statSync as statSync4 } from "node:fs";
106872
+ import { existsSync as existsSync38, readFileSync as readFileSync18, readdirSync as readdirSync7, statSync as statSync4 } from "node:fs";
106763
106873
  function getPlanProgress(planPath) {
106764
- if (!existsSync37(planPath)) {
106874
+ if (!existsSync38(planPath)) {
106765
106875
  return { total: 0, completed: 0, isComplete: false };
106766
106876
  }
106767
106877
  try {
@@ -106844,10 +106954,10 @@ function selectMirrorWork(state) {
106844
106954
  return sorted[0] ?? null;
106845
106955
  }
106846
106956
  // packages/boulder-state/src/storage/read-state.ts
106847
- import { existsSync as existsSync38, readFileSync as readFileSync19 } from "node:fs";
106957
+ import { existsSync as existsSync39, readFileSync as readFileSync19 } from "node:fs";
106848
106958
  function readBoulderState(directory) {
106849
106959
  const filePath = getBoulderFilePath(directory);
106850
- if (!existsSync38(filePath)) {
106960
+ if (!existsSync39(filePath)) {
106851
106961
  return null;
106852
106962
  }
106853
106963
  try {
@@ -106917,14 +107027,14 @@ init_state();
106917
107027
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
106918
107028
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
106919
107029
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
106920
- import { existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "node:fs";
106921
- import { join as join67 } from "node:path";
107030
+ import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "node:fs";
107031
+ import { join as join68 } from "node:path";
106922
107032
  function getMarkerPath(directory, sessionID) {
106923
- return join67(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
107033
+ return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
106924
107034
  }
106925
107035
  function readContinuationMarker(directory, sessionID) {
106926
107036
  const markerPath = getMarkerPath(directory, sessionID);
106927
- if (!existsSync39(markerPath))
107037
+ if (!existsSync40(markerPath))
106928
107038
  return null;
106929
107039
  try {
106930
107040
  const raw = readFileSync20(markerPath, "utf-8");
@@ -106993,7 +107103,7 @@ async function isSessionInBoulderLineage(input) {
106993
107103
  init_shared();
106994
107104
  init_compaction_marker();
106995
107105
  import { readFileSync as readFileSync21, readdirSync as readdirSync8 } from "node:fs";
106996
- import { join as join68 } from "node:path";
107106
+ import { join as join69 } from "node:path";
106997
107107
  var defaultSessionLastAgentDeps = {
106998
107108
  getMessageDir,
106999
107109
  isSqliteBackend,
@@ -107053,7 +107163,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
107053
107163
  try {
107054
107164
  const messages = readdirSync8(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
107055
107165
  try {
107056
- const content = readFileSync21(join68(messageDir, fileName), "utf-8");
107166
+ const content = readFileSync21(join69(messageDir, fileName), "utf-8");
107057
107167
  const parsed = JSON.parse(content);
107058
107168
  return {
107059
107169
  fileName,
@@ -107096,8 +107206,8 @@ init_agent_display_names();
107096
107206
 
107097
107207
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
107098
107208
  init_frontmatter2();
107099
- import { existsSync as existsSync40, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "node:fs";
107100
- import { dirname as dirname26, join as join69 } from "node:path";
107209
+ import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "node:fs";
107210
+ import { dirname as dirname26, join as join70 } from "node:path";
107101
107211
 
107102
107212
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
107103
107213
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -107106,11 +107216,11 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
107106
107216
 
107107
107217
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
107108
107218
  function getStateFilePath(directory, customPath) {
107109
- return customPath ? join69(directory, customPath) : join69(directory, DEFAULT_STATE_FILE);
107219
+ return customPath ? join70(directory, customPath) : join70(directory, DEFAULT_STATE_FILE);
107110
107220
  }
107111
107221
  function readState(directory, customPath) {
107112
107222
  const filePath = getStateFilePath(directory, customPath);
107113
- if (!existsSync40(filePath)) {
107223
+ if (!existsSync41(filePath)) {
107114
107224
  return null;
107115
107225
  }
107116
107226
  try {
@@ -107340,7 +107450,7 @@ async function pollForCompletion(ctx, eventState, abortController, options = {})
107340
107450
  const secondaryMeaningfulWorkTimeoutMs = options.secondaryMeaningfulWorkTimeoutMs ?? DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS;
107341
107451
  const requireMeaningfulWork = options.requireMeaningfulWork ?? false;
107342
107452
  const now = options.now ?? Date.now;
107343
- const sleep = options.sleep ?? ((ms) => new Promise((resolve21) => setTimeout(resolve21, ms)));
107453
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve22) => setTimeout(resolve22, ms)));
107344
107454
  let consecutiveCompleteChecks = 0;
107345
107455
  let errorCycleCount = 0;
107346
107456
  let firstWorkTimestamp = null;
@@ -107505,7 +107615,7 @@ function createAbortError() {
107505
107615
  return error51;
107506
107616
  }
107507
107617
  function sleep(delayMs) {
107508
- return new Promise((resolve21) => setTimeout(resolve21, delayMs));
107618
+ return new Promise((resolve22) => setTimeout(resolve22, delayMs));
107509
107619
  }
107510
107620
  function hasPromptStartEvidence(eventState) {
107511
107621
  return eventState.mainSessionStarted || eventState.hasReceivedMeaningfulWork || eventState.messageCount > 0 || eventState.currentTool !== null;
@@ -107880,7 +107990,7 @@ var EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS = 2000;
107880
107990
  async function waitForEventProcessorShutdown(eventProcessor, timeoutMs = EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS) {
107881
107991
  const completed = await Promise.race([
107882
107992
  eventProcessor.then(() => true),
107883
- new Promise((resolve21) => setTimeout(() => resolve21(false), timeoutMs))
107993
+ new Promise((resolve22) => setTimeout(() => resolve22(false), timeoutMs))
107884
107994
  ]);
107885
107995
  }
107886
107996
  async function run(options) {
@@ -108206,14 +108316,14 @@ async function getLocalVersion(options = {}) {
108206
108316
  }
108207
108317
  }
108208
108318
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
108209
- import { existsSync as existsSync51, readFileSync as readFileSync32 } from "node:fs";
108319
+ import { existsSync as existsSync52, readFileSync as readFileSync32 } from "node:fs";
108210
108320
 
108211
108321
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
108212
108322
  init_extract_semver();
108213
108323
  init_bun_which_shim();
108214
- import { existsSync as existsSync48, accessSync as accessSync4, constants as constants11 } from "node:fs";
108215
- import { homedir as homedir14 } from "node:os";
108216
- import { join as join76 } from "node:path";
108324
+ import { existsSync as existsSync49, accessSync as accessSync4, constants as constants11 } from "node:fs";
108325
+ import { homedir as homedir15 } from "node:os";
108326
+ import { join as join77 } from "node:path";
108217
108327
 
108218
108328
  // packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
108219
108329
  init_spawn_with_windows_hide();
@@ -108252,8 +108362,8 @@ async function spawnWithTimeout(command, options, timeoutMs = DEFAULT_SPAWN_TIME
108252
108362
  const stdoutPromise = readSpawnStream(proc.stdout);
108253
108363
  const stderrPromise = readSpawnStream(proc.stderr);
108254
108364
  let timer;
108255
- const timeoutPromise = new Promise((resolve21) => {
108256
- timer = setTimeout(() => resolve21("timeout"), timeoutMs);
108365
+ const timeoutPromise = new Promise((resolve22) => {
108366
+ timer = setTimeout(() => resolve22("timeout"), timeoutMs);
108257
108367
  });
108258
108368
  const processPromise = (async () => {
108259
108369
  await proc.exited;
@@ -108300,22 +108410,22 @@ function isExecutable2(path12) {
108300
108410
  }
108301
108411
  }
108302
108412
  function getDesktopAppPaths(platform) {
108303
- const home = homedir14();
108413
+ const home = homedir15();
108304
108414
  switch (platform) {
108305
108415
  case "darwin":
108306
108416
  return [
108307
108417
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
108308
- join76(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108418
+ join77(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108309
108419
  ];
108310
108420
  case "win32": {
108311
108421
  const programFiles = process.env.ProgramFiles;
108312
108422
  const localAppData = process.env.LOCALAPPDATA;
108313
108423
  const paths2 = [];
108314
108424
  if (programFiles) {
108315
- paths2.push(join76(programFiles, "OpenCode", "OpenCode.exe"));
108425
+ paths2.push(join77(programFiles, "OpenCode", "OpenCode.exe"));
108316
108426
  }
108317
108427
  if (localAppData) {
108318
- paths2.push(join76(localAppData, "OpenCode", "OpenCode.exe"));
108428
+ paths2.push(join77(localAppData, "OpenCode", "OpenCode.exe"));
108319
108429
  }
108320
108430
  return paths2;
108321
108431
  }
@@ -108323,8 +108433,8 @@ function getDesktopAppPaths(platform) {
108323
108433
  return [
108324
108434
  "/usr/bin/opencode",
108325
108435
  "/usr/lib/opencode/opencode",
108326
- join76(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108327
- join76(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
108436
+ join77(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108437
+ join77(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
108328
108438
  ];
108329
108439
  default:
108330
108440
  return [];
@@ -108336,7 +108446,7 @@ function buildVersionCommand(binaryPath, platform) {
108336
108446
  }
108337
108447
  return [binaryPath, "--version"];
108338
108448
  }
108339
- function findDesktopBinary(platform = process.platform, checkExists = existsSync48) {
108449
+ function findDesktopBinary(platform = process.platform, checkExists = existsSync49) {
108340
108450
  for (const desktopPath of getDesktopAppPaths(platform)) {
108341
108451
  if (checkExists(desktopPath)) {
108342
108452
  return { binary: "opencode", path: desktopPath };
@@ -108344,7 +108454,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
108344
108454
  }
108345
108455
  return null;
108346
108456
  }
108347
- async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync48) {
108457
+ async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync49) {
108348
108458
  for (const binary of OPENCODE_BINARIES2) {
108349
108459
  const path12 = bunWhich(binary);
108350
108460
  if (path12 && checkExists(path12)) {
@@ -108356,7 +108466,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
108356
108466
  const candidates = getCommandCandidates2(platform);
108357
108467
  for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {
108358
108468
  for (const command of candidates) {
108359
- const fullPath = join76(entry, command);
108469
+ const fullPath = join77(entry, command);
108360
108470
  if (checkExists(fullPath) && isExecutable2(fullPath)) {
108361
108471
  return { binary: command, path: fullPath };
108362
108472
  }
@@ -108402,12 +108512,12 @@ function compareVersions3(current, minimum) {
108402
108512
 
108403
108513
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
108404
108514
  init_shared();
108405
- import { existsSync as existsSync49, readFileSync as readFileSync30 } from "node:fs";
108515
+ import { existsSync as existsSync50, readFileSync as readFileSync30 } from "node:fs";
108406
108516
  function detectConfigPath() {
108407
108517
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
108408
- if (existsSync49(paths2.configJsonc))
108518
+ if (existsSync50(paths2.configJsonc))
108409
108519
  return paths2.configJsonc;
108410
- if (existsSync49(paths2.configJson))
108520
+ if (existsSync50(paths2.configJson))
108411
108521
  return paths2.configJson;
108412
108522
  return null;
108413
108523
  }
@@ -108495,36 +108605,36 @@ init_file_utils2();
108495
108605
  init_checker();
108496
108606
  init_auto_update_checker();
108497
108607
  init_package_json_locator();
108498
- import { existsSync as existsSync50, readFileSync as readFileSync31, readdirSync as readdirSync10 } from "node:fs";
108608
+ import { existsSync as existsSync51, readFileSync as readFileSync31, readdirSync as readdirSync10 } from "node:fs";
108499
108609
  import { createRequire as createRequire3 } from "node:module";
108500
- import { homedir as homedir15 } from "node:os";
108501
- import { join as join77 } from "node:path";
108610
+ import { homedir as homedir16 } from "node:os";
108611
+ import { join as join78 } from "node:path";
108502
108612
  import { fileURLToPath as fileURLToPath6 } from "node:url";
108503
108613
  init_shared();
108504
108614
  function getPlatformDefaultCacheDir(platform = process.platform) {
108505
108615
  if (platform === "darwin")
108506
- return join77(homedir15(), "Library", "Caches");
108616
+ return join78(homedir16(), "Library", "Caches");
108507
108617
  if (platform === "win32")
108508
- return process.env.LOCALAPPDATA ?? join77(homedir15(), "AppData", "Local");
108509
- return join77(homedir15(), ".cache");
108618
+ return process.env.LOCALAPPDATA ?? join78(homedir16(), "AppData", "Local");
108619
+ return join78(homedir16(), ".cache");
108510
108620
  }
108511
108621
  function resolveOpenCodeCacheDir() {
108512
108622
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
108513
108623
  if (xdgCacheHome)
108514
- return join77(xdgCacheHome, "opencode");
108624
+ return join78(xdgCacheHome, "opencode");
108515
108625
  const fromShared = getOpenCodeCacheDir();
108516
- const platformDefault = join77(getPlatformDefaultCacheDir(), "opencode");
108517
- if (existsSync50(fromShared) || !existsSync50(platformDefault))
108626
+ const platformDefault = join78(getPlatformDefaultCacheDir(), "opencode");
108627
+ if (existsSync51(fromShared) || !existsSync51(platformDefault))
108518
108628
  return fromShared;
108519
108629
  return platformDefault;
108520
108630
  }
108521
108631
  function resolveExistingDir(dirPath) {
108522
- if (!existsSync50(dirPath))
108632
+ if (!existsSync51(dirPath))
108523
108633
  return dirPath;
108524
108634
  return resolveSymlink(dirPath);
108525
108635
  }
108526
108636
  function readPackageJson(filePath) {
108527
- if (!existsSync50(filePath))
108637
+ if (!existsSync51(filePath))
108528
108638
  return null;
108529
108639
  try {
108530
108640
  const content = readFileSync31(filePath, "utf-8");
@@ -108545,26 +108655,26 @@ function normalizeVersion(value) {
108545
108655
  function createPackageCandidates(rootDir) {
108546
108656
  return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
108547
108657
  packageName,
108548
- installedPackagePath: join77(rootDir, "node_modules", packageName, "package.json")
108658
+ installedPackagePath: join78(rootDir, "node_modules", packageName, "package.json")
108549
108659
  }));
108550
108660
  }
108551
108661
  function createTaggedInstallCandidates(rootDir) {
108552
- const packagesDir = join77(rootDir, "packages");
108553
- if (!existsSync50(packagesDir))
108662
+ const packagesDir = join78(rootDir, "packages");
108663
+ if (!existsSync51(packagesDir))
108554
108664
  return [];
108555
108665
  const candidates = [];
108556
108666
  for (const entryName of readdirSync10(packagesDir).sort()) {
108557
108667
  const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
108558
108668
  if (packageName === undefined)
108559
108669
  continue;
108560
- const installDir = join77(packagesDir, entryName);
108670
+ const installDir = join78(packagesDir, entryName);
108561
108671
  candidates.push({
108562
108672
  cacheDir: installDir,
108563
- cachePackagePath: join77(installDir, "package.json"),
108673
+ cachePackagePath: join78(installDir, "package.json"),
108564
108674
  packageCandidates: [
108565
108675
  {
108566
108676
  packageName,
108567
- installedPackagePath: join77(installDir, "node_modules", packageName, "package.json")
108677
+ installedPackagePath: join78(installDir, "node_modules", packageName, "package.json")
108568
108678
  }
108569
108679
  ]
108570
108680
  });
@@ -108572,7 +108682,7 @@ function createTaggedInstallCandidates(rootDir) {
108572
108682
  return candidates;
108573
108683
  }
108574
108684
  function selectInstalledPackage(candidate2) {
108575
- return candidate2.packageCandidates.find((packageCandidate) => existsSync50(packageCandidate.installedPackagePath)) ?? candidate2.packageCandidates[0];
108685
+ return candidate2.packageCandidates.find((packageCandidate) => existsSync51(packageCandidate.installedPackagePath)) ?? candidate2.packageCandidates[0];
108576
108686
  }
108577
108687
  function getExpectedVersion(cachePackage, packageName) {
108578
108688
  return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
@@ -108583,7 +108693,7 @@ function resolveInstalledPackageJsonPath() {
108583
108693
  for (const packageName of ACCEPTED_PACKAGE_NAMES) {
108584
108694
  try {
108585
108695
  const packageJsonPath = require2.resolve(`${packageName}/package.json`);
108586
- if (existsSync50(packageJsonPath)) {
108696
+ if (existsSync51(packageJsonPath)) {
108587
108697
  return { packageName, packageJsonPath };
108588
108698
  }
108589
108699
  } catch {
@@ -108609,22 +108719,22 @@ function getLoadedPluginVersion() {
108609
108719
  const candidates = [
108610
108720
  {
108611
108721
  cacheDir: configDir,
108612
- cachePackagePath: join77(configDir, "package.json"),
108722
+ cachePackagePath: join78(configDir, "package.json"),
108613
108723
  packageCandidates: createPackageCandidates(configDir)
108614
108724
  },
108615
108725
  ...createTaggedInstallCandidates(configDir),
108616
108726
  {
108617
108727
  cacheDir,
108618
- cachePackagePath: join77(cacheDir, "package.json"),
108728
+ cachePackagePath: join78(cacheDir, "package.json"),
108619
108729
  packageCandidates: createPackageCandidates(cacheDir)
108620
108730
  },
108621
108731
  ...createTaggedInstallCandidates(cacheDir)
108622
108732
  ];
108623
- const selectedCandidate = candidates.find((candidate2) => candidate2.packageCandidates.some((packageCandidate) => existsSync50(packageCandidate.installedPackagePath))) ?? candidates[0];
108733
+ const selectedCandidate = candidates.find((candidate2) => candidate2.packageCandidates.some((packageCandidate) => existsSync51(packageCandidate.installedPackagePath))) ?? candidates[0];
108624
108734
  const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
108625
108735
  const selectedPackage = selectInstalledPackage(selectedCandidate);
108626
108736
  const candidateInstalledPath = selectedPackage.installedPackagePath;
108627
- const candidateExists = existsSync50(candidateInstalledPath);
108737
+ const candidateExists = existsSync51(candidateInstalledPath);
108628
108738
  const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
108629
108739
  const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
108630
108740
  const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
@@ -108660,7 +108770,7 @@ var defaultDeps6 = {
108660
108770
  getLoadedPluginVersion,
108661
108771
  getLatestPluginVersion,
108662
108772
  getSuggestedInstallTag,
108663
- configExists: existsSync51,
108773
+ configExists: existsSync52,
108664
108774
  readConfigFile: (path12) => readFileSync32(path12, "utf-8"),
108665
108775
  parseConfigContent: (content) => parseJsonc(content)
108666
108776
  };
@@ -108806,23 +108916,23 @@ async function checkSystem(deps = defaultDeps6) {
108806
108916
 
108807
108917
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
108808
108918
  init_shared();
108809
- import { existsSync as existsSync52, readFileSync as readFileSync33 } from "node:fs";
108810
- import { homedir as homedir16 } from "node:os";
108811
- import { join as join78 } from "node:path";
108919
+ import { existsSync as existsSync53, readFileSync as readFileSync33 } from "node:fs";
108920
+ import { homedir as homedir17 } from "node:os";
108921
+ import { join as join79 } from "node:path";
108812
108922
  function getUserConfigDir2() {
108813
108923
  const xdgConfig = process.env.XDG_CONFIG_HOME;
108814
108924
  if (xdgConfig)
108815
- return join78(xdgConfig, "opencode");
108816
- return join78(homedir16(), ".config", "opencode");
108925
+ return join79(xdgConfig, "opencode");
108926
+ return join79(homedir17(), ".config", "opencode");
108817
108927
  }
108818
108928
  function loadCustomProviderNames() {
108819
108929
  const configDir = getUserConfigDir2();
108820
108930
  const candidatePaths = [
108821
- join78(configDir, "opencode.json"),
108822
- join78(configDir, "opencode.jsonc")
108931
+ join79(configDir, "opencode.json"),
108932
+ join79(configDir, "opencode.jsonc")
108823
108933
  ];
108824
108934
  for (const configPath of candidatePaths) {
108825
- if (!existsSync52(configPath))
108935
+ if (!existsSync53(configPath))
108826
108936
  continue;
108827
108937
  try {
108828
108938
  const content = readFileSync33(configPath, "utf-8");
@@ -108840,9 +108950,9 @@ function loadCustomProviderNames() {
108840
108950
  return [];
108841
108951
  }
108842
108952
  function loadAvailableModelsFromCache() {
108843
- const cacheFile = join78(getOpenCodeCacheDir(), "models.json");
108953
+ const cacheFile = join79(getOpenCodeCacheDir(), "models.json");
108844
108954
  const customProviders = loadCustomProviderNames();
108845
- if (!existsSync52(cacheFile)) {
108955
+ if (!existsSync53(cacheFile)) {
108846
108956
  if (customProviders.length > 0) {
108847
108957
  return { providers: customProviders, modelCount: 0, cacheExists: true };
108848
108958
  }
@@ -108902,7 +109012,7 @@ function loadOmoConfig2() {
108902
109012
 
108903
109013
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
108904
109014
  init_shared();
108905
- import { join as join79 } from "node:path";
109015
+ import { join as join80 } from "node:path";
108906
109016
 
108907
109017
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
108908
109018
  function formatModelWithVariant(model, variant) {
@@ -108944,7 +109054,7 @@ function formatCapabilityResolutionLabel(mode) {
108944
109054
  }
108945
109055
  function buildModelResolutionDetails(options) {
108946
109056
  const details = [];
108947
- const cacheFile = join79(getOpenCodeCacheDir(), "models.json");
109057
+ const cacheFile = join80(getOpenCodeCacheDir(), "models.json");
108948
109058
  details.push("═══ Available Models (from cache) ═══");
108949
109059
  details.push("");
108950
109060
  if (options.available.cacheExists) {
@@ -109253,8 +109363,8 @@ async function checkConfig() {
109253
109363
 
109254
109364
  // packages/omo-opencode/src/cli/doctor/checks/deprecated-reasoning-keys.ts
109255
109365
  init_main();
109256
- import { existsSync as existsSync53, readFileSync as readFileSync34 } from "node:fs";
109257
- import { join as join80 } from "node:path";
109366
+ import { existsSync as existsSync54, readFileSync as readFileSync34 } from "node:fs";
109367
+ import { join as join81 } from "node:path";
109258
109368
  var CANONICAL_REPLACEMENT = new Map([
109259
109369
  ["variant", "reasoning"],
109260
109370
  ["reasoningEffort", "reasoning"],
@@ -109309,13 +109419,13 @@ function userConfigPaths() {
109309
109419
  const home = process.env.HOME ?? process.env.USERPROFILE;
109310
109420
  if (home === undefined || home.length === 0)
109311
109421
  return [];
109312
- return [join80(home, ".omo", "omo.jsonc"), join80(home, ".omo", "omo.json")];
109422
+ return [join81(home, ".omo", "omo.jsonc"), join81(home, ".omo", "omo.json")];
109313
109423
  }
109314
109424
  async function checkDeprecatedReasoningKeys() {
109315
109425
  const issues = [];
109316
109426
  const scanned = [];
109317
109427
  for (const configPath of userConfigPaths()) {
109318
- if (!existsSync53(configPath))
109428
+ if (!existsSync54(configPath))
109319
109429
  continue;
109320
109430
  scanned.push(configPath);
109321
109431
  const parsed = parse2(readFileSync34(configPath, "utf-8"));
@@ -109332,28 +109442,28 @@ async function checkDeprecatedReasoningKeys() {
109332
109442
 
109333
109443
  // packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
109334
109444
  init_src2();
109335
- import { existsSync as existsSync54 } from "node:fs";
109445
+ import { existsSync as existsSync55 } from "node:fs";
109336
109446
  import { createRequire as createRequire4 } from "node:module";
109337
- import { homedir as homedir18 } from "node:os";
109338
- import { dirname as dirname31, join as join82 } from "node:path";
109447
+ import { homedir as homedir19 } from "node:os";
109448
+ import { dirname as dirname31, join as join83 } from "node:path";
109339
109449
 
109340
109450
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
109341
- import { join as join81 } from "path";
109342
- import { homedir as homedir17, tmpdir as tmpdir4 } from "os";
109451
+ import { join as join82 } from "path";
109452
+ import { homedir as homedir18, tmpdir as tmpdir4 } from "os";
109343
109453
  init_binary_downloader();
109344
109454
  init_logger2();
109345
109455
  init_plugin_identity();
109346
109456
  var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
109347
- var DEBUG_FILE = join81(tmpdir4(), "comment-checker-debug.log");
109457
+ var DEBUG_FILE = join82(tmpdir4(), "comment-checker-debug.log");
109348
109458
  function getCacheDir2() {
109349
109459
  if (process.platform === "win32") {
109350
109460
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
109351
- const base2 = localAppData || join81(homedir17(), "AppData", "Local");
109352
- return join81(base2, CACHE_DIR_NAME, "bin");
109461
+ const base2 = localAppData || join82(homedir18(), "AppData", "Local");
109462
+ return join82(base2, CACHE_DIR_NAME, "bin");
109353
109463
  }
109354
109464
  const xdgCache = process.env.XDG_CACHE_HOME;
109355
- const base = xdgCache || join81(homedir17(), ".cache");
109356
- return join81(base, CACHE_DIR_NAME, "bin");
109465
+ const base = xdgCache || join82(homedir18(), ".cache");
109466
+ return join82(base, CACHE_DIR_NAME, "bin");
109357
109467
  }
109358
109468
  function getBinaryName() {
109359
109469
  return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
@@ -109403,7 +109513,7 @@ async function getBinaryVersion(binary) {
109403
109513
  }
109404
109514
  }
109405
109515
  async function checkAstGrepCli() {
109406
- const runtimeDir = astGrepRuntimeDir(join82(homedir18(), ".omo"));
109516
+ const runtimeDir = astGrepRuntimeDir(join83(homedir19(), ".omo"));
109407
109517
  const sgPath = findSgBinarySync({ runtimeDir });
109408
109518
  if (sgPath === null) {
109409
109519
  return {
@@ -109433,11 +109543,11 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
109433
109543
  const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
109434
109544
  try {
109435
109545
  const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
109436
- const vendorPath = join82(packageDir, "vendor", platformKey, binaryName);
109437
- if (existsSync54(vendorPath))
109546
+ const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
109547
+ if (existsSync55(vendorPath))
109438
109548
  return vendorPath;
109439
- const binPath = join82(packageDir, "bin", binaryName);
109440
- if (existsSync54(binPath))
109549
+ const binPath = join83(packageDir, "bin", binaryName);
109550
+ if (existsSync55(binPath))
109441
109551
  return binPath;
109442
109552
  } catch (error51) {
109443
109553
  if (!(error51 instanceof Error) && !isModuleResolutionFailure(error51))
@@ -109583,8 +109693,8 @@ async function getGhCliInfo(dependencies = {}) {
109583
109693
  // packages/omo-opencode/src/mcp/lsp.ts
109584
109694
  init_zod();
109585
109695
  init_opencode_config_dir();
109586
- import { existsSync as existsSync55, readFileSync as readFileSync35 } from "node:fs";
109587
- import { delimiter as delimiter3, dirname as dirname32, resolve as resolve22 } from "node:path";
109696
+ import { existsSync as existsSync56, readFileSync as readFileSync35 } from "node:fs";
109697
+ import { delimiter as delimiter3, dirname as dirname32, resolve as resolve23 } from "node:path";
109588
109698
  import { fileURLToPath as fileURLToPath7 } from "node:url";
109589
109699
 
109590
109700
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -109631,7 +109741,7 @@ function resolveRuntimeExecutable(commandName, options = {}) {
109631
109741
  }
109632
109742
 
109633
109743
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
109634
- import { resolve as resolve21 } from "node:path";
109744
+ import { resolve as resolve22 } from "node:path";
109635
109745
  function resolveJavaScriptRuntime(resolveExecutable) {
109636
109746
  const node = resolveExecutable("node");
109637
109747
  return node.available ? node : resolveExecutable("bun");
@@ -109639,9 +109749,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
109639
109749
  function createAncestorCliCandidates(options) {
109640
109750
  const candidates = [];
109641
109751
  const seenPaths = new Set;
109642
- let currentDirectory = resolve21(options.startDirectory);
109752
+ let currentDirectory = resolve22(options.startDirectory);
109643
109753
  while (true) {
109644
- const distCliPath = resolve21(currentDirectory, options.packageRel, options.distCliRel);
109754
+ const distCliPath = resolve22(currentDirectory, options.packageRel, options.distCliRel);
109645
109755
  if (!seenPaths.has(distCliPath)) {
109646
109756
  const runtime5 = resolveJavaScriptRuntime(options.resolveExecutable);
109647
109757
  seenPaths.add(distCliPath);
@@ -109653,7 +109763,7 @@ function createAncestorCliCandidates(options) {
109653
109763
  runtimeAvailable: runtime5.available
109654
109764
  });
109655
109765
  }
109656
- const sourceCliPath = resolve21(currentDirectory, options.packageRel, options.sourceCliRel);
109766
+ const sourceCliPath = resolve22(currentDirectory, options.packageRel, options.sourceCliRel);
109657
109767
  if (!seenPaths.has(sourceCliPath)) {
109658
109768
  const runtime5 = options.resolveExecutable("bun");
109659
109769
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -109670,7 +109780,7 @@ function createAncestorCliCandidates(options) {
109670
109780
  runtimeAvailable: runtime5.available
109671
109781
  });
109672
109782
  }
109673
- const parentDirectory = resolve21(currentDirectory, "..");
109783
+ const parentDirectory = resolve22(currentDirectory, "..");
109674
109784
  if (parentDirectory === currentDirectory)
109675
109785
  return candidates;
109676
109786
  currentDirectory = parentDirectory;
@@ -109723,11 +109833,11 @@ function getModuleDirectory(moduleUrl) {
109723
109833
  }
109724
109834
  }
109725
109835
  function findBootstrapRoot(candidates, pathExists) {
109726
- return candidates.find((candidate2) => pathExists(resolve22(candidate2.root, "package.json")))?.root ?? process.cwd();
109836
+ return candidates.find((candidate2) => pathExists(resolve23(candidate2.root, "package.json")))?.root ?? process.cwd();
109727
109837
  }
109728
109838
  function readDaemonPackageVersion(root) {
109729
109839
  try {
109730
- const packageJson = JSON.parse(readFileSync35(resolve22(root, PACKAGE_REL, "package.json"), "utf-8"));
109840
+ const packageJson = JSON.parse(readFileSync35(resolve23(root, PACKAGE_REL, "package.json"), "utf-8"));
109731
109841
  return DaemonPackageSchema.parse(packageJson).version;
109732
109842
  } catch (error51) {
109733
109843
  if (!(error51 instanceof Error))
@@ -109739,17 +109849,17 @@ function createBootstrapCandidate(root, pathExists, resolveExecutable) {
109739
109849
  const runtime5 = resolveJavaScriptRuntime(resolveExecutable);
109740
109850
  const bun = resolveExecutable("bun");
109741
109851
  const npm = resolveExecutable("npm");
109742
- const packageManifestPath = resolve22(root, PACKAGE_REL, "package.json");
109852
+ const packageManifestPath = resolve23(root, PACKAGE_REL, "package.json");
109743
109853
  return {
109744
109854
  command: [runtime5.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
109745
109855
  root,
109746
- path: resolve22(root, PACKAGE_REL, DIST_CLI_REL),
109856
+ path: resolve23(root, PACKAGE_REL, DIST_CLI_REL),
109747
109857
  exists: runtime5.available && npm.available && pathExists(packageManifestPath),
109748
109858
  runtimeAvailable: runtime5.available
109749
109859
  };
109750
109860
  }
109751
109861
  function resolveLspCommand(options = {}) {
109752
- const pathExists = options.exists ?? existsSync55;
109862
+ const pathExists = options.exists ?? existsSync56;
109753
109863
  const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
109754
109864
  const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
109755
109865
  const candidates = moduleDirectory ? createAncestorCliCandidates({
@@ -109759,7 +109869,7 @@ function resolveLspCommand(options = {}) {
109759
109869
  sourceCliRel: SOURCE_CLI_REL,
109760
109870
  pathExists,
109761
109871
  resolveExecutable,
109762
- isSourceCandidateAvailable: ({ root }) => pathExists(resolve22(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
109872
+ isSourceCandidateAvailable: ({ root }) => pathExists(resolve23(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
109763
109873
  }) : [];
109764
109874
  const distCandidate = candidates.find((candidate2) => hasCliSuffix(candidate2.path, DIST_CLI_REL) && candidate2.exists);
109765
109875
  if (distCandidate) {
@@ -109773,7 +109883,7 @@ function resolveLspCommand(options = {}) {
109773
109883
  }
109774
109884
  function createLspMcpConfig(options = {}) {
109775
109885
  const resolvedCommand = resolveLspCommand(options);
109776
- const cwd = resolve22(options.cwd ?? process.cwd());
109886
+ const cwd = resolve23(options.cwd ?? process.cwd());
109777
109887
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
109778
109888
  const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
109779
109889
  return {
@@ -109782,9 +109892,9 @@ function createLspMcpConfig(options = {}) {
109782
109892
  enabled: resolvedCommand.exists,
109783
109893
  cwd,
109784
109894
  environment: {
109785
- LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve22(cwd, configPath)).join(delimiter3),
109786
- LSP_TOOLS_MCP_USER_CONFIG: resolve22(configDir, "lsp.json"),
109787
- LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve22(configDir, "lsp-install-decisions.json"),
109895
+ LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve23(cwd, configPath)).join(delimiter3),
109896
+ LSP_TOOLS_MCP_USER_CONFIG: resolve23(configDir, "lsp.json"),
109897
+ LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve23(configDir, "lsp-install-decisions.json"),
109788
109898
  ...sourceVersion ? {
109789
109899
  [OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
109790
109900
  [OMO_LSP_DAEMON_VERSION]: sourceVersion
@@ -109809,21 +109919,21 @@ function getInstalledLspServers(options = {}) {
109809
109919
 
109810
109920
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
109811
109921
  init_shared();
109812
- import { existsSync as existsSync56, readFileSync as readFileSync36 } from "node:fs";
109813
- import { homedir as homedir19 } from "node:os";
109814
- import { join as join83 } from "node:path";
109922
+ import { existsSync as existsSync57, readFileSync as readFileSync36 } from "node:fs";
109923
+ import { homedir as homedir20 } from "node:os";
109924
+ import { join as join84 } from "node:path";
109815
109925
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
109816
109926
  function getMcpConfigPaths() {
109817
109927
  return [
109818
- join83(homedir19(), ".claude", ".mcp.json"),
109819
- join83(process.cwd(), ".mcp.json"),
109820
- join83(process.cwd(), ".claude", ".mcp.json")
109928
+ join84(homedir20(), ".claude", ".mcp.json"),
109929
+ join84(process.cwd(), ".mcp.json"),
109930
+ join84(process.cwd(), ".claude", ".mcp.json")
109821
109931
  ];
109822
109932
  }
109823
109933
  function loadUserMcpConfig() {
109824
109934
  const servers = {};
109825
109935
  for (const configPath of getMcpConfigPaths()) {
109826
- if (!existsSync56(configPath))
109936
+ if (!existsSync57(configPath))
109827
109937
  continue;
109828
109938
  try {
109829
109939
  const content = readFileSync36(configPath, "utf-8");
@@ -109961,12 +110071,12 @@ async function checkTools() {
109961
110071
 
109962
110072
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
109963
110073
  init_src5();
109964
- import { existsSync as existsSync57, readFileSync as readFileSync37 } from "node:fs";
110074
+ import { existsSync as existsSync58, readFileSync as readFileSync37 } from "node:fs";
109965
110075
  function isTelemetryState(value) {
109966
110076
  return value !== null && typeof value === "object" && !Array.isArray(value);
109967
110077
  }
109968
110078
  function readLastActiveDay(stateFilePath) {
109969
- if (!existsSync57(stateFilePath)) {
110079
+ if (!existsSync58(stateFilePath)) {
109970
110080
  return "never";
109971
110081
  }
109972
110082
  let parsed;
@@ -110029,17 +110139,17 @@ async function probeBinary(cmd, args, spawnImpl) {
110029
110139
  }
110030
110140
 
110031
110141
  // packages/team-core/src/team-registry/paths.ts
110032
- import { homedir as homedir20 } from "node:os";
110142
+ import { homedir as homedir21 } from "node:os";
110033
110143
  import path12 from "node:path";
110034
110144
  function resolveBaseDir(config4) {
110035
- return expandHomeDirectory(config4.base_dir ?? path12.join(homedir20(), ".omo"));
110145
+ return expandHomeDirectory(config4.base_dir ?? path12.join(homedir21(), ".omo"));
110036
110146
  }
110037
110147
  function expandHomeDirectory(directoryPath3) {
110038
110148
  if (directoryPath3 === "~") {
110039
- return homedir20();
110149
+ return homedir21();
110040
110150
  }
110041
110151
  if (directoryPath3.startsWith("~/") || directoryPath3.startsWith("~\\")) {
110042
- return path12.join(homedir20(), directoryPath3.slice(2));
110152
+ return path12.join(homedir21(), directoryPath3.slice(2));
110043
110153
  }
110044
110154
  return directoryPath3;
110045
110155
  }
@@ -110096,10 +110206,10 @@ async function pathExists(dir) {
110096
110206
 
110097
110207
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
110098
110208
  init_src2();
110099
- import { existsSync as existsSync58 } from "node:fs";
110209
+ import { existsSync as existsSync59 } from "node:fs";
110100
110210
  import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "node:fs/promises";
110101
- import { homedir as homedir21 } from "node:os";
110102
- import { basename as basename11, join as join84, resolve as resolve23 } from "node:path";
110211
+ import { homedir as homedir22 } from "node:os";
110212
+ import { basename as basename11, join as join85, resolve as resolve24 } from "node:path";
110103
110213
  // packages/omo-opencode/package.json
110104
110214
  var package_default3 = {
110105
110215
  name: "@oh-my-opencode/omo-opencode",
@@ -110164,13 +110274,13 @@ var CODEX_BIN_NAMES = [
110164
110274
  "omo-git-bash-hook"
110165
110275
  ];
110166
110276
  async function gatherCodexSummary(deps = {}) {
110167
- const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join84(homedir21(), ".codex"));
110277
+ const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir22(), ".codex"));
110168
110278
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110169
110279
  const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
110170
110280
  const pluginRoot = await resolveInstalledPluginRoot(codexHome);
110171
- const manifest2 = pluginRoot === null ? null : await readJson(join84(pluginRoot, ".codex-plugin", "plugin.json"));
110172
- const installSnapshot = pluginRoot === null ? null : await readJson(join84(pluginRoot, "lazycodex-install.json"));
110173
- const configPath = join84(codexHome, "config.toml");
110281
+ const manifest2 = pluginRoot === null ? null : await readJson(join85(pluginRoot, ".codex-plugin", "plugin.json"));
110282
+ const installSnapshot = pluginRoot === null ? null : await readJson(join85(pluginRoot, "lazycodex-install.json"));
110283
+ const configPath = join85(codexHome, "config.toml");
110174
110284
  const pluginVersion = stringField(manifest2, "version");
110175
110285
  return {
110176
110286
  codexPath: detection.found && "path" in detection ? detection.path : null,
@@ -110227,7 +110337,7 @@ function buildCodexIssues(summary) {
110227
110337
  if (summary.pluginRoot === null) {
110228
110338
  issues.push({
110229
110339
  title: "OMO Codex plugin is not installed",
110230
- description: `Expected cached plugin at ${join84("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
110340
+ description: `Expected cached plugin at ${join85("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
110231
110341
  fix: "Run: npx lazycodex-ai install",
110232
110342
  severity: "error",
110233
110343
  affects: ["plugin loading"]
@@ -110292,15 +110402,15 @@ function buildCodexIssues(summary) {
110292
110402
  return issues;
110293
110403
  }
110294
110404
  async function resolveInstalledPluginRoot(codexHome) {
110295
- const pluginRoot = join84(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110296
- if (!existsSync58(pluginRoot))
110405
+ const pluginRoot = join85(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110406
+ if (!existsSync59(pluginRoot))
110297
110407
  return null;
110298
110408
  const versions2 = await readdir14(pluginRoot, { withFileTypes: true });
110299
110409
  const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
110300
- return candidates.length === 0 ? null : join84(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110410
+ return candidates.length === 0 ? null : join85(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110301
110411
  }
110302
110412
  async function readCodexConfigSummary(configPath) {
110303
- if (!existsSync58(configPath)) {
110413
+ if (!existsSync59(configPath)) {
110304
110414
  return {
110305
110415
  exists: false,
110306
110416
  marketplaceConfigured: false,
@@ -110325,14 +110435,14 @@ async function readCodexConfigSummary(configPath) {
110325
110435
  async function readLinkedBins(binDir) {
110326
110436
  const linked = [];
110327
110437
  for (const name of CODEX_BIN_NAMES) {
110328
- if (await pathExists2(join84(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110438
+ if (await pathExists2(join85(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110329
110439
  linked.push(name);
110330
110440
  }
110331
110441
  return linked;
110332
110442
  }
110333
110443
  async function readLinkedAgents(codexHome) {
110334
- const agentsDir = join84(codexHome, "agents");
110335
- if (!existsSync58(agentsDir))
110444
+ const agentsDir = join85(codexHome, "agents");
110445
+ if (!existsSync59(agentsDir))
110336
110446
  return [];
110337
110447
  const entries = await readdir14(agentsDir, { withFileTypes: true });
110338
110448
  return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename11(entry.name, ".toml")).sort();
@@ -110446,8 +110556,8 @@ async function pathExists2(path14) {
110446
110556
  // packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
110447
110557
  init_src2();
110448
110558
  import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "node:fs/promises";
110449
- import { homedir as homedir22 } from "node:os";
110450
- import { dirname as dirname33, isAbsolute as isAbsolute12, join as join85, relative as relative9, resolve as resolve24, sep as sep9 } from "node:path";
110559
+ import { homedir as homedir23 } from "node:os";
110560
+ import { dirname as dirname33, isAbsolute as isAbsolute12, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "node:path";
110451
110561
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
110452
110562
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
110453
110563
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
@@ -110457,7 +110567,7 @@ async function checkCodexComponents(deps = {}) {
110457
110567
  const env3 = deps.env ?? process.env;
110458
110568
  const platform = deps.platform ?? process.platform;
110459
110569
  const arch = deps.arch ?? process.arch;
110460
- const codexHome = resolve24(deps.codexHome ?? env3["CODEX_HOME"] ?? join85(homedir22(), ".codex"));
110570
+ const codexHome = resolve25(deps.codexHome ?? env3["CODEX_HOME"] ?? join86(homedir23(), ".codex"));
110461
110571
  const summary = await gatherCodexSummary({ ...deps, codexHome });
110462
110572
  if (summary.pluginRoot === null) {
110463
110573
  return {
@@ -110482,7 +110592,7 @@ async function checkCodexComponents(deps = {}) {
110482
110592
  });
110483
110593
  }
110484
110594
  const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
110485
- const runtimeSgPath = join85(runtimeSgDir, sgBinaryName(platform));
110595
+ const runtimeSgPath = join86(runtimeSgDir, sgBinaryName(platform));
110486
110596
  const sg = findSgBinarySync({
110487
110597
  arch,
110488
110598
  env: env3,
@@ -110522,7 +110632,7 @@ async function auditBundleTargets(pluginRoot) {
110522
110632
  if (manifest2 === null || !isRecord12(manifest2["mcpServers"]))
110523
110633
  continue;
110524
110634
  const manifestRoot = dirname33(manifestPath);
110525
- const isRootManifest = resolve24(manifestRoot) === resolve24(pluginRoot);
110635
+ const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
110526
110636
  for (const server2 of Object.values(manifest2["mcpServers"])) {
110527
110637
  if (!isRecord12(server2) || !Array.isArray(server2["args"]))
110528
110638
  continue;
@@ -110564,8 +110674,8 @@ function recordBrokenTarget(broken, classified, origin) {
110564
110674
  broken.push(entry);
110565
110675
  }
110566
110676
  async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEscape) {
110567
- const targetPath = resolve24(baseRoot, relativePath);
110568
- const bundleRootPath = resolve24(bundleRoot);
110677
+ const targetPath = resolve25(baseRoot, relativePath);
110678
+ const bundleRootPath = resolve25(bundleRoot);
110569
110679
  const bundleRootPrefix = bundleRootPath.endsWith(sep9) ? bundleRootPath : `${bundleRootPath}${sep9}`;
110570
110680
  if (targetPath !== bundleRootPath && !targetPath.startsWith(bundleRootPrefix)) {
110571
110681
  if (allowEscape)
@@ -110594,7 +110704,7 @@ async function findManifestPaths(root, manifestName) {
110594
110704
  for (const entry of entries) {
110595
110705
  if (entry.name === "node_modules" || entry.name === ".git")
110596
110706
  continue;
110597
- const entryPath = join85(root, entry.name);
110707
+ const entryPath = join86(root, entry.name);
110598
110708
  if (entry.isDirectory()) {
110599
110709
  paths3.push(...await findManifestPaths(entryPath, manifestName));
110600
110710
  continue;
@@ -110638,18 +110748,18 @@ function isPluginRuntimePathArg(arg) {
110638
110748
  return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));
110639
110749
  }
110640
110750
  function runtimeSgDirectory(codexHome, platform, arch) {
110641
- return join85(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110751
+ return join86(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110642
110752
  }
110643
110753
  function describeSgSource(sgPath, env3, runtimeSgDir, platform) {
110644
110754
  const override = env3[SG_PATH_ENV_KEY]?.trim();
110645
110755
  if (override !== undefined && override.length > 0 && sgPath === override)
110646
110756
  return `env override ${SG_PATH_ENV_KEY}`;
110647
- if (sgPath === join85(runtimeSgDir, sgBinaryName(platform)))
110757
+ if (sgPath === join86(runtimeSgDir, sgBinaryName(platform)))
110648
110758
  return "runtime dir";
110649
110759
  return "PATH";
110650
110760
  }
110651
110761
  async function readBootstrapStateSummary(codexHome) {
110652
- const statePath = join85(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110762
+ const statePath = join86(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110653
110763
  const raw = await readJson2(statePath);
110654
110764
  if (raw === null)
110655
110765
  return null;
@@ -110725,24 +110835,24 @@ function isRecord12(value) {
110725
110835
  }
110726
110836
 
110727
110837
  // packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
110728
- import { existsSync as existsSync59 } from "node:fs";
110838
+ import { existsSync as existsSync60 } from "node:fs";
110729
110839
  import { readFile as readFile29 } from "node:fs/promises";
110730
- import { homedir as homedir23 } from "node:os";
110731
- import { join as join86, resolve as resolve25 } from "node:path";
110840
+ import { homedir as homedir24 } from "node:os";
110841
+ import { join as join87, resolve as resolve26 } from "node:path";
110732
110842
  var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
110733
110843
  var CHECK_NAME = "codex-runtime-wrapper";
110734
110844
  var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
110735
110845
  async function checkCodexRuntimeWrapper(deps = {}) {
110736
- const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join86(homedir23(), ".codex"));
110846
+ const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join87(homedir24(), ".codex"));
110737
110847
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110738
110848
  const platform = deps.platform ?? process.platform;
110739
- const wrapperPath = join86(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110740
- const legacyWrapperPath = join86(binDir, platform === "win32" ? "omo.cmd" : "omo");
110849
+ const wrapperPath = join87(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110850
+ const legacyWrapperPath = join87(binDir, platform === "win32" ? "omo.cmd" : "omo");
110741
110851
  const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
110742
110852
  const issues = [];
110743
110853
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
110744
110854
  const targetPath = parseRuntimeTargetPath(wrapper);
110745
- if (targetPath !== null && !existsSync59(targetPath)) {
110855
+ if (targetPath !== null && !existsSync60(targetPath)) {
110746
110856
  issues.push({
110747
110857
  title: "omo-agent-toolkit runtime wrapper target is missing",
110748
110858
  description: `Generated omo-agent-toolkit runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
@@ -111257,7 +111367,7 @@ Doctor failed unexpectedly: ${message}`];
111257
111367
  import { createHash as createHash6 } from "node:crypto";
111258
111368
  import {
111259
111369
  chmodSync as chmodSync5,
111260
- existsSync as existsSync62,
111370
+ existsSync as existsSync63,
111261
111371
  mkdirSync as mkdirSync15,
111262
111372
  readdirSync as readdirSync11,
111263
111373
  readFileSync as readFileSync39,
@@ -111265,15 +111375,15 @@ import {
111265
111375
  unlinkSync as unlinkSync9,
111266
111376
  writeFileSync as writeFileSync12
111267
111377
  } from "node:fs";
111268
- import { basename as basename12, dirname as dirname34, join as join89 } from "node:path";
111378
+ import { basename as basename12, dirname as dirname34, join as join90 } from "node:path";
111269
111379
 
111270
111380
  // packages/mcp-client-core/src/config-dir.ts
111271
- import { existsSync as existsSync60, realpathSync as realpathSync8 } from "node:fs";
111272
- import { homedir as homedir24 } from "node:os";
111273
- import { join as join87, resolve as resolve26 } from "node:path";
111381
+ import { existsSync as existsSync61, realpathSync as realpathSync8 } from "node:fs";
111382
+ import { homedir as homedir25 } from "node:os";
111383
+ import { join as join88, resolve as resolve27 } from "node:path";
111274
111384
  function resolveConfigPath2(pathValue) {
111275
- const resolvedPath = resolve26(pathValue);
111276
- if (!existsSync60(resolvedPath))
111385
+ const resolvedPath = resolve27(pathValue);
111386
+ if (!existsSync61(resolvedPath))
111277
111387
  return resolvedPath;
111278
111388
  try {
111279
111389
  return realpathSync8(resolvedPath);
@@ -111288,13 +111398,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {
111288
111398
  if (customConfigDir) {
111289
111399
  return resolveConfigPath2(customConfigDir);
111290
111400
  }
111291
- const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join87(homedir24(), ".config");
111292
- return resolveConfigPath2(join87(xdgConfigDir, "opencode"));
111401
+ const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join88(homedir25(), ".config");
111402
+ return resolveConfigPath2(join88(xdgConfigDir, "opencode"));
111293
111403
  }
111294
111404
 
111295
111405
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
111296
- import { chmodSync as chmodSync4, existsSync as existsSync61, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "node:fs";
111297
- import { join as join88 } from "node:path";
111406
+ import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "node:fs";
111407
+ import { join as join89 } from "node:path";
111298
111408
  var INDEX_FILE_NAME = "index.json";
111299
111409
  function isTokenIndex(value) {
111300
111410
  if (typeof value !== "object" || value === null || Array.isArray(value))
@@ -111302,11 +111412,11 @@ function isTokenIndex(value) {
111302
111412
  return Object.values(value).every((entry) => typeof entry === "string");
111303
111413
  }
111304
111414
  function getIndexPath(storageDir) {
111305
- return join88(storageDir, INDEX_FILE_NAME);
111415
+ return join89(storageDir, INDEX_FILE_NAME);
111306
111416
  }
111307
111417
  function readTokenIndex(storageDir) {
111308
111418
  const indexPath = getIndexPath(storageDir);
111309
- if (!existsSync61(indexPath))
111419
+ if (!existsSync62(indexPath))
111310
111420
  return {};
111311
111421
  try {
111312
111422
  const parsed = JSON.parse(readFileSync38(indexPath, "utf-8"));
@@ -111346,16 +111456,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {
111346
111456
  var STORAGE_DIR_NAME = "mcp-oauth";
111347
111457
  var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
111348
111458
  function getMcpOauthStorageDir() {
111349
- return join89(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111459
+ return join90(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111350
111460
  }
111351
111461
  function getMcpOauthServerHash(serverHost, resource) {
111352
111462
  return createHash6("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
111353
111463
  }
111354
111464
  function getMcpOauthStoragePath(serverHost, resource) {
111355
- return join89(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111465
+ return join90(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111356
111466
  }
111357
111467
  function getLegacyStoragePath() {
111358
- return join89(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111468
+ return join90(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111359
111469
  }
111360
111470
  function normalizeHost2(serverHost) {
111361
111471
  let host = serverHost.trim();
@@ -111416,7 +111526,7 @@ function isOAuthTokenData(value) {
111416
111526
  return clientSecret === undefined || typeof clientSecret === "string";
111417
111527
  }
111418
111528
  function readTokenFile(filePath) {
111419
- if (!existsSync62(filePath))
111529
+ if (!existsSync63(filePath))
111420
111530
  return null;
111421
111531
  try {
111422
111532
  const parsed = JSON.parse(readFileSync39(filePath, "utf-8"));
@@ -111429,7 +111539,7 @@ function readTokenFile(filePath) {
111429
111539
  }
111430
111540
  function readLegacyStore() {
111431
111541
  const filePath = getLegacyStoragePath();
111432
- if (!existsSync62(filePath))
111542
+ if (!existsSync63(filePath))
111433
111543
  return null;
111434
111544
  try {
111435
111545
  const parsed = JSON.parse(readFileSync39(filePath, "utf-8"));
@@ -111450,7 +111560,7 @@ function readLegacyStore() {
111450
111560
  function writeTokenFile(filePath, token) {
111451
111561
  try {
111452
111562
  const dir = dirname34(filePath);
111453
- if (!existsSync62(dir)) {
111563
+ if (!existsSync63(dir)) {
111454
111564
  mkdirSync15(dir, { recursive: true });
111455
111565
  }
111456
111566
  const tempPath = `${filePath}.tmp.${Date.now()}`;
@@ -111474,7 +111584,7 @@ function saveToken(serverHost, resource, token) {
111474
111584
  }
111475
111585
  function deleteToken(serverHost, resource) {
111476
111586
  const filePath = getMcpOauthStoragePath(serverHost, resource);
111477
- if (!existsSync62(filePath))
111587
+ if (!existsSync63(filePath))
111478
111588
  return deleteLegacyToken(serverHost, resource);
111479
111589
  try {
111480
111590
  unlinkSync9(filePath);
@@ -111496,7 +111606,7 @@ function deleteLegacyToken(serverHost, resource) {
111496
111606
  if (Object.keys(store2).length === 0) {
111497
111607
  try {
111498
111608
  const filePath = getLegacyStoragePath();
111499
- if (existsSync62(filePath))
111609
+ if (existsSync63(filePath))
111500
111610
  unlinkSync9(filePath);
111501
111611
  return true;
111502
111612
  } catch (deleteError) {
@@ -111534,7 +111644,7 @@ function listTokensByHost(serverHost) {
111534
111644
  for (const [hash2, indexedKey] of Object.entries(index)) {
111535
111645
  if (!indexedKey.startsWith(prefix))
111536
111646
  continue;
111537
- const indexedToken = readTokenFile(join89(getMcpOauthStorageDir(), `${hash2}.json`));
111647
+ const indexedToken = readTokenFile(join90(getMcpOauthStorageDir(), `${hash2}.json`));
111538
111648
  if (indexedToken)
111539
111649
  result[indexedKey] = indexedToken;
111540
111650
  }
@@ -111543,13 +111653,13 @@ function listTokensByHost(serverHost) {
111543
111653
  function listAllTokens() {
111544
111654
  const result = { ...readLegacyStore() ?? {} };
111545
111655
  const dir = getMcpOauthStorageDir();
111546
- if (!existsSync62(dir))
111656
+ if (!existsSync63(dir))
111547
111657
  return result;
111548
111658
  const index = readTokenIndex(dir);
111549
111659
  for (const entry of readdirSync11(dir, { withFileTypes: true })) {
111550
111660
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
111551
111661
  continue;
111552
- const token = readTokenFile(join89(dir, entry.name));
111662
+ const token = readTokenFile(join90(dir, entry.name));
111553
111663
  const hash2 = basename12(entry.name, ".json");
111554
111664
  if (token)
111555
111665
  result[index[hash2] ?? hash2] = token;
@@ -111749,7 +111859,7 @@ function buildAuthorizationUrl(authorizationEndpoint, options) {
111749
111859
  }
111750
111860
  var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
111751
111861
  function startCallbackServer(port) {
111752
- return new Promise((resolve27, reject) => {
111862
+ return new Promise((resolve28, reject) => {
111753
111863
  let timeoutId;
111754
111864
  const server2 = createServer2((request, response) => {
111755
111865
  clearTimeout(timeoutId);
@@ -111775,7 +111885,7 @@ function startCallbackServer(port) {
111775
111885
  response.writeHead(200, { "content-type": "text/html" });
111776
111886
  response.end("<html><body><h1>Authorization successful. You can close this tab.</h1></body></html>");
111777
111887
  server2.close();
111778
- resolve27({ code, state: state2 });
111888
+ resolve28({ code, state: state2 });
111779
111889
  });
111780
111890
  timeoutId = setTimeout(() => {
111781
111891
  server2.close();
@@ -112115,7 +112225,7 @@ function createMcpOAuthCommand() {
112115
112225
  }
112116
112226
 
112117
112227
  // packages/omo-opencode/src/cli/boulder/boulder.ts
112118
- import { existsSync as existsSync63 } from "node:fs";
112228
+ import { existsSync as existsSync64 } from "node:fs";
112119
112229
 
112120
112230
  // packages/omo-opencode/src/cli/boulder/formatter.ts
112121
112231
  var import_picocolors22 = __toESM(require_picocolors(), 1);
@@ -112252,10 +112362,10 @@ async function boulder(options) {
112252
112362
  const boulderFilePath = getBoulderFilePath(directory);
112253
112363
  const state2 = readBoulderState(directory);
112254
112364
  if (!state2) {
112255
- const message = existsSync63(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112365
+ const message = existsSync64(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112256
112366
  process.stderr.write(`${message}
112257
112367
  `);
112258
- return existsSync63(boulderFilePath) ? 2 : 1;
112368
+ return existsSync64(boulderFilePath) ? 2 : 1;
112259
112369
  }
112260
112370
  const works = getBoulderWorks(state2);
112261
112371
  const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
@@ -112273,12 +112383,12 @@ async function boulder(options) {
112273
112383
  }
112274
112384
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
112275
112385
  import { spawn as spawn5 } from "node:child_process";
112276
- import { existsSync as existsSync64, readFileSync as readFileSync40, realpathSync as realpathSync9 } from "node:fs";
112277
- import { homedir as homedir25 } from "node:os";
112386
+ import { existsSync as existsSync65, readFileSync as readFileSync40, realpathSync as realpathSync9 } from "node:fs";
112387
+ import { homedir as homedir26 } from "node:os";
112278
112388
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
112279
112389
  function resolveCodexUlwLoopCommand(input = {}) {
112280
112390
  const env3 = input.env ?? process.env;
112281
- const homeDir = input.homeDir ?? homedir25();
112391
+ const homeDir = input.homeDir ?? homedir26();
112282
112392
  const localComponentBin = resolveLocalUlwLoopBin(env3, homeDir);
112283
112393
  if (localComponentBin !== null)
112284
112394
  return { executable: localComponentBin, argsPrefix: [] };
@@ -112301,25 +112411,25 @@ async function codexUlwLoop(args) {
112301
112411
  console.error("Codex ulw-loop is not installed. Run: npx lazycodex-ai@latest install --no-tui");
112302
112412
  return 1;
112303
112413
  }
112304
- const { promise: promise2, resolve: resolve27 } = Promise.withResolvers();
112414
+ const { promise: promise2, resolve: resolve28 } = Promise.withResolvers();
112305
112415
  const child = spawn5(command.executable, [...command.argsPrefix, ...args], {
112306
112416
  stdio: "inherit",
112307
112417
  env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }
112308
112418
  });
112309
112419
  child.on("error", (error51) => {
112310
112420
  console.error(error51.message);
112311
- resolve27(1);
112421
+ resolve28(1);
112312
112422
  });
112313
- child.on("close", (code) => resolve27(code ?? 1));
112423
+ child.on("close", (code) => resolve28(code ?? 1));
112314
112424
  return promise2;
112315
112425
  }
112316
112426
  function resolveLocalUlwLoopBin(env3, homeDir) {
112317
112427
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env: env3, homeDir });
112318
- return candidates.find((candidate2) => existsSync64(candidate2)) ?? null;
112428
+ return candidates.find((candidate2) => existsSync65(candidate2)) ?? null;
112319
112429
  }
112320
112430
  function resolveLegacyLocalOmoBin(env3, homeDir, currentExecutablePaths) {
112321
112431
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env: env3, homeDir });
112322
- return candidates.find((candidate2) => existsSync64(candidate2) && !isCurrentExecutable(candidate2, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate2)) ?? null;
112432
+ return candidates.find((candidate2) => existsSync65(candidate2) && !isCurrentExecutable(candidate2, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate2)) ?? null;
112323
112433
  }
112324
112434
  function isGeneratedRuntimeWrapper(candidate2) {
112325
112435
  try {