@sixthsummit/ship-api 0.0.0-stage → 4.1.1-alpha-20261013055832

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 (556) hide show
  1. package/CHANGELOG.md +608 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +4 -0
  4. package/README.md +58 -2
  5. package/cli/commands/add.js +537 -0
  6. package/cli/commands/contract.js +2 -0
  7. package/cli/commands/create.js +250 -0
  8. package/cli/commands/dev.js +227 -0
  9. package/cli/commands/doctor.js +286 -0
  10. package/cli/commands/generate.js +937 -0
  11. package/cli/commands/graph.js +2 -0
  12. package/cli/commands/migrate-orm.js +1171 -0
  13. package/cli/commands/update.js +37 -0
  14. package/cli/ship-api.js +285 -0
  15. package/lib/app/auth/AuthProvider.d.ts +91 -0
  16. package/lib/app/auth/AuthProvider.d.ts.map +1 -0
  17. package/lib/app/auth/AuthProvider.js +13 -0
  18. package/lib/app/auth/AuthProvider.js.map +1 -0
  19. package/lib/app/auth/adapters/firebase.d.ts +79 -0
  20. package/lib/app/auth/adapters/firebase.d.ts.map +1 -0
  21. package/lib/app/auth/adapters/firebase.js +122 -0
  22. package/lib/app/auth/adapters/firebase.js.map +1 -0
  23. package/lib/app/auth/adapters/jwtCookie.d.ts +55 -0
  24. package/lib/app/auth/adapters/jwtCookie.d.ts.map +1 -0
  25. package/lib/app/auth/adapters/jwtCookie.js +120 -0
  26. package/lib/app/auth/adapters/jwtCookie.js.map +1 -0
  27. package/lib/app/auth/index.d.ts +8 -0
  28. package/lib/app/auth/index.d.ts.map +1 -0
  29. package/lib/app/auth/index.js +7 -0
  30. package/lib/app/auth/index.js.map +1 -0
  31. package/lib/app/auth/jwt/AuthFlow.d.ts +94 -0
  32. package/lib/app/auth/jwt/AuthFlow.d.ts.map +1 -0
  33. package/lib/app/auth/jwt/AuthFlow.js +127 -0
  34. package/lib/app/auth/jwt/AuthFlow.js.map +1 -0
  35. package/lib/app/auth/jwt/DrizzleRefreshTokenStore.d.ts +80 -0
  36. package/lib/app/auth/jwt/DrizzleRefreshTokenStore.d.ts.map +1 -0
  37. package/lib/app/auth/jwt/DrizzleRefreshTokenStore.js +134 -0
  38. package/lib/app/auth/jwt/DrizzleRefreshTokenStore.js.map +1 -0
  39. package/lib/app/auth/jwt/JwtSigner.d.ts +123 -0
  40. package/lib/app/auth/jwt/JwtSigner.d.ts.map +1 -0
  41. package/lib/app/auth/jwt/JwtSigner.js +118 -0
  42. package/lib/app/auth/jwt/JwtSigner.js.map +1 -0
  43. package/lib/app/auth/jwt/RefreshTokenStore.d.ts +97 -0
  44. package/lib/app/auth/jwt/RefreshTokenStore.d.ts.map +1 -0
  45. package/lib/app/auth/jwt/RefreshTokenStore.js +122 -0
  46. package/lib/app/auth/jwt/RefreshTokenStore.js.map +1 -0
  47. package/lib/app/auth/permissionDefinition.d.ts +20 -0
  48. package/lib/app/auth/permissionDefinition.d.ts.map +1 -0
  49. package/lib/app/auth/permissionDefinition.js +2 -0
  50. package/lib/app/auth/permissionDefinition.js.map +1 -0
  51. package/lib/app/context/RequestContext.d.ts +59 -0
  52. package/lib/app/context/RequestContext.d.ts.map +1 -0
  53. package/lib/app/context/RequestContext.js +25 -0
  54. package/lib/app/context/RequestContext.js.map +1 -0
  55. package/lib/app/db/QueryOptions.d.ts +82 -0
  56. package/lib/app/db/QueryOptions.d.ts.map +1 -0
  57. package/lib/app/db/QueryOptions.js +37 -0
  58. package/lib/app/db/QueryOptions.js.map +1 -0
  59. package/lib/app/db/baseFields.d.ts +60 -0
  60. package/lib/app/db/baseFields.d.ts.map +1 -0
  61. package/lib/app/db/baseFields.js +54 -0
  62. package/lib/app/db/baseFields.js.map +1 -0
  63. package/lib/app/db/buildWhere.d.ts +22 -0
  64. package/lib/app/db/buildWhere.d.ts.map +1 -0
  65. package/lib/app/db/buildWhere.js +75 -0
  66. package/lib/app/db/buildWhere.js.map +1 -0
  67. package/lib/app/db/client.d.ts +111 -0
  68. package/lib/app/db/client.d.ts.map +1 -0
  69. package/lib/app/db/client.js +99 -0
  70. package/lib/app/db/client.js.map +1 -0
  71. package/lib/app/db/tenantScoped.d.ts +59 -0
  72. package/lib/app/db/tenantScoped.d.ts.map +1 -0
  73. package/lib/app/db/tenantScoped.js +54 -0
  74. package/lib/app/db/tenantScoped.js.map +1 -0
  75. package/lib/app/db/transaction.d.ts +58 -0
  76. package/lib/app/db/transaction.d.ts.map +1 -0
  77. package/lib/app/db/transaction.js +106 -0
  78. package/lib/app/db/transaction.js.map +1 -0
  79. package/lib/app/health/HealthCheck.d.ts +121 -0
  80. package/lib/app/health/HealthCheck.d.ts.map +1 -0
  81. package/lib/app/health/HealthCheck.js +151 -0
  82. package/lib/app/health/HealthCheck.js.map +1 -0
  83. package/lib/app/health/redisHealthCheck.d.ts +14 -0
  84. package/lib/app/health/redisHealthCheck.d.ts.map +1 -0
  85. package/lib/app/health/redisHealthCheck.js +21 -0
  86. package/lib/app/health/redisHealthCheck.js.map +1 -0
  87. package/lib/app/lifecycle/Bootstrapper.d.ts +92 -0
  88. package/lib/app/lifecycle/Bootstrapper.d.ts.map +1 -0
  89. package/lib/app/lifecycle/Bootstrapper.js +99 -0
  90. package/lib/app/lifecycle/Bootstrapper.js.map +1 -0
  91. package/lib/app/registry/routes.d.ts +89 -0
  92. package/lib/app/registry/routes.d.ts.map +1 -0
  93. package/lib/app/registry/routes.js +72 -0
  94. package/lib/app/registry/routes.js.map +1 -0
  95. package/lib/app/services/DrizzleEntityService.d.ts +123 -0
  96. package/lib/app/services/DrizzleEntityService.d.ts.map +1 -0
  97. package/lib/app/services/DrizzleEntityService.js +342 -0
  98. package/lib/app/services/DrizzleEntityService.js.map +1 -0
  99. package/lib/app/services/RedisProvider.d.ts +52 -0
  100. package/lib/app/services/RedisProvider.d.ts.map +1 -0
  101. package/lib/app/services/RedisProvider.js +75 -0
  102. package/lib/app/services/RedisProvider.js.map +1 -0
  103. package/lib/app/services/cache/Cache.d.ts +70 -0
  104. package/lib/app/services/cache/Cache.d.ts.map +1 -0
  105. package/lib/app/services/cache/Cache.js +18 -0
  106. package/lib/app/services/cache/Cache.js.map +1 -0
  107. package/lib/app/services/cache/InMemoryCache.d.ts +35 -0
  108. package/lib/app/services/cache/InMemoryCache.d.ts.map +1 -0
  109. package/lib/app/services/cache/InMemoryCache.js +76 -0
  110. package/lib/app/services/cache/InMemoryCache.js.map +1 -0
  111. package/lib/app/services/cache/RedisCache.d.ts +99 -0
  112. package/lib/app/services/cache/RedisCache.d.ts.map +1 -0
  113. package/lib/app/services/cache/RedisCache.js +150 -0
  114. package/lib/app/services/cache/RedisCache.js.map +1 -0
  115. package/lib/app/services/cache/cached.d.ts +30 -0
  116. package/lib/app/services/cache/cached.d.ts.map +1 -0
  117. package/lib/app/services/cache/cached.js +38 -0
  118. package/lib/app/services/cache/cached.js.map +1 -0
  119. package/lib/app/services/cache/index.d.ts +5 -0
  120. package/lib/app/services/cache/index.d.ts.map +1 -0
  121. package/lib/app/services/cache/index.js +4 -0
  122. package/lib/app/services/cache/index.js.map +1 -0
  123. package/lib/app/services/cron/defineCron.d.ts +57 -0
  124. package/lib/app/services/cron/defineCron.d.ts.map +1 -0
  125. package/lib/app/services/cron/defineCron.js +15 -0
  126. package/lib/app/services/cron/defineCron.js.map +1 -0
  127. package/lib/app/services/cron/index.d.ts +2 -0
  128. package/lib/app/services/cron/index.d.ts.map +1 -0
  129. package/lib/app/services/cron/index.js +2 -0
  130. package/lib/app/services/cron/index.js.map +1 -0
  131. package/lib/app/services/hooks/LifecycleHooks.d.ts +61 -0
  132. package/lib/app/services/hooks/LifecycleHooks.d.ts.map +1 -0
  133. package/lib/app/services/hooks/LifecycleHooks.js +85 -0
  134. package/lib/app/services/hooks/LifecycleHooks.js.map +1 -0
  135. package/lib/app/services/jobs/JobsManager.d.ts +67 -0
  136. package/lib/app/services/jobs/JobsManager.d.ts.map +1 -0
  137. package/lib/app/services/jobs/JobsManager.js +121 -0
  138. package/lib/app/services/jobs/JobsManager.js.map +1 -0
  139. package/lib/app/services/jobs/bullBoard.d.ts +72 -0
  140. package/lib/app/services/jobs/bullBoard.d.ts.map +1 -0
  141. package/lib/app/services/jobs/bullBoard.js +96 -0
  142. package/lib/app/services/jobs/bullBoard.js.map +1 -0
  143. package/lib/app/services/jobs/defineJob.d.ts +81 -0
  144. package/lib/app/services/jobs/defineJob.d.ts.map +1 -0
  145. package/lib/app/services/jobs/defineJob.js +49 -0
  146. package/lib/app/services/jobs/defineJob.js.map +1 -0
  147. package/lib/app/services/jobs/index.d.ts +4 -0
  148. package/lib/app/services/jobs/index.d.ts.map +1 -0
  149. package/lib/app/services/jobs/index.js +4 -0
  150. package/lib/app/services/jobs/index.js.map +1 -0
  151. package/lib/app/services/rateLimit/InMemorySlidingWindowBackend.d.ts +23 -0
  152. package/lib/app/services/rateLimit/InMemorySlidingWindowBackend.d.ts.map +1 -0
  153. package/lib/app/services/rateLimit/InMemorySlidingWindowBackend.js +51 -0
  154. package/lib/app/services/rateLimit/InMemorySlidingWindowBackend.js.map +1 -0
  155. package/lib/app/services/rateLimit/RateLimitBackend.d.ts +41 -0
  156. package/lib/app/services/rateLimit/RateLimitBackend.d.ts.map +1 -0
  157. package/lib/app/services/rateLimit/RateLimitBackend.js +19 -0
  158. package/lib/app/services/rateLimit/RateLimitBackend.js.map +1 -0
  159. package/lib/app/services/rateLimit/RedisSlidingWindowBackend.d.ts +16 -0
  160. package/lib/app/services/rateLimit/RedisSlidingWindowBackend.d.ts.map +1 -0
  161. package/lib/app/services/rateLimit/RedisSlidingWindowBackend.js +80 -0
  162. package/lib/app/services/rateLimit/RedisSlidingWindowBackend.js.map +1 -0
  163. package/lib/app/services/rateLimit/index.d.ts +4 -0
  164. package/lib/app/services/rateLimit/index.d.ts.map +1 -0
  165. package/lib/app/services/rateLimit/index.js +3 -0
  166. package/lib/app/services/rateLimit/index.js.map +1 -0
  167. package/lib/app/services/storage/DiskStorageAdapter.d.ts +62 -0
  168. package/lib/app/services/storage/DiskStorageAdapter.d.ts.map +1 -0
  169. package/lib/app/services/storage/DiskStorageAdapter.js +295 -0
  170. package/lib/app/services/storage/DiskStorageAdapter.js.map +1 -0
  171. package/lib/app/services/storage/GCSStorageAdapter.d.ts +44 -0
  172. package/lib/app/services/storage/GCSStorageAdapter.d.ts.map +1 -0
  173. package/lib/app/services/storage/GCSStorageAdapter.js +133 -0
  174. package/lib/app/services/storage/GCSStorageAdapter.js.map +1 -0
  175. package/lib/app/services/storage/S3StorageAdapter.d.ts +57 -0
  176. package/lib/app/services/storage/S3StorageAdapter.d.ts.map +1 -0
  177. package/lib/app/services/storage/S3StorageAdapter.js +162 -0
  178. package/lib/app/services/storage/S3StorageAdapter.js.map +1 -0
  179. package/lib/app/services/storage/StorageService.d.ts +88 -0
  180. package/lib/app/services/storage/StorageService.d.ts.map +1 -0
  181. package/lib/app/services/storage/StorageService.js +18 -0
  182. package/lib/app/services/storage/StorageService.js.map +1 -0
  183. package/lib/app/services/storage/index.d.ts +5 -0
  184. package/lib/app/services/storage/index.d.ts.map +1 -0
  185. package/lib/app/services/storage/index.js +4 -0
  186. package/lib/app/services/storage/index.js.map +1 -0
  187. package/lib/app/utils/ContextValidators.d.ts +46 -0
  188. package/lib/app/utils/ContextValidators.d.ts.map +1 -0
  189. package/lib/app/utils/ContextValidators.js +81 -0
  190. package/lib/app/utils/ContextValidators.js.map +1 -0
  191. package/lib/app/utils/defineEnv.d.ts +80 -0
  192. package/lib/app/utils/defineEnv.d.ts.map +1 -0
  193. package/lib/app/utils/defineEnv.js +95 -0
  194. package/lib/app/utils/defineEnv.js.map +1 -0
  195. package/lib/client.d.ts +139 -0
  196. package/lib/client.d.ts.map +1 -0
  197. package/lib/client.js +98 -0
  198. package/lib/client.js.map +1 -0
  199. package/lib/contract/application.d.ts +3 -0
  200. package/lib/contract/application.d.ts.map +1 -0
  201. package/lib/contract/application.js +2 -0
  202. package/lib/contract/application.js.map +1 -0
  203. package/lib/contract/client.d.ts +3 -0
  204. package/lib/contract/client.d.ts.map +1 -0
  205. package/lib/contract/client.js +3 -0
  206. package/lib/contract/client.js.map +1 -0
  207. package/lib/contract/index.d.ts +3 -0
  208. package/lib/contract/index.d.ts.map +1 -0
  209. package/lib/contract/index.js +3 -0
  210. package/lib/contract/index.js.map +1 -0
  211. package/lib/contract/manifest.d.ts +3 -0
  212. package/lib/contract/manifest.d.ts.map +1 -0
  213. package/lib/contract/manifest.js +2 -0
  214. package/lib/contract/manifest.js.map +1 -0
  215. package/lib/contract/openapi.d.ts +3 -0
  216. package/lib/contract/openapi.d.ts.map +1 -0
  217. package/lib/contract/openapi.js +3 -0
  218. package/lib/contract/openapi.js.map +1 -0
  219. package/lib/contract/project.d.ts +3 -0
  220. package/lib/contract/project.d.ts.map +1 -0
  221. package/lib/contract/project.js +3 -0
  222. package/lib/contract/project.js.map +1 -0
  223. package/lib/contract/schema.d.ts +3 -0
  224. package/lib/contract/schema.d.ts.map +1 -0
  225. package/lib/contract/schema.js +3 -0
  226. package/lib/contract/schema.js.map +1 -0
  227. package/lib/drizzle/index.d.ts +3 -0
  228. package/lib/drizzle/index.d.ts.map +1 -0
  229. package/lib/drizzle/index.js +3 -0
  230. package/lib/drizzle/index.js.map +1 -0
  231. package/lib/hono/auth.d.ts +6 -0
  232. package/lib/hono/auth.d.ts.map +1 -0
  233. package/lib/hono/auth.js +54 -0
  234. package/lib/hono/auth.js.map +1 -0
  235. package/lib/hono/index.d.ts +4 -0
  236. package/lib/hono/index.d.ts.map +1 -0
  237. package/lib/hono/index.js +4 -0
  238. package/lib/hono/index.js.map +1 -0
  239. package/lib/http/app/createApp.d.ts +132 -0
  240. package/lib/http/app/createApp.d.ts.map +1 -0
  241. package/lib/http/app/createApp.js +215 -0
  242. package/lib/http/app/createApp.js.map +1 -0
  243. package/lib/http/app/devRoutes.d.ts +31 -0
  244. package/lib/http/app/devRoutes.d.ts.map +1 -0
  245. package/lib/http/app/devRoutes.js +145 -0
  246. package/lib/http/app/devRoutes.js.map +1 -0
  247. package/lib/http/app/errors.d.ts +45 -0
  248. package/lib/http/app/errors.d.ts.map +1 -0
  249. package/lib/http/app/errors.js +93 -0
  250. package/lib/http/app/errors.js.map +1 -0
  251. package/lib/http/app/health.d.ts +66 -0
  252. package/lib/http/app/health.d.ts.map +1 -0
  253. package/lib/http/app/health.js +104 -0
  254. package/lib/http/app/health.js.map +1 -0
  255. package/lib/http/errors/AppError.d.ts +10 -0
  256. package/lib/http/errors/AppError.d.ts.map +1 -0
  257. package/lib/http/errors/AppError.js +19 -0
  258. package/lib/http/errors/AppError.js.map +1 -0
  259. package/lib/http/errors/AuthenticationError.d.ts +8 -0
  260. package/lib/http/errors/AuthenticationError.d.ts.map +1 -0
  261. package/lib/http/errors/AuthenticationError.js +10 -0
  262. package/lib/http/errors/AuthenticationError.js.map +1 -0
  263. package/lib/http/errors/AuthorizationError.d.ts +8 -0
  264. package/lib/http/errors/AuthorizationError.d.ts.map +1 -0
  265. package/lib/http/errors/AuthorizationError.js +10 -0
  266. package/lib/http/errors/AuthorizationError.js.map +1 -0
  267. package/lib/http/errors/BadRequestError.d.ts +8 -0
  268. package/lib/http/errors/BadRequestError.d.ts.map +1 -0
  269. package/lib/http/errors/BadRequestError.js +10 -0
  270. package/lib/http/errors/BadRequestError.js.map +1 -0
  271. package/lib/http/errors/ConflictError.d.ts +8 -0
  272. package/lib/http/errors/ConflictError.d.ts.map +1 -0
  273. package/lib/http/errors/ConflictError.js +10 -0
  274. package/lib/http/errors/ConflictError.js.map +1 -0
  275. package/lib/http/errors/InternalServerError.d.ts +8 -0
  276. package/lib/http/errors/InternalServerError.d.ts.map +1 -0
  277. package/lib/http/errors/InternalServerError.js +10 -0
  278. package/lib/http/errors/InternalServerError.js.map +1 -0
  279. package/lib/http/errors/NotFoundError.d.ts +8 -0
  280. package/lib/http/errors/NotFoundError.d.ts.map +1 -0
  281. package/lib/http/errors/NotFoundError.js +10 -0
  282. package/lib/http/errors/NotFoundError.js.map +1 -0
  283. package/lib/http/errors/RateLimitError.d.ts +13 -0
  284. package/lib/http/errors/RateLimitError.d.ts.map +1 -0
  285. package/lib/http/errors/RateLimitError.js +16 -0
  286. package/lib/http/errors/RateLimitError.js.map +1 -0
  287. package/lib/http/errors/ServiceUnavailableError.d.ts +8 -0
  288. package/lib/http/errors/ServiceUnavailableError.d.ts.map +1 -0
  289. package/lib/http/errors/ServiceUnavailableError.js +10 -0
  290. package/lib/http/errors/ServiceUnavailableError.js.map +1 -0
  291. package/lib/http/errors/ValidationError.d.ts +9 -0
  292. package/lib/http/errors/ValidationError.d.ts.map +1 -0
  293. package/lib/http/errors/ValidationError.js +12 -0
  294. package/lib/http/errors/ValidationError.js.map +1 -0
  295. package/lib/http/errors/index.d.ts +11 -0
  296. package/lib/http/errors/index.d.ts.map +1 -0
  297. package/lib/http/errors/index.js +12 -0
  298. package/lib/http/errors/index.js.map +1 -0
  299. package/lib/http/middleware/apiKey.d.ts +9 -0
  300. package/lib/http/middleware/apiKey.d.ts.map +1 -0
  301. package/lib/http/middleware/apiKey.js +71 -0
  302. package/lib/http/middleware/apiKey.js.map +1 -0
  303. package/lib/http/middleware/csrf.d.ts +63 -0
  304. package/lib/http/middleware/csrf.d.ts.map +1 -0
  305. package/lib/http/middleware/csrf.js +169 -0
  306. package/lib/http/middleware/csrf.js.map +1 -0
  307. package/lib/http/middleware/httpLogger.d.ts +39 -0
  308. package/lib/http/middleware/httpLogger.d.ts.map +1 -0
  309. package/lib/http/middleware/httpLogger.js +118 -0
  310. package/lib/http/middleware/httpLogger.js.map +1 -0
  311. package/lib/http/middleware/idempotency.d.ts +48 -0
  312. package/lib/http/middleware/idempotency.d.ts.map +1 -0
  313. package/lib/http/middleware/idempotency.js +180 -0
  314. package/lib/http/middleware/idempotency.js.map +1 -0
  315. package/lib/http/middleware/rateLimit.d.ts +105 -0
  316. package/lib/http/middleware/rateLimit.d.ts.map +1 -0
  317. package/lib/http/middleware/rateLimit.js +84 -0
  318. package/lib/http/middleware/rateLimit.js.map +1 -0
  319. package/lib/http/middleware/requireAuth.d.ts +58 -0
  320. package/lib/http/middleware/requireAuth.d.ts.map +1 -0
  321. package/lib/http/middleware/requireAuth.js +63 -0
  322. package/lib/http/middleware/requireAuth.js.map +1 -0
  323. package/lib/http/middleware/requirePermission.d.ts +23 -0
  324. package/lib/http/middleware/requirePermission.d.ts.map +1 -0
  325. package/lib/http/middleware/requirePermission.js +50 -0
  326. package/lib/http/middleware/requirePermission.js.map +1 -0
  327. package/lib/http/middleware/resolveTenant.d.ts +41 -0
  328. package/lib/http/middleware/resolveTenant.d.ts.map +1 -0
  329. package/lib/http/middleware/resolveTenant.js +17 -0
  330. package/lib/http/middleware/resolveTenant.js.map +1 -0
  331. package/lib/http/streaming/sse.d.ts +31 -0
  332. package/lib/http/streaming/sse.d.ts.map +1 -0
  333. package/lib/http/streaming/sse.js +11 -0
  334. package/lib/http/streaming/sse.js.map +1 -0
  335. package/lib/http/streaming/streamLLM.d.ts +94 -0
  336. package/lib/http/streaming/streamLLM.d.ts.map +1 -0
  337. package/lib/http/streaming/streamLLM.js +94 -0
  338. package/lib/http/streaming/streamLLM.js.map +1 -0
  339. package/lib/http/utils/authCookies.d.ts +74 -0
  340. package/lib/http/utils/authCookies.d.ts.map +1 -0
  341. package/lib/http/utils/authCookies.js +102 -0
  342. package/lib/http/utils/authCookies.js.map +1 -0
  343. package/lib/http/utils/clientIp.d.ts +85 -0
  344. package/lib/http/utils/clientIp.d.ts.map +1 -0
  345. package/lib/http/utils/clientIp.js +249 -0
  346. package/lib/http/utils/clientIp.js.map +1 -0
  347. package/lib/http/utils/index.d.ts +4 -0
  348. package/lib/http/utils/index.d.ts.map +1 -0
  349. package/lib/http/utils/index.js +5 -0
  350. package/lib/http/utils/index.js.map +1 -0
  351. package/lib/http/utils/metaTags.d.ts +49 -0
  352. package/lib/http/utils/metaTags.d.ts.map +1 -0
  353. package/lib/http/utils/metaTags.js +32 -0
  354. package/lib/http/utils/metaTags.js.map +1 -0
  355. package/lib/http/utils/publicSuffix.d.ts +34 -0
  356. package/lib/http/utils/publicSuffix.d.ts.map +1 -0
  357. package/lib/http/utils/publicSuffix.js +276 -0
  358. package/lib/http/utils/publicSuffix.js.map +1 -0
  359. package/lib/http/utils/uploads.d.ts +92 -0
  360. package/lib/http/utils/uploads.d.ts.map +1 -0
  361. package/lib/http/utils/uploads.js +126 -0
  362. package/lib/http/utils/uploads.js.map +1 -0
  363. package/lib/http/utils/validate.d.ts +41 -0
  364. package/lib/http/utils/validate.d.ts.map +1 -0
  365. package/lib/http/utils/validate.js +55 -0
  366. package/lib/http/utils/validate.js.map +1 -0
  367. package/lib/http/utils/webhooks.d.ts +63 -0
  368. package/lib/http/utils/webhooks.d.ts.map +1 -0
  369. package/lib/http/utils/webhooks.js +133 -0
  370. package/lib/http/utils/webhooks.js.map +1 -0
  371. package/lib/http/ws/auth.d.ts +46 -0
  372. package/lib/http/ws/auth.d.ts.map +1 -0
  373. package/lib/http/ws/auth.js +123 -0
  374. package/lib/http/ws/auth.js.map +1 -0
  375. package/lib/index.d.ts +80 -0
  376. package/lib/index.d.ts.map +1 -0
  377. package/lib/index.js +61 -0
  378. package/lib/index.js.map +1 -0
  379. package/lib/kernel/index.d.ts +3 -0
  380. package/lib/kernel/index.d.ts.map +1 -0
  381. package/lib/kernel/index.js +3 -0
  382. package/lib/kernel/index.js.map +1 -0
  383. package/lib/libraries/.gitkeep +0 -0
  384. package/lib/libraries/ai/CHANGELOG.md +17 -0
  385. package/lib/libraries/ai/README.md +164 -0
  386. package/lib/libraries/ai/adapters/AnthropicAdapter.ts +382 -0
  387. package/lib/libraries/ai/adapters/LLMProvider.ts +76 -0
  388. package/lib/libraries/ai/adapters/OpenAIAdapter.ts +466 -0
  389. package/lib/libraries/ai/experimental/index.ts +20 -0
  390. package/lib/libraries/ai/index.ts +128 -0
  391. package/lib/libraries/ai/library.json +19 -0
  392. package/lib/libraries/ai/loop/agentLoop.ts +377 -0
  393. package/lib/libraries/ai/prompts/definePrompt.ts +0 -0
  394. package/lib/libraries/ai/rag/retrieveAndAnswer.ts +177 -0
  395. package/lib/libraries/ai/streaming/streamLLM.ts +94 -0
  396. package/lib/libraries/ai/structured/completeStructured.ts +143 -0
  397. package/lib/libraries/ai/tokens/Tokenizer.ts +216 -0
  398. package/lib/libraries/ai/tools/defineTool.ts +208 -0
  399. package/lib/libraries/ai/types.ts +260 -0
  400. package/lib/libraries/chunking/ChunkingService.ts +103 -0
  401. package/lib/libraries/chunking/README.md +104 -0
  402. package/lib/libraries/chunking/docs/api-reference.md +549 -0
  403. package/lib/libraries/chunking/docs/best-practices.md +321 -0
  404. package/lib/libraries/chunking/docs/code-organization.md +538 -0
  405. package/lib/libraries/chunking/docs/configuration.md +418 -0
  406. package/lib/libraries/chunking/docs/index.md +236 -0
  407. package/lib/libraries/chunking/docs/quick-start.md +298 -0
  408. package/lib/libraries/chunking/docs/strategies.md +407 -0
  409. package/lib/libraries/chunking/docs/summary.md +258 -0
  410. package/lib/libraries/chunking/docs/troubleshooting.md +527 -0
  411. package/lib/libraries/chunking/index.ts +17 -0
  412. package/lib/libraries/chunking/library.json +16 -0
  413. package/lib/libraries/chunking/strategies/ChunkingStrategy.ts +13 -0
  414. package/lib/libraries/chunking/strategies/FixedLengthChunkingStrategy.ts +88 -0
  415. package/lib/libraries/chunking/strategies/SemanticChunkingStrategy.ts +389 -0
  416. package/lib/libraries/chunking/strategies/SlidingWindowChunkingStrategy.ts +258 -0
  417. package/lib/libraries/chunking/types/index.ts +63 -0
  418. package/lib/libraries/email/EmailService.ts +591 -0
  419. package/lib/libraries/email/README.md +777 -0
  420. package/lib/libraries/email/TemplateRegistry.ts +148 -0
  421. package/lib/libraries/email/TemplateRenderer.ts +273 -0
  422. package/lib/libraries/email/index.ts +4 -0
  423. package/lib/libraries/email/initializeEmailService.ts +60 -0
  424. package/lib/libraries/email/library.json +12 -0
  425. package/lib/libraries/email/types/EmailAddress.ts +4 -0
  426. package/lib/libraries/email/types/EmailAttachment.ts +11 -0
  427. package/lib/libraries/email/types/EmailTag.ts +9 -0
  428. package/lib/libraries/email/types/EmailTemplate.ts +124 -0
  429. package/lib/libraries/email/types/SendBatchEmailsOptions.ts +9 -0
  430. package/lib/libraries/email/types/SendBatchEmailsResult.ts +9 -0
  431. package/lib/libraries/email/types/SendEmailOptions.ts +33 -0
  432. package/lib/libraries/email/types/SendEmailResult.ts +9 -0
  433. package/lib/libraries/email/types/index.ts +8 -0
  434. package/lib/libraries/weaviate/QueryBuilder.ts +292 -0
  435. package/lib/libraries/weaviate/README.md +284 -0
  436. package/lib/libraries/weaviate/Weaviate.ts +1419 -0
  437. package/lib/libraries/weaviate/WeaviateConfig.ts +268 -0
  438. package/lib/libraries/weaviate/docs/.gitkeep +1 -0
  439. package/lib/libraries/weaviate/docs/API_REFERENCE.md +1067 -0
  440. package/lib/libraries/weaviate/docs/CONFIGURATION.md +320 -0
  441. package/lib/libraries/weaviate/docs/ERROR_HANDLING.md +271 -0
  442. package/lib/libraries/weaviate/docs/MULTI_TENANCY.md +348 -0
  443. package/lib/libraries/weaviate/docs/PERFORMANCE.md +602 -0
  444. package/lib/libraries/weaviate/docs/PLUGIN_DEVELOPMENT.md +547 -0
  445. package/lib/libraries/weaviate/docs/QUICK_START.md +443 -0
  446. package/lib/libraries/weaviate/docs/README.md +269 -0
  447. package/lib/libraries/weaviate/docs/SCHEMA_GUIDE.md +630 -0
  448. package/lib/libraries/weaviate/docs/WEAVIATE_README.md +520 -0
  449. package/lib/libraries/weaviate/errors/WeaviateError.ts +92 -0
  450. package/lib/libraries/weaviate/errors/index.ts +1 -0
  451. package/lib/libraries/weaviate/index.ts +35 -0
  452. package/lib/libraries/weaviate/library.json +26 -0
  453. package/lib/libraries/weaviate/plugins/index.ts +2 -0
  454. package/lib/libraries/weaviate/schemas/SchemaRegistry.ts +284 -0
  455. package/lib/libraries/weaviate/schemas/index.ts +2 -0
  456. package/lib/libraries/weaviate/types/BM25SearchOptions.ts +9 -0
  457. package/lib/libraries/weaviate/types/ExtendedWeaviateClient.ts +7 -0
  458. package/lib/libraries/weaviate/types/HybridSearchOptions.ts +11 -0
  459. package/lib/libraries/weaviate/types/MultiTenancy.ts +81 -0
  460. package/lib/libraries/weaviate/types/Plugin.ts +17 -0
  461. package/lib/libraries/weaviate/types/SchemaConfig.ts +25 -0
  462. package/lib/libraries/weaviate/types/SearchMethod.ts +8 -0
  463. package/lib/libraries/weaviate/types/SearchOptions.ts +16 -0
  464. package/lib/libraries/weaviate/types/SearchRequest.ts +19 -0
  465. package/lib/libraries/weaviate/types/SearchResult.ts +16 -0
  466. package/lib/libraries/weaviate/types/SearchableField.ts +87 -0
  467. package/lib/libraries/weaviate/types/VectorIndexConfig.ts +19 -0
  468. package/lib/libraries/weaviate/types/VectorSearchOptions.ts +18 -0
  469. package/lib/libraries/weaviate/types/VectorizerConfig.ts +8 -0
  470. package/lib/libraries/weaviate/types/index.ts +29 -0
  471. package/lib/libraries/weaviate/utils/TenantContextManager.ts +94 -0
  472. package/lib/modules/accounts/index.ts +47 -0
  473. package/lib/modules/accounts/module.json +15 -0
  474. package/lib/modules/accounts/permissions.ts +33 -0
  475. package/lib/modules/accounts/routes.ts +200 -0
  476. package/lib/modules/accounts/schema.ts +219 -0
  477. package/lib/modules/accounts/services/AccountService.ts +44 -0
  478. package/lib/modules/accounts/validation/schemas.ts +70 -0
  479. package/lib/modules/oauth/adapters/GmailOAuthAdapter.ts +35 -0
  480. package/lib/modules/oauth/adapters/GoogleOAuthAdapter.ts +278 -0
  481. package/lib/modules/oauth/adapters/MicrosoftOAuthAdapter.ts +269 -0
  482. package/lib/modules/oauth/adapters/MockOAuthAdapter.ts +138 -0
  483. package/lib/modules/oauth/adapters/OAuthAdapter.ts +211 -0
  484. package/lib/modules/oauth/adapters/OAuthAdapterRegistry.ts +77 -0
  485. package/lib/modules/oauth/adapters/OutlookOAuthAdapter.ts +38 -0
  486. package/lib/modules/oauth/index.ts +79 -0
  487. package/lib/modules/oauth/module.json +23 -0
  488. package/lib/modules/oauth/permissions.ts +39 -0
  489. package/lib/modules/oauth/routes.ts +497 -0
  490. package/lib/modules/oauth/schema.ts +127 -0
  491. package/lib/modules/oauth/services/OAuthConnectionService.ts +147 -0
  492. package/lib/modules/oauth/state.ts +234 -0
  493. package/lib/modules/oauth/stateJtiCache.ts +85 -0
  494. package/lib/modules/oauth/verifyIdToken.ts +178 -0
  495. package/lib/modules/outbox/EventEmitter.ts +106 -0
  496. package/lib/modules/outbox/OutboxDrainer.ts +163 -0
  497. package/lib/modules/outbox/handlers/EventHandler.ts +115 -0
  498. package/lib/modules/outbox/index.ts +43 -0
  499. package/lib/modules/outbox/module.json +15 -0
  500. package/lib/modules/outbox/permissions.ts +36 -0
  501. package/lib/modules/outbox/routes.ts +219 -0
  502. package/lib/modules/outbox/schema.ts +207 -0
  503. package/lib/modules/outbox/services/OutboxEventService.ts +223 -0
  504. package/lib/observability/logger.d.ts +30 -0
  505. package/lib/observability/logger.d.ts.map +1 -0
  506. package/lib/observability/logger.js +110 -0
  507. package/lib/observability/logger.js.map +1 -0
  508. package/lib/observability/metrics.d.ts +3 -0
  509. package/lib/observability/metrics.d.ts.map +1 -0
  510. package/lib/observability/metrics.js +3 -0
  511. package/lib/observability/metrics.js.map +1 -0
  512. package/lib/observability/otel.d.ts +3 -0
  513. package/lib/observability/otel.d.ts.map +1 -0
  514. package/lib/observability/otel.js +3 -0
  515. package/lib/observability/otel.js.map +1 -0
  516. package/lib/observability/safeErrorFields.d.ts +14 -0
  517. package/lib/observability/safeErrorFields.d.ts.map +1 -0
  518. package/lib/observability/safeErrorFields.js +14 -0
  519. package/lib/observability/safeErrorFields.js.map +1 -0
  520. package/lib/observability/tracing.d.ts +3 -0
  521. package/lib/observability/tracing.d.ts.map +1 -0
  522. package/lib/observability/tracing.js +3 -0
  523. package/lib/observability/tracing.js.map +1 -0
  524. package/lib/package.json +4 -0
  525. package/lib/testing.d.ts +3 -0
  526. package/lib/testing.d.ts.map +1 -0
  527. package/lib/testing.js +3 -0
  528. package/lib/testing.js.map +1 -0
  529. package/package.json +193 -3
  530. package/templates/default/.claude/agents/qa-brief.md +106 -0
  531. package/templates/default/.claude/commands/sherpa-brief.md +23 -0
  532. package/templates/default/.cursor/rules/api.mdc +80 -0
  533. package/templates/default/.cursor/rules/commits.mdc +88 -0
  534. package/templates/default/.cursor/rules/security.mdc +92 -0
  535. package/templates/default/.cursor/rules/testing.mdc +123 -0
  536. package/templates/default/.cursor/rules/typescript.mdc +86 -0
  537. package/templates/default/.env.example +79 -0
  538. package/templates/default/.github/workflows/sherpa-brief.yml +180 -0
  539. package/templates/default/AGENTS.md +166 -0
  540. package/templates/default/CLAUDE.md +17 -0
  541. package/templates/default/README.md +97 -0
  542. package/templates/default/_gitignore +27 -0
  543. package/templates/default/docker-compose.yml +83 -0
  544. package/templates/default/drizzle.config.ts +34 -0
  545. package/templates/default/eslint.config.mjs +106 -0
  546. package/templates/default/package.json +57 -0
  547. package/templates/default/ship-api.config.ts +21 -0
  548. package/templates/default/src/client.ts +34 -0
  549. package/templates/default/src/config/modules.ts +23 -0
  550. package/templates/default/src/db/schema.ts +26 -0
  551. package/templates/default/src/environment.ts +81 -0
  552. package/templates/default/src/index.test.ts +53 -0
  553. package/templates/default/src/index.ts +11 -0
  554. package/templates/default/src/instrumentation.ts +13 -0
  555. package/templates/default/src/server.ts +90 -0
  556. package/templates/default/tsconfig.json +24 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,608 @@
