@zenalexa/unicli 0.217.0 → 0.218.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 (437) hide show
  1. package/AGENTS.md +36 -196
  2. package/README.md +59 -19
  3. package/README.zh-CN.md +36 -15
  4. package/crates/unicli-atspi/Cargo.toml +47 -0
  5. package/crates/unicli-atspi/README.md +6 -0
  6. package/crates/unicli-atspi/src/errors.rs +213 -0
  7. package/crates/unicli-atspi/src/input.rs +1004 -0
  8. package/crates/unicli-atspi/src/invoke.rs +1132 -0
  9. package/crates/unicli-atspi/src/main.rs +130 -0
  10. package/crates/unicli-atspi/src/refs.rs +24 -0
  11. package/crates/unicli-atspi/src/screenshot.rs +756 -0
  12. package/crates/unicli-atspi/src/tree.rs +2319 -0
  13. package/crates/unicli-shared/Cargo.toml +13 -0
  14. package/crates/unicli-shared/src/lib.rs +77 -0
  15. package/crates/unicli-uia/Cargo.toml +29 -0
  16. package/crates/unicli-uia/README.md +6 -0
  17. package/crates/unicli-uia/src/errors.rs +179 -0
  18. package/crates/unicli-uia/src/input.rs +790 -0
  19. package/crates/unicli-uia/src/invoke.rs +977 -0
  20. package/crates/unicli-uia/src/main.rs +130 -0
  21. package/crates/unicli-uia/src/refs.rs +24 -0
  22. package/crates/unicli-uia/src/screenshot.rs +685 -0
  23. package/crates/unicli-uia/src/tree.rs +2135 -0
  24. package/dist/adapters/macos/actions.d.ts +9 -0
  25. package/dist/adapters/macos/actions.d.ts.map +1 -0
  26. package/dist/adapters/macos/actions.js +55 -0
  27. package/dist/adapters/macos/actions.js.map +1 -0
  28. package/dist/browser/bridge.d.ts +2 -0
  29. package/dist/browser/bridge.d.ts.map +1 -1
  30. package/dist/browser/bridge.js +39 -0
  31. package/dist/browser/bridge.js.map +1 -1
  32. package/dist/browser/cdp-client.d.ts +2 -0
  33. package/dist/browser/cdp-client.d.ts.map +1 -1
  34. package/dist/browser/cdp-client.js +7 -0
  35. package/dist/browser/cdp-client.js.map +1 -1
  36. package/dist/browser/page.d.ts +2 -0
  37. package/dist/browser/page.d.ts.map +1 -1
  38. package/dist/browser/page.js +35 -0
  39. package/dist/browser/page.js.map +1 -1
  40. package/dist/cli.d.ts.map +1 -1
  41. package/dist/cli.js +25 -2
  42. package/dist/cli.js.map +1 -1
  43. package/dist/commands/approvals.d.ts +3 -0
  44. package/dist/commands/approvals.d.ts.map +1 -0
  45. package/dist/commands/approvals.js +123 -0
  46. package/dist/commands/approvals.js.map +1 -0
  47. package/dist/commands/auth.d.ts +1 -0
  48. package/dist/commands/auth.d.ts.map +1 -1
  49. package/dist/commands/auth.js +250 -0
  50. package/dist/commands/auth.js.map +1 -1
  51. package/dist/commands/browser-operator-runtime.d.ts.map +1 -1
  52. package/dist/commands/browser-operator-runtime.js +1 -0
  53. package/dist/commands/browser-operator-runtime.js.map +1 -1
  54. package/dist/commands/browser-operator.d.ts.map +1 -1
  55. package/dist/commands/browser-operator.js +84 -12
  56. package/dist/commands/browser-operator.js.map +1 -1
  57. package/dist/commands/compute.d.ts +3 -0
  58. package/dist/commands/compute.d.ts.map +1 -0
  59. package/dist/commands/compute.js +324 -0
  60. package/dist/commands/compute.js.map +1 -0
  61. package/dist/commands/dev.js +1 -0
  62. package/dist/commands/dev.js.map +1 -1
  63. package/dist/commands/dispatch.d.ts.map +1 -1
  64. package/dist/commands/dispatch.js +10 -4
  65. package/dist/commands/dispatch.js.map +1 -1
  66. package/dist/commands/doctor-compute.d.ts +38 -0
  67. package/dist/commands/doctor-compute.d.ts.map +1 -0
  68. package/dist/commands/doctor-compute.js +376 -0
  69. package/dist/commands/doctor-compute.js.map +1 -0
  70. package/dist/commands/health.d.ts.map +1 -1
  71. package/dist/commands/health.js +1 -0
  72. package/dist/commands/health.js.map +1 -1
  73. package/dist/commands/lint.d.ts.map +1 -1
  74. package/dist/commands/lint.js +78 -1
  75. package/dist/commands/lint.js.map +1 -1
  76. package/dist/commands/mcp.d.ts.map +1 -1
  77. package/dist/commands/mcp.js +4 -0
  78. package/dist/commands/mcp.js.map +1 -1
  79. package/dist/commands/repair.d.ts +1 -0
  80. package/dist/commands/repair.d.ts.map +1 -1
  81. package/dist/commands/repair.js +103 -61
  82. package/dist/commands/repair.js.map +1 -1
  83. package/dist/commands/runs.d.ts +3 -0
  84. package/dist/commands/runs.d.ts.map +1 -0
  85. package/dist/commands/runs.js +367 -0
  86. package/dist/commands/runs.js.map +1 -0
  87. package/dist/core/envelope.d.ts +8 -0
  88. package/dist/core/envelope.d.ts.map +1 -1
  89. package/dist/core/envelope.js +1 -0
  90. package/dist/core/envelope.js.map +1 -1
  91. package/dist/discovery/aliases.d.ts.map +1 -1
  92. package/dist/discovery/aliases.js +15 -0
  93. package/dist/discovery/aliases.js.map +1 -1
  94. package/dist/discovery/loader.d.ts.map +1 -1
  95. package/dist/discovery/loader.js +9 -0
  96. package/dist/discovery/loader.js.map +1 -1
  97. package/dist/discovery/macos-dynamic.d.ts +58 -0
  98. package/dist/discovery/macos-dynamic.d.ts.map +1 -0
  99. package/dist/discovery/macos-dynamic.js +429 -0
  100. package/dist/discovery/macos-dynamic.js.map +1 -0
  101. package/dist/discovery/search.d.ts.map +1 -1
  102. package/dist/discovery/search.js +152 -3
  103. package/dist/discovery/search.js.map +1 -1
  104. package/dist/electron-apps.d.ts +1 -0
  105. package/dist/electron-apps.d.ts.map +1 -1
  106. package/dist/electron-apps.js +1 -0
  107. package/dist/electron-apps.js.map +1 -1
  108. package/dist/engine/approval-store.d.ts +43 -0
  109. package/dist/engine/approval-store.d.ts.map +1 -0
  110. package/dist/engine/approval-store.js +193 -0
  111. package/dist/engine/approval-store.js.map +1 -0
  112. package/dist/engine/browser/action-evidence.d.ts +2 -0
  113. package/dist/engine/browser/action-evidence.d.ts.map +1 -1
  114. package/dist/engine/browser/action-evidence.js +35 -1
  115. package/dist/engine/browser/action-evidence.js.map +1 -1
  116. package/dist/engine/browser/evidence.d.ts +22 -0
  117. package/dist/engine/browser/evidence.d.ts.map +1 -1
  118. package/dist/engine/browser/evidence.js +72 -0
  119. package/dist/engine/browser/evidence.js.map +1 -1
  120. package/dist/engine/browser/session-lease.d.ts +53 -0
  121. package/dist/engine/browser/session-lease.d.ts.map +1 -0
  122. package/dist/engine/browser/session-lease.js +100 -0
  123. package/dist/engine/browser/session-lease.js.map +1 -0
  124. package/dist/engine/browser/session-lock.d.ts +17 -0
  125. package/dist/engine/browser/session-lock.d.ts.map +1 -0
  126. package/dist/engine/browser/session-lock.js +114 -0
  127. package/dist/engine/browser/session-lock.js.map +1 -0
  128. package/dist/engine/browser/session-runtime.d.ts +10 -0
  129. package/dist/engine/browser/session-runtime.d.ts.map +1 -0
  130. package/dist/engine/browser/session-runtime.js +87 -0
  131. package/dist/engine/browser/session-runtime.js.map +1 -0
  132. package/dist/engine/capability-policy.d.ts +13 -2
  133. package/dist/engine/capability-policy.d.ts.map +1 -1
  134. package/dist/engine/capability-policy.js +113 -3
  135. package/dist/engine/capability-policy.js.map +1 -1
  136. package/dist/engine/chromium-cookies-platform.d.ts +69 -0
  137. package/dist/engine/chromium-cookies-platform.d.ts.map +1 -0
  138. package/dist/engine/chromium-cookies-platform.js +315 -0
  139. package/dist/engine/chromium-cookies-platform.js.map +1 -0
  140. package/dist/engine/chromium-cookies-types.d.ts +26 -0
  141. package/dist/engine/chromium-cookies-types.d.ts.map +1 -0
  142. package/dist/engine/chromium-cookies-types.js +16 -0
  143. package/dist/engine/chromium-cookies-types.js.map +1 -0
  144. package/dist/engine/chromium-cookies.d.ts +56 -0
  145. package/dist/engine/chromium-cookies.d.ts.map +1 -0
  146. package/dist/engine/chromium-cookies.js +361 -0
  147. package/dist/engine/chromium-cookies.js.map +1 -0
  148. package/dist/engine/cookies.d.ts +13 -5
  149. package/dist/engine/cookies.d.ts.map +1 -1
  150. package/dist/engine/cookies.js +55 -9
  151. package/dist/engine/cookies.js.map +1 -1
  152. package/dist/engine/executor.d.ts +16 -3
  153. package/dist/engine/executor.d.ts.map +1 -1
  154. package/dist/engine/executor.js +10 -3
  155. package/dist/engine/executor.js.map +1 -1
  156. package/dist/engine/kernel/execute.d.ts +1 -0
  157. package/dist/engine/kernel/execute.d.ts.map +1 -1
  158. package/dist/engine/kernel/execute.js +126 -3
  159. package/dist/engine/kernel/execute.js.map +1 -1
  160. package/dist/engine/kernel/types.d.ts +13 -0
  161. package/dist/engine/kernel/types.d.ts.map +1 -1
  162. package/dist/engine/operation-policy.d.ts +9 -1
  163. package/dist/engine/operation-policy.d.ts.map +1 -1
  164. package/dist/engine/operation-policy.js +6 -2
  165. package/dist/engine/operation-policy.js.map +1 -1
  166. package/dist/engine/permission-rules.d.ts +43 -0
  167. package/dist/engine/permission-rules.d.ts.map +1 -0
  168. package/dist/engine/permission-rules.js +401 -0
  169. package/dist/engine/permission-rules.js.map +1 -0
  170. package/dist/engine/permission-runtime.d.ts +11 -0
  171. package/dist/engine/permission-runtime.d.ts.map +1 -0
  172. package/dist/engine/permission-runtime.js +21 -0
  173. package/dist/engine/permission-runtime.js.map +1 -0
  174. package/dist/engine/repair/quarantine-discovery.d.ts +25 -0
  175. package/dist/engine/repair/quarantine-discovery.d.ts.map +1 -0
  176. package/dist/engine/repair/quarantine-discovery.js +78 -0
  177. package/dist/engine/repair/quarantine-discovery.js.map +1 -0
  178. package/dist/engine/repair/remedies.d.ts +4 -0
  179. package/dist/engine/repair/remedies.d.ts.map +1 -0
  180. package/dist/engine/repair/remedies.js +169 -0
  181. package/dist/engine/repair/remedies.js.map +1 -0
  182. package/dist/engine/runtime-resource-guard.d.ts +23 -0
  183. package/dist/engine/runtime-resource-guard.d.ts.map +1 -0
  184. package/dist/engine/runtime-resource-guard.js +85 -0
  185. package/dist/engine/runtime-resource-guard.js.map +1 -0
  186. package/dist/engine/session/args.d.ts +3 -0
  187. package/dist/engine/session/args.d.ts.map +1 -0
  188. package/dist/engine/session/args.js +17 -0
  189. package/dist/engine/session/args.js.map +1 -0
  190. package/dist/engine/session/compare.d.ts +92 -0
  191. package/dist/engine/session/compare.d.ts.map +1 -0
  192. package/dist/engine/session/compare.js +324 -0
  193. package/dist/engine/session/compare.js.map +1 -0
  194. package/dist/engine/session/environment.d.ts +4 -0
  195. package/dist/engine/session/environment.d.ts.map +1 -0
  196. package/dist/engine/session/environment.js +25 -0
  197. package/dist/engine/session/environment.js.map +1 -0
  198. package/dist/engine/session/events.d.ts +2 -0
  199. package/dist/engine/session/events.d.ts.map +1 -1
  200. package/dist/engine/session/events.js +12 -0
  201. package/dist/engine/session/events.js.map +1 -1
  202. package/dist/engine/session/query.d.ts +47 -0
  203. package/dist/engine/session/query.d.ts.map +1 -0
  204. package/dist/engine/session/query.js +299 -0
  205. package/dist/engine/session/query.js.map +1 -0
  206. package/dist/engine/session/replay.d.ts +35 -0
  207. package/dist/engine/session/replay.d.ts.map +1 -0
  208. package/dist/engine/session/replay.js +144 -0
  209. package/dist/engine/session/replay.js.map +1 -0
  210. package/dist/engine/session/run-loop.d.ts.map +1 -1
  211. package/dist/engine/session/run-loop.js +62 -23
  212. package/dist/engine/session/run-loop.js.map +1 -1
  213. package/dist/engine/session/store.d.ts +7 -0
  214. package/dist/engine/session/store.d.ts.map +1 -1
  215. package/dist/engine/session/store.js +131 -1
  216. package/dist/engine/session/store.js.map +1 -1
  217. package/dist/engine/session/types.d.ts +3 -1
  218. package/dist/engine/session/types.d.ts.map +1 -1
  219. package/dist/engine/steps/compute.d.ts +41 -0
  220. package/dist/engine/steps/compute.d.ts.map +1 -0
  221. package/dist/engine/steps/compute.js +55 -0
  222. package/dist/engine/steps/compute.js.map +1 -0
  223. package/dist/engine/steps/desktop-ax.d.ts +8 -0
  224. package/dist/engine/steps/desktop-ax.d.ts.map +1 -1
  225. package/dist/engine/steps/desktop-ax.js +16 -0
  226. package/dist/engine/steps/desktop-ax.js.map +1 -1
  227. package/dist/engine/steps/desktop-sidecar.d.ts +49 -0
  228. package/dist/engine/steps/desktop-sidecar.d.ts.map +1 -0
  229. package/dist/engine/steps/desktop-sidecar.js +50 -0
  230. package/dist/engine/steps/desktop-sidecar.js.map +1 -0
  231. package/dist/engine/steps/download.d.ts +1 -1
  232. package/dist/engine/steps/download.d.ts.map +1 -1
  233. package/dist/engine/steps/download.js +24 -2
  234. package/dist/engine/steps/download.js.map +1 -1
  235. package/dist/engine/steps/exec.d.ts +1 -1
  236. package/dist/engine/steps/exec.d.ts.map +1 -1
  237. package/dist/engine/steps/exec.js +23 -7
  238. package/dist/engine/steps/exec.js.map +1 -1
  239. package/dist/engine/steps/fetch-text.d.ts +1 -1
  240. package/dist/engine/steps/fetch-text.d.ts.map +1 -1
  241. package/dist/engine/steps/fetch-text.js +12 -4
  242. package/dist/engine/steps/fetch-text.js.map +1 -1
  243. package/dist/engine/steps/fetch.d.ts +2 -1
  244. package/dist/engine/steps/fetch.d.ts.map +1 -1
  245. package/dist/engine/steps/fetch.js +29 -6
  246. package/dist/engine/steps/fetch.js.map +1 -1
  247. package/dist/engine/steps/index.d.ts +2 -0
  248. package/dist/engine/steps/index.d.ts.map +1 -1
  249. package/dist/engine/steps/index.js +2 -0
  250. package/dist/engine/steps/index.js.map +1 -1
  251. package/dist/engine/steps/navigate.d.ts +1 -1
  252. package/dist/engine/steps/navigate.d.ts.map +1 -1
  253. package/dist/engine/steps/navigate.js +33 -2
  254. package/dist/engine/steps/navigate.js.map +1 -1
  255. package/dist/engine/template.d.ts +14 -4
  256. package/dist/engine/template.d.ts.map +1 -1
  257. package/dist/engine/template.js +93 -65
  258. package/dist/engine/template.js.map +1 -1
  259. package/dist/engine/verify-row-shape.d.ts +17 -0
  260. package/dist/engine/verify-row-shape.d.ts.map +1 -0
  261. package/dist/engine/verify-row-shape.js +36 -0
  262. package/dist/engine/verify-row-shape.js.map +1 -0
  263. package/dist/fast-path/handlers/adapter.d.ts +15 -0
  264. package/dist/fast-path/handlers/adapter.d.ts.map +1 -0
  265. package/dist/fast-path/handlers/adapter.js +169 -0
  266. package/dist/fast-path/handlers/adapter.js.map +1 -0
  267. package/dist/fast-path/handlers/discovery.d.ts +14 -0
  268. package/dist/fast-path/handlers/discovery.d.ts.map +1 -0
  269. package/dist/fast-path/handlers/discovery.js +280 -0
  270. package/dist/fast-path/handlers/discovery.js.map +1 -0
  271. package/dist/fast-path/manifest.d.ts +47 -0
  272. package/dist/fast-path/manifest.d.ts.map +1 -0
  273. package/dist/fast-path/manifest.js +32 -0
  274. package/dist/fast-path/manifest.js.map +1 -0
  275. package/dist/fast-path/parsed-argv.d.ts +16 -0
  276. package/dist/fast-path/parsed-argv.d.ts.map +1 -0
  277. package/dist/fast-path/parsed-argv.js +6 -0
  278. package/dist/fast-path/parsed-argv.js.map +1 -0
  279. package/dist/fast-path/policy.d.ts +25 -0
  280. package/dist/fast-path/policy.d.ts.map +1 -0
  281. package/dist/fast-path/policy.js +96 -0
  282. package/dist/fast-path/policy.js.map +1 -0
  283. package/dist/fast-path/render.d.ts +26 -0
  284. package/dist/fast-path/render.d.ts.map +1 -0
  285. package/dist/fast-path/render.js +200 -0
  286. package/dist/fast-path/render.js.map +1 -0
  287. package/dist/fast-path.d.ts +8 -10
  288. package/dist/fast-path.d.ts.map +1 -1
  289. package/dist/fast-path.js +66 -726
  290. package/dist/fast-path.js.map +1 -1
  291. package/dist/manifest-compact.txt +2 -2
  292. package/dist/manifest-search.json +1 -1
  293. package/dist/manifest.json +1030 -6
  294. package/dist/mcp/handler.d.ts +2 -2
  295. package/dist/mcp/handler.d.ts.map +1 -1
  296. package/dist/mcp/handler.js +59 -5
  297. package/dist/mcp/handler.js.map +1 -1
  298. package/dist/mcp/profiles/computer-use.d.ts +4 -0
  299. package/dist/mcp/profiles/computer-use.d.ts.map +1 -0
  300. package/dist/mcp/profiles/computer-use.js +305 -0
  301. package/dist/mcp/profiles/computer-use.js.map +1 -0
  302. package/dist/mcp/server.d.ts.map +1 -1
  303. package/dist/mcp/server.js +30 -6
  304. package/dist/mcp/server.js.map +1 -1
  305. package/dist/mcp/tools.d.ts +9 -0
  306. package/dist/mcp/tools.d.ts.map +1 -1
  307. package/dist/mcp/tools.js +20 -0
  308. package/dist/mcp/tools.js.map +1 -1
  309. package/dist/output/envelope.d.ts +6 -0
  310. package/dist/output/envelope.d.ts.map +1 -1
  311. package/dist/output/envelope.js.map +1 -1
  312. package/dist/output/error-map.d.ts.map +1 -1
  313. package/dist/output/error-map.js +4 -0
  314. package/dist/output/error-map.js.map +1 -1
  315. package/dist/registry.d.ts +1 -0
  316. package/dist/registry.d.ts.map +1 -1
  317. package/dist/registry.js +5 -0
  318. package/dist/registry.js.map +1 -1
  319. package/dist/transport/adapters/cdp-browser.d.ts +44 -8
  320. package/dist/transport/adapters/cdp-browser.d.ts.map +1 -1
  321. package/dist/transport/adapters/cdp-browser.js +356 -29
  322. package/dist/transport/adapters/cdp-browser.js.map +1 -1
  323. package/dist/transport/adapters/desktop-atspi.d.ts +23 -17
  324. package/dist/transport/adapters/desktop-atspi.d.ts.map +1 -1
  325. package/dist/transport/adapters/desktop-atspi.js +143 -32
  326. package/dist/transport/adapters/desktop-atspi.js.map +1 -1
  327. package/dist/transport/adapters/desktop-ax-helpers.d.ts +24 -0
  328. package/dist/transport/adapters/desktop-ax-helpers.d.ts.map +1 -0
  329. package/dist/transport/adapters/desktop-ax-helpers.js +190 -0
  330. package/dist/transport/adapters/desktop-ax-helpers.js.map +1 -0
  331. package/dist/transport/adapters/desktop-ax-swift.d.ts +13 -0
  332. package/dist/transport/adapters/desktop-ax-swift.d.ts.map +1 -1
  333. package/dist/transport/adapters/desktop-ax-swift.js +176 -2
  334. package/dist/transport/adapters/desktop-ax-swift.js.map +1 -1
  335. package/dist/transport/adapters/desktop-ax.d.ts +11 -2
  336. package/dist/transport/adapters/desktop-ax.d.ts.map +1 -1
  337. package/dist/transport/adapters/desktop-ax.js +131 -16
  338. package/dist/transport/adapters/desktop-ax.js.map +1 -1
  339. package/dist/transport/adapters/desktop-sidecar-errors.d.ts +3 -0
  340. package/dist/transport/adapters/desktop-sidecar-errors.d.ts.map +1 -0
  341. package/dist/transport/adapters/desktop-sidecar-errors.js +34 -0
  342. package/dist/transport/adapters/desktop-sidecar-errors.js.map +1 -0
  343. package/dist/transport/adapters/desktop-sidecar-snapshot.d.ts +10 -0
  344. package/dist/transport/adapters/desktop-sidecar-snapshot.d.ts.map +1 -0
  345. package/dist/transport/adapters/desktop-sidecar-snapshot.js +89 -0
  346. package/dist/transport/adapters/desktop-sidecar-snapshot.js.map +1 -0
  347. package/dist/transport/adapters/desktop-uia.d.ts +23 -17
  348. package/dist/transport/adapters/desktop-uia.d.ts.map +1 -1
  349. package/dist/transport/adapters/desktop-uia.js +142 -32
  350. package/dist/transport/adapters/desktop-uia.js.map +1 -1
  351. package/dist/transport/adapters/subprocess.d.ts +11 -4
  352. package/dist/transport/adapters/subprocess.d.ts.map +1 -1
  353. package/dist/transport/adapters/subprocess.js +68 -4
  354. package/dist/transport/adapters/subprocess.js.map +1 -1
  355. package/dist/transport/bus.d.ts +2 -0
  356. package/dist/transport/bus.d.ts.map +1 -1
  357. package/dist/transport/bus.js +7 -11
  358. package/dist/transport/bus.js.map +1 -1
  359. package/dist/transport/capability.d.ts.map +1 -1
  360. package/dist/transport/capability.js +123 -98
  361. package/dist/transport/capability.js.map +1 -1
  362. package/dist/transport/cascade.d.ts +5 -0
  363. package/dist/transport/cascade.d.ts.map +1 -0
  364. package/dist/transport/cascade.js +550 -0
  365. package/dist/transport/cascade.js.map +1 -0
  366. package/dist/transport/cdp-session.d.ts +11 -0
  367. package/dist/transport/cdp-session.d.ts.map +1 -0
  368. package/dist/transport/cdp-session.js +52 -0
  369. package/dist/transport/cdp-session.js.map +1 -0
  370. package/dist/transport/refs.d.ts +51 -0
  371. package/dist/transport/refs.d.ts.map +1 -0
  372. package/dist/transport/refs.js +135 -0
  373. package/dist/transport/refs.js.map +1 -0
  374. package/dist/transport/sidecar-binary.d.ts +18 -0
  375. package/dist/transport/sidecar-binary.d.ts.map +1 -0
  376. package/dist/transport/sidecar-binary.js +55 -0
  377. package/dist/transport/sidecar-binary.js.map +1 -0
  378. package/dist/transport/sidecar.d.ts +35 -0
  379. package/dist/transport/sidecar.d.ts.map +1 -0
  380. package/dist/transport/sidecar.js +134 -0
  381. package/dist/transport/sidecar.js.map +1 -0
  382. package/dist/transport/snapshot-encoder.d.ts +34 -0
  383. package/dist/transport/snapshot-encoder.d.ts.map +1 -0
  384. package/dist/transport/snapshot-encoder.js +139 -0
  385. package/dist/transport/snapshot-encoder.js.map +1 -0
  386. package/dist/transport/types.d.ts +6 -1
  387. package/dist/transport/types.d.ts.map +1 -1
  388. package/dist/types.d.ts +2 -0
  389. package/dist/types.d.ts.map +1 -1
  390. package/dist/types.js.map +1 -1
  391. package/docs/mcp/clients/claude-code.md +29 -0
  392. package/docs/mcp/clients/claude-desktop.md +47 -0
  393. package/docs/mcp/clients/codex.md +29 -0
  394. package/docs/mcp/clients/cursor.md +38 -0
  395. package/docs/mcp/clients/gemini-cli.md +38 -0
  396. package/docs/operate/compute.md +172 -0
  397. package/docs/operate/electron.md +87 -0
  398. package/docs/operate/focus-behavior.md +40 -0
  399. package/docs/operate/troubleshooting.md +379 -0
  400. package/package.json +29 -4
  401. package/src/adapters/adguardhome/rules.yaml +1 -1
  402. package/src/adapters/adguardhome/stats.yaml +1 -1
  403. package/src/adapters/adguardhome/status.yaml +1 -1
  404. package/src/adapters/apple-music/rate-album.yaml +1 -2
  405. package/src/adapters/arxiv/trending.yaml +1 -1
  406. package/src/adapters/az/account.yaml +1 -1
  407. package/src/adapters/coupang/hot.yaml +2 -1
  408. package/src/adapters/ctrip/hot.yaml +2 -1
  409. package/src/adapters/ctrip/search.yaml +2 -1
  410. package/src/adapters/douban/top250.yaml +1 -1
  411. package/src/adapters/figma/export-selected.yaml +1 -2
  412. package/src/adapters/gcloud/projects.yaml +1 -1
  413. package/src/adapters/github-trending/developers.yaml +1 -1
  414. package/src/adapters/github-trending/weekly.yaml +1 -1
  415. package/src/adapters/homebrew/search.yaml +1 -1
  416. package/src/adapters/imdb/top.yaml +1 -1
  417. package/src/adapters/itch-io/popular.yaml +1 -1
  418. package/src/adapters/itch-io/top.yaml +1 -1
  419. package/src/adapters/juejin/hot.test.ts +25 -0
  420. package/src/adapters/juejin/hot.yaml +52 -0
  421. package/src/adapters/juejin/search.test.ts +27 -0
  422. package/src/adapters/juejin/search.yaml +58 -0
  423. package/src/adapters/leetcode/discuss-search.test.ts +29 -0
  424. package/src/adapters/leetcode/discuss-search.yaml +56 -0
  425. package/src/adapters/macos/actions.ts +63 -0
  426. package/src/adapters/mastodon/timeline.yaml +1 -1
  427. package/src/adapters/openrouter/search.yaml +1 -1
  428. package/src/adapters/pypi/search.yaml +2 -1
  429. package/src/adapters/sspai/hot.yaml +4 -1
  430. package/src/adapters/sspai/latest.yaml +3 -3
  431. package/src/adapters/tieba/hot.yaml +1 -1
  432. package/src/adapters/wikipedia/today.yaml +1 -1
  433. package/src/adapters/zoom/toggle-mute.yaml +1 -2
  434. package/dist/engine/yaml-runner.d.ts +0 -11
  435. package/dist/engine/yaml-runner.d.ts.map +0 -1
  436. package/dist/engine/yaml-runner.js +0 -18
  437. package/dist/engine/yaml-runner.js.map +0 -1
