@useconductor/conductor 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (504) hide show
  1. package/.claude-plugin/marketplace.json +33 -0
  2. package/.claude-plugin/plugin.json +23 -0
  3. package/.eslintrc.json +23 -0
  4. package/.gitattributes +6 -0
  5. package/.github/FUNDING.yml +15 -0
  6. package/.github/ISSUE_TEMPLATE/bug_report.yml +91 -0
  7. package/.github/ISSUE_TEMPLATE/config.yml +8 -0
  8. package/.github/ISSUE_TEMPLATE/feature_request.yml +63 -0
  9. package/.github/ISSUE_TEMPLATE/plugin_request.yml +71 -0
  10. package/.github/README.md +13 -0
  11. package/.github/workflows/README.md +22 -0
  12. package/.github/workflows/auto-release.yml +112 -0
  13. package/.github/workflows/ci.yml +49 -0
  14. package/.github/workflows/claude-code-review.yml +44 -0
  15. package/.github/workflows/claude.yml +36 -0
  16. package/.github/workflows/sync-install.yml +47 -0
  17. package/.mcp.json +9 -0
  18. package/.prettierrc.json +7 -0
  19. package/C.png +0 -0
  20. package/CHANGELOG.md +74 -0
  21. package/CLAUDE.md +118 -0
  22. package/CONTRIBUTING.md +231 -0
  23. package/LICENSE +201 -0
  24. package/README.md +179 -0
  25. package/SECURITY.md +47 -0
  26. package/commands/conductor-setup.md +11 -0
  27. package/commands/conductor-status.md +7 -0
  28. package/dist/ai/base.d.ts +44 -0
  29. package/dist/ai/base.d.ts.map +1 -0
  30. package/dist/ai/base.js +47 -0
  31. package/dist/ai/base.js.map +1 -0
  32. package/dist/ai/claude.d.ts +11 -0
  33. package/dist/ai/claude.d.ts.map +1 -0
  34. package/dist/ai/claude.js +149 -0
  35. package/dist/ai/claude.js.map +1 -0
  36. package/dist/ai/gemini.d.ts +15 -0
  37. package/dist/ai/gemini.d.ts.map +1 -0
  38. package/dist/ai/gemini.js +156 -0
  39. package/dist/ai/gemini.js.map +1 -0
  40. package/dist/ai/maestro.d.ts +22 -0
  41. package/dist/ai/maestro.d.ts.map +1 -0
  42. package/dist/ai/maestro.js +142 -0
  43. package/dist/ai/maestro.js.map +1 -0
  44. package/dist/ai/manager.d.ts +47 -0
  45. package/dist/ai/manager.d.ts.map +1 -0
  46. package/dist/ai/manager.js +450 -0
  47. package/dist/ai/manager.js.map +1 -0
  48. package/dist/ai/ollama.d.ts +16 -0
  49. package/dist/ai/ollama.d.ts.map +1 -0
  50. package/dist/ai/ollama.js +151 -0
  51. package/dist/ai/ollama.js.map +1 -0
  52. package/dist/ai/openai.d.ts +11 -0
  53. package/dist/ai/openai.d.ts.map +1 -0
  54. package/dist/ai/openai.js +132 -0
  55. package/dist/ai/openai.js.map +1 -0
  56. package/dist/ai/openrouter.d.ts +11 -0
  57. package/dist/ai/openrouter.d.ts.map +1 -0
  58. package/dist/ai/openrouter.js +139 -0
  59. package/dist/ai/openrouter.js.map +1 -0
  60. package/dist/bot/slack.d.ts +17 -0
  61. package/dist/bot/slack.d.ts.map +1 -0
  62. package/dist/bot/slack.js +144 -0
  63. package/dist/bot/slack.js.map +1 -0
  64. package/dist/bot/telegram.d.ts +19 -0
  65. package/dist/bot/telegram.d.ts.map +1 -0
  66. package/dist/bot/telegram.js +157 -0
  67. package/dist/bot/telegram.js.map +1 -0
  68. package/dist/cli/commands/ai.d.ts +4 -0
  69. package/dist/cli/commands/ai.d.ts.map +1 -0
  70. package/dist/cli/commands/ai.js +161 -0
  71. package/dist/cli/commands/ai.js.map +1 -0
  72. package/dist/cli/commands/doctor.d.ts +18 -0
  73. package/dist/cli/commands/doctor.d.ts.map +1 -0
  74. package/dist/cli/commands/doctor.js +213 -0
  75. package/dist/cli/commands/doctor.js.map +1 -0
  76. package/dist/cli/commands/init.d.ts +15 -0
  77. package/dist/cli/commands/init.d.ts.map +1 -0
  78. package/dist/cli/commands/init.js +281 -0
  79. package/dist/cli/commands/init.js.map +1 -0
  80. package/dist/cli/commands/install.d.ts +16 -0
  81. package/dist/cli/commands/install.d.ts.map +1 -0
  82. package/dist/cli/commands/install.js +750 -0
  83. package/dist/cli/commands/install.js.map +1 -0
  84. package/dist/cli/commands/lifecycle.d.ts +4 -0
  85. package/dist/cli/commands/lifecycle.d.ts.map +1 -0
  86. package/dist/cli/commands/lifecycle.js +84 -0
  87. package/dist/cli/commands/lifecycle.js.map +1 -0
  88. package/dist/cli/commands/marketplace.d.ts +13 -0
  89. package/dist/cli/commands/marketplace.d.ts.map +1 -0
  90. package/dist/cli/commands/marketplace.js +197 -0
  91. package/dist/cli/commands/marketplace.js.map +1 -0
  92. package/dist/cli/commands/mcp.d.ts +6 -0
  93. package/dist/cli/commands/mcp.d.ts.map +1 -0
  94. package/dist/cli/commands/mcp.js +83 -0
  95. package/dist/cli/commands/mcp.js.map +1 -0
  96. package/dist/cli/commands/onboard.d.ts +10 -0
  97. package/dist/cli/commands/onboard.d.ts.map +1 -0
  98. package/dist/cli/commands/onboard.js +207 -0
  99. package/dist/cli/commands/onboard.js.map +1 -0
  100. package/dist/cli/commands/plugin-create.d.ts +13 -0
  101. package/dist/cli/commands/plugin-create.d.ts.map +1 -0
  102. package/dist/cli/commands/plugin-create.js +122 -0
  103. package/dist/cli/commands/plugin-create.js.map +1 -0
  104. package/dist/cli/commands/plugins.d.ts +5 -0
  105. package/dist/cli/commands/plugins.d.ts.map +1 -0
  106. package/dist/cli/commands/plugins.js +30 -0
  107. package/dist/cli/commands/plugins.js.map +1 -0
  108. package/dist/cli/commands/release.d.ts +13 -0
  109. package/dist/cli/commands/release.d.ts.map +1 -0
  110. package/dist/cli/commands/release.js +243 -0
  111. package/dist/cli/commands/release.js.map +1 -0
  112. package/dist/cli/commands/telegram.d.ts +3 -0
  113. package/dist/cli/commands/telegram.d.ts.map +1 -0
  114. package/dist/cli/commands/telegram.js +20 -0
  115. package/dist/cli/commands/telegram.js.map +1 -0
  116. package/dist/cli/index.d.ts +3 -0
  117. package/dist/cli/index.d.ts.map +1 -0
  118. package/dist/cli/index.js +402 -0
  119. package/dist/cli/index.js.map +1 -0
  120. package/dist/config/oauth.d.ts +8 -0
  121. package/dist/config/oauth.d.ts.map +1 -0
  122. package/dist/config/oauth.js +13 -0
  123. package/dist/config/oauth.js.map +1 -0
  124. package/dist/core/audit.d.ts +91 -0
  125. package/dist/core/audit.d.ts.map +1 -0
  126. package/dist/core/audit.js +233 -0
  127. package/dist/core/audit.js.map +1 -0
  128. package/dist/core/circuit-breaker.d.ts +56 -0
  129. package/dist/core/circuit-breaker.d.ts.map +1 -0
  130. package/dist/core/circuit-breaker.js +107 -0
  131. package/dist/core/circuit-breaker.js.map +1 -0
  132. package/dist/core/conductor.d.ts +44 -0
  133. package/dist/core/conductor.d.ts.map +1 -0
  134. package/dist/core/conductor.js +200 -0
  135. package/dist/core/conductor.js.map +1 -0
  136. package/dist/core/config.d.ts +66 -0
  137. package/dist/core/config.d.ts.map +1 -0
  138. package/dist/core/config.js +86 -0
  139. package/dist/core/config.js.map +1 -0
  140. package/dist/core/database.d.ts +59 -0
  141. package/dist/core/database.d.ts.map +1 -0
  142. package/dist/core/database.js +342 -0
  143. package/dist/core/database.js.map +1 -0
  144. package/dist/core/errors.d.ts +231 -0
  145. package/dist/core/errors.d.ts.map +1 -0
  146. package/dist/core/errors.js +254 -0
  147. package/dist/core/errors.js.map +1 -0
  148. package/dist/core/health.d.ts +72 -0
  149. package/dist/core/health.d.ts.map +1 -0
  150. package/dist/core/health.js +116 -0
  151. package/dist/core/health.js.map +1 -0
  152. package/dist/core/interfaces.d.ts +62 -0
  153. package/dist/core/interfaces.d.ts.map +1 -0
  154. package/dist/core/interfaces.js +8 -0
  155. package/dist/core/interfaces.js.map +1 -0
  156. package/dist/core/logger.d.ts +15 -0
  157. package/dist/core/logger.d.ts.map +1 -0
  158. package/dist/core/logger.js +30 -0
  159. package/dist/core/logger.js.map +1 -0
  160. package/dist/core/rbac.d.ts +132 -0
  161. package/dist/core/rbac.d.ts.map +1 -0
  162. package/dist/core/rbac.js +230 -0
  163. package/dist/core/rbac.js.map +1 -0
  164. package/dist/core/retry.d.ts +22 -0
  165. package/dist/core/retry.d.ts.map +1 -0
  166. package/dist/core/retry.js +41 -0
  167. package/dist/core/retry.js.map +1 -0
  168. package/dist/core/webhooks.d.ts +92 -0
  169. package/dist/core/webhooks.d.ts.map +1 -0
  170. package/dist/core/webhooks.js +176 -0
  171. package/dist/core/webhooks.js.map +1 -0
  172. package/dist/core/zero-config.d.ts +22 -0
  173. package/dist/core/zero-config.d.ts.map +1 -0
  174. package/dist/core/zero-config.js +59 -0
  175. package/dist/core/zero-config.js.map +1 -0
  176. package/dist/dashboard/cli.d.ts +6 -0
  177. package/dist/dashboard/cli.d.ts.map +1 -0
  178. package/dist/dashboard/cli.js +42 -0
  179. package/dist/dashboard/cli.js.map +1 -0
  180. package/dist/dashboard/index.html +3426 -0
  181. package/dist/dashboard/server.d.ts +7 -0
  182. package/dist/dashboard/server.d.ts.map +1 -0
  183. package/dist/dashboard/server.js +1427 -0
  184. package/dist/dashboard/server.js.map +1 -0
  185. package/dist/mcp/server.d.ts +27 -0
  186. package/dist/mcp/server.d.ts.map +1 -0
  187. package/dist/mcp/server.js +380 -0
  188. package/dist/mcp/server.js.map +1 -0
  189. package/dist/mcp/tools/misc.d.ts +15 -0
  190. package/dist/mcp/tools/misc.d.ts.map +1 -0
  191. package/dist/mcp/tools/misc.js +49 -0
  192. package/dist/mcp/tools/misc.js.map +1 -0
  193. package/dist/plugins/builtin/calculator.d.ts +11 -0
  194. package/dist/plugins/builtin/calculator.d.ts.map +1 -0
  195. package/dist/plugins/builtin/calculator.js +166 -0
  196. package/dist/plugins/builtin/calculator.js.map +1 -0
  197. package/dist/plugins/builtin/colors.d.ts +15 -0
  198. package/dist/plugins/builtin/colors.d.ts.map +1 -0
  199. package/dist/plugins/builtin/colors.js +193 -0
  200. package/dist/plugins/builtin/colors.js.map +1 -0
  201. package/dist/plugins/builtin/cron.d.ts +40 -0
  202. package/dist/plugins/builtin/cron.d.ts.map +1 -0
  203. package/dist/plugins/builtin/cron.js +578 -0
  204. package/dist/plugins/builtin/cron.js.map +1 -0
  205. package/dist/plugins/builtin/crypto.d.ts +11 -0
  206. package/dist/plugins/builtin/crypto.d.ts.map +1 -0
  207. package/dist/plugins/builtin/crypto.js +83 -0
  208. package/dist/plugins/builtin/crypto.js.map +1 -0
  209. package/dist/plugins/builtin/database.d.ts +29 -0
  210. package/dist/plugins/builtin/database.d.ts.map +1 -0
  211. package/dist/plugins/builtin/database.js +230 -0
  212. package/dist/plugins/builtin/database.js.map +1 -0
  213. package/dist/plugins/builtin/docker.d.ts +12 -0
  214. package/dist/plugins/builtin/docker.d.ts.map +1 -0
  215. package/dist/plugins/builtin/docker.js +436 -0
  216. package/dist/plugins/builtin/docker.js.map +1 -0
  217. package/dist/plugins/builtin/fun.d.ts +11 -0
  218. package/dist/plugins/builtin/fun.d.ts.map +1 -0
  219. package/dist/plugins/builtin/fun.js +114 -0
  220. package/dist/plugins/builtin/fun.js.map +1 -0
  221. package/dist/plugins/builtin/gcal.d.ts +38 -0
  222. package/dist/plugins/builtin/gcal.d.ts.map +1 -0
  223. package/dist/plugins/builtin/gcal.js +280 -0
  224. package/dist/plugins/builtin/gcal.js.map +1 -0
  225. package/dist/plugins/builtin/gdrive.d.ts +26 -0
  226. package/dist/plugins/builtin/gdrive.d.ts.map +1 -0
  227. package/dist/plugins/builtin/gdrive.js +295 -0
  228. package/dist/plugins/builtin/gdrive.js.map +1 -0
  229. package/dist/plugins/builtin/github-actions.d.ts +38 -0
  230. package/dist/plugins/builtin/github-actions.d.ts.map +1 -0
  231. package/dist/plugins/builtin/github-actions.js +629 -0
  232. package/dist/plugins/builtin/github-actions.js.map +1 -0
  233. package/dist/plugins/builtin/github.d.ts +26 -0
  234. package/dist/plugins/builtin/github.d.ts.map +1 -0
  235. package/dist/plugins/builtin/github.js +800 -0
  236. package/dist/plugins/builtin/github.js.map +1 -0
  237. package/dist/plugins/builtin/gmail.d.ts +50 -0
  238. package/dist/plugins/builtin/gmail.d.ts.map +1 -0
  239. package/dist/plugins/builtin/gmail.js +445 -0
  240. package/dist/plugins/builtin/gmail.js.map +1 -0
  241. package/dist/plugins/builtin/hash.d.ts +11 -0
  242. package/dist/plugins/builtin/hash.d.ts.map +1 -0
  243. package/dist/plugins/builtin/hash.js +95 -0
  244. package/dist/plugins/builtin/hash.js.map +1 -0
  245. package/dist/plugins/builtin/homekit.d.ts +53 -0
  246. package/dist/plugins/builtin/homekit.d.ts.map +1 -0
  247. package/dist/plugins/builtin/homekit.js +341 -0
  248. package/dist/plugins/builtin/homekit.js.map +1 -0
  249. package/dist/plugins/builtin/index.d.ts +4 -0
  250. package/dist/plugins/builtin/index.d.ts.map +1 -0
  251. package/dist/plugins/builtin/index.js +96 -0
  252. package/dist/plugins/builtin/index.js.map +1 -0
  253. package/dist/plugins/builtin/jira.d.ts +50 -0
  254. package/dist/plugins/builtin/jira.d.ts.map +1 -0
  255. package/dist/plugins/builtin/jira.js +353 -0
  256. package/dist/plugins/builtin/jira.js.map +1 -0
  257. package/dist/plugins/builtin/linear.d.ts +35 -0
  258. package/dist/plugins/builtin/linear.d.ts.map +1 -0
  259. package/dist/plugins/builtin/linear.js +397 -0
  260. package/dist/plugins/builtin/linear.js.map +1 -0
  261. package/dist/plugins/builtin/lumen.d.ts +21 -0
  262. package/dist/plugins/builtin/lumen.d.ts.map +1 -0
  263. package/dist/plugins/builtin/lumen.js +404 -0
  264. package/dist/plugins/builtin/lumen.js.map +1 -0
  265. package/dist/plugins/builtin/memory.d.ts +22 -0
  266. package/dist/plugins/builtin/memory.d.ts.map +1 -0
  267. package/dist/plugins/builtin/memory.js +184 -0
  268. package/dist/plugins/builtin/memory.js.map +1 -0
  269. package/dist/plugins/builtin/n8n.d.ts +60 -0
  270. package/dist/plugins/builtin/n8n.d.ts.map +1 -0
  271. package/dist/plugins/builtin/n8n.js +519 -0
  272. package/dist/plugins/builtin/n8n.js.map +1 -0
  273. package/dist/plugins/builtin/network.d.ts +11 -0
  274. package/dist/plugins/builtin/network.d.ts.map +1 -0
  275. package/dist/plugins/builtin/network.js +88 -0
  276. package/dist/plugins/builtin/network.js.map +1 -0
  277. package/dist/plugins/builtin/notes.d.ts +47 -0
  278. package/dist/plugins/builtin/notes.d.ts.map +1 -0
  279. package/dist/plugins/builtin/notes.js +641 -0
  280. package/dist/plugins/builtin/notes.js.map +1 -0
  281. package/dist/plugins/builtin/notion.d.ts +47 -0
  282. package/dist/plugins/builtin/notion.d.ts.map +1 -0
  283. package/dist/plugins/builtin/notion.js +317 -0
  284. package/dist/plugins/builtin/notion.js.map +1 -0
  285. package/dist/plugins/builtin/shell.d.ts +12 -0
  286. package/dist/plugins/builtin/shell.d.ts.map +1 -0
  287. package/dist/plugins/builtin/shell.js +310 -0
  288. package/dist/plugins/builtin/shell.js.map +1 -0
  289. package/dist/plugins/builtin/slack.d.ts +31 -0
  290. package/dist/plugins/builtin/slack.d.ts.map +1 -0
  291. package/dist/plugins/builtin/slack.js +295 -0
  292. package/dist/plugins/builtin/slack.js.map +1 -0
  293. package/dist/plugins/builtin/spotify.d.ts +55 -0
  294. package/dist/plugins/builtin/spotify.d.ts.map +1 -0
  295. package/dist/plugins/builtin/spotify.js +623 -0
  296. package/dist/plugins/builtin/spotify.js.map +1 -0
  297. package/dist/plugins/builtin/stripe.d.ts +35 -0
  298. package/dist/plugins/builtin/stripe.d.ts.map +1 -0
  299. package/dist/plugins/builtin/stripe.js +376 -0
  300. package/dist/plugins/builtin/stripe.js.map +1 -0
  301. package/dist/plugins/builtin/system.d.ts +11 -0
  302. package/dist/plugins/builtin/system.d.ts.map +1 -0
  303. package/dist/plugins/builtin/system.js +91 -0
  304. package/dist/plugins/builtin/system.js.map +1 -0
  305. package/dist/plugins/builtin/text-tools.d.ts +11 -0
  306. package/dist/plugins/builtin/text-tools.d.ts.map +1 -0
  307. package/dist/plugins/builtin/text-tools.js +146 -0
  308. package/dist/plugins/builtin/text-tools.js.map +1 -0
  309. package/dist/plugins/builtin/timezone.d.ts +13 -0
  310. package/dist/plugins/builtin/timezone.d.ts.map +1 -0
  311. package/dist/plugins/builtin/timezone.js +164 -0
  312. package/dist/plugins/builtin/timezone.js.map +1 -0
  313. package/dist/plugins/builtin/todoist.d.ts +49 -0
  314. package/dist/plugins/builtin/todoist.d.ts.map +1 -0
  315. package/dist/plugins/builtin/todoist.js +540 -0
  316. package/dist/plugins/builtin/todoist.js.map +1 -0
  317. package/dist/plugins/builtin/translate.d.ts +11 -0
  318. package/dist/plugins/builtin/translate.d.ts.map +1 -0
  319. package/dist/plugins/builtin/translate.js +42 -0
  320. package/dist/plugins/builtin/translate.js.map +1 -0
  321. package/dist/plugins/builtin/url-tools.d.ts +11 -0
  322. package/dist/plugins/builtin/url-tools.d.ts.map +1 -0
  323. package/dist/plugins/builtin/url-tools.js +70 -0
  324. package/dist/plugins/builtin/url-tools.js.map +1 -0
  325. package/dist/plugins/builtin/vercel.d.ts +55 -0
  326. package/dist/plugins/builtin/vercel.d.ts.map +1 -0
  327. package/dist/plugins/builtin/vercel.js +514 -0
  328. package/dist/plugins/builtin/vercel.js.map +1 -0
  329. package/dist/plugins/builtin/weather.d.ts +13 -0
  330. package/dist/plugins/builtin/weather.d.ts.map +1 -0
  331. package/dist/plugins/builtin/weather.js +103 -0
  332. package/dist/plugins/builtin/weather.js.map +1 -0
  333. package/dist/plugins/builtin/x.d.ts +54 -0
  334. package/dist/plugins/builtin/x.d.ts.map +1 -0
  335. package/dist/plugins/builtin/x.js +402 -0
  336. package/dist/plugins/builtin/x.js.map +1 -0
  337. package/dist/plugins/manager.d.ts +77 -0
  338. package/dist/plugins/manager.d.ts.map +1 -0
  339. package/dist/plugins/manager.js +141 -0
  340. package/dist/plugins/manager.js.map +1 -0
  341. package/dist/plugins/validation.d.ts +18 -0
  342. package/dist/plugins/validation.d.ts.map +1 -0
  343. package/dist/plugins/validation.js +81 -0
  344. package/dist/plugins/validation.js.map +1 -0
  345. package/dist/security/auth.d.ts +23 -0
  346. package/dist/security/auth.d.ts.map +1 -0
  347. package/dist/security/auth.js +56 -0
  348. package/dist/security/auth.js.map +1 -0
  349. package/dist/security/keychain.d.ts +60 -0
  350. package/dist/security/keychain.d.ts.map +1 -0
  351. package/dist/security/keychain.js +213 -0
  352. package/dist/security/keychain.js.map +1 -0
  353. package/dist/utils/google-auth.d.ts +21 -0
  354. package/dist/utils/google-auth.d.ts.map +1 -0
  355. package/dist/utils/google-auth.js +135 -0
  356. package/dist/utils/google-auth.js.map +1 -0
  357. package/dist/utils/retry.d.ts +5 -0
  358. package/dist/utils/retry.d.ts.map +1 -0
  359. package/dist/utils/retry.js +34 -0
  360. package/dist/utils/retry.js.map +1 -0
  361. package/docs/README.md +13 -0
  362. package/docs/api.md +210 -0
  363. package/docs/getting-started.md +100 -0
  364. package/docs/plugins.md +306 -0
  365. package/docs-site/.vitepress/config.ts +59 -0
  366. package/docs-site/README.md +12 -0
  367. package/docs-site/index.md +30 -0
  368. package/eslint.config.js +29 -0
  369. package/install.ps1 +334 -0
  370. package/install.sh +1119 -0
  371. package/local-install.sh +304 -0
  372. package/package.json +90 -0
  373. package/packages/README.md +11 -0
  374. package/packages/plugin-sdk/README.md +12 -0
  375. package/packages/plugin-sdk/package.json +22 -0
  376. package/packages/plugin-sdk/src/README.md +11 -0
  377. package/packages/plugin-sdk/src/index.ts +191 -0
  378. package/sdks/README.md +26 -0
  379. package/sdks/csharp/ConductorClient.cs +65 -0
  380. package/sdks/csharp/README.md +11 -0
  381. package/sdks/go/README.md +11 -0
  382. package/sdks/go/conductor.go +257 -0
  383. package/sdks/java/ConductorClient.java +27 -0
  384. package/sdks/java/README.md +11 -0
  385. package/sdks/php/README.md +11 -0
  386. package/sdks/php/src/Client.php +72 -0
  387. package/sdks/python/README.md +12 -0
  388. package/sdks/python/conductor/__init__.py +227 -0
  389. package/sdks/python/pyproject.toml +30 -0
  390. package/sdks/ruby/README.md +11 -0
  391. package/sdks/ruby/lib/conductor.rb +46 -0
  392. package/sdks/rust/Cargo.toml +14 -0
  393. package/sdks/rust/README.md +11 -0
  394. package/sdks/swift/README.md +11 -0
  395. package/sdks/swift/Sources/Conductor/ConductorClient.swift +65 -0
  396. package/skills/conductor-mcp/SKILL.md +38 -0
  397. package/src/README.md +20 -0
  398. package/src/ai/README.md +18 -0
  399. package/src/ai/base.ts +93 -0
  400. package/src/ai/claude.ts +162 -0
  401. package/src/ai/gemini.ts +188 -0
  402. package/src/ai/maestro.ts +168 -0
  403. package/src/ai/manager.ts +537 -0
  404. package/src/ai/ollama.ts +186 -0
  405. package/src/ai/openai.ts +147 -0
  406. package/src/ai/openrouter.ts +152 -0
  407. package/src/bot/README.md +12 -0
  408. package/src/bot/slack.ts +164 -0
  409. package/src/bot/telegram.ts +185 -0
  410. package/src/cli/README.md +24 -0
  411. package/src/cli/commands/README.md +20 -0
  412. package/src/cli/commands/ai.ts +170 -0
  413. package/src/cli/commands/doctor.ts +221 -0
  414. package/src/cli/commands/init.ts +348 -0
  415. package/src/cli/commands/install.ts +792 -0
  416. package/src/cli/commands/lifecycle.ts +95 -0
  417. package/src/cli/commands/marketplace.ts +253 -0
  418. package/src/cli/commands/mcp.ts +92 -0
  419. package/src/cli/commands/onboard.ts +248 -0
  420. package/src/cli/commands/plugin-create.ts +130 -0
  421. package/src/cli/commands/plugins.ts +36 -0
  422. package/src/cli/commands/release.ts +251 -0
  423. package/src/cli/commands/telegram.ts +25 -0
  424. package/src/cli/index.ts +450 -0
  425. package/src/config/README.md +11 -0
  426. package/src/config/oauth.ts +26 -0
  427. package/src/core/README.md +22 -0
  428. package/src/core/audit.ts +291 -0
  429. package/src/core/circuit-breaker.ts +129 -0
  430. package/src/core/conductor.ts +240 -0
  431. package/src/core/config.ts +149 -0
  432. package/src/core/database.ts +411 -0
  433. package/src/core/errors.ts +275 -0
  434. package/src/core/health.ts +159 -0
  435. package/src/core/interfaces.ts +75 -0
  436. package/src/core/logger.ts +33 -0
  437. package/src/core/rbac.ts +321 -0
  438. package/src/core/retry.ts +61 -0
  439. package/src/core/webhooks.ts +234 -0
  440. package/src/core/zero-config.ts +72 -0
  441. package/src/dashboard/README.md +15 -0
  442. package/src/dashboard/cli.ts +48 -0
  443. package/src/dashboard/index.html +3426 -0
  444. package/src/dashboard/server.ts +1544 -0
  445. package/src/mcp/README.md +20 -0
  446. package/src/mcp/server.ts +475 -0
  447. package/src/mcp/tools/README.md +11 -0
  448. package/src/mcp/tools/misc.ts +61 -0
  449. package/src/plugins/README.md +28 -0
  450. package/src/plugins/builtin/README.md +23 -0
  451. package/src/plugins/builtin/calculator.ts +178 -0
  452. package/src/plugins/builtin/colors.ts +201 -0
  453. package/src/plugins/builtin/cron.ts +649 -0
  454. package/src/plugins/builtin/crypto.ts +85 -0
  455. package/src/plugins/builtin/database.ts +235 -0
  456. package/src/plugins/builtin/docker.ts +426 -0
  457. package/src/plugins/builtin/fun.ts +118 -0
  458. package/src/plugins/builtin/gcal.ts +305 -0
  459. package/src/plugins/builtin/gdrive.ts +326 -0
  460. package/src/plugins/builtin/github-actions.ts +666 -0
  461. package/src/plugins/builtin/github.ts +912 -0
  462. package/src/plugins/builtin/gmail.ts +492 -0
  463. package/src/plugins/builtin/hash.ts +98 -0
  464. package/src/plugins/builtin/homekit.ts +389 -0
  465. package/src/plugins/builtin/index.ts +116 -0
  466. package/src/plugins/builtin/jira.ts +380 -0
  467. package/src/plugins/builtin/linear.ts +448 -0
  468. package/src/plugins/builtin/lumen.ts +497 -0
  469. package/src/plugins/builtin/memory.ts +200 -0
  470. package/src/plugins/builtin/n8n.ts +565 -0
  471. package/src/plugins/builtin/network.ts +92 -0
  472. package/src/plugins/builtin/notes.ts +689 -0
  473. package/src/plugins/builtin/notion.ts +348 -0
  474. package/src/plugins/builtin/shell.ts +334 -0
  475. package/src/plugins/builtin/slack.ts +327 -0
  476. package/src/plugins/builtin/spotify.ts +665 -0
  477. package/src/plugins/builtin/stripe.ts +388 -0
  478. package/src/plugins/builtin/system.ts +93 -0
  479. package/src/plugins/builtin/text-tools.ts +150 -0
  480. package/src/plugins/builtin/timezone.ts +173 -0
  481. package/src/plugins/builtin/todoist.ts +625 -0
  482. package/src/plugins/builtin/translate.ts +47 -0
  483. package/src/plugins/builtin/url-tools.ts +73 -0
  484. package/src/plugins/builtin/vercel.ts +546 -0
  485. package/src/plugins/builtin/weather.ts +112 -0
  486. package/src/plugins/builtin/x.ts +440 -0
  487. package/src/plugins/manager.ts +213 -0
  488. package/src/plugins/validation.ts +94 -0
  489. package/src/security/README.md +12 -0
  490. package/src/security/auth.ts +72 -0
  491. package/src/security/keychain.ts +226 -0
  492. package/src/utils/README.md +12 -0
  493. package/src/utils/google-auth.ts +159 -0
  494. package/src/utils/retry.ts +41 -0
  495. package/test-all.mjs +1256 -0
  496. package/test.mjs +633 -0
  497. package/tests/README.md +19 -0
  498. package/tests/calculator.test.ts +54 -0
  499. package/tests/docker.test.ts +42 -0
  500. package/tests/load.test.ts +129 -0
  501. package/tests/mcp.test.ts +14 -0
  502. package/tests/shell.test.ts +42 -0
  503. package/tsconfig.json +21 -0
  504. package/vitest.config.ts +14 -0
