vectorvesper 2.1.0 → 2.3.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/dist/hooks.json +2339 -269
- package/dist/index.js +200 -67
- package/dist/mcp-H5YYBZ5V.js +300 -0
- package/dist/{server-ROPGTSDI.js → server-KJ3YQ7G4.js} +531 -37
- package/package.json +1 -1
- package/dist/mcp-OURIIFET.js +0 -116
package/package.json
CHANGED
package/dist/mcp-OURIIFET.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
loadHookManifest
|
|
3
|
-
} from "./chunk-CPZKZO3A.js";
|
|
4
|
-
import {
|
|
5
|
-
getAuthToken
|
|
6
|
-
} from "./chunk-SFP5K3ZO.js";
|
|
7
|
-
|
|
8
|
-
// src/commands/mcp.ts
|
|
9
|
-
import pc from "picocolors";
|
|
10
|
-
var VERSION = true ? "2.1.0" : "0.0.0-dev";
|
|
11
|
-
var CONFIG_SNIPPET = `{
|
|
12
|
-
"mcpServers": {
|
|
13
|
-
"vectorvesper": {
|
|
14
|
-
"command": "npx",
|
|
15
|
-
"args": ["-y", "vectorvesper@latest", "mcp"]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}`;
|
|
19
|
-
function protectStdout() {
|
|
20
|
-
const toStderr = (...args) => {
|
|
21
|
-
console.error(...args);
|
|
22
|
-
};
|
|
23
|
-
console.log = toStderr;
|
|
24
|
-
console.info = toStderr;
|
|
25
|
-
console.debug = toStderr;
|
|
26
|
-
}
|
|
27
|
-
function printStatus() {
|
|
28
|
-
const manifest = loadHookManifest();
|
|
29
|
-
const authed = Boolean(getAuthToken());
|
|
30
|
-
const ok = (s) => `${pc.green("\u2714")} ${s}`;
|
|
31
|
-
const bad = (s) => `${pc.red("\u2717")} ${s}`;
|
|
32
|
-
console.log("");
|
|
33
|
-
console.log(pc.bold(pc.cyan(" Vector Vesper MCP\n")));
|
|
34
|
-
console.log(` ${pc.bold("CLI version:")} ${VERSION}`);
|
|
35
|
-
if (manifest) {
|
|
36
|
-
const hookCount = manifest.hooks.filter((h) => h.category !== "core").length;
|
|
37
|
-
const coreCount = manifest.hooks.length - hookCount;
|
|
38
|
-
const patternCount = manifest.patterns?.length ?? 0;
|
|
39
|
-
console.log(
|
|
40
|
-
` ${ok(
|
|
41
|
-
`Hook manifest: ${hookCount} hooks, ${coreCount} core primitives, ${patternCount} patterns, engine v${manifest.engineVersion}`
|
|
42
|
-
)}`
|
|
43
|
-
);
|
|
44
|
-
console.log(` ${pc.dim(`Contract level: ${manifest.contractLevel}`)}`);
|
|
45
|
-
} else {
|
|
46
|
-
console.log(` ${bad("Hook manifest: MISSING")}`);
|
|
47
|
-
console.log(` ${pc.dim("Reinstall with: npm i -g vectorvesper@latest")}`);
|
|
48
|
-
}
|
|
49
|
-
console.log(
|
|
50
|
-
` ${authed ? ok("Authenticated \u2014 Pro components available") : pc.dim("\u25CB Not authenticated \u2014 free components only")}`
|
|
51
|
-
);
|
|
52
|
-
console.log("");
|
|
53
|
-
console.log(pc.bold(" Register with an agent"));
|
|
54
|
-
console.log(pc.dim(" Claude Code:"));
|
|
55
|
-
console.log(` ${pc.cyan("claude mcp add -s user vectorvesper -- npx -y vectorvesper@latest mcp")}`);
|
|
56
|
-
console.log(pc.dim(" Cursor / Claude Desktop / other \u2014 add to the client's MCP config:"));
|
|
57
|
-
console.log(
|
|
58
|
-
CONFIG_SNIPPET.split("\n").map((l) => ` ${pc.dim(l)}`).join("\n")
|
|
59
|
-
);
|
|
60
|
-
console.log("");
|
|
61
|
-
console.log(
|
|
62
|
-
pc.dim(
|
|
63
|
-
" Tools: list_hooks \xB7 get_hook \xB7 list_patterns \xB7 get_pattern \xB7 list_components \xB7 get_component \xB7 get_setup_guidance \xB7 search \xB7 check_motion"
|
|
64
|
-
)
|
|
65
|
-
);
|
|
66
|
-
console.log("");
|
|
67
|
-
}
|
|
68
|
-
function printInteractiveHelp() {
|
|
69
|
-
console.log("");
|
|
70
|
-
console.log(pc.bold(pc.cyan(" Vector Vesper MCP server")));
|
|
71
|
-
console.log("");
|
|
72
|
-
console.log(" This command speaks the Model Context Protocol over stdin/stdout.");
|
|
73
|
-
console.log(" It is meant to be launched by an AI coding agent, not run by hand \u2014");
|
|
74
|
-
console.log(" started from a terminal it would just wait for a client that never connects.");
|
|
75
|
-
console.log("");
|
|
76
|
-
console.log(` ${pc.bold("Check your setup:")} ${pc.cyan("vv mcp status")}`);
|
|
77
|
-
console.log(` ${pc.bold("Add to Claude Code:")} ${pc.cyan("claude mcp add vectorvesper -- npx -y vectorvesper@latest mcp")}`);
|
|
78
|
-
console.log("");
|
|
79
|
-
console.log(pc.dim(" To run the server here anyway (for debugging): vv mcp --stdio"));
|
|
80
|
-
console.log("");
|
|
81
|
-
}
|
|
82
|
-
async function mcpCommand(action, options = {}) {
|
|
83
|
-
if (action === "status" || action === "info") {
|
|
84
|
-
printStatus();
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
if (action !== void 0) {
|
|
88
|
-
console.error(
|
|
89
|
-
`
|
|
90
|
-
${pc.red("\u2717")} Unknown argument "${action}" for \`vv mcp\`.
|
|
91
|
-
|
|
92
|
-
${pc.cyan("vv mcp")} start the MCP server (for agents)
|
|
93
|
-
${pc.cyan("vv mcp status")} check the setup and print client config
|
|
94
|
-
`
|
|
95
|
-
);
|
|
96
|
-
process.exitCode = 1;
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
if (process.stdin.isTTY && !options.stdio) {
|
|
100
|
-
printInteractiveHelp();
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
protectStdout();
|
|
104
|
-
const { startMcpServer } = await import("./server-ROPGTSDI.js");
|
|
105
|
-
try {
|
|
106
|
-
await startMcpServer();
|
|
107
|
-
} catch (error) {
|
|
108
|
-
console.error(
|
|
109
|
-
`vectorvesper mcp: failed to start \u2014 ${error instanceof Error ? error.message : String(error)}`
|
|
110
|
-
);
|
|
111
|
-
process.exit(1);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
export {
|
|
115
|
-
mcpCommand
|
|
116
|
-
};
|