@salesforce/agents 0.2.0 → 0.2.2

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,14 +1,18 @@
1
1
  import { Connection } from '@salesforce/core';
2
2
  import { Duration } from '@salesforce/kit';
3
3
  type Format = 'human' | 'json';
4
- type TestStatus = 'NEW' | 'IN_PROGRESS' | 'COMPLETED' | 'ERROR';
5
- type AgentTestStatusResponse = {
4
+ export type TestStatus = 'NEW' | 'IN_PROGRESS' | 'COMPLETED' | 'ERROR';
5
+ export type AgentTestStartResponse = {
6
+ aiEvaluationId: string;
7
+ status: TestStatus;
8
+ };
9
+ export type AgentTestStatusResponse = {
6
10
  status: TestStatus;
7
11
  startTime: string;
8
12
  endTime?: string;
9
13
  errorMessage?: string;
10
14
  };
11
- type TestCaseResult = {
15
+ export type TestCaseResult = {
12
16
  status: TestStatus;
13
17
  number: string;
14
18
  startTime: string;
@@ -36,7 +40,7 @@ type TestCaseResult = {
36
40
  errorMessage?: string;
37
41
  }>;
38
42
  };
39
- type AgentTestDetailsResponse = {
43
+ export type AgentTestDetailsResponse = {
40
44
  status: TestStatus;
41
45
  startTime: string;
42
46
  endTime?: string;
@@ -53,9 +57,7 @@ export declare class AgentTester {
53
57
  * @param type - Specifies whether the provided identifier is a 'name' or 'id'. Defaults to 'name'. If 'name' is provided, nameOrId is treated as the name of the AiEvaluationDefinition. If 'id' is provided, nameOrId is treated as the unique ID of the AiEvaluationDefinition.
54
58
  * @returns A promise that resolves to an object containing the ID of the started AI evaluation run.
55
59
  */
56
- start(nameOrId: string, type?: 'name' | 'id'): Promise<{
57
- aiEvaluationId: string;
58
- }>;
60
+ start(nameOrId: string, type?: 'name' | 'id'): Promise<AgentTestStartResponse>;
59
61
  status(jobId: string): Promise<AgentTestStatusResponse>;
60
62
  poll(jobId: string, { format, timeout, }?: {
61
63
  format?: Format;
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { AgentCreateConfig, AgentCreateResponse, AgentJobSpec, AgentJobSpecCreateConfig, AgentJobSpecCreateResponse, SfAgent, } from './types';
1
+ export { type AgentCreateConfig, type AgentCreateResponse, type AgentJobSpec, type AgentJobSpecCreateConfig, type AgentJobSpecCreateResponse, SfAgent, } from './types';
2
2
  export { Agent } from './agent';
3
- export { AgentTester } from './agentTester';
3
+ export { AgentTester, type AgentTestDetailsResponse, type AgentTestStartResponse, type AgentTestStatusResponse, type TestCaseResult, type TestStatus, } from './agentTester';
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAUH,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAUH,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,6CAOuB;AANrB,0GAAA,WAAW,OAAA"}
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": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "license": "BSD-3-Clause",
6
6
  "author": "Salesforce",
7
7
  "main": "lib/index",