oh-my-opencode 4.8.0 → 4.9.0

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 (512) hide show
  1. package/dist/agents/prometheus/system-prompt.d.ts +1 -1
  2. package/dist/agents/sisyphus/claude-fable-5.d.ts +19 -0
  3. package/dist/agents/sisyphus/claude-opus-4-7.d.ts +3 -1
  4. package/dist/agents/sisyphus/claude-opus-4-8.d.ts +19 -0
  5. package/dist/agents/sisyphus/index.d.ts +4 -0
  6. package/dist/agents/types.d.ts +2 -2
  7. package/dist/cli/doctor/checks/codex.d.ts +1 -0
  8. package/dist/cli/doctor/checks/tools-gh.d.ts +8 -1
  9. package/dist/cli/doctor/index.d.ts +1 -0
  10. package/dist/cli/doctor/types.d.ts +2 -0
  11. package/dist/cli/index.js +1922 -785
  12. package/dist/cli/install-codex/codex-config-permissions.d.ts +1 -1
  13. package/dist/cli/install-codex/codex-config-plugins.d.ts +1 -0
  14. package/dist/cli/install-codex/codex-config-toml.d.ts +1 -0
  15. package/dist/cli/install-codex/codex-installer-bin-dir.d.ts +8 -0
  16. package/dist/cli/install-codex/codex-multi-agent-v2-config.d.ts +11 -0
  17. package/dist/cli/install-codex/install-codex.d.ts +1 -8
  18. package/dist/cli/install-codex/lsp-daemon-reaper.d.ts +5 -0
  19. package/dist/cli/run/runnable-agent-resolver.d.ts +11 -0
  20. package/dist/cli/sparkshell-condense.d.ts +10 -0
  21. package/dist/cli/sparkshell-parse.d.ts +3 -0
  22. package/dist/cli/sparkshell-session-context.d.ts +20 -0
  23. package/dist/cli/sparkshell-spark.d.ts +23 -0
  24. package/dist/cli/sparkshell.d.ts +8 -1
  25. package/dist/cli-node/index.js +92552 -0
  26. package/dist/config/schema/agent-names.d.ts +2 -0
  27. package/dist/config/schema/hooks.d.ts +0 -2
  28. package/dist/config/schema/keyword-detector.d.ts +0 -6
  29. package/dist/config/schema/oh-my-opencode-config.d.ts +2 -4
  30. package/dist/create-hooks.d.ts +0 -2
  31. package/dist/features/background-agent/parent-wake-dedupe.d.ts +2 -0
  32. package/dist/features/background-agent/parent-wake-flush-runner.d.ts +2 -0
  33. package/dist/features/background-agent/parent-wake-prompt-dispatch.d.ts +1 -0
  34. package/dist/features/background-agent/parent-wake-session-history.d.ts +4 -0
  35. package/dist/features/background-agent/parent-wake-session-inspector.d.ts +1 -0
  36. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
  37. package/dist/features/builtin-skills/index.d.ts +1 -1
  38. package/dist/features/builtin-skills/skills.d.ts +4 -0
  39. package/dist/features/opencode-runtime-skills/source-server.d.ts +16 -1
  40. package/dist/features/opencode-skill-loader/skill-definition-record.d.ts +2 -0
  41. package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +2 -0
  42. package/dist/features/team-mode/types.d.ts +1 -0
  43. package/dist/features/tmux-subagent/failed-readiness-cache.d.ts +28 -0
  44. package/dist/features/tmux-subagent/manager.d.ts +1 -9
  45. package/dist/features/tmux-subagent/resolve-server-url.d.ts +3 -0
  46. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +1 -1
  47. package/dist/hooks/index.d.ts +0 -1
  48. package/dist/hooks/keyword-detector/constants.d.ts +0 -4
  49. package/dist/hooks/keyword-detector/ultrawork/source-detector.d.ts +1 -1
  50. package/dist/index.js +9001 -1795
  51. package/dist/oh-my-opencode.schema.json +2 -4
  52. package/dist/plugin/chat-params.d.ts +1 -8
  53. package/dist/plugin/hooks/create-core-hooks.d.ts +0 -2
  54. package/dist/plugin/hooks/create-session-hooks.d.ts +0 -2
  55. package/dist/plugin/hooks/create-transform-hooks.d.ts +1 -2
  56. package/dist/plugin/messages-transform.d.ts +0 -1
  57. package/dist/shared/model-availability.d.ts +10 -2
  58. package/package.json +25 -18
  59. package/packages/ast-grep-mcp/dist/cli.js +2 -10
  60. package/packages/git-bash-mcp/dist/cli.js +11 -4
  61. package/packages/lsp-daemon/dist/cli.d.ts +2 -0
  62. package/packages/lsp-daemon/dist/cli.js +3711 -0
  63. package/packages/lsp-daemon/dist/daemon-client.d.ts +19 -0
  64. package/packages/lsp-daemon/dist/daemon-client.js +114 -0
  65. package/packages/lsp-daemon/dist/daemon-server.d.ts +12 -0
  66. package/packages/lsp-daemon/dist/daemon-server.js +106 -0
  67. package/packages/lsp-daemon/dist/ensure-daemon.d.ts +21 -0
  68. package/packages/lsp-daemon/dist/ensure-daemon.js +97 -0
  69. package/packages/lsp-daemon/dist/index.d.ts +5 -0
  70. package/packages/lsp-daemon/dist/index.js +3573 -0
  71. package/packages/lsp-daemon/dist/lock.d.ts +7 -0
  72. package/packages/lsp-daemon/dist/lock.js +61 -0
  73. package/packages/lsp-daemon/dist/package.json +6 -0
  74. package/packages/lsp-daemon/dist/paths.d.ts +11 -0
  75. package/packages/lsp-daemon/dist/paths.js +49 -0
  76. package/packages/lsp-daemon/dist/proxy.d.ts +10 -0
  77. package/packages/lsp-daemon/dist/proxy.js +61 -0
  78. package/packages/lsp-daemon/dist/request-routing.d.ts +9 -0
  79. package/packages/lsp-daemon/dist/request-routing.js +44 -0
  80. package/packages/lsp-daemon/dist/run-daemon.d.ts +1 -0
  81. package/packages/lsp-daemon/dist/run-daemon.js +11 -0
  82. package/packages/lsp-daemon/dist/socket-jsonrpc.d.ts +5 -0
  83. package/packages/lsp-daemon/dist/socket-jsonrpc.js +25 -0
  84. package/packages/lsp-daemon/package.json +38 -0
  85. package/packages/lsp-tools-mcp/dist/cli.js +0 -0
  86. package/packages/lsp-tools-mcp/dist/lsp/client-wrapper.js +40 -17
  87. package/packages/lsp-tools-mcp/dist/lsp/client.js +11 -9
  88. package/packages/lsp-tools-mcp/dist/lsp/config-loader.js +5 -5
  89. package/packages/lsp-tools-mcp/dist/lsp/directory-diagnostics.js +5 -3
  90. package/packages/lsp-tools-mcp/dist/lsp/effective-extension.d.ts +1 -0
  91. package/packages/lsp-tools-mcp/dist/lsp/effective-extension.js +8 -0
  92. package/packages/lsp-tools-mcp/dist/lsp/infer-extension.js +3 -2
  93. package/packages/lsp-tools-mcp/dist/lsp/language-mappings.js +1 -0
  94. package/packages/lsp-tools-mcp/dist/lsp/server-definitions.js +12 -0
  95. package/packages/lsp-tools-mcp/dist/lsp/server-install-state.d.ts +12 -0
  96. package/packages/lsp-tools-mcp/dist/lsp/server-install-state.js +51 -0
  97. package/packages/lsp-tools-mcp/dist/lsp/workspace-edit.js +2 -1
  98. package/packages/lsp-tools-mcp/dist/request-context.d.ts +7 -0
  99. package/packages/lsp-tools-mcp/dist/request-context.js +14 -0
  100. package/packages/lsp-tools-mcp/dist/tools.js +44 -1
  101. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +46 -33
  102. package/packages/omo-codex/plugin/.mcp.json +1 -1
  103. package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.d.ts +7 -0
  104. package/packages/omo-codex/plugin/components/comment-checker/dist/apply-patch.js +173 -0
  105. package/packages/omo-codex/plugin/components/comment-checker/dist/cli.d.ts +2 -0
  106. package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +10 -0
  107. package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.d.ts +22 -0
  108. package/packages/omo-codex/plugin/components/comment-checker/dist/codex-hook.js +165 -0
  109. package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.d.ts +1 -0
  110. package/packages/omo-codex/plugin/components/comment-checker/dist/core-values.js +1 -0
  111. package/packages/omo-codex/plugin/components/comment-checker/dist/core.d.ts +5 -0
  112. package/packages/omo-codex/plugin/components/comment-checker/dist/core.js +4 -0
  113. package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.d.ts +6 -0
  114. package/packages/omo-codex/plugin/components/comment-checker/dist/hook-input.js +10 -0
  115. package/packages/omo-codex/plugin/components/comment-checker/dist/record.d.ts +2 -0
  116. package/packages/omo-codex/plugin/components/comment-checker/dist/record.js +11 -0
  117. package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.d.ts +3 -0
  118. package/packages/omo-codex/plugin/components/comment-checker/dist/request-extractor.js +104 -0
  119. package/packages/omo-codex/plugin/components/comment-checker/dist/runner.d.ts +26 -0
  120. package/packages/omo-codex/plugin/components/comment-checker/dist/runner.js +144 -0
  121. package/packages/omo-codex/plugin/components/comment-checker/dist/types.d.ts +43 -0
  122. package/packages/omo-codex/plugin/components/comment-checker/dist/types.js +1 -0
  123. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  124. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  125. package/packages/omo-codex/plugin/components/git-bash/dist/cli.d.ts +2 -0
  126. package/packages/omo-codex/plugin/components/git-bash/dist/cli.js +29 -0
  127. package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.d.ts +28 -0
  128. package/packages/omo-codex/plugin/components/git-bash/dist/codex-hook.js +137 -0
  129. package/packages/omo-codex/plugin/components/git-bash/dist/index.d.ts +1 -0
  130. package/packages/omo-codex/plugin/components/git-bash/dist/index.js +1 -0
  131. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  132. package/packages/omo-codex/plugin/components/git-bash/package.json +5 -2
  133. package/packages/omo-codex/plugin/components/lsp/.mcp.json +1 -1
  134. package/packages/omo-codex/plugin/components/lsp/dist/cli.d.ts +2 -0
  135. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +42 -0
  136. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.d.ts +2 -0
  137. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +40 -0
  138. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +16 -0
  139. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +180 -0
  140. package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +12 -0
  141. package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +95 -0
  142. package/packages/omo-codex/plugin/components/lsp/dist/mutated-file-paths.d.ts +6 -0
  143. package/packages/omo-codex/plugin/components/lsp/dist/mutated-file-paths.js +79 -0
  144. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  145. package/packages/omo-codex/plugin/components/lsp/package.json +7 -7
  146. package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +68 -0
  147. package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-tools.mjs +45 -22
  148. package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
  149. package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +1 -1
  150. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +6 -2
  151. package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +4 -0
  152. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +68 -0
  153. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +8 -20
  154. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +69 -96
  155. package/packages/omo-codex/plugin/components/rules/dist/cli.d.ts +2 -0
  156. package/packages/omo-codex/plugin/components/rules/dist/cli.js +118 -0
  157. package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.d.ts +5 -0
  158. package/packages/omo-codex/plugin/components/rules/dist/codex-hook-options.js +1 -0
  159. package/packages/omo-codex/plugin/components/rules/dist/codex-hook.d.ts +47 -0
  160. package/packages/omo-codex/plugin/components/rules/dist/codex-hook.js +127 -0
  161. package/packages/omo-codex/plugin/components/rules/dist/config.d.ts +2 -0
  162. package/packages/omo-codex/plugin/components/rules/dist/config.js +100 -0
  163. package/packages/omo-codex/plugin/components/rules/dist/context-pressure.d.ts +2 -0
  164. package/packages/omo-codex/plugin/components/rules/dist/context-pressure.js +26 -0
  165. package/packages/omo-codex/plugin/components/rules/dist/debug-log.d.ts +8 -0
  166. package/packages/omo-codex/plugin/components/rules/dist/debug-log.js +36 -0
  167. package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.d.ts +7 -0
  168. package/packages/omo-codex/plugin/components/rules/dist/dynamic-target-fingerprints.js +65 -0
  169. package/packages/omo-codex/plugin/components/rules/dist/event-budget.d.ts +3 -0
  170. package/packages/omo-codex/plugin/components/rules/dist/event-budget.js +14 -0
  171. package/packages/omo-codex/plugin/components/rules/dist/hook-output.d.ts +2 -0
  172. package/packages/omo-codex/plugin/components/rules/dist/hook-output.js +24 -0
  173. package/packages/omo-codex/plugin/components/rules/dist/path-utils.d.ts +4 -0
  174. package/packages/omo-codex/plugin/components/rules/dist/path-utils.js +24 -0
  175. package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.d.ts +13 -0
  176. package/packages/omo-codex/plugin/components/rules/dist/persistent-cache.js +172 -0
  177. package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.d.ts +6 -0
  178. package/packages/omo-codex/plugin/components/rules/dist/post-compact-budget.js +74 -0
  179. package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.d.ts +4 -0
  180. package/packages/omo-codex/plugin/components/rules/dist/post-compact-claim.js +6 -0
  181. package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.d.ts +1 -0
  182. package/packages/omo-codex/plugin/components/rules/dist/post-compact-directive.js +32 -0
  183. package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.d.ts +13 -0
  184. package/packages/omo-codex/plugin/components/rules/dist/post-compact-state.js +29 -0
  185. package/packages/omo-codex/plugin/components/rules/dist/rules/cache.d.ts +9 -0
  186. package/packages/omo-codex/plugin/components/rules/dist/rules/cache.js +51 -0
  187. package/packages/omo-codex/plugin/components/rules/dist/rules/constants.d.ts +70 -0
  188. package/packages/omo-codex/plugin/components/rules/dist/rules/constants.js +101 -0
  189. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.d.ts +5 -0
  190. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-cache.js +60 -0
  191. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.d.ts +6 -0
  192. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-dynamic-loader.js +61 -0
  193. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.d.ts +7 -0
  194. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-loader.js +60 -0
  195. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.d.ts +11 -0
  196. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-paths.js +75 -0
  197. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.d.ts +6 -0
  198. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-static-loader.js +29 -0
  199. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.d.ts +44 -0
  200. package/packages/omo-codex/plugin/components/rules/dist/rules/engine-types.js +1 -0
  201. package/packages/omo-codex/plugin/components/rules/dist/rules/engine.d.ts +5 -0
  202. package/packages/omo-codex/plugin/components/rules/dist/rules/engine.js +85 -0
  203. package/packages/omo-codex/plugin/components/rules/dist/rules/errors.d.ts +6 -0
  204. package/packages/omo-codex/plugin/components/rules/dist/rules/errors.js +12 -0
  205. package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.d.ts +14 -0
  206. package/packages/omo-codex/plugin/components/rules/dist/rules/finder-cache.js +51 -0
  207. package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.d.ts +6 -0
  208. package/packages/omo-codex/plugin/components/rules/dist/rules/finder-paths.js +33 -0
  209. package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.d.ts +5 -0
  210. package/packages/omo-codex/plugin/components/rules/dist/rules/finder-sources.js +40 -0
  211. package/packages/omo-codex/plugin/components/rules/dist/rules/finder.d.ts +28 -0
  212. package/packages/omo-codex/plugin/components/rules/dist/rules/finder.js +146 -0
  213. package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.d.ts +7 -0
  214. package/packages/omo-codex/plugin/components/rules/dist/rules/formatter.js +112 -0
  215. package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.d.ts +18 -0
  216. package/packages/omo-codex/plugin/components/rules/dist/rules/matcher.js +93 -0
  217. package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.d.ts +3 -0
  218. package/packages/omo-codex/plugin/components/rules/dist/rules/ordering.js +27 -0
  219. package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.d.ts +7 -0
  220. package/packages/omo-codex/plugin/components/rules/dist/rules/parser-frontmatter.js +30 -0
  221. package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.d.ts +2 -0
  222. package/packages/omo-codex/plugin/components/rules/dist/rules/parser-yaml.js +237 -0
  223. package/packages/omo-codex/plugin/components/rules/dist/rules/parser.d.ts +3 -0
  224. package/packages/omo-codex/plugin/components/rules/dist/rules/parser.js +31 -0
  225. package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.d.ts +1 -0
  226. package/packages/omo-codex/plugin/components/rules/dist/rules/plugin-root.js +48 -0
  227. package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.d.ts +1 -0
  228. package/packages/omo-codex/plugin/components/rules/dist/rules/project-root.js +23 -0
  229. package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.d.ts +14 -0
  230. package/packages/omo-codex/plugin/components/rules/dist/rules/scanner.js +111 -0
  231. package/packages/omo-codex/plugin/components/rules/dist/rules/sources.d.ts +3 -0
  232. package/packages/omo-codex/plugin/components/rules/dist/rules/sources.js +9 -0
  233. package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.d.ts +18 -0
  234. package/packages/omo-codex/plugin/components/rules/dist/rules/truncator.js +59 -0
  235. package/packages/omo-codex/plugin/components/rules/dist/rules/types.d.ts +126 -0
  236. package/packages/omo-codex/plugin/components/rules/dist/rules/types.js +8 -0
  237. package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.d.ts +6 -0
  238. package/packages/omo-codex/plugin/components/rules/dist/rules-engine-factory.js +20 -0
  239. package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.d.ts +3 -0
  240. package/packages/omo-codex/plugin/components/rules/dist/session-state-lock.js +41 -0
  241. package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.d.ts +10 -0
  242. package/packages/omo-codex/plugin/components/rules/dist/sparkshell-awareness.js +90 -0
  243. package/packages/omo-codex/plugin/components/rules/dist/static-injection.d.ts +3 -0
  244. package/packages/omo-codex/plugin/components/rules/dist/static-injection.js +128 -0
  245. package/packages/omo-codex/plugin/components/rules/dist/tool-paths.d.ts +6 -0
  246. package/packages/omo-codex/plugin/components/rules/dist/tool-paths.js +168 -0
  247. package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.d.ts +4 -0
  248. package/packages/omo-codex/plugin/components/rules/dist/transcript-rule-filter.js +49 -0
  249. package/packages/omo-codex/plugin/components/rules/dist/transcript-search.d.ts +4 -0
  250. package/packages/omo-codex/plugin/components/rules/dist/transcript-search.js +91 -0
  251. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  252. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  253. package/packages/omo-codex/plugin/components/rules/src/codex-hook.ts +4 -2
  254. package/packages/omo-codex/plugin/components/rules/src/config.ts +13 -0
  255. package/packages/omo-codex/plugin/components/rules/src/event-budget.ts +17 -0
  256. package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +4 -1
  257. package/packages/omo-codex/plugin/components/rules/src/post-compact-directive.ts +39 -0
  258. package/packages/omo-codex/plugin/components/rules/src/rules/constants.ts +16 -0
  259. package/packages/omo-codex/plugin/components/rules/src/rules/engine.ts +8 -0
  260. package/packages/omo-codex/plugin/components/rules/src/rules/formatter.ts +7 -8
  261. package/packages/omo-codex/plugin/components/rules/src/rules/truncator.ts +17 -0
  262. package/packages/omo-codex/plugin/components/rules/src/rules/types.ts +4 -0
  263. package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +53 -4
  264. package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +127 -7
  265. package/packages/omo-codex/plugin/components/rules/src/transcript-rule-filter.ts +9 -1
  266. package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +4 -2
  267. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +7 -2
  268. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +9 -9
  269. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +10 -4
  270. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +241 -0
  271. package/packages/omo-codex/plugin/components/rules/test/event-budget.test.ts +168 -0
  272. package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +20 -0
  273. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +4 -0
  274. package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +86 -3
  275. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +15 -15
  276. package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.d.ts +16 -0
  277. package/packages/omo-codex/plugin/components/start-work-continuation/dist/boulder-reader.js +146 -0
  278. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.d.ts +2 -0
  279. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +49 -0
  280. package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.d.ts +2 -0
  281. package/packages/omo-codex/plugin/components/start-work-continuation/dist/codex-hook.js +80 -0
  282. package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.d.ts +1 -0
  283. package/packages/omo-codex/plugin/components/start-work-continuation/dist/directive.js +2 -0
  284. package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.d.ts +5 -0
  285. package/packages/omo-codex/plugin/components/start-work-continuation/dist/index.js +3 -0
  286. package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.d.ts +20 -0
  287. package/packages/omo-codex/plugin/components/start-work-continuation/dist/types.js +1 -0
  288. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  289. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  290. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +24 -2
  291. package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.d.ts +1 -0
  292. package/packages/omo-codex/plugin/components/telemetry/dist/atomic-write.js +18 -0
  293. package/packages/omo-codex/plugin/components/telemetry/dist/cli.d.ts +2 -0
  294. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +62 -0
  295. package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.d.ts +15 -0
  296. package/packages/omo-codex/plugin/components/telemetry/dist/codex-hook.js +42 -0
  297. package/packages/omo-codex/plugin/components/telemetry/dist/data-path.d.ts +10 -0
  298. package/packages/omo-codex/plugin/components/telemetry/dist/data-path.js +35 -0
  299. package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.d.ts +12 -0
  300. package/packages/omo-codex/plugin/components/telemetry/dist/diagnostics.js +108 -0
  301. package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.d.ts +4 -0
  302. package/packages/omo-codex/plugin/components/telemetry/dist/env-flags.js +31 -0
  303. package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.d.ts +8 -0
  304. package/packages/omo-codex/plugin/components/telemetry/dist/posthog-activity-state.js +68 -0
  305. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.d.ts +21 -0
  306. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +133 -0
  307. package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.d.ts +8 -0
  308. package/packages/omo-codex/plugin/components/telemetry/dist/product-identity.js +29 -0
  309. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  310. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  311. package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +5 -13
  312. package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +61 -185
  313. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
  314. package/packages/omo-codex/plugin/components/ultrawork/directive.md +122 -117
  315. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.d.ts +2 -0
  316. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +48 -0
  317. package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.d.ts +7 -0
  318. package/packages/omo-codex/plugin/components/ultrawork/dist/codex-hook.js +122 -0
  319. package/packages/omo-codex/plugin/components/ultrawork/dist/directive.d.ts +1 -0
  320. package/packages/omo-codex/plugin/components/ultrawork/dist/directive.js +2 -0
  321. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  322. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  323. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +20 -11
  324. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +17 -11
  325. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +2 -5
  326. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -71
  327. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.d.ts +16 -0
  328. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +200 -0
  329. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.d.ts +17 -0
  330. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +97 -0
  331. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.d.ts +4 -0
  332. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +183 -0
  333. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +6 -0
  334. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +55 -0
  335. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +12 -0
  336. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +145 -0
  337. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.d.ts +2 -0
  338. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +39 -0
  339. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.d.ts +13 -0
  340. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +100 -0
  341. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +26 -0
  342. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +97 -0
  343. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +28 -0
  344. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +145 -0
  345. package/packages/omo-codex/plugin/components/ulw-loop/dist/command-types.d.ts +34 -0
  346. package/packages/omo-codex/plugin/components/ulw-loop/dist/command-types.js +1 -0
  347. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +16 -0
  348. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +41 -0
  349. package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +95 -0
  350. package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.js +1 -0
  351. package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.d.ts +31 -0
  352. package/packages/omo-codex/plugin/components/ulw-loop/dist/evidence.js +119 -0
  353. package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +12 -0
  354. package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +69 -0
  355. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +16 -0
  356. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +59 -0
  357. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +48 -0
  358. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +119 -0
  359. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +8 -0
  360. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +89 -0
  361. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +6 -0
  362. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +123 -0
  363. package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.d.ts +16 -0
  364. package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +70 -0
  365. package/packages/omo-codex/plugin/components/ulw-loop/dist/runtime.d.ts +10 -0
  366. package/packages/omo-codex/plugin/components/ulw-loop/dist/runtime.js +13 -0
  367. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +63 -0
  368. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.js +1 -0
  369. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.d.ts +6 -0
  370. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +292 -0
  371. package/packages/omo-codex/plugin/components/ulw-loop/dist/types.d.ts +5 -0
  372. package/packages/omo-codex/plugin/components/ulw-loop/dist/types.js +5 -0
  373. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
  374. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  375. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +14 -14
  376. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +24 -25
  377. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +17 -3
  378. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +2 -1
  379. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -1
  380. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +95 -0
  381. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +0 -96
  382. package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +23 -0
  383. package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +46 -0
  384. package/packages/omo-codex/plugin/hooks/hooks.json +16 -16
  385. package/packages/omo-codex/plugin/package-lock.json +10 -9
  386. package/packages/omo-codex/plugin/package.json +27 -26
  387. package/packages/omo-codex/plugin/scripts/auto-update.mjs +64 -15
  388. package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +16 -0
  389. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +104 -0
  390. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +23 -6
  391. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +23 -11
  392. package/packages/omo-codex/plugin/scripts/sync-version.mjs +94 -0
  393. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +9 -9
  394. package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +16 -1
  395. package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +93 -0
  396. package/packages/omo-codex/plugin/skills/lcx-doctor/agents/openai.yaml +11 -0
  397. package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +17 -13
  398. package/packages/omo-codex/plugin/skills/lsp-setup/SKILL.md +139 -0
  399. package/packages/omo-codex/plugin/skills/lsp-setup/references/bash/README.md +60 -0
  400. package/packages/omo-codex/plugin/skills/lsp-setup/references/c-cpp/README.md +61 -0
  401. package/packages/omo-codex/plugin/skills/lsp-setup/references/csharp/README.md +71 -0
  402. package/packages/omo-codex/plugin/skills/lsp-setup/references/dart/README.md +48 -0
  403. package/packages/omo-codex/plugin/skills/lsp-setup/references/elixir/README.md +51 -0
  404. package/packages/omo-codex/plugin/skills/lsp-setup/references/go/README.md +57 -0
  405. package/packages/omo-codex/plugin/skills/lsp-setup/references/haskell/README.md +57 -0
  406. package/packages/omo-codex/plugin/skills/lsp-setup/references/java/README.md +57 -0
  407. package/packages/omo-codex/plugin/skills/lsp-setup/references/julia/README.md +60 -0
  408. package/packages/omo-codex/plugin/skills/lsp-setup/references/kotlin/README.md +59 -0
  409. package/packages/omo-codex/plugin/skills/lsp-setup/references/lua/README.md +66 -0
  410. package/packages/omo-codex/plugin/skills/lsp-setup/references/php/README.md +62 -0
  411. package/packages/omo-codex/plugin/skills/lsp-setup/references/python/README.md +71 -0
  412. package/packages/omo-codex/plugin/skills/lsp-setup/references/ruby/README.md +53 -0
  413. package/packages/omo-codex/plugin/skills/lsp-setup/references/rust/README.md +59 -0
  414. package/packages/omo-codex/plugin/skills/lsp-setup/references/swift/README.md +51 -0
  415. package/packages/omo-codex/plugin/skills/lsp-setup/references/terraform/README.md +62 -0
  416. package/packages/omo-codex/plugin/skills/lsp-setup/references/typescript/README.md +77 -0
  417. package/packages/omo-codex/plugin/skills/lsp-setup/references/yaml/README.md +70 -0
  418. package/packages/omo-codex/plugin/skills/lsp-setup/references/zig/README.md +49 -0
  419. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
  420. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
  421. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/tsconfig.json +17 -0
  422. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
  423. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +9 -9
  424. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +10 -10
  425. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +20 -22
  426. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +38 -61
  427. package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +135 -677
  428. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -14
  429. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +24 -25
  430. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +20 -11
  431. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +17 -11
  432. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +9 -9
  433. package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +2 -1
  434. package/packages/omo-codex/plugin/test/aggregate-mcp.test.mjs +1 -1
  435. package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +5 -5
  436. package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +6 -6
  437. package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +194 -0
  438. package/packages/omo-codex/plugin/test/auto-update.test.mjs +17 -0
  439. package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +15 -44
  440. package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +140 -0
  441. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +261 -0
  442. package/packages/omo-codex/plugin/test/start-work-skill.test.mjs +9 -31
  443. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +68 -4
  444. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +119 -0
  445. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +11 -112
  446. package/packages/omo-codex/plugin/test/sync-version.test.mjs +68 -0
  447. package/packages/omo-codex/plugin/test/ultraresearch-skill-contract.test.mjs +126 -0
  448. package/packages/omo-codex/plugin/test/ulw-plan-skill.test.mjs +2 -2
  449. package/packages/omo-codex/scripts/install/bin-dir.mjs +20 -0
  450. package/packages/omo-codex/scripts/install/bin-links.mjs +43 -6
  451. package/packages/omo-codex/scripts/install/cache.mjs +4 -0
  452. package/packages/omo-codex/scripts/install/config.mjs +5 -3
  453. package/packages/omo-codex/scripts/install/delegated-command.mjs +5 -1
  454. package/packages/omo-codex/scripts/install/git-bash-mcp-env.mjs +28 -0
  455. package/packages/omo-codex/scripts/install/git-bash.mjs +12 -4
  456. package/packages/omo-codex/scripts/install/git-bash.test.mjs +39 -4
  457. package/packages/omo-codex/scripts/install/hook-targets.mjs +46 -0
  458. package/packages/omo-codex/scripts/install/multi-agent-v2-config.mjs +22 -10
  459. package/packages/omo-codex/scripts/install/process.mjs +1 -0
  460. package/packages/omo-codex/scripts/install-bin-links.test.mjs +131 -3
  461. package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +91 -0
  462. package/packages/omo-codex/scripts/install-config.test.mjs +50 -44
  463. package/packages/omo-codex/scripts/install-delegated-command.test.mjs +78 -0
  464. package/packages/omo-codex/scripts/install-git-bash-mcp-env.test.mjs +93 -0
  465. package/packages/omo-codex/scripts/install-hook-targets.test.mjs +100 -0
  466. package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +3 -1
  467. package/packages/omo-codex/scripts/install-local.mjs +7 -18
  468. package/packages/omo-codex/scripts/install-local.test.mjs +34 -1
  469. package/packages/shared-skills/skills/lcx-contribute-bug-fix/SKILL.md +16 -1
  470. package/packages/shared-skills/skills/lcx-doctor/SKILL.md +93 -0
  471. package/packages/shared-skills/skills/lcx-doctor/agents/openai.yaml +11 -0
  472. package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +17 -13
  473. package/packages/shared-skills/skills/lsp-setup/SKILL.md +139 -0
  474. package/packages/shared-skills/skills/lsp-setup/references/bash/README.md +60 -0
  475. package/packages/shared-skills/skills/lsp-setup/references/c-cpp/README.md +61 -0
  476. package/packages/shared-skills/skills/lsp-setup/references/csharp/README.md +71 -0
  477. package/packages/shared-skills/skills/lsp-setup/references/dart/README.md +48 -0
  478. package/packages/shared-skills/skills/lsp-setup/references/elixir/README.md +51 -0
  479. package/packages/shared-skills/skills/lsp-setup/references/go/README.md +57 -0
  480. package/packages/shared-skills/skills/lsp-setup/references/haskell/README.md +57 -0
  481. package/packages/shared-skills/skills/lsp-setup/references/java/README.md +57 -0
  482. package/packages/shared-skills/skills/lsp-setup/references/julia/README.md +60 -0
  483. package/packages/shared-skills/skills/lsp-setup/references/kotlin/README.md +59 -0
  484. package/packages/shared-skills/skills/lsp-setup/references/lua/README.md +66 -0
  485. package/packages/shared-skills/skills/lsp-setup/references/php/README.md +62 -0
  486. package/packages/shared-skills/skills/lsp-setup/references/python/README.md +71 -0
  487. package/packages/shared-skills/skills/lsp-setup/references/ruby/README.md +53 -0
  488. package/packages/shared-skills/skills/lsp-setup/references/rust/README.md +59 -0
  489. package/packages/shared-skills/skills/lsp-setup/references/swift/README.md +51 -0
  490. package/packages/shared-skills/skills/lsp-setup/references/terraform/README.md +62 -0
  491. package/packages/shared-skills/skills/lsp-setup/references/typescript/README.md +77 -0
  492. package/packages/shared-skills/skills/lsp-setup/references/yaml/README.md +70 -0
  493. package/packages/shared-skills/skills/lsp-setup/references/zig/README.md +49 -0
  494. package/packages/shared-skills/skills/lsp-setup/scripts/detect-lsp.ts +210 -0
  495. package/packages/shared-skills/skills/lsp-setup/scripts/lsp-server-table.ts +177 -0
  496. package/packages/shared-skills/skills/lsp-setup/scripts/tsconfig.json +17 -0
  497. package/packages/shared-skills/skills/lsp-setup/scripts/verify-lsp.ts +147 -0
  498. package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +1 -1
  499. package/packages/shared-skills/skills/review-work/SKILL.md +10 -14
  500. package/packages/shared-skills/skills/start-work/SKILL.md +30 -59
  501. package/packages/shared-skills/skills/ultraresearch/SKILL.md +126 -667
  502. package/dist/hooks/anthropic-effort/hook.d.ts +0 -26
  503. package/dist/hooks/anthropic-effort/index.d.ts +0 -1
  504. package/dist/hooks/keyword-detector/analyze/default.d.ts +0 -12
  505. package/dist/hooks/keyword-detector/analyze/index.d.ts +0 -1
  506. package/dist/hooks/keyword-detector/search/default.d.ts +0 -12
  507. package/dist/hooks/keyword-detector/search/index.d.ts +0 -1
  508. package/dist/hooks/thinking-block-validator/hook.d.ts +0 -12
  509. package/dist/hooks/thinking-block-validator/index.d.ts +0 -1
  510. package/packages/omo-codex/plugin/components/ultrawork/test/directive-contract.test.ts +0 -18
  511. package/packages/omo-codex/plugin/test/global-review-debug-gate.test.mjs +0 -29
  512. package/packages/omo-codex/plugin/test/subagent-guidance.test.mjs +0 -151
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env node
2
+ import { readdir, readFile, writeFile } from "node:fs/promises";
3
+ import { dirname, join } from "node:path";
4
+ import { fileURLToPath, pathToFileURL } from "node:url";
5
+
6
+ const scriptDir = dirname(fileURLToPath(import.meta.url));
7
+ const defaultPluginRoot = dirname(scriptDir);
8
+ const defaultRepoRoot = join(defaultPluginRoot, "..", "..", "..");
9
+
10
+ async function readJson(path) {
11
+ return JSON.parse(await readFile(path, "utf8"));
12
+ }
13
+
14
+ async function writeJson(path, value) {
15
+ await writeFile(path, `${JSON.stringify(value, null, "\t")}\n`);
16
+ }
17
+
18
+ function normalizeVersion(version) {
19
+ if (typeof version !== "string") return "";
20
+ return version.trim();
21
+ }
22
+
23
+ export async function resolveAuthoritativeVersion(options = {}) {
24
+ const env = options.env ?? process.env;
25
+ const explicit = normalizeVersion(options.version ?? env.LAZYCODEX_RELEASE_VERSION);
26
+ if (explicit.length > 0) return explicit;
27
+
28
+ const repoRoot = options.repoRoot ?? defaultRepoRoot;
29
+ const rootVersion = normalizeVersion((await readJson(join(repoRoot, "package.json"))).version);
30
+ if (rootVersion.length === 0) {
31
+ throw new Error(`Cannot resolve authoritative version: ${join(repoRoot, "package.json")} has no version`);
32
+ }
33
+ return rootVersion;
34
+ }
35
+
36
+ async function stampJsonVersion(path, version) {
37
+ let parsed;
38
+ try {
39
+ parsed = await readJson(path);
40
+ } catch (error) {
41
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return false;
42
+ throw error;
43
+ }
44
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return false;
45
+ if (!("version" in parsed)) return false;
46
+ if (parsed.version === version) return false;
47
+ parsed.version = version;
48
+ await writeJson(path, parsed);
49
+ return true;
50
+ }
51
+
52
+ async function collectComponentManifests(pluginRoot) {
53
+ const componentsRoot = join(pluginRoot, "components");
54
+ let entries;
55
+ try {
56
+ entries = await readdir(componentsRoot, { withFileTypes: true });
57
+ } catch (error) {
58
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return [];
59
+ throw error;
60
+ }
61
+ const manifests = [];
62
+ for (const entry of entries) {
63
+ if (!entry.isDirectory()) continue;
64
+ manifests.push(join(componentsRoot, entry.name, "package.json"));
65
+ }
66
+ return manifests;
67
+ }
68
+
69
+ export function manifestTargets(pluginRoot, componentManifests) {
70
+ const omoCodexRoot = dirname(pluginRoot);
71
+ return [
72
+ join(omoCodexRoot, "package.json"),
73
+ join(pluginRoot, "package.json"),
74
+ join(pluginRoot, ".codex-plugin", "plugin.json"),
75
+ ...componentManifests,
76
+ ];
77
+ }
78
+
79
+ export async function syncVersion(options = {}) {
80
+ const pluginRoot = options.pluginRoot ?? defaultPluginRoot;
81
+ const version = options.version ?? (await resolveAuthoritativeVersion({ ...options, version: undefined }));
82
+ const componentManifests = await collectComponentManifests(pluginRoot);
83
+ const targets = manifestTargets(pluginRoot, componentManifests);
84
+ const changed = [];
85
+ for (const target of targets) {
86
+ if (await stampJsonVersion(target, version)) changed.push(target);
87
+ }
88
+ return { version, targets, changed };
89
+ }
90
+
91
+ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
92
+ const result = await syncVersion();
93
+ console.log(`Synced OMO Codex manifests to version ${result.version} (${result.changed.length} updated)`);
94
+ }
@@ -8,17 +8,17 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
8
8
 
