@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/moves.js
CHANGED
|
@@ -2,22 +2,16 @@ import { z } from "zod";
|
|
|
2
2
|
import { DESIGN_MOTIONS } from "./design.js";
|
|
3
3
|
import { lexicalTokens } from "./semantic-inserts.js";
|
|
4
4
|
import { layerWordRange } from "./ugc-layers.js";
|
|
5
|
-
// Moves (#1175): our catalogue of motion and graphics devices as a client agent reads it and puts it on lines of a script.
|
|
6
5
|
export const MOVES_PATH = "/v1/moves";
|
|
7
|
-
/** The script line a move serves, finer than hook, proof and call to action. */
|
|
8
6
|
export const MOVE_BEATS = ["hook", "problem", "demo", "proof", "social_proof", "offer", "cta", "transition"];
|
|
9
|
-
/** What the move shows, so the agent knows what to pass in data. */
|
|
10
7
|
export const MOVE_CONTENTS = ["none", "words", "number", "list", "quote", "rating", "photo", "screenshot", "footage", "link"];
|
|
11
|
-
/** Where it draws: over the presenter, on the full frame, on the presenter's shot, on the captions, on a picture, on a graphic, or between shots. */
|
|
12
8
|
export const MOVE_SURFACES = ["over", "full", "presenter", "captions", "picture", "layer", "transition"];
|
|
13
9
|
export const MOVE_SKILLS = ["make_ugc", "make_faceless", "plan_reference_remake"];
|
|
14
|
-
/** soon: listed so the agent knows it is coming, refused when named. */
|
|
15
10
|
export const MOVE_STATUSES = ["ready", "soon"];
|
|
16
11
|
export const MAX_MOVES = 40;
|
|
17
12
|
export const MOVES_PAGE_DEFAULT = 40;
|
|
18
13
|
export const MOVES_PAGE_MAX = 100;
|
|
19
14
|
export const moveName = z.string().min(1).max(48).regex(/^[a-z0-9]+(-[a-z0-9]+)*$/, "a move name is as list_moves names it, such as stat-count-up");
|
|
20
|
-
/** One catalogue line: the short read carries the first fields, detail=full all of them. */
|
|
21
15
|
export const motionMove = z.strictObject({
|
|
22
16
|
name: moveName,
|
|
23
17
|
status: z.enum(MOVE_STATUSES),
|
|
@@ -55,7 +49,6 @@ export const motionMovesList = z.strictObject({
|
|
|
55
49
|
next_cursor: z.string().nullable(),
|
|
56
50
|
contract_version: z.string(),
|
|
57
51
|
});
|
|
58
|
-
/** A move put on the script's words. */
|
|
59
52
|
export const ugcMove = z.strictObject({
|
|
60
53
|
name: moveName,
|
|
61
54
|
anchor: z.strictObject({ quote: z.string().trim().min(1).max(2000), occurrence: z.number().int().nonnegative().optional() })
|
|
@@ -67,7 +60,6 @@ export const ugcMove = z.strictObject({
|
|
|
67
60
|
export const MOVES_DESCRIPTION = "Moves from list_moves on your words: each { name, anchor: { quote }, cover_words?, placement?, data? }. " +
|
|
68
61
|
"Each is drawn as its line in list_moves says; data takes the fields it names. A move that cannot be drawn on its words or in this video " +
|
|
69
62
|
"is named in warnings[] and left out, never dropped silently. Its credits are on the quote.";
|
|
70
|
-
/** Moves sit on the script's words: an anchor that names none is refused before any charge. */
|
|
71
63
|
export function moveRefusals(input) {
|
|
72
64
|
if (!input.moves?.length)
|
|
73
65
|
return [];
|
|
@@ -79,4 +71,3 @@ export function moveRefusals(input) {
|
|
|
79
71
|
return typeof range === "string" ? [{ path: ["moves", index, "anchor"], message: range }] : [];
|
|
80
72
|
});
|
|
81
73
|
}
|
|
82
|
-
//# sourceMappingURL=moves.js.map
|
package/dist/music.d.ts
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { PartsLine } from "./parts-pricing.js";
|
|
3
|
-
/** Credits for the music of one video. */
|
|
4
3
|
export declare const MUSIC_BED_CREDITS = 60;
|
|
5
4
|
export declare const MUSIC_MOOD_MAX_CHARS = 400;
|
|
6
5
|
export declare const MUSIC_DESCRIPTION: string;
|
|
7
|
-
/** No control character (Unicode Cc), spelled as ranges: ChatGPT checks tool schemas with Python's re, which has no \p{Cc}. */
|
|
8
6
|
export declare const ONE_LINE_TEXT: RegExp;
|
|
9
7
|
export declare const musicRequest: z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodObject<{
|
|
10
8
|
mood: z.ZodString;
|
|
11
9
|
}, z.core.$strict>]>;
|
|
12
10
|
export type MusicRequest = z.infer<typeof musicRequest>;
|
|
13
|
-
/** The quote's and the bill's music line. */
|
|
14
11
|
export declare function musicLine(credits?: number): PartsLine;
|
|
15
|
-
/** Off, the field is refused before any reserve. */
|
|
16
12
|
export declare function isMusicEnabled(env?: Record<string, string | undefined>): boolean;
|
|
17
13
|
export declare const MUSIC_DISABLED_MESSAGE = "music is not available right now; omit it";
|
|
18
|
-
/** A delivered video that asked for music and carries none says why, and the music is not charged. */
|
|
19
14
|
export declare function musicNotAddedWarning(reason: string): string;
|
package/dist/music.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
// Opt-in music: one track made for the video and mixed under the voice; its own quote line, charged only on delivery.
|
|
3
|
-
/** Credits for the music of one video. */
|
|
4
2
|
export const MUSIC_BED_CREDITS = 60;
|
|
5
3
|
export const MUSIC_MOOD_MAX_CHARS = 400;
|
|
6
4
|
export const MUSIC_DESCRIPTION = "Background music under the voice, made for this video by AI; it may carry an invisible watermark; off unless " +
|
|
7
5
|
'you ask. "auto" takes the mood from the ' +
|
|
8
6
|
`script; { mood } says it in your words, such as "calm lo-fi". ${MUSIC_BED_CREDITS} credits per video, its own line on the quote, ` +
|
|
9
7
|
"charged only when the video is delivered with it.";
|
|
10
|
-
/** No control character (Unicode Cc), spelled as ranges: ChatGPT checks tool schemas with Python's re, which has no \p{Cc}. */
|
|
11
|
-
// biome-ignore lint/suspicious/noControlCharactersInRegex: the class names control characters to refuse them.
|
|
12
8
|
export const ONE_LINE_TEXT = /^[^\u0000-\u001F\u007F-\u009F]+$/;
|
|
13
9
|
export const musicRequest = z.union([
|
|
14
10
|
z.literal("auto"),
|
|
@@ -16,17 +12,13 @@ export const musicRequest = z.union([
|
|
|
16
12
|
mood: z.string().trim().min(1).max(MUSIC_MOOD_MAX_CHARS).regex(ONE_LINE_TEXT, "mood must be plain text on one line"),
|
|
17
13
|
}),
|
|
18
14
|
], { error: 'music must be "auto" or { mood: "your words" }' });
|
|
19
|
-
/** The quote's and the bill's music line. */
|
|
20
15
|
export function musicLine(credits = MUSIC_BED_CREDITS) {
|
|
21
16
|
return { label: "music", unit: "track", quantity: 1, unit_credits: credits, credits };
|
|
22
17
|
}
|
|
23
|
-
/** Off, the field is refused before any reserve. */
|
|
24
18
|
export function isMusicEnabled(env = typeof process === "undefined" ? {} : process.env) {
|
|
25
19
|
return env.CLIPWRIGHT_MUSIC === "1";
|
|
26
20
|
}
|
|
27
21
|
export const MUSIC_DISABLED_MESSAGE = "music is not available right now; omit it";
|
|
28
|
-
/** A delivered video that asked for music and carries none says why, and the music is not charged. */
|
|
29
22
|
export function musicNotAddedWarning(reason) {
|
|
30
23
|
return `music was not added: ${reason}; it was not charged`;
|
|
31
24
|
}
|
|
32
|
-
//# sourceMappingURL=music.js.map
|
package/dist/naming.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/** The languages whose sentences can name a thing; any other names none. */
|
|
2
1
|
export declare const NAMING_LANGUAGES: string[];
|
|
3
|
-
/** The language whose rules read a script: its letters when they decide (Cyrillic, Turkish), else the Latin language whose common words it uses most. */
|
|
4
2
|
export declare function namingLanguageOf(script: string, letters: string): string;
|
|
5
|
-
/** Whether one sentence names a thing, by the rules of its script's language. */
|
|
6
3
|
export declare function namesThing(sentence: string, language: string): boolean;
|
package/dist/naming.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// Whether a sentence of a script names a thing (#1284): one procedure over a rules table keyed by the script's language, for every language our
|
|
2
|
-
// voices speak. It counts an explainer's object pictures, so steps through software must name none: each rule is measured on both kinds.
|
|
3
1
|
const EN_STATES = ["done", "ready", "easy", "simple", "fast", "quick", "free", "ok", "okay", "fine", "true", "false", "over", "on", "off", "here", "there",
|
|
4
2
|
"it", "this", "that", "these", "those", "yours", "mine", "ours", "theirs", "his", "hers", "live", "possible", "impossible", "important", "enough", "better",
|
|
5
3
|
"best", "worse", "worst", "right", "wrong", "open", "closed", "set", "finished", "saved", "all", "every", "each", "some", "no", "not", "my", "your", "our",
|
|
@@ -57,20 +55,14 @@ const RULES = {
|
|
|
57
55
|
"загрузи", "отправь", "запиши", "убери", "удали", "заполни", "найди", "начни", "закончи", "держи", "используй", "попробуй", "подключи", "замени", "отметь",
|
|
58
56
|
"назови", "спроси", "открывай", "пиши", "ставь", "делай", "пробуй", "часть", "пункт"], topic: [], verbLast: false, imperative: /(?:йте|ите|ьте)$/u },
|
|
59
57
|
};
|
|
60
|
-
/** The languages whose sentences can name a thing; any other names none. */
|
|
61
58
|
export const NAMING_LANGUAGES = Object.keys(RULES);
|
|
62
|
-
/** The most common words of each Latin-script language: the letters alone do not tell Spanish from English or Portuguese (the font table reads
|
|
63
|
-
* them all as Latin), so the script's own words do. */
|
|
64
59
|
const COMMON = {
|
|
65
60
|
en: ["the", "and", "is", "it", "you", "to", "of", "that", "in", "with"], es: ["el", "la", "y", "es", "que", "de", "en", "los", "un", "una", "con"],
|
|
66
61
|
fr: ["le", "la", "et", "est", "que", "de", "les", "un", "une", "des", "avec"], it: ["il", "la", "e", "è", "che", "di", "un", "una", "per", "con"],
|
|
67
62
|
pt: ["o", "a", "e", "é", "que", "de", "um", "uma", "os", "do", "com"], tr: ["ve", "bir", "bu", "için", "ile", "da", "de", "çok", "ama"],
|
|
68
63
|
};
|
|
69
|
-
/** A Latin script uses at least this many of its language's common words, or it is none of ours and names nothing (German, Dutch). */
|
|
70
64
|
const COMMON_MIN = 3;
|
|
71
|
-
/** The language whose rules read a script: its letters when they decide (Cyrillic, Turkish), else the Latin language whose common words it uses most. */
|
|
72
65
|
export function namingLanguageOf(script, letters) {
|
|
73
|
-
// The font table reads every Latin script as en, pl or vi (French â and ê read as vi), so those are told apart by their words.
|
|
74
66
|
if (!["en", "pl", "vi"].includes(letters))
|
|
75
67
|
return letters;
|
|
76
68
|
const words = script.toLocaleLowerCase().match(/[\p{L}']+/gu) ?? [];
|
|
@@ -78,12 +70,10 @@ export function namingLanguageOf(script, letters) {
|
|
|
78
70
|
.reduce((top, next) => (next[1] > top[1] ? next : top));
|
|
79
71
|
return count >= COMMON_MIN ? best : "und";
|
|
80
72
|
}
|
|
81
|
-
/** A clause's words in its language's lower case; an elided article stands apart ("l'espresso" is "l'" and "espresso"), "it's" stays whole. */
|
|
82
73
|
function wordsOf(text, language) {
|
|
83
74
|
return (text.toLocaleLowerCase(language).replace(/’/g, "'").match(/[\p{L}\p{N}'-]+/gu) ?? [])
|
|
84
75
|
.flatMap(w => { const m = /^(\p{L}{1,2}')(\p{L}{2,}.*)$/u.exec(w); return m ? [m[1], m[2]] : [w]; }).filter(w => w !== "'");
|
|
85
76
|
}
|
|
86
|
-
/** Whether one sentence names a thing, by the rules of its script's language. */
|
|
87
77
|
export function namesThing(sentence, language) {
|
|
88
78
|
const r = RULES[language];
|
|
89
79
|
if (!r)
|
|
@@ -97,10 +87,7 @@ export function namesThing(sentence, language) {
|
|
|
97
87
|
out.push(ws.slice(i + lw.length));
|
|
98
88
|
return out;
|
|
99
89
|
};
|
|
100
|
-
// A bare figure names a count ("it is 1", "Part 2:"), and a figure hyphened to a word names a measure ("a 10-minute job"); a word mixing
|
|
101
|
-
// letters and figures otherwise is a name ("a B-52", "a 7UP").
|
|
102
90
|
const noun = (w) => w !== undefined && !r.states.includes(w) && /\p{L}/u.test(w) && !/^\p{N}+-/u.test(w);
|
|
103
|
-
// A bare phrase has no article to vouch for it, so a number, a step word or a pronoun at either end keeps it out too ("ecco tre passi").
|
|
104
91
|
const bareNoun = (w) => noun(w) && !r.notThing.includes(w);
|
|
105
92
|
const step = (w) => !noun(w) || r.notThing.includes(w) || r.sequence.includes(w) || (r.imperative?.test(w) ?? false);
|
|
106
93
|
for (const lead of [...r.frames, ...r.bare, ...r.existential])
|
|
@@ -119,8 +106,6 @@ export function namesThing(sentence, language) {
|
|
|
119
106
|
if (at > 0 && at <= 3 && ws.slice(0, at).every(w => !step(w)))
|
|
120
107
|
return true;
|
|
121
108
|
}
|
|
122
|
-
// A label names a thing only where the language's word order tells a noun phrase from a step (#1285). Where the verb comes first, a step reads
|
|
123
|
-
// "Duplicate rows," exactly as a name reads "Cold brew,", and no closed verb list can hold every verb, so there a label never names.
|
|
124
109
|
if (!r.verbLast || !r.caseEnding)
|
|
125
110
|
return false;
|
|
126
111
|
const topic = r.topic.length ? `|\\s(?:${r.topic.join("|")})\\s` : "";
|
|
@@ -128,10 +113,6 @@ export function namesThing(sentence, language) {
|
|
|
128
113
|
let label = wordsOf(head, language).filter(w => !w.endsWith("'"));
|
|
129
114
|
while (label.length && r.sequence.includes(label[0]))
|
|
130
115
|
label = label.slice(1);
|
|
131
|
-
// Where the verb comes last, a step is an object then its verb: the object carries the case ending and the bare verb closes the label
|
|
132
|
-
// ("Sohbeti kaydet"); a compound name carries its ending on the last word ("Soğutma fanı", "Isı sensörü"). One word alone tells neither.
|
|
133
116
|
const objectThenVerb = label.slice(0, -1).some(w => r.caseEnding.test(w)) && !r.caseEnding.test(label.at(-1));
|
|
134
|
-
// A sequence word left inside the label makes it a step, not a name.
|
|
135
117
|
return label.length >= 2 && label.length <= 3 && !objectThenVerb && label.every(w => !step(w));
|
|
136
118
|
}
|
|
137
|
-
//# sourceMappingURL=naming.js.map
|
package/dist/openapi.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type ApiEndpoint } from "./endpoints.js";
|
|
3
|
-
/** `/openapi.json`: every registry route is marked public or excluded, and a */
|
|
4
|
-
/** public route names its request and response schemas; API tests parse their real responses with them. */
|
|
5
3
|
type SuccessStatus = 200 | 201 | 202 | 204;
|
|
6
4
|
export interface NamedSchema {
|
|
7
5
|
readonly name: string;
|
|
@@ -11,19 +9,14 @@ export interface PublicRoute {
|
|
|
11
9
|
readonly exposure: "public";
|
|
12
10
|
readonly operationId: string;
|
|
13
11
|
readonly tag: OpenApiTag;
|
|
14
|
-
/** Answers without a key, before the auth and rate-limit middleware. */
|
|
15
12
|
readonly anonymous?: true;
|
|
16
13
|
readonly body?: NamedSchema | {
|
|
17
14
|
readonly mediaTypes: readonly string[];
|
|
18
15
|
};
|
|
19
16
|
readonly query?: z.ZodObject;
|
|
20
|
-
/** One schema per path parameter, the core id schema the handlers check; API tests prove no accepted id falls outside it. */
|
|
21
17
|
readonly params?: Readonly<Record<string, z.ZodType>>;
|
|
22
|
-
/** The route takes `Idempotency-Key` without requiring it; a billed route requires it unless it names `billedWithoutKey`. */
|
|
23
18
|
readonly optionalIdempotencyKey?: true;
|
|
24
|
-
/** Why a billed route needs no key: what makes a resend answer the first call instead of charging again. */
|
|
25
19
|
readonly billedWithoutKey?: string;
|
|
26
|
-
/** `null`: no body. A public route without a success response does not compile. */
|
|
27
20
|
readonly responses: Readonly<Partial<Record<SuccessStatus, NamedSchema | null>>> & ({
|
|
28
21
|
200: unknown;
|
|
29
22
|
} | {
|
|
@@ -56,7 +49,6 @@ declare const TAGS: {
|
|
|
56
49
|
readonly Feedback: "What is missing, confusing, wrong or slow; we read every one.";
|
|
57
50
|
};
|
|
58
51
|
export type OpenApiTag = keyof typeof TAGS;
|
|
59
|
-
/** The shared refusal: `code` is a registered one, typed refusals add their own fields. */
|
|
60
52
|
export declare const errorEnvelope: z.ZodObject<{
|
|
61
53
|
error: z.ZodObject<{
|
|
62
54
|
code: z.ZodEnum<{
|
|
@@ -65,19 +57,14 @@ export declare const errorEnvelope: z.ZodObject<{
|
|
|
65
57
|
message: z.ZodString;
|
|
66
58
|
}, z.core.$loose>;
|
|
67
59
|
}, z.core.$strip>;
|
|
68
|
-
/** Keyed by `endpointLabel`; the test proves the keys are exactly the registry's. */
|
|
69
60
|
export declare const OPENAPI_ROUTES: Readonly<Record<string, OpenApiRoute>>;
|
|
70
|
-
/** Registry order, public rows only. */
|
|
71
61
|
export declare function publicOpenApiRoutes(): {
|
|
72
62
|
endpoint: ApiEndpoint;
|
|
73
63
|
route: PublicRoute;
|
|
74
64
|
}[];
|
|
75
|
-
/** `:id` in Hono notation is `{id}` in OpenAPI. */
|
|
76
65
|
export declare const openApiOperationPath: (path: string) => string;
|
|
77
|
-
/** The declared body of a success status: a schema, `null` for no body, `undefined` when undeclared. */
|
|
78
66
|
export declare function openApiResponse(endpoint: ApiEndpoint, status: number): NamedSchema | null | undefined;
|
|
79
67
|
type Json = Record<string, unknown>;
|
|
80
|
-
/** Pure: the same document from the same code, so the API builds it once and serves it from memory. */
|
|
81
68
|
export declare function buildOpenApiDocument(): {
|
|
82
69
|
openapi: string;
|
|
83
70
|
info: {
|
package/dist/openapi.js
CHANGED
|
@@ -57,12 +57,10 @@ const TAGS = {
|
|
|
57
57
|
Account: "Balance, debt and holds.",
|
|
58
58
|
Feedback: "What is missing, confusing, wrong or slow; we read every one.",
|
|
59
59
|
};
|
|
60
|
-
/** The shared refusal: `code` is a registered one, typed refusals add their own fields. */
|
|
61
60
|
export const errorEnvelope = z.object({
|
|
62
61
|
error: z.looseObject({ code: z.enum(API_ERROR_CODES), message: z.string().min(1) }),
|
|
63
62
|
});
|
|
64
63
|
const Run = named("Run", workflowRun);
|
|
65
|
-
// Strict: the API refuses a key outside the offered fields (`unknown_field`) before the schema runs.
|
|
66
64
|
const MakeUgcInput = named("MakeUgcInput", offeredUgcInput.strict());
|
|
67
65
|
const RAW_UPLOAD = { mediaTypes: UPLOAD_MEDIA_TYPES };
|
|
68
66
|
const AssetItem = named("AssetItem", z.union([asset, pendingAsset]));
|
|
@@ -71,7 +69,6 @@ const ACTOR = { id: personalActorId };
|
|
|
71
69
|
const ASSET = { id: assetId };
|
|
72
70
|
const PLAN = { id: workflowId };
|
|
73
71
|
const openApiDocumentShape = z.looseObject({ openapi: z.string(), info: z.looseObject({}), paths: z.record(z.string(), z.unknown()) });
|
|
74
|
-
/** Keyed by `endpointLabel`; the test proves the keys are exactly the registry's. */
|
|
75
72
|
export const OPENAPI_ROUTES = {
|
|
76
73
|
"POST /v1/skills/make_faceless/quote": { exposure: "public", operationId: "quoteMakeFaceless", tag: "Skills",
|
|
77
74
|
body: named("MakeFacelessInput", serverFacelessInput), responses: { 200: named("FacelessQuote", facelessQuoteResponse) } },
|
|
@@ -169,10 +166,19 @@ export const OPENAPI_ROUTES = {
|
|
|
169
166
|
"POST /v1/film-renders": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
170
167
|
"POST /v1/film-heroes/quote": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1356)." },
|
|
171
168
|
"POST /v1/film-heroes": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1356)." },
|
|
169
|
+
"POST /v1/film-edits/quote": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
170
|
+
"POST /v1/film-edits": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
171
|
+
"POST /v1/take-frames/quote": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
172
|
+
"POST /v1/take-frames": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
173
|
+
"POST /v1/take-checks/quote": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
174
|
+
"POST /v1/take-checks": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
172
175
|
"GET /v1/film-runs/{id}": { exposure: "excluded", reason: "Not offered yet: film runs join the contract when their mode launches (#1337)." },
|
|
173
176
|
"GET /v1/film-guide": { exposure: "excluded", reason: "Not offered yet: the film guide joins the contract when its mode launches (#1356)." },
|
|
174
177
|
"GET /v1/film-kit": { exposure: "excluded", reason: "Not offered yet: the film kit joins the contract when its mode launches (#1356)." },
|
|
175
178
|
"GET /v1/ad-guide": { exposure: "excluded", reason: "Not offered yet: the ad guide joins the contract when it opens to every account (#1539)." },
|
|
179
|
+
"POST /v1/ads": { exposure: "excluded", reason: "Not offered yet: ad records join the contract with the ad guide, when it opens to every account (#1539)." },
|
|
180
|
+
"POST /v1/ads/{id}": { exposure: "excluded", reason: "Not offered yet: ad records join the contract with the ad guide, when it opens to every account (#1539)." },
|
|
181
|
+
"GET /v1/ads/{id}": { exposure: "excluded", reason: "Not offered yet: ad records join the contract with the ad guide, when it opens to every account (#1539)." },
|
|
176
182
|
"GET /internal/portfolio-metrics": { exposure: "excluded",
|
|
177
183
|
reason: "Internal funnel aggregates behind their own secret, outside the client contract (docs/03-api.md section 12)." },
|
|
178
184
|
"GET /v1/public/workflows": { exposure: "public", operationId: "listWorkflows", tag: "Workflows", anonymous: true,
|
|
@@ -244,16 +250,13 @@ function routeOf(endpoint) {
|
|
|
244
250
|
throw new Error(`no OpenAPI marking for ${endpointLabel(endpoint)}`);
|
|
245
251
|
return route;
|
|
246
252
|
}
|
|
247
|
-
/** Registry order, public rows only. */
|
|
248
253
|
export function publicOpenApiRoutes() {
|
|
249
254
|
return API_ENDPOINTS.flatMap((endpoint) => {
|
|
250
255
|
const route = routeOf(endpoint);
|
|
251
256
|
return route.exposure === "public" ? [{ endpoint, route }] : [];
|
|
252
257
|
});
|
|
253
258
|
}
|
|
254
|
-
/** `:id` in Hono notation is `{id}` in OpenAPI. */
|
|
255
259
|
export const openApiOperationPath = (path) => path.replace(/:(\w+)/g, "{$1}");
|
|
256
|
-
/** The declared body of a success status: a schema, `null` for no body, `undefined` when undeclared. */
|
|
257
260
|
export function openApiResponse(endpoint, status) {
|
|
258
261
|
const route = routeOf(endpoint);
|
|
259
262
|
if (route.exposure !== "public")
|
|
@@ -262,7 +265,6 @@ export function openApiResponse(endpoint, status) {
|
|
|
262
265
|
}
|
|
263
266
|
const SCHEMA_REF = "#/components/schemas/";
|
|
264
267
|
const WARNINGS = { type: "array", items: { type: "string" } };
|
|
265
|
-
/** zod's local `$defs` would resolve against the document root, so they become components of their own. */
|
|
266
268
|
function toComponent(entry, io, schemas) {
|
|
267
269
|
const json = z.toJSONSchema(entry.schema, { io, unrepresentable: "any" });
|
|
268
270
|
const defs = (json.$defs ?? {});
|
|
@@ -277,7 +279,6 @@ function toComponent(entry, io, schemas) {
|
|
|
277
279
|
if (typeof object.$ref === "string" && object.$ref.startsWith("#/$defs/")) {
|
|
278
280
|
return { ...object, $ref: `${SCHEMA_REF}${entry.name}.${object.$ref.slice("#/$defs/".length)}` };
|
|
279
281
|
}
|
|
280
|
-
// Rule 3: an unmet parameter is a warning, never silence; the shared component says so once.
|
|
281
282
|
if (key === "warnings" && object.type === "array" && JSON.stringify(object.items) === JSON.stringify(WARNINGS.items)) {
|
|
282
283
|
const { type: _type, items: _items, ...rest } = object;
|
|
283
284
|
return { $ref: `${SCHEMA_REF}Warnings`, ...rest };
|
|
@@ -293,9 +294,7 @@ function toComponent(entry, io, schemas) {
|
|
|
293
294
|
schemas[`${entry.name}.${name}`] = rewrite(def);
|
|
294
295
|
}
|
|
295
296
|
const { version: PACKAGE_VERSION } = createRequire(import.meta.url)("../package.json");
|
|
296
|
-
/** Routes whose 200 replays an earlier answer and whose fresh answer has another status. */
|
|
297
297
|
const SUCCESS_REPLAY = new Set(Object.entries(OPENAPI_ROUTES).flatMap(([label, route]) => route.exposure === "public" && 200 in route.responses && (201 in route.responses || 202 in route.responses) ? [label] : []));
|
|
298
|
-
/** Pure: the same document from the same code, so the API builds it once and serves it from memory. */
|
|
299
298
|
export function buildOpenApiDocument() {
|
|
300
299
|
const schemas = {
|
|
301
300
|
Warnings: { ...WARNINGS, description: "What the request named and the API did not honour; it is never dropped silently." },
|
|
@@ -399,4 +398,3 @@ export function buildOpenApiDocument() {
|
|
|
399
398
|
},
|
|
400
399
|
};
|
|
401
400
|
}
|
|
402
|
-
//# sourceMappingURL=openapi.js.map
|
|
@@ -6,7 +6,6 @@ export declare const OUTPUT_PROVENANCE_VIDEO_DETECTOR = "p2-temporal-presence-v1
|
|
|
6
6
|
export declare const OUTPUT_PROVENANCE_VIDEO_QUALITY_CONTRACT = "p2-psnr35-human-reviewed-v1";
|
|
7
7
|
export declare const OUTPUT_PROVENANCE_C2PA_VERSION = "0.28.2";
|
|
8
8
|
export declare const OUTPUT_PROVENANCE_PUBLIC_PAYLOAD = "1011011110011000111111000000011111011111011100000110110110111";
|
|
9
|
-
/** INTERNAL server snapshot, never a client authorization or public request schema. */
|
|
10
9
|
export declare const outputProvenancePolicySchema: z.ZodReadonly<z.ZodObject<{
|
|
11
10
|
policy_version: z.ZodLiteral<"clipwright-output-marking-v2">;
|
|
12
11
|
watermark_profile: z.ZodLiteral<"trustmark-python-0.9.2-q-bch5-strength1">;
|
|
@@ -18,9 +17,6 @@ export declare const outputProvenancePolicySchema: z.ZodReadonly<z.ZodObject<{
|
|
|
18
17
|
visible_ai_label: z.ZodBoolean;
|
|
19
18
|
}, z.core.$strict>>;
|
|
20
19
|
export type OutputProvenancePolicy = z.infer<typeof outputProvenancePolicySchema>;
|
|
21
|
-
/** make_ugc includes long-form presenter video; only these runs default to a label. */
|
|
22
20
|
export declare function createOutputProvenancePolicy(skill: unknown, visibleAiLabel?: unknown): OutputProvenancePolicy;
|
|
23
|
-
/** Both own columns must be explicitly projected; omitted columns are not legacy SQL NULL. */
|
|
24
21
|
export declare function readStoredOutputProvenance(row: unknown): OutputProvenancePolicy | null;
|
|
25
|
-
/** This checks the public namespace, not AI origin/authorship. Malformed output throws. */
|
|
26
22
|
export declare function matchesPublicOutputMarker(nativeTuple: unknown): boolean;
|
|
@@ -6,7 +6,6 @@ export const OUTPUT_PROVENANCE_VIDEO_DETECTOR = "p2-temporal-presence-v1";
|
|
|
6
6
|
export const OUTPUT_PROVENANCE_VIDEO_QUALITY_CONTRACT = "p2-psnr35-human-reviewed-v1";
|
|
7
7
|
export const OUTPUT_PROVENANCE_C2PA_VERSION = "0.28.2";
|
|
8
8
|
export const OUTPUT_PROVENANCE_PUBLIC_PAYLOAD = "1011011110011000111111000000011111011111011100000110110110111";
|
|
9
|
-
/** INTERNAL server snapshot, never a client authorization or public request schema. */
|
|
10
9
|
export const outputProvenancePolicySchema = z.object({
|
|
11
10
|
policy_version: z.literal(OUTPUT_PROVENANCE_VERSION),
|
|
12
11
|
watermark_profile: z.literal(OUTPUT_PROVENANCE_WATERMARK_PROFILE),
|
|
@@ -18,7 +17,6 @@ export const outputProvenancePolicySchema = z.object({
|
|
|
18
17
|
visible_ai_label: z.boolean(),
|
|
19
18
|
}).strict().readonly();
|
|
20
19
|
const supportedSkill = z.enum(["make_ugc", "make_faceless", "edit_shot", "create_actor"]);
|
|
21
|
-
/** make_ugc includes long-form presenter video; only these runs default to a label. */
|
|
22
20
|
export function createOutputProvenancePolicy(skill, visibleAiLabel) {
|
|
23
21
|
const lane = supportedSkill.parse(skill);
|
|
24
22
|
const visible = visibleAiLabel === undefined ? lane === "make_ugc" : z.boolean().parse(visibleAiLabel);
|
|
@@ -36,7 +34,6 @@ export function createOutputProvenancePolicy(skill, visibleAiLabel) {
|
|
|
36
34
|
visible_ai_label: visible,
|
|
37
35
|
});
|
|
38
36
|
}
|
|
39
|
-
/** Both own columns must be explicitly projected; omitted columns are not legacy SQL NULL. */
|
|
40
37
|
export function readStoredOutputProvenance(row) {
|
|
41
38
|
if (row === null || typeof row !== "object" || Array.isArray(row)) {
|
|
42
39
|
throw new TypeError("Output provenance requires a stored run row");
|
|
@@ -59,9 +56,7 @@ export function readStoredOutputProvenance(row) {
|
|
|
59
56
|
const nativeMarkerTupleSchema = z.tuple([
|
|
60
57
|
z.string().regex(/^[01]*$/), z.boolean(), z.number().int(),
|
|
61
58
|
]);
|
|
62
|
-
/** This checks the public namespace, not AI origin/authorship. Malformed output throws. */
|
|
63
59
|
export function matchesPublicOutputMarker(nativeTuple) {
|
|
64
60
|
const [decoded, present, schema] = nativeMarkerTupleSchema.parse(nativeTuple);
|
|
65
61
|
return present === true && schema === 1 && decoded === OUTPUT_PROVENANCE_PUBLIC_PAYLOAD;
|
|
66
62
|
}
|
|
67
|
-
//# sourceMappingURL=output-provenance.js.map
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
/** The tariff runs are admitted on now: the first stills of a draft in a rolling day are free on it (#1369). */
|
|
3
2
|
export declare const OWN_AGENT_TARIFF = "own-agent-v2";
|
|
4
|
-
/** The tariff of runs admitted before free stills: every still charged. */
|
|
5
3
|
export declare const OWN_AGENT_TARIFF_V1 = "own-agent-v1";
|
|
6
|
-
|
|
7
|
-
export declare const OWN_AGENT_SKILLS: readonly ["film_stills", "film_voice", "film_render", "film_hero"];
|
|
4
|
+
export declare const OWN_AGENT_SKILLS: readonly ["film_stills", "film_voice", "film_render", "film_hero", "film_edit", "film_take_frames", "film_take_check"];
|
|
8
5
|
export type OwnAgentSkill = (typeof OWN_AGENT_SKILLS)[number];
|
|
9
|
-
/** One still the agent saw, past the free ones. */
|
|
10
6
|
export declare const OWN_STILL_CREDITS = 1;
|
|
11
|
-
/** Stills of one draft that are free in any rolling window of this many hours; a still past them is charged. */
|
|
12
7
|
export declare const OWN_FREE_STILLS = 120, OWN_FREE_STILLS_WINDOW_HOURS = 24;
|
|
13
|
-
/** A rendered film up to OWN_FILM_INCLUDED_SECONDS, then each second over it. */
|
|
14
8
|
export declare const OWN_FILM_RENDER_CREDITS = 100, OWN_FILM_INCLUDED_SECONDS = 60, OWN_FILM_EXTRA_SECOND_CREDITS = 2;
|
|
15
|
-
/** A second of delivered voice, rounded up once per take. */
|
|
16
9
|
export declare const OWN_VOICE_CREDITS_PER_SECOND = 2;
|
|
17
|
-
/** The bounds a run may ask: stills per call, the longest film and take. */
|
|
18
10
|
export declare const OWN_STILLS_MAX_PER_CALL = 24, OWN_FILM_MAX_SECONDS = 120, OWN_VOICE_MAX_SECONDS = 120;
|
|
19
|
-
/** Up to this many stills come one picture each; a round of more always comes with a sheet (#1372). */
|
|
20
11
|
export declare const OWN_STILLS_SINGLE_MAX = 8;
|
|
21
|
-
/** A hero's pose picture, priced as the done-for-you explainer's, and the poses a hero is made of. */
|
|
22
12
|
export declare const OWN_HERO_POSE_CREDITS = 7, OWN_HERO_POSES = 9;
|
|
23
|
-
|
|
13
|
+
export declare const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
|
|
14
|
+
export declare const OWN_TAKE_FRAMES_MAX = 96, TAKE_FRAMES_PER_HOUR = 60, TAKE_FRAMES_WINDOW_SECONDS = 3600;
|
|
15
|
+
export declare const OWN_TAKE_CHECK_CREDITS = 10;
|
|
24
16
|
export declare const ownAgentTerms: z.ZodObject<{
|
|
25
17
|
tariff: z.ZodEnum<{
|
|
26
18
|
"own-agent-v1": "own-agent-v1";
|
|
@@ -32,25 +24,21 @@ export declare const ownAgentTerms: z.ZodObject<{
|
|
|
32
24
|
extra_second_credits: z.ZodNumber;
|
|
33
25
|
voice_credits_per_second: z.ZodNumber;
|
|
34
26
|
pose_credits: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
edit_credits: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
music_credits: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
take_check_credits: z.ZodOptional<z.ZodNumber>;
|
|
35
30
|
free_stills: z.ZodOptional<z.ZodNumber>;
|
|
36
31
|
free_stills_window_hours: z.ZodOptional<z.ZodNumber>;
|
|
37
32
|
}, z.core.$strict>;
|
|
38
33
|
export type OwnAgentTerms = z.infer<typeof ownAgentTerms>;
|
|
39
34
|
export declare const ownAgentTermsNow: () => OwnAgentTerms;
|
|
40
|
-
/** Whether the mode is offered. */
|
|
41
35
|
export declare const isOwnAgentEnabled: (env: Readonly<Record<string, string | undefined>>) => boolean;
|
|
42
|
-
/** A film of `s` seconds: the base up to the included length, each started second over it on top. */
|
|
43
36
|
export declare const ownFilmRenderCredits: (s: number, terms?: OwnAgentTerms) => number;
|
|
44
|
-
/** A take of `s` seconds, rounded up once. */
|
|
45
37
|
export declare const ownVoiceCredits: (s: number, terms?: OwnAgentTerms) => number;
|
|
46
|
-
/** `n` delivered stills, the first `free` of them granted free when the run was admitted; terms without free stills grant none. */
|
|
47
38
|
export declare function ownStillsCredits(n: number, terms?: OwnAgentTerms, free?: number): number;
|
|
48
|
-
/** `n` published hero poses; terms without a pose price price none. */
|
|
49
39
|
export declare function ownHeroCredits(n: number, terms?: OwnAgentTerms): number;
|
|
50
|
-
|
|
51
|
-
export type OwnAgentDelivery =
|
|
52
|
-
/** `free`: the stills granted free when the run was admitted; absent, none. */
|
|
53
|
-
{
|
|
40
|
+
export declare function ownEditCredits(s: number, terms?: OwnAgentTerms, music?: boolean): number;
|
|
41
|
+
export type OwnAgentDelivery = {
|
|
54
42
|
skill: "film_stills";
|
|
55
43
|
frames: number;
|
|
56
44
|
free?: number;
|
|
@@ -63,6 +51,17 @@ export type OwnAgentDelivery =
|
|
|
63
51
|
} | {
|
|
64
52
|
skill: "film_hero";
|
|
65
53
|
poses: number;
|
|
54
|
+
} | {
|
|
55
|
+
skill: "film_edit";
|
|
56
|
+
seconds: number;
|
|
57
|
+
music?: boolean;
|
|
58
|
+
} | {
|
|
59
|
+
skill: "film_take_frames";
|
|
60
|
+
sheets: number;
|
|
61
|
+
} | {
|
|
62
|
+
skill: "film_take_check";
|
|
63
|
+
checks: number;
|
|
66
64
|
};
|
|
67
|
-
|
|
65
|
+
export declare function ownTakeCheckCredits(n: number, terms?: OwnAgentTerms): number;
|
|
66
|
+
export declare function ownTakeFramesCredits(sheets: number): number;
|
|
68
67
|
export declare function ownAgentCharge(delivery: OwnAgentDelivery, terms: OwnAgentTerms, heldCredits: number): number;
|
package/dist/own-agent-price.js
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { FACELESS_EXPLAINER_POSE_PICTURES, FACELESS_IMAGE_CREDITS } from "./faceless-price.js";
|
|
3
|
-
|
|
4
|
-
// are frozen per run at admission, and only delivered work is charged.
|
|
5
|
-
/** The tariff runs are admitted on now: the first stills of a draft in a rolling day are free on it (#1369). */
|
|
3
|
+
import { MUSIC_BED_CREDITS } from "./music.js";
|
|
6
4
|
export const OWN_AGENT_TARIFF = "own-agent-v2";
|
|
7
|
-
/** The tariff of runs admitted before free stills: every still charged. */
|
|
8
5
|
export const OWN_AGENT_TARIFF_V1 = "own-agent-v1";
|
|
9
|
-
|
|
10
|
-
export const OWN_AGENT_SKILLS = ["film_stills", "film_voice", "film_render", "film_hero"];
|
|
11
|
-
/** One still the agent saw, past the free ones. */
|
|
6
|
+
export const OWN_AGENT_SKILLS = ["film_stills", "film_voice", "film_render", "film_hero", "film_edit", "film_take_frames", "film_take_check"];
|
|
12
7
|
export const OWN_STILL_CREDITS = 1;
|
|
13
|
-
/** Stills of one draft that are free in any rolling window of this many hours; a still past them is charged. */
|
|
14
8
|
export const OWN_FREE_STILLS = 120, OWN_FREE_STILLS_WINDOW_HOURS = 24;
|
|
15
|
-
/** A rendered film up to OWN_FILM_INCLUDED_SECONDS, then each second over it. */
|
|
16
9
|
export const OWN_FILM_RENDER_CREDITS = 100, OWN_FILM_INCLUDED_SECONDS = 60, OWN_FILM_EXTRA_SECOND_CREDITS = 2;
|
|
17
|
-
/** A second of delivered voice, rounded up once per take. */
|
|
18
10
|
export const OWN_VOICE_CREDITS_PER_SECOND = 2;
|
|
19
|
-
/** The bounds a run may ask: stills per call, the longest film and take. */
|
|
20
11
|
export const OWN_STILLS_MAX_PER_CALL = 24, OWN_FILM_MAX_SECONDS = 120, OWN_VOICE_MAX_SECONDS = 120;
|
|
21
|
-
/** Up to this many stills come one picture each; a round of more always comes with a sheet (#1372). */
|
|
22
12
|
export const OWN_STILLS_SINGLE_MAX = 8;
|
|
23
|
-
/** A hero's pose picture, priced as the done-for-you explainer's, and the poses a hero is made of. */
|
|
24
13
|
export const OWN_HERO_POSE_CREDITS = FACELESS_IMAGE_CREDITS, OWN_HERO_POSES = FACELESS_EXPLAINER_POSE_PICTURES;
|
|
25
|
-
|
|
14
|
+
export const OWN_EDIT_CREDITS = 10, OWN_EDIT_MAX_SECONDS = 60;
|
|
15
|
+
export const OWN_TAKE_FRAMES_MAX = 96, TAKE_FRAMES_PER_HOUR = 60, TAKE_FRAMES_WINDOW_SECONDS = 3600;
|
|
16
|
+
export const OWN_TAKE_CHECK_CREDITS = 10;
|
|
26
17
|
export const ownAgentTerms = z.strictObject({
|
|
27
18
|
tariff: z.enum([OWN_AGENT_TARIFF_V1, OWN_AGENT_TARIFF]),
|
|
28
19
|
still_credits: z.number().int().nonnegative(),
|
|
@@ -30,16 +21,17 @@ export const ownAgentTerms = z.strictObject({
|
|
|
30
21
|
included_seconds: z.number().int().positive(),
|
|
31
22
|
extra_second_credits: z.number().int().nonnegative(),
|
|
32
23
|
voice_credits_per_second: z.number().int().nonnegative(),
|
|
33
|
-
/** A published hero pose; absent on terms frozen before the hero was sold, and a hero run without it is never charged. */
|
|
34
24
|
pose_credits: z.number().int().nonnegative().optional(),
|
|
35
|
-
|
|
25
|
+
edit_credits: z.number().int().nonnegative().optional(),
|
|
26
|
+
music_credits: z.number().int().nonnegative().optional(),
|
|
27
|
+
take_check_credits: z.number().int().nonnegative().optional(),
|
|
36
28
|
free_stills: z.number().int().nonnegative().optional(),
|
|
37
29
|
free_stills_window_hours: z.number().int().positive().optional(),
|
|
38
30
|
}).refine(t => (t.tariff === OWN_AGENT_TARIFF) === (t.free_stills !== undefined) && (t.free_stills === undefined) === (t.free_stills_window_hours === undefined), `free stills come with their window, and only on ${OWN_AGENT_TARIFF}`);
|
|
39
31
|
export const ownAgentTermsNow = () => ({ tariff: OWN_AGENT_TARIFF, still_credits: OWN_STILL_CREDITS, render_credits: OWN_FILM_RENDER_CREDITS,
|
|
40
32
|
included_seconds: OWN_FILM_INCLUDED_SECONDS, extra_second_credits: OWN_FILM_EXTRA_SECOND_CREDITS, voice_credits_per_second: OWN_VOICE_CREDITS_PER_SECOND,
|
|
41
|
-
pose_credits: OWN_HERO_POSE_CREDITS,
|
|
42
|
-
|
|
33
|
+
pose_credits: OWN_HERO_POSE_CREDITS, edit_credits: OWN_EDIT_CREDITS, music_credits: MUSIC_BED_CREDITS, take_check_credits: OWN_TAKE_CHECK_CREDITS, free_stills: OWN_FREE_STILLS,
|
|
34
|
+
free_stills_window_hours: OWN_FREE_STILLS_WINDOW_HOURS });
|
|
43
35
|
export const isOwnAgentEnabled = (env) => env.CLIPWRIGHT_OWN_AGENT === "1";
|
|
44
36
|
const seconds = (s, max, what) => {
|
|
45
37
|
if (!Number.isFinite(s) || s <= 0 || s > max)
|
|
@@ -51,17 +43,13 @@ const frames = (n) => {
|
|
|
51
43
|
throw new Error(`${n} stills is outside 0–${OWN_STILLS_MAX_PER_CALL}`);
|
|
52
44
|
return n;
|
|
53
45
|
};
|
|
54
|
-
/** A film of `s` seconds: the base up to the included length, each started second over it on top. */
|
|
55
46
|
export const ownFilmRenderCredits = (s, terms = ownAgentTermsNow()) => terms.render_credits + terms.extra_second_credits * Math.max(0, seconds(s, OWN_FILM_MAX_SECONDS, "a film") - terms.included_seconds);
|
|
56
|
-
/** A take of `s` seconds, rounded up once. */
|
|
57
47
|
export const ownVoiceCredits = (s, terms = ownAgentTermsNow()) => terms.voice_credits_per_second * seconds(s, OWN_VOICE_MAX_SECONDS, "a take");
|
|
58
|
-
/** `n` delivered stills, the first `free` of them granted free when the run was admitted; terms without free stills grant none. */
|
|
59
48
|
export function ownStillsCredits(n, terms = ownAgentTermsNow(), free = 0) {
|
|
60
49
|
if (!Number.isSafeInteger(free) || free < 0 || free > (terms.free_stills ?? 0))
|
|
61
50
|
throw new Error(`${free} free stills is outside these terms`);
|
|
62
51
|
return terms.still_credits * Math.max(0, frames(n) - free);
|
|
63
52
|
}
|
|
64
|
-
/** `n` published hero poses; terms without a pose price price none. */
|
|
65
53
|
export function ownHeroCredits(n, terms = ownAgentTermsNow()) {
|
|
66
54
|
if (!Number.isSafeInteger(n) || n < 0 || n > OWN_HERO_POSES)
|
|
67
55
|
throw new Error(`${n} poses is outside 0–${OWN_HERO_POSES}`);
|
|
@@ -69,13 +57,34 @@ export function ownHeroCredits(n, terms = ownAgentTermsNow()) {
|
|
|
69
57
|
throw new Error("these terms price no hero pose");
|
|
70
58
|
return terms.pose_credits * n;
|
|
71
59
|
}
|
|
72
|
-
|
|
60
|
+
export function ownEditCredits(s, terms = ownAgentTermsNow(), music = false) {
|
|
61
|
+
seconds(s, OWN_EDIT_MAX_SECONDS, "an edit");
|
|
62
|
+
if (terms.edit_credits === undefined)
|
|
63
|
+
throw new Error("these terms price no edit");
|
|
64
|
+
if (music && terms.music_credits === undefined)
|
|
65
|
+
throw new Error("these terms price no music");
|
|
66
|
+
return terms.edit_credits + (music ? terms.music_credits : 0);
|
|
67
|
+
}
|
|
68
|
+
export function ownTakeCheckCredits(n, terms = ownAgentTermsNow()) {
|
|
69
|
+
if (n !== 0 && n !== 1)
|
|
70
|
+
throw new Error(`${n} take verdicts is outside 0–1`);
|
|
71
|
+
if (terms.take_check_credits === undefined)
|
|
72
|
+
throw new Error("these terms price no take check");
|
|
73
|
+
return terms.take_check_credits * n;
|
|
74
|
+
}
|
|
75
|
+
export function ownTakeFramesCredits(sheets) {
|
|
76
|
+
if (!Number.isSafeInteger(sheets) || sheets < 0 || sheets > OWN_TAKE_FRAMES_MAX)
|
|
77
|
+
throw new Error(`${sheets} sheets is outside 0–${OWN_TAKE_FRAMES_MAX}`);
|
|
78
|
+
return 0;
|
|
79
|
+
}
|
|
73
80
|
export function ownAgentCharge(delivery, terms, heldCredits) {
|
|
74
81
|
const charge = delivery.skill === "film_stills" ? ownStillsCredits(delivery.frames, terms, delivery.free)
|
|
75
82
|
: delivery.skill === "film_voice" ? ownVoiceCredits(delivery.seconds, terms)
|
|
76
|
-
: delivery.skill === "film_hero" ? ownHeroCredits(delivery.poses, terms)
|
|
83
|
+
: delivery.skill === "film_hero" ? ownHeroCredits(delivery.poses, terms)
|
|
84
|
+
: delivery.skill === "film_edit" ? ownEditCredits(delivery.seconds, terms, delivery.music === true)
|
|
85
|
+
: delivery.skill === "film_take_frames" ? ownTakeFramesCredits(delivery.sheets)
|
|
86
|
+
: delivery.skill === "film_take_check" ? ownTakeCheckCredits(delivery.checks, terms) : ownFilmRenderCredits(delivery.seconds, terms);
|
|
77
87
|
if (!Number.isSafeInteger(heldCredits) || charge > heldCredits)
|
|
78
88
|
throw new Error(`${delivery.skill} charge ${charge} is over its hold ${heldCredits}`);
|
|
79
89
|
return charge;
|
|
80
90
|
}
|
|
81
|
-
//# sourceMappingURL=own-agent-price.js.map
|