raiton 6.8.9-beta.25 → 6.11.0-beta.29

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 (439) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +65 -1
  3. package/benchmarks/README.md +31 -0
  4. package/benchmarks/ai-debug.json +145 -0
  5. package/benchmarks/ai-debug.md +64 -0
  6. package/benchmarks/latest.json +172 -0
  7. package/benchmarks/latest.md +66 -0
  8. package/build/bin/index.mjs +37621 -21866
  9. package/build/types/bin/bootstrapper.d.ts +2 -0
  10. package/build/types/bin/cli-output.d.ts +46 -0
  11. package/build/types/bin/cli-tools.d.ts +13 -0
  12. package/build/types/bin/cli.d.ts +3 -0
  13. package/build/types/bin/commands.registry.d.ts +4 -0
  14. package/build/types/bin/constants.d.ts +3 -0
  15. package/build/types/bin/file-utils.d.ts +21 -0
  16. package/build/types/bin/index.d.ts +2 -0
  17. package/build/types/bin/name-utils.d.ts +4 -0
  18. package/build/types/bin/project-utils.d.ts +12 -0
  19. package/build/types/commands/artifact.command.d.ts +7 -0
  20. package/build/types/commands/build.command.d.ts +8 -0
  21. package/build/types/commands/call.command.d.ts +10 -0
  22. package/build/types/commands/client.command.d.ts +7 -0
  23. package/build/types/commands/contract.command.d.ts +8 -0
  24. package/build/types/commands/debug.shared.d.ts +16 -0
  25. package/build/types/commands/develop.command.d.ts +9 -0
  26. package/build/types/commands/docs.command.d.ts +8 -0
  27. package/build/types/commands/doctor.command.d.ts +9 -0
  28. package/build/types/commands/explain.command.d.ts +8 -0
  29. package/build/types/commands/generate.command.d.ts +7 -0
  30. package/build/types/commands/inspect.command.d.ts +7 -0
  31. package/build/types/commands/mcp.command.d.ts +12 -0
  32. package/build/types/commands/new.command.d.ts +7 -0
  33. package/build/types/commands/openapi.command.d.ts +7 -0
  34. package/build/types/commands/requests.command.d.ts +8 -0
  35. package/build/types/commands/routes.command.d.ts +7 -0
  36. package/build/types/commands/start.command.d.ts +9 -0
  37. package/build/types/commands/verify.command.d.ts +8 -0
  38. package/build/types/commands/why.command.d.ts +7 -0
  39. package/build/types/contracts/decorators.d.ts +59 -0
  40. package/build/types/contracts/errors.d.ts +68 -0
  41. package/build/types/contracts/index.d.ts +4 -0
  42. package/build/types/contracts/schema.d.ts +83 -0
  43. package/build/types/contracts/typebox.d.ts +81 -0
  44. package/build/types/core/application.d.ts +45 -0
  45. package/build/types/core/artifacts/artifact.d.ts +3 -0
  46. package/build/types/core/artifacts/index.d.ts +1 -0
  47. package/build/types/core/artifacts/runner.d.ts +1 -0
  48. package/build/types/core/builder.d.ts +42 -0
  49. package/build/types/core/bytes.util.d.ts +3 -0
  50. package/build/types/core/command.d.ts +13 -0
  51. package/build/types/core/commands.d.ts +10 -0
  52. package/build/types/core/config/config.d.ts +27 -0
  53. package/build/types/core/config/define.d.ts +8 -0
  54. package/build/types/core/config/index.d.ts +3 -0
  55. package/build/types/core/config/schema.d.ts +24 -0
  56. package/build/types/core/context.d.ts +11 -0
  57. package/build/types/core/controller/builder.d.ts +26 -0
  58. package/build/types/core/controller/compiler.d.ts +2 -0
  59. package/build/types/core/controller/index.d.ts +4 -0
  60. package/build/types/core/controller/metadata.d.ts +3 -0
  61. package/build/types/core/controller/tracker.d.ts +9 -0
  62. package/build/types/core/directories.d.ts +10 -0
  63. package/build/types/core/guards.d.ts +11 -0
  64. package/build/types/core/helpers/index.d.ts +1 -0
  65. package/build/types/core/helpers/raiton.d.ts +1 -0
  66. package/build/types/core/hooks.d.ts +14 -0
  67. package/build/types/core/index.d.ts +17 -0
  68. package/build/types/core/injection/index.d.ts +1 -0
  69. package/build/types/core/injection/injection.d.ts +37 -0
  70. package/build/types/core/mcp/builder.d.ts +2 -0
  71. package/build/types/core/mcp/index.d.ts +3 -0
  72. package/build/types/core/mcp/metadata.d.ts +9 -0
  73. package/build/types/core/mcp/tracker.d.ts +9 -0
  74. package/build/types/core/middleware/compose.d.ts +8 -0
  75. package/build/types/core/middleware/index.d.ts +2 -0
  76. package/build/types/core/middleware/pipeline.d.ts +12 -0
  77. package/build/types/core/plugins/index.d.ts +2 -0
  78. package/build/types/core/plugins/plugin.d.ts +2 -0
  79. package/build/types/core/plugins/scope.d.ts +15 -0
  80. package/build/types/core/process.util.d.ts +1 -0
  81. package/build/types/core/raiton.d.ts +15 -0
  82. package/build/types/core/router/handler.d.ts +2 -0
  83. package/build/types/core/router/handler.utils.d.ts +37 -0
  84. package/build/types/core/router/index.d.ts +4 -0
  85. package/build/types/core/router/matcher.d.ts +50 -0
  86. package/build/types/core/router/route.d.ts +52 -0
  87. package/build/types/core/router/router.d.ts +23 -0
  88. package/build/types/core/scheduler/builder.d.ts +2 -0
  89. package/build/types/core/scheduler/cron.d.ts +32 -0
  90. package/build/types/core/scheduler/duration.d.ts +7 -0
  91. package/build/types/core/scheduler/index.d.ts +6 -0
  92. package/build/types/core/scheduler/manager.d.ts +47 -0
  93. package/build/types/core/scheduler/metadata.d.ts +8 -0
  94. package/build/types/core/scheduler/queue/backend.d.ts +42 -0
  95. package/build/types/core/scheduler/queue/index.d.ts +3 -0
  96. package/build/types/core/scheduler/queue/rabbitmq.backend.d.ts +37 -0
  97. package/build/types/core/scheduler/queue/redis.backend.d.ts +38 -0
  98. package/build/types/core/server.d.ts +9 -0
  99. package/build/types/core/socket/builder.d.ts +1 -0
  100. package/build/types/core/socket/index.d.ts +2 -0
  101. package/build/types/core/socket/metadata.d.ts +14 -0
  102. package/build/types/core/thread.d.ts +21 -0
  103. package/build/types/debug/cli.d.ts +33 -0
  104. package/build/types/debug/collector.d.ts +41 -0
  105. package/build/types/debug/collector.internal.d.ts +27 -0
  106. package/build/types/debug/config.d.ts +19 -0
  107. package/build/types/debug/examples.d.ts +43 -0
  108. package/build/types/debug/explain.d.ts +9 -0
  109. package/build/types/debug/index.d.ts +15 -0
  110. package/build/types/debug/invocation.d.ts +53 -0
  111. package/build/types/debug/journal.d.ts +49 -0
  112. package/build/types/debug/mcp-http.d.ts +17 -0
  113. package/build/types/debug/mcp.d.ts +14 -0
  114. package/build/types/debug/redaction.d.ts +48 -0
  115. package/build/types/debug/requests.d.ts +37 -0
  116. package/build/types/debug/runtime.d.ts +52 -0
  117. package/build/types/debug/session.d.ts +21 -0
  118. package/build/types/debug/source.d.ts +17 -0
  119. package/build/types/debug/surface.d.ts +10 -0
  120. package/build/types/debug/types.d.ts +271 -0
  121. package/build/types/debug/verify.d.ts +23 -0
  122. package/build/types/framework/artifacts.d.ts +20 -0
  123. package/build/types/framework/cache/cache.d.ts +84 -0
  124. package/build/types/framework/cache/cache.decorator.d.ts +21 -0
  125. package/build/types/framework/cache/etag.d.ts +62 -0
  126. package/build/types/framework/cache/index.d.ts +4 -0
  127. package/build/types/framework/cache/types.d.ts +89 -0
  128. package/build/types/framework/constants/decorators.constant.d.ts +28 -0
  129. package/build/types/framework/constants/index.d.ts +2 -0
  130. package/build/types/framework/constants/microservices.constant.d.ts +3 -0
  131. package/build/types/framework/controllers.d.ts +2 -0
  132. package/build/types/framework/data-transfer-object.d.ts +5 -0
  133. package/build/types/framework/decorators/access-guard.decorator.d.ts +1 -0
  134. package/build/types/framework/decorators/api-response.decorator.d.ts +66 -0
  135. package/build/types/framework/decorators/api.decorator.d.ts +160 -0
  136. package/build/types/framework/decorators/controllable.decorator.d.ts +3 -0
  137. package/build/types/framework/decorators/csrf-guard.decorator.d.ts +2 -0
  138. package/build/types/framework/decorators/csrf-token.decorator.d.ts +1 -0
  139. package/build/types/framework/decorators/guard.decorator.d.ts +2 -0
  140. package/build/types/framework/decorators/health-check.decorator.d.ts +17 -0
  141. package/build/types/framework/decorators/index.d.ts +15 -0
  142. package/build/types/framework/decorators/injection.decorator.d.ts +5 -0
  143. package/build/types/framework/decorators/mcp.decorator.d.ts +68 -0
  144. package/build/types/framework/decorators/middleware.decorator.d.ts +3 -0
  145. package/build/types/framework/decorators/parametrable.decorator.d.ts +9 -0
  146. package/build/types/framework/decorators/routable.decorator.d.ts +12 -0
  147. package/build/types/framework/decorators/route-interaction.decorator.d.ts +81 -0
  148. package/build/types/framework/decorators/scheduler.decorator.d.ts +54 -0
  149. package/build/types/framework/decorators/socket.decorator.d.ts +5 -0
  150. package/build/types/framework/encryption.d.ts +25 -0
  151. package/build/types/framework/enums/csrf.enum.d.ts +4 -0
  152. package/build/types/framework/enums/encrypted.enum.d.ts +20 -0
  153. package/build/types/framework/enums/event.message.enum.d.ts +4 -0
  154. package/build/types/framework/enums/http-method.enum.d.ts +10 -0
  155. package/build/types/framework/enums/http-parameters.enum.d.ts +11 -0
  156. package/build/types/framework/enums/http-status.enum.d.ts +64 -0
  157. package/build/types/framework/enums/index.d.ts +9 -0
  158. package/build/types/framework/enums/runtime.enum.d.ts +5 -0
  159. package/build/types/framework/enums/scheduler.enum.d.ts +21 -0
  160. package/build/types/framework/enums/timestamp.enum.d.ts +6 -0
  161. package/build/types/framework/env.d.ts +3 -0
  162. package/build/types/framework/errors/catalog.d.ts +57 -0
  163. package/build/types/framework/exceptions/http-exception.d.ts +18 -0
  164. package/build/types/framework/exceptions/index.d.ts +2 -0
  165. package/build/types/framework/exceptions/throwable.d.ts +76 -0
  166. package/build/types/framework/health-check.d.ts +42 -0
  167. package/build/types/framework/index.d.ts +20 -0
  168. package/build/types/framework/mcp/audit.d.ts +12 -0
  169. package/build/types/framework/mcp/conformance.d.ts +31 -0
  170. package/build/types/framework/mcp/handler.d.ts +11 -0
  171. package/build/types/framework/mcp/index.d.ts +5 -0
  172. package/build/types/framework/mcp/protocol.d.ts +17 -0
  173. package/build/types/framework/mcp/rate-limit.d.ts +10 -0
  174. package/build/types/framework/mcp/stdio.d.ts +40 -0
  175. package/build/types/framework/mcp/streamable-http.d.ts +17 -0
  176. package/build/types/framework/observability/index.d.ts +6 -0
  177. package/build/types/framework/observability/metrics.d.ts +23 -0
  178. package/build/types/framework/observability/plugin.d.ts +20 -0
  179. package/build/types/framework/observability/readiness.d.ts +9 -0
  180. package/build/types/framework/observability/request.d.ts +7 -0
  181. package/build/types/framework/observability/shutdown.d.ts +21 -0
  182. package/build/types/framework/observability/trace.d.ts +96 -0
  183. package/build/types/framework/parameter-bag.d.ts +14 -0
  184. package/build/types/framework/plugins/body-parser.plugin.d.ts +3 -0
  185. package/build/types/framework/plugins/dev.plugin.d.ts +12 -0
  186. package/build/types/framework/plugins/index.d.ts +5 -0
  187. package/build/types/framework/plugins/mcp.plugin.d.ts +15 -0
  188. package/build/types/framework/plugins/openapi.plugin.d.ts +58 -0
  189. package/build/types/framework/plugins/security/body-limit.d.ts +1 -0
  190. package/build/types/framework/plugins/security/cors.d.ts +10 -0
  191. package/build/types/framework/plugins/security/csrf.d.ts +2 -0
  192. package/build/types/framework/plugins/security/headers.d.ts +1 -0
  193. package/build/types/framework/plugins/security/index.d.ts +13 -0
  194. package/build/types/framework/plugins/security/method-guard.d.ts +1 -0
  195. package/build/types/framework/plugins/security/rate-limit.d.ts +5 -0
  196. package/build/types/framework/repositories.d.ts +5 -0
  197. package/build/types/framework/responses/error.d.ts +13 -0
  198. package/build/types/framework/responses/helpers.d.ts +7 -0
  199. package/build/types/framework/responses/http-throwable.d.ts +14 -0
  200. package/build/types/framework/responses/http.d.ts +13 -0
  201. package/build/types/framework/responses/index.d.ts +4 -0
  202. package/build/types/framework/runtime/bun/server.d.ts +2 -0
  203. package/build/types/framework/runtime/deno/server.d.ts +2 -0
  204. package/build/types/framework/runtime/index.d.ts +17 -0
  205. package/build/types/framework/runtime/node/reply.d.ts +12 -0
  206. package/build/types/framework/runtime/node/request.d.ts +33 -0
  207. package/build/types/framework/runtime/node/server.d.ts +2 -0
  208. package/build/types/framework/runtime/web/server.d.ts +1 -0
  209. package/build/types/framework/services.d.ts +5 -0
  210. package/build/types/framework/utilities/alias-path.util.d.ts +1 -0
  211. package/build/types/framework/utilities/artifact.util.d.ts +7 -0
  212. package/build/types/framework/utilities/callable.util.d.ts +1 -0
  213. package/build/types/framework/utilities/cookie.util.d.ts +1 -0
  214. package/build/types/framework/utilities/csrf.util.d.ts +26 -0
  215. package/build/types/framework/utilities/https.util.d.ts +49 -0
  216. package/build/types/framework/utilities/index.d.ts +12 -0
  217. package/build/types/framework/utilities/ip.util.d.ts +15 -0
  218. package/build/types/framework/utilities/json.util.d.ts +10 -0
  219. package/build/types/framework/utilities/openapi.utils.d.ts +7 -0
  220. package/build/types/framework/utilities/openapi.utils.impl.d.ts +18 -0
  221. package/build/types/framework/utilities/path.util.d.ts +3 -0
  222. package/build/types/framework/utilities/route-suggestion.util.d.ts +10 -0
  223. package/build/types/framework/utilities/url.util.d.ts +1 -0
  224. package/build/types/framework/utilities/utilities.util.d.ts +3 -0
  225. package/build/types/framework/utilities/validation.util.d.ts +8 -0
  226. package/build/types/framework/view-model.d.ts +4 -0
  227. package/build/types/generators/artifact.templates.d.ts +7 -0
  228. package/build/types/generators/index.d.ts +2 -0
  229. package/build/types/generators/project.templates.d.ts +21 -0
  230. package/build/types/manifest/client.d.ts +12 -0
  231. package/build/types/manifest/contract.d.ts +25 -0
  232. package/build/types/manifest/index.d.ts +5 -0
  233. package/build/types/manifest/introspect.d.ts +18 -0
  234. package/build/types/manifest/manifest.d.ts +18 -0
  235. package/build/types/manifest/schema.d.ts +241 -0
  236. package/build/types/requirements.d.ts +1 -0
  237. package/build/types/types/access-guards.d.ts +4 -0
  238. package/build/types/types/application.d.ts +32 -0
  239. package/build/types/types/artifact.d.ts +8 -0
  240. package/build/types/types/builder.d.ts +37 -0
  241. package/build/types/types/config.d.ts +112 -0
  242. package/build/types/types/controller.d.ts +27 -0
  243. package/build/types/types/contruct.d.ts +1 -0
  244. package/build/types/types/core.d.ts +11 -0
  245. package/build/types/types/csrf.d.ts +33 -0
  246. package/build/types/types/directory.d.ts +6 -0
  247. package/build/types/types/encryption.d.ts +14 -0
  248. package/build/types/types/generic.d.ts +2 -0
  249. package/build/types/types/guard.d.ts +9 -0
  250. package/build/types/types/http-responses.d.ts +7 -0
  251. package/build/types/types/index.d.ts +27 -0
  252. package/build/types/types/injection.d.ts +11 -0
  253. package/build/types/types/lifecycle.d.ts +9 -0
  254. package/build/types/types/mcp.d.ts +148 -0
  255. package/build/types/types/middleware.d.ts +12 -0
  256. package/build/types/types/parseable.d.ts +3 -0
  257. package/build/types/types/plugin.d.ts +6 -0
  258. package/build/types/types/raiton.d.ts +13 -0
  259. package/build/types/types/responses.d.ts +20 -0
  260. package/build/types/types/router.d.ts +13 -0
  261. package/build/types/types/runtime.d.ts +48 -0
  262. package/build/types/types/scheduler.d.ts +140 -0
  263. package/build/types/types/scheme.d.ts +125 -0
  264. package/build/types/types/server.d.ts +10 -0
  265. package/build/types/types/socket.d.ts +11 -0
  266. package/build/types/types/thread.d.ts +25 -0
  267. package/build/types/types/utilities.d.ts +4 -0
  268. package/build/types/types/values.d.ts +2 -0
  269. package/docs/AGENTS.md +55 -0
  270. package/docs/CLAUDE.md +55 -0
  271. package/docs/README.md +5 -0
  272. package/docs/contributors/cli/README.md +17 -3
  273. package/docs/contributors/cli/commands.md +28 -17
  274. package/docs/contributors/framework/plugins/openapi.md +12 -3
  275. package/docs/generated/cli/commands.md +31 -0
  276. package/docs/generated/config-schema.json +243 -0
  277. package/docs/generated/manifest-schema.json +312 -0
  278. package/docs/generated/manifest.json +118 -0
  279. package/docs/llms-full.txt +1450 -0
  280. package/docs/llms.txt +51 -0
  281. package/docs/user-guide/README.md +19 -12
  282. package/docs/user-guide/cli.md +26 -0
  283. package/docs/user-guide/config.md +32 -0
  284. package/docs/user-guide/contracts.md +67 -0
  285. package/docs/user-guide/debug.md +130 -0
  286. package/docs/user-guide/en/README.md +83 -0
  287. package/docs/user-guide/getting-started.md +13 -1
  288. package/docs/user-guide/mcp.md +45 -2
  289. package/docs/user-guide/observability.md +74 -0
  290. package/docs/user-guide/openapi/plugin.md +10 -0
  291. package/docs/user-guide/recipes/README.md +32 -0
  292. package/docs/user-guide/recipes/contracts.md +52 -0
  293. package/docs/user-guide/recipes/doctor.md +16 -0
  294. package/docs/user-guide/recipes/generate.md +28 -0
  295. package/docs/user-guide/recipes/manifest.md +17 -0
  296. package/docs/user-guide/recipes/mcp-stdio.md +35 -0
  297. package/docs/user-guide/recipes/new-project.md +34 -0
  298. package/docs/user-guide/recipes/observability.md +17 -0
  299. package/package.json +42 -7
  300. package/scripts/bench-ai-debug.ts +572 -0
  301. package/scripts/bench.ts +586 -0
  302. package/scripts/postinstall.mjs +15 -0
  303. package/source/bin/cli-output.ts +139 -0
  304. package/source/bin/commands.registry.ts +31 -3
  305. package/source/bin/file-utils.ts +95 -0
  306. package/source/bin/name-utils.ts +26 -0
  307. package/source/bin/project-utils.ts +78 -0
  308. package/source/commands/artifact.command.ts +30 -15
  309. package/source/commands/call.command.ts +247 -0
  310. package/source/commands/client.command.ts +64 -0
  311. package/source/commands/contract.command.ts +104 -0
  312. package/source/commands/debug.shared.ts +90 -0
  313. package/source/commands/docs.command.ts +269 -0
  314. package/source/commands/doctor.command.ts +226 -0
  315. package/source/commands/explain.command.ts +119 -0
  316. package/source/commands/generate.command.ts +58 -0
  317. package/source/commands/inspect.command.ts +108 -0
  318. package/source/commands/mcp.command.ts +322 -0
  319. package/source/commands/new.command.ts +135 -0
  320. package/source/commands/openapi.command.ts +95 -0
  321. package/source/commands/requests.command.ts +137 -0
  322. package/source/commands/routes.command.ts +39 -0
  323. package/source/commands/verify.command.ts +173 -0
  324. package/source/commands/why.command.ts +61 -0
  325. package/source/contracts/decorators.ts +216 -0
  326. package/source/contracts/errors.ts +135 -0
  327. package/source/contracts/index.ts +4 -0
  328. package/source/contracts/schema.ts +438 -0
  329. package/source/contracts/typebox.ts +193 -0
  330. package/source/core/application.ts +322 -72
  331. package/source/core/builder.ts +10 -2
  332. package/source/core/config/config.ts +155 -26
  333. package/source/core/config/define.ts +35 -8
  334. package/source/core/config/index.ts +2 -1
  335. package/source/core/config/schema.ts +406 -0
  336. package/source/core/controller/builder.ts +38 -13
  337. package/source/core/controller/compiler.ts +14 -7
  338. package/source/core/controller/metadata.ts +1 -1
  339. package/source/core/hooks.ts +13 -1
  340. package/source/core/injection/injection.ts +47 -9
  341. package/source/core/mcp/builder.ts +13 -2
  342. package/source/core/mcp/metadata.ts +2 -1
  343. package/source/core/middleware/compose.ts +48 -0
  344. package/source/core/middleware/pipeline.ts +69 -46
  345. package/source/core/raiton.ts +8 -0
  346. package/source/core/router/handler.ts +246 -37
  347. package/source/core/router/handler.utils.ts +107 -51
  348. package/source/core/router/matcher.ts +195 -24
  349. package/source/core/router/route.ts +100 -31
  350. package/source/core/router/router.ts +27 -2
  351. package/source/core/scheduler/metadata.ts +1 -1
  352. package/source/core/socket/metadata.ts +1 -1
  353. package/source/core/thread.ts +37 -2
  354. package/source/debug/cli.ts +206 -0
  355. package/source/debug/collector.internal.ts +27 -0
  356. package/source/debug/collector.ts +294 -0
  357. package/source/debug/config.ts +142 -0
  358. package/source/debug/examples.ts +188 -0
  359. package/source/debug/explain.ts +187 -0
  360. package/source/debug/index.ts +15 -0
  361. package/source/debug/invocation.ts +695 -0
  362. package/source/debug/journal.ts +249 -0
  363. package/source/debug/mcp-http.ts +145 -0
  364. package/source/debug/mcp.ts +410 -0
  365. package/source/debug/redaction.ts +225 -0
  366. package/source/debug/requests.ts +136 -0
  367. package/source/debug/runtime.ts +181 -0
  368. package/source/debug/session.ts +107 -0
  369. package/source/debug/source.ts +95 -0
  370. package/source/debug/surface.ts +375 -0
  371. package/source/debug/types.ts +311 -0
  372. package/source/debug/verify.ts +186 -0
  373. package/source/framework/artifacts.ts +47 -15
  374. package/source/framework/cache/cache.ts +48 -3
  375. package/source/framework/constants/decorators.constant.ts +5 -0
  376. package/source/framework/data-transfer-object.ts +4 -3
  377. package/source/framework/decorators/controllable.decorator.ts +3 -3
  378. package/source/framework/decorators/csrf-guard.decorator.ts +3 -2
  379. package/source/framework/decorators/csrf-token.decorator.ts +1 -1
  380. package/source/framework/decorators/guard.decorator.ts +3 -2
  381. package/source/framework/decorators/health-check.decorator.ts +1 -1
  382. package/source/framework/decorators/mcp.decorator.ts +38 -7
  383. package/source/framework/decorators/middleware.decorator.ts +2 -2
  384. package/source/framework/decorators/parametrable.decorator.ts +2 -1
  385. package/source/framework/decorators/routable.decorator.ts +3 -3
  386. package/source/framework/decorators/route-interaction.decorator.ts +2 -2
  387. package/source/framework/decorators/scheduler.decorator.ts +3 -3
  388. package/source/framework/decorators/socket.decorator.ts +3 -3
  389. package/source/framework/encryption.ts +46 -7
  390. package/source/framework/errors/catalog.ts +205 -0
  391. package/source/framework/exceptions/http-exception.ts +1 -1
  392. package/source/framework/health-check.ts +18 -0
  393. package/source/framework/index.ts +2 -0
  394. package/source/framework/mcp/audit.ts +57 -0
  395. package/source/framework/mcp/conformance.ts +195 -0
  396. package/source/framework/mcp/handler.ts +139 -9
  397. package/source/framework/mcp/index.ts +6 -1
  398. package/source/framework/mcp/protocol.ts +6 -0
  399. package/source/framework/mcp/rate-limit.ts +33 -0
  400. package/source/framework/mcp/stdio.ts +150 -0
  401. package/source/framework/mcp/streamable-http.ts +36 -5
  402. package/source/framework/observability/index.ts +6 -0
  403. package/source/framework/observability/metrics.ts +162 -0
  404. package/source/framework/observability/plugin.ts +151 -0
  405. package/source/framework/observability/readiness.ts +22 -0
  406. package/source/framework/observability/request.ts +31 -0
  407. package/source/framework/observability/shutdown.ts +68 -0
  408. package/source/framework/observability/trace.ts +241 -0
  409. package/source/framework/plugins/body-parser.plugin.ts +88 -85
  410. package/source/framework/plugins/dev.plugin.ts +227 -0
  411. package/source/framework/plugins/index.ts +2 -1
  412. package/source/framework/plugins/mcp.plugin.ts +14 -3
  413. package/source/framework/plugins/openapi.plugin.ts +56 -13
  414. package/source/framework/responses/helpers.ts +4 -4
  415. package/source/framework/responses/http-throwable.ts +1 -1
  416. package/source/framework/runtime/bun/server.ts +2 -1
  417. package/source/framework/runtime/deno/server.ts +2 -1
  418. package/source/framework/runtime/index.ts +45 -13
  419. package/source/framework/runtime/node/request.ts +59 -13
  420. package/source/framework/utilities/index.ts +3 -1
  421. package/source/framework/utilities/openapi.utils.impl.ts +733 -0
  422. package/source/framework/utilities/openapi.utils.ts +6 -636
  423. package/source/framework/utilities/route-suggestion.util.ts +59 -0
  424. package/source/framework/utilities/validation.util.ts +20 -0
  425. package/source/generators/artifact.templates.ts +230 -0
  426. package/source/generators/index.ts +2 -0
  427. package/source/generators/project.templates.ts +392 -0
  428. package/source/manifest/client.ts +299 -0
  429. package/source/manifest/contract.ts +138 -0
  430. package/source/manifest/index.ts +5 -0
  431. package/source/manifest/introspect.ts +57 -0
  432. package/source/manifest/manifest.ts +364 -0
  433. package/source/manifest/schema.ts +200 -0
  434. package/source/types/builder.ts +5 -0
  435. package/source/types/config.ts +120 -2
  436. package/source/types/mcp.ts +63 -1
  437. package/tsconfig.build.json +13 -0
  438. package/source/commands/grafts.command.ts +0 -27
  439. package/tests/artifact-resolution.test.ts +0 -60
