freebeat-mcp 0.4.2 → 0.4.3
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 +17 -4
- package/dist/capabilities/agents/register.js +5 -0
- package/dist/capabilities/agents/register.js.map +1 -1
- package/dist/capabilities/agents/tools/generate-agent-videos.js +7 -5
- package/dist/capabilities/agents/tools/generate-agent-videos.js.map +1 -1
- package/dist/capabilities/agents/tools/video-session.d.ts +4 -0
- package/dist/capabilities/agents/tools/video-session.js +29 -0
- package/dist/capabilities/agents/tools/video-session.js.map +1 -0
- package/dist/capabilities/tasks/tools/get-task-result.js +1 -1
- package/dist/capabilities/tasks/tools/get-task-result.js.map +1 -1
- package/dist/capabilities/tasks/tools/get-task-status.js +1 -1
- package/dist/capabilities/tasks/tools/get-task-status.js.map +1 -1
- package/dist/core/video-session.d.ts +283 -0
- package/dist/core/video-session.js +192 -0
- package/dist/core/video-session.js.map +1 -0
- package/dist/services/freebeat-api.d.ts +15 -0
- package/dist/services/freebeat-api.js +109 -36
- package/dist/services/freebeat-api.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,12 +95,14 @@ the thread and selected final flow/version/readiness again after the callback be
|
|
|
95
95
|
Missing rendering capability or flow reference returns a `final_render` failure.
|
|
96
96
|
Completed status includes `video_url`; result includes `result.video_url`. An agent
|
|
97
97
|
video still rendering returns `running` with a polling message from either tool.
|
|
98
|
+
While an agent run is active, that message names the latest progress step the agent
|
|
99
|
+
reported for the run (the step freebeat.ai shows), with its percent while the step runs.
|
|
98
100
|
|
|
99
101
|
This package depends on Freebeat online services. Available source platforms, effect templates, and generation capabilities may change with backend updates.
|
|
100
102
|
|
|
101
103
|
## Tools
|
|
102
104
|
|
|
103
|
-
|
|
105
|
+
24 tools are available with full scopes. Successful responses and tool errors are projected through their declared output schemas before both MCP text and structured content are built; undeclared object properties are excluded.
|
|
104
106
|
|
|
105
107
|
Tool errors set `isError: true` and return `success: false`, `error`, and `code`
|
|
106
108
|
in both representations. A rejected credit approval may also include
|
|
@@ -290,11 +292,12 @@ Create dancers performing to a song; people in optional photos become the dancer
|
|
|
290
292
|
|
|
291
293
|
Create animated lyrics timed to a song's vocals. Supports `768P` (default) and `2K`, with optional reference photos.
|
|
292
294
|
|
|
293
|
-
All three tools use the existing agents
|
|
295
|
+
All three tools use the existing agents with a required `auto_mode` choice, usually take 15–60 minutes, and use the user's existing Freebeat credits. Each tool selects its product internally; there is no `product` parameter.
|
|
294
296
|
|
|
295
297
|
Parameters:
|
|
296
298
|
|
|
297
299
|
- `music_id` required, from `upload_audio` or a completed `generate_music` result
|
|
300
|
+
- `auto_mode` required: `true` lets the agent decide and deliver the film; `false` lets ChatGPT/Codex co-create through the session tools when the agent pauses for creative input. Infer the choice from the request or discuss it when needed.
|
|
298
301
|
- `prompt` optional creative direction
|
|
299
302
|
- `start_ms` / `end_ms` optional song window, default the first 15 seconds, or up to the song's end if shorter; the selected window must fit the song and account limits
|
|
300
303
|
- `aspect_ratio` optional, default `16:9`
|
|
@@ -302,7 +305,17 @@ Parameters:
|
|
|
302
305
|
- `image_urls` optional photos from `upload_image`
|
|
303
306
|
- `remove_watermark` optional, default `false`
|
|
304
307
|
|
|
305
|
-
Returns `task_id`, `task_type`, `status`, and `session_url`, the freebeat.ai page for the session. `get_task_status` reports `running`, `completed`, or `action_required`; on `action_required` (for example the account ran out of credits, or the agent needs a decision)
|
|
308
|
+
Returns `task_id`, `task_type`, `status`, and `session_url`, the freebeat.ai page for the session. `get_task_status` reports `running`, `completed`, or `action_required`; on `action_required` (for example the account ran out of credits, or the agent needs a decision) read `get_video_session` and continue the conversation through `send_video_agent_message` with the same `task_id`. Relay credit notices when present.
|
|
309
|
+
|
|
310
|
+
### `get_video_session`
|
|
311
|
+
|
|
312
|
+
Read an existing agent video using its `task_id`. Returns recent conversation and requests, whether it is running or waiting for the person, pipeline statuses, effective `auto_mode`, and artifacts containing labeled readable `fields` and playable/viewable `media` URLs. The read uses the same messages/state/assets endpoints as the website and does not start work or final rendering. It returns at most 20 recent messages, 40 parts per message, 24 current artifacts and 64 stages, with a 60,000-character display budget including entry overhead (24,000 reserved for artifacts). Newest messages and parts take priority; `truncated` identifies shortened or omitted content. Unknown provider/diagnostic metadata and system messages are excluded.
|
|
313
|
+
|
|
314
|
+
### `send_video_agent_message`
|
|
315
|
+
|
|
316
|
+
Send `message` (1–4,000 characters) to an existing agent video's `task_id`. Optional `auto_mode` changes the setting before sending; omit it to retain the setting. The request matches the website chat's `enqueue` strategy: if another run is active, the new message waits for it, without interrupting it. `delivery: "accepted"` means the server accepted the words, not that the agent acted on them. Read `get_video_session` for its reply and current setting. If delivery is uncertain, inspect the session before resending; the auto switch may already have taken effect.
|
|
317
|
+
|
|
318
|
+
On freebeat.ai a person makes a video by chatting with the director agent and seeing what it made. ChatGPT/Codex stands where that person stands: it can give direction, ask for changes, approve, or hand the rest to auto. Whether and how to involve the user follows their intent. Credit consent is given once when starting the video; session messages do not require a new credit approval. The backend's credit notices are still relayed. Reading needs `freebeat:read`; sending needs `freebeat:generate`.
|
|
306
319
|
|
|
307
320
|
### `list_models`
|
|
308
321
|
|
|
@@ -352,7 +365,7 @@ Ask any text model from `list_models(type=text)` and get its reply. Parameters:
|
|
|
352
365
|
|
|
353
366
|
Poll a Freebeat async task or Open RPC batch until it reaches a terminal status. Task types are mapped to the MCP task categories, with `unknown` for unrecognized types. Status values are normalized to the MCP status set, including lowercase `pending`, `completed`, and `failed`; unrecognized upstream values become `unknown`.
|
|
354
367
|
|
|
355
|
-
For agent videos, effects, music, singing, and lip-sync tasks, continue polling while the status is still in progress. Agent videos may also report `action_required` with their own last message, any structured credit notice, and a `session_url` for
|
|
368
|
+
For agent videos, effects, music, singing, and lip-sync tasks, continue polling while the status is still in progress. Agent videos may also report `action_required` with their own last message, any structured credit notice, and a `session_url` for viewing. Use `get_video_session` to see the intermediate work and `send_video_agent_message` to continue in either mode. Call `get_task_result` after `completed`, `failed`, or `action_required`. If a task response cannot be read, `get_task_status` reports `unknown` and a viewing link; this is not a generation failure and must not trigger another paid submission.
|
|
356
369
|
|
|
357
370
|
For Open RPC image/video batches, pass the returned `batch_id` as `task_id`. You can also pass `serial_no` to query a single batch item. Completed batch items include result URLs directly in `get_task_status`, so `get_task_result` is not used for Open RPC batches.
|
|
358
371
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { ALL_TOOL_ACCESS } from "../../core/scopes.js";
|
|
2
2
|
import { registerGenerateAgentVideoTools } from "./tools/generate-agent-videos.js";
|
|
3
|
+
import { registerGetVideoSessionTool, registerSendVideoAgentMessageTool } from "./tools/video-session.js";
|
|
3
4
|
export function registerAgentTools(server, client, access = ALL_TOOL_ACCESS) {
|
|
4
5
|
if (access.generate)
|
|
5
6
|
registerGenerateAgentVideoTools(server, client);
|
|
7
|
+
if (access.generate)
|
|
8
|
+
registerSendVideoAgentMessageTool(server, client);
|
|
9
|
+
if (access.read)
|
|
10
|
+
registerGetVideoSessionTool(server, client);
|
|
6
11
|
}
|
|
7
12
|
//# sourceMappingURL=register.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/capabilities/agents/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/capabilities/agents/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAc,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,2BAA2B,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAE1G,MAAM,UAAU,kBAAkB,CAChC,MAAiB,EACjB,MAAyB,EACzB,SAAqB,eAAe;IAEpC,IAAI,MAAM,CAAC,QAAQ;QAAE,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrE,IAAI,MAAM,CAAC,QAAQ;QAAE,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvE,IAAI,MAAM,CAAC,IAAI;QAAE,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -2,31 +2,33 @@ import { acceptUnknownCostSchema, CREDIT_APPROVAL_DESCRIPTION, maxCreditsSchema,
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { AGENT_PRODUCTS } from "../../../core/agent-products.js";
|
|
4
4
|
import { formatToolError, toolResult, registerTool } from "../../../core/response.js";
|
|
5
|
+
import { CO_CREATE_DESCRIPTION, autoModeSchema } from "../../../core/video-session.js";
|
|
5
6
|
import { CREATE_TOOL_ANNOTATIONS } from "../../../core/tool-annotations.js";
|
|
6
7
|
const AGENT_VIDEO_TOOLS = {
|
|
7
8
|
music_video: {
|
|
8
9
|
name: "generate_music_video",
|
|
9
10
|
title: "Generate music video",
|
|
10
|
-
description: "Use this for music video generation: the user wants a music video (MV) for a song. Freebeat's music video agent plans scenes and generates and edits a multi-scene video timed to the song; people or characters from optional photos can appear. Requires music_id from upload_audio or a completed generate_music result; optional photos via upload_image. Starts a generation job that uses the user's existing Freebeat credits and usually takes 15–60 minutes; by default it uses the first 15 seconds of the song, or up to the song's end if shorter. Returns task_id and session_url; poll get_task_status every few minutes, call get_task_result after completed; on action_required
|
|
11
|
+
description: "Use this for music video generation: the user wants a music video (MV) for a song. Freebeat's music video agent plans scenes and generates and edits a multi-scene video timed to the song; people or characters from optional photos can appear. Requires music_id from upload_audio or a completed generate_music result; optional photos via upload_image. Starts a generation job that uses the user's existing Freebeat credits and usually takes 15–60 minutes; by default it uses the first 15 seconds of the song, or up to the song's end if shorter. Returns task_id and session_url; poll get_task_status every few minutes, call get_task_result after completed; on action_required read get_video_session and use send_video_agent_message to continue. Do not use for dance videos, lyric videos, short singing-photo clips, lip-sync of an existing clip, standalone video clips without a song, or generating audio.",
|
|
11
12
|
},
|
|
12
13
|
dance: {
|
|
13
14
|
name: "generate_dance_video",
|
|
14
15
|
title: "Generate dance video",
|
|
15
|
-
description: "Use this for dance video generation: the user wants dancers performing to a song. Freebeat's dance video agent plans and generates a dance video timed to the song; people in optional photos become the dancers. Supports vertical 9:16 and 3:4 formats. A 2026-10-27 production diagnosis found 855 credits for the video step alone of a 15-second 720p dance, with planning and images extra: budget on the order of 1,000 credits, not a fixed quote or cap. Requires music_id from upload_audio or a completed generate_music result; optional photos via upload_image. Starts a generation job that uses the user's existing Freebeat credits and usually takes 15–60 minutes; by default it uses the first 15 seconds of the song, or up to the song's end if shorter. Returns task_id and session_url; poll get_task_status every few minutes, call get_task_result after completed; on action_required
|
|
16
|
+
description: "Use this for dance video generation: the user wants dancers performing to a song. Freebeat's dance video agent plans and generates a dance video timed to the song; people in optional photos become the dancers. Supports vertical 9:16 and 3:4 formats. A 2026-10-27 production diagnosis found 855 credits for the video step alone of a 15-second 720p dance, with planning and images extra: budget on the order of 1,000 credits, not a fixed quote or cap. Requires music_id from upload_audio or a completed generate_music result; optional photos via upload_image. Starts a generation job that uses the user's existing Freebeat credits and usually takes 15–60 minutes; by default it uses the first 15 seconds of the song, or up to the song's end if shorter. Returns task_id and session_url; poll get_task_status every few minutes, call get_task_result after completed; on action_required read get_video_session and use send_video_agent_message to continue. Do not use for story-based music videos, lyric videos, short singing-photo clips, lip-sync of an existing clip, standalone video clips without a song, or generating audio.",
|
|
16
17
|
},
|
|
17
18
|
lyric_video: {
|
|
18
19
|
name: "generate_lyric_video",
|
|
19
20
|
title: "Generate lyric video",
|
|
20
|
-
description: "Use this for lyric video generation: the user wants animated lyrics timed to the vocals of a song. Freebeat's lyric video agent plans, generates, and edits the lyric video. Requires music_id from upload_audio or a completed generate_music result; optional reference photos via upload_image. Starts a generation job that uses the user's existing Freebeat credits and usually takes 15–60 minutes; by default it uses the first 15 seconds of the song, or up to the song's end if shorter. Returns task_id and session_url; poll get_task_status every few minutes, call get_task_result after completed; on action_required
|
|
21
|
+
description: "Use this for lyric video generation: the user wants animated lyrics timed to the vocals of a song. Freebeat's lyric video agent plans, generates, and edits the lyric video. Requires music_id from upload_audio or a completed generate_music result; optional reference photos via upload_image. Starts a generation job that uses the user's existing Freebeat credits and usually takes 15–60 minutes; by default it uses the first 15 seconds of the song, or up to the song's end if shorter. Returns task_id and session_url; poll get_task_status every few minutes, call get_task_result after completed; on action_required read get_video_session and use send_video_agent_message to continue. Do not use for story-based music videos, dance videos, short singing-photo clips, lip-sync of an existing clip, standalone video clips without a song, or generating audio.",
|
|
21
22
|
},
|
|
22
23
|
};
|
|
23
24
|
export function registerGenerateAgentVideoTools(server, client) {
|
|
24
25
|
for (const product of Object.keys(AGENT_VIDEO_TOOLS)) {
|
|
25
26
|
const tool = AGENT_VIDEO_TOOLS[product];
|
|
26
27
|
registerTool(server, tool.name, {
|
|
27
|
-
description: CREDIT_APPROVAL_DESCRIPTION + `Generated songs may return preparing with a numeric music_id and retry_after_seconds instead of a task_id. Retry with that music_id and unchanged approved parameters; no paid video starts before readiness. ${tool.description}`,
|
|
28
|
+
description: CREDIT_APPROVAL_DESCRIPTION + CO_CREATE_DESCRIPTION + `Generated songs may return preparing with a numeric music_id and retry_after_seconds instead of a task_id. Retry with that music_id and unchanged approved parameters; no paid video starts before readiness. ${tool.description}`,
|
|
28
29
|
annotations: { title: tool.title, ...CREATE_TOOL_ANNOTATIONS },
|
|
29
30
|
inputSchema: {
|
|
31
|
+
auto_mode: autoModeSchema,
|
|
30
32
|
max_credits: maxCreditsSchema,
|
|
31
33
|
accept_unknown_cost: acceptUnknownCostSchema,
|
|
32
34
|
music_id: z.union([z.number().int().positive(), z.string().regex(/^music:.+/)])
|
|
@@ -96,7 +98,7 @@ export function registerGenerateAgentVideoTools(server, client) {
|
|
|
96
98
|
task_type: result.task_type,
|
|
97
99
|
status: result.status,
|
|
98
100
|
session_url: result.session_url,
|
|
99
|
-
message: "The Freebeat agent started.
|
|
101
|
+
message: "The Freebeat agent started. Read get_video_session to see its work and talk through send_video_agent_message when it waits for input. Poll get_task_status for completion; full videos usually take 15-60 minutes.",
|
|
100
102
|
});
|
|
101
103
|
}
|
|
102
104
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-agent-videos.js","sourceRoot":"","sources":["../../../../src/capabilities/agents/tools/generate-agent-videos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE7I,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAqB,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAG5E,MAAM,iBAAiB,GAAG;IACxB,WAAW,EAAE;QACX,IAAI,EAAE,sBAAsB;QAC5B,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"generate-agent-videos.js","sourceRoot":"","sources":["../../../../src/capabilities/agents/tools/generate-agent-videos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAE7I,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAqB,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAm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CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
+
import type { FreebeatApiClient } from "../../../services/freebeat-api.js";
|
|
3
|
+
export declare function registerGetVideoSessionTool(server: McpServer, client: Pick<FreebeatApiClient, "getVideoSession">): void;
|
|
4
|
+
export declare function registerSendVideoAgentMessageTool(server: McpServer, client: Pick<FreebeatApiClient, "sendVideoAgentMessage">): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { CO_CREATE_DESCRIPTION, autoModeSchema, videoSessionSchema, videoTaskIdSchema } from "../../../core/video-session.js";
|
|
3
|
+
import { registerTool, toolResult } from "../../../core/response.js";
|
|
4
|
+
import { CREATE_TOOL_ANNOTATIONS, READ_ONLY_TOOL_ANNOTATIONS } from "../../../core/tool-annotations.js";
|
|
5
|
+
export function registerGetVideoSessionTool(server, client) {
|
|
6
|
+
registerTool(server, "get_video_session", {
|
|
7
|
+
description: CO_CREATE_DESCRIPTION + "Read an existing song-driven video session: recent conversation and requests, running or waiting state, pipeline statuses, auto setting, and readable artifacts with viewable or playable media URLs. fields contain labeled display values, media contains their URLs. Results are bounded; truncated means some content was shortened or omitted. This read does not start work or final rendering.",
|
|
8
|
+
annotations: { title: "Get video session", ...READ_ONLY_TOOL_ANNOTATIONS },
|
|
9
|
+
inputSchema: { task_id: videoTaskIdSchema },
|
|
10
|
+
outputSchema: { success: z.literal(true), ...videoSessionSchema.shape },
|
|
11
|
+
}, async ({ task_id }) => toolResult({ success: true, ...await client.getVideoSession(task_id) }));
|
|
12
|
+
}
|
|
13
|
+
export function registerSendVideoAgentMessageTool(server, client) {
|
|
14
|
+
registerTool(server, "send_video_agent_message", {
|
|
15
|
+
description: CO_CREATE_DESCRIPTION + "Send the person's words to an existing video session, with an optional auto setting change applied before the message. Like the website's chat box, it only sends while the agent is not running; during a run it sends nothing and returns an error, so wait until get_task_status is no longer running. An accepted response confirms receipt, not that the agent has acted; read get_video_session for the reply. Changes and continuation can use the session's existing credit authorization. Do not request another credit approval for each message. If delivery is uncertain, read the session before resending.",
|
|
16
|
+
annotations: { title: "Send video agent message", ...CREATE_TOOL_ANNOTATIONS },
|
|
17
|
+
inputSchema: {
|
|
18
|
+
task_id: videoTaskIdSchema,
|
|
19
|
+
message: z.string().trim().min(1).max(4000).describe("What the person wants to say to the director agent, in their own words."),
|
|
20
|
+
auto_mode: autoModeSchema.optional().describe("Optional change of the session's auto setting, applied before sending the message. Omit to keep its current setting."),
|
|
21
|
+
},
|
|
22
|
+
outputSchema: {
|
|
23
|
+
success: z.literal(true), task_id: videoTaskIdSchema, delivery: z.literal("accepted"),
|
|
24
|
+
auto_mode: z.boolean().optional().describe("Auto setting confirmed by PATCH when requested; get_video_session returns the current effective setting."),
|
|
25
|
+
message: z.string(),
|
|
26
|
+
},
|
|
27
|
+
}, async (params) => toolResult({ success: true, ...await client.sendVideoAgentMessage(params) }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=video-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"video-session.js","sourceRoot":"","sources":["../../../../src/capabilities/agents/tools/video-session.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9H,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAGxG,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAkD;IAC/G,YAAY,CAAC,MAAM,EAAE,mBAAmB,EAAE;QACxC,WAAW,EAAE,qBAAqB,GAAG,uYAAuY;QAC5a,WAAW,EAAE,EAAE,KAAK,EAAE,mBAAm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C,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;AACnG,CAAC"}
|
|
@@ -82,7 +82,7 @@ function normalizeTaskResult(result) {
|
|
|
82
82
|
}
|
|
83
83
|
export function registerGetTaskResultTool(server, client) {
|
|
84
84
|
registerTool(server, "get_task_result", {
|
|
85
|
-
description: "Use this when the user needs output or failure and billing details from an existing Freebeat task. Call after get_task_status returns completed, failed, or action_required. Failed or paused tasks return failure and billing even without final media. Polling a song-driven video may start its final video assembly from already generated assets; it does not regenerate source assets. Song-driven videos from generate_music_video, generate_dance_video, and generate_lyric_video, plus effects, singing, and lip-sync tasks, return result.video_url and usually result.cover_url; music tasks return result.audio_url. Song-driven video assembly still in progress returns running with a message to poll again. Other pending or running tasks return TASK_NOT_COMPLETED. If the task failed, this tool surfaces the backend failure. For Open RPC image/video batches, get result URLs from get_task_status instead.",
|
|
85
|
+
description: "Use this when the user needs output or failure and billing details from an existing Freebeat task. Call after get_task_status returns completed, failed, or action_required. Failed or paused tasks return failure and billing even without final media. When an agent video is action_required, read get_video_session and use send_video_agent_message with the same task_id to continue in either mode. Polling a song-driven video may start its final video assembly from already generated assets; it does not regenerate source assets. Song-driven videos from generate_music_video, generate_dance_video, and generate_lyric_video, plus effects, singing, and lip-sync tasks, return result.video_url and usually result.cover_url; music tasks return result.audio_url. Song-driven video assembly still in progress returns running with a message to poll again. Other pending or running tasks return TASK_NOT_COMPLETED. If the task failed, this tool surfaces the backend failure. For Open RPC image/video batches, get result URLs from get_task_status instead.",
|
|
86
86
|
annotations: { title: "Get task result", ...READ_ONLY_TOOL_ANNOTATIONS, readOnlyHint: false },
|
|
87
87
|
outputSchema: {
|
|
88
88
|
success: z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-task-result.js","sourceRoot":"","sources":["../../../../src/capabilities/tasks/tools/get-task-result.ts"],"names":[],"mappings":"AAAA,OA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,WAAW,CAAC,EAAC,WAAW,EAAC,MAAM,CAAC,YAAY,EAAC,CAAC,CAAC,OAAO;QACjF,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,eAAe,EAAE,MAAM,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,iEAAiE,CAAC,CAAC,CAAC,oDAAoD;QAC7K,OAAO,EAAE,8BAA8B,UAAU,EAAE;KACpD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,MAAiB,EACjB,MAAgD;IAEhD,YAAY,CAAC,MAAM,EACjB,iBAAiB,EACjB;QACE,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"get-task-result.js","sourceRoot":"","sources":["../../../../src/capabilities/tasks/tools/get-task-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB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tD,MAAM,EAAE,gBAAgB;iBACrB,QAAQ,CACP,0EAA0E,CAC3E;YACH,MAAM,EAAE,oBAAoB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC9C,kKAAkK,CACnK;YACD,OAAO,EAAE,CAAC;iBACP,MAAM,EAAE;iBACR,QAAQ,CAAC,wDAAwD,CAAC;YACrE,OAAO,EAAE,aAAa,CAAC,QAAQ,EAAE;YACjC,OAAO,EAAE,aAAa;YACtB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACnC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;YAC3B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACnC;QACD,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;SACtE;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACnD,OAAO,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -62,7 +62,7 @@ function summarizeBatchStatus(batch) {
|
|
|
62
62
|
}
|
|
63
63
|
export function registerGetTaskStatusTool(server, client) {
|
|
64
64
|
registerTool(server, "get_task_status", {
|
|
65
|
-
description: "Use this when the user needs the status of an existing asynchronous Freebeat task. Supports task IDs from generate_music_video, generate_dance_video, generate_lyric_video, music, singing, lip-sync, and effect tools, plus Open RPC image/video batch IDs. Polling a song-driven video may start its final video assembly from already generated assets; it does not regenerate source assets. Song-driven video jobs report running, completed, failed, or action_required; completed videos include video_url, and on action_required
|
|
65
|
+
description: "Use this when the user needs the status of an existing asynchronous Freebeat task. Supports task IDs from generate_music_video, generate_dance_video, generate_lyric_video, music, singing, lip-sync, and effect tools, plus Open RPC image/video batch IDs. Polling a song-driven video may start its final video assembly from already generated assets; it does not regenerate source assets. Song-driven video jobs report running, completed, failed, or action_required; while running, relay the latest step named in message; completed videos include video_url, and on action_required read get_video_session with this task_id and use send_video_agent_message to continue the conversation in either auto or co-create mode. For Open RPC batches, result URLs are returned on completed items; do not call get_task_result for these batches. For other tasks call get_task_result after completed, failed, or action_required. On failures or pauses, explain failure.stage, failure.reason, failure.retryable and billing charged/refunded/net/refund_state; null means not reported, and pending refunds are not refunded credits.",
|
|
66
66
|
annotations: { title: "Get task status", ...READ_ONLY_TOOL_ANNOTATIONS, readOnlyHint: false },
|
|
67
67
|
outputSchema: {
|
|
68
68
|
success: z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-task-status.js","sourceRoot":"","sources":["../../../../src/capabilities/tasks/tools/get-task-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE1F,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAK/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,SAAS,mBAAmB,CAAC,MAAc,EAAE,QAAiB;IAC5D,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,UAA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,EAAE,CAAC;gBACrC,OAAO,GAAG,0EAA0E,CAAC;YACvF,CAAC;iBAAM,IAAI,gBAAgB,KAAK,QAAQ,EAAE,CAAC;gBACzC,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,aAAa,IAAI,cAAc,CAAC;YACrE,CAAC;YAED,OAAO,UAAU,CAAC;gBAChB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,SAAS;gBACT,MAAM,EAAE,gBAAgB;gBACxB,SAAS,EAAE,gBAAgB,KAAK,WAAW,IAAI,MAAM,CAAC,cAAc;oBAClE,CAAC,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS;gBACrF,aAAa,EAAE,MAAM,CAAC,aAAa;gBACnC,OAAO;gBACP,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,WAAW,CAAC,EAAC,WAAW,EAAC,MAAM,CAAC,YAAY,EAAC,CAAC,CAAC,OAAO;gBACjF,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,eAAe,EAAE,MAAM,CAAC,YAAY,KAAK,SAAS;oBAChD,CAAC,CAAC,iEAAiE,CAAC,CAAC,CAAC,SAAS;aAClF,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CO_CREATE_DESCRIPTION = "On freebeat.ai a person creates a video by chatting with a director agent and seeing what it made. In auto mode the agent makes the creative decisions and delivers the film; otherwise it pauses where a person's taste matters. Through these tools you stand where that person stands: read the agent's words and work, and say anything the person could type there, including approval, changes, direction, or handing the rest to auto. Decide whether and how to involve the user from their intent. Credit consent is given when the video starts; continuing this session needs no new consent. Relay any credit notice the agent reports. ";
|
|
3
|
+
export declare const autoModeSchema: z.ZodBoolean;
|
|
4
|
+
export declare const videoTaskIdSchema: z.ZodString;
|
|
5
|
+
export declare const videoSessionSchema: z.ZodObject<{
|
|
6
|
+
task_id: z.ZodString;
|
|
7
|
+
session_url: z.ZodString;
|
|
8
|
+
status: z.ZodEnum<["running", "waiting_for_user", "idle"]>;
|
|
9
|
+
auto_mode: z.ZodNullable<z.ZodBoolean>;
|
|
10
|
+
current_stage: z.ZodNullable<z.ZodString>;
|
|
11
|
+
stages: z.ZodArray<z.ZodObject<{
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
status: z.ZodEnum<["not_started", "queued", "running", "retrying", "pending_review", "approved", "complete", "completed", "failed", "cancelled", "warning", "unknown"]>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
status: "unknown" | "running" | "completed" | "failed" | "queued" | "cancelled" | "not_started" | "retrying" | "pending_review" | "approved" | "complete" | "warning";
|
|
16
|
+
name: string;
|
|
17
|
+
}, {
|
|
18
|
+
status: "unknown" | "running" | "completed" | "failed" | "queued" | "cancelled" | "not_started" | "retrying" | "pending_review" | "approved" | "complete" | "warning";
|
|
19
|
+
name: string;
|
|
20
|
+
}>, "many">;
|
|
21
|
+
waiting_for: z.ZodArray<z.ZodObject<{
|
|
22
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
23
|
+
path: z.ZodString;
|
|
24
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
value: string | number | boolean;
|
|
27
|
+
path: string;
|
|
28
|
+
}, {
|
|
29
|
+
value: string | number | boolean;
|
|
30
|
+
path: string;
|
|
31
|
+
}>, "many">;
|
|
32
|
+
media: z.ZodArray<z.ZodObject<{
|
|
33
|
+
path: z.ZodString;
|
|
34
|
+
url: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
path: string;
|
|
37
|
+
url: string;
|
|
38
|
+
}, {
|
|
39
|
+
path: string;
|
|
40
|
+
url: string;
|
|
41
|
+
}>, "many">;
|
|
42
|
+
}, "strip", z.ZodTypeAny, {
|
|
43
|
+
fields: {
|
|
44
|
+
value: string | number | boolean;
|
|
45
|
+
path: string;
|
|
46
|
+
}[];
|
|
47
|
+
media: {
|
|
48
|
+
path: string;
|
|
49
|
+
url: string;
|
|
50
|
+
}[];
|
|
51
|
+
}, {
|
|
52
|
+
fields: {
|
|
53
|
+
value: string | number | boolean;
|
|
54
|
+
path: string;
|
|
55
|
+
}[];
|
|
56
|
+
media: {
|
|
57
|
+
path: string;
|
|
58
|
+
url: string;
|
|
59
|
+
}[];
|
|
60
|
+
}>, "many">;
|
|
61
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
62
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
63
|
+
parts: z.ZodArray<z.ZodObject<{
|
|
64
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
65
|
+
path: z.ZodString;
|
|
66
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
67
|
+
}, "strip", z.ZodTypeAny, {
|
|
68
|
+
value: string | number | boolean;
|
|
69
|
+
path: string;
|
|
70
|
+
}, {
|
|
71
|
+
value: string | number | boolean;
|
|
72
|
+
path: string;
|
|
73
|
+
}>, "many">;
|
|
74
|
+
media: z.ZodArray<z.ZodObject<{
|
|
75
|
+
path: z.ZodString;
|
|
76
|
+
url: z.ZodString;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
path: string;
|
|
79
|
+
url: string;
|
|
80
|
+
}, {
|
|
81
|
+
path: string;
|
|
82
|
+
url: string;
|
|
83
|
+
}>, "many">;
|
|
84
|
+
type: z.ZodString;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
type: string;
|
|
87
|
+
fields: {
|
|
88
|
+
value: string | number | boolean;
|
|
89
|
+
path: string;
|
|
90
|
+
}[];
|
|
91
|
+
media: {
|
|
92
|
+
path: string;
|
|
93
|
+
url: string;
|
|
94
|
+
}[];
|
|
95
|
+
}, {
|
|
96
|
+
type: string;
|
|
97
|
+
fields: {
|
|
98
|
+
value: string | number | boolean;
|
|
99
|
+
path: string;
|
|
100
|
+
}[];
|
|
101
|
+
media: {
|
|
102
|
+
path: string;
|
|
103
|
+
url: string;
|
|
104
|
+
}[];
|
|
105
|
+
}>, "many">;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
role: "user" | "assistant";
|
|
108
|
+
parts: {
|
|
109
|
+
type: string;
|
|
110
|
+
fields: {
|
|
111
|
+
value: string | number | boolean;
|
|
112
|
+
path: string;
|
|
113
|
+
}[];
|
|
114
|
+
media: {
|
|
115
|
+
path: string;
|
|
116
|
+
url: string;
|
|
117
|
+
}[];
|
|
118
|
+
}[];
|
|
119
|
+
}, {
|
|
120
|
+
role: "user" | "assistant";
|
|
121
|
+
parts: {
|
|
122
|
+
type: string;
|
|
123
|
+
fields: {
|
|
124
|
+
value: string | number | boolean;
|
|
125
|
+
path: string;
|
|
126
|
+
}[];
|
|
127
|
+
media: {
|
|
128
|
+
path: string;
|
|
129
|
+
url: string;
|
|
130
|
+
}[];
|
|
131
|
+
}[];
|
|
132
|
+
}>, "many">;
|
|
133
|
+
artifacts: z.ZodArray<z.ZodObject<{
|
|
134
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
135
|
+
path: z.ZodString;
|
|
136
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
137
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
|
+
value: string | number | boolean;
|
|
139
|
+
path: string;
|
|
140
|
+
}, {
|
|
141
|
+
value: string | number | boolean;
|
|
142
|
+
path: string;
|
|
143
|
+
}>, "many">;
|
|
144
|
+
media: z.ZodArray<z.ZodObject<{
|
|
145
|
+
path: z.ZodString;
|
|
146
|
+
url: z.ZodString;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
path: string;
|
|
149
|
+
url: string;
|
|
150
|
+
}, {
|
|
151
|
+
path: string;
|
|
152
|
+
url: string;
|
|
153
|
+
}>, "many">;
|
|
154
|
+
type: z.ZodString;
|
|
155
|
+
version: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
is_latest: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
type: string;
|
|
159
|
+
fields: {
|
|
160
|
+
value: string | number | boolean;
|
|
161
|
+
path: string;
|
|
162
|
+
}[];
|
|
163
|
+
media: {
|
|
164
|
+
path: string;
|
|
165
|
+
url: string;
|
|
166
|
+
}[];
|
|
167
|
+
version?: number | undefined;
|
|
168
|
+
is_latest?: boolean | undefined;
|
|
169
|
+
}, {
|
|
170
|
+
type: string;
|
|
171
|
+
fields: {
|
|
172
|
+
value: string | number | boolean;
|
|
173
|
+
path: string;
|
|
174
|
+
}[];
|
|
175
|
+
media: {
|
|
176
|
+
path: string;
|
|
177
|
+
url: string;
|
|
178
|
+
}[];
|
|
179
|
+
version?: number | undefined;
|
|
180
|
+
is_latest?: boolean | undefined;
|
|
181
|
+
}>, "many">;
|
|
182
|
+
truncated: z.ZodBoolean;
|
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
status: "running" | "waiting_for_user" | "idle";
|
|
185
|
+
task_id: string;
|
|
186
|
+
session_url: string;
|
|
187
|
+
auto_mode: boolean | null;
|
|
188
|
+
current_stage: string | null;
|
|
189
|
+
stages: {
|
|
190
|
+
status: "unknown" | "running" | "completed" | "failed" | "queued" | "cancelled" | "not_started" | "retrying" | "pending_review" | "approved" | "complete" | "warning";
|
|
191
|
+
name: string;
|
|
192
|
+
}[];
|
|
193
|
+
waiting_for: {
|
|
194
|
+
fields: {
|
|
195
|
+
value: string | number | boolean;
|
|
196
|
+
path: string;
|
|
197
|
+
}[];
|
|
198
|
+
media: {
|
|
199
|
+
path: string;
|
|
200
|
+
url: string;
|
|
201
|
+
}[];
|
|
202
|
+
}[];
|
|
203
|
+
messages: {
|
|
204
|
+
role: "user" | "assistant";
|
|
205
|
+
parts: {
|
|
206
|
+
type: string;
|
|
207
|
+
fields: {
|
|
208
|
+
value: string | number | boolean;
|
|
209
|
+
path: string;
|
|
210
|
+
}[];
|
|
211
|
+
media: {
|
|
212
|
+
path: string;
|
|
213
|
+
url: string;
|
|
214
|
+
}[];
|
|
215
|
+
}[];
|
|
216
|
+
}[];
|
|
217
|
+
artifacts: {
|
|
218
|
+
type: string;
|
|
219
|
+
fields: {
|
|
220
|
+
value: string | number | boolean;
|
|
221
|
+
path: string;
|
|
222
|
+
}[];
|
|
223
|
+
media: {
|
|
224
|
+
path: string;
|
|
225
|
+
url: string;
|
|
226
|
+
}[];
|
|
227
|
+
version?: number | undefined;
|
|
228
|
+
is_latest?: boolean | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
truncated: boolean;
|
|
231
|
+
}, {
|
|
232
|
+
status: "running" | "waiting_for_user" | "idle";
|
|
233
|
+
task_id: string;
|
|
234
|
+
session_url: string;
|
|
235
|
+
auto_mode: boolean | null;
|
|
236
|
+
current_stage: string | null;
|
|
237
|
+
stages: {
|
|
238
|
+
status: "unknown" | "running" | "completed" | "failed" | "queued" | "cancelled" | "not_started" | "retrying" | "pending_review" | "approved" | "complete" | "warning";
|
|
239
|
+
name: string;
|
|
240
|
+
}[];
|
|
241
|
+
waiting_for: {
|
|
242
|
+
fields: {
|
|
243
|
+
value: string | number | boolean;
|
|
244
|
+
path: string;
|
|
245
|
+
}[];
|
|
246
|
+
media: {
|
|
247
|
+
path: string;
|
|
248
|
+
url: string;
|
|
249
|
+
}[];
|
|
250
|
+
}[];
|
|
251
|
+
messages: {
|
|
252
|
+
role: "user" | "assistant";
|
|
253
|
+
parts: {
|
|
254
|
+
type: string;
|
|
255
|
+
fields: {
|
|
256
|
+
value: string | number | boolean;
|
|
257
|
+
path: string;
|
|
258
|
+
}[];
|
|
259
|
+
media: {
|
|
260
|
+
path: string;
|
|
261
|
+
url: string;
|
|
262
|
+
}[];
|
|
263
|
+
}[];
|
|
264
|
+
}[];
|
|
265
|
+
artifacts: {
|
|
266
|
+
type: string;
|
|
267
|
+
fields: {
|
|
268
|
+
value: string | number | boolean;
|
|
269
|
+
path: string;
|
|
270
|
+
}[];
|
|
271
|
+
media: {
|
|
272
|
+
path: string;
|
|
273
|
+
url: string;
|
|
274
|
+
}[];
|
|
275
|
+
version?: number | undefined;
|
|
276
|
+
is_latest?: boolean | undefined;
|
|
277
|
+
}[];
|
|
278
|
+
truncated: boolean;
|
|
279
|
+
}>;
|
|
280
|
+
export type VideoSession = z.infer<typeof videoSessionSchema>;
|
|
281
|
+
export declare function record(value: unknown): Record<string, unknown>;
|
|
282
|
+
export declare function creatorFacingText(value: string): string | undefined;
|
|
283
|
+
export declare function projectVideoSession(taskId: string, sessionUrl: string, host: string, rawState: unknown, rawMessages: unknown, rawAssets: unknown): VideoSession;
|