@opengeni/contracts 5.5.0 → 5.5.2-canary.40656248492001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-authored-durable-text.d.ts +9 -9
- package/dist/agent-config.d.ts +148 -37
- package/dist/api-key-presets.d.ts +19 -0
- package/dist/app-action-catalog-types.d.ts +32 -0
- package/dist/app-action-catalog.gen.d.ts +2 -0
- package/dist/app-actions.d.ts +91 -0
- package/dist/app-actions.js +10130 -0
- package/dist/app-actions.js.map +1 -0
- package/dist/app-shot.d.ts +55 -0
- package/dist/artifact-catalog.d.ts +33 -0
- package/dist/artifacts.d.ts +166 -0
- package/dist/atlassian-native-retirement.d.ts +16 -0
- package/dist/atlassian-native-retirement.js +30 -0
- package/dist/atlassian-native-retirement.js.map +1 -0
- package/dist/atlassian.js +48 -23
- package/dist/automation-templates.d.ts +434 -0
- package/dist/automation-templates.js +31 -0
- package/dist/automation-templates.js.map +1 -0
- package/dist/billing-subscriptions.d.ts +61 -0
- package/dist/bots.d.ts +583 -0
- package/dist/bundled-skills.d.ts +58 -2
- package/dist/canonical-human-identities.js +3 -1
- package/dist/child-lifecycle-notice-protocol.d.ts +45 -0
- package/dist/chunk-2QKIEAGY.js +396 -0
- package/dist/chunk-2QKIEAGY.js.map +1 -0
- package/dist/chunk-2WOWEWXV.js +426 -0
- package/dist/chunk-2WOWEWXV.js.map +1 -0
- package/dist/chunk-2ZIHHL72.js +153 -0
- package/dist/chunk-2ZIHHL72.js.map +1 -0
- package/dist/chunk-32U6NKQQ.js +389 -0
- package/dist/chunk-32U6NKQQ.js.map +1 -0
- package/dist/chunk-4YDDHSO2.js +799 -0
- package/dist/chunk-4YDDHSO2.js.map +1 -0
- package/dist/chunk-56SNIMDO.js +9 -0
- package/dist/chunk-56SNIMDO.js.map +1 -0
- package/dist/chunk-5RWB6QVL.js +101 -0
- package/dist/chunk-5RWB6QVL.js.map +1 -0
- package/dist/chunk-5UGUOT3L.js +243 -0
- package/dist/chunk-5UGUOT3L.js.map +1 -0
- package/dist/chunk-6LAT33BH.js +130 -0
- package/dist/chunk-6LAT33BH.js.map +1 -0
- package/dist/chunk-7272KVWZ.js +60 -0
- package/dist/chunk-7272KVWZ.js.map +1 -0
- package/dist/chunk-72QC2GTL.js +36 -0
- package/dist/chunk-72QC2GTL.js.map +1 -0
- package/dist/chunk-7EQGGZBY.js +105 -0
- package/dist/chunk-7EQGGZBY.js.map +1 -0
- package/dist/chunk-A3LXWVYU.js +382 -0
- package/dist/chunk-A3LXWVYU.js.map +1 -0
- package/dist/chunk-AQYDZUJV.js +34 -0
- package/dist/chunk-AQYDZUJV.js.map +1 -0
- package/dist/chunk-BHCEVVUP.js +93 -0
- package/dist/chunk-BHCEVVUP.js.map +1 -0
- package/dist/chunk-BMUTAZX5.js +486 -0
- package/dist/chunk-BMUTAZX5.js.map +1 -0
- package/dist/chunk-DGG6IBBK.js +150 -0
- package/dist/chunk-DGG6IBBK.js.map +1 -0
- package/dist/{chunk-YBW5JSA3.js → chunk-FBCTUMHI.js} +123 -102
- package/dist/chunk-FBCTUMHI.js.map +1 -0
- package/dist/chunk-G2KJTFIC.js +97 -0
- package/dist/chunk-G2KJTFIC.js.map +1 -0
- package/dist/chunk-G4RKARXZ.js +1167 -0
- package/dist/chunk-G4RKARXZ.js.map +1 -0
- package/dist/chunk-H6UJJIUM.js +350 -0
- package/dist/chunk-H6UJJIUM.js.map +1 -0
- package/dist/chunk-JOTHDW4H.js +18 -0
- package/dist/chunk-JOTHDW4H.js.map +1 -0
- package/dist/chunk-L4GUEP7K.js +56480 -0
- package/dist/chunk-L4GUEP7K.js.map +1 -0
- package/dist/{chunk-SIOU2K4U.js → chunk-LJH2EYGT.js} +23 -23
- package/dist/chunk-MTJKSIGA.js +161 -0
- package/dist/chunk-MTJKSIGA.js.map +1 -0
- package/dist/chunk-MYHMB6GZ.js +202 -0
- package/dist/chunk-MYHMB6GZ.js.map +1 -0
- package/dist/chunk-PI5VIKJY.js +660 -0
- package/dist/chunk-PI5VIKJY.js.map +1 -0
- package/dist/{chunk-RIY7GYQS.js → chunk-PTSROVDG.js} +2 -2
- package/dist/chunk-PUIUXIOL.js +189 -0
- package/dist/chunk-PUIUXIOL.js.map +1 -0
- package/dist/chunk-R6VXJIMB.js +19 -0
- package/dist/chunk-R6VXJIMB.js.map +1 -0
- package/dist/chunk-RLJUNVAM.js +15 -0
- package/dist/chunk-RLJUNVAM.js.map +1 -0
- package/dist/chunk-RR6APCBK.js +213 -0
- package/dist/chunk-RR6APCBK.js.map +1 -0
- package/dist/{chunk-TXTQIYCV.js → chunk-RUQ4I6DO.js} +59 -13
- package/dist/chunk-RUQ4I6DO.js.map +1 -0
- package/dist/{chunk-WYBDERIY.js → chunk-RWEEUDHD.js} +53 -42
- package/dist/chunk-RWEEUDHD.js.map +1 -0
- package/dist/chunk-S7MSQQL6.js +158 -0
- package/dist/chunk-S7MSQQL6.js.map +1 -0
- package/dist/{chunk-5Q54VCCH.js → chunk-SHO4YO4B.js} +20 -36
- package/dist/chunk-SHO4YO4B.js.map +1 -0
- package/dist/{chunk-HHZSZYYF.js → chunk-T3HSWMA5.js} +20 -4
- package/dist/chunk-T3HSWMA5.js.map +1 -0
- package/dist/{chunk-YRKRZ6OF.js → chunk-TOOJIBJC.js} +2 -2
- package/dist/chunk-UCUOTRS6.js +431 -0
- package/dist/chunk-UCUOTRS6.js.map +1 -0
- package/dist/chunk-UH4K7GP7.js +424 -0
- package/dist/chunk-UH4K7GP7.js.map +1 -0
- package/dist/chunk-UIZWGPHV.js +120 -0
- package/dist/chunk-UIZWGPHV.js.map +1 -0
- package/dist/chunk-VLUKBV6Y.js +1170 -0
- package/dist/chunk-VLUKBV6Y.js.map +1 -0
- package/dist/chunk-W2QQ5Y6K.js +55 -0
- package/dist/chunk-W2QQ5Y6K.js.map +1 -0
- package/dist/{chunk-Y3KNXVTD.js → chunk-W3NBPR4E.js} +131 -31
- package/dist/chunk-W3NBPR4E.js.map +1 -0
- package/dist/{chunk-NRMCVHAU.js → chunk-WMGO4HJU.js} +11 -9
- package/dist/chunk-WMGO4HJU.js.map +1 -0
- package/dist/{chunk-MYBZRDTY.js → chunk-WQI7VNN4.js} +19 -9
- package/dist/chunk-WQI7VNN4.js.map +1 -0
- package/dist/{chunk-PX3VCKAU.js → chunk-WVCFSOUZ.js} +1 -1
- package/dist/{chunk-PX3VCKAU.js.map → chunk-WVCFSOUZ.js.map} +1 -1
- package/dist/chunk-XB6GQLBH.js +76 -0
- package/dist/chunk-XB6GQLBH.js.map +1 -0
- package/dist/{chunk-D2HKF2EF.js → chunk-XP5M3IKT.js} +2 -2
- package/dist/{chunk-O77VSFYZ.js → chunk-ZMPU5BWE.js} +12 -2
- package/dist/chunk-ZMPU5BWE.js.map +1 -0
- package/dist/{chunk-3SIZGL3O.js → chunk-ZYVEJFNU.js} +22 -18
- package/dist/chunk-ZYVEJFNU.js.map +1 -0
- package/dist/claude-provider-account-authority.d.ts +18 -0
- package/dist/claude-subscription-oauth.d.ts +25 -0
- package/dist/claude-subscription-usage.d.ts +95 -1
- package/dist/client-error-report.d.ts +154 -8
- package/dist/client-error-report.js +157 -2
- package/dist/client-error-report.js.map +1 -1
- package/dist/code-search.d.ts +1 -1
- package/dist/code-search.js.map +1 -1
- package/dist/codex-provider-account-authority.js +23 -12
- package/dist/codex-provider-account-authority.js.map +1 -1
- package/dist/company-profile.d.ts +144 -0
- package/dist/connect.d.ts +38 -0
- package/dist/connect.js +244 -164
- package/dist/connect.js.map +1 -1
- package/dist/connection-account-label.d.ts +2 -0
- package/dist/connection-account-label.js +34 -0
- package/dist/connection-account-label.js.map +1 -0
- package/dist/connection-authority.js +49 -24
- package/dist/connector-attachments.js +3 -1
- package/dist/connector-destinations.js +3 -1
- package/dist/connector-tool-permissions.d.ts +68 -4
- package/dist/credential-profiles.d.ts +166 -0
- package/dist/cua-desktop-tools.d.ts +19 -0
- package/dist/define-schema.d.ts +8 -0
- package/dist/desktop-app.d.ts +28 -0
- package/dist/direct-model-provider.d.ts +38 -0
- package/dist/document-artifact-commands.js +2 -2
- package/dist/document-artifact-query.js +2 -2
- package/dist/editable-artifact-binary.d.ts +7 -0
- package/dist/editable-artifact-causal-frontier.js +2 -2
- package/dist/editable-artifact-codec-registry.js +7 -7
- package/dist/editable-artifact-committed-transaction.js +4 -2
- package/dist/editable-artifact-live.js +8 -8
- package/dist/editable-artifact-serialized-commit.js +9 -9
- package/dist/editable-artifact-versions.d.ts +7 -1
- package/dist/editable-artifact-versions.js +1 -1
- package/dist/editable-artifacts.js +49 -43
- package/dist/event-preview.d.ts +22 -0
- package/dist/event-triggers.d.ts +1253 -0
- package/dist/event-triggers.js +148 -0
- package/dist/event-triggers.js.map +1 -0
- package/dist/external-identities.d.ts +34 -0
- package/dist/external-identities.js +4 -2
- package/dist/feedback.d.ts +181 -0
- package/dist/file-access.d.ts +23 -0
- package/dist/first-party-tool-authorization.d.ts +852 -0
- package/dist/github-repository-contracts.js +64 -43
- package/dist/github-repository-contracts.js.map +1 -1
- package/dist/google-drive-native-retirement.d.ts +12 -0
- package/dist/google-drive-native-retirement.js +20 -0
- package/dist/google-drive-native-retirement.js.map +1 -0
- package/dist/google-drive.d.ts +1 -1
- package/dist/google-drive.js +323 -239
- package/dist/google-drive.js.map +1 -1
- package/dist/host-mcp-bindings.js +250 -198
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/index.d.ts +29072 -20593
- package/dist/index.js +2432 -366
- package/dist/inference-residency.d.ts +22 -0
- package/dist/insights-usage.d.ts +948 -0
- package/dist/insights-usage.js +608 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/integration-capability-id.d.ts +8 -0
- package/dist/interaction-action-deadline.d.ts +48 -0
- package/dist/interaction-driver-diagnostic.d.ts +28 -0
- package/dist/interaction.d.ts +2126 -881
- package/dist/knowledge-entries.d.ts +38 -0
- package/dist/knowledge-preparation.d.ts +4 -0
- package/dist/learning-refusal.d.ts +43 -0
- package/dist/learning-refusal.js +49 -0
- package/dist/learning-refusal.js.map +1 -0
- package/dist/managed-auth-session-sets.d.ts +1 -0
- package/dist/managed-auth-session-sets.js +207 -146
- package/dist/managed-auth-session-sets.js.map +1 -1
- package/dist/managed-sign-in-methods.d.ts +96 -0
- package/dist/managed-sign-in-methods.js +157 -35
- package/dist/managed-sign-in-methods.js.map +1 -1
- package/dist/mcp-structured-content.d.ts +25 -0
- package/dist/message-time-zone.d.ts +38 -0
- package/dist/message-time-zone.js +19 -0
- package/dist/message-time-zone.js.map +1 -0
- package/dist/modal-native-proof-v2.d.ts +587 -0
- package/dist/modal-native-proof-v2.js +39 -0
- package/dist/modal-native-proof-v2.js.map +1 -0
- package/dist/model-account-choice.d.ts +237 -0
- package/dist/model-account-settings.d.ts +422 -0
- package/dist/model-availability.d.ts +15 -0
- package/dist/model-connection-access.d.ts +13 -0
- package/dist/model-context-inspector.d.ts +8 -0
- package/dist/model-display.d.ts +43 -0
- package/dist/model-display.js +17 -0
- package/dist/model-display.js.map +1 -0
- package/dist/model-picker-order.js.map +1 -1
- package/dist/model-residency.d.ts +304 -0
- package/dist/organization-access.d.ts +416 -0
- package/dist/organization-access.js +40 -0
- package/dist/organization-access.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +18 -0
- package/dist/organization-membership-lifecycle.d.ts +66 -0
- package/dist/organization-model-usage.d.ts +146 -0
- package/dist/organization-model-usage.js +87 -0
- package/dist/organization-model-usage.js.map +1 -0
- package/dist/organization-recovery.js +3 -1
- package/dist/organization-usage.d.ts +12 -0
- package/dist/passkey-only-account.d.ts +14 -0
- package/dist/passkey-only-account.js +13 -0
- package/dist/passkey-only-account.js.map +1 -0
- package/dist/permissions.d.ts +19 -0
- package/dist/personal-github.js +220 -148
- package/dist/personal-github.js.map +1 -1
- package/dist/personal-integration-setup.d.ts +81 -0
- package/dist/personal-integration-setup.js +42 -0
- package/dist/personal-integration-setup.js.map +1 -0
- package/dist/prepared-mcp-setup.d.ts +54 -0
- package/dist/prepared-mcp-setup.js +13 -0
- package/dist/prepared-mcp-setup.js.map +1 -0
- package/dist/presentation-artifact-commands.js +2 -2
- package/dist/presentation-artifact-query.js +2 -2
- package/dist/primitives.d.ts +18 -0
- package/dist/product-analytics.d.ts +27 -10
- package/dist/product-lifecycle-facts.d.ts +26 -3
- package/dist/prompt-cache-diagnostics.d.ts +92 -0
- package/dist/recordings.d.ts +1371 -0
- package/dist/remember.d.ts +98 -2
- package/dist/retained-output.d.ts +4 -2
- package/dist/sandbox-file-artifacts.d.ts +19 -2
- package/dist/sandbox-provider-command.d.ts +5 -44
- package/dist/sandbox-recovery.d.ts +139 -8
- package/dist/secret-generator.d.ts +44 -0
- package/dist/secret-mask-strings.d.ts +32 -0
- package/dist/secret-references.d.ts +90 -0
- package/dist/secret-resolution.d.ts +143 -0
- package/dist/secret-shape-masking.d.ts +52 -0
- package/dist/secret-shape-masking.js +19 -0
- package/dist/secret-shape-masking.js.map +1 -0
- package/dist/secret-totp.d.ts +41 -0
- package/dist/secret-use-approval-question.d.ts +11 -0
- package/dist/secret-use-approval-question.js +11 -0
- package/dist/secret-use-approval-question.js.map +1 -0
- package/dist/secret-use-approvals.d.ts +106 -0
- package/dist/secret-value-masking.d.ts +299 -0
- package/dist/secret-value-masking.js +62 -0
- package/dist/secret-value-masking.js.map +1 -0
- package/dist/secret-value.d.ts +19 -0
- package/dist/session-history-import.d.ts +444 -8
- package/dist/session-history.d.ts +111 -0
- package/dist/session-history.js +35 -0
- package/dist/session-history.js.map +1 -0
- package/dist/session-list-entries.d.ts +8 -0
- package/dist/session-list-entries.js +61 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-mcp-projections.d.ts +13 -1
- package/dist/session-mcp-tool-permissions.d.ts +62 -0
- package/dist/session-target.d.ts +18 -0
- package/dist/session-titles.d.ts +8 -0
- package/dist/session-titles.js +5 -1
- package/dist/session-usage-limit-refusal.d.ts +34 -0
- package/dist/session-usage-limit-refusal.js +15 -0
- package/dist/session-usage-limit-refusal.js.map +1 -0
- package/dist/session-usage-limits.d.ts +127 -0
- package/dist/session-usage-limits.js +43 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/site-data.d.ts +286 -0
- package/dist/site-operations.d.ts +39 -0
- package/dist/site-publishing.d.ts +813 -0
- package/dist/site-session-http.d.ts +103 -4
- package/dist/site-session-http.js +27 -1
- package/dist/site-sql.d.ts +425 -0
- package/dist/skills.d.ts +38 -0
- package/dist/slack-bot-scopes.d.ts +9 -7
- package/dist/slack-bot-scopes.js +6 -3
- package/dist/slack-rest-mcp.d.ts +36 -0
- package/dist/slack-rest-mcp.js +25 -0
- package/dist/slack-rest-mcp.js.map +1 -0
- package/dist/spreadsheet-artifact-commands.d.ts +14 -1
- package/dist/spreadsheet-artifact-commands.js +9 -2
- package/dist/spreadsheet-artifact-query.d.ts +13 -6
- package/dist/spreadsheet-artifact-query.js +4 -3
- package/dist/subscription-account-actions.d.ts +83 -0
- package/dist/subscription-account-pools.d.ts +326 -0
- package/dist/subscription-personal-authority-v2.d.ts +28 -0
- package/dist/subscription-personal-authority-v2.js +13 -0
- package/dist/subscription-personal-authority-v2.js.map +1 -0
- package/dist/subscription-plans.d.ts +38 -0
- package/dist/subscription-usage-pool.d.ts +89 -0
- package/dist/tool-action-review.d.ts +141 -0
- package/dist/tool-catalog.d.ts +479 -0
- package/dist/tool-policy.d.ts +5 -0
- package/dist/tool-review-presentation.d.ts +29 -0
- package/dist/tool-review-presentation.js +21 -0
- package/dist/tool-review-presentation.js.map +1 -0
- package/dist/turn-serving-policy.d.ts +223 -0
- package/dist/usage-allowances.d.ts +30 -0
- package/dist/usage-allowances.js +5 -1
- package/dist/values.d.ts +11 -0
- package/dist/values.js +19 -0
- package/dist/values.js.map +1 -0
- package/dist/vault-provider-wire.d.ts +907 -0
- package/dist/vault-provider-wire.js +74 -0
- package/dist/vault-provider-wire.js.map +1 -0
- package/dist/vaults.d.ts +2185 -0
- package/dist/video-generation.d.ts +75 -0
- package/dist/video-generation.js +8 -1
- package/dist/workspace-control-event.d.ts +18 -0
- package/dist/workspace-control-event.js +18 -0
- package/dist/workspace-control-event.js.map +1 -0
- package/dist/workspace-governance-context.d.ts +18 -0
- package/dist/workspace-integration-wire.d.ts +1 -1
- package/dist/workspace-integration-wire.js +1 -1
- package/dist/workspace-integrations.d.ts +212 -12
- package/dist/xai-provider-account-authority.js +3 -1
- package/package.json +121 -4
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +382 -203
- package/src/agent-instruction-changes.ts +94 -74
- package/src/agent-learning.ts +94 -66
- package/src/agent-topology.ts +58 -52
- package/src/api-key-presets.ts +28 -0
- package/src/app-action-catalog-types.ts +32 -0
- package/src/app-action-catalog.gen.ts +9905 -0
- package/src/app-actions.ts +365 -0
- package/src/app-shot.ts +176 -0
- package/src/artifact-catalog.ts +81 -46
- package/src/artifacts.ts +360 -227
- package/src/atlassian-native-retirement.ts +33 -0
- package/src/atlassian.ts +136 -108
- package/src/automation-templates.ts +201 -0
- package/src/billing-subscriptions.ts +48 -0
- package/src/bots.ts +238 -0
- package/src/bundled-skills.ts +79 -22
- package/src/canonical-human-identities.ts +65 -62
- package/src/child-lifecycle-notice-protocol.gen.json +1310 -0
- package/src/child-lifecycle-notice-protocol.ts +224 -0
- package/src/claude-provider-account-authority.ts +12 -0
- package/src/claude-subscription-oauth.ts +61 -19
- package/src/claude-subscription-usage.ts +64 -35
- package/src/client-error-report.ts +344 -9
- package/src/code-search.ts +1 -1
- package/src/codex-provider-account-authority.ts +22 -16
- package/src/company-brain-governed-writes.ts +265 -244
- package/src/company-brain.ts +165 -154
- package/src/company-profile.ts +362 -297
- package/src/connect.ts +222 -173
- package/src/connection-account-label.ts +45 -0
- package/src/connection-authority.ts +172 -152
- package/src/connector-attachments.ts +139 -123
- package/src/connector-destinations.ts +48 -43
- package/src/connector-tool-permissions.ts +104 -46
- package/src/credential-profiles.ts +161 -0
- package/src/cua-desktop-tools.gen.json +6722 -0
- package/src/cua-desktop-tools.linux.gen.json +6798 -0
- package/src/cua-desktop-tools.ts +42 -0
- package/src/cua-desktop-tools.windows.gen.json +6739 -0
- package/src/define-schema.ts +10 -0
- package/src/desktop-app.ts +50 -0
- package/src/direct-model-provider.ts +112 -0
- package/src/editable-artifact-binary.ts +29 -8
- package/src/editable-artifact-committed-transaction.ts +19 -18
- package/src/editable-artifact-serialized-commit.ts +8 -2
- package/src/editable-artifact-versions.ts +7 -1
- package/src/event-preview.ts +53 -3
- package/src/event-triggers.ts +891 -0
- package/src/external-identities.ts +239 -195
- package/src/feedback.ts +125 -30
- package/src/file-access.ts +26 -0
- package/src/first-party-tool-authorization.ts +383 -0
- package/src/github-repository-contracts.ts +78 -64
- package/src/google-drive-native-retirement.ts +20 -0
- package/src/google-drive.ts +286 -234
- package/src/governed-learning-activation.ts +159 -137
- package/src/governed-learning-evaluator.ts +141 -133
- package/src/host-mcp-bindings.ts +244 -221
- package/src/image-generation.ts +105 -95
- package/src/index.ts +13928 -9899
- package/src/inference-residency.ts +36 -0
- package/src/insights-usage.ts +774 -0
- package/src/integration-capability-id.ts +16 -0
- package/src/interaction-action-deadline.ts +143 -0
- package/src/interaction-driver-diagnostic.ts +89 -0
- package/src/interaction.ts +3527 -2427
- package/src/knowledge-entries.ts +386 -299
- package/src/knowledge-preparation.ts +49 -41
- package/src/knowledge.ts +242 -213
- package/src/learning-refusal.ts +90 -0
- package/src/managed-auth-session-sets.ts +180 -133
- package/src/managed-sign-in-methods.ts +156 -34
- package/src/mcp-oauth.ts +58 -46
- package/src/mcp-receipts.ts +199 -194
- package/src/mcp-structured-content.ts +81 -0
- package/src/memory-slack-delivery.ts +172 -142
- package/src/message-time-zone.ts +109 -0
- package/src/modal-native-proof-v2.ts +430 -0
- package/src/model-account-choice.ts +178 -0
- package/src/model-account-settings.ts +210 -0
- package/src/model-availability.ts +22 -0
- package/src/model-connection-access.ts +62 -14
- package/src/model-context-inspector.ts +130 -109
- package/src/model-display.ts +221 -0
- package/src/model-picker-order.ts +1 -1
- package/src/model-residency.ts +535 -0
- package/src/organization-access.ts +216 -0
- package/src/organization-integration-policy.ts +47 -28
- package/src/organization-membership-lifecycle.ts +558 -384
- package/src/organization-model-usage.ts +82 -0
- package/src/organization-recovery.ts +148 -135
- package/src/organization-usage.ts +84 -52
- package/src/passkey-only-account.ts +29 -0
- package/src/permissions.ts +94 -52
- package/src/personal-github.ts +211 -171
- package/src/personal-integration-setup.ts +150 -0
- package/src/preference-registry.ts +319 -263
- package/src/prepared-mcp-setup.ts +190 -0
- package/src/primitives.ts +22 -0
- package/src/product-analytics.ts +40 -15
- package/src/product-lifecycle-facts.ts +50 -20
- package/src/prompt-cache-diagnostics.ts +212 -0
- package/src/recordings.ts +1153 -0
- package/src/remember.ts +184 -172
- package/src/retained-output.ts +181 -168
- package/src/sandbox-file-artifacts.ts +78 -57
- package/src/sandbox-provider-command.ts +55 -72
- package/src/sandbox-recovery.ts +163 -77
- package/src/scoped-knowledge.ts +62 -43
- package/src/secret-generator.ts +156 -0
- package/src/secret-mask-strings.ts +175 -0
- package/src/secret-references.ts +414 -0
- package/src/secret-resolution.ts +322 -0
- package/src/secret-shape-masking.ts +573 -0
- package/src/secret-totp.ts +188 -0
- package/src/secret-use-approval-question.ts +22 -0
- package/src/secret-use-approvals.ts +219 -0
- package/src/secret-value-masking.ts +1283 -0
- package/src/secret-value.ts +22 -0
- package/src/session-goal-reports.ts +55 -49
- package/src/session-history-import.ts +84 -68
- package/src/session-history.ts +197 -0
- package/src/session-list-entries.ts +106 -0
- package/src/session-mcp-projections.ts +21 -3
- package/src/session-mcp-tool-permissions.ts +109 -0
- package/src/session-message-search.ts +46 -38
- package/src/session-target.ts +58 -0
- package/src/session-titles.ts +40 -4
- package/src/session-topology-primitives.ts +20 -12
- package/src/session-usage-limit-refusal.ts +101 -0
- package/src/session-usage-limits.ts +169 -0
- package/src/signup-attribution.ts +20 -15
- package/src/site-data.ts +337 -0
- package/src/site-operations.ts +154 -0
- package/src/site-publishing.ts +903 -0
- package/src/site-session-http.ts +344 -16
- package/src/site-sql.ts +1120 -0
- package/src/skill-use.ts +18 -17
- package/src/skills.ts +105 -50
- package/src/slack-bot-scopes.ts +18 -35
- package/src/slack-rest-mcp.ts +222 -0
- package/src/slack-task-policy.ts +97 -73
- package/src/spreadsheet-artifact-commands.ts +74 -13
- package/src/spreadsheet-artifact-query.ts +188 -50
- package/src/subscription-account-actions.ts +103 -0
- package/src/subscription-account-pools.ts +74 -0
- package/src/subscription-personal-authority-v2.ts +69 -0
- package/src/subscription-plans.ts +51 -0
- package/src/subscription-usage-pool.ts +44 -0
- package/src/task-notes.ts +70 -68
- package/src/tool-action-review.ts +271 -0
- package/src/tool-catalog.ts +694 -379
- package/src/tool-policy.ts +82 -0
- package/src/tool-result-spill.ts +13 -9
- package/src/tool-review-presentation.ts +643 -0
- package/src/turn-serving-policy.ts +167 -0
- package/src/usage-allowances.ts +212 -136
- package/src/values.ts +25 -0
- package/src/vault-provider-wire.ts +580 -0
- package/src/vaults.ts +1296 -0
- package/src/video-generation.ts +430 -361
- package/src/work-claims.ts +183 -166
- package/src/workspace-control-event.ts +134 -0
- package/src/workspace-governance-context.ts +63 -0
- package/src/workspace-instruction-policies.ts +346 -279
- package/src/workspace-integration-wire.ts +10 -0
- package/src/workspace-integrations.ts +488 -398
- package/src/workspace-learning-administration.ts +58 -44
- package/src/workspace-learning-policy.ts +126 -99
- package/src/workspace-state.ts +239 -220
- package/src/xai-provider-account-authority.ts +23 -17
- package/dist/chunk-3SIZGL3O.js.map +0 -1
- package/dist/chunk-566IFOVP.js +0 -26133
- package/dist/chunk-566IFOVP.js.map +0 -1
- package/dist/chunk-5IXYF6XN.js +0 -728
- package/dist/chunk-5IXYF6XN.js.map +0 -1
- package/dist/chunk-5Q54VCCH.js.map +0 -1
- package/dist/chunk-BCS7WHCK.js +0 -139
- package/dist/chunk-BCS7WHCK.js.map +0 -1
- package/dist/chunk-EK7NDGFR.js +0 -128
- package/dist/chunk-EK7NDGFR.js.map +0 -1
- package/dist/chunk-GRG7PHWQ.js +0 -25
- package/dist/chunk-GRG7PHWQ.js.map +0 -1
- package/dist/chunk-HHZSZYYF.js.map +0 -1
- package/dist/chunk-ICDZGUX2.js +0 -186
- package/dist/chunk-ICDZGUX2.js.map +0 -1
- package/dist/chunk-JUFK3T4Q.js +0 -80
- package/dist/chunk-JUFK3T4Q.js.map +0 -1
- package/dist/chunk-MYBZRDTY.js.map +0 -1
- package/dist/chunk-NRMCVHAU.js.map +0 -1
- package/dist/chunk-O77VSFYZ.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-TXTQIYCV.js.map +0 -1
- package/dist/chunk-WYBDERIY.js.map +0 -1
- package/dist/chunk-Y3KNXVTD.js.map +0 -1
- package/dist/chunk-YBW5JSA3.js.map +0 -1
- package/dist/chunk-YRXAWWCU.js +0 -45
- package/dist/chunk-YRXAWWCU.js.map +0 -1
- package/dist/chunk-YWMOIZ6A.js +0 -185
- package/dist/chunk-YWMOIZ6A.js.map +0 -1
- package/dist/site-request-headers.test.d.ts +0 -1
- package/dist/transcription-recordings.d.ts +0 -300
- package/src/transcription-recordings.ts +0 -169
- /package/dist/{chunk-SIOU2K4U.js.map → chunk-LJH2EYGT.js.map} +0 -0
- /package/dist/{chunk-RIY7GYQS.js.map → chunk-PTSROVDG.js.map} +0 -0
- /package/dist/{chunk-YRKRZ6OF.js.map → chunk-TOOJIBJC.js.map} +0 -0
- /package/dist/{chunk-D2HKF2EF.js.map → chunk-XP5M3IKT.js.map} +0 -0
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { spreadsheetSheetId, type EditableArtifactStableId } from "./spreadsheet-artifact-commands";
|
|
2
|
+
import { fnv1a64 } from "./editable-artifact-binary";
|
|
2
3
|
import {
|
|
3
4
|
canonicalSpreadsheetDateFromMilliseconds,
|
|
4
5
|
canonicalSpreadsheetDateMilliseconds,
|
|
5
6
|
} from "./spreadsheet-artifact-date";
|
|
7
|
+
import {
|
|
8
|
+
SPREADSHEET_DEFAULT_ROW_HEIGHT,
|
|
9
|
+
SPREADSHEET_DEFAULT_COLUMN_WIDTH,
|
|
10
|
+
SPREADSHEET_MAX_DIMENSION_PIXELS,
|
|
11
|
+
} from "./spreadsheet-artifact-commands";
|
|
6
12
|
|
|
7
13
|
/** Canonical private kernel query/projection ABI shared by browser and native bindings. */
|
|
8
14
|
export const SPREADSHEET_ARTIFACT_QUERY_VERSION = 1 as const;
|
|
@@ -24,10 +30,23 @@ const VIEWPORT_QUERY_PAYLOAD_BYTES = 32;
|
|
|
24
30
|
const VIEWPORT_PROJECTION_PREFIX_BYTES = 48;
|
|
25
31
|
const METADATA_PROJECTION_PREFIX_BYTES = 4;
|
|
26
32
|
const GENERATIONS_FLAG = 1;
|
|
33
|
+
const DIMENSIONS_FLAG = 2;
|
|
34
|
+
const DIMENSION_KEYS = [
|
|
35
|
+
"defaultRowHeight",
|
|
36
|
+
"defaultColumnWidth",
|
|
37
|
+
"rowHeights",
|
|
38
|
+
"columnWidths",
|
|
39
|
+
] as const;
|
|
40
|
+
|
|
41
|
+
/** Sparse absolute zero-based indices; omitted only in pre-dimension private projections. */
|
|
42
|
+
export type SpreadsheetArtifactDimensions = Readonly<{
|
|
43
|
+
defaultRowHeight?: number;
|
|
44
|
+
defaultColumnWidth?: number;
|
|
45
|
+
rowHeights?: readonly (readonly [number, number])[];
|
|
46
|
+
columnWidths?: readonly (readonly [number, number])[];
|
|
47
|
+
}>;
|
|
27
48
|
const UINT32_MAX = 0xffff_ffff;
|
|
28
49
|
const UINT64_MAX = 0xffff_ffff_ffff_ffffn;
|
|
29
|
-
const FNV_OFFSET = 0xcbf29ce484222325n;
|
|
30
|
-
const FNV_PRIME = 0x100000001b3n;
|
|
31
50
|
const textEncoder = new TextEncoder();
|
|
32
51
|
const textDecoder = new TextDecoder("utf-8", { fatal: true });
|
|
33
52
|
|
|
@@ -85,16 +104,17 @@ export type SpreadsheetArtifactProjectedCell = Readonly<{
|
|
|
85
104
|
}>;
|
|
86
105
|
|
|
87
106
|
/** Complete and non-truncated. A limit breach is an error, never a partial response. */
|
|
88
|
-
export type SpreadsheetArtifactViewportProjection =
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
107
|
+
export type SpreadsheetArtifactViewportProjection = SpreadsheetArtifactDimensions &
|
|
108
|
+
Readonly<{
|
|
109
|
+
revision: bigint;
|
|
110
|
+
sheetId: EditableArtifactStableId;
|
|
111
|
+
generationId: EditableArtifactStableId | null;
|
|
112
|
+
startRow: number;
|
|
113
|
+
startColumn: number;
|
|
114
|
+
rowCount: number;
|
|
115
|
+
columnCount: number;
|
|
116
|
+
cells: readonly SpreadsheetArtifactProjectedCell[];
|
|
117
|
+
}>;
|
|
98
118
|
|
|
99
119
|
export type SpreadsheetArtifactUsedBounds = Readonly<{
|
|
100
120
|
startRow: number;
|
|
@@ -103,20 +123,21 @@ export type SpreadsheetArtifactUsedBounds = Readonly<{
|
|
|
103
123
|
endColumn: number;
|
|
104
124
|
}>;
|
|
105
125
|
|
|
106
|
-
export type SpreadsheetArtifactSheetMetadata =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
126
|
+
export type SpreadsheetArtifactSheetMetadata = SpreadsheetArtifactDimensions &
|
|
127
|
+
Readonly<{
|
|
128
|
+
sheetId: EditableArtifactStableId;
|
|
129
|
+
generationId: EditableArtifactStableId | null;
|
|
130
|
+
name: string;
|
|
131
|
+
usedBounds: SpreadsheetArtifactUsedBounds | null;
|
|
132
|
+
}>;
|
|
112
133
|
|
|
113
134
|
/**
|
|
114
|
-
*
|
|
115
|
-
* merges
|
|
116
|
-
*
|
|
135
|
+
* Dimensions are carried under the explicit dimensions flag. Hidden state,
|
|
136
|
+
* merges and styles remain unsupported. Pre-dimension private projections
|
|
137
|
+
* carry dimensions=false and round-trip without inventing geometry.
|
|
117
138
|
*/
|
|
118
139
|
export type SpreadsheetArtifactModeledFeatures = Readonly<{
|
|
119
|
-
dimensions:
|
|
140
|
+
dimensions: boolean;
|
|
120
141
|
hidden: false;
|
|
121
142
|
merges: false;
|
|
122
143
|
}>;
|
|
@@ -232,6 +253,8 @@ export function encodeSpreadsheetViewportKernelProjection(
|
|
|
232
253
|
payload.u32(projection.startColumn);
|
|
233
254
|
payload.u32(projection.rowCount);
|
|
234
255
|
payload.u32(projection.columnCount);
|
|
256
|
+
const hasDimensions = projection.defaultRowHeight !== undefined;
|
|
257
|
+
if (hasDimensions) writeDimensions(payload, projection);
|
|
235
258
|
for (const cell of projection.cells) {
|
|
236
259
|
payload.u32(cell.row - projection.startRow);
|
|
237
260
|
payload.u32(cell.column - projection.startColumn);
|
|
@@ -240,7 +263,8 @@ export function encodeSpreadsheetViewportKernelProjection(
|
|
|
240
263
|
return encodeProjectionFrame(
|
|
241
264
|
0,
|
|
242
265
|
projection.revision,
|
|
243
|
-
projection.generationId === null ? 0 : GENERATIONS_FLAG
|
|
266
|
+
(projection.generationId === null ? 0 : GENERATIONS_FLAG) |
|
|
267
|
+
(hasDimensions ? DIMENSIONS_FLAG : 0),
|
|
244
268
|
projection.cells.length,
|
|
245
269
|
payload.finish(),
|
|
246
270
|
maximum,
|
|
@@ -257,7 +281,7 @@ export function encodeSpreadsheetMetadataKernelProjection(
|
|
|
257
281
|
SPREADSHEET_ARTIFACT_METADATA_MIN_RESPONSE_BYTES,
|
|
258
282
|
);
|
|
259
283
|
const payload = new DynamicWriter(maximum - PROJECTION_HEADER_BYTES - CHECKSUM_BYTES);
|
|
260
|
-
payload.u32(0);
|
|
284
|
+
payload.u32(projection.modeledFeatures.dimensions ? 1 : 0);
|
|
261
285
|
for (const sheet of projection.sheets) {
|
|
262
286
|
payload.stableId(sheet.sheetId);
|
|
263
287
|
payload.optionalStableId(sheet.generationId);
|
|
@@ -271,12 +295,14 @@ export function encodeSpreadsheetMetadataKernelProjection(
|
|
|
271
295
|
payload.u32(sheet.usedBounds.endRow);
|
|
272
296
|
payload.u32(sheet.usedBounds.endColumn);
|
|
273
297
|
}
|
|
298
|
+
if (projection.modeledFeatures.dimensions) writeDimensions(payload, sheet);
|
|
274
299
|
}
|
|
275
300
|
const generations = projection.sheets.length > 0 && projection.sheets[0]!.generationId !== null;
|
|
276
301
|
return encodeProjectionFrame(
|
|
277
302
|
1,
|
|
278
303
|
projection.revision,
|
|
279
|
-
generations ? GENERATIONS_FLAG : 0
|
|
304
|
+
(generations ? GENERATIONS_FLAG : 0) |
|
|
305
|
+
(projection.modeledFeatures.dimensions ? DIMENSIONS_FLAG : 0),
|
|
280
306
|
projection.sheets.length,
|
|
281
307
|
payload.finish(),
|
|
282
308
|
maximum,
|
|
@@ -498,7 +524,7 @@ function decodeProjectionFrame(bytes: Uint8Array): ProjectionFrame {
|
|
|
498
524
|
throw projectionError(`unsupported spreadsheet projection version: ${version}`);
|
|
499
525
|
}
|
|
500
526
|
const flags = reader.u16();
|
|
501
|
-
if ((flags & ~GENERATIONS_FLAG) !== 0) {
|
|
527
|
+
if ((flags & ~(GENERATIONS_FLAG | DIMENSIONS_FLAG)) !== 0) {
|
|
502
528
|
throw projectionError("spreadsheet projection flags are noncanonical");
|
|
503
529
|
}
|
|
504
530
|
const kindTag = reader.u8();
|
|
@@ -549,6 +575,8 @@ function decodeViewportPayload(frame: ProjectionFrame): SpreadsheetArtifactViewp
|
|
|
549
575
|
const rowCount = reader.u32();
|
|
550
576
|
const columnCount = reader.u32();
|
|
551
577
|
validateViewportGeometry(startRow, startColumn, rowCount, columnCount);
|
|
578
|
+
const dimensions = (frame.flags & DIMENSIONS_FLAG) !== 0 ? readDimensions(reader) : {};
|
|
579
|
+
validateDimensionExtent(dimensions, startRow, rowCount, startColumn, columnCount);
|
|
552
580
|
const cells: SpreadsheetArtifactProjectedCell[] = [];
|
|
553
581
|
let previousOrdinal = -1;
|
|
554
582
|
for (let index = 0; index < frame.itemCount; index += 1) {
|
|
@@ -579,6 +607,7 @@ function decodeViewportPayload(frame: ProjectionFrame): SpreadsheetArtifactViewp
|
|
|
579
607
|
reader.done("viewport projection payload contains trailing bytes");
|
|
580
608
|
return Object.freeze({
|
|
581
609
|
revision: frame.revision,
|
|
610
|
+
...dimensions,
|
|
582
611
|
sheetId,
|
|
583
612
|
generationId,
|
|
584
613
|
startRow,
|
|
@@ -597,7 +626,8 @@ function decodeMetadataPayload(frame: ProjectionFrame): SpreadsheetArtifactMetad
|
|
|
597
626
|
throw projectionError("metadata projection payload is truncated");
|
|
598
627
|
}
|
|
599
628
|
const reader = new Reader(frame.payload);
|
|
600
|
-
|
|
629
|
+
const features = reader.u32();
|
|
630
|
+
if ((features & ~1) !== 0 || (features === 1) !== ((frame.flags & DIMENSIONS_FLAG) !== 0)) {
|
|
601
631
|
throw projectionError("metadata projection contains unknown modeled feature bits");
|
|
602
632
|
}
|
|
603
633
|
const hasGenerations = (frame.flags & GENERATIONS_FLAG) !== 0;
|
|
@@ -631,12 +661,13 @@ function decodeMetadataPayload(frame: ProjectionFrame): SpreadsheetArtifactMetad
|
|
|
631
661
|
}
|
|
632
662
|
usedBounds = Object.freeze({ startRow, startColumn, endRow, endColumn });
|
|
633
663
|
}
|
|
634
|
-
|
|
664
|
+
const dimensions = (frame.flags & DIMENSIONS_FLAG) !== 0 ? readDimensions(reader) : {};
|
|
665
|
+
sheets.push(Object.freeze({ sheetId, generationId, name, usedBounds, ...dimensions }));
|
|
635
666
|
}
|
|
636
667
|
reader.done("metadata projection payload contains trailing bytes");
|
|
637
668
|
return Object.freeze({
|
|
638
669
|
revision: frame.revision,
|
|
639
|
-
modeledFeatures:
|
|
670
|
+
modeledFeatures: Object.freeze({ dimensions: features === 1, hidden: false, merges: false }),
|
|
640
671
|
sheets: Object.freeze(sheets),
|
|
641
672
|
});
|
|
642
673
|
}
|
|
@@ -694,7 +725,8 @@ function normalizeViewportProjection(input: unknown): SpreadsheetArtifactViewpor
|
|
|
694
725
|
"sheetId",
|
|
695
726
|
"startColumn",
|
|
696
727
|
"startRow",
|
|
697
|
-
|
|
728
|
+
...(projection.defaultRowHeight === undefined ? [] : DIMENSION_KEYS),
|
|
729
|
+
].sort(),
|
|
698
730
|
"spreadsheet viewport projection",
|
|
699
731
|
);
|
|
700
732
|
const revision = uint64(projection.revision, "viewport revision");
|
|
@@ -705,6 +737,9 @@ function normalizeViewportProjection(input: unknown): SpreadsheetArtifactViewpor
|
|
|
705
737
|
const rowCount = positiveUint32(projection.rowCount, "viewport rowCount");
|
|
706
738
|
const columnCount = positiveUint32(projection.columnCount, "viewport columnCount");
|
|
707
739
|
validateViewportGeometry(startRow, startColumn, rowCount, columnCount);
|
|
740
|
+
const dimensions =
|
|
741
|
+
projection.defaultRowHeight === undefined ? {} : normalizeDimensions(projection);
|
|
742
|
+
validateDimensionExtent(dimensions, startRow, rowCount, startColumn, columnCount);
|
|
708
743
|
if (!Array.isArray(projection.cells)) throw projectionError("viewport cells must be an array");
|
|
709
744
|
if (projection.cells.length > SPREADSHEET_ARTIFACT_VIEWPORT_MAX_CELLS) {
|
|
710
745
|
throw projectionError("viewport projection exceeds its hard cell limit");
|
|
@@ -733,6 +768,7 @@ function normalizeViewportProjection(input: unknown): SpreadsheetArtifactViewpor
|
|
|
733
768
|
}
|
|
734
769
|
return Object.freeze({
|
|
735
770
|
revision,
|
|
771
|
+
...dimensions,
|
|
736
772
|
sheetId,
|
|
737
773
|
generationId,
|
|
738
774
|
startRow,
|
|
@@ -753,8 +789,12 @@ function normalizeMetadataProjection(input: unknown): SpreadsheetArtifactMetadat
|
|
|
753
789
|
const revision = uint64(projection.revision, "metadata revision");
|
|
754
790
|
const features = exactRecord(projection.modeledFeatures, "metadata modeledFeatures");
|
|
755
791
|
exactKeys(features, ["dimensions", "hidden", "merges"], "metadata modeledFeatures");
|
|
756
|
-
if (
|
|
757
|
-
|
|
792
|
+
if (
|
|
793
|
+
typeof features.dimensions !== "boolean" ||
|
|
794
|
+
features.hidden !== false ||
|
|
795
|
+
features.merges !== false
|
|
796
|
+
) {
|
|
797
|
+
throw projectionError("metadata modeled features are invalid");
|
|
758
798
|
}
|
|
759
799
|
if (!Array.isArray(projection.sheets)) throw projectionError("metadata sheets must be an array");
|
|
760
800
|
if (projection.sheets.length > SPREADSHEET_ARTIFACT_METADATA_MAX_SHEETS) {
|
|
@@ -769,7 +809,17 @@ function normalizeMetadataProjection(input: unknown): SpreadsheetArtifactMetadat
|
|
|
769
809
|
ownArrayElement(projection.sheets, index, "metadata sheets"),
|
|
770
810
|
"metadata sheet",
|
|
771
811
|
);
|
|
772
|
-
exactKeys(
|
|
812
|
+
exactKeys(
|
|
813
|
+
value,
|
|
814
|
+
[
|
|
815
|
+
"generationId",
|
|
816
|
+
"name",
|
|
817
|
+
"sheetId",
|
|
818
|
+
"usedBounds",
|
|
819
|
+
...(features.dimensions ? DIMENSION_KEYS : []),
|
|
820
|
+
].sort(),
|
|
821
|
+
"metadata sheet",
|
|
822
|
+
);
|
|
773
823
|
const sheetId = spreadsheetSheetId(requireString(value.sheetId, "metadata sheetId"));
|
|
774
824
|
if (ids.has(sheetId)) throw projectionError("metadata projection contains duplicate sheet ids");
|
|
775
825
|
ids.add(sheetId);
|
|
@@ -789,15 +839,118 @@ function normalizeMetadataProjection(input: unknown): SpreadsheetArtifactMetadat
|
|
|
789
839
|
}
|
|
790
840
|
names.add(foldedName);
|
|
791
841
|
const usedBounds = value.usedBounds === null ? null : normalizeUsedBounds(value.usedBounds);
|
|
792
|
-
sheets.push(
|
|
842
|
+
sheets.push(
|
|
843
|
+
Object.freeze({
|
|
844
|
+
sheetId,
|
|
845
|
+
generationId,
|
|
846
|
+
name,
|
|
847
|
+
usedBounds,
|
|
848
|
+
...(features.dimensions ? normalizeDimensions(value) : {}),
|
|
849
|
+
}),
|
|
850
|
+
);
|
|
793
851
|
}
|
|
794
852
|
return Object.freeze({
|
|
795
853
|
revision,
|
|
796
|
-
modeledFeatures:
|
|
854
|
+
modeledFeatures: Object.freeze({
|
|
855
|
+
dimensions: features.dimensions,
|
|
856
|
+
hidden: false,
|
|
857
|
+
merges: false,
|
|
858
|
+
}),
|
|
797
859
|
sheets: Object.freeze(sheets),
|
|
798
860
|
});
|
|
799
861
|
}
|
|
800
862
|
|
|
863
|
+
function normalizeDimensions(input: Record<string, unknown>): SpreadsheetArtifactDimensions {
|
|
864
|
+
if (
|
|
865
|
+
input.defaultRowHeight !== SPREADSHEET_DEFAULT_ROW_HEIGHT ||
|
|
866
|
+
input.defaultColumnWidth !== SPREADSHEET_DEFAULT_COLUMN_WIDTH
|
|
867
|
+
) {
|
|
868
|
+
throw projectionError("dimension defaults are invalid");
|
|
869
|
+
}
|
|
870
|
+
const normalizeEntries = (
|
|
871
|
+
value: unknown,
|
|
872
|
+
defaultPixels: number,
|
|
873
|
+
): readonly (readonly [number, number])[] => {
|
|
874
|
+
if (!Array.isArray(value) || value.length > SPREADSHEET_ARTIFACT_PROJECTION_MAX_BYTES / 8)
|
|
875
|
+
throw projectionError("dimension entries exceed limits");
|
|
876
|
+
let previous = -1;
|
|
877
|
+
const entries: (readonly [number, number])[] = [];
|
|
878
|
+
for (let offset = 0; offset < value.length; offset += 1) {
|
|
879
|
+
const entry = ownArrayElement(value, offset, "dimension entries");
|
|
880
|
+
if (!Array.isArray(entry) || entry.length !== 2)
|
|
881
|
+
throw projectionError("dimension entry must be an index/pixels pair");
|
|
882
|
+
const index = uint32(ownArrayElement(entry, 0, "dimension index"), `dimension ${offset}`);
|
|
883
|
+
const pixels = positiveUint32(
|
|
884
|
+
ownArrayElement(entry, 1, "dimension pixels"),
|
|
885
|
+
"dimension pixels",
|
|
886
|
+
);
|
|
887
|
+
if (
|
|
888
|
+
index <= previous ||
|
|
889
|
+
pixels > SPREADSHEET_MAX_DIMENSION_PIXELS ||
|
|
890
|
+
pixels === defaultPixels
|
|
891
|
+
)
|
|
892
|
+
throw projectionError("dimensions must be sorted unique non-default entries within bounds");
|
|
893
|
+
previous = index;
|
|
894
|
+
entries.push(Object.freeze([index, pixels] as const));
|
|
895
|
+
}
|
|
896
|
+
return Object.freeze(entries);
|
|
897
|
+
};
|
|
898
|
+
return Object.freeze({
|
|
899
|
+
defaultRowHeight: SPREADSHEET_DEFAULT_ROW_HEIGHT,
|
|
900
|
+
defaultColumnWidth: SPREADSHEET_DEFAULT_COLUMN_WIDTH,
|
|
901
|
+
rowHeights: normalizeEntries(input.rowHeights, SPREADSHEET_DEFAULT_ROW_HEIGHT),
|
|
902
|
+
columnWidths: normalizeEntries(input.columnWidths, SPREADSHEET_DEFAULT_COLUMN_WIDTH),
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
function writeDimensions(writer: DynamicWriter, dimensions: SpreadsheetArtifactDimensions): void {
|
|
907
|
+
writer.u32(dimensions.defaultRowHeight!);
|
|
908
|
+
writer.u32(dimensions.defaultColumnWidth!);
|
|
909
|
+
for (const entries of [dimensions.rowHeights!, dimensions.columnWidths!]) {
|
|
910
|
+
writer.u32(entries.length);
|
|
911
|
+
for (const [index, pixels] of entries) {
|
|
912
|
+
writer.u32(index);
|
|
913
|
+
writer.u32(pixels);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
function readDimensions(reader: Reader): SpreadsheetArtifactDimensions {
|
|
919
|
+
const defaultRowHeight = reader.u32();
|
|
920
|
+
const defaultColumnWidth = reader.u32();
|
|
921
|
+
const axes: (readonly [number, number])[][] = [];
|
|
922
|
+
for (let axis = 0; axis < 2; axis += 1) {
|
|
923
|
+
const count = reader.u32();
|
|
924
|
+
if (count > SPREADSHEET_ARTIFACT_PROJECTION_MAX_BYTES / 8)
|
|
925
|
+
throw projectionError("dimension entries exceed limits");
|
|
926
|
+
const entries: (readonly [number, number])[] = [];
|
|
927
|
+
for (let index = 0; index < count; index += 1) entries.push([reader.u32(), reader.u32()]);
|
|
928
|
+
axes.push(entries);
|
|
929
|
+
}
|
|
930
|
+
return normalizeDimensions({
|
|
931
|
+
defaultRowHeight,
|
|
932
|
+
defaultColumnWidth,
|
|
933
|
+
rowHeights: axes[0],
|
|
934
|
+
columnWidths: axes[1],
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
function validateDimensionExtent(
|
|
939
|
+
dimensions: SpreadsheetArtifactDimensions,
|
|
940
|
+
startRow: number,
|
|
941
|
+
rowCount: number,
|
|
942
|
+
startColumn: number,
|
|
943
|
+
columnCount: number,
|
|
944
|
+
): void {
|
|
945
|
+
if (
|
|
946
|
+
dimensions.rowHeights?.some(([index]) => index < startRow || index - startRow >= rowCount) ||
|
|
947
|
+
dimensions.columnWidths?.some(
|
|
948
|
+
([index]) => index < startColumn || index - startColumn >= columnCount,
|
|
949
|
+
)
|
|
950
|
+
)
|
|
951
|
+
throw projectionError("dimensions lie outside viewport");
|
|
952
|
+
}
|
|
953
|
+
|
|
801
954
|
function normalizeProjectedCell(input: unknown): SpreadsheetArtifactProjectedCell {
|
|
802
955
|
const cell = exactRecord(input, "projected cell");
|
|
803
956
|
exactKeys(cell, ["column", "formula", "row", "value"], "projected cell");
|
|
@@ -1036,15 +1189,6 @@ function equalBytes(left: Uint8Array, right: Uint8Array): boolean {
|
|
|
1036
1189
|
return left.byteLength === right.byteLength && left.every((byte, index) => byte === right[index]);
|
|
1037
1190
|
}
|
|
1038
1191
|
|
|
1039
|
-
function fnv1a64(bytes: Uint8Array): bigint {
|
|
1040
|
-
let hash = FNV_OFFSET;
|
|
1041
|
-
for (const byte of bytes) {
|
|
1042
|
-
hash ^= BigInt(byte);
|
|
1043
|
-
hash = BigInt.asUintN(64, hash * FNV_PRIME);
|
|
1044
|
-
}
|
|
1045
|
-
return hash;
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
1192
|
function queryError(message: string): TypeError {
|
|
1049
1193
|
return new TypeError(message);
|
|
1050
1194
|
}
|
|
@@ -1053,12 +1197,6 @@ function projectionError(message: string): TypeError {
|
|
|
1053
1197
|
return new TypeError(message);
|
|
1054
1198
|
}
|
|
1055
1199
|
|
|
1056
|
-
const MODELED_FEATURES_NONE: SpreadsheetArtifactModeledFeatures = Object.freeze({
|
|
1057
|
-
dimensions: false,
|
|
1058
|
-
hidden: false,
|
|
1059
|
-
merges: false,
|
|
1060
|
-
});
|
|
1061
|
-
|
|
1062
1200
|
const EMPTY_VALUE: SpreadsheetArtifactProjectedCellValue = Object.freeze({
|
|
1063
1201
|
kind: "empty",
|
|
1064
1202
|
});
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import * as primitives from "./primitives";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Request bodies for subscription account actions (Codex, Claude, SuperGrok):
|
|
7
|
+
* renaming, pausing, rotation, extra credits and device sign-in. The routes
|
|
8
|
+
* validate with these, and the agent action catalog shows them as the input.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Rename an account. An empty or null label goes back to the account's email. */
|
|
12
|
+
export const SubscriptionAccountRenameRequest = /* @__PURE__ */ defineSchema(() =>
|
|
13
|
+
z.object({
|
|
14
|
+
label: primitives.string.trim().max(200).nullable(),
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
export type SubscriptionAccountRenameRequest = z.infer<typeof SubscriptionAccountRenameRequest>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Turn one account setting on or off: "used for new work" (allocator) or extra
|
|
21
|
+
* credits. expectedVersion is the account's current allocatorVersion or
|
|
22
|
+
* extraCreditsVersion; a stale version is refused so concurrent edits don't clash.
|
|
23
|
+
*/
|
|
24
|
+
export const SubscriptionAccountToggleRequest = /* @__PURE__ */ defineSchema(() =>
|
|
25
|
+
z.object({
|
|
26
|
+
enabled: primitives.boolean,
|
|
27
|
+
expectedVersion: primitives.positiveInteger,
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
export type SubscriptionAccountToggleRequest = z.infer<typeof SubscriptionAccountToggleRequest>;
|
|
31
|
+
|
|
32
|
+
/** Account picking: true spreads work across every usable account, false uses the primary one only. */
|
|
33
|
+
export const SubscriptionRotationSettingsRequest = /* @__PURE__ */ defineSchema(() =>
|
|
34
|
+
z.object({
|
|
35
|
+
rotationEnabled: primitives.boolean,
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
export type SubscriptionRotationSettingsRequest = z.infer<
|
|
39
|
+
typeof SubscriptionRotationSettingsRequest
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
/** Check a device sign-in with the state returned by its connect/start call. */
|
|
43
|
+
export const SubscriptionConnectPollRequest = /* @__PURE__ */ defineSchema(() =>
|
|
44
|
+
z.object({
|
|
45
|
+
state: z.string().min(1).max(16_384),
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
export type SubscriptionConnectPollRequest = z.infer<typeof SubscriptionConnectPollRequest>;
|
|
49
|
+
|
|
50
|
+
/** Where a workspace SuperGrok sign-in lands: the shared workspace pool or only the person. */
|
|
51
|
+
export const SupergrokConnectStartRequest = /* @__PURE__ */ defineSchema(() =>
|
|
52
|
+
z.object({
|
|
53
|
+
scope: z.enum(["workspace", "user"]).default("workspace"),
|
|
54
|
+
}),
|
|
55
|
+
);
|
|
56
|
+
export type SupergrokConnectStartRequest = z.infer<typeof SupergrokConnectStartRequest>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* A started device sign-in (Codex or SuperGrok): the person enters userCode at
|
|
60
|
+
* verificationUri (or opens verificationUriComplete), then the caller polls
|
|
61
|
+
* connect/poll with state every intervalSeconds.
|
|
62
|
+
*/
|
|
63
|
+
export const SubscriptionDeviceSignInStart = /* @__PURE__ */ defineSchema(() =>
|
|
64
|
+
z.object({
|
|
65
|
+
userCode: primitives.string,
|
|
66
|
+
verificationUri: primitives.string,
|
|
67
|
+
verificationUriComplete: primitives.string.nullable().optional(),
|
|
68
|
+
intervalSeconds: primitives.positiveInteger,
|
|
69
|
+
expiresInSeconds: primitives.positiveInteger.optional(),
|
|
70
|
+
scope: z.enum(["workspace", "user", "organization"]).optional(),
|
|
71
|
+
state: primitives.string,
|
|
72
|
+
}),
|
|
73
|
+
);
|
|
74
|
+
export type SubscriptionDeviceSignInStart = z.infer<typeof SubscriptionDeviceSignInStart>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Which Codex accounts a workspace uses: automatic (Opengeni picks from the
|
|
78
|
+
* workspace's and the organization's accounts), only the workspace's own, only
|
|
79
|
+
* the organization's, or none (Codex off for the workspace).
|
|
80
|
+
*/
|
|
81
|
+
export const CodexSourceRequest = /* @__PURE__ */ defineSchema(() =>
|
|
82
|
+
z.object({
|
|
83
|
+
mode: z.enum(["automatic", "workspace", "organization", "disabled"]),
|
|
84
|
+
}),
|
|
85
|
+
);
|
|
86
|
+
export type CodexSourceRequest = z.infer<typeof CodexSourceRequest>;
|
|
87
|
+
|
|
88
|
+
/** Choose the Codex account that serves Codex Apps; expectedVersion is the current designation version. */
|
|
89
|
+
export const CodexAppsDesignationRequest = /* @__PURE__ */ defineSchema(() =>
|
|
90
|
+
z.object({
|
|
91
|
+
accountId: primitives.uuid,
|
|
92
|
+
expectedVersion: primitives.nonnegativeInteger,
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
export type CodexAppsDesignationRequest = z.infer<typeof CodexAppsDesignationRequest>;
|
|
96
|
+
|
|
97
|
+
/** Pin one chat to a Codex account by id, or "auto" to let Opengeni pick again. */
|
|
98
|
+
export const SessionCodexAccountPinRequest = /* @__PURE__ */ defineSchema(() =>
|
|
99
|
+
z.object({
|
|
100
|
+
target: primitives.nonEmptyString.describe('"auto" or a Codex account id'),
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
export type SessionCodexAccountPinRequest = z.infer<typeof SessionCodexAccountPinRequest>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as primitives from "./primitives";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { ClaudeSubscriptionUsage } from "./claude-subscription-usage";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Who an account in the organization's list reaches: the workspace that owns
|
|
8
|
+
* it (its own account, used only there), every workspace including new ones,
|
|
9
|
+
* chosen shared workspaces, Personal workspaces, or chosen people.
|
|
10
|
+
*/
|
|
11
|
+
export const SubscriptionAccountReach = /* @__PURE__ */ defineSchema(() =>
|
|
12
|
+
z
|
|
13
|
+
.object({
|
|
14
|
+
ownerWorkspaceId: primitives.nullableUuid,
|
|
15
|
+
everyWorkspace: primitives.boolean,
|
|
16
|
+
workspaceIds: z.array(primitives.uuid),
|
|
17
|
+
personalWorkspaces: primitives.boolean,
|
|
18
|
+
people: z.number().int().nonnegative().nullable(),
|
|
19
|
+
})
|
|
20
|
+
.strict(),
|
|
21
|
+
);
|
|
22
|
+
export type SubscriptionAccountReach = z.infer<typeof SubscriptionAccountReach>;
|
|
23
|
+
|
|
24
|
+
/** Shared, secret-free account list contract for native subscription pools. */
|
|
25
|
+
export const SubscriptionAccountSummary = /* @__PURE__ */ defineSchema(() =>
|
|
26
|
+
z.object({
|
|
27
|
+
id: primitives.uuid,
|
|
28
|
+
scope: z.enum(["organization", "workspace", "user"]),
|
|
29
|
+
subject: primitives.nonEmptyString,
|
|
30
|
+
email: z.string().email().nullable(),
|
|
31
|
+
label: primitives.nullableString,
|
|
32
|
+
plan: primitives.nullableString,
|
|
33
|
+
status: z.enum(["active", "needs_relogin", "error", "disabled"]),
|
|
34
|
+
active: primitives.boolean,
|
|
35
|
+
expiresAt: z.string().datetime().nullable(),
|
|
36
|
+
lastRefreshAt: z.string().datetime().nullable(),
|
|
37
|
+
lastError: primitives.nullableString,
|
|
38
|
+
allocatorEnabled: primitives.boolean,
|
|
39
|
+
allocatorVersion: primitives.positiveInteger,
|
|
40
|
+
allocatorUpdatedAt: z.string().datetime().nullable(),
|
|
41
|
+
/** The organization's list only. */
|
|
42
|
+
reach: SubscriptionAccountReach.optional(),
|
|
43
|
+
}),
|
|
44
|
+
);
|
|
45
|
+
export type SubscriptionAccountSummary = z.infer<typeof SubscriptionAccountSummary>;
|
|
46
|
+
export const SubscriptionPoolSettings = /* @__PURE__ */ defineSchema(() =>
|
|
47
|
+
z
|
|
48
|
+
.object({
|
|
49
|
+
rotationEnabled: primitives.boolean,
|
|
50
|
+
rotationStrategy: z.literal("sharded"),
|
|
51
|
+
activeCredentialId: primitives.nullableUuid,
|
|
52
|
+
})
|
|
53
|
+
.strict(),
|
|
54
|
+
);
|
|
55
|
+
export type SubscriptionPoolSettings = z.infer<typeof SubscriptionPoolSettings>;
|
|
56
|
+
export const ClaudeSubscriptionAccount = /* @__PURE__ */ defineSchema(() =>
|
|
57
|
+
SubscriptionAccountSummary.extend({
|
|
58
|
+
version: primitives.positiveInteger,
|
|
59
|
+
usage: ClaudeSubscriptionUsage.optional(),
|
|
60
|
+
}).strict(),
|
|
61
|
+
);
|
|
62
|
+
export type ClaudeSubscriptionAccount = z.infer<typeof ClaudeSubscriptionAccount>;
|
|
63
|
+
export const ClaudeSubscriptionAccountsResponse = /* @__PURE__ */ defineSchema(() =>
|
|
64
|
+
z
|
|
65
|
+
.object({
|
|
66
|
+
accounts: z.array(ClaudeSubscriptionAccount),
|
|
67
|
+
activeAccountId: primitives.nullableUuid,
|
|
68
|
+
source: z.enum(["organization", "workspace", "user"]),
|
|
69
|
+
organizationId: primitives.uuid,
|
|
70
|
+
settings: SubscriptionPoolSettings,
|
|
71
|
+
})
|
|
72
|
+
.strict(),
|
|
73
|
+
);
|
|
74
|
+
export type ClaudeSubscriptionAccountsResponse = z.infer<typeof ClaudeSubscriptionAccountsResponse>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as primitives from "./primitives";
|
|
2
|
+
import { defineSchema } from "./define-schema";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
const PositiveSafeInteger = /* @__PURE__ */ defineSchema(() =>
|
|
6
|
+
primitives.positiveInteger.max(Number.MAX_SAFE_INTEGER),
|
|
7
|
+
);
|
|
8
|
+
/**
|
|
9
|
+
* Canonical lowercase UUID, matching PostgreSQL uuid::text and the
|
|
10
|
+
* session_turns CHECK, so an accepted snapshot can never silently mismatch.
|
|
11
|
+
*/
|
|
12
|
+
const CanonicalUuid = /* @__PURE__ */ defineSchema(() =>
|
|
13
|
+
primitives.string.regex(
|
|
14
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,
|
|
15
|
+
),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Immutable personal authority for accepted subscription work. Shared pool
|
|
20
|
+
* eligibility is live and deliberately absent from this snapshot.
|
|
21
|
+
*/
|
|
22
|
+
export const SubscriptionPersonalAuthorityV2 = /* @__PURE__ */ defineSchema(() =>
|
|
23
|
+
z
|
|
24
|
+
.object({
|
|
25
|
+
version: z.literal(2),
|
|
26
|
+
personal: z
|
|
27
|
+
.array(
|
|
28
|
+
z
|
|
29
|
+
.object({
|
|
30
|
+
provider: z.enum(["codex", "claude", "xai"]),
|
|
31
|
+
ownerMembershipId: CanonicalUuid,
|
|
32
|
+
authorityGeneration: PositiveSafeInteger,
|
|
33
|
+
/**
|
|
34
|
+
* Explicit personal consent accepted in a shared chat. Unlike the
|
|
35
|
+
* historical private-work pool, this authorizes only this connection
|
|
36
|
+
* in this session. Copies retain the restriction verbatim.
|
|
37
|
+
*/
|
|
38
|
+
sharedSessionChoice: z
|
|
39
|
+
.object({ sessionId: CanonicalUuid, connectionId: CanonicalUuid })
|
|
40
|
+
.strict()
|
|
41
|
+
.optional(),
|
|
42
|
+
})
|
|
43
|
+
.strict(),
|
|
44
|
+
)
|
|
45
|
+
.max(3),
|
|
46
|
+
})
|
|
47
|
+
.strict()
|
|
48
|
+
.superRefine((snapshot, ctx) => {
|
|
49
|
+
const providers = snapshot.personal.map((authority) => authority.provider);
|
|
50
|
+
if (new Set(providers).size !== providers.length) {
|
|
51
|
+
ctx.addIssue({ code: "custom", message: "Duplicate provider personal authority" });
|
|
52
|
+
}
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export type SubscriptionPersonalAuthorityV2 = z.infer<typeof SubscriptionPersonalAuthorityV2>;
|
|
57
|
+
|
|
58
|
+
/** Return one provider's immutable personal authority from a parsed snapshot. */
|
|
59
|
+
export function subscriptionPersonalAuthorityForProviderV2(
|
|
60
|
+
snapshot: SubscriptionPersonalAuthorityV2,
|
|
61
|
+
provider: SubscriptionPersonalAuthorityV2["personal"][number]["provider"],
|
|
62
|
+
): SubscriptionPersonalAuthorityV2["personal"][number] | null {
|
|
63
|
+
return snapshot.personal.find((authority) => authority.provider === provider) ?? null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const EMPTY_SUBSCRIPTION_PERSONAL_AUTHORITY_V2 = {
|
|
67
|
+
version: 2,
|
|
68
|
+
personal: [],
|
|
69
|
+
} as const satisfies SubscriptionPersonalAuthorityV2;
|