@warlock.js/core 5.30.0 → 5.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (797) hide show
  1. package/CHANGELOG.md +142 -36
  2. package/README.md +28 -23
  3. package/bin/source-load-hook.mjs +63 -0
  4. package/bin/warlock.js +102 -42
  5. package/esm/cli/commands/add.command.mjs +4 -2
  6. package/esm/cli/commands/add.command.mjs.map +1 -1
  7. package/esm/cli/commands/agents-md/agents-md-command.action.mjs +69 -0
  8. package/esm/cli/commands/agents-md/agents-md-command.action.mjs.map +1 -0
  9. package/esm/cli/commands/agents-md.command.mjs +38 -0
  10. package/esm/cli/commands/agents-md.command.mjs.map +1 -0
  11. package/esm/cli/commands/board/board-command.action.mjs +279 -0
  12. package/esm/cli/commands/board/board-command.action.mjs.map +1 -0
  13. package/esm/cli/commands/board.command.mjs +78 -0
  14. package/esm/cli/commands/board.command.mjs.map +1 -0
  15. package/esm/cli/commands/build.command.mjs +6 -1
  16. package/esm/cli/commands/build.command.mjs.map +1 -1
  17. package/esm/cli/commands/check/check-command.action.mjs +57 -0
  18. package/esm/cli/commands/check/check-command.action.mjs.map +1 -0
  19. package/esm/cli/commands/check/child-typecheck.mjs +66 -0
  20. package/esm/cli/commands/check/child-typecheck.mjs.map +1 -0
  21. package/esm/cli/commands/check/format-problems.mjs +43 -0
  22. package/esm/cli/commands/check/format-problems.mjs.map +1 -0
  23. package/esm/cli/commands/check/typecheck-command.action.mjs +61 -0
  24. package/esm/cli/commands/check/typecheck-command.action.mjs.map +1 -0
  25. package/esm/cli/commands/check.command.mjs +50 -0
  26. package/esm/cli/commands/check.command.mjs.map +1 -0
  27. package/esm/cli/commands/dev-server.command.mjs +9 -1
  28. package/esm/cli/commands/dev-server.command.mjs.map +1 -1
  29. package/esm/cli/commands/doctor/boot-for-diagnostics.mjs +8 -3
  30. package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -1
  31. package/esm/cli/commands/doctor/check.types.d.mts +76 -0
  32. package/esm/cli/commands/doctor/check.types.d.mts.map +1 -0
  33. package/esm/cli/commands/doctor/checks/config.check.mjs +1 -0
  34. package/esm/cli/commands/doctor/checks/config.check.mjs.map +1 -1
  35. package/esm/cli/commands/doctor/checks/connectors.check.mjs +2 -0
  36. package/esm/cli/commands/doctor/checks/connectors.check.mjs.map +1 -1
  37. package/esm/cli/commands/doctor/checks/handler-signature.check.mjs +1 -0
  38. package/esm/cli/commands/doctor/checks/handler-signature.check.mjs.map +1 -1
  39. package/esm/cli/commands/doctor/checks/health.check.mjs +3 -0
  40. package/esm/cli/commands/doctor/checks/health.check.mjs.map +1 -1
  41. package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs +1 -0
  42. package/esm/cli/commands/doctor/checks/jwt-secret.check.mjs.map +1 -1
  43. package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +1 -0
  44. package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -1
  45. package/esm/cli/commands/doctor/checks/optional-peers.check.mjs +1 -0
  46. package/esm/cli/commands/doctor/checks/optional-peers.check.mjs.map +1 -1
  47. package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs +4 -0
  48. package/esm/cli/commands/doctor/checks/release-hygiene.check.mjs.map +1 -1
  49. package/esm/cli/commands/doctor/checks/routes.check.mjs +3 -0
  50. package/esm/cli/commands/doctor/checks/routes.check.mjs.map +1 -1
  51. package/esm/cli/commands/doctor/doctor-command.action.mjs +14 -6
  52. package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
  53. package/esm/cli/commands/doctor/format-report.mjs +30 -2
  54. package/esm/cli/commands/doctor/format-report.mjs.map +1 -1
  55. package/esm/cli/commands/doctor.command.mjs +4 -0
  56. package/esm/cli/commands/doctor.command.mjs.map +1 -1
  57. package/esm/cli/commands/explain/explain-command.action.mjs +64 -0
  58. package/esm/cli/commands/explain/explain-command.action.mjs.map +1 -0
  59. package/esm/cli/commands/explain.command.mjs +23 -0
  60. package/esm/cli/commands/explain.command.mjs.map +1 -0
  61. package/esm/cli/commands/generate/generate.command.mjs +124 -124
  62. package/esm/cli/commands/generate/generate.command.mjs.map +1 -1
  63. package/esm/cli/commands/generate/generators/endpoint.generator.mjs +311 -0
  64. package/esm/cli/commands/generate/generators/endpoint.generator.mjs.map +1 -0
  65. package/esm/cli/commands/generate/generators/migration.generator.mjs +1 -1
  66. package/esm/cli/commands/generate/generators/migration.generator.mjs.map +1 -1
  67. package/esm/cli/commands/generate/generators/model.generator.mjs +1 -1
  68. package/esm/cli/commands/generate/templates/endpoint-stubs.mjs +341 -0
  69. package/esm/cli/commands/generate/templates/endpoint-stubs.mjs.map +1 -0
  70. package/esm/cli/commands/generate/templates/stubs.mjs +19 -6
  71. package/esm/cli/commands/generate/templates/stubs.mjs.map +1 -1
  72. package/esm/cli/commands/generate/utils/endpoint-schema.mjs +137 -0
  73. package/esm/cli/commands/generate/utils/endpoint-schema.mjs.map +1 -0
  74. package/esm/cli/commands/generate/utils/name-parser.mjs +1 -1
  75. package/esm/cli/commands/generate/utils/name-parser.mjs.map +1 -1
  76. package/esm/cli/commands/generate/utils/prompt.mjs.map +1 -1
  77. package/esm/cli/commands/generate/utils/writer.mjs +38 -13
  78. package/esm/cli/commands/generate/utils/writer.mjs.map +1 -1
  79. package/esm/cli/commands/inspect/inspect-command.action.mjs +72 -0
  80. package/esm/cli/commands/inspect/inspect-command.action.mjs.map +1 -0
  81. package/esm/cli/commands/inspect.command.mjs +39 -0
  82. package/esm/cli/commands/inspect.command.mjs.map +1 -0
  83. package/esm/cli/commands/mcp/mcp-command.action.mjs +103 -0
  84. package/esm/cli/commands/mcp/mcp-command.action.mjs.map +1 -0
  85. package/esm/cli/commands/mcp.command.mjs +76 -0
  86. package/esm/cli/commands/mcp.command.mjs.map +1 -0
  87. package/esm/cli/commands/openapi-generator.action.mjs.map +1 -1
  88. package/esm/cli/commands/openapi-generator.command.mjs.map +1 -1
  89. package/esm/cli/commands/postman-generator.action.mjs.map +1 -1
  90. package/esm/cli/commands/postman-generator.command.mjs.map +1 -1
  91. package/esm/cli/commands/routes/routes-diff.action.mjs +1 -1
  92. package/esm/cli/commands/test.command.mjs +131 -0
  93. package/esm/cli/commands/test.command.mjs.map +1 -0
  94. package/esm/cli/commands/trace/trace-command.action.mjs +145 -0
  95. package/esm/cli/commands/trace/trace-command.action.mjs.map +1 -0
  96. package/esm/cli/commands/trace.command.mjs +60 -0
  97. package/esm/cli/commands/trace.command.mjs.map +1 -0
  98. package/esm/cli/commands/typecheck.command.mjs +40 -0
  99. package/esm/cli/commands/typecheck.command.mjs.map +1 -0
  100. package/esm/cli/commands/upgrade.command.mjs +46 -0
  101. package/esm/cli/commands/upgrade.command.mjs.map +1 -0
  102. package/esm/cli/flush-and-exit.mjs +34 -0
  103. package/esm/cli/flush-and-exit.mjs.map +1 -0
  104. package/esm/cli/framework-cli-commands.mjs +23 -1
  105. package/esm/cli/framework-cli-commands.mjs.map +1 -1
  106. package/esm/cli/parse-cli-args.mjs +1 -0
  107. package/esm/cli/parse-cli-args.mjs.map +1 -1
  108. package/esm/config/config-loader.d.mts.map +1 -1
  109. package/esm/config/config-loader.mjs +34 -13
  110. package/esm/config/config-loader.mjs.map +1 -1
  111. package/esm/config/config-schema.d.mts +67 -0
  112. package/esm/config/config-schema.d.mts.map +1 -0
  113. package/esm/config/config-schema.mjs +77 -0
  114. package/esm/config/config-schema.mjs.map +1 -0
  115. package/esm/config/index.d.mts +6 -0
  116. package/esm/config/index.mjs +1 -0
  117. package/esm/connectors/assert-no-reserved-connector-names.d.mts.map +1 -1
  118. package/esm/connectors/assert-no-reserved-connector-names.mjs +2 -1
  119. package/esm/connectors/assert-no-reserved-connector-names.mjs.map +1 -1
  120. package/esm/connectors/assert-unique-connector-names.d.mts.map +1 -1
  121. package/esm/connectors/assert-unique-connector-names.mjs +26 -2
  122. package/esm/connectors/assert-unique-connector-names.mjs.map +1 -1
  123. package/esm/connectors/http-connector.d.mts.map +1 -1
  124. package/esm/connectors/http-connector.mjs +3 -2
  125. package/esm/connectors/http-connector.mjs.map +1 -1
  126. package/esm/connectors/single-server-warnings.mjs.map +1 -1
  127. package/esm/connectors/socket-connector.d.mts.map +1 -1
  128. package/esm/connectors/socket-connector.mjs.map +1 -1
  129. package/esm/container/index.d.mts.map +1 -1
  130. package/esm/container/index.mjs.map +1 -1
  131. package/esm/database/migrate-action.mjs.map +1 -1
  132. package/esm/database/models/database-log/database-log.d.mts +0 -28
  133. package/esm/database/models/database-log/database-log.d.mts.map +1 -1
  134. package/esm/database/seeds/seeder.errors.d.mts +4 -0
  135. package/esm/database/seeds/seeder.errors.d.mts.map +1 -1
  136. package/esm/database/seeds/seeder.errors.mjs +2 -0
  137. package/esm/database/seeds/seeder.errors.mjs.map +1 -1
  138. package/esm/dev-server/boot-precondition-error.mjs +1 -0
  139. package/esm/dev-server/boot-precondition-error.mjs.map +1 -1
  140. package/esm/dev-server/create-worker.mjs +15 -9
  141. package/esm/dev-server/create-worker.mjs.map +1 -1
  142. package/esm/dev-server/dev-agent-tooling.mjs +135 -0
  143. package/esm/dev-server/dev-agent-tooling.mjs.map +1 -0
  144. package/esm/dev-server/dev-logger.mjs.map +1 -1
  145. package/esm/dev-server/development-server.mjs +8 -0
  146. package/esm/dev-server/development-server.mjs.map +1 -1
  147. package/esm/dev-server/files-orchestrator.mjs +4 -5
  148. package/esm/dev-server/files-orchestrator.mjs.map +1 -1
  149. package/esm/dev-server/files-watcher.mjs +1 -1
  150. package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs +2 -3
  151. package/esm/dev-server/health-checker/checkers/eslint-health-checker.mjs.map +1 -1
  152. package/esm/dev-server/health-checker/checkers/oxlint-health-checker.mjs +33 -0
  153. package/esm/dev-server/health-checker/checkers/oxlint-health-checker.mjs.map +1 -0
  154. package/esm/dev-server/health-checker/default-health-checkers.mjs +31 -0
  155. package/esm/dev-server/health-checker/default-health-checkers.mjs.map +1 -0
  156. package/esm/dev-server/health-checker/file-health-checker.contract.d.mts +9 -3
  157. package/esm/dev-server/health-checker/file-health-checker.contract.d.mts.map +1 -1
  158. package/esm/dev-server/health-checker/files-healthcare.manager.mjs +15 -4
  159. package/esm/dev-server/health-checker/files-healthcare.manager.mjs.map +1 -1
  160. package/esm/dev-server/health-checker/oxlint-runner.mjs +302 -0
  161. package/esm/dev-server/health-checker/oxlint-runner.mjs.map +1 -0
  162. package/esm/dev-server/health-checker/workers/oxlint-health.worker.d.mts +1 -0
  163. package/esm/dev-server/health-checker/workers/oxlint-health.worker.mjs +42 -0
  164. package/esm/dev-server/health-checker/workers/oxlint-health.worker.mjs.map +1 -0
  165. package/esm/dev-server/loader/loader-port-acks.mjs +1 -1
  166. package/esm/dev-server/loader/loader-port-acks.mjs.map +1 -1
  167. package/esm/dev-server/loader/register-loader.mjs +1 -1
  168. package/esm/dev-server/loader/register-loader.mjs.map +1 -1
  169. package/esm/dev-server/loader/resolve-hook.mjs +1 -1
  170. package/esm/dev-server/loader/transpile-cache.mjs +1 -1
  171. package/esm/dev-server/model-resource-typings.mjs.map +1 -1
  172. package/esm/dev-server/module-loader.mjs +1 -0
  173. package/esm/dev-server/module-loader.mjs.map +1 -1
  174. package/esm/dev-server/parse-imports.mjs +1 -1
  175. package/esm/dev-server/parse-imports.mjs.map +1 -1
  176. package/esm/dev-server/route-types-publisher.mjs +1 -1
  177. package/esm/dev-server/start-development-server.mjs.map +1 -1
  178. package/esm/dev-server/translation-keys-sources.mjs +1 -1
  179. package/esm/dev-server/translation-keys-sources.mjs.map +1 -1
  180. package/esm/dev-server/tsconfig-manager.mjs.map +1 -1
  181. package/esm/dev-server/type-generator.mjs +3 -3
  182. package/esm/dev-server/type-generator.mjs.map +1 -1
  183. package/esm/dev-server/types.d.mts.map +1 -1
  184. package/esm/errors/container-key-missing-error.mjs +1 -0
  185. package/esm/errors/container-key-missing-error.mjs.map +1 -1
  186. package/esm/errors/error-codes.d.mts +653 -0
  187. package/esm/errors/error-codes.d.mts.map +1 -0
  188. package/esm/errors/error-codes.mjs +634 -0
  189. package/esm/errors/error-codes.mjs.map +1 -0
  190. package/esm/errors/esbuild-binary-missing-error.mjs +1 -0
  191. package/esm/errors/esbuild-binary-missing-error.mjs.map +1 -1
  192. package/esm/errors/index.d.mts +3 -1
  193. package/esm/errors/index.mjs +3 -1
  194. package/esm/errors/unknown-locale-error.mjs +1 -0
  195. package/esm/errors/unknown-locale-error.mjs.map +1 -1
  196. package/esm/errors/warlock-error.d.mts +23 -0
  197. package/esm/errors/warlock-error.d.mts.map +1 -0
  198. package/esm/errors/warlock-error.mjs +22 -0
  199. package/esm/errors/warlock-error.mjs.map +1 -0
  200. package/esm/generations/add-command.action.mjs +19 -3
  201. package/esm/generations/add-command.action.mjs.map +1 -1
  202. package/esm/generations/features/access.feature.mjs +1 -1
  203. package/esm/generations/features/access.feature.mjs.map +1 -1
  204. package/esm/generations/features/bull-board.feature.mjs +1 -1
  205. package/esm/generations/features/bull-board.feature.mjs.map +1 -1
  206. package/esm/generations/features/mysql.feature.mjs.map +1 -1
  207. package/esm/generations/features/notifications.feature.mjs +5 -2
  208. package/esm/generations/features/notifications.feature.mjs.map +1 -1
  209. package/esm/generations/features/queue.feature.mjs +1 -1
  210. package/esm/generations/features/queue.feature.mjs.map +1 -1
  211. package/esm/generations/features/react-email.feature.mjs +1 -1
  212. package/esm/generations/features/react-email.feature.mjs.map +1 -1
  213. package/esm/generations/features/shadcn.feature.mjs +1 -1
  214. package/esm/generations/features/shadcn.feature.mjs.map +1 -1
  215. package/esm/generations/features/shared/link-ai-package-import.mjs +1 -1
  216. package/esm/generations/features/shared/link-ai-package-import.mjs.map +1 -1
  217. package/esm/generations/features/shared/merge-web-sitemap-config.mjs.map +1 -1
  218. package/esm/generations/features/shared/patch-tsconfig-include.mjs +1 -1
  219. package/esm/generations/features/shared/patch-tsconfig-include.mjs.map +1 -1
  220. package/esm/generations/features/shared/relocate-conflicting-home-route.mjs +1 -1
  221. package/esm/generations/features/shared/relocate-conflicting-home-route.mjs.map +1 -1
  222. package/esm/generations/features/sitemap.feature.mjs +1 -1
  223. package/esm/generations/features/sitemap.feature.mjs.map +1 -1
  224. package/esm/generations/features/tailwind.feature.mjs +1 -1
  225. package/esm/generations/features/tailwind.feature.mjs.map +1 -1
  226. package/esm/generations/features/test.feature.mjs +11 -6
  227. package/esm/generations/features/test.feature.mjs.map +1 -1
  228. package/esm/generations/features/web.feature.mjs +1 -1
  229. package/esm/generations/features/web.feature.mjs.map +1 -1
  230. package/esm/generations/generation-fs.mjs +73 -0
  231. package/esm/generations/generation-fs.mjs.map +1 -0
  232. package/esm/generations/generation-run.mjs +185 -0
  233. package/esm/generations/generation-run.mjs.map +1 -0
  234. package/esm/generations/stubs.mjs +155 -13
  235. package/esm/generations/stubs.mjs.map +1 -1
  236. package/esm/http/bounded-stream-queue.d.mts +10 -0
  237. package/esm/http/bounded-stream-queue.d.mts.map +1 -0
  238. package/esm/http/bounded-stream-queue.mjs +97 -0
  239. package/esm/http/bounded-stream-queue.mjs.map +1 -0
  240. package/esm/http/build-rate-limit-options.d.mts +13 -0
  241. package/esm/http/build-rate-limit-options.d.mts.map +1 -1
  242. package/esm/http/build-rate-limit-options.mjs.map +1 -1
  243. package/esm/http/conditional-request.d.mts +86 -0
  244. package/esm/http/conditional-request.d.mts.map +1 -0
  245. package/esm/http/conditional-request.mjs +121 -0
  246. package/esm/http/conditional-request.mjs.map +1 -0
  247. package/esm/http/csp.d.mts +2 -0
  248. package/esm/http/csp.d.mts.map +1 -1
  249. package/esm/http/csp.mjs +1 -0
  250. package/esm/http/csp.mjs.map +1 -1
  251. package/esm/http/csrf-origin-policy.mjs.map +1 -1
  252. package/esm/http/database/RequestLog.d.mts +24 -84
  253. package/esm/http/database/RequestLog.d.mts.map +1 -1
  254. package/esm/http/errors/errors.d.mts +2 -0
  255. package/esm/http/errors/errors.d.mts.map +1 -1
  256. package/esm/http/errors/errors.mjs +1 -0
  257. package/esm/http/errors/errors.mjs.map +1 -1
  258. package/esm/http/escape-header-value.d.mts +18 -0
  259. package/esm/http/escape-header-value.d.mts.map +1 -0
  260. package/esm/http/escape-header-value.mjs +27 -0
  261. package/esm/http/escape-header-value.mjs.map +1 -0
  262. package/esm/http/flush-pending-cookies.mjs.map +1 -1
  263. package/esm/http/index.d.mts +5 -2
  264. package/esm/http/index.mjs +4 -1
  265. package/esm/http/lazy-static.mjs +194 -0
  266. package/esm/http/lazy-static.mjs.map +1 -0
  267. package/esm/http/middleware/idempotency.middleware.mjs.map +1 -1
  268. package/esm/http/plugins.d.mts.map +1 -1
  269. package/esm/http/plugins.mjs +7 -4
  270. package/esm/http/plugins.mjs.map +1 -1
  271. package/esm/http/rate-limit-cache-store.mjs +2 -1
  272. package/esm/http/rate-limit-cache-store.mjs.map +1 -1
  273. package/esm/http/request-log-snapshot.d.mts +12 -5
  274. package/esm/http/request-log-snapshot.d.mts.map +1 -1
  275. package/esm/http/request-log-snapshot.mjs +83 -4
  276. package/esm/http/request-log-snapshot.mjs.map +1 -1
  277. package/esm/http/request.d.mts +2 -2
  278. package/esm/http/request.d.mts.map +1 -1
  279. package/esm/http/request.mjs +5 -4
  280. package/esm/http/request.mjs.map +1 -1
  281. package/esm/http/response.d.mts +11 -1
  282. package/esm/http/response.d.mts.map +1 -1
  283. package/esm/http/response.mjs +164 -76
  284. package/esm/http/response.mjs.map +1 -1
  285. package/esm/http/safe-redirect.d.mts +51 -0
  286. package/esm/http/safe-redirect.d.mts.map +1 -0
  287. package/esm/http/safe-redirect.mjs +80 -0
  288. package/esm/http/safe-redirect.mjs.map +1 -0
  289. package/esm/http/serialized.d.mts.map +1 -1
  290. package/esm/http/server.d.mts +3 -1
  291. package/esm/http/server.d.mts.map +1 -1
  292. package/esm/http/server.mjs +14 -4
  293. package/esm/http/server.mjs.map +1 -1
  294. package/esm/http/stream-transport.mjs +4 -2
  295. package/esm/http/stream-transport.mjs.map +1 -1
  296. package/esm/http/types.d.mts +44 -11
  297. package/esm/http/types.d.mts.map +1 -1
  298. package/esm/http/uploads/generate-image-variant.mjs +1 -1
  299. package/esm/http/uploads/generate-image-variants.d.mts +10 -7
  300. package/esm/http/uploads/generate-image-variants.d.mts.map +1 -1
  301. package/esm/http/uploads/generate-image-variants.mjs +61 -24
  302. package/esm/http/uploads/generate-image-variants.mjs.map +1 -1
  303. package/esm/http/uploads/image-variant-cache-entries.mjs +78 -0
  304. package/esm/http/uploads/image-variant-cache-entries.mjs.map +1 -0
  305. package/esm/http/uploads/image-variant-cache.mjs +72 -30
  306. package/esm/http/uploads/image-variant-cache.mjs.map +1 -1
  307. package/esm/http/uploads/image-variant-types.d.mts +2 -0
  308. package/esm/http/uploads/image-variant-types.d.mts.map +1 -1
  309. package/esm/http/uploads/image-variants-config-error.d.mts +3 -1
  310. package/esm/http/uploads/image-variants-config-error.d.mts.map +1 -1
  311. package/esm/http/uploads/image-variants-config-error.mjs +3 -2
  312. package/esm/http/uploads/image-variants-config-error.mjs.map +1 -1
  313. package/esm/http/uploads/load-variant-source.mjs +1 -1
  314. package/esm/http/uploads/load-variant-source.mjs.map +1 -1
  315. package/esm/http/uploads/purge-image-variants.d.mts +7 -2
  316. package/esm/http/uploads/purge-image-variants.d.mts.map +1 -1
  317. package/esm/http/uploads/purge-image-variants.mjs +16 -16
  318. package/esm/http/uploads/purge-image-variants.mjs.map +1 -1
  319. package/esm/http/uploads/remote-variant-source.mjs +115 -0
  320. package/esm/http/uploads/remote-variant-source.mjs.map +1 -0
  321. package/esm/http/uploads/resolve-image-variant.d.mts +3 -4
  322. package/esm/http/uploads/resolve-image-variant.d.mts.map +1 -1
  323. package/esm/http/uploads/resolve-image-variant.mjs +10 -18
  324. package/esm/http/uploads/resolve-image-variant.mjs.map +1 -1
  325. package/esm/http/uploads/resolve-image-variants-config.mjs +5 -3
  326. package/esm/http/uploads/resolve-image-variants-config.mjs.map +1 -1
  327. package/esm/http/uploads/resolve-remote-image-variant.mjs +89 -0
  328. package/esm/http/uploads/resolve-remote-image-variant.mjs.map +1 -0
  329. package/esm/http/uploads/trim-image-variant-cache.mjs +193 -0
  330. package/esm/http/uploads/trim-image-variant-cache.mjs.map +1 -0
  331. package/esm/http/uploads/uploaded-file.controller.d.mts +5 -3
  332. package/esm/http/uploads/uploaded-file.controller.d.mts.map +1 -1
  333. package/esm/http/uploads/uploaded-file.controller.mjs +16 -8
  334. package/esm/http/uploads/uploaded-file.controller.mjs.map +1 -1
  335. package/esm/http/uploads/variant-cache-key.mjs +1 -1
  336. package/esm/http/uploads-types.d.mts +6 -2
  337. package/esm/http/uploads-types.d.mts.map +1 -1
  338. package/esm/index.d.mts +17 -6
  339. package/esm/index.mjs +14 -3
  340. package/esm/localization/parse-locale-dictionary.d.mts +2 -0
  341. package/esm/localization/parse-locale-dictionary.d.mts.map +1 -1
  342. package/esm/localization/parse-locale-dictionary.mjs +1 -0
  343. package/esm/localization/parse-locale-dictionary.mjs.map +1 -1
  344. package/esm/mail/config.d.mts +12 -1
  345. package/esm/mail/config.d.mts.map +1 -1
  346. package/esm/mail/config.mjs +16 -1
  347. package/esm/mail/config.mjs.map +1 -1
  348. package/esm/mail/index.d.mts +1 -1
  349. package/esm/mail/index.mjs +1 -1
  350. package/esm/net/index.d.mts +2 -0
  351. package/esm/net/index.mjs +3 -0
  352. package/esm/openapi/build-openapi-document.d.mts.map +1 -1
  353. package/esm/openapi/build-openapi-document.mjs +8 -5
  354. package/esm/openapi/build-openapi-document.mjs.map +1 -1
  355. package/esm/openapi/error-responses.mjs +28 -2
  356. package/esm/openapi/error-responses.mjs.map +1 -1
  357. package/esm/openapi/postman/build-request-body.mjs.map +1 -1
  358. package/esm/openapi/postman/build-request-url.mjs.map +1 -1
  359. package/esm/openapi/postman/build-saved-responses.mjs.map +1 -1
  360. package/esm/openapi/postman/example-from-schema.d.mts.map +1 -1
  361. package/esm/openapi/postman/example-from-schema.mjs.map +1 -1
  362. package/esm/openapi/postman/openapi-to-postman-collection.d.mts.map +1 -1
  363. package/esm/openapi/postman/openapi-to-postman-collection.mjs.map +1 -1
  364. package/esm/openapi/postman/schema-refs.mjs.map +1 -1
  365. package/esm/openapi/postman/uuid-v5.mjs.map +1 -1
  366. package/esm/openapi/request-schemas.mjs.map +1 -1
  367. package/esm/openapi/response-schemas.mjs.map +1 -1
  368. package/esm/openapi/schema-registry.d.mts +1 -0
  369. package/esm/openapi/schema-registry.mjs.map +1 -1
  370. package/esm/openapi/security.mjs.map +1 -1
  371. package/esm/openapi/types.d.mts +3 -2
  372. package/esm/openapi/types.d.mts.map +1 -1
  373. package/esm/production/assert-generated-imports.mjs +1 -0
  374. package/esm/production/assert-generated-imports.mjs.map +1 -1
  375. package/esm/production/production-builder.mjs +12 -4
  376. package/esm/production/production-builder.mjs.map +1 -1
  377. package/esm/production/resolve-build-config.mjs +1 -0
  378. package/esm/production/resolve-build-config.mjs.map +1 -1
  379. package/esm/production/route-registration-child.mjs.map +1 -1
  380. package/esm/production/route-registration-snapshot.mjs.map +1 -1
  381. package/esm/repositories/contracts/query-builder.contract.d.mts.map +1 -1
  382. package/esm/repositories/contracts/types.d.mts.map +1 -1
  383. package/esm/repositories/repository.manager.mjs.map +1 -1
  384. package/esm/resource/resource.d.mts.map +1 -1
  385. package/esm/resource/resource.mjs.map +1 -1
  386. package/esm/resource/types.d.mts.map +1 -1
  387. package/esm/restful/restful.d.mts +5 -5
  388. package/esm/restful/restful.d.mts.map +1 -1
  389. package/esm/restful/restful.mjs.map +1 -1
  390. package/esm/router/build-route-rate-limit.mjs.map +1 -1
  391. package/esm/router/dev-dispatch.mjs +31 -12
  392. package/esm/router/dev-dispatch.mjs.map +1 -1
  393. package/esm/router/index.d.mts +4 -2
  394. package/esm/router/index.mjs +2 -0
  395. package/esm/router/log-request-lifecycle.mjs.map +1 -1
  396. package/esm/router/positional-handler-diagnostics.d.mts.map +1 -1
  397. package/esm/router/positional-handler-diagnostics.mjs.map +1 -1
  398. package/esm/router/resolve-route-rate-limit.mjs +47 -0
  399. package/esm/router/resolve-route-rate-limit.mjs.map +1 -0
  400. package/esm/router/resolve-route-validation.mjs +19 -0
  401. package/esm/router/resolve-route-validation.mjs.map +1 -0
  402. package/esm/router/route-guard-names.mjs +30 -0
  403. package/esm/router/route-guard-names.mjs.map +1 -0
  404. package/esm/router/route-name-taken-error.d.mts +14 -0
  405. package/esm/router/route-name-taken-error.d.mts.map +1 -0
  406. package/esm/router/route-name-taken-error.mjs +18 -0
  407. package/esm/router/route-name-taken-error.mjs.map +1 -0
  408. package/esm/router/router.d.mts +32 -13
  409. package/esm/router/router.d.mts.map +1 -1
  410. package/esm/router/router.mjs +71 -38
  411. package/esm/router/router.mjs.map +1 -1
  412. package/esm/router/types.d.mts +137 -17
  413. package/esm/router/types.d.mts.map +1 -1
  414. package/esm/router/unguarded-route-diagnostics.d.mts +40 -0
  415. package/esm/router/unguarded-route-diagnostics.d.mts.map +1 -0
  416. package/esm/router/unguarded-route-diagnostics.mjs +95 -0
  417. package/esm/router/unguarded-route-diagnostics.mjs.map +1 -0
  418. package/esm/storage/drivers/cloud-driver.d.mts.map +1 -1
  419. package/esm/storage/drivers/cloud-driver.mjs.map +1 -1
  420. package/esm/storage/drivers/local-driver.d.mts.map +1 -1
  421. package/esm/storage/drivers/local-driver.mjs.map +1 -1
  422. package/esm/storage/local-disk-roots.mjs +24 -0
  423. package/esm/storage/local-disk-roots.mjs.map +1 -0
  424. package/esm/storage/storage.d.mts +14 -0
  425. package/esm/storage/storage.d.mts.map +1 -1
  426. package/esm/storage/storage.mjs +22 -0
  427. package/esm/storage/storage.mjs.map +1 -1
  428. package/esm/storage/types.d.mts.map +1 -1
  429. package/esm/storage/utils/storage-not-initialized-error.d.mts +2 -0
  430. package/esm/storage/utils/storage-not-initialized-error.d.mts.map +1 -1
  431. package/esm/storage/utils/storage-not-initialized-error.mjs +1 -0
  432. package/esm/storage/utils/storage-not-initialized-error.mjs.map +1 -1
  433. package/esm/tests/authenticated-test-client.d.mts +32 -0
  434. package/esm/tests/authenticated-test-client.d.mts.map +1 -0
  435. package/esm/tests/authenticated-test-client.mjs +40 -0
  436. package/esm/tests/authenticated-test-client.mjs.map +1 -0
  437. package/esm/tests/factories.d.mts +59 -0
  438. package/esm/tests/factories.d.mts.map +1 -0
  439. package/esm/tests/factories.mjs +105 -0
  440. package/esm/tests/factories.mjs.map +1 -0
  441. package/esm/tests/fakes/cache-fake.d.mts +29 -0
  442. package/esm/tests/fakes/cache-fake.d.mts.map +1 -0
  443. package/esm/tests/fakes/cache-fake.mjs +79 -0
  444. package/esm/tests/fakes/cache-fake.mjs.map +1 -0
  445. package/esm/tests/fakes/clock-fake.d.mts +32 -0
  446. package/esm/tests/fakes/clock-fake.d.mts.map +1 -0
  447. package/esm/tests/fakes/clock-fake.mjs +69 -0
  448. package/esm/tests/fakes/clock-fake.mjs.map +1 -0
  449. package/esm/tests/fakes/fake-assertion-error.d.mts +13 -0
  450. package/esm/tests/fakes/fake-assertion-error.d.mts.map +1 -0
  451. package/esm/tests/fakes/fake-assertion-error.mjs +20 -0
  452. package/esm/tests/fakes/fake-assertion-error.mjs.map +1 -0
  453. package/esm/tests/fakes/ids-fake.d.mts +22 -0
  454. package/esm/tests/fakes/ids-fake.d.mts.map +1 -0
  455. package/esm/tests/fakes/ids-fake.mjs +57 -0
  456. package/esm/tests/fakes/ids-fake.mjs.map +1 -0
  457. package/esm/tests/fakes/index.d.mts +8 -0
  458. package/esm/tests/fakes/index.mjs +10 -0
  459. package/esm/tests/fakes/mail-fake.d.mts +41 -0
  460. package/esm/tests/fakes/mail-fake.d.mts.map +1 -0
  461. package/esm/tests/fakes/mail-fake.mjs +111 -0
  462. package/esm/tests/fakes/mail-fake.mjs.map +1 -0
  463. package/esm/tests/fakes/queue-fake.d.mts +48 -0
  464. package/esm/tests/fakes/queue-fake.d.mts.map +1 -0
  465. package/esm/tests/fakes/queue-fake.mjs +134 -0
  466. package/esm/tests/fakes/queue-fake.mjs.map +1 -0
  467. package/esm/tests/fakes/storage-fake.d.mts +31 -0
  468. package/esm/tests/fakes/storage-fake.d.mts.map +1 -0
  469. package/esm/tests/fakes/storage-fake.mjs +122 -0
  470. package/esm/tests/fakes/storage-fake.mjs.map +1 -0
  471. package/esm/tests/fakes/test-fakes.d.mts +39 -0
  472. package/esm/tests/fakes/test-fakes.d.mts.map +1 -0
  473. package/esm/tests/fakes/test-fakes.mjs +90 -0
  474. package/esm/tests/fakes/test-fakes.mjs.map +1 -0
  475. package/esm/tests/index.d.mts +14 -2
  476. package/esm/tests/index.mjs +15 -2
  477. package/esm/tests/snapshot-response.d.mts +34 -0
  478. package/esm/tests/snapshot-response.d.mts.map +1 -0
  479. package/esm/tests/snapshot-response.mjs +42 -0
  480. package/esm/tests/snapshot-response.mjs.map +1 -0
  481. package/esm/tests/start-http-development-server.d.mts +22 -0
  482. package/esm/tests/start-http-development-server.d.mts.map +1 -1
  483. package/esm/tests/start-http-development-server.mjs +36 -3
  484. package/esm/tests/start-http-development-server.mjs.map +1 -1
  485. package/esm/tests/test-helpers.d.mts +20 -1
  486. package/esm/tests/test-helpers.d.mts.map +1 -1
  487. package/esm/tests/test-helpers.mjs +40 -27
  488. package/esm/tests/test-helpers.mjs.map +1 -1
  489. package/esm/tests/test-http-server.d.mts +62 -0
  490. package/esm/tests/test-http-server.d.mts.map +1 -0
  491. package/esm/tests/test-http-server.mjs +119 -0
  492. package/esm/tests/test-http-server.mjs.map +1 -0
  493. package/esm/tests/vitest-setup.d.mts +11 -0
  494. package/esm/tests/vitest-setup.d.mts.map +1 -1
  495. package/esm/tests/vitest-setup.mjs +12 -4
  496. package/esm/tests/vitest-setup.mjs.map +1 -1
  497. package/esm/tooling/agents-md/agents-md-markers.d.mts +27 -0
  498. package/esm/tooling/agents-md/agents-md-markers.d.mts.map +1 -0
  499. package/esm/tooling/agents-md/agents-md-markers.mjs +59 -0
  500. package/esm/tooling/agents-md/agents-md-markers.mjs.map +1 -0
  501. package/esm/tooling/agents-md/agents-md-refresher.d.mts +36 -0
  502. package/esm/tooling/agents-md/agents-md-refresher.d.mts.map +1 -0
  503. package/esm/tooling/agents-md/agents-md-refresher.mjs +72 -0
  504. package/esm/tooling/agents-md/agents-md-refresher.mjs.map +1 -0
  505. package/esm/tooling/agents-md/index.mjs +7 -0
  506. package/esm/tooling/agents-md/installed-skills.d.mts +30 -0
  507. package/esm/tooling/agents-md/installed-skills.d.mts.map +1 -0
  508. package/esm/tooling/agents-md/installed-skills.mjs +74 -0
  509. package/esm/tooling/agents-md/installed-skills.mjs.map +1 -0
  510. package/esm/tooling/agents-md/render-agents-md.d.mts +33 -0
  511. package/esm/tooling/agents-md/render-agents-md.d.mts.map +1 -0
  512. package/esm/tooling/agents-md/render-agents-md.mjs +195 -0
  513. package/esm/tooling/agents-md/render-agents-md.mjs.map +1 -0
  514. package/esm/tooling/agents-md/write-agents-md.d.mts +33 -0
  515. package/esm/tooling/agents-md/write-agents-md.d.mts.map +1 -0
  516. package/esm/tooling/agents-md/write-agents-md.mjs +49 -0
  517. package/esm/tooling/agents-md/write-agents-md.mjs.map +1 -0
  518. package/esm/tooling/board/board-message.d.mts +31 -0
  519. package/esm/tooling/board/board-message.d.mts.map +1 -0
  520. package/esm/tooling/board/board-message.mjs +86 -0
  521. package/esm/tooling/board/board-message.mjs.map +1 -0
  522. package/esm/tooling/board/board.d.mts +109 -0
  523. package/esm/tooling/board/board.d.mts.map +1 -0
  524. package/esm/tooling/board/board.mjs +406 -0
  525. package/esm/tooling/board/board.mjs.map +1 -0
  526. package/esm/tooling/board/board.types.d.mts +72 -0
  527. package/esm/tooling/board/board.types.d.mts.map +1 -0
  528. package/esm/tooling/board/board.types.mjs +54 -0
  529. package/esm/tooling/board/board.types.mjs.map +1 -0
  530. package/esm/tooling/check/changed-files.d.mts +33 -0
  531. package/esm/tooling/check/changed-files.d.mts.map +1 -0
  532. package/esm/tooling/check/changed-files.mjs +73 -0
  533. package/esm/tooling/check/changed-files.mjs.map +1 -0
  534. package/esm/tooling/check/check-report.types.d.mts +62 -0
  535. package/esm/tooling/check/check-report.types.d.mts.map +1 -0
  536. package/esm/tooling/check/check-report.types.mjs +37 -0
  537. package/esm/tooling/check/check-report.types.mjs.map +1 -0
  538. package/esm/tooling/check/code-style-conventions.mjs +106 -0
  539. package/esm/tooling/check/code-style-conventions.mjs.map +1 -0
  540. package/esm/tooling/check/conventions-step.d.mts +34 -0
  541. package/esm/tooling/check/conventions-step.d.mts.map +1 -0
  542. package/esm/tooling/check/conventions-step.mjs +184 -0
  543. package/esm/tooling/check/conventions-step.mjs.map +1 -0
  544. package/esm/tooling/check/environment-step.d.mts +18 -0
  545. package/esm/tooling/check/environment-step.d.mts.map +1 -0
  546. package/esm/tooling/check/environment-step.mjs +78 -0
  547. package/esm/tooling/check/environment-step.mjs.map +1 -0
  548. package/esm/tooling/check/index.d.mts +8 -0
  549. package/esm/tooling/check/index.mjs +10 -0
  550. package/esm/tooling/check/lint-step.d.mts +19 -0
  551. package/esm/tooling/check/lint-step.d.mts.map +1 -0
  552. package/esm/tooling/check/lint-step.mjs +111 -0
  553. package/esm/tooling/check/lint-step.mjs.map +1 -0
  554. package/esm/tooling/check/request-input.mjs +132 -0
  555. package/esm/tooling/check/request-input.mjs.map +1 -0
  556. package/esm/tooling/check/run-check.d.mts +35 -0
  557. package/esm/tooling/check/run-check.d.mts.map +1 -0
  558. package/esm/tooling/check/run-check.mjs +192 -0
  559. package/esm/tooling/check/run-check.mjs.map +1 -0
  560. package/esm/tooling/check/run-tests.d.mts +48 -0
  561. package/esm/tooling/check/run-tests.d.mts.map +1 -0
  562. package/esm/tooling/check/run-tests.mjs +93 -0
  563. package/esm/tooling/check/run-tests.mjs.map +1 -0
  564. package/esm/tooling/check/security-conventions.mjs +648 -0
  565. package/esm/tooling/check/security-conventions.mjs.map +1 -0
  566. package/esm/tooling/check/source-ast.mjs +195 -0
  567. package/esm/tooling/check/source-ast.mjs.map +1 -0
  568. package/esm/tooling/check/source-files.mjs +27 -0
  569. package/esm/tooling/check/source-files.mjs.map +1 -0
  570. package/esm/tooling/check/tests-step.d.mts +34 -0
  571. package/esm/tooling/check/tests-step.d.mts.map +1 -0
  572. package/esm/tooling/check/tests-step.mjs +177 -0
  573. package/esm/tooling/check/tests-step.mjs.map +1 -0
  574. package/esm/tooling/dev-state/dev-server-state.d.mts +39 -0
  575. package/esm/tooling/dev-state/dev-server-state.d.mts.map +1 -0
  576. package/esm/tooling/dev-state/dev-server-state.mjs +67 -0
  577. package/esm/tooling/dev-state/dev-server-state.mjs.map +1 -0
  578. package/esm/tooling/devtools/devtools-client.d.mts +91 -0
  579. package/esm/tooling/devtools/devtools-client.d.mts.map +1 -0
  580. package/esm/tooling/devtools/devtools-client.mjs +155 -0
  581. package/esm/tooling/devtools/devtools-client.mjs.map +1 -0
  582. package/esm/tooling/generate/generation.d.mts +78 -0
  583. package/esm/tooling/generate/generation.d.mts.map +1 -0
  584. package/esm/tooling/generate/generation.mjs +123 -0
  585. package/esm/tooling/generate/generation.mjs.map +1 -0
  586. package/esm/tooling/generate/generator-spec.d.mts +57 -0
  587. package/esm/tooling/generate/generator-spec.d.mts.map +1 -0
  588. package/esm/tooling/generate/generator-spec.mjs +102 -0
  589. package/esm/tooling/generate/generator-spec.mjs.map +1 -0
  590. package/esm/tooling/generate/index.mjs +6 -0
  591. package/esm/tooling/generate/project-files.mjs +121 -0
  592. package/esm/tooling/generate/project-files.mjs.map +1 -0
  593. package/esm/tooling/generate/run-cli.d.mts +40 -0
  594. package/esm/tooling/generate/run-cli.d.mts.map +1 -0
  595. package/esm/tooling/generate/run-cli.mjs +93 -0
  596. package/esm/tooling/generate/run-cli.mjs.map +1 -0
  597. package/esm/tooling/generate/unified-diff.d.mts +37 -0
  598. package/esm/tooling/generate/unified-diff.d.mts.map +1 -0
  599. package/esm/tooling/generate/unified-diff.mjs +161 -0
  600. package/esm/tooling/generate/unified-diff.mjs.map +1 -0
  601. package/esm/tooling/index.d.mts +41 -0
  602. package/esm/tooling/index.mjs +45 -0
  603. package/esm/tooling/inspect/boot-for-inspect.d.mts +23 -0
  604. package/esm/tooling/inspect/boot-for-inspect.d.mts.map +1 -0
  605. package/esm/tooling/inspect/boot-for-inspect.mjs +63 -0
  606. package/esm/tooling/inspect/boot-for-inspect.mjs.map +1 -0
  607. package/esm/tooling/inspect/collect-config.mjs +77 -0
  608. package/esm/tooling/inspect/collect-config.mjs.map +1 -0
  609. package/esm/tooling/inspect/collect-models.d.mts +9 -0
  610. package/esm/tooling/inspect/collect-models.d.mts.map +1 -0
  611. package/esm/tooling/inspect/collect-models.mjs +154 -0
  612. package/esm/tooling/inspect/collect-models.mjs.map +1 -0
  613. package/esm/tooling/inspect/collect-packages.d.mts +10 -0
  614. package/esm/tooling/inspect/collect-packages.d.mts.map +1 -0
  615. package/esm/tooling/inspect/collect-packages.mjs +157 -0
  616. package/esm/tooling/inspect/collect-packages.mjs.map +1 -0
  617. package/esm/tooling/inspect/collect-pages.mjs +108 -0
  618. package/esm/tooling/inspect/collect-pages.mjs.map +1 -0
  619. package/esm/tooling/inspect/collect-routes.mjs +168 -0
  620. package/esm/tooling/inspect/collect-routes.mjs.map +1 -0
  621. package/esm/tooling/inspect/event-recorder.d.mts +37 -0
  622. package/esm/tooling/inspect/event-recorder.d.mts.map +1 -0
  623. package/esm/tooling/inspect/event-recorder.mjs +91 -0
  624. package/esm/tooling/inspect/event-recorder.mjs.map +1 -0
  625. package/esm/tooling/inspect/index.d.mts +7 -0
  626. package/esm/tooling/inspect/index.mjs +7 -0
  627. package/esm/tooling/inspect/inspect-app.d.mts +53 -0
  628. package/esm/tooling/inspect/inspect-app.d.mts.map +1 -0
  629. package/esm/tooling/inspect/inspect-app.mjs +92 -0
  630. package/esm/tooling/inspect/inspect-app.mjs.map +1 -0
  631. package/esm/tooling/inspect/inspect-report.schema.d.mts +15 -0
  632. package/esm/tooling/inspect/inspect-report.schema.d.mts.map +1 -0
  633. package/esm/tooling/inspect/inspect-report.schema.mjs +463 -0
  634. package/esm/tooling/inspect/inspect-report.schema.mjs.map +1 -0
  635. package/esm/tooling/inspect/inspect-report.types.d.mts +196 -0
  636. package/esm/tooling/inspect/inspect-report.types.d.mts.map +1 -0
  637. package/esm/tooling/inspect/inspect-report.types.mjs +33 -0
  638. package/esm/tooling/inspect/inspect-report.types.mjs.map +1 -0
  639. package/esm/tooling/mcp/create-mcp-context.d.mts +26 -0
  640. package/esm/tooling/mcp/create-mcp-context.d.mts.map +1 -0
  641. package/esm/tooling/mcp/create-mcp-context.mjs +75 -0
  642. package/esm/tooling/mcp/create-mcp-context.mjs.map +1 -0
  643. package/esm/tooling/mcp/db-schema.d.mts +49 -0
  644. package/esm/tooling/mcp/db-schema.d.mts.map +1 -0
  645. package/esm/tooling/mcp/db-schema.mjs +56 -0
  646. package/esm/tooling/mcp/db-schema.mjs.map +1 -0
  647. package/esm/tooling/mcp/docs-search.d.mts +72 -0
  648. package/esm/tooling/mcp/docs-search.d.mts.map +1 -0
  649. package/esm/tooling/mcp/docs-search.mjs +178 -0
  650. package/esm/tooling/mcp/docs-search.mjs.map +1 -0
  651. package/esm/tooling/mcp/index.mjs +9 -0
  652. package/esm/tooling/mcp/load-ai-tools.d.mts +62 -0
  653. package/esm/tooling/mcp/load-ai-tools.d.mts.map +1 -0
  654. package/esm/tooling/mcp/load-ai-tools.mjs +44 -0
  655. package/esm/tooling/mcp/load-ai-tools.mjs.map +1 -0
  656. package/esm/tooling/mcp/mcp-tools.d.mts +60 -0
  657. package/esm/tooling/mcp/mcp-tools.d.mts.map +1 -0
  658. package/esm/tooling/mcp/mcp-tools.mjs +513 -0
  659. package/esm/tooling/mcp/mcp-tools.mjs.map +1 -0
  660. package/esm/tooling/mcp/start-mcp-server.d.mts +56 -0
  661. package/esm/tooling/mcp/start-mcp-server.d.mts.map +1 -0
  662. package/esm/tooling/mcp/start-mcp-server.mjs +126 -0
  663. package/esm/tooling/mcp/start-mcp-server.mjs.map +1 -0
  664. package/esm/tooling/mcp/tool-input.d.mts +75 -0
  665. package/esm/tooling/mcp/tool-input.d.mts.map +1 -0
  666. package/esm/tooling/mcp/tool-input.mjs +72 -0
  667. package/esm/tooling/mcp/tool-input.mjs.map +1 -0
  668. package/esm/tooling/problem.d.mts +45 -0
  669. package/esm/tooling/problem.d.mts.map +1 -0
  670. package/esm/tooling/problem.mjs +28 -0
  671. package/esm/tooling/problem.mjs.map +1 -0
  672. package/esm/tooling/trace/trace-report.types.d.mts +71 -0
  673. package/esm/tooling/trace/trace-report.types.d.mts.map +1 -0
  674. package/esm/tooling/trace/trace-report.types.mjs +7 -0
  675. package/esm/tooling/trace/trace-report.types.mjs.map +1 -0
  676. package/esm/tooling/trace/trace-request.d.mts +83 -0
  677. package/esm/tooling/trace/trace-request.d.mts.map +1 -0
  678. package/esm/tooling/trace/trace-request.mjs +241 -0
  679. package/esm/tooling/trace/trace-request.mjs.map +1 -0
  680. package/esm/tooling/typecheck/index.d.mts +1 -0
  681. package/esm/tooling/typecheck/index.mjs +3 -0
  682. package/esm/tooling/typecheck/run-typecheck.d.mts +59 -0
  683. package/esm/tooling/typecheck/run-typecheck.d.mts.map +1 -0
  684. package/esm/tooling/typecheck/run-typecheck.mjs +153 -0
  685. package/esm/tooling/typecheck/run-typecheck.mjs.map +1 -0
  686. package/esm/upgrade/codemods/head-viewport.mjs +46 -0
  687. package/esm/upgrade/codemods/head-viewport.mjs.map +1 -0
  688. package/esm/upgrade/codemods/helpers.mjs +81 -0
  689. package/esm/upgrade/codemods/helpers.mjs.map +1 -0
  690. package/esm/upgrade/codemods/index.mjs +34 -0
  691. package/esm/upgrade/codemods/index.mjs.map +1 -0
  692. package/esm/upgrade/codemods/logger-sync-calls.mjs +57 -0
  693. package/esm/upgrade/codemods/logger-sync-calls.mjs.map +1 -0
  694. package/esm/upgrade/codemods/package-json.mjs +122 -0
  695. package/esm/upgrade/codemods/package-json.mjs.map +1 -0
  696. package/esm/upgrade/codemods/request-log-snapshot.mjs +82 -0
  697. package/esm/upgrade/codemods/request-log-snapshot.mjs.map +1 -0
  698. package/esm/upgrade/codemods/review-sites.mjs +262 -0
  699. package/esm/upgrade/codemods/review-sites.mjs.map +1 -0
  700. package/esm/upgrade/diff.mjs +119 -0
  701. package/esm/upgrade/diff.mjs.map +1 -0
  702. package/esm/upgrade/format-upgrade-report.mjs +32 -0
  703. package/esm/upgrade/format-upgrade-report.mjs.map +1 -0
  704. package/esm/upgrade/load-ts-morph.mjs +48 -0
  705. package/esm/upgrade/load-ts-morph.mjs.map +1 -0
  706. package/esm/upgrade/notes.mjs +16 -0
  707. package/esm/upgrade/notes.mjs.map +1 -0
  708. package/esm/upgrade/run-upgrade.mjs +246 -0
  709. package/esm/upgrade/run-upgrade.mjs.map +1 -0
  710. package/esm/upgrade/upgrade-command.action.mjs +37 -0
  711. package/esm/upgrade/upgrade-command.action.mjs.map +1 -0
  712. package/esm/upgrade/version.mjs +39 -0
  713. package/esm/upgrade/version.mjs.map +1 -0
  714. package/esm/use-cases/use-cases-registry.mjs.map +1 -1
  715. package/esm/utils/clock.d.mts +33 -0
  716. package/esm/utils/clock.d.mts.map +1 -0
  717. package/esm/utils/clock.mjs +27 -0
  718. package/esm/utils/clock.mjs.map +1 -0
  719. package/esm/utils/framework-vesion.mjs +1 -1
  720. package/esm/utils/framework-vesion.mjs.map +1 -1
  721. package/esm/utils/ids.d.mts +32 -0
  722. package/esm/utils/ids.d.mts.map +1 -0
  723. package/esm/utils/ids.mjs +33 -0
  724. package/esm/utils/ids.mjs.map +1 -0
  725. package/esm/utils/index.d.mts +3 -0
  726. package/esm/utils/index.mjs +3 -0
  727. package/esm/utils/runtime.d.mts +59 -0
  728. package/esm/utils/runtime.d.mts.map +1 -0
  729. package/esm/utils/runtime.mjs +85 -0
  730. package/esm/utils/runtime.mjs.map +1 -0
  731. package/esm/validation/index.d.mts +1 -1
  732. package/esm/validation/types.d.mts +57 -2
  733. package/esm/validation/types.d.mts.map +1 -1
  734. package/esm/validation/validateAll.mjs +19 -2
  735. package/esm/validation/validateAll.mjs.map +1 -1
  736. package/esm/validation/validation-failure-status.mjs +15 -0
  737. package/esm/validation/validation-failure-status.mjs.map +1 -0
  738. package/esm/validation/validators/file-validator.d.mts +0 -16
  739. package/esm/validation/validators/file-validator.d.mts.map +1 -1
  740. package/esm/warlock-config/bundle-config.mjs +1 -1
  741. package/esm/warlock-config/types.d.mts +27 -3
  742. package/esm/warlock-config/types.d.mts.map +1 -1
  743. package/llms-full.txt +3166 -736
  744. package/llms.txt +16 -6
  745. package/package.json +43 -13
  746. package/schemas/inspect-report.schema.json +554 -0
  747. package/skills/README.md +9 -0
  748. package/skills/add-connector/SKILL.md +26 -38
  749. package/skills/benchmark-code/SKILL.md +30 -24
  750. package/skills/build-restful/SKILL.md +14 -14
  751. package/skills/build-url/SKILL.md +18 -18
  752. package/skills/configure-app/SKILL.md +107 -14
  753. package/skills/create-controller/SKILL.md +25 -12
  754. package/skills/create-module/SKILL.md +3 -3
  755. package/skills/define-resource/SKILL.md +32 -29
  756. package/skills/encrypt-data/SKILL.md +21 -19
  757. package/skills/generate-openapi/SKILL.md +50 -24
  758. package/skills/hash-password/SKILL.md +2 -2
  759. package/skills/health-checks/SKILL.md +24 -7
  760. package/skills/index.md +9 -4
  761. package/skills/lower-stage3-decorators/SKILL.md +4 -4
  762. package/skills/make-endpoint/SKILL.md +110 -0
  763. package/skills/model-factories/SKILL.md +92 -0
  764. package/skills/process-image/SKILL.md +32 -30
  765. package/skills/register-route/SKILL.md +109 -10
  766. package/skills/request-memo/SKILL.md +1 -1
  767. package/skills/request-tracing/SKILL.md +4 -1
  768. package/skills/resolve-path/SKILL.md +45 -44
  769. package/skills/retry-operation/SKILL.md +20 -11
  770. package/skills/run-app/SKILL.md +106 -22
  771. package/skills/send-response/SKILL.md +179 -14
  772. package/skills/store-file/SKILL.md +93 -53
  773. package/skills/test-fakes/SKILL.md +123 -0
  774. package/skills/test-http/SKILL.md +125 -21
  775. package/skills/test-service/SKILL.md +41 -1
  776. package/skills/update-packages/SKILL.md +29 -18
  777. package/skills/upgrade-from-5-29/SKILL.md +413 -0
  778. package/skills/upload-file/SKILL.md +31 -33
  779. package/skills/use-app-context/SKILL.md +38 -31
  780. package/skills/use-middleware/SKILL.md +45 -25
  781. package/skills/use-model-transformers/SKILL.md +37 -28
  782. package/skills/use-repository/SKILL.md +2 -2
  783. package/skills/validate-input/SKILL.md +72 -28
  784. package/skills/warlock-agents-md/SKILL.md +96 -0
  785. package/skills/warlock-board/SKILL.md +123 -0
  786. package/skills/warlock-check/SKILL.md +132 -0
  787. package/skills/warlock-conventions/SKILL.md +115 -0
  788. package/skills/warlock-doctor/SKILL.md +55 -22
  789. package/skills/warlock-inspect/SKILL.md +134 -0
  790. package/skills/warlock-mcp/SKILL.md +120 -0
  791. package/skills/warlock-routes/SKILL.md +18 -11
  792. package/skills/warlock-trace/SKILL.md +81 -0
  793. package/skills/wire-socket/SKILL.md +8 -8
  794. package/skills/write-seeder/SKILL.md +46 -32
  795. package/skills/write-use-case/SKILL.md +40 -27
  796. package/esm/http/uploads/matches-if-none-match.mjs +0 -13
  797. package/esm/http/uploads/matches-if-none-match.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board-command.action.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/board/board-command.action.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport path from \"node:path\";\nimport type { CommandActionData } from \"../../../commands/types\";\nimport { WarlockError } from \"../../../errors/warlock-error\";\nimport {\n addBoardItem,\n initBoard,\n moveBoardItem,\n nextBoardStates,\n readBoardItem,\n readBoardStatus,\n sendBoardMessage,\n watchBoard,\n} from \"../../../tooling/board/board\";\nimport {\n BOARD_STATES,\n BOARD_VERDICT_LINES,\n type BoardItem,\n type BoardMessage,\n type BoardState,\n type BoardVerdict,\n isBoardState,\n isBoardVerdict,\n} from \"../../../tooling/board/board.types\";\nimport { flushAndExit } from \"../../flush-and-exit\";\n\n/** The exit code of `warlock board watch` when it times out. */\nexport const BOARD_WATCH_TIMEOUT_EXIT_CODE = 3;\n\n/** The sub-commands of `warlock board`. */\nexport const BOARD_ACTIONS = [\"init\", \"add\", \"status\", \"send\", \"watch\"] as const;\n\n/** One parsed `warlock board …` invocation. */\nexport type BoardInvocation =\n | { type: \"init\" }\n | {\n type: \"add\";\n title: string;\n assignee: string | null;\n reviewer: string | null;\n by: string | null;\n }\n | { type: \"overview\" }\n | { type: \"item\"; id: number }\n | { type: \"move\"; id: number; state: BoardState; by: string | null; note: string | null }\n | {\n type: \"send\";\n to: string;\n from: string;\n subject: string;\n body: string;\n item: number | null;\n verdict: BoardVerdict | null;\n }\n | { type: \"watch\"; agent: string; timeoutMs: number; since: number | undefined };\n\ntype Options = CommandActionData[\"options\"];\n\nfunction stringOption(options: Options, key: string): string | undefined {\n const value = options[key];\n\n if (typeof value === \"number\") return String(value);\n\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\n}\n\nfunction parseId(value: string | undefined, label: string): number {\n const id = value === undefined ? Number.NaN : Number(value);\n\n if (!Number.isInteger(id) || id < 1) {\n throw new Error(`${label} must be a positive whole number, got ${JSON.stringify(value)}.`);\n }\n\n return id;\n}\n\n/** `--body text` as is; `--body @notes.md` reads the file (relative to `cwd`). */\nexport function readBodyOption(value: string | undefined, cwd: string): string {\n if (value === undefined) return \"\";\n\n return value.startsWith(\"@\") ? readFileSync(path.resolve(cwd, value.slice(1)), \"utf8\") : value;\n}\n\n/** The current agent: the explicit option, else `WARLOCK_AGENT`, else `null`. */\nfunction agentOf(options: Options, key: string, environment: NodeJS.ProcessEnv): string | null {\n return stringOption(options, key) ?? environment.WARLOCK_AGENT ?? null;\n}\n\n/**\n * Turn `warlock board <action> [args...]` into a {@link BoardInvocation}.\n * Throws on an unknown action, a missing argument or an invalid value.\n *\n * @param args Positionals after `board`: the action first.\n * @param options Parsed flags.\n * @param cwd Where `--body @file` resolves.\n * @param environment Where `WARLOCK_AGENT` is read.\n */\nexport function parseBoardInvocation(\n args: readonly string[],\n options: Options,\n cwd = process.cwd(),\n environment: NodeJS.ProcessEnv = process.env,\n): BoardInvocation {\n const [action, ...rest] = args;\n\n switch (action) {\n case \"init\":\n return { type: \"init\" };\n\n case \"add\": {\n const title = rest.join(\" \").trim();\n\n if (title.length === 0)\n throw new Error('Usage: warlock board add \"<title>\" [--assignee a --reviewer b]');\n\n return {\n type: \"add\",\n title,\n assignee: stringOption(options, \"assignee\") ?? null,\n reviewer: stringOption(options, \"reviewer\") ?? null,\n by: agentOf(options, \"by\", environment),\n };\n }\n\n case \"status\": {\n const [idText, state] = rest;\n\n if (idText === undefined) return { type: \"overview\" };\n\n const id = parseId(idText, \"The item id\");\n\n if (state === undefined) return { type: \"item\", id };\n\n if (!isBoardState(state)) {\n throw new Error(\n `Unknown state ${JSON.stringify(state)}. States: ${BOARD_STATES.join(\", \")}.`,\n );\n }\n\n return {\n type: \"move\",\n id,\n state,\n by: agentOf(options, \"by\", environment),\n note: stringOption(options, \"note\") ?? null,\n };\n }\n\n case \"send\": {\n const [to, ...subjectWords] = rest;\n const subject = subjectWords.join(\" \").trim();\n\n if (to === undefined || subject.length === 0) {\n throw new Error(\n 'Usage: warlock board send <agent> \"<subject>\" --from <agent> [--item id --body text|@file --verdict approved|changes-requested]',\n );\n }\n\n const from = agentOf(options, \"from\", environment);\n\n if (from === null) {\n throw new Error(\"Name the sender with --from <agent> (or set WARLOCK_AGENT).\");\n }\n\n const verdict = stringOption(options, \"verdict\");\n\n if (verdict !== undefined && !isBoardVerdict(verdict)) {\n throw new Error(\n `--verdict must be \"approved\" or \"changes-requested\", got ${JSON.stringify(verdict)}.`,\n );\n }\n\n const item = stringOption(options, \"item\");\n\n return {\n type: \"send\",\n to,\n from,\n subject,\n body: readBodyOption(stringOption(options, \"body\"), cwd),\n item: item === undefined ? null : parseId(item, \"--item\"),\n verdict: verdict ?? null,\n };\n }\n\n case \"watch\": {\n const [agent] = rest;\n\n if (agent === undefined)\n throw new Error(\"Usage: warlock board watch <agent> [--timeout seconds --since N]\");\n\n const timeout = stringOption(options, \"timeout\");\n const seconds = timeout === undefined ? 600 : Number(timeout);\n\n if (!Number.isFinite(seconds) || seconds <= 0) {\n throw new Error(\n `--timeout must be a positive number of seconds, got ${JSON.stringify(timeout)}.`,\n );\n }\n\n const since = stringOption(options, \"since\");\n const sinceNumber = since === undefined ? undefined : Number(since);\n\n if (sinceNumber !== undefined && (!Number.isInteger(sinceNumber) || sinceNumber < 0)) {\n throw new Error(`--since must be a whole number, got ${JSON.stringify(since)}.`);\n }\n\n return { type: \"watch\", agent, timeoutMs: Math.round(seconds * 1000), since: sinceNumber };\n }\n\n default:\n throw new Error(\n `Unknown board action ${JSON.stringify(action ?? \"\")}. Actions: ${BOARD_ACTIONS.join(\", \")}.`,\n );\n }\n}\n\n/** `#3 [in-progress] Add the orders module (implementer → reviewer)` */\nexport function formatBoardItemLine(item: BoardItem): string {\n const people =\n item.assignee || item.reviewer ? ` (${item.assignee ?? \"-\"} → ${item.reviewer ?? \"-\"})` : \"\";\n\n return `#${item.id} [${item.state}] ${item.title}${people}`;\n}\n\nfunction formatMessage(message: BoardMessage): string[] {\n const about = message.item === null ? \"\" : ` (item #${message.item})`;\n\n return [\n `── ${message.file}`,\n `From ${message.from}${about}: ${message.subject}`,\n ...(message.body.length > 0 ? [\"\", message.body] : []),\n ...(message.verdict ? [\"\", BOARD_VERDICT_LINES[message.verdict]] : []),\n \"\",\n ];\n}\n\n/** What one invocation produced: the JSON to print, the human lines, and the exit code. */\nexport type BoardOutcome = { json: unknown; lines: string[]; exitCode: number };\n\n/** Run one parsed invocation against the board in `cwd`. Throws `WarlockError`s with WL74xx codes. */\nexport async function runBoardInvocation(\n invocation: BoardInvocation,\n cwd = process.cwd(),\n): Promise<BoardOutcome> {\n switch (invocation.type) {\n case \"init\": {\n const result = initBoard(cwd);\n\n return {\n json: { ok: true, ...result },\n lines: [\n result.created ? `Created ${result.directory}/` : `${result.directory}/ already exists`,\n ...(result.gitignoreUpdated ? [`Added ${result.directory}/ to .gitignore`] : []),\n ],\n exitCode: 0,\n };\n }\n\n case \"add\": {\n const item = addBoardItem(\n {\n title: invocation.title,\n assignee: invocation.assignee,\n reviewer: invocation.reviewer,\n by: invocation.by,\n },\n cwd,\n );\n\n return {\n json: { ok: true, item },\n lines: [`Added ${formatBoardItemLine(item)}`],\n exitCode: 0,\n };\n }\n\n case \"overview\": {\n const status = readBoardStatus(cwd);\n const lines =\n status.items.length === 0\n ? ['No items. Add one with `warlock board add \"<title>\"`.']\n : status.items.map(formatBoardItemLine);\n\n if (status.inboxes.length > 0) {\n lines.push(\"\", \"Inboxes:\");\n\n for (const inbox of status.inboxes) {\n lines.push(\n ` ${inbox.agent.padEnd(16)} ${inbox.messages} message(s), ${inbox.unread} unread`,\n );\n }\n }\n\n return { json: { ok: true, ...status }, lines, exitCode: 0 };\n }\n\n case \"item\": {\n const item = readBoardItem(invocation.id, cwd);\n const next = nextBoardStates(item.state);\n\n return {\n json: { ok: true, item, next },\n lines: [\n formatBoardItemLine(item),\n ` next: ${next.join(\", \")}`,\n ...item.history.map(\n (entry) =>\n ` ${entry.at} ${entry.from ?? \"∅\"} → ${entry.to}${entry.by ? ` by ${entry.by}` : \"\"}${entry.note ? ` — ${entry.note}` : \"\"}`,\n ),\n ],\n exitCode: 0,\n };\n }\n\n case \"move\": {\n const item = moveBoardItem(\n invocation.id,\n invocation.state,\n { by: invocation.by, note: invocation.note },\n cwd,\n );\n\n return {\n json: { ok: true, item },\n lines: [`Moved ${formatBoardItemLine(item)}`],\n exitCode: 0,\n };\n }\n\n case \"send\": {\n const result = sendBoardMessage(\n {\n to: invocation.to,\n from: invocation.from,\n subject: invocation.subject,\n body: invocation.body,\n item: invocation.item,\n verdict: invocation.verdict,\n },\n cwd,\n );\n\n return {\n json: { ok: true, ...result },\n lines: [\n `Wrote ${result.message.file}`,\n ...(result.item ? [`Moved ${formatBoardItemLine(result.item)}`] : []),\n ],\n exitCode: 0,\n };\n }\n\n case \"watch\": {\n const result = await watchBoard(\n { agent: invocation.agent, timeoutMs: invocation.timeoutMs, since: invocation.since },\n cwd,\n );\n\n return {\n json: { ok: true, timedOut: false, ...result },\n lines: result.messages.flatMap(formatMessage),\n exitCode: 0,\n };\n }\n }\n}\n\n/**\n * Action behind `warlock board <action> [args...]`.\n *\n * With `--json`, stdout carries exactly one JSON object — `{ ok: true, … }`, or\n * `{ ok: false, code, message }` for a coded failure (`timedOut: true` for a\n * watch timeout). Exit codes: 0 done, 1 refused or invalid, 3 watch timed out.\n *\n * @param data Parsed CLI args: the action and its positionals, and the flags.\n */\nexport async function boardCommandAction({ args, options }: CommandActionData): Promise<void> {\n const json = options.json === true;\n\n try {\n const outcome = await runBoardInvocation(parseBoardInvocation(args, options));\n\n if (json) {\n console.log(JSON.stringify(outcome.json, null, 2));\n } else {\n for (const line of outcome.lines) console.log(line);\n }\n\n if (outcome.exitCode !== 0) await flushAndExit(outcome.exitCode);\n } catch (error) {\n const timedOut = error instanceof WarlockError && error.code === \"WL7404\";\n const exitCode = timedOut ? BOARD_WATCH_TIMEOUT_EXIT_CODE : 1;\n\n if (!json && !timedOut) throw error;\n\n const message = error instanceof Error ? error.message : String(error);\n\n if (json) {\n console.log(\n JSON.stringify(\n {\n ok: false,\n code: error instanceof WarlockError ? error.code : null,\n message,\n ...(timedOut ? { timedOut: true } : {}),\n },\n null,\n 2,\n ),\n );\n } else {\n console.error(message);\n }\n\n await flushAndExit(exitCode);\n }\n}\n"],"mappings":";;;;;;;;;AA2BA,MAAa,gCAAgC;;AAG7C,MAAa,gBAAgB;CAAC;CAAQ;CAAO;CAAU;CAAQ;AAAO;AA4BtE,SAAS,aAAa,SAAkB,KAAiC;CACvE,MAAM,QAAQ,QAAQ;CAEtB,IAAI,OAAO,UAAU,UAAU,OAAO,OAAO,KAAK;CAElD,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,CAAC,CAAC,SAAS,IAAI,MAAM,KAAK,IAAI;AAC/E;AAEA,SAAS,QAAQ,OAA2B,OAAuB;CACjE,MAAM,KAAK,UAAU,SAAY,MAAa,OAAO,KAAK;CAE1D,IAAI,C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OAAO;EAGvB,MAAM,aAAa,QAAQ;CAC7B;AACF"}