9
9
  | OpenCode example | Codex tool to use |
10
10
  | --- | --- |
11
- | `call_omo_agent(subagent_type="explore", ...)` | `spawn_agent({"task_name":"...","message":"TASK: act as an explorer. ...","fork_turns":"none"})` |
12
- | `call_omo_agent(subagent_type="librarian", ...)` | `spawn_agent({"task_name":"...","message":"TASK: act as a librarian. ...","fork_turns":"none"})` |
13
- | `task(subagent_type="plan", ...)` | `spawn_agent({"task_name":"...","message":"TASK: act as a planning agent. ...","fork_turns":"none"})` |
14
- | `task(subagent_type="oracle", ...)` for final verification | `spawn_agent({"task_name":"...","message":"TASK: act as a rigorous reviewer. ...","fork_turns":"none"})` |
15
- | `task(category="...", ...)` for implementation or QA | `spawn_agent({"task_name":"...","message":"TASK: act as an implementation or QA worker. ...","fork_turns":"none"})` |
16
- | `background_output(task_id="...")` | `wait_agent(...)` for mailbox signals; after a timeout, run one `list_agents` check for the named child if reassurance is needed |
17
- | `team_*(...)` | Use Codex native subagents plus `send_message`, `followup_task`, `wait_agent`, and `close_agent` |
11
+ | `call_omo_agent(subagent_type="explore", ...)` | `multi_agent_v1.spawn_agent({"message":"TASK: act as an explorer. ...","agent_type":"explorer","fork_context":false})` |
12
+ | `call_omo_agent(subagent_type="librarian", ...)` | `multi_agent_v1.spawn_agent({"message":"TASK: act as a librarian. ...","agent_type":"librarian","fork_context":false})` |
13
+ | `task(subagent_type="plan", ...)` | `multi_agent_v1.spawn_agent({"message":"TASK: act as a planning agent. ...","agent_type":"plan","fork_context":false})` |
14
+ | `task(subagent_type="oracle", ...)` for final verification | `multi_agent_v1.spawn_agent({"message":"TASK: act as a rigorous reviewer. ...","agent_type":"codex-ultrawork-reviewer","fork_context":false})` |
15
+ | `task(category="...", ...)` for implementation or QA | `multi_agent_v1.spawn_agent({"message":"TASK: act as an implementation or QA worker. ...","fork_context":false})` |
16
+ | `background_output(task_id="...")` | `multi_agent_v1.wait_agent(...)` for mailbox signals |
17
+ | `team_*(...)` | Use Codex native subagents via `multi_agent_v1.spawn_agent`, `multi_agent_v1.send_input`, `multi_agent_v1.wait_agent`, and `multi_agent_v1.close_agent` |
18
18
 
