lazycodex-ai 5.0.0-beta.3 → 5.0.0-beta.30

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 (386) hide show
  1. package/README.ja.md +25 -21
  2. package/README.ko.md +25 -21
  3. package/README.md +38 -23
  4. package/README.ru.md +24 -20
  5. package/README.zh-cn.md +25 -21
  6. package/dist/cli/config-manager/parse-opencode-config-file.d.ts +2 -1
  7. package/dist/cli/doctor/checks/system-plugin.d.ts +4 -3
  8. package/dist/cli/fallback-lane-policy.d.ts +1 -0
  9. package/dist/cli/index.js +22572 -20322
  10. package/dist/cli/install-codex/install-codex-test-fixtures.d.ts +1 -1
  11. package/dist/cli/run/on-complete-hook.d.ts +2 -0
  12. package/dist/cli/runtime-commands.d.ts +1 -1
  13. package/dist/cli/worktree-sweep/classify.d.ts +16 -0
  14. package/dist/cli/worktree-sweep/format.d.ts +8 -0
  15. package/dist/cli/worktree-sweep/git.d.ts +19 -0
  16. package/dist/cli/worktree-sweep/index.d.ts +7 -0
  17. package/dist/cli/worktree-sweep/options.d.ts +2 -0
  18. package/dist/cli/worktree-sweep/parse-worktree-list.d.ts +8 -0
  19. package/dist/cli/worktree-sweep/sweep.d.ts +2 -0
  20. package/dist/cli/worktree-sweep/types.d.ts +65 -0
  21. package/dist/cli/worktree-sweep/worktree-sweep.d.ts +2 -0
  22. package/dist/cli-node/index.js +22190 -19917
  23. package/package.json +11 -7
  24. package/packages/git-bash-mcp/dist/cli.js +5 -1
  25. package/packages/lsp-daemon/dist/cli.js +645 -296
  26. package/packages/lsp-daemon/dist/client.d.ts +10 -0
  27. package/packages/lsp-daemon/dist/client.js +605 -253
  28. package/packages/lsp-daemon/dist/daemon-client.d.ts +1 -0
  29. package/packages/lsp-daemon/dist/daemon-client.js +3 -0
  30. package/packages/lsp-daemon/dist/ensure-daemon.js +1 -0
  31. package/packages/lsp-daemon/dist/index.js +609 -262
  32. package/packages/lsp-daemon/dist/version-reap.js +1 -1
  33. package/packages/lsp-daemon/package.json +1 -1
  34. package/packages/lsp-tools-mcp/dist/cli.js +564 -217
  35. package/packages/lsp-tools-mcp/dist/lsp/manager.js +115 -92
  36. package/packages/lsp-tools-mcp/dist/mcp.js +566 -219
  37. package/packages/lsp-tools-mcp/dist/request-context.js +12 -13
  38. package/packages/lsp-tools-mcp/dist/tools.js +571 -227
  39. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +4 -4
  40. package/packages/omo-codex/plugin/AGENTS.md +47 -0
  41. package/packages/omo-codex/plugin/README.md +1 -1
  42. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +34 -33
  43. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  44. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  45. package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -0
  46. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +293 -116
  47. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +245 -84
  48. package/packages/omo-codex/plugin/components/codegraph/package.json +4 -4
  49. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +1 -0
  50. package/packages/omo-codex/plugin/components/codegraph/src/session-start-hook-runtime.ts +1 -0
  51. package/packages/omo-codex/plugin/components/comment-checker/AGENTS.md +9 -0
  52. package/packages/omo-codex/plugin/components/comment-checker/biome.json +2 -2
  53. package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +2 -1
  54. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  55. package/packages/omo-codex/plugin/components/comment-checker/package.json +5 -5
  56. package/packages/omo-codex/plugin/components/comment-checker/src/apply-patch.ts +2 -8
  57. package/packages/omo-codex/plugin/components/comment-checker/src/core.ts +1 -2
  58. package/packages/omo-codex/plugin/components/comment-checker/src/request-extractor.ts +1 -1
  59. package/packages/omo-codex/plugin/components/comment-checker/src/runner.ts +1 -0
  60. package/packages/omo-codex/plugin/components/git-bash/AGENTS.md +1 -1
  61. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  62. package/packages/omo-codex/plugin/components/git-bash/package.json +3 -4
  63. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +2 -2
  64. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +1 -5
  65. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +1 -5
  66. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  67. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +5 -5
  68. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +1 -5
  69. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +4 -21
  70. package/packages/omo-codex/plugin/components/lsp/AGENTS.md +30 -15
  71. package/packages/omo-codex/plugin/components/lsp/biome.json +2 -2
  72. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +4 -4
  73. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +596 -267
  74. package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +1 -1
  75. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  76. package/packages/omo-codex/plugin/components/lsp/package.json +5 -5
  77. package/packages/omo-codex/plugin/components/lsp/src/cli.ts +1 -1
  78. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +1 -1
  79. package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +1 -5
  80. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +6 -7
  81. package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +1 -2
  82. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +11 -1
  83. package/packages/omo-codex/plugin/components/rules/AGENTS.md +12 -0
  84. package/packages/omo-codex/plugin/components/rules/biome.json +2 -2
  85. package/packages/omo-codex/plugin/components/rules/dist/cli.js +60 -45
  86. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  87. package/packages/omo-codex/plugin/components/rules/package.json +7 -7
  88. package/packages/omo-codex/plugin/components/rules/src/config.ts +1 -2
  89. package/packages/omo-codex/plugin/components/rules/src/persistent-cache.ts +1 -2
  90. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +9 -5
  91. package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +1 -4
  92. package/packages/omo-codex/plugin/components/rules/src/static-injection.ts +4 -9
  93. package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +11 -16
  94. package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +17 -25
  95. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +9 -7
  96. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +0 -6
  97. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +6 -4
  98. package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +12 -9
  99. package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +28 -37
  100. package/packages/omo-codex/plugin/components/rules/test/dynamic-target-fingerprints.test.ts +1 -2
  101. package/packages/omo-codex/plugin/components/rules/test/engine.test.ts +7 -4
  102. package/packages/omo-codex/plugin/components/rules/test/finder.test.ts +2 -3
  103. package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +39 -72
  104. package/packages/omo-codex/plugin/components/rules/test/hephaestus-model-variant.test.ts +1 -2
  105. package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +2 -3
  106. package/packages/omo-codex/plugin/components/rules/test/matcher.test.ts +2 -3
  107. package/packages/omo-codex/plugin/components/rules/test/package-smoke.test.ts +1 -1
  108. package/packages/omo-codex/plugin/components/rules/test/parser.test.ts +1 -2
  109. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +5 -6
  110. package/packages/omo-codex/plugin/components/rules/test/rules-engine-consumption.test.ts +3 -6
  111. package/packages/omo-codex/plugin/components/rules/test/scanner.test.ts +1 -2
  112. package/packages/omo-codex/plugin/components/rules/test/sources.test.ts +2 -5
  113. package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +2 -17
  114. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  115. package/packages/omo-codex/plugin/components/teammode/package.json +5 -5
  116. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +3 -9
  117. package/packages/omo-codex/plugin/components/telemetry/AGENTS.md +8 -0
  118. package/packages/omo-codex/plugin/components/telemetry/biome.json +2 -2
  119. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +2463 -437
  120. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +2467 -441
  121. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  122. package/packages/omo-codex/plugin/components/telemetry/package.json +5 -5
  123. package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +1 -4
  124. package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +4 -14
  125. package/packages/omo-codex/plugin/components/telemetry/src/product-identity.ts +1 -1
  126. package/packages/omo-codex/plugin/components/telemetry/test/diagnostics.test.ts +2 -5
  127. package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -0
  128. package/packages/omo-codex/plugin/components/ultrawork/biome.json +2 -2
  129. package/packages/omo-codex/plugin/components/ultrawork/directive.md +13 -1
  130. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  131. package/packages/omo-codex/plugin/components/ultrawork/package.json +5 -5
  132. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +13 -1
  133. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +6 -6
  134. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +31 -7
  135. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
  136. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +5 -5
  137. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +9 -1
  138. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +0 -136
  139. package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +0 -2
  140. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/AGENTS.md +5 -4
  141. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/NOTICE +1 -1
  142. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/README.md +5 -5
  143. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/biome.json +2 -2
  144. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/directive.md +6 -6
  145. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/dist/cli.js +12 -12
  146. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +28 -0
  147. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/package.json +12 -12
  148. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/boulder-reader.ts +1 -1
  149. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/cli.ts +1 -1
  150. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/codex-hook.ts +3 -3
  151. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/directive.ts +1 -1
  152. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/index.ts +1 -1
  153. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/boulder-reader.test.ts +3 -3
  154. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/cli.test.ts +1 -4
  155. package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/codex-hook.test.ts +8 -22
  156. package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +16 -0
  157. package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +1 -1
  158. package/packages/omo-codex/plugin/components/ulw-loop/biome.json +2 -2
  159. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +13 -1
  160. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +5 -1
  161. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +2 -1
  162. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +11 -1
  163. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +24 -14
  164. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +1 -1
  165. package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +1 -1
  166. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +3 -3
  167. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  168. package/packages/omo-codex/plugin/components/ulw-loop/package.json +5 -5
  169. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +3 -2
  170. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +108 -0
  171. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -0
  172. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +5 -1
  173. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +13 -1
  174. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +3 -5
  175. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +3 -1
  176. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +3 -1
  177. package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +1 -1
  178. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +3 -3
  179. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +0 -1
  180. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +25 -0
  181. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +26 -2
  182. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
  183. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-snapshot.test.ts +18 -0
  184. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +0 -3
  185. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +5 -37
  186. package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +9 -0
  187. package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +8 -5
  188. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +1 -1
  189. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +4 -5
  190. package/packages/omo-codex/plugin/components/ulw-loop/vitest.config.ts +1 -0
  191. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  192. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  193. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  194. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  195. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  196. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  197. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  198. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  199. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  200. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  201. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  202. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  203. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  204. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  205. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  206. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  207. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +17 -0
  208. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  209. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +17 -0
  210. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  211. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  212. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  213. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  214. package/packages/omo-codex/plugin/model-catalog.json +3 -3
  215. package/packages/omo-codex/plugin/package-lock.json +681 -395
  216. package/packages/omo-codex/plugin/package.json +2 -2
  217. package/packages/omo-codex/plugin/scripts/AGENTS.md +40 -0
  218. package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +1 -1
  219. package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +3 -3
  220. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +11 -11
  221. package/packages/omo-codex/plugin/shared/package.json +3 -4
  222. package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +51 -0
  223. package/packages/omo-codex/plugin/skills/coding-agent-sessions/AGENTS.md +62 -0
  224. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
  225. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  226. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
  227. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  228. package/packages/omo-codex/plugin/skills/data-scientist/SKILL.md +99 -239
  229. package/packages/omo-codex/plugin/skills/data-scientist/references/execution-surfaces.md +91 -0
  230. package/packages/omo-codex/plugin/skills/data-scientist/references/placement.md +74 -0
  231. package/packages/omo-codex/plugin/skills/data-scientist/references/polars-lane.md +95 -0
  232. package/packages/omo-codex/plugin/skills/data-scientist/references/uv-setup.md +1 -1
  233. package/packages/omo-codex/plugin/skills/data-scientist/references/visualization.md +64 -0
  234. package/packages/omo-codex/plugin/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
  235. package/packages/omo-codex/plugin/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
  236. package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -0
  237. package/packages/omo-codex/plugin/skills/debugging/references/methodology/00-setup.md +12 -0
  238. package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +21 -0
  239. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/go.md +15 -1
  240. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +38 -0
  241. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/node.md +25 -0
  242. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/python.md +13 -0
  243. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/rust.md +41 -0
  244. package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +267 -0
  245. package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  246. package/packages/omo-codex/plugin/skills/debugging/references/tools/dap.md +103 -0
  247. package/packages/omo-codex/plugin/skills/debugging/references/tools/frida.md +193 -0
  248. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +11 -7
  249. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
  250. package/packages/omo-codex/plugin/skills/frontend/references/design/print-paged-media.md +76 -0
  251. package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
  252. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +1 -1
  253. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-a-direction.md +1 -1
  254. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +11 -11
  255. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-d-memory.md +3 -3
  256. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/orchestration.md +1 -1
  257. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/routing.md +5 -5
  258. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +4 -4
  259. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  260. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +2 -0
  261. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +179 -0
  262. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
  263. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
  264. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +13 -1
  265. package/packages/omo-codex/plugin/skills/{start-work → ulw-execute}/SKILL.md +12 -11
  266. package/packages/omo-codex/plugin/skills/ulw-execute/agents/openai.yaml +2 -0
  267. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -2
  268. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +108 -0
  269. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -0
  270. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +6 -6
  271. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +31 -7
  272. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
  273. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +5 -5
  274. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +4 -2
  275. package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +58 -0
  276. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +3 -2
  277. package/packages/omo-codex/plugin/test/AGENTS.md +47 -0
  278. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +19 -173
  279. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +8 -28
  280. package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -1
  281. package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +1 -1
  282. package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +175 -13
  283. package/packages/omo-codex/plugin/test/aggregate.test.mjs +78 -2
  284. package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +19 -33
  285. package/packages/omo-codex/plugin/test/auto-update.test.mjs +2 -2
  286. package/packages/omo-codex/plugin/test/component-bin-names.test.mjs +2 -2
  287. package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +1 -1
  288. package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +2 -2
  289. package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +4 -4
  290. package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +21 -27
  291. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +8 -8
  292. package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +0 -36
  293. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +101 -0
  294. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +12 -12
  295. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -119
  296. package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +0 -40
  297. package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +6 -62
  298. package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +3 -36
  299. package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +0 -44
  300. package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +2 -6
  301. package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +0 -3
  302. package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +0 -3
  303. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2637 -549
  304. package/packages/shared-skills/skills/ast-grep/AGENTS.md +51 -0
  305. package/packages/shared-skills/skills/coding-agent-sessions/AGENTS.md +62 -0
  306. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
  307. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
  308. package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
  309. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
  310. package/packages/shared-skills/skills/data-scientist/SKILL.md +99 -239
  311. package/packages/shared-skills/skills/data-scientist/references/execution-surfaces.md +91 -0
  312. package/packages/shared-skills/skills/data-scientist/references/placement.md +74 -0
  313. package/packages/shared-skills/skills/data-scientist/references/polars-lane.md +95 -0
  314. package/packages/shared-skills/skills/data-scientist/references/uv-setup.md +1 -1
  315. package/packages/shared-skills/skills/data-scientist/references/visualization.md +64 -0
  316. package/packages/shared-skills/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
  317. package/packages/shared-skills/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
  318. package/packages/shared-skills/skills/debugging/SKILL.md +2 -0
  319. package/packages/shared-skills/skills/debugging/references/methodology/00-setup.md +12 -0
  320. package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +21 -0
  321. package/packages/shared-skills/skills/debugging/references/runtimes/go.md +15 -1
  322. package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +38 -0
  323. package/packages/shared-skills/skills/debugging/references/runtimes/node.md +25 -0
  324. package/packages/shared-skills/skills/debugging/references/runtimes/python.md +13 -0
  325. package/packages/shared-skills/skills/debugging/references/runtimes/rust.md +41 -0
  326. package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +267 -0
  327. package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +86 -0
  328. package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  329. package/packages/shared-skills/skills/debugging/references/tools/dap.md +103 -0
  330. package/packages/shared-skills/skills/debugging/references/tools/frida.md +193 -0
  331. package/packages/shared-skills/skills/frontend/SKILL.md +11 -7
  332. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
  333. package/packages/shared-skills/skills/frontend/references/design/print-paged-media.md +76 -0
  334. package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
  335. package/packages/shared-skills/skills/frontend/references/designpowers/README.md +1 -1
  336. package/packages/shared-skills/skills/frontend/references/designpowers/lane-a-direction.md +1 -1
  337. package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +11 -11
  338. package/packages/shared-skills/skills/frontend/references/designpowers/lane-d-memory.md +3 -3
  339. package/packages/shared-skills/skills/frontend/references/designpowers/orchestration.md +1 -1
  340. package/packages/shared-skills/skills/frontend/references/designpowers/routing.md +5 -5
  341. package/packages/shared-skills/skills/review-work/SKILL.md +3 -3
  342. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
  343. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +2 -0
  344. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +179 -0
  345. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
  346. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +13 -11
  347. package/packages/shared-skills/skills/{start-work → ulw-execute}/SKILL.md +9 -8
  348. package/packages/shared-skills/skills/ulw-plan/SKILL.md +6 -6
  349. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +31 -7
  350. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
  351. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +5 -5
  352. package/packages/shared-skills/skills/ulw-research/SKILL.md +4 -2
  353. package/packages/shared-skills/skills/visual-qa/AGENTS.md +58 -0
  354. package/packages/shared-skills/skills/visual-qa/SKILL.md +3 -2
  355. package/script/qa/web-terminal-visual-qa.mjs +2 -0
  356. package/script/qa/xterm-live-terminal.mjs +18 -2
  357. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +0 -28
  358. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +0 -17
  359. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +0 -17
  360. package/packages/omo-codex/plugin/skills/data-scientist/references/common-scenarios.md +0 -176
  361. package/packages/omo-codex/plugin/skills/data-scientist/references/execution-templates.md +0 -197
  362. package/packages/omo-codex/plugin/skills/data-scientist/references/integration-patterns.md +0 -153
  363. package/packages/omo-codex/plugin/skills/data-scientist/references/performance-benchmarks.md +0 -37
  364. package/packages/omo-codex/plugin/skills/start-work/agents/openai.yaml +0 -2
  365. package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +0 -92
  366. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +0 -314
  367. package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +0 -24
  368. package/packages/shared-skills/skills/data-scientist/references/common-scenarios.md +0 -176
  369. package/packages/shared-skills/skills/data-scientist/references/execution-templates.md +0 -197
  370. package/packages/shared-skills/skills/data-scientist/references/integration-patterns.md +0 -153
  371. package/packages/shared-skills/skills/data-scientist/references/performance-benchmarks.md +0 -37
  372. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/.gitattributes +0 -0
  373. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/CHANGELOG.md +0 -0
  374. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/LICENSE +0 -0
  375. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/plan-checklist.ts +0 -0
  376. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/src/types.ts +0 -0
  377. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/boulder-completed.json +0 -0
  378. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/boulder-mixed-platforms.json +0 -0
  379. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/boulder-single-codex-work.json +0 -0
  380. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-all-done.md +0 -0
  381. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-scaffold.md +0 -0
  382. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-with-nested-checkboxes.md +0 -0
  383. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/test/fixtures/plan-with-unchecked.md +0 -0
  384. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/tsconfig.build.json +0 -0
  385. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/tsconfig.json +0 -0
  386. /package/packages/omo-codex/plugin/components/{start-work-continuation → ulw-execute-continuation}/vitest.config.ts +0 -0
