aurix-ai 2.7.3 → 2.7.4

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 (286) hide show
  1. package/dist/agent/AgentLoop.d.ts.map +1 -1
  2. package/dist/agent/AgentLoop.js +1 -52
  3. package/dist/agent/AgentLoop.js.map +1 -1
  4. package/dist/cli/App.d.ts.map +1 -1
  5. package/dist/cli/App.js +6 -0
  6. package/dist/cli/App.js.map +1 -1
  7. package/dist/cli/commands.d.ts.map +1 -1
  8. package/dist/cli/commands.js +7 -0
  9. package/dist/cli/commands.js.map +1 -1
  10. package/dist/tools/Browser.d.ts.map +1 -1
  11. package/dist/tools/Browser.js +44 -615
  12. package/dist/tools/Browser.js.map +1 -1
  13. package/dist/tools/captcha/CaptchaRouter.d.ts +6 -0
  14. package/dist/tools/captcha/CaptchaRouter.d.ts.map +1 -0
  15. package/dist/tools/captcha/CaptchaRouter.js +371 -0
  16. package/dist/tools/captcha/CaptchaRouter.js.map +1 -0
  17. package/dist/tools/captcha/RecaptchaSolver.d.ts +2 -0
  18. package/dist/tools/captcha/RecaptchaSolver.d.ts.map +1 -0
  19. package/dist/tools/captcha/RecaptchaSolver.js +1114 -0
  20. package/dist/tools/captcha/RecaptchaSolver.js.map +1 -0
  21. package/dist/tools/captcha/common.d.ts +35 -0
  22. package/dist/tools/captcha/common.d.ts.map +1 -0
  23. package/dist/tools/captcha/common.js +445 -0
  24. package/dist/tools/captcha/common.js.map +1 -0
  25. package/dist/tools/captcha/index.d.ts +5 -0
  26. package/dist/tools/captcha/index.d.ts.map +1 -0
  27. package/dist/tools/captcha/index.js +4 -0
  28. package/dist/tools/captcha/index.js.map +1 -0
  29. package/package.json +1 -2
  30. package/scripts/build.cjs +0 -15
  31. package/scripts/run-task.mjs +86 -0
  32. package/native/token-counter/index.d.ts +0 -7
  33. package/native/token-counter/index.js +0 -316
  34. package/native/token-counter/node_modules/.package-lock.json +0 -568
  35. package/native/token-counter/node_modules/2/array.js +0 -25
  36. package/native/token-counter/node_modules/2/index.js +0 -12
  37. package/native/token-counter/node_modules/2/iterator.js +0 -13
  38. package/native/token-counter/node_modules/2/license.txt +0 -21
  39. package/native/token-counter/node_modules/2/map.js +0 -27
  40. package/native/token-counter/node_modules/2/number.js +0 -109
  41. package/native/token-counter/node_modules/2/object.js +0 -23
  42. package/native/token-counter/node_modules/2/package.json +0 -60
  43. package/native/token-counter/node_modules/2/readme.md +0 -246
  44. package/native/token-counter/node_modules/2/string.js +0 -11
  45. package/native/token-counter/node_modules/2/test.js +0 -520
  46. package/native/token-counter/node_modules/@lamansky/every/index.js +0 -16
  47. package/native/token-counter/node_modules/@lamansky/every/license.txt +0 -21
  48. package/native/token-counter/node_modules/@lamansky/every/package.json +0 -38
  49. package/native/token-counter/node_modules/@lamansky/every/readme.md +0 -46
  50. package/native/token-counter/node_modules/@lamansky/flatten/index.js +0 -5
  51. package/native/token-counter/node_modules/@lamansky/flatten/license.txt +0 -21
  52. package/native/token-counter/node_modules/@lamansky/flatten/package.json +0 -35
  53. package/native/token-counter/node_modules/@lamansky/flatten/readme.md +0 -41
  54. package/native/token-counter/node_modules/@napi-rs/cli/LICENSE +0 -21
  55. package/native/token-counter/node_modules/@napi-rs/cli/README.md +0 -96
  56. package/native/token-counter/node_modules/@napi-rs/cli/package.json +0 -65
  57. package/native/token-counter/node_modules/@napi-rs/cli/scripts/index.js +0 -51371
  58. package/native/token-counter/node_modules/add-counter/index.js +0 -3
  59. package/native/token-counter/node_modules/add-counter/license.txt +0 -21
  60. package/native/token-counter/node_modules/add-counter/package.json +0 -34
  61. package/native/token-counter/node_modules/add-counter/readme.md +0 -36
  62. package/native/token-counter/node_modules/array-pad/LICENSE +0 -22
  63. package/native/token-counter/node_modules/array-pad/README.md +0 -80
  64. package/native/token-counter/node_modules/array-pad/index.js +0 -30
  65. package/native/token-counter/node_modules/array-pad/package.json +0 -28
  66. package/native/token-counter/node_modules/arrify/index.js +0 -8
  67. package/native/token-counter/node_modules/arrify/license +0 -21
  68. package/native/token-counter/node_modules/arrify/package.json +0 -33
  69. package/native/token-counter/node_modules/arrify/readme.md +0 -36
  70. package/native/token-counter/node_modules/case-insensitive/index.js +0 -72
  71. package/native/token-counter/node_modules/case-insensitive/license.txt +0 -21
  72. package/native/token-counter/node_modules/case-insensitive/package.json +0 -39
  73. package/native/token-counter/node_modules/case-insensitive/readme.md +0 -39
  74. package/native/token-counter/node_modules/case-insensitive/test.js +0 -114
  75. package/native/token-counter/node_modules/class-chain/index.js +0 -32
  76. package/native/token-counter/node_modules/class-chain/license.txt +0 -21
  77. package/native/token-counter/node_modules/class-chain/package.json +0 -39
  78. package/native/token-counter/node_modules/class-chain/readme.md +0 -23
  79. package/native/token-counter/node_modules/class-chain/test.js +0 -77
  80. package/native/token-counter/node_modules/copy-own/index.js +0 -10
  81. package/native/token-counter/node_modules/copy-own/license.txt +0 -21
  82. package/native/token-counter/node_modules/copy-own/package.json +0 -37
  83. package/native/token-counter/node_modules/copy-own/readme.md +0 -67
  84. package/native/token-counter/node_modules/def-props/index.js +0 -43
  85. package/native/token-counter/node_modules/def-props/license.txt +0 -21
  86. package/native/token-counter/node_modules/def-props/node_modules/is-obj/index.d.ts +0 -22
  87. package/native/token-counter/node_modules/def-props/node_modules/is-obj/index.js +0 -6
  88. package/native/token-counter/node_modules/def-props/node_modules/is-obj/license +0 -9
  89. package/native/token-counter/node_modules/def-props/node_modules/is-obj/package.json +0 -34
  90. package/native/token-counter/node_modules/def-props/node_modules/is-obj/readme.md +0 -39
  91. package/native/token-counter/node_modules/def-props/package.json +0 -51
  92. package/native/token-counter/node_modules/def-props/readme.md +0 -117
  93. package/native/token-counter/node_modules/empty-iterator/index.js +0 -3
  94. package/native/token-counter/node_modules/empty-iterator/license.txt +0 -21
  95. package/native/token-counter/node_modules/empty-iterator/package.json +0 -33
  96. package/native/token-counter/node_modules/empty-iterator/readme.md +0 -23
  97. package/native/token-counter/node_modules/enforce-range/index.js +0 -15
  98. package/native/token-counter/node_modules/enforce-range/license.txt +0 -21
  99. package/native/token-counter/node_modules/enforce-range/node_modules/2/array.js +0 -43
  100. package/native/token-counter/node_modules/enforce-range/node_modules/2/index.js +0 -10
  101. package/native/token-counter/node_modules/enforce-range/node_modules/2/iterator.js +0 -26
  102. package/native/token-counter/node_modules/enforce-range/node_modules/2/license.txt +0 -21
  103. package/native/token-counter/node_modules/enforce-range/node_modules/2/map.js +0 -47
  104. package/native/token-counter/node_modules/enforce-range/node_modules/2/number.js +0 -33
  105. package/native/token-counter/node_modules/enforce-range/node_modules/2/object.js +0 -61
  106. package/native/token-counter/node_modules/enforce-range/node_modules/2/package.json +0 -41
  107. package/native/token-counter/node_modules/enforce-range/node_modules/2/readme.md +0 -210
  108. package/native/token-counter/node_modules/enforce-range/node_modules/2/string.js +0 -37
  109. package/native/token-counter/node_modules/enforce-range/node_modules/2/test.js +0 -413
  110. package/native/token-counter/node_modules/enforce-range/package.json +0 -36
  111. package/native/token-counter/node_modules/enforce-range/readme.md +0 -53
  112. package/native/token-counter/node_modules/english-list/.travis.yml +0 -6
  113. package/native/token-counter/node_modules/english-list/LICENSE +0 -22
  114. package/native/token-counter/node_modules/english-list/README.md +0 -44
  115. package/native/token-counter/node_modules/english-list/index.js +0 -34
  116. package/native/token-counter/node_modules/english-list/package.json +0 -31
  117. package/native/token-counter/node_modules/english-list/test.log +0 -6
  118. package/native/token-counter/node_modules/errate/index.js +0 -19
  119. package/native/token-counter/node_modules/errate/license.txt +0 -21
  120. package/native/token-counter/node_modules/errate/package.json +0 -39
  121. package/native/token-counter/node_modules/errate/readme.md +0 -79
  122. package/native/token-counter/node_modules/ffn/index.js +0 -9
  123. package/native/token-counter/node_modules/ffn/license.txt +0 -21
  124. package/native/token-counter/node_modules/ffn/package.json +0 -34
  125. package/native/token-counter/node_modules/ffn/readme.md +0 -51
  126. package/native/token-counter/node_modules/get-own-property/index.js +0 -5
  127. package/native/token-counter/node_modules/get-own-property/license.txt +0 -21
  128. package/native/token-counter/node_modules/get-own-property/package.json +0 -31
  129. package/native/token-counter/node_modules/get-own-property/readme.md +0 -22
  130. package/native/token-counter/node_modules/has-duplicates/index.js +0 -11
  131. package/native/token-counter/node_modules/has-duplicates/license.txt +0 -21
  132. package/native/token-counter/node_modules/has-duplicates/package.json +0 -32
  133. package/native/token-counter/node_modules/has-duplicates/readme.md +0 -23
  134. package/native/token-counter/node_modules/has-duplicates/test.js +0 -30
  135. package/native/token-counter/node_modules/if-else-throw/index.js +0 -8
  136. package/native/token-counter/node_modules/if-else-throw/license.txt +0 -21
  137. package/native/token-counter/node_modules/if-else-throw/package.json +0 -37
  138. package/native/token-counter/node_modules/if-else-throw/readme.md +0 -32
  139. package/native/token-counter/node_modules/is-array-of-length/index.js +0 -7
  140. package/native/token-counter/node_modules/is-array-of-length/license.txt +0 -21
  141. package/native/token-counter/node_modules/is-array-of-length/package.json +0 -42
  142. package/native/token-counter/node_modules/is-array-of-length/readme.md +0 -41
  143. package/native/token-counter/node_modules/is-class-of/index.js +0 -7
  144. package/native/token-counter/node_modules/is-class-of/license.txt +0 -21
  145. package/native/token-counter/node_modules/is-class-of/package.json +0 -35
  146. package/native/token-counter/node_modules/is-class-of/readme.md +0 -57
  147. package/native/token-counter/node_modules/is-global-object/index.js +0 -6
  148. package/native/token-counter/node_modules/is-global-object/license.txt +0 -21
  149. package/native/token-counter/node_modules/is-global-object/package.json +0 -34
  150. package/native/token-counter/node_modules/is-global-object/readme.md +0 -22
  151. package/native/token-counter/node_modules/is-instance-of/index.js +0 -28
  152. package/native/token-counter/node_modules/is-instance-of/license.txt +0 -21
  153. package/native/token-counter/node_modules/is-instance-of/package.json +0 -44
  154. package/native/token-counter/node_modules/is-instance-of/readme.md +0 -55
  155. package/native/token-counter/node_modules/is-iterable/index.js +0 -5
  156. package/native/token-counter/node_modules/is-iterable/license +0 -21
  157. package/native/token-counter/node_modules/is-iterable/package.json +0 -30
  158. package/native/token-counter/node_modules/is-iterable/readme.md +0 -23
  159. package/native/token-counter/node_modules/is-nil/LICENSE +0 -21
  160. package/native/token-counter/node_modules/is-nil/README.md +0 -47
  161. package/native/token-counter/node_modules/is-nil/index.js +0 -6
  162. package/native/token-counter/node_modules/is-nil/package.json +0 -46
  163. package/native/token-counter/node_modules/is-obj/index.js +0 -5
  164. package/native/token-counter/node_modules/is-obj/license +0 -21
  165. package/native/token-counter/node_modules/is-obj/package.json +0 -33
  166. package/native/token-counter/node_modules/is-obj/readme.md +0 -34
  167. package/native/token-counter/node_modules/is-object/.eslintignore +0 -1
  168. package/native/token-counter/node_modules/is-object/.eslintrc +0 -5
  169. package/native/token-counter/node_modules/is-object/.nycrc +0 -13
  170. package/native/token-counter/node_modules/is-object/.testem.json +0 -14
  171. package/native/token-counter/node_modules/is-object/CHANGELOG.md +0 -121
  172. package/native/token-counter/node_modules/is-object/LICENSE +0 -19
  173. package/native/token-counter/node_modules/is-object/README.md +0 -48
  174. package/native/token-counter/node_modules/is-object/index.js +0 -5
  175. package/native/token-counter/node_modules/is-object/package.json +0 -78
  176. package/native/token-counter/node_modules/is-object/test/index.js +0 -44
  177. package/native/token-counter/node_modules/is-plain-object/LICENSE +0 -21
  178. package/native/token-counter/node_modules/is-plain-object/README.md +0 -104
  179. package/native/token-counter/node_modules/is-plain-object/index.d.ts +0 -5
  180. package/native/token-counter/node_modules/is-plain-object/index.js +0 -37
  181. package/native/token-counter/node_modules/is-plain-object/package.json +0 -79
  182. package/native/token-counter/node_modules/isobject/LICENSE +0 -21
  183. package/native/token-counter/node_modules/isobject/README.md +0 -122
  184. package/native/token-counter/node_modules/isobject/index.d.ts +0 -5
  185. package/native/token-counter/node_modules/isobject/index.js +0 -12
  186. package/native/token-counter/node_modules/isobject/package.json +0 -74
  187. package/native/token-counter/node_modules/lodash.set/LICENSE +0 -47
  188. package/native/token-counter/node_modules/lodash.set/README.md +0 -18
  189. package/native/token-counter/node_modules/lodash.set/index.js +0 -990
  190. package/native/token-counter/node_modules/lodash.set/package.json +0 -17
  191. package/native/token-counter/node_modules/longest-first/index.js +0 -3
  192. package/native/token-counter/node_modules/longest-first/license.txt +0 -21
  193. package/native/token-counter/node_modules/longest-first/package.json +0 -36
  194. package/native/token-counter/node_modules/longest-first/readme.md +0 -29
  195. package/native/token-counter/node_modules/m-o/index.js +0 -27
  196. package/native/token-counter/node_modules/m-o/license.txt +0 -21
  197. package/native/token-counter/node_modules/m-o/node_modules/new-object/index.js +0 -23
  198. package/native/token-counter/node_modules/m-o/node_modules/new-object/license.txt +0 -21
  199. package/native/token-counter/node_modules/m-o/node_modules/new-object/package.json +0 -40
  200. package/native/token-counter/node_modules/m-o/node_modules/new-object/readme.md +0 -55
  201. package/native/token-counter/node_modules/m-o/package.json +0 -45
  202. package/native/token-counter/node_modules/m-o/readme.md +0 -87
  203. package/native/token-counter/node_modules/map-iter/index.js +0 -6
  204. package/native/token-counter/node_modules/map-iter/license.txt +0 -21
  205. package/native/token-counter/node_modules/map-iter/package.json +0 -40
  206. package/native/token-counter/node_modules/map-iter/readme.md +0 -46
  207. package/native/token-counter/node_modules/new-object/index.js +0 -5
  208. package/native/token-counter/node_modules/new-object/license.txt +0 -21
  209. package/native/token-counter/node_modules/new-object/package.json +0 -49
  210. package/native/token-counter/node_modules/new-object/readme.md +0 -145
  211. package/native/token-counter/node_modules/ofn/index.js +0 -22
  212. package/native/token-counter/node_modules/ofn/license.txt +0 -21
  213. package/native/token-counter/node_modules/ofn/package.json +0 -40
  214. package/native/token-counter/node_modules/ofn/readme.md +0 -63
  215. package/native/token-counter/node_modules/otherwise/index.js +0 -11
  216. package/native/token-counter/node_modules/otherwise/license.txt +0 -21
  217. package/native/token-counter/node_modules/otherwise/package.json +0 -38
  218. package/native/token-counter/node_modules/otherwise/readme.md +0 -29
  219. package/native/token-counter/node_modules/parser-factory/index.js +0 -138
  220. package/native/token-counter/node_modules/parser-factory/license.txt +0 -21
  221. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/index.d.ts +0 -38
  222. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/index.js +0 -23
  223. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/license +0 -9
  224. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/package.json +0 -35
  225. package/native/token-counter/node_modules/parser-factory/node_modules/arrify/readme.md +0 -39
  226. package/native/token-counter/node_modules/parser-factory/package.json +0 -38
  227. package/native/token-counter/node_modules/parser-factory/readme.md +0 -15
  228. package/native/token-counter/node_modules/pfn/index.js +0 -5
  229. package/native/token-counter/node_modules/pfn/license.txt +0 -21
  230. package/native/token-counter/node_modules/pfn/package.json +0 -41
  231. package/native/token-counter/node_modules/pfn/readme.md +0 -111
  232. package/native/token-counter/node_modules/pfn/strict.js +0 -8
  233. package/native/token-counter/node_modules/plainify/index.js +0 -5
  234. package/native/token-counter/node_modules/plainify/license.txt +0 -21
  235. package/native/token-counter/node_modules/plainify/package.json +0 -36
  236. package/native/token-counter/node_modules/plainify/readme.md +0 -47
  237. package/native/token-counter/node_modules/possible-function/changelog.md +0 -7
  238. package/native/token-counter/node_modules/possible-function/index.js +0 -43
  239. package/native/token-counter/node_modules/possible-function/license.txt +0 -21
  240. package/native/token-counter/node_modules/possible-function/package.json +0 -34
  241. package/native/token-counter/node_modules/possible-function/readme.md +0 -77
  242. package/native/token-counter/node_modules/possible-function/test.js +0 -32
  243. package/native/token-counter/node_modules/qfn/index.js +0 -11
  244. package/native/token-counter/node_modules/qfn/license.txt +0 -21
  245. package/native/token-counter/node_modules/qfn/package.json +0 -40
  246. package/native/token-counter/node_modules/qfn/readme.md +0 -45
  247. package/native/token-counter/node_modules/roadblock/index.js +0 -3
  248. package/native/token-counter/node_modules/roadblock/license.txt +0 -21
  249. package/native/token-counter/node_modules/roadblock/package.json +0 -40
  250. package/native/token-counter/node_modules/roadblock/readme.md +0 -59
  251. package/native/token-counter/node_modules/round-to/index.d.ts +0 -56
  252. package/native/token-counter/node_modules/round-to/index.js +0 -37
  253. package/native/token-counter/node_modules/round-to/license +0 -9
  254. package/native/token-counter/node_modules/round-to/package.json +0 -38
  255. package/native/token-counter/node_modules/round-to/readme.md +0 -71
  256. package/native/token-counter/node_modules/rtrim-array/index.js +0 -10
  257. package/native/token-counter/node_modules/rtrim-array/license.txt +0 -21
  258. package/native/token-counter/node_modules/rtrim-array/package.json +0 -41
  259. package/native/token-counter/node_modules/rtrim-array/readme.md +0 -75
  260. package/native/token-counter/node_modules/sbo/index.js +0 -25
  261. package/native/token-counter/node_modules/sbo/license.txt +0 -21
  262. package/native/token-counter/node_modules/sbo/package.json +0 -50
  263. package/native/token-counter/node_modules/sbo/readme.md +0 -105
  264. package/native/token-counter/node_modules/sorp/index.js +0 -3
  265. package/native/token-counter/node_modules/sorp/license.txt +0 -21
  266. package/native/token-counter/node_modules/sorp/package.json +0 -34
  267. package/native/token-counter/node_modules/sorp/readme.md +0 -25
  268. package/native/token-counter/node_modules/trim-call/index.js +0 -6
  269. package/native/token-counter/node_modules/trim-call/license.txt +0 -21
  270. package/native/token-counter/node_modules/trim-call/package.json +0 -40
  271. package/native/token-counter/node_modules/trim-call/readme.md +0 -80
  272. package/native/token-counter/node_modules/type-error/LICENSE +0 -21
  273. package/native/token-counter/node_modules/type-error/README.md +0 -24
  274. package/native/token-counter/node_modules/type-error/index.js +0 -35
  275. package/native/token-counter/node_modules/type-error/package.json +0 -11
  276. package/native/token-counter/node_modules/vfn/index.js +0 -21
  277. package/native/token-counter/node_modules/vfn/license.txt +0 -21
  278. package/native/token-counter/node_modules/vfn/package.json +0 -40
  279. package/native/token-counter/node_modules/vfn/readme.md +0 -81
  280. package/native/token-counter/node_modules/wfn/index.js +0 -43
  281. package/native/token-counter/node_modules/wfn/license.txt +0 -21
  282. package/native/token-counter/node_modules/wfn/package.json +0 -38
  283. package/native/token-counter/node_modules/wfn/readme.md +0 -81
  284. package/native/token-counter/package-lock.json +0 -578
  285. package/native/token-counter/package.json +0 -21
  286. package/native/token-counter/token-counter.linux-x64-gnu.node +0 -0
