@opengeni/contracts 3.1.0-canary.2 → 3.1.2

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 (429) hide show
  1. package/dist/agent-authored-durable-text.d.ts +9 -9
  2. package/dist/agent-config.d.ts +971 -0
  3. package/dist/agent-instruction-changes.d.ts +0 -2
  4. package/dist/allowance-refusal.d.ts +9 -0
  5. package/dist/allowance-refusal.js +50 -0
  6. package/dist/allowance-refusal.js.map +1 -0
  7. package/dist/analytics-consent-report.d.ts +19 -0
  8. package/dist/analytics-consent-report.js +10 -0
  9. package/dist/analytics-consent-report.js.map +1 -0
  10. package/dist/api-key-presets.d.ts +19 -0
  11. package/dist/artifact-catalog.d.ts +188 -0
  12. package/dist/artifacts.d.ts +86 -0
  13. package/dist/atlassian-native-retirement.d.ts +16 -0
  14. package/dist/atlassian-native-retirement.js +30 -0
  15. package/dist/atlassian-native-retirement.js.map +1 -0
  16. package/dist/atlassian.d.ts +1 -0
  17. package/dist/atlassian.js +34 -19
  18. package/dist/browser-storage.d.ts +5 -0
  19. package/dist/browser-storage.js +9 -0
  20. package/dist/browser-storage.js.map +1 -0
  21. package/dist/bundled-skills.d.ts +24 -1
  22. package/dist/canonical-human-identities.js +2 -1
  23. package/dist/chunk-2ZIHHL72.js +153 -0
  24. package/dist/chunk-2ZIHHL72.js.map +1 -0
  25. package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
  26. package/dist/chunk-4JGHSSB7.js +11 -0
  27. package/dist/chunk-4JGHSSB7.js.map +1 -0
  28. package/dist/chunk-4QO6GJUX.js +85 -0
  29. package/dist/chunk-4QO6GJUX.js.map +1 -0
  30. package/dist/chunk-4VDMHLLL.js +49 -0
  31. package/dist/chunk-4VDMHLLL.js.map +1 -0
  32. package/dist/chunk-56SNIMDO.js +9 -0
  33. package/dist/chunk-56SNIMDO.js.map +1 -0
  34. package/dist/chunk-6C2HKFTU.js +207 -0
  35. package/dist/chunk-6C2HKFTU.js.map +1 -0
  36. package/dist/chunk-6IXO76Z6.js +72 -0
  37. package/dist/chunk-6IXO76Z6.js.map +1 -0
  38. package/dist/chunk-7272KVWZ.js +60 -0
  39. package/dist/chunk-7272KVWZ.js.map +1 -0
  40. package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
  41. package/dist/chunk-E3GGUBHS.js.map +1 -0
  42. package/dist/chunk-EFZYKUE2.js +767 -0
  43. package/dist/chunk-EFZYKUE2.js.map +1 -0
  44. package/dist/chunk-EKWNTOG3.js +154 -0
  45. package/dist/chunk-EKWNTOG3.js.map +1 -0
  46. package/dist/chunk-HABQ7ADB.js +234 -0
  47. package/dist/chunk-HABQ7ADB.js.map +1 -0
  48. package/dist/chunk-HRRU4QPI.js +91 -0
  49. package/dist/chunk-HRRU4QPI.js.map +1 -0
  50. package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
  51. package/dist/chunk-IK36LXKC.js.map +1 -0
  52. package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
  53. package/dist/chunk-ILJ72KPO.js.map +1 -0
  54. package/dist/chunk-J4HQ3UKY.js +93 -0
  55. package/dist/chunk-J4HQ3UKY.js.map +1 -0
  56. package/dist/chunk-KHHZTBP7.js +11 -0
  57. package/dist/chunk-KHHZTBP7.js.map +1 -0
  58. package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
  59. package/dist/chunk-LZ2LAHIX.js.map +1 -0
  60. package/dist/chunk-NDZHPTCL.js +400 -0
  61. package/dist/chunk-NDZHPTCL.js.map +1 -0
  62. package/dist/chunk-OF6OKOBF.js +54793 -0
  63. package/dist/chunk-OF6OKOBF.js.map +1 -0
  64. package/dist/chunk-OL23ARTF.js +94 -0
  65. package/dist/chunk-OL23ARTF.js.map +1 -0
  66. package/dist/chunk-PUIUXIOL.js +189 -0
  67. package/dist/chunk-PUIUXIOL.js.map +1 -0
  68. package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
  69. package/dist/chunk-RMWXDZEO.js.map +1 -0
  70. package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
  71. package/dist/chunk-SHO4YO4B.js.map +1 -0
  72. package/dist/chunk-SWRN2DJ3.js +153 -0
  73. package/dist/chunk-SWRN2DJ3.js.map +1 -0
  74. package/dist/chunk-TCXCRBPF.js +267 -0
  75. package/dist/chunk-TCXCRBPF.js.map +1 -0
  76. package/dist/chunk-TLU3UEMD.js +324 -0
  77. package/dist/chunk-TLU3UEMD.js.map +1 -0
  78. package/dist/chunk-TSWWZMUS.js +186 -0
  79. package/dist/chunk-TSWWZMUS.js.map +1 -0
  80. package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
  81. package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
  82. package/dist/chunk-XDLAGX66.js +127 -0
  83. package/dist/chunk-XDLAGX66.js.map +1 -0
  84. package/dist/chunk-YKZ4WU4P.js +33 -0
  85. package/dist/chunk-YKZ4WU4P.js.map +1 -0
  86. package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
  87. package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
  88. package/dist/chunk-ZDCRWCGZ.js.map +1 -0
  89. package/dist/claude-provider-account-authority.d.ts +18 -0
  90. package/dist/claude-subscription-oauth.d.ts +42 -0
  91. package/dist/claude-subscription-usage.d.ts +159 -0
  92. package/dist/client-error-report.d.ts +158 -0
  93. package/dist/client-error-report.js +164 -0
  94. package/dist/client-error-report.js.map +1 -0
  95. package/dist/code-search.d.ts +52 -0
  96. package/dist/code-search.js +40 -0
  97. package/dist/code-search.js.map +1 -0
  98. package/dist/codex-provider-account-authority.js +20 -12
  99. package/dist/codex-provider-account-authority.js.map +1 -1
  100. package/dist/company-profile.d.ts +144 -6
  101. package/dist/connect.d.ts +37 -0
  102. package/dist/connect.js +216 -159
  103. package/dist/connect.js.map +1 -1
  104. package/dist/connection-account-label.d.ts +2 -0
  105. package/dist/connection-account-label.js +35 -0
  106. package/dist/connection-account-label.js.map +1 -0
  107. package/dist/connection-authority.d.ts +9 -317
  108. package/dist/connection-authority.js +37 -42
  109. package/dist/connector-attachments.js +2 -1
  110. package/dist/connector-destinations.js +2 -1
  111. package/dist/connector-tool-permissions.d.ts +137 -0
  112. package/dist/cua-desktop-tools.d.ts +17 -0
  113. package/dist/define-schema.d.ts +8 -0
  114. package/dist/direct-model-provider.d.ts +36 -0
  115. package/dist/editable-artifact-codec-registry.js +5 -5
  116. package/dist/editable-artifact-committed-transaction.js +3 -2
  117. package/dist/editable-artifact-live.js +5 -5
  118. package/dist/editable-artifact-serialized-commit.js +6 -6
  119. package/dist/editable-artifact-versions.d.ts +7 -1
  120. package/dist/editable-artifact-versions.js +1 -1
  121. package/dist/editable-artifacts.js +62 -56
  122. package/dist/event-preview.d.ts +22 -0
  123. package/dist/external-identities.d.ts +138 -0
  124. package/dist/external-identities.js +9 -4
  125. package/dist/first-party-tool-authorization.d.ts +815 -0
  126. package/dist/github-repository-contracts.js +60 -43
  127. package/dist/github-repository-contracts.js.map +1 -1
  128. package/dist/google-drive.d.ts +2 -1
  129. package/dist/google-drive.js +305 -238
  130. package/dist/google-drive.js.map +1 -1
  131. package/dist/host-mcp-bindings.d.ts +5 -0
  132. package/dist/host-mcp-bindings.js +233 -170
  133. package/dist/host-mcp-bindings.js.map +1 -1
  134. package/dist/image-generation.d.ts +1 -0
  135. package/dist/index.d.ts +16761 -5946
  136. package/dist/index.js +1973 -260
  137. package/dist/insights-usage.d.ts +877 -0
  138. package/dist/insights-usage.js +559 -0
  139. package/dist/insights-usage.js.map +1 -0
  140. package/dist/interaction.d.ts +1176 -829
  141. package/dist/knowledge-entries.d.ts +81 -2
  142. package/dist/knowledge-preparation.d.ts +239 -0
  143. package/dist/managed-auth-session-sets.d.ts +7 -0
  144. package/dist/managed-auth-session-sets.js +198 -132
  145. package/dist/managed-auth-session-sets.js.map +1 -1
  146. package/dist/managed-sign-in-methods.d.ts +56 -0
  147. package/dist/managed-sign-in-methods.js +64 -0
  148. package/dist/managed-sign-in-methods.js.map +1 -0
  149. package/dist/mcp-catalog-limits.d.ts +2 -0
  150. package/dist/mcp-oauth.d.ts +2 -2
  151. package/dist/mcp-structured-content.d.ts +25 -0
  152. package/dist/modal-native-proof-v2.d.ts +587 -0
  153. package/dist/modal-native-proof-v2.js +38 -0
  154. package/dist/modal-native-proof-v2.js.map +1 -0
  155. package/dist/model-account-choice.d.ts +235 -0
  156. package/dist/model-account-settings.d.ts +422 -0
  157. package/dist/model-availability.d.ts +15 -0
  158. package/dist/model-connection-access.d.ts +13 -0
  159. package/dist/model-context-inspector.d.ts +98 -0
  160. package/dist/model-display.d.ts +43 -0
  161. package/dist/model-display.js +17 -0
  162. package/dist/model-display.js.map +1 -0
  163. package/dist/model-picker-order.d.ts +3 -1
  164. package/dist/model-picker-order.js +3 -0
  165. package/dist/model-picker-order.js.map +1 -1
  166. package/dist/organization-access.d.ts +412 -0
  167. package/dist/organization-access.js +39 -0
  168. package/dist/organization-access.js.map +1 -0
  169. package/dist/organization-integration-policy.d.ts +27 -0
  170. package/dist/organization-membership-lifecycle.d.ts +38 -0
  171. package/dist/organization-model-usage.d.ts +146 -0
  172. package/dist/organization-model-usage.js +78 -0
  173. package/dist/organization-model-usage.js.map +1 -0
  174. package/dist/organization-recovery.js +2 -1
  175. package/dist/organization-usage.d.ts +138 -0
  176. package/dist/permissions.d.ts +18 -0
  177. package/dist/personal-github.d.ts +1 -0
  178. package/dist/personal-github.js +199 -144
  179. package/dist/personal-github.js.map +1 -1
  180. package/dist/prepared-mcp-setup.d.ts +54 -0
  181. package/dist/prepared-mcp-setup.js +12 -0
  182. package/dist/prepared-mcp-setup.js.map +1 -0
  183. package/dist/product-analytics.d.ts +116 -0
  184. package/dist/product-lifecycle-facts.d.ts +73 -0
  185. package/dist/remember.d.ts +98 -6
  186. package/dist/retained-output.d.ts +8 -0
  187. package/dist/sandbox-file-artifacts.d.ts +1 -0
  188. package/dist/sandbox-provider-command.d.ts +91 -1
  189. package/dist/sandbox-recovery.d.ts +146 -0
  190. package/dist/secret-generator.d.ts +44 -0
  191. package/dist/secret-references.d.ts +90 -0
  192. package/dist/secret-resolution.d.ts +111 -0
  193. package/dist/secret-totp.d.ts +41 -0
  194. package/dist/session-final-reply.d.ts +6 -0
  195. package/dist/session-final-reply.js +9 -0
  196. package/dist/session-final-reply.js.map +1 -0
  197. package/dist/session-goal-reports.d.ts +21 -0
  198. package/dist/session-history-import.d.ts +1272 -0
  199. package/dist/session-list-entries.d.ts +4 -0
  200. package/dist/session-list-entries.js +56 -0
  201. package/dist/session-list-entries.js.map +1 -0
  202. package/dist/session-mcp-projections.d.ts +6 -0
  203. package/dist/session-mcp-tool-permissions.d.ts +62 -0
  204. package/dist/session-message-search.d.ts +68 -0
  205. package/dist/session-target.d.ts +18 -0
  206. package/dist/session-titles.d.ts +8 -0
  207. package/dist/session-titles.js +5 -1
  208. package/dist/session-usage-limit-refusal.d.ts +34 -0
  209. package/dist/session-usage-limit-refusal.js +15 -0
  210. package/dist/session-usage-limit-refusal.js.map +1 -0
  211. package/dist/session-usage-limits.d.ts +127 -0
  212. package/dist/session-usage-limits.js +41 -0
  213. package/dist/session-usage-limits.js.map +1 -0
  214. package/dist/signup-attribution.d.ts +39 -0
  215. package/dist/site-data.d.ts +286 -0
  216. package/dist/site-operations.d.ts +39 -0
  217. package/dist/site-publishing.d.ts +778 -0
  218. package/dist/site-session-http.d.ts +89 -4
  219. package/dist/site-session-http.js +25 -1
  220. package/dist/site-sql.d.ts +421 -0
  221. package/dist/skill-catalog-context.d.ts +7 -0
  222. package/dist/skill-files.d.ts +1 -1
  223. package/dist/skill-use.d.ts +61 -0
  224. package/dist/skills.d.ts +15 -0
  225. package/dist/slack-bot-scopes.d.ts +17 -12
  226. package/dist/slack-bot-scopes.js +10 -3
  227. package/dist/slack-rest-mcp.d.ts +36 -0
  228. package/dist/slack-rest-mcp.js +25 -0
  229. package/dist/slack-rest-mcp.js.map +1 -0
  230. package/dist/spreadsheet-artifact-commands.d.ts +14 -1
  231. package/dist/spreadsheet-artifact-commands.js +8 -2
  232. package/dist/spreadsheet-artifact-query.d.ts +13 -6
  233. package/dist/spreadsheet-artifact-query.js +3 -3
  234. package/dist/subscription-account-actions.d.ts +64 -0
  235. package/dist/subscription-account-pools.d.ts +292 -0
  236. package/dist/subscription-personal-authority-v2.d.ts +28 -0
  237. package/dist/subscription-personal-authority-v2.js +12 -0
  238. package/dist/subscription-personal-authority-v2.js.map +1 -0
  239. package/dist/tool-action-review.d.ts +132 -0
  240. package/dist/tool-catalog.d.ts +408 -0
  241. package/dist/tool-policy.d.ts +5 -0
  242. package/dist/tool-review-presentation.d.ts +12 -0
  243. package/dist/tool-review-presentation.js +17 -0
  244. package/dist/tool-review-presentation.js.map +1 -0
  245. package/dist/transcription-recordings.d.ts +21 -0
  246. package/dist/turn-serving-policy.d.ts +221 -0
  247. package/dist/usage-allowances.d.ts +314 -0
  248. package/dist/usage-allowances.js +52 -0
  249. package/dist/usage-allowances.js.map +1 -0
  250. package/dist/vaults.d.ts +1286 -0
  251. package/dist/video-generation.d.ts +3 -0
  252. package/dist/video-generation.js +2 -1
  253. package/dist/workspace-integration-wire.d.ts +36 -0
  254. package/dist/workspace-integration-wire.js +23 -0
  255. package/dist/workspace-integration-wire.js.map +1 -0
  256. package/dist/workspace-integrations.d.ts +1028 -0
  257. package/dist/xai-provider-account-authority.js +2 -1
  258. package/package.json +93 -5
  259. package/src/agent-authored-durable-text.ts +14 -11
  260. package/src/agent-config.ts +1698 -0
  261. package/src/agent-instruction-changes.ts +91 -74
  262. package/src/agent-learning.ts +94 -67
  263. package/src/agent-topology.ts +57 -52
  264. package/src/allowance-refusal.ts +81 -0
  265. package/src/analytics-consent-report.ts +20 -0
  266. package/src/api-key-presets.ts +28 -0
  267. package/src/artifact-catalog.ts +82 -0
  268. package/src/artifacts.ts +299 -227
  269. package/src/atlassian-native-retirement.ts +33 -0
  270. package/src/atlassian.ts +135 -108
  271. package/src/browser-storage.ts +10 -0
  272. package/src/bundled-skills.ts +60 -17
  273. package/src/canonical-human-identities.ts +60 -58
  274. package/src/claude-provider-account-authority.ts +12 -0
  275. package/src/claude-subscription-oauth.ts +73 -0
  276. package/src/claude-subscription-usage.ts +68 -0
  277. package/src/client-error-report.ts +343 -0
  278. package/src/code-search.ts +105 -0
  279. package/src/codex-provider-account-authority.ts +21 -16
  280. package/src/company-brain-governed-writes.ts +255 -233
  281. package/src/company-brain.ts +164 -153
  282. package/src/company-profile.ts +365 -292
  283. package/src/connect.ts +212 -173
  284. package/src/connection-account-label.ts +46 -0
  285. package/src/connection-authority.ts +183 -364
  286. package/src/connector-attachments.ts +137 -122
  287. package/src/connector-destinations.ts +46 -42
  288. package/src/connector-tool-permissions.ts +117 -0
  289. package/src/cua-desktop-tools.gen.json +6512 -0
  290. package/src/cua-desktop-tools.linux.gen.json +6600 -0
  291. package/src/cua-desktop-tools.ts +36 -0
  292. package/src/cua-desktop-tools.windows.gen.json +6353 -0
  293. package/src/define-schema.ts +10 -0
  294. package/src/direct-model-provider.ts +108 -0
  295. package/src/editable-artifact-committed-transaction.ts +17 -0
  296. package/src/editable-artifact-versions.ts +7 -1
  297. package/src/event-preview.ts +53 -3
  298. package/src/external-identities.ts +249 -176
  299. package/src/feedback.ts +43 -30
  300. package/src/first-party-tool-authorization.ts +356 -0
  301. package/src/github-repository-contracts.ts +78 -64
  302. package/src/google-drive.ts +285 -234
  303. package/src/governed-learning-activation.ts +152 -131
  304. package/src/governed-learning-evaluator.ts +140 -133
  305. package/src/host-mcp-bindings.ts +252 -198
  306. package/src/image-generation.ts +104 -95
  307. package/src/index.ts +13235 -8687
  308. package/src/insights-usage.ts +727 -0
  309. package/src/interaction.ts +3070 -2326
  310. package/src/knowledge-entries.ts +361 -276
  311. package/src/knowledge-preparation.ts +57 -0
  312. package/src/knowledge.ts +246 -213
  313. package/src/managed-auth-session-sets.ts +220 -144
  314. package/src/managed-sign-in-methods.ts +52 -0
  315. package/src/mcp-catalog-limits.ts +2 -0
  316. package/src/mcp-oauth.ts +43 -34
  317. package/src/mcp-receipts.ts +192 -192
  318. package/src/mcp-structured-content.ts +81 -0
  319. package/src/memory-slack-delivery.ts +171 -142
  320. package/src/modal-native-proof-v2.ts +429 -0
  321. package/src/model-account-choice.ts +177 -0
  322. package/src/model-account-settings.ts +210 -0
  323. package/src/model-availability.ts +22 -0
  324. package/src/model-connection-access.ts +61 -14
  325. package/src/model-context-inspector.ts +133 -99
  326. package/src/model-display.ts +221 -0
  327. package/src/model-picker-order.ts +12 -1
  328. package/src/organization-access.ts +217 -0
  329. package/src/organization-integration-policy.ts +63 -0
  330. package/src/organization-membership-lifecycle.ts +528 -382
  331. package/src/organization-model-usage.ts +81 -0
  332. package/src/organization-recovery.ts +147 -135
  333. package/src/organization-usage.ts +94 -0
  334. package/src/permissions.ts +88 -52
  335. package/src/personal-github.ts +210 -171
  336. package/src/preference-registry.ts +314 -258
  337. package/src/prepared-mcp-setup.ts +189 -0
  338. package/src/product-analytics.ts +261 -0
  339. package/src/product-lifecycle-facts.ts +122 -0
  340. package/src/remember.ts +181 -167
  341. package/src/retained-output.ts +194 -165
  342. package/src/sandbox-file-artifacts.ts +60 -47
  343. package/src/sandbox-provider-command.ts +88 -20
  344. package/src/sandbox-recovery.ts +129 -0
  345. package/src/scoped-knowledge.ts +61 -43
  346. package/src/secret-generator.ts +155 -0
  347. package/src/secret-references.ts +414 -0
  348. package/src/secret-resolution.ts +274 -0
  349. package/src/secret-totp.ts +188 -0
  350. package/src/session-final-reply.ts +16 -0
  351. package/src/session-goal-reports.ts +64 -0
  352. package/src/session-history-import.ts +177 -0
  353. package/src/session-list-entries.ts +96 -0
  354. package/src/session-mcp-projections.ts +11 -0
  355. package/src/session-mcp-tool-permissions.ts +108 -0
  356. package/src/session-message-search.ts +61 -0
  357. package/src/session-target.ts +57 -0
  358. package/src/session-titles.ts +80 -10
  359. package/src/session-topology-primitives.ts +19 -12
  360. package/src/session-usage-limit-refusal.ts +101 -0
  361. package/src/session-usage-limits.ts +171 -0
  362. package/src/signup-attribution.ts +86 -0
  363. package/src/site-data.ts +339 -0
  364. package/src/site-operations.ts +154 -0
  365. package/src/site-publishing.ts +876 -0
  366. package/src/site-session-http.ts +294 -16
  367. package/src/site-sql.ts +1123 -0
  368. package/src/skill-catalog-context.ts +50 -0
  369. package/src/skill-files.ts +3 -3
  370. package/src/skill-use.ts +80 -0
  371. package/src/skills.ts +82 -54
  372. package/src/slack-bot-scopes.ts +31 -39
  373. package/src/slack-rest-mcp.ts +222 -0
  374. package/src/slack-task-policy.ts +96 -73
  375. package/src/spreadsheet-artifact-commands.ts +73 -2
  376. package/src/spreadsheet-artifact-query.ts +187 -39
  377. package/src/subscription-account-actions.ts +84 -0
  378. package/src/subscription-account-pools.ts +53 -0
  379. package/src/subscription-personal-authority-v2.ts +66 -0
  380. package/src/task-notes.ts +55 -51
  381. package/src/tool-action-review.ts +258 -0
  382. package/src/tool-catalog.ts +609 -372
  383. package/src/tool-policy.ts +82 -0
  384. package/src/tool-result-spill.ts +12 -9
  385. package/src/tool-review-presentation.ts +385 -0
  386. package/src/transcription-recordings.ts +145 -131
  387. package/src/turn-serving-policy.ts +166 -0
  388. package/src/usage-allowances.ts +248 -0
  389. package/src/vaults.ts +850 -0
  390. package/src/video-generation.ts +385 -360
  391. package/src/work-claims.ts +173 -149
  392. package/src/workspace-instruction-policies.ts +349 -276
  393. package/src/workspace-integration-wire.ts +101 -0
  394. package/src/workspace-integrations.ts +724 -0
  395. package/src/workspace-learning-administration.ts +57 -44
  396. package/src/workspace-learning-policy.ts +127 -96
  397. package/src/workspace-state.ts +250 -220
  398. package/src/xai-provider-account-authority.ts +22 -17
  399. package/dist/chunk-2AC63F4S.js +0 -171
  400. package/dist/chunk-2AC63F4S.js.map +0 -1
  401. package/dist/chunk-3SIZGL3O.js.map +0 -1
  402. package/dist/chunk-7ABONTXE.js.map +0 -1
  403. package/dist/chunk-BCS7WHCK.js +0 -139
  404. package/dist/chunk-BCS7WHCK.js.map +0 -1
  405. package/dist/chunk-GRG7PHWQ.js +0 -25
  406. package/dist/chunk-GRG7PHWQ.js.map +0 -1
  407. package/dist/chunk-JUFK3T4Q.js +0 -80
  408. package/dist/chunk-JUFK3T4Q.js.map +0 -1
  409. package/dist/chunk-M5ZGRVIQ.js +0 -719
  410. package/dist/chunk-M5ZGRVIQ.js.map +0 -1
  411. package/dist/chunk-MRWYRAS5.js.map +0 -1
  412. package/dist/chunk-OVFORMPW.js +0 -348
  413. package/dist/chunk-OVFORMPW.js.map +0 -1
  414. package/dist/chunk-P3HLDT77.js +0 -59
  415. package/dist/chunk-P3HLDT77.js.map +0 -1
  416. package/dist/chunk-QQUJ6NPW.js +0 -23093
  417. package/dist/chunk-QQUJ6NPW.js.map +0 -1
  418. package/dist/chunk-TXTQIYCV.js.map +0 -1
  419. package/dist/chunk-WYBDERIY.js.map +0 -1
  420. package/dist/chunk-Y3KNXVTD.js.map +0 -1
  421. package/dist/chunk-YBW5JSA3.js.map +0 -1
  422. package/dist/chunk-YRXAWWCU.js +0 -45
  423. package/dist/chunk-YRXAWWCU.js.map +0 -1
  424. package/dist/host-mcp-resolvers.d.ts +0 -32
  425. package/dist/host-mcp-resolvers.js +0 -34
  426. package/dist/host-mcp-resolvers.js.map +0 -1
  427. package/src/host-mcp-resolvers.ts +0 -50
  428. /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
  429. /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