package/CHANGELOG.md CHANGED
@@ -1,3 +1,70 @@
1
+ ## [6.11.0-beta.29](https://github.com/protorians/raiton/compare/v6.10.0-beta.28...v6.11.0-beta.29) (2026-11-27)
2
+
3
+ ### Features
4
+
5
+ * feat(debug): livrer le debug runtime assisté par IA ([a88e078](https://github.com/protorians/raiton/commit/a88e078ea8046c5961b2faa10c4da61b195faf9e))
6
+
7
+ ### Bug Fixes
8
+
9
+ * chore(gitignore): ignorer les specs à tous les niveaux ([a5d7d4e](https://github.com/protorians/raiton/commit/a5d7d4e885958d7f1cba55d3f420852c8eca88d4))
10
+ * docs(specs): déclarer implémentée la spec 003 de debug runtime ([d10ed61](https://github.com/protorians/raiton/commit/d10ed61332c9bb85328bb12a48f5ebebea9a81c1))
11
+ * docs(debug): documenter les commandes, la configuration et le MCP de debug ([1edbfd2](https://github.com/protorians/raiton/commit/1edbfd2cd951f8c1a1e2d24d7aabf59cbfb60db7))
12
+ * perf(debug): mesurer le coût du journal et l'économie de tokens du debug ([fe47a5d](https://github.com/protorians/raiton/commit/fe47a5d7763fc4166bfeca97020e4816811b0e0b))
13
+
14
+ ### Other Changes
15
+
16
+ * test(debug): couvrir le journal, les commandes et le serveur MCP de debug ([6edbd30](https://github.com/protorians/raiton/commit/6edbd30599a2deebad1d4c9a39726e6902e48058))
17
+
18
+ ## Unreleased
19
+
20
+ ### Features
21
+
22
+ * **debug**: AI-assisted runtime debug (spec 003) — `raiton call`, `requests`, `explain`, `replay` and `verify`; bounded in-memory request journal with redaction, timeline, source locations and HMR staleness; HTTP and stdio debug MCP server (`raiton-debug`) with scopes, audit and conformance; enriched, actionable errors; route examples and error documentation in the manifest and OpenAPI; opt-in configuration, local-only defaults and constant-time token protection.
23
+
24
+ ## [6.10.0-beta.28](https://github.com/protorians/raiton/compare/v6.8.9-beta.25...v6.10.0-beta.28) (2026-11-27)
25
+
26
+ ### Features
27
+
28
+ * feat: contrats, manifeste, MCP, observabilité, CLI et optimisation des performances (#21) ([2131645](https://github.com/protorians/raiton/commit/2131645c5c4f1d32a762c811d444e1d8fabb2833))
29
+
30
+ ### Bug Fixes
31
+
32
+ * chore(gitignore): ancrer l'ignore des specs à la racine du dépôt ([41cc1d8](https://github.com/protorians/raiton/commit/41cc1d871c01c65b9c17b0b52a38f2b88b4db0fb))
33
+
34
+ ## [6.9.1-beta.27](https://github.com/protorians/raiton/compare/v6.9.0-beta.26...v6.9.1-beta.27) (2026-11-27)
35
+
36
+ ### Bug Fixes
37
+
38
+ * chore(ci): calibre les budgets de benchmark sur les runners partagés ([1f5586d](https://github.com/protorians/raiton/commit/1f5586d98bc7b04e29755090a2009dd3f645945b))
39
+ * perf(framework): accélère le routage, le pipeline HTTP et le démarrage ([25e9dfb](https://github.com/protorians/raiton/commit/25e9dfbe4dac7dd0983340e530d87061ded2f335))
40
+
41
+ ### Other Changes
42
+
43
+ * test(perf): ajoute les benchmarks et les tests de non-régression ([4c28bbf](https://github.com/protorians/raiton/commit/4c28bbf857068271ec444c5fdfc2bea7b5148343))
44
+
45
+ ## [6.9.0-beta.26](https://github.com/protorians/raiton/compare/v6.8.9-beta.25...v6.9.0-beta.26) (2026-11-27)
46
+
47
+ ### Features
48
+
49
+ * **config**: `.ts`/`.mts`/`.cts` loading first, field-level validation, published JSON Schema and generated declarations for the package `types` entry. ([5c60a27](https://github.com/protorians/raiton/commit/5c60a27786751af16e17d4bedded54f6f10dc497))
50
+ * **contracts**: schema-first `raiton/contracts` (TypeBox) feeding runtime validation, types, OpenAPI and the generated client; `@Input`/`@Output`; stable `VALIDATION_ERROR` payloads; development-only output validation. ([e22328e](https://github.com/protorians/raiton/commit/e22328ed35ca74dfb575c6a05797f4852dc952eb))
51
+ * **manifest**: versioned project inventory (routes, artifacts, DI graph, config, env, MCP tools, source locations), published JSON Schema and HMR cache invalidation. ([efb8550](https://github.com/protorians/raiton/commit/efb85501382237dfcbb5b9a38f5e58816f982e7f))
52
+ * **mcp**: stdio transport, shared HTTP/stdio conformance suite, input/output schemas, safety annotations, default-deny destructive tools, scopes, audit with secret redaction and rate limiting. ([ce68d66](https://github.com/protorians/raiton/commit/ce68d669c38f64fe8a3189649d0792db560c7af2))
53
+ * **observability**: correlation ids, Prometheus metrics, OTLP traces, stable error catalogue, readiness and bounded graceful shutdown. ([899fed9](https://github.com/protorians/raiton/commit/899fed91afed36f663aa6d68e0c4b1528c8ee484))
54
+ * **discoverability**: development page (`/__dev`), route suggestions on 404, default Redoc OpenAPI UI. ([899fed9](https://github.com/protorians/raiton/commit/899fed91afed36f663aa6d68e0c4b1528c8ee484))
55
+ * **cli**: `new`, `generate`, `routes`, `inspect`, `why`, `doctor`, `openapi export`, `client`, `contract check|snapshot`, `mcp list|inspect|test|serve|conformance`, `docs agents` with JSON output, stable exit codes and dry-run. ([7390572](https://github.com/protorians/raiton/commit/73905720187e251fc0b39b93bcf60d8961650112))
56
+ * **docs**: French/English guides, executable recipes, `llms.txt`, `llms-full.txt`, `AGENTS.md`, `CLAUDE.md` and generated references. ([030e996](https://github.com/protorians/raiton/commit/030e99668c18b3f78bc66bb3c103bf6d4ac4c7c3))
57
+
58
+ ### Bug Fixes
59
+
60
+ * `Application.handle` now honours `statusCode` carried by plain response objects (health checks).
61
+ * OpenAPI UI no longer sends an empty body; a default UI is provided.
62
+ * The project bootstrapper no longer installs the body parser twice or starts the scheduler outside serving mode.
63
+
64
+ ### Build
65
+
66
+ * Publish generated type declarations and update scripts, npm ignores and the CI workflow. ([3d8ec11](https://github.com/protorians/raiton/commit/3d8ec11ece759ceca5f26abc168e72f07ec485f1))
67
+
1
68
  ## [6.8.9-beta.25](https://github.com/protorians/raiton/compare/v6.8.8-beta.24...v6.8.9-beta.25) (2026-11-26)
2
69
 
3
70
  ### Bug Fixes
package/README.md CHANGED
@@ -13,7 +13,10 @@ il offre également un support complet pour **Node.js** et **Deno**.
13
13
  - **Multi-Runtime** : Compatible avec Bun (recommandé), Node.js et les environnements Web.
14
14
  - **Architecture Décorative** : Utilise les décorateurs TypeScript pour définir contrôleurs, routes et injections.
15
15
  - **Modulaire** : Système de plugins et de middlewares flexible.
16
- - **CLI Puissant** : Outils intégrés pour le développement, le build et le déploiement.
16
+ - **CLI Puissant** : Création de projet, générateurs, inventaire, diagnostic, OpenAPI, client typé et contrats.
17
+ - **Schema-first** : une seule définition TypeBox alimente validation runtime, types, OpenAPI et client.
18
+ - **AI-friendly** : manifeste versionné, `llms.txt`, `AGENTS.md`, MCP HTTP **et** stdio.
19
+ - **Observabilité opt-in** : corrélation, métriques Prometheus, traces OTLP, arrêt gracieux.
17
20
 
18
21
  ## Installation
19
22
 
@@ -69,6 +72,48 @@ export default async (thread: ThreadInterface) => {
69
72
 
70
73
  > **Note :** selon la configuration du projet, le bootstrapper est chargé depuis `source/main.ts` et la racine du projet peut être définie par `raiton.config.ts` via `rootDir`.
71
74
 
75
+ ## Créer un projet
76
+
77
+ ```bash
78
+ bun raiton new my-api --template api --runtime bun --yes
79
+ cd my-api
80
+ bun raiton dev
81
+ bun test
82
+ ```
83
+
84
+ ```bash
85
+ bun raiton generate resource users # contrôleur + service + dépôt + DTO + test
86
+ bun raiton inspect --json # inventaire machine-readable
87
+ bun raiton doctor # diagnostic actionnable
88
+ bun raiton openapi export --out openapi.json
89
+ bun raiton client --out ./sdk
90
+ bun raiton mcp conformance --json
91
+ ```
92
+
93
+ ## Contrats schema-first
94
+
95
+ ```typescript
96
+ import { t } from "raiton/contracts"
97
+
98
+ export const CreateUser = t.object({
99
+ email: t.string().email(),
100
+ name: t.string().min(2),
101
+ })
102
+ export type CreateUser = t.infer<typeof CreateUser>
103
+ ```
104
+
105
+ ```typescript
106
+ @Post("/")
107
+ @Input(CreateUser)
108
+ @Output(User)
109
+ create(@Body() input: CreateUser) {
110
+ return this.users.create(input)
111
+ }
112
+ ```
113
+
114
+ Les charges invalides sont rejetées avant le handler avec un code stable
115
+ `VALIDATION_ERROR`, et le client généré compile sans `any`.
116
+
72
117
  ## Utilisation du CLI
73
118
 
74
119
  Raiton est livré avec une interface en ligne de commande pour faciliter le développement.
@@ -91,6 +136,25 @@ deno task start # démarrage en production
91
136
  deno task compile # binaire autonome stable et rapide
92
137
  ```
93
138
 
139
+ ## Déboguer avec un agent IA
140
+
141
+ Les surfaces de debug sont opt-in et désactivées par défaut en production.
142
+
143
+ ```bash
144
+ bun raiton call GET /api/items/:id --param id=42 --json
145
+ bun raiton requests --since 5m
146
+ bun raiton explain --last --json
147
+ bun raiton verify --json
148
+ bun raiton mcp debug --stdio # ou --http --port 5711
149
+ ```
150
+
151
+ - résolution de route et validation locale avant envoi ;
152
+ - journal borné, expurgé et explications avec chronologie, source et actions ;
153
+ - serveur MCP de debug (`routes.list`, `routes.call`, `requests.explain`, `manifest.get`, …) ;
154
+ - erreurs enrichies avec attendu, reçu, emplacement et `hint` en développement.
155
+
156
+ Voir [docs/user-guide/debug.md](docs/user-guide/debug.md).
157
+
94
158
  ## Runtimes supportés
95
159
 
96
160
  Raiton détecte automatiquement l'environnement d'exécution et adapte son serveur :
@@ -0,0 +1,31 @@
1
+ # Benchmarks Raiton
2
+
3
+ Rapports générés par le harnais de la spec 001 :
4
+
5
+ ```bash
6
+ bun run bench # rapport Markdown + benchmarks/latest.{md,json}
7
+ bun run bench --check # vérifie les budgets spec 001
8
+ bun run bench --check --check-observability # inclut les budgets spec 002
9
+ ```
10
+
11
+ Les fichiers `latest.md` et `latest.json` sont remplacés à chaque exécution. Le
12
+ protocole, les scénarios et les budgets de référence sont décrits dans
13
+ [`specs/001-performance-optimization/metrics.md`](../specs/001-performance-optimization/metrics.md).
14
+
15
+ Scénarios couverts : routage indexé, pile HTTP complète, validation de réponse,
16
+ body parser, démarrage à froid, reload HMR et classification d'artefacts.
17
+
18
+ ## Debug assisté par IA (spec 003)
19
+
20
+ ```bash
21
+ bun run bench:ai # benchmarks/ai-debug.{md,json}
22
+ bun run bench:ai --check # vérifie les budgets de la spec 003
23
+ ```
24
+
25
+ Ce harnais mesure le `DebugJournal` livré (métadonnées et capture complète,
26
+ index, sérialisation, mémoire) ainsi que le prototype de référence, la taille
27
+ en tokens des artefacts du dépôt et les projections d'économie de tokens pour
28
+ `call`, `explain` et `verify`. Les mesures de performance sont réelles ; les
29
+ économies de tokens sont marquées « Estimé » tant qu'aucune campagne sur agents
30
+ réels n'a été exécutée. Le protocole est décrit dans
31
+ [`specs/003-ai-runtime-debug/metrics.md`](../specs/003-ai-runtime-debug/metrics.md).
@@ -0,0 +1,145 @@
1
+ {
2
+ "generatedAt": "2026-11-27T18:55:32.006Z",
3
+ "environment": {
4
+ "runtime": "Bun 1.4.2",
5
+ "node": "v26.3.0",
6
+ "platform": "darwin-x64",
7
+ "cpus": 12
8
+ },
9
+ "journal": {
10
+ "capacity": 1000,
11
+ "recordBytes": 331,
12
+ "write": {
13
+ "p50": 0.05499999997482519,
14
+ "p90": 0.06700000000137152
15
+ },
16
+ "linearLookup": {
17
+ "p50": 5.326000000081876,
18
+ "p90": 5.639000000030592
19
+ },
20
+ "mapLookup": {
21
+ "p50": 0.07100000004811591,
22
+ "p90": 0.07299999992937956
23
+ },
24
+ "serialize": {
25
+ "p50": 0.5260000000362197,
26
+ "p90": 0.6309999999984939
27
+ }
28
+ },
29
+ "realJournal": {
30
+ "capacity": 1000,
31
+ "size": 1000,
32
+ "totalBytes": 462000,
33
+ "recordBytes": 1062,
34
+ "write": {
35
+ "p50": 1.198999999814987,
36
+ "p90": 1.5120000000479195
37
+ },
38
+ "mapLookup": {
39
+ "p50": 0.05199999986871262,
40
+ "p90": 0.07099999993442907
41
+ },
42
+ "serialize": {
43
+ "p50": 1.3349999999263673,
44
+ "p90": 3.1290000001718
45
+ }
46
+ },
47
+ "realMetadataJournal": {
48
+ "capacity": 1000,
49
+ "size": 1000,
50
+ "totalBytes": 512000,
51
+ "recordBytes": 863,
52
+ "write": {
53
+ "p50": 0.21099999958096305,
54
+ "p90": 0.2779999999802385
55
+ },
56
+ "mapLookup": {
57
+ "p50": 0.04999999964638846,
58
+ "p90": 0.05000000010113581
59
+ },
60
+ "serialize": {
61
+ "p50": 0.9839999997893756,
62
+ "p90": 1.2340000002950546
63
+ }
64
+ },
65
+ "referenceHttpP50": 2.067000000010921,
66
+ "overhead": {
67
+ "write": 0.026608611501951904,
68
+ "full": 0.2810836961818941
69
+ },
70
+ "artifacts": {
71
+ "files": [
72
+ {
73
+ "file": "docs/llms.txt",
74
+ "bytes": 2498,
75
+ "tokens": 627
76
+ },
77
+ {
78
+ "file": "docs/AGENTS.md",
79
+ "bytes": 1979,
80
+ "tokens": 479
81
+ },
82
+ {
83
+ "file": "README.md",
84
+ "bytes": 6673,
85
+ "tokens": 1695
86
+ },
87
+ {
88
+ "file": "tests/fixtures/project/source/controllers/items.controller.ts",
89
+ "bytes": 746,
90
+ "tokens": 201
91
+ }
92
+ ],
93
+ "project": {
94
+ "manifest": 1287,
95
+ "routes": 781,
96
+ "openapi": 1264
97
+ },
98
+ "samples": {
99
+ "explain": 408,
100
+ "call": 227,
101
+ "verify": 138,
102
+ "baselineLog": 299,
103
+ "curlResponse": 73
104
+ }
105
+ },
106
+ "projections": {
107
+ "fixedContext": 479,
108
+ "scenarios": [
109
+ {
110
+ "name": "Diagnostiquer un 400 de validation",
111
+ "baseline": 1281,
112
+ "feature": 408,
113
+ "assumptions": "Contrôleur (174) + extrait de logs (299) + routes (486) contre une explication structurée (408).",
114
+ "incremental": 0.6814988290398126,
115
+ "fresh": 0.4960227272727273
116
+ },
117
+ {
118
+ "name": "Invoquer une route inconnue",
119
+ "baseline": 1055,
120
+ "feature": 227,
121
+ "assumptions": "Contrôleur (174) + routes (486) + réponse curl (73) contre une invocation structurée (227).",
122
+ "incremental": 0.7848341232227488,
123
+ "fresh": 0.5397653194263363
124
+ },
125
+ {
126
+ "name": "Invoquer une route connue (contexte chaud)",
127
+ "baseline": 274,
128
+ "feature": 227,
129
+ "assumptions": "Contrôleur (174) + réponse curl (73) contre une invocation structurée (227) : borne basse réaliste.",
130
+ "incremental": 0.17153284671532848,
131
+ "fresh": 0.06241699867197875
132
+ },
133
+ {
134
+ "name": "Vérifier les contrats après modification",
135
+ "baseline": 1465,
136
+ "feature": 138,
137
+ "assumptions": "OpenAPI (938) + contrôleur (174) contre un rapport de vérification compact (138).",
138
+ "incremental": 0.9058020477815699,
139
+ "fresh": 0.6826131687242798
140
+ }
141
+ ],
142
+ "medianIncremental": 0.7848341232227488,
143
+ "medianFresh": 0.5397653194263363
144
+ }
145
+ }
@@ -0,0 +1,64 @@
1
+ # Raiton AI debug benchmark
2
+
3
+ Généré le 2026-11-27T18:55:32.006Z · Bun 1.4.2 · darwin-x64
4
+
5
+ Ce rapport couvre la spec 003. Les mesures de performance sont réelles ;
6
+ les économies de tokens sont des projections marquées « Estimé ».
7
+
8
+ ### Journal de requêtes — implémentation réelle (µs / opération)
9
+
10
+ | Opération | p50 | p90 | Taille |
11
+ | --- | --- | --- | --- |
12
+ | Métadonnées — écriture | 0.211 | 0.278 | 863 o |
13
+ | Métadonnées — recherche indexée | 0.050 | 0.050 | |
14
+ | Complet — écriture | 1.199 | 1.512 | 1062 o |
15
+ | Complet — recherche indexée | 0.052 | 0.071 | |
16
+ | Sérialisation d'une entrée complète | 1.335 | 3.129 | |
17
+ | Mémoire (1 000 entrées, complètes) | 451 Kio | | ≤ 8 Mio |
18
+
19
+ ### Journal de requêtes — prototype (µs / opération)
20
+
21
+ | Opération | p50 | p90 | Taille |
22
+ | --- | --- | --- | --- |
23
+ | Écriture ring buffer | 0.055 | 0.067 | 331 o |
24
+ | Recherche linéaire (1 000 entrées) | 5.326 | 5.639 | |
25
+ | Recherche indexée (Map) | 0.071 | 0.073 | |
26
+ | Sérialisation d'un enregistrement | 0.526 | 0.631 | |
27
+
28
+ Référence pile HTTP (spec 001) : **2.067 µs** p50. Surcoût capture métadonnées : **2.66 %** ; capture + sérialisation immédiate : **28.11 %**.
29
+
30
+ ### Artefacts — tokens mesurés (cl100k_base)
31
+
32
+ | Artefact | Octets | Tokens |
33
+ | --- | --- | --- |
34
+ | docs/llms.txt | 2498 | 627 |
35
+ | docs/AGENTS.md | 1979 | 479 |
36
+ | README.md | 6673 | 1695 |
37
+ | tests/fixtures/project/source/controllers/items.controller.ts | 746 | 201 |
38
+ | manifeste du projet fixture | | 1287 |
39
+ | routes du projet fixture | | 781 |
40
+ | OpenAPI du projet fixture | | 1264 |
41
+ | sortie explain (échantillon) | | 408 |
42
+ | sortie call (échantillon) | | 227 |
43
+ | rapport verify (échantillon) | | 138 |
44
+ | extrait de logs (échantillon) | | 299 |
45
+ | réponse curl (échantillon) | | 73 |
46
+
47
+ ### Économie de tokens par scénario (Estimé)
48
+
49
+ | Scénario | Sans feature | Avec feature | Économie incrémentale | Économie session neuve |
50
+ | --- | --- | --- | --- | --- |
51
+ | Diagnostiquer un 400 de validation | 1281 | 408 | 68.1 % | 49.6 % |
52
+ | Invoquer une route inconnue | 1055 | 227 | 78.5 % | 54.0 % |
53
+ | Invoquer une route connue (contexte chaud) | 274 | 227 | 17.2 % | 6.2 % |
54
+ | Vérifier les contrats après modification | 1465 | 138 | 90.6 % | 68.3 % |
55
+ | Médiane | | | 78.5 % | 54.0 % |
56
+
57
+ Contexte fixe retenu pour la session neuve : **479 tokens** (AGENTS.md seul).
58
+
59
+ Hypothèses :
60
+ - **Diagnostiquer un 400 de validation** : Contrôleur (174) + extrait de logs (299) + routes (486) contre une explication structurée (408).
61
+ - **Invoquer une route inconnue** : Contrôleur (174) + routes (486) + réponse curl (73) contre une invocation structurée (227).
62
+ - **Invoquer une route connue (contexte chaud)** : Contrôleur (174) + réponse curl (73) contre une invocation structurée (227) : borne basse réaliste.
63
+ - **Vérifier les contrats après modification** : OpenAPI (938) + contrôleur (174) contre un rapport de vérification compact (138).
64
+
@@ -0,0 +1,172 @@
1
+ {
2
+ "generatedAt": "2026-11-27T18:55:33.691Z",
3
+ "environment": {
4
+ "runtime": "Bun 1.4.2",
5
+ "node": "v26.3.0",
6
+ "platform": "darwin-x64",
7
+ "cpus": 12,
8
+ "iterations": {
9
+ "routing": 40000,
10
+ "http": 3000
11
+ }
12
+ },
13
+ "memory": {
14
+ "rssMB": 114.94921875,
15
+ "heapUsedMB": 11.493053436279297
16
+ },
17
+ "routing": {
18
+ "first": {
19
+ "p50": 0.22263835000000043,
20
+ "p90": 0.3131327749999997,
21
+ "iterations": 40000
22
+ },
23
+ "middle": {
24
+ "p50": 0.22743380000000002,
25
+ "p90": 0.23514232499999962,
26
+ "iterations": 40000
27
+ },
28
+ "last": {
29
+ "p50": 0.2331324500000008,
30
+ "p90": 0.24959539999999977,
31
+ "iterations": 40000
32
+ },
33
+ "param": {
34
+ "p50": 0.5843506250000005,
35
+ "p90": 0.6468359750000005,
36
+ "iterations": 40000
37
+ },
38
+ "hundred": {
39
+ "p50": 0.2518914749999993,
40
+ "p90": 0.276153524999998,
41
+ "iterations": 40000
42
+ },
43
+ "thousand": {
44
+ "p50": 0.24798450000000116,
45
+ "p90": 0.3105918250000002,
46
+ "iterations": 40000
47
+ },
48
+ "orderRatio": 1.0471351858293971,
49
+ "scaleRatio": 0.984489451260714
50
+ },
51
+ "http": {
52
+ "zero": {
53
+ "p50": 3.5690000000840882,
54
+ "p90": 6.92900000001373,
55
+ "throughput": 209116.1392699548
56
+ },
57
+ "hundredFirst": {
58
+ "p50": 2.8079999999590655,
59
+ "p90": 4.6649999999317515,
60
+ "throughput": 277381.3022996673
61
+ },
62
+ "hundredLast": {
63
+ "p50": 2.4420000000873188,
64
+ "p90": 3.5349999999425563,
65
+ "throughput": 315387.8355752841
66
+ },
67
+ "threeHundredFirst": {
68
+ "p50": 2.459000000044398,
69
+ "p90": 3.844000000071901,
70
+ "throughput": 308105.8331212552
71
+ },
72
+ "threeHundredLast": {
73
+ "p50": 2.3179999999456413,
74
+ "p90": 3.6370000000260916,
75
+ "throughput": 327382.82313994126
76
+ }
77
+ },
78
+ "validation": {
79
+ "development": {
80
+ "p50": 42.086999999924046,
81
+ "p90": 61.02599999996983,
82
+ "throughput": 18534.856651418653
83
+ },
84
+ "production": {
85
+ "p50": 3.1930000000102154,
86
+ "p90": 5.704999999920801,
87
+ "throughput": 229672.43887095625
88
+ },
89
+ "dtoFields": 8,
90
+ "sample": {
91
+ "name": "Ada",
92
+ "email": "ada@example.com",
93
+ "age": 36,
94
+ "score": 42,
95
+ "active": true,
96
+ "login": "ada",
97
+ "city": "London",
98
+ "country": "UK"
99
+ }
100
+ },
101
+ "body": {
102
+ "small": {
103
+ "p50": 8.317000000033659,
104
+ "p90": 17.173999999954503,
105
+ "bytes": 518
106
+ },
107
+ "large": {
108
+ "p50": 10.565999999926134,
109
+ "p90": 20.65200000004097,
110
+ "bytes": 9984
111
+ },
112
+ "read": {
113
+ "p50": 0.8380000000443033,
114
+ "p90": 3.438000000073771,
115
+ "bytes": 534
116
+ },
117
+ "bytes": 534
118
+ },
119
+ "startup": {
120
+ "framework": {
121
+ "samples": [
122
+ 55.254,
123
+ 61.975,
124
+ 53.855,
125
+ 53.901,
126
+ 50.568
127
+ ],
128
+ "p50": 53.901
129
+ },
130
+ "decorators": {
131
+ "samples": [
132
+ 18.072,
133
+ 17.234,
134
+ 18.271,
135
+ 19.683,
136
+ 18.361
137
+ ],
138
+ "p50": 18.271
139
+ }
140
+ },
141
+ "hmr": {
142
+ "p50": 0.3699460000000272,
143
+ "p90": 0.5563669999999092,
144
+ "reloads": 30,
145
+ "routes": 3
146
+ },
147
+ "classification": {
148
+ "files": 5000,
149
+ "p50": 1.454808999999841,
150
+ "p90": 1.5638860000001387,
151
+ "iterations": 1
152
+ },
153
+ "observability": {
154
+ "off": {
155
+ "p50": 2.437999999983731,
156
+ "p90": 3.373999999894295,
157
+ "throughput": 353847.77610210417
158
+ },
159
+ "metrics": {
160
+ "p50": 6.975999999895066,
161
+ "p90": 13.245999999980995,
162
+ "throughput": 115854.76516152175
163
+ },
164
+ "traces": {
165
+ "p50": 7.463999999799853,
166
+ "p90": 17.927000000099724,
167
+ "throughput": 106863.65485347701
168
+ },
169
+ "metricsOverhead": 186.13617719202696,
170
+ "tracesOverhead": 206.15258407914934
171
+ }
172
+ }
@@ -0,0 +1,66 @@
1
+ # Raiton performance benchmark
2
+
3
+ Généré le 2026-11-27T18:55:33.691Z · Bun 1.4.2 · darwin-x64
4
+
5
+ Mémoire : **114.9 Mo RSS** · **11.5 Mo heap**
6
+
7
+ ### Routage (µs / requête)
8
+
9
+ | Scénario | p50 | p90 |
10
+ |---|---|---|
11
+ | Cible en premier (300 routes) | 0.223 | 0.313 |
12
+ | Cible au milieu (300 routes) | 0.227 | 0.235 |
13
+ | Cible en dernier (300 routes) | 0.233 | 0.250 |
14
+ | Paramétrique /res299/:id | 0.584 | 0.647 |
15
+ | 100 routes statiques | 0.252 | 0.276 |
16
+ | 1 000 routes statiques | 0.248 | 0.311 |
17
+
18
+ Ratio ordre (dernier / premier) : **1.05×** · ratio échelle (1 000 / 100) : **0.98×**
19
+
20
+ ### Pile HTTP complète (µs / requête)
21
+
22
+ | Scénario | p50 | p90 | req/s |
23
+ |---|---|---|---|
24
+ | 0 route + cible | 3.569 | 6.929 | 209116 |
25
+ | 100 routes, cible en premier | 2.808 | 4.665 | 277381 |
26
+ | 100 routes, cible en dernier | 2.442 | 3.535 | 315388 |
27
+ | 300 routes, cible en premier | 2.459 | 3.844 | 308106 |
28
+ | 300 routes, cible en dernier | 2.318 | 3.637 | 327383 |
29
+
30
+ ### Validation de réponse (µs / requête)
31
+
32
+ | Scénario | p50 | p90 |
33
+ |---|---|---|
34
+ | Développement (validation active) | 42.087 | 61.026 |
35
+ | Production (validation désactivée) | 3.193 | 5.705 |
36
+
37
+ ### Body parser (µs / requête)
38
+
39
+ | Scénario | p50 | p90 | Octets |
40
+ |---|---|---|---|
41
+ | Lecture native JSON 547 octets | 0.838 | 3.438 | 534 |
42
+ | POST JSON 547 octets (pile complète) | 8.317 | 17.174 | 518 |
43
+ | POST JSON 10 Ko (pile complète) | 10.566 | 20.652 | 9984 |
44
+
45
+ ### Démarrage à froid (ms)
46
+
47
+ | Entrée | p50 |
48
+ |---|---|
49
+ | Import framework | 53.9 |
50
+ | Import decorators | 18.3 |
51
+
52
+ ### HMR et classification
53
+
54
+ | Scénario | p50 | p90 |
55
+ |---|---|---|
56
+ | Reload contrôleur 3 routes (ms) | 0.370 | 0.556 |
57
+ | Classification 5 000 fichiers (ms) | 1.455 | 1.564 |
58
+
59
+ ### Observabilité
60
+
61
+ | Mode | p50 (µs) | Surcoût p50 |
62
+ |---|---|---|
63
+ | off | 2.438 | 0.00 % |
64
+ | metrics | 6.976 | 186.14 % |
65
+ | traces | 7.464 | 206.15 % |
66
+