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(agent): a second protocol, in the guide and in the changelog
esengine2998df7ebd83
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8b661e9b4..aa186d104 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,68 @@ Version numbers here track the **Estella release** — the engine + editor + SDKshipped together, matching the Git tags and GitHub Releases. The SDK is notpublished separately; it ships inside the editor.+## [Unreleased]++### Added++- **The built-in agent speaks OpenAI's protocol, not only Anthropic's.** Chat+ Completions is what OpenAI serves and what almost everything else implements —+ the other vendors, the aggregators, and every local runner (Ollama, vLLM, LM+ Studio). It is a second provider rather than a third dialect of the first: tool+ calls arrive as a field on the assistant message with their arguments as a+ string, each result goes back as its own message, and the stream is untyped+ deltas stitched by index. The Custom Provider gained a **protocol** picker;+ OpenAI ships as a provider with its address and protocol but not its model+ names, which you type — a list shipped in the editor would be right until the+ vendor's next release, and a name that no longer exists is not refused, it is+ quietly served by something smaller for the rest of the session.++- **The running world's Outliner folds, filters, and hides.** In Play, the Game+ tree was every row forced open with no twist, no search and no eye — a world of+ a few thousand entities arrived fully flattened. Rows start collapsed, the+ header carries a search box and expand/collapse-all, and the eye turns a live+ entity off to find out what it was. A UI node hides through `display`, so one+ click takes a whole HUD with it; a row with nothing of its own to hide gets no+ eye rather than one that does nothing.++### Fixed++- **`setEntityVisible` knew three renderers; the scene manager knew six.** Two+ lists answered the same question and disagreed, so calling this public API on a+ Spine armature, a particle system or a UI element silently did nothing at all.+ One list now, and a UI node hides through `display` — which the layout pass+ resolves down the tree, because hiding a panel has to hide what is inside it.++- **Deleting assets no longer re-reads the whole project once per file.** On a+ project with 36k assets, selecting a folder's worth and pressing Delete took 52+ seconds to show the confirm dialog for 22 files, and never came back for more.+ The dialog asked what references each asset one asset at a time, each answer a+ fresh disk walk; and the *incremental* re-scan recomputed the entire dependency+ graph anyway, because a removal changes the entry set and that was treated as+ "resolution changed". It is not: dropping an entry can only delete edges+ pointing at it. One scan for the batch, and only the documents that referenced+ something removed are re-read. Those 22 files now take 2.2 seconds.++- **The Content Browser no longer mounts a tile per file in the folder.** A folder+ of 788 sprites built 788 tiles and decoded 788 full-size images — 26 megapixels+ resident for the twenty on screen. Both views are windowed now, over the same+ scroll-window implementation the Outliner uses.++- **Stopping the agent mid-run no longer breaks the conversation** on endpoints+ that require every tool call to be answered.++- **Leaving Play no longer strands the Outliner and Details on the running world.**+ Stop takes the world picker away, so a choice that outlived the realm left both+ panels showing a world that no longer exists, with nothing on screen able to+ switch them back.++- **`prefabEntityId: '0'` is refused rather than dropped in silence**, and the+ sample code that still taught it was fixed. `'0'` is the id every prefab had+ before stable ids; a prefab saved by the editor since has a UUID, so an override+ carrying `'0'` aimed at nobody — every instance spawned at the position the+ prefab was authored with, and nothing said why. An override with no+ `prefabEntityId` now means the root, which is the entity a one-sprite prefab has.+## [0.44.0] - 2026-08-05### Addeddiff --git a/docs/astro/src/assets/guides/en/agent-settings.png b/docs/astro/src/assets/guides/en/agent-settings.pngindex 40971793c..0a25dfdb6 100644Binary files a/docs/astro/src/assets/guides/en/agent-settings.png and b/docs/astro/src/assets/guides/en/agent-settings.png differdiff --git a/docs/astro/src/assets/guides/zh/agent-settings.png b/docs/astro/src/assets/guides/zh/agent-settings.pngindex 7adbcb664..6655f7444 100644Binary files a/docs/astro/src/assets/guides/zh/agent-settings.png and b/docs/astro/src/assets/guides/zh/agent-settings.png differdiff --git a/docs/astro/src/content/docs/extending/built-in-agent.mdx b/docs/astro/src/content/docs/extending/built-in-agent.mdxindex 520ac3124..5fb9d3e01 100644--- a/docs/astro/src/content/docs/extending/built-in-agent.mdx+++ b/docs/astro/src/content/docs/extending/built-in-agent.mdx@@ -21,21 +21,35 @@ your Undo takes them back, and you can take the mouse at any moment.The editor ships no key and calls nothing on its own. Open **Settings ▸ AI Agents**and configure one provider — that is the whole setup.-+<Steps>-1. Paste an **API key** for Anthropic or DeepSeek. Each provider keeps its own, so- switching back to one you used last week costs nothing.+1. Paste an **API key** for Anthropic, DeepSeek or OpenAI. Each provider keeps its+ own, so switching back to one you used last week costs nothing.-2. Or fill in the **Custom Provider**: any Anthropic-compatible endpoint, plus the- model names it offers. Those names become choices in the composer.+2. Some providers also want their **model names** typed in. That is deliberate: a+ list shipped in the editor would be right until the vendor's next release, and a+ name that no longer exists is not refused — the endpoint quietly serves something+ smaller instead, for the rest of the session.-3. Close Settings. The model picker sits next to the box you type in — it is a+3. Or fill in the **Custom Provider** — any endpoint at all. Pick which **protocol**+ it speaks, then give its address and its model names.++4. Close Settings. The model picker sits next to the box you type in — it is aper-message choice, not a preference buried in a dialog.</Steps>+<Aside type="tip" title="Which protocol">+**Chat Completions** is OpenAI's, and it is what almost everything else implements+too — the other vendors, the aggregators, and every local runner (Ollama, vLLM, LM+Studio). **Messages** is Anthropic's; a gateway that emulates it works here as well,+minus the extensions that are Anthropic's own (extended thinking, prompt caching,+automatic fallbacks). The two formats differ in every message they send, so a wrong+pick is refused outright rather than quietly degraded.+</Aside>+<Aside type="tip" title="Where the key lives">In the system keychain. It is never written to the project, never written to thesettings file, and never handed back to the editor window — only to the client thatdiff --git a/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx b/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdxindex e8894af7b..62d8adfd4 100644--- a/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx+++ b/docs/astro/src/content/docs/zh-cn/extending/built-in-agent.mdx@@ -20,21 +20,33 @@ import { Aside, Steps } from '@astrojs/starlight/components';编辑器不附带任何密钥,也不会自己发起任何调用。打开**设置 ▸ AI 代理**,配好一个提供方,配置就算做完了。-+<Steps>-1. 填入 Anthropic 或 DeepSeek 的 **API 密钥**。每个提供方各存各的,+1. 填入 Anthropic、DeepSeek 或 OpenAI 的 **API 密钥**。每个提供方各存各的,所以切回上周用过的那个不用重新输入。-2. 或者填**自定义提供方**:任何兼容 Anthropic 的接口地址,加上它提供的模型名。- 这些名字会出现在输入框旁边的模型选择器里。+2. 有些提供方还要你自己填**模型名**。这是故意的:编辑器内置的列表只能正确到+ 厂商下次发布为止,而写了个已经不存在的名字并不会被拒绝——接口会悄悄改用一个+ 更小的模型顶上,并且一整个会话都是如此。-3. 关掉设置。模型选择器就在你打字的那个框旁边——它是**逐条消息**的选择,+3. 或者填**自定义提供方**——任何接口都行。先选它讲哪种**协议**,+ 再填地址和模型名。++4. 关掉设置。模型选择器就在你打字的那个框旁边——它是**逐条消息**的选择,而不是埋在对话框里的偏好设置。</Steps>+<Aside type="tip" title="该选哪种协议">+**Chat Completions** 是 OpenAI 的协议,而且几乎其他所有东西也都实现了它——+其他厂商、聚合网关,以及所有本地运行器(Ollama、vLLM、LM Studio)。+**Messages** 是 Anthropic 的协议;模拟它的网关在这里同样能用,+只是少了那些属于 Anthropic 自己的扩展(扩展思考、提示缓存、自动回退)。+两种格式发出的每一条消息都不一样,所以选错会被直接拒绝,而不是悄悄降级运行。+</Aside>+<Aside type="tip" title="密钥存在哪">存在系统钥匙串里。它不写进项目、不写进设置文件,也不会交回给编辑器窗口——只交给那个必须发送它的客户端。