@qlever-llc/trellis 0.10.22 → 0.11.0-rc.1

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 (406) hide show
  1. package/esm/auth/mod.d.ts +1 -1
  2. package/esm/auth/mod.d.ts.map +1 -1
  3. package/esm/auth/mod.js +1 -1
  4. package/esm/auth/protocol.d.ts +55 -0
  5. package/esm/auth/protocol.d.ts.map +1 -1
  6. package/esm/browser.d.ts +3 -3
  7. package/esm/browser.d.ts.map +1 -1
  8. package/esm/browser.js +1 -1
  9. package/esm/client_connect.d.ts +12 -3
  10. package/esm/client_connect.d.ts.map +1 -1
  11. package/esm/client_connect.js +112 -7
  12. package/esm/codec.d.ts +7 -6
  13. package/esm/codec.d.ts.map +1 -1
  14. package/esm/codec.js +125 -6
  15. package/esm/contract_support/canonical.d.ts +3 -0
  16. package/esm/contract_support/canonical.d.ts.map +1 -1
  17. package/esm/contract_support/canonical.js +3 -0
  18. package/esm/contract_support/mod.d.ts +125 -10
  19. package/esm/contract_support/mod.d.ts.map +1 -1
  20. package/esm/contract_support/mod.js +159 -5
  21. package/esm/contract_support/protocol.d.ts +92 -7
  22. package/esm/contract_support/protocol.d.ts.map +1 -1
  23. package/esm/contract_support/protocol.js +41 -7
  24. package/esm/contract_support/runtime.d.ts +4 -1
  25. package/esm/contract_support/runtime.d.ts.map +1 -1
  26. package/esm/errors/SchemaValidationError.d.ts +49 -0
  27. package/esm/errors/SchemaValidationError.d.ts.map +1 -0
  28. package/esm/errors/SchemaValidationError.js +67 -0
  29. package/esm/errors/index.d.ts +38 -9
  30. package/esm/errors/index.d.ts.map +1 -1
  31. package/esm/errors/index.js +16 -0
  32. package/esm/generated-sdk/auth/api.d.ts +33 -605
  33. package/esm/generated-sdk/auth/api.d.ts.map +1 -1
  34. package/esm/generated-sdk/auth/api.js +6 -1
  35. package/esm/generated-sdk/auth/client.d.ts +129 -134
  36. package/esm/generated-sdk/auth/client.d.ts.map +1 -1
  37. package/esm/generated-sdk/auth/contract.d.ts +2 -601
  38. package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
  39. package/esm/generated-sdk/auth/contract.js +310 -93
  40. package/esm/generated-sdk/auth/mod.d.ts +1 -1
  41. package/esm/generated-sdk/auth/mod.d.ts.map +1 -1
  42. package/esm/generated-sdk/auth/owned_api.d.ts +88 -86
  43. package/esm/generated-sdk/auth/owned_api.d.ts.map +1 -1
  44. package/esm/generated-sdk/auth/owned_api.js +6 -0
  45. package/esm/generated-sdk/auth/schemas.d.ts +284 -136
  46. package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
  47. package/esm/generated-sdk/auth/schemas.js +231 -92
  48. package/esm/generated-sdk/auth/types.d.ts +565 -89
  49. package/esm/generated-sdk/auth/types.d.ts.map +1 -1
  50. package/esm/generated-sdk/auth/types.js +1 -1
  51. package/esm/generated-sdk/health/api.d.ts +29 -18
  52. package/esm/generated-sdk/health/api.d.ts.map +1 -1
  53. package/esm/generated-sdk/health/client.d.ts +7 -21
  54. package/esm/generated-sdk/health/client.d.ts.map +1 -1
  55. package/esm/generated-sdk/health/contract.d.ts +2 -15
  56. package/esm/generated-sdk/health/contract.d.ts.map +1 -1
  57. package/esm/generated-sdk/health/contract.js +2 -10
  58. package/esm/generated-sdk/health/mod.d.ts +1 -1
  59. package/esm/generated-sdk/health/mod.d.ts.map +1 -1
  60. package/esm/generated-sdk/health/owned_api.d.ts +2 -2
  61. package/esm/generated-sdk/health/schemas.d.ts +1 -14
  62. package/esm/generated-sdk/health/schemas.d.ts.map +1 -1
  63. package/esm/generated-sdk/health/schemas.js +1 -9
  64. package/esm/generated-sdk/health/types.d.ts +10 -5
  65. package/esm/generated-sdk/health/types.d.ts.map +1 -1
  66. package/esm/generated-sdk/health/types.js +1 -2
  67. package/esm/generated-sdk/jobs/api.d.ts +29 -109
  68. package/esm/generated-sdk/jobs/api.d.ts.map +1 -1
  69. package/esm/generated-sdk/jobs/client.d.ts +21 -33
  70. package/esm/generated-sdk/jobs/client.d.ts.map +1 -1
  71. package/esm/generated-sdk/jobs/contract.d.ts +2 -106
  72. package/esm/generated-sdk/jobs/contract.d.ts.map +1 -1
  73. package/esm/generated-sdk/jobs/contract.js +268 -1
  74. package/esm/generated-sdk/jobs/mod.d.ts +1 -1
  75. package/esm/generated-sdk/jobs/mod.d.ts.map +1 -1
  76. package/esm/generated-sdk/jobs/owned_api.d.ts +22 -9
  77. package/esm/generated-sdk/jobs/owned_api.d.ts.map +1 -1
  78. package/esm/generated-sdk/jobs/owned_api.js +20 -1
  79. package/esm/generated-sdk/jobs/schemas.d.ts +437 -0
  80. package/esm/generated-sdk/jobs/schemas.d.ts.map +1 -1
  81. package/esm/generated-sdk/jobs/schemas.js +211 -0
  82. package/esm/generated-sdk/jobs/types.d.ts +195 -12
  83. package/esm/generated-sdk/jobs/types.d.ts.map +1 -1
  84. package/esm/generated-sdk/jobs/types.js +1 -1
  85. package/esm/generated-sdk/state/api.d.ts +29 -68
  86. package/esm/generated-sdk/state/api.d.ts.map +1 -1
  87. package/esm/generated-sdk/state/client.d.ts +17 -31
  88. package/esm/generated-sdk/state/client.d.ts.map +1 -1
  89. package/esm/generated-sdk/state/contract.d.ts +1 -64
  90. package/esm/generated-sdk/state/contract.d.ts.map +1 -1
  91. package/esm/generated-sdk/state/mod.d.ts +1 -1
  92. package/esm/generated-sdk/state/mod.d.ts.map +1 -1
  93. package/esm/generated-sdk/state/owned_api.d.ts +7 -7
  94. package/esm/generated-sdk/state/types.d.ts +52 -9
  95. package/esm/generated-sdk/state/types.d.ts.map +1 -1
  96. package/esm/generated-sdk/trellis-core/api.d.ts +33 -45
  97. package/esm/generated-sdk/trellis-core/api.d.ts.map +1 -1
  98. package/esm/generated-sdk/trellis-core/api.js +6 -1
  99. package/esm/generated-sdk/trellis-core/client.d.ts +31 -20
  100. package/esm/generated-sdk/trellis-core/client.d.ts.map +1 -1
  101. package/esm/generated-sdk/trellis-core/contract.d.ts +2 -41
  102. package/esm/generated-sdk/trellis-core/contract.d.ts.map +1 -1
  103. package/esm/generated-sdk/trellis-core/contract.js +91 -1
  104. package/esm/generated-sdk/trellis-core/mod.d.ts +1 -1
  105. package/esm/generated-sdk/trellis-core/mod.d.ts.map +1 -1
  106. package/esm/generated-sdk/trellis-core/owned_api.d.ts +4 -4
  107. package/esm/generated-sdk/trellis-core/schemas.d.ts +113 -0
  108. package/esm/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
  109. package/esm/generated-sdk/trellis-core/schemas.js +81 -0
  110. package/esm/generated-sdk/trellis-core/types.d.ts +54 -7
  111. package/esm/generated-sdk/trellis-core/types.d.ts.map +1 -1
  112. package/esm/generated-sdk/trellis-core/types.js +1 -1
  113. package/esm/health.d.ts +1 -1
  114. package/esm/health.d.ts.map +1 -1
  115. package/esm/health.js +1 -1
  116. package/esm/index.d.ts +4 -4
  117. package/esm/index.d.ts.map +1 -1
  118. package/esm/index.js +2 -2
  119. package/esm/jobs.d.ts +69 -3
  120. package/esm/jobs.d.ts.map +1 -1
  121. package/esm/jobs.js +92 -3
  122. package/esm/server/health.d.ts +2 -6
  123. package/esm/server/health.d.ts.map +1 -1
  124. package/esm/server/health_schemas.d.ts +0 -8
  125. package/esm/server/health_schemas.d.ts.map +1 -1
  126. package/esm/server/health_schemas.js +0 -5
  127. package/esm/server/internal_jobs/bindings.d.ts +11 -0
  128. package/esm/server/internal_jobs/bindings.d.ts.map +1 -1
  129. package/esm/server/internal_jobs/job-manager.d.ts +58 -2
  130. package/esm/server/internal_jobs/job-manager.d.ts.map +1 -1
  131. package/esm/server/internal_jobs/job-manager.js +429 -55
  132. package/esm/server/internal_jobs/key-coordinator.d.ts +269 -0
  133. package/esm/server/internal_jobs/key-coordinator.d.ts.map +1 -0
  134. package/esm/server/internal_jobs/key-coordinator.js +677 -0
  135. package/esm/server/internal_jobs/projection.d.ts.map +1 -1
  136. package/esm/server/internal_jobs/projection.js +2 -0
  137. package/esm/server/internal_jobs/runtime-worker.d.ts +5 -1
  138. package/esm/server/internal_jobs/runtime-worker.d.ts.map +1 -1
  139. package/esm/server/internal_jobs/runtime-worker.js +14 -2
  140. package/esm/server/internal_jobs/types.d.ts +5 -5
  141. package/esm/server/internal_jobs/types.d.ts.map +1 -1
  142. package/esm/server/internal_jobs/types.js +6 -0
  143. package/esm/server/runtime.d.ts.map +1 -1
  144. package/esm/server/service.d.ts +81 -112
  145. package/esm/server/service.d.ts.map +1 -1
  146. package/esm/server/service.js +372 -130
  147. package/esm/server.d.ts +3 -3
  148. package/esm/server.d.ts.map +1 -1
  149. package/esm/service/deno.d.ts +1 -1
  150. package/esm/service/deno.d.ts.map +1 -1
  151. package/esm/service/drizzle.d.ts +52 -0
  152. package/esm/service/drizzle.d.ts.map +1 -0
  153. package/esm/service/drizzle.js +108 -0
  154. package/esm/service/mod.d.ts +3 -3
  155. package/esm/service/mod.d.ts.map +1 -1
  156. package/esm/service/mod.js +2 -2
  157. package/esm/service/node.d.ts +1 -1
  158. package/esm/service/node.d.ts.map +1 -1
  159. package/esm/service/outbox_inbox.d.ts +76 -22
  160. package/esm/service/outbox_inbox.d.ts.map +1 -1
  161. package/esm/service/outbox_inbox.js +231 -70
  162. package/esm/telemetry/metrics.d.ts +55 -0
  163. package/esm/telemetry/metrics.d.ts.map +1 -1
  164. package/esm/telemetry/metrics.js +86 -0
  165. package/esm/telemetry/mod.d.ts +2 -1
  166. package/esm/telemetry/mod.d.ts.map +1 -1
  167. package/esm/telemetry/mod.js +1 -1
  168. package/esm/trellis.d.ts +62 -30
  169. package/esm/trellis.d.ts.map +1 -1
  170. package/esm/trellis.js +125 -42
  171. package/package.json +14 -2
  172. package/script/auth/mod.d.ts +1 -1
  173. package/script/auth/mod.d.ts.map +1 -1
  174. package/script/auth/mod.js +11 -4
  175. package/script/auth/protocol.d.ts +55 -0
  176. package/script/auth/protocol.d.ts.map +1 -1
  177. package/script/browser.d.ts +3 -3
  178. package/script/browser.d.ts.map +1 -1
  179. package/script/browser.js +3 -2
  180. package/script/client_connect.d.ts +12 -3
  181. package/script/client_connect.d.ts.map +1 -1
  182. package/script/client_connect.js +111 -6
  183. package/script/codec.d.ts +7 -6
  184. package/script/codec.d.ts.map +1 -1
  185. package/script/codec.js +124 -5
  186. package/script/contract_support/canonical.d.ts +3 -0
  187. package/script/contract_support/canonical.d.ts.map +1 -1
  188. package/script/contract_support/canonical.js +3 -0
  189. package/script/contract_support/mod.d.ts +125 -10
  190. package/script/contract_support/mod.d.ts.map +1 -1
  191. package/script/contract_support/mod.js +165 -5
  192. package/script/contract_support/protocol.d.ts +92 -7
  193. package/script/contract_support/protocol.d.ts.map +1 -1
  194. package/script/contract_support/protocol.js +42 -8
  195. package/script/contract_support/runtime.d.ts +4 -1
  196. package/script/contract_support/runtime.d.ts.map +1 -1
  197. package/script/errors/SchemaValidationError.d.ts +49 -0
  198. package/script/errors/SchemaValidationError.d.ts.map +1 -0
  199. package/script/errors/SchemaValidationError.js +74 -0
  200. package/script/errors/index.d.ts +38 -9
  201. package/script/errors/index.d.ts.map +1 -1
  202. package/script/errors/index.js +20 -1
  203. package/script/generated-sdk/auth/api.d.ts +33 -605
  204. package/script/generated-sdk/auth/api.d.ts.map +1 -1
  205. package/script/generated-sdk/auth/api.js +6 -1
  206. package/script/generated-sdk/auth/client.d.ts +129 -134
  207. package/script/generated-sdk/auth/client.d.ts.map +1 -1
  208. package/script/generated-sdk/auth/contract.d.ts +2 -601
  209. package/script/generated-sdk/auth/contract.d.ts.map +1 -1
  210. package/script/generated-sdk/auth/contract.js +310 -93
  211. package/script/generated-sdk/auth/mod.d.ts +1 -1
  212. package/script/generated-sdk/auth/mod.d.ts.map +1 -1
  213. package/script/generated-sdk/auth/owned_api.d.ts +88 -86
  214. package/script/generated-sdk/auth/owned_api.d.ts.map +1 -1
  215. package/script/generated-sdk/auth/owned_api.js +6 -0
  216. package/script/generated-sdk/auth/schemas.d.ts +284 -136
  217. package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
  218. package/script/generated-sdk/auth/schemas.js +231 -92
  219. package/script/generated-sdk/auth/types.d.ts +565 -89
  220. package/script/generated-sdk/auth/types.d.ts.map +1 -1
  221. package/script/generated-sdk/auth/types.js +1 -1
  222. package/script/generated-sdk/health/api.d.ts +29 -18
  223. package/script/generated-sdk/health/api.d.ts.map +1 -1
  224. package/script/generated-sdk/health/client.d.ts +7 -21
  225. package/script/generated-sdk/health/client.d.ts.map +1 -1
  226. package/script/generated-sdk/health/contract.d.ts +2 -15
  227. package/script/generated-sdk/health/contract.d.ts.map +1 -1
  228. package/script/generated-sdk/health/contract.js +2 -10
  229. package/script/generated-sdk/health/mod.d.ts +1 -1
  230. package/script/generated-sdk/health/mod.d.ts.map +1 -1
  231. package/script/generated-sdk/health/owned_api.d.ts +2 -2
  232. package/script/generated-sdk/health/schemas.d.ts +1 -14
  233. package/script/generated-sdk/health/schemas.d.ts.map +1 -1
  234. package/script/generated-sdk/health/schemas.js +1 -9
  235. package/script/generated-sdk/health/types.d.ts +10 -5
  236. package/script/generated-sdk/health/types.d.ts.map +1 -1
  237. package/script/generated-sdk/health/types.js +1 -2
  238. package/script/generated-sdk/jobs/api.d.ts +29 -109
  239. package/script/generated-sdk/jobs/api.d.ts.map +1 -1
  240. package/script/generated-sdk/jobs/client.d.ts +21 -33
  241. package/script/generated-sdk/jobs/client.d.ts.map +1 -1
  242. package/script/generated-sdk/jobs/contract.d.ts +2 -106
  243. package/script/generated-sdk/jobs/contract.d.ts.map +1 -1
  244. package/script/generated-sdk/jobs/contract.js +268 -1
  245. package/script/generated-sdk/jobs/mod.d.ts +1 -1
  246. package/script/generated-sdk/jobs/mod.d.ts.map +1 -1
  247. package/script/generated-sdk/jobs/owned_api.d.ts +22 -9
  248. package/script/generated-sdk/jobs/owned_api.d.ts.map +1 -1
  249. package/script/generated-sdk/jobs/owned_api.js +19 -0
  250. package/script/generated-sdk/jobs/schemas.d.ts +437 -0
  251. package/script/generated-sdk/jobs/schemas.d.ts.map +1 -1
  252. package/script/generated-sdk/jobs/schemas.js +212 -1
  253. package/script/generated-sdk/jobs/types.d.ts +195 -12
  254. package/script/generated-sdk/jobs/types.d.ts.map +1 -1
  255. package/script/generated-sdk/jobs/types.js +1 -1
  256. package/script/generated-sdk/state/api.d.ts +29 -68
  257. package/script/generated-sdk/state/api.d.ts.map +1 -1
  258. package/script/generated-sdk/state/client.d.ts +17 -31
  259. package/script/generated-sdk/state/client.d.ts.map +1 -1
  260. package/script/generated-sdk/state/contract.d.ts +1 -64
  261. package/script/generated-sdk/state/contract.d.ts.map +1 -1
  262. package/script/generated-sdk/state/mod.d.ts +1 -1
  263. package/script/generated-sdk/state/mod.d.ts.map +1 -1
  264. package/script/generated-sdk/state/owned_api.d.ts +7 -7
  265. package/script/generated-sdk/state/types.d.ts +52 -9
  266. package/script/generated-sdk/state/types.d.ts.map +1 -1
  267. package/script/generated-sdk/trellis-core/api.d.ts +33 -45
  268. package/script/generated-sdk/trellis-core/api.d.ts.map +1 -1
  269. package/script/generated-sdk/trellis-core/api.js +6 -1
  270. package/script/generated-sdk/trellis-core/client.d.ts +31 -20
  271. package/script/generated-sdk/trellis-core/client.d.ts.map +1 -1
  272. package/script/generated-sdk/trellis-core/contract.d.ts +2 -41
  273. package/script/generated-sdk/trellis-core/contract.d.ts.map +1 -1
  274. package/script/generated-sdk/trellis-core/contract.js +91 -1
  275. package/script/generated-sdk/trellis-core/mod.d.ts +1 -1
  276. package/script/generated-sdk/trellis-core/mod.d.ts.map +1 -1
  277. package/script/generated-sdk/trellis-core/owned_api.d.ts +4 -4
  278. package/script/generated-sdk/trellis-core/schemas.d.ts +113 -0
  279. package/script/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
  280. package/script/generated-sdk/trellis-core/schemas.js +81 -0
  281. package/script/generated-sdk/trellis-core/types.d.ts +54 -7
  282. package/script/generated-sdk/trellis-core/types.d.ts.map +1 -1
  283. package/script/generated-sdk/trellis-core/types.js +1 -1
  284. package/script/health.d.ts +1 -1
  285. package/script/health.d.ts.map +1 -1
  286. package/script/health.js +1 -2
  287. package/script/index.d.ts +4 -4
  288. package/script/index.d.ts.map +1 -1
  289. package/script/index.js +2 -2
  290. package/script/jobs.d.ts +69 -3
  291. package/script/jobs.d.ts.map +1 -1
  292. package/script/jobs.js +93 -3
  293. package/script/server/health.d.ts +2 -6
  294. package/script/server/health.d.ts.map +1 -1
  295. package/script/server/health_schemas.d.ts +0 -8
  296. package/script/server/health_schemas.d.ts.map +1 -1
  297. package/script/server/health_schemas.js +1 -6
  298. package/script/server/internal_jobs/bindings.d.ts +11 -0
  299. package/script/server/internal_jobs/bindings.d.ts.map +1 -1
  300. package/script/server/internal_jobs/job-manager.d.ts +58 -2
  301. package/script/server/internal_jobs/job-manager.d.ts.map +1 -1
  302. package/script/server/internal_jobs/job-manager.js +429 -54
  303. package/script/server/internal_jobs/key-coordinator.d.ts +269 -0
  304. package/script/server/internal_jobs/key-coordinator.d.ts.map +1 -0
  305. package/script/server/internal_jobs/key-coordinator.js +690 -0
  306. package/script/server/internal_jobs/projection.d.ts.map +1 -1
  307. package/script/server/internal_jobs/projection.js +2 -0
  308. package/script/server/internal_jobs/runtime-worker.d.ts +5 -1
  309. package/script/server/internal_jobs/runtime-worker.d.ts.map +1 -1
  310. package/script/server/internal_jobs/runtime-worker.js +14 -2
  311. package/script/server/internal_jobs/types.d.ts +5 -5
  312. package/script/server/internal_jobs/types.d.ts.map +1 -1
  313. package/script/server/internal_jobs/types.js +6 -0
  314. package/script/server/runtime.d.ts.map +1 -1
  315. package/script/server/service.d.ts +81 -112
  316. package/script/server/service.d.ts.map +1 -1
  317. package/script/server/service.js +369 -127
  318. package/script/server.d.ts +3 -3
  319. package/script/server.d.ts.map +1 -1
  320. package/script/service/deno.d.ts +1 -1
  321. package/script/service/deno.d.ts.map +1 -1
  322. package/script/service/drizzle.d.ts +52 -0
  323. package/script/service/drizzle.d.ts.map +1 -0
  324. package/script/service/drizzle.js +113 -0
  325. package/script/service/mod.d.ts +3 -3
  326. package/script/service/mod.d.ts.map +1 -1
  327. package/script/service/mod.js +4 -3
  328. package/script/service/node.d.ts +1 -1
  329. package/script/service/node.d.ts.map +1 -1
  330. package/script/service/outbox_inbox.d.ts +76 -22
  331. package/script/service/outbox_inbox.d.ts.map +1 -1
  332. package/script/service/outbox_inbox.js +233 -70
  333. package/script/telemetry/metrics.d.ts +55 -0
  334. package/script/telemetry/metrics.d.ts.map +1 -1
  335. package/script/telemetry/metrics.js +88 -0
  336. package/script/telemetry/mod.d.ts +2 -1
  337. package/script/telemetry/mod.d.ts.map +1 -1
  338. package/script/telemetry/mod.js +3 -1
  339. package/script/trellis.d.ts +62 -30
  340. package/script/trellis.d.ts.map +1 -1
  341. package/script/trellis.js +124 -41
  342. package/src/auth/mod.ts +7 -0
  343. package/src/browser.ts +5 -7
  344. package/src/client_connect.ts +200 -12
  345. package/src/codec.ts +186 -11
  346. package/src/contract_support/canonical.ts +3 -0
  347. package/src/contract_support/mod.ts +380 -9
  348. package/src/contract_support/protocol.ts +57 -10
  349. package/src/contract_support/runtime.ts +7 -0
  350. package/src/errors/SchemaValidationError.ts +67 -0
  351. package/src/errors/index.ts +28 -0
  352. package/src/health.ts +0 -1
  353. package/src/index.ts +7 -8
  354. package/src/jobs.ts +138 -1
  355. package/src/sdk/_generated/auth/api.ts +38 -7
  356. package/src/sdk/_generated/auth/client.ts +168 -530
  357. package/src/sdk/_generated/auth/contract.ts +310 -93
  358. package/src/sdk/_generated/auth/mod.ts +0 -1
  359. package/src/sdk/_generated/auth/owned_api.ts +92 -86
  360. package/src/sdk/_generated/auth/schemas.ts +231 -92
  361. package/src/sdk/_generated/auth/types.ts +1069 -273
  362. package/src/sdk/_generated/core/api.ts +38 -7
  363. package/src/sdk/_generated/core/client.ts +47 -73
  364. package/src/sdk/_generated/core/contract.ts +91 -1
  365. package/src/sdk/_generated/core/mod.ts +0 -1
  366. package/src/sdk/_generated/core/owned_api.ts +4 -4
  367. package/src/sdk/_generated/core/schemas.ts +81 -0
  368. package/src/sdk/_generated/core/types.ts +79 -15
  369. package/src/sdk/_generated/health/api.ts +29 -5
  370. package/src/sdk/_generated/health/client.ts +11 -58
  371. package/src/sdk/_generated/health/contract.ts +2 -10
  372. package/src/sdk/_generated/health/mod.ts +0 -1
  373. package/src/sdk/_generated/health/owned_api.ts +2 -2
  374. package/src/sdk/_generated/health/schemas.ts +1 -9
  375. package/src/sdk/_generated/health/types.ts +23 -2
  376. package/src/sdk/_generated/jobs/api.ts +29 -5
  377. package/src/sdk/_generated/jobs/client.ts +25 -109
  378. package/src/sdk/_generated/jobs/contract.ts +269 -1
  379. package/src/sdk/_generated/jobs/mod.ts +0 -1
  380. package/src/sdk/_generated/jobs/owned_api.ts +30 -9
  381. package/src/sdk/_generated/jobs/schemas.ts +213 -0
  382. package/src/sdk/_generated/jobs/types.ts +252 -18
  383. package/src/sdk/_generated/state/api.ts +29 -5
  384. package/src/sdk/_generated/state/client.ts +18 -95
  385. package/src/sdk/_generated/state/mod.ts +0 -1
  386. package/src/sdk/_generated/state/owned_api.ts +7 -7
  387. package/src/sdk/_generated/state/types.ts +91 -15
  388. package/src/server/health.ts +2 -6
  389. package/src/server/health_schemas.ts +0 -6
  390. package/src/server/internal_jobs/bindings.ts +11 -0
  391. package/src/server/internal_jobs/job-manager.ts +553 -24
  392. package/src/server/internal_jobs/key-coordinator.ts +1080 -0
  393. package/src/server/internal_jobs/projection.ts +2 -0
  394. package/src/server/internal_jobs/runtime-worker.ts +17 -1
  395. package/src/server/internal_jobs/types.ts +6 -0
  396. package/src/server/runtime.ts +4 -0
  397. package/src/server/service.ts +645 -625
  398. package/src/server.ts +14 -7
  399. package/src/service/deno.ts +0 -5
  400. package/src/service/drizzle.ts +184 -0
  401. package/src/service/mod.ts +17 -7
  402. package/src/service/node.ts +0 -5
  403. package/src/service/outbox_inbox.ts +354 -88
  404. package/src/telemetry/metrics.ts +198 -1
  405. package/src/telemetry/mod.ts +6 -0
  406. package/src/trellis.ts +286 -105
