The open source AI video agent: turns any coding agent into a video agent, with an editor to change anything it makes.
Desktop: no Gemini CLI agent; Google stopped serving it to personal accounts (#87)
riverisbuildingbd811486aff5
diff --git a/.changeset/no-gemini-cli.md b/.changeset/no-gemini-cli.mdnew file mode 100644index 0000000..de5ab86--- /dev/null+++ b/.changeset/no-gemini-cli.md@@ -0,0 +1,6 @@+---+'@openfilm/desktop': patch+'openfilm': patch+---++Desktop: Gemini CLI is no longer one of the chat's agents. Google stopped serving it to personal accounts on June 18, 2026; Gemini models are still there through Your own key and as a media service.diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.ymlindex 9504673..20ffca2 100644--- a/.github/ISSUE_TEMPLATE/bug_report.yml+++ b/.github/ISSUE_TEMPLATE/bug_report.yml@@ -27,7 +27,6 @@ body:- Claude Code- Codex- Cursor- - Gemini CLI- Other (say which below)validations:required: truediff --git a/apps/desktop/chat/src/components/AgentIcons.tsx b/apps/desktop/chat/src/components/AgentIcons.tsxindex 58acf55..af9bcbd 100644--- a/apps/desktop/chat/src/components/AgentIcons.tsx+++ b/apps/desktop/chat/src/components/AgentIcons.tsx@@ -11,7 +11,7 @@* used as our own marks.*/-export type AgentIconId = 'claude' | 'codex' | 'cursor' | 'copilot' | 'gemini' | 'opencode' | 'codebuddy' | 'qwen' | 'kimi' | 'minimax' | 'devin';+export type AgentIconId = 'claude' | 'codex' | 'cursor' | 'copilot' | 'opencode' | 'codebuddy' | 'qwen' | 'kimi' | 'minimax' | 'devin';/** Codex is an OpenAI product and uses the OpenAI mark. */const PATHS: Record<AgentIconId, string> = {@@ -19,7 +19,6 @@ const PATHS: Record<AgentIconId, string> = {codex: 'M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z',cursor: 'M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23',copilot: 'M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z',- gemini: 'M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81',opencode: 'M22 24H2V0h20zM17 4.8H7v14.4h10z',codebuddy: 'M18.777 1.647c.28-.02.536.114.972.51 1.018.926 2.437 2.828 3.318 4.452l.34.631.482.24.11.06v3.638a5.206 5.206 0 00-5.32-1.23c-.491.166-1.021.471-2.08 1.082l-6.09 3.516c-1.057.61-1.586.916-1.975 1.259a5.208 5.208 0 00-1.493 5.572c.165.49.471 1.02 1.082 2.08l.315.543h-3.26c-.685 0-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846 11.846 0 01-.057-1.711l.02-.444-.667-1.18C2.1 15.622 1.445 14.078 1.192 12.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175 3.162-.017 5.575.41l.25.043.551-.487c.915-.81 1.522-1.264 2.641-1.962 1.167-.73 2.484-1.331 3.967-1.807l.476-.152.261-.688c.937-2.471 1.896-4.293 2.58-4.9.235-.21.25-.22.422-.23zM12.139 18.2a1.203 1.203 0 011.642.44l1.296 2.243a1.204 1.204 0 01-2.083 1.203l-1.296-2.243a1.203 1.203 0 01.44-1.644zM18.629 14.452a1.203 1.203 0 011.642.44l1.295 2.244a1.203 1.203 0 11-2.083 1.203l-1.295-2.243a1.203 1.203 0 01.44-1.644z',qwen: 'M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z',diff --git a/apps/desktop/chat/src/components/ProjectConversation.tsx b/apps/desktop/chat/src/components/ProjectConversation.tsxindex 50a416f..5629f75 100644--- a/apps/desktop/chat/src/components/ProjectConversation.tsx+++ b/apps/desktop/chat/src/components/ProjectConversation.tsx@@ -619,8 +619,8 @@ function WorkSummary({ items, durationMs }: { items: AgentActivityItem[]; durati}const AGENT_NAMES: Record<string, string> = {- codex: 'Codex', claude: 'Claude Code', gemini: 'Gemini CLI', copilot: 'GitHub Copilot', cursor: 'Cursor',- opencode: 'OpenCode', codebuddy: 'CodeBuddy', qwen: 'Qwen Code', kimi: 'Kimi', minimax: 'MiniMax Code',+ codex: 'Codex', claude: 'Claude Code', copilot: 'GitHub Copilot', cursor: 'Cursor', opencode: 'OpenCode',+ codebuddy: 'CodeBuddy', qwen: 'Qwen Code', kimi: 'Kimi', minimax: 'MiniMax Code',};/** The hover-only line: transparent but keeping its space (nothing jumps as the mouse moves); always shown on devices without hover. */diff --git a/apps/desktop/chat/src/components/TurnLog.tsx b/apps/desktop/chat/src/components/TurnLog.tsxindex 22dbd8d..6727901 100644--- a/apps/desktop/chat/src/components/TurnLog.tsx+++ b/apps/desktop/chat/src/components/TurnLog.tsx@@ -44,7 +44,7 @@ export function TurnLogButton({ project, turnId, live = false }: { project: stri}/** the agents started with a logging switch in Developer mode (src/agent-logs.mjs) */-const LOGGED_AGENTS = ['gemini', 'qwen', 'codebuddy', 'opencode'];+const LOGGED_AGENTS = ['qwen', 'codebuddy', 'opencode'];/** Why a turn has no model requests, as its agent and what it was started with say. */function noCallsReason(agent: string | null, log: Item | null | undefined): string {diff --git a/apps/desktop/chat/src/lib/desktop-bridge.ts b/apps/desktop/chat/src/lib/desktop-bridge.tsindex 2ba7091..0c707ad 100644--- a/apps/desktop/chat/src/lib/desktop-bridge.ts+++ b/apps/desktop/chat/src/lib/desktop-bridge.ts@@ -10,10 +10,10 @@import type { Balance } from './balance';/** The coding agents the shell can connect to its MCP endpoint. */-export type DesktopAgentId = 'claude' | 'codex' | 'cursor' | 'copilot' | 'gemini' | 'opencode' | 'codebuddy' | 'devin';+export type DesktopAgentId = 'claude' | 'codex' | 'cursor' | 'copilot' | 'opencode' | 'codebuddy' | 'devin';-/** The chat's agents: the person's own (Codex, Claude Code, Gemini CLI, …), and the app's own on their own key. */-export type LocalAgentId = 'claude' | 'codex' | 'gemini' | 'copilot' | 'cursor' | 'opencode' | 'codebuddy' | 'qwen' | 'kimi' | 'minimax' | 'byok';+/** The chat's agents: the person's own (Codex, Claude Code, Qwen Code, …), and the app's own on their own key. */+export type LocalAgentId = 'claude' | 'codex' | 'copilot' | 'cursor' | 'opencode' | 'codebuddy' | 'qwen' | 'kimi' | 'minimax' | 'byok';/** One agent as the app's roster has it (apps/desktop/src/agent-roster.mjs; Studio's lib/host.ts HostAgent). */export interface RosterAgent {diff --git a/apps/desktop/chat/src/state/local-agent-store.ts b/apps/desktop/chat/src/state/local-agent-store.tsindex 087a0c7..0ae27bf 100644--- a/apps/desktop/chat/src/state/local-agent-store.ts+++ b/apps/desktop/chat/src/state/local-agent-store.ts@@ -22,7 +22,7 @@ export type AgentPick = LocalAgentId;type ConfigOptions = NonNullable<LocalAgentSessionInfo['configOptions']>;-const AGENT_IDS: readonly LocalAgentId[] = ['codex', 'claude', 'gemini', 'copilot', 'cursor', 'opencode', 'codebuddy', 'qwen', 'kimi', 'minimax', 'byok'];+const AGENT_IDS: readonly LocalAgentId[] = ['codex', 'claude', 'copilot', 'cursor', 'opencode', 'codebuddy', 'qwen', 'kimi', 'minimax', 'byok'];const isAgent = (v: unknown): v is LocalAgentId => AGENT_IDS.includes(v as LocalAgentId);interface Persisted {diff --git a/apps/desktop/src/agent-installation.mjs b/apps/desktop/src/agent-installation.mjsindex 2298d00..b65059e 100644--- a/apps/desktop/src/agent-installation.mjs+++ b/apps/desktop/src/agent-installation.mjs@@ -1,5 +1,5 @@/**- * Where the person's own agents are (agents.mjs AGENTS: Claude Code, Codex, Gemini CLI, …). Only real installations count: a config folder survives an+ * Where the person's own agents are (agents.mjs AGENTS: Claude Code, Codex, Qwen Code, …). Only real installations count: a config folder survives an* uninstall and is never evidence. On Windows an install by npm, pnpm or Yarn leaves a `.cmd` shim, which no program* can start without a shell: what it runs is used instead (cmdTarget), and one that cannot be read is started through* cmd.exe (agents.mjs). A program the person chose themselves (Settings → Agents → Locate) comes before any of these.@@ -13,7 +13,6 @@ import { delimiter, dirname, isAbsolute, join } from 'node:path';export const AGENT_DOWNLOADS = Object.freeze({claude: 'https://claude.com/download',codex: 'https://developers.openai.com/codex',- gemini: 'https://geminicli.com',copilot: 'https://github.com/features/copilot/cli',cursor: 'https://cursor.com/cli',opencode: 'https://opencode.ai/download',@@ -30,7 +29,6 @@ export const AGENT_DOWNLOADS = Object.freeze({export const AGENT_PROGRAMS = Object.freeze({claude: { names: ['claude'] },codex: { names: ['codex'] },- gemini: { names: ['gemini'] },copilot: { names: ['copilot'] },cursor: { names: ['cursor-agent'] },opencode: { names: ['opencode'], dirs: (home) => [join(home, '.opencode', 'bin')] },diff --git a/apps/desktop/src/agent-installation.test.mjs b/apps/desktop/src/agent-installation.test.mjsindex 6291019..9c3ae28 100644--- a/apps/desktop/src/agent-installation.test.mjs+++ b/apps/desktop/src/agent-installation.test.mjs@@ -49,9 +49,9 @@ const npmShim = (rel) => `@ECHO off\r\nGOTO start\r\n:find_dp0\r\nSET dp0=%~dp0\test("npm's shim as it is written today: what it runs, never the node.exe it checks for first", () => {const npm = mkdtempSync(join(tmpdir(), 'of-npm-'));- const script = put(join(npm, 'node_modules', '@google', 'gemini-cli', 'dist', 'index.js'));- put(join(npm, 'gemini.cmd'), npmShim('node_modules\\@google\\gemini-cli\\dist\\index.js'));- assert.equal(cmdTarget(join(npm, 'gemini.cmd')), script);+ const script = put(join(npm, 'node_modules', '@qwen-code', 'qwen-code', 'cli.js'));+ put(join(npm, 'qwen.cmd'), npmShim('node_modules\\@qwen-code\\qwen-code\\cli.js'));+ assert.equal(cmdTarget(join(npm, 'qwen.cmd')), script);});test("Codex's npm shim: its own program for this machine's chip, not the script that starts it", () => {@@ -179,16 +179,16 @@ test('a program found some other way (a Store app) is used last', () => {test('the report: every folder searched, each file with the name, what a shim runs, and what cannot be started', () => {const home = mkdtempSync(join(tmpdir(), 'of-home-'));const npm = join(home, 'npm');- const script = put(join(npm, 'node_modules', '@google', 'gemini-cli', 'dist', 'index.js'));- put(join(npm, 'gemini'), '#!/bin/sh');- put(join(npm, 'gemini.cmd'), npmShim('node_modules\\@google\\gemini-cli\\dist\\index.js'));- put(join(npm, 'gemini.ps1'), '');- const report = searchReport('gemini', { home, env: { PATH: `${npm};${npm.toUpperCase()}` }, pathDirs: [join(home, 'other')], win: true });+ const script = put(join(npm, 'node_modules', '@qwen-code', 'qwen-code', 'cli.js'));+ put(join(npm, 'qwen'), '#!/bin/sh');+ put(join(npm, 'qwen.cmd'), npmShim('node_modules\\@qwen-code\\qwen-code\\cli.js'));+ put(join(npm, 'qwen.ps1'), '');+ const report = searchReport('qwen', { home, env: { PATH: `${npm};${npm.toUpperCase()}` }, pathDirs: [join(home, 'other')], win: true });assert.deepEqual(report.searched, [npm, join(home, 'other')], 'each folder once, whatever its case');assert.deepEqual(report.files, [- { file: join(npm, 'gemini'), runs: join(npm, 'gemini'), usable: false },- { file: join(npm, 'gemini.cmd'), runs: script, usable: true },- { file: join(npm, 'gemini.ps1'), runs: null, usable: false },+ { file: join(npm, 'qwen'), runs: join(npm, 'qwen'), usable: false },+ { file: join(npm, 'qwen.cmd'), runs: script, usable: true },+ { file: join(npm, 'qwen.ps1'), runs: null, usable: false },]);});diff --git a/apps/desktop/src/agent-logs.mjs b/apps/desktop/src/agent-logs.mjsindex 0346cf1..58c246b 100644--- a/apps/desktop/src/agent-logs.mjs+++ b/apps/desktop/src/agent-logs.mjs@@ -1,14 +1,9 @@/**- * What the person's own Gemini CLI, Qwen Code, CodeBuddy and OpenCode sent their models in a turn. Their own records+ * What the person's own Qwen Code, CodeBuddy and OpenCode sent their models in a turn. Their own records* keep the conversation without the system prompt or the tools, so each is started with its own logging switch* (official, local only), writing into a folder of the app's for that one process, and a turn's requests are read* from there once it ends, in the shape agent-records.mjs gives Claude Code's, Codex's, Kimi's and Copilot's.*- * Gemini CLI its telemetry to a local file (GEMINI_TELEMETRY_TARGET=local, _OUTFILE): records of pretty JSON one- * after the other. Each `gemini_cli.api_request` has the contents as sent (`request_text`), its- * `llm_call` span (the same span id) the system instructions and the tools, the next- * `gemini_cli.api_response` of its prompt id the answer's chunks and the usage. Prompts are in the- * records by Gemini CLI's own default (logPrompts), which the app leaves as the person has it.* Qwen Code `--openai-logging --openai-logging-dir`: one JSON per request, the body sent (OpenAI's chat format:* its system message, messages, tools) and the answer whole, with the session it was for.* CodeBuddy its raw request and response bodies to files (OTEL_LOG_RAW_API_BODIES=file:<dir>), with an@@ -34,7 +29,7 @@ import { join } from 'node:path';import { gunzipSync } from 'node:zlib';/** The agents started with a logging switch. */-export const LOGGED_AGENTS = Object.freeze(['gemini', 'qwen', 'codebuddy', 'opencode']);+export const LOGGED_AGENTS = Object.freeze(['qwen', 'codebuddy', 'opencode']);/** a process's logs are kept this long */const LOG_KEEP_DAYS = 7;@@ -44,10 +39,10 @@ const LOG_MAX = 256 * 1024 * 1024;const RECEIVE_MAX = 64 * 1024 * 1024;/**- * How long after a turn its requests are all in the log: Gemini CLI writes them in batches (every few seconds),- * OpenCode sends them so; Qwen Code and CodeBuddy as each answer ends.+ * How long after a turn its requests are all in the log: OpenCode sends them in batches (every few seconds); Qwen Code+ * and CodeBuddy write them as each answer ends.*/-export const LOG_SETTLE_MS = Object.freeze({ gemini: 6000, opencode: 6000 });+export const LOG_SETTLE_MS = Object.freeze({ opencode: 6000 });const str = (v) => (typeof v === 'string' ? v : v == null ? '' : JSON.stringify(v));const parse = (v, fallback = null) => { if (typeof v !== 'string') return v ?? fallback; try { return JSON.parse(v); } catch { return fallback; } };@@ -69,9 +64,6 @@ const mentions = (file, re) => { try { return re.test(readFileSync(file, 'utf8')/** Whether the person has set the agent's telemetry or logging themselves: then the app leaves it as it is. */export function ownLogging(agent, { shell = {}, home = homedir(), cwd = '' } = {}) {switch (agent) {- case 'gemini':- return setInShell(shell, /^(GEMINI_TELEMETRY_|OTEL_)/)- || [join(home, '.gemini', 'settings.json'), cwd && join(cwd, '.gemini', 'settings.json')].some((f) => f && mentions(f, /"telemetry"\s*:/));case 'qwen':return [join(home, '.qwen', 'settings.json'), cwd && join(cwd, '.qwen', 'settings.json')].some((f) => f && mentions(f, /"enableOpenAILogging"\s*:\s*true/));case 'codebuddy': return setInShell(shell, /^OTEL_LOG_RAW_API_BODIES$/);@@ -114,8 +106,6 @@ export async function logSwitches(agent, { base, shell = {}, home = homedir(), cmkdirSync(dir, { recursive: true });const on = { ...none, log: { agent, dir } };switch (agent) {- case 'gemini':- return { ...on, env: { GEMINI_TELEMETRY_ENABLED: 'true', GEMINI_TELEMETRY_TARGET: 'local', GEMINI_TELEMETRY_OUTFILE: join(dir, 'telemetry.log'), GEMINI_TELEMETRY_TRACES_ENABLED: 'true' } };case 'qwen':return { ...on, args: ['--openai-logging', '--openai-logging-dir', dir] };case 'codebuddy':@@ -380,133 +370,6 @@ export function codebuddyCalls(dir, { sessionId, from = 0, to = Infinity } = {})return calls.sort((a, b) => a.startedAt - b.startedAt);}-/* ── Gemini CLI ──────────────────────────────────────────────────────────── */--/** The records of a Gemini CLI telemetry file: JSON values one after the other, each split where its braces close. */-export function splitRecords(raw) {- const out = [];- let depth = 0;- let inString = false;- let escaped = false;- let start = -1;- for (let i = 0; i < raw.length; i += 1) {- const c = raw[i];- if (inString) {- if (escaped) escaped = false;- else if (c === '\\') escaped = true;- else if (c === '"') inString = false;- continue;- }- if (c === '"') inString = true;- else if (c === '{' || c === '[') { if (depth++ === 0) start = i; }- else if ((c === '}' || c === ']') && depth > 0 && --depth === 0) {- try { out.push(JSON.parse(raw.slice(start, i + 1))); } catch { /* a record cut short */ }- }- }- return out;-}--/** a span's time ([seconds, nanoseconds]) in ms */-const hrMs = (t) => (Array.isArray(t) ? Number(t[0]) * 1000 + Math.round(Number(t[1]) / 1e6) : null);--/** Gemini's content parts, as the turn log has them; a function's response is a message of its own. */-function geminiMessages(contents) {- const out = [];- for (const c of Array.isArray(contents) ? contents : []) {- let own = [];- const results = [];- for (const p of c?.parts ?? []) {- /* what Gemini CLI puts first by itself: the date, the system, the folder */- if (c.role !== 'model' && typeof p?.text === 'string' && /^\s*<session_context>/.test(p.text)) {- if (own.length) out.push({ role: 'user', content: own });- own = [];- out.push({ role: 'context', as: 'user', label: 'session_context', content: [text(p.text)] });- } else if (typeof p?.text === 'string') own.push(p.thought ? { type: 'thinking', thinking: p.text } : text(p.text));- else if (p?.functionCall) own.push({ type: 'toolCall', id: String(p.functionCall.id ?? ''), name: String(p.functionCall.name ?? ''), arguments: p.functionCall.args ?? {} });- else if (p?.functionResponse) {- const r = p.functionResponse;- const said = r.response?.output ?? r.response?.error ?? r.response;- results.push({ role: 'toolResult', toolCallId: String(r.id ?? ''), toolName: String(r.name ?? 'tool'), content: [text(str(said))], isError: r.response?.error != null });- } else if (p?.inlineData) own.push(picture(p.inlineData.mimeType, p.inlineData.data));- else if (p) own.push({ type: 'other', value: p });- }- if (own.length) out.push({ role: c.role === 'model' ? 'assistant' : 'user', content: own });- out.push(...results);- }- return out;-}--/** An answer's chunks (a stream's, as Gemini CLI keeps them) joined into its parts. */-function geminiAnswer(chunks) {- const parts = [];- let finish = null;- for (const chunk of Array.isArray(chunks) ? chunks : [chunks]) {- const candidate = chunk?.candidates?.[0];- if (candidate?.finishReason) finish = candidate.finishReason;- for (const p of candidate?.content?.parts ?? []) {- const last = parts[parts.length - 1];- if (typeof p?.text === 'string') {- const kind = p.thought ? 'thinking' : 'text';- if (last?.type === kind) last[kind] += p.text;- else parts.push(kind === 'thinking' ? { type: 'thinking', thinking: p.text } : text(p.text));- } else if (p?.functionCall) parts.push({ type: 'toolCall', id: String(p.functionCall.id ?? ''), name: String(p.functionCall.name ?? ''), arguments: p.functionCall.args ?? {} });- else if (p) parts.push({ type: 'other', value: p });- }- }- return { parts, finish };-}--/** Gemini's tools (`[{ functionDeclarations: [...] }]`), each as the turn log has it. */-const geminiTools = (tools) => (Array.isArray(tools) ? tools.flatMap((t) => (Array.isArray(t?.functionDeclarations)- ? t.functionDeclarations.map((f) => ({ name: f?.name, description: f?.description, parameters: f?.parametersJsonSchema ?? f?.parameters }))- : [{ name: Object.keys(t ?? {})[0] ?? 'tool', description: '', parameters: t }])) : null);--/**- * The requests of one session in Gemini CLI's telemetry records whose asking was between `from` and `to` (ms).- * Calls Gemini CLI makes for itself (which model to use: role `utility_router`) are named as its own.- */-export function geminiCallsOf(records, { sessionId, from = 0, to = Infinity } = {}) {- const spans = new Map();- for (const r of records) if (r?._spanContext?.spanId && r.name === 'llm_call') spans.set(r._spanContext.spanId, r);- const logs = records.filter((r) => typeof r?.attributes?.['event.name'] === 'string' && (!sessionId || r.attributes['session.id'] === sessionId));- const calls = [];- logs.forEach((r, i) => {- const a = r.attributes;- if (a['event.name'] !== 'gemini_cli.api_request') return;- const at = ms(a['event.timestamp']) ?? hrMs(r.hrTime) ?? 0;- if (at < from || at > to) return;- /* its answer (or its error): the next of its prompt id after it */- const reply = logs.slice(i + 1).find((x) => x.attributes.prompt_id === a.prompt_id && /^gemini_cli\.api_(response|error)$/.test(x.attributes['event.name']));- const span = spans.get(r.spanContext?.spanId);- const sa = span?.attributes ?? {};- const system = parse(sa['gen_ai.system_instructions']);- const ra = reply?.attributes ?? {};- const { parts, finish } = geminiAnswer(parse(ra.response_text, []));- const input = Number(ra.input_token_count) || 0;- const cached = Number(ra.cached_content_token_count) || 0;- const thoughts = Number(ra.thoughts_token_count) || 0;- const answer = ra['event.name'] === 'gemini_cli.api_error'- ? { role: 'assistant', content: [], stopReason: 'error', errorMessage: str(ra.error ?? ra.error_message ?? 'error') }- : reply ? {- role: 'assistant', content: parts,- usage: { input: Math.max(0, input - cached), cacheRead: cached, cacheWrite: 0, output: (Number(ra.output_token_count) || 0) + thoughts, reasoning: thoughts },- stopReason: finish ?? (Array.isArray(ra.finish_reasons) ? ra.finish_reasons[0] : null) ?? null, ...(ra.model ? { responseModel: String(ra.model) } : {}),- } : null;- const role = String(a.role ?? 'main');- calls.push({- startedAt: at, ms: Number(ra.duration_ms) || (ms(ra['event.timestamp']) ?? at) - at,- messages: geminiMessages(parse(a.request_text, [])),- systemPrompt: typeof system === 'string' ? system : system ? str(system) : null,- tools: span ? geminiTools(parse(sa['gen_ai.tool.definitions'], [])) : null,- answer, settings: { model: a.model ?? null, auth: a.auth_type ?? null },- ...(role !== 'main' ? { thread: { id: role, label: role } } : {}),- });- });- return calls;-}--export const geminiCalls = (file, opts) => geminiCallsOf(splitRecords(readText(file)), opts);-/* ── OpenCode ────────────────────────────────────────────────────────────── *//** The AI SDK's prompt (system, user, assistant, tool messages, each its parts), as the turn log has it. */@@ -599,7 +462,6 @@ export function agentLogCalls({ agent, sessionId, log, from = 0, to = Infinity }if (!dir || !existsSync(dir)) return null;const opts = { sessionId, from, to };switch (agent) {- case 'gemini': return { file: join(dir, 'telemetry.log'), calls: geminiCalls(join(dir, 'telemetry.log'), opts) };case 'qwen': return { file: dir, calls: qwenCalls(dir, opts) };case 'codebuddy': return { file: join(dir, 'index.jsonl'), calls: codebuddyCalls(dir, opts) };case 'opencode': return { file: join(dir, 'spans.jsonl'), calls: opencodeCalls(join(dir, 'spans.jsonl'), opts) };diff --git a/apps/desktop/src/agent-logs.test.mjs b/apps/desktop/src/agent-logs.test.mjsindex cf66dae..f322c59 100644--- a/apps/desktop/src/agent-logs.test.mjs+++ b/apps/desktop/src/agent-logs.test.mjs@@ -5,7 +5,7 @@ import { request } from 'node:http';import { tmpdir } from 'node:os';import { join } from 'node:path';import { gzipSync } from 'node:zlib';-import { agentLogCalls, codebuddyCalls, geminiCallsOf, logSwitches, opencodeCalls, ownLogging, qwenCalls, spanReceiver, splitRecords } from './agent-logs.mjs';+import { agentLogCalls, codebuddyCalls, logSwitches, opencodeCalls, ownLogging, qwenCalls, spanReceiver } from './agent-logs.mjs';import { agentRecordCalls } from './agent-records.mjs';const at = (s) => new Date(Date.UTC(2026, 9, 15, 10, 0, s)).toISOString();@@ -16,26 +16,19 @@ const jsonl = (rows) => `${rows.map((r) => JSON.stringify(r)).join('\n')}\n`;test('each agent is started with its own logging switch into a folder of its process, never over a setting of the person\'s', async () => {const base = temp('logs');const home = temp('home');- const gemini = await logSwitches('gemini', { base, home });- assert.equal(gemini.log.agent, 'gemini');- assert.ok(gemini.log.dir.startsWith(join(base, 'gemini')) && existsSync(gemini.log.dir));- assert.deepEqual(gemini.env, { GEMINI_TELEMETRY_ENABLED: 'true', GEMINI_TELEMETRY_TARGET: 'local', GEMINI_TELEMETRY_OUTFILE: join(gemini.log.dir, 'telemetry.log'), GEMINI_TELEMETRY_TRACES_ENABLED: 'true' });- assert.ok(!('GEMINI_TELEMETRY_LOG_PROMPTS' in gemini.env), 'prompt logging as the person has it (on by Gemini CLI\'s default)');const qwen = await logSwitches('qwen', { base, home });+ assert.equal(qwen.log.agent, 'qwen');+ assert.ok(qwen.log.dir.startsWith(join(base, 'qwen')) && existsSync(qwen.log.dir));assert.deepEqual(qwen.args, ['--openai-logging', '--openai-logging-dir', qwen.log.dir], 'its folder given, never the project\'s logs/openai');const codebuddy = await logSwitches('codebuddy', { base, home, shell: { DISABLE_TELEMETRY: '1' } });assert.deepEqual(codebuddy.env, { OTEL_LOG_RAW_API_BODIES: `file:${codebuddy.log.dir}` });assert.deepEqual((await logSwitches('codebuddy', { base, home })).log, { agent: 'codebuddy', none: 'sendsMore' }, 'its traces go to its makers: they would name each file');assert.deepEqual((await logSwitches('codebuddy', { base, home, shell: { OTEL_TRACES_EXPORTER: 'none' } })).log.dir ? 'on' : 'off', 'on');- assert.deepEqual((await logSwitches('gemini', { base, home, shell: { OTEL_EXPORTER_OTLP_ENDPOINT: 'http://x' } })).log, { agent: 'gemini', none: 'own' });assert.deepEqual((await logSwitches('opencode', { base, home, shell: { OPENCODE_CONFIG_CONTENT: '{}' } })).log, { agent: 'opencode', none: 'own' });- mkdirSync(join(home, '.gemini'), { recursive: true });- writeFileSync(join(home, '.gemini', 'settings.json'), '{ "telemetry": { "enabled": true, "target": "gcp" } }');- assert.equal(ownLogging('gemini', { home }), true, 'their own telemetry settings are left as they are');mkdirSync(join(home, '.qwen'), { recursive: true });writeFileSync(join(home, '.qwen', 'settings.json'), '{ "model": { "enableOpenAILogging": true } }');- assert.equal(ownLogging('qwen', { home }), true);+ assert.equal(ownLogging('qwen', { home }), true, 'their own logging settings are left as they are');assert.equal(await logSwitches('cursor', { base, home }), null, 'no switch: Cursor makes its prompt on its servers');assert.equal(await logSwitches('qwen', { base: null, home }), null, 'Developer mode off');@@ -88,57 +81,6 @@ test("Qwen Code's log: one request a file, its system message as the system promassert.equal(qwenCalls(dir, { sessionId: sid, from: t(4), to: t(5) }).length, 1, 'only the turn\'s');});-test("Gemini CLI's telemetry: records split, each request whole from its log record, its span and its response", () => {- const sid = 'gem-1234';- const span = (spanId, promptId, extra) => ({ _spanContext: { traceId: 'tr', spanId }, name: 'llm_call', startTime: [1, 0], endTime: [2, 0], attributes: {- 'gen_ai.prompt.name': promptId, 'gen_ai.conversation.id': sid,- 'gen_ai.system_instructions': JSON.stringify('You are Gemini CLI. Never "}" a brace.'),- 'gen_ai.tool.definitions': JSON.stringify([{ functionDeclarations: [{ name: 'run_shell_command', description: 'Run', parametersJsonSchema: { type: 'object' } }] }]),- ...extra } });- const log = (name, s, attributes, spanId) => ({ hrTime: [0, 0], ...(spanId ? { spanContext: { traceId: 'tr', spanId } } : {}), attributes: { 'session.id': sid, 'event.name': name, 'event.timestamp': at(s), ...attributes }, _body: name });- const records = [- log('gemini_cli.config', 0, { 'session.id': 'the-process' }),- log('gemini_cli.api_request', 1, { role: 'utility_router', prompt_id: 'classifier-1', model: 'flash', request_text: JSON.stringify([{ role: 'user', parts: [{ text: 'route' }] }]) }, 's0'),- log('gemini_cli.api_response', 1, { role: 'utility_router', prompt_id: 'classifier-1', model: 'flash', duration_ms: 5, response_text: '[]' }),- log('gemini_cli.api_request', 2, { role: 'main', prompt_id: 'p1', model: 'pro', auth_type: 'oauth', request_text: JSON.stringify([{ role: 'user', parts: [{ text: '<session_context>\nToday is…</session_context>' }, { text: 'Make a title' }] }]) }, 's1'),- log('gemini_cli.api_response', 4, { role: 'main', prompt_id: 'p1', model: 'pro', duration_ms: 1800, input_token_count: 120, cached_content_token_count: 100, output_token_count: 9, thoughts_token_count: 4,- response_text: JSON.stringify([{ candidates: [{ content: { role: 'model', parts: [{ text: 'pl', thought: true }, { text: 'an', thought: true }] } }] },- { candidates: [{ content: { role: 'model', parts: [{ functionCall: { id: 'f1', name: 'run_shell_command', args: { command: 'openfilm look' } } }] }, finishReason: 'STOP' }] }]) }),- log('gemini_cli.api_request', 6, { role: 'main', prompt_id: 'p1', model: 'pro', request_text: JSON.stringify([- { role: 'user', parts: [{ text: 'Make a title' }] },- { role: 'model', parts: [{ functionCall: { id: 'f1', name: 'run_shell_command', args: {} } }] },- { role: 'user', parts: [{ functionResponse: { id: 'f1', name: 'run_shell_command', response: { output: 'frames saved' } } }] }]) }, 's2'),- log('gemini_cli.api_error', 7, { role: 'main', prompt_id: 'p1', error: 'quota' }),- log('gemini_cli.api_request', 8, { 'session.id': 'other', role: 'main', prompt_id: 'p9', request_text: '[]' }, 's9'),- span('s0', 'classifier-1'), span('s1', 'p1'), span('s2', 'p1'),- { scopeMetrics: [{ metrics: [] }] },- ];- /* as Gemini CLI writes them: pretty JSON, one after the other */- const raw = records.map((r) => JSON.stringify(r, null, 2)).join('\n');- assert.equal(splitRecords(raw).length, records.length, 'split where each closes, a brace in a string kept');-- const calls = geminiCallsOf(splitRecords(raw), { sessionId: sid });- assert.equal(calls.length, 3, 'not another session\'s');- const [router, first, second] = calls;- assert.equal(router.thread.label, 'utility_router', 'its own call, named');- assert.equal(first.systemPrompt, 'You are Gemini CLI. Never "}" a brace.');- assert.deepEqual(first.tools, [{ name: 'run_shell_command', description: 'Run', parameters: { type: 'object' } }]);- assert.deepEqual(first.messages, [- { role: 'context', as: 'user', label: 'session_context', content: [{ type: 'text', text: '<session_context>\nToday is…</session_context>' }] },- { role: 'user', content: [{ type: 'text', text: 'Make a title' }] },- ]);- assert.deepEqual(first.answer.content, [{ type: 'thinking', thinking: 'plan' }, { type: 'toolCall', id: 'f1', name: 'run_shell_command', arguments: { command: 'openfilm look' } }], 'a stream\'s chunks joined');- assert.deepEqual(first.answer.usage, { input: 20, cacheRead: 100, cacheWrite: 0, output: 13, reasoning: 4 });- assert.equal(first.answer.stopReason, 'STOP');- assert.equal(first.ms, 1800);- assert.equal(first.startedAt, t(2));- assert.deepEqual(first.settings, { model: 'pro', auth: 'oauth' });- assert.deepEqual(second.messages[2], { role: 'toolResult', toolCallId: 'f1', toolName: 'run_shell_command', content: [{ type: 'text', text: 'frames saved' }], isError: false });- assert.equal(second.answer.stopReason, 'error');- assert.equal(second.answer.errorMessage, 'quota');- assert.equal(geminiCallsOf(splitRecords(raw), { sessionId: sid, from: t(5), to: t(9) }).length, 1);-});-test("CodeBuddy's raw bodies: its index names each request's files and session; its helpers' named", () => {const dir = temp('codebuddy');const root = 'root-1234';@@ -236,7 +178,8 @@ test('a turn reads its requests from the log its agent was started with, named bconst read = agentRecordCalls({ agent: 'qwen', sessionId: 's-12345678', log: switches.log, from: t(1), to: t(3) });assert.equal(read.calls.length, 1);assert.deepEqual(read.calls[0].source, { agent: 'qwen', file: switches.log.dir });- assert.equal(agentLogCalls({ agent: 'qwen', sessionId: 's-12345678', log: { agent: 'gemini', dir: switches.log.dir } }), null, 'another agent\'s log is not read');+ assert.equal(agentLogCalls({ agent: 'qwen', sessionId: 's-12345678', log: { agent: 'opencode', dir: switches.log.dir } }), null, 'another agent\'s log is not read');+ assert.equal(agentLogCalls({ agent: 'gemini', sessionId: 's-12345678', log: { agent: 'gemini', dir: switches.log.dir } }), null, 'nor one of an agent the app no longer has');assert.equal(agentRecordCalls({ agent: 'qwen', sessionId: 's-12345678', log: { agent: 'qwen', none: 'own' } }), null);assert.deepEqual(readdirSync(join(base, 'qwen')).length, 1);});diff --git a/apps/desktop/src/agent-records.mjs b/apps/desktop/src/agent-records.mjsindex 76be786..2d8c1e7 100644--- a/apps/desktop/src/agent-records.mjs+++ b/apps/desktop/src/agent-records.mjs@@ -22,8 +22,8 @@* request. No tools' definitions: Copilot does not keep them, and its OpenTelemetry makes no spans* over ACP.*- * Gemini CLI, Qwen Code, CodeBuddy and OpenCode keep the conversation without the system prompt or the tools:- * theirs are read from the logs they are started with (agent-logs.mjs). Cursor's prompt is made on its servers.+ * Qwen Code, CodeBuddy and OpenCode keep the conversation without the system prompt or the tools: theirs are read+ * from the logs they are started with (agent-logs.mjs). Cursor's prompt is made on its servers.** Neither record is a public format: read for what it has, and whatever is not understood is left out, never a* failure. A request's messages are rebuilt from the record, as the agent keeps them: not the bytes on the wire.diff --git a/apps/desktop/src/agent-records.test.mjs b/apps/desktop/src/agent-records.test.mjsindex c813bc1..aca9556 100644--- a/apps/desktop/src/agent-records.test.mjs+++ b/apps/desktop/src/agent-records.test.mjs@@ -149,7 +149,7 @@ test('records are found where each agent keeps them, and a turn reads its own re]));assert.ok(findCodexRecord({ sessionId: 'th-56789', env }));assert.equal(agentRecordCalls({ agent: 'codex', sessionId: 'th-56789', env, from: 0, to: Infinity }).calls.length, 1);- assert.equal(agentRecordCalls({ agent: 'gemini', sessionId: 'x', env }), null, 'an agent whose record is not read');+ assert.equal(agentRecordCalls({ agent: 'cursor', sessionId: 'x', env }), null, 'an agent whose record is not read');});test("Kimi's wire: each request from llm.request to step.end, with the system prompt and tools in effect and the model's own time", () => {diff --git a/apps/desktop/src/agent-roster.mjs b/apps/desktop/src/agent-roster.mjsindex ebfe841..e465cd1 100644--- a/apps/desktop/src/agent-roster.mjs+++ b/apps/desktop/src/agent-roster.mjs@@ -1,13 +1,13 @@/*** The agents the chat can use, as Settings → Agents shows them, and the person's choices about them:*- * · codex, claude, gemini, copilot, cursor, opencode, codebuddy, qwen, kimi, minimax — the person's own agents- * (agents.mjs): Codex, Claude Code, Gemini CLI, GitHub Copilot, Cursor, OpenCode, CodeBuddy, Qwen Code, Kimi and- * MiniMax Code. Each uses the account signed in on the computer as it is: connecting opens Terminal for its own- * sign-in command only when it is signed out, disconnecting only stops OpenFilm using it, and connecting again- * uses whichever account is signed in then (one switched in the agent or its maker's app). `account` says whose it- * is. Codex and Claude Code are shown in the chat's menu from the start; the others once the person connects one or- * switches it on. Codex is connected from the start, Claude Code once the person connects it.+ * · codex, claude, copilot, cursor, opencode, codebuddy, qwen, kimi, minimax — the person's own agents (agents.mjs):+ * Codex, Claude Code, GitHub Copilot, Cursor, OpenCode, CodeBuddy, Qwen Code, Kimi and MiniMax Code. Each uses+ * the account signed in on the computer as it is: connecting opens Terminal for its own sign-in command only when+ * it is signed out, disconnecting only stops OpenFilm using it, and connecting again uses whichever account is+ * signed in then (one switched in the agent or its maker's app). `account` says whose it is. Codex and Claude Code+ * are shown in the chat's menu from the start; the others once the person connects one or switches it on. Codex is+ * connected from the start, Claude Code once the person connects it.* · byok — the app's own agent (Pi, pi-agent.mjs) on the person's own models, each set up on its own: the name the* chat's menu shows, its service (an address on a standard API in one of three formats: the OpenAI Responses API* (…/v1/responses), the OpenAI Chat Completions API (…/v1/chat/completions) or the Anthropic Messages API@@ -35,11 +35,11 @@ import { join } from 'node:path';import { PI_APIS, modelEffort } from './pi-config.mjs';/** The person's own agents, as agents.mjs AGENTS has them. */-export const OWN_AGENT_IDS = Object.freeze(['codex', 'claude', 'gemini', 'copilot', 'cursor', 'opencode', 'codebuddy', 'qwen', 'kimi', 'minimax']);+export const OWN_AGENT_IDS = Object.freeze(['codex', 'claude', 'copilot', 'cursor', 'opencode', 'codebuddy', 'qwen', 'kimi', 'minimax']);export const AGENT_IDS = Object.freeze([...OWN_AGENT_IDS, 'byok']);export const AGENT_NAMES = Object.freeze({- codex: 'Codex', claude: 'Claude Code', gemini: 'Gemini CLI', copilot: 'GitHub Copilot', cursor: 'Cursor', opencode: 'OpenCode',- codebuddy: 'CodeBuddy', qwen: 'Qwen Code', kimi: 'Kimi', minimax: 'MiniMax Code', byok: 'Own key',+ codex: 'Codex', claude: 'Claude Code', copilot: 'GitHub Copilot', cursor: 'Cursor', opencode: 'OpenCode', codebuddy: 'CodeBuddy',+ qwen: 'Qwen Code', kimi: 'Kimi', minimax: 'MiniMax Code', byok: 'Own key',});const isOwn = (id) => OWN_AGENT_IDS.includes(id);@@ -67,7 +67,7 @@ function readJson(path, fallback) {try { return JSON.parse(readFileSync(path, 'utf8')); } catch { return fallback; }}-/** The person's choices, as kept. */+/** The person's choices, as kept. One about an agent the app no longer has is left out. */export function readChoices(dataDir) {const raw = readJson(join(dataDir, 'agents.json'), {});const shown = { ...DEFAULT_SHOWN };diff --git a/apps/desktop/src/agent-roster.test.mjs b/apps/desktop/src/agent-roster.test.mjsindex 8c135f4..05fe1b8 100644--- a/apps/desktop/src/agent-roster.test.mjs+++ b/apps/desktop/src/agent-roster.test.mjs@@ -116,15 +116,15 @@ test('one service with several models, kept before each model was set up on itstest("Codex and Claude Code are shown in the chat from the start, the person's other agents once connected or switched on", async () => {const dir = mkdtempSync(join(tmpdir(), 'of-roster-'));const found = (id, cli) => ({ id, cli, signedIn: true, install: 'https://example.test', setupRequired: null });- const r = roster(dir, undefined, { localAgents: async () => [found('codex', null), found('claude', null), found('gemini', { path: '/bin/gemini' }), found('kimi', null)] });+ const r = roster(dir, undefined, { localAgents: async () => [found('codex', null), found('claude', null), found('qwen', { path: '/bin/qwen' }), found('kimi', null)] });const list = await r.refresh();const of = (id) => list.find((a) => a.id === id);assert.equal(of('codex').shown, true, 'not installed, still shown');- assert.equal(of('gemini').status, 'ready');- assert.equal(of('gemini').shown, false, 'installed, not chosen yet');+ assert.equal(of('qwen').status, 'ready');+ assert.equal(of('qwen').shown, false, 'installed, not chosen yet');assert.equal(of('kimi').status, 'missing');- await r.connect('gemini');- assert.equal(r.list().find((a) => a.id === 'gemini').shown, true, 'connected: chosen');+ await r.connect('qwen');+ assert.equal(r.list().find((a) => a.id === 'qwen').shown, true, 'connected: chosen');r.setShown('kimi', true);assert.equal(readChoices(dir).shown.kimi, true);});@@ -161,6 +161,16 @@ test('an agent not found can be pointed at: the program is tried first, kept, anassert.deepEqual(await r.locate('byok'), { ok: false, error: 'No agent byok' }, 'only the person\'s own programs');});+test('choices about an agent the app no longer has are dropped quietly', () => {+ const dir = mkdtempSync(join(tmpdir(), 'of-roster-'));+ writeFileSync(join(dir, 'agents.json'), JSON.stringify({ shown: { gemini: true, kimi: true }, paths: { gemini: '/bin/gemini' }, disconnected: ['gemini', 'claude'] }));+ const choices = readChoices(dir);+ assert.equal('gemini' in choices.shown, false);+ assert.equal(choices.shown.kimi, true);+ assert.deepEqual(choices.paths, {});+ assert.deepEqual(choices.disconnected, ['claude']);+});+test('a kept path for something that is not one of the agents is dropped', () => {const dir = mkdtempSync(join(tmpdir(), 'of-roster-'));writeFileSync(join(dir, 'agents.json'), JSON.stringify({ paths: { codex: '/opt/codex', byok: '/x', nope: '/y', claude: 3 } }));diff --git a/apps/desktop/src/agent-skills.mjs b/apps/desktop/src/agent-skills.mjsindex 833796c..8c02535 100644--- a/apps/desktop/src/agent-skills.mjs+++ b/apps/desktop/src/agent-skills.mjs@@ -15,8 +15,6 @@* but its own, OpenFilm's and those let in, and `mcp.<name>.enabled: false` (merged with the person's).* Qwen Code a system-defaults file of the app's (QWEN_CODE_SYSTEM_DEFAULTS_PATH): `skills.disabled`,* `skills.directories` (OpenFilm's), `mcp.excluded`. Its lists merge with the person's own.- * Gemini CLI the same (GEMINI_CLI_SYSTEM_DEFAULTS_PATH): `skills.disabled`, `mcp.excluded`; it takes no other- * skills folder, so OpenFilm's reach it when named in a message.* Copilot OpenFilm's through COPILOT_SKILLS_DIRS and `--disable-mcp-server` for the person's own servers; it* has no way to hide a skill, so it keeps all of the person's.* Pi OpenFilm's only.@@ -42,9 +40,9 @@ const require = createRequire(import.meta.url);const skillsLib = () => import(pathToFileURL(require.resolve('openfilm/skills')).href);/** The agents whose own skills can be hidden in OpenFilm (byok: the app's own agent, Pi). */-export const FILTERED_AGENTS = Object.freeze(['claude', 'codex', 'opencode', 'qwen', 'gemini', 'byok']);+export const FILTERED_AGENTS = Object.freeze(['claude', 'codex', 'opencode', 'qwen', 'byok']);/** The agents whose own MCP servers can be hidden in OpenFilm. */-export const MCP_AGENTS = Object.freeze(['claude', 'codex', 'opencode', 'qwen', 'gemini', 'copilot']);+export const MCP_AGENTS = Object.freeze(['claude', 'codex', 'opencode', 'qwen', 'copilot']);/** a session's folder of links is kept this long (a conversation resumed later makes a new one) */const KEEP_MS = 2 * 24 * 60 * 60_000;@@ -138,7 +136,6 @@ export async function ownSkills(agent, { cwd = '', env = {}, home = homedir() }break;}case 'qwen': dirs = [join(env.QWEN_HOME || join(home, '.qwen'), 'skills'), join(home, '.agents', 'skills'), ...project(['.qwen/skills', '.agents/skills'])]; break;- case 'gemini': dirs = [join(home, '.gemini', 'skills'), join(home, '.agents', 'skills'), ...project(['.gemini/skills', '.agents/skills'])]; break;case 'copilot': dirs = [join(env.COPILOT_HOME || join(home, '.copilot'), 'skills'), join(home, '.agents', 'skills'), ...project(['.github/skills', '.agents/skills', '.claude/skills'])]; break;default: return [];}@@ -203,7 +200,6 @@ export function ownMcpServers(agent, { cwd = '', env = {}, home = homedir() } =break;}case 'qwen': found = [join(env.QWEN_HOME || join(home, '.qwen'), 'settings.json'), ...(cwd ? [join(cwd, '.qwen', 'settings.json')] : [])].flatMap((f) => entries(readJson(f)?.mcpServers)); break;- case 'gemini': found = [join(home, '.gemini', 'settings.json'), ...(cwd ? [join(cwd, '.gemini', 'settings.json')] : [])].flatMap((f) => entries(readJson(f)?.mcpServers)); break;case 'copilot': found = entries(readJson(join(env.COPILOT_HOME || join(home, '.copilot'), 'mcp-config.json'))?.mcpServers); break;default: return [];}@@ -234,7 +230,7 @@ function linkFolder(base, skills) {return dir;}-/** A system-defaults file of the app's for this session (Qwen Code's, Gemini CLI's), beside its links. */+/** A system-defaults file of the app's for this session (Qwen Code's), beside its links. */function defaultsFile(dir, name, settings) {const file = join(dir, name);writeFileSync(file, `${JSON.stringify(settings, null, 2)}\n`);@@ -280,15 +276,14 @@ export async function sessionSkills(agent, { cwd, env = {}, dataDir, mine, allowconst mcp = Object.fromEntries(mcpHidden.map((n) => [n, { enabled: false }]));return { env: { OPENCODE_CONFIG_CONTENT: JSON.stringify({ skills: { paths: [join(dir, 'skills')] }, permission: { skill }, ...(mcpHidden.length ? { mcp } : {}) }) }, log };}- case 'qwen':- case 'gemini': {- const variable = agent === 'qwen' ? 'QWEN_CODE_SYSTEM_DEFAULTS_PATH' : 'GEMINI_CLI_SYSTEM_DEFAULTS_PATH';+ case 'qwen': {+ const variable = 'QWEN_CODE_SYSTEM_DEFAULTS_PATH';if (env[variable]) return { log: { ...log, filtered: false, mcpFiltered: false, unfiltered: `${variable} is the person's own` } };const settings = {- skills: { disabled: hidden.map((s) => s.name), ...(agent === 'qwen' ? { directories: [join(dir, 'skills')] } : {}) },+ skills: { disabled: hidden.map((s) => s.name), directories: [join(dir, 'skills')] },...(mcpHidden.length ? { mcp: { excluded: mcpHidden } } : {}),};- return { env: { [variable]: defaultsFile(dir, `${agent}-defaults.json`, settings) }, log: { ...log, settings } };+ return { env: { [variable]: defaultsFile(dir, 'qwen-defaults.json', settings) }, log: { ...log, settings } };}case 'copilot':return {diff --git a/apps/desktop/src/agent-skills.test.mjs b/apps/desktop/src/agent-skills.test.mjsindex 74e137d..a177069 100644--- a/apps/desktop/src/agent-skills.test.mjs+++ b/apps/desktop/src/agent-skills.test.mjs@@ -30,7 +30,7 @@ function world() {skill(join(home, '.codex', 'plugins', 'cache', 'openai-curated', 'sites', '1.0', 'skills', 'sites'), 'sites');skill(join(home, '.codex', 'plugins', 'cache', 'someone', 'pets', '0.1', 'skills', 'pet'), 'pet');/* MCP servers: Claude Code's (the person's, and one local to the project), Codex's (two its own apps put there, one- of the person's), OpenCode's, Qwen Code's, Gemini CLI's, Copilot's */+ of the person's), OpenCode's, Qwen Code's, Copilot's */writeFileSync(join(home, '.claude.json'), JSON.stringify({ mcpServers: { chatcut: { type: 'stdio', command: '/Apps/ChatCut/chatcut-mcp' }, notes: { type: 'http', url: 'http://127.0.0.1:9/mcp' } },projects: { [project]: { mcpServers: { local: { command: 'node' } } } } }));mkdirSync(join(home, '.codex'), { recursive: true });@@ -42,10 +42,8 @@ function world() {mkdirSync(join(home, '.config', 'opencode'), { recursive: true });writeFileSync(join(home, '.config', 'opencode', 'opencode.jsonc'), '{\n // mine\n "mcp": { "search": { "type": "remote", "url": "https://s.example.com/mcp" }, },\n}');mkdirSync(join(home, '.qwen'), { recursive: true });- writeFileSync(join(home, '.qwen', 'settings.json'), JSON.stringify({ mcpServers: { qtool: { command: 'qtool' } } }));- mkdirSync(join(home, '.gemini'), { recursive: true });- writeFileSync(join(home, '.gemini', 'settings.json'), JSON.stringify({ mcpServers: { gtool: { httpUrl: 'https://g.example.com/mcp' } } }));- skill(join(home, '.gemini', 'skills', 'gem-notes'), 'gem-notes');+ writeFileSync(join(home, '.qwen', 'settings.json'), JSON.stringify({ mcpServers: { qtool: { command: 'qtool' }, qweb: { httpUrl: 'https://q.example.com/mcp' } } }));+ skill(join(home, '.qwen', 'skills', 'qwen-notes'), 'qwen-notes');mkdirSync(join(home, '.copilot'), { recursive: true });writeFileSync(join(home, '.copilot', 'mcp-config.json'), JSON.stringify({ mcpServers: { ctool: { command: 'ctool' } } }));/* OpenFilm's: the project's and the person's own */@@ -60,7 +58,7 @@ test("the person's own skills, as each agent keeps them, never its maker's", asyassert.deepEqual((await ownSkills('claude', { cwd: project, home })).map((s) => [s.name, s.dirName]),[['research', 'research'], ['team-style', 'team-style'], ['voice', 'chatcut-voice']], 'not claude.ai\'s synced ones');assert.deepEqual((await ownSkills('codex', { cwd: project, home })).map((s) => s.name), ['notes', 'openfilm', 'pet'], 'not .system, not OpenAI\'s plugins');- assert.deepEqual((await ownSkills('gemini', { cwd: project, home })).map((s) => s.name), ['gem-notes', 'notes']);+ assert.deepEqual((await ownSkills('qwen', { cwd: project, home })).map((s) => s.name), ['notes', 'qwen-notes']);assert.deepEqual((await ownSkills('cursor', { cwd: project, home })), [], 'an agent whose skills are not read');});@@ -118,16 +116,14 @@ test("OpenFilm's own skill for terminal agents is known, never offered, and alwaassert.equal(s.claude.settings.skillOverrides.research, undefined);});-test('Qwen Code and Gemini CLI: a system-defaults file of the app\'s; Copilot: OpenFilm\'s folder and its servers off', async () => {+test('Qwen Code: a system-defaults file of the app\'s; Copilot: OpenFilm\'s folder and its servers off', async () => {const w = world();const qwen = await sessionSkills('qwen', { cwd: w.project, home: w.home, dataDir: w.dataDir, mine: join(w.openfilmHome, 'skills') });const q = JSON.parse(readFileSync(qwen.env.QWEN_CODE_SYSTEM_DEFAULTS_PATH, 'utf8'));- assert.deepEqual(q.mcp, { excluded: ['qtool'] });+ assert.deepEqual(q.mcp, { excluded: ['qtool', 'qweb'] });+ assert.deepEqual(q.skills.disabled, ['notes', 'qwen-notes']);assert.match(q.skills.directories[0], /agent-skills[\\/].+[\\/]skills$/);- const gemini = await sessionSkills('gemini', { cwd: w.project, home: w.home, dataDir: w.dataDir, mine: join(w.openfilmHome, 'skills') });- const g = JSON.parse(readFileSync(gemini.env.GEMINI_CLI_SYSTEM_DEFAULTS_PATH, 'utf8'));- assert.deepEqual(g, { skills: { disabled: ['gem-notes', 'notes'] }, mcp: { excluded: ['gtool'] } }, 'no other skills folder for it to take');- const own = await sessionSkills('gemini', { cwd: w.project, home: w.home, dataDir: w.dataDir, env: { GEMINI_CLI_SYSTEM_DEFAULTS_PATH: '/theirs.json' } });+ const own = await sessionSkills('qwen', { cwd: w.project, home: w.home, dataDir: w.dataDir, env: { QWEN_CODE_SYSTEM_DEFAULTS_PATH: '/theirs.json' } });assert.equal(own.env, undefined, 'a defaults file of the person\'s own is left as it is');assert.equal(own.log.filtered, false);const copilot = await sessionSkills('copilot', { cwd: w.project, home: w.home, dataDir: w.dataDir, mine: join(w.openfilmHome, 'skills'), env: { COPILOT_SKILLS_DIRS: '/mine' } });@@ -141,7 +137,7 @@ test("the person's own MCP servers, as each agent keeps them, never its maker's"assert.deepEqual(ownMcpServers('claude', { cwd: project, home }), [{ name: 'chatcut', detail: 'chatcut-mcp' }, { name: 'local', detail: 'node' }, { name: 'notes', detail: '127.0.0.1:9' }]);assert.deepEqual(ownMcpServers('codex', { home }), [{ name: 'my-db', detail: '127.0.0.1:8' }]);assert.deepEqual(ownMcpServers('opencode', { home }), [{ name: 'search', detail: 's.example.com' }]);- assert.deepEqual(ownMcpServers('gemini', { home }), [{ name: 'gtool', detail: 'g.example.com' }]);+ assert.deepEqual(ownMcpServers('qwen', { home }), [{ name: 'qtool', detail: 'qtool' }, { name: 'qweb', detail: 'q.example.com' }]);assert.deepEqual(ownMcpServers('cursor', { home }), []);assert.deepEqual(codexServers('[mcp_servers.a]\ncommand = "x"\n[mcp_servers.a.env]\ncommand = "not this"\n').map((s) => s.config), [{ command: 'x' }], 'a server\'s own tables are not servers');});diff --git a/apps/desktop/src/agent-usage.test.mjs b/apps/desktop/src/agent-usage.test.mjsindex 609dd87..a3c0c7e 100644--- a/apps/desktop/src/agent-usage.test.mjs+++ b/apps/desktop/src/agent-usage.test.mjs@@ -4,7 +4,7 @@ import { agentUsage, readCodexUsage } from './agent-usage.mjs';test('Claude Code\'s usage is not asked: its own report is wrong for Team accounts', async () => {assert.equal(await agentUsage('claude'), null);- assert.equal(await agentUsage('gemini'), null);+ assert.equal(await agentUsage('qwen'), null);});test('Codex\'s rate limits as windows, each as long as it says; its account\'s email and plan', () => {diff --git a/apps/desktop/src/agents.mjs b/apps/desktop/src/agents.mjsindex a46a6a6..ea35949 100644--- a/apps/desktop/src/agents.mjs+++ b/apps/desktop/src/agents.mjs@@ -1,12 +1,12 @@/**- * The chat's agents: the person's own Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor, OpenCode, CodeBuddy,- * Qwen Code, Kimi or MiniMax Code, driven over the Agent Client Protocol (ACP): a child process speaking JSON-RPC over+ * The chat's agents: the person's own Claude Code, Codex, GitHub Copilot, Cursor, OpenCode, CodeBuddy, Qwen Code,+ * Kimi or MiniMax Code, driven over the Agent Client Protocol (ACP): a child process speaking JSON-RPC over* stdin/stdout.* The app is the client: initialize, session/new (or session/resume for a conversation from before), session/prompt;* session/update draws the chat, and session/request_permission asks the person in the chat.** Claude Code and Codex speak it through their makers' official adapters (`@agentclientprotocol/claude-agent-acp`,- * `@agentclientprotocol/codex-acp`, Apache-2.0), which the app carries; the others speak it themselves (`gemini --acp`,+ * `@agentclientprotocol/codex-acp`, Apache-2.0), which the app carries; the others speak it themselves (`qwen --acp`,* `opencode acp`, …), as the ACP registry (agentclientprotocol.com/registry) starts them.** Why the person's own installation, never one bundled with the app:@@ -72,7 +72,6 @@ export const AGENTS = Object.freeze({login: ['login'],systemPrompt: true,},- gemini: { label: 'Gemini CLI', args: ['--acp', '--approval-mode', 'yolo'], login: [], approve: true },copilot: { label: 'GitHub Copilot', args: ['--acp', '--allow-all'], login: ['login'], approve: true },cursor: { label: 'Cursor', args: ['--force', 'acp'], auth: ['status'], login: ['login'], authenticate: 'cursor_login', approve: true },opencode: { label: 'OpenCode', args: ['acp'], login: ['auth', 'login'], approve: true },@@ -835,7 +834,7 @@ export class AgentSession {const resumed = Boolean(session);session ??= await this.conn.agent.request(acp.methods.agent.session.new, params).catch((e) => { throw signInError(this.spec.label, e); });this.sessionId = session.sessionId;- /* an agent on the older model and mode lists (Gemini CLI): the same choices, as config options */+ /* an agent on the protocol's older model and mode lists: the same choices, as config options */this.legacy = !session.configOptions && Boolean(session.models || session.modes);if (resumed) this.instructions = null;this.info = {diff --git a/apps/desktop/src/agents.test.mjs b/apps/desktop/src/agents.test.mjsindex c35cfb9..6ad0172 100644--- a/apps/desktop/src/agents.test.mjs+++ b/apps/desktop/src/agents.test.mjs@@ -14,7 +14,7 @@ test('an agent that asks: yes for good where it offers that, else yes this once;assert.equal(allowOption({}), null);});-test("the older model and mode lists (Gemini CLI's) read as the config options the chat's menu has", () => {+test("the protocol's older model and mode lists read as the config options the chat's menu has", () => {const options = legacyOptions({models: { currentModelId: 'auto', availableModels: [{ modelId: 'auto', name: 'Auto' }, { modelId: 'pro', name: 'Pro', description: 'slow' }] },modes: { currentModeId: 'yolo', availableModes: [{ id: 'default', name: 'Default' }, { id: 'yolo', name: 'YOLO' }] },diff --git a/apps/desktop/src/turn-log.test.mjs b/apps/desktop/src/turn-log.test.mjsindex 1583b80..5a506d9 100644--- a/apps/desktop/src/turn-log.test.mjs+++ b/apps/desktop/src/turn-log.test.mjs@@ -9,7 +9,7 @@ import { loggedBlocks, readLog, writeModelLog } from './chat-store.mjs';/** An agent speaking ACP that keeps every prompt it is sent in `out`, one JSON line each. */function fakeAgent(out) {const dir = mkdtempSync(join(tmpdir(), 'of-fake-agent-'));- const file = join(dir, 'gemini.mjs');+ const file = join(dir, 'qwen.mjs');writeFileSync(file, `import { appendFileSync } from 'node:fs';import { Readable, Writable } from 'node:stream';@@ -27,10 +27,10 @@ await connection.closed;test('the turn log has what the agent was started with and each message as it got it: the app\'s words before the first, no key\'s value', { timeout: 60_000 }, async () => {const out = join(mkdtempSync(join(tmpdir(), 'of-fake-out-')), 'prompts.jsonl');- setChosenPaths({ gemini: fakeAgent(out) });+ setChosenPaths({ qwen: fakeAgent(out) });const sent = [];const session = new AgentSession({- agent: 'gemini',+ agent: 'qwen',cwd: mkdtempSync(join(tmpdir(), 'of-project-')),binDir: '/app/bin',env: { OPENFILM_HOME: '/data', SOME_API_KEY: 'sk-secret' },diff --git a/packages/openfilm/studio/ui/src/components/DesktopDialog.tsx b/packages/openfilm/studio/ui/src/components/DesktopDialog.tsxindex 3caa69d..a04aaf4 100644--- a/packages/openfilm/studio/ui/src/components/DesktopDialog.tsx+++ b/packages/openfilm/studio/ui/src/components/DesktopDialog.tsx@@ -27,11 +27,10 @@ const FEATURES: { key: string; icon: React.ReactNode }[] = [{ key: 'history', icon: <History size={15} strokeWidth={1.75} /> },];-/** The agents it finds on the computer, by their marks (Codex's is OpenAI's, Gemini CLI's is Google's). */+/** The agents it finds on the computer, by their marks (Codex's is OpenAI's). */const AGENTS: { id: string; name: string }[] = [{ id: 'claude', name: 'Claude Code' },{ id: 'openai', name: 'Codex' },- { id: 'google', name: 'Gemini CLI' },{ id: 'copilot', name: 'GitHub Copilot' },{ id: 'cursor', name: 'Cursor' },{ id: 'opencode', name: 'OpenCode' },diff --git a/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx b/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsxindex 4c94729..c20d9c4 100644--- a/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx+++ b/packages/openfilm/studio/ui/src/components/settings/AgentsSection.tsx@@ -2,9 +2,9 @@* Settings → Agents, inside an app that has a chat (lib/host.ts `agents`): the agents its chat can use, each connected* or not and shown in the chat's menu or not.*- * Codex, Claude Code, Gemini CLI and the others are the person's own programs, on the account signed in on the- * computer: connecting opens their own sign-in only when they are signed out (the app waits for it), disconnecting- * only stops the app using them, and connecting again uses the account signed in then (switched in the agent itself).+ * Codex, Claude Code and the others are the person's own programs, on the account signed in on the computer:+ * connecting opens their own sign-in only when they are signed out (the app waits for it), disconnecting only stops+ * the app using them, and connecting again uses the account signed in then (switched in the agent itself).* Claude Code's and Codex's rows say whose account it is, and Codex's what is left of its plan. Codex and Claude Code* are always listed under the person's agents, with the person's own key; the others there once switched on (connecting* one does), else under "More agents", with where to get them when they are not installed. The person's own key is on a service of theirs, with a model that reads pictures (the agent looks at its own frames).@@ -45,7 +45,7 @@ function useHostAgents(): HostAgent[] | null {}/** The person's own agents (the app's AGENTS), in the roster's order. */-const OWN: readonly HostAgentId[] = ['codex', 'claude', 'gemini', 'copilot', 'cursor', 'opencode', 'codebuddy', 'qwen', 'kimi', 'minimax'];+const OWN: readonly HostAgentId[] = ['codex', 'claude', 'copilot', 'cursor', 'opencode', 'codebuddy', 'qwen', 'kimi', 'minimax'];/** whose maker's mark is its company's */function AgentMark({ id }: { id: HostAgentId }) {return id === 'byok' ? <KeyRound size={16} /> : <ProviderMark id={agentMark(id)} size={17} />;diff --git a/packages/openfilm/studio/ui/src/i18n/en.ts b/packages/openfilm/studio/ui/src/i18n/en.tsindex ec2c586..f761224 100644--- a/packages/openfilm/studio/ui/src/i18n/en.ts+++ b/packages/openfilm/studio/ui/src/i18n/en.ts@@ -109,7 +109,7 @@ export const en = {sync: { title: 'Two-way with the editor', body: 'Put a clip, a layer, a region of the picture or a media file in your message, and click any clip your agent names to jump to it in Studio.' },live: { title: 'Changes land live', body: 'Every edit shows on the picture and the timeline as it’s written. Adjust it by hand, or step back in Version history.' },drop: { title: 'Drop in your media', body: 'Drag footage, pictures or sound into the chat: they go straight into the film’s folder, ready to use.' },- agents: { title: 'Any agent, one switch away', body: 'Claude Code, Codex, Gemini CLI, Copilot, Cursor and more, found on your computer. Switch in the chat, or use your own API key.' },+ agents: { title: 'Any agent, one switch away', body: 'Claude Code, Codex, Copilot, Cursor and more, found on your computer. Switch in the chat, or use your own API key.' },speed: { title: 'Faster preview and export', body: 'A pinned rendering engine for smooth playback, and exports on your computer’s hardware video encoder when it has one.' },setup: { title: 'No terminal, no dependencies', body: 'No Node, npm or package versions to manage: ffmpeg and the renderer are built in and tested with Studio.' },updates: { title: 'Always up to date', body: 'Updates download in the background and install on restart, never in the middle of an export or a reply.' },diff --git a/packages/openfilm/studio/ui/src/i18n/es.ts b/packages/openfilm/studio/ui/src/i18n/es.tsindex 3f8f71b..8a4ce7e 100644--- a/packages/openfilm/studio/ui/src/i18n/es.ts+++ b/packages/openfilm/studio/ui/src/i18n/es.ts@@ -108,7 +108,7 @@ export const es: Words = {sync: { title: 'Conectado al editor en ambos sentidos', body: 'Pon un clip, una capa, una zona de la imagen o un archivo en tu mensaje, y haz clic en cualquier clip que nombre tu agente para ir a él en Studio.' },live: { title: 'Cambios en directo', body: 'Cada edición aparece en la imagen y en la línea de tiempo en cuanto se escribe. Ajústala a mano o vuelve atrás en el historial de versiones.' },drop: { title: 'Suelta tus medios', body: 'Arrastra metraje, imágenes o sonido al chat: van directos a la carpeta de la película, listos para usar.' },- agents: { title: 'Cualquier agente, a un clic', body: 'Claude Code, Codex, Gemini CLI, Copilot, Cursor y más, detectados en tu ordenador. Cámbialos en el chat o usa tu propia clave de API.' },+ agents: { title: 'Cualquier agente, a un clic', body: 'Claude Code, Codex, Copilot, Cursor y más, detectados en tu ordenador. Cámbialos en el chat o usa tu propia clave de API.' },speed: { title: 'Vista previa y exportación más rápidas', body: 'Un motor de renderizado fijo para una reproducción fluida, y exportaciones con el codificador de vídeo por hardware de tu ordenador cuando lo tiene.' },setup: { title: 'Sin terminal ni dependencias', body: 'Nada de Node, npm ni versiones de paquetes: ffmpeg y el renderizador vienen incluidos y probados con Studio.' },updates: { title: 'Siempre al día', body: 'Las actualizaciones se descargan en segundo plano y se instalan al reiniciar, nunca en mitad de una exportación o una respuesta.' },diff --git a/packages/openfilm/studio/ui/src/i18n/ja.ts b/packages/openfilm/studio/ui/src/i18n/ja.tsindex ea27f01..798be79 100644--- a/packages/openfilm/studio/ui/src/i18n/ja.ts+++ b/packages/openfilm/studio/ui/src/i18n/ja.ts@@ -108,7 +108,7 @@ export const ja: Words = {sync: { title: 'エディターと双方向に連携', body: 'クリップ、レイヤー、画面の範囲、素材ファイルをメッセージに入れられます。エージェントが挙げたクリップはクリックで Studio のその場所へ。' },live: { title: '変更はその場で反映', body: '編集は書き込まれた瞬間にプレビューとタイムラインに表示。手で微調整も、バージョン履歴で戻すこともできます。' },drop: { title: '素材はドロップするだけ', body: '映像、画像、サウンドをチャットにドラッグすると、映像のフォルダーに入りすぐ使えます。' },- agents: { title: '主要なエージェントを自由に切り替え', body: 'Claude Code、Codex、Gemini CLI、Copilot、Cursor など、パソコンにあるものを自動で検出。チャットで切り替えたり、自分の API キーを使ったりできます。' },+ agents: { title: '主要なエージェントを自由に切り替え', body: 'Claude Code、Codex、Copilot、Cursor など、パソコンにあるものを自動で検出。チャットで切り替えたり、自分の API キーを使ったりできます。' },speed: { title: 'プレビューも書き出しも速く', body: '固定バージョンのレンダリングエンジンで再生は滑らか。ハードウェアのビデオエンコーダーがあれば書き出しに使います。' },setup: { title: 'ターミナルも依存関係の管理も不要', body: 'Node や npm、パッケージのバージョン管理は不要。ffmpeg とレンダラーを内蔵し、Studio と一緒にテスト済みです。' },updates: { title: 'いつも最新', body: 'アップデートはバックグラウンドで届き、再起動時にインストール。書き出しや返信の途中で止まることはありません。' },diff --git a/packages/openfilm/studio/ui/src/i18n/ko.ts b/packages/openfilm/studio/ui/src/i18n/ko.tsindex dc00f37..9251850 100644--- a/packages/openfilm/studio/ui/src/i18n/ko.ts+++ b/packages/openfilm/studio/ui/src/i18n/ko.ts@@ -108,7 +108,7 @@ export const ko: Words = {sync: { title: '편집기와 양방향 연결', body: '클립, 레이어, 화면 영역, 미디어 파일을 메시지에 넣으세요. 에이전트가 언급한 클립은 클릭 한 번으로 Studio의 해당 위치로 이동합니다.' },live: { title: '변경 사항 실시간 반영', body: '모든 편집이 작성되는 즉시 화면과 타임라인에 나타납니다. 직접 다듬거나 버전 기록에서 되돌릴 수 있습니다.' },drop: { title: '미디어는 끌어다 놓기만', body: '영상, 이미지, 사운드를 채팅에 끌어다 놓으면 바로 영상 폴더에 들어가 쓸 수 있습니다.' },- agents: { title: '주요 에이전트를 자유롭게 전환', body: 'Claude Code, Codex, Gemini CLI, Copilot, Cursor 등 컴퓨터에 있는 에이전트를 자동으로 찾습니다. 채팅에서 바꾸거나 내 API 키를 쓸 수 있습니다.' },+ agents: { title: '주요 에이전트를 자유롭게 전환', body: 'Claude Code, Codex, Copilot, Cursor 등 컴퓨터에 있는 에이전트를 자동으로 찾습니다. 채팅에서 바꾸거나 내 API 키를 쓸 수 있습니다.' },speed: { title: '더 빠른 미리보기와 내보내기', body: '고정된 렌더링 엔진으로 재생이 부드럽고, 하드웨어 비디오 인코더가 있으면 내보내기에 사용합니다.' },setup: { title: '터미널도, 의존성 관리도 필요 없음', body: 'Node, npm, 패키지 버전을 관리할 필요가 없습니다. ffmpeg와 렌더러가 내장되어 Studio와 함께 테스트되었습니다.' },updates: { title: '항상 최신 상태', body: '업데이트는 백그라운드에서 받아 재시작할 때 설치되며, 내보내기나 답변 도중에는 끼어들지 않습니다.' },diff --git a/packages/openfilm/studio/ui/src/i18n/zh-CN.ts b/packages/openfilm/studio/ui/src/i18n/zh-CN.tsindex 479b46e..e73474a 100644--- a/packages/openfilm/studio/ui/src/i18n/zh-CN.ts+++ b/packages/openfilm/studio/ui/src/i18n/zh-CN.ts@@ -109,7 +109,7 @@ export const zhCN: Words = {sync: { title: '与编辑器双向联动', body: '把片段、图层、画面区域或素材文件放进消息;智能体提到的任何片段,点一下就跳到 Studio 里对应的位置。' },live: { title: '改动实时呈现', body: '每处修改写下时就出现在画面和时间线上。可以亲手微调,也可以在版本历史里退回。' },drop: { title: '素材直接拖进来', body: '把视频、图片或声音拖进对话,直接进入影片的文件夹,马上能用。' },- agents: { title: '主流智能体随心切换', body: 'Claude Code、Codex、Gemini CLI、Copilot、Cursor 等,自动发现你电脑上已有的。在对话里随时切换,也可以用自己的 API key。' },+ agents: { title: '主流智能体随心切换', body: 'Claude Code、Codex、Copilot、Cursor 等,自动发现你电脑上已有的。在对话里随时切换,也可以用自己的 API key。' },speed: { title: '预览和导出更快更稳', body: '内置固定版本的渲染引擎,播放更流畅;电脑有硬件视频编码器时,导出会用它加速。' },setup: { title: '无需终端,无需管理依赖', body: '不用装 Node、npm,也不用管包的版本:ffmpeg 和渲染器都已内置,并和 Studio 一起测试过。' },updates: { title: '始终保持最新', body: '更新在后台下载,重启时安装,绝不会打断正在进行的导出或回复。' },diff --git a/packages/openfilm/studio/ui/src/lib/host.ts b/packages/openfilm/studio/ui/src/lib/host.tsindex 5957af7..0f36f50 100644--- a/packages/openfilm/studio/ui/src/lib/host.ts+++ b/packages/openfilm/studio/ui/src/lib/host.ts@@ -195,7 +195,7 @@ export interface HostUpdateState {/** An update of the app, ready to install or installing; `waiting`: why the last Restart did not go ahead. */export type HostUpdate = { status: 'ready' | 'installing'; version: string; waiting?: 'agent-busy' | 'exporting' | 'install-failed' | null };-export type HostAgentId = 'codex' | 'claude' | 'gemini' | 'copilot' | 'cursor' | 'opencode' | 'codebuddy' | 'qwen' | 'kimi' | 'minimax' | 'byok';+export type HostAgentId = 'codex' | 'claude' | 'copilot' | 'cursor' | 'opencode' | 'codebuddy' | 'qwen' | 'kimi' | 'minimax' | 'byok';/*** What was searched for an agent (`agents.diagnose`): the report to copy, the program's name, where it was found, and* when it was not, why: chosen-missing (the program chosen is gone) · wsl (only inside WSL, which the app cannot use) ·diff --git a/packages/openfilm/studio/ui/src/lib/provider-marks.ts b/packages/openfilm/studio/ui/src/lib/provider-marks.tsindex 8cc24d6..5865813 100644--- a/packages/openfilm/studio/ui/src/lib/provider-marks.ts+++ b/packages/openfilm/studio/ui/src/lib/provider-marks.ts@@ -28,7 +28,7 @@ export const MARKS: Record<string, { viewBox: string; d: string; parts?: { d: st};/** An agent drawn with its maker's mark (Settings → Agents). The own key has a key, not a mark. */-export const AGENT_MARK: Readonly<Record<string, string>> = { codex: 'openai', gemini: 'google' };+export const AGENT_MARK: Readonly<Record<string, string>> = { codex: 'openai' };/** The mark an agent is drawn with: its own, or its maker's. */export const agentMark = (id: string): string => AGENT_MARK[id] ?? id;