Repository navigation
Expose current desktop selection and active view to connected agents - #353
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #351.
Connected agents can now call
desktop_contextto read the window's current selected element IDs/GUIDs/categories and active view. The desktop answers a new authenticated bridgecontextrequest on its UI thread, so selecting a wall, navigating, clearing selection, deleting elements, or creating/opening another project is reflected in the next snapshot. Home returns no active view; a project-switch transition asks the caller to retry. Headless MCP explains that--connectis required.The operation is read-only and does not edit selection, navigate, access files, or add model/undo changes. Existing command, atomic-script, plugin, file-access and access-control paths remain intact. Missing/wrong tokens disclose no context; read-only window and connection settings still permit the snapshot while edits remain refused. No native file-format or migration change.
Reproduction, synthetic workflow evidence and captured logs
Validation: RED real canvas pick + TCP request failed with
unknown op context; GREEN all 16 desktop control tests, 8 core bridge tests, 5 core read-only tests and 3 documentation-map checks passed. An actual standalone CLI MCP subprocess against the egui window harness verified selected ID/GUID, navigation to a schedule, read-only edit refusal, headless unavailability and no-window connection behavior. Affected default-feature all-target Clippy (-D warnings), fmt check, i18n update/check and the reference-only catalog audit also passed. Local CLI build used--no-default-features(optional DWG/RVT readers omitted); default-feature full workspace/platform and IFC CI remain required. Local Cargo used two jobs, four test threads,RAYON_NUM_THREADS=2, opt0 core and debug0 overrides.