@sogni-ai/sogni-intelligence-client 2.4.3 → 3.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/agent/index.d.ts +5 -0
  2. package/dist/agent/index.d.ts.map +1 -0
  3. package/dist/agent/index.js +38 -0
  4. package/dist/agent/index.js.map +1 -0
  5. package/dist/agent/intentInput.d.ts +106 -0
  6. package/dist/agent/intentInput.d.ts.map +1 -0
  7. package/dist/agent/intentInput.js +410 -0
  8. package/dist/agent/intentInput.js.map +1 -0
  9. package/dist/agent/toolMetadata.d.ts +37 -0
  10. package/dist/agent/toolMetadata.d.ts.map +1 -0
  11. package/dist/agent/toolMetadata.js +146 -0
  12. package/dist/agent/toolMetadata.js.map +1 -0
  13. package/dist/agent/turnAnalysis.d.ts +34 -0
  14. package/dist/agent/turnAnalysis.d.ts.map +1 -0
  15. package/dist/agent/turnAnalysis.js +155 -0
  16. package/dist/agent/turnAnalysis.js.map +1 -0
  17. package/dist/agent/turnPlan.d.ts +40 -0
  18. package/dist/agent/turnPlan.d.ts.map +1 -0
  19. package/dist/agent/turnPlan.js +187 -0
  20. package/dist/agent/turnPlan.js.map +1 -0
  21. package/dist/artifacts/graph.d.ts +92 -0
  22. package/dist/artifacts/graph.d.ts.map +1 -0
  23. package/dist/artifacts/graph.js +484 -0
  24. package/dist/artifacts/graph.js.map +1 -0
  25. package/dist/artifacts/index.d.ts +3 -0
  26. package/dist/artifacts/index.d.ts.map +1 -0
  27. package/dist/artifacts/index.js +28 -0
  28. package/dist/artifacts/index.js.map +1 -0
  29. package/dist/artifacts/queries.d.ts +7 -0
  30. package/dist/artifacts/queries.d.ts.map +1 -0
  31. package/dist/artifacts/queries.js +85 -0
  32. package/dist/artifacts/queries.js.map +1 -0
  33. package/dist/billing/index.d.ts +3 -0
  34. package/dist/billing/index.d.ts.map +1 -0
  35. package/dist/billing/index.js +27 -0
  36. package/dist/billing/index.js.map +1 -0
  37. package/dist/billing/spendGate.d.ts +72 -0
  38. package/dist/billing/spendGate.d.ts.map +1 -0
  39. package/dist/billing/spendGate.js +344 -0
  40. package/dist/billing/spendGate.js.map +1 -0
  41. package/dist/billing/workflowAuthorization.d.ts +56 -0
  42. package/dist/billing/workflowAuthorization.d.ts.map +1 -0
  43. package/dist/billing/workflowAuthorization.js +270 -0
  44. package/dist/billing/workflowAuthorization.js.map +1 -0
  45. package/dist/contracts/data/promptContracts.d.ts.map +1 -1
  46. package/dist/contracts/data/promptContracts.js +48 -36
  47. package/dist/contracts/data/promptContracts.js.map +1 -1
  48. package/dist/contracts/data/toolPermissions.d.ts +2 -0
  49. package/dist/contracts/data/toolPermissions.d.ts.map +1 -1
  50. package/dist/contracts/data/toolPermissions.js +2 -13
  51. package/dist/contracts/data/toolPermissions.js.map +1 -1
  52. package/dist/contracts/index.d.ts +2 -2
  53. package/dist/contracts/index.d.ts.map +1 -1
  54. package/dist/contracts/index.js +5 -3
  55. package/dist/contracts/index.js.map +1 -1
  56. package/dist/contracts/toolGatingPolicy.d.ts.map +1 -1
  57. package/dist/contracts/toolGatingPolicy.js +6 -2
  58. package/dist/contracts/toolGatingPolicy.js.map +1 -1
  59. package/dist/contracts/toolSurface.d.ts +1 -0
  60. package/dist/contracts/toolSurface.d.ts.map +1 -1
  61. package/dist/contracts/toolSurface.js +12 -5
  62. package/dist/contracts/toolSurface.js.map +1 -1
  63. package/dist/contracts/turnPolicy.d.ts +2 -1
  64. package/dist/contracts/turnPolicy.d.ts.map +1 -1
  65. package/dist/contracts/turnPolicy.js +14 -0
  66. package/dist/contracts/turnPolicy.js.map +1 -1
  67. package/dist/events/index.d.ts +2 -0
  68. package/dist/events/index.d.ts.map +1 -0
  69. package/dist/events/index.js +12 -0
  70. package/dist/events/index.js.map +1 -0
  71. package/dist/events/runEvent.d.ts +31 -0
  72. package/dist/events/runEvent.d.ts.map +1 -0
  73. package/dist/events/runEvent.js +161 -0
  74. package/dist/events/runEvent.js.map +1 -0
  75. package/dist/index.d.ts +6 -0
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +26 -1
  78. package/dist/index.js.map +1 -1
  79. package/dist/public-skill-runtime/index.d.ts +1 -1
  80. package/dist/public-skill-runtime/index.d.ts.map +1 -1
  81. package/dist/public-skill-runtime/index.js +229 -119
  82. package/dist/public-skill-runtime/index.js.map +1 -1
  83. package/dist/schemas/agent/intent-input.schema.json +128 -0
  84. package/dist/schemas/agent/turn-analysis.schema.json +75 -0
  85. package/dist/schemas/artifacts/artifact-graph.schema.json +42 -0
  86. package/dist/schemas/artifacts/artifact-node.schema.json +137 -0
  87. package/dist/schemas/billing/spend-gate.schema.json +130 -0
  88. package/dist/schemas/billing/workflow-authorization.schema.json +83 -0
  89. package/dist/schemas/events/run-event.schema.json +111 -0
  90. package/dist/schemas/tools/tool-metadata.schema.json +78 -0
  91. package/dist/tools/definitions/animate-photo/definition.js +5 -5
  92. package/dist/tools/definitions/animate-photo/definition.js.map +1 -1
  93. package/dist/tools/definitions/edit-image/definition.js +3 -3
  94. package/dist/tools/definitions/edit-image/definition.js.map +1 -1
  95. package/dist/tools/definitions/generate-image/definition.js +4 -4
  96. package/dist/tools/definitions/generate-image/definition.js.map +1 -1
  97. package/dist/tools/definitions/generate-music/definition.js +2 -2
  98. package/dist/tools/definitions/generate-music/definition.js.map +1 -1
  99. package/dist/tools/definitions/generate-video/definition.js +2 -2
  100. package/dist/tools/definitions/generate-video/definition.js.map +1 -1
  101. package/dist/tools/definitions/sound-to-video/definition.js +2 -2
  102. package/dist/tools/definitions/sound-to-video/definition.js.map +1 -1
  103. package/dist/tools/index.d.ts +1 -1
  104. package/dist/tools/index.d.ts.map +1 -1
  105. package/dist/tools/index.js +3 -2
  106. package/dist/tools/index.js.map +1 -1
  107. package/dist/tools/normalizeArgs.d.ts +1 -0
  108. package/dist/tools/normalizeArgs.d.ts.map +1 -1
  109. package/dist/tools/normalizeArgs.js +83 -8
  110. package/dist/tools/normalizeArgs.js.map +1 -1
  111. package/dist/utils/helpers.d.ts.map +1 -1
  112. package/dist/utils/helpers.js +4 -2
  113. package/dist/utils/helpers.js.map +1 -1
  114. package/dist/workflows/index.d.ts +2 -0
  115. package/dist/workflows/index.d.ts.map +1 -1
  116. package/dist/workflows/index.js +7 -1
  117. package/dist/workflows/index.js.map +1 -1
  118. package/dist/workflows/primitives/index.d.ts +1 -0
  119. package/dist/workflows/primitives/index.d.ts.map +1 -1
  120. package/dist/workflows/primitives/index.js +1 -0
  121. package/dist/workflows/primitives/index.js.map +1 -1
  122. package/dist/workflows/primitives/sanitizer.d.ts +22 -0
  123. package/dist/workflows/primitives/sanitizer.d.ts.map +1 -0
  124. package/dist/workflows/primitives/sanitizer.js +96 -0
  125. package/dist/workflows/primitives/sanitizer.js.map +1 -0
  126. package/dist-esm/agent/index.js +5 -0
  127. package/dist-esm/agent/index.js.map +1 -0
  128. package/dist-esm/agent/intentInput.js +397 -0
  129. package/dist-esm/agent/intentInput.js.map +1 -0
  130. package/dist-esm/agent/toolMetadata.js +136 -0
  131. package/dist-esm/agent/toolMetadata.js.map +1 -0
  132. package/dist-esm/agent/turnAnalysis.js +147 -0
  133. package/dist-esm/agent/turnAnalysis.js.map +1 -0
  134. package/dist-esm/agent/turnPlan.js +180 -0
  135. package/dist-esm/agent/turnPlan.js.map +1 -0
  136. package/dist-esm/artifacts/graph.js +465 -0
  137. package/dist-esm/artifacts/graph.js.map +1 -0
  138. package/dist-esm/artifacts/index.js +3 -0
  139. package/dist-esm/artifacts/index.js.map +1 -0
  140. package/dist-esm/artifacts/queries.js +78 -0
  141. package/dist-esm/artifacts/queries.js.map +1 -0
  142. package/dist-esm/billing/index.js +3 -0
  143. package/dist-esm/billing/index.js.map +1 -0
  144. package/dist-esm/billing/spendGate.js +329 -0
  145. package/dist-esm/billing/spendGate.js.map +1 -0
  146. package/dist-esm/billing/workflowAuthorization.js +260 -0
  147. package/dist-esm/billing/workflowAuthorization.js.map +1 -0
  148. package/dist-esm/contracts/data/promptContracts.js +48 -36
  149. package/dist-esm/contracts/data/promptContracts.js.map +1 -1
  150. package/dist-esm/contracts/data/toolPermissions.js +2 -13
  151. package/dist-esm/contracts/data/toolPermissions.js.map +1 -1
  152. package/dist-esm/contracts/index.js +2 -2
  153. package/dist-esm/contracts/index.js.map +1 -1
  154. package/dist-esm/contracts/toolGatingPolicy.js +6 -2
  155. package/dist-esm/contracts/toolGatingPolicy.js.map +1 -1
  156. package/dist-esm/contracts/toolSurface.js +11 -4
  157. package/dist-esm/contracts/toolSurface.js.map +1 -1
  158. package/dist-esm/contracts/turnPolicy.js +13 -0
  159. package/dist-esm/contracts/turnPolicy.js.map +1 -1
  160. package/dist-esm/events/index.js +2 -0
  161. package/dist-esm/events/index.js.map +1 -0
  162. package/dist-esm/events/runEvent.js +152 -0
  163. package/dist-esm/events/runEvent.js.map +1 -0
  164. package/dist-esm/index.js +5 -0
  165. package/dist-esm/index.js.map +1 -1
  166. package/dist-esm/public-skill-runtime/index.js +229 -119
  167. package/dist-esm/public-skill-runtime/index.js.map +1 -1
  168. package/dist-esm/schemas/agent/intent-input.schema.json +128 -0
  169. package/dist-esm/schemas/agent/turn-analysis.schema.json +75 -0
  170. package/dist-esm/schemas/artifacts/artifact-graph.schema.json +42 -0
  171. package/dist-esm/schemas/artifacts/artifact-node.schema.json +137 -0
  172. package/dist-esm/schemas/billing/spend-gate.schema.json +130 -0
  173. package/dist-esm/schemas/billing/workflow-authorization.schema.json +83 -0
  174. package/dist-esm/schemas/events/run-event.schema.json +111 -0
  175. package/dist-esm/schemas/tools/tool-metadata.schema.json +78 -0
  176. package/dist-esm/tools/definitions/animate-photo/definition.js +5 -5
  177. package/dist-esm/tools/definitions/animate-photo/definition.js.map +1 -1
  178. package/dist-esm/tools/definitions/edit-image/definition.js +3 -3
  179. package/dist-esm/tools/definitions/edit-image/definition.js.map +1 -1
  180. package/dist-esm/tools/definitions/generate-image/definition.js +4 -4
  181. package/dist-esm/tools/definitions/generate-image/definition.js.map +1 -1
  182. package/dist-esm/tools/definitions/generate-music/definition.js +2 -2
  183. package/dist-esm/tools/definitions/generate-music/definition.js.map +1 -1
  184. package/dist-esm/tools/definitions/generate-video/definition.js +2 -2
  185. package/dist-esm/tools/definitions/generate-video/definition.js.map +1 -1
  186. package/dist-esm/tools/definitions/sound-to-video/definition.js +2 -2
  187. package/dist-esm/tools/definitions/sound-to-video/definition.js.map +1 -1
  188. package/dist-esm/tools/index.js +1 -1
  189. package/dist-esm/tools/index.js.map +1 -1
  190. package/dist-esm/tools/normalizeArgs.js +82 -8
  191. package/dist-esm/tools/normalizeArgs.js.map +1 -1
  192. package/dist-esm/utils/helpers.js +4 -2
  193. package/dist-esm/utils/helpers.js.map +1 -1
  194. package/dist-esm/workflows/index.js +1 -0
  195. package/dist-esm/workflows/index.js.map +1 -1
  196. package/dist-esm/workflows/primitives/index.js +1 -0
  197. package/dist-esm/workflows/primitives/index.js.map +1 -1
  198. package/dist-esm/workflows/primitives/sanitizer.js +89 -0
  199. package/dist-esm/workflows/primitives/sanitizer.js.map +1 -0
  200. package/package.json +30 -3
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sogni.ai/creative-agent/2026-05-20.1/events/run-event.schema.json",
4
+ "title": "Unified run event",
5
+ "schemaVersion": "2026-05-20.1",
6
+ "description": "Single event vocabulary across chat runs and workflow runs. Both persist into the shared `runs` substrate (plan §13.5) and differ only by the runKind discriminator. SSE replay key is (runId, sequence). idempotencyKey covers reentrant transitions such as cost confirmation. Per-event-type payload shapes are deliberately not enforced at this layer — payload shapes are documented per type and tightened in a Phase 1 follow-up to avoid an enormous union in this round.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "$defs": {
10
+ "RunEventType": {
11
+ "type": "string",
12
+ "description": "All event types. Clusters: lifecycle (run_queued, run_started, run_completed, run_partial_failure, run_failed, run_cancelled), LLM (llm_round_started, llm_token, llm_round_completed), tools (tool_call_proposed, tool_call_dispatched, tool_call_progress, tool_call_resolved), artifacts (artifact_created, artifact_updated, artifact_referenced), waiting (run_waiting_for_user), spend (spend_preview_emitted, spend_confirmed, spend_cancelled, spend_insufficient), audit (audit_evaluated, repair_requested), workflow-stage (stage_started, stage_completed, stage_failed, stage_waiting_for_user).",
13
+ "enum": [
14
+ "run_queued",
15
+ "run_started",
16
+ "run_completed",
17
+ "run_partial_failure",
18
+ "run_failed",
19
+ "run_cancelled",
20
+ "llm_round_started",
21
+ "llm_token",
22
+ "llm_round_completed",
23
+ "tool_call_proposed",
24
+ "tool_call_dispatched",
25
+ "tool_call_progress",
26
+ "tool_call_resolved",
27
+ "artifact_created",
28
+ "artifact_updated",
29
+ "artifact_referenced",
30
+ "run_waiting_for_user",
31
+ "spend_preview_emitted",
32
+ "spend_confirmed",
33
+ "spend_cancelled",
34
+ "spend_insufficient",
35
+ "audit_evaluated",
36
+ "repair_requested",
37
+ "stage_started",
38
+ "stage_completed",
39
+ "stage_failed",
40
+ "stage_waiting_for_user"
41
+ ]
42
+ },
43
+ "RunStatus": {
44
+ "type": "string",
45
+ "description": "Unified status enum across chat and workflow runs.",
46
+ "enum": [
47
+ "queued",
48
+ "running",
49
+ "completed",
50
+ "partial_failure",
51
+ "waiting_for_user",
52
+ "failed",
53
+ "cancelled"
54
+ ]
55
+ },
56
+ "WaitingReason": {
57
+ "type": "string",
58
+ "description": "Why a run paused. Carried inside the payload of a run_waiting_for_user event (and stage_waiting_for_user where applicable).",
59
+ "enum": [
60
+ "ask_clarifying_question",
61
+ "select_media_required",
62
+ "cost_approval_required",
63
+ "safety_review_required",
64
+ "workflow_user_input_required",
65
+ "insufficient_credit",
66
+ "other"
67
+ ]
68
+ }
69
+ },
70
+ "properties": {
71
+ "runId": { "type": "string" },
72
+ "runKind": {
73
+ "type": "string",
74
+ "enum": ["chat", "workflow"],
75
+ "description": "Substrate discriminator (plan §13.5). chat and workflow runs share persistence, lease, heartbeat, event log, waiting semantics, cancellation, cost confirmation, and resume."
76
+ },
77
+ "sequence": {
78
+ "type": "integer",
79
+ "minimum": 0,
80
+ "description": "Strictly increasing per runId. SSE replay key is (runId, sequence)."
81
+ },
82
+ "type": { "$ref": "#/$defs/RunEventType" },
83
+ "status": { "$ref": "#/$defs/RunStatus" },
84
+ "payload": {
85
+ "type": "object",
86
+ "additionalProperties": true,
87
+ "description": "Per-type payload. Documented shapes: run_waiting_for_user -> { reason: WaitingReason, ... }; tool_call_proposed/_dispatched/_progress/_resolved -> { toolCallId, toolName, ... }; artifact_* -> { artifactId, ... }; spend_* -> { gateId, scope, ... }; audit_evaluated -> { toolCallId, passed, ... }; repair_requested -> { toolCallId, reason, retryCount }; stage_* -> { stageId, ... }. Schema-level enforcement of these shapes is intentionally deferred to Phase 1 to avoid an unwieldy union here."
88
+ },
89
+ "createdAt": { "type": "string", "format": "date-time" },
90
+ "resumable": {
91
+ "type": "boolean",
92
+ "description": "True when the run is in a state the client can resume from (typically paired with run_waiting_for_user)."
93
+ },
94
+ "terminal": {
95
+ "type": "boolean",
96
+ "description": "True for the final event of a run (run_completed / run_failed / run_cancelled / run_partial_failure)."
97
+ },
98
+ "idempotencyKey": {
99
+ "type": "string",
100
+ "description": "Stable key for reentrant transitions (e.g. POST /confirm-cost). Re-submitting the same key MUST be a no-op."
101
+ }
102
+ },
103
+ "required": [
104
+ "runId",
105
+ "runKind",
106
+ "sequence",
107
+ "type",
108
+ "payload",
109
+ "createdAt"
110
+ ]
111
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.sogni.ai/creative-agent/2026-05-20.1/tools/tool-metadata.schema.json",
4
+ "title": "Tool catalog metadata",
5
+ "schemaVersion": "2026-05-20.1",
6
+ "description": "Metadata that accompanies each tool definition in the v2 catalog. Drives tool surfacing decisions (which family/execution mode is visible this turn), spend gating (costClass + requiresConfirmation), retry behavior (retrySafety), and durable-run observability (mutatesData, producesArtifacts). Input/output schema refs point at sogni-protocol argument and result contracts so the validator and the planner share one source of truth.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "name": {
11
+ "type": "string",
12
+ "description": "Canonical tool name (snake_case, matches the OpenAI-format tool definition exposed to the LLM)."
13
+ },
14
+ "family": {
15
+ "type": "string",
16
+ "enum": ["creative", "composition", "artifact", "memory", "settings", "analysis", "control"],
17
+ "description": "Coarse grouping used by the planner to pick a minimal visible tool subset."
18
+ },
19
+ "executionMode": {
20
+ "type": "string",
21
+ "enum": ["hosted", "client", "app", "workflow", "internal"],
22
+ "description": "Where the tool runs. 'hosted' = sogni-api durable runner. 'client' = browser tool dispatch. 'app' = native shell. 'workflow' = synthetic tool that creates a WorkflowRun. 'internal' = runtime-only (e.g. L1 hidden resolver) — never surfaced to the LLM directly."
23
+ },
24
+ "inputSchemaRef": {
25
+ "type": "string",
26
+ "description": "URI or repo-relative path. MUST resolve to a sogni-protocol tool argument JSON Schema (e.g. schemas/tools/generate_image.schema.json)."
27
+ },
28
+ "outputSchemaRef": {
29
+ "type": "string",
30
+ "description": "URI or repo-relative path. MUST resolve to a sogni-protocol tool result envelope schema."
31
+ },
32
+ "costClass": {
33
+ "type": "string",
34
+ "enum": ["free", "low", "medium", "high", "variable"],
35
+ "description": "Indicative cost tier. Concrete unit estimates live on the SpendGate request, not here."
36
+ },
37
+ "latencyClass": {
38
+ "type": "string",
39
+ "enum": ["inline", "interactive", "long_running"],
40
+ "description": "Indicative wall-clock tier. 'long_running' tools generally belong inside a Workflow Template, not a synchronous chat turn."
41
+ },
42
+ "mutatesData": {
43
+ "type": "boolean",
44
+ "description": "True when the tool changes persisted user state (e.g. manage_memory write, settings update)."
45
+ },
46
+ "producesArtifacts": {
47
+ "type": "boolean",
48
+ "description": "True when the tool emits one or more ArtifactNodes that must be registered in the ArtifactGraph."
49
+ },
50
+ "requiresConfirmation": {
51
+ "type": "string",
52
+ "enum": ["never", "paid", "destructive", "always"],
53
+ "description": "Confirmation policy. 'paid' defers to SpendGate. 'destructive' requires an explicit user yes regardless of cost. 'always' is reserved for atomic operations with no other gate."
54
+ },
55
+ "retrySafety": {
56
+ "type": "string",
57
+ "enum": ["idempotent", "dedupe_key_required", "not_safe"],
58
+ "description": "Whether the runner may retry the tool call on a transient failure. 'dedupe_key_required' tools must be called with a stable dedupe token (e.g. sogni-socket project id)."
59
+ },
60
+ "hiddenFromModel": {
61
+ "type": "boolean",
62
+ "description": "Optional. L1 hidden context tools (resolve_*, inspect_*) set this true so the runner can call them directly without surfacing them to the LLM."
63
+ }
64
+ },
65
+ "required": [
66
+ "name",
67
+ "family",
68
+ "executionMode",
69
+ "inputSchemaRef",
70
+ "outputSchemaRef",
71
+ "costClass",
72
+ "latencyClass",
73
+ "mutatesData",
74
+ "producesArtifacts",
75
+ "requiresConfirmation",
76
+ "retrySafety"
77
+ ]
78
+ }
@@ -4,7 +4,7 @@ export const definition = {
4
4
  type: "function",
5
5
  function: {
6
6
  name: "animate_photo",
7
- description: 'Animate a photo into video with motion, audio, and dialogue using LTX 2.3 or WAN 2.2. Do NOT use this tool for seedance2 or seedance2-fast. Seedance 2.0 media references must go through generate_video with referenceImageIndices/referenceVideoIndices/referenceAudioIndices and @Image/@Video/@Audio role text in the prompt; for seamless-loop Seedance requests with one uploaded image, the prompt should anchor it as both the first frame and last frame. LTX/WAN NOTE: uploaded audio files are not loose references for ltx23/wan22; use sound_to_video when uploaded audio is the primary sync target. DANCE REQUESTS ("make them dance", "do the X dance"): use dance_montage — NOT this tool. LTX 2.3 generates audio natively — describe dialogue and ambient sounds directly in the prompt (do NOT pre-generate audio for this tool). If the user provides exact speech, include it in double quotes; if they only imply speech, describe the performance and voice without inventing quoted words. Never use placeholders such as "while speaking", "dialogue begins", "explaining", or "final line lands". PERSONA VOICE: Only when the user explicitly asks to use/clone a registered persona voice clip, call resolve_personas first, then set voicePersonaName to select which persona\'s voice clip to use. Do not set voicePersonaName for ordinary character dialogue or inferred voices; describe those voices in the prompt for native LTX audio. For cross-persona narration (e.g. David narrates a video of Aleyna), resolve both personas and set voicePersonaName to the narrator only if that registered voice was requested. Persona voice requires ltx23 — always use ltx23 when persona voice is requested (WAN 2.2 does not support voice identity). PERSONA PIPELINE: For persona videos, ensure an image of the persona exists before calling animate_photo. The standard pipeline is: resolve_personas → edit_image → animate_photo. If a suitable persona image already exists (user uploaded one, a prior edit_image/generate_image result, OR the user explicitly says to use the Persona image/reference photo directly), skip edit_image and animate directly. After resolve_personas, this tool can animate the injected persona image directly when that explicit direct-use instruction is given. Auto-uses the latest result image (from any prior tool) unless sourceImageIndex is set. Supports start-frame (default), end-frame, and start+end interpolation modes for LTX/WAN — ask the user which frame role their image should play if they mention "end frame", "last frame", or provide two images. FIRST+LAST FRAME WORKFLOW: When the user wants a non-Seedance video using two different scenes as start and end frames, FIRST generate both images in a single generate_image/edit_image call with numberOfVariations=2 and Dynamic Prompts, THEN call animate_photo with frameRole="both", sourceImageIndex=0, endImageIndex=1. Never generate the two frames in separate tool calls. In frameRole="both", the handler automatically inspects both images and upgrades the base prompt into a scene-aware smooth transition prompt, so your prompt should state the desired transition style, action, dialogue, and audio rather than trying to list every visible object. If the request is vague, analyze the image first and suggest 2-3 specific animation ideas tailored to what you see. Only call once you have clear creative intent. N-VIDEOS PATTERN — ALWAYS BATCH IN ONE CALL: When the user wants N video versions or a multi-segment stitched non-Seedance video, NEVER call animate_photo N times. Always use sourceImageIndices in a single call so all N projects run in parallel. sourceImageIndices supports up to 16 entries; there is NO 3-clip cap, so do not split one planned batch into "first 3" and "remaining" calls. For a dialogue-heavy total-duration request with no explicit per-clip duration, prefer 15-second clips on ltx23 (30s total = 2 clips × 15s) and 10-second clips on wan22 (60s total on wan22 = 6 clips × 10s; do NOT pick 4 clips × 15s on wan22 — the wan22 worker rejects clips longer than 10s). Two flavors: (A) SHARED CONTENT — when all N clips have the same dialogue/motion but different source visuals (different scenes, outfits, environments, persona looks), first generate N distinct images via ONE edit_image/generate_image call with numberOfVariations=N + Dynamic Prompts {|}, then call animate_photo with sourceImageIndices=[start..start+N-1] and a single shared `prompt`. If all segments intentionally reuse the primary uploaded image instead of generated source images, use sourceImageIndices=[-1,-1,...] with one -1 per segment. For a long or multi-segment video from a single supplied/uploaded image WITHOUT a requested image/keyframe/version generation stage, use sourceImageIndices=[-1,-1,...] and per-clip prompts. Only set frameRole="both" and endImageIndex=-1 when the user explicitly says the same uploaded/source/original image should be both the first and last frame of every segment. If the user requests generated source images first, honor that image stage, then animate the generated result indices. When using generated scene keyframes and each clip should begin and end on its own scene image for stitching, call animate_photo with frameRole="both" and sourceImageIndices=[start..end] but OMIT endImageIndex; do not set endImageIndex=-1 unless every source is the uploaded image. (B) PER-CLIP CONTENT — when each clip has DIFFERENT dialogue, jokes, narration, or motion (e.g. "4 videos where each tells a different joke"), pass BOTH sourceImageIndices AND `prompts` (an array of N strings, one per clip) in the same single call. Each prompt must independently anchor the visible characters, scene action, camera, audio, exact screenplay-style speaker tags, and exact quoted dialogue for that segment. If you just wrote or displayed a script/table, copy the exact dialogue lines into the corresponding per-clip prompts; do not summarize them as speech activity. If using named speaker tags with any multi-person reference image or generated scene keyframe, include one explicit cast map in each prompt that binds each name to visible position, clothing, and props/actions, e.g. SPEAKER_A = left person holding a prop; SPEAKER_B = center person with tablet; SPEAKER_C = right person near table. Do not also describe the same people again as generic man/boy/girl/woman/character subjects. For screenplay, storyboard, commercial, series, or other longer-form tasks with recurring characters, preserve the same character names and repeated visual anchors in every per-clip prompt where each character appears. The fan-out launches all N projects in parallel with their respective per-clip prompts. Use the standard single-source path (numberOfVariations only) when the user wants motion variety from a single fixed frame instead.',
7
+ description: 'Animate a photo into video with motion, audio, and dialogue using LTX 2.3 or WAN 2.2. Do NOT use this tool for seedance2 or seedance2-fast. Seedance 2.0 media references must go through generate_video with referenceImageIndices/referenceVideoIndices/referenceAudioIndices and @Image/@Video/@Audio role text in the prompt; for seamless-loop Seedance requests with one uploaded image, the prompt should anchor it as both the first frame and last frame. LTX/WAN NOTE: uploaded audio files are not loose references for ltx23/wan22; use sound_to_video when uploaded audio is the primary sync target. DANCE REQUESTS ("make them dance", "do the X dance"): use dance_montage — NOT this tool. LTX 2.3 generates audio natively — describe dialogue and ambient sounds directly in the prompt (do NOT pre-generate audio for this tool). If the user provides exact speech, include it in double quotes; if they only imply speech, describe the performance and voice without inventing quoted words. Avoid placeholders such as "while speaking", "dialogue begins", "explaining", or "final line lands". PERSONA VOICE: Only when the user explicitly asks to use/clone a registered persona voice clip, call resolve_personas first, then set voicePersonaName to select which persona\'s voice clip to use. Do not set voicePersonaName for ordinary character dialogue or inferred voices; describe those voices in the prompt for native LTX audio. For cross-persona narration (e.g. David narrates a video of Aleyna), resolve both personas and set voicePersonaName to the narrator only if that registered voice was requested. Persona voice requires ltx23 because WAN 2.2 does not support voice identity. PERSONA PIPELINE: For persona videos, ensure an image of the persona exists before calling animate_photo. The standard pipeline is: resolve_personas → edit_image → animate_photo. If a suitable persona image already exists (user uploaded one, a prior edit_image/generate_image result, OR the user explicitly says to use the Persona image/reference photo directly), skip edit_image and animate directly. After resolve_personas, this tool can animate the injected persona image directly when that explicit direct-use instruction is given. Auto-uses the latest result image (from any prior tool) unless sourceImageIndex is set. Supports start-frame (default), end-frame, and start+end interpolation modes for LTX/WAN — ask the user which frame role their image should play if they mention "end frame", "last frame", or provide two images. FIRST+LAST FRAME WORKFLOW: When the user wants a non-Seedance video using two different scenes as start and end frames, prefer generating both images in a single generate_image/edit_image call with numberOfVariations=2 and Dynamic Prompts, then call animate_photo with frameRole="both", sourceImageIndex=0, endImageIndex=1. If the user explicitly wants separately created frame assets, preserve that staged instruction while keeping indices correct. In frameRole="both", the handler automatically inspects both images and upgrades the base prompt into a scene-aware smooth transition prompt, so your prompt should state the desired transition style, action, dialogue, and audio rather than trying to list every visible object. If the request is vague, analyze the image first and suggest 2-3 specific animation ideas tailored to what you see. Call once you have clear creative intent. N-VIDEOS PATTERN: Avoid sequential animate_photo calls for N outputs. For a single fixed source/end frame where only prompt text varies, use sourceImageIndex + numberOfVariations=N + one Dynamic Prompt branch in prompt so Sogni submits one project with multiple jobs. Use sourceImageIndices/prompts for multi-segment stitched non-Seedance video, different source/end assets, different audio windows, different durations/dimensions, isolated retry lifecycle, or other per-output parameters. sourceImageIndices supports up to 16 entries; there is NO 3-clip cap, so do not split one planned batch into "first 3" and "remaining" calls. For a dialogue-heavy total-duration request with no explicit per-clip duration, prefer 15-second clips on ltx23 (30s total = 2 clips × 15s) and 10-second clips on wan22 (60s total on wan22 = 6 clips × 10s; do NOT pick 4 clips × 15s on wan22 — the wan22 worker rejects clips longer than 10s). Multi-source flavors: (A) SHARED CONTENT — when all N clips have the same dialogue/motion but different source visuals (different scenes, outfits, environments, persona looks), first generate N distinct images via ONE edit_image/generate_image call with numberOfVariations=N + Dynamic Prompts {|}, then call animate_photo with sourceImageIndices=[start..start+N-1] and a single shared `prompt`. If all segments intentionally reuse the primary uploaded image instead of generated source images, use sourceImageIndices=[-1,-1,...] with one -1 per segment. For a long or multi-segment video from a single supplied/uploaded image WITHOUT a requested image/keyframe/version generation stage, use sourceImageIndices=[-1,-1,...] and per-clip prompts. Only set frameRole="both" and endImageIndex=-1 when the user explicitly says the same uploaded/source/original image should be both the first and last frame of every segment. If the user requests generated source images first, honor that image stage, then animate the generated result indices. When using generated scene keyframes and each clip should begin and end on its own scene image for stitching, call animate_photo with frameRole="both" and sourceImageIndices=[start..end] but OMIT endImageIndex; do not set endImageIndex=-1 unless every source is the uploaded image. (B) PER-CLIP CONTENT — when source/end asset wiring or other per-output parameters differ, pass BOTH sourceImageIndices AND `prompts` (an array of N strings, one per clip) in the same single call. Each prompt must independently anchor the visible characters, scene action, camera, audio, exact screenplay-style speaker tags, and exact quoted dialogue for that segment. If you just wrote or displayed a script/table, copy the exact dialogue lines into the corresponding per-clip prompts; do not summarize them as speech activity. If using named speaker tags with any multi-person reference image or generated scene keyframe, include one explicit cast map in each prompt that binds each name to visible position, clothing, and props/actions, e.g. SPEAKER_A = left person holding a prop; SPEAKER_B = center person with tablet; SPEAKER_C = right person near table. Do not also describe the same people again as generic man/boy/girl/woman/character subjects. For screenplay, storyboard, commercial, series, or other longer-form tasks with recurring characters, preserve the same character names and repeated visual anchors in every per-clip prompt where each character appears. Use the standard single-source path (numberOfVariations only) when the user wants motion variety from a single fixed frame.',
8
8
  parameters: {
9
9
  type: "object",
10
10
  properties: {
@@ -38,7 +38,7 @@ AVOID: Re-describing the image, vague prompts, too many actions at once, abstrac
38
38
 
39
39
  WAN 2.2 ("wan22"): 30-150 words, subtle natural movements.
40
40
 
41
- BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary motion, camera, or atmosphere while preserving the user's specified elements. Example: "{gentle sway with soft birdsong|dramatic zoom with rolling thunder|slow pan with ambient music}".`,
41
+ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary motion, camera, or atmosphere while preserving the user's specified elements. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same source/end frames and generation parameters and only prompt text varies. Example: "{gentle sway with soft birdsong|dramatic zoom with rolling thunder|slow pan with ambient music}".`,
42
42
  },
43
43
  expandPrompt: {
44
44
  type: "boolean",
@@ -74,18 +74,18 @@ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary
74
74
  items: { type: "number" },
75
75
  minItems: 1,
76
76
  maxItems: 16,
77
- description: 'Array of source frame indices — one video is generated per entry as its own SDK project, all running in PARALLEL. Use 0-based non-negative result indices for generated images. Use negative indices for uploaded images: -1 = first/primary upload, -2 = second upload, -3 = third upload, etc. Repeating -1 is allowed and is REQUIRED for multi-segment videos that reuse the same uploaded image as every segment\'s start frame. By default all projects share the `prompt`/`voice`/`duration`, but you can pass `prompts` (array) to give each clip its own dialogue/motion. ALWAYS use this for non-Seedance "N videos" or multi-segment request — never call animate_photo N times sequentially. Do NOT combine with `numberOfVariations` or `sourceImageIndex`. Use frameRole="end" with sourceImageIndices only when the user explicitly says the repeated uploaded/generated image is the last/end frame for each clip and no first/start frame should be supplied; in that case omit endImageIndex/endImageIndices because each sourceImageIndices entry is the end frame. You MAY combine with frameRole="both" when clips need start and end frames. For adjacent transition chains across generated images, use sourceImageIndices=[start..end-1] and endImageIndices=[start+1..end] so N images produce N-1 transition clips. If the uploaded/original image starts the chain and generated results are the remaining frames, use sourceImageIndices=[-1,start..end-1] and endImageIndices=[start..end]. If the user supplies multiple uploaded images as the actual keyframe sequence, use adjacent negative uploaded indices, e.g. 5 uploaded images become sourceImageIndices=[-1,-2,-3,-4], endImageIndices=[-2,-3,-4,-5], frameRole="both", prompts length 4, then stitch_video. If the user specifies transition motion, camera behavior, actions, dialogue, or audio, copy those instructions into every corresponding per-clip prompt; only invent a generic smooth transition when the user does not specify one. If the user asks for a seamless loop or final transition from the last image back to the first, close the chain by including the last image as a source and the first image as the final end frame, e.g. 5 uploaded images become sourceImageIndices=[-1,-2,-3,-4,-5], endImageIndices=[-2,-3,-4,-5,-1]. For generated scene keyframes that should each loop to themselves, omit endImageIndex/endImageIndices so each source image is also its own end frame. Set endImageIndex=-1 only when every sourceImageIndices entry is also -1 and every segment reuses the first uploaded image. Range: 1–16 indices. For generated image batches, values MUST be read from the latest edit_image/generate_image tool result\'s `startIndex` field. If startIndex=3 and 4 images were generated in that batch, pass `[3,4,5,6]` (NOT `[0,1,2,3]`). Do NOT assume generated indices start at 0 — they don\'t if there are prior results in the conversation.',
77
+ description: 'Array of source frame indices — one video is generated per entry as its own SDK project, all running in PARALLEL. Use this when outcomes need different source images, different end frames, isolated retry lifecycle, or other per-clip asset wiring/parameters. If every outcome uses the same source/end frames and only prompt text differs, prefer sourceImageIndex with numberOfVariations=N and one Dynamic Prompt branch in `prompt` so Sogni creates one project with multiple jobs. Use 0-based non-negative result indices for generated images. Use negative indices for uploaded images: -1 = first/primary upload, -2 = second upload, -3 = third upload, etc. Repeating -1 is allowed for true multi-project workflows that intentionally reuse the same uploaded image while varying per-clip assets or parameters. By default all projects share the `prompt`/`voice`/`duration`, but you can pass `prompts` (array) to give each clip its own dialogue/motion when multi-project fan-out is required. Avoid sequential animate_photo calls for N outputs. Do NOT combine with `numberOfVariations` or `sourceImageIndex`. Use frameRole="end" with sourceImageIndices only when the user explicitly says the repeated uploaded/generated image is the last/end frame for each clip and no first/start frame should be supplied; in that case omit endImageIndex/endImageIndices because each sourceImageIndices entry is the end frame. You MAY combine with frameRole="both" when clips need start and end frames. For adjacent transition chains across generated images, use sourceImageIndices=[start..end-1] and endImageIndices=[start+1..end] so N images produce N-1 transition clips. If the uploaded/original image starts the chain and generated results are the remaining frames, use sourceImageIndices=[-1,start..end-1] and endImageIndices=[start..end]. If the user supplies multiple uploaded images as the actual keyframe sequence, use adjacent negative uploaded indices, e.g. 5 uploaded images become sourceImageIndices=[-1,-2,-3,-4], endImageIndices=[-2,-3,-4,-5], frameRole="both", prompts length 4, then stitch_video. If the user specifies transition motion, camera behavior, actions, dialogue, or audio, copy those instructions into every corresponding per-clip prompt; only invent a generic smooth transition when the user does not specify one. If the user asks for a seamless loop or final transition from the last image back to the first, close the chain by including the last image as a source and the first image as the final end frame, e.g. 5 uploaded images become sourceImageIndices=[-1,-2,-3,-4,-5], endImageIndices=[-2,-3,-4,-5,-1]. For generated scene keyframes that should each loop to themselves, omit endImageIndex/endImageIndices so each source image is also its own end frame. Set endImageIndex=-1 only when every sourceImageIndices entry is also -1 and every segment reuses the first uploaded image. Range: 1–16 indices. For generated image batches, values MUST be read from the latest edit_image/generate_image tool result\'s `startIndex` field. If startIndex=3 and 4 images were generated in that batch, pass `[3,4,5,6]` (NOT `[0,1,2,3]`). Do NOT assume generated indices start at 0 — they don\'t if there are prior results in the conversation.',
78
78
  },
79
79
  prompts: {
80
80
  type: "array",
81
81
  items: { type: "string" },
82
82
  minItems: 1,
83
83
  maxItems: 16,
84
- description: 'Per-clip prompts for fan-out — use when the user wants DIFFERENT dialogue, jokes, narration, or motion in each video. MUST be paired with `sourceImageIndices` and have the SAME length. Each entry is the full prompt for the corresponding source image. If a clip has speech, include exact spoken words in double quotes with stable speaker tags; do NOT write placeholders like "while speaking", "dialogue begins", "explaining", or "final line lands". If you just wrote a script/table/storyboard, copy that clip\'s exact dialogue into this prompt. When named speakers appear in a multi-person reference image or generated keyframe, start each entry with one compact cast map that binds names to visible anchors before dialogue, e.g. Cast map: SPEAKER_A is the left person holding the prop; SPEAKER_B is the center person with the tablet; SPEAKER_C is the right person near the table. Then move directly into action/dialogue; do not describe those same people again as generic man/boy/girl/woman/character subjects. This prevents speaker tags from being assigned to the wrong visible character. When set, the top-level `prompt` parameter is ignored (still required by the schema — just pass any descriptive string, e.g. a brief summary of the batch). Example: 4 source images of a couple, "make each video have a different joke" → sourceImageIndices=[0,1,2,3], prompts=["Cast map: She is the left woman in the blue dress; He is the right man in the gray jacket. She says: \\"Why did the scarecrow win an award?\\" He grins.", "Cast map: He is the right man in the gray jacket; She is the left woman in the blue dress. He says: \\"Because he was outstanding in his field!\\" She laughs.", "...", "..."]. Omit this when all clips share the same dialogue/motion (visual variety only) — fan-out will use the shared `prompt` for every clip.',
84
+ description: 'Per-clip prompts for multi-project fan-out — use when each output needs different source/end assets, isolated retry lifecycle, or other per-clip wiring/parameters. If all outputs share the same source/end frames and only prompt text differs, put the full per-output prompts in ONE Dynamic Prompt branch in `prompt` and set numberOfVariations=N instead. When this field is required, it MUST be paired with `sourceImageIndices` and have the SAME length. Each entry is the full prompt for the corresponding source image. If a clip has speech, include exact spoken words in double quotes with stable speaker tags; do NOT write placeholders like "while speaking", "dialogue begins", "explaining", or "final line lands". If you just wrote a script/table/storyboard, copy that clip\'s exact dialogue into this prompt. When named speakers appear in a multi-person reference image or generated keyframe, start each entry with one compact cast map that binds names to visible anchors before dialogue, e.g. Cast map: SPEAKER_A is the left person holding the prop; SPEAKER_B is the center person with the tablet; SPEAKER_C is the right person near the table. Then move directly into action/dialogue; do not describe those same people again as generic man/boy/girl/woman/character subjects. This prevents speaker tags from being assigned to the wrong visible character. When set, the top-level `prompt` parameter is ignored (still required by the schema — just pass any descriptive string, e.g. a brief summary of the batch). Example: 4 source images of a couple, "make each video have a different joke" → sourceImageIndices=[0,1,2,3], prompts=["Cast map: She is the left woman in the blue dress; He is the right man in the gray jacket. She says: \\"Why did the scarecrow win an award?\\" He grins.", "Cast map: He is the right man in the gray jacket; She is the left woman in the blue dress. He says: \\"Because he was outstanding in his field!\\" She laughs.", "...", "..."]. Omit this whenever the same source/end assets and parameters can be represented as one Dynamic Prompt batch.',
85
85
  },
86
86
  numberOfVariations: {
87
87
  type: "number",
88
- description: "Number of variations (1-16). Use 1 unless user explicitly requests multiple separate video outputs.",
88
+ description: "Number of variations (1-16). Use this with one Dynamic Prompt branch when the user explicitly requests multiple prompt-only takes from the same source/end frames. This creates one Sogni project with multiple jobs. Use 1 unless the user explicitly requests multiple separate video outputs; use sourceImageIndices/prompts instead only when assets or parameters differ per output.",
89
89
  minimum: 1,
90
90
  maximum: 16,
91
91
  },
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/animate-photo/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gDAAgD,EAChD,6BAA6B,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,upNAAupN;QACzpN,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;2QA0B4O;iBAClQ;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,4GAA4G;iBAC/G;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,SAAS;oBACf,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d,WAAW,EACT,ykBAAykB;iBAC5kB;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,EAAE;oBACZ,WAAW,EACT,whCAAwhC;iBAC3hC;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,mjBAAmjB;iBACtjB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/animate-photo/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gDAAgD,EAChD,6BAA6B,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,eAAe;QACrB,WAAW,EACT,qxNAAqxN;QACvxN,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;+aA0BgZ;iBACta;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,4GAA4G;iBAC/G;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,gDAAgD;iBAC9D;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;oBACxB,WAAW,EACT,urBAAurB;iBAC1rB;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4KAA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BAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,mjBAAmjB;iBACtjB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
@@ -4,7 +4,7 @@ export const definition = {
4
4
  type: 'function',
5
5
  function: {
6
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.',
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, persona image creation, and 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. Use this instead of generate_image when persona photos or uploaded image assets are meant to be reused 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; generate_image has no access to the upload. For direct edits (remove objects, enhance), use restore_photo or refine_result unless the user explicitly requested Z-image.',
8
8
  parameters: {
9
9
  type: 'object',
10
10
  properties: {
@@ -49,7 +49,7 @@ FAILURE MODES TO AVOID:
49
49
 
50
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
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.
52
+ BATCH VARIATIONS: When numberOfVariations > 1, the prompt describes one output image. Do not mention counts, "versions", "different", or "multiple" in the prompt text unless the user explicitly wants those words visible in the image. Do not describe multiple copies or duplicates of the subject in a single image unless the user asked for a grid, collage, or side-by-side composition. Use Dynamic Prompt syntax to vary one dimension across separate images. For personas: vary scene, activity, expression, or environment; preserve 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
53
 
54
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
55
 
@@ -87,7 +87,7 @@ COMPOSITE GPT IMAGE 2 STORYBOARD SHEETS: When numberOfVariations=1 and the user
87
87
  },
88
88
  numberOfVariations: {
89
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.',
90
+ description: 'Number of variations (1-16). Pass the user\'s exact requested count in one call when the outputs can share project settings. "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. Use separate calls only when the user explicitly wants independent projects, isolated approvals, or per-output settings that cannot share one project. For screenplay/storyboard batches, the prompt should contain one Dynamic Prompt branch with one full scene prompt per scene; do not set numberOfVariations=N with only scene 1\'s prompt. Use 1 unless the user explicitly asks for multiple. Default: 1.',
91
91
  minimum: 1,
92
92
  maximum: 16,
93
93
  },
@@ -1 +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;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CAAC"}
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,iiCAAiiC;QACniC,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,wrBAAwrB;oBAC1rB,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"}
@@ -14,7 +14,7 @@ export const definition = {
14
14
 
15
15
  ${LITERAL_PROMPT_OVERRIDE}
16
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.
17
+ PROMPT ORDER (follow this structure by default): [SUBJECT] → [ATTRIBUTES] → [ACTION/POSE] → [CAMERA/FRAMING] → [ENVIRONMENT] → [LIGHTING] → [STYLE/MEDIUM] → [MATERIALS/TEXTURES] → [SECONDARY DETAILS]. Lead with the main subject and its concrete, observable attributes unless the user explicitly asks for mood, atmosphere, or another prompt shape first. Put the most visually decisive details early.
18
18
 
19
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
20
 
@@ -24,13 +24,13 @@ AVOID: Starting with abstract mood words alone. Burying the subject after a long
24
24
 
25
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
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.
27
+ BATCH VARIATIONS: When numberOfVariations > 1, the prompt describes one output image. Do not mention counts, "versions", "different", or "multiple" in the prompt text unless the user explicitly wants those words visible in the image. Do not describe multiple copies or duplicates of the subject in a single image unless the user asked for a collage, grid, or side-by-side composition. 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; preserve what the user specified. Preserve any requested orientation, aspect ratio, or exact pixel dimensions across every variation.
28
28
 
29
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
30
 
31
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
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.
33
+ SCREENPLAY / STORYBOARD BATCHES: For multi-scene commercials, storyboards, or shot lists, numberOfVariations should equal the scene count and the prompt should 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." Do not 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, keep it in one call unless the user explicitly asks for separate projects or per-output settings require separate calls.
34
34
 
35
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
36
 
@@ -58,7 +58,7 @@ VIDEO KEYFRAMES: When generating images intended as first+last frames for video
58
58
  },
59
59
  numberOfVariations: {
60
60
  type: 'number',
61
- description: 'Number of variations (1-16). Set to the user\'s exact requested count in ONE call whenever they ask for multiple images. Trigger phrasings: "draw N", "make N", "give me N", "show me N", "render N", "create N", "generate N", "N more", "another N", "N as separate", "N separate images", "N different images", "N options", "N takes", "N versions", "N variations", "N pictures of", "all at the same time", "in parallel", "side by side as separate". This includes selection-gated image batches that will feed a later dance, animation, or video after the user picks one. NEVER split into multiple serial generate_image calls to make N images one at a time. If the user previously got a composite "N subjects in one image" result and now says "draw N more as separate images" / "as separate" / "separately", set numberOfVariations=N for THIS call — the prior call\'s numberOfVariations does NOT carry forward when the user explicitly asks for separation. 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 ONLY when the user clearly wants a single composite image (e.g. "draw 2 goats in a meadow" with no separation language, or explicit "in one image" / "single image" / "composite" / "sheet").',
61
+ description: 'Number of variations (1-16). Set to the user\'s exact requested count in one call whenever they ask for multiple images and the outputs can share project settings. Trigger phrasings: "draw N", "make N", "give me N", "show me N", "render N", "create N", "generate N", "N more", "another N", "N as separate", "N separate images", "N different images", "N options", "N takes", "N versions", "N variations", "N pictures of", "all at the same time", "in parallel", "side by side as separate". This includes selection-gated image batches that will feed a later dance, animation, or video after the user picks one. Avoid multiple serial generate_image calls unless the user explicitly wants separate projects, isolated approvals, or per-output settings that cannot share one project. If the user previously got a composite "N subjects in one image" result and now says "draw N more as separate images" / "as separate" / "separately", set numberOfVariations=N for THIS call — the prior call\'s numberOfVariations does not carry forward when the user explicitly asks for separation. For screenplay/storyboard batches, this should equal the scene count and the prompt should contain one Dynamic Prompt branch with one full scene prompt per scene; do not set numberOfVariations=N with only one scene prompt. Default: 1 when the user clearly wants a single composite image (e.g. "draw 2 goats in a meadow" with no separation language, or explicit "in one image" / "single image" / "composite" / "sheet").',
62
62
  minimum: 1,
63
63
  maximum: 16,
64
64
  },
@@ -1 +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,m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,CAAC;SACrB;KACF;CACF,CAAC"}
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,s9CAAs9C;oBACx9C,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"}
@@ -26,7 +26,7 @@ Include:
26
26
  - Instruments (piano, guitar, drums, synth, strings, etc.)
27
27
  - Style descriptors (driving, mellow, atmospheric, punchy, etc.)
28
28
 
29
- BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary ONE dimension across separate tracks. Lock in any genre/mood/instruments the user specified, vary the rest. Example: "{lo-fi hip hop beat with muted keys|jazz piano trio with brushed drums|ambient electronic with soft pads} with warm reverb and vinyl texture".`,
29
+ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary ONE dimension across separate tracks. This is one Sogni project with multiple jobs, so prefer it when all tracks share the same duration, BPM, key, lyrics, model, and generation parameters and only prompt text varies. Lock in any genre/mood/instruments the user specified, vary the rest. Example: "{lo-fi hip hop beat with muted keys|jazz piano trio with brushed drums|ambient electronic with soft pads} with warm reverb and vinyl texture".`,
30
30
  },
31
31
  duration: {
32
32
  type: 'number',
@@ -60,7 +60,7 @@ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary
60
60
  },
61
61
  numberOfVariations: {
62
62
  type: 'number',
63
- description: 'Number of variations (1-16). Use 1 unless user requests multiple. Default: 1.',
63
+ description: 'Number of variations (1-16). Use with one Dynamic Prompt branch when the user requests multiple prompt-only music variations that share the same duration, BPM, key, lyrics, model, and parameters. This creates one Sogni project with multiple jobs. Default: 1.',
64
64
  minimum: 1,
65
65
  maximum: 16,
66
66
  },
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-music/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAErF,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,2OAA2O;QAC7O,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;;;;sVAe6T;iBAC7U;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4HAA4H;oBAC9H,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,GAAG;iBACb;gBACD,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sJAAsJ;oBACxJ,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,GAAG;iBACb;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iOAAiO;iBACpO;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4OAA4O;iBAC/O;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC;oBACtB,WAAW,EACT,mWAAmW;iBACtW;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBAClB,WAAW,EACT,2JAA2J;iBAC9J;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+EAA+E;oBACjF,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-music/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAErF,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,2OAA2O;QAC7O,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,uBAAuB;;;;;;;;;;;;;;;0gBAeif;iBACjgB;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4HAA4H;oBAC9H,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,GAAG;iBACb;gBACD,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,sJAAsJ;oBACxJ,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,GAAG;iBACb;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iOAAiO;iBACpO;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4OAA4O;iBAC/O;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC;oBACtB,WAAW,EACT,mWAAmW;iBACtW;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;oBAClB,WAAW,EACT,2JAA2J;iBAC9J;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oQAAoQ;oBACtQ,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
@@ -38,7 +38,7 @@ For complex/creative scenes (characters, dialogue, skits): capture the full crea
38
38
 
39
39
  AVOID: Vague prompts, too many characters at once, conflicting lighting logic, readable text or logos, abstract emotions with no visible behavior, rigid numeric constraints (exact angles, counts, speeds).
40
40
 
41
- BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax. Lock in any camera/subject/style the user specified, vary the rest. Example: "slow dolly in on a city street {at dawn with golden light|during a rainstorm|at night with neon reflections}".`,
41
+ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same references, model, duration, dimensions, and generation parameters and only prompt text varies. Lock in any camera/subject/style the user specified, vary the rest. Example: "slow dolly in on a city street {at dawn with golden light|during a rainstorm|at night with neon reflections}".`,
42
42
  },
43
43
  expandPrompt: {
44
44
  type: "boolean",
@@ -97,7 +97,7 @@ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax. Lock i
97
97
  },
98
98
  numberOfVariations: {
99
99
  type: "number",
100
- description: "Number of variations (1-16). Use 1 unless user explicitly requests multiple separate video outputs. For Seedance, default to 1 because each variation is an expensive separate render.",
100
+ description: "Number of variations (1-16). Use with one Dynamic Prompt branch for multiple prompt-only takes that share the same references, model, duration, dimensions, and parameters. This creates one Sogni project with multiple jobs. Use 1 unless the user explicitly requests multiple separate video outputs. For Seedance, default to 1 unless the user explicitly requests separate outputs.",
101
101
  minimum: 1,
102
102
  maximum: 16,
103
103
  },
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-video/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,iDAAiD,EACjD,6BAA6B,EAC7B,kCAAkC,EAClC,2CAA2C,GAC5C,MAAM,yCAAyC,CAAC;AACjD,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,m1IAAm1I;QACr1I,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;uQA0BwO;iBAC9P;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,kCAAkC;iBAChD;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,iDAAiD;iBAC/D;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,8GAA8G;oBAChH,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,cA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ACjkB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/generate-video/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,iDAAiD,EACjD,6BAA6B,EAC7B,kCAAkC,EAClC,2CAA2C,GAC5C,MAAM,yCAAyC,CAAC;AACjD,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,m1IAAm1I;QACr1I,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;kcA0Bma;iBACzb;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,kCAAkC;iBAChD;gBACD,oBAAoB,EAAE;oBACpB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,iDAAiD;iBAC/D;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,8GAA8G;oBAChH,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,0PAA0P;iBAC7P;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,CAAC;oBACvD,WAAW,EACT,i+BAAi+B;wBACj+B,2CAA2C;iBAC9C;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,oKAAoK;iBACvK;gBACD,qBAAqB,EAAE;oBACrB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EACT,w0BAAw0B;iBAC30B;gBACD,qBAAqB,EAAE;oBACrB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EACT,mfAAmf;iBACtf;gBACD,qBAAqB,EAAE;oBACrB,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EACT,6sBAA6sB;iBAChtB;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,i/BAAi/B;iBACp/B;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,urBAAurB;iBAC1rB;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,kyBAAkyB;iBACryB;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4XAA4X;oBAC9X,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wBAAwB;iBACtC;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,8jBAA8jB;iBACjkB;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
@@ -30,7 +30,7 @@ LTX VOCABULARY: camera (tracking, dolly, pan, tilt, handheld, static frame), lig
30
30
 
31
31
  AVOID: Vague prompts, too many competing visual elements, abstract descriptions without visible behavior, rigid numeric constraints, readable text or logos. QUOTING RULE: ONLY use double quotes for spoken dialogue. Never quote on-screen text, overlay text, titles, captions, signs, or any visual text — describe them without quotes.
32
32
 
33
- BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary the visual interpretation while keeping audio sync intent consistent. Example: "{abstract neon visualization|nature scene with swaying trees|urban street with rain} synced to the beat".`,
33
+ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary the visual interpretation while keeping audio sync intent consistent. This is one Sogni project with multiple jobs, so prefer it when all outputs share the same audio source/window, image source, model, duration, dimensions, and parameters and only prompt text varies. Example: "{abstract neon visualization|nature scene with swaying trees|urban street with rain} synced to the beat".`,
34
34
  },
35
35
  expandPrompt: {
36
36
  type: "boolean",
@@ -68,7 +68,7 @@ BATCH VARIATIONS: When numberOfVariations > 1, use Dynamic Prompt syntax to vary
68
68
  },
69
69
  numberOfVariations: {
70
70
  type: "number",
71
- description: "Number of video variations to generate (1-16). Default: 1.",
71
+ description: "Number of video variations to generate (1-16). Use with one Dynamic Prompt branch when all variations share the same audio source/window, image source, model, duration, dimensions, and parameters and only prompt text varies. This creates one Sogni project with multiple jobs. Default: 1.",
72
72
  minimum: 1,
73
73
  maximum: 16,
74
74
  },
@@ -1 +1 @@
1
- {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/sound-to-video/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,yCAAyC,CAAC;AACjD,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,onDAAonD;QACtnD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;;EAErB,gCAAgC;;;;;;;;;;;;;;;;;;2QAkByO;iBAClQ;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,kCAAkC;iBAChD;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,yPAAyP;iBAC5P;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,0OAA0O;iBAC7O;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,+OAA+O;oBACjP,OAAO,EAAE,CAAC;iBACX;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,qNAAqN;oBACvN,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,CAAC;oBAC3E,WAAW,EACT,23BAA23B;wBAC33B,sCAAsC;wBACtC,4DAA4D;iBAC/D;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,wMAAwM;iBAC3M;gBACD,kBAAkB,EAAE;oBAClB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,4DAA4D;oBAC9D,OAAO,EAAE,CAAC;oBACV,OAAO,EAAE,EAAE;iBACZ;gBACD,gBAAgB,EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,6YAA6Y;iBAChZ;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wBAAwB;iBACtC;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../src/tools/definitions/sound-to-video/definition.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,yCAAyC,CAAC;AACjD,OAA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EAAE;oBAChB,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,6YAA6Y;iBAChZ;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wBAAwB;iBACtC;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC"}
@@ -12,7 +12,7 @@ export * from './shared/visionDescriptionCache.js';
12
12
  export * from './shared/downloadFilename.js';
13
13
  export { addSubtitlesDefinition, animatePhotoDefinition, applyStyleDefinition, changeAngleDefinition, danceMontageDefinition, editImageDefinition, extendVideoDefinition, generateImageDefinition, generateMusicDefinition, generateVideoDefinition, generationToolDefinitions, orbitVideoDefinition, overlayVideoDefinition, refineResultDefinition, replaceVideoSegmentDefinition, restorePhotoDefinition, soundToVideoDefinition, stitchVideoDefinition, videoToVideoDefinition, OVERLAY_POSITIONS, STITCH_TRANSITION_TYPES, SUBTITLE_VERTICAL_POSITIONS, DANCE_PRESETS, resolveDancePresetForRequest, } from './definitions/index.js';
14
14
  export { isToolResultErr, isToolResultOk, mapLegacyToolErrorCategory, toolErr, toolOk, } from './result.js';
15
- export { expandSingleSourceFanOutForPerClipPrompts } from './normalizeArgs.js';
15
+ export { collapseSingleSourceFanOutToDynamicPromptVariations, expandSingleSourceFanOutForPerClipPrompts, } from './normalizeArgs.js';
16
16
  export { extractDynamicPromptBranches, isolateDynamicPromptSlot, buildDynamicPromptSlotPrompts, validateSceneDynamicPromptBatch, validateSingleDynamicPromptBranch, promptHasStoryboardBatchLanguage, promptHasLinkedVariantBatchLanguage, isStoryboardKeyframeBatchPrompt, } from './shared/dynamicPromptBranches.js';
17
17
  export { textExplicitlyRequestsMultipleImageOutputs } from './shared/multiImageIntent.js';
18
18
  export { maybeAlignNumberOfVariationsToDynamicBranchCount } from './shared/numberOfVariationsAlignment.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO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AM,8BAA8B,CAAC;AAC1F,OAAO,EAAE,gDAAgD,EAAE,MAAM,yCAAyC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EACL,aAAa,EACb,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAKzC,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAMxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,aAAa,EACb,4BAA4B,GAC7B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,eAAe,EACf,cAAc,EACd,0BAA0B,EAC1B,OAAO,EACP,MAAM,GACP,MAAM,aAAa,CAAC;AAUrB,OAAO,EACL,mDAAmD,EACnD,yCAAyC,GAC1C,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,4BAA4B,E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