@@ -1,3 +1,4 @@
1
+ import { defineSchema } from "./define-schema";
1
2
  import { z } from "zod";
2
3
 
3
4
  export const PREFERENCE_REGISTRY_CONTENT_MAX_CHARS = 262_144;
@@ -9,225 +10,254 @@ export const PREFERENCE_REGISTRY_SOURCE_ID_MAX_CHARS = 512;
9
10
  export const PREFERENCE_REGISTRY_STABLE_KEY_MAX_CHARS = 96;
10
11
  export const PREFERENCE_REGISTRY_TITLE_MAX_CHARS = 120;
11
12
 
12
- export const PreferenceRegistryScope = z.enum(["organization", "workspace", "user"]);
13
+ export const PreferenceRegistryScope = /* @__PURE__ */ defineSchema(() =>
14
+ z.enum(["organization", "workspace", "user"]),
15
+ );
13
16
  export type PreferenceRegistryScope = z.infer<typeof PreferenceRegistryScope>;
14
17
 
15
- export const PreferenceRegistryStatus = z.enum([
16
- "proposed",
17
- "active",
18
- "inactive",
19
- "rejected",
20
- "superseded",
21
- "expired",
22
- ]);
18
+ export const PreferenceRegistryStatus = /* @__PURE__ */ defineSchema(() =>
19
+ z.enum(["proposed", "active", "inactive", "rejected", "superseded", "expired"]),
20
+ );
23
21
  export type PreferenceRegistryStatus = z.infer<typeof PreferenceRegistryStatus>;