@@ -5,7 +5,7 @@ import { canonicalizeJson, digestJson, isJsonValue, sha256Base64urlSync, } from
5
5
  import { schema, unwrapSchema, } from "./runtime.js";
6
6
  import { assertDataPointersExistAndAreTokenable, getSubschemaAtDataPointer, } from "./schema_pointers.js";
7
7
  import { ContractEventConsumersSchema, ContractJobQueueSchema, ContractResourcesSchema, ContractSchemaRefSchema, ContractStateSchema, } from "./protocol.js";
8
- export { buildCursorPage, buildPageResponse, ContractEventConsumerGroupSchema, ContractEventConsumerSelfSchema, ContractEventConsumersSchema, ContractEventConsumerUsesSchema, ContractJobQueueSchema, ContractJobsSchema, ContractKvResourceSchema, ContractResourceBindingsSchema, ContractResourcesSchema, ContractSchemaRefSchema, ContractStateSchema, ContractStateStoreSchema, ContractStoreResourceSchema, CursorPageInfoSchema, CursorPageSchema, CursorQuerySchema, EventConsumerResourceBindingSchema, EventHeaderSchema, InstalledServiceContractSchema, IsoDateSchema, JobsQueueBindingSchema, JobsResourceBindingSchema, KvResourceBindingSchema, normalizeCursorQuery, normalizePageQuery, PageRequestSchema, PageResponseSchema, StoreResourceBindingSchema, } from "./protocol.js";
8
+ export { buildCursorPage, buildPageResponse, ContractEventConsumerGroupSchema, ContractEventConsumerSelfSchema, ContractEventConsumersSchema, ContractEventConsumerUsesSchema, ContractJobQueueSchema, ContractJobsSchema, ContractKvResourceSchema, ContractResourceBindingsSchema, ContractResourcesSchema, ContractSchemaRefSchema, ContractStateSchema, ContractStateStoreSchema, ContractStoreResourceSchema, CursorPageInfoSchema, CursorPageSchema, CursorQuerySchema, EventConsumerResourceBindingSchema, InstalledServiceContractSchema, IsoDateSchema, JobKeyConcurrencySchema, JobQueueDepthSchema, JobsQueueBindingSchema, JobsQueueDepthBindingSchema, JobsQueueKeyConcurrencyBindingSchema, JobsResourceBindingSchema, KvResourceBindingSchema, normalizeCursorQuery, normalizePageQuery, PageRequestSchema, PageResponseSchema, StoreResourceBindingSchema, } from "./protocol.js";
9
9
  export { assertDataPointersExistAndAreTokenable, getSubschemaAtDataPointer, } from "./schema_pointers.js";
