A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: several editors open at once, and the permission that belongs to each
yhh5a755f4d0e74
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4a1726430..55443721a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,10 @@ published separately; it ships inside the editor.## [Unreleased]+### Fixed++- **Several editors open at once can be told apart by an agent, and each grants on its own.** An editor advertises itself in a file of its own (its process id, its project, its port, its permission) instead of the one file the last editor to start overwrote. An agent attached to more than one gets `list_editors` and `select_editor` (or `--instance` / `ESTELLA_MCP_INSTANCE`), and until it chooses it is refused with the list rather than sent to whichever window won. It then drives the editor it chose and no other. The Read only / Can edit permission belongs to the editor window it is switched in and every editor starts read-only; it is no longer a saved setting that a second editor inherited. The Connect AI Tools dialog shows which editor it is.+### Changed- **The 3D Starter looks finished out of the box.** Its sun casts mesh shadows (they were off, so every object floated), its camera carries a `PostProcessVolume` with a sky that lights the scene, height fog, GTAO, auto exposure, bloom, grade, vignette and FXAA, and its ground reaches the horizon. A new guide, *Getting a good 3D look*, lists what it sets and how to carry a three.js scene's numbers over (units, light intensity, colours, lamps).diff --git a/desktop b/desktopindex 82bee205f..68156a9ed 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 82bee205f5ff9487e1f609c1b037db6157320228+Subproject commit 68156a9ed4c96b36d7f1d62c13003a01c752f556diff --git a/docs/astro/src/content/docs/agents/mcp.mdx b/docs/astro/src/content/docs/agents/mcp.mdxindex c15510801..63e786359 100644--- a/docs/astro/src/content/docs/agents/mcp.mdx+++ b/docs/astro/src/content/docs/agents/mcp.mdx@@ -33,7 +33,7 @@ overwritten.- **No Node.js install needed** — the entry runs the bundled script on the editor'sown executable.-- **What an agent may do** is switched in the dialog: Read only / Can edit. The editor+- **What an agent may do** is switched in the dialog: Read only / Can edit. It belongs to the editor window you switch it in: it is never saved, so every editor starts read-only, and granting edits in one open editor says nothing of another. The editordecides it live and the entries carry no permission, so a change reaches everyconnected tool at once, with no restart and no config rewritten.- **Whether it really connected** is the line at the bottom: "Last call: Claude Code,@@ -123,6 +123,20 @@ Order doesn't matter: the server resolves the editor **per call**, so you can styour AI tool first and open the editor later, and restarting the editor mid-sessionreconnects automatically rather than stranding the agent.+### Several editors open at once++Each editor advertises itself in its own file (`mcp-instances/<pid>.json` in the user-data folder) with its process id, the project it holds, its port and its own+permission, so an agent can tell them apart. With one editor open the session simply drives it. With two or more, the agent is not left to guess, because a call+that lands in the wrong window changes the wrong project: every tool but two answers with the list until it picks.++- `list_editors` shows each open editor: pid, project, port, and whether it lets agents change the project.+- `select_editor` takes a pid, a port or part of a project name or path. The session then drives that editor and no other, and an editor opened later does not+ take it over. If that editor closes, the session asks again.+- To fix the choice in the tool's config instead, pass `--instance <pid | project name>` to the script or set `ESTELLA_MCP_INSTANCE`.++The permission (Read only / Can edit) belongs to each editor window and starts read-only, so granting one editor never grants another. The connect dialog shows+which editor it is: its project, process id and port.+## What the agent can doThe everyday tools (about fifty: the scene, Play, opening and saving, screenshots, logs) are listed from the start; the rest are indiff --git a/docs/astro/src/content/docs/zh-cn/agents/mcp.mdx b/docs/astro/src/content/docs/zh-cn/agents/mcp.mdxindex 281fd2c56..44b5bb0b0 100644--- a/docs/astro/src/content/docs/zh-cn/agents/mcp.mdx+++ b/docs/astro/src/content/docs/zh-cn/agents/mcp.mdx@@ -28,7 +28,7 @@ Claude Code、Cursor,或你自己写的代理——都能驱动真实的编辑不会覆盖你的文件。- **不需要另装 Node.js**:写进去的条目用编辑器自己的可执行文件运行内置脚本。-- **代理权限**在对话框里切换:只读 / 可修改。它由编辑器实时决定,条目里不带权限,+- **代理权限**在对话框里切换:只读 / 可修改。它属于你切换它的那个编辑器窗口:不会被保存,每个编辑器启动时都是只读,在一个打开的编辑器里授权不影响另一个。它由编辑器实时决定,条目里不带权限,所以切换立即对所有已连接的工具生效,不需要重启它们,也不会改写它们的配置。- **是否真的连上了**看对话框底部:"最近一次调用:Claude Code,12 秒前"。条目写进去不等于工具在用它,这一行才是证据。@@ -109,6 +109,17 @@ claude mcp add estella --env ESTELLA_MCP_ALLOW_WRITES=1 -- \启动顺序无所谓:服务器**每次调用时**才去解析编辑器,所以你可以先开 AI 工具、后开编辑器;会话中途重启编辑器也会自动重连,不会把代理晾在那儿。+### 同时打开多个编辑器++每个编辑器都在 user-data 目录里写一个属于自己的文件(`mcp-instances/<pid>.json`),带上进程 id、当前项目、端口和它自己的权限,代理因此能把它们分开。+只开了一个编辑器时,会话直接驱动它。开了两个或更多时,不让代理去猜——调用落到错误的窗口,改的就是错误的项目:在它选定之前,除了两个工具外,其他工具都只会回答编辑器列表。++- `list_editors` 列出每个已打开的编辑器:pid、项目、端口,以及是否允许代理修改项目。+- `select_editor` 接受 pid、端口,或项目名/路径的一部分。此后会话只驱动那一个编辑器,之后才打开的编辑器不会把它抢走;那个编辑器关闭后,会话会再次询问。+- 想把选择固定在工具配置里,可以给脚本传 `--instance <pid | 项目名>`,或设置环境变量 `ESTELLA_MCP_INSTANCE`。++权限(只读 / 可修改)属于每个编辑器窗口,启动时都是只读,所以给一个编辑器授权不会授权另一个。连接对话框会显示这是哪个编辑器:它的项目、进程 id 和端口。+## 代理能做什么常用的工具(约五十个:场景、Play、打开和保存、截图、日志)一开始就列出;其余分在若干组里,代理需要时用 `enable_tools` 打开:`assets`、`prefab`、`authoring`、`view`、`play`、`render`、`project`、`code` 和 `device`。第一次调用之前就把全部工具交过去,每个会话都要多花几千 token,也更难挑出合适的那个;不管列没列出,任何工具都可以直接按名字调用。客户端跟不上工具列表变化的,加 `--all-tools`。下表列出的工具来自所有组。