@lhremote/core 0.8.0 → 0.9.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 (438) hide show
  1. package/dist/cdp/app-discovery.d.ts +57 -0
  2. package/dist/cdp/app-discovery.d.ts.map +1 -1
  3. package/dist/cdp/app-discovery.js +90 -7
  4. package/dist/cdp/app-discovery.js.map +1 -1
  5. package/dist/cdp/app-discovery.test.js +180 -9
  6. package/dist/cdp/app-discovery.test.js.map +1 -1
  7. package/dist/cdp/client.d.ts +8 -1
  8. package/dist/cdp/client.d.ts.map +1 -1
  9. package/dist/cdp/client.js +8 -1
  10. package/dist/cdp/client.js.map +1 -1
  11. package/dist/cdp/discovery.d.ts.map +1 -1
  12. package/dist/cdp/discovery.js +5 -1
  13. package/dist/cdp/discovery.js.map +1 -1
  14. package/dist/cdp/discovery.test.js +7 -0
  15. package/dist/cdp/discovery.test.js.map +1 -1
  16. package/dist/cdp/index.d.ts +1 -1
  17. package/dist/cdp/index.d.ts.map +1 -1
  18. package/dist/cdp/index.js +1 -1
  19. package/dist/cdp/index.js.map +1 -1
  20. package/dist/cdp/instance-discovery.d.ts.map +1 -1
  21. package/dist/cdp/instance-discovery.js +25 -10
  22. package/dist/cdp/instance-discovery.js.map +1 -1
  23. package/dist/cdp/instance-discovery.test.js +17 -0
  24. package/dist/cdp/instance-discovery.test.js.map +1 -1
  25. package/dist/cdp/testing/launch-chromium.d.ts +1 -1
  26. package/dist/cdp/testing/launch-chromium.js +2 -2
  27. package/dist/db/client.d.ts.map +1 -1
  28. package/dist/db/client.js +3 -0
  29. package/dist/db/client.js.map +1 -1
  30. package/dist/db/repositories/collection-list.integration.test.js +6 -4
  31. package/dist/db/repositories/collection-list.integration.test.js.map +1 -1
  32. package/dist/index.d.ts +6 -6
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +6 -6
  35. package/dist/index.js.map +1 -1
  36. package/dist/linkedin/dom-automation-retry.test.d.ts +2 -0
  37. package/dist/linkedin/dom-automation-retry.test.d.ts.map +1 -0
  38. package/dist/linkedin/dom-automation-retry.test.js +51 -0
  39. package/dist/linkedin/dom-automation-retry.test.js.map +1 -0
  40. package/dist/linkedin/dom-automation.d.ts +160 -3
  41. package/dist/linkedin/dom-automation.d.ts.map +1 -1
  42. package/dist/linkedin/dom-automation.js +489 -14
  43. package/dist/linkedin/dom-automation.js.map +1 -1
  44. package/dist/linkedin/humanized-mouse.d.ts +69 -0
  45. package/dist/linkedin/humanized-mouse.d.ts.map +1 -0
  46. package/dist/linkedin/humanized-mouse.js +109 -0
  47. package/dist/linkedin/humanized-mouse.js.map +1 -0
  48. package/dist/linkedin/index.d.ts +2 -1
  49. package/dist/linkedin/index.d.ts.map +1 -1
  50. package/dist/linkedin/index.js +2 -1
  51. package/dist/linkedin/index.js.map +1 -1
  52. package/dist/operations/add-people-to-collection.d.ts +1 -1
  53. package/dist/operations/add-people-to-collection.d.ts.map +1 -1
  54. package/dist/operations/add-people-to-collection.js +3 -6
  55. package/dist/operations/add-people-to-collection.js.map +1 -1
  56. package/dist/operations/build-linkedin-url.test.d.ts +2 -0
  57. package/dist/operations/build-linkedin-url.test.d.ts.map +1 -0
  58. package/dist/operations/build-linkedin-url.test.js +158 -0
  59. package/dist/operations/build-linkedin-url.test.js.map +1 -0
  60. package/dist/operations/campaign-add-action.d.ts +1 -1
  61. package/dist/operations/campaign-add-action.d.ts.map +1 -1
  62. package/dist/operations/campaign-add-action.js +3 -6
  63. package/dist/operations/campaign-add-action.js.map +1 -1
  64. package/dist/operations/campaign-create.d.ts +1 -1
  65. package/dist/operations/campaign-create.d.ts.map +1 -1
  66. package/dist/operations/campaign-create.js +3 -6
  67. package/dist/operations/campaign-create.js.map +1 -1
  68. package/dist/operations/campaign-delete.d.ts +1 -1
  69. package/dist/operations/campaign-delete.d.ts.map +1 -1
  70. package/dist/operations/campaign-delete.js +3 -6
  71. package/dist/operations/campaign-delete.js.map +1 -1
  72. package/dist/operations/campaign-erase.d.ts +1 -1
  73. package/dist/operations/campaign-erase.d.ts.map +1 -1
  74. package/dist/operations/campaign-erase.js +3 -6
  75. package/dist/operations/campaign-erase.js.map +1 -1
  76. package/dist/operations/campaign-exclude-add.d.ts +1 -1
  77. package/dist/operations/campaign-exclude-add.d.ts.map +1 -1
  78. package/dist/operations/campaign-exclude-add.js +3 -6
  79. package/dist/operations/campaign-exclude-add.js.map +1 -1
  80. package/dist/operations/campaign-exclude-list.d.ts +1 -1
  81. package/dist/operations/campaign-exclude-list.d.ts.map +1 -1
  82. package/dist/operations/campaign-exclude-list.js +3 -6
  83. package/dist/operations/campaign-exclude-list.js.map +1 -1
  84. package/dist/operations/campaign-exclude-remove.d.ts +1 -1
  85. package/dist/operations/campaign-exclude-remove.d.ts.map +1 -1
  86. package/dist/operations/campaign-exclude-remove.js +3 -6
  87. package/dist/operations/campaign-exclude-remove.js.map +1 -1
  88. package/dist/operations/campaign-export.d.ts +1 -1
  89. package/dist/operations/campaign-export.d.ts.map +1 -1
  90. package/dist/operations/campaign-export.js +3 -6
  91. package/dist/operations/campaign-export.js.map +1 -1
  92. package/dist/operations/campaign-get.d.ts +1 -1
  93. package/dist/operations/campaign-get.d.ts.map +1 -1
  94. package/dist/operations/campaign-get.js +3 -6
  95. package/dist/operations/campaign-get.js.map +1 -1
  96. package/dist/operations/campaign-list-people.d.ts +1 -1
  97. package/dist/operations/campaign-list-people.d.ts.map +1 -1
  98. package/dist/operations/campaign-list-people.js +3 -6
  99. package/dist/operations/campaign-list-people.js.map +1 -1
  100. package/dist/operations/campaign-list.d.ts +1 -1
  101. package/dist/operations/campaign-list.d.ts.map +1 -1
  102. package/dist/operations/campaign-list.js +3 -6
  103. package/dist/operations/campaign-list.js.map +1 -1
  104. package/dist/operations/campaign-move-next.d.ts +1 -1
  105. package/dist/operations/campaign-move-next.d.ts.map +1 -1
  106. package/dist/operations/campaign-move-next.js +3 -6
  107. package/dist/operations/campaign-move-next.js.map +1 -1
  108. package/dist/operations/campaign-remove-action.d.ts +1 -1
  109. package/dist/operations/campaign-remove-action.d.ts.map +1 -1
  110. package/dist/operations/campaign-remove-action.js +3 -6
  111. package/dist/operations/campaign-remove-action.js.map +1 -1
  112. package/dist/operations/campaign-remove-people.d.ts +1 -1
  113. package/dist/operations/campaign-remove-people.d.ts.map +1 -1
  114. package/dist/operations/campaign-remove-people.js +3 -6
  115. package/dist/operations/campaign-remove-people.js.map +1 -1
  116. package/dist/operations/campaign-reorder-actions.d.ts +1 -1
  117. package/dist/operations/campaign-reorder-actions.d.ts.map +1 -1
  118. package/dist/operations/campaign-reorder-actions.js +3 -6
  119. package/dist/operations/campaign-reorder-actions.js.map +1 -1
  120. package/dist/operations/campaign-retry.d.ts +1 -1
  121. package/dist/operations/campaign-retry.d.ts.map +1 -1
  122. package/dist/operations/campaign-retry.js +3 -6
  123. package/dist/operations/campaign-retry.js.map +1 -1
  124. package/dist/operations/campaign-start.d.ts +1 -1
  125. package/dist/operations/campaign-start.d.ts.map +1 -1
  126. package/dist/operations/campaign-start.js +3 -6
  127. package/dist/operations/campaign-start.js.map +1 -1
  128. package/dist/operations/campaign-statistics.d.ts +1 -1
  129. package/dist/operations/campaign-statistics.d.ts.map +1 -1
  130. package/dist/operations/campaign-statistics.js +3 -6
  131. package/dist/operations/campaign-statistics.js.map +1 -1
  132. package/dist/operations/campaign-status.d.ts +1 -1
  133. package/dist/operations/campaign-status.d.ts.map +1 -1
  134. package/dist/operations/campaign-status.js +3 -6
  135. package/dist/operations/campaign-status.js.map +1 -1
  136. package/dist/operations/campaign-stop.d.ts +1 -1
  137. package/dist/operations/campaign-stop.d.ts.map +1 -1
  138. package/dist/operations/campaign-stop.js +3 -6
  139. package/dist/operations/campaign-stop.js.map +1 -1
  140. package/dist/operations/campaign-update-action.d.ts +1 -1
  141. package/dist/operations/campaign-update-action.d.ts.map +1 -1
  142. package/dist/operations/campaign-update-action.js +3 -6
  143. package/dist/operations/campaign-update-action.js.map +1 -1
  144. package/dist/operations/campaign-update.d.ts +1 -1
  145. package/dist/operations/campaign-update.d.ts.map +1 -1
  146. package/dist/operations/campaign-update.js +3 -6
  147. package/dist/operations/campaign-update.js.map +1 -1
  148. package/dist/operations/check-replies.d.ts +3 -1
  149. package/dist/operations/check-replies.d.ts.map +1 -1
  150. package/dist/operations/check-replies.js +132 -17
  151. package/dist/operations/check-replies.js.map +1 -1
  152. package/dist/operations/check-replies.test.js +177 -17
  153. package/dist/operations/check-replies.test.js.map +1 -1
  154. package/dist/operations/collect-people.d.ts +1 -1
  155. package/dist/operations/collect-people.d.ts.map +1 -1
  156. package/dist/operations/collect-people.js +3 -6
  157. package/dist/operations/collect-people.js.map +1 -1
  158. package/dist/operations/comment-on-post.d.ts +4 -1
  159. package/dist/operations/comment-on-post.d.ts.map +1 -1
  160. package/dist/operations/comment-on-post.js +15 -19
  161. package/dist/operations/comment-on-post.js.map +1 -1
  162. package/dist/operations/comment-on-post.test.js +8 -6
  163. package/dist/operations/comment-on-post.test.js.map +1 -1
  164. package/dist/operations/create-collection.d.ts +1 -1
  165. package/dist/operations/create-collection.d.ts.map +1 -1
  166. package/dist/operations/create-collection.js +3 -6
  167. package/dist/operations/create-collection.js.map +1 -1
  168. package/dist/operations/delete-collection.d.ts +1 -1
  169. package/dist/operations/delete-collection.d.ts.map +1 -1
  170. package/dist/operations/delete-collection.js +3 -6
  171. package/dist/operations/delete-collection.js.map +1 -1
  172. package/dist/operations/dismiss-errors.d.ts +7 -4
  173. package/dist/operations/dismiss-errors.d.ts.map +1 -1
  174. package/dist/operations/dismiss-errors.js +52 -33
  175. package/dist/operations/dismiss-errors.js.map +1 -1
  176. package/dist/operations/dismiss-errors.test.js +53 -6
  177. package/dist/operations/dismiss-errors.test.js.map +1 -1
  178. package/dist/operations/endorse-skills.test.d.ts +2 -0
  179. package/dist/operations/endorse-skills.test.d.ts.map +1 -0
  180. package/dist/operations/endorse-skills.test.js +70 -0
  181. package/dist/operations/endorse-skills.test.js.map +1 -0
  182. package/dist/operations/enrich-profile.test.d.ts +2 -0
  183. package/dist/operations/enrich-profile.test.d.ts.map +1 -0
  184. package/dist/operations/enrich-profile.test.js +73 -0
  185. package/dist/operations/enrich-profile.test.js.map +1 -0
  186. package/dist/operations/ephemeral-action.d.ts +1 -1
  187. package/dist/operations/ephemeral-action.d.ts.map +1 -1
  188. package/dist/operations/ephemeral-action.js +3 -6
  189. package/dist/operations/ephemeral-action.js.map +1 -1
  190. package/dist/operations/ephemeral-action.test.d.ts +2 -0
  191. package/dist/operations/ephemeral-action.test.d.ts.map +1 -0
  192. package/dist/operations/ephemeral-action.test.js +140 -0
  193. package/dist/operations/ephemeral-action.test.js.map +1 -0
  194. package/dist/operations/follow-person.test.d.ts +2 -0
  195. package/dist/operations/follow-person.test.d.ts.map +1 -0
  196. package/dist/operations/follow-person.test.js +57 -0
  197. package/dist/operations/follow-person.test.js.map +1 -0
  198. package/dist/operations/get-action-budget.d.ts +1 -1
  199. package/dist/operations/get-action-budget.d.ts.map +1 -1
  200. package/dist/operations/get-action-budget.js +3 -6
  201. package/dist/operations/get-action-budget.js.map +1 -1
  202. package/dist/operations/get-errors.d.ts +5 -1
  203. package/dist/operations/get-errors.d.ts.map +1 -1
  204. package/dist/operations/get-errors.js +55 -33
  205. package/dist/operations/get-errors.js.map +1 -1
  206. package/dist/operations/get-errors.test.js +54 -55
  207. package/dist/operations/get-errors.test.js.map +1 -1
  208. package/dist/operations/get-feed.d.ts +83 -4
  209. package/dist/operations/get-feed.d.ts.map +1 -1
  210. package/dist/operations/get-feed.js +400 -153
  211. package/dist/operations/get-feed.js.map +1 -1
  212. package/dist/operations/get-feed.test.js +416 -190
  213. package/dist/operations/get-feed.test.js.map +1 -1
  214. package/dist/operations/get-post-engagers.d.ts +6 -3
  215. package/dist/operations/get-post-engagers.d.ts.map +1 -1
  216. package/dist/operations/get-post-engagers.js +278 -78
  217. package/dist/operations/get-post-engagers.js.map +1 -1
  218. package/dist/operations/get-post-engagers.test.js +292 -14
  219. package/dist/operations/get-post-engagers.test.js.map +1 -1
  220. package/dist/operations/get-post-stats.d.ts +8 -3
  221. package/dist/operations/get-post-stats.d.ts.map +1 -1
  222. package/dist/operations/get-post-stats.js +101 -37
  223. package/dist/operations/get-post-stats.js.map +1 -1
  224. package/dist/operations/get-post-stats.test.js +137 -2
  225. package/dist/operations/get-post-stats.test.js.map +1 -1
  226. package/dist/operations/get-post.d.ts +9 -150
  227. package/dist/operations/get-post.d.ts.map +1 -1
  228. package/dist/operations/get-post.js +356 -210
  229. package/dist/operations/get-post.js.map +1 -1
  230. package/dist/operations/get-post.test.js +210 -387
  231. package/dist/operations/get-post.test.js.map +1 -1
  232. package/dist/operations/get-profile-activity.d.ts +13 -92
  233. package/dist/operations/get-profile-activity.d.ts.map +1 -1
  234. package/dist/operations/get-profile-activity.js +305 -105
  235. package/dist/operations/get-profile-activity.js.map +1 -1
  236. package/dist/operations/get-profile-activity.test.js +277 -158
  237. package/dist/operations/get-profile-activity.test.js.map +1 -1
  238. package/dist/operations/get-throttle-status.d.ts +1 -1
  239. package/dist/operations/get-throttle-status.d.ts.map +1 -1
  240. package/dist/operations/get-throttle-status.js +4 -10
  241. package/dist/operations/get-throttle-status.js.map +1 -1
  242. package/dist/operations/import-people-from-collection.d.ts +1 -1
  243. package/dist/operations/import-people-from-collection.d.ts.map +1 -1
  244. package/dist/operations/import-people-from-collection.js +3 -6
  245. package/dist/operations/import-people-from-collection.js.map +1 -1
  246. package/dist/operations/import-people-from-urls.d.ts +1 -1
  247. package/dist/operations/import-people-from-urls.d.ts.map +1 -1
  248. package/dist/operations/import-people-from-urls.js +3 -6
  249. package/dist/operations/import-people-from-urls.js.map +1 -1
  250. package/dist/operations/index.d.ts +2 -2
  251. package/dist/operations/index.d.ts.map +1 -1
  252. package/dist/operations/index.js +2 -1
  253. package/dist/operations/index.js.map +1 -1
  254. package/dist/operations/like-person-posts.test.d.ts +2 -0
  255. package/dist/operations/like-person-posts.test.d.ts.map +1 -0
  256. package/dist/operations/like-person-posts.test.js +103 -0
  257. package/dist/operations/like-person-posts.test.js.map +1 -0
  258. package/dist/operations/list-collections.d.ts +1 -1
  259. package/dist/operations/list-collections.d.ts.map +1 -1
  260. package/dist/operations/list-collections.js +3 -6
  261. package/dist/operations/list-collections.js.map +1 -1
  262. package/dist/operations/message-person.test.d.ts +2 -0
  263. package/dist/operations/message-person.test.d.ts.map +1 -0
  264. package/dist/operations/message-person.test.js +108 -0
  265. package/dist/operations/message-person.test.js.map +1 -0
  266. package/dist/operations/navigate-away.d.ts +14 -0
  267. package/dist/operations/navigate-away.d.ts.map +1 -0
  268. package/dist/operations/navigate-away.js +24 -0
  269. package/dist/operations/navigate-away.js.map +1 -0
  270. package/dist/operations/navigate-away.test.d.ts +2 -0
  271. package/dist/operations/navigate-away.test.d.ts.map +1 -0
  272. package/dist/operations/navigate-away.test.js +51 -0
  273. package/dist/operations/navigate-away.test.js.map +1 -0
  274. package/dist/operations/query-messages.d.ts +1 -1
  275. package/dist/operations/query-messages.d.ts.map +1 -1
  276. package/dist/operations/query-messages.js +3 -6
  277. package/dist/operations/query-messages.js.map +1 -1
  278. package/dist/operations/react-to-post.d.ts +3 -0
  279. package/dist/operations/react-to-post.d.ts.map +1 -1
  280. package/dist/operations/react-to-post.js +13 -15
  281. package/dist/operations/react-to-post.js.map +1 -1
  282. package/dist/operations/react-to-post.test.js +8 -5
  283. package/dist/operations/react-to-post.test.js.map +1 -1
  284. package/dist/operations/remove-connection.test.d.ts +2 -0
  285. package/dist/operations/remove-connection.test.d.ts.map +1 -0
  286. package/dist/operations/remove-connection.test.js +45 -0
  287. package/dist/operations/remove-connection.test.js.map +1 -0
  288. package/dist/operations/remove-people-from-collection.d.ts +1 -1
  289. package/dist/operations/remove-people-from-collection.d.ts.map +1 -1
  290. package/dist/operations/remove-people-from-collection.js +3 -6
  291. package/dist/operations/remove-people-from-collection.js.map +1 -1
  292. package/dist/operations/resolve-linkedin-entity.d.ts.map +1 -1
  293. package/dist/operations/resolve-linkedin-entity.js +2 -2
  294. package/dist/operations/resolve-linkedin-entity.js.map +1 -1
  295. package/dist/operations/resolve-linkedin-entity.test.d.ts +2 -0
  296. package/dist/operations/resolve-linkedin-entity.test.d.ts.map +1 -0
  297. package/dist/operations/resolve-linkedin-entity.test.js +343 -0
  298. package/dist/operations/resolve-linkedin-entity.test.js.map +1 -0
  299. package/dist/operations/scrape-messaging-history.d.ts +2 -1
  300. package/dist/operations/scrape-messaging-history.d.ts.map +1 -1
  301. package/dist/operations/scrape-messaging-history.js +121 -18
  302. package/dist/operations/scrape-messaging-history.js.map +1 -1
  303. package/dist/operations/scrape-messaging-history.test.js +134 -12
  304. package/dist/operations/scrape-messaging-history.test.js.map +1 -1
  305. package/dist/operations/search-posts.d.ts +20 -112
  306. package/dist/operations/search-posts.d.ts.map +1 -1
  307. package/dist/operations/search-posts.js +369 -170
  308. package/dist/operations/search-posts.js.map +1 -1
  309. package/dist/operations/search-posts.test.js +273 -234
  310. package/dist/operations/search-posts.test.js.map +1 -1
  311. package/dist/operations/send-inmail.test.d.ts +2 -0
  312. package/dist/operations/send-inmail.test.d.ts.map +1 -0
  313. package/dist/operations/send-inmail.test.js +108 -0
  314. package/dist/operations/send-inmail.test.js.map +1 -0
  315. package/dist/operations/send-invite.test.d.ts +2 -0
  316. package/dist/operations/send-invite.test.d.ts.map +1 -0
  317. package/dist/operations/send-invite.test.js +59 -0
  318. package/dist/operations/send-invite.test.js.map +1 -0
  319. package/dist/operations/types.d.ts +24 -1
  320. package/dist/operations/types.d.ts.map +1 -1
  321. package/dist/operations/types.js +13 -1
  322. package/dist/operations/types.js.map +1 -1
  323. package/dist/operations/visit-profile.d.ts +1 -1
  324. package/dist/operations/visit-profile.d.ts.map +1 -1
  325. package/dist/operations/visit-profile.js +3 -6
  326. package/dist/operations/visit-profile.js.map +1 -1
  327. package/dist/services/account-resolution.d.ts +9 -4
  328. package/dist/services/account-resolution.d.ts.map +1 -1
  329. package/dist/services/account-resolution.js +60 -5
  330. package/dist/services/account-resolution.js.map +1 -1
  331. package/dist/services/app.d.ts +6 -2
  332. package/dist/services/app.d.ts.map +1 -1
  333. package/dist/services/app.js +18 -6
  334. package/dist/services/app.js.map +1 -1
  335. package/dist/services/app.test.js +41 -7
  336. package/dist/services/app.test.js.map +1 -1
  337. package/dist/services/campaign.d.ts +34 -2
  338. package/dist/services/campaign.d.ts.map +1 -1
  339. package/dist/services/campaign.js +108 -1
  340. package/dist/services/campaign.js.map +1 -1
  341. package/dist/services/errors.d.ts +2 -1
  342. package/dist/services/errors.d.ts.map +1 -1
  343. package/dist/services/errors.js +6 -3
  344. package/dist/services/errors.js.map +1 -1
  345. package/dist/services/index.d.ts +0 -1
  346. package/dist/services/index.d.ts.map +1 -1
  347. package/dist/services/index.js +0 -1
  348. package/dist/services/index.js.map +1 -1
  349. package/dist/services/instance-context.d.ts +5 -1
  350. package/dist/services/instance-context.d.ts.map +1 -1
  351. package/dist/services/instance-context.js +87 -28
  352. package/dist/services/instance-context.js.map +1 -1
  353. package/dist/services/instance-context.test.js +5 -1
  354. package/dist/services/instance-context.test.js.map +1 -1
  355. package/dist/services/instance-lifecycle.d.ts.map +1 -1
  356. package/dist/services/instance-lifecycle.js +32 -1
  357. package/dist/services/instance-lifecycle.js.map +1 -1
  358. package/dist/services/instance-lifecycle.test.js +52 -1
  359. package/dist/services/instance-lifecycle.test.js.map +1 -1
  360. package/dist/services/instance.d.ts +19 -7
  361. package/dist/services/instance.d.ts.map +1 -1
  362. package/dist/services/instance.js +56 -17
  363. package/dist/services/instance.js.map +1 -1
  364. package/dist/services/instance.test.js +65 -0
  365. package/dist/services/instance.test.js.map +1 -1
  366. package/dist/services/launcher.d.ts +47 -3
  367. package/dist/services/launcher.d.ts.map +1 -1
  368. package/dist/services/launcher.js +205 -33
  369. package/dist/services/launcher.js.map +1 -1
  370. package/dist/services/launcher.test.js +133 -6
  371. package/dist/services/launcher.test.js.map +1 -1
  372. package/dist/services/status.d.ts +6 -2
  373. package/dist/services/status.d.ts.map +1 -1
  374. package/dist/services/status.js +67 -34
  375. package/dist/services/status.js.map +1 -1
  376. package/dist/services/status.test.js +9 -2
  377. package/dist/services/status.test.js.map +1 -1
  378. package/dist/testing/e2e-helpers.d.ts +23 -1
  379. package/dist/testing/e2e-helpers.d.ts.map +1 -1
  380. package/dist/testing/e2e-helpers.js +110 -5
  381. package/dist/testing/e2e-helpers.js.map +1 -1
  382. package/dist/testing/index.d.ts +1 -1
  383. package/dist/testing/index.d.ts.map +1 -1
  384. package/dist/testing/index.js +1 -1
  385. package/dist/testing/index.js.map +1 -1
  386. package/dist/types/account.d.ts +1 -1
  387. package/dist/types/feed.d.ts +1 -3
  388. package/dist/types/feed.d.ts.map +1 -1
  389. package/dist/types/index.d.ts +0 -1
  390. package/dist/types/index.d.ts.map +1 -1
  391. package/dist/utils/cdp-port.d.ts.map +1 -1
  392. package/dist/utils/cdp-port.js +3 -1
  393. package/dist/utils/cdp-port.js.map +1 -1
  394. package/dist/utils/cdp-port.test.js +1 -1
  395. package/dist/utils/cdp-port.test.js.map +1 -1
  396. package/dist/utils/delay.d.ts +79 -0
  397. package/dist/utils/delay.d.ts.map +1 -1
  398. package/dist/utils/delay.js +118 -0
  399. package/dist/utils/delay.js.map +1 -1
  400. package/dist/utils/delay.test.js +111 -1
  401. package/dist/utils/delay.test.js.map +1 -1
  402. package/dist/utils/index.d.ts +2 -1
  403. package/dist/utils/index.d.ts.map +1 -1
  404. package/dist/utils/index.js +2 -1
  405. package/dist/utils/index.js.map +1 -1
  406. package/dist/utils/session-pacer.d.ts +27 -0
  407. package/dist/utils/session-pacer.d.ts.map +1 -0
  408. package/dist/utils/session-pacer.js +55 -0
  409. package/dist/utils/session-pacer.js.map +1 -0
  410. package/dist/utils/session-pacer.test.d.ts +2 -0
  411. package/dist/utils/session-pacer.test.d.ts.map +1 -0
  412. package/dist/utils/session-pacer.test.js +111 -0
  413. package/dist/utils/session-pacer.test.js.map +1 -0
  414. package/package.json +1 -1
  415. package/dist/linkedin/__tests__/selectors.integration.test.d.ts +0 -2
  416. package/dist/linkedin/__tests__/selectors.integration.test.d.ts.map +0 -1
  417. package/dist/linkedin/__tests__/selectors.integration.test.js +0 -258
  418. package/dist/linkedin/__tests__/selectors.integration.test.js.map +0 -1
  419. package/dist/types/search-posts.d.ts +0 -22
  420. package/dist/types/search-posts.d.ts.map +0 -1
  421. package/dist/types/search-posts.js +0 -4
  422. package/dist/types/search-posts.js.map +0 -1
  423. package/dist/voyager/index.d.ts +0 -2
  424. package/dist/voyager/index.d.ts.map +0 -1
  425. package/dist/voyager/index.js +0 -4
  426. package/dist/voyager/index.js.map +0 -1
  427. package/dist/voyager/interceptor.d.ts +0 -100
  428. package/dist/voyager/interceptor.d.ts.map +0 -1
  429. package/dist/voyager/interceptor.integration.test.d.ts +0 -2
  430. package/dist/voyager/interceptor.integration.test.d.ts.map +0 -1
  431. package/dist/voyager/interceptor.integration.test.js +0 -89
  432. package/dist/voyager/interceptor.integration.test.js.map +0 -1
  433. package/dist/voyager/interceptor.js +0 -235
  434. package/dist/voyager/interceptor.js.map +0 -1
  435. package/dist/voyager/interceptor.test.d.ts +0 -2
  436. package/dist/voyager/interceptor.test.d.ts.map +0 -1
  437. package/dist/voyager/interceptor.test.js +0 -372
  438. package/dist/voyager/interceptor.test.js.map +0 -1