19
- Codex full-history forks inherit parent context, so role-specific behavior must be described in a self-contained `message` and usually should use a non-full-history fork mode such as `fork_turns="none"`. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
19
+ Role-specific behavior must be described in a self-contained `message`. Use `fork_context: false` to start the child with only the initial prompt (no parent history); use `fork_context: true` only when full parent history is truly required. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. OMO installs these selectable agent roles into `~/.codex/agents/`: `explorer`, `librarian`, `plan`, `momus`, `metis`, and `codex-ultrawork-reviewer` — pass the matching name as `agent_type` so the child gets that role's model and instructions. On `multi_agent_v2` sessions the same `agent_type` applies (the OMO installer exposes it) with `fork_turns` instead of `fork_context`. If the spawn tool exposes no `agent_type` parameter, omit it and describe the role inside `message`. If a code block below conflicts with this section, this section wins.
20
20
 
21
- For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `wait_agent` timeout only means no new mailbox update arrived. Treat a running child or latest `WORKING:` message as alive. Do not use `list_agents` as a polling loop. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
21
+ For work likely to exceed one wait cycle, require the child to send `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent` timeout only means no new mailbox update arrived. Treat a running child as alive. Fallback only when the child is completed without the deliverable, ack-only after followup, explicitly `BLOCKED:`, or no longer running.
22
22
 