24
22
 
25
- export const PreferenceRegistryProvenanceSource = z.enum([
26
- "human",
27
- "onboarding",
28
- "knowledge_proposal",
29
- "imported_document",
30
- "slack",
31
- "meeting_transcript",
32
- "call_transcript",
33
- "agent",
34
- "portable_skill",
35
- ]);
23
+ export const PreferenceRegistryProvenanceSource = /* @__PURE__ */ defineSchema(() =>
24
+ z.enum([
25
+ "human",
26
+ "onboarding",
27
+ "knowledge_proposal",
28
+ "imported_document",
29
+ "slack",
30
+ "meeting_transcript",
31
+ "call_transcript",
32
+ "agent",
33
+ "portable_skill",
34
+ ]),
35
+ );
36
36
  export type PreferenceRegistryProvenanceSource = z.infer<typeof PreferenceRegistryProvenanceSource>;
37
37
 
38
- export const PreferenceRegistryTrust = z.enum([
39
- "untrusted_proposal",
40
- "personal",
41
- "workspace_managed",
42
- "organization_managed",
43
- ]);
38
+ export const PreferenceRegistryTrust = /* @__PURE__ */ defineSchema(() =>
39
+ z.enum(["untrusted_proposal", "personal", "workspace_managed", "organization_managed"]),
40
+ );
44
41
  export type PreferenceRegistryTrust = z.infer<typeof PreferenceRegistryTrust>;
