@opengeni/contracts 3.1.0-canary.1 → 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 (434) 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 +110 -0
  4. package/dist/agent-learning.d.ts +243 -0
  5. package/dist/allowance-refusal.d.ts +9 -0
  6. package/dist/allowance-refusal.js +50 -0
  7. package/dist/allowance-refusal.js.map +1 -0
  8. package/dist/analytics-consent-report.d.ts +19 -0
  9. package/dist/analytics-consent-report.js +10 -0
  10. package/dist/analytics-consent-report.js.map +1 -0
  11. package/dist/api-key-presets.d.ts +19 -0
  12. package/dist/artifact-catalog.d.ts +188 -0
  13. package/dist/artifacts.d.ts +86 -0
  14. package/dist/atlassian-native-retirement.d.ts +16 -0
  15. package/dist/atlassian-native-retirement.js +30 -0
  16. package/dist/atlassian-native-retirement.js.map +1 -0
  17. package/dist/atlassian.d.ts +1 -0
  18. package/dist/atlassian.js +34 -19
  19. package/dist/browser-storage.d.ts +5 -0
  20. package/dist/browser-storage.js +9 -0
  21. package/dist/browser-storage.js.map +1 -0
  22. package/dist/bundled-skills.d.ts +24 -1
  23. package/dist/canonical-human-identities.js +2 -1
  24. package/dist/chunk-2ZIHHL72.js +153 -0
  25. package/dist/chunk-2ZIHHL72.js.map +1 -0
  26. package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
  27. package/dist/chunk-4JGHSSB7.js +11 -0
  28. package/dist/chunk-4JGHSSB7.js.map +1 -0
  29. package/dist/chunk-4QO6GJUX.js +85 -0
  30. package/dist/chunk-4QO6GJUX.js.map +1 -0
  31. package/dist/chunk-4VDMHLLL.js +49 -0
  32. package/dist/chunk-4VDMHLLL.js.map +1 -0
  33. package/dist/chunk-56SNIMDO.js +9 -0
  34. package/dist/chunk-56SNIMDO.js.map +1 -0
  35. package/dist/chunk-6C2HKFTU.js +207 -0
  36. package/dist/chunk-6C2HKFTU.js.map +1 -0
  37. package/dist/chunk-6IXO76Z6.js +72 -0
  38. package/dist/chunk-6IXO76Z6.js.map +1 -0
  39. package/dist/chunk-7272KVWZ.js +60 -0
  40. package/dist/chunk-7272KVWZ.js.map +1 -0
  41. package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
  42. package/dist/chunk-E3GGUBHS.js.map +1 -0
  43. package/dist/chunk-EFZYKUE2.js +767 -0
  44. package/dist/chunk-EFZYKUE2.js.map +1 -0
  45. package/dist/chunk-EKWNTOG3.js +154 -0
  46. package/dist/chunk-EKWNTOG3.js.map +1 -0
  47. package/dist/chunk-HABQ7ADB.js +234 -0
  48. package/dist/chunk-HABQ7ADB.js.map +1 -0
  49. package/dist/chunk-HRRU4QPI.js +91 -0
  50. package/dist/chunk-HRRU4QPI.js.map +1 -0
  51. package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
  52. package/dist/chunk-IK36LXKC.js.map +1 -0
  53. package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
  54. package/dist/chunk-ILJ72KPO.js.map +1 -0
  55. package/dist/chunk-J4HQ3UKY.js +93 -0
  56. package/dist/chunk-J4HQ3UKY.js.map +1 -0
  57. package/dist/chunk-KHHZTBP7.js +11 -0
  58. package/dist/chunk-KHHZTBP7.js.map +1 -0
  59. package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
  60. package/dist/chunk-LZ2LAHIX.js.map +1 -0
  61. package/dist/chunk-NDZHPTCL.js +400 -0
  62. package/dist/chunk-NDZHPTCL.js.map +1 -0
  63. package/dist/chunk-OF6OKOBF.js +54793 -0
  64. package/dist/chunk-OF6OKOBF.js.map +1 -0
  65. package/dist/chunk-OL23ARTF.js +94 -0
  66. package/dist/chunk-OL23ARTF.js.map +1 -0
  67. package/dist/chunk-PUIUXIOL.js +189 -0
  68. package/dist/chunk-PUIUXIOL.js.map +1 -0
  69. package/dist/{chunk-WBYTNVIW.js → chunk-RKX3NQYS.js} +1 -1
  70. package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
  71. package/dist/chunk-RMWXDZEO.js.map +1 -0
  72. package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
  73. package/dist/chunk-SHO4YO4B.js.map +1 -0
  74. package/dist/chunk-SWRN2DJ3.js +153 -0
  75. package/dist/chunk-SWRN2DJ3.js.map +1 -0
  76. package/dist/chunk-TCXCRBPF.js +267 -0
  77. package/dist/chunk-TCXCRBPF.js.map +1 -0
  78. package/dist/chunk-TLU3UEMD.js +324 -0
  79. package/dist/chunk-TLU3UEMD.js.map +1 -0
  80. package/dist/chunk-TSWWZMUS.js +186 -0
  81. package/dist/chunk-TSWWZMUS.js.map +1 -0
  82. package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
  83. package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
  84. package/dist/chunk-XDLAGX66.js +127 -0
  85. package/dist/chunk-XDLAGX66.js.map +1 -0
  86. package/dist/chunk-YKZ4WU4P.js +33 -0
  87. package/dist/chunk-YKZ4WU4P.js.map +1 -0
  88. package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
  89. package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
  90. package/dist/chunk-ZDCRWCGZ.js.map +1 -0
  91. package/dist/claude-provider-account-authority.d.ts +18 -0
  92. package/dist/claude-subscription-oauth.d.ts +42 -0
  93. package/dist/claude-subscription-usage.d.ts +159 -0
  94. package/dist/client-error-report.d.ts +158 -0
  95. package/dist/client-error-report.js +164 -0
  96. package/dist/client-error-report.js.map +1 -0
  97. package/dist/code-search.d.ts +52 -0
  98. package/dist/code-search.js +40 -0
  99. package/dist/code-search.js.map +1 -0
  100. package/dist/codex-provider-account-authority.js +20 -12
  101. package/dist/codex-provider-account-authority.js.map +1 -1
  102. package/dist/company-brain.d.ts +19 -81
  103. package/dist/company-profile.d.ts +144 -6
  104. package/dist/connect.d.ts +37 -0
  105. package/dist/connect.js +216 -159
  106. package/dist/connect.js.map +1 -1
  107. package/dist/connection-account-label.d.ts +2 -0
  108. package/dist/connection-account-label.js +35 -0
  109. package/dist/connection-account-label.js.map +1 -0
  110. package/dist/connection-authority.d.ts +9 -317
  111. package/dist/connection-authority.js +37 -42
  112. package/dist/connector-attachments.js +2 -1
  113. package/dist/connector-destinations.js +2 -1
  114. package/dist/connector-tool-permissions.d.ts +137 -0
  115. package/dist/cua-desktop-tools.d.ts +17 -0
  116. package/dist/define-schema.d.ts +8 -0
  117. package/dist/direct-model-provider.d.ts +36 -0
  118. package/dist/editable-artifact-codec-registry.js +5 -5
  119. package/dist/editable-artifact-committed-transaction.js +3 -2
  120. package/dist/editable-artifact-live.js +5 -5
  121. package/dist/editable-artifact-serialized-commit.js +6 -6
  122. package/dist/editable-artifact-versions.d.ts +7 -1
  123. package/dist/editable-artifact-versions.js +1 -1
  124. package/dist/editable-artifacts.js +62 -56
  125. package/dist/event-preview.d.ts +22 -0
  126. package/dist/external-identities.d.ts +174 -0
  127. package/dist/external-identities.js +15 -4
  128. package/dist/first-party-tool-authorization.d.ts +815 -0
  129. package/dist/github-repository-contracts.js +60 -43
  130. package/dist/github-repository-contracts.js.map +1 -1
  131. package/dist/google-drive.d.ts +2 -1
  132. package/dist/google-drive.js +305 -238
  133. package/dist/google-drive.js.map +1 -1
  134. package/dist/host-mcp-bindings.d.ts +39 -10
  135. package/dist/host-mcp-bindings.js +256 -171
  136. package/dist/host-mcp-bindings.js.map +1 -1
  137. package/dist/image-generation.d.ts +1 -0
  138. package/dist/index.d.ts +15715 -3850
  139. package/dist/index.js +2088 -289
  140. package/dist/insights-usage.d.ts +877 -0
  141. package/dist/insights-usage.js +559 -0
  142. package/dist/insights-usage.js.map +1 -0
  143. package/dist/interaction.d.ts +1176 -829
  144. package/dist/knowledge-entries.d.ts +984 -0
  145. package/dist/knowledge-preparation.d.ts +239 -0
  146. package/dist/managed-auth-session-sets.d.ts +7 -0
  147. package/dist/managed-auth-session-sets.js +198 -132
  148. package/dist/managed-auth-session-sets.js.map +1 -1
  149. package/dist/managed-sign-in-methods.d.ts +56 -0
  150. package/dist/managed-sign-in-methods.js +64 -0
  151. package/dist/managed-sign-in-methods.js.map +1 -0
  152. package/dist/mcp-catalog-limits.d.ts +2 -0
  153. package/dist/mcp-endpoint.js +9 -0
  154. package/dist/mcp-endpoint.js.map +1 -0
  155. package/dist/mcp-oauth.d.ts +2 -2
  156. package/dist/mcp-structured-content.d.ts +25 -0
  157. package/dist/modal-native-proof-v2.d.ts +587 -0
  158. package/dist/modal-native-proof-v2.js +38 -0
  159. package/dist/modal-native-proof-v2.js.map +1 -0
  160. package/dist/model-account-choice.d.ts +235 -0
  161. package/dist/model-account-settings.d.ts +422 -0
  162. package/dist/model-availability.d.ts +15 -0
  163. package/dist/model-connection-access.d.ts +13 -0
  164. package/dist/model-context-inspector.d.ts +98 -0
  165. package/dist/model-display.d.ts +43 -0
  166. package/dist/model-display.js +17 -0
  167. package/dist/model-display.js.map +1 -0
  168. package/dist/model-picker-order.d.ts +3 -1
  169. package/dist/model-picker-order.js +3 -0
  170. package/dist/model-picker-order.js.map +1 -1
  171. package/dist/organization-access.d.ts +412 -0
  172. package/dist/organization-access.js +39 -0
  173. package/dist/organization-access.js.map +1 -0
  174. package/dist/organization-integration-policy.d.ts +27 -0
  175. package/dist/organization-membership-lifecycle.d.ts +38 -0
  176. package/dist/organization-model-usage.d.ts +146 -0
  177. package/dist/organization-model-usage.js +78 -0
  178. package/dist/organization-model-usage.js.map +1 -0
  179. package/dist/organization-recovery.js +2 -1
  180. package/dist/organization-usage.d.ts +138 -0
  181. package/dist/permissions.d.ts +18 -0
  182. package/dist/personal-github.d.ts +1 -0
  183. package/dist/personal-github.js +199 -144
  184. package/dist/personal-github.js.map +1 -1
  185. package/dist/plugin-discovery.js +1 -1
  186. package/dist/prepared-mcp-setup.d.ts +54 -0
  187. package/dist/prepared-mcp-setup.js +12 -0
  188. package/dist/prepared-mcp-setup.js.map +1 -0
  189. package/dist/product-analytics.d.ts +116 -0
  190. package/dist/product-lifecycle-facts.d.ts +73 -0
  191. package/dist/remember.d.ts +98 -6
  192. package/dist/retained-output.d.ts +8 -0
  193. package/dist/sandbox-file-artifacts.d.ts +1 -0
  194. package/dist/sandbox-provider-command.d.ts +91 -1
  195. package/dist/sandbox-recovery.d.ts +146 -0
  196. package/dist/secret-generator.d.ts +44 -0
  197. package/dist/secret-references.d.ts +90 -0
  198. package/dist/secret-resolution.d.ts +111 -0
  199. package/dist/secret-totp.d.ts +41 -0
  200. package/dist/session-final-reply.d.ts +6 -0
  201. package/dist/session-final-reply.js +9 -0
  202. package/dist/session-final-reply.js.map +1 -0
  203. package/dist/session-goal-reports.d.ts +21 -0
  204. package/dist/session-history-import.d.ts +1272 -0
  205. package/dist/session-list-entries.d.ts +4 -0
  206. package/dist/session-list-entries.js +56 -0
  207. package/dist/session-list-entries.js.map +1 -0
  208. package/dist/session-mcp-projections.d.ts +6 -0
  209. package/dist/session-mcp-tool-permissions.d.ts +62 -0
  210. package/dist/session-message-search.d.ts +68 -0
  211. package/dist/session-target.d.ts +18 -0
  212. package/dist/session-titles.d.ts +8 -0
  213. package/dist/session-titles.js +5 -1
  214. package/dist/session-usage-limit-refusal.d.ts +34 -0
  215. package/dist/session-usage-limit-refusal.js +15 -0
  216. package/dist/session-usage-limit-refusal.js.map +1 -0
  217. package/dist/session-usage-limits.d.ts +127 -0
  218. package/dist/session-usage-limits.js +41 -0
  219. package/dist/session-usage-limits.js.map +1 -0
  220. package/dist/signup-attribution.d.ts +39 -0
  221. package/dist/site-data.d.ts +286 -0
  222. package/dist/site-operations.d.ts +39 -0
  223. package/dist/site-publishing.d.ts +778 -0
  224. package/dist/site-session-http.d.ts +89 -4
  225. package/dist/site-session-http.js +25 -1
  226. package/dist/site-sql.d.ts +421 -0
  227. package/dist/skill-catalog-context.d.ts +7 -0
  228. package/dist/skill-files.d.ts +1 -1
  229. package/dist/skill-use.d.ts +61 -0
  230. package/dist/skills.d.ts +15 -0
  231. package/dist/slack-bot-scopes.d.ts +17 -12
  232. package/dist/slack-bot-scopes.js +10 -3
  233. package/dist/slack-rest-mcp.d.ts +36 -0
  234. package/dist/slack-rest-mcp.js +25 -0
  235. package/dist/slack-rest-mcp.js.map +1 -0
  236. package/dist/spreadsheet-artifact-commands.d.ts +14 -1
  237. package/dist/spreadsheet-artifact-commands.js +8 -2
  238. package/dist/spreadsheet-artifact-query.d.ts +13 -6
  239. package/dist/spreadsheet-artifact-query.js +3 -3
  240. package/dist/subscription-account-actions.d.ts +64 -0
  241. package/dist/subscription-account-pools.d.ts +292 -0
  242. package/dist/subscription-personal-authority-v2.d.ts +28 -0
  243. package/dist/subscription-personal-authority-v2.js +12 -0
  244. package/dist/subscription-personal-authority-v2.js.map +1 -0
  245. package/dist/tool-action-review.d.ts +132 -0
  246. package/dist/tool-catalog.d.ts +408 -0
  247. package/dist/tool-policy.d.ts +5 -0
  248. package/dist/tool-review-presentation.d.ts +12 -0
  249. package/dist/tool-review-presentation.js +17 -0
  250. package/dist/tool-review-presentation.js.map +1 -0
  251. package/dist/transcription-recordings.d.ts +21 -0
  252. package/dist/turn-serving-policy.d.ts +221 -0
  253. package/dist/usage-allowances.d.ts +314 -0
  254. package/dist/usage-allowances.js +52 -0
  255. package/dist/usage-allowances.js.map +1 -0
  256. package/dist/vaults.d.ts +1286 -0
  257. package/dist/video-generation.d.ts +3 -0
  258. package/dist/video-generation.js +2 -1
  259. package/dist/workspace-instruction-policies.d.ts +13 -0
  260. package/dist/workspace-integration-wire.d.ts +36 -0
  261. package/dist/workspace-integration-wire.js +23 -0
  262. package/dist/workspace-integration-wire.js.map +1 -0
  263. package/dist/workspace-integrations.d.ts +1028 -0
  264. package/dist/workspace-state.d.ts +85 -416
  265. package/dist/xai-provider-account-authority.js +2 -1
  266. package/package.json +98 -2
  267. package/src/agent-authored-durable-text.ts +14 -11
  268. package/src/agent-config.ts +1698 -0
  269. package/src/agent-instruction-changes.ts +115 -0
  270. package/src/agent-learning.ts +188 -0
  271. package/src/agent-topology.ts +57 -52
  272. package/src/allowance-refusal.ts +81 -0
  273. package/src/analytics-consent-report.ts +20 -0
  274. package/src/api-key-presets.ts +28 -0
  275. package/src/artifact-catalog.ts +82 -0
  276. package/src/artifacts.ts +299 -227
  277. package/src/atlassian-native-retirement.ts +33 -0
  278. package/src/atlassian.ts +135 -108
  279. package/src/browser-storage.ts +10 -0
  280. package/src/bundled-skills.ts +60 -17
  281. package/src/canonical-human-identities.ts +60 -58
  282. package/src/claude-provider-account-authority.ts +12 -0
  283. package/src/claude-subscription-oauth.ts +73 -0
  284. package/src/claude-subscription-usage.ts +68 -0
  285. package/src/client-error-report.ts +343 -0
  286. package/src/code-search.ts +105 -0
  287. package/src/codex-provider-account-authority.ts +21 -16
  288. package/src/company-brain-governed-writes.ts +255 -233
  289. package/src/company-brain.ts +164 -153
  290. package/src/company-profile.ts +365 -292
  291. package/src/connect.ts +212 -173
  292. package/src/connection-account-label.ts +46 -0
  293. package/src/connection-authority.ts +183 -364
  294. package/src/connector-attachments.ts +137 -122
  295. package/src/connector-destinations.ts +46 -42
  296. package/src/connector-tool-permissions.ts +117 -0
  297. package/src/cua-desktop-tools.gen.json +6512 -0
  298. package/src/cua-desktop-tools.linux.gen.json +6600 -0
  299. package/src/cua-desktop-tools.ts +36 -0
  300. package/src/cua-desktop-tools.windows.gen.json +6353 -0
  301. package/src/define-schema.ts +10 -0
  302. package/src/direct-model-provider.ts +108 -0
  303. package/src/editable-artifact-committed-transaction.ts +17 -0
  304. package/src/editable-artifact-versions.ts +7 -1
  305. package/src/event-preview.ts +53 -3
  306. package/src/external-identities.ts +262 -145
  307. package/src/feedback.ts +43 -30
  308. package/src/first-party-tool-authorization.ts +356 -0
  309. package/src/github-repository-contracts.ts +78 -64
  310. package/src/google-drive.ts +285 -234
  311. package/src/governed-learning-activation.ts +152 -131
  312. package/src/governed-learning-evaluator.ts +140 -133
  313. package/src/host-mcp-bindings.ts +292 -198
  314. package/src/image-generation.ts +104 -95
  315. package/src/index.ts +13354 -8654
  316. package/src/insights-usage.ts +727 -0
  317. package/src/interaction.ts +3070 -2326
  318. package/src/knowledge-entries.ts +428 -0
  319. package/src/knowledge-preparation.ts +57 -0
  320. package/src/knowledge.ts +246 -213
  321. package/src/managed-auth-session-sets.ts +220 -144
  322. package/src/managed-sign-in-methods.ts +52 -0
  323. package/src/mcp-catalog-limits.ts +2 -0
  324. package/src/mcp-oauth.ts +43 -34
  325. package/src/mcp-receipts.ts +192 -192
  326. package/src/mcp-structured-content.ts +81 -0
  327. package/src/memory-slack-delivery.ts +171 -142
  328. package/src/modal-native-proof-v2.ts +429 -0
  329. package/src/model-account-choice.ts +177 -0
  330. package/src/model-account-settings.ts +210 -0
  331. package/src/model-availability.ts +22 -0
  332. package/src/model-connection-access.ts +61 -14
  333. package/src/model-context-inspector.ts +133 -99
  334. package/src/model-display.ts +221 -0
  335. package/src/model-picker-order.ts +12 -1
  336. package/src/organization-access.ts +217 -0
  337. package/src/organization-integration-policy.ts +63 -0
  338. package/src/organization-membership-lifecycle.ts +528 -382
  339. package/src/organization-model-usage.ts +81 -0
  340. package/src/organization-recovery.ts +147 -135
  341. package/src/organization-usage.ts +94 -0
  342. package/src/permissions.ts +88 -52
  343. package/src/personal-github.ts +210 -171
  344. package/src/preference-registry.ts +314 -258
  345. package/src/prepared-mcp-setup.ts +189 -0
  346. package/src/product-analytics.ts +261 -0
  347. package/src/product-lifecycle-facts.ts +122 -0
  348. package/src/remember.ts +181 -167
  349. package/src/retained-output.ts +194 -165
  350. package/src/sandbox-file-artifacts.ts +60 -47
  351. package/src/sandbox-provider-command.ts +88 -20
  352. package/src/sandbox-recovery.ts +129 -0
  353. package/src/scoped-knowledge.ts +61 -43
  354. package/src/secret-generator.ts +155 -0
  355. package/src/secret-references.ts +414 -0
  356. package/src/secret-resolution.ts +274 -0
  357. package/src/secret-totp.ts +188 -0
  358. package/src/session-final-reply.ts +16 -0
  359. package/src/session-goal-reports.ts +64 -0
  360. package/src/session-history-import.ts +177 -0
  361. package/src/session-list-entries.ts +96 -0
  362. package/src/session-mcp-projections.ts +11 -0
  363. package/src/session-mcp-tool-permissions.ts +108 -0
  364. package/src/session-message-search.ts +61 -0
  365. package/src/session-target.ts +57 -0
  366. package/src/session-titles.ts +80 -10
  367. package/src/session-topology-primitives.ts +19 -12
  368. package/src/session-usage-limit-refusal.ts +101 -0
  369. package/src/session-usage-limits.ts +171 -0
  370. package/src/signup-attribution.ts +86 -0
  371. package/src/site-data.ts +339 -0
  372. package/src/site-operations.ts +154 -0
  373. package/src/site-publishing.ts +876 -0
  374. package/src/site-session-http.ts +294 -16
  375. package/src/site-sql.ts +1123 -0
  376. package/src/skill-catalog-context.ts +50 -0
  377. package/src/skill-files.ts +3 -3
  378. package/src/skill-use.ts +80 -0
  379. package/src/skills.ts +82 -54
  380. package/src/slack-bot-scopes.ts +31 -39
  381. package/src/slack-rest-mcp.ts +222 -0
  382. package/src/slack-task-policy.ts +96 -73
  383. package/src/spreadsheet-artifact-commands.ts +73 -2
  384. package/src/spreadsheet-artifact-query.ts +187 -39
  385. package/src/subscription-account-actions.ts +84 -0
  386. package/src/subscription-account-pools.ts +53 -0
  387. package/src/subscription-personal-authority-v2.ts +66 -0
  388. package/src/task-notes.ts +55 -51
  389. package/src/tool-action-review.ts +258 -0
  390. package/src/tool-catalog.ts +609 -372
  391. package/src/tool-policy.ts +82 -0
  392. package/src/tool-result-spill.ts +12 -9
  393. package/src/tool-review-presentation.ts +385 -0
  394. package/src/transcription-recordings.ts +145 -131
  395. package/src/turn-serving-policy.ts +166 -0
  396. package/src/usage-allowances.ts +248 -0
  397. package/src/vaults.ts +850 -0
  398. package/src/video-generation.ts +385 -360
  399. package/src/work-claims.ts +173 -149
  400. package/src/workspace-instruction-policies.ts +349 -275
  401. package/src/workspace-integration-wire.ts +101 -0
  402. package/src/workspace-integrations.ts +724 -0
  403. package/src/workspace-learning-administration.ts +57 -44
  404. package/src/workspace-learning-policy.ts +127 -96
  405. package/src/workspace-state.ts +253 -333
  406. package/src/xai-provider-account-authority.ts +22 -17
  407. package/dist/chunk-3SIZGL3O.js.map +0 -1
  408. package/dist/chunk-7ABONTXE.js.map +0 -1
  409. package/dist/chunk-BCS7WHCK.js +0 -139
  410. package/dist/chunk-BCS7WHCK.js.map +0 -1
  411. package/dist/chunk-GRG7PHWQ.js +0 -25
  412. package/dist/chunk-GRG7PHWQ.js.map +0 -1
  413. package/dist/chunk-JUFK3T4Q.js +0 -80
  414. package/dist/chunk-JUFK3T4Q.js.map +0 -1
  415. package/dist/chunk-M5ZGRVIQ.js +0 -719
  416. package/dist/chunk-M5ZGRVIQ.js.map +0 -1
  417. package/dist/chunk-MRWYRAS5.js.map +0 -1
  418. package/dist/chunk-OSBYTE3O.js +0 -348
  419. package/dist/chunk-OSBYTE3O.js.map +0 -1
  420. package/dist/chunk-P3HLDT77.js +0 -59
  421. package/dist/chunk-P3HLDT77.js.map +0 -1
  422. package/dist/chunk-TEMFILR7.js +0 -143
  423. package/dist/chunk-TEMFILR7.js.map +0 -1
  424. package/dist/chunk-TXTQIYCV.js.map +0 -1
  425. package/dist/chunk-UR2GFYIE.js +0 -22598
  426. package/dist/chunk-UR2GFYIE.js.map +0 -1
  427. package/dist/chunk-WYBDERIY.js.map +0 -1
  428. package/dist/chunk-Y3KNXVTD.js.map +0 -1
  429. package/dist/chunk-YBW5JSA3.js.map +0 -1
  430. package/dist/chunk-YRXAWWCU.js +0 -45
  431. package/dist/chunk-YRXAWWCU.js.map +0 -1
  432. /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
  433. /package/dist/{chunk-WBYTNVIW.js.map → chunk-RKX3NQYS.js.map} +0 -0
  434. /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
