@praveencs/agent 0.9.30 → 0.10.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 (236) hide show
  1. package/README.md +55 -9
  2. package/ROADMAP.md +42 -50
  3. package/agent-skills/README.md +192 -0
  4. package/agent-skills/plugins/aws/plugin.json +22 -0
  5. package/agent-skills/plugins/aws/skills/aws-manager.md +17 -0
  6. package/agent-skills/plugins/aws/tools/aws.js +152 -0
  7. package/agent-skills/plugins/discord/plugin.json +22 -0
  8. package/agent-skills/plugins/discord/skills/discord-manager.md +15 -0
  9. package/agent-skills/plugins/discord/tools/discord.js +150 -0
  10. package/agent-skills/plugins/docker/plugin.json +21 -0
  11. package/agent-skills/plugins/docker/skills/docker-manager.md +15 -0
  12. package/agent-skills/plugins/docker/tools/docker.js +135 -0
  13. package/agent-skills/plugins/firebase/plugin.json +22 -0
  14. package/agent-skills/plugins/firebase/skills/firebase-manager.md +14 -0
  15. package/agent-skills/plugins/firebase/tools/firebase.js +157 -0
  16. package/agent-skills/plugins/github/plugin.json +23 -0
  17. package/agent-skills/plugins/github/skills/github-manager.md +15 -0
  18. package/agent-skills/plugins/github/tools/github.js +133 -0
  19. package/agent-skills/plugins/huggingface/plugin.json +22 -0
  20. package/agent-skills/plugins/huggingface/skills/huggingface-manager.md +16 -0
  21. package/agent-skills/plugins/huggingface/tools/huggingface.js +149 -0
  22. package/agent-skills/plugins/linear/plugin.json +22 -0
  23. package/agent-skills/plugins/linear/skills/linear-manager.md +16 -0
  24. package/agent-skills/plugins/linear/tools/linear.js +199 -0
  25. package/agent-skills/plugins/mongodb/plugin.json +21 -0
  26. package/agent-skills/plugins/mongodb/skills/mongodb-manager.md +14 -0
  27. package/agent-skills/plugins/mongodb/tools/mongodb.js +123 -0
  28. package/agent-skills/plugins/notion/plugin.json +22 -0
  29. package/agent-skills/plugins/notion/skills/notion-manager.md +16 -0
  30. package/agent-skills/plugins/notion/tools/notion.js +158 -0
  31. package/agent-skills/plugins/openai/plugin.json +23 -0
  32. package/agent-skills/plugins/openai/skills/openai-manager.md +15 -0
  33. package/agent-skills/plugins/openai/tools/openai.js +137 -0
  34. package/agent-skills/plugins/resend/plugin.json +21 -0
  35. package/agent-skills/plugins/resend/skills/resend-manager.md +15 -0
  36. package/agent-skills/plugins/resend/tools/resend.js +102 -0
  37. package/agent-skills/plugins/slack/plugin.json +22 -0
  38. package/agent-skills/plugins/slack/skills/slack-manager.md +15 -0
  39. package/agent-skills/plugins/slack/tools/slack.js +168 -0
  40. package/agent-skills/plugins/stripe/plugin.json +22 -0
  41. package/agent-skills/plugins/stripe/skills/stripe-manager.md +16 -0
  42. package/agent-skills/plugins/stripe/tools/stripe.js +174 -0
  43. package/agent-skills/plugins/supabase/plugin.json +22 -0
  44. package/agent-skills/plugins/supabase/skills/supabase-manager.md +16 -0
  45. package/agent-skills/plugins/supabase/tools/supabase.js +153 -0
  46. package/agent-skills/plugins/telegram/plugin.json +21 -0
  47. package/agent-skills/plugins/telegram/skills/telegram-manager.md +14 -0
  48. package/agent-skills/plugins/telegram/tools/telegram.js +131 -0
  49. package/agent-skills/plugins/vercel/plugin.json +22 -0
  50. package/agent-skills/plugins/vercel/skills/vercel-manager.md +15 -0
  51. package/agent-skills/plugins/vercel/tools/vercel.js +145 -0
  52. package/agent-skills/registry.json +675 -0
  53. package/agent-skills/skills/api-tester/prompt.md +27 -0
  54. package/agent-skills/skills/api-tester/skill.json +16 -0
  55. package/agent-skills/skills/backup/prompt.md +12 -0
  56. package/agent-skills/skills/backup/skill.json +1 -0
  57. package/agent-skills/skills/code-review/prompt.md +29 -0
  58. package/agent-skills/skills/code-review/skill.json +18 -0
  59. package/agent-skills/skills/create-note/prompt.md +21 -0
  60. package/agent-skills/skills/create-note/skill.json +15 -0
  61. package/agent-skills/skills/cron-scheduler/prompt.md +25 -0
  62. package/agent-skills/skills/cron-scheduler/skill.json +1 -0
  63. package/agent-skills/skills/db-query/prompt.md +12 -0
  64. package/agent-skills/skills/db-query/skill.json +1 -0
  65. package/agent-skills/skills/docker-deploy/prompt.md +21 -0
  66. package/agent-skills/skills/docker-deploy/skill.json +16 -0
  67. package/agent-skills/skills/file-organizer/prompt.md +32 -0
  68. package/agent-skills/skills/file-organizer/skill.json +19 -0
  69. package/agent-skills/skills/git-commit/prompt.md +21 -0
  70. package/agent-skills/skills/git-commit/skill.json +17 -0
  71. package/agent-skills/skills/log-analyzer/prompt.md +16 -0
  72. package/agent-skills/skills/log-analyzer/skill.json +1 -0
  73. package/agent-skills/skills/npm-publish/prompt.md +24 -0
  74. package/agent-skills/skills/npm-publish/skill.json +20 -0
  75. package/agent-skills/skills/open-vscode/prompt.md +8 -0
  76. package/agent-skills/skills/open-vscode/skill.json +15 -0
  77. package/agent-skills/skills/project-scaffold/prompt.md +43 -0
  78. package/agent-skills/skills/project-scaffold/skill.json +17 -0
  79. package/agent-skills/skills/send-email/prompt.md +19 -0
  80. package/agent-skills/skills/send-email/send.js +60 -0
  81. package/agent-skills/skills/send-email/skill.json +16 -0
  82. package/agent-skills/skills/system-monitor/prompt.md +27 -0
  83. package/agent-skills/skills/system-monitor/skill.json +15 -0
  84. package/agent-skills/skills/web-search/prompt.md +26 -0
  85. package/agent-skills/skills/web-search/skill.json +16 -0
  86. package/dist/src/cli/commands/desktop.d.ts +3 -0
  87. package/dist/src/cli/commands/desktop.d.ts.map +1 -0
  88. package/dist/src/cli/commands/desktop.js +80 -0
  89. package/dist/src/cli/commands/desktop.js.map +1 -0
  90. package/dist/src/cli/commands/multimodal.d.ts +3 -0
  91. package/dist/src/cli/commands/multimodal.d.ts.map +1 -0
  92. package/dist/src/cli/commands/multimodal.js +78 -0
  93. package/dist/src/cli/commands/multimodal.js.map +1 -0
  94. package/dist/src/cli/commands/sandbox.d.ts +3 -0
  95. package/dist/src/cli/commands/sandbox.d.ts.map +1 -0
  96. package/dist/src/cli/commands/sandbox.js +89 -0
  97. package/dist/src/cli/commands/sandbox.js.map +1 -0
  98. package/dist/src/cli/commands/swarm.d.ts +3 -0
  99. package/dist/src/cli/commands/swarm.d.ts.map +1 -0
  100. package/dist/src/cli/commands/swarm.js +120 -0
  101. package/dist/src/cli/commands/swarm.js.map +1 -0
  102. package/dist/src/cli/index.d.ts.map +1 -1
  103. package/dist/src/cli/index.js +8 -0
  104. package/dist/src/cli/index.js.map +1 -1
  105. package/dist/src/config/defaults.d.ts.map +1 -1
  106. package/dist/src/config/defaults.js +42 -0
  107. package/dist/src/config/defaults.js.map +1 -1
  108. package/dist/src/config/schema.d.ts +261 -0
  109. package/dist/src/config/schema.d.ts.map +1 -1
  110. package/dist/src/config/schema.js +58 -0
  111. package/dist/src/config/schema.js.map +1 -1
  112. package/dist/src/desktop/engine.d.ts +42 -0
  113. package/dist/src/desktop/engine.d.ts.map +1 -0
  114. package/dist/src/desktop/engine.js +77 -0
  115. package/dist/src/desktop/engine.js.map +1 -0
  116. package/dist/src/desktop/index.d.ts +6 -0
  117. package/dist/src/desktop/index.d.ts.map +1 -0
  118. package/dist/src/desktop/index.js +6 -0
  119. package/dist/src/desktop/index.js.map +1 -0
  120. package/dist/src/desktop/input.d.ts +20 -0
  121. package/dist/src/desktop/input.d.ts.map +1 -0
  122. package/dist/src/desktop/input.js +160 -0
  123. package/dist/src/desktop/input.js.map +1 -0
  124. package/dist/src/desktop/screen.d.ts +17 -0
  125. package/dist/src/desktop/screen.d.ts.map +1 -0
  126. package/dist/src/desktop/screen.js +120 -0
  127. package/dist/src/desktop/screen.js.map +1 -0
  128. package/dist/src/desktop/types.d.ts +50 -0
  129. package/dist/src/desktop/types.d.ts.map +1 -0
  130. package/dist/src/desktop/types.js +10 -0
  131. package/dist/src/desktop/types.js.map +1 -0
  132. package/dist/src/multimodal/engine.d.ts +33 -0
  133. package/dist/src/multimodal/engine.d.ts.map +1 -0
  134. package/dist/src/multimodal/engine.js +63 -0
  135. package/dist/src/multimodal/engine.js.map +1 -0
  136. package/dist/src/multimodal/index.d.ts +7 -0
  137. package/dist/src/multimodal/index.d.ts.map +1 -0
  138. package/dist/src/multimodal/index.js +7 -0
  139. package/dist/src/multimodal/index.js.map +1 -0
  140. package/dist/src/multimodal/tts.d.ts +11 -0
  141. package/dist/src/multimodal/tts.d.ts.map +1 -0
  142. package/dist/src/multimodal/tts.js +48 -0
  143. package/dist/src/multimodal/tts.js.map +1 -0
  144. package/dist/src/multimodal/types.d.ts +55 -0
  145. package/dist/src/multimodal/types.d.ts.map +1 -0
  146. package/dist/src/multimodal/types.js +20 -0
  147. package/dist/src/multimodal/types.js.map +1 -0
  148. package/dist/src/multimodal/vision.d.ts +15 -0
  149. package/dist/src/multimodal/vision.d.ts.map +1 -0
  150. package/dist/src/multimodal/vision.js +98 -0
  151. package/dist/src/multimodal/vision.js.map +1 -0
  152. package/dist/src/multimodal/voice.d.ts +11 -0
  153. package/dist/src/multimodal/voice.d.ts.map +1 -0
  154. package/dist/src/multimodal/voice.js +43 -0
  155. package/dist/src/multimodal/voice.js.map +1 -0
  156. package/dist/src/plans/types.d.ts +18 -18
  157. package/dist/src/sandbox/docker.d.ts +42 -0
  158. package/dist/src/sandbox/docker.d.ts.map +1 -0
  159. package/dist/src/sandbox/docker.js +131 -0
  160. package/dist/src/sandbox/docker.js.map +1 -0
  161. package/dist/src/sandbox/engine.d.ts +50 -0
  162. package/dist/src/sandbox/engine.d.ts.map +1 -0
  163. package/dist/src/sandbox/engine.js +133 -0
  164. package/dist/src/sandbox/engine.js.map +1 -0
  165. package/dist/src/sandbox/index.d.ts +5 -0
  166. package/dist/src/sandbox/index.d.ts.map +1 -0
  167. package/dist/src/sandbox/index.js +5 -0
  168. package/dist/src/sandbox/index.js.map +1 -0
  169. package/dist/src/sandbox/types.d.ts +41 -0
  170. package/dist/src/sandbox/types.d.ts.map +1 -0
  171. package/dist/src/sandbox/types.js +12 -0
  172. package/dist/src/sandbox/types.js.map +1 -0
  173. package/dist/src/scripts/types.d.ts +2 -2
  174. package/dist/src/server/app.d.ts.map +1 -1
  175. package/dist/src/server/app.js +133 -0
  176. package/dist/src/server/app.js.map +1 -1
  177. package/dist/src/swarm/bus.d.ts +27 -0
  178. package/dist/src/swarm/bus.d.ts.map +1 -0
  179. package/dist/src/swarm/bus.js +64 -0
  180. package/dist/src/swarm/bus.js.map +1 -0
  181. package/dist/src/swarm/index.d.ts +6 -0
  182. package/dist/src/swarm/index.d.ts.map +1 -0
  183. package/dist/src/swarm/index.js +6 -0
  184. package/dist/src/swarm/index.js.map +1 -0
  185. package/dist/src/swarm/orchestrator.d.ts +79 -0
  186. package/dist/src/swarm/orchestrator.d.ts.map +1 -0
  187. package/dist/src/swarm/orchestrator.js +271 -0
  188. package/dist/src/swarm/orchestrator.js.map +1 -0
  189. package/dist/src/swarm/roles.d.ts +18 -0
  190. package/dist/src/swarm/roles.d.ts.map +1 -0
  191. package/dist/src/swarm/roles.js +83 -0
  192. package/dist/src/swarm/roles.js.map +1 -0
  193. package/dist/src/swarm/types.d.ts +58 -0
  194. package/dist/src/swarm/types.d.ts.map +1 -0
  195. package/dist/src/swarm/types.js +10 -0
  196. package/dist/src/swarm/types.js.map +1 -0
  197. package/dist/src/tools/core/cmd.d.ts.map +1 -1
  198. package/dist/src/tools/core/cmd.js +28 -0
  199. package/dist/src/tools/core/cmd.js.map +1 -1
  200. package/docs/DOCUMENTATION.md +137 -0
  201. package/package.json +3 -1
  202. package/studio/README.md +73 -0
  203. package/studio/eslint.config.js +23 -0
  204. package/studio/index.html +13 -0
  205. package/studio/package-lock.json +4350 -0
  206. package/studio/package.json +44 -0
  207. package/studio/postcss.config.js +6 -0
  208. package/studio/public/vite.svg +1 -0
  209. package/studio/src/App.tsx +243 -0
  210. package/studio/src/assets/react.svg +1 -0
  211. package/studio/src/components/Capabilities.tsx +80 -0
  212. package/studio/src/components/CommandsManager.tsx +94 -0
  213. package/studio/src/components/CostDashboard.tsx +182 -0
  214. package/studio/src/components/CredentialCapture.tsx +196 -0
  215. package/studio/src/components/CredentialsManager.tsx +257 -0
  216. package/studio/src/components/DaemonPanel.tsx +91 -0
  217. package/studio/src/components/DesktopPanel.tsx +118 -0
  218. package/studio/src/components/GoalTemplates.tsx +190 -0
  219. package/studio/src/components/GoalsPanel.tsx +235 -0
  220. package/studio/src/components/MemoryExplorer.tsx +152 -0
  221. package/studio/src/components/MultimodalPanel.tsx +150 -0
  222. package/studio/src/components/NotificationsPanel.tsx +175 -0
  223. package/studio/src/components/PluginsManager.tsx +60 -0
  224. package/studio/src/components/SandboxPanel.tsx +118 -0
  225. package/studio/src/components/ScriptsManager.tsx +269 -0
  226. package/studio/src/components/SkillsManager.tsx +123 -0
  227. package/studio/src/components/SwarmPanel.tsx +149 -0
  228. package/studio/src/components/TaskStreaming.tsx +189 -0
  229. package/studio/src/components/Terminal.tsx +200 -0
  230. package/studio/src/index.css +51 -0
  231. package/studio/src/main.tsx +13 -0
  232. package/studio/tailwind.config.js +47 -0
  233. package/studio/tsconfig.app.json +28 -0
  234. package/studio/tsconfig.json +7 -0
  235. package/studio/tsconfig.node.json +26 -0
  236. package/studio/vite.config.ts +7 -0
