@moxxy/plugin-computer-control 0.41.2 → 0.42.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.
Files changed (269) hide show
  1. package/bin/win32-x64/moxxy-computer.exe +0 -0
  2. package/bin/win32-x64/moxxy-computer.exe.json +1 -1
  3. package/dist/backend/access.d.ts +129 -0
  4. package/dist/backend/access.d.ts.map +1 -0
  5. package/dist/backend/access.js +158 -0
  6. package/dist/backend/access.js.map +1 -0
  7. package/dist/backend/app-hints.d.ts +14 -0
  8. package/dist/backend/app-hints.d.ts.map +1 -0
  9. package/dist/backend/app-hints.js +30 -0
  10. package/dist/backend/app-hints.js.map +1 -0
  11. package/dist/backend/backend.d.ts +70 -0
  12. package/dist/backend/backend.d.ts.map +1 -0
  13. package/dist/backend/backend.js +466 -0
  14. package/dist/backend/backend.js.map +1 -0
  15. package/dist/backend/rpc.d.ts +1438 -0
  16. package/dist/backend/rpc.d.ts.map +1 -0
  17. package/dist/backend/rpc.js +75 -0
  18. package/dist/backend/rpc.js.map +1 -0
  19. package/dist/backend/turn-controls.d.ts +20 -0
  20. package/dist/backend/turn-controls.d.ts.map +1 -0
  21. package/dist/backend/turn-controls.js +115 -0
  22. package/dist/backend/turn-controls.js.map +1 -0
  23. package/dist/contract/guidance.d.ts +12 -0
  24. package/dist/contract/guidance.d.ts.map +1 -0
  25. package/dist/contract/guidance.js +42 -0
  26. package/dist/contract/guidance.js.map +1 -0
  27. package/dist/contract/image.d.ts +29 -0
  28. package/dist/contract/image.d.ts.map +1 -0
  29. package/dist/contract/image.js +46 -0
  30. package/dist/contract/image.js.map +1 -0
  31. package/dist/contract/keys.d.ts +15 -0
  32. package/dist/contract/keys.d.ts.map +1 -0
  33. package/dist/contract/keys.js +118 -0
  34. package/dist/contract/keys.js.map +1 -0
  35. package/dist/contract/outcome.d.ts +61 -0
  36. package/dist/contract/outcome.d.ts.map +1 -0
  37. package/dist/contract/outcome.js +63 -0
  38. package/dist/contract/outcome.js.map +1 -0
  39. package/dist/contract/progress.d.ts +27 -0
  40. package/dist/contract/progress.d.ts.map +1 -0
  41. package/dist/contract/progress.js +36 -0
  42. package/dist/contract/progress.js.map +1 -0
  43. package/dist/contract/tools.d.ts +338 -0
  44. package/dist/contract/tools.d.ts.map +1 -0
  45. package/dist/contract/tools.js +195 -0
  46. package/dist/contract/tools.js.map +1 -0
  47. package/dist/contract/untrusted.d.ts +3 -0
  48. package/dist/contract/untrusted.d.ts.map +1 -0
  49. package/dist/contract/untrusted.js +8 -0
  50. package/dist/contract/untrusted.js.map +1 -0
  51. package/dist/helper/artifact.d.ts +41 -0
  52. package/dist/helper/artifact.d.ts.map +1 -0
  53. package/dist/helper/artifact.js +189 -0
  54. package/dist/helper/artifact.js.map +1 -0
  55. package/dist/helper/protocol.d.ts +80 -0
  56. package/dist/helper/protocol.d.ts.map +1 -0
  57. package/dist/helper/protocol.js +49 -0
  58. package/dist/helper/protocol.js.map +1 -0
  59. package/dist/helper/transport.d.ts +43 -0
  60. package/dist/helper/transport.d.ts.map +1 -0
  61. package/dist/{windows → helper}/transport.js +45 -19
  62. package/dist/helper/transport.js.map +1 -0
  63. package/dist/index.d.ts +9 -22
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +35 -42
  66. package/dist/index.js.map +1 -1
  67. package/dist/jev/ladder.d.ts +32 -0
  68. package/dist/jev/ladder.d.ts.map +1 -0
  69. package/dist/jev/ladder.js +66 -0
  70. package/dist/jev/ladder.js.map +1 -0
  71. package/dist/jev/memory.d.ts +11 -0
  72. package/dist/jev/memory.d.ts.map +1 -0
  73. package/dist/jev/memory.js +16 -0
  74. package/dist/jev/memory.js.map +1 -0
  75. package/dist/jev/run.d.ts +93 -0
  76. package/dist/jev/run.d.ts.map +1 -0
  77. package/dist/jev/run.js +403 -0
  78. package/dist/jev/run.js.map +1 -0
  79. package/dist/jev/train.d.ts +97 -0
  80. package/dist/jev/train.d.ts.map +1 -0
  81. package/dist/jev/train.js +28 -0
  82. package/dist/jev/train.js.map +1 -0
  83. package/dist/linux/profile.d.ts +6 -0
  84. package/dist/linux/profile.d.ts.map +1 -0
  85. package/dist/linux/profile.js +21 -0
  86. package/dist/linux/profile.js.map +1 -0
  87. package/dist/macos/profile.d.ts +5 -0
  88. package/dist/macos/profile.d.ts.map +1 -0
  89. package/dist/macos/profile.js +17 -0
  90. package/dist/macos/profile.js.map +1 -0
  91. package/dist/preview/controller.d.ts +127 -0
  92. package/dist/preview/controller.d.ts.map +1 -0
  93. package/dist/preview/controller.js +203 -0
  94. package/dist/preview/controller.js.map +1 -0
  95. package/dist/preview/surface.d.ts +9 -0
  96. package/dist/preview/surface.d.ts.map +1 -0
  97. package/dist/preview/surface.js +50 -0
  98. package/dist/preview/surface.js.map +1 -0
  99. package/dist/windows/maintenance.d.ts +1 -1
  100. package/dist/windows/maintenance.d.ts.map +1 -1
  101. package/dist/windows/maintenance.js +6 -5
  102. package/dist/windows/maintenance.js.map +1 -1
  103. package/dist/windows/profile.d.ts +5 -0
  104. package/dist/windows/profile.d.ts.map +1 -0
  105. package/dist/windows/profile.js +17 -0
  106. package/dist/windows/profile.js.map +1 -0
  107. package/learned/README.md +26 -0
  108. package/learned/cases/com.apple.calculator.json +395 -0
  109. package/learned/cases/com.apple.finder.json +115 -0
  110. package/learned/cases/com.apple.safari.json +112 -0
  111. package/learned/cases/com.apple.systempreferences.json +255 -0
  112. package/learned/com.apple.calculator-eace95fc.json +334 -0
  113. package/learned/com.apple.finder-27cf6ce8.json +260 -0
  114. package/learned/com.apple.safari-7cd9df4f.json +143 -0
  115. package/learned/com.apple.systempreferences-02cf0b8b.json +535 -0
  116. package/package.json +13 -7
  117. package/scripts/promote-learned.mjs +8 -0
  118. package/scripts/summarize-trial.mjs +68 -0
  119. package/scripts/train-learned.mjs +64 -0
  120. package/skills/computer-apps/blender.md +29 -0
  121. package/skills/computer-apps/browsers.md +50 -0
  122. package/skills/computer-apps/design-tools.md +37 -0
  123. package/skills/computer-apps/finder.md +23 -0
  124. package/skills/computer-apps/office.md +46 -0
  125. package/skills/computer-apps/video-editors.md +44 -0
  126. package/skills/computer-control.md +154 -191
  127. package/src/backend/access.test.ts +158 -0
  128. package/src/backend/access.ts +168 -0
  129. package/src/backend/app-hints.test.ts +59 -0
  130. package/src/backend/app-hints.ts +39 -0
  131. package/src/backend/backend.test.ts +725 -0
  132. package/src/backend/backend.ts +482 -0
  133. package/src/backend/contract-helper.fixture.mjs +138 -0
  134. package/src/backend/helper.fixture.ts +38 -0
  135. package/src/backend/rpc.ts +90 -0
  136. package/src/backend/turn-controls.test.ts +178 -0
  137. package/src/backend/turn-controls.ts +120 -0
  138. package/src/contract/guidance.test.ts +75 -0
  139. package/src/contract/guidance.ts +48 -0
  140. package/src/contract/image.test.ts +74 -0
  141. package/src/contract/image.ts +54 -0
  142. package/src/contract/keys.test.ts +103 -0
  143. package/src/contract/keys.ts +117 -0
  144. package/src/contract/outcome.test.ts +71 -0
  145. package/src/contract/outcome.ts +72 -0
  146. package/src/contract/progress.test.ts +56 -0
  147. package/src/contract/progress.ts +43 -0
  148. package/src/contract/tools.test.ts +210 -0
  149. package/src/contract/tools.ts +212 -0
  150. package/src/contract/untrusted.test.ts +20 -0
  151. package/src/contract/untrusted.ts +8 -0
  152. package/src/helper/artifact.test.ts +131 -0
  153. package/src/helper/artifact.ts +182 -0
  154. package/src/helper/protocol.test.ts +29 -0
  155. package/src/helper/protocol.ts +50 -0
  156. package/src/{windows → helper}/transport.test.ts +76 -19
  157. package/src/{windows → helper}/transport.ts +54 -16
  158. package/src/index.test.ts +112 -0
  159. package/src/index.ts +36 -53
  160. package/src/jev/ladder.test.ts +113 -0
  161. package/src/jev/ladder.ts +88 -0
  162. package/src/jev/memory.ts +20 -0
  163. package/src/jev/run.test.ts +700 -0
  164. package/src/jev/run.ts +443 -0
  165. package/src/jev/train.test.ts +40 -0
  166. package/src/jev/train.ts +41 -0
  167. package/src/linux/helper.test.ts +481 -0
  168. package/src/linux/profile.ts +25 -0
  169. package/src/macos/helper.test.ts +988 -0
  170. package/src/macos/profile.ts +19 -0
  171. package/src/preview/controller.test.ts +308 -0
  172. package/src/preview/controller.ts +262 -0
  173. package/src/preview/surface.test.ts +68 -0
  174. package/src/preview/surface.ts +45 -0
  175. package/src/skill.test.ts +34 -0
  176. package/src/windows/maintenance.ts +8 -7
  177. package/src/windows/profile.ts +19 -0
  178. package/dist/shell.d.ts +0 -56
  179. package/dist/shell.d.ts.map +0 -1
  180. package/dist/shell.js +0 -189
  181. package/dist/shell.js.map +0 -1
  182. package/dist/temporary-files.d.ts +0 -2
  183. package/dist/temporary-files.d.ts.map +0 -1
  184. package/dist/temporary-files.js +0 -10
  185. package/dist/temporary-files.js.map +0 -1
  186. package/dist/tools/applescript.d.ts +0 -2
  187. package/dist/tools/applescript.d.ts.map +0 -1
  188. package/dist/tools/applescript.js +0 -50
  189. package/dist/tools/applescript.js.map +0 -1
  190. package/dist/tools/click.d.ts +0 -2
  191. package/dist/tools/click.d.ts.map +0 -1
  192. package/dist/tools/click.js +0 -58
  193. package/dist/tools/click.js.map +0 -1
  194. package/dist/tools/clipboard.d.ts +0 -2
  195. package/dist/tools/clipboard.d.ts.map +0 -1
  196. package/dist/tools/clipboard.js +0 -71
  197. package/dist/tools/clipboard.js.map +0 -1
  198. package/dist/tools/key.d.ts +0 -11
  199. package/dist/tools/key.d.ts.map +0 -1
  200. package/dist/tools/key.js +0 -143
  201. package/dist/tools/key.js.map +0 -1
  202. package/dist/tools/open.d.ts +0 -2
  203. package/dist/tools/open.d.ts.map +0 -1
  204. package/dist/tools/open.js +0 -91
  205. package/dist/tools/open.js.map +0 -1
  206. package/dist/tools/screenshot.d.ts +0 -2
  207. package/dist/tools/screenshot.d.ts.map +0 -1
  208. package/dist/tools/screenshot.js +0 -162
  209. package/dist/tools/screenshot.js.map +0 -1
  210. package/dist/tools/type.d.ts +0 -8
  211. package/dist/tools/type.d.ts.map +0 -1
  212. package/dist/tools/type.js +0 -65
  213. package/dist/tools/type.js.map +0 -1
  214. package/dist/windows/artifact.d.ts +0 -3
  215. package/dist/windows/artifact.d.ts.map +0 -1
  216. package/dist/windows/artifact.js +0 -57
  217. package/dist/windows/artifact.js.map +0 -1
  218. package/dist/windows/backend.d.ts +0 -11
  219. package/dist/windows/backend.d.ts.map +0 -1
  220. package/dist/windows/backend.js +0 -122
  221. package/dist/windows/backend.js.map +0 -1
  222. package/dist/windows/contracts.d.ts +0 -1627
  223. package/dist/windows/contracts.d.ts.map +0 -1
  224. package/dist/windows/contracts.js +0 -137
  225. package/dist/windows/contracts.js.map +0 -1
  226. package/dist/windows/control-service.d.ts +0 -12
  227. package/dist/windows/control-service.d.ts.map +0 -1
  228. package/dist/windows/control-service.js +0 -65
  229. package/dist/windows/control-service.js.map +0 -1
  230. package/dist/windows/guidance.d.ts +0 -3
  231. package/dist/windows/guidance.d.ts.map +0 -1
  232. package/dist/windows/guidance.js +0 -20
  233. package/dist/windows/guidance.js.map +0 -1
  234. package/dist/windows/protocol.d.ts +0 -9
  235. package/dist/windows/protocol.d.ts.map +0 -1
  236. package/dist/windows/protocol.js +0 -32
  237. package/dist/windows/protocol.js.map +0 -1
  238. package/dist/windows/transport.d.ts +0 -23
  239. package/dist/windows/transport.d.ts.map +0 -1
  240. package/dist/windows/transport.js.map +0 -1
  241. package/src/shell.test.ts +0 -186
  242. package/src/shell.ts +0 -213
  243. package/src/temporary-files.test.ts +0 -18
  244. package/src/temporary-files.ts +0 -9
  245. package/src/tools/applescript-serialize.test.ts +0 -74
  246. package/src/tools/applescript.ts +0 -53
  247. package/src/tools/click.ts +0 -60
  248. package/src/tools/clipboard.ts +0 -72
  249. package/src/tools/key.ts +0 -155
  250. package/src/tools/open.ts +0 -96
  251. package/src/tools/screenshot.test.ts +0 -137
  252. package/src/tools/screenshot.ts +0 -180
  253. package/src/tools/type.ts +0 -68
  254. package/src/tools.test.ts +0 -94
  255. package/src/windows/action-contracts.test.ts +0 -13
  256. package/src/windows/artifact.test.ts +0 -16
  257. package/src/windows/artifact.ts +0 -57
  258. package/src/windows/backend.test.ts +0 -41
  259. package/src/windows/backend.ts +0 -122
  260. package/src/windows/contracts.test.ts +0 -81
  261. package/src/windows/contracts.ts +0 -143
  262. package/src/windows/control-service.test.ts +0 -58
  263. package/src/windows/control-service.ts +0 -68
  264. package/src/windows/guidance.test.ts +0 -29
  265. package/src/windows/guidance.ts +0 -21
  266. package/src/windows/model-contract.test.ts +0 -37
  267. package/src/windows/protocol.ts +0 -27
  268. package/src/windows/text-contracts.test.ts +0 -14
  269. package/src/windows/window-typing.test.ts +0 -14