@@ -0,0 +1,1028 @@
1
+ import { z } from "zod";
2
+ import { type TurnInitiator, type TurnInitiatorContext } from "./index.js";
3
+ export * from "./workspace-integration-wire.js";
4
+ /**
5
+ * Workspace integration primitives for embedding hosts: signed outbound
6
+ * webhooks and one signed HTTP credential provider per workspace. Both
7
+ * directions share one signature scheme so a host verifies every Opengeni
8
+ * request with the same helper.
9
+ */
10
+ export declare const WorkspaceWebhookEventType: z.ZodEnum<{
11
+ "session.humanInput.requested": "session.humanInput.requested";
12
+ "session.notification.posted": "session.notification.posted";
13
+ "session.notification.withdrawn": "session.notification.withdrawn";
14
+ "session.requiresAction": "session.requiresAction";
15
+ "session.status.changed": "session.status.changed";
16
+ "turn.cancelled": "turn.cancelled";
17
+ "turn.completed": "turn.completed";
18
+ "turn.failed": "turn.failed";
19
+ "usage.exhausted": "usage.exhausted";
20
+ "usage.period_reset": "usage.period_reset";
21
+ "usage.threshold_reached": "usage.threshold_reached";
22
+ }>;
23
+ export type WorkspaceWebhookEventType = z.infer<typeof WorkspaceWebhookEventType>;
24
+ export declare const WORKSPACE_WEBHOOK_LIMIT_PER_WORKSPACE = 10;
25
+ export declare const ORGANIZATION_WEBHOOK_LIMIT_PER_ORGANIZATION = 10;
26
+ /** Scoping convenience, never authority. Null means all non-personal workspaces. */
27
+ export declare const IntegrationWorkspaceFilter: z.ZodObject<{
28
+ externalSource: z.ZodString;
29
+ }, z.core.$strict>;
30
+ export type IntegrationWorkspaceFilter = z.infer<typeof IntegrationWorkspaceFilter>;
31
+ /** Informational attribution only. It never supplies or changes authorization. */
32
+ export declare const InitiatingHuman: z.ZodObject<{
33
+ subjectId: z.ZodString;
34
+ externalIdentity: z.ZodNullable<z.ZodObject<{
35
+ source: z.ZodString;
36
+ externalId: z.ZodString;
37
+ }, z.core.$strip>>;
38
+ }, z.core.$strip>;
39
+ export type InitiatingHuman = z.infer<typeof InitiatingHuman>;
40
+ export declare const WorkspaceWebhook: z.ZodObject<{
41
+ id: z.ZodString;
42
+ workspaceId: z.ZodString;
43
+ url: z.ZodString;
44
+ eventTypes: z.ZodArray<z.ZodEnum<{
45
+ "session.humanInput.requested": "session.humanInput.requested";
46
+ "session.notification.posted": "session.notification.posted";
47
+ "session.notification.withdrawn": "session.notification.withdrawn";
48
+ "session.requiresAction": "session.requiresAction";
49
+ "session.status.changed": "session.status.changed";
50
+ "turn.cancelled": "turn.cancelled";
51
+ "turn.completed": "turn.completed";
52
+ "turn.failed": "turn.failed";
53
+ "usage.exhausted": "usage.exhausted";
54
+ "usage.period_reset": "usage.period_reset";
55
+ "usage.threshold_reached": "usage.threshold_reached";
56
+ }>>;
57
+ enabled: z.ZodBoolean;
58
+ description: z.ZodNullable<z.ZodString>;
59
+ createdAt: z.ZodString;
60
+ updatedAt: z.ZodString;
61
+ }, z.core.$strict>;
62
+ export type WorkspaceWebhook = z.infer<typeof WorkspaceWebhook>;
63
+ export declare const CreateWorkspaceWebhookRequest: z.ZodObject<{
64
+ url: z.ZodString;
65
+ eventTypes: z.ZodPipe<z.ZodArray<z.ZodEnum<{
66
+ "session.humanInput.requested": "session.humanInput.requested";
67
+ "session.notification.posted": "session.notification.posted";
68
+ "session.notification.withdrawn": "session.notification.withdrawn";
69
+ "session.requiresAction": "session.requiresAction";
70
+ "session.status.changed": "session.status.changed";
71
+ "turn.cancelled": "turn.cancelled";
72
+ "turn.completed": "turn.completed";
73
+ "turn.failed": "turn.failed";
74
+ "usage.exhausted": "usage.exhausted";
75
+ "usage.period_reset": "usage.period_reset";
76
+ "usage.threshold_reached": "usage.threshold_reached";
77
+ }>>, z.ZodTransform<("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[], ("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[]>>;
78
+ enabled: z.ZodOptional<z.ZodBoolean>;
79
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ }, z.core.$strict>;
81
+ export type CreateWorkspaceWebhookRequest = z.input<typeof CreateWorkspaceWebhookRequest>;
82
+ /** The signing secret is returned exactly once, at creation. */
83
+ export declare const CreateWorkspaceWebhookResponse: z.ZodObject<{
84
+ webhook: z.ZodObject<{
85
+ id: z.ZodString;
86
+ workspaceId: z.ZodString;
87
+ url: z.ZodString;
88
+ eventTypes: z.ZodArray<z.ZodEnum<{
89
+ "session.humanInput.requested": "session.humanInput.requested";
90
+ "session.notification.posted": "session.notification.posted";
91
+ "session.notification.withdrawn": "session.notification.withdrawn";
92
+ "session.requiresAction": "session.requiresAction";
93
+ "session.status.changed": "session.status.changed";
94
+ "turn.cancelled": "turn.cancelled";
95
+ "turn.completed": "turn.completed";
96
+ "turn.failed": "turn.failed";
97
+ "usage.exhausted": "usage.exhausted";
98
+ "usage.period_reset": "usage.period_reset";
99
+ "usage.threshold_reached": "usage.threshold_reached";
100
+ }>>;
101
+ enabled: z.ZodBoolean;
102
+ description: z.ZodNullable<z.ZodString>;
103
+ createdAt: z.ZodString;
104
+ updatedAt: z.ZodString;
105
+ }, z.core.$strict>;
106
+ secret: z.ZodString;
107
+ }, z.core.$strict>;
108
+ export type CreateWorkspaceWebhookResponse = z.infer<typeof CreateWorkspaceWebhookResponse>;
109
+ export declare const UpdateWorkspaceWebhookRequest: z.ZodObject<{
110
+ url: z.ZodOptional<z.ZodString>;
111
+ eventTypes: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodEnum<{
112
+ "session.humanInput.requested": "session.humanInput.requested";
113
+ "session.notification.posted": "session.notification.posted";
114
+ "session.notification.withdrawn": "session.notification.withdrawn";
115
+ "session.requiresAction": "session.requiresAction";
116
+ "session.status.changed": "session.status.changed";
117
+ "turn.cancelled": "turn.cancelled";
118
+ "turn.completed": "turn.completed";
119
+ "turn.failed": "turn.failed";
120
+ "usage.exhausted": "usage.exhausted";
121
+ "usage.period_reset": "usage.period_reset";
122
+ "usage.threshold_reached": "usage.threshold_reached";
123
+ }>>, z.ZodTransform<("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[], ("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[]>>>;
124
+ enabled: z.ZodOptional<z.ZodBoolean>;
125
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ }, z.core.$strict>;
127
+ export type UpdateWorkspaceWebhookRequest = z.input<typeof UpdateWorkspaceWebhookRequest>;
128
+ export declare const ListWorkspaceWebhooksResponse: z.ZodObject<{
129
+ webhooks: z.ZodArray<z.ZodObject<{
130
+ id: z.ZodString;
131
+ workspaceId: z.ZodString;
132
+ url: z.ZodString;
133
+ eventTypes: z.ZodArray<z.ZodEnum<{
134
+ "session.humanInput.requested": "session.humanInput.requested";
135
+ "session.notification.posted": "session.notification.posted";
136
+ "session.notification.withdrawn": "session.notification.withdrawn";
137
+ "session.requiresAction": "session.requiresAction";
138
+ "session.status.changed": "session.status.changed";
139
+ "turn.cancelled": "turn.cancelled";
140
+ "turn.completed": "turn.completed";
141
+ "turn.failed": "turn.failed";
142
+ "usage.exhausted": "usage.exhausted";
143
+ "usage.period_reset": "usage.period_reset";
144
+ "usage.threshold_reached": "usage.threshold_reached";
145
+ }>>;
146
+ enabled: z.ZodBoolean;
147
+ description: z.ZodNullable<z.ZodString>;
148
+ createdAt: z.ZodString;
149
+ updatedAt: z.ZodString;
150
+ }, z.core.$strict>>;
151
+ }, z.core.$strict>;
152
+ export type ListWorkspaceWebhooksResponse = z.infer<typeof ListWorkspaceWebhooksResponse>;
153
+ /** Organization webhooks fan out session events only; usage events are per-workspace. */
154
+ export declare const OrganizationWebhookEventType: z.ZodEnum<{
155
+ "session.humanInput.requested": "session.humanInput.requested";
156
+ "session.notification.posted": "session.notification.posted";
157
+ "session.notification.withdrawn": "session.notification.withdrawn";
158
+ "session.requiresAction": "session.requiresAction";
159
+ "session.status.changed": "session.status.changed";
160
+ "turn.cancelled": "turn.cancelled";
161
+ "turn.completed": "turn.completed";
162
+ "turn.failed": "turn.failed";
163
+ }>;
164
+ export type OrganizationWebhookEventType = z.infer<typeof OrganizationWebhookEventType>;
165
+ export declare const OrganizationWebhook: z.ZodObject<{
166
+ id: z.ZodString;
167
+ url: z.ZodString;
168
+ enabled: z.ZodBoolean;
169
+ description: z.ZodNullable<z.ZodString>;
170
+ createdAt: z.ZodString;
171
+ updatedAt: z.ZodString;
172
+ organizationId: z.ZodString;
173
+ eventTypes: z.ZodArray<z.ZodEnum<{
174
+ "session.humanInput.requested": "session.humanInput.requested";
175
+ "session.notification.posted": "session.notification.posted";
176
+ "session.notification.withdrawn": "session.notification.withdrawn";
177
+ "session.requiresAction": "session.requiresAction";
178
+ "session.status.changed": "session.status.changed";
179
+ "turn.cancelled": "turn.cancelled";
180
+ "turn.completed": "turn.completed";
181
+ "turn.failed": "turn.failed";
182
+ "usage.exhausted": "usage.exhausted";
183
+ "usage.period_reset": "usage.period_reset";
184
+ "usage.threshold_reached": "usage.threshold_reached";
185
+ }>>;
186
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
187
+ externalSource: z.ZodString;
188
+ }, z.core.$strict>>;
189
+ }, z.core.$strict>;
190
+ export type OrganizationWebhook = z.infer<typeof OrganizationWebhook>;
191
+ export declare const CreateOrganizationWebhookRequest: z.ZodObject<{
192
+ url: z.ZodString;
193
+ enabled: z.ZodOptional<z.ZodBoolean>;
194
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ eventTypes: z.ZodPipe<z.ZodArray<z.ZodEnum<{
196
+ "session.humanInput.requested": "session.humanInput.requested";
197
+ "session.notification.posted": "session.notification.posted";
198
+ "session.notification.withdrawn": "session.notification.withdrawn";
199
+ "session.requiresAction": "session.requiresAction";
200
+ "session.status.changed": "session.status.changed";
201
+ "turn.cancelled": "turn.cancelled";
202
+ "turn.completed": "turn.completed";
203
+ "turn.failed": "turn.failed";
204
+ "usage.exhausted": "usage.exhausted";
205
+ "usage.period_reset": "usage.period_reset";
206
+ "usage.threshold_reached": "usage.threshold_reached";
207
+ }>>, z.ZodTransform<("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[], ("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[]>>;
208
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
209
+ externalSource: z.ZodString;
210
+ }, z.core.$strict>>;
211
+ }, z.core.$strict>;
212
+ export type CreateOrganizationWebhookRequest = z.input<typeof CreateOrganizationWebhookRequest>;
213
+ export declare const UpdateOrganizationWebhookRequest: z.ZodObject<{
214
+ url: z.ZodOptional<z.ZodString>;
215
+ enabled: z.ZodOptional<z.ZodBoolean>;
216
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
+ eventTypes: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodEnum<{
218
+ "session.humanInput.requested": "session.humanInput.requested";
219
+ "session.notification.posted": "session.notification.posted";
220
+ "session.notification.withdrawn": "session.notification.withdrawn";
221
+ "session.requiresAction": "session.requiresAction";
222
+ "session.status.changed": "session.status.changed";
223
+ "turn.cancelled": "turn.cancelled";
224
+ "turn.completed": "turn.completed";
225
+ "turn.failed": "turn.failed";
226
+ "usage.exhausted": "usage.exhausted";
227
+ "usage.period_reset": "usage.period_reset";
228
+ "usage.threshold_reached": "usage.threshold_reached";
229
+ }>>, z.ZodTransform<("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[], ("session.humanInput.requested" | "session.notification.posted" | "session.notification.withdrawn" | "session.requiresAction" | "session.status.changed" | "turn.cancelled" | "turn.completed" | "turn.failed" | "usage.exhausted" | "usage.period_reset" | "usage.threshold_reached")[]>>>;
230
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
231
+ externalSource: z.ZodString;
232
+ }, z.core.$strict>>;
233
+ }, z.core.$strict>;
234
+ export type UpdateOrganizationWebhookRequest = z.input<typeof UpdateOrganizationWebhookRequest>;
235
+ export declare const CreateOrganizationWebhookResponse: z.ZodObject<{
236
+ webhook: z.ZodObject<{
237
+ id: z.ZodString;
238
+ url: z.ZodString;
239
+ enabled: z.ZodBoolean;
240
+ description: z.ZodNullable<z.ZodString>;
241
+ createdAt: z.ZodString;
242
+ updatedAt: z.ZodString;
243
+ organizationId: z.ZodString;
244
+ eventTypes: z.ZodArray<z.ZodEnum<{
245
+ "session.humanInput.requested": "session.humanInput.requested";
246
+ "session.notification.posted": "session.notification.posted";
247
+ "session.notification.withdrawn": "session.notification.withdrawn";
248
+ "session.requiresAction": "session.requiresAction";
249
+ "session.status.changed": "session.status.changed";
250
+ "turn.cancelled": "turn.cancelled";
251
+ "turn.completed": "turn.completed";
252
+ "turn.failed": "turn.failed";
253
+ "usage.exhausted": "usage.exhausted";
254
+ "usage.period_reset": "usage.period_reset";
255
+ "usage.threshold_reached": "usage.threshold_reached";
256
+ }>>;
257
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
258
+ externalSource: z.ZodString;
259
+ }, z.core.$strict>>;
260
+ }, z.core.$strict>;
261
+ secret: z.ZodString;
262
+ }, z.core.$strict>;
263
+ export type CreateOrganizationWebhookResponse = z.infer<typeof CreateOrganizationWebhookResponse>;
264
+ export declare const ListOrganizationWebhooksResponse: z.ZodObject<{
265
+ webhooks: z.ZodArray<z.ZodObject<{
266
+ id: z.ZodString;
267
+ url: z.ZodString;
268
+ enabled: z.ZodBoolean;
269
+ description: z.ZodNullable<z.ZodString>;
270
+ createdAt: z.ZodString;
271
+ updatedAt: z.ZodString;
272
+ organizationId: z.ZodString;
273
+ eventTypes: z.ZodArray<z.ZodEnum<{
274
+ "session.humanInput.requested": "session.humanInput.requested";
275
+ "session.notification.posted": "session.notification.posted";
276
+ "session.notification.withdrawn": "session.notification.withdrawn";
277
+ "session.requiresAction": "session.requiresAction";
278
+ "session.status.changed": "session.status.changed";
279
+ "turn.cancelled": "turn.cancelled";
280
+ "turn.completed": "turn.completed";
281
+ "turn.failed": "turn.failed";
282
+ "usage.exhausted": "usage.exhausted";
283
+ "usage.period_reset": "usage.period_reset";
284
+ "usage.threshold_reached": "usage.threshold_reached";
285
+ }>>;
286
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
287
+ externalSource: z.ZodString;
288
+ }, z.core.$strict>>;
289
+ }, z.core.$strict>>;
290
+ }, z.core.$strict>;
291
+ export type ListOrganizationWebhooksResponse = z.infer<typeof ListOrganizationWebhooksResponse>;
292
+ export declare const WorkspaceWebhookDeliveryStatus: z.ZodEnum<{
293
+ delivered: "delivered";
294
+ failed: "failed";
295
+ pending: "pending";
296
+ }>;
297
+ export type WorkspaceWebhookDeliveryStatus = z.infer<typeof WorkspaceWebhookDeliveryStatus>;
298
+ export declare const WorkspaceWebhookDelivery: z.ZodObject<{
299
+ id: z.ZodString;
300
+ webhookId: z.ZodString;
301
+ eventId: z.ZodString;
302
+ eventType: z.ZodString;
303
+ status: z.ZodEnum<{
304
+ delivered: "delivered";
305
+ failed: "failed";
306
+ pending: "pending";
307
+ }>;
308
+ attempts: z.ZodNumber;
309
+ lastStatus: z.ZodNullable<z.ZodNumber>;
310
+ lastError: z.ZodNullable<z.ZodString>;
311
+ nextAttemptAt: z.ZodNullable<z.ZodString>;
312
+ deliveredAt: z.ZodNullable<z.ZodString>;
313
+ failedAt: z.ZodNullable<z.ZodString>;
314
+ createdAt: z.ZodString;
315
+ }, z.core.$strict>;
316
+ export type WorkspaceWebhookDelivery = z.infer<typeof WorkspaceWebhookDelivery>;
317
+ export declare const ListWorkspaceWebhookDeliveriesResponse: z.ZodObject<{
318
+ deliveries: z.ZodArray<z.ZodObject<{
319
+ id: z.ZodString;
320
+ webhookId: z.ZodString;
321
+ eventId: z.ZodString;
322
+ eventType: z.ZodString;
323
+ status: z.ZodEnum<{
324
+ delivered: "delivered";
325
+ failed: "failed";
326
+ pending: "pending";
327
+ }>;
328
+ attempts: z.ZodNumber;
329
+ lastStatus: z.ZodNullable<z.ZodNumber>;
330
+ lastError: z.ZodNullable<z.ZodString>;
331
+ nextAttemptAt: z.ZodNullable<z.ZodString>;
332
+ deliveredAt: z.ZodNullable<z.ZodString>;
333
+ failedAt: z.ZodNullable<z.ZodString>;
334
+ createdAt: z.ZodString;
335
+ }, z.core.$strict>>;
336
+ }, z.core.$strict>;
337
+ export type ListWorkspaceWebhookDeliveriesResponse = z.infer<typeof ListWorkspaceWebhookDeliveriesResponse>;
338
+ export declare const OrganizationWebhookDelivery: z.ZodObject<{
339
+ id: z.ZodString;
340
+ webhookId: z.ZodString;
341
+ eventId: z.ZodString;
342
+ eventType: z.ZodString;
343
+ status: z.ZodEnum<{
344
+ delivered: "delivered";
345
+ failed: "failed";
346
+ pending: "pending";
347
+ }>;
348
+ attempts: z.ZodNumber;
349
+ lastStatus: z.ZodNullable<z.ZodNumber>;
350
+ lastError: z.ZodNullable<z.ZodString>;
351
+ nextAttemptAt: z.ZodNullable<z.ZodString>;
352
+ deliveredAt: z.ZodNullable<z.ZodString>;
353
+ failedAt: z.ZodNullable<z.ZodString>;
354
+ createdAt: z.ZodString;
355
+ }, z.core.$strict>;
356
+ export type OrganizationWebhookDelivery = z.infer<typeof OrganizationWebhookDelivery>;
357
+ export declare const ListOrganizationWebhookDeliveriesResponse: z.ZodObject<{
358
+ deliveries: z.ZodArray<z.ZodObject<{
359
+ id: z.ZodString;
360
+ webhookId: z.ZodString;
361
+ eventId: z.ZodString;
362
+ eventType: z.ZodString;
363
+ status: z.ZodEnum<{
364
+ delivered: "delivered";
365
+ failed: "failed";
366
+ pending: "pending";
367
+ }>;
368
+ attempts: z.ZodNumber;
369
+ lastStatus: z.ZodNullable<z.ZodNumber>;
370
+ lastError: z.ZodNullable<z.ZodString>;
371
+ nextAttemptAt: z.ZodNullable<z.ZodString>;
372
+ deliveredAt: z.ZodNullable<z.ZodString>;
373
+ failedAt: z.ZodNullable<z.ZodString>;
374
+ createdAt: z.ZodString;
375
+ }, z.core.$strict>>;
376
+ }, z.core.$strict>;
377
+ export type ListOrganizationWebhookDeliveriesResponse = z.infer<typeof ListOrganizationWebhookDeliveriesResponse>;
378
+ /**
379
+ * The body POSTed to a webhook endpoint. Lifecycle events identify what
380
+ * changed; notification events also include their bounded display content.
381
+ */
382
+ export declare const SessionWorkspaceWebhookEvent: z.ZodObject<{
383
+ lane: z.ZodDefault<z.ZodEnum<{
384
+ organization: "organization";
385
+ workspace: "workspace";
386
+ }>>;
387
+ id: z.ZodString;
388
+ type: z.ZodString;
389
+ workspaceId: z.ZodString;
390
+ workspace: z.ZodOptional<z.ZodObject<{
391
+ id: z.ZodString;
392
+ externalSource: z.ZodNullable<z.ZodString>;
393
+ externalId: z.ZodNullable<z.ZodString>;
394
+ }, z.core.$strip>>;
395
+ sessionId: z.ZodString;
396
+ turnId: z.ZodNullable<z.ZodString>;
397
+ sequence: z.ZodNumber;
398
+ occurredAt: z.ZodString;
399
+ initiatingHuman: z.ZodOptional<z.ZodNullable<z.ZodObject<{
400
+ subjectId: z.ZodString;
401
+ externalIdentity: z.ZodNullable<z.ZodObject<{
402
+ source: z.ZodString;
403
+ externalId: z.ZodString;
404
+ }, z.core.$strip>>;
405
+ }, z.core.$strip>>>;
406
+ data: z.ZodObject<{
407
+ status: z.ZodOptional<z.ZodString>;
408
+ reason: z.ZodOptional<z.ZodString>;
409
+ key: z.ZodOptional<z.ZodString>;
410
+ title: z.ZodOptional<z.ZodString>;
411
+ subtitle: z.ZodOptional<z.ZodString>;
412
+ body: z.ZodOptional<z.ZodString>;
413
+ facts: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
414
+ label: z.ZodString;
415
+ value: z.ZodString;
416
+ }, z.core.$strict>>>>;
417
+ link: z.ZodOptional<z.ZodLazy<z.ZodObject<{
418
+ url: z.ZodString;
419
+ label: z.ZodString;
420
+ }, z.core.$strict>>>;
421
+ urgency: z.ZodOptional<z.ZodLazy<z.ZodEnum<{
422
+ normal: "normal";
423
+ time_sensitive: "time_sensitive";
424
+ }>>>;
425
+ replaced: z.ZodOptional<z.ZodBoolean>;
426
+ recipientSubjectId: z.ZodOptional<z.ZodString>;
427
+ sender: z.ZodOptional<z.ZodObject<{
428
+ subjectId: z.ZodString;
429
+ label: z.ZodString;
430
+ }, z.core.$strip>>;
431
+ undeliveredReason: z.ZodOptional<z.ZodLazy<z.ZodEnum<{
432
+ no_human_recipient: "no_human_recipient";
433
+ }>>>;
434
+ }, z.core.$loose>;
435
+ }, z.core.$strip>;
436
+ export type SessionWorkspaceWebhookEvent = z.infer<typeof SessionWorkspaceWebhookEvent>;
437
+ /** Workspace allowance events have no synthetic session or turn identity.
438
+ * Optional null context fields let transport adapters share an envelope. */
439
+ export declare const WorkspaceUsageWebhookEvent: z.ZodObject<{
440
+ lane: z.ZodDefault<z.ZodLiteral<"workspace">>;
441
+ id: z.ZodString;
442
+ type: z.ZodEnum<{
443
+ "usage.exhausted": "usage.exhausted";
444
+ "usage.period_reset": "usage.period_reset";
445
+ "usage.threshold_reached": "usage.threshold_reached";
446
+ }>;
447
+ workspaceId: z.ZodString;
448
+ workspace: z.ZodOptional<z.ZodObject<{
449
+ id: z.ZodString;
450
+ externalSource: z.ZodNullable<z.ZodString>;
451
+ externalId: z.ZodNullable<z.ZodString>;
452
+ }, z.core.$strip>>;
453
+ sessionId: z.ZodOptional<z.ZodNull>;
454
+ turnId: z.ZodOptional<z.ZodNull>;
455
+ sequence: z.ZodOptional<z.ZodNumber>;
456
+ occurredAt: z.ZodString;
457
+ data: z.ZodObject<{
458
+ scope: z.ZodOptional<z.ZodEnum<{
459
+ member: "member";
460
+ workspace: "workspace";
461
+ }>>;
462
+ subjectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
463
+ threshold: z.ZodOptional<z.ZodNumber>;
464
+ fraction: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
465
+ resetsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
466
+ status: z.ZodOptional<z.ZodEnum<{
467
+ exhausted: "exhausted";
468
+ ok: "ok";
469
+ warning: "warning";
470
+ }>>;
471
+ period: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
472
+ start: z.ZodNullable<z.ZodString>;
473
+ end: z.ZodNullable<z.ZodString>;
474
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodLiteral<"current">, z.ZodString]>, z.ZodLiteral<"*">]>>;
475
+ }, z.core.$loose>;
476
+ }, z.core.$strip>;
477
+ export type WorkspaceUsageWebhookEvent = z.infer<typeof WorkspaceUsageWebhookEvent>;
478
+ /**
479
+ * "Send test event": proves the endpoint is reachable and verifies the
480
+ * signature. It names the workspace but no session, turn or sequence.
481
+ */
482
+ export declare const WorkspaceTestWebhookEvent: z.ZodObject<{
483
+ lane: z.ZodDefault<z.ZodEnum<{
484
+ organization: "organization";
485
+ workspace: "workspace";
486
+ }>>;
487
+ id: z.ZodString;
488
+ type: z.ZodLiteral<"webhook.test">;
489
+ workspaceId: z.ZodString;
490
+ workspace: z.ZodOptional<z.ZodObject<{
491
+ id: z.ZodString;
492
+ externalSource: z.ZodNullable<z.ZodString>;
493
+ externalId: z.ZodNullable<z.ZodString>;
494
+ }, z.core.$strip>>;
495
+ sessionId: z.ZodOptional<z.ZodNull>;
496
+ turnId: z.ZodOptional<z.ZodNull>;
497
+ occurredAt: z.ZodString;
498
+ data: z.ZodObject<{
499
+ webhookId: z.ZodOptional<z.ZodString>;
500
+ }, z.core.$loose>;
501
+ }, z.core.$strip>;
502
+ export type WorkspaceTestWebhookEvent = z.infer<typeof WorkspaceTestWebhookEvent>;
503
+ export declare const WorkspaceWebhookEvent: z.ZodUnion<readonly [z.ZodObject<{
504
+ lane: z.ZodDefault<z.ZodEnum<{
505
+ organization: "organization";
506
+ workspace: "workspace";
507
+ }>>;
508
+ id: z.ZodString;
509
+ type: z.ZodString;
510
+ workspaceId: z.ZodString;
511
+ workspace: z.ZodOptional<z.ZodObject<{
512
+ id: z.ZodString;
513
+ externalSource: z.ZodNullable<z.ZodString>;
514
+ externalId: z.ZodNullable<z.ZodString>;
515
+ }, z.core.$strip>>;
516
+ sessionId: z.ZodString;
517
+ turnId: z.ZodNullable<z.ZodString>;
518
+ sequence: z.ZodNumber;
519
+ occurredAt: z.ZodString;
520
+ initiatingHuman: z.ZodOptional<z.ZodNullable<z.ZodObject<{
521
+ subjectId: z.ZodString;
522
+ externalIdentity: z.ZodNullable<z.ZodObject<{
523
+ source: z.ZodString;
524
+ externalId: z.ZodString;
525
+ }, z.core.$strip>>;
526
+ }, z.core.$strip>>>;
527
+ data: z.ZodObject<{
528
+ status: z.ZodOptional<z.ZodString>;
529
+ reason: z.ZodOptional<z.ZodString>;
530
+ key: z.ZodOptional<z.ZodString>;
531
+ title: z.ZodOptional<z.ZodString>;
532
+ subtitle: z.ZodOptional<z.ZodString>;
533
+ body: z.ZodOptional<z.ZodString>;
534
+ facts: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
535
+ label: z.ZodString;
536
+ value: z.ZodString;
537
+ }, z.core.$strict>>>>;
538
+ link: z.ZodOptional<z.ZodLazy<z.ZodObject<{
539
+ url: z.ZodString;
540
+ label: z.ZodString;
541
+ }, z.core.$strict>>>;
542
+ urgency: z.ZodOptional<z.ZodLazy<z.ZodEnum<{
543
+ normal: "normal";
544
+ time_sensitive: "time_sensitive";
545
+ }>>>;
546
+ replaced: z.ZodOptional<z.ZodBoolean>;
547
+ recipientSubjectId: z.ZodOptional<z.ZodString>;
548
+ sender: z.ZodOptional<z.ZodObject<{
549
+ subjectId: z.ZodString;
550
+ label: z.ZodString;
551
+ }, z.core.$strip>>;
552
+ undeliveredReason: z.ZodOptional<z.ZodLazy<z.ZodEnum<{
553
+ no_human_recipient: "no_human_recipient";
554
+ }>>>;
555
+ }, z.core.$loose>;
556
+ }, z.core.$strip>, z.ZodObject<{
557
+ lane: z.ZodDefault<z.ZodLiteral<"workspace">>;
558
+ id: z.ZodString;
559
+ type: z.ZodEnum<{
560
+ "usage.exhausted": "usage.exhausted";
561
+ "usage.period_reset": "usage.period_reset";
562
+ "usage.threshold_reached": "usage.threshold_reached";
563
+ }>;
564
+ workspaceId: z.ZodString;
565
+ workspace: z.ZodOptional<z.ZodObject<{
566
+ id: z.ZodString;
567
+ externalSource: z.ZodNullable<z.ZodString>;
568
+ externalId: z.ZodNullable<z.ZodString>;
569
+ }, z.core.$strip>>;
570
+ sessionId: z.ZodOptional<z.ZodNull>;
571
+ turnId: z.ZodOptional<z.ZodNull>;
572
+ sequence: z.ZodOptional<z.ZodNumber>;
573
+ occurredAt: z.ZodString;
574
+ data: z.ZodObject<{
575
+ scope: z.ZodOptional<z.ZodEnum<{
576
+ member: "member";
577
+ workspace: "workspace";
578
+ }>>;
579
+ subjectId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
+ threshold: z.ZodOptional<z.ZodNumber>;
581
+ fraction: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
582
+ resetsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
583
+ status: z.ZodOptional<z.ZodEnum<{
584
+ exhausted: "exhausted";
585
+ ok: "ok";
586
+ warning: "warning";
587
+ }>>;
588
+ period: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
589
+ start: z.ZodNullable<z.ZodString>;
590
+ end: z.ZodNullable<z.ZodString>;
591
+ }, z.core.$strict>, z.ZodUnion<readonly [z.ZodLiteral<"current">, z.ZodString]>, z.ZodLiteral<"*">]>>;
592
+ }, z.core.$loose>;
593
+ }, z.core.$strip>, z.ZodObject<{
594
+ lane: z.ZodDefault<z.ZodEnum<{
595
+ organization: "organization";
596
+ workspace: "workspace";
597
+ }>>;
598
+ id: z.ZodString;
599
+ type: z.ZodLiteral<"webhook.test">;
600
+ workspaceId: z.ZodString;
601
+ workspace: z.ZodOptional<z.ZodObject<{
602
+ id: z.ZodString;
603
+ externalSource: z.ZodNullable<z.ZodString>;
604
+ externalId: z.ZodNullable<z.ZodString>;
605
+ }, z.core.$strip>>;
606
+ sessionId: z.ZodOptional<z.ZodNull>;
607
+ turnId: z.ZodOptional<z.ZodNull>;
608
+ occurredAt: z.ZodString;
609
+ data: z.ZodObject<{
610
+ webhookId: z.ZodOptional<z.ZodString>;
611
+ }, z.core.$loose>;
612
+ }, z.core.$strip>]>;
613
+ export type WorkspaceWebhookEvent = z.infer<typeof WorkspaceWebhookEvent>;
614
+ export declare const WorkspaceCredentialProvider: z.ZodObject<{
615
+ workspaceId: z.ZodString;
616
+ url: z.ZodString;
617
+ enabled: z.ZodBoolean;
618
+ timeoutMs: z.ZodNumber;
619
+ createdAt: z.ZodString;
620
+ updatedAt: z.ZodString;
621
+ }, z.core.$strict>;
622
+ export type WorkspaceCredentialProvider = z.infer<typeof WorkspaceCredentialProvider>;
623
+ export declare const PutWorkspaceCredentialProviderRequest: z.ZodObject<{
624
+ url: z.ZodString;
625
+ enabled: z.ZodOptional<z.ZodBoolean>;
626
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
627
+ }, z.core.$strict>;
628
+ export type PutWorkspaceCredentialProviderRequest = z.input<typeof PutWorkspaceCredentialProviderRequest>;
629
+ /** `secret` is present only when the provider was first created. */
630
+ export declare const PutWorkspaceCredentialProviderResponse: z.ZodObject<{
631
+ provider: z.ZodObject<{
632
+ workspaceId: z.ZodString;
633
+ url: z.ZodString;
634
+ enabled: z.ZodBoolean;
635
+ timeoutMs: z.ZodNumber;
636
+ createdAt: z.ZodString;
637
+ updatedAt: z.ZodString;
638
+ }, z.core.$strict>;
639
+ secret: z.ZodOptional<z.ZodString>;
640
+ }, z.core.$strict>;
641
+ export type PutWorkspaceCredentialProviderResponse = z.infer<typeof PutWorkspaceCredentialProviderResponse>;
642
+ export declare const GetWorkspaceCredentialProviderResponse: z.ZodObject<{
643
+ provider: z.ZodNullable<z.ZodObject<{
644
+ workspaceId: z.ZodString;
645
+ url: z.ZodString;
646
+ enabled: z.ZodBoolean;
647
+ timeoutMs: z.ZodNumber;
648
+ createdAt: z.ZodString;
649
+ updatedAt: z.ZodString;
650
+ }, z.core.$strict>>;
651
+ }, z.core.$strict>;
652
+ export type GetWorkspaceCredentialProviderResponse = z.infer<typeof GetWorkspaceCredentialProviderResponse>;
653
+ export declare const OrganizationCredentialProvider: z.ZodObject<{
654
+ url: z.ZodString;
655
+ enabled: z.ZodBoolean;
656
+ timeoutMs: z.ZodNumber;
657
+ createdAt: z.ZodString;
658
+ updatedAt: z.ZodString;
659
+ organizationId: z.ZodString;
660
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
661
+ externalSource: z.ZodString;
662
+ }, z.core.$strict>>;
663
+ }, z.core.$strict>;
664
+ export type OrganizationCredentialProvider = z.infer<typeof OrganizationCredentialProvider>;
665
+ export declare const PutOrganizationCredentialProviderRequest: z.ZodObject<{
666
+ url: z.ZodString;
667
+ enabled: z.ZodOptional<z.ZodBoolean>;
668
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
669
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
670
+ externalSource: z.ZodString;
671
+ }, z.core.$strict>>;
672
+ }, z.core.$strict>;
673
+ export type PutOrganizationCredentialProviderRequest = z.input<typeof PutOrganizationCredentialProviderRequest>;
674
+ export declare const PutOrganizationCredentialProviderResponse: z.ZodObject<{
675
+ provider: z.ZodObject<{
676
+ url: z.ZodString;
677
+ enabled: z.ZodBoolean;
678
+ timeoutMs: z.ZodNumber;
679
+ createdAt: z.ZodString;
680
+ updatedAt: z.ZodString;
681
+ organizationId: z.ZodString;
682
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
683
+ externalSource: z.ZodString;
684
+ }, z.core.$strict>>;
685
+ }, z.core.$strict>;
686
+ secret: z.ZodOptional<z.ZodString>;
687
+ }, z.core.$strict>;
688
+ export type PutOrganizationCredentialProviderResponse = z.infer<typeof PutOrganizationCredentialProviderResponse>;
689
+ export declare const GetOrganizationCredentialProviderResponse: z.ZodObject<{
690
+ provider: z.ZodNullable<z.ZodObject<{
691
+ url: z.ZodString;
692
+ enabled: z.ZodBoolean;
693
+ timeoutMs: z.ZodNumber;
694
+ createdAt: z.ZodString;
695
+ updatedAt: z.ZodString;
696
+ organizationId: z.ZodString;
697
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
698
+ externalSource: z.ZodString;
699
+ }, z.core.$strict>>;
700
+ }, z.core.$strict>>;
701
+ }, z.core.$strict>;
702
+ export type GetOrganizationCredentialProviderResponse = z.infer<typeof GetOrganizationCredentialProviderResponse>;
703
+ /** Exact accepted-turn provenance, never an authorization grant. */
704
+ export type CredentialProviderInitiatorContext = {
705
+ /** Agent delegation is identified by the newest frozen `via` hop. */
706
+ kind: "human" | "service" | "agent";
707
+ /** Full frozen causal identity, including an accepted service's display label. */
708
+ initiator: TurnInitiator;
709
+ /** Unmodified accepted context, including bounded `via` and coalesced `updateIds`. */
710
+ context: TurnInitiatorContext;
711
+ };
712
+ /** The body Opengeni POSTs to a workspace credential provider. */
713
+ export type CredentialProviderRequest = {
714
+ type: "credentials.request";
715
+ lane: "organization" | "workspace";
716
+ /** Selected session-attached remote targets; providers must authorize each exact URL. */
717
+ mcpServers: {
718
+ id: string;
719
+ url: string;
720
+ }[];
721
+ /**
722
+ * `test` comes from an administrator's "Test connection": it is not a run,
723
+ * so `sessionId`, `rootSessionId`, `turnId` and `attemptId` are the nil
724
+ * UUID. Answer it as you would a run in this workspace (Opengeni shows only
725
+ * the names of what you return, never the values), or `not_applicable`.
726
+ */
727
+ purpose: "provision" | "renewal" | "test";
728
+ forceRefresh: boolean;
729
+ accountId: string;
730
+ workspaceId: string;
731
+ sessionId: string;
732
+ rootSessionId: string;
733
+ parentSessionId: string | null;
734
+ turnId: string;
735
+ attemptId: string;
736
+ initiator: {
737
+ kind: string;
738
+ subjectId?: string;
739
+ };
740
+ /** Informational, signed with the body. Optional only for pre-upgrade senders. */
741
+ initiatorContext?: CredentialProviderInitiatorContext;
742
+ initiatingHumanSubjectId: string | null;
743
+ /** Informational, not authority. Optional only for pre-upgrade senders. */
744
+ initiatingHuman?: InitiatingHuman | null;
745
+ sandboxBackend: string;
746
+ sandboxOs: string;
747
+ };
748
+ /** Exact WHATWG normalization; IDs, URL credentials and fragments are never targets. */
749
+ export declare function normalizeCredentialProviderMcpUrl(value: string): string;
750
+ /** Secret, turn-local headers for one session-attached remote MCP, by normalized URL only. */
751
+ export declare const CredentialProviderMcpHeaders: z.ZodObject<{
752
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
753
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
754
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
755
+ }, z.core.$strict>;
756
+ export type CredentialProviderMcpHeaders = z.infer<typeof CredentialProviderMcpHeaders>;
757
+ export declare const CredentialProviderMcpMaterial: z.ZodArray<z.ZodObject<{
758
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
759
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
760
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
761
+ }, z.core.$strict>>;
762
+ export type CredentialProviderMcpMaterial = z.infer<typeof CredentialProviderMcpMaterial>;
763
+ /** What a credential provider returns. Scope echoes are added by Opengeni. */
764
+ export declare const CredentialProviderResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
765
+ status: z.ZodLiteral<"ok">;
766
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
767
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
768
+ path: z.ZodString;
769
+ content: z.ZodString;
770
+ mode: z.ZodOptional<z.ZodEnum<{
771
+ "0400": "0400";
772
+ "0600": "0600";
773
+ }>>;
774
+ }, z.core.$strip>>>;
775
+ fileEnvironment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
776
+ git: z.ZodOptional<z.ZodArray<z.ZodObject<{
777
+ host: z.ZodString;
778
+ username: z.ZodOptional<z.ZodString>;
779
+ password: z.ZodString;
780
+ }, z.core.$strip>>>;
781
+ mcp: z.ZodOptional<z.ZodArray<z.ZodObject<{
782
+ url: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
783
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
784
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
785
+ }, z.core.$strict>>>;
786
+ expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
787
+ authNeeded: z.ZodOptional<z.ZodArray<z.ZodObject<{
788
+ reason: z.ZodEnum<{
789
+ expired: "expired";
790
+ insufficient_scope: "insufficient_scope";
791
+ missing_connection: "missing_connection";
792
+ refresh_failed: "refresh_failed";
793
+ }>;
794
+ providerDomain: z.ZodOptional<z.ZodString>;
795
+ connectionId: z.ZodOptional<z.ZodString>;
796
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
797
+ resource: z.ZodOptional<z.ZodString>;
798
+ authorizationUrl: z.ZodOptional<z.ZodString>;
799
+ message: z.ZodOptional<z.ZodString>;
800
+ }, z.core.$strip>>>;
801
+ }, z.core.$strip>, z.ZodObject<{
802
+ status: z.ZodLiteral<"not_applicable">;
803
+ }, z.core.$strip>, z.ZodObject<{
804
+ status: z.ZodLiteral<"auth_needed">;
805
+ authNeeded: z.ZodArray<z.ZodObject<{
806
+ reason: z.ZodEnum<{
807
+ expired: "expired";
808
+ insufficient_scope: "insufficient_scope";
809
+ missing_connection: "missing_connection";
810
+ refresh_failed: "refresh_failed";
811
+ }>;
812
+ providerDomain: z.ZodOptional<z.ZodString>;
813
+ connectionId: z.ZodOptional<z.ZodString>;
814
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
815
+ resource: z.ZodOptional<z.ZodString>;
816
+ authorizationUrl: z.ZodOptional<z.ZodString>;
817
+ message: z.ZodOptional<z.ZodString>;
818
+ }, z.core.$strip>>;
819
+ }, z.core.$strip>], "status">;
820
+ export type CredentialProviderResponse = z.infer<typeof CredentialProviderResponse>;
821
+ /** Immediate signing-secret rotation; the new secret is returned once. */
822
+ export declare const RotateWorkspaceCredentialProviderSecretResponse: z.ZodObject<{
823
+ provider: z.ZodObject<{
824
+ workspaceId: z.ZodString;
825
+ url: z.ZodString;
826
+ enabled: z.ZodBoolean;
827
+ timeoutMs: z.ZodNumber;
828
+ createdAt: z.ZodString;
829
+ updatedAt: z.ZodString;
830
+ }, z.core.$strict>;
831
+ secret: z.ZodString;
832
+ }, z.core.$strict>;
833
+ export type RotateWorkspaceCredentialProviderSecretResponse = z.infer<typeof RotateWorkspaceCredentialProviderSecretResponse>;
834
+ export declare const RotateOrganizationCredentialProviderSecretResponse: z.ZodObject<{
835
+ provider: z.ZodObject<{
836
+ url: z.ZodString;
837
+ enabled: z.ZodBoolean;
838
+ timeoutMs: z.ZodNumber;
839
+ createdAt: z.ZodString;
840
+ updatedAt: z.ZodString;
841
+ organizationId: z.ZodString;
842
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
843
+ externalSource: z.ZodString;
844
+ }, z.core.$strict>>;
845
+ }, z.core.$strict>;
846
+ secret: z.ZodString;
847
+ }, z.core.$strict>;
848
+ export type RotateOrganizationCredentialProviderSecretResponse = z.infer<typeof RotateOrganizationCredentialProviderSecretResponse>;
849
+ export declare const RotateWorkspaceWebhookSecretResponse: z.ZodObject<{
850
+ webhook: z.ZodObject<{
851
+ id: z.ZodString;
852
+ workspaceId: z.ZodString;
853
+ url: z.ZodString;
854
+ eventTypes: z.ZodArray<z.ZodEnum<{
855
+ "session.humanInput.requested": "session.humanInput.requested";
856
+ "session.notification.posted": "session.notification.posted";
857
+ "session.notification.withdrawn": "session.notification.withdrawn";
858
+ "session.requiresAction": "session.requiresAction";
859
+ "session.status.changed": "session.status.changed";
860
+ "turn.cancelled": "turn.cancelled";
861
+ "turn.completed": "turn.completed";
862
+ "turn.failed": "turn.failed";
863
+ "usage.exhausted": "usage.exhausted";
864
+ "usage.period_reset": "usage.period_reset";
865
+ "usage.threshold_reached": "usage.threshold_reached";
866
+ }>>;
867
+ enabled: z.ZodBoolean;
868
+ description: z.ZodNullable<z.ZodString>;
869
+ createdAt: z.ZodString;
870
+ updatedAt: z.ZodString;
871
+ }, z.core.$strict>;
872
+ secret: z.ZodString;
873
+ }, z.core.$strict>;
874
+ export type RotateWorkspaceWebhookSecretResponse = z.infer<typeof RotateWorkspaceWebhookSecretResponse>;
875
+ export declare const RotateOrganizationWebhookSecretResponse: z.ZodObject<{
876
+ webhook: z.ZodObject<{
877
+ id: z.ZodString;
878
+ url: z.ZodString;
879
+ enabled: z.ZodBoolean;
880
+ description: z.ZodNullable<z.ZodString>;
881
+ createdAt: z.ZodString;
882
+ updatedAt: z.ZodString;
883
+ organizationId: z.ZodString;
884
+ eventTypes: z.ZodArray<z.ZodEnum<{
885
+ "session.humanInput.requested": "session.humanInput.requested";
886
+ "session.notification.posted": "session.notification.posted";
887
+ "session.notification.withdrawn": "session.notification.withdrawn";
888
+ "session.requiresAction": "session.requiresAction";
889
+ "session.status.changed": "session.status.changed";
890
+ "turn.cancelled": "turn.cancelled";
891
+ "turn.completed": "turn.completed";
892
+ "turn.failed": "turn.failed";
893
+ "usage.exhausted": "usage.exhausted";
894
+ "usage.period_reset": "usage.period_reset";
895
+ "usage.threshold_reached": "usage.threshold_reached";
896
+ }>>;
897
+ workspaceFilter: z.ZodNullable<z.ZodObject<{
898
+ externalSource: z.ZodString;
899
+ }, z.core.$strict>>;
900
+ }, z.core.$strict>;
901
+ secret: z.ZodString;
902
+ }, z.core.$strict>;
903
+ export type RotateOrganizationWebhookSecretResponse = z.infer<typeof RotateOrganizationWebhookSecretResponse>;
904
+ /**
905
+ * The outcome of one test request to a webhook or credential-provider
906
+ * endpoint. Nothing is stored: the request is sent once, synchronously.
907
+ * Credential values never appear; `credentials` names what a run would get.
908
+ */
909
+ export declare const IntegrationEndpointTestResult: z.ZodObject<{
910
+ ok: z.ZodBoolean;
911
+ status: z.ZodNullable<z.ZodNumber>;
912
+ durationMs: z.ZodNumber;
913
+ error: z.ZodNullable<z.ZodString>;
914
+ request: z.ZodString;
915
+ responseBody: z.ZodNullable<z.ZodString>;
916
+ credentials: z.ZodNullable<z.ZodObject<{
917
+ status: z.ZodEnum<{
918
+ auth_needed: "auth_needed";
919
+ not_applicable: "not_applicable";
920
+ ok: "ok";
921
+ }>;
922
+ environment: z.ZodArray<z.ZodString>;
923
+ files: z.ZodArray<z.ZodString>;
924
+ git: z.ZodArray<z.ZodString>;
925
+ mcp: z.ZodArray<z.ZodString>;
926
+ expiresAt: z.ZodNullable<z.ZodString>;
927
+ authNeeded: z.ZodArray<z.ZodObject<{
928
+ reason: z.ZodString;
929
+ providerDomain: z.ZodNullable<z.ZodString>;
930
+ message: z.ZodNullable<z.ZodString>;
931
+ }, z.core.$strip>>;
932
+ }, z.core.$strict>>;
933
+ }, z.core.$strict>;
934
+ export type IntegrationEndpointTestResult = z.infer<typeof IntegrationEndpointTestResult>;
935
+ export declare const TestWorkspaceWebhookResponse: z.ZodObject<{
936
+ result: z.ZodObject<{
937
+ ok: z.ZodBoolean;
938
+ status: z.ZodNullable<z.ZodNumber>;
939
+ durationMs: z.ZodNumber;
940
+ error: z.ZodNullable<z.ZodString>;
941
+ request: z.ZodString;
942
+ responseBody: z.ZodNullable<z.ZodString>;
943
+ credentials: z.ZodNullable<z.ZodObject<{
944
+ status: z.ZodEnum<{
945
+ auth_needed: "auth_needed";
946
+ not_applicable: "not_applicable";
947
+ ok: "ok";
948
+ }>;
949
+ environment: z.ZodArray<z.ZodString>;
950
+ files: z.ZodArray<z.ZodString>;
951
+ git: z.ZodArray<z.ZodString>;
952
+ mcp: z.ZodArray<z.ZodString>;
953
+ expiresAt: z.ZodNullable<z.ZodString>;
954
+ authNeeded: z.ZodArray<z.ZodObject<{
955
+ reason: z.ZodString;
956
+ providerDomain: z.ZodNullable<z.ZodString>;
957
+ message: z.ZodNullable<z.ZodString>;
958
+ }, z.core.$strip>>;
959
+ }, z.core.$strict>>;
960
+ }, z.core.$strict>;
961
+ }, z.core.$strict>;
962
+ export type TestWorkspaceWebhookResponse = z.infer<typeof TestWorkspaceWebhookResponse>;
963
+ /** Tests the provider runs in this workspace would use: its own, else the organization's. */
964
+ export declare const TestWorkspaceCredentialProviderResponse: z.ZodObject<{
965
+ lane: z.ZodEnum<{
966
+ organization: "organization";
967
+ workspace: "workspace";
968
+ }>;
969
+ url: z.ZodString;
970
+ result: z.ZodObject<{
971
+ ok: z.ZodBoolean;
972
+ status: z.ZodNullable<z.ZodNumber>;
973
+ durationMs: z.ZodNumber;
974
+ error: z.ZodNullable<z.ZodString>;
975
+ request: z.ZodString;
976
+ responseBody: z.ZodNullable<z.ZodString>;
977
+ credentials: z.ZodNullable<z.ZodObject<{
978
+ status: z.ZodEnum<{
979
+ auth_needed: "auth_needed";
980
+ not_applicable: "not_applicable";
981
+ ok: "ok";
982
+ }>;
983
+ environment: z.ZodArray<z.ZodString>;
984
+ files: z.ZodArray<z.ZodString>;
985
+ git: z.ZodArray<z.ZodString>;
986
+ mcp: z.ZodArray<z.ZodString>;
987
+ expiresAt: z.ZodNullable<z.ZodString>;
988
+ authNeeded: z.ZodArray<z.ZodObject<{
989
+ reason: z.ZodString;
990
+ providerDomain: z.ZodNullable<z.ZodString>;
991
+ message: z.ZodNullable<z.ZodString>;
992
+ }, z.core.$strip>>;
993
+ }, z.core.$strict>>;
994
+ }, z.core.$strict>;
995
+ }, z.core.$strict>;
996
+ export type TestWorkspaceCredentialProviderResponse = z.infer<typeof TestWorkspaceCredentialProviderResponse>;
997
+ /**
998
+ * Organization registrations that apply to one workspace, for workspace
999
+ * administrators: an enabled organization provider whose filter matches
1000
+ * (even when this workspace overrides it) and the enabled organization
1001
+ * webhooks that also receive this workspace's events. Never secrets.
1002
+ */
1003
+ export declare const WorkspaceInheritedIntegrationsResponse: z.ZodObject<{
1004
+ credentialProvider: z.ZodNullable<z.ZodObject<{
1005
+ url: z.ZodString;
1006
+ timeoutMs: z.ZodNumber;
1007
+ updatedAt: z.ZodString;
1008
+ }, z.core.$strict>>;
1009
+ webhooks: z.ZodArray<z.ZodObject<{
1010
+ id: z.ZodString;
1011
+ url: z.ZodString;
1012
+ eventTypes: z.ZodArray<z.ZodEnum<{
1013
+ "session.humanInput.requested": "session.humanInput.requested";
1014
+ "session.notification.posted": "session.notification.posted";
1015
+ "session.notification.withdrawn": "session.notification.withdrawn";
1016
+ "session.requiresAction": "session.requiresAction";
1017
+ "session.status.changed": "session.status.changed";
1018
+ "turn.cancelled": "turn.cancelled";
1019
+ "turn.completed": "turn.completed";
1020
+ "turn.failed": "turn.failed";
1021
+ "usage.exhausted": "usage.exhausted";
1022
+ "usage.period_reset": "usage.period_reset";
1023
+ "usage.threshold_reached": "usage.threshold_reached";
1024
+ }>>;
1025
+ description: z.ZodNullable<z.ZodString>;
1026
+ }, z.core.$strict>>;
1027
+ }, z.core.$strict>;
1028
+ export type WorkspaceInheritedIntegrationsResponse = z.infer<typeof WorkspaceInheritedIntegrationsResponse>;