45
42
 
46
- export const PreferenceRegistryConflictStrategy = z.enum(["override", "merge", "reject", "inform"]);
43
+ export const PreferenceRegistryConflictStrategy = /* @__PURE__ */ defineSchema(() =>
44
+ z.enum(["override", "merge", "reject", "inform"]),
45
+ );
47
46
  export type PreferenceRegistryConflictStrategy = z.infer<typeof PreferenceRegistryConflictStrategy>;
48
47
 
49
- export const PreferenceRegistryEventType = z.enum([
50
- "proposal_created",
51
- "activated",
52
- "corrected",
53
- "rejected",
54
- "deactivated",
55
- "superseded",
56
- "scope_changed",
57
- ]);
48
+ export const PreferenceRegistryEventType = /* @__PURE__ */ defineSchema(() =>
49
+ z.enum([
50
+ "proposal_created",
51
+ "activated",
52
+ "corrected",
53
+ "rejected",
54
+ "deactivated",
55
+ "superseded",
56
+ "scope_changed",
57
+ ]),
58
+ );
58
59
  export type PreferenceRegistryEventType = z.infer<typeof PreferenceRegistryEventType>;
59
60
 
60
- export const PreferenceRegistryStableKey = z
61
- .string()
62
- .min(1)
63
- .max(PREFERENCE_REGISTRY_STABLE_KEY_MAX_CHARS)
64
- .regex(/^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/);
61
+ export const PreferenceRegistryStableKey = /* @__PURE__ */ defineSchema(() =>
62
+ z
63
+ .string()
64
+ .min(1)
65
+ .max(PREFERENCE_REGISTRY_STABLE_KEY_MAX_CHARS)
66
+ .regex(/^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/),
67
+ );
65
68
  export type PreferenceRegistryStableKey = z.infer<typeof PreferenceRegistryStableKey>;