10
10
  export const CONTRACT_FORMAT_V1 = "trellis.contract.v1";
11
11
  export const CATALOG_FORMAT_V1 = "trellis.catalog.v1";
@@ -108,6 +108,7 @@ const ContractOperationSchema = Type.Object({
108
108
  input: ContractSchemaRefSchema,
109
109
  progress: Type.Optional(ContractSchemaRefSchema),
110
110
  output: ContractSchemaRefSchema,
111
+ errors: Type.Optional(Type.Array(ContractErrorRefSchema)),
111
112
  transfer: Type.Optional(OperationTransferSchema),
112
113
  capabilities: Type.Optional(OperationCapabilitiesSchema),
113
114
  signals: Type.Optional(Type.Record(NonEmptyStringSchema, ContractOperationSignalSchema)),
@@ -554,6 +555,10 @@ function collectReachableSchemaNames(contract) {
554
555
  for (const signal of Object.values(operation.signals ?? {})) {
555
556
  collectSchemaRef(reachableSchemas, signal.input);
556
557
  }
558
+ for (const error of operation.errors ?? []) {
559
+ const declaration = Object.values(contract.errors ?? {}).find((decl) => decl.type === error.type);
560
+ collectSchemaRef(reachableSchemas, declaration?.schema);
561
+ }
557
562
  }
558
563
  for (const event of Object.values(contract.events ?? {})) {
559
564
  collectSchemaRef(reachableSchemas, event.event);
@@ -592,6 +597,19 @@ function projectRpcDeclaredErrors(contract) {
592
597
  const entries = Object.entries(contract.errors).filter(([, error]) => declaredErrorTypes.has(error.type));
593
598
  return entries.length > 0 ? Object.fromEntries(entries) : undefined;
594
599
  }
600
+ function projectOperationDeclaredErrors(contract) {
601
+ if (!contract.errors) {
602
+ return undefined;
603
+ }
604
+ const declaredErrorTypes = new Set();
605
+ for (const operation of Object.values(contract.operations ?? {})) {
606
+ for (const error of operation.errors ?? []) {
607
+ declaredErrorTypes.add(error.type);
608
+ }
609
+ }
610
+ const entries = Object.entries(contract.errors).filter(([, error]) => declaredErrorTypes.has(error.type));
611
+ return entries.length > 0 ? Object.fromEntries(entries) : undefined;
612
+ }
595
613
  function projectDigestResources(resources) {
596
614
  if (!resources?.kv && !resources?.store) {
597
615
  return undefined;
@@ -733,6 +751,12 @@ function projectDigestOperations(operations) {
733
751
  },
734
752
  }
735
753
  : {}),
754
+ ...(operation.errors
755
+ ? {
756
+ errors: sortedUnique(operation.errors.map((error) => error.type))
757
+ .map((type) => ({ type })),
758
+ }
759
+ : {}),
736
760
  },
737
761
  ];
738
762
  }));