23
23
  # /init-deep
24
24
 
@@ -30,7 +30,22 @@ Create a PR that includes:
30
30
 
31
31
  1. Read the user's bug report and identify the affected surface.
32
32
  2. Invoke `$omo:debugging` for the investigation. If only unqualified skill names are exposed, invoke `$debugging` and state that it is the OMO debugging skill.
33
- 3. Decide the target repository. If ownership is close, compare against upstream Codex source under `/tmp/openai-codex-source` before choosing.
33
+ 3. Materialize the latest sources, then decide the target repository. Sync both checkouts on every run and compare them before choosing a stale checkout routes the fix to the wrong repo:
34
+
35
+ ```bash
36
+ sync_latest_source() {
37
+ REPO="$1"; DEST="$2"
38
+ if [ ! -d "$DEST/.git" ]; then
39
+ gh repo clone "$REPO" "$DEST" -- --depth=1 \
40
+ || git clone --depth=1 "https://github.com/$REPO" "$DEST"
41
+ fi
42
+ DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
43
+ git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
44
+ git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
45
+ }
46
+ sync_latest_source code-yeongyu/lazycodex /tmp/lazycodex-source
47
+ sync_latest_source openai/codex /tmp/openai-codex-source
48
+ ```
34
49
  4. Create a fresh temporary clone and branch. Do not modify the user's current repository for the target fix unless the current repository is itself the requested target and the user explicitly asked for local edits.
