@opengeni/contracts 3.1.0-canary.1 → 3.1.2
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 +971 -0
- package/dist/agent-instruction-changes.d.ts +110 -0
- package/dist/agent-learning.d.ts +243 -0
- package/dist/allowance-refusal.d.ts +9 -0
- package/dist/allowance-refusal.js +50 -0
- package/dist/allowance-refusal.js.map +1 -0
- package/dist/analytics-consent-report.d.ts +19 -0
- package/dist/analytics-consent-report.js +10 -0
- package/dist/analytics-consent-report.js.map +1 -0
- package/dist/api-key-presets.d.ts +19 -0
- package/dist/artifact-catalog.d.ts +188 -0
- package/dist/artifacts.d.ts +86 -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.d.ts +1 -0
- package/dist/atlassian.js +34 -19
- package/dist/browser-storage.d.ts +5 -0
- package/dist/browser-storage.js +9 -0
- package/dist/browser-storage.js.map +1 -0
- package/dist/bundled-skills.d.ts +24 -1
- package/dist/canonical-human-identities.js +2 -1
- package/dist/chunk-2ZIHHL72.js +153 -0
- package/dist/chunk-2ZIHHL72.js.map +1 -0
- package/dist/{chunk-5LYFSZ7O.js → chunk-352X6ENP.js} +31 -31
- package/dist/chunk-4JGHSSB7.js +11 -0
- package/dist/chunk-4JGHSSB7.js.map +1 -0
- package/dist/chunk-4QO6GJUX.js +85 -0
- package/dist/chunk-4QO6GJUX.js.map +1 -0
- package/dist/chunk-4VDMHLLL.js +49 -0
- package/dist/chunk-4VDMHLLL.js.map +1 -0
- package/dist/chunk-56SNIMDO.js +9 -0
- package/dist/chunk-56SNIMDO.js.map +1 -0
- package/dist/chunk-6C2HKFTU.js +207 -0
- package/dist/chunk-6C2HKFTU.js.map +1 -0
- package/dist/chunk-6IXO76Z6.js +72 -0
- package/dist/chunk-6IXO76Z6.js.map +1 -0
- package/dist/chunk-7272KVWZ.js +60 -0
- package/dist/chunk-7272KVWZ.js.map +1 -0
- package/dist/{chunk-7ABONTXE.js → chunk-E3GGUBHS.js} +49 -5
- package/dist/chunk-E3GGUBHS.js.map +1 -0
- package/dist/chunk-EFZYKUE2.js +767 -0
- package/dist/chunk-EFZYKUE2.js.map +1 -0
- package/dist/chunk-EKWNTOG3.js +154 -0
- package/dist/chunk-EKWNTOG3.js.map +1 -0
- package/dist/chunk-HABQ7ADB.js +234 -0
- package/dist/chunk-HABQ7ADB.js.map +1 -0
- package/dist/chunk-HRRU4QPI.js +91 -0
- package/dist/chunk-HRRU4QPI.js.map +1 -0
- package/dist/{chunk-3SIZGL3O.js → chunk-IK36LXKC.js} +18 -2
- package/dist/chunk-IK36LXKC.js.map +1 -0
- package/dist/{chunk-TXTQIYCV.js → chunk-ILJ72KPO.js} +56 -3
- package/dist/chunk-ILJ72KPO.js.map +1 -0
- package/dist/chunk-J4HQ3UKY.js +93 -0
- package/dist/chunk-J4HQ3UKY.js.map +1 -0
- package/dist/chunk-KHHZTBP7.js +11 -0
- package/dist/chunk-KHHZTBP7.js.map +1 -0
- package/dist/{chunk-WYBDERIY.js → chunk-LZ2LAHIX.js} +47 -41
- package/dist/chunk-LZ2LAHIX.js.map +1 -0
- package/dist/chunk-NDZHPTCL.js +400 -0
- package/dist/chunk-NDZHPTCL.js.map +1 -0
- package/dist/chunk-OF6OKOBF.js +54793 -0
- package/dist/chunk-OF6OKOBF.js.map +1 -0
- package/dist/chunk-OL23ARTF.js +94 -0
- package/dist/chunk-OL23ARTF.js.map +1 -0
- package/dist/chunk-PUIUXIOL.js +189 -0
- package/dist/chunk-PUIUXIOL.js.map +1 -0
- package/dist/{chunk-WBYTNVIW.js → chunk-RKX3NQYS.js} +1 -1
- package/dist/{chunk-Y3KNXVTD.js → chunk-RMWXDZEO.js} +128 -21
- package/dist/chunk-RMWXDZEO.js.map +1 -0
- package/dist/{chunk-MRWYRAS5.js → chunk-SHO4YO4B.js} +27 -35
- package/dist/chunk-SHO4YO4B.js.map +1 -0
- package/dist/chunk-SWRN2DJ3.js +153 -0
- package/dist/chunk-SWRN2DJ3.js.map +1 -0
- package/dist/chunk-TCXCRBPF.js +267 -0
- package/dist/chunk-TCXCRBPF.js.map +1 -0
- package/dist/chunk-TLU3UEMD.js +324 -0
- package/dist/chunk-TLU3UEMD.js.map +1 -0
- package/dist/chunk-TSWWZMUS.js +186 -0
- package/dist/chunk-TSWWZMUS.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-XDLAGX66.js +127 -0
- package/dist/chunk-XDLAGX66.js.map +1 -0
- package/dist/chunk-YKZ4WU4P.js +33 -0
- package/dist/chunk-YKZ4WU4P.js.map +1 -0
- package/dist/{chunk-O5LEQHDM.js → chunk-Z7WEVGCL.js} +3 -3
- package/dist/{chunk-YBW5JSA3.js → chunk-ZDCRWCGZ.js} +119 -101
- package/dist/chunk-ZDCRWCGZ.js.map +1 -0
- package/dist/claude-provider-account-authority.d.ts +18 -0
- package/dist/claude-subscription-oauth.d.ts +42 -0
- package/dist/claude-subscription-usage.d.ts +159 -0
- package/dist/client-error-report.d.ts +158 -0
- package/dist/client-error-report.js +164 -0
- package/dist/client-error-report.js.map +1 -0
- package/dist/code-search.d.ts +52 -0
- package/dist/code-search.js +40 -0
- package/dist/code-search.js.map +1 -0
- package/dist/codex-provider-account-authority.js +20 -12
- package/dist/codex-provider-account-authority.js.map +1 -1
- package/dist/company-brain.d.ts +19 -81
- package/dist/company-profile.d.ts +144 -6
- package/dist/connect.d.ts +37 -0
- package/dist/connect.js +216 -159
- package/dist/connect.js.map +1 -1
- package/dist/connection-account-label.d.ts +2 -0
- package/dist/connection-account-label.js +35 -0
- package/dist/connection-account-label.js.map +1 -0
- package/dist/connection-authority.d.ts +9 -317
- package/dist/connection-authority.js +37 -42
- package/dist/connector-attachments.js +2 -1
- package/dist/connector-destinations.js +2 -1
- package/dist/connector-tool-permissions.d.ts +137 -0
- package/dist/cua-desktop-tools.d.ts +17 -0
- package/dist/define-schema.d.ts +8 -0
- package/dist/direct-model-provider.d.ts +36 -0
- package/dist/editable-artifact-codec-registry.js +5 -5
- package/dist/editable-artifact-committed-transaction.js +3 -2
- package/dist/editable-artifact-live.js +5 -5
- package/dist/editable-artifact-serialized-commit.js +6 -6
- package/dist/editable-artifact-versions.d.ts +7 -1
- package/dist/editable-artifact-versions.js +1 -1
- package/dist/editable-artifacts.js +62 -56
- package/dist/event-preview.d.ts +22 -0
- package/dist/external-identities.d.ts +174 -0
- package/dist/external-identities.js +15 -4
- package/dist/first-party-tool-authorization.d.ts +815 -0
- package/dist/github-repository-contracts.js +60 -43
- package/dist/github-repository-contracts.js.map +1 -1
- package/dist/google-drive.d.ts +2 -1
- package/dist/google-drive.js +305 -238
- package/dist/google-drive.js.map +1 -1
- package/dist/host-mcp-bindings.d.ts +39 -10
- package/dist/host-mcp-bindings.js +256 -171
- package/dist/host-mcp-bindings.js.map +1 -1
- package/dist/image-generation.d.ts +1 -0
- package/dist/index.d.ts +15715 -3850
- package/dist/index.js +2088 -289
- package/dist/insights-usage.d.ts +877 -0
- package/dist/insights-usage.js +559 -0
- package/dist/insights-usage.js.map +1 -0
- package/dist/interaction.d.ts +1176 -829
- package/dist/knowledge-entries.d.ts +984 -0
- package/dist/knowledge-preparation.d.ts +239 -0
- package/dist/managed-auth-session-sets.d.ts +7 -0
- package/dist/managed-auth-session-sets.js +198 -132
- package/dist/managed-auth-session-sets.js.map +1 -1
- package/dist/managed-sign-in-methods.d.ts +56 -0
- package/dist/managed-sign-in-methods.js +64 -0
- package/dist/managed-sign-in-methods.js.map +1 -0
- package/dist/mcp-catalog-limits.d.ts +2 -0
- package/dist/mcp-endpoint.js +9 -0
- package/dist/mcp-endpoint.js.map +1 -0
- package/dist/mcp-oauth.d.ts +2 -2
- package/dist/mcp-structured-content.d.ts +25 -0
- package/dist/modal-native-proof-v2.d.ts +587 -0
- package/dist/modal-native-proof-v2.js +38 -0
- package/dist/modal-native-proof-v2.js.map +1 -0
- package/dist/model-account-choice.d.ts +235 -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 +98 -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.d.ts +3 -1
- package/dist/model-picker-order.js +3 -0
- package/dist/model-picker-order.js.map +1 -1
- package/dist/organization-access.d.ts +412 -0
- package/dist/organization-access.js +39 -0
- package/dist/organization-access.js.map +1 -0
- package/dist/organization-integration-policy.d.ts +27 -0
- package/dist/organization-membership-lifecycle.d.ts +38 -0
- package/dist/organization-model-usage.d.ts +146 -0
- package/dist/organization-model-usage.js +78 -0
- package/dist/organization-model-usage.js.map +1 -0
- package/dist/organization-recovery.js +2 -1
- package/dist/organization-usage.d.ts +138 -0
- package/dist/permissions.d.ts +18 -0
- package/dist/personal-github.d.ts +1 -0
- package/dist/personal-github.js +199 -144
- package/dist/personal-github.js.map +1 -1
- package/dist/plugin-discovery.js +1 -1
- package/dist/prepared-mcp-setup.d.ts +54 -0
- package/dist/prepared-mcp-setup.js +12 -0
- package/dist/prepared-mcp-setup.js.map +1 -0
- package/dist/product-analytics.d.ts +116 -0
- package/dist/product-lifecycle-facts.d.ts +73 -0
- package/dist/remember.d.ts +98 -6
- package/dist/retained-output.d.ts +8 -0
- package/dist/sandbox-file-artifacts.d.ts +1 -0
- package/dist/sandbox-provider-command.d.ts +91 -1
- package/dist/sandbox-recovery.d.ts +146 -0
- package/dist/secret-generator.d.ts +44 -0
- package/dist/secret-references.d.ts +90 -0
- package/dist/secret-resolution.d.ts +111 -0
- package/dist/secret-totp.d.ts +41 -0
- package/dist/session-final-reply.d.ts +6 -0
- package/dist/session-final-reply.js +9 -0
- package/dist/session-final-reply.js.map +1 -0
- package/dist/session-goal-reports.d.ts +21 -0
- package/dist/session-history-import.d.ts +1272 -0
- package/dist/session-list-entries.d.ts +4 -0
- package/dist/session-list-entries.js +56 -0
- package/dist/session-list-entries.js.map +1 -0
- package/dist/session-mcp-projections.d.ts +6 -0
- package/dist/session-mcp-tool-permissions.d.ts +62 -0
- package/dist/session-message-search.d.ts +68 -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 +41 -0
- package/dist/session-usage-limits.js.map +1 -0
- package/dist/signup-attribution.d.ts +39 -0
- package/dist/site-data.d.ts +286 -0
- package/dist/site-operations.d.ts +39 -0
- package/dist/site-publishing.d.ts +778 -0
- package/dist/site-session-http.d.ts +89 -4
- package/dist/site-session-http.js +25 -1
- package/dist/site-sql.d.ts +421 -0
- package/dist/skill-catalog-context.d.ts +7 -0
- package/dist/skill-files.d.ts +1 -1
- package/dist/skill-use.d.ts +61 -0
- package/dist/skills.d.ts +15 -0
- package/dist/slack-bot-scopes.d.ts +17 -12
- package/dist/slack-bot-scopes.js +10 -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 +8 -2
- package/dist/spreadsheet-artifact-query.d.ts +13 -6
- package/dist/spreadsheet-artifact-query.js +3 -3
- package/dist/subscription-account-actions.d.ts +64 -0
- package/dist/subscription-account-pools.d.ts +292 -0
- package/dist/subscription-personal-authority-v2.d.ts +28 -0
- package/dist/subscription-personal-authority-v2.js +12 -0
- package/dist/subscription-personal-authority-v2.js.map +1 -0
- package/dist/tool-action-review.d.ts +132 -0
- package/dist/tool-catalog.d.ts +408 -0
- package/dist/tool-policy.d.ts +5 -0
- package/dist/tool-review-presentation.d.ts +12 -0
- package/dist/tool-review-presentation.js +17 -0
- package/dist/tool-review-presentation.js.map +1 -0
- package/dist/transcription-recordings.d.ts +21 -0
- package/dist/turn-serving-policy.d.ts +221 -0
- package/dist/usage-allowances.d.ts +314 -0
- package/dist/usage-allowances.js +52 -0
- package/dist/usage-allowances.js.map +1 -0
- package/dist/vaults.d.ts +1286 -0
- package/dist/video-generation.d.ts +3 -0
- package/dist/video-generation.js +2 -1
- package/dist/workspace-instruction-policies.d.ts +13 -0
- package/dist/workspace-integration-wire.d.ts +36 -0
- package/dist/workspace-integration-wire.js +23 -0
- package/dist/workspace-integration-wire.js.map +1 -0
- package/dist/workspace-integrations.d.ts +1028 -0
- package/dist/workspace-state.d.ts +85 -416
- package/dist/xai-provider-account-authority.js +2 -1
- package/package.json +98 -2
- package/src/agent-authored-durable-text.ts +14 -11
- package/src/agent-config.ts +1698 -0
- package/src/agent-instruction-changes.ts +115 -0
- package/src/agent-learning.ts +188 -0
- package/src/agent-topology.ts +57 -52
- package/src/allowance-refusal.ts +81 -0
- package/src/analytics-consent-report.ts +20 -0
- package/src/api-key-presets.ts +28 -0
- package/src/artifact-catalog.ts +82 -0
- package/src/artifacts.ts +299 -227
- package/src/atlassian-native-retirement.ts +33 -0
- package/src/atlassian.ts +135 -108
- package/src/browser-storage.ts +10 -0
- package/src/bundled-skills.ts +60 -17
- package/src/canonical-human-identities.ts +60 -58
- package/src/claude-provider-account-authority.ts +12 -0
- package/src/claude-subscription-oauth.ts +73 -0
- package/src/claude-subscription-usage.ts +68 -0
- package/src/client-error-report.ts +343 -0
- package/src/code-search.ts +105 -0
- package/src/codex-provider-account-authority.ts +21 -16
- package/src/company-brain-governed-writes.ts +255 -233
- package/src/company-brain.ts +164 -153
- package/src/company-profile.ts +365 -292
- package/src/connect.ts +212 -173
- package/src/connection-account-label.ts +46 -0
- package/src/connection-authority.ts +183 -364
- package/src/connector-attachments.ts +137 -122
- package/src/connector-destinations.ts +46 -42
- package/src/connector-tool-permissions.ts +117 -0
- package/src/cua-desktop-tools.gen.json +6512 -0
- package/src/cua-desktop-tools.linux.gen.json +6600 -0
- package/src/cua-desktop-tools.ts +36 -0
- package/src/cua-desktop-tools.windows.gen.json +6353 -0
- package/src/define-schema.ts +10 -0
- package/src/direct-model-provider.ts +108 -0
- package/src/editable-artifact-committed-transaction.ts +17 -0
- package/src/editable-artifact-versions.ts +7 -1
- package/src/event-preview.ts +53 -3
- package/src/external-identities.ts +262 -145
- package/src/feedback.ts +43 -30
- package/src/first-party-tool-authorization.ts +356 -0
- package/src/github-repository-contracts.ts +78 -64
- package/src/google-drive.ts +285 -234
- package/src/governed-learning-activation.ts +152 -131
- package/src/governed-learning-evaluator.ts +140 -133
- package/src/host-mcp-bindings.ts +292 -198
- package/src/image-generation.ts +104 -95
- package/src/index.ts +13354 -8654
- package/src/insights-usage.ts +727 -0
- package/src/interaction.ts +3070 -2326
- package/src/knowledge-entries.ts +428 -0
- package/src/knowledge-preparation.ts +57 -0
- package/src/knowledge.ts +246 -213
- package/src/managed-auth-session-sets.ts +220 -144
- package/src/managed-sign-in-methods.ts +52 -0
- package/src/mcp-catalog-limits.ts +2 -0
- package/src/mcp-oauth.ts +43 -34
- package/src/mcp-receipts.ts +192 -192
- package/src/mcp-structured-content.ts +81 -0
- package/src/memory-slack-delivery.ts +171 -142
- package/src/modal-native-proof-v2.ts +429 -0
- package/src/model-account-choice.ts +177 -0
- package/src/model-account-settings.ts +210 -0
- package/src/model-availability.ts +22 -0
- package/src/model-connection-access.ts +61 -14
- package/src/model-context-inspector.ts +133 -99
- package/src/model-display.ts +221 -0
- package/src/model-picker-order.ts +12 -1
- package/src/organization-access.ts +217 -0
- package/src/organization-integration-policy.ts +63 -0
- package/src/organization-membership-lifecycle.ts +528 -382
- package/src/organization-model-usage.ts +81 -0
- package/src/organization-recovery.ts +147 -135
- package/src/organization-usage.ts +94 -0
- package/src/permissions.ts +88 -52
- package/src/personal-github.ts +210 -171
- package/src/preference-registry.ts +314 -258
- package/src/prepared-mcp-setup.ts +189 -0
- package/src/product-analytics.ts +261 -0
- package/src/product-lifecycle-facts.ts +122 -0
- package/src/remember.ts +181 -167
- package/src/retained-output.ts +194 -165
- package/src/sandbox-file-artifacts.ts +60 -47
- package/src/sandbox-provider-command.ts +88 -20
- package/src/sandbox-recovery.ts +129 -0
- package/src/scoped-knowledge.ts +61 -43
- package/src/secret-generator.ts +155 -0
- package/src/secret-references.ts +414 -0
- package/src/secret-resolution.ts +274 -0
- package/src/secret-totp.ts +188 -0
- package/src/session-final-reply.ts +16 -0
- package/src/session-goal-reports.ts +64 -0
- package/src/session-history-import.ts +177 -0
- package/src/session-list-entries.ts +96 -0
- package/src/session-mcp-projections.ts +11 -0
- package/src/session-mcp-tool-permissions.ts +108 -0
- package/src/session-message-search.ts +61 -0
- package/src/session-target.ts +57 -0
- package/src/session-titles.ts +80 -10
- package/src/session-topology-primitives.ts +19 -12
- package/src/session-usage-limit-refusal.ts +101 -0
- package/src/session-usage-limits.ts +171 -0
- package/src/signup-attribution.ts +86 -0
- package/src/site-data.ts +339 -0
- package/src/site-operations.ts +154 -0
- package/src/site-publishing.ts +876 -0
- package/src/site-session-http.ts +294 -16
- package/src/site-sql.ts +1123 -0
- package/src/skill-catalog-context.ts +50 -0
- package/src/skill-files.ts +3 -3
- package/src/skill-use.ts +80 -0
- package/src/skills.ts +82 -54
- package/src/slack-bot-scopes.ts +31 -39
- package/src/slack-rest-mcp.ts +222 -0
- package/src/slack-task-policy.ts +96 -73
- package/src/spreadsheet-artifact-commands.ts +73 -2
- package/src/spreadsheet-artifact-query.ts +187 -39
- package/src/subscription-account-actions.ts +84 -0
- package/src/subscription-account-pools.ts +53 -0
- package/src/subscription-personal-authority-v2.ts +66 -0
- package/src/task-notes.ts +55 -51
- package/src/tool-action-review.ts +258 -0
- package/src/tool-catalog.ts +609 -372
- package/src/tool-policy.ts +82 -0
- package/src/tool-result-spill.ts +12 -9
- package/src/tool-review-presentation.ts +385 -0
- package/src/transcription-recordings.ts +145 -131
- package/src/turn-serving-policy.ts +166 -0
- package/src/usage-allowances.ts +248 -0
- package/src/vaults.ts +850 -0
- package/src/video-generation.ts +385 -360
- package/src/work-claims.ts +173 -149
- package/src/workspace-instruction-policies.ts +349 -275
- package/src/workspace-integration-wire.ts +101 -0
- package/src/workspace-integrations.ts +724 -0
- package/src/workspace-learning-administration.ts +57 -44
- package/src/workspace-learning-policy.ts +127 -96
- package/src/workspace-state.ts +253 -333
- package/src/xai-provider-account-authority.ts +22 -17
- package/dist/chunk-3SIZGL3O.js.map +0 -1
- package/dist/chunk-7ABONTXE.js.map +0 -1
- package/dist/chunk-BCS7WHCK.js +0 -139
- package/dist/chunk-BCS7WHCK.js.map +0 -1
- package/dist/chunk-GRG7PHWQ.js +0 -25
- package/dist/chunk-GRG7PHWQ.js.map +0 -1
- package/dist/chunk-JUFK3T4Q.js +0 -80
- package/dist/chunk-JUFK3T4Q.js.map +0 -1
- package/dist/chunk-M5ZGRVIQ.js +0 -719
- package/dist/chunk-M5ZGRVIQ.js.map +0 -1
- package/dist/chunk-MRWYRAS5.js.map +0 -1
- package/dist/chunk-OSBYTE3O.js +0 -348
- package/dist/chunk-OSBYTE3O.js.map +0 -1
- package/dist/chunk-P3HLDT77.js +0 -59
- package/dist/chunk-P3HLDT77.js.map +0 -1
- package/dist/chunk-TEMFILR7.js +0 -143
- package/dist/chunk-TEMFILR7.js.map +0 -1
- package/dist/chunk-TXTQIYCV.js.map +0 -1
- package/dist/chunk-UR2GFYIE.js +0 -22598
- package/dist/chunk-UR2GFYIE.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-5LYFSZ7O.js.map → chunk-352X6ENP.js.map} +0 -0
- /package/dist/{chunk-WBYTNVIW.js.map → chunk-RKX3NQYS.js.map} +0 -0
- /package/dist/{chunk-O5LEQHDM.js.map → chunk-Z7WEVGCL.js.map} +0 -0
package/src/video-generation.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { defineSchema } from "./define-schema";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import {
|
|
3
4
|
GENERATED_VIDEO_MAX_BYTES,
|
|
@@ -9,423 +10,447 @@ export const VIDEO_GENERATION_SCHEMA_VERSION = 1 as const;
|
|
|
9
10
|
export const SEEDANCE_2_5_MODEL_ID = "bytedance/seedance-2.5" as const;
|
|
10
11
|
export const GROK_IMAGINE_VIDEO_1_5_MODEL_ID = "xai/grok-imagine-video-1.5" as const;
|
|
11
12
|
|
|
12
|
-
export const VideoGenerationSourceMode =
|
|
13
|
-
"text",
|
|
14
|
-
|
|
15
|
-
"first_and_last_frames",
|
|
16
|
-
"image_reference",
|
|
17
|
-
"video_reference",
|
|
18
|
-
]);
|
|
13
|
+
export const VideoGenerationSourceMode = /* @__PURE__ */ defineSchema(() =>
|
|
14
|
+
z.enum(["text", "first_frame", "first_and_last_frames", "image_reference", "video_reference"]),
|
|
15
|
+
);
|
|
19
16
|
export type VideoGenerationSourceMode = z.infer<typeof VideoGenerationSourceMode>;
|
|
20
17
|
|
|
21
|
-
export const VideoGenerationResolution =
|
|
18
|
+
export const VideoGenerationResolution = /* @__PURE__ */ defineSchema(() =>
|
|
19
|
+
z.enum(["480p", "720p"]),
|
|
20
|
+
);
|
|
22
21
|
export type VideoGenerationResolution = z.infer<typeof VideoGenerationResolution>;
|
|
23
22
|
|
|
24
|
-
export const VideoGenerationFundingSource =
|
|
25
|
-
"opengeni_credits",
|
|
26
|
-
|
|
27
|
-
"supergrok_subscription",
|
|
28
|
-
]);
|
|
23
|
+
export const VideoGenerationFundingSource = /* @__PURE__ */ defineSchema(() =>
|
|
24
|
+
z.enum(["opengeni_credits", "workspace_gateway", "supergrok_subscription"]),
|
|
25
|
+
);
|
|
29
26
|
export type VideoGenerationFundingSource = z.infer<typeof VideoGenerationFundingSource>;
|
|
30
27
|
|
|
31
|
-
export const VideoGenerationAspectRatio =
|
|
32
|
-
"16:9",
|
|
33
|
-
|
|
34
|
-
"1:1",
|
|
35
|
-
"3:4",
|
|
36
|
-
"9:16",
|
|
37
|
-
"21:9",
|
|
38
|
-
"adaptive",
|
|
39
|
-
]);
|
|
28
|
+
export const VideoGenerationAspectRatio = /* @__PURE__ */ defineSchema(() =>
|
|
29
|
+
z.enum(["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "adaptive"]),
|
|
30
|
+
);
|
|
40
31
|
export type VideoGenerationAspectRatio = z.infer<typeof VideoGenerationAspectRatio>;
|
|
41
32
|
|
|
42
|
-
const SandboxVideoReferencePath =
|
|
43
|
-
.string()
|
|
44
|
-
.min(1)
|
|
45
|
-
.max(1_024)
|
|
46
|
-
.refine((value) => value.startsWith("/workspace/"), {
|
|
47
|
-
message: "video references must use an absolute /workspace path",
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export const VideoGenerationSource = z.discriminatedUnion("mode", [
|
|
51
|
-
z.object({ mode: z.literal("text") }).strict(),
|
|
33
|
+
const SandboxVideoReferencePath = /* @__PURE__ */ defineSchema(() =>
|
|
52
34
|
z
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
z
|
|
59
|
-
.object({
|
|
60
|
-
mode: z.literal("first_and_last_frames"),
|
|
61
|
-
firstFramePath: SandboxVideoReferencePath,
|
|
62
|
-
lastFramePath: SandboxVideoReferencePath,
|
|
63
|
-
})
|
|
64
|
-
.strict()
|
|
65
|
-
.refine((value) => value.firstFramePath !== value.lastFramePath, {
|
|
66
|
-
path: ["lastFramePath"],
|
|
67
|
-
message: "first and last frame paths must differ",
|
|
35
|
+
.string()
|
|
36
|
+
.min(1)
|
|
37
|
+
.max(1_024)
|
|
38
|
+
.refine((value) => value.startsWith("/workspace/"), {
|
|
39
|
+
message: "video references must use an absolute /workspace path",
|
|
68
40
|
}),
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
export const VideoGenerationSource = /* @__PURE__ */ defineSchema(() =>
|
|
44
|
+
z.discriminatedUnion("mode", [
|
|
45
|
+
z.object({ mode: z.literal("text") }).strict(),
|
|
46
|
+
z
|
|
47
|
+
.object({
|
|
48
|
+
mode: z.literal("first_frame"),
|
|
49
|
+
imagePath: SandboxVideoReferencePath,
|
|
50
|
+
})
|
|
51
|
+
.strict(),
|
|
52
|
+
z
|
|
53
|
+
.object({
|
|
54
|
+
mode: z.literal("first_and_last_frames"),
|
|
55
|
+
firstFramePath: SandboxVideoReferencePath,
|
|
56
|
+
lastFramePath: SandboxVideoReferencePath,
|
|
57
|
+
})
|
|
58
|
+
.strict()
|
|
59
|
+
.refine((value) => value.firstFramePath !== value.lastFramePath, {
|
|
60
|
+
path: ["lastFramePath"],
|
|
61
|
+
message: "first and last frame paths must differ",
|
|
62
|
+
}),
|
|
63
|
+
z
|
|
64
|
+
.object({
|
|
65
|
+
mode: z.literal("image_reference"),
|
|
66
|
+
imagePath: SandboxVideoReferencePath,
|
|
67
|
+
})
|
|
68
|
+
.strict(),
|
|
69
|
+
z
|
|
70
|
+
.object({
|
|
71
|
+
mode: z.literal("video_reference"),
|
|
72
|
+
videoPath: SandboxVideoReferencePath,
|
|
73
|
+
})
|
|
74
|
+
.strict(),
|
|
75
|
+
]),
|
|
76
|
+
);
|
|
77
|
+
export type VideoGenerationSource = z.infer<typeof VideoGenerationSource>;
|
|
78
|
+
|
|
79
|
+
/** Stable provider-neutral function-tool input. Dynamic capability facts never enter this schema. */
|
|
80
|
+
export const GenerateVideoToolInput = /* @__PURE__ */ defineSchema(() =>
|
|
69
81
|
z
|
|
70
82
|
.object({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
prompt: z
|
|
84
|
+
.string()
|
|
85
|
+
.min(1)
|
|
86
|
+
.max(32_000)
|
|
87
|
+
.refine((value) => value.trim().length > 0),
|
|
88
|
+
modelId: z.string().min(1).max(256).optional(),
|
|
89
|
+
source: VideoGenerationSource.optional(),
|
|
90
|
+
durationSeconds: z.number().int().min(4).max(30).optional(),
|
|
91
|
+
aspectRatio: VideoGenerationAspectRatio.optional(),
|
|
92
|
+
resolution: VideoGenerationResolution.optional(),
|
|
93
|
+
generateAudio: z.boolean().optional(),
|
|
79
94
|
})
|
|
80
95
|
.strict(),
|
|
81
|
-
|
|
82
|
-
export type VideoGenerationSource = z.infer<typeof VideoGenerationSource>;
|
|
83
|
-
|
|
84
|
-
/** Stable provider-neutral function-tool input. Dynamic capability facts never enter this schema. */
|
|
85
|
-
export const GenerateVideoToolInput = z
|
|
86
|
-
.object({
|
|
87
|
-
prompt: z
|
|
88
|
-
.string()
|
|
89
|
-
.min(1)
|
|
90
|
-
.max(32_000)
|
|
91
|
-
.refine((value) => value.trim().length > 0),
|
|
92
|
-
modelId: z.string().min(1).max(256).optional(),
|
|
93
|
-
source: VideoGenerationSource.optional(),
|
|
94
|
-
durationSeconds: z.number().int().min(4).max(30).optional(),
|
|
95
|
-
aspectRatio: VideoGenerationAspectRatio.optional(),
|
|
96
|
-
resolution: VideoGenerationResolution.optional(),
|
|
97
|
-
generateAudio: z.boolean().optional(),
|
|
98
|
-
})
|
|
99
|
-
.strict();
|
|
96
|
+
);
|
|
100
97
|
export type GenerateVideoToolInput = z.infer<typeof GenerateVideoToolInput>;
|
|
101
98
|
|
|
102
|
-
export const GetVideoGenerationCapabilitiesToolInput =
|
|
99
|
+
export const GetVideoGenerationCapabilitiesToolInput = /* @__PURE__ */ defineSchema(() =>
|
|
100
|
+
z.object({}).strict(),
|
|
101
|
+
);
|
|
103
102
|
export type GetVideoGenerationCapabilitiesToolInput = z.infer<
|
|
104
103
|
typeof GetVideoGenerationCapabilitiesToolInput
|
|
105
104
|
>;
|
|
106
105
|
|
|
107
|
-
export const VideoGenerationModelCapability =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
106
|
+
export const VideoGenerationModelCapability = /* @__PURE__ */ defineSchema(() =>
|
|
107
|
+
z
|
|
108
|
+
.object({
|
|
109
|
+
modelId: z.string().min(1).max(256),
|
|
110
|
+
label: z.string().min(1).max(128),
|
|
111
|
+
providerLabel: z.string().min(1).max(128),
|
|
112
|
+
sourceModes: z.array(VideoGenerationSourceMode).min(1).max(5),
|
|
113
|
+
resolutions: z.array(VideoGenerationResolution).min(1).max(2),
|
|
114
|
+
aspectRatios: z.array(VideoGenerationAspectRatio).min(1).max(7),
|
|
115
|
+
duration: z
|
|
116
|
+
.object({
|
|
117
|
+
minSeconds: z.number().int().positive(),
|
|
118
|
+
maxSeconds: z.number().int().positive(),
|
|
119
|
+
stepSeconds: z.number().int().positive(),
|
|
120
|
+
})
|
|
121
|
+
.strict()
|
|
122
|
+
.refine((value) => value.maxSeconds >= value.minSeconds),
|
|
123
|
+
supportsAudio: z.boolean(),
|
|
124
|
+
})
|
|
125
|
+
.strict(),
|
|
126
|
+
);
|
|
126
127
|
export type VideoGenerationModelCapability = z.infer<typeof VideoGenerationModelCapability>;
|
|
127
128
|
|
|
128
|
-
export const VideoGenerationCapabilities =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
129
|
+
export const VideoGenerationCapabilities = /* @__PURE__ */ defineSchema(() =>
|
|
130
|
+
z
|
|
131
|
+
.object({
|
|
132
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
133
|
+
capabilityRevision: z.string().min(1).max(128),
|
|
134
|
+
defaultModelId: z.string().min(1).max(256),
|
|
135
|
+
models: z.array(VideoGenerationModelCapability).min(1).max(16),
|
|
136
|
+
})
|
|
137
|
+
.strict()
|
|
138
|
+
.superRefine((value, ctx) => {
|
|
139
|
+
const ids = new Set(value.models.map((model) => model.modelId));
|
|
140
|
+
if (ids.size !== value.models.length) {
|
|
141
|
+
ctx.addIssue({
|
|
142
|
+
code: "custom",
|
|
143
|
+
path: ["models"],
|
|
144
|
+
message: "model ids must be unique",
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
if (!ids.has(value.defaultModelId)) {
|
|
148
|
+
ctx.addIssue({
|
|
149
|
+
code: "custom",
|
|
150
|
+
path: ["defaultModelId"],
|
|
151
|
+
message: "default model must be present in the enabled model list",
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}),
|
|
155
|
+
);
|
|
153
156
|
export type VideoGenerationCapabilities = z.infer<typeof VideoGenerationCapabilities>;
|
|
154
157
|
|
|
155
|
-
export const VideoGenerationPolicy =
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
158
|
+
export const VideoGenerationPolicy = /* @__PURE__ */ defineSchema(() =>
|
|
159
|
+
z
|
|
160
|
+
.object({
|
|
161
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
162
|
+
revision: z.number().int().nonnegative().safe(),
|
|
163
|
+
fundingSource: VideoGenerationFundingSource,
|
|
164
|
+
enabledModelIds: z.array(z.string().min(1).max(256)).max(16),
|
|
165
|
+
defaultModelId: z.string().min(1).max(256).nullable(),
|
|
166
|
+
})
|
|
167
|
+
.strict()
|
|
168
|
+
.superRefine((value, ctx) => {
|
|
169
|
+
const ids = new Set(value.enabledModelIds);
|
|
170
|
+
if (ids.size !== value.enabledModelIds.length) {
|
|
171
|
+
ctx.addIssue({
|
|
172
|
+
code: "custom",
|
|
173
|
+
path: ["enabledModelIds"],
|
|
174
|
+
message: "enabled model ids must be unique",
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
if (value.defaultModelId !== null && !ids.has(value.defaultModelId)) {
|
|
178
|
+
ctx.addIssue({
|
|
179
|
+
code: "custom",
|
|
180
|
+
path: ["defaultModelId"],
|
|
181
|
+
message: "default model must be enabled",
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}),
|
|
185
|
+
);
|
|
181
186
|
export type VideoGenerationPolicy = z.infer<typeof VideoGenerationPolicy>;
|
|
182
187
|
|
|
183
|
-
export const UpdateVideoGenerationPolicyRequest =
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
export const UpdateVideoGenerationPolicyRequest = /* @__PURE__ */ defineSchema(() =>
|
|
189
|
+
z
|
|
190
|
+
.object({
|
|
191
|
+
expectedRevision: z.number().int().nonnegative().safe(),
|
|
192
|
+
fundingSource: VideoGenerationFundingSource,
|
|
193
|
+
enabledModelIds: z.array(z.string().min(1).max(256)).max(16),
|
|
194
|
+
defaultModelId: z.string().min(1).max(256).nullable(),
|
|
195
|
+
})
|
|
196
|
+
.strict(),
|
|
197
|
+
);
|
|
191
198
|
export type UpdateVideoGenerationPolicyRequest = z.infer<typeof UpdateVideoGenerationPolicyRequest>;
|
|
192
199
|
|
|
193
|
-
export const VideoGenerationFundingOption =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
200
|
+
export const VideoGenerationFundingOption = /* @__PURE__ */ defineSchema(() =>
|
|
201
|
+
z
|
|
202
|
+
.object({
|
|
203
|
+
source: VideoGenerationFundingSource,
|
|
204
|
+
label: z.string().min(1).max(128),
|
|
205
|
+
description: z.string().min(1).max(256),
|
|
206
|
+
available: z.boolean(),
|
|
207
|
+
unavailableReason: z.string().min(1).max(256).nullable(),
|
|
208
|
+
})
|
|
209
|
+
.strict()
|
|
210
|
+
.superRefine((value, ctx) => {
|
|
211
|
+
if (value.available !== (value.unavailableReason === null)) {
|
|
212
|
+
ctx.addIssue({
|
|
213
|
+
code: "custom",
|
|
214
|
+
path: ["unavailableReason"],
|
|
215
|
+
message: "available funding options cannot have an unavailable reason",
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}),
|
|
219
|
+
);
|
|
211
220
|
export type VideoGenerationFundingOption = z.infer<typeof VideoGenerationFundingOption>;
|
|
212
221
|
|
|
213
|
-
export const WorkspaceVideoGenerationSettings =
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
222
|
+
export const WorkspaceVideoGenerationSettings = /* @__PURE__ */ defineSchema(() =>
|
|
223
|
+
z
|
|
224
|
+
.object({
|
|
225
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
226
|
+
policy: VideoGenerationPolicy,
|
|
227
|
+
fundingOptions: z.array(VideoGenerationFundingOption).length(3),
|
|
228
|
+
availableModels: z.array(VideoGenerationModelCapability).max(16),
|
|
229
|
+
capabilities: VideoGenerationCapabilities.nullable(),
|
|
230
|
+
})
|
|
231
|
+
.strict()
|
|
232
|
+
.superRefine((value, ctx) => {
|
|
233
|
+
if (
|
|
234
|
+
new Set(value.fundingOptions.map((option) => option.source)).size !== 3 ||
|
|
235
|
+
!value.fundingOptions.some((option) => option.source === "opengeni_credits") ||
|
|
236
|
+
!value.fundingOptions.some((option) => option.source === "workspace_gateway") ||
|
|
237
|
+
!value.fundingOptions.some((option) => option.source === "supergrok_subscription")
|
|
238
|
+
) {
|
|
239
|
+
ctx.addIssue({
|
|
240
|
+
code: "custom",
|
|
241
|
+
path: ["fundingOptions"],
|
|
242
|
+
message: "all funding sources must be described exactly once",
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
const selected = value.fundingOptions.find(
|
|
246
|
+
(option) => option.source === value.policy.fundingSource,
|
|
247
|
+
);
|
|
248
|
+
if (!selected) {
|
|
249
|
+
ctx.addIssue({
|
|
250
|
+
code: "custom",
|
|
251
|
+
path: ["fundingOptions"],
|
|
252
|
+
message: "the selected funding source must be described",
|
|
253
|
+
});
|
|
254
|
+
} else if (!selected.available && value.capabilities !== null) {
|
|
255
|
+
ctx.addIssue({
|
|
256
|
+
code: "custom",
|
|
257
|
+
path: ["capabilities"],
|
|
258
|
+
message: "unavailable funding cannot expose executable capabilities",
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}),
|
|
262
|
+
);
|
|
252
263
|
export type WorkspaceVideoGenerationSettings = z.infer<typeof WorkspaceVideoGenerationSettings>;
|
|
253
264
|
|
|
254
|
-
export const VideoGenerationAcceptedReceipt =
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
export const VideoGenerationAcceptedReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
266
|
+
z
|
|
267
|
+
.object({
|
|
268
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
269
|
+
status: z.literal("accepted"),
|
|
270
|
+
operationId: z.string().uuid(),
|
|
271
|
+
})
|
|
272
|
+
.strict(),
|
|
273
|
+
);
|
|
261
274
|
export type VideoGenerationAcceptedReceipt = z.infer<typeof VideoGenerationAcceptedReceipt>;
|
|
262
275
|
|
|
263
|
-
export const VideoGenerationRejectedCode =
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
276
|
+
export const VideoGenerationRejectedCode = /* @__PURE__ */ defineSchema(() =>
|
|
277
|
+
z.enum([
|
|
278
|
+
"invalid_reference_path",
|
|
279
|
+
"reference_not_stable",
|
|
280
|
+
"reference_too_large",
|
|
281
|
+
"reference_media_type_mismatch",
|
|
282
|
+
"unsupported_reference_media",
|
|
283
|
+
]),
|
|
284
|
+
);
|
|
270
285
|
export type VideoGenerationRejectedCode = z.infer<typeof VideoGenerationRejectedCode>;
|
|
271
286
|
|
|
272
287
|
/** Deterministic pre-admission rejection: no provider request or durable operation was created. */
|
|
273
|
-
export const VideoGenerationRejectedResult =
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
288
|
+
export const VideoGenerationRejectedResult = /* @__PURE__ */ defineSchema(() =>
|
|
289
|
+
z
|
|
290
|
+
.object({
|
|
291
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
292
|
+
status: z.literal("rejected"),
|
|
293
|
+
code: VideoGenerationRejectedCode,
|
|
294
|
+
message: z.string().min(1).max(512),
|
|
295
|
+
operationCreated: z.literal(false),
|
|
296
|
+
})
|
|
297
|
+
.strict(),
|
|
298
|
+
);
|
|
282
299
|
export type VideoGenerationRejectedResult = z.infer<typeof VideoGenerationRejectedResult>;
|
|
283
300
|
|
|
284
|
-
export const VideoGenerationToolResult =
|
|
285
|
-
VideoGenerationAcceptedReceipt,
|
|
286
|
-
|
|
287
|
-
]);
|
|
301
|
+
export const VideoGenerationToolResult = /* @__PURE__ */ defineSchema(() =>
|
|
302
|
+
z.discriminatedUnion("status", [VideoGenerationAcceptedReceipt, VideoGenerationRejectedResult]),
|
|
303
|
+
);
|
|
288
304
|
export type VideoGenerationToolResult = z.infer<typeof VideoGenerationToolResult>;
|
|
289
305
|
|
|
290
|
-
export const GeneratedVideoFacts =
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
306
|
+
export const GeneratedVideoFacts = /* @__PURE__ */ defineSchema(() =>
|
|
307
|
+
z
|
|
308
|
+
.object({
|
|
309
|
+
durationSeconds: z.number().positive().max(120),
|
|
310
|
+
width: z.number().int().positive().max(8_192),
|
|
311
|
+
height: z.number().int().positive().max(8_192),
|
|
312
|
+
fps: z.number().positive().max(120),
|
|
313
|
+
hasAudio: z.boolean(),
|
|
314
|
+
videoCodec: z.literal("h264"),
|
|
315
|
+
audioCodec: z.literal("aac").nullable(),
|
|
316
|
+
})
|
|
317
|
+
.strict(),
|
|
318
|
+
);
|
|
301
319
|
export type GeneratedVideoFacts = z.infer<typeof GeneratedVideoFacts>;
|
|
302
320
|
|
|
303
|
-
export const GeneratedVideoReceipt =
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
321
|
+
export const GeneratedVideoReceipt = /* @__PURE__ */ defineSchema(() =>
|
|
322
|
+
z
|
|
323
|
+
.object({
|
|
324
|
+
type: z.literal("generated_video"),
|
|
325
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
326
|
+
operationId: z.string().uuid(),
|
|
327
|
+
artifact: RetainedArtifactReferenceSchema,
|
|
328
|
+
video: GeneratedVideoFacts,
|
|
329
|
+
sandboxPath: z
|
|
330
|
+
.string()
|
|
331
|
+
.max(256)
|
|
332
|
+
.regex(
|
|
333
|
+
/^\/workspace\/generated-videos\/generated-video-[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\.mp4$/,
|
|
334
|
+
),
|
|
335
|
+
})
|
|
336
|
+
.strict()
|
|
337
|
+
.superRefine((value, ctx) => {
|
|
338
|
+
if (
|
|
339
|
+
value.artifact.kind !== "generated_video" ||
|
|
340
|
+
value.artifact.contentType !== "video/mp4" ||
|
|
341
|
+
value.artifact.originalBytes <= 0 ||
|
|
342
|
+
value.artifact.originalBytes > GENERATED_VIDEO_MAX_BYTES ||
|
|
343
|
+
value.artifact.retention.policy !== "workspace_file" ||
|
|
344
|
+
value.artifact.retrieval.maxRangeBytes !== RETAINED_OUTPUT_MAX_PAGE_BYTES
|
|
345
|
+
) {
|
|
346
|
+
ctx.addIssue({
|
|
347
|
+
code: "custom",
|
|
348
|
+
path: ["artifact"],
|
|
349
|
+
message: "generated-video artifact metadata is invalid",
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
if (
|
|
353
|
+
value.artifact.dimensions?.width !== value.video.width ||
|
|
354
|
+
value.artifact.dimensions?.height !== value.video.height
|
|
355
|
+
) {
|
|
356
|
+
ctx.addIssue({
|
|
357
|
+
code: "custom",
|
|
358
|
+
path: ["video"],
|
|
359
|
+
message: "video dimensions must match the retained artifact",
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
if (
|
|
363
|
+
value.sandboxPath !==
|
|
364
|
+
`/workspace/generated-videos/generated-video-${value.artifact.artifactId}.mp4`
|
|
365
|
+
) {
|
|
366
|
+
ctx.addIssue({
|
|
367
|
+
code: "custom",
|
|
368
|
+
path: ["sandboxPath"],
|
|
369
|
+
message: "generated-video sandbox path does not match its artifact",
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
}),
|
|
373
|
+
);
|
|
354
374
|
export type GeneratedVideoReceipt = z.infer<typeof GeneratedVideoReceipt>;
|
|
355
375
|
|
|
356
|
-
export const VideoGenerationTerminalFailureStatus =
|
|
357
|
-
"provider_failed",
|
|
358
|
-
|
|
359
|
-
"cancelled_before_submit",
|
|
360
|
-
"outcome_unknown",
|
|
361
|
-
]);
|
|
376
|
+
export const VideoGenerationTerminalFailureStatus = /* @__PURE__ */ defineSchema(() =>
|
|
377
|
+
z.enum(["provider_failed", "retention_failed", "cancelled_before_submit", "outcome_unknown"]),
|
|
378
|
+
);
|
|
362
379
|
export type VideoGenerationTerminalFailureStatus = z.infer<
|
|
363
380
|
typeof VideoGenerationTerminalFailureStatus
|
|
364
381
|
>;
|
|
365
382
|
|
|
366
|
-
export const MediaGenerationResult =
|
|
383
|
+
export const MediaGenerationResult = /* @__PURE__ */ defineSchema(() =>
|
|
384
|
+
z.discriminatedUnion("status", [
|
|
385
|
+
z
|
|
386
|
+
.object({
|
|
387
|
+
type: z.literal("media_generation_result"),
|
|
388
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
389
|
+
status: z.literal("ready"),
|
|
390
|
+
operationId: z.string().uuid(),
|
|
391
|
+
receipt: GeneratedVideoReceipt,
|
|
392
|
+
})
|
|
393
|
+
.strict()
|
|
394
|
+
.refine((value) => value.receipt.operationId === value.operationId, {
|
|
395
|
+
path: ["receipt", "operationId"],
|
|
396
|
+
message: "terminal receipt must match its operation",
|
|
397
|
+
}),
|
|
398
|
+
z
|
|
399
|
+
.object({
|
|
400
|
+
type: z.literal("media_generation_result"),
|
|
401
|
+
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
402
|
+
status: VideoGenerationTerminalFailureStatus,
|
|
403
|
+
operationId: z.string().uuid(),
|
|
404
|
+
boundedPublicReason: z.string().min(1).max(1_000),
|
|
405
|
+
})
|
|
406
|
+
.strict(),
|
|
407
|
+
]),
|
|
408
|
+
);
|
|
409
|
+
export type MediaGenerationResult = z.infer<typeof MediaGenerationResult>;
|
|
410
|
+
|
|
411
|
+
export const VideoGenerationPublicStatus = /* @__PURE__ */ defineSchema(() =>
|
|
412
|
+
z.enum([
|
|
413
|
+
"preparing",
|
|
414
|
+
"prepared",
|
|
415
|
+
"accepted",
|
|
416
|
+
"provider_started",
|
|
417
|
+
"retaining",
|
|
418
|
+
"completed",
|
|
419
|
+
"provider_failed",
|
|
420
|
+
"cancelled_before_submit",
|
|
421
|
+
"outcome_unknown",
|
|
422
|
+
"retention_failed",
|
|
423
|
+
]),
|
|
424
|
+
);
|
|
425
|
+
export type VideoGenerationPublicStatus = z.infer<typeof VideoGenerationPublicStatus>;
|
|
426
|
+
|
|
427
|
+
export const VideoGenerationOperationSummary = /* @__PURE__ */ defineSchema(() =>
|
|
367
428
|
z
|
|
368
429
|
.object({
|
|
369
|
-
type: z.literal("media_generation_result"),
|
|
370
430
|
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
371
|
-
status: z.literal("ready"),
|
|
372
431
|
operationId: z.string().uuid(),
|
|
373
|
-
|
|
432
|
+
modelId: z.string().min(1).max(256),
|
|
433
|
+
status: VideoGenerationPublicStatus,
|
|
434
|
+
createdAt: z.string().datetime({ offset: true }),
|
|
435
|
+
updatedAt: z.string().datetime({ offset: true }),
|
|
436
|
+
terminal: MediaGenerationResult.nullable(),
|
|
374
437
|
})
|
|
375
|
-
.strict()
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
438
|
+
.strict(),
|
|
439
|
+
);
|
|
440
|
+
export type VideoGenerationOperationSummary = z.infer<typeof VideoGenerationOperationSummary>;
|
|
441
|
+
|
|
442
|
+
export const VideoArtifactPlaybackSource = /* @__PURE__ */ defineSchema(() =>
|
|
380
443
|
z
|
|
381
444
|
.object({
|
|
382
|
-
type: z.literal("media_generation_result"),
|
|
383
445
|
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
446
|
+
artifactId: z.string().uuid(),
|
|
447
|
+
url: z.string().url().max(8_192),
|
|
448
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
449
|
+
contentType: z.literal("video/mp4"),
|
|
450
|
+
sizeBytes: z.number().int().positive().max(GENERATED_VIDEO_MAX_BYTES),
|
|
451
|
+
sha256: z.string().regex(/^[0-9a-f]{64}$/),
|
|
452
|
+
acceptRanges: z.literal("bytes"),
|
|
387
453
|
})
|
|
388
454
|
.strict(),
|
|
389
|
-
|
|
390
|
-
export type MediaGenerationResult = z.infer<typeof MediaGenerationResult>;
|
|
391
|
-
|
|
392
|
-
export const VideoGenerationPublicStatus = z.enum([
|
|
393
|
-
"preparing",
|
|
394
|
-
"prepared",
|
|
395
|
-
"accepted",
|
|
396
|
-
"provider_started",
|
|
397
|
-
"retaining",
|
|
398
|
-
"completed",
|
|
399
|
-
"provider_failed",
|
|
400
|
-
"cancelled_before_submit",
|
|
401
|
-
"outcome_unknown",
|
|
402
|
-
"retention_failed",
|
|
403
|
-
]);
|
|
404
|
-
export type VideoGenerationPublicStatus = z.infer<typeof VideoGenerationPublicStatus>;
|
|
405
|
-
|
|
406
|
-
export const VideoGenerationOperationSummary = z
|
|
407
|
-
.object({
|
|
408
|
-
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
409
|
-
operationId: z.string().uuid(),
|
|
410
|
-
modelId: z.string().min(1).max(256),
|
|
411
|
-
status: VideoGenerationPublicStatus,
|
|
412
|
-
createdAt: z.string().datetime({ offset: true }),
|
|
413
|
-
updatedAt: z.string().datetime({ offset: true }),
|
|
414
|
-
terminal: MediaGenerationResult.nullable(),
|
|
415
|
-
})
|
|
416
|
-
.strict();
|
|
417
|
-
export type VideoGenerationOperationSummary = z.infer<typeof VideoGenerationOperationSummary>;
|
|
418
|
-
|
|
419
|
-
export const VideoArtifactPlaybackSource = z
|
|
420
|
-
.object({
|
|
421
|
-
schemaVersion: z.literal(VIDEO_GENERATION_SCHEMA_VERSION),
|
|
422
|
-
artifactId: z.string().uuid(),
|
|
423
|
-
url: z.string().url().max(8_192),
|
|
424
|
-
expiresAt: z.string().datetime({ offset: true }),
|
|
425
|
-
contentType: z.literal("video/mp4"),
|
|
426
|
-
sizeBytes: z.number().int().positive().max(GENERATED_VIDEO_MAX_BYTES),
|
|
427
|
-
sha256: z.string().regex(/^[0-9a-f]{64}$/),
|
|
428
|
-
acceptRanges: z.literal("bytes"),
|
|
429
|
-
})
|
|
430
|
-
.strict();
|
|
455
|
+
);
|
|
431
456
|
export type VideoArtifactPlaybackSource = z.infer<typeof VideoArtifactPlaybackSource>;
|