@qlever-llc/trellis 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/README.md +16 -2
  2. package/esm/_dnt.polyfills.d.ts +11 -0
  3. package/esm/_dnt.polyfills.d.ts.map +1 -1
  4. package/esm/_dnt.polyfills.js +14 -0
  5. package/esm/_dnt.shims.d.ts +6 -0
  6. package/esm/_dnt.shims.d.ts.map +1 -0
  7. package/esm/_dnt.shims.js +61 -0
  8. package/esm/auth/browser/login.d.ts +27 -0
  9. package/esm/auth/browser/login.d.ts.map +1 -0
  10. package/esm/auth/browser/login.js +94 -0
  11. package/esm/auth/browser/portal.d.ts +11 -0
  12. package/esm/auth/browser/portal.d.ts.map +1 -0
  13. package/esm/auth/browser/portal.js +33 -0
  14. package/esm/auth/browser/session.d.ts +19 -0
  15. package/esm/auth/browser/session.d.ts.map +1 -0
  16. package/esm/auth/browser/session.js +65 -0
  17. package/esm/auth/browser/storage.d.ts +12 -0
  18. package/esm/auth/browser/storage.d.ts.map +1 -0
  19. package/esm/auth/browser/storage.js +61 -0
  20. package/esm/auth/browser.d.ts +13 -0
  21. package/esm/auth/browser.d.ts.map +1 -0
  22. package/esm/auth/browser.js +11 -0
  23. package/esm/auth/keys.d.ts +5 -0
  24. package/esm/auth/keys.d.ts.map +1 -0
  25. package/esm/auth/keys.js +50 -0
  26. package/esm/auth/mod.d.ts +18 -0
  27. package/esm/auth/mod.d.ts.map +1 -0
  28. package/esm/auth/mod.js +17 -0
  29. package/esm/auth/proof.d.ts +9 -0
  30. package/esm/auth/proof.d.ts.map +1 -0
  31. package/esm/auth/proof.js +43 -0
  32. package/esm/auth/protocol.d.ts +1212 -0
  33. package/esm/auth/protocol.d.ts.map +1 -0
  34. package/esm/auth/protocol.js +682 -0
  35. package/esm/auth/schemas.d.ts +93 -0
  36. package/esm/auth/schemas.d.ts.map +1 -0
  37. package/esm/auth/schemas.js +64 -0
  38. package/esm/auth/session_auth.d.ts +20 -0
  39. package/esm/auth/session_auth.d.ts.map +1 -0
  40. package/esm/auth/session_auth.js +42 -0
  41. package/esm/auth/trellis_id.d.ts +2 -0
  42. package/esm/auth/trellis_id.d.ts.map +1 -0
  43. package/esm/auth/trellis_id.js +5 -0
  44. package/esm/auth/types.d.ts +8 -0
  45. package/esm/auth/types.d.ts.map +1 -0
  46. package/esm/auth/types.js +1 -0
  47. package/esm/auth/utils.d.ts +11 -0
  48. package/esm/auth/utils.d.ts.map +1 -0
  49. package/esm/auth/utils.js +68 -0
  50. package/esm/auth/workload_activation.d.ts +192 -0
  51. package/esm/auth/workload_activation.d.ts.map +1 -0
  52. package/esm/auth/workload_activation.js +290 -0
  53. package/esm/contracts/canonical.d.ts +14 -0
  54. package/esm/contracts/canonical.d.ts.map +1 -0
  55. package/esm/contracts/canonical.js +135 -0
  56. package/esm/contracts/mod.d.ts +462 -0
  57. package/esm/contracts/mod.d.ts.map +1 -0
  58. package/esm/contracts/mod.js +532 -0
  59. package/esm/contracts/protocol.d.ts +301 -0
  60. package/esm/contracts/protocol.d.ts.map +1 -0
  61. package/esm/contracts/protocol.js +130 -0
  62. package/esm/contracts/runtime.d.ts +48 -0
  63. package/esm/contracts/runtime.d.ts.map +1 -0
  64. package/esm/contracts/runtime.js +9 -0
  65. package/esm/contracts/schema_pointers.d.ts +18 -0
  66. package/esm/contracts/schema_pointers.d.ts.map +1 -0
  67. package/esm/contracts/schema_pointers.js +59 -0
  68. package/esm/server/deno.d.ts +7 -0
  69. package/esm/server/deno.d.ts.map +1 -0
  70. package/esm/server/deno.js +16 -0
  71. package/esm/server/health.d.ts +92 -0
  72. package/esm/server/health.d.ts.map +1 -0
  73. package/esm/server/health.js +74 -0
  74. package/esm/server/health_rpc.d.ts +16 -0
  75. package/esm/server/health_rpc.d.ts.map +1 -0
  76. package/esm/server/health_rpc.js +23 -0
  77. package/esm/server/health_schemas.d.ts +20 -0
  78. package/esm/server/health_schemas.d.ts.map +1 -0
  79. package/esm/server/health_schemas.js +18 -0
  80. package/esm/server/mod.d.ts +17 -0
  81. package/esm/server/mod.d.ts.map +1 -0
  82. package/esm/server/mod.js +17 -0
  83. package/esm/server/node.d.ts +7 -0
  84. package/esm/server/node.d.ts.map +1 -0
  85. package/esm/server/node.js +16 -0
  86. package/esm/server/runtime.d.ts +16 -0
  87. package/esm/server/runtime.d.ts.map +1 -0
  88. package/esm/server/runtime.js +1 -0
  89. package/esm/server/service.d.ts +121 -0
  90. package/esm/server/service.d.ts.map +1 -0
  91. package/esm/server/service.js +256 -0
  92. package/esm/server/subscription.d.ts +99 -0
  93. package/esm/server/subscription.d.ts.map +1 -0
  94. package/esm/server/subscription.js +25 -0
  95. package/esm/telemetry/carrier.d.ts +9 -0
  96. package/esm/telemetry/carrier.d.ts.map +1 -0
  97. package/esm/telemetry/carrier.js +20 -0
  98. package/esm/telemetry/core.d.ts +8 -0
  99. package/esm/telemetry/core.d.ts.map +1 -0
  100. package/esm/telemetry/core.js +14 -0
  101. package/esm/telemetry/env.d.ts +2 -0
  102. package/esm/telemetry/env.d.ts.map +1 -0
  103. package/esm/telemetry/env.js +10 -0
  104. package/esm/telemetry/mod.d.ts +11 -0
  105. package/esm/telemetry/mod.d.ts.map +1 -0
  106. package/esm/telemetry/mod.js +7 -0
  107. package/esm/telemetry/nats.d.ts +7 -0
  108. package/esm/telemetry/nats.d.ts.map +1 -0
  109. package/esm/telemetry/nats.js +6 -0
  110. package/esm/telemetry/result.d.ts +2 -0
  111. package/esm/telemetry/result.d.ts.map +1 -0
  112. package/esm/telemetry/result.js +18 -0
  113. package/esm/telemetry/runtime.d.ts +2 -0
  114. package/esm/telemetry/runtime.d.ts.map +1 -0
  115. package/esm/telemetry/runtime.js +53 -0
  116. package/esm/telemetry/trace.d.ts +5 -0
  117. package/esm/telemetry/trace.d.ts.map +1 -0
  118. package/esm/telemetry/trace.js +26 -0
  119. package/esm/telemetry/trellis.d.ts +3 -0
  120. package/esm/telemetry/trellis.d.ts.map +1 -0
  121. package/esm/telemetry/trellis.js +7 -0
  122. package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts +12 -0
  123. package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +1 -0
  124. package/esm/trellis/_sdk/activity/_dnt.polyfills.js +15 -0
  125. package/esm/trellis/_sdk/activity/api.d.ts +10 -0
  126. package/esm/trellis/_sdk/activity/api.d.ts.map +1 -0
  127. package/esm/trellis/_sdk/activity/api.js +43 -0
  128. package/esm/trellis/_sdk/activity/contract.d.ts +8 -0
  129. package/esm/trellis/_sdk/activity/contract.d.ts.map +1 -0
  130. package/esm/trellis/_sdk/activity/contract.js +59 -0
  131. package/esm/trellis/_sdk/activity/mod.d.ts +7 -0
  132. package/esm/trellis/_sdk/activity/mod.d.ts.map +1 -0
  133. package/esm/trellis/_sdk/activity/mod.js +5 -0
  134. package/esm/trellis/_sdk/activity/package.json +3 -0
  135. package/esm/trellis/_sdk/activity/schemas.d.ts +607 -0
  136. package/esm/trellis/_sdk/activity/schemas.d.ts.map +1 -0
  137. package/esm/trellis/_sdk/activity/schemas.js +33 -0
  138. package/esm/trellis/_sdk/activity/types.d.ts +96 -0
  139. package/esm/trellis/_sdk/activity/types.d.ts.map +1 -0
  140. package/esm/trellis/_sdk/activity/types.js +3 -0
  141. package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts +12 -0
  142. package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +1 -0
  143. package/esm/trellis/_sdk/auth/_dnt.polyfills.js +15 -0
  144. package/esm/trellis/_sdk/auth/api.d.ts +10 -0
  145. package/esm/trellis/_sdk/auth/api.d.ts.map +1 -0
  146. package/esm/trellis/_sdk/auth/api.js +354 -0
  147. package/esm/trellis/_sdk/auth/contract.d.ts +28 -0
  148. package/esm/trellis/_sdk/auth/contract.d.ts.map +1 -0
  149. package/esm/trellis/_sdk/auth/contract.js +83 -0
  150. package/esm/trellis/_sdk/auth/mod.d.ts +7 -0
  151. package/esm/trellis/_sdk/auth/mod.d.ts.map +1 -0
  152. package/esm/trellis/_sdk/auth/mod.js +5 -0
  153. package/esm/trellis/_sdk/auth/package.json +3 -0
  154. package/esm/trellis/_sdk/auth/schemas.d.ts +8967 -0
  155. package/esm/trellis/_sdk/auth/schemas.d.ts.map +1 -0
  156. package/esm/trellis/_sdk/auth/schemas.js +306 -0
  157. package/esm/trellis/_sdk/auth/types.d.ts +1232 -0
  158. package/esm/trellis/_sdk/auth/types.d.ts.map +1 -0
  159. package/esm/trellis/_sdk/auth/types.js +3 -0
  160. package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts +12 -0
  161. package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts.map +1 -0
  162. package/esm/trellis/_sdk/core/_dnt.polyfills.js +15 -0
  163. package/esm/trellis/_sdk/core/api.d.ts +10 -0
  164. package/esm/trellis/_sdk/core/api.d.ts.map +1 -0
  165. package/esm/trellis/_sdk/core/api.js +36 -0
  166. package/esm/trellis/_sdk/core/contract.d.ts +8 -0
  167. package/esm/trellis/_sdk/core/contract.d.ts.map +1 -0
  168. package/esm/trellis/_sdk/core/contract.js +59 -0
  169. package/esm/trellis/_sdk/core/mod.d.ts +7 -0
  170. package/esm/trellis/_sdk/core/mod.d.ts.map +1 -0
  171. package/esm/trellis/_sdk/core/mod.js +5 -0
  172. package/esm/trellis/_sdk/core/package.json +3 -0
  173. package/esm/trellis/_sdk/core/schemas.d.ts +1144 -0
  174. package/esm/trellis/_sdk/core/schemas.d.ts.map +1 -0
  175. package/esm/trellis/_sdk/core/schemas.js +28 -0
  176. package/esm/trellis/_sdk/core/types.d.ts +176 -0
  177. package/esm/trellis/_sdk/core/types.d.ts.map +1 -0
  178. package/esm/trellis/_sdk/core/types.js +3 -0
  179. package/esm/trellis/auth/browser.d.ts +3 -0
  180. package/esm/trellis/auth/browser.d.ts.map +1 -0
  181. package/esm/trellis/auth/browser.js +2 -0
  182. package/esm/trellis/auth.d.ts +3 -0
  183. package/esm/trellis/auth.d.ts.map +1 -0
  184. package/esm/trellis/auth.js +2 -0
  185. package/esm/trellis/browser.d.ts +2 -7
  186. package/esm/trellis/browser.d.ts.map +1 -1
  187. package/esm/trellis/browser.js +2 -7
  188. package/esm/trellis/client.d.ts +6 -4
  189. package/esm/trellis/client.d.ts.map +1 -1
  190. package/esm/trellis/client.js +28 -1
  191. package/esm/trellis/codec.d.ts +4 -3
  192. package/esm/trellis/codec.d.ts.map +1 -1
  193. package/esm/trellis/codec.js +15 -2
  194. package/esm/trellis/contract.d.ts +11 -0
  195. package/esm/trellis/contract.d.ts.map +1 -0
  196. package/esm/trellis/contract.js +15 -0
  197. package/esm/trellis/contracts.d.ts +5 -0
  198. package/esm/trellis/contracts.d.ts.map +1 -0
  199. package/esm/trellis/contracts.js +3 -0
  200. package/esm/trellis/env.d.ts +1 -1
  201. package/esm/trellis/env.d.ts.map +1 -1
  202. package/esm/trellis/env.js +1 -1
  203. package/esm/trellis/errors/AuthError.d.ts +1 -1
  204. package/esm/trellis/errors/AuthError.d.ts.map +1 -1
  205. package/esm/trellis/errors/AuthError.js +11 -0
  206. package/esm/trellis/errors/RemoteError.d.ts +3 -3
  207. package/esm/trellis/errors/RemoteError.d.ts.map +1 -1
  208. package/esm/trellis/errors/RemoteError.js +3 -3
  209. package/esm/trellis/errors/TrellisError.d.ts +1 -1
  210. package/esm/trellis/errors/TrellisError.js +1 -1
  211. package/esm/trellis/errors/index.d.ts +2 -1
  212. package/esm/trellis/errors/index.d.ts.map +1 -1
  213. package/esm/trellis/errors/index.js +3 -2
  214. package/esm/trellis/globals.d.ts +9 -1
  215. package/esm/trellis/globals.d.ts.map +1 -1
  216. package/esm/trellis/globals.js +16 -8
  217. package/esm/trellis/helpers.d.ts +2 -1
  218. package/esm/trellis/helpers.d.ts.map +1 -1
  219. package/esm/trellis/helpers.js +1 -0
  220. package/esm/trellis/index.d.ts +13 -5
  221. package/esm/trellis/index.d.ts.map +1 -1
  222. package/esm/trellis/index.js +8 -3
  223. package/esm/trellis/kv.d.ts +10 -7
  224. package/esm/trellis/kv.d.ts.map +1 -1
  225. package/esm/trellis/kv.js +57 -34
  226. package/esm/trellis/models/trellis/TrellisError.d.ts +1 -1
  227. package/esm/trellis/models/trellis/TrellisError.js +1 -1
  228. package/esm/trellis/operations.d.ts +81 -0
  229. package/esm/trellis/operations.d.ts.map +1 -0
  230. package/esm/trellis/operations.js +206 -0
  231. package/esm/trellis/sdk/activity.d.ts +3 -0
  232. package/esm/trellis/sdk/activity.d.ts.map +1 -0
  233. package/esm/trellis/sdk/activity.js +2 -0
  234. package/esm/trellis/sdk/auth.d.ts +4 -0
  235. package/esm/trellis/sdk/auth.d.ts.map +1 -0
  236. package/esm/trellis/sdk/auth.js +3 -0
  237. package/esm/trellis/sdk/core.d.ts +4 -0
  238. package/esm/trellis/sdk/core.d.ts.map +1 -0
  239. package/esm/trellis/sdk/core.js +3 -0
  240. package/esm/trellis/server/deno.d.ts +3 -0
  241. package/esm/trellis/server/deno.d.ts.map +1 -0
  242. package/esm/trellis/server/deno.js +2 -0
  243. package/esm/trellis/server/health.d.ts +5 -0
  244. package/esm/trellis/server/health.d.ts.map +1 -0
  245. package/esm/trellis/server/health.js +3 -0
  246. package/esm/trellis/server/mod.d.ts +3 -0
  247. package/esm/trellis/server/mod.d.ts.map +1 -0
  248. package/esm/trellis/server/mod.js +2 -0
  249. package/esm/trellis/server/node.d.ts +3 -0
  250. package/esm/trellis/server/node.d.ts.map +1 -0
  251. package/esm/trellis/server/node.js +2 -0
  252. package/esm/trellis/server/runtime.d.ts +4 -0
  253. package/esm/trellis/server/runtime.d.ts.map +1 -0
  254. package/esm/trellis/server/runtime.js +2 -0
  255. package/esm/trellis/server.d.ts +21 -0
  256. package/esm/trellis/server.d.ts.map +1 -0
  257. package/esm/trellis/server.js +536 -0
  258. package/esm/trellis/server_logger.d.ts +3 -0
  259. package/esm/trellis/server_logger.d.ts.map +1 -0
  260. package/esm/trellis/server_logger.js +7 -0
  261. package/esm/trellis/tasks.d.ts +3 -3
  262. package/esm/trellis/tasks.d.ts.map +1 -1
  263. package/esm/trellis/tasks.js +1 -1
  264. package/esm/trellis/tracing.d.ts +2 -2
  265. package/esm/trellis/tracing.d.ts.map +1 -1
  266. package/esm/trellis/tracing.js +2 -2
  267. package/esm/trellis/trellis.d.ts +167 -78
  268. package/esm/trellis/trellis.d.ts.map +1 -1
  269. package/esm/trellis/trellis.js +281 -87
  270. package/esm/trellis/workload.d.ts +45 -0
  271. package/esm/trellis/workload.d.ts.map +1 -0
  272. package/esm/trellis/workload.js +144 -0
  273. package/package.json +63 -4
  274. package/script/auth/browser/login.d.ts +27 -0
  275. package/script/auth/browser/login.d.ts.map +1 -0
  276. package/script/auth/browser/login.js +100 -0
  277. package/script/auth/browser/portal.d.ts +11 -0
  278. package/script/auth/browser/portal.d.ts.map +1 -0
  279. package/script/auth/browser/portal.js +40 -0
  280. package/script/auth/browser/session.d.ts +19 -0
  281. package/script/auth/browser/session.d.ts.map +1 -0
  282. package/script/auth/browser/session.js +79 -0
  283. package/script/auth/browser/storage.d.ts +12 -0
  284. package/script/auth/browser/storage.d.ts.map +1 -0
  285. package/script/auth/browser/storage.js +67 -0
  286. package/script/auth/browser.d.ts +13 -0
  287. package/script/auth/browser.d.ts.map +1 -0
  288. package/script/auth/browser.js +46 -0
  289. package/script/auth/keys.d.ts +5 -0
  290. package/script/auth/keys.d.ts.map +1 -0
  291. package/script/auth/keys.js +56 -0
  292. package/script/auth/mod.d.ts +18 -0
  293. package/script/auth/mod.d.ts.map +1 -0
  294. package/script/auth/mod.js +172 -0
  295. package/script/auth/proof.d.ts +9 -0
  296. package/script/auth/proof.d.ts.map +1 -0
  297. package/script/auth/proof.js +48 -0
  298. package/script/auth/protocol.d.ts +1212 -0
  299. package/script/auth/protocol.d.ts.map +1 -0
  300. package/script/auth/protocol.js +687 -0
  301. package/script/auth/schemas.d.ts +93 -0
  302. package/script/auth/schemas.d.ts.map +1 -0
  303. package/script/auth/schemas.js +67 -0
  304. package/script/auth/session_auth.d.ts +20 -0
  305. package/script/auth/session_auth.d.ts.map +1 -0
  306. package/script/auth/session_auth.js +45 -0
  307. package/script/auth/trellis_id.d.ts +2 -0
  308. package/script/auth/trellis_id.d.ts.map +1 -0
  309. package/script/auth/trellis_id.js +8 -0
  310. package/script/auth/types.d.ts +8 -0
  311. package/script/auth/types.d.ts.map +1 -0
  312. package/script/auth/utils.d.ts +11 -0
  313. package/script/auth/utils.d.ts.map +1 -0
  314. package/script/auth/utils.js +77 -0
  315. package/script/auth/workload_activation.d.ts +192 -0
  316. package/script/auth/workload_activation.d.ts.map +1 -0
  317. package/script/auth/workload_activation.js +308 -0
  318. package/script/contracts/canonical.d.ts +14 -0
  319. package/script/contracts/canonical.d.ts.map +1 -0
  320. package/script/contracts/canonical.js +144 -0
  321. package/script/contracts/mod.d.ts +462 -0
  322. package/script/contracts/mod.d.ts.map +1 -0
  323. package/script/contracts/mod.js +555 -0
  324. package/script/contracts/protocol.d.ts +301 -0
  325. package/script/contracts/protocol.d.ts.map +1 -0
  326. package/script/contracts/protocol.js +136 -0
  327. package/script/contracts/runtime.d.ts +48 -0
  328. package/script/contracts/runtime.d.ts.map +1 -0
  329. package/script/contracts/runtime.js +13 -0
  330. package/script/contracts/schema_pointers.d.ts +18 -0
  331. package/script/contracts/schema_pointers.d.ts.map +1 -0
  332. package/script/contracts/schema_pointers.js +63 -0
  333. package/script/telemetry/carrier.d.ts +9 -0
  334. package/script/telemetry/carrier.d.ts.map +1 -0
  335. package/script/telemetry/carrier.js +25 -0
  336. package/script/telemetry/core.d.ts +8 -0
  337. package/script/telemetry/core.d.ts.map +1 -0
  338. package/script/telemetry/core.js +24 -0
  339. package/script/telemetry/env.d.ts +2 -0
  340. package/script/telemetry/env.d.ts.map +1 -0
  341. package/script/telemetry/env.js +12 -0
  342. package/script/telemetry/mod.d.ts +11 -0
  343. package/script/telemetry/mod.d.ts.map +1 -0
  344. package/script/telemetry/mod.js +29 -0
  345. package/script/telemetry/nats.d.ts +7 -0
  346. package/script/telemetry/nats.d.ts.map +1 -0
  347. package/script/telemetry/nats.js +9 -0
  348. package/script/telemetry/result.d.ts +2 -0
  349. package/script/telemetry/result.d.ts.map +1 -0
  350. package/script/telemetry/result.js +21 -0
  351. package/script/telemetry/runtime.d.ts +2 -0
  352. package/script/telemetry/runtime.d.ts.map +1 -0
  353. package/script/telemetry/runtime.js +79 -0
  354. package/script/telemetry/trace.d.ts +5 -0
  355. package/script/telemetry/trace.d.ts.map +1 -0
  356. package/script/telemetry/trace.js +31 -0
  357. package/script/telemetry/trellis.d.ts +3 -0
  358. package/script/telemetry/trellis.d.ts.map +1 -0
  359. package/script/telemetry/trellis.js +14 -0
  360. package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts +12 -0
  361. package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +1 -0
  362. package/script/trellis/_sdk/activity/_dnt.polyfills.js +16 -0
  363. package/script/trellis/_sdk/activity/api.d.ts +10 -0
  364. package/script/trellis/_sdk/activity/api.d.ts.map +1 -0
  365. package/script/trellis/_sdk/activity/api.js +46 -0
  366. package/script/trellis/_sdk/activity/contract.d.ts +8 -0
  367. package/script/trellis/_sdk/activity/contract.d.ts.map +1 -0
  368. package/script/trellis/_sdk/activity/contract.js +62 -0
  369. package/script/trellis/_sdk/activity/mod.d.ts +7 -0
  370. package/script/trellis/_sdk/activity/mod.d.ts.map +1 -0
  371. package/script/trellis/_sdk/activity/mod.js +30 -0
  372. package/script/trellis/_sdk/activity/package.json +3 -0
  373. package/script/trellis/_sdk/activity/schemas.d.ts +607 -0
  374. package/script/trellis/_sdk/activity/schemas.d.ts.map +1 -0
  375. package/script/trellis/_sdk/activity/schemas.js +36 -0
  376. package/script/trellis/_sdk/activity/types.d.ts +96 -0
  377. package/script/trellis/_sdk/activity/types.d.ts.map +1 -0
  378. package/script/trellis/_sdk/activity/types.js +6 -0
  379. package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts +12 -0
  380. package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +1 -0
  381. package/script/trellis/_sdk/auth/_dnt.polyfills.js +16 -0
  382. package/script/trellis/_sdk/auth/api.d.ts +10 -0
  383. package/script/trellis/_sdk/auth/api.d.ts.map +1 -0
  384. package/script/trellis/_sdk/auth/api.js +357 -0
  385. package/script/trellis/_sdk/auth/contract.d.ts +28 -0
  386. package/script/trellis/_sdk/auth/contract.d.ts.map +1 -0
  387. package/script/trellis/_sdk/auth/contract.js +86 -0
  388. package/script/trellis/_sdk/auth/mod.d.ts +7 -0
  389. package/script/trellis/_sdk/auth/mod.d.ts.map +1 -0
  390. package/script/trellis/_sdk/auth/mod.js +31 -0
  391. package/script/trellis/_sdk/auth/package.json +3 -0
  392. package/script/trellis/_sdk/auth/schemas.d.ts +8967 -0
  393. package/script/trellis/_sdk/auth/schemas.d.ts.map +1 -0
  394. package/script/trellis/_sdk/auth/schemas.js +309 -0
  395. package/script/trellis/_sdk/auth/types.d.ts +1232 -0
  396. package/script/trellis/_sdk/auth/types.d.ts.map +1 -0
  397. package/script/trellis/_sdk/auth/types.js +6 -0
  398. package/script/trellis/_sdk/core/_dnt.polyfills.d.ts +12 -0
  399. package/script/trellis/_sdk/core/_dnt.polyfills.d.ts.map +1 -0
  400. package/script/trellis/_sdk/core/_dnt.polyfills.js +16 -0
  401. package/script/trellis/_sdk/core/api.d.ts +10 -0
  402. package/script/trellis/_sdk/core/api.d.ts.map +1 -0
  403. package/script/trellis/_sdk/core/api.js +39 -0
  404. package/script/trellis/_sdk/core/contract.d.ts +8 -0
  405. package/script/trellis/_sdk/core/contract.d.ts.map +1 -0
  406. package/script/trellis/_sdk/core/contract.js +62 -0
  407. package/script/trellis/_sdk/core/mod.d.ts +7 -0
  408. package/script/trellis/_sdk/core/mod.d.ts.map +1 -0
  409. package/script/trellis/_sdk/core/mod.js +30 -0
  410. package/script/trellis/_sdk/core/package.json +3 -0
  411. package/script/trellis/_sdk/core/schemas.d.ts +1144 -0
  412. package/script/trellis/_sdk/core/schemas.d.ts.map +1 -0
  413. package/script/trellis/_sdk/core/schemas.js +31 -0
  414. package/script/trellis/_sdk/core/types.d.ts +176 -0
  415. package/script/trellis/_sdk/core/types.d.ts.map +1 -0
  416. package/script/trellis/_sdk/core/types.js +6 -0
  417. package/script/trellis/auth.d.ts +2 -0
  418. package/script/trellis/auth.d.ts.map +1 -0
  419. package/script/trellis/auth.js +17 -0
  420. package/script/trellis/client.d.ts +8 -6
  421. package/script/trellis/client.d.ts.map +1 -1
  422. package/script/trellis/client.js +54 -3
  423. package/script/trellis/codec.d.ts +5 -4
  424. package/script/trellis/codec.d.ts.map +1 -1
  425. package/script/trellis/codec.js +31 -17
  426. package/script/trellis/contract.d.ts +11 -0
  427. package/script/trellis/contract.d.ts.map +1 -0
  428. package/script/trellis/contract.js +18 -0
  429. package/script/trellis/contracts.d.ts +4 -0
  430. package/script/trellis/contracts.d.ts.map +1 -0
  431. package/script/trellis/contracts.js +20 -0
  432. package/script/trellis/errors/AuthError.d.ts +2 -2
  433. package/script/trellis/errors/AuthError.d.ts.map +1 -1
  434. package/script/trellis/errors/AuthError.js +13 -2
  435. package/script/trellis/errors/KVError.d.ts +1 -1
  436. package/script/trellis/errors/KVError.d.ts.map +1 -1
  437. package/script/trellis/errors/KVError.js +2 -2
  438. package/script/trellis/errors/RemoteError.d.ts +4 -4
  439. package/script/trellis/errors/RemoteError.d.ts.map +1 -1
  440. package/script/trellis/errors/RemoteError.js +11 -11
  441. package/script/trellis/errors/TrellisError.d.ts +1 -1
  442. package/script/trellis/errors/TrellisError.d.ts.map +1 -1
  443. package/script/trellis/errors/TrellisError.js +2 -2
  444. package/script/trellis/errors/ValidationError.d.ts +1 -1
  445. package/script/trellis/errors/ValidationError.d.ts.map +1 -1
  446. package/script/trellis/errors/ValidationError.js +2 -2
  447. package/script/trellis/errors/index.d.ts +14 -14
  448. package/script/trellis/errors/index.d.ts.map +1 -1
  449. package/script/trellis/errors/index.js +31 -31
  450. package/script/trellis/globals.d.ts +9 -1
  451. package/script/trellis/globals.d.ts.map +1 -1
  452. package/script/trellis/globals.js +16 -8
  453. package/script/trellis/helpers.d.ts +1 -1
  454. package/script/trellis/helpers.d.ts.map +1 -1
  455. package/script/trellis/index.d.ts +17 -10
  456. package/script/trellis/index.d.ts.map +1 -1
  457. package/script/trellis/index.js +57 -22
  458. package/script/trellis/kv.d.ts +11 -8
  459. package/script/trellis/kv.d.ts.map +1 -1
  460. package/script/trellis/kv.js +91 -68
  461. package/script/trellis/models/trellis/TrellisError.d.ts +1 -1
  462. package/script/trellis/models/trellis/TrellisError.d.ts.map +1 -1
  463. package/script/trellis/models/trellis/TrellisError.js +8 -8
  464. package/script/trellis/operations.d.ts +81 -0
  465. package/script/trellis/operations.d.ts.map +1 -0
  466. package/script/trellis/operations.js +212 -0
  467. package/script/trellis/sdk/core.d.ts +3 -0
  468. package/script/trellis/sdk/core.d.ts.map +1 -0
  469. package/script/trellis/sdk/core.js +20 -0
  470. package/script/trellis/tasks.d.ts +3 -3
  471. package/script/trellis/tasks.d.ts.map +1 -1
  472. package/script/trellis/tasks.js +5 -5
  473. package/script/trellis/tracing.d.ts +2 -3
  474. package/script/trellis/tracing.d.ts.map +1 -1
  475. package/script/trellis/tracing.js +17 -20
  476. package/script/trellis/trellis.d.ts +169 -80
  477. package/script/trellis/trellis.d.ts.map +1 -1
  478. package/script/trellis/trellis.js +379 -177
  479. package/script/trellis/workload.d.ts +45 -0
  480. package/script/trellis/workload.d.ts.map +1 -0
  481. package/script/trellis/workload.js +172 -0
  482. package/script/_dnt.polyfills.d.ts +0 -7
  483. package/script/_dnt.polyfills.d.ts.map +0 -1
  484. package/script/trellis/browser.d.ts +0 -11
  485. package/script/trellis/browser.d.ts.map +0 -1
  486. package/script/trellis/browser.js +0 -21
  487. package/script/trellis/env.d.ts +0 -2
  488. package/script/trellis/env.d.ts.map +0 -1
  489. package/script/trellis/env.js +0 -5
  490. /package/script/{_dnt.polyfills.js → auth/types.js} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { type KV, type KvEntry } from "@nats-io/kv";
