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
package/dist/cli/index.js CHANGED
@@ -2145,7 +2145,7 @@ var package_default;
2145
2145
  var init_package = __esm(() => {
2146
2146
  package_default = {
2147
2147
  name: "oh-my-opencode",
2148
- version: "5.0.0-beta.6",
2148
+ version: "5.0.0-beta.8",
2149
2149
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2150
2150
  main: "./dist/index.js",
2151
2151
  types: "dist/index.d.ts",
@@ -2325,7 +2325,7 @@ var init_package = __esm(() => {
2325
2325
  zod: "^4.4.3"
2326
2326
  },
2327
2327
  devDependencies: {
2328
- "@code-yeongyu/senpi": "2026.8.11-4",
2328
+ "@code-yeongyu/senpi": "2026.8.16",
2329
2329
  "@oh-my-opencode/agents-md-core": "workspace:*",
2330
2330
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
2331
2331
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -2357,7 +2357,7 @@ var init_package = __esm(() => {
2357
2357
  "@oh-my-opencode/utils": "workspace:*",
2358
2358
  "@types/js-yaml": "^4.0.9",
2359
2359
  "@types/picomatch": "^4.0.3",
2360
- "@typescript/native-preview": "7.0.0-dev.20260518.1",
2360
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
2361
2361
  "@xterm/addon-unicode11": "^0.9.0",
2362
2362
  "@xterm/xterm": "^6.0.0",
2363
2363
  "bun-types": "1.3.14",
@@ -2366,24 +2366,24 @@ var init_package = __esm(() => {
2366
2366
  typescript: "^7.0.2"
2367
2367
  },
2368
2368
  optionalDependencies: {
2369
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.6",
2370
- "oh-my-opencode-darwin-x64": "5.0.0-beta.6",
2371
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.6",
2372
- "oh-my-opencode-linux-arm64": "5.0.0-beta.6",
2373
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.6",
2374
- "oh-my-opencode-linux-x64": "5.0.0-beta.6",
2375
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.6",
2376
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.6",
2377
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.6",
2378
- "oh-my-opencode-windows-arm64": "5.0.0-beta.6",
2379
- "oh-my-opencode-windows-x64": "5.0.0-beta.6",
2380
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.6"
2369
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.8",
2370
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.8",
2371
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.8",
2372
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.8",
2373
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.8",
2374
+ "oh-my-opencode-linux-x64": "5.0.0-beta.8",
2375
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.8",
2376
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.8",
2377
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.8",
2378
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.8",
2379
+ "oh-my-opencode-windows-x64": "5.0.0-beta.8",
2380
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.8"
2381
2381
  },
2382
2382
  overrides: {
2383
- "@earendil-works/pi-agent-core": "0.80.3",
2384
- "@earendil-works/pi-ai": "0.80.3",
2385
- "@earendil-works/pi-coding-agent": "0.80.3",
2386
- "@earendil-works/pi-tui": "0.80.3",
2383
+ "@earendil-works/pi-agent-core": "0.84.2",
2384
+ "@earendil-works/pi-ai": "0.84.2",
2385
+ "@earendil-works/pi-coding-agent": "0.84.2",
2386
+ "@earendil-works/pi-tui": "0.84.2",
2387
2387
  hono: "^4.12.18",
2388
2388
  "@hono/node-server": "^1.19.13",
2389
2389
  "express-rate-limit": "^8.5.1",
@@ -22405,15 +22405,16 @@ var init_codegraph = __esm(() => {
22405
22405
  });
22406
22406
 
22407
22407
  // packages/omo-config-core/src/schema/memory.ts
22408
- var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
22408
+ var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryNudgeSchema, OmoMemoryFactsSchema, OmoMemoryDreamSchema, OmoMemoryPeopleSchema, OmoMemorySoulSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryNudgeLayerSchema, OmoMemoryFactsLayerSchema, OmoMemoryDreamLayerSchema, OmoMemoryPeopleLayerSchema, OmoMemorySoulLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
22409
22409
  var init_memory = __esm(() => {
22410
22410
  init_zod();
22411
22411
  OmoMemoryReflectionTriggerSchema = object({
22412
- step_count: number2().int().nonnegative().default(0),
22412
+ step_count: number2().int().nonnegative().default(25),
22413
22413
  on_compaction: boolean2().default(true)
22414
22414
  }).strict();
22415
22415
  OmoMemoryReflectionSchema = object({
22416
- trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 0, on_compaction: true }),
22416
+ enabled: boolean2().default(true),
22417
+ trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 25, on_compaction: true }),
22417
22418
  merge: _enum2(["auto", "integration"]).default("auto"),
22418
22419
  category: string2().min(1).default("quick"),
22419
22420
  timeout_minutes: number2().int().positive().default(15),
@@ -22426,11 +22427,36 @@ var init_memory = __esm(() => {
22426
22427
  OmoMemorySearchSchema = object({
22427
22428
  enabled: boolean2().default(true)
22428
22429
  }).strict();
22430
+ OmoMemoryNudgeSchema = object({
22431
+ enabled: boolean2().default(true),
22432
+ every_user_turns: number2().int().min(1).default(10)
22433
+ }).strict();
22434
+ OmoMemoryFactsSchema = object({
22435
+ enabled: boolean2().default(true),
22436
+ debounce_settles: number2().int().min(1).default(4)
22437
+ }).strict();
22438
+ OmoMemoryDreamSchema = object({
22439
+ enabled: boolean2().default(true),
22440
+ idle_minutes: number2().int().min(0).default(30),
22441
+ min_hours_between: number2().int().min(1).default(24),
22442
+ shutdown_launch: boolean2().default(true),
22443
+ auto_select_max: number2().int().min(1).max(10).default(5),
22444
+ auto_select_max_chars: number2().int().min(1e4).default(150000)
22445
+ }).strict();
22446
+ OmoMemoryPeopleSchema = object({
22447
+ enabled: boolean2().default(true),
22448
+ max_entries: number2().int().min(1).max(100).default(40),
22449
+ max_entry_chars: number2().int().min(50).max(500).default(200)
22450
+ }).strict();
22451
+ OmoMemorySoulSchema = object({
22452
+ edit_notice: boolean2().default(true)
22453
+ }).strict();
22429
22454
  OmoMemoryReflectionTriggerLayerSchema = object({
22430
22455
  step_count: number2().int().nonnegative().optional(),
22431
22456
  on_compaction: boolean2().optional()
22432
22457
  }).strict();
22433
22458
  OmoMemoryReflectionLayerSchema = object({
22459
+ enabled: boolean2().optional(),
22434
22460
  trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
22435
22461
  merge: _enum2(["auto", "integration"]).optional(),
22436
22462
  category: string2().min(1).optional(),
@@ -22444,10 +22470,39 @@ var init_memory = __esm(() => {
22444
22470
  OmoMemorySearchLayerSchema = object({
22445
22471
  enabled: boolean2().optional()
22446
22472
  }).strict();
22473
+ OmoMemoryNudgeLayerSchema = object({
22474
+ enabled: boolean2().optional(),
22475
+ every_user_turns: number2().int().min(1).optional()
22476
+ }).strict();
22477
+ OmoMemoryFactsLayerSchema = object({
22478
+ enabled: boolean2().optional(),
22479
+ debounce_settles: number2().int().min(1).optional()
22480
+ }).strict();
22481
+ OmoMemoryDreamLayerSchema = object({
22482
+ enabled: boolean2().optional(),
22483
+ idle_minutes: number2().int().min(0).optional(),
22484
+ min_hours_between: number2().int().min(1).optional(),
22485
+ shutdown_launch: boolean2().optional(),
22486
+ auto_select_max: number2().int().min(1).max(10).optional(),
22487
+ auto_select_max_chars: number2().int().min(1e4).optional()
22488
+ }).strict();
22489
+ OmoMemoryPeopleLayerSchema = object({
22490
+ enabled: boolean2().optional(),
22491
+ max_entries: number2().int().min(1).max(100).optional(),
22492
+ max_entry_chars: number2().int().min(50).max(500).optional()
22493
+ }).strict();
22494
+ OmoMemorySoulLayerSchema = object({
22495
+ edit_notice: boolean2().optional()
22496
+ }).strict();
22447
22497
  OmoMemoryAgentOverridesSchema = object({
22448
22498
  enabled: boolean2().optional(),
22449
22499
  agent: string2().min(1).optional(),
22450
22500
  reflection: OmoMemoryReflectionLayerSchema.optional(),
22501
+ nudge: OmoMemoryNudgeLayerSchema.optional(),
22502
+ facts: OmoMemoryFactsLayerSchema.optional(),
22503
+ dream: OmoMemoryDreamLayerSchema.optional(),
22504
+ people: OmoMemoryPeopleLayerSchema.optional(),
22505
+ soul: OmoMemorySoulLayerSchema.optional(),
22451
22506
  sync: OmoMemorySyncLayerSchema.optional(),
22452
22507
  search: OmoMemorySearchLayerSchema.optional(),
22453
22508
  compile_warn_tokens: number2().int().positive().optional()
@@ -22457,12 +22512,25 @@ var init_memory = __esm(() => {
22457
22512
  agent: string2().min(1).default("auto"),
22458
22513
  tool_exposure: _enum2(["direct", "search"]).default("direct"),
22459
22514
  reflection: OmoMemoryReflectionSchema.default({
22460
- trigger: { step_count: 0, on_compaction: true },
22515
+ enabled: true,
22516
+ trigger: { step_count: 25, on_compaction: true },
22461
22517
  merge: "auto",
22462
22518
  category: "quick",
22463
22519
  timeout_minutes: 15,
22464
22520
  sandbox: "auto"
22465
22521
  }),
22522
+ nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
22523
+ facts: OmoMemoryFactsSchema.default({ enabled: true, debounce_settles: 4 }),
22524
+ dream: OmoMemoryDreamSchema.default({
22525
+ enabled: true,
22526
+ idle_minutes: 30,
22527
+ min_hours_between: 24,
22528
+ shutdown_launch: true,
22529
+ auto_select_max: 5,
22530
+ auto_select_max_chars: 150000
22531
+ }),
22532
+ people: OmoMemoryPeopleSchema.default({ enabled: true, max_entries: 40, max_entry_chars: 200 }),
22533
+ soul: OmoMemorySoulSchema.default({ edit_notice: true }),
22466
22534
  sync: OmoMemorySyncSchema.default({ enabled: true }),
22467
22535
  search: OmoMemorySearchSchema.default({ enabled: true }),
22468
22536
  compile_warn_tokens: number2().int().positive().default(30000),
@@ -22473,6 +22541,11 @@ var init_memory = __esm(() => {
22473
22541
  agent: string2().min(1).optional(),
22474
22542
  tool_exposure: _enum2(["direct", "search"]).optional(),
22475
22543
  reflection: OmoMemoryReflectionLayerSchema.optional(),
22544
+ nudge: OmoMemoryNudgeLayerSchema.optional(),
22545
+ facts: OmoMemoryFactsLayerSchema.optional(),
22546
+ dream: OmoMemoryDreamLayerSchema.optional(),
22547
+ people: OmoMemoryPeopleLayerSchema.optional(),
22548
+ soul: OmoMemorySoulLayerSchema.optional(),
22476
22549
  sync: OmoMemorySyncLayerSchema.optional(),
22477
22550
  search: OmoMemorySearchLayerSchema.optional(),
22478
22551
  compile_warn_tokens: number2().int().positive().optional(),
@@ -22511,7 +22584,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
22511
22584
  residency_max_children: record2["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
22512
22585
  });
22513
22586
  }
22514
- var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskSettingsSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
22587
+ var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskDagSettingsSchema, OmoTaskSettingsSchema, OmoTaskDagSettingsLayerSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
22515
22588
  var init_task = __esm(() => {
22516
22589
  init_zod();
22517
22590
  ResidencyMaxChildrenInputSchema = union([number2().int().positive(), literal("unlimited")]);
@@ -22528,6 +22601,16 @@ var init_task = __esm(() => {
22528
22601
  OmoTaskWarningsSchema = object({
22529
22602
  unavailable_categories: boolean2().default(true)
22530
22603
  }).strict();
22604
+ OmoTaskDagSettingsSchema = object({
22605
+ max_nodes_per_run: number2().int().positive().default(64),
22606
+ max_runs_per_session: number2().int().positive().default(16),
22607
+ subscriber_ring: number2().int().positive().default(1000),
22608
+ heartbeat_ms: number2().int().positive().default(15000),
22609
+ history_default_limit: number2().int().positive().default(256),
22610
+ history_max_limit: number2().int().positive().default(1000),
22611
+ retention_days: number2().int().positive().default(7),
22612
+ max_prompt_bytes: number2().int().positive().default(262144)
22613
+ }).strict();
22531
22614
  OmoTaskSettingsSchema = object({
22532
22615
  default_execution_mode: _enum2(["in-process", "process"]).default("in-process"),
22533
22616
  default_concurrency: number2().int().positive().default(5),
@@ -22545,7 +22628,18 @@ var init_task = __esm(() => {
22545
22628
  max_members: 8,
22546
22629
  max_parallel_members: 4,
22547
22630
  max_wall_clock_minutes: 120
22548
- })
22631
+ }),
22632
+ dag: OmoTaskDagSettingsSchema.optional()
22633
+ }).strict();
22634
+ OmoTaskDagSettingsLayerSchema = object({
22635
+ max_nodes_per_run: number2().int().positive().optional(),
22636
+ max_runs_per_session: number2().int().positive().optional(),
22637
+ subscriber_ring: number2().int().positive().optional(),
22638
+ heartbeat_ms: number2().int().positive().optional(),
22639
+ history_default_limit: number2().int().positive().optional(),
22640
+ history_max_limit: number2().int().positive().optional(),
22641
+ retention_days: number2().int().positive().optional(),
22642
+ max_prompt_bytes: number2().int().positive().optional()
22549
22643
  }).strict();
22550
22644
  OmoTaskWaitLayerSchema = object({
22551
22645
  min_ms: number2().int().positive().optional(),
@@ -22573,7 +22667,8 @@ var init_task = __esm(() => {
22573
22667
  resume_children: boolean2().optional(),
22574
22668
  warnings: OmoTaskWarningsLayerSchema.optional(),
22575
22669
  wait: OmoTaskWaitLayerSchema.optional(),
22576
- team: OmoTaskTeamSettingsLayerSchema.optional()
22670
+ team: OmoTaskTeamSettingsLayerSchema.optional(),
22671
+ dag: OmoTaskDagSettingsLayerSchema.optional()
22577
22672
  }).strict();
22578
22673
  });
22579
22674
 
@@ -26398,10 +26493,10 @@ var init_category_model_requirements = __esm(() => {
26398
26493
  quick: {
26399
26494
  fallbackChain: [
26400
26495
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed" },
26401
- { providers: ["quotio-openai"], model: "gpt-5.6-luna-fast", variant: "low" },
26496
+ { providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
26402
26497
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
26403
26498
  {
26404
- providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "opencode-go", "vercel"],
26499
+ providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "vercel"],
26405
26500
  model: "qwen3.6-flash",
26406
26501
  variant: "low"
26407
26502
  },
@@ -26417,6 +26512,11 @@ var init_category_model_requirements = __esm(() => {
26417
26512
  },
26418
26513
  "unspecified-low": {
26419
26514
  fallbackChain: [
26515
+ {
26516
+ providers: ["xai", "github-copilot", "opencode", "vercel"],
26517
+ model: "grok-4.6",
26518
+ variant: "xhigh"
26519
+ },
26420
26520
  {
26421
26521
  providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
26422
26522
  model: "gpt-5.6-terra",
@@ -27651,6 +27751,7 @@ var init_context_limit_resolver2 = () => {};
27651
27751
 
27652
27752
  // packages/omo-opencode/src/shared/normalize-sdk-response.ts
27653
27753
  function normalizeSDKResponse(response, fallback, options) {
27754
+ const fallbackIsArray = Array.isArray(fallback);
27654
27755
  if (response == null) {
27655
27756
  return fallback;
27656
27757
  }
@@ -27660,14 +27761,17 @@ function normalizeSDKResponse(response, fallback, options) {
27660
27761
  if (typeof response === "object" && "data" in response) {
27661
27762
  const data = response.data;
27662
27763
  if (data != null) {
27764
+ if (fallbackIsArray && !Array.isArray(data)) {
27765
+ return fallback;
27766
+ }
27663
27767
  return data;
27664
27768
  }
27665
- if (options?.preferResponseOnMissingData === true) {
27769
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
27666
27770
  return response;
27667
27771
  }
27668
27772
  return fallback;
27669
27773
  }
27670
- if (options?.preferResponseOnMissingData === true) {
27774
+ if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
27671
27775
  return response;
27672
27776
  }
27673
27777
  return fallback;
@@ -28147,7 +28251,7 @@ This is NOT a default choice - it's for genuinely unclassifiable moderate-effort
28147
28251
  </Category_Context>
28148
28252
 
28149
28253
  <Caller_Warning>
28150
- THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
28254
+ THIS CATEGORY USES GROK 4.6 (xhigh).
28151
28255
 
28152
28256
  **PROVIDE CLEAR STRUCTURE:**
28153
28257
  1. MUST DO: Enumerate required actions explicitly
@@ -28179,7 +28283,7 @@ var init_openai_categories = __esm(() => {
28179
28283
  },
28180
28284
  {
28181
28285
  name: "unspecified-low",
28182
- config: { model: "openai/gpt-5.6-luna", variant: "xhigh" },
28286
+ config: { model: "xai/grok-4.6", variant: "xhigh" },
28183
28287
  description: "Tasks that don't fit other categories, low effort required",
28184
28288
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
28185
28289
  }
@@ -83076,6 +83180,47 @@ var init_model_capabilities_generated = __esm(() => {
83076
83180
  input: 272000,
83077
83181
  output: 128000
83078
83182
  }
83183
+ },
83184
+ "grok-4.6": {
83185
+ id: "grok-4.6",
83186
+ family: "grok",
83187
+ reasoning: true,
83188
+ temperature: true,
83189
+ toolCall: true,
83190
+ modalities: {
83191
+ input: [
83192
+ "text",
83193
+ "image"
83194
+ ],
83195
+ output: [
83196
+ "text"
83197
+ ]
83198
+ },
83199
+ limit: {
83200
+ context: 500000,
83201
+ output: 500000
83202
+ }
83203
+ },
83204
+ "xai/grok-4.6": {
83205
+ id: "xai/grok-4.6",
83206
+ family: "grok",
83207
+ reasoning: true,
83208
+ temperature: true,
83209
+ toolCall: true,
83210
+ modalities: {
83211
+ input: [
83212
+ "text",
83213
+ "image",
83214
+ "pdf"
83215
+ ],
83216
+ output: [
83217
+ "text"
83218
+ ]
83219
+ },
83220
+ limit: {
83221
+ context: 500000,
83222
+ output: 500000
83223
+ }
83079
83224
  }
83080
83225
  }
83081
83226
  };
@@ -94484,7 +94629,7 @@ var package_default2;
94484
94629
  var init_package2 = __esm(() => {
94485
94630
  package_default2 = {
94486
94631
  name: "@oh-my-opencode/omo-codex",
94487
- version: "5.0.0-beta.6",
94632
+ version: "5.0.0-beta.8",
94488
94633
  type: "module",
94489
94634
  private: true,
94490
94635
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -95453,20 +95598,20 @@ var init_update_toasts = __esm(() => {
95453
95598
  });
95454
95599
 
95455
95600
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
95456
- import { existsSync as existsSync47 } from "fs";
95457
- import { dirname as dirname29, join as join74 } from "path";
95601
+ import { existsSync as existsSync48 } from "fs";
95602
+ import { dirname as dirname30, join as join76 } from "path";
95458
95603
  import { fileURLToPath as fileURLToPath5 } from "url";
95459
95604
  function defaultGetModuleHostingWorkspace() {
95460
95605
  try {
95461
- const currentDir = dirname29(fileURLToPath5(import.meta.url));
95606
+ const currentDir = dirname30(fileURLToPath5(import.meta.url));
95462
95607
  const pkgJsonPath = findPackageJsonUp(currentDir);
95463
95608
  if (!pkgJsonPath)
95464
95609
  return null;
95465
- const pkgDir = dirname29(pkgJsonPath);
95466
- const nodeModulesDir = dirname29(pkgDir);
95610
+ const pkgDir = dirname30(pkgJsonPath);
95611
+ const nodeModulesDir = dirname30(pkgDir);
95467
95612
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
95468
95613
  return null;
95469
- return dirname29(nodeModulesDir);
95614
+ return dirname30(nodeModulesDir);
95470
95615
  } catch (error51) {
95471
95616
  if (error51 instanceof Error) {
95472
95617
  return null;
@@ -95607,8 +95752,8 @@ var init_background_update_check = __esm(() => {
95607
95752
  init_package_json_locator();
95608
95753
  init_update_toasts();
95609
95754
  defaultDeps4 = {
95610
- existsSync: existsSync47,
95611
- join: join74,
95755
+ existsSync: existsSync48,
95756
+ join: join76,
95612
95757
  runBunInstallWithDetails,
95613
95758
  log: log2,
95614
95759
  getOpenCodeCacheDir,
@@ -95771,7 +95916,7 @@ async function showSpinnerToast(ctx, version3, message) {
95771
95916
  duration: frameInterval + 50
95772
95917
  }
95773
95918
  }).catch(ignoreToastError);
95774
- await new Promise((resolve21) => setTimeout(resolve21, frameInterval));
95919
+ await new Promise((resolve22) => setTimeout(resolve22, frameInterval));
95775
95920
  }
95776
95921
  }
95777
95922
  var SISYPHUS_SPINNER;
@@ -101383,31 +101528,55 @@ function nodeErrorCode6(error51) {
101383
101528
  var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
101384
101529
  // packages/omo-senpi/src/install/install-senpi.ts
101385
101530
  import { execFile as execFile4 } from "child_process";
101386
- import { createHash as createHash5 } from "crypto";
101387
- import { constants as constants8, existsSync as existsSync31 } from "fs";
101388
- import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
101389
- import { homedir as homedir10 } from "os";
101390
- import { dirname as dirname23, join as join61, resolve as resolve19 } from "path";
101531
+ import { existsSync as existsSync32 } from "fs";
101532
+ import { homedir as homedir11 } from "os";
101533
+ import { dirname as dirname24, join as join63, resolve as resolve20 } from "path";
101391
101534
  import { fileURLToPath } from "url";
101392
101535
  import { promisify as promisify2 } from "util";
101393
101536
 
101394
- // packages/omo-senpi/src/install/local-launcher.ts
101395
- import { chmodSync as chmodSync3, existsSync as existsSync30, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "fs";
101537
+ // packages/omo-senpi/src/components/agent-home/resolve-agent-home.ts
101538
+ import { existsSync as existsSync30 } from "fs";
101396
101539
  import { homedir as homedir9 } from "os";
101397
- import { dirname as dirname21, join as join59, resolve as resolve17 } from "path";
101540
+ import { join as join59, resolve as resolve17 } from "path";
101541
+ var AGENT_DIR_ENV_NAMES = [
101542
+ "OMO_CODING_AGENT_DIR",
101543
+ "SENPI_CODING_AGENT_DIR",
101544
+ "PI_CODING_AGENT_DIR"
101545
+ ];
101546
+ var AGENT_HOME_SENTINEL = "settings.json";
101547
+ function resolveAgentHome(options) {
101548
+ const { env: env3, homeDir = homedir9(), exists: exists7 = existsSync30 } = options;
101549
+ for (const name of AGENT_DIR_ENV_NAMES) {
101550
+ const configured = env3[name]?.trim();
101551
+ if (configured)
101552
+ return resolve17(configured);
101553
+ }
101554
+ const brandedHome = join59(homeDir, ".omo");
101555
+ const canonical = join59(brandedHome, "agent");
101556
+ if (exists7(join59(canonical, AGENT_HOME_SENTINEL)))
101557
+ return canonical;
101558
+ if (exists7(join59(brandedHome, AGENT_HOME_SENTINEL)))
101559
+ return brandedHome;
101560
+ return join59(homeDir, ".senpi", "agent");
101561
+ }
101562
+
101563
+ // packages/omo-senpi/src/install/local-launcher.ts
101564
+ import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "fs";
101565
+ import { homedir as homedir10 } from "os";
101566
+ import { dirname as dirname21, join as join60, resolve as resolve18 } from "path";
101398
101567
  var MARKER = "omo-local-launcher";
101399
- function localLauncherPath(homeDir = homedir9()) {
101400
- return join59(homeDir, ".local", "bin", "omo");
101568
+ function localLauncherPath(homeDir = homedir10()) {
101569
+ return join60(homeDir, ".local", "bin", "omo");
101401
101570
  }
101402
- function localLauncherCmdPath(homeDir = homedir9()) {
101403
- return join59(homeDir, ".local", "bin", "omo.cmd");
101571
+ function localLauncherCmdPath(homeDir = homedir10()) {
101572
+ return join60(homeDir, ".local", "bin", "omo.cmd");
101404
101573
  }
101405
101574
  function renderLocalLauncher(options) {
101406
101575
  const brand = {
101407
101576
  name: "omo",
101408
101577
  displayVersion: options.version ?? "local",
101409
101578
  configDir: ".omo",
101410
- flatLayout: true,
101579
+ flatLayout: false,
101411
101580
  envPrefix: "OMO",
101412
101581
  userAgent: "omo",
101413
101582
  originator: "omo",
@@ -101421,11 +101590,23 @@ function renderLocalLauncher(options) {
101421
101590
  return `#!/usr/bin/env node
101422
101591
  // ${MARKER}: generated by the omo-senpi installer. Delete this file to remove the local launcher.
101423
101592
  import { spawn } from "node:child_process"
101593
+ import { homedir } from "node:os"
101594
+ import { join } from "node:path"
101424
101595
 
101425
101596
  const brand = ${JSON.stringify(brand)}
101426
101597
  const cli = process.env.OMO_SENPI_CLI_PATH ?? ${JSON.stringify(options.senpiCliPath)}
101427
101598
  const plugin = process.env.OMO_PLUGIN_ROOT ?? ${JSON.stringify(options.pluginPath)}
101428
- const env = { ...process.env, SENPI_BRAND: JSON.stringify(brand), OMO_NATIVE: "1" }
101599
+ // The same directory the published launcher pins, so a local install shares one state location
101600
+ // with the published one and with anything either of them spawns.
101601
+ const agentDir = process.env.OMO_CODING_AGENT_DIR ?? process.env.SENPI_CODING_AGENT_DIR
101602
+ ?? process.env.PI_CODING_AGENT_DIR ?? join(homedir(), ".omo", "agent")
101603
+ const env = {
101604
+ ...process.env,
101605
+ SENPI_BRAND: JSON.stringify(brand),
101606
+ OMO_NATIVE: "1",
101607
+ OMO_CODING_AGENT_DIR: agentDir,
101608
+ SENPI_CODING_AGENT_DIR: agentDir,
101609
+ }
101429
101610
  // Anything resolving the product by name must re-enter through this launcher, never the engine.
101430
101611
  env.OMO_BIN = process.argv[1]
101431
101612
  const selfUpdate = process.argv[2] === "update"
@@ -101450,7 +101631,7 @@ child.on("close", (code, signal) => {
101450
101631
  }
101451
101632
  function installLocalLauncher(options) {
101452
101633
  const path6 = localLauncherPath(options.homeDir);
101453
- if (existsSync30(path6) && !readFileSync14(path6, "utf8").includes(MARKER))
101634
+ if (existsSync31(path6) && !readFileSync14(path6, "utf8").includes(MARKER))
101454
101635
  return;
101455
101636
  mkdirSync10(dirname21(path6), { recursive: true });
101456
101637
  writeFileSync6(path6, renderLocalLauncher(options));
@@ -101463,14 +101644,20 @@ node "%~dp0omo" %*\r
101463
101644
  return path6;
101464
101645
  }
101465
101646
 
101647
+ // packages/omo-senpi/src/install/plugin-artifacts.ts
101648
+ import { createHash as createHash5 } from "crypto";
101649
+ import { constants as constants8 } from "fs";
101650
+ import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
101651
+ import { dirname as dirname23, join as join62 } from "path";
101652
+
101466
101653
  // packages/omo-senpi/src/install/senpi-settings.ts
101467
101654
  import { constants as constants7 } from "fs";
101468
101655
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
101469
- import { dirname as dirname22, join as join60, resolve as resolve18 } from "path";
101656
+ import { dirname as dirname22, join as join61, resolve as resolve19 } from "path";
101470
101657
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
101471
101658
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
101472
- join60("packages", "pi-goal"),
101473
- join60("packages", "pi-webfetch")
101659
+ join61("packages", "pi-goal"),
101660
+ join61("packages", "pi-webfetch")
101474
101661
  ];
101475
101662
  async function readSettings(settingsPath) {
101476
101663
  let raw;
@@ -101499,13 +101686,13 @@ function dedupePackages(packages) {
101499
101686
  return [...new Set(packages)];
101500
101687
  }
101501
101688
  function removeLegacyBuiltinShadows(packages, repoRoot, agentDir) {
101502
- const shadowPaths = new Set(LEGACY_BUILTIN_SHADOW_PACKAGES.map((path6) => resolve18(repoRoot, path6)));
101503
- return packages.filter((entry) => !shadowPaths.has(resolve18(agentDir, entry)));
101689
+ const shadowPaths = new Set(LEGACY_BUILTIN_SHADOW_PACKAGES.map((path6) => resolve19(repoRoot, path6)));
101690
+ return packages.filter((entry) => !shadowPaths.has(resolve19(agentDir, entry)));
101504
101691
  }
101505
101692
  async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir) {
101506
- const currentPath = resolve18(currentPluginPath);
101693
+ const currentPath = resolve19(currentPluginPath);
101507
101694
  const entries = await Promise.all(packages.map(async (entry) => {
101508
- const packagePath = resolve18(agentDir, entry);
101695
+ const packagePath = resolve19(agentDir, entry);
101509
101696
  if (packagePath === currentPath)
101510
101697
  return currentPath;
101511
101698
  return await readPackageName(packagePath) === OMO_SENPI_PACKAGE_NAME ? undefined : entry;
@@ -101545,7 +101732,7 @@ function isRecord10(value) {
101545
101732
  async function readPackageName(packagePath) {
101546
101733
  let raw;
101547
101734
  try {
101548
- raw = await readFile25(join60(packagePath, "package.json"), "utf8");
101735
+ raw = await readFile25(join61(packagePath, "package.json"), "utf8");
101549
101736
  } catch (error51) {
101550
101737
  if (isErrno(error51, "ENOENT") || isErrno(error51, "ENOTDIR"))
101551
101738
  return;
@@ -101568,93 +101755,56 @@ function isErrno(error51, code) {
101568
101755
  return error51 instanceof Error && "code" in error51 && error51.code === code;
101569
101756
  }
101570
101757
 
101571
- // packages/omo-senpi/src/install/install-senpi.ts
101572
- var execFileAsync2 = promisify2(execFile4);
101758
+ // packages/omo-senpi/src/install/plugin-artifacts.ts
101573
101759
  var REQUIRED_PLUGIN_ARTIFACTS = [
101574
- join61("extensions", "omo.js"),
101575
- join61("extensions", "reflection-persona.md"),
101576
- join61("skills", "ast-grep", "SKILL.md"),
101577
- join61("skills", "coding-agent-sessions", "SKILL.md"),
101578
- join61("skills", "debugging", "SKILL.md"),
101579
- join61("skills", "frontend", "SKILL.md"),
101580
- join61("skills", "git-master", "SKILL.md"),
101581
- join61("skills", "init-deep", "SKILL.md"),
101582
- join61("skills", "lsp-setup", "SKILL.md"),
101583
- join61("skills", "programming", "SKILL.md"),
101584
- join61("skills", "refactor", "SKILL.md"),
101585
- join61("skills", "remove-ai-slops", "SKILL.md"),
101586
- join61("skills", "review-work", "SKILL.md"),
101587
- join61("skills", "start-work", "SKILL.md"),
101588
- join61("skills", "ultimate-browsing", "SKILL.md"),
101589
- join61("skills", "ultrawork", "SKILL.md"),
101590
- join61("skills", "ulw-loop", "SKILL.md"),
101591
- join61("skills", "ulw-plan", "SKILL.md"),
101592
- join61("skills", "ulw-research", "SKILL.md"),
101593
- join61("skills", "visual-qa", "SKILL.md"),
101594
- join61("runtime", "ast-grep-mcp", "cli.js"),
101595
- join61("runtime", "agent-toolkit", "cli.js"),
101596
- join61("runtime", "agent-toolkit", "ulw-loop", "cli.js"),
101597
- join61("runtime", "agent-toolkit", "omo-agent-toolkit"),
101598
- join61("runtime", "agent-toolkit", "omo-agent-toolkit.cmd"),
101599
- join61("runtime", "lsp-daemon", "dist", "cli.js"),
101600
- join61("runtime", "lsp-daemon", "dist", "index.js"),
101601
- join61("runtime", "lsp-daemon", "dist", "index.d.ts"),
101602
- join61("runtime", "lsp-daemon", "dist", "daemon-client.js"),
101603
- join61("runtime", "lsp-daemon", "dist", "daemon-client.d.ts"),
101604
- join61("runtime", "lsp-daemon", "dist", "package.json"),
101605
- join61("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
101606
- join61("scripts", "install.mjs")
101760
+ join62("extensions", "omo.js"),
101761
+ join62("extensions", "omo-task.js"),
101762
+ join62("extensions", "omo-member.js"),
101763
+ join62("extensions", "memory-run-supervisor.mjs"),
101764
+ join62("extensions", "reflection-persona.md"),
101765
+ join62("extensions", "dream-persona.md"),
101766
+ join62("extensions", "facts-persona.md"),
101767
+ join62("skills", "ast-grep", "SKILL.md"),
101768
+ join62("skills", "coding-agent-sessions", "SKILL.md"),
101769
+ join62("skills", "debugging", "SKILL.md"),
101770
+ join62("skills", "frontend", "SKILL.md"),
101771
+ join62("skills", "git-master", "SKILL.md"),
101772
+ join62("skills", "init-deep", "SKILL.md"),
101773
+ join62("skills", "lsp-setup", "SKILL.md"),
101774
+ join62("skills", "programming", "SKILL.md"),
101775
+ join62("skills", "refactor", "SKILL.md"),
101776
+ join62("skills", "remove-ai-slops", "SKILL.md"),
101777
+ join62("skills", "review-work", "SKILL.md"),
101778
+ join62("skills", "start-work", "SKILL.md"),
101779
+ join62("skills", "ultimate-browsing", "SKILL.md"),
101780
+ join62("skills", "ultrawork", "SKILL.md"),
101781
+ join62("skills", "ulw-loop", "SKILL.md"),
101782
+ join62("skills", "ulw-plan", "SKILL.md"),
101783
+ join62("skills", "ulw-research", "SKILL.md"),
101784
+ join62("skills", "visual-qa", "SKILL.md"),
101785
+ join62("runtime", "ast-grep-mcp", "cli.js"),
101786
+ join62("runtime", "agent-toolkit", "cli.js"),
101787
+ join62("runtime", "agent-toolkit", "ulw-loop", "cli.js"),
101788
+ join62("runtime", "agent-toolkit", "omo-agent-toolkit"),
101789
+ join62("runtime", "agent-toolkit", "omo-agent-toolkit.cmd"),
101790
+ join62("runtime", "lsp-daemon", "dist", "cli.js"),
101791
+ join62("runtime", "lsp-daemon", "dist", "index.js"),
101792
+ join62("runtime", "lsp-daemon", "dist", "index.d.ts"),
101793
+ join62("runtime", "lsp-daemon", "dist", "daemon-client.js"),
101794
+ join62("runtime", "lsp-daemon", "dist", "daemon-client.d.ts"),
101795
+ join62("runtime", "lsp-daemon", "dist", "package.json"),
101796
+ join62("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
101797
+ join62("scripts", "install.mjs")
101607
101798
  ];
101608
- async function runSenpiInstaller(options = {}) {
101609
- const context = resolveInstallContext(options);
101610
- await ensurePluginArtifacts(context);
101611
- const settings = await readSettings(context.settingsPath);
101612
- const before = JSON.stringify(settings);
101613
- const packages = dedupePackages(await removeSupersededOmoPackages(removeLegacyBuiltinShadows(dedupePackages(readPackages(settings)), context.repoRoot, context.agentDir), context.pluginPath, context.agentDir));
101614
- if (!packages.includes(context.pluginPath))
101615
- packages.push(context.pluginPath);
101616
- settings.packages = packages;
101617
- const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101618
- installLocalLauncher({
101619
- pluginPath: context.pluginPath,
101620
- senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101621
- });
101622
- return {
101623
- ok: true,
101624
- action: "install",
101625
- agentDir: context.agentDir,
101626
- settingsPath: context.settingsPath,
101627
- pluginPath: context.pluginPath,
101628
- changed: JSON.stringify(settings) !== before,
101629
- backupPath
101630
- };
101631
- }
101632
- function resolveInstallContext(options) {
101633
- const env3 = options.env ?? process.env;
101634
- const allowBuild = options.pluginPath === undefined;
101635
- const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname23(fileURLToPath(import.meta.url))) : dirname23(resolve19(options.pluginPath))));
101636
- const agentDir = resolve19(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join61(homedir10(), ".senpi", "agent"));
101637
- const pluginPath = resolve19(options.pluginPath ?? join61(repoRoot, "packages", "omo-senpi", "plugin"));
101638
- return {
101639
- env: env3,
101640
- repoRoot,
101641
- agentDir,
101642
- settingsPath: join61(agentDir, "settings.json"),
101643
- pluginPath,
101644
- platform: options.platform ?? process.platform,
101645
- allowBuild,
101646
- runCommand: options.runCommand ?? defaultRunCommand3
101647
- };
101648
- }
101649
101799
  async function ensurePluginArtifacts(context) {
101650
101800
  if (context.allowBuild) {
101651
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
101652
- await context.runCommand("node", [join61("packages", "omo-codex", "plugin", "scripts", "materialize-shared-upstreams.mjs")], { cwd: context.repoRoot });
101653
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
101654
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-install.mjs")], { cwd: context.repoRoot });
101655
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-lsp-daemon-runtime.mjs")], { cwd: context.repoRoot });
101656
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-ast-grep-mcp-runtime.mjs")], { cwd: context.repoRoot });
101657
- await context.runCommand("node", [join61(context.pluginPath, "scripts", "stage-agent-toolkit.mjs")], { cwd: context.repoRoot });
101801
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
101802
+ await context.runCommand("node", [join62("packages", "omo-codex", "plugin", "scripts", "materialize-shared-upstreams.mjs")], { cwd: context.repoRoot });
101803
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });
101804
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "build-install.mjs")], { cwd: context.repoRoot });
101805
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "stage-lsp-daemon-runtime.mjs")], { cwd: context.repoRoot });
101806
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "stage-ast-grep-mcp-runtime.mjs")], { cwd: context.repoRoot });
101807
+ await context.runCommand("node", [join62(context.pluginPath, "scripts", "stage-agent-toolkit.mjs")], { cwd: context.repoRoot });
101658
101808
  }
101659
101809
  if (await hasMissingPluginArtifact(context.pluginPath)) {
101660
101810
  throw new Error(`Packed omo-senpi plugin is missing required runtime artifacts at ${context.pluginPath}`);
@@ -101663,14 +101813,14 @@ async function ensurePluginArtifacts(context) {
101663
101813
  }
101664
101814
  async function hasMissingPluginArtifact(pluginPath) {
101665
101815
  for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {
101666
- if (!await fileExists2(join61(pluginPath, artifact)))
101816
+ if (!await fileExists2(join62(pluginPath, artifact)))
101667
101817
  return true;
101668
101818
  }
101669
101819
  return false;
101670
101820
  }
101671
101821
  async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
101672
- const runtimeEntry = join61(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
101673
- const manifestPath = join61(dirname23(runtimeEntry), "manifest.json");
101822
+ const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
101823
+ const manifestPath = join62(dirname23(runtimeEntry), "manifest.json");
101674
101824
  let runtimeStat;
101675
101825
  try {
101676
101826
  runtimeStat = await stat6(runtimeEntry);
@@ -101717,6 +101867,63 @@ function astGrepIntegrityError(runtimeEntry, reason) {
101717
101867
  function messageOf(error51) {
101718
101868
  return error51 instanceof Error ? error51.message : String(error51);
101719
101869
  }
101870
+ async function fileExists2(path6) {
101871
+ try {
101872
+ await access2(path6, constants8.F_OK);
101873
+ return true;
101874
+ } catch (error51) {
101875
+ if (isErrno2(error51, "ENOENT"))
101876
+ return false;
101877
+ throw error51;
101878
+ }
101879
+ }
101880
+ function isErrno2(error51, code) {
101881
+ return error51 instanceof Error && "code" in error51 && error51.code === code;
101882
+ }
101883
+
101884
+ // packages/omo-senpi/src/install/install-senpi.ts
101885
+ var execFileAsync2 = promisify2(execFile4);
101886
+ async function runSenpiInstaller(options = {}) {
101887
+ const context = resolveInstallContext(options);
101888
+ await ensurePluginArtifacts(context);
101889
+ const settings = await readSettings(context.settingsPath);
101890
+ const before = JSON.stringify(settings);
101891
+ const packages = dedupePackages(await removeSupersededOmoPackages(removeLegacyBuiltinShadows(dedupePackages(readPackages(settings)), context.repoRoot, context.agentDir), context.pluginPath, context.agentDir));
101892
+ if (!packages.includes(context.pluginPath))
101893
+ packages.push(context.pluginPath);
101894
+ settings.packages = packages;
101895
+ const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101896
+ installLocalLauncher({
101897
+ pluginPath: context.pluginPath,
101898
+ senpiCliPath: join63(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101899
+ });
101900
+ return {
101901
+ ok: true,
101902
+ action: "install",
101903
+ agentDir: context.agentDir,
101904
+ settingsPath: context.settingsPath,
101905
+ pluginPath: context.pluginPath,
101906
+ changed: JSON.stringify(settings) !== before,
101907
+ backupPath
101908
+ };
101909
+ }
101910
+ function resolveInstallContext(options) {
101911
+ const env3 = options.env ?? process.env;
101912
+ const allowBuild = options.pluginPath === undefined;
101913
+ const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve20(options.pluginPath))));
101914
+ const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
101915
+ const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
101916
+ return {
101917
+ env: env3,
101918
+ repoRoot,
101919
+ agentDir,
101920
+ settingsPath: join63(agentDir, "settings.json"),
101921
+ pluginPath,
101922
+ platform: options.platform ?? process.platform,
101923
+ allowBuild,
101924
+ runCommand: options.runCommand ?? defaultRunCommand3
101925
+ };
101926
+ }
101720
101927
  async function defaultRunCommand3(command, args, options) {
101721
101928
  const result = await execFileAsync2(command, [...args], { cwd: options.cwd });
101722
101929
  if (result.stderr.trim().length > 0)
@@ -101727,27 +101934,14 @@ async function defaultRunCommand3(command, args, options) {
101727
101934
  function findRepoRoot2(importerDir) {
101728
101935
  let current = importerDir;
101729
101936
  for (let depth = 0;depth <= 7; depth += 1) {
101730
- if (fileExistsSync(join61(current, "packages", "omo-senpi", "plugin", "package.json")))
101937
+ if (fileExistsSync(join63(current, "packages", "omo-senpi", "plugin", "package.json")))
101731
101938
  return current;
101732
- current = resolve19(current, "..");
101939
+ current = resolve20(current, "..");
101733
101940
  }
101734
101941
  throw new Error("Unable to locate packages/omo-senpi/plugin/package.json from installer module");
101735
101942
  }
101736
- async function fileExists2(path6) {
101737
- try {
101738
- await access2(path6, constants8.F_OK);
101739
- return true;
101740
- } catch (error51) {
101741
- if (isErrno2(error51, "ENOENT"))
101742
- return false;
101743
- throw error51;
101744
- }
101745
- }
101746
101943
  function fileExistsSync(path6) {
101747
- return existsSync31(path6);
101748
- }
101749
- function isErrno2(error51, code) {
101750
- return error51 instanceof Error && "code" in error51 && error51.code === code;
101944
+ return existsSync32(path6);
101751
101945
  }
101752
101946
  // packages/omo-opencode/src/cli/star-request.ts
101753
101947
  import { execFile as execFile5 } from "child_process";
@@ -101783,23 +101977,23 @@ async function starGitHubRepositories(platform = "both", runCommand = runGitHubS
101783
101977
  init_provider_availability();
101784
101978
 
101785
101979
  // packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
101786
- import { existsSync as existsSync33, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "fs";
101787
- import { join as join63 } from "path";
101980
+ import { existsSync as existsSync34, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "fs";
101981
+ import { join as join65 } from "path";
101788
101982
 
101789
101983
  // packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
101790
101984
  init_shared();
101791
- import { existsSync as existsSync32, readFileSync as readFileSync15 } from "fs";
101792
- import { join as join62 } from "path";
101985
+ import { existsSync as existsSync33, readFileSync as readFileSync15 } from "fs";
101986
+ import { join as join64 } from "path";
101793
101987
  var TUI_SUBPATH = "tui";
101794
101988
  var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
101795
101989
  function fileEntryPackageJsonPath(entry) {
101796
101990
  let path6 = entry.slice("file:".length);
101797
101991
  if (path6.startsWith("//"))
101798
101992
  path6 = path6.slice(2);
101799
- return join62(path6, "package.json");
101993
+ return join64(path6, "package.json");
101800
101994
  }
101801
101995
  function packageJsonExportsTui(pkgJsonPath) {
101802
- if (!existsSync32(pkgJsonPath))
101996
+ if (!existsSync33(pkgJsonPath))
101803
101997
  return null;
101804
101998
  try {
101805
101999
  const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
@@ -101834,14 +102028,14 @@ function packageExportsTuiForServerEntry(entry) {
101834
102028
  const packageName = packageNameFromServerEntry(entry);
101835
102029
  if (packageName === null)
101836
102030
  return null;
101837
- return packageJsonExportsTui(join62(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
102031
+ return packageJsonExportsTui(join64(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
101838
102032
  }
101839
102033
  function isOurFilePluginEntry(entry) {
101840
102034
  if (typeof entry !== "string" || !entry.startsWith("file:"))
101841
102035
  return false;
101842
102036
  try {
101843
102037
  const pkgJsonPath = fileEntryPackageJsonPath(entry);
101844
- if (!existsSync32(pkgJsonPath))
102038
+ if (!existsSync33(pkgJsonPath))
101845
102039
  return false;
101846
102040
  const parsed = JSON.parse(readFileSync15(pkgJsonPath, "utf-8"));
101847
102041
  return typeof parsed.name === "string" && ACCEPTED_PACKAGE_NAMES.includes(parsed.name);
@@ -101876,7 +102070,7 @@ function isCanonicalNamedTuiPluginEntry(entry) {
101876
102070
  }
101877
102071
  function detectServerPluginRegistration() {
101878
102072
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
101879
- const configPath = existsSync32(paths2.configJsonc) ? paths2.configJsonc : existsSync32(paths2.configJson) ? paths2.configJson : null;
102073
+ const configPath = existsSync33(paths2.configJsonc) ? paths2.configJsonc : existsSync33(paths2.configJson) ? paths2.configJson : null;
101880
102074
  if (!configPath) {
101881
102075
  return { registered: false, configPath: null, entry: null, packageExportsTui: null };
101882
102076
  }
@@ -101899,8 +102093,8 @@ function detectServerPluginRegistration() {
101899
102093
  }
101900
102094
  }
101901
102095
  function detectTuiPluginRegistration() {
101902
- const tuiJsonPath = join62(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
101903
- if (!existsSync32(tuiJsonPath)) {
102096
+ const tuiJsonPath = join64(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
102097
+ if (!existsSync33(tuiJsonPath)) {
101904
102098
  return {
101905
102099
  registered: false,
101906
102100
  configPath: tuiJsonPath,
@@ -102055,11 +102249,11 @@ function readConfig(path6) {
102055
102249
  return null;
102056
102250
  }
102057
102251
  function readServerConfig(configDir) {
102058
- const jsoncPath = join63(configDir, "opencode.jsonc");
102059
- if (existsSync33(jsoncPath))
102252
+ const jsoncPath = join65(configDir, "opencode.jsonc");
102253
+ if (existsSync34(jsoncPath))
102060
102254
  return readConfig(jsoncPath);
102061
- const jsonPath = join63(configDir, "opencode.json");
102062
- if (existsSync33(jsonPath))
102255
+ const jsonPath = join65(configDir, "opencode.json");
102256
+ if (existsSync34(jsonPath))
102063
102257
  return readConfig(jsonPath);
102064
102258
  return null;
102065
102259
  }
@@ -102079,7 +102273,7 @@ function desiredTuiEntry(serverEntry) {
102079
102273
  return null;
102080
102274
  }
102081
102275
  function readTuiConfig(tuiJsonPath) {
102082
- if (!existsSync33(tuiJsonPath)) {
102276
+ if (!existsSync34(tuiJsonPath)) {
102083
102277
  return { config: {}, malformed: false };
102084
102278
  }
102085
102279
  const config3 = readConfig(tuiJsonPath);
@@ -102100,7 +102294,7 @@ function ensureTuiPluginEntry(opts = {}) {
102100
102294
  if (!desiredEntry) {
102101
102295
  return { changed: false, reason: "no-server-entry" };
102102
102296
  }
102103
- const tuiJsonPath = join63(configDir, "tui.json");
102297
+ const tuiJsonPath = join65(configDir, "tui.json");
102104
102298
  const { config: config3, malformed } = readTuiConfig(tuiJsonPath);
102105
102299
  if (malformed) {
102106
102300
  return { changed: false, reason: "malformed" };
@@ -102115,16 +102309,16 @@ function ensureTuiPluginEntry(opts = {}) {
102115
102309
  }
102116
102310
 
102117
102311
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
102118
- import { homedir as homedir11 } from "os";
102119
- import { join as join64 } from "path";
102312
+ import { homedir as homedir12 } from "os";
102313
+ import { join as join66 } from "path";
102120
102314
 
102121
102315
  // packages/shared-skills/index.mjs
102122
- import { existsSync as existsSync34 } from "fs";
102316
+ import { existsSync as existsSync35 } from "fs";
102123
102317
  import { fileURLToPath as fileURLToPath2 } from "url";
102124
102318
  var SKILLS_PROBE_SPECIFIERS = ["./skills/", "../skills/", "../../skills/"];
102125
102319
  function sharedSkillsRootPath() {
102126
102320
  const candidates = SKILLS_PROBE_SPECIFIERS.map((specifier) => fileURLToPath2(new URL(specifier, import.meta.url)));
102127
- return candidates.find((candidate2) => existsSync34(candidate2)) ?? candidates[0];
102321
+ return candidates.find((candidate2) => existsSync35(candidate2)) ?? candidates[0];
102128
102322
  }
102129
102323
 
102130
102324
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
@@ -102138,9 +102332,9 @@ function describeResult2(result) {
102138
102332
  }
102139
102333
  async function installAstGrepForOpenCode(options = {}) {
102140
102334
  const platform = options.platform ?? process.platform;
102141
- const baseDir = join64(options.homeDir ?? homedir11(), ".omo");
102335
+ const baseDir = join66(options.homeDir ?? homedir12(), ".omo");
102142
102336
  const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
102143
- const skillDir = join64(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102337
+ const skillDir = join66(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102144
102338
  const installer = options.installer ?? runAstGrepSkillInstall;
102145
102339
  try {
102146
102340
  const result = await installer({ platform, skillDir, targetDir });
@@ -105943,7 +106137,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
105943
106137
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
105944
106138
  init_bun_which_shim();
105945
106139
  init_spawn_with_windows_hide();
105946
- import { delimiter as delimiter2, dirname as dirname24, posix as posix9, win32 as win325 } from "path";
106140
+ import { delimiter as delimiter2, dirname as dirname25, posix as posix9, win32 as win325 } from "path";
105947
106141
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
105948
106142
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
105949
106143
  function getCommandCandidates(platform) {
@@ -106001,7 +106195,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
106001
106195
  return null;
106002
106196
  }
106003
106197
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
106004
- const preferredDir = dirname24(binaryPath);
106198
+ const preferredDir = dirname25(binaryPath);
106005
106199
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
106006
106200
  return [preferredDir, ...existing].join(delimiter2);
106007
106201
  }
@@ -106170,7 +106364,7 @@ async function resolveSession(options) {
106170
106364
  if (attempt < SESSION_CREATE_MAX_RETRIES) {
106171
106365
  const delay2 = retryDelayMs * attempt;
106172
106366
  console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
106173
- await new Promise((resolve20) => setTimeout(resolve20, delay2));
106367
+ await new Promise((resolve21) => setTimeout(resolve21, delay2));
106174
106368
  }
106175
106369
  continue;
106176
106370
  }
@@ -106181,7 +106375,7 @@ async function resolveSession(options) {
106181
106375
  if (attempt < SESSION_CREATE_MAX_RETRIES) {
106182
106376
  const delay2 = retryDelayMs * attempt;
106183
106377
  console.log(import_picocolors12.default.dim(` Retrying in ${delay2}ms...`));
106184
- await new Promise((resolve20) => setTimeout(resolve20, delay2));
106378
+ await new Promise((resolve21) => setTimeout(resolve21, delay2));
106185
106379
  }
106186
106380
  }
106187
106381
  throw new Error("Failed to create session after all retries");
@@ -106579,9 +106773,9 @@ function isClosingFence(line, fence) {
106579
106773
  return run?.charAt(0) === fence.marker && run.length >= fence.length;
106580
106774
  }
106581
106775
  // packages/boulder-state/src/top-level-task.ts
106582
- import { existsSync as existsSync35, readFileSync as readFileSync17 } from "fs";
106776
+ import { existsSync as existsSync36, readFileSync as readFileSync17 } from "fs";
106583
106777
  function readCurrentTopLevelTask(planPath) {
106584
- if (!existsSync35(planPath)) {
106778
+ if (!existsSync36(planPath)) {
106585
106779
  return null;
106586
106780
  }
106587
106781
  try {
@@ -106592,13 +106786,13 @@ function readCurrentTopLevelTask(planPath) {
106592
106786
  }
106593
106787
  }
106594
106788
  // packages/boulder-state/src/storage/path.ts
106595
- import { existsSync as existsSync36 } from "fs";
106596
- import { isAbsolute as isAbsolute11, join as join65, relative as relative8, resolve as resolve20 } from "path";
106789
+ import { existsSync as existsSync37 } from "fs";
106790
+ import { isAbsolute as isAbsolute11, join as join67, relative as relative8, resolve as resolve21 } from "path";
106597
106791
  function getBoulderFilePath(directory) {
106598
- return join65(directory, BOULDER_DIR, BOULDER_FILE);
106792
+ return join67(directory, BOULDER_DIR, BOULDER_FILE);
106599
106793
  }
106600
106794
  function resolveTrackedPath(baseDirectory, trackedPath) {
106601
- return isAbsolute11(trackedPath) ? resolve20(trackedPath) : resolve20(baseDirectory, trackedPath);
106795
+ return isAbsolute11(trackedPath) ? resolve21(trackedPath) : resolve21(baseDirectory, trackedPath);
106602
106796
  }
106603
106797
  function resolveBoulderPlanPath(directory, state) {
106604
106798
  const absolutePlanPath = resolveTrackedPath(directory, state.active_plan);
@@ -106606,22 +106800,22 @@ function resolveBoulderPlanPath(directory, state) {
106606
106800
  if (!worktreePath) {
106607
106801
  return absolutePlanPath;
106608
106802
  }
106609
- const absoluteDirectory = resolve20(directory);
106803
+ const absoluteDirectory = resolve21(directory);
106610
106804
  const relativePlanPath = relative8(absoluteDirectory, absolutePlanPath);
106611
106805
  if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute11(relativePlanPath)) {
106612
106806
  return absolutePlanPath;
106613
106807
  }
106614
106808
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
106615
- const worktreePlanPath = resolve20(absoluteWorktreePath, relativePlanPath);
106616
- return existsSync36(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
106809
+ const worktreePlanPath = resolve21(absoluteWorktreePath, relativePlanPath);
106810
+ return existsSync37(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
106617
106811
  }
106618
106812
  function resolveBoulderPlanPathForWork(directory, work) {
106619
106813
  return resolveBoulderPlanPath(directory, work);
106620
106814
  }
106621
106815
  // packages/boulder-state/src/storage/plan-progress.ts
106622
- import { existsSync as existsSync37, readFileSync as readFileSync18, readdirSync as readdirSync7, statSync as statSync4 } from "fs";
106816
+ import { existsSync as existsSync38, readFileSync as readFileSync18, readdirSync as readdirSync7, statSync as statSync4 } from "fs";
106623
106817
  function getPlanProgress(planPath) {
106624
- if (!existsSync37(planPath)) {
106818
+ if (!existsSync38(planPath)) {
106625
106819
  return { total: 0, completed: 0, isComplete: false };
106626
106820
  }
106627
106821
  try {
@@ -106704,10 +106898,10 @@ function selectMirrorWork(state) {
106704
106898
  return sorted[0] ?? null;
106705
106899
  }
106706
106900
  // packages/boulder-state/src/storage/read-state.ts
106707
- import { existsSync as existsSync38, readFileSync as readFileSync19 } from "fs";
106901
+ import { existsSync as existsSync39, readFileSync as readFileSync19 } from "fs";
106708
106902
  function readBoulderState(directory) {
106709
106903
  const filePath = getBoulderFilePath(directory);
106710
- if (!existsSync38(filePath)) {
106904
+ if (!existsSync39(filePath)) {
106711
106905
  return null;
106712
106906
  }
106713
106907
  try {
@@ -106777,14 +106971,14 @@ init_state();
106777
106971
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
106778
106972
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
106779
106973
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
106780
- import { existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "fs";
106781
- import { join as join66 } from "path";
106974
+ import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "fs";
106975
+ import { join as join68 } from "path";
106782
106976
  function getMarkerPath(directory, sessionID) {
106783
- return join66(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
106977
+ return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
106784
106978
  }
106785
106979
  function readContinuationMarker(directory, sessionID) {
106786
106980
  const markerPath = getMarkerPath(directory, sessionID);
106787
- if (!existsSync39(markerPath))
106981
+ if (!existsSync40(markerPath))
106788
106982
  return null;
106789
106983
  try {
106790
106984
  const raw = readFileSync20(markerPath, "utf-8");
@@ -106853,7 +107047,7 @@ async function isSessionInBoulderLineage(input) {
106853
107047
  init_shared();
106854
107048
  init_compaction_marker();
106855
107049
  import { readFileSync as readFileSync21, readdirSync as readdirSync8 } from "fs";
106856
- import { join as join67 } from "path";
107050
+ import { join as join69 } from "path";
106857
107051
  var defaultSessionLastAgentDeps = {
106858
107052
  getMessageDir,
106859
107053
  isSqliteBackend,
@@ -106913,7 +107107,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
106913
107107
  try {
106914
107108
  const messages = readdirSync8(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
106915
107109
  try {
106916
- const content = readFileSync21(join67(messageDir, fileName), "utf-8");
107110
+ const content = readFileSync21(join69(messageDir, fileName), "utf-8");
106917
107111
  const parsed = JSON.parse(content);
106918
107112
  return {
106919
107113
  fileName,
@@ -106956,8 +107150,8 @@ init_agent_display_names();
106956
107150
 
106957
107151
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
106958
107152
  init_frontmatter2();
106959
- import { existsSync as existsSync40, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
106960
- import { dirname as dirname25, join as join68 } from "path";
107153
+ import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
107154
+ import { dirname as dirname26, join as join70 } from "path";
106961
107155
 
106962
107156
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
106963
107157
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -106966,11 +107160,11 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
106966
107160
 
106967
107161
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
106968
107162
  function getStateFilePath(directory, customPath) {
106969
- return customPath ? join68(directory, customPath) : join68(directory, DEFAULT_STATE_FILE);
107163
+ return customPath ? join70(directory, customPath) : join70(directory, DEFAULT_STATE_FILE);
106970
107164
  }
106971
107165
  function readState(directory, customPath) {
106972
107166
  const filePath = getStateFilePath(directory, customPath);
106973
- if (!existsSync40(filePath)) {
107167
+ if (!existsSync41(filePath)) {
106974
107168
  return null;
106975
107169
  }
106976
107170
  try {
@@ -107200,7 +107394,7 @@ async function pollForCompletion(ctx, eventState, abortController, options = {})
107200
107394
  const secondaryMeaningfulWorkTimeoutMs = options.secondaryMeaningfulWorkTimeoutMs ?? DEFAULT_SECONDARY_MEANINGFUL_WORK_TIMEOUT_MS;
107201
107395
  const requireMeaningfulWork = options.requireMeaningfulWork ?? false;
107202
107396
  const now = options.now ?? Date.now;
107203
- const sleep = options.sleep ?? ((ms) => new Promise((resolve21) => setTimeout(resolve21, ms)));
107397
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve22) => setTimeout(resolve22, ms)));
107204
107398
  let consecutiveCompleteChecks = 0;
107205
107399
  let errorCycleCount = 0;
107206
107400
  let firstWorkTimestamp = null;
@@ -107365,7 +107559,7 @@ function createAbortError() {
107365
107559
  return error51;
107366
107560
  }
107367
107561
  function sleep(delayMs) {
107368
- return new Promise((resolve21) => setTimeout(resolve21, delayMs));
107562
+ return new Promise((resolve22) => setTimeout(resolve22, delayMs));
107369
107563
  }
107370
107564
  function hasPromptStartEvidence(eventState) {
107371
107565
  return eventState.mainSessionStarted || eventState.hasReceivedMeaningfulWork || eventState.messageCount > 0 || eventState.currentTool !== null;
@@ -107740,7 +107934,7 @@ var EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS = 2000;
107740
107934
  async function waitForEventProcessorShutdown(eventProcessor, timeoutMs = EVENT_PROCESSOR_SHUTDOWN_TIMEOUT_MS) {
107741
107935
  const completed = await Promise.race([
107742
107936
  eventProcessor.then(() => true),
107743
- new Promise((resolve21) => setTimeout(() => resolve21(false), timeoutMs))
107937
+ new Promise((resolve22) => setTimeout(() => resolve22(false), timeoutMs))
107744
107938
  ]);
107745
107939
  }
107746
107940
  async function run(options) {
@@ -108066,14 +108260,14 @@ async function getLocalVersion(options = {}) {
108066
108260
  }
108067
108261
  }
108068
108262
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
108069
- import { existsSync as existsSync51, readFileSync as readFileSync32 } from "fs";
108263
+ import { existsSync as existsSync52, readFileSync as readFileSync32 } from "fs";
108070
108264
 
108071
108265
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
108072
108266
  init_extract_semver();
108073
108267
  init_bun_which_shim();
108074
- import { existsSync as existsSync48, accessSync as accessSync4, constants as constants11 } from "fs";
108075
- import { homedir as homedir14 } from "os";
108076
- import { join as join75 } from "path";
108268
+ import { existsSync as existsSync49, accessSync as accessSync4, constants as constants11 } from "fs";
108269
+ import { homedir as homedir15 } from "os";
108270
+ import { join as join77 } from "path";
108077
108271
 
108078
108272
  // packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
108079
108273
  init_spawn_with_windows_hide();
@@ -108112,8 +108306,8 @@ async function spawnWithTimeout(command, options, timeoutMs = DEFAULT_SPAWN_TIME
108112
108306
  const stdoutPromise = readSpawnStream(proc.stdout);
108113
108307
  const stderrPromise = readSpawnStream(proc.stderr);
108114
108308
  let timer;
108115
- const timeoutPromise = new Promise((resolve21) => {
108116
- timer = setTimeout(() => resolve21("timeout"), timeoutMs);
108309
+ const timeoutPromise = new Promise((resolve22) => {
108310
+ timer = setTimeout(() => resolve22("timeout"), timeoutMs);
108117
108311
  });
108118
108312
  const processPromise = (async () => {
108119
108313
  await proc.exited;
@@ -108160,22 +108354,22 @@ function isExecutable2(path12) {
108160
108354
  }
108161
108355
  }
108162
108356
  function getDesktopAppPaths(platform) {
108163
- const home = homedir14();
108357
+ const home = homedir15();
108164
108358
  switch (platform) {
108165
108359
  case "darwin":
108166
108360
  return [
108167
108361
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
108168
- join75(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108362
+ join77(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108169
108363
  ];
108170
108364
  case "win32": {
108171
108365
  const programFiles = process.env.ProgramFiles;
108172
108366
  const localAppData = process.env.LOCALAPPDATA;
108173
108367
  const paths2 = [];
108174
108368
  if (programFiles) {
108175
- paths2.push(join75(programFiles, "OpenCode", "OpenCode.exe"));
108369
+ paths2.push(join77(programFiles, "OpenCode", "OpenCode.exe"));
108176
108370
  }
108177
108371
  if (localAppData) {
108178
- paths2.push(join75(localAppData, "OpenCode", "OpenCode.exe"));
108372
+ paths2.push(join77(localAppData, "OpenCode", "OpenCode.exe"));
108179
108373
  }
108180
108374
  return paths2;
108181
108375
  }
@@ -108183,8 +108377,8 @@ function getDesktopAppPaths(platform) {
108183
108377
  return [
108184
108378
  "/usr/bin/opencode",
108185
108379
  "/usr/lib/opencode/opencode",
108186
- join75(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108187
- join75(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
108380
+ join77(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108381
+ join77(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
108188
108382
  ];
108189
108383
  default:
108190
108384
  return [];
@@ -108196,7 +108390,7 @@ function buildVersionCommand(binaryPath, platform) {
108196
108390
  }
108197
108391
  return [binaryPath, "--version"];
108198
108392
  }
108199
- function findDesktopBinary(platform = process.platform, checkExists = existsSync48) {
108393
+ function findDesktopBinary(platform = process.platform, checkExists = existsSync49) {
108200
108394
  for (const desktopPath of getDesktopAppPaths(platform)) {
108201
108395
  if (checkExists(desktopPath)) {
108202
108396
  return { binary: "opencode", path: desktopPath };
@@ -108204,7 +108398,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
108204
108398
  }
108205
108399
  return null;
108206
108400
  }
108207
- async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync48) {
108401
+ async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync49) {
108208
108402
  for (const binary of OPENCODE_BINARIES2) {
108209
108403
  const path12 = bunWhich(binary);
108210
108404
  if (path12 && checkExists(path12)) {
@@ -108216,7 +108410,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
108216
108410
  const candidates = getCommandCandidates2(platform);
108217
108411
  for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {
108218
108412
  for (const command of candidates) {
108219
- const fullPath = join75(entry, command);
108413
+ const fullPath = join77(entry, command);
108220
108414
  if (checkExists(fullPath) && isExecutable2(fullPath)) {
108221
108415
  return { binary: command, path: fullPath };
108222
108416
  }
@@ -108262,12 +108456,12 @@ function compareVersions3(current, minimum) {
108262
108456
 
108263
108457
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
108264
108458
  init_shared();
108265
- import { existsSync as existsSync49, readFileSync as readFileSync30 } from "fs";
108459
+ import { existsSync as existsSync50, readFileSync as readFileSync30 } from "fs";
108266
108460
  function detectConfigPath() {
108267
108461
  const paths2 = getOpenCodeConfigPaths({ binary: "opencode", version: null });
108268
- if (existsSync49(paths2.configJsonc))
108462
+ if (existsSync50(paths2.configJsonc))
108269
108463
  return paths2.configJsonc;
108270
- if (existsSync49(paths2.configJson))
108464
+ if (existsSync50(paths2.configJson))
108271
108465
  return paths2.configJson;
108272
108466
  return null;
108273
108467
  }
@@ -108355,36 +108549,36 @@ init_file_utils2();
108355
108549
  init_checker();
108356
108550
  init_auto_update_checker();
108357
108551
  init_package_json_locator();
108358
- import { existsSync as existsSync50, readFileSync as readFileSync31, readdirSync as readdirSync10 } from "fs";
108552
+ import { existsSync as existsSync51, readFileSync as readFileSync31, readdirSync as readdirSync10 } from "fs";
108359
108553
  import { createRequire as createRequire2 } from "module";
108360
- import { homedir as homedir15 } from "os";
108361
- import { join as join76 } from "path";
108554
+ import { homedir as homedir16 } from "os";
108555
+ import { join as join78 } from "path";
108362
108556
  import { fileURLToPath as fileURLToPath6 } from "url";
108363
108557
  init_shared();
108364
108558
  function getPlatformDefaultCacheDir(platform = process.platform) {
108365
108559
  if (platform === "darwin")
108366
- return join76(homedir15(), "Library", "Caches");
108560
+ return join78(homedir16(), "Library", "Caches");
108367
108561
  if (platform === "win32")
108368
- return process.env.LOCALAPPDATA ?? join76(homedir15(), "AppData", "Local");
108369
- return join76(homedir15(), ".cache");
108562
+ return process.env.LOCALAPPDATA ?? join78(homedir16(), "AppData", "Local");
108563
+ return join78(homedir16(), ".cache");
108370
108564
  }
108371
108565
  function resolveOpenCodeCacheDir() {
108372
108566
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
108373
108567
  if (xdgCacheHome)
108374
- return join76(xdgCacheHome, "opencode");
108568
+ return join78(xdgCacheHome, "opencode");
108375
108569
  const fromShared = getOpenCodeCacheDir();
108376
- const platformDefault = join76(getPlatformDefaultCacheDir(), "opencode");
108377
- if (existsSync50(fromShared) || !existsSync50(platformDefault))
108570
+ const platformDefault = join78(getPlatformDefaultCacheDir(), "opencode");
108571
+ if (existsSync51(fromShared) || !existsSync51(platformDefault))
108378
108572
  return fromShared;
108379
108573
  return platformDefault;
108380
108574
  }
108381
108575
  function resolveExistingDir(dirPath) {
108382
- if (!existsSync50(dirPath))
108576
+ if (!existsSync51(dirPath))
108383
108577
  return dirPath;
108384
108578
  return resolveSymlink(dirPath);
108385
108579
  }
108386
108580
  function readPackageJson(filePath) {
108387
- if (!existsSync50(filePath))
108581
+ if (!existsSync51(filePath))
108388
108582
  return null;
108389
108583
  try {
108390
108584
  const content = readFileSync31(filePath, "utf-8");
@@ -108405,26 +108599,26 @@ function normalizeVersion(value) {
108405
108599
  function createPackageCandidates(rootDir) {
108406
108600
  return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
108407
108601
  packageName,
108408
- installedPackagePath: join76(rootDir, "node_modules", packageName, "package.json")
108602
+ installedPackagePath: join78(rootDir, "node_modules", packageName, "package.json")
108409
108603
  }));
108410
108604
  }
108411
108605
  function createTaggedInstallCandidates(rootDir) {
108412
- const packagesDir = join76(rootDir, "packages");
108413
- if (!existsSync50(packagesDir))
108606
+ const packagesDir = join78(rootDir, "packages");
108607
+ if (!existsSync51(packagesDir))
108414
108608
  return [];
108415
108609
  const candidates = [];
108416
108610
  for (const entryName of readdirSync10(packagesDir).sort()) {
108417
108611
  const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
108418
108612
  if (packageName === undefined)
108419
108613
  continue;
108420
- const installDir = join76(packagesDir, entryName);
108614
+ const installDir = join78(packagesDir, entryName);
108421
108615
  candidates.push({
108422
108616
  cacheDir: installDir,
108423
- cachePackagePath: join76(installDir, "package.json"),
108617
+ cachePackagePath: join78(installDir, "package.json"),
108424
108618
  packageCandidates: [
108425
108619
  {
108426
108620
  packageName,
108427
- installedPackagePath: join76(installDir, "node_modules", packageName, "package.json")
108621
+ installedPackagePath: join78(installDir, "node_modules", packageName, "package.json")
108428
108622
  }
108429
108623
  ]
108430
108624
  });
@@ -108432,7 +108626,7 @@ function createTaggedInstallCandidates(rootDir) {
108432
108626
  return candidates;
108433
108627
  }
108434
108628
  function selectInstalledPackage(candidate2) {
108435
- return candidate2.packageCandidates.find((packageCandidate) => existsSync50(packageCandidate.installedPackagePath)) ?? candidate2.packageCandidates[0];
108629
+ return candidate2.packageCandidates.find((packageCandidate) => existsSync51(packageCandidate.installedPackagePath)) ?? candidate2.packageCandidates[0];
108436
108630
  }
108437
108631
  function getExpectedVersion(cachePackage, packageName) {
108438
108632
  return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
@@ -108443,7 +108637,7 @@ function resolveInstalledPackageJsonPath() {
108443
108637
  for (const packageName of ACCEPTED_PACKAGE_NAMES) {
108444
108638
  try {
108445
108639
  const packageJsonPath = require2.resolve(`${packageName}/package.json`);
108446
- if (existsSync50(packageJsonPath)) {
108640
+ if (existsSync51(packageJsonPath)) {
108447
108641
  return { packageName, packageJsonPath };
108448
108642
  }
108449
108643
  } catch {
@@ -108469,22 +108663,22 @@ function getLoadedPluginVersion() {
108469
108663
  const candidates = [
108470
108664
  {
108471
108665
  cacheDir: configDir,
108472
- cachePackagePath: join76(configDir, "package.json"),
108666
+ cachePackagePath: join78(configDir, "package.json"),
108473
108667
  packageCandidates: createPackageCandidates(configDir)
108474
108668
  },
108475
108669
  ...createTaggedInstallCandidates(configDir),
108476
108670
  {
108477
108671
  cacheDir,
108478
- cachePackagePath: join76(cacheDir, "package.json"),
108672
+ cachePackagePath: join78(cacheDir, "package.json"),
108479
108673
  packageCandidates: createPackageCandidates(cacheDir)
108480
108674
  },
108481
108675
  ...createTaggedInstallCandidates(cacheDir)
108482
108676
  ];
108483
- const selectedCandidate = candidates.find((candidate2) => candidate2.packageCandidates.some((packageCandidate) => existsSync50(packageCandidate.installedPackagePath))) ?? candidates[0];
108677
+ const selectedCandidate = candidates.find((candidate2) => candidate2.packageCandidates.some((packageCandidate) => existsSync51(packageCandidate.installedPackagePath))) ?? candidates[0];
108484
108678
  const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
108485
108679
  const selectedPackage = selectInstalledPackage(selectedCandidate);
108486
108680
  const candidateInstalledPath = selectedPackage.installedPackagePath;
108487
- const candidateExists = existsSync50(candidateInstalledPath);
108681
+ const candidateExists = existsSync51(candidateInstalledPath);
108488
108682
  const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
108489
108683
  const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
108490
108684
  const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
@@ -108520,7 +108714,7 @@ var defaultDeps6 = {
108520
108714
  getLoadedPluginVersion,
108521
108715
  getLatestPluginVersion,
108522
108716
  getSuggestedInstallTag,
108523
- configExists: existsSync51,
108717
+ configExists: existsSync52,
108524
108718
  readConfigFile: (path12) => readFileSync32(path12, "utf-8"),
108525
108719
  parseConfigContent: (content) => parseJsonc(content)
108526
108720
  };
@@ -108666,23 +108860,23 @@ async function checkSystem(deps = defaultDeps6) {
108666
108860
 
108667
108861
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
108668
108862
  init_shared();
108669
- import { existsSync as existsSync52, readFileSync as readFileSync33 } from "fs";
108670
- import { homedir as homedir16 } from "os";
108671
- import { join as join77 } from "path";
108863
+ import { existsSync as existsSync53, readFileSync as readFileSync33 } from "fs";
108864
+ import { homedir as homedir17 } from "os";
108865
+ import { join as join79 } from "path";
108672
108866
  function getUserConfigDir2() {
108673
108867
  const xdgConfig = process.env.XDG_CONFIG_HOME;
108674
108868
  if (xdgConfig)
108675
- return join77(xdgConfig, "opencode");
108676
- return join77(homedir16(), ".config", "opencode");
108869
+ return join79(xdgConfig, "opencode");
108870
+ return join79(homedir17(), ".config", "opencode");
108677
108871
  }
108678
108872
  function loadCustomProviderNames() {
108679
108873
  const configDir = getUserConfigDir2();
108680
108874
  const candidatePaths = [
108681
- join77(configDir, "opencode.json"),
108682
- join77(configDir, "opencode.jsonc")
108875
+ join79(configDir, "opencode.json"),
108876
+ join79(configDir, "opencode.jsonc")
108683
108877
  ];
108684
108878
  for (const configPath of candidatePaths) {
108685
- if (!existsSync52(configPath))
108879
+ if (!existsSync53(configPath))
108686
108880
  continue;
108687
108881
  try {
108688
108882
  const content = readFileSync33(configPath, "utf-8");
@@ -108700,9 +108894,9 @@ function loadCustomProviderNames() {
108700
108894
  return [];
108701
108895
  }
108702
108896
  function loadAvailableModelsFromCache() {
108703
- const cacheFile = join77(getOpenCodeCacheDir(), "models.json");
108897
+ const cacheFile = join79(getOpenCodeCacheDir(), "models.json");
108704
108898
  const customProviders = loadCustomProviderNames();
108705
- if (!existsSync52(cacheFile)) {
108899
+ if (!existsSync53(cacheFile)) {
108706
108900
  if (customProviders.length > 0) {
108707
108901
  return { providers: customProviders, modelCount: 0, cacheExists: true };
108708
108902
  }
@@ -108762,7 +108956,7 @@ function loadOmoConfig2() {
108762
108956
 
108763
108957
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
108764
108958
  init_shared();
108765
- import { join as join78 } from "path";
108959
+ import { join as join80 } from "path";
108766
108960
 
108767
108961
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
108768
108962
  function formatModelWithVariant(model, variant) {
@@ -108804,7 +108998,7 @@ function formatCapabilityResolutionLabel(mode) {
108804
108998
  }
108805
108999
  function buildModelResolutionDetails(options) {
108806
109000
  const details = [];
108807
- const cacheFile = join78(getOpenCodeCacheDir(), "models.json");
109001
+ const cacheFile = join80(getOpenCodeCacheDir(), "models.json");
108808
109002
  details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");
108809
109003
  details.push("");
108810
109004
  if (options.available.cacheExists) {
@@ -109113,8 +109307,8 @@ async function checkConfig() {
109113
109307
 
109114
109308
  // packages/omo-opencode/src/cli/doctor/checks/deprecated-reasoning-keys.ts
109115
109309
  init_main();
109116
- import { existsSync as existsSync53, readFileSync as readFileSync34 } from "fs";
109117
- import { join as join79 } from "path";
109310
+ import { existsSync as existsSync54, readFileSync as readFileSync34 } from "fs";
109311
+ import { join as join81 } from "path";
109118
109312
  var CANONICAL_REPLACEMENT = new Map([
109119
109313
  ["variant", "reasoning"],
109120
109314
  ["reasoningEffort", "reasoning"],
@@ -109169,13 +109363,13 @@ function userConfigPaths() {
109169
109363
  const home = process.env.HOME ?? process.env.USERPROFILE;
109170
109364
  if (home === undefined || home.length === 0)
109171
109365
  return [];
109172
- return [join79(home, ".omo", "omo.jsonc"), join79(home, ".omo", "omo.json")];
109366
+ return [join81(home, ".omo", "omo.jsonc"), join81(home, ".omo", "omo.json")];
109173
109367
  }
109174
109368
  async function checkDeprecatedReasoningKeys() {
109175
109369
  const issues = [];
109176
109370
  const scanned = [];
109177
109371
  for (const configPath of userConfigPaths()) {
109178
- if (!existsSync53(configPath))
109372
+ if (!existsSync54(configPath))
109179
109373
  continue;
109180
109374
  scanned.push(configPath);
109181
109375
  const parsed = parse2(readFileSync34(configPath, "utf-8"));
@@ -109192,28 +109386,28 @@ async function checkDeprecatedReasoningKeys() {
109192
109386
 
109193
109387
  // packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
109194
109388
  init_src2();
109195
- import { existsSync as existsSync54 } from "fs";
109389
+ import { existsSync as existsSync55 } from "fs";
109196
109390
  import { createRequire as createRequire3 } from "module";
109197
- import { homedir as homedir18 } from "os";
109198
- import { dirname as dirname30, join as join81 } from "path";
109391
+ import { homedir as homedir19 } from "os";
109392
+ import { dirname as dirname31, join as join83 } from "path";
109199
109393
 
109200
109394
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
109201
- import { join as join80 } from "path";
109202
- import { homedir as homedir17, tmpdir as tmpdir4 } from "os";
109395
+ import { join as join82 } from "path";
109396
+ import { homedir as homedir18, tmpdir as tmpdir4 } from "os";
109203
109397
  init_binary_downloader();
109204
109398
  init_logger2();
109205
109399
  init_plugin_identity();
109206
109400
  var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
109207
- var DEBUG_FILE = join80(tmpdir4(), "comment-checker-debug.log");
109401
+ var DEBUG_FILE = join82(tmpdir4(), "comment-checker-debug.log");
109208
109402
  function getCacheDir2() {
109209
109403
  if (process.platform === "win32") {
109210
109404
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
109211
- const base2 = localAppData || join80(homedir17(), "AppData", "Local");
109212
- return join80(base2, CACHE_DIR_NAME, "bin");
109405
+ const base2 = localAppData || join82(homedir18(), "AppData", "Local");
109406
+ return join82(base2, CACHE_DIR_NAME, "bin");
109213
109407
  }
109214
109408
  const xdgCache = process.env.XDG_CACHE_HOME;
109215
- const base = xdgCache || join80(homedir17(), ".cache");
109216
- return join80(base, CACHE_DIR_NAME, "bin");
109409
+ const base = xdgCache || join82(homedir18(), ".cache");
109410
+ return join82(base, CACHE_DIR_NAME, "bin");
109217
109411
  }
109218
109412
  function getBinaryName() {
109219
109413
  return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
@@ -109263,7 +109457,7 @@ async function getBinaryVersion(binary) {
109263
109457
  }
109264
109458
  }
109265
109459
  async function checkAstGrepCli() {
109266
- const runtimeDir = astGrepRuntimeDir(join81(homedir18(), ".omo"));
109460
+ const runtimeDir = astGrepRuntimeDir(join83(homedir19(), ".omo"));
109267
109461
  const sgPath = findSgBinarySync({ runtimeDir });
109268
109462
  if (sgPath === null) {
109269
109463
  return {
@@ -109292,12 +109486,12 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
109292
109486
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
109293
109487
  const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
109294
109488
  try {
109295
- const packageDir = baseDirOverride ?? dirname30(resolvePackageJsonPath());
109296
- const vendorPath = join81(packageDir, "vendor", platformKey, binaryName);
109297
- if (existsSync54(vendorPath))
109489
+ const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
109490
+ const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
109491
+ if (existsSync55(vendorPath))
109298
109492
  return vendorPath;
109299
- const binPath = join81(packageDir, "bin", binaryName);
109300
- if (existsSync54(binPath))
109493
+ const binPath = join83(packageDir, "bin", binaryName);
109494
+ if (existsSync55(binPath))
109301
109495
  return binPath;
109302
109496
  } catch (error51) {
109303
109497
  if (!(error51 instanceof Error) && !isModuleResolutionFailure(error51))
@@ -109443,8 +109637,8 @@ async function getGhCliInfo(dependencies = {}) {
109443
109637
  // packages/omo-opencode/src/mcp/lsp.ts
109444
109638
  init_zod();
109445
109639
  init_opencode_config_dir();
109446
- import { existsSync as existsSync55, readFileSync as readFileSync35 } from "fs";
109447
- import { delimiter as delimiter3, dirname as dirname31, resolve as resolve22 } from "path";
109640
+ import { existsSync as existsSync56, readFileSync as readFileSync35 } from "fs";
109641
+ import { delimiter as delimiter3, dirname as dirname32, resolve as resolve23 } from "path";
109448
109642
  import { fileURLToPath as fileURLToPath7 } from "url";
109449
109643
 
109450
109644
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -109491,7 +109685,7 @@ function resolveRuntimeExecutable(commandName, options = {}) {
109491
109685
  }
109492
109686
 
109493
109687
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
109494
- import { resolve as resolve21 } from "path";
109688
+ import { resolve as resolve22 } from "path";
109495
109689
  function resolveJavaScriptRuntime(resolveExecutable) {
109496
109690
  const node = resolveExecutable("node");
109497
109691
  return node.available ? node : resolveExecutable("bun");
@@ -109499,9 +109693,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
109499
109693
  function createAncestorCliCandidates(options) {
109500
109694
  const candidates = [];
109501
109695
  const seenPaths = new Set;
109502
- let currentDirectory = resolve21(options.startDirectory);
109696
+ let currentDirectory = resolve22(options.startDirectory);
109503
109697
  while (true) {
109504
- const distCliPath = resolve21(currentDirectory, options.packageRel, options.distCliRel);
109698
+ const distCliPath = resolve22(currentDirectory, options.packageRel, options.distCliRel);
109505
109699
  if (!seenPaths.has(distCliPath)) {
109506
109700
  const runtime5 = resolveJavaScriptRuntime(options.resolveExecutable);
109507
109701
  seenPaths.add(distCliPath);
@@ -109513,7 +109707,7 @@ function createAncestorCliCandidates(options) {
109513
109707
  runtimeAvailable: runtime5.available
109514
109708
  });
109515
109709
  }
109516
- const sourceCliPath = resolve21(currentDirectory, options.packageRel, options.sourceCliRel);
109710
+ const sourceCliPath = resolve22(currentDirectory, options.packageRel, options.sourceCliRel);
109517
109711
  if (!seenPaths.has(sourceCliPath)) {
109518
109712
  const runtime5 = options.resolveExecutable("bun");
109519
109713
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -109530,7 +109724,7 @@ function createAncestorCliCandidates(options) {
109530
109724
  runtimeAvailable: runtime5.available
109531
109725
  });
109532
109726
  }
109533
- const parentDirectory = resolve21(currentDirectory, "..");
109727
+ const parentDirectory = resolve22(currentDirectory, "..");
109534
109728
  if (parentDirectory === currentDirectory)
109535
109729
  return candidates;
109536
109730
  currentDirectory = parentDirectory;
@@ -109575,7 +109769,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
109575
109769
  ].join(";");
109576
109770
  function getModuleDirectory(moduleUrl) {
109577
109771
  try {
109578
- return dirname31(fileURLToPath7(moduleUrl));
109772
+ return dirname32(fileURLToPath7(moduleUrl));
109579
109773
  } catch (error51) {
109580
109774
  if (!(error51 instanceof Error))
109581
109775
  throw error51;
@@ -109583,11 +109777,11 @@ function getModuleDirectory(moduleUrl) {
109583
109777
  }
109584
109778
  }
109585
109779
  function findBootstrapRoot(candidates, pathExists) {
109586
- return candidates.find((candidate2) => pathExists(resolve22(candidate2.root, "package.json")))?.root ?? process.cwd();
109780
+ return candidates.find((candidate2) => pathExists(resolve23(candidate2.root, "package.json")))?.root ?? process.cwd();
109587
109781
  }
109588
109782
  function readDaemonPackageVersion(root) {
109589
109783
  try {
109590
- const packageJson = JSON.parse(readFileSync35(resolve22(root, PACKAGE_REL, "package.json"), "utf-8"));
109784
+ const packageJson = JSON.parse(readFileSync35(resolve23(root, PACKAGE_REL, "package.json"), "utf-8"));
109591
109785
  return DaemonPackageSchema.parse(packageJson).version;
109592
109786
  } catch (error51) {
109593
109787
  if (!(error51 instanceof Error))
@@ -109599,17 +109793,17 @@ function createBootstrapCandidate(root, pathExists, resolveExecutable) {
109599
109793
  const runtime5 = resolveJavaScriptRuntime(resolveExecutable);
109600
109794
  const bun = resolveExecutable("bun");
109601
109795
  const npm = resolveExecutable("npm");
109602
- const packageManifestPath = resolve22(root, PACKAGE_REL, "package.json");
109796
+ const packageManifestPath = resolve23(root, PACKAGE_REL, "package.json");
109603
109797
  return {
109604
109798
  command: [runtime5.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
109605
109799
  root,
109606
- path: resolve22(root, PACKAGE_REL, DIST_CLI_REL),
109800
+ path: resolve23(root, PACKAGE_REL, DIST_CLI_REL),
109607
109801
  exists: runtime5.available && npm.available && pathExists(packageManifestPath),
109608
109802
  runtimeAvailable: runtime5.available
109609
109803
  };
109610
109804
  }
109611
109805
  function resolveLspCommand(options = {}) {
109612
- const pathExists = options.exists ?? existsSync55;
109806
+ const pathExists = options.exists ?? existsSync56;
109613
109807
  const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
109614
109808
  const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
109615
109809
  const candidates = moduleDirectory ? createAncestorCliCandidates({
@@ -109619,7 +109813,7 @@ function resolveLspCommand(options = {}) {
109619
109813
  sourceCliRel: SOURCE_CLI_REL,
109620
109814
  pathExists,
109621
109815
  resolveExecutable,
109622
- isSourceCandidateAvailable: ({ root }) => pathExists(resolve22(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
109816
+ isSourceCandidateAvailable: ({ root }) => pathExists(resolve23(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
109623
109817
  }) : [];
109624
109818
  const distCandidate = candidates.find((candidate2) => hasCliSuffix(candidate2.path, DIST_CLI_REL) && candidate2.exists);
109625
109819
  if (distCandidate) {
@@ -109633,7 +109827,7 @@ function resolveLspCommand(options = {}) {
109633
109827
  }
109634
109828
  function createLspMcpConfig(options = {}) {
109635
109829
  const resolvedCommand = resolveLspCommand(options);
109636
- const cwd = resolve22(options.cwd ?? process.cwd());
109830
+ const cwd = resolve23(options.cwd ?? process.cwd());
109637
109831
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
109638
109832
  const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
109639
109833
  return {
@@ -109642,9 +109836,9 @@ function createLspMcpConfig(options = {}) {
109642
109836
  enabled: resolvedCommand.exists,
109643
109837
  cwd,
109644
109838
  environment: {
109645
- LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve22(cwd, configPath)).join(delimiter3),
109646
- LSP_TOOLS_MCP_USER_CONFIG: resolve22(configDir, "lsp.json"),
109647
- LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve22(configDir, "lsp-install-decisions.json"),
109839
+ LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve23(cwd, configPath)).join(delimiter3),
109840
+ LSP_TOOLS_MCP_USER_CONFIG: resolve23(configDir, "lsp.json"),
109841
+ LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve23(configDir, "lsp-install-decisions.json"),
109648
109842
  ...sourceVersion ? {
109649
109843
  [OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
109650
109844
  [OMO_LSP_DAEMON_VERSION]: sourceVersion
@@ -109669,21 +109863,21 @@ function getInstalledLspServers(options = {}) {
109669
109863
 
109670
109864
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
109671
109865
  init_shared();
109672
- import { existsSync as existsSync56, readFileSync as readFileSync36 } from "fs";
109673
- import { homedir as homedir19 } from "os";
109674
- import { join as join82 } from "path";
109866
+ import { existsSync as existsSync57, readFileSync as readFileSync36 } from "fs";
109867
+ import { homedir as homedir20 } from "os";
109868
+ import { join as join84 } from "path";
109675
109869
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
109676
109870
  function getMcpConfigPaths() {
109677
109871
  return [
109678
- join82(homedir19(), ".claude", ".mcp.json"),
109679
- join82(process.cwd(), ".mcp.json"),
109680
- join82(process.cwd(), ".claude", ".mcp.json")
109872
+ join84(homedir20(), ".claude", ".mcp.json"),
109873
+ join84(process.cwd(), ".mcp.json"),
109874
+ join84(process.cwd(), ".claude", ".mcp.json")
109681
109875
  ];
109682
109876
  }
109683
109877
  function loadUserMcpConfig() {
109684
109878
  const servers = {};
109685
109879
  for (const configPath of getMcpConfigPaths()) {
109686
- if (!existsSync56(configPath))
109880
+ if (!existsSync57(configPath))
109687
109881
  continue;
109688
109882
  try {
109689
109883
  const content = readFileSync36(configPath, "utf-8");
@@ -109821,12 +110015,12 @@ async function checkTools() {
109821
110015
 
109822
110016
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
109823
110017
  init_src5();
109824
- import { existsSync as existsSync57, readFileSync as readFileSync37 } from "fs";
110018
+ import { existsSync as existsSync58, readFileSync as readFileSync37 } from "fs";
109825
110019
  function isTelemetryState(value) {
109826
110020
  return value !== null && typeof value === "object" && !Array.isArray(value);
109827
110021
  }
109828
110022
  function readLastActiveDay(stateFilePath) {
109829
- if (!existsSync57(stateFilePath)) {
110023
+ if (!existsSync58(stateFilePath)) {
109830
110024
  return "never";
109831
110025
  }
109832
110026
  let parsed;
@@ -109889,17 +110083,17 @@ async function probeBinary(cmd, args, spawnImpl) {
109889
110083
  }
109890
110084
 
109891
110085
  // packages/team-core/src/team-registry/paths.ts
109892
- import { homedir as homedir20 } from "os";
110086
+ import { homedir as homedir21 } from "os";
109893
110087
  import path12 from "path";
109894
110088
  function resolveBaseDir(config4) {
109895
- return expandHomeDirectory(config4.base_dir ?? path12.join(homedir20(), ".omo"));
110089
+ return expandHomeDirectory(config4.base_dir ?? path12.join(homedir21(), ".omo"));
109896
110090
  }
109897
110091
  function expandHomeDirectory(directoryPath3) {
109898
110092
  if (directoryPath3 === "~") {
109899
- return homedir20();
110093
+ return homedir21();
109900
110094
  }
109901
110095
  if (directoryPath3.startsWith("~/") || directoryPath3.startsWith("~\\")) {
109902
- return path12.join(homedir20(), directoryPath3.slice(2));
110096
+ return path12.join(homedir21(), directoryPath3.slice(2));
109903
110097
  }
109904
110098
  return directoryPath3;
109905
110099
  }
@@ -109956,10 +110150,10 @@ async function pathExists(dir) {
109956
110150
 
109957
110151
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
109958
110152
  init_src2();
109959
- import { existsSync as existsSync58 } from "fs";
110153
+ import { existsSync as existsSync59 } from "fs";
109960
110154
  import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "fs/promises";
109961
- import { homedir as homedir21 } from "os";
109962
- import { basename as basename11, join as join83, resolve as resolve23 } from "path";
110155
+ import { homedir as homedir22 } from "os";
110156
+ import { basename as basename11, join as join85, resolve as resolve24 } from "path";
109963
110157
  // packages/omo-opencode/package.json
109964
110158
  var package_default3 = {
109965
110159
  name: "@oh-my-opencode/omo-opencode",
@@ -110024,13 +110218,13 @@ var CODEX_BIN_NAMES = [
110024
110218
  "omo-git-bash-hook"
110025
110219
  ];
110026
110220
  async function gatherCodexSummary(deps = {}) {
110027
- const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join83(homedir21(), ".codex"));
110221
+ const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir22(), ".codex"));
110028
110222
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110029
110223
  const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
110030
110224
  const pluginRoot = await resolveInstalledPluginRoot(codexHome);
110031
- const manifest2 = pluginRoot === null ? null : await readJson(join83(pluginRoot, ".codex-plugin", "plugin.json"));
110032
- const installSnapshot = pluginRoot === null ? null : await readJson(join83(pluginRoot, "lazycodex-install.json"));
110033
- const configPath = join83(codexHome, "config.toml");
110225
+ const manifest2 = pluginRoot === null ? null : await readJson(join85(pluginRoot, ".codex-plugin", "plugin.json"));
110226
+ const installSnapshot = pluginRoot === null ? null : await readJson(join85(pluginRoot, "lazycodex-install.json"));
110227
+ const configPath = join85(codexHome, "config.toml");
110034
110228
  const pluginVersion = stringField(manifest2, "version");
110035
110229
  return {
110036
110230
  codexPath: detection.found && "path" in detection ? detection.path : null,
@@ -110087,7 +110281,7 @@ function buildCodexIssues(summary) {
110087
110281
  if (summary.pluginRoot === null) {
110088
110282
  issues.push({
110089
110283
  title: "OMO Codex plugin is not installed",
110090
- description: `Expected cached plugin at ${join83("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
110284
+ description: `Expected cached plugin at ${join85("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
110091
110285
  fix: "Run: npx lazycodex-ai install",
110092
110286
  severity: "error",
110093
110287
  affects: ["plugin loading"]
@@ -110152,15 +110346,15 @@ function buildCodexIssues(summary) {
110152
110346
  return issues;
110153
110347
  }
110154
110348
  async function resolveInstalledPluginRoot(codexHome) {
110155
- const pluginRoot = join83(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110156
- if (!existsSync58(pluginRoot))
110349
+ const pluginRoot = join85(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110350
+ if (!existsSync59(pluginRoot))
110157
110351
  return null;
110158
110352
  const versions2 = await readdir14(pluginRoot, { withFileTypes: true });
110159
110353
  const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
110160
- return candidates.length === 0 ? null : join83(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110354
+ return candidates.length === 0 ? null : join85(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110161
110355
  }
110162
110356
  async function readCodexConfigSummary(configPath) {
110163
- if (!existsSync58(configPath)) {
110357
+ if (!existsSync59(configPath)) {
110164
110358
  return {
110165
110359
  exists: false,
110166
110360
  marketplaceConfigured: false,
@@ -110185,14 +110379,14 @@ async function readCodexConfigSummary(configPath) {
110185
110379
  async function readLinkedBins(binDir) {
110186
110380
  const linked = [];
110187
110381
  for (const name of CODEX_BIN_NAMES) {
110188
- if (await pathExists2(join83(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110382
+ if (await pathExists2(join85(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110189
110383
  linked.push(name);
110190
110384
  }
110191
110385
  return linked;
110192
110386
  }
110193
110387
  async function readLinkedAgents(codexHome) {
110194
- const agentsDir = join83(codexHome, "agents");
110195
- if (!existsSync58(agentsDir))
110388
+ const agentsDir = join85(codexHome, "agents");
110389
+ if (!existsSync59(agentsDir))
110196
110390
  return [];
110197
110391
  const entries = await readdir14(agentsDir, { withFileTypes: true });
110198
110392
  return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename11(entry.name, ".toml")).sort();
@@ -110306,8 +110500,8 @@ async function pathExists2(path14) {
110306
110500
  // packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
110307
110501
  init_src2();
110308
110502
  import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
110309
- import { homedir as homedir22 } from "os";
110310
- import { dirname as dirname32, isAbsolute as isAbsolute12, join as join84, relative as relative9, resolve as resolve24, sep as sep9 } from "path";
110503
+ import { homedir as homedir23 } from "os";
110504
+ import { dirname as dirname33, isAbsolute as isAbsolute12, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
110311
110505
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
110312
110506
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
110313
110507
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
@@ -110317,7 +110511,7 @@ async function checkCodexComponents(deps = {}) {
110317
110511
  const env3 = deps.env ?? process.env;
110318
110512
  const platform = deps.platform ?? process.platform;
110319
110513
  const arch = deps.arch ?? process.arch;
110320
- const codexHome = resolve24(deps.codexHome ?? env3["CODEX_HOME"] ?? join84(homedir22(), ".codex"));
110514
+ const codexHome = resolve25(deps.codexHome ?? env3["CODEX_HOME"] ?? join86(homedir23(), ".codex"));
110321
110515
  const summary = await gatherCodexSummary({ ...deps, codexHome });
110322
110516
  if (summary.pluginRoot === null) {
110323
110517
  return {
@@ -110342,7 +110536,7 @@ async function checkCodexComponents(deps = {}) {
110342
110536
  });
110343
110537
  }
110344
110538
  const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
110345
- const runtimeSgPath = join84(runtimeSgDir, sgBinaryName(platform));
110539
+ const runtimeSgPath = join86(runtimeSgDir, sgBinaryName(platform));
110346
110540
  const sg = findSgBinarySync({
110347
110541
  arch,
110348
110542
  env: env3,
@@ -110381,8 +110575,8 @@ async function auditBundleTargets(pluginRoot) {
110381
110575
  const manifest2 = await readJson2(manifestPath);
110382
110576
  if (manifest2 === null || !isRecord12(manifest2["mcpServers"]))
110383
110577
  continue;
110384
- const manifestRoot = dirname32(manifestPath);
110385
- const isRootManifest = resolve24(manifestRoot) === resolve24(pluginRoot);
110578
+ const manifestRoot = dirname33(manifestPath);
110579
+ const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
110386
110580
  for (const server2 of Object.values(manifest2["mcpServers"])) {
110387
110581
  if (!isRecord12(server2) || !Array.isArray(server2["args"]))
110388
110582
  continue;
@@ -110402,7 +110596,7 @@ async function auditBundleTargets(pluginRoot) {
110402
110596
  continue;
110403
110597
  const commands2 = [];
110404
110598
  collectHookCommands(manifest2, commands2);
110405
- const hookPluginRoot = dirname32(dirname32(hookManifestPath));
110599
+ const hookPluginRoot = dirname33(dirname33(hookManifestPath));
110406
110600
  for (const command of commands2) {
110407
110601
  for (const relativePath of extractPluginRootPaths(command)) {
110408
110602
  referencedCount += 1;
@@ -110424,8 +110618,8 @@ function recordBrokenTarget(broken, classified, origin) {
110424
110618
  broken.push(entry);
110425
110619
  }
110426
110620
  async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEscape) {
110427
- const targetPath = resolve24(baseRoot, relativePath);
110428
- const bundleRootPath = resolve24(bundleRoot);
110621
+ const targetPath = resolve25(baseRoot, relativePath);
110622
+ const bundleRootPath = resolve25(bundleRoot);
110429
110623
  const bundleRootPrefix = bundleRootPath.endsWith(sep9) ? bundleRootPath : `${bundleRootPath}${sep9}`;
110430
110624
  if (targetPath !== bundleRootPath && !targetPath.startsWith(bundleRootPrefix)) {
110431
110625
  if (allowEscape)
@@ -110441,7 +110635,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
110441
110635
  }
110442
110636
  async function findHookManifestPaths(root) {
110443
110637
  const paths3 = await findManifestPaths(root, "hooks.json");
110444
- return paths3.filter((path14) => dirname32(path14).endsWith(`${sep9}hooks`));
110638
+ return paths3.filter((path14) => dirname33(path14).endsWith(`${sep9}hooks`));
110445
110639
  }
110446
110640
  async function findManifestPaths(root, manifestName) {
110447
110641
  let entries;
@@ -110454,7 +110648,7 @@ async function findManifestPaths(root, manifestName) {
110454
110648
  for (const entry of entries) {
110455
110649
  if (entry.name === "node_modules" || entry.name === ".git")
110456
110650
  continue;
110457
- const entryPath = join84(root, entry.name);
110651
+ const entryPath = join86(root, entry.name);
110458
110652
  if (entry.isDirectory()) {
110459
110653
  paths3.push(...await findManifestPaths(entryPath, manifestName));
110460
110654
  continue;
@@ -110498,18 +110692,18 @@ function isPluginRuntimePathArg(arg) {
110498
110692
  return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));
110499
110693
  }
110500
110694
  function runtimeSgDirectory(codexHome, platform, arch) {
110501
- return join84(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110695
+ return join86(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110502
110696
  }
110503
110697
  function describeSgSource(sgPath, env3, runtimeSgDir, platform) {
110504
110698
  const override = env3[SG_PATH_ENV_KEY]?.trim();
110505
110699
  if (override !== undefined && override.length > 0 && sgPath === override)
110506
110700
  return `env override ${SG_PATH_ENV_KEY}`;
110507
- if (sgPath === join84(runtimeSgDir, sgBinaryName(platform)))
110701
+ if (sgPath === join86(runtimeSgDir, sgBinaryName(platform)))
110508
110702
  return "runtime dir";
110509
110703
  return "PATH";
110510
110704
  }
110511
110705
  async function readBootstrapStateSummary(codexHome) {
110512
- const statePath = join84(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110706
+ const statePath = join86(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110513
110707
  const raw = await readJson2(statePath);
110514
110708
  if (raw === null)
110515
110709
  return null;
@@ -110585,24 +110779,24 @@ function isRecord12(value) {
110585
110779
  }
110586
110780
 
110587
110781
  // packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
110588
- import { existsSync as existsSync59 } from "fs";
110782
+ import { existsSync as existsSync60 } from "fs";
110589
110783
  import { readFile as readFile29 } from "fs/promises";
110590
- import { homedir as homedir23 } from "os";
110591
- import { join as join85, resolve as resolve25 } from "path";
110784
+ import { homedir as homedir24 } from "os";
110785
+ import { join as join87, resolve as resolve26 } from "path";
110592
110786
  var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
110593
110787
  var CHECK_NAME = "codex-runtime-wrapper";
110594
110788
  var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
110595
110789
  async function checkCodexRuntimeWrapper(deps = {}) {
110596
- const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir23(), ".codex"));
110790
+ const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join87(homedir24(), ".codex"));
110597
110791
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110598
110792
  const platform = deps.platform ?? process.platform;
110599
- const wrapperPath = join85(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110600
- const legacyWrapperPath = join85(binDir, platform === "win32" ? "omo.cmd" : "omo");
110793
+ const wrapperPath = join87(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110794
+ const legacyWrapperPath = join87(binDir, platform === "win32" ? "omo.cmd" : "omo");
110601
110795
  const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
110602
110796
  const issues = [];
110603
110797
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
110604
110798
  const targetPath = parseRuntimeTargetPath(wrapper);
110605
- if (targetPath !== null && !existsSync59(targetPath)) {
110799
+ if (targetPath !== null && !existsSync60(targetPath)) {
110606
110800
  issues.push({
110607
110801
  title: "omo-agent-toolkit runtime wrapper target is missing",
110608
110802
  description: `Generated omo-agent-toolkit runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
@@ -111117,7 +111311,7 @@ Doctor failed unexpectedly: ${message}`];
111117
111311
  import { createHash as createHash6 } from "crypto";
111118
111312
  import {
111119
111313
  chmodSync as chmodSync5,
111120
- existsSync as existsSync62,
111314
+ existsSync as existsSync63,
111121
111315
  mkdirSync as mkdirSync15,
111122
111316
  readdirSync as readdirSync11,
111123
111317
  readFileSync as readFileSync39,
@@ -111125,15 +111319,15 @@ import {
111125
111319
  unlinkSync as unlinkSync9,
111126
111320
  writeFileSync as writeFileSync12
111127
111321
  } from "fs";
111128
- import { basename as basename12, dirname as dirname33, join as join88 } from "path";
111322
+ import { basename as basename12, dirname as dirname34, join as join90 } from "path";
111129
111323
 
111130
111324
  // packages/mcp-client-core/src/config-dir.ts
111131
- import { existsSync as existsSync60, realpathSync as realpathSync8 } from "fs";
111132
- import { homedir as homedir24 } from "os";
111133
- import { join as join86, resolve as resolve26 } from "path";
111325
+ import { existsSync as existsSync61, realpathSync as realpathSync8 } from "fs";
111326
+ import { homedir as homedir25 } from "os";
111327
+ import { join as join88, resolve as resolve27 } from "path";
111134
111328
  function resolveConfigPath2(pathValue) {
111135
- const resolvedPath = resolve26(pathValue);
111136
- if (!existsSync60(resolvedPath))
111329
+ const resolvedPath = resolve27(pathValue);
111330
+ if (!existsSync61(resolvedPath))
111137
111331
  return resolvedPath;
111138
111332
  try {
111139
111333
  return realpathSync8(resolvedPath);
@@ -111148,13 +111342,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {
111148
111342
  if (customConfigDir) {
111149
111343
  return resolveConfigPath2(customConfigDir);
111150
111344
  }
111151
- const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join86(homedir24(), ".config");
111152
- return resolveConfigPath2(join86(xdgConfigDir, "opencode"));
111345
+ const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join88(homedir25(), ".config");
111346
+ return resolveConfigPath2(join88(xdgConfigDir, "opencode"));
111153
111347
  }
111154
111348
 
111155
111349
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
111156
- import { chmodSync as chmodSync4, existsSync as existsSync61, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "fs";
111157
- import { join as join87 } from "path";
111350
+ import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "fs";
111351
+ import { join as join89 } from "path";
111158
111352
  var INDEX_FILE_NAME = "index.json";
111159
111353
  function isTokenIndex(value) {
111160
111354
  if (typeof value !== "object" || value === null || Array.isArray(value))
@@ -111162,11 +111356,11 @@ function isTokenIndex(value) {
111162
111356
  return Object.values(value).every((entry) => typeof entry === "string");
111163
111357
  }
111164
111358
  function getIndexPath(storageDir) {
111165
- return join87(storageDir, INDEX_FILE_NAME);
111359
+ return join89(storageDir, INDEX_FILE_NAME);
111166
111360
  }
111167
111361
  function readTokenIndex(storageDir) {
111168
111362
  const indexPath = getIndexPath(storageDir);
111169
- if (!existsSync61(indexPath))
111363
+ if (!existsSync62(indexPath))
111170
111364
  return {};
111171
111365
  try {
111172
111366
  const parsed = JSON.parse(readFileSync38(indexPath, "utf-8"));
@@ -111206,16 +111400,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {
111206
111400
  var STORAGE_DIR_NAME = "mcp-oauth";
111207
111401
  var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
111208
111402
  function getMcpOauthStorageDir() {
111209
- return join88(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111403
+ return join90(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111210
111404
  }
111211
111405
  function getMcpOauthServerHash(serverHost, resource) {
111212
111406
  return createHash6("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
111213
111407
  }
111214
111408
  function getMcpOauthStoragePath(serverHost, resource) {
111215
- return join88(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111409
+ return join90(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111216
111410
  }
111217
111411
  function getLegacyStoragePath() {
111218
- return join88(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111412
+ return join90(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111219
111413
  }
111220
111414
  function normalizeHost2(serverHost) {
111221
111415
  let host = serverHost.trim();
@@ -111276,7 +111470,7 @@ function isOAuthTokenData(value) {
111276
111470
  return clientSecret === undefined || typeof clientSecret === "string";
111277
111471
  }
111278
111472
  function readTokenFile(filePath) {
111279
- if (!existsSync62(filePath))
111473
+ if (!existsSync63(filePath))
111280
111474
  return null;
111281
111475
  try {
111282
111476
  const parsed = JSON.parse(readFileSync39(filePath, "utf-8"));
@@ -111289,7 +111483,7 @@ function readTokenFile(filePath) {
111289
111483
  }
111290
111484
  function readLegacyStore() {
111291
111485
  const filePath = getLegacyStoragePath();
111292
- if (!existsSync62(filePath))
111486
+ if (!existsSync63(filePath))
111293
111487
  return null;
111294
111488
  try {
111295
111489
  const parsed = JSON.parse(readFileSync39(filePath, "utf-8"));
@@ -111309,8 +111503,8 @@ function readLegacyStore() {
111309
111503
  }
111310
111504
  function writeTokenFile(filePath, token) {
111311
111505
  try {
111312
- const dir = dirname33(filePath);
111313
- if (!existsSync62(dir)) {
111506
+ const dir = dirname34(filePath);
111507
+ if (!existsSync63(dir)) {
111314
111508
  mkdirSync15(dir, { recursive: true });
111315
111509
  }
111316
111510
  const tempPath = `${filePath}.tmp.${Date.now()}`;
@@ -111334,7 +111528,7 @@ function saveToken(serverHost, resource, token) {
111334
111528
  }
111335
111529
  function deleteToken(serverHost, resource) {
111336
111530
  const filePath = getMcpOauthStoragePath(serverHost, resource);
111337
- if (!existsSync62(filePath))
111531
+ if (!existsSync63(filePath))
111338
111532
  return deleteLegacyToken(serverHost, resource);
111339
111533
  try {
111340
111534
  unlinkSync9(filePath);
@@ -111356,7 +111550,7 @@ function deleteLegacyToken(serverHost, resource) {
111356
111550
  if (Object.keys(store2).length === 0) {
111357
111551
  try {
111358
111552
  const filePath = getLegacyStoragePath();
111359
- if (existsSync62(filePath))
111553
+ if (existsSync63(filePath))
111360
111554
  unlinkSync9(filePath);
111361
111555
  return true;
111362
111556
  } catch (deleteError) {
@@ -111394,7 +111588,7 @@ function listTokensByHost(serverHost) {
111394
111588
  for (const [hash2, indexedKey] of Object.entries(index)) {
111395
111589
  if (!indexedKey.startsWith(prefix))
111396
111590
  continue;
111397
- const indexedToken = readTokenFile(join88(getMcpOauthStorageDir(), `${hash2}.json`));
111591
+ const indexedToken = readTokenFile(join90(getMcpOauthStorageDir(), `${hash2}.json`));
111398
111592
  if (indexedToken)
111399
111593
  result[indexedKey] = indexedToken;
111400
111594
  }
@@ -111403,13 +111597,13 @@ function listTokensByHost(serverHost) {
111403
111597
  function listAllTokens() {
111404
111598
  const result = { ...readLegacyStore() ?? {} };
111405
111599
  const dir = getMcpOauthStorageDir();
111406
- if (!existsSync62(dir))
111600
+ if (!existsSync63(dir))
111407
111601
  return result;
111408
111602
  const index = readTokenIndex(dir);
111409
111603
  for (const entry of readdirSync11(dir, { withFileTypes: true })) {
111410
111604
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
111411
111605
  continue;
111412
- const token = readTokenFile(join88(dir, entry.name));
111606
+ const token = readTokenFile(join90(dir, entry.name));
111413
111607
  const hash2 = basename12(entry.name, ".json");
111414
111608
  if (token)
111415
111609
  result[index[hash2] ?? hash2] = token;
@@ -111609,7 +111803,7 @@ function buildAuthorizationUrl(authorizationEndpoint, options) {
111609
111803
  }
111610
111804
  var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
111611
111805
  function startCallbackServer(port) {
111612
- return new Promise((resolve27, reject) => {
111806
+ return new Promise((resolve28, reject) => {
111613
111807
  let timeoutId;
111614
111808
  const server2 = createServer2((request, response) => {
111615
111809
  clearTimeout(timeoutId);
@@ -111635,7 +111829,7 @@ function startCallbackServer(port) {
111635
111829
  response.writeHead(200, { "content-type": "text/html" });
111636
111830
  response.end("<html><body><h1>Authorization successful. You can close this tab.</h1></body></html>");
111637
111831
  server2.close();
111638
- resolve27({ code, state: state2 });
111832
+ resolve28({ code, state: state2 });
111639
111833
  });
111640
111834
  timeoutId = setTimeout(() => {
111641
111835
  server2.close();
@@ -111975,7 +112169,7 @@ function createMcpOAuthCommand() {
111975
112169
  }
111976
112170
 
111977
112171
  // packages/omo-opencode/src/cli/boulder/boulder.ts
111978
- import { existsSync as existsSync63 } from "fs";
112172
+ import { existsSync as existsSync64 } from "fs";
111979
112173
 
111980
112174
  // packages/omo-opencode/src/cli/boulder/formatter.ts
111981
112175
  var import_picocolors22 = __toESM(require_picocolors(), 1);
@@ -112112,10 +112306,10 @@ async function boulder(options) {
112112
112306
  const boulderFilePath = getBoulderFilePath(directory);
112113
112307
  const state2 = readBoulderState(directory);
112114
112308
  if (!state2) {
112115
- const message = existsSync63(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112309
+ const message = existsSync64(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112116
112310
  process.stderr.write(`${message}
112117
112311
  `);
112118
- return existsSync63(boulderFilePath) ? 2 : 1;
112312
+ return existsSync64(boulderFilePath) ? 2 : 1;
112119
112313
  }
112120
112314
  const works = getBoulderWorks(state2);
112121
112315
  const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
@@ -112133,12 +112327,12 @@ async function boulder(options) {
112133
112327
  }
112134
112328
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
112135
112329
  import { spawn as spawn5 } from "child_process";
112136
- import { existsSync as existsSync64, readFileSync as readFileSync40, realpathSync as realpathSync9 } from "fs";
112137
- import { homedir as homedir25 } from "os";
112330
+ import { existsSync as existsSync65, readFileSync as readFileSync40, realpathSync as realpathSync9 } from "fs";
112331
+ import { homedir as homedir26 } from "os";
112138
112332
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
112139
112333
  function resolveCodexUlwLoopCommand(input = {}) {
112140
112334
  const env3 = input.env ?? process.env;
112141
- const homeDir = input.homeDir ?? homedir25();
112335
+ const homeDir = input.homeDir ?? homedir26();
112142
112336
  const localComponentBin = resolveLocalUlwLoopBin(env3, homeDir);
112143
112337
  if (localComponentBin !== null)
112144
112338
  return { executable: localComponentBin, argsPrefix: [] };
@@ -112161,25 +112355,25 @@ async function codexUlwLoop(args) {
112161
112355
  console.error("Codex ulw-loop is not installed. Run: npx lazycodex-ai@latest install --no-tui");
112162
112356
  return 1;
112163
112357
  }
112164
- const { promise: promise2, resolve: resolve27 } = Promise.withResolvers();
112358
+ const { promise: promise2, resolve: resolve28 } = Promise.withResolvers();
112165
112359
  const child = spawn5(command.executable, [...command.argsPrefix, ...args], {
112166
112360
  stdio: "inherit",
112167
112361
  env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }
112168
112362
  });
112169
112363
  child.on("error", (error51) => {
112170
112364
  console.error(error51.message);
112171
- resolve27(1);
112365
+ resolve28(1);
112172
112366
  });
112173
- child.on("close", (code) => resolve27(code ?? 1));
112367
+ child.on("close", (code) => resolve28(code ?? 1));
112174
112368
  return promise2;
112175
112369
  }
112176
112370
  function resolveLocalUlwLoopBin(env3, homeDir) {
112177
112371
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env: env3, homeDir });
112178
- return candidates.find((candidate2) => existsSync64(candidate2)) ?? null;
112372
+ return candidates.find((candidate2) => existsSync65(candidate2)) ?? null;
112179
112373
  }
112180
112374
  function resolveLegacyLocalOmoBin(env3, homeDir, currentExecutablePaths) {
112181
112375
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env: env3, homeDir });
112182
- return candidates.find((candidate2) => existsSync64(candidate2) && !isCurrentExecutable(candidate2, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate2)) ?? null;
112376
+ return candidates.find((candidate2) => existsSync65(candidate2) && !isCurrentExecutable(candidate2, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate2)) ?? null;
112183
112377
  }
112184
112378
  function isGeneratedRuntimeWrapper(candidate2) {
112185
112379
  try {