oh-my-opencode 5.0.0-beta.89 → 5.0.0-beta.90

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 (220) hide show
  1. package/README.ja.md +1 -1
  2. package/README.ko.md +1 -1
  3. package/README.md +1 -1
  4. package/README.ru.md +1 -1
  5. package/README.zh-cn.md +1 -1
  6. package/dist/agents/sisyphus/grok-4.d.ts +3 -2
  7. package/dist/cli/config-manager/refresh-opencode-plugin-sandbox.d.ts +31 -0
  8. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +11 -0
  9. package/dist/cli/index.js +1661 -859
  10. package/dist/cli/install-native/index.d.ts +9 -1
  11. package/dist/cli/install-native/legacy-omo-bin.d.ts +27 -0
  12. package/dist/cli/install-native/offer-native-setup.d.ts +31 -0
  13. package/dist/cli/install-native/omo-bin-test-fixtures.d.ts +35 -0
  14. package/dist/cli/install-native/plan.d.ts +8 -0
  15. package/dist/cli/install-native/repair-legacy-omo-bin.d.ts +26 -0
  16. package/dist/cli/install-native/run-native-install.d.ts +11 -1
  17. package/dist/cli/install-native/verify-omo-command.d.ts +22 -0
  18. package/dist/cli/native-edition-hint.d.ts +2 -2
  19. package/dist/cli-node/index.js +1661 -859
  20. package/dist/hooks/auto-update-checker/checker/sandbox-refresh.d.ts +51 -0
  21. package/dist/hooks/auto-update-checker/checker/semver-compare.d.ts +17 -0
  22. package/dist/hooks/auto-update-checker/checker.d.ts +3 -0
  23. package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +8 -0
  24. package/dist/hooks/auto-update-checker/hook.d.ts +2 -0
  25. package/dist/hooks/native-edition-nudge/hook.d.ts +1 -1
  26. package/dist/index.js +1433 -1055
  27. package/dist/shared/index.d.ts +1 -0
  28. package/dist/shared/opencode-plugin-sandbox.d.ts +54 -0
  29. package/dist/skills/browser/SKILL.md +8 -1
  30. package/dist/skills/browser/references/install.md +34 -5
  31. package/dist/skills/browser/runtime/omowright/index.js +2 -2
  32. package/dist/skills/browser/runtime/omowright/manifest.json +3 -3
  33. package/dist/skills/browser/scripts/browser-doctor.mjs +14 -3
  34. package/dist/skills/browser/scripts/browser-install.mjs +13 -1
  35. package/dist/skills/ulw-research/AGENTS.md +63 -0
  36. package/dist/skills/ulw-research/SKILL.md +38 -26
  37. package/dist/skills/ulw-research/references/deliverable-phase.md +187 -0
  38. package/dist/skills/ulw-research/references/report-gates.md +66 -0
  39. package/dist/skills/ulw-research/scripts/cli-support.mjs +102 -0
  40. package/dist/skills/ulw-research/scripts/cli-support.test.ts +88 -0
  41. package/dist/skills/ulw-research/scripts/contracts.mjs +162 -0
  42. package/dist/skills/ulw-research/scripts/contracts.test.ts +177 -0
  43. package/dist/skills/ulw-research/scripts/css-lite.mjs +204 -0
  44. package/dist/skills/ulw-research/scripts/css-lite.test.ts +159 -0
  45. package/dist/skills/ulw-research/scripts/design-spec.mjs +161 -0
  46. package/dist/skills/ulw-research/scripts/design-spec.test.ts +162 -0
  47. package/dist/skills/ulw-research/scripts/entities.mjs +39 -0
  48. package/dist/skills/ulw-research/scripts/entry-guard.mjs +21 -0
  49. package/dist/skills/ulw-research/scripts/format-extract-css.mjs +122 -0
  50. package/dist/skills/ulw-research/scripts/format-extract.mjs +229 -0
  51. package/dist/skills/ulw-research/scripts/format-extract.test.ts +243 -0
  52. package/dist/skills/ulw-research/scripts/gates-figures.mjs +173 -0
  53. package/dist/skills/ulw-research/scripts/gates-layout.mjs +146 -0
  54. package/dist/skills/ulw-research/scripts/gates-layout.test.ts +236 -0
  55. package/dist/skills/ulw-research/scripts/gates-static.mjs +167 -0
  56. package/dist/skills/ulw-research/scripts/gates-static.test.ts +265 -0
  57. package/dist/skills/ulw-research/scripts/gates-structure.mjs +118 -0
  58. package/dist/skills/ulw-research/scripts/gates-text.mjs +190 -0
  59. package/dist/skills/ulw-research/scripts/glossary-vocabulary.test.ts +43 -0
  60. package/dist/skills/ulw-research/scripts/html-lite.mjs +239 -0
  61. package/dist/skills/ulw-research/scripts/html-lite.test.ts +191 -0
  62. package/dist/skills/ulw-research/scripts/layout-probe.mjs +83 -0
  63. package/dist/skills/ulw-research/scripts/layout-probe.test.ts +89 -0
  64. package/dist/skills/ulw-research/scripts/outcome.mjs +250 -0
  65. package/dist/skills/ulw-research/scripts/outcome.test.ts +281 -0
  66. package/dist/skills/ulw-research/scripts/repair-tracker.mjs +171 -0
  67. package/dist/skills/ulw-research/scripts/repair-tracker.test.ts +246 -0
  68. package/dist/skills/ulw-research/scripts/report-tools-commands.mjs +214 -0
  69. package/dist/skills/ulw-research/scripts/report-tools.mjs +61 -0
  70. package/dist/skills/ulw-research/scripts/report-tools.test.ts +213 -0
  71. package/dist/skills/ulw-research/scripts/tests/fixtures/assets/figure-1.svg +1 -0
  72. package/dist/skills/ulw-research/scripts/tests/fixtures/bad-report.html +44 -0
  73. package/dist/skills/ulw-research/scripts/tests/fixtures/boxes.json +90 -0
  74. package/dist/skills/ulw-research/scripts/tests/fixtures/design-spec.md +29 -0
  75. package/dist/skills/ulw-research/scripts/tests/fixtures/good-report.html +57 -0
  76. package/dist/skills/ulw-research/scripts/tests/fixtures/reference-report.html +86 -0
  77. package/dist/skills/ulw-research/scripts/tests/fixtures/reference.md +23 -0
  78. package/dist/skills/visual-qa/references/browser-setup.md +3 -1
  79. package/dist/tui.js +534 -66
  80. package/package.json +15 -15
  81. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  82. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  83. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  84. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  85. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  86. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  87. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  88. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  89. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  90. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  91. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  92. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  93. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +5 -1
  94. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-6.md +5 -1
  95. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  96. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  97. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  98. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  99. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  100. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  101. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +7 -3
  102. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  103. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  104. package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +1 -1
  105. package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +1 -1
  106. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  107. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  108. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +7 -3
  109. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  110. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  111. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  112. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  113. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  114. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  115. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  116. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  117. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  118. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  119. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  120. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  121. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  122. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  123. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  124. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  125. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  126. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  127. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  128. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  129. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  130. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  131. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  132. package/packages/omo-codex/plugin/package-lock.json +12 -12
  133. package/packages/omo-codex/plugin/package.json +1 -1
  134. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +2 -2
  135. package/packages/omo-codex/plugin/skills/browser/SKILL.md +8 -1
  136. package/packages/omo-codex/plugin/skills/browser/references/install.md +34 -5
  137. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +2 -2
  138. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +3 -3
  139. package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +14 -3
  140. package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +13 -1
  141. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +7 -3
  142. package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +63 -0
  143. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +37 -25
  144. package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +187 -0
  145. package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +66 -0
  146. package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +102 -0
  147. package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +162 -0
  148. package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-lite.mjs +204 -0
  149. package/packages/omo-codex/plugin/skills/ulw-research/scripts/design-spec.mjs +161 -0
  150. package/packages/omo-codex/plugin/skills/ulw-research/scripts/entities.mjs +39 -0
  151. package/packages/omo-codex/plugin/skills/ulw-research/scripts/entry-guard.mjs +21 -0
  152. package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract-css.mjs +122 -0
  153. package/packages/omo-codex/plugin/skills/ulw-research/scripts/format-extract.mjs +229 -0
  154. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-figures.mjs +173 -0
  155. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-layout.mjs +146 -0
  156. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +167 -0
  157. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +118 -0
  158. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +190 -0
  159. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +239 -0
  160. package/packages/omo-codex/plugin/skills/ulw-research/scripts/layout-probe.mjs +83 -0
  161. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +250 -0
  162. package/packages/omo-codex/plugin/skills/ulw-research/scripts/repair-tracker.mjs +171 -0
  163. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +214 -0
  164. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +61 -0
  165. package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +3 -1
  166. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +11 -0
  167. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -2
  168. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +20 -0
  169. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  170. package/packages/prompts-core/prompts/ultrawork/codex.md +7 -3
  171. package/packages/shared-skills/skills/browser/SKILL.md +8 -1
  172. package/packages/shared-skills/skills/browser/references/install.md +34 -5
  173. package/packages/shared-skills/skills/browser/runtime/omowright/index.js +2 -2
  174. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +3 -3
  175. package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +14 -3
  176. package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +13 -1
  177. package/packages/shared-skills/skills/ulw-research/AGENTS.md +63 -0
  178. package/packages/shared-skills/skills/ulw-research/SKILL.md +38 -26
  179. package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +187 -0
  180. package/packages/shared-skills/skills/ulw-research/references/report-gates.md +66 -0
  181. package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +102 -0
  182. package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +88 -0
  183. package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +162 -0
  184. package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +177 -0
  185. package/packages/shared-skills/skills/ulw-research/scripts/css-lite.mjs +204 -0
  186. package/packages/shared-skills/skills/ulw-research/scripts/css-lite.test.ts +159 -0
  187. package/packages/shared-skills/skills/ulw-research/scripts/design-spec.mjs +161 -0
  188. package/packages/shared-skills/skills/ulw-research/scripts/design-spec.test.ts +162 -0
  189. package/packages/shared-skills/skills/ulw-research/scripts/entities.mjs +39 -0
  190. package/packages/shared-skills/skills/ulw-research/scripts/entry-guard.mjs +21 -0
  191. package/packages/shared-skills/skills/ulw-research/scripts/format-extract-css.mjs +122 -0
  192. package/packages/shared-skills/skills/ulw-research/scripts/format-extract.mjs +229 -0
  193. package/packages/shared-skills/skills/ulw-research/scripts/format-extract.test.ts +243 -0
  194. package/packages/shared-skills/skills/ulw-research/scripts/gates-figures.mjs +173 -0
  195. package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.mjs +146 -0
  196. package/packages/shared-skills/skills/ulw-research/scripts/gates-layout.test.ts +236 -0
  197. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +167 -0
  198. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.test.ts +265 -0
  199. package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +118 -0
  200. package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +190 -0
  201. package/packages/shared-skills/skills/ulw-research/scripts/glossary-vocabulary.test.ts +43 -0
  202. package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +239 -0
  203. package/packages/shared-skills/skills/ulw-research/scripts/html-lite.test.ts +191 -0
  204. package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.mjs +83 -0
  205. package/packages/shared-skills/skills/ulw-research/scripts/layout-probe.test.ts +89 -0
  206. package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +250 -0
  207. package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +281 -0
  208. package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.mjs +171 -0
  209. package/packages/shared-skills/skills/ulw-research/scripts/repair-tracker.test.ts +246 -0
  210. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +214 -0
  211. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +61 -0
  212. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +213 -0
  213. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/assets/figure-1.svg +1 -0
  214. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/bad-report.html +44 -0
  215. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/boxes.json +90 -0
  216. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/design-spec.md +29 -0
  217. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/good-report.html +57 -0
  218. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/reference-report.html +86 -0
  219. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/reference.md +23 -0
  220. package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +3 -1
