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

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 (97) hide show
  1. package/README.md +12 -1
  2. package/dist/cli/index.js +341 -214
  3. package/dist/cli-node/index.js +341 -214
  4. package/dist/index.js +1217 -1112
  5. package/dist/skills/coding-agent-sessions/SKILL.md +3 -2
  6. package/dist/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  7. package/dist/skills/coding-agent-sessions/references/senpi.md +4 -4
  8. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  9. package/dist/tui.js +97 -5
  10. package/package.json +15 -14
  11. package/packages/lsp-core/src/lsp/client-wrapper.test.ts +60 -7
  12. package/packages/lsp-core/src/lsp/client-wrapper.ts +69 -16
  13. package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
  14. package/packages/lsp-core/src/tools/diagnostics.ts +3 -3
  15. package/packages/lsp-core/src/tools/navigation.ts +4 -2
  16. package/packages/lsp-core/src/tools/rename.ts +4 -2
  17. package/packages/lsp-core/src/tools/symbols.ts +1 -1
  18. package/packages/lsp-daemon/dist/cli.js +83 -29
  19. package/packages/lsp-daemon/dist/client.js +76 -22
  20. package/packages/lsp-daemon/dist/index.js +81 -27
  21. package/packages/lsp-tools-mcp/dist/cli.js +76 -22
  22. package/packages/lsp-tools-mcp/dist/mcp.js +76 -22
  23. package/packages/lsp-tools-mcp/dist/tools.js +76 -22
  24. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  25. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  26. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  27. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +90 -4
  28. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +90 -4
  29. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  31. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  32. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  33. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  34. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  35. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  36. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  37. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +83 -29
  38. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  39. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  40. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  41. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  43. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  45. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  46. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +24 -12
  47. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +24 -12
  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/ulw-loop/directive.md +6 -0
  55. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  56. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +3 -2
  58. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +106 -0
  59. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -0
  60. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  61. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  62. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  63. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  64. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  65. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  66. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  83. package/packages/omo-codex/plugin/package-lock.json +13 -13
  84. package/packages/omo-codex/plugin/package.json +1 -1
  85. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
  86. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  87. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
  88. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  89. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +6 -0
  90. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -2
  91. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +106 -0
  92. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -0
  93. package/packages/omo-codex/scripts/install-dist/install-local.mjs +39 -16
  94. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
  95. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  96. package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
  97. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
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.5",
2148
+ version: "5.0.0-beta.7",
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-2",
2328
+ "@code-yeongyu/senpi": "2026.8.12-4",
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:*",
@@ -2341,6 +2341,7 @@ var init_package = __esm(() => {
2341
2341
  "@oh-my-opencode/model-core": "workspace:*",
2342
2342
  "@oh-my-opencode/omo-codex": "workspace:*",
2343
2343
  "@oh-my-opencode/omo-config-core": "workspace:*",
2344
+ "@oh-my-opencode/omo-opencode": "workspace:*",
2344
2345
  "@oh-my-opencode/omo-senpi": "workspace:*",
2345
2346
  "@oh-my-opencode/openclaw-core": "workspace:*",
2346
2347
  "@oh-my-opencode/pi-goal": "workspace:*",
@@ -2365,18 +2366,18 @@ var init_package = __esm(() => {
2365
2366
  typescript: "^7.0.2"
2366
2367
  },
2367
2368
  optionalDependencies: {
2368
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.5",
2369
- "oh-my-opencode-darwin-x64": "5.0.0-beta.5",
2370
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.5",
2371
- "oh-my-opencode-linux-arm64": "5.0.0-beta.5",
2372
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.5",
2373
- "oh-my-opencode-linux-x64": "5.0.0-beta.5",
2374
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.5",
2375
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.5",
2376
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.5",
2377
- "oh-my-opencode-windows-arm64": "5.0.0-beta.5",
2378
- "oh-my-opencode-windows-x64": "5.0.0-beta.5",
2379
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.5"
2369
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.7",
2370
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.7",
2371
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.7",
2372
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.7",
2373
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.7",
2374
+ "oh-my-opencode-linux-x64": "5.0.0-beta.7",
2375
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.7",
2376
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.7",
2377
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.7",
2378
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.7",
2379
+ "oh-my-opencode-windows-x64": "5.0.0-beta.7",
2380
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.7"
2380
2381
  },
2381
2382
  overrides: {
2382
2383
  "@earendil-works/pi-agent-core": "0.80.3",
@@ -22404,15 +22405,16 @@ var init_codegraph = __esm(() => {
22404
22405
  });
22405
22406
 
22406
22407
  // packages/omo-config-core/src/schema/memory.ts
22407
- 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;
22408
22409
  var init_memory = __esm(() => {
22409
22410
  init_zod();
22410
22411
  OmoMemoryReflectionTriggerSchema = object({
22411
- step_count: number2().int().nonnegative().default(0),
22412
+ step_count: number2().int().nonnegative().default(25),
22412
22413
  on_compaction: boolean2().default(true)
22413
22414
  }).strict();
22414
22415
  OmoMemoryReflectionSchema = object({
22415
- trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 0, on_compaction: true }),
22416
+ enabled: boolean2().default(true),
22417
+ trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 25, on_compaction: true }),
22416
22418
  merge: _enum2(["auto", "integration"]).default("auto"),
22417
22419
  category: string2().min(1).default("quick"),
22418
22420
  timeout_minutes: number2().int().positive().default(15),
@@ -22425,11 +22427,36 @@ var init_memory = __esm(() => {
22425
22427
  OmoMemorySearchSchema = object({
22426
22428
  enabled: boolean2().default(true)
22427
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();
22428
22454
  OmoMemoryReflectionTriggerLayerSchema = object({
22429
22455
  step_count: number2().int().nonnegative().optional(),
22430
22456
  on_compaction: boolean2().optional()
22431
22457
  }).strict();
22432
22458
  OmoMemoryReflectionLayerSchema = object({
22459
+ enabled: boolean2().optional(),
22433
22460
  trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
22434
22461
  merge: _enum2(["auto", "integration"]).optional(),
22435
22462
  category: string2().min(1).optional(),
@@ -22443,10 +22470,39 @@ var init_memory = __esm(() => {
22443
22470
  OmoMemorySearchLayerSchema = object({
22444
22471
  enabled: boolean2().optional()
22445
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();
22446
22497
  OmoMemoryAgentOverridesSchema = object({
22447
22498
  enabled: boolean2().optional(),
22448
22499
  agent: string2().min(1).optional(),
22449
22500
  reflection: OmoMemoryReflectionLayerSchema.optional(),
22501
+ nudge: OmoMemoryNudgeLayerSchema.optional(),
22502
+ facts: OmoMemoryFactsLayerSchema.optional(),
22503
+ dream: OmoMemoryDreamLayerSchema.optional(),
22504
+ people: OmoMemoryPeopleLayerSchema.optional(),
22505
+ soul: OmoMemorySoulLayerSchema.optional(),
22450
22506
  sync: OmoMemorySyncLayerSchema.optional(),
22451
22507
  search: OmoMemorySearchLayerSchema.optional(),
22452
22508
  compile_warn_tokens: number2().int().positive().optional()
@@ -22456,12 +22512,25 @@ var init_memory = __esm(() => {
22456
22512
  agent: string2().min(1).default("auto"),
22457
22513
  tool_exposure: _enum2(["direct", "search"]).default("direct"),
22458
22514
  reflection: OmoMemoryReflectionSchema.default({
22459
- trigger: { step_count: 0, on_compaction: true },
22515
+ enabled: true,
22516
+ trigger: { step_count: 25, on_compaction: true },
22460
22517
  merge: "auto",
22461
22518
  category: "quick",
22462
22519
  timeout_minutes: 15,
22463
22520
  sandbox: "auto"
22464
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 }),
22465
22534
  sync: OmoMemorySyncSchema.default({ enabled: true }),
22466
22535
  search: OmoMemorySearchSchema.default({ enabled: true }),
22467
22536
  compile_warn_tokens: number2().int().positive().default(30000),
@@ -22472,6 +22541,11 @@ var init_memory = __esm(() => {
22472
22541
  agent: string2().min(1).optional(),
22473
22542
  tool_exposure: _enum2(["direct", "search"]).optional(),
22474
22543
  reflection: OmoMemoryReflectionLayerSchema.optional(),
22544
+ nudge: OmoMemoryNudgeLayerSchema.optional(),
22545
+ facts: OmoMemoryFactsLayerSchema.optional(),
22546
+ dream: OmoMemoryDreamLayerSchema.optional(),
22547
+ people: OmoMemoryPeopleLayerSchema.optional(),
22548
+ soul: OmoMemorySoulLayerSchema.optional(),
22475
22549
  sync: OmoMemorySyncLayerSchema.optional(),
22476
22550
  search: OmoMemorySearchLayerSchema.optional(),
22477
22551
  compile_warn_tokens: number2().int().positive().optional(),
@@ -22627,6 +22701,19 @@ var init_team = __esm(() => {
22627
22701
  OmoTeamsConfigLayerSchema = record(string2(), OmoTeamSpecLayerSchema);
22628
22702
  });
22629
22703
 
22704
+ // packages/omo-config-core/src/schema/telemetry.ts
22705
+ var OmoTelemetrySettingsShape, OmoTelemetrySettingsLayerSchema, OmoTelemetrySettingsSchema;
22706
+ var init_telemetry = __esm(() => {
22707
+ init_zod();
22708
+ OmoTelemetrySettingsShape = {
22709
+ enabled: boolean2()
22710
+ };
22711
+ OmoTelemetrySettingsLayerSchema = object(OmoTelemetrySettingsShape).partial().strict();
22712
+ OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
22713
+ enabled: boolean2().default(true)
22714
+ }).strict();
22715
+ });
22716
+
22630
22717
  // packages/omo-config-core/src/schema/config.ts
22631
22718
  var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
22632
22719
  var init_config = __esm(() => {
@@ -22638,6 +22725,7 @@ var init_config = __esm(() => {
22638
22725
  init_model_catalog();
22639
22726
  init_task();
22640
22727
  init_team();
22728
+ init_telemetry();
22641
22729
  OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
22642
22730
  OmoTypedHarnessConfigSchema = object({
22643
22731
  categories: OmoCategoriesConfigSchema.optional(),
@@ -22646,7 +22734,8 @@ var init_config = __esm(() => {
22646
22734
  task: OmoTaskSettingsLayerSchema.optional(),
22647
22735
  teams: OmoTeamsConfigLayerSchema.optional(),
22648
22736
  models: OmoModelCatalogLayerSchema.optional(),
22649
- memory: OmoMemorySettingsLayerSchema.optional()
22737
+ memory: OmoMemorySettingsLayerSchema.optional(),
22738
+ telemetry: OmoTelemetrySettingsLayerSchema.optional()
22650
22739
  }).strict();
22651
22740
  OmoConfigProfileSchema = object({
22652
22741
  categories: OmoCategoriesConfigSchema.optional(),
@@ -22656,6 +22745,7 @@ var init_config = __esm(() => {
22656
22745
  teams: OmoTeamsConfigLayerSchema.optional(),
22657
22746
  models: OmoModelCatalogLayerSchema.optional(),
22658
22747
  memory: OmoMemorySettingsLayerSchema.optional(),
22748
+ telemetry: OmoTelemetrySettingsLayerSchema.optional(),
22659
22749
  "[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
22660
22750
  "[senpi]": OmoTypedHarnessConfigSchema.optional(),
22661
22751
  "[codex]": OmoTypedHarnessConfigSchema.optional()
@@ -22669,6 +22759,7 @@ var init_config = __esm(() => {
22669
22759
  teams: OmoTeamsConfigSchema.optional(),
22670
22760
  models: OmoModelCatalogSchema.optional(),
22671
22761
  memory: OmoMemorySettingsSchema.optional(),
22762
+ telemetry: OmoTelemetrySettingsSchema.optional(),
22672
22763
  "[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
22673
22764
  "[senpi]": OmoTypedHarnessConfigSchema.optional(),
22674
22765
  "[codex]": OmoTypedHarnessConfigSchema.optional(),
@@ -22685,6 +22776,7 @@ var init_config = __esm(() => {
22685
22776
  teams: OmoTeamsConfigLayerSchema.optional(),
22686
22777
  models: OmoModelCatalogLayerSchema.optional(),
22687
22778
  memory: OmoMemorySettingsLayerSchema.optional(),
22779
+ telemetry: OmoTelemetrySettingsLayerSchema.optional(),
22688
22780
  "[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
22689
22781
  "[senpi]": OmoTypedHarnessConfigSchema.optional(),
22690
22782
  "[codex]": OmoTypedHarnessConfigSchema.optional(),
@@ -22707,6 +22799,7 @@ var init_schema = __esm(() => {
22707
22799
  init_model_ref();
22708
22800
  init_task();
22709
22801
  init_team();
22802
+ init_telemetry();
22710
22803
  });
22711
22804
 
22712
22805
  // packages/omo-config-core/src/loader/merge.ts
@@ -88714,7 +88807,7 @@ var init_activity_state = __esm(() => {
88714
88807
  });
88715
88808
 
88716
88809
  // packages/telemetry-core/src/constants.ts
88717
- var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
88810
+ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74", UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
88718
88811
 
88719
88812
  // packages/telemetry-core/src/diagnostics.ts
88720
88813
  import { appendFileSync as appendFileSync2, existsSync as existsSync27, mkdirSync as mkdirSync9, readFileSync as readFileSync13 } from "fs";
@@ -88852,6 +88945,9 @@ function shouldDisableTelemetry(input) {
88852
88945
  const env2 = input.env ?? process.env;
88853
88946
  const globalPrefix = input.globalEnvPrefix ?? "OMO";
88854
88947
  const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
88948
+ if (isDisableFlag(env2["DO_NOT_TRACK"])) {
88949
+ return true;
88950
+ }
88855
88951
  for (const prefix of prefixes) {
88856
88952
  if (isDisableFlag(env2[`${prefix}_DISABLE_POSTHOG`])) {
88857
88953
  return true;
@@ -88865,6 +88961,13 @@ function shouldDisableTelemetry(input) {
88865
88961
  function getTelemetryApiKey(env2 = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
88866
88962
  return env2["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
88867
88963
  }
88964
+ function isConfiguredTelemetryApiKey(apiKey) {
88965
+ const normalized = apiKey.trim();
88966
+ return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
88967
+ }
88968
+ function hasTelemetryApiKey(env2, defaultApiKey) {
88969
+ return isConfiguredTelemetryApiKey(getTelemetryApiKey(env2, defaultApiKey));
88970
+ }
88868
88971
  function getTelemetryHost(env2 = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
88869
88972
  return env2["POSTHOG_HOST"]?.trim() || defaultHost;
88870
88973
  }
@@ -88874,17 +88977,6 @@ var init_env2 = __esm(() => {
88874
88977
  SEND_OPT_OUT_VALUES = ["0", "false", "no", "yes"];
88875
88978
  });
88876
88979
 
88877
- // packages/telemetry-core/src/machine-id.ts
88878
- import { createHash as createHash4 } from "crypto";
88879
- import os4 from "os";
88880
- function getDefaultTelemetryOsProvider() {
88881
- return os4;
88882
- }
88883
- function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
88884
- return createHash4("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
88885
- }
88886
- var init_machine_id = () => {};
88887
-
88888
88980
  // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
88889
88981
  import { dirname as dirname17, posix as posix7, sep as sep7 } from "path";
88890
88982
  function createModulerModifier() {
@@ -94259,6 +94351,17 @@ var init_index_node = __esm(() => {
94259
94351
  };
94260
94352
  });
94261
94353
 
94354
+ // packages/telemetry-core/src/machine-id.ts
94355
+ import { createHash as createHash4 } from "crypto";
94356
+ import os4 from "os";
94357
+ function getDefaultTelemetryOsProvider() {
94358
+ return os4;
94359
+ }
94360
+ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
94361
+ return createHash4("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
94362
+ }
94363
+ var init_machine_id = () => {};
94364
+
94262
94365
  // packages/telemetry-core/src/posthog-client.ts
94263
94366
  class PostHogTelemetryTransport {
94264
94367
  #client;
@@ -94280,7 +94383,7 @@ function createDefaultPostHogTransport(apiKey, options) {
94280
94383
  }
94281
94384
  function isTelemetryClientEnabled(input) {
94282
94385
  const env2 = input.env ?? process.env;
94283
- return !shouldDisableTelemetry({ env: env2, productEnvPrefix: input.product.productEnvPrefix }) && getTelemetryApiKey(env2, input.product.defaultApiKey).length > 0;
94386
+ return !shouldDisableTelemetry({ env: env2, productEnvPrefix: input.product.productEnvPrefix }) && hasTelemetryApiKey(env2, input.product.defaultApiKey);
94284
94387
  }
94285
94388
  function createTelemetryClient(input) {
94286
94389
  if (!isTelemetryClientEnabled(input)) {
@@ -94346,7 +94449,8 @@ function createTransport(input) {
94346
94449
  flushAt: 1,
94347
94450
  flushInterval: 0,
94348
94451
  host: getTelemetryHost(env2, input.product.defaultHost),
94349
- disableGeoip: false
94452
+ disableGeoip: input.product.disableGeoip ?? false,
94453
+ ...input.product.transportOptions
94350
94454
  });
94351
94455
  } catch (error51) {
94352
94456
  input.diagnostics?.({
@@ -94423,6 +94527,17 @@ var init_posthog_client = __esm(() => {
94423
94527
  };
94424
94528
  });
94425
94529
 
94530
+ // packages/telemetry-core/src/events.ts
94531
+ var ALLOWED_DOLLAR_KEYS;
94532
+ var init_events = __esm(() => {
94533
+ ALLOWED_DOLLAR_KEYS = new Set([
94534
+ "$os",
94535
+ "$os_version",
94536
+ "$process_person_profile",
94537
+ "$session_id"
94538
+ ]);
94539
+ });
94540
+
94426
94541
  // packages/telemetry-core/src/record-daily-active.ts
94427
94542
  var init_record_daily_active = () => {};
94428
94543
 
@@ -94431,6 +94546,7 @@ var init_src5 = __esm(() => {
94431
94546
  init_activity_state();
94432
94547
  init_diagnostics();
94433
94548
  init_env2();
94549
+ init_events();
94434
94550
  init_machine_id();
94435
94551
  init_posthog_client();
94436
94552
  init_record_daily_active();
@@ -94441,7 +94557,7 @@ var package_default2;
94441
94557
  var init_package2 = __esm(() => {
94442
94558
  package_default2 = {
94443
94559
  name: "@oh-my-opencode/omo-codex",
94444
- version: "5.0.0-beta.5",
94560
+ version: "5.0.0-beta.7",
94445
94561
  type: "module",
94446
94562
  private: true,
94447
94563
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -94655,7 +94771,7 @@ __export(exports_telemetry, {
94655
94771
  __resetOsProviderForTesting: () => __resetOsProviderForTesting,
94656
94772
  __resetActivityStateProviderForTesting: () => __resetActivityStateProviderForTesting
94657
94773
  });
94658
- var init_telemetry = __esm(() => {
94774
+ var init_telemetry2 = __esm(() => {
94659
94775
  init_posthog();
94660
94776
  });
94661
94777
 
@@ -95411,19 +95527,19 @@ var init_update_toasts = __esm(() => {
95411
95527
 
95412
95528
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
95413
95529
  import { existsSync as existsSync47 } from "fs";
95414
- import { dirname as dirname29, join as join74 } from "path";
95530
+ import { dirname as dirname30, join as join75 } from "path";
95415
95531
  import { fileURLToPath as fileURLToPath5 } from "url";
95416
95532
  function defaultGetModuleHostingWorkspace() {
95417
95533
  try {
95418
- const currentDir = dirname29(fileURLToPath5(import.meta.url));
95534
+ const currentDir = dirname30(fileURLToPath5(import.meta.url));
95419
95535
  const pkgJsonPath = findPackageJsonUp(currentDir);
95420
95536
  if (!pkgJsonPath)
95421
95537
  return null;
95422
- const pkgDir = dirname29(pkgJsonPath);
95423
- const nodeModulesDir = dirname29(pkgDir);
95538
+ const pkgDir = dirname30(pkgJsonPath);
95539
+ const nodeModulesDir = dirname30(pkgDir);
95424
95540
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
95425
95541
  return null;
95426
- return dirname29(nodeModulesDir);
95542
+ return dirname30(nodeModulesDir);
95427
95543
  } catch (error51) {
95428
95544
  if (error51 instanceof Error) {
95429
95545
  return null;
@@ -95565,7 +95681,7 @@ var init_background_update_check = __esm(() => {
95565
95681
  init_update_toasts();
95566
95682
  defaultDeps4 = {
95567
95683
  existsSync: existsSync47,
95568
- join: join74,
95684
+ join: join75,
95569
95685
  runBunInstallWithDetails,
95570
95686
  log: log2,
95571
95687
  getOpenCodeCacheDir,
@@ -100520,7 +100636,7 @@ async function installAstGrepForCodex(options) {
100520
100636
  // packages/omo-codex/src/install/codex-install-telemetry.ts
100521
100637
  async function trackCodexInstallTelemetry() {
100522
100638
  try {
100523
- const { createInstallPostHog: createInstallPostHog2, getPostHogDistinctId: getPostHogDistinctId2 } = await Promise.resolve().then(() => (init_telemetry(), exports_telemetry));
100639
+ const { createInstallPostHog: createInstallPostHog2, getPostHogDistinctId: getPostHogDistinctId2 } = await Promise.resolve().then(() => (init_telemetry2(), exports_telemetry));
100524
100640
  const posthog = createInstallPostHog2();
100525
100641
  posthog.trackActive(getPostHogDistinctId2(), "install_completed");
100526
100642
  await posthog.shutdown();
@@ -101340,11 +101456,9 @@ function nodeErrorCode6(error51) {
101340
101456
  var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
101341
101457
  // packages/omo-senpi/src/install/install-senpi.ts
101342
101458
  import { execFile as execFile4 } from "child_process";
101343
- import { createHash as createHash5 } from "crypto";
101344
- import { constants as constants8, existsSync as existsSync31 } from "fs";
101345
- import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
101459
+ import { existsSync as existsSync31 } from "fs";
101346
101460
  import { homedir as homedir10 } from "os";
101347
- import { dirname as dirname23, join as join61, resolve as resolve19 } from "path";
101461
+ import { dirname as dirname24, join as join62, resolve as resolve19 } from "path";
101348
101462
  import { fileURLToPath } from "url";
101349
101463
  import { promisify as promisify2 } from "util";
101350
101464
 
@@ -101420,6 +101534,12 @@ node "%~dp0omo" %*\r
101420
101534
  return path6;
101421
101535
  }
101422
101536
 
101537
+ // packages/omo-senpi/src/install/plugin-artifacts.ts
101538
+ import { createHash as createHash5 } from "crypto";
101539
+ import { constants as constants8 } from "fs";
101540
+ import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
101541
+ import { dirname as dirname23, join as join61 } from "path";
101542
+
101423
101543
  // packages/omo-senpi/src/install/senpi-settings.ts
101424
101544
  import { constants as constants7 } from "fs";
101425
101545
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
@@ -101525,11 +101645,15 @@ function isErrno(error51, code) {
101525
101645
  return error51 instanceof Error && "code" in error51 && error51.code === code;
101526
101646
  }
101527
101647
 
101528
- // packages/omo-senpi/src/install/install-senpi.ts
101529
- var execFileAsync2 = promisify2(execFile4);
101648
+ // packages/omo-senpi/src/install/plugin-artifacts.ts
101530
101649
  var REQUIRED_PLUGIN_ARTIFACTS = [
101531
101650
  join61("extensions", "omo.js"),
101651
+ join61("extensions", "omo-task.js"),
101652
+ join61("extensions", "omo-member.js"),
101653
+ join61("extensions", "memory-run-supervisor.mjs"),
101532
101654
  join61("extensions", "reflection-persona.md"),
101655
+ join61("extensions", "dream-persona.md"),
101656
+ join61("extensions", "facts-persona.md"),
101533
101657
  join61("skills", "ast-grep", "SKILL.md"),
101534
101658
  join61("skills", "coding-agent-sessions", "SKILL.md"),
101535
101659
  join61("skills", "debugging", "SKILL.md"),
@@ -101562,47 +101686,6 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
101562
101686
  join61("runtime", "lsp-daemon", "dist", ".omo-runtime-manifest.json"),
101563
101687
  join61("scripts", "install.mjs")
101564
101688
  ];
101565
- async function runSenpiInstaller(options = {}) {
101566
- const context = resolveInstallContext(options);
101567
- await ensurePluginArtifacts(context);
101568
- const settings = await readSettings(context.settingsPath);
101569
- const before = JSON.stringify(settings);
101570
- const packages = dedupePackages(await removeSupersededOmoPackages(removeLegacyBuiltinShadows(dedupePackages(readPackages(settings)), context.repoRoot, context.agentDir), context.pluginPath, context.agentDir));
101571
- if (!packages.includes(context.pluginPath))
101572
- packages.push(context.pluginPath);
101573
- settings.packages = packages;
101574
- const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101575
- installLocalLauncher({
101576
- pluginPath: context.pluginPath,
101577
- senpiCliPath: join61(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101578
- });
101579
- return {
101580
- ok: true,
101581
- action: "install",
101582
- agentDir: context.agentDir,
101583
- settingsPath: context.settingsPath,
101584
- pluginPath: context.pluginPath,
101585
- changed: JSON.stringify(settings) !== before,
101586
- backupPath
101587
- };
101588
- }
101589
- function resolveInstallContext(options) {
101590
- const env3 = options.env ?? process.env;
101591
- const allowBuild = options.pluginPath === undefined;
101592
- const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname23(fileURLToPath(import.meta.url))) : dirname23(resolve19(options.pluginPath))));
101593
- const agentDir = resolve19(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join61(homedir10(), ".senpi", "agent"));
101594
- const pluginPath = resolve19(options.pluginPath ?? join61(repoRoot, "packages", "omo-senpi", "plugin"));
101595
- return {
101596
- env: env3,
101597
- repoRoot,
101598
- agentDir,
101599
- settingsPath: join61(agentDir, "settings.json"),
101600
- pluginPath,
101601
- platform: options.platform ?? process.platform,
101602
- allowBuild,
101603
- runCommand: options.runCommand ?? defaultRunCommand3
101604
- };
101605
- }
101606
101689
  async function ensurePluginArtifacts(context) {
101607
101690
  if (context.allowBuild) {
101608
101691
  await context.runCommand("node", [join61(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });
@@ -101674,6 +101757,63 @@ function astGrepIntegrityError(runtimeEntry, reason) {
101674
101757
  function messageOf(error51) {
101675
101758
  return error51 instanceof Error ? error51.message : String(error51);
101676
101759
  }
101760
+ async function fileExists2(path6) {
101761
+ try {
101762
+ await access2(path6, constants8.F_OK);
101763
+ return true;
101764
+ } catch (error51) {
101765
+ if (isErrno2(error51, "ENOENT"))
101766
+ return false;
101767
+ throw error51;
101768
+ }
101769
+ }
101770
+ function isErrno2(error51, code) {
101771
+ return error51 instanceof Error && "code" in error51 && error51.code === code;
101772
+ }
101773
+
101774
+ // packages/omo-senpi/src/install/install-senpi.ts
101775
+ var execFileAsync2 = promisify2(execFile4);
101776
+ async function runSenpiInstaller(options = {}) {
101777
+ const context = resolveInstallContext(options);
101778
+ await ensurePluginArtifacts(context);
101779
+ const settings = await readSettings(context.settingsPath);
101780
+ const before = JSON.stringify(settings);
101781
+ const packages = dedupePackages(await removeSupersededOmoPackages(removeLegacyBuiltinShadows(dedupePackages(readPackages(settings)), context.repoRoot, context.agentDir), context.pluginPath, context.agentDir));
101782
+ if (!packages.includes(context.pluginPath))
101783
+ packages.push(context.pluginPath);
101784
+ settings.packages = packages;
101785
+ const backupPath = await writeSettingsAtomically(context.settingsPath, settings);
101786
+ installLocalLauncher({
101787
+ pluginPath: context.pluginPath,
101788
+ senpiCliPath: join62(context.repoRoot, "packages", "coding-agent", "dist", "cli.js")
101789
+ });
101790
+ return {
101791
+ ok: true,
101792
+ action: "install",
101793
+ agentDir: context.agentDir,
101794
+ settingsPath: context.settingsPath,
101795
+ pluginPath: context.pluginPath,
101796
+ changed: JSON.stringify(settings) !== before,
101797
+ backupPath
101798
+ };
101799
+ }
101800
+ function resolveInstallContext(options) {
101801
+ const env3 = options.env ?? process.env;
101802
+ const allowBuild = options.pluginPath === undefined;
101803
+ const repoRoot = resolve19(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve19(options.pluginPath))));
101804
+ const agentDir = resolve19(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join62(homedir10(), ".senpi", "agent"));
101805
+ const pluginPath = resolve19(options.pluginPath ?? join62(repoRoot, "packages", "omo-senpi", "plugin"));
101806
+ return {
101807
+ env: env3,
101808
+ repoRoot,
101809
+ agentDir,
101810
+ settingsPath: join62(agentDir, "settings.json"),
101811
+ pluginPath,
101812
+ platform: options.platform ?? process.platform,
101813
+ allowBuild,
101814
+ runCommand: options.runCommand ?? defaultRunCommand3
101815
+ };
101816
+ }
101677
101817
  async function defaultRunCommand3(command, args, options) {
101678
101818
  const result = await execFileAsync2(command, [...args], { cwd: options.cwd });
101679
101819
  if (result.stderr.trim().length > 0)
@@ -101684,28 +101824,15 @@ async function defaultRunCommand3(command, args, options) {
101684
101824
  function findRepoRoot2(importerDir) {
101685
101825
  let current = importerDir;
101686
101826
  for (let depth = 0;depth <= 7; depth += 1) {
101687
- if (fileExistsSync(join61(current, "packages", "omo-senpi", "plugin", "package.json")))
101827
+ if (fileExistsSync(join62(current, "packages", "omo-senpi", "plugin", "package.json")))
101688
101828
  return current;
101689
101829
  current = resolve19(current, "..");
101690
101830
  }
101691
101831
  throw new Error("Unable to locate packages/omo-senpi/plugin/package.json from installer module");
101692
101832
  }
101693
- async function fileExists2(path6) {
101694
- try {
101695
- await access2(path6, constants8.F_OK);
101696
- return true;
101697
- } catch (error51) {
101698
- if (isErrno2(error51, "ENOENT"))
101699
- return false;
101700
- throw error51;
101701
- }
101702
- }
101703
101833
  function fileExistsSync(path6) {
101704
101834
  return existsSync31(path6);
101705
101835
  }
101706
- function isErrno2(error51, code) {
101707
- return error51 instanceof Error && "code" in error51 && error51.code === code;
101708
- }
101709
101836
  // packages/omo-opencode/src/cli/star-request.ts
101710
101837
  import { execFile as execFile5 } from "child_process";
101711
101838
  import { promisify as promisify3 } from "util";
@@ -101741,19 +101868,19 @@ init_provider_availability();
101741
101868
 
101742
101869
  // packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.ts
101743
101870
  import { existsSync as existsSync33, mkdirSync as mkdirSync11, readFileSync as readFileSync16 } from "fs";
101744
- import { join as join63 } from "path";
101871
+ import { join as join64 } from "path";
101745
101872
 
101746
101873
  // packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.ts
101747
101874
  init_shared();
101748
101875
  import { existsSync as existsSync32, readFileSync as readFileSync15 } from "fs";
101749
- import { join as join62 } from "path";
101876
+ import { join as join63 } from "path";
101750
101877
  var TUI_SUBPATH = "tui";
101751
101878
  var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;
101752
101879
  function fileEntryPackageJsonPath(entry) {
101753
101880
  let path6 = entry.slice("file:".length);
101754
101881
  if (path6.startsWith("//"))
101755
101882
  path6 = path6.slice(2);
101756
- return join62(path6, "package.json");
101883
+ return join63(path6, "package.json");
101757
101884
  }
101758
101885
  function packageJsonExportsTui(pkgJsonPath) {
101759
101886
  if (!existsSync32(pkgJsonPath))
@@ -101791,7 +101918,7 @@ function packageExportsTuiForServerEntry(entry) {
101791
101918
  const packageName = packageNameFromServerEntry(entry);
101792
101919
  if (packageName === null)
101793
101920
  return null;
101794
- return packageJsonExportsTui(join62(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
101921
+ return packageJsonExportsTui(join63(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));
101795
101922
  }
101796
101923
  function isOurFilePluginEntry(entry) {
101797
101924
  if (typeof entry !== "string" || !entry.startsWith("file:"))
@@ -101856,7 +101983,7 @@ function detectServerPluginRegistration() {
101856
101983
  }
101857
101984
  }
101858
101985
  function detectTuiPluginRegistration() {
101859
- const tuiJsonPath = join62(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
101986
+ const tuiJsonPath = join63(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");
101860
101987
  if (!existsSync32(tuiJsonPath)) {
101861
101988
  return {
101862
101989
  registered: false,
@@ -102012,10 +102139,10 @@ function readConfig(path6) {
102012
102139
  return null;
102013
102140
  }
102014
102141
  function readServerConfig(configDir) {
102015
- const jsoncPath = join63(configDir, "opencode.jsonc");
102142
+ const jsoncPath = join64(configDir, "opencode.jsonc");
102016
102143
  if (existsSync33(jsoncPath))
102017
102144
  return readConfig(jsoncPath);
102018
- const jsonPath = join63(configDir, "opencode.json");
102145
+ const jsonPath = join64(configDir, "opencode.json");
102019
102146
  if (existsSync33(jsonPath))
102020
102147
  return readConfig(jsonPath);
102021
102148
  return null;
@@ -102057,7 +102184,7 @@ function ensureTuiPluginEntry(opts = {}) {
102057
102184
  if (!desiredEntry) {
102058
102185
  return { changed: false, reason: "no-server-entry" };
102059
102186
  }
102060
- const tuiJsonPath = join63(configDir, "tui.json");
102187
+ const tuiJsonPath = join64(configDir, "tui.json");
102061
102188
  const { config: config3, malformed } = readTuiConfig(tuiJsonPath);
102062
102189
  if (malformed) {
102063
102190
  return { changed: false, reason: "malformed" };
@@ -102073,7 +102200,7 @@ function ensureTuiPluginEntry(opts = {}) {
102073
102200
 
102074
102201
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
102075
102202
  import { homedir as homedir11 } from "os";
102076
- import { join as join64 } from "path";
102203
+ import { join as join65 } from "path";
102077
102204
 
102078
102205
  // packages/shared-skills/index.mjs
102079
102206
  import { existsSync as existsSync34 } from "fs";
@@ -102095,9 +102222,9 @@ function describeResult2(result) {
102095
102222
  }
102096
102223
  async function installAstGrepForOpenCode(options = {}) {
102097
102224
  const platform = options.platform ?? process.platform;
102098
- const baseDir = join64(options.homeDir ?? homedir11(), ".omo");
102225
+ const baseDir = join65(options.homeDir ?? homedir11(), ".omo");
102099
102226
  const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
102100
- const skillDir = join64(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102227
+ const skillDir = join65(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
102101
102228
  const installer = options.installer ?? runAstGrepSkillInstall;
102102
102229
  try {
102103
102230
  const result = await installer({ platform, skillDir, targetDir });
@@ -105900,7 +106027,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
105900
106027
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
105901
106028
  init_bun_which_shim();
105902
106029
  init_spawn_with_windows_hide();
105903
- import { delimiter as delimiter2, dirname as dirname24, posix as posix9, win32 as win325 } from "path";
106030
+ import { delimiter as delimiter2, dirname as dirname25, posix as posix9, win32 as win325 } from "path";
105904
106031
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
105905
106032
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
105906
106033
  function getCommandCandidates(platform) {
@@ -105958,7 +106085,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
105958
106085
  return null;
105959
106086
  }
105960
106087
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
105961
- const preferredDir = dirname24(binaryPath);
106088
+ const preferredDir = dirname25(binaryPath);
105962
106089
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
105963
106090
  return [preferredDir, ...existing].join(delimiter2);
105964
106091
  }
@@ -106550,9 +106677,9 @@ function readCurrentTopLevelTask(planPath) {
106550
106677
  }
106551
106678
  // packages/boulder-state/src/storage/path.ts
106552
106679
  import { existsSync as existsSync36 } from "fs";
106553
- import { isAbsolute as isAbsolute11, join as join65, relative as relative8, resolve as resolve20 } from "path";
106680
+ import { isAbsolute as isAbsolute11, join as join66, relative as relative8, resolve as resolve20 } from "path";
106554
106681
  function getBoulderFilePath(directory) {
106555
- return join65(directory, BOULDER_DIR, BOULDER_FILE);
106682
+ return join66(directory, BOULDER_DIR, BOULDER_FILE);
106556
106683
  }
106557
106684
  function resolveTrackedPath(baseDirectory, trackedPath) {
106558
106685
  return isAbsolute11(trackedPath) ? resolve20(trackedPath) : resolve20(baseDirectory, trackedPath);
@@ -106735,9 +106862,9 @@ init_state();
106735
106862
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
106736
106863
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
106737
106864
  import { existsSync as existsSync39, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "fs";
106738
- import { join as join66 } from "path";
106865
+ import { join as join67 } from "path";
106739
106866
  function getMarkerPath(directory, sessionID) {
106740
- return join66(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
106867
+ return join67(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
106741
106868
  }
106742
106869
  function readContinuationMarker(directory, sessionID) {
106743
106870
  const markerPath = getMarkerPath(directory, sessionID);
@@ -106810,7 +106937,7 @@ async function isSessionInBoulderLineage(input) {
106810
106937
  init_shared();
106811
106938
  init_compaction_marker();
106812
106939
  import { readFileSync as readFileSync21, readdirSync as readdirSync8 } from "fs";
106813
- import { join as join67 } from "path";
106940
+ import { join as join68 } from "path";
106814
106941
  var defaultSessionLastAgentDeps = {
106815
106942
  getMessageDir,
106816
106943
  isSqliteBackend,
@@ -106870,7 +106997,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {
106870
106997
  try {
106871
106998
  const messages = readdirSync8(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
106872
106999
  try {
106873
- const content = readFileSync21(join67(messageDir, fileName), "utf-8");
107000
+ const content = readFileSync21(join68(messageDir, fileName), "utf-8");
106874
107001
  const parsed = JSON.parse(content);
106875
107002
  return {
106876
107003
  fileName,
@@ -106914,7 +107041,7 @@ init_agent_display_names();
106914
107041
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
106915
107042
  init_frontmatter2();
106916
107043
  import { existsSync as existsSync40, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
106917
- import { dirname as dirname25, join as join68 } from "path";
107044
+ import { dirname as dirname26, join as join69 } from "path";
106918
107045
 
106919
107046
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
106920
107047
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -106923,7 +107050,7 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
106923
107050
 
106924
107051
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
106925
107052
  function getStateFilePath(directory, customPath) {
106926
- return customPath ? join68(directory, customPath) : join68(directory, DEFAULT_STATE_FILE);
107053
+ return customPath ? join69(directory, customPath) : join69(directory, DEFAULT_STATE_FILE);
106927
107054
  }
106928
107055
  function readState(directory, customPath) {
106929
107056
  const filePath = getStateFilePath(directory, customPath);
@@ -107760,10 +107887,10 @@ Interrupted. Shutting down...`));
107760
107887
  abortController,
107761
107888
  verbose: options.verbose ?? false
107762
107889
  };
107763
- const events = await client3.event.subscribe({ query: { directory } });
107890
+ const events2 = await client3.event.subscribe({ query: { directory } });
107764
107891
  const eventState = createEventState();
107765
107892
  eventState.agentColorsByName = await loadAgentProfileColors(client3);
107766
- const eventProcessor = processEvents(ctx, events.stream, eventState).catch(() => {});
107893
+ const eventProcessor = processEvents(ctx, events2.stream, eventState).catch(() => {});
107767
107894
  const promptResult = await dispatchInternalPrompt({
107768
107895
  mode: "async",
107769
107896
  client: client3,
@@ -108030,7 +108157,7 @@ init_extract_semver();
108030
108157
  init_bun_which_shim();
108031
108158
  import { existsSync as existsSync48, accessSync as accessSync4, constants as constants11 } from "fs";
108032
108159
  import { homedir as homedir14 } from "os";
108033
- import { join as join75 } from "path";
108160
+ import { join as join76 } from "path";
108034
108161
 
108035
108162
  // packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
108036
108163
  init_spawn_with_windows_hide();
@@ -108122,17 +108249,17 @@ function getDesktopAppPaths(platform) {
108122
108249
  case "darwin":
108123
108250
  return [
108124
108251
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
108125
- join75(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108252
+ join76(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
108126
108253
  ];
108127
108254
  case "win32": {
108128
108255
  const programFiles = process.env.ProgramFiles;
108129
108256
  const localAppData = process.env.LOCALAPPDATA;
108130
108257
  const paths2 = [];
108131
108258
  if (programFiles) {
108132
- paths2.push(join75(programFiles, "OpenCode", "OpenCode.exe"));
108259
+ paths2.push(join76(programFiles, "OpenCode", "OpenCode.exe"));
108133
108260
  }
108134
108261
  if (localAppData) {
108135
- paths2.push(join75(localAppData, "OpenCode", "OpenCode.exe"));
108262
+ paths2.push(join76(localAppData, "OpenCode", "OpenCode.exe"));
108136
108263
  }
108137
108264
  return paths2;
108138
108265
  }
@@ -108140,8 +108267,8 @@ function getDesktopAppPaths(platform) {
108140
108267
  return [
108141
108268
  "/usr/bin/opencode",
108142
108269
  "/usr/lib/opencode/opencode",
108143
- join75(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108144
- join75(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
108270
+ join76(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
108271
+ join76(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
108145
108272
  ];
108146
108273
  default:
108147
108274
  return [];
@@ -108173,7 +108300,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
108173
108300
  const candidates = getCommandCandidates2(platform);
108174
108301
  for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {
108175
108302
  for (const command of candidates) {
108176
- const fullPath = join75(entry, command);
108303
+ const fullPath = join76(entry, command);
108177
108304
  if (checkExists(fullPath) && isExecutable2(fullPath)) {
108178
108305
  return { binary: command, path: fullPath };
108179
108306
  }
@@ -108315,22 +108442,22 @@ init_package_json_locator();
108315
108442
  import { existsSync as existsSync50, readFileSync as readFileSync31, readdirSync as readdirSync10 } from "fs";
108316
108443
  import { createRequire as createRequire2 } from "module";
108317
108444
  import { homedir as homedir15 } from "os";
108318
- import { join as join76 } from "path";
108445
+ import { join as join77 } from "path";
108319
108446
  import { fileURLToPath as fileURLToPath6 } from "url";
108320
108447
  init_shared();
108321
108448
  function getPlatformDefaultCacheDir(platform = process.platform) {
108322
108449
  if (platform === "darwin")
108323
- return join76(homedir15(), "Library", "Caches");
108450
+ return join77(homedir15(), "Library", "Caches");
108324
108451
  if (platform === "win32")
108325
- return process.env.LOCALAPPDATA ?? join76(homedir15(), "AppData", "Local");
108326
- return join76(homedir15(), ".cache");
108452
+ return process.env.LOCALAPPDATA ?? join77(homedir15(), "AppData", "Local");
108453
+ return join77(homedir15(), ".cache");
108327
108454
  }
108328
108455
  function resolveOpenCodeCacheDir() {
108329
108456
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
108330
108457
  if (xdgCacheHome)
108331
- return join76(xdgCacheHome, "opencode");
108458
+ return join77(xdgCacheHome, "opencode");
108332
108459
  const fromShared = getOpenCodeCacheDir();
108333
- const platformDefault = join76(getPlatformDefaultCacheDir(), "opencode");
108460
+ const platformDefault = join77(getPlatformDefaultCacheDir(), "opencode");
108334
108461
  if (existsSync50(fromShared) || !existsSync50(platformDefault))
108335
108462
  return fromShared;
108336
108463
  return platformDefault;
@@ -108362,11 +108489,11 @@ function normalizeVersion(value) {
108362
108489
  function createPackageCandidates(rootDir) {
108363
108490
  return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
108364
108491
  packageName,
108365
- installedPackagePath: join76(rootDir, "node_modules", packageName, "package.json")
108492
+ installedPackagePath: join77(rootDir, "node_modules", packageName, "package.json")
108366
108493
  }));
108367
108494
  }
108368
108495
  function createTaggedInstallCandidates(rootDir) {
108369
- const packagesDir = join76(rootDir, "packages");
108496
+ const packagesDir = join77(rootDir, "packages");
108370
108497
  if (!existsSync50(packagesDir))
108371
108498
  return [];
108372
108499
  const candidates = [];
@@ -108374,14 +108501,14 @@ function createTaggedInstallCandidates(rootDir) {
108374
108501
  const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
108375
108502
  if (packageName === undefined)
108376
108503
  continue;
108377
- const installDir = join76(packagesDir, entryName);
108504
+ const installDir = join77(packagesDir, entryName);
108378
108505
  candidates.push({
108379
108506
  cacheDir: installDir,
108380
- cachePackagePath: join76(installDir, "package.json"),
108507
+ cachePackagePath: join77(installDir, "package.json"),
108381
108508
  packageCandidates: [
108382
108509
  {
108383
108510
  packageName,
108384
- installedPackagePath: join76(installDir, "node_modules", packageName, "package.json")
108511
+ installedPackagePath: join77(installDir, "node_modules", packageName, "package.json")
108385
108512
  }
108386
108513
  ]
108387
108514
  });
@@ -108426,13 +108553,13 @@ function getLoadedPluginVersion() {
108426
108553
  const candidates = [
108427
108554
  {
108428
108555
  cacheDir: configDir,
108429
- cachePackagePath: join76(configDir, "package.json"),
108556
+ cachePackagePath: join77(configDir, "package.json"),
108430
108557
  packageCandidates: createPackageCandidates(configDir)
108431
108558
  },
108432
108559
  ...createTaggedInstallCandidates(configDir),
108433
108560
  {
108434
108561
  cacheDir,
108435
- cachePackagePath: join76(cacheDir, "package.json"),
108562
+ cachePackagePath: join77(cacheDir, "package.json"),
108436
108563
  packageCandidates: createPackageCandidates(cacheDir)
108437
108564
  },
108438
108565
  ...createTaggedInstallCandidates(cacheDir)
@@ -108625,18 +108752,18 @@ async function checkSystem(deps = defaultDeps6) {
108625
108752
  init_shared();
108626
108753
  import { existsSync as existsSync52, readFileSync as readFileSync33 } from "fs";
108627
108754
  import { homedir as homedir16 } from "os";
108628
- import { join as join77 } from "path";
108755
+ import { join as join78 } from "path";
108629
108756
  function getUserConfigDir2() {
108630
108757
  const xdgConfig = process.env.XDG_CONFIG_HOME;
108631
108758
  if (xdgConfig)
108632
- return join77(xdgConfig, "opencode");
108633
- return join77(homedir16(), ".config", "opencode");
108759
+ return join78(xdgConfig, "opencode");
108760
+ return join78(homedir16(), ".config", "opencode");
108634
108761
  }
108635
108762
  function loadCustomProviderNames() {
108636
108763
  const configDir = getUserConfigDir2();
108637
108764
  const candidatePaths = [
108638
- join77(configDir, "opencode.json"),
108639
- join77(configDir, "opencode.jsonc")
108765
+ join78(configDir, "opencode.json"),
108766
+ join78(configDir, "opencode.jsonc")
108640
108767
  ];
108641
108768
  for (const configPath of candidatePaths) {
108642
108769
  if (!existsSync52(configPath))
@@ -108657,7 +108784,7 @@ function loadCustomProviderNames() {
108657
108784
  return [];
108658
108785
  }
108659
108786
  function loadAvailableModelsFromCache() {
108660
- const cacheFile = join77(getOpenCodeCacheDir(), "models.json");
108787
+ const cacheFile = join78(getOpenCodeCacheDir(), "models.json");
108661
108788
  const customProviders = loadCustomProviderNames();
108662
108789
  if (!existsSync52(cacheFile)) {
108663
108790
  if (customProviders.length > 0) {
@@ -108719,7 +108846,7 @@ function loadOmoConfig2() {
108719
108846
 
108720
108847
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
108721
108848
  init_shared();
108722
- import { join as join78 } from "path";
108849
+ import { join as join79 } from "path";
108723
108850
 
108724
108851
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
108725
108852
  function formatModelWithVariant(model, variant) {
@@ -108761,7 +108888,7 @@ function formatCapabilityResolutionLabel(mode) {
108761
108888
  }
108762
108889
  function buildModelResolutionDetails(options) {
108763
108890
  const details = [];
108764
- const cacheFile = join78(getOpenCodeCacheDir(), "models.json");
108891
+ const cacheFile = join79(getOpenCodeCacheDir(), "models.json");
108765
108892
  details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");
108766
108893
  details.push("");
108767
108894
  if (options.available.cacheExists) {
@@ -109071,7 +109198,7 @@ async function checkConfig() {
109071
109198
  // packages/omo-opencode/src/cli/doctor/checks/deprecated-reasoning-keys.ts
109072
109199
  init_main();
109073
109200
  import { existsSync as existsSync53, readFileSync as readFileSync34 } from "fs";
109074
- import { join as join79 } from "path";
109201
+ import { join as join80 } from "path";
109075
109202
  var CANONICAL_REPLACEMENT = new Map([
109076
109203
  ["variant", "reasoning"],
109077
109204
  ["reasoningEffort", "reasoning"],
@@ -109126,7 +109253,7 @@ function userConfigPaths() {
109126
109253
  const home = process.env.HOME ?? process.env.USERPROFILE;
109127
109254
  if (home === undefined || home.length === 0)
109128
109255
  return [];
109129
- return [join79(home, ".omo", "omo.jsonc"), join79(home, ".omo", "omo.json")];
109256
+ return [join80(home, ".omo", "omo.jsonc"), join80(home, ".omo", "omo.json")];
109130
109257
  }
109131
109258
  async function checkDeprecatedReasoningKeys() {
109132
109259
  const issues = [];
@@ -109152,25 +109279,25 @@ init_src2();
109152
109279
  import { existsSync as existsSync54 } from "fs";
109153
109280
  import { createRequire as createRequire3 } from "module";
109154
109281
  import { homedir as homedir18 } from "os";
109155
- import { dirname as dirname30, join as join81 } from "path";
109282
+ import { dirname as dirname31, join as join82 } from "path";
109156
109283
 
109157
109284
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
109158
- import { join as join80 } from "path";
109285
+ import { join as join81 } from "path";
109159
109286
  import { homedir as homedir17, tmpdir as tmpdir4 } from "os";
109160
109287
  init_binary_downloader();
109161
109288
  init_logger2();
109162
109289
  init_plugin_identity();
109163
109290
  var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
109164
- var DEBUG_FILE = join80(tmpdir4(), "comment-checker-debug.log");
109291
+ var DEBUG_FILE = join81(tmpdir4(), "comment-checker-debug.log");
109165
109292
  function getCacheDir2() {
109166
109293
  if (process.platform === "win32") {
109167
109294
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
109168
- const base2 = localAppData || join80(homedir17(), "AppData", "Local");
109169
- return join80(base2, CACHE_DIR_NAME, "bin");
109295
+ const base2 = localAppData || join81(homedir17(), "AppData", "Local");
109296
+ return join81(base2, CACHE_DIR_NAME, "bin");
109170
109297
  }
109171
109298
  const xdgCache = process.env.XDG_CACHE_HOME;
109172
- const base = xdgCache || join80(homedir17(), ".cache");
109173
- return join80(base, CACHE_DIR_NAME, "bin");
109299
+ const base = xdgCache || join81(homedir17(), ".cache");
109300
+ return join81(base, CACHE_DIR_NAME, "bin");
109174
109301
  }
109175
109302
  function getBinaryName() {
109176
109303
  return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
@@ -109220,7 +109347,7 @@ async function getBinaryVersion(binary) {
109220
109347
  }
109221
109348
  }
109222
109349
  async function checkAstGrepCli() {
109223
- const runtimeDir = astGrepRuntimeDir(join81(homedir18(), ".omo"));
109350
+ const runtimeDir = astGrepRuntimeDir(join82(homedir18(), ".omo"));
109224
109351
  const sgPath = findSgBinarySync({ runtimeDir });
109225
109352
  if (sgPath === null) {
109226
109353
  return {
@@ -109249,11 +109376,11 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
109249
109376
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
109250
109377
  const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
109251
109378
  try {
109252
- const packageDir = baseDirOverride ?? dirname30(resolvePackageJsonPath());
109253
- const vendorPath = join81(packageDir, "vendor", platformKey, binaryName);
109379
+ const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
109380
+ const vendorPath = join82(packageDir, "vendor", platformKey, binaryName);
109254
109381
  if (existsSync54(vendorPath))
109255
109382
  return vendorPath;
109256
- const binPath = join81(packageDir, "bin", binaryName);
109383
+ const binPath = join82(packageDir, "bin", binaryName);
109257
109384
  if (existsSync54(binPath))
109258
109385
  return binPath;
109259
109386
  } catch (error51) {
@@ -109401,7 +109528,7 @@ async function getGhCliInfo(dependencies = {}) {
109401
109528
  init_zod();
109402
109529
  init_opencode_config_dir();
109403
109530
  import { existsSync as existsSync55, readFileSync as readFileSync35 } from "fs";
109404
- import { delimiter as delimiter3, dirname as dirname31, resolve as resolve22 } from "path";
109531
+ import { delimiter as delimiter3, dirname as dirname32, resolve as resolve22 } from "path";
109405
109532
  import { fileURLToPath as fileURLToPath7 } from "url";
109406
109533
 
109407
109534
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -109532,7 +109659,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
109532
109659
  ].join(";");
109533
109660
  function getModuleDirectory(moduleUrl) {
109534
109661
  try {
109535
- return dirname31(fileURLToPath7(moduleUrl));
109662
+ return dirname32(fileURLToPath7(moduleUrl));
109536
109663
  } catch (error51) {
109537
109664
  if (!(error51 instanceof Error))
109538
109665
  throw error51;
@@ -109628,13 +109755,13 @@ function getInstalledLspServers(options = {}) {
109628
109755
  init_shared();
109629
109756
  import { existsSync as existsSync56, readFileSync as readFileSync36 } from "fs";
109630
109757
  import { homedir as homedir19 } from "os";
109631
- import { join as join82 } from "path";
109758
+ import { join as join83 } from "path";
109632
109759
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
109633
109760
  function getMcpConfigPaths() {
109634
109761
  return [
109635
- join82(homedir19(), ".claude", ".mcp.json"),
109636
- join82(process.cwd(), ".mcp.json"),
109637
- join82(process.cwd(), ".claude", ".mcp.json")
109762
+ join83(homedir19(), ".claude", ".mcp.json"),
109763
+ join83(process.cwd(), ".mcp.json"),
109764
+ join83(process.cwd(), ".claude", ".mcp.json")
109638
109765
  ];
109639
109766
  }
109640
109767
  function loadUserMcpConfig() {
@@ -109916,7 +110043,7 @@ init_src2();
109916
110043
  import { existsSync as existsSync58 } from "fs";
109917
110044
  import { lstat as lstat15, readdir as readdir14, readFile as readFile27 } from "fs/promises";
109918
110045
  import { homedir as homedir21 } from "os";
109919
- import { basename as basename11, join as join83, resolve as resolve23 } from "path";
110046
+ import { basename as basename11, join as join84, resolve as resolve23 } from "path";
109920
110047
  // packages/omo-opencode/package.json
109921
110048
  var package_default3 = {
109922
110049
  name: "@oh-my-opencode/omo-opencode",
@@ -109981,13 +110108,13 @@ var CODEX_BIN_NAMES = [
109981
110108
  "omo-git-bash-hook"
109982
110109
  ];
109983
110110
  async function gatherCodexSummary(deps = {}) {
109984
- const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join83(homedir21(), ".codex"));
110111
+ const codexHome = resolve23(deps.codexHome ?? process.env.CODEX_HOME ?? join84(homedir21(), ".codex"));
109985
110112
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
109986
110113
  const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
109987
110114
  const pluginRoot = await resolveInstalledPluginRoot(codexHome);
109988
- const manifest2 = pluginRoot === null ? null : await readJson(join83(pluginRoot, ".codex-plugin", "plugin.json"));
109989
- const installSnapshot = pluginRoot === null ? null : await readJson(join83(pluginRoot, "lazycodex-install.json"));
109990
- const configPath = join83(codexHome, "config.toml");
110115
+ const manifest2 = pluginRoot === null ? null : await readJson(join84(pluginRoot, ".codex-plugin", "plugin.json"));
110116
+ const installSnapshot = pluginRoot === null ? null : await readJson(join84(pluginRoot, "lazycodex-install.json"));
110117
+ const configPath = join84(codexHome, "config.toml");
109991
110118
  const pluginVersion = stringField(manifest2, "version");
109992
110119
  return {
109993
110120
  codexPath: detection.found && "path" in detection ? detection.path : null,
@@ -110044,7 +110171,7 @@ function buildCodexIssues(summary) {
110044
110171
  if (summary.pluginRoot === null) {
110045
110172
  issues.push({
110046
110173
  title: "OMO Codex plugin is not installed",
110047
- description: `Expected cached plugin at ${join83("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
110174
+ description: `Expected cached plugin at ${join84("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
110048
110175
  fix: "Run: npx lazycodex-ai install",
110049
110176
  severity: "error",
110050
110177
  affects: ["plugin loading"]
@@ -110109,12 +110236,12 @@ function buildCodexIssues(summary) {
110109
110236
  return issues;
110110
110237
  }
110111
110238
  async function resolveInstalledPluginRoot(codexHome) {
110112
- const pluginRoot = join83(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110239
+ const pluginRoot = join84(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
110113
110240
  if (!existsSync58(pluginRoot))
110114
110241
  return null;
110115
110242
  const versions2 = await readdir14(pluginRoot, { withFileTypes: true });
110116
110243
  const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
110117
- return candidates.length === 0 ? null : join83(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110244
+ return candidates.length === 0 ? null : join84(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
110118
110245
  }
110119
110246
  async function readCodexConfigSummary(configPath) {
110120
110247
  if (!existsSync58(configPath)) {
@@ -110142,13 +110269,13 @@ async function readCodexConfigSummary(configPath) {
110142
110269
  async function readLinkedBins(binDir) {
110143
110270
  const linked = [];
110144
110271
  for (const name of CODEX_BIN_NAMES) {
110145
- if (await pathExists2(join83(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110272
+ if (await pathExists2(join84(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
110146
110273
  linked.push(name);
110147
110274
  }
110148
110275
  return linked;
110149
110276
  }
110150
110277
  async function readLinkedAgents(codexHome) {
110151
- const agentsDir = join83(codexHome, "agents");
110278
+ const agentsDir = join84(codexHome, "agents");
110152
110279
  if (!existsSync58(agentsDir))
110153
110280
  return [];
110154
110281
  const entries = await readdir14(agentsDir, { withFileTypes: true });
@@ -110195,16 +110322,16 @@ function formatCompanionPluginStatus(config4) {
110195
110322
  return "none";
110196
110323
  }
110197
110324
  function readCompanionLifecycleHookStateEvents(content) {
110198
- const events = new Set;
110325
+ const events2 = new Set;
110199
110326
  for (const section of splitTomlSections(content)) {
110200
110327
  if (section.header === null)
110201
110328
  continue;
110202
110329
  const key = parseHookStateHeaderKey(section.header);
110203
110330
  const event = key === null ? null : companionLifecycleEventFromHookStateKey(key);
110204
110331
  if (event !== null)
110205
- events.add(event);
110332
+ events2.add(event);
110206
110333
  }
110207
- return [...events].sort(compareCompanionLifecycleEvents);
110334
+ return [...events2].sort(compareCompanionLifecycleEvents);
110208
110335
  }
110209
110336
  function companionLifecycleEventFromHookStateKey(key) {
110210
110337
  if (!key.startsWith(`${COMPANION_PLUGIN_KEY}:`))
@@ -110218,8 +110345,8 @@ function compareCompanionLifecycleEvents(left, right) {
110218
110345
  function companionLifecycleEventOrder(event) {
110219
110346
  return event === "session_start" ? 0 : event === "stop" ? 1 : 2;
110220
110347
  }
110221
- function formatCompanionLifecycleEvents(events) {
110222
- return events.map(formatCompanionLifecycleEvent).join(", ");
110348
+ function formatCompanionLifecycleEvents(events2) {
110349
+ return events2.map(formatCompanionLifecycleEvent).join(", ");
110223
110350
  }
110224
110351
  function formatCompanionLifecycleEvent(event) {
110225
110352
  switch (event) {
@@ -110264,7 +110391,7 @@ async function pathExists2(path14) {
110264
110391
  init_src2();
110265
110392
  import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
110266
110393
  import { homedir as homedir22 } from "os";
110267
- import { dirname as dirname32, isAbsolute as isAbsolute12, join as join84, relative as relative9, resolve as resolve24, sep as sep9 } from "path";
110394
+ import { dirname as dirname33, isAbsolute as isAbsolute12, join as join85, relative as relative9, resolve as resolve24, sep as sep9 } from "path";
110268
110395
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
110269
110396
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
110270
110397
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
@@ -110274,7 +110401,7 @@ async function checkCodexComponents(deps = {}) {
110274
110401
  const env3 = deps.env ?? process.env;
110275
110402
  const platform = deps.platform ?? process.platform;
110276
110403
  const arch = deps.arch ?? process.arch;
110277
- const codexHome = resolve24(deps.codexHome ?? env3["CODEX_HOME"] ?? join84(homedir22(), ".codex"));
110404
+ const codexHome = resolve24(deps.codexHome ?? env3["CODEX_HOME"] ?? join85(homedir22(), ".codex"));
110278
110405
  const summary = await gatherCodexSummary({ ...deps, codexHome });
110279
110406
  if (summary.pluginRoot === null) {
110280
110407
  return {
@@ -110299,7 +110426,7 @@ async function checkCodexComponents(deps = {}) {
110299
110426
  });
110300
110427
  }
110301
110428
  const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
110302
- const runtimeSgPath = join84(runtimeSgDir, sgBinaryName(platform));
110429
+ const runtimeSgPath = join85(runtimeSgDir, sgBinaryName(platform));
110303
110430
  const sg = findSgBinarySync({
110304
110431
  arch,
110305
110432
  env: env3,
@@ -110338,7 +110465,7 @@ async function auditBundleTargets(pluginRoot) {
110338
110465
  const manifest2 = await readJson2(manifestPath);
110339
110466
  if (manifest2 === null || !isRecord12(manifest2["mcpServers"]))
110340
110467
  continue;
110341
- const manifestRoot = dirname32(manifestPath);
110468
+ const manifestRoot = dirname33(manifestPath);
110342
110469
  const isRootManifest = resolve24(manifestRoot) === resolve24(pluginRoot);
110343
110470
  for (const server2 of Object.values(manifest2["mcpServers"])) {
110344
110471
  if (!isRecord12(server2) || !Array.isArray(server2["args"]))
@@ -110359,7 +110486,7 @@ async function auditBundleTargets(pluginRoot) {
110359
110486
  continue;
110360
110487
  const commands2 = [];
110361
110488
  collectHookCommands(manifest2, commands2);
110362
- const hookPluginRoot = dirname32(dirname32(hookManifestPath));
110489
+ const hookPluginRoot = dirname33(dirname33(hookManifestPath));
110363
110490
  for (const command of commands2) {
110364
110491
  for (const relativePath of extractPluginRootPaths(command)) {
110365
110492
  referencedCount += 1;
@@ -110398,7 +110525,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
110398
110525
  }
110399
110526
  async function findHookManifestPaths(root) {
110400
110527
  const paths3 = await findManifestPaths(root, "hooks.json");
110401
- return paths3.filter((path14) => dirname32(path14).endsWith(`${sep9}hooks`));
110528
+ return paths3.filter((path14) => dirname33(path14).endsWith(`${sep9}hooks`));
110402
110529
  }
110403
110530
  async function findManifestPaths(root, manifestName) {
110404
110531
  let entries;
@@ -110411,7 +110538,7 @@ async function findManifestPaths(root, manifestName) {
110411
110538
  for (const entry of entries) {
110412
110539
  if (entry.name === "node_modules" || entry.name === ".git")
110413
110540
  continue;
110414
- const entryPath = join84(root, entry.name);
110541
+ const entryPath = join85(root, entry.name);
110415
110542
  if (entry.isDirectory()) {
110416
110543
  paths3.push(...await findManifestPaths(entryPath, manifestName));
110417
110544
  continue;
@@ -110455,18 +110582,18 @@ function isPluginRuntimePathArg(arg) {
110455
110582
  return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));
110456
110583
  }
110457
110584
  function runtimeSgDirectory(codexHome, platform, arch) {
110458
- return join84(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110585
+ return join85(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
110459
110586
  }
110460
110587
  function describeSgSource(sgPath, env3, runtimeSgDir, platform) {
110461
110588
  const override = env3[SG_PATH_ENV_KEY]?.trim();
110462
110589
  if (override !== undefined && override.length > 0 && sgPath === override)
110463
110590
  return `env override ${SG_PATH_ENV_KEY}`;
110464
- if (sgPath === join84(runtimeSgDir, sgBinaryName(platform)))
110591
+ if (sgPath === join85(runtimeSgDir, sgBinaryName(platform)))
110465
110592
  return "runtime dir";
110466
110593
  return "PATH";
110467
110594
  }
110468
110595
  async function readBootstrapStateSummary(codexHome) {
110469
- const statePath = join84(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110596
+ const statePath = join85(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
110470
110597
  const raw = await readJson2(statePath);
110471
110598
  if (raw === null)
110472
110599
  return null;
@@ -110545,16 +110672,16 @@ function isRecord12(value) {
110545
110672
  import { existsSync as existsSync59 } from "fs";
110546
110673
  import { readFile as readFile29 } from "fs/promises";
110547
110674
  import { homedir as homedir23 } from "os";
110548
- import { join as join85, resolve as resolve25 } from "path";
110675
+ import { join as join86, resolve as resolve25 } from "path";
110549
110676
  var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
110550
110677
  var CHECK_NAME = "codex-runtime-wrapper";
110551
110678
  var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
110552
110679
  async function checkCodexRuntimeWrapper(deps = {}) {
110553
- const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join85(homedir23(), ".codex"));
110680
+ const codexHome = resolve25(deps.codexHome ?? process.env.CODEX_HOME ?? join86(homedir23(), ".codex"));
110554
110681
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
110555
110682
  const platform = deps.platform ?? process.platform;
110556
- const wrapperPath = join85(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110557
- const legacyWrapperPath = join85(binDir, platform === "win32" ? "omo.cmd" : "omo");
110683
+ const wrapperPath = join86(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
110684
+ const legacyWrapperPath = join86(binDir, platform === "win32" ? "omo.cmd" : "omo");
110558
110685
  const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
110559
110686
  const issues = [];
110560
110687
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
@@ -111082,12 +111209,12 @@ import {
111082
111209
  unlinkSync as unlinkSync9,
111083
111210
  writeFileSync as writeFileSync12
111084
111211
  } from "fs";
111085
- import { basename as basename12, dirname as dirname33, join as join88 } from "path";
111212
+ import { basename as basename12, dirname as dirname34, join as join89 } from "path";
111086
111213
 
111087
111214
  // packages/mcp-client-core/src/config-dir.ts
111088
111215
  import { existsSync as existsSync60, realpathSync as realpathSync8 } from "fs";
111089
111216
  import { homedir as homedir24 } from "os";
111090
- import { join as join86, resolve as resolve26 } from "path";
111217
+ import { join as join87, resolve as resolve26 } from "path";
111091
111218
  function resolveConfigPath2(pathValue) {
111092
111219
  const resolvedPath = resolve26(pathValue);
111093
111220
  if (!existsSync60(resolvedPath))
@@ -111105,13 +111232,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {
111105
111232
  if (customConfigDir) {
111106
111233
  return resolveConfigPath2(customConfigDir);
111107
111234
  }
111108
- const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join86(homedir24(), ".config");
111109
- return resolveConfigPath2(join86(xdgConfigDir, "opencode"));
111235
+ const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join87(homedir24(), ".config");
111236
+ return resolveConfigPath2(join87(xdgConfigDir, "opencode"));
111110
111237
  }
111111
111238
 
111112
111239
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
111113
111240
  import { chmodSync as chmodSync4, existsSync as existsSync61, readFileSync as readFileSync38, renameSync as renameSync6, writeFileSync as writeFileSync11 } from "fs";
111114
- import { join as join87 } from "path";
111241
+ import { join as join88 } from "path";
111115
111242
  var INDEX_FILE_NAME = "index.json";
111116
111243
  function isTokenIndex(value) {
111117
111244
  if (typeof value !== "object" || value === null || Array.isArray(value))
@@ -111119,7 +111246,7 @@ function isTokenIndex(value) {
111119
111246
  return Object.values(value).every((entry) => typeof entry === "string");
111120
111247
  }
111121
111248
  function getIndexPath(storageDir) {
111122
- return join87(storageDir, INDEX_FILE_NAME);
111249
+ return join88(storageDir, INDEX_FILE_NAME);
111123
111250
  }
111124
111251
  function readTokenIndex(storageDir) {
111125
111252
  const indexPath = getIndexPath(storageDir);
@@ -111163,16 +111290,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {
111163
111290
  var STORAGE_DIR_NAME = "mcp-oauth";
111164
111291
  var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
111165
111292
  function getMcpOauthStorageDir() {
111166
- return join88(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111293
+ return join89(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
111167
111294
  }
111168
111295
  function getMcpOauthServerHash(serverHost, resource) {
111169
111296
  return createHash6("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
111170
111297
  }
111171
111298
  function getMcpOauthStoragePath(serverHost, resource) {
111172
- return join88(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111299
+ return join89(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
111173
111300
  }
111174
111301
  function getLegacyStoragePath() {
111175
- return join88(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111302
+ return join89(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
111176
111303
  }
111177
111304
  function normalizeHost2(serverHost) {
111178
111305
  let host = serverHost.trim();
@@ -111266,7 +111393,7 @@ function readLegacyStore() {
111266
111393
  }
111267
111394
  function writeTokenFile(filePath, token) {
111268
111395
  try {
111269
- const dir = dirname33(filePath);
111396
+ const dir = dirname34(filePath);
111270
111397
  if (!existsSync62(dir)) {
111271
111398
  mkdirSync15(dir, { recursive: true });
111272
111399
  }
@@ -111351,7 +111478,7 @@ function listTokensByHost(serverHost) {
111351
111478
  for (const [hash2, indexedKey] of Object.entries(index)) {
111352
111479
  if (!indexedKey.startsWith(prefix))
111353
111480
  continue;
111354
- const indexedToken = readTokenFile(join88(getMcpOauthStorageDir(), `${hash2}.json`));
111481
+ const indexedToken = readTokenFile(join89(getMcpOauthStorageDir(), `${hash2}.json`));
111355
111482
  if (indexedToken)
111356
111483
  result[indexedKey] = indexedToken;
111357
111484
  }
@@ -111366,7 +111493,7 @@ function listAllTokens() {
111366
111493
  for (const entry of readdirSync11(dir, { withFileTypes: true })) {
111367
111494
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
111368
111495
  continue;
111369
- const token = readTokenFile(join88(dir, entry.name));
111496
+ const token = readTokenFile(join89(dir, entry.name));
111370
111497
  const hash2 = basename12(entry.name, ".json");
111371
111498
  if (token)
111372
111499
  result[index[hash2] ?? hash2] = token;