2
2
  import type { NatsConnection } from "@nats-io/nats-core/internal";
3
- import { Result } from "@qlever-llc/trellis-result";
3
+ import { Result } from "@qlever-llc/result";
4
4
  import type { StaticDecode, TSchema } from "typebox";
5
- import { KVError, ValidationError } from "./errors/index.js";
5
+ import { KVError, ValidationError } from "./errors/index.ts";
6
6
  /**
7
7
  * Represents a watch event emitted when a KV entry changes.
8
8
  */
@@ -29,6 +29,7 @@ export declare class TypedKV<S extends TSchema> {
29
29
  readonly schema: S;
30
30
  readonly kv: KV;
31
31
  private constructor();
32
+ private static fromParts;
32
33
  static open<S extends TSchema>(nats: NatsConnection, name: string, schema: S, options: {
33
34
  history?: number;
34
35
  ttl?: number;
@@ -36,8 +37,9 @@ export declare class TypedKV<S extends TSchema> {
36
37
  maxValueBytes?: number;
37
38
  }): Promise<Result<TypedKV<S>, KVError>>;
38
39
  get(key: string): Promise<Result<TypedKVEntry<S>, KVError | ValidationError>>;
39
- create(key: string, value: StaticDecode<S>): Promise<Result<void, KVError>>;
40
- put(key: string, value: StaticDecode<S>): Promise<Result<void, KVError>>;
40
+ private serialize;
41
+ create(key: string, value: unknown): Promise<Result<void, KVError>>;
42
+ put(key: string, value: unknown): Promise<Result<void, KVError>>;
41
43
  delete(key: string): Promise<Result<void, KVError>>;
42
44
  keys(filter?: string | string[]): Promise<Result<AsyncIterable<string>, KVError>>;
43
45
  status(): Promise<Result<{
@@ -45,11 +47,12 @@ export declare class TypedKV<S extends TSchema> {
45
47
  }, KVError>>;
46
48
  }
47
49
  export declare class TypedKVEntry<S extends TSchema> {
50
+ #private;
48
51
  private schema;
49
52
  private kv;
50
53
  private entry;
51
- readonly value: StaticDecode<S>;
52
- constructor(schema: S, kv: KV, entry: KvEntry, value: StaticDecode<S>);
54
+ constructor(schema: S, kv: KV, entry: KvEntry, value: unknown);
55
+ get value(): StaticDecode<S>;
53
56
  static create<S extends TSchema>(schema: S, kv: KV, entry: KvEntry): Promise<Result<TypedKVEntry<S>, ValidationError>>;
54
57
  get key(): string;
55
58
  /**
@@ -60,8 +63,8 @@ export declare class TypedKVEntry<S extends TSchema> {
60
63
  * @returns A function to stop watching
61
64
  */
62
65
  watch(callback: (event: WatchEvent<S>) => void, opts?: WatchOptions): Promise<() => void>;
63
- merge(value: Partial<StaticDecode<S>>, vcc?: boolean): Promise<Result<void, KVError | ValidationError>>;
64
- put(value: StaticDecode<S>, vcc?: boolean): Promise<Result<void, KVError>>;
66
+ merge(value: unknown, vcc?: boolean): Promise<Result<void, KVError | ValidationError>>;
67
+ put(value: unknown, vcc?: boolean): Promise<Result<void, KVError>>;
65
68
  delete(vcc?: boolean): Promise<Result<void, KVError>>;
66
69
  }
67
70
  //# sourceMappingURL=kv.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kv.d.ts","sourceRoot":"","sources":["../../src/trellis/kv.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,OAAO,EAAO,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqC7D;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,OAAO,IAAI;IAC1C,mFAAmF;IACnF,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,qDAAqD;IACrD,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACxB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,SAAS,EAAE,IAAI,CAAC;CACjB,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AAC,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;IAKpD,IAAI,GAAG,WAEN;IAED;;;;;;OAMG;IACG,KAAK,CACT,QAAQ,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,EACxC,IAAI,CAAC,EAAE,YAAY,GAClB,OAAO,CAAC,MAAM,IAAI,CAAC;IAsDhB,KAAK,CACT,KAAK,EAAE,OAAO,EACd,GAAG,CAAC,EAAE,OAAO,GACZ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,CAAC,CAAC;IAgB7C,GAAG,CACP,KAAK,EAAE,OAAO,EACd,GAAG,CAAC,EAAE,OAAO,GACZ,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAc3B,MAAM,CAAC,GAAG,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;CAY5D"}
@@ -22,15 +22,25 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
26
+ if (kind === "m") throw new TypeError("Private method is not writable");
27
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
28
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
29
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
30
+ };
31
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
32
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
33
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
34
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
35
+ };
36
+ var _TypedKVEntry_value;
25
37
  Object.defineProperty(exports, "__esModule", { value: true });
