- Removed the `media` prefix from various commands (`media_grab`, `media_transcribe`, etc.) to simplify usage and improve consistency across the CLI and API. - Updated the corresponding handlers and references in the codebase to reflect the new command names. - Enhanced the README and documentation to clarify the changes in command structure and provide updated examples for users. - Introduced new handlers for `grab`, `transcribe`, `filmstrip`, `waveform`, and `listen`, ensuring they align with the updated command naming conventions. - Improved error handling and validation in the new command implementations for better user experience.
835 B
835 B
@diffusionstudio/dapi
The tool catalog behind dapi: one entry per tool with its name, description, and zod input and output schemas. The app registers the catalog with its MCP server, the renderer validates incoming calls against it, and the CLI derives its commands and help text from it, so the API is described exactly once.
import { catalog, toolByName, Time } from "@diffusionstudio/dapi";
import type { ToolArgs, ToolResult } from "@diffusionstudio/dapi";
const grab = toolByName("grab");
const args: ToolArgs<"grab"> = grab.input.parse({ path: "/clip.mp4", times: ["45f", "1:10"] });
The package is free of Node built-ins so the renderer can import it. The MCP URL the app serves on (MCP_URL) is exported too, for the CLI and the docs the app writes.
Design: docs/mcp-server.md.