@mseep/clawdcursor 1.5.5

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 (354) hide show
  1. package/CHANGELOG.md +2264 -0
  2. package/LICENSE +21 -0
  3. package/README.md +385 -0
  4. package/SECURITY.md +44 -0
  5. package/SKILL.md +503 -0
  6. package/dist/core/agent-loop/agent.d.ts +42 -0
  7. package/dist/core/agent-loop/agent.js +1023 -0
  8. package/dist/core/agent-loop/agent.js.map +1 -0
  9. package/dist/core/agent-loop/batch-tool.d.ts +25 -0
  10. package/dist/core/agent-loop/batch-tool.js +218 -0
  11. package/dist/core/agent-loop/batch-tool.js.map +1 -0
  12. package/dist/core/agent-loop/coord-scale.d.ts +72 -0
  13. package/dist/core/agent-loop/coord-scale.js +89 -0
  14. package/dist/core/agent-loop/coord-scale.js.map +1 -0
  15. package/dist/core/agent-loop/focus-guard.d.ts +24 -0
  16. package/dist/core/agent-loop/focus-guard.js +29 -0
  17. package/dist/core/agent-loop/focus-guard.js.map +1 -0
  18. package/dist/core/agent-loop/project-mcp.d.ts +97 -0
  19. package/dist/core/agent-loop/project-mcp.js +253 -0
  20. package/dist/core/agent-loop/project-mcp.js.map +1 -0
  21. package/dist/core/agent-loop/prompt.d.ts +45 -0
  22. package/dist/core/agent-loop/prompt.js +426 -0
  23. package/dist/core/agent-loop/prompt.js.map +1 -0
  24. package/dist/core/agent-loop/tool-meta.d.ts +93 -0
  25. package/dist/core/agent-loop/tool-meta.js +651 -0
  26. package/dist/core/agent-loop/tool-meta.js.map +1 -0
  27. package/dist/core/agent-loop/tools.d.ts +38 -0
  28. package/dist/core/agent-loop/tools.js +2134 -0
  29. package/dist/core/agent-loop/tools.js.map +1 -0
  30. package/dist/core/agent-loop/types.d.ts +170 -0
  31. package/dist/core/agent-loop/types.js +12 -0
  32. package/dist/core/agent-loop/types.js.map +1 -0
  33. package/dist/core/agent.d.ts +51 -0
  34. package/dist/core/agent.js +245 -0
  35. package/dist/core/agent.js.map +1 -0
  36. package/dist/core/app-categories.d.ts +67 -0
  37. package/dist/core/app-categories.js +108 -0
  38. package/dist/core/app-categories.js.map +1 -0
  39. package/dist/core/banner.d.ts +70 -0
  40. package/dist/core/banner.js +245 -0
  41. package/dist/core/banner.js.map +1 -0
  42. package/dist/core/classify/capability.d.ts +45 -0
  43. package/dist/core/classify/capability.js +78 -0
  44. package/dist/core/classify/capability.js.map +1 -0
  45. package/dist/core/decompose/llm-decomposer.d.ts +35 -0
  46. package/dist/core/decompose/llm-decomposer.js +156 -0
  47. package/dist/core/decompose/llm-decomposer.js.map +1 -0
  48. package/dist/core/decompose/parser.d.ts +27 -0
  49. package/dist/core/decompose/parser.js +101 -0
  50. package/dist/core/decompose/parser.js.map +1 -0
  51. package/dist/core/observability/correlation.d.ts +19 -0
  52. package/dist/core/observability/correlation.js +36 -0
  53. package/dist/core/observability/correlation.js.map +1 -0
  54. package/dist/core/observability/cost-meter.d.ts +51 -0
  55. package/dist/core/observability/cost-meter.js +134 -0
  56. package/dist/core/observability/cost-meter.js.map +1 -0
  57. package/dist/core/observability/logger.d.ts +61 -0
  58. package/dist/core/observability/logger.js +550 -0
  59. package/dist/core/observability/logger.js.map +1 -0
  60. package/dist/core/router/aliases.d.ts +50 -0
  61. package/dist/core/router/aliases.js +104 -0
  62. package/dist/core/router/aliases.js.map +1 -0
  63. package/dist/core/router/normalize.d.ts +41 -0
  64. package/dist/core/router/normalize.js +80 -0
  65. package/dist/core/router/normalize.js.map +1 -0
  66. package/dist/core/safety.d.ts +126 -0
  67. package/dist/core/safety.js +568 -0
  68. package/dist/core/safety.js.map +1 -0
  69. package/dist/core/sense/a11y-resolver.d.ts +73 -0
  70. package/dist/core/sense/a11y-resolver.js +76 -0
  71. package/dist/core/sense/a11y-resolver.js.map +1 -0
  72. package/dist/core/sense/fingerprint.d.ts +41 -0
  73. package/dist/core/sense/fingerprint.js +123 -0
  74. package/dist/core/sense/fingerprint.js.map +1 -0
  75. package/dist/core/sense/rank.d.ts +70 -0
  76. package/dist/core/sense/rank.js +192 -0
  77. package/dist/core/sense/rank.js.map +1 -0
  78. package/dist/core/sense/reactive-check.d.ts +40 -0
  79. package/dist/core/sense/reactive-check.js +48 -0
  80. package/dist/core/sense/reactive-check.js.map +1 -0
  81. package/dist/core/sense/snapshot.d.ts +19 -0
  82. package/dist/core/sense/snapshot.js +100 -0
  83. package/dist/core/sense/snapshot.js.map +1 -0
  84. package/dist/core/sense/types.d.ts +66 -0
  85. package/dist/core/sense/types.js +9 -0
  86. package/dist/core/sense/types.js.map +1 -0
  87. package/dist/core/sense/ui-map-anchors.d.ts +7 -0
  88. package/dist/core/sense/ui-map-anchors.js +24 -0
  89. package/dist/core/sense/ui-map-anchors.js.map +1 -0
  90. package/dist/core/sense/ui-map-elements.d.ts +5 -0
  91. package/dist/core/sense/ui-map-elements.js +33 -0
  92. package/dist/core/sense/ui-map-elements.js.map +1 -0
  93. package/dist/core/sense/ui-map-find.d.ts +56 -0
  94. package/dist/core/sense/ui-map-find.js +153 -0
  95. package/dist/core/sense/ui-map-find.js.map +1 -0
  96. package/dist/core/sense/ui-map-fuse.d.ts +4 -0
  97. package/dist/core/sense/ui-map-fuse.js +44 -0
  98. package/dist/core/sense/ui-map-fuse.js.map +1 -0
  99. package/dist/core/sense/ui-map-geom.d.ts +3 -0
  100. package/dist/core/sense/ui-map-geom.js +16 -0
  101. package/dist/core/sense/ui-map-geom.js.map +1 -0
  102. package/dist/core/sense/ui-map-holder.d.ts +58 -0
  103. package/dist/core/sense/ui-map-holder.js +87 -0
  104. package/dist/core/sense/ui-map-holder.js.map +1 -0
  105. package/dist/core/sense/ui-map-normalize.d.ts +19 -0
  106. package/dist/core/sense/ui-map-normalize.js +65 -0
  107. package/dist/core/sense/ui-map-normalize.js.map +1 -0
  108. package/dist/core/sense/ui-map-render.d.ts +4 -0
  109. package/dist/core/sense/ui-map-render.js +34 -0
  110. package/dist/core/sense/ui-map-render.js.map +1 -0
  111. package/dist/core/sense/ui-map-resolve.d.ts +41 -0
  112. package/dist/core/sense/ui-map-resolve.js +59 -0
  113. package/dist/core/sense/ui-map-resolve.js.map +1 -0
  114. package/dist/core/sense/ui-map-types.d.ts +66 -0
  115. package/dist/core/sense/ui-map-types.js +11 -0
  116. package/dist/core/sense/ui-map-types.js.map +1 -0
  117. package/dist/core/sense/ui-map.d.ts +29 -0
  118. package/dist/core/sense/ui-map.js +113 -0
  119. package/dist/core/sense/ui-map.js.map +1 -0
  120. package/dist/core/verify/assertions.d.ts +132 -0
  121. package/dist/core/verify/assertions.js +284 -0
  122. package/dist/core/verify/assertions.js.map +1 -0
  123. package/dist/index.d.ts +21 -0
  124. package/dist/index.js +24 -0
  125. package/dist/index.js.map +1 -0
  126. package/dist/llm/browser-config.d.ts +36 -0
  127. package/dist/llm/browser-config.js +83 -0
  128. package/dist/llm/browser-config.js.map +1 -0
  129. package/dist/llm/client.d.ts +268 -0
  130. package/dist/llm/client.js +1094 -0
  131. package/dist/llm/client.js.map +1 -0
  132. package/dist/llm/config.d.ts +79 -0
  133. package/dist/llm/config.js +375 -0
  134. package/dist/llm/config.js.map +1 -0
  135. package/dist/llm/credentials.d.ts +35 -0
  136. package/dist/llm/credentials.js +491 -0
  137. package/dist/llm/credentials.js.map +1 -0
  138. package/dist/llm/external-creds.d.ts +42 -0
  139. package/dist/llm/external-creds.js +169 -0
  140. package/dist/llm/external-creds.js.map +1 -0
  141. package/dist/llm/providers.d.ts +123 -0
  142. package/dist/llm/providers.js +717 -0
  143. package/dist/llm/providers.js.map +1 -0
  144. package/dist/paths.d.ts +31 -0
  145. package/dist/paths.js +147 -0
  146. package/dist/paths.js.map +1 -0
  147. package/dist/platform/accessibility.d.ts +139 -0
  148. package/dist/platform/accessibility.js +670 -0
  149. package/dist/platform/accessibility.js.map +1 -0
  150. package/dist/platform/cdp-driver.d.ts +318 -0
  151. package/dist/platform/cdp-driver.js +1179 -0
  152. package/dist/platform/cdp-driver.js.map +1 -0
  153. package/dist/platform/index.d.ts +11 -0
  154. package/dist/platform/index.js +69 -0
  155. package/dist/platform/index.js.map +1 -0
  156. package/dist/platform/keys.d.ts +17 -0
  157. package/dist/platform/keys.js +129 -0
  158. package/dist/platform/keys.js.map +1 -0
  159. package/dist/platform/launch-poll.d.ts +101 -0
  160. package/dist/platform/launch-poll.js +177 -0
  161. package/dist/platform/launch-poll.js.map +1 -0
  162. package/dist/platform/linux.d.ts +173 -0
  163. package/dist/platform/linux.js +1253 -0
  164. package/dist/platform/linux.js.map +1 -0
  165. package/dist/platform/macos.d.ts +136 -0
  166. package/dist/platform/macos.js +976 -0
  167. package/dist/platform/macos.js.map +1 -0
  168. package/dist/platform/native-desktop.d.ts +145 -0
  169. package/dist/platform/native-desktop.js +936 -0
  170. package/dist/platform/native-desktop.js.map +1 -0
  171. package/dist/platform/native-helper.d.ts +130 -0
  172. package/dist/platform/native-helper.js +592 -0
  173. package/dist/platform/native-helper.js.map +1 -0
  174. package/dist/platform/ocr-engine.d.ts +78 -0
  175. package/dist/platform/ocr-engine.js +363 -0
  176. package/dist/platform/ocr-engine.js.map +1 -0
  177. package/dist/platform/ps-runner.d.ts +28 -0
  178. package/dist/platform/ps-runner.js +228 -0
  179. package/dist/platform/ps-runner.js.map +1 -0
  180. package/dist/platform/types.d.ts +397 -0
  181. package/dist/platform/types.js +15 -0
  182. package/dist/platform/types.js.map +1 -0
  183. package/dist/platform/uri-handler.d.ts +75 -0
  184. package/dist/platform/uri-handler.js +273 -0
  185. package/dist/platform/uri-handler.js.map +1 -0
  186. package/dist/platform/wayland-backend.d.ts +53 -0
  187. package/dist/platform/wayland-backend.js +348 -0
  188. package/dist/platform/wayland-backend.js.map +1 -0
  189. package/dist/platform/windows.d.ts +232 -0
  190. package/dist/platform/windows.js +1210 -0
  191. package/dist/platform/windows.js.map +1 -0
  192. package/dist/postbuild.d.ts +10 -0
  193. package/dist/postbuild.js +98 -0
  194. package/dist/postbuild.js.map +1 -0
  195. package/dist/schema/snapshot.d.ts +33 -0
  196. package/dist/schema/snapshot.js +90 -0
  197. package/dist/schema/snapshot.js.map +1 -0
  198. package/dist/shortcuts.d.ts +30 -0
  199. package/dist/shortcuts.js +261 -0
  200. package/dist/shortcuts.js.map +1 -0
  201. package/dist/surface/cli.d.ts +7 -0
  202. package/dist/surface/cli.js +1556 -0
  203. package/dist/surface/cli.js.map +1 -0
  204. package/dist/surface/dashboard.d.ts +8 -0
  205. package/dist/surface/dashboard.js +1193 -0
  206. package/dist/surface/dashboard.js.map +1 -0
  207. package/dist/surface/doctor.d.ts +29 -0
  208. package/dist/surface/doctor.js +1514 -0
  209. package/dist/surface/doctor.js.map +1 -0
  210. package/dist/surface/format.d.ts +10 -0
  211. package/dist/surface/format.js +37 -0
  212. package/dist/surface/format.js.map +1 -0
  213. package/dist/surface/http-utility.d.ts +65 -0
  214. package/dist/surface/http-utility.js +336 -0
  215. package/dist/surface/http-utility.js.map +1 -0
  216. package/dist/surface/mcp-server.d.ts +91 -0
  217. package/dist/surface/mcp-server.js +280 -0
  218. package/dist/surface/mcp-server.js.map +1 -0
  219. package/dist/surface/onboarding.d.ts +15 -0
  220. package/dist/surface/onboarding.js +184 -0
  221. package/dist/surface/onboarding.js.map +1 -0
  222. package/dist/surface/pidfile.d.ts +79 -0
  223. package/dist/surface/pidfile.js +263 -0
  224. package/dist/surface/pidfile.js.map +1 -0
  225. package/dist/surface/readiness.d.ts +45 -0
  226. package/dist/surface/readiness.js +230 -0
  227. package/dist/surface/readiness.js.map +1 -0
  228. package/dist/surface/report.d.ts +68 -0
  229. package/dist/surface/report.js +341 -0
  230. package/dist/surface/report.js.map +1 -0
  231. package/dist/surface/skill-register.d.ts +14 -0
  232. package/dist/surface/skill-register.js +150 -0
  233. package/dist/surface/skill-register.js.map +1 -0
  234. package/dist/surface/version.d.ts +6 -0
  235. package/dist/surface/version.js +27 -0
  236. package/dist/surface/version.js.map +1 -0
  237. package/dist/tools/a11y.d.ts +8 -0
  238. package/dist/tools/a11y.js +545 -0
  239. package/dist/tools/a11y.js.map +1 -0
  240. package/dist/tools/a11y_depth.d.ts +19 -0
  241. package/dist/tools/a11y_depth.js +455 -0
  242. package/dist/tools/a11y_depth.js.map +1 -0
  243. package/dist/tools/agent.d.ts +15 -0
  244. package/dist/tools/agent.js +248 -0
  245. package/dist/tools/agent.js.map +1 -0
  246. package/dist/tools/batch.d.ts +46 -0
  247. package/dist/tools/batch.js +230 -0
  248. package/dist/tools/batch.js.map +1 -0
  249. package/dist/tools/cdp.d.ts +8 -0
  250. package/dist/tools/cdp.js +233 -0
  251. package/dist/tools/cdp.js.map +1 -0
  252. package/dist/tools/compact.d.ts +63 -0
  253. package/dist/tools/compact.js +418 -0
  254. package/dist/tools/compact.js.map +1 -0
  255. package/dist/tools/cost-class.d.ts +38 -0
  256. package/dist/tools/cost-class.js +117 -0
  257. package/dist/tools/cost-class.js.map +1 -0
  258. package/dist/tools/desktop.d.ts +9 -0
  259. package/dist/tools/desktop.js +346 -0
  260. package/dist/tools/desktop.js.map +1 -0
  261. package/dist/tools/electron_bridge.d.ts +41 -0
  262. package/dist/tools/electron_bridge.js +261 -0
  263. package/dist/tools/electron_bridge.js.map +1 -0
  264. package/dist/tools/extras.d.ts +22 -0
  265. package/dist/tools/extras.js +942 -0
  266. package/dist/tools/extras.js.map +1 -0
  267. package/dist/tools/favorites.d.ts +13 -0
  268. package/dist/tools/favorites.js +137 -0
  269. package/dist/tools/favorites.js.map +1 -0
  270. package/dist/tools/introspection.d.ts +13 -0
  271. package/dist/tools/introspection.js +55 -0
  272. package/dist/tools/introspection.js.map +1 -0
  273. package/dist/tools/ocr.d.ts +8 -0
  274. package/dist/tools/ocr.js +66 -0
  275. package/dist/tools/ocr.js.map +1 -0
  276. package/dist/tools/orchestration.d.ts +7 -0
  277. package/dist/tools/orchestration.js +377 -0
  278. package/dist/tools/orchestration.js.map +1 -0
  279. package/dist/tools/playbooks/extract-compose.d.ts +22 -0
  280. package/dist/tools/playbooks/extract-compose.js +85 -0
  281. package/dist/tools/playbooks/extract-compose.js.map +1 -0
  282. package/dist/tools/playbooks/find-replace.d.ts +11 -0
  283. package/dist/tools/playbooks/find-replace.js +56 -0
  284. package/dist/tools/playbooks/find-replace.js.map +1 -0
  285. package/dist/tools/playbooks/index.d.ts +63 -0
  286. package/dist/tools/playbooks/index.js +70 -0
  287. package/dist/tools/playbooks/index.js.map +1 -0
  288. package/dist/tools/playbooks/keys-blocklist.d.ts +24 -0
  289. package/dist/tools/playbooks/keys-blocklist.js +89 -0
  290. package/dist/tools/playbooks/keys-blocklist.js.map +1 -0
  291. package/dist/tools/registry.d.ts +40 -0
  292. package/dist/tools/registry.js +560 -0
  293. package/dist/tools/registry.js.map +1 -0
  294. package/dist/tools/safety-gate.d.ts +16 -0
  295. package/dist/tools/safety-gate.js +70 -0
  296. package/dist/tools/safety-gate.js.map +1 -0
  297. package/dist/tools/scheduler.d.ts +76 -0
  298. package/dist/tools/scheduler.js +413 -0
  299. package/dist/tools/scheduler.js.map +1 -0
  300. package/dist/tools/shortcuts.d.ts +13 -0
  301. package/dist/tools/shortcuts.js +205 -0
  302. package/dist/tools/shortcuts.js.map +1 -0
  303. package/dist/tools/smart.d.ts +15 -0
  304. package/dist/tools/smart.js +785 -0
  305. package/dist/tools/smart.js.map +1 -0
  306. package/dist/tools/types.d.ts +174 -0
  307. package/dist/tools/types.js +67 -0
  308. package/dist/tools/types.js.map +1 -0
  309. package/dist/tools/window-text.d.ts +15 -0
  310. package/dist/tools/window-text.js +39 -0
  311. package/dist/tools/window-text.js.map +1 -0
  312. package/dist/types.d.ts +122 -0
  313. package/dist/types.js +41 -0
  314. package/dist/types.js.map +1 -0
  315. package/native/Package.swift +38 -0
  316. package/native/README.md +113 -0
  317. package/native/Sources/ClawdCursorHelper/main.swift +602 -0
  318. package/native/Sources/ClawdCursorHost/main.swift +182 -0
  319. package/native/Sources/PermissionCheck/main.swift +53 -0
  320. package/native/Sources/ScreenshotHelper/main.swift +219 -0
  321. package/native/build.sh +139 -0
  322. package/native/entitlements.plist +12 -0
  323. package/package.json +115 -0
  324. package/scripts/banner.ps1 +112 -0
  325. package/scripts/coord-accuracy.ps1 +140 -0
  326. package/scripts/coord-uwp.ps1 +80 -0
  327. package/scripts/edge-glow.ps1 +180 -0
  328. package/scripts/find-element.ps1 +198 -0
  329. package/scripts/get-foreground-window.ps1 +71 -0
  330. package/scripts/get-screen-context.ps1 +183 -0
  331. package/scripts/get-windows.ps1 +66 -0
  332. package/scripts/install-panic-hotkey.ps1 +46 -0
  333. package/scripts/interact-element.ps1 +431 -0
  334. package/scripts/invoke-element.ps1 +314 -0
  335. package/scripts/linux/atspi-bridge.py +356 -0
  336. package/scripts/linux/ocr-recognize.py +154 -0
  337. package/scripts/mac/_window-picker.jxa +163 -0
  338. package/scripts/mac/find-element.jxa +0 -0
  339. package/scripts/mac/find-element.sh +161 -0
  340. package/scripts/mac/focus-window.jxa +284 -0
  341. package/scripts/mac/get-focused-element.jxa +102 -0
  342. package/scripts/mac/get-foreground-window.jxa +173 -0
  343. package/scripts/mac/get-screen-context.jxa +197 -0
  344. package/scripts/mac/get-ui-tree.sh +141 -0
  345. package/scripts/mac/get-windows.jxa +117 -0
  346. package/scripts/mac/interact-element.sh +235 -0
  347. package/scripts/mac/invoke-element.jxa +408 -0
  348. package/scripts/mac/ocr-recognize.swift +124 -0
  349. package/scripts/ocr-recognize.ps1 +102 -0
  350. package/scripts/postinstall-native.js +48 -0
  351. package/scripts/ps-bridge.ps1 +830 -0
  352. package/scripts/smoke-mcp.ps1 +119 -0
  353. package/scripts/sync-version.ts +178 -0
  354. package/scripts/verify-install.js +81 -0
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.iou = iou;
4
+ /** Intersection-over-union of two [x,y,w,h] screen-space boxes. 0 when disjoint. */
5
+ function iou(a, b) {
6
+ const [ax, ay, aw, ah] = a;
7
+ const [bx, by, bw, bh] = b;
8
+ const x1 = Math.max(ax, bx);
9
+ const y1 = Math.max(ay, by);
10
+ const x2 = Math.min(ax + aw, bx + bw);
11
+ const y2 = Math.min(ay + ah, by + bh);
12
+ const inter = Math.max(0, x2 - x1) * Math.max(0, y2 - y1);
13
+ const uni = aw * ah + bw * bh - inter;
14
+ return uni <= 0 ? 0 : inter / uni;
15
+ }
16
+ //# sourceMappingURL=ui-map-geom.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-map-geom.js","sourceRoot":"","sources":["../../../src/core/sense/ui-map-geom.ts"],"names":[],"mappings":";;AAGA,kBAUC;AAXD,oFAAoF;AACpF,SAAgB,GAAG,CAAC,CAAS,EAAE,CAAS;IACtC,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5B,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACtC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IACtC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC;AACpC,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Session-scoped cache of recently compiled UIMaps, enabling safe el_NN element
3
+ * references (resolve {snapshot_id, element_id} -> live element). Strict by
4
+ * design: only the CURRENT, non-invalidated, in-TTL map resolves. See
5
+ * docs/superpowers/specs/2026-06-07-ui-state-compiler-part2-design.md §2.
6
+ */
7
+ import type { UIMap, MaxCost } from './ui-map-types';
8
+ /**
9
+ * Wall-clock backstop for ref freshness. The PRIMARY staleness signal is
10
+ * event-driven (`invalidate()` after every screen-changing action) plus the
11
+ * resolve-time window guard (pid/title must still match) — the TTL only
12
+ * catches background drift no agent action caused. It must therefore be
13
+ * sized to SURVIVE an LLM round-trip: refs are advertised at the end of
14
+ * turn N and consumed on turn N+1, after prompt assembly + a full model
15
+ * call (45s timeout, backoff retries). The original 5s expired virtually
16
+ * every cross-turn ref (audit 2026-06-10, finding A2).
17
+ */
18
+ export declare const TTL_MS = 60000;
19
+ /** Perception-cost ordering for reuse decisions: cheap < ocr_ok < vision_ok. */
20
+ export declare const COST_RANK: Record<MaxCost, number>;
21
+ /** Keep the current map + one prior (diagnostics); only current resolves. */
22
+ export declare const MAX_HELD = 2;
23
+ type Resolution = {
24
+ ok: true;
25
+ map: UIMap;
26
+ } | {
27
+ ok: false;
28
+ reason: 'unknown' | 'stale' | 'expired';
29
+ };
30
+ export declare class UIMapHolder {
31
+ private held;
32
+ private counter;
33
+ private invalidated;
34
+ /** Mint the next session-scoped id; caller passes it to compileUIMap. */
35
+ nextId(): string;
36
+ /** Store a compiled map as the new current; records the compiled max_cost
37
+ * (for currentIfCost reuse); un-invalidates; bounds to MAX_HELD. */
38
+ put(map: UIMap, now: number, maxCost?: MaxCost): void;
39
+ /** Resolve a ref. Only the current, non-invalidated, in-TTL map is usable. */
40
+ resolve(snapshotId: string, now: number): Resolution;
41
+ /** Return the current map iff it resolves (fresh/in-TTL/not-invalidated) AND
42
+ * was compiled at a cost >= requested. Else null (caller compiles fresh).
43
+ * Correctness first, cost-reuse second. */
44
+ currentIfCost(requested: MaxCost, now: number): UIMap | null;
45
+ /** Mark all held maps invalid — called after any screen-changing action. */
46
+ invalidate(): void;
47
+ /** Re-stamp the current map's compiledAt — called when the loop re-ADVERTISES
48
+ * an existing map to the model (§6b reuse branch), so the TTL clock runs
49
+ * from the last advertisement, not the original compile. No-op unless the
50
+ * id is the current, non-invalidated map (never resurrects stale maps). */
51
+ touch(snapshotId: string, now: number): void;
52
+ currentId(): string | undefined;
53
+ /** The latest held map (for rendering/inspection), or undefined. Unlike
54
+ * resolve(), this ignores TTL/invalidation — callers that need a resolvable
55
+ * map use resolve()/currentIfCost(). */
56
+ current(): UIMap | undefined;
57
+ }
58
+ export {};
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UIMapHolder = exports.MAX_HELD = exports.COST_RANK = exports.TTL_MS = void 0;
4
+ /**
5
+ * Wall-clock backstop for ref freshness. The PRIMARY staleness signal is
6
+ * event-driven (`invalidate()` after every screen-changing action) plus the
7
+ * resolve-time window guard (pid/title must still match) — the TTL only
8
+ * catches background drift no agent action caused. It must therefore be
9
+ * sized to SURVIVE an LLM round-trip: refs are advertised at the end of
10
+ * turn N and consumed on turn N+1, after prompt assembly + a full model
11
+ * call (45s timeout, backoff retries). The original 5s expired virtually
12
+ * every cross-turn ref (audit 2026-06-10, finding A2).
13
+ */
14
+ exports.TTL_MS = 60_000;
15
+ /** Perception-cost ordering for reuse decisions: cheap < ocr_ok < vision_ok. */
16
+ exports.COST_RANK = { cheap: 0, ocr_ok: 1, vision_ok: 2 };
17
+ /** Keep the current map + one prior (diagnostics); only current resolves. */
18
+ exports.MAX_HELD = 2;
19
+ class UIMapHolder {
20
+ held = [];
21
+ counter = 0;
22
+ invalidated = false;
23
+ /** Mint the next session-scoped id; caller passes it to compileUIMap. */
24
+ nextId() {
25
+ this.counter += 1;
26
+ return `obs_${this.counter}`;
27
+ }
28
+ /** Store a compiled map as the new current; records the compiled max_cost
29
+ * (for currentIfCost reuse); un-invalidates; bounds to MAX_HELD. */
30
+ put(map, now, maxCost) {
31
+ this.held.push({ map, compiledAt: now, maxCost });
32
+ if (this.held.length > exports.MAX_HELD)
33
+ this.held.shift();
34
+ this.invalidated = false;
35
+ }
36
+ /** Resolve a ref. Only the current, non-invalidated, in-TTL map is usable. */
37
+ resolve(snapshotId, now) {
38
+ const current = this.held[this.held.length - 1];
39
+ if (!current || current.map.snapshot_id !== snapshotId) {
40
+ const heldOlder = this.held.some(h => h.map.snapshot_id === snapshotId);
41
+ return { ok: false, reason: heldOlder ? 'stale' : 'unknown' };
42
+ }
43
+ if (this.invalidated)
44
+ return { ok: false, reason: 'stale' };
45
+ if (now - current.compiledAt > exports.TTL_MS)
46
+ return { ok: false, reason: 'expired' };
47
+ return { ok: true, map: current.map };
48
+ }
49
+ /** Return the current map iff it resolves (fresh/in-TTL/not-invalidated) AND
50
+ * was compiled at a cost >= requested. Else null (caller compiles fresh).
51
+ * Correctness first, cost-reuse second. */
52
+ currentIfCost(requested, now) {
53
+ const current = this.held[this.held.length - 1];
54
+ if (!current)
55
+ return null;
56
+ if (this.resolve(current.map.snapshot_id, now).ok !== true)
57
+ return null;
58
+ if (current.maxCost === undefined)
59
+ return null; // unknown cost → don't reuse
60
+ return exports.COST_RANK[current.maxCost] >= exports.COST_RANK[requested] ? current.map : null;
61
+ }
62
+ /** Mark all held maps invalid — called after any screen-changing action. */
63
+ invalidate() {
64
+ this.invalidated = true;
65
+ }
66
+ /** Re-stamp the current map's compiledAt — called when the loop re-ADVERTISES
67
+ * an existing map to the model (§6b reuse branch), so the TTL clock runs
68
+ * from the last advertisement, not the original compile. No-op unless the
69
+ * id is the current, non-invalidated map (never resurrects stale maps). */
70
+ touch(snapshotId, now) {
71
+ const current = this.held[this.held.length - 1];
72
+ if (!current || current.map.snapshot_id !== snapshotId || this.invalidated)
73
+ return;
74
+ current.compiledAt = now;
75
+ }
76
+ currentId() {
77
+ return this.held[this.held.length - 1]?.map.snapshot_id;
78
+ }
79
+ /** The latest held map (for rendering/inspection), or undefined. Unlike
80
+ * resolve(), this ignores TTL/invalidation — callers that need a resolvable
81
+ * map use resolve()/currentIfCost(). */
82
+ current() {
83
+ return this.held[this.held.length - 1]?.map;
84
+ }
85
+ }
86
+ exports.UIMapHolder = UIMapHolder;
87
+ //# sourceMappingURL=ui-map-holder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-map-holder.js","sourceRoot":"","sources":["../../../src/core/sense/ui-map-holder.ts"],"names":[],"mappings":";;;AAQA;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,MAAM,CAAC;AAE7B,gFAAgF;AACnE,QAAA,SAAS,GAA4B,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AACxF,6EAA6E;AAChE,QAAA,QAAQ,GAAG,CAAC,CAAC;AAI1B,MAAa,WAAW;IACd,IAAI,GAAiE,EAAE,CAAC;IACxE,OAAO,GAAG,CAAC,CAAC;IACZ,WAAW,GAAG,KAAK,CAAC;IAE5B,yEAAyE;IACzE,MAAM;QACJ,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;QAClB,OAAO,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;IAED;yEACqE;IACrE,GAAG,CAAC,GAAU,EAAE,GAAW,EAAE,OAAiB;QAC5C,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;QAClD,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,gBAAQ;YAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,8EAA8E;IAC9E,OAAO,CAAC,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O,iBAAS,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,iBAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACjF,CAAC;IAED,4EAA4E;IAC5E,UAAU;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAED;;;gFAG4E;IAC5E,KAAK,CAAC,UAAkB,EAAE,GAAW;QACnC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,UAAU,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QACnF,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC;IAC3B,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC;IAC1D,CAAC;IAED;;6CAEyC;IACzC,OAAO;QACL,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC;IAC9C,CAAC;CACF;AAnED,kCAmEC"}
@@ -0,0 +1,19 @@
1
+ import type { Role, Source } from './ui-map-types';
2
+ /** Map a UIA/AX control type (e.g. "ControlType.Button", "Edit", "TextField") to a Role. */
3
+ export declare function normalizeRole(controlType?: string): Role;
4
+ /** Trim, lowercase, collapse internal whitespace. */
5
+ export declare function normText(text?: string): string;
6
+ /**
7
+ * Capability flags. role describes WHAT it is; these describe WHAT YOU CAN DO.
8
+ * a11y elements carry pattern intent via role + enabled; OCR-only elements have
9
+ * no pattern info, so they're read-only text unless a later source corroborates.
10
+ */
11
+ export declare function inferCapabilities(opts: {
12
+ role: Role;
13
+ source: Source;
14
+ enabled?: boolean;
15
+ }): {
16
+ clickable: boolean;
17
+ editable: boolean;
18
+ actionable: boolean;
19
+ };
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeRole = normalizeRole;
4
+ exports.normText = normText;
5
+ exports.inferCapabilities = inferCapabilities;
6
+ // Canonical roles keyed by BOTH Windows UIA control-type strings and macOS AX
7
+ // role strings (after the platform adapters strip "ControlType."/"AX"). The map
8
+ // was originally UIA-only, which meant macOS AX inputs ("TextField"/"TextArea")
9
+ // and links ("Link") fell through to 'unknown' → editable/clickable both false →
10
+ // the entire el_NN find_field/find_action/{element_id}-fill + link-click surface
11
+ // was DEAD on macOS (audit 2026-06-11, M1). AX synonyms below restore parity.
12
+ const ROLE_MAP = {
13
+ // buttons
14
+ button: 'button', splitbutton: 'button', menuitem: 'button',
15
+ menubutton: 'button', popupbutton: 'button', // AX
16
+ // text inputs
17
+ edit: 'input', document: 'input', combobox: 'input', spinner: 'input',
18
+ textfield: 'input', textarea: 'input', securetextfield: 'input', // AX
19
+ passwordfield: 'input', searchfield: 'input', incrementor: 'input', // AX
20
+ // static text
21
+ text: 'text', statictext: 'text',
22
+ // links
23
+ hyperlink: 'link', link: 'link', // link (UIA), AXLink
24
+ // toggles
25
+ checkbox: 'checkbox', radiobutton: 'checkbox',
26
+ checkboxcell: 'checkbox', radiobuttoncell: 'checkbox', // AX cells
27
+ // lists
28
+ list: 'list', listbox: 'list', table: 'list', outline: 'list', // AX table/outline
29
+ listitem: 'listitem', treeitem: 'listitem', row: 'listitem', cell: 'listitem',
30
+ // tabs
31
+ tab: 'tab', tabitem: 'tab', radiobuttongroup: 'tab',
32
+ // images
33
+ image: 'image',
34
+ };
35
+ /** Map a UIA/AX control type (e.g. "ControlType.Button", "Edit", "TextField") to a Role. */
36
+ function normalizeRole(controlType) {
37
+ if (!controlType)
38
+ return 'unknown';
39
+ // Strip the UIA "ControlType." prefix AND any residual macOS "AX" prefix
40
+ // (the adapter usually strips it, but be defensive so "AXTextField" maps too).
41
+ const key = controlType
42
+ .replace(/^ControlType\./, '')
43
+ .replace(/^AX/, '')
44
+ .trim().toLowerCase();
45
+ return ROLE_MAP[key] ?? 'unknown';
46
+ }
47
+ /** Trim, lowercase, collapse internal whitespace. */
48
+ function normText(text) {
49
+ return (text ?? '').trim().toLowerCase().replace(/\s+/g, ' ');
50
+ }
51
+ const CLICKABLE_ROLES = new Set(['button', 'link', 'checkbox', 'listitem', 'tab']);
52
+ /**
53
+ * Capability flags. role describes WHAT it is; these describe WHAT YOU CAN DO.
54
+ * a11y elements carry pattern intent via role + enabled; OCR-only elements have
55
+ * no pattern info, so they're read-only text unless a later source corroborates.
56
+ */
57
+ function inferCapabilities(opts) {
58
+ const fromA11y = opts.source === 'a11y';
59
+ const clickable = fromA11y && CLICKABLE_ROLES.has(opts.role);
60
+ const editable = fromA11y && opts.role === 'input';
61
+ const enabled = opts.enabled !== false;
62
+ const actionable = (clickable || editable) && enabled;
63
+ return { clickable, editable, actionable };
64
+ }
65
+ //# sourceMappingURL=ui-map-normalize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-map-normalize.js","sourceRoot":"","sources":["../../../src/core/sense/ui-map-normalize.ts"],"names":[],"mappings":";;AAiCA,sCASC;AAGD,4BAEC;AASD,8CASC;AA/DD,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,iFAAiF;AACjF,iFAAiF;AACjF,8EAA8E;AAC9E,MAAM,QAAQ,GAAyB;IACrC,UAAU;IACV,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IAC3D,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK;IAClD,cAAc;IACd,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;IACrE,SAAS,EAAE,OAAO,EAAE,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E,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,eAAe,GAAG,IAAI,GAAG,CAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;AAEzF;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,IAAuD;IAGvF,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC;IACxC,MAAM,SAAS,GAAG,QAAQ,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,QAAQ,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC;IACvC,MAAM,UAAU,GAAG,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,OAAO,CAAC;IACtD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { UIMap } from './ui-map-types';
2
+ export declare function renderUIMap(map: UIMap, opts?: {
3
+ max?: number;
4
+ }): string;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.renderUIMap = renderUIMap;
4
+ const DEFAULT_MAX = 120;
5
+ /** Rank: actionable first, then by confidence. */
6
+ function rankScore(e) {
7
+ return (e.actionable ? 1000 : 0) + e.confidence * 100;
8
+ }
9
+ function line(e) {
10
+ const flags = [];
11
+ if (e.state?.focused)
12
+ flags.push('focused');
13
+ if (e.clickable)
14
+ flags.push('clickable');
15
+ if (e.editable)
16
+ flags.push('editable');
17
+ if (e.state?.enabled === false)
18
+ flags.push('disabled');
19
+ const [x, y, w, h] = e.bounds;
20
+ const conf = e.confidence.toFixed(2);
21
+ const flagStr = flags.length ? ` {${flags.join(',')}}` : '';
22
+ const val = e.state?.value ? ` = "${e.state.value.length > 60 ? e.state.value.slice(0, 59) + '…' : e.state.value}"` : '';
23
+ return `${e.id} [${e.role}] "${e.text ?? e.normalized_text ?? ''}"${val} (${conf} ${e.sources.join(',')}) @${x},${y} ${w}x${h}${flagStr}`;
24
+ }
25
+ function renderUIMap(map, opts = {}) {
26
+ const max = opts.max ?? DEFAULT_MAX;
27
+ const ranked = [...map.elements].sort((a, b) => rankScore(b) - rankScore(a));
28
+ const shown = ranked.slice(0, max);
29
+ const body = shown.map(line).join('\n');
30
+ const context = `${map.active_app} — "${map.window_title}" [${map.snapshot_id}] (${map.sources_used.join('+')})`;
31
+ const trunc = ranked.length > max ? `\n… ${max} of ${ranked.length} shown` : '';
32
+ return `${body}${trunc}\n${context}`;
33
+ }
34
+ //# sourceMappingURL=ui-map-render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-map-render.js","sourceRoot":"","sources":["../../../src/core/sense/ui-map-render.ts"],"names":[],"mappings":";;AAsBA,kCAQC;AA5BD,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,kDAAkD;AAClD,SAAS,SAAS,CAAC,CAAY;IAC7B,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC;AACxD,CAAC;AAED,SAAS,IAAI,CAAC,CAAY;IACxB,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO;QAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC5C,IAAI,CAAC,CAAC,SAAS;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,CAAC,CAAC,QAAQ;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,KAAK,K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SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,OAAO,GAAG,GAAG,GAAG,CAAC,UAAU,OAAO,GAAG,CAAC,YAAY,MAAM,GAAG,CAAC,WAAW,MAAM,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACjH,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,GAAG,OAAO,MAAM,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;IAChF,OAAO,GAAG,IAAI,GAAG,KAAK,KAAK,OAAO,EAAE,CAAC;AACvC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Shared resolve + gate + dispatch-plan for el_NN element refs on
3
+ * invoke_element / set_field_value. Pure (no platform calls) — the caller
4
+ * passes the live active window so this stays unit-testable. See the Part 2
5
+ * spec section 5.
6
+ */
7
+ import type { UIElement, Bounds } from './ui-map-types';
8
+ import type { UIMapHolder } from './ui-map-holder';
9
+ /** Below this, an el_NN ref is too uncertain to act on. */
10
+ export declare const REF_MIN_CONFIDENCE = 0.5;
11
+ export type RefIntent = 'click' | 'fill';
12
+ interface ActiveWindow {
13
+ processId: number;
14
+ processName: string;
15
+ title: string;
16
+ bounds: {
17
+ x: number;
18
+ y: number;
19
+ width: number;
20
+ height: number;
21
+ };
22
+ }
23
+ export type RefPlan = {
24
+ ok: true;
25
+ via: 'name';
26
+ name: string;
27
+ element: UIElement;
28
+ } | {
29
+ ok: true;
30
+ via: 'bounds';
31
+ bounds: Bounds;
32
+ element: UIElement;
33
+ } | {
34
+ ok: false;
35
+ error: string;
36
+ };
37
+ export declare function resolveRef(ref: {
38
+ element_id?: string;
39
+ snapshot_id?: string;
40
+ }, holder: UIMapHolder | undefined, now: number, intent: RefIntent, activeWindow: ActiveWindow | null): RefPlan;
41
+ export {};
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REF_MIN_CONFIDENCE = void 0;
4
+ exports.resolveRef = resolveRef;
5
+ /** Below this, an el_NN ref is too uncertain to act on. */
6
+ exports.REF_MIN_CONFIDENCE = 0.5;
7
+ function boundsInside(b, w) {
8
+ const [x, y, bw, bh] = b;
9
+ return x >= w.x && y >= w.y && x + bw <= w.x + w.width && y + bh <= w.y + w.height;
10
+ }
11
+ function resolveRef(ref, holder, now, intent, activeWindow) {
12
+ const hasId = typeof ref.element_id === 'string' && ref.element_id !== '';
13
+ const hasSnap = typeof ref.snapshot_id === 'string' && ref.snapshot_id !== '';
14
+ if (hasId !== hasSnap)
15
+ return { ok: false, error: 'provide element_id and snapshot_id together, or neither (use name)' };
16
+ if (!holder)
17
+ return { ok: false, error: 'no UIMap holder on this context' };
18
+ const r = holder.resolve(ref.snapshot_id, now);
19
+ if (!r.ok) {
20
+ const msg = r.reason === 'unknown' ? `unknown snapshot ${ref.snapshot_id} — call compile_ui first`
21
+ : r.reason === 'expired' ? 'snapshot expired — call compile_ui again'
22
+ : 'stale snapshot — the screen changed; call compile_ui again';
23
+ return { ok: false, error: msg };
24
+ }
25
+ const map = r.map;
26
+ const element = map.elements.find(e => e.id === ref.element_id);
27
+ if (!element)
28
+ return { ok: false, error: `element ${ref.element_id} not in snapshot ${ref.snapshot_id}` };
29
+ if (element.confidence < exports.REF_MIN_CONFIDENCE)
30
+ return { ok: false, error: `element ${element.id} confidence too low to act on — recompile / re-find` };
31
+ if (intent === 'click' && (!element.actionable || element.state?.enabled === false))
32
+ return { ok: false, error: `element ${element.id} is not actionable (disabled?)` };
33
+ if (intent === 'fill' && !element.editable)
34
+ return { ok: false, error: `element ${element.id} is not editable` };
35
+ // The map's window must STILL be the active window — for BOTH dispatch paths
36
+ // (a unique name is no safer than bounds if the window changed under us).
37
+ if (!activeWindow)
38
+ return { ok: false, error: 'cannot verify active window — call compile_ui again' };
39
+ // A zero/empty pid means the adapter couldn't read it (macOS unixId read can
40
+ // fail → normalizeWindow defaults to 0; Windows shares the `?? 0` pattern), so
41
+ // treat it as UNKNOWN and fall back to the title instead of comparing against a
42
+ // bogus 0 — which would spuriously reject (or, if both sides are 0, falsely
43
+ // accept) (audit 2026-06-11, M6).
44
+ const pidKnown = map.process_id !== undefined && map.process_id !== '' && map.process_id !== '0';
45
+ const sameWin = pidKnown
46
+ ? String(activeWindow.processId) === map.process_id // pid is authoritative when known
47
+ : activeWindow.title === map.window_title; // fall back to title only when pid unknown
48
+ if (!sameWin)
49
+ return { ok: false, error: 'window changed since compile — call compile_ui again' };
50
+ // Prefer the reliable a11y path when the name is unique; else disambiguate by bounds.
51
+ const name = element.normalized_text ?? '';
52
+ const uniqueName = name !== '' && map.elements.filter(e => e.normalized_text === name).length === 1;
53
+ if (uniqueName)
54
+ return { ok: true, via: 'name', name, element };
55
+ if (!boundsInside(element.bounds, activeWindow.bounds))
56
+ return { ok: false, error: 'element is off the active window — call compile_ui again' };
57
+ return { ok: true, via: 'bounds', bounds: element.bounds, element };
58
+ }
59
+ //# sourceMappingURL=ui-map-resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-map-resolve.js","sourceRoot":"","sources":["../../../src/core/sense/ui-map-resolve.ts"],"names":[],"mappings":";;;AAyBA,gCAgDC;AAhED,2DAA2D;AAC9C,QAAA,kBAAkB,GAAG,GAAG,CAAC;AAUtC,SAAS,YAAY,CAAC,CAAS,EAAE,CAAyB;IACxD,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GA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Y,CAAC,CAAY,2CAA2C;IACnG,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,sDAAsD,EAAE,CAAC;IAElG,sFAAsF;IACtF,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC;IAC3C,MAAM,UAAU,GAAG,IAAI,KAAK,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;IACpG,IAAI,UAAU;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAEhE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,0DAA0D,EAAE,CAAC;IAChJ,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;AACtE,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * UI State Compiler (Layer A) data model. See
3
+ * docs/superpowers/specs/2026-06-07-ui-state-compiler-design.md.
4
+ */
5
+ import type { Platform } from './types';
6
+ /** Perception sources, ordered cheap → expensive. Array (not enum) for runtime checks. */
7
+ export declare const SOURCES: readonly ["window", "a11y", "ocr", "vision", "dom", "cursor"];
8
+ export type Source = typeof SOURCES[number];
9
+ /** Normalized UI roles. Array (not enum) for runtime validation via ROLES.includes(). */
10
+ export declare const ROLES: readonly ["button", "input", "text", "link", "checkbox", "list", "listitem", "tab", "image", "unknown"];
11
+ export type Role = typeof ROLES[number];
12
+ export type Bounds = [number, number, number, number];
13
+ export interface ElementRef {
14
+ id: string;
15
+ role: Role;
16
+ normalized_text?: string;
17
+ }
18
+ export interface UIElement {
19
+ id: string;
20
+ role: Role;
21
+ text?: string;
22
+ normalized_text?: string;
23
+ bounds: Bounds;
24
+ confidence: number;
25
+ sources: Source[];
26
+ actionable?: boolean;
27
+ clickable?: boolean;
28
+ editable?: boolean;
29
+ state?: {
30
+ focused?: boolean;
31
+ enabled?: boolean;
32
+ selected?: boolean;
33
+ expanded?: boolean;
34
+ value?: string;
35
+ };
36
+ }
37
+ export interface UIMap {
38
+ snapshot_id: string;
39
+ platform: Platform;
40
+ active_app: string;
41
+ process_id?: string;
42
+ window_id?: string;
43
+ window_title: string;
44
+ window_bounds: Bounds;
45
+ display_id?: string;
46
+ coordinate_space: 'screen';
47
+ scale_factor?: number;
48
+ compiled_at: string;
49
+ sources_used: Source[];
50
+ elements: UIElement[];
51
+ anchors: {
52
+ focused?: ElementRef;
53
+ primary_action_candidate?: ElementRef;
54
+ };
55
+ truncation?: {
56
+ total_elements: number;
57
+ returned_elements: number;
58
+ };
59
+ }
60
+ export type MaxCost = 'cheap' | 'ocr_ok' | 'vision_ok';
61
+ /** Caller knobs for compileUIMap. */
62
+ export interface CompileHints {
63
+ purpose?: 'general' | 'find_text' | 'act';
64
+ target_text?: string;
65
+ max_cost?: MaxCost;
66
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ROLES = exports.SOURCES = void 0;
4
+ /** Perception sources, ordered cheap → expensive. Array (not enum) for runtime checks. */
5
+ exports.SOURCES = ['window', 'a11y', 'ocr', 'vision', 'dom', 'cursor'];
6
+ /** Normalized UI roles. Array (not enum) for runtime validation via ROLES.includes(). */
7
+ exports.ROLES = [
8
+ 'button', 'input', 'text', 'link', 'checkbox',
9
+ 'list', 'listitem', 'tab', 'image', 'unknown',
10
+ ];
11
+ //# sourceMappingURL=ui-map-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-map-types.js","sourceRoot":"","sources":["../../../src/core/sense/ui-map-types.ts"],"names":[],"mappings":";;;AAMA,0FAA0F;AAC7E,QAAA,OAAO,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAGrF,yFAAyF;AAC5E,QAAA,KAAK,GAAG;IACnB,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IAC7C,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS;CACrC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * UI State Compiler (Layer A). Fuses a11y + OCR + (lazy) vision + window/display
3
+ * metadata into one UIMap. Pure orchestration over injected sources so it is
4
+ * unit-testable with no real UIA/OCR. See the design spec
5
+ * docs/superpowers/specs/2026-06-07-ui-state-compiler-design.md.
6
+ */
7
+ import type { PlatformAdapter, ScreenshotResult } from '../../platform/types';
8
+ import type { Snapshot } from './types';
9
+ import type { OcrResult } from '../../platform/ocr-engine';
10
+ import type { UIMap, CompileHints } from './ui-map-types';
11
+ export interface CompileDeps {
12
+ /** a11y spine — defaults to captureSnapshot(adapter) in production. */
13
+ captureSnapshot: () => Promise<Snapshot>;
14
+ /** OCR puller — defaults to () => new OcrEngine().recognizeScreen(). */
15
+ ocr: () => Promise<OcrResult>;
16
+ /** Vision puller — defaults to adapter.screenshot(). */
17
+ vision: () => Promise<ScreenshotResult>;
18
+ getScreenSize: PlatformAdapter['getScreenSize'];
19
+ getFocusedElement: PlatformAdapter['getFocusedElement'];
20
+ /** Previous turn's anchors, for cross-turn continuity (optional). */
21
+ prevAnchors?: UIMap['anchors'];
22
+ /** Caller-passed clock + id (pure: no Date.now in this module). */
23
+ now: number;
24
+ snapshotId: string;
25
+ }
26
+ export declare function compileUIMap(deps: CompileDeps, hints: CompileHints): Promise<UIMap>;
27
+ /** Production deps wired to a real adapter. now/snapshotId are caller-passed
28
+ * (the agent loop owns the clock + the obs_N counter). */
29
+ export declare function defaultCompileDeps(adapter: PlatformAdapter, now: number, snapshotId: string, prevAnchors?: UIMap['anchors']): CompileDeps;