26
38
  exports.TypedKVEntry = exports.TypedKV = void 0;
27
- // @ts-nocheck -- svelte-check hits pathological generic instantiation in this file
28
39
  const kv_1 = require("@nats-io/kv");
29
- const trellis_result_1 = require("@qlever-llc/trellis-result");
30
- const ts_deepmerge_1 = require("ts-deepmerge");
40
+ const result_1 = require("@qlever-llc/result");
31
41
  const value_1 = __importStar(require("typebox/value"));
32
- const index_js_1 = require("./errors/index.js");
33
- const helpers_js_1 = require("./helpers.js");
42
+ const index_ts_1 = require("./errors/index.ts");
43
+ const helpers_ts_1 = require("./helpers.ts");
34
44
  function externalizeValue(value) {
35
45
  if (value instanceof Date) {
36
46
  return value.toISOString();
@@ -61,6 +71,21 @@ function serializeValue(schema, value) {
61
71
  function serializeExternalValue(schema, value) {
62
72
  return serializeValue(schema, value);
63
73
  }
74
+ function isPlainObject(value) {
75
+ return value !== null && typeof value === "object" && !Array.isArray(value);
76
+ }
77
+ function mergeUnknown(target, source) {
78
+ if (!isPlainObject(target) || !isPlainObject(source)) {
79
+ return source;
80
+ }
81
+ const out = { ...target };
82
+ for (const [key, entry] of Object.entries(source)) {
83
+ if (entry === undefined)
84
+ continue;
85
+ out[key] = mergeUnknown(target[key], entry);
86
+ }
87
+ return out;
88
+ }
64
89
  class TypedKV {
65
90
  constructor(schema, kv) {
66
91
  Object.defineProperty(this, "schema", {
@@ -76,6 +101,9 @@ class TypedKV {
76
101
  value: kv
77
102
  });
78
103
  }
104
+ static fromParts(schema, kv) {
105
+ return new TypedKV(schema, kv);
106
+ }
79
107
  static async open(nats, name, schema, options) {
80
108
  try {
81
109
  const kvm = new kv_1.Kvm(nats);
@@ -86,79 +114,75 @@ class TypedKV {
86
114
  ttl: options.ttl ?? 0,
87
115
  ...(options.maxValueBytes ? { maxValueSize: options.maxValueBytes } : {}),
88
116
  });
89
- const typedKv = new TypedKV(schema, kv);
90
- return trellis_result_1.Result.ok(typedKv);
117
+ const typedKv = TypedKV.fromParts(schema, kv);
118
+ return result_1.Result.ok(typedKv);
91
119
  }
92
120
  catch (cause) {
93
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "open", cause }));
121
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "open", cause }));
94
122
  }