35
50
 
36
51
  ```bash
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: lcx-doctor
3
+ description: "Diagnose LazyCodex and Codex CLI installation health against the latest sources. Use whenever the user asks for a doctor or health check, says LazyCodex, lazycodex-ai, omo-codex, or Codex behaves oddly after an install, update, or config change, suspects a stale, drifted, or broken setup, or wants the local install audited and compared with the latest LazyCodex and Codex code."
4
+ metadata:
5
+ short-description: Diagnose LazyCodex/Codex install health against latest sources
6
+ ---
7
+
8
+ # lcx-doctor
9
+
10
+ You are a LazyCodex install doctor. Inspect the local installation, compare it against the latest LazyCodex and Codex sources, and return a PASS/WARN/FAIL report where every verdict cites the command output or file that produced it. Diagnose only: the only writes you make are under `/tmp`. Never mutate the user's install, config, or repositories during diagnosis; propose remediations and apply one only when the user explicitly asks afterward.
11
+
12
+ Use GPT-5.5 style: outcome first, concise, evidence-bound.
13
+
14
+ ## Required Workflow
15
+
16
+ 1. Materialize the latest sources under `/tmp` first. Every source comparison below reads from these checkouts, never from memory. Re-sync on every run so a cached checkout cannot go stale:
17
+
18
+ ```bash
19
+ sync_latest_source() {
20
+ REPO="$1"; DEST="$2"
21
+ if [ ! -d "$DEST/.git" ]; then
22
+ gh repo clone "$REPO" "$DEST" -- --depth=1 \
23
+ || git clone --depth=1 "https://github.com/$REPO" "$DEST"
24
+ fi
25
+ DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
26
+ git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
27
+ git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
28
+ }
29
+ sync_latest_source code-yeongyu/lazycodex /tmp/lazycodex-source
30
+ sync_latest_source openai/codex /tmp/openai-codex-source
31
+ ```
32
+
33
+ 2. Inventory the installed surface. Resolve `CODEX_HOME` (default `~/.codex`), then collect:
34
+ - `codex --version` and how `codex` resolves (`command -v codex`).
35
+ - Installed LazyCodex version: the `version` in the installed plugin manifest, discoverable with `find "${CODEX_HOME:-$HOME/.codex}/plugins" -path '*/.codex-plugin/plugin.json'`. Installed plugins live under `$CODEX_HOME/plugins/cache/<marketplace>/<name>/<version>/`.
36
+ - Latest LazyCodex version from `/tmp/lazycodex-source` (release tags or the version stamped in the repo) and latest Codex release (`gh release view --repo openai/codex`).
37
+ - OS, install method, and `lazycodex` / `lazycodex-ai` bin links resolving (`command -v`).
38
+ 3. Check config and wiring against the latest installer, not against assumptions. Read what the current installer under `/tmp/lazycodex-source` writes (installer sources live in the omo-codex package, e.g. `scripts/install/`), then verify the local equivalents:
39
+ - `$CODEX_HOME/config.toml` exists and parses; LazyCodex-managed entries match what the latest installer would write.
40
+ - Plugin payload present and non-empty: `hooks/hooks.json`, `skills/`, `.mcp.json`, components under the installed plugin root.
41
+ - Stale project-local leftovers the installer now removes (e.g. `.codex/hooks.json`, `.codex/skills` in the project) are flagged, not deleted.
42
+ 4. Probe the real surface. Run the built-in diagnostics first: `lazycodex doctor --json` (add `--verbose` when a check needs deeper traces) and fold its results into the report. A missing or crashing `lazycodex doctor` is itself a FAIL finding, not a reason to skip probing — fall back to `codex --version` plus a trivial non-interactive invocation that loads the plugin. Capture stderr verbatim; a clean exit with warnings is WARN, not PASS.
43
+ 5. Compare for drift. Where installed bundled files differ from the same files at the installed version, or the latest source renamed or removed something the local config still references, record it with both paths.
44
+ 6. Check whether each FAIL is already known: `gh issue list --repo code-yeongyu/lazycodex --search "<short symptom>" --state open` (and `openai/codex` when the failure points upstream). Link matches in the report instead of re-diagnosing from scratch.
45
+ 7. If a probe fails and the cause is not explained by config or source comparison, invoke `$omo:debugging` for the investigation. If Codex exposes only unqualified skill names in the current session, invoke `$debugging` and state that it is the OMO debugging skill.
46
+ 8. Emit the report.
47
+
48
+ ## Doctor Report Template
49
+
50
+ ```markdown
51
+ ## LazyCodex Doctor Report
52
+
53
+ ### Summary
54
+ [One sentence: healthy, degraded, or broken — and the single most important next action.]
55
+
56
+ ### Environment
57
+ - LazyCodex installed / latest:
58
+ - Codex CLI installed / latest:
59
+ - CODEX_HOME:
60
+ - OS / install method:
61
+
62
+ ### Checks
63
+ | Check | Verdict | Evidence |
64
+ | --- | --- | --- |
65
+ | Versions current | PASS/WARN/FAIL | [command output or file:line] |
66
+ | config.toml integrity | PASS/WARN/FAIL | [evidence] |
67
+ | Plugin payload wiring | PASS/WARN/FAIL | [evidence] |
68
+ | Bin links / aliases | PASS/WARN/FAIL | [evidence] |
69
+ | Runtime probe | PASS/WARN/FAIL | [evidence] |
70
+ | Drift vs latest source | PASS/WARN/FAIL | [evidence, citing /tmp/lazycodex-source or /tmp/openai-codex-source paths] |
71
+
72
+ ### Remediations
73
+ 1. [Most important fix first: exact command or config edit, and what it resolves.]
74
+
75
+ ### Known Issues Matched
76
+ - [issue URL — or "none found"]
77
+ ```
78
+
79
+ ## Follow-up Routing
80
+
81
+ - Local misconfiguration or stale install: give the remediation; reinstalling via the standard LazyCodex install command is the default fix for payload drift.
82
+ - Defect in LazyCodex or Codex product code: recommend `$lcx-report-bug` to file it, or `$lcx-contribute-bug-fix` when the user wants a fix PR. Both reuse the `/tmp` checkouts you already synced.
83
+
84
+ ## Stop Conditions
85
+
86
+ Ask one narrow question only when a finding requires a destructive decision, such as deleting user-edited config or downgrading a version.
87
+
88
+ Do not:
89
+
90
+ - mutate config, installs, or repositories during diagnosis
91
+ - report a verdict without captured evidence
92
+ - compare against remembered source layout instead of `/tmp/lazycodex-source` and `/tmp/openai-codex-source`
93
+ - declare healthy while any probe output was never captured
@@ -0,0 +1,11 @@
1
+ interface:
2
+ display_name: "lcx-doctor (omo)"
3
+ short_description: "Diagnose LazyCodex/Codex install health against latest sources"
4
+ search_terms:
5
+ - "lcx-doctor"
6
+ - "lazycodex doctor"
7
+ - "lazycodex health check"
8
+ - "codex doctor"
9
+ - "lazycodex install broken"
10
+ - "omo-codex diagnose"
11
+ default_prompt: "Use $lcx-doctor to sync the latest LazyCodex and Codex sources into /tmp, inventory the local installation, compare versions, config, and wiring against the latest sources, probe the real surface, and report PASS/WARN/FAIL findings with evidence and remediations."
@@ -33,24 +33,28 @@ Create or prepare a GitHub issue or PR that includes:
33
33
 
34
34
  1. Read the user's bug report and identify the affected surface: LazyCodex installer, Codex plugin, skill, hook, MCP, CLI alias, GitHub marketplace sync, or web/docs.
35
35
  2. Invoke `$omo:debugging` for the investigation. If Codex exposes only unqualified skill names in the current session, invoke `$debugging` and state that it is the OMO debugging skill.
36
- 3. Materialize upstream Codex source under `/tmp` before deciding ownership:
36
+ 3. Materialize the latest LazyCodex and upstream Codex sources under `/tmp` before deciding ownership. Re-sync on every run so a cached checkout cannot go stale — stale source produces wrong routing and dead line references:
37
37
 
38
38
  ```bash
