Skip to content

The VS Code of video editing, built for agents.

TypeScript

Remove `whoami` command and related references from the CLI and documentation

konstantin-paulus1bcbea609301
diff --git a/README.md b/README.md
index ae05ac14..0749824f 100644
--- a/README.md
+++ b/README.md
@@ -205,7 +205,6 @@ Each command is the MCP tool of the same name: `dapi media grab` is `media_grab`
| `dapi media …` | Inspect a file by id or path: `probe`, `grab`, `filmstrip`, `waveform`, `transcribe`, `listen` |
| `dapi models` / `dapi voices` / `dapi fonts` | Discover generation models, speech voices, local fonts |
| `dapi screenshot` / `dapi logs` | The app itself: capture the window, read recent console output |
-| `dapi whoami` | The authenticated account |
| `dapi report` | Report a bug in the tools or the app: diagnostics bundled, filed as a GitHub issue via `gh` |
Conventions throughout: every result is one JSON object, the same structured content the MCP tool returns; errors go to stderr with exit code `1`. Everything is built to be piped, grepped, and driven by a program.
diff --git a/apps/cli/src/index.ts b/apps/cli/src/index.ts
index 81b176c7..4844baea 100644
--- a/apps/cli/src/index.ts
+++ b/apps/cli/src/index.ts
@@ -218,11 +218,6 @@ program
.description(describe("voices"))
.action(() => run("voices", {}));
-program
- .command("whoami")
- .description(describe("whoami"))
- .action(() => run("whoami", {}));
-
program
.command("logs")
.description(describe("logs"))
diff --git a/apps/desktop/WINDOWS.md b/apps/desktop/WINDOWS.md
index 36fd4ecb..56b07223 100644
--- a/apps/desktop/WINDOWS.md
+++ b/apps/desktop/WINDOWS.md
@@ -282,7 +282,7 @@ Tasks:
Acceptance:
- Connect and disconnect each of Claude Code, Claude Desktop, Cursor,
VS Code, Codex, Gemini CLI on a Windows machine; each agent lists the
- `diffusion` server and can call `whoami`.
+ `diffusion` server and can call `context`.
- After an app update, Claude Desktop still starts `dapi mcp` without
editing its config.
diff --git a/apps/desktop/src/dapi/tools-session.test.ts b/apps/desktop/src/dapi/tools-session.test.ts
index fd7abba5..2eff82f2 100644
--- a/apps/desktop/src/dapi/tools-session.test.ts
+++ b/apps/desktop/src/dapi/tools-session.test.ts
@@ -17,8 +17,8 @@ beforeAll(async () => {
serveCatalog(session, async (tool, args) => {
calls.push({ name: tool.name, args });
switch (tool.name) {
- case "whoami":
- return { user: null };
+ case "voices":
+ return { voices: [] };
case "check":
throw new Error("No project open — run open first");
default:
@@ -54,9 +54,9 @@ describe("serveCatalog", () => {
expect(JSON.stringify(bad.content)).toContain("limit");
expect(calls.length).toBe(before);
- const result = await client.callTool({ name: "whoami", arguments: {} });
- expect(result.structuredContent).toEqual({ user: null });
- expect(calls.at(-1)).toEqual({ name: "whoami", args: {} });
+ const result = await client.callTool({ name: "voices", arguments: {} });
+ expect(result.structuredContent).toEqual({ voices: [] });
+ expect(calls.at(-1)).toEqual({ name: "voices", args: {} });
});
it("returns a handler's failure as a readable error result, not a protocol error", async () => {
diff --git a/apps/desktop/src/projects.ts b/apps/desktop/src/projects.ts
index 71a8b708..5924beef 100644
--- a/apps/desktop/src/projects.ts
+++ b/apps/desktop/src/projects.ts
@@ -468,7 +468,6 @@ const SCRIPTS: Record<string, string> = {
models: "dapi models",
voices: "dapi voices",
fonts: "dapi fonts",
- whoami: "dapi whoami",
logs: "dapi logs",
screenshot: "dapi screenshot",
report: "dapi report",
@@ -635,7 +634,6 @@ All of them talk to the running app, except \`fonts\`.
| \`models\` | \`dapi models [type]\` | Generation models and their per-model constraints. |
| \`voices\` | \`dapi voices\` | Speech voices for \`generate.voice\`. |
| \`fonts\` | \`dapi fonts\` | Local font families, valid as \`fontFamily\`. |
-| \`whoami\` | \`dapi whoami\` | The signed-in account. |
| \`logs\` | \`dapi logs\` | Recent console output from the app. |
| \`screenshot\` | \`dapi screenshot\` | The whole app window as a PNG. |
| \`report\` | \`dapi report <title>\` | File a bug against the editor, with diagnostics attached. |
diff --git a/apps/web/src/dapi/api.tsx b/apps/web/src/dapi/api.tsx
index f2d9c8ca..2d6a170d 100644
--- a/apps/web/src/dapi/api.tsx
+++ b/apps/web/src/dapi/api.tsx
@@ -49,7 +49,6 @@ export function EditorApi() {
navigate(projectRoute(project.id || project.name));
return { id: project.id, name: project.displayName, dir: project.dir };
},
- user: () => auth.user() ?? null,
requireUser() {
const user = auth.user();
if (!user) throw new DapiError("sign-in-required", "Sign in required: AI generation needs a Diffusion Studio account.");
diff --git a/apps/web/src/dapi/handler.ts b/apps/web/src/dapi/handler.ts
index b38372bd..d2964f9b 100644
--- a/apps/web/src/dapi/handler.ts
+++ b/apps/web/src/dapi/handler.ts
@@ -22,7 +22,6 @@ export type ToolContext = {
/** What only the app shell can do: navigate, and know who is signed in. */
app: {
openProject(dir: string): Promise<ToolResult<"open">>;
- user(): User | null;
/** The signed-in user, or a `sign-in-required` error. */
requireUser(): User;
};
diff --git a/apps/web/src/dapi/handlers/index.ts b/apps/web/src/dapi/handlers/index.ts
index 56e8baac..47f6f4ea 100644
--- a/apps/web/src/dapi/handlers/index.ts
+++ b/apps/web/src/dapi/handlers/index.ts
@@ -10,7 +10,6 @@ import { exportScene } from "./export";
import { models } from "./models";
import { voices } from "./voices";
import { fonts } from "./fonts";
-import { whoami } from "./whoami";
import { screenshot } from "./screenshot";
import { mediaProbe } from "./media-probe";
import { mediaGrab } from "./media-grab";
@@ -31,7 +30,6 @@ export const handlers: Handlers = {
models,
voices,
fonts,
- whoami,
screenshot,
media_probe: mediaProbe,
media_grab: mediaGrab,
diff --git a/apps/web/src/dapi/handlers/whoami.ts b/apps/web/src/dapi/handlers/whoami.ts
deleted file mode 100644
index 670e9cc1..00000000
--- a/apps/web/src/dapi/handlers/whoami.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import { toolByName } from "@diffusionstudio/dapi";
-
-import type { ToolHandler } from "../handler";
-
-// The auth record carries identities, provider metadata and avatar URLs;
-// the output schema names the id and the email, and parsing strips the rest.
-export const whoami: ToolHandler<"whoami"> = async (_, ctx) => toolByName("whoami").output.parse({ user: ctx.app.user() });
diff --git a/docs/reference/tools/README.md b/docs/reference/tools/README.md
index f2380d40..bf429fd8 100644
--- a/docs/reference/tools/README.md
+++ b/docs/reference/tools/README.md
@@ -45,7 +45,6 @@ Every tool runs inside the app, so the app has to be running. Over MCP that is a
| [`media_listen`](./media/listen.md) | `dapi media listen` | Listen to audio |
| [`models`](./models.md) | `dapi models` | Generation models |
| [`voices`](./voices.md) | `dapi voices` | Speech voices |
-| [`whoami`](./whoami.md) | `dapi whoami` | Signed-in account |
| [`logs`](./logs.md) | `dapi logs` | App logs |
| [`screenshot`](./screenshot.md) | `dapi screenshot` | Window screenshot |
| [`fonts`](./fonts.md) | `dapi fonts` | Local fonts |
@@ -56,7 +55,7 @@ How the surface is divided:
- **The project loop.** [`open`](./open.md) a folder, edit its JSX, [`context`](./context.md) for what the source cannot say, [`capture`](./capture.md) and [`check`](./check.md) to verify, [`export`](./export.md) when asked.
- **Media inspection** (`media_*`): a file by path, without adding it to the project. Absolute paths and URLs work with or without an open project; library paths (`b-roll/clip.mp4`) need one.
- **What a declaration may name.** [`models`](./models.md), [`voices`](./voices.md), [`fonts`](./fonts.md). Generation itself is declared in the project module (`generate.*`, see [jsx/generate.md](../jsx/generate.md)); no tool generates.
-- **The app and the machine.** [`whoami`](./whoami.md), [`logs`](./logs.md), [`screenshot`](./screenshot.md), [`report`](./report.md).
+- **The app and the machine.** [`logs`](./logs.md), [`screenshot`](./screenshot.md), [`report`](./report.md).
## Downloading footage
diff --git a/docs/reference/tools/media/listen.md b/docs/reference/tools/media/listen.md
index a4dcc40d..e1b22a13 100644
--- a/docs/reference/tools/media/listen.md
+++ b/docs/reference/tools/media/listen.md
@@ -16,7 +16,7 @@ Prompt a multimodal model for a semantic analysis of an audio track and return i
| `start` | `Time` | `-s, --start <time>` | start of the segment to analyze (default: 0); timestamps in the analysis are relative to this point |
| `end` | `Time` | `-e, --end <time>` | end of the segment to analyze (default: media duration) |
-With no `prompt` it returns a general description of what is heard; with one it answers that question about the audio (e.g. "who is speaking?", "what music is playing?", "summarize what is said"). See [the prompt guide](../../../guides/prompts/media-listen.md) for prompts that work. Costs credits, and needs a signed-in account ([`whoami`](../whoami.md)).
+With no `prompt` it returns a general description of what is heard; with one it answers that question about the audio (e.g. "who is speaking?", "what music is playing?", "summarize what is said"). See [the prompt guide](../../../guides/prompts/media-listen.md) for prompts that work. Costs credits, and needs a signed-in account; signed out, it fails with `sign-in-required`.
## Output
diff --git a/docs/reference/tools/whoami.md b/docs/reference/tools/whoami.md
deleted file mode 100644
index 8d67f713..00000000
--- a/docs/reference/tools/whoami.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# whoami
-
-Report the authenticated account, or null if signed out.
-
-| | |
-| --- | --- |
-| MCP tool | `whoami` |
-| CLI | `dapi whoami` |
-
-## Input
-
-None.
-
-## Output
-
-One JSON object:
-
-```ts
-{ user: { id: string; email?: string } | null }
-```
diff --git a/packages/dapi/src/catalog.ts b/packages/dapi/src/catalog.ts
index f8262b2f..5770e8bb 100644
--- a/packages/dapi/src/catalog.ts
+++ b/packages/dapi/src/catalog.ts
@@ -12,7 +12,6 @@ import { check } from "./tools/check";
import { exportScene } from "./tools/export";
import { models } from "./tools/models";
import { voices } from "./tools/voices";
-import { whoami } from "./tools/whoami";
import { logs } from "./tools/logs";
import { screenshot } from "./tools/screenshot";
import { mediaProbe } from "./tools/media-probe";
@@ -43,7 +42,6 @@ export const catalog = [
mediaListen,
models,
voices,
- whoami,
logs,
screenshot,
fonts,
diff --git a/packages/dapi/src/tools/whoami.ts b/packages/dapi/src/tools/whoami.ts
deleted file mode 100644
index d088db34..00000000
--- a/packages/dapi/src/tools/whoami.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-import { z } from "zod";
-import { defineTool } from "../tool";
-
-export const whoami = defineTool({
- name: "whoami",
- title: "Signed-in account",
- description: "Report the authenticated account, or null if signed out.",
- input: z.object({}),
- output: z.object({
- user: z.object({ id: z.string(), email: z.string().optional() }).nullable(),
- }),
- environment: "renderer",
-});