95
123
  }
96
124
  async get(key) {
97
125
  let s;
98
126
  try {
99
- s = await this.kv.get((0, helpers_js_1.escapeKvKey)(key));
127
+ s = await this.kv.get((0, helpers_ts_1.escapeKvKey)(key));
100
128
  }
101
129
  catch (cause) {
102
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "get", cause, context: { key } }));
130
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "get", cause, context: { key } }));
103
131
  }
104
132
  if (!s) {
105
- return trellis_result_1.Result.err(new index_js_1.KVError({
133
+ return result_1.Result.err(new index_ts_1.KVError({
106
134
  operation: "get",
107
135
  context: { key, reason: "not found" },
108
136
  }));
109
137
  }
110
- return await createTypedKvEntry(this.schema, this.kv, s);
138
+ const result = await createTypedKvEntry(this.schema, this.kv, s);
139
+ return result;
140
+ }
141
+ serialize(value) {
142
+ return serializeExternalValue(this.schema, value);
111
143
  }
112
144
  async create(key, value) {
113
- const schema = this.schema;
114
- const rawValue = value;
115
- // @ts-expect-error svelte-check hits excessive type instantiation here
116
- const serialized = serializeExternalValue(schema, rawValue);
117
145
  try {
118
- await this.kv.create((0, helpers_js_1.escapeKvKey)(key), serialized);
119
- return trellis_result_1.Result.ok(undefined);
146
+ await this.kv.create((0, helpers_ts_1.escapeKvKey)(key), this.serialize(value));
147
+ return result_1.Result.ok(undefined);
120
148
  }
121
149
  catch (cause) {
122
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "create", cause, context: { key } }));
150
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "create", cause, context: { key } }));
123
151
  }