package/dist/tui.js CHANGED
@@ -5418,6 +5418,94 @@ function getOpenCodeConfigDir(options) {
5418
5418
  var TAURI_APP_IDENTIFIER = "ai.opencode.desktop", TAURI_APP_IDENTIFIER_DEV = "ai.opencode.desktop.dev";
5419
5419
  var init_opencode_config_dir = () => {};
5420
5420
 
5421
+ // packages/omo-opencode/src/shared/opencode-plugin-sandbox.ts
5422
+ import { existsSync as existsSync3, mkdirSync as mkdirSync3, readdirSync, readFileSync, realpathSync as realpathSync2, renameSync as renameSync2, rmSync, writeFileSync } from "fs";
5423
+ import { basename, dirname, join as join4, resolve as resolve2 } from "path";
5424
+ function getPluginSandboxRoot(cacheDir) {
5425
+ return join4(cacheDir, SANDBOX_PARENT_DIR);
5426
+ }
5427
+ function toPluginSandboxSpec(entry) {
5428
+ const name = ACCEPTED_PACKAGE_NAMES.find((candidate) => entry === candidate || entry.startsWith(`${candidate}@`));
5429
+ if (!name)
5430
+ return null;
5431
+ return entry === name ? `${name}@latest` : entry;
5432
+ }
5433
+ function canonicalize(path) {
5434
+ try {
5435
+ return realpathSync2(path);
5436
+ } catch {
5437
+ return resolve2(path);
5438
+ }
5439
+ }
5440
+ function isPluginSandboxDir(dir, cacheDir) {
5441
+ if (toPluginSandboxSpec(basename(dir)) === null)
5442
+ return false;
5443
+ return canonicalize(dirname(dir)) === canonicalize(getPluginSandboxRoot(cacheDir));
5444
+ }
5445
+ function removePluginSandbox(dir, cacheDir) {
5446
+ if (!isPluginSandboxDir(dir, cacheDir))
5447
+ return false;
5448
+ if (!existsSync3(dir))
5449
+ return false;
5450
+ const discarded = join4(dirname(dir), `.${basename(dir)}.discarded-${process.pid}-${Date.now()}`);
5451
+ renameSync2(dir, discarded);
5452
+ try {
5453
+ rmSync(discarded, { recursive: true, force: true });
5454
+ } catch (error) {
5455
+ if (!(error instanceof Error))
5456
+ throw error;
5457
+ log2(`[plugin-sandbox] Refreshed ${dir}, but could not delete the discarded copy ${discarded}: ${error.message}`);
5458
+ }
5459
+ return true;
5460
+ }
5461
+ function markPluginSandboxStale(dir, cacheDir, reason = "", pid = process.pid) {
5462
+ if (!isPluginSandboxDir(dir, cacheDir))
5463
+ return false;
5464
+ if (!existsSync3(dir))
5465
+ return false;
5466
+ writeFileSync(join4(dir, REFRESH_MARKER_FILE), `${pid}
5467
+ ${reason}`);
5468
+ return true;
5469
+ }
5470
+ function isPluginSandboxMarkedStale(dir) {
5471
+ return existsSync3(join4(dir, REFRESH_MARKER_FILE));
5472
+ }
5473
+ function acquirePluginSandboxLease(dir, pid = process.pid) {
5474
+ const leaseDir = join4(dir, LEASE_DIR);
5475
+ mkdirSync3(leaseDir, { recursive: true });
5476
+ writeFileSync(join4(leaseDir, String(pid)), "");
5477
+ }
5478
+ function releasePluginSandboxLease(dir, pid = process.pid) {
5479
+ rmSync(join4(dir, LEASE_DIR, String(pid)), { force: true });
5480
+ }
5481
+ function isProcessAlive(pid) {
5482
+ try {
5483
+ process.kill(pid, 0);
5484
+ return true;
5485
+ } catch (error) {
5486
+ return error.code === "EPERM";
5487
+ }
5488
+ }
5489
+ function hasOtherLivePluginSandboxLease(dir, pid = process.pid) {
5490
+ const leaseDir = join4(dir, LEASE_DIR);
5491
+ if (!existsSync3(leaseDir))
5492
+ return false;
5493
+ for (const entry of readdirSync(leaseDir)) {
5494
+ const holder = Number(entry);
5495
+ if (!Number.isInteger(holder) || holder <= 0 || holder === pid)
5496
+ continue;
5497
+ if (isProcessAlive(holder))
5498
+ return true;
5499
+ rmSync(join4(leaseDir, entry), { force: true });
5500
+ }
5501
+ return false;
5502
+ }
5503
+ var SANDBOX_PARENT_DIR = "packages", REFRESH_MARKER_FILE = ".omo-refresh-pending", LEASE_DIR = ".omo-leases";
5504
+ var init_opencode_plugin_sandbox = __esm(() => {
5505
+ init_logger2();
5506
+ init_plugin_identity();
5507
+ });
5508
+
5421
5509
  // packages/omo-opencode/src/shared/resolve-agent-definition-paths.ts
5422
5510
  var init_resolve_agent_definition_paths = __esm(() => {
5423
5511
  init_contains_path2();
@@ -5517,8 +5605,8 @@ var init_write_file_atomically = __esm(() => {
5517
5605
  });
5518
5606
 
5519
5607
  // packages/omo-opencode/src/shared/json-file-cache-store.ts
5520
- import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync, writeFileSync } from "fs";
5521
- import { join as join4 } from "path";
5608
+ import { existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
5609
+ import { join as join5 } from "path";
5522
5610
  function toLogLabel(cacheLabel) {
5523
5611
  return cacheLabel.toLowerCase();
5524
5612
  }
@@ -5526,12 +5614,12 @@ function createJsonFileCacheStore(options) {
5526
5614
  let memoryValue;
5527
5615
  let writtenInCurrentProcess = false;
5528
5616
  function getCacheFilePath() {
5529
- return join4(options.getCacheDir(), options.filename);
5617
+ return join5(options.getCacheDir(), options.filename);
5530
5618
  }
5531
5619
  function ensureCacheDir() {
5532
5620
  const cacheDir = options.getCacheDir();
5533
- if (!existsSync3(cacheDir)) {
5534
- mkdirSync3(cacheDir, { recursive: true });
5621
+ if (!existsSync4(cacheDir)) {
5622
+ mkdirSync4(cacheDir, { recursive: true });
5535
5623
  }
5536
5624
  }
5537
5625
  function read() {
@@ -5539,13 +5627,13 @@ function createJsonFileCacheStore(options) {
5539
5627
  return memoryValue;
5540
5628
  }
5541
5629
  const cacheFile = getCacheFilePath();
5542
- if (!existsSync3(cacheFile)) {
5630
+ if (!existsSync4(cacheFile)) {
5543
5631
  memoryValue = null;
5544
5632
  log2(`[${options.logPrefix}] ${options.cacheLabel} file not found`, { cacheFile });
5545
5633
  return null;
5546
5634
  }
5547
5635
  try {
5548
- const content = readFileSync(cacheFile, "utf-8");
5636
+ const content = readFileSync2(cacheFile, "utf-8");
5549
5637
  const value = JSON.parse(content);
5550
5638
  memoryValue = value;
5551
5639
  log2(`[${options.logPrefix}] Read ${toLogLabel(options.cacheLabel)}`, options.describe(value));
@@ -5565,13 +5653,13 @@ function createJsonFileCacheStore(options) {
5565
5653
  if (writtenInCurrentProcess) {
5566
5654
  return true;
5567
5655
  }
5568
- return existsSync3(getCacheFilePath());
5656
+ return existsSync4(getCacheFilePath());
5569
5657
  }
5570
5658
  function write(value) {
5571
5659
  ensureCacheDir();
5572
5660
  const cacheFile = getCacheFilePath();
5573
5661
  try {
5574
- writeFileSync(cacheFile, options.serialize?.(value) ?? JSON.stringify(value, null, 2));
5662
+ writeFileSync2(cacheFile, options.serialize?.(value) ?? JSON.stringify(value, null, 2));
5575
5663
  memoryValue = value;
5576
5664
  writtenInCurrentProcess = true;
5577
5665
  log2(`[${options.logPrefix}] ${options.cacheLabel} written`, options.describe(value));
@@ -60344,14 +60432,14 @@ var init_fallback_model_availability = __esm(() => {
60344
60432
  });
60345
60433
 
60346
60434
  // packages/omo-opencode/src/shared/opencode-storage-paths.ts
60347
- import { join as join5 } from "path";
60435
+ import { join as join6 } from "path";
60348
60436
  var OPENCODE_STORAGE, MESSAGE_STORAGE, PART_STORAGE, SESSION_STORAGE;
60349
60437
  var init_opencode_storage_paths = __esm(() => {
60350
60438
  init_data_path();
60351
60439
  OPENCODE_STORAGE = getOpenCodeStorageDir();
60352
- MESSAGE_STORAGE = join5(OPENCODE_STORAGE, "message");
60353
- PART_STORAGE = join5(OPENCODE_STORAGE, "part");
60354
- SESSION_STORAGE = join5(OPENCODE_STORAGE, "session");
60440
+ MESSAGE_STORAGE = join6(OPENCODE_STORAGE, "message");
60441
+ PART_STORAGE = join6(OPENCODE_STORAGE, "part");
60442
+ SESSION_STORAGE = join6(OPENCODE_STORAGE, "session");
60355
60443
  });
60356
60444
 
60357
60445
  // packages/omo-opencode/src/shared/compaction-marker.ts
@@ -63319,6 +63407,7 @@ var init_shared = __esm(() => {
63319
63407
  init_jsonc_parser2();
63320
63408
  init_migration2();
63321
63409
  init_opencode_config_dir();
63410
+ init_opencode_plugin_sandbox();
63322
63411
  init_resolve_agent_definition_paths();
63323
63412
  init_opencode_version();
63324
63413
  init_opencode_storage_detection();
@@ -70424,33 +70513,33 @@ function toPosixPath(path) {
70424
70513
  var init_posix_path = () => {};
70425
70514
 
70426
70515
  // packages/omo-config-core/src/loader/types.ts
70427
- import { existsSync as existsSync4, lstatSync, readFileSync as readFileSync4, realpathSync as realpathSync3 } from "fs";
70516
+ import { existsSync as existsSync6, lstatSync, readFileSync as readFileSync6, realpathSync as realpathSync4 } from "fs";
70428
70517
  var DEFAULT_READ_FILE_SYSTEM;
70429
70518
  var init_types3 = __esm(() => {
70430
70519
  DEFAULT_READ_FILE_SYSTEM = {
70431
- existsSync: existsSync4,
70520
+ existsSync: existsSync6,
70432
70521
  lstatSync,
70433
- readFileSync: readFileSync4,
70434
- realpathSync: realpathSync3
70522
+ readFileSync: readFileSync6,
70523
+ realpathSync: realpathSync4
70435
70524
  };
70436
70525
  });
70437
70526
 
70438
70527
  // packages/omo-config-core/src/loader/paths.ts
70439
70528
  import { userInfo } from "os";
70440
- import { dirname, join as join10, posix as posix2, resolve as resolve3 } from "path";
70529
+ import { dirname as dirname4, join as join12, posix as posix2, resolve as resolve4 } from "path";
70441
70530
  function resolveHomeDir(env = process.env) {
70442
70531
  const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
70443
- return homeDir.startsWith("/") ? posix2.resolve(homeDir) : toPosixPath(resolve3(homeDir));
70532
+ return homeDir.startsWith("/") ? posix2.resolve(homeDir) : toPosixPath(resolve4(homeDir));
70444
70533
  }
70445
70534
  function resolveUserOmoConfigDirectory(env = process.env) {
70446
- return join10(resolveHomeDir(env), ".omo");
70535
+ return join12(resolveHomeDir(env), ".omo");
70447
70536
  }
70448
70537
  function detectUserOmoJsonPath(env, fileSystem) {
70449
70538
  const configDir = resolveUserOmoConfigDirectory(env);
70450
- const jsoncPath = join10(configDir, "omo.jsonc");
70539
+ const jsoncPath = join12(configDir, "omo.jsonc");
70451
70540
  if (fileSystem.existsSync(jsoncPath))
70452
70541
  return jsoncPath;
70453
- const jsonPath = join10(configDir, "omo.json");
70542
+ const jsonPath = join12(configDir, "omo.json");
70454
70543
  return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
70455
70544
  }
70456
70545
  function isSymlinkedProjectPath(path, fileSystem) {
@@ -70468,13 +70557,13 @@ function isLoadableProjectConfigFile(path, fileSystem) {
70468
70557
  return fileSystem.existsSync(path) && !isSymlinkedProjectPath(path, fileSystem);
70469
70558
  }
70470
70559
  function detectOmoJsonPath(dir, fileSystem) {
70471
- const omoDir = join10(dir, ".omo");
70560
+ const omoDir = join12(dir, ".omo");
70472
70561
  if (isSymlinkedProjectPath(omoDir, fileSystem))
70473
70562
  return null;
70474
- const jsoncPath = join10(omoDir, "omo.jsonc");
70563
+ const jsoncPath = join12(omoDir, "omo.jsonc");
70475
70564
  if (isLoadableProjectConfigFile(jsoncPath, fileSystem))
70476
70565
  return jsoncPath;
70477
- const jsonPath = join10(omoDir, "omo.json");
70566
+ const jsonPath = join12(omoDir, "omo.json");
70478
70567
  return isLoadableProjectConfigFile(jsonPath, fileSystem) ? jsonPath : null;
70479
70568
  }
70480
70569
  function realpathOrSelf(path, fileSystem) {
@@ -70487,8 +70576,8 @@ function realpathOrSelf(path, fileSystem) {
70487
70576
  }
70488
70577
  }
70489
70578
  function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHomeDir = homeDir) {
70490
- const startDir = resolve3(cwd);
70491
- const boundaryDirs = [...new Set([resolve3(homeDir), resolve3(accountHomeDir)])];
70579
+ const startDir = resolve4(cwd);
70580
+ const boundaryDirs = [...new Set([resolve4(homeDir), resolve4(accountHomeDir)])];
70492
70581
  const realBoundaryDirs = new Set(boundaryDirs.map((path) => realpathOrSelf(path, fileSystem)));
70493
70582
  const nearestFirst = [];
70494
70583
  let currentDir = startDir;
@@ -70499,7 +70588,7 @@ function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHo
70499
70588
  nearestFirst.push(configPath);
70500
70589
  if (isHomeDir)
70501
70590
  break;
70502
- const parentDir = dirname(currentDir);
70591
+ const parentDir = dirname4(currentDir);
70503
70592
  if (parentDir === currentDir)
70504
70593
  break;
70505
70594
  currentDir = parentDir;
@@ -71020,30 +71109,30 @@ var init_models = __esm(() => {
71020
71109
  // packages/omo-config-core/src/writer/types.ts
71021
71110
  import {
71022
71111
  copyFileSync,
71023
- existsSync as existsSync5,
71112
+ existsSync as existsSync7,
71024
71113
  lstatSync as lstatSync2,
71025
- mkdirSync as mkdirSync6,
71026
- readFileSync as readFileSync5,
71027
- readdirSync,
71028
- renameSync as renameSync2,
71114
+ mkdirSync as mkdirSync7,
71115
+ readFileSync as readFileSync7,
71116
+ readdirSync as readdirSync2,
71117
+ renameSync as renameSync3,
71029
71118
  unlinkSync as unlinkSync3,
71030
- writeFileSync as writeFileSync3
71119
+ writeFileSync as writeFileSync4
71031
71120
  } from "fs";
71032
71121
  var DEFAULT_WRITE_FILE_SYSTEM;
71033
71122
  var init_types4 = __esm(() => {
71034
71123
  DEFAULT_WRITE_FILE_SYSTEM = {
71035
71124
  copyFileSync,
71036
- existsSync: existsSync5,
71125
+ existsSync: existsSync7,
71037
71126
  lstatSync: lstatSync2,
71038
- mkdirSync: mkdirSync6,
71039
- readFileSync: readFileSync5,
71040
- readdirSync,
71041
- renameSync: renameSync2,
71127
+ mkdirSync: mkdirSync7,
71128
+ readFileSync: readFileSync7,
71129
+ readdirSync: readdirSync2,
71130
+ renameSync: renameSync3,
71042
71131
  unlinkSync: unlinkSync3,
71043
71132
  writeFileExclusiveSync: (path, content) => {
71044
- writeFileSync3(path, content, { encoding: "utf-8", flag: "wx" });
71133
+ writeFileSync4(path, content, { encoding: "utf-8", flag: "wx" });
71045
71134
  },
71046
- writeFileSync: writeFileSync3
71135
+ writeFileSync: writeFileSync4
71047
71136
  };
71048
71137
  });
71049
71138
 
@@ -74061,9 +74150,274 @@ async function registerBtwSideTui(api, solid) {
74061
74150
  });
74062
74151
  log2("[btw-side] TUI controls registered");
74063
74152
  }
74064
- // packages/omo-opencode/src/cli/native-edition-hint.ts
74065
- var NATIVE_EDITION_INSTALL_COMMAND = "bun add -g omo-ai@beta";
74066
- 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";
74153
+ // packages/omo-opencode/src/cli/install-native/plan.ts
74154
+ init_shared();
74155
+ // package.json
74156
+ var package_default = {
74157
+ name: "oh-my-opencode",
74158
+ version: "5.0.0-beta.90",
74159
+ description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
74160
+ main: "./dist/index.js",
74161
+ types: "dist/index.d.ts",
74162
+ type: "module",
74163
+ workspaces: [
74164
+ "packages/rules-engine",
74165
+ "packages/delegate-core",
74166
+ "packages/ast-grep-mcp",
74167
+ "packages/git-bash-mcp",
74168
+ "packages/mcp-stdio-core",
74169
+ "packages/mcp-client-core",
74170
+ "packages/lsp-core",
74171
+ "packages/utils",
74172
+ "packages/model-core",
74173
+ "packages/omo-config-core",
74174
+ "packages/prompts-core",
74175
+ "packages/comment-checker-core",
74176
+ "packages/hashline-core",
74177
+ "packages/tmux-core",
74178
+ "packages/team-core",
74179
+ "packages/openclaw-core",
74180
+ "packages/boulder-state",
74181
+ "packages/memory-core",
74182
+ "packages/isolation-core",
74183
+ "packages/telemetry-core",
74184
+ "packages/claude-code-compat-core",
74185
+ "packages/skills-loader-core",
74186
+ "packages/agents-md-core",
74187
+ "packages/shared-skills",
74188
+ "packages/omo-codex",
74189
+ "packages/omo-senpi",
74190
+ "packages/senpi-task",
74191
+ "packages/omo-opencode",
74192
+ "packages/omo-native"
74193
+ ],
74194
+ bin: {
74195
+ "oh-my-opencode": "bin/oh-my-opencode.js",
74196
+ "oh-my-openagent": "bin/oh-my-opencode.js",
74197
+ "omo-agent-toolkit": "bin/oh-my-opencode.js",
74198
+ lazycodex: "bin/oh-my-opencode.js",
74199
+ "lazycodex-ai": "bin/oh-my-opencode.js"
74200
+ },
74201
+ files: [
74202
+ "THIRD-PARTY-NOTICES.md",
74203
+ "dist",
74204
+ "bin",
74205
+ "postinstall.mjs",
74206
+ "script/qa/strip-ansi.mjs",
74207
+ "script/qa/web-terminal-redaction.d.mts",
74208
+ "script/qa/web-terminal-redaction.mjs",
74209
+ "script/qa/web-terminal-visual-qa.mjs",
74210
+ "script/qa/xterm-live-terminal.mjs",
74211
+ "docs/reference/github-attachment-upload.md",
74212
+ "docs/reference/web-terminal-visual-qa.md",
74213
+ ".opencode/command",
74214
+ ".opencode/skills",
74215
+ ".agents/command",
74216
+ ".agents/skills",
74217
+ "packages/lsp-tools-mcp/package.json",
74218
+ "packages/lsp-core/package.json",
74219
+ "packages/lsp-core/src",
74220
+ "packages/lsp-tools-mcp/dist",
74221
+ "packages/lsp-daemon/package.json",
74222
+ "packages/lsp-daemon/dist",
74223
+ "packages/git-bash-mcp/package.json",
74224
+ "packages/git-bash-mcp/dist",
74225
+ "packages/shared-skills/package.json",
74226
+ "packages/shared-skills/index.mjs",
74227
+ "packages/shared-skills/skill-source-filter.d.ts",
74228
+ "packages/shared-skills/skill-source-filter.mjs",
74229
+ "packages/shared-skills/skills",
74230
+ "packages/omo-codex/THIRD-PARTY-NOTICES.md",
74231
+ "packages/omo-codex/marketplace.json",
74232
+ "packages/omo-codex/lazycodex-repository",
74233
+ "packages/omo-codex/plugin",
74234
+ "packages/omo-codex/plugin/components/bootstrap/dist/cli.js",
74235
+ "packages/omo-codex/plugin/components/bootstrap/scripts/bootstrap.ps1",
74236
+ "packages/omo-codex/plugin/components/bootstrap/scripts/node-dispatch.ps1",
74237
+ "packages/omo-codex/plugin/components/comment-checker/dist/cli.js",
74238
+ "packages/omo-codex/plugin/components/git-bash/dist/cli.js",
74239
+ "packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js",
74240
+ "packages/omo-codex/plugin/components/lsp/dist/cli.js",
74241
+ "packages/omo-codex/plugin/components/rules/dist/cli.js",
74242
+ "packages/omo-codex/plugin/components/ulw-execute-continuation/dist/cli.js",
74243
+ "packages/omo-codex/plugin/components/teammode/dist/cli.js",
74244
+ "packages/omo-codex/plugin/components/telemetry/dist/cli.js",
74245
+ "packages/omo-codex/plugin/components/ultrawork/dist/cli.js",
74246
+ "packages/omo-codex/plugin/components/ulw-loop/dist/cli.js",
74247
+ "packages/prompts-core/prompts/ultrawork/codex.md",
74248
+ "packages/omo-codex/plugin/.codex-plugin",
74249
+ "!packages/omo-codex/plugin/node_modules",
74250
+ "!packages/omo-codex/plugin/**/node_modules",
74251
+ "!packages/omo-codex/plugin/components/workflow-selector",
74252
+ "packages/omo-codex/scripts",
74253
+ "!packages/omo-codex/scripts/install"
74254
+ ],
74255
+ exports: {
74256
+ ".": {
74257
+ types: "./dist/index.d.ts",
74258
+ import: "./dist/index.js"
74259
+ },
74260
+ "./server": "./dist/index.js",
74261
+ "./tui": "./dist/tui.js",
74262
+ "./schema.json": "./dist/oh-my-opencode.schema.json"
74263
+ },
74264
+ scripts: {
74265
+ build: "bun run script/build.ts",
74266
+ "build:cli-node": "bun run script/build-cli-node.ts",
74267
+ "build:codex-install": "bun run script/build-codex-install.ts",
74268
+ "install:codex-dev": "bun run script/build-codex-install.ts && bun run script/install-codex-dev.ts",
74269
+ "build:codex-plugin": "npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build",
74270
+ "build:senpi-plugin": "bun run build:lsp-daemon && bun run build:ast-grep-mcp && bun run build:senpi-plugin:stage",
74271
+ "build:senpi-plugin:native": "node packages/omo-senpi/plugin/scripts/stage-lsp-daemon-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-ast-grep-mcp-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-x-search-skill.mjs && node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/build-daemon-launch-spec.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && node packages/omo-senpi/plugin/scripts/build-install.mjs",
74272
+ "build:senpi-plugin:stage": "bun run build:materialize-frontend && node packages/omo-senpi/plugin/scripts/stage-lsp-daemon-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-ast-grep-mcp-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-x-search-skill.mjs && node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/build-daemon-launch-spec.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && node packages/omo-senpi/plugin/scripts/build-install.mjs",
74273
+ "build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
74274
+ "build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
74275
+ "build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
74276
+ "build:lsp-daemon": "npm --prefix packages/lsp-daemon ci && npm --prefix packages/lsp-daemon run build",
74277
+ "build:node-require-shim": "bun run script/patch-node-require-shim.ts",
74278
+ "build:all": "bun run build && bun run build:binaries",
74279
+ "build:binaries": "bun run script/build-binaries.ts",
74280
+ "build:schema": "bun run script/build-schema.ts",
74281
+ "build:omo-native": "bun run script/build-omo-native.ts",
74282
+ omob: "bun run script/build-omob.ts",
74283
+ "build:omo-schema": "bun run script/build-omo-schema.ts",
74284
+ "build:model-capabilities": "bun run script/build-model-capabilities.ts",
74285
+ clean: "rm -rf dist",
74286
+ prepack: "bun run build:materialize-frontend",
74287
+ prepare: "bun run build",
74288
+ postinstall: "node postinstall.mjs",
74289
+ prepublishOnly: "bun run clean && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build",
74290
+ "test:model-capabilities": "bun test --timeout 20000 packages/model-core/src/model-capability-aliases.test.ts packages/model-core/src/model-capability-guardrails.test.ts packages/model-core/src/model-capabilities.test.ts packages/omo-opencode/src/cli/doctor/checks/model-resolution.test.ts --bail",
74291
+ typecheck: "tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
74292
+ "typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/isolation-core/tsconfig.json && tsgo --noEmit -p packages/memory-core/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json && tsgo --noEmit -p packages/omo-native/tsconfig.json",
74293
+ "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
74294
+ test: "bun test --timeout 20000",
74295
+ "changelog:section": "bun script/changelog-section.ts",
74296
+ "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && npm --prefix packages/omo-codex/plugin/components/ulw-loop test && bun run --cwd packages/omo-codex/plugin build && node scripts/check-third-party-notices.mjs --ship && bun test --timeout 20000 packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
74297
+ "test:fast": "bun run script/test-fast.ts",
74298
+ "test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test --timeout 20000 packages/omo-senpi && bun test ./.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs",
74299
+ "test:windows-codex": "bun run test:codex",
74300
+ "build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
74301
+ "build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build"
74302
+ },
74303
+ keywords: [
74304
+ "opencode",
74305
+ "plugin",
74306
+ "oracle",
74307
+ "librarian",
74308
+ "agents",
74309
+ "ai",
74310
+ "llm"
74311
+ ],
74312
+ author: "YeonGyu-Kim",
74313
+ license: "SUL-1.0",
74314
+ repository: {
74315
+ type: "git",
74316
+ url: "git+https://github.com/code-yeongyu/oh-my-openagent.git"
74317
+ },
74318
+ bugs: {
74319
+ url: "https://github.com/code-yeongyu/oh-my-openagent/issues"
74320
+ },
74321
+ homepage: "https://github.com/code-yeongyu/oh-my-openagent#readme",
74322
+ dependencies: {
74323
+ "@clack/prompts": "^1.8.1",
74324
+ "@modelcontextprotocol/sdk": "^1.30.0",
74325
+ "@opencode-ai/plugin": "1.18.31",
74326
+ "@opencode-ai/sdk": "1.18.31",
74327
+ "@opentui/core": "^0.5.11",
74328
+ "@opentui/keymap": "^0.5.11",
74329
+ "@opentui/solid": "^0.5.11",
74330
+ commander: "^15.0.0",
74331
+ "detect-libc": "^2.1.2",
74332
+ diff: "^9.0.0",
74333
+ "js-yaml": "^5.4.2",
74334
+ "jsonc-parser": "^3.3.1",
74335
+ picocolors: "^1.1.1",
74336
+ picomatch: "^4.0.7",
74337
+ "posthog-node": "^5.52.4",
74338
+ zod: "^4.6.5"
74339
+ },
74340
+ devDependencies: {
74341
+ "@code-yeongyu/senpi": "2026.9.24-3",
74342
+ "@oh-my-opencode/agents-md-core": "workspace:*",
74343
+ "@oh-my-opencode/ast-grep-mcp": "workspace:*",
74344
+ "@oh-my-opencode/boulder-state": "workspace:*",
74345
+ "@oh-my-opencode/claude-code-compat-core": "workspace:*",
74346
+ "@oh-my-opencode/comment-checker-core": "workspace:*",
74347
+ "@oh-my-opencode/delegate-core": "workspace:*",
74348
+ "@oh-my-opencode/git-bash-mcp": "workspace:*",
74349
+ "@oh-my-opencode/hashline-core": "workspace:*",
74350
+ "@oh-my-opencode/lsp-core": "workspace:*",
74351
+ "@oh-my-opencode/isolation-core": "workspace:*",
74352
+ "@oh-my-opencode/memory-core": "workspace:*",
74353
+ "@oh-my-opencode/mcp-client-core": "workspace:*",
74354
+ "@oh-my-opencode/mcp-stdio-core": "workspace:*",
74355
+ "@oh-my-opencode/model-core": "workspace:*",
74356
+ "@oh-my-opencode/omo-codex": "workspace:*",
74357
+ "@oh-my-opencode/omo-config-core": "workspace:*",
74358
+ "@oh-my-opencode/omo-opencode": "workspace:*",
74359
+ "@oh-my-opencode/omo-senpi": "workspace:*",
74360
+ "@oh-my-opencode/openclaw-core": "workspace:*",
74361
+ "@oh-my-opencode/prompts-core": "workspace:*",
74362
+ "@oh-my-opencode/rules-engine": "workspace:*",
74363
+ "@oh-my-opencode/senpi-task": "workspace:*",
74364
+ "@oh-my-opencode/shared-skills": "workspace:*",
74365
+ "@oh-my-opencode/skills-loader-core": "workspace:*",
74366
+ "@oh-my-opencode/team-core": "workspace:*",
74367
+ "@oh-my-opencode/telemetry-core": "workspace:*",
74368
+ "@oh-my-opencode/tmux-core": "workspace:*",
74369
+ "@oh-my-opencode/utils": "workspace:*",
74370
+ "@types/js-yaml": "^4.0.9",
74371
+ "@types/picomatch": "^4.0.3",
74372
+ "@typescript/native-preview": "7.0.0-dev.20260707.2",
74373
+ "@xterm/addon-unicode11": "^0.9.0",
74374
+ "@xterm/xterm": "^6.0.0",
74375
+ "bun-types": "1.4.2",
74376
+ "node-pty": "^1.1.0",
74377
+ omowright: "github:code-yeongyu/omowright#293ca5002cbd4c8b0c104c5934683385ef7e0d3a",
74378
+ "puppeteer-core": "^25.11.0",
74379
+ typescript: "^7.0.2"
74380
+ },
74381
+ optionalDependencies: {
74382
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.90",
74383
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.90",
74384
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.90",
74385
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.90",
74386
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.90",
74387
+ "oh-my-opencode-linux-x64": "5.0.0-beta.90",
74388
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.90",
74389
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.90",
74390
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.90",
74391
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.90",
74392
+ "oh-my-opencode-windows-x64": "5.0.0-beta.90",
74393
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.90"
74394
+ },
74395
+ overrides: {
74396
+ "@earendil-works/pi-agent-core": "0.84.2",
74397
+ "@earendil-works/pi-ai": "0.84.2",
74398
+ "@earendil-works/pi-coding-agent": "0.84.2",
74399
+ "@earendil-works/pi-tui": "0.84.2",
74400
+ hono: "^4.13.8",
74401
+ "@hono/node-server": "2.1.1",
74402
+ "express-rate-limit": "^8.7.0",
74403
+ "fast-uri": "^3.1.6",
74404
+ "path-to-regexp": "^8.4.2",
74405
+ qs: "^6.16.0",
74406
+ "ip-address": "^10.7.2",
74407
+ "@types/node": "26.6.2"
74408
+ },
74409
+ trustedDependencies: []
74410
+ };
74411
+
74412
+ // packages/omo-opencode/src/hooks/auto-update-checker/checker/bundled-version.ts
74413
+ function getBundledVersion() {
74414
+ return package_default.version;
74415
+ }
74416
+
74417
+ // packages/omo-opencode/src/hooks/auto-update-checker/version-channel.ts
74418
+ function isPrereleaseVersion(version) {
74419
+ return version.includes("-");
74420
+ }
74067
74421
 
74068
74422
  // packages/omo-opencode/src/cli/install-native/plan.ts
74069
74423
  var NATIVE_PACKAGE_SPEC = "omo-ai@beta";
@@ -74075,9 +74429,15 @@ var PLANS = {
74075
74429
  function resolveNativeInstallPlan(bunAvailable) {
74076
74430
  return bunAvailable ? PLANS.bun : PLANS.npm;
74077
74431
  }
74078
- function formatNativeInstallCommand(plan) {
74079
- return [plan.command, ...plan.args].join(" ");
74432
+ function formatNativeInstallEntryCommand(plan, pluginVersion = getBundledVersion()) {
74433
+ const runner = plan.packageManager === "bun" ? "bunx" : "npx";
74434
+ const tag = isPrereleaseVersion(pluginVersion) ? "@beta" : "";
74435
+ return `${runner} ${PUBLISHED_PACKAGE_NAME}${tag} install --platform=native`;
74080
74436
  }
74437
+
74438
+ // packages/omo-opencode/src/cli/native-edition-hint.ts
74439
+ var NATIVE_EDITION_INSTALL_COMMAND = formatNativeInstallEntryCommand(resolveNativeInstallPlan(true));
74440
+ var NATIVE_EDITION_GUIDE_URL = "https://github.com/code-yeongyu/oh-my-openagent/blob/dev/docs/guide/migrating-from-opencode.md";
74081
74441
  // packages/omo-opencode/src/cli/install-native/run-native-install.ts
74082
74442
  init_bun_which_shim();
74083
74443
 
@@ -74089,7 +74449,7 @@ var NUDGE_INTERVALS_MS = [3, 7, 14].map((days) => days * 24 * 60 * 60 * 1000);
74089
74449
  var NUDGE_SNOOZE_MS = 7 * 24 * 60 * 60 * 1000;
74090
74450
  var NUDGE_CORRUPT_RECOVERY_MS = 3 * 24 * 60 * 60 * 1000;
74091
74451
  // packages/omo-opencode/src/hooks/native-edition-nudge/hook.ts
74092
- import { join as join8 } from "path";
74452
+ import { join as join9 } from "path";
74093
74453
  init_logger2();
74094
74454
 
74095
74455
  // packages/omo-opencode/src/hooks/auto-update-checker/constants.ts
@@ -74110,8 +74470,8 @@ var INSTALLED_PACKAGE_JSON = path4.join(CACHE_DIR, "node_modules", PACKAGE_NAME,
74110
74470
  var INSTALLED_PACKAGE_JSON_CANDIDATES = ACCEPTED_PACKAGE_NAMES2.map((name) => path4.join(CACHE_DIR, "node_modules", name, "package.json"));
74111
74471
 
74112
74472
  // packages/omo-opencode/src/hooks/native-edition-nudge/state.ts
74113
- import { mkdirSync as mkdirSync4, readFileSync as readFileSync2, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "fs";
74114
- import { join as join7 } from "path";
74473
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync3, unlinkSync as unlinkSync2, writeFileSync as writeFileSync3 } from "fs";
74474
+ import { join as join8 } from "path";
74115
74475
  var NUDGE_STATE_FILE = "native-nudge.json";
74116
74476
  function isDecision(value) {
74117
74477
  return value === "none" || value === "snoozed" || value === "never" || value === "migrated";
@@ -74145,12 +74505,12 @@ function parseNudgeState(raw) {
74145
74505
  };
74146
74506
  }
74147
74507
  function createNudgeStateStore(stateDir) {
74148
- const path = join7(stateDir, NUDGE_STATE_FILE);
74508
+ const path = join8(stateDir, NUDGE_STATE_FILE);
74149
74509
  return {
74150
74510
  read: () => {
74151
74511
  let raw;
74152
74512
  try {
74153
- raw = readFileSync2(path, "utf8");
74513
+ raw = readFileSync3(path, "utf8");
74154
74514
  } catch {
74155
74515
  return "missing";
74156
74516
  }
@@ -74158,8 +74518,8 @@ function createNudgeStateStore(stateDir) {
74158
74518
  },
74159
74519
  write: (state) => {
74160
74520
  try {
74161
- mkdirSync4(stateDir, { recursive: true });
74162
- writeFileSync2(path, `${JSON.stringify(state, null, 2)}
74521
+ mkdirSync5(stateDir, { recursive: true });
74522
+ writeFileSync3(path, `${JSON.stringify(state, null, 2)}
74163
74523
  `, { mode: 384 });
74164
74524
  return true;
74165
74525
  } catch {
@@ -74167,10 +74527,10 @@ function createNudgeStateStore(stateDir) {
74167
74527
  }
74168
74528
  },
74169
74529
  probeWritable: () => {
74170
- const probe = join7(stateDir, `.${NUDGE_STATE_FILE}.probe`);
74530
+ const probe = join8(stateDir, `.${NUDGE_STATE_FILE}.probe`);
74171
74531
  try {
74172
- mkdirSync4(stateDir, { recursive: true });
74173
- writeFileSync2(probe, "", { mode: 384 });
74532
+ mkdirSync5(stateDir, { recursive: true });
74533
+ writeFileSync3(probe, "", { mode: 384 });
74174
74534
  } catch {
74175
74535
  return false;
74176
74536
  }
@@ -74186,7 +74546,7 @@ function createNudgeStateStore(stateDir) {
74186
74546
  var NATIVE_NUDGE_TOAST_MESSAGE = `Same agent, one binary, nothing else to keep updated.
74187
74547
  Install: ${NATIVE_EDITION_INSTALL_COMMAND}`;
74188
74548
  function nativeEditionStateDir() {
74189
- return join8(getUserConfigDir(), "oh-my-openagent");
74549
+ return join9(getUserConfigDir(), "oh-my-openagent");
74190
74550
  }
74191
74551
  // packages/omo-opencode/src/features/native-edition-nudge/tui.ts
74192
74552
  var NATIVE_NUDGE_DIALOG_TITLE = "OmO Native";
@@ -74214,7 +74574,7 @@ function currentState(store, now) {
74214
74574
  function applyNativeEditionNudgeAction(action, options) {
74215
74575
  const state = currentState(options.store, options.now);
74216
74576
  if (action === "install") {
74217
- const command = formatNativeInstallCommand(resolveNativeInstallPlan(options.bunAvailable));
74577
+ const command = formatNativeInstallEntryCommand(resolveNativeInstallPlan(options.bunAvailable));
74218
74578
  return { toast: `Run: ${command}
74219
74579
  Then: ${NATIVE_SETUP_COMMAND}` };
74220
74580
  }
@@ -74434,30 +74794,30 @@ function compareJobs(left, right) {
74434
74794
  }
74435
74795
 
74436
74796
  // packages/omo-opencode/src/features/tui-sidebar/mirror-io.ts
74437
- import { mkdirSync as mkdirSync5, readFileSync as readFileSync3 } from "fs";
74797
+ import { mkdirSync as mkdirSync6, readFileSync as readFileSync4 } from "fs";
74438
74798
  init_write_file_atomically();
74439
74799
 
74440
74800
  // packages/omo-opencode/src/features/tui-sidebar/mirror-path.ts
74441
74801
  import { createHash } from "crypto";
74442
- import { realpathSync as realpathSync2 } from "fs";
74802
+ import { realpathSync as realpathSync3 } from "fs";
74443
74803
  import { homedir as homedir3 } from "os";
74444
- import { join as join9, resolve as resolve2 } from "path";
74804
+ import { join as join10, resolve as resolve3 } from "path";
74445
74805
  function mirrorStorageDir() {
74446
- return join9(process.env.XDG_DATA_HOME ?? join9(homedir3(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
74806
+ return join10(process.env.XDG_DATA_HOME ?? join10(homedir3(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
74447
74807
  }
74448
74808
  function canonicalProjectDir(projectDir) {
74449
74809
  try {
74450
- return realpathSync2.native(projectDir);
74810
+ return realpathSync3.native(projectDir);
74451
74811
  } catch (error) {
74452
74812
  if (error instanceof Error) {
74453
- return resolve2(projectDir);
74813
+ return resolve3(projectDir);
74454
74814
  }
74455
74815
  throw error;
74456
74816
  }
74457
74817
  }
74458
74818
  function mirrorFilePath(projectDir) {
74459
74819
  const projectHash = createHash("sha1").update(canonicalProjectDir(projectDir)).digest("hex").slice(0, 16);
74460
- return join9(mirrorStorageDir(), `${projectHash}.json`);
74820
+ return join10(mirrorStorageDir(), `${projectHash}.json`);
74461
74821
  }
74462
74822
 
74463
74823
  // packages/omo-opencode/src/features/tui-sidebar/snapshot-schema.ts
@@ -74517,7 +74877,7 @@ function parseSnapshot(raw) {
74517
74877
  function readMirror(projectDir) {
74518
74878
  let raw;
74519
74879
  try {
74520
- raw = JSON.parse(readFileSync3(mirrorFilePath(projectDir), "utf-8"));
74880
+ raw = JSON.parse(readFileSync4(mirrorFilePath(projectDir), "utf-8"));
74521
74881
  } catch (error) {
74522
74882
  if (error instanceof Error) {
74523
74883
  return null;
@@ -74653,6 +75013,113 @@ function activeGoalLabel(activeGoal) {
74653
75013
 
74654
75014
  // packages/omo-opencode/src/tui.ts
74655
75015
  init_logger2();
75016
+
75017
+ // packages/omo-opencode/src/hooks/auto-update-checker/checker/sandbox-refresh.ts
75018
+ init_logger2();
75019
+ init_data_path();
75020
+ init_opencode_plugin_sandbox();
75021
+ import { basename as basename2, dirname as dirname3 } from "path";
75022
+ import { fileURLToPath } from "url";
75023
+
75024
+ // packages/omo-opencode/src/hooks/auto-update-checker/checker/package-json-locator.ts
75025
+ import * as fs2 from "fs";
75026
+ import * as path5 from "path";
75027
+ var ACCEPTED_NAME_SET = new Set(ACCEPTED_PACKAGE_NAMES2);
75028
+ function findPackageJsonUp(startPath) {
75029
+ try {
75030
+ const stat = fs2.statSync(startPath);
75031
+ let dir = stat.isDirectory() ? startPath : path5.dirname(startPath);
75032
+ for (let i = 0;i < 10; i++) {
75033
+ const pkgPath = path5.join(dir, "package.json");
75034
+ if (fs2.existsSync(pkgPath)) {
75035
+ try {
75036
+ const content = fs2.readFileSync(pkgPath, "utf-8");
75037
+ const pkg = JSON.parse(content);
75038
+ if (pkg.name && ACCEPTED_NAME_SET.has(pkg.name))
75039
+ return pkgPath;
75040
+ } catch (error) {
75041
+ if (!(error instanceof Error)) {
75042
+ throw error;
75043
+ }
75044
+ }
75045
+ }
75046
+ const parent = path5.dirname(dir);
75047
+ if (parent === dir)
75048
+ break;
75049
+ dir = parent;
75050
+ }
75051
+ } catch (error) {
75052
+ if (!(error instanceof Error)) {
75053
+ throw error;
75054
+ }
75055
+ }
75056
+ return null;
75057
+ }
75058
+
75059
+ // packages/omo-opencode/src/hooks/auto-update-checker/checker/sandbox-refresh.ts
75060
+ var trackedSandboxDirs = new Set;
75061
+ function getLoadedPluginSandboxDir(moduleUrl, cacheDir = getOpenCodeCacheDir()) {
75062
+ const packageJsonPath = findPackageJsonUp(dirname3(fileURLToPath(moduleUrl)));
75063
+ if (!packageJsonPath)
75064
+ return null;
75065
+ const nodeModulesDir = dirname3(dirname3(packageJsonPath));
75066
+ if (basename2(nodeModulesDir) !== "node_modules")
75067
+ return null;
75068
+ const workspace = dirname3(nodeModulesDir);
75069
+ return isPluginSandboxDir(workspace, cacheDir) ? workspace : null;
75070
+ }
75071
+ function refreshMarkedSandbox(sandboxDir, cacheDir, pid) {
75072
+ try {
75073
+ releasePluginSandboxLease(sandboxDir, pid);
75074
+ if (!isPluginSandboxMarkedStale(sandboxDir))
75075
+ return;
75076
+ if (hasOtherLivePluginSandboxLease(sandboxDir, pid)) {
75077
+ markPluginSandboxStale(sandboxDir, cacheDir, "another OpenCode window was still open", pid);
75078
+ log2(`[auto-update-checker] Another OpenCode process still runs from ${sandboxDir}; the last one to exit refreshes it`);
75079
+ return;
75080
+ }
75081
+ const removed = removePluginSandbox(sandboxDir, cacheDir);
75082
+ log2(removed ? `[auto-update-checker] Removed stale OpenCode plugin sandbox on exit: ${sandboxDir}` : `[auto-update-checker] OpenCode plugin sandbox already gone: ${sandboxDir}`);
75083
+ } catch (error) {
75084
+ const message = error instanceof Error ? error.message : String(error);
75085
+ log2(`[auto-update-checker] Failed to remove OpenCode plugin sandbox ${sandboxDir}: ${message}`);
75086
+ try {
75087
+ markPluginSandboxStale(sandboxDir, cacheDir, `could not remove it: ${message}`, pid);
75088
+ } catch (markError) {
75089
+ log2(`[auto-update-checker] Could not record the failed refresh of ${sandboxDir}:`, markError);
75090
+ }
75091
+ }
75092
+ }
75093
+ function trackPluginSandbox(sandboxDir, deps = {}) {
75094
+ const cacheDir = deps.cacheDir ?? getOpenCodeCacheDir();
75095
+ if (!isPluginSandboxDir(sandboxDir, cacheDir))
75096
+ return false;
75097
+ if (trackedSandboxDirs.has(sandboxDir))
75098
+ return true;
75099
+ trackedSandboxDirs.add(sandboxDir);
75100
+ const pid = deps.pid ?? process.pid;
75101
+ try {
75102
+ acquirePluginSandboxLease(sandboxDir, pid);
75103
+ } catch (error) {
75104
+ const message = error instanceof Error ? error.message : String(error);
75105
+ log2(`[auto-update-checker] Could not lease OpenCode plugin sandbox ${sandboxDir}: ${message}`);
75106
+ }
75107
+ const onExit = deps.onExit ?? ((callback) => process.once("exit", callback));
75108
+ onExit(() => refreshMarkedSandbox(sandboxDir, cacheDir, pid));
75109
+ return true;
75110
+ }
75111
+ function trackLoadedPluginSandbox(moduleUrl = import.meta.url) {
75112
+ try {
75113
+ const sandboxDir = getLoadedPluginSandboxDir(moduleUrl);
75114
+ if (sandboxDir)
75115
+ trackPluginSandbox(sandboxDir);
75116
+ } catch (error) {
75117
+ const message = error instanceof Error ? error.message : String(error);
75118
+ log2(`[auto-update-checker] Could not track the OpenCode plugin sandbox: ${message}`);
75119
+ }
75120
+ }
75121
+
75122
+ // packages/omo-opencode/src/tui.ts
74656
75123
  function registerSidebarContentSlot({
74657
75124
  registerSlot,
74658
75125
  requestRender,
@@ -74718,6 +75185,7 @@ function handleTuiPollError(error, reportPollError = (pollError) => log2("[tui-s
74718
75185
  var module = {
74719
75186
  id: "oh-my-openagent:tui",
74720
75187
  tui: async (api) => {
75188
+ trackLoadedPluginSandbox();
74721
75189
  const solid = await import("@opentui/solid").catch(() => null);
74722
75190
  if (!solid) {
74723
75191
  return;