cohvu 0.1.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/auth.d.ts +4 -0
- package/dist/auth.js +123 -0
- package/dist/auth.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +61 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/dist/auth.d.ts
ADDED
package/dist/auth.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Device auth flow + token storage for the Cohvu CLI.
|
|
3
|
+
// Stores tokens in ~/.cohvu/tokens.json.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.getAuthToken = getAuthToken;
|
|
6
|
+
const fs_1 = require("fs");
|
|
7
|
+
const os_1 = require("os");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const child_process_1 = require("child_process");
|
|
10
|
+
const CONFIG_DIR = (0, path_1.join)((0, os_1.homedir)(), ".cohvu");
|
|
11
|
+
const TOKENS_FILE = (0, path_1.join)(CONFIG_DIR, "tokens.json");
|
|
12
|
+
const POLL_INTERVAL_MS = 5000;
|
|
13
|
+
function ensureConfigDir() {
|
|
14
|
+
if (!(0, fs_1.existsSync)(CONFIG_DIR)) {
|
|
15
|
+
(0, fs_1.mkdirSync)(CONFIG_DIR, { recursive: true });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function loadStoredTokens() {
|
|
19
|
+
if (!(0, fs_1.existsSync)(TOKENS_FILE))
|
|
20
|
+
return null;
|
|
21
|
+
try {
|
|
22
|
+
return JSON.parse((0, fs_1.readFileSync)(TOKENS_FILE, "utf-8"));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function storeTokens(tokens) {
|
|
29
|
+
ensureConfigDir();
|
|
30
|
+
(0, fs_1.writeFileSync)(TOKENS_FILE, JSON.stringify(tokens, null, 2));
|
|
31
|
+
}
|
|
32
|
+
function openBrowser(url) {
|
|
33
|
+
const cmd = process.platform === "darwin"
|
|
34
|
+
? "open"
|
|
35
|
+
: process.platform === "win32"
|
|
36
|
+
? "start"
|
|
37
|
+
: "xdg-open";
|
|
38
|
+
(0, child_process_1.exec)(`${cmd} "${url}"`);
|
|
39
|
+
}
|
|
40
|
+
function isExpired(expiresAt) {
|
|
41
|
+
return new Date(expiresAt) < new Date();
|
|
42
|
+
}
|
|
43
|
+
async function refreshAccessToken(baseUrl, refreshToken) {
|
|
44
|
+
const res = await fetch(`${baseUrl}/v1/auth/refresh`, {
|
|
45
|
+
method: "POST",
|
|
46
|
+
headers: { "Content-Type": "application/json" },
|
|
47
|
+
body: JSON.stringify({ refresh_token: refreshToken }),
|
|
48
|
+
});
|
|
49
|
+
if (!res.ok)
|
|
50
|
+
return null;
|
|
51
|
+
const data = (await res.json());
|
|
52
|
+
const tokens = {
|
|
53
|
+
access_token: data.tokens.access_token,
|
|
54
|
+
refresh_token: data.tokens.refresh_token,
|
|
55
|
+
expires_at: data.tokens.expires_at,
|
|
56
|
+
base_url: baseUrl,
|
|
57
|
+
};
|
|
58
|
+
storeTokens(tokens);
|
|
59
|
+
return tokens;
|
|
60
|
+
}
|
|
61
|
+
async function deviceAuthFlow(baseUrl) {
|
|
62
|
+
// Request device code
|
|
63
|
+
const deviceRes = await fetch(`${baseUrl}/v1/auth/device`, {
|
|
64
|
+
method: "POST",
|
|
65
|
+
headers: { "Content-Type": "application/json" },
|
|
66
|
+
});
|
|
67
|
+
if (!deviceRes.ok) {
|
|
68
|
+
throw new Error(`Device auth request failed: ${deviceRes.status}`);
|
|
69
|
+
}
|
|
70
|
+
const deviceData = (await deviceRes.json());
|
|
71
|
+
// Tell the user and open browser
|
|
72
|
+
process.stderr.write(`\nSign in to Cohvu: ${deviceData.verification_url}\n` +
|
|
73
|
+
`Code: ${deviceData.user_code}\n\n` +
|
|
74
|
+
`Opening browser...\n\n`);
|
|
75
|
+
openBrowser(deviceData.verification_url);
|
|
76
|
+
// Poll for token
|
|
77
|
+
const deadline = Date.now() + deviceData.expires_in * 1000;
|
|
78
|
+
while (Date.now() < deadline) {
|
|
79
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_INTERVAL_MS));
|
|
80
|
+
const tokenRes = await fetch(`${baseUrl}/v1/auth/device/token`, {
|
|
81
|
+
method: "POST",
|
|
82
|
+
headers: { "Content-Type": "application/json" },
|
|
83
|
+
body: JSON.stringify({ device_code: deviceData.device_code }),
|
|
84
|
+
});
|
|
85
|
+
if (!tokenRes.ok) {
|
|
86
|
+
const body = (await tokenRes.json());
|
|
87
|
+
if (body.error === "authorization_pending")
|
|
88
|
+
continue;
|
|
89
|
+
if (body.error === "expired_token")
|
|
90
|
+
throw new Error("Device code expired");
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const tokenData = (await tokenRes.json());
|
|
94
|
+
const tokens = {
|
|
95
|
+
access_token: tokenData.access_token,
|
|
96
|
+
refresh_token: tokenData.refresh_token,
|
|
97
|
+
expires_at: tokenData.expires_at,
|
|
98
|
+
base_url: baseUrl,
|
|
99
|
+
};
|
|
100
|
+
storeTokens(tokens);
|
|
101
|
+
process.stderr.write("Authenticated.\n\n");
|
|
102
|
+
return tokens;
|
|
103
|
+
}
|
|
104
|
+
throw new Error("Device auth timed out");
|
|
105
|
+
}
|
|
106
|
+
async function getAuthToken(baseUrl) {
|
|
107
|
+
// Try stored tokens
|
|
108
|
+
const stored = loadStoredTokens();
|
|
109
|
+
if (stored && stored.base_url === baseUrl) {
|
|
110
|
+
if (!isExpired(stored.expires_at)) {
|
|
111
|
+
return { accessToken: stored.access_token, baseUrl: stored.base_url };
|
|
112
|
+
}
|
|
113
|
+
// Try refresh
|
|
114
|
+
const refreshed = await refreshAccessToken(baseUrl, stored.refresh_token);
|
|
115
|
+
if (refreshed) {
|
|
116
|
+
return { accessToken: refreshed.access_token, baseUrl: refreshed.base_url };
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Full device auth flow
|
|
120
|
+
const tokens = await deviceAuthFlow(baseUrl);
|
|
121
|
+
return { accessToken: tokens.access_token, baseUrl: tokens.base_url };
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,yCAAyC;;AA+IzC,oCAqBC;AAlKD,2BAAwE;AACxE,2BAA6B;AAC7B,+BAA4B;AAC5B,iDAAqC;AAErC,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,QAAQ,CAAC,CAAC;AAC7C,MAAM,WAAW,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AACpD,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAS9B,SAAS,eAAe;IACtB,IAAI,CAAC,IAAA,eAAU,EAAC,UAAU,CAAC,EAAE,CAAC;QAC5B,IAAA,cAAS,EAAC,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB;IACvB,IAAI,CAAC,IAAA,eAAU,EAAC,WAAW,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,WAAW,EAAE,OAAO,CAAC,CAAiB,CAAC;IACxE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,MAAoB;IACvC,eAAe,EAAE,CAAC;IAClB,IAAA,kBAAa,EAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC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,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;AACxE,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// Cohvu CLI — lightweight MCP proxy.
|
|
4
|
+
// Handles auth via device flow, then bridges stdio to the remote MCP server.
|
|
5
|
+
//
|
|
6
|
+
// Usage: npx cohvu
|
|
7
|
+
// Config:
|
|
8
|
+
// { "mcpServers": { "cohvu": { "command": "npx", "args": ["cohvu"] } } }
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
11
|
+
const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/client/streamableHttp.js");
|
|
12
|
+
const auth_1 = require("./auth");
|
|
13
|
+
const DEFAULT_BASE_URL = "https://api.cohvu.com";
|
|
14
|
+
async function main() {
|
|
15
|
+
const baseUrl = process.env.COHVU_API_URL ?? DEFAULT_BASE_URL;
|
|
16
|
+
// Authenticate (opens browser on first run)
|
|
17
|
+
const { accessToken } = await (0, auth_1.getAuthToken)(baseUrl);
|
|
18
|
+
// Create the stdio transport (accepts MCP from Claude Desktop / Cursor / etc.)
|
|
19
|
+
const stdioTransport = new stdio_js_1.StdioServerTransport();
|
|
20
|
+
// Create the HTTP transport (connects to remote Cohvu server with auth)
|
|
21
|
+
const httpTransport = new streamableHttp_js_1.StreamableHTTPClientTransport(new URL(`${baseUrl}/v1/mcp`), {
|
|
22
|
+
requestInit: {
|
|
23
|
+
headers: {
|
|
24
|
+
Authorization: `Bearer ${accessToken}`,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
// Bridge: stdio → HTTP → stdio
|
|
29
|
+
stdioTransport.onmessage = (message) => {
|
|
30
|
+
httpTransport.send(message).catch((error) => {
|
|
31
|
+
process.stderr.write(`Error forwarding to server: ${error}\n`);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
httpTransport.onmessage = (message) => {
|
|
35
|
+
stdioTransport.send(message).catch((error) => {
|
|
36
|
+
process.stderr.write(`Error forwarding to client: ${error}\n`);
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
httpTransport.onclose = () => {
|
|
40
|
+
stdioTransport.close().catch(() => { });
|
|
41
|
+
process.exit(0);
|
|
42
|
+
};
|
|
43
|
+
stdioTransport.onclose = () => {
|
|
44
|
+
httpTransport.close().catch(() => { });
|
|
45
|
+
process.exit(0);
|
|
46
|
+
};
|
|
47
|
+
httpTransport.onerror = (error) => {
|
|
48
|
+
process.stderr.write(`Remote transport error: ${error}\n`);
|
|
49
|
+
};
|
|
50
|
+
stdioTransport.onerror = (error) => {
|
|
51
|
+
process.stderr.write(`Stdio transport error: ${error}\n`);
|
|
52
|
+
};
|
|
53
|
+
// Start both transports
|
|
54
|
+
await stdioTransport.start();
|
|
55
|
+
await httpTransport.start();
|
|
56
|
+
}
|
|
57
|
+
main().catch((error) => {
|
|
58
|
+
process.stderr.write(`Cohvu CLI failed: ${error}\n`);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAEA,qCAAqC;AACrC,6EAA6E;AAC7E,EAAE;AACF,mBAAmB;AACnB,UAAU;AACV,2EAA2E;;AAE3E,wEAAiF;AACjF,0FAAmG;AACnG,iCAAsC;AAEtC,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEjD,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,gBAAgB,CAAC;IAE9D,4CAA4C;IAC5C,MAAM,EAAE,WA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AC,CAAC;IAEF,aAAa,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;QAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,KAAK,IAAI,CAAC,CAAC;IAC7D,CAAC,CAAC;IAEF,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE;QACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,KAAK,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,wBAAwB;IACxB,MAAM,cAAc,CAAC,KAAK,EAAE,CAAC;IAC7B,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC;AAC9B,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,KAAK,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cohvu",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Cohvu — connect your AI agent to a living knowledge substrate",
|
|
5
|
+
"bin": {
|
|
6
|
+
"cohvu": "./dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"typecheck": "tsc --noEmit"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20.0.0"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@modelcontextprotocol/sdk": "^1.27.1"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"typescript": "^5.9.3"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"mcp",
|
|
26
|
+
"ai",
|
|
27
|
+
"agents",
|
|
28
|
+
"knowledge"
|
|
29
|
+
],
|
|
30
|
+
"license": "MIT"
|
|
31
|
+
}
|