124
152
  }
125
153
  async put(key, value) {
126
- const schema = this.schema;
127
- const rawValue = value;
128
- // @ts-expect-error svelte-check hits excessive type instantiation here
129
- const serialized = serializeExternalValue(schema, rawValue);
130
154
  try {
131
- await this.kv.put((0, helpers_js_1.escapeKvKey)(key), serialized);
132
- return trellis_result_1.Result.ok(undefined);
155
+ await this.kv.put((0, helpers_ts_1.escapeKvKey)(key), this.serialize(value));
156
+ return result_1.Result.ok(undefined);
133
157
  }
134
158
  catch (cause) {
135
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "put", cause, context: { key } }));
159
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "put", cause, context: { key } }));
136
160
  }
137
161
  }
138
162
  async delete(key) {
139
163
  try {
140
- await this.kv.delete((0, helpers_js_1.escapeKvKey)(key));
141
- return trellis_result_1.Result.ok(undefined);
164
+ await this.kv.delete((0, helpers_ts_1.escapeKvKey)(key));
165
+ return result_1.Result.ok(undefined);
142
166
  }
143
167
  catch (cause) {
144
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "delete", cause, context: { key } }));
168
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "delete", cause, context: { key } }));
145
169
  }
146
170
  }
147
171
  async keys(filter = ">") {
148
172
  try {
149
- return trellis_result_1.Result.ok(await this.kv.keys(filter));
173
+ return result_1.Result.ok(await this.kv.keys(filter));
150
174
  }
151
175
  catch (cause) {
152
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "keys", cause, context: { filter } }));
176
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "keys", cause, context: { filter } }));
153
177
  }
