@getverbal/cli 0.6.0 → 0.7.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 +18760 -1833
- package/package.json +2 -1
- package/dist/agent-hooks/claude.d.ts +0 -10
- package/dist/agent-hooks/claude.d.ts.map +0 -1
- package/dist/agent-hooks/claude.js +0 -218
- package/dist/agent-hooks/claude.js.map +0 -1
- package/dist/agent-hooks/cli.d.ts +0 -2
- package/dist/agent-hooks/cli.d.ts.map +0 -1
- package/dist/agent-hooks/cli.js +0 -271
- package/dist/agent-hooks/cli.js.map +0 -1
- package/dist/agent-hooks/codex.d.ts +0 -9
- package/dist/agent-hooks/codex.d.ts.map +0 -1
- package/dist/agent-hooks/codex.js +0 -349
- package/dist/agent-hooks/codex.js.map +0 -1
- package/dist/agent-hooks/config.d.ts +0 -32
- package/dist/agent-hooks/config.d.ts.map +0 -1
- package/dist/agent-hooks/config.js +0 -176
- package/dist/agent-hooks/config.js.map +0 -1
- package/dist/agent-hooks/ingest.d.ts +0 -4
- package/dist/agent-hooks/ingest.d.ts.map +0 -1
- package/dist/agent-hooks/ingest.js +0 -22
- package/dist/agent-hooks/ingest.js.map +0 -1
- package/dist/agent-hooks/launchagent.d.ts +0 -7
- package/dist/agent-hooks/launchagent.d.ts.map +0 -1
- package/dist/agent-hooks/launchagent.js +0 -51
- package/dist/agent-hooks/launchagent.js.map +0 -1
- package/dist/agent-hooks/runtime-context.d.ts +0 -20
- package/dist/agent-hooks/runtime-context.d.ts.map +0 -1
- package/dist/agent-hooks/runtime-context.js +0 -90
- package/dist/agent-hooks/runtime-context.js.map +0 -1
- package/dist/agent-hooks/state.d.ts +0 -26
- package/dist/agent-hooks/state.d.ts.map +0 -1
- package/dist/agent-hooks/state.js +0 -67
- package/dist/agent-hooks/state.js.map +0 -1
- package/dist/agent-hooks/tokscale.d.ts +0 -70
- package/dist/agent-hooks/tokscale.d.ts.map +0 -1
- package/dist/agent-hooks/tokscale.js +0 -142
- package/dist/agent-hooks/tokscale.js.map +0 -1
- package/dist/agent-hooks/tool-extraction.d.ts +0 -7
- package/dist/agent-hooks/tool-extraction.d.ts.map +0 -1
- package/dist/agent-hooks/tool-extraction.js +0 -100
- package/dist/agent-hooks/tool-extraction.js.map +0 -1
- package/dist/agent-hooks/trace.d.ts +0 -17
- package/dist/agent-hooks/trace.d.ts.map +0 -1
- package/dist/agent-hooks/trace.js +0 -25
- package/dist/agent-hooks/trace.js.map +0 -1
- package/dist/auth/browser-auth.d.ts +0 -6
- package/dist/auth/browser-auth.d.ts.map +0 -1
- package/dist/auth/browser-auth.js +0 -202
- package/dist/auth/browser-auth.js.map +0 -1
- package/dist/auth/credentials.d.ts +0 -6
- package/dist/auth/credentials.d.ts.map +0 -1
- package/dist/auth/credentials.js +0 -78
- package/dist/auth/credentials.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -2
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -19
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/hooks.d.ts +0 -2
- package/dist/commands/hooks.d.ts.map +0 -1
- package/dist/commands/hooks.js +0 -6
- package/dist/commands/hooks.js.map +0 -1
- package/dist/commands/import.d.ts +0 -2
- package/dist/commands/import.d.ts.map +0 -1
- package/dist/commands/import.js +0 -129
- package/dist/commands/import.js.map +0 -1
- package/dist/commands/init.d.ts +0 -2
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -262
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/logout.d.ts +0 -2
- package/dist/commands/logout.d.ts.map +0 -1
- package/dist/commands/logout.js +0 -17
- package/dist/commands/logout.js.map +0 -1
- package/dist/commands/mcp-serve.d.ts +0 -2
- package/dist/commands/mcp-serve.d.ts.map +0 -1
- package/dist/commands/mcp-serve.js +0 -7
- package/dist/commands/mcp-serve.js.map +0 -1
- package/dist/commands/status.d.ts +0 -2
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js +0 -43
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/uninstall.d.ts +0 -2
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js +0 -43
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/commands/update.d.ts +0 -2
- package/dist/commands/update.d.ts.map +0 -1
- package/dist/commands/update.js +0 -58
- package/dist/commands/update.js.map +0 -1
- package/dist/configure/claude-code.d.ts +0 -7
- package/dist/configure/claude-code.d.ts.map +0 -1
- package/dist/configure/claude-code.js +0 -11
- package/dist/configure/claude-code.js.map +0 -1
- package/dist/configure/claude-desktop.d.ts +0 -8
- package/dist/configure/claude-desktop.d.ts.map +0 -1
- package/dist/configure/claude-desktop.js +0 -28
- package/dist/configure/claude-desktop.js.map +0 -1
- package/dist/configure/codex.d.ts +0 -7
- package/dist/configure/codex.d.ts.map +0 -1
- package/dist/configure/codex.js +0 -12
- package/dist/configure/codex.js.map +0 -1
- package/dist/configure/cursor.d.ts +0 -7
- package/dist/configure/cursor.d.ts.map +0 -1
- package/dist/configure/cursor.js +0 -12
- package/dist/configure/cursor.js.map +0 -1
- package/dist/configure/index.d.ts +0 -34
- package/dist/configure/index.d.ts.map +0 -1
- package/dist/configure/index.js +0 -153
- package/dist/configure/index.js.map +0 -1
- package/dist/detect/claude-code.d.ts +0 -3
- package/dist/detect/claude-code.d.ts.map +0 -1
- package/dist/detect/claude-code.js +0 -82
- package/dist/detect/claude-code.js.map +0 -1
- package/dist/detect/claude-desktop.d.ts +0 -3
- package/dist/detect/claude-desktop.d.ts.map +0 -1
- package/dist/detect/claude-desktop.js +0 -89
- package/dist/detect/claude-desktop.js.map +0 -1
- package/dist/detect/codex.d.ts +0 -3
- package/dist/detect/codex.d.ts.map +0 -1
- package/dist/detect/codex.js +0 -64
- package/dist/detect/codex.js.map +0 -1
- package/dist/detect/cursor.d.ts +0 -3
- package/dist/detect/cursor.d.ts.map +0 -1
- package/dist/detect/cursor.js +0 -81
- package/dist/detect/cursor.js.map +0 -1
- package/dist/detect/index.d.ts +0 -3
- package/dist/detect/index.d.ts.map +0 -1
- package/dist/detect/index.js +0 -28
- package/dist/detect/index.js.map +0 -1
- package/dist/import/file-upload.d.ts +0 -10
- package/dist/import/file-upload.d.ts.map +0 -1
- package/dist/import/file-upload.js +0 -37
- package/dist/import/file-upload.js.map +0 -1
- package/dist/import/index.d.ts +0 -11
- package/dist/import/index.d.ts.map +0 -1
- package/dist/import/index.js +0 -51
- package/dist/import/index.js.map +0 -1
- package/dist/mcp/exports.d.ts +0 -13
- package/dist/mcp/exports.d.ts.map +0 -1
- package/dist/mcp/exports.js +0 -13
- package/dist/mcp/exports.js.map +0 -1
- package/dist/mcp/git-context.d.ts +0 -17
- package/dist/mcp/git-context.d.ts.map +0 -1
- package/dist/mcp/git-context.js +0 -72
- package/dist/mcp/git-context.js.map +0 -1
- package/dist/mcp/hooks/anthropic.d.ts +0 -31
- package/dist/mcp/hooks/anthropic.d.ts.map +0 -1
- package/dist/mcp/hooks/anthropic.js +0 -137
- package/dist/mcp/hooks/anthropic.js.map +0 -1
- package/dist/mcp/hooks/google.d.ts +0 -53
- package/dist/mcp/hooks/google.d.ts.map +0 -1
- package/dist/mcp/hooks/google.js +0 -161
- package/dist/mcp/hooks/google.js.map +0 -1
- package/dist/mcp/hooks/index.d.ts +0 -9
- package/dist/mcp/hooks/index.d.ts.map +0 -1
- package/dist/mcp/hooks/index.js +0 -7
- package/dist/mcp/hooks/index.js.map +0 -1
- package/dist/mcp/hooks/openai.d.ts +0 -59
- package/dist/mcp/hooks/openai.d.ts.map +0 -1
- package/dist/mcp/hooks/openai.js +0 -158
- package/dist/mcp/hooks/openai.js.map +0 -1
- package/dist/mcp/hooks/types.d.ts +0 -8
- package/dist/mcp/hooks/types.d.ts.map +0 -1
- package/dist/mcp/hooks/types.js +0 -5
- package/dist/mcp/hooks/types.js.map +0 -1
- package/dist/mcp/ingestor.d.ts +0 -23
- package/dist/mcp/ingestor.d.ts.map +0 -1
- package/dist/mcp/ingestor.js +0 -310
- package/dist/mcp/ingestor.js.map +0 -1
- package/dist/mcp/pricing.d.ts +0 -19
- package/dist/mcp/pricing.d.ts.map +0 -1
- package/dist/mcp/pricing.js +0 -130
- package/dist/mcp/pricing.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -10
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -689
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/session-tracker.d.ts +0 -52
- package/dist/mcp/session-tracker.d.ts.map +0 -1
- package/dist/mcp/session-tracker.js +0 -186
- package/dist/mcp/session-tracker.js.map +0 -1
- package/dist/mcp/tools/analyze-spending-trend.d.ts +0 -10
- package/dist/mcp/tools/analyze-spending-trend.d.ts.map +0 -1
- package/dist/mcp/tools/analyze-spending-trend.js +0 -126
- package/dist/mcp/tools/analyze-spending-trend.js.map +0 -1
- package/dist/mcp/tools/get-budget-status.d.ts +0 -9
- package/dist/mcp/tools/get-budget-status.d.ts.map +0 -1
- package/dist/mcp/tools/get-budget-status.js +0 -59
- package/dist/mcp/tools/get-budget-status.js.map +0 -1
- package/dist/mcp/tools/get-cost-breakdown.d.ts +0 -10
- package/dist/mcp/tools/get-cost-breakdown.d.ts.map +0 -1
- package/dist/mcp/tools/get-cost-breakdown.js +0 -52
- package/dist/mcp/tools/get-cost-breakdown.js.map +0 -1
- package/dist/mcp/tools/get-model-efficiency.d.ts +0 -9
- package/dist/mcp/tools/get-model-efficiency.d.ts.map +0 -1
- package/dist/mcp/tools/get-model-efficiency.js +0 -137
- package/dist/mcp/tools/get-model-efficiency.js.map +0 -1
- package/dist/mcp/tools/get-recent-prompts.d.ts +0 -13
- package/dist/mcp/tools/get-recent-prompts.d.ts.map +0 -1
- package/dist/mcp/tools/get-recent-prompts.js +0 -56
- package/dist/mcp/tools/get-recent-prompts.js.map +0 -1
- package/dist/mcp/tools/get-roi-metrics.d.ts +0 -9
- package/dist/mcp/tools/get-roi-metrics.d.ts.map +0 -1
- package/dist/mcp/tools/get-roi-metrics.js +0 -84
- package/dist/mcp/tools/get-roi-metrics.js.map +0 -1
- package/dist/mcp/tools/get-usage-summary.d.ts +0 -10
- package/dist/mcp/tools/get-usage-summary.d.ts.map +0 -1
- package/dist/mcp/tools/get-usage-summary.js +0 -47
- package/dist/mcp/tools/get-usage-summary.js.map +0 -1
- package/dist/mcp/tools/index.d.ts +0 -221
- package/dist/mcp/tools/index.d.ts.map +0 -1
- package/dist/mcp/tools/index.js +0 -161
- package/dist/mcp/tools/index.js.map +0 -1
- package/dist/mcp/tools/list-projects.d.ts +0 -6
- package/dist/mcp/tools/list-projects.d.ts.map +0 -1
- package/dist/mcp/tools/list-projects.js +0 -43
- package/dist/mcp/tools/list-projects.js.map +0 -1
- package/dist/mcp/tools/optimize-prompt.d.ts +0 -44
- package/dist/mcp/tools/optimize-prompt.d.ts.map +0 -1
- package/dist/mcp/tools/optimize-prompt.js +0 -95
- package/dist/mcp/tools/optimize-prompt.js.map +0 -1
- package/dist/mcp/types.d.ts +0 -118
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -5
- package/dist/mcp/types.js.map +0 -1
- package/dist/types.d.ts +0 -18
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/update-check/check.d.ts +0 -6
- package/dist/update-check/check.d.ts.map +0 -1
- package/dist/update-check/check.js +0 -64
- package/dist/update-check/check.js.map +0 -1
- package/dist/update-check/notify.d.ts +0 -6
- package/dist/update-check/notify.d.ts.map +0 -1
- package/dist/update-check/notify.js +0 -40
- package/dist/update-check/notify.js.map +0 -1
- package/dist/verify.d.ts +0 -7
- package/dist/verify.d.ts.map +0 -1
- package/dist/verify.js +0 -40
- package/dist/verify.js.map +0 -1
- package/dist/version.d.ts +0 -9
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -21
- package/dist/version.js.map +0 -1
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Credentials, DetectionResult } from '../types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Configures the Verbal MCP server in Cursor IDE.
|
|
4
|
-
* Writes to ~/.cursor/mcp.json, preserving any existing MCP server entries.
|
|
5
|
-
*/
|
|
6
|
-
export declare function configureCursor(_detection: DetectionResult, credentials: Credentials, billingType?: 'api' | 'subscription', useGlobal?: boolean): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=cursor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/configure/cursor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGhE;;;GAGG;AACH,wBAAsB,eAAe,CACnC,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,KAAK,GAAG,cAAc,EACpC,SAAS,GAAE,OAAe,GACzB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
package/dist/configure/cursor.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { homedir } from 'node:os';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { mergeConfig } from './index.js';
|
|
4
|
-
/**
|
|
5
|
-
* Configures the Verbal MCP server in Cursor IDE.
|
|
6
|
-
* Writes to ~/.cursor/mcp.json, preserving any existing MCP server entries.
|
|
7
|
-
*/
|
|
8
|
-
export async function configureCursor(_detection, credentials, billingType, useGlobal = false) {
|
|
9
|
-
const configPath = join(homedir(), '.cursor', 'mcp.json');
|
|
10
|
-
mergeConfig(configPath, credentials, billingType, useGlobal);
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=cursor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.js","sourceRoot":"","sources":["../../src/configure/cursor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,UAA2B,EAC3B,WAAwB,EACxB,WAAoC,EACpC,YAAqB,KAAK;IAE1B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;IAC1D,WAAW,CAAC,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Credentials, DetectionResult } from '../types.js';
|
|
2
|
-
export interface ConfigureResult {
|
|
3
|
-
tool: string;
|
|
4
|
-
success: boolean;
|
|
5
|
-
error?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Builds the verbal MCP server entry object from credentials.
|
|
9
|
-
*
|
|
10
|
-
* When useGlobal=true the entry invokes the globally installed `getverbal`
|
|
11
|
-
* binary directly. When useGlobal=false (default) it falls back to npx so
|
|
12
|
-
* the command works even without a global install.
|
|
13
|
-
*/
|
|
14
|
-
export declare function buildVerbalMcpEntry(credentials: Credentials, billingType?: 'api' | 'subscription', useGlobal?: boolean): Record<string, unknown>;
|
|
15
|
-
/**
|
|
16
|
-
* Safely reads an existing config file, merges in the verbal MCP entry,
|
|
17
|
-
* and writes it back atomically using a .tmp file + rename.
|
|
18
|
-
*
|
|
19
|
-
* Only the mcpServers.verbal key is overwritten; all other keys are preserved.
|
|
20
|
-
*/
|
|
21
|
-
export declare function mergeConfig(configPath: string, credentials: Credentials, billingType?: 'api' | 'subscription', useGlobal?: boolean): void;
|
|
22
|
-
/**
|
|
23
|
-
* Removes the mcpServers.verbal key from a config file.
|
|
24
|
-
* If removing it leaves mcpServers empty, removes mcpServers too.
|
|
25
|
-
* No-op if the file doesn't exist or has no verbal entry.
|
|
26
|
-
*/
|
|
27
|
-
export declare function removeVerbalConfig(configPath: string): void;
|
|
28
|
-
/**
|
|
29
|
-
* Configures all detected AI tools with the Verbal MCP server.
|
|
30
|
-
* Skips tools where detected === false.
|
|
31
|
-
* Returns a results array — never throws on individual failures.
|
|
32
|
-
*/
|
|
33
|
-
export declare function configureAll(detections: DetectionResult[], credentials: Credentials, useGlobal?: boolean): Promise<ConfigureResult[]>;
|
|
34
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configure/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAahE,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,WAAW,GAAE,KAAK,GAAG,cAAsB,EAC3C,SAAS,GAAE,OAAe,GACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgBzB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,KAAK,GAAG,cAAc,EACpC,SAAS,GAAE,OAAe,GACzB,IAAI,CA+BN;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CA0C3D;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,eAAe,EAAE,EAC7B,WAAW,EAAE,WAAW,EACxB,SAAS,GAAE,OAAe,GACzB,OAAO,CAAC,eAAe,EAAE,CAAC,CAyC5B"}
|
package/dist/configure/index.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { mkdirSync, readFileSync, renameSync, writeFileSync, existsSync } from 'node:fs';
|
|
2
|
-
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { configureClaudeCode } from './claude-code.js';
|
|
4
|
-
import { configureClaudeDesktop } from './claude-desktop.js';
|
|
5
|
-
import { configureCursor } from './cursor.js';
|
|
6
|
-
import { configureCodex } from './codex.js';
|
|
7
|
-
const TOOL_DEFAULT_BILLING_TYPE = {
|
|
8
|
-
'claude-code': 'api',
|
|
9
|
-
'claude-desktop': 'subscription',
|
|
10
|
-
'cursor': 'subscription',
|
|
11
|
-
'codex': 'api',
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Builds the verbal MCP server entry object from credentials.
|
|
15
|
-
*
|
|
16
|
-
* When useGlobal=true the entry invokes the globally installed `getverbal`
|
|
17
|
-
* binary directly. When useGlobal=false (default) it falls back to npx so
|
|
18
|
-
* the command works even without a global install.
|
|
19
|
-
*/
|
|
20
|
-
export function buildVerbalMcpEntry(credentials, billingType = 'api', useGlobal = false) {
|
|
21
|
-
return {
|
|
22
|
-
command: useGlobal ? 'getverbal' : 'npx',
|
|
23
|
-
args: useGlobal ? ['mcp-serve'] : ['-y', 'getverbal', 'mcp-serve'],
|
|
24
|
-
env: {
|
|
25
|
-
VERBAL_API_KEY: credentials.api_key,
|
|
26
|
-
VERBAL_API_URL: credentials.api_url,
|
|
27
|
-
VERBAL_INGEST_URL: credentials.ingest_url,
|
|
28
|
-
VERBAL_SOURCE: 'mcp',
|
|
29
|
-
VERBAL_CAPTURE_MODE: 'full',
|
|
30
|
-
VERBAL_TRACE_ENABLED: 'true',
|
|
31
|
-
VERBAL_GIT_CONTEXT_ENABLED: 'true',
|
|
32
|
-
VERBAL_COST_CALC_ENABLED: 'true',
|
|
33
|
-
VERBAL_BILLING_TYPE: billingType,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Safely reads an existing config file, merges in the verbal MCP entry,
|
|
39
|
-
* and writes it back atomically using a .tmp file + rename.
|
|
40
|
-
*
|
|
41
|
-
* Only the mcpServers.verbal key is overwritten; all other keys are preserved.
|
|
42
|
-
*/
|
|
43
|
-
export function mergeConfig(configPath, credentials, billingType, useGlobal = false) {
|
|
44
|
-
// Ensure parent directories exist
|
|
45
|
-
mkdirSync(dirname(configPath), { recursive: true });
|
|
46
|
-
// Read existing config or start fresh
|
|
47
|
-
let config = {};
|
|
48
|
-
if (existsSync(configPath)) {
|
|
49
|
-
try {
|
|
50
|
-
config = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
// Malformed JSON — start fresh rather than bail out
|
|
54
|
-
config = {};
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
// Ensure mcpServers key exists
|
|
58
|
-
if (config['mcpServers'] === undefined || config['mcpServers'] === null || typeof config['mcpServers'] !== 'object') {
|
|
59
|
-
config['mcpServers'] = {};
|
|
60
|
-
}
|
|
61
|
-
// Set only the verbal entry — preserve all other MCP server configs
|
|
62
|
-
config['mcpServers']['verbal'] = buildVerbalMcpEntry(credentials, billingType, useGlobal);
|
|
63
|
-
// Atomic write: write to .tmp then rename
|
|
64
|
-
const tmpPath = `${configPath}.tmp`;
|
|
65
|
-
writeFileSync(tmpPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
66
|
-
renameSync(tmpPath, configPath);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Removes the mcpServers.verbal key from a config file.
|
|
70
|
-
* If removing it leaves mcpServers empty, removes mcpServers too.
|
|
71
|
-
* No-op if the file doesn't exist or has no verbal entry.
|
|
72
|
-
*/
|
|
73
|
-
export function removeVerbalConfig(configPath) {
|
|
74
|
-
const resolvedPath = resolve(configPath);
|
|
75
|
-
// 1. Read the config file — return silently if not found
|
|
76
|
-
if (!existsSync(resolvedPath)) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
let config;
|
|
80
|
-
try {
|
|
81
|
-
config = JSON.parse(readFileSync(resolvedPath, 'utf-8'));
|
|
82
|
-
}
|
|
83
|
-
catch {
|
|
84
|
-
// Malformed JSON — nothing safe to do, leave it alone
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
// 2. Remove mcpServers.verbal if it exists
|
|
88
|
-
if (config['mcpServers'] !== undefined &&
|
|
89
|
-
config['mcpServers'] !== null &&
|
|
90
|
-
typeof config['mcpServers'] === 'object') {
|
|
91
|
-
const mcpServers = config['mcpServers'];
|
|
92
|
-
if (!Object.prototype.hasOwnProperty.call(mcpServers, 'verbal')) {
|
|
93
|
-
// No verbal entry — nothing to do
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
delete mcpServers['verbal'];
|
|
97
|
-
// 3. If mcpServers is now empty, remove the key entirely
|
|
98
|
-
if (Object.keys(mcpServers).length === 0) {
|
|
99
|
-
delete config['mcpServers'];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
// No mcpServers section — nothing to do
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
// 4. Atomic write: tmp + rename
|
|
107
|
-
const tmpPath = `${resolvedPath}.tmp`;
|
|
108
|
-
writeFileSync(tmpPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
109
|
-
renameSync(tmpPath, resolvedPath);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Configures all detected AI tools with the Verbal MCP server.
|
|
113
|
-
* Skips tools where detected === false.
|
|
114
|
-
* Returns a results array — never throws on individual failures.
|
|
115
|
-
*/
|
|
116
|
-
export async function configureAll(detections, credentials, useGlobal = false) {
|
|
117
|
-
const results = [];
|
|
118
|
-
for (const detection of detections) {
|
|
119
|
-
if (!detection.detected) {
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
let success = false;
|
|
123
|
-
let error;
|
|
124
|
-
const billingType = TOOL_DEFAULT_BILLING_TYPE[detection.tool] ?? 'api';
|
|
125
|
-
try {
|
|
126
|
-
switch (detection.tool) {
|
|
127
|
-
case 'claude-code':
|
|
128
|
-
await configureClaudeCode(detection, credentials, billingType, useGlobal);
|
|
129
|
-
break;
|
|
130
|
-
case 'claude-desktop':
|
|
131
|
-
await configureClaudeDesktop(detection, credentials, billingType, useGlobal);
|
|
132
|
-
break;
|
|
133
|
-
case 'cursor':
|
|
134
|
-
await configureCursor(detection, credentials, billingType, useGlobal);
|
|
135
|
-
break;
|
|
136
|
-
case 'codex':
|
|
137
|
-
await configureCodex(detection, credentials, billingType, useGlobal);
|
|
138
|
-
break;
|
|
139
|
-
default: {
|
|
140
|
-
const _exhaustive = detection.tool;
|
|
141
|
-
throw new Error(`Unknown tool: ${String(_exhaustive)}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
success = true;
|
|
145
|
-
}
|
|
146
|
-
catch (err) {
|
|
147
|
-
error = err instanceof Error ? err.message : String(err);
|
|
148
|
-
}
|
|
149
|
-
results.push({ tool: detection.tool, success, error });
|
|
150
|
-
}
|
|
151
|
-
return results;
|
|
152
|
-
}
|
|
153
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/configure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,Y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R,KAAK,gBAAgB;oBACnB,MAAM,sBAAsB,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;oBAC7E,MAAM;gBACR,KAAK,QAAQ;oBACX,MAAM,eAAe,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;oBACtE,MAAM;gBACR,KAAK,OAAO;oBACV,MAAM,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;oBACrE,MAAM;gBACR,OAAO,CAAC,CAAC,CAAC;oBACR,MAAM,WAAW,GAAU,SAAS,CAAC,IAAI,CAAC;oBAC1C,MAAM,IAAI,KAAK,CAAC,iBAAiB,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC1D,CAAC;YACH,CAAC;YACD,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,KAAK,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../src/detect/claude-code.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,eAAe,CAAC,CAiFjE"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { execSync } from 'node:child_process';
|
|
5
|
-
export async function detectClaudeCode() {
|
|
6
|
-
const configPath = join(process.cwd(), '.mcp.json');
|
|
7
|
-
try {
|
|
8
|
-
// Check for claude binary
|
|
9
|
-
let binaryPath;
|
|
10
|
-
let version;
|
|
11
|
-
try {
|
|
12
|
-
binaryPath = execSync('which claude', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
// Binary not in PATH
|
|
16
|
-
}
|
|
17
|
-
// Check for ~/.claude/ directory
|
|
18
|
-
const claudeDir = join(homedir(), '.claude');
|
|
19
|
-
const hasClaudioDir = existsSync(claudeDir);
|
|
20
|
-
const detected = binaryPath !== undefined || hasClaudioDir;
|
|
21
|
-
if (!detected) {
|
|
22
|
-
return {
|
|
23
|
-
tool: 'claude-code',
|
|
24
|
-
detected: false,
|
|
25
|
-
configPath,
|
|
26
|
-
existingConfig: false,
|
|
27
|
-
details: 'Claude Code not found',
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
// Try to get version
|
|
31
|
-
if (binaryPath) {
|
|
32
|
-
try {
|
|
33
|
-
const versionOutput = execSync('claude --version', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
34
|
-
// Output is typically "Claude Code v1.2.3" or just "1.2.3"
|
|
35
|
-
const match = versionOutput.match(/(\d+\.\d+\.\d+)/);
|
|
36
|
-
if (match) {
|
|
37
|
-
version = match[1];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
// Version check failed — non-fatal
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// Check if .mcp.json already has mcpServers.verbal
|
|
45
|
-
let existingConfig = false;
|
|
46
|
-
if (existsSync(configPath)) {
|
|
47
|
-
try {
|
|
48
|
-
const raw = readFileSync(configPath, 'utf-8');
|
|
49
|
-
const parsed = JSON.parse(raw);
|
|
50
|
-
const mcpServers = parsed['mcpServers'];
|
|
51
|
-
if (mcpServers !== null && typeof mcpServers === 'object') {
|
|
52
|
-
existingConfig = 'verbal' in mcpServers;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
// Malformed JSON — treat as no existing config
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const location = binaryPath ?? claudeDir;
|
|
60
|
-
const details = version
|
|
61
|
-
? `Claude Code v${version} at ${location}`
|
|
62
|
-
: `Claude Code at ${location}`;
|
|
63
|
-
return {
|
|
64
|
-
tool: 'claude-code',
|
|
65
|
-
detected: true,
|
|
66
|
-
version,
|
|
67
|
-
configPath,
|
|
68
|
-
existingConfig,
|
|
69
|
-
details,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
catch {
|
|
73
|
-
return {
|
|
74
|
-
tool: 'claude-code',
|
|
75
|
-
detected: false,
|
|
76
|
-
configPath,
|
|
77
|
-
existingConfig: false,
|
|
78
|
-
details: 'Claude Code detection failed',
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=claude-code.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/detect/claude-code.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;IAEpD,IAAI,CAAC;QACH,0BAA0B;QAC1B,IAAI,UAA8B,CAAC;QACnC,IAAI,OAA2B,CAAC;QAEhC,IAAI,CAAC;YACH,UAAU,GAAG,QAA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AAG,CAA4B,CAAC;gBAC1D,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;gBACxC,IAAI,UAAU,KAAK,IAAI,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;oBAC1D,cAAc,GAAG,QAAQ,IAAK,UAAsC,CAAC;gBACvE,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,+CAA+C;YACjD,CAAC;QACH,CAAC;QAED,MAAM,QAAQ,GAAG,UAAU,IAAI,SAAS,CAAC;QACzC,MAAM,OAAO,GAAG,OAAO;YACrB,CAAC,CAAC,gBAAgB,OAAO,OAAO,QAAQ,EAAE;YAC1C,CAAC,CAAC,kBAAkB,QAAQ,EAAE,CAAC;QAEjC,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO;YACP,UAAU;YACV,cAAc;YACd,OAAO;SACR,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,KAAK;YACf,UAAU;YACV,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE,8BAA8B;SACxC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-desktop.d.ts","sourceRoot":"","sources":["../../src/detect/claude-desktop.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6CnD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,eAAe,CAAC,CA+CpE"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { execSync } from 'node:child_process';
|
|
5
|
-
function getConfigPath() {
|
|
6
|
-
const platform = process.platform;
|
|
7
|
-
if (platform === 'darwin') {
|
|
8
|
-
return join(homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
|
|
9
|
-
}
|
|
10
|
-
if (platform === 'win32') {
|
|
11
|
-
return join(process.env['APPDATA'] ?? homedir(), 'Claude', 'claude_desktop_config.json');
|
|
12
|
-
}
|
|
13
|
-
// Linux
|
|
14
|
-
return join(homedir(), '.config', 'claude', 'claude_desktop_config.json');
|
|
15
|
-
}
|
|
16
|
-
function isInstalled() {
|
|
17
|
-
const platform = process.platform;
|
|
18
|
-
if (platform === 'darwin') {
|
|
19
|
-
return (existsSync('/Applications/Claude.app') ||
|
|
20
|
-
existsSync(join(homedir(), 'Applications', 'Claude.app')));
|
|
21
|
-
}
|
|
22
|
-
if (platform === 'win32') {
|
|
23
|
-
const localAppData = process.env['LOCALAPPDATA'] ?? join(homedir(), 'AppData', 'Local');
|
|
24
|
-
return existsSync(join(localAppData, 'Programs', 'Claude', 'Claude.exe'));
|
|
25
|
-
}
|
|
26
|
-
// Linux — check for claude-desktop binary in PATH
|
|
27
|
-
try {
|
|
28
|
-
execSync('which claude-desktop', { encoding: 'utf-8', timeout: 5000 });
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function platformLabel() {
|
|
36
|
-
const platform = process.platform;
|
|
37
|
-
if (platform === 'darwin')
|
|
38
|
-
return 'macOS app';
|
|
39
|
-
if (platform === 'win32')
|
|
40
|
-
return 'Windows app';
|
|
41
|
-
return 'Linux';
|
|
42
|
-
}
|
|
43
|
-
export async function detectClaudeDesktop() {
|
|
44
|
-
const configPath = getConfigPath();
|
|
45
|
-
try {
|
|
46
|
-
const detected = isInstalled();
|
|
47
|
-
if (!detected) {
|
|
48
|
-
return {
|
|
49
|
-
tool: 'claude-desktop',
|
|
50
|
-
detected: false,
|
|
51
|
-
configPath,
|
|
52
|
-
existingConfig: false,
|
|
53
|
-
details: 'Claude Desktop not found',
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
// Check if config already has mcpServers.verbal
|
|
57
|
-
let existingConfig = false;
|
|
58
|
-
if (existsSync(configPath)) {
|
|
59
|
-
try {
|
|
60
|
-
const raw = readFileSync(configPath, 'utf-8');
|
|
61
|
-
const parsed = JSON.parse(raw);
|
|
62
|
-
const mcpServers = parsed['mcpServers'];
|
|
63
|
-
if (mcpServers !== null && typeof mcpServers === 'object') {
|
|
64
|
-
existingConfig = 'verbal' in mcpServers;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
catch {
|
|
68
|
-
// Malformed JSON — treat as no existing config
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
tool: 'claude-desktop',
|
|
73
|
-
detected: true,
|
|
74
|
-
configPath,
|
|
75
|
-
existingConfig,
|
|
76
|
-
details: `Claude Desktop (${platformLabel()})`,
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
return {
|
|
81
|
-
tool: 'claude-desktop',
|
|
82
|
-
detected: false,
|
|
83
|
-
configPath,
|
|
84
|
-
existingConfig: false,
|
|
85
|
-
details: 'Claude Desktop detection failed',
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=claude-desktop.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-desktop.js","sourceRoot":"","sources":["../../src/detect/claude-desktop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,SAAS,aAAa;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAClC,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAA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f,UAAU;YACV,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE,iCAAiC;SAC3C,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/detect/codex.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/detect/codex.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,WAAW,IAAI,OAAO,CAAC,eAAe,CAAC,CA+D5D"}
|
package/dist/detect/codex.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { execSync } from 'node:child_process';
|
|
5
|
-
export async function detectCodex() {
|
|
6
|
-
const configPath = join(homedir(), '.codex', 'config.json');
|
|
7
|
-
try {
|
|
8
|
-
// Check for codex binary in PATH
|
|
9
|
-
let binaryPath;
|
|
10
|
-
try {
|
|
11
|
-
binaryPath = execSync('which codex', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
12
|
-
}
|
|
13
|
-
catch {
|
|
14
|
-
// Binary not in PATH
|
|
15
|
-
}
|
|
16
|
-
// Check for ~/.codex/ directory
|
|
17
|
-
const codexDir = join(homedir(), '.codex');
|
|
18
|
-
const hasCodexDir = existsSync(codexDir);
|
|
19
|
-
const detected = binaryPath !== undefined || hasCodexDir;
|
|
20
|
-
if (!detected) {
|
|
21
|
-
return {
|
|
22
|
-
tool: 'codex',
|
|
23
|
-
detected: false,
|
|
24
|
-
configPath,
|
|
25
|
-
existingConfig: false,
|
|
26
|
-
details: 'Codex CLI not found',
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
// Check if ~/.codex/config.json already has mcpServers.verbal
|
|
30
|
-
let existingConfig = false;
|
|
31
|
-
if (existsSync(configPath)) {
|
|
32
|
-
try {
|
|
33
|
-
const raw = readFileSync(configPath, 'utf-8');
|
|
34
|
-
const parsed = JSON.parse(raw);
|
|
35
|
-
const mcpServers = parsed['mcpServers'];
|
|
36
|
-
if (mcpServers !== null && typeof mcpServers === 'object') {
|
|
37
|
-
existingConfig = 'verbal' in mcpServers;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
// Malformed JSON — treat as no existing config
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const location = binaryPath ?? codexDir;
|
|
45
|
-
const details = `Codex CLI at ${location}`;
|
|
46
|
-
return {
|
|
47
|
-
tool: 'codex',
|
|
48
|
-
detected: true,
|
|
49
|
-
configPath,
|
|
50
|
-
existingConfig,
|
|
51
|
-
details,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
return {
|
|
56
|
-
tool: 'codex',
|
|
57
|
-
detected: false,
|
|
58
|
-
configPath,
|
|
59
|
-
existingConfig: false,
|
|
60
|
-
details: 'Codex CLI detection failed',
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=codex.js.map
|
package/dist/detect/codex.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/detect/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC;IAE5D,IAAI,CAAC;QACH,iCAAiC;QACjC,IAAI,UAA8B,CAAC;QAEn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AE,OAAO;YACb,QAAQ,EAAE,IAAI;YACd,UAAU;YACV,cAAc;YACd,OAAO;SACR,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,KAAK;YACf,UAAU;YACV,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE,4BAA4B;SACtC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/detect/cursor.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../../src/detect/cursor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAsB,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC,CAgF7D"}
|
package/dist/detect/cursor.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { homedir } from 'node:os';
|
|
3
|
-
import { join } from 'node:path';
|
|
4
|
-
import { execSync } from 'node:child_process';
|
|
5
|
-
export async function detectCursor() {
|
|
6
|
-
const configPath = join(homedir(), '.cursor', 'mcp.json');
|
|
7
|
-
try {
|
|
8
|
-
// Check for cursor binary in PATH
|
|
9
|
-
let binaryPath;
|
|
10
|
-
let version;
|
|
11
|
-
try {
|
|
12
|
-
binaryPath = execSync('which cursor', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
13
|
-
}
|
|
14
|
-
catch {
|
|
15
|
-
// Binary not in PATH
|
|
16
|
-
}
|
|
17
|
-
// Check for ~/.cursor/ directory
|
|
18
|
-
const cursorDir = join(homedir(), '.cursor');
|
|
19
|
-
const hasCursorDir = existsSync(cursorDir);
|
|
20
|
-
const detected = binaryPath !== undefined || hasCursorDir;
|
|
21
|
-
if (!detected) {
|
|
22
|
-
return {
|
|
23
|
-
tool: 'cursor',
|
|
24
|
-
detected: false,
|
|
25
|
-
configPath,
|
|
26
|
-
existingConfig: false,
|
|
27
|
-
details: 'Cursor not found',
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
// Try to get version
|
|
31
|
-
if (binaryPath) {
|
|
32
|
-
try {
|
|
33
|
-
const versionOutput = execSync('cursor --version', { encoding: 'utf-8', timeout: 5000 }).trim();
|
|
34
|
-
const match = versionOutput.match(/(\d+\.\d+\.\d+)/);
|
|
35
|
-
if (match) {
|
|
36
|
-
version = match[1];
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
// Version check failed — non-fatal
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
// Check if ~/.cursor/mcp.json already has mcpServers.verbal
|
|
44
|
-
let existingConfig = false;
|
|
45
|
-
if (existsSync(configPath)) {
|
|
46
|
-
try {
|
|
47
|
-
const raw = readFileSync(configPath, 'utf-8');
|
|
48
|
-
const parsed = JSON.parse(raw);
|
|
49
|
-
const mcpServers = parsed['mcpServers'];
|
|
50
|
-
if (mcpServers !== null && typeof mcpServers === 'object') {
|
|
51
|
-
existingConfig = 'verbal' in mcpServers;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
// Malformed JSON — treat as no existing config
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
const location = binaryPath ?? cursorDir;
|
|
59
|
-
const details = version
|
|
60
|
-
? `Cursor v${version} at ${location}`
|
|
61
|
-
: `Cursor at ${location}`;
|
|
62
|
-
return {
|
|
63
|
-
tool: 'cursor',
|
|
64
|
-
detected: true,
|
|
65
|
-
version,
|
|
66
|
-
configPath,
|
|
67
|
-
existingConfig,
|
|
68
|
-
details,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
catch {
|
|
72
|
-
return {
|
|
73
|
-
tool: 'cursor',
|
|
74
|
-
detected: false,
|
|
75
|
-
configPath,
|
|
76
|
-
existingConfig: false,
|
|
77
|
-
details: 'Cursor detection failed',
|
|
78
|
-
};
|
|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QAAQ,EAAE,KAAK;YACf,UAAU;YACV,cAAc,EAAE,KAAK;YACrB,OAAO,EAAE,yBAAyB;SACnC,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/dist/detect/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/detect/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAMnD,wBAAsB,SAAS,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAuB5D"}
|
package/dist/detect/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { detectClaudeCode } from './claude-code.js';
|
|
2
|
-
import { detectClaudeDesktop } from './claude-desktop.js';
|
|
3
|
-
import { detectCursor } from './cursor.js';
|
|
4
|
-
import { detectCodex } from './codex.js';
|
|
5
|
-
export async function detectAll() {
|
|
6
|
-
const results = await Promise.allSettled([
|
|
7
|
-
detectClaudeCode(),
|
|
8
|
-
detectClaudeDesktop(),
|
|
9
|
-
detectCursor(),
|
|
10
|
-
detectCodex(),
|
|
11
|
-
]);
|
|
12
|
-
return results.map((result, index) => {
|
|
13
|
-
if (result.status === 'fulfilled') {
|
|
14
|
-
return result.value;
|
|
15
|
-
}
|
|
16
|
-
// A detector itself threw — return a safe fallback per tool
|
|
17
|
-
const tools = ['claude-code', 'claude-desktop', 'cursor', 'codex'];
|
|
18
|
-
const tool = tools[index];
|
|
19
|
-
return {
|
|
20
|
-
tool,
|
|
21
|
-
detected: false,
|
|
22
|
-
configPath: '',
|
|
23
|
-
existingConfig: false,
|
|
24
|
-
details: `${tool} detection error: ${result.reason instanceof Error ? result.reason.message : String(result.reason)}`,
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=index.js.map
|