UNPKG

@salesforce/agents

Version:

Client side APIs for working with Salesforce agents

24 lines (23 loc) 1.13 kB
import { Connection } from '@salesforce/core'; import { AgentTester } from './agentTester'; import { AgentforceStudioTester } from './agentforceStudioTester'; import type { TestRunnerType } from './utils'; export type CreateAgentTesterOptions = { /** Explicit runner type — always wins, no detection performed. */ explicitType?: TestRunnerType; /** Existing run ID; prefix is used for instant detection without a network call. */ runId?: string; /** Test definition name; triggers an org metadata query as last resort. */ testDefinitionName?: string; }; export type CreateAgentTesterResult = { runner: AgentTester | AgentforceStudioTester; type: TestRunnerType; }; /** * Creates the appropriate tester based on detection priority: * 1. `explicitType` — always wins, no detection performed * 2. `runId` prefix — instant detection from the Salesforce ID prefix, no network call * 3. `testDefinitionName` — org metadata query, used as last resort */ export declare function createAgentTester(connection: Connection, options: CreateAgentTesterOptions): Promise<CreateAgentTesterResult>;