@salesforce/agents 2.2.0 → 2.3.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/lib/index.d.ts +1 -1
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +35 -2
- package/lib/types.js.map +1 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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, type AgentPreviewStartOptions, type ContextVariable, 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 NgtPromptTestCase, type NgtPromptInputSet, type NgtPromptTestCaseInput, type AiTestingDefinition, type AiTestCase, type AiTestCaseInputXml, type AiTestCaseScorer, type AiConversationTurnXml, type AiPromptTestCase, type AiTestCasePromptInputXml, 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, type AgentPreviewStartOptions, type ContextVariable, type ContextVariableType, 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 NgtPromptTestCase, type NgtPromptInputSet, type NgtPromptTestCaseInput, type AiTestingDefinition, type AiTestCase, type AiTestCaseInputXml, type AiTestCaseScorer, type AiConversationTurnXml, type AiPromptTestCase, type AiTestCasePromptInputXml, 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';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;AAEH,iCA8FiB;AA1Df,oGAAA,WAAW,OAAA;AAwDX,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,uDAO4B;AAF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{
|
|
|
24
24
|
saveSession: (outputDir?: string) => Promise<string>;
|
|
25
25
|
setApexDebugging: (apexDebugging: boolean) => void;
|
|
26
26
|
};
|
|
27
|
+
export type ContextVariableType = 'Text' | 'Date' | 'DateTime' | 'Money' | 'Ref' | 'Boolean' | 'Number' | 'Object' | 'List' | 'Json';
|
|
28
|
+
/**
|
|
29
|
+
* A context/custom variable sent when starting a preview session or a message.
|
|
30
|
+
*
|
|
31
|
+
* This mirrors the preview API's polymorphic `Variable` schema: the JSON type of
|
|
32
|
+
* `value` is determined by `type`. Boolean values are booleans, Number values are
|
|
33
|
+
* numbers, Object/List values are arrays, and Json is any JSON object. Sending a
|
|
34
|
+
* boolean as the string "True" (the old behavior) leaves a boolean-gated route
|
|
35
|
+
* closed, because the runtime compares "True" (Text) against True (Boolean).
|
|
36
|
+
*
|
|
37
|
+
* `value` is optional and nullable to match the API, where only `name` and `type`
|
|
38
|
+
* are required.
|
|
39
|
+
*/
|
|
27
40
|
export type ContextVariable = {
|
|
28
41
|
name: string;
|
|
29
|
-
type: '
|
|
30
|
-
value
|
|
42
|
+
type: 'Boolean';
|
|
43
|
+
value?: boolean | null;
|
|
44
|
+
} | {
|
|
45
|
+
name: string;
|
|
46
|
+
type: 'Number';
|
|
47
|
+
value?: number | null;
|
|
48
|
+
} | {
|
|
49
|
+
name: string;
|
|
50
|
+
type: 'Text' | 'Date' | 'DateTime' | 'Money' | 'Ref';
|
|
51
|
+
value?: string | null;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
type: 'Object';
|
|
55
|
+
value?: ContextVariable[] | null;
|
|
56
|
+
} | {
|
|
57
|
+
name: string;
|
|
58
|
+
type: 'List';
|
|
59
|
+
value?: Array<Record<string, unknown>> | null;
|
|
60
|
+
} | {
|
|
61
|
+
name: string;
|
|
62
|
+
type: 'Json';
|
|
63
|
+
value?: Record<string, unknown> | null;
|
|
31
64
|
};
|
|
32
65
|
export type AgentPreviewStartOptions = {
|
|
33
66
|
contextVariables?: ContextVariable[];
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAq9BX,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,gCAAiB,CAAA;AACnB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
|
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": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Salesforce",
|
|
7
7
|
"main": "lib/index",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@salesforce/cli-plugins-testkit": "^5.3.59",
|
|
23
|
-
"@salesforce/dev-scripts": "^
|
|
23
|
+
"@salesforce/dev-scripts": "^14.0.0",
|
|
24
24
|
"esbuild": "^0.28.1",
|
|
25
25
|
"eslint": "^10.8.1",
|
|
26
26
|
"nock": "^14.0.15",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"ts-node": "^10.9.2",
|
|
29
29
|
"ts-patch": "^3.3.0",
|
|
30
30
|
"typedoc": "^0.28.19",
|
|
31
|
-
"typescript": "^
|
|
31
|
+
"typescript": "^6"
|
|
32
32
|
},
|
|
33
33
|
"resolutions": {
|
|
34
34
|
"serialize-javascript": "^7.0.5",
|