@openparachute/vault 0.5.0 → 0.5.1-rc.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.ts +9 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openparachute/vault",
3
- "version": "0.5.0",
3
+ "version": "0.5.1-rc.1",
4
4
  "description": "Agent-native knowledge graph. Notes, tags, links over MCP.",
5
5
  "module": "src/cli.ts",
6
6
  "type": "module",
package/src/server.ts CHANGED
@@ -347,6 +347,15 @@ const server = Bun.serve({
347
347
  "Access-Control-Allow-Origin": "*",
348
348
  "Access-Control-Allow-Methods": "GET, POST, PUT, PATCH, DELETE, OPTIONS",
349
349
  "Access-Control-Allow-Headers": "Content-Type, Authorization, X-API-Key, Mcp-Session-Id",
350
+ // Expose response headers a BROWSER-based MCP client (e.g. claude.ai) must
351
+ // read cross-origin: `WWW-Authenticate` carries the RFC 9728 auth challenge
352
+ // (the `resource_metadata` PRM URL) the client follows to discover the auth
353
+ // server — without exposing it, the browser's fetch() can't see it and the
354
+ // OAuth flow never starts ("Couldn't register with the sign-in service").
355
+ // `Mcp-Session-Id` is the streamable-HTTP MCP session the client echoes
356
+ // back. (Claude Code is a CLI → no CORS → unaffected. The hub already
357
+ // exposes WWW-Authenticate; this matches it on the resource server.)
358
+ "Access-Control-Expose-Headers": "WWW-Authenticate, Mcp-Session-Id",
350
359
  };
351
360
 
352
361
  if (req.method === "OPTIONS") {