superbased 1.6.4 → 2.0.1
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/README.md +230 -36
- package/SUPERBASED_SKILL.md +1196 -22
- package/dist/electron/core/input-injection/index.d.ts +6 -0
- package/dist/electron/core/input-injection/index.d.ts.map +1 -0
- package/dist/electron/core/input-injection/index.js +31 -0
- package/dist/electron/core/input-injection/index.js.map +1 -0
- package/dist/electron/core/input-injection/macos.d.ts +3 -0
- package/dist/electron/core/input-injection/macos.d.ts.map +1 -0
- package/dist/electron/core/input-injection/macos.js +14 -0
- package/dist/electron/core/input-injection/macos.js.map +1 -0
- package/dist/electron/core/input-injection/windows.d.ts +3 -0
- package/dist/electron/core/input-injection/windows.d.ts.map +1 -0
- package/dist/electron/core/input-injection/windows.js +119 -0
- package/dist/electron/core/input-injection/windows.js.map +1 -0
- package/dist/electron/core/json-store.d.ts +22 -0
- package/dist/electron/core/json-store.d.ts.map +1 -1
- package/dist/electron/core/json-store.js +61 -47
- package/dist/electron/core/json-store.js.map +1 -1
- package/dist/electron/core/platform.d.ts +1 -0
- package/dist/electron/core/platform.d.ts.map +1 -1
- package/dist/electron/core/serialize-schema.d.ts +35 -0
- package/dist/electron/core/serialize-schema.d.ts.map +1 -0
- package/dist/electron/core/serialize-schema.js +89 -0
- package/dist/electron/core/serialize-schema.js.map +1 -0
- package/dist/electron/core/settings-schema.d.ts +81 -0
- package/dist/electron/core/settings-schema.d.ts.map +1 -0
- package/dist/electron/core/settings-schema.js +1357 -0
- package/dist/electron/core/settings-schema.js.map +1 -0
- package/dist/electron/logger.d.ts.map +1 -1
- package/dist/electron/logger.js +22 -8
- package/dist/electron/logger.js.map +1 -1
- package/dist/electron/main.js +417 -133
- package/dist/electron/modules/accessibility/macos-provider.d.ts +8 -0
- package/dist/electron/modules/accessibility/macos-provider.d.ts.map +1 -0
- package/dist/electron/modules/accessibility/macos-provider.js +94 -0
- package/dist/electron/modules/accessibility/macos-provider.js.map +1 -0
- package/dist/electron/modules/accessibility/provider.d.ts +12 -0
- package/dist/electron/modules/accessibility/provider.d.ts.map +1 -0
- package/dist/electron/modules/accessibility/provider.js +52 -0
- package/dist/electron/modules/accessibility/provider.js.map +1 -0
- package/dist/electron/modules/accessibility/types.d.ts +63 -0
- package/dist/electron/modules/accessibility/types.d.ts.map +1 -0
- package/dist/electron/modules/accessibility/types.js +6 -0
- package/dist/electron/modules/accessibility/types.js.map +1 -0
- package/dist/electron/modules/accessibility/windows-provider.d.ts +8 -0
- package/dist/electron/modules/accessibility/windows-provider.d.ts.map +1 -0
- package/dist/electron/modules/accessibility/windows-provider.js +85 -0
- package/dist/electron/modules/accessibility/windows-provider.js.map +1 -0
- package/dist/electron/modules/api-server.d.ts +4 -1
- package/dist/electron/modules/api-server.d.ts.map +1 -1
- package/dist/electron/modules/api-server.js +1349 -219
- package/dist/electron/modules/api-server.js.map +1 -1
- package/dist/electron/modules/auth.d.ts +14 -0
- package/dist/electron/modules/auth.d.ts.map +1 -1
- package/dist/electron/modules/auth.js +43 -0
- package/dist/electron/modules/auth.js.map +1 -1
- package/dist/electron/modules/azure-speech-realtime.d.ts.map +1 -1
- package/dist/electron/modules/azure-speech-realtime.js +56 -0
- package/dist/electron/modules/azure-speech-realtime.js.map +1 -1
- package/dist/electron/modules/capture.d.ts +8 -0
- package/dist/electron/modules/capture.d.ts.map +1 -1
- package/dist/electron/modules/capture.js +33 -0
- package/dist/electron/modules/capture.js.map +1 -1
- package/dist/electron/modules/compose-screenshots.d.ts +8 -0
- package/dist/electron/modules/compose-screenshots.d.ts.map +1 -0
- package/dist/electron/modules/compose-screenshots.js +86 -0
- package/dist/electron/modules/compose-screenshots.js.map +1 -0
- package/dist/electron/modules/context-menu-detect.d.ts +47 -0
- package/dist/electron/modules/context-menu-detect.d.ts.map +1 -0
- package/dist/electron/modules/context-menu-detect.js +272 -0
- package/dist/electron/modules/context-menu-detect.js.map +1 -0
- package/dist/electron/modules/dictation.d.ts.map +1 -1
- package/dist/electron/modules/dictation.js +12 -7
- package/dist/electron/modules/dictation.js.map +1 -1
- package/dist/electron/modules/gif-util.d.ts +9 -0
- package/dist/electron/modules/gif-util.d.ts.map +1 -0
- package/dist/electron/modules/gif-util.js +63 -0
- package/dist/electron/modules/gif-util.js.map +1 -0
- package/dist/electron/modules/gui-automation-errors.d.ts +11 -0
- package/dist/electron/modules/gui-automation-errors.d.ts.map +1 -0
- package/dist/electron/modules/gui-automation-errors.js +79 -0
- package/dist/electron/modules/gui-automation-errors.js.map +1 -0
- package/dist/electron/modules/gui-automation-telemetry.d.ts +38 -0
- package/dist/electron/modules/gui-automation-telemetry.d.ts.map +1 -0
- package/dist/electron/modules/gui-automation-telemetry.js +200 -0
- package/dist/electron/modules/gui-automation-telemetry.js.map +1 -0
- package/dist/electron/modules/gui-automation.d.ts +1143 -0
- package/dist/electron/modules/gui-automation.d.ts.map +1 -0
- package/dist/electron/modules/gui-automation.js +8769 -0
- package/dist/electron/modules/gui-automation.js.map +1 -0
- package/dist/electron/modules/hotkeys.d.ts +2 -1
- package/dist/electron/modules/hotkeys.d.ts.map +1 -1
- package/dist/electron/modules/hotkeys.js +25 -1
- package/dist/electron/modules/hotkeys.js.map +1 -1
- package/dist/electron/modules/human-input/index.d.ts +35 -0
- package/dist/electron/modules/human-input/index.d.ts.map +1 -0
- package/dist/electron/modules/human-input/index.js +163 -0
- package/dist/electron/modules/human-input/index.js.map +1 -0
- package/dist/electron/modules/human-input/keyboard/timing.d.ts +38 -0
- package/dist/electron/modules/human-input/keyboard/timing.d.ts.map +1 -0
- package/dist/electron/modules/human-input/keyboard/timing.js +57 -0
- package/dist/electron/modules/human-input/keyboard/timing.js.map +1 -0
- package/dist/electron/modules/human-input/mouse/path.d.ts +24 -0
- package/dist/electron/modules/human-input/mouse/path.d.ts.map +1 -0
- package/dist/electron/modules/human-input/mouse/path.js +80 -0
- package/dist/electron/modules/human-input/mouse/path.js.map +1 -0
- package/dist/electron/modules/human-input/mouse/velocity.d.ts +48 -0
- package/dist/electron/modules/human-input/mouse/velocity.d.ts.map +1 -0
- package/dist/electron/modules/human-input/mouse/velocity.js +93 -0
- package/dist/electron/modules/human-input/mouse/velocity.js.map +1 -0
- package/dist/electron/modules/human-input/profiles.d.ts +90 -0
- package/dist/electron/modules/human-input/profiles.d.ts.map +1 -0
- package/dist/electron/modules/human-input/profiles.js +124 -0
- package/dist/electron/modules/human-input/profiles.js.map +1 -0
- package/dist/electron/modules/human-input/rng.d.ts +16 -0
- package/dist/electron/modules/human-input/rng.d.ts.map +1 -0
- package/dist/electron/modules/human-input/rng.js +101 -0
- package/dist/electron/modules/human-input/rng.js.map +1 -0
- package/dist/electron/modules/human-input/salt.d.ts +15 -0
- package/dist/electron/modules/human-input/salt.d.ts.map +1 -0
- package/dist/electron/modules/human-input/salt.js +48 -0
- package/dist/electron/modules/human-input/salt.js.map +1 -0
- package/dist/electron/modules/image-utils.d.ts +20 -0
- package/dist/electron/modules/image-utils.d.ts.map +1 -0
- package/dist/electron/modules/image-utils.js +80 -0
- package/dist/electron/modules/image-utils.js.map +1 -0
- package/dist/electron/modules/ollama/capability.d.ts +32 -0
- package/dist/electron/modules/ollama/capability.d.ts.map +1 -0
- package/dist/electron/modules/ollama/capability.js +117 -0
- package/dist/electron/modules/ollama/capability.js.map +1 -0
- package/dist/electron/modules/ollama/client.d.ts +14 -0
- package/dist/electron/modules/ollama/client.d.ts.map +1 -0
- package/dist/electron/modules/ollama/client.js +134 -0
- package/dist/electron/modules/ollama/client.js.map +1 -0
- package/dist/electron/modules/ollama/detector.d.ts +29 -0
- package/dist/electron/modules/ollama/detector.d.ts.map +1 -0
- package/dist/electron/modules/ollama/detector.js +177 -0
- package/dist/electron/modules/ollama/detector.js.map +1 -0
- package/dist/electron/modules/ollama/dispatcher.d.ts +36 -0
- package/dist/electron/modules/ollama/dispatcher.d.ts.map +1 -0
- package/dist/electron/modules/ollama/dispatcher.js +97 -0
- package/dist/electron/modules/ollama/dispatcher.js.map +1 -0
- package/dist/electron/modules/ollama/router.d.ts +51 -0
- package/dist/electron/modules/ollama/router.d.ts.map +1 -0
- package/dist/electron/modules/ollama/router.js +201 -0
- package/dist/electron/modules/ollama/router.js.map +1 -0
- package/dist/electron/modules/pin-window.d.ts.map +1 -1
- package/dist/electron/modules/pin-window.js +2 -1
- package/dist/electron/modules/pin-window.js.map +1 -1
- package/dist/electron/modules/platform/dpi.d.ts +2 -0
- package/dist/electron/modules/platform/dpi.d.ts.map +1 -0
- package/dist/electron/modules/platform/dpi.js +48 -0
- package/dist/electron/modules/platform/dpi.js.map +1 -0
- package/dist/electron/modules/platform/errors.d.ts +13 -0
- package/dist/electron/modules/platform/errors.d.ts.map +1 -0
- package/dist/electron/modules/platform/errors.js +36 -0
- package/dist/electron/modules/platform/errors.js.map +1 -0
- package/dist/electron/modules/platform/index.d.ts +24 -0
- package/dist/electron/modules/platform/index.d.ts.map +1 -0
- package/dist/electron/modules/platform/index.js +133 -0
- package/dist/electron/modules/platform/index.js.map +1 -0
- package/dist/electron/modules/platform/interfaces.d.ts +140 -0
- package/dist/electron/modules/platform/interfaces.d.ts.map +1 -0
- package/dist/electron/modules/platform/interfaces.js +14 -0
- package/dist/electron/modules/platform/interfaces.js.map +1 -0
- package/dist/electron/modules/platform/macos/ax.d.ts +15 -0
- package/dist/electron/modules/platform/macos/ax.d.ts.map +1 -0
- package/dist/electron/modules/platform/macos/ax.js +222 -0
- package/dist/electron/modules/platform/macos/ax.js.map +1 -0
- package/dist/electron/modules/platform/macos/capture.d.ts +14 -0
- package/dist/electron/modules/platform/macos/capture.d.ts.map +1 -0
- package/dist/electron/modules/platform/macos/capture.js +106 -0
- package/dist/electron/modules/platform/macos/capture.js.map +1 -0
- package/dist/electron/modules/platform/macos/input.d.ts +16 -0
- package/dist/electron/modules/platform/macos/input.d.ts.map +1 -0
- package/dist/electron/modules/platform/macos/input.js +342 -0
- package/dist/electron/modules/platform/macos/input.js.map +1 -0
- package/dist/electron/modules/platform/macos/launch.d.ts +10 -0
- package/dist/electron/modules/platform/macos/launch.d.ts.map +1 -0
- package/dist/electron/modules/platform/macos/launch.js +114 -0
- package/dist/electron/modules/platform/macos/launch.js.map +1 -0
- package/dist/electron/modules/platform/macos/session.d.ts +8 -0
- package/dist/electron/modules/platform/macos/session.d.ts.map +1 -0
- package/dist/electron/modules/platform/macos/session.js +17 -0
- package/dist/electron/modules/platform/macos/session.js.map +1 -0
- package/dist/electron/modules/platform/macos/window.d.ts +31 -0
- package/dist/electron/modules/platform/macos/window.d.ts.map +1 -0
- package/dist/electron/modules/platform/macos/window.js +271 -0
- package/dist/electron/modules/platform/macos/window.js.map +1 -0
- package/dist/electron/modules/platform/shared.d.ts +10 -0
- package/dist/electron/modules/platform/shared.d.ts.map +1 -0
- package/dist/electron/modules/platform/shared.js +201 -0
- package/dist/electron/modules/platform/shared.js.map +1 -0
- package/dist/electron/modules/platform/types.d.ts +182 -0
- package/dist/electron/modules/platform/types.d.ts.map +1 -0
- package/dist/electron/modules/platform/types.js +24 -0
- package/dist/electron/modules/platform/types.js.map +1 -0
- package/dist/electron/modules/platform/windows/ax.d.ts +15 -0
- package/dist/electron/modules/platform/windows/ax.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/ax.js +277 -0
- package/dist/electron/modules/platform/windows/ax.js.map +1 -0
- package/dist/electron/modules/platform/windows/capture.d.ts +14 -0
- package/dist/electron/modules/platform/windows/capture.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/capture.js +115 -0
- package/dist/electron/modules/platform/windows/capture.js.map +1 -0
- package/dist/electron/modules/platform/windows/input.d.ts +17 -0
- package/dist/electron/modules/platform/windows/input.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/input.js +422 -0
- package/dist/electron/modules/platform/windows/input.js.map +1 -0
- package/dist/electron/modules/platform/windows/launch.d.ts +10 -0
- package/dist/electron/modules/platform/windows/launch.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/launch.js +185 -0
- package/dist/electron/modules/platform/windows/launch.js.map +1 -0
- package/dist/electron/modules/platform/windows/session.d.ts +8 -0
- package/dist/electron/modules/platform/windows/session.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/session.js +87 -0
- package/dist/electron/modules/platform/windows/session.js.map +1 -0
- package/dist/electron/modules/platform/windows/tray.d.ts +13 -0
- package/dist/electron/modules/platform/windows/tray.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/tray.js +390 -0
- package/dist/electron/modules/platform/windows/tray.js.map +1 -0
- package/dist/electron/modules/platform/windows/window.d.ts +30 -0
- package/dist/electron/modules/platform/windows/window.d.ts.map +1 -0
- package/dist/electron/modules/platform/windows/window.js +444 -0
- package/dist/electron/modules/platform/windows/window.js.map +1 -0
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.d.ts +15 -0
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.d.ts.map +1 -0
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.js +62 -0
- package/dist/electron/modules/recording/providers/change-detect-shared-wrapper.js.map +1 -0
- package/dist/electron/modules/recording/providers/provider-factory.d.ts.map +1 -1
- package/dist/electron/modules/recording/providers/provider-factory.js +13 -7
- package/dist/electron/modules/recording/providers/provider-factory.js.map +1 -1
- package/dist/electron/modules/scroll-calibration.d.ts +152 -0
- package/dist/electron/modules/scroll-calibration.d.ts.map +1 -0
- package/dist/electron/modules/scroll-calibration.js +271 -0
- package/dist/electron/modules/scroll-calibration.js.map +1 -0
- package/dist/electron/modules/scroll-capture.d.ts +3 -1
- package/dist/electron/modules/scroll-capture.d.ts.map +1 -1
- package/dist/electron/modules/scroll-capture.js +21 -72
- package/dist/electron/modules/scroll-capture.js.map +1 -1
- package/dist/electron/modules/sequence-locate.d.ts +126 -0
- package/dist/electron/modules/sequence-locate.d.ts.map +1 -0
- package/dist/electron/modules/sequence-locate.js +356 -0
- package/dist/electron/modules/sequence-locate.js.map +1 -0
- package/dist/electron/modules/store.d.ts +15 -56
- package/dist/electron/modules/store.d.ts.map +1 -1
- package/dist/electron/modules/store.js +84 -58
- package/dist/electron/modules/store.js.map +1 -1
- package/dist/electron/modules/stt/capability-probe.d.ts +67 -0
- package/dist/electron/modules/stt/capability-probe.d.ts.map +1 -0
- package/dist/electron/modules/stt/capability-probe.js +331 -0
- package/dist/electron/modules/stt/capability-probe.js.map +1 -0
- package/dist/electron/modules/stt/macos-engine.d.ts +20 -0
- package/dist/electron/modules/stt/macos-engine.d.ts.map +1 -0
- package/dist/electron/modules/stt/macos-engine.js +231 -0
- package/dist/electron/modules/stt/macos-engine.js.map +1 -0
- package/dist/electron/modules/stt/model-manager.d.ts +87 -0
- package/dist/electron/modules/stt/model-manager.d.ts.map +1 -0
- package/dist/electron/modules/stt/model-manager.js +321 -0
- package/dist/electron/modules/stt/model-manager.js.map +1 -0
- package/dist/electron/modules/stt/router.d.ts +35 -0
- package/dist/electron/modules/stt/router.d.ts.map +1 -0
- package/dist/electron/modules/stt/router.js +232 -0
- package/dist/electron/modules/stt/router.js.map +1 -0
- package/dist/electron/modules/stt/sherpa-engine.d.ts +43 -0
- package/dist/electron/modules/stt/sherpa-engine.d.ts.map +1 -0
- package/dist/electron/modules/stt/sherpa-engine.js +521 -0
- package/dist/electron/modules/stt/sherpa-engine.js.map +1 -0
- package/dist/electron/modules/stt/types.d.ts +72 -0
- package/dist/electron/modules/stt/types.d.ts.map +1 -0
- package/dist/electron/modules/stt/types.js +16 -0
- package/dist/electron/modules/stt/types.js.map +1 -0
- package/dist/electron/modules/stt/winrt-engine.d.ts +20 -0
- package/dist/electron/modules/stt/winrt-engine.d.ts.map +1 -0
- package/dist/electron/modules/stt/winrt-engine.js +238 -0
- package/dist/electron/modules/stt/winrt-engine.js.map +1 -0
- package/dist/electron/modules/template-match.d.ts +62 -0
- package/dist/electron/modules/template-match.d.ts.map +1 -0
- package/dist/electron/modules/template-match.js +205 -0
- package/dist/electron/modules/template-match.js.map +1 -0
- package/dist/electron/modules/tray.d.ts +2 -0
- package/dist/electron/modules/tray.d.ts.map +1 -1
- package/dist/electron/modules/tray.js +136 -8
- package/dist/electron/modules/tray.js.map +1 -1
- package/dist/electron/modules/undo-stack.d.ts +22 -0
- package/dist/electron/modules/undo-stack.d.ts.map +1 -0
- package/dist/electron/modules/undo-stack.js +41 -0
- package/dist/electron/modules/undo-stack.js.map +1 -0
- package/dist/electron/modules/watchers/active-window-watcher.d.ts +5 -0
- package/dist/electron/modules/watchers/active-window-watcher.d.ts.map +1 -0
- package/dist/electron/modules/watchers/active-window-watcher.js +152 -0
- package/dist/electron/modules/watchers/active-window-watcher.js.map +1 -0
- package/dist/electron/modules/watchers/clipboard-watcher.d.ts +5 -0
- package/dist/electron/modules/watchers/clipboard-watcher.d.ts.map +1 -0
- package/dist/electron/modules/watchers/clipboard-watcher.js +90 -0
- package/dist/electron/modules/watchers/clipboard-watcher.js.map +1 -0
- package/dist/electron/modules/watchers/file-watcher.d.ts +5 -0
- package/dist/electron/modules/watchers/file-watcher.d.ts.map +1 -0
- package/dist/electron/modules/watchers/file-watcher.js +91 -0
- package/dist/electron/modules/watchers/file-watcher.js.map +1 -0
- package/dist/electron/modules/watchers/registry.d.ts +34 -0
- package/dist/electron/modules/watchers/registry.d.ts.map +1 -0
- package/dist/electron/modules/watchers/registry.js +108 -0
- package/dist/electron/modules/watchers/registry.js.map +1 -0
- package/dist/electron/modules/watchers/screen-region-service.d.ts +18 -0
- package/dist/electron/modules/watchers/screen-region-service.d.ts.map +1 -0
- package/dist/electron/modules/watchers/screen-region-service.js +126 -0
- package/dist/electron/modules/watchers/screen-region-service.js.map +1 -0
- package/dist/electron/modules/watchers/screen-region-watcher.d.ts +6 -0
- package/dist/electron/modules/watchers/screen-region-watcher.d.ts.map +1 -0
- package/dist/electron/modules/watchers/screen-region-watcher.js +70 -0
- package/dist/electron/modules/watchers/screen-region-watcher.js.map +1 -0
- package/dist/electron/modules/window-activate.d.ts +103 -0
- package/dist/electron/modules/window-activate.d.ts.map +1 -0
- package/dist/electron/modules/window-activate.js +630 -0
- package/dist/electron/modules/window-activate.js.map +1 -0
- package/dist/electron/modules/window-input.d.ts +43 -0
- package/dist/electron/modules/window-input.d.ts.map +1 -0
- package/dist/electron/modules/window-input.js +623 -0
- package/dist/electron/modules/window-input.js.map +1 -0
- package/dist/electron/modules/window-resolver.d.ts +35 -0
- package/dist/electron/modules/window-resolver.d.ts.map +1 -0
- package/dist/electron/modules/window-resolver.js +210 -0
- package/dist/electron/modules/window-resolver.js.map +1 -0
- package/dist/headless/electron/core/input-injection/index.js +30 -0
- package/dist/headless/electron/core/input-injection/macos.js +13 -0
- package/dist/headless/electron/core/input-injection/windows.js +118 -0
- package/dist/headless/electron/core/json-store.js +61 -47
- package/dist/headless/electron/core/serialize-schema.js +88 -0
- package/dist/headless/electron/core/settings-schema.js +1356 -0
- package/dist/headless/electron/logger.js +22 -8
- package/dist/headless/electron/modules/accessibility/macos-provider.js +93 -0
- package/dist/headless/electron/modules/accessibility/provider.js +51 -0
- package/dist/headless/electron/modules/accessibility/types.js +5 -0
- package/dist/headless/electron/modules/accessibility/windows-provider.js +84 -0
- package/dist/headless/electron/modules/api-server.js +1349 -219
- package/dist/headless/electron/modules/auth.js +43 -0
- package/dist/headless/electron/modules/azure-speech-realtime.js +56 -0
- package/dist/headless/electron/modules/capture.js +33 -0
- package/dist/headless/electron/modules/context-menu-detect.js +271 -0
- package/dist/headless/electron/modules/dictation.js +12 -7
- package/dist/headless/electron/modules/gui-automation-errors.js +78 -0
- package/dist/headless/electron/modules/gui-automation-telemetry.js +199 -0
- package/dist/headless/electron/modules/gui-automation.js +8768 -0
- package/dist/headless/electron/modules/human-input/keyboard/timing.js +56 -0
- package/dist/headless/electron/modules/human-input/mouse/path.js +79 -0
- package/dist/headless/electron/modules/human-input/mouse/velocity.js +92 -0
- package/dist/headless/electron/modules/human-input/profiles.js +123 -0
- package/dist/headless/electron/modules/human-input/rng.js +100 -0
- package/dist/headless/electron/modules/human-input/salt.js +47 -0
- package/dist/headless/electron/modules/image-utils.js +79 -0
- package/dist/headless/electron/modules/ollama/capability.js +116 -0
- package/dist/headless/electron/modules/ollama/client.js +133 -0
- package/dist/headless/electron/modules/ollama/detector.js +176 -0
- package/dist/headless/electron/modules/ollama/dispatcher.js +96 -0
- package/dist/headless/electron/modules/ollama/router.js +200 -0
- package/dist/headless/electron/modules/platform/dpi.js +47 -0
- package/dist/headless/electron/modules/platform/errors.js +35 -0
- package/dist/headless/electron/modules/platform/index.js +132 -0
- package/dist/headless/electron/modules/platform/interfaces.js +13 -0
- package/dist/headless/electron/modules/platform/macos/ax.js +221 -0
- package/dist/headless/electron/modules/platform/macos/capture.js +105 -0
- package/dist/headless/electron/modules/platform/macos/input.js +341 -0
- package/dist/headless/electron/modules/platform/macos/launch.js +113 -0
- package/dist/headless/electron/modules/platform/macos/session.js +16 -0
- package/dist/headless/electron/modules/platform/macos/window.js +270 -0
- package/dist/headless/electron/modules/platform/shared.js +200 -0
- package/dist/headless/electron/modules/platform/types.js +23 -0
- package/dist/headless/electron/modules/platform/windows/ax.js +276 -0
- package/dist/headless/electron/modules/platform/windows/capture.js +114 -0
- package/dist/headless/electron/modules/platform/windows/input.js +421 -0
- package/dist/headless/electron/modules/platform/windows/launch.js +184 -0
- package/dist/headless/electron/modules/platform/windows/session.js +86 -0
- package/dist/headless/electron/modules/platform/windows/tray.js +389 -0
- package/dist/headless/electron/modules/platform/windows/window.js +443 -0
- package/dist/headless/electron/modules/recording/providers/change-detect-shared-wrapper.js +61 -0
- package/dist/headless/electron/modules/recording/providers/provider-factory.js +13 -7
- package/dist/headless/electron/modules/scroll-calibration.js +270 -0
- package/dist/headless/electron/modules/sequence-locate.js +355 -0
- package/dist/headless/electron/modules/store.js +84 -58
- package/dist/headless/electron/modules/stt/capability-probe.js +330 -0
- package/dist/headless/electron/modules/stt/macos-engine.js +230 -0
- package/dist/headless/electron/modules/stt/model-manager.js +320 -0
- package/dist/headless/electron/modules/stt/router.js +231 -0
- package/dist/headless/electron/modules/stt/sherpa-engine.js +520 -0
- package/dist/headless/electron/modules/stt/types.js +15 -0
- package/dist/headless/electron/modules/stt/winrt-engine.js +237 -0
- package/dist/headless/electron/modules/template-match.js +204 -0
- package/dist/headless/electron/modules/undo-stack.js +40 -0
- package/dist/headless/electron/modules/watchers/active-window-watcher.js +151 -0
- package/dist/headless/electron/modules/watchers/clipboard-watcher.js +89 -0
- package/dist/headless/electron/modules/watchers/file-watcher.js +90 -0
- package/dist/headless/electron/modules/watchers/registry.js +107 -0
- package/dist/headless/electron/modules/watchers/screen-region-service.js +125 -0
- package/dist/headless/electron/modules/watchers/screen-region-watcher.js +69 -0
- package/dist/headless/electron/modules/window-activate.js +629 -0
- package/dist/headless/electron/modules/window-input.js +622 -0
- package/dist/headless/electron/modules/window-resolver.js +209 -0
- package/dist/headless/headless/cli.js +66 -8
- package/dist/headless/headless/config-cmd.js +306 -0
- package/dist/headless/headless/doctor.js +599 -0
- package/dist/headless/headless/ollama-cmd.js +211 -0
- package/dist/headless/headless/platform-headless.js +13 -1
- package/dist/headless/headless/server.js +38 -2
- package/dist/headless/headless/stt-cmd.js +213 -0
- package/dist/headless/headless/tui/index.mjs +7 -0
- package/dist/headless/headless/tui/plain-dump.js +41 -0
- package/dist/headless/headless/tui/settings-app.mjs +744 -0
- package/dist/headless/headless/tui/setup-wizard.mjs +257 -0
- package/dist/headless/headless/tui-bridge.js +80 -0
- package/dist/headless/shared/constants.js +3 -1
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/constants.d.ts.map +1 -1
- package/dist/shared/constants.js +3 -1
- package/dist/shared/constants.js.map +1 -1
- package/dist/shared/types.d.ts +8 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/mcp-server/dist/api-client.js +257 -6
- package/mcp-server/dist/index.js +1566 -46
- package/mcp-server/dist/project-sense.js +161 -0
- package/mcp-server/dist/tool-categories.js +161 -0
- package/mcp-server/package.json +8 -2
- package/package.json +33 -5
|
@@ -0,0 +1,1143 @@
|
|
|
1
|
+
import { type LocateSpec } from './sequence-locate';
|
|
2
|
+
import type { AxPattern, Rect, WindowHandle, WindowState } from './platform/types';
|
|
3
|
+
import { type AutomationErrorCode } from './gui-automation-errors';
|
|
4
|
+
import { type HumanizeProfile } from './human-input/profiles';
|
|
5
|
+
export type AutomationMethod = 'coordinates' | 'ocr_locator' | 'window' | 'ax_tree';
|
|
6
|
+
export type ReturnObservationMode = 'screenshot' | 'full';
|
|
7
|
+
export type ReturnObservation = 'none' | ReturnObservationMode | {
|
|
8
|
+
mode: ReturnObservationMode;
|
|
9
|
+
settleMs?: number;
|
|
10
|
+
region?: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export interface Observation {
|
|
18
|
+
imageBase64: string;
|
|
19
|
+
width: number;
|
|
20
|
+
height: number;
|
|
21
|
+
mimeType: 'image/png';
|
|
22
|
+
textElements?: UiTextElement[];
|
|
23
|
+
backgroundMode?: boolean;
|
|
24
|
+
dpiScale?: number;
|
|
25
|
+
/**
|
|
26
|
+
* 1.4 — populated on right-clicks when a tracking popup (context menu) was
|
|
27
|
+
* detected post-click. Pass the hwnd to `superbased_ui_dump` to read the
|
|
28
|
+
* menu items, then `superbased_click` the chosen one. Absent when no popup
|
|
29
|
+
* appeared OR when the host renders the menu inside its own window
|
|
30
|
+
* (CONTEXT_MENU_NOT_DETECTED — see superbased_context_menu_select for
|
|
31
|
+
* the convenience wrapper that handles all the plumbing).
|
|
32
|
+
*/
|
|
33
|
+
contextMenu?: {
|
|
34
|
+
hwnd: string;
|
|
35
|
+
bounds: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface AutomationResult {
|
|
44
|
+
ok: boolean;
|
|
45
|
+
method?: AutomationMethod;
|
|
46
|
+
confidence?: number;
|
|
47
|
+
error?: string;
|
|
48
|
+
/** 6.1 taxonomy — structured code for agent branching. Populated on ok: false;
|
|
49
|
+
* forward-looking on ok: true (e.g. deprecation markers).
|
|
50
|
+
* The canonical set lives in `./gui-automation-errors.ts` (AutomationErrorCode). */
|
|
51
|
+
errorCode?: AutomationErrorCode;
|
|
52
|
+
hint?: string;
|
|
53
|
+
details?: Record<string, unknown>;
|
|
54
|
+
observation?: Observation;
|
|
55
|
+
}
|
|
56
|
+
interface GuiAutomationSettings {
|
|
57
|
+
enabled: boolean;
|
|
58
|
+
actions: {
|
|
59
|
+
click: boolean;
|
|
60
|
+
type: boolean;
|
|
61
|
+
hotkey: boolean;
|
|
62
|
+
scroll: boolean;
|
|
63
|
+
drag: boolean;
|
|
64
|
+
resize: boolean;
|
|
65
|
+
contextMenu: boolean;
|
|
66
|
+
hover: boolean;
|
|
67
|
+
pixelColor: boolean;
|
|
68
|
+
windowManage: boolean;
|
|
69
|
+
launch: boolean;
|
|
70
|
+
findImage: boolean;
|
|
71
|
+
axInvoke: boolean;
|
|
72
|
+
formFill: boolean;
|
|
73
|
+
dialogHandle: boolean;
|
|
74
|
+
findInPage: boolean;
|
|
75
|
+
tabManagement: boolean;
|
|
76
|
+
trayClick: boolean;
|
|
77
|
+
virtualDesktop: boolean;
|
|
78
|
+
safe: boolean;
|
|
79
|
+
write: boolean;
|
|
80
|
+
destructive: boolean;
|
|
81
|
+
};
|
|
82
|
+
confirmationMode: 'each' | 'session' | 'never';
|
|
83
|
+
auditLogEnabled: boolean;
|
|
84
|
+
requireConfirmFlag: boolean;
|
|
85
|
+
protectedApps: string[];
|
|
86
|
+
/** 3.2 — allowlist for superbased_launch_app. Empty default = deny-by-default. */
|
|
87
|
+
launchAllowlist: string[];
|
|
88
|
+
/** §6.11 — in-process telemetry counters surfaced via /api/health. OFF by
|
|
89
|
+
* default; privacy-by-default stance (counters derived from audit log,
|
|
90
|
+
* so enabling this adds no new data flow — just turns on computation). */
|
|
91
|
+
telemetryOptIn: boolean;
|
|
92
|
+
}
|
|
93
|
+
export declare function getSettings(): GuiAutomationSettings;
|
|
94
|
+
interface FocusContext {
|
|
95
|
+
matchedWindow: string;
|
|
96
|
+
matchScore?: number;
|
|
97
|
+
attempted: number;
|
|
98
|
+
verified?: boolean;
|
|
99
|
+
postForeground?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ClickArgs {
|
|
102
|
+
x?: number;
|
|
103
|
+
y?: number;
|
|
104
|
+
label?: string;
|
|
105
|
+
automationId?: string;
|
|
106
|
+
role?: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
caseSensitive?: boolean;
|
|
109
|
+
button?: 'left' | 'right' | 'middle';
|
|
110
|
+
doubleClick?: boolean;
|
|
111
|
+
clickCount?: 1 | 2 | 3;
|
|
112
|
+
modifiers?: Array<'shift' | 'ctrl' | 'alt' | 'meta'>;
|
|
113
|
+
confirm?: boolean;
|
|
114
|
+
caller?: string;
|
|
115
|
+
window?: string;
|
|
116
|
+
processName?: string;
|
|
117
|
+
hwnd?: string;
|
|
118
|
+
restoreFocus?: boolean;
|
|
119
|
+
returnObservation?: ReturnObservation;
|
|
120
|
+
humanize?: HumanizeProfile;
|
|
121
|
+
}
|
|
122
|
+
export declare function clickAt(args: ClickArgs): Promise<AutomationResult>;
|
|
123
|
+
export interface TypeArgs {
|
|
124
|
+
text: string;
|
|
125
|
+
confirm?: boolean;
|
|
126
|
+
caller?: string;
|
|
127
|
+
window?: string;
|
|
128
|
+
processName?: string;
|
|
129
|
+
hwnd?: string;
|
|
130
|
+
restoreFocus?: boolean;
|
|
131
|
+
returnObservation?: ReturnObservation;
|
|
132
|
+
label?: string;
|
|
133
|
+
automationId?: string;
|
|
134
|
+
role?: string;
|
|
135
|
+
name?: string;
|
|
136
|
+
caseSensitive?: boolean;
|
|
137
|
+
clearFirst?: boolean;
|
|
138
|
+
delayMs?: number;
|
|
139
|
+
ime?: boolean;
|
|
140
|
+
humanize?: HumanizeProfile;
|
|
141
|
+
}
|
|
142
|
+
export declare function typeText(args: TypeArgs): Promise<AutomationResult>;
|
|
143
|
+
export interface HotkeyArgs {
|
|
144
|
+
combo: string;
|
|
145
|
+
confirm?: boolean;
|
|
146
|
+
caller?: string;
|
|
147
|
+
window?: string;
|
|
148
|
+
processName?: string;
|
|
149
|
+
hwnd?: string;
|
|
150
|
+
restoreFocus?: boolean;
|
|
151
|
+
returnObservation?: ReturnObservation;
|
|
152
|
+
/**
|
|
153
|
+
* 1.1 — Windows delivery override. Default `'auto'`: classifier forces SendInput
|
|
154
|
+
* for browsers / Electron (Chrome, Edge, VS Code, Discord, etc. — PostMessage
|
|
155
|
+
* silently no-ops on those), PostMessage for classic Win32 controls.
|
|
156
|
+
* `'postmessage'` forces focus-free PostMessage (fast, no flicker, but fails on
|
|
157
|
+
* modern apps). `'sendinput'` forces activate + SendInput (works everywhere but
|
|
158
|
+
* steals focus for ~200ms).
|
|
159
|
+
*/
|
|
160
|
+
method?: 'auto' | 'postmessage' | 'sendinput';
|
|
161
|
+
}
|
|
162
|
+
export declare function hotkey(args: HotkeyArgs): Promise<AutomationResult>;
|
|
163
|
+
export interface ScrollArgs {
|
|
164
|
+
amount: number;
|
|
165
|
+
confirm?: boolean;
|
|
166
|
+
caller?: string;
|
|
167
|
+
window?: string;
|
|
168
|
+
processName?: string;
|
|
169
|
+
hwnd?: string;
|
|
170
|
+
restoreFocus?: boolean;
|
|
171
|
+
returnObservation?: ReturnObservation;
|
|
172
|
+
/**
|
|
173
|
+
* Anchor point (physical screen pixels) for the scroll. When set, the cursor
|
|
174
|
+
* is moved to (anchorX, anchorY) BEFORE the scroll fires so that wheel events
|
|
175
|
+
* land on the right container (Windows routes wheel events to the window
|
|
176
|
+
* under the cursor). Without an anchor, the scroll fires wherever the cursor
|
|
177
|
+
* already happens to be — which is usually the last-clicked element (e.g.
|
|
178
|
+
* a sidebar) rather than the content panel the agent wants to page through.
|
|
179
|
+
*
|
|
180
|
+
* HIGHLY RECOMMENDED when scrolling a target window with multiple scrollable
|
|
181
|
+
* containers (sidebar + content, list + detail, etc.). Pick an anchor inside
|
|
182
|
+
* the container you want to scroll — typically grab it from a ui_dump text
|
|
183
|
+
* element's center.{x,y}, or pick an empty area in the content panel.
|
|
184
|
+
*/
|
|
185
|
+
anchorX?: number;
|
|
186
|
+
anchorY?: number;
|
|
187
|
+
/**
|
|
188
|
+
* How to scroll:
|
|
189
|
+
* 'wheel' — mouse wheel. On Windows with hasTarget, uses Win32 mouse_event
|
|
190
|
+
* (bypasses nut-js synthetic events that Electron drops).
|
|
191
|
+
* Elsewhere uses nut-js wheel. Most reliable for unit='page'.
|
|
192
|
+
* 'keys' — keyboard PageDown / PageUp (or arrow keys for small amounts).
|
|
193
|
+
* Requires keyboard focus on the scroll container — unreliable
|
|
194
|
+
* on Electron where keyboard focus may be elsewhere.
|
|
195
|
+
* 'auto' — default. Windows+hasTarget: Win32 wheel (preferred).
|
|
196
|
+
* Else nut-js wheel + keys fallback.
|
|
197
|
+
*/
|
|
198
|
+
method?: 'wheel' | 'keys' | 'auto';
|
|
199
|
+
/**
|
|
200
|
+
* Scroll unit — controls what `amount` means:
|
|
201
|
+
* 'ticks' — default. `amount` is wheel-tick count. Hardware-variable.
|
|
202
|
+
* 'page' — `amount` is viewport pages. When calibration is available
|
|
203
|
+
* (per-hwnd cache, auto-measured on first use), 1 page scrolls
|
|
204
|
+
* ~90% of the window height via calibrated wheel ticks. The
|
|
205
|
+
* SAME algorithm auto-scroll-capture uses for stitched long-page
|
|
206
|
+
* screenshots: measure pixels-per-tick, compute ticks needed
|
|
207
|
+
* to advance one viewport with 10% overlap. Predictable movement
|
|
208
|
+
* regardless of mouse-wheel sensitivity.
|
|
209
|
+
* 'line' — `amount` is arrow-key presses. Small nudges. Keyboard path.
|
|
210
|
+
* Response `details.atEnd: true` when pre/post screenshots are >95%
|
|
211
|
+
* similar — viewport didn't move, likely hit end of scrollable content.
|
|
212
|
+
*/
|
|
213
|
+
unit?: 'ticks' | 'page' | 'line';
|
|
214
|
+
/**
|
|
215
|
+
* Force a fresh calibration on this call even if the per-hwnd cache has a
|
|
216
|
+
* valid entry. Useful after resizing / re-laying-out the target window.
|
|
217
|
+
*/
|
|
218
|
+
recalibrate?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* 2.5 — scroll axis. Default 'y' (vertical). 'x' uses MOUSEEVENTF_HWHEEL on
|
|
221
|
+
* Windows (with Shift+Wheel fallback); falls through the same method/keys
|
|
222
|
+
* branches as vertical when method='keys' (Left/Right arrow nudges).
|
|
223
|
+
*/
|
|
224
|
+
axis?: 'y' | 'x';
|
|
225
|
+
}
|
|
226
|
+
export declare function scroll(args: ScrollArgs): Promise<AutomationResult>;
|
|
227
|
+
export declare function resetScrollCalibrationCache(hwnd?: string): void;
|
|
228
|
+
export declare const RESIZE_PRESETS: Record<string, {
|
|
229
|
+
width: number;
|
|
230
|
+
height: number;
|
|
231
|
+
}>;
|
|
232
|
+
export interface ResizeWindowArgs {
|
|
233
|
+
preset?: string;
|
|
234
|
+
width?: number;
|
|
235
|
+
height?: number;
|
|
236
|
+
x?: number;
|
|
237
|
+
y?: number;
|
|
238
|
+
contentArea?: boolean;
|
|
239
|
+
confirm?: boolean;
|
|
240
|
+
caller?: string;
|
|
241
|
+
window?: string;
|
|
242
|
+
processName?: string;
|
|
243
|
+
hwnd?: string;
|
|
244
|
+
returnObservation?: ReturnObservation;
|
|
245
|
+
}
|
|
246
|
+
export declare function resizeWindow(args: ResizeWindowArgs): Promise<AutomationResult>;
|
|
247
|
+
export interface WindowBoundsArgs {
|
|
248
|
+
window?: string;
|
|
249
|
+
processName?: string;
|
|
250
|
+
hwnd?: string;
|
|
251
|
+
caller?: string;
|
|
252
|
+
}
|
|
253
|
+
export declare function windowBounds(args: WindowBoundsArgs): Promise<AutomationResult>;
|
|
254
|
+
export interface FindTitleBarDragRegionArgs {
|
|
255
|
+
window?: string;
|
|
256
|
+
processName?: string;
|
|
257
|
+
hwnd?: string;
|
|
258
|
+
caller?: string;
|
|
259
|
+
}
|
|
260
|
+
export declare function findTitleBarDragRegion(args: FindTitleBarDragRegionArgs): Promise<AutomationResult>;
|
|
261
|
+
export type WindowStateAction = WindowState;
|
|
262
|
+
export interface SetWindowStateArgs {
|
|
263
|
+
action: WindowStateAction;
|
|
264
|
+
/** Target display ID when `action === 'move_to_display'`. Ignored otherwise. Resolved via `superbased_display_list` or `platform.capture.enumerateDisplays()`. */
|
|
265
|
+
displayId?: number;
|
|
266
|
+
confirm?: boolean;
|
|
267
|
+
caller?: string;
|
|
268
|
+
window?: string;
|
|
269
|
+
processName?: string;
|
|
270
|
+
hwnd?: string;
|
|
271
|
+
returnObservation?: ReturnObservation;
|
|
272
|
+
}
|
|
273
|
+
export declare function setWindowState(args: SetWindowStateArgs): Promise<AutomationResult>;
|
|
274
|
+
export interface LaunchAllowlistMatch {
|
|
275
|
+
ok: boolean;
|
|
276
|
+
entry?: string;
|
|
277
|
+
reason?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface LaunchAppArgs {
|
|
280
|
+
path?: string;
|
|
281
|
+
name?: string;
|
|
282
|
+
url?: string;
|
|
283
|
+
args?: string[];
|
|
284
|
+
workingDir?: string;
|
|
285
|
+
waitForWindow?: boolean;
|
|
286
|
+
timeoutMs?: number;
|
|
287
|
+
/** Override the derived process-name needle for waitForWindow. Useful when the exe name differs from the allowlist entry (launchers, wrappers). */
|
|
288
|
+
processNameMatch?: string;
|
|
289
|
+
/** Override the derived title needle for waitForWindow. */
|
|
290
|
+
titleMatch?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Default true — restore the pre-launch foreground after the launched app
|
|
293
|
+
* has been spawned (and, when `waitForWindow:true`, after its window
|
|
294
|
+
* appears). Matches the contract on type / hotkey / click: launching an
|
|
295
|
+
* app shouldn't silently steal the user's foreground indefinitely. Set
|
|
296
|
+
* `false` when the agent's next step wants to interact with the newly-
|
|
297
|
+
* launched app via an untargeted (SendInput) keystroke path — though
|
|
298
|
+
* targeted calls don't need foreground anyway, so the false case is rare.
|
|
299
|
+
*/
|
|
300
|
+
restoreFocus?: boolean;
|
|
301
|
+
confirm?: boolean;
|
|
302
|
+
caller?: string;
|
|
303
|
+
returnObservation?: ReturnObservation;
|
|
304
|
+
}
|
|
305
|
+
export declare function launchApp(args: LaunchAppArgs): Promise<AutomationResult>;
|
|
306
|
+
export interface DragArgs {
|
|
307
|
+
fromX?: number;
|
|
308
|
+
fromY?: number;
|
|
309
|
+
toX?: number;
|
|
310
|
+
toY?: number;
|
|
311
|
+
/**
|
|
312
|
+
* Waypoint array. 3.3: each waypoint may carry an optional `atMs` for
|
|
313
|
+
* non-linear timing (be at this point at atMs from drag start). When
|
|
314
|
+
* `fromX/fromY` and `toX/toY` are also set, path waypoints are inserted
|
|
315
|
+
* between them; when from/to are omitted, path is used as-is and must
|
|
316
|
+
* have ≥2 waypoints.
|
|
317
|
+
*/
|
|
318
|
+
path?: Array<{
|
|
319
|
+
x: number;
|
|
320
|
+
y: number;
|
|
321
|
+
atMs?: number;
|
|
322
|
+
}>;
|
|
323
|
+
durationMs?: number;
|
|
324
|
+
steps?: number;
|
|
325
|
+
button?: 'left' | 'right';
|
|
326
|
+
modifiers?: Array<'shift' | 'ctrl' | 'alt' | 'meta'>;
|
|
327
|
+
confirm?: boolean;
|
|
328
|
+
caller?: string;
|
|
329
|
+
window?: string;
|
|
330
|
+
processName?: string;
|
|
331
|
+
hwnd?: string;
|
|
332
|
+
restoreFocus?: boolean;
|
|
333
|
+
returnObservation?: ReturnObservation;
|
|
334
|
+
humanize?: HumanizeProfile;
|
|
335
|
+
}
|
|
336
|
+
export declare function dragAt(args: DragArgs): Promise<AutomationResult>;
|
|
337
|
+
export interface PixelColorArgs {
|
|
338
|
+
x: number;
|
|
339
|
+
y: number;
|
|
340
|
+
/** Optional expected color (#RRGGBB or #RRGGBBAA) — when set, the response includes a `matches` boolean using `tolerance` (0-255 per channel, default 0). */
|
|
341
|
+
expected?: string;
|
|
342
|
+
tolerance?: number;
|
|
343
|
+
confirm?: boolean;
|
|
344
|
+
caller?: string;
|
|
345
|
+
}
|
|
346
|
+
export declare function pixelColor(args: PixelColorArgs): Promise<AutomationResult>;
|
|
347
|
+
export interface FindImageArgs {
|
|
348
|
+
/** Base64-encoded PNG of the template. Pass EITHER templateBase64 OR templatePath. */
|
|
349
|
+
templateBase64?: string;
|
|
350
|
+
/** Filesystem path to a PNG template. Metadata loaded from `<path>.meta.json` when present. */
|
|
351
|
+
templatePath?: string;
|
|
352
|
+
/** Virtual-screen region to search (default = full virtual screen). */
|
|
353
|
+
region?: Rect;
|
|
354
|
+
/** Minimum NCC confidence in [0, 1]. Default 0.85. */
|
|
355
|
+
threshold?: number;
|
|
356
|
+
/** Return multiple non-overlapping matches. Default false (single best). */
|
|
357
|
+
multi?: boolean;
|
|
358
|
+
/** Cap on matches returned in multi mode. Default 10. */
|
|
359
|
+
maxMatches?: number;
|
|
360
|
+
/** Override the metadata DPI-scale guard. Default false (refuse under different DPI). */
|
|
361
|
+
ignoreDpiScale?: boolean;
|
|
362
|
+
/** Override the metadata theme guard. Default false (refuse under different theme). */
|
|
363
|
+
ignoreTheme?: boolean;
|
|
364
|
+
/** Downsample budget for the NCC pass. Lower = faster, less precise. Default 400. */
|
|
365
|
+
maxSearchDim?: number;
|
|
366
|
+
confirm?: boolean;
|
|
367
|
+
caller?: string;
|
|
368
|
+
}
|
|
369
|
+
export interface CaptureTemplateArgs {
|
|
370
|
+
/** Region to capture (virtual-screen coords). Required. */
|
|
371
|
+
region: Rect;
|
|
372
|
+
/** Destination PNG path. When omitted, writes to `~/.superbased/templates/<tag>-<timestamp>.png`. */
|
|
373
|
+
destPath?: string;
|
|
374
|
+
/** Optional short tag written into metadata + default filename. */
|
|
375
|
+
tag?: string;
|
|
376
|
+
/** displayId the region belongs to — stored in metadata for later cross-monitor checks. */
|
|
377
|
+
displayId?: number;
|
|
378
|
+
confirm?: boolean;
|
|
379
|
+
caller?: string;
|
|
380
|
+
}
|
|
381
|
+
export declare function findImage(args: FindImageArgs): Promise<AutomationResult>;
|
|
382
|
+
export declare function captureTemplate(args: CaptureTemplateArgs): Promise<AutomationResult>;
|
|
383
|
+
export interface HoverArgs {
|
|
384
|
+
x?: number;
|
|
385
|
+
y?: number;
|
|
386
|
+
label?: string;
|
|
387
|
+
automationId?: string;
|
|
388
|
+
role?: string;
|
|
389
|
+
name?: string;
|
|
390
|
+
caseSensitive?: boolean;
|
|
391
|
+
dwellMs?: number;
|
|
392
|
+
confirm?: boolean;
|
|
393
|
+
caller?: string;
|
|
394
|
+
window?: string;
|
|
395
|
+
processName?: string;
|
|
396
|
+
hwnd?: string;
|
|
397
|
+
restoreFocus?: boolean;
|
|
398
|
+
returnObservation?: ReturnObservation;
|
|
399
|
+
humanize?: HumanizeProfile;
|
|
400
|
+
}
|
|
401
|
+
export declare function hoverAt(args: HoverArgs): Promise<AutomationResult>;
|
|
402
|
+
export interface ContextMenuSelectArgs {
|
|
403
|
+
x: number;
|
|
404
|
+
y: number;
|
|
405
|
+
menuItemText: string;
|
|
406
|
+
caseSensitive?: boolean;
|
|
407
|
+
timeoutMs?: number;
|
|
408
|
+
confirm?: boolean;
|
|
409
|
+
caller?: string;
|
|
410
|
+
window?: string;
|
|
411
|
+
processName?: string;
|
|
412
|
+
hwnd?: string;
|
|
413
|
+
restoreFocus?: boolean;
|
|
414
|
+
returnObservation?: ReturnObservation;
|
|
415
|
+
}
|
|
416
|
+
export declare function contextMenuSelect(args: ContextMenuSelectArgs): Promise<AutomationResult>;
|
|
417
|
+
export declare function getMousePosition(): Promise<AutomationResult & {
|
|
418
|
+
x?: number;
|
|
419
|
+
y?: number;
|
|
420
|
+
}>;
|
|
421
|
+
export interface WaitArgs {
|
|
422
|
+
ms: number;
|
|
423
|
+
caller?: string;
|
|
424
|
+
}
|
|
425
|
+
export declare function waitMs(args: WaitArgs): Promise<AutomationResult>;
|
|
426
|
+
export declare const AX_INVOKE_PATTERNS: readonly AxPattern[];
|
|
427
|
+
export interface AxInvokeArgs {
|
|
428
|
+
automationId?: string;
|
|
429
|
+
role?: string;
|
|
430
|
+
name?: string;
|
|
431
|
+
caseSensitive?: boolean;
|
|
432
|
+
pattern: AxPattern;
|
|
433
|
+
/** Required when pattern === 'Value.SetValue'. */
|
|
434
|
+
value?: string;
|
|
435
|
+
confirm?: boolean;
|
|
436
|
+
caller?: string;
|
|
437
|
+
window?: string;
|
|
438
|
+
processName?: string;
|
|
439
|
+
hwnd?: string;
|
|
440
|
+
returnObservation?: ReturnObservation;
|
|
441
|
+
}
|
|
442
|
+
export declare function axInvoke(args: AxInvokeArgs): Promise<AutomationResult>;
|
|
443
|
+
export interface FormFillField {
|
|
444
|
+
/** OCR-based label resolution (reliability pyramid bottom rung). */
|
|
445
|
+
label?: string;
|
|
446
|
+
/** UIA AutomationId — top of pyramid; preferred. */
|
|
447
|
+
automationId?: string;
|
|
448
|
+
/** UIA ControlType + Name (middle rung). Paired. */
|
|
449
|
+
role?: string;
|
|
450
|
+
name?: string;
|
|
451
|
+
caseSensitive?: boolean;
|
|
452
|
+
/** Text to enter into the field. Routes through ValuePattern.SetValue when supported; falls back to click + clearFirst + type. */
|
|
453
|
+
value: string;
|
|
454
|
+
/** Clear the field before typing on the fallback path. Default true. Ignored on ValuePattern.SetValue path (SetValue always overwrites). */
|
|
455
|
+
clearFirst?: boolean;
|
|
456
|
+
}
|
|
457
|
+
export interface FormFillArgs {
|
|
458
|
+
fields: FormFillField[];
|
|
459
|
+
/** Optional label / text for the Submit button — clicked once all fields are filled. Resolves via same pyramid; no tab from the last field. */
|
|
460
|
+
submitLabel?: string;
|
|
461
|
+
/** Optional AutomationId for the Submit button — preferred over submitLabel. */
|
|
462
|
+
submitAutomationId?: string;
|
|
463
|
+
/** Default true. When true, fires a Tab keystroke between fields to advance focus. */
|
|
464
|
+
tabBetweenFields?: boolean;
|
|
465
|
+
confirm?: boolean;
|
|
466
|
+
caller?: string;
|
|
467
|
+
window?: string;
|
|
468
|
+
processName?: string;
|
|
469
|
+
hwnd?: string;
|
|
470
|
+
restoreFocus?: boolean;
|
|
471
|
+
returnObservation?: ReturnObservation;
|
|
472
|
+
}
|
|
473
|
+
export declare function formFill(args: FormFillArgs): Promise<AutomationResult>;
|
|
474
|
+
export type DialogAction = 'confirm' | 'dismiss' | 'fill_path';
|
|
475
|
+
export interface DialogHandleArgs {
|
|
476
|
+
dialogAction: DialogAction;
|
|
477
|
+
/** Required when dialogAction === 'fill_path'. */
|
|
478
|
+
path?: string;
|
|
479
|
+
/** Optional explicit button label for confirm. When absent, confirm presses Enter. */
|
|
480
|
+
buttonLabel?: string;
|
|
481
|
+
confirm?: boolean;
|
|
482
|
+
caller?: string;
|
|
483
|
+
/** Default: auto-detect the active foreground window (common case for modal dialogs). */
|
|
484
|
+
window?: string;
|
|
485
|
+
processName?: string;
|
|
486
|
+
hwnd?: string;
|
|
487
|
+
restoreFocus?: boolean;
|
|
488
|
+
returnObservation?: ReturnObservation;
|
|
489
|
+
}
|
|
490
|
+
export declare function dialogHandle(args: DialogHandleArgs): Promise<AutomationResult>;
|
|
491
|
+
export interface FindInPageArgs {
|
|
492
|
+
query: string;
|
|
493
|
+
/** Default 'next'. 'prev' sends Shift+Enter instead of Enter to cycle backwards. */
|
|
494
|
+
direction?: 'next' | 'prev';
|
|
495
|
+
/** Default false. When true, sends Escape after the navigate to close the find bar. */
|
|
496
|
+
closeAfter?: boolean;
|
|
497
|
+
confirm?: boolean;
|
|
498
|
+
caller?: string;
|
|
499
|
+
window?: string;
|
|
500
|
+
processName?: string;
|
|
501
|
+
hwnd?: string;
|
|
502
|
+
restoreFocus?: boolean;
|
|
503
|
+
returnObservation?: ReturnObservation;
|
|
504
|
+
}
|
|
505
|
+
export declare function findInPage(args: FindInPageArgs): Promise<AutomationResult>;
|
|
506
|
+
export interface TrayClickArgs {
|
|
507
|
+
/**
|
|
508
|
+
* Substring match against the icon tooltip. Case-insensitive unless
|
|
509
|
+
* caseSensitive is true. Unique match required — multiple matches return
|
|
510
|
+
* `LOCATE_AMBIGUOUS` with the alternatives surfaced in details.
|
|
511
|
+
*/
|
|
512
|
+
tooltipMatch: string;
|
|
513
|
+
/** Default 'left'. 'right' opens the icon's context menu. */
|
|
514
|
+
button?: 'left' | 'right';
|
|
515
|
+
/** Default false. */
|
|
516
|
+
caseSensitive?: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Default false. When true, also enumerates the overflow flyout
|
|
519
|
+
* ("NotifyIconOverflowWindow") — icons the user moved behind the caret ^.
|
|
520
|
+
* Windows 11 keeps overflow enumerable without opening the flyout; on
|
|
521
|
+
* Windows 10 some items may only surface after the user clicks the caret.
|
|
522
|
+
*/
|
|
523
|
+
includeOverflow?: boolean;
|
|
524
|
+
confirm?: boolean;
|
|
525
|
+
caller?: string;
|
|
526
|
+
returnObservation?: ReturnObservation;
|
|
527
|
+
}
|
|
528
|
+
export declare function clickTrayIcon(args: TrayClickArgs): Promise<AutomationResult>;
|
|
529
|
+
export interface DragFileArgs {
|
|
530
|
+
/** Absolute path to the file to drag. The helper surfaces CF_HDROP with this single path. */
|
|
531
|
+
filePath: string;
|
|
532
|
+
/** Screen-space target coordinate to release the drag on (virtual-screen pixels). */
|
|
533
|
+
toX: number;
|
|
534
|
+
toY: number;
|
|
535
|
+
/** Optional source coordinate; defaults to the current cursor position. */
|
|
536
|
+
fromX?: number;
|
|
537
|
+
fromY?: number;
|
|
538
|
+
/** Default 'left'. Right-button drag surfaces the shell's drag context menu on drop. */
|
|
539
|
+
button?: 'left' | 'right';
|
|
540
|
+
/** Optional non-linear drag path (waypoints with optional per-segment timing). */
|
|
541
|
+
path?: Array<{
|
|
542
|
+
x: number;
|
|
543
|
+
y: number;
|
|
544
|
+
atMs?: number;
|
|
545
|
+
}>;
|
|
546
|
+
/** Total drag duration (linear interp across waypoints). Default 400ms — slightly slower than cursor drag because OLE targets need time to highlight hover states. */
|
|
547
|
+
durationMs?: number;
|
|
548
|
+
confirm?: boolean;
|
|
549
|
+
caller?: string;
|
|
550
|
+
returnObservation?: ReturnObservation;
|
|
551
|
+
}
|
|
552
|
+
export declare function dragFile(args: DragFileArgs): Promise<AutomationResult>;
|
|
553
|
+
export type VirtualDesktopDirection = 'left' | 'right';
|
|
554
|
+
export interface VirtualDesktopArgs {
|
|
555
|
+
direction: VirtualDesktopDirection;
|
|
556
|
+
confirm?: boolean;
|
|
557
|
+
caller?: string;
|
|
558
|
+
returnObservation?: ReturnObservation;
|
|
559
|
+
}
|
|
560
|
+
export declare function virtualDesktop(args: VirtualDesktopArgs): Promise<AutomationResult>;
|
|
561
|
+
export type TabManagementAction = 'new' | 'close' | 'next' | 'prev' | 'switch_to';
|
|
562
|
+
export interface TabManagementArgs {
|
|
563
|
+
tabAction: TabManagementAction;
|
|
564
|
+
/** Only used when tabAction === 'new'. When set, types the url + Enter after opening the new tab. */
|
|
565
|
+
url?: string;
|
|
566
|
+
/** Only used when tabAction === 'switch_to'. 1-indexed. Values >= 9 map to Ctrl+9 ("last tab" on every major browser). */
|
|
567
|
+
index?: number;
|
|
568
|
+
confirm?: boolean;
|
|
569
|
+
caller?: string;
|
|
570
|
+
window?: string;
|
|
571
|
+
processName?: string;
|
|
572
|
+
hwnd?: string;
|
|
573
|
+
restoreFocus?: boolean;
|
|
574
|
+
returnObservation?: ReturnObservation;
|
|
575
|
+
}
|
|
576
|
+
export declare function tabManagement(args: TabManagementArgs): Promise<AutomationResult>;
|
|
577
|
+
export interface OpenUrlArgs {
|
|
578
|
+
url: string;
|
|
579
|
+
/** Optional browser binary path ("C:\\...\\chrome.exe") or resolvable name ("chrome", "msedge", "firefox"). When omitted, ShellExecute → default browser. */
|
|
580
|
+
browser?: string;
|
|
581
|
+
/** Default true. Polls for the browser window to appear after launch. */
|
|
582
|
+
waitForLoad?: boolean;
|
|
583
|
+
/** waitForLoad deadline in ms. Default 10000. */
|
|
584
|
+
timeoutMs?: number;
|
|
585
|
+
/** Override the derived processName needle for waitForWindow. */
|
|
586
|
+
processNameMatch?: string;
|
|
587
|
+
/** Override the derived title needle for waitForWindow. */
|
|
588
|
+
titleMatch?: string;
|
|
589
|
+
confirm?: boolean;
|
|
590
|
+
caller?: string;
|
|
591
|
+
returnObservation?: ReturnObservation;
|
|
592
|
+
}
|
|
593
|
+
export declare function openUrl(args: OpenUrlArgs): Promise<AutomationResult>;
|
|
594
|
+
export interface DryRunArgs {
|
|
595
|
+
tool: string;
|
|
596
|
+
args?: Record<string, unknown>;
|
|
597
|
+
caller?: string;
|
|
598
|
+
}
|
|
599
|
+
export declare function dryRun(args: DryRunArgs): Promise<AutomationResult>;
|
|
600
|
+
export interface ReplayArgs {
|
|
601
|
+
from?: string;
|
|
602
|
+
to?: string;
|
|
603
|
+
sessionId?: string;
|
|
604
|
+
dryRun?: boolean;
|
|
605
|
+
confirm?: boolean;
|
|
606
|
+
caller?: string;
|
|
607
|
+
}
|
|
608
|
+
export declare function replay(args: ReplayArgs): Promise<AutomationResult>;
|
|
609
|
+
export interface DoctorArgs {
|
|
610
|
+
skipPrimitives?: string[];
|
|
611
|
+
timeoutMs?: number;
|
|
612
|
+
caller?: string;
|
|
613
|
+
}
|
|
614
|
+
export declare function doctorGuiAutomation(args?: DoctorArgs): Promise<AutomationResult>;
|
|
615
|
+
export interface BaseStep {
|
|
616
|
+
name?: string;
|
|
617
|
+
target?: string;
|
|
618
|
+
checkpoint?: boolean;
|
|
619
|
+
refreshLocate?: boolean;
|
|
620
|
+
onError?: 'stop' | 'continue';
|
|
621
|
+
}
|
|
622
|
+
export type SequenceStep = BaseStep & ({
|
|
623
|
+
action: 'click';
|
|
624
|
+
x?: number;
|
|
625
|
+
y?: number;
|
|
626
|
+
locate?: LocateSpec;
|
|
627
|
+
button?: 'left' | 'right' | 'middle';
|
|
628
|
+
doubleClick?: boolean;
|
|
629
|
+
clickCount?: 1 | 2 | 3;
|
|
630
|
+
modifiers?: Array<'shift' | 'ctrl' | 'alt' | 'meta'>;
|
|
631
|
+
returnObservation?: ReturnObservation;
|
|
632
|
+
} | {
|
|
633
|
+
action: 'type';
|
|
634
|
+
text: string;
|
|
635
|
+
clearFirst?: boolean;
|
|
636
|
+
delayMs?: number;
|
|
637
|
+
ime?: boolean;
|
|
638
|
+
returnObservation?: ReturnObservation;
|
|
639
|
+
} | {
|
|
640
|
+
action: 'hotkey';
|
|
641
|
+
combo: string;
|
|
642
|
+
method?: 'auto' | 'postmessage' | 'sendinput';
|
|
643
|
+
returnObservation?: ReturnObservation;
|
|
644
|
+
} | {
|
|
645
|
+
action: 'scroll';
|
|
646
|
+
amount: number;
|
|
647
|
+
method?: 'wheel' | 'keys' | 'auto';
|
|
648
|
+
unit?: 'ticks' | 'page' | 'line';
|
|
649
|
+
axis?: 'y' | 'x';
|
|
650
|
+
returnObservation?: ReturnObservation;
|
|
651
|
+
} | {
|
|
652
|
+
action: 'screenshot';
|
|
653
|
+
background?: boolean;
|
|
654
|
+
} | {
|
|
655
|
+
action: 'wait';
|
|
656
|
+
ms: number;
|
|
657
|
+
} | {
|
|
658
|
+
action: 'move';
|
|
659
|
+
x?: number;
|
|
660
|
+
y?: number;
|
|
661
|
+
locate?: LocateSpec;
|
|
662
|
+
} | {
|
|
663
|
+
action: 'drag';
|
|
664
|
+
fromX?: number;
|
|
665
|
+
fromY?: number;
|
|
666
|
+
toX?: number;
|
|
667
|
+
toY?: number;
|
|
668
|
+
fromLocate?: LocateSpec;
|
|
669
|
+
toLocate?: LocateSpec;
|
|
670
|
+
path?: Array<{
|
|
671
|
+
x: number;
|
|
672
|
+
y: number;
|
|
673
|
+
atMs?: number;
|
|
674
|
+
}>;
|
|
675
|
+
durationMs?: number;
|
|
676
|
+
steps?: number;
|
|
677
|
+
button?: 'left' | 'right';
|
|
678
|
+
modifiers?: Array<'shift' | 'ctrl' | 'alt' | 'meta'>;
|
|
679
|
+
} | {
|
|
680
|
+
action: 'hover';
|
|
681
|
+
x?: number;
|
|
682
|
+
y?: number;
|
|
683
|
+
locate?: LocateSpec;
|
|
684
|
+
dwellMs?: number;
|
|
685
|
+
} | {
|
|
686
|
+
action: 'wait_for';
|
|
687
|
+
condition: WaitForCondition;
|
|
688
|
+
timeoutMs: number;
|
|
689
|
+
intervalMs?: number;
|
|
690
|
+
} | {
|
|
691
|
+
action: 'assert';
|
|
692
|
+
condition: AssertCondition;
|
|
693
|
+
timeoutMs?: number;
|
|
694
|
+
intervalMs?: number;
|
|
695
|
+
} | {
|
|
696
|
+
action: 'context_menu_select';
|
|
697
|
+
x?: number;
|
|
698
|
+
y?: number;
|
|
699
|
+
locate?: LocateSpec;
|
|
700
|
+
menuItemText: string;
|
|
701
|
+
timeoutMs?: number;
|
|
702
|
+
} | {
|
|
703
|
+
action: 'resize_window';
|
|
704
|
+
preset?: string;
|
|
705
|
+
width?: number;
|
|
706
|
+
height?: number;
|
|
707
|
+
x?: number;
|
|
708
|
+
y?: number;
|
|
709
|
+
contentArea?: boolean;
|
|
710
|
+
} | {
|
|
711
|
+
action: 'window_state';
|
|
712
|
+
state: WindowState;
|
|
713
|
+
displayId?: number;
|
|
714
|
+
} | {
|
|
715
|
+
action: 'launch_app';
|
|
716
|
+
path?: string;
|
|
717
|
+
name?: string;
|
|
718
|
+
url?: string;
|
|
719
|
+
args?: string[];
|
|
720
|
+
workingDir?: string;
|
|
721
|
+
waitForWindow?: boolean;
|
|
722
|
+
timeoutMs?: number;
|
|
723
|
+
processNameMatch?: string;
|
|
724
|
+
titleMatch?: string;
|
|
725
|
+
} | {
|
|
726
|
+
action: 'find_image';
|
|
727
|
+
templatePath?: string;
|
|
728
|
+
templateBase64?: string;
|
|
729
|
+
region?: Rect;
|
|
730
|
+
threshold?: number;
|
|
731
|
+
multi?: boolean;
|
|
732
|
+
maxMatches?: number;
|
|
733
|
+
ignoreDpiScale?: boolean;
|
|
734
|
+
ignoreTheme?: boolean;
|
|
735
|
+
} | {
|
|
736
|
+
action: 'ax_invoke';
|
|
737
|
+
automationId?: string;
|
|
738
|
+
role?: string;
|
|
739
|
+
name?: string;
|
|
740
|
+
caseSensitive?: boolean;
|
|
741
|
+
pattern: AxPattern;
|
|
742
|
+
value?: string;
|
|
743
|
+
returnObservation?: ReturnObservation;
|
|
744
|
+
} | {
|
|
745
|
+
action: 'form_fill';
|
|
746
|
+
fields: FormFillField[];
|
|
747
|
+
submitLabel?: string;
|
|
748
|
+
submitAutomationId?: string;
|
|
749
|
+
tabBetweenFields?: boolean;
|
|
750
|
+
returnObservation?: ReturnObservation;
|
|
751
|
+
} | {
|
|
752
|
+
action: 'dialog_handle';
|
|
753
|
+
dialogAction: DialogAction;
|
|
754
|
+
path?: string;
|
|
755
|
+
buttonLabel?: string;
|
|
756
|
+
returnObservation?: ReturnObservation;
|
|
757
|
+
} | {
|
|
758
|
+
action: 'find_in_page';
|
|
759
|
+
query: string;
|
|
760
|
+
direction?: 'next' | 'prev';
|
|
761
|
+
closeAfter?: boolean;
|
|
762
|
+
returnObservation?: ReturnObservation;
|
|
763
|
+
} | {
|
|
764
|
+
action: 'tab_management';
|
|
765
|
+
tabAction: TabManagementAction;
|
|
766
|
+
url?: string;
|
|
767
|
+
index?: number;
|
|
768
|
+
returnObservation?: ReturnObservation;
|
|
769
|
+
} | {
|
|
770
|
+
action: 'open_url';
|
|
771
|
+
url: string;
|
|
772
|
+
browser?: string;
|
|
773
|
+
waitForLoad?: boolean;
|
|
774
|
+
timeoutMs?: number;
|
|
775
|
+
processNameMatch?: string;
|
|
776
|
+
titleMatch?: string;
|
|
777
|
+
returnObservation?: ReturnObservation;
|
|
778
|
+
} | {
|
|
779
|
+
action: 'tray_click';
|
|
780
|
+
tooltipMatch: string;
|
|
781
|
+
button?: 'left' | 'right';
|
|
782
|
+
caseSensitive?: boolean;
|
|
783
|
+
includeOverflow?: boolean;
|
|
784
|
+
returnObservation?: ReturnObservation;
|
|
785
|
+
} | {
|
|
786
|
+
action: 'virtual_desktop';
|
|
787
|
+
direction: VirtualDesktopDirection;
|
|
788
|
+
returnObservation?: ReturnObservation;
|
|
789
|
+
} | {
|
|
790
|
+
action: 'drag_file';
|
|
791
|
+
filePath: string;
|
|
792
|
+
toX: number;
|
|
793
|
+
toY: number;
|
|
794
|
+
fromX?: number;
|
|
795
|
+
fromY?: number;
|
|
796
|
+
button?: 'left' | 'right';
|
|
797
|
+
path?: Array<{
|
|
798
|
+
x: number;
|
|
799
|
+
y: number;
|
|
800
|
+
atMs?: number;
|
|
801
|
+
}>;
|
|
802
|
+
durationMs?: number;
|
|
803
|
+
returnObservation?: ReturnObservation;
|
|
804
|
+
});
|
|
805
|
+
export type WaitForCondition = {
|
|
806
|
+
type: 'text';
|
|
807
|
+
value: string;
|
|
808
|
+
caseSensitive?: boolean;
|
|
809
|
+
} | {
|
|
810
|
+
type: 'window';
|
|
811
|
+
title?: string;
|
|
812
|
+
processName?: string;
|
|
813
|
+
appeared?: boolean;
|
|
814
|
+
} | {
|
|
815
|
+
type: 'idle';
|
|
816
|
+
ms: number;
|
|
817
|
+
} | {
|
|
818
|
+
type: 'pixelColor';
|
|
819
|
+
x: number;
|
|
820
|
+
y: number;
|
|
821
|
+
expected: string;
|
|
822
|
+
tolerance?: number;
|
|
823
|
+
};
|
|
824
|
+
export type AssertCondition = {
|
|
825
|
+
type: 'textVisible';
|
|
826
|
+
value: string;
|
|
827
|
+
caseSensitive?: boolean;
|
|
828
|
+
} | {
|
|
829
|
+
type: 'windowExists';
|
|
830
|
+
title?: string;
|
|
831
|
+
processName?: string;
|
|
832
|
+
} | {
|
|
833
|
+
type: 'pixelColor';
|
|
834
|
+
x: number;
|
|
835
|
+
y: number;
|
|
836
|
+
expected: string;
|
|
837
|
+
tolerance?: number;
|
|
838
|
+
} | {
|
|
839
|
+
type: 'ok';
|
|
840
|
+
ofStep: string;
|
|
841
|
+
};
|
|
842
|
+
export interface SequenceTargetSpec {
|
|
843
|
+
name: string;
|
|
844
|
+
window?: string;
|
|
845
|
+
processName?: string;
|
|
846
|
+
/** Opaque WindowHandle (0.4). `hwnd` kept as Windows-only back-compat alias. */
|
|
847
|
+
handle?: WindowHandle;
|
|
848
|
+
hwnd?: string;
|
|
849
|
+
}
|
|
850
|
+
export interface SequenceArgs {
|
|
851
|
+
steps: SequenceStep[];
|
|
852
|
+
targets?: SequenceTargetSpec[];
|
|
853
|
+
defaultTarget?: string;
|
|
854
|
+
window?: string;
|
|
855
|
+
processName?: string;
|
|
856
|
+
hwnd?: string;
|
|
857
|
+
restoreFocus?: boolean;
|
|
858
|
+
confirm?: boolean;
|
|
859
|
+
stopOnError?: boolean;
|
|
860
|
+
caller?: string;
|
|
861
|
+
returnObservationAtEnd?: ReturnObservation;
|
|
862
|
+
checkpointMode?: Exclude<ReturnObservation, 'none'>;
|
|
863
|
+
dryRun?: boolean;
|
|
864
|
+
groupName?: string;
|
|
865
|
+
maxDurationMs?: number;
|
|
866
|
+
stopOnForegroundChange?: boolean;
|
|
867
|
+
}
|
|
868
|
+
export interface DryRunSummary {
|
|
869
|
+
stepCount: number;
|
|
870
|
+
actionHistogram: Record<string, number>;
|
|
871
|
+
targets: Array<{
|
|
872
|
+
name: string;
|
|
873
|
+
resolved: boolean;
|
|
874
|
+
handle?: WindowHandle;
|
|
875
|
+
processName?: string;
|
|
876
|
+
title?: string;
|
|
877
|
+
}>;
|
|
878
|
+
destructiveSteps: Array<{
|
|
879
|
+
index: number;
|
|
880
|
+
reason: string;
|
|
881
|
+
}>;
|
|
882
|
+
locatePlan: Array<{
|
|
883
|
+
index: number;
|
|
884
|
+
spec: LocateSpec;
|
|
885
|
+
rung: 'automationId' | 'role+name' | 'label' | 'imageTemplate' | 'pixelColor' | 'relative';
|
|
886
|
+
hint: 'cache' | 'ax' | 'ocr' | 'image' | 'deferred';
|
|
887
|
+
}>;
|
|
888
|
+
estimatedDurationMs: number;
|
|
889
|
+
warnings: string[];
|
|
890
|
+
sessionState?: {
|
|
891
|
+
locked: boolean;
|
|
892
|
+
rdpDisconnected: boolean;
|
|
893
|
+
secureDesktopActive: boolean;
|
|
894
|
+
};
|
|
895
|
+
tccState?: {
|
|
896
|
+
accessibilityGranted: boolean;
|
|
897
|
+
screenRecordingGranted: boolean;
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
export interface StepResult {
|
|
901
|
+
step: number;
|
|
902
|
+
action: SequenceStep['action'];
|
|
903
|
+
ok: boolean;
|
|
904
|
+
error?: string;
|
|
905
|
+
errorCode?: AutomationErrorCode;
|
|
906
|
+
imageBase64?: string;
|
|
907
|
+
width?: number;
|
|
908
|
+
height?: number;
|
|
909
|
+
durationMs: number;
|
|
910
|
+
observation?: Observation;
|
|
911
|
+
resolvedLocate?: {
|
|
912
|
+
x: number;
|
|
913
|
+
y: number;
|
|
914
|
+
rung: string;
|
|
915
|
+
bbox?: {
|
|
916
|
+
x: number;
|
|
917
|
+
y: number;
|
|
918
|
+
width: number;
|
|
919
|
+
height: number;
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
name?: string;
|
|
923
|
+
}
|
|
924
|
+
export interface SequenceResult extends AutomationResult {
|
|
925
|
+
results: StepResult[];
|
|
926
|
+
focus?: FocusContext;
|
|
927
|
+
restoreFocus?: {
|
|
928
|
+
initial?: string;
|
|
929
|
+
final?: string;
|
|
930
|
+
restored?: boolean;
|
|
931
|
+
};
|
|
932
|
+
matchedWindow?: {
|
|
933
|
+
title: string;
|
|
934
|
+
processName?: string;
|
|
935
|
+
hwnd?: string;
|
|
936
|
+
score: number;
|
|
937
|
+
scoreReason: string;
|
|
938
|
+
};
|
|
939
|
+
alternatives?: Array<{
|
|
940
|
+
title: string;
|
|
941
|
+
processName?: string;
|
|
942
|
+
hwnd?: string;
|
|
943
|
+
score: number;
|
|
944
|
+
scoreReason: string;
|
|
945
|
+
}>;
|
|
946
|
+
timings?: {
|
|
947
|
+
totalMs: number;
|
|
948
|
+
perStep: Array<{
|
|
949
|
+
action: string;
|
|
950
|
+
durationMs: number;
|
|
951
|
+
}>;
|
|
952
|
+
};
|
|
953
|
+
stoppedAt?: number;
|
|
954
|
+
/** Sequence-level end-of-run observation — set when `returnObservationAtEnd` was in args. */
|
|
955
|
+
observationAtEnd?: Observation;
|
|
956
|
+
/** Populated only on dryRun:true runs — see DryRunSummary. */
|
|
957
|
+
dryRun?: DryRunSummary;
|
|
958
|
+
}
|
|
959
|
+
/** Called by whatever input path detects the abort chord. Idempotent. */
|
|
960
|
+
export declare function signalSequenceAbort(reason?: string): void;
|
|
961
|
+
export interface WaitForArgs {
|
|
962
|
+
condition: WaitForCondition;
|
|
963
|
+
timeoutMs: number;
|
|
964
|
+
intervalMs?: number;
|
|
965
|
+
caller?: string;
|
|
966
|
+
}
|
|
967
|
+
export interface WaitForResult extends AutomationResult {
|
|
968
|
+
matchedAtMs?: number;
|
|
969
|
+
}
|
|
970
|
+
export declare function runWaitFor(args: WaitForArgs): Promise<WaitForResult>;
|
|
971
|
+
export declare function runSequence(args: SequenceArgs): Promise<SequenceResult>;
|
|
972
|
+
export interface LocateArgs {
|
|
973
|
+
label: string;
|
|
974
|
+
caseSensitive?: boolean;
|
|
975
|
+
caller?: string;
|
|
976
|
+
}
|
|
977
|
+
export interface LocateMatch {
|
|
978
|
+
text: string;
|
|
979
|
+
bbox: {
|
|
980
|
+
x: number;
|
|
981
|
+
y: number;
|
|
982
|
+
width: number;
|
|
983
|
+
height: number;
|
|
984
|
+
};
|
|
985
|
+
center: {
|
|
986
|
+
x: number;
|
|
987
|
+
y: number;
|
|
988
|
+
};
|
|
989
|
+
confidence: number;
|
|
990
|
+
}
|
|
991
|
+
export interface LocateResult extends AutomationResult {
|
|
992
|
+
matches?: LocateMatch[];
|
|
993
|
+
bestMatch?: LocateMatch;
|
|
994
|
+
}
|
|
995
|
+
export declare function locate(args: LocateArgs): Promise<LocateResult>;
|
|
996
|
+
export interface UiDumpArgs {
|
|
997
|
+
window?: string;
|
|
998
|
+
processName?: string;
|
|
999
|
+
hwnd?: string;
|
|
1000
|
+
background?: boolean;
|
|
1001
|
+
includeScreenshot?: boolean;
|
|
1002
|
+
includeOcr?: boolean;
|
|
1003
|
+
includeAxTree?: boolean;
|
|
1004
|
+
ocrScaleFactor?: number;
|
|
1005
|
+
ocrMinConfidence?: number;
|
|
1006
|
+
caller?: string;
|
|
1007
|
+
}
|
|
1008
|
+
export interface UiTextElement {
|
|
1009
|
+
text: string;
|
|
1010
|
+
bbox: {
|
|
1011
|
+
x: number;
|
|
1012
|
+
y: number;
|
|
1013
|
+
width: number;
|
|
1014
|
+
height: number;
|
|
1015
|
+
};
|
|
1016
|
+
center: {
|
|
1017
|
+
x: number;
|
|
1018
|
+
y: number;
|
|
1019
|
+
};
|
|
1020
|
+
confidence: number;
|
|
1021
|
+
source: 'ocr_word' | 'ocr_line' | 'ax_tree';
|
|
1022
|
+
role?: string;
|
|
1023
|
+
}
|
|
1024
|
+
export interface UiDumpResult extends AutomationResult {
|
|
1025
|
+
screenshot?: {
|
|
1026
|
+
width: number;
|
|
1027
|
+
height: number;
|
|
1028
|
+
mimeType: string;
|
|
1029
|
+
imageBase64?: string;
|
|
1030
|
+
};
|
|
1031
|
+
window?: {
|
|
1032
|
+
title?: string;
|
|
1033
|
+
processName?: string;
|
|
1034
|
+
hwnd?: string;
|
|
1035
|
+
score?: number;
|
|
1036
|
+
scoreReason?: string;
|
|
1037
|
+
};
|
|
1038
|
+
textElements?: UiTextElement[];
|
|
1039
|
+
axTree?: {
|
|
1040
|
+
available: boolean;
|
|
1041
|
+
error?: string;
|
|
1042
|
+
nodeCount?: number;
|
|
1043
|
+
root?: unknown;
|
|
1044
|
+
};
|
|
1045
|
+
timings?: {
|
|
1046
|
+
totalMs: number;
|
|
1047
|
+
resolveMs?: number;
|
|
1048
|
+
captureMs?: number;
|
|
1049
|
+
ocrMs?: number;
|
|
1050
|
+
axMs?: number;
|
|
1051
|
+
};
|
|
1052
|
+
backgroundMode?: boolean;
|
|
1053
|
+
capturePathUsed?: 'background' | 'activate' | 'fullscreen';
|
|
1054
|
+
dpiScale?: number;
|
|
1055
|
+
diagnostic?: {
|
|
1056
|
+
ocrElementCount?: number;
|
|
1057
|
+
ocrZeroReason?: string;
|
|
1058
|
+
savedFramePath?: string;
|
|
1059
|
+
reencodeRetried?: boolean;
|
|
1060
|
+
preprocessRetried?: boolean;
|
|
1061
|
+
foregroundFallbackRetried?: boolean;
|
|
1062
|
+
bufferBytes?: number;
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
export declare function runUiDump(args: UiDumpArgs): Promise<UiDumpResult>;
|
|
1066
|
+
export interface ScrollToArgs {
|
|
1067
|
+
targetText: string;
|
|
1068
|
+
direction?: 'down' | 'up';
|
|
1069
|
+
maxPages?: number;
|
|
1070
|
+
matchMode?: 'exact' | 'substring';
|
|
1071
|
+
caseSensitive?: boolean;
|
|
1072
|
+
confirm?: boolean;
|
|
1073
|
+
caller?: string;
|
|
1074
|
+
window?: string;
|
|
1075
|
+
processName?: string;
|
|
1076
|
+
hwnd?: string;
|
|
1077
|
+
restoreFocus?: boolean;
|
|
1078
|
+
returnObservation?: ReturnObservation;
|
|
1079
|
+
ocrScaleFactor?: number;
|
|
1080
|
+
}
|
|
1081
|
+
export interface ScrollToResult extends AutomationResult {
|
|
1082
|
+
found: boolean;
|
|
1083
|
+
pagesScrolled: number;
|
|
1084
|
+
atEnd?: boolean;
|
|
1085
|
+
match?: UiTextElement;
|
|
1086
|
+
matches?: UiTextElement[];
|
|
1087
|
+
}
|
|
1088
|
+
export declare function runScrollTo(args: ScrollToArgs): Promise<ScrollToResult>;
|
|
1089
|
+
export interface ScrollCaptureArgs {
|
|
1090
|
+
anchorX: number;
|
|
1091
|
+
anchorY: number;
|
|
1092
|
+
window?: string;
|
|
1093
|
+
processName?: string;
|
|
1094
|
+
hwnd?: string;
|
|
1095
|
+
direction?: 'down' | 'up';
|
|
1096
|
+
maxPages?: number;
|
|
1097
|
+
confirm?: boolean;
|
|
1098
|
+
caller?: string;
|
|
1099
|
+
restoreFocus?: boolean;
|
|
1100
|
+
recalibrate?: boolean;
|
|
1101
|
+
stopOnAtEnd?: boolean;
|
|
1102
|
+
settleMs?: number;
|
|
1103
|
+
}
|
|
1104
|
+
export interface ScrollCaptureFrame {
|
|
1105
|
+
page: number;
|
|
1106
|
+
imageBase64: string;
|
|
1107
|
+
width: number;
|
|
1108
|
+
height: number;
|
|
1109
|
+
fullResWidth?: number;
|
|
1110
|
+
fullResHeight?: number;
|
|
1111
|
+
savedPath?: string;
|
|
1112
|
+
scrolledPx?: number;
|
|
1113
|
+
timestampMs: number;
|
|
1114
|
+
}
|
|
1115
|
+
export interface ScrollCaptureResult extends AutomationResult {
|
|
1116
|
+
framesCaptured: number;
|
|
1117
|
+
pagesScrolled: number;
|
|
1118
|
+
atEnd: boolean;
|
|
1119
|
+
atEndReason?: 'no_movement' | 'max_pages' | 'error';
|
|
1120
|
+
frames?: ScrollCaptureFrame[];
|
|
1121
|
+
sessionDir?: string;
|
|
1122
|
+
calibrationFramesPath?: {
|
|
1123
|
+
pre: string;
|
|
1124
|
+
post: string;
|
|
1125
|
+
};
|
|
1126
|
+
calibration?: {
|
|
1127
|
+
pixelsPerScroll: number;
|
|
1128
|
+
score: number;
|
|
1129
|
+
windowHeight: number;
|
|
1130
|
+
ticksPerPage: number;
|
|
1131
|
+
cacheHit: boolean;
|
|
1132
|
+
measured: boolean;
|
|
1133
|
+
lowConfidence?: boolean;
|
|
1134
|
+
stripPicked?: 'left' | 'center' | 'right';
|
|
1135
|
+
} | {
|
|
1136
|
+
error: string;
|
|
1137
|
+
};
|
|
1138
|
+
dpiScale?: number;
|
|
1139
|
+
}
|
|
1140
|
+
export declare function runScrollCapture(args: ScrollCaptureArgs): Promise<ScrollCaptureResult>;
|
|
1141
|
+
export declare function getCapabilityManifest(): Record<string, unknown>;
|
|
1142
|
+
export {};
|
|
1143
|
+
//# sourceMappingURL=gui-automation.d.ts.map
|