@productbrain/mcp 0.0.1-beta.12159 → 0.0.1-beta.12166

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.
@@ -40,7 +40,7 @@ import {
40
40
  runWithToolContext,
41
41
  setSessionOriented,
42
42
  startAgentSession
43
- } from "./chunk-X3F2D6NI.js";
43
+ } from "./chunk-5EQTZBFI.js";
44
44
 
45
45
  // src/server.ts
46
46
  import { McpServer as McpServer2 } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -11912,4 +11912,4 @@ export {
11912
11912
  SERVER_VERSION,
11913
11913
  createProductBrainServer
11914
11914
  };
11915
- //# sourceMappingURL=chunk-K22LB5CH.js.map
11915
+ //# sourceMappingURL=chunk-6AIVFD6E.js.map
package/dist/cli/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // src/cli/index.ts
4
4
  var subcommand = process.argv[2];
5
5
  if (subcommand === "setup") {
6
- const { runSetup } = await import("../setup-IC6J7EMW.js");
6
+ const { runSetup } = await import("../setup-ND2PEWMT.js");
7
7
  await runSetup();
8
8
  } else {
9
9
  await import("../index.js");
package/dist/http.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  PRODUCT_NAME,
3
3
  SERVER_VERSION,
4
4
  createProductBrainServer
5
- } from "./chunk-K22LB5CH.js";
5
+ } from "./chunk-6AIVFD6E.js";
6
6
  import {
7
7
  DEFAULT_CLOUD_URL,
8
8
  PASTE_NOW,
@@ -12,9 +12,10 @@ import {
12
12
  forgetStreamLifecycle,
13
13
  getKeyState,
14
14
  hashKey,
15
+ isApiKeyShaped,
15
16
  parseFallbackUrls,
16
17
  runWithAuth
17
- } from "./chunk-X3F2D6NI.js";
18
+ } from "./chunk-5EQTZBFI.js";
18
19
 
19
20
  // src/http.ts
20
21
  import { createHash, randomUUID } from "crypto";
@@ -182,12 +183,12 @@ function resolveBearerAuth(authorizationHeader) {
182
183
  return rejected(authorizationHeader.trim());
183
184
  }
184
185
  const token = authorizationHeader.slice(7).trim();
185
- if (!token.startsWith("pb_sk_")) return rejected(token);
186
+ if (!isApiKeyShaped(token)) return rejected(token);
186
187
  return { status: "ok", apiKey: token, credentialId: hashKey(token) };
187
188
  }
188
189
  function resolvePastedKey(apiKey) {
189
190
  if (apiKey === "") return { status: "absent" };
190
- if (!apiKey.startsWith("pb_sk_")) return rejected(apiKey);
191
+ if (!isApiKeyShaped(apiKey)) return rejected(apiKey);
191
192
  return { status: "ok", apiKey, credentialId: hashKey(apiKey) };
192
193
  }
193
194
  function isCrossSiteFormPost(origin, secFetchSite, ownOrigin) {