package/AGENTS.md CHANGED
@@ -1,215 +1,55 @@
1
1
  # Uni-CLI
2
2
 
3
- <!-- IF YOU ARE AN AI AGENT: Read this file. It tells you everything you need.
4
- Install: npm install -g @zenalexa/unicli
5
- Discover: unicli search "your intent"
6
- Agent routing: unicli agents matrix && unicli agents recommend <agent>
7
- Run: unicli <site> <command> [args]
8
- Output is structured Markdown by default (non-TTY + agent UA auto-detected). Use -f json for JSON. Errors are structured envelopes to stderr.
9
- You can fix broken adapters yourself — read the Self-Repair section. -->
3
+ > AI agents: install with `npm install -g @zenalexa/unicli`. Discover with
4
+ > `unicli search "intent"`. Run with `unicli <site> <command>`. Output is
5
+ > Markdown when piped, JSON via `-f json`. Errors are structured envelopes
6
+ > on stderr. An `auth_required` envelope means the site needs cookies —
7
+ > run `unicli auth setup <site>` once and retry. Adapter is broken?
8
+ > Read `unicli repair <site> <command>`.
10
9
 
11
- <!-- BEGIN COUNTS -->
10
+ Universal CLI for websites, desktop apps, and local tools. YAML adapters are
11
+ self-repairing — agents can fix them by editing one file. See
12
+ `docs/BENCHMARK.md` for measured per-call token costs.
12
13
 
