@hydranium/cli 1.0.0-next.42 → 1.0.0-next.421

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 (371) hide show
  1. package/README.md +125 -204
  2. package/bin/hydranium-cli.js +13 -0
  3. package/heap-analysis/heap/core/load.mjs +2 -2
  4. package/heap-analysis/heap/langium/langium.classifier.mjs +22 -11
  5. package/lib/cli-version.js.map +1 -1
  6. package/lib/cli.js +11 -2
  7. package/lib/cli.js.map +1 -1
  8. package/lib/commands/analyze-heap-args.d.ts.map +1 -1
  9. package/lib/commands/analyze-heap-args.js +1 -2
  10. package/lib/commands/analyze-heap-args.js.map +1 -1
  11. package/lib/commands/analyze-heap.d.ts +3 -0
  12. package/lib/commands/analyze-heap.d.ts.map +1 -1
  13. package/lib/commands/analyze-heap.js +2 -1
  14. package/lib/commands/analyze-heap.js.map +1 -1
  15. package/lib/commands/ast-ground-truth-args.d.ts +3 -2
  16. package/lib/commands/ast-ground-truth-args.d.ts.map +1 -1
  17. package/lib/commands/ast-ground-truth-args.js +12 -10
  18. package/lib/commands/ast-ground-truth-args.js.map +1 -1
  19. package/lib/commands/ast-ground-truth-driver.js +4 -2
  20. package/lib/commands/ast-ground-truth-driver.js.map +1 -1
  21. package/lib/commands/ast-ground-truth.js +1 -1
  22. package/lib/commands/ast-ground-truth.js.map +1 -1
  23. package/lib/commands/check-skills-args.d.ts +11 -0
  24. package/lib/commands/check-skills-args.d.ts.map +1 -0
  25. package/lib/commands/check-skills-args.js +71 -0
  26. package/lib/commands/check-skills-args.js.map +1 -0
  27. package/lib/commands/client-session.d.ts +17 -0
  28. package/lib/commands/client-session.d.ts.map +1 -0
  29. package/lib/commands/client-session.js +27 -0
  30. package/lib/commands/client-session.js.map +1 -0
  31. package/lib/commands/create-args.d.ts +17 -0
  32. package/lib/commands/create-args.d.ts.map +1 -0
  33. package/lib/commands/create-args.js +53 -0
  34. package/lib/commands/create-args.js.map +1 -0
  35. package/lib/commands/create.d.ts +38 -0
  36. package/lib/commands/create.d.ts.map +1 -0
  37. package/lib/commands/create.js +43 -0
  38. package/lib/commands/create.js.map +1 -0
  39. package/lib/commands/delete-args.d.ts +17 -0
  40. package/lib/commands/delete-args.d.ts.map +1 -0
  41. package/lib/commands/delete-args.js +49 -0
  42. package/lib/commands/delete-args.js.map +1 -0
  43. package/lib/commands/delete.d.ts +30 -0
  44. package/lib/commands/delete.d.ts.map +1 -0
  45. package/lib/commands/delete.js +32 -0
  46. package/lib/commands/delete.js.map +1 -0
  47. package/lib/commands/generate-ast-builder.d.ts +1 -1
  48. package/lib/commands/generate-ast-builder.d.ts.map +1 -1
  49. package/lib/commands/generate-ast-builder.js +2 -11
  50. package/lib/commands/generate-ast-builder.js.map +1 -1
  51. package/lib/commands/generate-languages.d.ts +35 -0
  52. package/lib/commands/generate-languages.d.ts.map +1 -0
  53. package/lib/commands/generate-languages.js +105 -0
  54. package/lib/commands/generate-languages.js.map +1 -0
  55. package/lib/commands/generate-transfer-builder.d.ts +33 -0
  56. package/lib/commands/generate-transfer-builder.d.ts.map +1 -0
  57. package/lib/commands/generate-transfer-builder.js +86 -0
  58. package/lib/commands/generate-transfer-builder.js.map +1 -0
  59. package/lib/commands/generate-transfer-model-args.d.ts.map +1 -1
  60. package/lib/commands/generate-transfer-model-args.js +20 -5
  61. package/lib/commands/generate-transfer-model-args.js.map +1 -1
  62. package/lib/commands/generate-transfer-model-config.d.ts.map +1 -1
  63. package/lib/commands/generate-transfer-model-config.js +8 -3
  64. package/lib/commands/generate-transfer-model-config.js.map +1 -1
  65. package/lib/commands/generate-transfer-model.d.ts +41 -9
  66. package/lib/commands/generate-transfer-model.d.ts.map +1 -1
  67. package/lib/commands/generate-transfer-model.js +225 -68
  68. package/lib/commands/generate-transfer-model.js.map +1 -1
  69. package/lib/commands/generated-module-path.d.ts +16 -0
  70. package/lib/commands/generated-module-path.d.ts.map +1 -0
  71. package/lib/commands/generated-module-path.js +21 -0
  72. package/lib/commands/generated-module-path.js.map +1 -0
  73. package/lib/commands/harness-args.d.ts +46 -43
  74. package/lib/commands/harness-args.d.ts.map +1 -1
  75. package/lib/commands/harness-args.js +170 -29
  76. package/lib/commands/harness-args.js.map +1 -1
  77. package/lib/commands/headless-harness.d.ts +37 -20
  78. package/lib/commands/headless-harness.d.ts.map +1 -1
  79. package/lib/commands/headless-harness.js +71 -19
  80. package/lib/commands/headless-harness.js.map +1 -1
  81. package/lib/commands/init-args.d.ts +5 -18
  82. package/lib/commands/init-args.d.ts.map +1 -1
  83. package/lib/commands/init-args.js +131 -35
  84. package/lib/commands/init-args.js.map +1 -1
  85. package/lib/commands/init-hosts.d.ts +24 -0
  86. package/lib/commands/init-hosts.d.ts.map +1 -0
  87. package/lib/commands/init-hosts.js +37 -0
  88. package/lib/commands/init-hosts.js.map +1 -0
  89. package/lib/commands/init-prompt.d.ts +3 -3
  90. package/lib/commands/init-prompt.d.ts.map +1 -1
  91. package/lib/commands/init-prompt.js +4 -5
  92. package/lib/commands/init-prompt.js.map +1 -1
  93. package/lib/commands/init-skills.d.ts +41 -0
  94. package/lib/commands/init-skills.d.ts.map +1 -0
  95. package/lib/commands/init-skills.js +110 -0
  96. package/lib/commands/init-skills.js.map +1 -0
  97. package/lib/commands/init-templates.d.ts +20 -14
  98. package/lib/commands/init-templates.d.ts.map +1 -1
  99. package/lib/commands/init-templates.js +3134 -763
  100. package/lib/commands/init-templates.js.map +1 -1
  101. package/lib/commands/init-wizard.d.ts +10 -0
  102. package/lib/commands/init-wizard.d.ts.map +1 -1
  103. package/lib/commands/init-wizard.js +76 -31
  104. package/lib/commands/init-wizard.js.map +1 -1
  105. package/lib/commands/init-workspace.d.ts +13 -11
  106. package/lib/commands/init-workspace.d.ts.map +1 -1
  107. package/lib/commands/init-workspace.js +21 -7
  108. package/lib/commands/init-workspace.js.map +1 -1
  109. package/lib/commands/init.d.ts +61 -24
  110. package/lib/commands/init.d.ts.map +1 -1
  111. package/lib/commands/init.js +244 -50
  112. package/lib/commands/init.js.map +1 -1
  113. package/lib/commands/kebab.d.ts +15 -0
  114. package/lib/commands/kebab.d.ts.map +1 -0
  115. package/lib/commands/kebab.js +17 -0
  116. package/lib/commands/kebab.js.map +1 -0
  117. package/lib/commands/lint-grammar-args.d.ts +3 -2
  118. package/lib/commands/lint-grammar-args.d.ts.map +1 -1
  119. package/lib/commands/lint-grammar-args.js +14 -11
  120. package/lib/commands/lint-grammar-args.js.map +1 -1
  121. package/lib/commands/lint-grammar-driver.js +2 -1
  122. package/lib/commands/lint-grammar-driver.js.map +1 -1
  123. package/lib/commands/lint-grammar-report.js.map +1 -1
  124. package/lib/commands/lint-grammar.js +1 -1
  125. package/lib/commands/lint-grammar.js.map +1 -1
  126. package/lib/commands/measure-memory-args.d.ts +3 -2
  127. package/lib/commands/measure-memory-args.d.ts.map +1 -1
  128. package/lib/commands/measure-memory-args.js +26 -14
  129. package/lib/commands/measure-memory-args.js.map +1 -1
  130. package/lib/commands/measure-memory-driver.js +5 -3
  131. package/lib/commands/measure-memory-driver.js.map +1 -1
  132. package/lib/commands/measure-memory.d.ts +1 -1
  133. package/lib/commands/measure-memory.d.ts.map +1 -1
  134. package/lib/commands/measure-memory.js +6 -3
  135. package/lib/commands/measure-memory.js.map +1 -1
  136. package/lib/commands/message-catalogue-args.d.ts +16 -0
  137. package/lib/commands/message-catalogue-args.d.ts.map +1 -0
  138. package/lib/commands/message-catalogue-args.js +53 -0
  139. package/lib/commands/message-catalogue-args.js.map +1 -0
  140. package/lib/commands/message-catalogue.d.ts +21 -0
  141. package/lib/commands/message-catalogue.d.ts.map +1 -0
  142. package/lib/commands/message-catalogue.js +48 -0
  143. package/lib/commands/message-catalogue.js.map +1 -0
  144. package/lib/commands/model-docs-args.d.ts +4 -3
  145. package/lib/commands/model-docs-args.d.ts.map +1 -1
  146. package/lib/commands/model-docs-args.js +13 -11
  147. package/lib/commands/model-docs-args.js.map +1 -1
  148. package/lib/commands/model-docs-driver.js +2 -1
  149. package/lib/commands/model-docs-driver.js.map +1 -1
  150. package/lib/commands/model-docs.js +1 -1
  151. package/lib/commands/model-docs.js.map +1 -1
  152. package/lib/commands/projects-args.d.ts.map +1 -1
  153. package/lib/commands/projects-args.js +5 -5
  154. package/lib/commands/projects-args.js.map +1 -1
  155. package/lib/commands/projects.d.ts +3 -4
  156. package/lib/commands/projects.d.ts.map +1 -1
  157. package/lib/commands/projects.js +2 -2
  158. package/lib/commands/projects.js.map +1 -1
  159. package/lib/commands/query-args.d.ts.map +1 -1
  160. package/lib/commands/query-args.js +6 -5
  161. package/lib/commands/query-args.js.map +1 -1
  162. package/lib/commands/query.d.ts +6 -5
  163. package/lib/commands/query.d.ts.map +1 -1
  164. package/lib/commands/query.js +5 -4
  165. package/lib/commands/query.js.map +1 -1
  166. package/lib/commands/reflect-args.d.ts +3 -2
  167. package/lib/commands/reflect-args.d.ts.map +1 -1
  168. package/lib/commands/reflect-args.js +14 -11
  169. package/lib/commands/reflect-args.js.map +1 -1
  170. package/lib/commands/reflect-driver.js +2 -1
  171. package/lib/commands/reflect-driver.js.map +1 -1
  172. package/lib/commands/reflect-report.js.map +1 -1
  173. package/lib/commands/reflect.js +1 -1
  174. package/lib/commands/reflect.js.map +1 -1
  175. package/lib/commands/save-args.d.ts.map +1 -1
  176. package/lib/commands/save-args.js +7 -4
  177. package/lib/commands/save-args.js.map +1 -1
  178. package/lib/commands/save.d.ts +8 -4
  179. package/lib/commands/save.d.ts.map +1 -1
  180. package/lib/commands/save.js +12 -23
  181. package/lib/commands/save.js.map +1 -1
  182. package/lib/commands/skills.d.ts +22 -0
  183. package/lib/commands/skills.d.ts.map +1 -0
  184. package/lib/commands/skills.js +129 -0
  185. package/lib/commands/skills.js.map +1 -0
  186. package/lib/commands/validate-args.d.ts +3 -2
  187. package/lib/commands/validate-args.d.ts.map +1 -1
  188. package/lib/commands/validate-args.js +14 -11
  189. package/lib/commands/validate-args.js.map +1 -1
  190. package/lib/commands/validate-driver.js +2 -1
  191. package/lib/commands/validate-driver.js.map +1 -1
  192. package/lib/commands/validate-report.js.map +1 -1
  193. package/lib/commands/validate.js +1 -1
  194. package/lib/commands/validate.js.map +1 -1
  195. package/lib/commands/watch-args.d.ts.map +1 -1
  196. package/lib/commands/watch-args.js +6 -4
  197. package/lib/commands/watch-args.js.map +1 -1
  198. package/lib/commands/watch.d.ts +3 -4
  199. package/lib/commands/watch.d.ts.map +1 -1
  200. package/lib/commands/watch.js +5 -2
  201. package/lib/commands/watch.js.map +1 -1
  202. package/lib/driver-heap.d.ts +52 -0
  203. package/lib/driver-heap.d.ts.map +1 -0
  204. package/lib/driver-heap.js +51 -0
  205. package/lib/driver-heap.js.map +1 -0
  206. package/lib/index.d.ts +3 -0
  207. package/lib/index.d.ts.map +1 -1
  208. package/lib/index.js +3 -0
  209. package/lib/index.js.map +1 -1
  210. package/lib/log-level.d.ts +21 -11
  211. package/lib/log-level.d.ts.map +1 -1
  212. package/lib/log-level.js +25 -14
  213. package/lib/log-level.js.map +1 -1
  214. package/lib/spawn-data-server.d.ts +9 -4
  215. package/lib/spawn-data-server.d.ts.map +1 -1
  216. package/lib/spawn-data-server.js +5 -4
  217. package/lib/spawn-data-server.js.map +1 -1
  218. package/lib/stderr-connection-logger.d.ts +12 -0
  219. package/lib/stderr-connection-logger.d.ts.map +1 -0
  220. package/lib/stderr-connection-logger.js +16 -0
  221. package/lib/stderr-connection-logger.js.map +1 -0
  222. package/lib/testing/echo-server.js +9 -1
  223. package/lib/testing/echo-server.js.map +1 -1
  224. package/package.json +99 -41
  225. package/src/cli.ts +11 -2
  226. package/src/commands/analyze-heap-args.ts +1 -2
  227. package/src/commands/analyze-heap.ts +4 -1
  228. package/src/commands/ast-ground-truth-args.ts +16 -13
  229. package/src/commands/ast-ground-truth-driver.ts +4 -2
  230. package/src/commands/ast-ground-truth.ts +1 -1
  231. package/src/commands/check-skills-args.ts +70 -0
  232. package/src/commands/client-session.ts +33 -0
  233. package/src/commands/create-args.ts +68 -0
  234. package/src/commands/create.ts +83 -0
  235. package/src/commands/delete-args.ts +64 -0
  236. package/src/commands/delete.ts +61 -0
  237. package/src/commands/generate-ast-builder.ts +2 -12
  238. package/src/commands/generate-languages.ts +132 -0
  239. package/src/commands/generate-transfer-builder.ts +101 -0
  240. package/src/commands/generate-transfer-model-args.ts +20 -5
  241. package/src/commands/generate-transfer-model-config.ts +8 -3
  242. package/src/commands/generate-transfer-model.ts +297 -66
  243. package/src/commands/generated-module-path.ts +22 -0
  244. package/src/commands/harness-args.ts +163 -33
  245. package/src/commands/headless-harness.ts +89 -28
  246. package/src/commands/init-args.ts +135 -35
  247. package/src/commands/init-hosts.ts +51 -0
  248. package/src/commands/init-prompt.ts +5 -6
  249. package/src/commands/init-skills.ts +129 -0
  250. package/src/commands/init-templates.ts +3326 -785
  251. package/src/commands/init-wizard.ts +97 -32
  252. package/src/commands/init-workspace.ts +31 -16
  253. package/src/commands/init.ts +311 -65
  254. package/src/commands/kebab.ts +17 -0
  255. package/src/commands/lint-grammar-args.ts +18 -14
  256. package/src/commands/lint-grammar-driver.ts +2 -1
  257. package/src/commands/lint-grammar.ts +1 -1
  258. package/src/commands/measure-memory-args.ts +31 -17
  259. package/src/commands/measure-memory-driver.ts +5 -3
  260. package/src/commands/measure-memory.ts +6 -3
  261. package/src/commands/message-catalogue-args.ts +55 -0
  262. package/src/commands/message-catalogue.ts +56 -0
  263. package/src/commands/model-docs-args.ts +17 -14
  264. package/src/commands/model-docs-driver.ts +2 -1
  265. package/src/commands/model-docs.ts +1 -1
  266. package/src/commands/projects-args.ts +5 -4
  267. package/src/commands/projects.ts +4 -6
  268. package/src/commands/query-args.ts +6 -4
  269. package/src/commands/query.ts +9 -9
  270. package/src/commands/reflect-args.ts +18 -14
  271. package/src/commands/reflect-driver.ts +2 -1
  272. package/src/commands/reflect.ts +1 -1
  273. package/src/commands/save-args.ts +7 -3
  274. package/src/commands/save.ts +24 -27
  275. package/src/commands/skills.ts +146 -0
  276. package/src/commands/validate-args.ts +18 -14
  277. package/src/commands/validate-driver.ts +2 -1
  278. package/src/commands/validate.ts +1 -1
  279. package/src/commands/watch-args.ts +6 -3
  280. package/src/commands/watch.ts +7 -6
  281. package/src/driver-heap.ts +65 -0
  282. package/src/index.ts +3 -0
  283. package/src/log-level.ts +42 -14
  284. package/src/spawn-data-server.ts +17 -5
  285. package/src/stderr-connection-logger.ts +18 -0
  286. package/src/testing/echo-server.ts +11 -2
  287. package/templates/client/gitignore +3 -0
  288. package/templates/client/src/__GRAMMAR_ID__-diagram-module.ts +82 -0
  289. package/templates/editorconfig +15 -0
  290. package/templates/gitignore +1 -0
  291. package/templates/host-browser/esbuild.mjs +82 -0
  292. package/templates/host-browser/gitignore +4 -0
  293. package/templates/host-browser/hydranium-mark.svg +40 -0
  294. package/templates/host-browser/index.html +287 -0
  295. package/templates/host-browser/playwright.config.mts +24 -0
  296. package/templates/host-browser/src/data-status.ts +15 -0
  297. package/templates/host-browser/src/diagram-save.ts +60 -0
  298. package/templates/host-browser/src/diagram.ts +121 -0
  299. package/templates/host-browser/src/editor.ts +116 -0
  300. package/templates/host-browser/src/log.ts +14 -0
  301. package/templates/host-browser/src/monaco-editor-core-worker.d.ts +7 -0
  302. package/templates/host-browser/src/monaco-editor-worker.ts +10 -0
  303. package/templates/host-browser/src/posix-path-shim.ts +23 -0
  304. package/templates/host-browser/src/shown-file.ts +61 -0
  305. package/templates/host-browser/src/workspace.ts +5 -0
  306. package/templates/host-browser/tsconfig.e2e.json +16 -0
  307. package/templates/host-browser/tsconfig.page.json +16 -0
  308. package/templates/host-browser/tsconfig.worker.json +16 -0
  309. package/templates/host-theia-browser/esbuild.mjs +24 -0
  310. package/templates/host-theia-browser/gitignore +9 -0
  311. package/templates/host-theia-browser/playwright.config.mts +42 -0
  312. package/templates/host-theia-browser/start.mjs +50 -0
  313. package/templates/host-theia-browser/tsconfig.e2e.json +16 -0
  314. package/templates/host-theia-electron/esbuild.mjs +27 -0
  315. package/templates/host-theia-electron/gitignore +8 -0
  316. package/templates/host-theia-electron/playwright.config.mts +12 -0
  317. package/templates/host-theia-electron/start.mjs +47 -0
  318. package/templates/host-theia-electron/tsconfig.e2e.json +16 -0
  319. package/templates/host-vscode/esbuild.mjs +38 -0
  320. package/templates/host-vscode/gitignore +7 -0
  321. package/templates/host-vscode/playwright.config.mts +14 -0
  322. package/templates/host-vscode/src/__GRAMMAR_ID__-diagram-editor.ts +19 -0
  323. package/templates/host-vscode/src/show-model-command.ts +24 -0
  324. package/templates/host-vscode/src/webview/__GRAMMAR_ID__-diagram.ts +18 -0
  325. package/templates/host-vscode/src/webview/diagram.css +40 -0
  326. package/templates/host-vscode/start.mjs +22 -0
  327. package/templates/host-vscode/test/content-server.cjs +40 -0
  328. package/templates/host-vscode/test/install-vscode.mts +21 -0
  329. package/templates/host-vscode/test/virtual-documents.spec.mts +28 -0
  330. package/templates/host-vscode/test/vscode-version.mts +10 -0
  331. package/templates/host-vscode/tsconfig.e2e.json +17 -0
  332. package/templates/host-vscode/tsconfig.json +19 -0
  333. package/templates/host-vscode/tsconfig.webview.json +17 -0
  334. package/templates/oxlintrc.json +4 -0
  335. package/templates/protocol/gitignore +3 -0
  336. package/templates/protocol/src/__GRAMMAR_ID__-diagram-types.ts +47 -0
  337. package/templates/server/gitignore +6 -0
  338. package/templates/server/src/glsp/__GRAMMAR_ID__/create-node-operation-handler.ts +62 -0
  339. package/templates/server/src/glsp/__GRAMMAR_ID__/delete-operation-handler.ts +63 -0
  340. package/templates/server/src/glsp/__GRAMMAR_ID__/gmodel-factory.ts +144 -0
  341. package/templates/server/src/glsp/__GRAMMAR_ID__/state.ts +18 -0
  342. package/templates/server/src/glsp/__GRAMMAR_ID__/storage.ts +16 -0
  343. package/templates/server/src/glsp/__GRAMMAR_ID__/submission-handler.ts +24 -0
  344. package/templates/server/src/grammar/common.langium +12 -0
  345. package/templates/server/src/language-server/__GRAMMAR_ID__-semantic-tokens.ts +10 -0
  346. package/templates/server/src/language-server/__GRAMMAR_ID__-serializer.ts +53 -0
  347. package/templates/server/src/language-server/__GRAMMAR_ID__-validation.ts +30 -0
  348. package/templates/server/src/language-server/ast.ts +23 -0
  349. package/templates/server/src/node/services.ts +16 -0
  350. package/templates/server/test/__GRAMMAR_ID__-diagram.test.ts +403 -0
  351. package/templates/server/test/__GRAMMAR_ID__-semantic-tokens.test.ts +34 -0
  352. package/templates/server/test/tsconfig.json +4 -0
  353. package/templates/server/tsconfig.test.json +10 -0
  354. package/templates/server/vitest.config.ts +14 -0
  355. package/templates/theia/gitignore +3 -0
  356. package/templates/theia/src/browser/__GRAMMAR_ID__-diagram-frontend-module.ts +65 -0
  357. package/templates/theia/src/browser/__PROJECT_ID__-connection-preload-module.ts +15 -0
  358. package/templates/theia/src/browser/__PROJECT_ID__-data-connection.ts +15 -0
  359. package/templates/theia/src/browser/__PROJECT_ID__-data-port.ts +11 -0
  360. package/templates/theia/src/browser/__PROJECT_ID__-glsp-client-contribution.ts +13 -0
  361. package/templates/theia/src/browser/__PROJECT_ID__-show-model-command.ts +51 -0
  362. package/templates/theia/src/common/__PROJECT_ID__-glsp-contribution.ts +3 -0
  363. package/templates/theia/src/node/__PROJECT_ID__-connection-backend-module.ts +12 -0
  364. package/templates/theia/src/node/__PROJECT_ID__-data-backend-module.ts +15 -0
  365. package/templates/theia/src/node/__PROJECT_ID__-glsp-backend-module.ts +16 -0
  366. package/templates/theia/style/diagram.css +20 -0
  367. package/templates/theia/tsconfig.json +24 -0
  368. package/templates/vscode-servers/gitignore +4 -0
  369. package/templates/vscode-servers/tsconfig.json +19 -0
  370. package/templates/workspace/nodes.__EXTENSION__ +5 -0
  371. package/templates/workspace/references.__EXTENSION__ +2 -0
