@papi-ai/server 0.7.9 → 0.7.10

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/dist/index.js +7 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -22579,8 +22579,13 @@ If you already have an account, check that both **PAPI_PROJECT_ID** and **PAPI_D
22579
22579
  }
22580
22580
  if (httpToken) {
22581
22581
  const authHeader = req.headers["authorization"] ?? "";
22582
- const provided = authHeader.startsWith("Bearer ") ? authHeader.slice(7) : "";
22583
- if (provided !== httpToken) {
22582
+ const bearerMatch = authHeader.startsWith("Bearer ") ? authHeader.slice(7) : "";
22583
+ const urlMatch = req.url?.match(/^\/(mcp|sse)\/(.+)$/);
22584
+ const urlToken = urlMatch?.[2];
22585
+ if (bearerMatch === httpToken) {
22586
+ } else if (urlToken === httpToken) {
22587
+ req.url = `/${urlMatch[1]}`;
22588
+ } else {
22584
22589
  res.writeHead(401, { "Content-Type": "application/json" });
22585
22590
  res.end(JSON.stringify({ error: "Unauthorized" }));
22586
22591
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papi-ai/server",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "description": "PAPI MCP server — AI-powered sprint planning, build execution, and strategy review for software projects",
5
5
  "license": "Elastic-2.0",
6
6
  "type": "module",