@salesforce/sfdx-agent-sdk 0.48.0 → 0.49.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,11 @@
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.49.0] - 2026-08-14
7
+
8
+ ### Fixes
9
+ - **agent-sdk**: export ACCEPTED_MODEL_WIRE_IDS for wire-boundary modelId validation @W-23694670@ ([#752](https://github.com/forcedotcom/agentic-dx/pull/752))
10
+
6
11
  ## [0.48.0] - 2026-08-10
7
12
 
8
13
  _No changes — released alongside dependent packages._
package/README.md CHANGED
@@ -1176,6 +1176,10 @@ recognizes today, plus an escape hatch for consumers who need a Claude variant t
1176
1176
  - `Model` — abstract base class. Returned by `Models.getByName(...)` and accepted as an `AgentConfig.modelId` value.
1177
1177
  - `ModelName` — enum of in-tree model identifiers.
1178
1178
  - `Models` — registry: `Models.getByName(name)`, `Models.getDefault()`.
1179
+ - `ACCEPTED_MODEL_WIRE_IDS` — the `readonly string[]` union of canonical `ModelName` values and the legacy pinned
1180
+ `llmgateway__*` alias keys `Models.getByName(...)` remaps. Consumers that validate an inbound `modelId` (e.g. a REST
1181
+ body schema) should enumerate against this set, not `Object.values(ModelName)` alone, so a legacy id the resolver can
1182
+ heal is not rejected at the wire boundary.
1179
1183
  - `createClaudeModel(gatewayId, overrides?)` — escape-hatch factory for opting into a Bedrock-Anthropic Claude variant
1180
1184
  the SDK has not released yet (`AgentConfig.modelId` accepts the returned instance directly).
1181
1185
  - `ClaudeModelOverrides` — optional caps for `createClaudeModel`.
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export type { AgentConfig, HarnessAgentConfig, StreamOptions } from './harness/h
9
9
  export { DEFAULT_MAX_STEPS } from './harness/harness-config.js';
10
10
  export type { MCPConfiguration, MCPServerConfig, MCPStdioServerConfig, MCPRemoteServerConfig, McpServerInfo, McpServerErrorCategory, McpServerErrorDetail, McpToolInfo, McpToolAnnotations, } from './mcp-config.js';
11
11
  export { McpServerStatus, mcpServerConfigEqual } from './mcp-config.js';
12
- export { Model, ModelName, createClaudeModel, Models, validateMultimodalFiles } from './models/index.js';
12
+ export { Model, ModelName, createClaudeModel, Models, validateMultimodalFiles, ACCEPTED_MODEL_WIRE_IDS, } from './models/index.js';
13
13
  export type { ClaudeModelOverrides, MultimodalFile, SupportedFileFormat, ThinkingMode } from './models/index.js';
14
14
  export { MimeType } from './models/index.js';
15
15
  export { inferSfApiEnv, SfApiEnv } from '@salesforce/agentic-common';
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@
10
10
  export { BUILT_IN_TOOL_POLICIES, SKILL_BRIDGE_SERVER_ID, definePolicy, matcherMatches, resolveToolApprovalPolicy, } from './policy-resolver.js';
11
11
  export { DEFAULT_MAX_STEPS } from './harness/harness-config.js';
12
12
  export { McpServerStatus, mcpServerConfigEqual } from './mcp-config.js';
13
- export { Model, ModelName, createClaudeModel, Models, validateMultimodalFiles } from './models/index.js';
13
+ export { Model, ModelName, createClaudeModel, Models, validateMultimodalFiles, ACCEPTED_MODEL_WIRE_IDS, } from './models/index.js';
14
14
  export { MimeType } from './models/index.js';
15
15
  export { inferSfApiEnv, SfApiEnv } from '@salesforce/agentic-common';
16
16
  // ── Agent Layer ─────────────────────────────────────────────────────
@@ -25,6 +25,16 @@ export { createClaudeModel, type ClaudeModelOverrides } from './create-claude-mo
25
25
  * (`sfdc_ai__DefaultGPT5` etc.) are already live `ModelName` values.
26
26
  */
27
27
  export declare const LEGACY_MODEL_ID_ALIASES: Readonly<Record<string, ModelName>>;
28
+ /**
29
+ * Every model id accepted on an inbound request: the canonical {@link ModelName}
30
+ * values plus the legacy `llmgateway__*` alias keys {@link getByName} remaps.
31
+ *
32
+ * Consumers validating an inbound `modelId` should enumerate against this set, not
33
+ * `Object.values(ModelName)` alone — otherwise a legacy id is rejected at the wire
34
+ * boundary before the resolver that would heal it is reached. Deriving both this
35
+ * set and the resolver from {@link LEGACY_MODEL_ID_ALIASES} keeps them from drifting.
36
+ */
37
+ export declare const ACCEPTED_MODEL_WIRE_IDS: readonly string[];
28
38
  export declare function getDefault(): Model;
29
39
  export declare function getByName(modelName: ModelName): Model;
30
40
  export declare const Models: {
@@ -51,6 +51,19 @@ export const LEGACY_MODEL_ID_ALIASES = {
51
51
  llmgateway__BedrockAnthropicClaude47Opus: ModelName.CLAUDE_OPUS_4_7,
52
52
  llmgateway__BedrockAnthropicClaude48Opus: ModelName.CLAUDE_OPUS_4_8,
53
53
  };
54
+ /**
55
+ * Every model id accepted on an inbound request: the canonical {@link ModelName}
56
+ * values plus the legacy `llmgateway__*` alias keys {@link getByName} remaps.
57
+ *
58
+ * Consumers validating an inbound `modelId` should enumerate against this set, not
59
+ * `Object.values(ModelName)` alone — otherwise a legacy id is rejected at the wire
60
+ * boundary before the resolver that would heal it is reached. Deriving both this
61
+ * set and the resolver from {@link LEGACY_MODEL_ID_ALIASES} keeps them from drifting.
62
+ */
63
+ export const ACCEPTED_MODEL_WIRE_IDS = Object.freeze([
64
+ ...Object.values(ModelName),
65
+ ...Object.keys(LEGACY_MODEL_ID_ALIASES),
66
+ ]);
54
67
  export function getDefault() {
55
68
  return new ClaudeSonnet46();
56
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sfdx-agent-sdk",
3
- "version": "0.48.0",
3
+ "version": "0.49.0",
4
4
  "description": "Harness-agnostic agentic infrastructure for Salesforce developer experience tooling",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -47,9 +47,9 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@eslint/js": "^10.0.1",
50
- "@salesforce/sfdx-agent-harness-claude": "0.44.0",
51
- "@salesforce/sfdx-agent-harness-mastra": "0.47.0",
52
- "@salesforce/sfdx-agent-harness-openai": "0.13.0",
50
+ "@salesforce/sfdx-agent-harness-claude": "0.45.0",
51
+ "@salesforce/sfdx-agent-harness-mastra": "0.48.0",
52
+ "@salesforce/sfdx-agent-harness-openai": "0.14.0",
53
53
  "@types/node": "^22.20.1",
54
54
  "@vitest/coverage-istanbul": "^4.1.10",
55
55
  "@vitest/eslint-plugin": "^1.6.26",