@infinitedusky/indusk-mcp 1.18.0 → 1.18.1

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.
@@ -92,16 +92,28 @@ export function initEvalOtel(projectRoot) {
92
92
  if (activeProvider) {
93
93
  return trace.getTracer(TRACER_NAME);
94
94
  }
95
+ // Build exporter headers. We pass Authorization and Dash0-Dataset in the
96
+ // constructor rather than relying on OTEL_EXPORTER_OTLP_HEADERS env parsing,
97
+ // because the OTel SDK's env parser has proven unreliable for tokens with
98
+ // spaces (e.g., "Bearer auth_xxx") in practice — the header silently fails
99
+ // to attach and exports retry-loop to no effect.
100
+ //
101
+ // Precedence:
102
+ // 1. User-set `OTEL_EXPORTER_OTLP_HEADERS` env (handled by SDK, takes top precedence per OTel spec)
103
+ // 2. Explicit constructor headers below (our defaults)
104
+ //
105
+ // DASH0_API_TOKEN is the conventional name we inherit from the Dash0 CLI.
106
+ // If set, we build a Bearer header. If not, we rely on the user's env.
107
+ const headers = {
108
+ "Dash0-Dataset": dataset,
109
+ };
110
+ if (process.env.DASH0_API_TOKEN) {
111
+ headers.Authorization = `Bearer ${process.env.DASH0_API_TOKEN}`;
112
+ }
95
113
  try {
96
114
  const exporter = new OTLPTraceExporter({
97
115
  url: endpoint.endsWith("/v1/traces") ? endpoint : `${endpoint.replace(/\/$/, "")}/v1/traces`,
98
- // Route agent spans to the Dash0 dataset named `dataset`. Default
99
- // is "agent". Env-set headers (OTEL_EXPORTER_OTLP_HEADERS) take
100
- // precedence — per the OTel SDK contract — so a user-provided
101
- // Dash0-Dataset in env overrides this default.
102
- headers: {
103
- "Dash0-Dataset": dataset,
104
- },
116
+ headers,
105
117
  });
106
118
  const provider = new NodeTracerProvider({
107
119
  resource: resourceFromAttributes({
@@ -10,8 +10,8 @@ import { spawn } from "node:child_process";
10
10
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
11
11
  import { dirname, join } from "node:path";
12
12
  import { getProjectGroupId } from "../config.js";
13
- import { ingestScorecard } from "./findings.js";
14
13
  import { readUnprocessedHighlights } from "../highlights/highlights.js";
14
+ import { ingestScorecard } from "./findings.js";
15
15
  import { EvalLogWriter } from "./log-writer.js";
16
16
  import { initEvalOtel, shutdownEvalOtel, withSpan } from "./otel.js";
17
17
  import { buildEvaluatorPrompt } from "./prompt-builder.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinitedusky/indusk-mcp",
3
- "version": "1.18.0",
3
+ "version": "1.18.1",
4
4
  "description": "InDusk development system — skills, MCP tools, and CLI for structured AI-assisted development",
5
5
  "type": "module",
6
6
  "files": [