@@ -939,6 +963,9 @@ function operation(operation) {
939
963
  })),
940
964
  }
941
965
  : {}),
966
+ ...(operation.errors
967
+ ? { errors: operation.errors.map((error) => ({ type: error.type })) }
968
+ : {}),
942
969
  ...(operation.cancel !== undefined ? { cancel: operation.cancel } : {}),
943
970
  ...(operation.docs ? { docs: contractDocs(operation.docs) } : {}),
944
971
  };
@@ -1009,7 +1036,71 @@ function errorDecl(error) {
1009
1036
  ...(error.schema ? { schema: schemaRef(error.schema) } : {}),
1010
1037
  };
1011
1038
  }
1012
- function jobQueue(queue) {
1039
+ function assertValidJsonPointerSyntax(queueType, pointer) {
1040
+ if (!pointer.startsWith("/")) {
1041
+ throw new Error(`jobs queue '${queueType}' keyConcurrency.key pointer segment '${pointer}' must start with '/'`);
1042
+ }
1043
+ for (let index = 0; index < pointer.length; index += 1) {
1044
+ if (pointer[index] !== "~")
1045
+ continue;
1046
+ const escaped = pointer[index + 1];
1047
+ if (escaped !== "0" && escaped !== "1") {
1048
+ throw new Error(`jobs queue '${queueType}' keyConcurrency.key pointer segment '${pointer}' has invalid JSON Pointer escape at offset ${index}; use '~0' for '~' and '~1' for '/'`);
1049
+ }
1050
+ index += 1;
1051
+ }
1052
+ }
1053
+ function assertValidJobKeyConcurrency(queueType, keyConcurrency) {
1054
+ if (!keyConcurrency)
1055
+ return;
1056
+ if (keyConcurrency.key.length === 0) {
1057
+ throw new Error(`jobs queue '${queueType}' keyConcurrency.key must contain at least one segment`);
1058
+ }
1059
+ for (const segment of keyConcurrency.key) {
1060
+ if (segment.length === 0) {
1061
+ throw new Error(`jobs queue '${queueType}' keyConcurrency.key segments must be non-empty strings`);
1062
+ }
1063
+ if (segment.startsWith("/")) {
1064
+ assertValidJsonPointerSyntax(queueType, segment);
1065
+ }
1066
+ }
1067
+ if (keyConcurrency.heartbeatIntervalMs !== undefined &&
1068
+ keyConcurrency.heartbeatTtlMs !== undefined &&
1069
+ keyConcurrency.heartbeatTtlMs <= keyConcurrency.heartbeatIntervalMs) {
1070
+ throw new Error(`jobs queue '${queueType}' keyConcurrency.heartbeatTtlMs must exceed heartbeatIntervalMs`);
1071
+ }
1072
+ }
1073
+ function jobKeyConcurrency(queueType, keyConcurrency) {
1074
+ assertValidJobKeyConcurrency(queueType, keyConcurrency);
1075
+ if (!keyConcurrency)
1076
+ return undefined;
1077
+ return {
1078
+ key: [...keyConcurrency.key],
1079
+ ...(keyConcurrency.maxActive !== undefined
1080
+ ? { maxActive: keyConcurrency.maxActive }
1081
+ : {}),
1082
+ ...(keyConcurrency.heartbeatIntervalMs !== undefined
1083
+ ? { heartbeatIntervalMs: keyConcurrency.heartbeatIntervalMs }
1084
+ : {}),
1085
+ ...(keyConcurrency.heartbeatTtlMs !== undefined
1086
+ ? { heartbeatTtlMs: keyConcurrency.heartbeatTtlMs }
1087
+ : {}),
1088
+ ...(keyConcurrency.stalePolicy !== undefined
1089
+ ? { stalePolicy: keyConcurrency.stalePolicy }
1090
+ : {}),
1091
+ };
1092
+ }
1093
+ function jobQueueDepth(queue) {
1094
+ if (!queue)
1095
+ return undefined;
1096
+ return {
1097
+ ...(queue.maxQueuedPerKey !== undefined
1098
+ ? { maxQueuedPerKey: queue.maxQueuedPerKey }
1099
+ : {}),
1100
+ ...(queue.whenFull !== undefined ? { whenFull: queue.whenFull } : {}),
1101
+ };
1102
+ }
1103
+ function jobQueue(queueType, queue) {
1013
1104
  return {
1014
1105
  payload: schemaRef(queue.payload),
1015
1106
  ...(queue.result ? { result: schemaRef(queue.result) } : {}),
@@ -1025,6 +1116,10 @@ function jobQueue(queue) {
1025
1116
  ...(queue.concurrency !== undefined
1026
1117
  ? { concurrency: queue.concurrency }
1027
1118
  : {}),
1119
+ ...(queue.keyConcurrency
1120
+ ? { keyConcurrency: jobKeyConcurrency(queueType, queue.keyConcurrency) }
1121
+ : {}),
1122
+ ...(queue.queue ? { queue: jobQueueDepth(queue.queue) } : {}),
1028
1123
  ...(queue.docs ? { docs: contractDocs(queue.docs) } : {}),
1029
1124
  };
1030
1125
  }
@@ -1093,7 +1188,14 @@ export function normalizeContractManifest(contract) {
1093
1188
  : {}),
1094
1189
  ...(contract.events ? { events: mapValues(contract.events, event) } : {}),
1095
1190
  ...(contract.feeds ? { feeds: mapValues(contract.feeds, feed) } : {}),
1096
- ...(contract.jobs ? { jobs: mapValues(contract.jobs, jobQueue) } : {}),
1191
+ ...(contract.jobs
1192
+ ? {
1193
+ jobs: Object.fromEntries(Object.entries(contract.jobs).map(([queueType, queue]) => [
1194
+ queueType,
1195
+ jobQueue(queueType, queue),
1196
+ ])),
1197
+ }
1198
+ : {}),
1097
1199
  ...(contract.eventConsumers
1098
1200
  ? {
1099
1201
  eventConsumers: mapValues(contract.eventConsumers, eventConsumerGroup),
@@ -1140,7 +1242,12 @@ export function parseContractManifest(value) {
1140
1242
  */
1141
1243
  export function projectContractDigestManifest(contract) {
1142
1244
  const schemas = projectReachableSchemas(contract);
1143
- const errors = projectRpcDeclaredErrors(contract);
1245
+ const rpcDeclaredErrors = projectRpcDeclaredErrors(contract);
1246
+ const operationDeclaredErrors = projectOperationDeclaredErrors(contract);
1247
+ const combinedErrors = { ...rpcDeclaredErrors, ...operationDeclaredErrors };
1248
+ const errors = Object.keys(combinedErrors).length > 0
1249
+ ? combinedErrors
1250
+ : undefined;
1144
1251
  const state = projectDigestState(contract.state);
1145
1252
  const resources = projectDigestResources(contract.resources);
1146
1253
  const jobs = projectDigestJobs(contract.jobs);
@@ -1256,6 +1363,12 @@ function emitJobs(jobs) {
1256
1363
  ...(queue.concurrency !== undefined
1257
1364
  ? { concurrency: queue.concurrency }
1258
1365
  : {}),
1366
+ ...(queue.keyConcurrency
1367
+ ? {
1368
+ keyConcurrency: jobKeyConcurrency(queueType, queue.keyConcurrency),
1369
+ }
1370
+ : {}),
1371
+ ...(queue.queue ? { queue: jobQueueDepth(queue.queue) } : {}),
1259
1372
  ...(queue.docs ? { docs: contractDocs(queue.docs) } : {}),
1260
1373
  },
1261
1374
  ]));
@@ -1480,6 +1593,9 @@ function emitContract(source) {
1480
1593
  if (operation.docs) {
1481
1594
  emitted.docs = contractDocs(operation.docs);
1482
1595
  }
1596
+ if (operation.errors && operation.errors.length > 0) {
1597
+ emitted.errors = sortedUnique(operation.errors.map((errorName) => source.errors?.[errorName]?.type ?? errorName)).map((type) => ({ type }));
1598
+ }
1483
1599
  return [name, emitted];
1484
1600
  }))
1485
1601
  : undefined;
@@ -1643,6 +1759,12 @@ function buildOwnedApi(source) {
1643
1759
  cancelCapabilities: projectCapabilities(operation.capabilities?.cancel, source.id, source.capabilities, `operation '${name}' cancel capabilities`) ?? [],
1644
1760
  controlCapabilities: projectCapabilities(operation.capabilities?.control, source.id, source.capabilities, `operation '${name}' control capabilities`) ?? [],
1645
1761
  cancel: operation.cancel,
1762
+ errors: operation.errors,
1763
+ declaredErrorTypes: operation.errors?.map((errorName) => source.errors?.[errorName]?.type ?? errorName),
1764
+ runtimeErrors: operation.errors?.flatMap((errorName) => {
1765
+ const runtimeError = localRuntimeErrors[errorName];
1766
+ return runtimeError ? [runtimeError] : [];
1767
+ }),
1646
1768
  },
1647
1769
  ]));
