This commit is contained in:
2026-09-10 17:03:10 +02:00
parent 90dc18a167
commit 3a3d70efeb
27 changed files with 4973 additions and 3 deletions
+43
View File
@@ -155,6 +155,49 @@ to an empty string opts out of SDK features permanently.
* `RA3 Mod XML: Show cache report`
* `RA3 Mod XML: Find unreferenced assets…`
* `RA3 Mod XML: Find unreferenced assets of this type`
* `RA3 Mod XML: Enable AI Agent access…`
* `RA3 Mod XML: Install Agent Skill…`
* `RA3 Mod XML: Export AI Agent index snapshot`
## AI Agent Access
The extension can expose its semantic asset index to AI Agent clients through
a local, read-only MCP (Model Context Protocol) server. This is optional and
does not modify `PATH` or install global commands.
Run:
`RA3 Mod XML: Enable AI Agent access…`
The command:
1. Exports a stable index snapshot for the active project.
2. Creates a stable launcher under `~/.ra3modxml/`.
3. Starts a local read-only query server while VS Code is running.
4. Offers to:
* install the `ra3-mod-xml` Agent Skill to `~/.agents/skills/` (and
optionally to Claude Code or project-local skill directories),
* write the MCP client configuration for Claude Desktop or Cursor,
* copy a generic MCP configuration block.
The MCP server prefers the live in-memory index while the extension is
running and falls back to the last exported snapshot when VS Code is closed.
The exposed tools include asset lookup, incoming semantic references,
**outgoing reference edges** (`get_asset_references`: which assets an asset
uses, through which element/attribute, and where in the XML), active-file
checks, `$DEFINE` lookup, and Include source resolution.
`get_asset_references` follows `inheritFrom` ancestors and marks the
ancestor's entries with `definedIn`, so "this unit has no `WeaponSetUpdate`,
but the base unit it inherits from does" is answerable in a single call. It is
bounded by `depth` (default 1, max 3), `targetTypes` and `maxEdges`, and
reports truncation instead of silently dropping results.
Discovery is per project (`~/.ra3modxml/endpoints/<project>.json`), so several
VS Code windows can enable agent access at the same time without shadowing each
other, and a client can never be silently answered from a different project.
See `docs/ai-agent-integration-plan.md` for the full design and progress.
## Requirements