@@ -0,0 +1,78 @@
1
+ import { command } from "../../commands/cli-command.mjs";
2
+ import { boardCommandAction } from "./board/board-command.action.mjs";
3
+
4
+ //#region ../../packages/core/src/cli/commands/board.command.ts
5
+ /**
6
+ * `warlock board <action>` — the agent board: work items and append-only
7
+ * messages two coding agents (an implementer and a reviewer) share in the
8
+ * git-ignored `.warlock/board/` folder.
9
+ *
10
+ * Actions: `init`, `add <title>`, `status [id] [state]`, `send <agent>
11
+ * <subject>`, `watch <agent>`. No preload: it reads and writes files only.
12
+ */
13
+ const boardCommand = command({
14
+ name: "board <action> [args...]",
15
+ description: "Agent board: init | add <title> | status [id] [state] | send <agent> <subject> | watch <agent> (items and messages in .warlock/board/)",
16
+ action: boardCommandAction,
17
+ options: [
18
+ {
19
+ text: "--json, -j",
20
+ description: "Print one JSON object (stdout carries only the JSON)",
21
+ type: "boolean"
22
+ },
23
+ {
24
+ text: "--assignee",
25
+ description: "add: the agent doing the work",
26
+ type: "string"
27
+ },
28
+ {
29
+ text: "--reviewer",
30
+ description: "add: the agent reviewing it",
31
+ type: "string"
32
+ },
33
+ {
34
+ text: "--by",
35
+ description: "add, status: the agent making the change (default: WARLOCK_AGENT)",
36
+ type: "string"
37
+ },
38
+ {
39
+ text: "--note",
40
+ description: "status <id> <state>: why the item moved",
41
+ type: "string"
42
+ },
43
+ {
44
+ text: "--from",
45
+ description: "send: the sending agent (default: WARLOCK_AGENT)",
46
+ type: "string"
47
+ },
48
+ {
49
+ text: "--item",
50
+ description: "send: the item id the message is about",
51
+ type: "string"
52
+ },
53
+ {
54
+ text: "--body",
55
+ description: "send: the message body, or @file to read it from a file",
56
+ type: "string"
57
+ },
58
+ {
59
+ text: "--verdict",
60
+ description: "send: approved | changes-requested (also moves --item to that state)",
61
+ type: "string"
62
+ },
63
+ {
64
+ text: "--timeout",
65
+ description: "watch: seconds to wait before giving up with exit code 3 (default 600)",
66
+ type: "string"
67
+ },
68
+ {
69
+ text: "--since",
70
+ description: "watch: return messages numbered above N (default: the agent's cursor)",
71
+ type: "string"
72
+ }
73
+ ]
74
+ });
75
+
76
+ //#endregion
77
+ export { boardCommand };
78
+ //# sourceMappingURL=board.command.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"board.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/board.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\nimport { boardCommandAction } from \"./board/board-command.action\";\n\n/**\n * `warlock board <action>` — the agent board: work items and append-only\n * messages two coding agents (an implementer and a reviewer) share in the\n * git-ignored `.warlock/board/` folder.\n *\n * Actions: `init`, `add <title>`, `status [id] [state]`, `send <agent>\n * <subject>`, `watch <agent>`. No preload: it reads and writes files only.\n */\nexport const boardCommand = command({\n name: \"board <action> [args...]\",\n description:\n \"Agent board: init | add <title> | status [id] [state] | send <agent> <subject> | watch <agent> (items and messages in .warlock/board/)\",\n action: boardCommandAction,\n options: [\n {\n text: \"--json, -j\",\n description: \"Print one JSON object (stdout carries only the JSON)\",\n type: \"boolean\",\n },\n {\n text: \"--assignee\",\n description: \"add: the agent doing the work\",\n type: \"string\",\n },\n {\n text: \"--reviewer\",\n description: \"add: the agent reviewing it\",\n type: \"string\",\n },\n {\n text: \"--by\",\n description: \"add, status: the agent making the change (default: WARLOCK_AGENT)\",\n type: \"string\",\n },\n {\n text: \"--note\",\n description: \"status <id> <state>: why the item moved\",\n type: \"string\",\n },\n {\n text: \"--from\",\n description: \"send: the sending agent (default: WARLOCK_AGENT)\",\n type: \"string\",\n },\n {\n text: \"--item\",\n description: \"send: the item id the message is about\",\n type: \"string\",\n },\n {\n text: \"--body\",\n description: \"send: the message body, or @file to read it from a file\",\n type: \"string\",\n },\n {\n text: \"--verdict\",\n description: \"send: approved | changes-requested (also moves --item to that state)\",\n type: \"string\",\n },\n {\n text: \"--timeout\",\n description: \"watch: seconds to wait before giving up with exit code 3 (default 600)\",\n type: \"string\",\n },\n {\n text: \"--since\",\n description: \"watch: return messages numbered above N (default: the agent's cursor)\",\n type: \"string\",\n },\n ],\n});\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,aACE;CACF,QAAQ;CACR,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { unverifiedBuildRuntimeNotice } from "../../utils/runtime.mjs";
1
2
  import { command } from "../../commands/cli-command.mjs";