66
69
 
67
70
  export function normalizePreferenceRegistryStableKey(value: string): string {
68
71
  return value.normalize("NFKC").trim().toLowerCase().replace(/\s+/gu, "-").replace(/-+/g, "-");
69
72
  }
70
73
 
71
- const RequestStableKey = z
72
- .string()
73
- .transform(normalizePreferenceRegistryStableKey)
74
- .pipe(PreferenceRegistryStableKey);
75
-
76
- const hash = z.string().regex(/^[0-9a-f]{64}$/);
77
- const boundedActor = z.string().trim().min(1).max(1_024);
78
- const boundedReason = z.string().trim().min(1).max(PREFERENCE_REGISTRY_REASON_MAX_CHARS);
79
- const descriptorText = z.string().min(1).max(PREFERENCE_REGISTRY_DESCRIPTOR_DESCRIPTION_MAX_CHARS);
80
-
81
- export const PreferenceRegistryScopeTarget = z
82
- .object({
83
- scope: PreferenceRegistryScope,
84
- workspaceId: z.string().uuid().nullable(),
85
- subjectId: z.string().min(1).max(1_024).nullable(),
86
- })
87
- .superRefine((value, context) => {
88
- if (
89
- value.scope === "organization" &&
90
- (value.workspaceId !== null || value.subjectId !== null)
91
- ) {
92
- context.addIssue({
93
- code: "custom",
94
- message: "organization scope has no workspace or subject",
95
- });
96
- }
97
- if (value.scope === "workspace" && (value.workspaceId === null || value.subjectId !== null)) {
98
- context.addIssue({ code: "custom", message: "workspace scope requires only a workspace" });
99
- }
100
- if (value.scope === "user" && (value.workspaceId !== null || value.subjectId === null)) {
101
- context.addIssue({ code: "custom", message: "user scope requires only a subject" });
102
- }
103
- });
74
+ const RequestStableKey = /* @__PURE__ */ defineSchema(() =>
75
+ z.string().transform(normalizePreferenceRegistryStableKey).pipe(PreferenceRegistryStableKey),
76
+ );
77
+
78
+ const hash = /* @__PURE__ */ defineSchema(() => z.string().regex(/^[0-9a-f]{64}$/));
79
+ const boundedActor = /* @__PURE__ */ defineSchema(() => z.string().trim().min(1).max(1_024));
80
+ const boundedReason = /* @__PURE__ */ defineSchema(() =>
81
+ z.string().trim().min(1).max(PREFERENCE_REGISTRY_REASON_MAX_CHARS),
82
+ );
83
+ const descriptorText = /* @__PURE__ */ defineSchema(() =>
84
+ z.string().min(1).max(PREFERENCE_REGISTRY_DESCRIPTOR_DESCRIPTION_MAX_CHARS),
85
+ );
86
+
87
+ export const PreferenceRegistryScopeTarget = /* @__PURE__ */ defineSchema(() =>
88
+ z
89
+ .object({
90
+ scope: PreferenceRegistryScope,
91
+ workspaceId: z.string().uuid().nullable(),
92
+ subjectId: z.string().min(1).max(1_024).nullable(),
93
+ })
94
+ .superRefine((value, context) => {
95
+ if (
96
+ value.scope === "organization" &&
97
+ (value.workspaceId !== null || value.subjectId !== null)
98
+ ) {
99
+ context.addIssue({
100
+ code: "custom",
101
+ message: "organization scope has no workspace or subject",
102
+ });
103
+ }
104
+ if (value.scope === "workspace" && (value.workspaceId === null || value.subjectId !== null)) {
105
+ context.addIssue({ code: "custom", message: "workspace scope requires only a workspace" });
106
+ }
107
+ if (value.scope === "user" && (value.workspaceId !== null || value.subjectId === null)) {
108
+ context.addIssue({ code: "custom", message: "user scope requires only a subject" });
109
+ }
110
+ }),
111
+ );
104
112
  export type PreferenceRegistryScopeTarget = z.infer<typeof PreferenceRegistryScopeTarget>;
105
113
 
106
- export const PreferenceRegistryPrecedence = z.object({
107
- tier: PreferenceRegistryScope,
108
- rank: z.number().int().min(-1_000).max(1_000),
109
- conflictStrategy: PreferenceRegistryConflictStrategy,
110
- conflictsWith: z.array(PreferenceRegistryStableKey).max(32),
111
- });
114
+ export const PreferenceRegistryPrecedence = /* @__PURE__ */ defineSchema(() =>
115
+ z.object({
116
+ tier: PreferenceRegistryScope,
117
+ rank: z.number().int().min(-1_000).max(1_000),
118
+ conflictStrategy: PreferenceRegistryConflictStrategy,
119
+ conflictsWith: z.array(PreferenceRegistryStableKey).max(32),
120
+ }),
121
+ );
112
122
  export type PreferenceRegistryPrecedence = z.infer<typeof PreferenceRegistryPrecedence>;
113
123
 
114
- export const PreferenceRegistryProvenance = z.object({
115
- source: PreferenceRegistryProvenanceSource,
116
- sourceId: z.string().min(1).max(PREFERENCE_REGISTRY_SOURCE_ID_MAX_CHARS).nullable(),
117
- trust: PreferenceRegistryTrust,
118
- });
124
+ export const PreferenceRegistryProvenance = /* @__PURE__ */ defineSchema(() =>
125
+ z.object({
126
+ source: PreferenceRegistryProvenanceSource,
127
+ sourceId: z.string().min(1).max(PREFERENCE_REGISTRY_SOURCE_ID_MAX_CHARS).nullable(),
128
+ trust: PreferenceRegistryTrust,
129
+ }),
130
+ );
119
131
  export type PreferenceRegistryProvenance = z.infer<typeof PreferenceRegistryProvenance>;
120
132
 
121
- export const PreferenceRegistryDescriptorProvenance = z.object({
122
- source: PreferenceRegistryProvenanceSource,
123
- sourceIdHash: hash.nullable(),
124
- trust: PreferenceRegistryTrust,
125
- });
133
+ export const PreferenceRegistryDescriptorProvenance = /* @__PURE__ */ defineSchema(() =>
134
+ z.object({
135
+ source: PreferenceRegistryProvenanceSource,
136
+ sourceIdHash: hash.nullable(),
137
+ trust: PreferenceRegistryTrust,
138
+ }),
139
+ );
126
140
  export type PreferenceRegistryDescriptorProvenance = z.infer<
