@vforsh/argus 0.1.16 → 0.1.19

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 (375) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/argus.js +14994 -10474
  3. package/dist/cli/defineCommand.d.ts +3 -0
  4. package/dist/cli/defineCommand.d.ts.map +1 -1
  5. package/dist/cli/defineCommand.js +11 -0
  6. package/dist/cli/defineCommand.js.map +1 -1
  7. package/dist/cli/plugins/pluginHost.d.ts.map +1 -1
  8. package/dist/cli/plugins/pluginHost.js +1 -0
  9. package/dist/cli/plugins/pluginHost.js.map +1 -1
  10. package/dist/cli/plugins/registerPlugins.d.ts +3 -1
  11. package/dist/cli/plugins/registerPlugins.d.ts.map +1 -1
  12. package/dist/cli/plugins/registerPlugins.js +31 -12
  13. package/dist/cli/plugins/registerPlugins.js.map +1 -1
  14. package/dist/cli/register/authCommands.d.ts +3 -0
  15. package/dist/cli/register/authCommands.d.ts.map +1 -0
  16. package/dist/cli/register/authCommands.js +230 -0
  17. package/dist/cli/register/authCommands.js.map +1 -0
  18. package/dist/cli/register/chromeCommands.d.ts +3 -0
  19. package/dist/cli/register/chromeCommands.d.ts.map +1 -0
  20. package/dist/cli/register/chromeCommands.js +153 -0
  21. package/dist/cli/register/chromeCommands.js.map +1 -0
  22. package/dist/cli/register/codeCommands.d.ts +3 -0
  23. package/dist/cli/register/codeCommands.d.ts.map +1 -0
  24. package/dist/cli/register/codeCommands.js +116 -0
  25. package/dist/cli/register/codeCommands.js.map +1 -0
  26. package/dist/cli/register/configCommands.d.ts +3 -0
  27. package/dist/cli/register/configCommands.d.ts.map +1 -0
  28. package/dist/cli/register/configCommands.js +23 -0
  29. package/dist/cli/register/configCommands.js.map +1 -0
  30. package/dist/cli/register/dialogCommands.d.ts +3 -0
  31. package/dist/cli/register/dialogCommands.d.ts.map +1 -0
  32. package/dist/cli/register/dialogCommands.js +52 -0
  33. package/dist/cli/register/dialogCommands.js.map +1 -0
  34. package/dist/cli/register/domCommandBuilder.d.ts +7 -5
  35. package/dist/cli/register/domCommandBuilder.d.ts.map +1 -1
  36. package/dist/cli/register/domCommandBuilder.js +28 -23
  37. package/dist/cli/register/domCommandBuilder.js.map +1 -1
  38. package/dist/cli/register/domCommands.d.ts +3 -0
  39. package/dist/cli/register/domCommands.d.ts.map +1 -0
  40. package/dist/cli/register/domCommands.js +318 -0
  41. package/dist/cli/register/domCommands.js.map +1 -0
  42. package/dist/cli/register/evalCommands.d.ts +3 -0
  43. package/dist/cli/register/evalCommands.d.ts.map +1 -0
  44. package/dist/cli/register/evalCommands.js +173 -0
  45. package/dist/cli/register/evalCommands.js.map +1 -0
  46. package/dist/cli/register/extensionCommands.d.ts +3 -0
  47. package/dist/cli/register/extensionCommands.d.ts.map +1 -0
  48. package/dist/cli/register/extensionCommands.js +215 -0
  49. package/dist/cli/register/extensionCommands.js.map +1 -0
  50. package/dist/cli/register/fillCommand.d.ts +3 -0
  51. package/dist/cli/register/fillCommand.d.ts.map +1 -0
  52. package/dist/cli/register/fillCommand.js +44 -0
  53. package/dist/cli/register/fillCommand.js.map +1 -0
  54. package/dist/cli/register/hoverCommand.d.ts +3 -0
  55. package/dist/cli/register/hoverCommand.d.ts.map +1 -0
  56. package/dist/cli/register/hoverCommand.js +27 -0
  57. package/dist/cli/register/hoverCommand.js.map +1 -0
  58. package/dist/cli/register/index.d.ts.map +1 -1
  59. package/dist/cli/register/index.js +57 -52
  60. package/dist/cli/register/index.js.map +1 -1
  61. package/dist/cli/register/keydownCommand.d.ts +3 -0
  62. package/dist/cli/register/keydownCommand.d.ts.map +1 -0
  63. package/dist/cli/register/keydownCommand.js +21 -0
  64. package/dist/cli/register/keydownCommand.js.map +1 -0
  65. package/dist/cli/register/locateCommands.d.ts +3 -0
  66. package/dist/cli/register/locateCommands.d.ts.map +1 -0
  67. package/dist/cli/register/locateCommands.js +60 -0
  68. package/dist/cli/register/locateCommands.js.map +1 -0
  69. package/dist/cli/register/logsCommands.d.ts +3 -0
  70. package/dist/cli/register/logsCommands.d.ts.map +1 -0
  71. package/dist/cli/register/logsCommands.js +67 -0
  72. package/dist/cli/register/logsCommands.js.map +1 -0
  73. package/dist/cli/register/netCommands.d.ts +3 -0
  74. package/dist/cli/register/netCommands.d.ts.map +1 -0
  75. package/dist/cli/register/netCommands.js +442 -0
  76. package/dist/cli/register/netCommands.js.map +1 -0
  77. package/dist/cli/register/pageCommands.d.ts +3 -0
  78. package/dist/cli/register/pageCommands.d.ts.map +1 -0
  79. package/dist/cli/register/pageCommands.js +188 -0
  80. package/dist/cli/register/pageCommands.js.map +1 -0
  81. package/dist/cli/register/pluginCommands.d.ts +3 -0
  82. package/dist/cli/register/pluginCommands.d.ts.map +1 -0
  83. package/dist/cli/register/pluginCommands.js +51 -0
  84. package/dist/cli/register/pluginCommands.js.map +1 -0
  85. package/dist/cli/register/quickAccessCommands.d.ts +3 -0
  86. package/dist/cli/register/quickAccessCommands.d.ts.map +1 -0
  87. package/dist/cli/register/quickAccessCommands.js +138 -0
  88. package/dist/cli/register/quickAccessCommands.js.map +1 -0
  89. package/dist/cli/register/recordCommands.d.ts +3 -0
  90. package/dist/cli/register/recordCommands.d.ts.map +1 -0
  91. package/dist/cli/register/recordCommands.js +90 -0
  92. package/dist/cli/register/recordCommands.js.map +1 -0
  93. package/dist/cli/register/scrollToCommand.d.ts +3 -0
  94. package/dist/cli/register/scrollToCommand.d.ts.map +1 -0
  95. package/dist/cli/register/scrollToCommand.js +30 -0
  96. package/dist/cli/register/scrollToCommand.js.map +1 -0
  97. package/dist/cli/register/skillCommands.d.ts +3 -0
  98. package/dist/cli/register/skillCommands.d.ts.map +1 -0
  99. package/dist/cli/register/skillCommands.js +13 -0
  100. package/dist/cli/register/skillCommands.js.map +1 -0
  101. package/dist/cli/register/snapshotCommands.d.ts +3 -0
  102. package/dist/cli/register/snapshotCommands.d.ts.map +1 -0
  103. package/dist/cli/register/snapshotCommands.js +57 -0
  104. package/dist/cli/register/snapshotCommands.js.map +1 -0
  105. package/dist/cli/register/storageCommands.d.ts +3 -0
  106. package/dist/cli/register/storageCommands.d.ts.map +1 -0
  107. package/dist/cli/register/storageCommands.js +78 -0
  108. package/dist/cli/register/storageCommands.js.map +1 -0
  109. package/dist/cli/register/throttleCommands.d.ts +3 -0
  110. package/dist/cli/register/throttleCommands.d.ts.map +1 -0
  111. package/dist/cli/register/throttleCommands.js +48 -0
  112. package/dist/cli/register/throttleCommands.js.map +1 -0
  113. package/dist/cli/register/traceCommands.d.ts +3 -0
  114. package/dist/cli/register/traceCommands.d.ts.map +1 -0
  115. package/dist/cli/register/traceCommands.js +72 -0
  116. package/dist/cli/register/traceCommands.js.map +1 -0
  117. package/dist/cli/register/watcherCommands.d.ts +3 -0
  118. package/dist/cli/register/watcherCommands.d.ts.map +1 -0
  119. package/dist/cli/register/watcherCommands.js +180 -0
  120. package/dist/cli/register/watcherCommands.js.map +1 -0
  121. package/dist/commands/auth.d.ts.map +1 -1
  122. package/dist/commands/auth.js.map +1 -1
  123. package/dist/commands/code.d.ts +2 -2
  124. package/dist/commands/code.d.ts.map +1 -1
  125. package/dist/commands/code.js +42 -45
  126. package/dist/commands/code.js.map +1 -1
  127. package/dist/commands/codeEdit.d.ts.map +1 -1
  128. package/dist/commands/codeEdit.js.map +1 -1
  129. package/dist/commands/domDrag.d.ts +21 -0
  130. package/dist/commands/domDrag.d.ts.map +1 -0
  131. package/dist/commands/domDrag.js +179 -0
  132. package/dist/commands/domDrag.js.map +1 -0
  133. package/dist/commands/eval.d.ts +9 -1
  134. package/dist/commands/eval.d.ts.map +1 -1
  135. package/dist/commands/eval.js +20 -10
  136. package/dist/commands/eval.js.map +1 -1
  137. package/dist/commands/evalArgs.d.ts +31 -0
  138. package/dist/commands/evalArgs.d.ts.map +1 -0
  139. package/dist/commands/evalArgs.js +103 -0
  140. package/dist/commands/evalArgs.js.map +1 -0
  141. package/dist/commands/evalBundle.d.ts +4 -5
  142. package/dist/commands/evalBundle.d.ts.map +1 -1
  143. package/dist/commands/evalBundle.js +88 -69
  144. package/dist/commands/evalBundle.js.map +1 -1
  145. package/dist/commands/evalModuleSyntax.d.ts +6 -0
  146. package/dist/commands/evalModuleSyntax.d.ts.map +1 -0
  147. package/dist/commands/evalModuleSyntax.js +33 -0
  148. package/dist/commands/evalModuleSyntax.js.map +1 -0
  149. package/dist/commands/evalPolling.d.ts +1 -1
  150. package/dist/commands/evalPolling.d.ts.map +1 -1
  151. package/dist/commands/evalPolling.js +1 -1
  152. package/dist/commands/evalPolling.js.map +1 -1
  153. package/dist/commands/evalResultOutput.d.ts +25 -0
  154. package/dist/commands/evalResultOutput.d.ts.map +1 -0
  155. package/dist/commands/evalResultOutput.js +85 -0
  156. package/dist/commands/evalResultOutput.js.map +1 -0
  157. package/dist/commands/evalShared.d.ts +42 -17
  158. package/dist/commands/evalShared.d.ts.map +1 -1
  159. package/dist/commands/evalShared.js +96 -53
  160. package/dist/commands/evalShared.js.map +1 -1
  161. package/dist/commands/evalUntil.d.ts +7 -1
  162. package/dist/commands/evalUntil.d.ts.map +1 -1
  163. package/dist/commands/evalUntil.js +16 -27
  164. package/dist/commands/evalUntil.js.map +1 -1
  165. package/dist/commands/extension/attach.d.ts +5 -1
  166. package/dist/commands/extension/attach.d.ts.map +1 -1
  167. package/dist/commands/extension/attach.js +44 -84
  168. package/dist/commands/extension/attach.js.map +1 -1
  169. package/dist/commands/extension/doctor.d.ts +6 -0
  170. package/dist/commands/extension/doctor.d.ts.map +1 -0
  171. package/dist/commands/extension/doctor.js +185 -0
  172. package/dist/commands/extension/doctor.js.map +1 -0
  173. package/dist/commands/extension/select.d.ts +7 -0
  174. package/dist/commands/extension/select.d.ts.map +1 -0
  175. package/dist/commands/extension/select.js +73 -0
  176. package/dist/commands/extension/select.js.map +1 -0
  177. package/dist/commands/extension/show.d.ts +16 -0
  178. package/dist/commands/extension/show.d.ts.map +1 -0
  179. package/dist/commands/extension/show.js +132 -0
  180. package/dist/commands/extension/show.js.map +1 -0
  181. package/dist/commands/extension/tabAttach.d.ts +28 -0
  182. package/dist/commands/extension/tabAttach.d.ts.map +1 -0
  183. package/dist/commands/extension/tabAttach.js +106 -0
  184. package/dist/commands/extension/tabAttach.js.map +1 -0
  185. package/dist/commands/extension/tabSelection.d.ts +45 -0
  186. package/dist/commands/extension/tabSelection.d.ts.map +1 -0
  187. package/dist/commands/extension/tabSelection.js +76 -0
  188. package/dist/commands/extension/tabSelection.js.map +1 -0
  189. package/dist/commands/extension/tabWatcher.d.ts +22 -0
  190. package/dist/commands/extension/tabWatcher.d.ts.map +1 -0
  191. package/dist/commands/extension/tabWatcher.js +89 -0
  192. package/dist/commands/extension/tabWatcher.js.map +1 -0
  193. package/dist/commands/extension/targetSelection.d.ts +62 -0
  194. package/dist/commands/extension/targetSelection.d.ts.map +1 -0
  195. package/dist/commands/extension/targetSelection.js +210 -0
  196. package/dist/commands/extension/targetSelection.js.map +1 -0
  197. package/dist/commands/extension/targets.d.ts +7 -0
  198. package/dist/commands/extension/targets.d.ts.map +1 -0
  199. package/dist/commands/extension/targets.js +73 -0
  200. package/dist/commands/extension/targets.js.map +1 -0
  201. package/dist/commands/extension/use.d.ts +13 -0
  202. package/dist/commands/extension/use.d.ts.map +1 -0
  203. package/dist/commands/extension/use.js +66 -0
  204. package/dist/commands/extension/use.js.map +1 -0
  205. package/dist/commands/locate.d.ts.map +1 -1
  206. package/dist/commands/locate.js.map +1 -1
  207. package/dist/commands/netMock.d.ts +34 -0
  208. package/dist/commands/netMock.d.ts.map +1 -0
  209. package/dist/commands/netMock.js +323 -0
  210. package/dist/commands/netMock.js.map +1 -0
  211. package/dist/commands/netSse.d.ts +1 -1
  212. package/dist/commands/netSse.d.ts.map +1 -1
  213. package/dist/commands/netSse.js +19 -23
  214. package/dist/commands/netSse.js.map +1 -1
  215. package/dist/commands/netWebSocket.d.ts +2 -2
  216. package/dist/commands/netWebSocket.d.ts.map +1 -1
  217. package/dist/commands/netWebSocket.js +42 -55
  218. package/dist/commands/netWebSocket.js.map +1 -1
  219. package/dist/commands/pluginConfig.d.ts +1 -0
  220. package/dist/commands/pluginConfig.d.ts.map +1 -1
  221. package/dist/commands/pluginConfig.js +12 -2
  222. package/dist/commands/pluginConfig.js.map +1 -1
  223. package/dist/commands/record.d.ts +35 -0
  224. package/dist/commands/record.d.ts.map +1 -0
  225. package/dist/commands/record.js +210 -0
  226. package/dist/commands/record.js.map +1 -0
  227. package/dist/commands/skill.d.ts +6 -0
  228. package/dist/commands/skill.d.ts.map +1 -0
  229. package/dist/commands/skill.js +42 -0
  230. package/dist/commands/skill.js.map +1 -0
  231. package/dist/commands/start.d.ts +2 -2
  232. package/dist/commands/start.d.ts.map +1 -1
  233. package/dist/commands/startShared.d.ts +1 -1
  234. package/dist/commands/startShared.d.ts.map +1 -1
  235. package/dist/commands/watcherNativeHost.js +48 -1
  236. package/dist/commands/watcherNativeHost.js.map +1 -1
  237. package/dist/commands/watcherSession.d.ts +3 -3
  238. package/dist/commands/watcherSession.d.ts.map +1 -1
  239. package/dist/commands/watcherSession.js.map +1 -1
  240. package/dist/commands/watcherStart.d.ts +2 -2
  241. package/dist/commands/watcherStart.d.ts.map +1 -1
  242. package/dist/config/argusHome.d.ts +3 -0
  243. package/dist/config/argusHome.d.ts.map +1 -0
  244. package/dist/config/argusHome.js +11 -0
  245. package/dist/config/argusHome.js.map +1 -0
  246. package/dist/config/loadConfig.d.ts +13 -0
  247. package/dist/config/loadConfig.d.ts.map +1 -0
  248. package/dist/config/loadConfig.js +59 -0
  249. package/dist/config/loadConfig.js.map +1 -0
  250. package/dist/config/mergeConfig.d.ts +34 -0
  251. package/dist/config/mergeConfig.d.ts.map +1 -0
  252. package/dist/config/mergeConfig.js +57 -0
  253. package/dist/config/mergeConfig.js.map +1 -0
  254. package/dist/config/types.d.ts +51 -0
  255. package/dist/config/types.d.ts.map +1 -0
  256. package/dist/config/types.js +2 -0
  257. package/dist/config/types.js.map +1 -0
  258. package/dist/config/validateConfig.d.ts +14 -0
  259. package/dist/config/validateConfig.d.ts.map +1 -0
  260. package/dist/config/{argusConfig.js → validateConfig.js} +136 -244
  261. package/dist/config/validateConfig.js.map +1 -0
  262. package/dist/eval/evalClient.d.ts +2 -0
  263. package/dist/eval/evalClient.d.ts.map +1 -1
  264. package/dist/eval/evalClient.js +26 -2
  265. package/dist/eval/evalClient.js.map +1 -1
  266. package/dist/skill/argus/SKILL.md +200 -0
  267. package/dist/skill/argus/reference/CAPTURE.md +77 -0
  268. package/dist/skill/argus/reference/DIALOG.md +31 -0
  269. package/dist/skill/argus/reference/EVAL.md +137 -0
  270. package/dist/skill/argus/reference/EXTENSION.md +38 -0
  271. package/dist/skill/argus/reference/EXTENSION_IFRAME_EVAL.md +58 -0
  272. package/dist/skill/argus/reference/IFRAMES.md +46 -0
  273. package/dist/skill/argus/reference/INJECT.md +145 -0
  274. package/dist/skill/argus/reference/INSPECT.md +175 -0
  275. package/dist/skill/argus/reference/NET.md +108 -0
  276. package/dist/skill/argus/reference/PLUGINS.md +172 -0
  277. package/dist/skill/argus/reference/RUNTIME_CODE.md +42 -0
  278. package/dist/skill/argus/reference/START.md +120 -0
  279. package/dist/skill/argus/start-watcher.ts +108 -0
  280. package/package.json +4 -2
  281. package/dist/cli/register/registerAuth.d.ts +0 -3
  282. package/dist/cli/register/registerAuth.d.ts.map +0 -1
  283. package/dist/cli/register/registerAuth.js +0 -133
  284. package/dist/cli/register/registerAuth.js.map +0 -1
  285. package/dist/cli/register/registerChrome.d.ts +0 -3
  286. package/dist/cli/register/registerChrome.d.ts.map +0 -1
  287. package/dist/cli/register/registerChrome.js +0 -118
  288. package/dist/cli/register/registerChrome.js.map +0 -1
  289. package/dist/cli/register/registerCode.d.ts +0 -3
  290. package/dist/cli/register/registerCode.d.ts.map +0 -1
  291. package/dist/cli/register/registerCode.js +0 -74
  292. package/dist/cli/register/registerCode.js.map +0 -1
  293. package/dist/cli/register/registerConfig.d.ts +0 -3
  294. package/dist/cli/register/registerConfig.d.ts.map +0 -1
  295. package/dist/cli/register/registerConfig.js +0 -14
  296. package/dist/cli/register/registerConfig.js.map +0 -1
  297. package/dist/cli/register/registerDialog.d.ts +0 -3
  298. package/dist/cli/register/registerDialog.d.ts.map +0 -1
  299. package/dist/cli/register/registerDialog.js +0 -45
  300. package/dist/cli/register/registerDialog.js.map +0 -1
  301. package/dist/cli/register/registerDom.d.ts +0 -3
  302. package/dist/cli/register/registerDom.d.ts.map +0 -1
  303. package/dist/cli/register/registerDom.js +0 -284
  304. package/dist/cli/register/registerDom.js.map +0 -1
  305. package/dist/cli/register/registerEval.d.ts +0 -3
  306. package/dist/cli/register/registerEval.d.ts.map +0 -1
  307. package/dist/cli/register/registerEval.js +0 -149
  308. package/dist/cli/register/registerEval.js.map +0 -1
  309. package/dist/cli/register/registerExtension.d.ts +0 -3
  310. package/dist/cli/register/registerExtension.d.ts.map +0 -1
  311. package/dist/cli/register/registerExtension.js +0 -72
  312. package/dist/cli/register/registerExtension.js.map +0 -1
  313. package/dist/cli/register/registerFill.d.ts +0 -3
  314. package/dist/cli/register/registerFill.d.ts.map +0 -1
  315. package/dist/cli/register/registerFill.js +0 -31
  316. package/dist/cli/register/registerFill.js.map +0 -1
  317. package/dist/cli/register/registerHover.d.ts +0 -3
  318. package/dist/cli/register/registerHover.d.ts.map +0 -1
  319. package/dist/cli/register/registerHover.js +0 -21
  320. package/dist/cli/register/registerHover.js.map +0 -1
  321. package/dist/cli/register/registerKeydown.d.ts +0 -3
  322. package/dist/cli/register/registerKeydown.d.ts.map +0 -1
  323. package/dist/cli/register/registerKeydown.js +0 -20
  324. package/dist/cli/register/registerKeydown.js.map +0 -1
  325. package/dist/cli/register/registerLocate.d.ts +0 -3
  326. package/dist/cli/register/registerLocate.d.ts.map +0 -1
  327. package/dist/cli/register/registerLocate.js +0 -48
  328. package/dist/cli/register/registerLocate.js.map +0 -1
  329. package/dist/cli/register/registerLogs.d.ts +0 -3
  330. package/dist/cli/register/registerLogs.d.ts.map +0 -1
  331. package/dist/cli/register/registerLogs.js +0 -64
  332. package/dist/cli/register/registerLogs.js.map +0 -1
  333. package/dist/cli/register/registerNet.d.ts +0 -3
  334. package/dist/cli/register/registerNet.d.ts.map +0 -1
  335. package/dist/cli/register/registerNet.js +0 -287
  336. package/dist/cli/register/registerNet.js.map +0 -1
  337. package/dist/cli/register/registerPage.d.ts +0 -3
  338. package/dist/cli/register/registerPage.d.ts.map +0 -1
  339. package/dist/cli/register/registerPage.js +0 -123
  340. package/dist/cli/register/registerPage.js.map +0 -1
  341. package/dist/cli/register/registerPlugin.d.ts +0 -3
  342. package/dist/cli/register/registerPlugin.d.ts.map +0 -1
  343. package/dist/cli/register/registerPlugin.js +0 -34
  344. package/dist/cli/register/registerPlugin.js.map +0 -1
  345. package/dist/cli/register/registerQuickAccess.d.ts +0 -3
  346. package/dist/cli/register/registerQuickAccess.d.ts.map +0 -1
  347. package/dist/cli/register/registerQuickAccess.js +0 -112
  348. package/dist/cli/register/registerQuickAccess.js.map +0 -1
  349. package/dist/cli/register/registerScrollTo.d.ts +0 -3
  350. package/dist/cli/register/registerScrollTo.d.ts.map +0 -1
  351. package/dist/cli/register/registerScrollTo.js +0 -22
  352. package/dist/cli/register/registerScrollTo.js.map +0 -1
  353. package/dist/cli/register/registerSnapshot.d.ts +0 -3
  354. package/dist/cli/register/registerSnapshot.d.ts.map +0 -1
  355. package/dist/cli/register/registerSnapshot.js +0 -38
  356. package/dist/cli/register/registerSnapshot.js.map +0 -1
  357. package/dist/cli/register/registerStorage.d.ts +0 -3
  358. package/dist/cli/register/registerStorage.d.ts.map +0 -1
  359. package/dist/cli/register/registerStorage.js +0 -61
  360. package/dist/cli/register/registerStorage.js.map +0 -1
  361. package/dist/cli/register/registerThrottle.d.ts +0 -3
  362. package/dist/cli/register/registerThrottle.d.ts.map +0 -1
  363. package/dist/cli/register/registerThrottle.js +0 -33
  364. package/dist/cli/register/registerThrottle.js.map +0 -1
  365. package/dist/cli/register/registerTrace.d.ts +0 -3
  366. package/dist/cli/register/registerTrace.d.ts.map +0 -1
  367. package/dist/cli/register/registerTrace.js +0 -57
  368. package/dist/cli/register/registerTrace.js.map +0 -1
  369. package/dist/cli/register/registerWatcher.d.ts +0 -3
  370. package/dist/cli/register/registerWatcher.d.ts.map +0 -1
  371. package/dist/cli/register/registerWatcher.js +0 -135
  372. package/dist/cli/register/registerWatcher.js.map +0 -1
  373. package/dist/config/argusConfig.d.ts +0 -76
  374. package/dist/config/argusConfig.d.ts.map +0 -1
  375. package/dist/config/argusConfig.js.map +0 -1
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: argus
3
+ description: Guides use of the Argus CLI to debug and inspect web apps via Chrome CDP or the Argus Chrome extension, including authenticated browser sessions, iframe targets, logs, eval, DOM, network, and screenshots.
4
+ ---
5
+
6
+ ## Argus CLI
7
+
8
+ Debug web apps through either:
9
+
10
+ - **Extension-control**: normal user Chrome profile, cookies, login state, existing extensions. Best for authenticated portal apps and ordinary browser sessions.
11
+ - **CDP Chrome**: Argus-launched/debuggable Chrome. Best for local apps, temp profiles, clean repros, headless runs, and raw Chrome target control.
12
+
13
+ Install/run:
14
+
15
+ ```bash
16
+ npm i -g @vforsh/argus
17
+ argus --help
18
+ npx -y @vforsh/argus --help
19
+ argus skill
20
+ ```
21
+
22
+ `argus skill` prints the absolute path to the installed `SKILL.md`. Use it when an agent needs to locate the packaged Argus skill files.
23
+
24
+ **Long-running commands:** `argus start`, `argus chrome start`, `argus watcher start`, and log tails do not exit on their own. Start them in the background when using an agent shell.
25
+
26
+ ---
27
+
28
+ ## Pick The Mode
29
+
30
+ Use **extension-control** when the task needs the user's normal Chrome profile, saved login, cookies, local storage, or already-open tabs.
31
+
32
+ Use **CDP Chrome** when the task needs an isolated browser, headless run, custom CDP port, script injection at startup, or raw `chrome://`/target-id control.
33
+
34
+ Use **iframe target selection** when the app is embedded in a portal page and `eval`/DOM/click/screenshot must run inside the embedded app, not the host page.
35
+
36
+ Read:
37
+
38
+ - [START.md](./reference/START.md) for CDP startup, watcher lifecycle, config defaults, and Node API.
39
+ - [EXTENSION.md](./reference/EXTENSION.md) for extension setup and runtime limitations.
40
+ - [INSPECT.md](./reference/INSPECT.md) for command catalogs: logs, eval, capture, DOM, interaction, auth, storage, trace, pages, emulation.
41
+ - [CAPTURE.md](./reference/CAPTURE.md) for screenshots, recordings, crop semantics, iframe capture, and recording troubleshooting.
42
+ - [NET.md](./reference/NET.md) for network capture, filtering, inspection, bodies, WebSockets, SSE, HAR export, and mocks.
43
+
44
+ ---
45
+
46
+ ## Authenticated Browser Profile Flow
47
+
48
+ Use this for any app that needs the user's normal browser profile, cookies, local storage, extensions, or saved login state. Do **not** use `argus start`, `argus chrome start --profile temp`, headless Chrome, or a fresh CDP profile for this flow; those lose the real login/session context.
49
+
50
+ ```bash
51
+ APP_URL="https://portal.example/app"
52
+ WATCHER_ID="app"
53
+
54
+ open -a "Google Chrome" "$APP_URL"
55
+ argus ext doctor --json
56
+ argus ext tabs --url "$APP_URL" --json
57
+ argus ext use --url "$APP_URL" --as "$WATCHER_ID" --json
58
+ argus eval "$WATCHER_ID" "({ title: document.title, href: location.href })" --json
59
+ ```
60
+
61
+ If multiple tabs match, do not guess. Run `argus ext tabs --url "$APP_URL" --json`, choose the intended `tabId`, then use:
62
+
63
+ ```bash
64
+ argus ext use --tab <tabId> --as "$WATCHER_ID" --json
65
+ ```
66
+
67
+ If the tab is restored in the background or app boot looks stuck, make it visible and reload:
68
+
69
+ ```bash
70
+ argus ext show "$WATCHER_ID"
71
+ argus reload "$WATCHER_ID"
72
+ argus eval-until "$WATCHER_ID" "document.readyState === 'complete'" --total-timeout 30s
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Extension Iframe Flow
78
+
79
+ Use this when the real app lives in an iframe inside a host page.
80
+
81
+ ```bash
82
+ APP_URL="https://portal.example/app"
83
+ WATCHER_ID="app"
84
+
85
+ open -a "Google Chrome" "$APP_URL"
86
+ argus ext use --url "$APP_URL" --as "$WATCHER_ID" --iframe-url game-frame-host.example --json
87
+ argus eval "$WATCHER_ID" "({ title: document.title, origin: location.origin })" --json
88
+ ```
89
+
90
+ If iframe selection fails because the iframe is not present yet:
91
+
92
+ ```bash
93
+ argus ext use --url "$APP_URL" --as "$WATCHER_ID" --json
94
+ argus ext show "$WATCHER_ID"
95
+ argus reload "$WATCHER_ID"
96
+ argus eval-until "$WATCHER_ID" "document.querySelectorAll('iframe').length > 0" --total-timeout 30s
97
+ argus ext targets "$WATCHER_ID" --tree
98
+ argus ext select "$WATCHER_ID" --iframe-url game-frame-host.example --json
99
+ ```
100
+
101
+ Useful selectors:
102
+
103
+ ```bash
104
+ argus ext select "$WATCHER_ID" --iframe-url game-frame-host.example
105
+ argus ext select "$WATCHER_ID" --iframe-title "Game Title"
106
+ argus ext select "$WATCHER_ID" --iframe auto
107
+ argus ext select "$WATCHER_ID" --page
108
+ argus ext doctor --watcher "$WATCHER_ID"
109
+ ```
110
+
111
+ `--iframe auto` is a convenience heuristic and should fail closed when multiple iframes look equally plausible. Prefer `--iframe-url` or `--iframe-title` when correctness matters.
112
+
113
+ ---
114
+
115
+ ## Inspect Loop
116
+
117
+ Once a watcher is attached, use quick bounded commands first:
118
+
119
+ ```bash
120
+ argus logs app --since 10m --levels error,warning
121
+ argus eval app "({ href: location.href, title: document.title })" --json
122
+ argus screenshot app --out shot.png
123
+ argus record app --duration 5s --selector "canvas" --out demo.mp4
124
+ argus dom tree app --selector body --depth 2
125
+ argus snapshot app --interactive
126
+ ```
127
+
128
+ For interaction:
129
+
130
+ ```bash
131
+ argus locate role app button --name "Submit"
132
+ argus click app --selector "button.submit"
133
+ argus click app --ref e5
134
+ argus drag app --selector "canvas" --pos 320,240 --by 80,-30
135
+ argus fill app --selector "#email" "user@example.com"
136
+ argus keydown app --key Enter
137
+ argus scroll-to app --selector "#footer"
138
+ ```
139
+
140
+ For iframe-active extension watchers, commands run against the selected iframe target. Screenshots, recordings, selectors, and eval are resolved relative to that iframe.
141
+
142
+ For deeper command lists, use [INSPECT.md](./reference/INSPECT.md). For screenshots/recording details, use [CAPTURE.md](./reference/CAPTURE.md). For eval flags, polling, file scripts, and args, use [EVAL.md](./reference/EVAL.md).
143
+
144
+ ---
145
+
146
+ ## CDP Quick Start
147
+
148
+ Use CDP for local apps and clean repros where a temp/debuggable browser is acceptable.
149
+
150
+ ```bash
151
+ npm run dev
152
+ argus start --id app --url localhost:3000
153
+ argus eval app "location.href"
154
+ argus screenshot app --out shot.png
155
+ argus record app --duration 3s --out demo.mp4
156
+ ```
157
+
158
+ `argus start` launches Chrome and a watcher together. For more control:
159
+
160
+ ```bash
161
+ argus chrome start --url http://localhost:3000
162
+ argus watcher start --id app --url localhost:3000 --chrome-port 9222
163
+ ```
164
+
165
+ Keep these commands in the background in agent shells. See [START.md](./reference/START.md) for profile modes, auth-state hydration, watcher target flags, config defaults, and programmatic watcher APIs.
166
+
167
+ ---
168
+
169
+ ## Troubleshooting
170
+
171
+ **No extension-control watcher** — Open/reload the browser extension, then run `argus ext doctor --json`.
172
+
173
+ **Multiple tabs matched** — Use `argus ext tabs --url <url> --json`, choose a `tabId`, then pass `--tab <tabId>`.
174
+
175
+ **Iframe not found** — `argus ext show <id>`, `argus reload <id>`, wait for iframes, then `argus ext targets <id> --tree`.
176
+
177
+ **Eval runs on host page** — Select the iframe first: `argus ext select <id> --iframe-url <substring>`.
178
+
179
+ **Watcher cannot attach in CDP mode** — Check the Chrome port: `argus chrome status --cdp 127.0.0.1:9222`.
180
+
181
+ **Wrong CDP target matched** — Use `--type iframe`, `--origin`, `--parent`, or `--target`. See [IFRAMES.md](./reference/IFRAMES.md).
182
+
183
+ **Need to keep a page unthrottled** — Use `argus page show <id>` or `argus ext show <id>`. Hide later with `argus page hide <id>`.
184
+
185
+ ---
186
+
187
+ ## References
188
+
189
+ - [START.md](./reference/START.md) — CDP startup, watcher lifecycle, config defaults, Node API.
190
+ - [EXTENSION.md](./reference/EXTENSION.md) — Extension setup and extension-control details.
191
+ - [INSPECT.md](./reference/INSPECT.md) — Logs, capture summary, DOM, interaction, auth, storage, trace, emulation.
192
+ - [CAPTURE.md](./reference/CAPTURE.md) — Screenshots, recordings, crop semantics, iframe capture, recording troubleshooting.
193
+ - [NET.md](./reference/NET.md) — Network capture, filtering, inspection, export, and mocks.
194
+ - [EVAL.md](./reference/EVAL.md) — Eval syntax, polling, files, args, iframe eval.
195
+ - [RUNTIME_CODE.md](./reference/RUNTIME_CODE.md) — Runtime JS/CSS discovery and live CSS edits.
196
+ - [IFRAMES.md](./reference/IFRAMES.md) — CDP iframe targeting and iframe concepts.
197
+ - [EXTENSION_IFRAME_EVAL.md](./reference/EXTENSION_IFRAME_EVAL.md) — Cross-origin iframe helper mechanics.
198
+ - [INJECT.md](./reference/INJECT.md) — Script injection on watcher attach/navigation.
199
+ - [DIALOG.md](./reference/DIALOG.md) — Browser dialog status and handling.
200
+ - [PLUGINS.md](./reference/PLUGINS.md) — CLI plugin loading and Google Sheets plugin.
@@ -0,0 +1,77 @@
1
+ ## Capture Commands
2
+
3
+ Use this when you need page pixels: screenshots for quick state checks, recordings for motion/gameplay/repro clips.
4
+
5
+ ## Screenshots
6
+
7
+ ```bash
8
+ argus screenshot app --out shot.png
9
+ argus screenshot app --selector "canvas" --out canvas.png
10
+ argus screenshot app --clip 100,80,640,360 --out crop.png
11
+ argus screenshot app --testid "game-canvas" --out game.png
12
+ ```
13
+
14
+ `--selector` and `--clip` are mutually exclusive. `--clip` is viewport-relative in CSS pixels. `--testid <id>` is shorthand for `--selector "[data-testid='<id>']"`.
15
+
16
+ ## Recording
17
+
18
+ ```bash
19
+ argus record app --duration 5s --out demo.mp4
20
+ argus record app --duration 3s --selector "canvas" --out canvas.mp4
21
+ argus record app --duration 3s --clip 100,80,640,360 --out crop.mp4
22
+ argus record app --duration 3s --testid "game-canvas" --out game.mp4
23
+ ```
24
+
25
+ Recordings are silent MP4/H.264 files by default. WebM is supported with `--format webm` or a `.webm` output path. Default FPS is 30; use `--fps <1-60>` for large canvases or lighter artifacts.
26
+
27
+ ```bash
28
+ argus record app --duration 5s --selector "canvas" --fps 12 --out canvas.mp4
29
+ argus record app --duration 5s --selector "canvas" --format webm --out canvas.webm
30
+ ```
31
+
32
+ For manual interaction windows:
33
+
34
+ ```bash
35
+ argus record start app --selector "canvas" --out canvas.mp4
36
+ argus click app --selector "#play"
37
+ argus record stop app
38
+ ```
39
+
40
+ ## Crop Semantics
41
+
42
+ Viewport capture records or screenshots the visible page viewport. Selector capture resolves the element once at capture start, then crops page pixels to that element rectangle. Clip capture uses `x,y,width,height` in viewport CSS pixels.
43
+
44
+ If the selected element moves or resizes during a recording, Argus keeps the original crop rectangle for that recording. Prefer a stable canvas/container selector for games.
45
+
46
+ ## Extension / Iframes
47
+
48
+ For iframe-active extension watchers, capture commands resolve selectors inside the selected iframe, then capture top-level page pixels with the translated crop. This is the same target model used by `eval`, DOM commands, and screenshots.
49
+
50
+ ```bash
51
+ argus ext use --url portal.example --as app --iframe-url game-frame-host.example
52
+ argus record app --duration 5s --selector "canvas" --out game.mp4
53
+ ```
54
+
55
+ If capture runs against the host page instead of the app, select the iframe first:
56
+
57
+ ```bash
58
+ argus ext targets app --tree
59
+ argus ext select app --iframe-url game-frame-host.example
60
+ ```
61
+
62
+ ## Troubleshooting
63
+
64
+ If recording fails with no frames, make the page visible and unthrottled:
65
+
66
+ ```bash
67
+ argus page show app
68
+ argus record app --duration 3s --selector "canvas" --out canvas.mp4
69
+ ```
70
+
71
+ If recording fails because `ffmpeg` is missing, install it or point Argus at it:
72
+
73
+ ```bash
74
+ ARGUS_FFMPEG=/opt/homebrew/bin/ffmpeg argus record app --duration 3s --out demo.mp4
75
+ ```
76
+
77
+ MP4 output requires an ffmpeg build with `libx264`. If your ffmpeg lacks it, install a full build or record WebM with `--format webm`.
@@ -0,0 +1,31 @@
1
+ # argus dialog
2
+
3
+ Inspect and handle browser JavaScript dialogs on the watcher-attached page.
4
+
5
+ ## Syntax
6
+
7
+ ```bash
8
+ argus dialog status [id] [--json]
9
+ argus dialog accept [id] [--json]
10
+ argus dialog dismiss [id] [--json]
11
+ argus dialog prompt [id] --text "<value>" [--json]
12
+ ```
13
+
14
+ ## Examples
15
+
16
+ ```bash
17
+ argus dialog status app
18
+ argus dialog accept app
19
+ argus dialog dismiss app
20
+ argus dialog prompt app --text "hello"
21
+ argus dialog status app --json
22
+ ```
23
+
24
+ ## Behavior
25
+
26
+ - `status` returns the single active dialog, or `null` when nothing is open.
27
+ - `accept` resolves the active dialog with OK / Leave / equivalent browser action.
28
+ - `dismiss` resolves the active dialog with Cancel / Stay / equivalent browser action.
29
+ - `prompt` is just `accept` plus submitted text. It fails if the active dialog is not a prompt.
30
+
31
+ Chrome only exposes one active JavaScript dialog at a time, so Argus models dialog state as a single current snapshot instead of a list.
@@ -0,0 +1,137 @@
1
+ # argus eval
2
+
3
+ Evaluate JavaScript in page connected to watcher.
4
+
5
+ Alias: `argus js`
6
+
7
+ ## Syntax
8
+
9
+ ```bash
10
+ argus eval [id] "<expression>" [flags]
11
+ argus js [id] "<expression>" [flags]
12
+ ```
13
+
14
+ ## Examples
15
+
16
+ ```bash
17
+ argus eval app "location.href"
18
+ argus eval app "document.title"
19
+ argus eval app "await fetch('/ping').then(r => r.status)"
20
+ argus eval app "window.store.getState()" --inject ./debug-hooks.js
21
+ argus eval app --file ./script.js --arg level=10 --arg mode=fast
22
+ argus eval app --file ./script.js --args ./args.json
23
+ argus eval app "document.title" --json --out ./result.json
24
+ argus eval app --file ./script.js --bundle
25
+ argus eval app --file ./script.js --no-bundle
26
+ ```
27
+
28
+ `--file` with leading `import`/`export` auto-enables bundling (one-line stderr note). `--bundle` forces bundling; `--no-bundle` reads the file as-is. Bundling resolves the entry and any import graph esbuild can resolve from the current working directory (including paths outside the entry directory and packages under `node_modules`). Node built-ins (`node:fs`, etc.) are rejected. TypeScript is transpiled without typechecking. Helpers may `export` symbols; the entry file must not emit top-level `export` into the bundle.
29
+
30
+ Poll until condition:
31
+
32
+ ```bash
33
+ argus eval app "document.title" --interval 250ms --until 'result === "ready"'
34
+ argus eval app "Date.now()" --interval 500 --count 10 --out ./poll.ndjson
35
+ argus eval app "Date.now()" --interval 500 --count 10 --out ./frames.json --rotate
36
+ ```
37
+
38
+ ## Output
39
+
40
+ - Default: compact preview
41
+ - `--json`: JSON object (NDJSON with `--interval`)
42
+ - `--out <path>`: write result to file; single eval overwrites, polling appends NDJSON, `--rotate` writes one numbered file per iteration
43
+
44
+ ## Behavior Flags
45
+
46
+ | Flag | Effect |
47
+ | ------------------------ | ----------------------------------- |
48
+ | `--no-await` | Don't await promises |
49
+ | `--timeout <duration>` | Eval timeout (`60000`, `60s`, `2m`) |
50
+ | `--no-return-by-value` | Preview-style results |
51
+ | `--no-fail-on-exception` | Don't exit 1 on throw |
52
+ | `--retry <n>` | Retry failed evals |
53
+ | `--silent` / `-q` | Suppress success output |
54
+ | `--inject <file>` | Run setup code before expression |
55
+ | `--bundle` | Force bundling for `--file` |
56
+ | `--no-bundle` | Skip bundling (disables auto) |
57
+ | `--arg <key=value>` | Expose string arg as `args[key]` |
58
+ | `--args <path>` | Load args map from JSON file |
59
+ | `--out <path>` | Write result to file |
60
+ | `--rotate` | One file per poll iteration |
61
+
62
+ ## Script Args
63
+
64
+ `--arg <key=value>` is repeatable on `eval`/`js` and `eval-until`/`wait`. It exposes a frozen `args` object to the evaluated source:
65
+
66
+ ```bash
67
+ argus js app --file ./open-level.js --arg level=10 --arg variant=arrows
68
+ argus js app --file ./open-level.js --args ./fixtures/level.json --arg variant=arrows
69
+ argus js app "window.store.getState()" --inject ./debug-hooks.js --arg user=qa
70
+ cat ./click-test-id.js | argus js app --stdin --arg testId=arrows.boosters.button.ruler
71
+ argus wait app --file ./ready.js --arg level=10 --total-timeout 20s
72
+ ```
73
+
74
+ Values stay strings; cast in the script:
75
+
76
+ ```js
77
+ const level = Number(args.level)
78
+ const variant = String(args.variant ?? 'arrows')
79
+ ```
80
+
81
+ Duplicate keys use the last value. Values are split at the first `=`, so URLs and query strings work. Invalid values like `--arg level`, `--arg =10`, or `--arg ""` exit with code 2 before contacting the watcher.
82
+
83
+ `--args <path>` loads a JSON object from disk. Primitive values (`string`, `number`, `boolean`, `null`) are coerced to strings; nested objects/arrays are rejected. CLI `--arg` flags override file entries.
84
+
85
+ ## Polling Flags
86
+
87
+ | Flag | Effect |
88
+ | ----------------------- | ----------------------------------- |
89
+ | `--interval <duration>` | Re-run periodically (`250ms`, `3s`) |
90
+ | `--count <n>` | Stop after n iterations |
91
+ | `--until <condition>` | Stop when truthy |
92
+
93
+ `--until` context: `{ result, exception, iteration, attempt }`
94
+
95
+ ## eval-until
96
+
97
+ Poll until expression returns truthy (`Boolean(result)`). Defaults to 250ms interval; silent intermediate output.
98
+
99
+ ```bash
100
+ argus eval-until [id] "<expression>" [flags]
101
+ ```
102
+
103
+ ```bash
104
+ argus eval-until app "document.querySelector('#loaded')"
105
+ argus eval-until app "window.APP_READY" --interval 500
106
+ argus eval-until app "document.title === 'Ready'" --total-timeout 30s
107
+ argus eval-until app "window.data" --verbose --count 20
108
+ argus eval-until app --file ./check.js --total-timeout 1m
109
+ argus wait app --file ./ready.js --arg level=10 --total-timeout 20s
110
+ ```
111
+
112
+ | Flag | Effect |
113
+ | ---------------------------- | --------------------------------------- |
114
+ | `--interval <ms\|duration>` | Polling interval (default: 250ms) |
115
+ | `--count <n>` | Max iterations |
116
+ | `--total-timeout <duration>` | Max wall-clock time (`30s`, `2m`, `1h`) |
117
+ | `--verbose` | Print intermediate (falsy) results |
118
+
119
+ Also supports all behavior flags (`--no-await`, `--timeout 60s`, `--json`, `--retry`, etc.) and iframe flags.
120
+ Also supports `--arg <key=value>`, `--args <path>`, and `--out <path>`.
121
+
122
+ **Exit codes:** 0 = truthy found, 1 = error/exhausted, 2 = invalid args, 130 = SIGINT/SIGTERM.
123
+
124
+ **vs `eval --interval --until`:** `eval-until` defaults interval to 250ms, uses implicit `Boolean(result)` condition, suppresses intermediate output by default, and adds `--total-timeout`.
125
+
126
+ ## Iframe Eval (extension mode)
127
+
128
+ Cross-origin iframes need helper script:
129
+
130
+ ```bash
131
+ argus eval iframe-helper --out src/argus-helper.js
132
+ argus eval app "window.gameState" --iframe "iframe#game"
133
+ ```
134
+
135
+ Options: `--iframe <selector>`, `--iframe-namespace <name>`, `--iframe-timeout <duration>` (`5000`, `5s`, `1m`)
136
+
137
+ See [EXTENSION_IFRAME_EVAL.md](./EXTENSION_IFRAME_EVAL.md).
@@ -0,0 +1,38 @@
1
+ ## Extension Workflow
2
+
3
+ Debug normal Chrome session without CDP flags.
4
+
5
+ ### One-Time Setup
6
+
7
+ ```bash
8
+ # 1) Build extension
9
+ cd packages/argus-extension && bun run build
10
+
11
+ # 2) Load in Chrome
12
+ # chrome://extensions → Developer mode → Load unpacked → select packages/argus-extension
13
+ # Copy Extension ID (e.g. kkoefnlnjlnlbohcifcbkpgmjaokmipi)
14
+
15
+ # 3) Install native host
16
+ argus extension setup <EXTENSION_ID>
17
+ argus extension status
18
+ ```
19
+
20
+ ### Usage
21
+
22
+ 1. Click Argus extension icon
23
+ 2. Click **Attach** on target tab
24
+ 3. Chrome shows orange "debugging" bar (expected)
25
+
26
+ ```bash
27
+ argus list
28
+ argus logs extension
29
+ argus eval extension "document.title"
30
+ ```
31
+
32
+ ### Limitations
33
+
34
+ - Debugging bar can't be hidden (Chrome security)
35
+ - One debugger per tab
36
+ - Tab must stay open
37
+ - Manual tab selection (no `--url` matching)
38
+ - Cross-origin iframes: use helper script (see [IFRAMES.md](./IFRAMES.md))
@@ -0,0 +1,58 @@
1
+ # Cross-Origin Iframe Eval (Extension Mode)
2
+
3
+ Extension mode can't eval directly in cross-origin iframes. Use postMessage bridge.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ # Generate helper
9
+ argus eval iframe-helper --out src/argus-helper.js
10
+ argus eval iframe-helper --iife --out dist/argus-helper.js # Wrap in IIFE
11
+ argus eval iframe-helper --namespace myapp # Custom namespace
12
+ ```
13
+
14
+ Include in iframe HTML:
15
+
16
+ ```html
17
+ <script src="argus-helper.js"></script>
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```bash
23
+ argus eval app "document.title" --iframe "iframe"
24
+ argus eval app "window.gameState" --iframe "iframe#game"
25
+ argus eval app "heavyComputation()" --iframe "iframe" --iframe-timeout 10000
26
+ ```
27
+
28
+ ## Message Format
29
+
30
+ Request (parent → iframe):
31
+
32
+ ```json
33
+ { "type": "argus:eval", "id": "<uuid>", "code": "<expression>" }
34
+ ```
35
+
36
+ Response (iframe → parent):
37
+
38
+ ```json
39
+ { "type": "argus:eval-result", "id": "<uuid>", "ok": true, "result": "<value>" }
40
+ ```
41
+
42
+ ## When to Use
43
+
44
+ | Scenario | Approach |
45
+ | ------------------------ | -------------------------------------- |
46
+ | CDP + any iframe | `--type iframe` / `--origin` targeting |
47
+ | Extension + same-origin | Eval reaches iframe directly |
48
+ | Extension + cross-origin | **`--iframe` option** (needs helper) |
49
+
50
+ ## Security
51
+
52
+ Helper uses `eval()`. Dev/debug builds only. Consider removing from production.
53
+
54
+ ## Limitations
55
+
56
+ - Requires modifying iframe source
57
+ - Results must be serializable
58
+ - Async needs explicit `await` in code string
@@ -0,0 +1,46 @@
1
+ # Iframes and Target Selection (CDP)
2
+
3
+ For embedded apps/games in iframes. Simple `--url` matching can attach to wrong target when parent page has iframe URL in query string.
4
+
5
+ ## Targeting Flags
6
+
7
+ ```bash
8
+ # Only iframes
9
+ argus watcher start --id game --type iframe --url localhost:3007
10
+
11
+ # Match by origin (ignores query params)
12
+ argus watcher start --id game --origin https://localhost:3007
13
+
14
+ # Explicit target ID
15
+ argus page targets --type iframe
16
+ argus watcher start --id game --target CC1135709D9AC3B9CC0446F8B58CC344
17
+
18
+ # Match parent URL pattern
19
+ argus watcher start --id game --type iframe --parent yandex.ru --url localhost:3007
20
+ ```
21
+
22
+ ## Discovering Targets
23
+
24
+ ```bash
25
+ argus page targets # List all
26
+ argus page targets --tree # Parent-child tree
27
+ argus page targets --type iframe
28
+ ```
29
+
30
+ ## Example (embedded game)
31
+
32
+ ```bash
33
+ # Terminal 1
34
+ argus chrome start --url "https://yandex.ru/games/app/123"
35
+
36
+ # Terminal 2
37
+ argus watcher start --id game --type iframe --url localhost:3007
38
+
39
+ # Terminal 3
40
+ argus logs game --levels error,warning
41
+ argus eval game "window.gameState"
42
+ ```
43
+
44
+ ## Extension Mode
45
+
46
+ Cross-origin iframes need helper script + `argus eval --iframe`. See [EXTENSION_IFRAME_EVAL.md](./EXTENSION_IFRAME_EVAL.md).