@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 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): userId + KYNVER_SERVICE_SECRET query params
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): userId + KYNVER_SERVICE_SECRET query params
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 dashboard passes userId + service secret
70
- const internalUserId = url.searchParams.get("userId");
71
- const internalSecret = url.searchParams.get("secret");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynver-app/mcp-agent-os",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Kynver Agentic OS MCP server — slug-keyed agent identity, goals, projects, sessions, and long-term memory",
5
5
  "type": "module",
6
6
  "bin": {