Repository navigation
feat: extract WinGuiMcp.Core and add declarative scenario runner - #5
Merged
Merged
Conversation
Split the UIA, input, capture, session and catalog layers into a WinGuiMcp.Core class library so sibling domain servers (lightroom-mcp) can reference them instead of vendoring. Namespaces are unchanged and a golden tool-surface test proves the existing 27 tools and catalog schemas are byte-identical to before the move. Add a Playwright-style scenario engine in Core (YAML/JSON step files, typed params, save/expect/retry/when/guard modifiers, wait_until, checkpoint + single-use resume tokens, sub-scenarios, receipts with secret redaction, dry runs, allowWrites gate, target guard with a restricted-app denylist, foreground guard). Exposed as run_scenario, resume_scenario, validate_scenario, list_scenarios and a `scenario` CLI subcommand. Accepts docs/proposals/scenario-runner.md with changes (ADR-0001). Fix wait_for window-active/window-closed failing with "Unknown condition" instead of polling until timeout (found by the first live scenario run; WaitForRegressionTests). Also: WindowCapture.CaptureToFile, ForegroundInfo, AddWinGuiCore DI entry point, global.json (.NET 10), CI on global.json with the gate filter narrowed to *GateTests, Lightroom boundaries constitution. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
lightroom-mcp, a Lightroom Desktop server (LIGHTROOM_BOUNDARIES_CONSTITUTION). Namespaces are unchanged, and the host callsAddWinGuiCore().*.scenario.yaml/.jsonstep files, run byrun_scenario,resume_scenario,validate_scenarioandlist_scenarios, or by theWinGuiMcp scenario ...CLI. Features:save,expect,retry,whenandguard;wait_until, sub-scenarios viacall, andcheckpointwith single-use resume tokens;allowWritesgate, a target-process guard with a built-in restricted-app denylist, and a foreground guard;Language reference: docs/scenarios.md.
docs/proposals/scenario-runner.mdis accepted with changes (ADR-0001). The record-and-replay export stays deferred.wait_forwindow-active/window-closedfailed with "Unknown condition" instead of polling until timeout. The first live scenario run found it.Compatibility
ToolSurfaceSnapshotTestslocks every[McpServerTool]attribute and catalog schema against a golden file generated before the move. The only difference is the four new scenario tools; the existing 27 tools and the catalog are identical.search_tools,describe_toolandexecute_tool(documented in tools.md).global.json(.NET 10.0.402) instead of9.0.x, and the gate filter is narrowed to*GateTests. The old!~Phase1filter also hid a registration test.Testing
dotnet test WinGuiMcp.sln --filter "FullyQualifiedName!~GateTests": 74/74 pass locally. The run had 40 tests before this change, and adds a surface lock, 31 scenario tests and 2wait_forregressions. The regression tests fail without the fix and pass with it.scenario validateandscenario run --dry-runonsamples/scenarios/notepad-roundtrip.scenario.yamlpass.🤖 Generated with Claude Code