@ycheung5/pi-computer-use 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GLOSSARY.md +38 -0
- package/LICENSE +21 -0
- package/README.md +165 -2
- package/assets/accessibility.cs +208 -0
- package/assets/browser-indicators.cs +37 -0
- package/assets/capture.cs +215 -0
- package/assets/clipboard.cs +197 -0
- package/assets/controls.cs +249 -0
- package/assets/indicator-preview.png +0 -0
- package/assets/indicators.cs +252 -0
- package/assets/node-LICENSE.txt +2732 -0
- package/assets/ocr.cs +86 -0
- package/assets/ownership.cs +59 -0
- package/assets/pointer.cs +229 -0
- package/assets/puppeteer-LICENSE.txt +202 -0
- package/assets/readme-banner.svg +33 -0
- package/assets/stop.cs +197 -0
- package/assets/text.cs +249 -0
- package/assets/wgc.cs +167 -0
- package/assets/window-management.cs +217 -0
- package/assets/window-marker.cs +23 -0
- package/assets/window-references.cs +80 -0
- package/assets/windows.cs +127 -0
- package/dist/accessibility.d.ts +29 -0
- package/dist/accessibility.js +258 -0
- package/dist/browser-actions.d.ts +21 -0
- package/dist/browser-actions.js +213 -0
- package/dist/browser-indicators.d.ts +23 -0
- package/dist/browser-indicators.js +69 -0
- package/dist/browser-profiles.d.ts +10 -0
- package/dist/browser-profiles.js +174 -0
- package/dist/browser.d.ts +11 -0
- package/dist/browser.js +2071 -0
- package/dist/capture.d.ts +74 -0
- package/dist/capture.js +199 -0
- package/dist/client.d.ts +38 -0
- package/dist/client.js +331 -0
- package/dist/desktop.d.ts +20 -0
- package/dist/desktop.js +42 -0
- package/dist/extension.d.ts +4 -0
- package/dist/extension.js +409 -0
- package/dist/launcher.d.ts +6 -0
- package/dist/launcher.js +85 -0
- package/dist/native.d.ts +11 -0
- package/dist/native.js +145 -0
- package/dist/ocr.d.ts +52 -0
- package/dist/ocr.js +246 -0
- package/dist/ownership.d.ts +4 -0
- package/dist/ownership.js +24 -0
- package/dist/pointer.d.ts +108 -0
- package/dist/pointer.js +174 -0
- package/dist/protocol.d.ts +15 -0
- package/dist/protocol.js +1 -0
- package/dist/runtime.d.ts +8 -0
- package/dist/runtime.js +72 -0
- package/dist/settings.d.ts +85 -0
- package/dist/settings.js +449 -0
- package/dist/stop.d.ts +24 -0
- package/dist/stop.js +156 -0
- package/dist/text.d.ts +100 -0
- package/dist/text.js +183 -0
- package/dist/waits.d.ts +19 -0
- package/dist/waits.js +262 -0
- package/dist/window-management.d.ts +25 -0
- package/dist/window-management.js +167 -0
- package/dist/worker.d.ts +1 -0
- package/dist/worker.js +540 -0
- package/docs/README.md +54 -0
- package/docs/adr/0001-preserve-reference-behavior.md +9 -0
- package/docs/adr/0002-window-lifetime-references.md +11 -0
- package/docs/adr/0003-exclusive-desktop-control.md +11 -0
- package/docs/adr/0004-pi-first-acceptance.md +9 -0
- package/docs/adr/0005-default-apps-and-workspace-reuse.md +7 -0
- package/docs/agents/domain.md +9 -0
- package/docs/agents/issue-tracker.md +10 -0
- package/docs/agents/triage-labels.md +9 -0
- package/docs/browser.md +113 -0
- package/docs/implementation-plan.md +139 -0
- package/docs/indicators.md +53 -0
- package/docs/native-interop-research.md +17 -0
- package/docs/ownership.md +25 -0
- package/docs/pi-extension-research.md +57 -0
- package/docs/pointer.md +65 -0
- package/docs/runtime.md +42 -0
- package/docs/settings.md +33 -0
- package/docs/spec.md +161 -0
- package/docs/stopping.md +83 -0
- package/docs/text.md +79 -0
- package/docs/tickets.md +84 -0
- package/docs/validation.md +1372 -0
- package/docs/windows.md +171 -0
- package/package.json +134 -4
package/docs/windows.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Windows discovery
|
|
2
|
+
|
|
3
|
+
## Screenshots
|
|
4
|
+
|
|
5
|
+
`windows_computer_use_screenshot` accepts native window identity/title/process targeting, `scope: active_window | desktop`, `maxWidth` (0 means original size), and optional explicit activation. Capture does not resolve UIA elements. PNG data is returned as a Pi image block; text and rendering details contain metadata without duplicated base64.
|
|
6
|
+
|
|
7
|
+
For native window capture, opt in to `windowOnly: true` to prohibit screen-copy and desktop fallback before acquisition. This mode uses only `PrintWindow` or lifetime-validated HWND-bound WGC; it can capture a covered window without reading the covering app. Hidden/minimized targets return `WINDOW_CAPTURE_UNAVAILABLE` without an image; failed WGC also returns failure without a fallback image. It rejects `scope: desktop` and `browserTab` combinations. Omitting the option or setting it false retains the capture chain below. The opt-in may need the slower render/WGC path even for a clear foreground window. Snapshot and OCR contracts are unchanged.
|
|
8
|
+
|
|
9
|
+
Prepare the display checks with `npm run test:native:capture -- --display --plan` and `--control-capture --plan`; these plans require neither compiled code nor Windows. After building and verifying Windows-readable dependencies, use Windows Node to run the configured runner with `--display` or `--control-capture`, under the shared live-test lock. Both modes use disposable settings and strict owned-window screenshots. The control case briefly holds control without dispatching input and samples only guarded owned edge points. It proves the exercised render path, not every screen-copy/OCR/recording path. The commands record actual DPI and leave Windows display settings unchanged; [current evidence](validation.md#display-and-border-baseline) distinguishes 100% runs from pending higher/mixed-DPI setup.
|
|
10
|
+
|
|
11
|
+
The capture chain prefers verified unobstructed foreground pixels, then `PrintWindow`. A failed or apparently blank render tries an isolated Windows.Graphics.Capture helper using HWND interop and a free-threaded frame pool. The helper has bounded frame/copy polling plus an external worker deadline, so unavailable WinRT metadata and stalled capture do not disable ordinary window enumeration. A final screen-region fallback is marked `occludedPossible: true`. Hidden/minimized/unavailable target surfaces return a desktop fallback marked `windowCaptureFailed: true`; callers must not treat it as the target's content. Capture errors and fallback warnings remain explicit.
|
|
12
|
+
|
|
13
|
+
If a visible window's `PrintWindow` render fails and the following screen-region copy throws a Win32 error, capture can still pass its validated private target to WGC without a native image. Successful recovery returns the actual WGC PNG and retains `nativeCaptureError`; if WGC is unavailable, the result remains a failure with both stage diagnostics and no fabricated image. Identity loss, cancellation and unconfirmed cleanup do not authorize this handoff or a successful fallback.
|
|
14
|
+
|
|
15
|
+
`bounds` and `origin` are physical screen coordinates, including negative virtual-desktop positions. `width`/`height` describe the actual PNG. Map image X using `origin.x + imageX / imageScale` and Y using `origin.y + imageY / imageScaleY`; a separate Y scale accounts for height rounding during resizing. Target identity and geometry are checked around capture. No tool automatically activates a window unless `activate: true` is requested.
|
|
16
|
+
|
|
17
|
+
Run `npm run test:native:capture` with Windows Node after building. Its dedicated passive fixtures verify actual green pixels behind a magenta cover, PNG dimensions, coordinate mapping, wrong-owner refusal, a black-frame-triggered WGC fallback and explicit minimized-target metadata. Screenshots remain in test process memory; the suite sends no physical input. The existing paired runner's `--scenario monitor-placements` now covers primary, real negative-X and boundary placements on two 100% monitors, with native/scaled PNGs and independently measured physical DWM frame geometry, exact bounds/origin checks and documented reference scale precision; `--plan` is safe without a backend. See [focused mapping evidence](validation.md#current-negative-origin-screenshot-mapping). 150/200%, mixed-DPI transitions and changed display/primary topology still require suitable recorded validation rather than being inferred from resizing or window movement. The [paired capture/OCR baseline](validation.md#paired-capture-and-ocr-comparison) additionally compares the pinned reference through public interfaces and retains its minimized-caption and fallback differences; those findings do not authorize changing Pi to reproduce misleading capture evidence.
|
|
18
|
+
|
|
19
|
+
WGC uses the documented [CreateForWindow interop](https://learn.microsoft.com/en-us/windows/win32/api/windows.graphics.capture.interop/nf-windows-graphics-capture-interop-igraphicscaptureiteminterop-createforwindow), [free-threaded frame pool](https://learn.microsoft.com/en-us/uwp/api/windows.graphics.capture.direct3d11captureframepool.createfreethreaded), and [memory-buffer byte access](https://devblogs.microsoft.com/oldnewthing/20240122-00/?p=109304). A composited frame can legitimately be black; only the unreliable PrintWindow path uses black-frame detection to choose a fallback.
|
|
20
|
+
|
|
21
|
+
## Implemented scope
|
|
22
|
+
|
|
23
|
+
`windows_computer_use_list_windows` reads native top-level windows without resolving UI Automation elements or sending physical input. Options match the reference: `includeInvisible` defaults to false and `maxWindows` defaults to 50, with an integer range of 1–200. The default excludes hidden and minimized windows.
|
|
24
|
+
|
|
25
|
+
Results include a window ID with HWND/PID ownership, name, class, bounding box, enabled/offscreen/focus state, native source and bounded responsiveness information. `truncated` indicates the limit stopped enumeration. A denied responsiveness probe is reported as `responsive: null` and `responsiveness: access_denied`; an unsuccessful probe is not proof that an application is permanently hung. Enumeration rechecks owner PID before returning a record, but its result remains an observation rather than a guarantee that the window still exists at a later action.
|
|
26
|
+
|
|
27
|
+
Worker request envelopes and listing arguments are validated at execution, independently of Pi's schema. Invalid requests with usable IDs receive failures; unidentifiable malformed requests produce stderr diagnostics without crashing later valid requests.
|
|
28
|
+
|
|
29
|
+
## Native bridge
|
|
30
|
+
|
|
31
|
+
TypeScript owns dispatch and lifecycle. A focused C# bridge performs Win32 enumeration on an MTA thread through a persistent JSON-line process. The package contains fresh bridge source, compiled lazily with the Windows .NET Framework64 compiler into a source-versioned cache below `%LOCALAPPDATA%\pi-computer-use\native`. No separately installed .NET SDK is required on the tested Windows 11 baseline. Missing compiler/data-directory and compilation failures are explicit; cache and compilation are not assumed to work on untested Windows configurations.
|
|
32
|
+
|
|
33
|
+
Keeping the helper persistent gives subsequent accessibility slices a place for apartment-owned element references. Helper stdin closure ends it; worker disposal closes its transport. The native helper has an execution watchdog, and cancellation rejects a request without replaying it. [Desktop ownership](ownership.md), [stopping](stopping.md) and [guarded pointer actions](pointer.md) now extend this bridge; discovery itself sends no physical input.
|
|
34
|
+
|
|
35
|
+
## Validation
|
|
36
|
+
|
|
37
|
+
- `npm run check`: includes invalid listing options, malformed worker envelopes, continued health execution after errors and Pi tool registration/dispatch.
|
|
38
|
+
- `npm run build`: produces the worker modules; package contents include the native bridge source.
|
|
39
|
+
- `npm run test:native:windows`: run with Windows Node after building. Creates only dedicated passive fixture windows, tests visible/hidden filtering, identity metadata, bounds, responsiveness, limits and window disappearance, then closes fixtures and disposes the worker. It does not send keyboard/mouse input or modify normal applications.
|
|
40
|
+
|
|
41
|
+
Live proof on 2026-10-29 used Windows 11 x64 through WSL interop and the private package-managed Node runtime. Both portable worker/Pi tests and the real fixture test passed. After integrating the WSL2 launcher, a Linux-side worker client also enumerated one native window through that launcher and disposed successfully; only counts were logged. Per-monitor DPI awareness is requested before enumeration; the later [focused mapping check](validation.md#current-negative-origin-screenshot-mapping) covers two-monitor/negative-X geometry at 100%, with other DPI and topology cases still open.
|
|
42
|
+
|
|
43
|
+
## Default apps and workspaces
|
|
44
|
+
|
|
45
|
+
`launch_app` accepts HTTP(S) URLs and existing fully qualified document paths in addition to explicit executables, shortcuts and installed app identities. `target: "browser"` selects the Windows HTTPS default browser without inventing a page URL. `resolveOnly: true` returns `verification: resolved`, `launched: false` and available handler metadata, without launching or enumerating new windows. For explicit apps the resolved target identifies the executable/app; associated URLs/documents include `handler` with association, executable, display name and ProgID. Metadata may be incomplete for packaged handlers and is not a window identity.
|
|
46
|
+
|
|
47
|
+
Resolve the handler before selecting an intended existing window; create a separate task tab/document through its observed UI and preserve original work. An actual open is delegated once to Explorer's shell, allowing the selected default app to handle the URL/document. It is reported as dispatched, not proof of a new window/tab. Unknown associations refuse with `DEFAULT_APP_UNAVAILABLE` rather than using generic Open With or another browser. Blank default-browser launch requires an executable; an unavailable executable is an explicit limitation. Associated targets accept no command arguments/working directory; script/installer files and command/script-host handlers remain refused. Arbitrary protocol schemes remain unsupported. Resolution uses Microsoft's [AssocQueryStringW](https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-assocquerystringw), including current-user protocol association and unknown-handler refusal flags; no default association is changed.
|
|
48
|
+
|
|
49
|
+
Confirmed native activation returns its lifetime reference and establishes visible intent for this computer-use operation. Related native actions resolve their actual root before inheriting that intent, including element-only actions; explicit `activate: false` or background dispatch/method takes precedence. Passive observations do not inherit activation. A helper restart or new operation does not inherit old intent. Existing target/lifetime and input safeguards still apply; activation refusal is reported before control dispatch. This is operation context in the existing native helper, not a separate planner or an additional UIA lookup.
|
|
50
|
+
|
|
51
|
+
Run `npm run test:native:management -- --workspace` with Windows Node under the shared live-test lock after building. The owned fixture resolves the actual HTTPS default without launching it, uses a private GUID extension/ProgID to exercise Explorer document opening, verifies a new task tab and unchanged original document, switches to an owned caller to test foreground retention, checks explicit background preservation and a separate-window request, then verifies borrowed-window survival across worker shutdown. The private registration rolls back partial setup; fixture entry records its PID, and cleanup verifies executable identity before retirement. No real default associations, personal documents, clipboard or physical input are used. The existing `npm run test:native:chromium -- --workspace` additionally exercises native New Tab invocation and original-page/editor preservation in a normal window of the resolved Windows default Chromium browser, with a disposable profile and no protocol connection. [Evidence and remaining scope](validation.md#default-app-and-workspace-acceptance). The real-Pi companion `npm run test:pi:workspace` prints a safe plan. `--preflight` checks owned fixture readiness/cleanup without a model; `--run --runs 3` requires explicit model-usage authorization and unlocked Windows. See [actor evidence and acceptance limits](validation.md#ordinary-pi-workspace-actor-preparation). The same companion supports `--scenario ambiguous` and `--scenario unsafe-workspace` with owned native app fixtures; [each passed three independently reviewed agent resets](validation.md#workspace-decision-acceptance). Future refusal invocations permit one episode before semantic review; structured observation checks never automatically accept the agent’s decision.
|
|
52
|
+
|
|
53
|
+
## Target resolution
|
|
54
|
+
|
|
55
|
+
Listing establishes identity metadata; targeted observations and actions recheck that identity. The native accessibility fixtures exercise ambiguous titles, missing/wrong-owner targets and removed/unseen references through the public interface. The [paired accessibility baseline](validation.md#accessibility-comparison-evidence) compares these outcomes with DSH. Inaccessible/elevated providers and additional replacement cases remain release checks. No test-only target-resolution API is required. Browser-tab discovery is described in [browser control](browser.md).
|
|
56
|
+
|
|
57
|
+
### Window lifetime references
|
|
58
|
+
|
|
59
|
+
Native observations return an opaque `windowRef` bound to a unique private property on the observed window. Retain it when targeting later native reads/actions. Explicit HWND/PID/title selectors and `uia:hwnd` IDs remain weaker compatibility selection: those numbers alone cannot distinguish same-process handle reuse. A supplied reference is never discarded, restamped or converted into a weak selector after failure. Additional selectors must agree with it; desktop scope and browser-tab targets cannot use it.
|
|
60
|
+
|
|
61
|
+
Enumeration binds before retaining window metadata and validates that same witness before emitting its row. Lost proof omits the unsafe row with explicit incomplete observation; the same pass never restamps it. Internal metadata-only enumeration does not bind.
|
|
62
|
+
|
|
63
|
+
The persistent native bridge is the sole authority. Native-child restart, expiry or unknown references require fresh observation. A missing/mismatched marker means lost proof, including when HWND/PID still match; it does not prove the window disappeared. Window waits remain inconclusive in that case, including when a destroyed window leaves a requested title constraint unverifiable. References do not grant desktop ownership or bypass Windows UIPI. Marker acquisition failure preserves read metadata and `windowRefUnavailable`, without issuing actionable native control IDs.
|
|
64
|
+
|
|
65
|
+
Issued native element IDs are opaque, immutable bindings to the observed root reference and cached UIA object; RuntimeId is comparison metadata. A fresh observation cannot overwrite an old ID with a replacement root. Responses carry the root token once rather than repeating it on every tree node. Browser IDs keep their existing behavior.
|
|
66
|
+
|
|
67
|
+
Window captures, snapshot `captureWindow: true`, OCR/hit tests and guarded fallback input retain the originating reference. Snapshot's default image is separately labeled desktop evidence, without inheriting the tree's window token. WGC receives only a private stateless marker descriptor from the authority; it does not resolve public tokens. Implicit last targets preserve a known reference. Raw window waits and internal launch bookkeeping enumerate metadata without stamping unrelated windows; new-window launch metadata is explicitly unbound until selected/observed.
|
|
68
|
+
|
|
69
|
+
Validation occurs at existing preparation/dispatch checks and between steps. If proof is lost after an action attempt, results retain `dispatchAttempted`, `effectsUncertain` and dispatch verification, refuse automatic fallback/replay, and preserve cleanup failures. A posted close retains its truthful sent receipt if the intended root is observed absent; it does not infer whether an application accepted closure or displayed a save prompt. Key/button release remains independent of target validity. Validation cannot atomically pin a foreign window through a later action or undo already-dispatched effects.
|
|
70
|
+
|
|
71
|
+
Observations may write a small namespaced scalar window property without activating the app or editing its document. Expiry/disposal removes only the authority's own markers. Abrupt native-child exit may leave scalar residue until window destruction; new authorities never adopt it or sweep other sessions' properties. See [ADR 0002](adr/0002-window-lifetime-references.md) and [scoped acceptance](validation.md#window-lifetime-reference-acceptance). Actual identical-HWND reuse and verified UIPI denial remain unverified, with [user-accepted first-release test limitations](validation.md#pi-targeting-and-accessibility-reconciliation); different-handle replacement or synthetic failures are not substituted as passes.
|
|
72
|
+
|
|
73
|
+
## Accessibility observations
|
|
74
|
+
|
|
75
|
+
`accessibility_tree`, `snapshot`, `find` and `element_info` are registered Pi tools backed by a persistent MTA UIA bridge. The worker validates options before native execution. Tree traversal bounds depth, nodes and elapsed time; a synchronous provider can still block, so the native process has a 40-second watchdog and the extension permits the maximum 30-second traversal budget plus cleanup. Truncated or failed observations remain explicit.
|
|
76
|
+
|
|
77
|
+
Like the reference, `includeOffscreen: false` filters the projected UIA view: an offscreen ancestor is omitted while its visible descendants remain discoverable. It does not prune that ancestor's entire subtree. The owned provider regression covers control/raw/content tree and find behavior; [Notepad evidence](validation.md#semantic-save-and-visible-descendant-discovery) records the real menu gap that motivated this correction.
|
|
78
|
+
|
|
79
|
+
Issued native element references are held for five minutes, bound to their observed window lifetime and checked against the retained UIA object and current RuntimeId. Unseen, removed and wrong-owner references require fresh observation. Full detail can include a supported value, except password-field values are never read. Native window IDs also validate HWND/PID before UIA access. Title/PID selection refuses ambiguous windows; explicit handles are preferred.
|
|
80
|
+
|
|
81
|
+
Chromium observations probe renderer accessibility and report `webContent` readiness. A first read can return `starting`; callers should observe again rather than infer that absent page controls do not exist. Unnamed browser layout panes do not consume logical depth. This has been exercised against installed Edge without a forced-accessibility launch flag; other Chromium integrations require their own release checks.
|
|
82
|
+
|
|
83
|
+
`npm run test:native:accessibility` (Windows Node after build) opens dedicated passive forms and verifies structured trees, values/password protection, find, element inspection, title ambiguity, missing/wrong-owner targets, removed/unseen references and depth/node truncation. `npm run test:native:chromium` opens a disposable visible Chromium profile and local page, reads its page button after lazy initialization, and closes only that browser. Neither test sends physical input; they are live desktop tests, not portable substitutes.
|
|
84
|
+
|
|
85
|
+
The existing `benchmark:accessibility` collector also supports `--native-chromium-only` (`--plan` lists without loading a backend). Its isolated Edge fixture now verifies native UIA logical focus, ValuePattern Unicode writing and InvokePattern activation against pinned DSH, with `fallbackType: false` / `fallbackClick: false`. The page independently reports its actual value, active control and click count; it never simulates interaction. Each engine gets a fresh profile/page. Both engines passed the scoped actions; unavailable foreground observations do not establish restoration. See [action evidence](validation.md#native-chromium-uia-action-acceptance). Genuine same-process HWND reuse, inaccessible targets and broader provider/action families remain open.
|
|
86
|
+
|
|
87
|
+
Live evidence: Windows 11 x64, .NET Framework bridge, native form fixtures and installed Edge passed on 2026-10-29. Elevated/UAC target access remains a release case. Actual five-minute native root/element-reference expiry is covered by the optional [owned-fixture case](runtime.md#verification), with unchanged helper identities and no effects from the expired ID. Snapshot now includes a separate PNG by default, preserves explicit UIA failure when an image is attached, and honors `includeScreenshot: false`. Like the reference, `captureWindow: false` defaults to desktop pixels; `captureWindow: true` captures the selected window. Sparse empty-find OCR composition is implemented as described in [OCR and sparse accessibility fallback](#ocr-and-sparse-accessibility-fallback). Browser references route through the implemented [browser channel](browser.md); native UIA success does not establish browser-channel acceptance.
|
|
88
|
+
|
|
89
|
+
## Background controls
|
|
90
|
+
|
|
91
|
+
`focus`, `invoke`, `set_value` and element-targeted `scroll` operate only on fresh observed references and validate the requested owning window. Native Win32 buttons use background button messages, native edit fields use selection/replacement messages without clipboard or keyboard input, and scrolling prefers the nearest native scrollable control before UIA ScrollPattern. Element scroll uses Windows wheel-lines/page settings and the reference's midpoint-to-even rounding, vertical then horizontal dispatch, and 100-step line-mode cap; page mode retains the reference's uncapped count. The worker reuses its stop-event and cleanup lease without showing physical-control presentation. It checks stop between calls and after each provider return; an already-dispatched remote app call may settle after caller cancellation. Desktop ownership remains held until settlement/cleanup acknowledgment. Other controls use their supported UIA patterns. Expand/collapse is idempotent; scroll-into-view uses ScrollItemPattern.
|
|
92
|
+
|
|
93
|
+
A shared native activity guard observes the whole call using mouse/keyboard hooks on its own message-pump thread. It excludes only the helper's tagged SendInput and expected pointer moves; intervening physical or foreign injected input prevents restoration. Foreground can return only when the exact intended root is still in front, activity is unchanged, and no new menu/dialog needs it. Another pre-existing top-level window in the same process is left selected. Background/keyboard calls never return a changed pointer just because it is inside a field: without proven movement ownership they leave it alone. Windows refusal and uncertainty are reported in metadata.
|
|
94
|
+
|
|
95
|
+
Results report `verification: sent`, not task completion. Use an explicit observation/wait to verify effects. Read-only, disabled, stale and wrong-owner controls fail explicitly. The quiet native stage returns `WCU_NEEDS_INPUT` with `inputRequired: true` when a requested action needs a permitted fallback; the worker may then execute that fallback through the guarded-input path. Use `fallbackClick: false` or `fallbackType: false` where available to forbid it. Native `scroll` has no public no-fallback flag, so unrestricted passive comparisons defer it. The owned, separately gated background-scroll fixture checks the actual dispatch method and independent input state; a timeout, cancellation or partial dispatch never authorizes fallback. Guarded pointer behavior and outstanding physical acceptance are described in [pointer actions](pointer.md).
|
|
96
|
+
|
|
97
|
+
Run `npm run test:native:nullable-uia -- --quiet-scroll` with Windows Node after build for the owned ScrollPattern cancellation case. It holds the first provider call, cancels through the public worker, confirms a competitor stays busy, then releases the provider and proves only that already-dispatched call settles before ownership release. It sends no physical input or clipboard actions; it cannot undo the in-flight app effect.
|
|
98
|
+
|
|
99
|
+
Run `npm run test:native:controls` with Windows Node after build. It creates a dedicated form, proves Unicode native editing, button dispatch, focus, actual element-scroll state change, read-only refusal, unsupported-pattern/fallback distinction and wrong-owner/stale rejection through registered Pi tools, then closes the fixture. It sends no physical input. Expand/collapse across provider families and menu/dialog/user-interference restoration require additional release fixtures/manual cases; this test does not claim universal provider coverage.
|
|
100
|
+
|
|
101
|
+
Operation identity reaches the native bridge; the operation target/focus contracts are described in [pointer](pointer.md) and [text](text.md) entry. The installed package requires every registered native capability source; a missing source fails clearly with `NATIVE_RESOURCE_MISSING` rather than silently building an obsolete partial bridge.
|
|
102
|
+
|
|
103
|
+
## OCR and sparse accessibility fallback
|
|
104
|
+
|
|
105
|
+
`windows_computer_use_ocr` captures through the same screenshot module, then recognizes that PNG in a separate WinRT OCR process. Options preserve the reference target/scope conventions, `maxWidth: 1920` (0–7680), optional literal `query`, `resolveControl: false` and `includeScreenshot: false`. Output lines/words and matched union boxes use physical screen coordinates, applying both horizontal and vertical image scales. Text matching ignores case and whitespace, supports contiguous CJK word runs, treats regex characters literally, and returns at most three line matches.
|
|
106
|
+
|
|
107
|
+
OCR candidates have `source: ocr`, recognized text, bounds and centers—not invented control IDs. Only explicit `resolveControl` performs a UIA hit-test; it may describe an enclosing document rather than a semantic button. Hit-test failures stay explicit. A capture flagged as potentially occluded cannot establish target text absence or control identity. Missing query results are always inconclusive evidence about the actual interface. Minimized/hidden-target desktop fallbacks are refused as OCR target evidence.
|
|
108
|
+
|
|
109
|
+
Empty `find` observations with sparse (at most 20 nodes) or incomplete UIA trees attach OCR candidates by default, except when `controlType` is specified or `ocrFallback: false`. The UIA result remains separate from OCR and retains UIA errors/truncation. OCR unavailability does not manufacture a matching element.
|
|
110
|
+
|
|
111
|
+
The package compiles fresh OCR helper source against installed Windows WinMetadata and .NET Framework assemblies. Recognition uses user-profile OCR languages and reports the actual language plus available recognizers. Missing languages/metadata, image-size limits, native recognition failures, timeout and cancellation remain explicit. The OCR helper is isolated from UIA and retired after cancellation; requests are never replayed. Microsoft documents [Windows.Media.Ocr desktop support as requiring package identity](https://learn.microsoft.com/en-us/uwp/api/windows.media.ocr), although the unpackaged helper works on the tested Windows 11 machine. Clean-machine availability remains a release validation requirement, not a universal compatibility claim.
|
|
112
|
+
|
|
113
|
+
Run `npm run test:native:ocr` using Windows Node after building. A dedicated custom-painted fixture proves actual recognized text, query normalization/literal behavior, three-result limits, image-to-screen mapping across scales, optional screenshots, explicit control lookup, sparse-find fallback and minimized-target refusal. It sends no physical input and does not capture normal applications. Portable contract tests cover validation, pre-cancelled calls and Pi registration. Live OCR evidence on 2026-10-29: Windows 11 x64 with profile recognizer `zh-Hant-HK` recognized fixture English text. The [focused failure run](validation.md#pi-ocr-failure-acceptance), `npm run test:native:ocr -- --failures`, covers missing resources, an injected null-engine outcome, actual profile-language reporting and cancellation after recognition dispatch with helper exit and fresh-operation recovery. It uses a disposable package copy and makes no installed-language changes. Actual clean-machine availability remains #2, mixed-DPI mapping #6; protected-image compatibility is not claimed. The [paired baseline](validation.md#paired-capture-and-ocr-comparison) now records native/scaled localization against independently painted ink, literal misses, clipped recognition and minimized results. Its measured offsets and recognition differences are diagnostics, not a claim of exact OCR localization across applications.
|
|
114
|
+
|
|
115
|
+
The same Windows runner has an optional fixture-only association mode: set `PI_CU_OCR_VISUAL_ASSOCIATION=1` in the Windows Node process. Two native buttons expose blank accessible names while painting randomized APPROVE/IGNORE codes. The public OCR result is associated with an observed button ID through bounds; background invocation disables physical fallback, and private fixture counters verify APPROVE once and IGNORE unchanged. Default HELLO behavior is unchanged. The [direct preflight and scoped model evidence](validation.md#visual-ocr-association-preflight) distinguish OCR tool checks from actual visual-to-semantic invocation.
|
|
116
|
+
|
|
117
|
+
## Explicit waits
|
|
118
|
+
|
|
119
|
+
`windows_computer_use_wait` performs a cancellable delay (`milliseconds: 500`, integer 1–30000) and makes no verification claim. `wait_for` polls `window`, `element` or literal OCR `text` with `appear: true` by default. Window waits require explicit title/PID/HWND targeting; element/text waits require a nonempty query. Defaults are 5000 ms overall, 250 ms between observations, and a 1000 ms UIA traversal budget. Overall time is 100–60000 ms, interval 50–5000 ms, and reference depth/node/view options apply to element observations.
|
|
120
|
+
|
|
121
|
+
A satisfied predicate returns `verification: observed`; a complete observation that did not satisfy it before the deadline returns `timeout`. Truncated, unavailable, timed-out or potentially occluded evidence returns `inconclusive`. UIA positive matches can establish presence even when another part of the tree is truncated; truncated absence cannot establish disappearance. Window existence uses native enumeration including invisible windows, bounded at 4096 entries; a truncated enumeration cannot prove absence. Target HWND/PID matching checks the current native values, subject to the window-lifetime limitation above.
|
|
122
|
+
|
|
123
|
+
Text waits concern literal OCR output from a complete reliable capture, rather than universal truth about application text. OCR exposes `captureConclusive` separately from query-hit certainty so a reliable image without a recognized sequence can satisfy an explicit disappearance predicate, while potentially occluded or failed capture cannot. Native recognition failure never establishes absence. Polls avoid activating targets and disable UIA's OCR fallback for element predicates.
|
|
124
|
+
|
|
125
|
+
Polling bounds each observation by the remaining deadline and retires a stuck native observation worker; a new provider call is not started with less than 100 ms remaining after a prior observation. Cancellation propagates through the common operation stop path. Valid explicit waits receive a bounded transport allowance (delay plus 2 seconds; condition timeout plus 10 seconds) rather than being cut off by a shorter ordinary request watchdog. Queue time is still outside execution time.
|
|
126
|
+
|
|
127
|
+
Run `npm run test:native:waits` with Windows Node after building. Its passive fixture proves window existence/disappearance, actual control transitions, complete missing-condition timeout, truncated-absence refusal, OCR text appearance/disappearance and prompt cancellation. Portable worker tests cover argument bounds, plain waits, unavailable native observations and deadlines shorter than a valid explicit wait. Mixed-DPI/protected/occluded target cases remain covered by capture/OCR release validation rather than inferred from this passive fixture.
|
|
128
|
+
|
|
129
|
+
## Launching and managing windows
|
|
130
|
+
|
|
131
|
+
Pi guidance prefers reusing the intended existing application window after discovery. When a separate workspace is needed, prefer creating a tab/document through the observed application UI, preserving existing documents and unsaved work. Launch only when no suitable window exists or the user explicitly requests a new instance. This is agent guidance rather than a universal tab API: applications differ, and shell launch does not guarantee a new process, window or tab. Ambiguity and activation refusals still require resolution. Only explicitly selected dedicated browser-channel work uses its isolated profile/automation tabs; ordinary browser work follows the [default-app policy](#default-apps-and-workspaces).
|
|
132
|
+
|
|
133
|
+
`launch_app` resolves a fully qualified executable/COM/shortcut path, a bare executable through PATH or registered App Paths, or an exact installed app display name/AppUserModelID. Its `arguments` and `workingDirectory` are passed as data to the Explorer desktop's ShellExecute automation object, not interpolated into a shell command. Launch does not create the application as a worker child, so the application survives tool completion and worker exit. There is no child-process fallback when the interactive Explorer desktop is unavailable, no requested elevation, and no automatic replay after uncertain dispatch.
|
|
134
|
+
|
|
135
|
+
HTTP(S) URLs, the default-browser alias and associated documents follow the [handler rules above](#default-apps-and-workspaces). Explicit app-file launching retains exe/com/lnk support. Existing fully qualified working directories are required when supplied; installed-AppUserModelID and default-handler launches reject arguments/directories. Command interpreters and script hosts accept no arguments through this tool—use Pi's ordinary shell tool for commands. Shortcut target chains are inspected too, including embedded shortcut arguments, and cycles/deep chains are refused. `activate: false` requests no activation but an application may activate itself. `waitMs` defaults to 1500 (0–10000); new-window observations are not confirmed matches and may be incomplete. Launch reports `verification: dispatched`, never that the user's objective succeeded.
|
|
136
|
+
|
|
137
|
+
`activate_window`, `move_window` and `close_window` require explicit HWND/PID, title or process targeting and use Win32 identity checks rather than UIA element resolution. Ambiguous titles/processes are refused; observed HWND/PID should be preferred. Activation restores a minimized target and requests foreground through native APIs without an Alt/keyboard workaround. If the initial request is refused, the helper attaches to the foreground input thread, raises the target with BringWindowToTop, rechecks window ownership, and requests foreground again. It verifies the resulting foreground HWND rather than treating the API call as task success. Unresponsive/inaccessible targets and Windows foreground refusal report `activated: false` and `unconfirmed`. Movement accepts physical screen X/Y, does not resize, and avoids activation unless explicitly requested. A successful move is dispatch evidence; observe fresh bounds before subsequent coordinate input. Close posts WM_CLOSE without activation, and an application may veto it or display a save prompt. Accepted posting is not proof that the window closed.
|
|
138
|
+
|
|
139
|
+
When an activated accessibility observation or physical text or pointer input receives `TARGET_ACTIVATION_REFUSED`, `activationDiagnostic` records coarse foreground relationships and request outcomes when available. The relationships describe the observed window as the target, a target child, another window in the same process, another process, or unavailable; no window title or content is included. These sequential samples can change and do not establish why Windows refused activation. A refusal means activation was not confirmed; some read-only work may already have occurred. Do not infer that a later attempt will succeed.
|
|
140
|
+
|
|
141
|
+
`npm run test:native:management` (Windows Node after build) compiles only a dedicated disposable fixture, launches it through the real Explorer broker, exits the first worker and proves the app survives, observes its new position through `list_windows`, exercises a close veto and subsequent closure, and rejects stale ownership and command-bearing shortcuts. A temporarily unresponsive fixture proves activation refusal remains honest. Pre-cancelled launch sends no dispatch. The suite sends no keyboard/mouse input; explicit fixture activation can change foreground briefly. It does not open normal user applications or browser profiles. Exact installed-app-name/AppUserModelID launching and elevated/foreground-lock combinations remain release validation cases; the fixture does not claim those environments were exercised.
|
|
142
|
+
|
|
143
|
+
For #30, `npm run test:reference:management -- --plan --engine=pi` safely lists a prepared Pi run (the command name is historical; the DSH engine is optional and not an acceptance gate) without building, starting a backend or accessing Windows. Execution requires Windows Node, `PI_CU_WINDOW_MANAGEMENT_TEST=1`, an authorized desktop and `--reference=<Windows-readable-pinned-checkout>` for DSH. The runner uses the existing disposable management fixture, selects the Pi worker or reference MCP, captures action responses (window lists retain only the owned target), and independently queries window owner, foreground, bounds, process path and creation identity. The fixture records actual close-veto/close events in its private directory. Cleanup matches the fixture executable’s unique path and, when observed, its PID and creation identity; an uncertain controller, launch or fixture exit is reported and blocks claimed cleanup. No keyboard, mouse, clipboard or daily application is used, but activation can change the foreground. On 2026-10-30, both Pi and the pinned DSH reference passed all eight cases on separate fresh Windows fixtures, including independently confirmed foreground activation and fixture-observed veto/close; owned process and controller cleanup were confirmed. See [paired window-management evidence](validation.md#paired-window-management). The opt-in `--extended` plan adds a same-process distractor, foreground restoration after focusing an owned control, and stale HWND refusal after a same-title replacement appears. On 2026-10-30, both engines passed all 11 cases on separate fresh owned Windows fixtures, including these three extended cases. Fixture focus/close events and independent HWND/PID/bounds observations verified the results; both controllers and fixtures exited. That original subset did not cover every interference/restoration case; [later Pi acceptance](validation.md#scoped-pointer-and-restoration-acceptance) records the current supported scope. A remembered operation target or `activated: true` alone cannot establish foreground acceptance.
|
|
144
|
+
|
|
145
|
+
The desktop broker follows Windows' documented [ShellExecute automation interface](https://learn.microsoft.com/en-us/windows/win32/shell/shell-shellexecute). Window operations use [SetWindowPos](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowpos) and [PostMessage](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-postmessagew); dispatch acceptance does not establish application completion.
|
|
146
|
+
|
|
147
|
+
The control fixture also stages a package with a missing native source and checks its explicit failure. Its programmatic sibling-window case reports whether Windows allowed the transition; a refusal is recorded as unexercised, not evidence that physical user-interference acceptance passed. Physical suppression and explicit handback remain dedicated-desktop checks under the [control delivery plan](implementation-plan.md#exclusive-control-delivery); this older fixture does not establish them.
|
|
148
|
+
|
|
149
|
+
## Unknown UIA control types
|
|
150
|
+
|
|
151
|
+
Some Windows controls expose newer control types that the .NET Framework UIA client cannot name. These nodes retain their available properties and children with `controlType: "Unknown"` and `controlTypeUnavailable: true`. Observations report `unknownControlTypes`, remain inconclusive, and cannot establish absence. An unknown type does not make an observed element stale.
|
|
152
|
+
|
|
153
|
+
Run `npm run test:native:nullable-uia` with Windows Node after building. Its passive custom-provider fixture checks snapshot retention, inspection, traversal beyond an unknown type, and inconclusive disappearance waits. It performs no activation, screenshots or physical input.
|
|
154
|
+
|
|
155
|
+
## Locked-session refusals
|
|
156
|
+
|
|
157
|
+
A locked Windows session returns an error containing `DESKTOP_SESSION_LOCKED` before foreground activation, physical pointer input or physical text/key input. The helper reads only the WTS session-state prefix, without copying account-name fields. Unknown/unavailable WTS state is not reported as locked; existing target, foreground and input guards remain active. Read-only snapshots/screenshots can still return background application data while Windows is locked, which does not prove that the app can receive physical input. Unlock Windows and refresh observations before testing interactive behavior.
|
|
158
|
+
|
|
159
|
+
On Windows after building, `PI_CU_EXPECT_LOCKED_SESSION=1 npm run test:native:session:locked` checks the explicitly locked case against a disposable fixture. Set the environment variable using your shell's syntax. The runner does not lock/unlock the workstation. It checks activation, pointer and text refusals, cleanup, and a quiet fixture observation. If the initial activation does not report a locked session, it aborts before further actions. This is a lock-diagnosis test, not proof of unlocked activation or foreground restoration.
|
|
160
|
+
|
|
161
|
+
The diagnosis uses Microsoft's documented [WTSINFOEX session flags](https://learn.microsoft.com/en-us/windows/win32/api/wtsapi32/ns-wtsapi32-wtsinfoex_level1_w). In the reproduced Windows 11 case, WTS reported locked and the foreground process was LockApp; input-thread attachment returned access denied. Unlocked-session refusals still require separate diagnosis.
|
|
162
|
+
|
|
163
|
+
## Unlocked activation round trips
|
|
164
|
+
|
|
165
|
+
On an unlocked Windows desktop after building, run `npm run test:native:activation` with Windows Node and `PI_CU_ACTIVATION_TEST=1`. It requires installed Chrome, uses a disposable native fixture and isolated visible Chrome profile, activates between them six times through one warm worker, and independently verifies foreground after each transition. One native hover must activate Chrome and increment a page movement counter. It attempts to return to the original foreground only if a fixture is still in front, then closes its own windows/profile. It does not type, click, use the clipboard, or attach to a daily profile. Do not interact during the test. This does not establish all pointer actions, automatic post-input restoration, user-interference behavior, or mixed-DPI acceptance.
|
|
166
|
+
|
|
167
|
+
### Scoped visual agent check
|
|
168
|
+
|
|
169
|
+
`npm run test:pi:visual` prints a plan without opening Windows or calling a model. After building, run `npm run test:pi:visual -- --run --runs 1` (up to three fresh resets). Use the live Windows prerequisites in [runtime verification](runtime.md#verification), an unlocked session and the same authenticated Pi setup used for ordinary work. Serialize it with other desktop checks; on WSL use `flock -w 120 /tmp/pi-cu-live-tests.lock npm run test:pi:visual -- --run --runs 1`.
|
|
170
|
+
|
|
171
|
+
The existing OCR fixture opens a separate owned form; no personal app discovery, keyboard, pointer or clipboard input is permitted. The task gives an outcome without a tool sequence: read APPROVE's randomized code, invoke its associated public-observed control once and preserve IGNORE. Independent fixture IPC verifies exact code/counters and pinned process identity. Reports in the printed temporary directory include requested/effective model settings, source hashes, sequential image-free traces and strict worker/fixture retirement. Unknown cleanup, collector failure or a deadline retains the owner and denies further tool dispatch; investigate its owner journal before any cleanup or new reset. A known failed outcome stops the reset loop. This is a scoped A04 check, not full #35 or OCR-availability acceptance.
|
package/package.json
CHANGED
|
@@ -1,6 +1,136 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycheung5/pi-computer-use",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Native Pi tools for Windows computer use from Windows and WSL2",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "ycheung5",
|
|
9
|
+
"email": "yatfei9@gmail.com"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/ycheung5/pi-computer-use.git"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/ycheung5/pi-computer-use/issues"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/ycheung5/pi-computer-use#readme",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"pi-package",
|
|
24
|
+
"computer-use",
|
|
25
|
+
"windows"
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md",
|
|
30
|
+
"GLOSSARY.md",
|
|
31
|
+
"docs/",
|
|
32
|
+
"assets/"
|
|
33
|
+
],
|
|
34
|
+
"pi": {
|
|
35
|
+
"extensions": [
|
|
36
|
+
"./dist/extension.js"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=22.19.0"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc -p tsconfig.build.json",
|
|
44
|
+
"test": "node --import tsx --test tests/*.test.ts",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
46
|
+
"format": "biome format --write .",
|
|
47
|
+
"lint": "biome check .",
|
|
48
|
+
"check": "npm run typecheck && npm run lint && npm test",
|
|
49
|
+
"prepack": "npm run build",
|
|
50
|
+
"lint:fix": "biome check --write .",
|
|
51
|
+
"test:native": "node tests/native-health.mjs",
|
|
52
|
+
"test:native:windows": "node tests/native-windows.mjs",
|
|
53
|
+
"test:wsl": "node tests/wsl-health.mjs",
|
|
54
|
+
"test:native:accessibility": "node tests/native-accessibility.mjs",
|
|
55
|
+
"test:native:nullable-uia": "node tests/native-nullable-uia.mjs",
|
|
56
|
+
"test:native:chromium": "node tests/native-chromium-accessibility.mjs",
|
|
57
|
+
"test:ownership": "node tests/ownership-host.mjs",
|
|
58
|
+
"test:native:capture": "node tests/native-capture.mjs",
|
|
59
|
+
"test:reference:capture": "node tests/reference-capture.mjs",
|
|
60
|
+
"test:reference:capture:report": "node tests/reference-capture-report.mjs",
|
|
61
|
+
"test:native:ocr": "node tests/native-ocr.mjs",
|
|
62
|
+
"test:stop": "node tests/stop-host.mjs",
|
|
63
|
+
"test:stop:busy": "node tests/native-stop-busy.mjs",
|
|
64
|
+
"test:stop:held": "node tests/native-held-input.mjs",
|
|
65
|
+
"test:stop:busy:check": "node tests/stop-busy-check.mjs",
|
|
66
|
+
"test:stop:pi-host": "node tests/pi-host-stop.mjs",
|
|
67
|
+
"test:stop:pi-host:check": "node tests/pi-host-stop-outcome-check.mjs",
|
|
68
|
+
"test:stop:pi-host:job": "node tests/pi-host-job.mjs",
|
|
69
|
+
"test:stop:pi-host:job:check": "node tests/pi-host-job-check.mjs",
|
|
70
|
+
"test:browser": "node tests/browser-host.mjs",
|
|
71
|
+
"test:native:controls": "node tests/native-controls.mjs",
|
|
72
|
+
"test:native:waits": "node tests/native-waits.mjs",
|
|
73
|
+
"test:settings": "node tests/settings-host.mjs",
|
|
74
|
+
"test:native:management": "node tests/native-window-management.mjs",
|
|
75
|
+
"test:reference:focus-foreground": "node tests/foreground-focus-comparison.mjs",
|
|
76
|
+
"test:reference:management": "node tests/window-management-comparison.mjs",
|
|
77
|
+
"test:native:session:locked": "node tests/native-session-activation.mjs",
|
|
78
|
+
"test:native:activation": "node tests/native-activation-roundtrip.mjs",
|
|
79
|
+
"test:native:pointer:guards": "node tests/native-pointer-guards.mjs",
|
|
80
|
+
"test:native:pointer:physical": "node tests/native-pointer-physical.mjs",
|
|
81
|
+
"test:native:text": "node tests/native-text.mjs",
|
|
82
|
+
"test:native:text:physical": "node tests/native-text-physical.mjs",
|
|
83
|
+
"test:native:notepad:unicode": "node tests/native-notepad-unicode.mjs",
|
|
84
|
+
"test:native:clipboard:ole": "node tests/native-ole-clipboard.mjs",
|
|
85
|
+
"test:browser:actions": "node tests/browser-actions-host.mjs",
|
|
86
|
+
"test:browser:firefox:endpoint": "node tests/browser-firefox-endpoint.mjs",
|
|
87
|
+
"test:indicators": "node tests/indicators-host.mjs",
|
|
88
|
+
"test:browser:profiles": "node tests/browser-profiles-host.mjs",
|
|
89
|
+
"test:package": "node tests/package-host.mjs",
|
|
90
|
+
"test:pi": "node tests/pi-host.mjs",
|
|
91
|
+
"test:pi:browser": "node tests/pi-browser-host.mjs",
|
|
92
|
+
"test:pi:workspace": "node tests/pi-workspace-host.mjs",
|
|
93
|
+
"benchmark:reference": "node tests/benchmark-reference.mjs",
|
|
94
|
+
"test:benchmark:report": "node tests/benchmark-report.mjs",
|
|
95
|
+
"test:benchmark:stop": "node tests/benchmark-report.mjs --stop",
|
|
96
|
+
"test:parity": "node tests/parity-host.mjs",
|
|
97
|
+
"test:browser:foreground": "node tests/browser-foreground-host.mjs",
|
|
98
|
+
"test:reference:transport": "node tests/reference-client-check.mjs",
|
|
99
|
+
"test:dsh:host-preflight": "node tests/dsh-host-preflight.mjs",
|
|
100
|
+
"test:browser:comparison": "node tests/browser-comparison.mjs",
|
|
101
|
+
"test:browser:comparison:oracle": "node tests/browser-comparison-check.mjs",
|
|
102
|
+
"benchmark:accessibility": "node tests/accessibility-comparison.mjs",
|
|
103
|
+
"test:accessibility:report": "node tests/accessibility-comparison-check.mjs",
|
|
104
|
+
"test:accessibility:provider-walker": "node tests/provider-walker-probe.mjs",
|
|
105
|
+
"test:accessibility:provider-platform": "node tests/provider-platform-probe.mjs",
|
|
106
|
+
"test:accessibility:diagnostics": "node tests/accessibility-comparison-check.mjs --diagnostics",
|
|
107
|
+
"test:native:clipboard:plan": "node tests/native-ole-clipboard-check.mjs",
|
|
108
|
+
"test:native:ime:owner": "node tests/ime-owner.mjs",
|
|
109
|
+
"test:native:process-containment": "node tests/process-containment-check.mjs",
|
|
110
|
+
"test:native:owner-supervisor": "node tests/owner-supervisor-check.mjs",
|
|
111
|
+
"test:native:owner-backend-health": "node tests/owner-backend-health-check.mjs",
|
|
112
|
+
"test:native:owner-crash-boundary": "node tests/owner-crash-boundary-check.mjs",
|
|
113
|
+
"test:pi:visual": "node tests/pi-visual-host.mjs",
|
|
114
|
+
"test:native:lifetime": "node tests/native-window-lifetime.mjs",
|
|
115
|
+
"test:native:lifetime:enumeration": "node tests/native-window-enumeration-lifetime.mjs"
|
|
116
|
+
},
|
|
117
|
+
"peerDependencies": {
|
|
118
|
+
"@earendil-works/pi-coding-agent": "*",
|
|
119
|
+
"typebox": "*"
|
|
120
|
+
},
|
|
121
|
+
"devDependencies": {
|
|
122
|
+
"@biomejs/biome": "2.6.4",
|
|
123
|
+
"@earendil-works/pi-coding-agent": "1.4.0",
|
|
124
|
+
"@types/node": "22.19.19",
|
|
125
|
+
"tsx": "4.21.0",
|
|
126
|
+
"typebox": "1.3.27",
|
|
127
|
+
"typescript": "5.9.3"
|
|
128
|
+
},
|
|
129
|
+
"overrides": {
|
|
130
|
+
"undici": "8.12.2",
|
|
131
|
+
"esbuild": "0.28.1"
|
|
132
|
+
},
|
|
133
|
+
"dependencies": {
|
|
134
|
+
"puppeteer-core": "25.16.0"
|
|
135
|
+
}
|
|
136
|
+
}
|