39
- CODEX_SRC="/tmp/openai-codex-source"
40
- if [ ! -d "$CODEX_SRC/.git" ]; then
41
- gh repo clone openai/codex "$CODEX_SRC" -- --depth=1
42
- else
43
- git -C "$CODEX_SRC" fetch --depth=1 origin
44
- fi
39
+ sync_latest_source() {
40
+ REPO="$1"; DEST="$2"
41
+ if [ ! -d "$DEST/.git" ]; then
42
+ gh repo clone "$REPO" "$DEST" -- --depth=1 \
43
+ || git clone --depth=1 "https://github.com/$REPO" "$DEST"
44
+ fi
45
+ DEFAULT_BRANCH="$(git -C "$DEST" remote show origin | sed -n '/HEAD branch/s/.*: //p')"
46
+ git -C "$DEST" fetch --depth=1 origin "$DEFAULT_BRANCH"
47
+ git -C "$DEST" checkout -B "$DEFAULT_BRANCH" FETCH_HEAD
48
+ }
49
+ sync_latest_source code-yeongyu/lazycodex /tmp/lazycodex-source
50
+ sync_latest_source openai/codex /tmp/openai-codex-source
45
51
  ```
46
-
47
- If `gh` is unavailable, use `git clone --depth=1 https://github.com/openai/codex "$CODEX_SRC"`.
48
52
  4. Follow the debugging skill far enough to gather runtime evidence:
49
53
  - form at least three plausible hypotheses
50
54
  - run the smallest reproduction that exercises the real surface
51
55
  - confirm the root cause by observing the failing state
52
56
  - identify the minimal fix path or maintainer action
53
- 5. Compare local LazyCodex evidence with `/tmp/openai-codex-source` before choosing the target repo. Cite exact files, commands, logs, or source paths that support the routing decision.
57
+ 5. Compare runtime evidence with both `/tmp/lazycodex-source` and `/tmp/openai-codex-source` before choosing the target repo. Cite exact files, commands, logs, or source paths that support the routing decision.
54
58
  6. Choose the target repo:
55
59
  - Use `code-yeongyu/lazycodex` when the bug is in LazyCodex integration, distribution, bundled plugin code, skills, hooks, MCP wiring, installer behavior, aliases, marketplace sync, docs, or any behavior that disappears in clean upstream Codex.
56
60
  - Use `openai/codex` when the bug reproduces in clean upstream Codex without LazyCodex, or the failing behavior comes from Codex CLI core, plugin API contracts, sandboxing, approvals, config loading, or built-in tool behavior.