@@ -1,1627 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const PROTOCOL_VERSION = 4;
3
- export declare const MAX_FRAME_BYTES = 3000000;
4
- export declare const idSchema: z.ZodString;
5
- export declare const controlStateSchema: z.ZodObject<{
6
- version: z.ZodLiteral<4>;
7
- event: z.ZodLiteral<"control_state">;
8
- id: z.ZodString;
9
- state: z.ZodEnum<["idle", "background", "foreground", "waiting_for_focus", "paused_by_user", "recovering", "stopped", "failed"]>;
10
- }, "strict", z.ZodTypeAny, {
11
- version: 4;
12
- event: "control_state";
13
- id: string;
14
- state: "idle" | "background" | "foreground" | "waiting_for_focus" | "paused_by_user" | "recovering" | "stopped" | "failed";
15
- }, {
16
- version: 4;
17
- event: "control_state";
18
- id: string;
19
- state: "idle" | "background" | "foreground" | "waiting_for_focus" | "paused_by_user" | "recovering" | "stopped" | "failed";
20
- }>;
21
- export type ControlState = z.infer<typeof controlStateSchema>;
22
- export declare const controlCommandSchema: z.ZodEnum<["pause", "resume", "stop"]>;
23
- export declare const observationRequiredSchema: z.ZodObject<{
24
- status: z.ZodLiteral<"needs_observation">;
25
- delivered: z.ZodLiteral<false>;
26
- effect: z.ZodEnum<["none", "possible"]>;
27
- verificationRequired: z.ZodLiteral<true>;
28
- }, "strict", z.ZodTypeAny, {
29
- status: "needs_observation";
30
- delivered: false;
31
- effect: "none" | "possible";
32
- verificationRequired: true;
33
- }, {
34
- status: "needs_observation";
35
- delivered: false;
36
- effect: "none" | "possible";
37
- verificationRequired: true;
38
- }>;
39
- export declare const targetBlockedSchema: z.ZodObject<{
40
- status: z.ZodLiteral<"target_blocked">;
41
- windowId: z.ZodString;
42
- blockingWindowId: z.ZodString;
43
- delivered: z.ZodLiteral<false>;
44
- effect: z.ZodLiteral<"none">;
45
- verificationRequired: z.ZodLiteral<true>;
46
- }, "strict", z.ZodTypeAny, {
47
- status: "target_blocked";
48
- delivered: false;
49
- effect: "none";
50
- verificationRequired: true;
51
- windowId: string;
52
- blockingWindowId: string;
53
- }, {
54
- status: "target_blocked";
55
- delivered: false;
56
- effect: "none";
57
- verificationRequired: true;
58
- windowId: string;
59
- blockingWindowId: string;
60
- }>;
61
- export declare const rectangleSchema: z.ZodObject<{
62
- x: z.ZodNumber;
63
- y: z.ZodNumber;
64
- width: z.ZodNumber;
65
- height: z.ZodNumber;
66
- }, "strict", z.ZodTypeAny, {
67
- x: number;
68
- y: number;
69
- width: number;
70
- height: number;
71
- }, {
72
- x: number;
73
- y: number;
74
- width: number;
75
- height: number;
76
- }>;
77
- export declare const pointSchema: z.ZodObject<{
78
- x: z.ZodNumber;
79
- y: z.ZodNumber;
80
- }, "strict", z.ZodTypeAny, {
81
- x: number;
82
- y: number;
83
- }, {
84
- x: number;
85
- y: number;
86
- }>;
87
- export declare const targetSchema: z.ZodObject<{
88
- windowId: z.ZodString;
89
- }, "strict", z.ZodTypeAny, {
90
- windowId: string;
91
- }, {
92
- windowId: string;
93
- }>;
94
- export declare const appCatalogInputSchema: z.ZodObject<{
95
- query: z.ZodDefault<z.ZodString>;
96
- maxResults: z.ZodDefault<z.ZodNumber>;
97
- }, "strict", z.ZodTypeAny, {
98
- query: string;
99
- maxResults: number;
100
- }, {
101
- query?: string | undefined;
102
- maxResults?: number | undefined;
103
- }>;
104
- export declare const appCatalogSchema: z.ZodObject<{
105
- apps: z.ZodArray<z.ZodObject<{
106
- appId: z.ZodString;
107
- name: z.ZodString;
108
- source: z.ZodEnum<["system", "windows-shell"]>;
109
- }, "strict", z.ZodTypeAny, {
110
- appId: string;
111
- name: string;
112
- source: "system" | "windows-shell";
113
- }, {
114
- appId: string;
115
- name: string;
116
- source: "system" | "windows-shell";
117
- }>, "many">;
118
- truncated: z.ZodBoolean;
119
- unavailableSources: z.ZodArray<z.ZodLiteral<"windows-shell">, "many">;
120
- }, "strict", z.ZodTypeAny, {
121
- apps: {
122
- appId: string;
123
- name: string;
124
- source: "system" | "windows-shell";
125
- }[];
126
- truncated: boolean;
127
- unavailableSources: "windows-shell"[];
128
- }, {
129
- apps: {
130
- appId: string;
131
- name: string;
132
- source: "system" | "windows-shell";
133
- }[];
134
- truncated: boolean;
135
- unavailableSources: "windows-shell"[];
136
- }>;
137
- export declare const openSchema: z.ZodObject<{
138
- appId: z.ZodString;
139
- instance: z.ZodDefault<z.ZodEnum<["reuse", "new"]>>;
140
- timeoutMs: z.ZodDefault<z.ZodNumber>;
141
- }, "strict", z.ZodTypeAny, {
142
- appId: string;
143
- instance: "reuse" | "new";
144
- timeoutMs: number;
145
- }, {
146
- appId: string;
147
- instance?: "reuse" | "new" | undefined;
148
- timeoutMs?: number | undefined;
149
- }>;
150
- export declare const elementSchema: z.ZodObject<{
151
- windowId: z.ZodString;
152
- } & {
153
- observationId: z.ZodString;
154
- elementId: z.ZodString;
155
- }, "strict", z.ZodTypeAny, {
156
- windowId: string;
157
- observationId: string;
158
- elementId: string;
159
- }, {
160
- windowId: string;
161
- observationId: string;
162
- elementId: string;
163
- }>;
164
- export declare const clickSchema: z.ZodUnion<[z.ZodObject<{
165
- windowId: z.ZodString;
166
- } & {
167
- observationId: z.ZodString;
168
- elementId: z.ZodString;
169
- } & {
170
- button: z.ZodDefault<z.ZodEnum<["left", "right", "middle"]>>;
171
- count: z.ZodDefault<z.ZodNumber>;
172
- }, "strict", z.ZodTypeAny, {
173
- windowId: string;
174
- observationId: string;
175
- elementId: string;
176
- button: "left" | "right" | "middle";
177
- count: number;
178
- }, {
179
- windowId: string;
180
- observationId: string;
181
- elementId: string;
182
- button?: "left" | "right" | "middle" | undefined;
183
- count?: number | undefined;
184
- }>, z.ZodObject<{
185
- windowId: z.ZodString;
186
- } & {
187
- button: z.ZodDefault<z.ZodEnum<["left", "right", "middle"]>>;
188
- count: z.ZodDefault<z.ZodNumber>;
189
- captureId: z.ZodString;
190
- x: z.ZodNumber;
191
- y: z.ZodNumber;
192
- }, "strict", z.ZodTypeAny, {
193
- windowId: string;
194
- x: number;
195
- y: number;
196
- button: "left" | "right" | "middle";
197
- count: number;
198
- captureId: string;
199
- }, {
200
- windowId: string;
201
- x: number;
202
- y: number;
203
- captureId: string;
204
- button?: "left" | "right" | "middle" | undefined;
205
- count?: number | undefined;
206
- }>]>;
207
- export declare const screenshotSchema: z.ZodObject<{
208
- windowId: z.ZodString;
209
- } & {
210
- region: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
211
- width: z.ZodNumber;
212
- height: z.ZodNumber;
213
- } & {
214
- x: z.ZodNumber;
215
- y: z.ZodNumber;
216
- }, "strict", z.ZodTypeAny, {
217
- x: number;
218
- y: number;
219
- width: number;
220
- height: number;
221
- }, {
222
- x: number;
223
- y: number;
224
- width: number;
225
- height: number;
226
- }>>>, {
227
- x: number;
228
- y: number;
229
- width: number;
230
- height: number;
231
- } | undefined, {
232
- x: number;
233
- y: number;
234
- width: number;
235
- height: number;
236
- } | null | undefined>;
237
- maxDim: z.ZodDefault<z.ZodNumber>;
238
- format: z.ZodDefault<z.ZodEnum<["png", "jpeg"]>>;
239
- quality: z.ZodDefault<z.ZodNumber>;
240
- allowVisibleFallback: z.ZodDefault<z.ZodBoolean>;
241
- }, "strict", z.ZodTypeAny, {
242
- windowId: string;
243
- maxDim: number;
244
- format: "png" | "jpeg";
245
- quality: number;
246
- allowVisibleFallback: boolean;
247
- region?: {
248
- x: number;
249
- y: number;
250
- width: number;
251
- height: number;
252
- } | undefined;
253
- }, {
254
- windowId: string;
255
- region?: {
256
- x: number;
257
- y: number;
258
- width: number;
259
- height: number;
260
- } | null | undefined;
261
- maxDim?: number | undefined;
262
- format?: "png" | "jpeg" | undefined;
263
- quality?: number | undefined;
264
- allowVisibleFallback?: boolean | undefined;
265
- }>;
266
- export declare const observeSchema: z.ZodObject<{
267
- windowId: z.ZodString;
268
- } & {
269
- maxNodes: z.ZodDefault<z.ZodNumber>;
270
- root: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
271
- observationId: z.ZodString;
272
- elementId: z.ZodString;
273
- }, "strict", z.ZodTypeAny, {
274
- observationId: string;
275
- elementId: string;
276
- }, {
277
- observationId: string;
278
- elementId: string;
279
- }>>>, {
280
- observationId: string;
281
- elementId: string;
282
- } | undefined, {
283
- observationId: string;
284
- elementId: string;
285
- } | null | undefined>;
286
- filter: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
287
- nameIncludes: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
288
- controlType: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
289
- }, "strict", z.ZodTypeAny, {
290
- nameIncludes?: string | undefined;
291
- controlType?: number | undefined;
292
- }, {
293
- nameIncludes?: string | null | undefined;
294
- controlType?: number | null | undefined;
295
- }>>>, {
296
- nameIncludes?: string | undefined;
297
- controlType?: number | undefined;
298
- } | undefined, {
299
- nameIncludes?: string | null | undefined;
300
- controlType?: number | null | undefined;
301
- } | null | undefined>;
302
- }, "strict", z.ZodTypeAny, {
303
- windowId: string;
304
- maxNodes: number;
305
- filter?: {
306
- nameIncludes?: string | undefined;
307
- controlType?: number | undefined;
308
- } | undefined;
309
- root?: {
310
- observationId: string;
311
- elementId: string;
312
- } | undefined;
313
- }, {
314
- windowId: string;
315
- filter?: {
316
- nameIncludes?: string | null | undefined;
317
- controlType?: number | null | undefined;
318
- } | null | undefined;
319
- maxNodes?: number | undefined;
320
- root?: {
321
- observationId: string;
322
- elementId: string;
323
- } | null | undefined;
324
- }>;
325
- export declare const typeSchema: z.ZodObject<{
326
- windowId: z.ZodString;
327
- } & {
328
- observationId: z.ZodString;
329
- elementId: z.ZodString;
330
- } & {
331
- text: z.ZodString;
332
- }, "strict", z.ZodTypeAny, {
333
- windowId: string;
334
- observationId: string;
335
- elementId: string;
336
- text: string;
337
- }, {
338
- windowId: string;
339
- observationId: string;
340
- elementId: string;
341
- text: string;
342
- }>;
343
- export declare const typeWindowSchema: z.ZodObject<{
344
- windowId: z.ZodString;
345
- } & {
346
- observationId: z.ZodString;
347
- text: z.ZodString;
348
- }, "strict", z.ZodTypeAny, {
349
- windowId: string;
350
- observationId: string;
351
- text: string;
352
- }, {
353
- windowId: string;
354
- observationId: string;
355
- text: string;
356
- }>;
357
- export declare const readTextSchema: z.ZodObject<{
358
- windowId: z.ZodString;
359
- } & {
360
- observationId: z.ZodString;
361
- elementId: z.ZodString;
362
- } & {
363
- maxChars: z.ZodDefault<z.ZodNumber>;
364
- }, "strict", z.ZodTypeAny, {
365
- windowId: string;
366
- observationId: string;
367
- elementId: string;
368
- maxChars: number;
369
- }, {
370
- windowId: string;
371
- observationId: string;
372
- elementId: string;
373
- maxChars?: number | undefined;
374
- }>;
375
- export declare const selectTextSchema: z.ZodObject<{
376
- windowId: z.ZodString;
377
- } & {
378
- observationId: z.ZodString;
379
- elementId: z.ZodString;
380
- } & {
381
- text: z.ZodString;
382
- occurrence: z.ZodDefault<z.ZodNumber>;
383
- }, "strict", z.ZodTypeAny, {
384
- windowId: string;
385
- observationId: string;
386
- elementId: string;
387
- text: string;
388
- occurrence: number;
389
- }, {
390
- windowId: string;
391
- observationId: string;
392
- elementId: string;
393
- text: string;
394
- occurrence?: number | undefined;
395
- }>;
396
- export declare const textResultSchema: z.ZodObject<{
397
- text: z.ZodString;
398
- selectedText: z.ZodArray<z.ZodString, "many">;
399
- truncated: z.ZodBoolean;
400
- }, "strict", z.ZodTypeAny, {
401
- truncated: boolean;
402
- text: string;
403
- selectedText: string[];
404
- }, {
405
- truncated: boolean;
406
- text: string;
407
- selectedText: string[];
408
- }>;
409
- export declare const actionSchema: z.ZodObject<{
410
- windowId: z.ZodString;
411
- } & {
412
- observationId: z.ZodString;
413
- elementId: z.ZodString;
414
- } & {
415
- action: z.ZodEnum<["invoke", "select", "add_to_selection", "remove_from_selection", "toggle", "expand", "collapse", "scroll_into_view"]>;
416
- }, "strict", z.ZodTypeAny, {
417
- windowId: string;
418
- observationId: string;
419
- elementId: string;
420
- action: "invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view";
421
- }, {
422
- windowId: string;
423
- observationId: string;
424
- elementId: string;
425
- action: "invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view";
426
- }>;
427
- export declare const actionStatusSchema: z.ZodObject<{
428
- actionId: z.ZodString;
429
- waitMs: z.ZodDefault<z.ZodNumber>;
430
- }, "strict", z.ZodTypeAny, {
431
- actionId: string;
432
- waitMs: number;
433
- }, {
434
- actionId: string;
435
- waitMs?: number | undefined;
436
- }>;
437
- export declare const actionResultSchema: z.ZodObject<{
438
- actionId: z.ZodString;
439
- status: z.ZodEnum<["pending", "completed", "failed"]>;
440
- verificationRequired: z.ZodLiteral<true>;
441
- }, "strict", z.ZodTypeAny, {
442
- status: "failed" | "pending" | "completed";
443
- verificationRequired: true;
444
- actionId: string;
445
- }, {
446
- status: "failed" | "pending" | "completed";
447
- verificationRequired: true;
448
- actionId: string;
449
- }>;
450
- export declare const keySchema: z.ZodObject<{
451
- windowId: z.ZodString;
452
- } & {
453
- observationId: z.ZodString;
454
- key: z.ZodString;
455
- modifiers: z.ZodDefault<z.ZodArray<z.ZodEnum<["windows", "control", "alt", "shift"]>, "many">>;
456
- }, "strict", z.ZodTypeAny, {
457
- windowId: string;
458
- observationId: string;
459
- key: string;
460
- modifiers: ("shift" | "windows" | "control" | "alt")[];
461
- }, {
462
- windowId: string;
463
- observationId: string;
464
- key: string;
465
- modifiers?: ("shift" | "windows" | "control" | "alt")[] | undefined;
466
- }>;
467
- export declare const scrollSchema: z.ZodObject<{
468
- windowId: z.ZodString;
469
- } & {
470
- captureId: z.ZodString;
471
- x: z.ZodNumber;
472
- y: z.ZodNumber;
473
- deltaX: z.ZodDefault<z.ZodNumber>;
474
- deltaY: z.ZodDefault<z.ZodNumber>;
475
- }, "strict", z.ZodTypeAny, {
476
- windowId: string;
477
- x: number;
478
- y: number;
479
- captureId: string;
480
- deltaX: number;
481
- deltaY: number;
482
- }, {
483
- windowId: string;
484
- x: number;
485
- y: number;
486
- captureId: string;
487
- deltaX?: number | undefined;
488
- deltaY?: number | undefined;
489
- }>;
490
- export declare const dragSchema: z.ZodObject<{
491
- windowId: z.ZodString;
492
- } & {
493
- captureId: z.ZodString;
494
- from: z.ZodObject<{
495
- x: z.ZodNumber;
496
- y: z.ZodNumber;
497
- }, "strict", z.ZodTypeAny, {
498
- x: number;
499
- y: number;
500
- }, {
501
- x: number;
502
- y: number;
503
- }>;
504
- to: z.ZodObject<{
505
- x: z.ZodNumber;
506
- y: z.ZodNumber;
507
- }, "strict", z.ZodTypeAny, {
508
- x: number;
509
- y: number;
510
- }, {
511
- x: number;
512
- y: number;
513
- }>;
514
- durationMs: z.ZodDefault<z.ZodNumber>;
515
- }, "strict", z.ZodTypeAny, {
516
- windowId: string;
517
- captureId: string;
518
- from: {
519
- x: number;
520
- y: number;
521
- };
522
- to: {
523
- x: number;
524
- y: number;
525
- };
526
- durationMs: number;
527
- }, {
528
- windowId: string;
529
- captureId: string;
530
- from: {
531
- x: number;
532
- y: number;
533
- };
534
- to: {
535
- x: number;
536
- y: number;
537
- };
538
- durationMs?: number | undefined;
539
- }>;
540
- export declare const clipboardSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
541
- windowId: z.ZodString;
542
- } & {
543
- action: z.ZodLiteral<"read">;
544
- }, "strict", z.ZodTypeAny, {
545
- windowId: string;
546
- action: "read";
547
- }, {
548
- windowId: string;
549
- action: "read";
550
- }>, z.ZodObject<{
551
- windowId: z.ZodString;
552
- } & {
553
- action: z.ZodLiteral<"write">;
554
- text: z.ZodString;
555
- }, "strict", z.ZodTypeAny, {
556
- windowId: string;
557
- text: string;
558
- action: "write";
559
- }, {
560
- windowId: string;
561
- text: string;
562
- action: "write";
563
- }>]>;
564
- export declare const windowSchema: z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
565
- windowId: z.ZodString;
566
- pid: z.ZodNumber;
567
- title: z.ZodString;
568
- className: z.ZodString;
569
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
570
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
571
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
572
- } & {
573
- state: z.ZodLiteral<"normal">;
574
- bounds: z.ZodObject<{
575
- x: z.ZodNumber;
576
- y: z.ZodNumber;
577
- width: z.ZodNumber;
578
- height: z.ZodNumber;
579
- }, "strict", z.ZodTypeAny, {
580
- x: number;
581
- y: number;
582
- width: number;
583
- height: number;
584
- }, {
585
- x: number;
586
- y: number;
587
- width: number;
588
- height: number;
589
- }>;
590
- }, "strict", z.ZodTypeAny, {
591
- state: "normal";
592
- windowId: string;
593
- pid: number;
594
- title: string;
595
- className: string;
596
- kind: "normal" | "modal" | "menu";
597
- bounds: {
598
- x: number;
599
- y: number;
600
- width: number;
601
- height: number;
602
- };
603
- blockingWindowId?: string | null | undefined;
604
- ownerWindowId?: string | null | undefined;
605
- }, {
606
- state: "normal";
607
- windowId: string;
608
- pid: number;
609
- title: string;
610
- className: string;
611
- kind: "normal" | "modal" | "menu";
612
- bounds: {
613
- x: number;
614
- y: number;
615
- width: number;
616
- height: number;
617
- };
618
- blockingWindowId?: string | null | undefined;
619
- ownerWindowId?: string | null | undefined;
620
- }>, z.ZodObject<{
621
- windowId: z.ZodString;
622
- pid: z.ZodNumber;
623
- title: z.ZodString;
624
- className: z.ZodString;
625
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
626
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
627
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
628
- } & {
629
- state: z.ZodLiteral<"minimized">;
630
- bounds: z.ZodNull;
631
- }, "strict", z.ZodTypeAny, {
632
- state: "minimized";
633
- windowId: string;
634
- pid: number;
635
- title: string;
636
- className: string;
637
- kind: "normal" | "modal" | "menu";
638
- bounds: null;
639
- blockingWindowId?: string | null | undefined;
640
- ownerWindowId?: string | null | undefined;
641
- }, {
642
- state: "minimized";
643
- windowId: string;
644
- pid: number;
645
- title: string;
646
- className: string;
647
- kind: "normal" | "modal" | "menu";
648
- bounds: null;
649
- blockingWindowId?: string | null | undefined;
650
- ownerWindowId?: string | null | undefined;
651
- }>]>;
652
- export declare const openResultSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
653
- appId: z.ZodString;
654
- status: z.ZodLiteral<"opened">;
655
- launched: z.ZodLiteral<true>;
656
- windows: z.ZodArray<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
657
- windowId: z.ZodString;
658
- pid: z.ZodNumber;
659
- title: z.ZodString;
660
- className: z.ZodString;
661
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
662
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
663
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
664
- } & {
665
- state: z.ZodLiteral<"normal">;
666
- bounds: z.ZodObject<{
667
- x: z.ZodNumber;
668
- y: z.ZodNumber;
669
- width: z.ZodNumber;
670
- height: z.ZodNumber;
671
- }, "strict", z.ZodTypeAny, {
672
- x: number;
673
- y: number;
674
- width: number;
675
- height: number;
676
- }, {
677
- x: number;
678
- y: number;
679
- width: number;
680
- height: number;
681
- }>;
682
- }, "strict", z.ZodTypeAny, {
683
- state: "normal";
684
- windowId: string;
685
- pid: number;
686
- title: string;
687
- className: string;
688
- kind: "normal" | "modal" | "menu";
689
- bounds: {
690
- x: number;
691
- y: number;
692
- width: number;
693
- height: number;
694
- };
695
- blockingWindowId?: string | null | undefined;
696
- ownerWindowId?: string | null | undefined;
697
- }, {
698
- state: "normal";
699
- windowId: string;
700
- pid: number;
701
- title: string;
702
- className: string;
703
- kind: "normal" | "modal" | "menu";
704
- bounds: {
705
- x: number;
706
- y: number;
707
- width: number;
708
- height: number;
709
- };
710
- blockingWindowId?: string | null | undefined;
711
- ownerWindowId?: string | null | undefined;
712
- }>, z.ZodObject<{
713
- windowId: z.ZodString;
714
- pid: z.ZodNumber;
715
- title: z.ZodString;
716
- className: z.ZodString;
717
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
718
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
719
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
720
- } & {
721
- state: z.ZodLiteral<"minimized">;
722
- bounds: z.ZodNull;
723
- }, "strict", z.ZodTypeAny, {
724
- state: "minimized";
725
- windowId: string;
726
- pid: number;
727
- title: string;
728
- className: string;
729
- kind: "normal" | "modal" | "menu";
730
- bounds: null;
731
- blockingWindowId?: string | null | undefined;
732
- ownerWindowId?: string | null | undefined;
733
- }, {
734
- state: "minimized";
735
- windowId: string;
736
- pid: number;
737
- title: string;
738
- className: string;
739
- kind: "normal" | "modal" | "menu";
740
- bounds: null;
741
- blockingWindowId?: string | null | undefined;
742
- ownerWindowId?: string | null | undefined;
743
- }>]>, "many">;
744
- }, "strict", z.ZodTypeAny, {
745
- status: "opened";
746
- appId: string;
747
- windows: ({
748
- state: "normal";
749
- windowId: string;
750
- pid: number;
751
- title: string;
752
- className: string;
753
- kind: "normal" | "modal" | "menu";
754
- bounds: {
755
- x: number;
756
- y: number;
757
- width: number;
758
- height: number;
759
- };
760
- blockingWindowId?: string | null | undefined;
761
- ownerWindowId?: string | null | undefined;
762
- } | {
763
- state: "minimized";
764
- windowId: string;
765
- pid: number;
766
- title: string;
767
- className: string;
768
- kind: "normal" | "modal" | "menu";
769
- bounds: null;
770
- blockingWindowId?: string | null | undefined;
771
- ownerWindowId?: string | null | undefined;
772
- })[];
773
- launched: true;
774
- }, {
775
- status: "opened";
776
- appId: string;
777
- windows: ({
778
- state: "normal";
779
- windowId: string;
780
- pid: number;
781
- title: string;
782
- className: string;
783
- kind: "normal" | "modal" | "menu";
784
- bounds: {
785
- x: number;
786
- y: number;
787
- width: number;
788
- height: number;
789
- };
790
- blockingWindowId?: string | null | undefined;
791
- ownerWindowId?: string | null | undefined;
792
- } | {
793
- state: "minimized";
794
- windowId: string;
795
- pid: number;
796
- title: string;
797
- className: string;
798
- kind: "normal" | "modal" | "menu";
799
- bounds: null;
800
- blockingWindowId?: string | null | undefined;
801
- ownerWindowId?: string | null | undefined;
802
- })[];
803
- launched: true;
804
- }>, z.ZodObject<{
805
- appId: z.ZodString;
806
- status: z.ZodLiteral<"existing">;
807
- launched: z.ZodLiteral<false>;
808
- windows: z.ZodArray<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
809
- windowId: z.ZodString;
810
- pid: z.ZodNumber;
811
- title: z.ZodString;
812
- className: z.ZodString;
813
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
814
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
816
- } & {
817
- state: z.ZodLiteral<"normal">;
818
- bounds: z.ZodObject<{
819
- x: z.ZodNumber;
820
- y: z.ZodNumber;
821
- width: z.ZodNumber;
822
- height: z.ZodNumber;
823
- }, "strict", z.ZodTypeAny, {
824
- x: number;
825
- y: number;
826
- width: number;
827
- height: number;
828
- }, {
829
- x: number;
830
- y: number;
831
- width: number;
832
- height: number;
833
- }>;
834
- }, "strict", z.ZodTypeAny, {
835
- state: "normal";
836
- windowId: string;
837
- pid: number;
838
- title: string;
839
- className: string;
840
- kind: "normal" | "modal" | "menu";
841
- bounds: {
842
- x: number;
843
- y: number;
844
- width: number;
845
- height: number;
846
- };
847
- blockingWindowId?: string | null | undefined;
848
- ownerWindowId?: string | null | undefined;
849
- }, {
850
- state: "normal";
851
- windowId: string;
852
- pid: number;
853
- title: string;
854
- className: string;
855
- kind: "normal" | "modal" | "menu";
856
- bounds: {
857
- x: number;
858
- y: number;
859
- width: number;
860
- height: number;
861
- };
862
- blockingWindowId?: string | null | undefined;
863
- ownerWindowId?: string | null | undefined;
864
- }>, z.ZodObject<{
865
- windowId: z.ZodString;
866
- pid: z.ZodNumber;
867
- title: z.ZodString;
868
- className: z.ZodString;
869
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
870
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
871
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
872
- } & {
873
- state: z.ZodLiteral<"minimized">;
874
- bounds: z.ZodNull;
875
- }, "strict", z.ZodTypeAny, {
876
- state: "minimized";
877
- windowId: string;
878
- pid: number;
879
- title: string;
880
- className: string;
881
- kind: "normal" | "modal" | "menu";
882
- bounds: null;
883
- blockingWindowId?: string | null | undefined;
884
- ownerWindowId?: string | null | undefined;
885
- }, {
886
- state: "minimized";
887
- windowId: string;
888
- pid: number;
889
- title: string;
890
- className: string;
891
- kind: "normal" | "modal" | "menu";
892
- bounds: null;
893
- blockingWindowId?: string | null | undefined;
894
- ownerWindowId?: string | null | undefined;
895
- }>]>, "many">;
896
- }, "strict", z.ZodTypeAny, {
897
- status: "existing";
898
- appId: string;
899
- windows: ({
900
- state: "normal";
901
- windowId: string;
902
- pid: number;
903
- title: string;
904
- className: string;
905
- kind: "normal" | "modal" | "menu";
906
- bounds: {
907
- x: number;
908
- y: number;
909
- width: number;
910
- height: number;
911
- };
912
- blockingWindowId?: string | null | undefined;
913
- ownerWindowId?: string | null | undefined;
914
- } | {
915
- state: "minimized";
916
- windowId: string;
917
- pid: number;
918
- title: string;
919
- className: string;
920
- kind: "normal" | "modal" | "menu";
921
- bounds: null;
922
- blockingWindowId?: string | null | undefined;
923
- ownerWindowId?: string | null | undefined;
924
- })[];
925
- launched: false;
926
- }, {
927
- status: "existing";
928
- appId: string;
929
- windows: ({
930
- state: "normal";
931
- windowId: string;
932
- pid: number;
933
- title: string;
934
- className: string;
935
- kind: "normal" | "modal" | "menu";
936
- bounds: {
937
- x: number;
938
- y: number;
939
- width: number;
940
- height: number;
941
- };
942
- blockingWindowId?: string | null | undefined;
943
- ownerWindowId?: string | null | undefined;
944
- } | {
945
- state: "minimized";
946
- windowId: string;
947
- pid: number;
948
- title: string;
949
- className: string;
950
- kind: "normal" | "modal" | "menu";
951
- bounds: null;
952
- blockingWindowId?: string | null | undefined;
953
- ownerWindowId?: string | null | undefined;
954
- })[];
955
- launched: false;
956
- }>, z.ZodObject<{
957
- appId: z.ZodString;
958
- status: z.ZodLiteral<"ambiguous">;
959
- launched: z.ZodBoolean;
960
- windows: z.ZodArray<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
961
- windowId: z.ZodString;
962
- pid: z.ZodNumber;
963
- title: z.ZodString;
964
- className: z.ZodString;
965
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
966
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
968
- } & {
969
- state: z.ZodLiteral<"normal">;
970
- bounds: z.ZodObject<{
971
- x: z.ZodNumber;
972
- y: z.ZodNumber;
973
- width: z.ZodNumber;
974
- height: z.ZodNumber;
975
- }, "strict", z.ZodTypeAny, {
976
- x: number;
977
- y: number;
978
- width: number;
979
- height: number;
980
- }, {
981
- x: number;
982
- y: number;
983
- width: number;
984
- height: number;
985
- }>;
986
- }, "strict", z.ZodTypeAny, {
987
- state: "normal";
988
- windowId: string;
989
- pid: number;
990
- title: string;
991
- className: string;
992
- kind: "normal" | "modal" | "menu";
993
- bounds: {
994
- x: number;
995
- y: number;
996
- width: number;
997
- height: number;
998
- };
999
- blockingWindowId?: string | null | undefined;
1000
- ownerWindowId?: string | null | undefined;
1001
- }, {
1002
- state: "normal";
1003
- windowId: string;
1004
- pid: number;
1005
- title: string;
1006
- className: string;
1007
- kind: "normal" | "modal" | "menu";
1008
- bounds: {
1009
- x: number;
1010
- y: number;
1011
- width: number;
1012
- height: number;
1013
- };
1014
- blockingWindowId?: string | null | undefined;
1015
- ownerWindowId?: string | null | undefined;
1016
- }>, z.ZodObject<{
1017
- windowId: z.ZodString;
1018
- pid: z.ZodNumber;
1019
- title: z.ZodString;
1020
- className: z.ZodString;
1021
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
1022
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1023
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1024
- } & {
1025
- state: z.ZodLiteral<"minimized">;
1026
- bounds: z.ZodNull;
1027
- }, "strict", z.ZodTypeAny, {
1028
- state: "minimized";
1029
- windowId: string;
1030
- pid: number;
1031
- title: string;
1032
- className: string;
1033
- kind: "normal" | "modal" | "menu";
1034
- bounds: null;
1035
- blockingWindowId?: string | null | undefined;
1036
- ownerWindowId?: string | null | undefined;
1037
- }, {
1038
- state: "minimized";
1039
- windowId: string;
1040
- pid: number;
1041
- title: string;
1042
- className: string;
1043
- kind: "normal" | "modal" | "menu";
1044
- bounds: null;
1045
- blockingWindowId?: string | null | undefined;
1046
- ownerWindowId?: string | null | undefined;
1047
- }>]>, "many">;
1048
- }, "strict", z.ZodTypeAny, {
1049
- status: "ambiguous";
1050
- appId: string;
1051
- windows: ({
1052
- state: "normal";
1053
- windowId: string;
1054
- pid: number;
1055
- title: string;
1056
- className: string;
1057
- kind: "normal" | "modal" | "menu";
1058
- bounds: {
1059
- x: number;
1060
- y: number;
1061
- width: number;
1062
- height: number;
1063
- };
1064
- blockingWindowId?: string | null | undefined;
1065
- ownerWindowId?: string | null | undefined;
1066
- } | {
1067
- state: "minimized";
1068
- windowId: string;
1069
- pid: number;
1070
- title: string;
1071
- className: string;
1072
- kind: "normal" | "modal" | "menu";
1073
- bounds: null;
1074
- blockingWindowId?: string | null | undefined;
1075
- ownerWindowId?: string | null | undefined;
1076
- })[];
1077
- launched: boolean;
1078
- }, {
1079
- status: "ambiguous";
1080
- appId: string;
1081
- windows: ({
1082
- state: "normal";
1083
- windowId: string;
1084
- pid: number;
1085
- title: string;
1086
- className: string;
1087
- kind: "normal" | "modal" | "menu";
1088
- bounds: {
1089
- x: number;
1090
- y: number;
1091
- width: number;
1092
- height: number;
1093
- };
1094
- blockingWindowId?: string | null | undefined;
1095
- ownerWindowId?: string | null | undefined;
1096
- } | {
1097
- state: "minimized";
1098
- windowId: string;
1099
- pid: number;
1100
- title: string;
1101
- className: string;
1102
- kind: "normal" | "modal" | "menu";
1103
- bounds: null;
1104
- blockingWindowId?: string | null | undefined;
1105
- ownerWindowId?: string | null | undefined;
1106
- })[];
1107
- launched: boolean;
1108
- }>, z.ZodObject<{
1109
- appId: z.ZodString;
1110
- status: z.ZodLiteral<"no_window">;
1111
- launched: z.ZodLiteral<true>;
1112
- windows: z.ZodArray<z.ZodDiscriminatedUnion<"state", [z.ZodObject<{
1113
- windowId: z.ZodString;
1114
- pid: z.ZodNumber;
1115
- title: z.ZodString;
1116
- className: z.ZodString;
1117
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
1118
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1119
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1120
- } & {
1121
- state: z.ZodLiteral<"normal">;
1122
- bounds: z.ZodObject<{
1123
- x: z.ZodNumber;
1124
- y: z.ZodNumber;
1125
- width: z.ZodNumber;
1126
- height: z.ZodNumber;
1127
- }, "strict", z.ZodTypeAny, {
1128
- x: number;
1129
- y: number;
1130
- width: number;
1131
- height: number;
1132
- }, {
1133
- x: number;
1134
- y: number;
1135
- width: number;
1136
- height: number;
1137
- }>;
1138
- }, "strict", z.ZodTypeAny, {
1139
- state: "normal";
1140
- windowId: string;
1141
- pid: number;
1142
- title: string;
1143
- className: string;
1144
- kind: "normal" | "modal" | "menu";
1145
- bounds: {
1146
- x: number;
1147
- y: number;
1148
- width: number;
1149
- height: number;
1150
- };
1151
- blockingWindowId?: string | null | undefined;
1152
- ownerWindowId?: string | null | undefined;
1153
- }, {
1154
- state: "normal";
1155
- windowId: string;
1156
- pid: number;
1157
- title: string;
1158
- className: string;
1159
- kind: "normal" | "modal" | "menu";
1160
- bounds: {
1161
- x: number;
1162
- y: number;
1163
- width: number;
1164
- height: number;
1165
- };
1166
- blockingWindowId?: string | null | undefined;
1167
- ownerWindowId?: string | null | undefined;
1168
- }>, z.ZodObject<{
1169
- windowId: z.ZodString;
1170
- pid: z.ZodNumber;
1171
- title: z.ZodString;
1172
- className: z.ZodString;
1173
- kind: z.ZodEnum<["normal", "modal", "menu"]>;
1174
- ownerWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1175
- blockingWindowId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1176
- } & {
1177
- state: z.ZodLiteral<"minimized">;
1178
- bounds: z.ZodNull;
1179
- }, "strict", z.ZodTypeAny, {
1180
- state: "minimized";
1181
- windowId: string;
1182
- pid: number;
1183
- title: string;
1184
- className: string;
1185
- kind: "normal" | "modal" | "menu";
1186
- bounds: null;
1187
- blockingWindowId?: string | null | undefined;
1188
- ownerWindowId?: string | null | undefined;
1189
- }, {
1190
- state: "minimized";
1191
- windowId: string;
1192
- pid: number;
1193
- title: string;
1194
- className: string;
1195
- kind: "normal" | "modal" | "menu";
1196
- bounds: null;
1197
- blockingWindowId?: string | null | undefined;
1198
- ownerWindowId?: string | null | undefined;
1199
- }>]>, "many">;
1200
- }, "strict", z.ZodTypeAny, {
1201
- status: "no_window";
1202
- appId: string;
1203
- windows: ({
1204
- state: "normal";
1205
- windowId: string;
1206
- pid: number;
1207
- title: string;
1208
- className: string;
1209
- kind: "normal" | "modal" | "menu";
1210
- bounds: {
1211
- x: number;
1212
- y: number;
1213
- width: number;
1214
- height: number;
1215
- };
1216
- blockingWindowId?: string | null | undefined;
1217
- ownerWindowId?: string | null | undefined;
1218
- } | {
1219
- state: "minimized";
1220
- windowId: string;
1221
- pid: number;
1222
- title: string;
1223
- className: string;
1224
- kind: "normal" | "modal" | "menu";
1225
- bounds: null;
1226
- blockingWindowId?: string | null | undefined;
1227
- ownerWindowId?: string | null | undefined;
1228
- })[];
1229
- launched: true;
1230
- }, {
1231
- status: "no_window";
1232
- appId: string;
1233
- windows: ({
1234
- state: "normal";
1235
- windowId: string;
1236
- pid: number;
1237
- title: string;
1238
- className: string;
1239
- kind: "normal" | "modal" | "menu";
1240
- bounds: {
1241
- x: number;
1242
- y: number;
1243
- width: number;
1244
- height: number;
1245
- };
1246
- blockingWindowId?: string | null | undefined;
1247
- ownerWindowId?: string | null | undefined;
1248
- } | {
1249
- state: "minimized";
1250
- windowId: string;
1251
- pid: number;
1252
- title: string;
1253
- className: string;
1254
- kind: "normal" | "modal" | "menu";
1255
- bounds: null;
1256
- blockingWindowId?: string | null | undefined;
1257
- ownerWindowId?: string | null | undefined;
1258
- })[];
1259
- launched: true;
1260
- }>]>;
1261
- export declare const observationSchema: z.ZodEffects<z.ZodObject<{
1262
- windowId: z.ZodString;
1263
- observationId: z.ZodString;
1264
- bounds: z.ZodObject<{
1265
- x: z.ZodNumber;
1266
- y: z.ZodNumber;
1267
- width: z.ZodNumber;
1268
- height: z.ZodNumber;
1269
- }, "strict", z.ZodTypeAny, {
1270
- x: number;
1271
- y: number;
1272
- width: number;
1273
- height: number;
1274
- }, {
1275
- x: number;
1276
- y: number;
1277
- width: number;
1278
- height: number;
1279
- }>;
1280
- blockingWindowId: z.ZodNullable<z.ZodString>;
1281
- focusedElementId: z.ZodNullable<z.ZodString>;
1282
- truncated: z.ZodBoolean;
1283
- elements: z.ZodArray<z.ZodObject<{
1284
- windowId: z.ZodString;
1285
- elementId: z.ZodString;
1286
- parentId: z.ZodNullable<z.ZodString>;
1287
- name: z.ZodString;
1288
- controlType: z.ZodNumber;
1289
- bounds: z.ZodObject<{
1290
- x: z.ZodNumber;
1291
- y: z.ZodNumber;
1292
- width: z.ZodNumber;
1293
- height: z.ZodNumber;
1294
- }, "strict", z.ZodTypeAny, {
1295
- x: number;
1296
- y: number;
1297
- width: number;
1298
- height: number;
1299
- }, {
1300
- x: number;
1301
- y: number;
1302
- width: number;
1303
- height: number;
1304
- }>;
1305
- enabled: z.ZodBoolean;
1306
- protected: z.ZodBoolean;
1307
- value: z.ZodOptional<z.ZodString>;
1308
- actions: z.ZodOptional<z.ZodArray<z.ZodEnum<["invoke", "select", "add_to_selection", "remove_from_selection", "toggle", "expand", "collapse", "scroll_into_view"]>, "many">>;
1309
- controlState: z.ZodOptional<z.ZodObject<{
1310
- toggle: z.ZodOptional<z.ZodNumber>;
1311
- selected: z.ZodOptional<z.ZodBoolean>;
1312
- expansion: z.ZodOptional<z.ZodNumber>;
1313
- }, "strict", z.ZodTypeAny, {
1314
- toggle?: number | undefined;
1315
- selected?: boolean | undefined;
1316
- expansion?: number | undefined;
1317
- }, {
1318
- toggle?: number | undefined;
1319
- selected?: boolean | undefined;
1320
- expansion?: number | undefined;
1321
- }>>;
1322
- }, "strict", z.ZodTypeAny, {
1323
- windowId: string;
1324
- name: string;
1325
- elementId: string;
1326
- controlType: number;
1327
- bounds: {
1328
- x: number;
1329
- y: number;
1330
- width: number;
1331
- height: number;
1332
- };
1333
- parentId: string | null;
1334
- enabled: boolean;
1335
- protected: boolean;
1336
- value?: string | undefined;
1337
- actions?: ("invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view")[] | undefined;
1338
- controlState?: {
1339
- toggle?: number | undefined;
1340
- selected?: boolean | undefined;
1341
- expansion?: number | undefined;
1342
- } | undefined;
1343
- }, {
1344
- windowId: string;
1345
- name: string;
1346
- elementId: string;
1347
- controlType: number;
1348
- bounds: {
1349
- x: number;
1350
- y: number;
1351
- width: number;
1352
- height: number;
1353
- };
1354
- parentId: string | null;
1355
- enabled: boolean;
1356
- protected: boolean;
1357
- value?: string | undefined;
1358
- actions?: ("invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view")[] | undefined;
1359
- controlState?: {
1360
- toggle?: number | undefined;
1361
- selected?: boolean | undefined;
1362
- expansion?: number | undefined;
1363
- } | undefined;
1364
- }>, "many">;
1365
- }, "strict", z.ZodTypeAny, {
1366
- windowId: string;
1367
- blockingWindowId: string | null;
1368
- truncated: boolean;
1369
- observationId: string;
1370
- bounds: {
1371
- x: number;
1372
- y: number;
1373
- width: number;
1374
- height: number;
1375
- };
1376
- focusedElementId: string | null;
1377
- elements: {
1378
- windowId: string;
1379
- name: string;
1380
- elementId: string;
1381
- controlType: number;
1382
- bounds: {
1383
- x: number;
1384
- y: number;
1385
- width: number;
1386
- height: number;
1387
- };
1388
- parentId: string | null;
1389
- enabled: boolean;
1390
- protected: boolean;
1391
- value?: string | undefined;
1392
- actions?: ("invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view")[] | undefined;
1393
- controlState?: {
1394
- toggle?: number | undefined;
1395
- selected?: boolean | undefined;
1396
- expansion?: number | undefined;
1397
- } | undefined;
1398
- }[];
1399
- }, {
1400
- windowId: string;
1401
- blockingWindowId: string | null;
1402
- truncated: boolean;
1403
- observationId: string;
1404
- bounds: {
1405
- x: number;
1406
- y: number;
1407
- width: number;
1408
- height: number;
1409
- };
1410
- focusedElementId: string | null;
1411
- elements: {
1412
- windowId: string;
1413
- name: string;
1414
- elementId: string;
1415
- controlType: number;
1416
- bounds: {
1417
- x: number;
1418
- y: number;
1419
- width: number;
1420
- height: number;
1421
- };
1422
- parentId: string | null;
1423
- enabled: boolean;
1424
- protected: boolean;
1425
- value?: string | undefined;
1426
- actions?: ("invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view")[] | undefined;
1427
- controlState?: {
1428
- toggle?: number | undefined;
1429
- selected?: boolean | undefined;
1430
- expansion?: number | undefined;
1431
- } | undefined;
1432
- }[];
1433
- }>, {
1434
- windowId: string;
1435
- blockingWindowId: string | null;
1436
- truncated: boolean;
1437
- observationId: string;
1438
- bounds: {
1439
- x: number;
1440
- y: number;
1441
- width: number;
1442
- height: number;
1443
- };
1444
- focusedElementId: string | null;
1445
- elements: {
1446
- windowId: string;
1447
- name: string;
1448
- elementId: string;
1449
- controlType: number;
1450
- bounds: {
1451
- x: number;
1452
- y: number;
1453
- width: number;
1454
- height: number;
1455
- };
1456
- parentId: string | null;
1457
- enabled: boolean;
1458
- protected: boolean;
1459
- value?: string | undefined;
1460
- actions?: ("invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view")[] | undefined;
1461
- controlState?: {
1462
- toggle?: number | undefined;
1463
- selected?: boolean | undefined;
1464
- expansion?: number | undefined;
1465
- } | undefined;
1466
- }[];
1467
- }, {
1468
- windowId: string;
1469
- blockingWindowId: string | null;
1470
- truncated: boolean;
1471
- observationId: string;
1472
- bounds: {
1473
- x: number;
1474
- y: number;
1475
- width: number;
1476
- height: number;
1477
- };
1478
- focusedElementId: string | null;
1479
- elements: {
1480
- windowId: string;
1481
- name: string;
1482
- elementId: string;
1483
- controlType: number;
1484
- bounds: {
1485
- x: number;
1486
- y: number;
1487
- width: number;
1488
- height: number;
1489
- };
1490
- parentId: string | null;
1491
- enabled: boolean;
1492
- protected: boolean;
1493
- value?: string | undefined;
1494
- actions?: ("invoke" | "select" | "add_to_selection" | "remove_from_selection" | "toggle" | "expand" | "collapse" | "scroll_into_view")[] | undefined;
1495
- controlState?: {
1496
- toggle?: number | undefined;
1497
- selected?: boolean | undefined;
1498
- expansion?: number | undefined;
1499
- } | undefined;
1500
- }[];
1501
- }>;
1502
- export declare const captureSchema: z.ZodObject<{
1503
- windowId: z.ZodString;
1504
- captureId: z.ZodString;
1505
- source: z.ZodObject<{
1506
- x: z.ZodNumber;
1507
- y: z.ZodNumber;
1508
- width: z.ZodNumber;
1509
- height: z.ZodNumber;
1510
- }, "strict", z.ZodTypeAny, {
1511
- x: number;
1512
- y: number;
1513
- width: number;
1514
- height: number;
1515
- }, {
1516
- x: number;
1517
- y: number;
1518
- width: number;
1519
- height: number;
1520
- }>;
1521
- width: z.ZodNumber;
1522
- height: z.ZodNumber;
1523
- mediaType: z.ZodEnum<["image/png", "image/jpeg"]>;
1524
- base64: z.ZodString;
1525
- mode: z.ZodEnum<["window", "visible-desktop"]>;
1526
- }, "strict", z.ZodTypeAny, {
1527
- base64: string;
1528
- windowId: string;
1529
- width: number;
1530
- height: number;
1531
- source: {
1532
- x: number;
1533
- y: number;
1534
- width: number;
1535
- height: number;
1536
- };
1537
- captureId: string;
1538
- mediaType: "image/png" | "image/jpeg";
1539
- mode: "window" | "visible-desktop";
1540
- }, {
1541
- base64: string;
1542
- windowId: string;
1543
- width: number;
1544
- height: number;
1545
- source: {
1546
- x: number;
1547
- y: number;
1548
- width: number;
1549
- height: number;
1550
- };
1551
- captureId: string;
1552
- mediaType: "image/png" | "image/jpeg";
1553
- mode: "window" | "visible-desktop";
1554
- }>;
1555
- export declare const statusSchema: z.ZodObject<{
1556
- platform: z.ZodLiteral<"win32">;
1557
- architecture: z.ZodLiteral<"x64">;
1558
- ready: z.ZodBoolean;
1559
- protocolVersion: z.ZodLiteral<4>;
1560
- limitations: z.ZodArray<z.ZodString, "many">;
1561
- }, "strict", z.ZodTypeAny, {
1562
- platform: "win32";
1563
- architecture: "x64";
1564
- ready: boolean;
1565
- protocolVersion: 4;
1566
- limitations: string[];
1567
- }, {
1568
- platform: "win32";
1569
- architecture: "x64";
1570
- ready: boolean;
1571
- protocolVersion: 4;
1572
- limitations: string[];
1573
- }>;
1574
- export declare const responseSchema: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
1575
- version: z.ZodLiteral<4>;
1576
- id: z.ZodString;
1577
- ok: z.ZodLiteral<true>;
1578
- result: z.ZodUnknown;
1579
- }, "strict", z.ZodTypeAny, {
1580
- version: 4;
1581
- id: string;
1582
- ok: true;
1583
- result?: unknown;
1584
- }, {
1585
- version: 4;
1586
- id: string;
1587
- ok: true;
1588
- result?: unknown;
1589
- }>, z.ZodObject<{
1590
- version: z.ZodLiteral<4>;
1591
- id: z.ZodString;
1592
- ok: z.ZodLiteral<false>;
1593
- error: z.ZodObject<{
1594
- code: z.ZodString;
1595
- message: z.ZodString;
1596
- }, "strict", z.ZodTypeAny, {
1597
- code: string;
1598
- message: string;
1599
- }, {
1600
- code: string;
1601
- message: string;
1602
- }>;
1603
- }, "strict", z.ZodTypeAny, {
1604
- version: 4;
1605
- id: string;
1606
- ok: false;
1607
- error: {
1608
- code: string;
1609
- message: string;
1610
- };
1611
- }, {
1612
- version: 4;
1613
- id: string;
1614
- ok: false;
1615
- error: {
1616
- code: string;
1617
- message: string;
1618
- };
1619
- }>]>;
1620
- export declare function imagePointToScreen(point: z.infer<typeof pointSchema>, image: {
1621
- width: number;
1622
- height: number;
1623
- }, source: z.infer<typeof rectangleSchema>): {
1624
- x: number;
1625
- y: number;
1626
- };
1627
- //# sourceMappingURL=contracts.d.ts.map