@salesforce/agents 1.6.10 → 1.7.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.
@@ -1,6 +1,7 @@
1
1
  import { Connection } from '@salesforce/core';
2
2
  import { DeployResult } from '@salesforce/source-deploy-retrieve';
3
- import { AvailableDefinition, AgentTestConfig, AiEvaluationDefinition, TestSpec } from './types.js';
3
+ import { AvailableDefinition, AgentTestConfig, AiEvaluationDefinition, AiTestingDefinition, TestSpec, NgtTestSpec } from './types.js';
4
+ import { TestRunnerType } from './utils';
4
5
  /**
5
6
  * Events emitted during agent test creation for consumers to listen to and keep track of progress.
6
7
  */
@@ -49,25 +50,32 @@ export declare class AgentTest {
49
50
  */
50
51
  static list(connection: Connection): Promise<AvailableDefinition[]>;
51
52
  /**
52
- * Creates and deploys an AiEvaluationDefinition from a specification file.
53
+ * Creates and deploys a test definition from a specification file.
54
+ *
55
+ * Two metadata types are supported, selected via `options.testRunner`:
56
+ * `'testing-center'` (default) — legacy `AiEvaluationDefinition`. Filename `<apiName>.aiEvaluationDefinition-meta.xml`.
57
+ * `'agentforce-studio'` — new `AiTestingDefinition` (NGT). Filename `<apiName>.aiTestingDefinition-meta.xml`.
58
+ * Requires Metadata API v66.0 or later on the target org; the server gates this and the lib does not preflight.
53
59
  *
54
60
  * @param connection - Connection to the org where the agent test will be created.
55
- * @param apiName - The API name of the AiEvaluationDefinition to create
56
- * @param specFilePath - The path to the specification file to create the definition from
57
- * @param options - Configuration options for creating the definition
58
- * @param options.outputDir - The directory where the AiEvaluationDefinition file will be written
59
- * @param options.preview - If true, writes the AiEvaluationDefinition file to <api-name>-preview-<timestamp>.xml in the current working directory and does not deploy it
61
+ * @param apiName - The API name of the test definition to create.
62
+ * @param specFilePath - The path to the YAML specification file.
63
+ * @param options - Configuration options for creating the definition.
64
+ * @param options.outputDir - The directory where the metadata file will be written.
65
+ * @param options.preview - If true, writes the metadata file to `<apiName>-preview-<timestamp>.xml` in the current working directory and does not deploy.
66
+ * @param options.testRunner - Which test runner to author for. Defaults to `'testing-center'`.
60
67
  *
61
68
  * @returns Promise containing:
62
- * - path: The filesystem path to the created AiEvaluationDefinition file
63
- * - contents: The AiEvaluationDefinition contents as a string
64
- * - deployResult: The deployment result (if not in preview mode)
69
+ * - path: The filesystem path to the created metadata file.
70
+ * - contents: The metadata XML as a string.
71
+ * - deployResult: The deployment result (if not in preview mode).
65
72
  *
66
- * @throws {SfError} When deployment fails
73
+ * @throws {SfError} When validation or deployment fails.
67
74
  */
68
75
  static create(connection: Connection, apiName: string, specFilePath: string, options: {
69
76
  outputDir: string;
70
77
  preview?: boolean;
78
+ testRunner?: TestRunnerType;
71
79
  }): Promise<{
72
80
  path: string;
73
81
  contents: string;
@@ -112,3 +120,24 @@ export declare class AgentTest {
112
120
  */
113
121
  writeMetadata(outputFile: string): Promise<void>;
114
122
  }
123
+ /**
124
+ * Validate an NGT test spec before conversion.
125
+ *
126
+ * Throws on the first failure encountered so authors get one clear actionable
127
+ * error at a time. Emits a Lifecycle warning (does not throw) for unknown
128
+ * scorer names — Core's MD validator catches those at deploy time.
129
+ */
130
+ export declare const validateNgtSpec: (spec: NgtTestSpec, ctx: {
131
+ isMultiAgent: boolean;
132
+ }) => void;
133
+ /**
134
+ * Convert a validated `NgtTestSpec` to the `AiTestingDefinition` shape ready for XML serialization.
135
+ *
136
+ * Multi-input fan-out: when a test case has N inputs, emit N `<testCase>` elements sharing the
137
+ * same scorer set. The `<number>` field increments globally across the whole document.
138
+ *
139
+ * Must be called after `validateNgtSpec`.
140
+ */
141
+ export declare const convertToTestingMetadata: (spec: NgtTestSpec) => AiTestingDefinition;
142
+ /** Serialize an `AiTestingDefinition` to source-format XML. Mirrors `buildMetadataXml`. */
143
+ export declare const buildTestingMetadataXml: (data: AiTestingDefinition) => string;
package/lib/agentTest.js CHANGED
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.AgentTest = exports.AgentTestCreateLifecycleStages = void 0;
18
+ exports.buildTestingMetadataXml = exports.convertToTestingMetadata = exports.validateNgtSpec = exports.AgentTest = exports.AgentTestCreateLifecycleStages = void 0;
19
19
  const promises_1 = require("node:fs/promises");
20
20
  const node_path_1 = require("node:path");
21
21
  const core_1 = require("@salesforce/core");
@@ -23,9 +23,10 @@ const kit_1 = require("@salesforce/kit");
23
23
  const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
24
24
  const yaml_1 = require("yaml");
25
25
  const fast_xml_parser_1 = require("fast-xml-parser");
26
+ const ngtScorerCatalog_1 = require("./ngtScorerCatalog");
26
27
  const utils_1 = require("./utils");
27
28
  ;
28
- const messages = new core_1.Messages('@salesforce/agents', 'agentTest', new Map([["invalidAgentTestConfig", "Must provide one of: [ name, mdPath, specPath, specData ] when instantiating an AgentTest."], ["missingConnection", "Must provide an org connection to get agent test data based on an AiEvaluationDefinition API name."], ["missingTestSpecData", "The agent test is missing the required data to provide a test spec."]]));
29
+ const messages = new core_1.Messages('@salesforce/agents', 'agentTest', new Map([["invalidAgentTestConfig", "Must provide one of: [ name, mdPath, specPath, specData ] when instantiating an AgentTest."], ["missingConnection", "Must provide an org connection to get agent test data based on an AiEvaluationDefinition API name."], ["missingTestSpecData", "The agent test is missing the required data to provide a test spec."], ["ngtMissingTestCases", "NGT test spec must define at least one test case under `testCases:`."], ["ngtTestCaseMissingInputs", "NGT test case %s must define at least one entry under `inputs:`."], ["ngtTestCaseMissingScorers", "NGT test case %s must define at least one scorer under `scorers:`."], ["ngtScorerMissingExpected", "NGT scorer '%s' on test case %s requires an `expected:` value."], ["ngtTaskResolutionRequiresConversationHistory", "NGT scorer 'task_resolution' on test case %s requires conversationHistory on at least one input."], ["ngtMultiAgentMissingHandoff", "Test case %s targets a multi-agent subject and must include an `agent_handoff_match` scorer with an `expected:` value."], ["ngtConversationHistoryIndexAllOrNothing", "NGT conversationHistory on test case %s, input %s mixes turns with and without `index:`. Either set `index:` on every turn or none."], ["ngtLooksLikeLegacySpec", "This YAML looks like a legacy AiEvaluationDefinition spec (uses top-level `utterance:` / `expectedTopic:` / `customEvaluations:`). Use `--test-runner testing-center` for legacy authoring, or hand-edit the deployed XML for `<scorer scorerType=\"Custom\">` blocks on NGT."]]));
29
30
  /**
30
31
  * Events emitted during agent test creation for consumers to listen to and keep track of progress.
31
32
  */
@@ -89,34 +90,56 @@ class AgentTest {
89
90
  return [...evalDefs, ...testingDefs];
90
91
  }
91
92
  /**
92
- * Creates and deploys an AiEvaluationDefinition from a specification file.
93
+ * Creates and deploys a test definition from a specification file.
94
+ *
95
+ * Two metadata types are supported, selected via `options.testRunner`:
96
+ * `'testing-center'` (default) — legacy `AiEvaluationDefinition`. Filename `<apiName>.aiEvaluationDefinition-meta.xml`.
97
+ * `'agentforce-studio'` — new `AiTestingDefinition` (NGT). Filename `<apiName>.aiTestingDefinition-meta.xml`.
98
+ * Requires Metadata API v66.0 or later on the target org; the server gates this and the lib does not preflight.
93
99
  *
94
100
  * @param connection - Connection to the org where the agent test will be created.
95
- * @param apiName - The API name of the AiEvaluationDefinition to create
96
- * @param specFilePath - The path to the specification file to create the definition from
97
- * @param options - Configuration options for creating the definition
98
- * @param options.outputDir - The directory where the AiEvaluationDefinition file will be written
99
- * @param options.preview - If true, writes the AiEvaluationDefinition file to <api-name>-preview-<timestamp>.xml in the current working directory and does not deploy it
101
+ * @param apiName - The API name of the test definition to create.
102
+ * @param specFilePath - The path to the YAML specification file.
103
+ * @param options - Configuration options for creating the definition.
104
+ * @param options.outputDir - The directory where the metadata file will be written.
105
+ * @param options.preview - If true, writes the metadata file to `<apiName>-preview-<timestamp>.xml` in the current working directory and does not deploy.
106
+ * @param options.testRunner - Which test runner to author for. Defaults to `'testing-center'`.
100
107
  *
101
108
  * @returns Promise containing:
102
- * - path: The filesystem path to the created AiEvaluationDefinition file
103
- * - contents: The AiEvaluationDefinition contents as a string
104
- * - deployResult: The deployment result (if not in preview mode)
109
+ * - path: The filesystem path to the created metadata file.
110
+ * - contents: The metadata XML as a string.
111
+ * - deployResult: The deployment result (if not in preview mode).
105
112
  *
106
- * @throws {SfError} When deployment fails
113
+ * @throws {SfError} When validation or deployment fails.
107
114
  */
108
115
  static async create(connection, apiName, specFilePath, options) {
109
- const agentTestSpec = (0, yaml_1.parse)(await (0, promises_1.readFile)(specFilePath, 'utf-8'));
110
116
  const lifecycle = core_1.Lifecycle.getInstance();
111
- await lifecycle.emit(exports.AgentTestCreateLifecycleStages.CreatingLocalMetadata, {});
112
117
  const preview = options.preview ?? false;
113
- // outputDir is overridden if preview is true
118
+ const testRunner = options.testRunner ?? 'testing-center';
114
119
  const outputDir = preview ? process.cwd() : options.outputDir;
115
- const filename = preview
116
- ? `${apiName}-preview-${new Date().toISOString()}.xml`
117
- : `${apiName}.aiEvaluationDefinition-meta.xml`;
118
- const definitionPath = (0, node_path_1.join)(outputDir, (0, utils_1.sanitizeFilename)(filename));
119
- const xml = buildMetadataXml(convertToMetadata(agentTestSpec));
120
+ const rawSpec = await (0, promises_1.readFile)(specFilePath, 'utf-8');
121
+ let xml;
122
+ let definitionPath;
123
+ if (testRunner === 'agentforce-studio') {
124
+ const ngtSpec = (0, yaml_1.parse)(rawSpec);
125
+ const isMultiAgent = await fetchIsMultiAgent(connection, ngtSpec.subjectName);
126
+ (0, exports.validateNgtSpec)(ngtSpec, { isMultiAgent });
127
+ await lifecycle.emit(exports.AgentTestCreateLifecycleStages.CreatingLocalMetadata, {});
128
+ const filename = preview
129
+ ? `${apiName}-preview-${new Date().toISOString()}.xml`
130
+ : `${apiName}.aiTestingDefinition-meta.xml`;
131
+ definitionPath = (0, node_path_1.join)(outputDir, (0, utils_1.sanitizeFilename)(filename));
132
+ xml = (0, exports.buildTestingMetadataXml)((0, exports.convertToTestingMetadata)(ngtSpec));
133
+ }
134
+ else {
135
+ const agentTestSpec = (0, yaml_1.parse)(rawSpec);
136
+ await lifecycle.emit(exports.AgentTestCreateLifecycleStages.CreatingLocalMetadata, {});
137
+ const filename = preview
138
+ ? `${apiName}-preview-${new Date().toISOString()}.xml`
139
+ : `${apiName}.aiEvaluationDefinition-meta.xml`;
140
+ definitionPath = (0, node_path_1.join)(outputDir, (0, utils_1.sanitizeFilename)(filename));
141
+ xml = buildMetadataXml(convertToMetadata(agentTestSpec));
142
+ }
120
143
  await (0, promises_1.mkdir)(outputDir, { recursive: true });
121
144
  await (0, promises_1.writeFile)(definitionPath, xml);
122
145
  if (preview) {
@@ -378,4 +401,146 @@ const buildMetadataXml = (data) => {
378
401
  const xml = builder.build(aiEvalXml);
379
402
  return `<?xml version="1.0" encoding="UTF-8"?>\n${xml}`;
380
403
  };
404
+ /**
405
+ * Validate an NGT test spec before conversion.
406
+ *
407
+ * Throws on the first failure encountered so authors get one clear actionable
408
+ * error at a time. Emits a Lifecycle warning (does not throw) for unknown
409
+ * scorer names — Core's MD validator catches those at deploy time.
410
+ */
411
+ const validateNgtSpec = (spec, ctx) => {
412
+ if (!spec.testCases || spec.testCases.length === 0) {
413
+ throw ngtError('ngtMissingTestCases');
414
+ }
415
+ spec.testCases.forEach((testCase, tcIdx) => {
416
+ if (!testCase.inputs || testCase.inputs.length === 0) {
417
+ throw ngtError('ngtTestCaseMissingInputs', [tcIdx + 1]);
418
+ }
419
+ if (!testCase.scorers || testCase.scorers.length === 0) {
420
+ throw ngtError('ngtTestCaseMissingScorers', [tcIdx + 1]);
421
+ }
422
+ testCase.scorers.forEach((scorer) => {
423
+ if (!(0, ngtScorerCatalog_1.isNgtScorerName)(scorer.name)) {
424
+ const unknownName = String(scorer.name);
425
+ void core_1.Lifecycle.getInstance().emitWarning(`Unknown NGT scorer name '${unknownName}'. The deploy will be validated by the server.`);
426
+ return;
427
+ }
428
+ const entry = ngtScorerCatalog_1.NgtScorerCatalog[scorer.name];
429
+ if (entry.needsExpected && (scorer.expected === undefined || scorer.expected === '')) {
430
+ throw ngtError('ngtScorerMissingExpected', [scorer.name, tcIdx + 1]);
431
+ }
432
+ });
433
+ const hasTaskResolution = testCase.scorers.some((s) => s.name === 'task_resolution');
434
+ if (hasTaskResolution) {
435
+ const anyHistory = testCase.inputs.some((input) => Array.isArray(input.conversationHistory) && input.conversationHistory.length > 0);
436
+ if (!anyHistory) {
437
+ throw ngtError('ngtTaskResolutionRequiresConversationHistory', [tcIdx + 1]);
438
+ }
439
+ }
440
+ if (ctx.isMultiAgent) {
441
+ const hasHandoff = testCase.scorers.some((s) => s.name === 'agent_handoff_match' && s.expected !== undefined && s.expected !== '');
442
+ if (!hasHandoff) {
443
+ throw ngtError('ngtMultiAgentMissingHandoff', [tcIdx + 1]);
444
+ }
445
+ }
446
+ testCase.inputs.forEach((input, inputIdx) => {
447
+ const turns = input.conversationHistory;
448
+ if (!turns || turns.length === 0)
449
+ return;
450
+ const withIndex = turns.filter((t) => t.index !== undefined).length;
451
+ if (withIndex !== 0 && withIndex !== turns.length) {
452
+ throw ngtError('ngtConversationHistoryIndexAllOrNothing', [tcIdx + 1, inputIdx + 1]);
453
+ }
454
+ });
455
+ });
456
+ };
457
+ exports.validateNgtSpec = validateNgtSpec;
458
+ const ngtError = (key, tokens = []) => {
459
+ const message = messages.getMessage(key, tokens);
460
+ return new core_1.SfError(message, key);
461
+ };
462
+ /** Reads `BotDefinition.IsMultiAgent` for the named subject. Conservative default `false` on read failure. */
463
+ const fetchIsMultiAgent = async (connection, subjectName) => {
464
+ try {
465
+ // @ts-expect-error jsForce types don't model BotDefinition
466
+ const data = (await connection.metadata.read('BotDefinition', subjectName));
467
+ return Boolean(data?.IsMultiAgent);
468
+ }
469
+ catch {
470
+ return false;
471
+ }
472
+ };
473
+ /**
474
+ * Convert a validated `NgtTestSpec` to the `AiTestingDefinition` shape ready for XML serialization.
475
+ *
476
+ * Multi-input fan-out: when a test case has N inputs, emit N `<testCase>` elements sharing the
477
+ * same scorer set. The `<number>` field increments globally across the whole document.
478
+ *
479
+ * Must be called after `validateNgtSpec`.
480
+ */
481
+ const convertToTestingMetadata = (spec) => {
482
+ const testCases = [];
483
+ let counter = 1;
484
+ for (const tc of spec.testCases) {
485
+ const sharedScorers = tc.scorers.map(toScorerXml);
486
+ for (const input of tc.inputs) {
487
+ testCases.push({
488
+ number: counter++,
489
+ inputs: toInputsXml(input),
490
+ scorer: sharedScorers,
491
+ });
492
+ }
493
+ }
494
+ return {
495
+ ...(spec.description && { description: spec.description }),
496
+ name: spec.name,
497
+ subjectName: spec.subjectName,
498
+ subjectType: spec.subjectType,
499
+ ...(spec.subjectVersion && { subjectVersion: spec.subjectVersion }),
500
+ testCase: testCases,
501
+ };
502
+ };
503
+ exports.convertToTestingMetadata = convertToTestingMetadata;
504
+ const toScorerXml = (scorer) => {
505
+ const name = scorer.name;
506
+ // Quality scorers (needsExpected:false) and unknown names omit expectedValue.
507
+ const known = (0, ngtScorerCatalog_1.isNgtScorerName)(name) ? ngtScorerCatalog_1.NgtScorerCatalog[name] : undefined;
508
+ const includeExpected = scorer.expected !== undefined && (known?.needsExpected ?? true);
509
+ return includeExpected ? { name, expectedValue: scorer.expected } : { name };
510
+ };
511
+ const toInputsXml = (input) => {
512
+ const inputs = {
513
+ utterance: input.utterance,
514
+ };
515
+ if (input.contextVariables && input.contextVariables.length > 0) {
516
+ inputs.contextVariable = input.contextVariables.map((cv) => ({
517
+ variableName: cv.name,
518
+ variableValue: cv.value,
519
+ }));
520
+ }
521
+ if (input.conversationHistory && input.conversationHistory.length > 0) {
522
+ inputs.conversationHistory = input.conversationHistory.map((turn, i) => turn.role === 'agent'
523
+ ? { role: turn.role, message: turn.message, topic: turn.topic, index: turn.index ?? i }
524
+ : { role: turn.role, message: turn.message, index: turn.index ?? i });
525
+ }
526
+ return inputs;
527
+ };
528
+ /** Serialize an `AiTestingDefinition` to source-format XML. Mirrors `buildMetadataXml`. */
529
+ const buildTestingMetadataXml = (data) => {
530
+ const wrapped = {
531
+ AiTestingDefinition: {
532
+ $xmlns: 'http://soap.sforce.com/2006/04/metadata',
533
+ ...data,
534
+ },
535
+ };
536
+ const builder = new fast_xml_parser_1.XMLBuilder({
537
+ format: true,
538
+ attributeNamePrefix: '$',
539
+ indentBy: ' ',
540
+ ignoreAttributes: false,
541
+ });
542
+ const xml = builder.build(wrapped);
543
+ return `<?xml version="1.0" encoding="UTF-8"?>\n${xml}`;
544
+ };
545
+ exports.buildTestingMetadataXml = buildTestingMetadataXml;
381
546
  //# sourceMappingURL=agentTest.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentTest.js","sourceRoot":"","sources":["../src/agentTest.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAA8D;AAC9D,yCAA0C;AAC1C,2CAA4E;AAC5E,yCAAwD;AACxD,+EAAsG;AACtG,+BAAwC;AACxC,qDAAwD;AAQxD,mCAAmD;;AAGnD,MAAM,QAAQ,OAAG,eAAQ,CAAc,oBAAoB,EAAE,WAAW,mWAAC,CAAC;AAE1E;;GAEG;AACU,QAAA,8BAA8B,GAAG;IAC5C,qBAAqB,EAAE,yBAAyB;IAChD,OAAO,EAAE,gCAAgC;IACzC,iBAAiB,EAAE,oBAAoB;IACvC,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,SAAS;IAcO;IAbnB,QAAQ,CAAY;IACpB,IAAI,CAA0B;IAEtC;;;;;;;;;OASG;IACH,YAA2B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAChD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAEpD,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC/C,MAAM,QAAQ,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC;QACvD,CAAC;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC3B,CAAC;IACH,C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AAyC;YACjD,GAAG,IAAI;SACR;KACF,CAAC;IAEF,MAAM,OAAO,GAAG,IAAI,4BAAU,CAAC;QAC7B,MAAM,EAAE,IAAI;QACZ,mBAAmB,EAAE,GAAG;QACxB,QAAQ,EAAE,MAAM;QAChB,gBAAgB,EAAE,KAAK;KACxB,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,2CAA2C,GAAG,EAAE,CAAC;AAC1D,CAAC,CAAC;AAjBW,QAAA,uBAAuB,2BAiBlC"}
package/lib/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- export { type BaseAgentConfig, type AgentPreviewStartResponse, type AgentPreviewSendResponse, type AgentPreviewEndResponse, type EndReason, type ApiStatus, type AgentJson, type AgentCompilationSuccess, type AgentScriptContent, type AgentCreateConfig, type AgentCreateResponse, type AgentJobSpec, type AgentJobSpecCreateConfig, type AgentOptions, type AgentTone, type AgentType, type BotMetadata, type BotVersionMetadata, type PreviewableAgent, type CompilationError, type DraftAgentTopics, type DraftAgentTopicsBody, type DraftAgentTopicsResponse, type AvailableDefinition, type AgentPreviewMessageLinks, type AgentPreviewMessage, type AgentPreviewError, AgentSource, type ScriptAgentType, type ProductionAgentType, type AgentTestResultsResponse, type AgentTestStartResponse, type AgentTestStatusResponse, type TestCaseResult, type TestStatus, type AgentTestConfig, type TestCase, type TestSpec, type MetadataMetric, type MetadataExpectation, type MetadataCustomEvaluation, type AiEvaluationDefinition, type AgentforceStudioTestStartResponse, type AgentforceStudioTestStatusResponse, type AgentforceStudioTestResultsResponse, type TestScorerResult, type AgentforceStudioTestCaseResult, type AgentTraceResponse, type AgentTraceStep, type PlannerResponse, type PlanStep, type UserInputStep, type LLMExecutionStep, type UpdateTopicStep, type EventStep, type FunctionStep, type ReasoningStep, type PlannerResponseStep, COMPILATION_API_EXIT_CODES, } from './types';
1
+ export { type BaseAgentConfig, type AgentPreviewStartResponse, type AgentPreviewSendResponse, type AgentPreviewEndResponse, type EndReason, type ApiStatus, type AgentJson, type AgentCompilationSuccess, type AgentScriptContent, type AgentCreateConfig, type AgentCreateResponse, type AgentJobSpec, type AgentJobSpecCreateConfig, type AgentOptions, type AgentTone, type AgentType, type BotMetadata, type BotVersionMetadata, type PreviewableAgent, type CompilationError, type DraftAgentTopics, type DraftAgentTopicsBody, type DraftAgentTopicsResponse, type AvailableDefinition, type AgentPreviewMessageLinks, type AgentPreviewMessage, type AgentPreviewError, AgentSource, type ScriptAgentType, type ProductionAgentType, type AgentTestResultsResponse, type AgentTestStartResponse, type AgentTestStatusResponse, type TestCaseResult, type TestStatus, type AgentTestConfig, type TestCase, type TestSpec, type MetadataMetric, type MetadataExpectation, type MetadataCustomEvaluation, type AiEvaluationDefinition, type NgtTestSpec, type NgtTestCase, type NgtTestCaseInput, type NgtTestCaseScorer, type NgtContextVar, type NgtConversationTurn, type AiTestingDefinition, type AiTestCase, type AiTestCaseInputXml, type AiTestCaseScorer, type AiConversationTurnXml, type AgentforceStudioTestStartResponse, type AgentforceStudioTestStatusResponse, type AgentforceStudioTestResultsResponse, type TestScorerResult, type AgentforceStudioTestCaseResult, type AgentTraceResponse, type AgentTraceStep, type PlannerResponse, type PlanStep, type UserInputStep, type LLMExecutionStep, type UpdateTopicStep, type EventStep, type FunctionStep, type ReasoningStep, type PlannerResponseStep, COMPILATION_API_EXIT_CODES, } from './types';
2
2
  export { metric, findAuthoringBundle, readTranscriptEntries, determineTestRunner, detectTestRunnerFromId, type TestRunnerType, createPreviewSessionCache, validatePreviewSession, removePreviewSessionCache, getCachedPreviewSessionIds, getCurrentPreviewSessionId, listCachedPreviewSessions, listSessionTraces, readSessionTrace, readTurnIndex, type TraceFileInfo, type TurnIndex, type TurnIndexEntry, type SessionType, type PreviewSessionMeta, type CachedPreviewSessionInfo, type CachedPreviewSessionEntry, } from './utils';
3
3
  export { Agent, AgentCreateLifecycleStages, type AgentInstance } from './agent';
4
4
  export { AgentTester } from './agentTester';
5
5
  export { AgentforceStudioTester, normalizeAgentforceStudioResults } from './agentforceStudioTester';
6
6
  export { createAgentTester, type CreateAgentTesterOptions, type CreateAgentTesterResult } from './agentTesterFactory';
7
+ export { type NgtScorerName, type KnownNgtScorerName, type NgtScorerGrade, type NgtScorerEntry, NgtScorerCatalog, isNgtScorerName, } from './ngtScorerCatalog';
7
8
  export { AgentTest, AgentTestCreateLifecycleStages } from './agentTest';
8
9
  export { ProductionAgent } from './agents/productionAgent';
9
10
  export { ScriptAgent } from './agents/scriptAgent';
package/lib/index.js CHANGED
@@ -15,7 +15,8 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.buildResultSummary = exports.executeBatches = exports.resolveAgent = exports.translateTestCase = exports.translateTestSpec = exports.parseTestSpec = exports.isYamlTestSpec = exports.formatResults = exports.splitIntoBatches = exports.stripUnrecognizedFields = exports.injectDefaults = exports.convertShorthandRefs = exports.normalizeEvaluatorFields = exports.normalizeCamelCase = exports.autoCorrectFields = exports.normalizeMcpShorthand = exports.normalizePayload = exports.applyStringReplacementsToAgent = exports.applyStringReplacements = exports.writeDebugLog = exports.humanFriendlyName = exports.convertTestResultsToFormat = exports.AgentBase = exports.ScriptAgent = exports.ProductionAgent = exports.AgentTestCreateLifecycleStages = exports.AgentTest = exports.createAgentTester = exports.normalizeAgentforceStudioResults = exports.AgentforceStudioTester = exports.AgentTester = exports.AgentCreateLifecycleStages = exports.Agent = exports.readTurnIndex = exports.readSessionTrace = exports.listSessionTraces = exports.listCachedPreviewSessions = exports.getCurrentPreviewSessionId = exports.getCachedPreviewSessionIds = exports.removePreviewSessionCache = exports.validatePreviewSession = exports.createPreviewSessionCache = exports.detectTestRunnerFromId = exports.determineTestRunner = exports.readTranscriptEntries = exports.findAuthoringBundle = exports.metric = exports.COMPILATION_API_EXIT_CODES = exports.AgentSource = void 0;
18
+ exports.executeBatches = exports.resolveAgent = exports.translateTestCase = exports.translateTestSpec = exports.parseTestSpec = exports.isYamlTestSpec = exports.formatResults = exports.splitIntoBatches = exports.stripUnrecognizedFields = exports.injectDefaults = exports.convertShorthandRefs = exports.normalizeEvaluatorFields = exports.normalizeCamelCase = exports.autoCorrectFields = exports.normalizeMcpShorthand = exports.normalizePayload = exports.applyStringReplacementsToAgent = exports.applyStringReplacements = exports.writeDebugLog = exports.humanFriendlyName = exports.convertTestResultsToFormat = exports.AgentBase = exports.ScriptAgent = exports.ProductionAgent = exports.AgentTestCreateLifecycleStages = exports.AgentTest = exports.isNgtScorerName = exports.NgtScorerCatalog = exports.createAgentTester = exports.normalizeAgentforceStudioResults = exports.AgentforceStudioTester = exports.AgentTester = exports.AgentCreateLifecycleStages = exports.Agent = exports.readTurnIndex = exports.readSessionTrace = exports.listSessionTraces = exports.listCachedPreviewSessions = exports.getCurrentPreviewSessionId = exports.getCachedPreviewSessionIds = exports.removePreviewSessionCache = exports.validatePreviewSession = exports.createPreviewSessionCache = exports.detectTestRunnerFromId = exports.determineTestRunner = exports.readTranscriptEntries = exports.findAuthoringBundle = exports.metric = exports.COMPILATION_API_EXIT_CODES = exports.AgentSource = void 0;
19
+ exports.buildResultSummary = void 0;
19
20
  var types_1 = require("./types");
20
21
  Object.defineProperty(exports, "AgentSource", { enumerable: true, get: function () { return types_1.AgentSource; } });
21
22
  // Compilation API exit codes (CLI contract)
@@ -45,6 +46,9 @@ Object.defineProperty(exports, "AgentforceStudioTester", { enumerable: true, get
45
46
  Object.defineProperty(exports, "normalizeAgentforceStudioResults", { enumerable: true, get: function () { return agentforceStudioTester_1.normalizeAgentforceStudioResults; } });
46
47
  var agentTesterFactory_1 = require("./agentTesterFactory");
47
48
  Object.defineProperty(exports, "createAgentTester", { enumerable: true, get: function () { return agentTesterFactory_1.createAgentTester; } });
49
+ var ngtScorerCatalog_1 = require("./ngtScorerCatalog");
50
+ Object.defineProperty(exports, "NgtScorerCatalog", { enumerable: true, get: function () { return ngtScorerCatalog_1.NgtScorerCatalog; } });
51
+ Object.defineProperty(exports, "isNgtScorerName", { enumerable: true, get: function () { return ngtScorerCatalog_1.isNgtScorerName; } });
48
52
  var agentTest_1 = require("./agentTest");
49
53
  Object.defineProperty(exports, "AgentTest", { enumerable: true, get: function () { return agentTest_1.AgentTest; } });
50
54
  Object.defineProperty(exports, "AgentTestCreateLifecycleStages", { enumerable: true, get: function () { return agentTest_1.AgentTestCreateLifecycleStages; } });
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,iCAyEiB;AAxCf,oGAAA,WAAW,OAAA;AAsCX,4CAA4C;AAC5C,mHAAA,0BAA0B,OAAA;AAG5B,iCAuBiB;AAtBf,+FAAA,MAAM,OAAA;AACN,4GAAA,mBAAmB,OAAA;AACnB,8GAAA,qBAAqB,OAAA;AACrB,4GAAA,mBAAmB,OAAA;AACnB,+GAAA,sBAAsB,OAAA;AAEtB,kHAAA,yBAAyB,OAAA;AACzB,+GAAA,sBAAsB,OAAA;AACtB,kHAAA,yBAAyB,OAAA;AACzB,mHAAA,0BAA0B,OAAA;AAC1B,mHAAA,0BAA0B,OAAA;AAC1B,kHAAA,yBAAyB,OAAA;AACzB,0GAAA,iBAAiB,OAAA;AACjB,yGAAA,gBAAgB,OAAA;AAChB,sGAAA,aAAa,OAAA;AASf,iCAAgF;AAAvE,8FAAA,KAAK,OAAA;AAAE,mHAAA,0BAA0B,OAAA;AAC1C,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,mEAAoG;AAA3F,gIAAA,sBAAsB,OAAA;AAAE,0IAAA,gCAAgC,OAAA;AACjE,2DAAsH;AAA7G,uHAAA,iBAAiB,OAAA;AAC1B,yCAAwE;AAA/D,sGAAA,SAAS,OAAA;AAAE,2HAAA,8BAA8B,OAAA;AAClD,4DAA2D;AAAlD,kHAAA,eAAe,OAAA;AACxB,oDAAmD;AAA1C,0GAAA,WAAW,O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AAA;AACZ,iHAAA,cAAc,OAAA;AACd,qHAAA,kBAAkB,OAAA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Known scorer names for the NGT (Agentforce Studio) test runner — used for IDE
3
+ * autocomplete and the per-scorer metadata in {@link NgtScorerCatalog}.
4
+ *
5
+ * The `(string & NonNullable<unknown>)` branch keeps this open: arbitrary names from a future Core
6
+ * release pass type-checks. Validation is non-strict on purpose — `validateNgtSpec`
7
+ * emits a lifecycle warning for unknown names, and Core's MD validator
8
+ * (`AITestingOOTBEvaluations.resolveByKeyOrName`) is the authoritative runtime gate.
9
+ *
10
+ * Update when Core ships a new OOTB scorer.
11
+ *
12
+ * Future direction: when `AiTestingDefinition` lands in `@salesforce/types`
13
+ * (currently only `AiEvaluationDefinition` is published; see forcedotcom/wsdl
14
+ * `src/metadata.ts`), the XML types should be swapped for generated ones. The
15
+ * scorer name list itself isn't enum-typed in the WSDL though, so this catalog
16
+ * stays the source of truth for the `needsExpected` and `grade` metadata even
17
+ * after that swap.
18
+ */
19
+ export type NgtScorerName = KnownNgtScorerName | (string & NonNullable<unknown>);
20
+ /** The closed set used for catalog lookups and autocomplete. */
21
+ export type KnownNgtScorerName = 'topic_sequence_match' | 'action_sequence_match' | 'agent_handoff_match' | 'bot_response_rating' | 'response_match' | 'coherence' | 'conciseness' | 'factuality' | 'completeness' | 'task_resolution' | 'output_latency_milliseconds';
22
+ /** Grading scheme a scorer reports back. Used for downstream rendering / threshold logic. */
23
+ export type NgtScorerGrade = 'PASS_FAIL' | 'LLM_PASS_FAIL' | 'LLM_0_100' | 'LLM_0_5' | 'NUMERIC';
24
+ /** Catalog row describing a single scorer. */
25
+ export type NgtScorerEntry = {
26
+ needsExpected: boolean;
27
+ grade: NgtScorerGrade;
28
+ requiresConversationHistory?: true;
29
+ };
30
+ export declare const NgtScorerCatalog: Readonly<Record<KnownNgtScorerName, NgtScorerEntry>>;
31
+ export declare const isNgtScorerName: (s: string) => s is KnownNgtScorerName;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright 2026, Salesforce, Inc.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.isNgtScorerName = exports.NgtScorerCatalog = void 0;
19
+ /* eslint-disable camelcase */
20
+ exports.NgtScorerCatalog = {
21
+ topic_sequence_match: { needsExpected: true, grade: 'PASS_FAIL' },
22
+ action_sequence_match: { needsExpected: true, grade: 'PASS_FAIL' },
23
+ agent_handoff_match: { needsExpected: true, grade: 'PASS_FAIL' },
24
+ bot_response_rating: { needsExpected: true, grade: 'LLM_PASS_FAIL' },
25
+ response_match: { needsExpected: true, grade: 'LLM_PASS_FAIL' },
26
+ coherence: { needsExpected: false, grade: 'LLM_0_100' },
27
+ conciseness: { needsExpected: false, grade: 'LLM_0_100' },
28
+ factuality: { needsExpected: false, grade: 'LLM_0_100' },
29
+ completeness: { needsExpected: false, grade: 'LLM_0_100' },
30
+ task_resolution: { needsExpected: false, grade: 'LLM_0_5', requiresConversationHistory: true },
31
+ output_latency_milliseconds: { needsExpected: false, grade: 'NUMERIC' },
32
+ };
33
+ /* eslint-enable camelcase */
34
+ const isNgtScorerName = (s) => Object.prototype.hasOwnProperty.call(exports.NgtScorerCatalog, s);
35
+ exports.isNgtScorerName = isNgtScorerName;
36
+ //# sourceMappingURL=ngtScorerCatalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngtScorerCatalog.js","sourceRoot":"","sources":["../src/ngtScorerCatalog.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAgDH,8BAA8B;AACjB,QAAA,gBAAgB,GAAyD;IACpF,oBAAoB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;IACjE,qBAAqB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;IAClE,mBAAmB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE;IAChE,mBAAmB,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE;IACpE,cAAc,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE;IAC/D,SAAS,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE;IACvD,WAAW,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE;IACzD,UAAU,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE;IACxD,YAAY,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE;IAC1D,eAAe,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,2BAA2B,EAAE,IAAI,EAAE;IAC9F,2BAA2B,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE;CAC/D,CAAC;AACX,6BAA6B;AAEtB,MAAM,eAAe,GAAG,CAAC,CAAS,EAA2B,EAAE,CACpE,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,wBAAgB,EAAE,CAAC,CAAC,CAAC;AAD/C,QAAA,eAAe,mBACgC"}
package/lib/types.d.ts CHANGED
@@ -2,6 +2,7 @@ import { Connection, Logger, SfProject } from '@salesforce/core';
2
2
  import { FileProperties } from '@salesforce/source-deploy-retrieve';
3
3
  import { type ApexLog } from '@salesforce/types/tooling';
4
4
  import { metric } from './utils';
5
+ import type { NgtScorerName } from './ngtScorerCatalog';
5
6
  /**
6
7
  * Exit codes set on SfError when compile() fails due to server HTTP errors.
7
8
  * Used by CLI (e.g. agent validate authoring-bundle) for scripting.
@@ -487,6 +488,77 @@ export type AiEvaluationDefinition = {
487
488
  };
488
489
  }>;
489
490
  };
491
+ export type NgtContextVar = {
492
+ name: string;
493
+ value: string;
494
+ };
495
+ export type NgtConversationTurn = {
496
+ role: 'user';
497
+ message: string;
498
+ index?: number;
499
+ } | {
500
+ role: 'agent';
501
+ message: string;
502
+ topic: string;
503
+ index?: number;
504
+ };
505
+ export type NgtTestCaseInput = {
506
+ utterance: string;
507
+ contextVariables?: NgtContextVar[];
508
+ conversationHistory?: NgtConversationTurn[];
509
+ };
510
+ export type NgtTestCaseScorer = {
511
+ name: NgtScorerName;
512
+ expected?: string;
513
+ };
514
+ export type NgtTestCase = {
515
+ inputs: NgtTestCaseInput[];
516
+ scorers: NgtTestCaseScorer[];
517
+ };
518
+ export type NgtTestSpec = {
519
+ name: string;
520
+ description?: string;
521
+ subjectType: 'AGENT';
522
+ subjectName: string;
523
+ subjectVersion?: string;
524
+ testCases: NgtTestCase[];
525
+ };
526
+ export type AiConversationTurnXml = {
527
+ role: 'user';
528
+ message: string;
529
+ index: number;
530
+ } | {
531
+ role: 'agent';
532
+ message: string;
533
+ topic: string;
534
+ index: number;
535
+ };
536
+ export type AiTestCaseInputXml = {
537
+ utterance: string;
538
+ contextVariable?: Array<{
539
+ variableName: string;
540
+ variableValue: string;
541
+ }>;
542
+ conversationHistory?: AiConversationTurnXml[];
543
+ };
544
+ export type AiTestCaseScorer = {
545
+ name: NgtScorerName;
546
+ expectedValue?: string;
547
+ scorerType?: 'OOTB' | 'Custom';
548
+ };
549
+ export type AiTestCase = {
550
+ number: number;
551
+ inputs: AiTestCaseInputXml;
552
+ scorer: AiTestCaseScorer[];
553
+ };
554
+ export type AiTestingDefinition = {
555
+ description?: string;
556
+ name: string;
557
+ subjectName: string;
558
+ subjectType: 'AGENT';
559
+ subjectVersion?: string;
560
+ testCase: AiTestCase[];
561
+ };
490
562
  export type ApiStatus = {
491
563
  status: 'UP' | 'DOWN';
492
564
  };
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAOH,uDAAuD;AACvD,iCAAiC;AACjC,uDAAuD;AACvD;;;GAGG;AACU,QAAA,0BAA0B,GAAG;IACxC,4EAA4E;IAC5E,SAAS,EAAE,CAAC;IACZ,6DAA6D;IAC7D,YAAY,EAAE,CAAC;CACP,CAAC;AA8zBX,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,uDAAuD;AACvD,iCAAiC;AACjC,uDAAuD;AACvD;;;GAGG;AACU,QAAA,0BAA0B,GAAG;IACxC,4EAA4E;IAC5E,SAAS,EAAE,CAAC;IACZ,6DAA6D;IAC7D,YAAY,EAAE,CAAC;CACP,CAAC;AAw4BX,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
@@ -9,3 +9,35 @@ Must provide an org connection to get agent test data based on an AiEvaluationDe
9
9
  # missingTestSpecData
10
10
 
11
11
  The agent test is missing the required data to provide a test spec.
12
+
13
+ # ngtMissingTestCases
14
+
15
+ NGT test spec must define at least one test case under `testCases:`.
16
+
17
+ # ngtTestCaseMissingInputs
18
+
19
+ NGT test case %s must define at least one entry under `inputs:`.
20
+
21
+ # ngtTestCaseMissingScorers
22
+
23
+ NGT test case %s must define at least one scorer under `scorers:`.
24
+
25
+ # ngtScorerMissingExpected
26
+
27
+ NGT scorer '%s' on test case %s requires an `expected:` value.
28
+
29
+ # ngtTaskResolutionRequiresConversationHistory
30
+
31
+ NGT scorer 'task_resolution' on test case %s requires conversationHistory on at least one input.
32
+
33
+ # ngtMultiAgentMissingHandoff
34
+
35
+ Test case %s targets a multi-agent subject and must include an `agent_handoff_match` scorer with an `expected:` value.
36
+
37
+ # ngtConversationHistoryIndexAllOrNothing
38
+
39
+ NGT conversationHistory on test case %s, input %s mixes turns with and without `index:`. Either set `index:` on every turn or none.
40
+
41
+ # ngtLooksLikeLegacySpec
42
+
43
+ This YAML looks like a legacy AiEvaluationDefinition spec (uses top-level `utterance:` / `expectedTopic:` / `customEvaluations:`). Use `--test-runner testing-center` for legacy authoring, or hand-edit the deployed XML for `<scorer scorerType="Custom">` blocks on NGT.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/agents",
3
3
  "description": "Client side APIs for working with Salesforce agents",
4
- "version": "1.6.10",
4
+ "version": "1.7.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Salesforce",
7
7
  "main": "lib/index",
@@ -13,14 +13,14 @@
13
13
  "dependencies": {
14
14
  "@salesforce/core": "^8.31.0",
15
15
  "@salesforce/kit": "^3.2.6",
16
- "@salesforce/source-deploy-retrieve": "^12.35.9",
16
+ "@salesforce/source-deploy-retrieve": "^12.35.10",
17
17
  "@salesforce/types": "^1.7.1",
18
18
  "fast-xml-parser": "^5.8.0",
19
19
  "nock": "^14.0.15",
20
20
  "yaml": "^2.8.4"
21
21
  },
22
22
  "devDependencies": {
23
- "@salesforce/cli-plugins-testkit": "^5.3.56",
23
+ "@salesforce/cli-plugins-testkit": "^5.3.58",
24
24
  "@salesforce/dev-scripts": "^11.0.4",
25
25
  "esbuild": "^0.28.0",
26
26
  "ts-morph": "^28.0.0",