127
141
  typeof PreferenceRegistryDescriptorProvenance
128
142
  >;
129
143
 
130
- export const PreferenceRegistryRevisionSummary = z.object({
131
- id: z.string().uuid(),
132
- preferenceId: z.string().uuid(),
133
- revision: z.number().int().positive(),
134
- contentHash: hash,
135
- title: z.string().min(1).max(PREFERENCE_REGISTRY_TITLE_MAX_CHARS),
136
- description: descriptorText,
137
- precedence: PreferenceRegistryPrecedence,
138
- provenance: PreferenceRegistryProvenance,
139
- expiresAt: z.string().datetime().nullable(),
140
- correctsRevisionId: z.string().uuid().nullable(),
141
- createdBySubjectId: boundedActor,
142
- createdAt: z.string().datetime(),
143
- });
144
+ export const PreferenceRegistryRevisionSummary = /* @__PURE__ */ defineSchema(() =>
145
+ z.object({
146
+ id: z.string().uuid(),
147
+ preferenceId: z.string().uuid(),
148
+ revision: z.number().int().positive(),
149
+ contentHash: hash,
150
+ title: z.string().min(1).max(PREFERENCE_REGISTRY_TITLE_MAX_CHARS),
151
+ description: descriptorText,
152
+ precedence: PreferenceRegistryPrecedence,
153
+ provenance: PreferenceRegistryProvenance,
154
+ expiresAt: z.string().datetime().nullable(),
155
+ correctsRevisionId: z.string().uuid().nullable(),
156
+ createdBySubjectId: boundedActor,
157
+ createdAt: z.string().datetime(),
158
+ }),
159
+ );
144
160
  export type PreferenceRegistryRevisionSummary = z.infer<typeof PreferenceRegistryRevisionSummary>;
145
161
 
146
- export const PreferenceRegistryRecord = z.object({
147
- id: z.string().uuid(),
148
- accountId: z.string().uuid(),
149
- stableKey: PreferenceRegistryStableKey,
150
- target: PreferenceRegistryScopeTarget,
151
- status: PreferenceRegistryStatus,
152
- scopeVersion: z.number().int().positive(),
153
- activationVersion: z.number().int().nonnegative(),
154
- activeRevision: PreferenceRegistryRevisionSummary.nullable(),
155
- supersededByPreferenceId: z.string().uuid().nullable(),
156
- createdBySubjectId: boundedActor,
157
- createdAt: z.string().datetime(),
158
- updatedAt: z.string().datetime(),
159
- });
162
+ export const PreferenceRegistryRecord = /* @__PURE__ */ defineSchema(() =>
163
+ z.object({
164
+ id: z.string().uuid(),
165
+ accountId: z.string().uuid(),
166
+ stableKey: PreferenceRegistryStableKey,
167
+ target: PreferenceRegistryScopeTarget,
168
+ status: PreferenceRegistryStatus,
169
+ scopeVersion: z.number().int().positive(),
170
+ activationVersion: z.number().int().nonnegative(),
171
+ activeRevision: PreferenceRegistryRevisionSummary.nullable(),
172
+ supersededByPreferenceId: z.string().uuid().nullable(),
173
+ createdBySubjectId: boundedActor,
174
+ createdAt: z.string().datetime(),
175
+ updatedAt: z.string().datetime(),
176
+ }),
177
+ );
160
178
  export type PreferenceRegistryRecord = z.infer<typeof PreferenceRegistryRecord>;
161
179
 
162
- export const PreferenceRegistryEvent = z.object({
163
- id: z.string().uuid(),
164
- accountId: z.string().uuid(),
165
- preferenceId: z.string().uuid(),
166
- type: PreferenceRegistryEventType,
167
- version: z.number().int().positive(),
168
- oldRevisionId: z.string().uuid().nullable(),
169
- newRevisionId: z.string().uuid().nullable(),
170
- oldTarget: PreferenceRegistryScopeTarget.nullable(),
171
- newTarget: PreferenceRegistryScopeTarget.nullable(),
172
- relatedPreferenceId: z.string().uuid().nullable(),
173
- actorSubjectId: boundedActor,
174
- reason: boundedReason,
175
- createdAt: z.string().datetime(),
176
- });
180
+ export const PreferenceRegistryEvent = /* @__PURE__ */ defineSchema(() =>
181
+ z.object({
182
+ id: z.string().uuid(),
183
+ accountId: z.string().uuid(),
184
+ preferenceId: z.string().uuid(),
185
+ type: PreferenceRegistryEventType,
186
+ version: z.number().int().positive(),
187
+ oldRevisionId: z.string().uuid().nullable(),
188
+ newRevisionId: z.string().uuid().nullable(),
189
+ oldTarget: PreferenceRegistryScopeTarget.nullable(),
190
+ newTarget: PreferenceRegistryScopeTarget.nullable(),
191
+ relatedPreferenceId: z.string().uuid().nullable(),
192
+ actorSubjectId: boundedActor,
193
+ reason: boundedReason,
194
+ createdAt: z.string().datetime(),
195
+ }),
196
+ );
177
197
  export type PreferenceRegistryEvent = z.infer<typeof PreferenceRegistryEvent>;
178
198
 
179
- export const PreferenceRegistryActivationAuthority = z.enum(["human_confirmed", "automatic"]);
199
+ export const PreferenceRegistryActivationAuthority = /* @__PURE__ */ defineSchema(() =>
200
+ z.enum(["human_confirmed", "automatic"]),
201
+ );
180
202
  export type PreferenceRegistryActivationAuthority = z.infer<
181
203
  typeof PreferenceRegistryActivationAuthority
182
204
  >;
183
205
 
