@opengeni/contracts 3.1.0-canary.2 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/dist/agent-authored-durable-text.d.ts +9 -9
  2. package/dist/agent-config.d.ts +971 -0
  3. package/dist/agent-instruction-changes.d.ts +0 -2
  4. package/dist/allowance-refusal.d.ts +9 -0
  5. package/dist/allowance-refusal.js +50 -0
  6. package/dist/allowance-refusal.js.map +1 -0
  7. package/dist/analytics-consent-report.d.ts +19 -0
  8. package/dist/analytics-consent-report.js +10 -0
  9. package/dist/analytics-consent-report.js.map +1 -0
  10. package/dist/api-key-presets.d.ts +19 -0
  11. package/dist/artifact-catalog.d.ts +188 -0
  12. package/dist/artifacts.d.ts +86 -0
  13. package/dist/atlassian-native-retirement.d.ts +16 -0
  14. package/dist/atlassian-native-retirement.js +30 -0
  15. package/dist/atlassian-native-retirement.js.map +1 -0
  16. package/dist/atlassian.d.ts +1 -0
  17. package/dist/atlassian.js +34 -19
  18. package/dist/browser-storage.d.ts +5 -0
  19. package/dist/browser-storage.js +9 -0
  20. package/dist/browser-storage.js.map +1 -0
  21. package/dist/bundled-skills.d.ts +24 -1
  22. package/dist/canonical-human-identities.js +2 -1
  23. package/dist/chunk-2ZIHHL72.js +153 -0
  24. package/dist/chunk-2ZIHHL72.js.map +1 -0
  25. package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
  26. package/dist/chunk-4JGHSSB7.js +11 -0
  27. package/dist/chunk-4JGHSSB7.js.map +1 -0
  28. package/dist/chunk-4QO6GJUX.js +85 -0
  29. package/dist/chunk-4QO6GJUX.js.map +1 -0
  30. package/dist/chunk-4VDMHLLL.js +49 -0
  31. package/dist/chunk-4VDMHLLL.js.map +1 -0
  32. package/dist/chunk-56SNIMDO.js +9 -0
  33. package/dist/chunk-56SNIMDO.js.map +1 -0
  34. package/dist/chunk-6C2HKFTU.js +207 -0
  35. package/dist/chunk-6C2HKFTU.js.map +1 -0
  36. package/dist/chunk-6IXO76Z6.js +72 -0
  37. package/dist/chunk-6IXO76Z6.js.map +1 -0
  38. package/dist/chunk-7272KVWZ.js +60 -0
  39. package/dist/chunk-7272KVWZ.js.map +1 -0
  40. package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
  41. package/dist/chunk-E3GGUBHS.js.map +1 -0
  42. package/dist/chunk-EFZYKUE2.js +767 -0
  43. package/dist/chunk-EFZYKUE2.js.map +1 -0
  44. package/dist/chunk-EKWNTOG3.js +154 -0
  45. package/dist/chunk-EKWNTOG3.js.map +1 -0
  46. package/dist/chunk-HABQ7ADB.js +234 -0
  47. package/dist/chunk-HABQ7ADB.js.map +1 -0
  48. package/dist/chunk-HRRU4QPI.js +91 -0
  49. package/dist/chunk-HRRU4QPI.js.map +1 -0
  50. package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
  51. package/dist/chunk-IK36LXKC.js.map +1 -0
  52. package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
  53. package/dist/chunk-ILJ72KPO.js.map +1 -0
  54. package/dist/chunk-J4HQ3UKY.js +93 -0
  55. package/dist/chunk-J4HQ3UKY.js.map +1 -0
  56. package/dist/chunk-KHHZTBP7.js +11 -0
  57. package/dist/chunk-KHHZTBP7.js.map +1 -0
  58. package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
  59. package/dist/chunk-LZ2LAHIX.js.map +1 -0
  60. package/dist/chunk-NDZHPTCL.js +400 -0
  61. package/dist/chunk-NDZHPTCL.js.map +1 -0
  62. package/dist/chunk-OF6OKOBF.js +54793 -0
  63. package/dist/chunk-OF6OKOBF.js.map +1 -0
  64. package/dist/chunk-OL23ARTF.js +94 -0
  65. package/dist/chunk-OL23ARTF.js.map +1 -0
  66. package/dist/chunk-PUIUXIOL.js +189 -0
  67. package/dist/chunk-PUIUXIOL.js.map +1 -0
  68. package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
  69. package/dist/chunk-RMWXDZEO.js.map +1 -0
  70. package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
  71. package/dist/chunk-SHO4YO4B.js.map +1 -0
  72. package/dist/chunk-SWRN2DJ3.js +153 -0
  73. package/dist/chunk-SWRN2DJ3.js.map +1 -0
  74. package/dist/chunk-TCXCRBPF.js +267 -0
  75. package/dist/chunk-TCXCRBPF.js.map +1 -0
  76. package/dist/chunk-TLU3UEMD.js +324 -0
  77. package/dist/chunk-TLU3UEMD.js.map +1 -0
  78. package/dist/chunk-TSWWZMUS.js +186 -0
  79. package/dist/chunk-TSWWZMUS.js.map +1 -0
  80. package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
  81. package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
  82. package/dist/chunk-XDLAGX66.js +127 -0
  83. package/dist/chunk-XDLAGX66.js.map +1 -0
  84. package/dist/chunk-YKZ4WU4P.js +33 -0
  85. package/dist/chunk-YKZ4WU4P.js.map +1 -0
  86. package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
  87. package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
  88. package/dist/chunk-ZDCRWCGZ.js.map +1 -0
  89. package/dist/claude-provider-account-authority.d.ts +18 -0
  90. package/dist/claude-subscription-oauth.d.ts +42 -0
  91. package/dist/claude-subscription-usage.d.ts +159 -0
  92. package/dist/client-error-report.d.ts +158 -0
  93. package/dist/client-error-report.js +164 -0
  94. package/dist/client-error-report.js.map +1 -0
  95. package/dist/code-search.d.ts +52 -0
  96. package/dist/code-search.js +40 -0
  97. package/dist/code-search.js.map +1 -0
  98. package/dist/codex-provider-account-authority.js +20 -12
  99. package/dist/codex-provider-account-authority.js.map +1 -1
  100. package/dist/company-profile.d.ts +144 -6
  101. package/dist/connect.d.ts +37 -0
  102. package/dist/connect.js +216 -159
  103. package/dist/connect.js.map +1 -1
  104. package/dist/connection-account-label.d.ts +2 -0
  105. package/dist/connection-account-label.js +35 -0
  106. package/dist/connection-account-label.js.map +1 -0
  107. package/dist/connection-authority.d.ts +9 -317
  108. package/dist/connection-authority.js +37 -42
  109. package/dist/connector-attachments.js +2 -1
  110. package/dist/connector-destinations.js +2 -1
  111. package/dist/connector-tool-permissions.d.ts +137 -0
  112. package/dist/cua-desktop-tools.d.ts +17 -0
  113. package/dist/define-schema.d.ts +8 -0
  114. package/dist/direct-model-provider.d.ts +36 -0
  115. package/dist/editable-artifact-codec-registry.js +5 -5
  116. package/dist/editable-artifact-committed-transaction.js +3 -2
  117. package/dist/editable-artifact-live.js +5 -5
  118. package/dist/editable-artifact-serialized-commit.js +6 -6
  119. package/dist/editable-artifact-versions.d.ts +7 -1
  120. package/dist/editable-artifact-versions.js +1 -1
  121. package/dist/editable-artifacts.js +62 -56
  122. package/dist/event-preview.d.ts +22 -0
  123. package/dist/external-identities.d.ts +138 -0
  124. package/dist/external-identities.js +9 -4
  125. package/dist/first-party-tool-authorization.d.ts +815 -0
  126. package/dist/github-repository-contracts.js +60 -43
  127. package/dist/github-repository-contracts.js.map +1 -1
  128. package/dist/google-drive.d.ts +2 -1
  129. package/dist/google-drive.js +305 -238
  130. package/dist/google-drive.js.map +1 -1
  131. package/dist/host-mcp-bindings.d.ts +5 -0
  132. package/dist/host-mcp-bindings.js +233 -170
  133. package/dist/host-mcp-bindings.js.map +1 -1
  134. package/dist/image-generation.d.ts +1 -0
  135. package/dist/index.d.ts +16761 -5946
  136. package/dist/index.js +1973 -260
  137. package/dist/insights-usage.d.ts +877 -0
  138. package/dist/insights-usage.js +559 -0
  139. package/dist/insights-usage.js.map +1 -0
  140. package/dist/interaction.d.ts +1176 -829
  141. package/dist/knowledge-entries.d.ts +81 -2
  142. package/dist/knowledge-preparation.d.ts +239 -0
  143. package/dist/managed-auth-session-sets.d.ts +7 -0
  144. package/dist/managed-auth-session-sets.js +198 -132
  145. package/dist/managed-auth-session-sets.js.map +1 -1
  146. package/dist/managed-sign-in-methods.d.ts +56 -0
  147. package/dist/managed-sign-in-methods.js +64 -0
  148. package/dist/managed-sign-in-methods.js.map +1 -0
  149. package/dist/mcp-catalog-limits.d.ts +2 -0
  150. package/dist/mcp-oauth.d.ts +2 -2
  151. package/dist/mcp-structured-content.d.ts +25 -0
  152. package/dist/modal-native-proof-v2.d.ts +587 -0
  153. package/dist/modal-native-proof-v2.js +38 -0
  154. package/dist/modal-native-proof-v2.js.map +1 -0
  155. package/dist/model-account-choice.d.ts +235 -0
  156. package/dist/model-account-settings.d.ts +422 -0
  157. package/dist/model-availability.d.ts +15 -0
  158. package/dist/model-connection-access.d.ts +13 -0
  159. package/dist/model-context-inspector.d.ts +98 -0
  160. package/dist/model-display.d.ts +43 -0
  161. package/dist/model-display.js +17 -0
  162. package/dist/model-display.js.map +1 -0
  163. package/dist/model-picker-order.d.ts +3 -1
  164. package/dist/model-picker-order.js +3 -0
  165. package/dist/model-picker-order.js.map +1 -1
  166. package/dist/organization-access.d.ts +412 -0
  167. package/dist/organization-access.js +39 -0
  168. package/dist/organization-access.js.map +1 -0
  169. package/dist/organization-integration-policy.d.ts +27 -0
  170. package/dist/organization-membership-lifecycle.d.ts +38 -0
  171. package/dist/organization-model-usage.d.ts +146 -0
  172. package/dist/organization-model-usage.js +78 -0
  173. package/dist/organization-model-usage.js.map +1 -0
  174. package/dist/organization-recovery.js +2 -1
  175. package/dist/organization-usage.d.ts +138 -0
  176. package/dist/permissions.d.ts +18 -0
  177. package/dist/personal-github.d.ts +1 -0
  178. package/dist/personal-github.js +199 -144
  179. package/dist/personal-github.js.map +1 -1
  180. package/dist/prepared-mcp-setup.d.ts +54 -0
  181. package/dist/prepared-mcp-setup.js +12 -0
  182. package/dist/prepared-mcp-setup.js.map +1 -0
  183. package/dist/product-analytics.d.ts +116 -0
  184. package/dist/product-lifecycle-facts.d.ts +73 -0
  185. package/dist/remember.d.ts +98 -6
  186. package/dist/retained-output.d.ts +8 -0
  187. package/dist/sandbox-file-artifacts.d.ts +1 -0
  188. package/dist/sandbox-provider-command.d.ts +91 -1
  189. package/dist/sandbox-recovery.d.ts +146 -0
  190. package/dist/secret-generator.d.ts +44 -0
  191. package/dist/secret-references.d.ts +90 -0
  192. package/dist/secret-resolution.d.ts +111 -0
  193. package/dist/secret-totp.d.ts +41 -0
  194. package/dist/session-final-reply.d.ts +6 -0
  195. package/dist/session-final-reply.js +9 -0
  196. package/dist/session-final-reply.js.map +1 -0
  197. package/dist/session-goal-reports.d.ts +21 -0
  198. package/dist/session-history-import.d.ts +1272 -0
  199. package/dist/session-list-entries.d.ts +4 -0
  200. package/dist/session-list-entries.js +56 -0
  201. package/dist/session-list-entries.js.map +1 -0
  202. package/dist/session-mcp-projections.d.ts +6 -0
  203. package/dist/session-mcp-tool-permissions.d.ts +62 -0
  204. package/dist/session-message-search.d.ts +68 -0
  205. package/dist/session-target.d.ts +18 -0
  206. package/dist/session-titles.d.ts +8 -0
  207. package/dist/session-titles.js +5 -1
  208. package/dist/session-usage-limit-refusal.d.ts +34 -0
  209. package/dist/session-usage-limit-refusal.js +15 -0
  210. package/dist/session-usage-limit-refusal.js.map +1 -0
  211. package/dist/session-usage-limits.d.ts +127 -0
  212. package/dist/session-usage-limits.js +41 -0
  213. package/dist/session-usage-limits.js.map +1 -0
  214. package/dist/signup-attribution.d.ts +39 -0
  215. package/dist/site-data.d.ts +286 -0
  216. package/dist/site-operations.d.ts +39 -0
  217. package/dist/site-publishing.d.ts +778 -0
  218. package/dist/site-session-http.d.ts +89 -4
  219. package/dist/site-session-http.js +25 -1
  220. package/dist/site-sql.d.ts +421 -0
  221. package/dist/skill-catalog-context.d.ts +7 -0
  222. package/dist/skill-files.d.ts +1 -1
  223. package/dist/skill-use.d.ts +61 -0
  224. package/dist/skills.d.ts +15 -0
  225. package/dist/slack-bot-scopes.d.ts +17 -12
  226. package/dist/slack-bot-scopes.js +10 -3
  227. package/dist/slack-rest-mcp.d.ts +36 -0
  228. package/dist/slack-rest-mcp.js +25 -0
  229. package/dist/slack-rest-mcp.js.map +1 -0
  230. package/dist/spreadsheet-artifact-commands.d.ts +14 -1
  231. package/dist/spreadsheet-artifact-commands.js +8 -2
  232. package/dist/spreadsheet-artifact-query.d.ts +13 -6
  233. package/dist/spreadsheet-artifact-query.js +3 -3
  234. package/dist/subscription-account-actions.d.ts +64 -0
  235. package/dist/subscription-account-pools.d.ts +292 -0
  236. package/dist/subscription-personal-authority-v2.d.ts +28 -0
  237. package/dist/subscription-personal-authority-v2.js +12 -0
  238. package/dist/subscription-personal-authority-v2.js.map +1 -0
  239. package/dist/tool-action-review.d.ts +132 -0
  240. package/dist/tool-catalog.d.ts +408 -0
  241. package/dist/tool-policy.d.ts +5 -0
  242. package/dist/tool-review-presentation.d.ts +12 -0
  243. package/dist/tool-review-presentation.js +17 -0
  244. package/dist/tool-review-presentation.js.map +1 -0
  245. package/dist/transcription-recordings.d.ts +21 -0
  246. package/dist/turn-serving-policy.d.ts +221 -0
  247. package/dist/usage-allowances.d.ts +314 -0
  248. package/dist/usage-allowances.js +52 -0
  249. package/dist/usage-allowances.js.map +1 -0
  250. package/dist/vaults.d.ts +1286 -0
  251. package/dist/video-generation.d.ts +3 -0
  252. package/dist/video-generation.js +2 -1
  253. package/dist/workspace-integration-wire.d.ts +36 -0
  254. package/dist/workspace-integration-wire.js +23 -0
  255. package/dist/workspace-integration-wire.js.map +1 -0
  256. package/dist/workspace-integrations.d.ts +1028 -0
  257. package/dist/xai-provider-account-authority.js +2 -1
  258. package/package.json +93 -5
  259. package/src/agent-authored-durable-text.ts +14 -11
  260. package/src/agent-config.ts +1698 -0
  261. package/src/agent-instruction-changes.ts +91 -74
  262. package/src/agent-learning.ts +94 -67
  263. package/src/agent-topology.ts +57 -52
  264. package/src/allowance-refusal.ts +81 -0
  265. package/src/analytics-consent-report.ts +20 -0
  266. package/src/api-key-presets.ts +28 -0
  267. package/src/artifact-catalog.ts +82 -0
  268. package/src/artifacts.ts +299 -227
  269. package/src/atlassian-native-retirement.ts +33 -0
  270. package/src/atlassian.ts +135 -108
  271. package/src/browser-storage.ts +10 -0
  272. package/src/bundled-skills.ts +60 -17
  273. package/src/canonical-human-identities.ts +60 -58
  274. package/src/claude-provider-account-authority.ts +12 -0
  275. package/src/claude-subscription-oauth.ts +73 -0
  276. package/src/claude-subscription-usage.ts +68 -0
  277. package/src/client-error-report.ts +343 -0
  278. package/src/code-search.ts +105 -0
  279. package/src/codex-provider-account-authority.ts +21 -16
  280. package/src/company-brain-governed-writes.ts +255 -233
  281. package/src/company-brain.ts +164 -153
  282. package/src/company-profile.ts +365 -292
  283. package/src/connect.ts +212 -173
  284. package/src/connection-account-label.ts +46 -0
  285. package/src/connection-authority.ts +183 -364
  286. package/src/connector-attachments.ts +137 -122
  287. package/src/connector-destinations.ts +46 -42
  288. package/src/connector-tool-permissions.ts +117 -0
  289. package/src/cua-desktop-tools.gen.json +6512 -0
  290. package/src/cua-desktop-tools.linux.gen.json +6600 -0
  291. package/src/cua-desktop-tools.ts +36 -0
  292. package/src/cua-desktop-tools.windows.gen.json +6353 -0
  293. package/src/define-schema.ts +10 -0
  294. package/src/direct-model-provider.ts +108 -0
  295. package/src/editable-artifact-committed-transaction.ts +17 -0
  296. package/src/editable-artifact-versions.ts +7 -1
  297. package/src/event-preview.ts +53 -3
  298. package/src/external-identities.ts +249 -176
  299. package/src/feedback.ts +43 -30
  300. package/src/first-party-tool-authorization.ts +356 -0
  301. package/src/github-repository-contracts.ts +78 -64
  302. package/src/google-drive.ts +285 -234
  303. package/src/governed-learning-activation.ts +152 -131
  304. package/src/governed-learning-evaluator.ts +140 -133
  305. package/src/host-mcp-bindings.ts +252 -198
  306. package/src/image-generation.ts +104 -95
  307. package/src/index.ts +13235 -8687
  308. package/src/insights-usage.ts +727 -0
  309. package/src/interaction.ts +3070 -2326
  310. package/src/knowledge-entries.ts +361 -276
  311. package/src/knowledge-preparation.ts +57 -0
  312. package/src/knowledge.ts +246 -213
  313. package/src/managed-auth-session-sets.ts +220 -144
  314. package/src/managed-sign-in-methods.ts +52 -0
  315. package/src/mcp-catalog-limits.ts +2 -0
  316. package/src/mcp-oauth.ts +43 -34
  317. package/src/mcp-receipts.ts +192 -192
  318. package/src/mcp-structured-content.ts +81 -0
  319. package/src/memory-slack-delivery.ts +171 -142
  320. package/src/modal-native-proof-v2.ts +429 -0
  321. package/src/model-account-choice.ts +177 -0
  322. package/src/model-account-settings.ts +210 -0
  323. package/src/model-availability.ts +22 -0
  324. package/src/model-connection-access.ts +61 -14
  325. package/src/model-context-inspector.ts +133 -99
  326. package/src/model-display.ts +221 -0
  327. package/src/model-picker-order.ts +12 -1
  328. package/src/organization-access.ts +217 -0
  329. package/src/organization-integration-policy.ts +63 -0
  330. package/src/organization-membership-lifecycle.ts +528 -382
  331. package/src/organization-model-usage.ts +81 -0
  332. package/src/organization-recovery.ts +147 -135
  333. package/src/organization-usage.ts +94 -0
  334. package/src/permissions.ts +88 -52
  335. package/src/personal-github.ts +210 -171
  336. package/src/preference-registry.ts +314 -258
  337. package/src/prepared-mcp-setup.ts +189 -0
  338. package/src/product-analytics.ts +261 -0
  339. package/src/product-lifecycle-facts.ts +122 -0
  340. package/src/remember.ts +181 -167
  341. package/src/retained-output.ts +194 -165
  342. package/src/sandbox-file-artifacts.ts +60 -47
  343. package/src/sandbox-provider-command.ts +88 -20
  344. package/src/sandbox-recovery.ts +129 -0
  345. package/src/scoped-knowledge.ts +61 -43
  346. package/src/secret-generator.ts +155 -0
  347. package/src/secret-references.ts +414 -0
  348. package/src/secret-resolution.ts +274 -0
  349. package/src/secret-totp.ts +188 -0
  350. package/src/session-final-reply.ts +16 -0
  351. package/src/session-goal-reports.ts +64 -0
  352. package/src/session-history-import.ts +177 -0
  353. package/src/session-list-entries.ts +96 -0
  354. package/src/session-mcp-projections.ts +11 -0
  355. package/src/session-mcp-tool-permissions.ts +108 -0
  356. package/src/session-message-search.ts +61 -0
  357. package/src/session-target.ts +57 -0
  358. package/src/session-titles.ts +80 -10
  359. package/src/session-topology-primitives.ts +19 -12
  360. package/src/session-usage-limit-refusal.ts +101 -0
  361. package/src/session-usage-limits.ts +171 -0
  362. package/src/signup-attribution.ts +86 -0
  363. package/src/site-data.ts +339 -0
  364. package/src/site-operations.ts +154 -0
  365. package/src/site-publishing.ts +876 -0
  366. package/src/site-session-http.ts +294 -16
  367. package/src/site-sql.ts +1123 -0
  368. package/src/skill-catalog-context.ts +50 -0
  369. package/src/skill-files.ts +3 -3
  370. package/src/skill-use.ts +80 -0
  371. package/src/skills.ts +82 -54
  372. package/src/slack-bot-scopes.ts +31 -39
  373. package/src/slack-rest-mcp.ts +222 -0
  374. package/src/slack-task-policy.ts +96 -73
  375. package/src/spreadsheet-artifact-commands.ts +73 -2
  376. package/src/spreadsheet-artifact-query.ts +187 -39
  377. package/src/subscription-account-actions.ts +84 -0
  378. package/src/subscription-account-pools.ts +53 -0
  379. package/src/subscription-personal-authority-v2.ts +66 -0
  380. package/src/task-notes.ts +55 -51
  381. package/src/tool-action-review.ts +258 -0
  382. package/src/tool-catalog.ts +609 -372
  383. package/src/tool-policy.ts +82 -0
  384. package/src/tool-result-spill.ts +12 -9
  385. package/src/tool-review-presentation.ts +385 -0
  386. package/src/transcription-recordings.ts +145 -131
  387. package/src/turn-serving-policy.ts +166 -0
  388. package/src/usage-allowances.ts +248 -0
  389. package/src/vaults.ts +850 -0
  390. package/src/video-generation.ts +385 -360
  391. package/src/work-claims.ts +173 -149
  392. package/src/workspace-instruction-policies.ts +349 -276
  393. package/src/workspace-integration-wire.ts +101 -0
  394. package/src/workspace-integrations.ts +724 -0
  395. package/src/workspace-learning-administration.ts +57 -44
  396. package/src/workspace-learning-policy.ts +127 -96
  397. package/src/workspace-state.ts +250 -220
  398. package/src/xai-provider-account-authority.ts +22 -17
  399. package/dist/chunk-2AC63F4S.js +0 -171
  400. package/dist/chunk-2AC63F4S.js.map +0 -1
  401. package/dist/chunk-3SIZGL3O.js.map +0 -1
  402. package/dist/chunk-7ABONTXE.js.map +0 -1
  403. package/dist/chunk-BCS7WHCK.js +0 -139
  404. package/dist/chunk-BCS7WHCK.js.map +0 -1
  405. package/dist/chunk-GRG7PHWQ.js +0 -25
  406. package/dist/chunk-GRG7PHWQ.js.map +0 -1
  407. package/dist/chunk-JUFK3T4Q.js +0 -80
  408. package/dist/chunk-JUFK3T4Q.js.map +0 -1
  409. package/dist/chunk-M5ZGRVIQ.js +0 -719
  410. package/dist/chunk-M5ZGRVIQ.js.map +0 -1
  411. package/dist/chunk-MRWYRAS5.js.map +0 -1
  412. package/dist/chunk-OVFORMPW.js +0 -348
  413. package/dist/chunk-OVFORMPW.js.map +0 -1
  414. package/dist/chunk-P3HLDT77.js +0 -59
  415. package/dist/chunk-P3HLDT77.js.map +0 -1
  416. package/dist/chunk-QQUJ6NPW.js +0 -23093
  417. package/dist/chunk-QQUJ6NPW.js.map +0 -1
  418. package/dist/chunk-TXTQIYCV.js.map +0 -1
  419. package/dist/chunk-WYBDERIY.js.map +0 -1
  420. package/dist/chunk-Y3KNXVTD.js.map +0 -1
  421. package/dist/chunk-YBW5JSA3.js.map +0 -1
  422. package/dist/chunk-YRXAWWCU.js +0 -45
  423. package/dist/chunk-YRXAWWCU.js.map +0 -1
  424. package/dist/host-mcp-resolvers.d.ts +0 -32
  425. package/dist/host-mcp-resolvers.js +0 -34
  426. package/dist/host-mcp-resolvers.js.map +0 -1
  427. package/src/host-mcp-resolvers.ts +0 -50
  428. /package/dist/{chunk-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
  429. /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
@@ -0,0 +1,50 @@
1
+ /** Durable, model-visible catalog context. Text markers survive SDK/provider replay. */
2
+ export const SKILL_CATALOG_CONTEXT_PREFIX = "<opengeni_skill_catalog>\n";
3
+ export const SKILL_CATALOG_CONTEXT_SUFFIX = "\n</opengeni_skill_catalog>";
4
+ const GUIDANCE =
5
+ "This is the current configured Skill index and replaces earlier configured Skill indexes. " +
6
+ "Entries describe discoverability, not permission or full instructions. " +
7
+ "Use skill_read for instructions and skill_search for current discovery; tool authorization remains authoritative.\n\n";
8
+
9
+ export function skillCatalogContextItem(catalog: string): Record<string, unknown> {
10
+ return {
11
+ type: "message",
12
+ role: "developer",
13
+ content: SKILL_CATALOG_CONTEXT_PREFIX + GUIDANCE + catalog + SKILL_CATALOG_CONTEXT_SUFFIX,
14
+ };
15
+ }
16
+
17
+ /** Accept the Chat Completions projection and SDK text-part normalization too. */
18
+ export function readSkillCatalogContext(item: Record<string, unknown>): string | null {
19
+ if (item.type === "unknown" && item.providerData && typeof item.providerData === "object") {
20
+ const data = item.providerData as Record<string, unknown>;
21
+ if (data.type === "message") return readSkillCatalogContext(data);
22
+ }
23
+ if (item.type !== "message" || (item.role !== "developer" && item.role !== "system")) return null;
24
+ const content =
25
+ typeof item.content === "string"
26
+ ? item.content
27
+ : Array.isArray(item.content) &&
28
+ item.content.every(
29
+ (part) =>
30
+ part &&
31
+ (part.type === "input_text" || part.type === "output_text" || part.type === "text") &&
32
+ typeof part.text === "string",
33
+ )
34
+ ? item.content.map((part) => part.text).join("")
35
+ : null;
36
+ const prefix = SKILL_CATALOG_CONTEXT_PREFIX + GUIDANCE;
37
+ return content?.startsWith(prefix) && content.endsWith(SKILL_CATALOG_CONTEXT_SUFFIX)
38
+ ? content.slice(prefix.length, -SKILL_CATALOG_CONTEXT_SUFFIX.length)
39
+ : null;
40
+ }
41
+
42
+ export function latestSkillCatalogContext(
43
+ items: readonly Record<string, unknown>[],
44
+ ): Record<string, unknown> | undefined {
45
+ for (let index = items.length - 1; index >= 0; index--) {
46
+ const catalog = readSkillCatalogContext(items[index]!);
47
+ if (catalog !== null) return skillCatalogContextItem(catalog);
48
+ }
49
+ return undefined;
50
+ }
@@ -1,7 +1,7 @@
1
1
  /** Shared text-folder limits for API admission, runtime imports and checkout. */
2
- export const SKILL_MAX_FILES = 128;
3
- export const SKILL_MAX_FILE_BYTES = 256 * 1024;
4
- export const SKILL_MAX_TOTAL_BYTES = 1024 * 1024;
2
+ export const SKILL_MAX_FILES = 1024;
3
+ export const SKILL_MAX_FILE_BYTES = 2 * 1024 * 1024;
4
+ export const SKILL_MAX_TOTAL_BYTES = 8 * 1024 * 1024;
5
5
 
6
6
  export function isSafeSkillRelativePath(path: string): boolean {
7
7
  return (
@@ -0,0 +1,80 @@
1
+ import { defineSchema } from "./define-schema";
2
+ import { z } from "zod";
3
+
4
+ /**
5
+ * `_meta` key of the content-free Skill-use fact on a model `skill_read`
6
+ * result. MCP `_meta` never reaches the model: it survives only into the
7
+ * `agent.toolCall.output` event projection, never into model history.
8
+ */
9
+ export const SKILL_USE_META_KEY = "opengeni/skillUse" as const;
10
+
11
+ /** Where the Skill a read resolved to comes from. `personal` is a user-scope Skill. */
12
+ export const SkillUseSource = /* @__PURE__ */ defineSchema(() =>
13
+ z.enum(["builtin", "session", "workspace", "organization", "personal"]),
14
+ );
15
+ export type SkillUseSource = z.infer<typeof SkillUseSource>;
16
+
17
+ /**
18
+ * What a `skill_read` returned: `full` is the default SKILL.md read, `files`
19
+ * explicit paths, `list` a path inventory, and `already_in_context` the short
20
+ * repeat receipt. `refused` means the read returned an error instead of Skill
21
+ * text; it has no result, so it appears only in metrics.
22
+ */
23
+ export const SkillReadKind = /* @__PURE__ */ defineSchema(() =>
24
+ z.enum(["full", "already_in_context", "files", "list", "refused"]),
25
+ );
26
+ export type SkillReadKind = z.infer<typeof SkillReadKind>;
27
+
28
+ const skillUseFields = {
29
+ id: z.string().min(1).max(512),
30
+ source: SkillUseSource,
31
+ label: z.string().min(1).max(128).optional(),
32
+ /** Whole-artifact digest, for a Skill without a ledger revision. */
33
+ contentSha256: z
34
+ .string()
35
+ .regex(/^[0-9a-f]{64}$/u)
36
+ .optional(),
37
+ /** Ledger revision of a workspace, organization, or personal Skill. */
38
+ revisionId: z.string().min(1).max(128).optional(),
39
+ kind: SkillReadKind.exclude(["refused"]),
40
+ /** UTF-8 bytes of the result text the read returned, before model tool-output truncation. */
41
+ bytes: z.number().int().nonnegative(),
42
+ /** The Skill appeared in the Skill index the model saw this turn. */
43
+ inIndex: z.boolean(),
44
+ /** skill_search returned this Skill earlier in the same turn attempt. */
45
+ searchedThisTurn: z.boolean(),
46
+ };
47
+ const oneProvenance = (use: {
48
+ contentSha256?: string | undefined;
49
+ revisionId?: string | undefined;
50
+ }) => use.contentSha256 === undefined || use.revisionId === undefined;
51
+ const oneProvenanceMessage = {
52
+ message: "A Skill use carries a content digest or a revision, not both",
53
+ };
54
+
55
+ /**
56
+ * Ids, digests, and counts only. Never Skill text, user text, or a Skill's
57
+ * title or description. `label` is reserved for a platform display label of a
58
+ * built-in; user-authored Skills never set it. This is the writer's closed
59
+ * shape: an unknown field fails the parse, so nothing else can be attached.
60
+ */
61
+ export const SkillUse = /* @__PURE__ */ defineSchema(() =>
62
+ z.strictObject(skillUseFields).refine(oneProvenance, oneProvenanceMessage),
63
+ );
64
+ export type SkillUse = z.infer<typeof SkillUse>;
65
+
66
+ // Stored events outlive the worker that wrote them. A reader drops fields a
67
+ // newer writer added instead of dropping the whole fact, and what it returns
68
+ // still holds only the known, content-free fields.
69
+ const StoredSkillUse = /* @__PURE__ */ defineSchema(() =>
70
+ z.object(skillUseFields).refine(oneProvenance, oneProvenanceMessage),
71
+ );
72
+
73
+ /** The Skill-use fact on a tool result or its event projection, when present and valid. */
74
+ export function skillUseFromToolOutput(output: unknown): SkillUse | null {
75
+ if (!output || typeof output !== "object" || Array.isArray(output)) return null;
76
+ const meta = (output as { _meta?: unknown })._meta;
77
+ if (!meta || typeof meta !== "object" || Array.isArray(meta)) return null;
78
+ const parsed = StoredSkillUse.safeParse((meta as Record<string, unknown>)[SKILL_USE_META_KEY]);
79
+ return parsed.success ? parsed.data : null;
80
+ }
package/src/skills.ts CHANGED
@@ -1,29 +1,34 @@
1
+ import { defineSchema } from "./define-schema";
1
2
  import { z } from "zod";
2
3
  export { parseSkillFrontmatter, readSkillMetadata } from "./skill-metadata";
3
4
  export * from "./skill-files";
4
5
 
5
6
  /** Files are UTF-8 text, relative to the Skill root. No executable authority. */
6
- export const SkillFile = z.object({ path: z.string().min(1).max(512), content: z.string() });
7
+ export const SkillFile = /* @__PURE__ */ defineSchema(() =>
8
+ z.object({ path: z.string().min(1).max(512), content: z.string() }),
9
+ );
7
10
  export type SkillFile = z.infer<typeof SkillFile>;
8
- export const SkillActor = z.discriminatedUnion("kind", [
9
- z.object({
10
- kind: z.literal("service"),
11
- subjectId: z.string().min(1),
12
- principalKind: z.enum(["service", "api_key", "configured_key"]),
13
- }),
14
- z.object({
15
- kind: z.literal("human"),
16
- subjectId: z.string().min(1),
17
- principalKind: z.literal("human_session"),
18
- }),
19
- z.object({
20
- kind: z.literal("agent"),
21
- sessionId: z.uuid(),
22
- turnId: z.uuid(),
23
- attemptId: z.uuid(),
24
- executionGeneration: z.number().int().positive(),
25
- }),
26
- ]);
11
+ export const SkillActor = /* @__PURE__ */ defineSchema(() =>
12
+ z.discriminatedUnion("kind", [
13
+ z.object({
14
+ kind: z.literal("service"),
15
+ subjectId: z.string().min(1),
16
+ principalKind: z.enum(["service", "api_key", "configured_key"]),
17
+ }),
18
+ z.object({
19
+ kind: z.literal("human"),
20
+ subjectId: z.string().min(1),
21
+ principalKind: z.literal("human_session"),
22
+ }),
23
+ z.object({
24
+ kind: z.literal("agent"),
25
+ sessionId: z.uuid(),
26
+ turnId: z.uuid(),
27
+ attemptId: z.uuid(),
28
+ executionGeneration: z.number().int().positive(),
29
+ }),
30
+ ]),
31
+ );
27
32
  export type SkillActor = z.infer<typeof SkillActor>;
28
33
  export type SkillScope = "workspace" | "organization" | "user";
29
34
  export type SkillWriteContext = { accountId: string; workspaceId: string; actor: SkillActor };
@@ -38,6 +43,7 @@ export type SkillSaveInput = SkillWriteContext & {
38
43
  reason: string;
39
44
  };
40
45
  export type SkillRevisionInput = SkillWriteContext & {
46
+ removalOperationId?: string | undefined;
41
47
  operationId: string;
42
48
  skillId: string;
43
49
  revisionId: string;
@@ -45,32 +51,46 @@ export type SkillRevisionInput = SkillWriteContext & {
45
51
  expectedScopeVersion: number;
46
52
  reason: string;
47
53
  };
54
+ export type SkillRemoveInput = SkillWriteContext & {
55
+ operationId: string;
56
+ skillId: string;
57
+ expectedRevisionId: string | null;
58
+ expectedScopeVersion: number;
59
+ reason: string;
60
+ };
48
61
  export type SkillInstallInput = SkillWriteContext & {
49
62
  operationId: string;
50
63
  skillFacetId: string;
51
64
  reason: string;
52
65
  };
53
- export const SkillReviewReference = z.object({
54
- sourceOperationId: z.uuid(),
55
- skillId: z.uuid(),
56
- revisionId: z.uuid(),
57
- expectedRevisionId: z.uuid().nullable(),
58
- expectedScopeVersion: z.number().int().positive(),
59
- });
66
+ export const SkillReviewReference = /* @__PURE__ */ defineSchema(() =>
67
+ z.object({
68
+ removalOperationId: z.uuid().optional(),
69
+ sourceOperationId: z.uuid(),
70
+ skillId: z.uuid(),
71
+ revisionId: z.uuid(),
72
+ expectedRevisionId: z.uuid().nullable(),
73
+ expectedScopeVersion: z.number().int().positive(),
74
+ }),
75
+ );
60
76
  export type SkillReviewReference = z.infer<typeof SkillReviewReference>;
61
77
  export function skillReviewHumanInput(skillReview: SkillReviewReference) {
78
+ const removing = Boolean(skillReview.removalOperationId);
62
79
  return {
63
80
  questions: [
64
81
  {
65
82
  id: `skill:${skillReview.revisionId}`,
66
83
  kind: "single_select" as const,
67
- label: "Save this Skill?",
68
- prompt: "Save this exact Skill revision for this workspace?",
69
- helpText:
70
- "Review the complete files before saving. Saving activates this revision immediately.",
84
+ label: removing ? "Permanently delete this Skill?" : "Save this Skill?",
85
+ prompt: removing
86
+ ? "Permanently delete this Skill and all its stored revisions?"
87
+ : "Save this exact Skill revision for this workspace?",
88
+ helpText: removing
89
+ ? "This cannot be undone. All stored Skill revisions will be deleted; conversations remain unchanged."
90
+ : "Review the complete files before saving. Saving activates this revision immediately.",
71
91
  options: [
72
- { id: "save", label: "Save" },
73
- { id: "skip", label: "Don't save" },
92
+ { id: "save", label: removing ? "Permanently delete" : "Save" },
93
+ { id: "skip", label: removing ? "Keep Skill" : "Don't save" },
74
94
  ],
75
95
  required: true,
76
96
  allowOther: false,
@@ -79,31 +99,39 @@ export function skillReviewHumanInput(skillReview: SkillReviewReference) {
79
99
  ],
80
100
  };
81
101
  }
82
- export const SkillWriteReceipt = z.object({
83
- operationId: z.uuid(),
84
- skillId: z.uuid(),
85
- revisionId: z.uuid(),
86
- outcome: z.enum(["applied", "pending", "preserved"]),
87
- decision: z.literal("rejected").optional(),
88
- pendingReason: z.enum(["approval", "source_finalization"]).optional(),
89
- skillReview: SkillReviewReference.optional(),
90
- replayed: z.boolean(),
91
- });
102
+ export const SkillWriteReceipt = /* @__PURE__ */ defineSchema(() =>
103
+ z.object({
104
+ removed: z.boolean().optional(),
105
+ operationId: z.uuid(),
106
+ skillId: z.uuid(),
107
+ revisionId: z.uuid(),
108
+ outcome: z.enum(["applied", "pending", "preserved"]),
109
+ decision: z.literal("rejected").optional(),
110
+ pendingReason: z.enum(["approval", "source_finalization"]).optional(),
111
+ skillReview: SkillReviewReference.optional(),
112
+ replayed: z.boolean(),
113
+ }),
114
+ );
92
115
  export type SkillWriteReceipt = z.infer<typeof SkillWriteReceipt>;
93
- export const SkillPublicationReceipt = SkillWriteReceipt.extend({
94
- sourceOperationId: z.uuid(),
95
- activationEventId: z.uuid().nullable(),
96
- });
116
+ export const SkillPublicationReceipt = /* @__PURE__ */ defineSchema(() =>
117
+ SkillWriteReceipt.extend({
118
+ sourceOperationId: z.uuid(),
119
+ activationEventId: z.uuid().nullable(),
120
+ }),
121
+ );
97
122
  export type SkillPublicationReceipt = z.infer<typeof SkillPublicationReceipt>;
98
- export const SkillSourceReleaseReceipt = z.object({
99
- skillId: z.uuid(),
100
- revisionId: z.uuid().nullable(),
101
- disposition: z.enum(["deactivated", "preserved", "inactive"]),
102
- eventId: z.uuid().nullable(),
103
- warning: z.string().nullable(),
104
- });
123
+ export const SkillSourceReleaseReceipt = /* @__PURE__ */ defineSchema(() =>
124
+ z.object({
125
+ skillId: z.uuid(),
126
+ revisionId: z.uuid().nullable(),
127
+ disposition: z.enum(["deactivated", "preserved", "inactive"]),
128
+ eventId: z.uuid().nullable(),
129
+ warning: z.string().nullable(),
130
+ }),
131
+ );
105
132
  export type SkillSourceReleaseReceipt = z.infer<typeof SkillSourceReleaseReceipt>;
106
133
  export type SkillRecord = {
134
+ removalOperationId?: string | null;
107
135
  activationMode: "workspace_managed" | "session_selected";
108
136
  pendingRevisionIds: string[];
109
137
  id: string;
@@ -1,3 +1,5 @@
1
+ import { OPENGENI_SLACK_REST_USER_SCOPES } from "./slack-rest-mcp";
2
+
1
3
  export const OPENGENI_SLACK_BOT_REQUIRED_SCOPES = [
2
4
  "app_mentions:read",
3
5
  "canvases:read",
@@ -19,6 +21,9 @@ export const OPENGENI_SLACK_BOT_REQUIRED_SCOPES = [
19
21
  /** Read-only scope needed only for the optional emoji-reaction summon surface. */
20
22
  export const OPENGENI_SLACK_REACTION_REQUIRED_SCOPE = "reactions:read" as const;
21
23
 
24
+ /** Optional grant for explicit retained-file delivery to a task's Slack thread. */
25
+ export const OPENGENI_SLACK_FILE_UPLOAD_REQUIRED_SCOPE = "files:write" as const;
26
+
22
27
  /**
23
28
  * Bot-token search scopes for Slack's Real-time Search API
24
29
  * (`assistant.search.context`). Slack accepts these as BOT scopes, so
@@ -35,17 +40,24 @@ export const OPENGENI_SLACK_BOT_SEARCH_SCOPES = [
35
40
  /**
36
41
  * Scopes requested by the managed and generated self-hosted manifests.
37
42
  *
38
- * `reactions:read` and the bot search scopes are deliberately not part of the
43
+ * `reactions:read`, `files:write`, and the bot search scopes are not part of the
39
44
  * base eligibility contract: legacy installations may continue using existing
40
45
  * Slack interactions and tools while the reaction setting stays disabled, bot
41
- * search stays unavailable, and the UI asks an admin to reinstall.
46
+ * search and file delivery stay unavailable, and the tools ask an admin to reinstall.
42
47
  */
43
48
  export const OPENGENI_SLACK_BOT_REQUESTED_SCOPES = [
44
49
  ...OPENGENI_SLACK_BOT_REQUIRED_SCOPES,
45
50
  OPENGENI_SLACK_REACTION_REQUIRED_SCOPE,
46
- ...OPENGENI_SLACK_BOT_SEARCH_SCOPES,
51
+ OPENGENI_SLACK_FILE_UPLOAD_REQUIRED_SCOPE,
47
52
  ] as const;
48
53
 
54
+ export function openGeniSlackBotRequestedScopes(mode: "limited" | "full" = "limited"): string[] {
55
+ return [
56
+ ...OPENGENI_SLACK_BOT_REQUESTED_SCOPES,
57
+ ...(mode === "full" ? OPENGENI_SLACK_BOT_SEARCH_SCOPES : []),
58
+ ];
59
+ }
60
+
49
61
  export const OPENGENI_SLACK_BOT_EVENTS = [
50
62
  "app_home_opened",
51
63
  "app_mention",
@@ -56,34 +68,8 @@ export const OPENGENI_SLACK_BOT_EVENTS = [
56
68
  "reaction_added",
57
69
  ] as const;
58
70
 
59
- /** Full user-token scope set for every tool currently exposed by Slack's hosted MCP server. */
60
- export const OPENGENI_SLACK_MCP_USER_SCOPES = [
61
- "search:read.public",
62
- "search:read.private",
63
- "search:read.mpim",
64
- "search:read.im",
65
- "search:read.files",
66
- "files:read",
67
- "emoji:read",
68
- "search:read.users",
69
- "chat:write",
70
- "channels:history",
71
- "groups:history",
72
- "mpim:history",
73
- "im:history",
74
- "channels:write",
75
- "groups:write",
76
- "im:write",
77
- "mpim:write",
78
- "reactions:write",
79
- "canvases:read",
80
- "canvases:write",
81
- "users:read",
82
- "users:read.email",
83
- "channels:read",
84
- "groups:read",
85
- "mpim:read",
86
- ] as const;
71
+ /** User grants required by the reviewed Slack API MCP tools. */
72
+ export const OPENGENI_SLACK_MCP_USER_SCOPES = OPENGENI_SLACK_REST_USER_SCOPES;
87
73
 
88
74
  export const OPENGENI_MANAGED_PUBLIC_BASE_URL = "https://app.opengeni.ai" as const;
89
75
 
@@ -92,6 +78,7 @@ export type OpenGeniSlackBotManifestOptions = Readonly<{
92
78
  botDisplayName?: string;
93
79
  slashCommand?: string;
94
80
  shortcutName?: string;
81
+ accessMode?: "limited" | "full";
95
82
  }>;
96
83
 
97
84
  function normalizedSlackManifestText(
@@ -134,17 +121,17 @@ export function buildOpenGeniSlackBotManifest(
134
121
  options: OpenGeniSlackBotManifestOptions = {},
135
122
  ) {
136
123
  const baseUrl = normalizedSlackManifestBaseUrl(publicBaseUrl);
137
- const appName = normalizedSlackManifestText(options.appName, "OpenGeni", "app name", 35);
124
+ const appName = normalizedSlackManifestText(options.appName, "Opengeni", "app name", 35);
138
125
  const botDisplayName = normalizedSlackManifestText(
139
126
  options.botDisplayName,
140
- "OpenGeni",
127
+ "Opengeni",
141
128
  "bot display name",
142
129
  80,
143
130
  );
144
131
  const slashCommand = normalizedSlackCommand(options.slashCommand);
145
132
  const shortcutName = normalizedSlackManifestText(
146
133
  options.shortcutName,
147
- "Open in OpenGeni",
134
+ "Open in Opengeni",
148
135
  "shortcut name",
149
136
  35,
150
137
  );
@@ -160,7 +147,7 @@ export function buildOpenGeniSlackBotManifest(
160
147
  slash_commands: [
161
148
  {
162
149
  command: slashCommand,
163
- description: "Start an OpenGeni task in this channel",
150
+ description: "Start an Opengeni task in this channel",
164
151
  should_escape: false,
165
152
  url: `${baseUrl}/v1/integrations/slack/commands`,
166
153
  },
@@ -168,7 +155,7 @@ export function buildOpenGeniSlackBotManifest(
168
155
  shortcuts: [
169
156
  {
170
157
  callback_id: "opengeni_message",
171
- description: "Start an OpenGeni task from this Slack message",
158
+ description: "Start an Opengeni task from this Slack message",
172
159
  name: shortcutName,
173
160
  type: "message",
174
161
  },
@@ -180,7 +167,7 @@ export function buildOpenGeniSlackBotManifest(
180
167
  `${baseUrl}/v1/integrations/slack/callback`,
181
168
  ],
182
169
  scopes: {
183
- bot: [...OPENGENI_SLACK_BOT_REQUESTED_SCOPES],
170
+ bot: openGeniSlackBotRequestedScopes(options.accessMode),
184
171
  user: [...OPENGENI_SLACK_MCP_USER_SCOPES],
185
172
  },
186
173
  },
@@ -202,16 +189,21 @@ export function buildOpenGeniSlackBotManifest(
202
189
  }
203
190
 
204
191
  /**
205
- * Optional bot grants that remain inside the shipped bot's read/identity
206
- * boundary. Every other unrequired scope fails closed, including unknown future
192
+ * Optional bot grants used by the shipped read/identity and task-file-delivery
193
+ * surfaces. Every other unrequired scope fails closed, including unknown future
207
194
  * Slack scopes, so verification, core routing, and UI eligibility cannot drift.
208
195
  */
209
196
  export const OPENGENI_SLACK_BOT_SAFE_OPTIONAL_SCOPES = [
210
197
  "team:read",
211
198
  OPENGENI_SLACK_REACTION_REQUIRED_SCOPE,
199
+ OPENGENI_SLACK_FILE_UPLOAD_REQUIRED_SCOPE,
212
200
  ...OPENGENI_SLACK_BOT_SEARCH_SCOPES,
213
201
  ] as const;
214
202
 
203
+ export function hasOpenGeniSlackFileUploadScope(grantedScopes: readonly string[]): boolean {
204
+ return grantedScopes.includes(OPENGENI_SLACK_FILE_UPLOAD_REQUIRED_SCOPE);
205
+ }
206
+
215
207
  export function hasOpenGeniSlackBotSearchScopes(grantedScopes: readonly string[]): boolean {
216
208
  return OPENGENI_SLACK_BOT_SEARCH_SCOPES.every((scope) => grantedScopes.includes(scope));
217
209
  }