@salesforce/sfdx-agent-sdk 0.43.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,19 @@
|
|
|
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.45.0] - 2026-08-07
|
|
7
|
+
|
|
8
|
+
### Fixes
|
|
9
|
+
- **BREAKING** **agentic-common,agent-sdk**: re-resolve org auth on JWT re-mint to fix stale-access-token mid-session @W-23721341@ ([#738](https://github.com/forcedotcom/agentic-dx/pull/738))
|
|
10
|
+
|
|
11
|
+
## [0.44.0] - 2026-08-05
|
|
12
|
+
|
|
13
|
+
### Tests
|
|
14
|
+
- **agent-sdk,harness-mastra**: e2e suite health — harness matrix, per-harness default model, AWS-eventstream wire parsing @W-23716382@ ([#736](https://github.com/forcedotcom/agentic-dx/pull/736))
|
|
15
|
+
|
|
16
|
+
### Chores
|
|
17
|
+
- **deps-dev**: bump @types/node from 22.20.0 to 22.20.1 in the dev-dependencies group across 1 directory ([#735](https://github.com/forcedotcom/agentic-dx/pull/735))
|
|
18
|
+
|
|
6
19
|
## [0.43.0] - 2026-08-04
|
|
7
20
|
|
|
8
21
|
### Chores
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.txt for license terms.
|
|
4
4
|
*/
|
|
5
5
|
import { Model, ModelName, Models, createClaudeModel, LEGACY_MODEL_ID_ALIASES, } from './models/index.js';
|
|
6
|
-
import { createJWTFromConnection, RealOrgConnectionFactory, SfApiEnv, } from '@salesforce/agentic-common';
|
|
6
|
+
import { connectionProviderFor, createJWTFromConnection, RealOrgConnectionFactory, reuseThenReresolve, SfApiEnv, } from '@salesforce/agentic-common';
|
|
7
7
|
/**
|
|
8
8
|
* Default implementation of {@link AgentConnectivityResolver}.
|
|
9
9
|
*
|
|
@@ -31,11 +31,17 @@ export class DefaultAgentConnectivityResolver {
|
|
|
31
31
|
* @returns The resolved connectivity bag, org connection, and JWT.
|
|
32
32
|
*/
|
|
33
33
|
async resolve(projectRoot, config) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
// Resolve one connection eagerly for env inference and the returned bag. The JWT's
|
|
35
|
+
// re-mint path re-resolves from disk (cache-cleared) so a mid-session auth change is
|
|
36
|
+
// picked up (W-23721341) — but the INITIAL mint reuses this just-resolved connection
|
|
37
|
+
// so agent creation doesn't pay a second refreshAuth round-trip. See reuseThenReresolve.
|
|
38
|
+
const reresolve = connectionProviderFor(this.connectionFactory, {
|
|
39
|
+
orgAlias: config.orgAlias,
|
|
40
|
+
projectRoot,
|
|
41
|
+
});
|
|
42
|
+
const orgConnection = await reresolve();
|
|
37
43
|
const env = orgConnection.getInferredSfApiEnv();
|
|
38
|
-
const orgJwt = await createJWTFromConnection(orgConnection);
|
|
44
|
+
const orgJwt = await createJWTFromConnection(reuseThenReresolve(orgConnection, reresolve));
|
|
39
45
|
const model = resolveAgentConfigModel(config.modelId);
|
|
40
46
|
const modelConnectivityInfo = {
|
|
41
47
|
model,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.txt for license terms.
|
|
4
4
|
*/
|
|
5
5
|
import { Model } from './models/index.js';
|
|
6
|
-
import { createJWTFromConnection, } from '@salesforce/agentic-common';
|
|
6
|
+
import { connectionProviderFor, createJWTFromConnection, reuseThenReresolve, } from '@salesforce/agentic-common';
|
|
7
7
|
import { resolveAgentConfigModel, } from './agent-connectivity-resolver.js';
|
|
8
8
|
import { AgentSDKError, AgentSDKErrorType } from './errors.js';
|
|
9
9
|
/**
|
|
@@ -104,10 +104,15 @@ export class ApiKeyConnectivityResolver {
|
|
|
104
104
|
if (!factory) {
|
|
105
105
|
return {};
|
|
106
106
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const
|
|
107
|
+
// One eager resolve for the returned connection bag; the JWT's re-mint path
|
|
108
|
+
// re-reads the current on-disk auth (W-23721341) while its initial mint reuses this
|
|
109
|
+
// just-resolved connection (no second refreshAuth round-trip at agent-create time).
|
|
110
|
+
const reresolve = connectionProviderFor(factory, {
|
|
111
|
+
orgAlias: config.orgAlias,
|
|
112
|
+
projectRoot,
|
|
113
|
+
});
|
|
114
|
+
const orgConnection = await reresolve();
|
|
115
|
+
const orgJwt = await createJWTFromConnection(reuseThenReresolve(orgConnection, reresolve));
|
|
111
116
|
return { orgConnection, orgJwt };
|
|
112
117
|
}
|
|
113
118
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sfdx-agent-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Harness-agnostic agentic infrastructure for Salesforce developer experience tooling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"LICENSE.txt"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@salesforce/agentic-common": "0.
|
|
46
|
+
"@salesforce/agentic-common": "0.16.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@eslint/js": "^10.0.1",
|
|
50
|
-
"@salesforce/sfdx-agent-harness-claude": "0.
|
|
51
|
-
"@salesforce/sfdx-agent-harness-mastra": "0.
|
|
52
|
-
"@salesforce/sfdx-agent-harness-openai": "0.
|
|
53
|
-
"@types/node": "^22.20.
|
|
50
|
+
"@salesforce/sfdx-agent-harness-claude": "0.41.0",
|
|
51
|
+
"@salesforce/sfdx-agent-harness-mastra": "0.44.0",
|
|
52
|
+
"@salesforce/sfdx-agent-harness-openai": "0.10.0",
|
|
53
|
+
"@types/node": "^22.20.1",
|
|
54
54
|
"@vitest/coverage-istanbul": "^4.1.10",
|
|
55
55
|
"@vitest/eslint-plugin": "^1.6.26",
|
|
56
56
|
"eslint": "^10.8.0",
|