@@ -0,0 +1,133 @@
1
+ /**
2
+ * The GitHub automation tool.
3
+ * Provides a universal interface to the GitHub API using native Node.js fetch.
4
+ */
5
+ export async function execute(params) {
6
+ const { action, ...args } = params;
7
+ const token = process.env.GITHUB_TOKEN;
8
+
9
+ if (!token) {
10
+ throw new Error('GITHUB_TOKEN environment variable is not set. Please export it to use the github tool.');
11
+ }
12
+
13
+ const headers = {
14
+ 'Accept': 'application/vnd.github+json',
15
+ 'Authorization': `Bearer ${token}`,
16
+ 'X-GitHub-Api-Version': '2022-11-28',
17
+ 'User-Agent': 'praveencs-agent-runtime'
18
+ };
19
+
20
+ /** Utility to make fetch requests */
21
+ async function ghFetch(method, endpoint, body = null) {
22
+ const url = endpoint.startsWith('http') ? endpoint : `https://api.github.com${endpoint}`;
23
+ const options = { method, headers };
24
+ if (body) {
25
+ options.body = JSON.stringify(body);
26
+ }
27
+
28
+ const res = await fetch(url, options);
29
+ if (res.status === 204) return { success: true };
30
+
31
+ let data;
32
+ try {
33
+ data = await res.json();
34
+ } catch {
35
+ data = await res.text();
36
+ }
37
+
38
+ if (!res.ok) {
39
+ throw new Error(`GitHub API Error (${res.status}): ${JSON.stringify(data)}`);
40
+ }
41
+ return data;
42
+ }
43
+
44
+ try {
45
+ switch (action) {
46
+ // --- REPOSITORY MANAGEMENT ---
47
+ case 'create_repo':
48
+ return await ghFetch('POST', '/user/repos', args);
49
+ case 'fork_repo':
50
+ return await ghFetch('POST', `/repos/${args.owner}/${args.repo}/forks`, args);
51
+ case 'delete_repo':
52
+ return await ghFetch('DELETE', `/repos/${args.owner}/${args.repo}`);
53
+ case 'list_repos':
54
+ return await ghFetch('GET', `/user/repos?sort=updated&per_page=${args.per_page || 30}`);
55
+
56
+ // --- ISSUES & PULL REQUESTS ---
57
+ case 'create_issue':
58
+ return await ghFetch('POST', `/repos/${args.owner}/${args.repo}/issues`, {
59
+ title: args.title,
60
+ body: args.body,
61
+ labels: args.labels || [],
62
+ assignees: args.assignees || []
63
+ });
64
+ case 'create_pr':
65
+ return await ghFetch('POST', `/repos/${args.owner}/${args.repo}/pulls`, {
66
+ title: args.title,
67
+ head: args.head, // The branch where changes are implemented
68
+ base: args.base, // The branch you want your changes pulled into
69
+ body: args.body
70
+ });
71
+
72
+ // --- ADVANCED SEARCH ---
73
+ case 'search_code':
74
+ // args.query should be a fully formed GitHub code search string e.g. "addClass repo:jquery/jquery"
75
+ return await ghFetch('GET', `/search/code?q=${encodeURIComponent(args.query)}`);
76
+ case 'search_repos':
77
+ return await ghFetch('GET', `/search/repositories?q=${encodeURIComponent(args.query)}&sort=stars&order=desc`);
78
+
79
+ // --- CI/CD WORKFLOWS & ACTIONS ---
80
+ case 'list_workflows':
81
+ return await ghFetch('GET', `/repos/${args.owner}/${args.repo}/actions/workflows`);
82
+ case 'dispatch_workflow':
83
+ // args.workflow_id can be the ID or the filename (e.g., 'main.yml')
84
+ return await ghFetch('POST', `/repos/${args.owner}/${args.repo}/actions/workflows/${args.workflow_id}/dispatches`, {
85
+ ref: args.ref || 'main', // Branch or tag
86
+ inputs: args.inputs || {}
87
+ });
88
+ case 'list_workflow_runs':
89
+ return await ghFetch('GET', `/repos/${args.owner}/${args.repo}/actions/runs?per_page=${args.per_page || 10}`);
90
+
91
+ default:
92
+ throw new Error(`Unknown action: ${action}`);
93
+ }
94
+ } catch (err) {
95
+ return {
96
+ error: err.message,
97
+ stack: err.stack
98
+ };
99
+ }
100
+ }
101
+
102
+ export const definition = {
103
+ name: 'github',
104
+ description: 'Interact with the GitHub API to manage repositories, search code, trigger workflows, and manage issues/PRs. Requires GITHUB_TOKEN environment variable.',
105
+ parameters: {
106
+ type: 'object',
107
+ required: ['action'],
108
+ properties: {
109
+ action: {
110
+ type: 'string',
111
+ description: 'The GitHub operation to perform',
112
+ enum: [
113
+ 'create_repo', 'fork_repo', 'delete_repo', 'list_repos',
114
+ 'create_issue', 'create_pr',
115
+ 'search_code', 'search_repos',
116
+ 'list_workflows', 'dispatch_workflow', 'list_workflow_runs'
117
+ ]
118
+ },
119
+ owner: { type: 'string', description: 'Repository owner (username or org)' },
120
+ repo: { type: 'string', description: 'Repository name' },
121
+ title: { type: 'string', description: 'Title for issue or PR or repository name' },
122
+ body: { type: 'string', description: 'Description body for issue or PR' },
123
+ head: { type: 'string', description: 'Branch containing your changes (for PRs)' },
124
+ base: { type: 'string', description: 'Target branch to pull into (for PRs)' },
125
+ query: { type: 'string', description: 'Advanced search query string (e.g., "my-func repo:org/repo in:file")' },
126
+ workflow_id: { type: 'string', description: 'The ID or filename of the workflow (e.g., "build.yml")' },
127
+ ref: { type: 'string', description: 'Git branch or tag to run the workflow against' },
128
+ inputs: { type: 'object', description: 'Inputs to pass to the workflow dispatch' },
129
+ labels: { type: 'array', items: { type: 'string' }, description: 'Labels for issues' },
130
+ assignees: { type: 'array', items: { type: 'string' }, description: 'Assignees for issues' }
131
+ }
132
+ }
133
+ };
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "huggingface",
3
+ "version": "1.0.0",
4
+ "description": "Run inference on any Hugging Face model and search the model hub.",
5
+ "author": "Praveen",
6
+ "category": "AI & Specialized",
7
+ "tags": [
8
+ "huggingface",
9
+ "ml",
10
+ "ai",
11
+ "inference",
12
+ "models"
13
+ ],
14
+ "exports": {
15
+ "tools": [
16
+ "tools/huggingface.js"
17
+ ],
18
+ "skills": [
19
+ "skills/huggingface-manager.md"
20
+ ]
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ # Hugging Face Manager
2
+
3
+ ## Description
4
+ This skill enables you to run ML inference on any Hugging Face model and search the model hub.
5
+
6
+ ## Instructions
7
+ 1. For text generation, use `action: "text_generation"` with `prompt` and an optional `model` (defaults to Mistral-7B).
8
+ 2. For summarization, use `action: "summarization"` with `text` (defaults to BART-large-CNN).
9
+ 3. For sentiment analysis, use `action: "sentiment"` with `text`. Returns labels (POSITIVE/NEGATIVE) and scores.
10
+ 4. For translation, use `action: "translation"` with `text`. Default model is EN→FR. Change `model` for other language pairs (e.g., `Helsinki-NLP/opus-mt-en-de` for EN→DE).
11
+ 5. Use `action: "search_models"` with `query` to find models on the hub. Results are sorted by downloads.
12
+ 6. The Inference API may return a "model loading" status for cold models. Retry after a few seconds.
13
+ 7. Requires `HF_TOKEN` from https://huggingface.co/settings/tokens.
14
+
15
+ ## Input Variables
16
+ {{input}}
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Hugging Face automation tool.
3
+ * Provides model inference and hub search via the Hugging Face API.
4
+ */
5
+ export async function execute(params) {
6
+ const { action, ...args } = params;
7
+ const token = process.env.HF_TOKEN;
8
+
9
+ if (!token) {
10
+ throw new Error('HF_TOKEN environment variable is not set. Get one at https://huggingface.co/settings/tokens');
11
+ }
12
+
13
+ const headers = {
14
+ 'Content-Type': 'application/json',
15
+ 'Authorization': `Bearer ${token}`
16
+ };
17
+
18
+ try {
19
+ switch (action) {
20
+ case 'inference': {
21
+ const model = args.model || 'meta-llama/Llama-2-7b-chat-hf';
22
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
23
+ method: 'POST',
24
+ headers,
25
+ body: JSON.stringify({ inputs: args.inputs, parameters: args.parameters || {} })
26
+ });
27
+ if (!res.ok) {
28
+ const err = await res.json();
29
+ throw new Error(`HF Inference Error: ${err.error || JSON.stringify(err)}`);
30
+ }
31
+ const contentType = res.headers.get('content-type') || '';
32
+ if (contentType.includes('json')) return await res.json();
33
+ return { output: 'Binary response (image/audio)', bytes: (await res.arrayBuffer()).byteLength };
34
+ }
35
+
36
+ case 'text_generation': {
37
+ const model = args.model || 'mistralai/Mistral-7B-Instruct-v0.2';
38
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
39
+ method: 'POST',
40
+ headers,
41
+ body: JSON.stringify({
42
+ inputs: args.prompt,
43
+ parameters: {
44
+ max_new_tokens: args.max_tokens || 256,
45
+ temperature: args.temperature ?? 0.7,
46
+ return_full_text: false
47
+ }
48
+ })
49
+ });
50
+ return await res.json();
51
+ }
52
+
53
+ case 'summarization': {
54
+ const model = args.model || 'facebook/bart-large-cnn';
55
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
56
+ method: 'POST',
57
+ headers,
58
+ body: JSON.stringify({ inputs: args.text })
59
+ });
60
+ return await res.json();
61
+ }
62
+
63
+ case 'sentiment': {
64
+ const model = args.model || 'distilbert-base-uncased-finetuned-sst-2-english';
65
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
66
+ method: 'POST',
67
+ headers,
68
+ body: JSON.stringify({ inputs: args.text })
69
+ });
70
+ return await res.json();
71
+ }
72
+
73
+ case 'translation': {
74
+ const model = args.model || 'Helsinki-NLP/opus-mt-en-fr';
75
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
76
+ method: 'POST',
77
+ headers,
78
+ body: JSON.stringify({ inputs: args.text })
79
+ });
80
+ return await res.json();
81
+ }
82
+
83
+ case 'image_classification': {
84
+ const model = args.model || 'google/vit-base-patch16-224';
85
+ const res = await fetch(`https://api-inference.huggingface.co/models/${model}`, {
86
+ method: 'POST',
87
+ headers: { 'Authorization': `Bearer ${token}` },
88
+ body: args.image_url
89
+ ? JSON.stringify({ inputs: args.image_url })
90
+ : args.image_data
91
+ });
92
+ return await res.json();
93
+ }
94
+
95
+ case 'search_models': {
96
+ const query = args.query || '';
97
+ const res = await fetch(
98
+ `https://huggingface.co/api/models?search=${encodeURIComponent(query)}&limit=${args.limit || 10}&sort=downloads&direction=-1`,
99
+ { headers: { 'Authorization': `Bearer ${token}` } }
100
+ );
101
+ const models = await res.json();
102
+ return models.map(m => ({
103
+ id: m.modelId || m.id,
104
+ pipeline: m.pipeline_tag,
105
+ downloads: m.downloads,
106
+ likes: m.likes,
107
+ lastModified: m.lastModified
108
+ }));
109
+ }
110
+
111
+ case 'model_info': {
112
+ const res = await fetch(`https://huggingface.co/api/models/${args.model}`, {
113
+ headers: { 'Authorization': `Bearer ${token}` }
114
+ });
115
+ return await res.json();
116
+ }
117
+
118
+ default:
119
+ throw new Error(`Unknown action: ${action}`);
120
+ }
121
+ } catch (err) {
122
+ return { error: err.message, stack: err.stack };
123
+ }
124
+ }
125
+
126
+ export const definition = {
127
+ name: 'huggingface',
128
+ description: 'Run ML inference (text gen, summarization, sentiment, translation, image classification) and search Hugging Face models. Requires HF_TOKEN.',
129
+ parameters: {
130
+ type: 'object',
131
+ required: ['action'],
132
+ properties: {
133
+ action: {
134
+ type: 'string',
135
+ enum: ['inference', 'text_generation', 'summarization', 'sentiment', 'translation', 'image_classification', 'search_models', 'model_info']
136
+ },
137
+ model: { type: 'string', description: 'Hugging Face model ID (e.g., meta-llama/Llama-2-7b-chat-hf)' },
138
+ inputs: { type: 'string', description: 'Raw input for generic inference' },
139
+ prompt: { type: 'string', description: 'Text prompt for generation' },
140
+ text: { type: 'string', description: 'Text input for summarization/sentiment/translation' },
141
+ image_url: { type: 'string', description: 'Image URL for classification' },
142
+ parameters: { type: 'object', description: 'Model parameters' },
143
+ max_tokens: { type: 'number', description: 'Max tokens for text generation' },
144
+ temperature: { type: 'number', description: 'Temperature for generation' },
145
+ query: { type: 'string', description: 'Search query for model hub' },
146
+ limit: { type: 'number', description: 'Max results' }
147
+ }
148
+ }
149
+ };
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "linear",
3
+ "version": "1.0.0",
4
+ "description": "Manage issues, projects, and cycles on Linear for modern project management.",
5
+ "author": "Praveen",
6
+ "category": "Productivity",
7
+ "tags": [
8
+ "linear",
9
+ "issues",
10
+ "projects",
11
+ "agile",
12
+ "tracking"
13
+ ],
14
+ "exports": {
15
+ "tools": [
16
+ "tools/linear.js"
17
+ ],
18
+ "skills": [
19
+ "skills/linear-manager.md"
20
+ ]
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ # Linear Manager
2
+
3
+ ## Description
4
+ This skill enables you to manage issues, projects, teams, and cycles on Linear.
5
+
6
+ ## Instructions
7
+ 1. Linear uses a **GraphQL API**. All queries go through a single endpoint.
8
+ 2. To create an issue, you need a `team_id`. Use `action: "list_teams"` first to discover team IDs.
9
+ 3. Issue priority is numeric: `0` = none, `1` = urgent, `2` = high, `3` = medium, `4` = low.
10
+ 4. To search across all issues, use `action: "search_issues"` with a text `query`. It searches titles and descriptions.
11
+ 5. To filter issues precisely, use `action: "list_issues"` with a `filter` object (e.g., `{ "state": { "name": { "eq": "In Progress" } } }`).
12
+ 6. Linear issue identifiers look like `ENG-42` (team key + number). The `identifier` field in responses contains this.
13
+ 7. If the tool returns an error, the user needs to export `LINEAR_API_KEY` from https://linear.app/settings/api.
14
+
15
+ ## Input Variables
16
+ {{input}}
@@ -0,0 +1,199 @@
1
+ /**
2
+ * Linear automation tool.
3
+ * Provides issue, project, and cycle management via the Linear GraphQL API.
4
+ */
5
+ export async function execute(params) {
6
+ const { action, ...args } = params;
7
+ const apiKey = process.env.LINEAR_API_KEY;
8
+
9
+ if (!apiKey) {
10
+ throw new Error('LINEAR_API_KEY environment variable is not set. Create one at https://linear.app/settings/api');
11
+ }
12
+
13
+ async function linearQuery(query, variables = {}) {
14
+ const res = await fetch('https://api.linear.app/graphql', {
15
+ method: 'POST',
16
+ headers: {
17
+ 'Content-Type': 'application/json',
18
+ 'Authorization': apiKey
19
+ },
20
+ body: JSON.stringify({ query, variables })
21
+ });
22
+
23
+ const data = await res.json();
24
+ if (data.errors) {
25
+ throw new Error(`Linear API Error: ${data.errors.map(e => e.message).join(', ')}`);
26
+ }
27
+ return data.data;
28
+ }
29
+
30
+ try {
31
+ switch (action) {
32
+ // --- ISSUES ---
33
+ case 'create_issue':
34
+ return await linearQuery(`
35
+ mutation CreateIssue($input: IssueCreateInput!) {
36
+ issueCreate(input: $input) {
37
+ success
38
+ issue { id identifier title url state { name } }
39
+ }
40
+ }
41
+ `, {
42
+ input: {
43
+ title: args.title,
44
+ description: args.description,
45
+ teamId: args.team_id,
46
+ priority: args.priority, // 0=none, 1=urgent, 2=high, 3=medium, 4=low
47
+ assigneeId: args.assignee_id,
48
+ labelIds: args.label_ids
49
+ }
50
+ });
51
+
52
+ case 'update_issue':
53
+ return await linearQuery(`
54
+ mutation UpdateIssue($id: String!, $input: IssueUpdateInput!) {
55
+ issueUpdate(id: $id, input: $input) {
56
+ success
57
+ issue { id identifier title state { name } }
58
+ }
59
+ }
60
+ `, {
61
+ id: args.issue_id,
62
+ input: args.data || {}
63
+ });
64
+
65
+ case 'list_issues':
66
+ return await linearQuery(`
67
+ query Issues($filter: IssueFilter, $first: Int) {
68
+ issues(filter: $filter, first: $first) {
69
+ nodes {
70
+ id identifier title description priority
71
+ state { name }
72
+ assignee { name email }
73
+ labels { nodes { name } }
74
+ url createdAt updatedAt
75
+ }
76
+ }
77
+ }
78
+ `, {
79
+ filter: args.filter || {},
80
+ first: args.limit || 25
81
+ });
82
+
83
+ case 'search_issues':
84
+ return await linearQuery(`
85
+ query SearchIssues($term: String!, $first: Int) {
86
+ searchIssues(term: $term, first: $first) {
87
+ nodes {
88
+ id identifier title description
89
+ state { name }
90
+ assignee { name }
91
+ url
92
+ }
93
+ }
94
+ }
95
+ `, { term: args.query, first: args.limit || 20 });
96
+
97
+ // --- PROJECTS ---
98
+ case 'list_projects':
99
+ return await linearQuery(`
100
+ query Projects($first: Int) {
101
+ projects(first: $first) {
102
+ nodes {
103
+ id name description state progress
104
+ lead { name }
105
+ url startDate targetDate
106
+ }
107
+ }
108
+ }
109
+ `, { first: args.limit || 20 });
110
+
111
+ case 'create_project':
112
+ return await linearQuery(`
113
+ mutation CreateProject($input: ProjectCreateInput!) {
114
+ projectCreate(input: $input) {
115
+ success
116
+ project { id name url }
117
+ }
118
+ }
119
+ `, {
120
+ input: {
121
+ name: args.name,
122
+ description: args.description,
123
+ teamIds: args.team_ids
124
+ }
125
+ });
126
+
127
+ // --- TEAMS ---
128
+ case 'list_teams':
129
+ return await linearQuery(`
130
+ query Teams {
131
+ teams {
132
+ nodes { id name key description }
133
+ }
134
+ }
135
+ `);
136
+
137
+ // --- CYCLES ---
138
+ case 'list_cycles':
139
+ return await linearQuery(`
140
+ query Cycles($teamId: String!, $first: Int) {
141
+ team(id: $teamId) {
142
+ cycles(first: $first) {
143
+ nodes {
144
+ id number name startsAt endsAt
145
+ progress completedIssueCountHistory
146
+ }
147
+ }
148
+ }
149
+ }
150
+ `, { teamId: args.team_id, first: args.limit || 10 });
151
+
152
+ // --- VIEWER ---
153
+ case 'me':
154
+ return await linearQuery(`
155
+ query Me {
156
+ viewer { id name email admin url }
157
+ }
158
+ `);
159
+
160
+ default:
161
+ throw new Error(`Unknown action: ${action}`);
162
+ }
163
+ } catch (err) {
164
+ return { error: err.message, stack: err.stack };
165
+ }
166
+ }
167
+
168
+ export const definition = {
169
+ name: 'linear',
170
+ description: 'Manage Linear issues, projects, teams, and cycles for modern project tracking. Requires LINEAR_API_KEY.',
171
+ parameters: {
172
+ type: 'object',
173
+ required: ['action'],
174
+ properties: {
175
+ action: {
176
+ type: 'string',
177
+ description: 'The Linear operation to perform',
178
+ enum: [
179
+ 'create_issue', 'update_issue', 'list_issues', 'search_issues',
180
+ 'list_projects', 'create_project',
181
+ 'list_teams', 'list_cycles', 'me'
182
+ ]
183
+ },
184
+ title: { type: 'string', description: 'Issue or project title' },
185
+ description: { type: 'string', description: 'Issue or project description (supports markdown)' },
186
+ team_id: { type: 'string', description: 'Linear team ID' },
187
+ team_ids: { type: 'array', items: { type: 'string' }, description: 'Team IDs for project creation' },
188
+ issue_id: { type: 'string', description: 'Issue ID for updates' },
189
+ assignee_id: { type: 'string', description: 'User ID to assign the issue to' },
190
+ priority: { type: 'number', description: 'Priority: 0=none, 1=urgent, 2=high, 3=medium, 4=low' },
191
+ label_ids: { type: 'array', items: { type: 'string' }, description: 'Label IDs to apply' },
192
+ data: { type: 'object', description: 'Update data for issues (IssueUpdateInput)' },
193
+ filter: { type: 'object', description: 'Issue filter object (IssueFilter)' },
194
+ query: { type: 'string', description: 'Search query text' },
195
+ name: { type: 'string', description: 'Project name' },
196
+ limit: { type: 'number', description: 'Max results to return' }
197
+ }
198
+ }
199
+ };
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "mongodb",
3
+ "version": "1.0.0",
4
+ "description": "Query, insert, update, and aggregate data on MongoDB Atlas or local instances.",
5
+ "author": "Praveen",
6
+ "category": "Databases & Backend",
7
+ "tags": [
8
+ "mongodb",
9
+ "nosql",
10
+ "database",
11
+ "atlas"
12
+ ],
13
+ "exports": {
14
+ "tools": [
15
+ "tools/mongodb.js"
16
+ ],
17
+ "skills": [
18
+ "skills/mongodb-manager.md"
19
+ ]
20
+ }
21
+ }
@@ -0,0 +1,14 @@
1
+ # MongoDB Manager
2
+
3
+ ## Description
4
+ This skill enables you to query, insert, update, and aggregate data on MongoDB via the Atlas Data API.
5
+
6
+ ## Instructions
7
+ 1. Always provide `collection` for every action. `database` defaults to `MONGODB_DATABASE` env var.
8
+ 2. `filter` uses standard MongoDB query syntax: `{"age": {"$gt": 18}}`, `{"status": "active"}`.
9
+ 3. `update` uses MongoDB operators: `{"$set": {"name": "new"}}`, `{"$inc": {"count": 1}}`.
10
+ 4. For complex analytics, use `action: "aggregate"` with a `pipeline` array of stages (`$match`, `$group`, `$sort`, `$project`, etc.).
11
+ 5. Requires `MONGODB_API_KEY` and `MONGODB_APP_ID`. Enable the Data API in MongoDB Atlas under App Services.
12
+
13
+ ## Input Variables
14
+ {{input}}