@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,778 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Published Sites: a workspace Site served on its own hostname under a
4
+ * configurable Sites domain (production `opengeni.site`, staging a separate
5
+ * domain). Shared by the API, the Site gateway Worker, the console and the
6
+ * SDK. See docs/design/published-sites-2026-10-14.md.
7
+ *
8
+ * Nothing here names a concrete domain: every domain is configuration.
9
+ */
10
+ export declare const SITE_HOSTNAME_LABEL_MIN = 3;
11
+ export declare const SITE_HOSTNAME_LABEL_MAX = 63;
12
+ /** A released hostname stays reserved to its workspace for at least this long. */
13
+ export declare const SITE_HOSTNAME_RELEASE_HOLD_DAYS = 30;
14
+ /** Labels no Site may take: platform, mail, auth and infrastructure names. */
15
+ export declare const SITE_RESERVED_HOSTNAME_LABELS: readonly string[];
16
+ /**
17
+ * Words that make a hostname look like a credential, payment or brand page.
18
+ * A label containing any of them is refused (substring match on the label
19
+ * with hyphens removed), whoever asks.
20
+ */
21
+ export declare const SITE_BLOCKED_HOSTNAME_WORDS: readonly string[];
22
+ export type SiteHostnameLabelProblem = "length" | "characters" | "hyphen" | "punycode" | "reserved" | "blocked";
23
+ export declare const SITE_HOSTNAME_PROBLEM_MESSAGES: Readonly<Record<SiteHostnameLabelProblem, string>>;
24
+ /**
25
+ * Validate one DNS label for a Site hostname. Pure and environment-neutral:
26
+ * the API, the gateway and the console all call it. Availability (global
27
+ * uniqueness and the release hold) is decided only by the API.
28
+ */
29
+ export declare function siteHostnameLabelProblem(label: string): SiteHostnameLabelProblem | null;
30
+ export declare const SiteHostnameLabel: z.ZodString;
31
+ export type SiteHostnameLabel = z.infer<typeof SiteHostnameLabel>;
32
+ /**
33
+ * Suggest a default label from a Site title: a slug plus a random
34
+ * four-character suffix (`team-dashboard-4k9x`), always valid by
35
+ * construction. `suffix` must be 4 chars of [a-z0-9]; callers supply it so
36
+ * this stays pure.
37
+ */
38
+ export declare function suggestSiteHostnameLabel(title: string, suffix: string): string;
39
+ /** Normalize a configured Sites domain (`opengeni.site`); throws when it is not a hostname. */
40
+ export declare function normalizeSitesDomain(domain: string): string;
41
+ /** `<label>.<domain>` for a valid label and configured domain. */
42
+ export declare function siteHostname(label: string, sitesDomain: string): string;
43
+ /**
44
+ * The label of a flat one-level Site hostname under the Sites domain, or null
45
+ * for the apex, deeper names, other domains and invalid labels. A port and a
46
+ * trailing dot are ignored.
47
+ */
48
+ export declare function parseSiteHostname(host: string, sitesDomain: string): string | null;
49
+ /**
50
+ * Who may open a published Site.
51
+ * - members: signed-in members of the Site's workspace.
52
+ * - invited: members plus people invited by email (they sign in to OpenGeni).
53
+ * - public: anyone; anonymous visitors use a guest principal. On deployments
54
+ * configured login-only (staging), public means any signed-in Opengeni user.
55
+ */
56
+ export declare const SiteAccessMode: z.ZodEnum<{
57
+ invited: "invited";
58
+ members: "members";
59
+ public: "public";
60
+ }>;
61
+ export type SiteAccessMode = z.infer<typeof SiteAccessMode>;
62
+ /**
63
+ * active: served. unpublished: the owner turned publishing off (the hostname
64
+ * stays held). suspended: taken down by the owner, a workspace admin or a
65
+ * platform moderator; the gateway serves a takedown page.
66
+ */
67
+ export declare const SitePublicationStatus: z.ZodEnum<{
68
+ active: "active";
69
+ suspended: "suspended";
70
+ unpublished: "unpublished";
71
+ }>;
72
+ export type SitePublicationStatus = z.infer<typeof SitePublicationStatus>;
73
+ export declare const SiteLimitProfileKind: z.ZodEnum<{
74
+ credits: "credits";
75
+ custom: "custom";
76
+ free: "free";
77
+ standard: "standard";
78
+ unlimited: "unlimited";
79
+ }>;
80
+ export type SiteLimitProfileKind = z.infer<typeof SiteLimitProfileKind>;
81
+ /**
82
+ * Effective limits for a published Site. Money is in micro-USD
83
+ * (1_000_000 = $1). They apply to people outside the workspace only
84
+ * (invited people and public visitors, signed in or anonymous); workspace
85
+ * members are never limited by them and use the workspace's normal session
86
+ * limits, on any Site. Cloudflare cannot cap spend, so the edge applies only
87
+ * flood brakes; Opengeni enforces these values.
88
+ */
89
+ export declare const SiteLimits: z.ZodObject<{
90
+ requestsPerMinutePerVisitor: z.ZodNullable<z.ZodNumber>;
91
+ guestWritesPerMinute: z.ZodNullable<z.ZodNumber>;
92
+ agentsEnabled: z.ZodBoolean;
93
+ guestAgentsEnabled: z.ZodBoolean;
94
+ conversationsPerVisitorPerDay: z.ZodNullable<z.ZodNumber>;
95
+ conversationsPerSitePerDay: z.ZodNullable<z.ZodNumber>;
96
+ turnsPerConversation: z.ZodNullable<z.ZodNumber>;
97
+ agentMicrosPerConversation: z.ZodNullable<z.ZodNumber>;
98
+ agentMicrosPerVisitorPerDay: z.ZodNullable<z.ZodNumber>;
99
+ agentMicrosPerVisitorPerMonth: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
100
+ agentMicrosPerSitePerDay: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
101
+ agentMicrosPerSitePerMonth: z.ZodNullable<z.ZodNumber>;
102
+ agentModels: z.ZodNullable<z.ZodArray<z.ZodString>>;
103
+ }, z.core.$strip>;
104
+ export type SiteLimits = z.infer<typeof SiteLimits>;
105
+ /**
106
+ * The standard limits: $10 per Site per month for everyone outside the
107
+ * workspace together, no per-person limit, and internal bot guards for
108
+ * anonymous guests (conversation and message counts are not shown to Site
109
+ * owners). Deployments override them through settings.
110
+ */
111
+ export declare const DEFAULT_SITE_LIMITS: Readonly<SiteLimits>;
112
+ /** @deprecated The former `free` profile; now the standard limits (DEFAULT_SITE_LIMITS). */
113
+ export declare const DEFAULT_FREE_SITE_LIMITS: Readonly<SiteLimits>;
114
+ /** Hard caps that still apply under every profile, unlimited included. */
115
+ export declare const UNLIMITED_SITE_FLOOD_BRAKES: Readonly<{
116
+ requestsPerMinutePerVisitor: 600;
117
+ conversationsPerSitePerDay: 10000;
118
+ agentMicrosPerConversation: 5000000;
119
+ }>;
120
+ export declare const SiteLimitProfile: z.ZodObject<{
121
+ kind: z.ZodEnum<{
122
+ credits: "credits";
123
+ custom: "custom";
124
+ free: "free";
125
+ standard: "standard";
126
+ unlimited: "unlimited";
127
+ }>;
128
+ overrides: z.ZodDefault<z.ZodNullable<z.ZodObject<{
129
+ requestsPerMinutePerVisitor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
130
+ guestWritesPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
131
+ agentsEnabled: z.ZodOptional<z.ZodBoolean>;
132
+ guestAgentsEnabled: z.ZodOptional<z.ZodBoolean>;
133
+ conversationsPerVisitorPerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
134
+ conversationsPerSitePerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
135
+ turnsPerConversation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
136
+ agentMicrosPerConversation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
137
+ agentMicrosPerVisitorPerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
138
+ agentMicrosPerVisitorPerMonth: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
139
+ agentMicrosPerSitePerDay: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
140
+ agentMicrosPerSitePerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
141
+ agentModels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
142
+ }, z.core.$strip>>>;
143
+ }, z.core.$strip>;
144
+ export type SiteLimitProfile = z.infer<typeof SiteLimitProfile>;
145
+ export declare const SiteEmbeddedAgent: z.ZodObject<{
146
+ enabled: z.ZodBoolean;
147
+ model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
148
+ instructions: z.ZodDefault<z.ZodNullable<z.ZodString>>;
149
+ tools: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
150
+ guestTools: z.ZodDefault<z.ZodBoolean>;
151
+ }, z.core.$strip>;
152
+ export type SiteEmbeddedAgent = z.infer<typeof SiteEmbeddedAgent>;
153
+ /** Changes to the embedded agent; omitted fields keep their current value. */
154
+ export declare const SiteEmbeddedAgentChanges: z.ZodObject<{
155
+ enabled: z.ZodOptional<z.ZodBoolean>;
156
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
157
+ instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
158
+ tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
159
+ guestTools: z.ZodOptional<z.ZodBoolean>;
160
+ }, z.core.$strip>;
161
+ export type SiteEmbeddedAgentChanges = z.infer<typeof SiteEmbeddedAgentChanges>;
162
+ /** A safe one-click fix for a readiness warning (applied through the ordinary APIs). */
163
+ export declare const SitePublishWarningFix: z.ZodDiscriminatedUnion<[z.ZodObject<{
164
+ kind: z.ZodLiteral<"site_data_guest_access">;
165
+ collection: z.ZodString;
166
+ guestAccess: z.ZodEnum<{
167
+ append: "append";
168
+ own: "own";
169
+ read: "read";
170
+ }>;
171
+ }, z.core.$strip>, z.ZodObject<{
172
+ kind: z.ZodLiteral<"site_sql_query_audience">;
173
+ query: z.ZodString;
174
+ audience: z.ZodEnum<{
175
+ everyone: "everyone";
176
+ signed_in: "signed_in";
177
+ }>;
178
+ }, z.core.$strip>], "kind">;
179
+ export type SitePublishWarningFix = z.infer<typeof SitePublishWarningFix>;
180
+ export declare const SITE_PUBLISH_WARNING_CODES: readonly ["workspace_tools_members_only", "agent_tools_members_only", "site_data_guest_read", "site_data_guest_write", "site_data_members_write", "site_sql_query_signed_in", "site_sql_query_managers",
181
+ /** No longer reported (the fallback shows as outsideAgentModel); kept for compatibility. */
182
+ "agent_model_outside_fallback", "agent_model_outside_unavailable",
183
+ /** The page was too large to read, so what it uses was not checked. */
184
+ "page_not_checked"];
185
+ /**
186
+ * Something the published version uses that its audience may not do. Found
187
+ * by a conservative static reading of the page source and the Site's
188
+ * declared tools, collections and queries (docs/published-sites.md).
189
+ */
190
+ export declare const SitePublishWarning: z.ZodObject<{
191
+ code: z.ZodEnum<{
192
+ agent_model_outside_fallback: "agent_model_outside_fallback";
193
+ agent_model_outside_unavailable: "agent_model_outside_unavailable";
194
+ agent_tools_members_only: "agent_tools_members_only";
195
+ page_not_checked: "page_not_checked";
196
+ site_data_guest_read: "site_data_guest_read";
197
+ site_data_guest_write: "site_data_guest_write";
198
+ site_data_members_write: "site_data_members_write";
199
+ site_sql_query_managers: "site_sql_query_managers";
200
+ site_sql_query_signed_in: "site_sql_query_signed_in";
201
+ workspace_tools_members_only: "workspace_tools_members_only";
202
+ }>;
203
+ message: z.ZodString;
204
+ suggestion: z.ZodString;
205
+ fix: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
206
+ kind: z.ZodLiteral<"site_data_guest_access">;
207
+ collection: z.ZodString;
208
+ guestAccess: z.ZodEnum<{
209
+ append: "append";
210
+ own: "own";
211
+ read: "read";
212
+ }>;
213
+ }, z.core.$strip>, z.ZodObject<{
214
+ kind: z.ZodLiteral<"site_sql_query_audience">;
215
+ query: z.ZodString;
216
+ audience: z.ZodEnum<{
217
+ everyone: "everyone";
218
+ signed_in: "signed_in";
219
+ }>;
220
+ }, z.core.$strip>], "kind">>>;
221
+ }, z.core.$strip>;
222
+ export type SitePublishWarning = z.infer<typeof SitePublishWarning>;
223
+ export declare const SitePublication: z.ZodObject<{
224
+ siteId: z.ZodString;
225
+ workspaceId: z.ZodString;
226
+ label: z.ZodString;
227
+ hostname: z.ZodString;
228
+ url: z.ZodString;
229
+ access: z.ZodEnum<{
230
+ invited: "invited";
231
+ members: "members";
232
+ public: "public";
233
+ }>;
234
+ status: z.ZodEnum<{
235
+ active: "active";
236
+ suspended: "suspended";
237
+ unpublished: "unpublished";
238
+ }>;
239
+ noindex: z.ZodBoolean;
240
+ agent: z.ZodObject<{
241
+ enabled: z.ZodBoolean;
242
+ model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
243
+ instructions: z.ZodDefault<z.ZodNullable<z.ZodString>>;
244
+ tools: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString>>>;
245
+ guestTools: z.ZodDefault<z.ZodBoolean>;
246
+ }, z.core.$strip>;
247
+ limitProfile: z.ZodObject<{
248
+ kind: z.ZodEnum<{
249
+ credits: "credits";
250
+ custom: "custom";
251
+ free: "free";
252
+ standard: "standard";
253
+ unlimited: "unlimited";
254
+ }>;
255
+ overrides: z.ZodDefault<z.ZodNullable<z.ZodObject<{
256
+ requestsPerMinutePerVisitor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
257
+ guestWritesPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
258
+ agentsEnabled: z.ZodOptional<z.ZodBoolean>;
259
+ guestAgentsEnabled: z.ZodOptional<z.ZodBoolean>;
260
+ conversationsPerVisitorPerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
261
+ conversationsPerSitePerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
262
+ turnsPerConversation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
263
+ agentMicrosPerConversation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
264
+ agentMicrosPerVisitorPerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
265
+ agentMicrosPerVisitorPerMonth: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
266
+ agentMicrosPerSitePerDay: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
267
+ agentMicrosPerSitePerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
268
+ agentModels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
269
+ }, z.core.$strip>>>;
270
+ }, z.core.$strip>;
271
+ effectiveLimits: z.ZodObject<{
272
+ requestsPerMinutePerVisitor: z.ZodNullable<z.ZodNumber>;
273
+ guestWritesPerMinute: z.ZodNullable<z.ZodNumber>;
274
+ agentsEnabled: z.ZodBoolean;
275
+ guestAgentsEnabled: z.ZodBoolean;
276
+ conversationsPerVisitorPerDay: z.ZodNullable<z.ZodNumber>;
277
+ conversationsPerSitePerDay: z.ZodNullable<z.ZodNumber>;
278
+ turnsPerConversation: z.ZodNullable<z.ZodNumber>;
279
+ agentMicrosPerConversation: z.ZodNullable<z.ZodNumber>;
280
+ agentMicrosPerVisitorPerDay: z.ZodNullable<z.ZodNumber>;
281
+ agentMicrosPerVisitorPerMonth: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
282
+ agentMicrosPerSitePerDay: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
283
+ agentMicrosPerSitePerMonth: z.ZodNullable<z.ZodNumber>;
284
+ agentModels: z.ZodNullable<z.ZodArray<z.ZodString>>;
285
+ }, z.core.$strip>;
286
+ invitedEmails: z.ZodArray<z.ZodString>;
287
+ moderation: z.ZodObject<{
288
+ openReports: z.ZodNumber;
289
+ suspendedAt: z.ZodNullable<z.ZodString>;
290
+ suspendedBy: z.ZodNullable<z.ZodEnum<{
291
+ admin: "admin";
292
+ owner: "owner";
293
+ platform: "platform";
294
+ }>>;
295
+ suspendedReason: z.ZodNullable<z.ZodString>;
296
+ }, z.core.$strip>;
297
+ usage: z.ZodObject<{
298
+ agentMicrosThisMonth: z.ZodNumber;
299
+ agentMicrosToday: z.ZodDefault<z.ZodNumber>;
300
+ conversationsToday: z.ZodNumber;
301
+ }, z.core.$strip>;
302
+ warnings: z.ZodDefault<z.ZodArray<z.ZodObject<{
303
+ code: z.ZodEnum<{
304
+ agent_model_outside_fallback: "agent_model_outside_fallback";
305
+ agent_model_outside_unavailable: "agent_model_outside_unavailable";
306
+ agent_tools_members_only: "agent_tools_members_only";
307
+ page_not_checked: "page_not_checked";
308
+ site_data_guest_read: "site_data_guest_read";
309
+ site_data_guest_write: "site_data_guest_write";
310
+ site_data_members_write: "site_data_members_write";
311
+ site_sql_query_managers: "site_sql_query_managers";
312
+ site_sql_query_signed_in: "site_sql_query_signed_in";
313
+ workspace_tools_members_only: "workspace_tools_members_only";
314
+ }>;
315
+ message: z.ZodString;
316
+ suggestion: z.ZodString;
317
+ fix: z.ZodDefault<z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
318
+ kind: z.ZodLiteral<"site_data_guest_access">;
319
+ collection: z.ZodString;
320
+ guestAccess: z.ZodEnum<{
321
+ append: "append";
322
+ own: "own";
323
+ read: "read";
324
+ }>;
325
+ }, z.core.$strip>, z.ZodObject<{
326
+ kind: z.ZodLiteral<"site_sql_query_audience">;
327
+ query: z.ZodString;
328
+ audience: z.ZodEnum<{
329
+ everyone: "everyone";
330
+ signed_in: "signed_in";
331
+ }>;
332
+ }, z.core.$strip>], "kind">>>;
333
+ }, z.core.$strip>>>;
334
+ outsideAgentModel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
335
+ createdAt: z.ZodString;
336
+ updatedAt: z.ZodString;
337
+ }, z.core.$strip>;
338
+ export type SitePublication = z.infer<typeof SitePublication>;
339
+ /** PUT /v1/workspaces/:ws/published-artifacts/:siteId/publication */
340
+ export declare const UpsertSitePublicationRequest: z.ZodObject<{
341
+ label: z.ZodOptional<z.ZodString>;
342
+ access: z.ZodOptional<z.ZodEnum<{
343
+ invited: "invited";
344
+ members: "members";
345
+ public: "public";
346
+ }>>;
347
+ status: z.ZodOptional<z.ZodEnum<{
348
+ active: "active";
349
+ unpublished: "unpublished";
350
+ }>>;
351
+ noindex: z.ZodOptional<z.ZodBoolean>;
352
+ agent: z.ZodOptional<z.ZodObject<{
353
+ enabled: z.ZodOptional<z.ZodBoolean>;
354
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
355
+ instructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
356
+ tools: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
357
+ guestTools: z.ZodOptional<z.ZodBoolean>;
358
+ }, z.core.$strip>>;
359
+ limitProfile: z.ZodOptional<z.ZodObject<{
360
+ kind: z.ZodEnum<{
361
+ credits: "credits";
362
+ custom: "custom";
363
+ free: "free";
364
+ standard: "standard";
365
+ unlimited: "unlimited";
366
+ }>;
367
+ overrides: z.ZodDefault<z.ZodNullable<z.ZodObject<{
368
+ requestsPerMinutePerVisitor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
369
+ guestWritesPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
370
+ agentsEnabled: z.ZodOptional<z.ZodBoolean>;
371
+ guestAgentsEnabled: z.ZodOptional<z.ZodBoolean>;
372
+ conversationsPerVisitorPerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
373
+ conversationsPerSitePerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
374
+ turnsPerConversation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
375
+ agentMicrosPerConversation: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
376
+ agentMicrosPerVisitorPerDay: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
377
+ agentMicrosPerVisitorPerMonth: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
378
+ agentMicrosPerSitePerDay: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
379
+ agentMicrosPerSitePerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
380
+ agentModels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
381
+ }, z.core.$strip>>>;
382
+ }, z.core.$strip>>;
383
+ invitedEmails: z.ZodOptional<z.ZodArray<z.ZodString>>;
384
+ }, z.core.$strip>;
385
+ export type UpsertSitePublicationRequest = z.infer<typeof UpsertSitePublicationRequest>;
386
+ export declare const SiteHostnameAvailabilityProblem: z.ZodEnum<{
387
+ blocked: "blocked";
388
+ characters: "characters";
389
+ held: "held";
390
+ hyphen: "hyphen";
391
+ length: "length";
392
+ punycode: "punycode";
393
+ reserved: "reserved";
394
+ taken: "taken";
395
+ }>;
396
+ export type SiteHostnameAvailabilityProblem = z.infer<typeof SiteHostnameAvailabilityProblem>;
397
+ /** GET /v1/workspaces/:ws/site-hostnames/:label */
398
+ export declare const SiteHostnameAvailability: z.ZodObject<{
399
+ label: z.ZodString;
400
+ hostname: z.ZodNullable<z.ZodString>;
401
+ available: z.ZodBoolean;
402
+ problem: z.ZodNullable<z.ZodEnum<{
403
+ blocked: "blocked";
404
+ characters: "characters";
405
+ held: "held";
406
+ hyphen: "hyphen";
407
+ length: "length";
408
+ punycode: "punycode";
409
+ reserved: "reserved";
410
+ taken: "taken";
411
+ }>>;
412
+ message: z.ZodNullable<z.ZodString>;
413
+ }, z.core.$strip>;
414
+ export type SiteHostnameAvailability = z.infer<typeof SiteHostnameAvailability>;
415
+ /** POST .../publication/takedown (owner, workspace admin) and the platform admin route. */
416
+ export declare const SiteTakedownRequest: z.ZodObject<{
417
+ reason: z.ZodString;
418
+ }, z.core.$strip>;
419
+ export type SiteTakedownRequest = z.infer<typeof SiteTakedownRequest>;
420
+ export declare const SiteAbuseCategory: z.ZodEnum<{
421
+ copyright: "copyright";
422
+ harassment: "harassment";
423
+ illegal: "illegal";
424
+ malware: "malware";
425
+ other: "other";
426
+ phishing: "phishing";
427
+ spam: "spam";
428
+ }>;
429
+ export type SiteAbuseCategory = z.infer<typeof SiteAbuseCategory>;
430
+ /** POST /_og/report on a Site host, forwarded to /v1/site-runtime/site/reports. */
431
+ export declare const SiteAbuseReportRequest: z.ZodObject<{
432
+ category: z.ZodEnum<{
433
+ copyright: "copyright";
434
+ harassment: "harassment";
435
+ illegal: "illegal";
436
+ malware: "malware";
437
+ other: "other";
438
+ phishing: "phishing";
439
+ spam: "spam";
440
+ }>;
441
+ message: z.ZodDefault<z.ZodString>;
442
+ contactEmail: z.ZodDefault<z.ZodNullable<z.ZodString>>;
443
+ }, z.core.$strip>;
444
+ export type SiteAbuseReportRequest = z.infer<typeof SiteAbuseReportRequest>;
445
+ export declare const SiteAbuseReport: z.ZodObject<{
446
+ id: z.ZodString;
447
+ siteId: z.ZodString;
448
+ hostname: z.ZodString;
449
+ category: z.ZodEnum<{
450
+ copyright: "copyright";
451
+ harassment: "harassment";
452
+ illegal: "illegal";
453
+ malware: "malware";
454
+ other: "other";
455
+ phishing: "phishing";
456
+ spam: "spam";
457
+ }>;
458
+ message: z.ZodString;
459
+ contactEmail: z.ZodNullable<z.ZodString>;
460
+ status: z.ZodEnum<{
461
+ actioned: "actioned";
462
+ dismissed: "dismissed";
463
+ open: "open";
464
+ }>;
465
+ createdAt: z.ZodString;
466
+ }, z.core.$strip>;
467
+ export type SiteAbuseReport = z.infer<typeof SiteAbuseReport>;
468
+ /**
469
+ * The viewer as a Site sees it (`site.viewer`). Guests have no name or
470
+ * email. `id` is stable per Site and is the Site Data owner principal
471
+ * (`user:<subject>` or `guest:<visitor>`); it is not an Opengeni subject id
472
+ * usable anywhere else.
473
+ */
474
+ export declare const SiteViewer: z.ZodObject<{
475
+ kind: z.ZodEnum<{
476
+ guest: "guest";
477
+ invited: "invited";
478
+ member: "member";
479
+ user: "user";
480
+ }>;
481
+ id: z.ZodString;
482
+ name: z.ZodNullable<z.ZodString>;
483
+ email: z.ZodNullable<z.ZodString>;
484
+ signedIn: z.ZodBoolean;
485
+ }, z.core.$strip>;
486
+ export type SiteViewer = z.infer<typeof SiteViewer>;
487
+ /** The roles an owner may preview their published Site as ("View as visitor"). */
488
+ export declare const SiteViewAs: z.ZodEnum<{
489
+ invited: "invited";
490
+ public: "public";
491
+ }>;
492
+ export type SiteViewAs = z.infer<typeof SiteViewAs>;
493
+ /** The query parameter that starts (`invited`, `public`) or ends (`off`) a preview. */
494
+ export declare const SITE_VIEW_AS_QUERY = "og_view_as";
495
+ /**
496
+ * What this viewer may do, cheaply, so a page can hide features instead of
497
+ * failing. Anything refused at call time still answers with the error
498
+ * `not_available_for_viewer`.
499
+ */
500
+ export declare const SiteViewerCapabilities: z.ZodObject<{
501
+ agent: z.ZodBoolean;
502
+ workspaceTools: z.ZodBoolean;
503
+ siteData: z.ZodEnum<{
504
+ guest: "guest";
505
+ viewer: "viewer";
506
+ }>;
507
+ sqlQueryAudiences: z.ZodArray<z.ZodEnum<{
508
+ everyone: "everyone";
509
+ signed_in: "signed_in";
510
+ }>>;
511
+ viewAs: z.ZodNullable<z.ZodEnum<{
512
+ invited: "invited";
513
+ public: "public";
514
+ }>>;
515
+ }, z.core.$strip>;
516
+ export type SiteViewerCapabilities = z.infer<typeof SiteViewerCapabilities>;
517
+ /** The error code (`error.details.code`) when the viewer may not do something on a Site. */
518
+ export declare const SITE_NOT_AVAILABLE_FOR_VIEWER_ERROR_CODE = "not_available_for_viewer";
519
+ /** GET /_og/api/site/config (gateway shell and `site.viewer`). */
520
+ export declare const SiteRuntimeConfig: z.ZodObject<{
521
+ siteId: z.ZodString;
522
+ title: z.ZodString;
523
+ hostname: z.ZodString;
524
+ versionId: z.ZodString;
525
+ access: z.ZodEnum<{
526
+ invited: "invited";
527
+ members: "members";
528
+ public: "public";
529
+ }>;
530
+ viewer: z.ZodObject<{
531
+ kind: z.ZodEnum<{
532
+ guest: "guest";
533
+ invited: "invited";
534
+ member: "member";
535
+ user: "user";
536
+ }>;
537
+ id: z.ZodString;
538
+ name: z.ZodNullable<z.ZodString>;
539
+ email: z.ZodNullable<z.ZodString>;
540
+ signedIn: z.ZodBoolean;
541
+ }, z.core.$strip>;
542
+ capabilities: z.ZodObject<{
543
+ agent: z.ZodBoolean;
544
+ workspaceTools: z.ZodBoolean;
545
+ siteData: z.ZodEnum<{
546
+ guest: "guest";
547
+ viewer: "viewer";
548
+ }>;
549
+ sqlQueryAudiences: z.ZodArray<z.ZodEnum<{
550
+ everyone: "everyone";
551
+ signed_in: "signed_in";
552
+ }>>;
553
+ viewAs: z.ZodNullable<z.ZodEnum<{
554
+ invited: "invited";
555
+ public: "public";
556
+ }>>;
557
+ }, z.core.$strip>;
558
+ agent: z.ZodObject<{
559
+ enabled: z.ZodBoolean;
560
+ model: z.ZodNullable<z.ZodString>;
561
+ }, z.core.$strip>;
562
+ siteData: z.ZodBoolean;
563
+ noindex: z.ZodBoolean;
564
+ abuseEmail: z.ZodNullable<z.ZodString>;
565
+ }, z.core.$strip>;
566
+ export type SiteRuntimeConfig = z.infer<typeof SiteRuntimeConfig>;
567
+ /**
568
+ * POST /v1/site-auth/authorize, called by the console page
569
+ * `/site-auth/authorize` with the signed-in user's ordinary credentials.
570
+ * Returns a one-time code bound to the host, PKCE challenge and redirect.
571
+ */
572
+ export declare const SiteAuthAuthorizeRequest: z.ZodObject<{
573
+ host: z.ZodString;
574
+ state: z.ZodString;
575
+ codeChallenge: z.ZodString;
576
+ codeChallengeMethod: z.ZodLiteral<"S256">;
577
+ redirectUri: z.ZodString;
578
+ }, z.core.$strip>;
579
+ export type SiteAuthAuthorizeRequest = z.infer<typeof SiteAuthAuthorizeRequest>;
580
+ export declare const SiteAuthAuthorizeResponse: z.ZodObject<{
581
+ redirectTo: z.ZodString;
582
+ site: z.ZodObject<{
583
+ title: z.ZodString;
584
+ hostname: z.ZodString;
585
+ }, z.core.$strip>;
586
+ }, z.core.$strip>;
587
+ export type SiteAuthAuthorizeResponse = z.infer<typeof SiteAuthAuthorizeResponse>;
588
+ /** POST /v1/site-runtime/auth/exchange (gateway only, signed). */
589
+ export declare const SiteAuthExchangeRequest: z.ZodObject<{
590
+ code: z.ZodString;
591
+ codeVerifier: z.ZodString;
592
+ redirectUri: z.ZodString;
593
+ }, z.core.$strip>;
594
+ export type SiteAuthExchangeRequest = z.infer<typeof SiteAuthExchangeRequest>;
595
+ export declare const SiteAuthExchangeResponse: z.ZodObject<{
596
+ sessionToken: z.ZodString;
597
+ expiresAt: z.ZodString;
598
+ viewer: z.ZodObject<{
599
+ kind: z.ZodEnum<{
600
+ guest: "guest";
601
+ invited: "invited";
602
+ member: "member";
603
+ user: "user";
604
+ }>;
605
+ id: z.ZodString;
606
+ name: z.ZodNullable<z.ZodString>;
607
+ email: z.ZodNullable<z.ZodString>;
608
+ signedIn: z.ZodBoolean;
609
+ }, z.core.$strip>;
610
+ }, z.core.$strip>;
611
+ export type SiteAuthExchangeResponse = z.infer<typeof SiteAuthExchangeResponse>;
612
+ export declare const SITE_SESSION_COOKIE = "__Host-og_session";
613
+ export declare const SITE_VISITOR_COOKIE = "__Host-og_v";
614
+ export declare const SITE_LOGIN_COOKIE = "__Host-og_login";
615
+ /** Paths the gateway owns on every Site host. */
616
+ export declare const SITE_GATEWAY_PREFIX = "/_og";
617
+ export declare const SITE_GATEWAY_API_PREFIX = "/_og/api";
618
+ export declare const SITE_GATEWAY_VERSION_PREFIX = "/_og/v";
619
+ export declare const SITE_GATEWAY_LOGIN_PATH = "/_og/auth/login";
620
+ export declare const SITE_GATEWAY_CALLBACK_PATH = "/_og/auth/callback";
621
+ export declare const SITE_GATEWAY_LOGOUT_PATH = "/_og/auth/logout";
622
+ export declare const SITE_GATEWAY_REPORT_PATH = "/_og/report";
623
+ /** The API prefix the gateway forwards `/_og/api/*` to. */
624
+ export declare const SITE_RUNTIME_API_PREFIX = "/v1/site-runtime";
625
+ export declare const SITE_GATEWAY_TIMESTAMP_HEADER = "x-opengeni-gateway-timestamp";
626
+ export declare const SITE_GATEWAY_SIGNATURE_HEADER = "x-opengeni-gateway-signature";
627
+ export declare const SITE_GATEWAY_HOST_HEADER = "x-opengeni-site-host";
628
+ export declare const SITE_GATEWAY_SESSION_HEADER = "x-opengeni-site-session";
629
+ export declare const SITE_GATEWAY_VISITOR_HEADER = "x-opengeni-site-visitor";
630
+ export declare const SITE_GATEWAY_CLIENT_IP_HEADER = "x-opengeni-site-client-ip";
631
+ export declare const SITE_GATEWAY_HUMAN_HEADER = "x-opengeni-site-human";
632
+ /**
633
+ * Required on every signed request: lowercase hex SHA-256 of the exact body
634
+ * bytes (of the empty string when there is no body), the same value the
635
+ * gateway signs as `bodySha256`. The API verifies the signature from the
636
+ * headers before it reads the body, then checks the body against this hash.
637
+ */
638
+ export declare const SITE_GATEWAY_BODY_SHA256_HEADER = "x-opengeni-site-body-sha256";
639
+ /** Reject signed requests whose timestamp differs from the API clock by more. */
640
+ export declare const SITE_GATEWAY_MAX_SKEW_SECONDS = 30;
641
+ export declare const SITE_GATEWAY_SIGNATURE_VERSION = "v1";
642
+ export type SiteGatewaySignedFields = {
643
+ method: string;
644
+ /** Path and query exactly as sent to the API, starting with /v1/site-runtime. */
645
+ pathWithQuery: string;
646
+ /** Unix seconds. */
647
+ timestamp: number;
648
+ /** Lowercase hex SHA-256 of the exact request body bytes (of "" when empty). */
649
+ bodySha256: string;
650
+ host: string;
651
+ /** Raw site-session token, or "" when the viewer is not signed in. */
652
+ session: string;
653
+ /** Gateway-minted visitor id, or "". */
654
+ visitor: string;
655
+ clientIp: string;
656
+ /** "1" when the gateway verified a bot challenge for this visitor, else "". */
657
+ human: string;
658
+ };
659
+ /**
660
+ * The exact string both sides HMAC-SHA256 with the shared gateway secret.
661
+ * The header carries `v1=<base64url signature>`; during secret rotation the
662
+ * API accepts the current or the previous secret.
663
+ */
664
+ export declare function siteGatewayCanonicalString(fields: SiteGatewaySignedFields): string;
665
+ /**
666
+ * The rebuildable host-map record the gateway reads from KV (`host:<hostname>`)
667
+ * and, on a miss, from GET /v1/site-runtime/host. Postgres is the source of truth.
668
+ */
669
+ export declare const SiteHostMapRecord: z.ZodObject<{
670
+ v: z.ZodLiteral<1>;
671
+ hostname: z.ZodString;
672
+ siteId: z.ZodString;
673
+ status: z.ZodEnum<{
674
+ active: "active";
675
+ suspended: "suspended";
676
+ unpublished: "unpublished";
677
+ }>;
678
+ access: z.ZodEnum<{
679
+ invited: "invited";
680
+ members: "members";
681
+ public: "public";
682
+ }>;
683
+ versionId: z.ZodNullable<z.ZodString>;
684
+ title: z.ZodString;
685
+ noindex: z.ZodBoolean;
686
+ generation: z.ZodNumber;
687
+ updatedAt: z.ZodString;
688
+ }, z.core.$strip>;
689
+ export type SiteHostMapRecord = z.infer<typeof SiteHostMapRecord>;
690
+ export declare function siteHostMapKey(hostname: string): string;
691
+ /**
692
+ * usage_only: meter, never charge (the default). shadow: compute what
693
+ * credits mode would charge, without charging. credits: charge organization
694
+ * credits for usage above the workspace's monthly allowance.
695
+ */
696
+ export declare const SitePlatformBillingMode: z.ZodEnum<{
697
+ credits: "credits";
698
+ shadow: "shadow";
699
+ usage_only: "usage_only";
700
+ }>;
701
+ export type SitePlatformBillingMode = z.infer<typeof SitePlatformBillingMode>;
702
+ /** Gateway requests, Site SQL rows read and written, and Site SQL plus Site Data storage. */
703
+ export declare const SitePlatformMeter: z.ZodEnum<{
704
+ requests: "requests";
705
+ sql_rows_read: "sql_rows_read";
706
+ sql_rows_written: "sql_rows_written";
707
+ storage_bytes: "storage_bytes";
708
+ }>;
709
+ export type SitePlatformMeter = z.infer<typeof SitePlatformMeter>;
710
+ export declare const SitePlatformMeterUsage: z.ZodObject<{
711
+ meter: z.ZodEnum<{
712
+ requests: "requests";
713
+ sql_rows_read: "sql_rows_read";
714
+ sql_rows_written: "sql_rows_written";
715
+ storage_bytes: "storage_bytes";
716
+ }>;
717
+ used: z.ZodNumber;
718
+ peak: z.ZodNumber;
719
+ allowance: z.ZodNumber;
720
+ priceMicros: z.ZodNumber;
721
+ priceUnit: z.ZodNumber;
722
+ estimatedMicros: z.ZodNumber;
723
+ }, z.core.$strip>;
724
+ export type SitePlatformMeterUsage = z.infer<typeof SitePlatformMeterUsage>;
725
+ /** The Opengeni-wide brake on Site platform usage (see docs/published-sites.md). */
726
+ export declare const SitePlatformBrakeState: z.ZodObject<{
727
+ engaged: z.ZodBoolean;
728
+ engagedAt: z.ZodNullable<z.ZodString>;
729
+ }, z.core.$strip>;
730
+ export type SitePlatformBrakeState = z.infer<typeof SitePlatformBrakeState>;
731
+ /** GET /v1/workspaces/:ws/site-platform-usage */
732
+ export declare const SitePlatformUsage: z.ZodObject<{
733
+ workspaceId: z.ZodString;
734
+ periodStart: z.ZodString;
735
+ billingMode: z.ZodEnum<{
736
+ credits: "credits";
737
+ shadow: "shadow";
738
+ usage_only: "usage_only";
739
+ }>;
740
+ meters: z.ZodArray<z.ZodObject<{
741
+ meter: z.ZodEnum<{
742
+ requests: "requests";
743
+ sql_rows_read: "sql_rows_read";
744
+ sql_rows_written: "sql_rows_written";
745
+ storage_bytes: "storage_bytes";
746
+ }>;
747
+ used: z.ZodNumber;
748
+ peak: z.ZodNumber;
749
+ allowance: z.ZodNumber;
750
+ priceMicros: z.ZodNumber;
751
+ priceUnit: z.ZodNumber;
752
+ estimatedMicros: z.ZodNumber;
753
+ }, z.core.$strip>>;
754
+ estimatedMicros: z.ZodNumber;
755
+ chargedMicros: z.ZodNumber;
756
+ shadowMicros: z.ZodNumber;
757
+ brake: z.ZodObject<{
758
+ engaged: z.ZodBoolean;
759
+ engagedAt: z.ZodNullable<z.ZodString>;
760
+ }, z.core.$strip>;
761
+ }, z.core.$strip>;
762
+ export type SitePlatformUsage = z.infer<typeof SitePlatformUsage>;
763
+ /** details.code of the 503 every brake refusal carries. */
764
+ export declare const SITE_PLATFORM_BRAKE_ERROR_CODE: "site_platform_brake_engaged";
765
+ /** details.code of the 402 a workspace past its allowance without credits gets (credits mode). */
766
+ export declare const SITE_PLATFORM_QUOTA_ERROR_CODE: "site_platform_quota_exhausted";
767
+ export * from "./site-operations.js";
768
+ /**
769
+ * Additional MessagePort bridge request methods, served by both hosts:
770
+ * - `viewer`: returns SiteViewer (console: the signed-in member).
771
+ * - `auth.signIn`: asks the host to sign the viewer in. The gateway shell
772
+ * navigates the top window to /_og/auth/login; the console resolves
773
+ * immediately because its viewer is already signed in. Returns
774
+ * `{ started: boolean }`.
775
+ * The ready message advertises them with `viewer: 1`.
776
+ */
777
+ export declare const SITE_BRIDGE_VIEWER_METHOD: "viewer";
778
+ export declare const SITE_BRIDGE_SIGN_IN_METHOD: "auth.signIn";