konstantin-paulus 9e8b209f04 Refactor project handling and update request parameters
- Updated the `ProjectInfo` documentation to clarify project folder definitions.
- Changed request parameters in `MainRequestMap` for `PROJECTS_LIST` and `PROJECTS_RESOLVE` to use `dirs` and `dir` respectively, enhancing clarity and consistency.
- Refactored the `listProjects` function to accept an array of directories instead of a single root, improving project listing logic.
- Adjusted the `resolveProject` function to streamline project resolution based on directory input.
- Updated various components to reflect changes in project data handling, ensuring compatibility with the new structure.
2026-09-13 12:00:54 +02:00
..

@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("media_grab");
const args: ToolArgs<"media_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.