orbitx 0.0.7 → 0.0.9

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 (398) hide show
  1. package/Readme.md +227 -67
  2. package/dist/core/agent-providers.d.ts +16 -0
  3. package/dist/core/agent-providers.d.ts.map +1 -0
  4. package/dist/core/agent-providers.js +21 -0
  5. package/dist/core/agent-providers.js.map +1 -0
  6. package/dist/core/ai-provider.d.ts +69 -1
  7. package/dist/core/ai-provider.d.ts.map +1 -1
  8. package/dist/core/ai-provider.js.map +1 -1
  9. package/dist/core/base-agent.d.ts +8 -4
  10. package/dist/core/base-agent.d.ts.map +1 -1
  11. package/dist/core/base-agent.js +220 -88
  12. package/dist/core/base-agent.js.map +1 -1
  13. package/dist/core/deepseek-provider.d.ts +10 -3
  14. package/dist/core/deepseek-provider.d.ts.map +1 -1
  15. package/dist/core/deepseek-provider.js +144 -39
  16. package/dist/core/deepseek-provider.js.map +1 -1
  17. package/dist/core/image-describer.d.ts +13 -0
  18. package/dist/core/image-describer.d.ts.map +1 -0
  19. package/dist/core/image-describer.js +33 -0
  20. package/dist/core/image-describer.js.map +1 -0
  21. package/dist/core/mcp-client.d.ts +17 -4
  22. package/dist/core/mcp-client.d.ts.map +1 -1
  23. package/dist/core/mcp-client.js +32 -16
  24. package/dist/core/mcp-client.js.map +1 -1
  25. package/dist/core/mcp-computer.d.ts +10 -2
  26. package/dist/core/mcp-computer.d.ts.map +1 -1
  27. package/dist/core/mcp-computer.js +108 -2
  28. package/dist/core/mcp-computer.js.map +1 -1
  29. package/dist/core/mcp-fs-storage.d.ts +8 -0
  30. package/dist/core/mcp-fs-storage.d.ts.map +1 -0
  31. package/dist/core/mcp-fs-storage.js +27 -0
  32. package/dist/core/mcp-fs-storage.js.map +1 -0
  33. package/dist/core/mcp-rng.d.ts +7 -0
  34. package/dist/core/mcp-rng.d.ts.map +1 -0
  35. package/dist/core/mcp-rng.js +14 -0
  36. package/dist/core/mcp-rng.js.map +1 -0
  37. package/dist/core/mcp-server.d.ts +8 -4
  38. package/dist/core/mcp-server.d.ts.map +1 -1
  39. package/dist/core/mcp-server.js +20 -3
  40. package/dist/core/mcp-server.js.map +1 -1
  41. package/dist/core/mcp-storage.d.ts +5 -0
  42. package/dist/core/mcp-storage.d.ts.map +1 -0
  43. package/dist/core/mcp-storage.js +3 -0
  44. package/dist/core/mcp-storage.js.map +1 -0
  45. package/dist/core/mcp.d.ts +37 -3
  46. package/dist/core/mcp.d.ts.map +1 -1
  47. package/dist/core/mcp.js +42 -1
  48. package/dist/core/mcp.js.map +1 -1
  49. package/dist/core/ollama-provider.d.ts +10 -3
  50. package/dist/core/ollama-provider.d.ts.map +1 -1
  51. package/dist/core/ollama-provider.js +122 -41
  52. package/dist/core/ollama-provider.js.map +1 -1
  53. package/dist/core/retry.d.ts +10 -0
  54. package/dist/core/retry.d.ts.map +1 -0
  55. package/dist/core/retry.js +39 -0
  56. package/dist/core/retry.js.map +1 -0
  57. package/dist/core/skill.d.ts +3 -0
  58. package/dist/core/skill.d.ts.map +1 -1
  59. package/dist/core/skill.js.map +1 -1
  60. package/dist/core/tool-schema-translator.d.ts +10 -0
  61. package/dist/core/tool-schema-translator.d.ts.map +1 -0
  62. package/dist/core/tool-schema-translator.js +29 -0
  63. package/dist/core/tool-schema-translator.js.map +1 -0
  64. package/dist/index.d.ts +34 -6
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +25 -5
  67. package/dist/index.js.map +1 -1
  68. package/dist/sandbox.d.ts +2 -0
  69. package/dist/sandbox.d.ts.map +1 -0
  70. package/dist/sandbox.js +27 -0
  71. package/dist/sandbox.js.map +1 -0
  72. package/dist/skills/backend-security.d.ts +4 -0
  73. package/dist/skills/backend-security.d.ts.map +1 -0
  74. package/dist/skills/backend-security.js +74 -0
  75. package/dist/skills/backend-security.js.map +1 -0
  76. package/dist/skills/big-task.d.ts +4 -0
  77. package/dist/skills/big-task.d.ts.map +1 -0
  78. package/dist/skills/big-task.js +66 -0
  79. package/dist/skills/big-task.js.map +1 -0
  80. package/dist/skills/code-verification.d.ts +4 -0
  81. package/dist/skills/code-verification.d.ts.map +1 -0
  82. package/dist/skills/code-verification.js +59 -0
  83. package/dist/skills/code-verification.js.map +1 -0
  84. package/dist/skills/long-task-efficiency.d.ts +4 -0
  85. package/dist/skills/long-task-efficiency.d.ts.map +1 -0
  86. package/dist/skills/long-task-efficiency.js +50 -0
  87. package/dist/skills/long-task-efficiency.js.map +1 -0
  88. package/dist/skills/node-backend.d.ts +4 -0
  89. package/dist/skills/node-backend.d.ts.map +1 -0
  90. package/dist/skills/node-backend.js +110 -0
  91. package/dist/skills/node-backend.js.map +1 -0
  92. package/dist/skills/planner.d.ts +4 -0
  93. package/dist/skills/planner.d.ts.map +1 -0
  94. package/dist/skills/planner.js +49 -0
  95. package/dist/skills/planner.js.map +1 -0
  96. package/dist/skills/present.d.ts +4 -0
  97. package/dist/skills/present.d.ts.map +1 -0
  98. package/dist/skills/present.js +56 -0
  99. package/dist/skills/present.js.map +1 -0
  100. package/dist/skills/question-answer.d.ts +4 -0
  101. package/dist/skills/question-answer.d.ts.map +1 -0
  102. package/dist/skills/question-answer.js +55 -0
  103. package/dist/skills/question-answer.js.map +1 -0
  104. package/dist/skills/react-frontend.d.ts +4 -0
  105. package/dist/skills/react-frontend.d.ts.map +1 -0
  106. package/dist/skills/react-frontend.js +111 -0
  107. package/dist/skills/react-frontend.js.map +1 -0
  108. package/dist/skills/research.d.ts +4 -0
  109. package/dist/skills/research.d.ts.map +1 -0
  110. package/dist/skills/research.js +81 -0
  111. package/dist/skills/research.js.map +1 -0
  112. package/dist/skills/shopping.d.ts +4 -0
  113. package/dist/skills/shopping.d.ts.map +1 -0
  114. package/dist/skills/shopping.js +71 -0
  115. package/dist/skills/shopping.js.map +1 -0
  116. package/dist/skills/ui-ux-design.d.ts +4 -0
  117. package/dist/skills/ui-ux-design.d.ts.map +1 -0
  118. package/dist/skills/ui-ux-design.js +70 -0
  119. package/dist/skills/ui-ux-design.js.map +1 -0
  120. package/dist/skills/web-end-to-end-test.d.ts +4 -0
  121. package/dist/skills/web-end-to-end-test.d.ts.map +1 -0
  122. package/dist/skills/web-end-to-end-test.js +76 -0
  123. package/dist/skills/web-end-to-end-test.js.map +1 -0
  124. package/dist/templates/simple.d.ts +1 -1
  125. package/dist/templates/simple.d.ts.map +1 -1
  126. package/dist/templates/simple.js +4 -0
  127. package/dist/templates/simple.js.map +1 -1
  128. package/dist/tests/mcp.test.js +2 -54
  129. package/dist/tests/mcp.test.js.map +1 -1
  130. package/dist/tools/bash/index.d.ts +10 -0
  131. package/dist/tools/bash/index.d.ts.map +1 -0
  132. package/dist/tools/bash/index.js +22 -0
  133. package/dist/tools/bash/index.js.map +1 -0
  134. package/dist/tools/bash/interaction.d.ts +29 -0
  135. package/dist/tools/bash/interaction.d.ts.map +1 -0
  136. package/dist/tools/bash/interaction.js +13 -0
  137. package/dist/tools/bash/interaction.js.map +1 -0
  138. package/dist/tools/bash/list.d.ts +4 -0
  139. package/dist/tools/bash/list.d.ts.map +1 -0
  140. package/dist/tools/bash/list.js +23 -0
  141. package/dist/tools/bash/list.js.map +1 -0
  142. package/dist/tools/bash/logs.d.ts +4 -0
  143. package/dist/tools/bash/logs.d.ts.map +1 -0
  144. package/dist/tools/bash/logs.js +47 -0
  145. package/dist/tools/bash/logs.js.map +1 -0
  146. package/dist/tools/bash/process-manager.d.ts +35 -0
  147. package/dist/tools/bash/process-manager.d.ts.map +1 -0
  148. package/dist/tools/bash/process-manager.js +137 -0
  149. package/dist/tools/bash/process-manager.js.map +1 -0
  150. package/dist/tools/bash/run.d.ts +5 -0
  151. package/dist/tools/bash/run.d.ts.map +1 -0
  152. package/dist/tools/bash/run.js +57 -0
  153. package/dist/tools/bash/run.js.map +1 -0
  154. package/dist/tools/bash/terminate.d.ts +5 -0
  155. package/dist/tools/bash/terminate.d.ts.map +1 -0
  156. package/dist/tools/bash/terminate.js +39 -0
  157. package/dist/tools/bash/terminate.js.map +1 -0
  158. package/dist/tools/bash/wait.d.ts +5 -0
  159. package/dist/tools/bash/wait.d.ts.map +1 -0
  160. package/dist/tools/bash/wait.js +50 -0
  161. package/dist/tools/bash/wait.js.map +1 -0
  162. package/dist/tools/bash/write-input.d.ts +5 -0
  163. package/dist/tools/bash/write-input.d.ts.map +1 -0
  164. package/dist/tools/bash/write-input.js +47 -0
  165. package/dist/tools/bash/write-input.js.map +1 -0
  166. package/dist/tools/browser/click.d.ts +5 -0
  167. package/dist/tools/browser/click.d.ts.map +1 -0
  168. package/dist/tools/browser/click.js +44 -0
  169. package/dist/tools/browser/click.js.map +1 -0
  170. package/dist/tools/browser/console.d.ts +4 -0
  171. package/dist/tools/browser/console.d.ts.map +1 -0
  172. package/dist/tools/browser/console.js +41 -0
  173. package/dist/tools/browser/console.js.map +1 -0
  174. package/dist/tools/browser/create-session.d.ts +5 -0
  175. package/dist/tools/browser/create-session.d.ts.map +1 -0
  176. package/dist/tools/browser/create-session.js +30 -0
  177. package/dist/tools/browser/create-session.js.map +1 -0
  178. package/dist/tools/browser/evaluate-safe.d.ts +10 -0
  179. package/dist/tools/browser/evaluate-safe.d.ts.map +1 -0
  180. package/dist/tools/browser/evaluate-safe.js +65 -0
  181. package/dist/tools/browser/evaluate-safe.js.map +1 -0
  182. package/dist/tools/browser/fill.d.ts +5 -0
  183. package/dist/tools/browser/fill.d.ts.map +1 -0
  184. package/dist/tools/browser/fill.js +78 -0
  185. package/dist/tools/browser/fill.js.map +1 -0
  186. package/dist/tools/browser/get-sessions.d.ts +4 -0
  187. package/dist/tools/browser/get-sessions.d.ts.map +1 -0
  188. package/dist/tools/browser/get-sessions.js +14 -0
  189. package/dist/tools/browser/get-sessions.js.map +1 -0
  190. package/dist/tools/browser/index.d.ts +19 -0
  191. package/dist/tools/browser/index.d.ts.map +1 -0
  192. package/dist/tools/browser/index.js +49 -0
  193. package/dist/tools/browser/index.js.map +1 -0
  194. package/dist/tools/browser/inject.d.ts +5 -0
  195. package/dist/tools/browser/inject.d.ts.map +1 -0
  196. package/dist/tools/browser/inject.js +51 -0
  197. package/dist/tools/browser/inject.js.map +1 -0
  198. package/dist/tools/browser/interaction.d.ts +49 -0
  199. package/dist/tools/browser/interaction.d.ts.map +1 -0
  200. package/dist/tools/browser/interaction.js +14 -0
  201. package/dist/tools/browser/interaction.js.map +1 -0
  202. package/dist/tools/browser/navigate.d.ts +5 -0
  203. package/dist/tools/browser/navigate.d.ts.map +1 -0
  204. package/dist/tools/browser/navigate.js +39 -0
  205. package/dist/tools/browser/navigate.js.map +1 -0
  206. package/dist/tools/browser/network-status.d.ts +4 -0
  207. package/dist/tools/browser/network-status.d.ts.map +1 -0
  208. package/dist/tools/browser/network-status.js +35 -0
  209. package/dist/tools/browser/network-status.js.map +1 -0
  210. package/dist/tools/browser/network.d.ts +4 -0
  211. package/dist/tools/browser/network.d.ts.map +1 -0
  212. package/dist/tools/browser/network.js +51 -0
  213. package/dist/tools/browser/network.js.map +1 -0
  214. package/dist/tools/browser/read-page.d.ts +45 -0
  215. package/dist/tools/browser/read-page.d.ts.map +1 -0
  216. package/dist/tools/browser/read-page.js +264 -0
  217. package/dist/tools/browser/read-page.js.map +1 -0
  218. package/dist/tools/browser/read.d.ts +5 -0
  219. package/dist/tools/browser/read.d.ts.map +1 -0
  220. package/dist/tools/browser/read.js +56 -0
  221. package/dist/tools/browser/read.js.map +1 -0
  222. package/dist/tools/browser/remove-session.d.ts +5 -0
  223. package/dist/tools/browser/remove-session.d.ts.map +1 -0
  224. package/dist/tools/browser/remove-session.js +29 -0
  225. package/dist/tools/browser/remove-session.js.map +1 -0
  226. package/dist/tools/browser/screenshot.d.ts +5 -0
  227. package/dist/tools/browser/screenshot.d.ts.map +1 -0
  228. package/dist/tools/browser/screenshot.js +50 -0
  229. package/dist/tools/browser/screenshot.js.map +1 -0
  230. package/dist/tools/browser/scroll-info.d.ts +4 -0
  231. package/dist/tools/browser/scroll-info.d.ts.map +1 -0
  232. package/dist/tools/browser/scroll-info.js +28 -0
  233. package/dist/tools/browser/scroll-info.js.map +1 -0
  234. package/dist/tools/browser/scroll.d.ts +5 -0
  235. package/dist/tools/browser/scroll.d.ts.map +1 -0
  236. package/dist/tools/browser/scroll.js +43 -0
  237. package/dist/tools/browser/scroll.js.map +1 -0
  238. package/dist/tools/browser/session-manager.d.ts +35 -0
  239. package/dist/tools/browser/session-manager.d.ts.map +1 -0
  240. package/dist/tools/browser/session-manager.js +101 -0
  241. package/dist/tools/browser/session-manager.js.map +1 -0
  242. package/dist/tools/browser/submit-form.d.ts +5 -0
  243. package/dist/tools/browser/submit-form.d.ts.map +1 -0
  244. package/dist/tools/browser/submit-form.js +45 -0
  245. package/dist/tools/browser/submit-form.js.map +1 -0
  246. package/dist/tools/fs/create-dir.d.ts +5 -0
  247. package/dist/tools/fs/create-dir.d.ts.map +1 -0
  248. package/dist/tools/fs/create-dir.js +28 -0
  249. package/dist/tools/fs/create-dir.js.map +1 -0
  250. package/dist/tools/fs/delete.d.ts +5 -0
  251. package/dist/tools/fs/delete.d.ts.map +1 -0
  252. package/dist/tools/fs/delete.js +45 -0
  253. package/dist/tools/fs/delete.js.map +1 -0
  254. package/dist/tools/fs/edit-file.d.ts +5 -0
  255. package/dist/tools/fs/edit-file.d.ts.map +1 -0
  256. package/dist/tools/fs/edit-file.js +74 -0
  257. package/dist/tools/fs/edit-file.js.map +1 -0
  258. package/dist/tools/fs/index.d.ts +11 -2
  259. package/dist/tools/fs/index.d.ts.map +1 -1
  260. package/dist/tools/fs/index.js +27 -2
  261. package/dist/tools/fs/index.js.map +1 -1
  262. package/dist/tools/fs/interaction.d.ts +37 -0
  263. package/dist/tools/fs/interaction.d.ts.map +1 -0
  264. package/dist/tools/fs/interaction.js +13 -0
  265. package/dist/tools/fs/interaction.js.map +1 -0
  266. package/dist/tools/fs/list-dir.d.ts +5 -0
  267. package/dist/tools/fs/list-dir.d.ts.map +1 -0
  268. package/dist/tools/fs/list-dir.js +87 -0
  269. package/dist/tools/fs/list-dir.js.map +1 -0
  270. package/dist/tools/fs/move.d.ts +5 -0
  271. package/dist/tools/fs/move.d.ts.map +1 -0
  272. package/dist/tools/fs/move.js +44 -0
  273. package/dist/tools/fs/move.js.map +1 -0
  274. package/dist/tools/fs/read-file.d.ts +4 -3
  275. package/dist/tools/fs/read-file.d.ts.map +1 -1
  276. package/dist/tools/fs/read-file.js +50 -42
  277. package/dist/tools/fs/read-file.js.map +1 -1
  278. package/dist/tools/fs/stat.d.ts +5 -0
  279. package/dist/tools/fs/stat.d.ts.map +1 -0
  280. package/dist/tools/fs/stat.js +40 -0
  281. package/dist/tools/fs/stat.js.map +1 -0
  282. package/dist/tools/fs/utils.d.ts +20 -0
  283. package/dist/tools/fs/utils.d.ts.map +1 -0
  284. package/dist/tools/fs/utils.js +33 -0
  285. package/dist/tools/fs/utils.js.map +1 -0
  286. package/dist/tools/fs/write-file.d.ts +4 -3
  287. package/dist/tools/fs/write-file.d.ts.map +1 -1
  288. package/dist/tools/fs/write-file.js +39 -58
  289. package/dist/tools/fs/write-file.js.map +1 -1
  290. package/dist/tools/present/add.d.ts +5 -0
  291. package/dist/tools/present/add.d.ts.map +1 -0
  292. package/dist/tools/present/add.js +54 -0
  293. package/dist/tools/present/add.js.map +1 -0
  294. package/dist/tools/present/clear.d.ts +5 -0
  295. package/dist/tools/present/clear.d.ts.map +1 -0
  296. package/dist/tools/present/clear.js +23 -0
  297. package/dist/tools/present/clear.js.map +1 -0
  298. package/dist/tools/present/get-list.d.ts +5 -0
  299. package/dist/tools/present/get-list.d.ts.map +1 -0
  300. package/dist/tools/present/get-list.js +24 -0
  301. package/dist/tools/present/get-list.js.map +1 -0
  302. package/dist/tools/present/index.d.ts +8 -0
  303. package/dist/tools/present/index.d.ts.map +1 -0
  304. package/dist/tools/present/index.js +14 -0
  305. package/dist/tools/present/index.js.map +1 -0
  306. package/dist/tools/present/interaction.d.ts +17 -0
  307. package/dist/tools/present/interaction.d.ts.map +1 -0
  308. package/dist/tools/present/interaction.js +15 -0
  309. package/dist/tools/present/interaction.js.map +1 -0
  310. package/dist/tools/present/utils.d.ts +12 -0
  311. package/dist/tools/present/utils.d.ts.map +1 -0
  312. package/dist/tools/present/utils.js +40 -0
  313. package/dist/tools/present/utils.js.map +1 -0
  314. package/dist/tools/question-answer/index.d.ts +5 -0
  315. package/dist/tools/question-answer/index.d.ts.map +1 -0
  316. package/dist/tools/question-answer/index.js +7 -0
  317. package/dist/tools/question-answer/index.js.map +1 -0
  318. package/dist/tools/question-answer/interaction.d.ts +14 -0
  319. package/dist/tools/question-answer/interaction.d.ts.map +1 -0
  320. package/dist/tools/question-answer/interaction.js +13 -0
  321. package/dist/tools/question-answer/interaction.js.map +1 -0
  322. package/dist/tools/question-answer/question-answer.d.ts +5 -0
  323. package/dist/tools/question-answer/question-answer.d.ts.map +1 -0
  324. package/dist/tools/question-answer/question-answer.js +24 -0
  325. package/dist/tools/question-answer/question-answer.js.map +1 -0
  326. package/dist/tools/todo/check-task.d.ts +5 -0
  327. package/dist/tools/todo/check-task.d.ts.map +1 -0
  328. package/dist/tools/todo/check-task.js +49 -0
  329. package/dist/tools/todo/check-task.js.map +1 -0
  330. package/dist/tools/todo/create-list.d.ts +5 -0
  331. package/dist/tools/todo/create-list.d.ts.map +1 -0
  332. package/dist/tools/todo/create-list.js +36 -0
  333. package/dist/tools/todo/create-list.js.map +1 -0
  334. package/dist/tools/todo/create-task.d.ts +5 -0
  335. package/dist/tools/todo/create-task.d.ts.map +1 -0
  336. package/dist/tools/todo/create-task.js +63 -0
  337. package/dist/tools/todo/create-task.js.map +1 -0
  338. package/dist/tools/todo/get-list.d.ts +4 -0
  339. package/dist/tools/todo/get-list.d.ts.map +1 -0
  340. package/dist/tools/todo/get-list.js +38 -0
  341. package/dist/tools/todo/get-list.js.map +1 -0
  342. package/dist/tools/todo/get-lists.d.ts +4 -0
  343. package/dist/tools/todo/get-lists.d.ts.map +1 -0
  344. package/dist/tools/todo/get-lists.js +18 -0
  345. package/dist/tools/todo/get-lists.js.map +1 -0
  346. package/dist/tools/todo/index.d.ts +12 -0
  347. package/dist/tools/todo/index.d.ts.map +1 -0
  348. package/dist/tools/todo/index.js +25 -0
  349. package/dist/tools/todo/index.js.map +1 -0
  350. package/dist/tools/todo/interaction.d.ts +30 -0
  351. package/dist/tools/todo/interaction.d.ts.map +1 -0
  352. package/dist/tools/todo/interaction.js +13 -0
  353. package/dist/tools/todo/interaction.js.map +1 -0
  354. package/dist/tools/todo/remove-list.d.ts +5 -0
  355. package/dist/tools/todo/remove-list.d.ts.map +1 -0
  356. package/dist/tools/todo/remove-list.js +42 -0
  357. package/dist/tools/todo/remove-list.js.map +1 -0
  358. package/dist/tools/todo/remove-task.d.ts +5 -0
  359. package/dist/tools/todo/remove-task.d.ts.map +1 -0
  360. package/dist/tools/todo/remove-task.js +45 -0
  361. package/dist/tools/todo/remove-task.js.map +1 -0
  362. package/dist/tools/todo/storage.d.ts +22 -0
  363. package/dist/tools/todo/storage.d.ts.map +1 -0
  364. package/dist/tools/todo/storage.js +44 -0
  365. package/dist/tools/todo/storage.js.map +1 -0
  366. package/dist/tools/utils/delay.d.ts +10 -0
  367. package/dist/tools/utils/delay.d.ts.map +1 -0
  368. package/dist/tools/utils/delay.js +33 -0
  369. package/dist/tools/utils/delay.js.map +1 -0
  370. package/dist/tools/utils/get-current-time.d.ts +7 -2
  371. package/dist/tools/utils/get-current-time.d.ts.map +1 -1
  372. package/dist/tools/utils/get-current-time.js +12 -31
  373. package/dist/tools/utils/get-current-time.js.map +1 -1
  374. package/dist/tools/utils/index.d.ts +2 -0
  375. package/dist/tools/utils/index.d.ts.map +1 -1
  376. package/dist/tools/utils/index.js +7 -0
  377. package/dist/tools/utils/index.js.map +1 -1
  378. package/package.json +54 -56
  379. package/dist/templates/researcher.d.ts +0 -27
  380. package/dist/templates/researcher.d.ts.map +0 -1
  381. package/dist/templates/researcher.js +0 -70
  382. package/dist/templates/researcher.js.map +0 -1
  383. package/dist/tools/www/fetch.d.ts +0 -4
  384. package/dist/tools/www/fetch.d.ts.map +0 -1
  385. package/dist/tools/www/fetch.js +0 -147
  386. package/dist/tools/www/fetch.js.map +0 -1
  387. package/dist/tools/www/index.d.ts +0 -4
  388. package/dist/tools/www/index.d.ts.map +0 -1
  389. package/dist/tools/www/index.js +0 -4
  390. package/dist/tools/www/index.js.map +0 -1
  391. package/dist/tools/www/read-web-page.d.ts +0 -4
  392. package/dist/tools/www/read-web-page.d.ts.map +0 -1
  393. package/dist/tools/www/read-web-page.js +0 -330
  394. package/dist/tools/www/read-web-page.js.map +0 -1
  395. package/dist/tools/www/web-search.d.ts +0 -4
  396. package/dist/tools/www/web-search.d.ts.map +0 -1
  397. package/dist/tools/www/web-search.js +0 -82
  398. package/dist/tools/www/web-search.js.map +0 -1
