oh-my-opencode 5.0.0-beta.82 → 5.0.0-beta.84

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 (142) hide show
  1. package/.agents/skills/hyperplan/SKILL.md +1 -1
  2. package/.opencode/skills/hyperplan/SKILL.md +1 -1
  3. package/README.ja.md +2 -2
  4. package/README.ko.md +2 -2
  5. package/README.md +4 -4
  6. package/README.ru.md +2 -2
  7. package/README.zh-cn.md +2 -2
  8. package/dist/cli/index.js +707 -146
  9. package/dist/cli/install-native/index.d.ts +4 -0
  10. package/dist/cli/install-native/plan.d.ts +11 -0
  11. package/dist/cli/install-native/run-native-install.d.ts +23 -0
  12. package/dist/cli/install-native-dev/index.d.ts +4 -0
  13. package/dist/cli/native-dev-platform-flag.d.ts +5 -0
  14. package/dist/cli/native-edition-hint.d.ts +10 -0
  15. package/dist/cli/types.d.ts +3 -2
  16. package/dist/cli-node/index.js +707 -146
  17. package/dist/config/schema/hooks.d.ts +1 -0
  18. package/dist/config-migration/harness-native-rename.d.ts +3 -0
  19. package/dist/config-migration/subscription-provider-rename.d.ts +4 -0
  20. package/dist/create-hooks.d.ts +1 -0
  21. package/dist/features/native-edition-nudge/index.d.ts +2 -0
  22. package/dist/features/native-edition-nudge/tui.d.ts +33 -0
  23. package/dist/hooks/index.d.ts +1 -0
  24. package/dist/hooks/native-edition-nudge/decide.d.ts +4 -0
  25. package/dist/hooks/native-edition-nudge/hook.d.ts +26 -0
  26. package/dist/hooks/native-edition-nudge/index.d.ts +5 -0
  27. package/dist/hooks/native-edition-nudge/state.d.ts +9 -0
  28. package/dist/hooks/native-edition-nudge/types.d.ts +38 -0
  29. package/dist/index.js +1041 -387
  30. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  31. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
  32. package/dist/skills/browser/ATTRIBUTION.md +25 -0
  33. package/dist/skills/browser/SKILL.md +89 -0
  34. package/dist/skills/browser/references/commands.md +90 -0
  35. package/dist/skills/browser/references/install.md +71 -0
  36. package/dist/skills/browser/references/owned-engine/README.md +42 -0
  37. package/dist/skills/browser/references/owned-engine/frames-and-humans.md +39 -0
  38. package/dist/skills/browser/references/owned-engine/ladder.md +59 -0
  39. package/dist/skills/browser/references/owned-engine/network.md +42 -0
  40. package/dist/skills/browser/references/recipes/1password.md +59 -0
  41. package/dist/skills/browser/references/remote.md +24 -0
  42. package/dist/skills/browser/scripts/browser-doctor.mjs +41 -0
  43. package/dist/skills/browser/scripts/browser-env.mjs +41 -0
  44. package/dist/skills/browser/scripts/browser-install.mjs +51 -0
  45. package/dist/tui.js +761 -100
  46. package/package.json +14 -14
  47. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  48. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +84 -11
  49. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  50. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  51. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  52. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  53. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  54. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  56. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/lcx/skills/lcx-contribute-bug-fix/SKILL.md +1 -1
  58. package/packages/omo-codex/plugin/components/lcx/skills/lcx-doctor/SKILL.md +3 -3
  59. package/packages/omo-codex/plugin/components/lcx/skills/lcx-report-bug/SKILL.md +5 -5
  60. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  61. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  62. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  63. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  64. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  65. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  66. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  67. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  68. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  69. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  70. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  71. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  72. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  73. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +24 -10
  74. package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +8 -6
  75. package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.d.ts +2 -0
  76. package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.js +21 -4
  77. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  78. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  79. package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +10 -5
  80. package/packages/omo-codex/plugin/components/ulw-loop/src/surface.ts +24 -6
  81. package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard-native-reviewer.test.ts +207 -0
  82. package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +6 -4
  83. package/packages/omo-codex/plugin/components/ulw-loop/test/surface.test.ts +43 -4
  84. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  85. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  86. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  93. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  94. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  95. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  96. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  97. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  98. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  99. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  100. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  101. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  102. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  103. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  104. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  105. package/packages/omo-codex/plugin/package-lock.json +12 -12
  106. package/packages/omo-codex/plugin/package.json +1 -1
  107. package/packages/omo-codex/plugin/skills/browser/ATTRIBUTION.md +25 -0
  108. package/packages/omo-codex/plugin/skills/browser/SKILL.md +89 -0
  109. package/packages/omo-codex/plugin/skills/browser/agents/openai.yaml +2 -0
  110. package/packages/omo-codex/plugin/skills/browser/references/commands.md +90 -0
  111. package/packages/omo-codex/plugin/skills/browser/references/install.md +71 -0
  112. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +42 -0
  113. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +39 -0
  114. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/ladder.md +59 -0
  115. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/network.md +42 -0
  116. package/packages/omo-codex/plugin/skills/browser/references/recipes/1password.md +59 -0
  117. package/packages/omo-codex/plugin/skills/browser/references/remote.md +24 -0
  118. package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +41 -0
  119. package/packages/omo-codex/plugin/skills/browser/scripts/browser-env.mjs +41 -0
  120. package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +51 -0
  121. package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +1 -1
  122. package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +3 -3
  123. package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +5 -5
  124. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -0
  125. package/packages/omo-codex/scripts/install-dist/install-local.mjs +90 -17
  126. package/packages/shared-skills/skills/browser/ATTRIBUTION.md +25 -0
  127. package/packages/shared-skills/skills/browser/SKILL.md +89 -0
  128. package/packages/shared-skills/skills/browser/references/commands.md +90 -0
  129. package/packages/shared-skills/skills/browser/references/install.md +71 -0
  130. package/packages/shared-skills/skills/browser/references/owned-engine/README.md +42 -0
  131. package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +39 -0
  132. package/packages/shared-skills/skills/browser/references/owned-engine/ladder.md +59 -0
  133. package/packages/shared-skills/skills/browser/references/owned-engine/network.md +42 -0
  134. package/packages/shared-skills/skills/browser/references/recipes/1password.md +59 -0
  135. package/packages/shared-skills/skills/browser/references/remote.md +24 -0
  136. package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +41 -0
  137. package/packages/shared-skills/skills/browser/scripts/browser-env.mjs +41 -0
  138. package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +51 -0
  139. package/postinstall.mjs +3 -3
  140. package/dist/cli/install-senpi/index.d.ts +0 -1
  141. package/dist/cli/senpi-edition-hint.d.ts +0 -10
  142. package/dist/cli/senpi-platform-flag.d.ts +0 -4
