vault-go 0.17.0 → 0.18.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/cli.js +1 -1
- package/dist/installer.d.ts +3 -1
- package/dist/installer.js +21 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -100,7 +100,7 @@ async function chooseClients(args, locale) {
|
|
|
100
100
|
return parseNumberedClients(configured);
|
|
101
101
|
const detected = detectMcpClients();
|
|
102
102
|
for (const item of detected) {
|
|
103
|
-
process.stderr.write(` ${MCP_CLIENTS.indexOf(item.client) + 1}. ${item.client.padEnd(
|
|
103
|
+
process.stderr.write(` ${MCP_CLIENTS.indexOf(item.client) + 1}. ${item.client.padEnd(14)} ${item.detected ? `● ${t.detected}` : `○ ${t.available}`}\n`);
|
|
104
104
|
}
|
|
105
105
|
const defaults = defaultClients();
|
|
106
106
|
const answer = await promptText(`${t.choose} [${defaults.join(',')}]: `);
|
package/dist/installer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const MCP_SERVER_NAME = "vault-go";
|
|
2
2
|
export declare const MCP_SERVER_COMMAND: readonly ["bunx", "--bun", "vault-go@latest", "serve"];
|
|
3
|
-
export declare const MCP_CLIENTS: readonly ["codex", "claude", "claude-desktop", "cursor", "vscode", "copilot", "windsurf", "roo", "opencode", "grok", "agy", "gemini"];
|
|
3
|
+
export declare const MCP_CLIENTS: readonly ["codex", "claude", "claude-desktop", "cursor", "vscode", "copilot", "windsurf", "roo", "opencode", "grok", "agy", "gemini", "vault-desktop"];
|
|
4
4
|
export type McpClient = (typeof MCP_CLIENTS)[number];
|
|
5
5
|
export interface DetectedClient {
|
|
6
6
|
client: McpClient;
|
|
@@ -17,6 +17,8 @@ type CommandResult = {
|
|
|
17
17
|
error?: Error;
|
|
18
18
|
};
|
|
19
19
|
type CommandRunner = (command: string, args: readonly string[]) => CommandResult;
|
|
20
|
+
export declare function vaultDesktopMcpPath(home: string): string;
|
|
21
|
+
export declare function vaultDesktopDotMcpPath(home: string): string;
|
|
20
22
|
export declare function installMcpClient(client: McpClient, options?: {
|
|
21
23
|
home?: string;
|
|
22
24
|
cwd?: string;
|
package/dist/installer.js
CHANGED
|
@@ -20,10 +20,12 @@ export const MCP_CLIENTS = [
|
|
|
20
20
|
'grok',
|
|
21
21
|
'agy',
|
|
22
22
|
'gemini',
|
|
23
|
+
'vault-desktop',
|
|
23
24
|
];
|
|
24
25
|
const CLIENT_ALIASES = {
|
|
25
26
|
antigravity: 'agy',
|
|
26
27
|
'gemini-cli': 'gemini',
|
|
28
|
+
desktop: 'vault-desktop',
|
|
27
29
|
};
|
|
28
30
|
const runCommand = (command, args) => spawnSync(command, [...args], { stdio: 'ignore' });
|
|
29
31
|
function readJsonObject(path) {
|
|
@@ -102,6 +104,18 @@ function claudeDesktopPath(home) {
|
|
|
102
104
|
}
|
|
103
105
|
return join(home, '.config', 'Claude', 'claude_desktop_config.json');
|
|
104
106
|
}
|
|
107
|
+
export function vaultDesktopMcpPath(home) {
|
|
108
|
+
if (platform() === 'darwin') {
|
|
109
|
+
return join(home, 'Library', 'Application Support', 'Vault Desktop', 'mcp.json');
|
|
110
|
+
}
|
|
111
|
+
if (platform() === 'win32') {
|
|
112
|
+
return join(process.env['APPDATA'] ?? join(home, 'AppData', 'Roaming'), 'Vault Desktop', 'mcp.json');
|
|
113
|
+
}
|
|
114
|
+
return join(home, '.config', 'Vault Desktop', 'mcp.json');
|
|
115
|
+
}
|
|
116
|
+
export function vaultDesktopDotMcpPath(home) {
|
|
117
|
+
return join(home, '.vault-desktop', 'mcp.json');
|
|
118
|
+
}
|
|
105
119
|
function installViaCli(client, command, getArgs, addArgs, runner) {
|
|
106
120
|
const existing = runner(command, getArgs);
|
|
107
121
|
if (existing.status === 0) {
|
|
@@ -187,6 +201,12 @@ export function installMcpClient(client, options = {}) {
|
|
|
187
201
|
mergeServer(path);
|
|
188
202
|
return { client, status: 'installed', destination: path };
|
|
189
203
|
}
|
|
204
|
+
if (client === 'vault-desktop') {
|
|
205
|
+
const destination = vaultDesktopMcpPath(home);
|
|
206
|
+
mergeServer(destination);
|
|
207
|
+
mergeServer(vaultDesktopDotMcpPath(home));
|
|
208
|
+
return { client, status: 'installed', destination };
|
|
209
|
+
}
|
|
190
210
|
let path;
|
|
191
211
|
if (client === 'claude-desktop')
|
|
192
212
|
path = claudeDesktopPath(home);
|
|
@@ -234,6 +254,7 @@ export function detectMcpClients(home = homedir()) {
|
|
|
234
254
|
['grok', ['grok'], [join(home, '.grok')]],
|
|
235
255
|
['agy', ['agy'], [join(home, '.gemini', 'antigravity-cli'), join(home, '.gemini', 'config'), join(home, '.gemini', 'antigravity')]],
|
|
236
256
|
['gemini', ['gemini'], [join(home, '.gemini', 'settings.json')]],
|
|
257
|
+
['vault-desktop', [], [vaultDesktopMcpPath(home), vaultDesktopDotMcpPath(home), '/Applications/Vault Desktop.app']],
|
|
237
258
|
];
|
|
238
259
|
return definitions.map(([client, commands, paths]) => {
|
|
239
260
|
const command = commands.find((candidate) => Bun.which(candidate));
|