oh-my-opencode 5.0.0-beta.6 → 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 (113) 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/README.md +12 -1
  4. package/dist/agents/sisyphus/grok-4.d.ts +20 -0
  5. package/dist/agents/sisyphus/index.d.ts +2 -0
  6. package/dist/agents/sisyphus-agent-config.d.ts +6 -0
  7. package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
  8. package/dist/agents/types.d.ts +2 -2
  9. package/dist/cli/index.js +593 -399
  10. package/dist/cli-node/index.js +593 -399
  11. package/dist/index.js +353 -36
  12. package/dist/shared/normalize-sdk-response.d.ts +1 -0
  13. package/dist/skills/frontend/SKILL.md +10 -7
  14. package/dist/skills/frontend/references/design/_INDEX.md +1 -0
  15. package/dist/skills/frontend/references/design/stylegallery.md +80 -0
  16. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  17. package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
  18. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  19. package/dist/skills/ulw-plan/SKILL.md +2 -2
  20. package/dist/skills/ulw-plan/references/full-workflow.md +27 -3
  21. package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
  22. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  23. package/dist/tui.js +152 -11
  24. package/package.json +19 -19
  25. package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
  26. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
  27. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  28. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  29. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +100 -5
  31. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +100 -5
  32. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  33. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  34. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  35. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  36. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  37. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  38. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  39. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  40. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  41. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  43. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  45. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  46. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  47. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  48. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  49. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  50. package/packages/omo-codex/plugin/components/ultrawork/directive.md +6 -0
  51. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  52. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +6 -0
  54. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -2
  55. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +27 -3
  56. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
  57. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
  58. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +6 -0
  59. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  60. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  61. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +3 -2
  62. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +108 -0
  63. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -0
  64. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  65. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  66. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  84. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  87. package/packages/omo-codex/plugin/package-lock.json +13 -13
  88. package/packages/omo-codex/plugin/package.json +1 -1
  89. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
  90. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
  91. package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
  92. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  93. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
  94. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  95. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +6 -0
  96. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -2
  97. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +108 -0
  98. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -0
  99. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -2
  100. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +27 -3
  101. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
  102. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
  103. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  104. package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
  105. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
  106. package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
  107. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
  108. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
  109. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
  110. package/packages/shared-skills/skills/ulw-plan/SKILL.md +2 -2
  111. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +27 -3
  112. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
  113. 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.6",
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.11-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.6",
2371
- "oh-my-opencode-darwin-x64": "5.0.0-beta.6",
2372
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.6",
2373
- "oh-my-opencode-linux-arm64": "5.0.0-beta.6",
2374
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.6",
2375
- "oh-my-opencode-linux-x64": "5.0.0-beta.6",
2376
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.6",
2377
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.6",
2378
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.6",
2379
- "oh-my-opencode-windows-arm64": "5.0.0-beta.6",
2380
- "oh-my-opencode-windows-x64": "5.0.0-beta.6",
2381
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.6"
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",
@@ -22406,15 +22406,16 @@ var init_codegraph = __esm(() => {
22406
22406
  });
22407
22407
 
22408
22408
  // packages/omo-config-core/src/schema/memory.ts
22409
- var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
22409
+ var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryNudgeSchema, OmoMemoryFactsSchema, OmoMemoryDreamSchema, OmoMemoryPeopleSchema, OmoMemorySoulSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryNudgeLayerSchema, OmoMemoryFactsLayerSchema, OmoMemoryDreamLayerSchema, OmoMemoryPeopleLayerSchema, OmoMemorySoulLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
22410
22410
  var init_memory = __esm(() => {
22411
22411
  init_zod();
22412
22412
  OmoMemoryReflectionTriggerSchema = object({
22413
- step_count: number2().int().nonnegative().default(0),
22413
+ step_count: number2().int().nonnegative().default(25),
22414
22414
  on_compaction: boolean2().default(true)
22415
22415
  }).strict();
22416
22416
  OmoMemoryReflectionSchema = object({
22417
- trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 0, on_compaction: true }),
22417
+ enabled: boolean2().default(true),
22418
+ trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 25, on_compaction: true }),
22418
22419
  merge: _enum2(["auto", "integration"]).default("auto"),
22419
22420
  category: string2().min(1).default("quick"),
22420
22421
  timeout_minutes: number2().int().positive().default(15),