13
- > <!-- STATS:site_count -->235<!-- /STATS --> sites, <!-- STATS:command_count -->1448<!-- /STATS --> commands, <!-- STATS:pipeline_step_count -->59<!-- /STATS --> pipeline steps, BM25 bilingual search. `npm install -g @zenalexa/unicli`
14
-
15
- <!-- END COUNTS -->
16
-
17
- ## For AI Agents
18
-
19
- Universal CLI for websites, desktop apps, and local tools. Markdown when piped (structured envelope). Self-repairing YAML adapters.
20
-
21
- ```bash
22
- unicli search "twitter trending" # Find commands by intent
23
- unicli <site> <command> [options] # Run any command
24
- unicli repair <site> <command> # Diagnose + fix a broken adapter
25
- unicli list # All commands (MD when piped)
26
- ```
27
-
28
- ## Install
29
-
30
- ```bash
31
- npm install -g @zenalexa/unicli
32
- ```
33
-
34
- <!-- BEGIN ADAPTERS -->
35
-
36
- ## What You Can Do
37
-
38
- ### Web (138+ sites)
39
-
40
- **Chinese**: zhihu (24), xiaohongshu (22), bilibili (20), douyin (13), douban (12), v2ex (12), linux-do (11), jike (10), +31 more (`unicli list`)
41
-
42
- **International**: twitter (38), instagram (26), reddit (20), tiktok (16), youtube (16), nowcoder (16), discord-app (15), lesswrong (15), +48 more (`unicli list`)
43
-
44
- **AI / ML**: antigravity (16), chatwise (16), chatgpt (15), notebooklm (15), doubao-app (13), doubao (9), doubao-web (9), perplexity (8), +13 more (`unicli list`)
45
-
46
- **Finance**: eastmoney (18), xueqiu (14), binance (13), sinafinance (5), barchart (4), yahoo-finance (3), coinbase (2), futu (2)
47
-
48
- **Developer**: cursor (18), codex (17), vscode (10), docker-desktop (7), github-desktop (7), gitkraken (7), insomnia (7), postman (7), +16 more (`unicli list`)
49
-
50
- **News**: bloomberg (10), hackernews (10), 36kr (5), bbc (4), reuters (4), ithome (3), cnn (2), infoq (2), +3 more (`unicli list`)
51
-
52
- **Reference**: spotify (23), netease-music (17), linear (10), imdb (7), bitwarden (7), todoist (7), wikipedia (5), xiaoyuzhou (5), +11 more (`unicli list`)
53
-
54
- ### macOS (58 cmds)
55
-
56
- active-app, apps, apps-list, battery, bluetooth, brightness, caffeinate, calendar-create, calendar-list, calendar-today, clipboard, contacts-search, … (`unicli list --site macos`)
57
-
58
- ### Desktop (28 apps)
59
-
60
- freecad (15 cmds), blender (13 cmds), gimp (12 cmds), ffmpeg (11 cmds), audacity (8 cmds), figma (8 cmds), docker (7 cmds), excel (7 cmds), +20 more (`unicli list --category desktop`)
61
-
62
- ### Bridge (3 CLIs)
63
-
64
- gh (6 cmds), jq (2 cmds), yt-dlp (4 cmds)
65
-
66
- <!-- END ADAPTERS -->
67
-
68
- ## Authentication
69
-
70
- Some sites require cookies:
71
-
72
- ```bash
73
- unicli auth setup <site> # Show required cookies + template
74
- unicli auth check <site> # Validate cookie file
75
- unicli auth list # List configured sites
76
- ```
77
-
78
- Cookie file format: `{ "SESSDATA": "value", "bili_jct": "value" }`. Store at `~/.unicli/cookies/<site>.json`.
79
-
80
- Sites requiring auth: bilibili, weibo, zhihu, twitter, xueqiu, zsxq, jike, weread, douban, linux-do, v2ex (some commands).
81
-
82
- ## Output Contract
83
-
84
- Commands return v2 `AgentEnvelope` on stdout across adapter, core, ext/dev, and admin surfaces (`agents matrix/recommend/generate`, `auth`, `mcp`, `repair`, etc.). `mcp serve` and `acp` stay raw stdio protocol servers. Format auto-selected — pipe or set an agent UA env var for Markdown.
85
-
86
- ### Format auto-selection
87
-
88
- Priority: `-f` flag > `UNICLI_OUTPUT` env > non-TTY or agent-UA env (`md`) > `md` default. Values: `json | yaml | md | csv | compact`. Agent-UA env vars: `CLAUDE_CODE`, `CODEX_CLI`, `OPENCODE`, `HERMES_AGENT`, `UNICLI_AGENT`.
89
-
90
- ### Envelope shape
91
-
92
- Success:
93
-
94
- ```yaml
95
- ok: true
96
- schema_version: "2"
97
- command: "twitter.mentions"
98
- meta:
99
- duration_ms: 412
100
- count: 20
101
- surface: web # web | desktop | system | mobile
102
- pagination:
103
- has_more: true
104
- next_cursor: "abc123"
105
- data:
106
- - { id: "...", text: "...", author: "..." }
107
- error: null
108
- ```
109
-
110
- Error:
111
-
112
- ```yaml
113
- ok: false
114
- schema_version: "2"
115
- command: "twitter.mentions"
116
- meta:
117
- duration_ms: 91
118
- data: null
119
- error:
120
- code: auth_required # see error codes below
121
- message: "401 Unauthorized"
122
- adapter_path: "src/adapters/twitter/mentions.yaml"
123
- step: 1
124
- suggestion: "Run: unicli auth setup twitter"
125
- retryable: false
126
- alternatives: ["twitter.search", "twitter.timeline"]
127
- ```
128
-
129
- ### MD body sections
130
-
131
- Success: `## Data` (per-item list) · `## Context` (surface, pagination) · `## Next Actions`. Error: `## Error` (code, message, adapter_path, step, retryable) · `## Suggestion` · `## Alternatives`. YAML frontmatter carries `ok`, `schema_version`, `command`, `duration_ms`, `count`.
132
-
133
- ### Error codes
134
-
135
- net: `network_error` `rate_limited` `upstream_error` `api_error` `not_authenticated`
136
- input: `invalid_input` `selector_miss` `not_found`
137
- authz: `auth_required` `permission_denied`
138
- runtime: `internal_error` `quarantined`
139
- ref: `stale_ref` `ambiguous` `ref_not_found`
140
-
141
- ### Exit codes
142
-
143
- 0 ok · 66 empty · 69 unavailable · 75 temp-fail · 77 auth · 78 config
144
-
145
- ## Self-Repair Protocol
146
-
147
- When a command fails:
14
+ ## Done = these commands exit 0
148
15
 