@@ -7,6 +7,7 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { fileURLToPath } from 'node:url';
10
+ import { driverHeapArgs } from '../driver-heap.js';
10
11
  import { spawnNodeChild } from './headless-harness.js';
11
12
  /**
12
13
  * Absolute path to the bundled memlab-based analyzer (a standalone ESM script
@@ -55,7 +56,7 @@ export async function runAnalyzeHeap(args, deps = {}) {
55
56
  return;
56
57
  }
57
58
  const spawnChild = deps.__spawnForTest ?? spawnNodeChild;
58
- const code = await spawnChild(['--max-old-space-size=8192', ANALYZER, ...args]);
59
+ const code = await spawnChild([...driverHeapArgs(deps.__heapReadingForTest), ANALYZER, ...args]);
59
60
  if (code) {
60
61
  process.exitCode = code;
61
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-heap.js","sourceRoot":"","sources":["../../src/commands/analyze-heap.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,sCAAsC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAEjG,+FAA+F;AAC/F,SAAS,eAAe;IACrB,MAAM,OAAO,GAAI,MAAM,CAAC,IAAoD,CAAC,OAAO,CAAC;IACrF,IAAI,CAAC;QACF,OAAO,EAAE,CAAC,uBAAuB,CAAC,CAAC;QACnC,OAAO,OAAO,KAAK,SAAS,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACN,OAAO,KAAK,CAAC;IAChB,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAUlC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAc,EAAE,OAAwB,EAAE;IAC5E,MAAM,iBAAiB,GAAG,IAAI,CAAC,wBAAwB,IAAI,eAAe,CAAC;IAC3E,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACrD,OAAO,CAAC,KAAK,CACV,qFAAqF;YAClF,s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C;IAC3E,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,CAAC;QACrD,OAAO,CAAC,KAAK,CACV,qFAAqF;YAClF,sFAAsF;YACtF,kDAAkD,CACvD,CAAC;QACF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACV,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC;IACzD,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IACjG,IAAI,IAAI,EAAE,CAAC;QACR,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;IAC3B,CAAC;AACJ,CAAC"}
@@ -10,8 +10,9 @@ import { type AstGroundTruthCommandOptions } from './ast-ground-truth.js';
10
10
  import { type UsageError } from './harness-args.js';
11
11
  /**
12
12
  * Every flag `ast-ground-truth` accepts, derived from the sets the parser is
13
- * handed so the list cannot claim a flag the parser would reject. `--services`
14
- * is consumed by the shared harness parser itself, so it is in neither set.
13
+ * handed so the list cannot claim a flag the parser would reject.
14
+ * {@link HARNESS_VALUE_FLAGS} are consumed by the shared harness parser itself,
15
+ * so they are in neither set.
15
16
  */