@@ -22427,11 +22428,36 @@ var init_memory = __esm(() => {
22427
22428
  OmoMemorySearchSchema = object({
22428
22429
  enabled: boolean2().default(true)
22429
22430
  }).strict();
22431
+ OmoMemoryNudgeSchema = object({
22432
+ enabled: boolean2().default(true),
22433
+ every_user_turns: number2().int().min(1).default(10)
22434
+ }).strict();
22435
+ OmoMemoryFactsSchema = object({
22436
+ enabled: boolean2().default(true),
22437
+ debounce_settles: number2().int().min(1).default(4)
22438
+ }).strict();
22439
+ OmoMemoryDreamSchema = object({
22440
+ enabled: boolean2().default(true),
22441
+ idle_minutes: number2().int().min(0).default(30),
22442
+ min_hours_between: number2().int().min(1).default(24),
22443
+ shutdown_launch: boolean2().default(true),
22444
+ auto_select_max: number2().int().min(1).max(10).default(5),
22445
+ auto_select_max_chars: number2().int().min(1e4).default(150000)
22446
+ }).strict();
22447
+ OmoMemoryPeopleSchema = object({
22448
+ enabled: boolean2().default(true),
22449
+ max_entries: number2().int().min(1).max(100).default(40),
22450
+ max_entry_chars: number2().int().min(50).max(500).default(200)
22451
+ }).strict();
22452
+ OmoMemorySoulSchema = object({
22453
+ edit_notice: boolean2().default(true)
22454
+ }).strict();
22430
22455
  OmoMemoryReflectionTriggerLayerSchema = object({
22431
22456
  step_count: number2().int().nonnegative().optional(),
22432
22457
  on_compaction: boolean2().optional()
22433
22458
  }).strict();
22434
22459
  OmoMemoryReflectionLayerSchema = object({
22460
+ enabled: boolean2().optional(),
22435
22461
  trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
22436
22462
  merge: _enum2(["auto", "integration"]).optional(),
22437
22463
  category: string2().min(1).optional(),
@@ -22445,10 +22471,39 @@ var init_memory = __esm(() => {
22445
22471
  OmoMemorySearchLayerSchema = object({
22446
22472
  enabled: boolean2().optional()
22447
22473
  }).strict();
22474
+ OmoMemoryNudgeLayerSchema = object({
22475
+ enabled: boolean2().optional(),
22476
+ every_user_turns: number2().int().min(1).optional()
22477
+ }).strict();
22478
+ OmoMemoryFactsLayerSchema = object({
22479
+ enabled: boolean2().optional(),
22480
+ debounce_settles: number2().int().min(1).optional()
22481
+ }).strict();
22482
+ OmoMemoryDreamLayerSchema = object({
22483
+ enabled: boolean2().optional(),
22484
+ idle_minutes: number2().int().min(0).optional(),
22485
+ min_hours_between: number2().int().min(1).optional(),
22486
+ shutdown_launch: boolean2().optional(),
22487
+ auto_select_max: number2().int().min(1).max(10).optional(),
22488
+ auto_select_max_chars: number2().int().min(1e4).optional()
22489
+ }).strict();
22490
+ OmoMemoryPeopleLayerSchema = object({
22491
+ enabled: boolean2().optional(),
22492
+ max_entries: number2().int().min(1).max(100).optional(),
22493
+ max_entry_chars: number2().int().min(50).max(500).optional()
22494
+ }).strict();
22495
+ OmoMemorySoulLayerSchema = object({
22496
+ edit_notice: boolean2().optional()
22497
+ }).strict();
22448
22498
  OmoMemoryAgentOverridesSchema = object({
22449
22499
  enabled: boolean2().optional(),
22450
22500
  agent: string2().min(1).optional(),
22451
22501
  reflection: OmoMemoryReflectionLayerSchema.optional(),
22502
+ nudge: OmoMemoryNudgeLayerSchema.optional(),
22503
+ facts: OmoMemoryFactsLayerSchema.optional(),
22504
+ dream: OmoMemoryDreamLayerSchema.optional(),
22505
+ people: OmoMemoryPeopleLayerSchema.optional(),
22506
+ soul: OmoMemorySoulLayerSchema.optional(),
22452
22507
  sync: OmoMemorySyncLayerSchema.optional(),
22453
22508
  search: OmoMemorySearchLayerSchema.optional(),
22454
22509
  compile_warn_tokens: number2().int().positive().optional()
@@ -22458,12 +22513,25 @@ var init_memory = __esm(() => {
22458
22513
  agent: string2().min(1).default("auto"),
22459
22514
  tool_exposure: _enum2(["direct", "search"]).default("direct"),
22460
22515
  reflection: OmoMemoryReflectionSchema.default({
22461
- trigger: { step_count: 0, on_compaction: true },
22516
+ enabled: true,
22517
+ trigger: { step_count: 25, on_compaction: true },
22462
22518
  merge: "auto",
22463
22519
  category: "quick",
22464
22520
  timeout_minutes: 15,
22465
22521
  sandbox: "auto"
22466
22522
  }),
22523
+ nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
22524
+ facts: OmoMemoryFactsSchema.default({ enabled: true, debounce_settles: 4 }),
22525
+ dream: OmoMemoryDreamSchema.default({
22526
+ enabled: true,
22527
+ idle_minutes: 30,
22528
+ min_hours_between: 24,
22529
+ shutdown_launch: true,
22530
+ auto_select_max: 5,
22531
+ auto_select_max_chars: 150000
22532
+ }),
22533
+ people: OmoMemoryPeopleSchema.default({ enabled: true, max_entries: 40, max_entry_chars: 200 }),
22534
+ soul: OmoMemorySoulSchema.default({ edit_notice: true }),
22467
22535
  sync: OmoMemorySyncSchema.default({ enabled: true }),
22468
22536
  search: OmoMemorySearchSchema.default({ enabled: true }),
22469
22537
  compile_warn_tokens: number2().int().positive().default(30000),
@@ -22474,6 +22542,11 @@ var init_memory = __esm(() => {
22474
22542
  agent: string2().min(1).optional(),
22475
22543
  tool_exposure: _enum2(["direct", "search"]).optional(),
22476
22544
  reflection: OmoMemoryReflectionLayerSchema.optional(),
22545
+ nudge: OmoMemoryNudgeLayerSchema.optional(),
22546
+ facts: OmoMemoryFactsLayerSchema.optional(),
22547
+ dream: OmoMemoryDreamLayerSchema.optional(),
22548
+ people: OmoMemoryPeopleLayerSchema.optional(),
22549
+ soul: OmoMemorySoulLayerSchema.optional(),
22477
22550
  sync: OmoMemorySyncLayerSchema.optional(),
22478
22551
  search: OmoMemorySearchLayerSchema.optional(),
22479
22552
  compile_warn_tokens: number2().int().positive().optional(),
@@ -22512,7 +22585,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
22512
22585
  residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
22513
22586
  });
22514
22587
  }
22515
- var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskSettingsSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
22588
+ var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskDagSettingsSchema, OmoTaskSettingsSchema, OmoTaskDagSettingsLayerSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
22516
22589
  var init_task = __esm(() => {
22517
22590
  init_zod();
22518
22591
  ResidencyMaxChildrenInputSchema = union([number2().int().positive(), literal("unlimited")]);
@@ -22529,6 +22602,16 @@ var init_task = __esm(() => {
22529
22602
  OmoTaskWarningsSchema = object({
22530
22603
  unavailable_categories: boolean2().default(true)
22531
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();
22532
22615
  OmoTaskSettingsSchema = object({
22533
22616
  default_execution_mode: _enum2(["in-process", "process"]).default("in-process"),
22534
22617
  default_concurrency: number2().int().positive().default(5),
@@ -22546,7 +22629,18 @@ var init_task = __esm(() => {
22546
22629
  max_members: 8,
22547
22630
  max_parallel_members: 4,
22548
22631
  max_wall_clock_minutes: 120
22549
- })
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()
22550
22644
  }).strict();
22551
22645
  OmoTaskWaitLayerSchema = object({
22552
22646
  min_ms: number2().int().positive().optional(),
@@ -22574,7 +22668,8 @@ var init_task = __esm(() => {
22574
22668
  resume_children: boolean2().optional(),
22575
22669
  warnings: OmoTaskWarningsLayerSchema.optional(),
22576
22670
  wait: OmoTaskWaitLayerSchema.optional(),
22577
- team: OmoTaskTeamSettingsLayerSchema.optional()
22671
+ team: OmoTaskTeamSettingsLayerSchema.optional(),
22672
+ dag: OmoTaskDagSettingsLayerSchema.optional()
22578
22673
  }).strict();
22579
22674
  });
22580
22675
 
@@ -26399,10 +26494,10 @@ var init_category_model_requirements = __esm(() => {
26399
26494
  quick: {
26400
26495
  fallbackChain: [
26401
26496
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed" },
26402
- { providers: ["quotio-openai"], model: "gpt-5.6-luna-fast", variant: "low" },
26497
+ { providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
26403
26498
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
26404
26499
  {
26405
- 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"],
26406
26501
  model: "qwen3.6-flash",
26407
26502
  variant: "low"
26408
26503
  },
@@ -26418,6 +26513,11 @@ var init_category_model_requirements = __esm(() => {
26418
26513
  },
26419
26514
  "unspecified-low": {
26420
26515
  fallbackChain: [
26516
+ {
26517
+ providers: ["xai", "github-copilot", "opencode", "vercel"],
26518
+ model: "grok-4.6",
26519
+ variant: "xhigh"
26520
+ },
26421
26521
  {
26422
26522
  providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
26423
26523
  model: "gpt-5.6-terra",
@@ -27652,6 +27752,7 @@ var init_context_limit_resolver2 = () => {};
27652
27752
 
27653
27753
  // packages/omo-opencode/src/shared/normalize-sdk-response.ts
27654
27754
  function normalizeSDKResponse(response, fallback, options) {
27755
+ const fallbackIsArray = Array.isArray(fallback);
27655
27756
  if (response == null) {
27656
27757
  return fallback;
27657
27758
  }
@@ -27661,14 +27762,17 @@ function normalizeSDKResponse(response, fallback, options) {
27661
27762
  if (typeof response === "object" && "data" in response) {
27662
27763
  const data = response.data;
27663
27764
  if (data != null) {
27765
+ if (fallbackIsArray && !Array.isArray(data)) {
27766
+ return fallback;
27767
+ }
27664
27768
  return data;
27665
27769
  }
27666
- if (options?.preferResponseOnMissingData === true) {
27770
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
27667
27771
  return response;
27668
27772
  }
27669
27773
  return fallback;
27670
27774
  }
27671
- if (options?.preferResponseOnMissingData === true) {
27775
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
27672
27776
  return response;
27673
27777
  }
27674
27778
  return fallback;
@@ -28148,7 +28252,7 @@ This is NOT a default choice - it's for genuinely unclassifiable moderate-effort
28148
28252
  </Category_Context>
28149
28253
 
28150
28254
  <Caller_Warning>
28151
- THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
28255
+ THIS CATEGORY USES GROK 4.6 (xhigh).
28152
28256
 
28153
28257
  **PROVIDE CLEAR STRUCTURE:**
28154
28258
  1. MUST DO: Enumerate required actions explicitly
@@ -28180,7 +28284,7 @@ var init_openai_categories = __esm(() => {
28180
28284
  },
28181
28285
  {
28182
28286
  name: "unspecified-low",
28183
- config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
28287
+ config: { model: "xai/grok-4.6", variant: "xhigh" },
28184
28288
  description: "Tasks that don't fit other categories, low effort required",
28185
28289
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
28186
28290
  }
@@ -83077,6 +83181,47 @@ var init_model_capabilities_generated = __esm(() => {
83077
83181
  input: 272000,
83078
83182
  output: 128000
83079
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
+ }
83080
83225
  }
83081
83226
  }
83082
83227
  };
@@ -94540,7 +94685,7 @@ var package_default2;
94540
94685
  var init_package2 = __esm(() => {
94541
94686
  package_default2 = {
94542
94687
  name: "@oh-my-opencode/omo-codex",
94543
- version: "5.0.0-beta.6",
94688
+ version: "5.0.0-beta.8",
94544
94689
  type: "module",
94545
94690
  private: true,
94546
94691
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -95509,20 +95654,20 @@ var init_update_toasts = __esm(() => {
95509
95654
  });
95510
95655
 
95511
95656
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
95512
- import { existsSync as existsSync47 } from "node:fs";
95513
- import { dirname as dirname29, join as join74 } from "node:path";
95657
+ import { existsSync as existsSync48 } from "node:fs";
95658
+ import { dirname as dirname30, join as join76 } from "node:path";
95514
95659
  import { fileURLToPath as fileURLToPath5 } from "node:url";
95515
95660
  function defaultGetModuleHostingWorkspace() {
95516
95661
  try {
95517
- const currentDir = dirname29(fileURLToPath5(import.meta.url));
95662
+ const currentDir = dirname30(fileURLToPath5(import.meta.url));
95518
95663
  const pkgJsonPath = findPackageJsonUp(currentDir);
95519
95664
  if (!pkgJsonPath)
95520
95665
  return null;
95521
- const pkgDir = dirname29(pkgJsonPath);
95522
- const nodeModulesDir = dirname29(pkgDir);
95666
+ const pkgDir = dirname30(pkgJsonPath);
95667
+ const nodeModulesDir = dirname30(pkgDir);
95523
95668
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
95524
95669
  return null;
95525
- return dirname29(nodeModulesDir);
95670
+ return dirname30(nodeModulesDir);
95526
95671
  } catch (error51) {
95527
95672
  if (error51 instanceof Error) {
95528
95673
  return null;
@@ -95663,8 +95808,8 @@ var init_background_update_check = __esm(() => {
95663
95808
  init_package_json_locator();
95664
95809
  init_update_toasts();
95665
95810
  defaultDeps4 = {
95666
- existsSync: existsSync47,
95667
- join: join74,
95811
+ existsSync: existsSync48,
95812
+ join: join76,
95668
95813
  runBunInstallWithDetails,
95669
95814
  log: log2,
95670
95815
  getOpenCodeCacheDir,
@@ -95827,7 +95972,7 @@ async function showSpinnerToast(ctx, version3, message) {
95827
95972
  duration: frameInterval + 50
95828
95973
  }
95829
95974
  }).catch(ignoreToastError);
95830
- await new Promise((resolve21) => setTimeout(resolve21, frameInterval));
95975
+ await new Promise((resolve22) => setTimeout(resolve22, frameInterval));
95831
95976
  }
95832
95977
  }
95833
95978
  var SISYPHUS_SPINNER;
@@ -101439,31 +101584,55 @@ function nodeErrorCode6(error51) {
101439
101584
  var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
101440
101585
  // packages/omo-senpi/src/install/install-senpi.ts
101441
101586
  import { execFile as execFile4 } from "node:child_process";
101442
- import { createHash as createHash5 } from "node:crypto";
101443
- import { constants as constants8, existsSync as existsSync31 } from "node:fs";
101444
- import { access as access2, readFile as readFile26, stat as stat6 } from "node:fs/promises";
101445
- import { homedir as homedir10 } from "node:os";
101446
- import { dirname as dirname23, join as join61, 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";
101447
101590
  import { fileURLToPath } from "node:url";
101448
101591
  import { promisify as promisify2 } from "node:util";
101449
101592
 
101450
- // packages/omo-senpi/src/install/local-launcher.ts
101451
- 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";
101452
101595
  import { homedir as homedir9 } from "node:os";
101453
- 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";
101454
101623
  var MARKER = "omo-local-launcher";
101455
- function localLauncherPath(homeDir = homedir9()) {
101456
- return join59(homeDir, ".local", "bin", "omo");
101624
+ function localLauncherPath(homeDir = homedir10()) {
101625
+ return join60(homeDir, ".local", "bin", "omo");
101457
101626
  }
101458
- function localLauncherCmdPath(homeDir = homedir9()) {
101459
- return join59(homeDir, ".local", "bin", "omo.cmd");
101627
+ function localLauncherCmdPath(homeDir = homedir10()) {
101628
+ return join60(homeDir, ".local", "bin", "omo.cmd");
101460
101629
  }
101461
101630
  function renderLocalLauncher(options) {
101462
101631
  const brand = {
101463
101632
  name: "omo",
101464
101633
  displayVersion: options.version ?? "local",
101465
101634
  configDir: ".omo",
101466
- flatLayout: true,
101635
+ flatLayout: false,
101467
101636
  envPrefix: "OMO",
101468
101637
  userAgent: "omo",
101469
101638
  originator: "omo",
@@ -101477,11 +101646,23 @@ function renderLocalLauncher(options) {
101477
101646
  return `#!/usr/bin/env node
101478
101647
  // ${MARKER}: generated by the omo-senpi installer. Delete this file to remove the local launcher.
101479
101648
  import { spawn } from "node:child_process"
101649
+ import { homedir } from "node:os"
101650
+ import { join } from "node:path"
101480
101651
 
101481
101652
  const brand = ${JSON.stringify(brand)}
101482
101653
  const cli = process.env.OMO_SENPI_CLI_PATH ?? ${JSON.stringify(options.senpiCliPath)}
101483
101654
  const plugin = process.env.OMO_PLUGIN_ROOT ?? ${JSON.stringify(options.pluginPath)}
101484
- 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
+ }
101485
101666
  // Anything resolving the product by name must re-enter through this launcher, never the engine.
101486
101667
  env.OMO_BIN = process.argv[1]
101487
101668
  const selfUpdate = process.argv[2] === "update"
@@ -101506,7 +101687,7 @@ child.on("close", (code, signal) => {
101506
101687
  }
101507
101688
  function installLocalLauncher(options) {
101508
101689
  const path6 = localLauncherPath(options.homeDir);
101509
- if (existsSync30(path6) && !readFileSync14(path6, "utf8").includes(MARKER))
101690
+ if (existsSync31(path6) && !readFileSync14(path6, "utf8").includes(MARKER))
101510
101691
  return;
101511
101692
  mkdirSync10(dirname21(path6), { recursive: true });
101512
101693
  writeFileSync6(path6, renderLocalLauncher(options));
@@ -101519,14 +101700,20 @@ node "%~dp0omo" %*\r
101519
101700
  return path6;
101520
101701
  }
101521
101702
 
101703
+ // packages/omo-senpi/src/install/plugin-artifacts.ts
101704
+ import { createHash as createHash5 } from "node:crypto";
101705
+ import { constants as constants8 } from "node:fs";
101706
+ import { access as access2, readFile as readFile26, stat as stat6 } from "node:fs/promises";
101707
+ import { dirname as dirname23, join as join62 } from "node:path";
101708
+
101522
101709
  // packages/omo-senpi/src/install/senpi-settings.ts
101523
101710
  import { constants as constants7 } from "node:fs";
101524
101711
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "node:fs/promises";
101525
- 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";
101526
101713
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
101527
101714
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
101528
- join60("packages", "pi-goal"),
101529
- join60("packages", "pi-webfetch")
101715
+ join61("packages", "pi-goal"),
101716
+ join61("packages", "pi-webfetch")
101530
101717
  ];
101531
101718
  async function readSettings(settingsPath) {
101532
101719
  let raw;
@@ -101555,13 +101742,13 @@ function dedupePackages(packages) {
101555
101742
  return [...new Set(packages)];
101556
101743
  }
101557
101744
  function removeLegacyBuiltinShadows(packages, repoRoot, agentDir) {
101558
- const shadowPaths = new Set(LEGACY_BUILTIN_SHADOW_PACKAGES.map((path6) => resolve18(repoRoot, path6)));
101559
- 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)));
101560
101747
  }
101561
101748
  async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir) {
101562
- const currentPath = resolve18(currentPluginPath);
101749
+ const currentPath = resolve19(currentPluginPath);
101563
101750
  const entries = await Promise.all(packages.map(async (entry) => {
101564
- const packagePath = resolve18(agentDir, entry);
101751
+ const packagePath = resolve19(agentDir, entry);
101565
101752
  if (packagePath === currentPath)
101566
101753
  return currentPath;
101567
101754
  return await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME ? undefined : entry;
@@ -101601,7 +101788,7 @@ function isRecord10(value) {
101601
101788
  async function readPackageName(packagePath) {
101602
101789
  let raw;
101603
101790
  try {
101604
- raw = await readFile25(join60(packagePath, "package.json"), "utf8");
101791
+ raw = await readFile25(join61(packagePath, "package.json"), "utf8");
101605
101792
  } catch (error51) {
101606
101793
  if (isErrno(error51, "ENOENT") || isErrno(error51, "ENOTDIR"))
101607
101794
  return;
@@ -101624,93 +101811,56 @@ function isErrno(error51, code) {
101624
101811
  return error51 instanceof Error && "code" in error51 && error51.code === code;
101625
101812
  }
101626
101813
 
101627
- // packages/omo-senpi/src/install/install-senpi.ts
101628
- var execFileAsync2 = promisify2(execFile4);
101814
+ // packages/omo-senpi/src/install/plugin-artifacts.ts
101629
101815
  var REQUIRED_PLUGIN_ARTIFACTS = [
101630
- join61("extensions", "omo.js"),
101631
- join61("extensions", "reflection-persona.md"),
101632
- join61("skills", "ast-grep", "SKILL.md"),
101633
- join61("skills", "coding-agent-sessions", "SKILL.md"),
101634
- join61("skills", "debugging", "SKILL.md"),
101635
- join61("skills", "frontend", "SKILL.md"),
101636
- join61("skills", "git-master", "SKILL.md"),
101637
- join61("skills", "init-deep", "SKILL.md"),
101638
- join61("skills", "lsp-setup", "SKILL.md"),
101639
- join61("skills", "programming", "SKILL.md"),
101640
- join61("skills", "refactor", "SKILL.md"),
101641
- join61("skills", "remove-ai-slops", "SKILL.md"),
101642
- join61("skills", "review-work", "SKILL.md"),
101643
- join61("skills", "start-work", "SKILL.md"),
101644
- join61("skills", "ultimate-browsing", "SKILL.md"),
101645
- join61("skills", "ultrawork", "SKILL.md"),
101646
- join61("skills", "ulw-loop", "SKILL.md"),
101647
- join61("skills", "ulw-plan", "SKILL.md"),
101648
- join61("skills", "ulw-research", "SKILL.md"),
101649
- join61("skills", "visual-qa", "SKILL.md"),
101650
- join61("runtime", "ast-grep-mcp", "cli.js"),
101651
- join61("runtime", "agent-toolkit", "cli.js"),
101652
- join61("runtime", "agent-toolkit", "ulw-loop", "cli.js"),
101653
- join61("runtime", "agent-toolkit", "omo-agent-toolkit"),
101654
- join61("runtime", "agent-toolkit", "omo-agent-toolkit.cmd"),
101655
- join61("runtime", "lsp-daemon", "dist", "cli.js"),
101656
- join61("runtime", "lsp-daemon", "dist", "index.js"),
101657
- join61("runtime", "lsp-daemon", "dist", "index.d.ts"),
101658
- join61("runtime", "lsp-daemon", "dist", "daemon-client.js"),
101659
- join61("runtime", "lsp-daemon", "dist", "daemon-client.d.ts"),
101660
- join61("runtime", "lsp-daemon", "dist", "package.json"),
101661
- join61("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
101662
- 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")
101663
101854
  ];
101664
- async function runSenpiInstaller(options = {}) {
101665
- const context = resolveInstallContext(options);
101666
- await ensurePluginArtifacts(context);
101667
- const settings = await readSettings(context.settingsPath);
101668
- const before = JSON.stringify(settings);
101669
- const packages = dedupePackages(await removeSupersededOmoPackages(removeLegacyBuiltinShadows(dedupePackages(readPackages(settings)), context.repoRoot, context.agentDir), context.pluginPath, context.agentDir));
101670
- if (!packages.includes(context.pluginPath))
101671
- packages.push(context.pluginPath);
101672
- settings.packages = packages;
101673
- const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101674
- installLocalLauncher({
101675
- pluginPath: context.pluginPath,
101676
- senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101677
- });
101678
- return {
101679
- ok: true,
101680
- action: "install",
101681
- agentDir: context.agentDir,
101682
- settingsPath: context.settingsPath,
101683
- pluginPath: context.pluginPath,
101684
- changed: JSON.stringify(settings) !== before,
101685
- backupPath
101686
- };
101687
- }
101688
- function resolveInstallContext(options) {
101689
- const env3 = options.env ?? process.env;
101690
- const allowBuild = options.pluginPath === undefined;
101691
- const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname23(fileURLToPath(import.meta.url))) : dirname23(resolve19(options.pluginPath))));
101692
- const agentDir = resolve19(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join61(homedir10(), ".senpi", "agent"));
101693
- const pluginPath = resolve19(options.pluginPath ?? join61(repoRoot, "packages", "omo-senpi", "plugin"));
101694
- return {
101695
- env: env3,
101696
- repoRoot,
101697
- agentDir,
101698
- settingsPath: join61(agentDir, "settings.json"),
101699
- pluginPath,
101700
- platform: options.platform ?? process.platform,
101701
- allowBuild,
101702
- runCommand: options.runCommand ?? defaultRunCommand3
101703
- };
101704
- }
101705
101855
  async function ensurePluginArtifacts(context) {
101706
101856
  if (context.allowBuild) {
101707
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
101708
- await context.runCommand("node", [join61("packages", "omo-codex", "plugin", "scripts", "materialize-shared-upstreams.mjs")], { cwd: context.repoRoot });
101709
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
101710
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-install.mjs")], { cwd: context.repoRoot });
101711
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-lsp-daemon-runtime.mjs")], { cwd: context.repoRoot });
101712
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-ast-grep-mcp-runtime.mjs")], { cwd: context.repoRoot });
101713
- 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 });
101714
101864
  }
101715
101865
  if (await hasMissingPluginArtifact(context.pluginPath)) {
101716
101866
  throw new Error(`Packed omo-senpi plugin is missing required runtime artifacts at ${context.pluginPath}`);
@@ -101719,14 +101869,14 @@ async function ensurePluginArtifacts(context) {
101719
101869
  }
101720
101870
  async function hasMissingPluginArtifact(pluginPath) {
101721
101871
  for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {
101722
- if (!await fileExists2(join61(pluginPath, artifact)))
101872
+ if (!await fileExists2(join62(pluginPath, artifact)))
101723
101873
  return true;
101724
101874
  }
101725
101875
  return false;
101726
101876
  }
101727
101877
  async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
101728
- const runtimeEntry = join61(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
101729
- 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");
101730
101880
  let runtimeStat;
101731
101881
  try {
101732
101882
  runtimeStat = await stat6(runtimeEntry);
@@ -101773,6 +101923,63 @@ function astGrepIntegrityError(runtimeEntry, reason) {
101773
101923
  function messageOf(error51) {
101774
101924
  return error51 instanceof Error ? error51.message : String(error51);
101775
101925
  }
101926
+ async function fileExists2(path6) {
101927
+ try {
101928
+ await access2(path6, constants8.F_OK);
101929
+ return true;
101930
+ } catch (error51) {
101931
+ if (isErrno2(error51, "ENOENT"))
101932
+ return false;
101933
+ throw error51;
101934
+ }
101935
+ }
101936
+ function isErrno2(error51, code) {
101937
+ return error51 instanceof Error && "code" in error51 && error51.code === code;
101938
+ }
101939
+
101940
+ // packages/omo-senpi/src/install/install-senpi.ts
101941
+ var execFileAsync2 = promisify2(execFile4);
101942
+ async function runSenpiInstaller(options = {}) {
101943
+ const context = resolveInstallContext(options);
101944
+ await ensurePluginArtifacts(context);
101945
+ const settings = await readSettings(context.settingsPath);
101946
+ const before = JSON.stringify(settings);
101947
+ const packages = dedupePackages(await removeSupersededOmoPackages(removeLegacyBuiltinShadows(dedupePackages(readPackages(settings)), context.repoRoot, context.agentDir), context.pluginPath, context.agentDir));
101948
+ if (!packages.includes(context.pluginPath))
101949
+ packages.push(context.pluginPath);
101950
+ settings.packages = packages;
101951
+ const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101952
+ installLocalLauncher({
101953
+ pluginPath: context.pluginPath,
101954
+ senpiCliPath: join63(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101955
+ });
101956
+ return {
101957
+ ok: true,
101958
+ action: "install",
101959
+ agentDir: context.agentDir,
101960
+ settingsPath: context.settingsPath,
101961
+ pluginPath: context.pluginPath,
101962
+ changed: JSON.stringify(settings) !== before,
101963
+ backupPath
101964
+ };
101965
+ }
101966
+ function resolveInstallContext(options) {
101967
+ const env3 = options.env ?? process.env;
101968
+ const allowBuild = options.pluginPath === undefined;
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"));
101972
+ return {
101973
+ env: env3,
101974
+ repoRoot,
101975
+ agentDir,
101976
+ settingsPath: join63(agentDir, "settings.json"),
101977
+ pluginPath,
101978
+ platform: options.platform ?? process.platform,
101979
+ allowBuild,
101980
+ runCommand: options.runCommand ?? defaultRunCommand3
101981
+ };
101982
+ }
101776
101983
  async function defaultRunCommand3(command, args, options) {
101777
101984
  const result = await execFileAsync2(command, [...args], { cwd: options.cwd });
101778
101985
  if (result.stderr.trim().length > 0)
@@ -101783,27 +101990,14 @@ async function defaultRunCommand3(command, args, options) {
101783
101990
  function findRepoRoot2(importerDir) {
101784
101991
  let current = importerDir;
101785
101992
  for (let depth = 0;depth <= 7; depth += 1) {
101786
- if (fileExistsSync(join61(current, "packages", "omo-senpi", "plugin", "package.json")))
101993
+ if (fileExistsSync(join63(current, "packages", "omo-senpi", "plugin", "package.json")))
101787
101994
  return current;
101788
- current = resolve19(current, "..");
101995
+ current = resolve20(current, "..");
101789
101996
  }
101790
101997
  throw new Error("Unable to locate packages/omo-senpi/plugin/package.json from installer module");
101791
101998
  }
101792
- async function fileExists2(path6) {
101793
- try {
101794
- await access2(path6, constants8.F_OK);
101795
- return true;
101796
- } catch (error51) {
101797
- if (isErrno2(error51, "ENOENT"))
101798
- return false;
101799
- throw error51;
101800
- }
101801
- }
101802
101999
  function fileExistsSync(path6) {
101803
- return existsSync31(path6);
101804
- }
101805
- function isErrno2(error51, code) {
101806
- return error51 instanceof Error && "code" in error51 && error51.code === code;
102000
+ return existsSync32(path6);
101807
102001
  }
101808
102002
  // packages/omo-opencode/src/cli/star-request.ts
101809
102003
  import { execFile as execFile5 } from "node:child_process";
@@ -101839,23 +102033,23 @@ async function starGitHubRepositories(platform = "both", runCommand = runGitHubS
101839
102033
  init_provider_availability();
101840
102034
 
101841
102035
  // packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
101842
- import { existsSync as existsSync33, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "node:fs";
101843
- import { join as join63 } 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";
101844
102038
 
101845
102039
  // packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
101846
102040
  init_shared();
101847
- import { existsSync as existsSync32, readFileSync as readFileSync15 } from "node:fs";
101848
- import { join as join62 } from "node:path";
102041
+ import { existsSync as existsSync33, readFileSync as readFileSync15 } from "node:fs";
102042
+ import { join as join64 } from "node:path";
101849
102043
  var TUI_SUBPATH = "tui";
101850
102044
  var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
101851
102045
  function fileEntryPackageJsonPath(entry) {
101852
102046
  let path6 = entry.slice("file:".length);
101853
102047
  if (path6.startsWith("//"))
101854
102048
  path6 = path6.slice(2);
101855
- return join62(path6, "package.json");
102049
+ return join64(path6, "package.json");
101856
102050
  }
101857
102051
  function packageJsonExportsTui(pkgJsonPath) {
101858
- if (!existsSync32(pkgJsonPath))
102052
+ if (!existsSync33(pkgJsonPath))
101859
102053
  return null;
101860
102054
  try {
101861
102055
  const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
@@ -101890,14 +102084,14 @@ function packageExportsTuiForServerEntry(entry) {
101890
102084
  const packageName = packageNameFromServerEntry(entry);
101891
102085
  if (packageName === null)
101892
102086
  return null;
101893
- return packageJsonExportsTui(join62(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
102087
+ return packageJsonExportsTui(join64(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
101894
102088
  }
101895
102089
  function isOurFilePluginEntry(entry) {
101896
102090
  if (typeof entry !== "string" || !entry.startsWith("file:"))
101897
102091
  return false;
101898
102092
  try {
101899
102093
  const pkgJsonPath = fileEntryPackageJsonPath(entry);
101900
- if (!existsSync32(pkgJsonPath))
102094
+ if (!existsSync33(pkgJsonPath))
101901
102095
  return false;
101902
102096
  const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
101903
102097
  return typeof parsed.name === "string" && ACCEPTED_PACKAGE_NAMES.includes(parsed.name);
@@ -101932,7 +102126,7 @@ function isCanonicalNamedTuiPluginEntry(entry) {
101932
102126
  }
101933
102127
  function detectServerPluginRegistration() {
101934
102128
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
101935
- 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;
101936
102130
  if (!configPath) {
101937
102131
  return { registered: false, configPath: null, entry: null, packageExportsTui: null };
101938
102132
  }
@@ -101955,8 +102149,8 @@ function detectServerPluginRegistration() {
101955
102149
  }
101956
102150
  }
101957
102151
  function detectTuiPluginRegistration() {
101958
- const tuiJsonPath = join62(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
101959
- if (!existsSync32(tuiJsonPath)) {
102152
+ const tuiJsonPath = join64(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
102153
+ if (!existsSync33(tuiJsonPath)) {
101960
102154
  return {
101961
102155
  registered: false,
101962
102156
  configPath: tuiJsonPath,
@@ -102111,11 +102305,11 @@ function readConfig(path6) {
102111
102305
  return null;
102112
102306
  }
102113
102307
  function readServerConfig(configDir) {
102114
- const jsoncPath = join63(configDir, "opencode.jsonc");
102115
- if (existsSync33(jsoncPath))
102308
+ const jsoncPath = join65(configDir, "opencode.jsonc");
102309
+ if (existsSync34(jsoncPath))
102116
102310
  return readConfig(jsoncPath);
102117
- const jsonPath = join63(configDir, "opencode.json");
102118
- if (existsSync33(jsonPath))
102311
+ const jsonPath = join65(configDir, "opencode.json");
102312
+ if (existsSync34(jsonPath))
102119
102313
  return readConfig(jsonPath);
102120
102314
  return null;
102121
102315
  }
@@ -102135,7 +102329,7 @@ function desiredTuiEntry(serverEntry) {
102135
102329
  return null;
102136
102330
  }
102137
102331
  function readTuiConfig(tuiJsonPath) {
102138
- if (!existsSync33(tuiJsonPath)) {
102332
+ if (!existsSync34(tuiJsonPath)) {
102139
102333
  return { config: {}, malformed: false };
102140
102334
  }
102141
102335
  const config3 = readConfig(tuiJsonPath);
@@ -102156,7 +102350,7 @@ function ensureTuiPluginEntry(opts = {}) {
102156
102350
  if (!desiredEntry) {
102157
102351
  return { changed: false, reason: "no-server-entry" };
102158
102352
  }
102159
- const tuiJsonPath = join63(configDir, "tui.json");
102353
+ const tuiJsonPath = join65(configDir, "tui.json");
102160
102354
  const { config: config3, malformed } = readTuiConfig(tuiJsonPath);
102161
102355
  if (malformed) {
102162
102356
  return { changed: false, reason: "malformed" };
@@ -102171,16 +102365,16 @@ function ensureTuiPluginEntry(opts = {}) {
102171
102365
  }
102172
102366
 
102173
102367
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
102174
- import { homedir as homedir11 } from "node:os";
102175
- import { join as join64 } from "node:path";
102368
+ import { homedir as homedir12 } from "node:os";
102369
+ import { join as join66 } from "node:path";
102176
102370
 
102177
102371
  // packages/shared-skills/index.mjs
102178
- import { existsSync as existsSync34 } from "node:fs";
102372
+ import { existsSync as existsSync35 } from "node:fs";
102179
102373
  import { fileURLToPath as fileURLToPath2 } from "node:url";
102180
102374
  var SKILLS_PROBE_SPECIFIERS = ["./skills/", "../skills/", "../../skills/"];
102181
102375
  function sharedSkillsRootPath() {
102182
102376
  const candidates = SKILLS_PROBE_SPECIFIERS.map((specifier) => fileURLToPath2(new URL(specifier, import.meta.url)));
102183
- return candidates.find((candidate2) => existsSync34(candidate2)) ?? candidates[0];
102377
+ return candidates.find((candidate2) => existsSync35(candidate2)) ?? candidates[0];
102184
102378
  }
102185
102379
 
102186
102380
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
@@ -102194,9 +102388,9 @@ function describeResult2(result) {
102194
102388
  }
102195
102389
  async function installAstGrepForOpenCode(options = {}) {
102196
102390
  const platform = options.platform ?? process.platform;
102197
- const baseDir = join64(options.homeDir ?? homedir11(), ".omo");
102391
+ const baseDir = join66(options.homeDir ?? homedir12(), ".omo");
102198
102392
  const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
102199
- const skillDir = join64(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102393
+ const skillDir = join66(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102200
102394
  const installer = options.installer ?? runAstGrepSkillInstall;
102201
102395
  try {
102202
102396
  const result = await installer({ platform, skillDir, targetDir });
@@ -105999,7 +106193,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
105999
106193
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
106000
106194
  init_bun_which_shim();
106001
106195
  init_spawn_with_windows_hide();
106002
- import { delimiter as delimiter2, dirname as dirname24, posix as posix9, win32 as win325 } from "node:path";
106196
+ import { delimiter as delimiter2, dirname as dirname25, posix as posix9, win32 as win325 } from "node:path";
106003
106197
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
106004
106198
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
106005
106199
  function getCommandCandidates(platform) {
@@ -106057,7 +106251,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
106057
106251
  return null;
106058
106252
  }
106059
106253
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
106060
- const preferredDir = dirname24(binaryPath);
106254
+ const preferredDir = dirname25(binaryPath);
106061
106255
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
106062
106256
  return [preferredDir, ...existing].join(delimiter2);
106063
106257
  }
@@ -106226,7 +106420,7 @@ async function resolveSession(options) {
106226
106420
  if (attempt < SESSION_CREATE_MAX_RETRIES) {
106227
106421
  const delay2 = retryDelayMs * attempt;
106228
106422
  console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
106229
- await new Promise((resolve20) => setTimeout(resolve20, delay2));
106423
+ await new Promise((resolve21) => setTimeout(resolve21, delay2));
106230
106424
  }
106231
106425
  continue;
106232
106426
  }
@@ -106237,7 +106431,7 @@ async function resolveSession(options) {
106237
106431
  if (attempt < SESSION_CREATE_MAX_RETRIES) {
106238
106432
  const delay2 = retryDelayMs * attempt;
106239
106433
  console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
106240
- await new Promise((resolve20) => setTimeout(resolve20, delay2));
106434
+ await new Promise((resolve21) => setTimeout(resolve21, delay2));
106241
106435
  }
106242
106436
  }
106243
106437
  throw new Error("Failed to create session after all retries");
@@ -106635,9 +106829,9 @@ function isClosingFence(line, fence) {
106635
106829
  return run?.charAt(0) === fence.marker && run.length >= fence.length;
106636
106830
  }
106637
106831
  // packages/boulder-state/src/top-level-task.ts
106638
- import { existsSync as existsSync35, readFileSync as readFileSync17 } from "node:fs";
106832
+ import { existsSync as existsSync36, readFileSync as readFileSync17 } from "node:fs";
106639
106833
  function readCurrentTopLevelTask(planPath) {
106640
- if (!existsSync35(planPath)) {
106834
+ if (!existsSync36(planPath)) {
106641
106835
  return null;
106642
106836
  }
106643
106837
  try {
@@ -106648,13 +106842,13 @@ function readCurrentTopLevelTask(planPath) {
106648
106842
  }
106649
106843
  }
106650
106844
  // packages/boulder-state/src/storage/path.ts
106651
- import { existsSync as existsSync36 } from "node:fs";
106652
- import { isAbsolute as isAbsolute11, join as join65, 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";
106653
106847
  function getBoulderFilePath(directory) {
106654
- return join65(directory, BOULDER_DIR, BOULDER_FILE);
106848
+ return join67(directory, BOULDER_DIR, BOULDER_FILE);
106655
106849
  }
106656
106850
  function resolveTrackedPath(baseDirectory, trackedPath) {
106657
- return isAbsolute11(trackedPath) ? resolve20(trackedPath) : resolve20(baseDirectory, trackedPath);
106851
+ return isAbsolute11(trackedPath) ? resolve21(trackedPath) : resolve21(baseDirectory, trackedPath);
106658
106852
  }
106659
106853
  function resolveBoulderPlanPath(directory, state) {
106660
106854
  const absolutePlanPath = resolveTrackedPath(directory, state.active_plan);
@@ -106662,22 +106856,22 @@ function resolveBoulderPlanPath(directory, state) {
106662
106856
  if (!worktreePath) {
106663
106857
  return absolutePlanPath;
106664
106858
  }
106665
- const absoluteDirectory = resolve20(directory);
106859
+ const absoluteDirectory = resolve21(directory);
106666
106860
  const relativePlanPath = relative8(absoluteDirectory, absolutePlanPath);
106667
106861
  if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute11(relativePlanPath)) {
106668
106862
  return absolutePlanPath;
106669
106863
  }
106670
106864
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
106671
- const worktreePlanPath = resolve20(absoluteWorktreePath, relativePlanPath);
106672
- return existsSync36(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
106865
+ const worktreePlanPath = resolve21(absoluteWorktreePath, relativePlanPath);
106866
+ return existsSync37(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
106673
106867
  }
106674
106868
  function resolveBoulderPlanPathForWork(directory, work) {
106675
106869
  return resolveBoulderPlanPath(directory, work);
106676
106870
  }
106677
106871
  // packages/boulder-state/src/storage/plan-progress.ts
106678
- 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";
106679
106873
  function getPlanProgress(planPath) {
106680
- if (!existsSync37(planPath)) {
106874
+ if (!existsSync38(planPath)) {
106681
106875
  return { total: 0, completed: 0, isComplete: false };
106682
106876
  }
106683
106877
  try {
@@ -106760,10 +106954,10 @@ function selectMirrorWork(state) {
106760
106954
  return sorted[0] ?? null;
106761
106955
  }
106762
106956
  // packages/boulder-state/src/storage/read-state.ts
106763
- import { existsSync as existsSync38, readFileSync as readFileSync19 } from "node:fs";
106957
+ import { existsSync as existsSync39, readFileSync as readFileSync19 } from "node:fs";
106764
106958
  function readBoulderState(directory) {
106765
106959
  const filePath = getBoulderFilePath(directory);
106766
- if (!existsSync38(filePath)) {
106960
+ if (!existsSync39(filePath)) {
106767
106961
  return null;
106768
106962
  }
106769
106963
  try {
@@ -106833,14 +107027,14 @@ init_state();
106833
107027
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
106834
107028
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
106835
107029
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
106836
- import { existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "node:fs";
106837
- import { join as join66 } 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";
106838
107032
  function getMarkerPath(directory, sessionID) {
106839
- return join66(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
107033
+ return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
106840
107034
  }
106841
107035
  function readContinuationMarker(directory, sessionID) {
106842
107036
  const markerPath = getMarkerPath(directory, sessionID);
106843
- if (!existsSync39(markerPath))
107037
+ if (!existsSync40(markerPath))
106844
107038
  return null;
106845
107039
  try {
106846
107040
  const raw = readFileSync20(markerPath, "utf-8");
@@ -106909,7 +107103,7 @@ async function isSessionInBoulderLineage(input) {
106909
107103
  init_shared();
106910
107104
  init_compaction_marker();
106911
107105
  import { readFileSync as readFileSync21, readdirSync as readdirSync8 } from "node:fs";
106912
- import { join as join67 } from "node:path";
107106
+ import { join as join69 } from "node:path";
106913
107107
  var defaultSessionLastAgentDeps = {
106914
107108
  getMessageDir,
106915
107109
  isSqliteBackend,
@@ -106969,7 +107163,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
106969
107163
  try {
106970
107164
  const messages = readdirSync8(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
106971
107165
  try {
106972
- const content = readFileSync21(join67(messageDir, fileName), "utf-8");
107166
+ const content = readFileSync21(join69(messageDir, fileName), "utf-8");
106973
107167
  const parsed = JSON.parse(content);
106974
107168
  return {
106975
107169
  fileName,
@@ -107012,8 +107206,8 @@ init_agent_display_names();
107012
107206
 
107013
107207
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
107014
107208
  init_frontmatter2();
107015
- import { existsSync as existsSync40, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "node:fs";
107016
- import { dirname as dirname25, join as join68 } 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";
107017
107211
 
107018
107212
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
107019
107213
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -107022,11 +107216,11 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
107022
107216
 
107023
107217
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
107024
107218
  function getStateFilePath(directory, customPath) {
107025
- return customPath ? join68(directory, customPath) : join68(directory, DEFAULT_STATE_FILE);
107219
+ return customPath ? join70(directory, customPath) : join70(directory, DEFAULT_STATE_FILE);
107026
107220
  }
107027
107221
  function readState(directory, customPath) {
107028
107222
  const filePath = getStateFilePath(directory, customPath);
107029
- if (!existsSync40(filePath)) {
107223
+ if (!existsSync41(filePath)) {
107030
107224
  return null;
107031
107225
  }
107032
107226
  try {
@@ -107256,7 +107450,7 @@ async function pollForCompletion(ctx, eventState, abortController, options = {})
107256
107450
  const secondaryMeaningfulWorkTimeoutMs = options.secondaryMeaningfulWorkTimeoutMs ?? DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS;
107257
107451
  const requireMeaningfulWork = options.requireMeaningfulWork ?? false;
107258
107452
  const now = options.now ?? Date.now;
107259
- const sleep = options.sleep ?? ((ms) => new Promise((resolve21) => setTimeout(resolve21, ms)));
107453
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve22) => setTimeout(resolve22, ms)));
107260
107454
  let consecutiveCompleteChecks = 0;
107261
107455
  let errorCycleCount = 0;
107262
107456
  let firstWorkTimestamp = null;
@@ -107421,7 +107615,7 @@ function createAbortError() {
107421
107615
  return error51;
107422
107616
  }
107423
107617
  function sleep(delayMs) {
107424
- return new Promise((resolve21) => setTimeout(resolve21, delayMs));
107618
+ return new Promise((resolve22) => setTimeout(resolve22, delayMs));
107425
107619
  }
107426
107620
  function hasPromptStartEvidence(eventState) {
107427
107621
  return eventState.mainSessionStarted || eventState.hasReceivedMeaningfulWork || eventState.messageCount > 0 || eventState.currentTool !== null;
@@ -107796,7 +107990,7 @@ var EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS = 2000;
107796
107990
  async function waitForEventProcessorShutdown(eventProcessor, timeoutMs = EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS) {
107797
107991
  const completed = await Promise.race([
107798
107992
  eventProcessor.then(() => true),
107799
- new Promise((resolve21) => setTimeout(() => resolve21(false), timeoutMs))
107993
+ new Promise((resolve22) => setTimeout(() => resolve22(false), timeoutMs))
107800
107994
  ]);
107801
107995
  }
107802
107996
  async function run(options) {
@@ -108122,14 +108316,14 @@ async function getLocalVersion(options = {}) {
108122
108316
  }
108123
108317
  }
108124
108318
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
108125
- import { existsSync as existsSync51, readFileSync as readFileSync32 } from "node:fs";
108319
+ import { existsSync as existsSync52, readFileSync as readFileSync32 } from "node:fs";
108126
108320
 
108127
108321
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
108128
108322
  init_extract_semver();
108129
108323
  init_bun_which_shim();
108130
- import { existsSync as existsSync48, accessSync as accessSync4, constants as constants11 } from "node:fs";
108131
- import { homedir as homedir14 } from "node:os";
108132
- import { join as join75 } 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";
108133
108327
 
108134
108328
  // packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
108135
108329
  init_spawn_with_windows_hide();
@@ -108168,8 +108362,8 @@ async function spawnWithTimeout(command, options, timeoutMs = DEFAULT_SPAWN_TIME
108168
108362
  const stdoutPromise = readSpawnStream(proc.stdout);
108169
108363
  const stderrPromise = readSpawnStream(proc.stderr);
108170
108364
  let timer;
108171
- const timeoutPromise = new Promise((resolve21) => {
108172
- timer = setTimeout(() => resolve21("timeout"), timeoutMs);
108365
+ const timeoutPromise = new Promise((resolve22) => {
108366
+ timer = setTimeout(() => resolve22("timeout"), timeoutMs);
108173
108367
  });
108174
108368
  const processPromise = (async () => {
108175
108369
  await proc.exited;
@@ -108216,22 +108410,22 @@ function isExecutable2(path12) {
108216
108410
  }
108217
108411
  }
108218
108412
  function getDesktopAppPaths(platform) {
108219
- const home = homedir14();
108413
+ const home = homedir15();
108220
108414
  switch (platform) {
108221
108415
  case "darwin":
108222
108416
  return [
108223
108417
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
108224
- join75(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108418
+ join77(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108225
108419
  ];
108226
108420
  case "win32": {
108227
108421
  const programFiles = process.env.ProgramFiles;
108228
108422
  const localAppData = process.env.LOCALAPPDATA;
108229
108423
  const paths2 = [];
108230
108424
  if (programFiles) {
108231
- paths2.push(join75(programFiles, "OpenCode", "OpenCode.exe"));
108425
+ paths2.push(join77(programFiles, "OpenCode", "OpenCode.exe"));
108232
108426
  }
108233
108427
  if (localAppData) {
108234
- paths2.push(join75(localAppData, "OpenCode", "OpenCode.exe"));
108428
+ paths2.push(join77(localAppData, "OpenCode", "OpenCode.exe"));
108235
108429
  }
108236
108430
  return paths2;
108237
108431
  }
@@ -108239,8 +108433,8 @@ function getDesktopAppPaths(platform) {
108239
108433
  return [
108240
108434
  "/usr/bin/opencode",
108241
108435
  "/usr/lib/opencode/opencode",
108242
- join75(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108243
- join75(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")
108244
108438
  ];
108245
108439
  default:
108246
108440
  return [];
@@ -108252,7 +108446,7 @@ function buildVersionCommand(binaryPath, platform) {
108252
108446
  }
108253
108447
  return [binaryPath, "--version"];
108254
108448
  }
108255
- function findDesktopBinary(platform = process.platform, checkExists = existsSync48) {
108449
+ function findDesktopBinary(platform = process.platform, checkExists = existsSync49) {
108256
108450
  for (const desktopPath of getDesktopAppPaths(platform)) {
108257
108451
  if (checkExists(desktopPath)) {
108258
108452
  return { binary: "opencode", path: desktopPath };
@@ -108260,7 +108454,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
108260
108454
  }
108261
108455
  return null;
108262
108456
  }
108263
- async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync48) {
108457
+ async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync49) {
108264
108458
  for (const binary of OPENCODE_BINARIES2) {
108265
108459
  const path12 = bunWhich(binary);
108266
108460
  if (path12 && checkExists(path12)) {
@@ -108272,7 +108466,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
108272
108466
  const candidates = getCommandCandidates2(platform);
108273
108467
  for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {
108274
108468
  for (const command of candidates) {
108275
- const fullPath = join75(entry, command);
108469
+ const fullPath = join77(entry, command);
108276
108470
  if (checkExists(fullPath) && isExecutable2(fullPath)) {
108277
108471
  return { binary: command, path: fullPath };
108278
108472
  }
@@ -108318,12 +108512,12 @@ function compareVersions3(current, minimum) {
108318
108512
 
108319
108513
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
108320
108514
  init_shared();
108321
- import { existsSync as existsSync49, readFileSync as readFileSync30 } from "node:fs";
108515
+ import { existsSync as existsSync50, readFileSync as readFileSync30 } from "node:fs";
108322
108516
  function detectConfigPath() {
108323
108517
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
108324
- if (existsSync49(paths2.configJsonc))
108518
+ if (existsSync50(paths2.configJsonc))
108325
108519
  return paths2.configJsonc;
108326
- if (existsSync49(paths2.configJson))
108520
+ if (existsSync50(paths2.configJson))
108327
108521
  return paths2.configJson;
108328
108522
  return null;
108329
108523
  }
@@ -108411,36 +108605,36 @@ init_file_utils2();
108411
108605
  init_checker();
108412
108606
  init_auto_update_checker();
108413
108607
  init_package_json_locator();
108414
- 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";
108415
108609
  import { createRequire as createRequire3 } from "node:module";
108416
- import { homedir as homedir15 } from "node:os";
108417
- import { join as join76 } from "node:path";
108610
+ import { homedir as homedir16 } from "node:os";
108611
+ import { join as join78 } from "node:path";
108418
108612
  import { fileURLToPath as fileURLToPath6 } from "node:url";
108419
108613
  init_shared();
108420
108614
  function getPlatformDefaultCacheDir(platform = process.platform) {
108421
108615
  if (platform === "darwin")
108422
- return join76(homedir15(), "Library", "Caches");
108616
+ return join78(homedir16(), "Library", "Caches");
108423
108617
  if (platform === "win32")
108424
- return process.env.LOCALAPPDATA ?? join76(homedir15(), "AppData", "Local");
108425
- return join76(homedir15(), ".cache");
108618
+ return process.env.LOCALAPPDATA ?? join78(homedir16(), "AppData", "Local");
108619
+ return join78(homedir16(), ".cache");
108426
108620
  }
108427
108621
  function resolveOpenCodeCacheDir() {
108428
108622
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
108429
108623
  if (xdgCacheHome)
108430
- return join76(xdgCacheHome, "opencode");
108624
+ return join78(xdgCacheHome, "opencode");
108431
108625
  const fromShared = getOpenCodeCacheDir();
108432
- const platformDefault = join76(getPlatformDefaultCacheDir(), "opencode");
108433
- if (existsSync50(fromShared) || !existsSync50(platformDefault))
108626
+ const platformDefault = join78(getPlatformDefaultCacheDir(), "opencode");
108627
+ if (existsSync51(fromShared) || !existsSync51(platformDefault))
108434
108628
  return fromShared;
108435
108629
  return platformDefault;
108436
108630
  }
108437
108631
  function resolveExistingDir(dirPath) {
108438
- if (!existsSync50(dirPath))
108632
+ if (!existsSync51(dirPath))
108439
108633
  return dirPath;
108440
108634
  return resolveSymlink(dirPath);
108441
108635
  }
108442
108636
  function readPackageJson(filePath) {
108443
- if (!existsSync50(filePath))
108637
+ if (!existsSync51(filePath))
108444
108638
  return null;
108445
108639
  try {
108446
108640
  const content = readFileSync31(filePath, "utf-8");
@@ -108461,26 +108655,26 @@ function normalizeVersion(value) {
108461
108655
  function createPackageCandidates(rootDir) {
108462
108656
  return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
108463
108657
  packageName,
108464
- installedPackagePath: join76(rootDir, "node_modules", packageName, "package.json")
108658
+ installedPackagePath: join78(rootDir, "node_modules", packageName, "package.json")
108465
108659
  }));
108466
108660
  }
108467
108661
  function createTaggedInstallCandidates(rootDir) {
108468
- const packagesDir = join76(rootDir, "packages");
108469
- if (!existsSync50(packagesDir))
108662
+ const packagesDir = join78(rootDir, "packages");
108663
+ if (!existsSync51(packagesDir))
108470
108664
  return [];
108471
108665
  const candidates = [];
108472
108666
  for (const entryName of readdirSync10(packagesDir).sort()) {
108473
108667
  const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
108474
108668
  if (packageName === undefined)
108475
108669
  continue;
108476
- const installDir = join76(packagesDir, entryName);
108670
+ const installDir = join78(packagesDir, entryName);
108477
108671
  candidates.push({
108478
108672
  cacheDir: installDir,
108479
- cachePackagePath: join76(installDir, "package.json"),
108673
+ cachePackagePath: join78(installDir, "package.json"),
108480
108674
  packageCandidates: [
108481
108675
  {
108482
108676
  packageName,
108483
- installedPackagePath: join76(installDir, "node_modules", packageName, "package.json")
108677
+ installedPackagePath: join78(installDir, "node_modules", packageName, "package.json")
108484
108678
  }
108485
108679
  ]
108486
108680
  });
@@ -108488,7 +108682,7 @@ function createTaggedInstallCandidates(rootDir) {
108488
108682
  return candidates;
108489
108683
  }
108490
108684
  function selectInstalledPackage(candidate2) {
108491
- return candidate2.packageCandidates.find((packageCandidate) => existsSync50(packageCandidate.installedPackagePath)) ?? candidate2.packageCandidates[0];
108685
+ return candidate2.packageCandidates.find((packageCandidate) => existsSync51(packageCandidate.installedPackagePath)) ?? candidate2.packageCandidates[0];
108492
108686
  }
108493
108687
  function getExpectedVersion(cachePackage, packageName) {
108494
108688
  return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
@@ -108499,7 +108693,7 @@ function resolveInstalledPackageJsonPath() {
108499
108693
  for (const packageName of ACCEPTED_PACKAGE_NAMES) {
108500
108694
  try {
108501
108695
  const packageJsonPath = require2.resolve(`${packageName}/package.json`);
108502
- if (existsSync50(packageJsonPath)) {
108696
+ if (existsSync51(packageJsonPath)) {
108503
108697
  return { packageName, packageJsonPath };
108504
108698
  }
108505
108699
  } catch {
@@ -108525,22 +108719,22 @@ function getLoadedPluginVersion() {
108525
108719
  const candidates = [
108526
108720
  {
108527
108721
  cacheDir: configDir,
108528
- cachePackagePath: join76(configDir, "package.json"),
108722
+ cachePackagePath: join78(configDir, "package.json"),
108529
108723
  packageCandidates: createPackageCandidates(configDir)
108530
108724
  },
108531
108725
  ...createTaggedInstallCandidates(configDir),
108532
108726
  {
108533
108727
  cacheDir,
108534
- cachePackagePath: join76(cacheDir, "package.json"),
108728
+ cachePackagePath: join78(cacheDir, "package.json"),
108535
108729
  packageCandidates: createPackageCandidates(cacheDir)
108536
108730
  },
108537
108731
  ...createTaggedInstallCandidates(cacheDir)
108538
108732
  ];
108539
- 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];
108540
108734
  const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
108541
108735
  const selectedPackage = selectInstalledPackage(selectedCandidate);
108542
108736
  const candidateInstalledPath = selectedPackage.installedPackagePath;
108543
- const candidateExists = existsSync50(candidateInstalledPath);
108737
+ const candidateExists = existsSync51(candidateInstalledPath);
108544
108738
  const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
108545
108739
  const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
108546
108740
  const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
@@ -108576,7 +108770,7 @@ var defaultDeps6 = {
108576
108770
  getLoadedPluginVersion,
108577
108771
  getLatestPluginVersion,
108578
108772
  getSuggestedInstallTag,
108579
- configExists: existsSync51,
108773
+ configExists: existsSync52,
108580
108774
  readConfigFile: (path12) => readFileSync32(path12, "utf-8"),
108581
108775
  parseConfigContent: (content) => parseJsonc(content)
108582
108776
  };
@@ -108722,23 +108916,23 @@ async function checkSystem(deps = defaultDeps6) {
108722
108916
 
108723
108917
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
108724
108918
  init_shared();
108725
- import { existsSync as existsSync52, readFileSync as readFileSync33 } from "node:fs";
108726
- import { homedir as homedir16 } from "node:os";
108727
- import { join as join77 } 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";
108728
108922
  function getUserConfigDir2() {
108729
108923
  const xdgConfig = process.env.XDG_CONFIG_HOME;
108730
108924
  if (xdgConfig)
108731
- return join77(xdgConfig, "opencode");
108732
- return join77(homedir16(), ".config", "opencode");
108925
+ return join79(xdgConfig, "opencode");
108926
+ return join79(homedir17(), ".config", "opencode");
108733
108927
  }
108734
108928
  function loadCustomProviderNames() {
108735
108929
  const configDir = getUserConfigDir2();
108736
108930
  const candidatePaths = [
108737
- join77(configDir, "opencode.json"),
108738
- join77(configDir, "opencode.jsonc")
108931
+ join79(configDir, "opencode.json"),
108932
+ join79(configDir, "opencode.jsonc")
108739
108933
  ];
108740
108934
  for (const configPath of candidatePaths) {
108741
- if (!existsSync52(configPath))
108935
+ if (!existsSync53(configPath))
108742
108936
  continue;
108743
108937
  try {
108744
108938
  const content = readFileSync33(configPath, "utf-8");
@@ -108756,9 +108950,9 @@ function loadCustomProviderNames() {
108756
108950
  return [];
108757
108951
  }
108758
108952
  function loadAvailableModelsFromCache() {
108759
- const cacheFile = join77(getOpenCodeCacheDir(), "models.json");
108953
+ const cacheFile = join79(getOpenCodeCacheDir(), "models.json");
108760
108954
  const customProviders = loadCustomProviderNames();
108761
- if (!existsSync52(cacheFile)) {
108955
+ if (!existsSync53(cacheFile)) {
108762
108956
  if (customProviders.length > 0) {
108763
108957
  return { providers: customProviders, modelCount: 0, cacheExists: true };
108764
108958
  }
@@ -108818,7 +109012,7 @@ function loadOmoConfig2() {
108818
109012
 
108819
109013
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
108820
109014
  init_shared();
108821
- import { join as join78 } from "node:path";
109015
+ import { join as join80 } from "node:path";
108822
109016
 
108823
109017
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
108824
109018
  function formatModelWithVariant(model, variant) {
@@ -108860,7 +109054,7 @@ function formatCapabilityResolutionLabel(mode) {
108860
109054
  }
108861
109055
  function buildModelResolutionDetails(options) {
108862
109056
  const details = [];
108863
- const cacheFile = join78(getOpenCodeCacheDir(), "models.json");
109057
+ const cacheFile = join80(getOpenCodeCacheDir(), "models.json");
108864
109058
  details.push("═══ Available Models (from cache) ═══");
108865
109059
  details.push("");
108866
109060
  if (options.available.cacheExists) {
@@ -109169,8 +109363,8 @@ async function checkConfig() {
109169
109363
 
109170
109364
  // packages/omo-opencode/src/cli/doctor/checks/deprecated-reasoning-keys.ts
109171
109365
  init_main();
109172
- import { existsSync as existsSync53, readFileSync as readFileSync34 } from "node:fs";
109173
- import { join as join79 } from "node:path";
109366
+ import { existsSync as existsSync54, readFileSync as readFileSync34 } from "node:fs";
109367
+ import { join as join81 } from "node:path";
109174
109368
  var CANONICAL_REPLACEMENT = new Map([
109175
109369
  ["variant", "reasoning"],
109176
109370
  ["reasoningEffort", "reasoning"],
@@ -109225,13 +109419,13 @@ function userConfigPaths() {
109225
109419
  const home = process.env.HOME ?? process.env.USERPROFILE;
109226
109420
  if (home === undefined || home.length === 0)
109227
109421
  return [];
109228
- return [join79(home, ".omo", "omo.jsonc"), join79(home, ".omo", "omo.json")];
109422
+ return [join81(home, ".omo", "omo.jsonc"), join81(home, ".omo", "omo.json")];
109229
109423
  }
109230
109424
  async function checkDeprecatedReasoningKeys() {
109231
109425
  const issues = [];
109232
109426
  const scanned = [];
109233
109427
  for (const configPath of userConfigPaths()) {
109234
- if (!existsSync53(configPath))
109428
+ if (!existsSync54(configPath))
109235
109429
  continue;
109236
109430
  scanned.push(configPath);
109237
109431
  const parsed = parse2(readFileSync34(configPath, "utf-8"));
@@ -109248,28 +109442,28 @@ async function checkDeprecatedReasoningKeys() {
109248
109442
 
109249
109443
  // packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
109250
109444
  init_src2();
109251
- import { existsSync as existsSync54 } from "node:fs";
109445
+ import { existsSync as existsSync55 } from "node:fs";
109252
109446
  import { createRequire as createRequire4 } from "node:module";
109253
- import { homedir as homedir18 } from "node:os";
109254
- import { dirname as dirname30, join as join81 } from "node:path";
109447
+ import { homedir as homedir19 } from "node:os";
109448
+ import { dirname as dirname31, join as join83 } from "node:path";
109255
109449
 
109256
109450
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
109257
- import { join as join80 } from "path";
109258
- 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";
109259
109453
  init_binary_downloader();
109260
109454
  init_logger2();
109261
109455
  init_plugin_identity();
109262
109456
  var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
109263
- var DEBUG_FILE = join80(tmpdir4(), "comment-checker-debug.log");
109457
+ var DEBUG_FILE = join82(tmpdir4(), "comment-checker-debug.log");
109264
109458
  function getCacheDir2() {
109265
109459
  if (process.platform === "win32") {
109266
109460
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
109267
- const base2 = localAppData || join80(homedir17(), "AppData", "Local");
109268
- return join80(base2, CACHE_DIR_NAME, "bin");
109461
+ const base2 = localAppData || join82(homedir18(), "AppData", "Local");
109462
+ return join82(base2, CACHE_DIR_NAME, "bin");
109269
109463
  }
109270
109464
  const xdgCache = process.env.XDG_CACHE_HOME;
109271
- const base = xdgCache || join80(homedir17(), ".cache");
109272
- return join80(base, CACHE_DIR_NAME, "bin");
109465
+ const base = xdgCache || join82(homedir18(), ".cache");
109466
+ return join82(base, CACHE_DIR_NAME, "bin");
109273
109467
  }
109274
109468
  function getBinaryName() {
109275
109469
  return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
@@ -109319,7 +109513,7 @@ async function getBinaryVersion(binary) {
109319
109513
  }
109320
109514
  }
109321
109515
  async function checkAstGrepCli() {
109322
- const runtimeDir = astGrepRuntimeDir(join81(homedir18(), ".omo"));
109516
+ const runtimeDir = astGrepRuntimeDir(join83(homedir19(), ".omo"));
109323
109517
  const sgPath = findSgBinarySync({ runtimeDir });
109324
109518
  if (sgPath === null) {
109325
109519
  return {
@@ -109348,12 +109542,12 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
109348
109542
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
109349
109543
  const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
109350
109544
  try {
109351
- const packageDir = baseDirOverride ?? dirname30(resolvePackageJsonPath());
109352
- const vendorPath = join81(packageDir, "vendor", platformKey, binaryName);
109353
- if (existsSync54(vendorPath))
109545
+ const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
109546
+ const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
109547
+ if (existsSync55(vendorPath))
109354
109548
  return vendorPath;
109355
- const binPath = join81(packageDir, "bin", binaryName);
109356
- if (existsSync54(binPath))
109549
+ const binPath = join83(packageDir, "bin", binaryName);
109550
+ if (existsSync55(binPath))
109357
109551
  return binPath;
109358
109552
  } catch (error51) {
109359
109553
  if (!(error51 instanceof Error) && !isModuleResolutionFailure(error51))
@@ -109499,8 +109693,8 @@ async function getGhCliInfo(dependencies = {}) {
109499
109693
  // packages/omo-opencode/src/mcp/lsp.ts
109500
109694
  init_zod();
109501
109695
  init_opencode_config_dir();
109502
- import { existsSync as existsSync55, readFileSync as readFileSync35 } from "node:fs";
109503
- import { delimiter as delimiter3, dirname as dirname31, 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";
109504
109698
  import { fileURLToPath as fileURLToPath7 } from "node:url";
109505
109699
 
109506
109700
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -109547,7 +109741,7 @@ function resolveRuntimeExecutable(commandName, options = {}) {
109547
109741
  }
109548
109742
 
109549
109743
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
109550
- import { resolve as resolve21 } from "node:path";
109744
+ import { resolve as resolve22 } from "node:path";
109551
109745
  function resolveJavaScriptRuntime(resolveExecutable) {
109552
109746
  const node = resolveExecutable("node");
109553
109747
  return node.available ? node : resolveExecutable("bun");
@@ -109555,9 +109749,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
109555
109749
  function createAncestorCliCandidates(options) {
109556
109750
  const candidates = [];
109557
109751
  const seenPaths = new Set;
109558
- let currentDirectory = resolve21(options.startDirectory);
109752
+ let currentDirectory = resolve22(options.startDirectory);
109559
109753
  while (true) {
109560
- const distCliPath = resolve21(currentDirectory, options.packageRel, options.distCliRel);
109754
+ const distCliPath = resolve22(currentDirectory, options.packageRel, options.distCliRel);
109561
109755
  if (!seenPaths.has(distCliPath)) {
109562
109756
  const runtime5 = resolveJavaScriptRuntime(options.resolveExecutable);
109563
109757
  seenPaths.add(distCliPath);
@@ -109569,7 +109763,7 @@ function createAncestorCliCandidates(options) {
109569
109763
  runtimeAvailable: runtime5.available
109570
109764
  });
109571
109765
  }
109572
- const sourceCliPath = resolve21(currentDirectory, options.packageRel, options.sourceCliRel);
109766
+ const sourceCliPath = resolve22(currentDirectory, options.packageRel, options.sourceCliRel);
109573
109767
  if (!seenPaths.has(sourceCliPath)) {
109574
109768
  const runtime5 = options.resolveExecutable("bun");
109575
109769
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -109586,7 +109780,7 @@ function createAncestorCliCandidates(options) {
109586
109780
  runtimeAvailable: runtime5.available
109587
109781
  });
109588
109782
  }
109589
- const parentDirectory = resolve21(currentDirectory, "..");
109783
+ const parentDirectory = resolve22(currentDirectory, "..");
109590
109784
  if (parentDirectory === currentDirectory)
109591
109785
  return candidates;
109592
109786
  currentDirectory = parentDirectory;
@@ -109631,7 +109825,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
109631
109825
  ].join(";");
109632
109826
  function getModuleDirectory(moduleUrl) {
109633
109827
  try {
109634
- return dirname31(fileURLToPath7(moduleUrl));
109828
+ return dirname32(fileURLToPath7(moduleUrl));
109635
109829
  } catch (error51) {
109636
109830
  if (!(error51 instanceof Error))
109637
109831
  throw error51;
@@ -109639,11 +109833,11 @@ function getModuleDirectory(moduleUrl) {
109639
109833
  }
109640
109834
  }
109641
109835
  function findBootstrapRoot(candidates, pathExists) {
109642
- 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();
109643
109837
  }
109644
109838
  function readDaemonPackageVersion(root) {
109645
109839
  try {
109646
- 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"));
109647
109841
  return DaemonPackageSchema.parse(packageJson).version;
109648
109842
  } catch (error51) {
109649
109843
  if (!(error51 instanceof Error))
@@ -109655,17 +109849,17 @@ function createBootstrapCandidate(root, pathExists, resolveExecutable) {
109655
109849
  const runtime5 = resolveJavaScriptRuntime(resolveExecutable);
109656
109850
  const bun = resolveExecutable("bun");
109657
109851
  const npm = resolveExecutable("npm");
109658
- const packageManifestPath = resolve22(root, PACKAGE_REL, "package.json");
109852
+ const packageManifestPath = resolve23(root, PACKAGE_REL, "package.json");
109659
109853
  return {
109660
109854
  command: [runtime5.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
109661
109855
  root,
109662
- path: resolve22(root, PACKAGE_REL, DIST_CLI_REL),
109856
+ path: resolve23(root, PACKAGE_REL, DIST_CLI_REL),
109663
109857
  exists: runtime5.available && npm.available && pathExists(packageManifestPath),
109664
109858
  runtimeAvailable: runtime5.available
109665
109859
  };
109666
109860
  }
109667
109861
  function resolveLspCommand(options = {}) {
109668
- const pathExists = options.exists ?? existsSync55;
109862
+ const pathExists = options.exists ?? existsSync56;
109669
109863
  const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
109670
109864
  const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
109671
109865
  const candidates = moduleDirectory ? createAncestorCliCandidates({
@@ -109675,7 +109869,7 @@ function resolveLspCommand(options = {}) {
109675
109869
  sourceCliRel: SOURCE_CLI_REL,
109676
109870
  pathExists,
109677
109871
  resolveExecutable,
109678
- 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
109679
109873
  }) : [];
109680
109874
  const distCandidate = candidates.find((candidate2) => hasCliSuffix(candidate2.path, DIST_CLI_REL) && candidate2.exists);
109681
109875
  if (distCandidate) {
@@ -109689,7 +109883,7 @@ function resolveLspCommand(options = {}) {
109689
109883
  }
109690
109884
  function createLspMcpConfig(options = {}) {
109691
109885
  const resolvedCommand = resolveLspCommand(options);
109692
- const cwd = resolve22(options.cwd ?? process.cwd());
109886
+ const cwd = resolve23(options.cwd ?? process.cwd());
109693
109887
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
109694
109888
  const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
109695
109889
  return {
@@ -109698,9 +109892,9 @@ function createLspMcpConfig(options = {}) {
109698
109892
  enabled: resolvedCommand.exists,
109699
109893
  cwd,
109700
109894
  environment: {
109701
- LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve22(cwd, configPath)).join(delimiter3),
109702
- LSP_TOOLS_MCP_USER_CONFIG: resolve22(configDir, "lsp.json"),
109703
- 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"),
109704
109898
  ...sourceVersion ? {
109705
109899
  [OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
109706
109900
  [OMO_LSP_DAEMON_VERSION]: sourceVersion
@@ -109725,21 +109919,21 @@ function getInstalledLspServers(options = {}) {
109725
109919
 
109726
109920
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
109727
109921
  init_shared();
109728
- import { existsSync as existsSync56, readFileSync as readFileSync36 } from "node:fs";
109729
- import { homedir as homedir19 } from "node:os";
109730
- import { join as join82 } 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";
109731
109925
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
109732
109926
  function getMcpConfigPaths() {
109733
109927
  return [
109734
- join82(homedir19(), ".claude", ".mcp.json"),
109735
- join82(process.cwd(), ".mcp.json"),
109736
- join82(process.cwd(), ".claude", ".mcp.json")
109928
+ join84(homedir20(), ".claude", ".mcp.json"),
109929
+ join84(process.cwd(), ".mcp.json"),
109930
+ join84(process.cwd(), ".claude", ".mcp.json")
109737
109931
  ];
109738
109932
  }
109739
109933
  function loadUserMcpConfig() {
109740
109934
  const servers = {};
109741
109935
  for (const configPath of getMcpConfigPaths()) {
109742
- if (!existsSync56(configPath))
109936
+ if (!existsSync57(configPath))
109743
109937
  continue;
109744
109938
  try {
109745
109939
  const content = readFileSync36(configPath, "utf-8");
@@ -109877,12 +110071,12 @@ async function checkTools() {
109877
110071
 
109878
110072
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
109879
110073
  init_src5();
109880
- import { existsSync as existsSync57, readFileSync as readFileSync37 } from "node:fs";
110074
+ import { existsSync as existsSync58, readFileSync as readFileSync37 } from "node:fs";
109881
110075
  function isTelemetryState(value) {
109882
110076
  return value !== null && typeof value === "object" && !Array.isArray(value);
109883
110077
  }
109884
110078
  function readLastActiveDay(stateFilePath) {
109885
- if (!existsSync57(stateFilePath)) {
110079
+ if (!existsSync58(stateFilePath)) {
109886
110080
  return "never";
109887
110081
  }
109888
110082
  let parsed;
@@ -109945,17 +110139,17 @@ async function probeBinary(cmd, args, spawnImpl) {
109945
110139
  }
109946
110140
 
109947
110141
  // packages/team-core/src/team-registry/paths.ts
109948
- import { homedir as homedir20 } from "node:os";
110142
+ import { homedir as homedir21 } from "node:os";
109949
110143
  import path12 from "node:path";
109950
110144
  function resolveBaseDir(config4) {
109951
- return expandHomeDirectory(config4.base_dir ?? path12.join(homedir20(), ".omo"));
110145
+ return expandHomeDirectory(config4.base_dir ?? path12.join(homedir21(), ".omo"));
109952
110146
  }
109953
110147
  function expandHomeDirectory(directoryPath3) {
109954
110148
  if (directoryPath3 === "~") {
109955
- return homedir20();
110149
+ return homedir21();
109956
110150
  }
109957
110151
  if (directoryPath3.startsWith("~/") || directoryPath3.startsWith("~\\")) {
109958
- return path12.join(homedir20(), directoryPath3.slice(2));
110152
+ return path12.join(homedir21(), directoryPath3.slice(2));
109959
110153
  }
109960
110154
  return directoryPath3;
109961
110155
  }
@@ -110012,10 +110206,10 @@ async function pathExists(dir) {
110012
110206
 
110013
110207
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
110014
110208
  init_src2();
110015
- import { existsSync as existsSync58 } from "node:fs";
110209
+ import { existsSync as existsSync59 } from "node:fs";
110016
110210
  import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "node:fs/promises";
110017
- import { homedir as homedir21 } from "node:os";
110018
- import { basename as basename11, join as join83, 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";
110019
110213
  // packages/omo-opencode/package.json
110020
110214
  var package_default3 = {
110021
110215
  name: "@oh-my-opencode/omo-opencode",
@@ -110080,13 +110274,13 @@ var CODEX_BIN_NAMES = [
110080
110274
  "omo-git-bash-hook"
110081
110275
  ];
110082
110276
  async function gatherCodexSummary(deps = {}) {
110083
- const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join83(homedir21(), ".codex"));
110277
+ const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir22(), ".codex"));
110084
110278
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110085
110279
  const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
110086
110280
  const pluginRoot = await resolveInstalledPluginRoot(codexHome);
110087
- const manifest2 = pluginRoot === null ? null : await readJson(join83(pluginRoot, ".codex-plugin", "plugin.json"));
110088
- const installSnapshot = pluginRoot === null ? null : await readJson(join83(pluginRoot, "lazycodex-install.json"));
110089
- const configPath = join83(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");
110090
110284
  const pluginVersion = stringField(manifest2, "version");
110091
110285
  return {
110092
110286
  codexPath: detection.found && "path" in detection ? detection.path : null,
@@ -110143,7 +110337,7 @@ function buildCodexIssues(summary) {
110143
110337
  if (summary.pluginRoot === null) {
110144
110338
  issues.push({
110145
110339
  title: "OMO Codex plugin is not installed",
110146
- description: `Expected cached plugin at ${join83("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.`,
110147
110341
  fix: "Run: npx lazycodex-ai install",
110148
110342
  severity: "error",
110149
110343
  affects: ["plugin loading"]
@@ -110208,15 +110402,15 @@ function buildCodexIssues(summary) {
110208
110402
  return issues;
110209
110403
  }
110210
110404
  async function resolveInstalledPluginRoot(codexHome) {
110211
- const pluginRoot = join83(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110212
- if (!existsSync58(pluginRoot))
110405
+ const pluginRoot = join85(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110406
+ if (!existsSync59(pluginRoot))
110213
110407
  return null;
110214
110408
  const versions2 = await readdir14(pluginRoot, { withFileTypes: true });
110215
110409
  const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
110216
- return candidates.length === 0 ? null : join83(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110410
+ return candidates.length === 0 ? null : join85(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110217
110411
  }
110218
110412
  async function readCodexConfigSummary(configPath) {
110219
- if (!existsSync58(configPath)) {
110413
+ if (!existsSync59(configPath)) {
110220
110414
  return {
110221
110415
  exists: false,
110222
110416
  marketplaceConfigured: false,
@@ -110241,14 +110435,14 @@ async function readCodexConfigSummary(configPath) {
110241
110435
  async function readLinkedBins(binDir) {
110242
110436
  const linked = [];
110243
110437
  for (const name of CODEX_BIN_NAMES) {
110244
- if (await pathExists2(join83(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110438
+ if (await pathExists2(join85(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110245
110439
  linked.push(name);
110246
110440
  }
110247
110441
  return linked;
110248
110442
  }
110249
110443
  async function readLinkedAgents(codexHome) {
110250
- const agentsDir = join83(codexHome, "agents");
110251
- if (!existsSync58(agentsDir))
110444
+ const agentsDir = join85(codexHome, "agents");
110445
+ if (!existsSync59(agentsDir))
110252
110446
  return [];
110253
110447
  const entries = await readdir14(agentsDir, { withFileTypes: true });
110254
110448
  return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename11(entry.name, ".toml")).sort();
@@ -110362,8 +110556,8 @@ async function pathExists2(path14) {
110362
110556
  // packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
110363
110557
  init_src2();
110364
110558
  import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "node:fs/promises";
110365
- import { homedir as homedir22 } from "node:os";
110366
- import { dirname as dirname32, isAbsolute as isAbsolute12, join as join84, 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";
110367
110561
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
110368
110562
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
110369
110563
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
@@ -110373,7 +110567,7 @@ async function checkCodexComponents(deps = {}) {
110373
110567
  const env3 = deps.env ?? process.env;
110374
110568
  const platform = deps.platform ?? process.platform;
110375
110569
  const arch = deps.arch ?? process.arch;
110376
- const codexHome = resolve24(deps.codexHome ?? env3["CODEX_HOME"] ?? join84(homedir22(), ".codex"));
110570
+ const codexHome = resolve25(deps.codexHome ?? env3["CODEX_HOME"] ?? join86(homedir23(), ".codex"));
110377
110571
  const summary = await gatherCodexSummary({ ...deps, codexHome });
110378
110572
  if (summary.pluginRoot === null) {
110379
110573
  return {
@@ -110398,7 +110592,7 @@ async function checkCodexComponents(deps = {}) {
110398
110592
  });
110399
110593
  }
110400
110594
  const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
110401
- const runtimeSgPath = join84(runtimeSgDir, sgBinaryName(platform));
110595
+ const runtimeSgPath = join86(runtimeSgDir, sgBinaryName(platform));
110402
110596
  const sg = findSgBinarySync({
110403
110597
  arch,
110404
110598
  env: env3,
@@ -110437,8 +110631,8 @@ async function auditBundleTargets(pluginRoot) {
110437
110631
  const manifest2 = await readJson2(manifestPath);
110438
110632
  if (manifest2 === null || !isRecord12(manifest2["mcpServers"]))
110439
110633
  continue;
110440
- const manifestRoot = dirname32(manifestPath);
110441
- const isRootManifest = resolve24(manifestRoot) === resolve24(pluginRoot);
110634
+ const manifestRoot = dirname33(manifestPath);
110635
+ const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
110442
110636
  for (const server2 of Object.values(manifest2["mcpServers"])) {
110443
110637
  if (!isRecord12(server2) || !Array.isArray(server2["args"]))
110444
110638
  continue;
@@ -110458,7 +110652,7 @@ async function auditBundleTargets(pluginRoot) {
110458
110652
  continue;
110459
110653
  const commands2 = [];
110460
110654
  collectHookCommands(manifest2, commands2);
110461
- const hookPluginRoot = dirname32(dirname32(hookManifestPath));
110655
+ const hookPluginRoot = dirname33(dirname33(hookManifestPath));
110462
110656
  for (const command of commands2) {
110463
110657
  for (const relativePath of extractPluginRootPaths(command)) {
110464
110658
  referencedCount += 1;
@@ -110480,8 +110674,8 @@ function recordBrokenTarget(broken, classified, origin) {
110480
110674
  broken.push(entry);
110481
110675
  }
110482
110676
  async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEscape) {
110483
- const targetPath = resolve24(baseRoot, relativePath);
110484
- const bundleRootPath = resolve24(bundleRoot);
110677
+ const targetPath = resolve25(baseRoot, relativePath);
110678
+ const bundleRootPath = resolve25(bundleRoot);
110485
110679
  const bundleRootPrefix = bundleRootPath.endsWith(sep9) ? bundleRootPath : `${bundleRootPath}${sep9}`;
110486
110680
  if (targetPath !== bundleRootPath && !targetPath.startsWith(bundleRootPrefix)) {
110487
110681
  if (allowEscape)
@@ -110497,7 +110691,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
110497
110691
  }
110498
110692
  async function findHookManifestPaths(root) {
110499
110693
  const paths3 = await findManifestPaths(root, "hooks.json");
110500
- return paths3.filter((path14) => dirname32(path14).endsWith(`${sep9}hooks`));
110694
+ return paths3.filter((path14) => dirname33(path14).endsWith(`${sep9}hooks`));
110501
110695
  }
110502
110696
  async function findManifestPaths(root, manifestName) {
110503
110697
  let entries;
@@ -110510,7 +110704,7 @@ async function findManifestPaths(root, manifestName) {
110510
110704
  for (const entry of entries) {
110511
110705
  if (entry.name === "node_modules" || entry.name === ".git")
110512
110706
  continue;
110513
- const entryPath = join84(root, entry.name);
110707
+ const entryPath = join86(root, entry.name);
110514
110708
  if (entry.isDirectory()) {
110515
110709
  paths3.push(...await findManifestPaths(entryPath, manifestName));
110516
110710
  continue;
@@ -110554,18 +110748,18 @@ function isPluginRuntimePathArg(arg) {
110554
110748
  return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));
110555
110749
  }
110556
110750
  function runtimeSgDirectory(codexHome, platform, arch) {
110557
- return join84(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110751
+ return join86(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110558
110752
  }
110559
110753
  function describeSgSource(sgPath, env3, runtimeSgDir, platform) {
110560
110754
  const override = env3[SG_PATH_ENV_KEY]?.trim();
110561
110755
  if (override !== undefined && override.length > 0 && sgPath === override)
110562
110756
  return `env override ${SG_PATH_ENV_KEY}`;
110563
- if (sgPath === join84(runtimeSgDir, sgBinaryName(platform)))
110757
+ if (sgPath === join86(runtimeSgDir, sgBinaryName(platform)))
110564
110758
  return "runtime dir";
110565
110759
  return "PATH";
110566
110760
  }
110567
110761
  async function readBootstrapStateSummary(codexHome) {
110568
- const statePath = join84(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110762
+ const statePath = join86(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110569
110763
  const raw = await readJson2(statePath);
110570
110764
  if (raw === null)
110571
110765
  return null;
@@ -110641,24 +110835,24 @@ function isRecord12(value) {
110641
110835
  }
110642
110836
 
110643
110837
  // packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
110644
- import { existsSync as existsSync59 } from "node:fs";
110838
+ import { existsSync as existsSync60 } from "node:fs";
110645
110839
  import { readFile as readFile29 } from "node:fs/promises";
110646
- import { homedir as homedir23 } from "node:os";
110647
- import { join as join85, 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";
110648
110842
  var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
110649
110843
  var CHECK_NAME = "codex-runtime-wrapper";
110650
110844
  var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
110651
110845
  async function checkCodexRuntimeWrapper(deps = {}) {
110652
- const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir23(), ".codex"));
110846
+ const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join87(homedir24(), ".codex"));
110653
110847
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110654
110848
  const platform = deps.platform ?? process.platform;
110655
- const wrapperPath = join85(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110656
- const legacyWrapperPath = join85(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");
110657
110851
  const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
110658
110852
  const issues = [];
110659
110853
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
110660
110854
  const targetPath = parseRuntimeTargetPath(wrapper);
110661
- if (targetPath !== null && !existsSync59(targetPath)) {
110855
+ if (targetPath !== null && !existsSync60(targetPath)) {
110662
110856
  issues.push({
110663
110857
  title: "omo-agent-toolkit runtime wrapper target is missing",
110664
110858
  description: `Generated omo-agent-toolkit runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
@@ -111173,7 +111367,7 @@ Doctor failed unexpectedly: ${message}`];
111173
111367
  import { createHash as createHash6 } from "node:crypto";
111174
111368
  import {
111175
111369
  chmodSync as chmodSync5,
111176
- existsSync as existsSync62,
111370
+ existsSync as existsSync63,
111177
111371
  mkdirSync as mkdirSync15,
111178
111372
  readdirSync as readdirSync11,
111179
111373
  readFileSync as readFileSync39,
@@ -111181,15 +111375,15 @@ import {
111181
111375
  unlinkSync as unlinkSync9,
111182
111376
  writeFileSync as writeFileSync12
111183
111377
  } from "node:fs";
111184
- import { basename as basename12, dirname as dirname33, join as join88 } from "node:path";
111378
+ import { basename as basename12, dirname as dirname34, join as join90 } from "node:path";
111185
111379
 
111186
111380
  // packages/mcp-client-core/src/config-dir.ts
111187
- import { existsSync as existsSync60, realpathSync as realpathSync8 } from "node:fs";
111188
- import { homedir as homedir24 } from "node:os";
111189
- import { join as join86, 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";
111190
111384
  function resolveConfigPath2(pathValue) {
111191
- const resolvedPath = resolve26(pathValue);
111192
- if (!existsSync60(resolvedPath))
111385
+ const resolvedPath = resolve27(pathValue);
111386
+ if (!existsSync61(resolvedPath))
111193
111387
  return resolvedPath;
111194
111388
  try {
111195
111389
  return realpathSync8(resolvedPath);
@@ -111204,13 +111398,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {
111204
111398
  if (customConfigDir) {
111205
111399
  return resolveConfigPath2(customConfigDir);
111206
111400
  }
111207
- const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join86(homedir24(), ".config");
111208
- return resolveConfigPath2(join86(xdgConfigDir, "opencode"));
111401
+ const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join88(homedir25(), ".config");
111402
+ return resolveConfigPath2(join88(xdgConfigDir, "opencode"));
111209
111403
  }
111210
111404
 
111211
111405
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
111212
- import { chmodSync as chmodSync4, existsSync as existsSync61, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "node:fs";
111213
- import { join as join87 } 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";
111214
111408
  var INDEX_FILE_NAME = "index.json";
111215
111409
  function isTokenIndex(value) {
111216
111410
  if (typeof value !== "object" || value === null || Array.isArray(value))
@@ -111218,11 +111412,11 @@ function isTokenIndex(value) {
111218
111412
  return Object.values(value).every((entry) => typeof entry === "string");
111219
111413
  }
111220
111414
  function getIndexPath(storageDir) {
111221
- return join87(storageDir, INDEX_FILE_NAME);
111415
+ return join89(storageDir, INDEX_FILE_NAME);
111222
111416
  }
111223
111417
  function readTokenIndex(storageDir) {
111224
111418
  const indexPath = getIndexPath(storageDir);
111225
- if (!existsSync61(indexPath))
111419
+ if (!existsSync62(indexPath))
111226
111420
  return {};
111227
111421
  try {
111228
111422
  const parsed = JSON.parse(readFileSync38(indexPath, "utf-8"));
@@ -111262,16 +111456,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {
111262
111456
  var STORAGE_DIR_NAME = "mcp-oauth";
111263
111457
  var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
111264
111458
  function getMcpOauthStorageDir() {
111265
- return join88(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111459
+ return join90(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111266
111460
  }
111267
111461
  function getMcpOauthServerHash(serverHost, resource) {
111268
111462
  return createHash6("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
111269
111463
  }
111270
111464
  function getMcpOauthStoragePath(serverHost, resource) {
111271
- return join88(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111465
+ return join90(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111272
111466
  }
111273
111467
  function getLegacyStoragePath() {
111274
- return join88(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111468
+ return join90(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111275
111469
  }
111276
111470
  function normalizeHost2(serverHost) {
111277
111471
  let host = serverHost.trim();
@@ -111332,7 +111526,7 @@ function isOAuthTokenData(value) {
111332
111526
  return clientSecret === undefined || typeof clientSecret === "string";
111333
111527
  }
111334
111528
  function readTokenFile(filePath) {
111335
- if (!existsSync62(filePath))
111529
+ if (!existsSync63(filePath))
111336
111530
  return null;
111337
111531
  try {
111338
111532
  const parsed = JSON.parse(readFileSync39(filePath, "utf-8"));
@@ -111345,7 +111539,7 @@ function readTokenFile(filePath) {
111345
111539
  }
111346
111540
  function readLegacyStore() {
111347
111541
  const filePath = getLegacyStoragePath();
111348
- if (!existsSync62(filePath))
111542
+ if (!existsSync63(filePath))
111349
111543
  return null;
111350
111544
  try {
111351
111545
  const parsed = JSON.parse(readFileSync39(filePath, "utf-8"));
@@ -111365,8 +111559,8 @@ function readLegacyStore() {
111365
111559
  }
111366
111560
  function writeTokenFile(filePath, token) {
111367
111561
  try {
111368
- const dir = dirname33(filePath);
111369
- if (!existsSync62(dir)) {
111562
+ const dir = dirname34(filePath);
111563
+ if (!existsSync63(dir)) {
111370
111564
  mkdirSync15(dir, { recursive: true });
111371
111565
  }
111372
111566
  const tempPath = `${filePath}.tmp.${Date.now()}`;
@@ -111390,7 +111584,7 @@ function saveToken(serverHost, resource, token) {
111390
111584
  }
111391
111585
  function deleteToken(serverHost, resource) {
111392
111586
  const filePath = getMcpOauthStoragePath(serverHost, resource);
111393
- if (!existsSync62(filePath))
111587
+ if (!existsSync63(filePath))
111394
111588
  return deleteLegacyToken(serverHost, resource);
111395
111589
  try {
111396
111590
  unlinkSync9(filePath);
@@ -111412,7 +111606,7 @@ function deleteLegacyToken(serverHost, resource) {
111412
111606
  if (Object.keys(store2).length === 0) {
111413
111607
  try {
111414
111608
  const filePath = getLegacyStoragePath();
111415
- if (existsSync62(filePath))
111609
+ if (existsSync63(filePath))
111416
111610
  unlinkSync9(filePath);
111417
111611
  return true;
111418
111612
  } catch (deleteError) {
@@ -111450,7 +111644,7 @@ function listTokensByHost(serverHost) {
111450
111644
  for (const [hash2, indexedKey] of Object.entries(index)) {
111451
111645
  if (!indexedKey.startsWith(prefix))
111452
111646
  continue;
111453
- const indexedToken = readTokenFile(join88(getMcpOauthStorageDir(), `${hash2}.json`));
111647
+ const indexedToken = readTokenFile(join90(getMcpOauthStorageDir(), `${hash2}.json`));
111454
111648
  if (indexedToken)
111455
111649
  result[indexedKey] = indexedToken;
111456
111650
  }
@@ -111459,13 +111653,13 @@ function listTokensByHost(serverHost) {
111459
111653
  function listAllTokens() {
111460
111654
  const result = { ...readLegacyStore() ?? {} };
111461
111655
  const dir = getMcpOauthStorageDir();
111462
- if (!existsSync62(dir))
111656
+ if (!existsSync63(dir))
111463
111657
  return result;
111464
111658
  const index = readTokenIndex(dir);
111465
111659
  for (const entry of readdirSync11(dir, { withFileTypes: true })) {
111466
111660
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
111467
111661
  continue;
111468
- const token = readTokenFile(join88(dir, entry.name));
111662
+ const token = readTokenFile(join90(dir, entry.name));
111469
111663
  const hash2 = basename12(entry.name, ".json");
111470
111664
  if (token)
111471
111665
  result[index[hash2] ?? hash2] = token;
@@ -111665,7 +111859,7 @@ function buildAuthorizationUrl(authorizationEndpoint, options) {
111665
111859
  }
111666
111860
  var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
111667
111861
  function startCallbackServer(port) {
111668
- return new Promise((resolve27, reject) => {
111862
+ return new Promise((resolve28, reject) => {
111669
111863
  let timeoutId;
111670
111864
  const server2 = createServer2((request, response) => {
111671
111865
  clearTimeout(timeoutId);
@@ -111691,7 +111885,7 @@ function startCallbackServer(port) {
111691
111885
  response.writeHead(200, { "content-type": "text/html" });
111692
111886
  response.end("<html><body><h1>Authorization successful. You can close this tab.</h1></body></html>");
111693
111887
  server2.close();
111694
- resolve27({ code, state: state2 });
111888
+ resolve28({ code, state: state2 });
111695
111889
  });
111696
111890
  timeoutId = setTimeout(() => {
111697
111891
  server2.close();
@@ -112031,7 +112225,7 @@ function createMcpOAuthCommand() {
112031
112225
  }
112032
112226
 
112033
112227
  // packages/omo-opencode/src/cli/boulder/boulder.ts
112034
- import { existsSync as existsSync63 } from "node:fs";
112228
+ import { existsSync as existsSync64 } from "node:fs";
112035
112229
 
112036
112230
  // packages/omo-opencode/src/cli/boulder/formatter.ts
112037
112231
  var import_picocolors22 = __toESM(require_picocolors(), 1);
@@ -112168,10 +112362,10 @@ async function boulder(options) {
112168
112362
  const boulderFilePath = getBoulderFilePath(directory);
112169
112363
  const state2 = readBoulderState(directory);
112170
112364
  if (!state2) {
112171
- const message = existsSync63(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112365
+ const message = existsSync64(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112172
112366
  process.stderr.write(`${message}
112173
112367
  `);
112174
- return existsSync63(boulderFilePath) ? 2 : 1;
112368
+ return existsSync64(boulderFilePath) ? 2 : 1;
112175
112369
  }
112176
112370
  const works = getBoulderWorks(state2);
112177
112371
  const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
@@ -112189,12 +112383,12 @@ async function boulder(options) {
112189
112383
  }
112190
112384
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
112191
112385
  import { spawn as spawn5 } from "node:child_process";
112192
- import { existsSync as existsSync64, readFileSync as readFileSync40, realpathSync as realpathSync9 } from "node:fs";
112193
- 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";
112194
112388
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
112195
112389
  function resolveCodexUlwLoopCommand(input = {}) {
112196
112390
  const env3 = input.env ?? process.env;
112197
- const homeDir = input.homeDir ?? homedir25();
112391
+ const homeDir = input.homeDir ?? homedir26();
112198
112392
  const localComponentBin = resolveLocalUlwLoopBin(env3, homeDir);
112199
112393
  if (localComponentBin !== null)
112200
112394
  return { executable: localComponentBin, argsPrefix: [] };
@@ -112217,25 +112411,25 @@ async function codexUlwLoop(args) {
112217
112411
  console.error("Codex ulw-loop is not installed. Run: npx lazycodex-ai@latest install --no-tui");
112218
112412
  return 1;
112219
112413
  }
112220
- const { promise: promise2, resolve: resolve27 } = Promise.withResolvers();
112414
+ const { promise: promise2, resolve: resolve28 } = Promise.withResolvers();
112221
112415
  const child = spawn5(command.executable, [...command.argsPrefix, ...args], {
112222
112416
  stdio: "inherit",
112223
112417
  env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }
112224
112418
  });
112225
112419
  child.on("error", (error51) => {
112226
112420
  console.error(error51.message);
112227
- resolve27(1);
112421
+ resolve28(1);
112228
112422
  });
112229
- child.on("close", (code) => resolve27(code ?? 1));
112423
+ child.on("close", (code) => resolve28(code ?? 1));
112230
112424
  return promise2;
112231
112425
  }
112232
112426
  function resolveLocalUlwLoopBin(env3, homeDir) {
112233
112427
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env: env3, homeDir });
112234
- return candidates.find((candidate2) => existsSync64(candidate2)) ?? null;
112428
+ return candidates.find((candidate2) => existsSync65(candidate2)) ?? null;
112235
112429
  }
112236
112430
  function resolveLegacyLocalOmoBin(env3, homeDir, currentExecutablePaths) {
112237
112431
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env: env3, homeDir });
112238
- 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;
112239
112433
  }
112240
112434
  function isGeneratedRuntimeWrapper(candidate2) {
112241
112435
  try {