@memoraone/mcp 0.1.56 → 0.1.57

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/cli.cjs CHANGED
@@ -231,7 +231,7 @@ var require_package = __commonJS({
231
231
  "package.json"(exports2, module2) {
232
232
  module2.exports = {
233
233
  name: "@memoraone/mcp",
234
- version: "0.1.56",
234
+ version: "0.1.57",
235
235
  type: "module",
236
236
  main: "dist/index.cjs",
237
237
  exports: {
package/dist/gateway.cjs CHANGED
@@ -11218,8 +11218,9 @@ function delay(ms) {
11218
11218
  return new Promise((resolve47) => setTimeout(resolve47, ms));
11219
11219
  }
11220
11220
  function buildProtectedResourceMetadata(env2 = process.env, workspaceRoot) {
11221
+ const externalIssuer = Boolean(env2.MEMORAONE_OAUTH_ISSUER_URL?.trim());
11221
11222
  return {
11222
- resource: workspaceRoot === void 0 ? getGatewayResourceBaseUrl(env2) : buildGatewayMcpUrl(workspaceRoot, env2),
11223
+ resource: workspaceRoot === void 0 || externalIssuer ? getGatewayResourceBaseUrl(env2) : buildGatewayMcpUrl(workspaceRoot, env2),
11223
11224
  authorization_servers: [getGatewayAuthorizationServerIssuerUrl(env2)]
11224
11225
  };
11225
11226
  }
@@ -11350,17 +11351,17 @@ var GatewayOAuthSurface = class {
11350
11351
  */
11351
11352
  async handleProtectedResourceMetadata(res, url) {
11352
11353
  const wsOrError = getGatewayWsQueryParam(url);
11353
- if (wsOrError !== null && typeof wsOrError === "object" && wsOrError.ok === false) {
11354
+ if (wsOrError === null) {
11355
+ json(res, 200, buildProtectedResourceMetadata(this.env));
11356
+ return;
11357
+ }
11358
+ if (typeof wsOrError !== "string") {
11354
11359
  json(res, 404, {
11355
11360
  error: "invalid_request",
11356
11361
  error_description: "resource workspace is invalid"
11357
11362
  });
11358
11363
  return;
11359
11364
  }
11360
- if (wsOrError === null) {
11361
- json(res, 200, buildProtectedResourceMetadata(this.env));
11362
- return;
11363
- }
11364
11365
  const parsed2 = await parseGatewayWorkspaceRoot(wsOrError);
11365
11366
  if (!parsed2.ok) {
11366
11367
  json(res, 404, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memoraone/mcp",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "exports": {