154
178
  }
155
179
  async status() {
156
180
  try {
157
181
  const status = await this.kv.status();
158
- return trellis_result_1.Result.ok({ values: status.values });
182
+ return result_1.Result.ok({ values: status.values });
159
183
  }
160
184
  catch (cause) {
161
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "status", cause }));
185
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "status", cause }));
162
186
  }
163
187
  }
164
188
  }
@@ -183,20 +207,18 @@ class TypedKVEntry {
183
207
  writable: true,
184
208
  value: entry
185
209
  });
186
- Object.defineProperty(this, "value", {
187
- enumerable: true,
188
- configurable: true,
189
- writable: true,
190
- value: void 0
191
- });
192
- // @ts-expect-error svelte-check hits excessive type instantiation on assignment
193
- this.value = value;
210
+ _TypedKVEntry_value.set(this, void 0);
211
+ __classPrivateFieldSet(this, _TypedKVEntry_value, value, "f");
212
+ }
213
+ get value() {
214
+ return __classPrivateFieldGet(this, _TypedKVEntry_value, "f");
194
215
  }
195
216
  static async create(schema, kv, entry) {
196
- return await createTypedKvEntry(schema, kv, entry);
217
+ const result = await createTypedKvEntry(schema, kv, entry);
218
+ return result;
197
219
  }
198
220
  get key() {
199
- return (0, helpers_js_1.decodeSubject)(this.entry.key);
221
+ return (0, helpers_ts_1.decodeSubject)(this.entry.key);
200
222
  }
