@salesforce/sfdx-agent-sdk 0.34.0 → 0.35.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.35.0] - 2026-07-22
7
+
8
+ ### Features
9
+ - **harness-openai**: full conformance gate + e2e closeout @W-23447579@ ([#684](https://github.com/forcedotcom/agentic-dx/pull/684))
10
+ - **harness-openai**: scaffold OpenAI Agents SDK harness with connectivity + streamed turn @W-23447570@ ([#675](https://github.com/forcedotcom/agentic-dx/pull/675))
11
+
12
+ ### Fixes
13
+ - **ci**: bump openai harness off seed version so it can publish @W-23447579@ ([#686](https://github.com/forcedotcom/agentic-dx/pull/686))
14
+
15
+ ### Tests
16
+ - **agent-sdk**: add raw-gateway fetch probe to isolate SDK/harness bugs from gateway failures @W-23477193@ ([#674](https://github.com/forcedotcom/agentic-dx/pull/674))
17
+
18
+ ### Chores
19
+ - **deps-dev**: bump eslint from 10.6.0 to 10.7.0 in the eslint group ([#680](https://github.com/forcedotcom/agentic-dx/pull/680))
20
+
6
21
  ## [0.34.0] - 2026-07-15
7
22
 
8
23
  ### Features
@@ -1,5 +1,5 @@
1
1
  import { Model } from './models/index.js';
2
- import { type JSONWebToken, type OrgConnection, type OrgConnectionFactory } from '@salesforce/agentic-common';
2
+ import { type JSONWebToken, type OrgConnection, type OrgConnectionFactory, SfApiEnv } from '@salesforce/agentic-common';
3
3
  import type { AgentConfig } from './harness/harness-config.js';
4
4
  import type { ModelConnectivityInfo, ProviderHint } from './types/model-connectivity-info.js';
5
5
  /**
@@ -109,6 +109,34 @@ export declare class DefaultAgentConnectivityResolver implements AgentConnectivi
109
109
  * `sfdc_ai__Default*` geo ids to `bedrock-anthropic` (W-23292476).
110
110
  */
111
111
  export declare function pickProviderHintForGatewayModel(model: Model): ProviderHint;
112
+ /**
113
+ * Returns the Salesforce LLM Gateway base URL for the given environment.
114
+ *
115
+ * Includes the `/ai/gpt/v1` API root: the pass-through endpoints
116
+ * (`/responses` for OpenAI Responses, `/model/<id>/invoke-with-response-stream`
117
+ * for Bedrock-Anthropic) live under this prefix, and provider SDKs
118
+ * (`@anthropic-ai/bedrock-sdk`, `openai`) construct their per-model paths by
119
+ * concatenation onto the base URL the consumer supplies.
120
+ *
121
+ * Exported (module-path only, not on the public `index.ts` surface) so the
122
+ * `test/smoke/raw-gateway-probe.ts` diagnostic targets the exact same gateway
123
+ * URL production does, rather than re-stating the env→URL switch (which drifted
124
+ * before — W-23292476). Same rationale as {@link pickProviderHintForGatewayModel}.
125
+ */
126
+ export declare function salesforceGatewayBaseUrl(env: SfApiEnv): string;
127
+ /**
128
+ * Builds the full header set for a Salesforce LLM Gateway request, including the
129
+ * Authorization Bearer JWT, tenant-key, feature-id, and any model-specific custom
130
+ * headers. Re-evaluated on every harness call so JWT rotations land on the next
131
+ * request without rebuilding the bag.
132
+ *
133
+ * Exported (module-path only, not on the public `index.ts` surface) so the
134
+ * `test/smoke/raw-gateway-probe.ts` diagnostic sends the exact same header bag
135
+ * production does — the minted `Bearer <jwt>` + tenant-key + feature-id is the
136
+ * one part a hand-rolled request gets wrong, and duplicating it would let the
137
+ * probe silently drift from the real auth shape.
138
+ */
139
+ export declare function buildSalesforceGatewayHeaders(orgJwt: JSONWebToken, model: Model): Promise<Record<string, string>>;
112
140
  /**
113
141
  * Resolves an `AgentConfig.modelId` value (which may be a {@link ModelName} enum value, a
114
142
  * pre-built {@link Model} instance, or `undefined`) to a concrete {@link Model}.
@@ -106,8 +106,13 @@ export function pickProviderHintForGatewayModel(model) {
106
106
  * for Bedrock-Anthropic) live under this prefix, and provider SDKs
107
107
  * (`@anthropic-ai/bedrock-sdk`, `openai`) construct their per-model paths by
108
108
  * concatenation onto the base URL the consumer supplies.
109
+ *
110
+ * Exported (module-path only, not on the public `index.ts` surface) so the
111
+ * `test/smoke/raw-gateway-probe.ts` diagnostic targets the exact same gateway
112
+ * URL production does, rather than re-stating the env→URL switch (which drifted
113
+ * before — W-23292476). Same rationale as {@link pickProviderHintForGatewayModel}.
109
114
  */
110
- function salesforceGatewayBaseUrl(env) {
115
+ export function salesforceGatewayBaseUrl(env) {
111
116
  switch (env) {
112
117
  case SfApiEnv.Dev:
113
118
  return 'https://dev.api.salesforce.com/ai/gpt/v1';
@@ -127,8 +132,14 @@ function salesforceGatewayBaseUrl(env) {
127
132
  * Authorization Bearer JWT, tenant-key, feature-id, and any model-specific custom
128
133
  * headers. Re-evaluated on every harness call so JWT rotations land on the next
129
134
  * request without rebuilding the bag.
135
+ *
136
+ * Exported (module-path only, not on the public `index.ts` surface) so the
137
+ * `test/smoke/raw-gateway-probe.ts` diagnostic sends the exact same header bag
138
+ * production does — the minted `Bearer <jwt>` + tenant-key + feature-id is the
139
+ * one part a hand-rolled request gets wrong, and duplicating it would let the
140
+ * probe silently drift from the real auth shape.
130
141
  */
131
- async function buildSalesforceGatewayHeaders(orgJwt, model) {
142
+ export async function buildSalesforceGatewayHeaders(orgJwt, model) {
132
143
  const [jwtValue, tenantKey] = await Promise.all([orgJwt.getValue(), orgJwt.getTenantKey()]);
133
144
  // Order matters: spread `customHeaders` FIRST so the resolver-set auth /
134
145
  // tenant / feature-id headers win on conflict. `customHeaders` is for
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sfdx-agent-sdk",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "Harness-agnostic agentic infrastructure for Salesforce developer experience tooling",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -31,6 +31,7 @@
31
31
  "test:e2e:local:cleanup": "node scripts/local-e2e-cleanup.mjs",
32
32
  "test:smoke": "tsc --build ./test/tsconfig.json && vitest run -c ./test/smoke/vitest.config.ts",
33
33
  "test:smoke:local": "node scripts/local-smoke.mjs",
34
+ "test:raw-probe:local": "node scripts/local-raw-probe.mjs",
34
35
  "verify": "tsx scripts/verify.ts"
35
36
  },
36
37
  "license": "SEE LICENSE IN LICENSE.txt",
@@ -46,16 +47,17 @@
46
47
  },
47
48
  "devDependencies": {
48
49
  "@eslint/js": "^10.0.1",
49
- "@salesforce/sfdx-agent-harness-claude": "0.30.0",
50
- "@salesforce/sfdx-agent-harness-mastra": "0.33.0",
50
+ "@salesforce/sfdx-agent-harness-claude": "0.31.0",
51
+ "@salesforce/sfdx-agent-harness-mastra": "0.34.0",
52
+ "@salesforce/sfdx-agent-harness-openai": "0.0.1",
51
53
  "@types/node": "^22.20.0",
52
54
  "@vitest/coverage-istanbul": "^4.1.10",
53
- "@vitest/eslint-plugin": "^1.6.23",
55
+ "@vitest/eslint-plugin": "^1.6.22",
54
56
  "eslint": "^10.7.0",
55
57
  "eslint-config-prettier": "^10.1.8",
56
58
  "eslint-import-resolver-typescript": "^4.4.5",
57
59
  "eslint-plugin-import": "^2.32.0",
58
- "eslint-plugin-n": "^18.2.2",
60
+ "eslint-plugin-n": "^18.2.1",
59
61
  "globals": "^17.6.0",
60
62
  "lint-staged": "^17.0.7",
61
63
  "prettier": "^3.9.4",