2
3
  import { buildAppProduction } from "../../production/build-app-production.mjs";
3
4
 
@@ -6,7 +7,11 @@ const buildCommand = command({
6
7
  name: "build",
7
8
  description: "Build the project for production",
8
9
  action: buildAppProduction,
9
- preload: { warlockConfig: true }
10
+ preload: { warlockConfig: true },
11
+ preAction: () => {
12
+ const notice = unverifiedBuildRuntimeNotice();
13
+ if (notice !== void 0) console.error(notice);
14
+ }
10
15
  });
11
16
 
12
17
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"build.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/build.command.ts"],"sourcesContent":["import { buildAppProduction } from \"../../production/build-app-production\";\nimport { command } from \"../../commands/cli-command\";\n\nexport const buildCommand = command({\n name: \"build\",\n description: \"Build the project for production\",\n action: buildAppProduction,\n preload: {\n warlockConfig: true,\n },\n});\n"],"mappings":";;;;AAGA,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,aAAa;CACb,QAAQ;CACR,SAAS,EACP,eAAe,KACjB;AACF,CAAC"}
1
+ {"version":3,"file":"build.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/build.command.ts"],"sourcesContent":["import { buildAppProduction } from \"../../production/build-app-production\";\nimport { command } from \"../../commands/cli-command\";\nimport { unverifiedBuildRuntimeNotice } from \"../../utils/runtime\";\n\nexport const buildCommand = command({\n name: \"build\",\n description: \"Build the project for production\",\n action: buildAppProduction,\n preload: {\n warlockConfig: true,\n },\n preAction: () => {\n // Bun and Deno can usually run the build, but only the Node build is\n // verified; say so on stderr without failing the command.\n const notice = unverifiedBuildRuntimeNotice();\n\n if (notice !== undefined) {\n console.error(notice);\n }\n },\n});\n"],"mappings":";;;;;AAIA,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,aAAa;CACb,QAAQ;CACR,SAAS,EACP,eAAe,KACjB;CACA,iBAAiB;EAGf,MAAM,SAAS,6BAA6B;EAE5C,IAAI,WAAW,QACb,QAAQ,MAAM,MAAM;CAExB;AACF,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { flushAndExit } from "../../flush-and-exit.mjs";
2
+ import { CHECK_STEPS } from "../../../tooling/check/check-report.types.mjs";
3
+ import { runCheck } from "../../../tooling/check/run-check.mjs";
4
+ import { childTypecheckRunner } from "./child-typecheck.mjs";
5
+ import { formatCheckSummary, printProblems } from "./format-problems.mjs";
6
+
7
+ //#region ../../packages/core/src/cli/commands/check/check-command.action.ts
8
+ function stringOption(value) {
9
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
10
+ }
11
+ function isStepName(value) {
12
+ return CHECK_STEPS.includes(value);
13
+ }
14
+ /** Parse `--skip typecheck,lint`; throws on an unknown step name. */
15
+ function parseSkippedSteps(value) {
16
+ if (!value) return [];
17
+ const names = value.split(",").map((name) => name.trim()).filter((name) => name.length > 0);
18
+ const unknown = names.filter((name) => !isStepName(name));
19
+ if (unknown.length > 0) throw new Error(`Unknown check step(s): ${unknown.join(", ")}. Valid steps: ${CHECK_STEPS.join(", ")}.`);
20
+ return names.filter(isStepName);
21
+ }
22
+ /**
23
+ * Action behind `warlock check`.
24
+ *
25
+ * Runs {@link runCheck} with the typecheck in a child `warlock typecheck`
26
+ * process (so a heap overflow is reported, not fatal), prints the problems and
27
+ * the step summary — or, with `--json`, exactly the report — and exits with
28
+ * the report's code: 0 clean, 1 your code, 2 this machine.
29
+ *
30
+ * @param data Parsed CLI args: `changed`, `base`, `skip`, `project`, `json`.
31
+ */
32
+ async function checkCommandAction({ options }) {
33
+ const base = stringOption(options.base);
34
+ const changed = options.changed === true || base !== void 0;
35
+ const project = stringOption(options.project);
36
+ const skip = parseSkippedSteps(stringOption(options.skip));
37
+ const cliEntry = process.argv[1];
38
+ const flags = [...changed ? ["--changed"] : [], ...base ? ["--base", base] : []];
39
+ const report = await runCheck({
40
+ changed,
41
+ base,
42
+ skip,
43
+ project,
44
+ ...cliEntry ? { typecheck: childTypecheckRunner(cliEntry, flags) } : {}
45
+ });
46
+ if (options.json === true) console.log(JSON.stringify(report, null, 2));
47
+ else {
48
+ printProblems(report.problems);
49
+ if (report.problems.length > 0) console.log("");
50
+ for (const line of formatCheckSummary(report)) console.log(line);
51
+ }
52
+ if (report.exitCode !== 0) await flushAndExit(report.exitCode);
53
+ }
54
+
55
+ //#endregion
56
+ export { checkCommandAction };
57
+ //# sourceMappingURL=check-command.action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-command.action.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/check-command.action.ts"],"sourcesContent":["import type { CommandActionData } from \"../../../commands/types\";\nimport { CHECK_STEPS, type CheckStepName } from \"../../../tooling/check/check-report.types\";\nimport { runCheck } from \"../../../tooling/check/run-check\";\nimport { flushAndExit } from \"../../flush-and-exit\";\nimport { childTypecheckRunner } from \"./child-typecheck\";\nimport { formatCheckSummary, printProblems } from \"./format-problems\";\n\nfunction stringOption(value: string | number | boolean | undefined): string | undefined {\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\n}\n\nfunction isStepName(value: string): value is CheckStepName {\n return (CHECK_STEPS as readonly string[]).includes(value);\n}\n\n/** Parse `--skip typecheck,lint`; throws on an unknown step name. */\nexport function parseSkippedSteps(value: string | undefined): CheckStepName[] {\n if (!value) return [];\n\n const names = value\n .split(\",\")\n .map((name) => name.trim())\n .filter((name) => name.length > 0);\n const unknown = names.filter((name) => !isStepName(name));\n\n if (unknown.length > 0) {\n throw new Error(\n `Unknown check step(s): ${unknown.join(\", \")}. Valid steps: ${CHECK_STEPS.join(\", \")}.`,\n );\n }\n\n return names.filter(isStepName);\n}\n\n/**\n * Action behind `warlock check`.\n *\n * Runs {@link runCheck} with the typecheck in a child `warlock typecheck`\n * process (so a heap overflow is reported, not fatal), prints the problems and\n * the step summary — or, with `--json`, exactly the report — and exits with\n * the report's code: 0 clean, 1 your code, 2 this machine.\n *\n * @param data Parsed CLI args: `changed`, `base`, `skip`, `project`, `json`.\n */\nexport async function checkCommandAction({ options }: CommandActionData): Promise<void> {\n const base = stringOption(options.base);\n const changed = options.changed === true || base !== undefined;\n const project = stringOption(options.project);\n const skip = parseSkippedSteps(stringOption(options.skip));\n const cliEntry = process.argv[1];\n const flags = [...(changed ? [\"--changed\"] : []), ...(base ? [\"--base\", base] : [])];\n\n const report = await runCheck({\n changed,\n base,\n skip,\n project,\n ...(cliEntry ? { typecheck: childTypecheckRunner(cliEntry, flags) } : {}),\n });\n\n if (options.json === true) {\n console.log(JSON.stringify(report, null, 2));\n } else {\n printProblems(report.problems);\n\n if (report.problems.length > 0) console.log(\"\");\n\n for (const line of formatCheckSummary(report)) {\n console.log(line);\n }\n }\n\n if (report.exitCode !== 0) {\n await flushAndExit(report.exitCode);\n }\n}\n"],"mappings":";;;;;;;AAOA,SAAS,aAAa,OAA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E;EAE9C,KAAK,MAAM,QAAQ,mBAAmB,MAAM,GAC1C,QAAQ,IAAI,IAAI;CAEpB;CAEA,IAAI,OAAO,aAAa,GACtB,MAAM,aAAa,OAAO,QAAQ;AAEtC"}
@@ -0,0 +1,66 @@
1
+ import { createProblem } from "../../../tooling/problem.mjs";
2
+ import { execFile } from "node:child_process";
3
+
4
+ //#region ../../packages/core/src/cli/commands/check/child-typecheck.ts
5
+ function isTypecheckResult(value) {
6
+ return typeof value === "object" && value !== null && Array.isArray(Reflect.get(value, "problems")) && typeof Reflect.get(value, "checkedFiles") === "number";
7
+ }
8
+ /**
9
+ * Run the typecheck step as `warlock typecheck --json` in a child process.
10
+ *
11
+ * The compiler is the one step that can exhaust the heap on a large app. In
12
+ * its own process an overflow ends only that process, and `warlock check`
13
+ * still prints its report — with a `WL8007` environment problem instead of
14
+ * dying without output.
15
+ *
16
+ * @param cliEntry The warlock CLI script (`process.argv[1]` of `warlock check`).
17
+ * @param flags The `--changed` / `--base` flags of the parent run, so the child
18
+ * lists the same changed files.
19
+ */
20
+ function childTypecheckRunner(cliEntry, flags) {
21
+ return (options) => new Promise((resolve) => {
22
+ const args = [
23
+ cliEntry,
24
+ "typecheck",
25
+ "--json",
26
+ ...flags
27
+ ];
28
+ if (options.project) args.push("--project", options.project);
29
+ execFile(process.execPath, args, {
30
+ cwd: options.cwd ?? process.cwd(),
31
+ encoding: "utf8",
32
+ windowsHide: true,
33
+ maxBuffer: 64 * 1024 * 1024
34
+ }, (error, stdout, stderr) => {
35
+ let parsed;
36
+ try {
37
+ parsed = JSON.parse(stdout);
38
+ } catch {
39
+ parsed = void 0;
40
+ }
41
+ if (isTypecheckResult(parsed)) {
42
+ resolve(parsed);
43
+ return;
44
+ }
45
+ const outOfMemory = /heap out of memory|ERR_WORKER_OUT_OF_MEMORY/i.test(stderr);
46
+ const how = error?.signal ? `was killed (${error.signal})` : `exited with ${String(error?.code ?? 0)}`;
47
+ resolve({
48
+ ok: false,
49
+ mode: options.files ? "files" : "program",
50
+ files: null,
51
+ checkedFiles: 0,
52
+ durationMs: 0,
53
+ buildInfoFile: null,
54
+ problems: [createProblem({
55
+ code: "WL8007",
56
+ source: "environment",
57
+ message: `The typecheck ${outOfMemory ? "ran out of memory" : how}: ${stderr.trim().split("\n").slice(-3).join(" ") || "no output"}`
58
+ })]
59
+ });
60
+ });
61
+ });
62
+ }
63
+
64
+ //#endregion
65
+ export { childTypecheckRunner };
66
+ //# sourceMappingURL=child-typecheck.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"child-typecheck.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/child-typecheck.ts"],"sourcesContent":["import { execFile } from \"node:child_process\";\nimport type { TypecheckRunner } from \"../../../tooling/check/run-check\";\nimport { createProblem } from \"../../../tooling/problem\";\nimport type { TypecheckResult } from \"../../../tooling/typecheck/run-typecheck\";\n\nfunction isTypecheckResult(value: unknown): value is TypecheckResult {\n return (\n typeof value === \"object\" &&\n value !== null &&\n Array.isArray(Reflect.get(value, \"problems\")) &&\n typeof Reflect.get(value, \"checkedFiles\") === \"number\"\n );\n}\n\n/**\n * Run the typecheck step as `warlock typecheck --json` in a child process.\n *\n * The compiler is the one step that can exhaust the heap on a large app. In\n * its own process an overflow ends only that process, and `warlock check`\n * still prints its report — with a `WL8007` environment problem instead of\n * dying without output.\n *\n * @param cliEntry The warlock CLI script (`process.argv[1]` of `warlock check`).\n * @param flags The `--changed` / `--base` flags of the parent run, so the child\n * lists the same changed files.\n */\nexport function childTypecheckRunner(cliEntry: string, flags: readonly string[]): TypecheckRunner {\n return (options) =>\n new Promise((resolve) => {\n const args = [cliEntry, \"typecheck\", \"--json\", ...flags];\n\n if (options.project) args.push(\"--project\", options.project);\n\n execFile(\n process.execPath,\n args,\n {\n cwd: options.cwd ?? process.cwd(),\n encoding: \"utf8\",\n windowsHide: true,\n maxBuffer: 64 * 1024 * 1024,\n },\n (error, stdout, stderr) => {\n let parsed: unknown;\n\n try {\n parsed = JSON.parse(stdout);\n } catch {\n parsed = undefined;\n }\n\n if (isTypecheckResult(parsed)) {\n resolve(parsed);\n return;\n }\n\n const outOfMemory = /heap out of memory|ERR_WORKER_OUT_OF_MEMORY/i.test(stderr);\n const how = error?.signal\n ? `was killed (${error.signal})`\n : `exited with ${String(error?.code ?? 0)}`;\n\n resolve({\n ok: false,\n mode: options.files ? \"files\" : \"program\",\n files: null,\n checkedFiles: 0,\n durationMs: 0,\n buildInfoFile: null,\n problems: [\n createProblem({\n code: \"WL8007\",\n source: \"environment\",\n message: `The typecheck ${outOfMemory ? \"ran out of memory\" : how}: ${stderr.trim().split(\"\\n\").slice(-3).join(\" \") || \"no output\"}`,\n }),\n ],\n });\n },\n );\n });\n}\n"],"mappings":";;;;AAKA,SAAS,kBAAkB,OAA0C;CACnE,OACE,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAQ,QAAQ,IAAI,OAAO,UAAU,CAAC,KAC5C,OAAO,QAAQ,IAAI,OAAO,cAAc,MAAM;AAElD;;;;;;;;;;;;;AAcA,SAAgB,qBAAqB,UAAkB,OAA2C;CAChG,QAAQ,YACN,IAAI,SAAS,YAAY;EACvB,MAAM,OAAO;GAAC;GAAU;GAAa;GAAU,GAAG;EAAK;EAEvD,IAAI,QAAQ,SAAS,KAAK,KAAK,aAAa,QAAQ,OAAO;EAE3D,SACE,QAAQ,UACR,MACA;GACE,KAAK,QAAQ,OAAO,QAAQ,IAAI;GAChC,UAAU;GACV,aAAa;GACb,WAAW,KAAK,OAAO;EACzB,IACC,OAAO,QAAQ,WAAW;GACzB,IAAI;GAEJ,IAAI;IACF,SAAS,KAAK,MAAM,MAAM;GAC5B,QAAQ;IACN,SAAS;GACX;GAEA,IAAI,kBAAkB,MAAM,GAAG;IAC7B,QAAQ,MAAM;IACd;GACF;GAEA,MAAM,cAAc,+CAA+C,KAAK,MAAM;GAC9E,MAAM,MAAM,OAAO,SACf,eAAe,MAAM,OAAO,KAC5B,eAAe,OAAO,OAAO,QAAQ,CAAC;GAE1C,QAAQ;IACN,IAAI;IACJ,MAAM,QAAQ,QAAQ,UAAU;IAChC,OAAO;IACP,cAAc;IACd,YAAY;IACZ,eAAe;IACf,UAAU,CACR,cAAc;KACZ,MAAM;KACN,QAAQ;KACR,SAAS,iBAAiB,cAAc,sBAAsB,IAAI,IAAI,OAAO,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,KAAK,GAAG,KAAK;IACzH,CAAC,CACH;GACF,CAAC;EACH,CACF;CACF,CAAC;AACL"}
@@ -0,0 +1,43 @@
1
+ import { colors } from "@mongez/copper";
2
+
3
+ //#region ../../packages/core/src/cli/commands/check/format-problems.ts
4
+ /** `file:line:col`, as much of it as the problem has. */
5
+ function locationOf(problem) {
6
+ if (!problem.file) return "(project)";
7
+ if (problem.line === null) return problem.file;
8
+ return `${problem.file}:${problem.line}${problem.column === null ? "" : `:${problem.column}`}`;
9
+ }
10
+ /**
11
+ * Two lines per problem: `file:line:col CODE message (rule)`, then the fix
12
+ * hint. Uncolored, so it is testable; {@link printProblems} adds color.
13
+ */
14
+ function formatProblemLines(problems) {
15
+ return problems.flatMap((problem) => [`${locationOf(problem)} ${problem.code} ${problem.message.split("\n")[0]}${problem.rule ? ` (${problem.rule})` : ""}`, ` → ${problem.hint}`]);
16
+ }
17
+ /** Print problems to stdout, errors in red and warnings in yellow. */
18
+ function printProblems(problems) {
19
+ for (const problem of problems) {
20
+ const paint = problem.severity === "error" ? colors.red : colors.yellow;
21
+ const [first, second] = formatProblemLines([problem]);
22
+ console.log(paint(first ?? ""));
23
+ console.log(colors.dim(second ?? ""));
24
+ }
25
+ }
26
+ const STEP_SYMBOL = {
27
+ passed: "✓",
28
+ failed: "✗",
29
+ skipped: "-",
30
+ blocked: "!"
31
+ };
32
+ /** The step list and the verdict line of a check report, uncolored. */
33
+ function formatCheckSummary(report) {
34
+ const lines = report.steps.map((step) => `${STEP_SYMBOL[step.status]} ${step.name.padEnd(12)} ${step.status}${step.detail ? ` — ${step.detail}` : ""}`);
35
+ const { errors, warnings, environment } = report.summary;
36
+ lines.push("");
37
+ lines.push(report.exitCode === 0 ? `OK: ${warnings} warning(s)` : report.exitCode === 2 ? `${errors} error(s), ${environment} from this machine — fix the environment first (exit 2)` : `${errors} error(s) in the code (exit 1)`);
38
+ return lines;
39
+ }
40
+
41
+ //#endregion
42
+ export { formatCheckSummary, printProblems };
43
+ //# sourceMappingURL=format-problems.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-problems.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/format-problems.ts"],"sourcesContent":["import { colors } from \"@mongez/copper\";\nimport type { CheckReport } from \"../../../tooling/check/check-report.types\";\nimport type { ToolingProblem } from \"../../../tooling/problem\";\n\n/** `file:line:col`, as much of it as the problem has. */\nfunction locationOf(problem: ToolingProblem): string {\n if (!problem.file) return \"(project)\";\n if (problem.line === null) return problem.file;\n\n return `${problem.file}:${problem.line}${problem.column === null ? \"\" : `:${problem.column}`}`;\n}\n\n/**\n * Two lines per problem: `file:line:col CODE message (rule)`, then the fix\n * hint. Uncolored, so it is testable; {@link printProblems} adds color.\n */\nexport function formatProblemLines(problems: readonly ToolingProblem[]): string[] {\n return problems.flatMap((problem) => [\n `${locationOf(problem)} ${problem.code} ${problem.message.split(\"\\n\")[0]}${problem.rule ? ` (${problem.rule})` : \"\"}`,\n ` → ${problem.hint}`,\n ]);\n}\n\n/** Print problems to stdout, errors in red and warnings in yellow. */\nexport function printProblems(problems: readonly ToolingProblem[]): void {\n for (const problem of problems) {\n const paint = problem.severity === \"error\" ? colors.red : colors.yellow;\n const [first, second] = formatProblemLines([problem]);\n\n console.log(paint(first ?? \"\"));\n console.log(colors.dim(second ?? \"\"));\n }\n}\n\nconst STEP_SYMBOL: Record<CheckReport[\"steps\"][number][\"status\"], string> = {\n passed: \"✓\",\n failed: \"✗\",\n skipped: \"-\",\n blocked: \"!\",\n};\n\n/** The step list and the verdict line of a check report, uncolored. */\nexport function formatCheckSummary(report: CheckReport): string[] {\n const lines = report.steps.map(\n (step) =>\n `${STEP_SYMBOL[step.status]} ${step.name.padEnd(12)} ${step.status}${step.detail ? ` — ${step.detail}` : \"\"}`,\n );\n const { errors, warnings, environment } = report.summary;\n\n lines.push(\"\");\n lines.push(\n report.exitCode === 0\n ? `OK: ${warnings} warning(s)`\n : report.exitCode === 2\n ? `${errors} error(s), ${environment} from this machine — fix the environment first (exit 2)`\n : `${errors} error(s) in the code (exit 1)`,\n );\n\n return lines;\n}\n"],"mappings":";;;;AAKA,SAAS,WAAW,SAAiC;CACnD,IAAI,CAAC,QAAQ,MAAM,OAAO;CAC1B,IAAI,QAAQ,SAAS,MAAM,OAAO,QAAQ;CAE1C,OAAO,GAAG,QAAQ,KAAK,GAAG,QAAQ,OAAO,QAAQ,WAAW,OAAO,KAAK,IAAI,QAAQ;AACtF;;;;;AAMA,SAAgB,mBAAmB,UAA+C;CAChF,OAAO,SAAS,SAAS,YAAY,CACnC,GAAG,WAAW,OAAO,EAAE,IAAI,QAAQ,KAAK,IAAI,QAAQ,QAAQ,MAAM,IAAI,CAAC,CAAC,KAAK,QAAQ,OAAO,KAAK,QAAQ,KAAK,KAAK,MACnH,OAAO,QAAQ,MACjB,CAAC;AACH;;AAGA,SAAgB,cAAc,UAA2C;CACvE,KAAK,MAAM,WAAW,UAAU;EAC9B,MAAM,QAAQ,QAAQ,aAAa,UAAU,OAAO,MAAM,OAAO;EACjE,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,OAAO,CAAC;EAEpD,QAAQ,IAAI,MAAM,SAAS,EAAE,CAAC;EAC9B,QAAQ,IAAI,OAAO,IAAI,UAAU,EAAE,CAAC;CACtC;AACF;AAEA,MAAM,cAAsE;CAC1E,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,SAAS;AACX;;AAGA,SAAgB,mBAAmB,QAA+B;CAChE,MAAM,QAAQ,OAAO,MAAM,KACxB,SACC,GAAG,YAAY,KAAK,QAAQ,GAAG,KAAK,KAAK,OAAO,EAAE,EAAE,GAAG,KAAK,SAAS,KAAK,SAAS,MAAM,KAAK,WAAW,IAC7G;CACA,MAAM,EAAE,QAAQ,UAAU,gBAAgB,OAAO;CAEjD,MAAM,KAAK,EAAE;CACb,MAAM,KACJ,OAAO,aAAa,IAChB,OAAO,SAAS,eAChB,OAAO,aAAa,IAClB,GAAG,OAAO,aAAa,YAAY,2DACnC,GAAG,OAAO,+BAClB;CAEA,OAAO;AACT"}
@@ -0,0 +1,61 @@
1
+ import { flushAndExit } from "../../flush-and-exit.mjs";
2
+ import { checkExitCode } from "../../../tooling/check/check-report.types.mjs";
3
+ import { runTypecheck } from "../../../tooling/typecheck/run-typecheck.mjs";
4
+ import { listChangedFiles } from "../../../tooling/check/changed-files.mjs";
5
+ import { printProblems } from "./format-problems.mjs";
6
+
7
+ //#region ../../packages/core/src/cli/commands/check/typecheck-command.action.ts
8
+ function stringOption(value) {
9
+ return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
10
+ }
11
+ /**
12
+ * Action behind `warlock typecheck`.
13
+ *
14
+ * Typechecks incrementally (state in `.warlock/cache/typecheck.tsbuildinfo`).
15
+ * `--changed` limits diagnostics to the files changed against HEAD (or the
16
+ * merge base with `--base`) and the files importing them. `--json` prints the
17
+ * result alone. Exit codes match `warlock check`: 0 clean, 1 type errors,
18
+ * 2 this machine (git unavailable for `--changed`).
19
+ *
20
+ * @param data Parsed CLI args: `changed`, `base`, `project`, `json`.
21
+ */
22
+ async function typecheckCommandAction({ options }) {
23
+ const cwd = process.cwd();
24
+ const base = stringOption(options.base);
25
+ const changed = options.changed === true || base !== void 0;
26
+ const project = stringOption(options.project);
27
+ let result;
28
+ if (changed) {
29
+ const listed = await listChangedFiles({
30
+ cwd,
31
+ base
32
+ });
33
+ result = "problem" in listed ? {
34
+ ok: false,
35
+ mode: "files",
36
+ files: null,
37
+ checkedFiles: 0,
38
+ durationMs: 0,
39
+ buildInfoFile: null,
40
+ problems: [listed.problem]
41
+ } : runTypecheck({
42
+ cwd,
43
+ project,
44
+ files: listed.files
45
+ });
46
+ } else result = runTypecheck({
47
+ cwd,
48
+ project
49
+ });
50
+ const exitCode = checkExitCode(result.problems);
51
+ if (options.json === true) console.log(JSON.stringify(result, null, 2));
52
+ else {
53
+ printProblems(result.problems);
54
+ console.log(`${result.problems.length === 0 ? "No type errors" : `${result.problems.length} problem(s)`} in ${result.checkedFiles} file(s) (${result.durationMs}ms)`);
55
+ }
56
+ if (exitCode !== 0) await flushAndExit(exitCode);
57
+ }
58
+
59
+ //#endregion
60
+ export { typecheckCommandAction };
61
+ //# sourceMappingURL=typecheck-command.action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typecheck-command.action.mjs","names":[],"sources":["../../../../../../../../../../packages/core/src/cli/commands/check/typecheck-command.action.ts"],"sourcesContent":["import type { CommandActionData } from \"../../../commands/types\";\nimport { listChangedFiles } from \"../../../tooling/check/changed-files\";\nimport { checkExitCode } from \"../../../tooling/check/check-report.types\";\nimport { runTypecheck, type TypecheckResult } from \"../../../tooling/typecheck/run-typecheck\";\nimport { flushAndExit } from \"../../flush-and-exit\";\nimport { printProblems } from \"./format-problems\";\n\nfunction stringOption(value: string | number | boolean | undefined): string | undefined {\n return typeof value === \"string\" && value.trim().length > 0 ? value.trim() : undefined;\n}\n\n/**\n * Action behind `warlock typecheck`.\n *\n * Typechecks incrementally (state in `.warlock/cache/typecheck.tsbuildinfo`).\n * `--changed` limits diagnostics to the files changed against HEAD (or the\n * merge base with `--base`) and the files importing them. `--json` prints the\n * result alone. Exit codes match `warlock check`: 0 clean, 1 type errors,\n * 2 this machine (git unavailable for `--changed`).\n *\n * @param data Parsed CLI args: `changed`, `base`, `project`, `json`.\n */\nexport async function typecheckCommandAction({ options }: CommandActionData): Promise<void> {\n const cwd = process.cwd();\n const base = stringOption(options.base);\n const changed = options.changed === true || base !== undefined;\n const project = stringOption(options.project);\n let result: TypecheckResult;\n\n if (changed) {\n const listed = await listChangedFiles({ cwd, base });\n\n result =\n \"problem\" in listed\n ? {\n ok: false,\n mode: \"files\",\n files: null,\n checkedFiles: 0,\n durationMs: 0,\n buildInfoFile: null,\n problems: [listed.problem],\n }\n : runTypecheck({ cwd, project, files: listed.files });\n } else {\n result = runTypecheck({ cwd, project });\n }\n\n const exitCode = checkExitCode(result.problems);\n\n if (options.json === true) {\n console.log(JSON.stringify(result, null, 2));\n } else {\n printProblems(result.problems);\n console.log(\n `${result.problems.length === 0 ? \"No type errors\" : `${result.problems.length} problem(s)`} in ${result.checkedFiles} file(s) (${result.durationMs}ms)`,\n );\n }\n\n if (exitCode !== 0) {\n await flushAndExit(exitCode);\n }\n}\n"],"mappings":";;;;;;;AAOA,SAAS,aAAa,OAAkE;CACtF,OAAO,OAAO,UAAU,YAAY,MAAM,KAAK,CAAC,CAAC,SAAS,IAAI,MAAM,KAAK,IAAI;AAC/E;;;;;;;;;;;;AAaA,eAAsB,uBAAuB,EAAE,WAA6C;CAC1F,MAAM,MAAM,QAAQ,IAAI;CACxB,MAAM,OAAO,aAAa,QAAQ,IAAI;CACtC,MAAM,UAAU,QAAQ,YAAY,QAAQ,SAAS;CACrD,MAAM,UAAU,aAAa,QAAQ,OAAO;CAC5C,IAAI;CAEJ,IAAI,SAAS;EACX,MAAM,SAAS,MAAM,iBAAiB;GAAE;GAAK;EAAK,CAAC;EAEnD,SACE,aAAa,SACT;GACE,IAAI;GACJ,MAAM;GACN,OAAO;GACP,cAAc;GACd,YAAY;GACZ,eAAe;GACf,UAAU,CAAC,OAAO,OAAO;EAC3B,IACA,aAAa;GAAE;GAAK;GAAS,OAAO,OAAO;EAAM,CAAC;CAC1D,OACE,SAAS,aAAa;EAAE;EAAK;CAAQ,CAAC;CAGxC,MAAM,WAAW,cAAc,OAAO,QAAQ;CAE9C,IAAI,QAAQ,SAAS,MACnB,QAAQ,IAAI,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;MACtC;EACL,cAAc,OAAO,QAAQ;EAC7B,QAAQ,IACN,GAAG,OAAO,SAAS,WAAW,IAAI,mBAAmB,GAAG,OAAO,SAAS,OAAO,aAAa,MAAM,OAAO,aAAa,YAAY,OAAO,WAAW,IACtJ;CACF;CAEA,IAAI,aAAa,GACf,MAAM,aAAa,QAAQ;AAE/B"}
@@ -0,0 +1,50 @@
1
+ import { command } from "../../commands/cli-command.mjs";
2
+ import { checkCommandAction } from "./check/check-command.action.mjs";
3
+
4
+ //#region ../../packages/core/src/cli/commands/check.command.ts
5
+ /**
6
+ * `warlock check` — the single verify command: typecheck, lint (the app's
7
+ * ESLint / oxlint config), the tests affected by the change, and framework
8
+ * convention checks, reported as one problem list. Exit 0 clean, 1 problems
9
+ * in the code, 2 problems with this machine.
10
+ *
11
+ * No preload: the steps read files and run tools; nothing boots, connects or
12
+ * binds a port, so `check` behaves the same with or without a database or
13
+ * Redis running.
14
+ */
15
+ const checkCommand = command({
16
+ name: "check",
17
+ description: "Typecheck, lint, run the affected tests and check conventions; one problem list, exit 1 for your code and 2 for this machine",
18
+ action: checkCommandAction,
19
+ options: [
20
+ {
21
+ text: "--changed, -c",
22
+ description: "Only the files changed against HEAD (plus untracked files) and what they affect",
23
+ type: "boolean"
24
+ },
25
+ {
26
+ text: "--base, -b",
27
+ description: "Compare with the merge base of this ref instead of HEAD (implies --changed)",
28
+ type: "string"
29
+ },
30
+ {
31
+ text: "--skip, -s",
32
+ description: "Comma-separated steps to skip: environment, typecheck, lint, tests, conventions",
33
+ type: "string"
34
+ },
35
+ {
36
+ text: "--project, -p",
37
+ description: "tsconfig path (default tsconfig.json)",
38
+ type: "string"
39
+ },
40
+ {
41
+ text: "--json, -j",
42
+ description: "Print the report as JSON",
43
+ type: "boolean"
44
+ }
45
+ ]
46
+ });
47
+
48
+ //#endregion
49
+ export { checkCommand };
50
+ //# sourceMappingURL=check.command.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/check.command.ts"],"sourcesContent":["import { command } from \"../../commands/cli-command\";\nimport { checkCommandAction } from \"./check/check-command.action\";\n\n/**\n * `warlock check` — the single verify command: typecheck, lint (the app's\n * ESLint / oxlint config), the tests affected by the change, and framework\n * convention checks, reported as one problem list. Exit 0 clean, 1 problems\n * in the code, 2 problems with this machine.\n *\n * No preload: the steps read files and run tools; nothing boots, connects or\n * binds a port, so `check` behaves the same with or without a database or\n * Redis running.\n */\nexport const checkCommand = command({\n name: \"check\",\n description:\n \"Typecheck, lint, run the affected tests and check conventions; one problem list, exit 1 for your code and 2 for this machine\",\n action: checkCommandAction,\n options: [\n {\n text: \"--changed, -c\",\n description:\n \"Only the files changed against HEAD (plus untracked files) and what they affect\",\n type: \"boolean\",\n },\n {\n text: \"--base, -b\",\n description: \"Compare with the merge base of this ref instead of HEAD (implies --changed)\",\n type: \"string\",\n },\n {\n text: \"--skip, -s\",\n description:\n \"Comma-separated steps to skip: environment, typecheck, lint, tests, conventions\",\n type: \"string\",\n },\n {\n text: \"--project, -p\",\n description: \"tsconfig path (default tsconfig.json)\",\n type: \"string\",\n },\n {\n text: \"--json, -j\",\n description: \"Print the report as JSON\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,eAAe,QAAQ;CAClC,MAAM;CACN,aACE;CACF,QAAQ;CACR,SAAS;EACP;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { assertNodeOnlyCommand } from "../../utils/runtime.mjs";
1
2
  import { command } from "../../commands/cli-command.mjs";
