@datanimbus/dnio-mcp 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 (59) hide show
  1. package/Dockerfile +20 -0
  2. package/docs/README.md +35 -0
  3. package/docs/architecture.md +171 -0
  4. package/docs/authentication.md +74 -0
  5. package/docs/tools/apps.md +59 -0
  6. package/docs/tools/connectors.md +76 -0
  7. package/docs/tools/data-pipes.md +286 -0
  8. package/docs/tools/data-services.md +105 -0
  9. package/docs/tools/deployment-groups.md +152 -0
  10. package/docs/tools/plugins.md +94 -0
  11. package/docs/tools/records.md +97 -0
  12. package/docs/workflows.md +195 -0
  13. package/env.example +16 -0
  14. package/package.json +43 -0
  15. package/readme.md +144 -0
  16. package/src/clients/api-keys.js +10 -0
  17. package/src/clients/apps.js +13 -0
  18. package/src/clients/base-client.js +78 -0
  19. package/src/clients/bots.js +10 -0
  20. package/src/clients/connectors.js +30 -0
  21. package/src/clients/data-formats.js +40 -0
  22. package/src/clients/data-pipes.js +33 -0
  23. package/src/clients/deployment-groups.js +59 -0
  24. package/src/clients/formulas.js +10 -0
  25. package/src/clients/functions.js +10 -0
  26. package/src/clients/plugins.js +39 -0
  27. package/src/clients/records.js +51 -0
  28. package/src/clients/services.js +63 -0
  29. package/src/clients/user-groups.js +10 -0
  30. package/src/clients/users.js +10 -0
  31. package/src/examples/ai-sdk-client.js +165 -0
  32. package/src/examples/claude_desktop_config.json +34 -0
  33. package/src/examples/express-integration.js +181 -0
  34. package/src/index.js +283 -0
  35. package/src/schemas/schema-converter.js +179 -0
  36. package/src/services/auth-manager.js +277 -0
  37. package/src/services/dnio-client.js +40 -0
  38. package/src/services/service-registry.js +150 -0
  39. package/src/services/session-manager.js +161 -0
  40. package/src/stdio-bridge.js +185 -0
  41. package/src/tools/_helpers.js +32 -0
  42. package/src/tools/api-keys.js +5 -0
  43. package/src/tools/apps.js +185 -0
  44. package/src/tools/bots.js +5 -0
  45. package/src/tools/connectors.js +165 -0
  46. package/src/tools/data-formats.js +806 -0
  47. package/src/tools/data-pipes.js +1305 -0
  48. package/src/tools/data-service-registry.js +500 -0
  49. package/src/tools/deployment-groups.js +511 -0
  50. package/src/tools/formulas.js +5 -0
  51. package/src/tools/functions.js +5 -0
  52. package/src/tools/mcp-tools-registry.js +38 -0
  53. package/src/tools/plugins.js +250 -0
  54. package/src/tools/records.js +217 -0
  55. package/src/tools/services.js +476 -0
  56. package/src/tools/user-groups.js +5 -0
  57. package/src/tools/users.js +5 -0
  58. package/src/utils/constants.js +135 -0
  59. package/src/utils/logger.js +63 -0