@@ -1,35 +1,162 @@
1
1
  // SPDX-License-Identifier: AGPL-3.0-only
2
2
  // Copyright (C) 2026 Oleksii PELYKH
3
3
  import { CDPEvaluationError, CDPTimeoutError } from "../cdp/errors.js";
4
- import { delay } from "../utils/delay.js";
4
+ import { delay, gaussianBetween, gaussianDelay, randomBetween } from "../utils/delay.js";
5
5
  /** Default timeout for DOM operations (ms). */
6
6
  const DEFAULT_TIMEOUT = 30_000;
7
7
  /** Default polling interval for waitForElement (ms). */
8
8
  const DEFAULT_POLL_INTERVAL = 100;
9
- /** Minimum delay between keystrokes (ms). */
10
- const MIN_KEYSTROKE_DELAY = 50;
11
- /** Maximum delay between keystrokes (ms). */
12
- const MAX_KEYSTROKE_DELAY = 150;
9
+ /** Probability of a micro-hesitation between keystrokes. */
10
+ const MICRO_HESITATION_PROBABILITY = 0.05;
11
+ /**
12
+ * Map a character to its physical key code and Windows virtual key code.
13
+ *
14
+ * Covers ASCII letters, digits, common punctuation, and special keys
15
+ * (space, enter, tab, backspace, escape). Returns `undefined` for
16
+ * unmapped characters — the event still fires, just without enrichment.
17
+ */
18
+ function getKeyCodeInfo(char) {
19
+ // Letters a-z / A-Z
20
+ const lower = char.toLowerCase();
21
+ if (lower >= "a" && lower <= "z") {
22
+ const vk = 65 + lower.charCodeAt(0) - "a".charCodeAt(0);
23
+ return { code: `Key${lower.toUpperCase()}`, windowsVirtualKeyCode: vk };
24
+ }
25
+ // Digits 0-9
26
+ if (char >= "0" && char <= "9") {
27
+ const vk = 48 + char.charCodeAt(0) - "0".charCodeAt(0);
28
+ return { code: `Digit${char}`, windowsVirtualKeyCode: vk };
29
+ }
30
+ // Special keys and punctuation
31
+ const special = {
32
+ " ": { code: "Space", windowsVirtualKeyCode: 32 },
33
+ "\n": { code: "Enter", windowsVirtualKeyCode: 13 },
34
+ "\r": { code: "Enter", windowsVirtualKeyCode: 13 },
35
+ "\t": { code: "Tab", windowsVirtualKeyCode: 9 },
36
+ "-": { code: "Minus", windowsVirtualKeyCode: 189 },
37
+ "=": { code: "Equal", windowsVirtualKeyCode: 187 },
38
+ "[": { code: "BracketLeft", windowsVirtualKeyCode: 219 },
39
+ "]": { code: "BracketRight", windowsVirtualKeyCode: 221 },
40
+ "\\": { code: "Backslash", windowsVirtualKeyCode: 220 },
41
+ ";": { code: "Semicolon", windowsVirtualKeyCode: 186 },
42
+ "'": { code: "Quote", windowsVirtualKeyCode: 222 },
43
+ ",": { code: "Comma", windowsVirtualKeyCode: 188 },
44
+ ".": { code: "Period", windowsVirtualKeyCode: 190 },
45
+ "/": { code: "Slash", windowsVirtualKeyCode: 191 },
46
+ "`": { code: "Backquote", windowsVirtualKeyCode: 192 },
47
+ };
48
+ return special[char];
49
+ }
13
50
  /**
14
51
  * Poll the DOM until an element matching the selector appears.
15
52
  *
53
+ * When a {@link HumanizedMouse} is provided, tiny idle mouse movements
54
+ * (1–5 px) are dispatched on ~20% of poll cycles once the wait exceeds
55
+ * 500 ms. This prevents the cursor from remaining perfectly still
56
+ * during long element waits — a detectable automation fingerprint.
57
+ *
16
58
  * @param client - Connected CDP client targeting the page.
17
59
  * @param selector - CSS selector to query.
18
60
  * @param options - Timeout and polling interval.
61
+ * @param mouse - Optional humanized mouse (enables idle drift).
19
62
  * @throws {CDPTimeoutError} If the element does not appear within the timeout.
20
63
  */
