Skip to content

Expose current desktop selection and active view to connected agents - #353

Merged
IPedrax merged 1 commit into
IPedrax:mainfrom
jonaswre:feat/bridge-selection-context
Nov 11, 2026
Merged

IPedrax merged 1 commit into
IPedrax:mainfrom
jonaswre:feat/bridge-selection-context

Conversation

@jonaswre

@jonaswre jonaswre commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Closes #351.

Connected agents can now call desktop_context to read the window's current selected element IDs/GUIDs/categories and active view. The desktop answers a new authenticated bridge context request 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 --connect is 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.

@IPedrax
IPedrax merged commit a6dd293 into IPedrax:main Nov 11, 2026
5 checks passed
@dronov-dmitry dronov-dmitry moved this to Done in BIMCraft Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature Request] Expose desktop selection and active view to connected agents

2 participants