@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
|
@@ -0,0 +1,1153 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
3
|
+
import * as primitives from "./primitives";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Recordings: captured conversations (meetings, interviews, site walks) with
|
|
7
|
+
* one or more audio tracks, versioned transcripts and editable speakers.
|
|
8
|
+
* Visibility matches chats: "private" is Only me, "workspace" is shared.
|
|
9
|
+
*/
|
|
10
|
+
export const RECORDING_MAX_TRACKS = 8;
|
|
11
|
+
export const RECORDING_MAX_CHUNK_BYTES = 64 * 1024 * 1024;
|
|
12
|
+
export const RECORDING_MAX_DURATION_MILLISECONDS = 10 * 60 * 60 * 1_000;
|
|
13
|
+
export const RECORDING_UPLOAD_BATCH_MAX = 50;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The audio containers a track can be captured in: WebM or Ogg Opus and MP4
|
|
17
|
+
* AAC from browsers, and an ADTS AAC stream from phones, whose frames
|
|
18
|
+
* concatenate across chunks the way WebM clusters do.
|
|
19
|
+
*/
|
|
20
|
+
export type RecordingAudioContainer = "webm" | "mp4" | "ogg" | "aac";
|
|
21
|
+
|
|
22
|
+
/** The container a track's MIME type names, or null when recordings cannot use it. */
|
|
23
|
+
export function recordingAudioContainer(mimeType: string): RecordingAudioContainer | null {
|
|
24
|
+
const base = mimeType.split(";")[0]!.trim().toLowerCase();
|
|
25
|
+
if (base === "audio/webm" || base === "video/webm") return "webm";
|
|
26
|
+
if (base === "audio/mp4" || base === "video/mp4" || base === "audio/x-m4a") return "mp4";
|
|
27
|
+
if (base === "audio/ogg" || base === "application/ogg") return "ogg";
|
|
28
|
+
if (base === "audio/aac" || base === "audio/aacp" || base === "audio/x-aac") return "aac";
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const RecordingVisibility = /* @__PURE__ */ defineSchema(() =>
|
|
33
|
+
z.enum(["private", "workspace"]),
|
|
34
|
+
);
|
|
35
|
+
export type RecordingVisibility = z.infer<typeof RecordingVisibility>;
|
|
36
|
+
|
|
37
|
+
export const RecordingState = /* @__PURE__ */ defineSchema(() =>
|
|
38
|
+
z.enum(["capturing", "processing", "ready", "failed"]),
|
|
39
|
+
);
|
|
40
|
+
export type RecordingState = z.infer<typeof RecordingState>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* What a recorder can capture into a track. microphone: the person
|
|
44
|
+
* recording; system: the computer's audio (the other side).
|
|
45
|
+
*/
|
|
46
|
+
export const RecordingCaptureSource = /* @__PURE__ */ defineSchema(() =>
|
|
47
|
+
z.enum(["microphone", "system", "mixed", "upload"]),
|
|
48
|
+
);
|
|
49
|
+
export type RecordingCaptureSource = z.infer<typeof RecordingCaptureSource>;
|
|
50
|
+
|
|
51
|
+
/** Where a track came from: a recorder's capture, or a browser tab an agent recorded. */
|
|
52
|
+
export const RecordingTrackSource = /* @__PURE__ */ defineSchema(() =>
|
|
53
|
+
z.enum(["microphone", "system", "mixed", "upload", "browser_tab"]),
|
|
54
|
+
);
|
|
55
|
+
export type RecordingTrackSource = z.infer<typeof RecordingTrackSource>;
|
|
56
|
+
|
|
57
|
+
export const RecordingTrackKind = /* @__PURE__ */ defineSchema(() => z.enum(["audio", "video"]));
|
|
58
|
+
export type RecordingTrackKind = z.infer<typeof RecordingTrackKind>;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* meeting: a recorded conversation, listed in Meetings. browser: an agent's
|
|
62
|
+
* browser recording, a video of the tab with a log of what the agent did.
|
|
63
|
+
* dictation: speech someone records to type it, such as into the chat box;
|
|
64
|
+
* always private, never listed, and deleted a day after it is transcribed.
|
|
65
|
+
*/
|
|
66
|
+
export const RecordingPurpose = /* @__PURE__ */ defineSchema(() =>
|
|
67
|
+
z.enum(["meeting", "browser", "dictation"]),
|
|
68
|
+
);
|
|
69
|
+
export type RecordingPurpose = z.infer<typeof RecordingPurpose>;
|
|
70
|
+
|
|
71
|
+
/** What a client may record: browser recordings are made by the server. */
|
|
72
|
+
export const RecordingCapturePurpose = /* @__PURE__ */ defineSchema(() =>
|
|
73
|
+
z.enum(["meeting", "dictation"]),
|
|
74
|
+
);
|
|
75
|
+
export type RecordingCapturePurpose = z.infer<typeof RecordingCapturePurpose>;
|
|
76
|
+
|
|
77
|
+
/** How long a dictation is kept after it is transcribed, for the client to take its text. */
|
|
78
|
+
export const DICTATION_RETENTION_MILLISECONDS = 24 * 60 * 60 * 1_000;
|
|
79
|
+
|
|
80
|
+
export const RecordingTranscriptVersionState = /* @__PURE__ */ defineSchema(() =>
|
|
81
|
+
z.enum(["queued", "processing", "complete", "failed"]),
|
|
82
|
+
);
|
|
83
|
+
export type RecordingTranscriptVersionState = z.infer<typeof RecordingTranscriptVersionState>;
|
|
84
|
+
|
|
85
|
+
export const RecordingSpeakerSource = /* @__PURE__ */ defineSchema(() =>
|
|
86
|
+
z.enum(["confirmed", "suggested", "carried_over", "track"]),
|
|
87
|
+
);
|
|
88
|
+
export type RecordingSpeakerSource = z.infer<typeof RecordingSpeakerSource>;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Who told the speakers apart in a version: the transcription provider, our
|
|
92
|
+
* own diarizer, the tracks alone (microphone versus system audio), or nobody.
|
|
93
|
+
*/
|
|
94
|
+
export const RecordingDiarization = /* @__PURE__ */ defineSchema(() =>
|
|
95
|
+
z.enum(["provider", "ours", "tracks", "none"]),
|
|
96
|
+
);
|
|
97
|
+
export type RecordingDiarization = z.infer<typeof RecordingDiarization>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Who tells speakers apart: `auto` uses the model's own diarization when it
|
|
101
|
+
* has one and Opengeni's otherwise; `ours` always uses Opengeni's, for the
|
|
102
|
+
* same speakers whatever the model.
|
|
103
|
+
*/
|
|
104
|
+
export const RecordingDiarizer = /* @__PURE__ */ defineSchema(() => z.enum(["auto", "ours"]));
|
|
105
|
+
export type RecordingDiarizer = z.infer<typeof RecordingDiarizer>;
|
|
106
|
+
|
|
107
|
+
const sha256Hex = z.string().regex(/^[0-9a-f]{64}$/u);
|
|
108
|
+
const externalRef = z.string().trim().min(1).max(512);
|
|
109
|
+
const jsonValue: z.ZodType<unknown> = z.lazy(() =>
|
|
110
|
+
z.union([
|
|
111
|
+
z.string().max(4096),
|
|
112
|
+
z.number(),
|
|
113
|
+
z.boolean(),
|
|
114
|
+
z.null(),
|
|
115
|
+
z.array(jsonValue).max(100),
|
|
116
|
+
z.record(z.string().max(128), jsonValue),
|
|
117
|
+
]),
|
|
118
|
+
);
|
|
119
|
+
/** Product-owned metadata; Opengeni stores and filters on it but never interprets it. */
|
|
120
|
+
const recordingMetadata = z
|
|
121
|
+
.record(z.string().min(1).max(128), jsonValue)
|
|
122
|
+
.refine((value) => JSON.stringify(value).length <= 16_384, "metadata is too large");
|
|
123
|
+
|
|
124
|
+
/** How to transcribe; every field is optional and falls back to workspace defaults. */
|
|
125
|
+
export const RecordingTranscriptionOptions = /* @__PURE__ */ defineSchema(() =>
|
|
126
|
+
z
|
|
127
|
+
.object({
|
|
128
|
+
providerId: z.string().trim().min(1).max(128).optional(),
|
|
129
|
+
model: z.string().trim().min(1).max(128).optional(),
|
|
130
|
+
/** ISO 639-1 or 639-3 hint; omitted means detect. */
|
|
131
|
+
language: z
|
|
132
|
+
.string()
|
|
133
|
+
.regex(/^[a-z]{2,3}$/u)
|
|
134
|
+
.optional(),
|
|
135
|
+
/** Upper bound on distinct speakers when the model diarizes. */
|
|
136
|
+
maxSpeakers: z.number().int().min(1).max(32).optional(),
|
|
137
|
+
/** Names and terms the model should recognize. */
|
|
138
|
+
keyterms: z.array(z.string().trim().min(1).max(50)).max(100).optional(),
|
|
139
|
+
/** Who tells speakers apart; defaults to the workspace's choice, else `auto`. */
|
|
140
|
+
diarizer: RecordingDiarizer.optional(),
|
|
141
|
+
})
|
|
142
|
+
.strict(),
|
|
143
|
+
);
|
|
144
|
+
export type RecordingTranscriptionOptions = z.infer<typeof RecordingTranscriptionOptions>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* How to transcribe, as asked for. A new recording that names no language
|
|
148
|
+
* takes the workspace's meeting language; `null` detects it even then.
|
|
149
|
+
*/
|
|
150
|
+
export const RecordingTranscriptionRequest = /* @__PURE__ */ defineSchema(() =>
|
|
151
|
+
RecordingTranscriptionOptions.extend({
|
|
152
|
+
language: z
|
|
153
|
+
.string()
|
|
154
|
+
.regex(/^[a-z]{2,3}$/u)
|
|
155
|
+
.nullable()
|
|
156
|
+
.optional(),
|
|
157
|
+
}).strict(),
|
|
158
|
+
);
|
|
159
|
+
export type RecordingTranscriptionRequest = z.infer<typeof RecordingTranscriptionRequest>;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* How long a workspace keeps meetings, in days after they were recorded.
|
|
163
|
+
* Audio can go sooner than the transcript, never later.
|
|
164
|
+
*/
|
|
165
|
+
export const RecordingRetention = /* @__PURE__ */ defineSchema(() =>
|
|
166
|
+
z
|
|
167
|
+
.object({
|
|
168
|
+
audioDays: z.number().int().min(0).max(36_500).optional(),
|
|
169
|
+
transcriptDays: z.number().int().min(1).max(36_500).optional(),
|
|
170
|
+
})
|
|
171
|
+
.strict()
|
|
172
|
+
.refine(
|
|
173
|
+
(value) =>
|
|
174
|
+
value.audioDays === undefined ||
|
|
175
|
+
value.transcriptDays === undefined ||
|
|
176
|
+
value.audioDays <= value.transcriptDays,
|
|
177
|
+
"audioDays can't be longer than transcriptDays",
|
|
178
|
+
),
|
|
179
|
+
);
|
|
180
|
+
export type RecordingRetention = z.infer<typeof RecordingRetention>;
|
|
181
|
+
|
|
182
|
+
const DAY_MILLISECONDS = 86_400_000;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* When retention deletes a meeting's audio and the meeting itself, counted
|
|
186
|
+
* from when it was recorded. Null where nothing is set. The sweep runs every
|
|
187
|
+
* few minutes, so deletion follows shortly after.
|
|
188
|
+
*/
|
|
189
|
+
export function recordingRetentionDates(
|
|
190
|
+
retention: RecordingRetention | undefined,
|
|
191
|
+
recordedAt: Date,
|
|
192
|
+
): { audio: Date | null; meeting: Date | null } {
|
|
193
|
+
const at = (days: number | undefined) =>
|
|
194
|
+
days === undefined ? null : new Date(recordedAt.getTime() + days * DAY_MILLISECONDS);
|
|
195
|
+
return { audio: at(retention?.audioDays), meeting: at(retention?.transcriptDays) };
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* A workspace's recording defaults. New recordings are Only me unless the
|
|
200
|
+
* workspace says otherwise; products may always set visibility explicitly.
|
|
201
|
+
*/
|
|
202
|
+
export const WorkspaceRecordingSettings = /* @__PURE__ */ defineSchema(() =>
|
|
203
|
+
z
|
|
204
|
+
.object({
|
|
205
|
+
defaultVisibility: RecordingVisibility.optional(),
|
|
206
|
+
/** Provider and model new transcripts use when a request names none. */
|
|
207
|
+
transcription: z
|
|
208
|
+
.object({
|
|
209
|
+
providerId: z.string().trim().min(1).max(128),
|
|
210
|
+
model: z.string().trim().min(1).max(128),
|
|
211
|
+
})
|
|
212
|
+
.strict()
|
|
213
|
+
.optional(),
|
|
214
|
+
/** Who tells speakers apart in new transcripts. */
|
|
215
|
+
diarizer: RecordingDiarizer.optional(),
|
|
216
|
+
/**
|
|
217
|
+
* The language new meetings are in, as an ISO 639-1 or 639-3 code,
|
|
218
|
+
* when a recording names none. Unset detects it. A live transcript
|
|
219
|
+
* hears only a few seconds at a time, so detecting can drift between
|
|
220
|
+
* languages there; naming one keeps it steady.
|
|
221
|
+
*/
|
|
222
|
+
language: z
|
|
223
|
+
.string()
|
|
224
|
+
.regex(/^[a-z]{2,3}$/u)
|
|
225
|
+
.optional(),
|
|
226
|
+
/**
|
|
227
|
+
* Recognize people by voice. Off by default. While on, Opengeni keeps
|
|
228
|
+
* each diarized speaker's voice vector with the transcript and
|
|
229
|
+
* suggests who a speaker is from the voices of people who agreed to be
|
|
230
|
+
* remembered. Turning it off forgets every remembered voice.
|
|
231
|
+
*/
|
|
232
|
+
voiceprints: z.boolean().optional(),
|
|
233
|
+
/**
|
|
234
|
+
* Show a live transcript while recording, by default. Off by default.
|
|
235
|
+
* While on, the recorder also streams each track to a live speech
|
|
236
|
+
* model as it is captured, which the provider bills for the audio
|
|
237
|
+
* streamed. The live text is a preview: the final transcript replaces
|
|
238
|
+
* it when the recording is done.
|
|
239
|
+
*/
|
|
240
|
+
liveTranscript: z.boolean().optional(),
|
|
241
|
+
/**
|
|
242
|
+
* Write a summary into each meeting's notes once its transcript is
|
|
243
|
+
* ready. On when unset; `false` turns it off. An agent session writes
|
|
244
|
+
* it, like any chat, and never replaces notes someone already saved.
|
|
245
|
+
*/
|
|
246
|
+
autoSummary: z.boolean().optional(),
|
|
247
|
+
/**
|
|
248
|
+
* How long meetings are kept, in days after they were recorded. Unset
|
|
249
|
+
* keeps them until someone deletes them. When `audioDays` passes, the
|
|
250
|
+
* audio is deleted and the transcript stays (0 deletes it as soon as
|
|
251
|
+
* the transcript is done); when `transcriptDays` passes, the whole
|
|
252
|
+
* meeting is deleted.
|
|
253
|
+
*/
|
|
254
|
+
retention: RecordingRetention.optional(),
|
|
255
|
+
})
|
|
256
|
+
.strict(),
|
|
257
|
+
);
|
|
258
|
+
export type WorkspaceRecordingSettings = z.infer<typeof WorkspaceRecordingSettings>;
|
|
259
|
+
|
|
260
|
+
/** Read a workspace's recording defaults leniently; a bad value means none. */
|
|
261
|
+
export function resolveWorkspaceRecordingSettings(settings: unknown): WorkspaceRecordingSettings {
|
|
262
|
+
const value =
|
|
263
|
+
settings !== null && typeof settings === "object"
|
|
264
|
+
? (settings as { recordings?: unknown }).recordings
|
|
265
|
+
: undefined;
|
|
266
|
+
return WorkspaceRecordingSettings.safeParse(value ?? {}).data ?? {};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export const CreateRecordingRequest = /* @__PURE__ */ defineSchema(() =>
|
|
270
|
+
z
|
|
271
|
+
.object({
|
|
272
|
+
/** Client-generated id; creating the same id again returns the existing recording. */
|
|
273
|
+
recordingId: z.string().uuid(),
|
|
274
|
+
/**
|
|
275
|
+
* meeting (the default) or dictation. A dictation is private and has one
|
|
276
|
+
* microphone track; it is transcribed with the workspace's voice input
|
|
277
|
+
* model, as text without speakers. Its `transcription` can name only the
|
|
278
|
+
* `language` spoken; without one the language is detected.
|
|
279
|
+
*/
|
|
280
|
+
purpose: RecordingCapturePurpose.optional(),
|
|
281
|
+
title: z.string().trim().min(1).max(300).optional(),
|
|
282
|
+
visibility: RecordingVisibility.optional(),
|
|
283
|
+
startedAt: z.string().datetime({ offset: true }).optional(),
|
|
284
|
+
externalRef: externalRef.optional(),
|
|
285
|
+
metadata: recordingMetadata.optional(),
|
|
286
|
+
tracks: z
|
|
287
|
+
.array(
|
|
288
|
+
z
|
|
289
|
+
.object({
|
|
290
|
+
trackNumber: z
|
|
291
|
+
.number()
|
|
292
|
+
.int()
|
|
293
|
+
.min(0)
|
|
294
|
+
.max(RECORDING_MAX_TRACKS - 1),
|
|
295
|
+
source: RecordingCaptureSource,
|
|
296
|
+
mimeType: z
|
|
297
|
+
.string()
|
|
298
|
+
.trim()
|
|
299
|
+
.min(1)
|
|
300
|
+
.max(128)
|
|
301
|
+
.refine(
|
|
302
|
+
(mimeType) => recordingAudioContainer(mimeType) !== null,
|
|
303
|
+
"mimeType must be audio/webm, audio/ogg, audio/mp4 or audio/aac",
|
|
304
|
+
),
|
|
305
|
+
})
|
|
306
|
+
.strict(),
|
|
307
|
+
)
|
|
308
|
+
.min(1)
|
|
309
|
+
.max(RECORDING_MAX_TRACKS)
|
|
310
|
+
.refine(
|
|
311
|
+
(tracks) => new Set(tracks.map((track) => track.trackNumber)).size === tracks.length,
|
|
312
|
+
"track numbers must be unique",
|
|
313
|
+
),
|
|
314
|
+
transcription: RecordingTranscriptionRequest.optional(),
|
|
315
|
+
/**
|
|
316
|
+
* The person recording's name, as your app knows it. With computer or
|
|
317
|
+
* tab audio beside the microphone, the microphone is theirs and is
|
|
318
|
+
* named with this in the transcript, unless Opengeni already has a name
|
|
319
|
+
* for them (their profile or membership label).
|
|
320
|
+
*/
|
|
321
|
+
ownerName: z.string().trim().min(1).max(200).optional(),
|
|
322
|
+
})
|
|
323
|
+
.strict(),
|
|
324
|
+
);
|
|
325
|
+
export type CreateRecordingRequest = z.infer<typeof CreateRecordingRequest>;
|
|
326
|
+
|
|
327
|
+
export const RecordingChunkDescriptor = /* @__PURE__ */ defineSchema(() =>
|
|
328
|
+
z
|
|
329
|
+
.object({
|
|
330
|
+
chunkNumber: z.number().int().min(0).max(100_000),
|
|
331
|
+
byteLength: z.number().int().positive().max(RECORDING_MAX_CHUNK_BYTES),
|
|
332
|
+
sha256: sha256Hex,
|
|
333
|
+
startMilliseconds: z.number().int().min(0).max(RECORDING_MAX_DURATION_MILLISECONDS),
|
|
334
|
+
durationMilliseconds: z.number().int().min(0).max(RECORDING_MAX_DURATION_MILLISECONDS),
|
|
335
|
+
})
|
|
336
|
+
.strict(),
|
|
337
|
+
);
|
|
338
|
+
export type RecordingChunkDescriptor = z.infer<typeof RecordingChunkDescriptor>;
|
|
339
|
+
|
|
340
|
+
/** Reserve chunks and get presigned URLs to PUT their bytes straight to storage. */
|
|
341
|
+
export const CreateRecordingUploadsRequest = /* @__PURE__ */ defineSchema(() =>
|
|
342
|
+
z
|
|
343
|
+
.object({
|
|
344
|
+
trackNumber: z
|
|
345
|
+
.number()
|
|
346
|
+
.int()
|
|
347
|
+
.min(0)
|
|
348
|
+
.max(RECORDING_MAX_TRACKS - 1),
|
|
349
|
+
chunks: z.array(RecordingChunkDescriptor).min(1).max(RECORDING_UPLOAD_BATCH_MAX),
|
|
350
|
+
})
|
|
351
|
+
.strict(),
|
|
352
|
+
);
|
|
353
|
+
export type CreateRecordingUploadsRequest = z.infer<typeof CreateRecordingUploadsRequest>;
|
|
354
|
+
|
|
355
|
+
export const RecordingChunkUpload = /* @__PURE__ */ defineSchema(() =>
|
|
356
|
+
z.object({
|
|
357
|
+
chunkNumber: z.number().int(),
|
|
358
|
+
/** Already stored; skip the PUT. */
|
|
359
|
+
uploaded: z.boolean(),
|
|
360
|
+
/** Presigned URL to PUT the chunk's bytes to; null when already stored. */
|
|
361
|
+
url: z.string().nullable(),
|
|
362
|
+
method: z.literal("PUT"),
|
|
363
|
+
/** Headers the PUT must carry exactly. */
|
|
364
|
+
headers: z.record(z.string(), z.string()),
|
|
365
|
+
expiresAt: z.string().nullable(),
|
|
366
|
+
}),
|
|
367
|
+
);
|
|
368
|
+
export type RecordingChunkUpload = z.infer<typeof RecordingChunkUpload>;
|
|
369
|
+
|
|
370
|
+
export const CreateRecordingUploadsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
371
|
+
z.object({ uploads: z.array(RecordingChunkUpload) }),
|
|
372
|
+
);
|
|
373
|
+
export type CreateRecordingUploadsResponse = z.infer<typeof CreateRecordingUploadsResponse>;
|
|
374
|
+
|
|
375
|
+
/** Confirm chunks whose bytes were PUT; the server checks each object first. */
|
|
376
|
+
export const CompleteRecordingChunksRequest = /* @__PURE__ */ defineSchema(() =>
|
|
377
|
+
z
|
|
378
|
+
.object({
|
|
379
|
+
trackNumber: z
|
|
380
|
+
.number()
|
|
381
|
+
.int()
|
|
382
|
+
.min(0)
|
|
383
|
+
.max(RECORDING_MAX_TRACKS - 1),
|
|
384
|
+
chunkNumbers: z
|
|
385
|
+
.array(z.number().int().min(0).max(100_000))
|
|
386
|
+
.min(1)
|
|
387
|
+
.max(RECORDING_UPLOAD_BATCH_MAX),
|
|
388
|
+
})
|
|
389
|
+
.strict(),
|
|
390
|
+
);
|
|
391
|
+
export type CompleteRecordingChunksRequest = z.infer<typeof CompleteRecordingChunksRequest>;
|
|
392
|
+
|
|
393
|
+
export const CompleteRecordingChunksResponse = /* @__PURE__ */ defineSchema(() =>
|
|
394
|
+
z.object({
|
|
395
|
+
/** Chunks now confirmed as stored. */
|
|
396
|
+
uploaded: z.array(z.number().int()),
|
|
397
|
+
/** Chunks whose bytes are not (fully) in storage yet; upload them again. */
|
|
398
|
+
missing: z.array(z.number().int()),
|
|
399
|
+
}),
|
|
400
|
+
);
|
|
401
|
+
export type CompleteRecordingChunksResponse = z.infer<typeof CompleteRecordingChunksResponse>;
|
|
402
|
+
|
|
403
|
+
/** Capture is over: every listed chunk must be uploaded. Starts transcription. */
|
|
404
|
+
export const FinalizeRecordingRequest = /* @__PURE__ */ defineSchema(() =>
|
|
405
|
+
z
|
|
406
|
+
.object({
|
|
407
|
+
endedAt: z.string().datetime({ offset: true }).optional(),
|
|
408
|
+
tracks: z
|
|
409
|
+
.array(
|
|
410
|
+
z
|
|
411
|
+
.object({
|
|
412
|
+
trackNumber: z
|
|
413
|
+
.number()
|
|
414
|
+
.int()
|
|
415
|
+
.min(0)
|
|
416
|
+
.max(RECORDING_MAX_TRACKS - 1),
|
|
417
|
+
chunkCount: z.number().int().min(0).max(100_001),
|
|
418
|
+
})
|
|
419
|
+
.strict(),
|
|
420
|
+
)
|
|
421
|
+
.min(1)
|
|
422
|
+
.max(RECORDING_MAX_TRACKS),
|
|
423
|
+
})
|
|
424
|
+
.strict(),
|
|
425
|
+
);
|
|
426
|
+
export type FinalizeRecordingRequest = z.infer<typeof FinalizeRecordingRequest>;
|
|
427
|
+
|
|
428
|
+
export const UpdateRecordingRequest = /* @__PURE__ */ defineSchema(() =>
|
|
429
|
+
z
|
|
430
|
+
.object({
|
|
431
|
+
title: z.string().trim().min(1).max(300).optional(),
|
|
432
|
+
visibility: RecordingVisibility.optional(),
|
|
433
|
+
externalRef: externalRef.nullable().optional(),
|
|
434
|
+
metadata: recordingMetadata.optional(),
|
|
435
|
+
})
|
|
436
|
+
.strict(),
|
|
437
|
+
);
|
|
438
|
+
export type UpdateRecordingRequest = z.infer<typeof UpdateRecordingRequest>;
|
|
439
|
+
|
|
440
|
+
/** Start a new transcript version over the recording's audio. */
|
|
441
|
+
export const CreateRecordingTranscriptRequest = /* @__PURE__ */ defineSchema(() =>
|
|
442
|
+
z
|
|
443
|
+
.object({
|
|
444
|
+
transcription: RecordingTranscriptionRequest.optional(),
|
|
445
|
+
})
|
|
446
|
+
.strict(),
|
|
447
|
+
);
|
|
448
|
+
export type CreateRecordingTranscriptRequest = z.infer<typeof CreateRecordingTranscriptRequest>;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Name speakers in one version. An assignment names a label (a person from
|
|
452
|
+
* the directory, or a plain name); a segment override moves one segment to
|
|
453
|
+
* another label. Assigning two labels to one person merges them.
|
|
454
|
+
*/
|
|
455
|
+
export const UpdateRecordingSpeakersRequest = /* @__PURE__ */ defineSchema(() =>
|
|
456
|
+
z
|
|
457
|
+
.object({
|
|
458
|
+
assignments: z
|
|
459
|
+
.array(
|
|
460
|
+
z
|
|
461
|
+
.object({
|
|
462
|
+
label: z.string().min(1).max(128),
|
|
463
|
+
personId: z.string().uuid().nullable().optional(),
|
|
464
|
+
name: z.string().trim().min(1).max(200).nullable().optional(),
|
|
465
|
+
})
|
|
466
|
+
.strict(),
|
|
467
|
+
)
|
|
468
|
+
.max(64)
|
|
469
|
+
.optional(),
|
|
470
|
+
segmentOverrides: z
|
|
471
|
+
.array(
|
|
472
|
+
z
|
|
473
|
+
.object({
|
|
474
|
+
segmentIndex: z.number().int().min(0),
|
|
475
|
+
label: z.string().min(1).max(128),
|
|
476
|
+
})
|
|
477
|
+
.strict(),
|
|
478
|
+
)
|
|
479
|
+
.max(500)
|
|
480
|
+
.optional(),
|
|
481
|
+
/**
|
|
482
|
+
* Turn down a voice suggestion: the label loses its suggested name, and
|
|
483
|
+
* that person is not suggested for this voice in this recording again.
|
|
484
|
+
*/
|
|
485
|
+
rejectSuggestions: z
|
|
486
|
+
.array(z.object({ label: z.string().min(1).max(128) }).strict())
|
|
487
|
+
.max(64)
|
|
488
|
+
.optional(),
|
|
489
|
+
})
|
|
490
|
+
.strict(),
|
|
491
|
+
);
|
|
492
|
+
export type UpdateRecordingSpeakersRequest = z.infer<typeof UpdateRecordingSpeakersRequest>;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Agree to have a person's voice remembered. `self` is a member agreeing
|
|
496
|
+
* for themselves; `attested` is someone confirming that a person outside
|
|
497
|
+
* the workspace agreed. Members can only agree for themselves.
|
|
498
|
+
*/
|
|
499
|
+
export const RecordingVoiceprintConsent = /* @__PURE__ */ defineSchema(() =>
|
|
500
|
+
z.enum(["self", "attested"]),
|
|
501
|
+
);
|
|
502
|
+
export type RecordingVoiceprintConsent = z.infer<typeof RecordingVoiceprintConsent>;
|
|
503
|
+
|
|
504
|
+
export const RememberRecordingPersonVoiceRequest = /* @__PURE__ */ defineSchema(() =>
|
|
505
|
+
z.object({ consent: RecordingVoiceprintConsent }).strict(),
|
|
506
|
+
);
|
|
507
|
+
export type RememberRecordingPersonVoiceRequest = z.infer<
|
|
508
|
+
typeof RememberRecordingPersonVoiceRequest
|
|
509
|
+
>;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Correct the text of segments in one version. The version itself never
|
|
513
|
+
* changes; edits are a layer on top. `text: null` reverts to the original.
|
|
514
|
+
*/
|
|
515
|
+
export const UpdateRecordingSegmentsRequest = /* @__PURE__ */ defineSchema(() =>
|
|
516
|
+
z
|
|
517
|
+
.object({
|
|
518
|
+
edits: z
|
|
519
|
+
.array(
|
|
520
|
+
z
|
|
521
|
+
.object({
|
|
522
|
+
segmentIndex: z.number().int().min(0),
|
|
523
|
+
text: z.string().max(65_536).nullable(),
|
|
524
|
+
})
|
|
525
|
+
.strict(),
|
|
526
|
+
)
|
|
527
|
+
.min(1)
|
|
528
|
+
.max(500),
|
|
529
|
+
})
|
|
530
|
+
.strict(),
|
|
531
|
+
);
|
|
532
|
+
export type UpdateRecordingSegmentsRequest = z.infer<typeof UpdateRecordingSegmentsRequest>;
|
|
533
|
+
|
|
534
|
+
export const CreateRecordingPersonRequest = /* @__PURE__ */ defineSchema(() =>
|
|
535
|
+
z
|
|
536
|
+
.object({
|
|
537
|
+
/** Client-generated id; creating the same id again returns the existing person. */
|
|
538
|
+
personId: z.string().uuid().optional(),
|
|
539
|
+
displayName: z.string().trim().min(1).max(200),
|
|
540
|
+
email: z.string().trim().email().max(320).optional(),
|
|
541
|
+
memberSubjectId: z.string().min(1).max(1024).optional(),
|
|
542
|
+
externalRef: externalRef.optional(),
|
|
543
|
+
})
|
|
544
|
+
.strict(),
|
|
545
|
+
);
|
|
546
|
+
export type CreateRecordingPersonRequest = z.infer<typeof CreateRecordingPersonRequest>;
|
|
547
|
+
|
|
548
|
+
export const RecordingTrack = /* @__PURE__ */ defineSchema(() =>
|
|
549
|
+
z.object({
|
|
550
|
+
trackNumber: z.number().int(),
|
|
551
|
+
kind: RecordingTrackKind,
|
|
552
|
+
source: RecordingTrackSource,
|
|
553
|
+
mimeType: z.string(),
|
|
554
|
+
chunkCount: z.number().int(),
|
|
555
|
+
totalBytes: z.number().int(),
|
|
556
|
+
durationMilliseconds: z.number().int(),
|
|
557
|
+
/** The worker has prepared one seekable file for this track. */
|
|
558
|
+
playable: z.boolean(),
|
|
559
|
+
/** A video track's picture, once its video is prepared; null otherwise. */
|
|
560
|
+
video: z
|
|
561
|
+
.object({
|
|
562
|
+
width: z.number().int(),
|
|
563
|
+
height: z.number().int(),
|
|
564
|
+
frameCount: z.number().int(),
|
|
565
|
+
})
|
|
566
|
+
.nullable(),
|
|
567
|
+
/** The live transcript streamed for this track, or null when none was. */
|
|
568
|
+
live: z
|
|
569
|
+
.object({
|
|
570
|
+
providerId: z.string(),
|
|
571
|
+
model: z.string(),
|
|
572
|
+
/** Audio streamed to the live model so far. */
|
|
573
|
+
streamedMilliseconds: z.number().int(),
|
|
574
|
+
/** Estimated provider cost at list price, in US dollars. */
|
|
575
|
+
costUsd: z.number().nullable(),
|
|
576
|
+
})
|
|
577
|
+
.nullable(),
|
|
578
|
+
}),
|
|
579
|
+
);
|
|
580
|
+
export type RecordingTrack = z.infer<typeof RecordingTrack>;
|
|
581
|
+
|
|
582
|
+
export const RecordingTranscriptVersion = /* @__PURE__ */ defineSchema(() =>
|
|
583
|
+
z.object({
|
|
584
|
+
id: z.string(),
|
|
585
|
+
recordingId: z.string(),
|
|
586
|
+
versionNumber: z.number().int(),
|
|
587
|
+
providerId: z.string(),
|
|
588
|
+
model: z.string(),
|
|
589
|
+
options: RecordingTranscriptionOptions,
|
|
590
|
+
state: RecordingTranscriptVersionState,
|
|
591
|
+
isCurrent: z.boolean(),
|
|
592
|
+
languages: z.array(z.string()),
|
|
593
|
+
diarized: z.boolean(),
|
|
594
|
+
diarization: RecordingDiarization.nullable(),
|
|
595
|
+
audioMilliseconds: z.number().int(),
|
|
596
|
+
segmentCount: z.number().int(),
|
|
597
|
+
/** Estimated provider cost at list price, in US dollars. */
|
|
598
|
+
costUsd: z.number().nullable(),
|
|
599
|
+
requestedBySubjectId: z.string(),
|
|
600
|
+
errorCode: z.string().nullable(),
|
|
601
|
+
createdAt: z.string(),
|
|
602
|
+
completedAt: z.string().nullable(),
|
|
603
|
+
}),
|
|
604
|
+
);
|
|
605
|
+
export type RecordingTranscriptVersion = z.infer<typeof RecordingTranscriptVersion>;
|
|
606
|
+
|
|
607
|
+
export const Recording = /* @__PURE__ */ defineSchema(() =>
|
|
608
|
+
z.object({
|
|
609
|
+
id: z.string(),
|
|
610
|
+
workspaceId: z.string(),
|
|
611
|
+
ownerSubjectId: z.string(),
|
|
612
|
+
visibility: RecordingVisibility,
|
|
613
|
+
title: z.string(),
|
|
614
|
+
purpose: RecordingPurpose,
|
|
615
|
+
state: RecordingState,
|
|
616
|
+
/** Why a browser recording's video could not be made, when it failed. */
|
|
617
|
+
errorCode: z.string().nullable(),
|
|
618
|
+
startedAt: z.string(),
|
|
619
|
+
captureEndedAt: z.string().nullable(),
|
|
620
|
+
durationMilliseconds: z.number().int(),
|
|
621
|
+
externalRef: z.string().nullable(),
|
|
622
|
+
metadata: z.record(z.string(), z.unknown()),
|
|
623
|
+
/** When the workspace's retention deleted the audio; the transcript stays. */
|
|
624
|
+
audioDeletedAt: z.string().nullable(),
|
|
625
|
+
transcription: RecordingTranscriptionOptions,
|
|
626
|
+
tracks: z.array(RecordingTrack),
|
|
627
|
+
/** The current transcript version, or the newest one while none is complete. */
|
|
628
|
+
transcript: RecordingTranscriptVersion.nullable(),
|
|
629
|
+
createdAt: z.string(),
|
|
630
|
+
updatedAt: z.string(),
|
|
631
|
+
/**
|
|
632
|
+
* Set when the person's own Only me meeting is listed or opened in another
|
|
633
|
+
* workspace of its organization than the one that stores it (`workspaceId`).
|
|
634
|
+
*/
|
|
635
|
+
sourceWorkspace: z.object({ id: z.string(), name: z.string() }).nullable().optional(),
|
|
636
|
+
}),
|
|
637
|
+
);
|
|
638
|
+
export type Recording = z.infer<typeof Recording>;
|
|
639
|
+
|
|
640
|
+
export const ListRecordingsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
641
|
+
z.object({
|
|
642
|
+
recordings: z.array(Recording),
|
|
643
|
+
/** Pass as `beforeStartedAt` and `beforeId` for the next page; null at the end. */
|
|
644
|
+
nextBefore: z.object({ startedAt: z.string(), id: z.string() }).nullable(),
|
|
645
|
+
}),
|
|
646
|
+
);
|
|
647
|
+
export type ListRecordingsResponse = z.infer<typeof ListRecordingsResponse>;
|
|
648
|
+
|
|
649
|
+
export const FinalizeRecordingResponse = /* @__PURE__ */ defineSchema(() =>
|
|
650
|
+
z.object({ recording: Recording, transcript: RecordingTranscriptVersion }),
|
|
651
|
+
);
|
|
652
|
+
export type FinalizeRecordingResponse = z.infer<typeof FinalizeRecordingResponse>;
|
|
653
|
+
|
|
654
|
+
export const ListRecordingTranscriptVersionsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
655
|
+
z.object({ versions: z.array(RecordingTranscriptVersion) }),
|
|
656
|
+
);
|
|
657
|
+
export type ListRecordingTranscriptVersionsResponse = z.infer<
|
|
658
|
+
typeof ListRecordingTranscriptVersionsResponse
|
|
659
|
+
>;
|
|
660
|
+
|
|
661
|
+
export const RecordingPerson = /* @__PURE__ */ defineSchema(() =>
|
|
662
|
+
z.object({
|
|
663
|
+
id: z.string(),
|
|
664
|
+
displayName: z.string(),
|
|
665
|
+
memberSubjectId: z.string().nullable(),
|
|
666
|
+
email: z.string().nullable(),
|
|
667
|
+
externalRef: z.string().nullable(),
|
|
668
|
+
createdAt: z.string(),
|
|
669
|
+
/**
|
|
670
|
+
* Whether this person's voice is remembered. `consent` is present once
|
|
671
|
+
* they agreed; `learned` is false until a confirmed speaker taught it
|
|
672
|
+
* their voice. The voice vectors themselves are never returned.
|
|
673
|
+
*/
|
|
674
|
+
voice: z
|
|
675
|
+
.object({
|
|
676
|
+
consent: RecordingVoiceprintConsent,
|
|
677
|
+
consentedAt: z.string(),
|
|
678
|
+
learned: z.boolean(),
|
|
679
|
+
updatedAt: z.string().nullable(),
|
|
680
|
+
})
|
|
681
|
+
.nullable(),
|
|
682
|
+
}),
|
|
683
|
+
);
|
|
684
|
+
export type RecordingPerson = z.infer<typeof RecordingPerson>;
|
|
685
|
+
|
|
686
|
+
export const ListRecordingPeopleResponse = /* @__PURE__ */ defineSchema(() =>
|
|
687
|
+
z.object({ people: z.array(RecordingPerson) }),
|
|
688
|
+
);
|
|
689
|
+
export type ListRecordingPeopleResponse = z.infer<typeof ListRecordingPeopleResponse>;
|
|
690
|
+
|
|
691
|
+
export const RecordingSpeaker = /* @__PURE__ */ defineSchema(() =>
|
|
692
|
+
z.object({
|
|
693
|
+
label: z.string(),
|
|
694
|
+
/**
|
|
695
|
+
* Resolved display name: the person's name or the plain name someone gave
|
|
696
|
+
* the label, else its default (see defaultRecordingSpeakerName).
|
|
697
|
+
*/
|
|
698
|
+
name: z.string(),
|
|
699
|
+
personId: z.string().nullable(),
|
|
700
|
+
/** How the label got its name; null when nobody named it and `name` is the default. */
|
|
701
|
+
source: RecordingSpeakerSource.nullable(),
|
|
702
|
+
confidence: z.number().nullable(),
|
|
703
|
+
}),
|
|
704
|
+
);
|
|
705
|
+
export type RecordingSpeaker = z.infer<typeof RecordingSpeaker>;
|
|
706
|
+
|
|
707
|
+
const DIARIZED_SPEAKER_LABEL = /^(?:t\d+_)?speaker_(\d+)$/u;
|
|
708
|
+
const TRACK_SPEAKER_LABEL = /^track-(\d+)$/u;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* True when a recording's microphone is the person recording it: computer
|
|
712
|
+
* or tab audio sits beside it, so everyone else is on that track. A
|
|
713
|
+
* microphone alone (a phone, a room) may hear several people.
|
|
714
|
+
*/
|
|
715
|
+
export function recordingMicrophoneIsOwner(
|
|
716
|
+
tracks: readonly { source: RecordingTrackSource }[],
|
|
717
|
+
): boolean {
|
|
718
|
+
return (
|
|
719
|
+
tracks.some((track) => track.source === "microphone") &&
|
|
720
|
+
tracks.some((track) => track.source === "system")
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/** What an unnamed speaker label stands for, for clients that word it in the reader's language. */
|
|
725
|
+
export type RecordingSpeakerDefault =
|
|
726
|
+
| { kind: "speaker"; number: number }
|
|
727
|
+
| { kind: "microphone" }
|
|
728
|
+
| { kind: "system" }
|
|
729
|
+
| { kind: "track"; number: number }
|
|
730
|
+
| { kind: "label"; label: string };
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* What a speaker label stands for until someone names it: the diarizer's
|
|
734
|
+
* `speaker_1` (or `t0_speaker_1`) is speaker 2, and a whole-track label such as
|
|
735
|
+
* `track-0` is that track's microphone, shared audio or plain track number.
|
|
736
|
+
*/
|
|
737
|
+
export function recordingSpeakerDefault(
|
|
738
|
+
label: string,
|
|
739
|
+
tracks: readonly { trackNumber: number; source: RecordingTrackSource }[],
|
|
740
|
+
): RecordingSpeakerDefault {
|
|
741
|
+
const diarized = DIARIZED_SPEAKER_LABEL.exec(label);
|
|
742
|
+
if (diarized) return { kind: "speaker", number: Number(diarized[1]) + 1 };
|
|
743
|
+
const track = TRACK_SPEAKER_LABEL.exec(label);
|
|
744
|
+
if (track) {
|
|
745
|
+
const trackNumber = Number(track[1]);
|
|
746
|
+
const source = tracks.find((candidate) => candidate.trackNumber === trackNumber)?.source;
|
|
747
|
+
if (source === "microphone") return { kind: "microphone" };
|
|
748
|
+
if (source === "system") return { kind: "system" };
|
|
749
|
+
return { kind: "track", number: trackNumber + 1 };
|
|
750
|
+
}
|
|
751
|
+
return { kind: "label", label };
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* The name a speaker label has until someone names it: "Speaker 2" for a
|
|
756
|
+
* diarizer's `speaker_1` (or `t0_speaker_1` when several tracks were
|
|
757
|
+
* diarized), and the track's role for a whole-track label such as `track-0`.
|
|
758
|
+
* Servers and clients both use this, so the same voice reads the same
|
|
759
|
+
* everywhere.
|
|
760
|
+
*/
|
|
761
|
+
export function defaultRecordingSpeakerName(
|
|
762
|
+
label: string,
|
|
763
|
+
tracks: readonly { trackNumber: number; source: RecordingTrackSource }[],
|
|
764
|
+
): string {
|
|
765
|
+
const named = recordingSpeakerDefault(label, tracks);
|
|
766
|
+
switch (named.kind) {
|
|
767
|
+
case "speaker":
|
|
768
|
+
return `Speaker ${named.number}`;
|
|
769
|
+
case "microphone":
|
|
770
|
+
return "Microphone";
|
|
771
|
+
case "system":
|
|
772
|
+
return "Shared audio";
|
|
773
|
+
case "track":
|
|
774
|
+
return `Track ${named.number}`;
|
|
775
|
+
case "label":
|
|
776
|
+
return named.label;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export const UpdateRecordingSpeakersResponse = /* @__PURE__ */ defineSchema(() =>
|
|
781
|
+
z.object({ speakers: z.array(RecordingSpeaker) }),
|
|
782
|
+
);
|
|
783
|
+
export type UpdateRecordingSpeakersResponse = z.infer<typeof UpdateRecordingSpeakersResponse>;
|
|
784
|
+
|
|
785
|
+
export const RecordingTranscriptSegment = /* @__PURE__ */ defineSchema(() =>
|
|
786
|
+
z.object({
|
|
787
|
+
index: z.number().int(),
|
|
788
|
+
startMilliseconds: z.number().int(),
|
|
789
|
+
endMilliseconds: z.number().int(),
|
|
790
|
+
trackNumber: z.number().int().nullable(),
|
|
791
|
+
/** Effective label after human edits; null when the model gave none. */
|
|
792
|
+
speakerLabel: z.string().nullable(),
|
|
793
|
+
/** Effective text after human edits. */
|
|
794
|
+
text: z.string(),
|
|
795
|
+
/** A person corrected this segment's text. */
|
|
796
|
+
edited: z.boolean(),
|
|
797
|
+
}),
|
|
798
|
+
);
|
|
799
|
+
export type RecordingTranscriptSegment = z.infer<typeof RecordingTranscriptSegment>;
|
|
800
|
+
|
|
801
|
+
export const UpdateRecordingSegmentsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
802
|
+
z.object({ segments: z.array(RecordingTranscriptSegment) }),
|
|
803
|
+
);
|
|
804
|
+
export type UpdateRecordingSegmentsResponse = z.infer<typeof UpdateRecordingSegmentsResponse>;
|
|
805
|
+
|
|
806
|
+
export const RecordingTranscriptPage = /* @__PURE__ */ defineSchema(() =>
|
|
807
|
+
z.object({
|
|
808
|
+
version: RecordingTranscriptVersion,
|
|
809
|
+
speakers: z.array(RecordingSpeaker),
|
|
810
|
+
segments: z.array(RecordingTranscriptSegment),
|
|
811
|
+
/** Pass as `after` to read the next page; null at the end. */
|
|
812
|
+
nextAfter: z.number().int().nullable(),
|
|
813
|
+
}),
|
|
814
|
+
);
|
|
815
|
+
export type RecordingTranscriptPage = z.infer<typeof RecordingTranscriptPage>;
|
|
816
|
+
|
|
817
|
+
/** A short-lived link to one track's prepared audio, for playback. */
|
|
818
|
+
export const RecordingTrackAudio = /* @__PURE__ */ defineSchema(() =>
|
|
819
|
+
z.object({
|
|
820
|
+
url: z.string(),
|
|
821
|
+
expiresAt: z.string(),
|
|
822
|
+
mimeType: z.string(),
|
|
823
|
+
bytes: z.number().int(),
|
|
824
|
+
}),
|
|
825
|
+
);
|
|
826
|
+
export type RecordingTrackAudio = z.infer<typeof RecordingTrackAudio>;
|
|
827
|
+
|
|
828
|
+
export const RecordingTranscriptionCapabilities = /* @__PURE__ */ defineSchema(() =>
|
|
829
|
+
z.object({
|
|
830
|
+
batch: z.boolean(),
|
|
831
|
+
live: z.boolean(),
|
|
832
|
+
diarization: z.boolean(),
|
|
833
|
+
liveDiarization: z.boolean(),
|
|
834
|
+
/** Transcribes several tracks in one call and keeps them apart. */
|
|
835
|
+
multichannel: z.boolean(),
|
|
836
|
+
maxSpeakers: z.number().int().nullable(),
|
|
837
|
+
wordTimestamps: z.boolean(),
|
|
838
|
+
/** ISO 639 codes the model supports; empty means it does not say. */
|
|
839
|
+
languages: z.array(z.string()),
|
|
840
|
+
languageDetection: z.boolean(),
|
|
841
|
+
keyterms: z.boolean(),
|
|
842
|
+
/** Provider-side matching against registered voices. */
|
|
843
|
+
speakerLibrary: z.boolean(),
|
|
844
|
+
maxDurationSeconds: z.number().nullable(),
|
|
845
|
+
maxFileBytes: z.number().nullable(),
|
|
846
|
+
}),
|
|
847
|
+
);
|
|
848
|
+
export type RecordingTranscriptionCapabilities = z.infer<typeof RecordingTranscriptionCapabilities>;
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Who pays for a speech-to-text model: the workspace's own provider key
|
|
852
|
+
* (`workspace_key`), a subscription the workspace signed in to, which
|
|
853
|
+
* Opengeni never charges (`workspace_subscription`), or an account the
|
|
854
|
+
* deployment holds, charged in Opengeni credits where credit billing is on
|
|
855
|
+
* (`deployment`).
|
|
856
|
+
*/
|
|
857
|
+
export const RecordingTranscriptionFunding = /* @__PURE__ */ defineSchema(() =>
|
|
858
|
+
z.enum(["workspace_key", "workspace_subscription", "deployment"]),
|
|
859
|
+
);
|
|
860
|
+
export type RecordingTranscriptionFunding = z.infer<typeof RecordingTranscriptionFunding>;
|
|
861
|
+
|
|
862
|
+
export const RecordingTranscriptionModel = /* @__PURE__ */ defineSchema(() =>
|
|
863
|
+
z.object({
|
|
864
|
+
providerId: z.string(),
|
|
865
|
+
providerName: z.string(),
|
|
866
|
+
model: z.string(),
|
|
867
|
+
name: z.string(),
|
|
868
|
+
/** The provider can serve this workspace now (its key, sign-in or account is set up). */
|
|
869
|
+
available: z.boolean(),
|
|
870
|
+
funding: RecordingTranscriptionFunding,
|
|
871
|
+
capabilities: RecordingTranscriptionCapabilities,
|
|
872
|
+
/**
|
|
873
|
+
* What an audio hour costs this workspace in USD: the list price on its
|
|
874
|
+
* own key, or the credits charged for a deployment's model. Null when it
|
|
875
|
+
* pays nothing per hour (a subscription, or a model the deployment covers)
|
|
876
|
+
* or the price is unknown.
|
|
877
|
+
*/
|
|
878
|
+
usdPerHour: z.number().nullable(),
|
|
879
|
+
/**
|
|
880
|
+
* Transcribing with it is charged in credits, so a payer without credits
|
|
881
|
+
* is refused. Absent from older servers, which tell it by `usdPerHour`.
|
|
882
|
+
*/
|
|
883
|
+
chargedInCredits: z.boolean().optional(),
|
|
884
|
+
}),
|
|
885
|
+
);
|
|
886
|
+
export type RecordingTranscriptionModel = z.infer<typeof RecordingTranscriptionModel>;
|
|
887
|
+
|
|
888
|
+
export const ListRecordingModelsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
889
|
+
z.object({
|
|
890
|
+
/** Every speech-to-text model the deployment offers, for any use. */
|
|
891
|
+
models: z.array(RecordingTranscriptionModel),
|
|
892
|
+
/** The model new meeting transcripts use when a request names none. */
|
|
893
|
+
default: z.object({ providerId: z.string(), model: z.string() }),
|
|
894
|
+
/**
|
|
895
|
+
* The model dictation tries first; null when none is set, which tries
|
|
896
|
+
* the deployment's providers in order.
|
|
897
|
+
*/
|
|
898
|
+
dictationDefault: z.object({ providerId: z.string(), model: z.string() }).nullable(),
|
|
899
|
+
/** The deployment uses one model for everything; workspaces cannot pick. */
|
|
900
|
+
pinned: z.boolean(),
|
|
901
|
+
/**
|
|
902
|
+
* The language this workspace's meetings are transcribed in unless a
|
|
903
|
+
* recording names another; null detects it. Absent from older servers.
|
|
904
|
+
*/
|
|
905
|
+
language: z.string().nullable().optional(),
|
|
906
|
+
/**
|
|
907
|
+
* Whether this workspace's recorders start with the live transcript on
|
|
908
|
+
* (its `recordings.liveTranscript` setting). Absent from older servers.
|
|
909
|
+
*/
|
|
910
|
+
liveTranscript: z.boolean().optional(),
|
|
911
|
+
}),
|
|
912
|
+
);
|
|
913
|
+
export type ListRecordingModelsResponse = z.infer<typeof ListRecordingModelsResponse>;
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* The wire protocols a live transcription session can speak. Clients connect
|
|
917
|
+
* to the provider directly with a short-lived grant from the API, so the
|
|
918
|
+
* workspace's provider key never leaves the server.
|
|
919
|
+
*
|
|
920
|
+
* `elevenlabs.scribe_realtime`: JSON over WebSocket. The client sends
|
|
921
|
+
* `{"message_type":"input_audio_chunk","audio_base_64":…,"commit":false,"sample_rate":…}`
|
|
922
|
+
* with little-endian 16-bit mono PCM; the provider answers with
|
|
923
|
+
* `partial_transcript` and `committed_transcript_with_timestamps` messages.
|
|
924
|
+
*
|
|
925
|
+
* `openai.realtime`: an OpenAI Realtime transcription session (OpenAI or
|
|
926
|
+
* Azure OpenAI), already configured. `token` is a short-lived client secret,
|
|
927
|
+
* sent as `Authorization: Bearer <token>`. A browser posts its WebRTC offer
|
|
928
|
+
* (`application/sdp`) to `webrtcUrl`, sends the track's audio as media and
|
|
929
|
+
* reads events on a data channel named `oai-events`. A client that can set
|
|
930
|
+
* headers on a WebSocket (React Native) opens `url` instead and sends
|
|
931
|
+
* `{"type":"input_audio_buffer.append","audio":…}` with base64 PCM at
|
|
932
|
+
* `audio.sampleRate`. Either way the provider answers with
|
|
933
|
+
* `input_audio_buffer.speech_started`/`speech_stopped` (with `audio_start_ms`
|
|
934
|
+
* and `audio_end_ms`) and
|
|
935
|
+
* `conversation.item.input_audio_transcription.delta`/`completed` events.
|
|
936
|
+
*/
|
|
937
|
+
export const RecordingLiveProtocol = /* @__PURE__ */ defineSchema(() =>
|
|
938
|
+
z.enum(["elevenlabs.scribe_realtime", "openai.realtime"]),
|
|
939
|
+
);
|
|
940
|
+
export type RecordingLiveProtocol = z.infer<typeof RecordingLiveProtocol>;
|
|
941
|
+
|
|
942
|
+
/** Ask for a live transcription session for one track of a recording being captured. */
|
|
943
|
+
export const CreateRecordingLiveSessionRequest = /* @__PURE__ */ defineSchema(() =>
|
|
944
|
+
z
|
|
945
|
+
.object({
|
|
946
|
+
trackNumber: z
|
|
947
|
+
.number()
|
|
948
|
+
.int()
|
|
949
|
+
.min(0)
|
|
950
|
+
.max(RECORDING_MAX_TRACKS - 1),
|
|
951
|
+
/** A live model; defaults to the deployment's live model. */
|
|
952
|
+
providerId: z.string().trim().min(1).max(128).optional(),
|
|
953
|
+
model: z.string().trim().min(1).max(128).optional(),
|
|
954
|
+
})
|
|
955
|
+
.strict(),
|
|
956
|
+
);
|
|
957
|
+
export type CreateRecordingLiveSessionRequest = z.infer<typeof CreateRecordingLiveSessionRequest>;
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* A grant to stream one track to a live model. Connect before `expiresAt`,
|
|
961
|
+
* and ask for a new session to reconnect. For `elevenlabs.scribe_realtime`,
|
|
962
|
+
* `url` carries the single-use credential and the audio format; for
|
|
963
|
+
* `openai.realtime`, the credential is `token` (see {@link RecordingLiveProtocol}).
|
|
964
|
+
*/
|
|
965
|
+
export const RecordingLiveSession = /* @__PURE__ */ defineSchema(() =>
|
|
966
|
+
z.object({
|
|
967
|
+
providerId: z.string(),
|
|
968
|
+
model: z.string(),
|
|
969
|
+
protocol: RecordingLiveProtocol,
|
|
970
|
+
url: z.string(),
|
|
971
|
+
/** A short-lived client secret, for protocols that take it in a header. */
|
|
972
|
+
token: z.string().optional(),
|
|
973
|
+
/** Where a browser posts its WebRTC offer, for protocols that offer WebRTC. */
|
|
974
|
+
webrtcUrl: z.string().optional(),
|
|
975
|
+
audio: z.object({ encoding: z.literal("pcm_s16le"), sampleRate: z.number().int() }),
|
|
976
|
+
expiresAt: z.string(),
|
|
977
|
+
}),
|
|
978
|
+
);
|
|
979
|
+
export type RecordingLiveSession = z.infer<typeof RecordingLiveSession>;
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* A finished stretch of live text on one track. Times are from the start of
|
|
983
|
+
* the recording. Live segments are a preview: they are removed once the
|
|
984
|
+
* recording's first transcript is ready.
|
|
985
|
+
*/
|
|
986
|
+
export const RecordingLiveSegment = /* @__PURE__ */ defineSchema(() =>
|
|
987
|
+
z.object({
|
|
988
|
+
trackNumber: z.number().int(),
|
|
989
|
+
/** The recorder's own counter for the track, starting at 0. */
|
|
990
|
+
segmentNumber: z.number().int(),
|
|
991
|
+
startMilliseconds: z.number().int(),
|
|
992
|
+
endMilliseconds: z.number().int(),
|
|
993
|
+
text: z.string(),
|
|
994
|
+
/** Order across tracks; pass the last one seen as `after`. */
|
|
995
|
+
sequence: z.number().int(),
|
|
996
|
+
}),
|
|
997
|
+
);
|
|
998
|
+
export type RecordingLiveSegment = z.infer<typeof RecordingLiveSegment>;
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Save finished live text for one track. Sending a segment number again
|
|
1002
|
+
* keeps the first copy, so a recorder can retry freely.
|
|
1003
|
+
*/
|
|
1004
|
+
export const AppendRecordingLiveSegmentsRequest = /* @__PURE__ */ defineSchema(() =>
|
|
1005
|
+
z
|
|
1006
|
+
.object({
|
|
1007
|
+
trackNumber: z
|
|
1008
|
+
.number()
|
|
1009
|
+
.int()
|
|
1010
|
+
.min(0)
|
|
1011
|
+
.max(RECORDING_MAX_TRACKS - 1),
|
|
1012
|
+
/** All audio streamed for this track so far, for the cost estimate. */
|
|
1013
|
+
streamedMilliseconds: z.number().int().min(0).max(RECORDING_MAX_DURATION_MILLISECONDS),
|
|
1014
|
+
segments: z
|
|
1015
|
+
.array(
|
|
1016
|
+
z
|
|
1017
|
+
.object({
|
|
1018
|
+
segmentNumber: z.number().int().min(0).max(1_000_000),
|
|
1019
|
+
startMilliseconds: z.number().int().min(0).max(RECORDING_MAX_DURATION_MILLISECONDS),
|
|
1020
|
+
endMilliseconds: z.number().int().min(0).max(RECORDING_MAX_DURATION_MILLISECONDS),
|
|
1021
|
+
text: z.string().max(16_384),
|
|
1022
|
+
})
|
|
1023
|
+
.strict()
|
|
1024
|
+
.refine((segment) => segment.endMilliseconds >= segment.startMilliseconds, {
|
|
1025
|
+
message: "endMilliseconds is before startMilliseconds",
|
|
1026
|
+
}),
|
|
1027
|
+
)
|
|
1028
|
+
.max(100),
|
|
1029
|
+
})
|
|
1030
|
+
.strict(),
|
|
1031
|
+
);
|
|
1032
|
+
export type AppendRecordingLiveSegmentsRequest = z.infer<typeof AppendRecordingLiveSegmentsRequest>;
|
|
1033
|
+
|
|
1034
|
+
export const ListRecordingLiveSegmentsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
1035
|
+
z.object({
|
|
1036
|
+
segments: z.array(RecordingLiveSegment),
|
|
1037
|
+
/** Pass as `after` for newer segments; the same value when there are none yet. */
|
|
1038
|
+
after: z.number().int(),
|
|
1039
|
+
/** A transcript is ready, so the live preview is over and its segments are gone. */
|
|
1040
|
+
ended: z.boolean(),
|
|
1041
|
+
}),
|
|
1042
|
+
);
|
|
1043
|
+
export type ListRecordingLiveSegmentsResponse = z.infer<typeof ListRecordingLiveSegmentsResponse>;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* A meeting's two Markdown documents. `notepad` is what people jot down
|
|
1047
|
+
* while it is recorded; `notes` is the written-up summary, decisions and
|
|
1048
|
+
* action items, by a person or an agent, afterwards.
|
|
1049
|
+
*/
|
|
1050
|
+
export const RECORDING_NOTE_KINDS = ["notepad", "notes"] as const;
|
|
1051
|
+
export const RecordingNoteKind = /* @__PURE__ */ defineSchema(() => z.enum(RECORDING_NOTE_KINDS));
|
|
1052
|
+
export type RecordingNoteKind = z.infer<typeof RecordingNoteKind>;
|
|
1053
|
+
|
|
1054
|
+
/** Notes can hold about 50 pages of text. */
|
|
1055
|
+
export const RECORDING_NOTE_MAX_BYTES = 262_144;
|
|
1056
|
+
|
|
1057
|
+
export const RecordingNote = /* @__PURE__ */ defineSchema(() =>
|
|
1058
|
+
z.object({
|
|
1059
|
+
kind: RecordingNoteKind,
|
|
1060
|
+
/** Markdown. */
|
|
1061
|
+
body: z.string(),
|
|
1062
|
+
/** Goes up by one with every save; send it back as `expectedRevision`. */
|
|
1063
|
+
revision: z.number().int().min(1),
|
|
1064
|
+
updatedAt: z.string(),
|
|
1065
|
+
updatedBy: z.object({
|
|
1066
|
+
subjectId: z.string(),
|
|
1067
|
+
/** The chat whose agent saved it, when an agent did. */
|
|
1068
|
+
sessionId: z.string().uuid().nullable(),
|
|
1069
|
+
}),
|
|
1070
|
+
}),
|
|
1071
|
+
);
|
|
1072
|
+
export type RecordingNote = z.infer<typeof RecordingNote>;
|
|
1073
|
+
|
|
1074
|
+
export const ListRecordingNotesResponse = /* @__PURE__ */ defineSchema(() =>
|
|
1075
|
+
z.object({
|
|
1076
|
+
/** The notes saved so far; a kind nobody has written yet is absent. */
|
|
1077
|
+
notes: z.array(RecordingNote),
|
|
1078
|
+
}),
|
|
1079
|
+
);
|
|
1080
|
+
export type ListRecordingNotesResponse = z.infer<typeof ListRecordingNotesResponse>;
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Replace one of a meeting's notes. With `expectedRevision`, the save is
|
|
1084
|
+
* refused (409 `notes_changed`) when someone saved a newer revision first;
|
|
1085
|
+
* 0 means "nobody has written it yet". Without it, the save always wins.
|
|
1086
|
+
*/
|
|
1087
|
+
export const SaveRecordingNoteRequest = /* @__PURE__ */ defineSchema(() =>
|
|
1088
|
+
z
|
|
1089
|
+
.object({
|
|
1090
|
+
body: z
|
|
1091
|
+
.string()
|
|
1092
|
+
.refine((body) => new TextEncoder().encode(body).length <= RECORDING_NOTE_MAX_BYTES, {
|
|
1093
|
+
message: `Notes can be at most ${RECORDING_NOTE_MAX_BYTES} bytes`,
|
|
1094
|
+
}),
|
|
1095
|
+
expectedRevision: z.number().int().min(0).optional(),
|
|
1096
|
+
})
|
|
1097
|
+
.strict(),
|
|
1098
|
+
);
|
|
1099
|
+
export type SaveRecordingNoteRequest = z.infer<typeof SaveRecordingNoteRequest>;
|
|
1100
|
+
|
|
1101
|
+
export const RECORDING_EVENT_TYPES = [
|
|
1102
|
+
"recording.started",
|
|
1103
|
+
"recording.finished",
|
|
1104
|
+
"recording.transcript.ready",
|
|
1105
|
+
"recording.transcript.failed",
|
|
1106
|
+
"recording.transcript.current_changed",
|
|
1107
|
+
"recording.speakers.updated",
|
|
1108
|
+
"recording.notes.updated",
|
|
1109
|
+
"recording.deleted",
|
|
1110
|
+
] as const;
|
|
1111
|
+
export type RecordingEventType = (typeof RECORDING_EVENT_TYPES)[number];
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* The `data` of a recording webhook event. Events carry ids, states and
|
|
1115
|
+
* numbers only, never a title, audio or transcript text, so a receiver reads
|
|
1116
|
+
* the recording through the API with its own authority.
|
|
1117
|
+
*/
|
|
1118
|
+
export type RecordingEventData = {
|
|
1119
|
+
recordingId: string;
|
|
1120
|
+
ownerSubjectId: string;
|
|
1121
|
+
visibility: RecordingVisibility;
|
|
1122
|
+
externalRef: string | null;
|
|
1123
|
+
state: RecordingState;
|
|
1124
|
+
durationMilliseconds?: number;
|
|
1125
|
+
versionId?: string;
|
|
1126
|
+
versionNumber?: number;
|
|
1127
|
+
providerId?: string;
|
|
1128
|
+
model?: string;
|
|
1129
|
+
segmentCount?: number;
|
|
1130
|
+
languages?: string[];
|
|
1131
|
+
errorCode?: string | null;
|
|
1132
|
+
previousVersionId?: string | null;
|
|
1133
|
+
/** `recording.notes.updated`: which notes, their new revision, and the chat whose agent saved them. */
|
|
1134
|
+
noteKind?: RecordingNoteKind;
|
|
1135
|
+
noteRevision?: number;
|
|
1136
|
+
sessionId?: string | null;
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1139
|
+
/** Limits of durable (chunked, resumable) dictation, advertised in client config. */
|
|
1140
|
+
export const ClientResumableVoiceInputConfig = /* @__PURE__ */ defineSchema(() =>
|
|
1141
|
+
z
|
|
1142
|
+
.object({
|
|
1143
|
+
maxDurationSeconds: primitives.positiveInteger.max(8 * 60 * 60),
|
|
1144
|
+
maxSizeBytes: primitives.positiveInteger.max(512 * 1024 * 1024),
|
|
1145
|
+
maxChunkSizeBytes: primitives.positiveInteger.max(25 * 1024 * 1024),
|
|
1146
|
+
providerSegmentSeconds: z.number().int().positive().max(600),
|
|
1147
|
+
})
|
|
1148
|
+
.strict(),
|
|
1149
|
+
);
|
|
1150
|
+
export type ClientResumableVoiceInputConfig = z.infer<typeof ClientResumableVoiceInputConfig>;
|
|
1151
|
+
|
|
1152
|
+
/** Audio is sent to a transcription provider in segments of at most this length. */
|
|
1153
|
+
export const TRANSCRIPTION_PROVIDER_SEGMENT_SECONDS = 50;
|