201
223
  /**
202
224
  * Watch this KV entry for changes.
@@ -220,7 +242,7 @@ class TypedKVEntry {
220
242
  if (opts?.includeDeletes) {
221
243
  callback({
222
244
  type: "delete",
223
- key: (0, helpers_js_1.decodeSubject)(entry.key),
245
+ key: (0, helpers_ts_1.decodeSubject)(entry.key),
224
246
  revision: entry.revision,
225
247
  timestamp: entry.created,
226
248
  });
@@ -245,7 +267,7 @@ class TypedKVEntry {
245
267
  }
246
268
  callback({
247
269
  type: "update",
248
- key: (0, helpers_js_1.decodeSubject)(entry.key),
270
+ key: (0, helpers_ts_1.decodeSubject)(entry.key),
249
271
  value: validated,
250
272
  revision: entry.revision,
251
273
  timestamp: entry.created,
@@ -259,33 +281,28 @@ class TypedKVEntry {
259
281
  };
260
282
  }
261
283
  async merge(value, vcc) {
262
- // @ts-expect-error svelte-check hits excessive type instantiation here
263
- const mergedData = (0, ts_deepmerge_1.merge)(this.value, value);
264
- const schema = this.schema;
265
- const mergedRawValue = mergedData;
266
- // @ts-expect-error svelte-check hits excessive type instantiation here
267
- const mergeResult = trellis_result_1.Result.try(() => serializeExternalValue(schema, mergedRawValue));
284
+ const mergedData = mergeUnknown(__classPrivateFieldGet(this, _TypedKVEntry_value, "f"), value);
285
+ const mergeResult = result_1.Result.try(() => serializeExternalValue(this.schema, mergedData));
268
286
  if (mergeResult.isErr()) {
269
287
  const cause = mergeResult.error.cause;
270
288
  if (cause instanceof value_1.ParseError) {
271
- const errors = value_1.default.Errors(schema, externalizeValue(mergedData));
272
- return trellis_result_1.Result.err(new index_js_1.ValidationError({ errors, cause }));
289
+ const errors = value_1.default.Errors(this.schema, externalizeValue(mergedData));
290
+ return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause }));
273
291
  }
274
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "merge", cause: mergeResult.error, context: { key: this.key } }));
292
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "merge", cause: mergeResult.error, context: { key: this.key } }));
275
293
  }
276
294
  return this.put(mergedData, vcc);
277
295
  }
278
296
  async put(value, vcc) {
279
- const schema = this.schema;
280
- const serialized = serializeValue(schema, value);
297
+ const serialized = serializeValue(this.schema, value);
281
298
  try {
282
299
  await this.kv.put(this.entry.key, serialized, {
283
300
  previousSeq: vcc ? this.entry.revision : undefined,
284
301
  });
285
- return trellis_result_1.Result.ok(undefined);
302
+ return result_1.Result.ok(undefined);
286
303
  }
287
304
  catch (cause) {
288
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "put", cause, context: { key: this.key } }));
305
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "put", cause, context: { key: this.key } }));
289
306
  }
290
307
  }
291
308
  async delete(vcc) {
@@ -293,14 +310,15 @@ class TypedKVEntry {
293
310
  await this.kv.delete(this.entry.key, {
294
311
  previousSeq: vcc ? this.entry.revision : undefined,
295
312
  });
296
- return trellis_result_1.Result.ok(undefined);
313
+ return result_1.Result.ok(undefined);
297
314
  }
298
315
  catch (cause) {
299
- return trellis_result_1.Result.err(new index_js_1.KVError({ operation: "delete", cause, context: { key: this.key } }));
316
+ return result_1.Result.err(new index_ts_1.KVError({ operation: "delete", cause, context: { key: this.key } }));
300
317
  }
301
318
  }
302
319
  }
303
320
  exports.TypedKVEntry = TypedKVEntry;
321
+ _TypedKVEntry_value = new WeakMap();
304
322
  async function createTypedKvEntry(schema, kv, entry) {
305
323
  async function deleteInvalidEntry(reason) {
306
324
  try {
@@ -308,7 +326,7 @@ async function createTypedKvEntry(schema, kv, entry) {
308
326
  previousSeq: entry.revision,
309
327
  });
310
328
  return {
311
- key: (0, helpers_js_1.decodeSubject)(entry.key),
329
+ key: (0, helpers_ts_1.decodeSubject)(entry.key),
312
330
  revision: entry.revision,
313
331
  invalidEntryDeleted: true,
314
332
  invalidEntryReason: reason,
@@ -316,7 +334,7 @@ async function createTypedKvEntry(schema, kv, entry) {
316
334
  }
317
335
  catch (cause) {
318
336
  return {
319
- key: (0, helpers_js_1.decodeSubject)(entry.key),
337
+ key: (0, helpers_ts_1.decodeSubject)(entry.key),
320
338
  revision: entry.revision,
321
339
  invalidEntryDeleted: false,
322
340
  invalidEntryDeleteError: cause instanceof Error ? cause.message : String(cause),
@@ -324,31 +342,36 @@ async function createTypedKvEntry(schema, kv, entry) {
324
342
  };
325
343
  }
326
344
  }
327
- const jsonResult = trellis_result_1.Result.try(() => entry.json());
345
+ const jsonResult = result_1.Result.try(() => entry.json());
328
346
  if (jsonResult.isErr()) {
329
347
  const context = await deleteInvalidEntry(`decode failed: ${jsonResult.error.message}`);
330
- return trellis_result_1.Result.err(new index_js_1.ValidationError({
348
+ return result_1.Result.err(new index_ts_1.ValidationError({
331
349
  errors: [{ path: "", message: `Failed to decode KV value: ${jsonResult.error.message}` }],
332
350
  cause: jsonResult.error,
333
351
  context,
334
352
  }));
335
353
  }
336
354
  const json = jsonResult.take();
337
- const parseResult = trellis_result_1.Result.try(() => parseExternalValue(schema, json));
355
+ const parseResult = result_1.Result.try(() => {
356
+ if (value_1.default.HasCodec(schema)) {
357
+ return value_1.default.Decode(schema, json);
358
+ }
359
+ return value_1.default.Parse(schema, json);
360
+ });
338
361
  if (parseResult.isErr()) {
339
362
  const cause = parseResult.error.cause;
340
363
  if (cause instanceof value_1.ParseError) {
341
364
  const errors = value_1.default.Errors(schema, json);
342
365
  const context = await deleteInvalidEntry("schema parse failed");
343
- return trellis_result_1.Result.err(new index_js_1.ValidationError({ errors, cause, context }));
366
+ return result_1.Result.err(new index_ts_1.ValidationError({ errors, cause, context }));
344
367
  }
345
368
  const context = await deleteInvalidEntry(parseResult.error.message);
346
- return trellis_result_1.Result.err(new index_js_1.ValidationError({
369
+ return result_1.Result.err(new index_ts_1.ValidationError({
347
370
  errors: [{ path: "", message: parseResult.error.message }],
348
371
  cause: parseResult.error,
349
372
  context,
350
373
  }));
351
374
  }
352
375
  const typedEntry = new TypedKVEntry(schema, kv, entry, parseResult.take());
353
- return trellis_result_1.Result.ok(typedEntry);
376
+ return result_1.Result.ok(typedEntry);
354
377
  }
@@ -24,7 +24,7 @@ export declare const TrellisErrorDataSchema: Type.TUnion<[Type.TObject<{
24
24
  id: Type.TString;
25
25
  type: Type.TLiteral<"AuthError">;
26
26
  message: Type.TString;
27
- reason: Type.TUnion<[Type.TLiteral<"invalid_request">, Type.TLiteral<"missing_session_key">, Type.TLiteral<"missing_proof">, Type.TLiteral<"session_not_found">, Type.TLiteral<"session_expired">, Type.TLiteral<"invalid_signature">, Type.TLiteral<"user_not_found">, Type.TLiteral<"user_inactive">, Type.TLiteral<"unknown_service">, Type.TLiteral<"service_disabled">, Type.TLiteral<"iat_out_of_range">, Type.TLiteral<"invalid_binding_token">, Type.TLiteral<"session_corrupted">, Type.TLiteral<"session_already_bound">, Type.TLiteral<"authtoken_already_used">, Type.TLiteral<"oauth_session_key_mismatch">, Type.TLiteral<"service_role_on_user">, Type.TLiteral<"reply_subject_mismatch">, Type.TLiteral<"insufficient_permissions">, Type.TLiteral<"forbidden">]>;
27
+ reason: Type.TUnion<[Type.TLiteral<"invalid_request">, Type.TLiteral<"missing_session_key">, Type.TLiteral<"missing_proof">, Type.TLiteral<"session_not_found">, Type.TLiteral<"session_expired">, Type.TLiteral<"invalid_signature">, Type.TLiteral<"user_not_found">, Type.TLiteral<"user_inactive">, Type.TLiteral<"unknown_workload">, Type.TLiteral<"workload_profile_not_found">, Type.TLiteral<"workload_profile_disabled">, Type.TLiteral<"workload_activation_revoked">, Type.TLiteral<"unknown_service">, Type.TLiteral<"service_disabled">, Type.TLiteral<"iat_out_of_range">, Type.TLiteral<"invalid_binding_token">, Type.TLiteral<"session_corrupted">, Type.TLiteral<"session_already_bound">, Type.TLiteral<"authtoken_already_used">, Type.TLiteral<"oauth_session_key_mismatch">, Type.TLiteral<"service_role_on_user">, Type.TLiteral<"reply_subject_mismatch">, Type.TLiteral<"insufficient_permissions">, Type.TLiteral<"forbidden">, Type.TLiteral<"missing_handoff_id">, Type.TLiteral<"missing_profile_id">, Type.TLiteral<"workload_activation_handoff_not_found">, Type.TLiteral<"workload_activation_handoff_expired">, Type.TLiteral<"workload_activation_rejected">, Type.TLiteral<"workload_identity_key_mismatch">, Type.TLiteral<"invalid_workload_qr_mac">]>;
28
28
  context: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
29
29
  traceId: Type.TOptional<Type.TString>;
30
30
  }>, Type.TObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"TrellisError.d.ts","sourceRoot":"","sources":["../../../../src/trellis/models/trellis/TrellisError.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAMlD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKjC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
1
+ {"version":3,"file":"TrellisError.d.ts","sourceRoot":"","sources":["../../../../../models/trellis/TrellisError.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAMlD;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKjC,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
@@ -5,18 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TrellisErrorDataSchema = void 0;
7
7
  const typebox_1 = __importDefault(require("typebox"));
8
- const mod_js_1 = require("@qlever-llc/trellis-result");
9
- const ValidationError_js_1 = require("../../errors/ValidationError.js");
10
- const AuthError_js_1 = require("../../errors/AuthError.js");
11
- const KVError_js_1 = require("../../errors/KVError.js");
8
+ const mod_ts_1 = require("../../../result/mod.ts");
9
+ const ValidationError_ts_1 = require("../../errors/ValidationError.ts");
10
+ const AuthError_ts_1 = require("../../errors/AuthError.ts");
11
+ const KVError_ts_1 = require("../../errors/KVError.ts");
12
12
  /**
13
13
  * Discriminated union schema for all possible Trellis error types.
14
14
  * These errors can be serialized and sent over RPC.
15
15
  * Note: RemoteError is not included here as it's a local wrapper, not a serializable error type.
16
16
  */