149
16
  ```
150
- 1. Read error envelope (MD or JSON) → get adapter_path
151
- 2. Open the YAML (~20 lines, no imports)
152
- 3. Edit the failing step (URL changed, selector moved, auth needed)
153
- 4. Save to ~/.unicli/adapters/<site>/<command>.yaml
154
- 5. Verify: unicli repair <site> <command>
17
+ pnpm typecheck && pnpm lint && pnpm test:unit
155
18
  ```
156
19
 
157
- Fixes persist in `~/.unicli/adapters/` and survive `npm update`.
158
-
159
- ## Creating Adapters
20
+ Full E2E + adapter coverage: `npm run verify`. Required before any release.
160
21
 
161
- ```yaml
162
- site: example
163
- name: search
164
- type: web-api
165
- strategy: public
166
- pipeline:
167
- - fetch: { url: "https://api.example.com/search?q=${{ args.query }}" }
168
- - select: data.results
169
- - map: { title: "${{ item.title }}", url: "${{ item.url }}" }
170
- - limit: ${{ args.limit }}
171
- args:
172
- query: { type: str, required: true, positional: true }
173
- limit: { type: int, default: 20 }
174
- columns: [title, url]
175
- ```
22
+ ## Project conventions
176
23
 
177
- Full reference: [`docs/ADAPTER-FORMAT.md`](docs/ADAPTER-FORMAT.md).
24
+ The cross-CLI contract `~/.claude/AGENTS.md` and ruleset `~/.claude/rules/`
25
+ apply in full. The bullets below are the project-specific reinforcement
26
+ because Uni-CLI is adapter-heavy and patch-rot kills us faster than most
27
+ codebases.
178
28
 
