@nodusapi/mcp-server 1.2.0 → 1.2.1
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/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +443 -0
- package/dist/tools/index.js.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,9 +4,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
4
4
|
import { NodusClient } from './client/nodus-client.js';
|
|
5
5
|
import { getConfig, promptForConfig } from './config.js';
|
|
6
6
|
import { validateConfig, maskApiKey } from './utils/auth.js';
|
|
7
|
-
import {
|
|
8
|
-
import { registerSchemaTools } from './tools/schema-tools.js';
|
|
9
|
-
import { registerProjectTools } from './tools/project-tools.js';
|
|
7
|
+
import { registerTools } from './tools/index.js';
|
|
10
8
|
import { registerResources } from './resources/schema-resources.js';
|
|
11
9
|
async function main() {
|
|
12
10
|
console.error('Starting Nodus MCP Server...\n');
|
|
@@ -42,9 +40,7 @@ async function main() {
|
|
|
42
40
|
resources: {},
|
|
43
41
|
},
|
|
44
42
|
});
|
|
45
|
-
|
|
46
|
-
registerSchemaTools(server, client);
|
|
47
|
-
registerProjectTools(server, client);
|
|
43
|
+
registerTools(server, client);
|
|
48
44
|
registerResources(server, client);
|
|
49
45
|
const transport = new StdioServerTransport();
|
|
50
46
|
await server.connect(transport);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,S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AAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAKnE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAkBxD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,QA2fhE"}
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { ListToolsRequestSchema, CallToolRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import {
|
|
3
|
+
// Data schemas
|
|
4
|
+
GetRowSchema, CreateRowSchema,
|
|
5
|
+
// Schema management schemas
|
|
6
|
+
ListTablesSchema, GetTableSchemaSchema, CreateTableSchema, UpdateTableSchema, AddColumnSchema, UpdateColumnSchema,
|
|
7
|
+
// Project management schemas
|
|
8
|
+
ListProjectsSchema, CreateProjectSchema, SwitchProjectSchema, } from '../utils/validation.js';
|
|
9
|
+
export function registerTools(server, client) {
|
|
10
|
+
// Register ListTools handler (all tools in one place)
|
|
11
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
12
|
+
const tools = [
|
|
13
|
+
// Data CRUD tools
|
|
14
|
+
{
|
|
15
|
+
name: 'get_row',
|
|
16
|
+
description: 'Get a single row by ID from a table',
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
tableSlug: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Table identifier (slug)',
|
|
23
|
+
},
|
|
24
|
+
id: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Row UUID',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['tableSlug', 'id'],
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'create_row',
|
|
34
|
+
description: 'Create a new row in a table',
|
|
35
|
+
inputSchema: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
tableSlug: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Table identifier (slug)',
|
|
41
|
+
},
|
|
42
|
+
data: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
description: 'Row data matching table schema',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
required: ['tableSlug', 'data'],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
// Schema Management tools
|
|
51
|
+
{
|
|
52
|
+
name: 'list_tables',
|
|
53
|
+
description: 'List all tables in the project',
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'get_table_schema',
|
|
61
|
+
description: 'Get detailed schema for a specific table including all columns',
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
tableSlug: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Table identifier (slug)',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ['tableSlug'],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'create_table',
|
|
75
|
+
description: 'Create a new table in the project',
|
|
76
|
+
inputSchema: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
name: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Human-readable table name',
|
|
82
|
+
},
|
|
83
|
+
slug: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'Table slug (lowercase, numbers, underscores only)',
|
|
86
|
+
pattern: '^[a-z0-9_]+$',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
required: ['name', 'slug'],
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'update_table',
|
|
94
|
+
description: 'Update table name',
|
|
95
|
+
inputSchema: {
|
|
96
|
+
type: 'object',
|
|
97
|
+
properties: {
|
|
98
|
+
tableSlug: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'Current table slug',
|
|
101
|
+
},
|
|
102
|
+
name: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'New table name',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
required: ['tableSlug', 'name'],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'add_column',
|
|
112
|
+
description: 'Add a new column to a table',
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
tableSlug: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
description: 'Table identifier (slug)',
|
|
119
|
+
},
|
|
120
|
+
name: {
|
|
121
|
+
type: 'string',
|
|
122
|
+
description: 'Human-readable column name',
|
|
123
|
+
},
|
|
124
|
+
slug: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
description: 'Column slug (lowercase, numbers, underscores only)',
|
|
127
|
+
pattern: '^[a-z0-9_]+$',
|
|
128
|
+
},
|
|
129
|
+
type: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
enum: ['string', 'text', 'integer', 'float', 'boolean', 'datetime', 'json'],
|
|
132
|
+
description: 'Column data type',
|
|
133
|
+
},
|
|
134
|
+
isRequired: {
|
|
135
|
+
type: 'boolean',
|
|
136
|
+
description: 'Whether the column is required',
|
|
137
|
+
},
|
|
138
|
+
defaultValue: {
|
|
139
|
+
description: 'Default value for the column',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
required: ['tableSlug', 'name', 'slug', 'type'],
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: 'update_column',
|
|
147
|
+
description: 'Update column properties (name, isRequired, defaultValue)',
|
|
148
|
+
inputSchema: {
|
|
149
|
+
type: 'object',
|
|
150
|
+
properties: {
|
|
151
|
+
tableSlug: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: 'Table identifier (slug)',
|
|
154
|
+
},
|
|
155
|
+
columnSlug: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
description: 'Column identifier (slug)',
|
|
158
|
+
},
|
|
159
|
+
name: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'New column name',
|
|
162
|
+
},
|
|
163
|
+
isRequired: {
|
|
164
|
+
type: 'boolean',
|
|
165
|
+
description: 'Whether the column is required',
|
|
166
|
+
},
|
|
167
|
+
defaultValue: {
|
|
168
|
+
description: 'Default value for the column',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
required: ['tableSlug', 'columnSlug'],
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
// Project Management tools
|
|
175
|
+
{
|
|
176
|
+
name: 'list_projects',
|
|
177
|
+
description: 'List all projects for the authenticated user',
|
|
178
|
+
inputSchema: {
|
|
179
|
+
type: 'object',
|
|
180
|
+
properties: {},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'create_project',
|
|
185
|
+
description: 'Create a new project with automatic API key generation',
|
|
186
|
+
inputSchema: {
|
|
187
|
+
type: 'object',
|
|
188
|
+
properties: {
|
|
189
|
+
name: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
description: 'Project name',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
required: ['name'],
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: 'switch_project',
|
|
199
|
+
description: 'Switch to a different project (returns new JWT token)',
|
|
200
|
+
inputSchema: {
|
|
201
|
+
type: 'object',
|
|
202
|
+
properties: {
|
|
203
|
+
projectId: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
description: 'Project UUID to switch to',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
required: ['projectId'],
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
];
|
|
212
|
+
return { tools };
|
|
213
|
+
});
|
|
214
|
+
// Register CallTool handler (all tool implementations)
|
|
215
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
216
|
+
const { name, arguments: args } = request.params;
|
|
217
|
+
try {
|
|
218
|
+
switch (name) {
|
|
219
|
+
// Data CRUD implementations
|
|
220
|
+
case 'get_row': {
|
|
221
|
+
const params = GetRowSchema.parse(args);
|
|
222
|
+
const row = await client.getRow(params.tableSlug, params.id);
|
|
223
|
+
return {
|
|
224
|
+
content: [
|
|
225
|
+
{
|
|
226
|
+
type: 'text',
|
|
227
|
+
text: JSON.stringify({
|
|
228
|
+
row,
|
|
229
|
+
message: `Retrieved row ${params.id} from table "${params.tableSlug}"`,
|
|
230
|
+
}, null, 2),
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
case 'create_row': {
|
|
236
|
+
const params = CreateRowSchema.parse(args);
|
|
237
|
+
const row = await client.createRow(params.tableSlug, params.data);
|
|
238
|
+
return {
|
|
239
|
+
content: [
|
|
240
|
+
{
|
|
241
|
+
type: 'text',
|
|
242
|
+
text: JSON.stringify({
|
|
243
|
+
row,
|
|
244
|
+
message: `Successfully created row in table "${params.tableSlug}"`,
|
|
245
|
+
}, null, 2),
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
// Schema Management implementations
|
|
251
|
+
case 'list_tables': {
|
|
252
|
+
ListTablesSchema.parse(args);
|
|
253
|
+
const tables = await client.getTables();
|
|
254
|
+
return {
|
|
255
|
+
content: [
|
|
256
|
+
{
|
|
257
|
+
type: 'text',
|
|
258
|
+
text: JSON.stringify({
|
|
259
|
+
tables: tables.map((t) => ({
|
|
260
|
+
name: t.name,
|
|
261
|
+
slug: t.slug,
|
|
262
|
+
rowCount: t.rowCount,
|
|
263
|
+
createdAt: t.createdAt,
|
|
264
|
+
})),
|
|
265
|
+
count: tables.length,
|
|
266
|
+
message: `Found ${tables.length} tables in the project`,
|
|
267
|
+
}, null, 2),
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
case 'get_table_schema': {
|
|
273
|
+
const params = GetTableSchemaSchema.parse(args);
|
|
274
|
+
const table = await client.getTable(params.tableSlug);
|
|
275
|
+
return {
|
|
276
|
+
content: [
|
|
277
|
+
{
|
|
278
|
+
type: 'text',
|
|
279
|
+
text: JSON.stringify({
|
|
280
|
+
table: {
|
|
281
|
+
name: table.name,
|
|
282
|
+
slug: table.slug,
|
|
283
|
+
createdAt: table.createdAt,
|
|
284
|
+
},
|
|
285
|
+
columns: table.columns.map((c) => ({
|
|
286
|
+
name: c.name,
|
|
287
|
+
slug: c.slug,
|
|
288
|
+
type: c.type,
|
|
289
|
+
isRequired: c.isRequired,
|
|
290
|
+
defaultValue: c.defaultValue,
|
|
291
|
+
})),
|
|
292
|
+
message: `Retrieved schema for table "${table.name}" with ${table.columns.length} columns`,
|
|
293
|
+
}, null, 2),
|
|
294
|
+
},
|
|
295
|
+
],
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
case 'create_table': {
|
|
299
|
+
const params = CreateTableSchema.parse(args);
|
|
300
|
+
const table = await client.createTable(params.name, params.slug);
|
|
301
|
+
return {
|
|
302
|
+
content: [
|
|
303
|
+
{
|
|
304
|
+
type: 'text',
|
|
305
|
+
text: JSON.stringify({
|
|
306
|
+
table,
|
|
307
|
+
message: `Successfully created table "${table.name}" (${table.slug})`,
|
|
308
|
+
}, null, 2),
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
case 'update_table': {
|
|
314
|
+
const params = UpdateTableSchema.parse(args);
|
|
315
|
+
const table = await client.updateTable(params.tableSlug, params.name);
|
|
316
|
+
return {
|
|
317
|
+
content: [
|
|
318
|
+
{
|
|
319
|
+
type: 'text',
|
|
320
|
+
text: JSON.stringify({
|
|
321
|
+
table,
|
|
322
|
+
message: `Successfully updated table "${table.slug}" to "${table.name}"`,
|
|
323
|
+
}, null, 2),
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
case 'add_column': {
|
|
329
|
+
const params = AddColumnSchema.parse(args);
|
|
330
|
+
const table = await client.addColumn(params.tableSlug, {
|
|
331
|
+
name: params.name,
|
|
332
|
+
slug: params.slug,
|
|
333
|
+
type: params.type,
|
|
334
|
+
isRequired: params.isRequired,
|
|
335
|
+
defaultValue: params.defaultValue,
|
|
336
|
+
});
|
|
337
|
+
return {
|
|
338
|
+
content: [
|
|
339
|
+
{
|
|
340
|
+
type: 'text',
|
|
341
|
+
text: JSON.stringify({
|
|
342
|
+
column: table.columns.find((c) => c.slug === params.slug),
|
|
343
|
+
message: `Successfully added column "${params.name}" to table "${params.tableSlug}"`,
|
|
344
|
+
}, null, 2),
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
case 'update_column': {
|
|
350
|
+
const params = UpdateColumnSchema.parse(args);
|
|
351
|
+
const table = await client.updateColumn(params.tableSlug, params.columnSlug, {
|
|
352
|
+
name: params.name,
|
|
353
|
+
isRequired: params.isRequired,
|
|
354
|
+
defaultValue: params.defaultValue,
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
content: [
|
|
358
|
+
{
|
|
359
|
+
type: 'text',
|
|
360
|
+
text: JSON.stringify({
|
|
361
|
+
column: table.columns.find((c) => c.slug === params.columnSlug),
|
|
362
|
+
message: `Successfully updated column "${params.columnSlug}" in table "${params.tableSlug}"`,
|
|
363
|
+
}, null, 2),
|
|
364
|
+
},
|
|
365
|
+
],
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
// Project Management implementations
|
|
369
|
+
case 'list_projects': {
|
|
370
|
+
ListProjectsSchema.parse(args);
|
|
371
|
+
const projects = await client.getProjects();
|
|
372
|
+
return {
|
|
373
|
+
content: [
|
|
374
|
+
{
|
|
375
|
+
type: 'text',
|
|
376
|
+
text: JSON.stringify({
|
|
377
|
+
projects: projects.map((p) => ({
|
|
378
|
+
id: p.id,
|
|
379
|
+
name: p.name,
|
|
380
|
+
slug: p.slug,
|
|
381
|
+
createdAt: p.createdAt,
|
|
382
|
+
})),
|
|
383
|
+
count: projects.length,
|
|
384
|
+
message: `Found ${projects.length} projects`,
|
|
385
|
+
}, null, 2),
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
case 'create_project': {
|
|
391
|
+
const params = CreateProjectSchema.parse(args);
|
|
392
|
+
const project = await client.createProject(params.name);
|
|
393
|
+
return {
|
|
394
|
+
content: [
|
|
395
|
+
{
|
|
396
|
+
type: 'text',
|
|
397
|
+
text: JSON.stringify({
|
|
398
|
+
project,
|
|
399
|
+
message: `Successfully created project "${project.name}" with ID ${project.id}`,
|
|
400
|
+
note: 'An API key has been automatically generated for this project',
|
|
401
|
+
}, null, 2),
|
|
402
|
+
},
|
|
403
|
+
],
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
case 'switch_project': {
|
|
407
|
+
const params = SwitchProjectSchema.parse(args);
|
|
408
|
+
const result = await client.switchProject(params.projectId);
|
|
409
|
+
return {
|
|
410
|
+
content: [
|
|
411
|
+
{
|
|
412
|
+
type: 'text',
|
|
413
|
+
text: JSON.stringify({
|
|
414
|
+
project: result.project,
|
|
415
|
+
message: `Successfully switched to project "${result.project.name}"`,
|
|
416
|
+
note: 'A new JWT token has been issued. You may need to update your authentication.',
|
|
417
|
+
}, null, 2),
|
|
418
|
+
},
|
|
419
|
+
],
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
default:
|
|
423
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
catch (error) {
|
|
427
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
428
|
+
return {
|
|
429
|
+
content: [
|
|
430
|
+
{
|
|
431
|
+
type: 'text',
|
|
432
|
+
text: JSON.stringify({
|
|
433
|
+
error: errorMessage,
|
|
434
|
+
tool: name,
|
|
435
|
+
}, null, 2),
|
|
436
|
+
},
|
|
437
|
+
],
|
|
438
|
+
isError: true,
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAE5C,OAAO;AACL,eAAe;AACf,YAAY,EACZ,eAAe;AACf,4BAA4B;AAC5B,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,kBAAkB;AAClB,6BAA6B;AAC7B,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,MAAmB;IAC/D,sDAAsD;IACtD,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;QAC1D,MAAM,KAAK,GAAG;YACZ,kBAAkB;YAClB;gBACE,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,qCAAqC;gBAClD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,SAAS,EAAE;4BACT,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,yBAAyB;yBACvC;wBACD,EAAE,EAAE;4BACF,IAAI,EAAE,QAAQ;4BAC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