@kynver-app/mcp-agent-os 0.3.2 → 0.3.3
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/sse.d.ts +6 -1
- package/dist/sse.js +14 -4
- package/package.json +1 -1
package/dist/sse.d.ts
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
* SSE entry point for the Agentic OS MCP server.
|
|
3
3
|
*
|
|
4
4
|
* Supports two authentication modes:
|
|
5
|
-
* 1. Internal (Kynver dashboard):
|
|
5
|
+
* 1. Internal (Kynver dashboard): X-Kynver-User-Id + X-Kynver-Service-Secret
|
|
6
|
+
* request headers. The legacy userId/secret query params are still
|
|
7
|
+
* accepted as a deprecated transitional fallback so an older web-tier
|
|
8
|
+
* build keeps working during a rolling deploy — remove once all callers
|
|
9
|
+
* send headers. Secrets must never travel in the query string in steady
|
|
10
|
+
* state (they leak via access logs, proxies, and referrers).
|
|
6
11
|
* 2. External (Claude Code, Cursor, any MCP client): Kynver API key via
|
|
7
12
|
* query param (?apiKey=…) or Authorization header
|
|
8
13
|
*
|
package/dist/sse.js
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
* SSE entry point for the Agentic OS MCP server.
|
|
3
3
|
*
|
|
4
4
|
* Supports two authentication modes:
|
|
5
|
-
* 1. Internal (Kynver dashboard):
|
|
5
|
+
* 1. Internal (Kynver dashboard): X-Kynver-User-Id + X-Kynver-Service-Secret
|
|
6
|
+
* request headers. The legacy userId/secret query params are still
|
|
7
|
+
* accepted as a deprecated transitional fallback so an older web-tier
|
|
8
|
+
* build keeps working during a rolling deploy — remove once all callers
|
|
9
|
+
* send headers. Secrets must never travel in the query string in steady
|
|
10
|
+
* state (they leak via access logs, proxies, and referrers).
|
|
6
11
|
* 2. External (Claude Code, Cursor, any MCP client): Kynver API key via
|
|
7
12
|
* query param (?apiKey=…) or Authorization header
|
|
8
13
|
*
|
|
@@ -66,9 +71,14 @@ const httpServer = createServer(async (req, res) => {
|
|
|
66
71
|
const path = url.pathname;
|
|
67
72
|
// ── SSE connection ──────────────────────────────────────────────────
|
|
68
73
|
if (req.method === "GET" && path === "/sse") {
|
|
69
|
-
// Internal auth: Kynver
|
|
70
|
-
|
|
71
|
-
const
|
|
74
|
+
// Internal auth: Kynver web tier passes userId + service secret as headers.
|
|
75
|
+
// Query params are a deprecated transitional fallback (see file header).
|
|
76
|
+
const headerValue = (name) => {
|
|
77
|
+
const v = req.headers[name];
|
|
78
|
+
return typeof v === "string" ? v : Array.isArray(v) ? (v[0] ?? null) : null;
|
|
79
|
+
};
|
|
80
|
+
const internalUserId = headerValue("x-kynver-user-id") ?? url.searchParams.get("userId");
|
|
81
|
+
const internalSecret = headerValue("x-kynver-service-secret") ?? url.searchParams.get("secret");
|
|
72
82
|
// External auth: API key via query param or Authorization header
|
|
73
83
|
const apiKey = url.searchParams.get("apiKey") ??
|
|
74
84
|
req.headers.authorization?.replace("Bearer ", "") ??
|
package/package.json
CHANGED