konstantin-paulus d2f0ecb1de Enhance CLI and Desktop Functionality
- Updated the CLI to include a new `window` command for managing the application window state (show/hide).
- Improved the background launch logic to prevent launching the app if it is already running in the background.
- Added new tray icons for different application states (busy, idle, window) to enhance user experience.
- Refactored the `agent-chat` module to improve the handling of the agent chat endpoint and its lifecycle.
- Introduced a `WindowHost` class to manage the main window's lifecycle, ensuring it only exists when needed and integrates with the tray functionality.
- Removed the deprecated `headless` module and adjusted related logic to streamline the application flow.
- Updated the DAPI server to support window management, allowing tools to interact with the main window effectively.
2026-10-01 09:11:07 +02:00
..
2026-10-01 09:11:07 +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.