@opengeni/contracts 5.5.0 → 5.5.2-canary.40656248492001

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 (543) hide show
  1. package/dist/agent-authored-durable-text.d.ts +9 -9
  2. package/dist/agent-config.d.ts +148 -37
  3. package/dist/api-key-presets.d.ts +19 -0
  4. package/dist/app-action-catalog-types.d.ts +32 -0
  5. package/dist/app-action-catalog.gen.d.ts +2 -0
  6. package/dist/app-actions.d.ts +91 -0
  7. package/dist/app-actions.js +10130 -0
  8. package/dist/app-actions.js.map +1 -0
  9. package/dist/app-shot.d.ts +55 -0
  10. package/dist/artifact-catalog.d.ts +33 -0
  11. package/dist/artifacts.d.ts +166 -0
  12. package/dist/atlassian-native-retirement.d.ts +16 -0
  13. package/dist/atlassian-native-retirement.js +30 -0
  14. package/dist/atlassian-native-retirement.js.map +1 -0
  15. package/dist/atlassian.js +48 -23
  16. package/dist/automation-templates.d.ts +434 -0
  17. package/dist/automation-templates.js +31 -0
  18. package/dist/automation-templates.js.map +1 -0
  19. package/dist/billing-subscriptions.d.ts +61 -0
  20. package/dist/bots.d.ts +583 -0
  21. package/dist/bundled-skills.d.ts +58 -2
  22. package/dist/canonical-human-identities.js +3 -1
  23. package/dist/child-lifecycle-notice-protocol.d.ts +45 -0
  24. package/dist/chunk-2QKIEAGY.js +396 -0
  25. package/dist/chunk-2QKIEAGY.js.map +1 -0
  26. package/dist/chunk-2WOWEWXV.js +426 -0
  27. package/dist/chunk-2WOWEWXV.js.map +1 -0
  28. package/dist/chunk-2ZIHHL72.js +153 -0
  29. package/dist/chunk-2ZIHHL72.js.map +1 -0
  30. package/dist/chunk-32U6NKQQ.js +389 -0
  31. package/dist/chunk-32U6NKQQ.js.map +1 -0
  32. package/dist/chunk-4YDDHSO2.js +799 -0
  33. package/dist/chunk-4YDDHSO2.js.map +1 -0
  34. package/dist/chunk-56SNIMDO.js +9 -0
  35. package/dist/chunk-56SNIMDO.js.map +1 -0
  36. package/dist/chunk-5RWB6QVL.js +101 -0
  37. package/dist/chunk-5RWB6QVL.js.map +1 -0
  38. package/dist/chunk-5UGUOT3L.js +243 -0
  39. package/dist/chunk-5UGUOT3L.js.map +1 -0
  40. package/dist/chunk-6LAT33BH.js +130 -0
  41. package/dist/chunk-6LAT33BH.js.map +1 -0
  42. package/dist/chunk-7272KVWZ.js +60 -0
  43. package/dist/chunk-7272KVWZ.js.map +1 -0
  44. package/dist/chunk-72QC2GTL.js +36 -0
  45. package/dist/chunk-72QC2GTL.js.map +1 -0
  46. package/dist/chunk-7EQGGZBY.js +105 -0
  47. package/dist/chunk-7EQGGZBY.js.map +1 -0
  48. package/dist/chunk-A3LXWVYU.js +382 -0
  49. package/dist/chunk-A3LXWVYU.js.map +1 -0
  50. package/dist/chunk-AQYDZUJV.js +34 -0
  51. package/dist/chunk-AQYDZUJV.js.map +1 -0
  52. package/dist/chunk-BHCEVVUP.js +93 -0
  53. package/dist/chunk-BHCEVVUP.js.map +1 -0
  54. package/dist/chunk-BMUTAZX5.js +486 -0
  55. package/dist/chunk-BMUTAZX5.js.map +1 -0
  56. package/dist/chunk-DGG6IBBK.js +150 -0
  57. package/dist/chunk-DGG6IBBK.js.map +1 -0
  58. package/dist/{chunk-YBW5JSA3.js → chunk-FBCTUMHI.js} +123 -102
  59. package/dist/chunk-FBCTUMHI.js.map +1 -0
  60. package/dist/chunk-G2KJTFIC.js +97 -0
  61. package/dist/chunk-G2KJTFIC.js.map +1 -0
  62. package/dist/chunk-G4RKARXZ.js +1167 -0
  63. package/dist/chunk-G4RKARXZ.js.map +1 -0
  64. package/dist/chunk-H6UJJIUM.js +350 -0
  65. package/dist/chunk-H6UJJIUM.js.map +1 -0
  66. package/dist/chunk-JOTHDW4H.js +18 -0
  67. package/dist/chunk-JOTHDW4H.js.map +1 -0
  68. package/dist/chunk-L4GUEP7K.js +56480 -0
  69. package/dist/chunk-L4GUEP7K.js.map +1 -0
  70. package/dist/{chunk-SIOU2K4U.js → chunk-LJH2EYGT.js} +23 -23
  71. package/dist/chunk-MTJKSIGA.js +161 -0
  72. package/dist/chunk-MTJKSIGA.js.map +1 -0
  73. package/dist/chunk-MYHMB6GZ.js +202 -0
  74. package/dist/chunk-MYHMB6GZ.js.map +1 -0
  75. package/dist/chunk-PI5VIKJY.js +660 -0
  76. package/dist/chunk-PI5VIKJY.js.map +1 -0
  77. package/dist/{chunk-RIY7GYQS.js → chunk-PTSROVDG.js} +2 -2
  78. package/dist/chunk-PUIUXIOL.js +189 -0
  79. package/dist/chunk-PUIUXIOL.js.map +1 -0
  80. package/dist/chunk-R6VXJIMB.js +19 -0
  81. package/dist/chunk-R6VXJIMB.js.map +1 -0
  82. package/dist/chunk-RLJUNVAM.js +15 -0
  83. package/dist/chunk-RLJUNVAM.js.map +1 -0
  84. package/dist/chunk-RR6APCBK.js +213 -0
  85. package/dist/chunk-RR6APCBK.js.map +1 -0
  86. package/dist/{chunk-TXTQIYCV.js → chunk-RUQ4I6DO.js} +59 -13
  87. package/dist/chunk-RUQ4I6DO.js.map +1 -0
  88. package/dist/{chunk-WYBDERIY.js → chunk-RWEEUDHD.js} +53 -42
  89. package/dist/chunk-RWEEUDHD.js.map +1 -0
  90. package/dist/chunk-S7MSQQL6.js +158 -0
  91. package/dist/chunk-S7MSQQL6.js.map +1 -0
  92. package/dist/{chunk-5Q54VCCH.js → chunk-SHO4YO4B.js} +20 -36
  93. package/dist/chunk-SHO4YO4B.js.map +1 -0
  94. package/dist/{chunk-HHZSZYYF.js → chunk-T3HSWMA5.js} +20 -4
  95. package/dist/chunk-T3HSWMA5.js.map +1 -0
  96. package/dist/{chunk-YRKRZ6OF.js → chunk-TOOJIBJC.js} +2 -2
  97. package/dist/chunk-UCUOTRS6.js +431 -0
  98. package/dist/chunk-UCUOTRS6.js.map +1 -0
  99. package/dist/chunk-UH4K7GP7.js +424 -0
  100. package/dist/chunk-UH4K7GP7.js.map +1 -0
  101. package/dist/chunk-UIZWGPHV.js +120 -0
  102. package/dist/chunk-UIZWGPHV.js.map +1 -0
  103. package/dist/chunk-VLUKBV6Y.js +1170 -0
  104. package/dist/chunk-VLUKBV6Y.js.map +1 -0
  105. package/dist/chunk-W2QQ5Y6K.js +55 -0
  106. package/dist/chunk-W2QQ5Y6K.js.map +1 -0
  107. package/dist/{chunk-Y3KNXVTD.js → chunk-W3NBPR4E.js} +131 -31
  108. package/dist/chunk-W3NBPR4E.js.map +1 -0
  109. package/dist/{chunk-NRMCVHAU.js → chunk-WMGO4HJU.js} +11 -9
  110. package/dist/chunk-WMGO4HJU.js.map +1 -0
  111. package/dist/{chunk-MYBZRDTY.js → chunk-WQI7VNN4.js} +19 -9
  112. package/dist/chunk-WQI7VNN4.js.map +1 -0
  113. package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
  114. package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
  115. package/dist/chunk-XB6GQLBH.js +76 -0
  116. package/dist/chunk-XB6GQLBH.js.map +1 -0
  117. package/dist/{chunk-D2HKF2EF.js → chunk-XP5M3IKT.js} +2 -2
  118. package/dist/{chunk-O77VSFYZ.js → chunk-ZMPU5BWE.js} +12 -2
  119. package/dist/chunk-ZMPU5BWE.js.map +1 -0
  120. package/dist/{chunk-3SIZGL3O.js → chunk-ZYVEJFNU.js} +22 -18
  121. package/dist/chunk-ZYVEJFNU.js.map +1 -0
  122. package/dist/claude-provider-account-authority.d.ts +18 -0
  123. package/dist/claude-subscription-oauth.d.ts +25 -0
  124. package/dist/claude-subscription-usage.d.ts +95 -1
  125. package/dist/client-error-report.d.ts +154 -8
  126. package/dist/client-error-report.js +157 -2
  127. package/dist/client-error-report.js.map +1 -1
  128. package/dist/code-search.d.ts +1 -1
  129. package/dist/code-search.js.map +1 -1
  130. package/dist/codex-provider-account-authority.js +23 -12
  131. package/dist/codex-provider-account-authority.js.map +1 -1
  132. package/dist/company-profile.d.ts +144 -0
  133. package/dist/connect.d.ts +38 -0
  134. package/dist/connect.js +244 -164
  135. package/dist/connect.js.map +1 -1
  136. package/dist/connection-account-label.d.ts +2 -0
  137. package/dist/connection-account-label.js +34 -0
  138. package/dist/connection-account-label.js.map +1 -0
  139. package/dist/connection-authority.js +49 -24
  140. package/dist/connector-attachments.js +3 -1
  141. package/dist/connector-destinations.js +3 -1
  142. package/dist/connector-tool-permissions.d.ts +68 -4
  143. package/dist/credential-profiles.d.ts +166 -0
  144. package/dist/cua-desktop-tools.d.ts +19 -0
  145. package/dist/define-schema.d.ts +8 -0
  146. package/dist/desktop-app.d.ts +28 -0
  147. package/dist/direct-model-provider.d.ts +38 -0
  148. package/dist/document-artifact-commands.js +2 -2
  149. package/dist/document-artifact-query.js +2 -2
  150. package/dist/editable-artifact-binary.d.ts +7 -0
  151. package/dist/editable-artifact-causal-frontier.js +2 -2
  152. package/dist/editable-artifact-codec-registry.js +7 -7
  153. package/dist/editable-artifact-committed-transaction.js +4 -2
  154. package/dist/editable-artifact-live.js +8 -8
  155. package/dist/editable-artifact-serialized-commit.js +9 -9
  156. package/dist/editable-artifact-versions.d.ts +7 -1
  157. package/dist/editable-artifact-versions.js +1 -1
  158. package/dist/editable-artifacts.js +49 -43
  159. package/dist/event-preview.d.ts +22 -0
  160. package/dist/event-triggers.d.ts +1253 -0
  161. package/dist/event-triggers.js +148 -0
  162. package/dist/event-triggers.js.map +1 -0
  163. package/dist/external-identities.d.ts +34 -0
  164. package/dist/external-identities.js +4 -2
  165. package/dist/feedback.d.ts +181 -0
  166. package/dist/file-access.d.ts +23 -0
  167. package/dist/first-party-tool-authorization.d.ts +852 -0
  168. package/dist/github-repository-contracts.js +64 -43
  169. package/dist/github-repository-contracts.js.map +1 -1
  170. package/dist/google-drive-native-retirement.d.ts +12 -0
  171. package/dist/google-drive-native-retirement.js +20 -0
  172. package/dist/google-drive-native-retirement.js.map +1 -0
  173. package/dist/google-drive.d.ts +1 -1
  174. package/dist/google-drive.js +323 -239
  175. package/dist/google-drive.js.map +1 -1
  176. package/dist/host-mcp-bindings.js +250 -198
  177. package/dist/host-mcp-bindings.js.map +1 -1
  178. package/dist/index.d.ts +29072 -20593
  179. package/dist/index.js +2432 -366
  180. package/dist/inference-residency.d.ts +22 -0
  181. package/dist/insights-usage.d.ts +948 -0
  182. package/dist/insights-usage.js +608 -0
  183. package/dist/insights-usage.js.map +1 -0
  184. package/dist/integration-capability-id.d.ts +8 -0
  185. package/dist/interaction-action-deadline.d.ts +48 -0
  186. package/dist/interaction-driver-diagnostic.d.ts +28 -0
  187. package/dist/interaction.d.ts +2126 -881
  188. package/dist/knowledge-entries.d.ts +38 -0
  189. package/dist/knowledge-preparation.d.ts +4 -0
  190. package/dist/learning-refusal.d.ts +43 -0
  191. package/dist/learning-refusal.js +49 -0
  192. package/dist/learning-refusal.js.map +1 -0
  193. package/dist/managed-auth-session-sets.d.ts +1 -0
  194. package/dist/managed-auth-session-sets.js +207 -146
  195. package/dist/managed-auth-session-sets.js.map +1 -1
  196. package/dist/managed-sign-in-methods.d.ts +96 -0
  197. package/dist/managed-sign-in-methods.js +157 -35
  198. package/dist/managed-sign-in-methods.js.map +1 -1
  199. package/dist/mcp-structured-content.d.ts +25 -0
  200. package/dist/message-time-zone.d.ts +38 -0
  201. package/dist/message-time-zone.js +19 -0
  202. package/dist/message-time-zone.js.map +1 -0
  203. package/dist/modal-native-proof-v2.d.ts +587 -0
  204. package/dist/modal-native-proof-v2.js +39 -0
  205. package/dist/modal-native-proof-v2.js.map +1 -0
  206. package/dist/model-account-choice.d.ts +237 -0
  207. package/dist/model-account-settings.d.ts +422 -0
  208. package/dist/model-availability.d.ts +15 -0
  209. package/dist/model-connection-access.d.ts +13 -0
  210. package/dist/model-context-inspector.d.ts +8 -0
  211. package/dist/model-display.d.ts +43 -0
  212. package/dist/model-display.js +17 -0
  213. package/dist/model-display.js.map +1 -0
  214. package/dist/model-picker-order.js.map +1 -1
  215. package/dist/model-residency.d.ts +304 -0
  216. package/dist/organization-access.d.ts +416 -0
  217. package/dist/organization-access.js +40 -0
  218. package/dist/organization-access.js.map +1 -0
  219. package/dist/organization-integration-policy.d.ts +18 -0
  220. package/dist/organization-membership-lifecycle.d.ts +66 -0
  221. package/dist/organization-model-usage.d.ts +146 -0
  222. package/dist/organization-model-usage.js +87 -0
  223. package/dist/organization-model-usage.js.map +1 -0
  224. package/dist/organization-recovery.js +3 -1
  225. package/dist/organization-usage.d.ts +12 -0
  226. package/dist/passkey-only-account.d.ts +14 -0
  227. package/dist/passkey-only-account.js +13 -0
  228. package/dist/passkey-only-account.js.map +1 -0
  229. package/dist/permissions.d.ts +19 -0
  230. package/dist/personal-github.js +220 -148
  231. package/dist/personal-github.js.map +1 -1
  232. package/dist/personal-integration-setup.d.ts +81 -0
  233. package/dist/personal-integration-setup.js +42 -0
  234. package/dist/personal-integration-setup.js.map +1 -0
  235. package/dist/prepared-mcp-setup.d.ts +54 -0
  236. package/dist/prepared-mcp-setup.js +13 -0
  237. package/dist/prepared-mcp-setup.js.map +1 -0
  238. package/dist/presentation-artifact-commands.js +2 -2
  239. package/dist/presentation-artifact-query.js +2 -2
  240. package/dist/primitives.d.ts +18 -0
  241. package/dist/product-analytics.d.ts +27 -10
  242. package/dist/product-lifecycle-facts.d.ts +26 -3
  243. package/dist/prompt-cache-diagnostics.d.ts +92 -0
  244. package/dist/recordings.d.ts +1371 -0
  245. package/dist/remember.d.ts +98 -2
  246. package/dist/retained-output.d.ts +4 -2
  247. package/dist/sandbox-file-artifacts.d.ts +19 -2
  248. package/dist/sandbox-provider-command.d.ts +5 -44
  249. package/dist/sandbox-recovery.d.ts +139 -8
  250. package/dist/secret-generator.d.ts +44 -0
  251. package/dist/secret-mask-strings.d.ts +32 -0
  252. package/dist/secret-references.d.ts +90 -0
  253. package/dist/secret-resolution.d.ts +143 -0
  254. package/dist/secret-shape-masking.d.ts +52 -0
  255. package/dist/secret-shape-masking.js +19 -0
  256. package/dist/secret-shape-masking.js.map +1 -0
  257. package/dist/secret-totp.d.ts +41 -0
  258. package/dist/secret-use-approval-question.d.ts +11 -0
  259. package/dist/secret-use-approval-question.js +11 -0
  260. package/dist/secret-use-approval-question.js.map +1 -0
  261. package/dist/secret-use-approvals.d.ts +106 -0
  262. package/dist/secret-value-masking.d.ts +299 -0
  263. package/dist/secret-value-masking.js +62 -0
  264. package/dist/secret-value-masking.js.map +1 -0
  265. package/dist/secret-value.d.ts +19 -0
  266. package/dist/session-history-import.d.ts +444 -8
  267. package/dist/session-history.d.ts +111 -0
  268. package/dist/session-history.js +35 -0
  269. package/dist/session-history.js.map +1 -0
  270. package/dist/session-list-entries.d.ts +8 -0
  271. package/dist/session-list-entries.js +61 -0
  272. package/dist/session-list-entries.js.map +1 -0
  273. package/dist/session-mcp-projections.d.ts +13 -1
  274. package/dist/session-mcp-tool-permissions.d.ts +62 -0
  275. package/dist/session-target.d.ts +18 -0
  276. package/dist/session-titles.d.ts +8 -0
  277. package/dist/session-titles.js +5 -1
  278. package/dist/session-usage-limit-refusal.d.ts +34 -0
  279. package/dist/session-usage-limit-refusal.js +15 -0
  280. package/dist/session-usage-limit-refusal.js.map +1 -0
  281. package/dist/session-usage-limits.d.ts +127 -0
  282. package/dist/session-usage-limits.js +43 -0
  283. package/dist/session-usage-limits.js.map +1 -0
  284. package/dist/site-data.d.ts +286 -0
  285. package/dist/site-operations.d.ts +39 -0
  286. package/dist/site-publishing.d.ts +813 -0
  287. package/dist/site-session-http.d.ts +103 -4
  288. package/dist/site-session-http.js +27 -1
  289. package/dist/site-sql.d.ts +425 -0
  290. package/dist/skills.d.ts +38 -0
  291. package/dist/slack-bot-scopes.d.ts +9 -7
  292. package/dist/slack-bot-scopes.js +6 -3
  293. package/dist/slack-rest-mcp.d.ts +36 -0
  294. package/dist/slack-rest-mcp.js +25 -0
  295. package/dist/slack-rest-mcp.js.map +1 -0
  296. package/dist/spreadsheet-artifact-commands.d.ts +14 -1
  297. package/dist/spreadsheet-artifact-commands.js +9 -2
  298. package/dist/spreadsheet-artifact-query.d.ts +13 -6
  299. package/dist/spreadsheet-artifact-query.js +4 -3
  300. package/dist/subscription-account-actions.d.ts +83 -0
  301. package/dist/subscription-account-pools.d.ts +326 -0
  302. package/dist/subscription-personal-authority-v2.d.ts +28 -0
  303. package/dist/subscription-personal-authority-v2.js +13 -0
  304. package/dist/subscription-personal-authority-v2.js.map +1 -0
  305. package/dist/subscription-plans.d.ts +38 -0
  306. package/dist/subscription-usage-pool.d.ts +89 -0
  307. package/dist/tool-action-review.d.ts +141 -0
  308. package/dist/tool-catalog.d.ts +479 -0
  309. package/dist/tool-policy.d.ts +5 -0
  310. package/dist/tool-review-presentation.d.ts +29 -0
  311. package/dist/tool-review-presentation.js +21 -0
  312. package/dist/tool-review-presentation.js.map +1 -0
  313. package/dist/turn-serving-policy.d.ts +223 -0
  314. package/dist/usage-allowances.d.ts +30 -0
  315. package/dist/usage-allowances.js +5 -1
  316. package/dist/values.d.ts +11 -0
  317. package/dist/values.js +19 -0
  318. package/dist/values.js.map +1 -0
  319. package/dist/vault-provider-wire.d.ts +907 -0
  320. package/dist/vault-provider-wire.js +74 -0
  321. package/dist/vault-provider-wire.js.map +1 -0
  322. package/dist/vaults.d.ts +2185 -0
  323. package/dist/video-generation.d.ts +75 -0
  324. package/dist/video-generation.js +8 -1
  325. package/dist/workspace-control-event.d.ts +18 -0
  326. package/dist/workspace-control-event.js +18 -0
  327. package/dist/workspace-control-event.js.map +1 -0
  328. package/dist/workspace-governance-context.d.ts +18 -0
  329. package/dist/workspace-integration-wire.d.ts +1 -1
  330. package/dist/workspace-integration-wire.js +1 -1
  331. package/dist/workspace-integrations.d.ts +212 -12
  332. package/dist/xai-provider-account-authority.js +3 -1
  333. package/package.json +121 -4
  334. package/src/agent-authored-durable-text.ts +14 -11
  335. package/src/agent-config.ts +382 -203
  336. package/src/agent-instruction-changes.ts +94 -74
  337. package/src/agent-learning.ts +94 -66
  338. package/src/agent-topology.ts +58 -52
  339. package/src/api-key-presets.ts +28 -0
  340. package/src/app-action-catalog-types.ts +32 -0
  341. package/src/app-action-catalog.gen.ts +9905 -0
  342. package/src/app-actions.ts +365 -0
  343. package/src/app-shot.ts +176 -0
  344. package/src/artifact-catalog.ts +81 -46
  345. package/src/artifacts.ts +360 -227
  346. package/src/atlassian-native-retirement.ts +33 -0
  347. package/src/atlassian.ts +136 -108
  348. package/src/automation-templates.ts +201 -0
  349. package/src/billing-subscriptions.ts +48 -0
  350. package/src/bots.ts +238 -0
  351. package/src/bundled-skills.ts +79 -22
  352. package/src/canonical-human-identities.ts +65 -62
  353. package/src/child-lifecycle-notice-protocol.gen.json +1310 -0
  354. package/src/child-lifecycle-notice-protocol.ts +224 -0
  355. package/src/claude-provider-account-authority.ts +12 -0
  356. package/src/claude-subscription-oauth.ts +61 -19
  357. package/src/claude-subscription-usage.ts +64 -35
  358. package/src/client-error-report.ts +344 -9
  359. package/src/code-search.ts +1 -1
  360. package/src/codex-provider-account-authority.ts +22 -16
  361. package/src/company-brain-governed-writes.ts +265 -244
  362. package/src/company-brain.ts +165 -154
  363. package/src/company-profile.ts +362 -297
  364. package/src/connect.ts +222 -173
  365. package/src/connection-account-label.ts +45 -0
  366. package/src/connection-authority.ts +172 -152
  367. package/src/connector-attachments.ts +139 -123
  368. package/src/connector-destinations.ts +48 -43
  369. package/src/connector-tool-permissions.ts +104 -46
  370. package/src/credential-profiles.ts +161 -0
  371. package/src/cua-desktop-tools.gen.json +6722 -0
  372. package/src/cua-desktop-tools.linux.gen.json +6798 -0
  373. package/src/cua-desktop-tools.ts +42 -0
  374. package/src/cua-desktop-tools.windows.gen.json +6739 -0
  375. package/src/define-schema.ts +10 -0
  376. package/src/desktop-app.ts +50 -0
  377. package/src/direct-model-provider.ts +112 -0
  378. package/src/editable-artifact-binary.ts +29 -8
  379. package/src/editable-artifact-committed-transaction.ts +19 -18
  380. package/src/editable-artifact-serialized-commit.ts +8 -2
  381. package/src/editable-artifact-versions.ts +7 -1
  382. package/src/event-preview.ts +53 -3
  383. package/src/event-triggers.ts +891 -0
  384. package/src/external-identities.ts +239 -195
  385. package/src/feedback.ts +125 -30
  386. package/src/file-access.ts +26 -0
  387. package/src/first-party-tool-authorization.ts +383 -0
  388. package/src/github-repository-contracts.ts +78 -64
  389. package/src/google-drive-native-retirement.ts +20 -0
  390. package/src/google-drive.ts +286 -234
  391. package/src/governed-learning-activation.ts +159 -137
  392. package/src/governed-learning-evaluator.ts +141 -133
  393. package/src/host-mcp-bindings.ts +244 -221
  394. package/src/image-generation.ts +105 -95
  395. package/src/index.ts +13928 -9899
  396. package/src/inference-residency.ts +36 -0
  397. package/src/insights-usage.ts +774 -0
  398. package/src/integration-capability-id.ts +16 -0
  399. package/src/interaction-action-deadline.ts +143 -0
  400. package/src/interaction-driver-diagnostic.ts +89 -0
  401. package/src/interaction.ts +3527 -2427
  402. package/src/knowledge-entries.ts +386 -299
  403. package/src/knowledge-preparation.ts +49 -41
  404. package/src/knowledge.ts +242 -213
  405. package/src/learning-refusal.ts +90 -0
  406. package/src/managed-auth-session-sets.ts +180 -133
  407. package/src/managed-sign-in-methods.ts +156 -34
  408. package/src/mcp-oauth.ts +58 -46
  409. package/src/mcp-receipts.ts +199 -194
  410. package/src/mcp-structured-content.ts +81 -0
  411. package/src/memory-slack-delivery.ts +172 -142
  412. package/src/message-time-zone.ts +109 -0
  413. package/src/modal-native-proof-v2.ts +430 -0
  414. package/src/model-account-choice.ts +178 -0
  415. package/src/model-account-settings.ts +210 -0
  416. package/src/model-availability.ts +22 -0
  417. package/src/model-connection-access.ts +62 -14
  418. package/src/model-context-inspector.ts +130 -109
  419. package/src/model-display.ts +221 -0
  420. package/src/model-picker-order.ts +1 -1
  421. package/src/model-residency.ts +535 -0
  422. package/src/organization-access.ts +216 -0
  423. package/src/organization-integration-policy.ts +47 -28
  424. package/src/organization-membership-lifecycle.ts +558 -384
  425. package/src/organization-model-usage.ts +82 -0
  426. package/src/organization-recovery.ts +148 -135
  427. package/src/organization-usage.ts +84 -52
  428. package/src/passkey-only-account.ts +29 -0
  429. package/src/permissions.ts +94 -52
  430. package/src/personal-github.ts +211 -171
  431. package/src/personal-integration-setup.ts +150 -0
  432. package/src/preference-registry.ts +319 -263
  433. package/src/prepared-mcp-setup.ts +190 -0
  434. package/src/primitives.ts +22 -0
  435. package/src/product-analytics.ts +40 -15
  436. package/src/product-lifecycle-facts.ts +50 -20
  437. package/src/prompt-cache-diagnostics.ts +212 -0
  438. package/src/recordings.ts +1153 -0
  439. package/src/remember.ts +184 -172
  440. package/src/retained-output.ts +181 -168
  441. package/src/sandbox-file-artifacts.ts +78 -57
  442. package/src/sandbox-provider-command.ts +55 -72
  443. package/src/sandbox-recovery.ts +163 -77
  444. package/src/scoped-knowledge.ts +62 -43
  445. package/src/secret-generator.ts +156 -0
  446. package/src/secret-mask-strings.ts +175 -0
  447. package/src/secret-references.ts +414 -0
  448. package/src/secret-resolution.ts +322 -0
  449. package/src/secret-shape-masking.ts +573 -0
  450. package/src/secret-totp.ts +188 -0
  451. package/src/secret-use-approval-question.ts +22 -0
  452. package/src/secret-use-approvals.ts +219 -0
  453. package/src/secret-value-masking.ts +1283 -0
  454. package/src/secret-value.ts +22 -0
  455. package/src/session-goal-reports.ts +55 -49
  456. package/src/session-history-import.ts +84 -68
  457. package/src/session-history.ts +197 -0
  458. package/src/session-list-entries.ts +106 -0
  459. package/src/session-mcp-projections.ts +21 -3
  460. package/src/session-mcp-tool-permissions.ts +109 -0
  461. package/src/session-message-search.ts +46 -38
  462. package/src/session-target.ts +58 -0
  463. package/src/session-titles.ts +40 -4
  464. package/src/session-topology-primitives.ts +20 -12
  465. package/src/session-usage-limit-refusal.ts +101 -0
  466. package/src/session-usage-limits.ts +169 -0
  467. package/src/signup-attribution.ts +20 -15
  468. package/src/site-data.ts +337 -0
  469. package/src/site-operations.ts +154 -0
  470. package/src/site-publishing.ts +903 -0
  471. package/src/site-session-http.ts +344 -16
  472. package/src/site-sql.ts +1120 -0
  473. package/src/skill-use.ts +18 -17
  474. package/src/skills.ts +105 -50
  475. package/src/slack-bot-scopes.ts +18 -35
  476. package/src/slack-rest-mcp.ts +222 -0
  477. package/src/slack-task-policy.ts +97 -73
  478. package/src/spreadsheet-artifact-commands.ts +74 -13
  479. package/src/spreadsheet-artifact-query.ts +188 -50
  480. package/src/subscription-account-actions.ts +103 -0
  481. package/src/subscription-account-pools.ts +74 -0
  482. package/src/subscription-personal-authority-v2.ts +69 -0
  483. package/src/subscription-plans.ts +51 -0
  484. package/src/subscription-usage-pool.ts +44 -0
  485. package/src/task-notes.ts +70 -68
  486. package/src/tool-action-review.ts +271 -0
  487. package/src/tool-catalog.ts +694 -379
  488. package/src/tool-policy.ts +82 -0
  489. package/src/tool-result-spill.ts +13 -9
  490. package/src/tool-review-presentation.ts +643 -0
  491. package/src/turn-serving-policy.ts +167 -0
  492. package/src/usage-allowances.ts +212 -136
  493. package/src/values.ts +25 -0
  494. package/src/vault-provider-wire.ts +580 -0
  495. package/src/vaults.ts +1296 -0
  496. package/src/video-generation.ts +430 -361
  497. package/src/work-claims.ts +183 -166
  498. package/src/workspace-control-event.ts +134 -0
  499. package/src/workspace-governance-context.ts +63 -0
  500. package/src/workspace-instruction-policies.ts +346 -279
  501. package/src/workspace-integration-wire.ts +10 -0
  502. package/src/workspace-integrations.ts +488 -398
  503. package/src/workspace-learning-administration.ts +58 -44
  504. package/src/workspace-learning-policy.ts +126 -99
  505. package/src/workspace-state.ts +239 -220
  506. package/src/xai-provider-account-authority.ts +23 -17
  507. package/dist/chunk-3SIZGL3O.js.map +0 -1
  508. package/dist/chunk-566IFOVP.js +0 -26133
  509. package/dist/chunk-566IFOVP.js.map +0 -1
  510. package/dist/chunk-5IXYF6XN.js +0 -728
  511. package/dist/chunk-5IXYF6XN.js.map +0 -1
  512. package/dist/chunk-5Q54VCCH.js.map +0 -1
  513. package/dist/chunk-BCS7WHCK.js +0 -139
  514. package/dist/chunk-BCS7WHCK.js.map +0 -1
  515. package/dist/chunk-EK7NDGFR.js +0 -128
  516. package/dist/chunk-EK7NDGFR.js.map +0 -1
  517. package/dist/chunk-GRG7PHWQ.js +0 -25
  518. package/dist/chunk-GRG7PHWQ.js.map +0 -1
  519. package/dist/chunk-HHZSZYYF.js.map +0 -1
  520. package/dist/chunk-ICDZGUX2.js +0 -186
  521. package/dist/chunk-ICDZGUX2.js.map +0 -1
  522. package/dist/chunk-JUFK3T4Q.js +0 -80
  523. package/dist/chunk-JUFK3T4Q.js.map +0 -1
  524. package/dist/chunk-MYBZRDTY.js.map +0 -1
  525. package/dist/chunk-NRMCVHAU.js.map +0 -1
  526. package/dist/chunk-O77VSFYZ.js.map +0 -1
  527. package/dist/chunk-P3HLDT77.js +0 -59
  528. package/dist/chunk-P3HLDT77.js.map +0 -1
  529. package/dist/chunk-TXTQIYCV.js.map +0 -1
  530. package/dist/chunk-WYBDERIY.js.map +0 -1
  531. package/dist/chunk-Y3KNXVTD.js.map +0 -1
  532. package/dist/chunk-YBW5JSA3.js.map +0 -1
  533. package/dist/chunk-YRXAWWCU.js +0 -45
  534. package/dist/chunk-YRXAWWCU.js.map +0 -1
  535. package/dist/chunk-YWMOIZ6A.js +0 -185
  536. package/dist/chunk-YWMOIZ6A.js.map +0 -1
  537. package/dist/site-request-headers.test.d.ts +0 -1
  538. package/dist/transcription-recordings.d.ts +0 -300
  539. package/src/transcription-recordings.ts +0 -169
  540. /package/dist/{chunk-SIOU2K4U.js.map → chunk-LJH2EYGT.js.map} +0 -0
  541. /package/dist/{chunk-RIY7GYQS.js.map → chunk-PTSROVDG.js.map} +0 -0
  542. /package/dist/{chunk-YRKRZ6OF.js.map → chunk-TOOJIBJC.js.map} +0 -0
  543. /package/dist/{chunk-D2HKF2EF.js.map → chunk-XP5M3IKT.js.map} +0 -0
