@accomplish_ai/agent-core 0.0.0-pr-353-20260205225158

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 (539) hide show
  1. package/LICENSE +21 -0
  2. package/dist/browser/detection.d.ts +4 -0
  3. package/dist/browser/detection.d.ts.map +1 -0
  4. package/dist/browser/detection.js +43 -0
  5. package/dist/browser/detection.js.map +1 -0
  6. package/dist/browser/index.d.ts +3 -0
  7. package/dist/browser/index.d.ts.map +1 -0
  8. package/dist/browser/index.js +3 -0
  9. package/dist/browser/index.js.map +1 -0
  10. package/dist/browser/server.d.ts +19 -0
  11. package/dist/browser/server.d.ts.map +1 -0
  12. package/dist/browser/server.js +204 -0
  13. package/dist/browser/server.js.map +1 -0
  14. package/dist/common/constants/model-display.d.ts +7 -0
  15. package/dist/common/constants/model-display.d.ts.map +1 -0
  16. package/dist/common/constants/model-display.js +105 -0
  17. package/dist/common/constants/model-display.js.map +1 -0
  18. package/dist/common/constants.d.ts +12 -0
  19. package/dist/common/constants.d.ts.map +1 -0
  20. package/dist/common/constants.js +13 -0
  21. package/dist/common/constants.js.map +1 -0
  22. package/dist/common/index.d.ts +21 -0
  23. package/dist/common/index.d.ts.map +1 -0
  24. package/dist/common/index.js +15 -0
  25. package/dist/common/index.js.map +1 -0
  26. package/dist/common/schemas/index.d.ts +2 -0
  27. package/dist/common/schemas/index.d.ts.map +1 -0
  28. package/dist/common/schemas/index.js +2 -0
  29. package/dist/common/schemas/index.js.map +1 -0
  30. package/dist/common/schemas/validation.d.ts +69 -0
  31. package/dist/common/schemas/validation.d.ts.map +1 -0
  32. package/dist/common/schemas/validation.js +34 -0
  33. package/dist/common/schemas/validation.js.map +1 -0
  34. package/dist/common/types/auth.d.ts +28 -0
  35. package/dist/common/types/auth.d.ts.map +1 -0
  36. package/dist/common/types/auth.js +2 -0
  37. package/dist/common/types/auth.js.map +1 -0
  38. package/dist/common/types/index.d.ts +11 -0
  39. package/dist/common/types/index.d.ts.map +1 -0
  40. package/dist/common/types/index.js +11 -0
  41. package/dist/common/types/index.js.map +1 -0
  42. package/dist/common/types/logging.d.ts +15 -0
  43. package/dist/common/types/logging.d.ts.map +1 -0
  44. package/dist/common/types/logging.js +5 -0
  45. package/dist/common/types/logging.js.map +1 -0
  46. package/dist/common/types/opencode.d.ts +108 -0
  47. package/dist/common/types/opencode.d.ts.map +1 -0
  48. package/dist/common/types/opencode.js +2 -0
  49. package/dist/common/types/opencode.js.map +1 -0
  50. package/dist/common/types/permission.d.ts +35 -0
  51. package/dist/common/types/permission.d.ts.map +1 -0
  52. package/dist/common/types/permission.js +4 -0
  53. package/dist/common/types/permission.js.map +1 -0
  54. package/dist/common/types/provider.d.ts +83 -0
  55. package/dist/common/types/provider.d.ts.map +1 -0
  56. package/dist/common/types/provider.js +305 -0
  57. package/dist/common/types/provider.js.map +1 -0
  58. package/dist/common/types/providerSettings.d.ts +89 -0
  59. package/dist/common/types/providerSettings.d.ts.map +1 -0
  60. package/dist/common/types/providerSettings.js +63 -0
  61. package/dist/common/types/providerSettings.js.map +1 -0
  62. package/dist/common/types/skills.d.ts +22 -0
  63. package/dist/common/types/skills.d.ts.map +1 -0
  64. package/dist/common/types/skills.js +2 -0
  65. package/dist/common/types/skills.js.map +1 -0
  66. package/dist/common/types/task.d.ts +70 -0
  67. package/dist/common/types/task.d.ts.map +1 -0
  68. package/dist/common/types/task.js +14 -0
  69. package/dist/common/types/task.js.map +1 -0
  70. package/dist/common/types/thought-stream.d.ts +21 -0
  71. package/dist/common/types/thought-stream.d.ts.map +1 -0
  72. package/dist/common/types/thought-stream.js +6 -0
  73. package/dist/common/types/thought-stream.js.map +1 -0
  74. package/dist/common/types/todo.d.ts +7 -0
  75. package/dist/common/types/todo.d.ts.map +1 -0
  76. package/dist/common/types/todo.js +2 -0
  77. package/dist/common/types/todo.js.map +1 -0
  78. package/dist/common/utils/id.d.ts +7 -0
  79. package/dist/common/utils/id.d.ts.map +1 -0
  80. package/dist/common/utils/id.js +20 -0
  81. package/dist/common/utils/id.js.map +1 -0
  82. package/dist/common/utils/index.d.ts +4 -0
  83. package/dist/common/utils/index.d.ts.map +1 -0
  84. package/dist/common/utils/index.js +4 -0
  85. package/dist/common/utils/index.js.map +1 -0
  86. package/dist/common/utils/log-source-detector.d.ts +9 -0
  87. package/dist/common/utils/log-source-detector.d.ts.map +1 -0
  88. package/dist/common/utils/log-source-detector.js +22 -0
  89. package/dist/common/utils/log-source-detector.js.map +1 -0
  90. package/dist/common/utils/waiting-detection.d.ts +7 -0
  91. package/dist/common/utils/waiting-detection.d.ts.map +1 -0
  92. package/dist/common/utils/waiting-detection.js +62 -0
  93. package/dist/common/utils/waiting-detection.js.map +1 -0
  94. package/dist/common.d.ts +21 -0
  95. package/dist/common.d.ts.map +1 -0
  96. package/dist/common.js +20 -0
  97. package/dist/common.js.map +1 -0
  98. package/dist/factories/index.d.ts +8 -0
  99. package/dist/factories/index.d.ts.map +1 -0
  100. package/dist/factories/index.js +8 -0
  101. package/dist/factories/index.js.map +1 -0
  102. package/dist/factories/log-writer.d.ts +3 -0
  103. package/dist/factories/log-writer.d.ts.map +1 -0
  104. package/dist/factories/log-writer.js +45 -0
  105. package/dist/factories/log-writer.js.map +1 -0
  106. package/dist/factories/permission-handler.d.ts +3 -0
  107. package/dist/factories/permission-handler.d.ts.map +1 -0
  108. package/dist/factories/permission-handler.js +6 -0
  109. package/dist/factories/permission-handler.js.map +1 -0
  110. package/dist/factories/skills-manager.d.ts +3 -0
  111. package/dist/factories/skills-manager.d.ts.map +1 -0
  112. package/dist/factories/skills-manager.js +10 -0
  113. package/dist/factories/skills-manager.js.map +1 -0
  114. package/dist/factories/speech.d.ts +3 -0
  115. package/dist/factories/speech.d.ts.map +1 -0
  116. package/dist/factories/speech.js +6 -0
  117. package/dist/factories/speech.js.map +1 -0
  118. package/dist/factories/storage.d.ts +4 -0
  119. package/dist/factories/storage.d.ts.map +1 -0
  120. package/dist/factories/storage.js +192 -0
  121. package/dist/factories/storage.js.map +1 -0
  122. package/dist/factories/task-manager.d.ts +4 -0
  123. package/dist/factories/task-manager.d.ts.map +1 -0
  124. package/dist/factories/task-manager.js +61 -0
  125. package/dist/factories/task-manager.js.map +1 -0
  126. package/dist/factories/thought-stream.d.ts +3 -0
  127. package/dist/factories/thought-stream.d.ts.map +1 -0
  128. package/dist/factories/thought-stream.js +6 -0
  129. package/dist/factories/thought-stream.js.map +1 -0
  130. package/dist/index.d.ts +66 -0
  131. package/dist/index.d.ts.map +1 -0
  132. package/dist/index.js +46 -0
  133. package/dist/index.js.map +1 -0
  134. package/dist/internal/classes/CompletionEnforcer.d.ts +27 -0
  135. package/dist/internal/classes/CompletionEnforcer.d.ts.map +1 -0
  136. package/dist/internal/classes/CompletionEnforcer.js +109 -0
  137. package/dist/internal/classes/CompletionEnforcer.js.map +1 -0
  138. package/dist/internal/classes/LogCollector.d.ts +28 -0
  139. package/dist/internal/classes/LogCollector.d.ts.map +1 -0
  140. package/dist/internal/classes/LogCollector.js +100 -0
  141. package/dist/internal/classes/LogCollector.js.map +1 -0
  142. package/dist/internal/classes/LogFileWriter.d.ts +21 -0
  143. package/dist/internal/classes/LogFileWriter.d.ts.map +1 -0
  144. package/dist/internal/classes/LogFileWriter.js +140 -0
  145. package/dist/internal/classes/LogFileWriter.js.map +1 -0
  146. package/dist/internal/classes/OpenCodeAdapter.d.ts +94 -0
  147. package/dist/internal/classes/OpenCodeAdapter.d.ts.map +1 -0
  148. package/dist/internal/classes/OpenCodeAdapter.js +653 -0
  149. package/dist/internal/classes/OpenCodeAdapter.js.map +1 -0
  150. package/dist/internal/classes/OpenCodeLogWatcher.d.ts +36 -0
  151. package/dist/internal/classes/OpenCodeLogWatcher.d.ts.map +1 -0
  152. package/dist/internal/classes/OpenCodeLogWatcher.js +257 -0
  153. package/dist/internal/classes/OpenCodeLogWatcher.js.map +1 -0
  154. package/dist/internal/classes/PermissionRequestHandler.d.ts +57 -0
  155. package/dist/internal/classes/PermissionRequestHandler.d.ts.map +1 -0
  156. package/dist/internal/classes/PermissionRequestHandler.js +132 -0
  157. package/dist/internal/classes/PermissionRequestHandler.js.map +1 -0
  158. package/dist/internal/classes/SecureStorage.d.ts +44 -0
  159. package/dist/internal/classes/SecureStorage.d.ts.map +1 -0
  160. package/dist/internal/classes/SecureStorage.js +231 -0
  161. package/dist/internal/classes/SecureStorage.js.map +1 -0
  162. package/dist/internal/classes/SkillsManager.d.ts +33 -0
  163. package/dist/internal/classes/SkillsManager.d.ts.map +1 -0
  164. package/dist/internal/classes/SkillsManager.js +340 -0
  165. package/dist/internal/classes/SkillsManager.js.map +1 -0
  166. package/dist/internal/classes/SpeechService.d.ts +30 -0
  167. package/dist/internal/classes/SpeechService.d.ts.map +1 -0
  168. package/dist/internal/classes/SpeechService.js +216 -0
  169. package/dist/internal/classes/SpeechService.js.map +1 -0
  170. package/dist/internal/classes/StreamParser.d.ts +18 -0
  171. package/dist/internal/classes/StreamParser.d.ts.map +1 -0
  172. package/dist/internal/classes/StreamParser.js +117 -0
  173. package/dist/internal/classes/StreamParser.js.map +1 -0
  174. package/dist/internal/classes/TaskManager.d.ts +72 -0
  175. package/dist/internal/classes/TaskManager.d.ts.map +1 -0
  176. package/dist/internal/classes/TaskManager.js +283 -0
  177. package/dist/internal/classes/TaskManager.js.map +1 -0
  178. package/dist/internal/classes/ThoughtStreamHandler.d.ts +15 -0
  179. package/dist/internal/classes/ThoughtStreamHandler.d.ts.map +1 -0
  180. package/dist/internal/classes/ThoughtStreamHandler.js +60 -0
  181. package/dist/internal/classes/ThoughtStreamHandler.js.map +1 -0
  182. package/dist/opencode/adapter.d.ts +93 -0
  183. package/dist/opencode/adapter.d.ts.map +1 -0
  184. package/dist/opencode/adapter.js +650 -0
  185. package/dist/opencode/adapter.js.map +1 -0
  186. package/dist/opencode/auth.d.ts +12 -0
  187. package/dist/opencode/auth.d.ts.map +1 -0
  188. package/dist/opencode/auth.js +65 -0
  189. package/dist/opencode/auth.js.map +1 -0
  190. package/dist/opencode/cli-resolver.d.ts +5 -0
  191. package/dist/opencode/cli-resolver.d.ts.map +1 -0
  192. package/dist/opencode/cli-resolver.js +148 -0
  193. package/dist/opencode/cli-resolver.js.map +1 -0
  194. package/dist/opencode/completion/completion-enforcer.d.ts +27 -0
  195. package/dist/opencode/completion/completion-enforcer.d.ts.map +1 -0
  196. package/dist/opencode/completion/completion-enforcer.js +109 -0
  197. package/dist/opencode/completion/completion-enforcer.js.map +1 -0
  198. package/dist/opencode/completion/completion-state.d.ts +36 -0
  199. package/dist/opencode/completion/completion-state.d.ts.map +1 -0
  200. package/dist/opencode/completion/completion-state.js +97 -0
  201. package/dist/opencode/completion/completion-state.js.map +1 -0
  202. package/dist/opencode/completion/index.d.ts +6 -0
  203. package/dist/opencode/completion/index.d.ts.map +1 -0
  204. package/dist/opencode/completion/index.js +4 -0
  205. package/dist/opencode/completion/index.js.map +1 -0
  206. package/dist/opencode/completion/prompts.d.ts +4 -0
  207. package/dist/opencode/completion/prompts.d.ts.map +1 -0
  208. package/dist/opencode/completion/prompts.js +58 -0
  209. package/dist/opencode/completion/prompts.js.map +1 -0
  210. package/dist/opencode/config-builder.d.ts +61 -0
  211. package/dist/opencode/config-builder.d.ts.map +1 -0
  212. package/dist/opencode/config-builder.js +395 -0
  213. package/dist/opencode/config-builder.js.map +1 -0
  214. package/dist/opencode/config-generator.d.ts +86 -0
  215. package/dist/opencode/config-generator.d.ts.map +1 -0
  216. package/dist/opencode/config-generator.js +407 -0
  217. package/dist/opencode/config-generator.js.map +1 -0
  218. package/dist/opencode/environment.d.ts +46 -0
  219. package/dist/opencode/environment.d.ts.map +1 -0
  220. package/dist/opencode/environment.js +102 -0
  221. package/dist/opencode/environment.js.map +1 -0
  222. package/dist/opencode/index.d.ts +23 -0
  223. package/dist/opencode/index.d.ts.map +1 -0
  224. package/dist/opencode/index.js +13 -0
  225. package/dist/opencode/index.js.map +1 -0
  226. package/dist/opencode/log-watcher.d.ts +36 -0
  227. package/dist/opencode/log-watcher.d.ts.map +1 -0
  228. package/dist/opencode/log-watcher.js +257 -0
  229. package/dist/opencode/log-watcher.js.map +1 -0
  230. package/dist/opencode/message-processor.d.ts +69 -0
  231. package/dist/opencode/message-processor.d.ts.map +1 -0
  232. package/dist/opencode/message-processor.js +193 -0
  233. package/dist/opencode/message-processor.js.map +1 -0
  234. package/dist/opencode/proxies/azure-foundry-proxy.d.ts +10 -0
  235. package/dist/opencode/proxies/azure-foundry-proxy.d.ts.map +1 -0
  236. package/dist/opencode/proxies/azure-foundry-proxy.js +216 -0
  237. package/dist/opencode/proxies/azure-foundry-proxy.js.map +1 -0
  238. package/dist/opencode/proxies/azure-token-manager.d.ts +11 -0
  239. package/dist/opencode/proxies/azure-token-manager.d.ts.map +1 -0
  240. package/dist/opencode/proxies/azure-token-manager.js +58 -0
  241. package/dist/opencode/proxies/azure-token-manager.js.map +1 -0
  242. package/dist/opencode/proxies/index.d.ts +6 -0
  243. package/dist/opencode/proxies/index.d.ts.map +1 -0
  244. package/dist/opencode/proxies/index.js +4 -0
  245. package/dist/opencode/proxies/index.js.map +1 -0
  246. package/dist/opencode/proxies/moonshot-proxy.d.ts +10 -0
  247. package/dist/opencode/proxies/moonshot-proxy.d.ts.map +1 -0
  248. package/dist/opencode/proxies/moonshot-proxy.js +416 -0
  249. package/dist/opencode/proxies/moonshot-proxy.js.map +1 -0
  250. package/dist/opencode/stream-parser.d.ts +18 -0
  251. package/dist/opencode/stream-parser.d.ts.map +1 -0
  252. package/dist/opencode/stream-parser.js +117 -0
  253. package/dist/opencode/stream-parser.js.map +1 -0
  254. package/dist/opencode/task-manager.d.ts +72 -0
  255. package/dist/opencode/task-manager.d.ts.map +1 -0
  256. package/dist/opencode/task-manager.js +283 -0
  257. package/dist/opencode/task-manager.js.map +1 -0
  258. package/dist/providers/azure-foundry.d.ts +48 -0
  259. package/dist/providers/azure-foundry.d.ts.map +1 -0
  260. package/dist/providers/azure-foundry.js +193 -0
  261. package/dist/providers/azure-foundry.js.map +1 -0
  262. package/dist/providers/bedrock.d.ts +34 -0
  263. package/dist/providers/bedrock.d.ts.map +1 -0
  264. package/dist/providers/bedrock.js +162 -0
  265. package/dist/providers/bedrock.js.map +1 -0
  266. package/dist/providers/index.d.ts +10 -0
  267. package/dist/providers/index.d.ts.map +1 -0
  268. package/dist/providers/index.js +10 -0
  269. package/dist/providers/index.js.map +1 -0
  270. package/dist/providers/litellm.d.ts +28 -0
  271. package/dist/providers/litellm.d.ts.map +1 -0
  272. package/dist/providers/litellm.js +110 -0
  273. package/dist/providers/litellm.js.map +1 -0
  274. package/dist/providers/lmstudio.d.ts +58 -0
  275. package/dist/providers/lmstudio.d.ts.map +1 -0
  276. package/dist/providers/lmstudio.js +153 -0
  277. package/dist/providers/lmstudio.js.map +1 -0
  278. package/dist/providers/models.d.ts +10 -0
  279. package/dist/providers/models.d.ts.map +1 -0
  280. package/dist/providers/models.js +35 -0
  281. package/dist/providers/models.js.map +1 -0
  282. package/dist/providers/ollama.d.ts +31 -0
  283. package/dist/providers/ollama.d.ts.map +1 -0
  284. package/dist/providers/ollama.js +56 -0
  285. package/dist/providers/ollama.js.map +1 -0
  286. package/dist/providers/openrouter.d.ts +20 -0
  287. package/dist/providers/openrouter.d.ts.map +1 -0
  288. package/dist/providers/openrouter.js +49 -0
  289. package/dist/providers/openrouter.js.map +1 -0
  290. package/dist/providers/tool-support-testing.d.ts +42 -0
  291. package/dist/providers/tool-support-testing.d.ts.map +1 -0
  292. package/dist/providers/tool-support-testing.js +114 -0
  293. package/dist/providers/tool-support-testing.js.map +1 -0
  294. package/dist/providers/validation.d.ts +13 -0
  295. package/dist/providers/validation.d.ts.map +1 -0
  296. package/dist/providers/validation.js +136 -0
  297. package/dist/providers/validation.js.map +1 -0
  298. package/dist/services/index.d.ts +5 -0
  299. package/dist/services/index.d.ts.map +1 -0
  300. package/dist/services/index.js +5 -0
  301. package/dist/services/index.js.map +1 -0
  302. package/dist/services/permission-handler.d.ts +145 -0
  303. package/dist/services/permission-handler.d.ts.map +1 -0
  304. package/dist/services/permission-handler.js +207 -0
  305. package/dist/services/permission-handler.js.map +1 -0
  306. package/dist/services/speech.d.ts +63 -0
  307. package/dist/services/speech.d.ts.map +1 -0
  308. package/dist/services/speech.js +253 -0
  309. package/dist/services/speech.js.map +1 -0
  310. package/dist/services/summarizer.d.ts +19 -0
  311. package/dist/services/summarizer.d.ts.map +1 -0
  312. package/dist/services/summarizer.js +177 -0
  313. package/dist/services/summarizer.js.map +1 -0
  314. package/dist/services/thought-stream-handler.d.ts +54 -0
  315. package/dist/services/thought-stream-handler.d.ts.map +1 -0
  316. package/dist/services/thought-stream-handler.js +107 -0
  317. package/dist/services/thought-stream-handler.js.map +1 -0
  318. package/dist/skills/index.d.ts +2 -0
  319. package/dist/skills/index.d.ts.map +1 -0
  320. package/dist/skills/index.js +2 -0
  321. package/dist/skills/index.js.map +1 -0
  322. package/dist/skills/skills-manager.d.ts +33 -0
  323. package/dist/skills/skills-manager.d.ts.map +1 -0
  324. package/dist/skills/skills-manager.js +340 -0
  325. package/dist/skills/skills-manager.js.map +1 -0
  326. package/dist/storage/database.d.ts +14 -0
  327. package/dist/storage/database.d.ts.map +1 -0
  328. package/dist/storage/database.js +72 -0
  329. package/dist/storage/database.js.map +1 -0
  330. package/dist/storage/index.d.ts +6 -0
  331. package/dist/storage/index.d.ts.map +1 -0
  332. package/dist/storage/index.js +6 -0
  333. package/dist/storage/index.js.map +1 -0
  334. package/dist/storage/migrations/errors.d.ts +17 -0
  335. package/dist/storage/migrations/errors.d.ts.map +1 -0
  336. package/dist/storage/migrations/errors.js +27 -0
  337. package/dist/storage/migrations/errors.js.map +1 -0
  338. package/dist/storage/migrations/index.d.ts +13 -0
  339. package/dist/storage/migrations/index.d.ts.map +1 -0
  340. package/dist/storage/migrations/index.js +69 -0
  341. package/dist/storage/migrations/index.js.map +1 -0
  342. package/dist/storage/migrations/v001-initial.d.ts +3 -0
  343. package/dist/storage/migrations/v001-initial.d.ts.map +1 -0
  344. package/dist/storage/migrations/v001-initial.js +77 -0
  345. package/dist/storage/migrations/v001-initial.js.map +1 -0
  346. package/dist/storage/migrations/v002-azure-foundry.d.ts +3 -0
  347. package/dist/storage/migrations/v002-azure-foundry.d.ts.map +1 -0
  348. package/dist/storage/migrations/v002-azure-foundry.js +18 -0
  349. package/dist/storage/migrations/v002-azure-foundry.js.map +1 -0
  350. package/dist/storage/migrations/v003-lmstudio.d.ts +3 -0
  351. package/dist/storage/migrations/v003-lmstudio.d.ts.map +1 -0
  352. package/dist/storage/migrations/v003-lmstudio.js +18 -0
  353. package/dist/storage/migrations/v003-lmstudio.js.map +1 -0
  354. package/dist/storage/migrations/v004-openai-base-url.d.ts +3 -0
  355. package/dist/storage/migrations/v004-openai-base-url.d.ts.map +1 -0
  356. package/dist/storage/migrations/v004-openai-base-url.js +9 -0
  357. package/dist/storage/migrations/v004-openai-base-url.js.map +1 -0
  358. package/dist/storage/migrations/v005-task-todos.d.ts +3 -0
  359. package/dist/storage/migrations/v005-task-todos.d.ts.map +1 -0
  360. package/dist/storage/migrations/v005-task-todos.js +19 -0
  361. package/dist/storage/migrations/v005-task-todos.js.map +1 -0
  362. package/dist/storage/migrations/v006-skills.d.ts +3 -0
  363. package/dist/storage/migrations/v006-skills.d.ts.map +1 -0
  364. package/dist/storage/migrations/v006-skills.js +23 -0
  365. package/dist/storage/migrations/v006-skills.js.map +1 -0
  366. package/dist/storage/repositories/appSettings.d.ts +30 -0
  367. package/dist/storage/repositories/appSettings.d.ts.map +1 -0
  368. package/dist/storage/repositories/appSettings.js +130 -0
  369. package/dist/storage/repositories/appSettings.js.map +1 -0
  370. package/dist/storage/repositories/index.d.ts +5 -0
  371. package/dist/storage/repositories/index.d.ts.map +1 -0
  372. package/dist/storage/repositories/index.js +5 -0
  373. package/dist/storage/repositories/index.js.map +1 -0
  374. package/dist/storage/repositories/providerSettings.d.ts +19 -0
  375. package/dist/storage/repositories/providerSettings.d.ts.map +1 -0
  376. package/dist/storage/repositories/providerSettings.js +114 -0
  377. package/dist/storage/repositories/providerSettings.js.map +1 -0
  378. package/dist/storage/repositories/skills.d.ts +9 -0
  379. package/dist/storage/repositories/skills.d.ts.map +1 -0
  380. package/dist/storage/repositories/skills.js +63 -0
  381. package/dist/storage/repositories/skills.js.map +1 -0
  382. package/dist/storage/repositories/taskHistory.d.ts +29 -0
  383. package/dist/storage/repositories/taskHistory.d.ts.map +1 -0
  384. package/dist/storage/repositories/taskHistory.js +159 -0
  385. package/dist/storage/repositories/taskHistory.js.map +1 -0
  386. package/dist/storage/secure-storage.d.ts +44 -0
  387. package/dist/storage/secure-storage.d.ts.map +1 -0
  388. package/dist/storage/secure-storage.js +227 -0
  389. package/dist/storage/secure-storage.js.map +1 -0
  390. package/dist/types/index.d.ts +8 -0
  391. package/dist/types/index.d.ts.map +1 -0
  392. package/dist/types/index.js +2 -0
  393. package/dist/types/index.js.map +1 -0
  394. package/dist/types/log-writer.d.ts +26 -0
  395. package/dist/types/log-writer.d.ts.map +1 -0
  396. package/dist/types/log-writer.js +2 -0
  397. package/dist/types/log-writer.js.map +1 -0
  398. package/dist/types/permission-handler.d.ts +51 -0
  399. package/dist/types/permission-handler.d.ts.map +1 -0
  400. package/dist/types/permission-handler.js +2 -0
  401. package/dist/types/permission-handler.js.map +1 -0
  402. package/dist/types/skills-manager.d.ts +25 -0
  403. package/dist/types/skills-manager.d.ts.map +1 -0
  404. package/dist/types/skills-manager.js +2 -0
  405. package/dist/types/skills-manager.js.map +1 -0
  406. package/dist/types/speech.d.ts +32 -0
  407. package/dist/types/speech.d.ts.map +1 -0
  408. package/dist/types/speech.js +2 -0
  409. package/dist/types/speech.js.map +1 -0
  410. package/dist/types/storage.d.ts +95 -0
  411. package/dist/types/storage.d.ts.map +1 -0
  412. package/dist/types/storage.js +2 -0
  413. package/dist/types/storage.js.map +1 -0
  414. package/dist/types/task-manager.d.ts +69 -0
  415. package/dist/types/task-manager.d.ts.map +1 -0
  416. package/dist/types/task-manager.js +2 -0
  417. package/dist/types/task-manager.js.map +1 -0
  418. package/dist/types/thought-stream.d.ts +28 -0
  419. package/dist/types/thought-stream.d.ts.map +1 -0
  420. package/dist/types/thought-stream.js +2 -0
  421. package/dist/types/thought-stream.js.map +1 -0
  422. package/dist/types.d.ts +43 -0
  423. package/dist/types.d.ts.map +1 -0
  424. package/dist/types.js +2 -0
  425. package/dist/types.js.map +1 -0
  426. package/dist/utils/bundled-node.d.ts +11 -0
  427. package/dist/utils/bundled-node.d.ts.map +1 -0
  428. package/dist/utils/bundled-node.js +73 -0
  429. package/dist/utils/bundled-node.js.map +1 -0
  430. package/dist/utils/fetch.d.ts +2 -0
  431. package/dist/utils/fetch.d.ts.map +1 -0
  432. package/dist/utils/fetch.js +15 -0
  433. package/dist/utils/fetch.js.map +1 -0
  434. package/dist/utils/index.d.ts +14 -0
  435. package/dist/utils/index.d.ts.map +1 -0
  436. package/dist/utils/index.js +14 -0
  437. package/dist/utils/index.js.map +1 -0
  438. package/dist/utils/json.d.ts +10 -0
  439. package/dist/utils/json.d.ts.map +1 -0
  440. package/dist/utils/json.js +17 -0
  441. package/dist/utils/json.js.map +1 -0
  442. package/dist/utils/log-collector.d.ts +20 -0
  443. package/dist/utils/log-collector.d.ts.map +1 -0
  444. package/dist/utils/log-collector.js +100 -0
  445. package/dist/utils/log-collector.js.map +1 -0
  446. package/dist/utils/log-file-writer.d.ts +26 -0
  447. package/dist/utils/log-file-writer.d.ts.map +1 -0
  448. package/dist/utils/log-file-writer.js +144 -0
  449. package/dist/utils/log-file-writer.js.map +1 -0
  450. package/dist/utils/logging.d.ts +26 -0
  451. package/dist/utils/logging.d.ts.map +1 -0
  452. package/dist/utils/logging.js +91 -0
  453. package/dist/utils/logging.js.map +1 -0
  454. package/dist/utils/network.d.ts +14 -0
  455. package/dist/utils/network.d.ts.map +1 -0
  456. package/dist/utils/network.js +38 -0
  457. package/dist/utils/network.js.map +1 -0
  458. package/dist/utils/paths.d.ts +9 -0
  459. package/dist/utils/paths.d.ts.map +1 -0
  460. package/dist/utils/paths.js +47 -0
  461. package/dist/utils/paths.js.map +1 -0
  462. package/dist/utils/redact.d.ts +2 -0
  463. package/dist/utils/redact.d.ts.map +1 -0
  464. package/dist/utils/redact.js +20 -0
  465. package/dist/utils/redact.js.map +1 -0
  466. package/dist/utils/sanitize.d.ts +3 -0
  467. package/dist/utils/sanitize.d.ts.map +1 -0
  468. package/dist/utils/sanitize.js +21 -0
  469. package/dist/utils/sanitize.js.map +1 -0
  470. package/dist/utils/shell.d.ts +26 -0
  471. package/dist/utils/shell.d.ts.map +1 -0
  472. package/dist/utils/shell.js +60 -0
  473. package/dist/utils/shell.js.map +1 -0
  474. package/dist/utils/system-path.d.ts +3 -0
  475. package/dist/utils/system-path.d.ts.map +1 -0
  476. package/dist/utils/system-path.js +142 -0
  477. package/dist/utils/system-path.js.map +1 -0
  478. package/dist/utils/task-status.d.ts +7 -0
  479. package/dist/utils/task-status.d.ts.map +1 -0
  480. package/dist/utils/task-status.js +12 -0
  481. package/dist/utils/task-status.js.map +1 -0
  482. package/dist/utils/task-validation.d.ts +10 -0
  483. package/dist/utils/task-validation.d.ts.map +1 -0
  484. package/dist/utils/task-validation.js +35 -0
  485. package/dist/utils/task-validation.js.map +1 -0
  486. package/dist/utils/url.d.ts +3 -0
  487. package/dist/utils/url.d.ts.map +1 -0
  488. package/dist/utils/url.js +19 -0
  489. package/dist/utils/url.js.map +1 -0
  490. package/mcp-tools/ask-user-question/SKILL.md +133 -0
  491. package/mcp-tools/ask-user-question/dist/index.mjs +20794 -0
  492. package/mcp-tools/ask-user-question/package.json +17 -0
  493. package/mcp-tools/ask-user-question/src/index.ts +183 -0
  494. package/mcp-tools/ask-user-question/tsconfig.json +12 -0
  495. package/mcp-tools/complete-task/SKILL.md +17 -0
  496. package/mcp-tools/complete-task/dist/index.mjs +20722 -0
  497. package/mcp-tools/complete-task/package.json +12 -0
  498. package/mcp-tools/complete-task/src/index.ts +92 -0
  499. package/mcp-tools/dev-browser/SKILL.md +384 -0
  500. package/mcp-tools/dev-browser/dist/start-relay.mjs +6878 -0
  501. package/mcp-tools/dev-browser/dist/start-server.mjs +23369 -0
  502. package/mcp-tools/dev-browser/package.json +31 -0
  503. package/mcp-tools/dev-browser/src/index.ts +290 -0
  504. package/mcp-tools/dev-browser/src/relay.ts +652 -0
  505. package/mcp-tools/dev-browser/src/types.ts +31 -0
  506. package/mcp-tools/dev-browser/tsconfig.json +36 -0
  507. package/mcp-tools/dev-browser-mcp/README.md +42 -0
  508. package/mcp-tools/dev-browser-mcp/dist/index.mjs +24398 -0
  509. package/mcp-tools/dev-browser-mcp/package.json +17 -0
  510. package/mcp-tools/dev-browser-mcp/src/index.ts +3940 -0
  511. package/mcp-tools/dev-browser-mcp/src/snapshot/compactor.test.ts +86 -0
  512. package/mcp-tools/dev-browser-mcp/src/snapshot/compactor.ts +31 -0
  513. package/mcp-tools/dev-browser-mcp/src/snapshot/differ.test.ts +178 -0
  514. package/mcp-tools/dev-browser-mcp/src/snapshot/differ.ts +167 -0
  515. package/mcp-tools/dev-browser-mcp/src/snapshot/index.ts +19 -0
  516. package/mcp-tools/dev-browser-mcp/src/snapshot/manager.test.ts +247 -0
  517. package/mcp-tools/dev-browser-mcp/src/snapshot/manager.ts +131 -0
  518. package/mcp-tools/dev-browser-mcp/src/snapshot/parser.test.ts +94 -0
  519. package/mcp-tools/dev-browser-mcp/src/snapshot/parser.ts +81 -0
  520. package/mcp-tools/dev-browser-mcp/src/snapshot/priority.test.ts +104 -0
  521. package/mcp-tools/dev-browser-mcp/src/snapshot/priority.ts +84 -0
  522. package/mcp-tools/dev-browser-mcp/src/snapshot/tokens.test.ts +64 -0
  523. package/mcp-tools/dev-browser-mcp/src/snapshot/tokens.ts +36 -0
  524. package/mcp-tools/dev-browser-mcp/src/snapshot/types.ts +89 -0
  525. package/mcp-tools/dev-browser-mcp/tsconfig.json +15 -0
  526. package/mcp-tools/file-permission/dist/index.mjs +20752 -0
  527. package/mcp-tools/file-permission/package.json +17 -0
  528. package/mcp-tools/file-permission/src/index.ts +125 -0
  529. package/mcp-tools/file-permission/tsconfig.json +17 -0
  530. package/mcp-tools/package.json +13 -0
  531. package/mcp-tools/report-checkpoint/src/index.ts +127 -0
  532. package/mcp-tools/report-checkpoint/tsconfig.json +12 -0
  533. package/mcp-tools/report-thought/src/index.ts +109 -0
  534. package/mcp-tools/report-thought/tsconfig.json +12 -0
  535. package/mcp-tools/safe-file-deletion/SKILL.md +50 -0
  536. package/mcp-tools/start-task/dist/index.mjs +20719 -0
  537. package/mcp-tools/start-task/package.json +12 -0
  538. package/mcp-tools/start-task/src/index.ts +86 -0
  539. package/package.json +65 -0