package/dist/tui.js CHANGED
@@ -3268,8 +3268,10 @@ var init_command_executor2 = __esm(() => {
3268
3268
  var init_contains_path2 = () => {};
3269
3269
 
3270
3270
  // packages/omo-opencode/src/shared/plugin-identity.ts
3271
- var PUBLISHED_PACKAGE_NAME = "oh-my-openagent", LOG_FILENAME = "oh-my-opencode.log", CACHE_DIR_NAME = "oh-my-opencode";
3272
- var init_plugin_identity = () => {};
3271
+ var PUBLISHED_PACKAGE_NAME = "oh-my-openagent", ACCEPTED_PACKAGE_NAMES, LOG_FILENAME = "oh-my-opencode.log", CACHE_DIR_NAME = "oh-my-opencode";
3272
+ var init_plugin_identity = __esm(() => {
3273
+ ACCEPTED_PACKAGE_NAMES = ["oh-my-openagent", "oh-my-opencode"];
3274
+ });
3273
3275
 
3274
3276
  // packages/omo-opencode/src/shared/logger.ts
3275
3277
  var logger3, log2, getLogFilePath;
@@ -3296,7 +3298,7 @@ var init_agent_model_requirements = __esm(() => {
3296
3298
  fallbackChain: [
3297
3299
  {
3298
3300
  providers: ["anthropic", "github-copilot", "opencode"],
3299
- model: "claude-opus-5",
3301
+ model: "claude-opus-5-5",
3300
3302
  variant: "max"
3301
3303
  },
3302
3304
  {
@@ -3304,7 +3306,7 @@ var init_agent_model_requirements = __esm(() => {
3304
3306
  model: "kimi-k3"
3305
3307
  },
3306
3308
  {
3307
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3309
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3308
3310
  model: "gpt-5.6-sol",
3309
3311
  variant: "medium"
3310
3312
  },
@@ -3316,17 +3318,17 @@ var init_agent_model_requirements = __esm(() => {
3316
3318
  hephaestus: {
3317
3319
  fallbackChain: [
3318
3320
  {
3319
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3321
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3320
3322
  model: "gpt-5.6-sol",
3321
3323
  variant: "medium"
3322
3324
  }
3323
3325
  ],
3324
- requiresProvider: ["openai", "openai-codex", "github-copilot", "opencode"],
3326
+ requiresProvider: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3325
3327
  requiresAnyModel: true
3326
3328
  },
3327
3329
  oracle: {
3328
3330
  fallbackChain: [
3329
- { providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "xhigh" },
3331
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "xhigh" },
3330
3332
  { providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
3331
3333
  {
3332
3334
  providers: ["google", "github-copilot", "opencode"],
@@ -3335,7 +3337,7 @@ var init_agent_model_requirements = __esm(() => {
3335
3337
  },
3336
3338
  {
3337
3339
  providers: ["anthropic", "github-copilot", "opencode"],
3338
- model: "claude-opus-5",
3340
+ model: "claude-opus-5-5",
3339
3341
  variant: "max"
3340
3342
  },
3341
3343
  { providers: ["opencode-go"], model: "glm-5.2" }
@@ -3343,34 +3345,36 @@ var init_agent_model_requirements = __esm(() => {
3343
3345
  },
3344
3346
  librarian: {
3345
3347
  fallbackChain: [
3346
- { providers: ["openai", "openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
3348
+ { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed", variant: "off" },
3349
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.6-luna-fast", variant: "low" },
3347
3350
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "max" },
3348
3351
  { providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
3349
3352
  { providers: ["opencode-go"], model: "minimax-m3" },
3350
3353
  { providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
3351
3354
  { providers: ["opencode-go"], model: "minimax-m2.7" },
3352
3355
  { providers: ["anthropic", "github-copilot"], model: "claude-haiku-4-5" },
3353
- { providers: ["openai", "openai-codex"], model: "gpt-5.4-nano" }
3356
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.4-nano" }
3354
3357
  ]
3355
3358
  },
3356
3359
  explore: {
3357
3360
  fallbackChain: [
3358
- { providers: ["openai", "openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
3361
+ { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed", variant: "off" },
3362
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.6-luna-fast", variant: "low" },
3359
3363
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "max" },
3360
3364
  { providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
3361
3365
  { providers: ["opencode-go"], model: "minimax-m3" },
3362
3366
  { providers: ["minimax-coding-plan", "minimax-cn-coding-plan"], model: "MiniMax-M3" },
3363
3367
  { providers: ["opencode-go"], model: "minimax-m2.7" },
3364
3368
  { providers: ["anthropic", "github-copilot"], model: "claude-haiku-4-5" },
3365
- { providers: ["openai", "openai-codex"], model: "gpt-5.4-nano" }
3369
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.4-nano" }
3366
3370
  ]
3367
3371
  },
3368
3372
  "multimodal-looker": {
3369
3373
  fallbackChain: [
3370
- { providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "low" },
3374
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "low" },
3371
3375
  { providers: ["opencode-go"], model: "kimi-k3" },
3372
3376
  { providers: ["zai-coding-plan"], model: "glm-4.6v" },
3373
- { providers: ["openai", "openai-codex", "github-copilot", "opencode"], model: "gpt-5-nano" }
3377
+ { providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"], model: "gpt-5-nano" }
3374
3378
  ]
3375
3379
  },
3376
3380
  prometheus: {
@@ -3396,7 +3400,7 @@ var init_agent_model_requirements = __esm(() => {
3396
3400
  },
3397
3401
  {
3398
3402
  providers: ["anthropic", "github-copilot", "opencode"],
3399
- model: "claude-opus-5",
3403
+ model: "claude-opus-5-5",
3400
3404
  variant: "max"
3401
3405
  },
3402
3406
  {
@@ -3408,12 +3412,12 @@ var init_agent_model_requirements = __esm(() => {
3408
3412
  },
3409
3413
  momus: {
3410
3414
  fallbackChain: [
3411
- { providers: ["openai", "openai-codex"], model: "gpt-6-astra", variant: "xhigh" },
3415
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-astra", variant: "xhigh" },
3412
3416
  { providers: ["github-copilot"], model: "gpt-6-astra", variant: "high" },
3413
- { providers: ["openai", "openai-codex", "opencode"], model: "gpt-6-astra", variant: "high" },
3417
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-6-astra", variant: "high" },
3414
3418
  {
3415
3419
  providers: ["anthropic", "github-copilot", "opencode"],
3416
- model: "claude-opus-5",
3420
+ model: "claude-opus-5-5",
3417
3421
  variant: "max"
3418
3422
  },
3419
3423
  {
@@ -3429,7 +3433,7 @@ var init_agent_model_requirements = __esm(() => {
3429
3433
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
3430
3434
  { providers: ["opencode-go"], model: "kimi-k3" },
3431
3435
  {
3432
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3436
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3433
3437
  model: "gpt-5.6-sol",
3434
3438
  variant: "medium"
3435
3439
  },
@@ -3443,7 +3447,7 @@ var init_agent_model_requirements = __esm(() => {
3443
3447
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
3444
3448
  { providers: ["opencode-go"], model: "kimi-k3" },
3445
3449
  {
3446
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3450
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3447
3451
  model: "gpt-5.6-sol",
3448
3452
  variant: "medium"
3449
3453
  },
@@ -3469,7 +3473,7 @@ var init_category_model_requirements = __esm(() => {
3469
3473
  },
3470
3474
  {
3471
3475
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
3472
- model: "claude-opus-5",
3476
+ model: "claude-opus-5-5",
3473
3477
  variant: "max"
3474
3478
  },
3475
3479
  {
@@ -3481,18 +3485,18 @@ var init_category_model_requirements = __esm(() => {
3481
3485
  },
3482
3486
  ultrabrain: {
3483
3487
  fallbackChain: [
3484
- { providers: ["openai", "openai-codex"], model: "gpt-6-astra", variant: "max" },
3488
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-astra", variant: "max" },
3485
3489
  { providers: ["github-copilot"], model: "gpt-6-astra", variant: "max" },
3486
- { providers: ["openai", "openai-codex", "opencode"], model: "gpt-6-astra", variant: "max" },
3487
- { providers: ["openai", "openai-codex"], model: "gpt-5.6-sol", variant: "max" },
3490
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-6-astra", variant: "max" },
3491
+ { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.6-sol", variant: "max" },
3488
3492
  { providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "max" },
3489
- { providers: ["openai", "openai-codex", "opencode"], model: "gpt-5.6-sol", variant: "max" }
3493
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "max" }
3490
3494
  ]
3491
3495
  },
3492
3496
  "deep-low": {
3493
3497
  fallbackChain: [
3494
3498
  {
3495
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3499
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3496
3500
  model: "gpt-5.6-sol",
3497
3501
  variant: "medium"
3498
3502
  }
@@ -3501,7 +3505,7 @@ var init_category_model_requirements = __esm(() => {
3501
3505
  "deep-high": {
3502
3506
  fallbackChain: [
3503
3507
  {
3504
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3508
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3505
3509
  model: "gpt-6-astra",
3506
3510
  variant: "high"
3507
3511
  }
@@ -3521,15 +3525,14 @@ var init_category_model_requirements = __esm(() => {
3521
3525
  },
3522
3526
  {
3523
3527
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
3524
- model: "claude-opus-5",
3525
- variant: "xhigh"
3528
+ model: "claude-opus-5-5",
3529
+ variant: "max"
3526
3530
  }
3527
3531
  ]
3528
3532
  },
3529
3533
  quick: {
3530
3534
  fallbackChain: [
3531
- { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed" },
3532
- { providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
3535
+ { providers: ["chatgpt-subscription"], model: "gpt-5.6-luna-fast", variant: "low" },
3533
3536
  { providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
3534
3537
  {
3535
3538
  providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan"],
@@ -3548,9 +3551,10 @@ var init_category_model_requirements = __esm(() => {
3548
3551
  },
3549
3552
  "unspecified-low": {
3550
3553
  fallbackChain: [
3551
- { providers: ["xai", "github-copilot", "opencode"], model: "grok-4.6", variant: "xhigh" },
3554
+ { providers: ["xiaomi", "opencode-go"], model: "mimo-v2.6-pro", variant: "max" },
3555
+ { providers: ["xai", "github-copilot", "opencode-go"], model: "grok-4.7", variant: "xhigh" },
3552
3556
  {
3553
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3557
+ providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
3554
3558
  model: "gpt-5.6-terra",
3555
3559
  variant: "high"
3556
3560
  },
@@ -3570,15 +3574,10 @@ var init_category_model_requirements = __esm(() => {
3570
3574
  },
3571
3575
  "unspecified-high": {
3572
3576
  fallbackChain: [
3573
- {
3574
- providers: ["openai", "openai-codex", "github-copilot", "opencode"],
3575
- model: "gpt-6-astra",
3576
- variant: "high"
3577
- },
3578
3577
  {
3579
3578
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
3580
- model: "claude-opus-5",
3581
- variant: "xhigh"
3579
+ model: "claude-opus-5-5",
3580
+ variant: "max"
3582
3581
  },
3583
3582
  { providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "max" },
3584
3583
  {
@@ -3596,14 +3595,14 @@ var init_category_model_requirements = __esm(() => {
3596
3595
  variant: "low"
3597
3596
  },
3598
3597
  {
3599
- providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
3600
- model: "kimi-k3",
3598
+ providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
3599
+ model: "claude-opus-5-5",
3601
3600
  variant: "low"
3602
3601
  },
3603
3602
  {
3604
3603
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
3605
3604
  model: "claude-opus-4-6",
3606
- variant: "low"
3605
+ variant: "max"
3607
3606
  }
3608
3607
  ]
3609
3608
  }
@@ -4188,6 +4187,36 @@ var init_supplemental_entries = __esm(() => {
4188
4187
  output: 32768
4189
4188
  }
4190
4189
  },
4190
+ "grok-4.7": {
4191
+ id: "grok-4.7",
4192
+ family: "grok",
4193
+ reasoning: false,
4194
+ temperature: true,
4195
+ toolCall: true,
4196
+ modalities: {
4197
+ input: ["text", "image"],
4198
+ output: ["text"]
4199
+ },
4200
+ limit: {
4201
+ context: 500000,
4202
+ output: 32768
4203
+ }
4204
+ },
4205
+ "xai/grok-4.7": {
4206
+ id: "xai/grok-4.7",
4207
+ family: "grok",
4208
+ reasoning: false,
4209
+ temperature: true,
4210
+ toolCall: true,
4211
+ modalities: {
4212
+ input: ["text", "image"],
4213
+ output: ["text"]
4214
+ },
4215
+ limit: {
4216
+ context: 500000,
4217
+ output: 32768
4218
+ }
4219
+ },
4191
4220
  "xai/grok-build-0.1": {
4192
4221
  id: "xai/grok-build-0.1",
4193
4222
  family: "grok",
@@ -4217,6 +4246,36 @@ var init_supplemental_entries = __esm(() => {
4217
4246
  context: 256000,
4218
4247
  output: 32768
4219
4248
  }
4249
+ },
4250
+ "mimo-v2.6-pro": {
4251
+ id: "mimo-v2.6-pro",
4252
+ family: "mimo",
4253
+ reasoning: true,
4254
+ temperature: true,
4255
+ toolCall: true,
4256
+ modalities: {
4257
+ input: ["text", "image"],
4258
+ output: ["text"]
4259
+ },
4260
+ limit: {
4261
+ context: 1048576,
4262
+ output: 131072
4263
+ }
4264
+ },
4265
+ "xiaomi/mimo-v2.6-pro": {
4266
+ id: "xiaomi/mimo-v2.6-pro",
4267
+ family: "mimo",
4268
+ reasoning: true,
4269
+ temperature: true,
4270
+ toolCall: true,
4271
+ modalities: {
4272
+ input: ["text", "image"],
4273
+ output: ["text"]
4274
+ },
4275
+ limit: {
4276
+ context: 1048576,
4277
+ output: 131072
4278
+ }
4220
4279
  }
4221
4280
  };
4222
4281
  });
@@ -4740,6 +4799,9 @@ function getCacheDir() {
4740
4799
  function getOmoOpenCodeCacheDir() {
4741
4800
  return path3.join(getCacheDir(), CACHE_DIR_NAME);
4742
4801
  }
4802
+ function getOpenCodeCacheDir() {
4803
+ return path3.join(getCacheDir(), "opencode");
4804
+ }
4743
4805
  var init_data_path = __esm(() => {
4744
4806
  init_src();
4745
4807
  init_plugin_identity();
@@ -5102,21 +5164,21 @@ var init_openai_categories = __esm(() => {
5102
5164
  },
5103
5165
  {
5104
5166
  name: "quick",
5105
- config: { model: "kimi-for-coding/kimi-for-coding-highspeed" },
5167
+ config: { model: "openai/gpt-5.6-luna-fast", variant: "low" },
5106
5168
  description: "Trivial tasks - single file changes, typo fixes, simple modifications",
5107
5169
  callerGuidance: QUICK_CATEGORY_CALLER_GUIDANCE,
5108
5170
  promptAppend: QUICK_CATEGORY_PROMPT_APPEND
5109
5171
  },
5110
5172
  {
5111
5173
  name: "unspecified-low",
5112
- config: { model: "xai/grok-4.6", variant: "xhigh" },
5174
+ config: { model: "xiaomi/mimo-v2.6-pro", variant: "max" },
5113
5175
  description: "Tasks that don't fit other categories, low effort required",
5114
5176
  callerGuidance: UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE,
5115
5177
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
5116
5178
  },
5117
5179
  {
5118
5180
  name: "unspecified-high",
5119
- config: { model: "openai/gpt-6-astra", variant: "high" },
5181
+ config: { model: "anthropic/claude-opus-5-5", variant: "max" },
5120
5182
  description: "Tasks that don't fit other categories, high effort required",
5121
5183
  callerGuidance: UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE,
5122
5184
  promptAppend: UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND,
@@ -5164,6 +5226,102 @@ var init_migration2 = __esm(() => {
5164
5226
  });
5165
5227
 
5166
5228
  // packages/omo-opencode/src/shared/opencode-config-dir.ts
5229
+ import { existsSync as existsSync2, realpathSync } from "fs";
5230
+ import { homedir as homedir2 } from "os";
5231
+ import { join as join3, posix, resolve, win32 } from "path";
5232
+ function isDevBuild(version) {
5233
+ if (!version)
5234
+ return false;
5235
+ return version.includes("-dev") || version.includes(".dev");
5236
+ }
5237
+ function getTauriConfigDir(identifier) {
5238
+ const platform = process.platform;
5239
+ switch (platform) {
5240
+ case "darwin":
5241
+ return join3(homedir2(), "Library", "Application Support", identifier);
5242
+ case "win32": {
5243
+ const appData = process.env.APPDATA || join3(homedir2(), "AppData", "Roaming");
5244
+ return win32.join(appData, identifier);
5245
+ }
5246
+ case "linux":
5247
+ default: {
5248
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join3(homedir2(), ".config");
5249
+ return join3(xdgConfig, identifier);
5250
+ }
5251
+ }
5252
+ }
5253
+ function resolveConfigPath(pathValue) {
5254
+ if (isWslEnvironment() && pathValue.startsWith("/")) {
5255
+ return posix.normalize(pathValue);
5256
+ }
5257
+ const resolvedPath = resolve(pathValue);
5258
+ if (!existsSync2(resolvedPath))
5259
+ return resolvedPath;
5260
+ try {
5261
+ return realpathSync(resolvedPath);
5262
+ } catch (error) {
5263
+ if (error instanceof Error) {
5264
+ return resolvedPath;
5265
+ }
5266
+ return resolvedPath;
5267
+ }
5268
+ }
5269
+ function isWslEnvironment() {
5270
+ return process.platform === "linux" && (Boolean(process.env.WSL_DISTRO_NAME?.trim()) || Boolean(process.env.WSL_INTEROP?.trim()));
5271
+ }
5272
+ function isWindowsUserConfigRoot(pathValue) {
5273
+ const normalizedPath = pathValue.replaceAll("\\", "/").toLowerCase();
5274
+ return /^[a-z]:\/users\//.test(normalizedPath) || /^\/mnt\/[a-z]\/users\//.test(normalizedPath);
5275
+ }
5276
+ function getWindowsUserFromConfigRoot(pathValue) {
5277
+ const normalizedPath = pathValue.replaceAll("\\", "/");
5278
+ const match = /^(?:[a-z]:|\/mnt\/[a-z])\/Users\/([^/]+)/i.exec(normalizedPath);
5279
+ return match?.[1] ?? null;
5280
+ }
5281
+ function getWslLinuxHomeDir(windowsConfigRoot) {
5282
+ const envHome = process.env.HOME?.trim();
5283
+ if (envHome && envHome.startsWith("/") && !isWindowsUserConfigRoot(envHome)) {
5284
+ return envHome;
5285
+ }
5286
+ const user = process.env.USER?.trim() || process.env.LOGNAME?.trim() || process.env.SUDO_USER?.trim() || (windowsConfigRoot ? getWindowsUserFromConfigRoot(windowsConfigRoot) : undefined);
5287
+ return user ? posix.join("/home", user) : null;
5288
+ }
5289
+ function getCliDefaultConfigDir() {
5290
+ const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
5291
+ const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment() && isWindowsUserConfigRoot(envXdgConfig);
5292
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix.join(getWslLinuxHomeDir(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join3(homedir2(), ".config");
5293
+ const configDir = isWslEnvironment() ? posix.join(xdgConfig, "opencode") : join3(xdgConfig, "opencode");
5294
+ return resolveConfigPath(configDir);
5295
+ }
5296
+ function getCliCustomConfigDir() {
5297
+ const envConfigDir = process.env.OPENCODE_CONFIG_DIR?.trim();
5298
+ if (!envConfigDir) {
5299
+ return null;
5300
+ }
5301
+ return resolveConfigPath(envConfigDir);
5302
+ }
5303
+ function getCliConfigDir() {
5304
+ return getCliCustomConfigDir() ?? getCliDefaultConfigDir();
5305
+ }
5306
+ function getOpenCodeConfigDir(options) {
5307
+ const { binary, version, checkExisting = true } = options;
5308
+ if (binary === "opencode") {
5309
+ return getCliConfigDir();
5310
+ }
5311
+ const identifier = isDevBuild(version) ? TAURI_APP_IDENTIFIER_DEV : TAURI_APP_IDENTIFIER;
5312
+ const tauriDirBase = getTauriConfigDir(identifier);
5313
+ const tauriDir = process.platform === "win32" ? win32.isAbsolute(tauriDirBase) ? win32.normalize(tauriDirBase) : win32.resolve(tauriDirBase) : resolveConfigPath(tauriDirBase);
5314
+ if (checkExisting) {
5315
+ const legacyDir = getCliConfigDir();
5316
+ const legacyConfig = join3(legacyDir, "opencode.json");
5317
+ const legacyConfigC = join3(legacyDir, "opencode.jsonc");
5318
+ if (existsSync2(legacyConfig) || existsSync2(legacyConfigC)) {
5319
+ return legacyDir;
5320
+ }
5321
+ }
5322
+ return tauriDir;
5323
+ }
5324
+ var TAURI_APP_IDENTIFIER = "ai.opencode.desktop", TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
5167
5325
  var init_opencode_config_dir = () => {};
5168
5326
 
5169
5327
  // packages/omo-opencode/src/shared/resolve-agent-definition-paths.ts
@@ -5265,8 +5423,8 @@ var init_write_file_atomically = __esm(() => {
5265
5423
  });
5266
5424
 
5267
5425
  // packages/omo-opencode/src/shared/json-file-cache-store.ts
5268
- import { existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync, writeFileSync } from "fs";
5269
- import { join as join3 } from "path";
5426
+ import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync, writeFileSync } from "fs";
5427
+ import { join as join4 } from "path";
5270
5428
  function toLogLabel(cacheLabel) {
5271
5429
  return cacheLabel.toLowerCase();
5272
5430
  }
@@ -5274,11 +5432,11 @@ function createJsonFileCacheStore(options) {
5274
5432
  let memoryValue;
5275
5433
  let writtenInCurrentProcess = false;
5276
5434
  function getCacheFilePath() {
5277
- return join3(options.getCacheDir(), options.filename);
5435
+ return join4(options.getCacheDir(), options.filename);
5278
5436
  }
5279
5437
  function ensureCacheDir() {
5280
5438
  const cacheDir = options.getCacheDir();
5281
- if (!existsSync2(cacheDir)) {
5439
+ if (!existsSync3(cacheDir)) {
5282
5440
  mkdirSync3(cacheDir, { recursive: true });
5283
5441
  }
5284
5442
  }
@@ -5287,7 +5445,7 @@ function createJsonFileCacheStore(options) {
5287
5445
  return memoryValue;
5288
5446
  }
5289
5447
  const cacheFile = getCacheFilePath();
5290
- if (!existsSync2(cacheFile)) {
5448
+ if (!existsSync3(cacheFile)) {
5291
5449
  memoryValue = null;
5292
5450
  log2(`[${options.logPrefix}] ${options.cacheLabel} file not found`, { cacheFile });
5293
5451
  return null;
@@ -5313,7 +5471,7 @@ function createJsonFileCacheStore(options) {
5313
5471
  if (writtenInCurrentProcess) {
5314
5472
  return true;
5315
5473
  }
5316
- return existsSync2(getCacheFilePath());
5474
+ return existsSync3(getCacheFilePath());
5317
5475
  }
5318
5476
  function write(value) {
5319
5477
  ensureCacheDir();
@@ -59750,6 +59908,216 @@ var init_model_capabilities_generated = __esm(() => {
59750
59908
  context: 500000,
59751
59909
  output: 500000
59752
59910
  }
59911
+ },
59912
+ "claude-opus-5-5": {
59913
+ id: "claude-opus-5-5",
59914
+ family: "claude-opus",
59915
+ reasoning: true,
59916
+ temperature: false,
59917
+ toolCall: true,
59918
+ modalities: {
59919
+ input: [
59920
+ "text",
59921
+ "image",
59922
+ "pdf"
59923
+ ],
59924
+ output: [
59925
+ "text"
59926
+ ]
59927
+ },
59928
+ limit: {
59929
+ context: 1e6,
59930
+ output: 128000
59931
+ }
59932
+ },
59933
+ "claude-opus-5-5@default": {
59934
+ id: "claude-opus-5-5@default",
59935
+ family: "claude-opus",
59936
+ reasoning: true,
59937
+ temperature: false,
59938
+ toolCall: true,
59939
+ modalities: {
59940
+ input: [
59941
+ "text",
59942
+ "image",
59943
+ "pdf"
59944
+ ],
59945
+ output: [
59946
+ "text"
59947
+ ]
59948
+ },
59949
+ limit: {
59950
+ context: 1e6,
59951
+ output: 128000
59952
+ }
59953
+ },
59954
+ "anthropic/claude-opus-5.5": {
59955
+ id: "anthropic/claude-opus-5.5",
59956
+ family: "claude-opus",
59957
+ reasoning: true,
59958
+ temperature: true,
59959
+ toolCall: true,
59960
+ modalities: {
59961
+ input: [
59962
+ "text",
59963
+ "image",
59964
+ "pdf"
59965
+ ],
59966
+ output: [
59967
+ "text"
59968
+ ]
59969
+ },
59970
+ limit: {
59971
+ context: 1e6,
59972
+ output: 128000
59973
+ }
59974
+ },
59975
+ "au.anthropic.claude-opus-5-5": {
59976
+ id: "au.anthropic.claude-opus-5-5",
59977
+ family: "claude-opus",
59978
+ reasoning: true,
59979
+ temperature: false,
59980
+ toolCall: true,
59981
+ modalities: {
59982
+ input: [
59983
+ "text",
59984
+ "image",
59985
+ "pdf"
59986
+ ],
59987
+ output: [
59988
+ "text"
59989
+ ]
59990
+ },
59991
+ limit: {
59992
+ context: 1e6,
59993
+ output: 128000
59994
+ }
59995
+ },
59996
+ "anthropic.claude-opus-5-5": {
59997
+ id: "anthropic.claude-opus-5-5",
59998
+ family: "claude-opus",
59999
+ reasoning: true,
60000
+ temperature: false,
60001
+ toolCall: true,
60002
+ modalities: {
60003
+ input: [
60004
+ "text",
60005
+ "image",
60006
+ "pdf"
60007
+ ],
60008
+ output: [
60009
+ "text"
60010
+ ]
60011
+ },
60012
+ limit: {
60013
+ context: 1e6,
60014
+ output: 128000
60015
+ }
60016
+ },
60017
+ "eu.anthropic.claude-opus-5-5": {
60018
+ id: "eu.anthropic.claude-opus-5-5",
60019
+ family: "claude-opus",
60020
+ reasoning: true,
60021
+ temperature: false,
60022
+ toolCall: true,
60023
+ modalities: {
60024
+ input: [
60025
+ "text",
60026
+ "image",
60027
+ "pdf"
60028
+ ],
60029
+ output: [
60030
+ "text"
60031
+ ]
60032
+ },
60033
+ limit: {
60034
+ context: 1e6,
60035
+ output: 128000
60036
+ }
60037
+ },
60038
+ "global.anthropic.claude-opus-5-5": {
60039
+ id: "global.anthropic.claude-opus-5-5",
60040
+ family: "claude-opus",
60041
+ reasoning: true,
60042
+ temperature: false,
60043
+ toolCall: true,
60044
+ modalities: {
60045
+ input: [
60046
+ "text",
60047
+ "image",
60048
+ "pdf"
60049
+ ],
60050
+ output: [
60051
+ "text"
60052
+ ]
60053
+ },
60054
+ limit: {
60055
+ context: 1e6,
60056
+ output: 128000
60057
+ }
60058
+ },
60059
+ "jp.anthropic.claude-opus-5-5": {
60060
+ id: "jp.anthropic.claude-opus-5-5",
60061
+ family: "claude-opus",
60062
+ reasoning: true,
60063
+ temperature: false,
60064
+ toolCall: true,
60065
+ modalities: {
60066
+ input: [
60067
+ "text",
60068
+ "image",
60069
+ "pdf"
60070
+ ],
60071
+ output: [
60072
+ "text"
60073
+ ]
60074
+ },
60075
+ limit: {
60076
+ context: 1e6,
60077
+ output: 128000
60078
+ }
60079
+ },
60080
+ "us.anthropic.claude-opus-5-5": {
60081
+ id: "us.anthropic.claude-opus-5-5",
60082
+ family: "claude-opus",
60083
+ reasoning: true,
60084
+ temperature: false,
60085
+ toolCall: true,
60086
+ modalities: {
60087
+ input: [
60088
+ "text",
60089
+ "image",
60090
+ "pdf"
60091
+ ],
60092
+ output: [
60093
+ "text"
60094
+ ]
60095
+ },
60096
+ limit: {
60097
+ context: 1e6,
60098
+ output: 128000
60099
+ }
60100
+ },
60101
+ "anthropic/claude-opus-5-5": {
60102
+ id: "anthropic/claude-opus-5-5",
60103
+ family: "claude-opus",
60104
+ reasoning: true,
60105
+ temperature: false,
60106
+ toolCall: true,
60107
+ modalities: {
60108
+ input: [
60109
+ "text",
60110
+ "image",
60111
+ "pdf"
60112
+ ],
60113
+ output: [
60114
+ "text"
60115
+ ]
60116
+ },
60117
+ limit: {
60118
+ context: 1e6,
60119
+ output: 128000
60120
+ }
59753
60121
  }
59754
60122
  }
59755
60123
  };
@@ -59882,14 +60250,14 @@ var init_fallback_model_availability = __esm(() => {
59882
60250
  });
59883
60251
 
59884
60252
  // packages/omo-opencode/src/shared/opencode-storage-paths.ts
59885
- import { join as join4 } from "path";
60253
+ import { join as join5 } from "path";
59886
60254
  var OPENCODE_STORAGE, MESSAGE_STORAGE, PART_STORAGE, SESSION_STORAGE;
59887
60255
  var init_opencode_storage_paths = __esm(() => {
59888
60256
  init_data_path();
59889
60257
  OPENCODE_STORAGE = getOpenCodeStorageDir();
59890
- MESSAGE_STORAGE = join4(OPENCODE_STORAGE, "message");
59891
- PART_STORAGE = join4(OPENCODE_STORAGE, "part");
59892
- SESSION_STORAGE = join4(OPENCODE_STORAGE, "session");
60258
+ MESSAGE_STORAGE = join5(OPENCODE_STORAGE, "message");
60259
+ PART_STORAGE = join5(OPENCODE_STORAGE, "part");
60260
+ SESSION_STORAGE = join5(OPENCODE_STORAGE, "session");
59893
60261
  });
59894
60262
 
59895
60263
  // packages/omo-opencode/src/shared/compaction-marker.ts
@@ -69224,12 +69592,14 @@ var init_git_master = __esm(() => {
69224
69592
  });
69225
69593
 
69226
69594
  // packages/omo-config-core/src/schema/harness.ts
69227
- var HARNESS_IDS, OMO_CONFIG_HARNESS_IDS, OmoHarnessIdSchema;
69595
+ var HARNESS_IDS, OMO_CONFIG_HARNESS_IDS, OmoHarnessIdSchema, OMO_CONFIG_LEGACY_HARNESS_ALIASES, OMO_CONFIG_LEGACY_HARNESS_IDS;
69228
69596
  var init_harness = __esm(() => {
69229
69597
  init_zod();
69230
69598
  HARNESS_IDS = ["codex", "opencode", "omo"];
69231
- OMO_CONFIG_HARNESS_IDS = ["opencode", "senpi", "codex"];
69599
+ OMO_CONFIG_HARNESS_IDS = ["opencode", "native", "codex"];
69232
69600
  OmoHarnessIdSchema = _enum(OMO_CONFIG_HARNESS_IDS);
69601
+ OMO_CONFIG_LEGACY_HARNESS_ALIASES = { senpi: "native" };
69602
+ OMO_CONFIG_LEGACY_HARNESS_IDS = Object.keys(OMO_CONFIG_LEGACY_HARNESS_ALIASES);
69233
69603
  });
69234
69604
 
69235
69605
  // packages/omo-config-core/src/schema/memory.ts
@@ -69732,6 +70102,7 @@ var init_config = __esm(() => {
69732
70102
  telemetry: OmoTelemetrySettingsLayerSchema.optional(),
69733
70103
  disabled_skills: OmoDisabledSkillsSchema.optional(),
69734
70104
  "[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
70105
+ "[native]": OmoTypedHarnessConfigSchema.optional(),
69735
70106
  "[senpi]": OmoTypedHarnessConfigSchema.optional(),
69736
70107
  "[codex]": OmoTypedHarnessConfigSchema.optional()
69737
70108
  }).strict();
@@ -69750,6 +70121,7 @@ var init_config = __esm(() => {
69750
70121
  telemetry: OmoTelemetrySettingsSchema.optional(),
69751
70122
  disabled_skills: OmoDisabledSkillsSchema.optional(),
69752
70123
  "[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
70124
+ "[native]": OmoTypedHarnessConfigSchema.optional(),
69753
70125
  "[senpi]": OmoTypedHarnessConfigSchema.optional(),
69754
70126
  "[codex]": OmoTypedHarnessConfigSchema.optional(),
69755
70127
  profiles: record(string2(), OmoConfigProfileSchema).default({}),
@@ -69771,6 +70143,7 @@ var init_config = __esm(() => {
69771
70143
  telemetry: OmoTelemetrySettingsLayerSchema.optional(),
69772
70144
  disabled_skills: OmoDisabledSkillsSchema.optional(),
69773
70145
  "[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
70146
+ "[native]": OmoTypedHarnessConfigSchema.optional(),
69774
70147
  "[senpi]": OmoTypedHarnessConfigSchema.optional(),
69775
70148
  "[codex]": OmoTypedHarnessConfigSchema.optional(),
69776
70149
  profiles: record(string2(), OmoConfigProfileSchema).optional(),
@@ -69838,6 +70211,57 @@ var init_legacy_category_names = __esm(() => {
69838
70211
  LEGACY_CATEGORY_NAME_ALIASES = { deep: "deep-low" };
69839
70212
  });
69840
70213
 
70214
+ // packages/omo-config-core/src/schema/legacy-harness-names.ts
70215
+ function canonicalHarnessName(name) {
70216
+ return Object.hasOwn(OMO_CONFIG_LEGACY_HARNESS_ALIASES, name) ? OMO_CONFIG_LEGACY_HARNESS_ALIASES[name] : name;
70217
+ }
70218
+ function harnessBlockKey(harness) {
70219
+ return `[${harness}]`;
70220
+ }
70221
+ function legacyHarnessOfBlockKey(key) {
70222
+ if (!key.startsWith("[") || !key.endsWith("]"))
70223
+ return;
70224
+ const harness = key.slice(1, -1);
70225
+ return Object.hasOwn(OMO_CONFIG_LEGACY_HARNESS_ALIASES, harness) ? harness : undefined;
70226
+ }
70227
+ function isRecord10(value) {
70228
+ return typeof value === "object" && value !== null && !Array.isArray(value);
70229
+ }
70230
+ function canonicalizeBlocksIn(container, path, renames) {
70231
+ const result = {};
70232
+ for (const [key, value] of Object.entries(container)) {
70233
+ const legacyHarness = legacyHarnessOfBlockKey(key);
70234
+ if (legacyHarness === undefined) {
70235
+ result[key] = value;
70236
+ continue;
70237
+ }
70238
+ const canonical = harnessBlockKey(canonicalHarnessName(legacyHarness));
70239
+ const dropped = Object.hasOwn(container, canonical);
70240
+ renames.push({ canonical, dropped, legacy: key, path: [...path, key].join(".") });
70241
+ if (!dropped)
70242
+ result[canonical] = value;
70243
+ }
70244
+ return result;
70245
+ }
70246
+ function canonicalizeLegacyHarnessBlocks(document) {
70247
+ if (!isRecord10(document))
70248
+ return { document: {}, renames: [] };
70249
+ const renames = [];
70250
+ const canonicalized = canonicalizeBlocksIn(document, [], renames);
70251
+ const profiles = canonicalized["profiles"];
70252
+ if (isRecord10(profiles)) {
70253
+ const canonicalProfiles = {};
70254
+ for (const [name, profile] of Object.entries(profiles)) {
70255
+ canonicalProfiles[name] = isRecord10(profile) ? canonicalizeBlocksIn(profile, ["profiles", name], renames) : profile;
70256
+ }
70257
+ canonicalized["profiles"] = canonicalProfiles;
70258
+ }
70259
+ return { document: canonicalized, renames };
70260
+ }
70261
+ var init_legacy_harness_names = __esm(() => {
70262
+ init_harness();
70263
+ });
70264
+
69841
70265
  // packages/omo-config-core/src/schema/index.ts
69842
70266
  var init_schema = __esm(() => {
69843
70267
  init_agent();
@@ -69848,6 +70272,7 @@ var init_schema = __esm(() => {
69848
70272
  init_git_master();
69849
70273
  init_harness();
69850
70274
  init_legacy_category_names();
70275
+ init_legacy_harness_names();
69851
70276
  init_memory();
69852
70277
  init_model_catalog();
69853
70278
  init_model_profile();
@@ -69857,6 +70282,9 @@ var init_schema = __esm(() => {
69857
70282
  init_telemetry();
69858
70283
  });
69859
70284
 
70285
+ // packages/omo-config-core/src/loader/disabled-skills.ts
70286
+ var init_disabled_skills = () => {};
70287
+
69860
70288
  // packages/omo-config-core/src/loader/merge.ts
69861
70289
  function isUnsafeObjectKey2(key) {
69862
70290
  return DANGEROUS_KEYS2.has(key);
@@ -69900,33 +70328,33 @@ function toPosixPath(path) {
69900
70328
  var init_posix_path = () => {};
69901
70329
 
69902
70330
  // packages/omo-config-core/src/loader/types.ts
69903
- import { existsSync as existsSync3, lstatSync, readFileSync as readFileSync3, realpathSync as realpathSync2 } from "fs";
70331
+ import { existsSync as existsSync4, lstatSync, readFileSync as readFileSync4, realpathSync as realpathSync3 } from "fs";
69904
70332
  var DEFAULT_READ_FILE_SYSTEM;
69905
70333
  var init_types3 = __esm(() => {
69906
70334
  DEFAULT_READ_FILE_SYSTEM = {
69907
- existsSync: existsSync3,
70335
+ existsSync: existsSync4,
69908
70336
  lstatSync,
69909
- readFileSync: readFileSync3,
69910
- realpathSync: realpathSync2
70337
+ readFileSync: readFileSync4,
70338
+ realpathSync: realpathSync3
69911
70339
  };
69912
70340
  });
69913
70341
 
69914
70342
  // packages/omo-config-core/src/loader/paths.ts
69915
70343
  import { userInfo } from "os";
69916
- import { dirname, join as join6, posix, resolve as resolve2 } from "path";
70344
+ import { dirname, join as join10, posix as posix2, resolve as resolve3 } from "path";
69917
70345
  function resolveHomeDir(env = process.env) {
69918
70346
  const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
69919
- return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve2(homeDir));
70347
+ return homeDir.startsWith("/") ? posix2.resolve(homeDir) : toPosixPath(resolve3(homeDir));
69920
70348
  }
69921
70349
  function resolveUserOmoConfigDirectory(env = process.env) {
69922
- return join6(resolveHomeDir(env), ".omo");
70350
+ return join10(resolveHomeDir(env), ".omo");
69923
70351
  }
69924
70352
  function detectUserOmoJsonPath(env, fileSystem) {
69925
70353
  const configDir = resolveUserOmoConfigDirectory(env);
69926
- const jsoncPath = join6(configDir, "omo.jsonc");
70354
+ const jsoncPath = join10(configDir, "omo.jsonc");
69927
70355
  if (fileSystem.existsSync(jsoncPath))
69928
70356
  return jsoncPath;
69929
- const jsonPath = join6(configDir, "omo.json");
70357
+ const jsonPath = join10(configDir, "omo.json");
69930
70358
  return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
69931
70359
  }
69932
70360
  function isSymlinkedProjectPath(path, fileSystem) {
@@ -69944,13 +70372,13 @@ function isLoadableProjectConfigFile(path, fileSystem) {
69944
70372
  return fileSystem.existsSync(path) && !isSymlinkedProjectPath(path, fileSystem);
69945
70373
  }
69946
70374
  function detectOmoJsonPath(dir, fileSystem) {
69947
- const omoDir = join6(dir, ".omo");
70375
+ const omoDir = join10(dir, ".omo");
69948
70376
  if (isSymlinkedProjectPath(omoDir, fileSystem))
69949
70377
  return null;
69950
- const jsoncPath = join6(omoDir, "omo.jsonc");
70378
+ const jsoncPath = join10(omoDir, "omo.jsonc");
69951
70379
  if (isLoadableProjectConfigFile(jsoncPath, fileSystem))
69952
70380
  return jsoncPath;
69953
- const jsonPath = join6(omoDir, "omo.json");
70381
+ const jsonPath = join10(omoDir, "omo.json");
69954
70382
  return isLoadableProjectConfigFile(jsonPath, fileSystem) ? jsonPath : null;
69955
70383
  }
69956
70384
  function realpathOrSelf(path, fileSystem) {
@@ -69963,8 +70391,8 @@ function realpathOrSelf(path, fileSystem) {
69963
70391
  }
69964
70392
  }
69965
70393
  function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHomeDir = homeDir) {
69966
- const startDir = resolve2(cwd);
69967
- const boundaryDirs = [...new Set([resolve2(homeDir), resolve2(accountHomeDir)])];
70394
+ const startDir = resolve3(cwd);
70395
+ const boundaryDirs = [...new Set([resolve3(homeDir), resolve3(accountHomeDir)])];
69968
70396
  const realBoundaryDirs = new Set(boundaryDirs.map((path) => realpathOrSelf(path, fileSystem)));
69969
70397
  const nearestFirst = [];
69970
70398
  let currentDir = startDir;
@@ -70028,7 +70456,13 @@ function withoutControlKeys(config) {
70028
70456
  function harnessLayer(config, harness) {
70029
70457
  if (harness === undefined)
70030
70458
  return {};
70031
- return toRecord(config[`[${harness}]`]) ?? {};
70459
+ const canonical = canonicalHarnessName(harness);
70460
+ const legacyKeys = Object.entries(OMO_CONFIG_LEGACY_HARNESS_ALIASES).filter(([, target]) => target === canonical).map(([legacy]) => harnessBlockKey(legacy));
70461
+ let layer = {};
70462
+ for (const key of [...legacyKeys, harnessBlockKey(canonical)]) {
70463
+ layer = mergeOmoConfigRecords(layer, toRecord(config[key]) ?? {});
70464
+ }
70465
+ return layer;
70032
70466
  }
70033
70467
  function resolveOmoConfigView(options) {
70034
70468
  const profiles = toRecord(options.config["profiles"]);
@@ -70058,7 +70492,7 @@ var HARNESS_KEYS;
70058
70492
  var init_resolution = __esm(() => {
70059
70493
  init_schema();
70060
70494
  init_merge();
70061
- HARNESS_KEYS = [...new Set([...HARNESS_IDS, ...OMO_CONFIG_HARNESS_IDS])].map((harness) => `[${harness}]`);
70495
+ HARNESS_KEYS = [...new Set([...HARNESS_IDS, ...OMO_CONFIG_HARNESS_IDS, ...OMO_CONFIG_LEGACY_HARNESS_IDS])].map((harness) => harnessBlockKey(harness));
70062
70496
  });
70063
70497
 
70064
70498
  // packages/omo-config-core/src/loader/loader.ts
@@ -70079,6 +70513,7 @@ function parseJsoncSafe2(content) {
70079
70513
  function stripResolutionControlKeys(config) {
70080
70514
  const {
70081
70515
  "[codex]": _codex,
70516
+ "[native]": _native,
70082
70517
  "[opencode]": _opencode,
70083
70518
  "[senpi]": _senpi,
70084
70519
  profiles: _profiles,
@@ -70104,21 +70539,21 @@ function hasUnsafeUnrecognizedKey(issues) {
70104
70539
  function hasTamperedPrototype(value) {
70105
70540
  if (Array.isArray(value))
70106
70541
  return value.some((entry) => hasTamperedPrototype(entry));
70107
- if (!isRecord10(value))
70542
+ if (!isRecord11(value))
70108
70543
  return false;
70109
70544
  const prototype = Object.getPrototypeOf(value);
70110
70545
  if (prototype !== Object.prototype && prototype !== null)
70111
70546
  return true;
70112
70547
  return Object.values(value).some((entry) => hasTamperedPrototype(entry));
70113
70548
  }
70114
- function isRecord10(value) {
70549
+ function isRecord11(value) {
70115
70550
  return typeof value === "object" && value !== null && !Array.isArray(value);
70116
70551
  }
70117
70552
  function containerAt(record, path) {
70118
70553
  let container = record;
70119
70554
  for (const segment of path) {
70120
70555
  const next = container[segment];
70121
- if (!isRecord10(next))
70556
+ if (!isRecord11(next))
70122
70557
  return null;
70123
70558
  container = next;
70124
70559
  }
@@ -70229,6 +70664,15 @@ function legacyCategoryDiagnostic(path, renames) {
70229
70664
  issuePaths: renames.map((rename) => rename.path)
70230
70665
  };
70231
70666
  }
70667
+ function legacyHarnessDiagnostic(path, renames) {
70668
+ const detail = renames.map((rename) => rename.dropped ? `${rename.path} ignored because ${rename.canonical} is also configured` : `${rename.path} renamed to ${rename.canonical}`).join(", ");
70669
+ return {
70670
+ kind: "deprecated-keys",
70671
+ message: `Deprecated harness block in ${path}: ${detail}. Rename it; the alias is removed in a future release.`,
70672
+ path,
70673
+ issuePaths: renames.map((rename) => rename.path)
70674
+ };
70675
+ }
70232
70676
  function loadOmoConfig(options = {}) {
70233
70677
  const fileSystem = options.fileSystem ?? DEFAULT_READ_FILE_SYSTEM;
70234
70678
  const cwd = options.cwd ?? process.cwd();
@@ -70251,8 +70695,12 @@ function loadOmoConfig(options = {}) {
70251
70695
  if (canonicalized.renames.length > 0) {
70252
70696
  diagnostics.push(legacyCategoryDiagnostic(candidate.path, canonicalized.renames));
70253
70697
  }
70254
- layers.push({ config: canonicalized.document, source: loaded.source });
70255
- merged = mergeOmoConfigRecords(merged, canonicalized.document);
70698
+ const harnessCanonicalized = canonicalizeLegacyHarnessBlocks(canonicalized.document);
70699
+ if (harnessCanonicalized.renames.length > 0) {
70700
+ diagnostics.push(legacyHarnessDiagnostic(candidate.path, harnessCanonicalized.renames));
70701
+ }
70702
+ layers.push({ config: harnessCanonicalized.document, source: loaded.source });
70703
+ merged = mergeOmoConfigRecords(merged, harnessCanonicalized.document);
70256
70704
  }
70257
70705
  }
70258
70706
  const requestedProfile = resolveOmoProfileName({
@@ -70300,6 +70748,7 @@ var init_loader2 = __esm(() => {
70300
70748
 
70301
70749
  // packages/omo-config-core/src/loader/index.ts
70302
70750
  var init_loader3 = __esm(() => {
70751
+ init_disabled_skills();
70303
70752
  init_loader2();
70304
70753
  init_merge();
70305
70754
  init_paths();
@@ -70475,30 +70924,30 @@ var init_models = __esm(() => {
70475
70924
  // packages/omo-config-core/src/writer/types.ts
70476
70925
  import {
70477
70926
  copyFileSync,
70478
- existsSync as existsSync4,
70927
+ existsSync as existsSync5,
70479
70928
  lstatSync as lstatSync2,
70480
- mkdirSync as mkdirSync5,
70481
- readFileSync as readFileSync4,
70929
+ mkdirSync as mkdirSync6,
70930
+ readFileSync as readFileSync5,
70482
70931
  readdirSync,
70483
70932
  renameSync as renameSync2,
70484
- unlinkSync as unlinkSync2,
70485
- writeFileSync as writeFileSync2
70933
+ unlinkSync as unlinkSync3,
70934
+ writeFileSync as writeFileSync3
70486
70935
  } from "fs";
70487
70936
  var DEFAULT_WRITE_FILE_SYSTEM;
70488
70937
  var init_types4 = __esm(() => {
70489
70938
  DEFAULT_WRITE_FILE_SYSTEM = {
70490
70939
  copyFileSync,
70491
- existsSync: existsSync4,
70940
+ existsSync: existsSync5,
70492
70941
  lstatSync: lstatSync2,
70493
- mkdirSync: mkdirSync5,
70494
- readFileSync: readFileSync4,
70942
+ mkdirSync: mkdirSync6,
70943
+ readFileSync: readFileSync5,
70495
70944
  readdirSync,
70496
70945
  renameSync: renameSync2,
70497
- unlinkSync: unlinkSync2,
70946
+ unlinkSync: unlinkSync3,
70498
70947
  writeFileExclusiveSync: (path, content) => {
70499
- writeFileSync2(path, content, { encoding: "utf-8", flag: "wx" });
70948
+ writeFileSync3(path, content, { encoding: "utf-8", flag: "wx" });
70500
70949
  },
70501
- writeFileSync: writeFileSync2
70950
+ writeFileSync: writeFileSync3
70502
70951
  };
70503
70952
  });
70504
70953
 
@@ -71277,7 +71726,8 @@ var init_hooks = __esm(() => {
71277
71726
  "webfetch-redirect-guard",
71278
71727
  "fsync-skip-warning",
71279
71728
  "plan-format-validator",
71280
- "legacy-plugin-toast"
71729
+ "legacy-plugin-toast",
71730
+ "native-edition-nudge"
71281
71731
  ]);
71282
71732
  });
71283
71733
 
@@ -73515,6 +73965,212 @@ async function registerBtwSideTui(api, solid) {
73515
73965
  });
73516
73966
  log2("[btw-side] TUI controls registered");
73517
73967
  }
73968
+ // packages/omo-opencode/src/cli/native-edition-hint.ts
73969
+ var NATIVE_EDITION_INSTALL_COMMAND = "bun add -g omo-ai@beta";
73970
+ var NATIVE_EDITION_GUIDE_URL = "https://github.com/code-yeongyu/oh-my-openagent/blob/dev/docs/guide/installation.md#omo-native-beta-omo-via-omo-ai";
73971
+
73972
+ // packages/omo-opencode/src/cli/install-native/plan.ts
73973
+ var NATIVE_PACKAGE_SPEC = "omo-ai@beta";
73974
+ var NATIVE_SETUP_COMMAND = "omo setup";
73975
+ var PLANS = {
73976
+ bun: { packageManager: "bun", command: "bun", args: ["add", "-g", NATIVE_PACKAGE_SPEC] },
73977
+ npm: { packageManager: "npm", command: "npm", args: ["i", "-g", NATIVE_PACKAGE_SPEC] }
73978
+ };
73979
+ function resolveNativeInstallPlan(bunAvailable) {
73980
+ return bunAvailable ? PLANS.bun : PLANS.npm;
73981
+ }
73982
+ function formatNativeInstallCommand(plan) {
73983
+ return [plan.command, ...plan.args].join(" ");
73984
+ }
73985
+ // packages/omo-opencode/src/cli/install-native/run-native-install.ts
73986
+ init_bun_which_shim();
73987
+
73988
+ // packages/omo-opencode/src/shared/spawn-with-windows-hide.ts
73989
+ init_bun_spawn_shim();
73990
+ // packages/omo-opencode/src/hooks/native-edition-nudge/types.ts
73991
+ var NUDGE_STATE_VERSION = 1;
73992
+ var NUDGE_INTERVALS_MS = [3, 7, 14].map((days) => days * 24 * 60 * 60 * 1000);
73993
+ var NUDGE_SNOOZE_MS = 7 * 24 * 60 * 60 * 1000;
73994
+ var NUDGE_CORRUPT_RECOVERY_MS = 3 * 24 * 60 * 60 * 1000;
73995
+ // packages/omo-opencode/src/hooks/native-edition-nudge/hook.ts
73996
+ import { join as join8 } from "path";
73997
+ init_logger2();
73998
+
73999
+ // packages/omo-opencode/src/hooks/auto-update-checker/constants.ts
74000
+ import * as path4 from "path";
74001
+ init_data_path();
74002
+ init_opencode_config_dir();
74003
+ init_plugin_identity();
74004
+ var PACKAGE_NAME = PUBLISHED_PACKAGE_NAME;
74005
+ var ACCEPTED_PACKAGE_NAMES2 = ACCEPTED_PACKAGE_NAMES;
74006
+ var NPM_REGISTRY_URL = `https://registry.npmjs.org/-/package/${PACKAGE_NAME}/dist-tags`;
74007
+ var CACHE_ROOT_DIR = getOpenCodeCacheDir();
74008
+ var CACHE_DIR = path4.join(CACHE_ROOT_DIR, "packages");
74009
+ var VERSION_FILE = path4.join(CACHE_ROOT_DIR, "version");
74010
+ function getUserConfigDir() {
74011
+ return getOpenCodeConfigDir({ binary: "opencode" });
74012
+ }
74013
+ var INSTALLED_PACKAGE_JSON = path4.join(CACHE_DIR, "node_modules", PACKAGE_NAME, "package.json");
74014
+ var INSTALLED_PACKAGE_JSON_CANDIDATES = ACCEPTED_PACKAGE_NAMES2.map((name) => path4.join(CACHE_DIR, "node_modules", name, "package.json"));
74015
+
74016
+ // packages/omo-opencode/src/hooks/native-edition-nudge/state.ts
74017
+ import { mkdirSync as mkdirSync4, readFileSync as readFileSync2, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "fs";
74018
+ import { join as join7 } from "path";
74019
+ var NUDGE_STATE_FILE = "native-nudge.json";
74020
+ function isDecision(value) {
74021
+ return value === "none" || value === "snoozed" || value === "never" || value === "migrated";
74022
+ }
74023
+ function isEpoch(value) {
74024
+ return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
74025
+ }
74026
+ function parseNudgeState(raw) {
74027
+ let parsed;
74028
+ try {
74029
+ parsed = JSON.parse(raw);
74030
+ } catch {
74031
+ return "corrupt";
74032
+ }
74033
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
74034
+ return "corrupt";
74035
+ const record = parsed;
74036
+ if (!isDecision(record["decision"]))
74037
+ return "corrupt";
74038
+ if (!isEpoch(record["nextEligibleAt"]))
74039
+ return "corrupt";
74040
+ const autoShows = record["autoShows"];
74041
+ return {
74042
+ schemaVersion: typeof record["schemaVersion"] === "number" ? record["schemaVersion"] : NUDGE_STATE_VERSION,
74043
+ autoShows: typeof autoShows === "number" && Number.isSafeInteger(autoShows) && autoShows >= 0 ? autoShows : 0,
74044
+ lastShownAt: isEpoch(record["lastShownAt"]) ? record["lastShownAt"] : null,
74045
+ nextEligibleAt: record["nextEligibleAt"],
74046
+ decision: record["decision"],
74047
+ decidedAt: isEpoch(record["decidedAt"]) ? record["decidedAt"] : null,
74048
+ writtenBy: typeof record["writtenBy"] === "string" ? record["writtenBy"] : "unknown"
74049
+ };
74050
+ }
74051
+ function createNudgeStateStore(stateDir) {
74052
+ const path = join7(stateDir, NUDGE_STATE_FILE);
74053
+ return {
74054
+ read: () => {
74055
+ let raw;
74056
+ try {
74057
+ raw = readFileSync2(path, "utf8");
74058
+ } catch {
74059
+ return "missing";
74060
+ }
74061
+ return parseNudgeState(raw);
74062
+ },
74063
+ write: (state) => {
74064
+ try {
74065
+ mkdirSync4(stateDir, { recursive: true });
74066
+ writeFileSync2(path, `${JSON.stringify(state, null, 2)}
74067
+ `, { mode: 384 });
74068
+ return true;
74069
+ } catch {
74070
+ return false;
74071
+ }
74072
+ },
74073
+ probeWritable: () => {
74074
+ const probe = join7(stateDir, `.${NUDGE_STATE_FILE}.probe`);
74075
+ try {
74076
+ mkdirSync4(stateDir, { recursive: true });
74077
+ writeFileSync2(probe, "", { mode: 384 });
74078
+ } catch {
74079
+ return false;
74080
+ }
74081
+ try {
74082
+ unlinkSync2(probe);
74083
+ } catch {}
74084
+ return true;
74085
+ }
74086
+ };
74087
+ }
74088
+
74089
+ // packages/omo-opencode/src/hooks/native-edition-nudge/hook.ts
74090
+ var NATIVE_NUDGE_TOAST_MESSAGE = `Same agent, one binary, nothing else to keep updated.
74091
+ Install: ${NATIVE_EDITION_INSTALL_COMMAND}`;
74092
+ function nativeEditionStateDir() {
74093
+ return join8(getUserConfigDir(), "oh-my-openagent");
74094
+ }
74095
+ // packages/omo-opencode/src/features/native-edition-nudge/tui.ts
74096
+ var NATIVE_NUDGE_DIALOG_TITLE = "OmO Native";
74097
+ var NATIVE_NUDGE_OPTIONS = [
74098
+ { value: "install", title: "Install OmO Native" },
74099
+ { value: "guide", title: "Open the guide" },
74100
+ { value: "later", title: "Remind me in a week" },
74101
+ { value: "never", title: "Don't ask again" }
74102
+ ];
74103
+ function baseState(now) {
74104
+ return {
74105
+ schemaVersion: NUDGE_STATE_VERSION,
74106
+ autoShows: 0,
74107
+ lastShownAt: null,
74108
+ nextEligibleAt: now,
74109
+ decision: "none",
74110
+ decidedAt: null,
74111
+ writtenBy: "tui"
74112
+ };
74113
+ }
74114
+ function currentState(store, now) {
74115
+ const read = store.read();
74116
+ return read === "missing" || read === "corrupt" ? baseState(now) : read;
74117
+ }
74118
+ function applyNativeEditionNudgeAction(action, options) {
74119
+ const state = currentState(options.store, options.now);
74120
+ if (action === "install") {
74121
+ const command = formatNativeInstallCommand(resolveNativeInstallPlan(options.bunAvailable));
74122
+ return { toast: `Run: ${command}
74123
+ Then: ${NATIVE_SETUP_COMMAND}` };
74124
+ }
74125
+ if (action === "guide") {
74126
+ options.store.write({ ...state, nextEligibleAt: options.now + NUDGE_SNOOZE_MS, writtenBy: "tui" });
74127
+ return { toast: "Opening the OmO Native guide.", url: NATIVE_EDITION_GUIDE_URL };
74128
+ }
74129
+ if (action === "later") {
74130
+ options.store.write({
74131
+ ...state,
74132
+ nextEligibleAt: options.now + NUDGE_SNOOZE_MS,
74133
+ decision: "snoozed",
74134
+ decidedAt: options.now,
74135
+ writtenBy: "tui"
74136
+ });
74137
+ return { toast: "I'll mention OmO Native again in a week." };
74138
+ }
74139
+ options.store.write({ ...state, decision: "never", decidedAt: options.now, writtenBy: "tui" });
74140
+ return { toast: "I won't bring up OmO Native again. The command palette entry stays available." };
74141
+ }
74142
+ function registerNativeEditionNudgeTui(api, deps = {}) {
74143
+ const store = deps.store ?? createNudgeStateStore(nativeEditionStateDir());
74144
+ const open = () => {
74145
+ api.ui.dialog.replace(() => api.ui.DialogSelect({
74146
+ title: NATIVE_NUDGE_DIALOG_TITLE,
74147
+ placeholder: "The same omo as one command, with no host app",
74148
+ options: NATIVE_NUDGE_OPTIONS.map((option) => ({ title: option.title, value: option.value })),
74149
+ onSelect: (option) => {
74150
+ const result = applyNativeEditionNudgeAction(option.value, {
74151
+ store,
74152
+ now: Date.now(),
74153
+ bunAvailable: true
74154
+ });
74155
+ api.ui.dialog.clear();
74156
+ api.ui.toast?.({ message: result.toast });
74157
+ }
74158
+ }));
74159
+ };
74160
+ return api.command?.register(() => [
74161
+ {
74162
+ title: "OmO Native",
74163
+ value: "omo.native.nudge",
74164
+ description: "Install the standalone OmO Native edition, or stop being reminded about it",
74165
+ category: "Session",
74166
+ enabled: true,
74167
+ slash: { name: "native", aliases: ["omo-native"] },
74168
+ onSelect: open
74169
+ }
74170
+ ]) ?? (() => {
74171
+ return;
74172
+ });
74173
+ }
73518
74174
  // packages/omo-opencode/src/features/tui-sidebar/state-types.ts
73519
74175
  function assertNever(value) {
73520
74176
  throw new Error(`Unexpected variant: ${JSON.stringify(value)}`);
@@ -73682,30 +74338,30 @@ function compareJobs(left, right) {
73682
74338
  }
73683
74339
 
73684
74340
  // packages/omo-opencode/src/features/tui-sidebar/mirror-io.ts
73685
- import { mkdirSync as mkdirSync4, readFileSync as readFileSync2 } from "fs";
74341
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync3 } from "fs";
73686
74342
  init_write_file_atomically();
73687
74343
 
73688
74344
  // packages/omo-opencode/src/features/tui-sidebar/mirror-path.ts
73689
74345
  import { createHash } from "crypto";
73690
- import { realpathSync } from "fs";
73691
- import { homedir as homedir2 } from "os";
73692
- import { join as join5, resolve } from "path";
74346
+ import { realpathSync as realpathSync2 } from "fs";
74347
+ import { homedir as homedir3 } from "os";
74348
+ import { join as join9, resolve as resolve2 } from "path";
73693
74349
  function mirrorStorageDir() {
73694
- return join5(process.env.XDG_DATA_HOME ?? join5(homedir2(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
74350
+ return join9(process.env.XDG_DATA_HOME ?? join9(homedir3(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
73695
74351
  }
73696
74352
  function canonicalProjectDir(projectDir) {
73697
74353
  try {
73698
- return realpathSync.native(projectDir);
74354
+ return realpathSync2.native(projectDir);
73699
74355
  } catch (error) {
73700
74356
  if (error instanceof Error) {
73701
- return resolve(projectDir);
74357
+ return resolve2(projectDir);
73702
74358
  }
73703
74359
  throw error;
73704
74360
  }
73705
74361
  }
73706
74362
  function mirrorFilePath(projectDir) {
73707
74363
  const projectHash = createHash("sha1").update(canonicalProjectDir(projectDir)).digest("hex").slice(0, 16);
73708
- return join5(mirrorStorageDir(), `${projectHash}.json`);
74364
+ return join9(mirrorStorageDir(), `${projectHash}.json`);
73709
74365
  }
73710
74366
 
73711
74367
  // packages/omo-opencode/src/features/tui-sidebar/snapshot-schema.ts
@@ -73765,7 +74421,7 @@ function parseSnapshot(raw) {
73765
74421
  function readMirror(projectDir) {
73766
74422
  let raw;
73767
74423
  try {
73768
- raw = JSON.parse(readFileSync2(mirrorFilePath(projectDir), "utf-8"));
74424
+ raw = JSON.parse(readFileSync3(mirrorFilePath(projectDir), "utf-8"));
73769
74425
  } catch (error) {
73770
74426
  if (error instanceof Error) {
73771
74427
  return null;
@@ -73975,6 +74631,11 @@ var module = {
73975
74631
  } catch (error) {
73976
74632
  log2("[btw-side] TUI registration failed", { error });
73977
74633
  }
74634
+ try {
74635
+ registerNativeEditionNudgeTui(api);
74636
+ } catch (error) {
74637
+ log2("[native-edition-nudge] TUI registration failed", { error });
74638
+ }
73978
74639
  const directory = api.state.path.directory;
73979
74640
  if ((await loadPluginValidation(directory)).config.tui?.sidebar?.enabled === false) {
73980
74641
  return;