@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,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation-first session history: which durable events are the steps of a
|
|
3
|
+
* turn, and which tool results stay visible without opening those steps.
|
|
4
|
+
* Dependency-free so browser packages can import it without the schema bundle.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* The bulk of a long agent turn: tool calls, their outputs and streamed
|
|
8
|
+
* reasoning or command output. A turn whose window skips any of these has
|
|
9
|
+
* steps a reader can open.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SESSION_EVENT_CONTENT_STEP_TYPES: readonly ["agent.toolCall.created", "agent.toolCall.output", "agent.reasoning.delta", "sandbox.command.output.delta", "terminal.pty.output.delta"];
|
|
12
|
+
/**
|
|
13
|
+
* Turn bookkeeping that renders nothing in the conversation: a turn writes a
|
|
14
|
+
* few `agent.model.request` rows and an `agent.model.usage` row per model
|
|
15
|
+
* call. Only a turn's request rows up to its first model response draw
|
|
16
|
+
* anything (the "first model response" startup phase); a conversation-filter
|
|
17
|
+
* server keeps those, and every bookkeeping row of a turn without other
|
|
18
|
+
* steps, so it never looks like it has steps to open.
|
|
19
|
+
*/
|
|
20
|
+
export declare const SESSION_EVENT_BOOKKEEPING_STEP_TYPES: readonly ["agent.model.request", "agent.model.usage"];
|
|
21
|
+
/**
|
|
22
|
+
* Everything conversation-first history reads exclude and load per turn, only
|
|
23
|
+
* when a reader asks for that turn's steps.
|
|
24
|
+
*/
|
|
25
|
+
export declare const SESSION_EVENT_STEP_TYPES: readonly ["agent.toolCall.created", "agent.toolCall.output", "agent.reasoning.delta", "sandbox.command.output.delta", "terminal.pty.output.delta", "agent.model.request", "agent.model.usage"];
|
|
26
|
+
/**
|
|
27
|
+
* The conversation-filter behavior a server applies to a read that sends
|
|
28
|
+
* `presentedToolCalls=include`, announced in the `X-OpenGeni-Conversation-Filter`
|
|
29
|
+
* response header. Version 2 keeps presented tool calls and the bookkeeping
|
|
30
|
+
* rows described by {@link SESSION_EVENT_BOOKKEEPING_STEP_TYPES}; excluded
|
|
31
|
+
* turnless output (PTY and command output) stays out, for the sandbox dock to
|
|
32
|
+
* read itself. A server without the header may ignore `presentedToolCalls`
|
|
33
|
+
* entirely.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SESSION_EVENT_CONVERSATION_FILTER_VERSION = 2;
|
|
36
|
+
export declare const SESSION_EVENT_CONVERSATION_FILTER_HEADER = "X-OpenGeni-Conversation-Filter";
|
|
37
|
+
/**
|
|
38
|
+
* What a reader excludes from a conversation read when the server has not
|
|
39
|
+
* announced {@link SESSION_EVENT_CONVERSATION_FILTER_VERSION}: tool calls stay
|
|
40
|
+
* in (an older server would otherwise drop presented calls with them) and the
|
|
41
|
+
* reader drops the ones that are not presented.
|
|
42
|
+
*/
|
|
43
|
+
export declare const SESSION_EVENT_COMPAT_EXCLUDED_STEP_TYPES: readonly ["agent.toolCall.output", "agent.reasoning.delta", "sandbox.command.output.delta", "terminal.pty.output.delta"];
|
|
44
|
+
/**
|
|
45
|
+
* Whether an `agent.model.request` phase is the model's first response. A
|
|
46
|
+
* turn's request rows after its first response no longer change what the
|
|
47
|
+
* conversation draws.
|
|
48
|
+
*/
|
|
49
|
+
export declare function isSessionModelResponsePhase(phase: unknown): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Tools whose result is primary output a reader sees without opening the
|
|
52
|
+
* turn's steps: presented images and published files, Skill changes that may
|
|
53
|
+
* need review, learning writes whose refusal is told outside the folded work
|
|
54
|
+
* row, and worker spawns or messages that a turn's wait counts. Matched on the
|
|
55
|
+
* tool name's leaf (`x__leaf` or `leaf`).
|
|
56
|
+
*/
|
|
57
|
+
export declare const SESSION_EVENT_PRESENTED_TOOL_LEAVES: readonly ["generate_image", "image_generation_call", "sandbox_file_publish", "skill_save", "skill_remove", "skill_install", "skill_publish", "instruction_policy_save", "knowledge_save", "knowledge_retain_file", "knowledge_retain_message", "knowledge_archive", "task_note_promote_knowledge", "remember_confirm", "session_create", "session_send_message"];
|
|
58
|
+
/** Whether a tool name is one of {@link SESSION_EVENT_PRESENTED_TOOL_LEAVES}. */
|
|
59
|
+
export declare function isPresentedSessionToolName(name: unknown): boolean;
|
|
60
|
+
/** The tool leaf a session runs the app's own actions through. */
|
|
61
|
+
export declare const SESSION_EVENT_APP_ACTION_CALL_LEAF = "admin_action_call";
|
|
62
|
+
/** The page an app action opens: buying credits, starting a subscription, or the billing portal. */
|
|
63
|
+
export type PresentedAppActionPage = "credits" | "subscription" | "portal";
|
|
64
|
+
/**
|
|
65
|
+
* App actions whose call is primary output too: each opens a payment page,
|
|
66
|
+
* and the chat shows it as a button that later confirms the payment, which a
|
|
67
|
+
* person returning to the chat (often in a reloaded tab) needs to see.
|
|
68
|
+
* Keyed by action id, with the "METHOD /path" a call may name it by instead
|
|
69
|
+
* (as `findAppAction` accepts) and the page it opens.
|
|
70
|
+
*/
|
|
71
|
+
export declare const SESSION_EVENT_PRESENTED_APP_ACTIONS: {
|
|
72
|
+
readonly createBillingCheckout: {
|
|
73
|
+
readonly route: "POST /v1/billing/checkout";
|
|
74
|
+
readonly page: "credits";
|
|
75
|
+
};
|
|
76
|
+
readonly createSubscriptionCheckout: {
|
|
77
|
+
readonly route: "POST /v1/billing/subscription/checkout";
|
|
78
|
+
readonly page: "subscription";
|
|
79
|
+
};
|
|
80
|
+
readonly createBillingPortalSession: {
|
|
81
|
+
readonly route: "POST /v1/billing/portal";
|
|
82
|
+
readonly page: "portal";
|
|
83
|
+
};
|
|
84
|
+
readonly createSubscriptionPortalSession: {
|
|
85
|
+
readonly route: "POST /v1/billing/subscription/portal";
|
|
86
|
+
readonly page: "portal";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type PresentedAppActionId = keyof typeof SESSION_EVENT_PRESENTED_APP_ACTIONS;
|
|
90
|
+
/**
|
|
91
|
+
* The whitespace a call's action id is trimmed of before it's matched: exactly
|
|
92
|
+
* what `String.prototype.trim` removes, as the action runner trims the id
|
|
93
|
+
* (`findAppAction`), spelled out so the history query (Postgres `btrim`) and
|
|
94
|
+
* every client agree.
|
|
95
|
+
*/
|
|
96
|
+
export declare const SESSION_EVENT_APP_ACTION_ID_SPACE = " \t\n\v\f\r\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF";
|
|
97
|
+
/** Every name that calls one of {@link SESSION_EVENT_PRESENTED_APP_ACTIONS}: each id and its "METHOD /path". */
|
|
98
|
+
export declare const SESSION_EVENT_PRESENTED_APP_ACTION_NAMES: readonly string[];
|
|
99
|
+
/**
|
|
100
|
+
* Which of {@link SESSION_EVENT_PRESENTED_APP_ACTIONS} an app action call's
|
|
101
|
+
* `id` names, by its id or its "METHOD /path"; undefined for anything else.
|
|
102
|
+
*/
|
|
103
|
+
export declare function presentedAppActionId(id: unknown): PresentedAppActionId | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Whether a tool call's result is primary output: a presented tool
|
|
106
|
+
* ({@link isPresentedSessionToolName}), or an app action call that runs one of
|
|
107
|
+
* {@link SESSION_EVENT_PRESENTED_APP_ACTIONS} (its arguments' top-level `id`,
|
|
108
|
+
* see {@link presentedAppActionId}). Takes the `agent.toolCall.created`
|
|
109
|
+
* payload (its `name` and `arguments`, an object or JSON text).
|
|
110
|
+
*/
|
|
111
|
+
export declare function isPresentedSessionToolCall(call: unknown): boolean;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SESSION_EVENT_APP_ACTION_CALL_LEAF,
|
|
3
|
+
SESSION_EVENT_APP_ACTION_ID_SPACE,
|
|
4
|
+
SESSION_EVENT_BOOKKEEPING_STEP_TYPES,
|
|
5
|
+
SESSION_EVENT_COMPAT_EXCLUDED_STEP_TYPES,
|
|
6
|
+
SESSION_EVENT_CONTENT_STEP_TYPES,
|
|
7
|
+
SESSION_EVENT_CONVERSATION_FILTER_HEADER,
|
|
8
|
+
SESSION_EVENT_CONVERSATION_FILTER_VERSION,
|
|
9
|
+
SESSION_EVENT_PRESENTED_APP_ACTIONS,
|
|
10
|
+
SESSION_EVENT_PRESENTED_APP_ACTION_NAMES,
|
|
11
|
+
SESSION_EVENT_PRESENTED_TOOL_LEAVES,
|
|
12
|
+
SESSION_EVENT_STEP_TYPES,
|
|
13
|
+
isPresentedSessionToolCall,
|
|
14
|
+
isPresentedSessionToolName,
|
|
15
|
+
isSessionModelResponsePhase,
|
|
16
|
+
presentedAppActionId
|
|
17
|
+
} from "./chunk-UIZWGPHV.js";
|
|
18
|
+
export {
|
|
19
|
+
SESSION_EVENT_APP_ACTION_CALL_LEAF,
|
|
20
|
+
SESSION_EVENT_APP_ACTION_ID_SPACE,
|
|
21
|
+
SESSION_EVENT_BOOKKEEPING_STEP_TYPES,
|
|
22
|
+
SESSION_EVENT_COMPAT_EXCLUDED_STEP_TYPES,
|
|
23
|
+
SESSION_EVENT_CONTENT_STEP_TYPES,
|
|
24
|
+
SESSION_EVENT_CONVERSATION_FILTER_HEADER,
|
|
25
|
+
SESSION_EVENT_CONVERSATION_FILTER_VERSION,
|
|
26
|
+
SESSION_EVENT_PRESENTED_APP_ACTIONS,
|
|
27
|
+
SESSION_EVENT_PRESENTED_APP_ACTION_NAMES,
|
|
28
|
+
SESSION_EVENT_PRESENTED_TOOL_LEAVES,
|
|
29
|
+
SESSION_EVENT_STEP_TYPES,
|
|
30
|
+
isPresentedSessionToolCall,
|
|
31
|
+
isPresentedSessionToolName,
|
|
32
|
+
isSessionModelResponsePhase,
|
|
33
|
+
presentedAppActionId
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=session-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Session, SessionListEntry } from "./index.js";
|
|
2
|
+
/** Explicit list projection. Detail/configuration remains available from getSession. */
|
|
3
|
+
export type SessionListEntryInput = Omit<SessionListEntry, "displayTitle" | "renameSeed" | "scheduledTaskId" | "siteOrigin" | "pinned" | "pinnedAt" | "pinVersion" | "unread" | "activelyWorking" | "attentionVersion" | "archived" | "archivedAt" | "archiveVersion" | "description" | "avatar"> & {
|
|
4
|
+
/** Absent from older servers' rows and SDK-projected sessions. */
|
|
5
|
+
description?: string | null | undefined;
|
|
6
|
+
avatar?: Session["avatar"] | undefined;
|
|
7
|
+
} & Partial<Pick<Session, "pinned" | "pinnedAt" | "pinVersion" | "unread" | "activelyWorking" | "attentionVersion" | "archived" | "archivedAt" | "archiveVersion">> & Pick<Session, "metadata" | "initialMessage">;
|
|
8
|
+
export declare function sessionListEntry(session: SessionListEntryInput): SessionListEntry;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deriveAutomaticSessionTitlePreview,
|
|
3
|
+
deriveSessionDisplayTitle,
|
|
4
|
+
sessionTitleIsPending
|
|
5
|
+
} from "./chunk-T3HSWMA5.js";
|
|
6
|
+
|
|
7
|
+
// src/session-list-entries.ts
|
|
8
|
+
function sessionListEntry(session) {
|
|
9
|
+
const origin = session.metadata._opengeniSiteOrigin;
|
|
10
|
+
const siteOrigin = origin && typeof origin.siteId === "string" && /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/i.test(origin.siteId) && typeof origin.title === "string" ? { siteId: origin.siteId, title: origin.title } : null;
|
|
11
|
+
const scheduledTaskId = session.metadata.scheduledTaskId;
|
|
12
|
+
return {
|
|
13
|
+
id: session.id,
|
|
14
|
+
workspaceId: session.workspaceId,
|
|
15
|
+
accountId: session.accountId,
|
|
16
|
+
status: session.status,
|
|
17
|
+
backgroundCommandActivity: session.backgroundCommandActivity,
|
|
18
|
+
hasSchedules: session.hasSchedules,
|
|
19
|
+
hasUpcomingSchedules: session.hasUpcomingSchedules,
|
|
20
|
+
waitingForEvents: session.waitingForEvents,
|
|
21
|
+
automationWait: session.automationWait,
|
|
22
|
+
title: session.title,
|
|
23
|
+
titleSource: session.titleSource,
|
|
24
|
+
description: session.description ?? null,
|
|
25
|
+
avatar: session.avatar ?? null,
|
|
26
|
+
displayTitle: deriveSessionDisplayTitle(session),
|
|
27
|
+
renameSeed: sessionTitleIsPending(session) ? deriveAutomaticSessionTitlePreview(session.initialMessage) ?? "" : session.title?.trim() ?? "",
|
|
28
|
+
scheduledTaskId: typeof scheduledTaskId === "string" && scheduledTaskId.length > 0 ? scheduledTaskId : null,
|
|
29
|
+
siteOrigin,
|
|
30
|
+
...session.model ? { model: session.model } : {},
|
|
31
|
+
...session.reasoningEffort ? { reasoningEffort: session.reasoningEffort } : {},
|
|
32
|
+
createdBy: session.createdBy,
|
|
33
|
+
channelId: session.channelId,
|
|
34
|
+
parentSessionId: session.parentSessionId,
|
|
35
|
+
rootSessionId: session.rootSessionId,
|
|
36
|
+
effectiveControl: session.effectiveControl,
|
|
37
|
+
inputWait: session.inputWait,
|
|
38
|
+
lastSequence: session.lastSequence,
|
|
39
|
+
pinned: session.pinned ?? false,
|
|
40
|
+
pinnedAt: session.pinnedAt ?? null,
|
|
41
|
+
pinVersion: session.pinVersion ?? 0,
|
|
42
|
+
unread: session.unread ?? false,
|
|
43
|
+
activelyWorking: session.activelyWorking ?? false,
|
|
44
|
+
attentionVersion: session.attentionVersion ?? 0,
|
|
45
|
+
archived: session.archived ?? false,
|
|
46
|
+
archivedAt: session.archivedAt ?? null,
|
|
47
|
+
importedArchive: session.importedArchive,
|
|
48
|
+
...session.retention ? { retention: session.retention } : {},
|
|
49
|
+
archiveVersion: session.archiveVersion ?? 0,
|
|
50
|
+
treeStats: session.treeStats,
|
|
51
|
+
requiresActionSince: session.requiresActionSince,
|
|
52
|
+
// Lets lists tell a runtime-held session apart from one waiting on a person.
|
|
53
|
+
...session.admissionBlock !== void 0 ? { admissionBlock: session.admissionBlock } : {},
|
|
54
|
+
createdAt: session.createdAt,
|
|
55
|
+
updatedAt: session.updatedAt
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
sessionListEntry
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=session-list-entries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/session-list-entries.ts"],"sourcesContent":["import type { Session, SessionListEntry } from \"./index\";\nimport {\n deriveAutomaticSessionTitlePreview,\n deriveSessionDisplayTitle,\n sessionTitleIsPending,\n} from \"./session-titles\";\n\n/** Explicit list projection. Detail/configuration remains available from getSession. */\nexport type SessionListEntryInput = Omit<\n SessionListEntry,\n | \"displayTitle\"\n | \"renameSeed\"\n | \"scheduledTaskId\"\n | \"siteOrigin\"\n | \"pinned\"\n | \"pinnedAt\"\n | \"pinVersion\"\n | \"unread\"\n | \"activelyWorking\"\n | \"attentionVersion\"\n | \"archived\"\n | \"archivedAt\"\n | \"archiveVersion\"\n | \"description\"\n | \"avatar\"\n> & {\n /** Absent from older servers' rows and SDK-projected sessions. */\n description?: string | null | undefined;\n avatar?: Session[\"avatar\"] | undefined;\n} & Partial<\n Pick<\n Session,\n | \"pinned\"\n | \"pinnedAt\"\n | \"pinVersion\"\n | \"unread\"\n | \"activelyWorking\"\n | \"attentionVersion\"\n | \"archived\"\n | \"archivedAt\"\n | \"archiveVersion\"\n >\n > &\n Pick<Session, \"metadata\" | \"initialMessage\">;\n\nexport function sessionListEntry(session: SessionListEntryInput): SessionListEntry {\n const origin = session.metadata._opengeniSiteOrigin as\n | { siteId?: unknown; title?: unknown }\n | undefined;\n const siteOrigin =\n origin &&\n typeof origin.siteId === \"string\" &&\n /^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/i.test(origin.siteId) &&\n typeof origin.title === \"string\"\n ? { siteId: origin.siteId, title: origin.title }\n : null;\n const scheduledTaskId = session.metadata.scheduledTaskId;\n return {\n id: session.id,\n workspaceId: session.workspaceId,\n accountId: session.accountId,\n status: session.status,\n backgroundCommandActivity: session.backgroundCommandActivity,\n hasSchedules: session.hasSchedules,\n hasUpcomingSchedules: session.hasUpcomingSchedules,\n waitingForEvents: session.waitingForEvents,\n automationWait: session.automationWait,\n title: session.title,\n titleSource: session.titleSource,\n description: session.description ?? null,\n avatar: session.avatar ?? null,\n displayTitle: deriveSessionDisplayTitle(session),\n renameSeed: sessionTitleIsPending(session)\n ? (deriveAutomaticSessionTitlePreview(session.initialMessage) ?? \"\")\n : (session.title?.trim() ?? \"\"),\n scheduledTaskId:\n typeof scheduledTaskId === \"string\" && scheduledTaskId.length > 0 ? scheduledTaskId : null,\n siteOrigin,\n ...(session.model ? { model: session.model } : {}),\n ...(session.reasoningEffort ? { reasoningEffort: session.reasoningEffort } : {}),\n createdBy: session.createdBy,\n channelId: session.channelId,\n parentSessionId: session.parentSessionId,\n rootSessionId: session.rootSessionId,\n effectiveControl: session.effectiveControl,\n inputWait: session.inputWait,\n lastSequence: session.lastSequence,\n pinned: session.pinned ?? false,\n pinnedAt: session.pinnedAt ?? null,\n pinVersion: session.pinVersion ?? 0,\n unread: session.unread ?? false,\n activelyWorking: session.activelyWorking ?? false,\n attentionVersion: session.attentionVersion ?? 0,\n archived: session.archived ?? false,\n archivedAt: session.archivedAt ?? null,\n importedArchive: session.importedArchive,\n ...(session.retention ? { retention: session.retention } : {}),\n archiveVersion: session.archiveVersion ?? 0,\n treeStats: session.treeStats,\n requiresActionSince: session.requiresActionSince,\n // Lets lists tell a runtime-held session apart from one waiting on a person.\n ...(session.admissionBlock !== undefined ? { admissionBlock: session.admissionBlock } : {}),\n createdAt: session.createdAt,\n updatedAt: session.updatedAt,\n };\n}\n"],"mappings":";;;;;;;AA6CO,SAAS,iBAAiB,SAAkD;AACjF,QAAM,SAAS,QAAQ,SAAS;AAGhC,QAAM,aACJ,UACA,OAAO,OAAO,WAAW,YACzB,6DAA6D,KAAK,OAAO,MAAM,KAC/E,OAAO,OAAO,UAAU,WACpB,EAAE,QAAQ,OAAO,QAAQ,OAAO,OAAO,MAAM,IAC7C;AACN,QAAM,kBAAkB,QAAQ,SAAS;AACzC,SAAO;AAAA,IACL,IAAI,QAAQ;AAAA,IACZ,aAAa,QAAQ;AAAA,IACrB,WAAW,QAAQ;AAAA,IACnB,QAAQ,QAAQ;AAAA,IAChB,2BAA2B,QAAQ;AAAA,IACnC,cAAc,QAAQ;AAAA,IACtB,sBAAsB,QAAQ;AAAA,IAC9B,kBAAkB,QAAQ;AAAA,IAC1B,gBAAgB,QAAQ;AAAA,IACxB,OAAO,QAAQ;AAAA,IACf,aAAa,QAAQ;AAAA,IACrB,aAAa,QAAQ,eAAe;AAAA,IACpC,QAAQ,QAAQ,UAAU;AAAA,IAC1B,cAAc,0BAA0B,OAAO;AAAA,IAC/C,YAAY,sBAAsB,OAAO,IACpC,mCAAmC,QAAQ,cAAc,KAAK,KAC9D,QAAQ,OAAO,KAAK,KAAK;AAAA,IAC9B,iBACE,OAAO,oBAAoB,YAAY,gBAAgB,SAAS,IAAI,kBAAkB;AAAA,IACxF;AAAA,IACA,GAAI,QAAQ,QAAQ,EAAE,OAAO,QAAQ,MAAM,IAAI,CAAC;AAAA,IAChD,GAAI,QAAQ,kBAAkB,EAAE,iBAAiB,QAAQ,gBAAgB,IAAI,CAAC;AAAA,IAC9E,WAAW,QAAQ;AAAA,IACnB,WAAW,QAAQ;AAAA,IACnB,iBAAiB,QAAQ;AAAA,IACzB,eAAe,QAAQ;AAAA,IACvB,kBAAkB,QAAQ;AAAA,IAC1B,WAAW,QAAQ;AAAA,IACnB,cAAc,QAAQ;AAAA,IACtB,QAAQ,QAAQ,UAAU;AAAA,IAC1B,UAAU,QAAQ,YAAY;AAAA,IAC9B,YAAY,QAAQ,cAAc;AAAA,IAClC,QAAQ,QAAQ,UAAU;AAAA,IAC1B,iBAAiB,QAAQ,mBAAmB;AAAA,IAC5C,kBAAkB,QAAQ,oBAAoB;AAAA,IAC9C,UAAU,QAAQ,YAAY;AAAA,IAC9B,YAAY,QAAQ,cAAc;AAAA,IAClC,iBAAiB,QAAQ;AAAA,IACzB,GAAI,QAAQ,YAAY,EAAE,WAAW,QAAQ,UAAU,IAAI,CAAC;AAAA,IAC5D,gBAAgB,QAAQ,kBAAkB;AAAA,IAC1C,WAAW,QAAQ;AAAA,IACnB,qBAAqB,QAAQ;AAAA;AAAA,IAE7B,GAAI,QAAQ,mBAAmB,SAAY,EAAE,gBAAgB,QAAQ,eAAe,IAAI,CAAC;AAAA,IACzF,WAAW,QAAQ;AAAA,IACnB,WAAW,QAAQ;AAAA,EACrB;AACF;","names":[]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { SessionGoalStatus, SessionStatus } from "./session-topology-primitives.js";
|
|
2
2
|
import type { WorkDiscoveryProjection } from "./work-claims.js";
|
|
3
3
|
import type { Session, SessionQueueSnapshot } from "./index.js";
|
|
4
|
+
/** Counts used by compact monitoring; full queue previews remain a separate read. */
|
|
5
|
+
export type SessionMcpQueueSummary = {
|
|
6
|
+
queuedTurns: number;
|
|
7
|
+
pendingInputs: number;
|
|
8
|
+
stoppingPreviousAttempt: boolean;
|
|
9
|
+
};
|
|
4
10
|
/** MCP-only presentation choice. REST/SDK session shapes keep their own defaults. */
|
|
5
11
|
export type SessionMcpDetail = "compact" | "full";
|
|
6
12
|
/** Search evidence is inseparable from matching; presentation opts never weaken search. */
|
|
@@ -157,7 +163,7 @@ export type SessionMcpMonitoringSource = {
|
|
|
157
163
|
};
|
|
158
164
|
/** Closed management projection shared by adapters; never includes session configuration.
|
|
159
165
|
* Apply target/ancestor authorization projection to session before calling. */
|
|
160
|
-
export declare function compactSessionMcpDetail(session: Session, monitoring: SessionMcpMonitoringSource, queue: SessionQueueSnapshot | null): {
|
|
166
|
+
export declare function compactSessionMcpDetail(session: Session, monitoring: SessionMcpMonitoringSource, queue: SessionQueueSnapshot | SessionMcpQueueSummary | null): {
|
|
161
167
|
id: string;
|
|
162
168
|
projectId?: string;
|
|
163
169
|
title: string | null;
|
|
@@ -166,6 +172,12 @@ export declare function compactSessionMcpDetail(session: Session, monitoring: Se
|
|
|
166
172
|
parentSessionId?: string;
|
|
167
173
|
activeTurnId?: string;
|
|
168
174
|
lastSequence: number;
|
|
175
|
+
archive?: {
|
|
176
|
+
state: "archived" | "archiving";
|
|
177
|
+
archivedAt: string | null;
|
|
178
|
+
readOnly: boolean;
|
|
179
|
+
};
|
|
180
|
+
keepLive?: boolean;
|
|
169
181
|
goal?: {
|
|
170
182
|
status: "active" | "completed" | "paused";
|
|
171
183
|
summary: string | null;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Tool `_meta` key an MCP server sets in `tools/list` to recommend a default
|
|
4
|
+
* permission for that tool: `"ask"` or `"allow"`. Like `requireApproval`, it
|
|
5
|
+
* applies only when the workspace has no saved choice for the tool and no
|
|
6
|
+
* server default. The tool asks when either this or `requireApproval` says so.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MCP_TOOL_RECOMMENDED_PERMISSION_META_KEY: "opengeni/recommendedPermission";
|
|
9
|
+
/** True when a listed MCP tool recommends Ask through its `_meta`. */
|
|
10
|
+
export declare function mcpToolRecommendsApproval(tool: object): boolean;
|
|
11
|
+
export declare const SessionMcpToolPermissionsQuery: z.ZodObject<{
|
|
12
|
+
serverId: z.ZodString;
|
|
13
|
+
url: z.ZodString;
|
|
14
|
+
}, z.core.$strict>;
|
|
15
|
+
export type SessionMcpToolPermissionsQuery = z.infer<typeof SessionMcpToolPermissionsQuery>;
|
|
16
|
+
/** Saved choices only. Tools without a rule follow `defaultPermission`, then
|
|
17
|
+
* the server's recommendation (the tool's `opengeni/recommendedPermission`
|
|
18
|
+
* `_meta`, or the attaching session's `requireApproval`), then Allow. */
|
|
19
|
+
export declare const SessionMcpToolPermissionsResponse: z.ZodObject<{
|
|
20
|
+
connectionId: z.ZodString;
|
|
21
|
+
serverId: z.ZodString;
|
|
22
|
+
defaultPermission: z.ZodNullable<z.ZodEnum<{
|
|
23
|
+
allow: "allow";
|
|
24
|
+
ask: "ask";
|
|
25
|
+
block: "block";
|
|
26
|
+
}>>;
|
|
27
|
+
tools: z.ZodArray<z.ZodObject<{
|
|
28
|
+
toolName: z.ZodString;
|
|
29
|
+
permission: z.ZodEnum<{
|
|
30
|
+
allow: "allow";
|
|
31
|
+
ask: "ask";
|
|
32
|
+
block: "block";
|
|
33
|
+
}>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
revision: z.ZodString;
|
|
36
|
+
canManage: z.ZodBoolean;
|
|
37
|
+
appliesTo: z.ZodLiteral<"next_attempt">;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type SessionMcpToolPermissionsResponse = z.infer<typeof SessionMcpToolPermissionsResponse>;
|
|
40
|
+
export declare const UpdateSessionMcpToolPermissionsRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
serverId: z.ZodString;
|
|
42
|
+
url: z.ZodString;
|
|
43
|
+
target: z.ZodLiteral<"default">;
|
|
44
|
+
permission: z.ZodNullable<z.ZodEnum<{
|
|
45
|
+
allow: "allow";
|
|
46
|
+
ask: "ask";
|
|
47
|
+
block: "block";
|
|
48
|
+
}>>;
|
|
49
|
+
expectedRevision: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
serverId: z.ZodString;
|
|
52
|
+
url: z.ZodString;
|
|
53
|
+
target: z.ZodLiteral<"tools">;
|
|
54
|
+
toolNames: z.ZodArray<z.ZodString>;
|
|
55
|
+
permission: z.ZodNullable<z.ZodEnum<{
|
|
56
|
+
allow: "allow";
|
|
57
|
+
ask: "ask";
|
|
58
|
+
block: "block";
|
|
59
|
+
}>>;
|
|
60
|
+
expectedRevision: z.ZodOptional<z.ZodString>;
|
|
61
|
+
}, z.core.$strict>], "target">;
|
|
62
|
+
export type UpdateSessionMcpToolPermissionsRequest = z.infer<typeof UpdateSessionMcpToolPermissionsRequest>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Conversational context only. Never an authority or an implicit dispatch destination. */
|
|
3
|
+
export declare const SessionTargetContext: z.ZodObject<{
|
|
4
|
+
version: z.ZodNumber;
|
|
5
|
+
sessionId: z.ZodNullable<z.ZodString>;
|
|
6
|
+
operationId: z.ZodNullable<z.ZodString>;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
export type SessionTargetContext = z.infer<typeof SessionTargetContext>;
|
|
9
|
+
export declare const SetSessionTargetRequest: z.ZodObject<{
|
|
10
|
+
sessionId: z.ZodNullable<z.ZodString>;
|
|
11
|
+
expectedVersion: z.ZodNumber;
|
|
12
|
+
operationId: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type SetSessionTargetRequest = z.infer<typeof SetSessionTargetRequest>;
|
|
15
|
+
export declare const SESSION_TARGET_CONTEXT_KEY = "conversationTargetV1";
|
|
16
|
+
export declare function sessionTargetContext(metadata: Record<string, unknown>): SessionTargetContext;
|
|
17
|
+
/** CAS plus exact retry replay; an old retry cannot restore a subsequently cleared target. */
|
|
18
|
+
export declare function nextSessionTargetContext(current: SessionTargetContext, request: SetSessionTargetRequest): SessionTargetContext;
|
package/dist/session-titles.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare const AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES = 80;
|
|
|
12
12
|
* credential or leave a raw prompt prefix in navigation surfaces.
|
|
13
13
|
*/
|
|
14
14
|
export declare const AUTOMATIC_SESSION_TITLE_FALLBACK = "New conversation";
|
|
15
|
+
export declare const PROMPT_PREVIEW_SCAN_MAX_CODE_UNITS = 4096;
|
|
15
16
|
/**
|
|
16
17
|
* Whether a bounded automatic-title candidate contains a credential, URL, or
|
|
17
18
|
* opaque identifier that must stay out of navigation and other display-title
|
|
@@ -19,6 +20,13 @@ export declare const AUTOMATIC_SESSION_TITLE_FALLBACK = "New conversation";
|
|
|
19
20
|
* this helper.
|
|
20
21
|
*/
|
|
21
22
|
export declare function containsSensitiveAutomaticSessionTitleValue(value: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Read-side cleanup for a durable title. Automatic titles written before
|
|
25
|
+
* control-token stripping can still hold a token ("Release plan<|fim_suffix|>");
|
|
26
|
+
* those keep only their first real segment, and a token-only title reads as no
|
|
27
|
+
* title. Human renames and titles without a token are returned unchanged.
|
|
28
|
+
*/
|
|
29
|
+
export declare function cleanStoredSessionTitle(title: string | null | undefined, titleSource: string | null | undefined): string | null;
|
|
22
30
|
/** Bound an already-normalized automatic-title candidate without splitting graphemes. */
|
|
23
31
|
export declare function boundAutomaticSessionTitle(value: string): string;
|
|
24
32
|
/**
|
package/dist/session-titles.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AUTOMATIC_SESSION_TITLE_FALLBACK,
|
|
3
3
|
AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES,
|
|
4
|
+
PROMPT_PREVIEW_SCAN_MAX_CODE_UNITS,
|
|
4
5
|
SESSION_TITLE_MAX_CHARACTERS,
|
|
5
6
|
boundAutomaticSessionTitle,
|
|
7
|
+
cleanStoredSessionTitle,
|
|
6
8
|
containsSensitiveAutomaticSessionTitleValue,
|
|
7
9
|
deriveAutomaticSessionTitlePreview,
|
|
8
10
|
deriveSessionDisplayTitle,
|
|
9
11
|
normalizeAutomaticSessionTitle,
|
|
10
12
|
sessionTitleIsPending
|
|
11
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-T3HSWMA5.js";
|
|
12
14
|
export {
|
|
13
15
|
AUTOMATIC_SESSION_TITLE_FALLBACK,
|
|
14
16
|
AUTOMATIC_SESSION_TITLE_MAX_GRAPHEMES,
|
|
17
|
+
PROMPT_PREVIEW_SCAN_MAX_CODE_UNITS,
|
|
15
18
|
SESSION_TITLE_MAX_CHARACTERS,
|
|
16
19
|
boundAutomaticSessionTitle,
|
|
20
|
+
cleanStoredSessionTitle,
|
|
17
21
|
containsSensitiveAutomaticSessionTitleValue,
|
|
18
22
|
deriveAutomaticSessionTitlePreview,
|
|
19
23
|
deriveSessionDisplayTitle,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser/React Native-safe session usage limit helpers. Deliberately free of
|
|
3
|
+
* the zod runtime so synchronous timeline projection can use it; contract
|
|
4
|
+
* parity tests keep it aligned with `session-usage-limits.ts`.
|
|
5
|
+
*/
|
|
6
|
+
/** `turn.completed.segmentLimit` for a stop caused by a task usage limit. */
|
|
7
|
+
export declare const SESSION_USAGE_LIMIT_SEGMENT: "session_usage_limit";
|
|
8
|
+
/** `SessionGoal.pausedReason` for a goal paused by a task usage limit. */
|
|
9
|
+
export declare const SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON: "session_usage_limit";
|
|
10
|
+
export type ParsedSessionUsageLimitReachedRefusal = {
|
|
11
|
+
code: "session_usage_limit_reached";
|
|
12
|
+
basis: "model_api_equivalent_v1";
|
|
13
|
+
rootSessionId: string;
|
|
14
|
+
limitMicros: number;
|
|
15
|
+
usedMicros: number;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Select only the public refusal fields from an API error body (fields may sit
|
|
20
|
+
* in `details`), a `turn.completed` payload's `sessionUsageLimit` record, or a
|
|
21
|
+
* refusal object. Anything malformed returns null instead of a guessed amount.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseSessionUsageLimitReachedRefusal(value: unknown): ParsedSessionUsageLimitReachedRefusal | null;
|
|
24
|
+
/**
|
|
25
|
+
* "$12.34" for known amounts, "<$0.01" for a positive amount under a cent.
|
|
26
|
+
* Callers must not pass unknown usage: render "Preparing usage" or
|
|
27
|
+
* "Usage unavailable" instead of a dollar figure.
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatSessionUsageMicros(value: number): string;
|
|
30
|
+
/** Fixed, bounded wording: no reset date, purchase remedy or invoice claim. */
|
|
31
|
+
export declare function sessionUsageLimitReachedMessage(refusal: {
|
|
32
|
+
limitMicros: number;
|
|
33
|
+
usedMicros: number;
|
|
34
|
+
}): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON,
|
|
3
|
+
SESSION_USAGE_LIMIT_SEGMENT,
|
|
4
|
+
formatSessionUsageMicros,
|
|
5
|
+
parseSessionUsageLimitReachedRefusal,
|
|
6
|
+
sessionUsageLimitReachedMessage
|
|
7
|
+
} from "./chunk-7272KVWZ.js";
|
|
8
|
+
export {
|
|
9
|
+
SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON,
|
|
10
|
+
SESSION_USAGE_LIMIT_SEGMENT,
|
|
11
|
+
formatSessionUsageMicros,
|
|
12
|
+
parseSessionUsageLimitReachedRefusal,
|
|
13
|
+
sessionUsageLimitReachedMessage
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=session-usage-limit-refusal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Per-task (root session) usage limits.
|
|
4
|
+
*
|
|
5
|
+
* One optional limit belongs to a root session and is shared by every
|
|
6
|
+
* descendant. It is measured in integer USD micros ($1 = 1,000,000) of the
|
|
7
|
+
* canonical pre-margin API-equivalent model cost (`estimatedProviderCostMicros`)
|
|
8
|
+
* recorded when a model response settles, whatever funds the call (Opengeni
|
|
9
|
+
* credits, a connected subscription or a workspace-owned key).
|
|
10
|
+
*
|
|
11
|
+
* The limit is checked before each new model request; it is not a reservation.
|
|
12
|
+
* Requests already admitted may finish and take recorded usage above the
|
|
13
|
+
* limit, and concurrently admitted requests may overshoot together. Usage
|
|
14
|
+
* without a known price is excluded from the total and disclosed as partial
|
|
15
|
+
* coverage instead of being valued at zero. It is not an invoice cap.
|
|
16
|
+
*/
|
|
17
|
+
/** Versioned measurement basis, exposed so a future basis cannot be confused with this one. */
|
|
18
|
+
export declare const SESSION_USAGE_LIMIT_BASIS: "model_api_equivalent_v1";
|
|
19
|
+
export declare const SessionUsageLimitBasis: z.ZodLiteral<"model_api_equivalent_v1">;
|
|
20
|
+
export type SessionUsageLimitBasis = z.infer<typeof SessionUsageLimitBasis>;
|
|
21
|
+
export declare const SESSION_USAGE_LIMIT_MICROS_PER_DOLLAR = 1000000;
|
|
22
|
+
/** $10M: the largest configurable limit, far inside safe integers. Usage itself is never clamped. */
|
|
23
|
+
export declare const SESSION_USAGE_LIMIT_MAX_MICROS: number;
|
|
24
|
+
/** A configured limit. Zero is a valid immediate stop; `null` (not this schema) means no limit. */
|
|
25
|
+
export declare const SessionUsageLimitMicros: z.ZodNumber;
|
|
26
|
+
export type SessionUsageLimitMicros = z.infer<typeof SessionUsageLimitMicros>;
|
|
27
|
+
/**
|
|
28
|
+
* - `unlimited`: no limit is configured; usage is still recorded.
|
|
29
|
+
* - `within`: a limit is configured and recorded usage is below it.
|
|
30
|
+
* - `reached`: recorded usage is at or above the limit; new model requests are refused.
|
|
31
|
+
* - `preparing`: historical usage for a task created before this feature is
|
|
32
|
+
* still being imported; the total is not yet meaningful and a new limit
|
|
33
|
+
* cannot be set until it finishes.
|
|
34
|
+
* - `unavailable`: the usage state could not be read. Never treat it as zero or unlimited.
|
|
35
|
+
*/
|
|
36
|
+
export declare const SessionUsageLimitStatus: z.ZodEnum<{
|
|
37
|
+
preparing: "preparing";
|
|
38
|
+
reached: "reached";
|
|
39
|
+
unavailable: "unavailable";
|
|
40
|
+
unlimited: "unlimited";
|
|
41
|
+
within: "within";
|
|
42
|
+
}>;
|
|
43
|
+
export type SessionUsageLimitStatus = z.infer<typeof SessionUsageLimitStatus>;
|
|
44
|
+
/**
|
|
45
|
+
* `complete`: every recorded model response of this task was metered live.
|
|
46
|
+
* `legacy_partial`: the task predates usage limits; available historical cost
|
|
47
|
+
* snapshots were imported, but older usage may be missing. This never upgrades
|
|
48
|
+
* to complete, because a missing old record is not proof of no usage.
|
|
49
|
+
* `preparing`: the historical import has not finished.
|
|
50
|
+
*/
|
|
51
|
+
export declare const SessionUsageLimitHistory: z.ZodEnum<{
|
|
52
|
+
complete: "complete";
|
|
53
|
+
legacy_partial: "legacy_partial";
|
|
54
|
+
preparing: "preparing";
|
|
55
|
+
}>;
|
|
56
|
+
export type SessionUsageLimitHistory = z.infer<typeof SessionUsageLimitHistory>;
|
|
57
|
+
export declare const SessionUsageLimit: z.ZodObject<{
|
|
58
|
+
basis: z.ZodLiteral<"model_api_equivalent_v1">;
|
|
59
|
+
rootSessionId: z.ZodString;
|
|
60
|
+
inherited: z.ZodBoolean;
|
|
61
|
+
status: z.ZodEnum<{
|
|
62
|
+
preparing: "preparing";
|
|
63
|
+
reached: "reached";
|
|
64
|
+
unavailable: "unavailable";
|
|
65
|
+
unlimited: "unlimited";
|
|
66
|
+
within: "within";
|
|
67
|
+
}>;
|
|
68
|
+
limitMicros: z.ZodNullable<z.ZodNumber>;
|
|
69
|
+
usedMicros: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
version: z.ZodNumber;
|
|
71
|
+
usageRevision: z.ZodNumber;
|
|
72
|
+
history: z.ZodEnum<{
|
|
73
|
+
complete: "complete";
|
|
74
|
+
legacy_partial: "legacy_partial";
|
|
75
|
+
preparing: "preparing";
|
|
76
|
+
}>;
|
|
77
|
+
coverage: z.ZodEnum<{
|
|
78
|
+
complete: "complete";
|
|
79
|
+
partial: "partial";
|
|
80
|
+
}>;
|
|
81
|
+
pricedCalls: z.ZodNumber;
|
|
82
|
+
freeCalls: z.ZodNumber;
|
|
83
|
+
unpricedCalls: z.ZodNumber;
|
|
84
|
+
updatedAt: z.ZodNullable<z.ZodString>;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
export type SessionUsageLimit = z.infer<typeof SessionUsageLimit>;
|
|
87
|
+
/**
|
|
88
|
+
* Compare-and-set write of a root task's limit. `expectedVersion` is the
|
|
89
|
+
* `version` the caller last read; a stale version returns 409. A replay of the
|
|
90
|
+
* same `operationId` with the same request returns the committed result.
|
|
91
|
+
*/
|
|
92
|
+
export declare const SetSessionUsageLimitRequest: z.ZodObject<{
|
|
93
|
+
limitMicros: z.ZodNullable<z.ZodNumber>;
|
|
94
|
+
expectedVersion: z.ZodNumber;
|
|
95
|
+
operationId: z.ZodString;
|
|
96
|
+
}, z.core.$strict>;
|
|
97
|
+
export type SetSessionUsageLimitRequest = z.infer<typeof SetSessionUsageLimitRequest>;
|
|
98
|
+
/** Typed refusal for a fresh model request, message or goal resume after the limit is reached. */
|
|
99
|
+
export declare const SessionUsageLimitReachedRefusal: z.ZodObject<{
|
|
100
|
+
code: z.ZodLiteral<"session_usage_limit_reached">;
|
|
101
|
+
basis: z.ZodLiteral<"model_api_equivalent_v1">;
|
|
102
|
+
rootSessionId: z.ZodString;
|
|
103
|
+
limitMicros: z.ZodNumber;
|
|
104
|
+
usedMicros: z.ZodNumber;
|
|
105
|
+
message: z.ZodString;
|
|
106
|
+
}, z.core.$strict>;
|
|
107
|
+
export type SessionUsageLimitReachedRefusal = z.infer<typeof SessionUsageLimitReachedRefusal>;
|
|
108
|
+
/** Typed error codes for the usage-limit routes. */
|
|
109
|
+
export declare const SessionUsageLimitErrorCode: z.ZodEnum<{
|
|
110
|
+
session_usage_limit_conflict: "session_usage_limit_conflict";
|
|
111
|
+
session_usage_limit_disabled: "session_usage_limit_disabled";
|
|
112
|
+
session_usage_limit_forbidden: "session_usage_limit_forbidden";
|
|
113
|
+
session_usage_limit_not_root: "session_usage_limit_not_root";
|
|
114
|
+
session_usage_limit_preparing: "session_usage_limit_preparing";
|
|
115
|
+
session_usage_limit_reached: "session_usage_limit_reached";
|
|
116
|
+
session_usage_limit_unavailable: "session_usage_limit_unavailable";
|
|
117
|
+
}>;
|
|
118
|
+
export type SessionUsageLimitErrorCode = z.infer<typeof SessionUsageLimitErrorCode>;
|
|
119
|
+
/** The durable event appended to a root's stream when an authorized person changes its limit. */
|
|
120
|
+
export declare const SessionUsageLimitUpdatedPayload: z.ZodObject<{
|
|
121
|
+
basis: z.ZodLiteral<"model_api_equivalent_v1">;
|
|
122
|
+
limitMicros: z.ZodNullable<z.ZodNumber>;
|
|
123
|
+
previousLimitMicros: z.ZodNullable<z.ZodNumber>;
|
|
124
|
+
version: z.ZodNumber;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
export type SessionUsageLimitUpdatedPayload = z.infer<typeof SessionUsageLimitUpdatedPayload>;
|
|
127
|
+
export { formatSessionUsageMicros, parseSessionUsageLimitReachedRefusal, SESSION_USAGE_LIMIT_SEGMENT, SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON, sessionUsageLimitReachedMessage, } from "./session-usage-limit-refusal.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SESSION_USAGE_LIMIT_BASIS,
|
|
3
|
+
SESSION_USAGE_LIMIT_MAX_MICROS,
|
|
4
|
+
SESSION_USAGE_LIMIT_MICROS_PER_DOLLAR,
|
|
5
|
+
SessionUsageLimit,
|
|
6
|
+
SessionUsageLimitBasis,
|
|
7
|
+
SessionUsageLimitErrorCode,
|
|
8
|
+
SessionUsageLimitHistory,
|
|
9
|
+
SessionUsageLimitMicros,
|
|
10
|
+
SessionUsageLimitReachedRefusal,
|
|
11
|
+
SessionUsageLimitStatus,
|
|
12
|
+
SessionUsageLimitUpdatedPayload,
|
|
13
|
+
SetSessionUsageLimitRequest
|
|
14
|
+
} from "./chunk-5RWB6QVL.js";
|
|
15
|
+
import "./chunk-AQYDZUJV.js";
|
|
16
|
+
import {
|
|
17
|
+
SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON,
|
|
18
|
+
SESSION_USAGE_LIMIT_SEGMENT,
|
|
19
|
+
formatSessionUsageMicros,
|
|
20
|
+
parseSessionUsageLimitReachedRefusal,
|
|
21
|
+
sessionUsageLimitReachedMessage
|
|
22
|
+
} from "./chunk-7272KVWZ.js";
|
|
23
|
+
import "./chunk-56SNIMDO.js";
|
|
24
|
+
export {
|
|
25
|
+
SESSION_USAGE_LIMIT_BASIS,
|
|
26
|
+
SESSION_USAGE_LIMIT_GOAL_PAUSED_REASON,
|
|
27
|
+
SESSION_USAGE_LIMIT_MAX_MICROS,
|
|
28
|
+
SESSION_USAGE_LIMIT_MICROS_PER_DOLLAR,
|
|
29
|
+
SESSION_USAGE_LIMIT_SEGMENT,
|
|
30
|
+
SessionUsageLimit,
|
|
31
|
+
SessionUsageLimitBasis,
|
|
32
|
+
SessionUsageLimitErrorCode,
|
|
33
|
+
SessionUsageLimitHistory,
|
|
34
|
+
SessionUsageLimitMicros,
|
|
35
|
+
SessionUsageLimitReachedRefusal,
|
|
36
|
+
SessionUsageLimitStatus,
|
|
37
|
+
SessionUsageLimitUpdatedPayload,
|
|
38
|
+
SetSessionUsageLimitRequest,
|
|
39
|
+
formatSessionUsageMicros,
|
|
40
|
+
parseSessionUsageLimitReachedRefusal,
|
|
41
|
+
sessionUsageLimitReachedMessage
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=session-usage-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|