@sogni-ai/sogni-protocol 1.0.0-alpha.2

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 (86) hide show
  1. package/README.md +80 -0
  2. package/catalogs/audio-models.json +34 -0
  3. package/catalogs/quality-presets.json +30 -0
  4. package/enums/chat-run-status.json +12 -0
  5. package/enums/chat-run-waiting-reasons.json +10 -0
  6. package/enums/token-types.json +7 -0
  7. package/enums/tool-names.json +85 -0
  8. package/manifests/app-tools.json +297 -0
  9. package/manifests/composition-tools.json +228 -0
  10. package/manifests/generation-tools.json +1263 -0
  11. package/manifests/openai-tools.json +1818 -0
  12. package/package.json +44 -0
  13. package/prompts/tools/add_subtitles.json +12 -0
  14. package/prompts/tools/analyze_image.json +12 -0
  15. package/prompts/tools/analyze_video.json +11 -0
  16. package/prompts/tools/animate_photo.json +13 -0
  17. package/prompts/tools/apply_style.json +11 -0
  18. package/prompts/tools/ask_clarifying_question.json +10 -0
  19. package/prompts/tools/change_angle.json +11 -0
  20. package/prompts/tools/compose_instrumental.json +11 -0
  21. package/prompts/tools/compose_lyrics.json +12 -0
  22. package/prompts/tools/compose_script.json +21 -0
  23. package/prompts/tools/compose_workflow.json +17 -0
  24. package/prompts/tools/compose_workflow_template.json +23 -0
  25. package/prompts/tools/create_asset_manifest.json +9 -0
  26. package/prompts/tools/dance_montage.json +9 -0
  27. package/prompts/tools/edit_image.json +11 -0
  28. package/prompts/tools/enhance_prompt.json +20 -0
  29. package/prompts/tools/extend_video.json +11 -0
  30. package/prompts/tools/extract_metadata.json +9 -0
  31. package/prompts/tools/finalize_response.json +10 -0
  32. package/prompts/tools/generate_image.json +11 -0
  33. package/prompts/tools/generate_music.json +7 -0
  34. package/prompts/tools/generate_video.json +10 -0
  35. package/prompts/tools/inspect_asset.json +10 -0
  36. package/prompts/tools/label_asset.json +13 -0
  37. package/prompts/tools/manage_memory.json +12 -0
  38. package/prompts/tools/map_assets_for_model.json +9 -0
  39. package/prompts/tools/orbit_video.json +13 -0
  40. package/prompts/tools/overlay_video.json +10 -0
  41. package/prompts/tools/refine_result.json +11 -0
  42. package/prompts/tools/replace_video_segment.json +14 -0
  43. package/prompts/tools/resolve_personas.json +9 -0
  44. package/prompts/tools/restore_photo.json +12 -0
  45. package/prompts/tools/set_content_filter.json +9 -0
  46. package/prompts/tools/sound_to_video.json +9 -0
  47. package/prompts/tools/stitch_video.json +9 -0
  48. package/prompts/tools/validate_asset_references.json +10 -0
  49. package/prompts/tools/video_to_video.json +13 -0
  50. package/schemas/errors/error.schema.json +21 -0
  51. package/schemas/errors/repair-control.schema.json +40 -0
  52. package/schemas/events/artifact-reference.schema.json +22 -0
  53. package/schemas/events/progress-event.schema.json +28 -0
  54. package/schemas/events/workflow-event.schema.json +22 -0
  55. package/schemas/prompt-contract.schema.json +42 -0
  56. package/schemas/storyboards/storyboard-planning-contract.schema.json +108 -0
  57. package/schemas/tools/add_subtitles.schema.json +77 -0
  58. package/schemas/tools/animate_photo.schema.json +104 -0
  59. package/schemas/tools/apply_style.schema.json +37 -0
  60. package/schemas/tools/change_angle.schema.json +30 -0
  61. package/schemas/tools/compose_instrumental.schema.json +24 -0
  62. package/schemas/tools/compose_lyrics.schema.json +28 -0
  63. package/schemas/tools/compose_script.schema.json +68 -0
  64. package/schemas/tools/compose_workflow.schema.json +67 -0
  65. package/schemas/tools/compose_workflow_template.schema.json +156 -0
  66. package/schemas/tools/dance_montage.schema.json +47 -0
  67. package/schemas/tools/edit_image.schema.json +74 -0
  68. package/schemas/tools/enhance_prompt.schema.json +76 -0
  69. package/schemas/tools/extend_video.schema.json +42 -0
  70. package/schemas/tools/generate_image.schema.json +104 -0
  71. package/schemas/tools/generate_music.schema.json +62 -0
  72. package/schemas/tools/generate_video.schema.json +97 -0
  73. package/schemas/tools/manage_memory.schema.json +28 -0
  74. package/schemas/tools/orbit_video.schema.json +70 -0
  75. package/schemas/tools/overlay_video.schema.json +126 -0
  76. package/schemas/tools/refine_result.schema.json +43 -0
  77. package/schemas/tools/replace_video_segment.schema.json +60 -0
  78. package/schemas/tools/resolve_personas.schema.json +15 -0
  79. package/schemas/tools/restore_photo.schema.json +47 -0
  80. package/schemas/tools/set_content_filter.schema.json +14 -0
  81. package/schemas/tools/sound_to_video.schema.json +70 -0
  82. package/schemas/tools/stitch_video.schema.json +52 -0
  83. package/schemas/tools/video_to_video.schema.json +77 -0
  84. package/schemas/workflows/durable-workflow-run.schema.json +165 -0
  85. package/schemas/workflows/durable-workflow-step.schema.json +141 -0
  86. package/version.json +4 -0