@@ -106,7 +110,7 @@ Write the issue body in English and keep it direct:
106
110
  ## Repository Decision
107
111
  - Target repository:
108
112
  - Why this belongs there:
109
- - LazyCodex evidence:
113
+ - LazyCodex evidence (runtime + `/tmp/lazycodex-source`):
110
114
  - Upstream Codex source evidence from `/tmp/openai-codex-source`:
111
115
 
112
116
  ## Reproduction
@@ -150,7 +154,7 @@ Use this when a PR is the right artifact:
150
154
  ## Repository Decision
151
155
  - Target repository:
152
156
  - Why this belongs there:
153
- - LazyCodex evidence:
157
+ - LazyCodex evidence (runtime + `/tmp/lazycodex-source`):
154
158
  - Upstream Codex source evidence from `/tmp/openai-codex-source`:
155
159
 
156
160
  ## Root Cause
@@ -227,6 +231,6 @@ Do not file:
227
231
  - a vague issue without reproduction steps
228
232
  - an issue that claims a root cause not supported by runtime evidence
229
233
  - a duplicate when commenting on an existing issue is enough
230
- - an upstream Codex issue without checking `/tmp/openai-codex-source`
234
+ - an issue without checking the latest `/tmp/lazycodex-source` and `/tmp/openai-codex-source` checkouts
231
235
  - a LazyCodex issue when the bug is proven to reproduce in clean upstream Codex
