murmur8 4.7.7 → 4.7.8

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/package.json +1 -1
  2. package/src/telemetry.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "murmur8",
3
- "version": "4.7.7",
3
+ "version": "4.7.8",
4
4
  "description": "Multi-agent workflow framework for automated feature development",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/telemetry.js CHANGED
@@ -168,7 +168,9 @@ function sendTelemetry(payload, config) {
168
168
  if (!url) return Promise.resolve();
169
169
 
170
170
  return new Promise((resolve) => {
171
- const body = JSON.stringify(payload);
171
+ // Portal expects flat fields — unwrap the { runId, run } envelope if present
172
+ const data = (payload && payload.run) ? payload.run : payload;
173
+ const body = JSON.stringify(data);
172
174
  const parsedUrl = new URL(url);
173
175
  const isHttps = parsedUrl.protocol === 'https:';
174
176
  const transport = isHttps ? require('https') : require('http');
@@ -181,7 +183,7 @@ function sendTelemetry(payload, config) {
181
183
  headers: {
182
184
  'Content-Type': 'application/json',
183
185
  'Content-Length': Buffer.byteLength(body),
184
- 'X-API-Key': key || '',
186
+ 'Authorization': `Bearer ${key || ''}`,
185
187
  },
186
188
  };
187
189