@clipwright/core 0.60.0 → 0.62.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.d.ts +27 -0
- package/dist/ad-guide.js +7 -2
- package/dist/ad-ids.d.ts +3 -0
- package/dist/ad-ids.js +4 -0
- package/dist/ad-pause-trim.d.ts +0 -5
- package/dist/ad-pause-trim.js +0 -8
- package/dist/ads.d.ts +145 -0
- package/dist/ads.js +56 -0
- package/dist/api-failure.d.ts +6 -44
- package/dist/api-failure.js +16 -67
- 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/diy-next.d.ts +18 -0
- package/dist/diy-next.js +13 -0
- 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-music.d.ts +397 -0
- package/dist/edit-music.js +77 -0
- 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 +11 -21
- package/dist/errors.d.ts +29 -43
- package/dist/errors.js +18 -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 +4 -0
- package/dist/index.js +4 -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 +9 -11
- package/dist/output-provenance.d.ts +0 -4
- package/dist/output-provenance.js +0 -5
- package/dist/own-agent-price.d.ts +21 -22
- package/dist/own-agent-price.js +34 -25
- package/dist/own-agent-runs.d.ts +351 -11
- package/dist/own-agent-runs.js +144 -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 +24 -12
- package/dist/templates/sounds.js +2 -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/errors.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type DiyBlocked, type DiyNext } from "./diy-next.js";
|
|
2
3
|
import { workflowCommandError } from "./contracts/v1/workflow-execution.js";
|
|
3
|
-
/** The generic error envelope. Tolerates extra fields inside `error`: the typed refusals */
|
|
4
|
-
/** below extend it, and generic parsing must not break when a code brings numbers. */
|
|
5
4
|
export declare const apiError: z.ZodObject<{
|
|
6
5
|
error: z.ZodObject<{
|
|
7
6
|
code: z.ZodString;
|
|
@@ -21,7 +20,6 @@ export declare function workflowCommandErrorBody(args: z.input<typeof workflowCo
|
|
|
21
20
|
warnings: string[];
|
|
22
21
|
};
|
|
23
22
|
};
|
|
24
|
-
/** Fewer credits on the balance than the run weighs: "top up". */
|
|
25
23
|
export declare const insufficientCreditsError: z.ZodObject<{
|
|
26
24
|
error: z.ZodObject<{
|
|
27
25
|
code: z.ZodLiteral<"insufficient_credits">;
|
|
@@ -31,7 +29,6 @@ export declare const insufficientCreditsError: z.ZodObject<{
|
|
|
31
29
|
}, z.core.$strip>;
|
|
32
30
|
}, z.core.$strip>;
|
|
33
31
|
export type InsufficientCreditsError = z.infer<typeof insufficientCreditsError>;
|
|
34
|
-
/** The call's reserve is above the `max_credits` it was sent with (#942): nothing was reserved or started. */
|
|
35
32
|
export declare const maxCreditsExceededError: z.ZodObject<{
|
|
36
33
|
error: z.ZodObject<{
|
|
37
34
|
code: z.ZodLiteral<"max_credits_exceeded">;
|
|
@@ -45,8 +42,6 @@ export declare function maxCreditsExceededBody(args: {
|
|
|
45
42
|
holdCredits: number;
|
|
46
43
|
maxCredits: number;
|
|
47
44
|
}): MaxCreditsExceededError;
|
|
48
|
-
/** The account carries an unpaid debt. A separate code because an indebted account may */
|
|
49
|
-
/** still hold a balance, so "insufficient credits" would be false. Buying credits clears it. */
|
|
50
45
|
export declare const debtOutstandingError: z.ZodObject<{
|
|
51
46
|
error: z.ZodObject<{
|
|
52
47
|
code: z.ZodLiteral<"debt_outstanding">;
|
|
@@ -55,8 +50,6 @@ export declare const debtOutstandingError: z.ZodObject<{
|
|
|
55
50
|
}, z.core.$strip>;
|
|
56
51
|
}, z.core.$strip>;
|
|
57
52
|
export type DebtOutstandingError = z.infer<typeof debtOutstandingError>;
|
|
58
|
-
/** Account not admitted to the beta; money does not change that, so it has its own code. */
|
|
59
|
-
/** Terminal; the body names no timeline, since a revoked account answers the same way. */
|
|
60
53
|
export declare const accountNotAdmittedError: z.ZodObject<{
|
|
61
54
|
error: z.ZodObject<{
|
|
62
55
|
code: z.ZodLiteral<"account_not_admitted">;
|
|
@@ -64,18 +57,41 @@ export declare const accountNotAdmittedError: z.ZodObject<{
|
|
|
64
57
|
}, z.core.$strip>;
|
|
65
58
|
}, z.core.$strip>;
|
|
66
59
|
export type AccountNotAdmittedError = z.infer<typeof accountNotAdmittedError>;
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
export declare const takeUncheckedError: z.ZodObject<{
|
|
61
|
+
error: z.ZodObject<{
|
|
62
|
+
code: z.ZodLiteral<"take_unchecked">;
|
|
63
|
+
message: z.ZodString;
|
|
64
|
+
next: z.ZodObject<{
|
|
65
|
+
action: z.ZodString;
|
|
66
|
+
method: z.ZodEnum<{
|
|
67
|
+
GET: "GET";
|
|
68
|
+
POST: "POST";
|
|
69
|
+
}>;
|
|
70
|
+
path: z.ZodString;
|
|
71
|
+
body: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
72
|
+
add: z.ZodArray<z.ZodString>;
|
|
73
|
+
note: z.ZodString;
|
|
74
|
+
}, z.core.$strict>;
|
|
75
|
+
blocked: z.ZodObject<{
|
|
76
|
+
reason: z.ZodString;
|
|
77
|
+
unblock: z.ZodString;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type TakeUncheckedError = z.infer<typeof takeUncheckedError>;
|
|
82
|
+
export declare function takeUncheckedBody(args: {
|
|
83
|
+
message: string;
|
|
84
|
+
next: DiyNext;
|
|
85
|
+
blocked: DiyBlocked;
|
|
86
|
+
}): TakeUncheckedError;
|
|
69
87
|
export declare function insufficientCreditsBody(args: {
|
|
70
88
|
balanceCredits: number;
|
|
71
89
|
requiredCredits: number;
|
|
72
90
|
}): InsufficientCreditsError;
|
|
73
|
-
/** One "needs / has / short" sentence for the 402 refusal and the `quote` warning. */
|
|
74
91
|
export declare function creditsNeededSentence(args: {
|
|
75
92
|
balanceCredits: number;
|
|
76
93
|
requiredCredits: number;
|
|
77
94
|
}): string;
|
|
78
|
-
/** `quote` warning: `make_ugc` with the same input will get this refusal. */
|
|
79
95
|
export declare function insufficientCreditsWarning(args: {
|
|
80
96
|
balanceCredits: number;
|
|
81
97
|
requiredCredits: number;
|
|
@@ -84,14 +100,10 @@ export declare function debtOutstandingWarning(args: {
|
|
|
84
100
|
debtCredits: number;
|
|
85
101
|
}): string;
|
|
86
102
|
export declare function accountNotAdmittedWarning(): string;
|
|
87
|
-
/** Builds the "not admitted to the beta" body; see the wording rule above. */
|
|
88
103
|
export declare function accountNotAdmittedBody(): AccountNotAdmittedError;
|
|
89
|
-
/** Builds the "outstanding debt" body; see the wording rule above. */
|
|
90
104
|
export declare function debtOutstandingBody(args: {
|
|
91
105
|
debtCredits: number;
|
|
92
106
|
}): DebtOutstandingError;
|
|
93
|
-
/** The input holds a field the product rejects. `fields` names them: the agent cannot */
|
|
94
|
-
/** fix anything until it knows which one to drop. */
|
|
95
107
|
export declare const rejectedFieldError: z.ZodObject<{
|
|
96
108
|
error: z.ZodObject<{
|
|
97
109
|
code: z.ZodLiteral<"rejected_field">;
|
|
@@ -100,13 +112,10 @@ export declare const rejectedFieldError: z.ZodObject<{
|
|
|
100
112
|
}, z.core.$strip>;
|
|
101
113
|
}, z.core.$strip>;
|
|
102
114
|
export type RejectedFieldError = z.infer<typeof rejectedFieldError>;
|
|
103
|
-
/** Builds the "field rejected" body. The reason comes from the disposition registry. */
|
|
104
115
|
export declare function rejectedFieldBody(hits: readonly {
|
|
105
116
|
field: string;
|
|
106
117
|
message: string;
|
|
107
118
|
}[]): RejectedFieldError;
|
|
108
|
-
/** A key outside the contract. The schema strips such keys silently, so a misspelled */
|
|
109
|
-
/** `aspectRatio` became the 9:16 default without a trace; hence a refusal. */
|
|
110
119
|
export declare const unknownFieldError: z.ZodObject<{
|
|
111
120
|
error: z.ZodObject<{
|
|
112
121
|
code: z.ZodLiteral<"unknown_field">;
|
|
@@ -115,12 +124,10 @@ export declare const unknownFieldError: z.ZodObject<{
|
|
|
115
124
|
}, z.core.$strip>;
|
|
116
125
|
}, z.core.$strip>;
|
|
117
126
|
export type UnknownFieldError = z.infer<typeof unknownFieldError>;
|
|
118
|
-
/** Builds the "unknown key" body: each name, a suggestion and the accepted fields. */
|
|
119
127
|
export declare function unknownFieldBody(hits: readonly {
|
|
120
128
|
field: string;
|
|
121
129
|
suggestion?: string | undefined;
|
|
122
130
|
}[], acceptedFields: readonly string[]): UnknownFieldError;
|
|
123
|
-
/** Text arrived with lost bytes: a replacement character in a string leaf of the input. */
|
|
124
131
|
export declare const scriptEncodingLostError: z.ZodObject<{
|
|
125
132
|
error: z.ZodObject<{
|
|
126
133
|
code: z.ZodLiteral<"script_encoding_lost">;
|
|
@@ -129,13 +136,10 @@ export declare const scriptEncodingLostError: z.ZodObject<{
|
|
|
129
136
|
}, z.core.$strip>;
|
|
130
137
|
}, z.core.$strip>;
|
|
131
138
|
export type ScriptEncodingLostError = z.infer<typeof scriptEncodingLostError>;
|
|
132
|
-
/** Builds the "encoding lost" body. Takes BOTH numbers of the predicate, so the caller */
|
|
133
|
-
/** does not choose where the character count comes from. */
|
|
134
139
|
export declare function scriptEncodingLostBody(args: {
|
|
135
140
|
paths: readonly string[];
|
|
136
141
|
charCount: number;
|
|
137
142
|
}): ScriptEncodingLostError;
|
|
138
|
-
/** A save of a draft lost to a newer one: `version` is what is stored now, 0 when nothing is. */
|
|
139
143
|
export declare const editConflictError: z.ZodObject<{
|
|
140
144
|
error: z.ZodObject<{
|
|
141
145
|
code: z.ZodLiteral<"edit_conflict">;
|
|
@@ -144,12 +148,10 @@ export declare const editConflictError: z.ZodObject<{
|
|
|
144
148
|
}, z.core.$strip>;
|
|
145
149
|
}, z.core.$strip>;
|
|
146
150
|
export type EditConflictError = z.infer<typeof editConflictError>;
|
|
147
|
-
/** Builds the "the draft moved on" body. Nothing was stored. */
|
|
148
151
|
export declare function editConflictBody(args: {
|
|
149
152
|
baseVersion: number;
|
|
150
153
|
version: number;
|
|
151
154
|
}): EditConflictError;
|
|
152
|
-
/** The run has no draft to read or to save: `state` and `reason` are the ones its shots state. */
|
|
153
155
|
export declare const runNotEditableError: z.ZodObject<{
|
|
154
156
|
error: z.ZodObject<{
|
|
155
157
|
code: z.ZodLiteral<"run_not_editable">;
|
|
@@ -159,13 +161,11 @@ export declare const runNotEditableError: z.ZodObject<{
|
|
|
159
161
|
}, z.core.$strip>;
|
|
160
162
|
}, z.core.$strip>;
|
|
161
163
|
export type RunNotEditableError = z.infer<typeof runNotEditableError>;
|
|
162
|
-
/** Builds the "this run cannot be edited" body. Nothing was stored. */
|
|
163
164
|
export declare function runNotEditableBody(args: {
|
|
164
165
|
runId: string;
|
|
165
166
|
state: string;
|
|
166
167
|
reason: string | null;
|
|
167
168
|
}): RunNotEditableError;
|
|
168
|
-
/** Paid edits are closed: the flag is off, or a ceiling is not set yet. */
|
|
169
169
|
export declare const editingDisabledError: z.ZodObject<{
|
|
170
170
|
error: z.ZodObject<{
|
|
171
171
|
code: z.ZodLiteral<"editing_disabled">;
|
|
@@ -180,7 +180,6 @@ export type EditingDisabledError = z.infer<typeof editingDisabledError>;
|
|
|
180
180
|
export declare function editingDisabledBody(args: {
|
|
181
181
|
reason: EditingDisabledError["error"]["reason"];
|
|
182
182
|
}): EditingDisabledError;
|
|
183
|
-
/** A paid edit has no price: each seam still unset is named, and an empty list is a revision total of zero no rule allows. */
|
|
184
183
|
export declare const editingNotPricedError: z.ZodObject<{
|
|
185
184
|
error: z.ZodObject<{
|
|
186
185
|
code: z.ZodLiteral<"editing_not_priced">;
|
|
@@ -197,7 +196,6 @@ export type EditingNotPricedError = z.infer<typeof editingNotPricedError>;
|
|
|
197
196
|
export declare function editingNotPricedBody(args: {
|
|
198
197
|
seams: EditingNotPricedError["error"]["seams"];
|
|
199
198
|
}): EditingNotPricedError;
|
|
200
|
-
/** The document breaks the rules of the run it edits; `issues` are the validator's, in its order. */
|
|
201
199
|
export declare const editInvalidError: z.ZodObject<{
|
|
202
200
|
error: z.ZodObject<{
|
|
203
201
|
code: z.ZodLiteral<"edit_invalid">;
|
|
@@ -243,7 +241,6 @@ export type EditInvalidError = z.infer<typeof editInvalidError>;
|
|
|
243
241
|
export declare function editInvalidBody(args: {
|
|
244
242
|
issues: EditInvalidError["error"]["issues"];
|
|
245
243
|
}): EditInvalidError;
|
|
246
|
-
/** A root has as many revisions (or candidates) running, or failed and unfinished, as it may have; `run_ids` are the ones counted. */
|
|
247
244
|
export declare const editCeilingReachedError: z.ZodObject<{
|
|
248
245
|
error: z.ZodObject<{
|
|
249
246
|
code: z.ZodLiteral<"edit_ceiling_reached">;
|
|
@@ -261,22 +258,11 @@ export declare const editCeilingReachedError: z.ZodObject<{
|
|
|
261
258
|
}, z.core.$strip>;
|
|
262
259
|
export type EditCeilingReachedError = z.infer<typeof editCeilingReachedError>;
|
|
263
260
|
export declare function editCeilingReachedBody(args: Omit<EditCeilingReachedError["error"], "code" | "message">, counting?: "revision" | "candidate"): EditCeilingReachedError;
|
|
264
|
-
/** Keeps the tool description's promise ("refused before any charge"): an unusable */
|
|
265
|
-
/** source is refused, not estimated. */
|
|
266
261
|
export declare function unusableSourceMessage(errorClass: string, detail: string): string;
|
|
267
|
-
/** Says both "fix the input" and "a retry will not help": on a 500 agents re-sent bytes */
|
|
268
|
-
/** that would never parse. */
|
|
269
262
|
export declare const MALFORMED_BODY_MESSAGE: string;
|
|
270
|
-
|
|
271
|
-
/** declared exhaustive. */
|
|
272
|
-
declare const BARE_ERROR_CODES: readonly ["analysis_enqueue_failed", "aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "asset_not_found", "asset_not_ready", "assets_disabled", "creator_profile_limited", "creator_profile_not_found", "creator_url_unsupported", "deletion_held", "editing_window_not_set", "explainer_busy", "feedback_limited", "film_draft_limited", "film_draft_not_found", "film_draft_stale", "film_run_not_found", "film_voice_not_ready", "generations_disabled", "generations_marking_pending", "idempotency_key_required", "idempotency_key_reused", "ingest_enqueue_failed", "insufficient_scope", "internal_error", "invalid_image", "invalid_request", "malformed_body", "no_changes", "not_found", "own_agent_disabled", "own_agent_marking_pending", "paid_render_disabled", "proposal_expired", "proposal_not_found", "proposal_not_ready", "proposal_stale", "payload_too_large", "reference_analysis_disabled", "reference_analysis_limited", "reference_analysis_not_found", "reference_not_analyzable", "reference_not_usable", "reference_url_unsupported", "revision_needs_generated_unit", "rights_not_confirmed", "run_media_in_use", "run_not_finished", "run_not_found", "source_aspect_mismatch", "source_not_usable", "trend_page_unavailable", "trend_search_limited", "trend_search_not_found", "trends_unavailable", "unauthorized", "unsupported_combination", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upload_digest_mismatch", "upload_expired", "upload_in_use", "upload_not_finished", "upload_size_mismatch", "upstream_error", "url_fetch_busy", "url_fetch_failed", "url_fetch_rate_limited", "url_fetch_refused", "url_import_disabled"];
|
|
273
|
-
/** A refusal code whose body carries only `code` and `message`. */
|
|
263
|
+
declare const BARE_ERROR_CODES: readonly ["analysis_enqueue_failed", "aspect_conflict", "actor_unavailable", "actor_format_unavailable", "actor_storage_unavailable", "actor_generation_disabled", "actor_in_use", "ad_limited", "ad_not_found", "ad_slot_in_use", "ad_slot_unchecked", "asset_cap_exceeded", "asset_ingest_cap_exceeded", "asset_not_found", "asset_not_ready", "assets_disabled", "creator_profile_limited", "creator_profile_not_found", "creator_url_unsupported", "deletion_held", "editing_window_not_set", "explainer_busy", "feedback_limited", "film_draft_limited", "film_draft_not_found", "film_draft_stale", "film_run_not_found", "film_voice_not_ready", "generations_disabled", "generations_marking_pending", "idempotency_key_required", "idempotency_key_reused", "ingest_enqueue_failed", "insufficient_scope", "internal_error", "invalid_image", "invalid_request", "malformed_body", "no_changes", "not_found", "own_agent_disabled", "own_agent_marking_pending", "paid_render_disabled", "proposal_expired", "proposal_not_found", "proposal_not_ready", "proposal_stale", "payload_too_large", "reference_analysis_disabled", "reference_analysis_limited", "reference_analysis_not_found", "reference_not_analyzable", "reference_not_usable", "reference_url_unsupported", "revision_needs_generated_unit", "rights_not_confirmed", "run_media_in_use", "run_not_finished", "run_not_found", "source_aspect_mismatch", "source_not_usable", "take_frames_limited", "trend_page_unavailable", "trend_search_limited", "trend_search_not_found", "trends_unavailable", "unauthorized", "unsupported_combination", "unsupported_media_type", "unusable_source", "upload_cap_exceeded", "upload_digest_mismatch", "upload_expired", "upload_in_use", "upload_not_finished", "upload_size_mismatch", "upstream_error", "url_fetch_busy", "url_fetch_failed", "url_fetch_rate_limited", "url_fetch_refused", "url_import_disabled"];
|
|
274
264
|
export type BareApiErrorCode = (typeof BARE_ERROR_CODES)[number];
|
|
275
|
-
/** EVERY code the API can return: bare plus typed. Typed values come from their schemas, */
|
|
276
|
-
/** so a rename reaches here on its own. */
|
|
277
265
|
export declare const API_ERROR_CODES: readonly string[];
|
|
278
|
-
/** A bare refusal body. The only path to one: a code outside the registry does not */
|
|
279
|
-
/** compile, and an envelope built around this function fails the envelope guard test. */
|
|
280
266
|
export declare function apiErrorBody(args: {
|
|
281
267
|
code: BareApiErrorCode;
|
|
282
268
|
message: string;
|
package/dist/errors.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { diyBlocked, diyNext } from "./diy-next.js";
|
|
2
3
|
import { EDIT_ISSUE_CODES } from "./edit-validate.js";
|
|
3
4
|
import { workflowCommandError } from "./contracts/v1/workflow-execution.js";
|
|
4
|
-
// Imported only for the 429 codes in the registry below: the names come from their
|
|
5
|
-
// schemas, not literals (`rate-limit.ts` is the only home of the 429 shape).
|
|
6
5
|
import { actorCreationLimitedError, rateLimitedError } from "./rate-limit.js";
|
|
7
|
-
// Refusal bodies are built through schemas, not handler literals: a 402 carries numbers the
|
|
8
|
-
// agent acts on. Numbers sit INSIDE `error`, since an error response has one envelope.
|
|
9
|
-
/** The generic error envelope. Tolerates extra fields inside `error`: the typed refusals */
|
|
10
|
-
/** below extend it, and generic parsing must not break when a code brings numbers. */
|
|
11
6
|
export const apiError = z.object({
|
|
12
7
|
error: z.object({
|
|
13
8
|
code: z.string().min(1),
|
|
@@ -17,25 +12,19 @@ export const apiError = z.object({
|
|
|
17
12
|
export function workflowCommandErrorBody(args) {
|
|
18
13
|
return workflowCommandError.parse({ error: args });
|
|
19
14
|
}
|
|
20
|
-
/** Fewer credits on the balance than the run weighs: "top up". */
|
|
21
15
|
export const insufficientCreditsError = z.object({
|
|
22
16
|
error: z.object({
|
|
23
17
|
code: z.literal("insufficient_credits"),
|
|
24
18
|
message: z.string().min(1),
|
|
25
|
-
/** What the balance holds NOW. Zero is a legal value. */
|
|
26
19
|
balance_credits: z.number().int().nonnegative(),
|
|
27
|
-
/** What this run needs: the same estimate `quote` returned. */
|
|
28
20
|
required_credits: z.number().int().positive(),
|
|
29
21
|
}),
|
|
30
22
|
});
|
|
31
|
-
/** The call's reserve is above the `max_credits` it was sent with (#942): nothing was reserved or started. */
|
|
32
23
|
export const maxCreditsExceededError = z.object({
|
|
33
24
|
error: z.object({
|
|
34
25
|
code: z.literal("max_credits_exceeded"),
|
|
35
26
|
message: z.string().min(1),
|
|
36
|
-
/** The most this run could be charged: the same total its quote names. */
|
|
37
27
|
hold_credits: z.number().int().positive(),
|
|
38
|
-
/** The ceiling the call was sent with. */
|
|
39
28
|
max_credits: z.number().int().nonnegative(),
|
|
40
29
|
}),
|
|
41
30
|
});
|
|
@@ -51,8 +40,6 @@ export function maxCreditsExceededBody(args) {
|
|
|
51
40
|
},
|
|
52
41
|
});
|
|
53
42
|
}
|
|
54
|
-
/** The account carries an unpaid debt. A separate code because an indebted account may */
|
|
55
|
-
/** still hold a balance, so "insufficient credits" would be false. Buying credits clears it. */
|
|
56
43
|
export const debtOutstandingError = z.object({
|
|
57
44
|
error: z.object({
|
|
58
45
|
code: z.literal("debt_outstanding"),
|
|
@@ -60,16 +47,23 @@ export const debtOutstandingError = z.object({
|
|
|
60
47
|
debt_credits: z.number().int().positive(),
|
|
61
48
|
}),
|
|
62
49
|
});
|
|
63
|
-
/** Account not admitted to the beta; money does not change that, so it has its own code. */
|
|
64
|
-
/** Terminal; the body names no timeline, since a revoked account answers the same way. */
|
|
65
50
|
export const accountNotAdmittedError = z.object({
|
|
66
51
|
error: z.object({
|
|
67
52
|
code: z.literal("account_not_admitted"),
|
|
68
53
|
message: z.string().min(1),
|
|
69
54
|
}),
|
|
70
55
|
});
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
export const takeUncheckedError = z.object({
|
|
57
|
+
error: z.object({
|
|
58
|
+
code: z.literal("take_unchecked"),
|
|
59
|
+
message: z.string().min(1),
|
|
60
|
+
next: diyNext,
|
|
61
|
+
blocked: diyBlocked,
|
|
62
|
+
}),
|
|
63
|
+
});
|
|
64
|
+
export function takeUncheckedBody(args) {
|
|
65
|
+
return takeUncheckedError.parse({ error: { code: "take_unchecked", ...args } });
|
|
66
|
+
}
|
|
73
67
|
export function insufficientCreditsBody(args) {
|
|
74
68
|
return insufficientCreditsError.parse({
|
|
75
69
|
error: {
|
|
@@ -81,13 +75,11 @@ export function insufficientCreditsBody(args) {
|
|
|
81
75
|
},
|
|
82
76
|
});
|
|
83
77
|
}
|
|
84
|
-
/** One "needs / has / short" sentence for the 402 refusal and the `quote` warning. */
|
|
85
78
|
export function creditsNeededSentence(args) {
|
|
86
79
|
const short = args.requiredCredits - args.balanceCredits;
|
|
87
80
|
return (`This run needs ${args.requiredCredits} credits, the account has ${args.balanceCredits}` +
|
|
88
81
|
(short > 0 ? ` (${short} short).` : "."));
|
|
89
82
|
}
|
|
90
|
-
/** `quote` warning: `make_ugc` with the same input will get this refusal. */
|
|
91
83
|
export function insufficientCreditsWarning(args) {
|
|
92
84
|
return (`${creditsNeededSentence(args)} make_ugc will be refused with insufficient_credits ` +
|
|
93
85
|
"until the account buys credits.");
|
|
@@ -100,7 +92,6 @@ export function accountNotAdmittedWarning() {
|
|
|
100
92
|
return ("This account is not admitted to the beta; make_ugc will be refused with " +
|
|
101
93
|
"account_not_admitted, and buying credits does not change that.");
|
|
102
94
|
}
|
|
103
|
-
/** Builds the "not admitted to the beta" body; see the wording rule above. */
|
|
104
95
|
export function accountNotAdmittedBody() {
|
|
105
96
|
return accountNotAdmittedError.parse({
|
|
106
97
|
error: {
|
|
@@ -110,7 +101,6 @@ export function accountNotAdmittedBody() {
|
|
|
110
101
|
},
|
|
111
102
|
});
|
|
112
103
|
}
|
|
113
|
-
/** Builds the "outstanding debt" body; see the wording rule above. */
|
|
114
104
|
export function debtOutstandingBody(args) {
|
|
115
105
|
return debtOutstandingError.parse({
|
|
116
106
|
error: {
|
|
@@ -123,8 +113,6 @@ export function debtOutstandingBody(args) {
|
|
|
123
113
|
},
|
|
124
114
|
});
|
|
125
115
|
}
|
|
126
|
-
/** The input holds a field the product rejects. `fields` names them: the agent cannot */
|
|
127
|
-
/** fix anything until it knows which one to drop. */
|
|
128
116
|
export const rejectedFieldError = z.object({
|
|
129
117
|
error: z.object({
|
|
130
118
|
code: z.literal("rejected_field"),
|
|
@@ -132,7 +120,6 @@ export const rejectedFieldError = z.object({
|
|
|
132
120
|
fields: z.array(z.string().min(1)).min(1),
|
|
133
121
|
}),
|
|
134
122
|
});
|
|
135
|
-
/** Builds the "field rejected" body. The reason comes from the disposition registry. */
|
|
136
123
|
export function rejectedFieldBody(hits) {
|
|
137
124
|
return rejectedFieldError.parse({
|
|
138
125
|
error: {
|
|
@@ -142,8 +129,6 @@ export function rejectedFieldBody(hits) {
|
|
|
142
129
|
},
|
|
143
130
|
});
|
|
144
131
|
}
|
|
145
|
-
/** A key outside the contract. The schema strips such keys silently, so a misspelled */
|
|
146
|
-
/** `aspectRatio` became the 9:16 default without a trace; hence a refusal. */
|
|
147
132
|
export const unknownFieldError = z.object({
|
|
148
133
|
error: z.object({
|
|
149
134
|
code: z.literal("unknown_field"),
|
|
@@ -151,7 +136,6 @@ export const unknownFieldError = z.object({
|
|
|
151
136
|
fields: z.array(z.string()).min(1),
|
|
152
137
|
}),
|
|
153
138
|
});
|
|
154
|
-
/** Builds the "unknown key" body: each name, a suggestion and the accepted fields. */
|
|
155
139
|
export function unknownFieldBody(hits, acceptedFields) {
|
|
156
140
|
const named = hits.map((hit) => hit.suggestion === undefined
|
|
157
141
|
? `unknown field "${hit.field}"`
|
|
@@ -165,7 +149,6 @@ export function unknownFieldBody(hits, acceptedFields) {
|
|
|
165
149
|
},
|
|
166
150
|
});
|
|
167
151
|
}
|
|
168
|
-
/** Text arrived with lost bytes: a replacement character in a string leaf of the input. */
|
|
169
152
|
export const scriptEncodingLostError = z.object({
|
|
170
153
|
error: z.object({
|
|
171
154
|
code: z.literal("script_encoding_lost"),
|
|
@@ -173,14 +156,8 @@ export const scriptEncodingLostError = z.object({
|
|
|
173
156
|
fields: z.array(z.string().min(1)).min(1),
|
|
174
157
|
}),
|
|
175
158
|
});
|
|
176
|
-
/** As many paths as `invalid_request` shows: a long list is unreadable, a silently */
|
|
177
|
-
/** shortened one lies, so the rest is given as a number. */
|
|
178
159
|
const MAX_LISTED_PATHS = 12;
|
|
179
|
-
/** An empty path means the root itself is corrupt (a string instead of an object). The */
|
|
180
|
-
/** schema requires a non-empty name, so the root gets a label. */
|
|
181
160
|
const ROOT_PATH_LABEL = "(root)";
|
|
182
|
-
/** Builds the "encoding lost" body. Takes BOTH numbers of the predicate, so the caller */
|
|
183
|
-
/** does not choose where the character count comes from. */
|
|
184
161
|
export function scriptEncodingLostBody(args) {
|
|
185
162
|
const named = args.paths.map((path) => (path === "" ? ROOT_PATH_LABEL : path));
|
|
186
163
|
const listed = named.slice(0, MAX_LISTED_PATHS);
|
|
@@ -198,7 +175,6 @@ export function scriptEncodingLostBody(args) {
|
|
|
198
175
|
},
|
|
199
176
|
});
|
|
200
177
|
}
|
|
201
|
-
/** A save of a draft lost to a newer one: `version` is what is stored now, 0 when nothing is. */
|
|
202
178
|
export const editConflictError = z.object({
|
|
203
179
|
error: z.object({
|
|
204
180
|
code: z.literal("edit_conflict"),
|
|
@@ -206,7 +182,6 @@ export const editConflictError = z.object({
|
|
|
206
182
|
version: z.number().int().nonnegative(),
|
|
207
183
|
}),
|
|
208
184
|
});
|
|
209
|
-
/** Builds the "the draft moved on" body. Nothing was stored. */
|
|
210
185
|
export function editConflictBody(args) {
|
|
211
186
|
return editConflictError.parse({
|
|
212
187
|
error: {
|
|
@@ -217,7 +192,6 @@ export function editConflictBody(args) {
|
|
|
217
192
|
},
|
|
218
193
|
});
|
|
219
194
|
}
|
|
220
|
-
/** The run has no draft to read or to save: `state` and `reason` are the ones its shots state. */
|
|
221
195
|
export const runNotEditableError = z.object({
|
|
222
196
|
error: z.object({
|
|
223
197
|
code: z.literal("run_not_editable"),
|
|
@@ -226,7 +200,6 @@ export const runNotEditableError = z.object({
|
|
|
226
200
|
reason: z.string().min(1).nullable(),
|
|
227
201
|
}),
|
|
228
202
|
});
|
|
229
|
-
/** Builds the "this run cannot be edited" body. Nothing was stored. */
|
|
230
203
|
export function runNotEditableBody(args) {
|
|
231
204
|
return runNotEditableError.parse({
|
|
232
205
|
error: {
|
|
@@ -238,7 +211,6 @@ export function runNotEditableBody(args) {
|
|
|
238
211
|
},
|
|
239
212
|
});
|
|
240
213
|
}
|
|
241
|
-
/** Paid edits are closed: the flag is off, or a ceiling is not set yet. */
|
|
242
214
|
export const editingDisabledError = z.object({
|
|
243
215
|
error: z.object({
|
|
244
216
|
code: z.literal("editing_disabled"),
|
|
@@ -255,7 +227,6 @@ export function editingDisabledBody(args) {
|
|
|
255
227
|
},
|
|
256
228
|
});
|
|
257
229
|
}
|
|
258
|
-
/** A paid edit has no price: each seam still unset is named, and an empty list is a revision total of zero no rule allows. */
|
|
259
230
|
export const editingNotPricedError = z.object({
|
|
260
231
|
error: z.object({
|
|
261
232
|
code: z.literal("editing_not_priced"),
|
|
@@ -273,7 +244,6 @@ export function editingNotPricedBody(args) {
|
|
|
273
244
|
},
|
|
274
245
|
});
|
|
275
246
|
}
|
|
276
|
-
/** The document breaks the rules of the run it edits; `issues` are the validator's, in its order. */
|
|
277
247
|
export const editInvalidError = z.object({
|
|
278
248
|
error: z.object({
|
|
279
249
|
code: z.literal("edit_invalid"),
|
|
@@ -295,7 +265,6 @@ export function editInvalidBody(args) {
|
|
|
295
265
|
},
|
|
296
266
|
});
|
|
297
267
|
}
|
|
298
|
-
/** A root has as many revisions (or candidates) running, or failed and unfinished, as it may have; `run_ids` are the ones counted. */
|
|
299
268
|
export const editCeilingReachedError = z.object({
|
|
300
269
|
error: z.object({
|
|
301
270
|
code: z.literal("edit_ceiling_reached"),
|
|
@@ -317,19 +286,13 @@ export function editCeilingReachedBody(args, counting = "revision") {
|
|
|
317
286
|
},
|
|
318
287
|
});
|
|
319
288
|
}
|
|
320
|
-
/** Keeps the tool description's promise ("refused before any charge"): an unusable */
|
|
321
|
-
/** source is refused, not estimated. */
|
|
322
289
|
export function unusableSourceMessage(errorClass, detail) {
|
|
323
290
|
return (`image cannot be used: ${detail} (${errorClass}). It is refused before any charge, so ` +
|
|
324
291
|
"no credits were reserved and no run was created. Fix the url, or send the file through " +
|
|
325
292
|
"upload_image (POST /v1/uploads) and pass the url it returns.");
|
|
326
293
|
}
|
|
327
|
-
/** Says both "fix the input" and "a retry will not help": on a 500 agents re-sent bytes */
|
|
328
|
-
/** that would never parse. */
|
|
329
294
|
export const MALFORMED_BODY_MESSAGE = "the request body is not valid JSON, so no field of it was read. Send a JSON object as the body " +
|
|
330
295
|
"and check the quoting of whatever built it. The same bytes will fail the same way on a retry.";
|
|
331
|
-
/** Codes with a bare envelope, in one registry: the published list of error codes is */
|
|
332
|
-
/** declared exhaustive. */
|
|
333
296
|
const BARE_ERROR_CODES = [
|
|
334
297
|
"analysis_enqueue_failed",
|
|
335
298
|
"aspect_conflict",
|
|
@@ -338,6 +301,10 @@ const BARE_ERROR_CODES = [
|
|
|
338
301
|
"actor_storage_unavailable",
|
|
339
302
|
"actor_generation_disabled",
|
|
340
303
|
"actor_in_use",
|
|
304
|
+
"ad_limited",
|
|
305
|
+
"ad_not_found",
|
|
306
|
+
"ad_slot_in_use",
|
|
307
|
+
"ad_slot_unchecked",
|
|
341
308
|
"asset_cap_exceeded",
|
|
342
309
|
"asset_ingest_cap_exceeded",
|
|
343
310
|
"asset_not_found",
|
|
@@ -388,6 +355,7 @@ const BARE_ERROR_CODES = [
|
|
|
388
355
|
"run_not_found",
|
|
389
356
|
"source_aspect_mismatch",
|
|
390
357
|
"source_not_usable",
|
|
358
|
+
"take_frames_limited",
|
|
391
359
|
"trend_page_unavailable",
|
|
392
360
|
"trend_search_limited",
|
|
393
361
|
"trend_search_not_found",
|
|
@@ -409,8 +377,6 @@ const BARE_ERROR_CODES = [
|
|
|
409
377
|
"url_fetch_refused",
|
|
410
378
|
"url_import_disabled",
|
|
411
379
|
];
|
|
412
|
-
/** EVERY code the API can return: bare plus typed. Typed values come from their schemas, */
|
|
413
|
-
/** so a rename reaches here on its own. */
|
|
414
380
|
export const API_ERROR_CODES = [
|
|
415
381
|
...BARE_ERROR_CODES,
|
|
416
382
|
...workflowCommandError.shape.error.shape.code.options,
|
|
@@ -419,6 +385,7 @@ export const API_ERROR_CODES = [
|
|
|
419
385
|
scriptEncodingLostError.shape.error.shape.code.value,
|
|
420
386
|
insufficientCreditsError.shape.error.shape.code.value,
|
|
421
387
|
maxCreditsExceededError.shape.error.shape.code.value,
|
|
388
|
+
takeUncheckedError.shape.error.shape.code.value,
|
|
422
389
|
debtOutstandingError.shape.error.shape.code.value,
|
|
423
390
|
accountNotAdmittedError.shape.error.shape.code.value,
|
|
424
391
|
editConflictError.shape.error.shape.code.value,
|
|
@@ -430,9 +397,6 @@ export const API_ERROR_CODES = [
|
|
|
430
397
|
rateLimitedError.shape.error.shape.code.value,
|
|
431
398
|
actorCreationLimitedError.shape.error.shape.code.value,
|
|
432
399
|
];
|
|
433
|
-
/** A bare refusal body. The only path to one: a code outside the registry does not */
|
|
434
|
-
/** compile, and an envelope built around this function fails the envelope guard test. */
|
|
435
400
|
export function apiErrorBody(args) {
|
|
436
401
|
return apiError.parse({ error: { code: args.code, message: args.message } });
|
|
437
402
|
}
|
|
438
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/explainer-fit.d.ts
CHANGED
|
@@ -4,9 +4,7 @@ export interface ExplainerFit {
|
|
|
4
4
|
fits: boolean;
|
|
5
5
|
shape: ExplainerFitShape | null;
|
|
6
6
|
misfit: ExplainerMisfit | null;
|
|
7
|
-
/** One sentence for the customer: why it fits, or why not. */
|
|
8
7
|
reason: string;
|
|
9
|
-
/** Present when it does not fit: how to rewrite the text into actions. */
|
|
10
8
|
rewrite?: string;
|
|
11
9
|
}
|
|
12
10
|
export declare const EXPLAINER_FIT_SECONDS: {
|
|
@@ -14,11 +12,6 @@ export declare const EXPLAINER_FIT_SECONDS: {
|
|
|
14
12
|
readonly max: 60;
|
|
15
13
|
};
|
|
16
14
|
export declare const EXPLAINER_REWRITE: string;
|
|
17
|
-
/** The sentences that each name a thing when the script reads as a list of things, else 0 (#1277): what an explainer's object pictures are
|
|
18
|
-
* counted from, so steps through software name none. */
|
|
19
15
|
export declare function namedThings(script: string): number;
|
|
20
|
-
/** Whether `part` of a list `script` has a sentence naming a thing, so its scene shows its own item (#1280); false when the script is no list. */
|
|
21
16
|
export declare function namesListItem(script: string, part: string): boolean;
|
|
22
|
-
/** The explainer format's fit for a script: the shape it takes when it fits, else the misfit and a rewrite into actions. `wordsPerSecond` is the pace
|
|
23
|
-
* of the voice that will speak it, default the format's flat 2.5. */
|
|
24
17
|
export declare function explainerFit(script: string, wordsPerSecond?: number): ExplainerFit;
|
package/dist/explainer-fit.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { scriptLanguageOf } from "./caption-language.js";
|
|
2
2
|
import { namesThing, namingLanguageOf } from "./naming.js";
|
|
3
|
-
/** Narration words a second, the pace the length bounds assume. */
|
|
4
3
|
const WORDS_PER_SECOND = 2.5;
|
|
5
4
|
export const EXPLAINER_FIT_SECONDS = { min: 12, max: 60 };
|
|
6
|
-
/** Word boundaries that hold for every script, not only ASCII. */
|
|
7
5
|
const word = (body, flags = "giu") => new RegExp(`(?<![\\p{L}\\p{N}_])(?:${body})(?![\\p{L}\\p{N}_])`, flags);
|
|
8
6
|
const ORDINALS = word("first(?:ly)?|second(?:ly)?|third(?:ly)?|fourth|fifth|then|next|after that|finally|last(?:ly)?|step \\d+|step (?:one|two|three|four|five)" +
|
|
9
7
|
"|перв(?:ый|ое|ая|ым)|втор(?:ой|ое|ая)|трет(?:ий|ье|ья)|четв[её]рт\\p{L}*|пят(?:ый|ое)|затем|потом|дальше|наконец|шаг \\d+");
|
|
@@ -22,26 +20,19 @@ const PAST = word("\\p{L}{3,}ed|was|were|had|went|came|saw|met|told|took|got|bec
|
|
|
22
20
|
const count = (re, text) => [...text.matchAll(re)].length;
|
|
23
21
|
export const EXPLAINER_REWRITE = "Rewrite it as actions: a hook (everyone does X, nobody shows how, here's how), three to five steps that each name " +
|
|
24
22
|
"a thing to show (a screen, a button, a file, a number), and one result line; 20 to 45 seconds, one narrator.";
|
|
25
|
-
/** A list needs at least this many naming sentences, and this share of all sentences, so an essay with a few "that's a ..." stays an argument. */
|
|
26
23
|
const LIST_MIN_NAMING = 4, LIST_MIN_SHARE = 0.4;
|
|
27
24
|
const sentencesOf = (text) => text.split(/(?<=[.!?])\s+|\n+/u).filter(part => /\p{L}/u.test(part));
|
|
28
|
-
/** The sentences that each name a thing when the script reads as a list of things, else 0 (#1277): what an explainer's object pictures are
|
|
29
|
-
* counted from, so steps through software name none. */
|
|
30
25
|
export function namedThings(script) {
|
|
31
|
-
// A sentence names a thing by its language's rules (#1284): "it's a heart", "it's cold brew", tr "bir servo motor var", "Soğutma fanı, …".
|
|
32
26
|
const language = namingLanguageOf(script, scriptLanguageOf(script));
|
|
33
27
|
const sentences = sentencesOf(script.trim()), naming = sentences.filter(part => namesThing(part, language)).length;
|
|
34
28
|
return naming >= LIST_MIN_NAMING && naming >= LIST_MIN_SHARE * sentences.length ? naming : 0;
|
|
35
29
|
}
|
|
36
|
-
/** Whether `part` of a list `script` has a sentence naming a thing, so its scene shows its own item (#1280); false when the script is no list. */
|
|
37
30
|
export function namesListItem(script, part) {
|
|
38
31
|
if (namedThings(script) === 0)
|
|
39
32
|
return false;
|
|
40
33
|
const language = namingLanguageOf(script, scriptLanguageOf(script));
|
|
41
34
|
return sentencesOf(part.trim()).some(sentence => namesThing(sentence, language));
|
|
42
35
|
}
|
|
43
|
-
/** The explainer format's fit for a script: the shape it takes when it fits, else the misfit and a rewrite into actions. `wordsPerSecond` is the pace
|
|
44
|
-
* of the voice that will speak it, default the format's flat 2.5. */
|
|
45
36
|
export function explainerFit(script, wordsPerSecond = WORDS_PER_SECOND) {
|
|
46
37
|
const text = script.trim(), words = text.split(/\s+/).filter(Boolean).length, seconds = words / wordsPerSecond;
|
|
47
38
|
const named = namedThings(text) > 0;
|
|
@@ -71,4 +62,3 @@ export function explainerFit(script, wordsPerSecond = WORDS_PER_SECOND) {
|
|
|
71
62
|
: "A walkthrough of concrete actions: each action gets a drawn screen, cursor or typed line on its words.";
|
|
72
63
|
return { fits: true, shape, misfit: null, reason };
|
|
73
64
|
}
|
|
74
|
-
//# sourceMappingURL=explainer-fit.js.map
|
package/dist/face-billing.d.ts
CHANGED
|
@@ -4,21 +4,16 @@ export declare const faceBillingIntervalSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
4
4
|
startFrame: z.ZodNumber;
|
|
5
5
|
endFrame: z.ZodNumber;
|
|
6
6
|
}, z.core.$strict>>;
|
|
7
|
-
/** The engines that render a presenter take; each has its own presenter-second price under a parts tariff (#800). */
|
|
8
7
|
export declare const PRESENTER_ENGINES: readonly ["heygen", "omnihuman"];
|
|
9
8
|
export type PresenterEngine = (typeof PRESENTER_ENGINES)[number];
|
|
10
9
|
export declare const presenterRatesSchema: z.ZodReadonly<z.ZodObject<{
|
|
11
10
|
heygen: z.ZodNumber;
|
|
12
11
|
omnihuman: z.ZodNumber;
|
|
13
12
|
}, z.core.$strict>>;
|
|
14
|
-
/** Live-shot engines (#1103): talking_action and action; silent shots on Gemini Omni 1.2 (#1535) and Seedance 2.5 (#1539 C4), each also */
|
|
15
|
-
/** with no text in frame (`_no_text`) at its own second. */
|
|
16
13
|
export declare const SHOT_ENGINES: readonly ["shot_talking_action", "shot_action", "shot_omni", "shot_seedance", "shot_omni_no_text", "shot_seedance_no_text"];
|
|
17
14
|
export type ShotEngine = (typeof SHOT_ENGINES)[number];
|
|
18
|
-
/** Every engine a face unit may be charged at. */
|
|
19
15
|
export declare const TAKE_ENGINES: readonly ["heygen", "omnihuman", "shot_talking_action", "shot_action", "shot_omni", "shot_seedance", "shot_omni_no_text", "shot_seedance_no_text"];
|
|
20
16
|
export type TakeEngine = (typeof TAKE_ENGINES)[number];
|
|
21
|
-
/** The model engines are absent on every snapshot admitted before them, which then prices no such shot. */
|
|
22
17
|
export declare const shotRatesSchema: z.ZodReadonly<z.ZodObject<{
|
|
23
18
|
shot_talking_action: z.ZodNumber;
|
|
24
19
|
shot_action: z.ZodNumber;
|
|
@@ -27,12 +22,9 @@ export declare const shotRatesSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
27
22
|
shot_omni_no_text: z.ZodOptional<z.ZodNumber>;
|
|
28
23
|
shot_seedance_no_text: z.ZodOptional<z.ZodNumber>;
|
|
29
24
|
}, z.core.$strict>>;
|
|
30
|
-
/** The model a live shot's unit was frozen to draw on (#1535); absent is the shot kind's own engine. */
|
|
31
25
|
export declare const SHOT_MODELS: readonly ["omni", "seedance", "omni_no_text", "seedance_no_text"];
|
|
32
26
|
export type ShotModel = (typeof SHOT_MODELS)[number];
|
|
33
|
-
/** The engine a unit frozen to a model is charged at, whatever route drew it. */
|
|
34
27
|
export declare const SHOT_MODEL_ENGINE: Readonly<Record<ShotModel, ShotEngine>>;
|
|
35
|
-
/** A parts tariff: presenter seconds by engine, plus every second of the video, plus each live-avatar still. */
|
|
36
28
|
export declare const partsFaceTariffSchema: z.ZodReadonly<z.ZodObject<{
|
|
37
29
|
version: z.ZodLiteral<3>;
|
|
38
30
|
pricingVersion: z.ZodString;
|
|
@@ -144,7 +136,6 @@ export declare const faceBillingPlanSchema: z.ZodReadonly<z.ZodObject<{
|
|
|
144
136
|
}, z.core.$strict>>>>;
|
|
145
137
|
hash: z.ZodString;
|
|
146
138
|
}, z.core.$strict>>;
|
|
147
|
-
/** The steps a live shot may be delivered simplified to (#1560). */
|
|
148
139
|
export declare const SIMPLIFIED_STEPS: readonly ["head", "card"];
|
|
149
140
|
export declare const faceBillingAcceptanceSchema: z.ZodReadonly<z.ZodObject<{
|
|
150
141
|
operationId: z.ZodString;
|