21
- export async function waitForElement(client, selector, options) {
64
+ export async function waitForElement(client, selector, options, mouse) {
22
65
  const timeout = options?.timeout ?? DEFAULT_TIMEOUT;
23
66
  const pollInterval = options?.pollInterval ?? DEFAULT_POLL_INTERVAL;
24
67
  const deadline = Date.now() + timeout;
68
+ const startTime = Date.now();
69
+ // Last known cursor position for idle drift (lazy-initialised)
70
+ let driftX = -1;
71
+ let driftY = -1;
72
+ let viewportW = 0;
73
+ let viewportH = 0;
25
74
  while (Date.now() < deadline) {
26
75
  const found = await client.evaluate(`document.querySelector(${JSON.stringify(selector)}) !== null`);
27
76
  if (found)
28
77
  return;
78
+ // Idle mouse drift: after 500 ms of waiting, 20% of poll cycles
79
+ // move the cursor by 1–5 px to avoid a perfectly still cursor.
80
+ // Uses mouse.move() to keep VirtualMouse position in sync.
81
+ if (mouse?.isAvailable && Date.now() - startTime > 500 && Math.random() < 0.2) {
82
+ if (driftX < 0) {
83
+ try {
84
+ const pos = await mouse.position();
85
+ driftX = pos.x;
86
+ driftY = pos.y;
87
+ }
88
+ catch {
89
+ // Ignored — fall through to viewport center default
90
+ }
91
+ const size = await client.evaluate(`({ w: window.innerWidth, h: window.innerHeight })`);
92
+ viewportW = size.w;
93
+ viewportH = size.h;
94
+ if (driftX < 0) {
95
+ driftX = Math.round(viewportW / 2);
96
+ driftY = Math.round(viewportH / 2);
97
+ }
98
+ }
99
+ // Guaranteed non-zero magnitude (1–5 px), random direction
100
+ const magX = Math.round(randomBetween(1, 5));
101
+ const magY = Math.round(randomBetween(1, 5));
102
+ const offsetX = (Math.random() < 0.5 ? -1 : 1) * magX;
103
+ const offsetY = (Math.random() < 0.5 ? -1 : 1) * magY;
104
+ // Clamp to viewport bounds
105
+ driftX = Math.max(0, Math.min(viewportW - 1, driftX + offsetX));
106
+ driftY = Math.max(0, Math.min(viewportH - 1, driftY + offsetY));
107
+ await mouse.move(driftX, driftY);
108
+ }
29
109
  await delay(pollInterval);
30
110
  }
31
111
  throw new CDPTimeoutError(`Timed out waiting for element "${selector}" after ${timeout.toString()}ms`);
32
112
  }
113
+ /**
114
+ * Wait until the DOM stops mutating for `quietMs` milliseconds.
115
+ *
116
+ * Installs a `MutationObserver` via `Runtime.evaluate` that tracks
117
+ * the timestamp of the last mutation. Polls until no mutations have
118
+ * occurred for the configured quiet period, then adds a "visual
119
+ * scanning" Gaussian delay to simulate a human pausing to read.
120
+ *
121
+ * @param client - Connected CDP client targeting the page.
122
+ * @param quietMs - Milliseconds of mutation silence required (default: 500).
123
+ */
124
+ export async function waitForDOMStable(client, quietMs = 500) {
125
+ // Install a MutationObserver that stamps window.__lhLastMutation on every DOM change
126
+ await client.evaluate(`(() => {
127
+ window.__lhLastMutation = Date.now();
128
+ const observer = new MutationObserver(() => {
129
+ window.__lhLastMutation = Date.now();
130
+ });
131
+ observer.observe(document.body, {
132
+ childList: true,
133
+ subtree: true,
134
+ attributes: true,
135
+ characterData: true,
136
+ });
137
+ window.__lhDOMObserver = observer;
138
+ })()`);
139
+ // Poll until the DOM has been quiet for quietMs
140
+ const pollInterval = 100;
141
+ const maxWait = 30_000;
142
+ const deadline = Date.now() + maxWait;
143
+ while (Date.now() < deadline) {
144
+ const elapsed = await client.evaluate(`Date.now() - (window.__lhLastMutation || 0)`);
145
+ if (elapsed >= quietMs)
146
+ break;
147
+ await delay(pollInterval);
148
+ }
149
+ // Disconnect the observer
150
+ await client.evaluate(`(() => {
151
+ if (window.__lhDOMObserver) {
152
+ window.__lhDOMObserver.disconnect();
153
+ delete window.__lhDOMObserver;
154
+ delete window.__lhLastMutation;
155
+ }
156
+ })()`);
157
+ // Simulate "visual scanning" — a human pausing to read the page
158
+ await gaussianDelay(1_200, 400, 600, 2_500);
159
+ }
33
160
  /**
34
161
  * Scroll the page until the target element is visible in the viewport.
35
162
  *
@@ -65,8 +192,16 @@ export async function hover(client, selector) {
65
192
  const hovered = await client.evaluate(`(() => {
66
193
  const el = document.querySelector(${JSON.stringify(selector)});
67
194
  if (!el) return false;
68
- el.dispatchEvent(new MouseEvent('mouseenter', { bubbles: true }));
69
- el.dispatchEvent(new MouseEvent('mouseover', { bubbles: true }));
195
+ const r = el.getBoundingClientRect();
196
+ const cx = Math.round(r.x + r.width / 2);
197
+ const cy = Math.round(r.y + r.height / 2);
198
+ const opts = {
199
+ bubbles: true, clientX: cx, clientY: cy,
200
+ screenX: cx + window.screenX, screenY: cy + window.screenY,
201
+ button: 0, buttons: 0,
202
+ };
203
+ el.dispatchEvent(new MouseEvent('mouseenter', opts));
204
+ el.dispatchEvent(new MouseEvent('mouseover', opts));
70
205
  return true;
71
206
  })()`);
72
207
  if (!hovered) {
@@ -98,8 +233,14 @@ export async function click(client, selector) {
98
233
  * Type text into a focused element character-by-character.
99
234
  *
100
235
  * The element is focused first, then each character is dispatched via
101
- * CDP `Input.dispatchKeyEvent` with randomised inter-keystroke delays
102
- * (50–150 ms) to approximate human typing cadence.
236
+ * CDP `Input.dispatchKeyEvent` with character-context-aware Gaussian
237
+ * delays to approximate human typing cadence:
238
+ *
239
+ * - **Intra-word** (letters, digits): ~65 ms mean — fast, rhythmic typing
240
+ * - **Word boundary** (space): ~180 ms mean — natural pause between words
241
+ * - **Sentence boundary** (space after `.!?`): ~350 ms mean — thinking pause
242
+ * - **Paragraph boundary** (newline): ~700 ms mean — composing the next thought
243
+ * - **Micro-hesitation** (5% per character): ~300 ms extra — brief mid-word thinking
103
244
  *
104
245
  * @param client - Connected CDP client targeting the page.
105
246
  * @param selector - CSS selector for the input element.
@@ -118,22 +259,356 @@ export async function typeText(client, selector, text, method = "type") {
118
259
  throw new CDPEvaluationError(`Element "${selector}" not found for typeText`);
119
260
  }
120
261
  switch (method) {
121
- case "type":
262
+ case "type": {
263
+ let previousChar = "";
122
264
  for (const char of text) {
265
+ const kc = getKeyCodeInfo(char);
123
266
  await client.send("Input.dispatchKeyEvent", {
124
267
  type: "keyDown",
125
268
  key: char,
126
269
  text: char,
270
+ ...(kc && { code: kc.code, windowsVirtualKeyCode: kc.windowsVirtualKeyCode }),
127
271
  });
128
272
  await client.send("Input.dispatchKeyEvent", {
129
273
  type: "keyUp",
130
274
  key: char,
275
+ ...(kc && { code: kc.code, windowsVirtualKeyCode: kc.windowsVirtualKeyCode }),
131
276
  });
132
- const keystrokeDelay = MIN_KEYSTROKE_DELAY +
133
- Math.random() * (MAX_KEYSTROKE_DELAY - MIN_KEYSTROKE_DELAY);
134
- await delay(keystrokeDelay);
277
+ // Character-aware delay
278
+ if (char === "\n") {
279
+ await gaussianDelay(700, 300, 300, 1_500);
280
+ }
281
+ else if (char === " " && /[.!?]/.test(previousChar)) {
282
+ await gaussianDelay(350, 120, 150, 800);
283
+ }
284
+ else if (char === " ") {
285
+ await gaussianDelay(180, 50, 100, 350);
286
+ }
287
+ else {
288
+ await gaussianDelay(65, 20, 30, 120);
289
+ }
290
+ // Micro-hesitation (5%)
291
+ if (Math.random() < MICRO_HESITATION_PROBABILITY) {
292
+ await gaussianDelay(300, 100, 150, 600);
293
+ }
294
+ previousChar = char;
135
295
  }
136
296
  break;
297
+ }
298
+ }
299
+ }
300
+ /**
301
+ * Get the bounding rect of a DOM element selected by CSS selector.
302
+ *
303
+ * @returns `null` if the element is not found.
304
+ */
305
+ export async function getElementBounds(client, selector) {
306
+ return client.evaluate(`(() => {
307
+ const el = document.querySelector(${JSON.stringify(selector)});
308
+ if (!el) return null;
309
+ const r = el.getBoundingClientRect();
310
+ return { top: r.top, bottom: r.bottom, height: r.height };
311
+ })()`);
312
+ }
313
+ /**
314
+ * Get the bounding rect of the Nth element matching a CSS selector.
315
+ *
316
+ * Equivalent to `document.querySelectorAll(baseSelector)[index]`.
317
+ *
318
+ * @returns `null` if no element exists at the given index.
319
+ */
320
+ export async function getElementBoundsByIndex(client, baseSelector, index) {
321
+ return client.evaluate(`(() => {
322
+ const els = document.querySelectorAll(${JSON.stringify(baseSelector)});
323
+ const el = els[${String(index)}];
324
+ if (!el) return null;
325
+ const r = el.getBoundingClientRect();
326
+ return { top: r.top, bottom: r.bottom, height: r.height };
327
+ })()`);
328
+ }
329
+ /**
330
+ * Get the viewport height (`window.innerHeight`).
331
+ */
332
+ export async function getViewportHeight(client) {
333
+ return client.evaluate(`window.innerHeight`);
334
+ }
335
+ // ---------------------------------------------------------------------------
336
+ // Humanized scroll-to-element
337
+ // ---------------------------------------------------------------------------
338
+ /**
339
+ * Internal: incremental scroll loop that centers an element in the viewport.
340
+ *
341
+ * @returns `true` if the element was centered within `maxIterations`.
342
+ */
343
+ async function scrollToElementLoop(client, getBounds, mouse) {
344
+ const viewportHeight = await getViewportHeight(client);
345
+ const maxIterations = 10;
346
+ const tolerance = viewportHeight / 4;
347
+ for (let i = 0; i < maxIterations; i++) {
348
+ const bounds = await getBounds();
349
+ if (!bounds)
350
+ return false;
351
+ const elementCenter = bounds.top + bounds.height / 2;
352
+ const viewportCenter = viewportHeight / 2;
353
+ if (Math.abs(elementCenter - viewportCenter) <= tolerance) {
354
+ return true;
355
+ }
356
+ const deltaY = elementCenter - viewportCenter;
357
+ await humanizedScrollY(client, deltaY, 300, 400, mouse);
358
+ await gaussianDelay(300, 50, 200, 400);
359
+ }
360
+ return false;
361
+ }
362
+ /**
363
+ * Scroll the page until the target element is centered in the viewport,
364
+ * using incremental humanized mouse-wheel strokes.
365
+ *
366
+ * When a {@link HumanizedMouse} is available, the cursor scrolls the page
367
+ * in small increments until the element's bounding rect is in the viewport
368
+ * center zone. Falls back to instant `scrollIntoView` otherwise.
369
+ *
370
+ * @param client - Connected CDP client targeting the page.
371
+ * @param selector - CSS selector for the element to scroll to.
372
+ * @param mouse - Optional humanized mouse instance.
373
+ */
374
+ export async function humanizedScrollTo(client, selector, mouse) {
375
+ if (mouse?.isAvailable) {
376
+ const success = await scrollToElementLoop(client, () => getElementBounds(client, selector), mouse);
377
+ if (success)
378
+ return;
379
+ }
380
+ await scrollTo(client, selector);
381
+ }
382
+ /**
383
+ * Scroll the page until the Nth element matching a selector is centered,
384
+ * using incremental humanized mouse-wheel strokes.
385
+ *
386
+ * Falls back to instant `scrollIntoView` when humanized mouse is unavailable.
387
+ *
388
+ * @param client - Connected CDP client targeting the page.
389
+ * @param baseSelector - CSS selector matching multiple elements.
390
+ * @param index - Zero-based index into the matched elements.
391
+ * @param mouse - Optional humanized mouse instance.
392
+ */
393
+ export async function humanizedScrollToByIndex(client, baseSelector, index, mouse) {
394
+ if (mouse?.isAvailable) {
395
+ const success = await scrollToElementLoop(client, () => getElementBoundsByIndex(client, baseSelector, index), mouse);
396
+ if (success)
397
+ return;
398
+ }
399
+ // Fallback to instant scrollIntoView
400
+ await client.evaluate(`(() => {
401
+ const els = document.querySelectorAll(${JSON.stringify(baseSelector)});
402
+ const el = els[${String(index)}];
403
+ if (el) el.scrollIntoView({ behavior: "instant", block: "center" });
404
+ })()`);
405
+ }
406
+ /**
407
+ * Get a jittered viewport-relative point near the center of a DOM element.
408
+ *
409
+ * A Gaussian offset is applied so the click target varies naturally within
410
+ * the element bounds, removing the dead-center automation fingerprint.
411
+ *
412
+ * @returns `null` if the element is not found.
413
+ */
414
+ export async function getElementCenter(client, selector) {
415
+ const rect = await client.evaluate(`(() => {
416
+ const el = document.querySelector(${JSON.stringify(selector)});
417
+ if (!el) return null;
418
+ const r = el.getBoundingClientRect();
419
+ return { x: r.x, y: r.y, width: r.width, height: r.height };
420
+ })()`);
421
+ if (!rect)
422
+ return null;
423
+ const cx = rect.x + rect.width / 2;
424
+ const cy = rect.y + rect.height / 2;
425
+ const jx = cx + gaussianBetween(0, rect.width * 0.15, -rect.width * 0.4, rect.width * 0.4);
426
+ const jy = cy + gaussianBetween(0, rect.height * 0.15, -rect.height * 0.4, rect.height * 0.4);
427
+ const roundedJx = Math.round(jx);
428
+ const roundedJy = Math.round(jy);
429
+ const maxX = rect.width >= 1 ? rect.x + rect.width - 1 : rect.x;
430
+ const maxY = rect.height >= 1 ? rect.y + rect.height - 1 : rect.y;
431
+ return {
432
+ x: Math.max(rect.x, Math.min(maxX, roundedJx)),
433
+ y: Math.max(rect.y, Math.min(maxY, roundedJy)),
434
+ };
435
+ }
436
+ /**
437
+ * Scroll the element toward the viewport center if it sits in the outer
438
+ * 20% of the visible area. This mimics a human scrolling a bit to see
439
+ * the target more comfortably before clicking.
440
+ *
441
+ * @internal
442
+ */
443
+ async function viewportComfortZone(client, selector, mouse) {
444
+ const viewportHeight = await getViewportHeight(client);
445
+ // Use the raw bounding-rect center (not the jittered getElementCenter)
446
+ // so the comfort-zone check is deterministic and not affected by jitter.
447
+ const rect = await client.evaluate(`(() => {
448
+ const el = document.querySelector(${JSON.stringify(selector)});
449
+ if (!el) return null;
450
+ const r = el.getBoundingClientRect();
451
+ return { x: r.x, y: r.y, width: r.width, height: r.height };
452
+ })()`);
453
+ if (!rect)
454
+ return;
455
+ const centerX = rect.x + rect.width / 2;
456
+ const centerY = rect.y + rect.height / 2;
457
+ if (centerY < viewportHeight * 0.2 || centerY > viewportHeight * 0.8) {
458
+ const deltaY = centerY - viewportHeight / 2;
459
+ await humanizedScrollY(client, deltaY * 0.5, centerX, centerY, mouse);
460
+ await gaussianDelay(300, 100, 150, 600);
461
+ }
462
+ }
463
+ /**
464
+ * Click an element with humanized mouse movement when available.
465
+ *
466
+ * When a {@link HumanizedMouse} is provided and available, the cursor
467
+ * follows a Bezier path to the element center before clicking. The
468
+ * VirtualMouse dispatches `mousePressed` / `mouseReleased` via CDP.
469
+ *
470
+ * **Pre-focus hover** (60% probability, HumanizedMouse only): before
471
+ * clicking, the cursor first moves to a point 20–50 px from the target,
472
+ * pauses briefly to simulate visual scanning, then proceeds to the
473
+ * target — a two-phase approach that mimics how a human visually locates
474
+ * a button before moving to click it.
475
+ *
476
+ * **Viewport comfort zone**: if the target sits in the outer 20% of the
477
+ * viewport, a small scroll brings it more central before interacting.
478
+ *
479
+ * Falls back to the standard JS `.click()` when humanized mouse is
480
+ * unavailable (or the element cannot be located by bounding rect).
481
+ *
482
+ * @param client - Connected CDP client targeting the LinkedIn page.
483
+ * @param selector - CSS selector for the element to click.
484
+ * @param mouse - Optional humanized mouse instance.
485
+ */
486
+ export async function humanizedClick(client, selector, mouse) {
487
+ // Viewport comfort zone: scroll element toward center if near edges
488
+ await viewportComfortZone(client, selector, mouse);
489
+ await gaussianDelay(25, 12, 0, 50); // Pre-click approach hesitation
490
+ if (mouse?.isAvailable) {
491
+ const center = await getElementCenter(client, selector);
492
+ if (center) {
493
+ // Pre-focus hover: 60% of the time, approach via a nearby point first
494
+ if (Math.random() < 0.6) {
495
+ const angle = Math.random() * 2 * Math.PI;
496
+ const radius = randomBetween(20, 50);
497
+ const nearX = Math.round(center.x + Math.cos(angle) * radius);
498
+ const nearY = Math.round(center.y + Math.sin(angle) * radius);
499
+ await mouse.move(nearX, nearY);
500
+ await gaussianDelay(180, 60, 80, 400); // Visual scanning pause
501
+ }
502
+ await mouse.click(center.x, center.y);
503
+ await gaussianDelay(100, 25, 50, 150); // Post-click visual confirmation
504
+ return;
505
+ }
506
+ }
507
+ // Fallback: simulate mouse movement path before JS click
508
+ const center = await getElementCenter(client, selector);
509
+ if (center) {
510
+ const viewportSize = await client.evaluate(`({ w: window.innerWidth, h: window.innerHeight })`);
511
+ // Random starting position within the viewport
512
+ const startX = Math.round(Math.random() * viewportSize.w);
513
+ const startY = Math.round(Math.random() * viewportSize.h);
514
+ const steps = Math.round(gaussianBetween(4, 0.7, 3, 5));
515
+ for (let i = 1; i <= steps; i++) {
516
+ const t = i / steps;
517
+ const baseX = startX + (center.x - startX) * t;
518
+ const baseY = startY + (center.y - startY) * t;
519
+ // Add random offset to intermediate points, not the final point
520
+ const offsetX = i < steps ? Math.round(gaussianBetween(0, 10, -20, 20)) : 0;
521
+ const offsetY = i < steps ? Math.round(gaussianBetween(0, 10, -20, 20)) : 0;
522
+ await client.send("Input.dispatchMouseEvent", {
523
+ type: "mouseMoved",
524
+ x: Math.round(baseX) + offsetX,
525
+ y: Math.round(baseY) + offsetY,
526
+ });
527
+ await gaussianDelay(25, 10, 10, 50);
528
+ }
529
+ }
530
+ await click(client, selector);
531
+ await gaussianDelay(100, 25, 50, 150); // Post-click visual confirmation
532
+ }
533
+ /**
534
+ * Hover over an element with humanized mouse movement when available.
535
+ *
536
+ * When a {@link HumanizedMouse} is provided, the cursor physically
537
+ * moves to the element center — which is more realistic than
538
+ * dispatching synthetic `mouseenter` / `mouseover` JS events.
539
+ *
540
+ * Falls back to synthetic JS events when unavailable.
541
+ *
542
+ * @param client - Connected CDP client targeting the LinkedIn page.
543
+ * @param selector - CSS selector for the element to hover.
544
+ * @param mouse - Optional humanized mouse instance.
545
+ */
546
+ export async function humanizedHover(client, selector, mouse) {
547
+ await gaussianDelay(25, 12, 0, 50); // Pre-hover approach hesitation
548
+ if (mouse?.isAvailable) {
549
+ const center = await getElementCenter(client, selector);
550
+ if (center) {
551
+ await mouse.move(center.x, center.y);
552
+ return;
553
+ }
554
+ }
555
+ // Fallback to JS hover
556
+ await hover(client, selector);
557
+ }
558
+ /**
559
+ * Scroll the page vertically with humanized mouse-wheel strokes.
560
+ *
561
+ * When a {@link HumanizedMouse} is provided, scrolling is emulated as
562
+ * incremental wheel strokes (150 px / 25 ms) at the given position,
563
+ * matching the behavior of a physical mouse wheel.
564
+ *
565
+ * Falls back to a single CDP `mouseWheel` event when unavailable.
566
+ *
567
+ * @param client - Connected CDP client targeting the LinkedIn page.
568
+ * @param deltaY - Pixels to scroll (positive = down).
569
+ * @param x - Viewport X coordinate for the scroll position.
570
+ * @param y - Viewport Y coordinate for the scroll position.
571
+ * @param mouse - Optional humanized mouse instance.
572
+ */
573
+ export async function humanizedScrollY(client, deltaY, x, y, mouse) {
574
+ if (mouse?.isAvailable) {
575
+ await mouse.scrollY(deltaY, x, y);
576
+ return;
577
+ }
578
+ // Fallback to a single CDP scroll event
579
+ await client.send("Input.dispatchMouseEvent", {
580
+ type: "mouseWheel",
581
+ x,
582
+ y,
583
+ deltaX: 0,
584
+ deltaY,
585
+ });
586
+ }
587
+ /**
588
+ * Retry an interaction function with escalating Gaussian-distributed
589
+ * delays between attempts.
590
+ *
591
+ * Wraps critical interaction sequences (click after scroll, hover after
592
+ * navigate) where elements may vanish due to React re-renders. Each
593
+ * retry waits progressively longer — `800 * (attempt + 1)` ms mean —
594
+ * giving the page time to stabilise.
595
+ *
596
+ * @param fn - The async interaction to attempt.
597
+ * @param maxAttempts - Maximum number of attempts (default: 2).
598
+ * @returns The result of the first successful attempt.
599
+ */
600
+ export async function retryInteraction(fn, maxAttempts = 2) {
601
+ for (let i = 0; i < maxAttempts; i++) {
602
+ try {
603
+ return await fn();
604
+ }
605
+ catch (e) {
606
+ if (i === maxAttempts - 1)
607
+ throw e;
608
+ await gaussianDelay(800 * (i + 1), 300, 400, 2_000);
609
+ }
137
610
  }
611
+ // Unreachable — the loop always returns or throws
612
+ throw new Error("unreachable");
138
613
  }
139
614
  //# sourceMappingURL=dom-automation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dom-automation.js","sourceRoot":"","sources":["../../src/linkedin/dom-automation.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,oCAAoC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,+CAA+C;AAC/C,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B,wDAAwD;AACxD,MAAM,qBAAqB,GAAG,GAAG,CAAC;A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,uBAAuB;IACvB,MAAM,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,MAAiB,EACjB,MAAc,EACd,CAAS,EACT,CAAS,EACT,KAA6B;IAE7B,IAAI,KAAK,EAAE,WAAW,EAAE,CAAC;QACvB,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAClC,OAAO;IACT,CAAC;IACD,wCAAwC;IACxC,MAAM,MAAM,CAAC,IAAI,CAAC,0BAA0B,EAAE;QAC5C,IAAI,EAAE,YAAY;QAClB,CAAC;QACD,CAAC;QACD,MAAM,EAAE,CAAC;QACT,MAAM;KACP,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,EAAoB,EACpB,WAAW,GAAG,CAAC;IAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC;YACH,OAAO,MAAM,EAAE,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,KAAK,WAAW,GAAG,CAAC;gBAAE,MAAM,CAAC,CAAC;YACnC,MAAM,aAAa,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IACD,kDAAkD;IAClD,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { InstanceService } from "../services/instance.js";
2
+ /**
3
+ * Humanized mouse interaction via LinkedHelper's VirtualMouse.
4
+ *
5
+ * Accesses LH's VirtualMouse through `@electron/remote` from the
6
+ * instance UI target. VirtualMouse provides Bezier-curve mouse paths
7
+ * with intentional overshoot, recorded human track replay, velocity
8
+ * variation, and proper press/release click timing — all dispatched
9
+ * to the LinkedIn WebView via CDP `Input.dispatchMouseEvent`.
10
+ *
11
+ * Call {@link initialize} after `InstanceService.connect()` to probe
12
+ * whether VirtualMouse is accessible. If not, all methods throw.
13
+ */
14
+ export declare class HumanizedMouse {
15
+ private readonly instance;
16
+ private available;
17
+ constructor(instance: InstanceService);
18
+ /**
19
+ * Probe whether LH's VirtualMouse is accessible via `@electron/remote`.
20
+ *
21
+ * @returns `true` if VirtualMouse is available and methods can be called.
22
+ */
23
+ initialize(): Promise<boolean>;
24
+ /** Whether LH's native VirtualMouse is available. */
25
+ get isAvailable(): boolean;
26
+ /**
27
+ * Move the cursor to the given coordinates along a humanized path.
28
+ *
29
+ * Uses Bezier curves with random cubic anchors (creating wrist-arc
30
+ * paths), intentional overshoot (40–91 % probability depending on
31
+ * distance), and variable velocity (fast start, slow finish).
32
+ * When recorded human tracks are available, replays a matching track
33
+ * rotated and scaled to fit the movement vector.
34
+ */
35
+ move(x: number, y: number): Promise<void>;
36
+ /**
37
+ * Move the cursor to the given coordinates and click.
38
+ *
39
+ * The cursor follows a humanized path to the target, then dispatches
40
+ * `mousePressed` → 100 ms delay → `mouseReleased` via CDP.
41
+ */
42
+ click(x: number, y: number): Promise<void>;
43
+ /**
44
+ * Move the cursor to the given coordinates and scroll vertically.
45
+ *
46
+ * Scrolling is emulated as incremental mouse-wheel strokes (150 px
47
+ * every 25 ms by default) to mimic a physical scroll wheel.
48
+ *
49
+ * @param deltaY - Pixels to scroll (positive = down, negative = up).
50
+ * @param x - Cursor X position for the scroll.
51
+ * @param y - Cursor Y position for the scroll.
52
+ */
53
+ scrollY(deltaY: number, x: number, y: number): Promise<void>;
54
+ /**
55
+ * Get the current VirtualMouse cursor position.
56
+ */
57
+ position(): Promise<{
58
+ x: number;
59
+ y: number;
60
+ }>;
61
+ /**
62
+ * Evaluate an expression on the VirtualMouse instance (awaited).
63
+ *
64
+ * The expression must reference the VirtualMouse instance as `vm`.
65
+ */
66
+ private vmEval;
67
+ private ensureAvailable;
68
+ }
69
+ //# sourceMappingURL=humanized-mouse.d.ts.map