oh-my-opencode 4.19.4 → 5.0.0-beta.10

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 (374) hide show
  1. package/.agents/command/publish.md +44 -16
  2. package/.agents/skills/publish/SKILL.md +44 -16
  3. package/.agents/skills/work-with-pr/SKILL.md +37 -23
  4. package/.opencode/command/publish.md +44 -16
  5. package/.opencode/skills/work-with-pr/SKILL.md +37 -23
  6. package/README.ja.md +1 -1
  7. package/README.ko.md +1 -1
  8. package/README.md +18 -6
  9. package/README.ru.md +1 -1
  10. package/README.zh-cn.md +1 -1
  11. package/bin/oh-my-opencode.js +14 -1
  12. package/bin/oh-my-opencode.test.ts +21 -0
  13. package/dist/agents/atlas/agent.d.ts +0 -1
  14. package/dist/agents/sisyphus/grok-4.d.ts +20 -0
  15. package/dist/agents/sisyphus/index.d.ts +2 -0
  16. package/dist/agents/sisyphus-agent-config.d.ts +6 -0
  17. package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
  18. package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +15 -4
  19. package/dist/agents/types.d.ts +2 -2
  20. package/dist/cli/index.js +1888 -807
  21. package/dist/cli/run/on-complete-hook.d.ts +2 -0
  22. package/dist/cli-node/index.js +1888 -807
  23. package/dist/config/schema/agent-overrides.d.ts +528 -0
  24. package/dist/config/schema/oh-my-opencode-config.d.ts +495 -0
  25. package/dist/features/monitor/batcher.d.ts +3 -1
  26. package/dist/features/monitor/manager-internals.d.ts +1 -0
  27. package/dist/features/monitor/output-injector-types.d.ts +2 -0
  28. package/dist/features/monitor/output-injector.d.ts +6 -0
  29. package/dist/hooks/atlas/final-wave-approval-gate.test-support.d.ts +50 -0
  30. package/dist/hooks/atlas/system-reminder-templates.d.ts +0 -1
  31. package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
  32. package/dist/hooks/todo-continuation-enforcer/unrecoverable-request-error.d.ts +9 -0
  33. package/dist/hooks/tool-pair-validator/hook.test-support.d.ts +29 -0
  34. package/dist/hooks/tool-pair-validator/tool-part-ids.d.ts +14 -5
  35. package/dist/hooks/tool-pair-validator/tool-result-repair.d.ts +4 -3
  36. package/dist/hooks/tool-pair-validator/types.d.ts +5 -22
  37. package/dist/index.js +3139 -2232
  38. package/dist/mcp/lsp.d.ts +1 -0
  39. package/dist/oh-my-opencode.schema.json +1466 -131
  40. package/dist/shared/normalize-sdk-response.d.ts +1 -0
  41. package/dist/shared/shell-env.d.ts +1 -1
  42. package/dist/shared/tmux/constants.d.ts +1 -1
  43. package/dist/skills/ast-grep/SOURCE +1 -1
  44. package/dist/skills/ast-grep/install.ps1 +2 -2
  45. package/dist/skills/ast-grep/install.sh +1 -1
  46. package/dist/skills/ast-grep/references/install.md +2 -2
  47. package/dist/skills/ast-grep/tests/smoke.sh +1 -1
  48. package/dist/skills/coding-agent-sessions/SKILL.md +3 -2
  49. package/dist/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  50. package/dist/skills/coding-agent-sessions/references/senpi.md +4 -4
  51. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  52. package/dist/skills/frontend/SKILL.md +10 -7
  53. package/dist/skills/frontend/references/design/_INDEX.md +1 -0
  54. package/dist/skills/frontend/references/design/stylegallery.md +80 -0
  55. package/dist/skills/start-work/SKILL.md +54 -9
  56. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  57. package/dist/skills/ultimate-browsing/SKILL.md +2 -2
  58. package/dist/skills/ultimate-browsing/engine/AGENTS.md +179 -0
  59. package/dist/skills/ultimate-browsing/engine/__main__.py +8 -1
  60. package/dist/skills/ultimate-browsing/engine/bias_check.py +11 -0
  61. package/dist/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
  62. package/dist/skills/ultimate-browsing/engine/result_schema.py +10 -1
  63. package/dist/skills/ultimate-browsing/engine/surrogate.py +214 -0
  64. package/dist/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
  65. package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
  66. package/dist/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
  67. package/dist/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
  68. package/dist/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
  69. package/dist/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
  70. package/dist/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
  71. package/dist/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
  72. package/dist/skills/ultimate-browsing/engine/validators.py +46 -0
  73. package/dist/skills/ultimate-browsing/engine/waf_detector.py +1 -1
  74. package/dist/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
  75. package/dist/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
  76. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
  77. package/dist/skills/ultimate-browsing/references/insane-search/README.md +4 -4
  78. package/dist/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
  79. package/dist/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
  80. package/dist/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
  81. package/dist/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
  82. package/dist/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
  83. package/dist/skills/ulw-plan/SKILL.md +3 -3
  84. package/dist/skills/ulw-plan/references/full-workflow.md +30 -6
  85. package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
  86. package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
  87. package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
  88. package/dist/skills/ulw-research/SKILL.md +15 -10
  89. package/dist/tui.js +477 -36
  90. package/docs/reference/web-terminal-visual-qa.md +1 -1
  91. package/package.json +34 -24
  92. package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
  93. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
  94. package/packages/lsp-core/src/lsp/client-wrapper.test.ts +60 -7
  95. package/packages/lsp-core/src/lsp/client-wrapper.ts +69 -16
  96. package/packages/lsp-core/src/lsp/connection.ts +1 -1
  97. package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
  98. package/packages/lsp-core/src/tools/diagnostics.ts +3 -3
  99. package/packages/lsp-core/src/tools/navigation.ts +4 -2
  100. package/packages/lsp-core/src/tools/rename.ts +4 -2
  101. package/packages/lsp-core/src/tools/symbols.ts +1 -1
  102. package/packages/lsp-daemon/dist/cli.js +108 -40
  103. package/packages/lsp-daemon/dist/client.js +123 -55
  104. package/packages/lsp-daemon/dist/ensure-daemon.d.ts +1 -0
  105. package/packages/lsp-daemon/dist/ensure-daemon.js +18 -5
  106. package/packages/lsp-daemon/dist/index.js +111 -43
  107. package/packages/lsp-tools-mcp/dist/cli.js +77 -23
  108. package/packages/lsp-tools-mcp/dist/lsp/manager.js +1 -1
  109. package/packages/lsp-tools-mcp/dist/mcp.js +77 -23
  110. package/packages/lsp-tools-mcp/dist/tools.js +77 -23
  111. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  112. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +268 -92
  113. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  114. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  115. package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +7 -7
  116. package/packages/omo-codex/plugin/components/bootstrap/src/worker.ts +3 -0
  117. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +220 -10
  118. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +220 -10
  119. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  120. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  121. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  122. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  123. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  124. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  125. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  126. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +3 -17
  127. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  128. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +135 -67
  129. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  130. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  131. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  132. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  133. package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +11 -16
  134. package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +16 -23
  135. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +9 -7
  136. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +0 -6
  137. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +6 -4
  138. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +12 -9
  139. package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +28 -37
  140. package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +37 -69
  141. package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +2 -3
  142. package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -15
  143. package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +4 -2
  144. package/packages/omo-codex/plugin/components/start-work-continuation/README.md +5 -1
  145. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +2 -1
  146. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +18 -0
  147. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  148. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  149. package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +21 -0
  150. package/packages/omo-codex/plugin/components/start-work-continuation/test/cli.test.ts +0 -3
  151. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +107 -16
  152. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  153. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  154. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +3 -9
  155. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +24 -12
  156. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +24 -12
  157. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  158. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  159. package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +2 -0
  160. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +1 -1
  161. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
  162. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +1 -1
  163. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
  164. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-low.toml +1 -1
  165. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +1 -1
  166. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
  167. package/packages/omo-codex/plugin/components/ultrawork/directive.md +9 -2
  168. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  169. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  170. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +9 -2
  171. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +3 -3
  172. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +30 -6
  173. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
  174. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
  175. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
  176. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +0 -136
  177. package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +0 -2
  178. package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
  179. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
  180. package/packages/omo-codex/plugin/components/ulw-loop/README.md +11 -11
  181. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +9 -2
  182. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +1 -1
  183. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
  184. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +9 -9
  185. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +1 -1
  186. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +66 -66
  187. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +4 -4
  188. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +1 -1
  189. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -1
  190. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +1 -1
  191. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +1 -1
  192. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +2 -2
  193. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  194. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  195. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +5 -4
  196. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +108 -0
  197. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +23 -25
  198. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +1 -1
  199. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +9 -9
  200. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +1 -1
  201. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +1 -1
  202. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +4 -4
  203. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +1 -1
  204. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -1
  205. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +1 -1
  206. package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +1 -1
  207. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +2 -2
  208. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +0 -1
  209. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-commands.test.ts +2 -2
  210. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +1 -1
  211. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-helpers.test.ts +2 -2
  212. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-kind-guidance.test.ts +1 -1
  213. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
  214. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +2 -5
  215. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +1 -1
  216. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +7 -40
  217. package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +1 -1
  218. package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +1 -1
  219. package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +1 -1
  220. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +1 -1
  221. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +4 -5
  222. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  223. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  224. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  225. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  226. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  227. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  228. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  229. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  230. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  231. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  232. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  233. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  234. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  235. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  236. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  237. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  238. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  239. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  240. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  241. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  242. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  243. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  244. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  245. package/packages/omo-codex/plugin/package-lock.json +20 -20
  246. package/packages/omo-codex/plugin/package.json +1 -1
  247. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +4 -4
  248. package/packages/omo-codex/plugin/skills/ast-grep/SOURCE +1 -1
  249. package/packages/omo-codex/plugin/skills/ast-grep/install.ps1 +2 -2
  250. package/packages/omo-codex/plugin/skills/ast-grep/install.sh +1 -1
  251. package/packages/omo-codex/plugin/skills/ast-grep/references/install.md +2 -2
  252. package/packages/omo-codex/plugin/skills/ast-grep/tests/smoke.sh +1 -1
  253. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
  254. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  255. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
  256. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  257. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
  258. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
  259. package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
  260. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +54 -9
  261. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  262. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -2
  263. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +179 -0
  264. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__main__.py +8 -1
  265. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/bias_check.py +11 -0
  266. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
  267. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/result_schema.py +10 -1
  268. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/surrogate.py +214 -0
  269. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
  270. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
  271. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
  272. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
  273. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
  274. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
  275. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
  276. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
  277. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/validators.py +46 -0
  278. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_detector.py +1 -1
  279. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
  280. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
  281. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
  282. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +4 -4
  283. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
  284. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
  285. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
  286. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
  287. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
  288. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +9 -2
  289. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +5 -4
  290. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +108 -0
  291. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +23 -25
  292. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +3 -3
  293. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +30 -6
  294. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
  295. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
  296. package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
  297. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +15 -10
  298. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +19 -173
  299. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -24
  300. package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +175 -13
  301. package/packages/omo-codex/plugin/test/aggregate.test.mjs +78 -2
  302. package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +19 -33
  303. package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +12 -12
  304. package/packages/omo-codex/plugin/test/bootstrap-orchestration.test.mjs +36 -4
  305. package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +21 -27
  306. package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +0 -36
  307. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +101 -0
  308. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +4 -4
  309. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -119
  310. package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +0 -40
  311. package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +6 -62
  312. package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +3 -36
  313. package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +0 -44
  314. package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +2 -6
  315. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +0 -3
  316. package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +0 -3
  317. package/packages/omo-codex/scripts/install-bin-links.test.mjs +56 -2
  318. package/packages/omo-codex/scripts/install-delegated-command.test.mjs +6 -6
  319. package/packages/omo-codex/scripts/install-dist/install-local.mjs +170 -78
  320. package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +7 -2
  321. package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +4 -4
  322. package/packages/omo-codex/scripts/install-local.test.mjs +5 -2
  323. package/packages/shared-skills/index.mjs +19 -1
  324. package/packages/shared-skills/skills/ast-grep/SOURCE +1 -1
  325. package/packages/shared-skills/skills/ast-grep/install.ps1 +2 -2
  326. package/packages/shared-skills/skills/ast-grep/install.sh +1 -1
  327. package/packages/shared-skills/skills/ast-grep/references/install.md +2 -2
  328. package/packages/shared-skills/skills/ast-grep/tests/smoke.sh +1 -1
  329. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
  330. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  331. package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
  332. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  333. package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
  334. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
  335. package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
  336. package/packages/shared-skills/skills/start-work/SKILL.md +54 -9
  337. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  338. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -2
  339. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +179 -0
  340. package/packages/shared-skills/skills/ultimate-browsing/engine/__main__.py +8 -1
  341. package/packages/shared-skills/skills/ultimate-browsing/engine/bias_check.py +11 -0
  342. package/packages/shared-skills/skills/ultimate-browsing/engine/fetch_chain.py +90 -52
  343. package/packages/shared-skills/skills/ultimate-browsing/engine/result_schema.py +10 -1
  344. package/packages/shared-skills/skills/ultimate-browsing/engine/surrogate.py +214 -0
  345. package/packages/shared-skills/skills/ultimate-browsing/engine/surrogates.yaml +60 -0
  346. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
  347. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +7 -0
  348. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +19 -0
  349. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +1 -0
  350. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +1128 -0
  351. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_surrogate.py +252 -0
  352. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +78 -0
  353. package/packages/shared-skills/skills/ultimate-browsing/engine/validators.py +46 -0
  354. package/packages/shared-skills/skills/ultimate-browsing/engine/waf_detector.py +1 -1
  355. package/packages/shared-skills/skills/ultimate-browsing/engine/waf_profiles.yaml +10 -5
  356. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
  357. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
  358. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +4 -4
  359. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/cache-archive.md +51 -50
  360. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/fallback.md +1 -1
  361. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/jina.md +8 -2
  362. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/naver.md +1 -1
  363. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/twitter.md +3 -3
  364. package/packages/shared-skills/skills/ulw-plan/SKILL.md +3 -3
  365. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +30 -6
  366. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
  367. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
  368. package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +1 -1
  369. package/packages/shared-skills/skills/ulw-research/SKILL.md +15 -10
  370. package/postinstall.mjs +6 -0
  371. package/dist/tools/call-omo-agent/background-agent-executor.d.ts +0 -5
  372. package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +0 -92
  373. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +0 -314
  374. package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +0 -24
