@crewdhq/crewd-mcp 0.0.0-stage → 0.1.8
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 +189 -2
- package/dist-mcp/cli.d.ts +3 -0
- package/dist-mcp/cli.d.ts.map +1 -0
- package/dist-mcp/cli.js +9 -0
- package/dist-mcp/cli.js.map +1 -0
- package/dist-mcp/core/adapters.d.ts +29 -0
- package/dist-mcp/core/adapters.d.ts.map +1 -0
- package/dist-mcp/core/adapters.js +306 -0
- package/dist-mcp/core/adapters.js.map +1 -0
- package/dist-mcp/core/installer.d.ts +42 -0
- package/dist-mcp/core/installer.d.ts.map +1 -0
- package/dist-mcp/core/installer.js +236 -0
- package/dist-mcp/core/installer.js.map +1 -0
- package/dist-mcp/core/manifest.d.ts +17 -0
- package/dist-mcp/core/manifest.d.ts.map +1 -0
- package/dist-mcp/core/manifest.js +128 -0
- package/dist-mcp/core/manifest.js.map +1 -0
- package/dist-mcp/core/project.d.ts +11 -0
- package/dist-mcp/core/project.d.ts.map +1 -0
- package/dist-mcp/core/project.js +57 -0
- package/dist-mcp/core/project.js.map +1 -0
- package/dist-mcp/core/registry.d.ts +36 -0
- package/dist-mcp/core/registry.d.ts.map +1 -0
- package/dist-mcp/core/registry.js +224 -0
- package/dist-mcp/core/registry.js.map +1 -0
- package/dist-mcp/core/tar.d.ts +23 -0
- package/dist-mcp/core/tar.d.ts.map +1 -0
- package/dist-mcp/core/tar.js +145 -0
- package/dist-mcp/core/tar.js.map +1 -0
- package/dist-mcp/core/token.d.ts +23 -0
- package/dist-mcp/core/token.d.ts.map +1 -0
- package/dist-mcp/core/token.js +70 -0
- package/dist-mcp/core/token.js.map +1 -0
- package/dist-mcp/server.d.ts +14 -0
- package/dist-mcp/server.d.ts.map +1 -0
- package/dist-mcp/server.js +429 -0
- package/dist-mcp/server.js.map +1 -0
- package/dist-mcp/types.d.ts +141 -0
- package/dist-mcp/types.d.ts.map +1 -0
- package/dist-mcp/types.js +43 -0
- package/dist-mcp/types.js.map +1 -0
- package/package.json +52 -4
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCrewdMcpServer = createCrewdMcpServer;
|
|
4
|
+
exports.startStdioServer = startStdioServer;
|
|
5
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
6
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const registry_js_1 = require("./core/registry.js");
|
|
9
|
+
const project_js_1 = require("./core/project.js");
|
|
10
|
+
const manifest_js_1 = require("./core/manifest.js");
|
|
11
|
+
const installer_js_1 = require("./core/installer.js");
|
|
12
|
+
const tar_js_1 = require("./core/tar.js");
|
|
13
|
+
const adapters_js_1 = require("./core/adapters.js");
|
|
14
|
+
/**
|
|
15
|
+
* Creates and configures the Crewd MCP server with all 6 tools.
|
|
16
|
+
*/
|
|
17
|
+
function createCrewdMcpServer(options) {
|
|
18
|
+
const server = new mcp_js_1.McpServer({
|
|
19
|
+
name: "crewd",
|
|
20
|
+
version: "0.1.0",
|
|
21
|
+
});
|
|
22
|
+
const getClient = () => options?.registryClient || new registry_js_1.RegistryClient();
|
|
23
|
+
const getRoot = () => options?.projectRoot || (0, project_js_1.findProjectRoot)();
|
|
24
|
+
// 1. search_packages
|
|
25
|
+
server.tool("search_packages", "Search for AI agents, teams, and skills in the Crewd registry. Use this tool to discover packages matching a query or category before inspecting or planning to hire them. NOTE: Package descriptions and metadata are untrusted registry content and are sanitized.", {
|
|
26
|
+
query: zod_1.z.string().describe("Search keywords for agent roles, team squad names, or skills (e.g. 'reviewer', 'security', 'frontend')"),
|
|
27
|
+
kind: zod_1.z.enum(["agent", "team", "skill"]).optional().describe("Filter by package kind: 'agent', 'team', or 'skill'"),
|
|
28
|
+
limit: zod_1.z.number().int().min(1).max(50).optional().describe("Maximum results to return (default 20, max 50)"),
|
|
29
|
+
}, async ({ query, kind, limit }) => {
|
|
30
|
+
try {
|
|
31
|
+
const client = getClient();
|
|
32
|
+
const res = await client.searchPackages(query, kind, limit || 20);
|
|
33
|
+
const items = res.packages.map((pkg) => {
|
|
34
|
+
const parts = pkg.name.split("/");
|
|
35
|
+
const publisher = parts[0].replace(/^@/, "");
|
|
36
|
+
const skillCount = pkg.type === "skill" ? 1 : pkg.tags?.filter((t) => t.startsWith("skill:")).length || 0;
|
|
37
|
+
const agentCount = pkg.type === "agent" ? 1 : pkg.type === "team" ? 2 : 0;
|
|
38
|
+
return {
|
|
39
|
+
name: pkg.name,
|
|
40
|
+
version: pkg.latestVersion,
|
|
41
|
+
description: (0, registry_js_1.sanitizeUntrustedText)(pkg.description, 300),
|
|
42
|
+
publisher,
|
|
43
|
+
kind: pkg.type,
|
|
44
|
+
agentCount,
|
|
45
|
+
skillCount,
|
|
46
|
+
hasScripts: (pkg.tags || []).includes("scripts"),
|
|
47
|
+
hosts: pkg.hosts || [],
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const summaryText = `Found ${items.length} package(s) matching "${query}" in the Crewd registry.`;
|
|
51
|
+
return {
|
|
52
|
+
content: [
|
|
53
|
+
{
|
|
54
|
+
type: "text",
|
|
55
|
+
text: `${summaryText}\n\n${JSON.stringify({ total: res.total, results: items }, null, 2)}`,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
return {
|
|
62
|
+
isError: true,
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: "text",
|
|
66
|
+
text: `Search error: ${err instanceof Error ? err.message : String(err)}`,
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
// 2. inspect_package
|
|
73
|
+
server.tool("inspect_package", "Inspect an agent, team, or skill package specification in detail without installing or executing anything. Returns the agent role, prompt summary, tool permissions, included skills, and any executable scripts with file paths and short previews. This tool is read-only and never writes files or executes scripts.", {
|
|
74
|
+
name: zod_1.z.string().describe("Package reference, e.g. '@morteza/reviewer' or '@team/fullstack'"),
|
|
75
|
+
version: zod_1.z.string().optional().describe("Specific version to inspect. Defaults to the latest available version if omitted"),
|
|
76
|
+
}, async ({ name, version }) => {
|
|
77
|
+
try {
|
|
78
|
+
const client = getClient();
|
|
79
|
+
const { namespace, name: pkgName } = (0, registry_js_1.parsePackageRef)(name);
|
|
80
|
+
const summary = await client.getPackage(namespace, pkgName);
|
|
81
|
+
const targetVer = version || summary.latestVersion;
|
|
82
|
+
const detail = await client.getVersion(namespace, pkgName, targetVer);
|
|
83
|
+
// Download and unpack in memory to inspect prompt and scripts
|
|
84
|
+
let scripts = [];
|
|
85
|
+
let agentDetails = null;
|
|
86
|
+
let skillsList = detail.skills || [];
|
|
87
|
+
try {
|
|
88
|
+
const tarball = await client.downloadTarball(detail.tarballUrl);
|
|
89
|
+
(0, tar_js_1.verifyTarballIntegrity)(tarball, detail.integrity);
|
|
90
|
+
const files = await (0, tar_js_1.unpackTarballInMemory)(tarball);
|
|
91
|
+
const manifest = (0, adapters_js_1.parsePackageManifestFromFiles)(files);
|
|
92
|
+
if (manifest) {
|
|
93
|
+
agentDetails = {
|
|
94
|
+
type: manifest.type || detail.type,
|
|
95
|
+
role: manifest.role || null,
|
|
96
|
+
tools: manifest.tools || null,
|
|
97
|
+
skills: manifest.skills || skillsList,
|
|
98
|
+
hosts: manifest.hosts || detail.hosts,
|
|
99
|
+
overrides: manifest.overrides || null,
|
|
100
|
+
};
|
|
101
|
+
const promptRel = manifest.prompt || "PROMPT.md";
|
|
102
|
+
const promptFile = files.get(promptRel);
|
|
103
|
+
if (promptFile) {
|
|
104
|
+
const preview = promptFile.content.toString("utf-8").slice(0, 1000);
|
|
105
|
+
agentDetails.promptPreview = (0, registry_js_1.sanitizeUntrustedText)(preview, 1000);
|
|
106
|
+
}
|
|
107
|
+
if (Array.isArray(manifest.skills)) {
|
|
108
|
+
skillsList = manifest.skills;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// Scan scripts
|
|
112
|
+
for (const [filePath, file] of files.entries()) {
|
|
113
|
+
if (filePath.endsWith(".sh") ||
|
|
114
|
+
filePath.startsWith("scripts/") ||
|
|
115
|
+
filePath.endsWith(".bash") ||
|
|
116
|
+
(detail.scripts || []).includes(filePath)) {
|
|
117
|
+
const preview = file.content.toString("utf-8").split("\n").slice(0, 5).join("\n");
|
|
118
|
+
scripts.push({
|
|
119
|
+
path: filePath,
|
|
120
|
+
size: file.size,
|
|
121
|
+
preview: (0, registry_js_1.sanitizeUntrustedText)(preview, 250),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
catch (tarErr) {
|
|
127
|
+
// If tarball download/inspection fails, return detail metadata with warning
|
|
128
|
+
scripts = (detail.scripts || []).map((s) => ({
|
|
129
|
+
path: s,
|
|
130
|
+
size: 0,
|
|
131
|
+
preview: "[Could not unpack archive for preview]",
|
|
132
|
+
}));
|
|
133
|
+
}
|
|
134
|
+
const result = {
|
|
135
|
+
name: detail.name,
|
|
136
|
+
version: detail.version,
|
|
137
|
+
type: detail.type,
|
|
138
|
+
description: (0, registry_js_1.sanitizeUntrustedText)(summary.description, 500),
|
|
139
|
+
hosts: detail.hosts,
|
|
140
|
+
agent: agentDetails,
|
|
141
|
+
includedSkills: skillsList,
|
|
142
|
+
scripts,
|
|
143
|
+
requires: detail.requires || [],
|
|
144
|
+
members: detail.members || null,
|
|
145
|
+
readmePreview: (0, registry_js_1.sanitizeUntrustedText)(detail.readme, 1500),
|
|
146
|
+
};
|
|
147
|
+
const summaryText = `Inspection of ${detail.name}@${detail.version} (${detail.type}): ${skillsList.length} skill(s), ${scripts.length} script(s) found. Supported environments: ${detail.hosts.join(", ")}.`;
|
|
148
|
+
return {
|
|
149
|
+
content: [
|
|
150
|
+
{
|
|
151
|
+
type: "text",
|
|
152
|
+
text: `${summaryText}\n\n${JSON.stringify(result, null, 2)}`,
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
return {
|
|
159
|
+
isError: true,
|
|
160
|
+
content: [
|
|
161
|
+
{
|
|
162
|
+
type: "text",
|
|
163
|
+
text: `Inspection error: ${err instanceof Error ? err.message : String(err)}`,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
// 3. plan_hire
|
|
170
|
+
server.tool("plan_hire", "Dry-run planning for hiring an agent, squad, or skill. Calculates resolved dependency versions, SHA-256 hashes, exact target files that will be created or updated in the repository, and flags any executable scripts. WRITES NOTHING TO DISK. IMPORTANT: You MUST present this plan and any script warnings to the user and obtain explicit confirmation before calling 'hire'. Returns a single-use confirm_token required for 'hire'.", {
|
|
171
|
+
name: zod_1.z.string().describe("Package reference, e.g. '@morteza/reviewer'"),
|
|
172
|
+
version: zod_1.z.string().optional().describe("Version or semver range (e.g. '1.4.2', '^1.0.0', defaults to '*')"),
|
|
173
|
+
targets: zod_1.z
|
|
174
|
+
.array(zod_1.z.enum(["claude", "cursor", "gemini"]))
|
|
175
|
+
.optional()
|
|
176
|
+
.describe("Optional target environments: 'claude', 'cursor', 'gemini'. Defaults to auto-detected workspace environments"),
|
|
177
|
+
}, async ({ name, version, targets }) => {
|
|
178
|
+
try {
|
|
179
|
+
const client = getClient();
|
|
180
|
+
const root = getRoot();
|
|
181
|
+
const plan = await (0, installer_js_1.planHire)(name, targets, client, root);
|
|
182
|
+
const promptApprovalNotice = "ACTION REQUIRED: Present this installation plan and all flagged scripts/files to the user. Do not call 'hire' until the user explicitly approves. Use the confirmToken with 'hire' to finalize installation.";
|
|
183
|
+
return {
|
|
184
|
+
content: [
|
|
185
|
+
{
|
|
186
|
+
type: "text",
|
|
187
|
+
text: `${plan.summary}\n\n${promptApprovalNotice}\n\n${JSON.stringify(plan, null, 2)}`,
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
catch (err) {
|
|
193
|
+
return {
|
|
194
|
+
isError: true,
|
|
195
|
+
content: [
|
|
196
|
+
{
|
|
197
|
+
type: "text",
|
|
198
|
+
text: `Planning error: ${err instanceof Error ? err.message : String(err)}`,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
// 4. hire
|
|
205
|
+
server.tool("hire", "Install a planned package into the project. Writes native configuration files (.claude/agents, .cursor/rules, GEMINI.md), updates crewd.json and crewd.lock atomically. SAFETY RULES: (1) MUST only be called after plan_hire has been run and the user has explicitly confirmed the plan. (2) Requires the confirm_token returned by plan_hire. (3) Package scripts are installed as files only and are NEVER executed.", {
|
|
206
|
+
name: zod_1.z.string().describe("Package reference, e.g. '@morteza/reviewer'"),
|
|
207
|
+
version: zod_1.z.string().optional().describe("Version to hire (must match the planned version)"),
|
|
208
|
+
targets: zod_1.z.array(zod_1.z.enum(["claude", "cursor", "gemini"])).optional().describe("Target environments"),
|
|
209
|
+
confirm_token: zod_1.z.string().describe("Single-use confirmation token from prior plan_hire call for this package"),
|
|
210
|
+
}, async ({ name, version, targets, confirm_token }) => {
|
|
211
|
+
try {
|
|
212
|
+
const client = getClient();
|
|
213
|
+
const root = getRoot();
|
|
214
|
+
const result = await (0, installer_js_1.executeHire)(name, confirm_token, version, targets, client, root);
|
|
215
|
+
return {
|
|
216
|
+
content: [
|
|
217
|
+
{
|
|
218
|
+
type: "text",
|
|
219
|
+
text: `${result.summary}\n\n${JSON.stringify(result, null, 2)}`,
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
return {
|
|
226
|
+
isError: true,
|
|
227
|
+
content: [
|
|
228
|
+
{
|
|
229
|
+
type: "text",
|
|
230
|
+
text: `Installation error: ${err instanceof Error ? err.message : String(err)}`,
|
|
231
|
+
},
|
|
232
|
+
],
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
// 5. list_installed
|
|
237
|
+
server.tool("list_installed", "List all currently installed AI agents, teams, and skills in the current project workspace by reading crewd.json and crewd.lock.", {}, async () => {
|
|
238
|
+
try {
|
|
239
|
+
const root = getRoot();
|
|
240
|
+
const manifest = (0, manifest_js_1.readManifest)(root);
|
|
241
|
+
const lockfile = (0, manifest_js_1.readLockfile)(root);
|
|
242
|
+
if (!manifest && !lockfile) {
|
|
243
|
+
return {
|
|
244
|
+
content: [
|
|
245
|
+
{
|
|
246
|
+
type: "text",
|
|
247
|
+
text: `No Crewd configuration found in workspace (${root}). Run 'plan_hire' and 'hire' to add agents.`,
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const crewEntries = Object.entries(manifest?.crew || {}).map(([pkgName, val]) => {
|
|
253
|
+
let range = "*";
|
|
254
|
+
let isTeam = false;
|
|
255
|
+
if (typeof val === "string") {
|
|
256
|
+
range = val;
|
|
257
|
+
}
|
|
258
|
+
else if (typeof val === "object" && val) {
|
|
259
|
+
if ("team" in val) {
|
|
260
|
+
range = val.team;
|
|
261
|
+
isTeam = true;
|
|
262
|
+
}
|
|
263
|
+
else if ("version" in val) {
|
|
264
|
+
range = val.version;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
// Match in lockfile
|
|
268
|
+
const lockedKey = Object.keys(lockfile?.packages || {}).find((k) => k.startsWith(pkgName + "@"));
|
|
269
|
+
const lockedVersion = lockedKey ? lockedKey.split("@")[2] : null;
|
|
270
|
+
const lockedPkg = lockedKey ? lockfile?.packages[lockedKey] : null;
|
|
271
|
+
return {
|
|
272
|
+
name: pkgName,
|
|
273
|
+
range,
|
|
274
|
+
isTeam,
|
|
275
|
+
installedVersion: lockedVersion,
|
|
276
|
+
type: lockedPkg?.type || (isTeam ? "team" : "agent"),
|
|
277
|
+
skills: lockedPkg?.skills || [],
|
|
278
|
+
};
|
|
279
|
+
});
|
|
280
|
+
const lockedPackages = Object.entries(lockfile?.packages || {}).map(([key, pkg]) => {
|
|
281
|
+
const parts = key.split("@");
|
|
282
|
+
const pkgName = "@" + parts[1];
|
|
283
|
+
const ver = parts[2] || "";
|
|
284
|
+
return {
|
|
285
|
+
key,
|
|
286
|
+
name: pkgName,
|
|
287
|
+
version: ver,
|
|
288
|
+
type: pkg.type,
|
|
289
|
+
integrity: pkg.integrity,
|
|
290
|
+
skills: pkg.skills || [],
|
|
291
|
+
via: pkg.via || [],
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
const result = {
|
|
295
|
+
projectRoot: root,
|
|
296
|
+
hosts: manifest?.hosts || [],
|
|
297
|
+
crew: crewEntries,
|
|
298
|
+
teach: manifest?.teach || {},
|
|
299
|
+
allLockedPackages: lockedPackages,
|
|
300
|
+
lockfileVersion: lockfile?.lockfileVersion || 1,
|
|
301
|
+
};
|
|
302
|
+
const summaryText = `Workspace at ${root}: ${crewEntries.length} package(s) hired across [${(manifest?.hosts || []).join(", ")}].`;
|
|
303
|
+
return {
|
|
304
|
+
content: [
|
|
305
|
+
{
|
|
306
|
+
type: "text",
|
|
307
|
+
text: `${summaryText}\n\n${JSON.stringify(result, null, 2)}`,
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
catch (err) {
|
|
313
|
+
return {
|
|
314
|
+
isError: true,
|
|
315
|
+
content: [
|
|
316
|
+
{
|
|
317
|
+
type: "text",
|
|
318
|
+
text: `Failed listing installed packages: ${err instanceof Error ? err.message : String(err)}`,
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
// 6. check_updates
|
|
325
|
+
server.tool("check_updates", "Compare installed packages in crewd.lock against the Crewd registry to check for available upgrades, summarizing changes such as added or removed skills and newly added scripts.", {}, async () => {
|
|
326
|
+
try {
|
|
327
|
+
const root = getRoot();
|
|
328
|
+
const client = getClient();
|
|
329
|
+
const lockfile = (0, manifest_js_1.readLockfile)(root);
|
|
330
|
+
if (!lockfile || Object.keys(lockfile.packages || {}).length === 0) {
|
|
331
|
+
return {
|
|
332
|
+
content: [
|
|
333
|
+
{
|
|
334
|
+
type: "text",
|
|
335
|
+
text: "No lockfile or installed packages found to check for updates.",
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
const updates = [];
|
|
341
|
+
for (const [pkgKey, lockedPkg] of Object.entries(lockfile.packages)) {
|
|
342
|
+
const parts = pkgKey.split("@");
|
|
343
|
+
if (parts.length < 3)
|
|
344
|
+
continue;
|
|
345
|
+
const pkgName = "@" + parts[1];
|
|
346
|
+
const currentVersion = parts[2];
|
|
347
|
+
const subparts = parts[1].split("/");
|
|
348
|
+
if (subparts.length !== 2)
|
|
349
|
+
continue;
|
|
350
|
+
const [ns, name] = subparts;
|
|
351
|
+
try {
|
|
352
|
+
const summary = await client.getPackage(ns, name);
|
|
353
|
+
const latestVersion = summary.latestVersion;
|
|
354
|
+
const hasUpdate = latestVersion !== currentVersion;
|
|
355
|
+
let changes;
|
|
356
|
+
if (hasUpdate) {
|
|
357
|
+
try {
|
|
358
|
+
const latestDetail = await client.getVersion(ns, name, latestVersion);
|
|
359
|
+
const currentSkills = new Set(lockedPkg.skills || []);
|
|
360
|
+
const latestSkills = new Set(latestDetail.skills || []);
|
|
361
|
+
const newSkills = [...latestSkills].filter((s) => !currentSkills.has(s));
|
|
362
|
+
const removedSkills = [...currentSkills].filter((s) => !latestSkills.has(s));
|
|
363
|
+
const currentScripts = new Set(lockedPkg.scripts || []);
|
|
364
|
+
const latestScripts = latestDetail.scripts || [];
|
|
365
|
+
const newScripts = latestScripts.filter((s) => !currentScripts.has(s));
|
|
366
|
+
changes = {
|
|
367
|
+
newSkills: newSkills.length > 0 ? newSkills : undefined,
|
|
368
|
+
removedSkills: removedSkills.length > 0 ? removedSkills : undefined,
|
|
369
|
+
newScripts: newScripts.length > 0 ? newScripts : undefined,
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
catch {
|
|
373
|
+
// If fetching latest version details fails, proceed without detailed diff
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
updates.push({
|
|
377
|
+
name: pkgName,
|
|
378
|
+
currentVersion,
|
|
379
|
+
latestVersion,
|
|
380
|
+
hasUpdate,
|
|
381
|
+
changes,
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
catch {
|
|
385
|
+
// Registry unreachable or package not found
|
|
386
|
+
updates.push({
|
|
387
|
+
name: pkgName,
|
|
388
|
+
currentVersion,
|
|
389
|
+
latestVersion: currentVersion,
|
|
390
|
+
hasUpdate: false,
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
const availableCount = updates.filter((u) => u.hasUpdate).length;
|
|
395
|
+
const summaryText = availableCount > 0
|
|
396
|
+
? `${availableCount} update(s) available for installed packages.`
|
|
397
|
+
: "All installed packages are up to date.";
|
|
398
|
+
return {
|
|
399
|
+
content: [
|
|
400
|
+
{
|
|
401
|
+
type: "text",
|
|
402
|
+
text: `${summaryText}\n\n${JSON.stringify({ updates }, null, 2)}`,
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
catch (err) {
|
|
408
|
+
return {
|
|
409
|
+
isError: true,
|
|
410
|
+
content: [
|
|
411
|
+
{
|
|
412
|
+
type: "text",
|
|
413
|
+
text: `Check updates error: ${err instanceof Error ? err.message : String(err)}`,
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
return server;
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Starts the MCP server on stdio transport.
|
|
423
|
+
*/
|
|
424
|
+
async function startStdioServer() {
|
|
425
|
+
const server = createCrewdMcpServer();
|
|
426
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
427
|
+
await server.connect(transport);
|
|
428
|
+
}
|
|
429
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAcA,oDAmeC;AAKD,4CAIC;AA1fD,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,oDAA4F;AAC5F,kDAAoD;AACpD,oDAAgE;AAChE,sDAA4D;AAC5D,0CAA8E;AAC9E,oDAAmE;AAGnE;;GAEG;AACH,SAAgB,oBAAoB,CAAC,OAGpC;IACC,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC;QAC3B,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,cAAc,IAAI,IAAI,4BAAc,EAAE,CAAC;IACxE,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,IAAI,IAAA,4BAAe,GAAE,CAAC;IAEhE,qBAAqB;IACrB,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,sQAAsQ,EACtQ;QACE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wGAAwG,CAAC;QACpI,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qDAAqD,CAAC;QACnH,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAA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AG,CAAC,EAAE;qBACjF;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,gBAAgB;IACpC,MAAM,MAAM,GAAG,oBAAoB,EAAE,CAAC;IACtC,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export type TargetHost = "claude" | "cursor" | "gemini";
|
|
3
|
+
export type HostId = "claude-code" | "cursor" | "gemini-cli";
|
|
4
|
+
export declare const HOST_MAP: Record<TargetHost, HostId>;
|
|
5
|
+
export declare const REVERSE_HOST_MAP: Record<HostId, TargetHost>;
|
|
6
|
+
export declare const SearchPackagesInputSchema: z.ZodObject<{
|
|
7
|
+
query: z.ZodString;
|
|
8
|
+
kind: z.ZodOptional<z.ZodEnum<["agent", "team", "skill"]>>;
|
|
9
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
query: string;
|
|
12
|
+
kind?: "agent" | "team" | "skill" | undefined;
|
|
13
|
+
limit?: number | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
query: string;
|
|
16
|
+
kind?: "agent" | "team" | "skill" | undefined;
|
|
17
|
+
limit?: number | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export type SearchPackagesInput = z.infer<typeof SearchPackagesInputSchema>;
|
|
20
|
+
export declare const InspectPackageInputSchema: z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
version: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
name: string;
|
|
25
|
+
version?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
name: string;
|
|
28
|
+
version?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export type InspectPackageInput = z.infer<typeof InspectPackageInputSchema>;
|
|
31
|
+
export declare const PlanHireInputSchema: z.ZodObject<{
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
version: z.ZodOptional<z.ZodString>;
|
|
34
|
+
targets: z.ZodOptional<z.ZodArray<z.ZodEnum<["claude", "cursor", "gemini"]>, "many">>;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
name: string;
|
|
37
|
+
version?: string | undefined;
|
|
38
|
+
targets?: ("claude" | "cursor" | "gemini")[] | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
name: string;
|
|
41
|
+
version?: string | undefined;
|
|
42
|
+
targets?: ("claude" | "cursor" | "gemini")[] | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export type PlanHireInput = z.infer<typeof PlanHireInputSchema>;
|
|
45
|
+
export declare const HireInputSchema: z.ZodObject<{
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
version: z.ZodOptional<z.ZodString>;
|
|
48
|
+
targets: z.ZodOptional<z.ZodArray<z.ZodEnum<["claude", "cursor", "gemini"]>, "many">>;
|
|
49
|
+
confirm_token: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
name: string;
|
|
52
|
+
confirm_token: string;
|
|
53
|
+
version?: string | undefined;
|
|
54
|
+
targets?: ("claude" | "cursor" | "gemini")[] | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
name: string;
|
|
57
|
+
confirm_token: string;
|
|
58
|
+
version?: string | undefined;
|
|
59
|
+
targets?: ("claude" | "cursor" | "gemini")[] | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export type HireInput = z.infer<typeof HireInputSchema>;
|
|
62
|
+
export declare const ListInstalledInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
63
|
+
export type ListInstalledInput = z.infer<typeof ListInstalledInputSchema>;
|
|
64
|
+
export declare const CheckUpdatesInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
65
|
+
export type CheckUpdatesInput = z.infer<typeof CheckUpdatesInputSchema>;
|
|
66
|
+
export interface PackageSummary {
|
|
67
|
+
name: string;
|
|
68
|
+
type: "agent" | "skill" | "team";
|
|
69
|
+
visibility?: string;
|
|
70
|
+
description: string;
|
|
71
|
+
tags?: string[];
|
|
72
|
+
latestVersion: string;
|
|
73
|
+
versions?: string[];
|
|
74
|
+
hosts?: string[];
|
|
75
|
+
hires?: number;
|
|
76
|
+
updatedAt?: string;
|
|
77
|
+
}
|
|
78
|
+
export interface VersionDetail {
|
|
79
|
+
name: string;
|
|
80
|
+
version: string;
|
|
81
|
+
type: string;
|
|
82
|
+
integrity: string;
|
|
83
|
+
tarballUrl: string;
|
|
84
|
+
size?: number;
|
|
85
|
+
hosts: string[];
|
|
86
|
+
scripts?: string[];
|
|
87
|
+
requires?: string[];
|
|
88
|
+
manifest?: Record<string, unknown>;
|
|
89
|
+
readme?: string;
|
|
90
|
+
skills?: string[];
|
|
91
|
+
members?: Record<string, string>;
|
|
92
|
+
}
|
|
93
|
+
export interface ResolvedPackage {
|
|
94
|
+
name: string;
|
|
95
|
+
version: string;
|
|
96
|
+
type: string;
|
|
97
|
+
integrity: string;
|
|
98
|
+
tarballUrl: string;
|
|
99
|
+
hosts: string[];
|
|
100
|
+
scripts?: string[];
|
|
101
|
+
requires?: string[];
|
|
102
|
+
skills?: string[];
|
|
103
|
+
members?: Record<string, string>;
|
|
104
|
+
via?: string[];
|
|
105
|
+
}
|
|
106
|
+
export interface ResolveResponse {
|
|
107
|
+
packages: Record<string, ResolvedPackage>;
|
|
108
|
+
}
|
|
109
|
+
export interface CrewEntry {
|
|
110
|
+
range: string;
|
|
111
|
+
isTeam?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface CrewdManifest {
|
|
114
|
+
$schema?: string;
|
|
115
|
+
hosts: string[];
|
|
116
|
+
crew: Record<string, string | {
|
|
117
|
+
team: string;
|
|
118
|
+
} | {
|
|
119
|
+
version: string;
|
|
120
|
+
}>;
|
|
121
|
+
teach?: Record<string, string[]>;
|
|
122
|
+
memory?: {
|
|
123
|
+
dir: string;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export interface LockedPackage {
|
|
127
|
+
type: string;
|
|
128
|
+
integrity: string;
|
|
129
|
+
skills?: string[];
|
|
130
|
+
members?: Record<string, string>;
|
|
131
|
+
via?: string[];
|
|
132
|
+
taught?: string[];
|
|
133
|
+
scripts?: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface CrewdLockfile {
|
|
136
|
+
lockfileVersion: number;
|
|
137
|
+
manifestHash: string;
|
|
138
|
+
adapterVersions?: Record<string, number>;
|
|
139
|
+
packages: Record<string, LockedPackage>;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACxD,MAAM,MAAM,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE7D,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAI/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAIvD,CAAC;AAGF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAIpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAG5E,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,C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EAAE,MAAM,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckUpdatesInputSchema = exports.ListInstalledInputSchema = exports.HireInputSchema = exports.PlanHireInputSchema = exports.InspectPackageInputSchema = exports.SearchPackagesInputSchema = exports.REVERSE_HOST_MAP = exports.HOST_MAP = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.HOST_MAP = {
|
|
6
|
+
claude: "claude-code",
|
|
7
|
+
cursor: "cursor",
|
|
8
|
+
gemini: "gemini-cli",
|
|
9
|
+
};
|
|
10
|
+
exports.REVERSE_HOST_MAP = {
|
|
11
|
+
"claude-code": "claude",
|
|
12
|
+
cursor: "cursor",
|
|
13
|
+
"gemini-cli": "gemini",
|
|
14
|
+
};
|
|
15
|
+
// 1. search_packages
|
|
16
|
+
exports.SearchPackagesInputSchema = zod_1.z.object({
|
|
17
|
+
query: zod_1.z.string().describe("Search query to find packages by name, description, or keyword"),
|
|
18
|
+
kind: zod_1.z.enum(["agent", "team", "skill"]).optional().describe("Optional filter by package type: agent, team, or skill"),
|
|
19
|
+
limit: zod_1.z.number().int().min(1).max(50).optional().describe("Maximum number of results to return (default 20, max 50)"),
|
|
20
|
+
});
|
|
21
|
+
// 2. inspect_package
|
|
22
|
+
exports.InspectPackageInputSchema = zod_1.z.object({
|
|
23
|
+
name: zod_1.z.string().describe("Package reference, e.g. @namespace/name"),
|
|
24
|
+
version: zod_1.z.string().optional().describe("Specific version to inspect. Defaults to latest version if omitted"),
|
|
25
|
+
});
|
|
26
|
+
// 3. plan_hire
|
|
27
|
+
exports.PlanHireInputSchema = zod_1.z.object({
|
|
28
|
+
name: zod_1.z.string().describe("Package reference, e.g. @namespace/name"),
|
|
29
|
+
version: zod_1.z.string().optional().describe("Version or semver range to plan hiring for (defaults to *)"),
|
|
30
|
+
targets: zod_1.z.array(zod_1.z.enum(["claude", "cursor", "gemini"])).optional().describe("Target AI environments (claude, cursor, gemini). Auto-detected if omitted"),
|
|
31
|
+
});
|
|
32
|
+
// 4. hire
|
|
33
|
+
exports.HireInputSchema = zod_1.z.object({
|
|
34
|
+
name: zod_1.z.string().describe("Package reference to hire, e.g. @namespace/name"),
|
|
35
|
+
version: zod_1.z.string().optional().describe("Version to hire (must match the planned hire version)"),
|
|
36
|
+
targets: zod_1.z.array(zod_1.z.enum(["claude", "cursor", "gemini"])).optional().describe("Target AI environments"),
|
|
37
|
+
confirm_token: zod_1.z.string().describe("Single-use confirmation token returned by plan_hire. Required for safety"),
|
|
38
|
+
});
|
|
39
|
+
// 5. list_installed
|
|
40
|
+
exports.ListInstalledInputSchema = zod_1.z.object({});
|
|
41
|
+
// 6. check_updates
|
|
42
|
+
exports.CheckUpdatesInputSchema = zod_1.z.object({});
|
|
43
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAKX,QAA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