17
17
  exports.TrellisErrorDataSchema = typebox_1.default.Union([
18
- mod_js_1.UnexpectedErrorDataSchema,
19
- ValidationError_js_1.ValidationErrorDataSchema,
20
- AuthError_js_1.AuthErrorDataSchema,
21
- KVError_js_1.KVErrorDataSchema,
18
+ mod_ts_1.UnexpectedErrorDataSchema,
19
+ ValidationError_ts_1.ValidationErrorDataSchema,
20
+ AuthError_ts_1.AuthErrorDataSchema,
21
+ KVError_ts_1.KVErrorDataSchema,
22
22
  ]);
@@ -0,0 +1,81 @@
1
+ import type { InferSchemaType } from "./contracts.ts";
2
+ import { type Result } from "@qlever-llc/result";
3
+ import type { JsonValue } from "./codec.ts";
4
+ import { UnexpectedError } from "./errors/index.ts";
5
+ export type OperationState = "pending" | "running" | "completed" | "failed" | "cancelled";
6
+ export type OperationRefData = {
7
+ id: string;
8
+ service: string;
9
+ operation: string;
10
+ };
11
+ export type OperationSnapshot<TProgress = unknown, TOutput = unknown> = {
12
+ id: string;
13
+ service: string;
14
+ operation: string;
15
+ revision: number;
16
+ state: OperationState;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ completedAt?: string;
20
+ progress?: TProgress;
21
+ output?: TOutput;
22
+ error?: {
23
+ type: string;
24
+ message: string;
25
+ };
26
+ };
27
+ export type TerminalOperation<TProgress = unknown, TOutput = unknown> = OperationSnapshot<TProgress, TOutput> & {
28
+ state: "completed" | "failed" | "cancelled";
29
+ };
30
+ export type OperationEvent<TProgress = unknown, TOutput = unknown> = {
31
+ type: "accepted";
32
+ snapshot: OperationSnapshot<TProgress, TOutput>;
33
+ } | {
34
+ type: "started";
35
+ snapshot: OperationSnapshot<TProgress, TOutput>;
36
+ } | {
37
+ type: "progress";
38
+ snapshot: OperationSnapshot<TProgress, TOutput>;
39
+ } | {
40
+ type: "completed";
41
+ snapshot: TerminalOperation<TProgress, TOutput>;
42
+ } | {
43
+ type: "failed";
44
+ snapshot: TerminalOperation<TProgress, TOutput>;
45
+ } | {
46
+ type: "cancelled";
47
+ snapshot: TerminalOperation<TProgress, TOutput>;
48
+ };
49
+ type OperationShape = {
50
+ subject: string;
51
+ input: unknown;
52
+ progress?: unknown;
53
+ output?: unknown;
54
+ cancel?: boolean;
55
+ };
56
+ type OperationInputOf<TDesc extends OperationShape> = InferSchemaType<TDesc["input"]>;
57
+ type OperationProgressOf<TDesc extends OperationShape> = TDesc["progress"] extends undefined ? unknown : InferSchemaType<NonNullable<TDesc["progress"]>>;
58
+ type OperationOutputOf<TDesc extends OperationShape> = TDesc["output"] extends undefined ? unknown : InferSchemaType<NonNullable<TDesc["output"]>>;
59
+ export interface OperationTransport {
60
+ requestJson(subject: string, body: JsonValue): Promise<Result<JsonValue, UnexpectedError>>;
61
+ watchJson(subject: string, body: JsonValue): Promise<Result<AsyncIterable<Result<JsonValue, UnexpectedError>>, UnexpectedError>>;
62
+ }
63
+ export declare function controlSubject(subject: string): string;
64
+ export declare class OperationRef<TDesc extends OperationShape, TProgress = OperationProgressOf<TDesc>, TOutput = OperationOutputOf<TDesc>> {
65
+ #private;
66
+ readonly id: string;
67
+ readonly service: string;
68
+ readonly operation: string;
69
+ constructor(transport: OperationTransport, descriptor: TDesc, ref: OperationRefData);
70
+ get(): Promise<Result<OperationSnapshot<TProgress, TOutput>, UnexpectedError>>;
71
+ wait(): Promise<Result<TerminalOperation<TProgress, TOutput>, UnexpectedError>>;
72
+ cancel(): Promise<Result<OperationSnapshot<TProgress, TOutput>, UnexpectedError>>;
73
+ watch(): Promise<Result<AsyncIterable<OperationEvent<TProgress, TOutput>>, UnexpectedError>>;
74
+ }
75
+ export declare class OperationInvoker<TDesc extends OperationShape, TInput = OperationInputOf<TDesc>, TProgress = OperationProgressOf<TDesc>, TOutput = OperationOutputOf<TDesc>> {
76
+ #private;
77
+ constructor(transport: OperationTransport, descriptor: TDesc);
78
+ start(input: TInput): Promise<Result<OperationRef<TDesc, TProgress, TOutput>, UnexpectedError>>;
79
+ }
80
+ export {};
81
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAEhB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,SAAS,GAAG,OA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