@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.
- package/dist/agent-authored-durable-text.d.ts +9 -9
- package/dist/agent-config.d.ts +148 -37
- package/dist/api-key-presets.d.ts +19 -0
- package/dist/app-action-catalog-types.d.ts +32 -0
- package/dist/app-action-catalog.gen.d.ts +2 -0
- package/dist/app-actions.d.ts +91 -0
- package/dist/app-actions.js +10130 -0
- package/dist/app-actions.js.map +1 -0
- package/dist/app-shot.d.ts +55 -0
- package/dist/artifact-catalog.d.ts +33 -0
- package/dist/artifacts.d.ts +166 -0
- package/dist/atlassian-native-retirement.d.ts +16 -0
- package/dist/atlassian-native-retirement.js +30 -0
- package/dist/atlassian-native-retirement.js.map +1 -0
- package/dist/atlassian.js +48 -23
- package/dist/automation-templates.d.ts +434 -0
- package/dist/automation-templates.js +31 -0
- package/dist/automation-templates.js.map +1 -0
- package/dist/billing-subscriptions.d.ts +61 -0
- package/dist/bots.d.ts +583 -0
- package/dist/bundled-skills.d.ts +58 -2
- package/dist/canonical-human-identities.js +3 -1
- package/dist/child-lifecycle-notice-protocol.d.ts +45 -0
- package/dist/chunk-2QKIEAGY.js +396 -0
- package/dist/chunk-2QKIEAGY.js.map +1 -0
- package/dist/chunk-2WOWEWXV.js +426 -0
- package/dist/chunk-2WOWEWXV.js.map +1 -0
- package/dist/chunk-2ZIHHL72.js +153 -0
- package/dist/chunk-2ZIHHL72.js.map +1 -0
- package/dist/chunk-32U6NKQQ.js +389 -0
- package/dist/chunk-32U6NKQQ.js.map +1 -0
- package/dist/chunk-4YDDHSO2.js +799 -0
- package/dist/chunk-4YDDHSO2.js.map +1 -0
- package/dist/chunk-56SNIMDO.js +9 -0
- package/dist/chunk-56SNIMDO.js.map +1 -0
- package/dist/chunk-5RWB6QVL.js +101 -0
- package/dist/chunk-5RWB6QVL.js.map +1 -0
- package/dist/chunk-5UGUOT3L.js +243 -0
- package/dist/chunk-5UGUOT3L.js.map +1 -0
- package/dist/chunk-6LAT33BH.js +130 -0
- package/dist/chunk-6LAT33BH.js.map +1 -0
- package/dist/chunk-7272KVWZ.js +60 -0
- package/dist/chunk-7272KVWZ.js.map +1 -0
- package/dist/chunk-72QC2GTL.js +36 -0
- package/dist/chunk-72QC2GTL.js.map +1 -0
- package/dist/chunk-7EQGGZBY.js +105 -0
- package/dist/chunk-7EQGGZBY.js.map +1 -0
- package/dist/chunk-A3LXWVYU.js +382 -0
- package/dist/chunk-A3LXWVYU.js.map +1 -0
- package/dist/chunk-AQYDZUJV.js +34 -0
- package/dist/chunk-AQYDZUJV.js.map +1 -0
- package/dist/chunk-BHCEVVUP.js +93 -0
- package/dist/chunk-BHCEVVUP.js.map +1 -0
- package/dist/chunk-BMUTAZX5.js +486 -0
- package/dist/chunk-BMUTAZX5.js.map +1 -0
- package/dist/chunk-DGG6IBBK.js +150 -0
- package/dist/chunk-DGG6IBBK.js.map +1 -0
- package/dist/{chunk-YBW5JSA3.js → chunk-FBCTUMHI.js} +123 -102
- package/dist/chunk-FBCTUMHI.js.map +1 -0
- package/dist/chunk-G2KJTFIC.js +97 -0
- package/dist/chunk-G2KJTFIC.js.map +1 -0
- package/dist/chunk-G4RKARXZ.js +1167 -0
- package/dist/chunk-G4RKARXZ.js.map +1 -0
- package/dist/chunk-H6UJJIUM.js +350 -0
- package/dist/chunk-H6UJJIUM.js.map +1 -0
- package/dist/chunk-JOTHDW4H.js +18 -0
- package/dist/chunk-JOTHDW4H.js.map +1 -0
- package/dist/chunk-L4GUEP7K.js +56480 -0
- package/dist/chunk-L4GUEP7K.js.map +1 -0
- package/dist/{chunk-SIOU2K4U.js → chunk-LJH2EYGT.js} +23 -23
- package/dist/chunk-MTJKSIGA.js +161 -0
- package/dist/chunk-MTJKSIGA.js.map +1 -0
- package/dist/chunk-MYHMB6GZ.js +202 -0
- package/dist/chunk-MYHMB6GZ.js.map +1 -0
- package/dist/chunk-PI5VIKJY.js +660 -0
- package/dist/chunk-PI5VIKJY.js.map +1 -0
- package/dist/{chunk-RIY7GYQS.js → chunk-PTSROVDG.js} +2 -2
- package/dist/chunk-PUIUXIOL.js +189 -0
- package/dist/chunk-PUIUXIOL.js.map +1 -0
- package/dist/chunk-R6VXJIMB.js +19 -0
- package/dist/chunk-R6VXJIMB.js.map +1 -0
- package/dist/chunk-RLJUNVAM.js +15 -0
- package/dist/chunk-RLJUNVAM.js.map +1 -0
- package/dist/chunk-RR6APCBK.js +213 -0
- package/dist/chunk-RR6APCBK.js.map +1 -0
- package/dist/{chunk-TXTQIYCV.js → chunk-RUQ4I6DO.js} +59 -13
- package/dist/chunk-RUQ4I6DO.js.map +1 -0
- package/dist/{chunk-WYBDERIY.js → chunk-RWEEUDHD.js} +53 -42
- package/dist/chunk-RWEEUDHD.js.map +1 -0
- package/dist/chunk-S7MSQQL6.js +158 -0
- package/dist/chunk-S7MSQQL6.js.map +1 -0
- package/dist/{chunk-5Q54VCCH.js → chunk-SHO4YO4B.js} +20 -36
- package/dist/chunk-SHO4YO4B.js.map +1 -0
- package/dist/{chunk-HHZSZYYF.js → chunk-T3HSWMA5.js} +20 -4
- package/dist/chunk-T3HSWMA5.js.map +1 -0
- package/dist/{chunk-YRKRZ6OF.js → chunk-TOOJIBJC.js} +2 -2
- package/dist/chunk-UCUOTRS6.js +431 -0
- package/dist/chunk-UCUOTRS6.js.map +1 -0
- package/dist/chunk-UH4K7GP7.js +424 -0
- package/dist/chunk-UH4K7GP7.js.map +1 -0
- package/dist/chunk-UIZWGPHV.js +120 -0
- package/dist/chunk-UIZWGPHV.js.map +1 -0
- package/dist/chunk-VLUKBV6Y.js +1170 -0
- package/dist/chunk-VLUKBV6Y.js.map +1 -0
- package/dist/chunk-W2QQ5Y6K.js +55 -0
- package/dist/chunk-W2QQ5Y6K.js.map +1 -0
- package/dist/{chunk-Y3KNXVTD.js → chunk-W3NBPR4E.js} +131 -31
- package/dist/chunk-W3NBPR4E.js.map +1 -0
- package/dist/{chunk-NRMCVHAU.js → chunk-WMGO4HJU.js} +11 -9
- package/dist/chunk-WMGO4HJU.js.map +1 -0
- package/dist/{chunk-MYBZRDTY.js → chunk-WQI7VNN4.js} +19 -9
- package/dist/chunk-WQI7VNN4.js.map +1 -0
- package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
- package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
- package/dist/chunk-XB6GQLBH.js +76 -0
- package/dist/chunk-XB6GQLBH.js.map +1 -0
- package/dist/{chunk-D2HKF2EF.js → chunk-XP5M3IKT.js} +2 -2
- package/dist/{chunk-O77VSFYZ.js → chunk-ZMPU5BWE.js} +12 -2
- package/dist/chunk-ZMPU5BWE.js.map +1 -0
- package/dist/{chunk-3SIZGL3O.js → chunk-ZYVEJFNU.js} +22 -18
- package/dist/chunk-ZYVEJFNU.js.map +1 -0
- package/dist/claude-provider-account-authority.d.ts +18 -0
- package/dist/claude-subscription-oauth.d.ts +25 -0
- package/dist/claude-subscription-usage.d.ts +95 -1
- package/dist/client-error-report.d.ts +154 -8
- package/dist/client-error-report.js +157 -2
- package/dist/client-error-report.js.map +1 -1
- package/dist/code-search.d.ts +1 -1
- package/dist/code-search.js.map +1 -1
- package/dist/codex-provider-account-authority.js +23 -12
- package/dist/codex-provider-account-authority.js.map +1 -1
- package/dist/company-profile.d.ts +144 -0
- package/dist/connect.d.ts +38 -0
- package/dist/connect.js +244 -164
- package/dist/connect.js.map +1 -1
- package/dist/connection-account-label.d.ts +2 -0
- package/dist/connection-account-label.js +34 -0
- package/dist/connection-account-label.js.map +1 -0
- package/dist/connection-authority.js +49 -24
- package/dist/connector-attachments.js +3 -1
- package/dist/connector-destinations.js +3 -1
- package/dist/connector-tool-permissions.d.ts +68 -4
- package/dist/credential-profiles.d.ts +166 -0
- package/dist/cua-desktop-tools.d.ts +19 -0
- package/dist/define-schema.d.ts +8 -0
- package/dist/desktop-app.d.ts +28 -0
- package/dist/direct-model-provider.d.ts +38 -0
- package/dist/document-artifact-commands.js +2 -2
- package/dist/document-artifact-query.js +2 -2
- package/dist/editable-artifact-binary.d.ts +7 -0
- package/dist/editable-artifact-causal-frontier.js +2 -2
- package/dist/editable-artifact-codec-registry.js +7 -7
- package/dist/editable-artifact-committed-transaction.js +4 -2
- package/dist/editable-artifact-live.js +8 -8
- package/dist/editable-artifact-serialized-commit.js +9 -9
- package/dist/editable-artifact-versions.d.ts +7 -1
- package/dist/editable-artifact-versions.js +1 -1
- package/dist/editable-artifacts.js +49 -43
- package/dist/event-preview.d.ts +22 -0
- package/dist/event-triggers.d.ts +1253 -0
- package/dist/event-triggers.js +148 -0
- package/dist/event-triggers.js.map +1 -0
- package/dist/external-identities.d.ts +34 -0
- package/dist/external-identities.js +4 -2
- package/dist/feedback.d.ts +181 -0
- package/dist/file-access.d.ts +23 -0
- package/dist/first-party-tool-authorization.d.ts +852 -0
- package/dist/github-repository-contracts.js +64 -43
- package/dist/github-repository-contracts.js.map +1 -1
- package/dist/google-drive-native-retirement.d.ts +12 -0
- package/dist/google-drive-native-retirement.js +20 -0
- package/dist/google-drive-native-retirement.js.map +1 -0
- package/dist/google-drive.d.ts +1 -1
- package/dist/google-drive.js +323 -239
- package/dist/google-drive.js.map +1 -1
- package/dist/host-mcp-bindings.js +250 -198
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/index.d.ts +29072 -20593
- package/dist/index.js +2432 -366
- package/dist/inference-residency.d.ts +22 -0
- package/dist/insights-usage.d.ts +948 -0
- package/dist/insights-usage.js +608 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/integration-capability-id.d.ts +8 -0
- package/dist/interaction-action-deadline.d.ts +48 -0
- package/dist/interaction-driver-diagnostic.d.ts +28 -0
- package/dist/interaction.d.ts +2126 -881
- package/dist/knowledge-entries.d.ts +38 -0
- package/dist/knowledge-preparation.d.ts +4 -0
- package/dist/learning-refusal.d.ts +43 -0
- package/dist/learning-refusal.js +49 -0
- package/dist/learning-refusal.js.map +1 -0
- package/dist/managed-auth-session-sets.d.ts +1 -0
- package/dist/managed-auth-session-sets.js +207 -146
- package/dist/managed-auth-session-sets.js.map +1 -1
- package/dist/managed-sign-in-methods.d.ts +96 -0
- package/dist/managed-sign-in-methods.js +157 -35
- package/dist/managed-sign-in-methods.js.map +1 -1
- package/dist/mcp-structured-content.d.ts +25 -0
- package/dist/message-time-zone.d.ts +38 -0
- package/dist/message-time-zone.js +19 -0
- package/dist/message-time-zone.js.map +1 -0
- package/dist/modal-native-proof-v2.d.ts +587 -0
- package/dist/modal-native-proof-v2.js +39 -0
- package/dist/modal-native-proof-v2.js.map +1 -0
- package/dist/model-account-choice.d.ts +237 -0
- package/dist/model-account-settings.d.ts +422 -0
- package/dist/model-availability.d.ts +15 -0
- package/dist/model-connection-access.d.ts +13 -0
- package/dist/model-context-inspector.d.ts +8 -0
- package/dist/model-display.d.ts +43 -0
- package/dist/model-display.js +17 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.js.map +1 -1
- package/dist/model-residency.d.ts +304 -0
- package/dist/organization-access.d.ts +416 -0
- package/dist/organization-access.js +40 -0
- package/dist/organization-access.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +18 -0
- package/dist/organization-membership-lifecycle.d.ts +66 -0
- package/dist/organization-model-usage.d.ts +146 -0
- package/dist/organization-model-usage.js +87 -0
- package/dist/organization-model-usage.js.map +1 -0
- package/dist/organization-recovery.js +3 -1
- package/dist/organization-usage.d.ts +12 -0
- package/dist/passkey-only-account.d.ts +14 -0
- package/dist/passkey-only-account.js +13 -0
- package/dist/passkey-only-account.js.map +1 -0
- package/dist/permissions.d.ts +19 -0
- package/dist/personal-github.js +220 -148
- package/dist/personal-github.js.map +1 -1
- package/dist/personal-integration-setup.d.ts +81 -0
- package/dist/personal-integration-setup.js +42 -0
- package/dist/personal-integration-setup.js.map +1 -0
- package/dist/prepared-mcp-setup.d.ts +54 -0
- package/dist/prepared-mcp-setup.js +13 -0
- package/dist/prepared-mcp-setup.js.map +1 -0
- package/dist/presentation-artifact-commands.js +2 -2
- package/dist/presentation-artifact-query.js +2 -2
- package/dist/primitives.d.ts +18 -0
- package/dist/product-analytics.d.ts +27 -10
- package/dist/product-lifecycle-facts.d.ts +26 -3
- package/dist/prompt-cache-diagnostics.d.ts +92 -0
- package/dist/recordings.d.ts +1371 -0
- package/dist/remember.d.ts +98 -2
- package/dist/retained-output.d.ts +4 -2
- package/dist/sandbox-file-artifacts.d.ts +19 -2
- package/dist/sandbox-provider-command.d.ts +5 -44
- package/dist/sandbox-recovery.d.ts +139 -8
- package/dist/secret-generator.d.ts +44 -0
- package/dist/secret-mask-strings.d.ts +32 -0
- package/dist/secret-references.d.ts +90 -0
- package/dist/secret-resolution.d.ts +143 -0
- package/dist/secret-shape-masking.d.ts +52 -0
- package/dist/secret-shape-masking.js +19 -0
- package/dist/secret-shape-masking.js.map +1 -0
- package/dist/secret-totp.d.ts +41 -0
- package/dist/secret-use-approval-question.d.ts +11 -0
- package/dist/secret-use-approval-question.js +11 -0
- package/dist/secret-use-approval-question.js.map +1 -0
- package/dist/secret-use-approvals.d.ts +106 -0
- package/dist/secret-value-masking.d.ts +299 -0
- package/dist/secret-value-masking.js +62 -0
- package/dist/secret-value-masking.js.map +1 -0
- package/dist/secret-value.d.ts +19 -0
- package/dist/session-history-import.d.ts +444 -8
- package/dist/session-history.d.ts +111 -0
- package/dist/session-history.js +35 -0
- package/dist/session-history.js.map +1 -0
- package/dist/session-list-entries.d.ts +8 -0
- package/dist/session-list-entries.js +61 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-mcp-projections.d.ts +13 -1
- package/dist/session-mcp-tool-permissions.d.ts +62 -0
- package/dist/session-target.d.ts +18 -0
- package/dist/session-titles.d.ts +8 -0
- package/dist/session-titles.js +5 -1
- package/dist/session-usage-limit-refusal.d.ts +34 -0
- package/dist/session-usage-limit-refusal.js +15 -0
- package/dist/session-usage-limit-refusal.js.map +1 -0
- package/dist/session-usage-limits.d.ts +127 -0
- package/dist/session-usage-limits.js +43 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/site-data.d.ts +286 -0
- package/dist/site-operations.d.ts +39 -0
- package/dist/site-publishing.d.ts +813 -0
- package/dist/site-session-http.d.ts +103 -4
- package/dist/site-session-http.js +27 -1
- package/dist/site-sql.d.ts +425 -0
- package/dist/skills.d.ts +38 -0
- package/dist/slack-bot-scopes.d.ts +9 -7
- package/dist/slack-bot-scopes.js +6 -3
- package/dist/slack-rest-mcp.d.ts +36 -0
- package/dist/slack-rest-mcp.js +25 -0
- package/dist/slack-rest-mcp.js.map +1 -0
- package/dist/spreadsheet-artifact-commands.d.ts +14 -1
- package/dist/spreadsheet-artifact-commands.js +9 -2
- package/dist/spreadsheet-artifact-query.d.ts +13 -6
- package/dist/spreadsheet-artifact-query.js +4 -3
- package/dist/subscription-account-actions.d.ts +83 -0
- package/dist/subscription-account-pools.d.ts +326 -0
- package/dist/subscription-personal-authority-v2.d.ts +28 -0
- package/dist/subscription-personal-authority-v2.js +13 -0
- package/dist/subscription-personal-authority-v2.js.map +1 -0
- package/dist/subscription-plans.d.ts +38 -0
- package/dist/subscription-usage-pool.d.ts +89 -0
- package/dist/tool-action-review.d.ts +141 -0
- package/dist/tool-catalog.d.ts +479 -0
- package/dist/tool-policy.d.ts +5 -0
- package/dist/tool-review-presentation.d.ts +29 -0
- package/dist/tool-review-presentation.js +21 -0
- package/dist/tool-review-presentation.js.map +1 -0
- package/dist/turn-serving-policy.d.ts +223 -0
- package/dist/usage-allowances.d.ts +30 -0
- package/dist/usage-allowances.js +5 -1
- package/dist/values.d.ts +11 -0
- package/dist/values.js +19 -0
- package/dist/values.js.map +1 -0
- package/dist/vault-provider-wire.d.ts +907 -0
- package/dist/vault-provider-wire.js +74 -0
- package/dist/vault-provider-wire.js.map +1 -0
- package/dist/vaults.d.ts +2185 -0
- package/dist/video-generation.d.ts +75 -0
- package/dist/video-generation.js +8 -1
- package/dist/workspace-control-event.d.ts +18 -0
- package/dist/workspace-control-event.js +18 -0
- package/dist/workspace-control-event.js.map +1 -0
- package/dist/workspace-governance-context.d.ts +18 -0
- package/dist/workspace-integration-wire.d.ts +1 -1
- package/dist/workspace-integration-wire.js +1 -1
- package/dist/workspace-integrations.d.ts +212 -12
- package/dist/xai-provider-account-authority.js +3 -1
- package/package.json +121 -4
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +382 -203
- package/src/agent-instruction-changes.ts +94 -74
- package/src/agent-learning.ts +94 -66
- package/src/agent-topology.ts +58 -52
- package/src/api-key-presets.ts +28 -0
- package/src/app-action-catalog-types.ts +32 -0
- package/src/app-action-catalog.gen.ts +9905 -0
- package/src/app-actions.ts +365 -0
- package/src/app-shot.ts +176 -0
- package/src/artifact-catalog.ts +81 -46
- package/src/artifacts.ts +360 -227
- package/src/atlassian-native-retirement.ts +33 -0
- package/src/atlassian.ts +136 -108
- package/src/automation-templates.ts +201 -0
- package/src/billing-subscriptions.ts +48 -0
- package/src/bots.ts +238 -0
- package/src/bundled-skills.ts +79 -22
- package/src/canonical-human-identities.ts +65 -62
- package/src/child-lifecycle-notice-protocol.gen.json +1310 -0
- package/src/child-lifecycle-notice-protocol.ts +224 -0
- package/src/claude-provider-account-authority.ts +12 -0
- package/src/claude-subscription-oauth.ts +61 -19
- package/src/claude-subscription-usage.ts +64 -35
- package/src/client-error-report.ts +344 -9
- package/src/code-search.ts +1 -1
- package/src/codex-provider-account-authority.ts +22 -16
- package/src/company-brain-governed-writes.ts +265 -244
- package/src/company-brain.ts +165 -154
- package/src/company-profile.ts +362 -297
- package/src/connect.ts +222 -173
- package/src/connection-account-label.ts +45 -0
- package/src/connection-authority.ts +172 -152
- package/src/connector-attachments.ts +139 -123
- package/src/connector-destinations.ts +48 -43
- package/src/connector-tool-permissions.ts +104 -46
- package/src/credential-profiles.ts +161 -0
- package/src/cua-desktop-tools.gen.json +6722 -0
- package/src/cua-desktop-tools.linux.gen.json +6798 -0
- package/src/cua-desktop-tools.ts +42 -0
- package/src/cua-desktop-tools.windows.gen.json +6739 -0
- package/src/define-schema.ts +10 -0
- package/src/desktop-app.ts +50 -0
- package/src/direct-model-provider.ts +112 -0
- package/src/editable-artifact-binary.ts +29 -8
- package/src/editable-artifact-committed-transaction.ts +19 -18
- package/src/editable-artifact-serialized-commit.ts +8 -2
- package/src/editable-artifact-versions.ts +7 -1
- package/src/event-preview.ts +53 -3
- package/src/event-triggers.ts +891 -0
- package/src/external-identities.ts +239 -195
- package/src/feedback.ts +125 -30
- package/src/file-access.ts +26 -0
- package/src/first-party-tool-authorization.ts +383 -0
- package/src/github-repository-contracts.ts +78 -64
- package/src/google-drive-native-retirement.ts +20 -0
- package/src/google-drive.ts +286 -234
- package/src/governed-learning-activation.ts +159 -137
- package/src/governed-learning-evaluator.ts +141 -133
- package/src/host-mcp-bindings.ts +244 -221
- package/src/image-generation.ts +105 -95
- package/src/index.ts +13928 -9899
- package/src/inference-residency.ts +36 -0
- package/src/insights-usage.ts +774 -0
- package/src/integration-capability-id.ts +16 -0
- package/src/interaction-action-deadline.ts +143 -0
- package/src/interaction-driver-diagnostic.ts +89 -0
- package/src/interaction.ts +3527 -2427
- package/src/knowledge-entries.ts +386 -299
- package/src/knowledge-preparation.ts +49 -41
- package/src/knowledge.ts +242 -213
- package/src/learning-refusal.ts +90 -0
- package/src/managed-auth-session-sets.ts +180 -133
- package/src/managed-sign-in-methods.ts +156 -34
- package/src/mcp-oauth.ts +58 -46
- package/src/mcp-receipts.ts +199 -194
- package/src/mcp-structured-content.ts +81 -0
- package/src/memory-slack-delivery.ts +172 -142
- package/src/message-time-zone.ts +109 -0
- package/src/modal-native-proof-v2.ts +430 -0
- package/src/model-account-choice.ts +178 -0
- package/src/model-account-settings.ts +210 -0
- package/src/model-availability.ts +22 -0
- package/src/model-connection-access.ts +62 -14
- package/src/model-context-inspector.ts +130 -109
- package/src/model-display.ts +221 -0
- package/src/model-picker-order.ts +1 -1
- package/src/model-residency.ts +535 -0
- package/src/organization-access.ts +216 -0
- package/src/organization-integration-policy.ts +47 -28
- package/src/organization-membership-lifecycle.ts +558 -384
- package/src/organization-model-usage.ts +82 -0
- package/src/organization-recovery.ts +148 -135
- package/src/organization-usage.ts +84 -52
- package/src/passkey-only-account.ts +29 -0
- package/src/permissions.ts +94 -52
- package/src/personal-github.ts +211 -171
- package/src/personal-integration-setup.ts +150 -0
- package/src/preference-registry.ts +319 -263
- package/src/prepared-mcp-setup.ts +190 -0
- package/src/primitives.ts +22 -0
- package/src/product-analytics.ts +40 -15
- package/src/product-lifecycle-facts.ts +50 -20
- package/src/prompt-cache-diagnostics.ts +212 -0
- package/src/recordings.ts +1153 -0
- package/src/remember.ts +184 -172
- package/src/retained-output.ts +181 -168
- package/src/sandbox-file-artifacts.ts +78 -57
- package/src/sandbox-provider-command.ts +55 -72
- package/src/sandbox-recovery.ts +163 -77
- package/src/scoped-knowledge.ts +62 -43
- package/src/secret-generator.ts +156 -0
- package/src/secret-mask-strings.ts +175 -0
- package/src/secret-references.ts +414 -0
- package/src/secret-resolution.ts +322 -0
- package/src/secret-shape-masking.ts +573 -0
- package/src/secret-totp.ts +188 -0
- package/src/secret-use-approval-question.ts +22 -0
- package/src/secret-use-approvals.ts +219 -0
- package/src/secret-value-masking.ts +1283 -0
- package/src/secret-value.ts +22 -0
- package/src/session-goal-reports.ts +55 -49
- package/src/session-history-import.ts +84 -68
- package/src/session-history.ts +197 -0
- package/src/session-list-entries.ts +106 -0
- package/src/session-mcp-projections.ts +21 -3
- package/src/session-mcp-tool-permissions.ts +109 -0
- package/src/session-message-search.ts +46 -38
- package/src/session-target.ts +58 -0
- package/src/session-titles.ts +40 -4
- package/src/session-topology-primitives.ts +20 -12
- package/src/session-usage-limit-refusal.ts +101 -0
- package/src/session-usage-limits.ts +169 -0
- package/src/signup-attribution.ts +20 -15
- package/src/site-data.ts +337 -0
- package/src/site-operations.ts +154 -0
- package/src/site-publishing.ts +903 -0
- package/src/site-session-http.ts +344 -16
- package/src/site-sql.ts +1120 -0
- package/src/skill-use.ts +18 -17
- package/src/skills.ts +105 -50
- package/src/slack-bot-scopes.ts +18 -35
- package/src/slack-rest-mcp.ts +222 -0
- package/src/slack-task-policy.ts +97 -73
- package/src/spreadsheet-artifact-commands.ts +74 -13
- package/src/spreadsheet-artifact-query.ts +188 -50
- package/src/subscription-account-actions.ts +103 -0
- package/src/subscription-account-pools.ts +74 -0
- package/src/subscription-personal-authority-v2.ts +69 -0
- package/src/subscription-plans.ts +51 -0
- package/src/subscription-usage-pool.ts +44 -0
- package/src/task-notes.ts +70 -68
- package/src/tool-action-review.ts +271 -0
- package/src/tool-catalog.ts +694 -379
- package/src/tool-policy.ts +82 -0
- package/src/tool-result-spill.ts +13 -9
- package/src/tool-review-presentation.ts +643 -0
- package/src/turn-serving-policy.ts +167 -0
- package/src/usage-allowances.ts +212 -136
- package/src/values.ts +25 -0
- package/src/vault-provider-wire.ts +580 -0
- package/src/vaults.ts +1296 -0
- package/src/video-generation.ts +430 -361
- package/src/work-claims.ts +183 -166
- package/src/workspace-control-event.ts +134 -0
- package/src/workspace-governance-context.ts +63 -0
- package/src/workspace-instruction-policies.ts +346 -279
- package/src/workspace-integration-wire.ts +10 -0
- package/src/workspace-integrations.ts +488 -398
- package/src/workspace-learning-administration.ts +58 -44
- package/src/workspace-learning-policy.ts +126 -99
- package/src/workspace-state.ts +239 -220
- package/src/xai-provider-account-authority.ts +23 -17
- package/dist/chunk-3SIZGL3O.js.map +0 -1
- package/dist/chunk-566IFOVP.js +0 -26133
- package/dist/chunk-566IFOVP.js.map +0 -1
- package/dist/chunk-5IXYF6XN.js +0 -728
- package/dist/chunk-5IXYF6XN.js.map +0 -1
- package/dist/chunk-5Q54VCCH.js.map +0 -1
- package/dist/chunk-BCS7WHCK.js +0 -139
- package/dist/chunk-BCS7WHCK.js.map +0 -1
- package/dist/chunk-EK7NDGFR.js +0 -128
- package/dist/chunk-EK7NDGFR.js.map +0 -1
- package/dist/chunk-GRG7PHWQ.js +0 -25
- package/dist/chunk-GRG7PHWQ.js.map +0 -1
- package/dist/chunk-HHZSZYYF.js.map +0 -1
- package/dist/chunk-ICDZGUX2.js +0 -186
- package/dist/chunk-ICDZGUX2.js.map +0 -1
- package/dist/chunk-JUFK3T4Q.js +0 -80
- package/dist/chunk-JUFK3T4Q.js.map +0 -1
- package/dist/chunk-MYBZRDTY.js.map +0 -1
- package/dist/chunk-NRMCVHAU.js.map +0 -1
- package/dist/chunk-O77VSFYZ.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-TXTQIYCV.js.map +0 -1
- package/dist/chunk-WYBDERIY.js.map +0 -1
- package/dist/chunk-Y3KNXVTD.js.map +0 -1
- package/dist/chunk-YBW5JSA3.js.map +0 -1
- package/dist/chunk-YRXAWWCU.js +0 -45
- package/dist/chunk-YRXAWWCU.js.map +0 -1
- package/dist/chunk-YWMOIZ6A.js +0 -185
- package/dist/chunk-YWMOIZ6A.js.map +0 -1
- package/dist/site-request-headers.test.d.ts +0 -1
- package/dist/transcription-recordings.d.ts +0 -300
- package/src/transcription-recordings.ts +0 -169
- /package/dist/{chunk-SIOU2K4U.js.map → chunk-LJH2EYGT.js.map} +0 -0
- /package/dist/{chunk-RIY7GYQS.js.map → chunk-PTSROVDG.js.map} +0 -0
- /package/dist/{chunk-YRKRZ6OF.js.map → chunk-TOOJIBJC.js.map} +0 -0
- /package/dist/{chunk-D2HKF2EF.js.map → chunk-XP5M3IKT.js.map} +0 -0
package/src/skill-use.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as primitives from "./primitives";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -8,13 +10,9 @@ import { z } from "zod";
|
|
|
8
10
|
export const SKILL_USE_META_KEY = "opengeni/skillUse" as const;
|
|
9
11
|
|
|
10
12
|
/** Where the Skill a read resolved to comes from. `personal` is a user-scope Skill. */
|
|
11
|
-
export const SkillUseSource =
|
|
12
|
-
"builtin",
|
|
13
|
-
|
|
14
|
-
"workspace",
|
|
15
|
-
"organization",
|
|
16
|
-
"personal",
|
|
17
|
-
]);
|
|
13
|
+
export const SkillUseSource = /* @__PURE__ */ defineSchema(() =>
|
|
14
|
+
z.enum(["builtin", "session", "workspace", "organization", "personal"]),
|
|
15
|
+
);
|
|
18
16
|
export type SkillUseSource = z.infer<typeof SkillUseSource>;
|
|
19
17
|
|
|
20
18
|
/**
|
|
@@ -23,7 +21,9 @@ export type SkillUseSource = z.infer<typeof SkillUseSource>;
|
|
|
23
21
|
* repeat receipt. `refused` means the read returned an error instead of Skill
|
|
24
22
|
* text; it has no result, so it appears only in metrics.
|
|
25
23
|
*/
|
|
26
|
-
export const SkillReadKind =
|
|
24
|
+
export const SkillReadKind = /* @__PURE__ */ defineSchema(() =>
|
|
25
|
+
z.enum(["full", "already_in_context", "files", "list", "refused"]),
|
|
26
|
+
);
|
|
27
27
|
export type SkillReadKind = z.infer<typeof SkillReadKind>;
|
|
28
28
|
|
|
29
29
|
const skillUseFields = {
|
|
@@ -31,19 +31,16 @@ const skillUseFields = {
|
|
|
31
31
|
source: SkillUseSource,
|
|
32
32
|
label: z.string().min(1).max(128).optional(),
|
|
33
33
|
/** Whole-artifact digest, for a Skill without a ledger revision. */
|
|
34
|
-
contentSha256:
|
|
35
|
-
.string()
|
|
36
|
-
.regex(/^[0-9a-f]{64}$/u)
|
|
37
|
-
.optional(),
|
|
34
|
+
contentSha256: primitives.string.regex(/^[0-9a-f]{64}$/u).optional(),
|
|
38
35
|
/** Ledger revision of a workspace, organization, or personal Skill. */
|
|
39
36
|
revisionId: z.string().min(1).max(128).optional(),
|
|
40
37
|
kind: SkillReadKind.exclude(["refused"]),
|
|
41
38
|
/** UTF-8 bytes of the result text the read returned, before model tool-output truncation. */
|
|
42
|
-
bytes:
|
|
39
|
+
bytes: primitives.nonnegativeInteger,
|
|
43
40
|
/** The Skill appeared in the Skill index the model saw this turn. */
|
|
44
|
-
inIndex:
|
|
41
|
+
inIndex: primitives.boolean,
|
|
45
42
|
/** skill_search returned this Skill earlier in the same turn attempt. */
|
|
46
|
-
searchedThisTurn:
|
|
43
|
+
searchedThisTurn: primitives.boolean,
|
|
47
44
|
};
|
|
48
45
|
const oneProvenance = (use: {
|
|
49
46
|
contentSha256?: string | undefined;
|
|
@@ -59,13 +56,17 @@ const oneProvenanceMessage = {
|
|
|
59
56
|
* built-in; user-authored Skills never set it. This is the writer's closed
|
|
60
57
|
* shape: an unknown field fails the parse, so nothing else can be attached.
|
|
61
58
|
*/
|
|
62
|
-
export const SkillUse =
|
|
59
|
+
export const SkillUse = /* @__PURE__ */ defineSchema(() =>
|
|
60
|
+
z.strictObject(skillUseFields).refine(oneProvenance, oneProvenanceMessage),
|
|
61
|
+
);
|
|
63
62
|
export type SkillUse = z.infer<typeof SkillUse>;
|
|
64
63
|
|
|
65
64
|
// Stored events outlive the worker that wrote them. A reader drops fields a
|
|
66
65
|
// newer writer added instead of dropping the whole fact, and what it returns
|
|
67
66
|
// still holds only the known, content-free fields.
|
|
68
|
-
const StoredSkillUse =
|
|
67
|
+
const StoredSkillUse = /* @__PURE__ */ defineSchema(() =>
|
|
68
|
+
z.object(skillUseFields).refine(oneProvenance, oneProvenanceMessage),
|
|
69
|
+
);
|
|
69
70
|
|
|
70
71
|
/** The Skill-use fact on a tool result or its event projection, when present and valid. */
|
|
71
72
|
export function skillUseFromToolOutput(output: unknown): SkillUse | null {
|
package/src/skills.ts
CHANGED
|
@@ -1,31 +1,78 @@
|
|
|
1
|
+
import * as primitives from "./primitives";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
1
3
|
import { z } from "zod";
|
|
4
|
+
import { SKILL_MAX_FILES } from "./skill-files";
|
|
2
5
|
export { parseSkillFrontmatter, readSkillMetadata } from "./skill-metadata";
|
|
3
6
|
export * from "./skill-files";
|
|
4
7
|
|
|
5
8
|
/** Files are UTF-8 text, relative to the Skill root. No executable authority. */
|
|
6
|
-
export const SkillFile =
|
|
9
|
+
export const SkillFile = /* @__PURE__ */ defineSchema(() =>
|
|
10
|
+
z.object({ path: z.string().min(1).max(512), content: primitives.string }),
|
|
11
|
+
);
|
|
7
12
|
export type SkillFile = z.infer<typeof SkillFile>;
|
|
8
|
-
export const SkillActor =
|
|
9
|
-
z.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
export const SkillActor = /* @__PURE__ */ defineSchema(() =>
|
|
14
|
+
z.discriminatedUnion("kind", [
|
|
15
|
+
z.object({
|
|
16
|
+
kind: z.literal("service"),
|
|
17
|
+
subjectId: primitives.nonEmptyString,
|
|
18
|
+
principalKind: z.enum(["service", "api_key", "configured_key"]),
|
|
19
|
+
}),
|
|
20
|
+
z.object({
|
|
21
|
+
kind: z.literal("human"),
|
|
22
|
+
subjectId: primitives.nonEmptyString,
|
|
23
|
+
principalKind: z.literal("human_session"),
|
|
24
|
+
}),
|
|
25
|
+
z.object({
|
|
26
|
+
kind: z.literal("agent"),
|
|
27
|
+
sessionId: z.uuid(),
|
|
28
|
+
turnId: z.uuid(),
|
|
29
|
+
attemptId: z.uuid(),
|
|
30
|
+
executionGeneration: primitives.positiveInteger,
|
|
31
|
+
}),
|
|
32
|
+
]),
|
|
33
|
+
);
|
|
27
34
|
export type SkillActor = z.infer<typeof SkillActor>;
|
|
28
35
|
export type SkillScope = "workspace" | "organization" | "user";
|
|
36
|
+
|
|
37
|
+
/** Save a personal, workspace or organization Skill folder (`saveWorkspaceSkill`). */
|
|
38
|
+
export const SaveWorkspaceSkillRequest = /* @__PURE__ */ defineSchema(() =>
|
|
39
|
+
z
|
|
40
|
+
.object({
|
|
41
|
+
operationId: z.uuid(),
|
|
42
|
+
skillId: z.uuid(),
|
|
43
|
+
expectedRevisionId: z.uuid().nullable(),
|
|
44
|
+
expectedScopeVersion: z.number().int().nonnegative(),
|
|
45
|
+
scope: z.enum(["workspace", "organization", "user"]).default("workspace"),
|
|
46
|
+
stableKey: z.string().min(1).max(96),
|
|
47
|
+
files: z.array(SkillFile).max(SKILL_MAX_FILES),
|
|
48
|
+
deletions: z.array(z.string().min(1).max(512)).max(SKILL_MAX_FILES).default([]),
|
|
49
|
+
reason: z.string().min(1).max(2000),
|
|
50
|
+
})
|
|
51
|
+
.strict(),
|
|
52
|
+
);
|
|
53
|
+
export type SaveWorkspaceSkillRequest = z.infer<typeof SaveWorkspaceSkillRequest>;
|
|
54
|
+
|
|
55
|
+
/** Approve, reject or restore one Skill revision. */
|
|
56
|
+
export const ApplyWorkspaceSkillRevisionRequest = /* @__PURE__ */ defineSchema(() =>
|
|
57
|
+
z
|
|
58
|
+
.object({
|
|
59
|
+
removalOperationId: z.uuid().optional(),
|
|
60
|
+
operationId: z.uuid(),
|
|
61
|
+
revisionId: z.uuid(),
|
|
62
|
+
expectedRevisionId: z.uuid().nullable(),
|
|
63
|
+
expectedScopeVersion: z.number().int().nonnegative(),
|
|
64
|
+
reason: z.string().min(1).max(2000),
|
|
65
|
+
})
|
|
66
|
+
.strict(),
|
|
67
|
+
);
|
|
68
|
+
export type ApplyWorkspaceSkillRevisionRequest = z.infer<typeof ApplyWorkspaceSkillRevisionRequest>;
|
|
69
|
+
|
|
70
|
+
/** Permanently remove a Skill and all its saved revisions. */
|
|
71
|
+
export const RemoveWorkspaceSkillRequest = /* @__PURE__ */ defineSchema(() =>
|
|
72
|
+
ApplyWorkspaceSkillRevisionRequest.omit({ revisionId: true, removalOperationId: true }),
|
|
73
|
+
);
|
|
74
|
+
export type RemoveWorkspaceSkillRequest = z.infer<typeof RemoveWorkspaceSkillRequest>;
|
|
75
|
+
|
|
29
76
|
export type SkillWriteContext = { accountId: string; workspaceId: string; actor: SkillActor };
|
|
30
77
|
export type SkillSaveInput = SkillWriteContext & {
|
|
31
78
|
operationId: string;
|
|
@@ -58,14 +105,16 @@ export type SkillInstallInput = SkillWriteContext & {
|
|
|
58
105
|
skillFacetId: string;
|
|
59
106
|
reason: string;
|
|
60
107
|
};
|
|
61
|
-
export const SkillReviewReference =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
108
|
+
export const SkillReviewReference = /* @__PURE__ */ defineSchema(() =>
|
|
109
|
+
z.object({
|
|
110
|
+
removalOperationId: z.uuid().optional(),
|
|
111
|
+
sourceOperationId: z.uuid(),
|
|
112
|
+
skillId: z.uuid(),
|
|
113
|
+
revisionId: z.uuid(),
|
|
114
|
+
expectedRevisionId: z.uuid().nullable(),
|
|
115
|
+
expectedScopeVersion: primitives.positiveInteger,
|
|
116
|
+
}),
|
|
117
|
+
);
|
|
69
118
|
export type SkillReviewReference = z.infer<typeof SkillReviewReference>;
|
|
70
119
|
export function skillReviewHumanInput(skillReview: SkillReviewReference) {
|
|
71
120
|
const removing = Boolean(skillReview.removalOperationId);
|
|
@@ -92,30 +141,36 @@ export function skillReviewHumanInput(skillReview: SkillReviewReference) {
|
|
|
92
141
|
],
|
|
93
142
|
};
|
|
94
143
|
}
|
|
95
|
-
export const SkillWriteReceipt =
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
144
|
+
export const SkillWriteReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
145
|
+
z.object({
|
|
146
|
+
removed: primitives.optionalBoolean,
|
|
147
|
+
operationId: z.uuid(),
|
|
148
|
+
skillId: z.uuid(),
|
|
149
|
+
revisionId: z.uuid(),
|
|
150
|
+
outcome: z.enum(["applied", "pending", "preserved"]),
|
|
151
|
+
decision: z.literal("rejected").optional(),
|
|
152
|
+
pendingReason: z.enum(["approval", "source_finalization"]).optional(),
|
|
153
|
+
skillReview: SkillReviewReference.optional(),
|
|
154
|
+
replayed: primitives.boolean,
|
|
155
|
+
}),
|
|
156
|
+
);
|
|
106
157
|
export type SkillWriteReceipt = z.infer<typeof SkillWriteReceipt>;
|
|
107
|
-
export const SkillPublicationReceipt =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
158
|
+
export const SkillPublicationReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
159
|
+
SkillWriteReceipt.extend({
|
|
160
|
+
sourceOperationId: z.uuid(),
|
|
161
|
+
activationEventId: z.uuid().nullable(),
|
|
162
|
+
}),
|
|
163
|
+
);
|
|
111
164
|
export type SkillPublicationReceipt = z.infer<typeof SkillPublicationReceipt>;
|
|
112
|
-
export const SkillSourceReleaseReceipt =
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
165
|
+
export const SkillSourceReleaseReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
166
|
+
z.object({
|
|
167
|
+
skillId: z.uuid(),
|
|
168
|
+
revisionId: z.uuid().nullable(),
|
|
169
|
+
disposition: z.enum(["deactivated", "preserved", "inactive"]),
|
|
170
|
+
eventId: z.uuid().nullable(),
|
|
171
|
+
warning: primitives.nullableString,
|
|
172
|
+
}),
|
|
173
|
+
);
|
|
119
174
|
export type SkillSourceReleaseReceipt = z.infer<typeof SkillSourceReleaseReceipt>;
|
|
120
175
|
export type SkillRecord = {
|
|
121
176
|
removalOperationId?: string | null;
|
package/src/slack-bot-scopes.ts
CHANGED
|
@@ -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",
|
|
@@ -47,9 +49,15 @@ export const OPENGENI_SLACK_BOT_REQUESTED_SCOPES = [
|
|
|
47
49
|
...OPENGENI_SLACK_BOT_REQUIRED_SCOPES,
|
|
48
50
|
OPENGENI_SLACK_REACTION_REQUIRED_SCOPE,
|
|
49
51
|
OPENGENI_SLACK_FILE_UPLOAD_REQUIRED_SCOPE,
|
|
50
|
-
...OPENGENI_SLACK_BOT_SEARCH_SCOPES,
|
|
51
52
|
] as const;
|
|
52
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
|
+
|
|
53
61
|
export const OPENGENI_SLACK_BOT_EVENTS = [
|
|
54
62
|
"app_home_opened",
|
|
55
63
|
"app_mention",
|
|
@@ -60,34 +68,8 @@ export const OPENGENI_SLACK_BOT_EVENTS = [
|
|
|
60
68
|
"reaction_added",
|
|
61
69
|
] as const;
|
|
62
70
|
|
|
63
|
-
/**
|
|
64
|
-
export const OPENGENI_SLACK_MCP_USER_SCOPES =
|
|
65
|
-
"search:read.public",
|
|
66
|
-
"search:read.private",
|
|
67
|
-
"search:read.mpim",
|
|
68
|
-
"search:read.im",
|
|
69
|
-
"search:read.files",
|
|
70
|
-
"files:read",
|
|
71
|
-
"emoji:read",
|
|
72
|
-
"search:read.users",
|
|
73
|
-
"chat:write",
|
|
74
|
-
"channels:history",
|
|
75
|
-
"groups:history",
|
|
76
|
-
"mpim:history",
|
|
77
|
-
"im:history",
|
|
78
|
-
"channels:write",
|
|
79
|
-
"groups:write",
|
|
80
|
-
"im:write",
|
|
81
|
-
"mpim:write",
|
|
82
|
-
"reactions:write",
|
|
83
|
-
"canvases:read",
|
|
84
|
-
"canvases:write",
|
|
85
|
-
"users:read",
|
|
86
|
-
"users:read.email",
|
|
87
|
-
"channels:read",
|
|
88
|
-
"groups:read",
|
|
89
|
-
"mpim:read",
|
|
90
|
-
] 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;
|
|
91
73
|
|
|
92
74
|
export const OPENGENI_MANAGED_PUBLIC_BASE_URL = "https://app.opengeni.ai" as const;
|
|
93
75
|
|
|
@@ -96,6 +78,7 @@ export type OpenGeniSlackBotManifestOptions = Readonly<{
|
|
|
96
78
|
botDisplayName?: string;
|
|
97
79
|
slashCommand?: string;
|
|
98
80
|
shortcutName?: string;
|
|
81
|
+
accessMode?: "limited" | "full";
|
|
99
82
|
}>;
|
|
100
83
|
|
|
101
84
|
function normalizedSlackManifestText(
|
|
@@ -138,17 +121,17 @@ export function buildOpenGeniSlackBotManifest(
|
|
|
138
121
|
options: OpenGeniSlackBotManifestOptions = {},
|
|
139
122
|
) {
|
|
140
123
|
const baseUrl = normalizedSlackManifestBaseUrl(publicBaseUrl);
|
|
141
|
-
const appName = normalizedSlackManifestText(options.appName, "
|
|
124
|
+
const appName = normalizedSlackManifestText(options.appName, "Opengeni", "app name", 35);
|
|
142
125
|
const botDisplayName = normalizedSlackManifestText(
|
|
143
126
|
options.botDisplayName,
|
|
144
|
-
"
|
|
127
|
+
"Opengeni",
|
|
145
128
|
"bot display name",
|
|
146
129
|
80,
|
|
147
130
|
);
|
|
148
131
|
const slashCommand = normalizedSlackCommand(options.slashCommand);
|
|
149
132
|
const shortcutName = normalizedSlackManifestText(
|
|
150
133
|
options.shortcutName,
|
|
151
|
-
"Open in
|
|
134
|
+
"Open in Opengeni",
|
|
152
135
|
"shortcut name",
|
|
153
136
|
35,
|
|
154
137
|
);
|
|
@@ -164,7 +147,7 @@ export function buildOpenGeniSlackBotManifest(
|
|
|
164
147
|
slash_commands: [
|
|
165
148
|
{
|
|
166
149
|
command: slashCommand,
|
|
167
|
-
description: "Start an
|
|
150
|
+
description: "Start an Opengeni task in this channel",
|
|
168
151
|
should_escape: false,
|
|
169
152
|
url: `${baseUrl}/v1/integrations/slack/commands`,
|
|
170
153
|
},
|
|
@@ -172,7 +155,7 @@ export function buildOpenGeniSlackBotManifest(
|
|
|
172
155
|
shortcuts: [
|
|
173
156
|
{
|
|
174
157
|
callback_id: "opengeni_message",
|
|
175
|
-
description: "Start an
|
|
158
|
+
description: "Start an Opengeni task from this Slack message",
|
|
176
159
|
name: shortcutName,
|
|
177
160
|
type: "message",
|
|
178
161
|
},
|
|
@@ -184,7 +167,7 @@ export function buildOpenGeniSlackBotManifest(
|
|
|
184
167
|
`${baseUrl}/v1/integrations/slack/callback`,
|
|
185
168
|
],
|
|
186
169
|
scopes: {
|
|
187
|
-
bot:
|
|
170
|
+
bot: openGeniSlackBotRequestedScopes(options.accessMode),
|
|
188
171
|
user: [...OPENGENI_SLACK_MCP_USER_SCOPES],
|
|
189
172
|
},
|
|
190
173
|
},
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/** The catalog and OAuth identity stay stable while calls use the ordinary Web API. */
|
|
2
|
+
export const OFFICIAL_SLACK_MCP_URL = "https://mcp.slack.com/mcp";
|
|
3
|
+
export const SLACK_REST_API_BASE = "https://slack.com/api/";
|
|
4
|
+
/** Private Slack file bytes are served only from this origin and path. */
|
|
5
|
+
export const SLACK_PRIVATE_FILE_ORIGIN = "https://files.slack.com";
|
|
6
|
+
export const SLACK_PRIVATE_FILE_PATH_PREFIX = "/files-pri/";
|
|
7
|
+
|
|
8
|
+
/** A private Slack file download URL that may carry a Slack user token. */
|
|
9
|
+
export function isSlackPrivateFileUrl(value: string | URL): boolean {
|
|
10
|
+
try {
|
|
11
|
+
const url = new URL(value);
|
|
12
|
+
return (
|
|
13
|
+
url.origin === SLACK_PRIVATE_FILE_ORIGIN &&
|
|
14
|
+
!url.username &&
|
|
15
|
+
!url.password &&
|
|
16
|
+
!url.hash &&
|
|
17
|
+
url.pathname.startsWith(SLACK_PRIVATE_FILE_PATH_PREFIX) &&
|
|
18
|
+
!url.pathname.split("/").some((segment) => segment === "." || segment === "..")
|
|
19
|
+
);
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const OPENGENI_SLACK_REST_USER_SCOPES = [
|
|
26
|
+
"channels:read",
|
|
27
|
+
"groups:read",
|
|
28
|
+
"im:read",
|
|
29
|
+
"mpim:read",
|
|
30
|
+
"channels:history",
|
|
31
|
+
"groups:history",
|
|
32
|
+
"im:history",
|
|
33
|
+
"mpim:history",
|
|
34
|
+
"users:read",
|
|
35
|
+
"files:read",
|
|
36
|
+
"im:write",
|
|
37
|
+
"chat:write",
|
|
38
|
+
] as const;
|
|
39
|
+
|
|
40
|
+
/** Slack returns comma-delimited scopes, including in existing saved grants. */
|
|
41
|
+
export function normalizeSlackScopes(
|
|
42
|
+
scopes: readonly string[] | string | undefined | null,
|
|
43
|
+
): string[] {
|
|
44
|
+
return [
|
|
45
|
+
...new Set(
|
|
46
|
+
(typeof scopes === "string" ? [scopes] : (scopes ?? []))
|
|
47
|
+
.flatMap((entry) => entry.split(/[\s,]+/u))
|
|
48
|
+
.filter(Boolean),
|
|
49
|
+
),
|
|
50
|
+
].sort();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type SlackRestMcpTool = {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
inputSchema: {
|
|
57
|
+
type: "object";
|
|
58
|
+
properties: Record<string, unknown>;
|
|
59
|
+
required: string[];
|
|
60
|
+
additionalProperties: false;
|
|
61
|
+
};
|
|
62
|
+
annotations: {
|
|
63
|
+
readOnlyHint: boolean;
|
|
64
|
+
destructiveHint: false;
|
|
65
|
+
idempotentHint: boolean;
|
|
66
|
+
openWorldHint: true;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const conversationScopes = ["channels:read", "groups:read", "im:read", "mpim:read"];
|
|
71
|
+
const historyScopes = ["channels:history", "groups:history", "im:history", "mpim:history"];
|
|
72
|
+
const channel = { type: "string", description: "Slack conversation ID, such as C123 or D123." };
|
|
73
|
+
const cursor = { type: "string", maxLength: 4096, description: "Cursor from the previous page." };
|
|
74
|
+
const directoryPage = { type: "integer", minimum: 1, maximum: 100, default: 100 };
|
|
75
|
+
const historyPage = { type: "integer", minimum: 1, maximum: 15, default: 15 };
|
|
76
|
+
const timestamp = { type: "string", pattern: "^[0-9]+\\.[0-9]+$" };
|
|
77
|
+
|
|
78
|
+
function tool(
|
|
79
|
+
name: string,
|
|
80
|
+
description: string,
|
|
81
|
+
properties: Record<string, unknown>,
|
|
82
|
+
required: string[] = [],
|
|
83
|
+
mutation = false,
|
|
84
|
+
): SlackRestMcpTool {
|
|
85
|
+
return {
|
|
86
|
+
name,
|
|
87
|
+
description,
|
|
88
|
+
inputSchema: { type: "object", properties, required, additionalProperties: false },
|
|
89
|
+
annotations: {
|
|
90
|
+
readOnlyHint: !mutation,
|
|
91
|
+
destructiveHint: false,
|
|
92
|
+
idempotentHint: !mutation,
|
|
93
|
+
openWorldHint: true,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Static reviewed pilot surface. Each call reads only one explicitly requested page. */
|
|
99
|
+
export const SLACK_REST_MCP_TOOLS: SlackRestMcpTool[] = [
|
|
100
|
+
tool(
|
|
101
|
+
"slack_list_channels",
|
|
102
|
+
"Lists one page of conversations visible to your connected Slack account. Conversation types without a granted read scope are omitted.",
|
|
103
|
+
{
|
|
104
|
+
types: {
|
|
105
|
+
type: "array",
|
|
106
|
+
items: { type: "string", enum: ["public_channel", "private_channel", "im", "mpim"] },
|
|
107
|
+
minItems: 1,
|
|
108
|
+
maxItems: 4,
|
|
109
|
+
},
|
|
110
|
+
cursor,
|
|
111
|
+
limit: directoryPage,
|
|
112
|
+
exclude_archived: { type: "boolean", default: true },
|
|
113
|
+
},
|
|
114
|
+
),
|
|
115
|
+
tool(
|
|
116
|
+
"slack_get_channel_info",
|
|
117
|
+
"Gets metadata for one conversation visible to your connected Slack account.",
|
|
118
|
+
{ channel },
|
|
119
|
+
["channel"],
|
|
120
|
+
),
|
|
121
|
+
tool(
|
|
122
|
+
"slack_list_channel_members",
|
|
123
|
+
"Lists one page of members in a visible channel or group conversation.",
|
|
124
|
+
{ channel, cursor, limit: directoryPage },
|
|
125
|
+
["channel"],
|
|
126
|
+
),
|
|
127
|
+
tool("slack_list_users", "Lists one page of users in the connected Slack workspace.", {
|
|
128
|
+
cursor,
|
|
129
|
+
limit: directoryPage,
|
|
130
|
+
}),
|
|
131
|
+
tool(
|
|
132
|
+
"slack_get_user_info",
|
|
133
|
+
"Gets a user's profile by their Slack user ID. Email is included only when Slack has granted that scope.",
|
|
134
|
+
{ user: { type: "string" } },
|
|
135
|
+
["user"],
|
|
136
|
+
),
|
|
137
|
+
tool(
|
|
138
|
+
"slack_read_channel",
|
|
139
|
+
"Reads one page of at most 15 messages from a selected conversation. Slack history limits are shared across the workspace. No automatic pagination or backfill.",
|
|
140
|
+
{
|
|
141
|
+
channel,
|
|
142
|
+
cursor,
|
|
143
|
+
limit: historyPage,
|
|
144
|
+
oldest: timestamp,
|
|
145
|
+
latest: timestamp,
|
|
146
|
+
inclusive: { type: "boolean", default: false },
|
|
147
|
+
},
|
|
148
|
+
["channel"],
|
|
149
|
+
),
|
|
150
|
+
tool(
|
|
151
|
+
"slack_read_thread",
|
|
152
|
+
"Reads one page of at most 15 messages in a selected thread. Slack thread limits are shared across the workspace. No automatic pagination or backfill.",
|
|
153
|
+
{
|
|
154
|
+
channel,
|
|
155
|
+
ts: { ...timestamp, description: "Thread root message timestamp." },
|
|
156
|
+
cursor,
|
|
157
|
+
limit: historyPage,
|
|
158
|
+
},
|
|
159
|
+
["channel", "ts"],
|
|
160
|
+
),
|
|
161
|
+
tool(
|
|
162
|
+
"slack_download_file",
|
|
163
|
+
"Downloads one file shared in Slack, such as a PDF or image, into your workspace like an attachment and returns its path. Use the file ID (F...) from a message's files.",
|
|
164
|
+
{ file: { type: "string", pattern: "^F[A-Z0-9]+$", description: "Slack file ID." } },
|
|
165
|
+
["file"],
|
|
166
|
+
),
|
|
167
|
+
tool(
|
|
168
|
+
"slack_open_dm",
|
|
169
|
+
"Opens or resumes a direct message with one Slack user as your connected account.",
|
|
170
|
+
{ user: { type: "string" } },
|
|
171
|
+
["user"],
|
|
172
|
+
true,
|
|
173
|
+
),
|
|
174
|
+
tool(
|
|
175
|
+
"slack_send_message",
|
|
176
|
+
"Sends a message as your connected Slack account. Supply thread_ts to reply in a thread. Review the recipient and text before approving. An uncertain submission is never automatically retried.",
|
|
177
|
+
{
|
|
178
|
+
channel,
|
|
179
|
+
text: { type: "string", minLength: 1, maxLength: 40000 },
|
|
180
|
+
thread_ts: { ...timestamp, description: "Optional thread root timestamp for a reply." },
|
|
181
|
+
unfurl_links: { type: "boolean", default: false },
|
|
182
|
+
unfurl_media: { type: "boolean", default: false },
|
|
183
|
+
},
|
|
184
|
+
["channel", "text"],
|
|
185
|
+
true,
|
|
186
|
+
),
|
|
187
|
+
];
|
|
188
|
+
|
|
189
|
+
const REQUIRED_ANY_SCOPES: Readonly<Record<string, readonly string[]>> = {
|
|
190
|
+
slack_list_channels: conversationScopes,
|
|
191
|
+
slack_get_channel_info: conversationScopes,
|
|
192
|
+
slack_list_channel_members: ["channels:read", "groups:read", "mpim:read"],
|
|
193
|
+
slack_list_users: ["users:read"],
|
|
194
|
+
slack_get_user_info: ["users:read"],
|
|
195
|
+
slack_read_channel: historyScopes,
|
|
196
|
+
slack_read_thread: historyScopes,
|
|
197
|
+
slack_download_file: ["files:read"],
|
|
198
|
+
slack_open_dm: ["im:write"],
|
|
199
|
+
slack_send_message: ["chat:write"],
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export function slackRestMcpToolsForScopes(scopes: readonly string[] | string): SlackRestMcpTool[] {
|
|
203
|
+
const granted = new Set(normalizeSlackScopes(scopes));
|
|
204
|
+
return SLACK_REST_MCP_TOOLS.filter((entry) =>
|
|
205
|
+
REQUIRED_ANY_SCOPES[entry.name]?.some((scope) => granted.has(scope)),
|
|
206
|
+
).map((entry) => ({
|
|
207
|
+
...entry,
|
|
208
|
+
inputSchema: {
|
|
209
|
+
...entry.inputSchema,
|
|
210
|
+
required: [...entry.inputSchema.required],
|
|
211
|
+
properties: { ...entry.inputSchema.properties },
|
|
212
|
+
},
|
|
213
|
+
annotations: { ...entry.annotations },
|
|
214
|
+
}));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export const SLACK_CONVERSATION_READ_SCOPE_BY_TYPE = {
|
|
218
|
+
public_channel: "channels:read",
|
|
219
|
+
private_channel: "groups:read",
|
|
220
|
+
im: "im:read",
|
|
221
|
+
mpim: "mpim:read",
|
|
222
|
+
} as const;
|