16
17
  export declare const AST_GROUND_TRUTH_FLAGS: readonly string[];
17
18
  /** The subset that takes a value, so `--help` in a value position reads as data. */
@@ -1 +1 @@
1
- {"version":3,"file":"ast-ground-truth-args.d.ts","sourceRoot":"","sources":["../../src/commands/ast-ground-truth-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAqB,KAAK,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EASJ,KAAK,UAAU,EACjB,MAAM,mBAAmB,CAAC;AAK3B;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAAoC,CAAC;AAEzF,oFAAoF;AACpF,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAA2B,CAAC;AAEtF,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAalD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAA0B,GAAG,4BAA4B,CAGzH;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAMtE"}
1
+ {"version":3,"file":"ast-ground-truth-args.d.ts","sourceRoot":"","sources":["../../src/commands/ast-ground-truth-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAqB,KAAK,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EAUJ,KAAK,UAAU,EACjB,MAAM,mBAAmB,CAAC;AAK3B;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAA6C,CAAC;AAElG,oFAAoF;AACpF,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAA2B,CAAC;AAEtF,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAclD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAA0B,GAAG,4BAA4B,CAGzH;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAMtE"}
@@ -7,20 +7,21 @@
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
9
  import { runAstGroundTruth } from './ast-ground-truth.js';
10
- import { exitWithUsage, helpRequested, LOG_LEVEL_FLAG, logLevelHelpLine, logLevelOption, parseHarnessArgs, printHelp, SERVICES_FLAG } from './harness-args.js';
10
+ import { exitWithUsage, HARNESS_VALUE_FLAGS, helpRequested, importHelpLines, LOG_VALUE_FLAGS, logHelpLines, logOptions, parseHarnessArgs, printHelp } from './harness-args.js';
11
11
  import { OUT_FILE_FLAG } from './headless-harness.js';
12
- const VALUE_FLAGS = [OUT_FILE_FLAG, LOG_LEVEL_FLAG];
12
+ const VALUE_FLAGS = [OUT_FILE_FLAG, ...LOG_VALUE_FLAGS];
13
13
  /**
14
14
  * Every flag `ast-ground-truth` accepts, derived from the sets the parser is
15
- * handed so the list cannot claim a flag the parser would reject. `--services`
16
- * is consumed by the shared harness parser itself, so it is in neither set.
15
+ * handed so the list cannot claim a flag the parser would reject.
16
+ * {@link HARNESS_VALUE_FLAGS} are consumed by the shared harness parser itself,
17
+ * so they are in neither set.
17
18
  */
18
- export const AST_GROUND_TRUTH_FLAGS = [SERVICES_FLAG, ...VALUE_FLAGS];
19
+ export const AST_GROUND_TRUTH_FLAGS = [...HARNESS_VALUE_FLAGS, ...VALUE_FLAGS];
19
20
  /** The subset that takes a value, so `--help` in a value position reads as data. */
20
21
  export const AST_GROUND_TRUTH_VALUE_FLAGS = AST_GROUND_TRUTH_FLAGS;
21
22
  /** The `--help` text, as data, held to {@link AST_GROUND_TRUTH_FLAGS} by a test. */
22
23
  export const AST_GROUND_TRUTH_HELP = [
23
- 'Usage: hydranium-cli ast-ground-truth --services <module> <workspace> [--out-file <file>] [--log-level <lvl>]',
24
+ 'Usage: hydranium-cli ast-ground-truth [--services <module>] [--import <specifier>]... <workspace> [--out-file <file>] [--log-level <lvl>] [--log-file <file>] [--log-file-level <lvl>]',
24
25
  '',
25
26
  "Tally a workspace's live-model AST nodes by `$type` — the ground truth that",
26
27
  '`analyze-heap --validate <gt.json>` checks a heap snapshot against. `<module>`',
@@ -28,14 +29,15 @@ export const AST_GROUND_TRUTH_HELP = [
28
29
  '`{ documents, totalAstNodes, byType }` JSON on stdout (or `--out-file`).',
29
30
  '',
30
31
  'Options:',
31
- ' --services <module> ESM module exporting `createServices(): { shared }` (required).',
32
+ ' --services <module> ESM module exporting `createServices(): { shared }` (required) unless package.json sets hydranium.services.',
33
+ ...importHelpLines(22),
32
34
  ' <workspace> Workspace root (path or file URI) to build (required).',
33
35
  ' --out-file <file> Write the JSON to this file instead of stdout.',
34
- logLevelHelpLine(22)
36
+ ...logHelpLines(22)
35
37
  ];
36
38
  export function parseAstGroundTruthArgs(args, onError = exitWithUsage) {
37
- const { servicesModule, workspace, options } = parseHarnessArgs(args, 'ast-ground-truth', VALUE_FLAGS, [], { onError });
38
- return { servicesModule, workspace, outFile: options[OUT_FILE_FLAG], logLevel: logLevelOption(options[LOG_LEVEL_FLAG]) };
39
+ const { servicesModule, imports, workspace, options } = parseHarnessArgs(args, 'ast-ground-truth', VALUE_FLAGS, [], { onError });
40
+ return { servicesModule, imports, workspace, outFile: options[OUT_FILE_FLAG], ...logOptions(options) };
39
41
  }
40
42
  export function runAstGroundTruthCommand(args) {
41
43
  if (helpRequested(args, AST_GROUND_TRUTH_VALUE_FLAGS)) {
@@ -1 +1 @@
1
- {"version":3,"file":"ast-ground-truth-args.js","sourceRoot":"","sources":["../../src/commands/ast-ground-truth-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,iBAAiB,EAAqC,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EACJ,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,aAAa,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,WAAW,GAAG,CAAC,aAAa,EAAE,cAAc,CAAU,CAAC;AAE7D;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB,CAAC,aAAa,EAAE,GAAG,WAAW,CAAC,CAAC;AAEzF,oFAAoF;AACpF,MAAM,CAAC,MAAM,4BAA4B,GAAsB,sBAAsB,CAAC;AAEtF,oFAAoF;AACpF,MAAM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--out-file`). Never imported — only spawned.
15
15
  */
16
16
  import * as fs from 'node:fs';
17
+ import { describeError } from '@hydranium/protocol';
17
18
  import { loadHeadlessContext, OUT_FILE_FLAG } from './headless-harness.js';
18
19
  function parseArgs(argv) {
19
20
  const parsed = {};
@@ -57,7 +58,8 @@ async function main(argv) {
57
58
  if (args.outFile) {
58
59
  fs.writeFileSync(args.outFile, `${json}\n`);
59
60
  // Progress to stderr keeps stdout clean for callers that capture either form.
60
- console.error(`Ground truth: ${result.documents} docs, ${result.totalAstNodes} AST nodes -> ${args.outFile}`);
61
+ // Not `console.error`, which a configured log file records as an error line.
62
+ process.stderr.write(`Ground truth: ${result.documents} docs, ${result.totalAstNodes} AST nodes -> ${args.outFile}\n`);
61
63
  }
62
64
  else {
63
65
  console.log(json);
@@ -66,7 +68,7 @@ async function main(argv) {
66
68
  main(process.argv.slice(2))
67
69
  .then(() => process.exit(0))
68
70
  .catch((error) => {
69
- console.error(error instanceof Error ? error.message : String(error));
71
+ console.error(describeError(error));
70
72
  process.exit(1);
71
73
  });
72
74
  //# sourceMappingURL=ast-ground-truth-driver.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast-ground-truth-driver.js","sourceRoot":"","sources":["../../src/commands/ast-ground-truth-driver.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQ3E,SAAS,SAAS,CAAC,IAAc;IAC9B,MAAM,MAAM,GAAe,EAAE,CAAC;IAC9B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACnD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,MAAM,IAAI,GAAG,GAAW,EAAE;YACvB,MAAM,KAAK,GAA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C;QAC9F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnB,CAAC;IACD,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACpF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,qBAAqB,CAAC,EAAE,cAAc,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IACnG,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;IAClD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,CAAC;QAC5C,8EAA8E;QAC9E,6EAA6E;QAC7E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,iBAAiB,MAAM,CAAC,SAAS,UAAU,MAAM,CAAC,aAAa,iBAAiB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;IAC1H,CAAC;SAAM,CAAC;QACL,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;AACJ,CAAC;AAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;KACvB,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC3B,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACvB,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC"}
@@ -31,6 +31,6 @@ export function buildGroundTruthDriverArgs(options) {
31
31
  * `--out-file`). No `--expose-gc` needed — this walks the AST, it does not weigh it.
32
32
  */
33
33
  export function runAstGroundTruth(options) {
34
- return runDriverChild(['--max-old-space-size=8192', DRIVER, ...buildGroundTruthDriverArgs(options)], options);
34
+ return runDriverChild([DRIVER, ...buildGroundTruthDriverArgs(options)], options);
35
35
  }
36
36
  //# sourceMappingURL=ast-ground-truth.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ast-ground-truth.js","sourceRoot":"","sources":["../../src/commands/ast-ground-truth.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,cAAc,EAA2B,MAAM,uBAAuB,CAAC;AAE/F;;;GAGG;AACH,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,8BAA8B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAYvF,oEAAoE;AACpE,MAAM,UAAU,0BAA0B,CAAC,OAAqC;IAC7E,MAAM,IAAI,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACvE,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,IAAI,CAAC;AACf,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAqC;IACpE,OAAO,cAAc,CAAC,CAAC,2BAA2B,EAAE,MAAM,EAAE,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACjH,CAAC"}
1
+ {"version":3,"file":"ast-ground-truth.js","sourceRoot":"","sources":["../../src/commands/ast-ground-truth.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,cAAc,EAA2B,MAAM,uBAAuB,CAAC;AAE/F;;;GAGG;AACH,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,8BAA8B,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAYvF,oEAAoE;AACpE,MAAM,UAAU,0BAA0B,CAAC,OAAqC;IAC7E,MAAM,IAAI,GAAG,CAAC,YAAY,EAAE,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACvE,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,IAAI,CAAC;AACf,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAqC;IACpE,OAAO,cAAc,CAAC,CAAC,MAAM,EAAE,GAAG,0BAA0B,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACpF,CAAC"}
@@ -0,0 +1,11 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ export declare const CHECK_SKILLS_HELP: string[];
10
+ export declare function runCheckSkillsCommand(args: string[]): void;
11
+ //# sourceMappingURL=check-skills-args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-skills-args.d.ts","sourceRoot":"","sources":["../../src/commands/check-skills-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAMlF,eAAO,MAAM,iBAAiB,UAiB7B,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAqC1D"}
@@ -0,0 +1,71 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import * as path from 'node:path';
10
+ import { exitWithUsage, helpRequested, printHelp } from './harness-args.js';
11
+ import { checkSkills } from './skills.js';
12
+ export const CHECK_SKILLS_HELP = [
13
+ 'Usage: hydranium-cli check-skills [project-directory] [--from <directory>] [--skill <names>]',
14
+ '',
15
+ 'Check declared compatibility of installed Hydranium and Langium skills.',
16
+ 'Reads .agents/skills and .claude/skills in the project directory (default: cwd).',
17
+ 'Checks every copy. Does not download, update, or execute skills.',
18
+ 'Exits non-zero for incompatible, missing, malformed, or unverified skills.',
19
+ '',
20
+ ' --from <directory> Resolve installed packages from this directory, relative',
21
+ ' to the project. Default: the project directory.',
22
+ ' Use the server package for workspace-local dependencies.',
23
+ ' --skill <names> Check only these comma-separated skill names.',
24
+ ' Default: hydranium-*. Use --skill langium to check upstream.',
25
+ '',
26
+ 'A compatible result checks declared skill contracts,',
27
+ 'not the accuracy of prose.',
28
+ 'Upstream skills without Hydranium metadata are unverified.'
29
+ ];
30
+ export function runCheckSkillsCommand(args) {
31
+ if (helpRequested(args, ['--from', '--skill'])) {
32
+ printHelp(CHECK_SKILLS_HELP);
33
+ return;
34
+ }
35
+ let project;
36
+ let from;
37
+ let names;
38
+ for (let index = 0; index < args.length; index++) {
39
+ const argument = args[index];
40
+ if (argument === '--from' || argument === '--skill') {
41
+ const value = args[++index];
42
+ if (!value || value.startsWith('--')) {
43
+ exitWithUsage(`Missing value for ${argument}`);
44
+ }
45
+ if (argument === '--from') {
46
+ from = value;
47
+ }
48
+ else {
49
+ names = value.split(',');
50
+ if (names.some(name => !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(name))) {
51
+ exitWithUsage('Invalid skill name.');
52
+ }
53
+ }
54
+ }
55
+ else if (argument.startsWith('-') || project !== undefined) {
56
+ exitWithUsage(`Unexpected argument: ${argument} (hydranium-cli check-skills --help)`);
57
+ }
58
+ else {
59
+ project = argument;
60
+ }
61
+ }
62
+ const root = path.resolve(project ?? '.');
63
+ const results = checkSkills(root, path.resolve(root, from ?? '.'), names);
64
+ for (const result of results) {
65
+ console.log(`${result.status}: ${result.file}: ${result.detail}`);
66
+ }
67
+ if (results.some(result => result.status !== 'compatible')) {
68
+ process.exitCode = 1;
69
+ }
70
+ }
71
+ //# sourceMappingURL=check-skills-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-skills-args.js","sourceRoot":"","sources":["../../src/commands/check-skills-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC9B,8FAA8F;IAC9F,EAAE;IACF,yEAAyE;IACzE,kFAAkF;IAClF,kEAAkE;IAClE,4EAA4E;IAC5E,EAAE;IACF,iFAAiF;IACjF,wEAAwE;IACxE,iFAAiF;IACjF,sEAAsE;IACtE,qFAAqF;IACrF,EAAE;IACF,sDAAsD;IACtD,4BAA4B;IAC5B,4DAA4D;CAC9D,CAAC;AAEF,MAAM,UAAU,qBAAqB,CAAC,IAAc;IACjD,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC;QAC9C,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAC7B,OAAO;IACV,CAAC;IACD,IAAI,OAA2B,CAAC;IAChC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA2B,CAAC;IAChC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,CA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C,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,YAAY,CAAC,EAAE,CAAC;QAC1D,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import type { TransferElement } from '@hydranium/protocol';
10
+ import type { DataServerProtocol } from '@hydranium/protocol/data';
11
+ /**
12
+ * Run `fn` as the client session `clientId`, and end the session whether `fn`
13
+ * succeeded or not, which closes whatever it left open. An end that fails
14
+ * after a failed `fn` is swallowed: `fn`'s error is the one the user needs.
15
+ */
16
+ export declare function withClientSession<T>(server: Pick<DataServerProtocol<TransferElement>, 'createSession' | 'closeSession'>, clientId: string, fn: () => Promise<T>): Promise<T>;
17
+ //# sourceMappingURL=client-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-session.d.ts","sourceRoot":"","sources":["../../src/commands/client-session.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,EACtC,MAAM,EAAE,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,EAAE,eAAe,GAAG,cAAc,CAAC,EACnF,QAAQ,EAAE,MAAM,EAChB,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAWZ"}
@@ -0,0 +1,27 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 CrossBreeze, EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ /**
10
+ * Run `fn` as the client session `clientId`, and end the session whether `fn`
11
+ * succeeded or not, which closes whatever it left open. An end that fails
12
+ * after a failed `fn` is swallowed: `fn`'s error is the one the user needs.
13
+ */
14
+ export async function withClientSession(server, clientId, fn) {
15
+ await server.createSession({ clientId, label: 'hydranium-cli' });
16
+ let result;
17
+ try {
18
+ result = await fn();
19
+ }
20
+ catch (error) {
21
+ await server.closeSession({ clientId }).catch(() => undefined);
22
+ throw error;
23
+ }
24
+ await server.closeSession({ clientId });
25
+ return result;
26
+ }
27
+ //# sourceMappingURL=client-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-session.js","sourceRoot":"","sources":["../../src/commands/client-session.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAKlF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACpC,MAAmF,EACnF,QAAgB,EAChB,EAAoB;IAEpB,MAAM,MAAM,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC;IACjE,IAAI,MAAS,CAAC;IACd,IAAI,CAAC;QACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACvB,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC/D,MAAM,KAAK,CAAC;IACf,CAAC;IACD,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC;AACjB,CAAC"}
@@ -0,0 +1,17 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { type UsageError } from './harness-args.js';
10
+ import { type CreateCommandOptions } from './create.js';
11
+ /** Every flag `create` accepts, each of which takes a value. */
12
+ export declare const CREATE_FLAGS: readonly string[];
13
+ /** The `--help` text, as data, held to {@link CREATE_FLAGS} by a test. */
14
+ export declare const CREATE_HELP: readonly string[];
15
+ export declare function parseCreateArgs(args: string[], onError?: UsageError): CreateCommandOptions;
16
+ export declare function runCreateCommand(args: string[]): Promise<void>;
17
+ //# sourceMappingURL=create-args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-args.d.ts","sourceRoot":"","sources":["../../src/commands/create-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EASJ,KAAK,UAAU,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,oBAAoB,EAAa,MAAM,aAAa,CAAC;AAInE,gEAAgE;AAChE,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAgD,CAAC;AAE3F,0EAA0E;AAC1E,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAexC,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAA0B,GAAG,oBAAoB,CAczG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAM9D"}
@@ -0,0 +1,53 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { assertRequired, exitWithUsage, helpRequested, logHelpLines, parseFlagOptions, parseServerSpawnOptions, printHelp, SERVER_SPAWN_VALUE_FLAGS } from './harness-args.js';
10
+ import { runCreate } from './create.js';
11
+ const OWN_FLAGS = ['--uri', '--content', '--client-id'];
12
+ /** Every flag `create` accepts, each of which takes a value. */
13
+ export const CREATE_FLAGS = [...SERVER_SPAWN_VALUE_FLAGS, ...OWN_FLAGS];
14
+ /** The `--help` text, as data, held to {@link CREATE_FLAGS} by a test. */
15
+ export const CREATE_HELP = [
16
+ 'Usage: hydranium-cli create --server "<cmd>..." --uri <uri> --content <text|@file> [--client-id <id>] [--cwd <dir>] [--log-level <lvl>] [--log-file <file>] [--log-file-level <lvl>]',
17
+ '',
18
+ 'Create the document at `<uri>` with `<content>` via createModelDocument, and persist it',
19
+ 'as given. Fails when the file exists or a client has it open.',
20
+ 'Output is the post-save envelope as a single JSON line.',
21
+ '',
22
+ 'Options:',
23
+ ' --server "<cmd>" Command-line for the data-server subprocess (required).',
24
+ ' --uri <uri> Document URI (required).',
25
+ ' --content <text> Content to write (required). Prefix `@` to read from a file',
26
+ ' (escape with `\\@` for literal `@`-leading content).',
27
+ ' --client-id <id> clientId for authorship attribution. Default: hydranium-cli.',
28
+ ' --cwd <dir> Working directory for the spawned child. Default: cwd.',
29
+ ...logHelpLines(22, 'the spawned server')
30
+ ];
31
+ export function parseCreateArgs(args, onError = exitWithUsage) {
32
+ const { serverCommand, serverArgs, cwd, logLevel, logFile, logFileLevel, extra } = parseServerSpawnOptions(args, 'create', onError);
33
+ const { uri, content, clientId } = parseFlagOptions(extra, 'create', OWN_FLAGS, onError);
34
+ return {
35
+ serverCommand,
36
+ serverArgs,
37
+ cwd,
38
+ logLevel,
39
+ logFile,
40
+ logFileLevel,
41
+ uri: assertRequired(uri, '--uri', 'create', onError),
42
+ content: assertRequired(content, '--content', 'create', onError),
43
+ clientId
44
+ };
45
+ }
46
+ export function runCreateCommand(args) {
47
+ if (helpRequested(args, CREATE_FLAGS)) {
48
+ printHelp(CREATE_HELP);
49
+ return Promise.resolve();
50
+ }
51
+ return runCreate(parseCreateArgs(args));
52
+ }
53
+ //# sourceMappingURL=create-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-args.js","sourceRoot":"","sources":["../../src/commands/create-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,wBAAwB,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA6B,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,aAAa,CAAU,CAAC;AAEjE,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAsB,CAAC,GAAG,wBAAwB,EAAE,GAAG,SAAS,CAAC,CAAC;AAE3F,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC3C,sLAAsL;IACtL,EAAE;IACF,yFAAyF;IACzF,+DAA+D;IAC/D,yDAAyD;IACzD,EAAE;IACF,UAAU;IACV,iFAAiF;IACjF,kDAAkD;IAClD,qFAAqF;IACrF,8EAA8E;IAC9E,sFAAsF;IACtF,gFAAgF;IAChF,GAAG,YAAY,CAAC,EAAE,EAAE,oBAAoB,CAAC;CAC3C,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAc,EAAE,OAAO,GAAe,aAAa;IAChF,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpI,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACzF,OAAO;QACJ,aAAa;QACb,UAAU;QACV,GAAG;QACH,QAAQ;QACR,OAAO;QACP,YAAY;QACZ,GAAG,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;QACpD,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,CAAC;QAChE,QAAQ;KACV,CAAC;AACL,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAc;IAC5C,IAAI,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC;QACrC,SAAS,CAAC,WAAW,CAAC,CAAC;QACvB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,38 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import type { TransferElement } from '@hydranium/protocol';
10
+ import type { DataServerProtocol } from '@hydranium/protocol/data';
11
+ import { type LogOptions } from '../log-level.js';
12
+ /**
13
+ * Options for the {@link runCreate} subcommand. Creates the document at `uri`
14
+ * with `content` (literal text or `@<path>` for a file reference) via the
15
+ * data-server's `createModelDocument` RPC, and persists that text as it is.
16
+ * Fails when the file exists or a client has it open. Writes the post-save
17
+ * envelope as a single JSON line, as `save` does.
18
+ *
19
+ * `clientId` defaults to `'hydranium-cli'`. The command creates as a client
20
+ * session under it: it registers the session, creates the document, persists
21
+ * it, since a created document reaches disk only with a save, and ends the
22
+ * session.
23
+ */
24
+ export interface CreateCommandOptions extends LogOptions {
25
+ readonly serverCommand: string;
26
+ readonly serverArgs?: readonly string[];
27
+ readonly cwd?: string;
28
+ readonly uri: string;
29
+ /** Literal content text, or `@<path>` to read from a file. */
30
+ readonly content: string;
31
+ readonly clientId?: string;
32
+ readonly write?: (line: string) => void;
33
+ readonly __proxyForTest?: DataServerProtocol<TransferElement>;
34
+ /** Test-only: override the file-reader so unit tests can stub `@<path>` expansion. */
35
+ readonly __readFileForTest?: (path: string) => Promise<string>;
36
+ }
37
+ export declare function runCreate(options: CreateCommandOptions): Promise<void>;
38
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK1D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IAC9D,sFAAsF;IACtF,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACjE;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqB5E"}
@@ -0,0 +1,43 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { logEnv } from '../log-level.js';
10
+ import { withDataServer } from '../spawn-data-server.js';
11
+ import { withClientSession } from './client-session.js';
12
+ import { resolveContent } from './harness-args.js';
13
+ export async function runCreate(options) {
14
+ const write = options.write ?? ((line) => process.stdout.write(line));
15
+ const clientId = options.clientId ?? 'hydranium-cli';
16
+ const text = await resolveContent(options.content, options.__readFileForTest);
17
+ if (options.__proxyForTest) {
18
+ write(`${JSON.stringify(await createPersisted(options.__proxyForTest, options.uri, clientId, text))}\n`);
19
+ return;
20
+ }
21
+ await withDataServer({
22
+ command: options.serverCommand,
23
+ args: options.serverArgs,
24
+ cwd: options.cwd,
25
+ env: logEnv(options)
26
+ }, async (server) => {
27
+ write(`${JSON.stringify(await createPersisted(server, options.uri, clientId, text))}\n`);
28
+ });
29
+ }
30
+ /**
31
+ * Create `uri` with `text` as the session `clientId` and persist it, then end
32
+ * the session. The persist is gated on the version the create made, so a
33
+ * write that landed before the create's answer or after it, another client's
34
+ * or an integrity repair, fails the command with a conflict and nothing
35
+ * persists.
36
+ */
37
+ function createPersisted(server, uri, clientId, text) {
38
+ return withClientSession(server, clientId, async () => {
39
+ const created = await server.createModelDocument({ uri, clientId, text });
40
+ return server.persistModelDocument({ uri, clientId, baseVersion: created.created.version, baseEpoch: created.epoch });
41
+ });
42
+ }
43
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAIlF,OAAO,EAAE,MAAM,EAAmB,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAA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E,QAAQ,EAAE,KAAK,IAAI,EAAE;QACnD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,mBAAmB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,OAAO,MAAM,CAAC,oBAAoB,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACzH,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,17 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { type UsageError } from './harness-args.js';
10
+ import { type DeleteCommandOptions } from './delete.js';
11
+ /** Every flag `delete` accepts, each of which takes a value. */
12
+ export declare const DELETE_FLAGS: readonly string[];
13
+ /** The `--help` text, as data, held to {@link DELETE_FLAGS} by a test. */
14
+ export declare const DELETE_HELP: readonly string[];
15
+ export declare function parseDeleteArgs(args: string[], onError?: UsageError): DeleteCommandOptions;
16
+ export declare function runDeleteCommand(args: string[]): Promise<void>;
17
+ //# sourceMappingURL=delete-args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-args.d.ts","sourceRoot":"","sources":["../../src/commands/delete-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EASJ,KAAK,UAAU,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,oBAAoB,EAAa,MAAM,aAAa,CAAC;AAInE,gEAAgE;AAChE,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAAgD,CAAC;AAE3F,0EAA0E;AAC1E,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAYxC,CAAC;AAEF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,UAA0B,GAAG,oBAAoB,CAazG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAM9D"}
@@ -0,0 +1,49 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import { assertRequired, exitWithUsage, helpRequested, logHelpLines, parseFlagOptions, parseServerSpawnOptions, printHelp, SERVER_SPAWN_VALUE_FLAGS } from './harness-args.js';
10
+ import { runDelete } from './delete.js';
11
+ const OWN_FLAGS = ['--uri', '--client-id'];
12
+ /** Every flag `delete` accepts, each of which takes a value. */
13
+ export const DELETE_FLAGS = [...SERVER_SPAWN_VALUE_FLAGS, ...OWN_FLAGS];
14
+ /** The `--help` text, as data, held to {@link DELETE_FLAGS} by a test. */
15
+ export const DELETE_HELP = [
16
+ 'Usage: hydranium-cli delete --server "<cmd>..." --uri <uri> [--client-id <id>] [--cwd <dir>] [--log-level <lvl>] [--log-file <file>] [--log-file-level <lvl>]',
17
+ '',
18
+ 'Delete the document at `<uri>`, its file and then the document, via deleteModelDocument,',
19
+ 'whatever text it holds. Prints nothing.',
20
+ '',
21
+ 'Options:',
22
+ ' --server "<cmd>" Command-line for the data-server subprocess (required).',
23
+ ' --uri <uri> Document URI (required).',
24
+ ' --client-id <id> clientId the deletion is attributed to. Default: hydranium-cli.',
25
+ ' --cwd <dir> Working directory for the spawned child. Default: cwd.',
26
+ ...logHelpLines(22, 'the spawned server')
27
+ ];
28
+ export function parseDeleteArgs(args, onError = exitWithUsage) {
29
+ const { serverCommand, serverArgs, cwd, logLevel, logFile, logFileLevel, extra } = parseServerSpawnOptions(args, 'delete', onError);
30
+ const { uri, clientId } = parseFlagOptions(extra, 'delete', OWN_FLAGS, onError);
31
+ return {
32
+ serverCommand,
33
+ serverArgs,
34
+ cwd,
35
+ logLevel,
36
+ logFile,
37
+ logFileLevel,
38
+ uri: assertRequired(uri, '--uri', 'delete', onError),
39
+ clientId
40
+ };
41
+ }
42
+ export function runDeleteCommand(args) {
43
+ if (helpRequested(args, DELETE_FLAGS)) {
44
+ printHelp(DELETE_HELP);
45
+ return Promise.resolve();
46
+ }
47
+ return runDelete(parseDeleteArgs(args));
48
+ }
49
+ //# sourceMappingURL=delete-args.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-args.js","sourceRoot":"","sources":["../../src/commands/delete-args.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EACJ,cAAc,EACd,aAAa,EACb,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,wBAAwB,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA6B,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,SAAS,GAAG,CAAC,OAAO,EAAE,aAAa,CAAU,CAAC;AAEpD,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAsB,CAAC,GAAG,wBAAwB,EAAE,GAAG,SAAS,CAAC,CAAC;AAE3F,0EAA0E;AAC1E,MAAM,CAAC,MAAM,WAAW,GAAsB;IAC3C,+JAA+J;IAC/J,EAAE;IACF,0FAA0F;IAC1F,yCAAyC;IACzC,EAAE;IACF,UAAU;IACV,iFAAiF;IACjF,kDAAkD;IAClD,yFAAyF;IACzF,gFAAgF;IAChF,GAAG,YAAY,CAAC,EAAE,EAAE,oBAAoB,CAAC;CAC3C,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,IAAc,EAAE,OAAO,GAAe,aAAa;IAChF,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACpI,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IAChF,OAAO;QACJ,aAAa;QACb,UAAU;QACV,GAAG;QACH,QAAQ;QACR,OAAO;QACP,YAAY;QACZ,GAAG,EAAE,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;QACpD,QAAQ;KACV,CAAC;AACL,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAc;IAC5C,IAAI,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,CAAC;QACrC,SAAS,CAAC,WAAW,CAAC,CAAC;QACvB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,30 @@
1
+ /********************************************************************************
2
+ * Copyright (c) 2026 EclipseSource and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the MIT License which is available in the project root.
6
+ *
7
+ * SPDX-License-Identifier: MIT
8
+ ********************************************************************************/
9
+ import type { TransferElement } from '@hydranium/protocol';
10
+ import type { DataServerProtocol } from '@hydranium/protocol/data';
11
+ import { type LogOptions } from '../log-level.js';
12
+ /**
13
+ * Options for the {@link runDelete} subcommand. Deletes the document at `uri`,
14
+ * its file and then the document, via the data-server's `deleteModelDocument`
15
+ * RPC, whatever text it holds. Prints nothing; a failed delete rejects.
16
+ *
17
+ * `clientId` defaults to `'hydranium-cli'`. The command deletes as a client
18
+ * session under it: it registers the session, opens the document, deletes it,
19
+ * and ends the session.
20
+ */
21
+ export interface DeleteCommandOptions extends LogOptions {
22
+ readonly serverCommand: string;
23
+ readonly serverArgs?: readonly string[];
24
+ readonly cwd?: string;
25
+ readonly uri: string;
26
+ readonly clientId?: string;
27
+ readonly __proxyForTest?: DataServerProtocol<TransferElement>;
28
+ }
29
+ export declare function runDelete(options: DeleteCommandOptions): Promise<void>;
30
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI1D;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAChE;AAED,wBAAsB,SAAS,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAe5E"}