@xenosystem/agent-cli 0.5.188 → 0.5.190

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 (865) hide show
  1. package/dist/cli.js +1 -1
  2. package/dist/index.js +2530 -2530
  3. package/dist/metafile-esm.json +1 -1
  4. package/dist/sdk-build-identity.json +18 -18
  5. package/native/xeno-pty/prebuilds/win32-x64/manifest.json +18 -18
  6. package/package.json +94 -94
  7. package/node_modules/@xeno-corporation/account/LICENSE +0 -39
  8. package/node_modules/@xeno-corporation/account/README.md +0 -266
  9. package/node_modules/@xeno-corporation/account/dist/chunk-FELZILY4.mjs +0 -60
  10. package/node_modules/@xeno-corporation/account/dist/chunk-FELZILY4.mjs.map +0 -1
  11. package/node_modules/@xeno-corporation/account/dist/client-D7OSWGkE.d.mts +0 -2337
  12. package/node_modules/@xeno-corporation/account/dist/client-D7OSWGkE.d.ts +0 -2337
  13. package/node_modules/@xeno-corporation/account/dist/index.d.mts +0 -110
  14. package/node_modules/@xeno-corporation/account/dist/index.d.ts +0 -110
  15. package/node_modules/@xeno-corporation/account/dist/index.js +0 -4116
  16. package/node_modules/@xeno-corporation/account/dist/index.js.map +0 -1
  17. package/node_modules/@xeno-corporation/account/dist/index.mjs +0 -3968
  18. package/node_modules/@xeno-corporation/account/dist/index.mjs.map +0 -1
  19. package/node_modules/@xeno-corporation/account/dist/node.d.mts +0 -109
  20. package/node_modules/@xeno-corporation/account/dist/node.d.ts +0 -109
  21. package/node_modules/@xeno-corporation/account/dist/node.js +0 -1448
  22. package/node_modules/@xeno-corporation/account/dist/node.js.map +0 -1
  23. package/node_modules/@xeno-corporation/account/dist/node.mjs +0 -1374
  24. package/node_modules/@xeno-corporation/account/dist/node.mjs.map +0 -1
  25. package/node_modules/@xeno-corporation/account/package.json +0 -62
  26. package/node_modules/zod/LICENSE +0 -21
  27. package/node_modules/zod/README.md +0 -218
  28. package/node_modules/zod/compile.cjs +0 -96
  29. package/node_modules/zod/compile.d.cts +0 -1
  30. package/node_modules/zod/compile.d.ts +0 -1
  31. package/node_modules/zod/compile.js +0 -52
  32. package/node_modules/zod/index.cjs +0 -52
  33. package/node_modules/zod/index.d.cts +0 -3
  34. package/node_modules/zod/index.d.ts +0 -3
  35. package/node_modules/zod/index.js +0 -7
  36. package/node_modules/zod/locales/index.cjs +0 -36
  37. package/node_modules/zod/locales/index.d.cts +0 -1
  38. package/node_modules/zod/locales/index.d.ts +0 -1
  39. package/node_modules/zod/locales/index.js +0 -1
  40. package/node_modules/zod/locales/package.json +0 -7
  41. package/node_modules/zod/mini/index.cjs +0 -51
  42. package/node_modules/zod/mini/index.d.cts +0 -3
  43. package/node_modules/zod/mini/index.d.ts +0 -3
  44. package/node_modules/zod/mini/index.js +0 -3
  45. package/node_modules/zod/mini/package.json +0 -7
  46. package/node_modules/zod/package.json +0 -147
  47. package/node_modules/zod/src/compile.ts +0 -56
  48. package/node_modules/zod/src/index.ts +0 -7
  49. package/node_modules/zod/src/locales/index.ts +0 -1
  50. package/node_modules/zod/src/mini/index.ts +0 -3
  51. package/node_modules/zod/src/v3/ZodError.ts +0 -340
  52. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  53. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  54. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  55. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  56. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  57. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  58. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  59. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  60. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  61. package/node_modules/zod/src/v3/errors.ts +0 -13
  62. package/node_modules/zod/src/v3/external.ts +0 -6
  63. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  64. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  65. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  66. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  67. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  68. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  69. package/node_modules/zod/src/v3/index.ts +0 -4
  70. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  71. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  72. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  73. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  74. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  75. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  76. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  77. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  78. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  79. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  80. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  81. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  82. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  83. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  84. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  85. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  86. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  87. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  88. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  89. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  90. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  91. package/node_modules/zod/src/v3/tests/error.test.ts +0 -586
  92. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  93. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  94. package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  95. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  96. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  97. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -128
  98. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  99. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -206
  100. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  101. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  102. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  103. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  104. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  105. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  106. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  107. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  108. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  109. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  110. package/node_modules/zod/src/v3/tests/object.test.ts +0 -431
  111. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  112. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  113. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  114. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  115. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  116. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  117. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  118. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  119. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  120. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -114
  121. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  122. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  123. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  124. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  125. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  126. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  127. package/node_modules/zod/src/v3/tests/string.test.ts +0 -922
  128. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  129. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  130. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  131. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  132. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  133. package/node_modules/zod/src/v3/types.ts +0 -5138
  134. package/node_modules/zod/src/v4/classic/checks.ts +0 -33
  135. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  136. package/node_modules/zod/src/v4/classic/compat.ts +0 -78
  137. package/node_modules/zod/src/v4/classic/deep-partial.ts +0 -76
  138. package/node_modules/zod/src/v4/classic/errors.ts +0 -97
  139. package/node_modules/zod/src/v4/classic/external.ts +0 -57
  140. package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -944
  141. package/node_modules/zod/src/v4/classic/in-out.ts +0 -45
  142. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  143. package/node_modules/zod/src/v4/classic/iso.ts +0 -20
  144. package/node_modules/zod/src/v4/classic/parse.ts +0 -88
  145. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2937
  146. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  147. package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -86
  148. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -291
  149. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -402
  150. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  151. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  152. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  153. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -89
  154. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  155. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -604
  156. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  157. package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -572
  158. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -704
  159. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  160. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  161. package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +0 -76
  162. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  163. package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +0 -985
  164. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -92
  165. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -316
  166. package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +0 -380
  167. package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +0 -32
  168. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -455
  169. package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  170. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  171. package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -221
  172. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -942
  173. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -305
  174. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -917
  175. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -1108
  176. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  177. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  178. package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  179. package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -1467
  180. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -391
  181. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  182. package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -32
  183. package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -67
  184. package/node_modules/zod/src/v4/classic/tests/iban.test.ts +0 -81
  185. package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +0 -159
  186. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -958
  187. package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +0 -319
  188. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -127
  189. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -334
  190. package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +0 -215
  191. package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -39
  192. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  193. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -262
  194. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -128
  195. package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
  196. package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
  197. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -349
  198. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  199. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  200. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  201. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  202. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -401
  203. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -1006
  204. package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +0 -235
  205. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -366
  206. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -497
  207. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  208. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  209. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -144
  210. package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -44
  211. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
  212. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  213. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  214. package/node_modules/zod/src/v4/classic/tests/properties.test.ts +0 -141
  215. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  216. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -184
  217. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -885
  218. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -707
  219. package/node_modules/zod/src/v4/classic/tests/redos.test.ts +0 -68
  220. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -693
  221. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  222. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -196
  223. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -153
  224. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  225. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1440
  226. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -124
  227. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -812
  228. package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  229. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -4733
  230. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
  231. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -511
  232. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -310
  233. package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  234. package/node_modules/zod/src/v4/classic/tests/validate.test.ts +0 -645
  235. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  236. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  237. package/node_modules/zod/src/v4/core/api.ts +0 -1875
  238. package/node_modules/zod/src/v4/core/checks.ts +0 -1266
  239. package/node_modules/zod/src/v4/core/compile.ts +0 -2322
  240. package/node_modules/zod/src/v4/core/core.ts +0 -230
  241. package/node_modules/zod/src/v4/core/doc.ts +0 -52
  242. package/node_modules/zod/src/v4/core/errors.ts +0 -543
  243. package/node_modules/zod/src/v4/core/index.ts +0 -19
  244. package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -131
  245. package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -934
  246. package/node_modules/zod/src/v4/core/json-schema.ts +0 -148
  247. package/node_modules/zod/src/v4/core/memoizer.ts +0 -331
  248. package/node_modules/zod/src/v4/core/parse.ts +0 -309
  249. package/node_modules/zod/src/v4/core/regexes.ts +0 -217
  250. package/node_modules/zod/src/v4/core/registries.ts +0 -105
  251. package/node_modules/zod/src/v4/core/schemas.ts +0 -5226
  252. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  253. package/node_modules/zod/src/v4/core/tests/cached.test.ts +0 -54
  254. package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +0 -1004
  255. package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +0 -445
  256. package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +0 -89
  257. package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +0 -26
  258. package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +0 -34
  259. package/node_modules/zod/src/v4/core/tests/compile.test.ts +0 -2036
  260. package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +0 -140
  261. package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  262. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  263. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  264. package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -214
  265. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  266. package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -180
  267. package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
  268. package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  269. package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
  270. package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  271. package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +0 -42
  272. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  273. package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +0 -85
  274. package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +0 -69
  275. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  276. package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
  277. package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +0 -46
  278. package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
  279. package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  280. package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +0 -51
  281. package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +0 -133
  282. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -857
  283. package/node_modules/zod/src/v4/core/util.ts +0 -1293
  284. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  285. package/node_modules/zod/src/v4/core/visit.ts +0 -193
  286. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  287. package/node_modules/zod/src/v4/index.ts +0 -4
  288. package/node_modules/zod/src/v4/locales/ar.ts +0 -120
  289. package/node_modules/zod/src/v4/locales/az.ts +0 -116
  290. package/node_modules/zod/src/v4/locales/be.ts +0 -188
  291. package/node_modules/zod/src/v4/locales/bg.ts +0 -133
  292. package/node_modules/zod/src/v4/locales/bn.ts +0 -123
  293. package/node_modules/zod/src/v4/locales/ca.ts +0 -121
  294. package/node_modules/zod/src/v4/locales/ckb.ts +0 -140
  295. package/node_modules/zod/src/v4/locales/cs.ts +0 -123
  296. package/node_modules/zod/src/v4/locales/da.ts +0 -128
  297. package/node_modules/zod/src/v4/locales/de.ts +0 -121
  298. package/node_modules/zod/src/v4/locales/el.ts +0 -124
  299. package/node_modules/zod/src/v4/locales/en.ts +0 -136
  300. package/node_modules/zod/src/v4/locales/eo.ts +0 -123
  301. package/node_modules/zod/src/v4/locales/es.ts +0 -145
  302. package/node_modules/zod/src/v4/locales/fa.ts +0 -131
  303. package/node_modules/zod/src/v4/locales/fi.ts +0 -126
  304. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -121
  305. package/node_modules/zod/src/v4/locales/fr.ts +0 -139
  306. package/node_modules/zod/src/v4/locales/gu.ts +0 -123
  307. package/node_modules/zod/src/v4/locales/he.ts +0 -253
  308. package/node_modules/zod/src/v4/locales/hi.ts +0 -126
  309. package/node_modules/zod/src/v4/locales/hr.ts +0 -135
  310. package/node_modules/zod/src/v4/locales/hu.ts +0 -122
  311. package/node_modules/zod/src/v4/locales/hy.ts +0 -175
  312. package/node_modules/zod/src/v4/locales/id.ts +0 -120
  313. package/node_modules/zod/src/v4/locales/index.ts +0 -63
  314. package/node_modules/zod/src/v4/locales/is.ts +0 -124
  315. package/node_modules/zod/src/v4/locales/it.ts +0 -121
  316. package/node_modules/zod/src/v4/locales/ja.ts +0 -119
  317. package/node_modules/zod/src/v4/locales/ka.ts +0 -128
  318. package/node_modules/zod/src/v4/locales/kh.ts +0 -7
  319. package/node_modules/zod/src/v4/locales/km.ts +0 -124
  320. package/node_modules/zod/src/v4/locales/kn.ts +0 -126
  321. package/node_modules/zod/src/v4/locales/ko.ts +0 -126
  322. package/node_modules/zod/src/v4/locales/lt.ts +0 -243
  323. package/node_modules/zod/src/v4/locales/mk.ts +0 -123
  324. package/node_modules/zod/src/v4/locales/ms.ts +0 -120
  325. package/node_modules/zod/src/v4/locales/ne.ts +0 -128
  326. package/node_modules/zod/src/v4/locales/nl.ts +0 -126
  327. package/node_modules/zod/src/v4/locales/nn.ts +0 -121
  328. package/node_modules/zod/src/v4/locales/no.ts +0 -121
  329. package/node_modules/zod/src/v4/locales/ota.ts +0 -122
  330. package/node_modules/zod/src/v4/locales/pl.ts +0 -123
  331. package/node_modules/zod/src/v4/locales/ps.ts +0 -131
  332. package/node_modules/zod/src/v4/locales/pt-BR.ts +0 -161
  333. package/node_modules/zod/src/v4/locales/pt.ts +0 -159
  334. package/node_modules/zod/src/v4/locales/ro.ts +0 -132
  335. package/node_modules/zod/src/v4/locales/ru.ts +0 -188
  336. package/node_modules/zod/src/v4/locales/sk.ts +0 -123
  337. package/node_modules/zod/src/v4/locales/sl.ts +0 -123
  338. package/node_modules/zod/src/v4/locales/sv.ts +0 -124
  339. package/node_modules/zod/src/v4/locales/ta.ts +0 -123
  340. package/node_modules/zod/src/v4/locales/tg.ts +0 -135
  341. package/node_modules/zod/src/v4/locales/th.ts +0 -124
  342. package/node_modules/zod/src/v4/locales/tk.ts +0 -113
  343. package/node_modules/zod/src/v4/locales/tr.ts +0 -116
  344. package/node_modules/zod/src/v4/locales/ua.ts +0 -7
  345. package/node_modules/zod/src/v4/locales/uk.ts +0 -122
  346. package/node_modules/zod/src/v4/locales/ur.ts +0 -124
  347. package/node_modules/zod/src/v4/locales/uz.ts +0 -120
  348. package/node_modules/zod/src/v4/locales/vi.ts +0 -122
  349. package/node_modules/zod/src/v4/locales/yo.ts +0 -129
  350. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -121
  351. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -120
  352. package/node_modules/zod/src/v4/mini/checks.ts +0 -33
  353. package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  354. package/node_modules/zod/src/v4/mini/deep-partial.ts +0 -73
  355. package/node_modules/zod/src/v4/mini/external.ts +0 -52
  356. package/node_modules/zod/src/v4/mini/in-out.ts +0 -45
  357. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  358. package/node_modules/zod/src/v4/mini/iso.ts +0 -66
  359. package/node_modules/zod/src/v4/mini/parse.ts +0 -16
  360. package/node_modules/zod/src/v4/mini/schemas.ts +0 -2051
  361. package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -57
  362. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -190
  363. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  364. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -158
  365. package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -582
  366. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -30
  367. package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +0 -84
  368. package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +0 -54
  369. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -41
  370. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -14
  371. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -1146
  372. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -109
  373. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -292
  374. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  375. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -341
  376. package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  377. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -396
  378. package/node_modules/zod/src/v4-mini/index.ts +0 -3
  379. package/node_modules/zod/v3/ZodError.cjs +0 -167
  380. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  381. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  382. package/node_modules/zod/v3/ZodError.js +0 -143
  383. package/node_modules/zod/v3/errors.cjs +0 -36
  384. package/node_modules/zod/v3/errors.d.cts +0 -5
  385. package/node_modules/zod/v3/errors.d.ts +0 -5
  386. package/node_modules/zod/v3/errors.js +0 -9
  387. package/node_modules/zod/v3/external.cjs +0 -41
  388. package/node_modules/zod/v3/external.d.cts +0 -6
  389. package/node_modules/zod/v3/external.d.ts +0 -6
  390. package/node_modules/zod/v3/external.js +0 -6
  391. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -21
  392. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  393. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  394. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  395. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -28
  396. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  397. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  398. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  399. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -143
  400. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  401. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  402. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  403. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -21
  404. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  405. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  406. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  407. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -21
  408. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  409. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  410. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  411. package/node_modules/zod/v3/helpers/util.cjs +0 -156
  412. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  413. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  414. package/node_modules/zod/v3/helpers/util.js +0 -133
  415. package/node_modules/zod/v3/index.cjs +0 -52
  416. package/node_modules/zod/v3/index.d.cts +0 -4
  417. package/node_modules/zod/v3/index.d.ts +0 -4
  418. package/node_modules/zod/v3/index.js +0 -4
  419. package/node_modules/zod/v3/locales/en.cjs +0 -112
  420. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  421. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  422. package/node_modules/zod/v3/locales/en.js +0 -109
  423. package/node_modules/zod/v3/package.json +0 -7
  424. package/node_modules/zod/v3/standard-schema.cjs +0 -21
  425. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  426. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  427. package/node_modules/zod/v3/standard-schema.js +0 -1
  428. package/node_modules/zod/v3/types.cjs +0 -3798
  429. package/node_modules/zod/v3/types.d.cts +0 -1034
  430. package/node_modules/zod/v3/types.d.ts +0 -1034
  431. package/node_modules/zod/v3/types.js +0 -3697
  432. package/node_modules/zod/v4/classic/checks.cjs +0 -53
  433. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  434. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  435. package/node_modules/zod/v4/classic/checks.js +0 -1
  436. package/node_modules/zod/v4/classic/coerce.cjs +0 -66
  437. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  438. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  439. package/node_modules/zod/v4/classic/coerce.js +0 -17
  440. package/node_modules/zod/v4/classic/compat.cjs +0 -80
  441. package/node_modules/zod/v4/classic/compat.d.cts +0 -48
  442. package/node_modules/zod/v4/classic/compat.d.ts +0 -48
  443. package/node_modules/zod/v4/classic/compat.js +0 -31
  444. package/node_modules/zod/v4/classic/deep-partial.cjs +0 -58
  445. package/node_modules/zod/v4/classic/deep-partial.d.cts +0 -14
  446. package/node_modules/zod/v4/classic/deep-partial.d.ts +0 -14
  447. package/node_modules/zod/v4/classic/deep-partial.js +0 -13
  448. package/node_modules/zod/v4/classic/errors.cjs +0 -102
  449. package/node_modules/zod/v4/classic/errors.d.cts +0 -29
  450. package/node_modules/zod/v4/classic/errors.d.ts +0 -29
  451. package/node_modules/zod/v4/classic/errors.js +0 -57
  452. package/node_modules/zod/v4/classic/external.cjs +0 -97
  453. package/node_modules/zod/v4/classic/external.d.cts +0 -19
  454. package/node_modules/zod/v4/classic/external.d.ts +0 -19
  455. package/node_modules/zod/v4/classic/external.js +0 -17
  456. package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -926
  457. package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  458. package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  459. package/node_modules/zod/v4/classic/from-json-schema.js +0 -881
  460. package/node_modules/zod/v4/classic/in-out.cjs +0 -82
  461. package/node_modules/zod/v4/classic/in-out.d.cts +0 -8
  462. package/node_modules/zod/v4/classic/in-out.d.ts +0 -8
  463. package/node_modules/zod/v4/classic/in-out.js +0 -36
  464. package/node_modules/zod/v4/classic/index.cjs +0 -52
  465. package/node_modules/zod/v4/classic/index.d.cts +0 -3
  466. package/node_modules/zod/v4/classic/index.d.ts +0 -3
  467. package/node_modules/zod/v4/classic/index.js +0 -4
  468. package/node_modules/zod/v4/classic/iso.cjs +0 -68
  469. package/node_modules/zod/v4/classic/iso.d.cts +0 -7
  470. package/node_modules/zod/v4/classic/iso.d.ts +0 -7
  471. package/node_modules/zod/v4/classic/iso.js +0 -15
  472. package/node_modules/zod/v4/classic/package.json +0 -7
  473. package/node_modules/zod/v4/classic/parse.cjs +0 -63
  474. package/node_modules/zod/v4/classic/parse.d.cts +0 -44
  475. package/node_modules/zod/v4/classic/parse.d.ts +0 -44
  476. package/node_modules/zod/v4/classic/parse.js +0 -16
  477. package/node_modules/zod/v4/classic/schemas.cjs +0 -1676
  478. package/node_modules/zod/v4/classic/schemas.d.cts +0 -816
  479. package/node_modules/zod/v4/classic/schemas.d.ts +0 -816
  480. package/node_modules/zod/v4/classic/schemas.js +0 -1535
  481. package/node_modules/zod/v4/core/api.cjs +0 -1269
  482. package/node_modules/zod/v4/core/api.d.cts +0 -335
  483. package/node_modules/zod/v4/core/api.d.ts +0 -335
  484. package/node_modules/zod/v4/core/api.js +0 -1107
  485. package/node_modules/zod/v4/core/checks.cjs +0 -561
  486. package/node_modules/zod/v4/core/checks.d.cts +0 -294
  487. package/node_modules/zod/v4/core/checks.d.ts +0 -294
  488. package/node_modules/zod/v4/core/checks.js +0 -516
  489. package/node_modules/zod/v4/core/compile.cjs +0 -1916
  490. package/node_modules/zod/v4/core/compile.d.cts +0 -65
  491. package/node_modules/zod/v4/core/compile.d.ts +0 -65
  492. package/node_modules/zod/v4/core/compile.js +0 -1866
  493. package/node_modules/zod/v4/core/core.cjs +0 -167
  494. package/node_modules/zod/v4/core/core.d.cts +0 -82
  495. package/node_modules/zod/v4/core/core.d.ts +0 -82
  496. package/node_modules/zod/v4/core/core.js +0 -141
  497. package/node_modules/zod/v4/core/doc.cjs +0 -61
  498. package/node_modules/zod/v4/core/doc.d.cts +0 -16
  499. package/node_modules/zod/v4/core/doc.d.ts +0 -16
  500. package/node_modules/zod/v4/core/doc.js +0 -38
  501. package/node_modules/zod/v4/core/errors.cjs +0 -317
  502. package/node_modules/zod/v4/core/errors.d.cts +0 -225
  503. package/node_modules/zod/v4/core/errors.d.ts +0 -225
  504. package/node_modules/zod/v4/core/errors.js +0 -267
  505. package/node_modules/zod/v4/core/index.cjs +0 -70
  506. package/node_modules/zod/v4/core/index.d.cts +0 -19
  507. package/node_modules/zod/v4/core/index.d.ts +0 -19
  508. package/node_modules/zod/v4/core/index.js +0 -19
  509. package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -122
  510. package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  511. package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  512. package/node_modules/zod/v4/core/json-schema-generator.js +0 -99
  513. package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -929
  514. package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -65
  515. package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -65
  516. package/node_modules/zod/v4/core/json-schema-processors.js +0 -843
  517. package/node_modules/zod/v4/core/json-schema.cjs +0 -21
  518. package/node_modules/zod/v4/core/json-schema.d.cts +0 -89
  519. package/node_modules/zod/v4/core/json-schema.d.ts +0 -89
  520. package/node_modules/zod/v4/core/json-schema.js +0 -1
  521. package/node_modules/zod/v4/core/memoizer.cjs +0 -360
  522. package/node_modules/zod/v4/core/memoizer.d.cts +0 -15
  523. package/node_modules/zod/v4/core/memoizer.d.ts +0 -15
  524. package/node_modules/zod/v4/core/memoizer.js +0 -311
  525. package/node_modules/zod/v4/core/package.json +0 -7
  526. package/node_modules/zod/v4/core/parse.cjs +0 -233
  527. package/node_modules/zod/v4/core/parse.d.cts +0 -52
  528. package/node_modules/zod/v4/core/parse.d.ts +0 -52
  529. package/node_modules/zod/v4/core/parse.js +0 -175
  530. package/node_modules/zod/v4/core/regexes.cjs +0 -209
  531. package/node_modules/zod/v4/core/regexes.d.cts +0 -90
  532. package/node_modules/zod/v4/core/regexes.d.ts +0 -90
  533. package/node_modules/zod/v4/core/regexes.js +0 -156
  534. package/node_modules/zod/v4/core/registries.cjs +0 -75
  535. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  536. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  537. package/node_modules/zod/v4/core/registries.js +0 -51
  538. package/node_modules/zod/v4/core/schemas.cjs +0 -2699
  539. package/node_modules/zod/v4/core/schemas.d.cts +0 -1275
  540. package/node_modules/zod/v4/core/schemas.d.ts +0 -1275
  541. package/node_modules/zod/v4/core/schemas.js +0 -2636
  542. package/node_modules/zod/v4/core/standard-schema.cjs +0 -21
  543. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  544. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  545. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  546. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -681
  547. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -154
  548. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -154
  549. package/node_modules/zod/v4/core/to-json-schema.js +0 -651
  550. package/node_modules/zod/v4/core/util.cjs +0 -964
  551. package/node_modules/zod/v4/core/util.d.cts +0 -280
  552. package/node_modules/zod/v4/core/util.d.ts +0 -280
  553. package/node_modules/zod/v4/core/util.js +0 -873
  554. package/node_modules/zod/v4/core/versions.cjs +0 -27
  555. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  556. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  557. package/node_modules/zod/v4/core/versions.js +0 -5
  558. package/node_modules/zod/v4/core/visit.cjs +0 -214
  559. package/node_modules/zod/v4/core/visit.d.cts +0 -30
  560. package/node_modules/zod/v4/core/visit.d.ts +0 -30
  561. package/node_modules/zod/v4/core/visit.js +0 -169
  562. package/node_modules/zod/v4/index.cjs +0 -51
  563. package/node_modules/zod/v4/index.d.cts +0 -3
  564. package/node_modules/zod/v4/index.d.ts +0 -3
  565. package/node_modules/zod/v4/index.js +0 -4
  566. package/node_modules/zod/v4/locales/ar.cjs +0 -138
  567. package/node_modules/zod/v4/locales/ar.d.cts +0 -5
  568. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  569. package/node_modules/zod/v4/locales/ar.js +0 -111
  570. package/node_modules/zod/v4/locales/az.cjs +0 -137
  571. package/node_modules/zod/v4/locales/az.d.cts +0 -5
  572. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  573. package/node_modules/zod/v4/locales/az.js +0 -110
  574. package/node_modules/zod/v4/locales/be.cjs +0 -195
  575. package/node_modules/zod/v4/locales/be.d.cts +0 -5
  576. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  577. package/node_modules/zod/v4/locales/be.js +0 -168
  578. package/node_modules/zod/v4/locales/bg.cjs +0 -152
  579. package/node_modules/zod/v4/locales/bg.d.cts +0 -5
  580. package/node_modules/zod/v4/locales/bg.d.ts +0 -4
  581. package/node_modules/zod/v4/locales/bg.js +0 -125
  582. package/node_modules/zod/v4/locales/bn.cjs +0 -140
  583. package/node_modules/zod/v4/locales/bn.d.cts +0 -5
  584. package/node_modules/zod/v4/locales/bn.d.ts +0 -4
  585. package/node_modules/zod/v4/locales/bn.js +0 -113
  586. package/node_modules/zod/v4/locales/ca.cjs +0 -139
  587. package/node_modules/zod/v4/locales/ca.d.cts +0 -5
  588. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  589. package/node_modules/zod/v4/locales/ca.js +0 -112
  590. package/node_modules/zod/v4/locales/ckb.cjs +0 -160
  591. package/node_modules/zod/v4/locales/ckb.d.cts +0 -5
  592. package/node_modules/zod/v4/locales/ckb.d.ts +0 -4
  593. package/node_modules/zod/v4/locales/ckb.js +0 -133
  594. package/node_modules/zod/v4/locales/cs.cjs +0 -143
  595. package/node_modules/zod/v4/locales/cs.d.cts +0 -5
  596. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  597. package/node_modules/zod/v4/locales/cs.js +0 -116
  598. package/node_modules/zod/v4/locales/da.cjs +0 -147
  599. package/node_modules/zod/v4/locales/da.d.cts +0 -5
  600. package/node_modules/zod/v4/locales/da.d.ts +0 -4
  601. package/node_modules/zod/v4/locales/da.js +0 -120
  602. package/node_modules/zod/v4/locales/de.cjs +0 -140
  603. package/node_modules/zod/v4/locales/de.d.cts +0 -5
  604. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  605. package/node_modules/zod/v4/locales/de.js +0 -113
  606. package/node_modules/zod/v4/locales/el.cjs +0 -139
  607. package/node_modules/zod/v4/locales/el.d.cts +0 -5
  608. package/node_modules/zod/v4/locales/el.d.ts +0 -4
  609. package/node_modules/zod/v4/locales/el.js +0 -112
  610. package/node_modules/zod/v4/locales/en.cjs +0 -152
  611. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  612. package/node_modules/zod/v4/locales/en.d.ts +0 -4
  613. package/node_modules/zod/v4/locales/en.js +0 -125
  614. package/node_modules/zod/v4/locales/eo.cjs +0 -141
  615. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  616. package/node_modules/zod/v4/locales/eo.d.ts +0 -4
  617. package/node_modules/zod/v4/locales/eo.js +0 -114
  618. package/node_modules/zod/v4/locales/es.cjs +0 -163
  619. package/node_modules/zod/v4/locales/es.d.cts +0 -5
  620. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  621. package/node_modules/zod/v4/locales/es.js +0 -136
  622. package/node_modules/zod/v4/locales/fa.cjs +0 -146
  623. package/node_modules/zod/v4/locales/fa.d.cts +0 -5
  624. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  625. package/node_modules/zod/v4/locales/fa.js +0 -119
  626. package/node_modules/zod/v4/locales/fi.cjs +0 -144
  627. package/node_modules/zod/v4/locales/fi.d.cts +0 -5
  628. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  629. package/node_modules/zod/v4/locales/fi.js +0 -117
  630. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -139
  631. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  632. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  633. package/node_modules/zod/v4/locales/fr-CA.js +0 -112
  634. package/node_modules/zod/v4/locales/fr.cjs +0 -156
  635. package/node_modules/zod/v4/locales/fr.d.cts +0 -5
  636. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  637. package/node_modules/zod/v4/locales/fr.js +0 -129
  638. package/node_modules/zod/v4/locales/gu.cjs +0 -140
  639. package/node_modules/zod/v4/locales/gu.d.cts +0 -5
  640. package/node_modules/zod/v4/locales/gu.d.ts +0 -4
  641. package/node_modules/zod/v4/locales/gu.js +0 -113
  642. package/node_modules/zod/v4/locales/he.cjs +0 -248
  643. package/node_modules/zod/v4/locales/he.d.cts +0 -5
  644. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  645. package/node_modules/zod/v4/locales/he.js +0 -221
  646. package/node_modules/zod/v4/locales/hi.cjs +0 -138
  647. package/node_modules/zod/v4/locales/hi.d.cts +0 -5
  648. package/node_modules/zod/v4/locales/hi.d.ts +0 -4
  649. package/node_modules/zod/v4/locales/hi.js +0 -111
  650. package/node_modules/zod/v4/locales/hr.cjs +0 -153
  651. package/node_modules/zod/v4/locales/hr.d.cts +0 -5
  652. package/node_modules/zod/v4/locales/hr.d.ts +0 -4
  653. package/node_modules/zod/v4/locales/hr.js +0 -126
  654. package/node_modules/zod/v4/locales/hu.cjs +0 -140
  655. package/node_modules/zod/v4/locales/hu.d.cts +0 -5
  656. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  657. package/node_modules/zod/v4/locales/hu.js +0 -113
  658. package/node_modules/zod/v4/locales/hy.cjs +0 -185
  659. package/node_modules/zod/v4/locales/hy.d.cts +0 -5
  660. package/node_modules/zod/v4/locales/hy.d.ts +0 -4
  661. package/node_modules/zod/v4/locales/hy.js +0 -158
  662. package/node_modules/zod/v4/locales/id.cjs +0 -138
  663. package/node_modules/zod/v4/locales/id.d.cts +0 -5
  664. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  665. package/node_modules/zod/v4/locales/id.js +0 -111
  666. package/node_modules/zod/v4/locales/index.cjs +0 -152
  667. package/node_modules/zod/v4/locales/index.d.cts +0 -63
  668. package/node_modules/zod/v4/locales/index.d.ts +0 -63
  669. package/node_modules/zod/v4/locales/index.js +0 -63
  670. package/node_modules/zod/v4/locales/is.cjs +0 -141
  671. package/node_modules/zod/v4/locales/is.d.cts +0 -5
  672. package/node_modules/zod/v4/locales/is.d.ts +0 -4
  673. package/node_modules/zod/v4/locales/is.js +0 -114
  674. package/node_modules/zod/v4/locales/it.cjs +0 -140
  675. package/node_modules/zod/v4/locales/it.d.cts +0 -5
  676. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  677. package/node_modules/zod/v4/locales/it.js +0 -113
  678. package/node_modules/zod/v4/locales/ja.cjs +0 -139
  679. package/node_modules/zod/v4/locales/ja.d.cts +0 -5
  680. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  681. package/node_modules/zod/v4/locales/ja.js +0 -112
  682. package/node_modules/zod/v4/locales/ka.cjs +0 -144
  683. package/node_modules/zod/v4/locales/ka.d.cts +0 -5
  684. package/node_modules/zod/v4/locales/ka.d.ts +0 -4
  685. package/node_modules/zod/v4/locales/ka.js +0 -117
  686. package/node_modules/zod/v4/locales/kh.cjs +0 -12
  687. package/node_modules/zod/v4/locales/kh.d.cts +0 -5
  688. package/node_modules/zod/v4/locales/kh.d.ts +0 -5
  689. package/node_modules/zod/v4/locales/kh.js +0 -5
  690. package/node_modules/zod/v4/locales/km.cjs +0 -142
  691. package/node_modules/zod/v4/locales/km.d.cts +0 -5
  692. package/node_modules/zod/v4/locales/km.d.ts +0 -4
  693. package/node_modules/zod/v4/locales/km.js +0 -115
  694. package/node_modules/zod/v4/locales/kn.cjs +0 -143
  695. package/node_modules/zod/v4/locales/kn.d.cts +0 -5
  696. package/node_modules/zod/v4/locales/kn.d.ts +0 -4
  697. package/node_modules/zod/v4/locales/kn.js +0 -116
  698. package/node_modules/zod/v4/locales/ko.cjs +0 -143
  699. package/node_modules/zod/v4/locales/ko.d.cts +0 -5
  700. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  701. package/node_modules/zod/v4/locales/ko.js +0 -116
  702. package/node_modules/zod/v4/locales/lt.cjs +0 -234
  703. package/node_modules/zod/v4/locales/lt.d.cts +0 -5
  704. package/node_modules/zod/v4/locales/lt.d.ts +0 -4
  705. package/node_modules/zod/v4/locales/lt.js +0 -207
  706. package/node_modules/zod/v4/locales/mk.cjs +0 -141
  707. package/node_modules/zod/v4/locales/mk.d.cts +0 -5
  708. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  709. package/node_modules/zod/v4/locales/mk.js +0 -114
  710. package/node_modules/zod/v4/locales/ms.cjs +0 -139
  711. package/node_modules/zod/v4/locales/ms.d.cts +0 -5
  712. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  713. package/node_modules/zod/v4/locales/ms.js +0 -112
  714. package/node_modules/zod/v4/locales/ne.cjs +0 -138
  715. package/node_modules/zod/v4/locales/ne.d.cts +0 -5
  716. package/node_modules/zod/v4/locales/ne.d.ts +0 -4
  717. package/node_modules/zod/v4/locales/ne.js +0 -111
  718. package/node_modules/zod/v4/locales/nl.cjs +0 -142
  719. package/node_modules/zod/v4/locales/nl.d.cts +0 -5
  720. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  721. package/node_modules/zod/v4/locales/nl.js +0 -115
  722. package/node_modules/zod/v4/locales/nn.cjs +0 -140
  723. package/node_modules/zod/v4/locales/nn.d.cts +0 -5
  724. package/node_modules/zod/v4/locales/nn.d.ts +0 -4
  725. package/node_modules/zod/v4/locales/nn.js +0 -113
  726. package/node_modules/zod/v4/locales/no.cjs +0 -140
  727. package/node_modules/zod/v4/locales/no.d.cts +0 -5
  728. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  729. package/node_modules/zod/v4/locales/no.js +0 -113
  730. package/node_modules/zod/v4/locales/ota.cjs +0 -141
  731. package/node_modules/zod/v4/locales/ota.d.cts +0 -5
  732. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  733. package/node_modules/zod/v4/locales/ota.js +0 -114
  734. package/node_modules/zod/v4/locales/package.json +0 -7
  735. package/node_modules/zod/v4/locales/pl.cjs +0 -141
  736. package/node_modules/zod/v4/locales/pl.d.cts +0 -5
  737. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  738. package/node_modules/zod/v4/locales/pl.js +0 -114
  739. package/node_modules/zod/v4/locales/ps.cjs +0 -146
  740. package/node_modules/zod/v4/locales/ps.d.cts +0 -5
  741. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  742. package/node_modules/zod/v4/locales/ps.js +0 -119
  743. package/node_modules/zod/v4/locales/pt-BR.cjs +0 -170
  744. package/node_modules/zod/v4/locales/pt-BR.d.cts +0 -5
  745. package/node_modules/zod/v4/locales/pt-BR.d.ts +0 -4
  746. package/node_modules/zod/v4/locales/pt-BR.js +0 -143
  747. package/node_modules/zod/v4/locales/pt.cjs +0 -169
  748. package/node_modules/zod/v4/locales/pt.d.cts +0 -5
  749. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  750. package/node_modules/zod/v4/locales/pt.js +0 -142
  751. package/node_modules/zod/v4/locales/ro.cjs +0 -149
  752. package/node_modules/zod/v4/locales/ro.d.cts +0 -5
  753. package/node_modules/zod/v4/locales/ro.d.ts +0 -4
  754. package/node_modules/zod/v4/locales/ro.js +0 -122
  755. package/node_modules/zod/v4/locales/ru.cjs +0 -195
  756. package/node_modules/zod/v4/locales/ru.d.cts +0 -5
  757. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  758. package/node_modules/zod/v4/locales/ru.js +0 -168
  759. package/node_modules/zod/v4/locales/sk.cjs +0 -143
  760. package/node_modules/zod/v4/locales/sk.d.cts +0 -5
  761. package/node_modules/zod/v4/locales/sk.d.ts +0 -4
  762. package/node_modules/zod/v4/locales/sk.js +0 -116
  763. package/node_modules/zod/v4/locales/sl.cjs +0 -141
  764. package/node_modules/zod/v4/locales/sl.d.cts +0 -5
  765. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  766. package/node_modules/zod/v4/locales/sl.js +0 -114
  767. package/node_modules/zod/v4/locales/sv.cjs +0 -142
  768. package/node_modules/zod/v4/locales/sv.d.cts +0 -5
  769. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  770. package/node_modules/zod/v4/locales/sv.js +0 -115
  771. package/node_modules/zod/v4/locales/ta.cjs +0 -142
  772. package/node_modules/zod/v4/locales/ta.d.cts +0 -5
  773. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  774. package/node_modules/zod/v4/locales/ta.js +0 -115
  775. package/node_modules/zod/v4/locales/tg.cjs +0 -144
  776. package/node_modules/zod/v4/locales/tg.d.cts +0 -5
  777. package/node_modules/zod/v4/locales/tg.d.ts +0 -4
  778. package/node_modules/zod/v4/locales/tg.js +0 -117
  779. package/node_modules/zod/v4/locales/th.cjs +0 -142
  780. package/node_modules/zod/v4/locales/th.d.cts +0 -5
  781. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  782. package/node_modules/zod/v4/locales/th.js +0 -115
  783. package/node_modules/zod/v4/locales/tk.cjs +0 -134
  784. package/node_modules/zod/v4/locales/tk.d.cts +0 -5
  785. package/node_modules/zod/v4/locales/tk.d.ts +0 -4
  786. package/node_modules/zod/v4/locales/tk.js +0 -107
  787. package/node_modules/zod/v4/locales/tr.cjs +0 -137
  788. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  789. package/node_modules/zod/v4/locales/tr.d.ts +0 -4
  790. package/node_modules/zod/v4/locales/tr.js +0 -110
  791. package/node_modules/zod/v4/locales/ua.cjs +0 -12
  792. package/node_modules/zod/v4/locales/ua.d.cts +0 -5
  793. package/node_modules/zod/v4/locales/ua.d.ts +0 -5
  794. package/node_modules/zod/v4/locales/ua.js +0 -5
  795. package/node_modules/zod/v4/locales/uk.cjs +0 -140
  796. package/node_modules/zod/v4/locales/uk.d.cts +0 -5
  797. package/node_modules/zod/v4/locales/uk.d.ts +0 -4
  798. package/node_modules/zod/v4/locales/uk.js +0 -113
  799. package/node_modules/zod/v4/locales/ur.cjs +0 -142
  800. package/node_modules/zod/v4/locales/ur.d.cts +0 -5
  801. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  802. package/node_modules/zod/v4/locales/ur.js +0 -115
  803. package/node_modules/zod/v4/locales/uz.cjs +0 -140
  804. package/node_modules/zod/v4/locales/uz.d.cts +0 -5
  805. package/node_modules/zod/v4/locales/uz.d.ts +0 -4
  806. package/node_modules/zod/v4/locales/uz.js +0 -113
  807. package/node_modules/zod/v4/locales/vi.cjs +0 -140
  808. package/node_modules/zod/v4/locales/vi.d.cts +0 -5
  809. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  810. package/node_modules/zod/v4/locales/vi.js +0 -113
  811. package/node_modules/zod/v4/locales/yo.cjs +0 -139
  812. package/node_modules/zod/v4/locales/yo.d.cts +0 -5
  813. package/node_modules/zod/v4/locales/yo.d.ts +0 -4
  814. package/node_modules/zod/v4/locales/yo.js +0 -112
  815. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -141
  816. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  817. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  818. package/node_modules/zod/v4/locales/zh-CN.js +0 -114
  819. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -139
  820. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  821. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  822. package/node_modules/zod/v4/locales/zh-TW.js +0 -112
  823. package/node_modules/zod/v4/mini/checks.cjs +0 -54
  824. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  825. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  826. package/node_modules/zod/v4/mini/checks.js +0 -1
  827. package/node_modules/zod/v4/mini/coerce.cjs +0 -71
  828. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  829. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  830. package/node_modules/zod/v4/mini/coerce.js +0 -22
  831. package/node_modules/zod/v4/mini/deep-partial.cjs +0 -58
  832. package/node_modules/zod/v4/mini/deep-partial.d.cts +0 -14
  833. package/node_modules/zod/v4/mini/deep-partial.d.ts +0 -14
  834. package/node_modules/zod/v4/mini/deep-partial.js +0 -13
  835. package/node_modules/zod/v4/mini/external.cjs +0 -95
  836. package/node_modules/zod/v4/mini/external.d.cts +0 -16
  837. package/node_modules/zod/v4/mini/external.d.ts +0 -16
  838. package/node_modules/zod/v4/mini/external.js +0 -16
  839. package/node_modules/zod/v4/mini/in-out.cjs +0 -82
  840. package/node_modules/zod/v4/mini/in-out.d.cts +0 -8
  841. package/node_modules/zod/v4/mini/in-out.d.ts +0 -8
  842. package/node_modules/zod/v4/mini/in-out.js +0 -36
  843. package/node_modules/zod/v4/mini/index.cjs +0 -51
  844. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  845. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  846. package/node_modules/zod/v4/mini/index.js +0 -3
  847. package/node_modules/zod/v4/mini/iso.cjs +0 -83
  848. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  849. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  850. package/node_modules/zod/v4/mini/iso.js +0 -34
  851. package/node_modules/zod/v4/mini/package.json +0 -7
  852. package/node_modules/zod/v4/mini/parse.cjs +0 -37
  853. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  854. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  855. package/node_modules/zod/v4/mini/parse.js +0 -1
  856. package/node_modules/zod/v4/mini/schemas.cjs +0 -1147
  857. package/node_modules/zod/v4/mini/schemas.d.cts +0 -480
  858. package/node_modules/zod/v4/mini/schemas.d.ts +0 -480
  859. package/node_modules/zod/v4/mini/schemas.js +0 -1002
  860. package/node_modules/zod/v4/package.json +0 -7
  861. package/node_modules/zod/v4-mini/index.cjs +0 -51
  862. package/node_modules/zod/v4-mini/index.d.cts +0 -3
  863. package/node_modules/zod/v4-mini/index.d.ts +0 -3
  864. package/node_modules/zod/v4-mini/index.js +0 -3
  865. package/node_modules/zod/v4-mini/package.json +0 -7
