@noelclaw/mcp 2.4.0 → 3.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/README.md +216 -116
- package/dist/server.js +6 -6
- package/dist/tools/coder.js +0 -105
- package/dist/tools/defi.js +0 -38
- package/dist/tools/framework.js +0 -108
- package/dist/tools/swarm.js +0 -355
- package/dist/tools/vault.js +0 -106
- package/package.json +1 -1
package/dist/tools/vault.js
CHANGED
|
@@ -6,7 +6,6 @@ const zod_1 = require("zod");
|
|
|
6
6
|
const convex_js_1 = require("../convex.js");
|
|
7
7
|
const memory_js_1 = require("./memory.js");
|
|
8
8
|
const VAULT_TYPES = ["research", "execution", "workflow", "prompt", "file", "memory", "credential"];
|
|
9
|
-
const LINK_RELATIONS = ["references", "derived_from", "supersedes", "related", "continues"];
|
|
10
9
|
exports.VAULT_TOOLS = [
|
|
11
10
|
{
|
|
12
11
|
name: "vault_save",
|
|
@@ -137,36 +136,6 @@ exports.VAULT_TOOLS = [
|
|
|
137
136
|
required: ["name"],
|
|
138
137
|
},
|
|
139
138
|
},
|
|
140
|
-
{
|
|
141
|
-
name: "vault_publish",
|
|
142
|
-
description: "Publish a vault entry to the community vault so other Noelclaw users can discover and fork it. " +
|
|
143
|
-
"Credentials are never published — only research, prompts, workflows, memory, and execution entries. " +
|
|
144
|
-
"You can also unpublish by setting isPublic to false.",
|
|
145
|
-
inputSchema: {
|
|
146
|
-
type: "object",
|
|
147
|
-
properties: {
|
|
148
|
-
key: { type: "string", description: "Entry key to publish or unpublish" },
|
|
149
|
-
isPublic: { type: "boolean", description: "true to publish, false to unpublish (default true)" },
|
|
150
|
-
authorName: { type: "string", description: "Display name shown to the community (default: Anonymous)" },
|
|
151
|
-
},
|
|
152
|
-
required: ["key"],
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: "vault_explore",
|
|
157
|
-
description: "Browse the community vault — public entries shared by all Noelclaw users. " +
|
|
158
|
-
"Discover research, prompts, and workflows published by the community. " +
|
|
159
|
-
"Use vault_save to fork any entry into your own vault.",
|
|
160
|
-
inputSchema: {
|
|
161
|
-
type: "object",
|
|
162
|
-
properties: {
|
|
163
|
-
type: { type: "string", enum: ["research", "execution", "workflow", "prompt", "file", "memory"], description: "Filter by entry type" },
|
|
164
|
-
search: { type: "string", description: "Search query to filter community entries" },
|
|
165
|
-
limit: { type: "number", description: "Max entries to return (default 20)" },
|
|
166
|
-
},
|
|
167
|
-
required: [],
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
139
|
{
|
|
171
140
|
name: "vault_pin",
|
|
172
141
|
description: "Pin or unpin a Noel-Vault entry. Pinned entries always appear first in vault_list and are " +
|
|
@@ -192,20 +161,6 @@ exports.VAULT_TOOLS = [
|
|
|
192
161
|
required: ["key"],
|
|
193
162
|
},
|
|
194
163
|
},
|
|
195
|
-
{
|
|
196
|
-
name: "vault_link",
|
|
197
|
-
description: "Create a semantic link between two Noel-Vault entries. Links appear in vault_read output and " +
|
|
198
|
-
"help agents navigate related knowledge. Relations: references | derived_from | supersedes | related | continues.",
|
|
199
|
-
inputSchema: {
|
|
200
|
-
type: "object",
|
|
201
|
-
properties: {
|
|
202
|
-
fromKey: { type: "string", description: "Source entry key" },
|
|
203
|
-
toKey: { type: "string", description: "Target entry key" },
|
|
204
|
-
relation: { type: "string", enum: [...LINK_RELATIONS], description: "Relationship type (default: related)" },
|
|
205
|
-
},
|
|
206
|
-
required: ["fromKey", "toKey"],
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
164
|
{
|
|
210
165
|
name: "vault_tag",
|
|
211
166
|
description: "Add or replace tags on an existing Noel-Vault entry without modifying its content. " +
|
|
@@ -250,11 +205,8 @@ const DiffSchema = zod_1.z.object({ key: zod_1.z.string().min(1), fromVersion: z
|
|
|
250
205
|
const ExportSchema = zod_1.z.object({ type: zod_1.z.enum(VAULT_TYPES).optional() });
|
|
251
206
|
const StoreCredentialSchema = zod_1.z.object({ name: zod_1.z.string().min(1), value: zod_1.z.string().min(1), description: zod_1.z.string().optional() });
|
|
252
207
|
const GetCredentialSchema = zod_1.z.object({ name: zod_1.z.string().min(1) });
|
|
253
|
-
const PublishSchema = zod_1.z.object({ key: zod_1.z.string().min(1), isPublic: zod_1.z.boolean().optional(), authorName: zod_1.z.string().optional() });
|
|
254
|
-
const ExploreSchema = zod_1.z.object({ type: zod_1.z.enum(["research", "execution", "workflow", "prompt", "file", "memory"]).optional(), search: zod_1.z.string().optional(), limit: zod_1.z.number().optional() });
|
|
255
208
|
const PinSchema = zod_1.z.object({ key: zod_1.z.string().min(1), pinned: zod_1.z.boolean().optional() });
|
|
256
209
|
const DeleteSchema = zod_1.z.object({ key: zod_1.z.string().min(1) });
|
|
257
|
-
const LinkSchema = zod_1.z.object({ fromKey: zod_1.z.string().min(1), toKey: zod_1.z.string().min(1), relation: zod_1.z.enum(LINK_RELATIONS).optional() });
|
|
258
210
|
const TagSchema = zod_1.z.object({ key: zod_1.z.string().min(1), tags: zod_1.z.array(zod_1.z.string()).min(1), replace: zod_1.z.boolean().optional() });
|
|
259
211
|
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
260
212
|
function formatBytes(n) {
|
|
@@ -467,54 +419,6 @@ async function handleVaultTool(name, args) {
|
|
|
467
419
|
lines.push(`Stored: ${data.storedAt}`);
|
|
468
420
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
469
421
|
}
|
|
470
|
-
case "vault_publish": {
|
|
471
|
-
const parsed = PublishSchema.safeParse(args);
|
|
472
|
-
if (!parsed.success)
|
|
473
|
-
return { content: [{ type: "text", text: `Invalid input: ${parsed.error.issues[0].message}` }], isError: true };
|
|
474
|
-
const { key, isPublic = true, authorName } = parsed.data;
|
|
475
|
-
const endpoint = isPublic ? "/vault/publish" : "/vault/unpublish";
|
|
476
|
-
const data = await (0, convex_js_1.callConvex)(endpoint, "POST", { key, authorName }, "vault_publish");
|
|
477
|
-
if (data.error)
|
|
478
|
-
return { content: [{ type: "text", text: `Error: ${data.error}` }], isError: true };
|
|
479
|
-
return {
|
|
480
|
-
content: [{
|
|
481
|
-
type: "text",
|
|
482
|
-
text: isPublic
|
|
483
|
-
? `🌐 **Published to community vault**\nKey: \`${key}\`\nOther Noelclaw users can now discover this entry.\nUse \`vault_publish key: "${key}" isPublic: false\` to unpublish.`
|
|
484
|
-
: `🔒 **Unpublished**\nKey: \`${key}\` is now private.`,
|
|
485
|
-
}],
|
|
486
|
-
};
|
|
487
|
-
}
|
|
488
|
-
case "vault_explore": {
|
|
489
|
-
const parsed = ExploreSchema.safeParse(args ?? {});
|
|
490
|
-
if (!parsed.success)
|
|
491
|
-
return { content: [{ type: "text", text: `Invalid input: ${parsed.error.issues[0].message}` }], isError: true };
|
|
492
|
-
const params = new URLSearchParams();
|
|
493
|
-
if (parsed.data.type)
|
|
494
|
-
params.set("type", parsed.data.type);
|
|
495
|
-
if (parsed.data.search)
|
|
496
|
-
params.set("search", parsed.data.search);
|
|
497
|
-
if (parsed.data.limit)
|
|
498
|
-
params.set("limit", String(parsed.data.limit));
|
|
499
|
-
const data = await (0, convex_js_1.callConvex)(`/vault/community?${params}`, "GET", undefined, "vault_explore");
|
|
500
|
-
if (data.error)
|
|
501
|
-
return { content: [{ type: "text", text: `Error: ${data.error}` }], isError: true };
|
|
502
|
-
const entries = data.entries ?? [];
|
|
503
|
-
if (!entries.length)
|
|
504
|
-
return { content: [{ type: "text", text: `No community vault entries found${parsed.data.type ? ` of type '${parsed.data.type}'` : ""}.${parsed.data.search ? ` Try a different search term.` : "\nBe the first to publish with vault_publish!"}` }] };
|
|
505
|
-
const header = `🌐 **Community Vault** — ${entries.length} public entries`;
|
|
506
|
-
const rows = entries.map((e) => [
|
|
507
|
-
`**[${e.type}]** ${e.title} · by ${e.authorName ?? "Anonymous"}`,
|
|
508
|
-
` \`${e.key}\` · v${e.version} · ${formatDate(e.updatedAt)}`,
|
|
509
|
-
e.content ? ` ${e.content.slice(0, 100)}${e.content.length > 100 ? "…" : ""}` : "",
|
|
510
|
-
].filter(Boolean).join("\n"));
|
|
511
|
-
return {
|
|
512
|
-
content: [{
|
|
513
|
-
type: "text",
|
|
514
|
-
text: [header, "", ...rows, "", "To fork an entry: `vault_save type: <type> title: <title> content: <content>`"].join("\n"),
|
|
515
|
-
}],
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
422
|
case "vault_pin": {
|
|
519
423
|
const parsed = PinSchema.safeParse(args);
|
|
520
424
|
if (!parsed.success)
|
|
@@ -534,16 +438,6 @@ async function handleVaultTool(name, args) {
|
|
|
534
438
|
return { content: [{ type: "text", text: `Error: ${data.error}` }], isError: true };
|
|
535
439
|
return { content: [{ type: "text", text: `🗑️ Deleted: \`${parsed.data.key}\` (${data.versionsRemoved ?? 0} versions removed)` }] };
|
|
536
440
|
}
|
|
537
|
-
case "vault_link": {
|
|
538
|
-
const parsed = LinkSchema.safeParse(args);
|
|
539
|
-
if (!parsed.success)
|
|
540
|
-
return { content: [{ type: "text", text: `Invalid input: ${parsed.error.issues[0].message}` }], isError: true };
|
|
541
|
-
const { fromKey, toKey, relation = "related" } = parsed.data;
|
|
542
|
-
const data = await (0, convex_js_1.callConvex)("/vault/link", "POST", { fromKey, toKey, relation }, "vault_link");
|
|
543
|
-
if (data.error)
|
|
544
|
-
return { content: [{ type: "text", text: `Error: ${data.error}` }], isError: true };
|
|
545
|
-
return { content: [{ type: "text", text: `🔗 Linked: \`${fromKey}\` → [${relation}] → \`${toKey}\`` }] };
|
|
546
|
-
}
|
|
547
441
|
case "vault_tag": {
|
|
548
442
|
const parsed = TagSchema.safeParse(args);
|
|
549
443
|
if (!parsed.success)
|
package/package.json
CHANGED