@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.
- package/README.md +80 -0
- package/catalogs/audio-models.json +34 -0
- package/catalogs/quality-presets.json +30 -0
- package/enums/chat-run-status.json +12 -0
- package/enums/chat-run-waiting-reasons.json +10 -0
- package/enums/token-types.json +7 -0
- package/enums/tool-names.json +85 -0
- package/manifests/app-tools.json +297 -0
- package/manifests/composition-tools.json +228 -0
- package/manifests/generation-tools.json +1263 -0
- package/manifests/openai-tools.json +1818 -0
- package/package.json +44 -0
- package/prompts/tools/add_subtitles.json +12 -0
- package/prompts/tools/analyze_image.json +12 -0
- package/prompts/tools/analyze_video.json +11 -0
- package/prompts/tools/animate_photo.json +13 -0
- package/prompts/tools/apply_style.json +11 -0
- package/prompts/tools/ask_clarifying_question.json +10 -0
- package/prompts/tools/change_angle.json +11 -0
- package/prompts/tools/compose_instrumental.json +11 -0
- package/prompts/tools/compose_lyrics.json +12 -0
- package/prompts/tools/compose_script.json +21 -0
- package/prompts/tools/compose_workflow.json +17 -0
- package/prompts/tools/compose_workflow_template.json +23 -0
- package/prompts/tools/create_asset_manifest.json +9 -0
- package/prompts/tools/dance_montage.json +9 -0
- package/prompts/tools/edit_image.json +11 -0
- package/prompts/tools/enhance_prompt.json +20 -0
- package/prompts/tools/extend_video.json +11 -0
- package/prompts/tools/extract_metadata.json +9 -0
- package/prompts/tools/finalize_response.json +10 -0
- package/prompts/tools/generate_image.json +11 -0
- package/prompts/tools/generate_music.json +7 -0
- package/prompts/tools/generate_video.json +10 -0
- package/prompts/tools/inspect_asset.json +10 -0
- package/prompts/tools/label_asset.json +13 -0
- package/prompts/tools/manage_memory.json +12 -0
- package/prompts/tools/map_assets_for_model.json +9 -0
- package/prompts/tools/orbit_video.json +13 -0
- package/prompts/tools/overlay_video.json +10 -0
- package/prompts/tools/refine_result.json +11 -0
- package/prompts/tools/replace_video_segment.json +14 -0
- package/prompts/tools/resolve_personas.json +9 -0
- package/prompts/tools/restore_photo.json +12 -0
- package/prompts/tools/set_content_filter.json +9 -0
- package/prompts/tools/sound_to_video.json +9 -0
- package/prompts/tools/stitch_video.json +9 -0
- package/prompts/tools/validate_asset_references.json +10 -0
- package/prompts/tools/video_to_video.json +13 -0
- package/schemas/errors/error.schema.json +21 -0
- package/schemas/errors/repair-control.schema.json +40 -0
- package/schemas/events/artifact-reference.schema.json +22 -0
- package/schemas/events/progress-event.schema.json +28 -0
- package/schemas/events/workflow-event.schema.json +22 -0
- package/schemas/prompt-contract.schema.json +42 -0
- package/schemas/storyboards/storyboard-planning-contract.schema.json +108 -0
- package/schemas/tools/add_subtitles.schema.json +77 -0
- package/schemas/tools/animate_photo.schema.json +104 -0
- package/schemas/tools/apply_style.schema.json +37 -0
- package/schemas/tools/change_angle.schema.json +30 -0
- package/schemas/tools/compose_instrumental.schema.json +24 -0
- package/schemas/tools/compose_lyrics.schema.json +28 -0
- package/schemas/tools/compose_script.schema.json +68 -0
- package/schemas/tools/compose_workflow.schema.json +67 -0
- package/schemas/tools/compose_workflow_template.schema.json +156 -0
- package/schemas/tools/dance_montage.schema.json +47 -0
- package/schemas/tools/edit_image.schema.json +74 -0
- package/schemas/tools/enhance_prompt.schema.json +76 -0
- package/schemas/tools/extend_video.schema.json +42 -0
- package/schemas/tools/generate_image.schema.json +104 -0
- package/schemas/tools/generate_music.schema.json +62 -0
- package/schemas/tools/generate_video.schema.json +97 -0
- package/schemas/tools/manage_memory.schema.json +28 -0
- package/schemas/tools/orbit_video.schema.json +70 -0
- package/schemas/tools/overlay_video.schema.json +126 -0
- package/schemas/tools/refine_result.schema.json +43 -0
- package/schemas/tools/replace_video_segment.schema.json +60 -0
- package/schemas/tools/resolve_personas.schema.json +15 -0
- package/schemas/tools/restore_photo.schema.json +47 -0
- package/schemas/tools/set_content_filter.schema.json +14 -0
- package/schemas/tools/sound_to_video.schema.json +70 -0
- package/schemas/tools/stitch_video.schema.json +52 -0
- package/schemas/tools/video_to_video.schema.json +77 -0
- package/schemas/workflows/durable-workflow-run.schema.json +165 -0
- package/schemas/workflows/durable-workflow-step.schema.json +141 -0
- package/version.json +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# @sogni-ai/sogni-protocol
|
|
2
|
+
|
|
3
|
+
The language-neutral protocol artifacts for the [Sogni](https://sogni.ai) ecosystem.
|
|
4
|
+
|
|
5
|
+
This package ships pure data — JSON Schemas, OpenAI tool manifests, prompt contracts, and enums — that every Sogni SDK consumes so contracts stay in lockstep across languages.
|
|
6
|
+
|
|
7
|
+
## What's inside
|
|
8
|
+
|
|
9
|
+
| Path | What it is | Who consumes it |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `schemas/tools/*.json` | JSON Schema for each hosted creative tool's arguments. | All SDKs (codegen types + runtime validation). |
|
|
12
|
+
| `schemas/errors/*.json` | Error envelope + repair-control shape. | All SDKs. |
|
|
13
|
+
| `schemas/events/*.json` | Chat-run + workflow event shapes. | All SDKs. |
|
|
14
|
+
| `schemas/workflows/*.json` | Durable workflow record + step shapes. | All SDKs. |
|
|
15
|
+
| `schemas/storyboards/*.json` | Storyboard planning contract. | TS SDK + chat product. |
|
|
16
|
+
| `schemas/prompt-contract.schema.json` | Shape every `prompts/tools/*.json` file validates against. | Editors of prompt prose. |
|
|
17
|
+
| `manifests/openai-tools.json` | Merged hosted-tool OpenAI function manifest (generation + composition). | TS SDK runtime, future agent SDKs. |
|
|
18
|
+
| `manifests/generation-tools.json` | Generation subset of the hosted manifest. | TS SDK. |
|
|
19
|
+
| `manifests/composition-tools.json` | Composition subset of the hosted manifest. | TS SDK. |
|
|
20
|
+
| `manifests/app-tools.json` | Chat-app local tools (analyze_image, manage_memory, etc.). | Chat product SDKs. |
|
|
21
|
+
| `prompts/tools/*.json` | Per-tool LLM-visible descriptions + parameter docstrings (`PromptContract`). | All SDKs that surface tools to an LLM. |
|
|
22
|
+
| `enums/tool-names.json` | Canonical tool name catalogs (hosted / app / chatLocal / all). | Validators, codegen. |
|
|
23
|
+
| `enums/chat-run-status.json` | Chat-run lifecycle states. | All SDKs. |
|
|
24
|
+
| `enums/chat-run-waiting-reasons.json` | Why a run is paused for user input. | All SDKs. |
|
|
25
|
+
| `enums/token-types.json` | Sogni billing token types (`sogni`, `spark`). | All SDKs. |
|
|
26
|
+
| `catalogs/quality-presets.json` | Quality tier presets (fast/hq/pro) -> model + sampling parameters. | UI SDKs rendering quality toggles. |
|
|
27
|
+
| `catalogs/audio-models.json` | ACE-Step audio model capability table + duration/BPM/time-signature constraints. | SDKs validating music-gen input. |
|
|
28
|
+
| `version.json` | Protocol version for compatibility checks. | All SDKs. |
|
|
29
|
+
|
|
30
|
+
## Why a separate package
|
|
31
|
+
|
|
32
|
+
Sogni ships SDKs in multiple languages (TypeScript `@sogni-ai/sogni-client`, Swift `SogniKit`, more on the way). Tool schemas, prompts, and enums need to be the same everywhere. Holding them in a TS-centric package would force non-TS SDKs to either reimplement them or depend on Node tooling just for codegen.
|
|
33
|
+
|
|
34
|
+
This package has **zero runtime dependencies**, no compile step, and no native binaries. Any language can pull it down (npm install, git submodule, or just `wget`-ing the tarball) and read the JSON directly.
|
|
35
|
+
|
|
36
|
+
## Consumer examples
|
|
37
|
+
|
|
38
|
+
**TypeScript (Node 20+):**
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import manifest from '@sogni-ai/sogni-protocol/manifests/openai-tools.json' with { type: 'json' };
|
|
42
|
+
import statuses from '@sogni-ai/sogni-protocol/enums/chat-run-status.json' with { type: 'json' };
|
|
43
|
+
|
|
44
|
+
type ChatRunStatus = (typeof statuses.values)[number];
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Swift (codegen via `quicktype`):**
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
quicktype \
|
|
51
|
+
--src-lang schema \
|
|
52
|
+
--lang swift \
|
|
53
|
+
--src node_modules/@sogni-ai/sogni-protocol/schemas/tools/*.schema.json \
|
|
54
|
+
--out Sources/SogniKit/Models/Generated/ToolSchemas.swift
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Python (or any language) — direct JSON read:**
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
import json, pathlib
|
|
61
|
+
manifest = json.loads(pathlib.Path("node_modules/@sogni-ai/sogni-protocol/manifests/openai-tools.json").read_text())
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Versioning policy
|
|
65
|
+
|
|
66
|
+
The package is versioned independently of any SDK. `version.json#protocolVersion` follows semver:
|
|
67
|
+
|
|
68
|
+
- **Major** — removing or renaming any schema / enum / manifest field. Breaks consumers.
|
|
69
|
+
- **Minor** — adding new optional fields, new tools, new manifests. Backwards-compatible.
|
|
70
|
+
- **Patch** — description / prose changes (prompt text, schema descriptions). No shape change.
|
|
71
|
+
|
|
72
|
+
SDKs may check `protocolVersion` at startup and refuse to run against an incompatible major.
|
|
73
|
+
|
|
74
|
+
## Editing prose
|
|
75
|
+
|
|
76
|
+
Tool prompt prose lives in `prompts/tools/*.json`. Each file is one [`PromptContract`](./schemas/prompt-contract.schema.json). Edit the JSON, bump `version.json#protocolVersion` patch, publish. SDKs pick up new prose on their next install — no code change required in any SDK.
|
|
77
|
+
|
|
78
|
+
## Editing schemas
|
|
79
|
+
|
|
80
|
+
The JSON Schema files under `schemas/` are the authoritative wire-spec shape. Any change here is a protocol bump (minor or major depending on compatibility). Consumers regenerate their language-specific types via their codegen step.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Audio / music generation model catalog. ACE-Step 1.5 family. Each entry lists per-parameter ranges so SDKs can validate user input and render sliders without round-tripping to the server. Cross-cutting audio constraints (duration, BPM, time signatures) live in the top-level `constraints` block.",
|
|
3
|
+
"default": "turbo",
|
|
4
|
+
"models": {
|
|
5
|
+
"turbo": {
|
|
6
|
+
"id": "ace_step_1.5_turbo",
|
|
7
|
+
"name": "ACE-Step 1.5 Turbo",
|
|
8
|
+
"steps": { "min": 4, "max": 16, "default": 8 },
|
|
9
|
+
"shift": { "min": 1, "max": 5, "default": 3 },
|
|
10
|
+
"guidance": null
|
|
11
|
+
},
|
|
12
|
+
"sft": {
|
|
13
|
+
"id": "ace_step_1.5_sft",
|
|
14
|
+
"name": "ACE-Step 1.5 SFT",
|
|
15
|
+
"steps": { "min": 10, "max": 200, "default": 50 },
|
|
16
|
+
"shift": { "min": 1, "max": 5, "default": 3 },
|
|
17
|
+
"guidance": { "min": 1, "max": 15, "default": 5 }
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"constraints": {
|
|
21
|
+
"duration": {
|
|
22
|
+
"min": 10,
|
|
23
|
+
"max": 600,
|
|
24
|
+
"default": 30,
|
|
25
|
+
"unit": "seconds"
|
|
26
|
+
},
|
|
27
|
+
"bpm": {
|
|
28
|
+
"min": 30,
|
|
29
|
+
"max": 300,
|
|
30
|
+
"default": 120
|
|
31
|
+
},
|
|
32
|
+
"timeSignatures": [2, 3, 4, 6]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Quality tier presets for image generation and editing. Maps tier name -> model + sampling parameters. SDKs use this catalog to render quality-toggle UI and resolve a tier into concrete generation parameters.",
|
|
3
|
+
"default": "fast",
|
|
4
|
+
"tiers": {
|
|
5
|
+
"fast": {
|
|
6
|
+
"model": "qwen_image_edit_2511_fp8_lightning",
|
|
7
|
+
"steps": 5,
|
|
8
|
+
"guidance": 1.0,
|
|
9
|
+
"outputFormat": "jpg",
|
|
10
|
+
"label": "Fast",
|
|
11
|
+
"description": "Faster"
|
|
12
|
+
},
|
|
13
|
+
"hq": {
|
|
14
|
+
"model": "qwen_image_edit_2511_fp8",
|
|
15
|
+
"steps": 25,
|
|
16
|
+
"guidance": 4.0,
|
|
17
|
+
"outputFormat": "jpg",
|
|
18
|
+
"label": "High Quality",
|
|
19
|
+
"description": "More detail"
|
|
20
|
+
},
|
|
21
|
+
"pro": {
|
|
22
|
+
"model": "flux2_dev_fp8",
|
|
23
|
+
"steps": 40,
|
|
24
|
+
"guidance": 4.0,
|
|
25
|
+
"outputFormat": "jpg",
|
|
26
|
+
"label": "Pro",
|
|
27
|
+
"description": "Flux.2 Dev"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Canonical Sogni tool names. hosted = creative tools executed by the server; app = chat-app tools shipped via app-tools manifest (server-bound discovery); chatLocal = tools defined and executed inside sogni-chat (schemas in schemas/tools/, executed client-side); all = union.",
|
|
3
|
+
"hosted": [
|
|
4
|
+
"add_subtitles",
|
|
5
|
+
"animate_photo",
|
|
6
|
+
"apply_style",
|
|
7
|
+
"change_angle",
|
|
8
|
+
"compose_instrumental",
|
|
9
|
+
"compose_lyrics",
|
|
10
|
+
"compose_script",
|
|
11
|
+
"compose_workflow",
|
|
12
|
+
"compose_workflow_template",
|
|
13
|
+
"dance_montage",
|
|
14
|
+
"edit_image",
|
|
15
|
+
"enhance_prompt",
|
|
16
|
+
"extend_video",
|
|
17
|
+
"generate_image",
|
|
18
|
+
"generate_music",
|
|
19
|
+
"generate_video",
|
|
20
|
+
"orbit_video",
|
|
21
|
+
"overlay_video",
|
|
22
|
+
"refine_result",
|
|
23
|
+
"replace_video_segment",
|
|
24
|
+
"restore_photo",
|
|
25
|
+
"sound_to_video",
|
|
26
|
+
"stitch_video",
|
|
27
|
+
"video_to_video"
|
|
28
|
+
],
|
|
29
|
+
"app": [
|
|
30
|
+
"analyze_image",
|
|
31
|
+
"analyze_video",
|
|
32
|
+
"ask_clarifying_question",
|
|
33
|
+
"create_asset_manifest",
|
|
34
|
+
"extract_metadata",
|
|
35
|
+
"finalize_response",
|
|
36
|
+
"inspect_asset",
|
|
37
|
+
"label_asset",
|
|
38
|
+
"map_assets_for_model",
|
|
39
|
+
"validate_asset_references"
|
|
40
|
+
],
|
|
41
|
+
"all": [
|
|
42
|
+
"add_subtitles",
|
|
43
|
+
"analyze_image",
|
|
44
|
+
"analyze_video",
|
|
45
|
+
"animate_photo",
|
|
46
|
+
"apply_style",
|
|
47
|
+
"ask_clarifying_question",
|
|
48
|
+
"change_angle",
|
|
49
|
+
"compose_instrumental",
|
|
50
|
+
"compose_lyrics",
|
|
51
|
+
"compose_script",
|
|
52
|
+
"compose_workflow",
|
|
53
|
+
"compose_workflow_template",
|
|
54
|
+
"create_asset_manifest",
|
|
55
|
+
"dance_montage",
|
|
56
|
+
"edit_image",
|
|
57
|
+
"enhance_prompt",
|
|
58
|
+
"extend_video",
|
|
59
|
+
"extract_metadata",
|
|
60
|
+
"finalize_response",
|
|
61
|
+
"generate_image",
|
|
62
|
+
"generate_music",
|
|
63
|
+
"generate_video",
|
|
64
|
+
"inspect_asset",
|
|
65
|
+
"label_asset",
|
|
66
|
+
"manage_memory",
|
|
67
|
+
"map_assets_for_model",
|
|
68
|
+
"orbit_video",
|
|
69
|
+
"overlay_video",
|
|
70
|
+
"refine_result",
|
|
71
|
+
"replace_video_segment",
|
|
72
|
+
"resolve_personas",
|
|
73
|
+
"restore_photo",
|
|
74
|
+
"set_content_filter",
|
|
75
|
+
"sound_to_video",
|
|
76
|
+
"stitch_video",
|
|
77
|
+
"validate_asset_references",
|
|
78
|
+
"video_to_video"
|
|
79
|
+
],
|
|
80
|
+
"chatLocal": [
|
|
81
|
+
"manage_memory",
|
|
82
|
+
"resolve_personas",
|
|
83
|
+
"set_content_filter"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2026-04-27.1",
|
|
3
|
+
"source": "sogni-creative-agent/src/backbone/openai-tools/app-tools.json",
|
|
4
|
+
"tools": [
|
|
5
|
+
{
|
|
6
|
+
"type": "function",
|
|
7
|
+
"function": {
|
|
8
|
+
"name": "analyze_image",
|
|
9
|
+
"description": "Analyze an uploaded or generated image using a vision model. Use for image questions, descriptions, OCR, object identification, document reading, or comparing two images. Does not generate or modify images.",
|
|
10
|
+
"parameters": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"properties": {
|
|
13
|
+
"query": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "The user's question or request about the image."
|
|
16
|
+
},
|
|
17
|
+
"analysisType": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": ["describe", "ocr", "objects", "document", "compare", "general"],
|
|
20
|
+
"description": "Type of analysis. Use general when answering the user's specific question."
|
|
21
|
+
},
|
|
22
|
+
"sourceImageIndex": {
|
|
23
|
+
"type": "number",
|
|
24
|
+
"description": "Image to analyze. Non-negative indexes refer to generated images; negative indexes refer to uploaded images (-1 first upload, -2 second upload). Omit to auto-select latest image."
|
|
25
|
+
},
|
|
26
|
+
"compareImageIndex": {
|
|
27
|
+
"type": "number",
|
|
28
|
+
"description": "Second image for compare mode, using the same indexing convention as sourceImageIndex."
|
|
29
|
+
},
|
|
30
|
+
"detailed": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Whether to provide a more detailed analysis."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"required": ["query"]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "function",
|
|
41
|
+
"function": {
|
|
42
|
+
"name": "analyze_video",
|
|
43
|
+
"description": "Analyze an uploaded or generated video using sampled frames and a vision model. Use for video summaries, timelines, visual scene descriptions, action breakdowns, or visible text. Does not generate or modify videos.",
|
|
44
|
+
"parameters": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"query": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "The user's question or request about the video."
|
|
50
|
+
},
|
|
51
|
+
"analysisType": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": ["summary", "timeline", "scene", "action", "ocr", "general"],
|
|
54
|
+
"description": "Type of analysis. Use general when answering the user's specific question."
|
|
55
|
+
},
|
|
56
|
+
"sourceVideoIndex": {
|
|
57
|
+
"type": "number",
|
|
58
|
+
"description": "Video to analyze. Non-negative indexes refer to generated videos; negative indexes refer to uploaded videos (-1 first upload, -2 second upload). Omit to auto-select latest video."
|
|
59
|
+
},
|
|
60
|
+
"detailed": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"description": "Whether to sample more context and provide a more detailed analysis."
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": ["query"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "function",
|
|
71
|
+
"function": {
|
|
72
|
+
"name": "extract_metadata",
|
|
73
|
+
"description": "Extract available technical metadata from an uploaded or generated media asset. Use when the user asks for duration, dimensions, MIME type, file size, model/prompt/settings metadata, or generation metadata embedded in or attached to a media file. For visual content questions, use analyze_image or analyze_video instead.",
|
|
74
|
+
"parameters": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"mediaType": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"enum": ["image", "video", "audio"],
|
|
80
|
+
"description": "Media type to inspect. Omit when the available context makes it unambiguous."
|
|
81
|
+
},
|
|
82
|
+
"sourceImageIndex": {
|
|
83
|
+
"type": "number",
|
|
84
|
+
"description": "Image to inspect, using generated indexes or negative uploaded indexes."
|
|
85
|
+
},
|
|
86
|
+
"sourceVideoIndex": {
|
|
87
|
+
"type": "number",
|
|
88
|
+
"description": "Video to inspect, using generated indexes or negative uploaded indexes."
|
|
89
|
+
},
|
|
90
|
+
"audioSourceIndex": {
|
|
91
|
+
"type": "number",
|
|
92
|
+
"description": "Audio asset to inspect, using generated indexes or negative uploaded indexes."
|
|
93
|
+
},
|
|
94
|
+
"fileIndex": {
|
|
95
|
+
"type": "number",
|
|
96
|
+
"description": "Legacy 0-based uploaded-file index. Prefer mediaType plus sourceImageIndex/sourceVideoIndex/audioSourceIndex when possible."
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "function",
|
|
104
|
+
"function": {
|
|
105
|
+
"name": "ask_clarifying_question",
|
|
106
|
+
"description": "Pause the workflow and ask the user a clarifying question. The host treats this as the end of the turn; do not call other tools after it.",
|
|
107
|
+
"parameters": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"properties": {
|
|
110
|
+
"question": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "The exact short question to surface to the user."
|
|
113
|
+
},
|
|
114
|
+
"reason": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"description": "Short telemetry tag explaining why clarification is needed."
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": ["question"]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "function",
|
|
125
|
+
"function": {
|
|
126
|
+
"name": "finalize_response",
|
|
127
|
+
"description": "Mark the turn complete and surface a final assistant message. The host stops the tool loop when this is called. Do not call other tools after finalize_response.",
|
|
128
|
+
"parameters": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"summary": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"description": "Short user-visible summary. Leave empty when prior tool output already says enough."
|
|
134
|
+
},
|
|
135
|
+
"outcome": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"enum": ["success", "partial", "asked_user", "failed", "no_action"],
|
|
138
|
+
"description": "How the turn ended."
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": ["outcome"]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "function",
|
|
147
|
+
"function": {
|
|
148
|
+
"name": "create_asset_manifest",
|
|
149
|
+
"description": "Reset and seed the session asset manifest with stable asset_id values so later tool calls can refer to assets reliably.",
|
|
150
|
+
"parameters": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"properties": {
|
|
153
|
+
"assets": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"description": "Ordered list of assets to register.",
|
|
156
|
+
"items": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"properties": {
|
|
159
|
+
"user_label": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "Human-readable asset name."
|
|
162
|
+
},
|
|
163
|
+
"type": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"enum": ["image", "video", "audio"],
|
|
166
|
+
"description": "Asset media type."
|
|
167
|
+
},
|
|
168
|
+
"description": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"description": "Optional short description."
|
|
171
|
+
},
|
|
172
|
+
"url": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"description": "Optional URL for the asset."
|
|
175
|
+
},
|
|
176
|
+
"must_preserve": {
|
|
177
|
+
"type": "array",
|
|
178
|
+
"items": { "type": "string" },
|
|
179
|
+
"description": "Features to preserve when regenerating from this asset."
|
|
180
|
+
},
|
|
181
|
+
"avoid": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": { "type": "string" },
|
|
184
|
+
"description": "Features to avoid."
|
|
185
|
+
},
|
|
186
|
+
"asset_id": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"description": "Optional stable id override."
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": ["user_label", "type"]
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": ["assets"]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "function",
|
|
201
|
+
"function": {
|
|
202
|
+
"name": "inspect_asset",
|
|
203
|
+
"description": "Return one asset record by asset_id or user_label, or the full asset manifest when no selector is provided.",
|
|
204
|
+
"parameters": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"properties": {
|
|
207
|
+
"asset_id": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Stable asset id."
|
|
210
|
+
},
|
|
211
|
+
"user_label": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "Human-readable asset label."
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "function",
|
|
221
|
+
"function": {
|
|
222
|
+
"name": "label_asset",
|
|
223
|
+
"description": "Update labels or preservation notes on an existing asset manifest entry.",
|
|
224
|
+
"parameters": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"properties": {
|
|
227
|
+
"asset_id": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Stable asset id to update."
|
|
230
|
+
},
|
|
231
|
+
"user_label": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "Replacement human-readable label."
|
|
234
|
+
},
|
|
235
|
+
"description": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"description": "Replacement description. Empty string clears it."
|
|
238
|
+
},
|
|
239
|
+
"must_preserve": {
|
|
240
|
+
"type": "array",
|
|
241
|
+
"items": { "type": "string" },
|
|
242
|
+
"description": "Replacement preserve list."
|
|
243
|
+
},
|
|
244
|
+
"avoid": {
|
|
245
|
+
"type": "array",
|
|
246
|
+
"items": { "type": "string" },
|
|
247
|
+
"description": "Replacement avoid list."
|
|
248
|
+
},
|
|
249
|
+
"url": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"description": "Replacement URL. Empty string clears it."
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"required": ["asset_id"]
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"type": "function",
|
|
260
|
+
"function": {
|
|
261
|
+
"name": "map_assets_for_model",
|
|
262
|
+
"description": "Return model-specific reference tokens for each asset in the manifest, such as @Image1 for Seedance or Image 1 for GPT Image 2.",
|
|
263
|
+
"parameters": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"properties": {
|
|
266
|
+
"model_id": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"description": "Target model identifier."
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"required": ["model_id"]
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "function",
|
|
277
|
+
"function": {
|
|
278
|
+
"name": "validate_asset_references",
|
|
279
|
+
"description": "Check whether model-specific asset reference tokens in a prompt resolve to registered manifest assets.",
|
|
280
|
+
"parameters": {
|
|
281
|
+
"type": "object",
|
|
282
|
+
"properties": {
|
|
283
|
+
"model_id": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"description": "Target model identifier."
|
|
286
|
+
},
|
|
287
|
+
"prompt": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "Prompt text to validate."
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
"required": ["model_id", "prompt"]
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|