Add process discovery helpers and Magic facade accessors

Introduces ApplicationFinder (by name/title/handle), Magic.Open overloads, and Magic.Threads/Regions/QueryRegion accessors. Closes section 3 of add-thread-region-finder and updates tasks/comparison doc.
This commit is contained in:
kbe
2026-07-22 16:04:53 +02:00
parent 8f988768fe
commit 3e294dc846
12 changed files with 624 additions and 2 deletions
@@ -0,0 +1,25 @@
## ADDED Requirements
### Requirement: Process discovery
WhiteMagic SHALL attach to a target process discovered by process name, window title, or window handle, and SHALL enumerate candidate processes. An ambiguous match MUST fail deterministically rather than attaching to an arbitrary candidate.
#### Scenario: open by process name
- **WHEN** a target is opened by a unique process name
- **THEN** it MUST attach to that process
#### Scenario: open by window title
- **WHEN** a target is opened by a window title
- **THEN** it MUST attach to the process owning the window with that title
#### Scenario: open by window handle
- **WHEN** a target is opened by a window handle
- **THEN** it MUST attach to the process that owns that window
#### Scenario: ambiguous match is rejected
- **WHEN** more than one process matches the given name or title
- **THEN** the open MUST fail and surface the set of candidate processes rather than picking one
#### Scenario: enumerate candidates
- **WHEN** candidate processes are enumerated
- **THEN** the result MUST list the processes eligible to be opened