@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.
- package/dist/cli/config.js +2 -2
- package/dist/cli/main.js +2 -0
- package/dist/mcp.js +5 -2
- package/package.json +1 -1
package/dist/cli/config.js
CHANGED
|
@@ -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
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
|
-
//
|
|
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",
|