@sogni-ai/sogni-intelligence-client 3.0.8 → 3.0.10
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/public-skill-runtime/index.d.ts +1 -1
- package/dist/public-skill-runtime/index.d.ts.map +1 -1
- package/dist/public-skill-runtime/index.js +36 -18
- package/dist/public-skill-runtime/index.js.map +1 -1
- package/dist/tools/shared/seedancePolicyErrors.d.ts +14 -1
- package/dist/tools/shared/seedancePolicyErrors.d.ts.map +1 -1
- package/dist/tools/shared/seedancePolicyErrors.js +40 -2
- package/dist/tools/shared/seedancePolicyErrors.js.map +1 -1
- package/dist-esm/public-skill-runtime/index.js +36 -18
- package/dist-esm/public-skill-runtime/index.js.map +1 -1
- package/dist-esm/tools/shared/seedancePolicyErrors.js +39 -1
- package/dist-esm/tools/shared/seedancePolicyErrors.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type VendorModelPremiumRequiredPayload } from '../../media/index.js';
|
|
2
2
|
export declare const SEEDANCE_INPUT_IMAGE_PRIVACY_POLICY_CODE = "InputImageSensitiveContentDetected.PrivacyInformation";
|
|
3
|
-
export declare const SEEDANCE_REAL_PERSON_PRIVACY_MESSAGE = "Seedance
|
|
3
|
+
export declare const SEEDANCE_REAL_PERSON_PRIVACY_MESSAGE = "Seedance can't bring this image to life because it detected what looks like a real person, and it doesn't allow photographic depictions of real people. I can first convert the attached image or storyboard into a clearly non-photographic replacement reference, such as anime, cartoon, claymation, LEGO, or bobblehead, or I can hide the faces. I will not make another realistic human portrait. Once that safe reference exists, I'll re-run the Seedance video using it. Which look would you like, or describe your own?";
|
|
4
|
+
export interface SeedanceStylizeRecoveryOption {
|
|
5
|
+
id: 'anime' | 'cartoon' | 'lego' | 'bobblehead' | 'claymation' | 'hide_faces';
|
|
6
|
+
label: string;
|
|
7
|
+
editInstruction: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SEEDANCE_STYLIZE_RECOVERY_OPTIONS: readonly SeedanceStylizeRecoveryOption[];
|
|
10
|
+
export interface SeedanceStylizeRecovery {
|
|
11
|
+
kind: 'stylize_source_then_resubmit';
|
|
12
|
+
options: readonly SeedanceStylizeRecoveryOption[];
|
|
13
|
+
resubmitToolName: 'generate_video';
|
|
14
|
+
}
|
|
15
|
+
export declare const SEEDANCE_STYLIZE_RECOVERY: SeedanceStylizeRecovery;
|
|
4
16
|
export declare const SEEDANCE_PROVIDER_CONTENT_POLICY_MESSAGE = "Seedance blocked this video because it did not pass the provider's content policy. No video was returned.";
|
|
5
17
|
export declare const SEEDANCE_VENDOR_GENERATION_FAILED_MESSAGE = "Seedance couldn't complete this video after it started, so no media was generated. The provider did not return a specific reason. Please retry once; if it fails again, report the issue from this message.";
|
|
6
18
|
export declare const SEEDANCE_VENDOR_TIMEOUT_MESSAGE = "Seedance timed out while rendering this video, so no media was generated. Please retry once; if it times out again, report the issue from this message.";
|
|
@@ -12,6 +24,7 @@ export interface SeedanceTerminalPolicyPayload {
|
|
|
12
24
|
nextAction: 'wait_for_user';
|
|
13
25
|
vendorCode?: 5061;
|
|
14
26
|
vendorErrorCode: typeof SEEDANCE_INPUT_IMAGE_PRIVACY_POLICY_CODE | string;
|
|
27
|
+
recovery?: SeedanceStylizeRecovery;
|
|
15
28
|
}
|
|
16
29
|
export interface SeedanceTerminalGenerationFailurePayload {
|
|
17
30
|
error: 'seedance_generation_failed' | 'seedance_reference_audio_too_long';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seedancePolicyErrors.d.ts","sourceRoot":"","sources":["../../../src/tools/shared/seedancePolicyErrors.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,wCAAwC,0DACI,CAAC;AAE1D,eAAO,MAAM,oCAAoC,
|
|
1
|
+
{"version":3,"file":"seedancePolicyErrors.d.ts","sourceRoot":"","sources":["../../../src/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E,0BAA0B,CAAC;IACxC,UAAU,EAAE,eAAe,CAAC;IAC5B,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;gBAEpC,OAAO,EAAE,6BAA6B;CAKnD;AA0JD,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,OAAO,GACb,6BAA6B,GAAG,IAAI,CAiCtC;AAED,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,OAAO,GACb,2BAA2B,GAAG,IAAI,CAGpC;AAED,wBAAgB,iDAAiD,CAC/D,KAAK,EAAE,OAAO,GACb,wCAAwC,GAAG,iCAAiC,GAAG,IAAI,CAwFrF"}
|
|
@@ -1,12 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SeedanceTerminalPolicyError = exports.SEEDANCE_REFERENCE_AUDIO_TOO_LONG_MESSAGE = exports.SEEDANCE_VENDOR_TIMEOUT_MESSAGE = exports.SEEDANCE_VENDOR_GENERATION_FAILED_MESSAGE = exports.SEEDANCE_PROVIDER_CONTENT_POLICY_MESSAGE = exports.SEEDANCE_REAL_PERSON_PRIVACY_MESSAGE = exports.SEEDANCE_INPUT_IMAGE_PRIVACY_POLICY_CODE = void 0;
|
|
3
|
+
exports.SeedanceTerminalPolicyError = exports.SEEDANCE_REFERENCE_AUDIO_TOO_LONG_MESSAGE = exports.SEEDANCE_VENDOR_TIMEOUT_MESSAGE = exports.SEEDANCE_VENDOR_GENERATION_FAILED_MESSAGE = exports.SEEDANCE_PROVIDER_CONTENT_POLICY_MESSAGE = exports.SEEDANCE_STYLIZE_RECOVERY = exports.SEEDANCE_STYLIZE_RECOVERY_OPTIONS = exports.SEEDANCE_REAL_PERSON_PRIVACY_MESSAGE = exports.SEEDANCE_INPUT_IMAGE_PRIVACY_POLICY_CODE = void 0;
|
|
4
4
|
exports.seedanceTerminalPolicyPayloadFromError = seedanceTerminalPolicyPayloadFromError;
|
|
5
5
|
exports.seedanceTerminalPolicyErrorFromError = seedanceTerminalPolicyErrorFromError;
|
|
6
6
|
exports.seedanceTerminalGenerationFailurePayloadFromError = seedanceTerminalGenerationFailurePayloadFromError;
|
|
7
7
|
const index_js_1 = require("../../media/index.js");
|
|
8
8
|
exports.SEEDANCE_INPUT_IMAGE_PRIVACY_POLICY_CODE = 'InputImageSensitiveContentDetected.PrivacyInformation';
|
|
9
|
-
exports.SEEDANCE_REAL_PERSON_PRIVACY_MESSAGE = "Seedance
|
|
9
|
+
exports.SEEDANCE_REAL_PERSON_PRIVACY_MESSAGE = "Seedance can't bring this image to life because it detected what looks like a real person, and it doesn't allow photographic depictions of real people. I can first convert the attached image or storyboard into a clearly non-photographic replacement reference, such as anime, cartoon, claymation, LEGO, or bobblehead, or I can hide the faces. I will not make another realistic human portrait. Once that safe reference exists, I'll re-run the Seedance video using it. Which look would you like, or describe your own?";
|
|
10
|
+
exports.SEEDANCE_STYLIZE_RECOVERY_OPTIONS = [
|
|
11
|
+
{
|
|
12
|
+
id: 'anime',
|
|
13
|
+
label: 'Anime version',
|
|
14
|
+
editInstruction: 'Redraw every person in the image as a clearly non-photographic 2D anime character, keeping their pose, outfit, and the overall scene composition; do not preserve a realistic face or skin texture.',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'cartoon',
|
|
18
|
+
label: 'Cartoon version',
|
|
19
|
+
editInstruction: 'Redraw every person in the image as a clearly non-photographic cartoon character with simplified facial features, keeping their pose, outfit colors, and the overall scene composition.',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 'lego',
|
|
23
|
+
label: 'LEGO version',
|
|
24
|
+
editInstruction: 'Rebuild every person in the image as a toy-like LEGO minifigure, keeping their pose, outfit colors, and the overall scene composition; avoid realistic human faces and skin.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'bobblehead',
|
|
28
|
+
label: 'Bobblehead version',
|
|
29
|
+
editInstruction: 'Turn every person in the image into a cute oversized-head bobblehead figurine with toy-like simplified features, keeping the outfit and overall scene composition but avoiding a realistic human likeness.',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'claymation',
|
|
33
|
+
label: 'Claymation version',
|
|
34
|
+
editInstruction: 'Re-render every person in the image as a stop-motion claymation figure with visible clay texture and simplified faces, keeping their pose, outfit, and the overall scene composition.',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'hide_faces',
|
|
38
|
+
label: 'Just hide the faces',
|
|
39
|
+
editInstruction: 'Obscure every human face in the image (for example with a tasteful mask, helmet, shadow, or soft blur) while keeping the people, their pose, outfit, and the overall scene composition intact.',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
exports.SEEDANCE_STYLIZE_RECOVERY = {
|
|
43
|
+
kind: 'stylize_source_then_resubmit',
|
|
44
|
+
options: exports.SEEDANCE_STYLIZE_RECOVERY_OPTIONS,
|
|
45
|
+
resubmitToolName: 'generate_video',
|
|
46
|
+
};
|
|
10
47
|
exports.SEEDANCE_PROVIDER_CONTENT_POLICY_MESSAGE = "Seedance blocked this video because it did not pass the provider's content policy. No video was returned.";
|
|
11
48
|
exports.SEEDANCE_VENDOR_GENERATION_FAILED_MESSAGE = "Seedance couldn't complete this video after it started, so no media was generated. The provider did not return a specific reason. Please retry once; if it fails again, report the issue from this message.";
|
|
12
49
|
exports.SEEDANCE_VENDOR_TIMEOUT_MESSAGE = "Seedance timed out while rendering this video, so no media was generated. Please retry once; if it times out again, report the issue from this message.";
|
|
@@ -160,6 +197,7 @@ function seedanceTerminalPolicyPayloadFromError(error) {
|
|
|
160
197
|
nextAction: 'wait_for_user',
|
|
161
198
|
...(hasExpectedVendorCode ? { vendorCode: 5061 } : {}),
|
|
162
199
|
vendorErrorCode: exports.SEEDANCE_INPUT_IMAGE_PRIVACY_POLICY_CODE,
|
|
200
|
+
recovery: exports.SEEDANCE_STYLIZE_RECOVERY,
|
|
163
201
|
};
|
|
164
202
|
}
|
|
165
203
|
function seedanceTerminalPolicyErrorFromError(error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seedancePolicyErrors.js","sourceRoot":"","sources":["../../../src/tools/shared/seedancePolicyErrors.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"seedancePolicyErrors.js","sourceRoot":"","sources":["../../../src/tools/shared/seedancePolicyErrors.ts"],"names":[],"mappings":";;;AA4RA,wFAmCC;AAED,oFAKC;AAED,8GA0FC;AA5ZD,mDAG8B;AAEjB,QAAA,wCAAwC,GACnD,uDAAuD,CAAC;AAE7C,QAAA,oCAAoC,GAC/C,ogBAAogB,CAAC;AAkB1f,QAAA,iCAAiC,GAA6C;IACzF;QACE,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,eAAe;QACtB,eAAe,EACb,qMAAqM;KACxM;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,iBAAiB;QACxB,eAAe,EACb,yLAAyL;KAC5L;IACD;QACE,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,cAAc;QACrB,eAAe,EACb,8KAA8K;KACjL;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,oBAAoB;QAC3B,eAAe,EACb,4MAA4M;KAC/M;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,oBAAoB;QAC3B,eAAe,EACb,uLAAuL;KAC1L;IACD;QACE,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,qBAAqB;QAC5B,eAAe,EACb,gMAAgM;KACnM;CACF,CAAC;AASW,QAAA,yBAAyB,GAA4B;IAChE,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,y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AK,EAAE,4BAA4B;YACnC,OAAO,EAAE,MAAM,CAAC,WAAW;YAC3B,WAAW,EAAE,0BAA0B;YACvC,UAAU,EAAE,eAAe;YAC3B,eAAe,EAAE,kBAAkB;YACnC,WAAW,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC;SAChD,CAAC;IACJ,CAAC;IACD,IAAI,mDAAmD,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACnE,OAAO;YACL,KAAK,EAAE,4BAA4B;YACnC,OAAO,EAAE,uCAA+B;YACxC,WAAW,EAAE,0BAA0B;YACvC,UAAU,EAAE,eAAe;YAC3B,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,iDAAiD;YACpE,eAAe,EAAE,kBAAkB;YACnC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrD,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,4BAA4B;QACnC,OAAO,EAAE,iDAAyC;QAClD,WAAW,EAAE,0BAA0B;QACvC,UAAU,EAAE,eAAe;QAC3B,WAAW,EAAE,IAAI;QACjB,iBAAiB,EAAE,iFAAiF;QACpG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACrD,CAAC;AACJ,CAAC"}
|
|
@@ -2817,17 +2817,20 @@ function inferExplicitStoryboardTargetVideoAspectRatio(text) {
|
|
|
2817
2817
|
}
|
|
2818
2818
|
return null;
|
|
2819
2819
|
}
|
|
2820
|
-
function
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2820
|
+
function inferStoryboardTargetVideoAspect(text, boardAspectRatio, explicitTargetVideoAspectRatio = inferExplicitStoryboardTargetVideoAspectRatio(text)) {
|
|
2821
|
+
if (explicitTargetVideoAspectRatio) {
|
|
2822
|
+
return { aspectRatio: explicitTargetVideoAspectRatio, source: 'explicit_ratio' };
|
|
2823
|
+
}
|
|
2824
2824
|
if (/\b(?:portrait|vertical|9\s*:\s*16)\b/i.test(text) || textMentionsPortraitSocialFormat(text)) {
|
|
2825
|
-
return '9:16';
|
|
2825
|
+
return { aspectRatio: '9:16', source: 'orientation_cue' };
|
|
2826
2826
|
}
|
|
2827
2827
|
if (/\b(?:landscape|horizontal|widescreen|16\s*:\s*9|youtube)\b/i.test(text)) {
|
|
2828
|
-
return '16:9';
|
|
2828
|
+
return { aspectRatio: '16:9', source: 'orientation_cue' };
|
|
2829
2829
|
}
|
|
2830
|
-
return boardAspectRatio;
|
|
2830
|
+
return { aspectRatio: boardAspectRatio, source: 'board_fallback' };
|
|
2831
|
+
}
|
|
2832
|
+
function inferStoryboardTargetVideoAspectRatio(text, boardAspectRatio) {
|
|
2833
|
+
return inferStoryboardTargetVideoAspect(text, boardAspectRatio).aspectRatio;
|
|
2831
2834
|
}
|
|
2832
2835
|
function inferStoryboardCellAspectRatio(text, targetVideoAspectRatio) {
|
|
2833
2836
|
const explicitCell = inferStoryboardAspectNearUnit(text, String.raw `cell|cells|frame|frames|panel|panels|still|stills|thumbnail|thumbnails|shot|shots`, /\b(?:board|canvas|image|poster|sheet|layout|story\s*board|storyboard|output|format)\b/i);
|
|
@@ -3057,7 +3060,7 @@ function normalizeStoryboardBoardDimensions(value) {
|
|
|
3057
3060
|
function storyboardPlanningSourceFromContract(contract) {
|
|
3058
3061
|
return contract?.layout?.source ?? contract?.source ?? 'fallback_text';
|
|
3059
3062
|
}
|
|
3060
|
-
function applyStoryboardPlanningLayoutContract(fallback, contract, frameCount, userDefinedCanvas) {
|
|
3063
|
+
function applyStoryboardPlanningLayoutContract(fallback, contract, frameCount, userDefinedCanvas, userDefinedTargetVideoAspect) {
|
|
3061
3064
|
const layoutContract = contract?.layout;
|
|
3062
3065
|
if (!layoutContract)
|
|
3063
3066
|
return fallback;
|
|
@@ -3071,11 +3074,14 @@ function applyStoryboardPlanningLayoutContract(fallback, contract, frameCount, u
|
|
|
3071
3074
|
const boardAspectRatio = contractOwnsCanvas
|
|
3072
3075
|
? normalizeAspectRatio(layoutContract.storyboardCanvasAspectRatio) ?? fallback.boardAspectRatio
|
|
3073
3076
|
: fallback.boardAspectRatio;
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3076
|
-
const
|
|
3077
|
-
?? cellAspectRatio
|
|
3078
|
-
|
|
3077
|
+
const contractOwnsVideoGeometry = !userDefinedTargetVideoAspect
|
|
3078
|
+
|| layoutSource === 'user_schema';
|
|
3079
|
+
const cellAspectRatio = contractOwnsVideoGeometry
|
|
3080
|
+
? normalizeAspectRatio(layoutContract.storyboardCellAspectRatio) ?? fallback.cellAspectRatio
|
|
3081
|
+
: fallback.cellAspectRatio;
|
|
3082
|
+
const targetVideoAspectRatio = contractOwnsVideoGeometry
|
|
3083
|
+
? normalizeAspectRatio(layoutContract.targetVideoAspectRatio) ?? cellAspectRatio ?? fallback.targetVideoAspectRatio
|
|
3084
|
+
: fallback.targetVideoAspectRatio;
|
|
3079
3085
|
const layout = describeStoryboardLayout(boardAspectRatio, cellAspectRatio, frameCount);
|
|
3080
3086
|
const contractBoardDimensions = contractOwnsCanvas
|
|
3081
3087
|
? normalizeStoryboardBoardDimensions(layoutContract.boardDimensions)
|
|
@@ -3115,7 +3121,7 @@ function storyboardBoardDimensionsMatchAspect(boardDimensions, boardAspectRatio)
|
|
|
3115
3121
|
const ratioError = Math.abs(actualRatio - targetRatio) / targetRatio;
|
|
3116
3122
|
return ratioError <= 0.1;
|
|
3117
3123
|
}
|
|
3118
|
-
export function inferStoryboardLayoutSpec(userIntentText, frameCount, planningContract) {
|
|
3124
|
+
export function inferStoryboardLayoutSpec(userIntentText, frameCount, planningContract, geometryAuthorityText = userIntentText) {
|
|
3119
3125
|
const planningLayout = planningContract?.layout;
|
|
3120
3126
|
const userDefinedCanvas = typeof planningLayout?.storyboardCanvasSpecifiedByUser === 'boolean'
|
|
3121
3127
|
? planningLayout.storyboardCanvasSpecifiedByUser
|
|
@@ -3125,8 +3131,12 @@ export function inferStoryboardLayoutSpec(userIntentText, frameCount, planningCo
|
|
|
3125
3131
|
const provisionalBoardAspectRatio = userDefinedCanvas
|
|
3126
3132
|
? inferStoryboardBoardAspectRatio(userIntentText)
|
|
3127
3133
|
: '16:9';
|
|
3128
|
-
const
|
|
3129
|
-
|
|
3134
|
+
const inferredTargetVideoAspect = inferStoryboardTargetVideoAspect(userIntentText, provisionalBoardAspectRatio, explicitTargetVideoAspectRatio);
|
|
3135
|
+
const inferredTargetVideoAspectRatio = inferredTargetVideoAspect.aspectRatio;
|
|
3136
|
+
const authorityTargetVideoAspect = geometryAuthorityText === userIntentText
|
|
3137
|
+
? inferredTargetVideoAspect
|
|
3138
|
+
: inferStoryboardTargetVideoAspect(geometryAuthorityText, provisionalBoardAspectRatio);
|
|
3139
|
+
const userDefinedTargetVideoAspect = authorityTargetVideoAspect.source !== 'board_fallback';
|
|
3130
3140
|
const cellAspectRatio = inferStoryboardCellAspectRatio(userIntentText, inferredTargetVideoAspectRatio);
|
|
3131
3141
|
const targetVideoAspectRatio = explicitTargetVideoAspectRatio ?? cellAspectRatio;
|
|
3132
3142
|
const balancedGrid = userDefinedCanvas
|
|
@@ -3145,7 +3155,7 @@ export function inferStoryboardLayoutSpec(userIntentText, frameCount, planningCo
|
|
|
3145
3155
|
? {}
|
|
3146
3156
|
: { boardDimensions: balancedGrid?.boardDimensions ?? GPT_IMAGE_STORYBOARD_DEFAULTS.storyboardLandscape.aspectRatio }),
|
|
3147
3157
|
};
|
|
3148
|
-
return applyStoryboardPlanningLayoutContract(fallback, planningContract, frameCount, userDefinedCanvas);
|
|
3158
|
+
return applyStoryboardPlanningLayoutContract(fallback, planningContract, frameCount, userDefinedCanvas, userDefinedTargetVideoAspect);
|
|
3149
3159
|
}
|
|
3150
3160
|
function clampStoryboardDefaultFrameCount(value) {
|
|
3151
3161
|
return Math.max(STORYBOARD_DEFAULT_MIN_FRAMES, Math.min(STORYBOARD_DEFAULT_MAX_FRAMES, Math.round(value)));
|
|
@@ -5559,12 +5569,20 @@ export function buildStoryboardProject(options) {
|
|
|
5559
5569
|
&& !storyboardBriefContains(primarySourceBrief, userIntentText)) {
|
|
5560
5570
|
layoutTextParts.push(primarySourceBrief);
|
|
5561
5571
|
}
|
|
5572
|
+
const geometryAuthorityParts = [userIntentText].filter(Boolean);
|
|
5573
|
+
if (options.promptAuthorship !== 'assistant'
|
|
5574
|
+
&& primarySourceBrief
|
|
5575
|
+
&& !storyboardBriefContains(userIntentText, primarySourceBrief)
|
|
5576
|
+
&& !storyboardBriefContains(primarySourceBrief, userIntentText)) {
|
|
5577
|
+
geometryAuthorityParts.push(primarySourceBrief);
|
|
5578
|
+
}
|
|
5579
|
+
const geometryAuthorityText = geometryAuthorityParts.join('\n\n') || userIntentText;
|
|
5562
5580
|
if (approvedScriptContext
|
|
5563
5581
|
&& !storyboardBriefContains(layoutTextParts.join('\n'), approvedScriptContext)) {
|
|
5564
5582
|
layoutTextParts.push(approvedScriptContext);
|
|
5565
5583
|
}
|
|
5566
5584
|
const layoutText = layoutTextParts.join('\n\n') || sourceText;
|
|
5567
|
-
const layout = inferStoryboardLayoutSpec(layoutText, options.frameCount, options.planningContract);
|
|
5585
|
+
const layout = inferStoryboardLayoutSpec(layoutText, options.frameCount, options.planningContract, geometryAuthorityText);
|
|
5568
5586
|
const requestedDurationSec = inferRequestedTotalVideoDurationSeconds(userIntentText);
|
|
5569
5587
|
const durationSec = requestedDurationSec ?? inferRequestedTotalVideoDurationSeconds(sourceText);
|
|
5570
5588
|
const references = buildStoryboardReferenceAssets(userIntentText, [
|