@@ -8,7 +8,7 @@ import { argv, execPath as execPath2, stderr } from "node:process";
8
8
  import { stdin as processStdin } from "node:process";
9
9
 
10
10
  // src/codex-hook.ts
11
- import { readFileSync as readFileSync9, realpathSync as realpathSync6 } from "node:fs";
11
+ import { readFileSync as readFileSync9, realpathSync as realpathSync7 } from "node:fs";
12
12
  import { homedir as homedir3 } from "node:os";
13
13
  import { join as join11, resolve as resolve11 } from "node:path";
14
14
 
@@ -18,10 +18,10 @@ import { AsyncLocalStorage } from "node:async_hooks";
18
18
  import { existsSync, realpathSync, statSync } from "node:fs";
19
19
  import { basename, delimiter, dirname, isAbsolute, join, relative, resolve } from "node:path";
20
20
  import { spawn } from "node:child_process";
21
- import { closeSync as closeSync2, mkdirSync as mkdirSync2, openSync as openSync2 } from "node:fs";
21
+ import { closeSync as closeSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, openSync as openSync2, writeSync as writeSync2 } from "node:fs";
22
22
  import { Socket } from "node:net";
23
- import { dirname as dirname3 } from "node:path";
24
- import { execPath } from "node:process";
23
+ import { dirname as dirname3, isAbsolute as isAbsolute3 } from "node:path";
24
+ import { argv0, execPath } from "node:process";
25
25
  import {
26
26
  chmodSync,
27
27
  closeSync,
@@ -42,38 +42,38 @@ import * as path from "node:path";
42
42
  import { fileURLToPath } from "node:url";
43
43
  import { statSync as statSync2 } from "node:fs";
44
44
  import { isAbsolute as isAbsolute2 } from "node:path";
45
- import { existsSync as existsSync9, statSync as statSync4 } from "node:fs";
46
- import { dirname as dirname8, join as join4, resolve as resolve7 } from "node:path";
45
+ import { existsSync as existsSync10, realpathSync as realpathSync4, statSync as statSync4 } from "node:fs";
46
+ import { basename as basename3, dirname as dirname8, join as join4, resolve as resolve7 } from "node:path";
47
47
  import { basename as basename2, extname } from "node:path";
48
48
  import { resolve as resolve6 } from "node:path";
49
49
  import { pathToFileURL as pathToFileURL3 } from "node:url";
50
50
  import { pathToFileURL } from "node:url";
51
51
  import { spawn as spawn2, spawnSync } from "node:child_process";
52
- import { existsSync as existsSync2, statSync as statSync3 } from "node:fs";
52
+ import { existsSync as existsSync3, statSync as statSync3 } from "node:fs";
53
53
  import { delimiter as delimiter2, join as join2 } from "node:path";
54
54
  import { readFileSync as readFileSync2, realpathSync as realpathSync2 } from "node:fs";
55
55
  import { relative as relative2, resolve as resolve2 } from "node:path";
56
56
  import { pathToFileURL as pathToFileURL2 } from "node:url";
57
- import { existsSync as existsSync4, lstatSync as lstatSync3, renameSync, rmSync, writeFileSync } from "node:fs";
58
- import { existsSync as existsSync3, lstatSync as lstatSync2, readFileSync as readFileSync3, readdirSync, realpathSync as realpathSync3 } from "node:fs";
59
- import { dirname as dirname4, isAbsolute as isAbsolute3, relative as relative3, resolve as resolve3 } from "node:path";
57
+ import { existsSync as existsSync5, lstatSync as lstatSync3, renameSync, rmSync, writeFileSync } from "node:fs";
58
+ import { existsSync as existsSync4, lstatSync as lstatSync2, readFileSync as readFileSync3, readdirSync, realpathSync as realpathSync3 } from "node:fs";
59
+ import { dirname as dirname4, isAbsolute as isAbsolute4, relative as relative3, resolve as resolve3 } from "node:path";
60
60
  import { fileURLToPath as fileURLToPath2 } from "node:url";
61
61
  import { createHash as createHash2 } from "node:crypto";
62
62
  import { dirname as dirname5, relative as relative4, resolve as resolve4 } from "node:path";
63
- import { existsSync as existsSync5, lstatSync as lstatSync4, readdirSync as readdirSync2 } from "node:fs";
63
+ import { existsSync as existsSync6, lstatSync as lstatSync4, readdirSync as readdirSync2 } from "node:fs";
64
64
  import { dirname as dirname6, resolve as resolve5 } from "node:path";
65
- import { existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
65
+ import { existsSync as existsSync7, mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
66
66
  import { dirname as dirname7 } from "node:path";
67
- import { existsSync as existsSync7, readFileSync as readFileSync5 } from "node:fs";
68
- import { existsSync as existsSync8 } from "node:fs";
67
+ import { existsSync as existsSync8, readFileSync as readFileSync5 } from "node:fs";
68
+ import { existsSync as existsSync9 } from "node:fs";
69
69
  import { delimiter as delimiter3, join as join3 } from "node:path";
70
- import { existsSync as existsSync10, lstatSync as lstatSync5, readdirSync as readdirSync3 } from "node:fs";
70
+ import { existsSync as existsSync11, lstatSync as lstatSync5, readdirSync as readdirSync3 } from "node:fs";
71
71
  import { join as join5, resolve as resolve8 } from "node:path";
72
72
  import { fileURLToPath as fileURLToPath3 } from "node:url";
73
73
  import { lstatSync as lstatSync6, readdirSync as readdirSync4 } from "node:fs";
74
74
  import { join as join6 } from "node:path";
75
75
  import { statSync as statSync5 } from "node:fs";
76
- import { isAbsolute as isAbsolute4 } from "node:path";
76
+ import { isAbsolute as isAbsolute5 } from "node:path";
77
77
 
78
78
  class LspRequestContextParseError extends Error {
79
79
  code;
@@ -563,15 +563,29 @@ function spawnDaemonProcess(paths) {
563
563
  mkdirSync2(dirname3(paths.log), { recursive: true });
564
564
  const logFd = openSync2(paths.log, "a");
565
565
  try {
566
- const child = spawn(execPath, [paths.cliPath, "daemon"], {
566
+ const child = spawn(resolveDaemonNodeExecutable(), [paths.cliPath, "daemon"], {
567
567
  detached: true,
568
568
  stdio: ["ignore", logFd, logFd]
569
569
  });
570
+ child.once("spawn", () => closeSync2(logFd));
571
+ child.once("error", (error) => {
572
+ writeSync2(logFd, `[lsp-daemon] failed to spawn daemon: ${error.message}
573
+ `);
574
+ closeSync2(logFd);
575
+ });
570
576
  child.unref();
571
- } finally {
577
+ } catch (error) {
572
578
  closeSync2(logFd);
579
+ throw error;
573
580
  }
574
581
  }
582
+ function resolveDaemonNodeExecutable(cachedExecPath = execPath, originalArgv0 = argv0, pathExists = existsSync2) {
583
+ if (pathExists(cachedExecPath))
584
+ return cachedExecPath;
585
+ if (isAbsolute3(originalArgv0) && pathExists(originalArgv0))
586
+ return originalArgv0;
587
+ return "node";
588
+ }
575
589
  function defaultEnsureDaemonDeps() {
576
590
  return {
577
591
  probe: (paths, signal) => probeDaemon(paths, PROBE_TIMEOUT_MS, signal),
@@ -1085,7 +1099,7 @@ function reportKillError(context, error) {
1085
1099
  }
1086
1100
  function validateCwd(cwd) {
1087
1101
  try {
1088
- if (!existsSync2(cwd)) {
1102
+ if (!existsSync3(cwd)) {
1089
1103
  return { valid: false, error: `Working directory does not exist: ${cwd}` };
1090
1104
  }
1091
1105
  const stats = statSync3(cwd);
@@ -1173,7 +1187,7 @@ function resolveWindowsCommand(command, env) {
1173
1187
  for (const baseDirectory of baseDirectories) {
1174
1188
  for (const extension of extensions) {
1175
1189
  const candidate = baseDirectory ? join2(baseDirectory, `${command}${extension}`) : `${command}${extension}`;
1176
- if (existsSync2(candidate))
1190
+ if (existsSync3(candidate))
1177
1191
  return candidate;
1178
1192
  }
1179
1193
  }
@@ -1567,7 +1581,7 @@ class LspClientConnection extends LspClientTransport {
1567
1581
  initializationOptions: this.server.initialization
1568
1582
  }, { timeoutMs: this.initializeTimeoutMs });
1569
1583
  this.setDiagnosticPullSupported(supportsDiagnosticPull(result?.capabilities));
1570
- await this.sendNotification("initialized");
1584
+ await this.sendNotification("initialized", {});
1571
1585
  await this.sendNotification("workspace/didChangeConfiguration", {
1572
1586
  settings: { json: { validate: { enable: true } } }
1573
1587
  });
@@ -2037,11 +2051,11 @@ class WorkspaceEditPathError extends Error {
2037
2051
  }
2038
2052
  function isPathInsideWorkspace(filePath, workspaceRoot) {
2039
2053
  const relativePath = relative3(workspaceRoot, filePath);
2040
- return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute3(relativePath);
2054
+ return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute4(relativePath);
2041
2055
  }
2042
2056
  function canonicalizeMissingPath(filePath) {
2043
2057
  let ancestor = filePath;
2044
- while (!existsSync3(ancestor)) {
2058
+ while (!existsSync4(ancestor)) {
2045
2059
  const parent = dirname4(ancestor);
2046
2060
  if (parent === ancestor)
2047
2061
  throw new WorkspaceEditPathError(filePath, "no existing ancestor");
@@ -2059,7 +2073,7 @@ function canonicalWorkspaceRoot(workspaceRoot) {
2059
2073
  success: true,
2060
2074
  path: canonical,
2061
2075
  requestedPath: resolve3(workspaceRoot),
2062
- followedSymbolicLink: existsSync3(resolve3(workspaceRoot)) && lstatSync2(resolve3(workspaceRoot)).isSymbolicLink()
2076
+ followedSymbolicLink: existsSync4(resolve3(workspaceRoot)) && lstatSync2(resolve3(workspaceRoot)).isSymbolicLink()
2063
2077
  };
2064
2078
  } catch (error) {
2065
2079
  const detail = error instanceof Error ? error.message : String(error);
@@ -2079,7 +2093,7 @@ function uriToCanonicalWorkspacePath(uri, workspaceRoot) {
2079
2093
  return { success: false, error: `non-file URI ${uri}: ${detail}` };
2080
2094
  }
2081
2095
  try {
2082
- const canonical = existsSync3(requestedPath) ? realpathSync3(requestedPath) : canonicalizeMissingPath(requestedPath);
2096
+ const canonical = existsSync4(requestedPath) ? realpathSync3(requestedPath) : canonicalizeMissingPath(requestedPath);
2083
2097
  if (!isPathInsideWorkspace(canonical, workspaceRoot)) {
2084
2098
  return { success: false, error: `${requestedPath}: outside workspace ${workspaceRoot}` };
2085
2099
  }
@@ -2087,7 +2101,7 @@ function uriToCanonicalWorkspacePath(uri, workspaceRoot) {
2087
2101
  success: true,
2088
2102
  path: canonical,
2089
2103
  requestedPath,
2090
- followedSymbolicLink: existsSync3(requestedPath) && lstatSync2(requestedPath).isSymbolicLink()
2104
+ followedSymbolicLink: existsSync4(requestedPath) && lstatSync2(requestedPath).isSymbolicLink()
2091
2105
  };
2092
2106
  } catch (error) {
2093
2107
  const detail = error instanceof Error ? error.message : String(error);
@@ -2095,7 +2109,7 @@ function uriToCanonicalWorkspacePath(uri, workspaceRoot) {
2095
2109
  }
2096
2110
  }
2097
2111
  function snapshotPath(path2, includeChildren) {
2098
- if (!existsSync3(path2))
2112
+ if (!existsSync4(path2))
2099
2113
  return { kind: "missing" };
2100
2114
  const stats = lstatSync2(path2);
2101
2115
  if (stats.isFile())
@@ -2213,7 +2227,7 @@ function commitOperation(context, operation) {
2213
2227
  }
2214
2228
  if (operation.kind === "rename") {
2215
2229
  if (operation.replaceDestination) {
2216
- const targetKind = existsSync4(operation.newPath) && lstatSync3(operation.newPath).isDirectory() ? "directory" : "file";
2230
+ const targetKind = existsSync5(operation.newPath) && lstatSync3(operation.newPath).isDirectory() ? "directory" : "file";
2217
2231
  io.remove(operation.newPath, targetKind === "directory");
2218
2232
  accumulator.mutations.push({ kind: "delete", path: operation.newPath, targetKind });
2219
2233
  addModifiedPath(accumulator.filesModified, reportedPath(plan, operation.newPath));
@@ -2841,7 +2855,7 @@ class WorkspaceSnapshotBuilder {
2841
2855
  break;
2842
2856
  candidate = dirname6(candidate);
2843
2857
  }
2844
- if (!includeChildren || !existsSync5(path2) || !lstatSync4(path2).isDirectory())
2858
+ if (!includeChildren || !existsSync6(path2) || !lstatSync4(path2).isDirectory())
2845
2859
  return;
2846
2860
  for (const child of readdirSync2(path2))
2847
2861
  this.add(resolve5(path2, child), true);
@@ -3597,7 +3611,7 @@ function getInstallDecisionsPath() {
3597
3611
  }
3598
3612
  function loadInstallDecisions() {
3599
3613
  const path2 = getInstallDecisionsPath();
3600
- if (!existsSync6(path2))
3614
+ if (!existsSync7(path2))
3601
3615
  return {};
3602
3616
  try {
3603
3617
  const parsed = JSON.parse(readFileSync4(path2, "utf8"));
@@ -3788,7 +3802,7 @@ function getUserConfigPath() {
3788
3802
  return lspRequestContext().userConfigPath;
3789
3803
  }
3790
3804
  function loadJsonFile(path2) {
3791
- if (!existsSync7(path2))
3805
+ if (!existsSync8(path2))
3792
3806
  return null;
3793
3807
  try {
3794
3808
  const parsed = JSON.parse(readFileSync5(path2, "utf-8"));
@@ -3981,7 +3995,7 @@ function isServerInstalled(command, _workingDirectory) {
3981
3995
  if (!cmd)
3982
3996
  return false;
3983
3997
  if (cmd.includes("/") || cmd.includes("\\")) {
3984
- if (existsSync8(cmd))
3998
+ if (existsSync9(cmd))
3985
3999
  return true;
3986
4000
  }
3987
4001
  const isWindows = process.platform === "win32";
@@ -4002,7 +4016,7 @@ function isServerInstalled(command, _workingDirectory) {
4002
4016
  const paths = pathEnv.split(delimiter3);
4003
4017
  for (const p of paths) {
4004
4018
  for (const suffix of exts) {
4005
- if (existsSync8(join3(p, cmd + suffix))) {
4019
+ if (existsSync9(join3(p, cmd + suffix))) {
4006
4020
  return true;
4007
4021
  }
4008
4022
  }
@@ -4103,32 +4117,86 @@ function isDirectoryPath(filePath) {
4103
4117
  }
4104
4118
  }
4105
4119
  function findWorkspaceRoot(filePath) {
4106
- const abs = resolvePathInsideContext(filePath);
4120
+ const cwd = contextCwd();
4121
+ const abs = resolveReadablePathInsideContext(filePath);
4107
4122
  let dir = abs;
4108
4123
  if (!isDirectoryPath(dir)) {
4109
4124
  dir = dirname8(dir);
4110
4125
  }
4111
- let prevDir = "";
4112
- while (dir !== prevDir) {
4113
- for (const marker of WORKSPACE_MARKERS) {
4114
- if (existsSync9(join4(dir, marker))) {
4115
- return dir;
4126
+ const fallbackRoot = nearestExistingDirectoryInsideContext(dir, cwd) ?? cwd;
4127
+ while (isPathInside(cwd, dir)) {
4128
+ const canonicalDir = existingDirectoryInsideContext(dir, cwd);
4129
+ if (canonicalDir !== undefined) {
4130
+ for (const marker of WORKSPACE_MARKERS) {
4131
+ if (existsSync10(join4(dir, marker))) {
4132
+ return canonicalDir;
4133
+ }
4116
4134
  }
4117
4135
  }
4118
- prevDir = dir;
4136
+ if (dir === cwd)
4137
+ break;
4119
4138
  dir = dirname8(dir);
4120
4139
  }
4121
- return dirname8(abs);
4140
+ return fallbackRoot;
4122
4141
  }
4123
- function resolvePathInsideContext(filePath) {
4142
+ function resolveReadablePathInsideContext(filePath) {
4124
4143
  const cwd = contextCwd();
4125
4144
  const abs = resolve7(cwd, filePath);
4145
+ if (isPathInside(cwd, abs))
4146
+ return abs;
4147
+ const rebased = rebaseThroughCanonicalAncestor(abs, cwd);
4148
+ if (rebased !== undefined)
4149
+ return rebased;
4150
+ const canonical = canonicalizeExistingOrNearestAncestor(abs);
4151
+ if (isPathInside(cwd, canonical))
4152
+ return canonical;
4153
+ throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
4154
+ }
4155
+ function resolvePathInsideContext(filePath) {
4156
+ const cwd = contextCwd();
4157
+ const abs = resolveReadablePathInsideContext(filePath);
4126
4158
  const canonical = canonicalizeExistingOrNearestAncestor(abs);
4127
4159
  if (!isPathInside(cwd, canonical)) {
4128
4160
  throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
4129
4161
  }
4130
4162
  return canonical;
4131
4163
  }
4164
+ function rebaseThroughCanonicalAncestor(path2, cwd) {
4165
+ let current = path2;
4166
+ const suffix = [];
4167
+ while (true) {
4168
+ if (existsSync10(current)) {
4169
+ const canonical = realpathSync4(current);
4170
+ if (isPathInside(cwd, canonical))
4171
+ return suffix.length === 0 ? canonical : join4(canonical, ...suffix);
4172
+ }
4173
+ const parent = dirname8(current);
4174
+ if (parent === current)
4175
+ return;
4176
+ suffix.unshift(basename3(current));
4177
+ current = parent;
4178
+ }
4179
+ }
4180
+ function existingDirectoryInsideContext(directory, cwd) {
4181
+ if (!existsSync10(directory))
4182
+ return;
4183
+ const canonical = realpathSync4(directory);
4184
+ if (!statSync4(canonical).isDirectory())
4185
+ return;
4186
+ return isPathInside(cwd, canonical) ? canonical : undefined;
4187
+ }
4188
+ function nearestExistingDirectoryInsideContext(directory, cwd) {
4189
+ let current = directory;
4190
+ while (isPathInside(cwd, current)) {
4191
+ const canonical = existingDirectoryInsideContext(current, cwd);
4192
+ if (canonical !== undefined)
4193
+ return canonical;
4194
+ if (current === cwd)
4195
+ return;
4196
+ current = dirname8(current);
4197
+ }
4198
+ return;
4199
+ }
4132
4200
  function formatServerLookupError(result) {
4133
4201
  if (result.status === "not_installed") {
4134
4202
  return formatNotInstalled(result);
@@ -4199,7 +4267,7 @@ function formatNotInstalled(result) {
4199
4267
  ].join(`
4200
4268
  `);
4201
4269
  }
4202
- var READ_ONLY_RETRY_TOOLS = new Set([
4270
+ var READ_ONLY_TOOLS = new Set([
4203
4271
  "diagnostics",
4204
4272
  "definition",
4205
4273
  "references",
@@ -4208,7 +4276,7 @@ var READ_ONLY_RETRY_TOOLS = new Set([
4208
4276
  "prepareRename"
4209
4277
  ]);
4210
4278
  async function withLspClient(filePath, fn, toolName, options = {}) {
4211
- const absPath = resolvePathInsideContext(filePath);
4279
+ const absPath = READ_ONLY_TOOLS.has(toolName) ? resolveReadablePathInsideContext(filePath) : resolvePathInsideContext(filePath);
4212
4280
  if (isDirectoryPath(absPath)) {
4213
4281
  throw new LspInvalidPathError("Directory paths are not supported by this LSP tool. " + "Use lsp.diagnostics with a directory path for directory diagnostics.");
4214
4282
  }
@@ -4223,9 +4291,9 @@ async function withLspClient(filePath, fn, toolName, options = {}) {
4223
4291
  const acquireAndCall = async (allowRetry) => {
4224
4292
  const client = await manager.getClient(root, server2, options.signal);
4225
4293
  try {
4226
- return await fn(client, root);
4294
+ return await fn(client, root, absPath);
4227
4295
  } catch (err) {
4228
- if (allowRetry && READ_ONLY_RETRY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
4296
+ if (allowRetry && READ_ONLY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
4229
4297
  manager.invalidateClient(root, server2.id, client);
4230
4298
  return acquireAndCall(false);
4231
4299
  }
@@ -4391,7 +4459,7 @@ async function aggregateDiagnosticsForDirectory(directory, extension, severity,
4391
4459
  throw new LspInvalidPathError(`Extension must start with a dot (e.g., ".ts", not "${extension}"). Use ".${extension}" instead.`);
4392
4460
  }
4393
4461
  const absDir = resolve8(options.workspaceRoot ?? contextCwd(), directory);
4394
- if (!existsSync10(absDir)) {
4462
+ if (!existsSync11(absDir)) {
4395
4463
  throw new LspInvalidPathError(`Directory does not exist: ${absDir}`);
4396
4464
  }
4397
4465
  const serverResult = options.server === undefined ? findServerForExtension(extension) : { status: "found", server: options.server };
@@ -4655,7 +4723,7 @@ async function executeLspDiagnostics(params, signal) {
4655
4723
  const filePath = requireString(params, "filePath");
4656
4724
  const severity = severityFilter(params);
4657
4725
  try {
4658
- const absPath = resolvePathInsideContext(filePath);
4726
+ const absPath = resolveReadablePathInsideContext(filePath);
4659
4727
  if (isDirectoryPath(absPath)) {
4660
4728
  const extension = inferExtensionFromDirectory(absPath);
4661
4729
  if (!extension) {
@@ -4684,7 +4752,7 @@ async function executeLspDiagnostics(params, signal) {
4684
4752
  };
4685
4753
  return text(output2.output, details2);
4686
4754
  }
4687
- const result = await withLspClient(filePath, async (client) => client.diagnostics(filePath, signal), "diagnostics", clientOptions(signal));
4755
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.diagnostics(resolvedFilePath, signal), "diagnostics", clientOptions(signal));
4688
4756
  if (result.transientError) {
4689
4757
  const message = result.transientError.message;
4690
4758
  const details2 = {
@@ -4756,7 +4824,7 @@ async function executeLspGotoDefinition(params, signal) {
4756
4824
  const line = requireNumber(params, "line");
4757
4825
  const character = requireNumber(params, "character");
4758
4826
  try {
4759
- const result = await withLspClient(filePath, async (client) => client.definition(filePath, line, character, signal), "definition", clientOptions(signal));
4827
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.definition(resolvedFilePath, line, character, signal), "definition", clientOptions(signal));
4760
4828
  const locations = !result ? [] : Array.isArray(result) ? result : [result];
4761
4829
  const details = { filePath, line, character, locations };
4762
4830
  if (locations.length === 0)
@@ -4781,7 +4849,7 @@ async function executeLspFindReferences(params, signal) {
4781
4849
  const character = requireNumber(params, "character");
4782
4850
  const includeDeclaration = optionalBoolean(params, "includeDeclaration") ?? true;
4783
4851
  try {
4784
- const result = await withLspClient(filePath, async (client) => client.references(filePath, line, character, includeDeclaration, signal), "references", clientOptions(signal));
4852
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.references(resolvedFilePath, line, character, includeDeclaration, signal), "references", clientOptions(signal));
4785
4853
  const references = Array.isArray(result) ? result : [];
4786
4854
  const total = references.length;
4787
4855
  const truncated = total > DEFAULT_MAX_REFERENCES;
@@ -4821,7 +4889,7 @@ async function executeLspPrepareRename(params, signal) {
4821
4889
  const line = requireNumber(params, "line");
4822
4890
  const character = requireNumber(params, "character");
4823
4891
  try {
4824
- const result = await withLspClient(filePath, async (client) => client.prepareRename(filePath, line, character, signal), "prepareRename", clientOptions(signal));
4892
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.prepareRename(resolvedFilePath, line, character, signal), "prepareRename", clientOptions(signal));
4825
4893
  const details = { filePath, line, character, result };
4826
4894
  return text(formatPrepareRenameResult(result), details);
4827
4895
  } catch (error) {
@@ -4842,7 +4910,7 @@ async function executeLspRename(params, signal) {
4842
4910
  const character = requireNumber(params, "character");
4843
4911
  const newName = requireString(params, "newName");
4844
4912
  try {
4845
- const result = await withLspClient(filePath, async (client) => client.rename(filePath, line, character, newName, signal), "rename", clientOptions(signal));
4913
+ const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.rename(resolvedFilePath, line, character, newName, signal), "rename", clientOptions(signal));
4846
4914
  const details = { filePath, line, character, newName, apply: result.apply, edit: result.edit };
4847
4915
  return text(formatApplyResult(result.apply), details, !result.apply.success);
4848
4916
  } catch (error) {
@@ -4916,7 +4984,7 @@ async function executeLspSymbols(params, signal) {
4916
4984
  const symbols2 = await withLspClient(filePath, async (client) => client.workspaceSymbols(query, signal), "workspaceSymbols", clientOptions(signal));
4917
4985
  return formatSymbolsResult(filePath, scope, symbols2, limit, query);
4918
4986
  }
4919
- const symbols = await withLspClient(filePath, async (client) => client.documentSymbols(filePath, signal), "documentSymbols", clientOptions(signal));
4987
+ const symbols = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.documentSymbols(resolvedFilePath, signal), "documentSymbols", clientOptions(signal));
4920
4988
  return formatSymbolsResult(filePath, scope, symbols, limit);
4921
4989
  } catch (error) {
4922
4990
  const query = optionalString(params, "query");
@@ -5260,12 +5328,12 @@ function resolveDaemonRuntime2(env, defaults) {
5260
5328
  throw new InvalidRuntimeOverrideError2("paired_values_required", `${OMO_LSP_DAEMON_CLI2} and ${OMO_LSP_DAEMON_VERSION2} must be set together`);
5261
5329
  }
5262
5330
  if (!hasCliOverride || !hasVersionOverride) {
5263
- if (!isAbsolute4(defaults.cliPath)) {
5331
+ if (!isAbsolute5(defaults.cliPath)) {
5264
5332
  throw new InvalidRuntimeOverrideError2("packaged_cli_must_be_absolute", "Packaged LSP daemon CLI path must be absolute");
5265
5333
  }
5266
5334
  return { cliPath: defaults.cliPath, version: validateDaemonVersion2(defaults.version) };
5267
5335
  }
5268
- if (!isAbsolute4(cliOverride)) {
5336
+ if (!isAbsolute5(cliOverride)) {
5269
5337
  throw new InvalidRuntimeOverrideError2("cli_must_be_absolute", `${OMO_LSP_DAEMON_CLI2} must be an absolute path to an existing regular file`);
5270
5338
  }
5271
5339
  const stat = statSync5(cliOverride, { throwIfNoEntry: false });
@@ -5386,8 +5454,8 @@ function extensionKey(filePath) {
5386
5454
  }
5387
5455
  // ../../../../lsp-core/src/request-context.ts
5388
5456
  import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
5389
- import { existsSync as existsSync11, realpathSync as realpathSync4, statSync as statSync6 } from "node:fs";
5390
- import { basename as basename3, delimiter as delimiter4, dirname as dirname2, isAbsolute as isAbsolute5, join as join7, relative as relative5, resolve as resolve9 } from "node:path";
5457
+ import { existsSync as existsSync12, realpathSync as realpathSync5, statSync as statSync6 } from "node:fs";
5458
+ import { basename as basename4, delimiter as delimiter4, dirname as dirname2, isAbsolute as isAbsolute6, join as join7, relative as relative5, resolve as resolve9 } from "node:path";
5391
5459
 
5392
5460
  class LspRequestContextParseError2 extends Error {
5393
5461
  code;
@@ -5430,17 +5498,17 @@ function parseLspRequestContext2(value) {
5430
5498
  }
5431
5499
  function canonicalCwd2(cwd) {
5432
5500
  const resolved = resolve9(cwd);
5433
- if (!existsSync11(resolved) || !statSync6(resolved).isDirectory()) {
5501
+ if (!existsSync12(resolved) || !statSync6(resolved).isDirectory()) {
5434
5502
  throw new LspRequestContextParseError2("invalid_cwd", `LSP request cwd must be an existing directory: ${cwd}`);
5435
5503
  }
5436
- return realpathSync4(resolved);
5504
+ return realpathSync5(resolved);
5437
5505
  }
5438
5506
  function canonicalizeExistingOrNearestAncestor2(path2) {
5439
5507
  let current = resolve9(path2);
5440
5508
  const suffix = [];
5441
5509
  while (true) {
5442
5510
  try {
5443
- const existing = realpathSync4(current);
5511
+ const existing = realpathSync5(current);
5444
5512
  return suffix.length === 0 ? existing : join7(existing, ...suffix);
5445
5513
  } catch (error) {
5446
5514
  if (!isMissingPathError2(error))
@@ -5448,7 +5516,7 @@ function canonicalizeExistingOrNearestAncestor2(path2) {
5448
5516
  const parent = dirname2(current);
5449
5517
  if (parent === current)
5450
5518
  throw error;
5451
- suffix.unshift(basename3(current));
5519
+ suffix.unshift(basename4(current));
5452
5520
  current = parent;
5453
5521
  }
5454
5522
  }
@@ -5479,14 +5547,14 @@ function stringArrayField2(value, field) {
5479
5547
  return fieldValue;
5480
5548
  }
5481
5549
  function requireAbsolutePath2(path2, field) {
5482
- if (!isAbsolute5(path2)) {
5550
+ if (!isAbsolute6(path2)) {
5483
5551
  throw new LspRequestContextParseError2("relative_path", `LSP request context.${field} must be absolute: ${path2}`);
5484
5552
  }
5485
5553
  }
5486
5554
  function isPathInside2(parent, child) {
5487
5555
  const childPath = resolve9(child);
5488
5556
  const relativePath = relative5(parent, childPath);
5489
- return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute5(relativePath);
5557
+ return relativePath === "" || !relativePath.startsWith("..") && !isAbsolute6(relativePath);
5490
5558
  }
5491
5559
  function isMissingPathError2(error) {
5492
5560
  const code = errorCode2(error);
@@ -5509,7 +5577,7 @@ function errorCode2(error) {
5509
5577
  }
5510
5578
 
5511
5579
  // src/daemon-cli-path.ts
5512
- import { existsSync as existsSync13, readFileSync as readFileSync6 } from "node:fs";
5580
+ import { existsSync as existsSync14, readFileSync as readFileSync6 } from "node:fs";
5513
5581
  import { createRequire as createRequire2 } from "node:module";
5514
5582
  import { dirname as dirname9, join as join9 } from "node:path";
5515
5583
  import { fileURLToPath as fileURLToPath4 } from "node:url";
@@ -5533,7 +5601,7 @@ function resolveLspDaemonCli() {
5533
5601
  if (packageCli !== null)
5534
5602
  return resolveConfiguredLspDaemonCli(packageCli);
5535
5603
  const bundledCli = fileURLToPath4(new URL("../../lsp-daemon/dist/cli.js", import.meta.url));
5536
- if (existsSync13(bundledCli))
5604
+ if (existsSync14(bundledCli))
5537
5605
  return resolveConfiguredLspDaemonCli(bundledCli);
5538
5606
  return resolveConfiguredLspDaemonCli(bundledCli);
5539
5607
  }
@@ -5761,7 +5829,7 @@ function notConfiguredAvailability(details) {
5761
5829
  return typeof extension === "string" && extension.length > 0 ? { extension } : undefined;
5762
5830
  }
5763
5831
  function codexLspRequestContext(env = process.env, cwd = process.cwd()) {
5764
- const canonicalCwd3 = realpathSync6(resolve11(cwd));
5832
+ const canonicalCwd3 = realpathSync7(resolve11(cwd));
5765
5833
  const codexHome = resolve11(env["CODEX_HOME"]?.trim() || join11(homedir3(), ".codex"));
5766
5834
  return parseLspRequestContext2({
5767
5835
  cwd: canonicalCwd3,
@@ -8,7 +8,7 @@
8
8
  "type": "command",
9
9
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
10
10
  "timeout": 60,
11
- "statusMessage": "(OmO 4.19.4) Checking LSP Diagnostics"
11
+ "statusMessage": "(OmO 5.0.0-beta.10) Checking LSP Diagnostics"
12
12
  }
13
13
  ]
14
14
  }
@@ -21,7 +21,7 @@
21
21
  "type": "command",
22
22
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
23
23
  "timeout": 5,
24
- "statusMessage": "(OmO 4.19.4) Resetting LSP Diagnostics Cache"
24
+ "statusMessage": "(OmO 5.0.0-beta.10) Resetting LSP Diagnostics Cache"
25
25
  }
26
26
  ]
27
27
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-lsp",
3
- "version": "4.19.4",
3
+ "version": "5.0.0-beta.10",
4
4
  "description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -7,7 +7,7 @@
7
7
  "type": "command",
8
8
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
9
9
  "timeout": 10,
10
- "statusMessage": "(OmO 4.19.4) Loading Project Rules"
10
+ "statusMessage": "(OmO 5.0.0-beta.10) Loading Project Rules"
11
11
  }
12
12
  ]
13
13
  }
@@ -19,7 +19,7 @@
19
19
  "type": "command",
20
20
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
21
21
  "timeout": 10,
22
- "statusMessage": "(OmO 4.19.4) Loading Project Rules"
22
+ "statusMessage": "(OmO 5.0.0-beta.10) Loading Project Rules"
23
23
  }
24
24
  ]
25
25
  }
@@ -32,7 +32,7 @@
32
32
  "type": "command",
33
33
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
34
34
  "timeout": 10,
35
- "statusMessage": "(OmO 4.19.4) Matching Project Rules"
35
+ "statusMessage": "(OmO 5.0.0-beta.10) Matching Project Rules"
36
36
  }
37
37
  ]
38
38
  }
@@ -45,7 +45,7 @@
45
45
  "type": "command",
46
46
  "command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
47
47
  "timeout": 10,
48
- "statusMessage": "(OmO 4.19.4) Resetting Project Rule Cache"
48
+ "statusMessage": "(OmO 5.0.0-beta.10) Resetting Project Rule Cache"
49
49
  }
50
50
  ]
51
51
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-yeongyu/codex-rules",
3
- "version": "4.19.4",
3
+ "version": "5.0.0-beta.10",
4
4
  "description": "Codex plugin that injects project rule files into model context through lifecycle hooks.",
5
5
  "type": "module",
6
6
  "packageManager": "npm@11.12.1",
@@ -1,19 +1,22 @@
1
1
  import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
2
2
  import { tmpdir } from "node:os";
3
3
  import { join } from "node:path";
4
+ import type { RuleCandidate } from "@oh-my-opencode/rules-engine/engine";
5
+ import {
6
+ createEngine,
7
+ defaultConfig,
8
+ type EngineDeps,
9
+ resolvePluginRulesRoot,
10
+ SOURCE_PRIORITY,
11
+ } from "@oh-my-opencode/rules-engine/engine";
4
12
  import { afterEach, describe, expect, it } from "vitest";
5
-
6
13
  import { configFromEnvironment } from "../src/config.js";
7
- import { SOURCE_PRIORITY } from "@oh-my-opencode/rules-engine/engine";
8
- import { createEngine, defaultConfig, type EngineDeps } from "@oh-my-opencode/rules-engine/engine";
9
- import { resolvePluginRulesRoot } from "@oh-my-opencode/rules-engine/engine";
10
- import type { RuleCandidate } from "@oh-my-opencode/rules-engine/engine";
11
14
 
12
15
  const projectRoot = "/tmp/codex-rules-bundled-priority";
13
16
  const bundledPath = join(projectRoot, "bundled-rules", "hephaestus.md");
14
17
  const homePath = join(projectRoot, "home", ".opencode", "rules", "hephaestus.md");
15
- const bundledBody = "Bundled baseline discipline.";
16
- const homeBody = "Home baseline discipline override.";
18
+ const bundledBody = "BUNDLED_BASELINE_SENTINEL";
19
+ const homeBody = "HOME_OVERRIDE_SENTINEL";
17
20
  const tempDirectories: string[] = [];
18
21
 
19
22
  afterEach(() => {
@@ -35,14 +38,7 @@ function globalCandidate(source: "plugin-bundled" | "~/.opencode/rules", path: s
35
38
  }
36
39
 
37
40
  function ruleMarkdown(body: string): string {
38
- return [
39
- "---",
40
- "description: OMO Hephaestus baseline discipline for Codex",
41
- "alwaysApply: true",
42
- "---",
43
- "",
44
- body,
45
- ].join("\n");
41
+ return ["---", "description: Fixture", "alwaysApply: true", "---", "", body].join("\n");
46
42
  }
47
43
 
48
44
  describe("plugin bundled rule priority", () => {
@@ -85,7 +81,6 @@ describe("plugin bundled rule priority", () => {
85
81
  // then
86
82
  expect(formatted).toContain(homePath);
87
83
  expect(formatted).toContain(homeBody);
88
- expect(formatted).not.toContain(`- [hephaestus.md]{${homePath}}`);
89
84
  expect(formatted).not.toContain(bundledPath);
90
85
  expect(formatted).not.toContain(bundledBody);
91
86
  });