232
236
  - a fix PR without a concrete branch, implemented fix, and verification result
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: lsp-setup
3
+ description: "Configure a Language Server (LSP) for a specific language so editor/agent tooling — diagnostics, go-to-definition, find-references, rename — works. Use when you need to: configure LSP, lsp setup, set up or install a language server, fix 'no LSP server configured' / 'server not installed', choose between servers (basedpyright vs pyright vs ty vs ruff), or wire .codex/lsp-client.json / .opencode/lsp.json. 언어서버 설정. Routes by file extension to references/<language>/README.md for the exact builtin server, per-OS install commands (macOS/Linux/Windows), config snippets for both config files, initialization options, alternatives, and troubleshooting. Ships scripts: detect-lsp.ts (scan a project for languages + each server's install/config status) and verify-lsp.ts (run a real diagnostics roundtrip). Covers typescript, python, go, rust, c/c++, java, kotlin, c#/razor, swift, ruby, php, dart, elixir, zig, lua, bash, yaml, terraform, haskell, julia."
4
+ ---
5
+
6
+ # LSP Setup
7
+
8
+ Configure the right Language Server for a project so the `lsp` MCP tools
9
+ (`diagnostics`, `goto_definition`, `find_references`, `symbols`, `rename`)
10
+ actually work. This skill is an index: detect what a project needs, install the
11
+ server, write the config, then verify with a real roundtrip.
12
+
13
+ The list of servers we ship as **builtin** is the source of truth in
14
+ `packages/lsp-tools-mcp/src/lsp/server-definitions.ts` (`BUILTIN_SERVERS` +
15
+ `LSP_INSTALL_HINTS`). The per-language references below mirror it.
16
+
17
+ ---
18
+
19
+ ## PHASE 0 — LANGUAGE GATE (run first)
20
+
21
+ Identify the language from the file extension, then **read the matching
22
+ reference before installing or configuring anything**.
23
+
24
+ | Extension(s) | Reference |
25
+ |---|---|
26
+ | `.ts .tsx .js .jsx .mjs .cjs .mts .cts .vue .svelte .astro` | `references/typescript/README.md` |
27
+ | `.py .pyi` | `references/python/README.md` |
28
+ | `.go` | `references/go/README.md` |
29
+ | `.rs` | `references/rust/README.md` |
30
+ | `.c .cpp .cc .cxx .h .hpp .hh .hxx` | `references/c-cpp/README.md` |
31
+ | `.java` | `references/java/README.md` |
32
+ | `.kt .kts` | `references/kotlin/README.md` |
33
+ | `.cs .razor .cshtml` | `references/csharp/README.md` |
34
+ | `.swift` | `references/swift/README.md` |
35
+ | `.rb .rake .gemspec .ru` | `references/ruby/README.md` |
36
+ | `.php` | `references/php/README.md` |
37
+ | `.dart` | `references/dart/README.md` |
38
+ | `.ex .exs` | `references/elixir/README.md` |
39
+ | `.zig .zon` | `references/zig/README.md` |
40
+ | `.lua` | `references/lua/README.md` |
41
+ | `.sh .bash .zsh .ksh` | `references/bash/README.md` |
42
+ | `.yaml .yml` | `references/yaml/README.md` |
43
+ | `.tf .tfvars` | `references/terraform/README.md` |
44
+ | `.hs .lhs` | `references/haskell/README.md` |
45
+ | `.jl` | `references/julia/README.md` |
46
+
47
+ ---
48
+
49
+ ## WORKFLOW — detect → install → configure → verify
50
+
51
+ ### 1. Detect
52
+
53
+ Scan the project to see which languages are present and whether each server is
54
+ installed and configured:
55
+
56
+ ```bash
57
+ bun scripts/detect-lsp.ts <projectDir> # human report (default: cwd)
58
+ bun scripts/detect-lsp.ts <projectDir> --json
59
+ ```
60
+
61
+ For each detected language it prints the builtin server id, the executable it
62
+ needs on `PATH`, whether that executable is installed, an install hint, and
63
+ whether a project config file already references it.
64
+
65
+ ### 2. Install
66
+
67
+ Open `references/<language>/README.md` and run the install command for your OS.
68
+ Then confirm the executable resolves:
69
+
70
+ ```bash
71
+ command -v <server-executable> # e.g. typescript-language-server, gopls, rust-analyzer
72
+ ```
73
+
74
+ ### 3. Configure
75
+
76
+ Most builtin servers need **no config** — they are resolved automatically by
77
+ file extension. Write config only to: pick between competing servers, set a
78
+ `priority`, pass `initialization` options, override `extensions`, set `env`, or
79
+ `disable` a server.
80
+
81
+ Two project-scoped config files, **identical JSON shape**:
82
+
83
+ - Codex harness → `.codex/lsp-client.json` (user: `~/.codex/lsp-client.json`)
84
+ - OpenCode/omo harness → `.opencode/lsp.json` (also `.omo/lsp.json`)
85
+
86
+ ```jsonc
87
+ {
88
+ "lsp": {
89
+ "<server-id>": {
90
+ "command": ["<bin>", "<args>"], // optional for builtin ids (supplied automatically)
91
+ "extensions": [".ext"], // optional override
92
+ "priority": 100, // higher wins when several servers match an extension
93
+ "initialization": { }, // server-specific initializationOptions
94
+ "env": { "KEY": "value" }, // optional
95
+ "disabled": false // set true to turn a server off
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ Rules enforced by `config-loader.ts`:
102
+
103
+ - In a **project** config (`.codex/lsp-client.json`, `.opencode/lsp.json`) an
104
+ entry whose id is a **builtin** server inherits `command` automatically — you
105
+ only override `extensions` / `priority` / `initialization`. A non-builtin id
106
+ in a project config is **ignored**.
107
+ - To define a **fully custom** (non-builtin) server with its own `command`, put
108
+ it in the **user** config (`~/.codex/lsp-client.json`, or the path set by
109
+ `LSP_TOOLS_MCP_USER_CONFIG`), where `command` + `extensions` are honored.
110
+ - Project entries win over user entries; both win over builtin defaults.
111
+
112
+ Each language reference gives a ready-to-paste snippet.
113
+
114
+ ### 4. Verify
115
+
116
+ Run a real diagnostics roundtrip against a source file. This spawns the server,
117
+ opens the file, requests diagnostics, and reports `OK`/`FAIL`:
118
+
119
+ ```bash
120
+ bun scripts/verify-lsp.ts <path/to/file.ext>
121
+ bun scripts/verify-lsp.ts <file> --timeout=90000
122
+ ```
123
+
124
+ `OK` = the server started and answered. `FAIL: language server not installed`
125
+ = go back to step 2. Other `FAIL` text carries the server/startup error.
126
+ `SKIP` = the engine source could not be located; run from inside the omo
127
+ repo/worktree, or call the `lsp` MCP `diagnostics` tool directly.
128
+
129
+ ---
130
+
131
+ ## Scripts
132
+
133
+ | Script | Purpose |
134
+ |---|---|
135
+ | `scripts/detect-lsp.ts` | Scan a directory; per detected language report server id, install status, install hint, config status. `--json` for machine output. |
136
+ | `scripts/verify-lsp.ts` | Real LSP diagnostics roundtrip for one file via the `lsp-tools-mcp` engine; `OK`/`FAIL`/`SKIP` + exit code 0/1/3. |
137
+ | `scripts/lsp-server-table.ts` | Embedded snapshot of the primary builtin server per language (mirrors `server-definitions.ts`). |
138
+
139
+ Run with [Bun](https://bun.sh): `curl -fsSL https://bun.sh/install | bash`.
@@ -0,0 +1,60 @@
1
+ # Bash — LSP setup
2
+
3
+ - **Builtin server:** `bash` — `bash-language-server start`
4
+ - **Extensions:** `.sh .bash .zsh .ksh`
5
+ - **Install hint:** `npm install -g bash-language-server`
6
+
7
+ An alias id `bash-ls` exists with the identical command; either id works.
8
+
9
+ ## Install
10
+
11
+ - **macOS:** `npm install -g bash-language-server`
12
+ - **Linux:** `npm install -g bash-language-server`
13
+ - **Windows:** `npm install -g bash-language-server` (PowerShell)
14
+
15
+ For real diagnostics, also install `shellcheck`:
16
+
17
+ - **macOS:** `brew install shellcheck`
18
+ - **Linux:** `apt install shellcheck` (or `dnf install ShellCheck`)
19
+ - **Windows:** `scoop install shellcheck`
20
+
21
+ Confirm it resolves:
22
+
23
+ ```bash
24
+ command -v bash-language-server
25
+ command -v shellcheck
26
+ ```
27
+
28
+ ## Configure
29
+
30
+ Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in `.codex/lsp-client.json` (Codex) AND `.opencode/lsp.json` (OpenCode/omo):
31
+
32
+ ```json
33
+ { "lsp": { "bash": { "priority": 100 } } }
34
+ ```
35
+
36
+ For builtin ids in a PROJECT config, `command` is supplied automatically — only set `priority`/`initialization`/`extensions`/`disabled`/`env`. A fully custom (non-builtin) server with its own `command` must go in the USER config (`~/.codex/lsp-client.json`).
37
+
38
+ ### Initialization options (only if commonly needed)
39
+
40
+ None commonly required. `bash-language-server` discovers `shellcheck` on PATH automatically. To point at a non-PATH binary, export `SHELLCHECK_PATH` via `env`:
41
+
42
+ ```json
43
+ { "lsp": { "bash": { "env": { "SHELLCHECK_PATH": "/opt/bin/shellcheck" } } } }
44
+ ```
45
+
46
+ ## Alternatives
47
+
48
+ - `shellcheck` standalone as a linter-only flow (no LSP).
49
+ - `shfmt` for formatting (complements, does not replace, the LSP).
50
+
51
+ ## Troubleshooting
52
+ - **PATH:** `bash-language-server` on PATH; reopen shell after `npm -g` install.
53
+ - **No diagnostics:** `shellcheck` missing — diagnostics are powered by it; install and reopen.
54
+ - **Wrong shell dialect:** `.zsh`/`.ksh` are linted as bash; shellcheck may flag shell-specific syntax.
55
+
56
+ ## Verify
57
+
58
+ ```bash
59
+ bun ../../scripts/verify-lsp.ts path/to/file.sh
60
+ ```
@@ -0,0 +1,61 @@
1
+ # C / C++ — LSP setup
2
+
3
+ - **Builtin server:** `clangd` — `clangd --background-index --clang-tidy`
4
+ - **Extensions:** `.c .cpp .cc .cxx .c++ .h .hpp .hh .hxx .h++`
5
+ - **Install hint:** `https://clangd.llvm.org/installation`
6
+
7
+ ## Install
8
+
9
+ - **macOS:** `brew install llvm` (clangd ships in the LLVM keg; add its `bin` to PATH)
10
+ - **Linux:** `apt install clangd` (Debian/Ubuntu); use your distro package elsewhere
11
+ - **Windows:** install LLVM from `https://releases.llvm.org` or `winget install LLVM.LLVM`
12
+
13
+ See `https://clangd.llvm.org/installation` for other platforms.
14
+
15
+ Confirm it resolves:
16
+
17
+ ```bash
18
+ command -v clangd
19
+ ```
20
+
21
+ ## Configure
22
+
23
+ Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in `.codex/lsp-client.json` (Codex) AND `.opencode/lsp.json` (OpenCode/omo):
24
+
25
+ ```json
26
+ { "lsp": { "clangd": { "priority": 100 } } }
27
+ ```
28
+
29
+ For builtin ids in a PROJECT config, `command` is supplied automatically — only set `priority`/`initialization`/`extensions`/`disabled`/`env`. A fully custom (non-builtin) server with its own `command` must go in the USER config (`~/.codex/lsp-client.json`).
30
+
31
+ ### Initialization options (only if commonly needed)
32
+
33
+ None commonly required. clangd reads flags from a project `.clangd` file rather
34
+ than initializationOptions. The builtin command already passes
35
+ `--background-index --clang-tidy`.
36
+
37
+ ## Compile commands
38
+
39
+ clangd needs a `compile_commands.json` at the project root (or in `build/`) for
40
+ accurate diagnostics and cross-file navigation. Generate it with:
41
+
42
+ - **CMake:** `cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON` (symlink/copy `build/compile_commands.json` to the root)
43
+ - **Make / other:** `bear -- make`
44
+
45
+ Without it, clangd falls back to heuristic flags and reports spurious errors.
46
+
47
+ ## Alternatives
48
+
49
+ None builtin. `ccls` exists as a third-party server but is not builtin — it would
50
+ need a custom `command` in the USER config.
51
+
52
+ ## Troubleshooting
53
+ - **PATH:** `clangd` must be on PATH; reopen shell after install. Homebrew LLVM is keg-only — add `$(brew --prefix llvm)/bin` to PATH.
54
+ - **Spurious "file not found" / unknown flags:** missing or stale `compile_commands.json` — regenerate it after changing the build.
55
+ - **Header-only diagnostics wrong:** ensure the header's translation unit appears in the compile database, or add a `.clangd` `CompileFlags` block.
56
+
57
+ ## Verify
58
+
59
+ ```bash
60
+ bun ../../scripts/verify-lsp.ts path/to/file.cpp
61
+ ```
@@ -0,0 +1,71 @@
1
+ # C# — LSP setup
2
+
3
+ - **Builtin server:** `csharp` — `csharp-ls`
4
+ - **Extensions:** `.cs`
5
+ - **Install hint:** `dotnet tool install -g csharp-ls`
6
+
7
+ ## Install
8
+
9
+ Requires the **.NET SDK**. Install the tool globally:
10
+
11
+ - **macOS:** `dotnet tool install -g csharp-ls`
12
+ - **Linux:** `dotnet tool install -g csharp-ls`
13
+ - **Windows:** `dotnet tool install -g csharp-ls`
14
+
15
+ Global .NET tools land in `~/.dotnet/tools` — ensure that directory is on PATH (Windows: `%USERPROFILE%\.dotnet\tools`).
16
+
17
+ Confirm it resolves:
18
+
19
+ ```bash
20
+ command -v csharp-ls
21
+ ```
22
+
23
+ ## Configure
24
+
25
+ Builtin — usually NO config needed (auto-resolved by extension). Configure only to set priority, init options, override extensions, or disable. Same JSON shape in `.codex/lsp-client.json` (Codex) AND `.opencode/lsp.json` (OpenCode/omo):
26
+
27
+ ```json
28
+ { "lsp": { "csharp": { "priority": 100 } } }
29
+ ```
30
+
31
+ For builtin ids in a PROJECT config, `command` is supplied automatically — only set `priority`/`initialization`/`extensions`/`disabled`/`env`. A fully custom (non-builtin) server with its own `command` must go in the USER config (`~/.codex/lsp-client.json`).
32
+
33
+ ### Initialization options (only if commonly needed)
34
+
35
+ None commonly required. `csharp-ls` picks up the nearest `.sln` or `.csproj`; keep the solution restorable (`dotnet restore`).
36
+
37
+ ## Razor / Blazor
38
+
39
+ Razor and Blazor files use a separate builtin server:
40
+
41
+ - **Builtin server:** `razor` — `roslyn-language-server --stdio`
42
+ - **Extensions:** `.razor .cshtml`
43
+ - **Install hint:** `dotnet tool install -g roslyn-language-server --prerelease` (requires **v5.8.0+**; see [dotnet/razor](https://github.com/dotnet/razor))
44
+
45
+ ```bash
46
+ dotnet tool install -g roslyn-language-server --prerelease
47
+ command -v roslyn-language-server
48
+ ```
49
+
50
+ Enable it in a project/user config:
51
+
52
+ ```json
53
+ { "lsp": { "razor": { } } }
54
+ ```
55
+
56
+ ## Alternatives
57
+
58
+ - **OmniSharp** — legacy C# language server (not builtin). Still works but is being superseded by the Roslyn-based servers; prefer `csharp-ls` / `roslyn-language-server`.
59
+
60
+ ## Troubleshooting
61
+
62
+ - **PATH:** `csharp-ls` / `roslyn-language-server` on PATH (`~/.dotnet/tools`); reopen shell after install.
63
+ - **No .NET SDK:** install the SDK (not just the runtime) before installing the tool.
64
+ - **No symbols:** run `dotnet restore`; an unrestored solution yields empty results.
65
+ - **Razor needs v5.8.0+:** older `roslyn-language-server` builds lack the `--stdio` Razor support — install with `--prerelease`.
66
+
67
+ ## Verify
68
+
69
+ ```bash
70
+ bun ../../scripts/verify-lsp.ts path/to/File.cs
71
+ ```