@@ -1,5 +1,7 @@
1
+ import * as primitives from "./primitives";
2
+ import { defineSchema } from "./define-schema";
1
3
  /**
2
- * Agent configuration: one `agent` object that describes what an OpenGeni
4
+ * Agent configuration: one `agent` object that describes what an Opengeni
3
5
  * agent is (identity), how it answers (renderer, instructions alias) and what
4
6
  * it can do (capabilities). Capabilities are product words; this module owns
5
7
  * the single registry that maps every first-party tool to exactly one of them
@@ -19,6 +21,8 @@
19
21
  * re-exports it); only types cross that edge.
20
22
  */
21
23
  import { z } from "zod";
24
+ import { CUA_DESKTOP_TOOLS, isCuaDesktopModelTool } from "./cua-desktop-tools";
25
+ import { VaultPolicy } from "./vaults";
22
26
  import type { FirstPartyMcpToolName, SessionToolPolicy, ToolRef } from "./index";
23
27
 
24
28
  export const AGENT_CAPABILITY_IDS = [
@@ -31,12 +35,13 @@ export const AGENT_CAPABILITY_IDS = [
31
35
  "schedules",
32
36
  "artifacts",
33
37
  "browser",
38
+ "secrets",
34
39
  "media",
35
40
  "workspaceFiles",
36
41
  "workspaceConnectors",
37
42
  "workspaceAdmin",
38
43
  ] as const;
39
- export const AgentCapabilityId = z.enum(AGENT_CAPABILITY_IDS);
44
+ export const AgentCapabilityId = /* @__PURE__ */ defineSchema(() => z.enum(AGENT_CAPABILITY_IDS));
40
45
  export type AgentCapabilityId = z.infer<typeof AgentCapabilityId>;
41
46
 
42
47
  /** Boolean capabilities: every capability except the three-state `skills`. */
@@ -46,33 +51,36 @@ export const AGENT_BOOLEAN_CAPABILITY_IDS = AGENT_CAPABILITY_IDS.filter(
46
51
  );
47
52
 
48
53
  /** `read` reads installed Skills; `manage` also saves/installs/publishes/removes. */
49
- export const AgentSkillsCapability = z.union([
50
- z.literal("read"),
51
- z.literal("manage"),
52
- z.literal(false),
53
- ]);
54
+ export const AgentSkillsCapability = /* @__PURE__ */ defineSchema(() =>
55
+ z.union([z.literal("read"), z.literal("manage"), z.literal(false)]),
56
+ );
54
57
  export type AgentSkillsCapability = z.infer<typeof AgentSkillsCapability>;
55
58
 
56
- export const AgentCapabilityStartingPoint = z.enum(["all", "none"]);
59
+ export const AgentCapabilityStartingPoint = /* @__PURE__ */ defineSchema(() =>
60
+ z.enum(["all", "none"]),
61
+ );
57
62
  export type AgentCapabilityStartingPoint = z.infer<typeof AgentCapabilityStartingPoint>;
58
63
 
59
- export const AgentCapabilityToggles = z
60
- .object({
61
- webSearch: z.boolean().optional(),
62
- humanInput: z.boolean().optional(),
63
- skills: AgentSkillsCapability.optional(),
64
- goals: z.boolean().optional(),
65
- subagents: z.boolean().optional(),
66
- knowledge: z.boolean().optional(),
67
- schedules: z.boolean().optional(),
68
- artifacts: z.boolean().optional(),
69
- browser: z.boolean().optional(),
70
- media: z.boolean().optional(),
71
- workspaceFiles: z.boolean().optional(),
72
- workspaceConnectors: z.boolean().optional(),
73
- workspaceAdmin: z.boolean().optional(),
74
- })
75
- .strict();
64
+ export const AgentCapabilityToggles = /* @__PURE__ */ defineSchema(() =>
65
+ z
66
+ .object({
67
+ webSearch: primitives.optionalBoolean,
68
+ humanInput: primitives.optionalBoolean,
69
+ skills: AgentSkillsCapability.optional(),
70
+ goals: primitives.optionalBoolean,
71
+ subagents: primitives.optionalBoolean,
72
+ knowledge: primitives.optionalBoolean,
73
+ schedules: primitives.optionalBoolean,
74
+ artifacts: primitives.optionalBoolean,
75
+ browser: primitives.optionalBoolean,
76
+ secrets: primitives.optionalBoolean,
77
+ media: primitives.optionalBoolean,
78
+ workspaceFiles: primitives.optionalBoolean,
79
+ workspaceConnectors: primitives.optionalBoolean,
80
+ workspaceAdmin: primitives.optionalBoolean,
81
+ })
82
+ .strict(),
83
+ );
76
84
  export type AgentCapabilityToggles = z.infer<typeof AgentCapabilityToggles>;
77
85
 
78
86
  /**
@@ -80,72 +88,88 @@ export type AgentCapabilityToggles = z.infer<typeof AgentCapabilityToggles>;
80
88
  * session's own tools plus essentials (human input and reading Skills). An
81
89
  * object starts from one of them and switches individual capabilities.
82
90
  */
83
- export const AgentCapabilities = z.union([
84
- z.literal("all"),
85
- z.literal("none"),
86
- AgentCapabilityToggles.extend({ from: AgentCapabilityStartingPoint }).strict(),
87
- ]);
91
+ export const AgentCapabilities = /* @__PURE__ */ defineSchema(() =>
92
+ z.union([
93
+ z.literal("all"),
94
+ z.literal("none"),
95
+ AgentCapabilityToggles.extend({ from: AgentCapabilityStartingPoint }).strict(),
96
+ ]),
97
+ );
88
98
  export type AgentCapabilities = z.infer<typeof AgentCapabilities>;
89
99
 
90
100
  /** `opengeni` emits `sandbox:`/`artifact:` links and inline visuals; `markdown` does not. */
91
- export const AgentRenderer = z.enum(["opengeni", "markdown"]);
101
+ export const AgentRenderer = /* @__PURE__ */ defineSchema(() => z.enum(["opengeni", "markdown"]));
92
102
  export type AgentRenderer = z.infer<typeof AgentRenderer>;
93
103
 
94
104
  export const AGENT_IDENTITY_MAX_CHARACTERS = 8_000;
95
105
  /** Same bound as `SESSION_INSTRUCTIONS_MAX_CHARACTERS` (asserted by test). */
96
106
  export const AGENT_INSTRUCTIONS_MAX_CHARACTERS = 65_536;
97
107
 
98
- export const AgentIdentity = z.string().trim().min(1).max(AGENT_IDENTITY_MAX_CHARACTERS);
108
+ export const AgentIdentity = /* @__PURE__ */ defineSchema(() =>
109
+ primitives.string.trim().min(1).max(AGENT_IDENTITY_MAX_CHARACTERS),
110
+ );
99
111
 
100
112
  /** The request-side agent object. Every field is optional. */
101
- export const AgentConfigRequest = z
102
- .object({
103
- capabilities: AgentCapabilities.optional(),
104
- /** Replaces only OpenGeni's identity lines; null selects the default identity. */
105
- identity: AgentIdentity.nullable().optional(),
106
- /** Alias of the session `instructions` field (same column, same bound). */
107
- instructions: z.string().trim().min(1).max(AGENT_INSTRUCTIONS_MAX_CHARACTERS).optional(),
108
- renderer: AgentRenderer.optional(),
109
- })
110
- .strict();
113
+ export const AgentConfigRequest = /* @__PURE__ */ defineSchema(() =>
114
+ z
115
+ .object({
116
+ capabilities: AgentCapabilities.optional(),
117
+ /** Replaces only Opengeni's identity lines; null selects the default identity. */
118
+ identity: AgentIdentity.nullable().optional(),
119
+ /** Alias of the session `instructions` field (same column, same bound). */
120
+ instructions: primitives.string
121
+ .trim()
122
+ .min(1)
123
+ .max(AGENT_INSTRUCTIONS_MAX_CHARACTERS)
124
+ .optional(),
125
+ renderer: AgentRenderer.optional(),
126
+ /**
127
+ * Vaults this session may use (input only, Q-08). Intersected with the
128
+ * parent's policy and any session-level `vaultPolicy`.
129
+ */
130
+ vaultPolicy: VaultPolicy.optional(),
131
+ })
132
+ .strict(),
133
+ );
111
134
  export type AgentConfigRequest = z.infer<typeof AgentConfigRequest>;
112
135
 
113
136
  /** Workspace "Defaults for new sessions" agent part (no instructions alias). */
114
- export const WorkspaceAgentDefaults = z
115
- .object({
116
- capabilities: AgentCapabilities.optional(),
117
- identity: AgentIdentity.nullable().optional(),
118
- renderer: AgentRenderer.optional(),
119
- })
120
- .strict();
137
+ export const WorkspaceAgentDefaults = /* @__PURE__ */ defineSchema(() =>
138
+ z
139
+ .object({
140
+ capabilities: AgentCapabilities.optional(),
141
+ identity: AgentIdentity.nullable().optional(),
142
+ renderer: AgentRenderer.optional(),
143
+ })
144
+ .strict(),
145
+ );
121
146
  export type WorkspaceAgentDefaults = z.infer<typeof WorkspaceAgentDefaults>;
122
147
 
123
- export const ResolvedAgentCapabilities = z
124
- .object({
125
- webSearch: z.boolean(),
126
- humanInput: z.boolean(),
127
- skills: AgentSkillsCapability,
128
- goals: z.boolean(),
129
- subagents: z.boolean(),
130
- knowledge: z.boolean(),
131
- schedules: z.boolean(),
132
- artifacts: z.boolean(),
133
- browser: z.boolean(),
134
- media: z.boolean(),
135
- workspaceFiles: z.boolean(),
136
- workspaceConnectors: z.boolean(),
137
- workspaceAdmin: z.boolean(),
138
- })
139
- .strict();
148
+ export const ResolvedAgentCapabilities = /* @__PURE__ */ defineSchema(() =>
149
+ z
150
+ .object({
151
+ webSearch: primitives.boolean,
152
+ humanInput: primitives.boolean,
153
+ skills: AgentSkillsCapability,
154
+ goals: primitives.boolean,
155
+ subagents: primitives.boolean,
156
+ knowledge: primitives.boolean,
157
+ schedules: primitives.boolean,
158
+ artifacts: primitives.boolean,
159
+ browser: primitives.boolean,
160
+ secrets: primitives.boolean,
161
+ media: primitives.boolean,
162
+ workspaceFiles: primitives.boolean,
163
+ workspaceConnectors: primitives.boolean,
164
+ workspaceAdmin: primitives.boolean,
165
+ })
166
+ .strict(),
167
+ );
140
168
  export type ResolvedAgentCapabilities = z.infer<typeof ResolvedAgentCapabilities>;
141
169
 
142
- export const ResolvedAgentConfigSource = z.enum([
143
- "request",
144
- "workspace_default",
145
- "deployment_default",
146
- "inherited",
147
- "legacy_conversion",
148
- ]);
170
+ export const ResolvedAgentConfigSource = /* @__PURE__ */ defineSchema(() =>
171
+ z.enum(["request", "workspace_default", "deployment_default", "inherited", "legacy_conversion"]),
172
+ );
149
173
  export type ResolvedAgentConfigSource = z.infer<typeof ResolvedAgentConfigSource>;
150
174
 
151
175
  /**
@@ -154,53 +178,101 @@ export type ResolvedAgentConfigSource = z.infer<typeof ResolvedAgentConfigSource
154
178
  * wanted on but this deployment does not offer (reported off, never widened
155
179
  * later without a new resolution).
156
180
  */
157
- export const ResolvedAgentConfig = z
158
- .object({
159
- version: z.literal(1),
160
- from: AgentCapabilityStartingPoint,
161
- capabilities: ResolvedAgentCapabilities,
162
- unavailable: z.array(AgentCapabilityId).max(AGENT_CAPABILITY_IDS.length).default([]),
163
- identity: AgentIdentity.nullable(),
164
- renderer: AgentRenderer,
165
- source: ResolvedAgentConfigSource,
166
- })
167
- .strict();
181
+ /**
182
+ * Configurations frozen before the `secrets` capability existed lack it.
183
+ * They read as `from === "all"` (Q-17); stored rows are never rewritten.
184
+ */
185
+ function withStoredSecretsCapability(value: unknown): unknown {
186
+ if (value === null || typeof value !== "object" || Array.isArray(value)) return value;
187
+ const config = value as { from?: unknown; capabilities?: unknown };
188
+ const capabilities = config.capabilities;
189
+ if (
190
+ capabilities === null ||
191
+ typeof capabilities !== "object" ||
192
+ Array.isArray(capabilities) ||
193
+ Object.hasOwn(capabilities, "secrets")
194
+ ) {
195
+ return value;
196
+ }
197
+ return { ...config, capabilities: { ...capabilities, secrets: config.from === "all" } };
198
+ }
199
+
200
+ export const ResolvedAgentConfig = /* @__PURE__ */ defineSchema(() =>
201
+ z.preprocess(
202
+ withStoredSecretsCapability,
203
+ z
204
+ .object({
205
+ version: z.literal(1),
206
+ from: AgentCapabilityStartingPoint,
207
+ capabilities: ResolvedAgentCapabilities,
208
+ unavailable: z.array(AgentCapabilityId).max(AGENT_CAPABILITY_IDS.length).default([]),
209
+ /**
210
+ * Why each `unavailable` capability is off, keyed by capability. Present
211
+ * whenever `unavailable` is non-empty; absent on historical configurations.
212
+ */
213
+ unavailableReasons: z.partialRecord(AgentCapabilityId, primitives.string).optional(),
214
+ identity: AgentIdentity.nullable(),
215
+ renderer: AgentRenderer,
216
+ source: ResolvedAgentConfigSource,
217
+ })
218
+ .strict(),
219
+ ),
220
+ );
168
221
  export type ResolvedAgentConfig = z.infer<typeof ResolvedAgentConfig>;
169
222
 
170
223
  /** `PUT /v1/workspaces/:workspaceId/sessions/:sessionId/agent`. Omitted fields keep current values. */
171
- export const UpdateSessionAgentRequest = z
172
- .object({
173
- agent: AgentConfigRequest,
174
- expectedVersion: z.number().int().positive(),
175
- })
176
- .strict();
224
+ export const UpdateSessionAgentRequest = /* @__PURE__ */ defineSchema(() =>
225
+ z
226
+ .object({
227
+ agent: AgentConfigRequest,
228
+ expectedVersion: primitives.positiveInteger,
229
+ })
230
+ .strict(),
231
+ );
177
232
  export type UpdateSessionAgentRequest = z.infer<typeof UpdateSessionAgentRequest>;
178
233
 
179
- /** Client-safe rollout projection. */
180
- export const ClientAgentConfig = z
181
- .object({
182
- enabled: z.boolean(),
183
- defaultForNewSessions: z.boolean(),
184
- capabilities: z.array(
185
- z
186
- .object({
187
- id: AgentCapabilityId,
188
- available: z.boolean(),
189
- reason: z.string().max(200).optional(),
190
- })
191
- .strict(),
192
- ),
193
- })
194
- .strict();
234
+ /** Client-safe agent-configuration projection. */
235
+ export const ClientAgentConfig = /* @__PURE__ */ defineSchema(() =>
236
+ z
237
+ .object({
238
+ /** @deprecated Agent configuration is always on; servers always report `true`. */
239
+ enabled: primitives.boolean,
240
+ /** @deprecated Omitted `agent` always resolves `{ capabilities: "all" }`; always `true`. */
241
+ defaultForNewSessions: primitives.boolean,
242
+ capabilities: z.array(
243
+ z
244
+ .object({
245
+ id: AgentCapabilityId,
246
+ available: primitives.boolean,
247
+ reason: z.string().max(200).optional(),
248
+ })
249
+ .strict(),
250
+ ),
251
+ })
252
+ .strict(),
253
+ );
195
254
  export type ClientAgentConfig = z.infer<typeof ClientAgentConfig>;
196
255
 
197
256
  // ---------------------------------------------------------------------------
198
257
  // Capability registry
199
258
  // ---------------------------------------------------------------------------
200
259
 
201
- /** A first-party tool's owner: a capability, or pure runtime mechanics. */
260
+ /** A built-in MCP server's owner: a capability, or pure runtime mechanics. */
202
261
  export type AgentToolCapability = AgentCapabilityId | "runtime";
203
262
 
263
+ /**
264
+ * A first-party tool's owner: a capability, pure runtime mechanics, or the
265
+ * attached compute (a managed sandbox or Connected Machine).
266
+ */
267
+ export type AgentFirstPartyToolOwner = AgentToolCapability | "sandbox";
268
+
269
+ /** Owners no capability toggles: the runtime or the attached compute derives them. */
270
+ export function isDerivedAgentToolOwner(
271
+ owner: AgentFirstPartyToolOwner,
272
+ ): owner is "runtime" | "sandbox" {
273
+ return owner === "runtime" || owner === "sandbox";
274
+ }
275
+
204
276
  /**
205
277
  * Exhaustive map from every `FIRST_PARTY_MCP_TOOL_NAMES` entry to exactly one
206
278
  * owner. The `Record` type makes an unmapped new name a compile error, and
@@ -208,15 +280,22 @@ export type AgentToolCapability = AgentCapabilityId | "runtime";
208
280
  *
209
281
  * `runtime` tools are mechanics every agent needs regardless of what it may do:
210
282
  * - `wait_for_input`: ends the turn and waits for the next input.
211
- * - `command_read` / `command_wait`: read/await the session's own background
212
- * sandbox commands (the shell already exists whenever a sandbox is attached).
213
283
  * - `set_session_title`: session titling.
284
+ *
285
+ * `sandbox` tools are derived from attached compute and never toggled:
286
+ * - `command_read` / `command_wait`: read/await the session's own background
287
+ * commands. A command can only exist on a managed sandbox or Connected
288
+ * Machine, so a turn with neither attached never receives them.
214
289
  */
215
290
  export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
216
291
  set_session_title: "runtime",
217
292
  wait_for_input: "runtime",
218
- command_wait: "runtime",
219
- command_read: "runtime",
293
+ // Reaching the person: a push to the phones of whoever started the session.
294
+ notify_user: "humanInput",
295
+ notification_withdraw: "humanInput",
296
+ inbox_tidy: "humanInput",
297
+ command_wait: "sandbox",
298
+ command_read: "sandbox",
220
299
 
221
300
  goal_set: "goals",
222
301
  goal_update: "goals",
@@ -231,6 +310,10 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
231
310
  knowledge_browse: "knowledge",
232
311
  knowledge_save: "knowledge",
233
312
  knowledge_retain_file: "knowledge",
313
+ // Recorded meetings are part of what the workspace knows.
314
+ meetings_search: "knowledge",
315
+ meeting_read: "knowledge",
316
+ meeting_notes_save: "knowledge",
234
317
  knowledge_retain_message: "knowledge",
235
318
  knowledge_archive: "knowledge",
236
319
  instruction_policy_save: "knowledge",
@@ -265,6 +348,7 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
265
348
  sandbox_provision: "workspaceAdmin",
266
349
  connected_machine_remove: "workspaceAdmin",
267
350
  connected_machine_enroll_token: "workspaceAdmin",
351
+ connected_machine_enable_screen_control: "workspaceAdmin",
268
352
  project_list: "workspaceAdmin",
269
353
  project_get: "workspaceAdmin",
270
354
  project_create: "workspaceAdmin",
@@ -272,16 +356,28 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
272
356
  project_reorder: "workspaceAdmin",
273
357
  project_delete: "workspaceAdmin",
274
358
  session_set_project: "workspaceAdmin",
359
+ // App actions: run as the person in a chat they started; changes ask first.
360
+ admin_actions_search: "workspaceAdmin",
361
+ admin_action_describe: "workspaceAdmin",
362
+ admin_action_call: "workspaceAdmin",
275
363
  rig_list: "workspaceAdmin",
276
364
  rig_get: "workspaceAdmin",
277
365
  rig_propose_change: "workspaceAdmin",
278
366
  rig_verify: "workspaceAdmin",
279
367
  rig_promote: "workspaceAdmin",
280
- variable_set_list: "workspaceAdmin",
281
- environment_list: "workspaceAdmin",
282
- variable_set_get_variable: "workspaceAdmin",
283
- variable_set_set_variable: "workspaceAdmin",
284
- environment_set_variable: "workspaceAdmin",
368
+ secret_search: "secrets",
369
+ secret_save: "secrets",
370
+ secret_get: "secrets",
371
+ secret_move: "secrets",
372
+ secret_delete: "secrets",
373
+ secret_profile_get: "secrets",
374
+ secret_profile_set: "secrets",
375
+ // Retired variable-set names select their secret_* successors.
376
+ variable_set_list: "secrets",
377
+ environment_list: "secrets",
378
+ variable_set_get_variable: "secrets",
379
+ variable_set_set_variable: "secrets",
380
+ environment_set_variable: "secrets",
285
381
  capability_catalog_search: "workspaceAdmin",
286
382
  capability_authorization_request: "workspaceAdmin",
287
383
  custom_mcp_setup_request: "workspaceAdmin",
@@ -292,11 +388,16 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
292
388
  session_wait: "subagents",
293
389
  session_create: "subagents",
294
390
  session_send_message: "subagents",
391
+ session_message_status: "subagents",
392
+ session_target_get: "subagents",
393
+ session_target_set: "subagents",
295
394
  session_pause: "subagents",
296
395
  session_resume: "subagents",
297
396
  session_steer: "subagents",
298
397
  session_human_input_respond: "subagents",
299
398
  set_other_session_title: "subagents",
399
+ // Bot templates start new chats, like session_create.
400
+ bot_template_save: "subagents",
300
401
  session_set_model: "subagents",
301
402
 
302
403
  interaction_discover: "browser",
@@ -308,6 +409,9 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
308
409
  browser_act: "browser",
309
410
  browser_clipboard: "browser",
310
411
  browser_debug: "browser",
412
+ browser_downloads: "browser",
413
+ browser_download_save: "browser",
414
+ browser_record: "browser",
311
415
  browser_auth: "browser",
312
416
  interaction_request_human: "browser",
313
417
  browser_identity: "browser",
@@ -319,6 +423,8 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
319
423
  computer_clipboard: "browser",
320
424
  computer_act: "browser",
321
425
  computer_lifecycle: "browser",
426
+ // Office.js in a workbook the person has open with the Opengeni add-in.
427
+ excel_run: "browser",
322
428
 
323
429
  github_connect_link: "workspaceConnectors",
324
430
  github_repositories_list: "workspaceConnectors",
@@ -378,6 +484,8 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
378
484
  scheduled_tasks_trigger: "schedules",
379
485
  scheduled_tasks_delete: "schedules",
380
486
  scheduled_task_runs_list: "schedules",
487
+ event_sources_list: "schedules",
488
+ events_get: "schedules",
381
489
 
382
490
  artifacts_list: "artifacts",
383
491
  artifacts_get_source: "artifacts",
@@ -387,6 +495,30 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
387
495
  artifacts_rollback: "artifacts",
388
496
  artifacts_archive: "artifacts",
389
497
  artifacts_restore: "artifacts",
498
+ site_data_describe: "artifacts",
499
+ site_data_define_collection: "artifacts",
500
+ site_data_query: "artifacts",
501
+ site_data_write: "artifacts",
502
+ site_data_import: "artifacts",
503
+ site_data_export: "artifacts",
504
+ site_data_reset: "artifacts",
505
+ site_files_list: "artifacts",
506
+ site_files_upload: "artifacts",
507
+ site_files_delete: "artifacts",
508
+ site_publication_get: "artifacts",
509
+ site_publication_update: "artifacts",
510
+ site_publication_apply_fix: "artifacts",
511
+ site_hostname_check: "artifacts",
512
+ site_sql_inspect: "artifacts",
513
+ site_sql_enable: "artifacts",
514
+ site_sql_migrate: "artifacts",
515
+ site_sql_define_query: "artifacts",
516
+ site_sql_query: "artifacts",
517
+ site_sql_run: "artifacts",
518
+ site_sql_execute: "artifacts",
519
+ site_sql_export: "artifacts",
520
+ site_sql_import: "artifacts",
521
+ site_sql_reset: "artifacts",
390
522
  sandbox_file_publish: "artifacts",
391
523
  editable_artifact_list: "artifacts",
392
524
  editable_artifact_create: "artifacts",
@@ -396,15 +528,18 @@ export const FIRST_PARTY_MCP_TOOL_CAPABILITIES = {
396
528
  editable_artifact_apply: "artifacts",
397
529
  editable_artifact_export: "artifacts",
398
530
  editable_artifact_export_status: "artifacts",
399
- } as const satisfies Record<FirstPartyMcpToolName, AgentToolCapability>;
531
+ } as const satisfies Record<FirstPartyMcpToolName, AgentFirstPartyToolOwner>;
400
532
 