179
- ## Pipeline Steps
29
+ - **Engine code lives in `src/engine/`, browser in `src/browser/`, commands in `src/commands/`, adapters in `src/adapters/`.** Map by responsibility — never by version.
30
+ - **Errors emit structured envelopes** to stderr with `code`, `adapter_path`, `step`, `suggestion`. Pipeline steps that fail must surface the real cause, never coerce to a generic `internal_error`. (rule 02)
31
+ - **Tests under `tests/` and `*.test.ts` exercise real owned code** — engine, registry, adapter loader. External boundaries (network fetch, subprocess, Chrome CDP) may be stubbed with one `// REASON:` line. (rule 03)
32
+ - **`unicli test [site]` runs adapter E2E.** Never substitute a fixture for the YAML pipeline runner.
33
+ - **Multi-file change in `src/engine/`, `src/browser/`, or new adapter type → independent audit subagent before PR.** (rule 05)
180
34
 
181
- 59 registered pipeline steps across api, transform, control, browser, subprocess, and CUA-oriented families. Common steps include fetch, fetch_text, parse_rss, html_to_md, select, map, filter, sort, limit, set, if, each, parallel, rate_limit, assert, retry, append, navigate, evaluate, click, type, press, scroll, intercept, snapshot, tap, extract, wait, exec, write_temp, download, and websocket. See [`docs/ADAPTER-FORMAT.md`](docs/ADAPTER-FORMAT.md) for examples.
35
+ ## Style template
182
36
 
