@sogni-ai/sogni-intelligence-client 3.0.0-alpha.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/.env.example +33 -0
- package/LICENSE +22 -0
- package/README.md +823 -0
- package/contracts/index.d.ts +1 -0
- package/contracts/index.js +2 -0
- package/dist/client/SogniClientWrapper.d.ts +86 -0
- package/dist/client/SogniClientWrapper.d.ts.map +1 -0
- package/dist/client/SogniClientWrapper.js +914 -0
- package/dist/client/SogniClientWrapper.js.map +1 -0
- package/dist/contracts/backboneDurableWorkflow.d.ts +82 -0
- package/dist/contracts/backboneDurableWorkflow.d.ts.map +1 -0
- package/dist/contracts/backboneDurableWorkflow.js +96 -0
- package/dist/contracts/backboneDurableWorkflow.js.map +1 -0
- package/dist/contracts/backboneToolCatalog.d.ts +7 -0
- package/dist/contracts/backboneToolCatalog.d.ts.map +1 -0
- package/dist/contracts/backboneToolCatalog.js +62 -0
- package/dist/contracts/backboneToolCatalog.js.map +1 -0
- package/dist/contracts/composeWorkflowTypes.d.ts +6 -0
- package/dist/contracts/composeWorkflowTypes.d.ts.map +1 -0
- package/dist/contracts/composeWorkflowTypes.js +3 -0
- package/dist/contracts/composeWorkflowTypes.js.map +1 -0
- package/dist/contracts/data/costEstimation.d.ts +5 -0
- package/dist/contracts/data/costEstimation.d.ts.map +1 -0
- package/dist/contracts/data/costEstimation.js +22 -0
- package/dist/contracts/data/costEstimation.js.map +1 -0
- package/dist/contracts/data/gatingPolicies.d.ts +6 -0
- package/dist/contracts/data/gatingPolicies.d.ts.map +1 -0
- package/dist/contracts/data/gatingPolicies.js +218 -0
- package/dist/contracts/data/gatingPolicies.js.map +1 -0
- package/dist/contracts/data/gatingPoliciesToolSurface.d.ts +7 -0
- package/dist/contracts/data/gatingPoliciesToolSurface.d.ts.map +1 -0
- package/dist/contracts/data/gatingPoliciesToolSurface.js +61 -0
- package/dist/contracts/data/gatingPoliciesToolSurface.js.map +1 -0
- package/dist/contracts/data/index.d.ts +14 -0
- package/dist/contracts/data/index.d.ts.map +1 -0
- package/dist/contracts/data/index.js +57 -0
- package/dist/contracts/data/index.js.map +1 -0
- package/dist/contracts/data/promptContracts.d.ts +5 -0
- package/dist/contracts/data/promptContracts.d.ts.map +1 -0
- package/dist/contracts/data/promptContracts.js +1173 -0
- package/dist/contracts/data/promptContracts.js.map +1 -0
- package/dist/contracts/data/repairRecipes.d.ts +5 -0
- package/dist/contracts/data/repairRecipes.d.ts.map +1 -0
- package/dist/contracts/data/repairRecipes.js +197 -0
- package/dist/contracts/data/repairRecipes.js.map +1 -0
- package/dist/contracts/data/toolCatalog.d.ts +31 -0
- package/dist/contracts/data/toolCatalog.d.ts.map +1 -0
- package/dist/contracts/data/toolCatalog.js +129 -0
- package/dist/contracts/data/toolCatalog.js.map +1 -0
- package/dist/contracts/data/toolCostMetadata.d.ts +16 -0
- package/dist/contracts/data/toolCostMetadata.d.ts.map +1 -0
- package/dist/contracts/data/toolCostMetadata.js +284 -0
- package/dist/contracts/data/toolCostMetadata.js.map +1 -0
- package/dist/contracts/data/toolPermissions.d.ts +27 -0
- package/dist/contracts/data/toolPermissions.d.ts.map +1 -0
- package/dist/contracts/data/toolPermissions.js +78 -0
- package/dist/contracts/data/toolPermissions.js.map +1 -0
- package/dist/contracts/evaluators.d.ts +94 -0
- package/dist/contracts/evaluators.d.ts.map +1 -0
- package/dist/contracts/evaluators.js +468 -0
- package/dist/contracts/evaluators.js.map +1 -0
- package/dist/contracts/hostedComposition.d.ts +85 -0
- package/dist/contracts/hostedComposition.d.ts.map +1 -0
- package/dist/contracts/hostedComposition.js +139 -0
- package/dist/contracts/hostedComposition.js.map +1 -0
- package/dist/contracts/hostedToolValidation.d.ts +47 -0
- package/dist/contracts/hostedToolValidation.d.ts.map +1 -0
- package/dist/contracts/hostedToolValidation.js +301 -0
- package/dist/contracts/hostedToolValidation.js.map +1 -0
- package/dist/contracts/idLoraPrompt.d.ts +13 -0
- package/dist/contracts/idLoraPrompt.d.ts.map +1 -0
- package/dist/contracts/idLoraPrompt.js +78 -0
- package/dist/contracts/idLoraPrompt.js.map +1 -0
- package/dist/contracts/imagePrompt.d.ts +16 -0
- package/dist/contracts/imagePrompt.d.ts.map +1 -0
- package/dist/contracts/imagePrompt.js +148 -0
- package/dist/contracts/imagePrompt.js.map +1 -0
- package/dist/contracts/index.d.ts +48 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +156 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/index.mjs +102 -0
- package/dist/contracts/musicComposition.d.ts +17 -0
- package/dist/contracts/musicComposition.d.ts.map +1 -0
- package/dist/contracts/musicComposition.js +188 -0
- package/dist/contracts/musicComposition.js.map +1 -0
- package/dist/contracts/promptContract.d.ts +11 -0
- package/dist/contracts/promptContract.d.ts.map +1 -0
- package/dist/contracts/promptContract.js +37 -0
- package/dist/contracts/promptContract.js.map +1 -0
- package/dist/contracts/promptOverrideMarker.d.ts +2 -0
- package/dist/contracts/promptOverrideMarker.d.ts.map +1 -0
- package/dist/contracts/promptOverrideMarker.js +5 -0
- package/dist/contracts/promptOverrideMarker.js.map +1 -0
- package/dist/contracts/randomThemes.d.ts +5 -0
- package/dist/contracts/randomThemes.d.ts.map +1 -0
- package/dist/contracts/randomThemes.js +159 -0
- package/dist/contracts/randomThemes.js.map +1 -0
- package/dist/contracts/registry.d.ts +29 -0
- package/dist/contracts/registry.d.ts.map +1 -0
- package/dist/contracts/registry.js +104 -0
- package/dist/contracts/registry.js.map +1 -0
- package/dist/contracts/repairRecipe.d.ts +14 -0
- package/dist/contracts/repairRecipe.d.ts.map +1 -0
- package/dist/contracts/repairRecipe.js +38 -0
- package/dist/contracts/repairRecipe.js.map +1 -0
- package/dist/contracts/storyboard.d.ts +112 -0
- package/dist/contracts/storyboard.d.ts.map +1 -0
- package/dist/contracts/storyboard.js +7 -0
- package/dist/contracts/storyboard.js.map +1 -0
- package/dist/contracts/telemetry.d.ts +57 -0
- package/dist/contracts/telemetry.d.ts.map +1 -0
- package/dist/contracts/telemetry.js +37 -0
- package/dist/contracts/telemetry.js.map +1 -0
- package/dist/contracts/toolGatingPolicy.d.ts +19 -0
- package/dist/contracts/toolGatingPolicy.d.ts.map +1 -0
- package/dist/contracts/toolGatingPolicy.js +63 -0
- package/dist/contracts/toolGatingPolicy.js.map +1 -0
- package/dist/contracts/toolPromptMarkers.d.ts +9 -0
- package/dist/contracts/toolPromptMarkers.d.ts.map +1 -0
- package/dist/contracts/toolPromptMarkers.js +13 -0
- package/dist/contracts/toolPromptMarkers.js.map +1 -0
- package/dist/contracts/toolSurface.d.ts +46 -0
- package/dist/contracts/toolSurface.d.ts.map +1 -0
- package/dist/contracts/toolSurface.js +119 -0
- package/dist/contracts/toolSurface.js.map +1 -0
- package/dist/contracts/turnPolicy.d.ts +22 -0
- package/dist/contracts/turnPolicy.d.ts.map +1 -0
- package/dist/contracts/turnPolicy.js +16 -0
- package/dist/contracts/turnPolicy.js.map +1 -0
- package/dist/contracts/videoComposition.d.ts +35 -0
- package/dist/contracts/videoComposition.d.ts.map +1 -0
- package/dist/contracts/videoComposition.js +224 -0
- package/dist/contracts/videoComposition.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/media/aspectRatio.d.ts +15 -0
- package/dist/media/aspectRatio.d.ts.map +1 -0
- package/dist/media/aspectRatio.js +72 -0
- package/dist/media/aspectRatio.js.map +1 -0
- package/dist/media/audioReference.d.ts +57 -0
- package/dist/media/audioReference.d.ts.map +1 -0
- package/dist/media/audioReference.js +194 -0
- package/dist/media/audioReference.js.map +1 -0
- package/dist/media/cameraAngle.d.ts +170 -0
- package/dist/media/cameraAngle.d.ts.map +1 -0
- package/dist/media/cameraAngle.js +48 -0
- package/dist/media/cameraAngle.js.map +1 -0
- package/dist/media/characterSheet.d.ts +9 -0
- package/dist/media/characterSheet.d.ts.map +1 -0
- package/dist/media/characterSheet.js +54 -0
- package/dist/media/characterSheet.js.map +1 -0
- package/dist/media/danceMontage.d.ts +18 -0
- package/dist/media/danceMontage.d.ts.map +1 -0
- package/dist/media/danceMontage.js +34 -0
- package/dist/media/danceMontage.js.map +1 -0
- package/dist/media/enhancementProfiles.d.ts +158 -0
- package/dist/media/enhancementProfiles.d.ts.map +1 -0
- package/dist/media/enhancementProfiles.js +224 -0
- package/dist/media/enhancementProfiles.js.map +1 -0
- package/dist/media/generationJob.d.ts +81 -0
- package/dist/media/generationJob.d.ts.map +1 -0
- package/dist/media/generationJob.js +91 -0
- package/dist/media/generationJob.js.map +1 -0
- package/dist/media/gptImage.d.ts +21 -0
- package/dist/media/gptImage.d.ts.map +1 -0
- package/dist/media/gptImage.js +162 -0
- package/dist/media/gptImage.js.map +1 -0
- package/dist/media/imageDimensions.d.ts +24 -0
- package/dist/media/imageDimensions.d.ts.map +1 -0
- package/dist/media/imageDimensions.js +64 -0
- package/dist/media/imageDimensions.js.map +1 -0
- package/dist/media/index.d.ts +16 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +32 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/index.mjs +116 -0
- package/dist/media/musicSettings.d.ts +86 -0
- package/dist/media/musicSettings.d.ts.map +1 -0
- package/dist/media/musicSettings.js +234 -0
- package/dist/media/musicSettings.js.map +1 -0
- package/dist/media/vendorModelPremium.d.ts +21 -0
- package/dist/media/vendorModelPremium.d.ts.map +1 -0
- package/dist/media/vendorModelPremium.js +89 -0
- package/dist/media/vendorModelPremium.js.map +1 -0
- package/dist/media/videoAppSettings.d.ts +41 -0
- package/dist/media/videoAppSettings.d.ts.map +1 -0
- package/dist/media/videoAppSettings.js +128 -0
- package/dist/media/videoAppSettings.js.map +1 -0
- package/dist/media/videoContentLimit.d.ts +15 -0
- package/dist/media/videoContentLimit.d.ts.map +1 -0
- package/dist/media/videoContentLimit.js +169 -0
- package/dist/media/videoContentLimit.js.map +1 -0
- package/dist/media/videoReference.d.ts +35 -0
- package/dist/media/videoReference.d.ts.map +1 -0
- package/dist/media/videoReference.js +77 -0
- package/dist/media/videoReference.js.map +1 -0
- package/dist/media/videoSettings.d.ts +50 -0
- package/dist/media/videoSettings.d.ts.map +1 -0
- package/dist/media/videoSettings.js +200 -0
- package/dist/media/videoSettings.js.map +1 -0
- package/dist/public-skill-runtime/index.d.ts +1220 -0
- package/dist/public-skill-runtime/index.d.ts.map +1 -0
- package/dist/public-skill-runtime/index.js +6396 -0
- package/dist/public-skill-runtime/index.js.map +1 -0
- package/dist/public-skill-runtime/index.mjs +141 -0
- package/dist/replay/index.d.ts +4 -0
- package/dist/replay/index.d.ts.map +1 -0
- package/dist/replay/index.js +12 -0
- package/dist/replay/index.js.map +1 -0
- package/dist/replay/index.mjs +12 -0
- package/dist/replay/redact.d.ts +7 -0
- package/dist/replay/redact.d.ts.map +1 -0
- package/dist/replay/redact.js +108 -0
- package/dist/replay/redact.js.map +1 -0
- package/dist/replay/types.d.ts +61 -0
- package/dist/replay/types.d.ts.map +1 -0
- package/dist/replay/types.js +24 -0
- package/dist/replay/types.js.map +1 -0
- package/dist/runtime/chatTypes.d.ts +47 -0
- package/dist/runtime/chatTypes.d.ts.map +1 -0
- package/dist/runtime/chatTypes.js +3 -0
- package/dist/runtime/chatTypes.js.map +1 -0
- package/dist/runtime/durableWorkflowClient.d.ts +80 -0
- package/dist/runtime/durableWorkflowClient.d.ts.map +1 -0
- package/dist/runtime/durableWorkflowClient.js +312 -0
- package/dist/runtime/durableWorkflowClient.js.map +1 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +18 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/index.mjs +21 -0
- package/dist/skills/asset_reference_management/index.d.ts +6 -0
- package/dist/skills/asset_reference_management/index.d.ts.map +1 -0
- package/dist/skills/asset_reference_management/index.js +18 -0
- package/dist/skills/asset_reference_management/index.js.map +1 -0
- package/dist/skills/asset_reference_management/index.mjs +18 -0
- package/dist/skills/asset_reference_management/manifest.d.ts +42 -0
- package/dist/skills/asset_reference_management/manifest.d.ts.map +1 -0
- package/dist/skills/asset_reference_management/manifest.js +237 -0
- package/dist/skills/asset_reference_management/manifest.js.map +1 -0
- package/dist/skills/asset_reference_management/modelRefRegistry.d.ts +24 -0
- package/dist/skills/asset_reference_management/modelRefRegistry.d.ts.map +1 -0
- package/dist/skills/asset_reference_management/modelRefRegistry.js +136 -0
- package/dist/skills/asset_reference_management/modelRefRegistry.js.map +1 -0
- package/dist/skills/asset_reference_management/types.d.ts +31 -0
- package/dist/skills/asset_reference_management/types.d.ts.map +1 -0
- package/dist/skills/asset_reference_management/types.js +3 -0
- package/dist/skills/asset_reference_management/types.js.map +1 -0
- package/dist/tools/definitions/add-subtitles/definition.d.ts +4 -0
- package/dist/tools/definitions/add-subtitles/definition.d.ts.map +1 -0
- package/dist/tools/definitions/add-subtitles/definition.js +83 -0
- package/dist/tools/definitions/add-subtitles/definition.js.map +1 -0
- package/dist/tools/definitions/animate-photo/definition.d.ts +3 -0
- package/dist/tools/definitions/animate-photo/definition.d.ts.map +1 -0
- package/dist/tools/definitions/animate-photo/definition.js +124 -0
- package/dist/tools/definitions/animate-photo/definition.js.map +1 -0
- package/dist/tools/definitions/apply-style/definition.d.ts +3 -0
- package/dist/tools/definitions/apply-style/definition.d.ts.map +1 -0
- package/dist/tools/definitions/apply-style/definition.js +50 -0
- package/dist/tools/definitions/apply-style/definition.js.map +1 -0
- package/dist/tools/definitions/change-angle/definition.d.ts +3 -0
- package/dist/tools/definitions/change-angle/definition.d.ts.map +1 -0
- package/dist/tools/definitions/change-angle/definition.js +49 -0
- package/dist/tools/definitions/change-angle/definition.js.map +1 -0
- package/dist/tools/definitions/dance-montage/dances.d.ts +11 -0
- package/dist/tools/definitions/dance-montage/dances.d.ts.map +1 -0
- package/dist/tools/definitions/dance-montage/dances.js +90 -0
- package/dist/tools/definitions/dance-montage/dances.js.map +1 -0
- package/dist/tools/definitions/dance-montage/definition.d.ts +3 -0
- package/dist/tools/definitions/dance-montage/definition.d.ts.map +1 -0
- package/dist/tools/definitions/dance-montage/definition.js +45 -0
- package/dist/tools/definitions/dance-montage/definition.js.map +1 -0
- package/dist/tools/definitions/edit-image/definition.d.ts +3 -0
- package/dist/tools/definitions/edit-image/definition.d.ts.map +1 -0
- package/dist/tools/definitions/edit-image/definition.js +128 -0
- package/dist/tools/definitions/edit-image/definition.js.map +1 -0
- package/dist/tools/definitions/extend-video/definition.d.ts +3 -0
- package/dist/tools/definitions/extend-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/extend-video/definition.js +51 -0
- package/dist/tools/definitions/extend-video/definition.js.map +1 -0
- package/dist/tools/definitions/generate-image/definition.d.ts +3 -0
- package/dist/tools/definitions/generate-image/definition.d.ts.map +1 -0
- package/dist/tools/definitions/generate-image/definition.js +107 -0
- package/dist/tools/definitions/generate-image/definition.js.map +1 -0
- package/dist/tools/definitions/generate-music/definition.d.ts +3 -0
- package/dist/tools/definitions/generate-music/definition.d.ts.map +1 -0
- package/dist/tools/definitions/generate-music/definition.js +75 -0
- package/dist/tools/definitions/generate-music/definition.js.map +1 -0
- package/dist/tools/definitions/generate-video/definition.d.ts +3 -0
- package/dist/tools/definitions/generate-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/generate-video/definition.js +120 -0
- package/dist/tools/definitions/generate-video/definition.js.map +1 -0
- package/dist/tools/definitions/index.d.ts +25 -0
- package/dist/tools/definitions/index.d.ts.map +1 -0
- package/dist/tools/definitions/index.js +66 -0
- package/dist/tools/definitions/index.js.map +1 -0
- package/dist/tools/definitions/orbit-video/definition.d.ts +3 -0
- package/dist/tools/definitions/orbit-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/orbit-video/definition.js +103 -0
- package/dist/tools/definitions/orbit-video/definition.js.map +1 -0
- package/dist/tools/definitions/overlay-video/definition.d.ts +4 -0
- package/dist/tools/definitions/overlay-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/overlay-video/definition.js +142 -0
- package/dist/tools/definitions/overlay-video/definition.js.map +1 -0
- package/dist/tools/definitions/refine-result/definition.d.ts +3 -0
- package/dist/tools/definitions/refine-result/definition.d.ts.map +1 -0
- package/dist/tools/definitions/refine-result/definition.js +56 -0
- package/dist/tools/definitions/refine-result/definition.js.map +1 -0
- package/dist/tools/definitions/replace-video-segment/definition.d.ts +3 -0
- package/dist/tools/definitions/replace-video-segment/definition.d.ts.map +1 -0
- package/dist/tools/definitions/replace-video-segment/definition.js +65 -0
- package/dist/tools/definitions/replace-video-segment/definition.js.map +1 -0
- package/dist/tools/definitions/restore-photo/definition.d.ts +3 -0
- package/dist/tools/definitions/restore-photo/definition.d.ts.map +1 -0
- package/dist/tools/definitions/restore-photo/definition.js +58 -0
- package/dist/tools/definitions/restore-photo/definition.js.map +1 -0
- package/dist/tools/definitions/sound-to-video/definition.d.ts +3 -0
- package/dist/tools/definitions/sound-to-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/sound-to-video/definition.js +91 -0
- package/dist/tools/definitions/sound-to-video/definition.js.map +1 -0
- package/dist/tools/definitions/stitch-video/definition.d.ts +4 -0
- package/dist/tools/definitions/stitch-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/stitch-video/definition.js +89 -0
- package/dist/tools/definitions/stitch-video/definition.js.map +1 -0
- package/dist/tools/definitions/types.d.ts +15 -0
- package/dist/tools/definitions/types.d.ts.map +1 -0
- package/dist/tools/definitions/types.js +3 -0
- package/dist/tools/definitions/types.js.map +1 -0
- package/dist/tools/definitions/video-to-video/definition.d.ts +3 -0
- package/dist/tools/definitions/video-to-video/definition.d.ts.map +1 -0
- package/dist/tools/definitions/video-to-video/definition.js +101 -0
- package/dist/tools/definitions/video-to-video/definition.js.map +1 -0
- package/dist/tools/index.d.ts +19 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +70 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/index.mjs +86 -0
- package/dist/tools/normalizeArgs.d.ts +2 -0
- package/dist/tools/normalizeArgs.d.ts.map +1 -0
- package/dist/tools/normalizeArgs.js +40 -0
- package/dist/tools/normalizeArgs.js.map +1 -0
- package/dist/tools/result.d.ts +47 -0
- package/dist/tools/result.d.ts.map +1 -0
- package/dist/tools/result.js +38 -0
- package/dist/tools/result.js.map +1 -0
- package/dist/tools/shared/downloadFilename.d.ts +18 -0
- package/dist/tools/shared/downloadFilename.d.ts.map +1 -0
- package/dist/tools/shared/downloadFilename.js +157 -0
- package/dist/tools/shared/downloadFilename.js.map +1 -0
- package/dist/tools/shared/errorClassification.d.ts +15 -0
- package/dist/tools/shared/errorClassification.d.ts.map +1 -0
- package/dist/tools/shared/errorClassification.js +78 -0
- package/dist/tools/shared/errorClassification.js.map +1 -0
- package/dist/tools/shared/imageEncoding.d.ts +2 -0
- package/dist/tools/shared/imageEncoding.d.ts.map +1 -0
- package/dist/tools/shared/imageEncoding.js +11 -0
- package/dist/tools/shared/imageEncoding.js.map +1 -0
- package/dist/tools/shared/llmHelpers.d.ts +14 -0
- package/dist/tools/shared/llmHelpers.d.ts.map +1 -0
- package/dist/tools/shared/llmHelpers.js +145 -0
- package/dist/tools/shared/llmHelpers.js.map +1 -0
- package/dist/tools/shared/modelRegistry.d.ts +10 -0
- package/dist/tools/shared/modelRegistry.d.ts.map +1 -0
- package/dist/tools/shared/modelRegistry.js +98 -0
- package/dist/tools/shared/modelRegistry.js.map +1 -0
- package/dist/tools/shared/policyChecks.d.ts +25 -0
- package/dist/tools/shared/policyChecks.d.ts.map +1 -0
- package/dist/tools/shared/policyChecks.js +79 -0
- package/dist/tools/shared/policyChecks.js.map +1 -0
- package/dist/tools/shared/promptRefinementCache.d.ts +10 -0
- package/dist/tools/shared/promptRefinementCache.d.ts.map +1 -0
- package/dist/tools/shared/promptRefinementCache.js +81 -0
- package/dist/tools/shared/promptRefinementCache.js.map +1 -0
- package/dist/tools/shared/promptSanitizer.d.ts +2 -0
- package/dist/tools/shared/promptSanitizer.d.ts.map +1 -0
- package/dist/tools/shared/promptSanitizer.js +73 -0
- package/dist/tools/shared/promptSanitizer.js.map +1 -0
- package/dist/tools/shared/seedancePolicyErrors.d.ts +33 -0
- package/dist/tools/shared/seedancePolicyErrors.d.ts.map +1 -0
- package/dist/tools/shared/seedancePolicyErrors.js +239 -0
- package/dist/tools/shared/seedancePolicyErrors.js.map +1 -0
- package/dist/tools/shared/slotFailureSummary.d.ts +7 -0
- package/dist/tools/shared/slotFailureSummary.d.ts.map +1 -0
- package/dist/tools/shared/slotFailureSummary.js +63 -0
- package/dist/tools/shared/slotFailureSummary.js.map +1 -0
- package/dist/tools/shared/visionDescriptionCache.d.ts +5 -0
- package/dist/tools/shared/visionDescriptionCache.d.ts.map +1 -0
- package/dist/tools/shared/visionDescriptionCache.js +35 -0
- package/dist/tools/shared/visionDescriptionCache.js.map +1 -0
- package/dist/types/index.d.ts +224 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +34 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/errors.d.ts +38 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +99 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/helpers.d.ts +36 -0
- package/dist/utils/helpers.d.ts.map +1 -0
- package/dist/utils/helpers.js +445 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/workflows/bindings.d.ts +23 -0
- package/dist/workflows/bindings.d.ts.map +1 -0
- package/dist/workflows/bindings.js +190 -0
- package/dist/workflows/bindings.js.map +1 -0
- package/dist/workflows/executor-ports.d.ts +11 -0
- package/dist/workflows/executor-ports.d.ts.map +1 -0
- package/dist/workflows/executor-ports.js +3 -0
- package/dist/workflows/executor-ports.js.map +1 -0
- package/dist/workflows/executor.d.ts +17 -0
- package/dist/workflows/executor.d.ts.map +1 -0
- package/dist/workflows/executor.js +526 -0
- package/dist/workflows/executor.js.map +1 -0
- package/dist/workflows/index.d.ts +8 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +25 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/index.mjs +22 -0
- package/dist/workflows/summarize.d.ts +7 -0
- package/dist/workflows/summarize.d.ts.map +1 -0
- package/dist/workflows/summarize.js +54 -0
- package/dist/workflows/summarize.js.map +1 -0
- package/dist/workflows/types.d.ts +302 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/types.js +3 -0
- package/dist/workflows/types.js.map +1 -0
- package/dist/workflows/validation.d.ts +10 -0
- package/dist/workflows/validation.d.ts.map +1 -0
- package/dist/workflows/validation.js +340 -0
- package/dist/workflows/validation.js.map +1 -0
- package/dist-esm/client/SogniClientWrapper.js +877 -0
- package/dist-esm/client/SogniClientWrapper.js.map +1 -0
- package/dist-esm/contracts/backboneDurableWorkflow.js +90 -0
- package/dist-esm/contracts/backboneDurableWorkflow.js.map +1 -0
- package/dist-esm/contracts/backboneToolCatalog.js +59 -0
- package/dist-esm/contracts/backboneToolCatalog.js.map +1 -0
- package/dist-esm/contracts/composeWorkflowTypes.js +2 -0
- package/dist-esm/contracts/composeWorkflowTypes.js.map +1 -0
- package/dist-esm/contracts/data/costEstimation.js +18 -0
- package/dist-esm/contracts/data/costEstimation.js.map +1 -0
- package/dist-esm/contracts/data/gatingPolicies.js +214 -0
- package/dist-esm/contracts/data/gatingPolicies.js.map +1 -0
- package/dist-esm/contracts/data/gatingPoliciesToolSurface.js +57 -0
- package/dist-esm/contracts/data/gatingPoliciesToolSurface.js.map +1 -0
- package/dist-esm/contracts/data/index.js +23 -0
- package/dist-esm/contracts/data/index.js.map +1 -0
- package/dist-esm/contracts/data/promptContracts.js +1169 -0
- package/dist-esm/contracts/data/promptContracts.js.map +1 -0
- package/dist-esm/contracts/data/repairRecipes.js +193 -0
- package/dist-esm/contracts/data/repairRecipes.js.map +1 -0
- package/dist-esm/contracts/data/toolCatalog.js +122 -0
- package/dist-esm/contracts/data/toolCatalog.js.map +1 -0
- package/dist-esm/contracts/data/toolCostMetadata.js +277 -0
- package/dist-esm/contracts/data/toolCostMetadata.js.map +1 -0
- package/dist-esm/contracts/data/toolPermissions.js +70 -0
- package/dist-esm/contracts/data/toolPermissions.js.map +1 -0
- package/dist-esm/contracts/evaluators.js +463 -0
- package/dist-esm/contracts/evaluators.js.map +1 -0
- package/dist-esm/contracts/hostedComposition.js +128 -0
- package/dist-esm/contracts/hostedComposition.js.map +1 -0
- package/dist-esm/contracts/hostedToolValidation.js +296 -0
- package/dist-esm/contracts/hostedToolValidation.js.map +1 -0
- package/dist-esm/contracts/idLoraPrompt.js +72 -0
- package/dist-esm/contracts/idLoraPrompt.js.map +1 -0
- package/dist-esm/contracts/imagePrompt.js +143 -0
- package/dist-esm/contracts/imagePrompt.js.map +1 -0
- package/dist-esm/contracts/index.js +27 -0
- package/dist-esm/contracts/index.js.map +1 -0
- package/dist-esm/contracts/musicComposition.js +182 -0
- package/dist-esm/contracts/musicComposition.js.map +1 -0
- package/dist-esm/contracts/promptContract.js +34 -0
- package/dist-esm/contracts/promptContract.js.map +1 -0
- package/dist-esm/contracts/promptOverrideMarker.js +2 -0
- package/dist-esm/contracts/promptOverrideMarker.js.map +1 -0
- package/dist-esm/contracts/randomThemes.js +154 -0
- package/dist-esm/contracts/randomThemes.js.map +1 -0
- package/dist-esm/contracts/registry.js +100 -0
- package/dist-esm/contracts/registry.js.map +1 -0
- package/dist-esm/contracts/repairRecipe.js +35 -0
- package/dist-esm/contracts/repairRecipe.js.map +1 -0
- package/dist-esm/contracts/storyboard.js +4 -0
- package/dist-esm/contracts/storyboard.js.map +1 -0
- package/dist-esm/contracts/telemetry.js +33 -0
- package/dist-esm/contracts/telemetry.js.map +1 -0
- package/dist-esm/contracts/toolGatingPolicy.js +60 -0
- package/dist-esm/contracts/toolGatingPolicy.js.map +1 -0
- package/dist-esm/contracts/toolPromptMarkers.js +10 -0
- package/dist-esm/contracts/toolPromptMarkers.js.map +1 -0
- package/dist-esm/contracts/toolSurface.js +110 -0
- package/dist-esm/contracts/toolSurface.js.map +1 -0
- package/dist-esm/contracts/turnPolicy.js +13 -0
- package/dist-esm/contracts/turnPolicy.js.map +1 -0
- package/dist-esm/contracts/videoComposition.js +216 -0
- package/dist-esm/contracts/videoComposition.js.map +1 -0
- package/dist-esm/index.js +7 -0
- package/dist-esm/index.js.map +1 -0
- package/dist-esm/media/aspectRatio.js +65 -0
- package/dist-esm/media/aspectRatio.js.map +1 -0
- package/dist-esm/media/audioReference.js +186 -0
- package/dist-esm/media/audioReference.js.map +1 -0
- package/dist-esm/media/cameraAngle.js +41 -0
- package/dist-esm/media/cameraAngle.js.map +1 -0
- package/dist-esm/media/characterSheet.js +48 -0
- package/dist-esm/media/characterSheet.js.map +1 -0
- package/dist-esm/media/danceMontage.js +29 -0
- package/dist-esm/media/danceMontage.js.map +1 -0
- package/dist-esm/media/enhancementProfiles.js +219 -0
- package/dist-esm/media/enhancementProfiles.js.map +1 -0
- package/dist-esm/media/generationJob.js +87 -0
- package/dist-esm/media/generationJob.js.map +1 -0
- package/dist-esm/media/gptImage.js +150 -0
- package/dist-esm/media/gptImage.js.map +1 -0
- package/dist-esm/media/imageDimensions.js +59 -0
- package/dist-esm/media/imageDimensions.js.map +1 -0
- package/dist-esm/media/index.js +16 -0
- package/dist-esm/media/index.js.map +1 -0
- package/dist-esm/media/musicSettings.js +230 -0
- package/dist-esm/media/musicSettings.js.map +1 -0
- package/dist-esm/media/vendorModelPremium.js +81 -0
- package/dist-esm/media/vendorModelPremium.js.map +1 -0
- package/dist-esm/media/videoAppSettings.js +125 -0
- package/dist-esm/media/videoAppSettings.js.map +1 -0
- package/dist-esm/media/videoContentLimit.js +162 -0
- package/dist-esm/media/videoContentLimit.js.map +1 -0
- package/dist-esm/media/videoReference.js +72 -0
- package/dist-esm/media/videoReference.js.map +1 -0
- package/dist-esm/media/videoSettings.js +191 -0
- package/dist-esm/media/videoSettings.js.map +1 -0
- package/dist-esm/package.json +3 -0
- package/dist-esm/public-skill-runtime/index.js +6294 -0
- package/dist-esm/public-skill-runtime/index.js.map +1 -0
- package/dist-esm/replay/index.js +3 -0
- package/dist-esm/replay/index.js.map +1 -0
- package/dist-esm/replay/redact.js +102 -0
- package/dist-esm/replay/redact.js.map +1 -0
- package/dist-esm/replay/types.js +20 -0
- package/dist-esm/replay/types.js.map +1 -0
- package/dist-esm/runtime/chatTypes.js +2 -0
- package/dist-esm/runtime/chatTypes.js.map +1 -0
- package/dist-esm/runtime/durableWorkflowClient.js +295 -0
- package/dist-esm/runtime/durableWorkflowClient.js.map +1 -0
- package/dist-esm/runtime/index.js +2 -0
- package/dist-esm/runtime/index.js.map +1 -0
- package/dist-esm/skills/asset_reference_management/index.js +3 -0
- package/dist-esm/skills/asset_reference_management/index.js.map +1 -0
- package/dist-esm/skills/asset_reference_management/manifest.js +228 -0
- package/dist-esm/skills/asset_reference_management/manifest.js.map +1 -0
- package/dist-esm/skills/asset_reference_management/modelRefRegistry.js +129 -0
- package/dist-esm/skills/asset_reference_management/modelRefRegistry.js.map +1 -0
- package/dist-esm/skills/asset_reference_management/types.js +2 -0
- package/dist-esm/skills/asset_reference_management/types.js.map +1 -0
- package/dist-esm/tools/definitions/add-subtitles/definition.js +80 -0
- package/dist-esm/tools/definitions/add-subtitles/definition.js.map +1 -0
- package/dist-esm/tools/definitions/animate-photo/definition.js +121 -0
- package/dist-esm/tools/definitions/animate-photo/definition.js.map +1 -0
- package/dist-esm/tools/definitions/apply-style/definition.js +47 -0
- package/dist-esm/tools/definitions/apply-style/definition.js.map +1 -0
- package/dist-esm/tools/definitions/change-angle/definition.js +46 -0
- package/dist-esm/tools/definitions/change-angle/definition.js.map +1 -0
- package/dist-esm/tools/definitions/dance-montage/dances.js +86 -0
- package/dist-esm/tools/definitions/dance-montage/dances.js.map +1 -0
- package/dist-esm/tools/definitions/dance-montage/definition.js +42 -0
- package/dist-esm/tools/definitions/dance-montage/definition.js.map +1 -0
- package/dist-esm/tools/definitions/edit-image/definition.js +125 -0
- package/dist-esm/tools/definitions/edit-image/definition.js.map +1 -0
- package/dist-esm/tools/definitions/extend-video/definition.js +48 -0
- package/dist-esm/tools/definitions/extend-video/definition.js.map +1 -0
- package/dist-esm/tools/definitions/generate-image/definition.js +104 -0
- package/dist-esm/tools/definitions/generate-image/definition.js.map +1 -0
- package/dist-esm/tools/definitions/generate-music/definition.js +72 -0
- package/dist-esm/tools/definitions/generate-music/definition.js.map +1 -0
- package/dist-esm/tools/definitions/generate-video/definition.js +117 -0
- package/dist-esm/tools/definitions/generate-video/definition.js.map +1 -0
- package/dist-esm/tools/definitions/index.js +41 -0
- package/dist-esm/tools/definitions/index.js.map +1 -0
- package/dist-esm/tools/definitions/orbit-video/definition.js +100 -0
- package/dist-esm/tools/definitions/orbit-video/definition.js.map +1 -0
- package/dist-esm/tools/definitions/overlay-video/definition.js +139 -0
- package/dist-esm/tools/definitions/overlay-video/definition.js.map +1 -0
- package/dist-esm/tools/definitions/refine-result/definition.js +53 -0
- package/dist-esm/tools/definitions/refine-result/definition.js.map +1 -0
- package/dist-esm/tools/definitions/replace-video-segment/definition.js +62 -0
- package/dist-esm/tools/definitions/replace-video-segment/definition.js.map +1 -0
- package/dist-esm/tools/definitions/restore-photo/definition.js +55 -0
- package/dist-esm/tools/definitions/restore-photo/definition.js.map +1 -0
- package/dist-esm/tools/definitions/sound-to-video/definition.js +88 -0
- package/dist-esm/tools/definitions/sound-to-video/definition.js.map +1 -0
- package/dist-esm/tools/definitions/stitch-video/definition.js +86 -0
- package/dist-esm/tools/definitions/stitch-video/definition.js.map +1 -0
- package/dist-esm/tools/definitions/types.js +2 -0
- package/dist-esm/tools/definitions/types.js.map +1 -0
- package/dist-esm/tools/definitions/video-to-video/definition.js +98 -0
- package/dist-esm/tools/definitions/video-to-video/definition.js.map +1 -0
- package/dist-esm/tools/index.js +15 -0
- package/dist-esm/tools/index.js.map +1 -0
- package/dist-esm/tools/normalizeArgs.js +37 -0
- package/dist-esm/tools/normalizeArgs.js.map +1 -0
- package/dist-esm/tools/result.js +31 -0
- package/dist-esm/tools/result.js.map +1 -0
- package/dist-esm/tools/shared/downloadFilename.js +147 -0
- package/dist-esm/tools/shared/downloadFilename.js.map +1 -0
- package/dist-esm/tools/shared/errorClassification.js +74 -0
- package/dist-esm/tools/shared/errorClassification.js.map +1 -0
- package/dist-esm/tools/shared/imageEncoding.js +8 -0
- package/dist-esm/tools/shared/imageEncoding.js.map +1 -0
- package/dist-esm/tools/shared/llmHelpers.js +137 -0
- package/dist-esm/tools/shared/llmHelpers.js.map +1 -0
- package/dist-esm/tools/shared/modelRegistry.js +91 -0
- package/dist-esm/tools/shared/modelRegistry.js.map +1 -0
- package/dist-esm/tools/shared/policyChecks.js +73 -0
- package/dist-esm/tools/shared/policyChecks.js.map +1 -0
- package/dist-esm/tools/shared/promptRefinementCache.js +70 -0
- package/dist-esm/tools/shared/promptRefinementCache.js.map +1 -0
- package/dist-esm/tools/shared/promptSanitizer.js +70 -0
- package/dist-esm/tools/shared/promptSanitizer.js.map +1 -0
- package/dist-esm/tools/shared/seedancePolicyErrors.js +232 -0
- package/dist-esm/tools/shared/seedancePolicyErrors.js.map +1 -0
- package/dist-esm/tools/shared/slotFailureSummary.js +60 -0
- package/dist-esm/tools/shared/slotFailureSummary.js.map +1 -0
- package/dist-esm/tools/shared/visionDescriptionCache.js +29 -0
- package/dist-esm/tools/shared/visionDescriptionCache.js.map +1 -0
- package/dist-esm/types/index.js +31 -0
- package/dist-esm/types/index.js.map +1 -0
- package/dist-esm/utils/errors.js +86 -0
- package/dist-esm/utils/errors.js.map +1 -0
- package/dist-esm/utils/helpers.js +419 -0
- package/dist-esm/utils/helpers.js.map +1 -0
- package/dist-esm/workflows/bindings.js +182 -0
- package/dist-esm/workflows/bindings.js.map +1 -0
- package/dist-esm/workflows/executor-ports.js +2 -0
- package/dist-esm/workflows/executor-ports.js.map +1 -0
- package/dist-esm/workflows/executor.js +522 -0
- package/dist-esm/workflows/executor.js.map +1 -0
- package/dist-esm/workflows/index.js +7 -0
- package/dist-esm/workflows/index.js.map +1 -0
- package/dist-esm/workflows/summarize.js +51 -0
- package/dist-esm/workflows/summarize.js.map +1 -0
- package/dist-esm/workflows/types.js +2 -0
- package/dist-esm/workflows/types.js.map +1 -0
- package/dist-esm/workflows/validation.js +330 -0
- package/dist-esm/workflows/validation.js.map +1 -0
- package/media/index.d.ts +1 -0
- package/media/index.js +2 -0
- package/package.json +134 -0
- package/public-skill-runtime/index.d.ts +1 -0
- package/public-skill-runtime/index.js +2 -0
- package/replay/index.d.ts +1 -0
- package/replay/index.js +2 -0
- package/runtime/index.d.ts +1 -0
- package/runtime/index.js +2 -0
- package/skills/asset_reference_management/index.d.ts +1 -0
- package/skills/asset_reference_management/index.js +2 -0
- package/tools/index.d.ts +1 -0
- package/tools/index.js +2 -0
- package/workflows/index.d.ts +1 -0
- package/workflows/index.js +2 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { LITERAL_PROMPT_OVERRIDE } from '../../../contracts/promptOverrideMarker.js';
|
|
2
|
+
import { ASPECT_RATIO_DESCRIPTION } from '../../../media/index.js';
|
|
3
|
+
export const definition = {
|
|
4
|
+
type: 'function',
|
|
5
|
+
function: {
|
|
6
|
+
name: 'apply_style',
|
|
7
|
+
description: 'Apply an artistic style, era-specific look, or creative transformation to a photo. Use when the user wants to change the visual style (e.g., "make it look like the 70s", "oil painting style", "vintage polaroid look"). Can handle any creative transformation. One style per call. IMPORTANT: When previous results exist, this tool automatically uses the LATEST result image unless you specify a different sourceImageIndex or the user explicitly says "original". So just call it without sourceImageIndex for follow-up requests.',
|
|
8
|
+
parameters: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
prompt: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: `Style prompt for Qwen Image Edit 2511 (50-200 words, natural language sentences).
|
|
14
|
+
|
|
15
|
+
${LITERAL_PROMPT_OVERRIDE}
|
|
16
|
+
|
|
17
|
+
PROMPT ORDER: [IDENTITY LOCK if people] → [STYLE TRANSFER INSTRUCTION] → [PRESERVE UNMENTIONED DETAILS]
|
|
18
|
+
|
|
19
|
+
Rules:
|
|
20
|
+
- Use POSITIVE phrasing only. The model ignores negatives ("preserve exact facial likeness" NOT "don't change the face").
|
|
21
|
+
- Transfer the visual STYLE ONLY, not the identity. Borrow palette, texture, contrast behavior, and stylistic treatment — NOT face structure.
|
|
22
|
+
- Reference known art styles, artists, and franchises BY NAME to anchor the style — be specific, never generic.
|
|
23
|
+
- Describe specific visual characteristics: brushstrokes, color palette, texture, composition approach, mood.
|
|
24
|
+
- For era looks: describe the photographic qualities of that era (e.g., "warm faded Kodachrome tones with soft vignette, typical of 1970s amateur photography").
|
|
25
|
+
- CRITICAL for photos with people: FRONT-LOAD identity preservation BEFORE the style instruction. Start with "Preserve exact facial likeness, face structure, eye shape, nose shape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability." Then describe the style. End with "Keep the subject recognizable as the same person. Maintain exact positioning, poses, and composition."
|
|
26
|
+
- Go bold with pop culture and iconic styles: "Andy Warhol pop art with bold neon screen-print colors", "Banksy stencil street art with gritty urban textures", "Studio Ghibli watercolor with soft pastoral warmth", "Pixar 3D render with glossy skin and exaggerated features", "Tim Burton gothic with pale skin and dark spiraling backgrounds", "Van Gogh Starry Night with thick impasto swirls and vibrant blues", "Takashi Murakami superflat with psychedelic flowers and bold outlines".
|
|
27
|
+
- Always end with "Preserve the subject's identity, pose, and composition."`,
|
|
28
|
+
},
|
|
29
|
+
sourceImageIndex: {
|
|
30
|
+
type: 'number',
|
|
31
|
+
description: 'Which result image to apply the style to (0-based index). Omit to use the latest result automatically (or the original if no results exist). Only set explicitly when the user specifies a particular image number or explicitly says "original" (use -1 for original).',
|
|
32
|
+
},
|
|
33
|
+
scale: {
|
|
34
|
+
type: 'number',
|
|
35
|
+
enum: [1, 1.5, 2, 3, 4],
|
|
36
|
+
description: 'Output scale multiplier relative to the source image size. 1 = same resolution as source (default). Use higher values when user asks to upscale, enlarge, make bigger, or increase resolution. Small images (<480px) are automatically upscaled to at least 480px regardless of this setting. Default: 1.',
|
|
37
|
+
},
|
|
38
|
+
aspectRatio: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: ASPECT_RATIO_DESCRIPTION,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['prompt'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/apply-style/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,aAAa;QACnB,WAAW,EACT,6gBAA6gB;QAC/gB,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;4EAYmD;iBACnE;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,yQAAyQ;iBAC5Q;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBACvB,WAAW,EACT,2SAA2S;iBAC9S;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wBAAwB;iBACtC;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ASPECT_RATIO_DESCRIPTION } from '../../../media/index.js';
|
|
2
|
+
export const definition = {
|
|
3
|
+
type: 'function',
|
|
4
|
+
function: {
|
|
5
|
+
name: 'change_angle',
|
|
6
|
+
description: 'Generate the photo from a different camera angle or perspective. Uses AI to create a new view of the subject as if photographed from a different position. Use when the user wants to see the subject from another angle, generate a different view, create a portrait from a specific direction, or get a closeup/wide shot. Examples: "show me from the left side", "generate a 3/4 portrait view", "closeup from slightly above". IMPORTANT: When previous results exist, this tool automatically uses the LATEST result image unless you specify a different sourceImageIndex or the user explicitly says "original".',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
description: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: `EXACT camera angle string. You MUST construct this by concatenating exactly one value from each category below, separated by single spaces. No commas, no extra words.
|
|
13
|
+
|
|
14
|
+
Format: "[azimuth] [elevation] [distance]"
|
|
15
|
+
|
|
16
|
+
Azimuth (pick one): "front view", "front-right quarter view", "right side view", "back-right quarter view", "back view", "back-left quarter view", "left side view", "front-left quarter view"
|
|
17
|
+
Elevation (pick one): "low-angle shot", "eye-level shot", "elevated shot", "high-angle shot"
|
|
18
|
+
Distance (pick one): "close-up", "medium shot", "wide shot"
|
|
19
|
+
|
|
20
|
+
Examples:
|
|
21
|
+
- "front-right quarter view eye-level shot medium shot"
|
|
22
|
+
- "left side view eye-level shot close-up"
|
|
23
|
+
- "front view low-angle shot wide shot"
|
|
24
|
+
- "right side view elevated shot medium shot"
|
|
25
|
+
|
|
26
|
+
Map user requests: "from the left" → "left side view", "looking up at" → "low-angle shot", "closeup" → "close-up", "3/4 view" → "front-right quarter view" or "front-left quarter view", "portrait" → "front-right quarter view eye-level shot medium shot".
|
|
27
|
+
Default elevation to "eye-level shot" and distance to "medium shot" when not specified.`,
|
|
28
|
+
},
|
|
29
|
+
sourceImageIndex: {
|
|
30
|
+
type: 'number',
|
|
31
|
+
description: 'Which result image to use as source (0-based index). Omit to use the latest result automatically (or the original if no results exist). Only set explicitly when the user specifies a particular image number or explicitly says "original" (use -1 for original).',
|
|
32
|
+
},
|
|
33
|
+
loraStrength: {
|
|
34
|
+
type: 'number',
|
|
35
|
+
description: 'LoRA strength for angle generation (0.1-1.0). Default: 0.9. Lower values preserve more of the original appearance, higher values produce stronger angle changes. Only set when the user wants to control the transformation intensity.',
|
|
36
|
+
},
|
|
37
|
+
aspectRatio: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: ASPECT_RATIO_DESCRIPTION,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
required: ['description'],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/change-angle/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,2lBAA2lB;QAC7lB,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;;;;;;;;;;;;;;wFAeiE;iBAC/E;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oQAAoQ;iBACvQ;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,wOAAwO;iBAC3O;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wBAAwB;iBACtC;aACF;YACD,QAAQ,EAAE,CAAC,aAAa,CAAC;SAC1B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const CDN_BASE = 'https://cdn.sogni.ai/video-samples';
|
|
2
|
+
export const DANCE_PRESETS = [
|
|
3
|
+
{
|
|
4
|
+
id: 'rasputin',
|
|
5
|
+
title: 'Boney M - Rasputin',
|
|
6
|
+
description: 'Viral Russian TikTok Dance',
|
|
7
|
+
videoUrl: `${CDN_BASE}/rasputin.mp4`,
|
|
8
|
+
maxDuration: 32,
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
id: 'big-guy',
|
|
12
|
+
title: 'Ice Spice - Big Guy',
|
|
13
|
+
description: 'From "The SpongeBob Movie: Search for SquarePants" movie',
|
|
14
|
+
videoUrl: `${CDN_BASE}/big-guy-dance.mp4`,
|
|
15
|
+
maxDuration: 11,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: 'keep-it-gangsta',
|
|
19
|
+
title: 'Nhale ft. Dezzy Hollow - Keep it Gangsta',
|
|
20
|
+
description: 'Hip-hop gangsta dance',
|
|
21
|
+
videoUrl: `${CDN_BASE}/dance-keep-it-gangsta.mp4`,
|
|
22
|
+
maxDuration: 21,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'this-is-america',
|
|
26
|
+
title: 'Childish Gambino - This Is America',
|
|
27
|
+
description: 'Iconic choreography from the This Is America music video',
|
|
28
|
+
videoUrl: `${CDN_BASE}/this-is-america.mp4`,
|
|
29
|
+
maxDuration: 22,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 'chinese-new-year',
|
|
33
|
+
title: '弥渡山歌 (Midu Echoing) - Dan Thy',
|
|
34
|
+
description: 'Chinese New Year Dance, Chinese Military Dance Trend',
|
|
35
|
+
videoUrl: `${CDN_BASE}/chinese-new-year-dance.mp4`,
|
|
36
|
+
maxDuration: 18,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'spongebob',
|
|
40
|
+
title: 'SpongeBob - Stadium Rave',
|
|
41
|
+
description: 'Jellyfish Jam Dance from SpongeBob SquarePants',
|
|
42
|
+
videoUrl: `${CDN_BASE}/spongebob-dance.mp4`,
|
|
43
|
+
maxDuration: 27,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'chanel',
|
|
47
|
+
title: 'Tyla - Chanel',
|
|
48
|
+
description: 'Put me in Chanel dance',
|
|
49
|
+
videoUrl: `${CDN_BASE}/chanel.mp4`,
|
|
50
|
+
maxDuration: 14,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: 'crystal-light-aerobics-1988',
|
|
54
|
+
title: 'Crystal Light National Aerobics Championship 1988',
|
|
55
|
+
description: '80s aerobics dance from the 1988 Crystal Light National Aerobics Championship',
|
|
56
|
+
videoUrl: `${CDN_BASE}/crystal-light-aerobics-1988.mp4`,
|
|
57
|
+
maxDuration: 52,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'plastic-dream-sequence',
|
|
61
|
+
title: 'Metric - Black Sheep',
|
|
62
|
+
description: 'Barbie plastic dream sequence dance',
|
|
63
|
+
videoUrl: `${CDN_BASE}/plastic-dream-sequence-centered.mp4`,
|
|
64
|
+
maxDuration: 28,
|
|
65
|
+
aliases: ['metric', 'black sheep', 'barbie', 'plastic dream'],
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
export function resolveDancePresetForRequest(text, args) {
|
|
69
|
+
const explicitDance = typeof args?.dance === 'string' ? args.dance.trim() : '';
|
|
70
|
+
if (explicitDance) {
|
|
71
|
+
return DANCE_PRESETS.find(preset => preset.id === explicitDance) || null;
|
|
72
|
+
}
|
|
73
|
+
if (!text)
|
|
74
|
+
return null;
|
|
75
|
+
for (const preset of DANCE_PRESETS) {
|
|
76
|
+
if (!preset.aliases?.length)
|
|
77
|
+
continue;
|
|
78
|
+
for (const alias of preset.aliases) {
|
|
79
|
+
const escaped = alias.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/\s+/g, '\\s+');
|
|
80
|
+
if (new RegExp(`\\b${escaped}\\b`, 'i').test(text))
|
|
81
|
+
return preset;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=dances.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dances.js","sourceRoot":"","sources":["../../../../src/tools/definitions/dance-montage/dances.ts"],"names":[],"mappings":"AAoBA,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAkB;IAC1C;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,4BAA4B;QACzC,QAAQ,EAAE,GAAG,QAAQ,eAAe;QACpC,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,0DAA0D;QACvE,QAAQ,EAAE,GAAG,QAAQ,oBAAoB;QACzC,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,0CAA0C;QACjD,WAAW,EAAE,uBAAuB;QACpC,QAAQ,EAAE,GAAG,QAAQ,4BAA4B;QACjD,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EAAE,0DAA0D;QACvE,QAAQ,EAAE,GAAG,QAAQ,sBAAsB;QAC3C,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,KAAK,EAAE,+BAA+B;QACtC,WAAW,EAAE,sDAAsD;QACnE,QAAQ,EAAE,GAAG,QAAQ,6BAA6B;QAClD,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,0BAA0B;QACjC,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,GAAG,QAAQ,sBAAsB;QAC3C,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE,GAAG,QAAQ,aAAa;QAClC,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,6BAA6B;QACjC,KAAK,EAAE,mDAAmD;QAC1D,WAAW,EAAE,+EAA+E;QAC5F,QAAQ,EAAE,GAAG,QAAQ,kCAAkC;QACvD,WAAW,EAAE,EAAE;KAChB;IACD;QACE,EAAE,EAAE,wBAAwB;QAC5B,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,qCAAqC;QAClD,QAAQ,EAAE,GAAG,QAAQ,sCAAsC;QAC3D,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,CAAC;KAC9D;CACF,CAAC;AASF,MAAM,UAAU,4BAA4B,CAC1C,IAAY,EACZ,IAA8B;IAE9B,MAAM,aAAa,GAAG,OAAO,IAAI,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/E,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,aAAa,CAAC,IAAI,IAAI,CAAC;IAC3E,CAAC;IAED,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM;YAAE,SAAS;QACtC,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACrF,IAAI,IAAI,MAAM,CAAC,MAAM,OAAO,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,OAAO,MAAM,CAAC;QACpE,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DANCE_PRESETS } from './dances.js';
|
|
2
|
+
const danceEnum = DANCE_PRESETS.map(d => d.id);
|
|
3
|
+
const danceParamDesc = DANCE_PRESETS
|
|
4
|
+
.map(d => `"${d.id}": ${d.title} (${d.description}, max ${d.maxDuration}s).`)
|
|
5
|
+
.join(' ');
|
|
6
|
+
export const definition = {
|
|
7
|
+
type: 'function',
|
|
8
|
+
function: {
|
|
9
|
+
name: 'dance_montage',
|
|
10
|
+
description: 'REQUIRED for ALL dance video requests — do NOT use animate_photo or generate_video for dances. Uses real choreography reference videos to transfer dance motion onto a photo via WAN 2.2 Animate Move. Output is always 9:16 480p portrait. Do NOT use this for bare TikTok/Reels/Shorts/social-video requests unless the user explicitly asks for a dance, choreography, dance trend, or named dance preset. UPLOADED PHOTO: When the user asks for a dance "using this photo" or "with this photo", call dance_montage directly on the uploaded photo; do NOT call edit_image/generate_image first just to prepare, stylize, restyle, reframe, make full-body, or reinterpret the subject. Words that identify a dance preset or vibe, such as "Barbie", "Metric", "Black Sheep", "Rasputin", or "TikTok dance trend", are NOT requests for image prep. Only create image prep first when the user explicitly asks for a new look, outfit, variation set, multiple characters, or loaded persona identity preservation. IMAGE PREP: When generating images for dance (via edit_image or generate_image), ALWAYS use aspectRatio="9:16". CRITICAL — IMAGE COUNT: Generate exactly 1 image (numberOfVariations=1) for dance requests UNLESS the user explicitly asks for variations, different looks, or multiple characters (e.g. "4 different outfits", "alternate between a cat and a dog"). A single consistent image is used for ALL video segments to ensure visual consistency in the final stitched dance video. When the user DOES request multiple variations, batch them into ONE tool call using numberOfVariations + Dynamic Prompts — never split into multiple batches. PERSONAS: When personas are loaded, ALWAYS generate images via edit_image FIRST (using the persona reference photos for identity preservation), then call dance_montage — it will automatically use all generated images. Never use imagePrompt for persona dance requests — edit_image with persona context photos produces far better likeness. USING GENERATED IMAGES: When images have already been generated earlier in the conversation, simply call dance_montage WITHOUT sourceImageIndex — all previously generated images are used automatically as alternating montage segments. Do NOT tell the user to "upload" images that were already generated. Requires at least one uploaded photo, previously generated image, or loaded personas. Best results with photos of people.',
|
|
11
|
+
parameters: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
dance: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
enum: danceEnum,
|
|
17
|
+
description: `Which dance choreography to use. ${danceParamDesc}.`,
|
|
18
|
+
},
|
|
19
|
+
duration: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
description: 'Total video duration in seconds. Range: 8-30. OMIT this parameter unless the user explicitly requests a specific length — the handler defaults to the chosen dance\'s reference video length (capped at 30s) so the full choreography plays through. Each dance has its own max based on its reference video; the handler caps automatically.',
|
|
22
|
+
minimum: 8,
|
|
23
|
+
maximum: 30,
|
|
24
|
+
},
|
|
25
|
+
sourceImageIndex: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
description: 'Which previously generated result image to use (0-based index). Use -1 for the original uploaded image. When omitted, all previously generated images are used automatically as alternating montage segments.',
|
|
28
|
+
},
|
|
29
|
+
imagePrompt: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Creative style/look for auto-generated images when no pre-generated images are available and no personas are loaded. For persona requests, always generate images via edit_image first — it preserves identity far better. This is a fallback only. If omitted, uses a default full-body portrait style.',
|
|
32
|
+
},
|
|
33
|
+
singleClip: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
description: 'When true, renders the entire dance as one continuous clip (no stitching). Only works for durations ≤ 20s. Use when the user explicitly asks for a single video or one unbroken clip. Default: false (splits into segments for faster concurrent rendering).',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['dance'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/dance-montage/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,SAAS,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAE/C,MAAM,cAAc,GAAG,aAAa;KACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,WAAW,SAAS,CAAC,CAAC,WAAW,KAAK,CAAC;KAC5E,IAAI,CAAC,GAAG,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,m1EAAm1E;QACr1E,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,oCAAoC,cAAc,GAAG;iBACnE;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+UAA+U;oBACjV,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+MAA+M;iBAClN;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,0SAA0S;iBAC7S;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,8PAA8P;iBACjQ;aACF;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { LITERAL_PROMPT_OVERRIDE } from '../../../contracts/promptOverrideMarker.js';
|
|
2
|
+
import { ASPECT_RATIO_DESCRIPTION } from '../../../media/index.js';
|
|
3
|
+
export const definition = {
|
|
4
|
+
type: 'function',
|
|
5
|
+
function: {
|
|
6
|
+
name: 'edit_image',
|
|
7
|
+
description: 'Generate images guided by reference photos. Supports GPT Image 2 up to 16 images, Flux.2 up to 6 images, and Qwen up to 3 images. Best for style-guided generation, combining elements from multiple images, ANY persona image creation, and any uploaded brand asset reuse — logos, brand marks, mascots, product shots, photos, screenshots, sketches, or character designs the user expects to appear in or guide the result. ALWAYS use this (never generate_image) when persona photos OR uploaded image assets meant for reuse are in context — even if a specific model is requested. Exception: explicit Z-image/Z-image Turbo uploaded-image enhancement uses generate_image with sourceImageIndex and starting_image_strength because edit_image does not expose Z-image models. If a previous edit_image attempt did not preserve the uploaded asset well, stay on edit_image and tighten the prompt or switch model — do not fall back to generate_image, which has no access to the upload at all. For direct edits (remove objects, enhance), use restore_photo or refine_result unless the user explicitly requested Z-image.',
|
|
8
|
+
parameters: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
prompt: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: `Edit instruction describing what to generate using the reference images as guidance. 50-200 words recommended.
|
|
14
|
+
|
|
15
|
+
${LITERAL_PROMPT_OVERRIDE}
|
|
16
|
+
|
|
17
|
+
PROMPT CONSTRUCTION ORDER — build the prompt in this sequence:
|
|
18
|
+
1. IDENTITY LOCK — state which picture owns the person's identity (GOLDEN RULE: never leave identity ambiguous when editing a person)
|
|
19
|
+
2. REQUESTED EDIT — describe only what CHANGES (the delta), not the whole image
|
|
20
|
+
3. REFERENCE ROLE MAPPING — assign each picture ONE primary role: base_identity (face/person), pose_reference, outfit_reference, style_reference, background_reference, or color_reference
|
|
21
|
+
4. POSE / COMPOSITION — pose, framing, camera angle (omit if unchanged)
|
|
22
|
+
5. STYLE — artistic style, genre, era (omit if unchanged)
|
|
23
|
+
6. LIGHTING / REALISM — "maintain realistic anatomy, perspective, and lighting integration"
|
|
24
|
+
7. PRESERVE clause — always end with "preserve all unmentioned details"
|
|
25
|
+
|
|
26
|
+
IDENTITY LOCK (required when a person is in any reference image):
|
|
27
|
+
"Preserve the exact facial likeness from picture N — face structure, eye shape, nose shape, mouth shape, jawline, skin tone, hairline, apparent age, and overall recognizability."
|
|
28
|
+
Never let a style, pose, or clothing reference silently override the face. If multiple images are provided, explicitly state "identity comes only from picture N — do not borrow identity from other pictures."
|
|
29
|
+
|
|
30
|
+
MINIMAL-CHANGE PRINCIPLE: The base image already contains the subject, composition, camera angle, expression, lighting, and background. Describe only the delta. Use positive constraints ("preserve exact facial likeness") not negative ones ("don't change the face").
|
|
31
|
+
|
|
32
|
+
SINGLE-IMAGE PATTERN:
|
|
33
|
+
"Preserve the exact facial likeness and recognizability of the person from picture 1. [Describe only the requested change]. Keep the same pose, framing, camera angle, and expression unless the user specifically requests changes to these. Preserve all unmentioned details."
|
|
34
|
+
|
|
35
|
+
MULTI-IMAGE PATTERN:
|
|
36
|
+
"Use the person from picture 1 as the final subject and preserve their exact facial likeness. [Requested edit]. Identity comes only from picture 1. Pose from picture 2. Outfit from picture 3. Do not borrow identity from pictures 2 or 3. Maintain realistic anatomy, perspective, and lighting integration. Preserve all unmentioned details."
|
|
37
|
+
|
|
38
|
+
CREATIVE TRANSFORMATIONS — be vivid and reference-specific, name the artist, franchise, or era, but always anchor identity first:
|
|
39
|
+
- "Preserve the exact facial likeness from picture 1. Transform them into a Renaissance oil painting in the style of Vermeer — rich warm tones, dramatic chiaroscuro lighting, ornate period clothing. Maintain realistic anatomy. Preserve all unmentioned details."
|
|
40
|
+
- "Preserve the exact facial likeness from picture 1. Reimagine them as a Marvel superhero — cinematic dramatic lighting, heroic pose, detailed costume with cape, glowing energy effects. Preserve all unmentioned details."
|
|
41
|
+
- "Preserve the exact facial likeness from picture 1. Transform them into a Studio Ghibli anime character — soft watercolor backgrounds, gentle Ghibli-style rendering, whimsical atmosphere. Preserve all unmentioned details."
|
|
42
|
+
- "Preserve the exact facial likeness from picture 1. Place them into a Star Wars scene — Jedi robes, lightsaber glow, dramatic sci-fi backdrop. Preserve all unmentioned details."
|
|
43
|
+
- "Preserve the exact facial likeness from picture 1. Turn them into a GTA loading screen character — bold outlines, saturated colors, attitude-filled pose, urban backdrop. Preserve all unmentioned details."
|
|
44
|
+
|
|
45
|
+
FAILURE MODES TO AVOID:
|
|
46
|
+
- Face drift: identity source not specified, or style/pose reference overrides the face
|
|
47
|
+
- Over-editing: for simple edits, prompt rewrites the entire image instead of describing the delta (creative transformations may intentionally change more)
|
|
48
|
+
- Reference confusion: multiple images provided without explicit role mapping
|
|
49
|
+
|
|
50
|
+
CHARACTER / MASCOT SHEETS: When the user asks for a character sheet, mascot sheet, model sheet, turnaround, expression sheet, or reusable character reference board using uploaded references, create ONE comprehensive professional reference-board image, not separate variations. Map reference roles clearly first (for example: picture 1 = character identity/style reference, picture 2 = logo/brand asset) and keep the character identity consistent across every panel. Include a large hero pose, front / 3/4 / side / back turnaround views, an expression row, action/personality poses, accessories or props, color palette swatches, and compact notes such as personality, fun facts, or brand usage when appropriate. Preserve exact user-provided brand names, slogans, logo text, and requested copy verbatim; incidental tiny notes may be generated by the image model if the user did not provide exact wording. Use clean readable typography.
|
|
51
|
+
|
|
52
|
+
BATCH VARIATIONS: When numberOfVariations > 1, the prompt must describe ONE subject in ONE scene — never mention counts, "versions", "different", or "multiple" in the prompt text. NEVER describe multiple copies or duplicates of the subject in a single image (no grids, collages, or side-by-side). Use Dynamic Prompt syntax to vary ONE dimension across separate images. For personas: vary scene, activity, expression, or environment — never vary identity. Example: user asks "4 versions at the beach" → numberOfVariations=4, prompt="[persona] at the beach {building a sandcastle|surfing a wave|reading under a palm tree|flying a kite}" — each output is ONE person doing ONE activity. For direct edits: vary the approach, e.g., numberOfVariations=3, prompt="make the sky {a vibrant sunset|stormy and dramatic|clear blue}". Preserve any requested orientation, aspect ratio, or exact pixel dimensions across every variation.
|
|
53
|
+
|
|
54
|
+
SELECTION-GATED IMAGE STAGES: If the user asks for multiple reference-guided image options/takes/versions and says they will pick one before a later dance, animation, or video, this edit_image call is still the first step. Generate the complete image batch now with sourceImageIndex set to the relevant reference, the exact requested count, Dynamic Prompt options for each output, and the final video/image aspect ratio. Do not ask the user to choose before the images exist, and do not call video tools until after the user selects an image.
|
|
55
|
+
|
|
56
|
+
LINKED VARIANTS: If multiple details must stay paired per output — visual style, identity cues, outfit, label text, symbols, setting, character, prop, location, or before/after keyframe details — use ONE top-level Dynamic Prompt branch with one complete prompt per output. Do NOT use separate Dynamic Prompt groups for details that must stay together; unpaired groups can mix attributes. If the user asks for per-variant facial, identity, or appearance changes, repeat that guidance inside EVERY option while also preserving recognizability. When the user names a subject or character, write that name or stable role inside every Dynamic Prompt option; a shared prefix outside the branch is not enough because each option must stand alone as a complete identity contract.
|
|
57
|
+
|
|
58
|
+
Each option must be a fully concrete description — name the actual garment or styling, the actual setting, the actual accessories, and the literal text or symbol shown on screen when requested. Never use meta-placeholder phrasing such as "style-specific outfit", "variant-specific background", "include the requested symbol", "include a humorous alternate name", or "bake the name and symbol into the image" — those describe the task instead of the image.
|
|
59
|
+
|
|
60
|
+
ORIGINAL + VARIANT BATCHES: When one option is a remade/preserved original and the other options are themed variants, the original option still needs a concrete visual contract. Say to preserve the original clothing/wardrobe/outfit and original background/setting, then name any requested added text, label, flag, logo, symbol, or prop for that original option. Do not leave the original option as only "unmodified original person"; it must be as fully specified as every themed option.
|
|
61
|
+
|
|
62
|
+
NEW SETTING PER OPTION: When the variant theme implies a new place, culture, era, or context, every option must name its own setting (location, props, lighting). Do NOT carry the source background forward, do NOT write "in the same pose and placement as the original photo" without also naming the new background, and do NOT rely on "preserve all unmentioned details" to handle the setting — the new setting IS a mentioned detail.
|
|
63
|
+
|
|
64
|
+
RECOGNIZABILITY OVER FEATURE LOCK: For ethnic / age / character / art-style transformations, do NOT paste the strict IDENTITY LOCK feature list ("face structure, eye shape, nose shape, mouth shape, jawline, skin tone, hairline") inside each option — that list contradicts the requested face change and the source face will pass through unchanged. Anchor recognizability per option through apparent age, signature hair silhouette, build, posture, and expression, and explicitly allow skin tone, facial features, and proportions to shift toward the target.
|
|
65
|
+
|
|
66
|
+
Correct shape (each option self-contained, concrete, with a fresh setting and a recognizability anchor instead of a strict feature lock):
|
|
67
|
+
"{The subject wearing [specific garment, color, cut, and material], standing in [specific NEW setting with props and lighting — never the source background], bold text at the bottom reads [literal requested text], [specific requested visual symbol] appears as a sign or prop, [requested per-variant facial or appearance shift, e.g. "skin tone, eye shape, and bone structure shift toward <target> features"], recognizable through apparent age, signature hair silhouette, build, posture, and expression|The subject wearing [second specific garment, color, cut, and material], standing in [second specific NEW setting with props and lighting], bold text at the bottom reads [second literal requested text], [second requested visual symbol] appears as a sign or prop, [second requested facial or appearance shift], recognizable through apparent age, signature hair silhouette, build, posture, and expression|...}"
|
|
68
|
+
|
|
69
|
+
Wrong shape (placeholder labels masquerading as prompts):
|
|
70
|
+
"{First variant with variant-specific facial features, placeholder wardrobe, alternate name, and requested symbol baked in|Second variant with different variant-specific facial features, placeholder wardrobe, alternate name, and requested symbol baked in|...}"
|
|
71
|
+
|
|
72
|
+
Also wrong (strict feature lock + no new setting — the source face and source background pass through unchanged):
|
|
73
|
+
"{Preserve the exact facial likeness — face structure, eye shape, nose shape, mouth shape, jawline, skin tone, hairline. Reimagine as <variant>: [garment description], standing in the exact same pose and placement as the original photo. Preserve all unmentioned details.|Preserve the exact facial likeness — [same strict lock]. Reimagine as <other variant>: [other garment], standing in the exact same pose and placement as the original photo. Preserve all unmentioned details.|...}"
|
|
74
|
+
|
|
75
|
+
SCREENPLAY / STORYBOARD BATCHES: For multi-scene story, commercial, or longer-form video keyframes, use one Dynamic Prompt branch with one full scene prompt per option. Recurring characters must keep stable names and repeated visual anchors in every scene option where they appear: face/identity source if available, age range, build, hairstyle, outfit silhouette, color palette, signature prop/accessory, posture, and role. Do not let style, scene changes, or pose references alter identity. Include screenplay-style speaker tags when dialogue matters, e.g. CHARACTER: "We made it."
|
|
76
|
+
|
|
77
|
+
COMPOSITE GPT IMAGE 2 STORYBOARD SHEETS: When numberOfVariations=1 and the user asks for one composite video storyboard/keyframe sheet using uploaded or generated references, the prompt must be a compiled storyboard prompt, not a concept summary. Include a SCENES: section with exactly the requested number of concrete entries named SCENE_01, SCENE_02, etc. Every scene entry must include Visual/Action, Camera/Motion, Dialogue/VO (or [no dialogue]), Audio/SFX, and any visible text or reference usage for that scene. Do not provide only the source brief or generic layout instructions; malformed compiled storyboard prompts are blocked by quality audit.`,
|
|
78
|
+
},
|
|
79
|
+
model: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
enum: ['gpt-image-2', 'qwen-lightning', 'qwen', 'flux2'],
|
|
82
|
+
description: 'DO NOT SET THIS PARAMETER unless the user names a specific edit model, asks for a very complex reference-guided image render, or asks for a video storyboard/storyboard sheet/contact sheet/panel layout image using references. The app auto-selects based on quality settings. Set "gpt-image-2" when the user asks for a ChatGPT, OpenAI, GPT, GPT-2, GPT Image, or gpt-image-2 reference-guided image/edit/model, or by default for complex single-image renders that need dense labels, crisp typography, multi-panel composition, timing notes, foley notes, professional storyboard-sheet layout, or a comprehensive character/mascot/model sheet with turnarounds, expressions, accessories, palette swatches, and brand notes. Z-image and Z-image Turbo are not edit_image models; route those explicit uploaded-image enhancement requests to generate_image with sourceImageIndex and starting_image_strength. If the user names another edit/image model, honor that requested model instead. GPT Image 2 always processes input images at high fidelity; do not set input_fidelity.',
|
|
83
|
+
},
|
|
84
|
+
sourceImageIndex: {
|
|
85
|
+
type: 'number',
|
|
86
|
+
description: 'Index of the primary image to use as the main reference. For follow-up edits when generated image results already exist, use the 0-based generated image result index; for example, editing the latest generated storyboard/image should use that generated result index so the model modifies the existing image instead of redrawing from uploads. When no generated image results exist, use sourceImageIndex=-1 to use the uploaded image references. The primary image and any additional uploaded images are passed as context images to guide generation.',
|
|
87
|
+
},
|
|
88
|
+
numberOfVariations: {
|
|
89
|
+
type: 'number',
|
|
90
|
+
description: 'Number of variations (1-16). Pass the user\'s EXACT requested count in ONE call — never split into multiple calls and never call edit_image again to "add more". "4 variations" → numberOfVariations=4 in a single call. Use the exact requested count for reference-guided images that will feed a later video after the user picks one. For screenplay/storyboard batches, the prompt must contain one Dynamic Prompt branch with one full scene prompt per scene; never set numberOfVariations=N with only scene 1\'s prompt. Use 1 unless the user explicitly asks for multiple. Default: 1.',
|
|
91
|
+
minimum: 1,
|
|
92
|
+
maximum: 16,
|
|
93
|
+
},
|
|
94
|
+
width: {
|
|
95
|
+
type: 'number',
|
|
96
|
+
description: 'Output image width in pixels. Defaults to the context image width. Supported range is 256-2560 for Qwen/Flux.2 edit models. For gpt-image-2, dimensions are flexible up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400; the renderer snaps to the nearest valid multiple-of-16 size. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., "1280 wide", "1280x720", "720p", "3840x2160"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels.',
|
|
97
|
+
},
|
|
98
|
+
height: {
|
|
99
|
+
type: 'number',
|
|
100
|
+
description: 'Output image height in pixels. Defaults to the context image height. Supported range is 256-2560 for Qwen/Flux.2 edit models. For gpt-image-2, dimensions are flexible up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400; the renderer snaps to the nearest valid multiple-of-16 size. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., "720 high", "1280x720", "720p", "2160x3840"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds; the renderer snaps to the nearest supported size internally, so do not ask the user to adjust by a few pixels.',
|
|
101
|
+
},
|
|
102
|
+
aspectRatio: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: `${ASPECT_RATIO_DESCRIPTION}\n\nSet this whenever the user specifies an image or downstream video orientation/aspect ratio such as 9:16, 16:9, portrait, vertical, landscape, widescreen, TikTok/Reels/Shorts, or exact pixels. This includes selection-gated reference-guided image batches that will feed a later video or dance after the user picks one. For GPT Image 2 exact size requests, preserve exact pixel intent when possible and prefer popular GPT sizes such as 1536x1024, 1024x1536, 2048x1152, 3840x2160, and 2160x3840. GPT Image 2 does not support transparent-background output; do not promise a transparent result for this model.`,
|
|
105
|
+
},
|
|
106
|
+
gptImageQuality: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
enum: ['low', 'medium', 'high', 'auto'],
|
|
109
|
+
description: 'Optional GPT Image 2 rendering quality. Only set with model="gpt-image-2" when the user explicitly asks for low/fast, medium/balanced, high/final, or auto quality. Otherwise omit it and let the host app media quality setting map Fast to low, HQ to medium, and Pro to high.',
|
|
110
|
+
},
|
|
111
|
+
outputFormat: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
enum: ['png', 'jpg', 'jpeg', 'webp'],
|
|
114
|
+
description: 'Optional output file format for generated images. Set only when the user explicitly requests PNG, JPG/JPEG, or WebP. Hosts should normalize "jpeg" to the Sogni project format "jpg".',
|
|
115
|
+
},
|
|
116
|
+
personaName: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: 'RARE — only set this when the user EXPLICITLY asks for solo images of one specific person ("a portrait of just [name]", "4 solos of [name] alone"). When set, the handler filters context to ONLY that persona\'s reference photo, so any other personas in your prompt will be missing their reference. DEFAULT for multi-persona requests is to OMIT this and put both faces in one combined call. Never set this for "make us as X", "the two of us", "my wife and I", or any phrasing that puts both personas in the same scene — that\'s a single combined call with no personaName.',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
required: ['prompt'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/edit-image/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,8kCAA8kC;QAChlC,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+oBA8DsnB;iBACtoB;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;oBACxD,WAAW,EACT,miCAAmiC;iBACtiC;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kiBAAkiB;iBACriB;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kkBAAkkB;oBACpkB,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,qzBAAqzB;iBACxzB;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,uzBAAuzB;iBAC1zB;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,GAAG,wBAAwB,imBAAimB;iBAC/nB;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;oBACvC,WAAW,EACT,kRAAkR;iBACrR;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;oBACpC,WAAW,EACT,uLAAuL;iBAC1L;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2jBAA2jB;iBAC9jB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export const definition = {
|
|
2
|
+
type: 'function',
|
|
3
|
+
function: {
|
|
4
|
+
name: 'extend_video',
|
|
5
|
+
description: 'Extend a video by adding new time to the end. Works on BOTH videos previously rendered in this session AND user-uploaded videos — set videoIndex to a negative number (e.g. -1) to target an uploaded video when no prior render exists. The base video is auto-selected from the most recent video in this session unless videoIndex is set. ' +
|
|
6
|
+
'For LTX-2.3 base clips, the tool extracts the last frame and renders an image-to-video continuation. ' +
|
|
7
|
+
'For Seedance base clips, the tool extracts a trailing reference segment and renders a video-to-video continuation. ' +
|
|
8
|
+
'Returns both the standalone new segment and a spliced composite (base + new segment).' +
|
|
9
|
+
' Use when the user asks to "make it longer", "extend the video", "add another N seconds", "continue the scene", "add an outro/bumper to the end", etc.' +
|
|
10
|
+
' Prefer this over generate_image+animate_photo+stitch_video for "add a bumper/outro to this video" — extend_video preserves the original base bytes, audio, and timing instead of re-encoding them.' +
|
|
11
|
+
' Do not use this tool to render fresh videos from scratch — call generate_video or animate_photo for that.' +
|
|
12
|
+
' Output durations follow each model\'s native limits (LTX 2-20s, Seedance 4-15s) for the new segment alone.',
|
|
13
|
+
parameters: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
prompt: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'What should happen during the extension — describe motion, action, dialogue, and audio for the appended seconds, NOT the entire video. ' +
|
|
19
|
+
'For LTX continuations, preserve user-provided spoken dialogue in double quotes; if speech is requested without exact words, describe the delivery without inventing quoted dialogue. ' +
|
|
20
|
+
'If the user did not specify what should happen, write a brief continuation that preserves the existing tone (e.g. "the scene continues with the same camera and pacing").',
|
|
21
|
+
},
|
|
22
|
+
duration: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
description: 'Length in seconds of the new appended segment (NOT total final length). LTX 2-20, Seedance 4-15. Default: 5.',
|
|
25
|
+
minimum: 2,
|
|
26
|
+
maximum: 20,
|
|
27
|
+
},
|
|
28
|
+
videoIndex: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'Which video result to extend. Default: -1 (most recent video in this session). ' +
|
|
31
|
+
'Use 0-based non-negative indices for prior tool result videos. Use negative indices for uploaded videos: -1 = most recent video result OR first uploaded video when no prior render exists.',
|
|
32
|
+
},
|
|
33
|
+
videoModel: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
enum: ['auto', 'ltx23', 'seedance2', 'seedance2-fast'],
|
|
36
|
+
description: 'Which model to use for the new segment. Default: "auto" — detect from the base video\'s producer (Seedance base → Seedance, otherwise LTX-2.3). ' +
|
|
37
|
+
'Override only when the user explicitly requests a different model.',
|
|
38
|
+
},
|
|
39
|
+
keepOriginalAudio: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
description: 'Has no effect for extend_video (the new segment is appended after the base, so the base audio is always preserved through the original portion and the new segment carries its own audio). Reserved for parity with replace_video_segment.',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['duration'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/extend-video/definition.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,cAAc;QACpB,WAAW,EACT,gVAAgV;YAChV,uGAAuG;YACvG,qHAAqH;YACrH,uFAAuF;YACvF,wJAAwJ;YACxJ,qMAAqM;YACrM,4GAA4G;YAC5G,6GAA6G;QAC/G,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,yIAAyI;wBACzI,uLAAuL;wBACvL,2KAA2K;iBAC9K;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,8GAA8G;oBAChH,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iFAAiF;wBACjF,6LAA6L;iBAChM;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,CAAC;oBACtD,WAAW,EACT,kJAAkJ;wBAClJ,oEAAoE;iBACvE;gBACD,iBAAiB,EAAE;oBACjB,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,4OAA4O;iBAC/O;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,CAAC;SACvB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { LITERAL_PROMPT_OVERRIDE } from '../../../contracts/promptOverrideMarker.js';
|
|
2
|
+
import { ASPECT_RATIO_DESCRIPTION } from '../../../media/index.js';
|
|
3
|
+
export const definition = {
|
|
4
|
+
type: 'function',
|
|
5
|
+
function: {
|
|
6
|
+
name: 'generate_image',
|
|
7
|
+
description: 'Generate a new image from a text description. Usually this is text-only: do NOT use this tool when the user expects an existing image to be reused or preserved in the result. That includes (a) people from My Personas, and (b) uploaded assets such as logos, brand marks, mascots, product shots, photos, screenshots, sketches, character designs, or other reference images they want carried through. Use edit_image with sourceImageIndex=-1 (or the appropriate generated index) instead. Exception: when the user explicitly requests Z-image, Z Image, or Z-image Turbo for an uploaded-image enhancement/image-to-image request, use this tool with model="z-turbo" or model="z-image", sourceImageIndex=-1, and starting_image_strength because edit_image does not expose Z-image models.',
|
|
8
|
+
parameters: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
prompt: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: `Text description of the image (50-200 words). POSITIVE phrasing only. Be specific and vivid — reference real artists, franchises, and aesthetics by name.
|
|
14
|
+
|
|
15
|
+
${LITERAL_PROMPT_OVERRIDE}
|
|
16
|
+
|
|
17
|
+
PROMPT ORDER (follow this structure): [SUBJECT] → [ATTRIBUTES] → [ACTION/POSE] → [CAMERA/FRAMING] → [ENVIRONMENT] → [LIGHTING] → [STYLE/MEDIUM] → [MATERIALS/TEXTURES] → [SECONDARY DETAILS]. Always lead with the main subject and its concrete, observable attributes — never start with mood or atmosphere. Put the most visually decisive details early.
|
|
18
|
+
|
|
19
|
+
SPECIFICITY: Use concrete nouns and observable adjectives ("weathered leather jacket", not "cool outfit"). Specify framing (close-up, medium shot, full body, wide shot), angle (eye level, low angle, high angle, overhead), lighting type ("soft overcast daylight", "warm golden-hour sunlight", "moody neon spill with deep shadows"), and medium/style ("photorealistic editorial photography", "cinematic still frame", "clean anime illustration"). Include materials and textures when relevant ("brushed aluminum", "wet asphalt reflections", "heavy wool texture").
|
|
20
|
+
|
|
21
|
+
DEFAULTS (fill in when user is underspecified): Framing: medium shot for portraits, wide shot for environments, full-body for fashion/outfits. Angle: eye level unless dramatic perspective requested. Lighting: soft natural light for realism, clean studio light for product shots. Style: photorealistic for realistic models, matching the model's native style for stylized models (e.g. anime illustration for pony/animagine). Reference real artists and franchises by name ("in the style of Monet's Water Lilies", "Wes Anderson symmetrical pastel composition", "cyberpunk Blade Runner neon city", "shot on 85mm f/1.4 with shallow depth of field").
|
|
22
|
+
|
|
23
|
+
AVOID: Starting with abstract mood words alone. Burying the subject after a long style preamble. Stacking incompatible styles. Overloading with competing focal points. Vague phrases like "very cool" or "epic vibes".
|
|
24
|
+
|
|
25
|
+
CHARACTER / MASCOT SHEETS: When the user asks for a character sheet, mascot sheet, model sheet, turnaround, expression sheet, or reusable character reference board, create ONE comprehensive professional reference-board image, not separate variations. Include a large hero pose, front / 3/4 / side / back turnaround views, an expression row, action/personality poses, accessories or props, color palette swatches, and compact notes such as personality, fun facts, or brand usage when appropriate. Preserve exact user-provided brand names, slogans, logo text, and requested copy verbatim; incidental tiny notes may be generated by the image model if the user did not provide exact wording. Keep the character consistent across every panel and use clean readable typography.
|
|
26
|
+
|
|
27
|
+
BATCH VARIATIONS: When numberOfVariations > 1, the prompt must describe ONE subject in ONE scene — never mention counts, "versions", "different", or "multiple" in the prompt text. NEVER describe multiple copies or duplicates of the subject in a single image (no grids, collages, or side-by-side). Use Dynamic Prompt syntax to vary ONE dimension across separate images. Example: user asks "4 cats in different spots" → numberOfVariations=4, prompt="a black cat {lounging in a sunlit window|prowling through autumn leaves|sitting on a vintage bookshelf|curled up by a fireplace}" — each output is ONE cat in ONE spot. Vary setting, style, lighting, expression, or composition — never override what the user specified. Preserve any requested orientation, aspect ratio, or exact pixel dimensions across every variation.
|
|
28
|
+
|
|
29
|
+
SELECTION-GATED IMAGE STAGES: If the user asks for multiple image options/takes/versions and says they will pick one before a later dance, animation, or video, this tool call is still the first step. Generate the complete image batch now with the exact requested count, Dynamic Prompt options for each output, and the final video/image aspect ratio. Do not ask the user to choose before the images exist, and do not call video tools until after the user selects an image.
|
|
30
|
+
|
|
31
|
+
LINKED VARIANTS: If multiple details must stay paired per output — visual style, outfit, label text, symbol, setting, character, prop, location, or before/after keyframe details — use ONE top-level Dynamic Prompt branch with one complete prompt per output. Do NOT use separate Dynamic Prompt groups for details that must stay together; unpaired groups can mix attributes. If the user asks for per-variant facial, identity, or appearance changes, repeat that guidance inside EVERY option. When the user names a subject or character, write that name or stable role inside every Dynamic Prompt option; a shared prefix outside the branch is not enough because each option must stand alone. Correct shape: "{full prompt for variant 1 with all paired details|full prompt for variant 2 with all paired details|...}".
|
|
32
|
+
|
|
33
|
+
SCREENPLAY / STORYBOARD BATCHES: For multi-scene commercials, storyboards, or shot lists, numberOfVariations must equal the scene count and the prompt MUST be a SINGLE top-level dynamic branch containing one full scene prompt per option, e.g. "{scene 1 full prompt|scene 2 full prompt|scene 3 full prompt}". This is the required way to batch scenes with materially different content while still rendering one image per scene. If recurring characters appear, use stable character names and repeat the same visual anchors in every scene option where they appear (age range, build, hairstyle, outfit silhouette, color palette, signature prop/accessory, posture). Do not rename, merge, redesign, or drift characters between scene keyframes unless the user asks. Include speaker-tagged dialogue details when dialogue affects the keyframe, e.g. CHARACTER: "We made it." NEVER set numberOfVariations=N with only scene 1's prompt — that creates N duplicate versions of scene 1, not N scenes. If the scene count is 16 or fewer, do it in ONE call. Do NOT generate scene 1 first or split into smaller batches unless the user explicitly asks.
|
|
34
|
+
|
|
35
|
+
COMPOSITE GPT IMAGE 2 STORYBOARD SHEETS: When numberOfVariations=1 and the user asks for one composite video storyboard/keyframe sheet, the prompt must be a compiled storyboard prompt, not a concept summary. Include a SCENES: section with exactly the requested number of concrete entries named SCENE_01, SCENE_02, etc. Every scene entry must include Visual/Action, Camera/Motion, Dialogue/VO (or [no dialogue]), Audio/SFX, and any visible text or reference usage for that scene. Do not provide only the source brief or generic layout instructions; malformed compiled storyboard prompts are blocked by quality audit.
|
|
36
|
+
|
|
37
|
+
VIDEO KEYFRAMES: When generating images intended as first+last frames for video (animate_photo with frameRole="both"), use numberOfVariations=2 with Dynamic Prompts to create both frames in one call. Make each frame a distinct scene that creates a compelling transition. The video handler will inspect both generated frames and build a scene-aware transition prompt, so focus this image prompt on producing strong start/end visuals. Example: "a serene lake {at dawn with mist rising and soft pink sky|at dusk with fireflies and deep blue twilight}".`,
|
|
38
|
+
},
|
|
39
|
+
model: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
enum: [
|
|
42
|
+
'gpt-image-2',
|
|
43
|
+
'z-turbo', 'z-image', 'chroma-v46-flash', 'chroma-detail', 'flux1-krea', 'flux2', 'pony-v7',
|
|
44
|
+
'qwen-2512', 'qwen-2512-lightning',
|
|
45
|
+
'albedo-xl', 'animagine-xl', 'anima-pencil-xl', 'art-universe-xl', 'hyphoria-real',
|
|
46
|
+
'analog-madness-xl', 'cyberrealistic-xl', 'real-dream-xl', 'faetastic-xl',
|
|
47
|
+
'zavychroma-xl', 'pony-faetality', 'dreamshaper-xl',
|
|
48
|
+
],
|
|
49
|
+
description: 'DO NOT SET THIS PARAMETER unless the user names a specific model, asks for a very complex image render, asks for a video storyboard/storyboard sheet/contact sheet/panel layout image, or explicitly asks for Z-image/Z-image Turbo image-to-image. The app auto-selects based on quality settings. Set "gpt-image-2" when the user asks for a ChatGPT, OpenAI, GPT, GPT-2, GPT Image, or gpt-image-2 image/model, when they explicitly request very strong text rendering, or by default for complex single-image renders that need dense labels, crisp typography, multi-panel composition, timing notes, foley notes, professional storyboard-sheet layout, or a comprehensive character/mascot/model sheet with turnarounds, expressions, accessories, palette swatches, and brand notes. Set "z-turbo" when the user asks for Z-image Turbo; set "z-image" when they ask for Z-image without Turbo. If the user names another image model, honor that requested model instead. A model preference usually does not change which tool to use; the Z-image image-to-image exception uses sourceImageIndex plus starting_image_strength on this tool. NSFW rule: "gpt-image-2"/"flux2"/"flux1-krea" CANNOT do nudity — use "pony-v7", "chroma-detail", "chroma-v46-flash", or "z-turbo" instead.',
|
|
50
|
+
},
|
|
51
|
+
width: {
|
|
52
|
+
type: 'number',
|
|
53
|
+
description: 'Output image width in pixels. Default: 1024. Supported range is 256-2560 for default Z/Qwen/Flux.2 image models and 256-2048 for legacy/specialized image models. For gpt-image-2, dimensions are flexible up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400; the renderer snaps to the nearest valid multiple-of-16 size. Set when the user specifies a width, exact pixel dimensions, or a named resolution (e.g., "1280 wide", "1280x720", "720p", "1080x1920", "3840x2160"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds, so do not ask the user to adjust by a few pixels.',
|
|
54
|
+
},
|
|
55
|
+
height: {
|
|
56
|
+
type: 'number',
|
|
57
|
+
description: 'Output image height in pixels. Default: 1024. Supported range is 256-2560 for default Z/Qwen/Flux.2 image models and 256-2048 for legacy/specialized image models. For gpt-image-2, dimensions are flexible up to 3840px on either edge with max 3:1 aspect ratio and a total pixel budget from 655,360 to 8,294,400; the renderer snaps to the nearest valid multiple-of-16 size. Set when the user specifies a height, exact pixel dimensions, or a named resolution (e.g., "720 high", "1280x720", "720p", "1080x1920", "2160x3840"). If the user gives only one dimension, set only that dimension and preserve/infer the sensible aspect ratio. User-requested dimensions override the default media quality, including Pro. Non-multiple-of-16 values are accepted when in bounds, so do not ask the user to adjust by a few pixels.',
|
|
58
|
+
},
|
|
59
|
+
numberOfVariations: {
|
|
60
|
+
type: 'number',
|
|
61
|
+
description: 'Number of variations (1-16). Use the user\'s exact requested count in one call whenever they ask for multiple images/options/takes/versions, including images that will feed a later video after the user picks one. For screenplay/storyboard batches, this must equal the scene count AND the prompt must contain one Dynamic Prompt branch with one full scene prompt per scene; never set numberOfVariations=N with only one scene prompt. Default: 1.',
|
|
62
|
+
minimum: 1,
|
|
63
|
+
maximum: 16,
|
|
64
|
+
},
|
|
65
|
+
negativePrompt: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Things to avoid in the generated image. Only set when the user explicitly mentions what to avoid. E.g., "no watermarks, no text, no blurry edges".',
|
|
68
|
+
},
|
|
69
|
+
starting_image_strength: {
|
|
70
|
+
type: 'number',
|
|
71
|
+
description: 'Image-to-image strength (0.0-1.0). Only used when a source image is available and model supports img2img. Higher values = more deviation from the source image. 0.35 = conservative enhancement, 0.5 = balanced, 0.8 = creative. Set this with sourceImageIndex when the user explicitly requests Z-image/Z-image Turbo enhancement or any supported img2img starting-image workflow.',
|
|
72
|
+
},
|
|
73
|
+
sourceImageIndex: {
|
|
74
|
+
type: 'number',
|
|
75
|
+
description: 'Which result image to use as starting image for img2img (0-based index). -1 = original upload. Omit to auto-select latest result. Only relevant when starting_image_strength is set.',
|
|
76
|
+
},
|
|
77
|
+
seed: {
|
|
78
|
+
type: 'integer',
|
|
79
|
+
description: 'Random seed for reproducibility. Use -1 for random (default). Set a specific seed when the user wants to reproduce a previous result.',
|
|
80
|
+
},
|
|
81
|
+
guidance: {
|
|
82
|
+
type: 'number',
|
|
83
|
+
description: 'Guidance scale override. Higher values = more prompt adherence. Model-specific defaults are used if omitted. Only set when the user explicitly requests a guidance value.',
|
|
84
|
+
},
|
|
85
|
+
gptImageQuality: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
enum: ['low', 'medium', 'high', 'auto'],
|
|
88
|
+
description: 'Optional GPT Image 2 rendering quality. Only set with model="gpt-image-2" when the user explicitly asks for low/fast, medium/balanced, high/final, or auto quality. Otherwise omit it and let the host app media quality setting map Fast to low, HQ to medium, and Pro to high.',
|
|
89
|
+
},
|
|
90
|
+
outputFormat: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
enum: ['png', 'jpg', 'jpeg', 'webp'],
|
|
93
|
+
description: 'Optional output file format for generated images. Set only when the user explicitly requests PNG, JPG/JPEG, or WebP. Hosts should normalize "jpeg" to the Sogni project format "jpg".',
|
|
94
|
+
},
|
|
95
|
+
aspectRatio: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: `${ASPECT_RATIO_DESCRIPTION}\n\nSet this whenever the user specifies an image or downstream video orientation/aspect ratio such as 9:16, 16:9, portrait, vertical, landscape, widescreen, TikTok/Reels/Shorts, or exact pixels. This includes selection-gated image batches that will feed a later video or dance after the user picks one. For GPT Image 2 exact size requests, preserve exact pixel intent when possible and prefer popular GPT sizes such as 1536x1024, 1024x1536, 2048x1152, 3840x2160, and 2160x3840. GPT Image 2 does not support transparent-background output; do not promise a transparent result for this model.`,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ['prompt'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-image/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,ywBAAywB;QAC3wB,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;siBAsB6gB;iBAC7hB;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE;wBACJ,aAAa;wBACb,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS;wBAC3F,WAAW,EAAE,qBAAqB;wBAClC,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe;wBAClF,mBAAmB,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc;wBACzE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB;qBACpD;oBACD,WAAW,EACT,ouCAAouC;iBACvuC;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2yBAA2yB;iBAC9yB;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4yBAA4yB;iBAC/yB;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4bAA4b;oBAC9b,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oJAAoJ;iBACvJ;gBACD,uBAAuB,EAAE;oBACvB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,uXAAuX;iBAC1X;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sLAAsL;iBACzL;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,uIAAuI;iBAC1I;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,2KAA2K;iBAC9K;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;oBACvC,WAAW,EACT,kRAAkR;iBACrR;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;oBACpC,WAAW,EACT,uLAAuL;iBAC1L;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,GAAG,wBAAwB,glBAAglB;iBAC9mB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
|