2
3
  import { isDevWorker, superviseDevServer } from "../../dev-server/supervisor.mjs";
3
4
  import { displayStartupBanner } from "../cli-commands.utils.mjs";
@@ -19,6 +20,7 @@ const devServerCommand = command({
19
20
  connectors: true
20
21
  },
21
22
  preAction: async () => {
23
+ assertNodeOnlyCommand("dev");
22
24
  assertEsbuildBinaryIsLinked();
23
25
  if (!isDevWorker()) return superviseDevServer();
24
26
  await displayStartupBanner({ environment: "development" });
@@ -27,7 +29,8 @@ const devServerCommand = command({
27
29
  checkForFrameworkUpdate(await startDevelopmentServer({
28
30
  fresh: Boolean(data.options.fresh),
29
31
  generateTypings: data.options.skipTypings ? false : void 0,
30
- healthCheckers: data.options.skipHealth ? false : void 0
32
+ healthCheckers: data.options.skipHealth ? false : void 0,
33
+ mcp: data.options.mcp === true ? true : void 0
31
34
  }));
32
35
  },
33
36
  options: [
@@ -45,6 +48,11 @@ const devServerCommand = command({
45
48
  text: "--skip-health, -sh",
46
49
  description: "Skip file health checkers for this run",
47
50
  type: "boolean"
51
+ },
52
+ {
53
+ text: "--mcp",
54
+ description: "Also serve `warlock mcp` over HTTP on loopback from the dev server (live registries; needs @warlock.js/ai-tools)",
55
+ type: "boolean"
48
56
  }
49
57
  ]
50
58
  });
@@ -1 +1 @@
1
- {"version":3,"file":"dev-server.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/dev-server.command.ts"],"sourcesContent":["import { checkForFrameworkUpdate } from \"../../dev-server/check-for-updates\";\nimport { startDevelopmentServer } from \"../../dev-server/start-development-server\";\nimport { isDevWorker, superviseDevServer } from \"../../dev-server/supervisor\";\nimport { assertEsbuildBinaryIsLinked } from \"../../production/esbuild-preflight\";\nimport { command } from \"../../commands/cli-command\";\nimport { displayStartupBanner } from \"../cli-commands.utils\";\n\nexport const devServerCommand = command({\n name: \"dev\",\n description: \"Start development server (HMR, type-gen, health checks)\",\n persistent: true,\n preload: {\n runtimeStrategy: \"development\",\n // Overrides whatever NODE_ENV the shell exported. A shell with\n // NODE_ENV=production made Vite's dep optimiser pre-bundle the PRODUCTION\n // build of React, which silently suppresses hydration-mismatch warnings —\n // the dev server was hiding the exact class of bug it exists to surface.\n // Set here, in preload, because preloaders run before the action, and the\n // action is what eventually reaches Vite's `createServer`.\n environment: \"development\",\n config: true, // load all config\n bootstrap: true,\n prestart: true, // load prestart file (if exists)\n // Only the Early lifecycle phase starts here; the Late phase\n // (http, socket) starts after app modules load — see\n // development-server.ts STEP 8.5.\n connectors: true,\n },\n preAction: async () => {\n // Fail before either role (supervisor or worker) does any other work —\n // a missing/unlinked esbuild binary would otherwise surface much later\n // as an opaque low-level error from deep inside the transpile path.\n assertEsbuildBinaryIsLinked();\n\n // Two roles share this command. The first `warlock dev` becomes a thin\n // supervisor that owns the terminal and (re)spawns the real server; the\n // process it spawns carries WARLOCK_DEV_WORKER and falls through to the\n // server itself. See supervisor.ts for why the split exists.\n //\n // This branch has to sit in `preAction`, which runs BEFORE the command's\n // preloaders: the supervisor must never load config or start connectors,\n // or it would hold a second database connection open for the whole\n // session. `superviseDevServer()` never resolves, so nothing below it —\n // preload included — runs in the supervisor.\n if (!isDevWorker()) {\n return superviseDevServer();\n }\n\n await displayStartupBanner({ environment: \"development\" });\n },\n action: async (data) => {\n const devServer = await startDevelopmentServer({\n fresh: Boolean(data.options.fresh),\n // Pass `false` only when the CLI flag is explicitly set; `undefined`\n // lets `warlock.config.ts > devServer.*` defaults apply.\n generateTypings: data.options.skipTypings ? false : undefined,\n healthCheckers: data.options.skipHealth ? false : undefined,\n });\n\n // Fire-and-forget: once the server is ready, surface a one-line notice if\n // a newer @warlock.js/core has been published, and arm the `u` shortcut\n // that updates + restarts. Fully self-guarded — it never blocks startup\n // nor breaks dev if the registry is unreachable.\n void checkForFrameworkUpdate(devServer);\n },\n options: [\n {\n text: \"--fresh, -f\",\n description: \"Delete .warlock/manifest.json before start (force full re-parse from disk)\",\n type: \"boolean\",\n },\n {\n text: \"--skip-typings, -st\",\n description: \"Skip background type generation for this run\",\n type: \"boolean\",\n },\n {\n text: \"--skip-health, -sh\",\n description: \"Skip file health checkers for this run\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":";;;;;;;;AAOA,MAAa,mBAAmB,QAAQ;CACtC,MAAM;CACN,aAAa;CACb,YAAY;CACZ,SAAS;EACP,iBAAiB;EAOjB,aAAa;EACb,QAAQ;EACR,WAAW;EACX,UAAU;EAIV,YAAY;CACd;CACA,WAAW,YAAY;EAIrB,4BAA4B;EAY5B,IAAI,CAAC,YAAY,GACf,OAAO,mBAAmB;EAG5B,MAAM,qBAAqB,EAAE,aAAa,cAAc,CAAC;CAC3D;CACA,QAAQ,OAAO,SAAS;EAatB,AAAK,wBAAwB,MAZL,uBAAuB;GAC7C,OAAO,QAAQ,KAAK,QAAQ,KAAK;GAGjC,iBAAiB,KAAK,QAAQ,cAAc,QAAQ;GACpD,gBAAgB,KAAK,QAAQ,aAAa,QAAQ;EACpD,CAAC,CAMqC;CACxC;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"dev-server.command.mjs","names":[],"sources":["../../../../../../../../../packages/core/src/cli/commands/dev-server.command.ts"],"sourcesContent":["import { checkForFrameworkUpdate } from \"../../dev-server/check-for-updates\";\nimport { startDevelopmentServer } from \"../../dev-server/start-development-server\";\nimport { isDevWorker, superviseDevServer } from \"../../dev-server/supervisor\";\nimport { assertEsbuildBinaryIsLinked } from \"../../production/esbuild-preflight\";\nimport { command } from \"../../commands/cli-command\";\nimport { assertNodeOnlyCommand } from \"../../utils/runtime\";\nimport { displayStartupBanner } from \"../cli-commands.utils\";\n\nexport const devServerCommand = command({\n name: \"dev\",\n description: \"Start development server (HMR, type-gen, health checks)\",\n persistent: true,\n preload: {\n runtimeStrategy: \"development\",\n // Overrides whatever NODE_ENV the shell exported. A shell with\n // NODE_ENV=production made Vite's dep optimiser pre-bundle the PRODUCTION\n // build of React, which silently suppresses hydration-mismatch warnings —\n // the dev server was hiding the exact class of bug it exists to surface.\n // Set here, in preload, because preloaders run before the action, and the\n // action is what eventually reaches Vite's `createServer`.\n environment: \"development\",\n config: true, // load all config\n bootstrap: true,\n prestart: true, // load prestart file (if exists)\n // Only the Early lifecycle phase starts here; the Late phase\n // (http, socket) starts after app modules load — see\n // development-server.ts STEP 8.5.\n connectors: true,\n },\n preAction: async () => {\n // Node only. The dev server compiles TypeScript and hot-reloads modules\n // through Node's module loader hooks; Bun and Deno run the production\n // build instead. Checked first so neither role starts anything on them.\n assertNodeOnlyCommand(\"dev\");\n\n // Fail before either role (supervisor or worker) does any other work —\n // a missing/unlinked esbuild binary would otherwise surface much later\n // as an opaque low-level error from deep inside the transpile path.\n assertEsbuildBinaryIsLinked();\n\n // Two roles share this command. The first `warlock dev` becomes a thin\n // supervisor that owns the terminal and (re)spawns the real server; the\n // process it spawns carries WARLOCK_DEV_WORKER and falls through to the\n // server itself. See supervisor.ts for why the split exists.\n //\n // This branch has to sit in `preAction`, which runs BEFORE the command's\n // preloaders: the supervisor must never load config or start connectors,\n // or it would hold a second database connection open for the whole\n // session. `superviseDevServer()` never resolves, so nothing below it —\n // preload included — runs in the supervisor.\n if (!isDevWorker()) {\n return superviseDevServer();\n }\n\n await displayStartupBanner({ environment: \"development\" });\n },\n action: async (data) => {\n const devServer = await startDevelopmentServer({\n fresh: Boolean(data.options.fresh),\n // Pass `false` only when the CLI flag is explicitly set; `undefined`\n // lets `warlock.config.ts > devServer.*` defaults apply.\n generateTypings: data.options.skipTypings ? false : undefined,\n healthCheckers: data.options.skipHealth ? false : undefined,\n mcp: data.options.mcp === true ? true : undefined,\n });\n\n // Fire-and-forget: once the server is ready, surface a one-line notice if\n // a newer @warlock.js/core has been published, and arm the `u` shortcut\n // that updates + restarts. Fully self-guarded — it never blocks startup\n // nor breaks dev if the registry is unreachable.\n void checkForFrameworkUpdate(devServer);\n },\n options: [\n {\n text: \"--fresh, -f\",\n description: \"Delete .warlock/manifest.json before start (force full re-parse from disk)\",\n type: \"boolean\",\n },\n {\n text: \"--skip-typings, -st\",\n description: \"Skip background type generation for this run\",\n type: \"boolean\",\n },\n {\n text: \"--skip-health, -sh\",\n description: \"Skip file health checkers for this run\",\n type: \"boolean\",\n },\n {\n text: \"--mcp\",\n description:\n \"Also serve `warlock mcp` over HTTP on loopback from the dev server (live registries; needs @warlock.js/ai-tools)\",\n type: \"boolean\",\n },\n ],\n});\n"],"mappings":";;;;;;;;;AAQA,MAAa,mBAAmB,QAAQ;CACtC,MAAM;CACN,aAAa;CACb,YAAY;CACZ,SAAS;EACP,iBAAiB;EAOjB,aAAa;EACb,QAAQ;EACR,WAAW;EACX,UAAU;EAIV,YAAY;CACd;CACA,WAAW,YAAY;EAIrB,sBAAsB,KAAK;EAK3B,4BAA4B;EAY5B,IAAI,CAAC,YAAY,GACf,OAAO,mBAAmB;EAG5B,MAAM,qBAAqB,EAAE,aAAa,cAAc,CAAC;CAC3D;CACA,QAAQ,OAAO,SAAS;EActB,AAAK,wBAAwB,MAbL,uBAAuB;GAC7C,OAAO,QAAQ,KAAK,QAAQ,KAAK;GAGjC,iBAAiB,KAAK,QAAQ,cAAc,QAAQ;GACpD,gBAAgB,KAAK,QAAQ,aAAa,QAAQ;GAClD,KAAK,KAAK,QAAQ,QAAQ,OAAO,OAAO;EAC1C,CAAC,CAMqC;CACxC;CACA,SAAS;EACP;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aAAa;GACb,MAAM;EACR;EACA;GACE,MAAM;GACN,aACE;GACF,MAAM;EACR;CACF;AACF,CAAC"}
@@ -131,12 +131,16 @@ async function loadAppModules() {
131
131
  * `DevelopmentServer.autoDiscoverFiles()` exists, and it must keep the same
132
132
  * position in the sequence.
133
133
  */
134
- async function discoverModels() {
134
+ async function discoverModels(modules) {
135
135
  const failures = [];
136
136
  for (const file of filesOrchestrator.files.values()) {
137
137
  if (file.type !== "model") continue;
138
138
  try {
139
- await filesOrchestrator.moduleLoader.loadModule(file, "model");
139
+ const exports = await filesOrchestrator.moduleLoader.loadModule(file, "model");
140
+ if (typeof exports === "object" && exports !== null) modules.push({
141
+ file: file.relativePath,
142
+ exports: { ...exports }
143
+ });
140
144
  } catch (error) {
141
145
  failures.push({
142
146
  file: file.relativePath,
@@ -169,6 +173,7 @@ async function bootForDiagnostics() {
169
173
  appRoutes: 0,
170
174
  totalRoutes: 0,
171
175
  moduleFailures: [],
176
+ modelModules: [],
172
177
  connectors
173
178
  };
174
179
  try {
@@ -193,7 +198,7 @@ async function bootForDiagnostics() {
193
198
  return !connectorsManager.isBuiltInName(name);
194
199
  });
195
200
  await bootPhase("early", connectors);
196
- context.moduleFailures.push(...await discoverModels());
201
+ context.moduleFailures.push(...await discoverModels(context.modelModules));
197
202
  context.moduleFailures.push(...await loadAppModules());
198
203
  context.appRoutes = router.routeCount();
199
204
  await bootPhase("late", connectors);