183
- ## MCP Server
37
+ Detailed adapter format, pipeline conventions, and error envelope shape live
38
+ in the project skill: `~/.claude/skills/uni-cli-style/SKILL.md`. Load on
39
+ demand. Never paraphrase from memory.
184
40
 
185
- ```bash
186
- npx @zenalexa/unicli mcp serve # stdio (4 meta-tools)
187
- npx @zenalexa/unicli mcp serve --transport streamable --port 19826
188
- npx @zenalexa/unicli mcp serve --transport sse --port 19826 # SSE for remote
189
- npx @zenalexa/unicli mcp serve --auth # OAuth 2.1 PKCE
190
- ```
41
+ ## Project-internal references
191
42
 
192
- Default tools: `unicli_run`, `unicli_list`, `unicli_search`, `unicli_explore`. Agents call `unicli_search` first (bilingual BM25), then `unicli_run` with the chosen site + command.
43
+ | Topic | Where |
44
+ | --------------------------- | ------------------------ |
45
+ | Adapter format | `docs/ADAPTER-FORMAT.md` |
46
+ | Pipeline steps (live count) | `unicli list` |
47
+ | Strategy semantics | `src/types.ts` |
48
+ | Theory / citations | `docs/THEORY.md` |
193
49
 
194
- ## ACP (avante.nvim / Zed)
195
-
196
- ```bash
197
- unicli acp # ACP compatibility over stdio
198
- ```
199
-
200
- ACP is an editor compatibility gateway, not the core runtime. Prefer `unicli agents recommend <agent>` for Claude Code, Codex, Cursor, OpenCode, Gemini, Qwen, Kiro, Aider, Goose, Cline, Roo, AgentAPI, etc.
201
-
202
- ## External CLI Passthrough
203
-
204
- 58 registered external CLIs. If installed on your system, they're available as top-level commands:
205
-
206
- ```bash
207
- unicli ext list # Show all external CLIs + install status
208
- unicli ext list --tag agent # Show coding-agent CLIs
209
- unicli ext install <name> # Install an external CLI
210
- unicli lark-cli calendar +agenda # Direct passthrough
211
- ```
50
+ `unicli list` is more authoritative than any inventory in this file — the
51
+ project ships at high cadence, written counts go stale fast.
212
52
 
213
53
  ## Version
214
54
 
215
- 0.217.0 — Apollo · Lovell
55
+ 0.218.0 — Apollo · Cernan
package/README.md CHANGED
@@ -28,7 +28,7 @@
28
28
  </p>
29
29
 
30
30
  <p align="center">
31
- <sub><!-- STATS:site_count -->235<!-- /STATS --> sites · <!-- STATS:command_count -->1448<!-- /STATS --> commands · <!-- STATS:pipeline_step_count -->59<!-- /STATS --> pipeline steps · <!-- STATS:test_count -->7471<!-- /STATS --> tests</sub>
31
+ <sub><!-- STATS:site_count -->237<!-- /STATS --> sites · <!-- STATS:command_count -->1453<!-- /STATS --> commands · <!-- STATS:pipeline_step_count -->101<!-- /STATS --> pipeline steps · <!-- STATS:test_count -->7842<!-- /STATS --> tests</sub>
32
32
  </p>
33
33
 
34
34
  <p align="center">
@@ -131,26 +131,28 @@ Prefer native CLI / JSON stream / MCP for agent runtimes. Use ACP as an editor c
131
131
 
132
132
  Uni-CLI sits under agent applications and turns software surfaces into commands that agents can discover, execute, record, and repair.
133
133
 
134
- | Surface | What you get |
135
- | ------------------ | -------------------------------------------------------------------------------------------------- |
136
- | Websites and APIs | Declarative adapters for public, cookie, header, and browser-intercept workflows |
137
- | Browser automation | CDP steps for navigate, click, type, intercept, snapshot, extract, wait, and related browser work |
138
- | Desktop and macOS | System commands, app adapters, screenshots, clipboard, calendar, brightness, and local tools |
139
- | External CLIs | 58 registered pass-through bridges with install/status discovery |
140
- | Agent backends | Route matrix for native CLI, JSON stream, MCP, ACP, HTTP API, OpenAI-compatible, and bridge routes |
141
- | Operation policy | `open`, `confirm`, and `locked` profiles with effect, risk, approval, and capability scope |
142
- | Evidence | Optional run traces plus browser pre/post evidence, movement detection, stale-ref details |
143
- | Output | v2 `AgentEnvelope` in Markdown, JSON, YAML, CSV, or compact format |
144
- | Repair | Structured errors with `adapter_path`, failing `step`, retryability, suggestions, and alternatives |
134
+ | Surface | What you get |
135
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | Websites and APIs | Declarative adapters for public, cookie, header, and browser-intercept workflows |
137
+ | Browser automation | CDP steps for navigate, click, type, intercept, snapshot, extract, wait, and related browser work |
138
+ | Desktop and macOS | System commands, app adapters, real-time Shortcuts/App Intent discovery, screenshots, clipboard, calendar, brightness, and local tools |
139
+ | External CLIs | 58 registered pass-through bridges with install/status discovery |
140
+ | Agent backends | Route matrix for native CLI, JSON stream, MCP, ACP, HTTP API, OpenAI-compatible, and bridge routes |
141
+ | Operation policy | `open`, `confirm`, and `locked` profiles with effect/risk scopes, local deny rules, `--yes`, and persisted approval memory |
142
+ | Evidence | Run traces with environment snapshots, probe/replay/compare scores, structured gate results, browser session leases with tab/auth posture, render-aware evidence, movement checks, and stale-ref details |
143
+ | Output | v2 `AgentEnvelope` in Markdown, JSON, YAML, CSV, or compact format |
144
+ | Repair | Structured errors with `adapter_path`, failing `step`, retryability, suggestions, and alternatives |
145
145
 
146
146
  ## For Agents
147
147
 
148
148
  Use search first, then run the smallest matching command.
149
149
 