@@ -23,28 +23,22 @@ var DEFAULT_MAX_DIRECTORY_FILES = 50;
23
23
  var REQUEST_TIMEOUT_MS = 15000;
24
24
  var INIT_TIMEOUT_MS = 60000;
25
25
  var IDLE_TIMEOUT_MS = 5 * 60000;
26
+ var MAX_RESIDENT_CLIENTS = 6;
26
27
  var REAPER_INTERVAL_MS = 60000;
27
28
  var STOP_HARD_KILL_TIMEOUT_MS = 5000;
28
29
  var STOP_SIGKILL_GRACE_MS = 1000;
29
30
 
30
31
  // ../lsp-core/src/lsp/errors.ts
31
32
  class LspConnectionClosedError extends Error {
32
- serverId;
33
- root;
34
- name = "LspConnectionClosedError";
35
33
  constructor(serverId, root, message) {
36
34
  super(message ?? `LSP connection closed for ${serverId} at ${root}`);
37
35
  this.serverId = serverId;
38
36
  this.root = root;
37
+ this.name = "LspConnectionClosedError";
39
38
  }
40
39
  }
41
40
 
42
41
  class LspProcessExitedError extends Error {
43
- serverId;
44
- root;
45
- exitCode;
46
- stderrTail;
47
- name = "LspProcessExitedError";
48
42
  constructor(serverId, root, exitCode, stderrTail) {
49
43
  const stderrSuffix = stderrTail ? `
50
44
  stderr tail: ${stderrTail}` : "";
@@ -53,46 +47,49 @@ stderr tail: ${stderrTail}` : "";
53
47
  this.root = root;
54
48
  this.exitCode = exitCode;
55
49
  this.stderrTail = stderrTail;
50
+ this.name = "LspProcessExitedError";
56
51
  }
57
52
  }
58
53
 
59
54
  class LspRequestTimeoutError extends Error {
60
- method;
61
- stderrTail;
62
- name = "LspRequestTimeoutError";
63
55
  constructor(method, stderrTail) {
64
56
  const stderrSuffix = stderrTail ? `
65
57
  recent stderr: ${stderrTail}` : "";
66
58
  super(`LSP request timeout (method: ${method})${stderrSuffix}`);
67
59
  this.method = method;
68
60
  this.stderrTail = stderrTail;
61
+ this.name = "LspRequestTimeoutError";
69
62
  }
70
63
  }
71
64
 
72
65
  class LspInvalidPathError extends Error {
73
- name = "LspInvalidPathError";
66
+ constructor() {
67
+ super(...arguments);
68
+ this.name = "LspInvalidPathError";
69
+ }
74
70
  }
75
71
 
76
72
  class LspServerLookupError extends Error {
77
- lookup;
78
- name = "LspServerLookupError";
79
73
  constructor(message, lookup) {
80
74
  super(message);
81
75
  this.lookup = lookup;
76
+ this.name = "LspServerLookupError";
82
77
  }
83
78
  }
84
79
 
85
80
  class LspServerInitializingError extends Error {
86
- originalError;
87
- name = "LspServerInitializingError";
88
81
  constructor(originalError) {
89
82
  super(`LSP server is still initializing. Please retry in a few seconds. Original error: ${originalError.message}`);
90
83
  this.originalError = originalError;
84
+ this.name = "LspServerInitializingError";
91
85
  }
92
86
  }
93
87
 
94
88
  class LspProcessSpawnError extends Error {
95
- name = "LspProcessSpawnError";
89
+ constructor() {
90
+ super(...arguments);
91
+ this.name = "LspProcessSpawnError";
92
+ }
96
93
  }
97
94
  function isLspDeadConnectionError(err) {
98
95
  return err instanceof LspConnectionClosedError || err instanceof LspProcessExitedError;
@@ -108,20 +105,31 @@ var METHOD_NOT_FOUND = -32601;
108
105
  var INTERNAL_ERROR = -32603;
109
106
 
110
107
  class JsonRpcConnection {
111
- reader;
112
- writer;
113
- pendingRequests = new Map;
114
- notificationHandlers = new Map;
115
- requestHandlers = new Map;
116
- closeHandlers = [];
117
- errorHandlers = [];
118
- inputBuffer = Buffer.alloc(0);
119
- nextRequestId = 1;
120
- listening = false;
121
- disposed = false;
122
108
  constructor(reader, writer) {
123
109
  this.reader = reader;
124
110
  this.writer = writer;
111
+ this.pendingRequests = new Map;
112
+ this.notificationHandlers = new Map;
113
+ this.requestHandlers = new Map;
114
+ this.closeHandlers = [];
115
+ this.errorHandlers = [];
116
+ this.inputBuffer = Buffer.alloc(0);
117
+ this.nextRequestId = 1;
118
+ this.listening = false;
119
+ this.disposed = false;
120
+ this.handleData = (chunk) => {
121
+ const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
122
+ this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
123
+ this.drainInputBuffer();
124
+ };
125
+ this.handleClose = () => {
126
+ for (const handler of this.closeHandlers) {
127
+ handler();
128
+ }
129
+ };
130
+ this.handleStreamError = (error) => {
131
+ this.emitError(error);
132
+ };
125
133
  }
126
134
  listen() {
127
135
  if (this.listening)
@@ -242,19 +250,6 @@ class JsonRpcConnection {
242
250
  this.notificationHandlers.clear();
243
251
  this.requestHandlers.clear();
244
252
  }
245
- handleData = (chunk) => {
246
- const chunkBuffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk, "utf8");
247
- this.inputBuffer = Buffer.concat([this.inputBuffer, chunkBuffer]);
248
- this.drainInputBuffer();
249
- };
250
- handleClose = () => {
251
- for (const handler of this.closeHandlers) {
252
- handler();
253
- }
254
- };
255
- handleStreamError = (error) => {
256
- this.emitError(error);
257
- };
258
253
  drainInputBuffer() {
259
254
  while (true) {
260
255
  const headerEnd = this.inputBuffer.indexOf(HEADER_SEPARATOR);
@@ -602,31 +597,26 @@ function isPosition(value) {
602
597
 
603
598
  // ../lsp-core/src/lsp/transport.ts
604
599
  class LspClientNotStartedError extends Error {
605
- serverId;
606
- root;
607
- name = "LspClientNotStartedError";
608
600
  constructor(serverId, root) {
609
601
  super("LSP client not started");
610
602
  this.serverId = serverId;
611
603
  this.root = root;
604
+ this.name = "LspClientNotStartedError";
612
605
  }
613
606
  }
614
607
 
615
608
  class LspClientTransport {
616
- root;
617
- server;
618
- proc = null;
619
- connection = null;
620
- stderrBuffer = [];
621
- processExited = false;
622
- diagnosticsStore = new Map;
623
- requestTimeoutMs;
624
- initializeTimeoutMs;
625
- workspaceApplyEditHandler = null;
626
- diagnosticPullSupported = false;
627
609
  constructor(root, server, timeouts = {}) {
628
610
  this.root = root;
629
611
  this.server = server;
612
+ this.proc = null;
613
+ this.connection = null;
614
+ this.stderrBuffer = [];
615
+ this.processExited = false;
616
+ this.diagnosticsStore = new Map;
617
+ this.workspaceApplyEditHandler = null;
618
+ this.diagnosticPullSupported = false;
619
+ this.documentFormattingSupported = false;
630
620
  this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
631
621
  this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
632
622
  }
@@ -648,6 +638,12 @@ class LspClientTransport {
648
638
  isDiagnosticPullSupported() {
649
639
  return this.diagnosticPullSupported;
650
640
  }
641
+ setDocumentFormattingSupported(supported) {
642
+ this.documentFormattingSupported = supported;
643
+ }
644
+ isDocumentFormattingSupported() {
645
+ return this.documentFormattingSupported;
646
+ }
651
647
  handlePublishDiagnostics(params) {
652
648
  this.diagnosticsStore.set(params.uri, [...params.diagnostics]);
653
649
  }
@@ -861,6 +857,14 @@ function supportsDiagnosticPull(capabilities) {
861
857
  return false;
862
858
  return Object.hasOwn(capabilities, "diagnosticProvider");
863
859
  }
860
+ function supportsDocumentFormatting(capabilities) {
861
+ if (capabilities === undefined)
862
+ return false;
863
+ const provider = capabilities.documentFormattingProvider;
864
+ if (provider === undefined || provider === null || provider === false)
865
+ return false;
866
+ return provider === true || typeof provider === "object";
867
+ }
864
868
 
865
869
  class LspClientConnection extends LspClientTransport {
866
870
  async initialize() {
@@ -877,6 +881,7 @@ class LspClientConnection extends LspClientTransport {
877
881
  references: {},
878
882
  documentSymbol: { hierarchicalDocumentSymbolSupport: true },
879
883
  publishDiagnostics: {},
884
+ formatting: { dynamicRegistration: false },
880
885
  rename: {
881
886
  prepareSupport: true,
882
887
  prepareSupportDefaultBehavior: 1
@@ -918,6 +923,7 @@ class LspClientConnection extends LspClientTransport {
918
923
  initializationOptions: this.server.initialization
919
924
  }, { timeoutMs: this.initializeTimeoutMs });
920
925
  this.setDiagnosticPullSupported(supportsDiagnosticPull(result?.capabilities));
926
+ this.setDocumentFormattingSupported(supportsDocumentFormatting(result?.capabilities));
921
927
  await this.sendNotification("initialized", {});
922
928
  await this.sendNotification("workspace/didChangeConfiguration", {
923
929
  settings: { json: { validate: { enable: true } } }
@@ -1133,16 +1139,12 @@ function movedPath(candidate, oldPath, newPath) {
1133
1139
  }
1134
1140
 
1135
1141
  class WorkspaceDocumentState {
1136
- sendNotification;
1137
- clearDiagnostics;
1138
- openDocuments = new Map;
1139
- openByUri = new Map;
1140
- openPromises = new Map;
1141
- now;
1142
- versionlessPublishQuiescenceMs;
1143
1142
  constructor(sendNotification, clearDiagnostics, options = {}) {
1144
1143
  this.sendNotification = sendNotification;
1145
1144
  this.clearDiagnostics = clearDiagnostics;
1145
+ this.openDocuments = new Map;
1146
+ this.openByUri = new Map;
1147
+ this.openPromises = new Map;
1146
1148
  this.now = options.now ?? (() => Date.now());
1147
1149
  this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
1148
1150
  }
@@ -1406,13 +1408,11 @@ import { dirname, isAbsolute, relative as relative2, resolve as resolve2 } from
1406
1408
  import { fileURLToPath } from "node:url";
1407
1409
 
1408
1410
  class WorkspaceEditPathError extends Error {
1409
- path;
1410
- detail;
1411
- name = "WorkspaceEditPathError";
1412
1411
  constructor(path, detail) {
1413
1412
  super(`${detail}: ${path}`);
1414
1413
  this.path = path;
1415
1414
  this.detail = detail;
1415
+ this.name = "WorkspaceEditPathError";
1416
1416
  }
1417
1417
  }
1418
1418
  function isPathInsideWorkspace(filePath, workspaceRoot) {
@@ -1704,13 +1704,11 @@ function canonicalFingerprint(operations) {
1704
1704
 
1705
1705
  // ../lsp-core/src/lsp/workspace-edit-types.ts
1706
1706
  class WorkspaceEditValidationError extends Error {
1707
- changeIndex;
1708
- detail;
1709
- name = "WorkspaceEditValidationError";
1710
1707
  constructor(changeIndex, detail) {
1711
1708
  super(`change ${changeIndex}: ${detail}`);
1712
1709
  this.changeIndex = changeIndex;
1713
1710
  this.detail = detail;
1711
+ this.name = "WorkspaceEditValidationError";
1714
1712
  }
1715
1713
  }
1716
1714
 
@@ -2208,10 +2206,9 @@ function simulateDelete(operation, virtual) {
2208
2206
  import { existsSync as existsSync4, lstatSync as lstatSync3, readdirSync as readdirSync2 } from "node:fs";
2209
2207
  import { dirname as dirname3, resolve as resolve4 } from "node:path";
2210
2208
  class WorkspaceSnapshotBuilder {
2211
- workspaceRoot;
2212
- snapshots = new Map;
2213
2209
  constructor(workspaceRoot) {
2214
2210
  this.workspaceRoot = workspaceRoot;
2211
+ this.snapshots = new Map;
2215
2212
  }
2216
2213
  build(operations) {
2217
2214
  this.add(this.workspaceRoot, false);
@@ -2255,8 +2252,10 @@ function snapshotOperations(operations, workspaceRoot) {
2255
2252
 
2256
2253
  // ../lsp-core/src/lsp/workspace-edit-plan.ts
2257
2254
  class PlanPathIndex {
2258
- firstChangeByPath = new Map;
2259
- reportedPathByCanonical = new Map;
2255
+ constructor() {
2256
+ this.firstChangeByPath = new Map;
2257
+ this.reportedPathByCanonical = new Map;
2258
+ }
2260
2259
  build(operations) {
2261
2260
  for (const operation of operations) {
2262
2261
  switch (operation.kind) {
@@ -2345,14 +2344,11 @@ function isRecord3(value) {
2345
2344
  }
2346
2345
 
2347
2346
  class WorkspaceMutationController {
2348
- workspaceRoot;
2349
- documents;
2350
- activeLease = null;
2351
- nextLeaseId = 1;
2352
- io;
2353
2347
  constructor(workspaceRoot, documents) {
2354
2348
  this.workspaceRoot = workspaceRoot;
2355
2349
  this.documents = documents;
2350
+ this.activeLease = null;
2351
+ this.nextLeaseId = 1;
2356
2352
  }
2357
2353
  setIo(io) {
2358
2354
  this.io = io;
@@ -2465,12 +2461,9 @@ var DIAGNOSTICS_FRESHNESS_TIMEOUT_MS = 3000;
2465
2461
  var VERSIONLESS_PUBLISH_QUIESCENCE_MS = 250;
2466
2462
 
2467
2463
  class LspClient extends LspClientConnection {
2468
- diagnosticPullErrors = [];
2469
- documents;
2470
- workspaceMutations;
2471
- diagnosticsFreshnessTimeoutMs;
2472
2464
  constructor(root, server, options = {}) {
2473
2465
  super(root, server, options);
2466
+ this.diagnosticPullErrors = [];
2474
2467
  this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
2475
2468
  this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
2476
2469
  versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
@@ -2525,6 +2518,18 @@ class LspClient extends LspClientConnection {
2525
2518
  textDocument: { uri: pathToFileURL3(absPath).href }
2526
2519
  }, options);
2527
2520
  }
2521
+ async formatDocument(filePath, options, signal) {
2522
+ if (!this.isDocumentFormattingSupported())
2523
+ return null;
2524
+ const absPath = this.resolveWorkspacePath(filePath);
2525
+ await this.openFile(absPath);
2526
+ const requestOptions = signal === undefined ? {} : { signal };
2527
+ const edits = await this.sendRequest("textDocument/formatting", {
2528
+ textDocument: { uri: pathToFileURL3(absPath).href },
2529
+ options
2530
+ }, requestOptions);
2531
+ return edits ?? [];
2532
+ }
2528
2533
  async workspaceSymbols(query, signal) {
2529
2534
  const options = signal === undefined ? {} : { signal };
2530
2535
  return this.sendRequest("workspace/symbol", { query }, options);
@@ -2770,18 +2775,14 @@ function awaitWithSignal(promise, signal) {
2770
2775
  }
2771
2776
 
2772
2777
  class LspManager {
2773
- clients = new Map;
2774
- reaperHandle = null;
2775
- signalDisposer = null;
2776
- disposed = false;
2777
- idleTimeoutMs;
2778
- initTimeoutMs;
2779
- reaperIntervalMs;
2780
- clientFactory;
2781
- now;
2782
2778
  constructor(options = {}) {
2779
+ this.clients = new Map;
2780
+ this.reaperHandle = null;
2781
+ this.signalDisposer = null;
2782
+ this.disposed = false;
2783
2783
  this.idleTimeoutMs = options.idleTimeoutMs ?? IDLE_TIMEOUT_MS;
2784
2784
  this.initTimeoutMs = options.initTimeoutMs ?? INIT_TIMEOUT_MS;
2785
+ this.maxResidentClients = options.maxResidentClients ?? MAX_RESIDENT_CLIENTS;
2785
2786
  this.reaperIntervalMs = options.reaperIntervalMs ?? REAPER_INTERVAL_MS;
2786
2787
  this.clientFactory = options.clientFactory ?? ((root, server) => new LspClient(root, server));
2787
2788
  this.now = options.now ?? (() => Date.now());
@@ -2815,6 +2816,26 @@ class LspManager {
2815
2816
  }
2816
2817
  }
2817
2818
  }
2819
+ evictForAdmission() {
2820
+ while (this.clients.size >= this.maxResidentClients) {
2821
+ const victim = this.leastRecentlyUsedIdleClient();
2822
+ if (!victim)
2823
+ return;
2824
+ this.clients.delete(victim.key);
2825
+ stopClientBestEffort(victim.managed.client);
2826
+ }
2827
+ }
2828
+ leastRecentlyUsedIdleClient() {
2829
+ let candidate = null;
2830
+ for (const [key, managed] of this.clients) {
2831
+ if (managed.refCount > 0 || managed.pendingWaiters > 0 || managed.isInitializing)
2832
+ continue;
2833
+ if (candidate === null || managed.lastUsedAt < candidate.managed.lastUsedAt) {
2834
+ candidate = { key, managed };
2835
+ }
2836
+ }
2837
+ return candidate;
2838
+ }
2818
2839
  async tryDeleteIfOrphaned(key, managed) {
2819
2840
  if (managed.refCount === 0 && managed.pendingWaiters === 0 && !managed.isInitializing && this.clients.get(key) === managed) {
2820
2841
  this.clients.delete(key);
@@ -2861,6 +2882,7 @@ class LspManager {
2861
2882
  managed.lastUsedAt = this.now();
2862
2883
  return managed.client;
2863
2884
  }
2885
+ this.evictForAdmission();
2864
2886
  const client = this.clientFactory(root, server);
2865
2887
  const initStartedAt = this.now();
2866
2888
  const initPromise = (async () => {
@@ -2923,6 +2945,7 @@ class LspManager {
2923
2945
  const key = this.getKey(root, server.id);
2924
2946
  if (this.clients.has(key))
2925
2947
  return;
2948
+ this.evictForAdmission();
2926
2949
  const client = this.clientFactory(root, server);
2927
2950
  const initStartedAt = this.now();
2928
2951
  const initPromise = (async () => {
@@ -3011,7 +3034,7 @@ async function disposeDefaultLspManager() {
3011
3034
  }
3012
3035
  }
3013
3036
  export {
3014
- getLspManager,
3037
+ LspManager,
3015
3038
  disposeDefaultLspManager,
3016
- LspManager
3039
+ getLspManager
3017
3040
  };