@harness-engineering/intelligence 0.2.1 → 0.2.3

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/index.js CHANGED
@@ -442,16 +442,18 @@ ${request.prompt}` : request.prompt;
442
442
  }
443
443
  try {
444
444
  const parsed = JSON.parse(stdout);
445
- const content = parsed.result ?? parsed;
445
+ const content = parsed.structured_output ?? parsed.result ?? parsed;
446
446
  resolve({
447
447
  content: typeof content === "string" ? JSON.parse(content) : content,
448
448
  usage: parsed.usage,
449
449
  model: parsed.model
450
450
  });
451
451
  } catch (err) {
452
+ const stdoutSnippet = stdout.slice(0, 500);
453
+ const stderrSnippet = stderr.slice(0, 500);
452
454
  reject(
453
455
  new Error(
454
- `Failed to parse Claude CLI output: ${err instanceof Error ? err.message : String(err)}`
456
+ `Failed to parse Claude CLI output: ${err instanceof Error ? err.message : String(err)}. stdout (first 500 chars): ${JSON.stringify(stdoutSnippet)}. stderr (first 500 chars): ${JSON.stringify(stderrSnippet)}`
455
457
  )
456
458
  );
457
459
  }
package/dist/index.mjs CHANGED
@@ -375,16 +375,18 @@ ${request.prompt}` : request.prompt;
375
375
  }
376
376
  try {
377
377
  const parsed = JSON.parse(stdout);
378
- const content = parsed.result ?? parsed;
378
+ const content = parsed.structured_output ?? parsed.result ?? parsed;
379
379
  resolve({
380
380
  content: typeof content === "string" ? JSON.parse(content) : content,
381
381
  usage: parsed.usage,
382
382
  model: parsed.model
383
383
  });
384
384
  } catch (err) {
385
+ const stdoutSnippet = stdout.slice(0, 500);
386
+ const stderrSnippet = stderr.slice(0, 500);
385
387
  reject(
386
388
  new Error(
387
- `Failed to parse Claude CLI output: ${err instanceof Error ? err.message : String(err)}`
389
+ `Failed to parse Claude CLI output: ${err instanceof Error ? err.message : String(err)}. stdout (first 500 chars): ${JSON.stringify(stdoutSnippet)}. stderr (first 500 chars): ${JSON.stringify(stderrSnippet)}`
388
390
  )
389
391
  );
390
392
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harness-engineering/intelligence",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Intelligence pipeline for spec enrichment, complexity modeling, and pre-execution simulation",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -37,11 +37,11 @@
37
37
  },
38
38
  "homepage": "https://github.com/Intense-Visions/harness-engineering/tree/main/packages/intelligence#readme",
39
39
  "dependencies": {
40
- "@anthropic-ai/sdk": "^0.91.0",
40
+ "@anthropic-ai/sdk": "^0.95.1",
41
41
  "openai": "^6.0.0",
42
42
  "zod": "^3.25.76",
43
- "@harness-engineering/graph": "0.8.0",
44
- "@harness-engineering/types": "0.11.0"
43
+ "@harness-engineering/graph": "0.9.0",
44
+ "@harness-engineering/types": "0.12.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^22.19.15",