1648
1770
  const events = Object.fromEntries(Object.entries(source.events ?? {}).map(([name, event]) => {
@@ -1839,6 +1961,38 @@ export function defineError(options) {
1839
1961
  // fields on the generated class instance constructor return type.
1840
1962
  return DefinedErrorImpl;
1841
1963
  }
1964
+ /**
1965
+ * Attaches Trellis validation UX metadata to a TypeBox schema node.
1966
+ *
1967
+ * When a request fails schema validation before handler dispatch, the metadata
1968
+ * is used to produce a `SchemaValidationError` with stable field-level issue
1969
+ * information that UIs can use without needing service-specific error handling.
1970
+ *
1971
+ * @template T The schema type.
1972
+ * @param schema The TypeBox schema to annotate.
1973
+ * @param extension The validation extension with labels, notes, and per-keyword issue hints.
1974
+ * @returns The same schema type with `x-trellis-validation` attached.
1975
+ *
1976
+ * @example
1977
+ * ```ts
1978
+ * const MySchema = Type.Object({
1979
+ * name: withTrellisValidation(Type.String({ minLength: 1 }), {
1980
+ * label: "Name",
1981
+ * issues: {
1982
+ * minLength: {
1983
+ * code: "my.name.required",
1984
+ * message: "Enter a name.",
1985
+ * },
1986
+ * },
1987
+ * }),
1988
+ * });
1989
+ * ```
1990
+ */
1991
+ export function withTrellisValidation(schema, extension) {
1992
+ const cloned = { ...schema };
1993
+ cloned["x-trellis-validation"] = extension;
1994
+ return cloned;
1995
+ }
1842
1996
  function createUseHelper(getContractModule) {
1843
1997
  return ((spec) => {
1844
1998
  const contractModule = getContractModule();
@@ -2190,4 +2344,4 @@ export function defineDeviceContract(...args) {
2190
2344
  }
2191
2345
  return defineClientContract("device", registryOrBuild, maybeBuild);
2192
2346
  }
2193
- export { canonicalizeJson, digestJson, isJsonValue, schema, unwrapSchema };
2347
+ export { canonicalizeJson, digestJson, isJsonValue, schema, sha256Base64urlSync, unwrapSchema, };
@@ -65,6 +65,19 @@ export declare const ContractStateSchema: Type.TRecord<"^.*$", Type.TObject<{
65
65
  }>>;
66
66
  }>>;
67
67
  export type ContractState = Static<typeof ContractStateSchema>;
68
+ export declare const JobKeyConcurrencySchema: Type.TObject<{
69
+ key: Type.TArray<Type.TString>;
70
+ maxActive: Type.TOptional<Type.TInteger>;
71
+ heartbeatIntervalMs: Type.TOptional<Type.TInteger>;
72
+ heartbeatTtlMs: Type.TOptional<Type.TInteger>;
73
+ stalePolicy: Type.TOptional<Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>>;
74
+ }>;
75
+ export type JobKeyConcurrency = Static<typeof JobKeyConcurrencySchema>;
76
+ export declare const JobQueueDepthSchema: Type.TObject<{
77
+ maxQueuedPerKey: Type.TOptional<Type.TInteger>;
78
+ whenFull: Type.TOptional<Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>>;
79
+ }>;
80
+ export type JobQueueDepth = Static<typeof JobQueueDepthSchema>;
68
81
  export declare const ContractJobQueueSchema: Type.TObject<{
69
82
  payload: Type.TObject<{
70
83
  schema: Type.TString;
@@ -80,6 +93,17 @@ export declare const ContractJobQueueSchema: Type.TObject<{
80
93
  logs: Type.TOptional<Type.TBoolean>;
81
94
  dlq: Type.TOptional<Type.TBoolean>;
82
95
  concurrency: Type.TOptional<Type.TInteger>;
96
+ keyConcurrency: Type.TOptional<Type.TObject<{
97
+ key: Type.TArray<Type.TString>;
98
+ maxActive: Type.TOptional<Type.TInteger>;
99
+ heartbeatIntervalMs: Type.TOptional<Type.TInteger>;
100
+ heartbeatTtlMs: Type.TOptional<Type.TInteger>;
101
+ stalePolicy: Type.TOptional<Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>>;
102
+ }>>;
103
+ queue: Type.TOptional<Type.TObject<{
104
+ maxQueuedPerKey: Type.TOptional<Type.TInteger>;
105
+ whenFull: Type.TOptional<Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>>;
106
+ }>>;
83
107
  docs: Type.TOptional<Type.TObject<{
84
108
  summary: Type.TOptional<Type.TString>;
85
109
  markdown: Type.TString;
@@ -101,6 +125,17 @@ export declare const ContractJobsSchema: Type.TRecord<"^.*$", Type.TObject<{
101
125
  logs: Type.TOptional<Type.TBoolean>;
102
126
  dlq: Type.TOptional<Type.TBoolean>;
103
127
  concurrency: Type.TOptional<Type.TInteger>;
128
+ keyConcurrency: Type.TOptional<Type.TObject<{
129
+ key: Type.TArray<Type.TString>;
130
+ maxActive: Type.TOptional<Type.TInteger>;
131
+ heartbeatIntervalMs: Type.TOptional<Type.TInteger>;
132
+ heartbeatTtlMs: Type.TOptional<Type.TInteger>;
133
+ stalePolicy: Type.TOptional<Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>>;
134
+ }>>;
135
+ queue: Type.TOptional<Type.TObject<{
136
+ maxQueuedPerKey: Type.TOptional<Type.TInteger>;
137
+ whenFull: Type.TOptional<Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>>;
138
+ }>>;
104
139
  docs: Type.TOptional<Type.TObject<{
105
140
  summary: Type.TOptional<Type.TString>;
106
141
  markdown: Type.TString;
@@ -183,6 +218,19 @@ export declare const StoreResourceBindingSchema: Type.TObject<{
183
218
  maxTotalBytes: Type.TOptional<Type.TInteger>;
184
219
  }>;
185
220
  export type StoreResourceBinding = Static<typeof StoreResourceBindingSchema>;
221
+ export declare const JobsQueueKeyConcurrencyBindingSchema: Type.TObject<{
222
+ key: Type.TArray<Type.TString>;
223
+ maxActive: Type.TInteger;
224
+ heartbeatIntervalMs: Type.TInteger;
225
+ heartbeatTtlMs: Type.TInteger;
226
+ stalePolicy: Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>;
227
+ }>;
228
+ export type JobsQueueKeyConcurrencyBinding = Static<typeof JobsQueueKeyConcurrencyBindingSchema>;
229
+ export declare const JobsQueueDepthBindingSchema: Type.TObject<{
230
+ maxQueuedPerKey: Type.TInteger;
231
+ whenFull: Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>;
232
+ }>;
233
+ export type JobsQueueDepthBinding = Static<typeof JobsQueueDepthBindingSchema>;
186
234
  export declare const JobsQueueBindingSchema: Type.TObject<{
187
235
  queueType: Type.TString;
188
236
  publishPrefix: Type.TString;
@@ -202,6 +250,17 @@ export declare const JobsQueueBindingSchema: Type.TObject<{
202
250
  logs: Type.TBoolean;
203
251
  dlq: Type.TBoolean;
204
252
  concurrency: Type.TInteger;
253
+ keyConcurrency: Type.TOptional<Type.TObject<{
254
+ key: Type.TArray<Type.TString>;
255
+ maxActive: Type.TInteger;
256
+ heartbeatIntervalMs: Type.TInteger;
257
+ heartbeatTtlMs: Type.TInteger;
258
+ stalePolicy: Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>;
259
+ }>>;
260
+ queue: Type.TOptional<Type.TObject<{
261
+ maxQueuedPerKey: Type.TInteger;
262
+ whenFull: Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>;
263
+ }>>;
205
264
  }>;
206
265
  export type JobsQueueBinding = Static<typeof JobsQueueBindingSchema>;
207
266
  export declare const JobsResourceBindingSchema: Type.TObject<{
@@ -226,6 +285,17 @@ export declare const JobsResourceBindingSchema: Type.TObject<{
226
285
  logs: Type.TBoolean;
227
286
  dlq: Type.TBoolean;
228
287
  concurrency: Type.TInteger;
288
+ keyConcurrency: Type.TOptional<Type.TObject<{
289
+ key: Type.TArray<Type.TString>;
290
+ maxActive: Type.TInteger;
291
+ heartbeatIntervalMs: Type.TInteger;
292
+ heartbeatTtlMs: Type.TInteger;
293
+ stalePolicy: Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>;
294
+ }>>;
295
+ queue: Type.TOptional<Type.TObject<{
296
+ maxQueuedPerKey: Type.TInteger;
297
+ whenFull: Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>;
298
+ }>>;
229
299
  }>>;
230
300
  }>;
231
301
  export type JobsResourceBinding = Static<typeof JobsResourceBindingSchema>;
@@ -276,6 +346,17 @@ export declare const ContractResourceBindingsSchema: Type.TObject<{
276
346
  logs: Type.TBoolean;
277
347
  dlq: Type.TBoolean;
278
348
  concurrency: Type.TInteger;
349
+ keyConcurrency: Type.TOptional<Type.TObject<{
350
+ key: Type.TArray<Type.TString>;
351
+ maxActive: Type.TInteger;
352
+ heartbeatIntervalMs: Type.TInteger;
353
+ heartbeatTtlMs: Type.TInteger;
354
+ stalePolicy: Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>;
355
+ }>>;
356
+ queue: Type.TOptional<Type.TObject<{
357
+ maxQueuedPerKey: Type.TInteger;
358
+ whenFull: Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>;
359
+ }>>;
279
360
  }>>;
280
361
  }>>;
281
362
  eventConsumers: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
@@ -329,6 +410,17 @@ export declare const InstalledServiceContractSchema: Type.TObject<{
329
410
  logs: Type.TBoolean;
330
411
  dlq: Type.TBoolean;
331
412
  concurrency: Type.TInteger;
413
+ keyConcurrency: Type.TOptional<Type.TObject<{
414
+ key: Type.TArray<Type.TString>;
415
+ maxActive: Type.TInteger;
416
+ heartbeatIntervalMs: Type.TInteger;
417
+ heartbeatTtlMs: Type.TInteger;
418
+ stalePolicy: Type.TUnion<[Type.TLiteral<"fail-stale">, Type.TLiteral<"block">]>;
419
+ }>>;
420
+ queue: Type.TOptional<Type.TObject<{
421
+ maxQueuedPerKey: Type.TInteger;
422
+ whenFull: Type.TUnion<[Type.TLiteral<"reject">, Type.TLiteral<"coalesce">, Type.TLiteral<"replace-oldest">]>;
423
+ }>>;
332
424
  }>>;
333
425
  }>>;
334
426
  eventConsumers: Type.TOptional<Type.TRecord<"^.*$", Type.TObject<{
@@ -346,13 +438,6 @@ export declare const InstalledServiceContractSchema: Type.TObject<{
346
438
  }>;
347
439
  export type InstalledServiceContract = Static<typeof InstalledServiceContractSchema>;
348
440
  export declare const IsoDateSchema: Type.TCodec<Type.TString, Date>;
349
- export declare const EventHeaderSchema: Type.TObject<{
350
- header: Type.TObject<{
351
- id: Type.TString;
352
- time: Type.TCodec<Type.TString, Date>;
353
- }>;
354
- }>;
355
- export type EventHeader = Static<typeof EventHeaderSchema>;
356
441
  /** Schema for a bounded pagination request. */
357
442
  export declare const PageRequestSchema: Type.TObject<{
358
443
  offset: Type.TOptional<Type.TInteger>;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources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B,GAAG;IAC/B,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,kBAAuB,GAC/B,qBAAqB,CAgBvB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,CAAC,EAAE,EACV,UAAU,CAAC,EAAE,MAAM,GAClB,UAAU,CAAC,CAAC,CAAC,CAKf"}
@@ -47,6 +47,24 @@ export const ContractStateStoreSchema = Type.Object({
47
47
  docs: Type.Optional(ContractDocsSchema),
48
48
  });
49
49
  export const ContractStateSchema = Type.Record(Type.String({ minLength: 1 }), ContractStateStoreSchema);
50
+ export const JobKeyConcurrencySchema = Type.Object({
51
+ key: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
52
+ maxActive: Type.Optional(Type.Integer({ minimum: 1 })),
53
+ heartbeatIntervalMs: Type.Optional(Type.Integer({ minimum: 1 })),
54
+ heartbeatTtlMs: Type.Optional(Type.Integer({ minimum: 1 })),
55
+ stalePolicy: Type.Optional(Type.Union([
56
+ Type.Literal("fail-stale"),
57
+ Type.Literal("block"),
58
+ ])),
59
+ });
60
+ export const JobQueueDepthSchema = Type.Object({
61
+ maxQueuedPerKey: Type.Optional(Type.Integer({ minimum: 0 })),
62
+ whenFull: Type.Optional(Type.Union([
63
+ Type.Literal("reject"),
64
+ Type.Literal("coalesce"),
65
+ Type.Literal("replace-oldest"),
66
+ ])),
67
+ });
50
68
  export const ContractJobQueueSchema = Type.Object({
51
69
  payload: ContractSchemaRefSchema,
52
70
  result: Type.Optional(ContractSchemaRefSchema),
@@ -58,6 +76,8 @@ export const ContractJobQueueSchema = Type.Object({
58
76
  logs: Type.Optional(Type.Boolean()),
59
77
  dlq: Type.Optional(Type.Boolean()),
60
78
  concurrency: Type.Optional(Type.Integer({ minimum: 1 })),
79
+ keyConcurrency: Type.Optional(JobKeyConcurrencySchema),
80
+ queue: Type.Optional(JobQueueDepthSchema),
61
81
  docs: Type.Optional(ContractDocsSchema),
62
82
  });
63
83
  export const ContractJobsSchema = Type.Record(Type.String({ minLength: 1 }), ContractJobQueueSchema);
@@ -94,6 +114,24 @@ export const StoreResourceBindingSchema = Type.Object({
94
114
  maxObjectBytes: Type.Optional(Type.Integer({ minimum: 1 })),
95
115
  maxTotalBytes: Type.Optional(Type.Integer({ minimum: 1 })),
96
116
  });
117
+ export const JobsQueueKeyConcurrencyBindingSchema = Type.Object({
118
+ key: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
119
+ maxActive: Type.Integer({ minimum: 1 }),
120
+ heartbeatIntervalMs: Type.Integer({ minimum: 1 }),
121
+ heartbeatTtlMs: Type.Integer({ minimum: 1 }),
122
+ stalePolicy: Type.Union([
123
+ Type.Literal("fail-stale"),
124
+ Type.Literal("block"),
125
+ ]),
126
+ });
127
+ export const JobsQueueDepthBindingSchema = Type.Object({
128
+ maxQueuedPerKey: Type.Integer({ minimum: 0 }),
129
+ whenFull: Type.Union([
130
+ Type.Literal("reject"),
131
+ Type.Literal("coalesce"),
132
+ Type.Literal("replace-oldest"),
133
+ ]),
134
+ });
97
135
  export const JobsQueueBindingSchema = Type.Object({
98
136
  queueType: Type.String({ minLength: 1 }),
99
137
  publishPrefix: Type.String({ minLength: 1 }),
@@ -109,6 +147,8 @@ export const JobsQueueBindingSchema = Type.Object({
109
147
  logs: Type.Boolean(),
110
148
  dlq: Type.Boolean(),
111
149
  concurrency: Type.Integer({ minimum: 1 }),
150
+ keyConcurrency: Type.Optional(JobsQueueKeyConcurrencyBindingSchema),
151
+ queue: Type.Optional(JobsQueueDepthBindingSchema),
112
152
  });
113
153
  export const JobsResourceBindingSchema = Type.Object({
114
154
  namespace: Type.String({ minLength: 1 }),
@@ -140,12 +180,6 @@ export const InstalledServiceContractSchema = Type.Object({
140
180
  export const IsoDateSchema = Type.Codec(Type.String({ format: "date-time" }))
141
181
  .Decode((value) => parseIsoDate(value))
142
182
  .Encode((value) => formatIsoDate(value));
143
- export const EventHeaderSchema = Type.Object({
144
- header: Type.Object({
145
- id: Type.String(),
146
- time: IsoDateSchema,
147
- }),
148
- });
149
183
  /** Schema for a bounded pagination request. */
150
184
  export const PageRequestSchema = Type.Object({
151
185
  offset: Type.Optional(Type.Integer({ minimum: 0 })),
@@ -203,7 +237,7 @@ export function buildPageResponse(entries, totalCount, query, maxLimit) {
203
237
  /** Schema for a cursor pagination query. */
204
238
  export const CursorQuerySchema = Type.Object({
205
239
  cursor: Type.Optional(Type.String({ minLength: 1 })),
206
- limit: Type.Optional(Type.Integer({ minimum: 0 })),
240
+ limit: Type.Optional(Type.Integer({ minimum: 0, maximum: 500 })),
207
241
  });
208
242
  /** Schema for cursor pagination response metadata. */
209
243
  export const CursorPageInfoSchema = Type.Object({
@@ -51,11 +51,14 @@ export type FeedDesc<I extends SchemaLike = SchemaLike, E extends SchemaLike = S
51
51
  event: E;
52
52
  subscribeCapabilities: readonly string[];
53
53
  };
54
- export type OperationDesc<I extends SchemaLike = SchemaLike, P extends SchemaLike | undefined = SchemaLike | undefined, O extends SchemaLike | undefined = SchemaLike | undefined> = {
54
+ export type OperationDesc<I extends SchemaLike = SchemaLike, P extends SchemaLike | undefined = SchemaLike | undefined, O extends SchemaLike | undefined = SchemaLike | undefined, E extends readonly string[] | undefined = readonly string[] | undefined, TRuntimeErrors extends readonly RuntimeRpcErrorDesc[] | undefined = readonly RuntimeRpcErrorDesc[] | undefined> = {
55
55
  subject: string;
56
56
  input: I;
57
57
  progress?: P;
58
58
  output?: O;
59
+ errors?: E;
60
+ runtimeErrors?: TRuntimeErrors;
61
+ declaredErrorTypes?: readonly string[];
59
62
  transfer?: {
60
63
  direction: "send";
61
64
  store: string;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/contract_support/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,CAAC,CAAC,GAAG,OAAO,IAAI,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5B,MAAM,MAAM,aAAa,CACvB,KAAK,SAAS,qBAAqB,GAAG,qBAAqB,EAC3D,MAAM,SAAS,SAAS,GAAG,SAAS,IAClC;IACF,gBAAgB,CAAC,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAC7B,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7B,OAAO,SAAS,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,EAC/D,MAAM,SAAS,SAAS,GAAG,SAAS,IAClC;IACF,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,CAAC,EAAE,OAAO,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AC;IAC7B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import Type, { type Static } from "typebox";
2
+ import { TrellisError } from "./TrellisError.js";
3
+ export declare const SchemaValidationIssueSchema: Type.TObject<{
4
+ path: Type.TString;
5
+ schemaPath: Type.TOptional<Type.TString>;
6
+ keyword: Type.TString;
7
+ code: Type.TString;
8
+ message: Type.TString;
9
+ label: Type.TOptional<Type.TString>;
10
+ note: Type.TOptional<Type.TString>;
11
+ i18nKey: Type.TOptional<Type.TString>;
12
+ severity: Type.TOptional<Type.TUnion<[Type.TLiteral<"error">, Type.TLiteral<"warning">, Type.TLiteral<"info">]>>;
13
+ params: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
14
+ }>;
15
+ export type SchemaValidationIssue = Static<typeof SchemaValidationIssueSchema>;
16
+ export declare const SchemaValidationErrorDataSchema: Type.TObject<{
17
+ id: Type.TString;
18
+ type: Type.TLiteral<"SchemaValidationError">;
19
+ message: Type.TString;
20
+ issues: Type.TArray<Type.TObject<{
21
+ path: Type.TString;
22
+ schemaPath: Type.TOptional<Type.TString>;
23
+ keyword: Type.TString;
24
+ code: Type.TString;
25
+ message: Type.TString;
26
+ label: Type.TOptional<Type.TString>;
27
+ note: Type.TOptional<Type.TString>;
28
+ i18nKey: Type.TOptional<Type.TString>;
29
+ severity: Type.TOptional<Type.TUnion<[Type.TLiteral<"error">, Type.TLiteral<"warning">, Type.TLiteral<"info">]>>;
30
+ params: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
31
+ }>>;
32
+ context: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
33
+ traceId: Type.TOptional<Type.TString>;
34
+ }>;
35
+ export type SchemaValidationErrorData = Static<typeof SchemaValidationErrorDataSchema>;
36
+ export declare class SchemaValidationError extends TrellisError<SchemaValidationErrorData> {
37
+ #private;
38
+ readonly name: "SchemaValidationError";
39
+ constructor(options: {
40
+ issues: SchemaValidationIssue[];
41
+ context?: Record<string, unknown>;
42
+ cause?: unknown;
43
+ id?: string;
44
+ });
45
+ /** The validation issues that caused this error. */
46
+ get issues(): readonly SchemaValidationIssue[];
47
+ toSerializable(): SchemaValidationErrorData;
48
+ }
49
+ //# sourceMappingURL=SchemaValidationError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaValidationError.d.ts","sourceRoot":"","sources":["../../src/errors/SchemaValidationError.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,eAAO,MAAM,2BAA2B;;;;;;;;;;;EAetC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE/E,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;EAO1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAC5C,OAAO,+BAA+B,CACvC,CAAC;AAEF,qBAAa,qBACX,SAAQ,YAAY,CAAC,yBAAyB,CAAC;;IAC/C,SAAkB,IAAI,EAAG,uBAAuB,CAAU;gBAIxD,OAAO,EAAE;QACP,MAAM,EAAE,qBAAqB,EAAE,CAAC;QAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAClC,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,EAAE,CAAC,EAAE,MAAM,CAAC;KACb;IAUH,oDAAoD;IACpD,IAAI,MAAM,IAAI,SAAS,qBAAqB,EAAE,CAE7C;IAEQ,cAAc,IAAI,yBAAyB;CAOrD"}