@clipwright/core 0.60.0 → 0.61.0
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/account-actors.d.ts +0 -43
- package/dist/account-actors.js +0 -55
- package/dist/account.d.ts +0 -6
- package/dist/account.js +0 -18
- package/dist/actor-bounds.d.ts +0 -5
- package/dist/actor-bounds.js +0 -6
- package/dist/actor-qualities.d.ts +0 -3
- package/dist/actor-qualities.js +0 -4
- package/dist/actors.d.ts +0 -16
- package/dist/actors.js +0 -21
- package/dist/ad-guide.js +0 -2
- package/dist/ad-pause-trim.d.ts +0 -5
- package/dist/ad-pause-trim.js +0 -8
- package/dist/api-failure.d.ts +0 -44
- package/dist/api-failure.js +0 -62
- package/dist/aspect.d.ts +0 -29
- package/dist/aspect.js +1 -34
- package/dist/asset-identity.d.ts +0 -2
- package/dist/asset-identity.js +0 -3
- package/dist/assets.d.ts +0 -34
- package/dist/assets.js +0 -42
- package/dist/billing-terms.d.ts +0 -3
- package/dist/billing-terms.js +0 -4
- package/dist/brand-styles.d.ts +0 -6
- package/dist/brand-styles.js +0 -13
- package/dist/broll-policy.js +0 -1
- package/dist/canvas-fit.d.ts +0 -2
- package/dist/canvas-fit.js +0 -4
- package/dist/caption-funnel.d.ts +0 -2
- package/dist/caption-funnel.js +0 -15
- package/dist/caption-geometry.d.ts +0 -6
- package/dist/caption-geometry.js +0 -10
- package/dist/caption-language.d.ts +0 -3
- package/dist/caption-language.js +0 -6
- package/dist/contract-dispositions.d.ts +0 -61
- package/dist/contract-dispositions.js +3 -96
- package/dist/contracts/v1/workflow-brief.d.ts +57 -3
- package/dist/contracts/v1/workflow-brief.js +0 -13
- package/dist/contracts/v1/workflow-catalog.d.ts +114 -0
- package/dist/contracts/v1/workflow-catalog.js +0 -3
- package/dist/contracts/v1/workflow-client.d.ts +114 -0
- package/dist/contracts/v1/workflow-client.js +0 -1
- package/dist/contracts/v1/workflow-dto.js +0 -1
- package/dist/contracts/v1/workflow-evidence.js +0 -1
- package/dist/contracts/v1/workflow-execution.d.ts +0 -1
- package/dist/contracts/v1/workflow-execution.js +0 -4
- package/dist/contracts/v1/workflow-next.d.ts +0 -2
- package/dist/contracts/v1/workflow-next.js +0 -3
- package/dist/contracts/v1/workflow-plan.d.ts +171 -0
- package/dist/contracts/v1/workflow-plan.js +0 -1
- package/dist/contracts/v1/workflow-primitives.d.ts +0 -1
- package/dist/contracts/v1/workflow-primitives.js +0 -2
- package/dist/contracts/v1/workflow-run-read.d.ts +0 -1
- package/dist/contracts/v1/workflow-run-read.js +0 -3
- package/dist/creator-profile.d.ts +0 -30
- package/dist/creator-profile.js +0 -45
- package/dist/default-actor.js +0 -2
- package/dist/design.d.ts +0 -17
- package/dist/design.js +0 -18
- package/dist/edit-billing.d.ts +0 -6
- package/dist/edit-billing.js +0 -10
- package/dist/edit-candidate.d.ts +0 -6
- package/dist/edit-candidate.js +0 -9
- package/dist/edit-document.d.ts +0 -12
- package/dist/edit-document.js +0 -15
- package/dist/edit-faceless.d.ts +0 -3
- package/dist/edit-faceless.js +0 -4
- package/dist/edit-long-form.d.ts +0 -13
- package/dist/edit-long-form.js +0 -17
- package/dist/edit-operations.d.ts +0 -1
- package/dist/edit-operations.js +0 -2
- package/dist/edit-primitives.d.ts +0 -3
- package/dist/edit-primitives.js +0 -5
- package/dist/edit-revision.d.ts +0 -4
- package/dist/edit-revision.js +0 -6
- package/dist/edit-rules.d.ts +0 -3
- package/dist/edit-rules.js +0 -9
- package/dist/edit-shots.d.ts +45 -5
- package/dist/edit-shots.js +7 -11
- package/dist/edit-validate.d.ts +0 -10
- package/dist/edit-validate.js +0 -14
- package/dist/edit.js +0 -3
- package/dist/endpoint-notes.d.ts +0 -2
- package/dist/endpoint-notes.js +0 -3
- package/dist/endpoints.d.ts +0 -11
- package/dist/endpoints.js +7 -21
- package/dist/errors.d.ts +0 -42
- package/dist/errors.js +0 -54
- package/dist/explainer-fit.d.ts +0 -7
- package/dist/explainer-fit.js +0 -10
- package/dist/face-billing.d.ts +0 -9
- package/dist/face-billing.js +0 -23
- package/dist/face-delivery.d.ts +0 -1
- package/dist/face-delivery.js +0 -2
- package/dist/faceless-action-shots.d.ts +0 -8
- package/dist/faceless-action-shots.js +0 -8
- package/dist/faceless-customer-anchors.d.ts +0 -1
- package/dist/faceless-customer-anchors.js +0 -2
- package/dist/faceless-cut-style.js +0 -1
- package/dist/faceless-direction-summary.d.ts +0 -2
- package/dist/faceless-direction-summary.js +0 -3
- package/dist/faceless-image-placement.d.ts +0 -2
- package/dist/faceless-image-placement.js +0 -3
- package/dist/faceless-image-qualification.js +0 -2
- package/dist/faceless-media-record.d.ts +0 -6
- package/dist/faceless-media-record.js +0 -11
- package/dist/faceless-price.d.ts +0 -45
- package/dist/faceless-price.js +0 -64
- package/dist/faceless-public-plan.d.ts +0 -13
- package/dist/faceless-public-plan.js +0 -11
- package/dist/faceless-public.d.ts +0 -26
- package/dist/faceless-public.js +0 -59
- package/dist/faceless-short-61.js +0 -1
- package/dist/faceless-storyboard-timing.js +0 -1
- package/dist/faceless-storyboard-v2-plan.js +0 -1
- package/dist/faceless-storyboard-v2-timing.d.ts +0 -4
- package/dist/faceless-storyboard-v2-timing.js +0 -3
- package/dist/faceless-storyboard-v2.js +0 -1
- package/dist/faceless-storyboard.js +0 -1
- package/dist/faceless-voices.d.ts +0 -16
- package/dist/faceless-voices.js +0 -18
- package/dist/feedback.d.ts +0 -4
- package/dist/feedback.js +0 -5
- package/dist/film-directions.d.ts +0 -2
- package/dist/film-directions.js +0 -7
- package/dist/film-drafts.d.ts +0 -8
- package/dist/film-drafts.js +0 -19
- package/dist/film-guide.d.ts +0 -3
- package/dist/film-guide.js +0 -6
- package/dist/film-styles.d.ts +0 -5
- package/dist/film-styles.js +0 -8
- package/dist/generation-shot.d.ts +0 -5
- package/dist/generation-shot.js +0 -8
- package/dist/generations-output.d.ts +0 -2
- package/dist/generations-output.js +0 -5
- package/dist/generations.d.ts +0 -22
- package/dist/generations.js +21 -44
- package/dist/idempotency.d.ts +1 -21
- package/dist/idempotency.js +8 -29
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -28
- package/dist/live-shot-kinds.d.ts +16 -25
- package/dist/live-shot-kinds.js +12 -28
- package/dist/long-form-pricing.d.ts +0 -5
- package/dist/long-form-pricing.js +0 -6
- package/dist/long-form-profile.d.ts +0 -3
- package/dist/long-form-profile.js +0 -4
- package/dist/long-form-revision.d.ts +0 -9
- package/dist/long-form-revision.js +0 -11
- package/dist/markdown-quote.d.ts +0 -2
- package/dist/markdown-quote.js +0 -3
- package/dist/mascots.d.ts +0 -5
- package/dist/mascots.js +0 -10
- package/dist/max-credits.d.ts +0 -1
- package/dist/max-credits.js +0 -2
- package/dist/mcp-ugc-descriptions.d.ts +0 -2
- package/dist/mcp-ugc-descriptions.js +1 -6
- package/dist/media-timebase.d.ts +0 -2
- package/dist/media-timebase.js +0 -6
- package/dist/motion-styles.d.ts +0 -8
- package/dist/motion-styles.js +0 -11
- package/dist/moves.d.ts +0 -7
- package/dist/moves.js +0 -9
- package/dist/music.d.ts +0 -5
- package/dist/music.js +0 -8
- package/dist/naming.d.ts +0 -3
- package/dist/naming.js +0 -19
- package/dist/openapi.d.ts +0 -13
- package/dist/openapi.js +6 -11
- package/dist/output-provenance.d.ts +0 -4
- package/dist/output-provenance.js +0 -5
- package/dist/own-agent-price.d.ts +19 -22
- package/dist/own-agent-price.js +30 -25
- package/dist/own-agent-runs.d.ts +111 -11
- package/dist/own-agent-runs.js +89 -24
- package/dist/pacing.d.ts +3 -15
- package/dist/pacing.js +18 -18
- package/dist/parts-pricing.d.ts +0 -28
- package/dist/parts-pricing.js +0 -32
- package/dist/post-text.d.ts +0 -2
- package/dist/post-text.js +0 -4
- package/dist/presenter-beats.d.ts +0 -10
- package/dist/presenter-beats.js +0 -14
- package/dist/presenter-matte.d.ts +0 -7
- package/dist/presenter-matte.js +0 -9
- package/dist/presenter-takes.d.ts +0 -3
- package/dist/presenter-takes.js +0 -8
- package/dist/prices.d.ts +2 -8
- package/dist/prices.js +13 -23
- package/dist/public-endpoints.d.ts +0 -11
- package/dist/public-endpoints.js +0 -14
- package/dist/public-responses.d.ts +0 -2
- package/dist/public-responses.js +0 -3
- package/dist/rate-limit.d.ts +0 -24
- package/dist/rate-limit.js +0 -29
- package/dist/reference-analysis.d.ts +57 -34
- package/dist/reference-analysis.js +0 -69
- package/dist/reference-bring.d.ts +33 -0
- package/dist/reference-bring.js +28 -0
- package/dist/reference-display.d.ts +0 -3
- package/dist/reference-display.js +37 -4
- package/dist/reference-kinds.d.ts +0 -4
- package/dist/reference-kinds.js +0 -6
- package/dist/reference-lyrics.d.ts +0 -6
- package/dist/reference-lyrics.js +0 -6
- package/dist/reference-profile.d.ts +270 -39
- package/dist/reference-profile.js +64 -50
- package/dist/reference-staging.d.ts +0 -10
- package/dist/reference-staging.js +0 -14
- package/dist/reference-text-spans.d.ts +0 -4
- package/dist/reference-text-spans.js +0 -7
- package/dist/reference-voice-over.d.ts +0 -6
- package/dist/reference-voice-over.js +0 -7
- package/dist/reference-voice.d.ts +0 -7
- package/dist/reference-voice.js +0 -12
- package/dist/render-backend.d.ts +0 -30
- package/dist/render-backend.js +0 -5
- package/dist/resolved-timeline.d.ts +0 -4
- package/dist/resolved-timeline.js +1 -31
- package/dist/run-media.d.ts +0 -1
- package/dist/run-media.js +0 -2
- package/dist/run-preflight.d.ts +0 -4
- package/dist/run-preflight.js +0 -11
- package/dist/run-static-warnings.d.ts +0 -8
- package/dist/run-static-warnings.js +0 -38
- package/dist/runs.d.ts +0 -32
- package/dist/runs.js +0 -50
- package/dist/scene-bible.d.ts +15 -7
- package/dist/scene-bible.js +15 -10
- package/dist/scene-graph.d.ts +0 -12
- package/dist/scene-graph.js +0 -24
- package/dist/scene-place.d.ts +0 -25
- package/dist/scene-place.js +0 -24
- package/dist/scene-proposal.d.ts +0 -3
- package/dist/scene-proposal.js +0 -9
- package/dist/script-integrity.d.ts +0 -6
- package/dist/script-integrity.js +0 -8
- package/dist/script-voice.d.ts +0 -7
- package/dist/script-voice.js +0 -16
- package/dist/semantic-inserts.d.ts +0 -7
- package/dist/semantic-inserts.js +0 -10
- package/dist/skill-theme-explainer.js +0 -5
- package/dist/skill-theme.d.ts +0 -13
- package/dist/skill-theme.js +0 -25
- package/dist/skills.d.ts +22 -86
- package/dist/skills.js +21 -167
- package/dist/speech-rhythm-contract.js +0 -1
- package/dist/speech-rhythm.d.ts +0 -4
- package/dist/speech-rhythm.js +0 -2
- package/dist/templates/backdrop.d.ts +0 -3
- package/dist/templates/backdrop.js +0 -5
- package/dist/templates/callout.d.ts +0 -4
- package/dist/templates/callout.js +0 -6
- package/dist/templates/chart.d.ts +0 -4
- package/dist/templates/chart.js +0 -6
- package/dist/templates/chat-window.d.ts +0 -8
- package/dist/templates/chat-window.js +0 -10
- package/dist/templates/checklist.d.ts +0 -3
- package/dist/templates/checklist.js +0 -6
- package/dist/templates/comment-cta.d.ts +0 -14
- package/dist/templates/comment-cta.js +0 -19
- package/dist/templates/compare.d.ts +0 -6
- package/dist/templates/compare.js +0 -7
- package/dist/templates/cover-story.d.ts +0 -1
- package/dist/templates/cover-story.js +0 -3
- package/dist/templates/end-card.d.ts +0 -2
- package/dist/templates/end-card.js +0 -3
- package/dist/templates/hand-title.d.ts +0 -5
- package/dist/templates/hand-title.js +0 -9
- package/dist/templates/index.d.ts +0 -57
- package/dist/templates/index.js +0 -60
- package/dist/templates/lower-third.d.ts +0 -4
- package/dist/templates/lower-third.js +0 -5
- package/dist/templates/notification.d.ts +0 -6
- package/dist/templates/notification.js +0 -7
- package/dist/templates/phone-call.d.ts +0 -2
- package/dist/templates/phone-call.js +0 -6
- package/dist/templates/phone-screen.d.ts +0 -5
- package/dist/templates/phone-screen.js +0 -7
- package/dist/templates/pointer-chips.d.ts +0 -4
- package/dist/templates/pointer-chips.js +0 -6
- package/dist/templates/progress.d.ts +0 -3
- package/dist/templates/progress.js +0 -5
- package/dist/templates/quote.d.ts +0 -3
- package/dist/templates/quote.js +0 -4
- package/dist/templates/race.d.ts +0 -5
- package/dist/templates/race.js +0 -7
- package/dist/templates/rating.d.ts +0 -3
- package/dist/templates/rating.js +0 -5
- package/dist/templates/series-frame.d.ts +0 -16
- package/dist/templates/series-frame.js +0 -19
- package/dist/templates/size.d.ts +0 -7
- package/dist/templates/size.js +0 -8
- package/dist/templates/slot.d.ts +0 -2
- package/dist/templates/slot.js +0 -2
- package/dist/templates/sounds.d.ts +0 -12
- package/dist/templates/sounds.js +0 -16
- package/dist/templates/stat.d.ts +0 -3
- package/dist/templates/stat.js +0 -5
- package/dist/templates/tag.d.ts +0 -3
- package/dist/templates/tag.js +0 -5
- package/dist/templates/terminal.d.ts +0 -6
- package/dist/templates/terminal.js +0 -8
- package/dist/templates/theme.d.ts +0 -7
- package/dist/templates/theme.js +0 -9
- package/dist/templates/title-card.d.ts +0 -3
- package/dist/templates/title-card.js +0 -5
- package/dist/templates/video-grid.d.ts +0 -5
- package/dist/templates/video-grid.js +0 -8
- package/dist/templates/word-fill.d.ts +0 -3
- package/dist/templates/word-fill.js +0 -4
- package/dist/templates/word-title.d.ts +0 -2
- package/dist/templates/word-title.js +0 -4
- package/dist/trend-niches.d.ts +0 -11
- package/dist/trend-niches.js +0 -16
- package/dist/trend-search.d.ts +0 -66
- package/dist/trend-search.js +0 -70
- package/dist/tts-backend.d.ts +0 -19
- package/dist/tts-backend.js +0 -7
- package/dist/ugc-call.d.ts +0 -16
- package/dist/ugc-call.js +0 -21
- package/dist/ugc-delivery.d.ts +0 -2
- package/dist/ugc-delivery.js +0 -4
- package/dist/ugc-framing.d.ts +0 -4
- package/dist/ugc-framing.js +0 -6
- package/dist/ugc-interview.d.ts +0 -18
- package/dist/ugc-interview.js +0 -24
- package/dist/ugc-layers.d.ts +0 -39
- package/dist/ugc-layers.js +0 -39
- package/dist/ugc-scenes.d.ts +0 -2
- package/dist/ugc-scenes.js +0 -5
- package/dist/ugc-video-media.d.ts +0 -5
- package/dist/ugc-video-media.js +0 -7
- package/dist/uploads.d.ts +0 -14
- package/dist/uploads.js +0 -17
- package/dist/vendor-response.d.ts +0 -19
- package/dist/vendor-response.js +0 -22
- package/dist/video-size.d.ts +0 -4
- package/dist/video-size.js +0 -7
- package/dist/voice-admission.d.ts +0 -11
- package/dist/voice-admission.js +0 -13
- package/dist/voice-catalog-data.d.ts +0 -2
- package/dist/voice-catalog-data.js +0 -3
- package/dist/voice-catalog.d.ts +0 -6
- package/dist/voice-catalog.js +0 -8
- package/dist/voice-listing.d.ts +0 -6
- package/dist/voice-listing.js +0 -14
- package/dist/voice-pace.d.ts +0 -4
- package/dist/voice-pace.js +0 -7
- package/dist/voice-preview-approval.js +0 -1
- package/dist/voices.d.ts +4 -69
- package/dist/voices.js +3 -88
- package/dist/workflows/catalog.d.ts +0 -2
- package/dist/workflows/catalog.js +0 -4
- package/dist/workflows/film-directions.d.ts +0 -3
- package/dist/workflows/film-directions.js +0 -4
- package/dist/workflows/index.js +0 -1
- package/dist/workflows/methods/faceless-explainer.d.ts +31 -0
- package/dist/workflows/methods/faceless-explainer.js +0 -1
- package/dist/workflows/methods/kinetic-launch.d.ts +62 -1
- package/dist/workflows/methods/kinetic-launch.js +0 -2
- package/dist/workflows/methods/product-image-story.d.ts +31 -0
- package/dist/workflows/methods/product-image-story.js +0 -1
- package/dist/workflows/methods/reference-remake.d.ts +31 -0
- package/dist/workflows/methods/reference-remake.js +0 -1
- package/dist/workflows/methods/shared.d.ts +31 -1
- package/dist/workflows/methods/shared.js +0 -3
- package/dist/workflows/methods/ugc-faq-answer.d.ts +31 -0
- package/dist/workflows/methods/ugc-faq-answer.js +0 -1
- package/dist/workflows/methods/ugc-product-intro.d.ts +31 -0
- package/dist/workflows/methods/ugc-product-intro.js +0 -1
- package/dist/workflows/methods/website-proof-demo.d.ts +62 -1
- package/dist/workflows/methods/website-proof-demo.js +0 -2
- package/dist/workflows/motion-director.d.ts +0 -11
- package/dist/workflows/motion-director.js +0 -11
- package/dist/workflows/product-references.js +0 -1
- package/dist/workflows/reference-remake.d.ts +114 -17
- package/dist/workflows/reference-remake.js +0 -167
- package/dist/workflows/remake-chooser.d.ts +0 -6
- package/dist/workflows/remake-chooser.js +0 -4
- package/dist/workflows/remake-motion.d.ts +0 -16
- package/dist/workflows/remake-motion.js +0 -19
- package/dist/workflows/validate.d.ts +0 -1
- package/dist/workflows/validate.js +0 -5
- package/dist/workflows.js +0 -1
- package/package.json +1 -1
- package/dist/account-actors.js.map +0 -1
- package/dist/account.js.map +0 -1
- package/dist/actor-bounds.js.map +0 -1
- package/dist/actor-qualities.js.map +0 -1
- package/dist/actors.js.map +0 -1
- package/dist/ad-guide.js.map +0 -1
- package/dist/ad-pause-trim.js.map +0 -1
- package/dist/api-failure.js.map +0 -1
- package/dist/aspect.js.map +0 -1
- package/dist/asset-identity.js.map +0 -1
- package/dist/assets.js.map +0 -1
- package/dist/billing-terms.js.map +0 -1
- package/dist/brand-styles.js.map +0 -1
- package/dist/broll-policy.js.map +0 -1
- package/dist/canvas-fit.js.map +0 -1
- package/dist/caption-funnel.js.map +0 -1
- package/dist/caption-geometry.js.map +0 -1
- package/dist/caption-language.js.map +0 -1
- package/dist/contract-dispositions.js.map +0 -1
- package/dist/contracts/v1/workflow-brief.js.map +0 -1
- package/dist/contracts/v1/workflow-catalog.js.map +0 -1
- package/dist/contracts/v1/workflow-client.js.map +0 -1
- package/dist/contracts/v1/workflow-dto.js.map +0 -1
- package/dist/contracts/v1/workflow-evidence.js.map +0 -1
- package/dist/contracts/v1/workflow-execution.js.map +0 -1
- package/dist/contracts/v1/workflow-next.js.map +0 -1
- package/dist/contracts/v1/workflow-plan.js.map +0 -1
- package/dist/contracts/v1/workflow-primitives.js.map +0 -1
- package/dist/contracts/v1/workflow-run-read.js.map +0 -1
- package/dist/creator-profile.js.map +0 -1
- package/dist/default-actor.js.map +0 -1
- package/dist/design.js.map +0 -1
- package/dist/edit-billing.js.map +0 -1
- package/dist/edit-candidate.js.map +0 -1
- package/dist/edit-document.js.map +0 -1
- package/dist/edit-faceless.js.map +0 -1
- package/dist/edit-long-form.js.map +0 -1
- package/dist/edit-operations.js.map +0 -1
- package/dist/edit-primitives.js.map +0 -1
- package/dist/edit-revision.js.map +0 -1
- package/dist/edit-rules.js.map +0 -1
- package/dist/edit-shots.js.map +0 -1
- package/dist/edit-validate.js.map +0 -1
- package/dist/edit.js.map +0 -1
- package/dist/endpoint-notes.js.map +0 -1
- package/dist/endpoints.js.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/explainer-fit.js.map +0 -1
- package/dist/face-billing.js.map +0 -1
- package/dist/face-delivery.js.map +0 -1
- package/dist/faceless-action-shots.js.map +0 -1
- package/dist/faceless-customer-anchors.js.map +0 -1
- package/dist/faceless-cut-style.js.map +0 -1
- package/dist/faceless-direction-summary.js.map +0 -1
- package/dist/faceless-image-placement.js.map +0 -1
- package/dist/faceless-image-qualification.js.map +0 -1
- package/dist/faceless-media-record.js.map +0 -1
- package/dist/faceless-price.js.map +0 -1
- package/dist/faceless-public-plan.js.map +0 -1
- package/dist/faceless-public.js.map +0 -1
- package/dist/faceless-short-61.js.map +0 -1
- package/dist/faceless-storyboard-timing.js.map +0 -1
- package/dist/faceless-storyboard-v2-plan.js.map +0 -1
- package/dist/faceless-storyboard-v2-timing.js.map +0 -1
- package/dist/faceless-storyboard-v2.js.map +0 -1
- package/dist/faceless-storyboard.js.map +0 -1
- package/dist/faceless-voices.js.map +0 -1
- package/dist/feedback.js.map +0 -1
- package/dist/film-directions.js.map +0 -1
- package/dist/film-drafts.js.map +0 -1
- package/dist/film-guide.js.map +0 -1
- package/dist/film-styles.js.map +0 -1
- package/dist/generation-shot.js.map +0 -1
- package/dist/generations-output.js.map +0 -1
- package/dist/generations.js.map +0 -1
- package/dist/idempotency.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/live-shot-kinds.js.map +0 -1
- package/dist/long-form-pricing.js.map +0 -1
- package/dist/long-form-profile.js.map +0 -1
- package/dist/long-form-revision.js.map +0 -1
- package/dist/markdown-quote.js.map +0 -1
- package/dist/mascots.js.map +0 -1
- package/dist/max-credits.js.map +0 -1
- package/dist/mcp-ugc-descriptions.js.map +0 -1
- package/dist/media-timebase.js.map +0 -1
- package/dist/motion-styles.js.map +0 -1
- package/dist/moves.js.map +0 -1
- package/dist/music.js.map +0 -1
- package/dist/naming.js.map +0 -1
- package/dist/openapi.js.map +0 -1
- package/dist/output-provenance.js.map +0 -1
- package/dist/own-agent-price.js.map +0 -1
- package/dist/own-agent-runs.js.map +0 -1
- package/dist/pacing.js.map +0 -1
- package/dist/parts-pricing.js.map +0 -1
- package/dist/post-text.js.map +0 -1
- package/dist/presenter-beats.js.map +0 -1
- package/dist/presenter-matte.js.map +0 -1
- package/dist/presenter-takes.js.map +0 -1
- package/dist/prices.js.map +0 -1
- package/dist/public-endpoints.js.map +0 -1
- package/dist/public-responses.js.map +0 -1
- package/dist/rate-limit.js.map +0 -1
- package/dist/reference-analysis.js.map +0 -1
- package/dist/reference-display.js.map +0 -1
- package/dist/reference-kinds.js.map +0 -1
- package/dist/reference-lyrics.js.map +0 -1
- package/dist/reference-profile.js.map +0 -1
- package/dist/reference-staging.js.map +0 -1
- package/dist/reference-text-spans.js.map +0 -1
- package/dist/reference-voice-over.js.map +0 -1
- package/dist/reference-voice.js.map +0 -1
- package/dist/render-backend.js.map +0 -1
- package/dist/resolved-timeline.js.map +0 -1
- package/dist/run-media.js.map +0 -1
- package/dist/run-preflight.js.map +0 -1
- package/dist/run-static-warnings.js.map +0 -1
- package/dist/runs.js.map +0 -1
- package/dist/scene-bible.js.map +0 -1
- package/dist/scene-graph.js.map +0 -1
- package/dist/scene-place.js.map +0 -1
- package/dist/scene-proposal.js.map +0 -1
- package/dist/script-integrity.js.map +0 -1
- package/dist/script-voice.js.map +0 -1
- package/dist/semantic-inserts.js.map +0 -1
- package/dist/skill-theme-explainer.js.map +0 -1
- package/dist/skill-theme.js.map +0 -1
- package/dist/skills.js.map +0 -1
- package/dist/speech-rhythm-contract.js.map +0 -1
- package/dist/speech-rhythm.js.map +0 -1
- package/dist/templates/backdrop.js.map +0 -1
- package/dist/templates/callout.js.map +0 -1
- package/dist/templates/chart.js.map +0 -1
- package/dist/templates/chat-window.js.map +0 -1
- package/dist/templates/checklist.js.map +0 -1
- package/dist/templates/comment-cta.js.map +0 -1
- package/dist/templates/compare.js.map +0 -1
- package/dist/templates/cover-story.js.map +0 -1
- package/dist/templates/end-card.js.map +0 -1
- package/dist/templates/hand-title.js.map +0 -1
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/lower-third.js.map +0 -1
- package/dist/templates/notification.js.map +0 -1
- package/dist/templates/phone-call.js.map +0 -1
- package/dist/templates/phone-screen.js.map +0 -1
- package/dist/templates/pointer-chips.js.map +0 -1
- package/dist/templates/progress.js.map +0 -1
- package/dist/templates/quote.js.map +0 -1
- package/dist/templates/race.js.map +0 -1
- package/dist/templates/rating.js.map +0 -1
- package/dist/templates/series-frame.js.map +0 -1
- package/dist/templates/size.js.map +0 -1
- package/dist/templates/slot.js.map +0 -1
- package/dist/templates/sounds.js.map +0 -1
- package/dist/templates/stat.js.map +0 -1
- package/dist/templates/tag.js.map +0 -1
- package/dist/templates/terminal.js.map +0 -1
- package/dist/templates/theme.js.map +0 -1
- package/dist/templates/title-card.js.map +0 -1
- package/dist/templates/video-grid.js.map +0 -1
- package/dist/templates/word-fill.js.map +0 -1
- package/dist/templates/word-title.js.map +0 -1
- package/dist/trend-niches.js.map +0 -1
- package/dist/trend-search.js.map +0 -1
- package/dist/tts-backend.js.map +0 -1
- package/dist/ugc-call.js.map +0 -1
- package/dist/ugc-delivery.js.map +0 -1
- package/dist/ugc-framing.js.map +0 -1
- package/dist/ugc-interview.js.map +0 -1
- package/dist/ugc-layers.js.map +0 -1
- package/dist/ugc-scenes.js.map +0 -1
- package/dist/ugc-video-media.js.map +0 -1
- package/dist/uploads.js.map +0 -1
- package/dist/vendor-response.js.map +0 -1
- package/dist/video-size.js.map +0 -1
- package/dist/voice-admission.js.map +0 -1
- package/dist/voice-catalog-data.js.map +0 -1
- package/dist/voice-catalog.js.map +0 -1
- package/dist/voice-listing.js.map +0 -1
- package/dist/voice-pace.js.map +0 -1
- package/dist/voice-preview-approval.js.map +0 -1
- package/dist/voices.js.map +0 -1
- package/dist/workflows/catalog.js.map +0 -1
- package/dist/workflows/film-directions.js.map +0 -1
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/methods/faceless-explainer.js.map +0 -1
- package/dist/workflows/methods/kinetic-launch.js.map +0 -1
- package/dist/workflows/methods/product-image-story.js.map +0 -1
- package/dist/workflows/methods/reference-remake.js.map +0 -1
- package/dist/workflows/methods/shared.js.map +0 -1
- package/dist/workflows/methods/ugc-faq-answer.js.map +0 -1
- package/dist/workflows/methods/ugc-product-intro.js.map +0 -1
- package/dist/workflows/methods/website-proof-demo.js.map +0 -1
- package/dist/workflows/motion-director.js.map +0 -1
- package/dist/workflows/product-references.js.map +0 -1
- package/dist/workflows/reference-remake.js.map +0 -1
- package/dist/workflows/remake-chooser.js.map +0 -1
- package/dist/workflows/remake-motion.js.map +0 -1
- package/dist/workflows/validate.js.map +0 -1
- package/dist/workflows.js.map +0 -1
package/dist/aspect.d.ts
CHANGED
|
@@ -1,20 +1,11 @@
|
|
|
1
1
|
import { type AspectRatio, type Resolution } from "./skills.js";
|
|
2
2
|
import type { AspectSource } from "./default-actor.js";
|
|
3
|
-
/** Width-to-height ratio of each supported format. */
|
|
4
3
|
export declare const ASPECT_RATIO_VALUES: Record<AspectRatio, number>;
|
|
5
|
-
/** Default format. A constant, not a schema `.default()`, so "asked for 9:16" stays */
|
|
6
|
-
/** distinguishable from "said nothing": only the latter never gets a refusal. */
|
|
7
4
|
export declare const DEFAULT_ASPECT_RATIO: AspectRatio;
|
|
8
|
-
/** ≤2% counts as a match: the difference is invisible and needs no crop. */
|
|
9
5
|
export declare const ASPECT_MATCH_THRESHOLD = 0.02;
|
|
10
|
-
/** ≤15% snaps to a format with a warning about the vendor's center-crop. */
|
|
11
6
|
export declare const ASPECT_SNAP_THRESHOLD = 0.15;
|
|
12
|
-
/** Relative distance between two aspect ratios, divided by the SMALLER one: the larger */
|
|
13
|
-
/** error trips the threshold earlier, so the check errs toward asking. */
|
|
14
7
|
export declare function aspectDistance(a: number, b: number): number;
|
|
15
|
-
/** The supported format nearest to an arbitrary ratio. */
|
|
16
8
|
export declare function snapAspect(ratio: number): AspectRatio;
|
|
17
|
-
/** Resolver verdict: a format with explanations, or a refusal before the paid step. */
|
|
18
9
|
export type AspectResolution = {
|
|
19
10
|
kind: "resolved";
|
|
20
11
|
aspectRatio: AspectRatio;
|
|
@@ -24,48 +15,28 @@ export type AspectResolution = {
|
|
|
24
15
|
message: string;
|
|
25
16
|
};
|
|
26
17
|
export interface ResolveAspectInput {
|
|
27
|
-
/** What the client asked for; `undefined` means it said nothing. */
|
|
28
18
|
requested: AspectRatio | undefined;
|
|
29
|
-
/** The measured source. `null` only when a URL was given but probing failed; */
|
|
30
|
-
/** without `image` the source is `DEFAULT_ACTOR_SOURCE`. */
|
|
31
19
|
source: AspectSource | null;
|
|
32
20
|
}
|
|
33
|
-
/** Which format to render. A silent client is never refused; a refusal happens only when */
|
|
34
|
-
/** the client named a format more than 15% away from the source. */
|
|
35
21
|
export declare function resolveAspectRatio(input: ResolveAspectInput): AspectResolution;
|
|
36
|
-
/** Exact source ratio label, reduced by GCD: 432×768 → `9:16`, 1920×1080 → `16:9`. Unlike */
|
|
37
|
-
/** `snapAspect` (what we render), this reports what was sent, so a quote never misstates input. */
|
|
38
22
|
export declare function exactAspectLabel(width: number, height: number): string;
|
|
39
|
-
/** The format we ask the VENDOR for is the one nearest the SOURCE, not the requested one: */
|
|
40
|
-
/** the vendor damages the frame only on a mismatch, and our own layout is declared in warnings. */
|
|
41
23
|
export declare function vendorAspectFor(source: AspectSource, supported: readonly AspectRatio[]): AspectRatio;
|
|
42
|
-
/** What we predicted and what the vendor actually delivered. */
|
|
43
24
|
export interface DeliveredClip {
|
|
44
25
|
width: number;
|
|
45
26
|
height: number;
|
|
46
|
-
/** Container duration: the longest stream, AAC tail included. */
|
|
47
27
|
durationSec: number;
|
|
48
|
-
/** Picture duration (video frames / fps), measured only on request; the charge basis (#699). */
|
|
49
28
|
videoDurationSec?: number;
|
|
50
29
|
}
|
|
51
|
-
/** Compares vendor output with the prediction, so every paid run re-measures vendor */
|
|
52
|
-
/** behavior. Silent on a match: a warning on every run devalues all warnings. */
|
|
53
30
|
export declare function deliveryWarnings(args: {
|
|
54
31
|
predicted: DeliveredClip;
|
|
55
32
|
actual: DeliveredClip;
|
|
56
|
-
/** Duration tolerance: the vendor rounds, and fractions of a second are not a mismatch. */
|
|
57
33
|
durationToleranceSec?: number;
|
|
58
34
|
}): string[];
|
|
59
|
-
/** Upscaling is named, like a format snap, but only for a FOREIGN frame: our actor's */
|
|
60
|
-
/** dimensions are a product property. */
|
|
61
35
|
export declare function upscaleWarning(source: AspectSource | null, resolution: Resolution, aspectRatio: AspectRatio): string | null;
|
|
62
|
-
/** A delivered video whose short side is not the requested resolution's is named (#1173, rules 3 and 4). */
|
|
63
36
|
export declare function deliveredResolutionWarning(requested: Resolution, delivered: {
|
|
64
37
|
width: number;
|
|
65
38
|
height: number;
|
|
66
39
|
}): string | null;
|
|
67
|
-
/** The frame we expect from the vendor: format PLUS resolution. Format alone flagged */
|
|
68
|
-
/** every 720p run as a mismatch. */
|
|
69
40
|
export declare function expectedVendorFrame(resolution: Resolution, aspectRatio: AspectRatio): {
|
|
70
41
|
width: number;
|
|
71
42
|
height: number;
|
package/dist/aspect.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import { ASPECT_RATIOS } from "./skills.js";
|
|
2
|
-
// Output format from the request and the source. We never crop: a mismatch is either
|
|
3
|
-
// a warning or a refusal before the paid call. Pure functions.
|
|
4
|
-
/** Width-to-height ratio of each supported format. */
|
|
5
2
|
export const ASPECT_RATIO_VALUES = {
|
|
6
3
|
"9:16": 9 / 16,
|
|
7
4
|
"1:1": 1,
|
|
8
5
|
"16:9": 16 / 9,
|
|
9
6
|
};
|
|
10
|
-
/** Default format. A constant, not a schema `.default()`, so "asked for 9:16" stays */
|
|
11
|
-
/** distinguishable from "said nothing": only the latter never gets a refusal. */
|
|
12
7
|
export const DEFAULT_ASPECT_RATIO = "9:16";
|
|
13
|
-
/** ≤2% counts as a match: the difference is invisible and needs no crop. */
|
|
14
8
|
export const ASPECT_MATCH_THRESHOLD = 0.02;
|
|
15
|
-
/** ≤15% snaps to a format with a warning about the vendor's center-crop. */
|
|
16
9
|
export const ASPECT_SNAP_THRESHOLD = 0.15;
|
|
17
|
-
/** Relative distance between two aspect ratios, divided by the SMALLER one: the larger */
|
|
18
|
-
/** error trips the threshold earlier, so the check errs toward asking. */
|
|
19
10
|
export function aspectDistance(a, b) {
|
|
20
11
|
return Math.abs(a - b) / Math.min(a, b);
|
|
21
12
|
}
|
|
22
|
-
/** The supported format nearest to an arbitrary ratio. */
|
|
23
13
|
export function snapAspect(ratio) {
|
|
24
14
|
let best = ASPECT_RATIOS[0];
|
|
25
15
|
let bestDistance = Number.POSITIVE_INFINITY;
|
|
@@ -32,13 +22,9 @@ export function snapAspect(ratio) {
|
|
|
32
22
|
}
|
|
33
23
|
return best;
|
|
34
24
|
}
|
|
35
|
-
/** Which format to render. A silent client is never refused; a refusal happens only when */
|
|
36
|
-
/** the client named a format more than 15% away from the source. */
|
|
37
25
|
export function resolveAspectRatio(input) {
|
|
38
26
|
const { requested, source } = input;
|
|
39
27
|
if (source === null) {
|
|
40
|
-
// Probing the foreign URL failed. That is not a client claim about the format,
|
|
41
|
-
// so the unverified format is a warning, not a refusal.
|
|
42
28
|
return {
|
|
43
29
|
kind: "resolved",
|
|
44
30
|
aspectRatio: requested ?? DEFAULT_ASPECT_RATIO,
|
|
@@ -53,8 +39,6 @@ export function resolveAspectRatio(input) {
|
|
|
53
39
|
if (distance <= ASPECT_MATCH_THRESHOLD) {
|
|
54
40
|
return { kind: "resolved", aspectRatio: target, warnings: [] };
|
|
55
41
|
}
|
|
56
|
-
// Measured vendor behavior depends on direction: a frame wider than the source is
|
|
57
|
-
// padded white, a narrower one is scaled up and center-cropped at the sides.
|
|
58
42
|
const targetRatio = ASPECT_RATIO_VALUES[target];
|
|
59
43
|
const snapWarning = targetRatio > sourceRatio
|
|
60
44
|
? `source is ${source.width}×${source.height}; rendering ${target} is wider than the source, ` +
|
|
@@ -64,8 +48,6 @@ export function resolveAspectRatio(input) {
|
|
|
64
48
|
if (distance <= ASPECT_SNAP_THRESHOLD || requested === undefined) {
|
|
65
49
|
return { kind: "resolved", aspectRatio: target, warnings: [snapWarning] };
|
|
66
50
|
}
|
|
67
|
-
// Explicit conflict. The text must name the remedy: for an autonomous agent a
|
|
68
|
-
// refusal without a next step is as bad as a failure.
|
|
69
51
|
const cure = source.origin === "default"
|
|
70
52
|
? `the default actor is ${snapAspect(sourceRatio)} (${source.width}×${source.height}); ` +
|
|
71
53
|
`pass \`image\` with a source close to ${target} to render ${target}`
|
|
@@ -76,8 +58,6 @@ export function resolveAspectRatio(input) {
|
|
|
76
58
|
message: `requested aspect_ratio ${target} conflicts with the source by ${Math.round(distance * 100)}%: ${cure}`,
|
|
77
59
|
};
|
|
78
60
|
}
|
|
79
|
-
/** Exact source ratio label, reduced by GCD: 432×768 → `9:16`, 1920×1080 → `16:9`. Unlike */
|
|
80
|
-
/** `snapAspect` (what we render), this reports what was sent, so a quote never misstates input. */
|
|
81
61
|
export function exactAspectLabel(width, height) {
|
|
82
62
|
const gcd = (a, b) => (b === 0 ? a : gcd(b, a % b));
|
|
83
63
|
const w = Math.round(width);
|
|
@@ -87,8 +67,6 @@ export function exactAspectLabel(width, height) {
|
|
|
87
67
|
const divisor = gcd(w, h);
|
|
88
68
|
return `${w / divisor}:${h / divisor}`;
|
|
89
69
|
}
|
|
90
|
-
/** The format we ask the VENDOR for is the one nearest the SOURCE, not the requested one: */
|
|
91
|
-
/** the vendor damages the frame only on a mismatch, and our own layout is declared in warnings. */
|
|
92
70
|
export function vendorAspectFor(source, supported) {
|
|
93
71
|
if (supported.length === 0) {
|
|
94
72
|
throw new Error("vendorAspectFor: backend declares no supported aspect ratios");
|
|
@@ -105,8 +83,6 @@ export function vendorAspectFor(source, supported) {
|
|
|
105
83
|
}
|
|
106
84
|
return best;
|
|
107
85
|
}
|
|
108
|
-
/** Compares vendor output with the prediction, so every paid run re-measures vendor */
|
|
109
|
-
/** behavior. Silent on a match: a warning on every run devalues all warnings. */
|
|
110
86
|
export function deliveryWarnings(args) {
|
|
111
87
|
const { predicted, actual } = args;
|
|
112
88
|
const tolerance = args.durationToleranceSec ?? 0.05;
|
|
@@ -116,17 +92,13 @@ export function deliveryWarnings(args) {
|
|
|
116
92
|
}
|
|
117
93
|
const durationDelta = actual.durationSec - predicted.durationSec;
|
|
118
94
|
if (Math.abs(durationDelta) > tolerance) {
|
|
119
|
-
// Padding to a whole second is a known, measured case (0.6 s of audio came back as
|
|
120
|
-
// 1.0 s) and is named separately from unknown mismatches.
|
|
121
95
|
const paddedToWholeSecond = durationDelta > 0 && Number.isInteger(actual.durationSec) && actual.durationSec <= 1;
|
|
122
96
|
warnings.push(paddedToWholeSecond
|
|
123
|
-
? `the clip was padded to ${actual.durationSec}s from ${predicted.durationSec}s of audio`
|
|
97
|
+
? `the clip was padded to ${actual.durationSec}s from ${predicted.durationSec}s of audio`
|
|
124
98
|
: `the clip came back ${actual.durationSec}s instead of ${predicted.durationSec}s`);
|
|
125
99
|
}
|
|
126
100
|
return warnings;
|
|
127
101
|
}
|
|
128
|
-
/** Upscaling is named, like a format snap, but only for a FOREIGN frame: our actor's */
|
|
129
|
-
/** dimensions are a product property. */
|
|
130
102
|
export function upscaleWarning(source, resolution, aspectRatio) {
|
|
131
103
|
if (source === null || source.origin !== "probed")
|
|
132
104
|
return null;
|
|
@@ -139,21 +111,17 @@ export function upscaleWarning(source, resolution, aspectRatio) {
|
|
|
139
111
|
`the source is upscaled, which softens the picture. Send at least ${frameShort} px ` +
|
|
140
112
|
"on the short side to avoid it.");
|
|
141
113
|
}
|
|
142
|
-
/** Short frame side per resolution, measured live. */
|
|
143
114
|
const SHORT_SIDE_BY_RESOLUTION = {
|
|
144
115
|
"720p": 720,
|
|
145
116
|
"1080p": 1080,
|
|
146
117
|
"4k": 2160,
|
|
147
118
|
};
|
|
148
|
-
/** A delivered video whose short side is not the requested resolution's is named (#1173, rules 3 and 4). */
|
|
149
119
|
export function deliveredResolutionWarning(requested, delivered) {
|
|
150
120
|
if (Math.min(delivered.width, delivered.height) === SHORT_SIDE_BY_RESOLUTION[requested])
|
|
151
121
|
return null;
|
|
152
122
|
return `resolution ${requested} was requested, but the video is delivered at ` +
|
|
153
123
|
`${delivered.width}×${delivered.height}; resolution does not change the price`;
|
|
154
124
|
}
|
|
155
|
-
/** The frame we expect from the vendor: format PLUS resolution. Format alone flagged */
|
|
156
|
-
/** every 720p run as a mismatch. */
|
|
157
125
|
export function expectedVendorFrame(resolution, aspectRatio) {
|
|
158
126
|
const short = SHORT_SIDE_BY_RESOLUTION[resolution];
|
|
159
127
|
const ratio = ASPECT_RATIO_VALUES[aspectRatio];
|
|
@@ -165,4 +133,3 @@ export function expectedVendorFrame(resolution, aspectRatio) {
|
|
|
165
133
|
? { width: even(short * ratio), height: even(short) }
|
|
166
134
|
: { width: even(short), height: even(short / ratio) };
|
|
167
135
|
}
|
|
168
|
-
//# sourceMappingURL=aspect.js.map
|
package/dist/asset-identity.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** The asset id and kinds as a leaf module: `skills.ts` names them, and `assets.ts` would import it back through `runs.ts`. */
|
|
3
2
|
export declare const ASSET_KINDS: readonly ["image", "video"];
|
|
4
|
-
/** WebP is kept only as a generation's own output: its dimensions are not read from customer bytes. */
|
|
5
3
|
export declare const ASSET_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "image/webp", "video/mp4"];
|
|
6
4
|
export declare const assetId: z.ZodString;
|
package/dist/asset-identity.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** The asset id and kinds as a leaf module: `skills.ts` names them, and `assets.ts` would import it back through `runs.ts`. */
|
|
3
2
|
export const ASSET_KINDS = ["image", "video"];
|
|
4
|
-
/** WebP is kept only as a generation's own output: its dimensions are not read from customer bytes. */
|
|
5
3
|
export const ASSET_MEDIA_TYPES = ["image/png", "image/jpeg", "image/webp", "video/mp4"];
|
|
6
4
|
export const assetId = z.string().regex(/^ast_[a-f0-9]{32}$/);
|
|
7
|
-
//# sourceMappingURL=asset-identity.js.map
|
package/dist/assets.d.ts
CHANGED
|
@@ -1,55 +1,37 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId } from "./asset-identity.js";
|
|
3
|
-
/** Account assets (clipwright#724 F2): pictures and clips kept until the customer deletes them, under a cap per account. */
|
|
4
3
|
export declare const ASSETS_PATH = "/v1/assets";
|
|
5
|
-
/** Raw bytes of one picture or clip, for the cabinet; role, name and the rights confirmation travel in the query. */
|
|
6
4
|
export declare const ASSET_BYTES_PATH = "/v1/assets/bytes";
|
|
7
5
|
export declare const ASSET_ITEM_PATH = "/v1/assets/:id";
|
|
8
6
|
export declare const ASSET_ACCOUNT_MAX_COUNT = 2000;
|
|
9
|
-
/** Storage per account: 1 GB until its first credit purchase, then 20 GB. */
|
|
10
7
|
export declare const ASSET_TRIAL_MAX_BYTES = 1000000000;
|
|
11
8
|
export declare const ASSET_ACCOUNT_MAX_BYTES = 20000000000;
|
|
12
|
-
/** New assets per account over a sliding day, deleted ones included: a delete does not give the slot back. */
|
|
13
9
|
export declare const ASSET_INGEST_DAILY_CAP = 100;
|
|
14
10
|
export declare const ASSET_INGEST_WINDOW_SECONDS = 86400;
|
|
15
|
-
/** Raw bytes of a picture passed inline; its base64 still fits the 1 MiB JSON body of the API and of MCP. */
|
|
16
11
|
export declare const ASSET_BASE64_MAX_BYTES = 700000;
|
|
17
12
|
export declare const ASSET_BASE64_MAX_CHARS: number;
|
|
18
13
|
export declare const ASSET_URL_TTL_SECONDS = 3600;
|
|
19
|
-
/** A deleted asset's object, and a run's files after its media delete (#1093), stay this long, so a generation admitted just */
|
|
20
|
-
/** before the delete still reads it. The one number for both; the cleanups read it here. */
|
|
21
14
|
export declare const ASSET_DELETE_GRACE_DAYS = 7;
|
|
22
15
|
export declare const ASSET_NAME_MAX_CHARS = 80;
|
|
23
16
|
export declare const ASSET_LIST_MAX_LIMIT = 100;
|
|
24
|
-
/** The page `list_assets` asks when the agent names no limit (#1372): the API's 50 overflowed an agent's tool output. */
|
|
25
17
|
export declare const ASSET_TOOL_PAGE = 8;
|
|
26
|
-
/** The most characters one `list_assets` answer carries (#1376): a page of 20 assets with their signed links runs past an agent's tool output,
|
|
27
|
-
* so a page longer than this is asked again at the count that fits. */
|
|
28
18
|
export declare const ASSET_TOOL_ANSWER_CHARS = 12000;
|
|
29
|
-
/** A customer clip: up to 100 MiB and 120 s, a non-fragmented MP4 in h264 or hevc. */
|
|
30
19
|
export declare const ASSET_VIDEO_MAX_BYTES: number;
|
|
31
20
|
export declare const ASSET_VIDEO_MAX_SECONDS = 120;
|
|
32
21
|
export declare const ASSET_VIDEO_CODECS: readonly ["h264", "hevc"];
|
|
33
|
-
/** A clip sent as the body of `POST /v1/assets/bytes`: the API holds the body in memory before staging it. */
|
|
34
22
|
export declare const ASSET_BYTES_ROUTE_VIDEO_MAX_BYTES: number;
|
|
35
|
-
/** How long a clip in processing may take before reads call it failed: a 90 s download inside a 5 minute task. */
|
|
36
23
|
export declare const ASSET_PROCESSING_SECONDS = 600;
|
|
37
24
|
export declare const ASSET_VIDEO_DOWNLOAD_DEADLINE_MS = 90000;
|
|
38
25
|
export declare const ASSET_INGEST_TASK_MAX_DURATION_SECONDS = 300;
|
|
39
26
|
export declare const ASSET_PUT_MEDIA_TYPES: readonly ["image/png", "image/jpeg", "video/mp4"];
|
|
40
27
|
export type AssetPutMediaType = (typeof ASSET_PUT_MEDIA_TYPES)[number];
|
|
41
|
-
/** The task that downloads or reads a staged file, checks it and publishes the asset. */
|
|
42
28
|
export declare const INGEST_ASSET_MEDIA_TASK = "ingest-asset-media";
|
|
43
|
-
/** The cabinet's preview of an asset (S4a): a WebP at `assets/<account>/<id>/preview.webp`, long side at most 512, no upscale. */
|
|
44
29
|
export declare const ASSET_PREVIEW_TASK = "make-asset-preview";
|
|
45
30
|
export declare const ASSET_PREVIEW_MAX_SIDE = 512;
|
|
46
31
|
export declare const ASSET_PREVIEW_QUALITY = 75;
|
|
47
32
|
export declare const ASSET_PREVIEW_SWEEP_BATCH = 200;
|
|
48
|
-
/** Past this many attempts a row leaves the queue as `gave_up`: an OOM or a hung R2 never loops for ever. */
|
|
49
33
|
export declare const ASSET_PREVIEW_MAX_ATTEMPTS = 6;
|
|
50
|
-
/** How long creating an asset waits to queue its preview; past it the hourly sweep picks the row up. */
|
|
51
34
|
export declare const ASSET_PREVIEW_ENQUEUE_TIMEOUT_MS = 2000;
|
|
52
|
-
/** Terminal codes only; a passing failure throws, and the next attempt or the sweep repeats it. */
|
|
53
35
|
export declare const ASSET_PREVIEW_ERRORS: readonly ["decode_failed", "size_mismatch", "empty_output", "gave_up"];
|
|
54
36
|
export type AssetPreviewError = (typeof ASSET_PREVIEW_ERRORS)[number];
|
|
55
37
|
export declare const ASSET_ROLES: readonly ["character", "location", "style", "prop", "other"];
|
|
@@ -57,11 +39,9 @@ export type AssetRole = (typeof ASSET_ROLES)[number];
|
|
|
57
39
|
export { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId };
|
|
58
40
|
export type AssetKind = (typeof ASSET_KINDS)[number];
|
|
59
41
|
export type AssetMediaType = (typeof ASSET_MEDIA_TYPES)[number];
|
|
60
|
-
/** `post`: a reel resolved from its link by analyze_reference (#930 S3), always analysis-only. */
|
|
61
42
|
export declare const ASSET_SOURCE_TYPES: readonly ["generation", "upload", "url", "base64", "bytes", "put", "post"];
|
|
62
43
|
export type AssetSourceType = (typeof ASSET_SOURCE_TYPES)[number];
|
|
63
44
|
export declare const assetName: z.ZodString;
|
|
64
|
-
/** A file the client PUTs itself: its type, exact size and sha256, checked against the bytes before the asset exists. */
|
|
65
45
|
export declare const assetPutSource: z.ZodObject<{
|
|
66
46
|
media_type: z.ZodEnum<{
|
|
67
47
|
"image/jpeg": "image/jpeg";
|
|
@@ -71,8 +51,6 @@ export declare const assetPutSource: z.ZodObject<{
|
|
|
71
51
|
bytes: z.ZodNumber;
|
|
72
52
|
sha256: z.ZodString;
|
|
73
53
|
}, z.core.$strict>;
|
|
74
|
-
/** Where the asset's bytes come from: an own generation, an own upload, a public https url (`kind: "video"` for a clip), */
|
|
75
|
-
/** inline base64, or a presigned PUT. */
|
|
76
54
|
export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
|
|
77
55
|
run_id: z.ZodString;
|
|
78
56
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -101,9 +79,7 @@ export declare const assetSource: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
101
79
|
}, z.core.$strict>;
|
|
102
80
|
}, z.core.$strict>]>;
|
|
103
81
|
export type AssetSource = z.infer<typeof assetSource>;
|
|
104
|
-
/** Why a render or generation refuses an analysis-only asset (#884); the caller prefixes the field and the id. */
|
|
105
82
|
export declare const ANALYSIS_ONLY_ASSET_REFUSAL: string;
|
|
106
|
-
/** The customer's own material needs `rights_confirmed` (stated once, at creation) or `analysis_only`, which keeps it out of every render. */
|
|
107
83
|
export declare const createAssetRequest: z.ZodObject<{
|
|
108
84
|
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
109
85
|
run_id: z.ZodString;
|
|
@@ -144,7 +120,6 @@ export declare const createAssetRequest: z.ZodObject<{
|
|
|
144
120
|
analysis_only: z.ZodOptional<z.ZodLiteral<true>>;
|
|
145
121
|
}, z.core.$strict>;
|
|
146
122
|
export type CreateAssetRequest = z.infer<typeof createAssetRequest>;
|
|
147
|
-
/** The query of `POST /v1/assets/bytes`. */
|
|
148
123
|
export declare const assetBytesQuery: z.ZodObject<{
|
|
149
124
|
role: z.ZodEnum<{
|
|
150
125
|
character: "character";
|
|
@@ -245,7 +220,6 @@ export declare const asset: z.ZodObject<{
|
|
|
245
220
|
updated_at: z.ZodString;
|
|
246
221
|
}, z.core.$strict>;
|
|
247
222
|
export type Asset = z.infer<typeof asset>;
|
|
248
|
-
/** Where a PUT goes: signed for 15 minutes with exactly these two headers, and finished within a day. */
|
|
249
223
|
export declare const assetPutUpload: z.ZodObject<{
|
|
250
224
|
put_url: z.ZodString;
|
|
251
225
|
put_headers: z.ZodObject<{
|
|
@@ -259,7 +233,6 @@ export declare const assetPutUpload: z.ZodObject<{
|
|
|
259
233
|
expires_at: z.ZodString;
|
|
260
234
|
finish_by: z.ZodString;
|
|
261
235
|
}, z.core.$strict>;
|
|
262
|
-
/** An asset before it exists: waiting for its PUT, being checked, or refused with the reason. */
|
|
263
236
|
export declare const ASSET_PENDING_STATES: readonly ["awaiting_upload", "processing", "failed"];
|
|
264
237
|
export declare const pendingAsset: z.ZodObject<{
|
|
265
238
|
asset_id: z.ZodString;
|
|
@@ -419,10 +392,8 @@ export declare const assetItem: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
419
392
|
}, z.core.$strict>>;
|
|
420
393
|
}, z.core.$strict>]>;
|
|
421
394
|
export type AssetItem = z.infer<typeof assetItem>;
|
|
422
|
-
/** Why a pending asset failed, as `error.code`; these never come as an HTTP error of their own. */
|
|
423
395
|
export declare const ASSET_INGEST_FAILURE_CODES: readonly ["upload_expired", "upload_size_mismatch", "upload_digest_mismatch", "unsupported_media_type", "invalid_image", "invalid_video", "payload_too_large", "url_fetch_refused", "url_fetch_failed", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "url_import_disabled", "ingest_timed_out", "ingest_enqueue_failed", "ingest_failed"];
|
|
424
396
|
export type AssetIngestFailureCode = (typeof ASSET_INGEST_FAILURE_CODES)[number];
|
|
425
|
-
/** What starts an asset check: which pending asset, and whether its bytes are at a url or already staged. */
|
|
426
397
|
export declare const ingestAssetMediaPayload: z.ZodObject<{
|
|
427
398
|
assetId: z.ZodString;
|
|
428
399
|
accountId: z.ZodString;
|
|
@@ -433,12 +404,10 @@ export declare const ingestAssetMediaPayload: z.ZodObject<{
|
|
|
433
404
|
}>;
|
|
434
405
|
}, z.core.$strict>;
|
|
435
406
|
export type IngestAssetMediaPayload = z.infer<typeof ingestAssetMediaPayload>;
|
|
436
|
-
/** The preview task takes the id only; it reads the account from the row. */
|
|
437
407
|
export declare const assetPreviewPayload: z.ZodObject<{
|
|
438
408
|
assetId: z.ZodString;
|
|
439
409
|
}, z.core.$strict>;
|
|
440
410
|
export type AssetPreviewPayload = z.infer<typeof assetPreviewPayload>;
|
|
441
|
-
/** One run per asset across every caller: created with `scope: "global"`, since a raw string inside a task is per run. */
|
|
442
411
|
export declare const assetPreviewIdempotencyKey: (id: string) => string;
|
|
443
412
|
export declare const assetPreviewKey: (accountId: string, id: string) => string;
|
|
444
413
|
export declare const assetUsage: z.ZodObject<{
|
|
@@ -447,7 +416,6 @@ export declare const assetUsage: z.ZodObject<{
|
|
|
447
416
|
max_count: z.ZodNumber;
|
|
448
417
|
max_bytes: z.ZodNumber;
|
|
449
418
|
}, z.core.$strict>;
|
|
450
|
-
/** `pending` holds the account's assets still in progress and those refused within the day; the first page only. */
|
|
451
419
|
export declare const assetList: z.ZodObject<{
|
|
452
420
|
assets: z.ZodArray<z.ZodObject<{
|
|
453
421
|
asset_id: z.ZodString;
|
|
@@ -754,9 +722,7 @@ export declare const assetListRead: z.ZodObject<{
|
|
|
754
722
|
}, z.core.$loose>;
|
|
755
723
|
}, z.core.$loose>;
|
|
756
724
|
export type AssetListRead = z.infer<typeof assetListRead>;
|
|
757
|
-
/** The asset's own object: a new id per asset, so a copy never overwrites another asset. */
|
|
758
725
|
export declare function assetKey(accountId: string, id: string, sha256: string, mediaType: AssetMediaType): string;
|
|
759
|
-
/** The asset_cap_exceeded text: the account's own ceilings, and on a bytes refusal below 20 GB what raises it. */
|
|
760
726
|
export declare function assetCapMessage(cap: "count" | "bytes", usage: {
|
|
761
727
|
count: number;
|
|
762
728
|
bytes: number;
|
package/dist/assets.js
CHANGED
|
@@ -3,73 +3,50 @@ import { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId } from "./asset-identity.js";
|
|
|
3
3
|
import { mascotSummary } from "./mascots.js";
|
|
4
4
|
import { runId } from "./runs.js";
|
|
5
5
|
import { UPLOAD_MAX_BYTES, UPLOAD_MEDIA_TYPES, uploadId } from "./uploads.js";
|
|
6
|
-
/** Account assets (clipwright#724 F2): pictures and clips kept until the customer deletes them, under a cap per account. */
|
|
7
6
|
export const ASSETS_PATH = "/v1/assets";
|
|
8
|
-
/** Raw bytes of one picture or clip, for the cabinet; role, name and the rights confirmation travel in the query. */
|
|
9
7
|
export const ASSET_BYTES_PATH = "/v1/assets/bytes";
|
|
10
8
|
export const ASSET_ITEM_PATH = "/v1/assets/:id";
|
|
11
9
|
export const ASSET_ACCOUNT_MAX_COUNT = 2000;
|
|
12
|
-
/** Storage per account: 1 GB until its first credit purchase, then 20 GB. */
|
|
13
10
|
export const ASSET_TRIAL_MAX_BYTES = 1_000_000_000;
|
|
14
11
|
export const ASSET_ACCOUNT_MAX_BYTES = 20_000_000_000;
|
|
15
|
-
/** New assets per account over a sliding day, deleted ones included: a delete does not give the slot back. */
|
|
16
12
|
export const ASSET_INGEST_DAILY_CAP = 100;
|
|
17
13
|
export const ASSET_INGEST_WINDOW_SECONDS = 86_400;
|
|
18
|
-
/** Raw bytes of a picture passed inline; its base64 still fits the 1 MiB JSON body of the API and of MCP. */
|
|
19
14
|
export const ASSET_BASE64_MAX_BYTES = 700_000;
|
|
20
15
|
export const ASSET_BASE64_MAX_CHARS = Math.ceil(ASSET_BASE64_MAX_BYTES / 3) * 4;
|
|
21
16
|
export const ASSET_URL_TTL_SECONDS = 3600;
|
|
22
|
-
/** A deleted asset's object, and a run's files after its media delete (#1093), stay this long, so a generation admitted just */
|
|
23
|
-
/** before the delete still reads it. The one number for both; the cleanups read it here. */
|
|
24
17
|
export const ASSET_DELETE_GRACE_DAYS = 7;
|
|
25
18
|
export const ASSET_NAME_MAX_CHARS = 80;
|
|
26
19
|
export const ASSET_LIST_MAX_LIMIT = 100;
|
|
27
|
-
/** The page `list_assets` asks when the agent names no limit (#1372): the API's 50 overflowed an agent's tool output. */
|
|
28
20
|
export const ASSET_TOOL_PAGE = 8;
|
|
29
|
-
/** The most characters one `list_assets` answer carries (#1376): a page of 20 assets with their signed links runs past an agent's tool output,
|
|
30
|
-
* so a page longer than this is asked again at the count that fits. */
|
|
31
21
|
export const ASSET_TOOL_ANSWER_CHARS = 12_000;
|
|
32
|
-
/** A customer clip: up to 100 MiB and 120 s, a non-fragmented MP4 in h264 or hevc. */
|
|
33
22
|
export const ASSET_VIDEO_MAX_BYTES = 100 * 1024 * 1024;
|
|
34
23
|
export const ASSET_VIDEO_MAX_SECONDS = 120;
|
|
35
24
|
export const ASSET_VIDEO_CODECS = ["h264", "hevc"];
|
|
36
|
-
/** A clip sent as the body of `POST /v1/assets/bytes`: the API holds the body in memory before staging it. */
|
|
37
25
|
export const ASSET_BYTES_ROUTE_VIDEO_MAX_BYTES = 32 * 1024 * 1024;
|
|
38
|
-
/** How long a clip in processing may take before reads call it failed: a 90 s download inside a 5 minute task. */
|
|
39
26
|
export const ASSET_PROCESSING_SECONDS = 600;
|
|
40
27
|
export const ASSET_VIDEO_DOWNLOAD_DEADLINE_MS = 90_000;
|
|
41
28
|
export const ASSET_INGEST_TASK_MAX_DURATION_SECONDS = 300;
|
|
42
29
|
export const ASSET_PUT_MEDIA_TYPES = ["image/png", "image/jpeg", "video/mp4"];
|
|
43
|
-
/** The task that downloads or reads a staged file, checks it and publishes the asset. */
|
|
44
30
|
export const INGEST_ASSET_MEDIA_TASK = "ingest-asset-media";
|
|
45
|
-
/** The cabinet's preview of an asset (S4a): a WebP at `assets/<account>/<id>/preview.webp`, long side at most 512, no upscale. */
|
|
46
31
|
export const ASSET_PREVIEW_TASK = "make-asset-preview";
|
|
47
32
|
export const ASSET_PREVIEW_MAX_SIDE = 512;
|
|
48
33
|
export const ASSET_PREVIEW_QUALITY = 75;
|
|
49
34
|
export const ASSET_PREVIEW_SWEEP_BATCH = 200;
|
|
50
|
-
/** Past this many attempts a row leaves the queue as `gave_up`: an OOM or a hung R2 never loops for ever. */
|
|
51
35
|
export const ASSET_PREVIEW_MAX_ATTEMPTS = 6;
|
|
52
|
-
/** How long creating an asset waits to queue its preview; past it the hourly sweep picks the row up. */
|
|
53
36
|
export const ASSET_PREVIEW_ENQUEUE_TIMEOUT_MS = 2000;
|
|
54
|
-
/** Terminal codes only; a passing failure throws, and the next attempt or the sweep repeats it. */
|
|
55
37
|
export const ASSET_PREVIEW_ERRORS = ["decode_failed", "size_mismatch", "empty_output", "gave_up"];
|
|
56
38
|
export const ASSET_ROLES = ["character", "location", "style", "prop", "other"];
|
|
57
39
|
export { ASSET_KINDS, ASSET_MEDIA_TYPES, assetId };
|
|
58
|
-
/** `post`: a reel resolved from its link by analyze_reference (#930 S3), always analysis-only. */
|
|
59
40
|
export const ASSET_SOURCE_TYPES = ["generation", "upload", "url", "base64", "bytes", "put", "post"];
|
|
60
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: the class names exactly the characters a name may not hold.
|
|
61
41
|
const CONTROL_CHARACTERS = /[\u0000-\u001f\u007f-\u009f]/;
|
|
62
42
|
export const assetName = z.string().trim().min(1).max(ASSET_NAME_MAX_CHARS)
|
|
63
43
|
.refine((name) => !CONTROL_CHARACTERS.test(name), "a name holds no control characters");
|
|
64
44
|
const sha256Hex = z.string().regex(/^[a-f0-9]{64}$/);
|
|
65
|
-
/** A file the client PUTs itself: its type, exact size and sha256, checked against the bytes before the asset exists. */
|
|
66
45
|
export const assetPutSource = z.strictObject({
|
|
67
46
|
media_type: z.enum(ASSET_PUT_MEDIA_TYPES),
|
|
68
47
|
bytes: z.number().int().positive().max(ASSET_VIDEO_MAX_BYTES),
|
|
69
48
|
sha256: sha256Hex,
|
|
70
49
|
}).refine((put) => put.media_type === "video/mp4" || put.bytes <= UPLOAD_MAX_BYTES, `a picture is at most ${UPLOAD_MAX_BYTES} bytes`);
|
|
71
|
-
/** Where the asset's bytes come from: an own generation, an own upload, a public https url (`kind: "video"` for a clip), */
|
|
72
|
-
/** inline base64, or a presigned PUT. */
|
|
73
50
|
export const assetSource = z.union([
|
|
74
51
|
z.strictObject({ run_id: runId }),
|
|
75
52
|
z.strictObject({ upload_id: uploadId }),
|
|
@@ -78,10 +55,8 @@ export const assetSource = z.union([
|
|
|
78
55
|
media_type: z.enum(UPLOAD_MEDIA_TYPES) }),
|
|
79
56
|
z.strictObject({ put: assetPutSource }),
|
|
80
57
|
]);
|
|
81
|
-
/** Why a render or generation refuses an analysis-only asset (#884); the caller prefixes the field and the id. */
|
|
82
58
|
export const ANALYSIS_ONLY_ASSET_REFUSAL = "is an analysis-only asset: analyze_reference reads it, but it never reaches a render or a " +
|
|
83
59
|
"generation; to use the material, create it again with rights_confirmed: true";
|
|
84
|
-
/** The customer's own material needs `rights_confirmed` (stated once, at creation) or `analysis_only`, which keeps it out of every render. */
|
|
85
60
|
export const createAssetRequest = z.strictObject({
|
|
86
61
|
source: assetSource,
|
|
87
62
|
role: z.enum(ASSET_ROLES),
|
|
@@ -94,7 +69,6 @@ export const createAssetRequest = z.strictObject({
|
|
|
94
69
|
}).refine((request) => !(request.analysis_only && "run_id" in request.source), {
|
|
95
70
|
path: ["analysis_only"], message: "a generation of this account is already yours to use; analysis_only is for your own material",
|
|
96
71
|
});
|
|
97
|
-
/** The query of `POST /v1/assets/bytes`. */
|
|
98
72
|
export const assetBytesQuery = z.strictObject({
|
|
99
73
|
role: z.enum(ASSET_ROLES),
|
|
100
74
|
name: assetName,
|
|
@@ -108,7 +82,6 @@ export const updateAssetRequest = z.strictObject({
|
|
|
108
82
|
export const assetListQuery = z.strictObject({
|
|
109
83
|
role: z.enum(ASSET_ROLES).optional(),
|
|
110
84
|
kind: z.enum(ASSET_KINDS).optional(),
|
|
111
|
-
/** `true` lists only the mascots of this account (#1257): the cover of each, with the poses it holds. */
|
|
112
85
|
mascot: z.literal("true").optional(),
|
|
113
86
|
limit: z.coerce.number().int().min(1).max(ASSET_LIST_MAX_LIMIT).optional(),
|
|
114
87
|
cursor: z.string().regex(/^[A-Za-z0-9_-]{1,200}$/).optional(),
|
|
@@ -129,25 +102,20 @@ export const asset = z.strictObject({
|
|
|
129
102
|
pix_fmt: z.string().min(1).nullable(),
|
|
130
103
|
content_digest: sha256Hex,
|
|
131
104
|
source_type: z.enum(ASSET_SOURCE_TYPES),
|
|
132
|
-
/** Kept for analysis only (#884): no render or generation takes it. */
|
|
133
105
|
analysis_only: z.boolean(),
|
|
134
|
-
/** Present when the asset is the cover of a saved mascot (#1257): pass its id as mascot_id to make_faceless. */
|
|
135
106
|
mascot: mascotSummary.optional(),
|
|
136
107
|
url: z.string().url().startsWith("https://"),
|
|
137
|
-
/** The one-asset read only (#1372): a small WebP of the picture, long side at most 512, signed like `url`; absent until it is made. */
|
|
138
108
|
preview_url: z.string().url().startsWith("https://").optional(),
|
|
139
109
|
expires_at: z.string().datetime(),
|
|
140
110
|
created_at: z.string().datetime(),
|
|
141
111
|
updated_at: z.string().datetime(),
|
|
142
112
|
});
|
|
143
|
-
/** Where a PUT goes: signed for 15 minutes with exactly these two headers, and finished within a day. */
|
|
144
113
|
export const assetPutUpload = z.strictObject({
|
|
145
114
|
put_url: z.string().url().startsWith("https://"),
|
|
146
115
|
put_headers: z.strictObject({ "content-type": z.enum(ASSET_PUT_MEDIA_TYPES), "content-length": z.string().regex(/^\d+$/) }),
|
|
147
116
|
expires_at: z.string().datetime(),
|
|
148
117
|
finish_by: z.string().datetime(),
|
|
149
118
|
});
|
|
150
|
-
/** An asset before it exists: waiting for its PUT, being checked, or refused with the reason. */
|
|
151
119
|
export const ASSET_PENDING_STATES = ["awaiting_upload", "processing", "failed"];
|
|
152
120
|
export const pendingAsset = z.strictObject({
|
|
153
121
|
asset_id: assetId,
|
|
@@ -160,25 +128,20 @@ export const pendingAsset = z.strictObject({
|
|
|
160
128
|
error: z.strictObject({ code: z.string().min(1), message: z.string().min(1) }).nullable(),
|
|
161
129
|
processing_deadline: z.string().datetime().nullable(),
|
|
162
130
|
created_at: z.string().datetime(),
|
|
163
|
-
/** Only in the answer that created the asset, or its repeat. */
|
|
164
131
|
upload: assetPutUpload.optional(),
|
|
165
132
|
});
|
|
166
133
|
export const assetItem = z.union([asset, pendingAsset]);
|
|
167
|
-
/** Why a pending asset failed, as `error.code`; these never come as an HTTP error of their own. */
|
|
168
134
|
export const ASSET_INGEST_FAILURE_CODES = [
|
|
169
135
|
"upload_expired", "upload_size_mismatch", "upload_digest_mismatch", "unsupported_media_type", "invalid_image", "invalid_video",
|
|
170
136
|
"payload_too_large", "url_fetch_refused", "url_fetch_failed", "asset_cap_exceeded", "asset_ingest_cap_exceeded",
|
|
171
137
|
"url_import_disabled", "ingest_timed_out", "ingest_enqueue_failed", "ingest_failed",
|
|
172
138
|
];
|
|
173
|
-
/** What starts an asset check: which pending asset, and whether its bytes are at a url or already staged. */
|
|
174
139
|
export const ingestAssetMediaPayload = z.strictObject({
|
|
175
140
|
assetId,
|
|
176
141
|
accountId: z.string().regex(/^[A-Za-z0-9_-]{1,64}$/),
|
|
177
142
|
source: z.enum(["url", "staging", "post"]),
|
|
178
143
|
});
|
|
179
|
-
/** The preview task takes the id only; it reads the account from the row. */
|
|
180
144
|
export const assetPreviewPayload = z.strictObject({ assetId });
|
|
181
|
-
/** One run per asset across every caller: created with `scope: "global"`, since a raw string inside a task is per run. */
|
|
182
145
|
export const assetPreviewIdempotencyKey = (id) => `asset-preview:${id}`;
|
|
183
146
|
export const assetPreviewKey = (accountId, id) => `assets/${accountId}/${id}/preview.webp`;
|
|
184
147
|
export const assetUsage = z.strictObject({
|
|
@@ -187,7 +150,6 @@ export const assetUsage = z.strictObject({
|
|
|
187
150
|
max_count: z.number().int().positive(),
|
|
188
151
|
max_bytes: z.number().int().positive(),
|
|
189
152
|
});
|
|
190
|
-
/** `pending` holds the account's assets still in progress and those refused within the day; the first page only. */
|
|
191
153
|
export const assetList = z.strictObject({
|
|
192
154
|
assets: z.array(asset),
|
|
193
155
|
pending: z.array(pendingAsset),
|
|
@@ -195,7 +157,6 @@ export const assetList = z.strictObject({
|
|
|
195
157
|
usage: assetUsage,
|
|
196
158
|
contract_version: z.string().min(1),
|
|
197
159
|
});
|
|
198
|
-
// What installed clients parse: open strings for the enums, and unknown keys are kept.
|
|
199
160
|
export const assetRead = asset.extend({
|
|
200
161
|
state: z.literal("ready"), kind: z.string().min(1), role: z.string().min(1), media_type: z.string().min(1), source_type: z.string().min(1),
|
|
201
162
|
analysis_only: z.boolean().optional(),
|
|
@@ -210,14 +171,12 @@ export const assetItemRead = z.union([assetRead, pendingAssetRead]);
|
|
|
210
171
|
export const assetListRead = assetList.extend({
|
|
211
172
|
assets: z.array(assetRead), pending: z.array(pendingAssetRead).optional(), usage: assetUsage.loose(),
|
|
212
173
|
}).loose();
|
|
213
|
-
/** The asset's own object: a new id per asset, so a copy never overwrites another asset. */
|
|
214
174
|
export function assetKey(accountId, id, sha256, mediaType) {
|
|
215
175
|
const extension = { "image/png": "png", "image/jpeg": "jpg", "image/webp": "webp", "video/mp4": "mp4" }[mediaType];
|
|
216
176
|
return `assets/${accountId}/${id}/${sha256}.${extension}`;
|
|
217
177
|
}
|
|
218
178
|
const gigabytes = (bytes) => `${bytes / 1e9} GB`;
|
|
219
179
|
const STORAGE_TERMS = `${gigabytes(ASSET_TRIAL_MAX_BYTES)}, or ${gigabytes(ASSET_ACCOUNT_MAX_BYTES)} once it has bought credits, as a pack or a plan`;
|
|
220
|
-
/** The asset_cap_exceeded text: the account's own ceilings, and on a bytes refusal below 20 GB what raises it. */
|
|
221
180
|
export function assetCapMessage(cap, usage, maxBytes) {
|
|
222
181
|
const raise = cap === "bytes" && maxBytes < ASSET_ACCOUNT_MAX_BYTES
|
|
223
182
|
? ` Buying credits once, as a pack or a plan, raises this account's storage ceiling to ${gigabytes(ASSET_ACCOUNT_MAX_BYTES)}.` : "";
|
|
@@ -254,4 +213,3 @@ export const UPDATE_ASSET_DESCRIPTION = "Rename an asset or change its role; the
|
|
|
254
213
|
export const DELETE_ASSET_DESCRIPTION = "Delete an asset by asset_id. It leaves the list at once and a new generation can no longer use it; its file is " +
|
|
255
214
|
`removed from our storage by a daily cleanup once ${ASSET_DELETE_GRACE_DAYS} days have passed. Runs already made with it ` +
|
|
256
215
|
"stay as they are. Free.";
|
|
257
|
-
//# sourceMappingURL=assets.js.map
|
package/dist/billing-terms.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** Server-authored terms, exposed read-only on runs; never accepted as skill input. */
|
|
3
2
|
export declare const faceBillingAdmissionTermsSchema: z.ZodReadonly<z.ZodObject<{
|
|
4
3
|
mode: z.ZodLiteral<"face_seconds">;
|
|
5
4
|
tariffSnapshot: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
@@ -37,7 +36,6 @@ export declare const faceBillingAdmissionTermsSchema: z.ZodReadonly<z.ZodObject<
|
|
|
37
36
|
}, z.core.$strict>>]>;
|
|
38
37
|
}, z.core.$strict>>;
|
|
39
38
|
export type FaceBillingAdmissionTerms = z.infer<typeof faceBillingAdmissionTermsSchema>;
|
|
40
|
-
/** A short run's parts tariff (#800): billed by its measured duration on the short run's settlement path. */
|
|
41
39
|
export declare const durationPartsAdmissionTermsSchema: z.ZodReadonly<z.ZodObject<{
|
|
42
40
|
mode: z.ZodLiteral<"duration_parts">;
|
|
43
41
|
tariffSnapshot: z.ZodReadonly<z.ZodObject<{
|
|
@@ -52,7 +50,6 @@ export declare const durationPartsAdmissionTermsSchema: z.ZodReadonly<z.ZodObjec
|
|
|
52
50
|
}, z.core.$strict>>;
|
|
53
51
|
}, z.core.$strict>>;
|
|
54
52
|
export type DurationPartsAdmissionTerms = z.infer<typeof durationPartsAdmissionTermsSchema>;
|
|
55
|
-
/** Every mode a run's billing terms, frozen at admission, may hold. */
|
|
56
53
|
export declare const runBillingAdmissionTermsSchema: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
|
57
54
|
mode: z.ZodLiteral<"face_seconds">;
|
|
58
55
|
tariffSnapshot: z.ZodUnion<readonly [z.ZodReadonly<z.ZodObject<{
|
package/dist/billing-terms.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { faceBillingTariffSchema } from "./face-billing.js";
|
|
3
3
|
import { durationPartsTariffSchema } from "./parts-pricing.js";
|
|
4
|
-
/** Server-authored terms, exposed read-only on runs; never accepted as skill input. */
|
|
5
4
|
export const faceBillingAdmissionTermsSchema = z.object({
|
|
6
5
|
mode: z.literal("face_seconds"),
|
|
7
6
|
tariffSnapshot: faceBillingTariffSchema,
|
|
8
7
|
}).strict().readonly();
|
|
9
|
-
/** A short run's parts tariff (#800): billed by its measured duration on the short run's settlement path. */
|
|
10
8
|
export const durationPartsAdmissionTermsSchema = z.object({
|
|
11
9
|
mode: z.literal("duration_parts"),
|
|
12
10
|
tariffSnapshot: durationPartsTariffSchema,
|
|
13
11
|
}).strict().readonly();
|
|
14
|
-
/** Every mode a run's billing terms, frozen at admission, may hold. */
|
|
15
12
|
export const runBillingAdmissionTermsSchema = z.union([faceBillingAdmissionTermsSchema, durationPartsAdmissionTermsSchema]);
|
|
16
|
-
//# sourceMappingURL=billing-terms.js.map
|
package/dist/brand-styles.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ import { type DesignPalette } from "./design.js";
|
|
|
3
3
|
import { type ReferenceProfileAnswer } from "./reference-profile.js";
|
|
4
4
|
export declare const BRAND_STYLES_PATH = "/v1/brand-styles";
|
|
5
5
|
export declare const BRAND_STYLE_PROPOSE_PATH = "/v1/brand-styles/propose";
|
|
6
|
-
/** An account keeps at most this many styles. */
|
|
7
6
|
export declare const BRAND_STYLES_PER_ACCOUNT = 12;
|
|
8
7
|
export declare const brandStyleName: z.ZodString;
|
|
9
|
-
/** A style's design: any brand design but a logo, which a style taken from someone else's video never carries. */
|
|
10
8
|
export declare const brandStyleDesign: z.ZodObject<{
|
|
11
9
|
look: z.ZodOptional<z.ZodEnum<{
|
|
12
10
|
electric_lime: "electric_lime";
|
|
@@ -82,7 +80,6 @@ export declare const brandStyleDesign: z.ZodObject<{
|
|
|
82
80
|
zine: "zine";
|
|
83
81
|
}>>;
|
|
84
82
|
}, z.core.$strict>;
|
|
85
|
-
/** How the reference moves and captions: kept with the style and shown; the drawing reads its design. */
|
|
86
83
|
export declare const brandStyleHabits: z.ZodObject<{
|
|
87
84
|
transition: z.ZodEnum<{
|
|
88
85
|
cut: "cut";
|
|
@@ -372,7 +369,6 @@ export declare const brandStyle: z.ZodObject<{
|
|
|
372
369
|
updated_at: z.ZodString;
|
|
373
370
|
}, z.core.$strict>;
|
|
374
371
|
export type BrandStyle = z.infer<typeof brandStyle>;
|
|
375
|
-
/** The kit as read and saved: its parts, our looks and faces, and the account's saved styles. */
|
|
376
372
|
export declare const brandKitWithStyles: z.ZodObject<{
|
|
377
373
|
design: z.ZodNullable<z.ZodObject<{
|
|
378
374
|
look: z.ZodOptional<z.ZodEnum<{
|
|
@@ -850,12 +846,10 @@ export declare const brandStyleProposal: z.ZodObject<{
|
|
|
850
846
|
warnings: z.ZodArray<z.ZodString>;
|
|
851
847
|
}, z.core.$strict>;
|
|
852
848
|
export type BrandStyleProposal = z.infer<typeof brandStyleProposal>;
|
|
853
|
-
/** The reference's palette as five brand roles, every text pair readable; a purple is moved to teal and named, as our own looks never hold one. */
|
|
854
849
|
export declare function paletteFromReference(colours: readonly string[]): {
|
|
855
850
|
palette: DesignPalette;
|
|
856
851
|
warnings: string[];
|
|
857
852
|
};
|
|
858
|
-
/** A style read from one analysis's profile, free and repeatable: the same profile always proposes the same style. */
|
|
859
853
|
export declare function proposeStyleFromProfile(profile: Pick<ReferenceProfileAnswer, "palette" | "captions" | "beats" | "pacing">, input: {
|
|
860
854
|
analysisId: string;
|
|
861
855
|
name?: string;
|