401
533
  /** Owner of a non-MCP tool: a capability, runtime mechanics, or the sandbox. */
402
534
  export type AgentFunctionToolClass = AgentCapabilityId | "runtime" | "sandbox";
403
535
 
404
536
  /** Tools served outside the first-party MCP catalog, by the name the model sees. */
405
537
  export const AGENT_FUNCTION_TOOL_CAPABILITIES = {
406
- // Hosted provider tools.
538
+ // Web search: the provider-hosted `web_search`/`x_search` tools, or
539
+ // Opengeni's provider-agnostic `web_search` and `web_fetch` function tools
540
+ // (one transport per turn; the capability is the same).
407
541
  web_search: "webSearch",
542
+ web_fetch: "webSearch",
408
543
  x_search: "webSearch",
409
544
  image_generation: "media",
410
545
  // Runtime function tools.
@@ -489,7 +624,7 @@ export const AGENT_BUILTIN_MCP_SERVER_CAPABILITIES = {
489
624
  "google-drive-publishing": "workspaceConnectors",
490
625
  } as const satisfies Record<string, AgentToolCapability>;
491
626
 
492
- export function firstPartyMcpToolCapability(tool: FirstPartyMcpToolName): AgentToolCapability {
627
+ export function firstPartyMcpToolCapability(tool: FirstPartyMcpToolName): AgentFirstPartyToolOwner {
493
628
  return FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
494
629
  }
495
630
 
@@ -504,10 +639,21 @@ export type AgentToolEnvironment = {
504
639
  media?: boolean | undefined;
505
640
  hasDeferredTools?: boolean;
506
641
  routerInHistory?: boolean;
642
+ /**
643
+ * Whether the turn has a managed sandbox or Connected Machine attached.
644
+ * `false` withholds the `sandbox`-owned first-party tools, which could never
645
+ * find a command; undefined means not yet known and keeps them.
646
+ */
647
+ sandboxAttached?: boolean;
507
648
  };
508
649
 
650
+ /** Runtime mechanics every configured agent receives. */
509
651
  export const AGENT_RUNTIME_MECHANIC_TOOL_NAMES = [
510
652
  "wait_for_input",
653
+ ] as const satisfies readonly FirstPartyMcpToolName[];
654
+
655
+ /** First-party tools a configured agent receives whenever compute is attached. */
656
+ export const AGENT_SANDBOX_MECHANIC_TOOL_NAMES = [
511
657
  "command_read",
512
658
  "command_wait",
513
659
  ] as const satisfies readonly FirstPartyMcpToolName[];
@@ -515,7 +661,9 @@ export const AGENT_RUNTIME_MECHANIC_TOOL_NAMES = [
515
661
  /**
516
662
  * The one turn-time capability gate. Null means the historical attachment
517
663
  * rules, including unconditional Skill tools and router. Resource-derived
518
- * sandbox tools, product MCPs and runtime mechanics are never toggled.
664
+ * sandbox tools, product MCPs and runtime mechanics are never toggled; the
665
+ * `sandbox`-owned first-party tools follow `environment.sandboxAttached` for
666
+ * every session, configured or not.
519
667
  */
520
668
  export function resolveAgentToolFamilies(
521
669
  config: ResolvedAgentConfig | null | undefined,
@@ -530,8 +678,10 @@ export function resolveAgentToolFamilies(
530
678
  const humanInput = enabled("humanInput") && environment.humanInput !== false;
531
679
  const media = enabled("media") && environment.media !== false;
532
680
  const skills = !config ? "manage" : enabled("skills") ? config.capabilities.skills : false;
681
+ const sandboxTools = environment.sandboxAttached !== false;
533
682
  const allowsFirstPartyTool = (name: FirstPartyMcpToolName): boolean => {
534
- const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[name];
683
+ const owner: AgentFirstPartyToolOwner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[name];
684
+ if (owner === "sandbox") return sandboxTools;
535
685
  return owner === "runtime" || enabled(owner);
536
686
  };
537
687
  return {
@@ -539,21 +689,28 @@ export function resolveAgentToolFamilies(
539
689
  humanInput,
540
690
  media,
541
691
  subagents: enabled("subagents"),
692
+ /** Secret references resolve, the secret_* tools and the ask-card secret kind exist. */
693
+ secrets: enabled("secrets"),
542
694
  skills,
543
695
  router:
544
696
  !config || environment.hasDeferredTools === true || environment.routerInHistory === true,
545
697
  allowsFirstPartyTool,
546
698
  firstPartyTools(names: readonly FirstPartyMcpToolName[]): FirstPartyMcpToolName[] {
547
699
  return !config
548
- ? [...names]
700
+ ? names.filter(
701
+ (name) => sandboxTools || FIRST_PARTY_MCP_TOOL_CAPABILITIES[name] !== "sandbox",
702
+ )
549
703
  : [
550
704
  ...new Set([
551
705
  ...names.filter(allowsFirstPartyTool),
552
706
  ...AGENT_RUNTIME_MECHANIC_TOOL_NAMES,
707
+ ...(sandboxTools ? AGENT_SANDBOX_MECHANIC_TOOL_NAMES : []),
553
708
  ]),
554
709
  ];
555
710
  },
556
711
  allowsFunctionTool(name: string): boolean {
712
+ if (isCuaDesktopModelTool(name))
713
+ return !environment.unavailable?.includes("browser") && enabled("browser");
557
714
  if (!config) return true;
558
715
  const owner = (AGENT_FUNCTION_TOOL_CAPABILITIES as Record<string, AgentFunctionToolClass>)[
559
716
  name
@@ -597,7 +754,7 @@ export const AGENT_CAPABILITY_DESCRIPTIONS: Readonly<
597
754
  webSearch: { label: "Web search", description: "Search the public web for current information." },
598
755
  humanInput: {
599
756
  label: "Ask questions",
600
- description: "Pause and ask the person for a decision or missing detail.",
757
+ description: "Ask the person for a decision or missing detail, and notify their phone.",
601
758
  },
602
759
  skills: {
603
760
  label: "Skills",
@@ -612,12 +769,16 @@ export const AGENT_CAPABILITY_DESCRIPTIONS: Readonly<
612
769
  label: "Knowledge",
613
770
  description: "Search and save workspace knowledge, task notes, and instructions.",
614
771
  },
615
- schedules: { label: "Schedules", description: "Create and manage scheduled tasks." },
772
+ schedules: { label: "Automations", description: "Create and manage automations." },
616
773
  artifacts: {
617
774
  label: "Artifacts and Sites",
618
775
  description: "Publish files, documents, and Sites people can open.",
619
776
  },
620
777
  browser: { label: "Browser and computer", description: "Use a browser or desktop computer." },
778
+ secrets: {
779
+ label: "Secrets",
780
+ description: "Use saved passwords, keys, and codes by reference, and save new ones.",
781
+ },
621
782
  media: { label: "Images and video", description: "Generate images and videos." },
622
783
  workspaceFiles: {
623
784
  label: "Workspace files",
@@ -629,7 +790,7 @@ export const AGENT_CAPABILITY_DESCRIPTIONS: Readonly<
629
790
  },
630
791
  workspaceAdmin: {
631
792
  label: "Workspace admin",
632
- description: "Manage variable sets, projects, rigs, machines, and connector setup.",
793
+ description: "Manage projects, rigs, machines, and connector setup.",
633
794
  },
634
795
  };
635
796
 
@@ -643,6 +804,8 @@ export const AGENT_CAPABILITY_DESCRIPTIONS: Readonly<
643
804
  * `runtime_mechanics` are always present; every other module is included only
644
805
  * when its capability or resource is present. The model-context inspector
645
806
  * reports them as metadata on the `operational_contract` layer.
807
+ * `workspace_environment` and `attachments` are retired (never rendered) and
808
+ * stay listed only so stored model-context snapshots still parse.
646
809
  */
647
810
  export const AGENT_PROMPT_MODULE_IDS = [
648
811
  "base_behavior",
@@ -654,14 +817,18 @@ export const AGENT_PROMPT_MODULE_IDS = [
654
817
  "workspace_environment",
655
818
  "rig",
656
819
  "artifacts",
820
+ "media",
657
821
  "goals",
658
822
  "subagents",
659
823
  "knowledge",
660
824
  "skills",
825
+ "secrets",
661
826
  "admin",
662
827
  "attachments",
663
828
  ] as const;
664
- export const AgentPromptModuleId = z.enum(AGENT_PROMPT_MODULE_IDS);
829
+ export const AgentPromptModuleId = /* @__PURE__ */ defineSchema(() =>
830
+ z.enum(AGENT_PROMPT_MODULE_IDS),
831
+ );
665
832
  export type AgentPromptModuleId = z.infer<typeof AgentPromptModuleId>;
666
833
 
667
834
  export const AGENT_PROMPT_MODULE_TITLES: Readonly<Record<AgentPromptModuleId, string>> = {
@@ -674,10 +841,12 @@ export const AGENT_PROMPT_MODULE_TITLES: Readonly<Record<AgentPromptModuleId, st
674
841
  workspace_environment: "Workspace environment",
675
842
  rig: "Sandbox environment",
676
843
  artifacts: "Documents, files, and visuals",
844
+ media: "Images and video",
677
845
  goals: "Goals",
678
846
  subagents: "Session coordination",
679
847
  knowledge: "Knowledge",
680
848
  skills: "Skills",
849
+ secrets: "Secrets",
681
850
  admin: "Integration setup",
682
851
  attachments: "Attached files",
683
852
  };
@@ -687,10 +856,12 @@ export const AGENT_CAPABILITY_PROMPT_MODULES: Readonly<
687
856
  Partial<Record<AgentCapabilityId, readonly AgentPromptModuleId[]>>
688
857
  > = {
689
858
  artifacts: ["artifacts"],
859
+ media: ["media"],
690
860
  goals: ["goals"],
691
861
  subagents: ["subagents"],
692
862
  knowledge: ["knowledge"],
693
863
  skills: ["skills"],
864
+ secrets: ["secrets"],
694
865
  workspaceAdmin: ["admin"],
695
866
  };
696
867
 
@@ -698,12 +869,9 @@ export const AGENT_CAPABILITY_PROMPT_MODULES: Readonly<
698
869
  // Resolution
699
870
  // ---------------------------------------------------------------------------
700
871
 
701
- export const AgentConfigErrorCode = z.enum([
702
- "agent_capability_unavailable",
703
- "agent_config_conflict",
704
- "agent_config_widening",
705
- "agent_config_not_enabled",
706
- ]);
872
+ export const AgentConfigErrorCode = /* @__PURE__ */ defineSchema(() =>
873
+ z.enum(["agent_capability_unavailable", "agent_config_conflict", "agent_config_widening"]),
874
+ );
707
875
  export type AgentConfigErrorCode = z.infer<typeof AgentConfigErrorCode>;
708
876
 
709
877
  /** Typed resolution failure. Transports render it as 422 with `details.code`. */
@@ -739,6 +907,7 @@ export function allAgentCapabilities(): ResolvedAgentCapabilities {
739
907
  schedules: true,
740
908
  artifacts: true,
741
909
  browser: true,
910
+ secrets: true,
742
911
  media: true,
743
912
  workspaceFiles: true,
744
913
  workspaceConnectors: true,
@@ -758,6 +927,7 @@ export function noneAgentCapabilities(): ResolvedAgentCapabilities {
758
927
  schedules: false,
759
928
  artifacts: false,
760
929
  browser: false,
930
+ secrets: false,
761
931
  media: false,
762
932
  workspaceFiles: false,
763
933
  workspaceConnectors: false,
@@ -856,10 +1026,7 @@ export type ResolveAgentConfigInput = {
856
1026
  /** The legacy session `instructions` field (alias target). */
857
1027
  instructions?: string | undefined;
858
1028
  workspace: AgentConfigWorkspaceContext;
859
- deployment: AgentConfigDeploymentLimits & {
860
- admissionEnabled: boolean;
861
- defaultForNewSessions: boolean;
862
- };
1029
+ deployment: AgentConfigDeploymentLimits;
863
1030
  /** Undefined for a top-level session. */
864
1031
  parent?: AgentConfigParent | undefined;
865
1032
  /** Whether the new session carries a goal. */
@@ -885,9 +1052,11 @@ function agentConfigFromCapabilities(input: {
885
1052
  renderer: AgentRenderer;
886
1053
  source: ResolvedAgentConfigSource;
887
1054
  inheritedUnavailable?: readonly AgentCapabilityId[] | undefined;
1055
+ inheritedUnavailableReasons?: Partial<Record<AgentCapabilityId, string>> | undefined;
888
1056
  }): ResolvedAgentConfig {
889
1057
  const capabilities = { ...input.wanted };
890
1058
  const unavailable = new Set<AgentCapabilityId>(input.inheritedUnavailable ?? []);
1059
+ const unavailableReasons: Partial<Record<AgentCapabilityId, string>> = {};
891
1060
  for (const id of AGENT_CAPABILITY_IDS) {
892
1061
  const reason = input.deployment.unavailable[id];
893
1062
  if (reason === undefined || !agentCapabilityEnabled(capabilities, id)) continue;
@@ -903,6 +1072,10 @@ function agentConfigFromCapabilities(input: {
903
1072
  else capabilities[id] = false;
904
1073
  }
905
1074
  for (const id of unavailable) {
1075
+ unavailableReasons[id] =
1076
+ input.deployment.unavailable[id] ??
1077
+ input.inheritedUnavailableReasons?.[id] ??
1078
+ "not available in the inherited configuration";
906
1079
  if (id === "skills") capabilities.skills = false;
907
1080
  else capabilities[id] = false;
908
1081
  }
@@ -911,6 +1084,7 @@ function agentConfigFromCapabilities(input: {
911
1084
  from: input.from,
912
1085
  capabilities,
913
1086
  unavailable: AGENT_CAPABILITY_IDS.filter((id) => unavailable.has(id)),
1087
+ ...(unavailable.size > 0 ? { unavailableReasons } : {}),
914
1088
  identity: input.identity,
915
1089
  renderer: input.renderer,
916
1090
  source: input.source,
@@ -948,19 +1122,13 @@ function resolveInstructionsAlias(
948
1122
  * Resolve the frozen agent configuration for a new session.
949
1123
  *
950
1124
  * Order: deployment limits, then the workspace default, then the request, then
951
- * the parent (children only narrow). Returns `config: null` (exact legacy)
952
- * when nothing asks for a configuration: no request `agent`, no configured
953
- * parent, no honored workspace default, and the default-for-new-sessions
954
- * switch off (or a legacy parent, which keeps its tree legacy).
1125
+ * the parent (children only narrow). An omitted `agent` on a top-level
1126
+ * session resolves the workspace default, else `{ capabilities: "all" }`.
1127
+ * Returns `config: null` (exact legacy) only under a legacy parent, which
1128
+ * keeps its tree legacy, and for site-auth maintenance sessions.
955
1129
  */
956
1130
  export function resolveAgentConfig(input: ResolveAgentConfigInput): ResolveAgentConfigResult {
957
1131
  const { request } = input;
958
- if (request !== undefined && !input.deployment.admissionEnabled) {
959
- throw new AgentConfigError(
960
- "agent_config_not_enabled",
961
- "agent configuration is not enabled on this deployment",
962
- );
963
- }
964
1132
  const instructions = resolveInstructionsAlias(request, input.instructions);
965
1133
  const requestConfigFields =
966
1134
  request !== undefined &&
@@ -970,7 +1138,7 @@ export function resolveAgentConfig(input: ResolveAgentConfigInput): ResolveAgent
970
1138
  request.instructions !== undefined);
971
1139
 
972
1140
  const parent = input.parent;
973
- const workspaceDefaults = input.deployment.admissionEnabled ? input.workspace.defaults : null;
1141
+ const workspaceDefaults = input.workspace.defaults;
974
1142
 
975
1143
  // --- Omitted agent ---------------------------------------------------------
976
1144
  if (!requestConfigFields) {
@@ -991,11 +1159,8 @@ export function resolveAgentConfig(input: ResolveAgentConfigInput): ResolveAgent
991
1159
  const config = resolveTopLevel(input, workspaceDefaults, "workspace_default");
992
1160
  return { config, instructions };
993
1161
  }
994
- if (input.deployment.defaultForNewSessions) {
995
- const config = resolveTopLevel(input, { capabilities: "all" }, "deployment_default");
996
- return { config, instructions };
997
- }
998
- return { config: null, instructions };
1162
+ const config = resolveTopLevel(input, { capabilities: "all" }, "deployment_default");
1163
+ return { config, instructions };
999
1164
  }
1000
1165
 
1001
1166
  // --- Explicit agent ---------------------------------------------------------
@@ -1046,6 +1211,7 @@ export function resolveAgentConfig(input: ResolveAgentConfigInput): ResolveAgent
1046
1211
  renderer: request.renderer ?? parentConfig?.renderer ?? defaultRenderer(input.creator),
1047
1212
  source: "request",
1048
1213
  inheritedUnavailable: parentConfig?.unavailable,
1214
+ inheritedUnavailableReasons: parentConfig?.unavailableReasons,
1049
1215
  });
1050
1216
  return {
1051
1217
  config: withGoalImplication(config, input.goal, requested.toggles.goals === false, ceiling),
@@ -1118,18 +1284,12 @@ export function resolveAgentConfigUpdate(input: {
1118
1284
  current: ResolvedAgentConfig | null;
1119
1285
  legacyCeiling: ResolvedAgentCapabilities;
1120
1286
  request: AgentConfigRequest;
1121
- deployment: AgentConfigDeploymentLimits & { admissionEnabled: boolean };
1287
+ deployment: AgentConfigDeploymentLimits;
1122
1288
  onlyNarrow: boolean;
1123
1289
  /** A parent's configuration or legacy ceiling; children never widen past it. */
1124
1290
  parentCeiling?: ResolvedAgentCapabilities | undefined;
1125
1291
  goal: boolean;
1126
1292
  }): ResolvedAgentConfig {
1127
- if (!input.deployment.admissionEnabled) {
1128
- throw new AgentConfigError(
1129
- "agent_config_not_enabled",
1130
- "agent configuration is not enabled on this deployment",
1131
- );
1132
- }
1133
1293
  const current: ResolvedAgentConfig = input.current ?? {
1134
1294
  version: 1,
1135
1295
  from: "all",
@@ -1185,6 +1345,7 @@ export function resolveAgentConfigUpdate(input: {
1185
1345
  inheritedUnavailable: current.unavailable.filter(
1186
1346
  (id) => input.deployment.unavailable[id] !== undefined,
1187
1347
  ),
1348
+ inheritedUnavailableReasons: current.unavailableReasons,
1188
1349
  });
1189
1350
  return withGoalImplication(
1190
1351
  config,
@@ -1215,8 +1376,8 @@ export function agentConfigFirstPartyMcpTools(
1215
1376
  explicit?: readonly FirstPartyMcpToolName[],
1216
1377
  ): FirstPartyMcpToolName[] {
1217
1378
  for (const tool of explicit ?? []) {
1218
- const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
1219
- if (owner !== "runtime" && capabilityFilteredOut(config, owner)) {
1379
+ const owner: AgentFirstPartyToolOwner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
1380
+ if (!isDerivedAgentToolOwner(owner) && capabilityFilteredOut(config, owner)) {
1220
1381
  throw new AgentConfigError(
1221
1382
  "agent_config_conflict",
1222
1383
  `firstPartyMcpTools lists ${tool}, but agent capability ${owner} is off`,
@@ -1225,8 +1386,8 @@ export function agentConfigFirstPartyMcpTools(
1225
1386
  }
1226
1387
  }
1227
1388
  return baseline.filter((tool) => {
1228
- const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
1229
- return owner === "runtime" || !capabilityFilteredOut(config, owner);
1389
+ const owner: AgentFirstPartyToolOwner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
1390
+ return isDerivedAgentToolOwner(owner) || !capabilityFilteredOut(config, owner);
1230
1391
  });
1231
1392
  }
1232
1393
 
@@ -1241,9 +1402,9 @@ export function agentConfigAddedFirstPartyMcpTools(
1241
1402
  defaults: readonly FirstPartyMcpToolName[],
1242
1403
  ): FirstPartyMcpToolName[] {
1243
1404
  return defaults.filter((tool) => {
1244
- const owner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
1405
+ const owner: AgentFirstPartyToolOwner = FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool];
1245
1406
  return (
1246
- owner !== "runtime" &&
1407
+ !isDerivedAgentToolOwner(owner) &&
1247
1408
  !agentCapabilityEnabled(previous, owner) &&
1248
1409
  agentCapabilityEnabled(next.capabilities, owner)
1249
1410
  );
@@ -1337,7 +1498,7 @@ export function legacyEffectiveAgentCapabilities(input: {
1337
1498
  */
1338
1499
  defaultServerIds?: Iterable<string> | undefined;
1339
1500
  }): ResolvedAgentCapabilities {
1340
- const selected = new Set<AgentToolCapability>(
1501
+ const selected = new Set<AgentFirstPartyToolOwner>(
1341
1502
  input.firstPartyMcpTools.map((tool) => FIRST_PARTY_MCP_TOOL_CAPABILITIES[tool]),
1342
1503
  );
1343
1504
  const ids = new Set(input.tools.map((tool) => tool.id));
@@ -1363,6 +1524,8 @@ export function legacyEffectiveAgentCapabilities(input: {
1363
1524
  schedules: selected.has("schedules"),
1364
1525
  artifacts: selected.has("artifacts"),
1365
1526
  browser: selected.has("browser"),
1527
+ // Legacy sessions keep reference resolution on (D25, Q-17).
1528
+ secrets: true,
1366
1529
  media: true,
1367
1530
  workspaceFiles: serverOn("files"),
1368
1531
  workspaceConnectors:
@@ -1387,7 +1550,7 @@ export function agentConfigDeploymentLimitsFromAllowlist(
1387
1550
  for (const id of AGENT_CAPABILITY_IDS) {
1388
1551
  const tools = firstPartyMcpToolsForCapability(id);
1389
1552
  if (tools.length > 0 && !tools.some((tool) => allowedSet.has(tool))) {
1390
- unavailable[id] = "its tools are not allowed on this server";
1553
+ unavailable[id] = `its tools are not allowed on this server: ${tools.join(", ")}`;
1391
1554
  }
1392
1555
  }
1393
1556
  return { unavailable: { ...unavailable, ...extra } };
@@ -1406,42 +1569,44 @@ export type AgentEffectiveMcpServerEntry = {
1406
1569
  toolsKnown: boolean;
1407
1570
  };
1408
1571
 
1409
- export const AgentEffectiveTools = z
1410
- .object({
1411
- capabilities: ResolvedAgentCapabilities,
1412
- unavailable: z.array(AgentCapabilityId),
1413
- /** False means media adapters await exact turn/credential attachment; tools does not guess them. */
1414
- mediaToolsKnown: z.boolean().optional(),
1415
- tools: z
1416
- .array(
1417
- z
1418
- .object({
1419
- name: z.string().min(1).max(512),
1420
- capability: z.union([
1421
- AgentCapabilityId,
1422
- z.literal("runtime"),
1423
- z.literal("sandbox"),
1424
- z.literal("product"),
1425
- ]),
1426
- source: z.enum(["first_party", "runtime", "hosted", "sandbox", "mcp"]),
1427
- visibility: z.enum(["upfront", "search"]).optional(),
1428
- })
1429
- .strict(),
1430
- )
1431
- .max(512),
1432
- mcpServers: z
1433
- .array(
1434
- z
1435
- .object({
1436
- id: z.string().min(1).max(200),
1437
- capability: z.union([AgentCapabilityId, z.literal("runtime"), z.literal("product")]),
1438
- toolsKnown: z.boolean(),
1439
- })
1440
- .strict(),
1441
- )
1442
- .max(256),
1443
- })
1444
- .strict();
1572
+ export const AgentEffectiveTools = /* @__PURE__ */ defineSchema(() =>
1573
+ z
1574
+ .object({
1575
+ capabilities: ResolvedAgentCapabilities,
1576
+ unavailable: z.array(AgentCapabilityId),
1577
+ /** False means media adapters await exact turn/credential attachment; tools does not guess them. */
1578
+ mediaToolsKnown: primitives.optionalBoolean,
1579
+ tools: z
1580
+ .array(
1581
+ z
1582
+ .object({
1583
+ name: z.string().min(1).max(512),
1584
+ capability: z.union([
1585
+ AgentCapabilityId,
1586
+ z.literal("runtime"),
1587
+ z.literal("sandbox"),
1588
+ z.literal("product"),
1589
+ ]),
1590
+ source: z.enum(["first_party", "runtime", "hosted", "sandbox", "mcp"]),
1591
+ visibility: z.enum(["upfront", "search"]).optional(),
1592
+ })
1593
+ .strict(),
1594
+ )
1595
+ .max(512),
1596
+ mcpServers: z
1597
+ .array(
1598
+ z
1599
+ .object({
1600
+ id: z.string().min(1).max(200),
1601
+ capability: z.union([AgentCapabilityId, z.literal("runtime"), z.literal("product")]),
1602
+ toolsKnown: primitives.boolean,
1603
+ })
1604
+ .strict(),
1605
+ )
1606
+ .max(256),
1607
+ })
1608
+ .strict(),
1609
+ );
1445
1610
  export type AgentEffectiveTools = z.infer<typeof AgentEffectiveTools>;
1446
1611
 
1447
1612
  /**
@@ -1462,6 +1627,8 @@ export function projectAgentEffectiveTools(input: {
1462
1627
  /** Raw first-party names; other entries use model-facing names. */
1463
1628
  upfrontToolNames?: ReadonlySet<string>;
1464
1629
  firstPartyModelNames?: ReadonlyMap<FirstPartyMcpToolName, string>;
1630
+ /** Native tools are attached only after selection and control-authority checks. */
1631
+ nativeComputerTools?: boolean;
1465
1632
  mediaAttachment?: AgentMediaAttachment | undefined;
1466
1633
  }): AgentEffectiveTools {
1467
1634
  const { capabilities } = input.config;
@@ -1480,6 +1647,18 @@ export function projectAgentEffectiveTools(input: {
1480
1647
  source: "first_party",
1481
1648
  visibility: input.upfrontToolNames?.has(tool) ? "upfront" : "search",
1482
1649
  }));
1650
+ if (input.nativeComputerTools) {
1651
+ for (const tool of CUA_DESKTOP_TOOLS) {
1652
+ const name = `interaction__cua_${tool.name}`;
1653
+ if (!families.allowsFunctionTool(name)) continue;
1654
+ tools.push({
1655
+ name,
1656
+ capability: "browser",
1657
+ source: "first_party",
1658
+ visibility: input.upfrontToolNames?.has(name) ? "upfront" : "search",
1659
+ });
1660
+ }
1661
+ }
1483
1662
  const functionTool = (name: AgentFunctionToolName, source: AgentEffectiveToolEntry["source"]) => {
1484
1663
  const owner = AGENT_FUNCTION_TOOL_CAPABILITIES[name];
1485
1664
  if (owner === "media" && !mediaNames.has(name)) return;