@@ -1,2337 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The XENO Account & Ledger contract — canonical types.
5
- *
6
- * These Zod schemas ARE the contract every branch (app) and the origin
7
- * (xeno-platform) speak. See `XENO ACCOUNT - ARCHITECTURE.md`. Money is always
8
- * integer **micro-credits** (1 credit = 1_000_000 µcr) — never a float.
9
- */
10
- /** 1 credit expressed in the integer base unit. */
11
- declare const MICRO_PER_CREDIT = 1000000;
12
- /** A surface = the originating app/branch, the "from where" attribution. */
13
- declare const surfaceSchema: z.ZodString;
14
- type Surface = z.infer<typeof surfaceSchema>;
15
- /**
16
- * The canonical XENO account as a branch sees it. `id` is the canonical
17
- * `platform_user_id`; identity is keyed on (provider, subject) upstream, never
18
- * on the email — `email` here is contact/display only.
19
- */
20
- declare const accountSchema: z.ZodObject<{
21
- id: z.ZodString;
22
- email: z.ZodString;
23
- username: z.ZodDefault<z.ZodNullable<z.ZodString>>;
24
- displayName: z.ZodDefault<z.ZodNullable<z.ZodString>>;
25
- avatarUrl: z.ZodDefault<z.ZodNullable<z.ZodString>>;
26
- emailVerified: z.ZodDefault<z.ZodBoolean>;
27
- linkedSurfaces: z.ZodDefault<z.ZodArray<z.ZodString>>;
28
- }, z.core.$strip>;
29
- type Account = z.infer<typeof accountSchema>;
30
- declare const tokenSetSchema: z.ZodObject<{
31
- accessToken: z.ZodString;
32
- tokenType: z.ZodDefault<z.ZodString>;
33
- expiresAt: z.ZodDefault<z.ZodNullable<z.ZodCoercedDate<unknown>>>;
34
- refreshToken: z.ZodDefault<z.ZodNullable<z.ZodString>>;
35
- idToken: z.ZodDefault<z.ZodNullable<z.ZodString>>;
36
- scope: z.ZodDefault<z.ZodArray<z.ZodString>>;
37
- sid: z.ZodDefault<z.ZodNullable<z.ZodString>>;
38
- accessClaims: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
39
- idClaims: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
40
- }, z.core.$strip>;
41
- type TokenSet = z.infer<typeof tokenSetSchema>;
42
- /** Raw OAuth 2.0 token endpoint response (snake_case, as servers emit it). */
43
- declare const oauthTokenResponseSchema: z.ZodObject<{
44
- access_token: z.ZodString;
45
- token_type: z.ZodDefault<z.ZodString>;
46
- expires_in: z.ZodOptional<z.ZodNumber>;
47
- refresh_token: z.ZodOptional<z.ZodString>;
48
- id_token: z.ZodOptional<z.ZodString>;
49
- scope: z.ZodOptional<z.ZodString>;
50
- }, z.core.$strip>;
51
- type OAuthTokenResponse = z.infer<typeof oauthTokenResponseSchema>;
52
- /**
53
- * The three balances every double-entry wallet exposes. Gate spend decisions
54
- * on `availableMicro` (most conservative). All values are integer micro-credits.
55
- */
56
- declare const balanceSchema: z.ZodObject<{
57
- postedMicro: z.ZodNumber;
58
- pendingMicro: z.ZodNumber;
59
- availableMicro: z.ZodNumber;
60
- currency: z.ZodDefault<z.ZodLiteral<"credits">>;
61
- asOf: z.ZodDefault<z.ZodCoercedDate<unknown>>;
62
- }, z.core.$strip>;
63
- type Balance = z.infer<typeof balanceSchema>;
64
- declare const meterAggregationSchema: z.ZodEnum<{
65
- sum: "sum";
66
- count: "count";
67
- max: "max";
68
- min: "min";
69
- unique_count: "unique_count";
70
- latest: "latest";
71
- }>;
72
- type MeterAggregation = z.infer<typeof meterAggregationSchema>;
73
- /**
74
- * A usage event posted to the meter. `transactionId` MUST be deterministic
75
- * (a hash of the business event), never a random id minted at send time — it
76
- * is the dedup key (32–34 day window) that makes metering exactly-once.
77
- */
78
- declare const usageEventSchema: z.ZodObject<{
79
- surface: z.ZodString;
80
- transactionId: z.ZodString;
81
- operation: z.ZodString;
82
- model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
83
- provider: z.ZodDefault<z.ZodNullable<z.ZodString>>;
84
- costMicro: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
85
- inputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
86
- outputTokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
87
- dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
88
- occurredAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
89
- }, z.core.$strip>;
90
- type UsageEvent = z.infer<typeof usageEventSchema>;
91
- declare const usageResultSchema: z.ZodObject<{
92
- accepted: z.ZodBoolean;
93
- duplicate: z.ZodDefault<z.ZodBoolean>;
94
- costMicro: z.ZodNumber;
95
- transactionId: z.ZodString;
96
- balance: z.ZodDefault<z.ZodNullable<z.ZodObject<{
97
- postedMicro: z.ZodNumber;
98
- pendingMicro: z.ZodNumber;
99
- availableMicro: z.ZodNumber;
100
- currency: z.ZodDefault<z.ZodLiteral<"credits">>;
101
- asOf: z.ZodDefault<z.ZodCoercedDate<unknown>>;
102
- }, z.core.$strip>>>;
103
- }, z.core.$strip>;
104
- type UsageResult = z.infer<typeof usageResultSchema>;
105
- /** A two-phase hold (reserve → settle/void) for hard per-use gating. */
106
- declare const holdRequestSchema: z.ZodObject<{
107
- surface: z.ZodString;
108
- holdId: z.ZodString;
109
- amountMicro: z.ZodNumber;
110
- operation: z.ZodString;
111
- expiresInSeconds: z.ZodDefault<z.ZodNumber>;
112
- dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
113
- }, z.core.$strip>;
114
- type HoldRequest = z.infer<typeof holdRequestSchema>;
115
- declare const holdSchema: z.ZodObject<{
116
- holdId: z.ZodString;
117
- state: z.ZodEnum<{
118
- held: "held";
119
- settled: "settled";
120
- voided: "voided";
121
- expired: "expired";
122
- }>;
123
- amountMicro: z.ZodNumber;
124
- settledMicro: z.ZodDefault<z.ZodNumber>;
125
- balance: z.ZodDefault<z.ZodNullable<z.ZodObject<{
126
- postedMicro: z.ZodNumber;
127
- pendingMicro: z.ZodNumber;
128
- availableMicro: z.ZodNumber;
129
- currency: z.ZodDefault<z.ZodLiteral<"credits">>;
130
- asOf: z.ZodDefault<z.ZodCoercedDate<unknown>>;
131
- }, z.core.$strip>>>;
132
- }, z.core.$strip>;
133
- type Hold = z.infer<typeof holdSchema>;
134
- declare const authzCheckSchema: z.ZodObject<{
135
- subject: z.ZodString;
136
- relation: z.ZodString;
137
- object: z.ZodString;
138
- context: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
139
- }, z.core.$strip>;
140
- type AuthzCheck = z.infer<typeof authzCheckSchema>;
141
- declare const authzResultSchema: z.ZodObject<{
142
- allowed: z.ZodBoolean;
143
- reason: z.ZodDefault<z.ZodNullable<z.ZodString>>;
144
- }, z.core.$strip>;
145
- type AuthzResult = z.infer<typeof authzResultSchema>;
146
- /** Convert whole credits → integer micro-credits. */
147
- declare function toMicro(credits: number): number;
148
- /** Convert integer micro-credits → whole credits (may be fractional). */
149
- declare function fromMicro(micro: number): number;
150
-
151
- /**
152
- * Normalised error taxonomy for the account client. Every failure a branch can
153
- * see maps to one of these codes so callers branch on `code`, never on strings.
154
- */
155
- type AccountErrorCode = 'DISABLED' | 'UNREACHABLE' | 'INVALID_TOKEN' | 'INSUFFICIENT_CREDITS' | 'CONFLICT' | 'INVALID_RESPONSE' | 'BAD_REQUEST' | 'NOT_FOUND' | 'RATE_LIMITED' | 'PLATFORM_ERROR';
156
- declare class AccountError extends Error {
157
- readonly code: AccountErrorCode;
158
- readonly httpStatus: number | null;
159
- readonly retryable: boolean;
160
- readonly retryAfterMs: number | null;
161
- readonly oauthError: string | null;
162
- constructor(args: {
163
- code: AccountErrorCode;
164
- message: string;
165
- httpStatus?: number | null;
166
- retryable?: boolean;
167
- retryAfterMs?: number | null;
168
- oauthError?: string | null;
169
- });
170
- }
171
- /** Map an HTTP status to the right error code. */
172
- declare function codeForStatus(status: number): AccountErrorCode;
173
-
174
- /**
175
- * Minimal, dependency-free HTTP transport for the account client.
176
- *
177
- * Design rules (from `XENO ACCOUNT - ARCHITECTURE.md` §4.4):
178
- * - Mutations carry an `Idempotency-Key`; the SDK NEVER auto-retries a mutation
179
- * without one (would risk a double-charge). With a key, retrying is safe
180
- * because the origin replays the first response.
181
- * - GETs are safely retried on network/5xx with capped backoff.
182
- * - The bearer token is sent in the Authorization header, never logged.
183
- */
184
- interface TransportOptions {
185
- /** Injectable for tests; defaults to global fetch. */
186
- fetchImpl?: typeof fetch;
187
- timeoutMs?: number;
188
- /** Retry attempts for idempotent requests (GET, or mutation with a key). */
189
- maxRetries?: number;
190
- userAgent?: string;
191
- /** Maximum decoded response bytes. Oversized responses fail, never truncate. */
192
- maxResponseBytes?: number;
193
- }
194
- interface RequestArgs {
195
- method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
196
- url: string;
197
- token?: string | null;
198
- tokenType?: 'Bearer' | 'DPoP';
199
- body?: unknown;
200
- /** Required to make a mutation retry-safe. */
201
- idempotencyKey?: string;
202
- /** Extra headers (e.g. DPoP proof). */
203
- headers?: Record<string, string>;
204
- /** Host-owned authorization refreshed for each attempt; DPoP proofs are single use. */
205
- authorization?: RequestAuthorizationProvider;
206
- /** Only canonical OAuth grant endpoints opt into safe error-code extraction. */
207
- oauthErrorResponse?: boolean;
208
- /** Caller cancellation is nonretryable and covers authorization/body as well as fetch. */
209
- signal?: AbortSignal;
210
- }
211
- interface RequestAuthorization {
212
- token: string;
213
- tokenType: 'Bearer' | 'DPoP';
214
- headers?: Record<string, string>;
215
- }
216
- type RequestAuthorizationProvider = (method: RequestArgs['method'], url: string) => Promise<RequestAuthorization>;
217
- type AuthorizationInput = string | RequestAuthorization | RequestAuthorizationProvider;
218
- declare class Transport {
219
- private readonly fetchImpl;
220
- private readonly timeoutMs;
221
- private readonly maxRetries;
222
- private readonly userAgent;
223
- private readonly maxResponseBytes;
224
- constructor(opts?: TransportOptions);
225
- /** Perform a request and return parsed JSON (or null for empty bodies). */
226
- request<T = unknown>(args: RequestArgs): Promise<T>;
227
- private once;
228
- }
229
-
230
- /**
231
- * Account client — the identity-read side. Resolves a token to its canonical
232
- * XENO account.
233
- *
234
- * Targets the v2 `/api/v2/me`, with a graceful fall-back to the legacy
235
- * `/api/auth/me` envelope (`{ success, user: {...} }`) so it works against the
236
- * live platform today, before the v2 surface ships.
237
- */
238
- declare class AccountClient {
239
- private readonly base;
240
- private readonly transport;
241
- constructor(base: string, transport: Transport);
242
- /** Resolve a token to its account, or throw an AccountError. */
243
- me(auth: AuthorizationInput): Promise<Account>;
244
- }
245
- /**
246
- * Normalise either a v2 account or the legacy `{ user }` envelope into the
247
- * canonical {@link Account}. Tolerant of snake/camel; null only if no id+email.
248
- */
249
- declare function normalize(body: unknown): Account | null;
250
-
251
- /** Caller-facing input types (defaults not yet applied). */
252
- type UsageEventInput = z.input<typeof usageEventSchema>;
253
- type HoldRequestInput = z.input<typeof holdRequestSchema>;
254
- /**
255
- * Ledger client — the spend side of the contract. Targets the origin's
256
- * `/api/v2/ledger/*` surface. Every mutation is idempotent: usage events key on
257
- * a deterministic `transactionId`, holds on a `holdId`, and both are sent as the
258
- * `Idempotency-Key` so a retry can never double-charge.
259
- *
260
- * Spend decisions gate on `balance.availableMicro` (the most conservative of the
261
- * three balances). All amounts are integer micro-credits.
262
- */
263
- declare class LedgerClient {
264
- private readonly apiBase;
265
- private readonly transport;
266
- constructor(apiBase: string, transport: Transport);
267
- /** Posted / pending / available balance for the token's account. */
268
- getBalance(auth: AuthorizationInput): Promise<Balance>;
269
- /**
270
- * Record a usage event (the meter). Idempotent on `transactionId`; a duplicate
271
- * returns `{ duplicate: true }` and does not charge again.
272
- */
273
- recordUsage(auth: AuthorizationInput, event: UsageEventInput): Promise<UsageResult>;
274
- /**
275
- * Reserve credits for a per-use action (phase 1 of two-phase spend). Rejected
276
- * with `INSUFFICIENT_CREDITS` if `available < amount`. Idempotent on `holdId`.
277
- */
278
- hold(auth: AuthorizationInput, req: HoldRequestInput): Promise<Hold>;
279
- /**
280
- * Settle a hold for the actual cost (phase 2). Posting less than the held
281
- * amount auto-restores the remainder. Idempotent on `holdId`.
282
- */
283
- settle(auth: AuthorizationInput, holdId: string, actualCostMicro: number): Promise<Hold>;
284
- /** Release a hold without charging (failure/cancel). Idempotent on `holdId`. */
285
- void(auth: AuthorizationInput, holdId: string): Promise<Hold>;
286
- }
287
-
288
- /**
289
- * Authorization client — ReBAC checks against the origin's central authz
290
- * service (OpenFGA-backed). A branch asks "may this subject perform this
291
- * relation on this object?"; the origin is the single source of truth so
292
- * cross-app permission inheritance works without per-app role sync.
293
- *
294
- * Fail-closed: any transport error surfaces as an AccountError; callers must
295
- * treat a non-`allowed` result (or an error) as deny.
296
- */
297
- declare class AuthzClient {
298
- private readonly apiBase;
299
- private readonly transport;
300
- constructor(apiBase: string, transport: Transport);
301
- check(auth: AuthorizationInput, check: AuthzCheck): Promise<AuthzResult>;
302
- }
303
-
304
- declare const membershipMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
- action: z.ZodLiteral<"invite.create">;
306
- email: z.ZodString;
307
- role: z.ZodEnum<{
308
- admin: "admin";
309
- member: "member";
310
- viewer: "viewer";
311
- }>;
312
- }, z.core.$strict>, z.ZodObject<{
313
- action: z.ZodLiteral<"invite.revoke">;
314
- inviteId: z.ZodString;
315
- }, z.core.$strict>, z.ZodObject<{
316
- action: z.ZodLiteral<"invite.resend">;
317
- inviteId: z.ZodString;
318
- }, z.core.$strict>, z.ZodObject<{
319
- action: z.ZodLiteral<"member.role">;
320
- memberId: z.ZodString;
321
- role: z.ZodEnum<{
322
- admin: "admin";
323
- member: "member";
324
- viewer: "viewer";
325
- }>;
326
- }, z.core.$strict>, z.ZodObject<{
327
- action: z.ZodLiteral<"member.remove">;
328
- memberId: z.ZodString;
329
- }, z.core.$strict>, z.ZodObject<{
330
- action: z.ZodLiteral<"owner.transfer">;
331
- newOwnerId: z.ZodString;
332
- }, z.core.$strict>], "action">;
333
- type WorkspaceMembershipMutation = z.infer<typeof membershipMutationSchema>;
334
- declare const membershipCommittedSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
335
- action: z.ZodLiteral<"invite.create">;
336
- result: z.ZodObject<{
337
- invite: z.ZodObject<{
338
- id: z.ZodString;
339
- workspace_id: z.ZodString;
340
- invited_email: z.ZodString;
341
- role: z.ZodEnum<{
342
- admin: "admin";
343
- member: "member";
344
- viewer: "viewer";
345
- }>;
346
- status: z.ZodEnum<{
347
- pending: "pending";
348
- revoked: "revoked";
349
- }>;
350
- expires_at: z.ZodString;
351
- }, z.core.$strict>;
352
- delivery: z.ZodObject<{
353
- id: z.ZodString;
354
- state: z.ZodLiteral<"queued">;
355
- }, z.core.$strict>;
356
- }, z.core.$strict>;
357
- operation_id: z.ZodString;
358
- workspace_id: z.ZodString;
359
- actor_user_id: z.ZodString;
360
- client_id: z.ZodString;
361
- committed_at: z.ZodString;
362
- }, z.core.$strict>, z.ZodObject<{
363
- action: z.ZodLiteral<"invite.resend">;
364
- result: z.ZodObject<{
365
- invite: z.ZodObject<{
366
- id: z.ZodString;
367
- workspace_id: z.ZodString;
368
- invited_email: z.ZodString;
369
- role: z.ZodEnum<{
370
- admin: "admin";
371
- member: "member";
372
- viewer: "viewer";
373
- }>;
374
- status: z.ZodEnum<{
375
- pending: "pending";
376
- revoked: "revoked";
377
- }>;
378
- expires_at: z.ZodString;
379
- }, z.core.$strict>;
380
- delivery: z.ZodObject<{
381
- id: z.ZodString;
382
- state: z.ZodLiteral<"queued">;
383
- }, z.core.$strict>;
384
- }, z.core.$strict>;
385
- operation_id: z.ZodString;
386
- workspace_id: z.ZodString;
387
- actor_user_id: z.ZodString;
388
- client_id: z.ZodString;
389
- committed_at: z.ZodString;
390
- }, z.core.$strict>, z.ZodObject<{
391
- action: z.ZodLiteral<"invite.revoke">;
392
- result: z.ZodObject<{
393
- invite: z.ZodObject<{
394
- id: z.ZodString;
395
- workspace_id: z.ZodString;
396
- invited_email: z.ZodString;
397
- role: z.ZodEnum<{
398
- admin: "admin";
399
- member: "member";
400
- viewer: "viewer";
401
- }>;
402
- status: z.ZodEnum<{
403
- pending: "pending";
404
- revoked: "revoked";
405
- }>;
406
- expires_at: z.ZodString;
407
- }, z.core.$strict>;
408
- }, z.core.$strict>;
409
- operation_id: z.ZodString;
410
- workspace_id: z.ZodString;
411
- actor_user_id: z.ZodString;
412
- client_id: z.ZodString;
413
- committed_at: z.ZodString;
414
- }, z.core.$strict>, z.ZodObject<{
415
- action: z.ZodLiteral<"member.role">;
416
- result: z.ZodObject<{
417
- memberId: z.ZodString;
418
- role: z.ZodEnum<{
419
- admin: "admin";
420
- member: "member";
421
- viewer: "viewer";
422
- }>;
423
- }, z.core.$strict>;
424
- operation_id: z.ZodString;
425
- workspace_id: z.ZodString;
426
- actor_user_id: z.ZodString;
427
- client_id: z.ZodString;
428
- committed_at: z.ZodString;
429
- }, z.core.$strict>, z.ZodObject<{
430
- action: z.ZodLiteral<"member.remove">;
431
- result: z.ZodObject<{
432
- memberId: z.ZodString;
433
- }, z.core.$strict>;
434
- operation_id: z.ZodString;
435
- workspace_id: z.ZodString;
436
- actor_user_id: z.ZodString;
437
- client_id: z.ZodString;
438
- committed_at: z.ZodString;
439
- }, z.core.$strict>, z.ZodObject<{
440
- action: z.ZodLiteral<"owner.transfer">;
441
- result: z.ZodObject<{
442
- memberId: z.ZodString;
443
- previousOwnerId: z.ZodString;
444
- }, z.core.$strict>;
445
- operation_id: z.ZodString;
446
- workspace_id: z.ZodString;
447
- actor_user_id: z.ZodString;
448
- client_id: z.ZodString;
449
- committed_at: z.ZodString;
450
- }, z.core.$strict>], "action">;
451
- declare const membershipRejectedSchema: z.ZodObject<{
452
- action: z.ZodEnum<{
453
- "invite.create": "invite.create";
454
- "invite.revoke": "invite.revoke";
455
- "invite.resend": "invite.resend";
456
- "member.role": "member.role";
457
- "member.remove": "member.remove";
458
- "owner.transfer": "owner.transfer";
459
- }>;
460
- rejection: z.ZodEnum<{
461
- invalid_membership_request: "invalid_membership_request";
462
- member_not_found: "member_not_found";
463
- owner_transfer_required: "owner_transfer_required";
464
- owner_target_not_member: "owner_target_not_member";
465
- invite_not_found: "invite_not_found";
466
- invite_already_pending: "invite_already_pending";
467
- already_member: "already_member";
468
- seat_limit: "seat_limit";
469
- }>;
470
- operation_id: z.ZodString;
471
- workspace_id: z.ZodString;
472
- actor_user_id: z.ZodString;
473
- client_id: z.ZodString;
474
- committed_at: z.ZodString;
475
- }, z.core.$strict>;
476
- declare const membershipAbandonedSchema: z.ZodObject<{
477
- action: z.ZodEnum<{
478
- "invite.create": "invite.create";
479
- "invite.revoke": "invite.revoke";
480
- "invite.resend": "invite.resend";
481
- "member.role": "member.role";
482
- "member.remove": "member.remove";
483
- "owner.transfer": "owner.transfer";
484
- }>;
485
- workspace_id: z.ZodString;
486
- operation_id: z.ZodString;
487
- actor_user_id: z.ZodString;
488
- client_id: z.ZodString;
489
- committed_at: z.ZodString;
490
- abandoned: z.ZodLiteral<true>;
491
- request: z.ZodDiscriminatedUnion<[z.ZodObject<{
492
- action: z.ZodLiteral<"invite.create">;
493
- email: z.ZodString;
494
- role: z.ZodEnum<{
495
- admin: "admin";
496
- member: "member";
497
- viewer: "viewer";
498
- }>;
499
- }, z.core.$strict>, z.ZodObject<{
500
- action: z.ZodLiteral<"invite.revoke">;
501
- inviteId: z.ZodString;
502
- }, z.core.$strict>, z.ZodObject<{
503
- action: z.ZodLiteral<"invite.resend">;
504
- inviteId: z.ZodString;
505
- }, z.core.$strict>, z.ZodObject<{
506
- action: z.ZodLiteral<"member.role">;
507
- memberId: z.ZodString;
508
- role: z.ZodEnum<{
509
- admin: "admin";
510
- member: "member";
511
- viewer: "viewer";
512
- }>;
513
- }, z.core.$strict>, z.ZodObject<{
514
- action: z.ZodLiteral<"member.remove">;
515
- memberId: z.ZodString;
516
- }, z.core.$strict>, z.ZodObject<{
517
- action: z.ZodLiteral<"owner.transfer">;
518
- newOwnerId: z.ZodString;
519
- }, z.core.$strict>], "action">;
520
- }, z.core.$strict>;
521
- declare const membershipOperationSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
522
- action: z.ZodLiteral<"invite.create">;
523
- result: z.ZodObject<{
524
- invite: z.ZodObject<{
525
- id: z.ZodString;
526
- workspace_id: z.ZodString;
527
- invited_email: z.ZodString;
528
- role: z.ZodEnum<{
529
- admin: "admin";
530
- member: "member";
531
- viewer: "viewer";
532
- }>;
533
- status: z.ZodEnum<{
534
- pending: "pending";
535
- revoked: "revoked";
536
- }>;
537
- expires_at: z.ZodString;
538
- }, z.core.$strict>;
539
- delivery: z.ZodObject<{
540
- id: z.ZodString;
541
- state: z.ZodLiteral<"queued">;
542
- }, z.core.$strict>;
543
- }, z.core.$strict>;
544
- operation_id: z.ZodString;
545
- workspace_id: z.ZodString;
546
- actor_user_id: z.ZodString;
547
- client_id: z.ZodString;
548
- committed_at: z.ZodString;
549
- }, z.core.$strict>, z.ZodObject<{
550
- action: z.ZodLiteral<"invite.resend">;
551
- result: z.ZodObject<{
552
- invite: z.ZodObject<{
553
- id: z.ZodString;
554
- workspace_id: z.ZodString;
555
- invited_email: z.ZodString;
556
- role: z.ZodEnum<{
557
- admin: "admin";
558
- member: "member";
559
- viewer: "viewer";
560
- }>;
561
- status: z.ZodEnum<{
562
- pending: "pending";
563
- revoked: "revoked";
564
- }>;
565
- expires_at: z.ZodString;
566
- }, z.core.$strict>;
567
- delivery: z.ZodObject<{
568
- id: z.ZodString;
569
- state: z.ZodLiteral<"queued">;
570
- }, z.core.$strict>;
571
- }, z.core.$strict>;
572
- operation_id: z.ZodString;
573
- workspace_id: z.ZodString;
574
- actor_user_id: z.ZodString;
575
- client_id: z.ZodString;
576
- committed_at: z.ZodString;
577
- }, z.core.$strict>, z.ZodObject<{
578
- action: z.ZodLiteral<"invite.revoke">;
579
- result: z.ZodObject<{
580
- invite: z.ZodObject<{
581
- id: z.ZodString;
582
- workspace_id: z.ZodString;
583
- invited_email: z.ZodString;
584
- role: z.ZodEnum<{
585
- admin: "admin";
586
- member: "member";
587
- viewer: "viewer";
588
- }>;
589
- status: z.ZodEnum<{
590
- pending: "pending";
591
- revoked: "revoked";
592
- }>;
593
- expires_at: z.ZodString;
594
- }, z.core.$strict>;
595
- }, z.core.$strict>;
596
- operation_id: z.ZodString;
597
- workspace_id: z.ZodString;
598
- actor_user_id: z.ZodString;
599
- client_id: z.ZodString;
600
- committed_at: z.ZodString;
601
- }, z.core.$strict>, z.ZodObject<{
602
- action: z.ZodLiteral<"member.role">;
603
- result: z.ZodObject<{
604
- memberId: z.ZodString;
605
- role: z.ZodEnum<{
606
- admin: "admin";
607
- member: "member";
608
- viewer: "viewer";
609
- }>;
610
- }, z.core.$strict>;
611
- operation_id: z.ZodString;
612
- workspace_id: z.ZodString;
613
- actor_user_id: z.ZodString;
614
- client_id: z.ZodString;
615
- committed_at: z.ZodString;
616
- }, z.core.$strict>, z.ZodObject<{
617
- action: z.ZodLiteral<"member.remove">;
618
- result: z.ZodObject<{
619
- memberId: z.ZodString;
620
- }, z.core.$strict>;
621
- operation_id: z.ZodString;
622
- workspace_id: z.ZodString;
623
- actor_user_id: z.ZodString;
624
- client_id: z.ZodString;
625
- committed_at: z.ZodString;
626
- }, z.core.$strict>, z.ZodObject<{
627
- action: z.ZodLiteral<"owner.transfer">;
628
- result: z.ZodObject<{
629
- memberId: z.ZodString;
630
- previousOwnerId: z.ZodString;
631
- }, z.core.$strict>;
632
- operation_id: z.ZodString;
633
- workspace_id: z.ZodString;
634
- actor_user_id: z.ZodString;
635
- client_id: z.ZodString;
636
- committed_at: z.ZodString;
637
- }, z.core.$strict>], "action">, z.ZodObject<{
638
- action: z.ZodEnum<{
639
- "invite.create": "invite.create";
640
- "invite.revoke": "invite.revoke";
641
- "invite.resend": "invite.resend";
642
- "member.role": "member.role";
643
- "member.remove": "member.remove";
644
- "owner.transfer": "owner.transfer";
645
- }>;
646
- rejection: z.ZodEnum<{
647
- invalid_membership_request: "invalid_membership_request";
648
- member_not_found: "member_not_found";
649
- owner_transfer_required: "owner_transfer_required";
650
- owner_target_not_member: "owner_target_not_member";
651
- invite_not_found: "invite_not_found";
652
- invite_already_pending: "invite_already_pending";
653
- already_member: "already_member";
654
- seat_limit: "seat_limit";
655
- }>;
656
- operation_id: z.ZodString;
657
- workspace_id: z.ZodString;
658
- actor_user_id: z.ZodString;
659
- client_id: z.ZodString;
660
- committed_at: z.ZodString;
661
- }, z.core.$strict>, z.ZodObject<{
662
- action: z.ZodEnum<{
663
- "invite.create": "invite.create";
664
- "invite.revoke": "invite.revoke";
665
- "invite.resend": "invite.resend";
666
- "member.role": "member.role";
667
- "member.remove": "member.remove";
668
- "owner.transfer": "owner.transfer";
669
- }>;
670
- workspace_id: z.ZodString;
671
- operation_id: z.ZodString;
672
- actor_user_id: z.ZodString;
673
- client_id: z.ZodString;
674
- committed_at: z.ZodString;
675
- abandoned: z.ZodLiteral<true>;
676
- request: z.ZodDiscriminatedUnion<[z.ZodObject<{
677
- action: z.ZodLiteral<"invite.create">;
678
- email: z.ZodString;
679
- role: z.ZodEnum<{
680
- admin: "admin";
681
- member: "member";
682
- viewer: "viewer";
683
- }>;
684
- }, z.core.$strict>, z.ZodObject<{
685
- action: z.ZodLiteral<"invite.revoke">;
686
- inviteId: z.ZodString;
687
- }, z.core.$strict>, z.ZodObject<{
688
- action: z.ZodLiteral<"invite.resend">;
689
- inviteId: z.ZodString;
690
- }, z.core.$strict>, z.ZodObject<{
691
- action: z.ZodLiteral<"member.role">;
692
- memberId: z.ZodString;
693
- role: z.ZodEnum<{
694
- admin: "admin";
695
- member: "member";
696
- viewer: "viewer";
697
- }>;
698
- }, z.core.$strict>, z.ZodObject<{
699
- action: z.ZodLiteral<"member.remove">;
700
- memberId: z.ZodString;
701
- }, z.core.$strict>, z.ZodObject<{
702
- action: z.ZodLiteral<"owner.transfer">;
703
- newOwnerId: z.ZodString;
704
- }, z.core.$strict>], "action">;
705
- }, z.core.$strict>]>;
706
- type WorkspaceMembershipOperation = z.infer<typeof membershipOperationSchema>;
707
- declare const membershipDeliverySchema: z.ZodObject<{
708
- id: z.ZodString;
709
- state: z.ZodEnum<{
710
- unknown: "unknown";
711
- accepted: "accepted";
712
- queued: "queued";
713
- skipped: "skipped";
714
- }>;
715
- }, z.core.$strict>;
716
- type WorkspaceMembershipOperationState = {
717
- state: 'not-observed';
718
- operation: null;
719
- } | {
720
- state: 'committed';
721
- operation: z.infer<typeof membershipCommittedSchema>;
722
- delivery?: z.infer<typeof membershipDeliverySchema>;
723
- } | {
724
- state: 'rejected';
725
- operation: z.infer<typeof membershipRejectedSchema>;
726
- } | {
727
- state: 'abandoned';
728
- operation: z.infer<typeof membershipAbandonedSchema>;
729
- };
730
- declare class WorkspaceMembershipMutationError extends AccountError {
731
- readonly operationId: string;
732
- readonly outcome: "uncertain";
733
- constructor(operationId: string);
734
- }
735
- declare function assertMembershipOperation(workspaceId: string, operationId: string, operation: WorkspaceMembershipOperation, request?: WorkspaceMembershipMutation): void;
736
-
737
- /**
738
- * Workspace authority — the person's workspaces, their members and invitations,
739
- * workspace API keys, and the account-level operations (create a workspace,
740
- * accept or decline an invitation).
741
- *
742
- * Every call is authorised per request through the host's `authorize` callback, so
743
- * a DPoP proof is minted for the exact method and URL of each attempt. Every
744
- * response is schema-checked and every receipt is checked against the request
745
- * that produced it; a receipt for another workspace, key or operation is refused.
746
- *
747
- * Mutations that name an operation id are UNCERTAIN when their acknowledgement is
748
- * lost or malformed: they throw a `*MutationError` carrying that id. Read the
749
- * operation back by the same id; never retry under a fresh one.
750
- */
751
- declare const workspaceRoleSchema: z.ZodEnum<{
752
- admin: "admin";
753
- member: "member";
754
- viewer: "viewer";
755
- owner: "owner";
756
- }>;
757
- declare const workspaceInviteRoleSchema: z.ZodEnum<{
758
- admin: "admin";
759
- member: "member";
760
- viewer: "viewer";
761
- }>;
762
- declare const workspaceSchema: z.ZodObject<{
763
- id: z.ZodString;
764
- owner_user_id: z.ZodString;
765
- workspace_type: z.ZodString;
766
- name: z.ZodString;
767
- slug: z.ZodString;
768
- status: z.ZodString;
769
- created_at: z.ZodString;
770
- updated_at: z.ZodString;
771
- metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
772
- member_role: z.ZodOptional<z.ZodEnum<{
773
- admin: "admin";
774
- member: "member";
775
- viewer: "viewer";
776
- owner: "owner";
777
- }>>;
778
- member_count: z.ZodOptional<z.ZodNumber>;
779
- }, z.core.$strip>;
780
- declare const workspaceMemberSchema: z.ZodObject<{
781
- id: z.ZodString;
782
- user_id: z.ZodString;
783
- member_role: z.ZodEnum<{
784
- admin: "admin";
785
- member: "member";
786
- viewer: "viewer";
787
- owner: "owner";
788
- }>;
789
- member_status: z.ZodLiteral<"active">;
790
- created_at: z.ZodString;
791
- user: z.ZodOptional<z.ZodObject<{
792
- username: z.ZodNullable<z.ZodString>;
793
- email: z.ZodString;
794
- display_name: z.ZodNullable<z.ZodString>;
795
- avatar_url: z.ZodNullable<z.ZodString>;
796
- }, z.core.$strip>>;
797
- }, z.core.$strip>;
798
- declare const workspaceInviteSchema: z.ZodObject<{
799
- id: z.ZodString;
800
- workspace_id: z.ZodString;
801
- invited_by_user_id: z.ZodString;
802
- invited_user_id: z.ZodNullable<z.ZodString>;
803
- invited_email: z.ZodString;
804
- role: z.ZodEnum<{
805
- admin: "admin";
806
- member: "member";
807
- viewer: "viewer";
808
- }>;
809
- status: z.ZodEnum<{
810
- accepted: "accepted";
811
- expired: "expired";
812
- pending: "pending";
813
- revoked: "revoked";
814
- declined: "declined";
815
- }>;
816
- created_at: z.ZodString;
817
- expires_at: z.ZodNullable<z.ZodString>;
818
- workspace_name: z.ZodOptional<z.ZodString>;
819
- invited_by_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
820
- }, z.core.$strip>;
821
- type AccountWorkspace = z.infer<typeof workspaceSchema>;
822
- type WorkspaceMember = z.infer<typeof workspaceMemberSchema>;
823
- type WorkspaceInvite = z.infer<typeof workspaceInviteSchema>;
824
- type WorkspaceRole = z.infer<typeof workspaceRoleSchema>;
825
- type WorkspaceInviteRole = z.infer<typeof workspaceInviteRoleSchema>;
826
- declare const accountOperationIntentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
827
- action: z.ZodLiteral<"workspace.create">;
828
- name: z.ZodString;
829
- type: z.ZodLiteral<"team">;
830
- }, z.core.$strict>, z.ZodObject<{
831
- action: z.ZodLiteral<"invite.accept">;
832
- inviteId: z.ZodString;
833
- }, z.core.$strict>, z.ZodObject<{
834
- action: z.ZodLiteral<"invite.decline">;
835
- inviteId: z.ZodString;
836
- }, z.core.$strict>], "action">;
837
- type AccountOperationIntent = z.infer<typeof accountOperationIntentSchema>;
838
- declare const accountOperationSchema: z.ZodObject<{
839
- operation_id: z.ZodString;
840
- actor_user_id: z.ZodString;
841
- client_id: z.ZodString;
842
- action: z.ZodEnum<{
843
- "workspace.create": "workspace.create";
844
- "invite.accept": "invite.accept";
845
- "invite.decline": "invite.decline";
846
- }>;
847
- committed_at: z.ZodString;
848
- result: z.ZodUnion<readonly [z.ZodObject<{
849
- workspace: z.ZodObject<{
850
- id: z.ZodString;
851
- owner_user_id: z.ZodString;
852
- workspace_type: z.ZodString;
853
- name: z.ZodString;
854
- slug: z.ZodString;
855
- status: z.ZodString;
856
- created_at: z.ZodString;
857
- updated_at: z.ZodString;
858
- metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
859
- member_role: z.ZodOptional<z.ZodEnum<{
860
- admin: "admin";
861
- member: "member";
862
- viewer: "viewer";
863
- owner: "owner";
864
- }>>;
865
- member_count: z.ZodOptional<z.ZodNumber>;
866
- }, z.core.$strip>;
867
- }, z.core.$strict>, z.ZodObject<{
868
- invite: z.ZodObject<{
869
- id: z.ZodString;
870
- workspace_id: z.ZodString;
871
- invited_by_user_id: z.ZodString;
872
- invited_user_id: z.ZodNullable<z.ZodString>;
873
- invited_email: z.ZodString;
874
- role: z.ZodEnum<{
875
- admin: "admin";
876
- member: "member";
877
- viewer: "viewer";
878
- }>;
879
- status: z.ZodEnum<{
880
- accepted: "accepted";
881
- expired: "expired";
882
- pending: "pending";
883
- revoked: "revoked";
884
- declined: "declined";
885
- }>;
886
- created_at: z.ZodString;
887
- expires_at: z.ZodNullable<z.ZodString>;
888
- workspace_name: z.ZodOptional<z.ZodString>;
889
- invited_by_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
- }, z.core.$strip>;
891
- }, z.core.$strict>]>;
892
- }, z.core.$strict>;
893
- type AccountOperation = z.infer<typeof accountOperationSchema>;
894
- type AccountOperationState = {
895
- state: 'not-observed';
896
- operation: null;
897
- } | {
898
- state: 'committed';
899
- operation: AccountOperation;
900
- };
901
- declare class AccountMutationError extends AccountError {
902
- readonly operationId: string;
903
- readonly outcome: "uncertain";
904
- constructor(operationId: string);
905
- }
906
- declare const workspaceKeyScopeSchema: z.ZodEnum<{
907
- "workspace:read": "workspace:read";
908
- "workspace:members:read": "workspace:members:read";
909
- }>;
910
- declare const workspaceKeySchema: z.ZodObject<{
911
- id: z.ZodString;
912
- workspace_id: z.ZodString;
913
- created_by_user_id: z.ZodString;
914
- name: z.ZodString;
915
- prefix: z.ZodString;
916
- scopes: z.ZodArray<z.ZodEnum<{
917
- "workspace:read": "workspace:read";
918
- "workspace:members:read": "workspace:members:read";
919
- }>>;
920
- revision: z.ZodNumber;
921
- created_at: z.ZodString;
922
- expires_at: z.ZodString;
923
- revoked_at: z.ZodNullable<z.ZodString>;
924
- replaced_by: z.ZodNullable<z.ZodString>;
925
- }, z.core.$strip>;
926
- type WorkspaceKey = z.infer<typeof workspaceKeySchema>;
927
- declare const workspaceKeyInputSchema: z.ZodObject<{
928
- name: z.ZodString;
929
- scopes: z.ZodArray<z.ZodEnum<{
930
- "workspace:read": "workspace:read";
931
- "workspace:members:read": "workspace:members:read";
932
- }>>;
933
- expires_at: z.ZodString;
934
- }, z.core.$strict>;
935
- type WorkspaceKeyInput = z.infer<typeof workspaceKeyInputSchema>;
936
- /** Returned only on successful creation/rotation to the privileged caller. Never
937
- * persist this receipt in renderer settings, audit events or session history. */
938
- type WorkspaceKeyReceipt = {
939
- key: WorkspaceKey;
940
- secret: string;
941
- };
942
- type WorkspaceKeyPage = {
943
- keys: WorkspaceKey[];
944
- next_cursor: string | null;
945
- };
946
- declare const committedKeyOperationSchema: z.ZodObject<{
947
- operation_id: z.ZodString;
948
- workspace_id: z.ZodString;
949
- actor_user_id: z.ZodString;
950
- client_id: z.ZodString;
951
- action: z.ZodEnum<{
952
- create: "create";
953
- rotate: "rotate";
954
- revoke: "revoke";
955
- }>;
956
- key: z.ZodObject<{
957
- id: z.ZodString;
958
- workspace_id: z.ZodString;
959
- created_by_user_id: z.ZodString;
960
- name: z.ZodString;
961
- prefix: z.ZodString;
962
- scopes: z.ZodArray<z.ZodEnum<{
963
- "workspace:read": "workspace:read";
964
- "workspace:members:read": "workspace:members:read";
965
- }>>;
966
- revision: z.ZodNumber;
967
- created_at: z.ZodString;
968
- expires_at: z.ZodString;
969
- revoked_at: z.ZodNullable<z.ZodString>;
970
- replaced_by: z.ZodNullable<z.ZodString>;
971
- }, z.core.$strip>;
972
- previous_key_id: z.ZodNullable<z.ZodString>;
973
- committed_at: z.ZodString;
974
- }, z.core.$strict>;
975
- declare const workspaceKeyRejectionSchema: z.ZodEnum<{
976
- invalid_workspace_key_request: "invalid_workspace_key_request";
977
- invalid_workspace_key_revision: "invalid_workspace_key_revision";
978
- workspace_key_not_found: "workspace_key_not_found";
979
- workspace_key_conflict: "workspace_key_conflict";
980
- }>;
981
- declare const rejectedKeyOperationSchema: z.ZodObject<{
982
- action: z.ZodEnum<{
983
- create: "create";
984
- rotate: "rotate";
985
- revoke: "revoke";
986
- }>;
987
- workspace_id: z.ZodString;
988
- operation_id: z.ZodString;
989
- actor_user_id: z.ZodString;
990
- client_id: z.ZodString;
991
- committed_at: z.ZodString;
992
- previous_key_id: z.ZodNullable<z.ZodString>;
993
- rejection: z.ZodEnum<{
994
- invalid_workspace_key_request: "invalid_workspace_key_request";
995
- invalid_workspace_key_revision: "invalid_workspace_key_revision";
996
- workspace_key_not_found: "workspace_key_not_found";
997
- workspace_key_conflict: "workspace_key_conflict";
998
- }>;
999
- }, z.core.$strict>;
1000
- declare const abandonedKeyOperationSchema: z.ZodObject<{
1001
- action: z.ZodEnum<{
1002
- create: "create";
1003
- rotate: "rotate";
1004
- revoke: "revoke";
1005
- }>;
1006
- workspace_id: z.ZodString;
1007
- operation_id: z.ZodString;
1008
- actor_user_id: z.ZodString;
1009
- client_id: z.ZodString;
1010
- committed_at: z.ZodString;
1011
- previous_key_id: z.ZodNullable<z.ZodString>;
1012
- abandoned: z.ZodLiteral<true>;
1013
- }, z.core.$strict>;
1014
- declare const workspaceKeyOperationSchema: z.ZodUnion<readonly [z.ZodObject<{
1015
- operation_id: z.ZodString;
1016
- workspace_id: z.ZodString;
1017
- actor_user_id: z.ZodString;
1018
- client_id: z.ZodString;
1019
- action: z.ZodEnum<{
1020
- create: "create";
1021
- rotate: "rotate";
1022
- revoke: "revoke";
1023
- }>;
1024
- key: z.ZodObject<{
1025
- id: z.ZodString;
1026
- workspace_id: z.ZodString;
1027
- created_by_user_id: z.ZodString;
1028
- name: z.ZodString;
1029
- prefix: z.ZodString;
1030
- scopes: z.ZodArray<z.ZodEnum<{
1031
- "workspace:read": "workspace:read";
1032
- "workspace:members:read": "workspace:members:read";
1033
- }>>;
1034
- revision: z.ZodNumber;
1035
- created_at: z.ZodString;
1036
- expires_at: z.ZodString;
1037
- revoked_at: z.ZodNullable<z.ZodString>;
1038
- replaced_by: z.ZodNullable<z.ZodString>;
1039
- }, z.core.$strip>;
1040
- previous_key_id: z.ZodNullable<z.ZodString>;
1041
- committed_at: z.ZodString;
1042
- }, z.core.$strict>, z.ZodObject<{
1043
- action: z.ZodEnum<{
1044
- create: "create";
1045
- rotate: "rotate";
1046
- revoke: "revoke";
1047
- }>;
1048
- workspace_id: z.ZodString;
1049
- operation_id: z.ZodString;
1050
- actor_user_id: z.ZodString;
1051
- client_id: z.ZodString;
1052
- committed_at: z.ZodString;
1053
- previous_key_id: z.ZodNullable<z.ZodString>;
1054
- rejection: z.ZodEnum<{
1055
- invalid_workspace_key_request: "invalid_workspace_key_request";
1056
- invalid_workspace_key_revision: "invalid_workspace_key_revision";
1057
- workspace_key_not_found: "workspace_key_not_found";
1058
- workspace_key_conflict: "workspace_key_conflict";
1059
- }>;
1060
- }, z.core.$strict>, z.ZodObject<{
1061
- action: z.ZodEnum<{
1062
- create: "create";
1063
- rotate: "rotate";
1064
- revoke: "revoke";
1065
- }>;
1066
- workspace_id: z.ZodString;
1067
- operation_id: z.ZodString;
1068
- actor_user_id: z.ZodString;
1069
- client_id: z.ZodString;
1070
- committed_at: z.ZodString;
1071
- previous_key_id: z.ZodNullable<z.ZodString>;
1072
- abandoned: z.ZodLiteral<true>;
1073
- }, z.core.$strict>]>;
1074
- type WorkspaceKeyOperation = z.infer<typeof workspaceKeyOperationSchema>;
1075
- declare const keyMutationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1076
- action: z.ZodLiteral<"create">;
1077
- input: z.ZodObject<{
1078
- name: z.ZodString;
1079
- scopes: z.ZodArray<z.ZodEnum<{
1080
- "workspace:read": "workspace:read";
1081
- "workspace:members:read": "workspace:members:read";
1082
- }>>;
1083
- expires_at: z.ZodString;
1084
- }, z.core.$strict>;
1085
- }, z.core.$strict>, z.ZodObject<{
1086
- action: z.ZodLiteral<"rotate">;
1087
- keyId: z.ZodString;
1088
- expectedRevision: z.ZodNumber;
1089
- input: z.ZodOptional<z.ZodObject<{
1090
- name: z.ZodOptional<z.ZodString>;
1091
- scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1092
- "workspace:read": "workspace:read";
1093
- "workspace:members:read": "workspace:members:read";
1094
- }>>>;
1095
- expires_at: z.ZodOptional<z.ZodString>;
1096
- }, z.core.$strict>>;
1097
- }, z.core.$strict>, z.ZodObject<{
1098
- action: z.ZodLiteral<"revoke">;
1099
- keyId: z.ZodString;
1100
- expectedRevision: z.ZodNumber;
1101
- }, z.core.$strict>], "action">;
1102
- type WorkspaceKeyMutation = z.infer<typeof keyMutationSchema>;
1103
- type WorkspaceKeyOperationResult = {
1104
- operation: WorkspaceKeyOperation;
1105
- replayed: boolean;
1106
- secret?: string;
1107
- };
1108
- type WorkspaceKeyOperationState = {
1109
- state: 'not-observed';
1110
- operation: null;
1111
- } | {
1112
- state: 'committed';
1113
- operation: z.infer<typeof committedKeyOperationSchema>;
1114
- } | {
1115
- state: 'rejected';
1116
- operation: z.infer<typeof rejectedKeyOperationSchema>;
1117
- } | {
1118
- state: 'abandoned';
1119
- operation: z.infer<typeof abandonedKeyOperationSchema>;
1120
- };
1121
- /** A mutation may have committed before transport/schema validation failed.
1122
- * Retain this operationId; never replace it with a fresh create to retry. */
1123
- declare class WorkspaceKeyMutationError extends AccountError {
1124
- readonly operationId: string;
1125
- readonly outcome: "uncertain";
1126
- constructor(operationId: string);
1127
- }
1128
- type WorkspaceAuthorization = (method: string, url: string, opts: {
1129
- scopes: string[];
1130
- silent: true;
1131
- }) => Promise<RequestAuthorization | null>;
1132
- declare const membersResponse: z.ZodObject<{
1133
- success: z.ZodLiteral<true>;
1134
- workspace: z.ZodObject<{
1135
- id: z.ZodString;
1136
- owner_user_id: z.ZodString;
1137
- workspace_type: z.ZodString;
1138
- name: z.ZodString;
1139
- slug: z.ZodString;
1140
- status: z.ZodString;
1141
- created_at: z.ZodString;
1142
- updated_at: z.ZodString;
1143
- metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1144
- member_role: z.ZodOptional<z.ZodEnum<{
1145
- admin: "admin";
1146
- member: "member";
1147
- viewer: "viewer";
1148
- owner: "owner";
1149
- }>>;
1150
- member_count: z.ZodOptional<z.ZodNumber>;
1151
- }, z.core.$strip>;
1152
- members: z.ZodArray<z.ZodObject<{
1153
- id: z.ZodString;
1154
- user_id: z.ZodString;
1155
- member_role: z.ZodEnum<{
1156
- admin: "admin";
1157
- member: "member";
1158
- viewer: "viewer";
1159
- owner: "owner";
1160
- }>;
1161
- member_status: z.ZodLiteral<"active">;
1162
- created_at: z.ZodString;
1163
- user: z.ZodOptional<z.ZodObject<{
1164
- username: z.ZodNullable<z.ZodString>;
1165
- email: z.ZodString;
1166
- display_name: z.ZodNullable<z.ZodString>;
1167
- avatar_url: z.ZodNullable<z.ZodString>;
1168
- }, z.core.$strip>>;
1169
- }, z.core.$strip>>;
1170
- }, z.core.$strip>;
1171
- declare class WorkspaceClient {
1172
- private readonly transport;
1173
- private readonly authorize;
1174
- private readonly base;
1175
- constructor(base: string, transport: Transport, authorize: WorkspaceAuthorization);
1176
- private call;
1177
- list(): Promise<AccountWorkspace[]>;
1178
- keys(workspaceId: string, options?: {
1179
- cursor?: string;
1180
- limit?: number;
1181
- }): Promise<WorkspaceKeyPage>;
1182
- createKey(workspaceId: string, input: WorkspaceKeyInput): Promise<WorkspaceKeyReceipt>;
1183
- keyOperation(workspaceId: string, operationId: string): Promise<WorkspaceKeyOperationState>;
1184
- mutateKey(workspaceId: string, operationId: string, request: WorkspaceKeyMutation): Promise<WorkspaceKeyOperationResult>;
1185
- private assertOperation;
1186
- rotateKey(workspaceId: string, keyId: string, expectedRevision: number, input?: Partial<WorkspaceKeyInput>): Promise<WorkspaceKeyReceipt>;
1187
- revokeKey(workspaceId: string, keyId: string, expectedRevision: number): Promise<WorkspaceKey>;
1188
- private assertKeyReceipt;
1189
- create(name: string, type?: 'personal' | 'team'): Promise<AccountWorkspace>;
1190
- accountOperation(operationId: string): Promise<AccountOperationState>;
1191
- mutateAccount(operationId: string, request: AccountOperationIntent): Promise<{
1192
- operation: AccountOperation;
1193
- replayed: boolean;
1194
- }>;
1195
- select(workspaceId: string): Promise<void>;
1196
- members(workspaceId: string): Promise<z.infer<typeof membersResponse>>;
1197
- updateMember(workspaceId: string, memberId: string, role: WorkspaceInviteRole): Promise<void>;
1198
- membershipOperation(workspaceId: string, operationId: string): Promise<WorkspaceMembershipOperationState>;
1199
- mutateMembership(workspaceId: string, operationId: string, request: WorkspaceMembershipMutation): Promise<{
1200
- operation: WorkspaceMembershipOperation;
1201
- replayed: boolean;
1202
- }>;
1203
- /** Explicit user-requested settlement only. A lost ACK remains uncertain; never
1204
- * synthesize abandonment locally or automatically retry with a new ID. */
1205
- abandonMembershipOperation(workspaceId: string, operationId: string, request: WorkspaceMembershipMutation): Promise<{
1206
- operation: WorkspaceMembershipOperation;
1207
- replayed: boolean;
1208
- }>;
1209
- abandonKeyOperation(workspaceId: string, operationId: string, request: WorkspaceKeyMutation): Promise<{
1210
- operation: WorkspaceKeyOperation;
1211
- replayed: boolean;
1212
- }>;
1213
- removeMember(workspaceId: string, memberId: string): Promise<void>;
1214
- transferOwnership(workspaceId: string, newOwnerUserId: string): Promise<void>;
1215
- invites(workspaceId: string): Promise<WorkspaceInvite[]>;
1216
- invite(workspaceId: string, email: string, role?: WorkspaceInviteRole): Promise<WorkspaceInvite>;
1217
- revokeInvite(workspaceId: string, inviteId: string): Promise<void>;
1218
- resendInvite(workspaceId: string, inviteId: string): Promise<void>;
1219
- pendingInvites(): Promise<WorkspaceInvite[]>;
1220
- acceptInvite(inviteId: string): Promise<void>;
1221
- declineInvite(inviteId: string): Promise<void>;
1222
- }
1223
-
1224
- declare const workforceOwnerSchema: z.ZodObject<{
1225
- type: z.ZodEnum<{
1226
- user: "user";
1227
- workspace: "workspace";
1228
- }>;
1229
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1230
- }, z.core.$strict>;
1231
- type WorkforceOwner = z.infer<typeof workforceOwnerSchema>;
1232
- declare const workforceDefinitionSchema: z.ZodObject<{
1233
- secretReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1234
- name: z.ZodString;
1235
- ref: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1236
- }, z.core.$strict>>>;
1237
- provenance: z.ZodOptional<z.ZodObject<{
1238
- source: z.ZodEnum<{
1239
- authored: "authored";
1240
- imported: "imported";
1241
- }>;
1242
- sourceVersion: z.ZodOptional<z.ZodString>;
1243
- }, z.core.$strict>>;
1244
- license: z.ZodOptional<z.ZodObject<{
1245
- identifier: z.ZodString;
1246
- }, z.core.$strict>>;
1247
- instructions: z.ZodString;
1248
- skills: z.ZodArray<z.ZodObject<{
1249
- id: z.ZodString;
1250
- version: z.ZodString;
1251
- hash: z.ZodString;
1252
- }, z.core.$strict>>;
1253
- requestedCapabilities: z.ZodArray<z.ZodString>;
1254
- schemaVersion: z.ZodLiteral<1>;
1255
- }, z.core.$strict>;
1256
- declare const workforceCreateResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1257
- kind: z.ZodLiteral<"agent">;
1258
- definition: z.ZodObject<{
1259
- secretReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1260
- name: z.ZodString;
1261
- ref: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1262
- }, z.core.$strict>>>;
1263
- provenance: z.ZodOptional<z.ZodObject<{
1264
- source: z.ZodEnum<{
1265
- authored: "authored";
1266
- imported: "imported";
1267
- }>;
1268
- sourceVersion: z.ZodOptional<z.ZodString>;
1269
- }, z.core.$strict>>;
1270
- license: z.ZodOptional<z.ZodObject<{
1271
- identifier: z.ZodString;
1272
- }, z.core.$strict>>;
1273
- instructions: z.ZodString;
1274
- skills: z.ZodArray<z.ZodObject<{
1275
- id: z.ZodString;
1276
- version: z.ZodString;
1277
- hash: z.ZodString;
1278
- }, z.core.$strict>>;
1279
- requestedCapabilities: z.ZodArray<z.ZodString>;
1280
- schemaVersion: z.ZodLiteral<1>;
1281
- }, z.core.$strict>;
1282
- operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1283
- owner: z.ZodObject<{
1284
- type: z.ZodEnum<{
1285
- user: "user";
1286
- workspace: "workspace";
1287
- }>;
1288
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1289
- }, z.core.$strict>;
1290
- expectedActorAccountId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1291
- name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1292
- description: z.ZodOptional<z.ZodString>;
1293
- }, z.core.$strict>, z.ZodObject<{
1294
- kind: z.ZodLiteral<"team">;
1295
- operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1296
- owner: z.ZodObject<{
1297
- type: z.ZodEnum<{
1298
- user: "user";
1299
- workspace: "workspace";
1300
- }>;
1301
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1302
- }, z.core.$strict>;
1303
- expectedActorAccountId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1304
- name: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1305
- description: z.ZodOptional<z.ZodString>;
1306
- }, z.core.$strict>], "kind">;
1307
- declare const workforceReadOperationSchema: z.ZodObject<{
1308
- operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1309
- owner: z.ZodObject<{
1310
- type: z.ZodEnum<{
1311
- user: "user";
1312
- workspace: "workspace";
1313
- }>;
1314
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1315
- }, z.core.$strict>;
1316
- expectedActorAccountId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1317
- }, z.core.$strict>;
1318
- type WorkforceCreateResourceInput = z.input<typeof workforceCreateResourceSchema>;
1319
- type WorkforceReadOperationInput = z.input<typeof workforceReadOperationSchema>;
1320
- type WorkforceDefinition = z.input<typeof workforceDefinitionSchema>;
1321
- declare const workforceListOwnedResourcesSchema: z.ZodObject<{
1322
- owner: z.ZodObject<{
1323
- type: z.ZodEnum<{
1324
- user: "user";
1325
- workspace: "workspace";
1326
- }>;
1327
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1328
- }, z.core.$strict>;
1329
- expectedActorAccountId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1330
- limit: z.ZodOptional<z.ZodNumber>;
1331
- kind: z.ZodOptional<z.ZodEnum<{
1332
- team: "team";
1333
- agent: "agent";
1334
- }>>;
1335
- status: z.ZodOptional<z.ZodEnum<{
1336
- active: "active";
1337
- archived: "archived";
1338
- }>>;
1339
- cursor: z.ZodOptional<z.ZodString>;
1340
- }, z.core.$strict>;
1341
- type WorkforceListOwnedResourcesInput = z.input<typeof workforceListOwnedResourcesSchema>;
1342
- declare const resource: z.ZodObject<{
1343
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1344
- kind: z.ZodEnum<{
1345
- team: "team";
1346
- agent: "agent";
1347
- }>;
1348
- owner: z.ZodObject<{
1349
- type: z.ZodEnum<{
1350
- user: "user";
1351
- workspace: "workspace";
1352
- }>;
1353
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1354
- }, z.core.$strict>;
1355
- createdByUserId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1356
- name: z.ZodString;
1357
- description: z.ZodString;
1358
- status: z.ZodEnum<{
1359
- active: "active";
1360
- archived: "archived";
1361
- }>;
1362
- revision: z.ZodString;
1363
- createdAt: z.ZodString;
1364
- updatedAt: z.ZodString;
1365
- }, z.core.$strict>;
1366
- declare const ownedCatalog: z.ZodObject<{
1367
- success: z.ZodLiteral<true>;
1368
- schemaVersion: z.ZodLiteral<1>;
1369
- scope: z.ZodLiteral<"owned">;
1370
- owner: z.ZodObject<{
1371
- type: z.ZodEnum<{
1372
- user: "user";
1373
- workspace: "workspace";
1374
- }>;
1375
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1376
- }, z.core.$strict>;
1377
- items: z.ZodArray<z.ZodObject<{
1378
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1379
- kind: z.ZodEnum<{
1380
- team: "team";
1381
- agent: "agent";
1382
- }>;
1383
- owner: z.ZodObject<{
1384
- type: z.ZodEnum<{
1385
- user: "user";
1386
- workspace: "workspace";
1387
- }>;
1388
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1389
- }, z.core.$strict>;
1390
- createdByUserId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1391
- name: z.ZodString;
1392
- description: z.ZodString;
1393
- status: z.ZodEnum<{
1394
- active: "active";
1395
- archived: "archived";
1396
- }>;
1397
- revision: z.ZodString;
1398
- createdAt: z.ZodString;
1399
- updatedAt: z.ZodString;
1400
- }, z.core.$strict>>;
1401
- nextCursor: z.ZodNullable<z.ZodString>;
1402
- }, z.core.$strict>;
1403
- type WorkforceOwnedCatalog = z.infer<typeof ownedCatalog>;
1404
- type WorkforceResourceMetadata = z.infer<typeof resource>;
1405
- declare const committed: z.ZodObject<{
1406
- success: z.ZodLiteral<true>;
1407
- state: z.ZodLiteral<"committed">;
1408
- operation: z.ZodObject<{
1409
- schemaVersion: z.ZodLiteral<1>;
1410
- operationId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1411
- action: z.ZodLiteral<"agent.resource.create">;
1412
- state: z.ZodLiteral<"committed">;
1413
- owner: z.ZodObject<{
1414
- type: z.ZodEnum<{
1415
- user: "user";
1416
- workspace: "workspace";
1417
- }>;
1418
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1419
- }, z.core.$strict>;
1420
- resourceId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1421
- resourceRevision: z.ZodString;
1422
- agentVersion: z.ZodNullable<z.ZodNumber>;
1423
- committedAt: z.ZodString;
1424
- }, z.core.$strict>;
1425
- resource: z.ZodNullable<z.ZodObject<{
1426
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1427
- kind: z.ZodEnum<{
1428
- team: "team";
1429
- agent: "agent";
1430
- }>;
1431
- owner: z.ZodObject<{
1432
- type: z.ZodEnum<{
1433
- user: "user";
1434
- workspace: "workspace";
1435
- }>;
1436
- id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1437
- }, z.core.$strict>;
1438
- createdByUserId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1439
- name: z.ZodString;
1440
- description: z.ZodString;
1441
- status: z.ZodEnum<{
1442
- active: "active";
1443
- archived: "archived";
1444
- }>;
1445
- revision: z.ZodString;
1446
- createdAt: z.ZodString;
1447
- updatedAt: z.ZodString;
1448
- }, z.core.$strict>>;
1449
- version: z.ZodNullable<z.ZodObject<{
1450
- resourceId: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1451
- version: z.ZodNumber;
1452
- schemaVersion: z.ZodLiteral<1>;
1453
- content: z.ZodObject<{
1454
- instructions: z.ZodString;
1455
- skills: z.ZodArray<z.ZodObject<{
1456
- id: z.ZodString;
1457
- version: z.ZodString;
1458
- hash: z.ZodString;
1459
- }, z.core.$strict>>;
1460
- requestedCapabilities: z.ZodArray<z.ZodString>;
1461
- secretReferences: z.ZodArray<z.ZodObject<{
1462
- name: z.ZodString;
1463
- ref: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1464
- }, z.core.$strict>>;
1465
- }, z.core.$strict>;
1466
- contentHash: z.ZodString;
1467
- provenance: z.ZodUnion<readonly [z.ZodObject<{
1468
- source: z.ZodEnum<{
1469
- authored: "authored";
1470
- imported: "imported";
1471
- }>;
1472
- sourceVersion: z.ZodOptional<z.ZodString>;
1473
- }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
1474
- license: z.ZodUnion<readonly [z.ZodObject<{
1475
- identifier: z.ZodString;
1476
- }, z.core.$strict>, z.ZodObject<{}, z.core.$strict>]>;
1477
- createdByUserId: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
1478
- createdAt: z.ZodString;
1479
- }, z.core.$strict>>;
1480
- replayed: z.ZodBoolean;
1481
- resourceAccess: z.ZodDiscriminatedUnion<[z.ZodObject<{
1482
- allowed: z.ZodLiteral<true>;
1483
- }, z.core.$strict>, z.ZodObject<{
1484
- allowed: z.ZodLiteral<false>;
1485
- reason: z.ZodLiteral<"no_access">;
1486
- }, z.core.$strict>], "allowed">;
1487
- }, z.core.$strict>;
1488
- declare const notObserved: z.ZodObject<{
1489
- success: z.ZodLiteral<true>;
1490
- state: z.ZodLiteral<"not-observed">;
1491
- operation: z.ZodNull;
1492
- resource: z.ZodNull;
1493
- version: z.ZodNull;
1494
- replayed: z.ZodLiteral<false>;
1495
- }, z.core.$strict>;
1496
- type WorkforceResourceResult = z.infer<typeof committed>;
1497
- type WorkforceOperationResult = WorkforceResourceResult | z.infer<typeof notObserved>;
1498
- /** Client-observed uncertainty, not a claim that the server committed or rejected.
1499
- * Persist this identity and read it back. Never generate a new ID to retry. */
1500
- declare class WorkforceResourceMutationError extends AccountError {
1501
- readonly operationId: string;
1502
- readonly outcome: "uncertain";
1503
- readonly reason: "mutation_outcome_unverified";
1504
- readonly source: "client-observation";
1505
- readonly owner: Readonly<WorkforceOwner>;
1506
- constructor(operationId: string, owner: WorkforceOwner, cause: unknown);
1507
- }
1508
- type WorkforceAuthorization = (method: string, url: string, options: {
1509
- scopes: string[];
1510
- silent: true;
1511
- }) => Promise<RequestAuthorization | null>;
1512
- /** Canonical account transport only. Definitions request capabilities; creating
1513
- * one does not establish a principal, team membership or execution permission. */
1514
- declare class WorkforceClient {
1515
- private readonly transport;
1516
- private readonly authorize;
1517
- private readonly base;
1518
- constructor(base: string, transport: Transport, authorize: WorkforceAuthorization);
1519
- /** This catalog lists one explicitly owned scope only. It is not an aggregate
1520
- * of assigned, shared or rented resources and contains no agent definitions. */
1521
- listOwnedResources(value: WorkforceListOwnedResourcesInput): Promise<WorkforceOwnedCatalog>;
1522
- private validate;
1523
- createResource(value: WorkforceCreateResourceInput): Promise<WorkforceResourceResult>;
1524
- readOperation(value: WorkforceReadOperationInput): Promise<WorkforceOperationResult>;
1525
- }
1526
-
1527
- declare const notificationEventSchema: z.ZodEnum<{
1528
- "agent.finished": "agent.finished";
1529
- "agent.failed": "agent.failed";
1530
- "agent.cancelled": "agent.cancelled";
1531
- }>;
1532
- declare const notificationChannelSchema: z.ZodEnum<{
1533
- webhook: "webhook";
1534
- slack: "slack";
1535
- discord: "discord";
1536
- }>;
1537
- declare const notificationScopeSchema: z.ZodObject<{
1538
- workspaceId: z.ZodString;
1539
- workspaceCreatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1540
- teamId: z.ZodOptional<z.ZodString>;
1541
- agentId: z.ZodOptional<z.ZodString>;
1542
- }, z.core.$strict>;
1543
- declare const notificationRuleSchema: z.ZodObject<{
1544
- id: z.ZodOptional<z.ZodString>;
1545
- event: z.ZodEnum<{
1546
- "agent.finished": "agent.finished";
1547
- "agent.failed": "agent.failed";
1548
- "agent.cancelled": "agent.cancelled";
1549
- }>;
1550
- channel: z.ZodEnum<{
1551
- webhook: "webhook";
1552
- slack: "slack";
1553
- discord: "discord";
1554
- }>;
1555
- destinationId: z.ZodString;
1556
- enabled: z.ZodBoolean;
1557
- }, z.core.$strict>;
1558
- declare const notificationSettingsSchema: z.ZodObject<{
1559
- success: z.ZodLiteral<true>;
1560
- channelVersion: z.ZodLiteral<2>;
1561
- revision: z.ZodUnion<readonly [z.ZodLiteral<"0">, z.ZodString]>;
1562
- rules: z.ZodArray<z.ZodObject<{
1563
- id: z.ZodOptional<z.ZodString>;
1564
- event: z.ZodEnum<{
1565
- "agent.finished": "agent.finished";
1566
- "agent.failed": "agent.failed";
1567
- "agent.cancelled": "agent.cancelled";
1568
- }>;
1569
- channel: z.ZodEnum<{
1570
- webhook: "webhook";
1571
- slack: "slack";
1572
- discord: "discord";
1573
- }>;
1574
- destinationId: z.ZodString;
1575
- enabled: z.ZodBoolean;
1576
- }, z.core.$strict>>;
1577
- destinations: z.ZodArray<z.ZodPipe<z.ZodObject<{
1578
- id: z.ZodString;
1579
- label: z.ZodString;
1580
- channel: z.ZodEnum<{
1581
- webhook: "webhook";
1582
- slack: "slack";
1583
- discord: "discord";
1584
- }>;
1585
- ready: z.ZodBoolean;
1586
- enabled: z.ZodBoolean;
1587
- updated_at: z.ZodString;
1588
- }, z.core.$strict>, z.ZodTransform<{
1589
- updatedAt: string;
1590
- id: string;
1591
- label: string;
1592
- channel: "webhook" | "slack" | "discord";
1593
- ready: boolean;
1594
- enabled: boolean;
1595
- }, {
1596
- id: string;
1597
- label: string;
1598
- channel: "webhook" | "slack" | "discord";
1599
- ready: boolean;
1600
- enabled: boolean;
1601
- updated_at: string;
1602
- }>>>;
1603
- deliveries: z.ZodArray<z.ZodObject<{
1604
- id: z.ZodString;
1605
- destination_id: z.ZodString;
1606
- event: z.ZodEnum<{
1607
- "agent.finished": "agent.finished";
1608
- "agent.failed": "agent.failed";
1609
- "agent.cancelled": "agent.cancelled";
1610
- }>;
1611
- state: z.ZodEnum<{
1612
- queued: "queued";
1613
- leased: "leased";
1614
- delivered: "delivered";
1615
- failed: "failed";
1616
- cancelled: "cancelled";
1617
- }>;
1618
- attempt: z.ZodNumber;
1619
- max_attempts: z.ZodNumber;
1620
- status_code: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1621
- error_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1622
- created_at: z.ZodString;
1623
- delivered_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1624
- next_retry_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1625
- cancelled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1626
- }, z.core.$strip>>;
1627
- channels: z.ZodArray<z.ZodObject<{
1628
- id: z.ZodEnum<{
1629
- email: "email";
1630
- webhook: "webhook";
1631
- slack: "slack";
1632
- discord: "discord";
1633
- }>;
1634
- available: z.ZodBoolean;
1635
- }, z.core.$strip>>;
1636
- digestFrequencies: z.ZodTuple<[z.ZodLiteral<"realtime">], null>;
1637
- }, z.core.$strip>;
1638
- declare const eventInputSchema: z.ZodObject<{
1639
- eventId: z.ZodString;
1640
- event: z.ZodEnum<{
1641
- "agent.finished": "agent.finished";
1642
- "agent.failed": "agent.failed";
1643
- "agent.cancelled": "agent.cancelled";
1644
- }>;
1645
- occurredAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1646
- scope: z.ZodObject<{
1647
- workspaceId: z.ZodString;
1648
- workspaceCreatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1649
- teamId: z.ZodOptional<z.ZodString>;
1650
- agentId: z.ZodOptional<z.ZodString>;
1651
- }, z.core.$strict>;
1652
- conversationId: z.ZodString;
1653
- requestId: z.ZodString;
1654
- }, z.core.$strict>;
1655
- type NotificationScope = z.input<typeof notificationScopeSchema>;
1656
- type NotificationRule = z.infer<typeof notificationRuleSchema>;
1657
- type NotificationSettings = z.infer<typeof notificationSettingsSchema>;
1658
- type AgentNotificationInput = z.input<typeof eventInputSchema>;
1659
- type NotificationAdmission = {
1660
- success: true;
1661
- admitted: true;
1662
- duplicate: boolean;
1663
- };
1664
- declare const notificationDestinationActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1665
- action: z.ZodLiteral<"create">;
1666
- url: z.ZodString;
1667
- }, z.core.$strict>, z.ZodObject<{
1668
- action: z.ZodLiteral<"update">;
1669
- destination_id: z.ZodString;
1670
- expected_updated_at: z.ZodString;
1671
- url: z.ZodOptional<z.ZodString>;
1672
- enabled: z.ZodOptional<z.ZodBoolean>;
1673
- }, z.core.$strict>, z.ZodObject<{
1674
- action: z.ZodLiteral<"delete">;
1675
- destination_id: z.ZodString;
1676
- expected_updated_at: z.ZodString;
1677
- }, z.core.$strict>, z.ZodObject<{
1678
- action: z.ZodLiteral<"delivery-control">;
1679
- destination_id: z.ZodString;
1680
- delivery_id: z.ZodString;
1681
- operation: z.ZodEnum<{
1682
- retry: "retry";
1683
- cancel: "cancel";
1684
- }>;
1685
- }, z.core.$strict>], "action">;
1686
- declare const notificationDestinationOperationSchema: z.ZodObject<{
1687
- operation_id: z.ZodString;
1688
- workspace_id: z.ZodString;
1689
- actor_user_id: z.ZodString;
1690
- client_id: z.ZodString;
1691
- action: z.ZodEnum<{
1692
- create: "create";
1693
- update: "update";
1694
- delete: "delete";
1695
- "delivery-control": "delivery-control";
1696
- }>;
1697
- state: z.ZodEnum<{
1698
- committed: "committed";
1699
- rejected: "rejected";
1700
- prepared: "prepared";
1701
- }>;
1702
- prepared_at: z.ZodString;
1703
- committed_at: z.ZodOptional<z.ZodString>;
1704
- destination: z.ZodOptional<z.ZodObject<{
1705
- id: z.ZodString;
1706
- label: z.ZodString;
1707
- channel: z.ZodLiteral<"webhook">;
1708
- ready: z.ZodBoolean;
1709
- enabled: z.ZodBoolean;
1710
- updated_at: z.ZodString;
1711
- }, z.core.$strict>>;
1712
- delivery: z.ZodOptional<z.ZodObject<{
1713
- id: z.ZodString;
1714
- state: z.ZodString;
1715
- attempt: z.ZodNumber;
1716
- max_attempts: z.ZodNumber;
1717
- }, z.core.$strict>>;
1718
- rejection: z.ZodOptional<z.ZodEnum<{
1719
- notification_destination_not_found: "notification_destination_not_found";
1720
- notification_destination_generation_conflict: "notification_destination_generation_conflict";
1721
- notification_delivery_transition_unavailable: "notification_delivery_transition_unavailable";
1722
- }>>;
1723
- }, z.core.$strict>;
1724
- declare const destinationOperationMutationResponseSchema: z.ZodObject<{
1725
- state: z.ZodEnum<{
1726
- committed: "committed";
1727
- rejected: "rejected";
1728
- prepared: "prepared";
1729
- }>;
1730
- operation: z.ZodObject<{
1731
- operation_id: z.ZodString;
1732
- workspace_id: z.ZodString;
1733
- actor_user_id: z.ZodString;
1734
- client_id: z.ZodString;
1735
- action: z.ZodEnum<{
1736
- create: "create";
1737
- update: "update";
1738
- delete: "delete";
1739
- "delivery-control": "delivery-control";
1740
- }>;
1741
- state: z.ZodEnum<{
1742
- committed: "committed";
1743
- rejected: "rejected";
1744
- prepared: "prepared";
1745
- }>;
1746
- prepared_at: z.ZodString;
1747
- committed_at: z.ZodOptional<z.ZodString>;
1748
- destination: z.ZodOptional<z.ZodObject<{
1749
- id: z.ZodString;
1750
- label: z.ZodString;
1751
- channel: z.ZodLiteral<"webhook">;
1752
- ready: z.ZodBoolean;
1753
- enabled: z.ZodBoolean;
1754
- updated_at: z.ZodString;
1755
- }, z.core.$strict>>;
1756
- delivery: z.ZodOptional<z.ZodObject<{
1757
- id: z.ZodString;
1758
- state: z.ZodString;
1759
- attempt: z.ZodNumber;
1760
- max_attempts: z.ZodNumber;
1761
- }, z.core.$strict>>;
1762
- rejection: z.ZodOptional<z.ZodEnum<{
1763
- notification_destination_not_found: "notification_destination_not_found";
1764
- notification_destination_generation_conflict: "notification_destination_generation_conflict";
1765
- notification_delivery_transition_unavailable: "notification_delivery_transition_unavailable";
1766
- }>>;
1767
- }, z.core.$strict>;
1768
- replayed: z.ZodBoolean;
1769
- }, z.core.$strict>;
1770
- declare const destinationOperationLookupResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1771
- state: z.ZodLiteral<"not-observed">;
1772
- operation: z.ZodNull;
1773
- }, z.core.$strict>, z.ZodObject<{
1774
- state: z.ZodEnum<{
1775
- committed: "committed";
1776
- rejected: "rejected";
1777
- prepared: "prepared";
1778
- }>;
1779
- operation: z.ZodObject<{
1780
- operation_id: z.ZodString;
1781
- workspace_id: z.ZodString;
1782
- actor_user_id: z.ZodString;
1783
- client_id: z.ZodString;
1784
- action: z.ZodEnum<{
1785
- create: "create";
1786
- update: "update";
1787
- delete: "delete";
1788
- "delivery-control": "delivery-control";
1789
- }>;
1790
- state: z.ZodEnum<{
1791
- committed: "committed";
1792
- rejected: "rejected";
1793
- prepared: "prepared";
1794
- }>;
1795
- prepared_at: z.ZodString;
1796
- committed_at: z.ZodOptional<z.ZodString>;
1797
- destination: z.ZodOptional<z.ZodObject<{
1798
- id: z.ZodString;
1799
- label: z.ZodString;
1800
- channel: z.ZodLiteral<"webhook">;
1801
- ready: z.ZodBoolean;
1802
- enabled: z.ZodBoolean;
1803
- updated_at: z.ZodString;
1804
- }, z.core.$strict>>;
1805
- delivery: z.ZodOptional<z.ZodObject<{
1806
- id: z.ZodString;
1807
- state: z.ZodString;
1808
- attempt: z.ZodNumber;
1809
- max_attempts: z.ZodNumber;
1810
- }, z.core.$strict>>;
1811
- rejection: z.ZodOptional<z.ZodEnum<{
1812
- notification_destination_not_found: "notification_destination_not_found";
1813
- notification_destination_generation_conflict: "notification_destination_generation_conflict";
1814
- notification_delivery_transition_unavailable: "notification_delivery_transition_unavailable";
1815
- }>>;
1816
- }, z.core.$strict>;
1817
- }, z.core.$strict>]>;
1818
- declare const destinationOperationExecuteResponseSchema: z.ZodObject<{
1819
- state: z.ZodEnum<{
1820
- committed: "committed";
1821
- rejected: "rejected";
1822
- prepared: "prepared";
1823
- }>;
1824
- operation: z.ZodObject<{
1825
- operation_id: z.ZodString;
1826
- workspace_id: z.ZodString;
1827
- actor_user_id: z.ZodString;
1828
- client_id: z.ZodString;
1829
- action: z.ZodEnum<{
1830
- create: "create";
1831
- update: "update";
1832
- delete: "delete";
1833
- "delivery-control": "delivery-control";
1834
- }>;
1835
- state: z.ZodEnum<{
1836
- committed: "committed";
1837
- rejected: "rejected";
1838
- prepared: "prepared";
1839
- }>;
1840
- prepared_at: z.ZodString;
1841
- committed_at: z.ZodOptional<z.ZodString>;
1842
- destination: z.ZodOptional<z.ZodObject<{
1843
- id: z.ZodString;
1844
- label: z.ZodString;
1845
- channel: z.ZodLiteral<"webhook">;
1846
- ready: z.ZodBoolean;
1847
- enabled: z.ZodBoolean;
1848
- updated_at: z.ZodString;
1849
- }, z.core.$strict>>;
1850
- delivery: z.ZodOptional<z.ZodObject<{
1851
- id: z.ZodString;
1852
- state: z.ZodString;
1853
- attempt: z.ZodNumber;
1854
- max_attempts: z.ZodNumber;
1855
- }, z.core.$strict>>;
1856
- rejection: z.ZodOptional<z.ZodEnum<{
1857
- notification_destination_not_found: "notification_destination_not_found";
1858
- notification_destination_generation_conflict: "notification_destination_generation_conflict";
1859
- notification_delivery_transition_unavailable: "notification_delivery_transition_unavailable";
1860
- }>>;
1861
- }, z.core.$strict>;
1862
- replayed: z.ZodBoolean;
1863
- secret: z.ZodOptional<z.ZodString>;
1864
- }, z.core.$strict>;
1865
- type NotificationDestinationAction = z.infer<typeof notificationDestinationActionSchema>;
1866
- type NotificationDestinationOperation = z.infer<typeof notificationDestinationOperationSchema>;
1867
- type NotificationDestinationMutationResult = z.infer<typeof destinationOperationMutationResponseSchema>;
1868
- type NotificationDestinationLookupResult = z.infer<typeof destinationOperationLookupResponseSchema>;
1869
- type NotificationDestinationExecuteResult = z.infer<typeof destinationOperationExecuteResponseSchema>;
1870
- /** Canonical account-authorized notification ingress. A configured webhook UUID
1871
- * is a destination reference, never permission to submit arbitrary URLs/secrets.
1872
- * Scope is a local hierarchy reference within an explicitly bound cloud workspace.
1873
- */
1874
- declare class NotificationsClient {
1875
- private readonly transport;
1876
- private readonly authorize;
1877
- private readonly origin;
1878
- constructor(origin: string, transport: Transport, authorize: WorkspaceAuthorization);
1879
- private call;
1880
- read(workspaceId: string, scope: NotificationScope): Promise<NotificationSettings>;
1881
- save(workspaceId: string, input: {
1882
- scope: NotificationScope;
1883
- expectedRevision: string;
1884
- rules: NotificationRule[];
1885
- }): Promise<NotificationSettings>;
1886
- emit(workspaceId: string, input: AgentNotificationInput): Promise<NotificationAdmission>;
1887
- prepareDestinationOperation(workspaceId: string, operationId: string, action: NotificationDestinationAction): Promise<NotificationDestinationMutationResult>;
1888
- lookupDestinationOperation(workspaceId: string, operationId: string): Promise<NotificationDestinationLookupResult>;
1889
- executeDestinationOperation(workspaceId: string, operationId: string): Promise<NotificationDestinationExecuteResult>;
1890
- }
1891
-
1892
- declare const provider: z.ZodEnum<{
1893
- google: "google";
1894
- github: "github";
1895
- twitter: "twitter";
1896
- }>;
1897
- declare const integration: z.ZodObject<{
1898
- provider: z.ZodEnum<{
1899
- google: "google";
1900
- github: "github";
1901
- twitter: "twitter";
1902
- }>;
1903
- available: z.ZodBoolean;
1904
- scopes: z.ZodArray<z.ZodString>;
1905
- linked: z.ZodNullable<z.ZodObject<{
1906
- provider: z.ZodEnum<{
1907
- google: "google";
1908
- github: "github";
1909
- twitter: "twitter";
1910
- }>;
1911
- email: z.ZodNullable<z.ZodString>;
1912
- username: z.ZodNullable<z.ZodString>;
1913
- created_at: z.ZodOptional<z.ZodString>;
1914
- }, z.core.$loose>>;
1915
- }, z.core.$strict>;
1916
- declare const operation: z.ZodObject<{
1917
- operationId: z.ZodString;
1918
- actorAccountId: z.ZodOptional<z.ZodString>;
1919
- clientId: z.ZodOptional<z.ZodString>;
1920
- provider: z.ZodOptional<z.ZodEnum<{
1921
- google: "google";
1922
- github: "github";
1923
- twitter: "twitter";
1924
- }>>;
1925
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1926
- state: z.ZodEnum<{
1927
- "not-observed": "not-observed";
1928
- committed: "committed";
1929
- rejected: "rejected";
1930
- cancelled: "cancelled";
1931
- waiting: "waiting";
1932
- exchanging: "exchanging";
1933
- }>;
1934
- authorizationUrl: z.ZodOptional<z.ZodString>;
1935
- expiresAt: z.ZodOptional<z.ZodString>;
1936
- linked: z.ZodOptional<z.ZodObject<{
1937
- provider: z.ZodEnum<{
1938
- google: "google";
1939
- github: "github";
1940
- twitter: "twitter";
1941
- }>;
1942
- email: z.ZodNullable<z.ZodString>;
1943
- username: z.ZodNullable<z.ZodString>;
1944
- created_at: z.ZodOptional<z.ZodString>;
1945
- }, z.core.$loose>>;
1946
- rejection: z.ZodOptional<z.ZodString>;
1947
- replayed: z.ZodOptional<z.ZodBoolean>;
1948
- }, z.core.$strict>;
1949
- type AccountIntegration = z.infer<typeof integration>;
1950
- type AccountIntegrationOperation = z.infer<typeof operation>;
1951
- type AccountIntegrationProvider = z.infer<typeof provider>;
1952
- type Authorize = (method: string, url: string, options: {
1953
- scopes: string[];
1954
- silent: true;
1955
- }) => Promise<RequestAuthorization | null>;
1956
- declare class AccountIntegrationClient {
1957
- private transport;
1958
- private authorize;
1959
- private base;
1960
- constructor(base: string, transport: Transport, authorize: Authorize);
1961
- private call;
1962
- list(): Promise<AccountIntegration[]>;
1963
- operation(operationId: string): Promise<AccountIntegrationOperation>;
1964
- start(operationId: string, value: AccountIntegrationProvider): Promise<AccountIntegrationOperation>;
1965
- cancel(operationId: string): Promise<AccountIntegrationOperation>;
1966
- }
1967
-
1968
- interface DpopProofArgs {
1969
- method: string;
1970
- url: string;
1971
- accessToken?: string;
1972
- nonce?: string;
1973
- }
1974
- /**
1975
- * Host-owned sender-constraint key. Desktop/CLI implementations keep the
1976
- * private key in the OS keystore/TPM; the SDK receives signing capability, not
1977
- * exportable private material.
1978
- */
1979
- interface DpopSigner {
1980
- readonly jkt: string;
1981
- createProof(args: DpopProofArgs): Promise<string>;
1982
- }
1983
- declare function normalizeDpopHtu(value: string): string;
1984
-
1985
- /**
1986
- * OIDC relying-party flows (OAuth 2.1 / RFC 9700 compliant):
1987
- * - Authorization Code + PKCE (S256) for web + native (RFC 8252).
1988
- * - Device Authorization Grant (RFC 8628) for CLI / headless.
1989
- *
1990
- * No implicit flow, no ROPC — both are forbidden. PKCE is always used, even for
1991
- * confidential clients.
1992
- */
1993
- interface OidcConfig {
1994
- /** Issuer base, e.g. https://xenostudio.ai (endpoints derived or overridden). */
1995
- issuer: string;
1996
- clientId: string;
1997
- /** Confidential clients only; public clients (SPA/CLI/native) omit it. */
1998
- clientSecret?: string;
1999
- redirectUri?: string;
2000
- scopes?: string[];
2001
- authorizeUrl?: string;
2002
- tokenUrl?: string;
2003
- deviceAuthorizationUrl?: string;
2004
- jwksUrl?: string;
2005
- /** Required for every public-client token. The private key remains host-owned. */
2006
- dpopSigner: DpopSigner;
2007
- }
2008
- interface PkcePair {
2009
- verifier: string;
2010
- challenge: string;
2011
- }
2012
- /**
2013
- * RFC 7636 PKCE pair (S256). Browser-safe: uses Web Crypto (`globalThis.crypto`),
2014
- * available in Node 20+ AND every browser — no `node:crypto`, so this build
2015
- * imports cleanly in a web SPA and an Electron renderer (XENO AUTH §11, §14.3).
2016
- * Async because Web Crypto's SHA-256 (`subtle.digest`) is async.
2017
- */
2018
- declare function generatePkce(): Promise<PkcePair>;
2019
- declare function generateState(): string;
2020
- /**
2021
- * Build the authorize URL for the Authorization Code + PKCE flow. The caller
2022
- * persists `{ state, verifier }` (e.g. encrypted in a cookie/flow token) and
2023
- * passes the verifier back to {@link exchangeCode}.
2024
- */
2025
- declare function buildAuthorizeUrl(cfg: OidcConfig, args: {
2026
- state: string;
2027
- codeChallenge: string;
2028
- redirectUri?: string;
2029
- scopes?: string[];
2030
- nonce?: string;
2031
- prompt?: 'login';
2032
- maxAge?: number;
2033
- acrValues?: 'urn:xeno:acr:fresh';
2034
- }): string;
2035
- /** Exchange an authorization code for tokens (carries the PKCE verifier). */
2036
- declare function exchangeCode(cfg: OidcConfig, transport: Transport, args: {
2037
- code: string;
2038
- codeVerifier: string;
2039
- redirectUri?: string;
2040
- expectedNonce: string;
2041
- expectedScopes?: string[];
2042
- signal?: AbortSignal;
2043
- }): Promise<TokenSet>;
2044
- /**
2045
- * Refresh tokens. The origin rotates the refresh token on every use
2046
- * (RFC 9700 §2.2.2) — always persist the returned `refreshToken`, and treat a
2047
- * confirmed invalid_grant as re-auth required. A lost reply is retried only with
2048
- * the same `rotationId`, which lets the origin tell an honest retry from a replay.
2049
- */
2050
- declare function refreshTokens(cfg: OidcConfig, transport: Transport, refreshToken: string, rotationId?: string): Promise<TokenSet>;
2051
- interface DeviceAuthorization {
2052
- deviceCode: string;
2053
- userCode: string;
2054
- verificationUri: string;
2055
- verificationUriComplete: string | null;
2056
- expiresAt: Date;
2057
- intervalSeconds: number;
2058
- }
2059
- declare function startDeviceAuthorization(cfg: OidcConfig, transport: Transport, scopes?: string[]): Promise<DeviceAuthorization>;
2060
- /**
2061
- * Poll the token endpoint for a device grant, honouring `authorization_pending`
2062
- * / `slow_down` per RFC 8628. Resolves when the user approves, rejects on
2063
- * expiry/denial. `onPending` lets a CLI print progress.
2064
- */
2065
- declare function pollDeviceToken(cfg: OidcConfig, transport: Transport, device: DeviceAuthorization, opts?: {
2066
- sleep?: (ms: number) => Promise<void>;
2067
- signal?: AbortSignal;
2068
- }): Promise<TokenSet>;
2069
-
2070
- /**
2071
- * TokenStore — pluggable persistence for the (rotating) refresh token
2072
- * (XENO AUTH §11). The SDK ships the interface + a `memoryStore`; the host
2073
- * provides the OS-keystore primitive (Electron `safeStorage` / OS keychain) via
2074
- * `keychainStore`, so a cleartext refresh token never touches disk (L9). Web uses
2075
- * an httpOnly cookie (host-provided); server RPs use Redis+Postgres (host-provided).
2076
- */
2077
- interface TokenStore {
2078
- get(key: string): Promise<string | null>;
2079
- set(key: string, value: string): Promise<void>;
2080
- delete(key: string): Promise<void>;
2081
- /** Exclusion for this secure-store entry, including other host processes.
2082
- * Work must not call withExclusive recursively. Required for session writes. */
2083
- withExclusive?<T>(key: string, work: () => Promise<T>): Promise<T>;
2084
- }
2085
- /** In-memory store: web access tokens, degraded desktop, and agent/CI contexts. */
2086
- declare function memoryStore(): TokenStore;
2087
- /** The encrypt-at-rest primitive a desktop/CLI host injects (Electron safeStorage,
2088
- * OS keychain via git-credential-helper). Sync or async both accepted. */
2089
- interface Keychain {
2090
- get(key: string): Promise<string | null> | string | null;
2091
- set(key: string, value: string): Promise<void> | void;
2092
- delete(key: string): Promise<void> | void;
2093
- withExclusive?<T>(key: string, work: () => Promise<T>): Promise<T>;
2094
- }
2095
- /** OS-keystore-backed store (DEFAULT for desktop + CLI). The refresh token is only
2096
- * ever held encrypted by the host keychain; the SDK never writes it to disk. */
2097
- declare function keychainStore(kc: Keychain): TokenStore;
2098
-
2099
- interface BrokerTokenRequest {
2100
- clientId: string;
2101
- scopes: string[];
2102
- resource: 'https://api.xenostudio.ai';
2103
- childDpopJkt: string;
2104
- }
2105
- /** Transport is supplied by Hub/Electron main after OS peer verification. */
2106
- interface BrokerAdapter {
2107
- getToken(request: BrokerTokenRequest): Promise<TokenSet | null>;
2108
- logout?(): Promise<void>;
2109
- }
2110
-
2111
- interface VerifiedAccessClaims {
2112
- iss: string;
2113
- sub: string;
2114
- aud: string | string[];
2115
- exp: number;
2116
- iat: number;
2117
- sid: string;
2118
- client_id: string;
2119
- azp: string;
2120
- scope: string;
2121
- typ: 'at+jwt';
2122
- auth_epoch: number;
2123
- auth_time?: number;
2124
- acr?: string;
2125
- amr?: string[];
2126
- cnf: {
2127
- jkt: string;
2128
- };
2129
- act?: {
2130
- client_id: 'xeno-hub';
2131
- installation_id_hash: string;
2132
- sub?: string;
2133
- };
2134
- }
2135
- interface VerifiedIdClaims {
2136
- iss: string;
2137
- sub: string;
2138
- aud: string | string[];
2139
- exp: number;
2140
- iat: number;
2141
- sid: string;
2142
- auth_time: number;
2143
- nonce?: string;
2144
- email?: string;
2145
- email_verified?: boolean;
2146
- preferred_username?: string;
2147
- name?: string;
2148
- picture?: string;
2149
- }
2150
- interface VerifiedLogoutClaims {
2151
- iss: string;
2152
- aud: string | string[];
2153
- exp: number;
2154
- iat: number;
2155
- jti: string;
2156
- sid?: string;
2157
- sub?: string;
2158
- events: {
2159
- 'http://schemas.openid.net/event/backchannel-logout': Record<string, never>;
2160
- };
2161
- }
2162
- declare function verifyAccessToken(args: {
2163
- token: string;
2164
- transport: Transport;
2165
- issuer: string;
2166
- clientId: string;
2167
- dpopJkt: string;
2168
- jwksUrl?: string;
2169
- expectedScopes?: string[];
2170
- requireBrokerActor?: boolean;
2171
- }): Promise<VerifiedAccessClaims>;
2172
- declare function verifyIdToken(args: {
2173
- token: string;
2174
- transport: Transport;
2175
- issuer: string;
2176
- clientId: string;
2177
- jwksUrl?: string;
2178
- expectedNonce?: string;
2179
- expectedSubject?: string;
2180
- }): Promise<VerifiedIdClaims>;
2181
- /** Verify an OpenID Connect Back-Channel Logout Token before local revocation. */
2182
- declare function verifyLogoutToken(args: {
2183
- token: string;
2184
- transport: Transport;
2185
- issuer: string;
2186
- clientId: string;
2187
- jwksUrl?: string;
2188
- }): Promise<VerifiedLogoutClaims>;
2189
-
2190
- /**
2191
- * Configuration for a branch (app) wiring into the XENO account origin.
2192
- *
2193
- * issuer — the origin's auth base (e.g. https://xenostudio.ai)
2194
- * apiBase — the origin's private API base for ledger/authz
2195
- * (e.g. https://api.xenostudio.ai)
2196
- * surface — this app's attribution tag, e.g. 'xeno_post'
2197
- */
2198
- interface XenoAccountClientConfig {
2199
- issuer: string;
2200
- apiBase: string;
2201
- surface: Surface;
2202
- oidc: Omit<OidcConfig, 'issuer'>;
2203
- transport?: TransportOptions;
2204
- /** Where the rotating refresh token lives (default: memory). Desktop/CLI pass
2205
- * a keychainStore; web passes a cookie/memory store (XENO AUTH §11). */
2206
- store?: TokenStore;
2207
- /** Explicit credential override — chain step 2 (XENO_API_KEY / provisioned key /
2208
- * remote-run token). Bypasses interactive paths. Defaults to env XENO_API_KEY. */
2209
- apiKey?: string;
2210
- /** Optional Hub broker. Failure falls through to this app's own refresh. */
2211
- broker?: BrokerAdapter;
2212
- }
2213
- /**
2214
- * The one client every XENO branch uses. Composes identity (OIDC + /me),
2215
- * ledger (idempotent metering + two-phase holds) and authz (ReBAC) behind a
2216
- * single, framework-agnostic facade.
2217
- *
2218
- * Standalone-first: a branch only constructs this in cloud mode (when a
2219
- * platform URL is configured). With it absent, the app runs on its own auth.
2220
- */
2221
- declare class XenoAccountClient {
2222
- readonly surface: Surface;
2223
- readonly account: AccountClient;
2224
- readonly ledger: LedgerClient;
2225
- readonly authz: AuthzClient;
2226
- private readonly oidcConfig;
2227
- private readonly issuer;
2228
- private authorities;
2229
- private readonly transport;
2230
- private readonly store;
2231
- private readonly apiKey?;
2232
- private readonly broker?;
2233
- private readonly refreshStoreKey;
2234
- private readonly refreshPendingKey;
2235
- private access;
2236
- private user;
2237
- private interactive?;
2238
- private resolutionFlight;
2239
- private generation;
2240
- private locallySignedOut;
2241
- private readonly listeners;
2242
- constructor(cfg: XenoAccountClientConfig);
2243
- get workspaces(): WorkspaceClient;
2244
- get workforce(): WorkforceClient;
2245
- get notifications(): NotificationsClient;
2246
- get integrations(): AccountIntegrationClient;
2247
- /**
2248
- * Return a valid Bearer for the gate, walking the chain:
2249
- * 1 in-memory access token → 2 explicit override (apiKey/XENO_API_KEY) →
2250
- * 3 [broker — host-wired] → 4 this product's own refresh token →
2251
- * 5 interactive sign-in (host-provided; skipped when `silent`) → null.
2252
- */
2253
- getAccessToken(opts?: {
2254
- scopes?: string[];
2255
- silent?: boolean;
2256
- }): Promise<string | null>;
2257
- private resolveSession;
2258
- /** Register the host's interactive sign-in (loopback PKCE / device grant). */
2259
- setInteractiveSignIn(fn: (scopes?: string[]) => Promise<TokenSet>): void;
2260
- isAuthenticated(): boolean;
2261
- currentUser(): Account | null;
2262
- /** Subscribe to login/refresh/logout/backchannel. Returns an unsubscribe fn. */
2263
- onAuthChanged(cb: (a: Account | null) => void): () => void;
2264
- /** Local wipe only, used after durable host-side invalidation/reconciliation. */
2265
- signOutLocal(): Promise<void>;
2266
- /** Revoke this subject-owned session, then always clear local state. */
2267
- signOut(): Promise<{
2268
- serverRevoked: boolean;
2269
- }>;
2270
- /** Step-up protected, subject-keyed global logout. Only authorized clients can call it. */
2271
- signOutEverywhere(): Promise<void>;
2272
- private setUnauthenticated;
2273
- private emit;
2274
- /**
2275
- * The 0.2.0 workforce builds (shipped vendored, never published) marked an in-flight refresh at
2276
- * `<refresh key>-uncertain` and never named the rotation. An install upgrading with that marker
2277
- * present may hold a token the origin already rotated, so sending it would be a replay — the
2278
- * zero-grace reuse that revokes the whole family. It is therefore an unconfirmed transition like any
2279
- * other v1 marker: refused silently, recoverable only by explicit sign-in (which writes this
2280
- * version's own marker, after which the legacy one is never consulted again).
2281
- */
2282
- private legacyRefreshMarker;
2283
- private storeRead;
2284
- private cacheCurrent;
2285
- private exclusiveStore;
2286
- private reserveSignIn;
2287
- private resolveInteractive;
2288
- /** Cache the access token, persist the rotated refresh token, update the user. */
2289
- private applyTokenSet;
2290
- private cancelCommittedSignIn;
2291
- /**
2292
- * Begin "Continue with XENO". Returns the authorize URL to redirect to, plus
2293
- * the `{ state, verifier }` the caller MUST persist (encrypted) to complete
2294
- * the flow in {@link completeSignIn}.
2295
- */
2296
- beginSignIn(args?: {
2297
- redirectUri?: string;
2298
- scopes?: string[];
2299
- fresh?: boolean;
2300
- }): Promise<{
2301
- url: string;
2302
- state: string;
2303
- nonce: string;
2304
- pkce: PkcePair;
2305
- }>;
2306
- /** Complete the code flow: exchange `code` (with the saved verifier) for tokens,
2307
- * then cache the access token + persist the refresh token + set the user. */
2308
- completeSignIn(args: {
2309
- code: string;
2310
- codeVerifier: string;
2311
- expectedNonce: string;
2312
- expectedScopes?: string[];
2313
- redirectUri?: string;
2314
- signal?: AbortSignal;
2315
- }): Promise<TokenSet>;
2316
- private bindSignInCancellation;
2317
- /** Headers for one sender-constrained resource request. */
2318
- authorization(method: string, url: string, opts?: {
2319
- scopes?: string[];
2320
- silent?: boolean;
2321
- }): Promise<RequestAuthorization | null>;
2322
- /** Verify and sender-constrain a previously persisted access token. Server
2323
- * consumers use this for encrypted per-workspace sessions without placing
2324
- * those tokens into the process-global client cache. */
2325
- authorizationForToken(token: string, method: string, url: string, expectedScopes?: string[]): Promise<RequestAuthorization>;
2326
- /** Verify a provider-originated Back-Channel Logout Token. */
2327
- verifyBackchannelLogout(token: string): Promise<VerifiedLogoutClaims>;
2328
- private createProof;
2329
- /** Rotate tokens. Persist the returned refreshToken; a failure means re-auth. */
2330
- refresh(refreshToken: string, rotationId?: string): Promise<TokenSet>;
2331
- startDeviceLogin(scopes?: string[]): Promise<DeviceAuthorization>;
2332
- awaitDeviceLogin(device: Awaited<ReturnType<XenoAccountClient['startDeviceLogin']>>, opts?: {
2333
- signal?: AbortSignal;
2334
- }): Promise<TokenSet>;
2335
- }
2336
-
2337
- export { type UsageEventInput as $, type Account as A, type Balance as B, type NotificationDestinationLookupResult as C, type DeviceAuthorization as D, type NotificationDestinationMutationResult as E, type NotificationDestinationOperation as F, type NotificationRule as G, type Hold as H, type NotificationScope as I, type NotificationSettings as J, type Keychain as K, LedgerClient as L, MICRO_PER_CREDIT as M, type NotificationAdmission as N, NotificationsClient as O, type OAuthTokenResponse as P, type OidcConfig as Q, type PkcePair as R, type RequestArgs as S, type RequestAuthorization as T, type RequestAuthorizationProvider as U, type Surface as V, type TokenSet as W, type TokenStore as X, Transport as Y, type TransportOptions as Z, type UsageEvent as _, AccountClient as a, notificationDestinationActionSchema as a$, type UsageResult as a0, type VerifiedAccessClaims as a1, type VerifiedIdClaims as a2, type VerifiedLogoutClaims as a3, type WorkforceAuthorization as a4, WorkforceClient as a5, type WorkforceCreateResourceInput as a6, type WorkforceDefinition as a7, type WorkforceListOwnedResourcesInput as a8, type WorkforceOperationResult as a9, type XenoAccountClientConfig as aA, accountOperationIntentSchema as aB, accountSchema as aC, assertMembershipOperation as aD, authzCheckSchema as aE, authzResultSchema as aF, balanceSchema as aG, buildAuthorizeUrl as aH, codeForStatus as aI, exchangeCode as aJ, fromMicro as aK, generatePkce as aL, generateState as aM, holdRequestSchema as aN, holdSchema as aO, keychainStore as aP, membershipAbandonedSchema as aQ, membershipCommittedSchema as aR, membershipDeliverySchema as aS, membershipMutationSchema as aT, membershipOperationSchema as aU, membershipRejectedSchema as aV, memoryStore as aW, meterAggregationSchema as aX, normalize as aY, normalizeDpopHtu as aZ, notificationChannelSchema as a_, type WorkforceOwnedCatalog as aa, type WorkforceOwner as ab, type WorkforceReadOperationInput as ac, type WorkforceResourceMetadata as ad, WorkforceResourceMutationError as ae, type WorkforceResourceResult as af, type WorkspaceAuthorization as ag, WorkspaceClient as ah, type WorkspaceInvite as ai, type WorkspaceInviteRole as aj, type WorkspaceKey as ak, type WorkspaceKeyInput as al, type WorkspaceKeyMutation as am, WorkspaceKeyMutationError as an, type WorkspaceKeyOperation as ao, type WorkspaceKeyOperationResult as ap, type WorkspaceKeyOperationState as aq, type WorkspaceKeyPage as ar, type WorkspaceKeyReceipt as as, type WorkspaceMember as at, type WorkspaceMembershipMutation as au, WorkspaceMembershipMutationError as av, type WorkspaceMembershipOperation as aw, type WorkspaceMembershipOperationState as ax, type WorkspaceRole as ay, XenoAccountClient as az, AccountError as b, notificationDestinationOperationSchema as b0, notificationEventSchema as b1, notificationRuleSchema as b2, notificationScopeSchema as b3, notificationSettingsSchema as b4, oauthTokenResponseSchema as b5, pollDeviceToken as b6, refreshTokens as b7, startDeviceAuthorization as b8, surfaceSchema as b9, toMicro as ba, tokenSetSchema as bb, usageEventSchema as bc, usageResultSchema as bd, verifyAccessToken as be, verifyIdToken as bf, verifyLogoutToken as bg, workforceCreateResourceSchema as bh, workforceDefinitionSchema as bi, workforceListOwnedResourcesSchema as bj, workforceOwnerSchema as bk, workforceReadOperationSchema as bl, workspaceInviteRoleSchema as bm, workspaceInviteSchema as bn, workspaceKeyOperationSchema as bo, workspaceKeyRejectionSchema as bp, workspaceKeySchema as bq, workspaceKeyScopeSchema as br, workspaceMemberSchema as bs, workspaceRoleSchema as bt, workspaceSchema as bu, type AccountErrorCode as c, type AccountIntegration as d, AccountIntegrationClient as e, type AccountIntegrationOperation as f, type AccountIntegrationProvider as g, AccountMutationError as h, type AccountOperation as i, type AccountOperationIntent as j, type AccountOperationState as k, type AccountWorkspace as l, type AgentNotificationInput as m, type AuthorizationInput as n, type AuthzCheck as o, AuthzClient as p, type AuthzResult as q, type BrokerAdapter as r, type BrokerTokenRequest as s, type DpopProofArgs as t, type DpopSigner as u, type HoldRequest as v, type HoldRequestInput as w, type MeterAggregation as x, type NotificationDestinationAction as y, type NotificationDestinationExecuteResult as z };