@@ -0,0 +1,228 @@
1
+ {
2
+ "schemaRefs": {
3
+ "enhance_prompt": "../schemas/tools/enhance_prompt.schema.json",
4
+ "compose_lyrics": "../schemas/tools/compose_lyrics.schema.json",
5
+ "compose_instrumental": "../schemas/tools/compose_instrumental.schema.json",
6
+ "compose_script": "../schemas/tools/compose_script.schema.json",
7
+ "compose_workflow": "../schemas/tools/compose_workflow.schema.json",
8
+ "compose_workflow_template": "../schemas/tools/compose_workflow_template.schema.json"
9
+ },
10
+ "tools": [
11
+ {
12
+ "type": "function",
13
+ "function": {
14
+ "name": "enhance_prompt",
15
+ "description": "Enhance or adapt a source prompt into a model-ready image, video, music, or edit prompt. Use for prompt expansion and model-specific prompt preparation. Do not use for lyrics or full scripts.",
16
+ "parameters": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["prompt"],
20
+ "properties": {
21
+ "prompt": { "type": "string", "description": "The source prompt, rough idea, or prompt revision request to enhance." },
22
+ "target_output": { "type": "string", "enum": ["image_prompt", "video_prompt", "music_prompt", "edit_prompt", "model_prompt", "general_prompt"], "description": "The kind of prompt artifact to produce." },
23
+ "destination_model": { "type": "string", "description": "Optional destination model selector, such as seedance2, ltx23, wan22, flux2, gpt-image-2, or sdxl." },
24
+ "destination_tool": { "type": "string", "description": "Optional downstream generation tool, such as generate_image, edit_image, generate_video, animate_photo, sound_to_video, video_to_video, or generate_music." },
25
+ "prompting_type": { "type": "string", "enum": ["flux", "sdxl", "sd15", "pony", "fast", "sd3", "editing", "video"], "description": "Optional image-prompting family when producing an image prompt." },
26
+ "model_title": { "type": "string", "description": "Optional human-readable target model name for image prompt guidance." },
27
+ "style_prompt": { "type": "string", "description": "Optional current style, brand, or prompt context to complement without repeating." },
28
+ "prompt_mode": { "type": "string", "enum": ["auto", "preserve", "expand", "compress", "validate", "payload"], "description": "Optional model prompt adaptation mode." },
29
+ "duration_seconds": { "type": "number", "minimum": 1, "maximum": 300, "description": "Requested runtime when enhancing a video or music prompt." },
30
+ "aspect_ratio": { "type": "string", "description": "Optional target aspect ratio, such as 16:9, 9:16, 1:1, 4:5, or 21:9." },
31
+ "assets": {
32
+ "type": "array",
33
+ "maxItems": 12,
34
+ "description": "Optional available assets the enhanced prompt may reference.",
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["media_type"],
39
+ "properties": {
40
+ "id": { "type": "string" },
41
+ "label": { "type": "string" },
42
+ "media_type": { "type": "string", "enum": ["image", "video", "audio"] },
43
+ "role": { "type": "string", "enum": ["first_frame", "last_frame", "reference", "identity", "style", "motion", "audio", "source_video"] },
44
+ "url": { "type": "string" }
45
+ }
46
+ }
47
+ },
48
+ "constraints": { "type": "object", "description": "Optional production, brand, model, or user constraints to preserve." }
49
+ }
50
+ }
51
+ }
52
+ },
53
+ {
54
+ "type": "function",
55
+ "function": {
56
+ "name": "compose_lyrics",
57
+ "description": "Compose vocal song lyrics and suggested musical parameters. Use for songs with words, choruses, verses, jingles, vocal hooks, or lyric rewrites. Do not use for instrumental-only music.",
58
+ "parameters": {
59
+ "type": "object",
60
+ "additionalProperties": false,
61
+ "required": ["prompt"],
62
+ "properties": {
63
+ "prompt": { "type": "string", "description": "The song topic, mood, genre, scene, campaign, or lyric request." },
64
+ "language": { "type": "string", "description": "Optional language code or language name for the lyrics." },
65
+ "music_prompt": { "type": "string", "description": "Optional musical style context, genre, instrumentation, mood, or production direction." },
66
+ "duration_seconds": { "type": "number", "minimum": 10, "maximum": 600, "description": "Optional desired song duration in seconds." }
67
+ }
68
+ }
69
+ }
70
+ },
71
+ {
72
+ "type": "function",
73
+ "function": {
74
+ "name": "compose_instrumental",
75
+ "description": "Compose an instrumental music structure and suggested musical parameters. Use for background scores, beds, cues, themes, and music requests without lyrics.",
76
+ "parameters": {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": ["prompt"],
80
+ "properties": {
81
+ "prompt": { "type": "string", "description": "The instrumental music topic, mood, genre, scene, campaign, or composition request." },
82
+ "music_prompt": { "type": "string", "description": "Optional musical style context, instrumentation, mood, or production direction." },
83
+ "duration_seconds": { "type": "number", "minimum": 10, "maximum": 600, "description": "Optional desired track duration in seconds." }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ {
89
+ "type": "function",
90
+ "function": {
91
+ "name": "compose_script",
92
+ "description": "Compose scripts, storyboards, video prompts, ad concepts, trailers, social shorts, campaign beats, and talking-head plans. Use for creative writing artifacts. Do not use for lyrics or simple prompt expansion.",
93
+ "parameters": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": ["brief"],
97
+ "properties": {
98
+ "brief": { "type": "string", "description": "The creative writing brief, story idea, product concept, video idea, or revision request." },
99
+ "script_type": { "type": "string", "enum": ["video_prompt", "screenplay", "storyboard", "ad_script", "trailer", "social_short", "talking_head", "campaign", "revision"], "description": "The kind of script or creative writing artifact to produce." },
100
+ "destination_model": { "type": "string", "description": "Optional destination video model selector, such as ltx23, wan22, or seedance2." },
101
+ "destination_tool": { "type": "string", "description": "Optional downstream tool, such as generate_video, animate_photo, sound_to_video, or video_to_video." },
102
+ "duration_seconds": { "type": "number", "minimum": 1, "maximum": 300, "description": "Requested runtime for a video prompt, social short, ad, or talking-head script." },
103
+ "scene_count": { "type": "integer", "minimum": 1, "maximum": 12, "description": "Requested number of scenes, shots, beats, or storyboard panels." },
104
+ "aspect_ratio": { "type": "string", "description": "Optional target aspect ratio, such as 16:9, 9:16, 1:1, 4:5, or 21:9." },
105
+ "platform": { "type": "string", "description": "Optional target platform or context, such as TikTok, YouTube Shorts, Instagram Reels, broadcast, landing page, game trailer, or pitch deck." },
106
+ "style": { "type": "string", "description": "Optional style, genre, tone, visual treatment, or brand voice to preserve." },
107
+ "first_frame_description": { "type": "string", "description": "Optional description of the starting frame when composing an image-to-video prompt without attached vision content." },
108
+ "first_frame_data_url": { "type": "string", "description": "Optional inline image data URI for the starting frame when composing an image-to-video or first-frame video prompt." },
109
+ "last_frame_data_url": { "type": "string", "description": "Optional inline image data URI for the ending frame when composing an image-to-video transition prompt." },
110
+ "return_format": { "type": "string", "enum": ["script", "markdown", "json"], "description": "Requested output format. Use script unless structured planning output is explicitly needed." }
111
+ }
112
+ }
113
+ }
114
+ },
115
+ {
116
+ "type": "function",
117
+ "function": {
118
+ "name": "compose_workflow",
119
+ "description": "Compose a runnable durable creative workflow plan from a creative brief. Returns a validated `steps[]` array (the same shape accepted by `POST /v1/creative-agent/workflows`) plus a capacity-units estimate.\n\nCall this tool — do NOT describe the plan in chat text — when the user asks for any of: \"a runnable workflow plan\", \"a plan I can submit\", \"compile a workflow / pipeline\", \"a multi-step plan\", \"a one-shot plan\", or names a structural shape like \"N-shot teaser, [aspect], [duration]\" (e.g. \"5-shot product teaser, 9:16, 15s\"). The plain-text description of stages is never the right output for those requests — the validated `steps[]` array is the contract.\n\nUse `compose_workflow_template` instead when the user wants to SAVE the plan as a reusable template (different surface: typed `inputs[]` plus `template_draft`). Use `compose_script` for creative writing artifacts (scripts, lyrics, scene beats) that are NOT a workflow plan. The returned plan is not idempotent; pair the eventual `POST /v1/creative-agent/workflows` submission with your own `Idempotency-Key`.",
120
+ "parameters": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["brief"],
124
+ "properties": {
125
+ "brief": { "type": "string", "description": "Creative brief describing what the workflow should produce. Free-form natural language. Required." },
126
+ "scene_count": { "type": "integer", "minimum": 1, "maximum": 12, "description": "Suggested number of distinct shots/scenes. The planner may produce more steps than scenes (e.g., keyframe + clip per scene)." },
127
+ "duration_seconds": { "type": "number", "minimum": 1, "maximum": 120, "description": "Target total duration in seconds for video-bearing plans." },
128
+ "aspect_ratio": { "type": "string", "enum": ["1:1", "4:3", "3:4", "16:9", "9:16", "21:9"], "description": "Output aspect ratio." },
129
+ "style": { "type": "string", "description": "Optional stylistic guidance (e.g., 'cinematic, neon, low-key', 'whiteboard illustration')." },
130
+ "destination_models": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "properties": {
134
+ "image": { "type": "string", "description": "Preferred image model (e.g., 'flux2', 'gpt-image-2')." },
135
+ "video": { "type": "string", "description": "Preferred video model (e.g., 'ltx23', 'wan22', 'seedance2')." },
136
+ "music": { "type": "string", "description": "Preferred music model." }
137
+ }
138
+ },
139
+ "max_estimated_capacity_units": { "type": "integer", "minimum": 1, "description": "If set, the planner attempts to keep total estimated cost at or below this value and returns `fits_budget: false` if it cannot." },
140
+ "include_audio": { "type": "boolean", "description": "If true, include a music generation step. Defaults to false." },
141
+ "return_format": { "type": "string", "enum": ["json"], "description": "Currently `json` is the only supported value. Reserved for future." }
142
+ }
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "type": "function",
148
+ "function": {
149
+ "name": "compose_workflow_template",
150
+ "description": "Compose OR EDIT a savable, parameterized workflow template plus a concrete example plan. Returns a `template_draft` (typed `inputs[]`, parameterized `stages[]` referencing `$inputs.<name>`, optional `graph` layout) alongside a Phase-1-compatible `plan` for example inputs.\n\nUse for both: (1) creating a NEW named, reusable workflow in the builder UI, AND (2) EDITING a SAVED workflow the user references by name or id (e.g. \"edit my bobblehead workflow\", \"change my saved storyboard template to 16:9\", \"add a music step to wf_X\", \"swap the model in my saved template\"). For saved-template edits, pass the prior template JSON as `existing_template` so the planner preserves stage ids and bumps only the requested change.\n\nDo NOT use individual creative tools (generate_image, edit_image, animate_photo, generate_video, etc.) when the user is editing a SAVED workflow — those produce one-shot media, not template changes. Do NOT use `compose_workflow` for saved-template edits; that is for one-shot plans only.\n\nThe returned template is a draft; the caller is responsible for saving it via `POST /v1/creative-agent/workflows/templates`.",
151
+ "parameters": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": ["brief", "name"],
155
+ "properties": {
156
+ "brief": { "type": "string", "description": "Creative brief describing what the workflow should produce. Free-form natural language. Required." },
157
+ "name": { "type": "string", "minLength": 1, "maxLength": 200, "description": "Human-readable template name (e.g. \"My Plastic Dream — TikTok/Reels\"). Required." },
158
+ "description": { "type": "string", "description": "Optional template description. If omitted, the planner may derive one from the brief." },
159
+ "category": { "type": "string", "enum": ["portrait", "video-social", "makeover", "cinematic", "music", "analysis", "custom", "other"], "description": "Optional category for surfacing the template in the library. Defaults to 'custom' when omitted." },
160
+ "visibility": { "type": "string", "enum": ["private", "public"], "description": "Persistence visibility. Defaults to 'private'. The 'team' visibility is reserved for a later milestone." },
161
+ "inputs": {
162
+ "type": "array",
163
+ "maxItems": 16,
164
+ "description": "Optional typed input declarations. When omitted, the planner LLM proposes inputs based on the brief.",
165
+ "items": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "required": ["name", "type"],
169
+ "properties": {
170
+ "name": { "type": "string", "minLength": 1, "maxLength": 64, "description": "Input name; used as the placeholder key (e.g. $inputs.motion_source_video)." },
171
+ "type": { "type": "string", "enum": ["image", "audio", "video", "text", "number", "select", "boolean"], "description": "Input value type. URL string for image/audio/video; primitive for the rest." },
172
+ "required": { "type": "boolean", "description": "Whether the input must be supplied at run time. Defaults to false." },
173
+ "description": { "type": "string", "description": "Human-readable description shown in the launcher UI." },
174
+ "default": { "description": "Optional default value. Type must match `type`." },
175
+ "options": {
176
+ "type": "array",
177
+ "description": "Allowed enum values for `select` inputs.",
178
+ "items": {
179
+ "type": "object",
180
+ "additionalProperties": false,
181
+ "required": ["value", "label"],
182
+ "properties": {
183
+ "value": { "type": "string" },
184
+ "label": { "type": "string" }
185
+ }
186
+ }
187
+ },
188
+ "multiple": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": ["min", "max"],
192
+ "description": "Set when the input accepts an array of values.",
193
+ "properties": {
194
+ "min": { "type": "integer", "minimum": 0 },
195
+ "max": { "type": "integer", "minimum": 1 }
196
+ }
197
+ },
198
+ "internal": { "type": "boolean", "description": "Internal inputs are seeded at run-create time and hidden from the launcher UI." }
199
+ }
200
+ }
201
+ },
202
+ "scene_count": { "type": "integer", "minimum": 1, "maximum": 12, "description": "Suggested number of distinct shots/scenes. The planner may produce more steps than scenes (e.g., keyframe + clip per scene)." },
203
+ "duration_seconds": { "type": "number", "minimum": 1, "maximum": 120, "description": "Target total duration in seconds for video-bearing plans." },
204
+ "aspect_ratio": { "type": "string", "enum": ["1:1", "4:3", "3:4", "16:9", "9:16", "21:9"], "description": "Output aspect ratio." },
205
+ "style": { "type": "string", "description": "Optional stylistic guidance (e.g., 'cinematic, neon, low-key', 'whiteboard illustration')." },
206
+ "destination_models": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "properties": {
210
+ "image": { "type": "string", "description": "Preferred image model (e.g., 'flux2', 'gpt-image-2')." },
211
+ "video": { "type": "string", "description": "Preferred video model (e.g., 'ltx23', 'wan22', 'seedance2')." },
212
+ "music": { "type": "string", "description": "Preferred music model." }
213
+ }
214
+ },
215
+ "max_estimated_capacity_units": { "type": "integer", "minimum": 1, "description": "If set, the planner attempts to keep total estimated cost at or below this value and returns `fits_budget: false` if it cannot." },
216
+ "include_audio": { "type": "boolean", "description": "If true, include a music generation step. Defaults to false." },
217
+ "return_format": { "type": "string", "enum": ["json"], "description": "Currently `json` is the only supported value. Reserved for future." },
218
+ "existing_template": {
219
+ "type": "object",
220
+ "additionalProperties": true,
221
+ "description": "Optional full WorkflowTemplate JSON the caller wants the planner to edit. When supplied, the planner treats the supplied template as the starting point and the brief as the modification request: it preserves unchanged stages and inputs, applies the requested edits, bumps the template version, and keeps stage ids stable unless the brief explicitly renames them. Use for 'add a music step', 'switch the storyboard model to GPT Image 2', 'make this 9:16 instead of 16:9' style edits."
222
+ }
223
+ }
224
+ }
225
+ }
226
+ }
227
+ ]
228
+ }