@salesforce/sfdx-agent-sdk 0.11.0 → 0.12.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.
@@ -3,7 +3,11 @@
3
3
  * See LICENSE.txt for license terms.
4
4
  */
5
5
  import { DefaultLLMGatewayClientFactory, Models, createJWTFromConnection, } from '@salesforce/llm-gateway-sdk';
6
- import { RealOrgConnectionFactory } from '@salesforce/agentic-common';
6
+ import { SfApiEnv, RealOrgConnectionFactory, } from '@salesforce/agentic-common';
7
+ // TODO(@W-22782317): Temporary workaround — only on prod orgs the LLM Gateway must
8
+ // route requests through AgentforceVibes rather than the default VibesService. Remove once a
9
+ // long-term feature ID configuration strategy is in place.
10
+ const PROD_ORG_FEATURE_ID = 'AgentforceVibes';
7
11
  /**
8
12
  * Default implementation of {@link AgentConnectivityResolver}.
9
13
  *
@@ -37,8 +41,11 @@ export class DefaultAgentConnectivityResolver {
37
41
  const orgConnection = config.orgAlias !== undefined
38
42
  ? await this.connectionFactory.createFromOrgAliasOrUsername(config.orgAlias)
39
43
  : await this.connectionFactory.createFromTargetOrg({ projectRoot });
40
- const orgJwt = await createJWTFromConnection(orgConnection);
41
- const llmGatewayClient = this.gatewayClientFactory.create(orgJwt, { env: orgConnection.getInferredSfApiEnv() });
44
+ // TODO(@W-22782317): Temporary workaround
45
+ const env = orgConnection.getInferredSfApiEnv();
46
+ const featureId = env === SfApiEnv.Prod ? PROD_ORG_FEATURE_ID : undefined;
47
+ const orgJwt = await createJWTFromConnection(orgConnection, { featureId });
48
+ const llmGatewayClient = this.gatewayClientFactory.create(orgJwt, { env });
42
49
  const modelName = config.modelId ?? Models.getDefault().name;
43
50
  llmGatewayClient.setModel(Models.getByName(modelName));
44
51
  return { llmGatewayClient, orgConnection, orgJwt };
@@ -32,7 +32,7 @@ export type MCPStdioServerConfig = {
32
32
  env?: Record<string, string>;
33
33
  /** Whether this server is enabled. Defaults to `true`. */
34
34
  enabled?: boolean;
35
- /** Timeout in milliseconds for connecting to the server. */
35
+ /** Timeout in milliseconds for individual requests to the server. */
36
36
  timeout?: number;
37
37
  };
38
38
  /** MCP server accessible over HTTP/SSE at a remote URL. */
@@ -44,7 +44,7 @@ export type MCPRemoteServerConfig = {
44
44
  headers?: Record<string, string>;
45
45
  /** Whether this server is enabled. Defaults to `true`. */
46
46
  enabled?: boolean;
47
- /** Timeout in milliseconds for connecting to the server. */
47
+ /** Timeout in milliseconds for individual requests to the server. */
48
48
  timeout?: number;
49
49
  };
50
50
  /** Connection status of a single MCP server. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sfdx-agent-sdk",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Harness-agnostic agentic infrastructure for Salesforce developer experience tooling",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,8 +40,8 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/js": "^10.0.1",
43
- "@salesforce/sfdx-agent-harness-claude": "0.7.0",
44
- "@salesforce/sfdx-agent-harness-mastra": "0.10.0",
43
+ "@salesforce/sfdx-agent-harness-claude": "0.8.0",
44
+ "@salesforce/sfdx-agent-harness-mastra": "0.11.0",
45
45
  "@types/node": "^22.19.17",
46
46
  "@vitest/coverage-istanbul": "^4.1.7",
47
47
  "@vitest/eslint-plugin": "^1.6.17",