@@ -0,0 +1,71 @@
1
+ import Skill from "../core/skill.js";
2
+ import { BrowserTools } from "../tools/browser/index.js";
3
+ import { UtilTools } from "../tools/utils/index.js";
4
+ export const ShoppingSkill = () => new Skill({
5
+ name: "shopping",
6
+ description: "Use this skill whenever the user wants help choosing, comparing, or buying a product — 'what's the best X', 'help me find a Y', 'is this a good deal', 'which should I buy', or a request for a specific product recommendation. Drives a real browser to find actual current listings, actual prices, actual direct links, and actual reviews — never recommends from memory or general reputation alone, since prices, models, and availability change constantly. Covers finding and comparing multiple competing options (not just one), surfacing real customer review sentiment (including scrolling to load reviews sections that don't render on initial page load), and giving the user a direct link and price for anything recommended. Trigger this for purchase-decision questions specifically; for general product knowledge questions with no purchase intent ('how does a HEPA filter work'), this skill isn't needed.",
7
+ tools: [
8
+ ...BrowserTools(),
9
+ ...UtilTools()
10
+ ],
11
+ instructions: `
12
+ # Shopping Skill
13
+
14
+ ## Mindset
15
+ Product recommendations go stale immediately — prices change daily, models get discontinued, "best" lists from training data are often already wrong by the time they're read back. Never recommend a specific product from memory or general brand reputation alone. Every specific product named in a shopping answer needs: a real, currently-open listing, a real current price, a real direct link, and — where the decision is non-trivial — real review evidence actually read from the page, not inferred from the product's category or brand alone.
16
+
17
+ The job is not "name a good product." The job is "help the user actually buy the right thing" — which means giving them a link they can click, a price they can trust as current, and enough comparative context (competitors, review sentiment, actual tradeoffs) that they're not making the decision on vibes.
18
+
19
+ ## Core loop
20
+ 1. Open a browser session (DuckDuckGo or Bing as entry point — not Google, same reasoning as the research skill: it blocks headless browsers). If the user named a specific retailer/site, go straight there instead.
21
+ 2. Search for the product category, read the results outline, and open several promising, genuinely different listings — not five results from the same retailer, and not just the first result.
22
+ 3. On each listing page, actually read: the current price, the product's real name/model, and whether it's in stock — don't report a price you haven't actually seen rendered on the page in this session, since cached/remembered prices are routinely wrong.
23
+ 4. Get the actual review section loaded and read (see "Reviews" below) rather than trusting a star rating alone.
24
+ 5. Repeat for at least 2–3 genuinely competing products before making a recommendation — see "Never recommend just one option" below.
25
+ 6. Present the comparison with direct links and current prices for everything named.
26
+
27
+ ## Never recommend just one option
28
+ A shopping answer that names a single product with no comparison is not doing the job, even if that product happens to be great. Unless the user has already narrowed to one specific item and just wants a check on it, always surface competitors:
29
+ - Open listings for at least 2–3 realistic alternatives in the same category/price band, not just variations of the same brand.
30
+ - Compare on the dimensions that actually matter for the category (price, key specs, review sentiment, warranty/return policy) rather than an arbitrary feature list.
31
+ - Be explicit about tradeoffs — "A is cheaper but has weaker reviews on durability; B costs more but consistently gets praised for X" — rather than a flat ranked list with no reasoning shown.
32
+ - If the user's ask is narrow ("is this specific product good") rather than "what should I buy," you can lead with a direct answer about that product, but still mention how it stacks up against its obvious alternatives rather than evaluating it in isolation.
33
+
34
+ ## Prices and links — accuracy is the whole point
35
+ - Every price quoted must be one you actually observed rendered on the page during this session. Prices from memory, from a search snippet alone, or extrapolated from an old listing are not acceptable — retailers change prices constantly and a stale number actively misleads a purchase decision.
36
+ - Always give the user the actual URL you found the listing at, not a guessed or reconstructed URL — only link to pages you actually opened and read in this session (never fabricate a plausible-looking product URL).
37
+ - Note the currency and, if relevant to the user's likely location, flag if a price appears to be in a different currency/region than expected.
38
+ - If a price shown seems to be a temporary sale/limited-time deal, say so — don't present a flash-sale price as the item's normal price.
39
+ - If stock status is visible (in stock / limited stock / out of stock / backordered), report it — a great deal on an out-of-stock item isn't actionable.
40
+ - If prices differ noticeably across retailers for what's genuinely the same item, surface the cheapest legitimate option rather than defaulting to whichever site you happened to open first.
41
+
42
+ ## Reviews — read them, don't infer them
43
+ A star rating alone is weak evidence — 4.2 stars can mean "consistently solid" or "half the reviews say it broke in a month and half say it's great," and those are very different signals for a buyer. Actually read review content:
44
+ - **Reviews sections often don't render on initial page load.** Many e-commerce and retailer sites lazy-load the reviews section only once it's scrolled into view, or require clicking a "Reviews" tab/anchor link separately from the main product description. If you read a page and don't see review text (even though a star rating and review count are shown near the top), don't conclude there are no reviews — check whether there's a "Reviews" tab/link to click, and if the page is long, scroll down toward where a review count was shown and re-read, since that section may only populate once it's in view. This is a common trap: an agent that reads only the top of the page and reports "no reviews shown" when reviews exist further down or behind a tab is giving a false negative.
45
+ - After getting the reviews section to actually load, read a real sample — not just the single top-featured/most-helpful review, which retailers sometimes curate. Skim across several individual reviews, and specifically look at a mix of high and low ratings to catch recurring complaints that a single glowing top review would hide.
46
+ - Look for *recurring* specific complaints or praise across multiple reviewers (e.g. several independent reviewers mentioning the same durability issue, or the same standout feature) rather than treating one person's review as representative.
47
+ - If a retailer's on-page reviews look thin, curated, or suspiciously uniform (all 5-star, generic phrasing, no verified-purchase indication), treat that as lower-confidence evidence and consider checking a second, independent source (a different retailer's listing for the same product, or a review-aggregation/comparison site) rather than relying solely on the first one seen.
48
+ - Report review sentiment honestly, including negatives — "mostly positive, but a recurring complaint about X" is more useful and more trustworthy than an uncritical "highly rated" gloss that ignores visible negative signal on the same page.
49
+
50
+ ## Handling pages that need extra interaction to show what you need
51
+ Beyond reviews specifically, several other common shopping-page patterns require action before the real content is visible:
52
+ - **"Show more" / "See all specs" buttons** that collapse full specifications by default — click through rather than reporting only the abbreviated spec list.
53
+ - **Variant selectors** (size, color, storage capacity) that change the displayed price/stock/images when selected — if the user cares about a specific variant, actually select it and re-read rather than reporting the default variant's price as if it applies to all.
54
+ - **Comparison tables** on some retailer sites that require selecting products into a "compare" tray before the table renders — worth doing if the user is choosing between options on the same site.
55
+ - **Pagination or "load more" on review lists** — if you want a broader review sample than the first page shows, page/load further rather than judging sentiment from only the first handful.
56
+ - After any of these interactions, re-read the page — refs and rendered content are stale the moment an interaction changes the DOM, same as any other browser-driven task.
57
+
58
+ ## Handling obstacles
59
+ - Bot checks, CAPTCHAs, or hard login walls on a retailer page: don't fight them — abandon that listing and check the same product on a different retailer.
60
+ - If a retailer's page is slow/JS-heavy and content (price, reviews) looks like it hasn't finished loading, wait briefly and re-check rather than reading a half-loaded page as final — same discipline as the research skill.
61
+ - If you genuinely can't get a real current price or working link for something after reasonable effort, say so plainly rather than presenting a stale or guessed price with unwarranted confidence.
62
+
63
+ ## What a finished shopping answer looks like
64
+ - At least 2–3 real, comparable options (unless the user asked about one specific item) with current prices and direct links to what you actually opened.
65
+ - Honest review sentiment for each, based on actually-read review content — including scrolling/clicking through to reach reviews that weren't visible on first load — not just a star-rating gloss.
66
+ - Clear tradeoffs stated between the options, not just a ranked list with no reasoning.
67
+ - Explicit notes on anything time-sensitive (a sale price, limited stock) so the user knows the information's shelf life.
68
+ `
69
+ });
70
+ export default ShoppingSkill;
71
+ //# sourceMappingURL=shopping.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shopping.js","sourceRoot":"","sources":["../../src/skills/shopping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC;IACzC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,y4BAAy4B;IACt5B,KAAK,EAAE;QACH,GAAG,YAAY,EAAE;QACjB,GAAG,SAAS,EAAE;KACjB;IACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDjB;CACA,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Skill from "../core/skill.js";
2
+ export declare const UiUxDesignSkill: () => Skill;
3
+ export default UiUxDesignSkill;
4
+ //# sourceMappingURL=ui-ux-design.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-ux-design.d.ts","sourceRoot":"","sources":["../../src/skills/ui-ux-design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAMrC,eAAO,MAAM,eAAe,aAgE1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -0,0 +1,70 @@
1
+ import Skill from "../core/skill.js";
2
+ import { FsTools, } from "../tools/fs/index.js";
3
+ import { UtilTools } from "../tools/utils/index.js";
4
+ export const UiUxDesignSkill = () => new Skill({
5
+ name: "ui-ux-design",
6
+ description: "Use this skill whenever building or modifying any user-facing UI — web pages, components, forms, dashboards, landing pages, mobile-web layouts — regardless of framework. Covers visual design quality (layout, spacing, typography, color, hierarchy), interaction design (feedback states, loading/empty/error states, affordances), accessibility, and responsive behavior. Trigger this alongside react-frontend (or any other frontend skill) for any real UI work, not just when the user explicitly asks for 'good design' — a functionally-working but visually generic or inaccessible UI is not production-ready. Also trigger when asked to review, critique, or improve the look/feel/usability of an existing interface.",
7
+ tools: [
8
+ ...FsTools(),
9
+ ...UtilTools()
10
+ ],
11
+ instructions: `
12
+ # UI/UX Design Skill
13
+
14
+ ## Purpose
15
+ A UI that "works" (renders, handles clicks, doesn't crash) is not the same as a UI that's actually good. This skill is the design-quality pass that happens alongside building the feature, not a separate polish step reserved for later. Generic, default-Bootstrap-looking, inaccessible, or state-incomplete UI is not a finished deliverable even if every button technically fires its handler.
16
+
17
+ ## Core rule
18
+ Never ship a UI as "done" if it only handles the happy path visually — no loading state, no empty state, no error state — or if it's built from unexamined framework defaults with no deliberate visual decisions made. A production UI has been through at least one real design decision on layout, hierarchy, and states; it wasn't just assembled from default component styles and called finished.
19
+
20
+ ## Visual hierarchy and layout
21
+ - Every screen needs one clear primary action/focus — not three equally-weighted buttons competing for attention. Decide what matters most on this screen and make it visually dominant (size, color, position); make secondary actions visually secondary.
22
+ - Use consistent spacing based on a scale (e.g. 4px/8px increments), not arbitrary one-off pixel values scattered across components — inconsistent spacing is one of the fastest ways a UI reads as "unpolished" even when nothing is technically broken.
23
+ - Group related elements with proximity and whitespace rather than borders/dividers for every separation — over-boxing everything reads as cluttered.
24
+ - Respect a consistent grid/alignment — misaligned edges across a page (a card 3px off from the one next to it) are visually cheap to fix and expensive to ignore.
25
+
26
+ ## Typography
27
+ - Limit to 2 typefaces (often just 1 with weight variation) and a deliberate type scale (e.g. 12/14/16/20/24/32px) rather than ad hoc font sizes chosen per-element.
28
+ - Body text needs sufficient line-height (typically 1.4–1.6x font size) and a comfortable measure (line length) — don't let text run edge-to-edge on wide containers; constrain max-width for readability.
29
+ - Don't rely on font size alone for hierarchy — weight, color, and spacing all contribute; a heading that's just "bigger" with the same weight and color as body text often isn't distinct enough.
30
+
31
+ ## Color and contrast
32
+ - Establish a small deliberate palette (primary, secondary/accent, neutral grays, semantic colors for success/warning/error) rather than picking colors ad hoc per component.
33
+ - Check text-to-background contrast meets at least WCAG AA (4.5:1 for normal text, 3:1 for large text) — don't ship light-gray-on-white body text or low-contrast placeholder-style text for actual content.
34
+ - Don't rely on color alone to convey meaning (e.g. red/green only for status) — pair with an icon, label, or pattern so the UI still communicates for colorblind users.
35
+
36
+ ## Interaction and feedback states
37
+ Every interactive element needs its full state set considered, not just the default appearance:
38
+ - **Hover/focus/active/disabled** states for buttons, links, and inputs — a button that looks identical whether it's clickable or disabled is a real usability bug.
39
+ - **Loading state** for anything async (data fetch, form submit) — never leave a screen visually static while something is happening in the background; use a spinner, skeleton, or disabled+labeled button ("Saving...") so the user knows work is in progress.
40
+ - **Empty state** for any list/table/dashboard that can have zero items — a blank white screen with no explanation is a dead end; show a message and, where relevant, a clear next action.
41
+ - **Error state** for anything that can fail (failed fetch, failed validation, failed submit) — surface a specific, human-readable message near the relevant field/section, not just a console error or a generic toast with no detail.
42
+ - Form validation errors should appear near the field they concern and describe what's wrong and how to fix it ("Email must include an @") rather than a generic "Invalid input."
43
+
44
+ ## Accessibility (non-negotiable baseline)
45
+ - All interactive elements must be reachable and operable via keyboard alone (tab order, enter/space to activate) — don't build click-only interactions with a \`div\` + \`onClick\` where a real \`button\`/\`a\` element would give this for free.
46
+ - Use semantic HTML elements (\`button\`, \`nav\`, \`header\`, \`main\`, \`label\`) over generic \`div\`/\`span\` with visual-only styling — screen readers depend on semantics, not appearance.
47
+ - Every form input needs an associated \`label\` (via \`htmlFor\`/\`id\` or wrapping) — a placeholder is not a label and disappears on focus.
48
+ - Every meaningful image needs alt text; purely decorative images should have empty alt (\`alt=""\`) so screen readers skip them rather than reading a filename.
49
+ - Don't trap focus or remove visible focus outlines (\`outline: none\`) without providing a clear visible alternative focus style — keyboard users need to see where they are.
50
+
51
+ ## Responsive behavior
52
+ - Design/verify at minimum three widths: mobile (~375px), tablet (~768px), desktop (~1280px+) — don't build and check only at one viewport and assume the rest follows.
53
+ - Avoid fixed pixel widths on containers that should flex; use relative units and flexible layouts (flexbox/grid) so content reflows rather than overflowing or clipping at smaller widths.
54
+ - Touch targets on mobile-facing UI need adequate size (roughly 44x44px minimum) — don't shrink tappable controls to fit more on screen.
55
+
56
+ ## Avoiding "generic AI-generated UI" look
57
+ - Don't default to purple-gradient-on-white with a centered card and a drop shadow on everything — that's a recognizable unexamined default, not a design decision. Make at least one deliberate, specific visual choice appropriate to the actual product/brand context rather than reaching for the first framework default.
58
+ - Vary visual weight deliberately rather than making every card/section the same size, padding, and shadow — sameness across a page reads as templated.
59
+ - If the user hasn't specified a visual direction, pick one (a specific mood/tone — minimal, playful, editorial, dense-data, etc.) and apply it consistently rather than landing in an undirected middle.
60
+
61
+ ## Verifying the design actually holds up
62
+ Writing the CSS/markup is not the job — confirming it renders and behaves as intended is:
63
+ 1. Actually view the rendered result (screenshot, browser tool, or dev server) rather than judging by reading JSX/CSS alone — layout bugs are often invisible in source and obvious on screen.
64
+ 2. Check it at multiple viewport widths, not just the one the dev tools happened to default to.
65
+ 3. Tab through interactive elements to confirm keyboard operability and visible focus states actually work, not just that they're coded.
66
+ 4. Trigger the loading/empty/error states deliberately (e.g. throttle network, submit invalid input, clear a list) to confirm they render as intended rather than assuming the conditional logic is correct from reading it.
67
+ `
68
+ });
69
+ export default UiUxDesignSkill;
70
+ //# sourceMappingURL=ui-ux-design.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-ux-design.js","sourceRoot":"","sources":["../../src/skills/ui-ux-design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,EACH,OAAO,GACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC;IAC3C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,usBAAusB;IACptB,KAAK,EAAE;QACH,GAAG,OAAO,EAAE;QACZ,GAAG,SAAS,EAAE;KACjB;IACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDjB;CACA,CAAC,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import Skill from "../core/skill.js";
2
+ export declare const WebEndToEndTestSkill: () => Skill;
3
+ export default WebEndToEndTestSkill;
4
+ //# sourceMappingURL=web-end-to-end-test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-end-to-end-test.d.ts","sourceRoot":"","sources":["../../src/skills/web-end-to-end-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,kBAAkB,CAAC;AAKrC,eAAO,MAAM,oBAAoB,aAsE/B,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,76 @@
1
+ import Skill from "../core/skill.js";
2
+ import { BrowserTools } from "../tools/browser/index.js";
3
+ import { UtilTools } from "../tools/utils/index.js";
4
+ export const WebEndToEndTestSkill = () => new Skill({
5
+ name: "web-end-to-end-test",
6
+ description: "Use this skill whenever the user asks to test, check, verify, QA, or confirm that a website or web application actually works — a login flow, a form, a checkout, a button, a newly built feature, a bug fix, or any user-facing behavior on a live or locally-running web app. Also use this proactively right after building or changing a frontend or full-stack feature, before calling it done — not just when explicitly asked to test. Drives a real headless browser to act like an actual user: fills forms, clicks buttons, navigates, and then verifies the real outcome via the rendered page, console errors, and network requests/responses — never by reading source code and assuming it works. Covers both the UI layer (does it render/click/navigate correctly) and the API layer it talks to (does the backend actually receive the right request and respond correctly) — trigger this for full-stack verification, not just visual checks. Trigger this any time \"does it work\", \"test this\", or \"make sure X happens when Y\" applies to a running web app rather than to static code review.",
7
+ tools: [
8
+ ...BrowserTools(),
9
+ ...UtilTools()
10
+ ],
11
+ instructions: `
12
+ # Web End-to-End Test Skill
13
+
14
+ ## Before you start: know what "pass" means
15
+ Before touching the browser, be explicit (to yourself, and to the user if it's ambiguous) about what you're testing and what a pass looks like. "Test the login form" is vague — pin it down: "submitting valid credentials navigates to /dashboard and shows the user's name; submitting invalid credentials shows an error message and stays on /login." Vague test goals produce vague, unreliable verdicts. If the ask is genuinely ambiguous about scope (one flow vs. the whole app) or environment (which URL/port), ask before starting rather than guessing.
16
+
17
+ This skill pairs with code-verification (typecheck/build/lint clean before you even open a browser) — don't use browser-driven testing as a substitute for a basic static check; use both. code-verification catches "doesn't compile"; this skill catches "compiles but doesn't actually behave correctly."
18
+
19
+ ## Core loop
20
+ 1. **Open a session** at the app's URL and keep its session id for the whole test.
21
+ 2. **Read the page** to get an outline of the UI with reference ids for every element you'll need to interact with. You act only on refs you actually read — never guess a selector.
22
+ 3. **Drive the interaction exactly like a real user would**: fill fields, click buttons and links, submit forms. For a form with no visible submit button, submit it the way a real user still could — via enter-to-submit on a field, or a direct form submission.
23
+ 4. **Re-read after every state-changing action.** Never assume a click worked. Take a fresh read and inspect the new state — refs from before the action are stale the instant the DOM changes, so don't reuse them.
24
+ 5. **Assert on real evidence, not assumptions** — see below.
25
+ 6. **Report a clear verdict per scenario**: pass or fail, with the concrete evidence observed (what the page showed, what console/network showed) — never just "it seems to work."
26
+
27
+ ## Workflow order: real functionality first, then stop and offer more
28
+ When this skill runs at the end of building or changing a feature, test in this order and don't skip ahead:
29
+ 1. **First, verify the real, intended functionality actually works** — the happy path a genuine user would take, end to end, with valid realistic input. This is the test that matters most and is never optional.
30
+ 2. **Once the real functionality is confirmed working, stop iterating and report.** Give the user a clear pass/fail verdict on what they asked you to build, with the evidence observed.
31
+ 3. **Then separately offer, don't just do, further testing**: tell the user something like "if you want, I can also test some invalid-input/edge-case and basic security handling on the frontend." Don't launch into a long negative-testing pass unprompted — it burns time and tool calls the user may not want yet, and premature edge-case failures can distract from confirming the actual feature works at all.
32
+ 4. **Only run negative/edge-case/security testing after the user says yes** (or if they asked for it as part of the original request up front). When they do confirm, keep it to basic, frontend-facing checks — this is not a substitute for a dedicated security audit (see backend-security for that).
33
+
34
+ ## What counts as evidence
35
+ Never conclude "it works" just because an action didn't visibly error. Confirm the actual expected outcome:
36
+ - **Visible outcome**: re-read the page and check the outline genuinely shows what should be there — a success message, the new URL's content, a newly-rendered element, an item now present in a list.
37
+ - **Console output**: check for logged JS errors a user wouldn't see but that indicate something broke silently. An action that "completes" but throws a console error afterward is not a pass.
38
+ - **Network activity**: for anything that should hit an API (form submit, add-to-cart, save), confirm the request was actually sent and that the response status/body match what's expected. A button that looks like it worked but never called the API is a classic silent failure this catches.
39
+ - **Load state**: before asserting on a page's content, make sure the page has actually finished loading and isn't still mid-request — especially on JS-heavy apps where content renders asynchronously after navigation. If it's still loading, wait briefly and recheck rather than reading too early.
40
+
41
+ ## Timing: don't mistake "not rendered yet" for "broken"
42
+ This is the single most common false-positive in this skill: reading the page immediately after an action, seeing no error message and no success message either, and concluding the app is broken — when the truth is the request/response/re-render simply hadn't landed yet. Before you report any failure that looks like "expected error/success message never appeared" or "the app just sat there and did nothing", stop and rule out timing first:
43
+ 1. **Check network status before trusting a "nothing happened" read.** If browser-network-status still reports \`loading\`, or you never explicitly checked it, that's not evidence of a bug — it's evidence you read too early. Wait briefly and re-read before drawing any conclusion.
44
+ 2. **Never read exactly once and decide.** If the first re-read after an action shows no visible change, wait a short beat and read again (once, maybe twice) before concluding anything is wrong. A single immediate read that finds nothing is not a failed assertion — it's an incomplete one.
45
+ 3. **Don't overcorrect into a stall either.** This cuts both ways: don't loop indefinitely re-reading the same page hoping something eventually appears. A couple of short, deliberate re-checks (confirming network is idle, then reading) is enough — if the expected outcome still isn't there after that, check console and network activity for the real cause (see "Investigating a failure" below) instead of continuing to poll blindly.
46
+ 4. **When in doubt about whether "no error appeared" means pass or means "too early", check the concrete signal, not the absence of one.** "The error message isn't on the page" only means the app is broken if you've also confirmed the request actually completed (network idle, response received) and the render had a chance to happen. If either of those hasn't happened yet, that's the actual reason nothing showed up — go verify it, don't guess.
47
+ 5. **Same logic applies to slow-appearing errors on invalid input.** A validation error that renders after the request round-trip completes is not "the error didn't appear" if you checked before the round-trip finished — confirm network idle first, then check for the message.
48
+
49
+ ## Backend/API-layer verification (not just the UI)
50
+ A UI test that only checks "did the page show a success message" can miss a backend that silently no-oped, wrote the wrong data, or returned a misleading status. When the flow under test involves a real backend, verify both sides:
51
+ - **Confirm the actual request sent**, not just that one was sent — check the network activity for method, endpoint, and payload, and sanity-check the payload matches what the form/action should have produced (right field names, right values, not sending stale/empty data).
52
+ - **Confirm the actual response**, not just "no error was thrown" — check the status code is what's expected (200/201 for success, proper 4xx for a deliberately invalid submission — not a 200 with an error buried in the body, unless that's genuinely the API's documented contract) and that the response body contains what the UI then rendered, rather than assuming the UI's display is an accurate reflection of what the server actually returned.
53
+ - **Where feasible, verify server-side state directly** rather than only trusting the UI's re-render as proof — e.g. if there's an accessible way to query the backend/DB state directly (an admin endpoint, a status API, a way to run a query via bash-run against a local dev DB), confirm the write actually persisted rather than inferring it purely from the client re-rendering an optimistic update that hasn't actually been confirmed by the server.
54
+ - **Test the API's error handling directly, not just via the UI**: if the environment allows issuing a raw request (e.g. \`curl\` via bash-run, or a direct fetch from the browser tools) with a deliberately malformed/unauthorized payload, do so, and confirm the backend rejects it correctly — a UI that happens to only ever send valid data can mask a backend that has no real server-side validation at all (see backend-security for what proper validation looks like).
55
+ - If the frontend and backend are both something you built in this session, don't let a clean-looking UI substitute for confirming the backend actually did the right thing — the UI can be wrong about what happened, especially if it optimistically updates before the server confirms.
56
+
57
+ ## Negative / edge case testing (only after confirming real functionality, and only if the user wants it)
58
+ Don't test only the happy path when this step is in scope. For any input field, try: empty submission, obviously invalid input (bad email format, out-of-range number), and boundary values — then confirm the app's error handling actually surfaces a message to the user (check the re-read outline for an error string) rather than silently failing or crashing (check console for a thrown error). Where a backend is involved, also confirm the *server* rejected the invalid input (see above) rather than only checking that the frontend's own client-side validation caught it — client-side-only validation that passes this test but has no server-side counterpart is a real gap to flag, not a pass.
59
+
60
+ ## Investigating a failure
61
+ When something doesn't behave as expected:
62
+ 1. Re-read the page to see the actual current state.
63
+ 2. Check console output for a thrown error explaining what happened.
64
+ 3. Check network activity to see if a request was even sent, and if so, whether the server returned an error status or unexpected body.
65
+ 4. If the backend is available to inspect directly (logs, a local dev server's own console output via bash-logs), check there too — a frontend-only investigation can miss that the real failure was a server-side exception that got swallowed into a generic error response.
66
+ 5. Inspect page internals directly only as a last resort, for something the outline genuinely can't show (e.g. a specific JS variable's value) — don't use this to drive the test itself, since that stops testing the real user-facing UI.
67
+ Report the root cause found, not just "the test failed."
68
+
69
+ ## Hygiene
70
+ - Use one session per logical test flow so navigation/interaction history stays coherent. Open a fresh session for an unrelated flow (e.g. testing signup vs. testing checkout as an already-logged-in user) so state from one doesn't leak into the other.
71
+ - Always close a session once its test flow is complete.
72
+ - If you started a backend dev server specifically to run this test (rather than testing against something already running), stop it once verification is complete, consistent with node-backend's/react-frontend's own process hygiene — don't leave test-only processes running indefinitely.
73
+ `
74
+ });
75
+ export default WebEndToEndTestSkill;
76
+ //# sourceMappingURL=web-end-to-end-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-end-to-end-test.js","sourceRoot":"","sources":["../../src/skills/web-end-to-end-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC;IAChD,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,2jCAA2jC;IACxkC,KAAK,EAAE;QACH,GAAG,YAAY,EAAE;QACjB,GAAG,SAAS,EAAE;KACjB;IACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DjB;CACA,CAAC,CAAC;AAEH,eAAe,oBAAoB,CAAC"}
@@ -6,7 +6,7 @@ import type Skill from "../core/skill.js";
6
6
  export declare class SimpleAgent extends BaseAgent {
7
7
  constructor({ aiProvider, instruction, tools, skills, maxMemorizeToken, initData }: {
8
8
  instruction: string;
9
- tools: MCPTool[];
9
+ tools?: MCPTool<any>[];
10
10
  aiProvider: AIProvider;
11
11
  skills?: Skill[];
12
12
  maxMemorizeToken?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"simple.d.ts","sourceRoot":"","sources":["../../src/templates/simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBA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B,EAChB,KAAU,EACV,MAAW,EACX,gBAAwB,EACxB,QAUC,EACJ,EAAE;QACC,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,UAAU,EAAE,UAAU,CAAC;QACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;QACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,EAAE;YACP,MAAM,EAAE,MAAM,CAAC;YACf,YAAY,EAAE,OAAO,EAAE,CAAC;YACxB,mBAAmB,EAAE,MAAM,CAAC;YAC5B,kBAAkB,EAAE,MAAM,CAAC;YAC3B,gBAAgB,EAAE,MAAM,CAAC;YACzB,eAAe,EAAE,OAAO,EAAE,CAAC;YAC3B,sBAAsB,EAAE,MAAM,CAAC;YAC/B,qBAAqB,EAAE,MAAM,CAAC;YAC9B,mBAAmB,EAAE,MAAM,CAAC;SAC/B,CAAA;KACJ;CAsBJ;AAED,eAAe,WAAW,CAAC"}
@@ -19,6 +19,10 @@ export class SimpleAgent extends BaseAgent {
19
19
  tools.forEach(tool => {
20
20
  mcpServer.registerTool(tool);
21
21
  });
22
+ [...new Set(skills.flatMap(s => s.getSkill().tools))].filter(t => !tools.includes(t)).forEach(tool => {
23
+ mcpServer.registerTool(tool);
24
+ tools.push(tool);
25
+ });
22
26
  const mcpClient = new MCPClient("DEFAULT_ENV", conn);
23
27
  super({
24
28
  aiProvider,
@@ -1 +1 @@
1
- {"version":3,"file":"simple.js","sourceRoot":"","sources":["../../src/templates/simple.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAG9C,MAAM,OAAO,WAAY,SAAQ,SAAS;IACtC,YAAY,EACR,UAAU,EACV,WAAW,GAAG,E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QACV,YAAY,EAAE,EAAE;QAChB,mBAAmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,CAAC;QACrB,gBAAgB,EAAE,CAAC;QACnB,eAAe,EAAE,EAAE;QACnB,sBAAsB,EAAE,CAAC;QACzB,qBAAqB,EAAE,CAAC;QACxB,mBAAmB,EAAE,CAAC;KACzB,EAkBJ;QACG,MAAM,IAAI,GAAG,IAAI,aAAa,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACjB,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YACjG,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;QACrD,KAAK,CAAC;YACF,UAAU;YACV,WAAW;YACX,SAAS;YACT,YAAY,EAAE,KAAK;YACnB,MAAM;YACN,gBAAgB;YAChB,QAAQ;SACX,CAAC,CAAC;IACP,CAAC;CACJ;AAED,eAAe,WAAW,CAAC"}
@@ -1,55 +1,3 @@
1
- import { describe, test } from "node:test";
2
- import assert from "node:assert/strict";
3
- import os from "os";
4
- import MCPIPCConnection from "../core/mcp-ipc-connection.js";
5
- import MCPServer from "../core/mcp-server.js";
6
- import MCPClient from "../core/mcp-client.js";
7
- import { GetCurrentTimeTool } from "../tools/utils/index.js";
8
- import { FetchTool, WebSearchTool } from "../tools/www/index.js";
9
- describe("MCP Client and Server", async () => {
10
- const path1 = os.platform() == "win32" ? `\\\\.\\pipe\\test${Math.random() * 1000}` : `/tmp/mcp_test${Math.random() * 1000}.sock`;
11
- const path2 = os.platform() == "win32" ? `\\\\.\\pipe\\test${Math.random() * 1000}` : `/tmp/mcp_test${Math.random() * 1000}.sock`;
12
- const ipcConnection11 = new MCPIPCConnection(path1);
13
- const ipcConnection21 = new MCPIPCConnection(path2);
14
- const ipcConnection12 = new MCPIPCConnection(path1);
15
- const ipcConnection22 = new MCPIPCConnection(path2);
16
- let mcpServer1;
17
- let mcpServer2;
18
- let mcpClient;
19
- await test("should connect MCP Client to Servers and get empty tools", async () => {
20
- mcpServer1 = new MCPServer(ipcConnection11);
21
- mcpServer2 = new MCPServer(ipcConnection21);
22
- mcpClient = new MCPClient("DEFAULT_ENV", [ipcConnection12, ipcConnection22]);
23
- const result = await mcpClient.getTools();
24
- assert.equal(result.length, 0);
25
- });
26
- await test("should register tool on client side", async () => {
27
- mcpClient.registerTool(GetCurrentTimeTool);
28
- const result = await mcpClient.getTools();
29
- assert.equal(result.length, 1);
30
- });
31
- await test("should register tool on server1 side", async () => {
32
- mcpServer1.registerTool(FetchTool);
33
- const result = await mcpClient.getTools();
34
- assert.equal(result.length, 2);
35
- });
36
- await test("should register tool on server2 side", async () => {
37
- mcpServer2.registerTool(WebSearchTool);
38
- const result = await mcpClient.getTools();
39
- assert.equal(result.length, 3);
40
- });
41
- await test("should call tool on client side", async () => {
42
- const result = await mcpClient.callTool(GetCurrentTimeTool.getOptions().name, {});
43
- assert.ok(typeof result == "string");
44
- });
45
- await test("should call tool on server1 side", async () => {
46
- const result = await mcpClient.callTool(FetchTool.getOptions().name, { url: "https://google.com" });
47
- assert.ok(typeof result == "string");
48
- });
49
- await test("should call tool on server2 side", async () => {
50
- const result = await mcpClient.callTool(WebSearchTool.getOptions().name, { query: "test" });
51
- assert.ok(typeof result == "string");
52
- });
53
- // Need Close Connections
54
- });
1
+ export {};
2
+ // TODO need to write new TEST files later
55
3
  //# sourceMappingURL=mcp.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mcp.test.js","sourceRoot":"","sources":["../../src/tests/mcp.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEjE,QAAQ,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;IACzC,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC;IAClI,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,gBAAgB,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC;IAElI,MAAM,eAAe,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,eAAe,GAAG,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEpD,MAAM,eAAe,GAAG,IAAI,gBAAgB,CAAC,KA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,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;QAE1C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;QACrD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAElF,MAAM,CAAC,EAAE,CAAC,OAAO,MAAM,IAAI,QAAQ,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC,CAAC;QAEpG,MAAM,CAAC,EAAE,CAAC,OAAO,MAAM,IAAI,QAAQ,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAE5F,MAAM,CAAC,EAAE,CAAC,OAAO,MAAM,IAAI,QAAQ,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAGH,yBAAyB;AAC7B,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"mcp.test.js","sourceRoot":"","sources":["../../src/tests/mcp.test.ts"],"names":[],"mappings":";AAAA,0CAA0C"}
@@ -0,0 +1,10 @@
1
+ export { BashRunTool } from "./run.js";
2
+ export { BashWaitTool } from "./wait.js";
3
+ export { BashLogsTool } from "./logs.js";
4
+ export { BashListTool } from "./list.js";
5
+ export { BashWriteInputTool } from "./write-input.js";
6
+ export { BashTerminateTool } from "./terminate.js";
7
+ export { BashInteraction } from "./interaction.js";
8
+ export type { BashEvent } from "./interaction.js";
9
+ export declare const BashTools: () => (import("../../index.js").MCPTool<undefined> | import("../../index.js").MCPTool<import("./interaction.js").BashInteraction>)[];
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/bash/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAWlD,eAAO,MAAM,SAAS,sIAOrB,CAAC"}
@@ -0,0 +1,22 @@
1
+ export { BashRunTool } from "./run.js";
2
+ export { BashWaitTool } from "./wait.js";
3
+ export { BashLogsTool } from "./logs.js";
4
+ export { BashListTool } from "./list.js";
5
+ export { BashWriteInputTool } from "./write-input.js";
6
+ export { BashTerminateTool } from "./terminate.js";
7
+ export { BashInteraction } from "./interaction.js";
8
+ import { BashRunTool } from "./run.js";
9
+ import { BashWaitTool } from "./wait.js";
10
+ import { BashLogsTool } from "./logs.js";
11
+ import { BashListTool } from "./list.js";
12
+ import { BashWriteInputTool } from "./write-input.js";
13
+ import { BashTerminateTool } from "./terminate.js";
14
+ export const BashTools = () => [
15
+ BashRunTool(),
16
+ BashWaitTool(),
17
+ BashLogsTool(),
18
+ BashListTool(),
19
+ BashWriteInputTool(),
20
+ BashTerminateTool()
21
+ ];
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/bash/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAInD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGnD,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC;IAC3B,WAAW,EAAE;IACb,YAAY,EAAE;IACd,YAAY,EAAE;IACd,YAAY,EAAE;IACd,kBAAkB,EAAE;IACpB,iBAAiB,EAAE;CACtB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { MCPCustomClass } from "../../core/mcp.js";
2
+ export type BashEvent = {
3
+ type: "process-started";
4
+ processId: string;
5
+ command: string;
6
+ } | {
7
+ type: "waiting";
8
+ processId: string;
9
+ } | {
10
+ type: "input-sent";
11
+ processId: string;
12
+ } | {
13
+ type: "terminated";
14
+ processId: string;
15
+ } | {
16
+ type: "process-exited";
17
+ processId: string;
18
+ exitCode: number | null;
19
+ };
20
+ /**
21
+ * Shared custom interaction class for all bash tools. A frontend can listen
22
+ * on getEvents() to reflect live process activity (e.g. "Running npm run
23
+ * dev...", "Waiting for build to finish...") without polling.
24
+ */
25
+ export declare class BashInteraction extends MCPCustomClass {
26
+ emitBashEvent(event: BashEvent): void;
27
+ }
28
+ export default BashInteraction;
29
+ //# sourceMappingURL=interaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["../../../src/tools/bash/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,SAAS,GACf;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACtC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE7E;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IAC/C,aAAa,CAAC,KAAK,EAAE,SAAS;CAGjC;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { MCPCustomClass } from "../../core/mcp.js";
2
+ /**
3
+ * Shared custom interaction class for all bash tools. A frontend can listen
4
+ * on getEvents() to reflect live process activity (e.g. "Running npm run
5
+ * dev...", "Waiting for build to finish...") without polling.
6
+ */
7
+ export class BashInteraction extends MCPCustomClass {
8
+ emitBashEvent(event) {
9
+ this.getEvents().emit("bash", event);
10
+ }
11
+ }
12
+ export default BashInteraction;
13
+ //# sourceMappingURL=interaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction.js","sourceRoot":"","sources":["../../../src/tools/bash/interaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AASnD;;;;GAIG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAC/C,aAAa,CAAC,KAAgB;QAC1B,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;CACJ;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { MCPTool } from "../../core/mcp.js";
2
+ export declare const BashListTool: () => MCPTool<undefined>;
3
+ export default BashListTool;
4
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/tools/bash/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,mBAAmB,CAAC;AAGtD,eAAO,MAAM,YAAY,0BAmBvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { MCPTool } from "../../core/mcp.js";
2
+ import { listProcesses } from "./process-manager.js";
3
+ export const BashListTool = () => new MCPTool({
4
+ name: "bash-list",
5
+ description: "list every bash process launched so far (running or finished) with its status, so a still-running one can be checked on or terminated",
6
+ inputs: [],
7
+ execute: async (_envID, _inputs, _mcp) => {
8
+ const processes = listProcesses().map((p) => ({
9
+ processId: p.id,
10
+ command: p.command,
11
+ cwd: p.cwd,
12
+ status: p.status,
13
+ exitCode: p.exitCode,
14
+ startedAt: p.startedAt,
15
+ endedAt: p.endedAt,
16
+ }));
17
+ return {
18
+ processes,
19
+ };
20
+ },
21
+ });
22
+ export default BashListTool;
23
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/tools/bash/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,OAAO,CAAC;IAC1C,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,uIAAuI;IACpJ,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,KAAK,EAAE,MAAc,EAAE,OAA4B,EAAE,IAAU,EAAgB,EAAE;QACtF,MAAM,SAAS,GAAG,aAAa,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC1C,SAAS,EAAE,CAAC,CAAC,EAAE;YACf,OAAO,EAAE,CAAC,CAAC,OAAO;YAClB,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,MAAM,EAAE,CAAC,CAAC,MAAM;YAChB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS;YACtB,OAAO,EAAE,CAAC,CAAC,OAAO;SACrB,CAAC,CAAC,CAAC;QAEJ,OAAO;YACH,SAAS;SACZ,CAAC;IACN,CAAC;CACJ,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { MCPTool } from "../../core/mcp.js";
2
+ export declare const BashLogsTool: () => MCPTool<undefined>;
3
+ export default BashLogsTool;
4
+ //# sourceMappingURL=logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/tools/bash/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,mBAAmB,CAAC;AAGtD,eAAO,MAAM,YAAY,0BA8CvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { MCPTool } from "../../core/mcp.js";
2
+ import { getProcess } from "./process-manager.js";
3
+ export const BashLogsTool = () => new MCPTool({
4
+ name: "bash-logs",
5
+ description: "read a process's combined stdout/stderr log, paging through it by line (use offsetLine/limitLine for long logs instead of tailLines from bash-run/bash-wait)",
6
+ inputs: [
7
+ {
8
+ name: "processId",
9
+ type: "string",
10
+ description: "id of the process to read logs from",
11
+ required: true,
12
+ },
13
+ {
14
+ name: "offsetLine",
15
+ type: "number",
16
+ description: "line offset to start reading from",
17
+ required: false,
18
+ default: 0,
19
+ },
20
+ {
21
+ name: "limitLine",
22
+ type: "number",
23
+ description: "max number of lines to return",
24
+ required: false,
25
+ default: 200,
26
+ },
27
+ ],
28
+ execute: async (_envID, inputs, _mcp) => {
29
+ const { processId, offsetLine = 0, limitLine = 200 } = inputs;
30
+ if (!processId || typeof processId !== "string") {
31
+ throw new Error("processId must be a non-empty string");
32
+ }
33
+ const proc = getProcess(processId);
34
+ const lines = proc.getAllLines();
35
+ const totalLines = lines.length;
36
+ const start = Math.max(0, Math.min(offsetLine, totalLines));
37
+ const end = Math.max(start, Math.min(start + limitLine, totalLines));
38
+ return {
39
+ content: lines.slice(start, end).join("\n"),
40
+ totalLines,
41
+ status: proc.status,
42
+ exitCode: proc.exitCode,
43
+ };
44
+ },
45
+ });
46
+ export default BashLogsTool;
47
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../src/tools/bash/logs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,IAAI,OAAO,CAAC;IAC1C,IAAI,EAAE,WAAW;IACjB,WAAW,EACP,8JAA8J;IAClK,MAAM,EAAE;QACJ;YACI,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd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