@@ -0,0 +1,4 @@
1
+ export { visionClassify, readFileBase64, analyzeTileCrops, loadCaptchaTraining, saveCaptchaTraining, getTrainingHint, findGridTiles, humanClick, humanMove, humanHold, warmupBehavior, bezierPoint, easeInOut, capthaiSolve, saveCapthaiTraining, } from './common.js';
2
+ export { solveCaptchaGrid } from './RecaptchaSolver.js';
3
+ export { autoSolveCaptcha, analyzeImageChallenge, _lastGridAnalyzeTime, setLastGridAnalyzeTime } from './CaptchaRouter.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/captcha/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,UAAU,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,WAAW,EACX,SAAS,EACT,YAAY,EACZ,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aurix-ai",
3
- "version": "2.7.3",
3
+ "version": "2.7.4",
4
4
  "description": "Open-source terminal AI agent for coding, deep research, automation, and multi-platform task execution.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,7 +40,6 @@
40
40
  "files": [
41
41
  "bin/",
42
42
  "dist/",
43
- "native/",
44
43
  "scripts/",
45
44
  "README.md"
46
45
  ],
package/scripts/build.cjs CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  const path = require('path');
3
- const fs = require('fs');
4
3
  const { execSync } = require('child_process');
5
4
 
6
5
  try {
@@ -11,17 +10,3 @@ try {
11
10
  } catch (e) {
12
11
  process.exit(1);
13
12
  }
14
-
15
- const nativeDir = path.join(__dirname, '..', 'native', 'token-counter');
16
- const distDir = path.join(__dirname, '..', 'dist');
17
- try {
18
- const files = fs.readdirSync(nativeDir).filter(f => f.endsWith('.node'));
19
- for (const f of files) {
20
- const src = path.join(nativeDir, f);
21
- const dest = path.join(distDir, f);
22
- fs.copyFileSync(src, dest);
23
- console.log(`[build] Copied ${f} to dist/`);
24
- }
25
- } catch (e) {
26
- console.warn('[build] Could not copy .node binary:', e.message);
27
- }
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env node
2
+ import { appendFileSync, mkdirSync, existsSync } from 'fs';
3
+ import { join, dirname } from 'path';
4
+ import { fileURLToPath } from 'url';
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const LOG_DIR = join(__dirname, 'logs');
8
+ if (!existsSync(LOG_DIR)) mkdirSync(LOG_DIR, { recursive: true });
9
+
10
+ const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
11
+ const logFile = join(LOG_DIR, `task-${timestamp}.log`);
12
+
13
+ const task = process.argv[2];
14
+ if (!task) {
15
+ console.log(`
16
+ Usage: node scripts/run-task.mjs "<task description>"
17
+
18
+ Examples:
19
+ node scripts/run-task.mjs "Go to example.com and fill the signup form"
20
+ node scripts/run-task.mjs "Solve the CAPTCHA on google.com/recaptcha/api2/demo"
21
+ node scripts/run-task.mjs "Navigate to github.com and star the repo"
22
+
23
+ Options:
24
+ --gui Show browser window for monitoring
25
+ --proxy=H:P Use proxy (host:port:user:pass)
26
+
27
+ Logs saved to: ${LOG_DIR}/
28
+ `);
29
+ process.exit(0);
30
+ }
31
+
32
+ const args = process.argv.slice(2);
33
+ const useGui = args.includes('--gui');
34
+ const proxyArg = args.find(a => a.startsWith('--proxy='));
35
+ const taskText = args.filter(a => !a.startsWith('--')).join(' ');
36
+
37
+ const log = (msg) => {
38
+ const line = `[${new Date().toISOString()}] ${msg}`;
39
+ console.log(line);
40
+ appendFileSync(logFile, line + '\n');
41
+ };
42
+
43
+ log(`=== Task: "${taskText}" ===`);
44
+ log(`Log file: ${logFile}`);
45
+ if (useGui) log('GUI mode: browser window visible');
46
+ if (proxyArg) log(`Proxy: ${proxyArg.replace('--proxy=', '')}`);
47
+
48
+ const { browserTool } = await import('../dist/tools/Browser.js');
49
+
50
+ if (proxyArg) {
51
+ const proxy = proxyArg.replace('--proxy=', '');
52
+ log(`Setting proxy: ${proxy}`);
53
+ await browserTool.execute({ action: 'set-proxy', value: proxy });
54
+ }
55
+
56
+ if (useGui) {
57
+ await browserTool.execute({ action: 'set-ui', value: 'on' });
58
+ }
59
+
60
+ const { AgentLoop } = await import('../dist/agent/AgentLoop.js');
61
+ const { loadConfig } = await import('../dist/agent/Config.js');
62
+ const { Registry } = await import('../dist/tools/Registry.js');
63
+
64
+ const config = loadConfig();
65
+ const registry = new Registry(config);
66
+ const agent = new AgentLoop(config, registry);
67
+
68
+ log('Starting agent...');
69
+ try {
70
+ for await (const event of agent.run(taskText)) {
71
+ if (event.type === 'text') {
72
+ log(`[AI] ${event.data}`);
73
+ } else if (event.type === 'tool_start') {
74
+ log(`[TOOL] ${event.toolName}(${JSON.stringify(event.toolArgs || {}).substring(0, 100)})`);
75
+ } else if (event.type === 'tool_end') {
76
+ const data = typeof event.data === 'string' ? event.data : JSON.stringify(event.data);
77
+ log(`[RESULT] ${data.substring(0, 200)}`);
78
+ } else if (event.type === 'error') {
79
+ log(`[ERROR] ${event.data}`);
80
+ }
81
+ }
82
+ log('=== Task complete ===');
83
+ } catch (e) {
84
+ log(`[FATAL] ${e.message}`);
85
+ process.exit(1);
86
+ }
@@ -1,7 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- /* auto-generated by NAPI-RS */
5
-
6
- export declare function countTokens(text: string, encoding?: string | undefined | null): number
7
- export declare function countTokensBatch(texts: Array<string>, encoding?: string | undefined | null): Array<number>
@@ -1,316 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /* prettier-ignore */
4
-
5
- /* auto-generated by NAPI-RS */
6
-
7
- const { existsSync, readFileSync } = require('fs')
8
- const { join } = require('path')
9
-
10
- const { platform, arch } = process
11
-
12
- let nativeBinding = null
13
- let localFileExisted = false
14
- let loadError = null
15
-
16
- function isMusl() {
17
- // For Node 10
18
- if (!process.report || typeof process.report.getReport !== 'function') {
19
- try {
20
- const lddPath = require('child_process').execSync('which ldd').toString().trim()
21
- return readFileSync(lddPath, 'utf8').includes('musl')
22
- } catch (e) {
23
- return true
24
- }
25
- } else {
26
- const { glibcVersionRuntime } = process.report.getReport().header
27
- return !glibcVersionRuntime
28
- }
29
- }
30
-
31
- switch (platform) {
32
- case 'android':
33
- switch (arch) {
34
- case 'arm64':
35
- localFileExisted = existsSync(join(__dirname, 'token-counter.android-arm64.node'))
36
- try {
37
- if (localFileExisted) {
38
- nativeBinding = require('./token-counter.android-arm64.node')
39
- } else {
40
- nativeBinding = require('@aurix/token-counter-android-arm64')
41
- }
42
- } catch (e) {
43
- loadError = e
44
- }
45
- break
46
- case 'arm':
47
- localFileExisted = existsSync(join(__dirname, 'token-counter.android-arm-eabi.node'))
48
- try {
49
- if (localFileExisted) {
50
- nativeBinding = require('./token-counter.android-arm-eabi.node')
51
- } else {
52
- nativeBinding = require('@aurix/token-counter-android-arm-eabi')
53
- }
54
- } catch (e) {
55
- loadError = e
56
- }
57
- break
58
- default:
59
- throw new Error(`Unsupported architecture on Android ${arch}`)
60
- }
61
- break
62
- case 'win32':
63
- switch (arch) {
64
- case 'x64':
65
- localFileExisted = existsSync(
66
- join(__dirname, 'token-counter.win32-x64-msvc.node')
67
- )
68
- try {
69
- if (localFileExisted) {
70
- nativeBinding = require('./token-counter.win32-x64-msvc.node')
71
- } else {
72
- nativeBinding = require('@aurix/token-counter-win32-x64-msvc')
73
- }
74
- } catch (e) {
75
- loadError = e
76
- }
77
- break
78
- case 'ia32':
79
- localFileExisted = existsSync(
80
- join(__dirname, 'token-counter.win32-ia32-msvc.node')
81
- )
82
- try {
83
- if (localFileExisted) {
84
- nativeBinding = require('./token-counter.win32-ia32-msvc.node')
85
- } else {
86
- nativeBinding = require('@aurix/token-counter-win32-ia32-msvc')
87
- }
88
- } catch (e) {
89
- loadError = e
90
- }
91
- break
92
- case 'arm64':
93
- localFileExisted = existsSync(
94
- join(__dirname, 'token-counter.win32-arm64-msvc.node')
95
- )
96
- try {
97
- if (localFileExisted) {
98
- nativeBinding = require('./token-counter.win32-arm64-msvc.node')
99
- } else {
100
- nativeBinding = require('@aurix/token-counter-win32-arm64-msvc')
101
- }
102
- } catch (e) {
103
- loadError = e
104
- }
105
- break
106
- default:
107
- throw new Error(`Unsupported architecture on Windows: ${arch}`)
108
- }
109
- break
110
- case 'darwin':
111
- localFileExisted = existsSync(join(__dirname, 'token-counter.darwin-universal.node'))
112
- try {
113
- if (localFileExisted) {
114
- nativeBinding = require('./token-counter.darwin-universal.node')
115
- } else {
116
- nativeBinding = require('@aurix/token-counter-darwin-universal')
117
- }
118
- break
119
- } catch {}
120
- switch (arch) {
121
- case 'x64':
122
- localFileExisted = existsSync(join(__dirname, 'token-counter.darwin-x64.node'))
123
- try {
124
- if (localFileExisted) {
125
- nativeBinding = require('./token-counter.darwin-x64.node')
126
- } else {
127
- nativeBinding = require('@aurix/token-counter-darwin-x64')
128
- }
129
- } catch (e) {
130
- loadError = e
131
- }
132
- break
133
- case 'arm64':
134
- localFileExisted = existsSync(
135
- join(__dirname, 'token-counter.darwin-arm64.node')
136
- )
137
- try {
138
- if (localFileExisted) {
139
- nativeBinding = require('./token-counter.darwin-arm64.node')
140
- } else {
141
- nativeBinding = require('@aurix/token-counter-darwin-arm64')
142
- }
143
- } catch (e) {
144
- loadError = e
145
- }
146
- break
147
- default:
148
- throw new Error(`Unsupported architecture on macOS: ${arch}`)
149
- }
150
- break
151
- case 'freebsd':
152
- if (arch !== 'x64') {
153
- throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
154
- }
155
- localFileExisted = existsSync(join(__dirname, 'token-counter.freebsd-x64.node'))
156
- try {
157
- if (localFileExisted) {
158
- nativeBinding = require('./token-counter.freebsd-x64.node')
159
- } else {
160
- nativeBinding = require('@aurix/token-counter-freebsd-x64')
161
- }
162
- } catch (e) {
163
- loadError = e
164
- }
165
- break
166
- case 'linux':
167
- switch (arch) {
168
- case 'x64':
169
- if (isMusl()) {
170
- localFileExisted = existsSync(
171
- join(__dirname, 'token-counter.linux-x64-musl.node')
172
- )
173
- try {
174
- if (localFileExisted) {
175
- nativeBinding = require('./token-counter.linux-x64-musl.node')
176
- } else {
177
- nativeBinding = require('@aurix/token-counter-linux-x64-musl')
178
- }
179
- } catch (e) {
180
- loadError = e
181
- }
182
- } else {
183
- localFileExisted = existsSync(
184
- join(__dirname, 'token-counter.linux-x64-gnu.node')
185
- )
186
- try {
187
- if (localFileExisted) {
188
- nativeBinding = require('./token-counter.linux-x64-gnu.node')
189
- } else {
190
- nativeBinding = require('@aurix/token-counter-linux-x64-gnu')
191
- }
192
- } catch (e) {
193
- loadError = e
194
- }
195
- }
196
- break
197
- case 'arm64':
198
- if (isMusl()) {
199
- localFileExisted = existsSync(
200
- join(__dirname, 'token-counter.linux-arm64-musl.node')
201
- )
202
- try {
203
- if (localFileExisted) {
204
- nativeBinding = require('./token-counter.linux-arm64-musl.node')
205
- } else {
206
- nativeBinding = require('@aurix/token-counter-linux-arm64-musl')
207
- }
208
- } catch (e) {
209
- loadError = e
210
- }
211
- } else {
212
- localFileExisted = existsSync(
213
- join(__dirname, 'token-counter.linux-arm64-gnu.node')
214
- )
215
- try {
216
- if (localFileExisted) {
217
- nativeBinding = require('./token-counter.linux-arm64-gnu.node')
218
- } else {
219
- nativeBinding = require('@aurix/token-counter-linux-arm64-gnu')
220
- }
221
- } catch (e) {
222
- loadError = e
223
- }
224
- }
225
- break
226
- case 'arm':
227
- if (isMusl()) {
228
- localFileExisted = existsSync(
229
- join(__dirname, 'token-counter.linux-arm-musleabihf.node')
230
- )
231
- try {
232
- if (localFileExisted) {
233
- nativeBinding = require('./token-counter.linux-arm-musleabihf.node')
234
- } else {
235
- nativeBinding = require('@aurix/token-counter-linux-arm-musleabihf')
236
- }
237
- } catch (e) {
238
- loadError = e
239
- }
240
- } else {
241
- localFileExisted = existsSync(
242
- join(__dirname, 'token-counter.linux-arm-gnueabihf.node')
243
- )
244
- try {
245
- if (localFileExisted) {
246
- nativeBinding = require('./token-counter.linux-arm-gnueabihf.node')
247
- } else {
248
- nativeBinding = require('@aurix/token-counter-linux-arm-gnueabihf')
249
- }
250
- } catch (e) {
251
- loadError = e
252
- }
253
- }
254
- break
255
- case 'riscv64':
256
- if (isMusl()) {
257
- localFileExisted = existsSync(
258
- join(__dirname, 'token-counter.linux-riscv64-musl.node')
259
- )
260
- try {
261
- if (localFileExisted) {
262
- nativeBinding = require('./token-counter.linux-riscv64-musl.node')
263
- } else {
264
- nativeBinding = require('@aurix/token-counter-linux-riscv64-musl')
265
- }
266
- } catch (e) {
267
- loadError = e
268
- }
269
- } else {
270
- localFileExisted = existsSync(
271
- join(__dirname, 'token-counter.linux-riscv64-gnu.node')
272
- )
273
- try {
274
- if (localFileExisted) {
275
- nativeBinding = require('./token-counter.linux-riscv64-gnu.node')
276
- } else {
277
- nativeBinding = require('@aurix/token-counter-linux-riscv64-gnu')
278
- }
279
- } catch (e) {
280
- loadError = e
281
- }
282
- }
283
- break
284
- case 's390x':
285
- localFileExisted = existsSync(
286
- join(__dirname, 'token-counter.linux-s390x-gnu.node')
287
- )
288
- try {
289
- if (localFileExisted) {
290
- nativeBinding = require('./token-counter.linux-s390x-gnu.node')
291
- } else {
292
- nativeBinding = require('@aurix/token-counter-linux-s390x-gnu')
293
- }
294
- } catch (e) {
295
- loadError = e
296
- }
297
- break
298
- default:
299
- throw new Error(`Unsupported architecture on Linux: ${arch}`)
300
- }
301
- break
302
- default:
303
- throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`)
304
- }
305
-
306
- if (!nativeBinding) {
307
- if (loadError) {
308
- throw loadError
309
- }
310
- throw new Error(`Failed to load native binding`)
311
- }
312
-
313
- const { countTokens, countTokensBatch } = nativeBinding
314
-
315
- module.exports.countTokens = countTokens
316
- module.exports.countTokensBatch = countTokensBatch