@cachly-dev/mcp-server 0.5.20 → 0.5.21
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/package.json +1 -1
- package/src/index.ts +27 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cachly-dev/mcp-server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"mcpName": "io.github.cachly-dev/mcp-server",
|
|
5
5
|
"description": "AI memory brain for Claude Code, Cursor, Copilot & Windsurf — persistent sessions, lessons learned, semantic search, team brain. 38 MCP tools.",
|
|
6
6
|
"type": "module",
|
package/src/index.ts
CHANGED
|
@@ -5064,7 +5064,17 @@ if (process.argv[2] === 'setup') {
|
|
|
5064
5064
|
if (token) {
|
|
5065
5065
|
console.log('✓ Using token from CACHLY_JWT env var\n');
|
|
5066
5066
|
} else {
|
|
5067
|
-
console.log('Step 1:
|
|
5067
|
+
console.log('Step 1: Opening https://cachly.dev/setup-ai in your browser...\n');
|
|
5068
|
+
// Auto-open browser so user doesn't have to manually navigate
|
|
5069
|
+
try {
|
|
5070
|
+
const { execSync } = await import('node:child_process');
|
|
5071
|
+
const openCmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
5072
|
+
execSync(`${openCmd} https://cachly.dev/setup-ai`, { stdio: 'ignore' });
|
|
5073
|
+
console.log(' ✓ Browser opened. Sign up (free, no credit card) and copy your API token.\n');
|
|
5074
|
+
} catch {
|
|
5075
|
+
console.log(' 👉 https://cachly.dev/setup-ai\n');
|
|
5076
|
+
console.log(' Sign up for free (no credit card) and copy your API token.\n');
|
|
5077
|
+
}
|
|
5068
5078
|
token = await ask(' Paste API token (cky_live_...): ');
|
|
5069
5079
|
if (!token) { console.error('\nToken is required. Aborting.\n'); rl.close(); process.exit(1); }
|
|
5070
5080
|
console.log('');
|
|
@@ -5081,14 +5091,27 @@ if (process.argv[2] === 'setup') {
|
|
|
5081
5091
|
const body = await res.json() as { data: typeof instances };
|
|
5082
5092
|
instances = (body.data ?? []).filter(i => i.status === 'running');
|
|
5083
5093
|
} catch (e) {
|
|
5084
|
-
|
|
5085
|
-
console.error(
|
|
5094
|
+
const msg = (e as Error).message;
|
|
5095
|
+
console.error(`\n\nFailed to fetch instances: ${msg}`);
|
|
5096
|
+
if (msg.includes('401')) {
|
|
5097
|
+
console.error('Token rejected. Get a valid token at https://cachly.dev/setup-ai\n');
|
|
5098
|
+
try {
|
|
5099
|
+
const { execSync } = await import('node:child_process');
|
|
5100
|
+
const openCmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
5101
|
+
execSync(`${openCmd} https://cachly.dev/setup-ai`, { stdio: 'ignore' });
|
|
5102
|
+
} catch { /* ignore */ }
|
|
5103
|
+
}
|
|
5086
5104
|
rl.close(); process.exit(1);
|
|
5087
5105
|
}
|
|
5088
5106
|
console.log(` found ${instances.length}\n`);
|
|
5089
5107
|
|
|
5090
5108
|
if (instances.length === 0) {
|
|
5091
|
-
console.error('No running instances found.
|
|
5109
|
+
console.error('No running instances found. Opening https://cachly.dev/instances to create one...\n');
|
|
5110
|
+
try {
|
|
5111
|
+
const { execSync } = await import('node:child_process');
|
|
5112
|
+
const openCmd = process.platform === 'darwin' ? 'open' : process.platform === 'win32' ? 'start' : 'xdg-open';
|
|
5113
|
+
execSync(`${openCmd} https://cachly.dev/instances`, { stdio: 'ignore' });
|
|
5114
|
+
} catch { /* ignore */ }
|
|
5092
5115
|
rl.close(); process.exit(1);
|
|
5093
5116
|
}
|
|
5094
5117
|
|