@aaa-sentinel/mcp-server 0.24.0 → 0.25.0

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/cli.js +13 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6029,9 +6029,20 @@ async function requestToken(config2) {
6029
6029
  await sleepImpl(delay);
6030
6030
  continue;
6031
6031
  }
6032
- throw new ApiError(response.status, `Could not obtain an access token (HTTP ${response.status})`);
6032
+ const code = await errorCode(response);
6033
+ const why = code ? TOKEN_REFUSALS[code] : void 0;
6034
+ throw new ApiError(response.status, `Could not obtain an access token (HTTP ${response.status}${code ? ` ${code}` : ""})${why ? `: ${why}` : ""}`);
6033
6035
  }
6034
6036
  }
6037
+ var TOKEN_REFUSALS = {
6038
+ APP_OWNER_NOT_MEMBER: "the person who created this app is no longer a member of the organization. An administrator can reassign the app to another member in Developers > Apps.",
6039
+ APP_OWNER_NOT_ACTIVE: "the access of the person who created this app is suspended. An administrator can reactivate it or reassign the app in Developers > Apps.",
6040
+ OWNER_CHECK_UNAVAILABLE: "the server could not check the person who created this app. Try again in a few minutes."
6041
+ };
6042
+ async function errorCode(response) {
6043
+ const body = await response.json().catch(() => null);
6044
+ return typeof body?.code === "string" && /^[A-Z][A-Z0-9_]{0,63}$/.test(body.code) ? body.code : null;
6045
+ }
6035
6046
  async function getToken(config2) {
6036
6047
  if (cachedToken && cachedToken.expiresAt - TOKEN_REFRESH_MARGIN_MS > Date.now()) return cachedToken.value;
6037
6048
  inflightToken ??= requestToken(config2).finally(() => {
@@ -6908,7 +6919,7 @@ function findTool(name) {
6908
6919
 
6909
6920
  // src/protocol.ts
6910
6921
  var SERVER_NAME = "aaa-sentinel-mcp";
6911
- var SERVER_VERSION = "0.24.0";
6922
+ var SERVER_VERSION = "0.25.0";
6912
6923
  var SUPPORTED_PROTOCOL_VERSIONS = ["2025-06-18", "2025-03-26", "2024-11-05"];
6913
6924
  var PARSE_ERROR = -32700;
6914
6925
  var INVALID_REQUEST = -32600;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaa-sentinel/mcp-server",
3
- "version": "0.24.0",
3
+ "version": "0.25.0",
4
4
  "description": "Read-only MCP server for AAA Sentinel: query cloud costs, savings, security posture, AI spend, uptime monitoring, the remediation agent and managed clients from an AI assistant",
5
5
  "license": "MIT",
6
6
  "type": "module",