184
- export const PreferenceRegistryDescriptor = z.object({
185
- id: z.string().uuid(),
186
- stableKey: PreferenceRegistryStableKey,
187
- title: z.string().min(1).max(PREFERENCE_REGISTRY_TITLE_MAX_CHARS),
188
- description: descriptorText,
189
- scope: PreferenceRegistryScope,
190
- activeVersion: z.number().int().positive(),
191
- revisionId: z.string().uuid(),
192
- contentHash: hash,
193
- precedence: PreferenceRegistryPrecedence,
194
- provenance: PreferenceRegistryDescriptorProvenance,
195
- // How the active revision became active, derived from the governed-learning
196
- // activation receipt rather than stored on the revision. `provenance.trust`
197
- // stays the frozen creation-time fact - a revision proposed by an agent is
198
- // `untrusted_proposal` forever, which is correct and immutable - while this
199
- // says whether a human explicitly confirmed the activation or policy
200
- // activated it automatically. Null when the revision became active outside
201
- // governed learning, so no receipt describes it.
202
- // Defaulted, not merely nullable: snapshots written before this field
203
- // existed are immutable and their stored JSON simply has no answer. Parsing
204
- // those as null is the truthful reading, and it keeps their pinned
205
- // descriptor hash valid because the stored text is untouched.
206
- activationAuthority: PreferenceRegistryActivationAuthority.nullable().default(null),
207
- expiresAt: z.string().datetime().nullable(),
208
- retrievalHandle: z.string().min(1).max(512),
209
- });
206
+ export const PreferenceRegistryDescriptor = /* @__PURE__ */ defineSchema(() =>
207
+ z.object({
208
+ id: z.string().uuid(),
209
+ stableKey: PreferenceRegistryStableKey,
210
+ title: z.string().min(1).max(PREFERENCE_REGISTRY_TITLE_MAX_CHARS),
211
+ description: descriptorText,
212
+ scope: PreferenceRegistryScope,
213
+ activeVersion: z.number().int().positive(),
214
+ revisionId: z.string().uuid(),
215
+ contentHash: hash,
216
+ precedence: PreferenceRegistryPrecedence,
217
+ provenance: PreferenceRegistryDescriptorProvenance,
218
+ // How the active revision became active, derived from the governed-learning
219
+ // activation receipt rather than stored on the revision. `provenance.trust`
220
+ // stays the frozen creation-time fact - a revision proposed by an agent is
221
+ // `untrusted_proposal` forever, which is correct and immutable - while this
222
+ // says whether a human explicitly confirmed the activation or policy
223
+ // activated it automatically. Null when the revision became active outside
224
+ // governed learning, so no receipt describes it.
225
+ // Defaulted, not merely nullable: snapshots written before this field
226
+ // existed are immutable and their stored JSON simply has no answer. Parsing
227
+ // those as null is the truthful reading, and it keeps their pinned
228
+ // descriptor hash valid because the stored text is untouched.
229
+ activationAuthority: PreferenceRegistryActivationAuthority.nullable().default(null),
230
+ expiresAt: z.string().datetime().nullable(),
231
+ retrievalHandle: z.string().min(1).max(512),
232
+ }),
233
+ );
210
234
  export type PreferenceRegistryDescriptor = z.infer<typeof PreferenceRegistryDescriptor>;
211
235
 
212
- export const PreferenceRegistrySnapshot = z.object({
213
- id: z.string().uuid(),
214
- workspaceId: z.string().uuid(),
215
- sessionId: z.string().uuid(),
216
- turnId: z.string().uuid(),
217
- attemptId: z.string().uuid(),
218
- executionGeneration: z.number().int().positive(),
219
- initiatingHumanSubjectId: boundedActor,
220
- descriptorHash: hash,
221
- descriptors: z.array(PreferenceRegistryDescriptor).max(PREFERENCE_REGISTRY_DESCRIPTOR_MAX_COUNT),
222
- truncated: z.boolean(),
223
- createdAt: z.string().datetime(),
224
- });
236
+ export const PreferenceRegistrySnapshot = /* @__PURE__ */ defineSchema(() =>
237
+ z.object({
238
+ id: z.string().uuid(),
239
+ workspaceId: z.string().uuid(),
240
+ sessionId: z.string().uuid(),
241
+ turnId: z.string().uuid(),
242
+ attemptId: z.string().uuid(),
243
+ executionGeneration: z.number().int().positive(),
244
+ initiatingHumanSubjectId: boundedActor,
245
+ descriptorHash: hash,
246
+ descriptors: z
247
+ .array(PreferenceRegistryDescriptor)
248
+ .max(PREFERENCE_REGISTRY_DESCRIPTOR_MAX_COUNT),
249
+ truncated: z.boolean(),
250
+ createdAt: z.string().datetime(),
251
+ }),
252
+ );
225
253
  export type PreferenceRegistrySnapshot = z.infer<typeof PreferenceRegistrySnapshot>;
226
254
 
227
- export const PreferenceRegistryFullContent = z.object({
228
- descriptor: PreferenceRegistryDescriptor,
229
- content: z.string().min(1).max(PREFERENCE_REGISTRY_CONTENT_MAX_CHARS),
230
- });
255
+ export const PreferenceRegistryFullContent = /* @__PURE__ */ defineSchema(() =>
256
+ z.object({
257
+ descriptor: PreferenceRegistryDescriptor,
258
+ content: z.string().min(1).max(PREFERENCE_REGISTRY_CONTENT_MAX_CHARS),
259
+ }),
260
+ );
231
261
  export type PreferenceRegistryFullContent = z.infer<typeof PreferenceRegistryFullContent>;
232
262
 
