@sogni-ai/sogni-intelligence-client 3.0.6 → 3.0.8
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/contracts/data/promptContracts.d.ts.map +1 -1
- package/dist/contracts/data/promptContracts.js +23 -0
- package/dist/contracts/data/promptContracts.js.map +1 -1
- package/dist/contracts/videoComposition.d.ts.map +1 -1
- package/dist/contracts/videoComposition.js +15 -1
- package/dist/contracts/videoComposition.js.map +1 -1
- package/dist/media/gptImage.d.ts +1 -1
- package/dist/media/gptImage.d.ts.map +1 -1
- package/dist/media/gptImage.js +0 -2
- package/dist/media/gptImage.js.map +1 -1
- 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 +62 -13
- package/dist/public-skill-runtime/index.js.map +1 -1
- package/dist/tools/definitions/animate-photo/definition.d.ts.map +1 -1
- package/dist/tools/definitions/animate-photo/definition.js +6 -4
- package/dist/tools/definitions/animate-photo/definition.js.map +1 -1
- package/dist/tools/definitions/edit-image/definition.js +2 -2
- package/dist/tools/definitions/edit-image/definition.js.map +1 -1
- package/dist/tools/definitions/generate-image/definition.js +2 -2
- package/dist/tools/definitions/generate-image/definition.js.map +1 -1
- package/dist/tools/definitions/generate-video/definition.d.ts.map +1 -1
- package/dist/tools/definitions/generate-video/definition.js +5 -3
- package/dist/tools/definitions/generate-video/definition.js.map +1 -1
- package/dist/tools/definitions/sound-to-video/definition.d.ts.map +1 -1
- package/dist/tools/definitions/sound-to-video/definition.js +3 -1
- package/dist/tools/definitions/sound-to-video/definition.js.map +1 -1
- package/dist/tools/definitions/video-to-video/definition.d.ts.map +1 -1
- package/dist/tools/definitions/video-to-video/definition.js +4 -2
- package/dist/tools/definitions/video-to-video/definition.js.map +1 -1
- package/dist-esm/contracts/data/promptContracts.js +23 -0
- package/dist-esm/contracts/data/promptContracts.js.map +1 -1
- package/dist-esm/contracts/videoComposition.js +15 -1
- package/dist-esm/contracts/videoComposition.js.map +1 -1
- package/dist-esm/media/gptImage.js +0 -2
- package/dist-esm/media/gptImage.js.map +1 -1
- package/dist-esm/public-skill-runtime/index.js +62 -13
- package/dist-esm/public-skill-runtime/index.js.map +1 -1
- package/dist-esm/tools/definitions/animate-photo/definition.js +6 -4
- package/dist-esm/tools/definitions/animate-photo/definition.js.map +1 -1
- package/dist-esm/tools/definitions/edit-image/definition.js +2 -2
- package/dist-esm/tools/definitions/edit-image/definition.js.map +1 -1
- package/dist-esm/tools/definitions/generate-image/definition.js +2 -2
- package/dist-esm/tools/definitions/generate-image/definition.js.map +1 -1
- package/dist-esm/tools/definitions/generate-video/definition.js +5 -3
- package/dist-esm/tools/definitions/generate-video/definition.js.map +1 -1
- package/dist-esm/tools/definitions/sound-to-video/definition.js +3 -1
- package/dist-esm/tools/definitions/sound-to-video/definition.js.map +1 -1
- package/dist-esm/tools/definitions/video-to-video/definition.js +4 -2
- package/dist-esm/tools/definitions/video-to-video/definition.js.map +1 -1
- package/package.json +1 -1
|
@@ -4275,8 +4275,42 @@ function storyboardTableRowLooksLikeCountedBeat(cells, headers) {
|
|
|
4275
4275
|
const candidate = compactStoryboardLine(cells[Math.max(0, headerIndex)] || cells[0] || '');
|
|
4276
4276
|
return /^(?:beat|scene|shot|panel|frame)?\s*(?:#\s*)?0?\d{1,2}\b/i.test(candidate);
|
|
4277
4277
|
}
|
|
4278
|
+
function storyboardTableCellLooksLikeCameraCue(cell) {
|
|
4279
|
+
const compact = compactStoryboardLine(cell);
|
|
4280
|
+
return /\b(?:camera|motion|shot|frame|framing|close[-\s]?up|medium|wide|macro|static|locked|hold|push(?:es)?\s+in|pull(?:s)?\s+back|pan|tilt|dolly|truck|tracking|handheld|orbit|zoom|focus|rack\s+focus|focus\s+pull|slow[-\s]?mo|timelapse)\b/i.test(compact);
|
|
4281
|
+
}
|
|
4282
|
+
function storyboardTableCellLooksLikeTransitionCue(cell) {
|
|
4283
|
+
const compact = compactStoryboardLine(cell);
|
|
4284
|
+
return /\b(?:transition|cut|hard\s+cut|smash\s+cut|match\s+cut|jump\s+cut|fade|cross[-\s]?fade|dissolve|wipe|morph|glitch|burst|snap|blend|strobe|whip[-\s]?pan)\b/i.test(compact);
|
|
4285
|
+
}
|
|
4278
4286
|
function normalizeStoryboardTableCellsToHeaders(cells, headers) {
|
|
4279
|
-
if (!headers
|
|
4287
|
+
if (!headers)
|
|
4288
|
+
return cells;
|
|
4289
|
+
if (cells.length === headers.length - 1) {
|
|
4290
|
+
const purposeHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:purpose|story\s*beat|story\s*purpose|beat\s*name|beat\s*title|narrative|name|title)\b/i);
|
|
4291
|
+
const visualHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:visual|frame|shot|image|action)\b/i);
|
|
4292
|
+
const transitionHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:transition|edit|cut|fade|dissolve|wipe)\b/i);
|
|
4293
|
+
const purposeCell = compactStoryboardLine(cells[purposeHeaderIndex] || '');
|
|
4294
|
+
const shiftedCameraCell = cells[visualHeaderIndex] || '';
|
|
4295
|
+
const shiftedTransitionCell = transitionHeaderIndex >= 0
|
|
4296
|
+
? cells[transitionHeaderIndex - 1] || ''
|
|
4297
|
+
: '';
|
|
4298
|
+
const shiftedColumnsLookLikeFoldedPurposeVisual = transitionHeaderIndex >= 0
|
|
4299
|
+
? storyboardTableCellLooksLikeTransitionCue(shiftedTransitionCell)
|
|
4300
|
+
: storyboardTableCellLooksLikeCameraCue(shiftedCameraCell);
|
|
4301
|
+
if (purposeHeaderIndex >= 0
|
|
4302
|
+
&& visualHeaderIndex === purposeHeaderIndex + 1
|
|
4303
|
+
&& visualHeaderIndex < cells.length
|
|
4304
|
+
&& purposeCell.length >= 20
|
|
4305
|
+
&& shiftedColumnsLookLikeFoldedPurposeVisual) {
|
|
4306
|
+
return [
|
|
4307
|
+
...cells.slice(0, visualHeaderIndex),
|
|
4308
|
+
cells[purposeHeaderIndex],
|
|
4309
|
+
...cells.slice(visualHeaderIndex),
|
|
4310
|
+
];
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
if (cells.length <= headers.length)
|
|
4280
4314
|
return cells;
|
|
4281
4315
|
const overflow = cells.length - headers.length;
|
|
4282
4316
|
const combinedAudioDialogueIndex = headers.findIndex(header => /\baudio\b/i.test(header)
|
|
@@ -4370,10 +4404,11 @@ function splitStoryboardTableSections(text) {
|
|
|
4370
4404
|
const cameraHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:camera|motion|fx|effect|lighting|style|look)\b/i);
|
|
4371
4405
|
const dialogueHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:dialogue|vo|v\.o\.|voiceover|speech|narration)\b/i);
|
|
4372
4406
|
const soundHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:audio|sfx|sound|foley|music)\b/i);
|
|
4407
|
+
const transitionHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:transition|edit|cut|fade|dissolve|wipe)\b/i);
|
|
4373
4408
|
const visibleTextHeaderIndex = storyboardTableHeaderIndex(headers, /\b(?:visible\s+text|on[-\s]?screen\s+text|onscreen\s+text|text|copy|cta|tagline|headline|title\s+card|subtitle|caption)\b/i);
|
|
4374
4409
|
const beatHeaderIndex = headers
|
|
4375
4410
|
? headers.findIndex(header => /\b(?:beat|scene|shot|panel|frame)\b/i.test(header)
|
|
4376
|
-
&& !/\b(?:visual|action|camera|audio|dialogue|vo|sfx)\b/i.test(header))
|
|
4411
|
+
&& !/\b(?:visual|action|camera|audio|dialogue|vo|sfx|transition)\b/i.test(header))
|
|
4377
4412
|
: -1;
|
|
4378
4413
|
const purposeHeaderIndex = headers
|
|
4379
4414
|
? headers.findIndex(header => /\b(?:purpose|story\s*beat|story\s*purpose|beat\s*name|beat\s*title|narrative|name|title)\b/i.test(header)
|
|
@@ -4404,6 +4439,9 @@ function splitStoryboardTableSections(text) {
|
|
|
4404
4439
|
const soundCell = soundHeaderIndex >= 0
|
|
4405
4440
|
? storyboardTableCellWithFieldBreaks(cells[soundHeaderIndex] || '')
|
|
4406
4441
|
: '';
|
|
4442
|
+
const transitionCell = transitionHeaderIndex >= 0
|
|
4443
|
+
? storyboardTableCellWithFieldBreaks(cells[transitionHeaderIndex] || '')
|
|
4444
|
+
: '';
|
|
4407
4445
|
const visibleTextCell = visibleTextHeaderIndex >= 0
|
|
4408
4446
|
? storyboardTableCellWithFieldBreaks(cells[visibleTextHeaderIndex] || '')
|
|
4409
4447
|
: '';
|
|
@@ -4445,6 +4483,8 @@ function splitStoryboardTableSections(text) {
|
|
|
4445
4483
|
|| (visibleTextHeaderIndex >= 0 ? compactStoryboardLine(visibleTextCell) : ''));
|
|
4446
4484
|
const audio = extractStoryboardField(audioCell, ['Audio/SFX', 'Audio', 'SFX', 'FX', 'Foley', 'Sound', 'Sounds'])
|
|
4447
4485
|
|| storyboardTableCellWithoutDialogue(soundCell || audioCell, dialogue);
|
|
4486
|
+
const transition = extractStoryboardField(transitionCell, ['Transition', 'Transition out', 'Transition-out', 'Edit'])
|
|
4487
|
+
|| (transitionHeaderIndex >= 0 ? compactStoryboardLine(transitionCell) : '');
|
|
4448
4488
|
const number = sections.length + 1;
|
|
4449
4489
|
const beatLabel = beatHeaderIndex >= 0 && beatHeaderIndex !== timingCellIndex
|
|
4450
4490
|
? compactStoryboardLine(cells[beatHeaderIndex])
|
|
@@ -4457,6 +4497,7 @@ function splitStoryboardTableSections(text) {
|
|
|
4457
4497
|
&& purposeHeaderIndex !== soundHeaderIndex
|
|
4458
4498
|
&& purposeHeaderIndex !== cameraHeaderIndex
|
|
4459
4499
|
&& purposeHeaderIndex !== visibleTextHeaderIndex
|
|
4500
|
+
&& purposeHeaderIndex !== transitionHeaderIndex
|
|
4460
4501
|
? compactStoryboardLine(cells[purposeHeaderIndex])
|
|
4461
4502
|
: '';
|
|
4462
4503
|
const beatTitleSource = purposeLabel && !/^\d{1,2}$/.test(purposeLabel)
|
|
@@ -4476,6 +4517,7 @@ function splitStoryboardTableSections(text) {
|
|
|
4476
4517
|
dialogue ? `Dialogue/VO: ${dialogue}` : '',
|
|
4477
4518
|
visibleText ? `Visible text: ${visibleText}` : '',
|
|
4478
4519
|
audio ? `Audio/SFX: ${audio}` : '',
|
|
4520
|
+
transition ? `Transition: ${transition}` : '',
|
|
4479
4521
|
].filter(Boolean).join('\n'),
|
|
4480
4522
|
});
|
|
4481
4523
|
}
|
|
@@ -4714,7 +4756,7 @@ function synthesizeStoryboardSectionsFromPlainNarration(sourceText, frameCount,
|
|
|
4714
4756
|
}
|
|
4715
4757
|
function storyboardSectionsHavePreservableExplicitTiming(sections) {
|
|
4716
4758
|
return sections.length > 1
|
|
4717
|
-
&& sections.
|
|
4759
|
+
&& sections.every(section => extractStoryboardTiming(`${section.heading}\n${section.body}`) !== null);
|
|
4718
4760
|
}
|
|
4719
4761
|
function canonicalStoryboardScriptContext(text) {
|
|
4720
4762
|
const trimmed = String(text || '').trim();
|
|
@@ -5231,11 +5273,16 @@ function minimumStoryboardSceneDurationForDialogue(scene, rules, wordsPerSecondM
|
|
|
5231
5273
|
function retimeStoryboardScenesForDialogue(scenes, targetDurationSec, rules = DEFAULT_STORYBOARD_TIMING_RULES) {
|
|
5232
5274
|
if (targetDurationSec === null || scenes.length === 0)
|
|
5233
5275
|
return scenes;
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5276
|
+
const hasCompletePositiveTiming = scenes.every(scene => scene.startSec !== null
|
|
5277
|
+
&& scene.endSec !== null
|
|
5278
|
+
&& scene.durationSec !== null
|
|
5279
|
+
&& scene.durationSec > 0);
|
|
5280
|
+
const sourceDurations = scenes.map(scene => (scene.durationSec !== null && scene.durationSec > 0
|
|
5281
|
+
? scene.durationSec
|
|
5282
|
+
: targetDurationSec / scenes.length));
|
|
5237
5283
|
const minimumDurations = scenes.map(scene => minimumStoryboardSceneDurationForDialogue(scene, rules));
|
|
5238
|
-
const needsRetiming =
|
|
5284
|
+
const needsRetiming = !hasCompletePositiveTiming
|
|
5285
|
+
|| scenes.some((scene, index) => (scene.durationSec ?? 0) + rules.toleranceSec < minimumDurations[index]);
|
|
5239
5286
|
if (!needsRetiming)
|
|
5240
5287
|
return scenes;
|
|
5241
5288
|
let requiredDurations = minimumDurations;
|
|
@@ -5251,9 +5298,8 @@ function retimeStoryboardScenesForDialogue(scenes, targetDurationSec, rules = DE
|
|
|
5251
5298
|
if (minimumTotal > targetDurationSec + rules.toleranceSec)
|
|
5252
5299
|
return scenes;
|
|
5253
5300
|
const extraDuration = Math.max(0, targetDurationSec - minimumTotal);
|
|
5254
|
-
const
|
|
5255
|
-
const
|
|
5256
|
-
const unroundedDurations = requiredDurations.map((minimum, index) => (minimum + (extraDuration * Math.max(0.01, originalDurations[index]) / weightTotal)));
|
|
5301
|
+
const weightTotal = sourceDurations.reduce((sum, duration) => sum + Math.max(0.01, duration), 0);
|
|
5302
|
+
const unroundedDurations = requiredDurations.map((minimum, index) => (minimum + (extraDuration * Math.max(0.01, sourceDurations[index]) / weightTotal)));
|
|
5257
5303
|
const timelineStartSec = scenes[0].startSec ?? 0;
|
|
5258
5304
|
const timelineEndSec = Math.round((timelineStartSec + targetDurationSec) * 100) / 100;
|
|
5259
5305
|
let cursor = timelineStartSec;
|
|
@@ -5354,7 +5400,9 @@ function inferStoryboardStorySpineFromHeading(text) {
|
|
|
5354
5400
|
const collected = [];
|
|
5355
5401
|
for (let cursor = index + 1; cursor < lines.length && collected.length < 4; cursor += 1) {
|
|
5356
5402
|
const candidate = lines[cursor];
|
|
5357
|
-
if (
|
|
5403
|
+
if (/^\|/.test(candidate)
|
|
5404
|
+
|| storyboardMarkdownTableSeparatorLine(candidate)
|
|
5405
|
+
|| /^(?:storyboard|video|production|reference|timecoded|beat\s+\d|scene\s+\d|format|duration|aspect|does this|please confirm)\b/i.test(candidate)) {
|
|
5358
5406
|
break;
|
|
5359
5407
|
}
|
|
5360
5408
|
const cleaned = cleanStoryboardStorySpine(candidate);
|
|
@@ -6643,6 +6691,7 @@ export function compileSeedanceStoryboardPromptFromProject(project, options = {}
|
|
|
6643
6691
|
: 'All scene numbers, timecodes, labels, and production notes remain metadata only and must not appear in the video.';
|
|
6644
6692
|
const toneProgression = project.creativeBrief.toneProgression.join(' -> ');
|
|
6645
6693
|
const musicArc = project.scenes.map(scene => scene.music).filter(Boolean).join(' -> ');
|
|
6694
|
+
const visualStyle = project.creativeBrief.visualQualityBar.replace(/\bstoryboard\s+sheet\b/gi, 'cinematic video');
|
|
6646
6695
|
return [
|
|
6647
6696
|
'PROJECT:',
|
|
6648
6697
|
`Title: ${project.title}`,
|
|
@@ -6651,14 +6700,14 @@ export function compileSeedanceStoryboardPromptFromProject(project, options = {}
|
|
|
6651
6700
|
`Story spine: ${storySpine}`,
|
|
6652
6701
|
'',
|
|
6653
6702
|
'INPUT ASSETS:',
|
|
6654
|
-
`${storyboardImageTag}: approved
|
|
6703
|
+
`${storyboardImageTag}: approved storyboard reference image. Treat it as an ordered shot guide and timing reference only, not as a collage, split-screen, grid, or picture-in-picture layout to reproduce.`,
|
|
6655
6704
|
'',
|
|
6656
6705
|
'GLOBAL VIDEO INSTRUCTIONS:',
|
|
6657
6706
|
`Render one continuous cinematic video in ${aspectRatio}. Follow the storyboard scene order, timing ranges, transitions, and audio plan.`,
|
|
6658
6707
|
'Use the storyboard as the controlling source for shot order and intent while converting each panel into full-screen motion.',
|
|
6659
6708
|
visibleTextInstruction,
|
|
6660
6709
|
metadataLabels.length > 0 ? `Do not render these metadata labels as video text: ${metadataLabels.join('; ')}.` : '',
|
|
6661
|
-
`Visual style: ${
|
|
6710
|
+
`Visual style: ${visualStyle}`,
|
|
6662
6711
|
toneProgression ? `Tone progression: ${toneProgression}` : '',
|
|
6663
6712
|
musicArc ? `Music arc: ${musicArc}` : '',
|
|
6664
6713
|
'',
|