@salesforce/sfdx-agent-sdk 0.29.0 → 0.31.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,21 @@
|
|
|
3
3
|
All notable changes to `@salesforce/sfdx-agent-sdk` are documented in this file.
|
|
4
4
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
5
5
|
|
|
6
|
+
## [0.31.0] - 2026-07-07
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
- **agent-sdk**: registry-driven model-connectivity smoke @W-23292476@ ([#641](https://github.com/forcedotcom/agentic-dx/pull/641))
|
|
10
|
+
|
|
11
|
+
### Fixes
|
|
12
|
+
- **harness-mastra**: getMessages() round-trips the tool-call part @W-23351939 ([#648](https://github.com/forcedotcom/agentic-dx/pull/648))
|
|
13
|
+
|
|
14
|
+
### Chores
|
|
15
|
+
- **deps-dev**: bump the dev-dependencies group with 3 updates ([#642](https://github.com/forcedotcom/agentic-dx/pull/642))
|
|
16
|
+
|
|
17
|
+
## [0.30.0] - 2026-07-03
|
|
18
|
+
|
|
19
|
+
_No changes — released alongside dependent packages._
|
|
20
|
+
|
|
6
21
|
## [0.29.0] - 2026-07-02
|
|
7
22
|
|
|
8
23
|
### Features
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Model } from './models/index.js';
|
|
2
2
|
import { type JSONWebToken, type OrgConnection, type OrgConnectionFactory } from '@salesforce/agentic-common';
|
|
3
3
|
import type { AgentConfig } from './harness/harness-config.js';
|
|
4
|
-
import type { ModelConnectivityInfo } from './types/model-connectivity-info.js';
|
|
4
|
+
import type { ModelConnectivityInfo, ProviderHint } from './types/model-connectivity-info.js';
|
|
5
5
|
/**
|
|
6
6
|
* The result of resolving an agent's connectivity.
|
|
7
7
|
*
|
|
@@ -82,6 +82,27 @@ export declare class DefaultAgentConnectivityResolver implements AgentConnectivi
|
|
|
82
82
|
*/
|
|
83
83
|
resolve(projectRoot: string, config: AgentConfig): Promise<ResolvedConnectivity>;
|
|
84
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Maps a Salesforce gateway-routed {@link Model} to the wire shape the harness will
|
|
87
|
+
* speak. Anthropic models go to the `/invoke-with-response-stream` (Bedrock-Anthropic)
|
|
88
|
+
* pass-through endpoint; OpenAI models go to the `/responses` (OpenAI Responses)
|
|
89
|
+
* pass-through endpoint. Throws for any model whose family cannot be inferred from
|
|
90
|
+
* its `name` — a programming error worth surfacing eagerly rather than silently
|
|
91
|
+
* defaulting.
|
|
92
|
+
*
|
|
93
|
+
* **Scope:** This helper is for the Salesforce gateway path only — both
|
|
94
|
+
* `llmgateway__BedrockAnthropic*` and `llmgateway__Anthropic*` prefixes go to the
|
|
95
|
+
* gateway's Bedrock pass-through, so both collapse to `'bedrock-anthropic'`. A
|
|
96
|
+
* consumer wanting direct-Anthropic auth (`providerHint: 'anthropic'`) drives that
|
|
97
|
+
* path through {@link ApiKeyConnectivityResolver} with an explicit `providerHint`
|
|
98
|
+
* argument, not through this resolver.
|
|
99
|
+
*
|
|
100
|
+
* Exported (module-path only, not on the public `index.ts` surface) so e2e test
|
|
101
|
+
* resolvers reuse the same prefix→hint mapping rather than re-deriving it — a
|
|
102
|
+
* divergent hand-rolled ternary in `test/e2e/e2e-setup.ts` misrouted the
|
|
103
|
+
* `sfdc_ai__Default*` geo ids to `bedrock-anthropic` (W-23292476).
|
|
104
|
+
*/
|
|
105
|
+
export declare function pickProviderHintForGatewayModel(model: Model): ProviderHint;
|
|
85
106
|
/**
|
|
86
107
|
* Resolves an `AgentConfig.modelId` value (which may be a {@link ModelName} enum value, a
|
|
87
108
|
* pre-built {@link Model} instance, or `undefined`) to a concrete {@link Model}.
|
|
@@ -69,8 +69,13 @@ export class DefaultAgentConnectivityResolver {
|
|
|
69
69
|
* consumer wanting direct-Anthropic auth (`providerHint: 'anthropic'`) drives that
|
|
70
70
|
* path through {@link ApiKeyConnectivityResolver} with an explicit `providerHint`
|
|
71
71
|
* argument, not through this resolver.
|
|
72
|
+
*
|
|
73
|
+
* Exported (module-path only, not on the public `index.ts` surface) so e2e test
|
|
74
|
+
* resolvers reuse the same prefix→hint mapping rather than re-deriving it — a
|
|
75
|
+
* divergent hand-rolled ternary in `test/e2e/e2e-setup.ts` misrouted the
|
|
76
|
+
* `sfdc_ai__Default*` geo ids to `bedrock-anthropic` (W-23292476).
|
|
72
77
|
*/
|
|
73
|
-
function pickProviderHintForGatewayModel(model) {
|
|
78
|
+
export function pickProviderHintForGatewayModel(model) {
|
|
74
79
|
const name = model.name;
|
|
75
80
|
if (name.startsWith('llmgateway__BedrockAnthropic') || name.startsWith('llmgateway__Anthropic')) {
|
|
76
81
|
return 'bedrock-anthropic';
|
|
@@ -406,6 +406,17 @@ export interface AgentHarness {
|
|
|
406
406
|
* MUST populate `Message.createdAt` on every returned message. MUST return
|
|
407
407
|
* messages sorted ascending by `createdAt`.
|
|
408
408
|
*
|
|
409
|
+
* **Tool calls MUST round-trip both halves.** For every completed tool
|
|
410
|
+
* invocation the returned history MUST contain BOTH a `tool-call`
|
|
411
|
+
* {@link MessagePart} (carrying the model's `toolName` + `args`) AND a
|
|
412
|
+
* `tool-result` part (carrying the outcome). The two share a `toolCallId`.
|
|
413
|
+
* A harness that collapses a completed call to only its `tool-result` makes
|
|
414
|
+
* history harness-dependent — the model's original call (name + args) is
|
|
415
|
+
* lost on read — which breaks any consumer that renders, replays, or audits
|
|
416
|
+
* tool activity from history (e.g. an AG-UI `MESSAGES_SNAPSHOT`). This is a
|
|
417
|
+
* cross-harness contract; the Claude harness, which stores the call and
|
|
418
|
+
* result as distinct blocks, is the reference behavior (#647).
|
|
419
|
+
*
|
|
409
420
|
* @param agentId - ID of the agent.
|
|
410
421
|
* @param threadId - ID of the conversation thread.
|
|
411
422
|
* @returns All messages in chronological order (ascending by `createdAt`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sfdx-agent-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Harness-agnostic agentic infrastructure for Salesforce developer experience tooling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"test:e2e": "tsc --build ./test/tsconfig.json && vitest run -c ./test/e2e/vitest.config.ts",
|
|
30
30
|
"test:e2e:local": "node scripts/local-e2e.mjs",
|
|
31
31
|
"test:e2e:local:cleanup": "node scripts/local-e2e-cleanup.mjs",
|
|
32
|
+
"test:smoke": "tsc --build ./test/tsconfig.json && vitest run -c ./test/smoke/vitest.config.ts",
|
|
33
|
+
"test:smoke:local": "node scripts/local-smoke.mjs",
|
|
32
34
|
"verify": "tsx scripts/verify.ts"
|
|
33
35
|
},
|
|
34
36
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -44,8 +46,8 @@
|
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
48
|
"@eslint/js": "^10.0.1",
|
|
47
|
-
"@salesforce/sfdx-agent-harness-claude": "0.
|
|
48
|
-
"@salesforce/sfdx-agent-harness-mastra": "0.
|
|
49
|
+
"@salesforce/sfdx-agent-harness-claude": "0.27.0",
|
|
50
|
+
"@salesforce/sfdx-agent-harness-mastra": "0.30.0",
|
|
49
51
|
"@types/node": "^22.20.0",
|
|
50
52
|
"@vitest/coverage-istanbul": "^4.1.8",
|
|
51
53
|
"@vitest/eslint-plugin": "^1.6.20",
|
|
@@ -56,11 +58,11 @@
|
|
|
56
58
|
"eslint-plugin-n": "^18.2.1",
|
|
57
59
|
"globals": "^17.6.0",
|
|
58
60
|
"lint-staged": "^17.0.7",
|
|
59
|
-
"prettier": "^3.9.
|
|
61
|
+
"prettier": "^3.9.4",
|
|
60
62
|
"rimraf": "^6.1.3",
|
|
61
|
-
"tsx": "^4.
|
|
63
|
+
"tsx": "^4.23.0",
|
|
62
64
|
"typescript": "^6.0.3",
|
|
63
|
-
"typescript-eslint": "^8.
|
|
65
|
+
"typescript-eslint": "^8.62.1",
|
|
64
66
|
"vitest": "^4.1.8"
|
|
65
67
|
},
|
|
66
68
|
"engines": {
|