233
263
  const revisionInput = {
@@ -252,121 +282,147 @@ const importedSources = new Set<PreferenceRegistryProvenanceSource>([
252
282
  "call_transcript",
253
283
  ]);
254
284
 
255
- export const CreatePreferenceRegistryProposalRequest = z
256
- .object({
257
- stableKey: RequestStableKey,
258
- scope: PreferenceRegistryScope,
259
- ...revisionInput,
260
- provenanceSource: PreferenceRegistryProvenanceSource.default("human"),
261
- provenanceSourceId: z
262
- .string()
263
- .min(1)
264
- .max(PREFERENCE_REGISTRY_SOURCE_ID_MAX_CHARS)
265
- .nullable()
266
- .default(null),
267
- })
268
- .superRefine((value, context) => {
269
- if (importedSources.has(value.provenanceSource) && value.provenanceSourceId === null) {
270
- context.addIssue({
271
- code: "custom",
272
- path: ["provenanceSourceId"],
273
- message: "imported preference proposals require a provenance source id",
274
- });
275
- }
276
- });
285
+ export const CreatePreferenceRegistryProposalRequest = /* @__PURE__ */ defineSchema(() =>
286
+ z
287
+ .object({
288
+ stableKey: RequestStableKey,
289
+ scope: PreferenceRegistryScope,
290
+ ...revisionInput,
291
+ provenanceSource: PreferenceRegistryProvenanceSource.default("human"),
292
+ provenanceSourceId: z
293
+ .string()
294
+ .min(1)
295
+ .max(PREFERENCE_REGISTRY_SOURCE_ID_MAX_CHARS)
296
+ .nullable()
297
+ .default(null),
298
+ })
299
+ .superRefine((value, context) => {
300
+ if (importedSources.has(value.provenanceSource) && value.provenanceSourceId === null) {
301
+ context.addIssue({
302
+ code: "custom",
303
+ path: ["provenanceSourceId"],
304
+ message: "imported preference proposals require a provenance source id",
305
+ });
306
+ }
307
+ }),
308
+ );
277
309
  export type CreatePreferenceRegistryProposalRequest = z.infer<
278
310
  typeof CreatePreferenceRegistryProposalRequest
279
311
  >;
280
312
 
281
- export const ActivatePreferenceRegistryRevisionRequest = z.object({
282
- revisionId: z.string().uuid(),
283
- expectedCurrentRevisionId: z.string().uuid().nullable(),
284
- expectedScopeVersion: z.number().int().positive(),
285
- reason: boundedReason,
286
- });
313
+ export const ActivatePreferenceRegistryRevisionRequest = /* @__PURE__ */ defineSchema(() =>
314
+ z.object({
315
+ revisionId: z.string().uuid(),
316
+ expectedCurrentRevisionId: z.string().uuid().nullable(),
317
+ expectedScopeVersion: z.number().int().positive(),
318
+ reason: boundedReason,
319
+ }),
320
+ );
287
321
  export type ActivatePreferenceRegistryRevisionRequest = z.infer<
288
322
  typeof ActivatePreferenceRegistryRevisionRequest
289
323
  >;
290
324
 
291
- export const CorrectPreferenceRegistryRequest = z.object({
292
- expectedCurrentRevisionId: z.string().uuid(),
293
- expectedScopeVersion: z.number().int().positive(),
294
- ...revisionInput,
295
- reason: boundedReason,
296
- });
325
+ export const CorrectPreferenceRegistryRequest = /* @__PURE__ */ defineSchema(() =>
326
+ z.object({
327
+ expectedCurrentRevisionId: z.string().uuid(),
328
+ expectedScopeVersion: z.number().int().positive(),
329
+ ...revisionInput,
330
+ reason: boundedReason,
331
+ }),
332
+ );
297
333
  export type CorrectPreferenceRegistryRequest = z.infer<typeof CorrectPreferenceRegistryRequest>;
298
334
 
299
- export const DeactivatePreferenceRegistryRequest = z.object({
300
- expectedCurrentRevisionId: z.string().uuid(),
301
- expectedScopeVersion: z.number().int().positive(),
302
- reason: boundedReason,
303
- });
335
+ export const DeactivatePreferenceRegistryRequest = /* @__PURE__ */ defineSchema(() =>
336
+ z.object({
337
+ expectedCurrentRevisionId: z.string().uuid(),
338
+ expectedScopeVersion: z.number().int().positive(),
339
+ reason: boundedReason,
340
+ }),
341
+ );
304
342
  export type DeactivatePreferenceRegistryRequest = z.infer<
305
343
  typeof DeactivatePreferenceRegistryRequest
306
344
  >;
307
345
 
308
- export const ChangePreferenceRegistryScopeRequest = z.object({
309
- scope: PreferenceRegistryScope,
310
- expectedScopeVersion: z.number().int().positive(),
311
- reason: boundedReason,
312
- });
346
+ export const ChangePreferenceRegistryScopeRequest = /* @__PURE__ */ defineSchema(() =>
347
+ z.object({
348
+ scope: PreferenceRegistryScope,
349
+ expectedScopeVersion: z.number().int().positive(),
350
+ reason: boundedReason,
351
+ }),
352
+ );
313
353
  export type ChangePreferenceRegistryScopeRequest = z.infer<
314
354
  typeof ChangePreferenceRegistryScopeRequest
315
355
  >;
316
356
 
317
- export const SupersedePreferenceRegistryRequest = z.object({
318
- replacementPreferenceId: z.string().uuid(),
319
- expectedCurrentRevisionId: z.string().uuid(),
320
- expectedScopeVersion: z.number().int().positive(),
321
- reason: boundedReason,
322
- });
357
+ export const SupersedePreferenceRegistryRequest = /* @__PURE__ */ defineSchema(() =>
358
+ z.object({
359
+ replacementPreferenceId: z.string().uuid(),
360
+ expectedCurrentRevisionId: z.string().uuid(),
361
+ expectedScopeVersion: z.number().int().positive(),
362
+ reason: boundedReason,
363
+ }),
364
+ );
323
365
  export type SupersedePreferenceRegistryRequest = z.infer<typeof SupersedePreferenceRegistryRequest>;
324
366
 
325
- export const RejectPreferenceRegistryProposalRequest = z.object({
326
- revisionId: z.string().uuid(),
327
- expectedScopeVersion: z.number().int().positive(),
328
- reason: boundedReason,
329
- });
367
+ export const RejectPreferenceRegistryProposalRequest = /* @__PURE__ */ defineSchema(() =>
368
+ z.object({
369
+ revisionId: z.string().uuid(),
370
+ expectedScopeVersion: z.number().int().positive(),
371
+ reason: boundedReason,
372
+ }),
373
+ );
330
374
  export type RejectPreferenceRegistryProposalRequest = z.infer<
331
375
  typeof RejectPreferenceRegistryProposalRequest
332
376
  >;
333
377
 
334
- export const PreferenceRegistryListQuery = z.object({
335
- scope: PreferenceRegistryScope.optional(),
336
- status: PreferenceRegistryStatus.optional(),
337
- limit: z.coerce.number().int().min(1).max(100).default(50),
338
- });
378
+ export const PreferenceRegistryListQuery = /* @__PURE__ */ defineSchema(() =>
379
+ z.object({
380
+ scope: PreferenceRegistryScope.optional(),
381
+ status: PreferenceRegistryStatus.optional(),
382
+ limit: z.coerce.number().int().min(1).max(100).default(50),
383
+ }),
384
+ );
339
385
  export type PreferenceRegistryListQuery = z.infer<typeof PreferenceRegistryListQuery>;
340
386
 
341
- export const PreferenceRegistryListResponse = z.object({
342
- preferences: z.array(PreferenceRegistryRecord),
343
- });
387
+ export const PreferenceRegistryListResponse = /* @__PURE__ */ defineSchema(() =>
388
+ z.object({
389
+ preferences: z.array(PreferenceRegistryRecord),
390
+ }),
391
+ );
344
392
  export type PreferenceRegistryListResponse = z.infer<typeof PreferenceRegistryListResponse>;
345
393
 
346
- export const PreferenceRegistryDetailResponse = z.object({
347
- preference: PreferenceRegistryRecord,
348
- revisions: z.array(PreferenceRegistryRevisionSummary),
349
- events: z.array(PreferenceRegistryEvent),
350
- });
394
+ export const PreferenceRegistryDetailResponse = /* @__PURE__ */ defineSchema(() =>
395
+ z.object({
396
+ preference: PreferenceRegistryRecord,
397
+ revisions: z.array(PreferenceRegistryRevisionSummary),
398
+ events: z.array(PreferenceRegistryEvent),
399
+ }),
400
+ );
351
401
  export type PreferenceRegistryDetailResponse = z.infer<typeof PreferenceRegistryDetailResponse>;
352
402
 
353
- export const PreferenceRegistryMutationResponse = z.object({
354
- preference: PreferenceRegistryRecord,
355
- event: PreferenceRegistryEvent,
356
- });
403
+ export const PreferenceRegistryMutationResponse = /* @__PURE__ */ defineSchema(() =>
404
+ z.object({
405
+ preference: PreferenceRegistryRecord,
406
+ event: PreferenceRegistryEvent,
407
+ }),
408
+ );
357
409
  export type PreferenceRegistryMutationResponse = z.infer<typeof PreferenceRegistryMutationResponse>;
358
410
 
359
- export const PreferenceRegistryConflictResponse = z.object({
360
- code: z.literal("PREFERENCE_REGISTRY_CONFLICT"),
361
- message: z.string(),
362
- currentRevisionId: z.string().uuid().nullable(),
363
- scopeVersion: z.number().int().positive().nullable(),
364
- });
411
+ export const PreferenceRegistryConflictResponse = /* @__PURE__ */ defineSchema(() =>
412
+ z.object({
413
+ code: z.literal("PREFERENCE_REGISTRY_CONFLICT"),
414
+ message: z.string(),
415
+ currentRevisionId: z.string().uuid().nullable(),
416
+ scopeVersion: z.number().int().positive().nullable(),
417
+ }),
418
+ );
365
419
  export type PreferenceRegistryConflictResponse = z.infer<typeof PreferenceRegistryConflictResponse>;
366
420
 
367
- export const PreferenceRegistryFullContentRequest = z.object({
368
- retrievalHandle: z.string().min(1).max(512),
369
- });
421
+ export const PreferenceRegistryFullContentRequest = /* @__PURE__ */ defineSchema(() =>
422
+ z.object({
423
+ retrievalHandle: z.string().min(1).max(512),
424
+ }),
425
+ );
370
426
  export type PreferenceRegistryFullContentRequest = z.infer<
371
427
  typeof PreferenceRegistryFullContentRequest
372
428
  >;