@@ -0,0 +1,565 @@
1
+ /**
2
+ * n8n Plugin — TheAlxLabs / Conductor
3
+ *
4
+ * Full n8n automation platform integration:
5
+ * - Workflows: list, activate/deactivate, get structure, trigger manually
6
+ * - Executions: list, inspect, retry, delete
7
+ * - Webhooks: trigger webhook-based workflows with custom payloads
8
+ * - Credentials: list (no secrets exposed)
9
+ * - Tags: organize and filter workflows by tag
10
+ * - Health: instance status and queue metrics
11
+ *
12
+ * Works with both self-hosted n8n and n8n Cloud.
13
+ *
14
+ * Setup:
15
+ * 1. n8n → Settings → API → Create API Key
16
+ * 2. Run: conductor plugins config n8n api_key <YOUR_KEY>
17
+ * 3. Run: conductor plugins config n8n base_url <YOUR_N8N_URL>
18
+ * e.g. https://n8n.yourdomain.com or https://app.n8n.cloud/api
19
+ *
20
+ * Keychain: n8n / api_key, n8n / base_url
21
+ */
22
+
23
+ import { Plugin, PluginTool } from '../manager.js';
24
+ import { Conductor } from '../../core/conductor.js';
25
+ import { Keychain } from '../../security/keychain.js';
26
+
27
+ export class N8nPlugin implements Plugin {
28
+ name = 'n8n';
29
+ description = 'Trigger and manage n8n workflows, inspect executions, fire webhooks — requires n8n API key';
30
+ version = '1.0.0';
31
+
32
+ configSchema = {
33
+ fields: [
34
+ {
35
+ key: 'api_key',
36
+ label: 'n8n API Key',
37
+ type: 'password' as const,
38
+ required: true,
39
+ secret: true,
40
+ service: 'n8n',
41
+ },
42
+ {
43
+ key: 'base_url',
44
+ label: 'n8n Instance URL',
45
+ type: 'string' as const,
46
+ required: true,
47
+ secret: false,
48
+ description: 'e.g. https://n8n.yourdomain.com',
49
+ },
50
+ ],
51
+ setupInstructions: 'Create an API Key in your n8n instance: Settings > API > Create Key.',
52
+ };
53
+
54
+ private keychain!: Keychain;
55
+
56
+ async initialize(conductor: Conductor): Promise<void> {
57
+ this.keychain = new Keychain(conductor.getConfig().getConfigDir());
58
+ }
59
+
60
+ isConfigured(): boolean {
61
+ return true;
62
+ }
63
+
64
+ private async getConfig(): Promise<{ apiKey: string; baseUrl: string }> {
65
+ const apiKey = await this.keychain.get('n8n', 'api_key');
66
+ if (!apiKey) {
67
+ throw new Error(
68
+ 'n8n API key not configured.\n' +
69
+ 'Get one from your n8n instance: Settings → API → Create Key\n' +
70
+ 'Then run: conductor plugins config n8n api_key <KEY>',
71
+ );
72
+ }
73
+ const rawUrl = await this.keychain.get('n8n', 'base_url');
74
+ let baseUrl = (rawUrl ?? 'http://localhost:5678').replace(/\/$/, '');
75
+ if (!baseUrl.endsWith('/api/v1')) baseUrl = `${baseUrl}/api/v1`;
76
+ return { apiKey, baseUrl };
77
+ }
78
+
79
+ private async n8nFetch(
80
+ path: string,
81
+ options: { method?: string; body?: any; params?: Record<string, string> } = {},
82
+ ): Promise<any> {
83
+ const { apiKey, baseUrl } = await this.getConfig();
84
+ const url = new URL(`${baseUrl}${path}`);
85
+ if (options.params) {
86
+ for (const [k, v] of Object.entries(options.params)) url.searchParams.set(k, v);
87
+ }
88
+
89
+ const res = await fetch(url.toString(), {
90
+ method: options.method ?? 'GET',
91
+ headers: {
92
+ 'X-N8N-API-KEY': apiKey,
93
+ 'Content-Type': 'application/json',
94
+ Accept: 'application/json',
95
+ },
96
+ body: options.body ? JSON.stringify(options.body) : undefined,
97
+ });
98
+
99
+ if (res.status === 204) return {};
100
+ if (!res.ok) {
101
+ const err = (await res.json().catch(() => ({ message: res.statusText }))) as any;
102
+ throw new Error(`n8n API ${res.status}: ${err.message ?? res.statusText}`);
103
+ }
104
+ return res.json();
105
+ }
106
+
107
+ private async webhookFetch(
108
+ webhookUrl: string,
109
+ method: string,
110
+ body?: any,
111
+ headers?: Record<string, string>,
112
+ ): Promise<any> {
113
+ const res = await fetch(webhookUrl, {
114
+ method,
115
+ headers: { 'Content-Type': 'application/json', ...(headers ?? {}) },
116
+ body: body ? JSON.stringify(body) : undefined,
117
+ });
118
+ if (!res.ok) {
119
+ throw new Error(`Webhook ${res.status}: ${res.statusText}`);
120
+ }
121
+ const ct = res.headers.get('content-type') ?? '';
122
+ if (ct.includes('application/json')) return res.json();
123
+ return { response: await res.text() };
124
+ }
125
+
126
+ private formatWorkflow(w: any) {
127
+ return {
128
+ id: w.id,
129
+ name: w.name,
130
+ active: w.active ?? false,
131
+ nodeCount: (w.nodes ?? []).length,
132
+ triggerType: this.detectTriggerType(w.nodes ?? []),
133
+ webhookPath: this.extractWebhookPath(w.nodes ?? []),
134
+ tags: (w.tags ?? []).map((t: any) => (typeof t === 'string' ? t : t.name)),
135
+ createdAt: w.createdAt ?? null,
136
+ updatedAt: w.updatedAt ?? null,
137
+ };
138
+ }
139
+
140
+ private formatExecution(e: any) {
141
+ const duration =
142
+ e.startedAt && e.stoppedAt
143
+ ? `${Math.round((new Date(e.stoppedAt).getTime() - new Date(e.startedAt).getTime()) / 1000)}s`
144
+ : null;
145
+ return {
146
+ id: e.id,
147
+ workflowId: e.workflowId,
148
+ workflowName: e.workflowData?.name ?? null,
149
+ status: (e.status ?? e.finished) ? 'success' : 'running',
150
+ mode: e.mode ?? 'unknown',
151
+ startedAt: e.startedAt ?? null,
152
+ stoppedAt: e.stoppedAt ?? null,
153
+ duration,
154
+ nodeCount: Object.keys(e.data?.resultData?.runData ?? {}).length,
155
+ error: e.data?.resultData?.error?.message ?? null,
156
+ };
157
+ }
158
+
159
+ private detectTriggerType(nodes: any[]): string {
160
+ const triggerNode = nodes.find(
161
+ (n: any) => n.type?.includes('Trigger') || n.type?.includes('Webhook') || n.type?.includes('Cron'),
162
+ );
163
+ if (!triggerNode) return 'manual';
164
+ if (triggerNode.type?.includes('Webhook')) return 'webhook';
165
+ if (triggerNode.type?.includes('Cron') || triggerNode.type?.includes('Schedule')) return 'schedule';
166
+ if (triggerNode.type?.includes('EmailImap')) return 'email';
167
+ return triggerNode.type?.split('.').pop()?.replace('Trigger', '') ?? 'trigger';
168
+ }
169
+
170
+ private extractWebhookPath(nodes: any[]): string | null {
171
+ const webhookNode = nodes.find((n: any) => n.type === 'n8n-nodes-base.webhook' || n.type?.includes('Webhook'));
172
+ return webhookNode?.parameters?.path ?? webhookNode?.parameters?.webhookId ?? null;
173
+ }
174
+
175
+ getTools(): PluginTool[] {
176
+ return [
177
+ // ── n8n_workflows ───────────────────────────────────────────────────────
178
+ {
179
+ name: 'n8n_workflows',
180
+ description: 'List all n8n workflows with their active status and trigger type',
181
+ inputSchema: {
182
+ type: 'object',
183
+ properties: {
184
+ active: {
185
+ type: 'boolean',
186
+ description: 'Filter to only active or only inactive workflows',
187
+ },
188
+ tag: { type: 'string', description: 'Filter by tag name' },
189
+ limit: { type: 'number', description: 'Max workflows (default: 50)' },
190
+ search: { type: 'string', description: 'Search by workflow name' },
191
+ },
192
+ },
193
+ handler: async ({ active, tag, limit = 50, search }: any) => {
194
+ const params: Record<string, string> = {
195
+ limit: String(Math.min(limit, 250)),
196
+ };
197
+ if (active !== undefined) params.active = String(active);
198
+ if (tag) params.tags = tag;
199
+
200
+ const data = await this.n8nFetch('/workflows', { params });
201
+ let workflows = (data.data ?? data) as any[];
202
+
203
+ if (search) {
204
+ const q = search.toLowerCase();
205
+ workflows = workflows.filter((w: any) => w.name?.toLowerCase().includes(q));
206
+ }
207
+
208
+ const formatted = workflows.map(this.formatWorkflow.bind(this));
209
+ const activeCount = formatted.filter((w) => w.active).length;
210
+
211
+ return {
212
+ total: formatted.length,
213
+ active: activeCount,
214
+ inactive: formatted.length - activeCount,
215
+ workflows: formatted,
216
+ };
217
+ },
218
+ },
219
+
220
+ // ── n8n_workflow ────────────────────────────────────────────────────────
221
+ {
222
+ name: 'n8n_workflow',
223
+ description: 'Get full details of a specific n8n workflow including all nodes and connections',
224
+ inputSchema: {
225
+ type: 'object',
226
+ properties: {
227
+ id: { type: 'string', description: 'Workflow ID' },
228
+ },
229
+ required: ['id'],
230
+ },
231
+ handler: async ({ id }: any) => {
232
+ const w = await this.n8nFetch(`/workflows/${id}`);
233
+ return {
234
+ ...this.formatWorkflow(w),
235
+ nodes: (w.nodes ?? []).map((n: any) => ({
236
+ name: n.name,
237
+ type: n.type?.split('.').pop() ?? n.type,
238
+ position: n.position,
239
+ disabled: n.disabled ?? false,
240
+ hasCredentials: !!n.credentials,
241
+ })),
242
+ connections: Object.keys(w.connections ?? {}).length,
243
+ settings: w.settings ?? {},
244
+ };
245
+ },
246
+ },
247
+
248
+ // ── n8n_activate ────────────────────────────────────────────────────────
249
+ {
250
+ name: 'n8n_activate',
251
+ description: 'Activate or deactivate an n8n workflow',
252
+ requiresApproval: true,
253
+ inputSchema: {
254
+ type: 'object',
255
+ properties: {
256
+ id: { type: 'string', description: 'Workflow ID' },
257
+ active: { type: 'boolean', description: 'true = activate, false = deactivate' },
258
+ },
259
+ required: ['id', 'active'],
260
+ },
261
+ handler: async ({ id, active }: any) => {
262
+ await this.n8nFetch(`/workflows/${id}`, {
263
+ method: 'PATCH',
264
+ body: { active },
265
+ });
266
+ return { id, active, message: `Workflow ${active ? 'activated' : 'deactivated'}` };
267
+ },
268
+ },
269
+
270
+ // ── n8n_trigger ─────────────────────────────────────────────────────────
271
+ {
272
+ name: 'n8n_trigger',
273
+ description:
274
+ 'Manually trigger an n8n workflow execution. ' +
275
+ 'For webhook workflows, fires the webhook URL. ' +
276
+ 'For others, uses the n8n execute API.',
277
+ inputSchema: {
278
+ type: 'object',
279
+ properties: {
280
+ id: { type: 'string', description: 'Workflow ID' },
281
+ payload: {
282
+ type: 'object',
283
+ description: 'Data to pass to the workflow (for webhook triggers)',
284
+ },
285
+ waitForResult: {
286
+ type: 'boolean',
287
+ description: 'Wait for execution to complete and return result (default: false)',
288
+ },
289
+ },
290
+ required: ['id'],
291
+ },
292
+ handler: async ({ id, payload = {}, waitForResult = false }: any) => {
293
+ const workflow = await this.n8nFetch(`/workflows/${id}`);
294
+ const triggerType = this.detectTriggerType(workflow.nodes ?? []);
295
+ const webhookPath = this.extractWebhookPath(workflow.nodes ?? []);
296
+
297
+ if (triggerType === 'webhook' && webhookPath) {
298
+ const { baseUrl } = await this.getConfig();
299
+ const n8nBase = baseUrl.replace('/api/v1', '');
300
+ const webhookUrl = `${n8nBase}/webhook/${webhookPath}`;
301
+
302
+ const result = await this.webhookFetch(webhookUrl, 'POST', payload);
303
+ return {
304
+ triggered: true,
305
+ method: 'webhook',
306
+ webhookUrl,
307
+ workflowId: id,
308
+ workflowName: workflow.name,
309
+ response: result,
310
+ };
311
+ }
312
+
313
+ const result = await this.n8nFetch(`/workflows/${id}/run`, {
314
+ method: 'POST',
315
+ body: { runData: payload },
316
+ });
317
+
318
+ if (waitForResult) {
319
+ const execId = result.data?.executionId;
320
+ if (execId) {
321
+ for (let i = 0; i < 15; i++) {
322
+ await new Promise((r) => setTimeout(r, 2000));
323
+ const exec = await this.n8nFetch(`/executions/${execId}`).catch(() => null);
324
+ if (exec?.finished || exec?.status === 'error') {
325
+ return {
326
+ triggered: true,
327
+ method: 'execute',
328
+ workflowId: id,
329
+ execution: this.formatExecution(exec),
330
+ };
331
+ }
332
+ }
333
+ }
334
+ }
335
+
336
+ return {
337
+ triggered: true,
338
+ method: 'execute',
339
+ workflowId: id,
340
+ workflowName: workflow.name,
341
+ executionId: result.data?.executionId ?? null,
342
+ };
343
+ },
344
+ },
345
+
346
+ // ── n8n_webhook ─────────────────────────────────────────────────────────
347
+ {
348
+ name: 'n8n_webhook',
349
+ description:
350
+ 'Fire an n8n webhook directly by its path or full URL. ' +
351
+ 'Use this when you know the webhook path but not the workflow ID.',
352
+ inputSchema: {
353
+ type: 'object',
354
+ properties: {
355
+ path: {
356
+ type: 'string',
357
+ description: 'Webhook path (e.g. "my-hook") or full URL',
358
+ },
359
+ payload: { type: 'object', description: 'JSON body to send' },
360
+ method: {
361
+ type: 'string',
362
+ enum: ['GET', 'POST', 'PUT', 'PATCH'],
363
+ description: 'HTTP method (default: POST)',
364
+ },
365
+ headers: {
366
+ type: 'object',
367
+ description: 'Additional headers',
368
+ },
369
+ },
370
+ required: ['path'],
371
+ },
372
+ handler: async ({ path, payload, method = 'POST', headers }: any) => {
373
+ let url: string;
374
+ if (path.startsWith('http')) {
375
+ url = path;
376
+ } else {
377
+ const { baseUrl } = await this.getConfig();
378
+ const n8nBase = baseUrl.replace('/api/v1', '');
379
+ url = `${n8nBase}/webhook/${path.replace(/^\//, '')}`;
380
+ }
381
+
382
+ const result = await this.webhookFetch(url, method, payload, headers);
383
+ return { fired: true, url, method, response: result };
384
+ },
385
+ },
386
+
387
+ // ── n8n_executions ──────────────────────────────────────────────────────
388
+ {
389
+ name: 'n8n_executions',
390
+ description: 'List recent workflow executions with status and duration',
391
+ inputSchema: {
392
+ type: 'object',
393
+ properties: {
394
+ workflowId: { type: 'string', description: 'Filter by workflow ID' },
395
+ status: {
396
+ type: 'string',
397
+ enum: ['error', 'success', 'waiting', 'running'],
398
+ description: 'Filter by execution status',
399
+ },
400
+ limit: { type: 'number', description: 'Max executions (default: 20)' },
401
+ },
402
+ },
403
+ handler: async ({ workflowId, status, limit = 20 }: any) => {
404
+ const params: Record<string, string> = { limit: String(Math.min(limit, 100)) };
405
+ if (workflowId) params.workflowId = workflowId;
406
+ if (status) params.status = status;
407
+
408
+ const data = await this.n8nFetch('/executions', { params });
409
+ const executions = (data.data ?? data) as any[];
410
+
411
+ const formatted = executions.map(this.formatExecution.bind(this));
412
+ const errorCount = formatted.filter((e) => e.status === 'error').length;
413
+
414
+ return {
415
+ count: formatted.length,
416
+ errors: errorCount,
417
+ executions: formatted,
418
+ };
419
+ },
420
+ },
421
+
422
+ // ── n8n_execution ───────────────────────────────────────────────────────
423
+ {
424
+ name: 'n8n_execution',
425
+ description: 'Get detailed results of a specific workflow execution including node outputs',
426
+ inputSchema: {
427
+ type: 'object',
428
+ properties: {
429
+ id: { type: 'string', description: 'Execution ID' },
430
+ },
431
+ required: ['id'],
432
+ },
433
+ handler: async ({ id }: any) => {
434
+ const e = await this.n8nFetch(`/executions/${id}`);
435
+ const runData = e.data?.resultData?.runData ?? {};
436
+
437
+ const nodeResults = Object.entries(runData).map(([nodeName, runs]: [string, any]) => {
438
+ const lastRun = Array.isArray(runs) ? runs[runs.length - 1] : runs;
439
+ const outputData = lastRun?.data?.main?.[0] ?? [];
440
+ return {
441
+ node: nodeName,
442
+ itemCount: outputData.length,
443
+ error: lastRun?.error?.message ?? null,
444
+ sample: outputData[0]?.json ? JSON.stringify(outputData[0].json).slice(0, 500) : null,
445
+ };
446
+ });
447
+
448
+ return {
449
+ ...this.formatExecution(e),
450
+ nodeResults,
451
+ triggerData: e.data?.triggerData ?? null,
452
+ };
453
+ },
454
+ },
455
+
456
+ // ── n8n_retry ───────────────────────────────────────────────────────────
457
+ {
458
+ name: 'n8n_retry',
459
+ description: 'Retry a failed workflow execution',
460
+ inputSchema: {
461
+ type: 'object',
462
+ properties: {
463
+ executionId: { type: 'string', description: 'Execution ID to retry' },
464
+ loadWorkflow: {
465
+ type: 'boolean',
466
+ description: 'Load latest workflow version before retrying (default: false)',
467
+ },
468
+ },
469
+ required: ['executionId'],
470
+ },
471
+ handler: async ({ executionId, loadWorkflow = false }: any) => {
472
+ const result = await this.n8nFetch(`/executions/${executionId}/retry`, {
473
+ method: 'POST',
474
+ body: { loadWorkflow },
475
+ });
476
+ return {
477
+ retried: true,
478
+ originalId: executionId,
479
+ newExecutionId: result.data ?? result,
480
+ };
481
+ },
482
+ },
483
+
484
+ // ── n8n_delete_execution ────────────────────────────────────────────────
485
+ {
486
+ name: 'n8n_delete_execution',
487
+ description: 'Delete a workflow execution from n8n history',
488
+ requiresApproval: true,
489
+ inputSchema: {
490
+ type: 'object',
491
+ properties: {
492
+ executionId: { type: 'string', description: 'Execution ID to delete' },
493
+ },
494
+ required: ['executionId'],
495
+ },
496
+ handler: async ({ executionId }: any) => {
497
+ await this.n8nFetch(`/executions/${executionId}`, { method: 'DELETE' });
498
+ return { deleted: true, executionId };
499
+ },
500
+ },
501
+
502
+ // ── n8n_credentials ─────────────────────────────────────────────────────
503
+ {
504
+ name: 'n8n_credentials',
505
+ description: 'List credential types configured in n8n (names only — no secrets exposed)',
506
+ inputSchema: {
507
+ type: 'object',
508
+ properties: {
509
+ type: { type: 'string', description: 'Filter by credential type name' },
510
+ },
511
+ },
512
+ handler: async ({ type }: any) => {
513
+ const params: Record<string, string> = {};
514
+ if (type) params.filter = JSON.stringify({ type });
515
+ const data = await this.n8nFetch('/credentials', { params });
516
+ const creds = (data.data ?? data) as any[];
517
+ return {
518
+ count: creds.length,
519
+ credentials: creds.map((c: any) => ({
520
+ id: c.id,
521
+ name: c.name,
522
+ type: c.type,
523
+ createdAt: c.createdAt ?? null,
524
+ updatedAt: c.updatedAt ?? null,
525
+ })),
526
+ };
527
+ },
528
+ },
529
+
530
+ // ── n8n_tags ────────────────────────────────────────────────────────────
531
+ {
532
+ name: 'n8n_tags',
533
+ description: 'List all workflow tags in n8n',
534
+ inputSchema: { type: 'object', properties: {} },
535
+ handler: async () => {
536
+ const data = await this.n8nFetch('/tags');
537
+ const tags = (data.data ?? data) as any[];
538
+ return {
539
+ count: tags.length,
540
+ tags: tags.map((t: any) => ({ id: t.id, name: t.name })),
541
+ };
542
+ },
543
+ },
544
+
545
+ // ── n8n_health ──────────────────────────────────────────────────────────
546
+ {
547
+ name: 'n8n_health',
548
+ description: 'Check n8n instance health, version, and queue metrics',
549
+ inputSchema: { type: 'object', properties: {} },
550
+ handler: async () => {
551
+ const [health, version] = await Promise.allSettled([this.n8nFetch('/health'), this.n8nFetch('/version')]);
552
+
553
+ const { baseUrl } = await this.getConfig();
554
+
555
+ return {
556
+ instanceUrl: baseUrl.replace('/api/v1', ''),
557
+ healthy: health.status === 'fulfilled',
558
+ version: version.status === 'fulfilled' ? ((version.value as any).version ?? 'unknown') : 'unknown',
559
+ status: health.status === 'fulfilled' ? ((health.value as any).status ?? 'ok') : 'unreachable',
560
+ };
561
+ },
562
+ },
563
+ ];
564
+ }
565
+ }
@@ -0,0 +1,92 @@
1
+ import { Plugin, PluginTool } from '../manager.js';
2
+ import { Conductor } from '../../core/conductor.js';
3
+ import dns from 'dns/promises';
4
+
5
+ export class NetworkPlugin implements Plugin {
6
+ name = 'network';
7
+ description = 'DNS lookup, IP geolocation, public IP, port checking';
8
+ version = '1.0.0';
9
+
10
+ async initialize(_conductor: Conductor): Promise<void> {}
11
+ isConfigured(): boolean {
12
+ return true;
13
+ }
14
+
15
+ getTools(): PluginTool[] {
16
+ return [
17
+ {
18
+ name: 'dns_lookup',
19
+ description: 'Look up DNS records for a domain',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {
23
+ domain: { type: 'string', description: 'Domain to look up (e.g. google.com)' },
24
+ type: { type: 'string', description: 'Record type: A, AAAA, MX, TXT, NS, CNAME, SOA', default: 'A' },
25
+ },
26
+ required: ['domain'],
27
+ },
28
+ handler: async (input: { domain: string; type?: string }) => {
29
+ const t = (input.type || 'A').toUpperCase();
30
+ try {
31
+ switch (t) {
32
+ case 'A':
33
+ return { domain: input.domain, type: t, records: await dns.resolve4(input.domain) };
34
+ case 'AAAA':
35
+ return { domain: input.domain, type: t, records: await dns.resolve6(input.domain) };
36
+ case 'MX':
37
+ return { domain: input.domain, type: t, records: await dns.resolveMx(input.domain) };
38
+ case 'TXT':
39
+ return { domain: input.domain, type: t, records: await dns.resolveTxt(input.domain) };
40
+ case 'NS':
41
+ return { domain: input.domain, type: t, records: await dns.resolveNs(input.domain) };
42
+ case 'CNAME':
43
+ return { domain: input.domain, type: t, records: await dns.resolveCname(input.domain) };
44
+ case 'SOA':
45
+ return { domain: input.domain, type: t, records: await dns.resolveSoa(input.domain) };
46
+ default:
47
+ throw new Error(`Unsupported record type: ${t}`);
48
+ }
49
+ } catch (e: any) {
50
+ return { domain: input.domain, type: t, error: e.code || e.message };
51
+ }
52
+ },
53
+ },
54
+ {
55
+ name: 'ip_info',
56
+ description: 'Get geolocation and ISP info for an IP address (or your public IP)',
57
+ inputSchema: {
58
+ type: 'object',
59
+ properties: {
60
+ ip: { type: 'string', description: 'IP address (leave empty for your public IP)' },
61
+ },
62
+ },
63
+ handler: async (input: { ip?: string }) => {
64
+ const target = input.ip || '';
65
+ const res = await fetch(
66
+ `http://ip-api.com/json/${target}?fields=status,message,country,regionName,city,zip,lat,lon,timezone,isp,org,as,query`,
67
+ );
68
+ return await res.json();
69
+ },
70
+ },
71
+ {
72
+ name: 'reverse_dns',
73
+ description: 'Reverse DNS lookup — find hostnames for an IP address',
74
+ inputSchema: {
75
+ type: 'object',
76
+ properties: {
77
+ ip: { type: 'string', description: 'IP address to look up' },
78
+ },
79
+ required: ['ip'],
80
+ },
81
+ handler: async (input: { ip: string }) => {
82
+ try {
83
+ const hostnames = await dns.reverse(input.ip);
84
+ return { ip: input.ip, hostnames };
85
+ } catch (e: any) {
86
+ return { ip: input.ip, hostnames: [], error: e.code || e.message };
87
+ }
88
+ },
89
+ },
90
+ ];
91
+ }
92
+ }