1
+ # @sixthsummit/ship-api
2
+
3
+ ## 4.1.1-alpha-20261013055832
4
+
5
+ ### Patch Changes
6
+
7
+ - 8f71663: License the framework under Apache-2.0, include LICENSE and NOTICE in published packages, and update package documentation.
8
+
9
+ Remove application-specific documentation and replace client-derived regression fixtures with synthetic framework examples.
10
+ - Initial npm snapshot bootstrap.
11
+ - 6cac2d2: Require patched Hono releases and prepare public npm distribution under the existing package names.
12
+ - Updated dependencies [8f71663]
13
+ - Updated dependencies [8f71663]
14
+ - Updated dependencies
15
+ - Updated dependencies [6cac2d2]
16
+ - @sixthsummit/ship-hono@1.2.0-alpha-20261013055832
17
+ - @sixthsummit/ship-drizzle@1.2.0-alpha-20261013055832
18
+ - @sixthsummit/ship-contract@1.3.0-alpha-20261013055832
19
+ - @sixthsummit/ship-cli@1.2.0-alpha-20261013055832
20
+ - @sixthsummit/ship-observability-otel@1.2.0-alpha-20261013055832
21
+ - @sixthsummit/ship-testing@1.2.0-alpha-20261013055832
22
+ - @sixthsummit/ship-core@1.1.1-alpha-20261013055832
23
+
24
+ ## 4.1.0
25
+
26
+ ### Minor Changes
27
+
28
+ - [#172](https://github.com/SixthSummit/ship-api/pull/172) [`5336fc3`](https://github.com/SixthSummit/ship-api/commit/5336fc3b413d13859b0793209df4289495d6d49d) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - `createApp()` now mounts `GET /livez` and `GET /readyz` by default, and `createDb()` registers a `db.primary` readiness check. Apps that shipped without health routes get them on upgrade with no code change.
29
+
30
+ - **Default routes.** The routes are mounted unauthenticated, before any route or middleware the app adds, and are kept out of the route registry. Configure them with `createApp({ health: { prefix, readyzTimeoutMs, registry } })` or opt out with `createApp({ health: false })`. `/healthz` is deliberately not mounted, because Google Cloud Run's front end intercepts that path.
31
+ - **Existing `registerHealthRoutes(app)` calls keep working.** On an app that already has the routes the call mounts nothing and never throws. A `registry` or `readyzTimeoutMs` it passes is applied to the mounted routes, so an app that hands in its own registry keeps its checks. A different `prefix` is ignored with a warning; move it to `createApp({ health: { prefix } })`. `hasHealthRoutes(app)` reports whether an app has them.
32
+ - **Default `db.primary` check.** `createDb()` adds a check that runs `select 1` on its pool and reports real latency. Opt out with `createDb({ ..., healthCheck: false })` (for secondary pools, say), or rename it with `healthCheck: { name }`. The check is also exported as `dbHealthCheck(pool)` from `@sixthsummit/ship-api/app/db/client`.
33
+ - **Duplicate check names no longer throw.** `HealthCheckRegistry.add()` used to throw on a duplicate name. Now the first registration wins and later ones are skipped, and `add()` returns `false`. The exception is a check added with `{ replaceable: true }`, which `createDb` uses: a later explicit registration of the same name replaces it. So an app that registers its own `db.primary` after `createDb()` runs exactly one check, its own.
34
+ - **`/readyz` no longer returns raw error text.** A failed check now reports only `name`, `ok`, `latencyMs` and `error: "timeout"` or `"unavailable"`. Check `details` are no longer included in the body either. Previously the thrown message, which for a database error can include the host, port or user, was returned on a public endpoint. Failures are logged server-side as a warn-level `Readiness check failed` line: a thrown error contributes only its `errorCode` / `errorName` / `syscall`, never the message, and a returned `error` string is logged as `reason`. `runAll()` still returns the raw `error` and `details` to direct callers, and its new `onCheckFailure` option receives the raw error.
35
+ - `registerHealthRoutes`, `hasHealthRoutes` and `redisHealthCheck` are now exported from the package root, as the docs already showed.
36
+
37
+ Upgrade notes: an app that defines its own `GET /livez` or `GET /readyz` after `createApp()` is now shadowed by the framework's route, so delete yours or pass `health: false`. Middleware registered before a manual `registerHealthRoutes` call, such as `httpLogger`, no longer runs for the health routes. Tests that assert the raw error string in a `/readyz` body, or that rely on `add()` throwing on duplicates, need updating.
38
+
39
+ ### Patch Changes
40
+
41
+ - [#175](https://github.com/SixthSummit/ship-api/pull/175) [`b621658`](https://github.com/SixthSummit/ship-api/commit/b6216588fe38180a9008e95df9b4e3d4994d9d7b) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Keep `ActorResolution` as the 1.0 contract: a successful resolution's `actor` is always an `OperationActor` with a `kind`. The previous change widened it to accept kind-less actors, which broke code that passes `resolver.resolve(...)`'s actor on as an `OperationActor` (TS2322).
42
+
43
+ Resolver authors still get the leniency: `defineActorResolver()` now takes an `ActorResolverDefinition`, whose `resolve` may return an `ActorResolutionResult` with a ship-core 1.0 actor, and the returned resolver normalises every result (missing `kind` becomes `human`) before any caller sees it. An invalid result is still passed through for the request boundary to reject. `isActorResolution()` now guards `ActorResolutionResult`; `NormalizedActorResolution` is a deprecated alias of `ActorResolution`.
44
+
45
+ - [#173](https://github.com/SixthSummit/ship-api/pull/173) [`208b4a9`](https://github.com/SixthSummit/ship-api/commit/208b4a92e0aa959d426d1c36adfa71402aa0b1d0) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Deprecate configuring health routes after `createApp`. Since `createApp` mounts `/livez` and `/readyz` by default, a later `registerHealthRoutes(app, { registry })` or `{ readyzTimeoutMs }` still updates the mounted routes, so existing apps keep their checks, but it now logs a one-time warning per app. Pass those options to `createApp({ health: { … } })` instead; late configuration will be removed in the next major version. A bare `registerHealthRoutes(app)` with no options is unaffected and stays silent.
46
+
47
+ - [#174](https://github.com/SixthSummit/ship-api/pull/174) [`446914d`](https://github.com/SixthSummit/ship-api/commit/446914d9c31c56ce747e0b545bad485c49f0ca7c) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Keep actors without `kind` working within 1.x, so authenticated requests no longer fail with 500 when an older adapter is in the tree.
48
+
49
+ An actor built on ship-core 1.0 has no `kind`. ship-auth-firebase 1.0 rebuilds the actor its `resolveActor` returns with its own ship-core copy, which npm nests next to a prerelease ship-core 1.1, so the HTTP adapter received a kind-less actor, rejected the resolution as "an invalid result" and answered 500 (including where the right answer was 403).
50
+
51
+ - `@sixthsummit/ship-core`: new `normalizeActorResolution()` and `normalizeOperationActor()` fill in `kind: "human"` for a kind-less actor before validating it, and `isActorResolution()` accepts such resolutions. A kind-less actor can never carry `provider` or `onBehalfOf`, so it can't claim system or provider status. `executor.run()` normalises its `actor` option the same way. Resolver results and `executor.run()` take the new `OperationActorInput` type (`OperationActor | LegacyOperationActor`), so 1.0-typed resolvers compile again. `OperationActor`, which handlers see, still always has `kind`.
52
+ - `@sixthsummit/ship-hono` and `@sixthsummit/ship-realtime-socketio`: normalise the resolver result, then validate it. Permission and actor-kind denials stay 403.
53
+ - `@sixthsummit/ship-auth-firebase`: released alongside, so it depends on ship-core and ship-hono 1.1 and no longer pulls in nested 1.0 copies. `resolveActor` may return a kind-less actor.
54
+ - `@sixthsummit/ship-api`: re-exports the new helpers and types.
55
+
56
+ - [#171](https://github.com/SixthSummit/ship-api/pull/171) [`ee68fdb`](https://github.com/SixthSummit/ship-api/commit/ee68fdbeadf95d0d370430d2b5e2652b53e8585e) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Stop a dropped idle database connection from crashing the process. `createPool` and `createDb` now attach the pool `error` listener that `pg` requires: when Cloud SQL restarts, fails over or runs maintenance, Postgres ends idle connections with `57P01`, and without a listener Node exits on the uncaught event. The pool discards the broken client and logs a warning carrying only the error's `errorCode`, `errorName` and `syscall` (the raw message can include connection details). `handleIdleClientErrors(pool)` is exported from `app/db/client` for pools built directly with `new pg.Pool()`, such as migration scripts; a pool that already has an `error` listener is left alone.
57
+
58
+ - [#174](https://github.com/SixthSummit/ship-api/pull/174) [`446914d`](https://github.com/SixthSummit/ship-api/commit/446914d9c31c56ce747e0b545bad485c49f0ca7c) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Log why a readiness check that returned a failure failed. A check that returns `{ ok: false, error: "..." }` (the documented shape) used to leave no cause in either the `/readyz` body or the log. The warn-level `Readiness check failed` line now includes that string as `reason`, truncated to 200 characters. The string is written by the app author, so it must not contain secrets. Thrown errors are still logged by `errorCode` / `errorName` / `syscall` only, never the message. The `/readyz` body stays generic. `HealthCheckFailure` gains an optional `reason` field for `runAll({ onCheckFailure })` callers.
59
+
60
+ The pool's idle-connection error log now uses the same field names as the readiness log (`errorCode`, `errorName`, `syscall`) instead of `code` / `errorName`.
61
+
62
+ - [#156](https://github.com/SixthSummit/ship-api/pull/156) [`d63141b`](https://github.com/SixthSummit/ship-api/commit/d63141bc5ec0267813c72c64db9dc0382ee8d071) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Expose the Redis and in-memory sliding-window backends through the stable `@sixthsummit/ship-api/rate-limit` subpath.
63
+
64
+ - [#129](https://github.com/SixthSummit/ship-api/pull/129) [`da6920e`](https://github.com/SixthSummit/ship-api/commit/da6920efd6525ce6de43e94fb51d7adf2474d2c5) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Move the `ship-api create` scaffold template's `@sixthsummit/ship-observability-otel`
65
+ pin from `^0.1.0-alpha.0` to the published stable `^1.0.0`, and make the MCP
66
+ server advertise its own `package.json` version to clients instead of a
67
+ hard-coded `0.1.0-alpha.0` default.
68
+
69
+ - [#133](https://github.com/SixthSummit/ship-api/pull/133) [`e748de3`](https://github.com/SixthSummit/ship-api/commit/e748de3e2fcab7ddeeaca38b95a912964a9feeec) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - `libraries/ai` exports `streamLLM(stream, events, options?)`, which pipes an `LLMProvider.streamComplete()` iterator through a kernel streaming operation's `stream.emit` with abort propagation. The compatibility Hono `streamLLM(c, events)` helper is unchanged.
70
+
71
+ - Updated dependencies [[`c707304`](https://github.com/SixthSummit/ship-api/commit/c7073046e198f2c9a8006a4968d7976d2b7912fe), [`b621658`](https://github.com/SixthSummit/ship-api/commit/b6216588fe38180a9008e95df9b4e3d4994d9d7b), [`ba84e9f`](https://github.com/SixthSummit/ship-api/commit/ba84e9f4d2e2aa9e97da246c8ef546f2f3b0899a), [`d48e64e`](https://github.com/SixthSummit/ship-api/commit/d48e64ef706a4721ab0a8799ffab6550b7ada189), [`fb331f7`](https://github.com/SixthSummit/ship-api/commit/fb331f7ee6b153ce1c647b7d09706ca3607ed528), [`3d4d978`](https://github.com/SixthSummit/ship-api/commit/3d4d9788de3374baa40b7a52af46ea126cf79568), [`5df1434`](https://github.com/SixthSummit/ship-api/commit/5df1434cd5d08d2fe42453a816d60a77d85fe5ce), [`f8c8f08`](https://github.com/SixthSummit/ship-api/commit/f8c8f08476b6fa09ef1bb603e46386d41632f0c7), [`f8c8f08`](https://github.com/SixthSummit/ship-api/commit/f8c8f08476b6fa09ef1bb603e46386d41632f0c7), [`8c9a40b`](https://github.com/SixthSummit/ship-api/commit/8c9a40baa2404e5dcdaa80d72709f8f31523e1cc), [`f8c8f08`](https://github.com/SixthSummit/ship-api/commit/f8c8f08476b6fa09ef1bb603e46386d41632f0c7), [`f8c8f08`](https://github.com/SixthSummit/ship-api/commit/f8c8f08476b6fa09ef1bb603e46386d41632f0c7), [`7108383`](https://github.com/SixthSummit/ship-api/commit/7108383cbf31fed08fd458a3b091600ea8bc773c), [`491d017`](https://github.com/SixthSummit/ship-api/commit/491d01749cfb7cee49be7302ed90f63eb8e36d6a), [`1b6dd5e`](https://github.com/SixthSummit/ship-api/commit/1b6dd5e4018d1b9e2684499d5733fcbc7f7299af), [`b9fefa5`](https://github.com/SixthSummit/ship-api/commit/b9fefa5ff8941ed6abdda0f5ee548720dea3d93d), [`f38e572`](https://github.com/SixthSummit/ship-api/commit/f38e57225815489a274582e9b930c3c96480d496), [`24d78b0`](https://github.com/SixthSummit/ship-api/commit/24d78b0dfcffa4964d16bb9a2616e5885485b5e3), [`8d41857`](https://github.com/SixthSummit/ship-api/commit/8d41857da9f532aeb6f8efd6027f9f4dcc0d9c34), [`446914d`](https://github.com/SixthSummit/ship-api/commit/446914d9c31c56ce747e0b545bad485c49f0ca7c), [`38e26e3`](https://github.com/SixthSummit/ship-api/commit/38e26e37ad90a5c01f9373d65220a2a4236e5168), [`9575faf`](https://github.com/SixthSummit/ship-api/commit/9575faf4ad55927991c9e49e668bca856247b8fc), [`319f350`](https://github.com/SixthSummit/ship-api/commit/319f350a67e125d354a6edcfb67fd88bb38a3b27), [`8bbd076`](https://github.com/SixthSummit/ship-api/commit/8bbd076585d94c934fc852ba4a46b59859b770cc), [`ff6dc11`](https://github.com/SixthSummit/ship-api/commit/ff6dc11675478ed7abb8080dad1a8009267722f7), [`c3b5133`](https://github.com/SixthSummit/ship-api/commit/c3b51336bfa03ef8536fc4bc982522f9bb1c8d47), [`ec9dc2d`](https://github.com/SixthSummit/ship-api/commit/ec9dc2d4edfcb109a7d8a0526144a57577317647), [`ec9dc2d`](https://github.com/SixthSummit/ship-api/commit/ec9dc2d4edfcb109a7d8a0526144a57577317647), [`1e90972`](https://github.com/SixthSummit/ship-api/commit/1e90972cf11cb9f613fa342c2ee32b479e6f78b9), [`962b364`](https://github.com/SixthSummit/ship-api/commit/962b36403d27849a960121b6d10b83580394c97d), [`bb00927`](https://github.com/SixthSummit/ship-api/commit/bb00927fae0aa18bf3b0d8d1e1c91ee1b35c24dc), [`e748de3`](https://github.com/SixthSummit/ship-api/commit/e748de3e2fcab7ddeeaca38b95a912964a9feeec), [`e748de3`](https://github.com/SixthSummit/ship-api/commit/e748de3e2fcab7ddeeaca38b95a912964a9feeec), [`e748de3`](https://github.com/SixthSummit/ship-api/commit/e748de3e2fcab7ddeeaca38b95a912964a9feeec), [`c8d7c9f`](https://github.com/SixthSummit/ship-api/commit/c8d7c9f7e5ce96e4f51c4eeffc63b32234589c9f), [`b7092e6`](https://github.com/SixthSummit/ship-api/commit/b7092e6c9acc4ba156703477ba86d73b4553c0d0), [`bdb6001`](https://github.com/SixthSummit/ship-api/commit/bdb600192079dad65865914021084781cb8bbb8f)]:
72
+ - @sixthsummit/ship-core@1.1.0
73
+ - @sixthsummit/ship-drizzle@1.1.0
74
+ - @sixthsummit/ship-contract@1.2.0
75
+ - @sixthsummit/ship-hono@1.1.0
76
+ - @sixthsummit/ship-cli@1.1.0
77
+ - @sixthsummit/ship-observability-otel@1.1.0
78
+
79
+ ## 4.0.0
80
+
81
+ ### Minor Changes
82
+
83
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`f5b0828`](https://github.com/SixthSummit/ship-api/commit/f5b082809dc13cf27ace9479ce6f7dc68ce179f0) Thanks [@selosindis](https://github.com/selosindis)! - A2-7 — Drizzle hedge lint guard. An ESLint rule (`@typescript-eslint/no-restricted-imports`) that keeps raw Drizzle query operators (`eq`/`and`/`sql`/…) in the data-access layer, so `QueryOptions` stays a real ORM-swap seam instead of an eroding convention.
84
+
85
+ - **Scaffolded apps enforce it:** the default template's ESLint config flags a raw `drizzle-orm` value import in any `src/modules/**/services/**` (or route/handler) file; `src/db` + module `schema.ts` are exempt, and type-only imports (`InferSelectModel`, …) are allowed. For specialized access (row locking, raw `sql`) the rule message points at a justified `// eslint-disable-next-line … -- <reason>`.
86
+ - **Closes the subpath bypass:** the operators also re-export from `drizzle-orm/sql`, `…/sql/expressions`, `…/pg-core/expressions`, so the rule blocks those patterns too — `import { eq } from "drizzle-orm/sql"` can't dodge it. `drizzle-orm/pg-core` schema columns stay free.
87
+ - **Bites in-repo too:** the framework now lints `modules/**` (previously ESLint-ignored), so the guard applies to the reference modules; the outbox + oauth services carry a justified `eslint-disable` (the outbox drainer needs row locking + atomic `sql`), which also keeps `ship-api add outbox/oauth` clean under the template rule.
88
+ - Convention documented in `typescript.mdc` + both AGENTS.md. Ceiling: import-free raw access via the `protected db` (`db.query`/`db.select`) is enforced by review, not lint. Adversarially reviewed (2 blockers fixed).
89
+
90
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`347848b`](https://github.com/SixthSummit/ship-api/commit/347848bcdb6236e78f59297616610985cfcdcc01) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Accept lowercase dot-namespaced permission slugs as well as colon-namespaced
91
+ slugs so applications can preserve established RBAC catalogs during migration.
92
+
93
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`7f66aca`](https://github.com/SixthSummit/ship-api/commit/7f66aca7d91e5a66d7e264cf7f72ccbc9deae388) Thanks [@selosindis](https://github.com/selosindis)! - AI-R1 — the `libraries/ai` provider seam is now genuinely **pass-through**, not lowest-common-denominator. The seam already accepted `providerOptions` inbound but discarded native features outbound; this completes the round-trip so multi-provider apps keep the native capabilities they paid the provider for.
94
+
95
+ - `CompleteResult` and `StreamStopEvent` gain an optional `raw` (untranslated provider response) + `providerExtras`; `TokenUsage` gains `reasoningTokens` + `raw`. All additive-optional (non-breaking).
96
+ - Both adapters now populate them: Anthropic surfaces dropped blocks (thinking / citations / server-tool-use) via `providerExtras.blocks` + the full `raw`; OpenAI surfaces `refusal` + reasoning-token accounting + `raw`.
97
+ - **Bug fix:** `agentLoop` and `retrieveAndAnswer` silently dropped `providerOptions` / `metadata` — they now forward them, so prompt caching / extended thinking can actually be enabled through those entry points.
98
+
99
+ (An optional native-`completeStructured` provider method is a non-speculative follow-on — `providerOptions` already lets native structured output pass through `completeStructured` today.)
100
+
101
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`611886a`](https://github.com/SixthSummit/ship-api/commit/611886a3fb07991c4f0f8b19221464723b112b8b) Thanks [@selosindis](https://github.com/selosindis)! - AI-R2 + AI-R3 — thin the two most volatile `libraries/ai` surfaces (alpha-window breaking, deliberate).
102
+
103
+ **AI-R2 — `agentLoop` is no longer on the stable surface.** The hand-rolled model→tool→model loop is the piece most likely superseded by MCP / provider-native agent runtimes, so it now lives at `@sixthsummit/ship-api/libraries/ai/experimental` (no stability promise, `@experimental`). **BREAKING:** import `agentLoop` / `collectAssistantText` / `AgentLoopError` / `AgentLoopMaxIterationsError` and its types from the `/experimental` subpath instead of the barrel. The `defineTool` / `toolRegistry` building blocks stay on the stable barrel.
104
+
105
+ **AI-R3 — heuristic token counting is deprecated.** `HeuristicTokenizer` and `countMessageTokens` are `@deprecated` (kept exported): token _truth_ is the real usage on the provider response (`CompleteResult.usage` / `StreamStopEvent.usage`, surfaced richer by AI-R1). New thin `estimateTokens` / `estimateMessageTokens` helpers cover the legitimate pre-call prompt-fit / rate-limit-gating use-case, honestly labelled as estimates. The pluggable `Tokenizer` interface is unchanged — a real tiktoken/claude tokenizer still implements it.
106
+
107
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`98b5dab`](https://github.com/SixthSummit/ship-api/commit/98b5dab6b19f056a2726760cf73b3e855d937b31) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add authorization-backed tenant capabilities and transaction-scoped tenant repository factories. Tenant repositories now require nominal scope evidence, privileged repository surfaces require a distinct bypass, and bypass issuance and use fail closed unless synchronously audited.
108
+
109
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`591a641`](https://github.com/SixthSummit/ship-api/commit/591a6412ccd719e7eb9fca7a57b3410179e3c7c1) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Declare bounded JSON, raw, and multipart request-body modes on HTTP operations. Enforce authentication and access before body reads, stop streamed reads at the total byte limit, project policies into manifests and OpenAPI, and teach generated clients to preserve raw bytes and Fetch-owned multipart boundaries.
110
+
111
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`5e456fd`](https://github.com/SixthSummit/ship-api/commit/5e456fdb93c972b35218f58e3f61f81cdc20daf3) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add deterministic application graph commands for validation, inspection, impact queries, and `.ship/graph.json` emission from TypeScript app declarations.
112
+
113
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`65c2dc4`](https://github.com/SixthSummit/ship-api/commit/65c2dc4b0f4f9705dbddc0add21706aeccb8f7e5) Thanks [@selosindis](https://github.com/selosindis)! - A2-2 — contract freeze pass (+ A2-3). Locks the public surface apps code and migrate against, documented in `docs/PUBLIC_API_SURFACE.md`: the three export-path stability tiers (`@sixthsummit/ship-api` barrel + `/client` are semver-locked; `/*` deep paths are not), the barrel exports, the column primitives + accounts table shapes, the error-response envelope + code/status mapping, the `module.json` shape, the permission-slug convention, and the `hc()` cross-framework seam.
114
+
115
+ - **A2-3 — `QueryFilter` collision resolved.** The query-DSL type in `@sixthsummit/ship-api/app/db/QueryOptions` is renamed `DslQueryFilter`; the lifecycle-hook `QueryFilter` keeps the name and remains the barrel export. Internal rename; consumers importing the DSL type from that deep path update `QueryFilter` → `DslQueryFilter` (deep paths are not semver-locked).
116
+ - **Barrel consistency:** every configurable middleware now exports its `Options` type — `ApiKeyOptions`, `CsrfOptions`, `RateLimitOptions`, `IdempotencyOptions` — alongside the existing `RequireAuthOptions`/`HttpLoggerOptions`. Additive.
117
+ - **`PermissionDefinition`** (`{ slug, label }`) is barrel-exported — the locked permission-seeding shape; each module's `*_PERMISSION_DEFINITIONS` is pinned to it via `satisfies`.
118
+ - Fixed the stale `defaultSchema` reference in the `g module` `module.json` template (→ `accountsSchema`).
119
+
120
+ The barrel audit found no incidental exports to trim — it was already minimal and intentional.
121
+
122
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`b9a1d53`](https://github.com/SixthSummit/ship-api/commit/b9a1d53d2b537db62d965bde481c14dc84118c9e) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add explicit immediate external-effect capabilities and operation declarations.
123
+ The application compiler now rejects undisclosed, unbound, transitively hidden,
124
+ or transactionally unsafe effects, and projects valid effects into the stable
125
+ application graph for inspection and impact analysis.
126
+
127
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`51f86e4`](https://github.com/SixthSummit/ship-api/commit/51f86e44329a27918235c15c81f8654794a1719f) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add canonical `http.get/post/put/patch/delete/options` declarations and `createHonoAdapter`, deriving Hono routes directly from compiled operations. The adapter translates path, query, header, and JSON body input, then delegates validation, access, providers, errors, and result checks to the transport-independent executor.
128
+
129
+ Expose explicit `@sixthsummit/ship-api/kernel` and `@sixthsummit/ship-api/hono` subpaths so edge consumers can import the supported runtime seam without loading Node-only framework services.
130
+
131
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`bbb27a1`](https://github.com/SixthSummit/ship-api/commit/bbb27a12e24ddcf9c63e8367acf32de6ed8eb779) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add explicit JSON, text, and binary operation response modes with deterministic content types and safe application response headers.
132
+
133
+ Stabilize the HTTP failure contract, including validation issue details, strict and bounded JSON parsing, `413`/`415` failures, request correlation, and an unexpected-error observer that cannot leak through the wire response.
134
+
135
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`2e8e4c7`](https://github.com/SixthSummit/ship-api/commit/2e8e4c7e268160f21edd6e7049572754d2355d57) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add `defineApp`/`compileApp` to validate explicit modules as one application graph. Compilation rejects duplicate operations/providers/transports, missing or private dependencies, undeclared imports, ownership mismatches, and module/provider cycles with stable structured diagnostics.
136
+
137
+ Compiled applications expose immutable typed lookups and a deterministic, serializable graph projection for future CLI, client, OpenAPI, and impact tooling.
138
+
139
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`03511eb`](https://github.com/SixthSummit/ship-api/commit/03511ebc8025571073a90efe377745c8b406fa14) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add transport-independent operation execution with `createExecutor`. The executor authoritatively enforces access, validates and transforms input, resolves scoped dependency graphs, validates output/error details, preserves request identity and cancellation, and returns discriminated success or declared-failure values.
140
+
141
+ Add reusable `operationError` definitions and `operationFailure` so error codes, statuses, safe messages, and detail schemas are graph-visible. Undeclared failures, invalid handler output, schema crashes, and provider failures produce stable exceptional diagnostics instead of leaking as expected API errors.
142
+
143
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`22efa4c`](https://github.com/SixthSummit/ship-api/commit/22efa4c0b7a41891ff4fa0682b1f894cd1c82f43) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add immutable `defineModule`, `defineProvider`, and `valueProvider` declarations to the application kernel. Modules explicitly list operations, providers, imports, and exported capabilities; provider factories receive only their typed declared dependencies and choose singleton or operation lifetime.
144
+
145
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`f588e49`](https://github.com/SixthSummit/ship-api/commit/f588e4909ed86c772ea377fb5d3c1167a8da47d3) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add the first agent-native kernel contract: `defineOperation` creates immutable, runtime-validated operation declarations with Standard Schema input/output inference, explicit access and transaction modes, stable error codes, typed dependencies, and optional transport metadata.
146
+
147
+ Handlers return the default success body directly or use `respond(status, body)` for an alternate declared success. This is additive beside the existing v4 Hono APIs while the compiled graph and adapters are built and proven.
148
+
149
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`baf4a45`](https://github.com/SixthSummit/ship-api/commit/baf4a45a253de1d61c422a01b0e1f592a6bec9b5) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Model optional verified identities separately from application actors. This
150
+ lets onboarding and profile routes distinguish missing credentials from valid
151
+ identities that do not yet have an application account, without manufacturing
152
+ a domain actor or weakening protected operations.
153
+
154
+ - [#108](https://github.com/SixthSummit/ship-api/pull/108) [`fc89bcc`](https://github.com/SixthSummit/ship-api/commit/fc89bccb69567b0dcfcb4bf6d8a7cc54a69505cb) Thanks [@selosindis](https://github.com/selosindis)! - Scale the typed `hc()` client to many modules: mount module sub-apps at the root instead of chaining onto one app.
155
+
156
+ Composing every module's routes onto a single Hono app accumulates one giant route-type that overflows `tsc` (TS2589 / "instantiation excessively deep", or a hard `RangeError` in the type checker) once an app has enough modules — collapsing the typed client to `never` on consumers. v4 now composes modules as **independent sub-apps mounted at the root**, which keeps each route-type instantiation bounded and lets the typed client scale ~4× further, with **no change to the client shape** (routes keep their absolute paths, so `api.accounts.$get` is unchanged) and no codegen.
157
+
158
+ New:
159
+
160
+ - `createModuleApp(name)` — a CORS-less `createApp` sibling for building a module sub-app. Tags every captured route with its module, lighting up the Module column in `/dev/routes` and the `module` filter in `list_routes`. Fails fast (throws at dev time) if a sub-app sets `onError` / `notFound` / global `use("*")` — those cross-cutting concerns belong on the root, and silently shadowing them is the one real footgun of the sub-app model.
161
+ - `buildAccountsApp` / `buildOAuthApp` / `buildOutboxApp` — each reference module now exposes a builder returning its own sub-app.
162
+ - `ShipApiSuccessClient<App>` — a success-only (`200 | 201`) client type via Hono's `PickResponseByStatusCode`, for apps that handle errors centrally (the default, via `registerErrorHandlers`).
163
+ - The scaffold (`ship-api g module|resource`) emits the new `buildXxxApp` + `root.route("/", ...)` wiring; the app template emits declarations + a materialized `hcWithType` client for cheaper cross-package typing.
164
+
165
+ **Breaking (composition only):** wire modules with `const app = root.route("/", buildXxxApp(deps))` and point `ShipApiClient` at the result, instead of threading one app through `defineXxxRoutes(app, deps)`. `defineXxxRoutes(app, deps)` is retained for advanced composition but is now flagged as a scaling foot-gun. Keep `registerErrorHandlers` + `httpLogger` + cors on the **root only** — never on a module sub-app (a sub-app `onError` would shadow the uniform AppError shape).
166
+
167
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`f83fc6c`](https://github.com/SixthSummit/ship-api/commit/f83fc6c76c38ac8fbf1a1d1ba39286de361e9269) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add transport-independent actor resolvers, immutable per-invocation permission snapshots, and explicit Hono credential adapters. Generated HTTP routes now resolve actors and reject unauthorized requests before body parsing while the operation executor remains the authoritative access boundary.
168
+
169
+ Add `honoAuthProvider()` as a migration bridge for existing v4 `AuthProvider` implementations, with stable 401, 403, and 503 authentication outcomes.
170
+
171
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`baead03`](https://github.com/SixthSummit/ship-api/commit/baead0331d7370d77add9c9fa1e6685291990937) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Project deterministic client and OpenAPI contracts from compiled operations. Add a browser-safe structural operation client with typed operation IDs, inputs, success/error values, codecs, response metadata, JSON/text/binary representations, stable protocol diagnostics, and unambiguous query-array serialization.
172
+
173
+ Add `ship-api contract` to emit fingerprinted `.ship/contract.json` and `.ship/openapi.json` artifacts. Application error declarations can no longer reuse framework-owned validation, authentication, authorization, payload, media, internal, or authentication-availability codes.
174
+
175
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`fe2dd84`](https://github.com/SixthSummit/ship-api/commit/fe2dd849c8b33cad933a84e028bdef63c65827cc) Thanks [@selosindis](https://github.com/selosindis)! - A2-6 — v3↔v4 behavioral-parity harness (started). A differential harness that pins v4's observable behavior against v3's — error envelopes, auth edge cases, pagination/validation/query semantics — to capture the "wasting-asset" parity oracle while running v3 apps still exist (the codemod proved structural migration; this proves behavioral parity).
176
+
177
+ - Ships `runParityFixture()` + `parseParityFixtures()` + the JSONL fixture format from `@sixthsummit/ship-api/testing`, so a migrated app runs its captured v3 fixtures against its v4 build — in-process via Hono `app.request()`, no Docker.
178
+ - New `npm run test:parity` gate (`vitest.parity.config.ts`); `*.parity.test.ts` is excluded from the unit run.
179
+ - Seeds `v4-conformance` fixtures that lock the documented error-response envelope + the auth-401 contract today — proving the harness and guarding v4 against regressing its own contract.
180
+ - Capture procedure + rationale in `docs/v4/tooling/parity-harness.md`.
181
+
182
+ Capturing real `v3-capture` fixtures from a live v3 app is the maintainer's step (there is no v3 app in this repo).
183
+
184
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`4c598d9`](https://github.com/SixthSummit/ship-api/commit/4c598d9ae378614b1d99a77464c71d5641909dc8) Thanks [@selosindis](https://github.com/selosindis)! - Identity + RBAC schema (`accounts`, `roles`, `permissions`, `role_permissions`, `refresh_tokens`) has moved out of framework core (`@sixthsummit/ship-api/app/schema`) into the `accounts` module, so the framework stays incrementally adoptable — each app owns and tailors its own identity model. Core now ships **zero concrete tables** — only the primitives: `baseFields`, the `AuthProvider` interface, `DrizzleEntityService`, and the JWT-auth machinery (`JwtSigner`, the `RefreshTokenStore` interface, the generic `DrizzleRefreshTokenStore`, and `AuthFlow`), which receive the concrete `refresh_tokens` table via DI.
185
+
186
+ **BREAKING**: import `accounts` / `roles` / `permissions` / `refresh_tokens` from the accounts module, not from `@sixthsummit/ship-api/app/schema` — that subpath and the `defaultSchema` / `DefaultSchema` exports have been **removed**. Compose the module's exported `accountsSchema` fragment into `createApp({ schema })` (and into the testcontainer harness, now re-exported cleanly as `@sixthsummit/ship-api/testing`): `createApp({ schema: { ...accountsSchema, ...yourTables } })`. `refresh_tokens` lives in the accounts module alongside `accounts` (it FKs it), with its FK intact.
187
+
188
+ **Module location**: modules are delivered as reference source copied into the consumer app, and now live under **`src/modules/<name>`** — both `ship-api add <module>` and the `ship-api g module|resource|service|schema|job` scaffolders target it, and the `create` template composes them from there.
189
+
190
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`b22cffb`](https://github.com/SixthSummit/ship-api/commit/b22cffbf1c9d066f317cdf3e492acb0567e9b36d) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish application graph validation, inspection, impact analysis, and contract
191
+ generation as the focused `@sixthsummit/ship-cli` package. The monolithic CLI
192
+ retains these commands through compatibility re-exports while its legacy
193
+ scaffold and migration commands remain isolated from the new tool surface.
194
+
195
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`c54f7d1`](https://github.com/SixthSummit/ship-api/commit/c54f7d146cfe0b316603b12e463f5cda744fbb88) Thanks [@selosindis](https://github.com/selosindis)! - A2-1 — tenancy as an opt-in primitive. Tenancy is never a core default; the framework ships the _shape_ and forces nothing.
196
+
197
+ - **`tenantScoped(tenants)`** — new opt-in column mixin (the sibling of `baseFields`), exported from `@sixthsummit/ship-api` and `@sixthsummit/ship-api/app/db/tenantScoped`. Spread it into a domain table to add a non-null `tenant_id` uuid FK to your `tenants` root table (`onDelete: "restrict"`). It's a factory (you pass your own `tenants` table) so core references no concrete table.
198
+ - **`resolveTenant()`** — new opt-in middleware that publishes the active tenant to `RequestContext.tenantId` (default: from the authenticated account; or a custom resolver). Convention: read the active tenant from `RequestContext.tenantId`, never `account.tenantId` directly — this keeps a future one-tenant-per-user → membership move a one-middleware change.
199
+ - **`requireAuth` now publishes `RequestContext.userId`** from the resolved account — honoring its documented contract and fixing `createdBy` / `updatedBy` audit-stamping, which was silently always-null because the field was never set. Affects all apps, not just multi-tenant.
200
+ - **accounts module** ships an opt-in `tenants` table + `tenantsSchema` fragment (separate from `accountsSchema`, so single-tenant apps never get a tenants table) and a commented `accounts.tenantId` example for the one-tenant-per-account model.
201
+ - **`outbox_events.tenant_id`** reconciled from `text` to `uuid` (still nullable; the outbox carries system/global events, no FK). The generated migration is an `ALTER COLUMN ... TYPE uuid USING tenant_id::uuid` cast — **before regenerating, ensure every existing `outbox_events.tenant_id` is `NULL` or a valid UUID**; rows with non-UUID text fail the cast and must be back-filled or deleted first.
202
+
203
+ Tenant _enforcement_ (RLS / `withTenant` auto-scoping) remains deferred to a later release; A2-1 ships the column shape + resolution convention + docs (`docs/v4/concepts/tenancy.md`).
204
+
205
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`cbc67a6`](https://github.com/SixthSummit/ship-api/commit/cbc67a6ed3aa5531738fd8a84c7b48d0c578c642) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add `unitOfWorkDependency()` and the `@sixthsummit/ship-api/drizzle` unit-of-work adapter. Transactional operation declarations now automatically open read-only or read-write PostgreSQL scopes and inject only transaction-built capabilities.
206
+
207
+ Compile-time graph checks reject missing, multiple, misplaced, and non-singleton unit-of-work boundaries. Nested work joins deterministically by default, read-to-write escalation is rejected, and declared or unexpected failures cross the transaction boundary before normalization so writes roll back.
208
+
209
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`20c9de4`](https://github.com/SixthSummit/ship-api/commit/20c9de448ca11520618f62a8ff1144f2de53c042) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add explicit typed Drizzle repository primitives without introducing a universal CRUD abstraction. Consumers can define bounded offset pagination, immutable page results, schema-specific audit and soft-delete column mappings, and closed named query projections whose arguments and results remain inferred.
210
+
211
+ ### Patch Changes
212
+
213
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`3df355c`](https://github.com/SixthSummit/ship-api/commit/3df355c05b0991c510251cb90899290d85e7bce0) Thanks [@selosindis](https://github.com/selosindis)! - A2-8 — agent output-parity instrumentation. The `ship-api g module` / `g resource` scaffold breadcrumb now also records `tool` (the agent/editor that drove the generator) in `module.json`'s `scaffold` block, so the time-to-module delivery metric can split by tool (Claude Code vs Cursor). Claude Code auto-detects via `CLAUDECODE`; Cursor has no reliable env marker, so set `SHIP_API_SCAFFOLD_TOOL=cursor` (the override also serves CI). Metadata only — no runtime effect.
214
+
215
+ Companion docs (not shipped in the package): the G4 **agent-parity rubric** (`docs/AGENT_PARITY_RUBRIC.md`) formalizing the manual "does a real agent session produce a working module" eval into a scored, per-tool scorecard, and a new **M6 (agent output-parity)** metric + retro tool-dimension in `docs/DELIVERY_METRICS.md`.
216
+
217
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`a8f9d08`](https://github.com/SixthSummit/ship-api/commit/a8f9d086229709e52266cfba6eeb32e6b4aaae45) Thanks [@selosindis](https://github.com/selosindis)! - AI-A3 — `libraries/ai` is versioned independently of the framework core. Libraries are copied-in reference source, so this is a meaningful `library.json#version` recorded into the consumer + a changelog convention (not a separate npm package, which would invert the copied-in model).
218
+
219
+ - `ship-api add -l <lib>` now stamps `src/lib/<name>/.ship-lib.json` (`{ name, version, source, at, frameworkVersion }`) from the library's `library.json`, so the vendored library version is durable in the consumer's git history — staleness is detectable and `ship-api update` has an anchor. Mirrors the `g`-scaffold provenance breadcrumb.
220
+ - `libraries/ai` bumped `0.1.0` → `0.2.0` for the Part-II AI-R1/R2/R3 changes, independent of the framework's `4.0.0-alpha.2`; added `libraries/ai/CHANGELOG.md` + a README Versioning section.
221
+
222
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`a7d5d04`](https://github.com/SixthSummit/ship-api/commit/a7d5d04e2b37d06baea656c18b2e0c73b9906c1c) Thanks [@selosindis](https://github.com/selosindis)! - Security-audit dependency hardening — clears both criticals and every fixable moderate from `npm audit` (27 findings → 4, all remaining in the docs-site astro chain).
223
+
224
+ - **firebase-admin `^12.3.0` → `^13.10.0`** (core dependency + default template, moved in lockstep so consumer apps dedupe to one copy and the default-app registration stays shared). The `FirebaseAuthProvider` adapter surface (`admin.auth()`, `verifyIdToken`, `DecodedIdToken`, `admin.app.App`) is unchanged in v13; its floor is Node 18, below the framework's Node 22 engine.
225
+ - **vitest `^3.2.4` → `^4.1.8`** (+ `@vitest/coverage-v8`) — fixes GHSA-5xrq-8626-4rwp (critical, Vitest UI arbitrary file read/execute). One v4 migration touch: `vi.fn()` now respects the implementation's constructibility, so the `Resend` mocks in `libraries/email` use `function` expressions instead of arrows. Template's vitest moves to `^4.1.8` too.
226
+ - **@testcontainers/postgresql + localstack `^11.14.0` → `^12.0.1`** — clears the vulnerable dockerode→uuid chain in the integration-test stack.
227
+ - **Overrides** for transitives with no upstream fix: `uuid ^11.1.1` (Google API client chains under firebase-admin/@google-cloud/storage pin uuid 8/9 — GHSA-w5hq-g745-h8pq), `esbuild ^0.25.0` under drizzle-kit's deprecated `@esbuild-kit` loader (GHSA-67mh-4wv8-2f99), and `yaml ^2.8.3` under `yaml-language-server` (GHSA-48c2-rrv3-qjmp). The template ships the uuid + esbuild overrides so scaffolded apps audit clean as well.
228
+
229
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`acd3368`](https://github.com/SixthSummit/ship-api/commit/acd33684269b32dda86bdde0e5ccfcf157e1a7aa) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Project the wire-input side of Zod schemas into generated contracts. Operations
230
+ may now use defaults and transforms to normalize query, path, header, or body
231
+ values for typed handlers without making their browser client contract
232
+ unrepresentable. Output and error schemas remain projected from their output
233
+ side.
234
+
235
+ - [#112](https://github.com/SixthSummit/ship-api/pull/112) [`602f54d`](https://github.com/SixthSummit/ship-api/commit/602f54d5fc64209a27c216ea0d7530b5ce2374fd) Thanks [@selosindis](https://github.com/selosindis)! - fix(cli): lazy-load the migrate-orm codemod so the CLI no longer crashes when `typescript` is not installed
236
+
237
+ `cli/ship-api.js` statically imported `commands/migrate-orm.js`, which imports the `typescript` compiler API — but `typescript` was never a dependency of the published package. Every CLI command (including `npx @sixthsummit/ship-api create` in a fresh directory) crashed with `ERR_MODULE_NOT_FOUND` unless a hoisted `typescript` happened to be resolvable.
238
+
239
+ The codemod is now imported inside the `migrate-orm` action handler, so `typescript` only needs to resolve when the codemod actually runs (the v3 project being migrated has it as a devDependency). If it can't resolve, the CLI prints an install hint instead of a raw module-resolution error. `typescript` is declared as an optional peer dependency to document the requirement.
240
+
241
+ - [#112](https://github.com/SixthSummit/ship-api/pull/112) [`602f54d`](https://github.com/SixthSummit/ship-api/commit/602f54d5fc64209a27c216ea0d7530b5ce2374fd) Thanks [@selosindis](https://github.com/selosindis)! - fix(cli): remove v3 relics from the CLI
242
+
243
+ - `ship-api --help` described the stack as "Express.js, TypeORM, and Firebase"; now reflects the v4 stack (Hono + Drizzle + BullMQ + OpenTelemetry).
244
+ - `ship-api update` no longer injects `import "reflect-metadata"` into the consumer's `src/index.ts` — a v3/TypeORM compatibility shim that would break a v4 app (`reflect-metadata` isn't a dependency, so the injected import crashed the next start).
245
+
246
+ - [#106](https://github.com/SixthSummit/ship-api/pull/106) [`c1db847`](https://github.com/SixthSummit/ship-api/commit/c1db847c083bbb9e1b95e2eb2724f7e12ee49967) Thanks [@bachellerieloic](https://github.com/bachellerieloic)! - fix(core): `createApp` no longer drops hono's default CORS `Access-Control-Allow-Methods`.
247
+
248
+ Unset `cors` keys were forwarded into hono's `cors()` as explicit `undefined`. Because hono merges options via spread (`{ ...defaults, ...userOpts }`), an explicit `undefined` **overrides** its baked-in default rather than falling through to it. For `allowMethods` this meant preflight responses carried no `Access-Control-Allow-Methods` header, so browsers rejected every non-simple method (DELETE/PUT/PATCH) while GET/POST kept working — invisible until a consumer app issued its first browser DELETE. `createApp` now builds the hono options object by omitting unset keys, so hono's defaults survive. Same hazard fixed for `allowHeaders` / `exposeHeaders` / `maxAge` / `credentials`.
249
+
250
+ - [#102](https://github.com/SixthSummit/ship-api/pull/102) [`6210af0`](https://github.com/SixthSummit/ship-api/commit/6210af024ea8ae068fa18916ec261492d4d10b20) Thanks [@selosindis](https://github.com/selosindis)! - fix(db): set `statement_timeout` via the libpq connection `options` instead of a `pool.on("connect")` query.
251
+
252
+ The connect-time `client.query("SET statement_timeout …")` raced the pool handing the freshly-connected client to its first caller, tripping pg's "client.query() called when the client is already executing a query" deprecation warning on consumer startup. The timeout is now applied as `-c statement_timeout=<ms>` at connection startup — same effect, no extra round-trip, no warning.
253
+
254
+ - [#102](https://github.com/SixthSummit/ship-api/pull/102) [`f620322`](https://github.com/SixthSummit/ship-api/commit/f620322172a4148dade7393607a9ae0c5eb4cef6) Thanks [@selosindis](https://github.com/selosindis)! - fix(exports): add a `default` condition to every `package.json` exports entry so CJS-based tooling can resolve framework subpaths.
255
+
256
+ `drizzle-kit` resolves a schema file's imports through Node's CJS resolver, which only honors `require`/`default`/`node` conditions. The package declared `import`/`types` only, so any schema that imports from `@sixthsummit/ship-api` — including the **accounts module's `baseFields` import** — threw `ERR_PACKAGE_PATH_NOT_EXPORTED` under `drizzle-kit generate`/`migrate`, breaking the documented `ship-api add accounts` → `db:generate` flow.
257
+
258
+ Each export now lists `types` → `import` → `default`, with `default` pointing at the same ESM build. It's a fallback only: ESM consumers and edge bundlers still match `import`, TypeScript still matches `types` — only CJS-context resolvers (drizzle-kit) gain a resolvable path, then bundle the ESM via esbuild. No new CJS runtime entry point is introduced; the package stays ESM-only.
259
+
260
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`d42f7ea`](https://github.com/SixthSummit/ship-api/commit/d42f7ea2a3d6686387bfab2735fe3c399d5a21fb) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Fix the generated application's OpenTelemetry startup order. The scaffold now
261
+ starts the extracted SDK from an isolated instrumentation boundary before it
262
+ dynamically imports the HTTP application, so ESM cannot load HTTP, database,
263
+ Redis, or logging dependencies before auto-instrumentation is installed.
264
+
265
+ - [#104](https://github.com/SixthSummit/ship-api/pull/104) [`82d46ab`](https://github.com/SixthSummit/ship-api/commit/82d46ab498e9adeb83e6d23b261608ec36c73f5e) Thanks [@selosindis](https://github.com/selosindis)! - Fix the typed-client contract: route definers are now generic over Hono's schema parameter (`defineXxxRoutes<S extends Schema>(app: Hono<AppEnv, S>, deps)`), so chaining multiple modules accumulates route types instead of each module wiping out the previous one's. The non-generic `app: Hono<AppEnv>` signature widened an already-chained app — `hc<ShipApiClient>()` consumers got a client that typed zero routes.
266
+
267
+ Also fixed everywhere the broken shape was taught or scaffolded: the template `index.ts` now captures the chained return and exports `ShipApiClient` from the end of the chain, the `g module` generator emits the schema-generic signature, and docs/rules/skills show the correct pattern. A tsc-enforced type assertion (`modules/typed-client.typecheck.ts`) now fails `type-check` if any definer signature regresses.
268
+
269
+ If you scaffolded an app or generated modules from an earlier alpha: change your route definers to the schema-generic signature, capture each `defineXxxRoutes(...)` return, chain modules off the previous return, and point `export type ShipApiClient` at the final capture.
270
+
271
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`3defe3b`](https://github.com/SixthSummit/ship-api/commit/3defe3b95acaeb4d9c0790a28d4570ebf5d58395) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Generate a browser-safe TypeScript operation contract beside the deterministic JSON and OpenAPI artifacts. The generated `AppContract` derives exact operation IDs, input locations, response bodies, statuses, and declared errors from the literal manifest without importing a Hono app or server package.
272
+
273
+ Add the zero-runtime `ClientTypeContract` projection so application contract packages can expose compile-time types directly from their generated JSON Schemas.
274
+
275
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`16d1536`](https://github.com/SixthSummit/ship-api/commit/16d1536367e45d296395567ef888c339e17b0d07) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Upgrade the OpenTelemetry runtime to the patched 0.222/2.11 release line and verify SDK startup, span export, and pino trace correlation with a real-process regression test.
276
+
277
+ - [#98](https://github.com/SixthSummit/ship-api/pull/98) [`302b06d`](https://github.com/SixthSummit/ship-api/commit/302b06d421570b75de3028e82aec473ca66ee487) Thanks [@selosindis](https://github.com/selosindis)! - Initial v4 alpha — a TypeScript backend framework on Hono + Drizzle + pluggable AuthProvider + BullMQ + OpenTelemetry, designed to be edited by AI coding agents.
278
+
279
+ - **Core**: `createApp<TSchema>` Hono factory with route-registry capture, `DrizzleEntityService` (generic CRUD/list/search + lifecycle hooks), the neutral `QueryOptions` operator DSL, and the `baseFields` audit-column mixin.
280
+ - **Auth & access**: pluggable `AuthProvider` (with a `FirebaseAuthProvider` adapter), an ES256 JWT signer with refresh-token rotation, and `requireAuth` / `requirePermission` / `apiKey` / `rateLimit` / `idempotency` / `csrf` middleware.
281
+ - **HTTP**: the AppError taxonomy with uniform error shaping, the `validate()` zValidator wrapper, SSE + `streamLLM` streaming, `@hono/node-ws` WebSockets with subprotocol auth, upload + webhook parsers, and `/livez` + `/readyz` health checks.
282
+ - **Infrastructure**: BullMQ `defineJob` / `defineCron`, a transactional `outbox`, a Redis cache with tag invalidation, S3 / Disk / GCS storage adapters, and pino + OpenTelemetry observability with a Prometheus exporter.
283
+ - **Consumer surface**: a typed `hc()` client subpath (no codegen), the `ship-api create` / `dev` / `g` CLI, the `migrate-orm` TypeORM→Drizzle codemod, and three reference modules (`accounts`, `oauth`, `outbox`).
284
+ - **Agent tooling**: a bundled Claude Code plugin and MCP server (`list_routes` / `describe_route` / `find_route_collisions` / `execute_route`).
285
+
286
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`8c182e5`](https://github.com/SixthSummit/ship-api/commit/8c182e5cdafbac99f3a670259dbbe9ccbfadf11f) Thanks [@selosindis](https://github.com/selosindis)! - Module + library tests now run in `npm test` / CI via the root vitest config, instead of the core workspace only. Wiring them in surfaced — and fixed — pre-existing breakage that had been silently un-run: `libraries/chunking` (the repo never installed its manifest-declared `tiktoken`) and `libraries/email`.
287
+
288
+ `EmailService` no longer imports the host app's `environment` module. Config (`apiKey`, `defaultFrom`) is passed via the constructor — which it already accepted — and the implicit env fallback is removed, so `new EmailService()` with no args now throws. Pass values from your validated env instead: `new EmailService(env.RESEND_API_KEY, env.RESEND_DEFAULT_FROM)`. This decouples the library from the consumer app's file structure (it was the only library reaching up into the host's `../../environment.js`).
289
+
290
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`acbfb2e`](https://github.com/SixthSummit/ship-api/commit/acbfb2e07491a5801059373691572df1909e9d82) Thanks [@selosindis](https://github.com/selosindis)! - `ship-api g module` / `g resource` now stamp scaffold provenance into the generated `module.json` — a `scaffold` block recording the `generator`, module `name`, ISO `at` timestamp, and `frameworkVersion`. This is the un-backfillable start-point breadcrumb for the "time-to-module" delivery metric (see `docs/DELIVERY_METRICS.md`): it rides into git as part of the module, so it survives rebases/squashes and needs no commit-message discipline. No effect on a module's runtime behavior; the field is metadata only.
291
+
292
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`26f9887`](https://github.com/SixthSummit/ship-api/commit/26f988707a3202a8146adf3528232d73260c9dd7) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish the browser-safe operation client, JSON contract manifest, backend application types, schema projection, and OpenAPI projection as `@sixthsummit/ship-contract`. The monolithic contract subpaths become deprecated compatibility re-exports.
293
+
294
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`f0f44f2`](https://github.com/SixthSummit/ship-api/commit/f0f44f2adb3ac93eb5313d7d7a93d1419a05cdc0) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish transaction execution, repository primitives, named projections, and tenant-scoped repository factories as `@sixthsummit/ship-drizzle`. The monolithic Drizzle entry becomes a deprecated compatibility re-export.
295
+
296
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`862daa4`](https://github.com/SixthSummit/ship-api/commit/862daa4f42557d6dab7ca0b5783fc54ba07d1faa) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish the Hono transport, credential extraction, and HTTP error projection as `@sixthsummit/ship-hono`. Keep the former `@sixthsummit/ship-api/hono` entry as a deprecated compatibility re-export, with the legacy v4 auth-provider bridge confined to the monolithic package.
297
+
298
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`4c8da21`](https://github.com/SixthSummit/ship-api/commit/4c8da21b720f5625188a6a01f8d82932f158aadf) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish the transport- and infrastructure-independent operation kernel as `@sixthsummit/ship-core`. Keep the former `@sixthsummit/ship-api/kernel` path as a deprecated compatibility re-export.
299
+
300
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`899011d`](https://github.com/SixthSummit/ship-api/commit/899011d2aa0d671fc5b5f8d6201260ef61bbaa3d) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish tracing helpers, OpenTelemetry SDK lifecycle, and Prometheus metrics on explicit `@sixthsummit/ship-observability-otel` entrypoints. The monolithic observability paths become deprecated compatibility re-exports.
301
+
302
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`a618479`](https://github.com/SixthSummit/ship-api/commit/a618479105d54dcabeab2271dc555dcb1176740b) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish behavioral parity utilities and the real PostgreSQL Testcontainers harness as the development-only `@sixthsummit/ship-testing` trust zone. The monolithic testing entry becomes an optional compatibility re-export.
303
+
304
+ - [#111](https://github.com/SixthSummit/ship-api/pull/111) [`1baa8f7`](https://github.com/SixthSummit/ship-api/commit/1baa8f72b6b58f081a69d42332f714f576dadf08) Thanks [@selosindis](https://github.com/selosindis)! - Fix stale db/auth wiring references in the scaffolded reference app (`ship-api create`). The schema is consumed by `createDb({ config, schema })` (not `createApp({ schema })` — `createApp` takes no `schema`); `createDb` imports from `@sixthsummit/ship-api/app/db/client`; and the `firebaseAuth` example uses its real `findAccount` option (not a non-existent `credentialsJson`). The wiring example now mirrors the canonical pattern (compose `db` via `createDb`, then `root.route("/", buildXxxApp(deps))`).
305
+
306
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`47a4985`](https://github.com/SixthSummit/ship-api/commit/47a49859a10c2fb13cb93dfcffef6abc81d09cad) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Type authenticated and permission-gated operation handler contexts with a
307
+ required actor, matching the executor's existing access-before-handler runtime
308
+ guarantee. Public handlers continue to receive an optional actor.
309
+ - Updated dependencies [[`347848b`](https://github.com/SixthSummit/ship-api/commit/347848bcdb6236e78f59297616610985cfcdcc01), [`591a641`](https://github.com/SixthSummit/ship-api/commit/591a6412ccd719e7eb9fca7a57b3410179e3c7c1), [`1f79ef5`](https://github.com/SixthSummit/ship-api/commit/1f79ef50dc80dbdced33f031a286542d253100b2), [`acd3368`](https://github.com/SixthSummit/ship-api/commit/acd33684269b32dda86bdde0e5ccfcf157e1a7aa), [`b9a1d53`](https://github.com/SixthSummit/ship-api/commit/b9a1d53d2b537db62d965bde481c14dc84118c9e), [`3f1fcff`](https://github.com/SixthSummit/ship-api/commit/3f1fcff1ea635897ba12b62ba5f6a8848ac76604), [`fec66de`](https://github.com/SixthSummit/ship-api/commit/fec66de7e605748c4c80269de40cf092730c5b6a), [`3defe3b`](https://github.com/SixthSummit/ship-api/commit/3defe3b95acaeb4d9c0790a28d4570ebf5d58395), [`88df200`](https://github.com/SixthSummit/ship-api/commit/88df200140b339a44010f1666832d3d64a263e2c), [`88df200`](https://github.com/SixthSummit/ship-api/commit/88df200140b339a44010f1666832d3d64a263e2c), [`baf4a45`](https://github.com/SixthSummit/ship-api/commit/baf4a45a253de1d61c422a01b0e1f592a6bec9b5), [`7c57c0f`](https://github.com/SixthSummit/ship-api/commit/7c57c0f32f80dbac97ae842dcc80e1cb1f527440), [`8de94e0`](https://github.com/SixthSummit/ship-api/commit/8de94e0bf393b25e351a4a0f565723be440d7b5f), [`b22cffb`](https://github.com/SixthSummit/ship-api/commit/b22cffbf1c9d066f317cdf3e492acb0567e9b36d), [`26f9887`](https://github.com/SixthSummit/ship-api/commit/26f988707a3202a8146adf3528232d73260c9dd7), [`f0f44f2`](https://github.com/SixthSummit/ship-api/commit/f0f44f2adb3ac93eb5313d7d7a93d1419a05cdc0), [`862daa4`](https://github.com/SixthSummit/ship-api/commit/862daa4f42557d6dab7ca0b5783fc54ba07d1faa), [`4c8da21`](https://github.com/SixthSummit/ship-api/commit/4c8da21b720f5625188a6a01f8d82932f158aadf), [`899011d`](https://github.com/SixthSummit/ship-api/commit/899011d2aa0d671fc5b5f8d6201260ef61bbaa3d), [`a618479`](https://github.com/SixthSummit/ship-api/commit/a618479105d54dcabeab2271dc555dcb1176740b), [`d3ce43b`](https://github.com/SixthSummit/ship-api/commit/d3ce43bec75dcdbfc316db341459735f48aa37ab), [`b60621d`](https://github.com/SixthSummit/ship-api/commit/b60621d0f1d0daf4e975ca42bd6c65e6967dcfb5), [`47a4985`](https://github.com/SixthSummit/ship-api/commit/47a49859a10c2fb13cb93dfcffef6abc81d09cad)]:
310
+ - @sixthsummit/ship-core@1.0.0
311
+ - @sixthsummit/ship-contract@1.0.0
312
+ - @sixthsummit/ship-hono@1.0.0
313
+ - @sixthsummit/ship-cli@1.0.0
314
+ - @sixthsummit/ship-drizzle@1.0.0
315
+ - @sixthsummit/ship-testing@1.0.0
316
+ - @sixthsummit/ship-observability-otel@1.0.0
317
+
318
+ ## 4.0.0-alpha.7
319
+
320
+ ### Minor Changes
321
+
322
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`347848b`](https://github.com/SixthSummit/ship-api/commit/347848bcdb6236e78f59297616610985cfcdcc01) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Accept lowercase dot-namespaced permission slugs as well as colon-namespaced
323
+ slugs so applications can preserve established RBAC catalogs during migration.
324
+
325
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`98b5dab`](https://github.com/SixthSummit/ship-api/commit/98b5dab6b19f056a2726760cf73b3e855d937b31) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add authorization-backed tenant capabilities and transaction-scoped tenant repository factories. Tenant repositories now require nominal scope evidence, privileged repository surfaces require a distinct bypass, and bypass issuance and use fail closed unless synchronously audited.
326
+
327
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`591a641`](https://github.com/SixthSummit/ship-api/commit/591a6412ccd719e7eb9fca7a57b3410179e3c7c1) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Declare bounded JSON, raw, and multipart request-body modes on HTTP operations. Enforce authentication and access before body reads, stop streamed reads at the total byte limit, project policies into manifests and OpenAPI, and teach generated clients to preserve raw bytes and Fetch-owned multipart boundaries.
328
+
329
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`5e456fd`](https://github.com/SixthSummit/ship-api/commit/5e456fdb93c972b35218f58e3f61f81cdc20daf3) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add deterministic application graph commands for validation, inspection, impact queries, and `.ship/graph.json` emission from TypeScript app declarations.
330
+
331
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`b9a1d53`](https://github.com/SixthSummit/ship-api/commit/b9a1d53d2b537db62d965bde481c14dc84118c9e) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add explicit immediate external-effect capabilities and operation declarations.
332
+ The application compiler now rejects undisclosed, unbound, transitively hidden,
333
+ or transactionally unsafe effects, and projects valid effects into the stable
334
+ application graph for inspection and impact analysis.
335
+
336
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`51f86e4`](https://github.com/SixthSummit/ship-api/commit/51f86e44329a27918235c15c81f8654794a1719f) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add canonical `http.get/post/put/patch/delete/options` declarations and `createHonoAdapter`, deriving Hono routes directly from compiled operations. The adapter translates path, query, header, and JSON body input, then delegates validation, access, providers, errors, and result checks to the transport-independent executor.
337
+
338
+ Expose explicit `@sixthsummit/ship-api/kernel` and `@sixthsummit/ship-api/hono` subpaths so edge consumers can import the supported runtime seam without loading Node-only framework services.
339
+
340
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`bbb27a1`](https://github.com/SixthSummit/ship-api/commit/bbb27a12e24ddcf9c63e8367acf32de6ed8eb779) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add explicit JSON, text, and binary operation response modes with deterministic content types and safe application response headers.
341
+
342
+ Stabilize the HTTP failure contract, including validation issue details, strict and bounded JSON parsing, `413`/`415` failures, request correlation, and an unexpected-error observer that cannot leak through the wire response.
343
+
344
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`2e8e4c7`](https://github.com/SixthSummit/ship-api/commit/2e8e4c7e268160f21edd6e7049572754d2355d57) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add `defineApp`/`compileApp` to validate explicit modules as one application graph. Compilation rejects duplicate operations/providers/transports, missing or private dependencies, undeclared imports, ownership mismatches, and module/provider cycles with stable structured diagnostics.
345
+
346
+ Compiled applications expose immutable typed lookups and a deterministic, serializable graph projection for future CLI, client, OpenAPI, and impact tooling.
347
+
348
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`03511eb`](https://github.com/SixthSummit/ship-api/commit/03511ebc8025571073a90efe377745c8b406fa14) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add transport-independent operation execution with `createExecutor`. The executor authoritatively enforces access, validates and transforms input, resolves scoped dependency graphs, validates output/error details, preserves request identity and cancellation, and returns discriminated success or declared-failure values.
349
+
350
+ Add reusable `operationError` definitions and `operationFailure` so error codes, statuses, safe messages, and detail schemas are graph-visible. Undeclared failures, invalid handler output, schema crashes, and provider failures produce stable exceptional diagnostics instead of leaking as expected API errors.
351
+
352
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`22efa4c`](https://github.com/SixthSummit/ship-api/commit/22efa4c0b7a41891ff4fa0682b1f894cd1c82f43) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add immutable `defineModule`, `defineProvider`, and `valueProvider` declarations to the application kernel. Modules explicitly list operations, providers, imports, and exported capabilities; provider factories receive only their typed declared dependencies and choose singleton or operation lifetime.
353
+
354
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`f588e49`](https://github.com/SixthSummit/ship-api/commit/f588e4909ed86c772ea377fb5d3c1167a8da47d3) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add the first agent-native kernel contract: `defineOperation` creates immutable, runtime-validated operation declarations with Standard Schema input/output inference, explicit access and transaction modes, stable error codes, typed dependencies, and optional transport metadata.
355
+
356
+ Handlers return the default success body directly or use `respond(status, body)` for an alternate declared success. This is additive beside the existing v4 Hono APIs while the compiled graph and adapters are built and proven.
357
+
358
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`baf4a45`](https://github.com/SixthSummit/ship-api/commit/baf4a45a253de1d61c422a01b0e1f592a6bec9b5) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Model optional verified identities separately from application actors. This
359
+ lets onboarding and profile routes distinguish missing credentials from valid
360
+ identities that do not yet have an application account, without manufacturing
361
+ a domain actor or weakening protected operations.
362
+
363
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`f83fc6c`](https://github.com/SixthSummit/ship-api/commit/f83fc6c76c38ac8fbf1a1d1ba39286de361e9269) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add transport-independent actor resolvers, immutable per-invocation permission snapshots, and explicit Hono credential adapters. Generated HTTP routes now resolve actors and reject unauthorized requests before body parsing while the operation executor remains the authoritative access boundary.
364
+
365
+ Add `honoAuthProvider()` as a migration bridge for existing v4 `AuthProvider` implementations, with stable 401, 403, and 503 authentication outcomes.
366
+
367
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`baead03`](https://github.com/SixthSummit/ship-api/commit/baead0331d7370d77add9c9fa1e6685291990937) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Project deterministic client and OpenAPI contracts from compiled operations. Add a browser-safe structural operation client with typed operation IDs, inputs, success/error values, codecs, response metadata, JSON/text/binary representations, stable protocol diagnostics, and unambiguous query-array serialization.
368
+
369
+ Add `ship-api contract` to emit fingerprinted `.ship/contract.json` and `.ship/openapi.json` artifacts. Application error declarations can no longer reuse framework-owned validation, authentication, authorization, payload, media, internal, or authentication-availability codes.
370
+
371
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`b22cffb`](https://github.com/SixthSummit/ship-api/commit/b22cffbf1c9d066f317cdf3e492acb0567e9b36d) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish application graph validation, inspection, impact analysis, and contract
372
+ generation as the focused `@sixthsummit/ship-cli` package. The monolithic CLI
373
+ retains these commands through compatibility re-exports while its legacy
374
+ scaffold and migration commands remain isolated from the new tool surface.
375
+
376
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`cbc67a6`](https://github.com/SixthSummit/ship-api/commit/cbc67a6ed3aa5531738fd8a84c7b48d0c578c642) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add `unitOfWorkDependency()` and the `@sixthsummit/ship-api/drizzle` unit-of-work adapter. Transactional operation declarations now automatically open read-only or read-write PostgreSQL scopes and inject only transaction-built capabilities.
377
+
378
+ Compile-time graph checks reject missing, multiple, misplaced, and non-singleton unit-of-work boundaries. Nested work joins deterministically by default, read-to-write escalation is rejected, and declared or unexpected failures cross the transaction boundary before normalization so writes roll back.
379
+
380
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`20c9de4`](https://github.com/SixthSummit/ship-api/commit/20c9de448ca11520618f62a8ff1144f2de53c042) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Add explicit typed Drizzle repository primitives without introducing a universal CRUD abstraction. Consumers can define bounded offset pagination, immutable page results, schema-specific audit and soft-delete column mappings, and closed named query projections whose arguments and results remain inferred.
381
+
382
+ ### Patch Changes
383
+
384
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`acd3368`](https://github.com/SixthSummit/ship-api/commit/acd33684269b32dda86bdde0e5ccfcf157e1a7aa) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Project the wire-input side of Zod schemas into generated contracts. Operations
385
+ may now use defaults and transforms to normalize query, path, header, or body
386
+ values for typed handlers without making their browser client contract
387
+ unrepresentable. Output and error schemas remain projected from their output
388
+ side.
389
+
390
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`d42f7ea`](https://github.com/SixthSummit/ship-api/commit/d42f7ea2a3d6686387bfab2735fe3c399d5a21fb) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Fix the generated application's OpenTelemetry startup order. The scaffold now
391
+ starts the extracted SDK from an isolated instrumentation boundary before it
392
+ dynamically imports the HTTP application, so ESM cannot load HTTP, database,
393
+ Redis, or logging dependencies before auto-instrumentation is installed.
394
+
395
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`3defe3b`](https://github.com/SixthSummit/ship-api/commit/3defe3b95acaeb4d9c0790a28d4570ebf5d58395) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Generate a browser-safe TypeScript operation contract beside the deterministic JSON and OpenAPI artifacts. The generated `AppContract` derives exact operation IDs, input locations, response bodies, statuses, and declared errors from the literal manifest without importing a Hono app or server package.
396
+
397
+ Add the zero-runtime `ClientTypeContract` projection so application contract packages can expose compile-time types directly from their generated JSON Schemas.
398
+
399
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`16d1536`](https://github.com/SixthSummit/ship-api/commit/16d1536367e45d296395567ef888c339e17b0d07) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Upgrade the OpenTelemetry runtime to the patched 0.222/2.11 release line and verify SDK startup, span export, and pino trace correlation with a real-process regression test.
400
+
401
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`26f9887`](https://github.com/SixthSummit/ship-api/commit/26f988707a3202a8146adf3528232d73260c9dd7) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish the browser-safe operation client, JSON contract manifest, backend application types, schema projection, and OpenAPI projection as `@sixthsummit/ship-contract`. The monolithic contract subpaths become deprecated compatibility re-exports.
402
+
403
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`f0f44f2`](https://github.com/SixthSummit/ship-api/commit/f0f44f2adb3ac93eb5313d7d7a93d1419a05cdc0) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish transaction execution, repository primitives, named projections, and tenant-scoped repository factories as `@sixthsummit/ship-drizzle`. The monolithic Drizzle entry becomes a deprecated compatibility re-export.
404
+
405
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`862daa4`](https://github.com/SixthSummit/ship-api/commit/862daa4f42557d6dab7ca0b5783fc54ba07d1faa) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish the Hono transport, credential extraction, and HTTP error projection as `@sixthsummit/ship-hono`. Keep the former `@sixthsummit/ship-api/hono` entry as a deprecated compatibility re-export, with the legacy v4 auth-provider bridge confined to the monolithic package.
406
+
407
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`4c8da21`](https://github.com/SixthSummit/ship-api/commit/4c8da21b720f5625188a6a01f8d82932f158aadf) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish the transport- and infrastructure-independent operation kernel as `@sixthsummit/ship-core`. Keep the former `@sixthsummit/ship-api/kernel` path as a deprecated compatibility re-export.
408
+
409
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`899011d`](https://github.com/SixthSummit/ship-api/commit/899011d2aa0d671fc5b5f8d6201260ef61bbaa3d) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish tracing helpers, OpenTelemetry SDK lifecycle, and Prometheus metrics on explicit `@sixthsummit/ship-observability-otel` entrypoints. The monolithic observability paths become deprecated compatibility re-exports.
410
+
411
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`a618479`](https://github.com/SixthSummit/ship-api/commit/a618479105d54dcabeab2271dc555dcb1176740b) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Publish behavioral parity utilities and the real PostgreSQL Testcontainers harness as the development-only `@sixthsummit/ship-testing` trust zone. The monolithic testing entry becomes an optional compatibility re-export.
412
+
413
+ - [#114](https://github.com/SixthSummit/ship-api/pull/114) [`47a4985`](https://github.com/SixthSummit/ship-api/commit/47a49859a10c2fb13cb93dfcffef6abc81d09cad) Thanks [@HaruHunab1320](https://github.com/HaruHunab1320)! - Type authenticated and permission-gated operation handler contexts with a
414
+ required actor, matching the executor's existing access-before-handler runtime
415
+ guarantee. Public handlers continue to receive an optional actor.
416
+ - Updated dependencies [[`347848b`](https://github.com/SixthSummit/ship-api/commit/347848bcdb6236e78f59297616610985cfcdcc01), [`591a641`](https://github.com/SixthSummit/ship-api/commit/591a6412ccd719e7eb9fca7a57b3410179e3c7c1), [`1f79ef5`](https://github.com/SixthSummit/ship-api/commit/1f79ef50dc80dbdced33f031a286542d253100b2), [`acd3368`](https://github.com/SixthSummit/ship-api/commit/acd33684269b32dda86bdde0e5ccfcf157e1a7aa), [`b9a1d53`](https://github.com/SixthSummit/ship-api/commit/b9a1d53d2b537db62d965bde481c14dc84118c9e), [`3f1fcff`](https://github.com/SixthSummit/ship-api/commit/3f1fcff1ea635897ba12b62ba5f6a8848ac76604), [`fec66de`](https://github.com/SixthSummit/ship-api/commit/fec66de7e605748c4c80269de40cf092730c5b6a), [`3defe3b`](https://github.com/SixthSummit/ship-api/commit/3defe3b95acaeb4d9c0790a28d4570ebf5d58395), [`88df200`](https://github.com/SixthSummit/ship-api/commit/88df200140b339a44010f1666832d3d64a263e2c), [`88df200`](https://github.com/SixthSummit/ship-api/commit/88df200140b339a44010f1666832d3d64a263e2c), [`baf4a45`](https://github.com/SixthSummit/ship-api/commit/baf4a45a253de1d61c422a01b0e1f592a6bec9b5), [`7c57c0f`](https://github.com/SixthSummit/ship-api/commit/7c57c0f32f80dbac97ae842dcc80e1cb1f527440), [`8de94e0`](https://github.com/SixthSummit/ship-api/commit/8de94e0bf393b25e351a4a0f565723be440d7b5f), [`b22cffb`](https://github.com/SixthSummit/ship-api/commit/b22cffbf1c9d066f317cdf3e492acb0567e9b36d), [`26f9887`](https://github.com/SixthSummit/ship-api/commit/26f988707a3202a8146adf3528232d73260c9dd7), [`f0f44f2`](https://github.com/SixthSummit/ship-api/commit/f0f44f2adb3ac93eb5313d7d7a93d1419a05cdc0), [`862daa4`](https://github.com/SixthSummit/ship-api/commit/862daa4f42557d6dab7ca0b5783fc54ba07d1faa), [`4c8da21`](https://github.com/SixthSummit/ship-api/commit/4c8da21b720f5625188a6a01f8d82932f158aadf), [`899011d`](https://github.com/SixthSummit/ship-api/commit/899011d2aa0d671fc5b5f8d6201260ef61bbaa3d), [`a618479`](https://github.com/SixthSummit/ship-api/commit/a618479105d54dcabeab2271dc555dcb1176740b), [`d3ce43b`](https://github.com/SixthSummit/ship-api/commit/d3ce43bec75dcdbfc316db341459735f48aa37ab), [`47a4985`](https://github.com/SixthSummit/ship-api/commit/47a49859a10c2fb13cb93dfcffef6abc81d09cad)]:
417
+ - @sixthsummit/ship-core@0.1.0-alpha.1
418
+ - @sixthsummit/ship-contract@0.1.0-alpha.1
419
+ - @sixthsummit/ship-hono@0.1.0-alpha.1
420
+ - @sixthsummit/ship-cli@0.1.0-alpha.1
421
+ - @sixthsummit/ship-drizzle@0.1.0-alpha.1
422
+ - @sixthsummit/ship-testing@0.1.0-alpha.1
423
+ - @sixthsummit/ship-observability-otel@0.1.0-alpha.1
424
+
425
+ ## 4.0.0-alpha.6
426
+
427
+ ### Patch Changes
428
+
429
+ - [#112](https://github.com/SixthSummit/ship-api/pull/112) [`602f54d`](https://github.com/SixthSummit/ship-api/commit/602f54d5fc64209a27c216ea0d7530b5ce2374fd) Thanks [@selosindis](https://github.com/selosindis)! - fix(cli): lazy-load the migrate-orm codemod so the CLI no longer crashes when `typescript` is not installed
430
+
431
+ `cli/ship-api.js` statically imported `commands/migrate-orm.js`, which imports the `typescript` compiler API — but `typescript` was never a dependency of the published package. Every CLI command (including `npx @sixthsummit/ship-api create` in a fresh directory) crashed with `ERR_MODULE_NOT_FOUND` unless a hoisted `typescript` happened to be resolvable.
432
+
433
+ The codemod is now imported inside the `migrate-orm` action handler, so `typescript` only needs to resolve when the codemod actually runs (the v3 project being migrated has it as a devDependency). If it can't resolve, the CLI prints an install hint instead of a raw module-resolution error. `typescript` is declared as an optional peer dependency to document the requirement.
434
+
435
+ - [#112](https://github.com/SixthSummit/ship-api/pull/112) [`602f54d`](https://github.com/SixthSummit/ship-api/commit/602f54d5fc64209a27c216ea0d7530b5ce2374fd) Thanks [@selosindis](https://github.com/selosindis)! - fix(cli): remove v3 relics from the CLI
436
+ - `ship-api --help` described the stack as "Express.js, TypeORM, and Firebase"; now reflects the v4 stack (Hono + Drizzle + BullMQ + OpenTelemetry).
437
+ - `ship-api update` no longer injects `import "reflect-metadata"` into the consumer's `src/index.ts` — a v3/TypeORM compatibility shim that would break a v4 app (`reflect-metadata` isn't a dependency, so the injected import crashed the next start).
438
+
439
+ ## 4.0.0-alpha.5
440
+
441
+ ### Minor Changes
442
+
443
+ - [#108](https://github.com/SixthSummit/ship-api/pull/108) [`fc89bcc`](https://github.com/SixthSummit/ship-api/commit/fc89bccb69567b0dcfcb4bf6d8a7cc54a69505cb) Thanks [@selosindis](https://github.com/selosindis)! - Scale the typed `hc()` client to many modules: mount module sub-apps at the root instead of chaining onto one app.
444
+
445
+ Composing every module's routes onto a single Hono app accumulates one giant route-type that overflows `tsc` (TS2589 / "instantiation excessively deep", or a hard `RangeError` in the type checker) once an app has enough modules — collapsing the typed client to `never` on consumers. v4 now composes modules as **independent sub-apps mounted at the root**, which keeps each route-type instantiation bounded and lets the typed client scale ~4× further, with **no change to the client shape** (routes keep their absolute paths, so `api.accounts.$get` is unchanged) and no codegen.
446
+
447
+ New:
448
+
449
+ - `createModuleApp(name)` — a CORS-less `createApp` sibling for building a module sub-app. Tags every captured route with its module, lighting up the Module column in `/dev/routes` and the `module` filter in `list_routes`. Fails fast (throws at dev time) if a sub-app sets `onError` / `notFound` / global `use("*")` — those cross-cutting concerns belong on the root, and silently shadowing them is the one real footgun of the sub-app model.
450
+ - `buildAccountsApp` / `buildOAuthApp` / `buildOutboxApp` — each reference module now exposes a builder returning its own sub-app.
451
+ - `ShipApiSuccessClient<App>` — a success-only (`200 | 201`) client type via Hono's `PickResponseByStatusCode`, for apps that handle errors centrally (the default, via `registerErrorHandlers`).
452
+ - The scaffold (`ship-api g module|resource`) emits the new `buildXxxApp` + `root.route("/", ...)` wiring; the app template emits declarations + a materialized `hcWithType` client for cheaper cross-package typing.
453
+
454
+ **Breaking (composition only):** wire modules with `const app = root.route("/", buildXxxApp(deps))` and point `ShipApiClient` at the result, instead of threading one app through `defineXxxRoutes(app, deps)`. `defineXxxRoutes(app, deps)` is retained for advanced composition but is now flagged as a scaling foot-gun. Keep `registerErrorHandlers` + `httpLogger` + cors on the **root only** — never on a module sub-app (a sub-app `onError` would shadow the uniform AppError shape).
455
+
456
+ ### Patch Changes
457
+
458
+ - [#106](https://github.com/SixthSummit/ship-api/pull/106) [`c1db847`](https://github.com/SixthSummit/ship-api/commit/c1db847c083bbb9e1b95e2eb2724f7e12ee49967) Thanks [@bachellerieloic](https://github.com/bachellerieloic)! - fix(core): `createApp` no longer drops hono's default CORS `Access-Control-Allow-Methods`.
459
+
460
+ Unset `cors` keys were forwarded into hono's `cors()` as explicit `undefined`. Because hono merges options via spread (`{ ...defaults, ...userOpts }`), an explicit `undefined` **overrides** its baked-in default rather than falling through to it. For `allowMethods` this meant preflight responses carried no `Access-Control-Allow-Methods` header, so browsers rejected every non-simple method (DELETE/PUT/PATCH) while GET/POST kept working — invisible until a consumer app issued its first browser DELETE. `createApp` now builds the hono options object by omitting unset keys, so hono's defaults survive. Same hazard fixed for `allowHeaders` / `exposeHeaders` / `maxAge` / `credentials`.
461
+
462
+ - [#111](https://github.com/SixthSummit/ship-api/pull/111) [`1baa8f7`](https://github.com/SixthSummit/ship-api/commit/1baa8f72b6b58f081a69d42332f714f576dadf08) Thanks [@selosindis](https://github.com/selosindis)! - Fix stale db/auth wiring references in the scaffolded reference app (`ship-api create`). The schema is consumed by `createDb({ config, schema })` (not `createApp({ schema })` — `createApp` takes no `schema`); `createDb` imports from `@sixthsummit/ship-api/app/db/client`; and the `firebaseAuth` example uses its real `findAccount` option (not a non-existent `credentialsJson`). The wiring example now mirrors the canonical pattern (compose `db` via `createDb`, then `root.route("/", buildXxxApp(deps))`).
463
+
464
+ ## 4.0.0-alpha.4
465
+
466
+ ### Patch Changes
467
+
468
+ - [#102](https://github.com/SixthSummit/ship-api/pull/102) [`6210af0`](https://github.com/SixthSummit/ship-api/commit/6210af024ea8ae068fa18916ec261492d4d10b20) Thanks [@selosindis](https://github.com/selosindis)! - fix(db): set `statement_timeout` via the libpq connection `options` instead of a `pool.on("connect")` query.
469
+
470
+ The connect-time `client.query("SET statement_timeout …")` raced the pool handing the freshly-connected client to its first caller, tripping pg's "client.query() called when the client is already executing a query" deprecation warning on consumer startup. The timeout is now applied as `-c statement_timeout=<ms>` at connection startup — same effect, no extra round-trip, no warning.
471
+
472
+ - [#102](https://github.com/SixthSummit/ship-api/pull/102) [`f620322`](https://github.com/SixthSummit/ship-api/commit/f620322172a4148dade7393607a9ae0c5eb4cef6) Thanks [@selosindis](https://github.com/selosindis)! - fix(exports): add a `default` condition to every `package.json` exports entry so CJS-based tooling can resolve framework subpaths.
473
+
474
+ `drizzle-kit` resolves a schema file's imports through Node's CJS resolver, which only honors `require`/`default`/`node` conditions. The package declared `import`/`types` only, so any schema that imports from `@sixthsummit/ship-api` — including the **accounts module's `baseFields` import** — threw `ERR_PACKAGE_PATH_NOT_EXPORTED` under `drizzle-kit generate`/`migrate`, breaking the documented `ship-api add accounts` → `db:generate` flow.
475
+
476
+ Each export now lists `types` → `import` → `default`, with `default` pointing at the same ESM build. It's a fallback only: ESM consumers and edge bundlers still match `import`, TypeScript still matches `types` — only CJS-context resolvers (drizzle-kit) gain a resolvable path, then bundle the ESM via esbuild. No new CJS runtime entry point is introduced; the package stays ESM-only.
477
+
478
+ - [#104](https://github.com/SixthSummit/ship-api/pull/104) [`82d46ab`](https://github.com/SixthSummit/ship-api/commit/82d46ab498e9adeb83e6d23b261608ec36c73f5e) Thanks [@selosindis](https://github.com/selosindis)! - Fix the typed-client contract: route definers are now generic over Hono's schema parameter (`defineXxxRoutes<S extends Schema>(app: Hono<AppEnv, S>, deps)`), so chaining multiple modules accumulates route types instead of each module wiping out the previous one's. The non-generic `app: Hono<AppEnv>` signature widened an already-chained app — `hc<ShipApiClient>()` consumers got a client that typed zero routes.
479
+
480
+ Also fixed everywhere the broken shape was taught or scaffolded: the template `index.ts` now captures the chained return and exports `ShipApiClient` from the end of the chain, the `g module` generator emits the schema-generic signature, and docs/rules/skills show the correct pattern. A tsc-enforced type assertion (`modules/typed-client.typecheck.ts`) now fails `type-check` if any definer signature regresses.
481
+
482
+ If you scaffolded an app or generated modules from an earlier alpha: change your route definers to the schema-generic signature, capture each `defineXxxRoutes(...)` return, chain modules off the previous return, and point `export type ShipApiClient` at the final capture.
483
+
484
+ ## 4.0.0-alpha.3
485
+
486
+ ### Minor Changes
487
+
488
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`f5b0828`](https://github.com/SixthSummit/ship-api/commit/f5b082809dc13cf27ace9479ce6f7dc68ce179f0) Thanks [@selosindis](https://github.com/selosindis)! - A2-7 — Drizzle hedge lint guard. An ESLint rule (`@typescript-eslint/no-restricted-imports`) that keeps raw Drizzle query operators (`eq`/`and`/`sql`/…) in the data-access layer, so `QueryOptions` stays a real ORM-swap seam instead of an eroding convention.
489
+
490
+ - **Scaffolded apps enforce it:** the default template's ESLint config flags a raw `drizzle-orm` value import in any `src/modules/**/services/**` (or route/handler) file; `src/db` + module `schema.ts` are exempt, and type-only imports (`InferSelectModel`, …) are allowed. For specialized access (row locking, raw `sql`) the rule message points at a justified `// eslint-disable-next-line … -- <reason>`.
491
+ - **Closes the subpath bypass:** the operators also re-export from `drizzle-orm/sql`, `…/sql/expressions`, `…/pg-core/expressions`, so the rule blocks those patterns too — `import { eq } from "drizzle-orm/sql"` can't dodge it. `drizzle-orm/pg-core` schema columns stay free.
492
+ - **Bites in-repo too:** the framework now lints `modules/**` (previously ESLint-ignored), so the guard applies to the reference modules; the outbox + oauth services carry a justified `eslint-disable` (the outbox drainer needs row locking + atomic `sql`), which also keeps `ship-api add outbox/oauth` clean under the template rule.
493
+ - Convention documented in `typescript.mdc` + both AGENTS.md. Ceiling: import-free raw access via the `protected db` (`db.query`/`db.select`) is enforced by review, not lint. Adversarially reviewed (2 blockers fixed).
494
+
495
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`7f66aca`](https://github.com/SixthSummit/ship-api/commit/7f66aca7d91e5a66d7e264cf7f72ccbc9deae388) Thanks [@selosindis](https://github.com/selosindis)! - AI-R1 — the `libraries/ai` provider seam is now genuinely **pass-through**, not lowest-common-denominator. The seam already accepted `providerOptions` inbound but discarded native features outbound; this completes the round-trip so multi-provider apps keep the native capabilities they paid the provider for.
496
+
497
+ - `CompleteResult` and `StreamStopEvent` gain an optional `raw` (untranslated provider response) + `providerExtras`; `TokenUsage` gains `reasoningTokens` + `raw`. All additive-optional (non-breaking).
498
+ - Both adapters now populate them: Anthropic surfaces dropped blocks (thinking / citations / server-tool-use) via `providerExtras.blocks` + the full `raw`; OpenAI surfaces `refusal` + reasoning-token accounting + `raw`.
499
+ - **Bug fix:** `agentLoop` and `retrieveAndAnswer` silently dropped `providerOptions` / `metadata` — they now forward them, so prompt caching / extended thinking can actually be enabled through those entry points.
500
+
501
+ (An optional native-`completeStructured` provider method is a non-speculative follow-on — `providerOptions` already lets native structured output pass through `completeStructured` today.)
502
+
503
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`611886a`](https://github.com/SixthSummit/ship-api/commit/611886a3fb07991c4f0f8b19221464723b112b8b) Thanks [@selosindis](https://github.com/selosindis)! - AI-R2 + AI-R3 — thin the two most volatile `libraries/ai` surfaces (alpha-window breaking, deliberate).
504
+
505
+ **AI-R2 — `agentLoop` is no longer on the stable surface.** The hand-rolled model→tool→model loop is the piece most likely superseded by MCP / provider-native agent runtimes, so it now lives at `@sixthsummit/ship-api/libraries/ai/experimental` (no stability promise, `@experimental`). **BREAKING:** import `agentLoop` / `collectAssistantText` / `AgentLoopError` / `AgentLoopMaxIterationsError` and its types from the `/experimental` subpath instead of the barrel. The `defineTool` / `toolRegistry` building blocks stay on the stable barrel.
506
+
507
+ **AI-R3 — heuristic token counting is deprecated.** `HeuristicTokenizer` and `countMessageTokens` are `@deprecated` (kept exported): token _truth_ is the real usage on the provider response (`CompleteResult.usage` / `StreamStopEvent.usage`, surfaced richer by AI-R1). New thin `estimateTokens` / `estimateMessageTokens` helpers cover the legitimate pre-call prompt-fit / rate-limit-gating use-case, honestly labelled as estimates. The pluggable `Tokenizer` interface is unchanged — a real tiktoken/claude tokenizer still implements it.
508
+
509
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`65c2dc4`](https://github.com/SixthSummit/ship-api/commit/65c2dc4b0f4f9705dbddc0add21706aeccb8f7e5) Thanks [@selosindis](https://github.com/selosindis)! - A2-2 — contract freeze pass (+ A2-3). Locks the public surface apps code and migrate against, documented in `docs/PUBLIC_API_SURFACE.md`: the three export-path stability tiers (`@sixthsummit/ship-api` barrel + `/client` are semver-locked; `/*` deep paths are not), the barrel exports, the column primitives + accounts table shapes, the error-response envelope + code/status mapping, the `module.json` shape, the permission-slug convention, and the `hc()` cross-framework seam.
510
+
511
+ - **A2-3 — `QueryFilter` collision resolved.** The query-DSL type in `@sixthsummit/ship-api/app/db/QueryOptions` is renamed `DslQueryFilter`; the lifecycle-hook `QueryFilter` keeps the name and remains the barrel export. Internal rename; consumers importing the DSL type from that deep path update `QueryFilter` → `DslQueryFilter` (deep paths are not semver-locked).
512
+ - **Barrel consistency:** every configurable middleware now exports its `Options` type — `ApiKeyOptions`, `CsrfOptions`, `RateLimitOptions`, `IdempotencyOptions` — alongside the existing `RequireAuthOptions`/`HttpLoggerOptions`. Additive.
513
+ - **`PermissionDefinition`** (`{ slug, label }`) is barrel-exported — the locked permission-seeding shape; each module's `*_PERMISSION_DEFINITIONS` is pinned to it via `satisfies`.
514
+ - Fixed the stale `defaultSchema` reference in the `g module` `module.json` template (→ `accountsSchema`).
515
+
516
+ The barrel audit found no incidental exports to trim — it was already minimal and intentional.
517
+
518
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`fe2dd84`](https://github.com/SixthSummit/ship-api/commit/fe2dd849c8b33cad933a84e028bdef63c65827cc) Thanks [@selosindis](https://github.com/selosindis)! - A2-6 — v3↔v4 behavioral-parity harness (started). A differential harness that pins v4's observable behavior against v3's — error envelopes, auth edge cases, pagination/validation/query semantics — to capture the "wasting-asset" parity oracle while running v3 apps still exist (the codemod proved structural migration; this proves behavioral parity).
519
+
520
+ - Ships `runParityFixture()` + `parseParityFixtures()` + the JSONL fixture format from `@sixthsummit/ship-api/testing`, so a migrated app runs its captured v3 fixtures against its v4 build — in-process via Hono `app.request()`, no Docker.
521
+ - New `npm run test:parity` gate (`vitest.parity.config.ts`); `*.parity.test.ts` is excluded from the unit run.
522
+ - Seeds `v4-conformance` fixtures that lock the documented error-response envelope + the auth-401 contract today — proving the harness and guarding v4 against regressing its own contract.
523
+ - Capture procedure + rationale in `docs/v4/tooling/parity-harness.md`.
524
+
525
+ Capturing real `v3-capture` fixtures from a live v3 app is the maintainer's step (there is no v3 app in this repo).
526
+
527
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`4c598d9`](https://github.com/SixthSummit/ship-api/commit/4c598d9ae378614b1d99a77464c71d5641909dc8) Thanks [@selosindis](https://github.com/selosindis)! - Identity + RBAC schema (`accounts`, `roles`, `permissions`, `role_permissions`, `refresh_tokens`) has moved out of framework core (`@sixthsummit/ship-api/app/schema`) into the `accounts` module, so the framework stays incrementally adoptable — each app owns and tailors its own identity model. Core now ships **zero concrete tables** — only the primitives: `baseFields`, the `AuthProvider` interface, `DrizzleEntityService`, and the JWT-auth machinery (`JwtSigner`, the `RefreshTokenStore` interface, the generic `DrizzleRefreshTokenStore`, and `AuthFlow`), which receive the concrete `refresh_tokens` table via DI.
528
+
529
+ **BREAKING**: import `accounts` / `roles` / `permissions` / `refresh_tokens` from the accounts module, not from `@sixthsummit/ship-api/app/schema` — that subpath and the `defaultSchema` / `DefaultSchema` exports have been **removed**. Compose the module's exported `accountsSchema` fragment into `createApp({ schema })` (and into the testcontainer harness, now re-exported cleanly as `@sixthsummit/ship-api/testing`): `createApp({ schema: { ...accountsSchema, ...yourTables } })`. `refresh_tokens` lives in the accounts module alongside `accounts` (it FKs it), with its FK intact.
530
+
531
+ **Module location**: modules are delivered as reference source copied into the consumer app, and now live under **`src/modules/<name>`** — both `ship-api add <module>` and the `ship-api g module|resource|service|schema|job` scaffolders target it, and the `create` template composes them from there.
532
+
533
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`c54f7d1`](https://github.com/SixthSummit/ship-api/commit/c54f7d146cfe0b316603b12e463f5cda744fbb88) Thanks [@selosindis](https://github.com/selosindis)! - A2-1 — tenancy as an opt-in primitive. Tenancy is never a core default; the framework ships the _shape_ and forces nothing.
534
+
535
+ - **`tenantScoped(tenants)`** — new opt-in column mixin (the sibling of `baseFields`), exported from `@sixthsummit/ship-api` and `@sixthsummit/ship-api/app/db/tenantScoped`. Spread it into a domain table to add a non-null `tenant_id` uuid FK to your `tenants` root table (`onDelete: "restrict"`). It's a factory (you pass your own `tenants` table) so core references no concrete table.
536
+ - **`resolveTenant()`** — new opt-in middleware that publishes the active tenant to `RequestContext.tenantId` (default: from the authenticated account; or a custom resolver). Convention: read the active tenant from `RequestContext.tenantId`, never `account.tenantId` directly — this keeps a future one-tenant-per-user → membership move a one-middleware change.
537
+ - **`requireAuth` now publishes `RequestContext.userId`** from the resolved account — honoring its documented contract and fixing `createdBy` / `updatedBy` audit-stamping, which was silently always-null because the field was never set. Affects all apps, not just multi-tenant.
538
+ - **accounts module** ships an opt-in `tenants` table + `tenantsSchema` fragment (separate from `accountsSchema`, so single-tenant apps never get a tenants table) and a commented `accounts.tenantId` example for the one-tenant-per-account model.
539
+ - **`outbox_events.tenant_id`** reconciled from `text` to `uuid` (still nullable; the outbox carries system/global events, no FK). The generated migration is an `ALTER COLUMN ... TYPE uuid USING tenant_id::uuid` cast — **before regenerating, ensure every existing `outbox_events.tenant_id` is `NULL` or a valid UUID**; rows with non-UUID text fail the cast and must be back-filled or deleted first.
540
+
541
+ Tenant _enforcement_ (RLS / `withTenant` auto-scoping) remains deferred to a later release; A2-1 ships the column shape + resolution convention + docs (`docs/v4/concepts/tenancy.md`).
542
+
543
+ ### Patch Changes
544
+
545
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`3df355c`](https://github.com/SixthSummit/ship-api/commit/3df355c05b0991c510251cb90899290d85e7bce0) Thanks [@selosindis](https://github.com/selosindis)! - A2-8 — agent output-parity instrumentation. The `ship-api g module` / `g resource` scaffold breadcrumb now also records `tool` (the agent/editor that drove the generator) in `module.json`'s `scaffold` block, so the time-to-module delivery metric can split by tool (Claude Code vs Cursor). Claude Code auto-detects via `CLAUDECODE`; Cursor has no reliable env marker, so set `SHIP_API_SCAFFOLD_TOOL=cursor` (the override also serves CI). Metadata only — no runtime effect.
546
+
547
+ Companion docs (not shipped in the package): the G4 **agent-parity rubric** (`docs/AGENT_PARITY_RUBRIC.md`) formalizing the manual "does a real agent session produce a working module" eval into a scored, per-tool scorecard, and a new **M6 (agent output-parity)** metric + retro tool-dimension in `docs/DELIVERY_METRICS.md`.
548
+
549
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`a8f9d08`](https://github.com/SixthSummit/ship-api/commit/a8f9d086229709e52266cfba6eeb32e6b4aaae45) Thanks [@selosindis](https://github.com/selosindis)! - AI-A3 — `libraries/ai` is versioned independently of the framework core. Libraries are copied-in reference source, so this is a meaningful `library.json#version` recorded into the consumer + a changelog convention (not a separate npm package, which would invert the copied-in model).
550
+
551
+ - `ship-api add -l <lib>` now stamps `src/lib/<name>/.ship-lib.json` (`{ name, version, source, at, frameworkVersion }`) from the library's `library.json`, so the vendored library version is durable in the consumer's git history — staleness is detectable and `ship-api update` has an anchor. Mirrors the `g`-scaffold provenance breadcrumb.
552
+ - `libraries/ai` bumped `0.1.0` → `0.2.0` for the Part-II AI-R1/R2/R3 changes, independent of the framework's `4.0.0-alpha.2`; added `libraries/ai/CHANGELOG.md` + a README Versioning section.
553
+
554
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`a7d5d04`](https://github.com/SixthSummit/ship-api/commit/a7d5d04e2b37d06baea656c18b2e0c73b9906c1c) Thanks [@selosindis](https://github.com/selosindis)! - Security-audit dependency hardening — clears both criticals and every fixable moderate from `npm audit` (27 findings → 4, all remaining in the docs-site astro chain).
555
+
556
+ - **firebase-admin `^12.3.0` → `^13.10.0`** (core dependency + default template, moved in lockstep so consumer apps dedupe to one copy and the default-app registration stays shared). The `FirebaseAuthProvider` adapter surface (`admin.auth()`, `verifyIdToken`, `DecodedIdToken`, `admin.app.App`) is unchanged in v13; its floor is Node 18, below the framework's Node 22 engine.
557
+ - **vitest `^3.2.4` → `^4.1.8`** (+ `@vitest/coverage-v8`) — fixes GHSA-5xrq-8626-4rwp (critical, Vitest UI arbitrary file read/execute). One v4 migration touch: `vi.fn()` now respects the implementation's constructibility, so the `Resend` mocks in `libraries/email` use `function` expressions instead of arrows. Template's vitest moves to `^4.1.8` too.
558
+ - **@testcontainers/postgresql + localstack `^11.14.0` → `^12.0.1`** — clears the vulnerable dockerode→uuid chain in the integration-test stack.
559
+ - **Overrides** for transitives with no upstream fix: `uuid ^11.1.1` (Google API client chains under firebase-admin/@google-cloud/storage pin uuid 8/9 — GHSA-w5hq-g745-h8pq), `esbuild ^0.25.0` under drizzle-kit's deprecated `@esbuild-kit` loader (GHSA-67mh-4wv8-2f99), and `yaml ^2.8.3` under `yaml-language-server` (GHSA-48c2-rrv3-qjmp). The template ships the uuid + esbuild overrides so scaffolded apps audit clean as well.
560
+
561
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`8c182e5`](https://github.com/SixthSummit/ship-api/commit/8c182e5cdafbac99f3a670259dbbe9ccbfadf11f) Thanks [@selosindis](https://github.com/selosindis)! - Module + library tests now run in `npm test` / CI via the root vitest config, instead of the core workspace only. Wiring them in surfaced — and fixed — pre-existing breakage that had been silently un-run: `libraries/chunking` (the repo never installed its manifest-declared `tiktoken`) and `libraries/email`.
562
+
563
+ `EmailService` no longer imports the host app's `environment` module. Config (`apiKey`, `defaultFrom`) is passed via the constructor — which it already accepted — and the implicit env fallback is removed, so `new EmailService()` with no args now throws. Pass values from your validated env instead: `new EmailService(env.RESEND_API_KEY, env.RESEND_DEFAULT_FROM)`. This decouples the library from the consumer app's file structure (it was the only library reaching up into the host's `../../environment.js`).
564
+
565
+ - [#100](https://github.com/SixthSummit/ship-api/pull/100) [`acbfb2e`](https://github.com/SixthSummit/ship-api/commit/acbfb2e07491a5801059373691572df1909e9d82) Thanks [@selosindis](https://github.com/selosindis)! - `ship-api g module` / `g resource` now stamp scaffold provenance into the generated `module.json` — a `scaffold` block recording the `generator`, module `name`, ISO `at` timestamp, and `frameworkVersion`. This is the un-backfillable start-point breadcrumb for the "time-to-module" delivery metric (see `docs/DELIVERY_METRICS.md`): it rides into git as part of the module, so it survives rebases/squashes and needs no commit-message discipline. No effect on a module's runtime behavior; the field is metadata only.
566
+
567
+ ## 4.0.0-alpha.1
568
+
569
+ ### Patch Changes
570
+
571
+ - [#98](https://github.com/SixthSummit/ship-api/pull/98) [`302b06d`](https://github.com/SixthSummit/ship-api/commit/302b06d421570b75de3028e82aec473ca66ee487) Thanks [@selosindis](https://github.com/selosindis)! - Initial v4 alpha — a TypeScript backend framework on Hono + Drizzle + pluggable AuthProvider + BullMQ + OpenTelemetry, designed to be edited by AI coding agents.
572
+ - **Core**: `createApp<TSchema>` Hono factory with route-registry capture, `DrizzleEntityService` (generic CRUD/list/search + lifecycle hooks), the neutral `QueryOptions` operator DSL, and the `baseFields` audit-column mixin.
573
+ - **Auth & access**: pluggable `AuthProvider` (with a `FirebaseAuthProvider` adapter), an ES256 JWT signer with refresh-token rotation, and `requireAuth` / `requirePermission` / `apiKey` / `rateLimit` / `idempotency` / `csrf` middleware.
574
+ - **HTTP**: the AppError taxonomy with uniform error shaping, the `validate()` zValidator wrapper, SSE + `streamLLM` streaming, `@hono/node-ws` WebSockets with subprotocol auth, upload + webhook parsers, and `/livez` + `/readyz` health checks.
575
+ - **Infrastructure**: BullMQ `defineJob` / `defineCron`, a transactional `outbox`, a Redis cache with tag invalidation, S3 / Disk / GCS storage adapters, and pino + OpenTelemetry observability with a Prometheus exporter.
576
+ - **Consumer surface**: a typed `hc()` client subpath (no codegen), the `ship-api create` / `dev` / `g` CLI, the `migrate-orm` TypeORM→Drizzle codemod, and three reference modules (`accounts`, `oauth`, `outbox`).
577
+ - **Agent tooling**: a bundled Claude Code plugin and MCP server (`list_routes` / `describe_route` / `find_route_collisions` / `execute_route`).
578
+
579
+ This file tracks the framework package (`@sixthsummit/ship-api`). From its first published release (`4.0.0-alpha.1`) onward, entries are auto-managed by [Changesets](https://github.com/changesets/changesets) — contributors describe user-visible changes in `.changeset/*.md` files, and `changesets/action@v1` aggregates them into a "Version Packages" PR that bumps versions and prepends entries on merge.
580
+
581
+ The Claude plugin (`@sixthsummit/ship-api-claude-plugin`) and MCP server (`@sixthsummit/ship-api-mcp-server`) keep their own CHANGELOGs at `packages/claude-plugin/CHANGELOG.md` and `packages/mcp-server/CHANGELOG.md`. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
582
+
583
+ ---
584
+
585
+ _Pre-publication note: the v4 framework iterated through internal pre-publication tags (`4.0.0-alpha.0` through `4.0.0-alpha.2`) that were never published to a registry. The version line was reset so that `4.0.0-alpha.1` is the first release actually published to GitHub Packages — Changesets prepends its entry above this note on the first release. For the pre-publication cut-over history, see `git log` on the `v4` branch._
586
+
587
+ ## [3.0.0](https://github.com/SixthSummit/ship-api/compare/v2.3.0...v3.0.0) (2026-01-21)
588
+
589
+ ### ⚠ BREAKING CHANGES
590
+
591
+ - restructure to monorepo with modular CLI architecture
592
+
593
+ ### Features
594
+
595
+ - restructure to monorepo with modular CLI architecture ([407f6e6](https://github.com/SixthSummit/ship-api/commit/407f6e6))
596
+ - add installable libraries support via CLI ([cdebcdd](https://github.com/SixthSummit/ship-api/commit/cdebcdd20f9fd58716aa05fc8f37a8de532e3cab))
597
+ - add support for auto-installing npm dependencies defined in a library or module ([149f690](https://github.com/SixthSummit/ship-api/commit/149f690be525179ea0a5815351664d752cdae8bb))
598
+ - **cli:** add template audit script and documentation ([d6ae830](https://github.com/SixthSummit/ship-api/commit/d6ae830))
599
+
600
+ ### Bug Fixes
601
+
602
+ - update release-please config and tests for monorepo structure ([4e25a66](https://github.com/SixthSummit/ship-api/commit/4e25a66282c33f77cad38e8b4e8751ac3a073c67))
603
+ - lock files not included in release commits ([56578b2](https://github.com/SixthSummit/ship-api/commit/56578b2))
604
+
605
+ ### Code Refactoring
606
+
607
+ - **cli:** simplify template package.json for easier maintenance ([9af7ca6](https://github.com/SixthSummit/ship-api/commit/9af7ca67cd36cf72f868b63414bdfe69c702c1fd))
608
+ - **services:** simplify EntityService relationship handling ([0bdbcde](https://github.com/SixthSummit/ship-api/commit/0bdbcde))