@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
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
import * as primitives from "./primitives";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
3
|
+
import { secretValue } from "./secret-value";
|
|
1
4
|
import { z } from "zod";
|
|
2
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
NotificationFact,
|
|
7
|
+
NotificationLink,
|
|
8
|
+
NotificationUndeliveredReason,
|
|
9
|
+
NotificationUrgency,
|
|
10
|
+
type TurnInitiator,
|
|
11
|
+
type TurnInitiatorContext,
|
|
12
|
+
} from "./index";
|
|
3
13
|
|
|
4
14
|
import {
|
|
5
15
|
OPENGENI_WEBHOOK_TEST_EVENT_TYPE,
|
|
@@ -16,176 +26,205 @@ export * from "./workspace-integration-wire";
|
|
|
16
26
|
/**
|
|
17
27
|
* Workspace integration primitives for embedding hosts: signed outbound
|
|
18
28
|
* webhooks and one signed HTTP credential provider per workspace. Both
|
|
19
|
-
* directions share one signature scheme so a host verifies every
|
|
29
|
+
* directions share one signature scheme so a host verifies every Opengeni
|
|
20
30
|
* request with the same helper.
|
|
21
31
|
*/
|
|
22
32
|
|
|
23
|
-
export const WorkspaceWebhookEventType =
|
|
33
|
+
export const WorkspaceWebhookEventType = /* @__PURE__ */ defineSchema(() =>
|
|
34
|
+
z.enum(WORKSPACE_WEBHOOK_EVENT_TYPES),
|
|
35
|
+
);
|
|
24
36
|
export type WorkspaceWebhookEventType = z.infer<typeof WorkspaceWebhookEventType>;
|
|
25
37
|
|
|
26
38
|
export const WORKSPACE_WEBHOOK_LIMIT_PER_WORKSPACE = 10;
|
|
27
39
|
export const ORGANIZATION_WEBHOOK_LIMIT_PER_ORGANIZATION = 10;
|
|
28
40
|
|
|
29
41
|
/** Scoping convenience, never authority. Null means all non-personal workspaces. */
|
|
30
|
-
export const IntegrationWorkspaceFilter =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
export const IntegrationWorkspaceFilter = /* @__PURE__ */ defineSchema(() =>
|
|
43
|
+
z
|
|
44
|
+
.object({
|
|
45
|
+
externalSource: z
|
|
46
|
+
.string()
|
|
47
|
+
.min(1)
|
|
48
|
+
.max(200)
|
|
49
|
+
.refine(
|
|
50
|
+
(value) =>
|
|
51
|
+
!value.includes("\0") &&
|
|
52
|
+
!/[\uD800-\uDFFF]/u.test(value) &&
|
|
53
|
+
new TextEncoder().encode(value).byteLength <= 200,
|
|
54
|
+
"External source must be valid PostgreSQL text of at most 200 UTF-8 bytes",
|
|
55
|
+
),
|
|
56
|
+
})
|
|
57
|
+
.strict(),
|
|
58
|
+
);
|
|
45
59
|
export type IntegrationWorkspaceFilter = z.infer<typeof IntegrationWorkspaceFilter>;
|
|
46
60
|
|
|
47
61
|
/** Informational attribution only. It never supplies or changes authorization. */
|
|
48
|
-
export const InitiatingHuman =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
62
|
+
export const InitiatingHuman = /* @__PURE__ */ defineSchema(() =>
|
|
63
|
+
z.object({
|
|
64
|
+
subjectId: primitives.string,
|
|
65
|
+
externalIdentity: z
|
|
66
|
+
.object({ source: primitives.string, externalId: primitives.string })
|
|
67
|
+
.nullable(),
|
|
68
|
+
}),
|
|
69
|
+
);
|
|
52
70
|
export type InitiatingHuman = z.infer<typeof InitiatingHuman>;
|
|
53
71
|
|
|
54
|
-
const HttpUrl =
|
|
55
|
-
.string
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
const HttpUrl = /* @__PURE__ */ defineSchema(() =>
|
|
73
|
+
primitives.string
|
|
74
|
+
.trim()
|
|
75
|
+
.min(8)
|
|
76
|
+
.max(2048)
|
|
77
|
+
.url()
|
|
78
|
+
.refine((value) => /^https?:\/\//i.test(value), "URL must use http or https"),
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const EventTypes = /* @__PURE__ */ defineSchema(() =>
|
|
82
|
+
z
|
|
83
|
+
.array(WorkspaceWebhookEventType)
|
|
84
|
+
.min(1)
|
|
85
|
+
.max(WORKSPACE_WEBHOOK_EVENT_TYPES.length)
|
|
86
|
+
.transform((types) => [...new Set(types)]),
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
export const WorkspaceWebhook = /* @__PURE__ */ defineSchema(() =>
|
|
90
|
+
z
|
|
91
|
+
.object({
|
|
92
|
+
id: primitives.uuid,
|
|
93
|
+
workspaceId: primitives.uuid,
|
|
94
|
+
url: primitives.string,
|
|
95
|
+
eventTypes: z.array(WorkspaceWebhookEventType),
|
|
96
|
+
enabled: primitives.boolean,
|
|
97
|
+
description: primitives.nullableString,
|
|
98
|
+
createdAt: primitives.string,
|
|
99
|
+
updatedAt: primitives.string,
|
|
100
|
+
})
|
|
101
|
+
.strict(),
|
|
102
|
+
);
|
|
80
103
|
export type WorkspaceWebhook = z.infer<typeof WorkspaceWebhook>;
|
|
81
104
|
|
|
82
|
-
export const CreateWorkspaceWebhookRequest =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
105
|
+
export const CreateWorkspaceWebhookRequest = /* @__PURE__ */ defineSchema(() =>
|
|
106
|
+
z
|
|
107
|
+
.object({
|
|
108
|
+
url: HttpUrl,
|
|
109
|
+
eventTypes: EventTypes,
|
|
110
|
+
enabled: primitives.optionalBoolean,
|
|
111
|
+
description: primitives.string.trim().max(500).nullable().optional(),
|
|
112
|
+
})
|
|
113
|
+
.strict(),
|
|
114
|
+
);
|
|
90
115
|
export type CreateWorkspaceWebhookRequest = z.input<typeof CreateWorkspaceWebhookRequest>;
|
|
91
116
|
|
|
92
117
|
/** The signing secret is returned exactly once, at creation. */
|
|
93
|
-
export const CreateWorkspaceWebhookResponse =
|
|
94
|
-
.object({ webhook: WorkspaceWebhook, secret:
|
|
95
|
-
|
|
118
|
+
export const CreateWorkspaceWebhookResponse = /* @__PURE__ */ defineSchema(() =>
|
|
119
|
+
z.object({ webhook: WorkspaceWebhook, secret: primitives.string }).strict(),
|
|
120
|
+
);
|
|
96
121
|
export type CreateWorkspaceWebhookResponse = z.infer<typeof CreateWorkspaceWebhookResponse>;
|
|
97
122
|
|
|
98
|
-
export const UpdateWorkspaceWebhookRequest =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
123
|
+
export const UpdateWorkspaceWebhookRequest = /* @__PURE__ */ defineSchema(() =>
|
|
124
|
+
z
|
|
125
|
+
.object({
|
|
126
|
+
url: HttpUrl.optional(),
|
|
127
|
+
eventTypes: EventTypes.optional(),
|
|
128
|
+
enabled: primitives.optionalBoolean,
|
|
129
|
+
description: primitives.string.trim().max(500).nullable().optional(),
|
|
130
|
+
})
|
|
131
|
+
.strict(),
|
|
132
|
+
);
|
|
106
133
|
export type UpdateWorkspaceWebhookRequest = z.input<typeof UpdateWorkspaceWebhookRequest>;
|
|
107
134
|
|
|
108
|
-
export const ListWorkspaceWebhooksResponse =
|
|
109
|
-
.object({ webhooks: z.array(WorkspaceWebhook) })
|
|
110
|
-
|
|
135
|
+
export const ListWorkspaceWebhooksResponse = /* @__PURE__ */ defineSchema(() =>
|
|
136
|
+
z.object({ webhooks: z.array(WorkspaceWebhook) }).strict(),
|
|
137
|
+
);
|
|
111
138
|
export type ListWorkspaceWebhooksResponse = z.infer<typeof ListWorkspaceWebhooksResponse>;
|
|
112
139
|
|
|
113
|
-
/** Organization webhooks fan out session events
|
|
140
|
+
/** Organization webhooks fan out session and recording events; usage events are per-workspace. */
|
|
114
141
|
export const OrganizationWebhookEventType = WorkspaceWebhookEventType.exclude([
|
|
115
142
|
"usage.threshold_reached",
|
|
116
143
|
"usage.exhausted",
|
|
117
144
|
"usage.period_reset",
|
|
118
145
|
]);
|
|
119
146
|
export type OrganizationWebhookEventType = z.infer<typeof OrganizationWebhookEventType>;
|
|
120
|
-
const OrganizationEventTypes =
|
|
121
|
-
|
|
122
|
-
.min(1)
|
|
123
|
-
.max(WorkspaceWebhookEventType.options.length)
|
|
124
|
-
.refine((types) => types.every((type) => !type.startsWith("usage.")), {
|
|
125
|
-
message:
|
|
126
|
-
"Organization webhooks accept session events only; subscribe to usage events on a workspace webhook.",
|
|
127
|
-
})
|
|
128
|
-
.transform((types) => [...new Set(types)]);
|
|
129
|
-
|
|
130
|
-
export const OrganizationWebhook = WorkspaceWebhook.omit({ workspaceId: true }).extend({
|
|
131
|
-
organizationId: z.string().uuid(),
|
|
132
|
-
eventTypes: z
|
|
147
|
+
const OrganizationEventTypes = /* @__PURE__ */ defineSchema(() =>
|
|
148
|
+
z
|
|
133
149
|
.array(WorkspaceWebhookEventType)
|
|
150
|
+
.min(1)
|
|
151
|
+
.max(WorkspaceWebhookEventType.options.length)
|
|
134
152
|
.refine((types) => types.every((type) => !type.startsWith("usage.")), {
|
|
135
153
|
message:
|
|
136
154
|
"Organization webhooks accept session events only; subscribe to usage events on a workspace webhook.",
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
|
|
155
|
+
})
|
|
156
|
+
.transform((types) => [...new Set(types)]),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
export const OrganizationWebhook = /* @__PURE__ */ defineSchema(() =>
|
|
160
|
+
WorkspaceWebhook.omit({ workspaceId: true }).extend({
|
|
161
|
+
organizationId: primitives.uuid,
|
|
162
|
+
eventTypes: z
|
|
163
|
+
.array(WorkspaceWebhookEventType)
|
|
164
|
+
.refine((types) => types.every((type) => !type.startsWith("usage.")), {
|
|
165
|
+
message:
|
|
166
|
+
"Organization webhooks accept session events only; subscribe to usage events on a workspace webhook.",
|
|
167
|
+
}),
|
|
168
|
+
workspaceFilter: IntegrationWorkspaceFilter.nullable(),
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
140
171
|
export type OrganizationWebhook = z.infer<typeof OrganizationWebhook>;
|
|
141
172
|
|
|
142
|
-
export const CreateOrganizationWebhookRequest =
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
173
|
+
export const CreateOrganizationWebhookRequest = /* @__PURE__ */ defineSchema(() =>
|
|
174
|
+
CreateWorkspaceWebhookRequest.extend({
|
|
175
|
+
eventTypes: OrganizationEventTypes,
|
|
176
|
+
workspaceFilter: IntegrationWorkspaceFilter.nullable(),
|
|
177
|
+
}),
|
|
178
|
+
);
|
|
146
179
|
export type CreateOrganizationWebhookRequest = z.input<typeof CreateOrganizationWebhookRequest>;
|
|
147
180
|
|
|
148
|
-
export const UpdateOrganizationWebhookRequest =
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
181
|
+
export const UpdateOrganizationWebhookRequest = /* @__PURE__ */ defineSchema(() =>
|
|
182
|
+
UpdateWorkspaceWebhookRequest.extend({
|
|
183
|
+
eventTypes: OrganizationEventTypes.optional(),
|
|
184
|
+
/** Explicit on every update: null covers all non-personal workspaces. */
|
|
185
|
+
workspaceFilter: IntegrationWorkspaceFilter.nullable(),
|
|
186
|
+
}),
|
|
187
|
+
);
|
|
153
188
|
export type UpdateOrganizationWebhookRequest = z.input<typeof UpdateOrganizationWebhookRequest>;
|
|
154
189
|
|
|
155
|
-
export const CreateOrganizationWebhookResponse =
|
|
156
|
-
.object({ webhook: OrganizationWebhook, secret:
|
|
157
|
-
|
|
190
|
+
export const CreateOrganizationWebhookResponse = /* @__PURE__ */ defineSchema(() =>
|
|
191
|
+
z.object({ webhook: OrganizationWebhook, secret: primitives.string }).strict(),
|
|
192
|
+
);
|
|
158
193
|
export type CreateOrganizationWebhookResponse = z.infer<typeof CreateOrganizationWebhookResponse>;
|
|
159
194
|
|
|
160
|
-
export const ListOrganizationWebhooksResponse =
|
|
161
|
-
.object({ webhooks: z.array(OrganizationWebhook) })
|
|
162
|
-
|
|
195
|
+
export const ListOrganizationWebhooksResponse = /* @__PURE__ */ defineSchema(() =>
|
|
196
|
+
z.object({ webhooks: z.array(OrganizationWebhook) }).strict(),
|
|
197
|
+
);
|
|
163
198
|
export type ListOrganizationWebhooksResponse = z.infer<typeof ListOrganizationWebhooksResponse>;
|
|
164
199
|
|
|
165
|
-
export const WorkspaceWebhookDeliveryStatus =
|
|
200
|
+
export const WorkspaceWebhookDeliveryStatus = /* @__PURE__ */ defineSchema(() =>
|
|
201
|
+
z.enum(["pending", "delivered", "failed"]),
|
|
202
|
+
);
|
|
166
203
|
export type WorkspaceWebhookDeliveryStatus = z.infer<typeof WorkspaceWebhookDeliveryStatus>;
|
|
167
204
|
|
|
168
|
-
export const WorkspaceWebhookDelivery =
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
205
|
+
export const WorkspaceWebhookDelivery = /* @__PURE__ */ defineSchema(() =>
|
|
206
|
+
z
|
|
207
|
+
.object({
|
|
208
|
+
id: primitives.uuid,
|
|
209
|
+
webhookId: primitives.uuid,
|
|
210
|
+
eventId: primitives.uuid,
|
|
211
|
+
eventType: primitives.string,
|
|
212
|
+
status: WorkspaceWebhookDeliveryStatus,
|
|
213
|
+
attempts: z.number().int(),
|
|
214
|
+
lastStatus: z.number().int().nullable(),
|
|
215
|
+
lastError: primitives.nullableString,
|
|
216
|
+
nextAttemptAt: primitives.nullableString,
|
|
217
|
+
deliveredAt: primitives.nullableString,
|
|
218
|
+
failedAt: primitives.nullableString,
|
|
219
|
+
createdAt: primitives.string,
|
|
220
|
+
})
|
|
221
|
+
.strict(),
|
|
222
|
+
);
|
|
184
223
|
export type WorkspaceWebhookDelivery = z.infer<typeof WorkspaceWebhookDelivery>;
|
|
185
224
|
|
|
186
|
-
export const ListWorkspaceWebhookDeliveriesResponse =
|
|
187
|
-
.object({ deliveries: z.array(WorkspaceWebhookDelivery) })
|
|
188
|
-
|
|
225
|
+
export const ListWorkspaceWebhookDeliveriesResponse = /* @__PURE__ */ defineSchema(() =>
|
|
226
|
+
z.object({ deliveries: z.array(WorkspaceWebhookDelivery) }).strict(),
|
|
227
|
+
);
|
|
189
228
|
export type ListWorkspaceWebhookDeliveriesResponse = z.infer<
|
|
190
229
|
typeof ListWorkspaceWebhookDeliveriesResponse
|
|
191
230
|
>;
|
|
@@ -198,155 +237,185 @@ export type ListOrganizationWebhookDeliveriesResponse = z.infer<
|
|
|
198
237
|
>;
|
|
199
238
|
|
|
200
239
|
/**
|
|
201
|
-
* The
|
|
202
|
-
*
|
|
240
|
+
* The body POSTed to a webhook endpoint. Lifecycle events identify what
|
|
241
|
+
* changed; notification events also include their bounded display content.
|
|
203
242
|
*/
|
|
204
|
-
export const SessionWorkspaceWebhookEvent =
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
243
|
+
export const SessionWorkspaceWebhookEvent = /* @__PURE__ */ defineSchema(() =>
|
|
244
|
+
z.object({
|
|
245
|
+
lane: z.enum(["organization", "workspace"]).default("workspace"),
|
|
246
|
+
id: primitives.uuid,
|
|
247
|
+
type: primitives.string,
|
|
248
|
+
workspaceId: primitives.uuid,
|
|
249
|
+
/** Present on new deliveries; optional for receivers of pre-upgrade deliveries. */
|
|
250
|
+
workspace: z
|
|
251
|
+
.object({
|
|
252
|
+
id: primitives.uuid,
|
|
253
|
+
externalSource: primitives.nullableString,
|
|
254
|
+
externalId: primitives.nullableString,
|
|
255
|
+
})
|
|
256
|
+
.optional(),
|
|
257
|
+
sessionId: primitives.uuid,
|
|
258
|
+
turnId: primitives.nullableUuid,
|
|
259
|
+
sequence: z.number().int(),
|
|
260
|
+
occurredAt: primitives.string,
|
|
261
|
+
initiatingHuman: InitiatingHuman.nullable().optional(),
|
|
262
|
+
data: z
|
|
263
|
+
.object({
|
|
264
|
+
status: z.string().optional(),
|
|
265
|
+
reason: z.string().optional(),
|
|
266
|
+
/** Notification fields are optional for pre-upgrade thin deliveries. */
|
|
267
|
+
key: z.string().optional(),
|
|
268
|
+
title: z.string().optional(),
|
|
269
|
+
subtitle: z.string().optional(),
|
|
270
|
+
body: z.string().optional(),
|
|
271
|
+
facts: z.array(z.lazy(() => NotificationFact)).optional(),
|
|
272
|
+
link: z.lazy(() => NotificationLink).optional(),
|
|
273
|
+
urgency: z.lazy(() => NotificationUrgency).optional(),
|
|
274
|
+
replaced: primitives.optionalBoolean,
|
|
275
|
+
recipientSubjectId: z.string().optional(),
|
|
276
|
+
sender: z.object({ subjectId: primitives.string, label: primitives.string }).optional(),
|
|
277
|
+
/** Present when Opengeni notified no one, so the receiver may deliver it. */
|
|
278
|
+
undeliveredReason: z.lazy(() => NotificationUndeliveredReason).optional(),
|
|
279
|
+
})
|
|
280
|
+
.passthrough(),
|
|
281
|
+
}),
|
|
282
|
+
);
|
|
224
283
|
export type SessionWorkspaceWebhookEvent = z.infer<typeof SessionWorkspaceWebhookEvent>;
|
|
225
284
|
/** Workspace allowance events have no synthetic session or turn identity.
|
|
226
285
|
* Optional null context fields let transport adapters share an envelope. */
|
|
227
|
-
export const WorkspaceUsageWebhookEvent =
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
286
|
+
export const WorkspaceUsageWebhookEvent = /* @__PURE__ */ defineSchema(() =>
|
|
287
|
+
z.object({
|
|
288
|
+
lane: z.literal("workspace").default("workspace"),
|
|
289
|
+
id: primitives.uuid,
|
|
290
|
+
type: z.enum(["usage.threshold_reached", "usage.exhausted", "usage.period_reset"]),
|
|
291
|
+
workspaceId: primitives.uuid,
|
|
292
|
+
workspace: z
|
|
293
|
+
.object({
|
|
294
|
+
id: primitives.uuid,
|
|
295
|
+
externalSource: primitives.nullableString,
|
|
296
|
+
externalId: primitives.nullableString,
|
|
297
|
+
})
|
|
298
|
+
.optional(),
|
|
299
|
+
sessionId: z.null().optional(),
|
|
300
|
+
turnId: z.null().optional(),
|
|
301
|
+
sequence: z.number().int().nonnegative().optional(),
|
|
302
|
+
occurredAt: primitives.string,
|
|
303
|
+
data: z
|
|
304
|
+
.object({
|
|
305
|
+
scope: z.enum(["workspace", "member"]).optional(),
|
|
306
|
+
subjectId: z.string().nullable().optional(),
|
|
307
|
+
threshold: z.number().finite().optional(),
|
|
308
|
+
fraction: z.number().finite().nullable().optional(),
|
|
309
|
+
resetsAt: z.string().nullable().optional(),
|
|
310
|
+
status: UsageAllowanceStatus.optional(),
|
|
311
|
+
period: z.union([UsageAllowanceWindow, UsageAllowancePeriod, z.literal("*")]).optional(),
|
|
312
|
+
})
|
|
313
|
+
.passthrough(),
|
|
314
|
+
}),
|
|
315
|
+
);
|
|
255
316
|
export type WorkspaceUsageWebhookEvent = z.infer<typeof WorkspaceUsageWebhookEvent>;
|
|
256
317
|
/**
|
|
257
318
|
* "Send test event": proves the endpoint is reachable and verifies the
|
|
258
319
|
* signature. It names the workspace but no session, turn or sequence.
|
|
259
320
|
*/
|
|
260
|
-
export const WorkspaceTestWebhookEvent =
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
})
|
|
321
|
+
export const WorkspaceTestWebhookEvent = /* @__PURE__ */ defineSchema(() =>
|
|
322
|
+
z.object({
|
|
323
|
+
lane: z.enum(["organization", "workspace"]).default("workspace"),
|
|
324
|
+
id: primitives.uuid,
|
|
325
|
+
type: z.literal(OPENGENI_WEBHOOK_TEST_EVENT_TYPE),
|
|
326
|
+
workspaceId: primitives.uuid,
|
|
327
|
+
workspace: z
|
|
328
|
+
.object({
|
|
329
|
+
id: primitives.uuid,
|
|
330
|
+
externalSource: primitives.nullableString,
|
|
331
|
+
externalId: primitives.nullableString,
|
|
332
|
+
})
|
|
333
|
+
.optional(),
|
|
334
|
+
sessionId: z.null().optional(),
|
|
335
|
+
turnId: z.null().optional(),
|
|
336
|
+
occurredAt: primitives.string,
|
|
337
|
+
data: z.object({ webhookId: primitives.optionalUuid }).passthrough(),
|
|
338
|
+
}),
|
|
339
|
+
);
|
|
277
340
|
export type WorkspaceTestWebhookEvent = z.infer<typeof WorkspaceTestWebhookEvent>;
|
|
278
|
-
export const WorkspaceWebhookEvent =
|
|
279
|
-
SessionWorkspaceWebhookEvent,
|
|
280
|
-
|
|
281
|
-
WorkspaceTestWebhookEvent,
|
|
282
|
-
]);
|
|
341
|
+
export const WorkspaceWebhookEvent = /* @__PURE__ */ defineSchema(() =>
|
|
342
|
+
z.union([SessionWorkspaceWebhookEvent, WorkspaceUsageWebhookEvent, WorkspaceTestWebhookEvent]),
|
|
343
|
+
);
|
|
283
344
|
export type WorkspaceWebhookEvent = z.infer<typeof WorkspaceWebhookEvent>;
|
|
284
345
|
|
|
285
|
-
export const WorkspaceCredentialProvider =
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
346
|
+
export const WorkspaceCredentialProvider = /* @__PURE__ */ defineSchema(() =>
|
|
347
|
+
z
|
|
348
|
+
.object({
|
|
349
|
+
workspaceId: primitives.uuid,
|
|
350
|
+
url: primitives.string,
|
|
351
|
+
enabled: primitives.boolean,
|
|
352
|
+
timeoutMs: z.number().int(),
|
|
353
|
+
createdAt: primitives.string,
|
|
354
|
+
updatedAt: primitives.string,
|
|
355
|
+
})
|
|
356
|
+
.strict(),
|
|
357
|
+
);
|
|
295
358
|
export type WorkspaceCredentialProvider = z.infer<typeof WorkspaceCredentialProvider>;
|
|
296
359
|
|
|
297
|
-
export const PutWorkspaceCredentialProviderRequest =
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
360
|
+
export const PutWorkspaceCredentialProviderRequest = /* @__PURE__ */ defineSchema(() =>
|
|
361
|
+
z
|
|
362
|
+
.object({
|
|
363
|
+
url: HttpUrl,
|
|
364
|
+
enabled: primitives.optionalBoolean,
|
|
365
|
+
timeoutMs: z.number().int().min(1000).max(30000).optional(),
|
|
366
|
+
})
|
|
367
|
+
.strict(),
|
|
368
|
+
);
|
|
304
369
|
export type PutWorkspaceCredentialProviderRequest = z.input<
|
|
305
370
|
typeof PutWorkspaceCredentialProviderRequest
|
|
306
371
|
>;
|
|
307
372
|
|
|
308
373
|
/** `secret` is present only when the provider was first created. */
|
|
309
|
-
export const PutWorkspaceCredentialProviderResponse =
|
|
310
|
-
.object({ provider: WorkspaceCredentialProvider, secret: z.string().optional() })
|
|
311
|
-
|
|
374
|
+
export const PutWorkspaceCredentialProviderResponse = /* @__PURE__ */ defineSchema(() =>
|
|
375
|
+
z.object({ provider: WorkspaceCredentialProvider, secret: z.string().optional() }).strict(),
|
|
376
|
+
);
|
|
312
377
|
export type PutWorkspaceCredentialProviderResponse = z.infer<
|
|
313
378
|
typeof PutWorkspaceCredentialProviderResponse
|
|
314
379
|
>;
|
|
315
380
|
|
|
316
|
-
export const GetWorkspaceCredentialProviderResponse =
|
|
317
|
-
.object({ provider: WorkspaceCredentialProvider.nullable() })
|
|
318
|
-
|
|
381
|
+
export const GetWorkspaceCredentialProviderResponse = /* @__PURE__ */ defineSchema(() =>
|
|
382
|
+
z.object({ provider: WorkspaceCredentialProvider.nullable() }).strict(),
|
|
383
|
+
);
|
|
319
384
|
export type GetWorkspaceCredentialProviderResponse = z.infer<
|
|
320
385
|
typeof GetWorkspaceCredentialProviderResponse
|
|
321
386
|
>;
|
|
322
387
|
|
|
323
|
-
export const OrganizationCredentialProvider =
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
388
|
+
export const OrganizationCredentialProvider = /* @__PURE__ */ defineSchema(() =>
|
|
389
|
+
WorkspaceCredentialProvider.omit({
|
|
390
|
+
workspaceId: true,
|
|
391
|
+
}).extend({
|
|
392
|
+
organizationId: primitives.uuid,
|
|
393
|
+
workspaceFilter: IntegrationWorkspaceFilter.nullable(),
|
|
394
|
+
}),
|
|
395
|
+
);
|
|
329
396
|
export type OrganizationCredentialProvider = z.infer<typeof OrganizationCredentialProvider>;
|
|
330
397
|
|
|
331
398
|
export const PutOrganizationCredentialProviderRequest =
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
399
|
+
/* @__PURE__ */ defineSchema(() =>
|
|
400
|
+
PutWorkspaceCredentialProviderRequest.extend({
|
|
401
|
+
/** Required; null explicitly covers all non-personal workspaces. PUT replaces configuration. */
|
|
402
|
+
workspaceFilter: IntegrationWorkspaceFilter.nullable(),
|
|
403
|
+
}),
|
|
404
|
+
);
|
|
336
405
|
export type PutOrganizationCredentialProviderRequest = z.input<
|
|
337
406
|
typeof PutOrganizationCredentialProviderRequest
|
|
338
407
|
>;
|
|
339
408
|
|
|
340
|
-
export const PutOrganizationCredentialProviderResponse =
|
|
341
|
-
.object({ provider: OrganizationCredentialProvider, secret: z.string().optional() })
|
|
342
|
-
|
|
409
|
+
export const PutOrganizationCredentialProviderResponse = /* @__PURE__ */ defineSchema(() =>
|
|
410
|
+
z.object({ provider: OrganizationCredentialProvider, secret: z.string().optional() }).strict(),
|
|
411
|
+
);
|
|
343
412
|
export type PutOrganizationCredentialProviderResponse = z.infer<
|
|
344
413
|
typeof PutOrganizationCredentialProviderResponse
|
|
345
414
|
>;
|
|
346
415
|
|
|
347
|
-
export const GetOrganizationCredentialProviderResponse =
|
|
348
|
-
.object({ provider: OrganizationCredentialProvider.nullable() })
|
|
349
|
-
|
|
416
|
+
export const GetOrganizationCredentialProviderResponse = /* @__PURE__ */ defineSchema(() =>
|
|
417
|
+
z.object({ provider: OrganizationCredentialProvider.nullable() }).strict(),
|
|
418
|
+
);
|
|
350
419
|
export type GetOrganizationCredentialProviderResponse = z.infer<
|
|
351
420
|
typeof GetOrganizationCredentialProviderResponse
|
|
352
421
|
>;
|
|
@@ -361,7 +430,7 @@ export type CredentialProviderInitiatorContext = {
|
|
|
361
430
|
context: TurnInitiatorContext;
|
|
362
431
|
};
|
|
363
432
|
|
|
364
|
-
/** The body
|
|
433
|
+
/** The body Opengeni POSTs to a workspace credential provider. */
|
|
365
434
|
export type CredentialProviderRequest = {
|
|
366
435
|
type: "credentials.request";
|
|
367
436
|
lane: "organization" | "workspace";
|
|
@@ -370,7 +439,7 @@ export type CredentialProviderRequest = {
|
|
|
370
439
|
/**
|
|
371
440
|
* `test` comes from an administrator's "Test connection": it is not a run,
|
|
372
441
|
* so `sessionId`, `rootSessionId`, `turnId` and `attemptId` are the nil
|
|
373
|
-
* UUID. Answer it as you would a run in this workspace (
|
|
442
|
+
* UUID. Answer it as you would a run in this workspace (Opengeni shows only
|
|
374
443
|
* the names of what you return, never the values), or `not_applicable`.
|
|
375
444
|
*/
|
|
376
445
|
purpose: "provision" | "renewal" | "test";
|
|
@@ -392,31 +461,34 @@ export type CredentialProviderRequest = {
|
|
|
392
461
|
sandboxOs: string;
|
|
393
462
|
};
|
|
394
463
|
|
|
395
|
-
const ProviderAuthNeeded =
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
464
|
+
const ProviderAuthNeeded = /* @__PURE__ */ defineSchema(() =>
|
|
465
|
+
z.object({
|
|
466
|
+
reason: z.enum(["missing_connection", "expired", "insufficient_scope", "refresh_failed"]),
|
|
467
|
+
providerDomain: z.string().optional(),
|
|
468
|
+
connectionId: z.string().optional(),
|
|
469
|
+
scopes: z.array(primitives.string).optional(),
|
|
470
|
+
resource: z.string().optional(),
|
|
471
|
+
authorizationUrl: z.string().optional(),
|
|
472
|
+
message: z.string().optional(),
|
|
473
|
+
}),
|
|
474
|
+
);
|
|
404
475
|
|
|
405
476
|
/**
|
|
406
477
|
* HTTPS Git credentials the host wants available to `git` in the sandbox.
|
|
407
|
-
*
|
|
478
|
+
* Opengeni stores them in a renewable file and points a credential helper at
|
|
408
479
|
* it, so a refreshed token applies to the next git command.
|
|
409
480
|
*/
|
|
410
|
-
const ProviderGitCredential =
|
|
411
|
-
|
|
412
|
-
.string
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
})
|
|
481
|
+
const ProviderGitCredential = /* @__PURE__ */ defineSchema(() =>
|
|
482
|
+
z.object({
|
|
483
|
+
host: primitives.string
|
|
484
|
+
.trim()
|
|
485
|
+
.min(1)
|
|
486
|
+
.max(253)
|
|
487
|
+
.regex(/^[A-Za-z0-9.-]+(:\d{1,5})?$/, "host must be a bare hostname"),
|
|
488
|
+
username: z.string().min(1).max(256).optional(),
|
|
489
|
+
password: z.string().min(1).max(16384),
|
|
490
|
+
}),
|
|
491
|
+
);
|
|
420
492
|
|
|
421
493
|
const FORBIDDEN_MCP_HEADERS = new Set([
|
|
422
494
|
"host",
|
|
@@ -444,104 +516,112 @@ export function normalizeCredentialProviderMcpUrl(value: string): string {
|
|
|
444
516
|
return url.href;
|
|
445
517
|
}
|
|
446
518
|
|
|
447
|
-
const ProviderMcpUrl =
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
519
|
+
const ProviderMcpUrl = /* @__PURE__ */ defineSchema(() =>
|
|
520
|
+
z
|
|
521
|
+
.string()
|
|
522
|
+
.min(8)
|
|
523
|
+
.max(2048)
|
|
524
|
+
.refine((value) => {
|
|
525
|
+
try {
|
|
526
|
+
normalizeCredentialProviderMcpUrl(value);
|
|
527
|
+
return true;
|
|
528
|
+
} catch {
|
|
529
|
+
return false;
|
|
530
|
+
}
|
|
531
|
+
}, "MCP credential url must be an HTTP endpoint without credentials or fragment")
|
|
532
|
+
.transform(normalizeCredentialProviderMcpUrl),
|
|
533
|
+
);
|
|
460
534
|
|
|
461
535
|
/** Secret, turn-local headers for one session-attached remote MCP, by normalized URL only. */
|
|
462
|
-
export const CredentialProviderMcpHeaders =
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
536
|
+
export const CredentialProviderMcpHeaders = /* @__PURE__ */ defineSchema(() =>
|
|
537
|
+
z
|
|
538
|
+
.object({
|
|
539
|
+
url: ProviderMcpUrl,
|
|
540
|
+
headers: secretValue(z.record(primitives.string, primitives.string)),
|
|
541
|
+
expiresAt: z.iso.datetime({ offset: true }).optional(),
|
|
542
|
+
})
|
|
543
|
+
.strict()
|
|
544
|
+
.superRefine((entry, context) => {
|
|
545
|
+
const headers = Object.entries(entry.headers);
|
|
546
|
+
const seen = new Set<string>();
|
|
547
|
+
let bytes = 0;
|
|
548
|
+
if (headers.length === 0 || headers.length > 32) {
|
|
549
|
+
context.addIssue({ code: "custom", message: "MCP headers must contain 1–32 entries" });
|
|
550
|
+
}
|
|
551
|
+
for (const [name, value] of headers) {
|
|
552
|
+
const lower = name.toLowerCase();
|
|
553
|
+
if (
|
|
554
|
+
name.length > 128 ||
|
|
555
|
+
name.length === 0 ||
|
|
556
|
+
/[^!#$%&'*+.^_`|~0-9A-Za-z-]/.test(name) ||
|
|
557
|
+
FORBIDDEN_MCP_HEADERS.has(lower) ||
|
|
558
|
+
seen.has(lower)
|
|
559
|
+
) {
|
|
560
|
+
context.addIssue({ code: "custom", message: "Invalid or duplicate MCP header name" });
|
|
561
|
+
}
|
|
562
|
+
seen.add(lower);
|
|
563
|
+
const valueBytes = new TextEncoder().encode(value).byteLength;
|
|
564
|
+
bytes += name.length + valueBytes;
|
|
565
|
+
if (valueBytes > 16384 || /[^\t\u0020-\u007e\u0080-\u00ff]/.test(value)) {
|
|
566
|
+
context.addIssue({ code: "custom", message: "Invalid or oversized MCP header value" });
|
|
567
|
+
}
|
|
486
568
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
bytes += name.length + valueBytes;
|
|
490
|
-
if (valueBytes > 16384 || /[^\t\u0020-\u007e\u0080-\u00ff]/.test(value)) {
|
|
491
|
-
context.addIssue({ code: "custom", message: "Invalid or oversized MCP header value" });
|
|
569
|
+
if (bytes > 65536) {
|
|
570
|
+
context.addIssue({ code: "custom", message: "MCP header material exceeds 64 KiB" });
|
|
492
571
|
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
context.addIssue({ code: "custom", message: "MCP header material exceeds 64 KiB" });
|
|
496
|
-
}
|
|
497
|
-
});
|
|
572
|
+
}),
|
|
573
|
+
);
|
|
498
574
|
export type CredentialProviderMcpHeaders = z.infer<typeof CredentialProviderMcpHeaders>;
|
|
499
575
|
|
|
500
|
-
export const CredentialProviderMcpMaterial =
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
576
|
+
export const CredentialProviderMcpMaterial = /* @__PURE__ */ defineSchema(() =>
|
|
577
|
+
z
|
|
578
|
+
.array(CredentialProviderMcpHeaders)
|
|
579
|
+
.max(32)
|
|
580
|
+
.superRefine((entries, context) => {
|
|
581
|
+
if (new Set(entries.map((entry) => entry.url)).size !== entries.length) {
|
|
582
|
+
context.addIssue({ code: "custom", message: "Duplicate MCP server target" });
|
|
583
|
+
}
|
|
584
|
+
}),
|
|
585
|
+
);
|
|
508
586
|
export type CredentialProviderMcpMaterial = z.infer<typeof CredentialProviderMcpMaterial>;
|
|
509
587
|
|
|
510
|
-
/** What a credential provider returns. Scope echoes are added by
|
|
511
|
-
export const CredentialProviderResponse =
|
|
512
|
-
z.
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
588
|
+
/** What a credential provider returns. Scope echoes are added by Opengeni. */
|
|
589
|
+
export const CredentialProviderResponse = /* @__PURE__ */ defineSchema(() =>
|
|
590
|
+
z.discriminatedUnion("status", [
|
|
591
|
+
z.object({
|
|
592
|
+
status: z.literal("ok"),
|
|
593
|
+
environment: z.record(primitives.string, primitives.string).optional(),
|
|
594
|
+
files: z
|
|
595
|
+
.array(
|
|
596
|
+
z.object({
|
|
597
|
+
path: primitives.string,
|
|
598
|
+
content: primitives.string,
|
|
599
|
+
mode: z.enum(["0400", "0600"]).optional(),
|
|
600
|
+
}),
|
|
601
|
+
)
|
|
602
|
+
.optional(),
|
|
603
|
+
fileEnvironment: z.record(primitives.string, primitives.string).optional(),
|
|
604
|
+
git: z.array(ProviderGitCredential).max(16).optional(),
|
|
605
|
+
mcp: CredentialProviderMcpMaterial.optional(),
|
|
606
|
+
expiresAt: z.string().nullable().optional(),
|
|
607
|
+
authNeeded: z.array(ProviderAuthNeeded).optional(),
|
|
608
|
+
}),
|
|
609
|
+
z.object({ status: z.literal("not_applicable") }),
|
|
610
|
+
z.object({ status: z.literal("auth_needed"), authNeeded: z.array(ProviderAuthNeeded).min(1) }),
|
|
611
|
+
]),
|
|
612
|
+
);
|
|
533
613
|
export type CredentialProviderResponse = z.infer<typeof CredentialProviderResponse>;
|
|
534
614
|
|
|
535
615
|
/** Immediate signing-secret rotation; the new secret is returned once. */
|
|
536
|
-
export const RotateWorkspaceCredentialProviderSecretResponse =
|
|
537
|
-
.object({ provider: WorkspaceCredentialProvider, secret:
|
|
538
|
-
|
|
616
|
+
export const RotateWorkspaceCredentialProviderSecretResponse = /* @__PURE__ */ defineSchema(() =>
|
|
617
|
+
z.object({ provider: WorkspaceCredentialProvider, secret: primitives.string }).strict(),
|
|
618
|
+
);
|
|
539
619
|
export type RotateWorkspaceCredentialProviderSecretResponse = z.infer<
|
|
540
620
|
typeof RotateWorkspaceCredentialProviderSecretResponse
|
|
541
621
|
>;
|
|
542
|
-
export const RotateOrganizationCredentialProviderSecretResponse =
|
|
543
|
-
.object({ provider: OrganizationCredentialProvider, secret:
|
|
544
|
-
|
|
622
|
+
export const RotateOrganizationCredentialProviderSecretResponse = /* @__PURE__ */ defineSchema(() =>
|
|
623
|
+
z.object({ provider: OrganizationCredentialProvider, secret: primitives.string }).strict(),
|
|
624
|
+
);
|
|
545
625
|
export type RotateOrganizationCredentialProviderSecretResponse = z.infer<
|
|
546
626
|
typeof RotateOrganizationCredentialProviderSecretResponse
|
|
547
627
|
>;
|
|
@@ -559,54 +639,58 @@ export type RotateOrganizationWebhookSecretResponse = z.infer<
|
|
|
559
639
|
* endpoint. Nothing is stored: the request is sent once, synchronously.
|
|
560
640
|
* Credential values never appear; `credentials` names what a run would get.
|
|
561
641
|
*/
|
|
562
|
-
export const IntegrationEndpointTestResult =
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
z.
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
642
|
+
export const IntegrationEndpointTestResult = /* @__PURE__ */ defineSchema(() =>
|
|
643
|
+
z
|
|
644
|
+
.object({
|
|
645
|
+
/** A 2xx answer (for a provider, also a valid response body). */
|
|
646
|
+
ok: primitives.boolean,
|
|
647
|
+
/** The HTTP status, or null when the endpoint was not reached. */
|
|
648
|
+
status: z.number().int().nullable(),
|
|
649
|
+
durationMs: primitives.nonnegativeInteger,
|
|
650
|
+
/** What went wrong, in one sentence, or null. */
|
|
651
|
+
error: primitives.nullableString,
|
|
652
|
+
/** The exact JSON body Opengeni signed and sent. */
|
|
653
|
+
request: primitives.string,
|
|
654
|
+
/** The start of the endpoint's answer. Omitted for a successful provider answer. */
|
|
655
|
+
responseBody: primitives.nullableString,
|
|
656
|
+
credentials: z
|
|
657
|
+
.object({
|
|
658
|
+
status: z.enum(["ok", "not_applicable", "auth_needed"]),
|
|
659
|
+
environment: z.array(primitives.string),
|
|
660
|
+
files: z.array(primitives.string),
|
|
661
|
+
git: z.array(primitives.string),
|
|
662
|
+
mcp: z.array(primitives.string),
|
|
663
|
+
expiresAt: primitives.nullableString,
|
|
664
|
+
authNeeded: z.array(
|
|
665
|
+
z.object({
|
|
666
|
+
reason: primitives.string,
|
|
667
|
+
providerDomain: primitives.nullableString,
|
|
668
|
+
message: primitives.nullableString,
|
|
669
|
+
}),
|
|
670
|
+
),
|
|
671
|
+
})
|
|
672
|
+
.strict()
|
|
673
|
+
.nullable(),
|
|
674
|
+
})
|
|
675
|
+
.strict(),
|
|
676
|
+
);
|
|
595
677
|
export type IntegrationEndpointTestResult = z.infer<typeof IntegrationEndpointTestResult>;
|
|
596
678
|
|
|
597
|
-
export const TestWorkspaceWebhookResponse =
|
|
598
|
-
.object({ result: IntegrationEndpointTestResult })
|
|
599
|
-
|
|
679
|
+
export const TestWorkspaceWebhookResponse = /* @__PURE__ */ defineSchema(() =>
|
|
680
|
+
z.object({ result: IntegrationEndpointTestResult }).strict(),
|
|
681
|
+
);
|
|
600
682
|
export type TestWorkspaceWebhookResponse = z.infer<typeof TestWorkspaceWebhookResponse>;
|
|
601
683
|
|
|
602
684
|
/** Tests the provider runs in this workspace would use: its own, else the organization's. */
|
|
603
|
-
export const TestWorkspaceCredentialProviderResponse =
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
685
|
+
export const TestWorkspaceCredentialProviderResponse = /* @__PURE__ */ defineSchema(() =>
|
|
686
|
+
z
|
|
687
|
+
.object({
|
|
688
|
+
lane: z.enum(["workspace", "organization"]),
|
|
689
|
+
url: primitives.string,
|
|
690
|
+
result: IntegrationEndpointTestResult,
|
|
691
|
+
})
|
|
692
|
+
.strict(),
|
|
693
|
+
);
|
|
610
694
|
export type TestWorkspaceCredentialProviderResponse = z.infer<
|
|
611
695
|
typeof TestWorkspaceCredentialProviderResponse
|
|
612
696
|
>;
|
|
@@ -617,24 +701,30 @@ export type TestWorkspaceCredentialProviderResponse = z.infer<
|
|
|
617
701
|
* (even when this workspace overrides it) and the enabled organization
|
|
618
702
|
* webhooks that also receive this workspace's events. Never secrets.
|
|
619
703
|
*/
|
|
620
|
-
export const WorkspaceInheritedIntegrationsResponse =
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
.strict()
|
|
625
|
-
.nullable(),
|
|
626
|
-
webhooks: z.array(
|
|
627
|
-
z
|
|
704
|
+
export const WorkspaceInheritedIntegrationsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
705
|
+
z
|
|
706
|
+
.object({
|
|
707
|
+
credentialProvider: z
|
|
628
708
|
.object({
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
description: z.string().nullable(),
|
|
709
|
+
url: primitives.string,
|
|
710
|
+
timeoutMs: z.number().int(),
|
|
711
|
+
updatedAt: primitives.string,
|
|
633
712
|
})
|
|
634
|
-
.strict()
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
713
|
+
.strict()
|
|
714
|
+
.nullable(),
|
|
715
|
+
webhooks: z.array(
|
|
716
|
+
z
|
|
717
|
+
.object({
|
|
718
|
+
id: primitives.uuid,
|
|
719
|
+
url: primitives.string,
|
|
720
|
+
eventTypes: z.array(WorkspaceWebhookEventType),
|
|
721
|
+
description: primitives.nullableString,
|
|
722
|
+
})
|
|
723
|
+
.strict(),
|
|
724
|
+
),
|
|
725
|
+
})
|
|
726
|
+
.strict(),
|
|
727
|
+
);
|
|
638
728
|
export type WorkspaceInheritedIntegrationsResponse = z.infer<
|
|
639
729
|
typeof WorkspaceInheritedIntegrationsResponse
|
|
640
730
|
>;
|