150
150
  ```bash
151
- unicli search "twitter trending" --limit 5
152
- unicli twitter search "coding agents" -f json
153
- unicli repair twitter search
151
+ unicli search "connect slack messages" --limit 5
152
+ unicli slack search "deploy incident" -f json
153
+ unicli macos app-actions --app WhatsApp -f json
154
+ unicli macos automation-smoke -f json
155
+ unicli repair slack search
154
156
  ```
155
157
 
156
158
  Output defaults to structured Markdown for non-TTY and agent-user-agent runs. Force a machine format when you need one:
@@ -159,6 +161,16 @@ Output defaults to structured Markdown for non-TTY and agent-user-agent runs. Fo
159
161
  UNICLI_OUTPUT=json unicli reddit hot --limit 10
160
162
  unicli hackernews top --limit 5 -f yaml
161
163
  unicli --record --permission-profile confirm twitter search "coding agents" -f json
164
+ unicli runs list -f json
165
+ unicli runs show <run_id> -f json
166
+ unicli runs probe <run_id> -f json
167
+ unicli runs replay <run_id> --permission-profile confirm --yes --min-score 1 --min-context-score 1 --min-overall-score 1 -f json
168
+ unicli runs compare <run_id> <replay_run_id> -f json
169
+ unicli runs compare <run_id> <replay_run_id> --min-score 1 --min-context-score 1 --min-overall-score 1 -f json
170
+ unicli --permission-profile locked --yes --remember-approval word set-font "Inter"
171
+ unicli approvals list -f json
172
+ unicli approvals revoke <approval_key> -f json
173
+ unicli browser evidence --render-aware --expect-domain example.com -f json
162
174
  ```
163
175
 
164
176
  Protocol entry points:
@@ -173,9 +185,25 @@ unicli agents matrix
173
185
 
174
186
  ACP is supported for editors and bridge tooling. The primary runtime path stays native CLI, JSON stream, or MCP when those routes are available.
175
187
 
188
+ ## Local Computer Control
189
+
190
+ `unicli compute` controls installed apps through native accessibility, Electron CDP, and visual fallback transports.
191
+
192
+ ```bash
193
+ unicli compute apps
194
+ unicli compute snapshot --app Calculator --format compact
195
+ unicli compute find --role button --name 5 --first
196
+ unicli compute find --role input --text 8 --first
197
+ unicli compute click @e7
198
+ unicli doctor compute --json
199
+ npx @zenalexa/unicli mcp serve --profile computer-use
200
+ ```
201
+
202
+ Start with [Compute](docs/operate/compute.md), [Electron App Control](docs/operate/electron.md), and [Compute Troubleshooting](docs/operate/troubleshooting.md).
203
+
176
204
  ## Coverage
177
205
 
178
- The catalog is intentionally broad, but the important point is not the count. The important point is that every command is discoverable, typed, and repairable.
206
+ The catalog is intentionally broad. Every command is discoverable, typed, and repairable.
179
207
 
180
208
  | Area | Examples |
181
209
  | ----------------------- | ----------------------------------------------------------------------------------------------------------- |
@@ -293,12 +321,24 @@ Docs:
293
321
  - Browser adapters require a reachable Chrome/CDP session.
294
322
  - Permission profiles are user-selected runtime policy. The default is `open`;
295
323
  stricter `confirm` and `locked` profiles require `--yes` or `UNICLI_APPROVE=1`
296
- for blocked operations.
324
+ for blocked operations. Add `--remember-approval` with `--yes` to store the
325
+ same command capability and resource scope under `~/.unicli/approvals.jsonl`.
326
+ Resource scope covers stable metadata such as domain, account surface, app,
327
+ process family, and path argument slots. Use
328
+ `unicli approvals list`, `revoke`, and `clear` to inspect or remove remembered
329
+ scopes. The file stores scope metadata; runtime args stay out of approval
330
+ memory.
331
+ - Local deny rules live at `~/.unicli/permission-rules.json`, or at
332
+ `UNICLI_PERMISSION_RULES_PATH`. They match site, command, effect, capability
333
+ dimensions, and resource metadata, then block before `--yes` and remembered
334
+ approvals. Runtime guards also check fetched domains, browser navigation
335
+ targets, download and output paths, and subprocess executables before the
336
+ request, write, or process spawn happens.
297
337
  - Run recording is opt-in. Use `--record` or `UNICLI_RECORD_RUN=1` when you need
298
338
  append-only evidence under `~/.unicli/runs`.
299
339
  - CUA routes require a configured real backend. Declared-but-unavailable providers fail closed with structured errors.
300
340
  - User adapters and repairs live in `~/.unicli/adapters/`; committed adapters remain the package baseline.
301
- - If a site blocks automation or changes a private API, the correct behavior is a clear failure envelope, not a fabricated success.
341
+ - If a site blocks automation or changes a private API, Uni-CLI returns a clear failure envelope.
302
342
 
303
343
  ## Development
304
344
 
@@ -314,5 +354,5 @@ npm run verify
314
354
  [Apache-2.0](./LICENSE)
315
355
 
316
356
  <p align="center">
317
- <sub>v0.217.0 — Apollo · Lovell</sub>
357
+ <sub>v0.218.0 — Apollo · Cernan</sub>
318
358
  </p>
package/README.zh-CN.md CHANGED
@@ -28,7 +28,7 @@
28
28
  </p>
29
29
 
30
30
  <p align="center">
31
- <sub><!-- STATS:site_count -->235<!-- /STATS --> 个站点 · <!-- STATS:command_count -->1448<!-- /STATS --> 条命令 · <!-- STATS:pipeline_step_count -->59<!-- /STATS --> 个 pipeline step · <!-- STATS:test_count -->7471<!-- /STATS --> 个测试</sub>
31
+ <sub><!-- STATS:site_count -->237<!-- /STATS --> 个站点 · <!-- STATS:command_count -->1453<!-- /STATS --> 条命令 · <!-- STATS:pipeline_step_count -->101<!-- /STATS --> 个 pipeline step · <!-- STATS:test_count -->7842<!-- /STATS --> 个测试</sub>
32
32
  </p>
33
33
 
34
34
  <p align="center">
@@ -131,17 +131,17 @@ Prefer native CLI / JSON stream / MCP for agent runtimes. Use ACP as an editor c
131
131
 
132
132
  Uni-CLI 位于 Agent 应用之下,把软件表面收敛成 Agent 能发现、能执行、能记录、能修的命令。
133
133
 
134
- | 表面 | 能力 |
135
- | ------------ | ------------------------------------------------------------------------------- |
136
- | 网站和 API | public、cookie、header、browser-intercept 等 adapter |
137
- | 浏览器自动化 | CDP 的 navigate、click、type、intercept、snapshot、extract、wait 等步骤 |
138
- | 桌面和 macOS | 系统命令、App adapter、截图、剪贴板、日历、亮度、本地工具 |
139
- | 外部 CLI | 58 个已登记的 passthrough bridge,支持安装和状态发现 |
140
- | Agent 后端 | native CLI、JSON stream、MCP、ACP、HTTP API、OpenAI-compatible、bridge 路由矩阵 |
141
- | 操作策略 | `open`、`confirm`、`locked` profile,暴露 effectrisk、approval、capability |
142
- | 执行证据 | 可选 run trace,浏览器动作的前后证据、移动检测、stale-ref 细节 |
143
- | 输出 | v2 `AgentEnvelope`,支持 Markdown、JSON、YAML、CSV、compact |
144
- | 修复 | 错误里带 `adapter_path`、失败 `step`、是否可重试、修复建议和替代命令 |
134
+ | 表面 | 能力 |
135
+ | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
136
+ | 网站和 API | public、cookie、header、browser-intercept 等 adapter |
137
+ | 浏览器自动化 | CDP 的 navigate、click、type、intercept、snapshot、extract、wait 等步骤 |
138
+ | 桌面和 macOS | 系统命令、App adapter、实时 Shortcuts/App Intent 发现、截图、剪贴板、日历、亮度、本地工具 |
139
+ | 外部 CLI | 58 个已登记的 passthrough bridge,支持安装和状态发现 |
140
+ | Agent 后端 | native CLI、JSON stream、MCP、ACP、HTTP API、OpenAI-compatible、bridge 路由矩阵 |
141
+ | 操作策略 | `open`、`confirm`、`locked` profile,暴露 effect/risk scope、本地 deny 规则、`--yes` 和持久审批记忆 |
142
+ | 执行证据 | run trace 会记录环境快照,也能 probe/replay/compare 打分并输出结构化 gate 结果;浏览器 session lease 带 tab/auth 姿态,还支持 render-aware 证据、移动检测和 stale-ref 细节 |
143
+ | 输出 | v2 `AgentEnvelope`,支持 Markdown、JSON、YAML、CSV、compact |
144
+ | 修复 | 错误里带 `adapter_path`、失败 `step`、是否可重试、修复建议和替代命令 |
145
145
 
146
146
  ## 给 Agent 的入口
147
147
 
@@ -150,6 +150,8 @@ Uni-CLI 位于 Agent 应用之下,把软件表面收敛成 Agent 能发现、
150
150
  ```bash
