@datafrog-io/n2n-nexus 0.1.8 → 0.2.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/README.md +33 -16
- package/README_zh.md +53 -17
- package/build/index.js +38 -22
- package/build/resources/index.js +33 -12
- package/build/storage/index.js +8 -0
- package/build/storage/meetings.js +35 -2
- package/build/storage/sqlite-meeting.js +37 -5
- package/build/storage/sqlite.js +15 -3
- package/build/storage/store.js +11 -4
- package/build/storage/tasks.js +204 -0
- package/build/tools/handlers.js +336 -176
- package/build/tools/index.js +12 -1
- package/build/tools/schemas.js +275 -0
- package/build/utils/auth.js +11 -0
- package/build/utils/error.js +15 -0
- package/docs/ASSISTANT_GUIDE.md +52 -62
- package/docs/CHANGELOG.md +29 -0
- package/docs/CHANGELOG_zh.md +29 -0
- package/package.json +10 -9
- package/build/tools/definitions.js +0 -288
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool definitions for MCP ListToolsRequestSchema
|
|
3
|
-
*/
|
|
4
|
-
export const TOOL_DEFINITIONS = [
|
|
5
|
-
{
|
|
6
|
-
name: "register_session_context",
|
|
7
|
-
description: "[IDENTITY] Declare the PROJECT identity. Format: [prefix]_[technical-identifier]. (e.g., 'web_datafrog.io', 'mcp_nexus-core').",
|
|
8
|
-
inputSchema: {
|
|
9
|
-
type: "object",
|
|
10
|
-
properties: {
|
|
11
|
-
projectId: {
|
|
12
|
-
type: "string",
|
|
13
|
-
description: "Strict flat identifier. MUST start with a type-prefix (web_, api_, chrome_, vscode_, mcp_, android_, ios_, flutter_, desktop_, lib_, bot_, infra_, doc_) followed by an underscore and a technical name (Domain for websites, Repo name/Slug for code). Use kebab-case. No hierarchy dots except in domains."
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
required: ["projectId"]
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
name: "sync_project_assets",
|
|
21
|
-
description: "CRITICAL: [PREREQUISITE: register_session_context] Sync full project state. Both manifest and documentation are MANDATORY.",
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: "object",
|
|
24
|
-
properties: {
|
|
25
|
-
manifest: {
|
|
26
|
-
type: "object",
|
|
27
|
-
description: "Full ProjectManifest metadata.",
|
|
28
|
-
properties: {
|
|
29
|
-
id: { type: "string", description: "Project ID. MUST follow '[prefix]_[technical-name]' format and match active session." },
|
|
30
|
-
name: { type: "string" },
|
|
31
|
-
description: { type: "string" },
|
|
32
|
-
techStack: { type: "array", items: { type: "string" } },
|
|
33
|
-
relations: {
|
|
34
|
-
type: "array",
|
|
35
|
-
items: {
|
|
36
|
-
type: "object",
|
|
37
|
-
properties: {
|
|
38
|
-
targetId: { type: "string", description: "ID of the target project (e.g., 'acme.auth-service')." },
|
|
39
|
-
type: { type: "string", enum: ["dependency", "parent", "child", "related"] }
|
|
40
|
-
},
|
|
41
|
-
required: ["targetId", "type"]
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
lastUpdated: { type: "string", description: "ISO timestamp (e.g., 2025-12-29T...)." },
|
|
45
|
-
repositoryUrl: { type: "string", description: "GitHub repository URL." },
|
|
46
|
-
endpoints: {
|
|
47
|
-
type: "array",
|
|
48
|
-
items: {
|
|
49
|
-
type: "object",
|
|
50
|
-
properties: {
|
|
51
|
-
name: { type: "string" },
|
|
52
|
-
url: { type: "string" },
|
|
53
|
-
description: { type: "string" }
|
|
54
|
-
},
|
|
55
|
-
required: ["name", "url", "description"]
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
localPath: { type: "string", description: "Physical disk path of the project." },
|
|
59
|
-
apiSpec: {
|
|
60
|
-
type: "array",
|
|
61
|
-
items: {
|
|
62
|
-
type: "object",
|
|
63
|
-
properties: {
|
|
64
|
-
method: { type: "string" },
|
|
65
|
-
path: { type: "string" },
|
|
66
|
-
summary: { type: "string" }
|
|
67
|
-
},
|
|
68
|
-
required: ["method", "path", "summary"]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
required: ["id", "name", "description", "techStack", "relations", "lastUpdated", "repositoryUrl", "localPath", "endpoints", "apiSpec"]
|
|
73
|
-
},
|
|
74
|
-
internalDocs: { type: "string", description: "Mandatory technical implementation guide (Markdown)." }
|
|
75
|
-
},
|
|
76
|
-
required: ["manifest", "internalDocs"]
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
name: "upload_project_asset",
|
|
81
|
-
description: "Upload a binary file (images, PDFs, etc.) to the current project's asset folder. Requires active session (call register_session_context first). Returns the relative path of the saved file.",
|
|
82
|
-
inputSchema: {
|
|
83
|
-
type: "object",
|
|
84
|
-
properties: {
|
|
85
|
-
fileName: { type: "string" },
|
|
86
|
-
base64Content: { type: "string" }
|
|
87
|
-
},
|
|
88
|
-
required: ["fileName", "base64Content"]
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
name: "get_global_topology",
|
|
93
|
-
description: "Retrieve complete project relationship graph. Returns { nodes: [{ id, name }], edges: [{ from, to, type }] }. Use this to visualize dependencies.",
|
|
94
|
-
inputSchema: { type: "object", properties: {} }
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "list_projects",
|
|
98
|
-
description: "List all existing projects registered in the Nexus Hub. Use this to find correct IDs before performing project-specific operations.",
|
|
99
|
-
inputSchema: { type: "object", properties: {} }
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "read_project",
|
|
103
|
-
description: "Read project data by ID. Returns specific data slices without exposing internal paths.",
|
|
104
|
-
inputSchema: {
|
|
105
|
-
type: "object",
|
|
106
|
-
properties: {
|
|
107
|
-
projectId: { type: "string", description: "Project ID (e.g., 'web_datafrog.io', 'mcp_nexus-hub')." },
|
|
108
|
-
include: {
|
|
109
|
-
type: "string",
|
|
110
|
-
enum: ["manifest", "docs", "repo", "endpoints", "api", "relations", "summary", "all"],
|
|
111
|
-
description: "Data slice: manifest, docs, repo (git URL), endpoints, api (spec), relations, summary (brief), or all."
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
required: ["projectId"]
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "post_global_discussion",
|
|
119
|
-
description: "Post a message to the Nexus collaboration space. If an active meeting exists, the message is automatically routed to that meeting. Otherwise, it goes to the global discussion log. Use this for proposals, decisions, or general coordination.",
|
|
120
|
-
inputSchema: {
|
|
121
|
-
type: "object",
|
|
122
|
-
properties: {
|
|
123
|
-
message: { type: "string", description: "The core content of your speech, proposal, or announcement." },
|
|
124
|
-
category: {
|
|
125
|
-
type: "string",
|
|
126
|
-
enum: ["MEETING_START", "PROPOSAL", "DECISION", "UPDATE", "CHAT"],
|
|
127
|
-
description: "The nature of this message. DECISION messages are auto-extracted into meeting decisions[]."
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
required: ["message"]
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: "read_recent_discussion",
|
|
135
|
-
description: "Read recent messages. Automatically reads from the active meeting if one exists, otherwise reads from global discussion log.",
|
|
136
|
-
inputSchema: {
|
|
137
|
-
type: "object",
|
|
138
|
-
properties: {
|
|
139
|
-
count: { type: "number", description: "Number of recent messages to retrieve (defaults to 10).", default: 10 },
|
|
140
|
-
meetingId: { type: "string", description: "Optional: Read from a specific meeting instead of the active one." }
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
name: "update_global_strategy",
|
|
146
|
-
description: "Overwrite master strategy. Content is MANDATORY.",
|
|
147
|
-
inputSchema: { type: "object", properties: { content: { type: "string" } }, required: ["content"] }
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
name: "sync_global_doc",
|
|
151
|
-
description: "Create or update a global document. Returns the document ID.",
|
|
152
|
-
inputSchema: {
|
|
153
|
-
type: "object",
|
|
154
|
-
properties: {
|
|
155
|
-
docId: { type: "string", description: "Unique document identifier (e.g., 'roadmap-2025', 'coding-standards')" },
|
|
156
|
-
title: { type: "string", description: "Human-readable document title" },
|
|
157
|
-
content: { type: "string", description: "Markdown content of the document" }
|
|
158
|
-
},
|
|
159
|
-
required: ["docId", "title", "content"]
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: "list_global_docs",
|
|
164
|
-
description: "List all global documents with their metadata (title, lastUpdated, updatedBy).",
|
|
165
|
-
inputSchema: { type: "object", properties: {} }
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
name: "read_global_doc",
|
|
169
|
-
description: "Read the content of a specific global document.",
|
|
170
|
-
inputSchema: {
|
|
171
|
-
type: "object",
|
|
172
|
-
properties: {
|
|
173
|
-
docId: { type: "string", description: "Document identifier" }
|
|
174
|
-
},
|
|
175
|
-
required: ["docId"]
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: "update_project",
|
|
180
|
-
description: "Partially update a project's manifest. Only provided fields will be updated.",
|
|
181
|
-
inputSchema: {
|
|
182
|
-
type: "object",
|
|
183
|
-
properties: {
|
|
184
|
-
projectId: { type: "string", description: "Project ID to update (e.g., 'web_datafrog.io')." },
|
|
185
|
-
patch: {
|
|
186
|
-
type: "object",
|
|
187
|
-
description: "Fields to update (e.g., description, techStack, endpoints, apiSpec, relations)",
|
|
188
|
-
additionalProperties: true
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
required: ["projectId", "patch"]
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
name: "rename_project",
|
|
196
|
-
description: "Rename a project ID with automatic cascading updates to all relation references.",
|
|
197
|
-
inputSchema: {
|
|
198
|
-
type: "object",
|
|
199
|
-
properties: {
|
|
200
|
-
oldId: { type: "string", description: "Current project ID (e.g., 'web_oldname.com')." },
|
|
201
|
-
newId: { type: "string", description: "New project ID following the '[prefix]_[name]' standard." }
|
|
202
|
-
},
|
|
203
|
-
required: ["oldId", "newId"]
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
name: "moderator_maintenance",
|
|
208
|
-
description: "[ADMIN ONLY] Manage global discussion logs. 'prune' removes the oldest N entries (keeps newest). 'clear' wipes all logs (use count=0). Returns summary of removed entries. Irreversible.",
|
|
209
|
-
inputSchema: {
|
|
210
|
-
type: "object",
|
|
211
|
-
properties: {
|
|
212
|
-
action: { type: "string", enum: ["prune", "clear"] },
|
|
213
|
-
count: { type: "number", description: "Number of items (use 0 for 'clear')." }
|
|
214
|
-
},
|
|
215
|
-
required: ["action", "count"]
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
name: "moderator_delete_project",
|
|
220
|
-
description: "[ADMIN ONLY] Completely remove a project, its manifest, and all its assets from Nexus Hub. Irreversible.",
|
|
221
|
-
inputSchema: {
|
|
222
|
-
type: "object",
|
|
223
|
-
properties: {
|
|
224
|
-
projectId: { type: "string", description: "The ID of the project to destroy." }
|
|
225
|
-
},
|
|
226
|
-
required: ["projectId"]
|
|
227
|
-
}
|
|
228
|
-
},
|
|
229
|
-
// --- Meeting Management Tools (Phase 1) ---
|
|
230
|
-
{
|
|
231
|
-
name: "start_meeting",
|
|
232
|
-
description: "Start a new meeting session. Creates a dedicated file for the meeting. Returns the meeting ID and details.",
|
|
233
|
-
inputSchema: {
|
|
234
|
-
type: "object",
|
|
235
|
-
properties: {
|
|
236
|
-
topic: { type: "string", description: "The topic/agenda for this meeting (e.g., 'Architecture Review', 'Sprint Planning')." }
|
|
237
|
-
},
|
|
238
|
-
required: ["topic"]
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
name: "end_meeting",
|
|
243
|
-
description: "End an active meeting. Locks the session for further messages. Returns suggested sync targets based on participants.",
|
|
244
|
-
inputSchema: {
|
|
245
|
-
type: "object",
|
|
246
|
-
properties: {
|
|
247
|
-
meetingId: { type: "string", description: "The ID of the meeting to end. If omitted, ends the current active meeting." },
|
|
248
|
-
summary: { type: "string", description: "Optional summary of the meeting conclusions." }
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
name: "list_meetings",
|
|
254
|
-
description: "List all meetings with optional status filter. Returns meeting metadata without full message history.",
|
|
255
|
-
inputSchema: {
|
|
256
|
-
type: "object",
|
|
257
|
-
properties: {
|
|
258
|
-
status: {
|
|
259
|
-
type: "string",
|
|
260
|
-
enum: ["active", "closed", "archived"],
|
|
261
|
-
description: "Filter by meeting status. Omit to list all."
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
name: "read_meeting",
|
|
268
|
-
description: "Read the full content of a specific meeting including all messages and decisions.",
|
|
269
|
-
inputSchema: {
|
|
270
|
-
type: "object",
|
|
271
|
-
properties: {
|
|
272
|
-
meetingId: { type: "string", description: "The ID of the meeting to read." }
|
|
273
|
-
},
|
|
274
|
-
required: ["meetingId"]
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
name: "archive_meeting",
|
|
279
|
-
description: "Archive a closed meeting. Archived meetings are read-only and excluded from active queries.",
|
|
280
|
-
inputSchema: {
|
|
281
|
-
type: "object",
|
|
282
|
-
properties: {
|
|
283
|
-
meetingId: { type: "string", description: "The ID of the closed meeting to archive." }
|
|
284
|
-
},
|
|
285
|
-
required: ["meetingId"]
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
];
|