@salesforce/sfdx-agent-harness-mastra 0.91.0 → 0.93.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 +14 -0
- package/dist/mastra-harness.d.ts +17 -0
- package/dist/mastra-harness.js +17 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
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.93.0] - 2026-09-29
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
- **agent-sdk,harness-mastra,harness-claude,harness-openai**: project next-turn context occupancy @W-24236168@ ([#849](https://github.com/forcedotcom/agentic-dx/pull/849))
|
|
10
|
+
|
|
11
|
+
### Chores
|
|
12
|
+
- **deps**: bump @anthropic-ai/sdk from 0.126.0 to 0.127.0 ([#847](https://github.com/forcedotcom/agentic-dx/pull/847))
|
|
13
|
+
- **deps-dev**: bump eslint from 10.10.0 to 10.11.0 in the eslint group ([#844](https://github.com/forcedotcom/agentic-dx/pull/844))
|
|
14
|
+
|
|
15
|
+
## [0.92.0] - 2026-09-25
|
|
16
|
+
|
|
17
|
+
### Fixes
|
|
18
|
+
- pick up undici fix + resolve build-order bug @W-24278120@ ([#841](https://github.com/forcedotcom/agentic-dx/pull/841))
|
|
19
|
+
|
|
6
20
|
## [0.91.0] - 2026-09-24
|
|
7
21
|
|
|
8
22
|
### Features
|
package/dist/mastra-harness.d.ts
CHANGED
|
@@ -259,6 +259,23 @@ export declare class MastraHarness implements MastraAgentHarness {
|
|
|
259
259
|
private readonly storageRootFolder;
|
|
260
260
|
readonly harnessId = "mastra";
|
|
261
261
|
readonly protocolVersion = 1;
|
|
262
|
+
/**
|
|
263
|
+
* `true` = "when a `reasoningTokens` count is reported, it is already inside
|
|
264
|
+
* `outputTokens`", so the SDK's forward-looking `projectedContextTokens`
|
|
265
|
+
* subtracts `reasoningTokens` from `outputTokens` to get the visible answer
|
|
266
|
+
* appended to the next prompt. Correct on both Mastra provider paths for two
|
|
267
|
+
* different reasons: OpenAI Responses (`mapOpenAIUsage`) reports reasoning
|
|
268
|
+
* INSIDE `output_tokens`, so the subtraction yields visible text; Bedrock-
|
|
269
|
+
* Anthropic (`mapAnthropicUsage`) reports NO reasoning tokens at all
|
|
270
|
+
* (`outputTokens.reasoning = undefined` → SDK `reasoningTokens: undefined`),
|
|
271
|
+
* so the subtraction is vacuous (`− (undefined ?? 0)`) — harmless, NOT
|
|
272
|
+
* "reasoning folded into output". This single boolean's correctness on the
|
|
273
|
+
* Anthropic path depends on `mapAnthropicUsage` continuing to report no
|
|
274
|
+
* reasoning; if that changes to report reasoning OUTSIDE `output_tokens`, this
|
|
275
|
+
* flag must become per-reading/per-provider. See
|
|
276
|
+
* {@link AgentHarness.outputTokensIncludeReasoning} (W-24236168).
|
|
277
|
+
*/
|
|
278
|
+
readonly outputTokensIncludeReasoning = true;
|
|
262
279
|
/**
|
|
263
280
|
* Registry of agentId → Mastra state. Holds per-agent MCPClient instances
|
|
264
281
|
* so each agent has isolated server connections; sharing across agents
|
package/dist/mastra-harness.js
CHANGED
|
@@ -417,6 +417,23 @@ export class MastraHarness {
|
|
|
417
417
|
storageRootFolder;
|
|
418
418
|
harnessId = 'mastra';
|
|
419
419
|
protocolVersion = 1;
|
|
420
|
+
/**
|
|
421
|
+
* `true` = "when a `reasoningTokens` count is reported, it is already inside
|
|
422
|
+
* `outputTokens`", so the SDK's forward-looking `projectedContextTokens`
|
|
423
|
+
* subtracts `reasoningTokens` from `outputTokens` to get the visible answer
|
|
424
|
+
* appended to the next prompt. Correct on both Mastra provider paths for two
|
|
425
|
+
* different reasons: OpenAI Responses (`mapOpenAIUsage`) reports reasoning
|
|
426
|
+
* INSIDE `output_tokens`, so the subtraction yields visible text; Bedrock-
|
|
427
|
+
* Anthropic (`mapAnthropicUsage`) reports NO reasoning tokens at all
|
|
428
|
+
* (`outputTokens.reasoning = undefined` → SDK `reasoningTokens: undefined`),
|
|
429
|
+
* so the subtraction is vacuous (`− (undefined ?? 0)`) — harmless, NOT
|
|
430
|
+
* "reasoning folded into output". This single boolean's correctness on the
|
|
431
|
+
* Anthropic path depends on `mapAnthropicUsage` continuing to report no
|
|
432
|
+
* reasoning; if that changes to report reasoning OUTSIDE `output_tokens`, this
|
|
433
|
+
* flag must become per-reading/per-provider. See
|
|
434
|
+
* {@link AgentHarness.outputTokensIncludeReasoning} (W-24236168).
|
|
435
|
+
*/
|
|
436
|
+
outputTokensIncludeReasoning = true;
|
|
420
437
|
/**
|
|
421
438
|
* Registry of agentId → Mastra state. Holds per-agent MCPClient instances
|
|
422
439
|
* so each agent has isolated server connections; sharing across agents
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sfdx-agent-harness-mastra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"description": "Mastra-backed AgentHarness implementation for @salesforce/sfdx-agent-sdk",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,27 +31,27 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@ai-sdk/provider": "4.0.14",
|
|
33
33
|
"@anthropic-ai/bedrock-sdk": "^0.33.6",
|
|
34
|
-
"@anthropic-ai/sdk": "^0.
|
|
34
|
+
"@anthropic-ai/sdk": "^0.127.0",
|
|
35
35
|
"@mastra/core": "^1.67.0",
|
|
36
36
|
"@mastra/libsql": "^1.23.0",
|
|
37
37
|
"@mastra/mcp": "^1.18.0",
|
|
38
38
|
"@mastra/memory": "^1.30.0",
|
|
39
39
|
"@mastra/schema-compat": "^1.3.10",
|
|
40
|
-
"@salesforce/agentic-common": "0.
|
|
40
|
+
"@salesforce/agentic-common": "0.22.0",
|
|
41
41
|
"@smithy/eventstream-codec": "^4.5.2",
|
|
42
|
-
"openai": "^7.
|
|
42
|
+
"openai": "^7.23.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@salesforce/sfdx-agent-sdk": "0.
|
|
45
|
+
"@salesforce/sfdx-agent-sdk": "0.94.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.
|
|
50
|
+
"@salesforce/sfdx-agent-sdk": "0.94.0",
|
|
51
51
|
"@types/node": "^22.20.1",
|
|
52
52
|
"@vitest/coverage-istanbul": "^5.0.1",
|
|
53
53
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
54
|
-
"eslint": "^10.
|
|
54
|
+
"eslint": "^10.11.0",
|
|
55
55
|
"eslint-config-prettier": "^10.1.8",
|
|
56
56
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
57
57
|
"eslint-plugin-import": "^2.32.0",
|