@@ -0,0 +1,511 @@
1
+ 'use strict';
2
+
3
+ const {z} = require('zod');
4
+ const {toolError} = require('./_helpers');
5
+
6
+ // ─── Helpers ────────────────────────────────────────────────────────────────
7
+
8
+ function buildDeploymentEntry(flow) {
9
+ return {
10
+ _id: flow._id,
11
+ name: flow.name,
12
+ type: 'FLOW',
13
+ version: flow.version || 1,
14
+ inputNode: flow.inputNode || {}
15
+ };
16
+ }
17
+
18
+ function dedupeArray(arr) {
19
+ const seen = new Set();
20
+ const dups = [];
21
+ for (const x of arr) {
22
+ if (seen.has(x)) dups.push(x);
23
+ seen.add(x);
24
+ }
25
+ return {unique: [...seen], duplicates: dups};
26
+ }
27
+
28
+ async function fetchFlowsForDeployment(dnioClient, appName, flowIds) {
29
+ const results = await Promise.all(flowIds.map(id => dnioClient.dataPipes.get(appName, id)));
30
+ return results.map(buildDeploymentEntry);
31
+ }
32
+
33
+ async function validateAvailability(dnioClient, appName, flowIds) {
34
+ const available = await dnioClient.deploymentGroups.listAvailableFlows(appName);
35
+ const availSet = new Set((Array.isArray(available) ? available : []).map(f => f._id));
36
+ const unavailable = flowIds.filter(id => !availSet.has(id));
37
+ return {availableSet: availSet, unavailable};
38
+ }
39
+
40
+ // ─── Tool registrations ─────────────────────────────────────────────────────
41
+
42
+ module.exports = function registerDeploymentGroupsTools({server, dnioClient, registry, userContext}) {
43
+ const requireApp = () => {
44
+ if (!registry.selectedApp) {
45
+ return {content: [{type: 'text', text: 'No app selected. Use list_apps → select_app first.'}], isError: true};
46
+ }
47
+ return null;
48
+ };
49
+
50
+ // ─── Discovery ──────────────────────────────────────────────────────────
51
+
52
+ server.registerTool(
53
+ 'list_available_flows',
54
+ {
55
+ title: 'List Flows Available For Deployment',
56
+ description: `List flows in the selected app that can be added to a deployment group right now. A flow is "available" only when it is published AND not currently bound to any other deployment group.
57
+
58
+ This is the source of truth for create_deployment_group / add_flows_to_deployment_group — call it first.`,
59
+ inputSchema: {},
60
+ annotations: {readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false}
61
+ },
62
+ async () => {
63
+ const guard = requireApp();
64
+ if (guard) return guard;
65
+ try {
66
+ dnioClient.setToken(userContext.token);
67
+ const result = await dnioClient.deploymentGroups.listAvailableFlows(registry.selectedApp);
68
+ const flows = Array.isArray(result) ? result : [];
69
+ return {
70
+ content: [{
71
+ type: 'text',
72
+ text: JSON.stringify({
73
+ app: registry.selectedApp,
74
+ count: flows.length,
75
+ flows: flows.map(f => ({_id: f._id, name: f.name, type: f.type || 'FLOW'})),
76
+ usage: 'Pass these _id values to create_deployment_group.flowIds or add_flows_to_deployment_group.flowIds.'
77
+ }, null, 2)
78
+ }]
79
+ };
80
+ } catch (error) {
81
+ return toolError('Failed to list available flows', error);
82
+ }
83
+ }
84
+ );
85
+
86
+ server.registerTool(
87
+ 'list_deployment_groups',
88
+ {
89
+ title: 'List Deployment Groups',
90
+ description: `List deployment groups in the selected app. Each item shows status (Running/Stopped/Pending/etc.) and the flows currently bound to the group.
91
+
92
+ Args:
93
+ - name (optional): Substring filter on group name (client-side).
94
+ - status (optional): Filter by status field.`,
95
+ inputSchema: {
96
+ name: z.string().optional().describe('Substring filter on group name'),
97
+ status: z.string().optional().describe("Status filter, e.g. 'Running' or 'Stopped'")
98
+ },
99
+ annotations: {readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false}
100
+ },
101
+ async (params) => {
102
+ const guard = requireApp();
103
+ if (guard) return guard;
104
+ try {
105
+ dnioClient.setToken(userContext.token);
106
+ const filter = {};
107
+ if (params.status) filter.status = params.status;
108
+ const result = await dnioClient.deploymentGroups.list(registry.selectedApp, {filter});
109
+ let groups = Array.isArray(result) ? result : [];
110
+ if (params.name) {
111
+ const q = params.name.toLowerCase();
112
+ groups = groups.filter(g => (g.name || '').toLowerCase().includes(q));
113
+ }
114
+ const summary = groups.map(g => ({
115
+ groupId: g._id,
116
+ name: g.name,
117
+ status: g.status,
118
+ deploymentCount: (g.deployments || []).length,
119
+ deployments: (g.deployments || []).map(d => ({_id: d._id, name: d.name, version: d.version, type: d.type}))
120
+ }));
121
+ return {
122
+ content: [{
123
+ type: 'text',
124
+ text: JSON.stringify({app: registry.selectedApp, count: summary.length, groups: summary}, null, 2)
125
+ }]
126
+ };
127
+ } catch (error) {
128
+ return toolError('Failed to list deployment groups', error);
129
+ }
130
+ }
131
+ );
132
+
133
+ server.registerTool(
134
+ 'get_deployment_group',
135
+ {
136
+ title: 'Get Deployment Group',
137
+ description: `Fetch the full deployment group document by groupId. Always returns latest server state — mutating tools fetch internally too, so this is purely for inspection.
138
+
139
+ Args:
140
+ - groupId (required): e.g. 'DG2943'.`,
141
+ inputSchema: {
142
+ groupId: z.string().min(1).describe("Deployment group _id (e.g. 'DG2943')")
143
+ },
144
+ annotations: {readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false}
145
+ },
146
+ async (params) => {
147
+ const guard = requireApp();
148
+ if (guard) return guard;
149
+ try {
150
+ dnioClient.setToken(userContext.token);
151
+ const group = await dnioClient.deploymentGroups.get(registry.selectedApp, params.groupId);
152
+ return {content: [{type: 'text', text: JSON.stringify(group, null, 2)}]};
153
+ } catch (error) {
154
+ return toolError(`Failed to get deployment group ${params.groupId}`, error);
155
+ }
156
+ }
157
+ );
158
+
159
+ // ─── Create / Mutate ────────────────────────────────────────────────────
160
+
161
+ server.registerTool(
162
+ 'create_deployment_group',
163
+ {
164
+ title: 'Create Deployment Group',
165
+ description: `Create a new deployment group bundling one or more published flows. Validates atomically:
166
+ - every flow must be in list_available_flows (rejects with explicit guidance if not)
167
+ - flowIds must contain no duplicates
168
+
169
+ A flow can belong to AT MOST ONE deployment group. If a requested flow is unavailable, it's already bound elsewhere — call list_deployment_groups to find which group, then either remove it from there or pick a different flow.
170
+
171
+ Args:
172
+ - name (required): Display name for the group.
173
+ - flowIds (required): Array of flow _id values to include (length ≥ 1).`,
174
+ inputSchema: {
175
+ name: z.string().min(1).describe('Group name'),
176
+ flowIds: z.array(z.string().min(1)).min(1).describe('Array of flow _id values to bundle')
177
+ },
178
+ annotations: {destructiveHint: false, idempotentHint: false}
179
+ },
180
+ async (params) => {
181
+ const guard = requireApp();
182
+ if (guard) return guard;
183
+ try {
184
+ const app = registry.selectedApp;
185
+ const {unique, duplicates} = dedupeArray(params.flowIds);
186
+ if (duplicates.length > 0) {
187
+ return toolError(`flowIds contains duplicates: [${duplicates.join(', ')}]. A flow cannot be added twice to the same group.`, new Error(''));
188
+ }
189
+
190
+ dnioClient.setToken(userContext.token);
191
+ const {unavailable} = await validateAvailability(dnioClient, app, unique);
192
+ if (unavailable.length > 0) {
193
+ return toolError(
194
+ `Cannot create group — these flows are not available: [${unavailable.join(', ')}]. A flow can belong to only one deployment group; check list_deployment_groups to find where these flows are currently bound.`,
195
+ new Error('')
196
+ );
197
+ }
198
+
199
+ const deployments = await fetchFlowsForDeployment(dnioClient, app, unique);
200
+ const result = await dnioClient.deploymentGroups.create(app, {
201
+ name: params.name,
202
+ deployments
203
+ });
204
+ return {
205
+ content: [{
206
+ type: 'text',
207
+ text: JSON.stringify({groupId: result._id, status: result.status, group: result}, null, 2)
208
+ }]
209
+ };
210
+ } catch (error) {
211
+ return toolError('Failed to create deployment group', error);
212
+ }
213
+ }
214
+ );
215
+
216
+ server.registerTool(
217
+ 'add_flows_to_deployment_group',
218
+ {
219
+ title: 'Add Flows To Deployment Group',
220
+ description: `Append flows to an existing group. Atomic — rejects the whole call if any requested flow is unavailable, already in this group, or duplicated in the request.
221
+
222
+ Args:
223
+ - groupId (required)
224
+ - flowIds (required): Array of flow _id values to add.`,
225
+ inputSchema: {
226
+ groupId: z.string().min(1),
227
+ flowIds: z.array(z.string().min(1)).min(1)
228
+ },
229
+ annotations: {destructiveHint: false, idempotentHint: false}
230
+ },
231
+ async (params) => {
232
+ const guard = requireApp();
233
+ if (guard) return guard;
234
+ try {
235
+ const app = registry.selectedApp;
236
+ const {unique, duplicates} = dedupeArray(params.flowIds);
237
+ if (duplicates.length > 0) {
238
+ return toolError(`flowIds contains duplicates: [${duplicates.join(', ')}].`, new Error(''));
239
+ }
240
+
241
+ dnioClient.setToken(userContext.token);
242
+ const group = await dnioClient.deploymentGroups.get(app, params.groupId);
243
+
244
+ const alreadyInGroup = unique.filter(id => (group.deployments || []).some(d => d._id === id));
245
+ if (alreadyInGroup.length > 0) {
246
+ return toolError(`Already in this group: [${alreadyInGroup.join(', ')}].`, new Error(''));
247
+ }
248
+
249
+ const {unavailable} = await validateAvailability(dnioClient, app, unique);
250
+ if (unavailable.length > 0) {
251
+ return toolError(
252
+ `Cannot add — these flows are not available: [${unavailable.join(', ')}]. A flow can belong to only one deployment group.`,
253
+ new Error('')
254
+ );
255
+ }
256
+
257
+ const newEntries = await fetchFlowsForDeployment(dnioClient, app, unique);
258
+ group.deployments = [...(group.deployments || []), ...newEntries];
259
+
260
+ const result = await dnioClient.deploymentGroups.update(app, params.groupId, group);
261
+ return {
262
+ content: [{
263
+ type: 'text',
264
+ text: JSON.stringify({groupId: params.groupId, addedFlowIds: unique, group: result}, null, 2)
265
+ }]
266
+ };
267
+ } catch (error) {
268
+ return toolError(`Failed to add flows to group ${params.groupId}`, error);
269
+ }
270
+ }
271
+ );
272
+
273
+ server.registerTool(
274
+ 'remove_flows_from_deployment_group',
275
+ {
276
+ title: 'Remove Flows From Deployment Group',
277
+ description: `Detach flows from a group. Removed flows become available again (will appear in list_available_flows).
278
+
279
+ If removing all flows would leave the group empty, the response includes a warning. Removing all flows from a Running group will cause the next start to fail — set force=true to acknowledge and proceed silently.
280
+
281
+ Args:
282
+ - groupId (required)
283
+ - flowIds (required): Array of flow _id values to remove.
284
+ - force (optional, default false): Skip the empty-group warning.`,
285
+ inputSchema: {
286
+ groupId: z.string().min(1),
287
+ flowIds: z.array(z.string().min(1)).min(1),
288
+ force: z.boolean().optional()
289
+ },
290
+ annotations: {destructiveHint: false, idempotentHint: false}
291
+ },
292
+ async (params) => {
293
+ const guard = requireApp();
294
+ if (guard) return guard;
295
+ try {
296
+ const app = registry.selectedApp;
297
+ dnioClient.setToken(userContext.token);
298
+ const group = await dnioClient.deploymentGroups.get(app, params.groupId);
299
+
300
+ const removeSet = new Set(params.flowIds);
301
+ const before = (group.deployments || []).length;
302
+ group.deployments = (group.deployments || []).filter(d => !removeSet.has(d._id));
303
+ const removed = before - group.deployments.length;
304
+
305
+ if (removed === 0) {
306
+ return toolError(`None of the requested flowIds [${params.flowIds.join(', ')}] are in group ${params.groupId}.`, new Error(''));
307
+ }
308
+
309
+ const result = await dnioClient.deploymentGroups.update(app, params.groupId, group);
310
+ const response = {
311
+ groupId: params.groupId,
312
+ removedCount: removed,
313
+ remainingCount: group.deployments.length,
314
+ group: result
315
+ };
316
+ if (group.deployments.length === 0 && !params.force) {
317
+ response.warning = 'Group is now empty. If it is currently Running, the next start_deployment_group will fail. Pass force=true to suppress this warning.';
318
+ }
319
+ return {content: [{type: 'text', text: JSON.stringify(response, null, 2)}]};
320
+ } catch (error) {
321
+ return toolError(`Failed to remove flows from group ${params.groupId}`, error);
322
+ }
323
+ }
324
+ );
325
+
326
+ server.registerTool(
327
+ 'rename_deployment_group',
328
+ {
329
+ title: 'Rename Deployment Group',
330
+ description: `Change the name of a deployment group. Does not affect deployments or running pods.
331
+
332
+ Args:
333
+ - groupId (required)
334
+ - name (required): New name.`,
335
+ inputSchema: {
336
+ groupId: z.string().min(1),
337
+ name: z.string().min(1)
338
+ },
339
+ annotations: {destructiveHint: false, idempotentHint: true}
340
+ },
341
+ async (params) => {
342
+ const guard = requireApp();
343
+ if (guard) return guard;
344
+ try {
345
+ const app = registry.selectedApp;
346
+ dnioClient.setToken(userContext.token);
347
+ const group = await dnioClient.deploymentGroups.get(app, params.groupId);
348
+ group.name = params.name;
349
+ const result = await dnioClient.deploymentGroups.update(app, params.groupId, group);
350
+ return {content: [{type: 'text', text: JSON.stringify({groupId: params.groupId, name: params.name, group: result}, null, 2)}]};
351
+ } catch (error) {
352
+ return toolError(`Failed to rename group ${params.groupId}`, error);
353
+ }
354
+ }
355
+ );
356
+
357
+ // ─── K8s lifecycle ──────────────────────────────────────────────────────
358
+
359
+ server.registerTool(
360
+ 'start_deployment_group',
361
+ {
362
+ title: 'Start Deployment Group (K8s up)',
363
+ description: `Spin up Kubernetes pods + services for every flow in the group.
364
+
365
+ ⚠️ This triggers a real Kubernetes deployment and may take ~10 seconds to become healthy. The tool returns as soon as the platform accepts the request — it does NOT wait for pod readiness. Poll get_deployment_group separately if you need to confirm.
366
+
367
+ Args:
368
+ - groupId (required)`,
369
+ inputSchema: {groupId: z.string().min(1)},
370
+ annotations: {destructiveHint: false, idempotentHint: true}
371
+ },
372
+ async (params) => {
373
+ const guard = requireApp();
374
+ if (guard) return guard;
375
+ try {
376
+ dnioClient.setToken(userContext.token);
377
+ const result = await dnioClient.deploymentGroups.start(registry.selectedApp, params.groupId);
378
+ return {content: [{type: 'text', text: JSON.stringify({groupId: params.groupId, action: 'start', note: 'Kubernetes deployment initiated; may take ~10s to settle.', result}, null, 2)}]};
379
+ } catch (error) {
380
+ return toolError(`Failed to start group ${params.groupId}`, error);
381
+ }
382
+ }
383
+ );
384
+
385
+ server.registerTool(
386
+ 'stop_deployment_group',
387
+ {
388
+ title: 'Stop Deployment Group (K8s down)',
389
+ description: `Tear down the Kubernetes pods for this group. Group definition and deployments[] are preserved — flows stay bound to the group and remain unavailable to other groups until the group is deleted or the flows are explicitly removed.
390
+
391
+ The tool returns as soon as the platform accepts the request; actual pod teardown is async.
392
+
393
+ Args:
394
+ - groupId (required)`,
395
+ inputSchema: {groupId: z.string().min(1)},
396
+ annotations: {destructiveHint: false, idempotentHint: true}
397
+ },
398
+ async (params) => {
399
+ const guard = requireApp();
400
+ if (guard) return guard;
401
+ try {
402
+ dnioClient.setToken(userContext.token);
403
+ const result = await dnioClient.deploymentGroups.stop(registry.selectedApp, params.groupId);
404
+ return {content: [{type: 'text', text: JSON.stringify({groupId: params.groupId, action: 'stop', result}, null, 2)}]};
405
+ } catch (error) {
406
+ return toolError(`Failed to stop group ${params.groupId}`, error);
407
+ }
408
+ }
409
+ );
410
+
411
+ server.registerTool(
412
+ 'sync_deployment_group',
413
+ {
414
+ title: 'Sync Deployment Group (re-pull latest published flows)',
415
+ description: `Re-pull the latest PUBLISHED version of every flow in the group and reconcile the running pods. Use this after editing + republishing a flow that is already bound to a running group.
416
+
417
+ ⚠️ Drafts are ignored — only the latest publish is synced. If you forget to publish_flow, your edits won't propagate.
418
+
419
+ Args:
420
+ - groupId (required)`,
421
+ inputSchema: {groupId: z.string().min(1)},
422
+ annotations: {destructiveHint: false, idempotentHint: true}
423
+ },
424
+ async (params) => {
425
+ const guard = requireApp();
426
+ if (guard) return guard;
427
+ try {
428
+ dnioClient.setToken(userContext.token);
429
+ const result = await dnioClient.deploymentGroups.sync(registry.selectedApp, params.groupId);
430
+ return {content: [{type: 'text', text: JSON.stringify({groupId: params.groupId, action: 'sync', result}, null, 2)}]};
431
+ } catch (error) {
432
+ return toolError(`Failed to sync group ${params.groupId}`, error);
433
+ }
434
+ }
435
+ );
436
+
437
+ server.registerTool(
438
+ 'delete_deployment_group',
439
+ {
440
+ title: 'Delete Deployment Group',
441
+ description: `⚠️ Destructive. Permanently delete a deployment group. Tears down K8s pods AND removes the group definition. Bound flows become available again to be added to other groups.
442
+
443
+ Two-phase confirmation:
444
+ - confirm: false (default) → returns the group document and the list of flows that WOULD be freed; nothing is deleted.
445
+ - confirm: true → actually deletes.
446
+
447
+ Args:
448
+ - groupId (required)
449
+ - confirm (required, default false): Set to true to actually delete.`,
450
+ inputSchema: {
451
+ groupId: z.string().min(1),
452
+ confirm: z.boolean().optional()
453
+ },
454
+ annotations: {destructiveHint: true, idempotentHint: false}
455
+ },
456
+ async (params) => {
457
+ const guard = requireApp();
458
+ if (guard) return guard;
459
+ try {
460
+ const app = registry.selectedApp;
461
+ dnioClient.setToken(userContext.token);
462
+
463
+ if (!params.confirm) {
464
+ const group = await dnioClient.deploymentGroups.get(app, params.groupId);
465
+ return {
466
+ content: [{
467
+ type: 'text',
468
+ text: JSON.stringify({
469
+ error: 'confirmation required',
470
+ message: 'Pass confirm=true to actually delete this group. The flows listed in freedFlows will become available to add to other groups.',
471
+ groupId: params.groupId,
472
+ freedFlows: (group.deployments || []).map(d => ({_id: d._id, name: d.name, version: d.version})),
473
+ group
474
+ }, null, 2)
475
+ }],
476
+ isError: true
477
+ };
478
+ }
479
+
480
+ const result = await dnioClient.deploymentGroups.delete(app, params.groupId);
481
+ return {content: [{type: 'text', text: JSON.stringify({groupId: params.groupId, action: 'deleted', result}, null, 2)}]};
482
+ } catch (error) {
483
+ return toolError(`Failed to delete group ${params.groupId}`, error);
484
+ }
485
+ }
486
+ );
487
+
488
+ server.registerTool(
489
+ 'get_deployment_group_yamls',
490
+ {
491
+ title: 'Get Deployment Group K8s YAMLs',
492
+ description: `Fetch the actual Kubernetes Deployment + Service YAMLs the platform generated for this group. Read-only; useful for debugging or showing the user what's running.
493
+
494
+ Args:
495
+ - groupId (required)`,
496
+ inputSchema: {groupId: z.string().min(1)},
497
+ annotations: {readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false}
498
+ },
499
+ async (params) => {
500
+ const guard = requireApp();
501
+ if (guard) return guard;
502
+ try {
503
+ dnioClient.setToken(userContext.token);
504
+ const result = await dnioClient.deploymentGroups.getYamls(registry.selectedApp, params.groupId);
505
+ return {content: [{type: 'text', text: JSON.stringify({groupId: params.groupId, yamls: result}, null, 2)}]};
506
+ } catch (error) {
507
+ return toolError(`Failed to fetch YAMLs for group ${params.groupId}`, error);
508
+ }
509
+ }
510
+ );
511
+ };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = function registerFormulasTools(_ctx) {
4
+ // TODO: register DNIO formulas tools
5
+ };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ module.exports = function registerFunctionsTools(_ctx) {
4
+ // TODO: register DNIO functions tools
5
+ };
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ const registerAppsTools = require('./apps');
4
+ const registerServicesTools = require('./services');
5
+ const registerRecordsTools = require('./records');
6
+ const registerConnectorsTools = require('./connectors');
7
+ const registerDataPipesTools = require('./data-pipes');
8
+ const registerPluginsTools = require('./plugins');
9
+ const registerFunctionsTools = require('./functions');
10
+ const registerDataFormatsTools = require('./data-formats');
11
+ const registerFormulasTools = require('./formulas');
12
+ const registerUsersTools = require('./users');
13
+ const registerUserGroupsTools = require('./user-groups');
14
+ const registerApiKeysTools = require('./api-keys');
15
+ const registerBotsTools = require('./bots');
16
+ const registerDeploymentGroupsTools = require('./deployment-groups');
17
+
18
+ function registerAllTools(server, dnioClient, authManager, registry, userContext) {
19
+ const ctx = {server, dnioClient, authManager, registry, userContext};
20
+
21
+ registerAppsTools(ctx);
22
+ registerServicesTools(ctx);
23
+ registerRecordsTools(ctx);
24
+ registerConnectorsTools(ctx);
25
+
26
+ registerDataPipesTools(ctx);
27
+ registerPluginsTools(ctx);
28
+ registerFunctionsTools(ctx);
29
+ registerDataFormatsTools(ctx);
30
+ registerFormulasTools(ctx);
31
+ registerUsersTools(ctx);
32
+ registerUserGroupsTools(ctx);
33
+ registerApiKeysTools(ctx);
34
+ registerBotsTools(ctx);
35
+ registerDeploymentGroupsTools(ctx);
36
+ }
37
+
38
+ module.exports = registerAllTools;