@salesforce/agents
Version:
Client side APIs for working with Salesforce agents
21 lines (20 loc) • 873 B
TypeScript
import type { TestSpec, TestCase } from './types.js';
import type { EvalPayload, EvalTest } from './evalNormalizer.js';
/**
* Returns true if the content looks like a YAML TestSpec (has testCases + subjectName).
* Returns false for JSON EvalPayload, invalid content, or YAML missing required fields.
*/
export declare function isYamlTestSpec(content: string): boolean;
/**
* Parse a YAML string into a TestSpec.
* Throws if the content is not valid YAML or is missing required fields.
*/
export declare function parseTestSpec(content: string): TestSpec;
/**
* Translate a full TestSpec into an EvalPayload.
*/
export declare function translateTestSpec(spec: TestSpec): EvalPayload;
/**
* Translate a single TestCase into an EvalTest with ordered steps.
*/
export declare function translateTestCase(testCase: TestCase, index: number, specName?: string): EvalTest;