neuron-mcp-server 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.
- package/LICENSE +21 -0
- package/README.md +178 -0
- package/dist/client.d.ts +34 -0
- package/dist/client.js +104 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +190 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/ai.d.ts +2 -0
- package/dist/tools/ai.js +25 -0
- package/dist/tools/ai.js.map +1 -0
- package/dist/tools/audit.d.ts +2 -0
- package/dist/tools/audit.js +40 -0
- package/dist/tools/audit.js.map +1 -0
- package/dist/tools/auth.d.ts +2 -0
- package/dist/tools/auth.js +348 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/billing.d.ts +2 -0
- package/dist/tools/billing.js +51 -0
- package/dist/tools/billing.js.map +1 -0
- package/dist/tools/blog.d.ts +2 -0
- package/dist/tools/blog.js +174 -0
- package/dist/tools/blog.js.map +1 -0
- package/dist/tools/bot-api-keys.d.ts +2 -0
- package/dist/tools/bot-api-keys.js +60 -0
- package/dist/tools/bot-api-keys.js.map +1 -0
- package/dist/tools/bot-api.d.ts +2 -0
- package/dist/tools/bot-api.js +120 -0
- package/dist/tools/bot-api.js.map +1 -0
- package/dist/tools/bots.d.ts +2 -0
- package/dist/tools/bots.js +228 -0
- package/dist/tools/bots.js.map +1 -0
- package/dist/tools/broadcasts.d.ts +2 -0
- package/dist/tools/broadcasts.js +156 -0
- package/dist/tools/broadcasts.js.map +1 -0
- package/dist/tools/builtin-tools.d.ts +5 -0
- package/dist/tools/builtin-tools.js +81 -0
- package/dist/tools/builtin-tools.js.map +1 -0
- package/dist/tools/campaigns.d.ts +2 -0
- package/dist/tools/campaigns.js +277 -0
- package/dist/tools/campaigns.js.map +1 -0
- package/dist/tools/channels.d.ts +2 -0
- package/dist/tools/channels.js +334 -0
- package/dist/tools/channels.js.map +1 -0
- package/dist/tools/contact-lists.d.ts +2 -0
- package/dist/tools/contact-lists.js +214 -0
- package/dist/tools/contact-lists.js.map +1 -0
- package/dist/tools/contacts.d.ts +2 -0
- package/dist/tools/contacts.js +265 -0
- package/dist/tools/contacts.js.map +1 -0
- package/dist/tools/conversations.d.ts +5 -0
- package/dist/tools/conversations.js +270 -0
- package/dist/tools/conversations.js.map +1 -0
- package/dist/tools/knowledge-bases.d.ts +6 -0
- package/dist/tools/knowledge-bases.js +398 -0
- package/dist/tools/knowledge-bases.js.map +1 -0
- package/dist/tools/list-pool.d.ts +2 -0
- package/dist/tools/list-pool.js +120 -0
- package/dist/tools/list-pool.js.map +1 -0
- package/dist/tools/media.d.ts +2 -0
- package/dist/tools/media.js +39 -0
- package/dist/tools/media.js.map +1 -0
- package/dist/tools/newsletters.d.ts +2 -0
- package/dist/tools/newsletters.js +154 -0
- package/dist/tools/newsletters.js.map +1 -0
- package/dist/tools/organizations.d.ts +2 -0
- package/dist/tools/organizations.js +205 -0
- package/dist/tools/organizations.js.map +1 -0
- package/dist/tools/outbound-webhooks.d.ts +5 -0
- package/dist/tools/outbound-webhooks.js +143 -0
- package/dist/tools/outbound-webhooks.js.map +1 -0
- package/dist/tools/payouts.d.ts +2 -0
- package/dist/tools/payouts.js +86 -0
- package/dist/tools/payouts.js.map +1 -0
- package/dist/tools/pool.d.ts +2 -0
- package/dist/tools/pool.js +202 -0
- package/dist/tools/pool.js.map +1 -0
- package/dist/tools/reflections.d.ts +5 -0
- package/dist/tools/reflections.js +90 -0
- package/dist/tools/reflections.js.map +1 -0
- package/dist/tools/tools.d.ts +5 -0
- package/dist/tools/tools.js +174 -0
- package/dist/tools/tools.js.map +1 -0
- package/dist/tools/wallets.d.ts +2 -0
- package/dist/tools/wallets.js +68 -0
- package/dist/tools/wallets.js.map +1 -0
- package/dist/tools/webhooks.d.ts +5 -0
- package/dist/tools/webhooks.js +124 -0
- package/dist/tools/webhooks.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { api, jsonResult, errorResult } from "../client.js";
|
|
3
|
+
export function registerPoolTools(server) {
|
|
4
|
+
// 1. Browse pool
|
|
5
|
+
server.registerTool("neuron_browse_pool", {
|
|
6
|
+
title: "Browse Pool",
|
|
7
|
+
description: "Browse the marketplace/pool to discover shared bots, tools, knowledge bases, and reflections. Supports filtering and search.",
|
|
8
|
+
inputSchema: z.object({
|
|
9
|
+
query: z.string().optional().describe("Search query to filter items"),
|
|
10
|
+
type: z.string().optional().describe("Filter by resource type (e.g., 'bot', 'tool', 'knowledge_base', 'reflection')"),
|
|
11
|
+
category: z.string().optional().describe("Filter by category"),
|
|
12
|
+
tags: z.string().optional().describe("Filter by tags (comma-separated)"),
|
|
13
|
+
featured: z.boolean().optional().describe("Show only featured items"),
|
|
14
|
+
page: z.number().optional().describe("Page number for pagination (default: 1)"),
|
|
15
|
+
limit: z.number().optional().describe("Number of items per page (default: 20)"),
|
|
16
|
+
}),
|
|
17
|
+
}, async (args) => {
|
|
18
|
+
try {
|
|
19
|
+
const queryParams = {};
|
|
20
|
+
if (args.query)
|
|
21
|
+
queryParams.query = args.query;
|
|
22
|
+
if (args.type)
|
|
23
|
+
queryParams.type = args.type;
|
|
24
|
+
if (args.category)
|
|
25
|
+
queryParams.category = args.category;
|
|
26
|
+
if (args.tags)
|
|
27
|
+
queryParams.tags = args.tags;
|
|
28
|
+
if (args.featured !== undefined)
|
|
29
|
+
queryParams.featured = args.featured ? "true" : "false";
|
|
30
|
+
if (args.page !== undefined)
|
|
31
|
+
queryParams.page = args.page;
|
|
32
|
+
if (args.limit !== undefined)
|
|
33
|
+
queryParams.limit = args.limit;
|
|
34
|
+
const response = await api("GET", "/pool", undefined, queryParams);
|
|
35
|
+
return jsonResult(response);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
return errorResult(error);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
// 2. Get pool item
|
|
42
|
+
server.registerTool("neuron_get_pool_item", {
|
|
43
|
+
title: "Get Pool Item",
|
|
44
|
+
description: "Get detailed information about a specific item in the marketplace/pool",
|
|
45
|
+
inputSchema: z.object({
|
|
46
|
+
id: z.string().describe("The unique identifier of the pool item"),
|
|
47
|
+
}),
|
|
48
|
+
}, async (args) => {
|
|
49
|
+
try {
|
|
50
|
+
const response = await api("GET", `/pool/${args.id}`);
|
|
51
|
+
return jsonResult(response);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
return errorResult(error);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
// 3. List published items
|
|
58
|
+
server.registerTool("neuron_list_published", {
|
|
59
|
+
title: "List My Published Items",
|
|
60
|
+
description: "List all items you have published to the marketplace/pool",
|
|
61
|
+
inputSchema: z.object({}),
|
|
62
|
+
}, async () => {
|
|
63
|
+
try {
|
|
64
|
+
const response = await api("GET", "/pool/my");
|
|
65
|
+
return jsonResult(response);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
return errorResult(error);
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
// 4. List installed items
|
|
72
|
+
server.registerTool("neuron_list_installed", {
|
|
73
|
+
title: "List Installed Items",
|
|
74
|
+
description: "List all items you have installed from the marketplace/pool",
|
|
75
|
+
inputSchema: z.object({}),
|
|
76
|
+
}, async () => {
|
|
77
|
+
try {
|
|
78
|
+
const response = await api("GET", "/pool/installed");
|
|
79
|
+
return jsonResult(response);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
return errorResult(error);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
// 5. Publish to pool
|
|
86
|
+
server.registerTool("neuron_publish_to_pool", {
|
|
87
|
+
title: "Publish to Pool",
|
|
88
|
+
description: "Publish a bot, tool, knowledge base, or reflection to the marketplace/pool for others to discover and use",
|
|
89
|
+
inputSchema: z.object({
|
|
90
|
+
resourceType: z.enum(["bot", "tool", "knowledge_base", "reflection"]).describe("Type of resource to publish"),
|
|
91
|
+
resourceId: z.string().describe("The unique identifier of the resource to publish"),
|
|
92
|
+
title: z.string().describe("Title for the pool listing"),
|
|
93
|
+
description: z.string().optional().describe("Detailed description of the resource"),
|
|
94
|
+
category: z.string().optional().describe("Category for organizing the resource"),
|
|
95
|
+
tags: z.array(z.string()).optional().describe("Tags for improved discoverability"),
|
|
96
|
+
}),
|
|
97
|
+
}, async (args) => {
|
|
98
|
+
try {
|
|
99
|
+
const body = {
|
|
100
|
+
type: args.resourceType,
|
|
101
|
+
sourceId: args.resourceId,
|
|
102
|
+
name: args.title,
|
|
103
|
+
description: args.description,
|
|
104
|
+
category: args.category,
|
|
105
|
+
tags: args.tags,
|
|
106
|
+
};
|
|
107
|
+
const response = await api("POST", "/pool", body);
|
|
108
|
+
return jsonResult(response);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
return errorResult(error);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
// 6. Update pool item
|
|
115
|
+
server.registerTool("neuron_update_pool_item", {
|
|
116
|
+
title: "Update Pool Item",
|
|
117
|
+
description: "Update the metadata of a pool item you have published (title, description, category, tags)",
|
|
118
|
+
inputSchema: z.object({
|
|
119
|
+
id: z.string().describe("The unique identifier of the pool item to update"),
|
|
120
|
+
title: z.string().optional().describe("New title for the pool listing"),
|
|
121
|
+
description: z.string().optional().describe("New description"),
|
|
122
|
+
category: z.string().optional().describe("New category"),
|
|
123
|
+
tags: z.array(z.string()).optional().describe("New tags"),
|
|
124
|
+
}),
|
|
125
|
+
}, async (args) => {
|
|
126
|
+
try {
|
|
127
|
+
const { id, ...updateData } = args;
|
|
128
|
+
const response = await api("PUT", `/pool/${id}`, updateData);
|
|
129
|
+
return jsonResult(response);
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
return errorResult(error);
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
// 7. Unpublish from pool
|
|
136
|
+
server.registerTool("neuron_unpublish_from_pool", {
|
|
137
|
+
title: "Unpublish from Pool",
|
|
138
|
+
description: "Remove a published item from the marketplace/pool. This action cannot be undone.",
|
|
139
|
+
inputSchema: z.object({
|
|
140
|
+
id: z.string().describe("The unique identifier of the pool item to unpublish"),
|
|
141
|
+
}),
|
|
142
|
+
}, async (args) => {
|
|
143
|
+
try {
|
|
144
|
+
const response = await api("DELETE", `/pool/${args.id}`);
|
|
145
|
+
return jsonResult(response);
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
return errorResult(error);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
// 8. Install from pool
|
|
152
|
+
server.registerTool("neuron_install_from_pool", {
|
|
153
|
+
title: "Install from Pool",
|
|
154
|
+
description: "Install a resource from the marketplace/pool. Choose 'fork' to create an independent copy or 'subscribe' to receive updates.",
|
|
155
|
+
inputSchema: z.object({
|
|
156
|
+
id: z.string().describe("The unique identifier of the pool item to install"),
|
|
157
|
+
mode: z.enum(["fork", "subscribe"]).optional().describe("Installation mode: 'fork' for independent copy or 'subscribe' for linked updates (default: 'fork')"),
|
|
158
|
+
}),
|
|
159
|
+
}, async (args) => {
|
|
160
|
+
try {
|
|
161
|
+
const { id, mode } = args;
|
|
162
|
+
const response = await api("POST", `/pool/${id}/install`, { mode });
|
|
163
|
+
return jsonResult(response);
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
return errorResult(error);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
// 9. Pull pool update
|
|
170
|
+
server.registerTool("neuron_pull_pool_update", {
|
|
171
|
+
title: "Pull Pool Update",
|
|
172
|
+
description: "Pull the latest updates for a subscribed pool resource. Only applies to items installed with 'subscribe' mode.",
|
|
173
|
+
inputSchema: z.object({
|
|
174
|
+
installId: z.string().describe("The unique identifier of the installed resource"),
|
|
175
|
+
}),
|
|
176
|
+
}, async (args) => {
|
|
177
|
+
try {
|
|
178
|
+
const response = await api("POST", `/pool/installed/${args.installId}/pull`);
|
|
179
|
+
return jsonResult(response);
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
return errorResult(error);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
// 10. Toggle featured status
|
|
186
|
+
server.registerTool("neuron_toggle_featured", {
|
|
187
|
+
title: "Toggle Featured Status",
|
|
188
|
+
description: "Toggle the featured status of a pool item. Featured items appear prominently in the marketplace. (Admin operation)",
|
|
189
|
+
inputSchema: z.object({
|
|
190
|
+
id: z.string().describe("The unique identifier of the pool item"),
|
|
191
|
+
}),
|
|
192
|
+
}, async (args) => {
|
|
193
|
+
try {
|
|
194
|
+
const response = await api("POST", `/pool/${args.id}/feature`);
|
|
195
|
+
return jsonResult(response);
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
return errorResult(error);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=pool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pool.js","sourceRoot":"","sources":["../../src/tools/pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,UAAU,EAAc,WAAW,EAAE,MAAM,cAAc,CAAC;AAExE,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,iBAAiB;IACjB,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,8HAA8H;QAC3I,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;YACrE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+EAA+E,CAAC;YACrH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,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AAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;SAClE,CAAC;KACH,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,SAAS,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;YAC/D,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { api, jsonResult, errorResult } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Register reflection tools (bot self-learning reflections)
|
|
5
|
+
*/
|
|
6
|
+
export function registerReflectionsTools(server) {
|
|
7
|
+
// 1. List Reflections
|
|
8
|
+
server.registerTool("neuron_list_reflections", {
|
|
9
|
+
title: "List Reflections",
|
|
10
|
+
description: "List self-learning reflections generated by a bot, optionally filtered by status",
|
|
11
|
+
inputSchema: z.object({
|
|
12
|
+
botId: z.string().describe("The ID of the bot to list reflections for"),
|
|
13
|
+
status: z.enum(["pending", "approved", "rejected"]).optional().describe("Filter by reflection status"),
|
|
14
|
+
}),
|
|
15
|
+
annotations: {
|
|
16
|
+
openWorldHint: true,
|
|
17
|
+
},
|
|
18
|
+
}, async (args) => {
|
|
19
|
+
const { botId, status } = args;
|
|
20
|
+
const params = {};
|
|
21
|
+
if (status !== undefined) {
|
|
22
|
+
params.status = status;
|
|
23
|
+
}
|
|
24
|
+
const response = await api("GET", `/reflections/bot/${botId}`, undefined, params);
|
|
25
|
+
if (response.success) {
|
|
26
|
+
return jsonResult(response.data);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return errorResult(response.error || "Failed to list reflections");
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
// 2. Approve Reflection
|
|
33
|
+
server.registerTool("neuron_approve_reflection", {
|
|
34
|
+
title: "Approve Reflection",
|
|
35
|
+
description: "Approve a bot reflection to incorporate it into the bot's learning and behavior",
|
|
36
|
+
inputSchema: z.object({
|
|
37
|
+
id: z.string().describe("The ID of the reflection to approve"),
|
|
38
|
+
}),
|
|
39
|
+
annotations: {
|
|
40
|
+
openWorldHint: true,
|
|
41
|
+
},
|
|
42
|
+
}, async (args) => {
|
|
43
|
+
const response = await api("PUT", `/reflections/${args.id}/approve`);
|
|
44
|
+
if (response.success) {
|
|
45
|
+
return jsonResult(response.data || { message: "Reflection approved successfully" });
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
return errorResult(response.error || "Failed to approve reflection");
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
// 3. Reject Reflection
|
|
52
|
+
server.registerTool("neuron_reject_reflection", {
|
|
53
|
+
title: "Reject Reflection",
|
|
54
|
+
description: "Reject a bot reflection to prevent it from being incorporated into the bot's behavior",
|
|
55
|
+
inputSchema: z.object({
|
|
56
|
+
id: z.string().describe("The ID of the reflection to reject"),
|
|
57
|
+
}),
|
|
58
|
+
annotations: {
|
|
59
|
+
openWorldHint: true,
|
|
60
|
+
},
|
|
61
|
+
}, async (args) => {
|
|
62
|
+
const response = await api("PUT", `/reflections/${args.id}/reject`);
|
|
63
|
+
if (response.success) {
|
|
64
|
+
return jsonResult(response.data || { message: "Reflection rejected successfully" });
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return errorResult(response.error || "Failed to reject reflection");
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
// 4. Sync Reflections
|
|
71
|
+
server.registerTool("neuron_sync_reflections", {
|
|
72
|
+
title: "Sync Reflections",
|
|
73
|
+
description: "Synchronize and update the bot's knowledge base with all approved reflections",
|
|
74
|
+
inputSchema: z.object({
|
|
75
|
+
botId: z.string().describe("The ID of the bot to sync reflections for"),
|
|
76
|
+
}),
|
|
77
|
+
annotations: {
|
|
78
|
+
openWorldHint: true,
|
|
79
|
+
},
|
|
80
|
+
}, async (args) => {
|
|
81
|
+
const response = await api("POST", `/reflections/bot/${args.botId}/sync`);
|
|
82
|
+
if (response.success) {
|
|
83
|
+
return jsonResult(response.data || { message: "Reflections synced successfully" });
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
return errorResult(response.error || "Failed to sync reflections");
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=reflections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflections.js","sourceRoot":"","sources":["../../src/tools/reflections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE5D;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAiB;IACxD,sBAAsB;IACtB,MAAM,CAAC,YAAY,CACjB,yBAAyB,EACzB;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,kFAAkF;QAC/F,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;YACvE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SACvG,CAAC;QACF,WAAW,EAAE;YACX,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAC/B,MAAM,MAAM,GAA2B,EAAE,CAAC;QAE1C,IAAI,MAAM,KAAK,SAAS,EAAE,C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,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { api, jsonResult, errorResult } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* Register bot integration tools (HTTP APIs, webhooks the bot can call)
|
|
5
|
+
*/
|
|
6
|
+
export function registerToolsTools(server) {
|
|
7
|
+
// 1. Create Tool
|
|
8
|
+
server.registerTool("neuron_create_tool", {
|
|
9
|
+
title: "Create Tool",
|
|
10
|
+
description: "Create a new tool integration for a bot to call external HTTP APIs and webhooks",
|
|
11
|
+
inputSchema: z.object({
|
|
12
|
+
botId: z.string().describe("The ID of the bot to create the tool for"),
|
|
13
|
+
name: z.string().describe("Name of the tool"),
|
|
14
|
+
description: z.string().optional().describe("Description of what the tool does"),
|
|
15
|
+
type: z.string().describe("Type of the tool (e.g., 'http', 'webhook')"),
|
|
16
|
+
config: z.object({
|
|
17
|
+
url: z.string().describe("The HTTP endpoint URL"),
|
|
18
|
+
method: z.string().describe("HTTP method (GET, POST, PUT, DELETE, etc.)"),
|
|
19
|
+
headers: z.record(z.string()).optional().describe("HTTP headers to include"),
|
|
20
|
+
bodyTemplate: z.string().optional().describe("Template for request body"),
|
|
21
|
+
responseMapping: z.record(z.any()).optional().describe("How to map the response"),
|
|
22
|
+
}).describe("Tool configuration object"),
|
|
23
|
+
authType: z.string().optional().describe("Authentication type (bearer, basic, apiKey, etc.)"),
|
|
24
|
+
rateLimit: z.number().optional().describe("Rate limit (requests per minute)"),
|
|
25
|
+
timeoutMs: z.number().optional().describe("Request timeout in milliseconds"),
|
|
26
|
+
}),
|
|
27
|
+
annotations: {
|
|
28
|
+
openWorldHint: true,
|
|
29
|
+
},
|
|
30
|
+
}, async (args) => {
|
|
31
|
+
const { botId, ...body } = args;
|
|
32
|
+
const response = await api("POST", `/tools/bot/${botId}`, body);
|
|
33
|
+
if (response.success) {
|
|
34
|
+
return jsonResult(response.data);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return errorResult(response.error || "Failed to create tool");
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
// 2. List Tools
|
|
41
|
+
server.registerTool("neuron_list_tools", {
|
|
42
|
+
title: "List Tools",
|
|
43
|
+
description: "List all tool integrations for a specific bot",
|
|
44
|
+
inputSchema: z.object({
|
|
45
|
+
botId: z.string().describe("The ID of the bot to list tools for"),
|
|
46
|
+
}),
|
|
47
|
+
annotations: {
|
|
48
|
+
openWorldHint: true,
|
|
49
|
+
},
|
|
50
|
+
}, async (args) => {
|
|
51
|
+
const response = await api("GET", `/tools/bot/${args.botId}`);
|
|
52
|
+
if (response.success) {
|
|
53
|
+
return jsonResult(response.data);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
return errorResult(response.error || "Failed to list tools");
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
// 3. Update Tool
|
|
60
|
+
server.registerTool("neuron_update_tool", {
|
|
61
|
+
title: "Update Tool",
|
|
62
|
+
description: "Update an existing tool integration configuration",
|
|
63
|
+
inputSchema: z.object({
|
|
64
|
+
id: z.string().describe("The ID of the tool to update"),
|
|
65
|
+
name: z.string().optional().describe("Updated name of the tool"),
|
|
66
|
+
description: z.string().optional().describe("Updated description"),
|
|
67
|
+
config: z.object({
|
|
68
|
+
url: z.string().optional().describe("The HTTP endpoint URL"),
|
|
69
|
+
method: z.string().optional().describe("HTTP method"),
|
|
70
|
+
headers: z.record(z.string()).optional().describe("HTTP headers"),
|
|
71
|
+
bodyTemplate: z.string().optional().describe("Template for request body"),
|
|
72
|
+
responseMapping: z.record(z.any()).optional().describe("Response mapping"),
|
|
73
|
+
}).optional().describe("Updated tool configuration"),
|
|
74
|
+
authType: z.string().optional().describe("Updated authentication type"),
|
|
75
|
+
rateLimit: z.number().optional().describe("Updated rate limit"),
|
|
76
|
+
timeoutMs: z.number().optional().describe("Updated timeout in milliseconds"),
|
|
77
|
+
}),
|
|
78
|
+
annotations: {
|
|
79
|
+
openWorldHint: true,
|
|
80
|
+
},
|
|
81
|
+
}, async (args) => {
|
|
82
|
+
const { id, ...body } = args;
|
|
83
|
+
const response = await api("PUT", `/tools/${id}`, body);
|
|
84
|
+
if (response.success) {
|
|
85
|
+
return jsonResult(response.data);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
return errorResult(response.error || "Failed to update tool");
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
// 4. Delete Tool
|
|
92
|
+
server.registerTool("neuron_delete_tool", {
|
|
93
|
+
title: "Delete Tool",
|
|
94
|
+
description: "Delete a tool integration from a bot",
|
|
95
|
+
inputSchema: z.object({
|
|
96
|
+
id: z.string().describe("The ID of the tool to delete"),
|
|
97
|
+
}),
|
|
98
|
+
annotations: {
|
|
99
|
+
openWorldHint: true,
|
|
100
|
+
},
|
|
101
|
+
}, async (args) => {
|
|
102
|
+
const response = await api("DELETE", `/tools/${args.id}`);
|
|
103
|
+
if (response.success) {
|
|
104
|
+
return jsonResult(response.data || { message: "Tool deleted successfully" });
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
return errorResult(response.error || "Failed to delete tool");
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
// 5. Test Tool
|
|
111
|
+
server.registerTool("neuron_test_tool", {
|
|
112
|
+
title: "Test Tool",
|
|
113
|
+
description: "Test a tool integration with sample arguments to verify it works correctly",
|
|
114
|
+
inputSchema: z.object({
|
|
115
|
+
id: z.string().describe("The ID of the tool to test"),
|
|
116
|
+
args: z.record(z.any()).describe("Test arguments object to pass to the tool"),
|
|
117
|
+
}),
|
|
118
|
+
annotations: {
|
|
119
|
+
openWorldHint: true,
|
|
120
|
+
},
|
|
121
|
+
}, async (args) => {
|
|
122
|
+
const { id, args: testArgs } = args;
|
|
123
|
+
const response = await api("POST", `/tools/${id}/test`, { args: testArgs });
|
|
124
|
+
if (response.success) {
|
|
125
|
+
return jsonResult(response.data);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
return errorResult(response.error || "Tool test failed");
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
// 6. Add Tool Secret
|
|
132
|
+
server.registerTool("neuron_add_tool_secret", {
|
|
133
|
+
title: "Add Tool Secret",
|
|
134
|
+
description: "Add or update a secret (API key, token, etc.) for a tool integration",
|
|
135
|
+
inputSchema: z.object({
|
|
136
|
+
id: z.string().describe("The ID of the tool"),
|
|
137
|
+
key: z.string().describe("Secret key name (e.g., 'API_KEY', 'AUTH_TOKEN')"),
|
|
138
|
+
value: z.string().describe("Secret value to store securely"),
|
|
139
|
+
}),
|
|
140
|
+
annotations: {
|
|
141
|
+
openWorldHint: true,
|
|
142
|
+
},
|
|
143
|
+
}, async (args) => {
|
|
144
|
+
const { id, ...body } = args;
|
|
145
|
+
const response = await api("POST", `/tools/${id}/secrets`, body);
|
|
146
|
+
if (response.success) {
|
|
147
|
+
return jsonResult(response.data || { message: "Secret added successfully" });
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
return errorResult(response.error || "Failed to add tool secret");
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
// 7. Remove Tool Secret
|
|
154
|
+
server.registerTool("neuron_remove_tool_secret", {
|
|
155
|
+
title: "Remove Tool Secret",
|
|
156
|
+
description: "Remove a secret from a tool integration",
|
|
157
|
+
inputSchema: z.object({
|
|
158
|
+
id: z.string().describe("The ID of the tool"),
|
|
159
|
+
key: z.string().describe("Secret key name to remove"),
|
|
160
|
+
}),
|
|
161
|
+
annotations: {
|
|
162
|
+
openWorldHint: true,
|
|
163
|
+
},
|
|
164
|
+
}, async (args) => {
|
|
165
|
+
const response = await api("DELETE", `/tools/${args.id}/secrets/${args.key}`);
|
|
166
|
+
if (response.success) {
|
|
167
|
+
return jsonResult(response.data || { message: "Secret removed successfully" });
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
return errorResult(response.error || "Failed to remove tool secret");
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
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ACtD,CAAC;QACF,WAAW,EAAE;YACX,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE;QACb,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,EAAE,UAAU,IAAI,CAAC,EAAE,YAAY,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QAE9E,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACrB,OAAO,UAAU,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC,CAAC;QACjF,CAAC;aAAM,CAAC;YACN,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAK,IAAI,8BAA8B,CAAC,CAAC;QACvE,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { api, jsonResult, errorResult } from "../client.js";
|
|
3
|
+
export function registerWalletTools(server) {
|
|
4
|
+
server.registerTool("neuron_wallet_balance", {
|
|
5
|
+
title: "Wallet Balance",
|
|
6
|
+
description: "Check your organization's wallet balance",
|
|
7
|
+
inputSchema: z.object({}),
|
|
8
|
+
annotations: { readOnlyHint: true },
|
|
9
|
+
}, async () => {
|
|
10
|
+
try {
|
|
11
|
+
const result = await api("GET", "/wallets");
|
|
12
|
+
return jsonResult(result);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
return errorResult(error);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
server.registerTool("neuron_wallet_transactions", {
|
|
19
|
+
title: "Wallet Transactions",
|
|
20
|
+
description: "List wallet transaction history with optional type filter",
|
|
21
|
+
inputSchema: z.object({
|
|
22
|
+
type: z.string().optional().describe("Filter by type: credit, debit"),
|
|
23
|
+
page: z.number().int().positive().optional(),
|
|
24
|
+
limit: z.number().int().positive().optional(),
|
|
25
|
+
}),
|
|
26
|
+
annotations: { readOnlyHint: true },
|
|
27
|
+
}, async (params) => {
|
|
28
|
+
try {
|
|
29
|
+
const result = await api("GET", "/wallets/transactions", undefined, params);
|
|
30
|
+
return jsonResult(result);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
return errorResult(error);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
server.registerTool("neuron_fund_wallet", {
|
|
37
|
+
title: "Fund Wallet",
|
|
38
|
+
description: "Initialize wallet funding via Paystack. Returns a checkout URL to complete payment.",
|
|
39
|
+
inputSchema: z.object({
|
|
40
|
+
amount: z.number().int().positive().describe("Amount in kobo (e.g. 500000 = ₦5,000)"),
|
|
41
|
+
email: z.string().email().describe("Email for payment receipt"),
|
|
42
|
+
}),
|
|
43
|
+
}, async (params) => {
|
|
44
|
+
try {
|
|
45
|
+
const result = await api("POST", "/wallets/fund", params);
|
|
46
|
+
return jsonResult(result);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return errorResult(error);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
server.registerTool("neuron_verify_wallet_funding", {
|
|
53
|
+
title: "Verify Wallet Funding",
|
|
54
|
+
description: "Verify a wallet funding transaction by Paystack reference",
|
|
55
|
+
inputSchema: z.object({
|
|
56
|
+
reference: z.string().describe("Paystack payment reference"),
|
|
57
|
+
}),
|
|
58
|
+
}, async (params) => {
|
|
59
|
+
try {
|
|
60
|
+
const result = await api("POST", "/wallets/fund/verify", params);
|
|
61
|
+
return jsonResult(result);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
return errorResult(error);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=wallets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallets.js","sourceRoot":"","sources":["../../src/tools/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAA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