Repository navigation
Conversation
Bridge methods return res.item / res.skills, not res.result. The mock fixture used result for both, which masked the type mismatch and hid bugs from regression tests. Uncovered while writing tests for the new character-import bridge methods. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d83fa04 to
e0256d6
Compare
|
Heads-up on the PoB-side dependency: companion PR (ianderse/PathOfBuilding#1) was originally targeted at End-to-end smoke test on the rebased Anyone testing locally should point |
…ntegration Adds two new MCP tools that import a live PoE character into the loaded build via the official PoE character-window API. - lua_list_characters: HTTP-only listing (no Lua bridge required), sorted by lastLoginTime, displays class/ascendancy/league/realm/last login. - lua_import_character: replaces the active spec's tree, jewels, items, and skill gems with the in-game state. Returns a before/after diff (stats, items per slot, skill groups, tree node count) so callers can verify the import result. The feature works against the JSON-RPC handlers added on the matching PoB branch (see ianderse/PathOfBuilding#1). Configuration, build notes, other tree specs, and other item sets are preserved. Includes 41 unit tests covering the HTTP client, the handler flow (critical regression test for sequential bridge calls), and a schema guard against duplicate tool registration. POE_SESSION_ID env var documented for private profiles. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The api-stdio branch was last synced with upstream on 2025-11-01 and is missing tree data for league 3.27+. Using it crashes on lua_load_build of any 3.28 build because TreeTab:Load early-returns on the unknown tree version, leaving treeTab.specList empty. The active JSON-RPC API work has migrated to ianderse/dev, which is kept in sync with PathOfBuildingCommunity/dev (the head of upstream PR #9505). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8440b8d to
8663aac
Compare
ianderse
left a comment
There was a problem hiding this comment.
The Node-side code type-checks, but this registers import_passive_tree and import_items_skills, neither of which is implemented or version-checked in this repository. The PR explicitly depends on a separate draft Path of Building PR, so a supported checkout can accept the MCP tool and then fail only after it has fetched data and begun a destructive import.
Please either land/pin the matching bridge implementation first, or add a bridge capability/version handshake that disables these tools until both actions are present. An end-to-end test against that pinned bridge should cover the partial-import failure path.
|
Thank you for the serious work on character import, especially the attention to sequential bridge calls and partial-state handling. I am closing this PR rather than merging it because the project is moving toward vanilla PoB and this destructive import path still depends on a separate bridge implementation. Your contribution is acknowledged in the contributor list, and the design work remains valuable if we return to a safe, vanilla-compatible import flow. |
|
Closing this in favor of the vanilla-PoB direction and a future import flow with durable rollback semantics. |
Summary
Adds two new MCP tools that import a live PoE character into the loaded build via the official
pathofexile.com/character-window/*API.lua_list_characters— HTTP-only listing (no Lua bridge required). Sorted bylastLoginTimedescending. Renders a markdown table with name / level / class / ascendancy / league / realm / last-login / pinnable.lua_import_character— replaces the active spec's tree, jewels, items, and skill gems with the in-game state. Returns a before/after diff (stats, items per slot, skill groups, tree node count) so callers can verify the import.clear_*andignore_weapon_swapflags are exposed for granular control.The feature relies on JSON-RPC handlers added on the matching PoB branch — see ianderse/PathOfBuilding#1 (draft). Build notes, configuration, other tree specs, and other item sets are preserved across an import.
Notable design points
import_passive_tree/import_items_skillsJSON-RPC actions.lua_list_charactersis intentionally registered in the BASE tool schemas (not Lua-only) since it doesn't need the Lua bridge. A schema-guard test prevents duplicate registration.AbortController, 403/404/429 mapped to actionable error messages,POE_SESSION_IDenv var supported for private profiles.import_items_skillsfails afterimport_passive_treesucceeds, the user gets a clear "build is in a PARTIAL state — runlua_reload_build" message.Tests
41 new tests, all green:
tests/unit/poeCharacterApi.test.ts(21) — fetch mocking, 403/404/429 mapping, header/auth/encoding, timeout via fake timerstests/unit/importHandlers.test.ts(20) — full handler flow incl. the sequential-bridge-call regression test, all error paths, all flag forwardingtests/unit/toolSchemas.test.ts(2) — schema guard forlua_list_charactersplacement and duplicatesTest plan
npm install && npm run build && npm testignore_weapon_swap=true(preserves swap config)POE_SESSION_IDapi-stdioworktree🤖 Generated with Claude Code