@salesforce/sfdx-agent-harness-mastra 0.44.0 → 0.45.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  All notable changes to `@salesforce/sfdx-agent-harness-mastra` are documented in this file.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## [0.45.0] - 2026-08-10
7
+
8
+ ### Fixes
9
+ - **harness-mastra**: normalize empty streamed tool-call args to "{}" @W-23789221@ ([#743](https://github.com/forcedotcom/agentic-dx/pull/743))
10
+
6
11
  ## [0.44.0] - 2026-08-07
7
12
 
8
13
  _No changes — released alongside dependent packages._
@@ -266,7 +266,17 @@ async function doStream(ctx, options) {
266
266
  type: 'tool-call',
267
267
  toolCallId: tu.id,
268
268
  toolName: tu.name,
269
- input: tu.argsBuffer,
269
+ // A no-arg tool (e.g. startBuilding) streams no
270
+ // input_json_delta events, so argsBuffer stays ''.
271
+ // '' is not a schema-conforming stringified JSON
272
+ // object — a strict consumer's JSON.parse throws and
273
+ // the model retries. Coerce the empty buffer to '{}'
274
+ // (the only valid no-arg value); non-empty buffers,
275
+ // even malformed ones, pass through verbatim so we
276
+ // never mask a genuinely bad payload. W-23789221;
277
+ // matches the non-streaming path + parseToolInput
278
+ // (same `.trim()` empty check as the latter).
279
+ input: tu.argsBuffer.trim() === '' ? '{}' : tu.argsBuffer,
270
280
  });
271
281
  toolUseByIndex.delete(event.index);
272
282
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sfdx-agent-harness-mastra",
3
- "version": "0.44.0",
3
+ "version": "0.45.0",
4
4
  "description": "Mastra-backed AgentHarness implementation for @salesforce/sfdx-agent-sdk",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -42,12 +42,12 @@
42
42
  "openai": "^7.0.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "@salesforce/sfdx-agent-sdk": "0.45.0"
45
+ "@salesforce/sfdx-agent-sdk": "0.46.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@eslint/js": "^10.0.1",
49
49
  "@salesforce/harness-conformance": "0.0.1",
50
- "@salesforce/sfdx-agent-sdk": "0.45.0",
50
+ "@salesforce/sfdx-agent-sdk": "0.46.0",
51
51
  "@types/node": "^22.20.1",
52
52
  "@vitest/coverage-istanbul": "^4.1.10",
53
53
  "@vitest/eslint-plugin": "^1.6.26",