@@ -0,0 +1,21 @@
1
+ const DEFAULT_MAX_LENGTH = 8000;
2
+ export function sanitizeString(input, fieldName, maxLength = DEFAULT_MAX_LENGTH) {
3
+ if (typeof input !== 'string') {
4
+ throw new Error(`${fieldName} must be a string`);
5
+ }
6
+ const trimmed = input.trim();
7
+ if (!trimmed) {
8
+ throw new Error(`${fieldName} is required`);
9
+ }
10
+ if (trimmed.length > maxLength) {
11
+ throw new Error(`${fieldName} exceeds maximum length of ${maxLength}`);
12
+ }
13
+ return trimmed;
14
+ }
15
+ export function sanitizeOptionalString(input, fieldName, maxLength = DEFAULT_MAX_LENGTH) {
16
+ if (input === null || input === undefined) {
17
+ return undefined;
18
+ }
19
+ return sanitizeString(input, fieldName, maxLength);
20
+ }
21
+ //# sourceMappingURL=sanitize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sanitize.js","sourceRoot":"","sources":["../../src/utils/sanitize.ts"],"names":[],"mappings":"AAAA,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,MAAM,UAAU,cAAc,CAC5B,KAAc,EACd,SAAiB,EACjB,SAAS,GAAG,kBAAkB;IAE9B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,mBAAmB,CAAC,CAAC;IACnD,CAAC;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,cAAc,CAAC,CAAC;IAC9C,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,8BAA8B,SAAS,EAAE,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,KAAc,EACd,SAAiB,EACjB,SAAS,GAAG,kBAAkB;IAE9B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,cAAc,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Strips ANSI escape codes from a string.
3
+ * @param input - The string potentially containing ANSI escape codes
4
+ * @returns The string with all ANSI escape codes removed
5
+ */
6
+ export declare function stripAnsi(input: string): string;
7
+ /**
8
+ * Quotes an argument for safe use in shell commands.
9
+ * Handles platform-specific quoting requirements.
10
+ * @param arg - The argument to quote
11
+ * @returns The properly quoted argument
12
+ */
13
+ export declare function quoteForShell(arg: string): string;
14
+ /**
15
+ * Returns the appropriate shell for the current platform.
16
+ * @param isPackaged - Whether the app is running in packaged mode (optional)
17
+ * @returns The path to the shell executable
18
+ */
19
+ export declare function getPlatformShell(isPackaged?: boolean): string;
20
+ /**
21
+ * Returns the shell arguments needed to execute a command.
22
+ * @param command - The command to execute
23
+ * @returns Array of shell arguments
24
+ */
25
+ export declare function getShellArgs(command: string): string[];
26
+ //# sourceMappingURL=shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../src/utils/shell.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAWjD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAY7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAKtD"}
@@ -0,0 +1,60 @@
1
+ import * as fs from 'fs';
2
+ /**
3
+ * Strips ANSI escape codes from a string.
4
+ * @param input - The string potentially containing ANSI escape codes
5
+ * @returns The string with all ANSI escape codes removed
6
+ */
7
+ export function stripAnsi(input) {
8
+ return input.replace(/\x1B\[[0-9;]*[a-zA-Z]/g, '');
9
+ }
10
+ /**
11
+ * Quotes an argument for safe use in shell commands.
12
+ * Handles platform-specific quoting requirements.
13
+ * @param arg - The argument to quote
14
+ * @returns The properly quoted argument
15
+ */
16
+ export function quoteForShell(arg) {
17
+ if (process.platform === 'win32') {
18
+ if (arg.includes(' ') || arg.includes('"')) {
19
+ return `"${arg.replace(/"/g, '\\"')}"`;
20
+ }
21
+ return arg;
22
+ }
23
+ if (arg.includes("'") || arg.includes(' ') || arg.includes('"')) {
24
+ return `'${arg.replace(/'/g, "'\\''")}'`;
25
+ }
26
+ return arg;
27
+ }
28
+ /**
29
+ * Returns the appropriate shell for the current platform.
30
+ * @param isPackaged - Whether the app is running in packaged mode (optional)
31
+ * @returns The path to the shell executable
32
+ */
33
+ export function getPlatformShell(isPackaged) {
34
+ if (process.platform === 'win32') {
35
+ return 'powershell.exe';
36
+ }
37
+ if (isPackaged && process.platform === 'darwin') {
38
+ return '/bin/sh';
39
+ }
40
+ const userShell = process.env.SHELL;
41
+ if (userShell)
42
+ return userShell;
43
+ if (fs.existsSync('/bin/bash'))
44
+ return '/bin/bash';
45
+ if (fs.existsSync('/bin/zsh'))
46
+ return '/bin/zsh';
47
+ return '/bin/sh';
48
+ }
49
+ /**
50
+ * Returns the shell arguments needed to execute a command.
51
+ * @param command - The command to execute
52
+ * @returns Array of shell arguments
53
+ */
54
+ export function getShellArgs(command) {
55
+ if (process.platform === 'win32') {
56
+ return ['-NoProfile', '-Command', command];
57
+ }
58
+ return ['-c', command];
59
+ }
60
+ //# sourceMappingURL=shell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell.js","sourceRoot":"","sources":["../../src/utils/shell.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC;AACrD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC3C,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;QACzC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAChE,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;IAC3C,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAoB;IACnD,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,IAAI,UAAU,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAChD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;IACpC,IAAI,SAAS;QAAE,OAAO,SAAS,CAAC;IAChC,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO,WAAW,CAAC;IACnD,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;QAAE,OAAO,UAAU,CAAC;IACjD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,CAAC,YAAY,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function getExtendedNodePath(basePath?: string): string;
2
+ export declare function findCommandInPath(command: string, searchPath: string): string | null;
3
+ //# sourceMappingURL=system-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-path.d.ts","sourceRoot":"","sources":["../../src/utils/system-path.ts"],"names":[],"mappings":"AAiGA,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAgC7D;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2BpF"}
@@ -0,0 +1,142 @@
1
+ import { execSync } from 'child_process';
2
+ import * as fs from 'fs';
3
+ import * as path from 'path';
4
+ function getNvmNodePaths() {
5
+ const home = process.env.HOME || '';
6
+ const nvmVersionsDir = path.join(home, '.nvm', 'versions', 'node');
7
+ if (!fs.existsSync(nvmVersionsDir)) {
8
+ return [];
9
+ }
10
+ try {
11
+ const versions = fs.readdirSync(nvmVersionsDir)
12
+ .filter(name => name.startsWith('v'))
13
+ .sort((a, b) => {
14
+ const parseVersion = (v) => {
15
+ const parts = v.replace('v', '').split('.').map(Number);
16
+ return parts[0] * 10000 + (parts[1] || 0) * 100 + (parts[2] || 0);
17
+ };
18
+ return parseVersion(b) - parseVersion(a);
19
+ });
20
+ return versions.map(v => path.join(nvmVersionsDir, v, 'bin'));
21
+ }
22
+ catch {
23
+ return [];
24
+ }
25
+ }
26
+ function getFnmNodePaths() {
27
+ const home = process.env.HOME || '';
28
+ const fnmVersionsDir = path.join(home, '.fnm', 'node-versions');
29
+ if (!fs.existsSync(fnmVersionsDir)) {
30
+ return [];
31
+ }
32
+ try {
33
+ const versions = fs.readdirSync(fnmVersionsDir)
34
+ .filter(name => name.startsWith('v'))
35
+ .sort((a, b) => {
36
+ const parseVersion = (v) => {
37
+ const parts = v.replace('v', '').split('.').map(Number);
38
+ return parts[0] * 10000 + (parts[1] || 0) * 100 + (parts[2] || 0);
39
+ };
40
+ return parseVersion(b) - parseVersion(a);
41
+ });
42
+ return versions.map(v => path.join(fnmVersionsDir, v, 'installation', 'bin'));
43
+ }
44
+ catch {
45
+ return [];
46
+ }
47
+ }
48
+ function getCommonNodePaths() {
49
+ const home = process.env.HOME || '';
50
+ const nvmPaths = getNvmNodePaths();
51
+ const fnmPaths = getFnmNodePaths();
52
+ return [
53
+ ...nvmPaths,
54
+ ...fnmPaths,
55
+ '/opt/homebrew/bin',
56
+ '/usr/local/bin',
57
+ `${home}/.nvm/current/bin`,
58
+ `${home}/.volta/bin`,
59
+ `${home}/.asdf/shims`,
60
+ `${home}/.fnm/current/bin`,
61
+ `${home}/.nodenv/shims`,
62
+ '/usr/local/opt/node/bin',
63
+ '/opt/local/bin',
64
+ `${home}/.local/bin`,
65
+ ].filter(p => p && !p.includes('undefined'));
66
+ }
67
+ function getSystemPathFromPathHelper() {
68
+ if (process.platform !== 'darwin') {
69
+ return null;
70
+ }
71
+ try {
72
+ const output = execSync('/usr/libexec/path_helper -s', {
73
+ encoding: 'utf-8',
74
+ timeout: 5000,
75
+ });
76
+ const match = output.match(/PATH="([^"]+)"/);
77
+ if (match && match[1]) {
78
+ return match[1];
79
+ }
80
+ }
81
+ catch (err) {
82
+ console.warn('[SystemPath] path_helper failed:', err);
83
+ }
84
+ return null;
85
+ }
86
+ export function getExtendedNodePath(basePath) {
87
+ const base = basePath || process.env.PATH || '';
88
+ if (process.platform !== 'darwin') {
89
+ return base;
90
+ }
91
+ const nodePaths = getCommonNodePaths();
92
+ const systemPath = getSystemPathFromPathHelper();
93
+ const pathParts = [];
94
+ for (const p of nodePaths) {
95
+ if (fs.existsSync(p) && !pathParts.includes(p)) {
96
+ pathParts.push(p);
97
+ }
98
+ }
99
+ if (systemPath) {
100
+ for (const p of systemPath.split(':')) {
101
+ if (p && !pathParts.includes(p)) {
102
+ pathParts.push(p);
103
+ }
104
+ }
105
+ }
106
+ for (const p of base.split(':')) {
107
+ if (p && !pathParts.includes(p)) {
108
+ pathParts.push(p);
109
+ }
110
+ }
111
+ return pathParts.join(':');
112
+ }
113
+ export function findCommandInPath(command, searchPath) {
114
+ const delimiter = process.platform === 'win32' ? ';' : ':';
115
+ for (const dir of searchPath.split(delimiter)) {
116
+ if (!dir)
117
+ continue;
118
+ const fullPath = path.join(dir, command);
119
+ try {
120
+ if (fs.existsSync(fullPath)) {
121
+ const stats = fs.statSync(fullPath);
122
+ if (stats.isFile()) {
123
+ if (process.platform !== 'win32') {
124
+ try {
125
+ fs.accessSync(fullPath, fs.constants.X_OK);
126
+ return fullPath;
127
+ }
128
+ catch {
129
+ }
130
+ }
131
+ else {
132
+ return fullPath;
133
+ }
134
+ }
135
+ }
136
+ }
137
+ catch {
138
+ }
139
+ }
140
+ return null;
141
+ }
142
+ //# sourceMappingURL=system-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system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,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAE3D,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9C,IAAI,CAAC,GAAG;YAAE,SAAS;QAEnB,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC;YACH,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC5B,MAAM,KAAK,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACpC,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;oBACnB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;wBACjC,IAAI,CAAC;4BACH,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;4BAC3C,OAAO,QAAQ,CAAC;wBAClB,CAAC;wBAAC,MAAM,CAAC;wBACT,CAAC;oBACH,CAAC;yBAAM,CAAC;wBACN,OAAO,QAAQ,CAAC;oBAClB,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;QACT,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { TaskStatus, TaskResult } from '../common/types/task.js';
2
+ /**
3
+ * Maps a TaskResult status to a TaskStatus.
4
+ * Used when a task completes to determine the final task status.
5
+ */
6
+ export declare function mapResultToStatus(result: TaskResult): TaskStatus;
7
+ //# sourceMappingURL=task-status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-status.d.ts","sourceRoot":"","sources":["../../src/utils/task-status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAIhE"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Maps a TaskResult status to a TaskStatus.
3
+ * Used when a task completes to determine the final task status.
4
+ */
5
+ export function mapResultToStatus(result) {
6
+ if (result.status === 'success')
7
+ return 'completed';
8
+ if (result.status === 'interrupted')
9
+ return 'interrupted';
10
+ return 'failed';
11
+ }
12
+ //# sourceMappingURL=task-status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-status.js","sourceRoot":"","sources":["../../src/utils/task-status.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAClD,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC;IACpD,IAAI,MAAM,CAAC,MAAM,KAAK,aAAa;QAAE,OAAO,aAAa,CAAC;IAC1D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { TaskConfig } from '../common/types/task.js';
2
+ /**
3
+ * Validates and sanitizes a TaskConfig object.
4
+ * Ensures all fields are properly typed, trimmed, and within length limits.
5
+ *
6
+ * @param config - The task configuration to validate
7
+ * @returns A sanitized TaskConfig with all fields validated
8
+ */
9
+ export declare function validateTaskConfig(config: TaskConfig): TaskConfig;
10
+ //# sourceMappingURL=task-validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-validation.d.ts","sourceRoot":"","sources":["../../src/utils/task-validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAG1D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CA8BjE"}
@@ -0,0 +1,35 @@
1
+ import { sanitizeString } from './sanitize.js';
2
+ /**
3
+ * Validates and sanitizes a TaskConfig object.
4
+ * Ensures all fields are properly typed, trimmed, and within length limits.
5
+ *
6
+ * @param config - The task configuration to validate
7
+ * @returns A sanitized TaskConfig with all fields validated
8
+ */
9
+ export function validateTaskConfig(config) {
10
+ const prompt = sanitizeString(config.prompt, 'prompt');
11
+ const validated = { prompt };
12
+ if (config.taskId) {
13
+ validated.taskId = sanitizeString(config.taskId, 'taskId', 128);
14
+ }
15
+ if (config.sessionId) {
16
+ validated.sessionId = sanitizeString(config.sessionId, 'sessionId', 128);
17
+ }
18
+ if (config.workingDirectory) {
19
+ validated.workingDirectory = sanitizeString(config.workingDirectory, 'workingDirectory', 1024);
20
+ }
21
+ if (Array.isArray(config.allowedTools)) {
22
+ validated.allowedTools = config.allowedTools
23
+ .filter((tool) => typeof tool === 'string')
24
+ .map((tool) => sanitizeString(tool, 'allowedTools', 64))
25
+ .slice(0, 20);
26
+ }
27
+ if (config.systemPromptAppend) {
28
+ validated.systemPromptAppend = sanitizeString(config.systemPromptAppend, 'systemPromptAppend');
29
+ }
30
+ if (config.outputSchema && typeof config.outputSchema === 'object') {
31
+ validated.outputSchema = config.outputSchema;
32
+ }
33
+ return validated;
34
+ }
35
+ //# sourceMappingURL=task-validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-validation.js","sourceRoot":"","sources":["../../src/utils/task-validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAkB;IACnD,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACvD,MAAM,SAAS,GAAe,EAAE,MAAM,EAAE,CAAC;IAEzC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,SAAS,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,SAAS,CAAC,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,MAAM,CAAC,gBAAgB,EAAE,CAAC;QAC5B,SAAS,CAAC,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,IAAI,CAAC,CAAC;IACjG,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;QACvC,SAAS,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY;aACzC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC;aAC1D,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,EAAE,CAAC,CAAC;aACvD,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;QAC9B,SAAS,CAAC,kBAAkB,GAAG,cAAc,CAC3C,MAAM,CAAC,kBAAkB,EACzB,oBAAoB,CACrB,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,YAAY,IAAI,OAAO,MAAM,CAAC,YAAY,KAAK,QAAQ,EAAE,CAAC;QACnE,SAAS,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IAC/C,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function validateHttpUrl(urlString: string, fieldName?: string): URL;
2
+ export declare function normalizeBaseUrl(baseUrl: string): string;
3
+ //# sourceMappingURL=url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,SAAQ,GAAG,GAAG,CAazE;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD"}
@@ -0,0 +1,19 @@
1
+ export function validateHttpUrl(urlString, fieldName = 'URL') {
2
+ try {
3
+ const parsed = new URL(urlString);
4
+ if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') {
5
+ throw new Error(`${fieldName} must use http or https protocol`);
6
+ }
7
+ return parsed;
8
+ }
9
+ catch (error) {
10
+ if (error instanceof Error && error.message.includes('protocol')) {
11
+ throw error;
12
+ }
13
+ throw new Error(`${fieldName} is not a valid URL`);
14
+ }
15
+ }
16
+ export function normalizeBaseUrl(baseUrl) {
17
+ return baseUrl.replace(/\/+$/, '');
18
+ }
19
+ //# sourceMappingURL=url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/utils/url.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,SAAiB,EAAE,SAAS,GAAG,KAAK;IAClE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,kCAAkC,CAAC,CAAC;QAClE,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YACjE,MAAM,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,qBAAqB,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe;IAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,133 @@
1
+ ---
2
+ name: ask-user-question
3
+ description: Ask users questions via the UI. Use when you need clarification, user preferences, or confirmation before proceeding. The user CANNOT see CLI output - this tool is the ONLY way to communicate with them.
4
+ ---
5
+
6
+ # Ask User Question
7
+
8
+ Use this MCP tool to ask users questions and get their responses. This is the **ONLY** way to communicate with the user - they cannot see CLI/terminal output.
9
+
10
+ ## Critical Rule
11
+
12
+ The user **CANNOT** see your text output or CLI prompts!
13
+
14
+ If you write "Let me ask you..." and then just output text - **THE USER WILL NOT SEE IT**.
15
+ You MUST call this tool to display a modal in the UI.
16
+
17
+ ## When to Use
18
+
19
+ - Clarifying questions before starting ambiguous tasks
20
+ - Asking user preferences (e.g., "How would you like files organized?")
21
+ - Confirming actions before executing (especially destructive/irreversible ones)
22
+ - Getting approval for sensitive actions (financial, messaging, deletion, etc.)
23
+ - Any situation where you need user input to proceed
24
+
25
+ ## Parameters
26
+
27
+ ```json
28
+ {
29
+ "questions": [{
30
+ "question": "Your question to the user",
31
+ "header": "Short label (max 12 chars)",
32
+ "options": [
33
+ { "label": "Option 1", "description": "What this does" },
34
+ { "label": "Option 2", "description": "What this does" }
35
+ ],
36
+ "multiSelect": false
37
+ }]
38
+ }
39
+ ```
40
+
41
+ - `question` (required): The question text to display
42
+ - `header` (optional): Short category label, shown as modal title (max 12 chars)
43
+ - `options` (optional): Array of selectable choices (2-4 recommended)
44
+ - `multiSelect` (optional): Allow selecting multiple options (default: false)
45
+
46
+ **Custom text input:** To allow users to type their own response, include an option with label "Other" (case-insensitive). When selected, the UI shows a text input field.
47
+
48
+ ```json
49
+ { "label": "Other", "description": "Type your own response" }
50
+ ```
51
+
52
+ **Important:** When "Other" is selected, the response will be `User responded: [their text]` instead of `User selected: Other`. You must wait for and handle this text response - do NOT proceed as if they selected a predefined option.
53
+
54
+ ## Examples
55
+
56
+ ### Asking about organization preferences
57
+
58
+ ```
59
+ AskUserQuestion({
60
+ "questions": [{
61
+ "question": "How would you like to organize your Downloads folder?",
62
+ "header": "Organize",
63
+ "options": [
64
+ { "label": "By file type", "description": "Group into Documents, Images, Videos, etc." },
65
+ { "label": "By date", "description": "Group by month/year" },
66
+ { "label": "By project", "description": "You'll help me name project folders" }
67
+ ]
68
+ }]
69
+ })
70
+ ```
71
+
72
+ ### Confirming a destructive action
73
+
74
+ ```
75
+ AskUserQuestion({
76
+ "questions": [{
77
+ "question": "Delete these 15 duplicate files?",
78
+ "header": "Confirm",
79
+ "options": [
80
+ { "label": "Delete all", "description": "Remove all 15 duplicates" },
81
+ { "label": "Review first", "description": "Show me the list before deleting" },
82
+ { "label": "Cancel", "description": "Don't delete anything" }
83
+ ]
84
+ }]
85
+ })
86
+ ```
87
+
88
+ ### Simple yes/no confirmation
89
+
90
+ ```
91
+ AskUserQuestion({
92
+ "questions": [{
93
+ "question": "Should I proceed with sending this email?",
94
+ "header": "Send email",
95
+ "options": [
96
+ { "label": "Send", "description": "Send the email now" },
97
+ { "label": "Cancel", "description": "Don't send" }
98
+ ]
99
+ }]
100
+ })
101
+ ```
102
+
103
+ ## Response Format
104
+
105
+ The tool returns the user's selection:
106
+ - `User selected: By file type` - Single selection
107
+ - `User selected: Option A, Option B` - Multiple selections (if multiSelect: true)
108
+ - `User responded: [custom text]` - If user typed a custom response
109
+ - `User declined to answer the question.` - If user dismissed the modal
110
+
111
+ ## Wrong vs Correct
112
+
113
+ **WRONG** (user won't see this):
114
+ ```
115
+ I'll help organize your files. How would you like them organized?
116
+ - By type
117
+ - By date
118
+ - By project
119
+ ```
120
+
121
+ **CORRECT** (user will see a modal):
122
+ ```
123
+ AskUserQuestion({
124
+ "questions": [{
125
+ "question": "How would you like your files organized?",
126
+ "options": [
127
+ { "label": "By type" },
128
+ { "label": "By date" },
129
+ { "label": "By project" }
130
+ ]
131
+ }]
132
+ })
133
+ ```