@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,492 @@
1
+ /**
2
+ * Gmail Plugin
3
+ *
4
+ * Read, search, send, and manage Gmail via the Gmail REST API.
5
+ * Requires a Google OAuth access token stored in keychain as
6
+ * google / access_token
7
+ *
8
+ * Run `conductor ai setup google` or the OAuth flow to authenticate.
9
+ *
10
+ * Scopes needed:
11
+ * https://www.googleapis.com/auth/gmail.readonly
12
+ * https://www.googleapis.com/auth/gmail.send
13
+ * https://www.googleapis.com/auth/gmail.modify
14
+ */
15
+
16
+ import { Plugin, PluginTool } from '../manager.js';
17
+ import { Conductor } from '../../core/conductor.js';
18
+ import { Keychain } from '../../security/keychain.js';
19
+
20
+ const GMAIL_BASE = 'https://gmail.googleapis.com/gmail/v1/users/me';
21
+
22
+ export class GmailPlugin implements Plugin {
23
+ name = 'gmail';
24
+ description = 'Read, search, send, and manage Gmail — requires Google OAuth';
25
+ version = '1.0.0';
26
+
27
+ configSchema = {
28
+ fields: [
29
+ {
30
+ key: 'access_token',
31
+ label: 'Google Access Token',
32
+ type: 'password' as const,
33
+ required: true,
34
+ secret: true,
35
+ service: 'google',
36
+ description: 'Run "conductor auth google" to obtain this automatically.',
37
+ },
38
+ ],
39
+ setupInstructions:
40
+ 'Authentication for Google services is best handled via the CLI command `conductor auth google` which manages OAuth flows securely.',
41
+ };
42
+
43
+ private keychain!: Keychain;
44
+ private configDir!: string;
45
+
46
+ async initialize(conductor: Conductor): Promise<void> {
47
+ this.configDir = conductor.getConfig().getConfigDir();
48
+ this.keychain = new Keychain(this.configDir);
49
+ }
50
+
51
+ isConfigured(): boolean {
52
+ return true; // checked at tool call time
53
+ }
54
+
55
+ async getContext(): Promise<string | null> {
56
+ try {
57
+ const data = await this.gmailFetch('/messages?labelIds=UNREAD&maxResults=1');
58
+ const count = data?.resultSizeEstimate ?? 0;
59
+ if (count > 0) return `[GMAIL] ${count} unread message${count !== 1 ? 's' : ''}`;
60
+ return null;
61
+ } catch {
62
+ return null;
63
+ }
64
+ }
65
+
66
+ private async getToken(): Promise<string> {
67
+ const token = await this.keychain.get('google', 'access_token');
68
+ if (!token) {
69
+ throw new Error('Google not authenticated. Run: conductor auth google');
70
+ }
71
+ return token;
72
+ }
73
+
74
+ private async gmailFetch(path: string, options: { method?: string; body?: any } = {}): Promise<any> {
75
+ const token = await this.getToken();
76
+ const res = await fetch(`${GMAIL_BASE}${path}`, {
77
+ method: options.method ?? 'GET',
78
+ headers: {
79
+ Authorization: `Bearer ${token}`,
80
+ 'Content-Type': 'application/json',
81
+ },
82
+ body: options.body ? JSON.stringify(options.body) : undefined,
83
+ });
84
+ if (!res.ok) {
85
+ const err = await res.text().catch(() => res.statusText);
86
+ if (res.status === 401) {
87
+ throw new Error('Google token expired. Re-authenticate: conductor auth google');
88
+ }
89
+ throw new Error(`Gmail API ${res.status}: ${err}`);
90
+ }
91
+ return res.json();
92
+ }
93
+
94
+ /** Decode base64url to string */
95
+ private b64decode(s: string): string {
96
+ const b64 = s.replace(/-/g, '+').replace(/_/g, '/');
97
+ return Buffer.from(b64, 'base64').toString('utf-8');
98
+ }
99
+
100
+ /** Extract plain text body from a message payload */
101
+ private extractBody(payload: any): string {
102
+ if (!payload) return '';
103
+ if (payload.body?.data) return this.b64decode(payload.body.data);
104
+ if (payload.parts) {
105
+ for (const part of payload.parts) {
106
+ if (part.mimeType === 'text/plain' && part.body?.data) {
107
+ return this.b64decode(part.body.data);
108
+ }
109
+ }
110
+ // Fallback: first part with data
111
+ for (const part of payload.parts) {
112
+ const body = this.extractBody(part);
113
+ if (body) return body;
114
+ }
115
+ }
116
+ return '';
117
+ }
118
+
119
+ /** Get header value from message headers */
120
+ private getHeader(headers: any[], name: string): string {
121
+ return headers?.find((h: any) => h.name.toLowerCase() === name.toLowerCase())?.value ?? '';
122
+ }
123
+
124
+ /** Encode email as RFC 2822 base64url for Gmail API */
125
+ private encodeEmail(opts: {
126
+ to: string;
127
+ subject: string;
128
+ body: string;
129
+ from?: string;
130
+ cc?: string;
131
+ inReplyTo?: string;
132
+ threadId?: string;
133
+ }): string {
134
+ const lines = [
135
+ `To: ${opts.to}`,
136
+ `Subject: ${opts.subject}`,
137
+ opts.cc ? `Cc: ${opts.cc}` : null,
138
+ opts.inReplyTo ? `In-Reply-To: ${opts.inReplyTo}` : null,
139
+ 'Content-Type: text/plain; charset=UTF-8',
140
+ '',
141
+ opts.body,
142
+ ]
143
+ .filter((l) => l !== null)
144
+ .join('\r\n');
145
+
146
+ return Buffer.from(lines).toString('base64').replace(/\+/g, '-').replace(/\//g, '_');
147
+ }
148
+
149
+ getTools(): PluginTool[] {
150
+ return [
151
+ // ── gmail_list ──────────────────────────────────────────────────────────
152
+ {
153
+ name: 'gmail_list',
154
+ description: 'List recent emails from Gmail inbox',
155
+ inputSchema: {
156
+ type: 'object',
157
+ properties: {
158
+ maxResults: { type: 'number', description: 'Number of emails to return (default: 10, max: 50)' },
159
+ labelIds: {
160
+ type: 'array',
161
+ items: { type: 'string' },
162
+ description: 'Filter by labels e.g. ["INBOX","UNREAD"]',
163
+ },
164
+ q: { type: 'string', description: 'Gmail search query e.g. "from:alex is:unread"' },
165
+ },
166
+ },
167
+ handler: async ({ maxResults = 10, labelIds, q }: any) => {
168
+ const params = new URLSearchParams({
169
+ maxResults: String(Math.min(maxResults, 50)),
170
+ });
171
+ if (labelIds?.length) params.set('labelIds', labelIds.join(','));
172
+ if (q) params.set('q', q);
173
+
174
+ const list = await this.gmailFetch(`/messages?${params}`);
175
+ if (!list.messages?.length) return { count: 0, emails: [] };
176
+
177
+ // Fetch minimal metadata for each message in parallel
178
+ const emails = await Promise.all(
179
+ list.messages.map(async (msg: any) => {
180
+ const m = await this.gmailFetch(
181
+ `/messages/${msg.id}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=Date`,
182
+ );
183
+ const h = m.payload?.headers ?? [];
184
+ return {
185
+ id: m.id,
186
+ threadId: m.threadId,
187
+ from: this.getHeader(h, 'From'),
188
+ subject: this.getHeader(h, 'Subject'),
189
+ date: this.getHeader(h, 'Date'),
190
+ snippet: m.snippet,
191
+ unread: m.labelIds?.includes('UNREAD') ?? false,
192
+ };
193
+ }),
194
+ );
195
+
196
+ return { count: emails.length, emails };
197
+ },
198
+ },
199
+
200
+ // ── gmail_read ──────────────────────────────────────────────────────────
201
+ {
202
+ name: 'gmail_read',
203
+ description: 'Read the full content of a Gmail message by ID',
204
+ inputSchema: {
205
+ type: 'object',
206
+ properties: {
207
+ messageId: { type: 'string', description: 'Gmail message ID from gmail_list' },
208
+ },
209
+ required: ['messageId'],
210
+ },
211
+ handler: async ({ messageId }: any) => {
212
+ const m = await this.gmailFetch(`/messages/${messageId}?format=full`);
213
+ const h = m.payload?.headers ?? [];
214
+ const body = this.extractBody(m.payload);
215
+
216
+ return {
217
+ id: m.id,
218
+ threadId: m.threadId,
219
+ from: this.getHeader(h, 'From'),
220
+ to: this.getHeader(h, 'To'),
221
+ subject: this.getHeader(h, 'Subject'),
222
+ date: this.getHeader(h, 'Date'),
223
+ body: body.slice(0, 8000), // cap to avoid huge context
224
+ snippet: m.snippet,
225
+ labels: m.labelIds ?? [],
226
+ };
227
+ },
228
+ },
229
+
230
+ // ── gmail_search ────────────────────────────────────────────────────────
231
+ {
232
+ name: 'gmail_search',
233
+ description:
234
+ 'Search Gmail using Gmail search operators — e.g. "from:boss@company.com is:unread", "subject:invoice after:2024/01/01"',
235
+ inputSchema: {
236
+ type: 'object',
237
+ properties: {
238
+ query: { type: 'string', description: 'Gmail search query string' },
239
+ maxResults: { type: 'number', description: 'Max results (default: 10)' },
240
+ },
241
+ required: ['query'],
242
+ },
243
+ handler: async ({ query, maxResults = 10 }: any) => {
244
+ const params = new URLSearchParams({
245
+ q: query,
246
+ maxResults: String(Math.min(maxResults, 50)),
247
+ });
248
+ const list = await this.gmailFetch(`/messages?${params}`);
249
+ if (!list.messages?.length) return { count: 0, emails: [] };
250
+
251
+ const emails = await Promise.all(
252
+ list.messages.map(async (msg: any) => {
253
+ const m = await this.gmailFetch(
254
+ `/messages/${msg.id}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=Date`,
255
+ );
256
+ const h = m.payload?.headers ?? [];
257
+ return {
258
+ id: m.id,
259
+ threadId: m.threadId,
260
+ from: this.getHeader(h, 'From'),
261
+ subject: this.getHeader(h, 'Subject'),
262
+ date: this.getHeader(h, 'Date'),
263
+ snippet: m.snippet,
264
+ unread: m.labelIds?.includes('UNREAD') ?? false,
265
+ };
266
+ }),
267
+ );
268
+
269
+ return { count: emails.length, emails };
270
+ },
271
+ },
272
+
273
+ // ── gmail_send ──────────────────────────────────────────────────────────
274
+ {
275
+ name: 'gmail_send',
276
+ description: 'Send an email via Gmail',
277
+ inputSchema: {
278
+ type: 'object',
279
+ properties: {
280
+ to: { type: 'string', description: 'Recipient email address' },
281
+ subject: { type: 'string', description: 'Email subject' },
282
+ body: { type: 'string', description: 'Plain text email body' },
283
+ cc: { type: 'string', description: 'CC email addresses (comma-separated)' },
284
+ },
285
+ required: ['to', 'subject', 'body'],
286
+ },
287
+ handler: async ({ to, subject, body, cc }: any) => {
288
+ const raw = this.encodeEmail({ to, subject, body, cc });
289
+ const result = await this.gmailFetch('/messages/send', {
290
+ method: 'POST',
291
+ body: { raw },
292
+ });
293
+ return { sent: true, messageId: result.id, threadId: result.threadId };
294
+ },
295
+ },
296
+
297
+ // ── gmail_reply ─────────────────────────────────────────────────────────
298
+ {
299
+ name: 'gmail_reply',
300
+ description: 'Reply to an existing Gmail message/thread',
301
+ inputSchema: {
302
+ type: 'object',
303
+ properties: {
304
+ messageId: { type: 'string', description: 'Message ID to reply to' },
305
+ body: { type: 'string', description: 'Reply body text' },
306
+ },
307
+ required: ['messageId', 'body'],
308
+ },
309
+ handler: async ({ messageId, body }: any) => {
310
+ // Fetch original to get headers for reply
311
+ const orig = await this.gmailFetch(
312
+ `/messages/${messageId}?format=metadata&metadataHeaders=From&metadataHeaders=Subject&metadataHeaders=Message-ID`,
313
+ );
314
+ const h = orig.payload?.headers ?? [];
315
+ const to = this.getHeader(h, 'From');
316
+ const subject = `Re: ${this.getHeader(h, 'Subject').replace(/^Re:\s*/i, '')}`;
317
+ const inReplyTo = this.getHeader(h, 'Message-ID');
318
+
319
+ const raw = this.encodeEmail({ to, subject, body, inReplyTo });
320
+ const result = await this.gmailFetch('/messages/send', {
321
+ method: 'POST',
322
+ body: { raw, threadId: orig.threadId },
323
+ });
324
+ return { sent: true, messageId: result.id, threadId: result.threadId };
325
+ },
326
+ },
327
+
328
+ // ── gmail_mark_read ─────────────────────────────────────────────────────
329
+ {
330
+ name: 'gmail_mark_read',
331
+ description: 'Mark Gmail messages as read or unread',
332
+ inputSchema: {
333
+ type: 'object',
334
+ properties: {
335
+ messageId: { type: 'string', description: 'Message ID to modify' },
336
+ read: { type: 'boolean', description: 'true = mark read, false = mark unread' },
337
+ },
338
+ required: ['messageId', 'read'],
339
+ },
340
+ handler: async ({ messageId, read }: any) => {
341
+ await this.gmailFetch(`/messages/${messageId}/modify`, {
342
+ method: 'POST',
343
+ body: read ? { removeLabelIds: ['UNREAD'] } : { addLabelIds: ['UNREAD'] },
344
+ });
345
+ return { success: true, messageId, read };
346
+ },
347
+ },
348
+
349
+ // ── gmail_trash ─────────────────────────────────────────────────────────
350
+ {
351
+ name: 'gmail_trash',
352
+ description: 'Move a Gmail message to trash',
353
+ inputSchema: {
354
+ type: 'object',
355
+ properties: {
356
+ messageId: { type: 'string', description: 'Message ID to trash' },
357
+ },
358
+ required: ['messageId'],
359
+ },
360
+ handler: async ({ messageId }: any) => {
361
+ await this.gmailFetch(`/messages/${messageId}/trash`, { method: 'POST' });
362
+ return { trashed: true, messageId };
363
+ },
364
+ },
365
+
366
+ // ── gmail_draft ─────────────────────────────────────────────────────────
367
+ {
368
+ name: 'gmail_draft',
369
+ description: 'Create a Gmail draft (does not send)',
370
+ inputSchema: {
371
+ type: 'object',
372
+ properties: {
373
+ to: { type: 'string', description: 'Recipient email address' },
374
+ subject: { type: 'string', description: 'Email subject' },
375
+ body: { type: 'string', description: 'Plain text email body' },
376
+ cc: { type: 'string', description: 'CC email addresses (comma-separated)' },
377
+ },
378
+ required: ['to', 'subject', 'body'],
379
+ },
380
+ handler: async ({ to, subject, body, cc }: any) => {
381
+ const raw = this.encodeEmail({ to, subject, body, cc });
382
+ const result = await this.gmailFetch('/drafts', {
383
+ method: 'POST',
384
+ body: { message: { raw } },
385
+ });
386
+ return { created: true, draftId: result.id, messageId: result.message?.id };
387
+ },
388
+ },
389
+
390
+ // ── gmail_delete ─────────────────────────────────────────────────────────
391
+ {
392
+ name: 'gmail_delete',
393
+ description: 'Permanently delete a Gmail message (cannot be undone — use gmail_trash for reversible deletion)',
394
+ inputSchema: {
395
+ type: 'object',
396
+ properties: {
397
+ messageId: { type: 'string', description: 'Message ID to permanently delete' },
398
+ },
399
+ required: ['messageId'],
400
+ },
401
+ handler: async ({ messageId }: any) => {
402
+ await this.gmailFetch(`/messages/${messageId}`, { method: 'DELETE' });
403
+ return { deleted: true, messageId };
404
+ },
405
+ },
406
+
407
+ // ── gmail_archive ─────────────────────────────────────────────────────────
408
+ {
409
+ name: 'gmail_archive',
410
+ description: 'Archive a Gmail message (remove from inbox)',
411
+ inputSchema: {
412
+ type: 'object',
413
+ properties: {
414
+ messageId: { type: 'string', description: 'Message ID to archive' },
415
+ },
416
+ required: ['messageId'],
417
+ },
418
+ handler: async ({ messageId }: any) => {
419
+ await this.gmailFetch(`/messages/${messageId}/modify`, {
420
+ method: 'POST',
421
+ body: { removeLabelIds: ['INBOX'] },
422
+ });
423
+ return { archived: true, messageId };
424
+ },
425
+ },
426
+
427
+ // ── gmail_labels ─────────────────────────────────────────────────────────
428
+ {
429
+ name: 'gmail_labels',
430
+ description: 'List all Gmail labels in the mailbox',
431
+ inputSchema: {
432
+ type: 'object',
433
+ properties: {},
434
+ },
435
+ handler: async () => {
436
+ const data = await this.gmailFetch('/labels');
437
+ return {
438
+ labels: (data.labels ?? []).map((l: any) => ({
439
+ id: l.id,
440
+ name: l.name,
441
+ type: l.type,
442
+ messagesTotal: l.messagesTotal,
443
+ messagesUnread: l.messagesUnread,
444
+ })),
445
+ };
446
+ },
447
+ },
448
+
449
+ // ── gmail_add_label ──────────────────────────────────────────────────────
450
+ {
451
+ name: 'gmail_add_label',
452
+ description: 'Add a label to a Gmail message',
453
+ inputSchema: {
454
+ type: 'object',
455
+ properties: {
456
+ messageId: { type: 'string', description: 'Message ID' },
457
+ labelId: { type: 'string', description: 'Label ID to add (use gmail_labels to find IDs)' },
458
+ },
459
+ required: ['messageId', 'labelId'],
460
+ },
461
+ handler: async ({ messageId, labelId }: any) => {
462
+ await this.gmailFetch(`/messages/${messageId}/modify`, {
463
+ method: 'POST',
464
+ body: { addLabelIds: [labelId] },
465
+ });
466
+ return { success: true, messageId, labelId };
467
+ },
468
+ },
469
+
470
+ // ── gmail_remove_label ───────────────────────────────────────────────────
471
+ {
472
+ name: 'gmail_remove_label',
473
+ description: 'Remove a label from a Gmail message',
474
+ inputSchema: {
475
+ type: 'object',
476
+ properties: {
477
+ messageId: { type: 'string', description: 'Message ID' },
478
+ labelId: { type: 'string', description: 'Label ID to remove (use gmail_labels to find IDs)' },
479
+ },
480
+ required: ['messageId', 'labelId'],
481
+ },
482
+ handler: async ({ messageId, labelId }: any) => {
483
+ await this.gmailFetch(`/messages/${messageId}/modify`, {
484
+ method: 'POST',
485
+ body: { removeLabelIds: [labelId] },
486
+ });
487
+ return { success: true, messageId, labelId };
488
+ },
489
+ },
490
+ ];
491
+ }
492
+ }
@@ -0,0 +1,98 @@
1
+ import { Plugin, PluginTool } from '../manager.js';
2
+ import { Conductor } from '../../core/conductor.js';
3
+ import crypto from 'crypto';
4
+
5
+ export class HashPlugin implements Plugin {
6
+ name = 'hash';
7
+ description = 'Hashing, encoding, UUID generation, and text utilities';
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: 'hash_text',
19
+ description: 'Hash text with a specified algorithm (md5, sha1, sha256, sha512)',
20
+ inputSchema: {
21
+ type: 'object',
22
+ properties: {
23
+ text: { type: 'string', description: 'Text to hash' },
24
+ algorithm: { type: 'string', description: 'Hash algorithm', default: 'sha256' },
25
+ },
26
+ required: ['text'],
27
+ },
28
+ handler: async (input: { text: string; algorithm?: string }) => {
29
+ const alg = input.algorithm || 'sha256';
30
+ const hash = crypto.createHash(alg).update(input.text).digest('hex');
31
+ return { algorithm: alg, input: input.text, hash };
32
+ },
33
+ },
34
+ {
35
+ name: 'base64_encode',
36
+ description: 'Encode text to Base64',
37
+ inputSchema: {
38
+ type: 'object',
39
+ properties: { text: { type: 'string', description: 'Text to encode' } },
40
+ required: ['text'],
41
+ },
42
+ handler: async (input: { text: string }) => ({
43
+ input: input.text,
44
+ encoded: Buffer.from(input.text).toString('base64'),
45
+ }),
46
+ },
47
+ {
48
+ name: 'base64_decode',
49
+ description: 'Decode Base64 to text',
50
+ inputSchema: {
51
+ type: 'object',
52
+ properties: { text: { type: 'string', description: 'Base64 string to decode' } },
53
+ required: ['text'],
54
+ },
55
+ handler: async (input: { text: string }) => ({
56
+ input: input.text,
57
+ decoded: Buffer.from(input.text, 'base64').toString('utf-8'),
58
+ }),
59
+ },
60
+ {
61
+ name: 'generate_uuid',
62
+ description: 'Generate a random UUID (v4)',
63
+ inputSchema: {
64
+ type: 'object',
65
+ properties: {
66
+ count: { type: 'number', description: 'Number of UUIDs to generate', default: 1 },
67
+ },
68
+ },
69
+ handler: async (input: { count?: number }) => {
70
+ const count = Math.min(input.count || 1, 50);
71
+ const uuids = Array.from({ length: count }, () => crypto.randomUUID());
72
+ return { uuids };
73
+ },
74
+ },
75
+ {
76
+ name: 'generate_password',
77
+ description: 'Generate a secure random password',
78
+ inputSchema: {
79
+ type: 'object',
80
+ properties: {
81
+ length: { type: 'number', description: 'Password length', default: 24 },
82
+ symbols: { type: 'boolean', description: 'Include symbols', default: true },
83
+ },
84
+ },
85
+ handler: async (input: { length?: number; symbols?: boolean }) => {
86
+ const len = Math.min(Math.max(input.length || 24, 8), 128);
87
+ let chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
88
+ if (input.symbols !== false) chars += '!@#$%^&*()_+-=[]{}|;:,.<>?';
89
+ const bytes = crypto.randomBytes(len);
90
+ const password = Array.from(bytes)
91
+ .map((b) => chars[b % chars.length])
92
+ .join('');
93
+ return { password, length: len, has_symbols: input.symbols !== false };
94
+ },
95
+ },
96
+ ];
97
+ }
98
+ }