Multi-AI Terminal v0.2.4
Multi-AI Terminal v0.2.4
MAT is now an agent-ready source release: a checked-out copy of this repository can be built, launched, verified, and stopped by your coding agent — Claude Code or Codex — under an explicit, machine-readable contract. This follows the approach proven in multi-ai-chat-desktop, adapted to a lane that needs no Rust at all.
Drive MAT with your coding agent
- Skills ship in-repo:
.claude/skills/launch-multi-ai-terminal/(Claude Code) and.agents/skills/launch-multi-ai-terminal/(Codex, withagents/openai.yaml). Ask your agent to launch Multi-AI Terminal from source: it audits the declared side effects, checks prerequisites, builds, starts the server on a free127.0.0.1port, and reports the URL for you to open in your own browser. - The skills are explicit-only (
disable-model-invocation: true/allow_implicit_invocation: false): an agent may use them only when you ask, never implicitly on opening the repository. - The lane is npm-only — Node.js 20+ and npm are the whole prerequisite list. No Rust toolchain, no installers, no release-asset downloads.
A machine-readable contract
agent-release.jsondeclares the entrypoints, allowed/denied permissions, declared side effects, runtime states, and exit codes;agent-release.schema.jsonvalidates it in CI.- Five lifecycle commands, also exposed as npm scripts:
agent:doctor,agent:audit,agent:launch,agent:status,agent:stop(all support--json). - Audit runs before and after a launch and records what actually changed against what was declared.
Identity-safe lifecycle
- Launch runs the server under a runner process carrying a single-use token in its command line.
statusandstopact only on a process this repository provably started; foreign or unverifiable PIDs are refused, never killed. - Readiness is a log marker scoped to the current run segment (
[MAT_AGENT] READY url=...) — a marker left by an earlier run can never fake readiness for a new one. - All lifecycle records (state, log, launch receipt, before/after audits) live in the gitignored
.agent-runtime/directory. - The server now supports
--port 0(bind a free ephemeral port and print the READY line); the agent lane uses it by default, so it never collides with the desktop app or a dev server.
Boundaries
- Lifecycle scripts never install or remove host toolchains, never modify PATH or shell profiles, never elevate privileges, never read provider credentials, and never upload logs or audits.
- The skills are forbidden from driving the launched server's provider install, update, or sign-in APIs on your behalf — those stay yours, in your own browser.
- Do not run the source lane while the installed desktop app is open: both use the same data directory (
MAT_DATA_DIRor~/.multi-ai-terminal/).
Verification
- A new cross-platform end-to-end test drives the real cycle — launch → READY → serve UI + health → stop → clean state — on Ubuntu and Windows CI (
npm run test:agent), against a temporary data directory. - The release snapshot passes 59 test files / 407 tests, full typecheck, all four independent evidence instruments, and the real-browser smoke.
Multi-AI Terminal v0.2.4(繁體中文)
MAT 現在是 agent-ready 原始碼發行版:你的 coding agent(Claude Code 或 Codex)可以在明確、機器可讀的契約下,將這個 repo 的 checkout 建置、啟動、驗證與停止。作法沿用 multi-ai-chat-desktop 已驗證的模式,並改造成完全不需要 Rust 的通道。
用你的 coding agent 驅動 MAT
- Skill 隨 repo 提供:
.claude/skills/launch-multi-ai-terminal/(Claude Code)與.agents/skills/launch-multi-ai-terminal/(Codex,含agents/openai.yaml)。要求 agent 從原始碼啟動 Multi-AI Terminal:它會先稽核宣告的副作用、檢查前置需求、建置、在空閒的127.0.0.1埠啟動 server,然後回報 URL,由你自己在瀏覽器開啟。 - Skill 僅限明確指示(
disable-model-invocation: true/allow_implicit_invocation: false):只有你主動要求時 agent 才能使用,開啟 repo 不會隱式觸發。 - 此通道只用 npm — 前置需求就是 Node.js 20+ 與 npm。不需要 Rust toolchain、不產生安裝包、不下載 release 資產。
機器可讀的契約
agent-release.json宣告進入點、允許/禁止的權限、副作用、runtime 狀態與結束碼;agent-release.schema.json在 CI 驗證它。- 五個生命週期指令,也提供 npm scripts:
agent:doctor、agent:audit、agent:launch、agent:status、agent:stop(皆支援--json)。 - 啟動前後各跑一次稽核,將實際變更與宣告內容對照記錄。
身分安全的生命週期
- 啟動時 server 掛在一個 runner process 下,其命令列帶著一次性 token。
status與stop只對「本 repo 可證明是自己啟動」的 process 動作;外來或無法驗證的 PID 一律拒絕,絕不誤殺。 - 就緒判定是限定在本次啟動 log 區段內的標記(
[MAT_AGENT] READY url=...)— 先前執行留下的標記無法偽裝新一次啟動已就緒。 - 所有生命週期紀錄(狀態、log、launch 收據、前後稽核)都放在已被 gitignore 的
.agent-runtime/。 - Server 新增
--port 0支援(綁定空閒臨時埠並印出 READY 行);agent 通道預設使用,因此不會和桌面 App 或 dev server 撞埠。
界線
- 生命週期腳本永不安裝/移除主機 toolchain、永不改 PATH 或 shell profile、永不提權、永不讀取 provider 憑證、永不上傳 log 或稽核。
- Skill 被禁止代替你操作已啟動 server 的 provider 安裝/更新/登入 API — 這些永遠由你自己在瀏覽器完成。
- 安裝版桌面 App 開啟時請勿同時執行原始碼通道:兩者共用同一資料目錄(
MAT_DATA_DIR或~/.multi-ai-terminal/)。
驗證
- 新增跨平台端對端測試,在 Ubuntu 與 Windows CI 走完真實流程 — 啟動 → READY → 提供 UI 與 health → 停止 → 狀態清空(
npm run test:agent),並使用臨時資料目錄。 - 本版快照通過 59 個測試檔 / 407 個測試、完整 typecheck、四個獨立證據儀器,以及真實瀏覽器 smoke。