151
151
  unicli search "推特热门" --limit 5
152
152
  unicli twitter search "coding agents" -f json
153
+ unicli macos app-actions --app WhatsApp -f json
154
+ unicli macos automation-smoke -f json
153
155
  unicli repair twitter search
154
156
  ```
155
157
 
@@ -159,6 +161,16 @@ unicli repair twitter search
159
161
  UNICLI_OUTPUT=json unicli reddit hot --limit 10
160
162
  unicli hackernews top --limit 5 -f yaml
161
163
  unicli --record --permission-profile confirm twitter search "coding agents" -f json
164
+ unicli runs list -f json
165
+ unicli runs show <run_id> -f json
166
+ unicli runs probe <run_id> -f json
167
+ unicli runs replay <run_id> --permission-profile confirm --yes --min-score 1 --min-context-score 1 --min-overall-score 1 -f json
168
+ unicli runs compare <run_id> <replay_run_id> -f json
169
+ unicli runs compare <run_id> <replay_run_id> --min-score 1 --min-context-score 1 --min-overall-score 1 -f json
170
+ unicli --permission-profile locked --yes --remember-approval word set-font "Inter"
171
+ unicli approvals list -f json
172
+ unicli approvals revoke <approval_key> -f json
173
+ unicli browser evidence --render-aware --expect-domain example.com -f json
162
174
  ```
163
175
 
164
176
  协议入口:
@@ -175,7 +187,7 @@ ACP 作为编辑器和桥接兼容层保留。真正跑任务时,优先 native
175
187
 
176
188
  ## 覆盖范围
177
189
 
178
- 数量不是重点,重点是每条命令都能搜索、可声明、可验证、可修。
190
+ 每条命令都能搜索、可声明、可验证、可修。
179
191
 
180
192
  | 领域 | 例子 |
181
193
  | ------------- | ----------------------------------------------------------------------------------------------------------- |
@@ -293,11 +305,20 @@ columns: [title, url]
293
305
  - Browser adapter 需要可连接的 Chrome/CDP。
294
306
  - Permission profile 是用户选择的运行时策略。默认是 `open`;更严格的
295
307
  `confirm` 和 `locked` profile 会要求 `--yes` 或 `UNICLI_APPROVE=1`。
308
+ `--yes` 加 `--remember-approval` 会把同一条命令的 capability 和资源 scope
309
+ 记到 `~/.unicli/approvals.jsonl`。资源 scope 来自稳定 metadata,比如域名、
310
+ 账号面、应用、进程族和路径参数槽。用 `unicli approvals list`、`revoke`、
311
+ `clear` 查看或移除已记住的 scope。文件只存 scope metadata,原始运行参数留在审批记忆之外。
312
+ - 本地 deny 规则放在 `~/.unicli/permission-rules.json`,也可以用
313
+ `UNICLI_PERMISSION_RULES_PATH` 指定。规则按站点、命令、effect、capability
314
+ 维度和资源 metadata 匹配,优先级高于 `--yes` 和已记住的审批。运行时还会检查
315
+ fetch 域名、浏览器跳转目标、下载和输出路径、子进程可执行文件,命中后在请求、写入或
316
+ 启动进程之前停下。
296
317
  - Run recording 是显式启用能力。需要可审查证据时使用 `--record` 或
297
318
  `UNICLI_RECORD_RUN=1`,追加写入 `~/.unicli/runs`。
298
319
  - CUA 路由必须配置真实 backend。声明了但不可用的 provider 会失败关闭,并返回结构化错误。
299
320
  - 用户 adapter 和修复放在 `~/.unicli/adapters/`;包内 adapter 是基线。
300
- - 如果网站阻止自动化或私有 API 变了,正确行为是清楚失败,不是伪装成功。
321
+ - 如果网站阻止自动化或私有 API 变了,Uni-CLI 会返回清楚的失败 envelope。
301
322
 
302
323
  ## 开发
303
324
 
@@ -313,5 +334,5 @@ npm run verify
313
334
  [Apache-2.0](./LICENSE)
314
335
 
315
336
  <p align="center">
316
- <sub>v0.217.0 — Apollo · Lovell</sub>
337
+ <sub>v0.218.0 — Apollo · Cernan</sub>
317
338
  </p>
@@ -0,0 +1,47 @@
1
+ [package]
2
+ name = "unicli-atspi"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+ rust-version.workspace = true
6
+ license.workspace = true
7
+ homepage.workspace = true
8
+ repository.workspace = true
9
+
10
+ [[bin]]
11
+ name = "unicli-atspi"
12
+ path = "src/main.rs"
13
+
14
+ [dependencies]
15
+ anyhow.workspace = true
16
+ clap.workspace = true
17
+ serde.workspace = true
18
+ serde_json.workspace = true
19
+ tokio.workspace = true
20
+ tracing.workspace = true
21
+ tracing-subscriber.workspace = true
22
+ unicli-shared.workspace = true
23
+
24
+ [target.'cfg(target_os = "linux")'.dependencies]
25
+ atspi = { version = "0.29.0", default-features = false, features = [
26
+ "connection",
27
+ "proxies",
28
+ "wrappers",
29
+ ] }
30
+ async-lock = "=3.4.1"
31
+ async-signal = "=0.2.13"
32
+ futures-lite = "=2.6.1"
33
+ indexmap = "=2.11.3"
34
+ proc-macro-crate = "=3.4.0"
35
+ tempfile = "=3.22.0"
36
+ toml_datetime = "=0.7.1"
37
+ toml_edit = "=0.23.5"
38
+ toml_parser = "=1.0.2"
39
+ toml_writer = "=1.0.2"
40
+ wasip2 = "=1.0.1"
41
+ winnow = "=0.7.13"
42
+ wit-bindgen = "=0.46.0"
43
+ zbus = { version = "=5.11.0", features = ["async-io"], default-features = false }
44
+ zbus_macros = "=5.11.0"
45
+ zvariant = "=5.7.0"
46
+ zvariant_derive = "=5.7.0"
47
+ zvariant_utils = "=3.2.1"
@@ -0,0 +1,6 @@
1
+ # unicli-atspi
2
+
3
+ Linux AT-SPI sidecar for Uni-CLI compute.
4
+
5
+ P0 only establishes the buildable crate. The JSON-Lines stdio protocol and
6
+ AT-SPI actions land in P4.