@sweny-ai/core 0.1.8 → 0.1.9

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.
@@ -274,7 +274,7 @@ export function validateInputs(config) {
274
274
  break;
275
275
  case "betterstack":
276
276
  if (!config.observabilityCredentials.apiToken)
277
- errors.push("Missing: BETTERSTACK_API_TOKEN is required for betterstack provider");
277
+ errors.push("Missing: BETTERSTACK_API_TOKEN, BETTERSTACK_TELEMETRY_TOKEN, or BETTERSTACK_UPTIME_TOKEN is required for betterstack provider");
278
278
  if (!config.observabilityCredentials.sourceId && !config.observabilityCredentials.tableName)
279
279
  errors.push("Missing: either BETTERSTACK_SOURCE_ID (--betterstack-source-id) or BETTERSTACK_TABLE_NAME (--betterstack-table-name) is required for betterstack provider");
280
280
  break;
@@ -501,7 +501,7 @@ function parseObservabilityCredentials(provider, options, fileConfig = {}) {
501
501
  };
502
502
  case "betterstack":
503
503
  return {
504
- apiToken: env.BETTERSTACK_API_TOKEN || "",
504
+ apiToken: env.BETTERSTACK_API_TOKEN || env.BETTERSTACK_TELEMETRY_TOKEN || env.BETTERSTACK_UPTIME_TOKEN || "",
505
505
  sourceId: options.betterstackSourceId || env.BETTERSTACK_SOURCE_ID || f("betterstack-source-id") || "",
506
506
  tableName: options.betterstackTableName || env.BETTERSTACK_TABLE_NAME || f("betterstack-table-name") || "",
507
507
  };
package/dist/cli/main.js CHANGED
@@ -108,6 +108,8 @@ function buildCredentialMap() {
108
108
  "NR_API_KEY",
109
109
  "NR_REGION",
110
110
  "BETTERSTACK_API_TOKEN",
111
+ "BETTERSTACK_TELEMETRY_TOKEN",
112
+ "BETTERSTACK_UPTIME_TOKEN",
111
113
  "BETTERSTACK_SOURCE_ID",
112
114
  "BETTERSTACK_TABLE_NAME",
113
115
  "SLACK_BOT_TOKEN",
package/dist/mcp.js CHANGED
@@ -106,9 +106,12 @@ export function buildAutoMcpServers(config) {
106
106
  };
107
107
  }
108
108
  // Better Stack MCP — HTTP remote MCP; Bearer token auth.
109
- // Injected whenever the token is present (not just when it's the primary provider)
109
+ // BetterStack uses separate tokens for Uptime vs Telemetry APIs.
110
+ // The MCP server accepts the telemetry token for log/metric queries.
111
+ // Accept: BETTERSTACK_API_TOKEN (legacy), BETTERSTACK_TELEMETRY_TOKEN, or BETTERSTACK_UPTIME_TOKEN.
112
+ // Injected whenever any token is present (not just when it's the primary provider)
110
113
  // because BetterStack logs complement any primary observability provider.
111
- const bsApiToken = creds.BETTERSTACK_API_TOKEN;
114
+ const bsApiToken = creds.BETTERSTACK_API_TOKEN || creds.BETTERSTACK_TELEMETRY_TOKEN || creds.BETTERSTACK_UPTIME_TOKEN;
112
115
  if (bsApiToken) {
113
116
  auto["betterstack"] = {
114
117
  type: "http",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sweny-ai/core",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "sweny": "./dist/cli/main.js"