@salesforce/plugin-agent 1.21.1 → 1.22.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/README.md CHANGED
@@ -132,7 +132,7 @@ EXAMPLES
132
132
  $ sf agent create --name "Resort Manager" --spec specs/resortManagerAgent.yaml --preview
133
133
  ```
134
134
 
135
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/create.ts)_
135
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/create.ts)_
136
136
 
137
137
  ## `sf agent generate agent-spec`
138
138
 
@@ -237,7 +237,7 @@ EXAMPLES
237
237
  $ sf agent generate agent-spec --tone formal --agent-user resortmanager@myorg.com
238
238
  ```
239
239
 
240
- _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/generate/agent-spec.ts)_
240
+ _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/generate/agent-spec.ts)_
241
241
 
242
242
  ## `sf agent generate template`
243
243
 
@@ -285,7 +285,7 @@ EXAMPLES
285
285
  force-app/main/default/bots/My_Awesome_Agent/My_Awesome_Agent.bot-meta.xml --agent-version 1
286
286
  ```
287
287
 
288
- _See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/generate/template.ts)_
288
+ _See code: [src/commands/agent/generate/template.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/generate/template.ts)_
289
289
 
290
290
  ## `sf agent generate test-spec`
291
291
 
@@ -343,7 +343,7 @@ EXAMPLES
343
343
  force-app//main/default/aiEvaluationDefinitions/Resort_Manager_Tests.aiEvaluationDefinition-meta.xml
344
344
  ```
345
345
 
346
- _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/generate/test-spec.ts)_
346
+ _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/generate/test-spec.ts)_
347
347
 
348
348
  ## `sf agent preview`
349
349
 
@@ -352,6 +352,7 @@ Interact with an active agent to preview how the agent responds to your statemen
352
352
  ```
353
353
  USAGE
354
354
  $ sf agent preview -o <value> -a <value> [--flags-dir <value>] [--api-version <value>] [-n <value>] [-d <value>]
355
+ [-x]
355
356
 
356
357
  FLAGS
357
358
  -a, --connected-app-user=<value> (required) Username or alias of the connected app user that's configured with
@@ -360,6 +361,7 @@ FLAGS
360
361
  -n, --api-name=<value> API name of the agent you want to interact with.
361
362
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
362
363
  configuration variable is already set.
364
+ -x, --apex-debug Enable Apex debug logging during the agent preview conversation.
363
365
  --api-version=<value> Override the api version used for api requests made by this command
364
366
 
365
367
  GLOBAL FLAGS
@@ -386,7 +388,6 @@ DESCRIPTION
386
388
  Find the agent's API name in its main details page in your org's Agent page in Setup.
387
389
 
388
390
  Before you use this command, you must complete these steps:
389
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
390
391
 
391
392
  1. Create a connected app in your org as described in the "Create a Connected App" section here:
392
393
  https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#create-a-connected-app. Do these
@@ -436,7 +437,7 @@ EXAMPLES
436
437
  --output-dir "transcripts/my-preview"
437
438
  ```
438
439
 
439
- _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/preview.ts)_
440
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/preview.ts)_
440
441
 
441
442
  ## `sf agent test create`
442
443
 
@@ -491,7 +492,7 @@ EXAMPLES
491
492
  $ sf agent test create --spec specs/Resort_Manager-testSpec.yaml --api-name Resort_Manager_Test --preview
492
493
  ```
493
494
 
494
- _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/test/create.ts)_
495
+ _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/test/create.ts)_
495
496
 
496
497
  ## `sf agent test list`
497
498
 
@@ -526,7 +527,7 @@ EXAMPLES
526
527
  $ sf agent test list --target-org my-org
527
528
  ```
528
529
 
529
- _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/test/list.ts)_
530
+ _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/test/list.ts)_
530
531
 
531
532
  ## `sf agent test results`
532
533
 
@@ -582,7 +583,7 @@ FLAG DESCRIPTIONS
582
583
  test results aren't written.
583
584
  ```
584
585
 
585
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/test/results.ts)_
586
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/test/results.ts)_
586
587
 
587
588
  ## `sf agent test resume`
588
589
 
@@ -645,7 +646,7 @@ FLAG DESCRIPTIONS
645
646
  test results aren't written.
646
647
  ```
647
648
 
648
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/test/resume.ts)_
649
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/test/resume.ts)_
649
650
 
650
651
  ## `sf agent test run`
651
652
 
@@ -709,6 +710,6 @@ FLAG DESCRIPTIONS
709
710
  test results aren't written.
710
711
  ```
711
712
 
712
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.21.1/src/commands/agent/test/run.ts)_
713
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.22.0/src/commands/agent/test/run.ts)_
713
714
 
714
715
  <!-- commandsstop -->
@@ -33,6 +33,7 @@ export default class AgentPreview extends SfCommand<AgentPreviewResult> {
33
33
  'connected-app-user': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
34
34
  'api-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
35
35
  'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
36
+ 'apex-debug': import("@oclif/core/interfaces").BooleanFlag<boolean>;
36
37
  };
37
38
  run(): Promise<AgentPreviewResult>;
38
39
  }
@@ -40,5 +41,5 @@ export declare const agentIsUnsupported: (devName: string) => boolean;
40
41
  export declare const agentIsInactive: (agent: AgentData) => boolean;
41
42
  export declare const validateAgent: (agent: AgentData) => boolean;
42
43
  export declare const getAgentChoices: (agents: AgentData[]) => Array<Choice<AgentValue>>;
43
- export declare const resolveOutputDir: (outputDir: string | undefined) => Promise<string | undefined>;
44
+ export declare const resolveOutputDir: (outputDir: string | undefined, apexDebug: boolean | undefined) => Promise<string | undefined>;
44
45
  export {};
@@ -40,6 +40,10 @@ export default class AgentPreview extends SfCommand {
40
40
  summary: messages.getMessage('flags.output-dir.summary'),
41
41
  char: 'd',
42
42
  }),
43
+ 'apex-debug': Flags.boolean({
44
+ summary: messages.getMessage('flags.apex-debug.summary'),
45
+ char: 'x',
46
+ }),
43
47
  };
44
48
  async run() {
45
49
  const { flags } = await this.parse(AgentPreview);
@@ -63,11 +67,12 @@ export default class AgentPreview extends SfCommand {
63
67
  choices: getAgentChoices(agentsInOrg),
64
68
  });
65
69
  }
66
- const outputDir = await resolveOutputDir(flags['output-dir']);
67
- const agentPreview = new Preview(apiConn);
70
+ const outputDir = await resolveOutputDir(flags['output-dir'], flags['apex-debug']);
71
+ const agentPreview = new Preview(apiConn, selectedAgent.Id);
72
+ agentPreview.toggleApexDebugMode(flags['apex-debug']);
68
73
  const instance = render(React.createElement(AgentPreviewReact, {
74
+ connection: conn,
69
75
  agent: agentPreview,
70
- id: selectedAgent.Id,
71
76
  name: selectedAgent.DeveloperName,
72
77
  outputDir,
73
78
  }), { exitOnCtrlC: false });
@@ -106,15 +111,18 @@ export const getAgentChoices = (agents) => agents.map((agent) => {
106
111
  disabled,
107
112
  };
108
113
  });
109
- export const resolveOutputDir = async (outputDir) => {
114
+ export const resolveOutputDir = async (outputDir, apexDebug) => {
110
115
  if (!outputDir) {
111
- const response = await confirm({
112
- message: 'Save transcripts to an output directory?',
113
- default: true,
114
- });
116
+ const response = apexDebug
117
+ ? true
118
+ : await confirm({
119
+ message: 'Save transcripts to an output directory?',
120
+ default: true,
121
+ });
122
+ const outputTypes = apexDebug ? 'debug logs and transcripts' : 'transcripts';
115
123
  if (response) {
116
124
  const getDir = await input({
117
- message: 'Enter the output directory',
125
+ message: `Enter the output directory for ${outputTypes}`,
118
126
  default: env.getString('SF_AGENT_PREVIEW_OUTPUT_DIR', join('temp', 'agent-preview')),
119
127
  required: true,
120
128
  });
@@ -1 +1 @@
1
- {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EA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,aAAa,CAAC;QAC7E,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC;gBACzB,OAAO,EAAE,kCAAkC,WAAW,EAAE;gBACxD,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,6BAA6B,EAAE,IAAI,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;gBACpF,QAAQ,EAAE,IAAI;aACf,CAAC,CAAC;YAEH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;AACH,CAAC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { Connection } from '@salesforce/core';
2
3
  import { AgentPreview } from '@salesforce/agents';
3
4
  /**
4
5
  * Ideas:
@@ -8,8 +9,8 @@ import { AgentPreview } from '@salesforce/agents';
8
9
  * - Add keystroke to scroll down
9
10
  */
10
11
  export declare function AgentPreviewReact(props: {
12
+ readonly connection: Connection;
11
13
  readonly agent: AgentPreview;
12
- readonly id: string;
13
14
  readonly name: string;
14
15
  readonly outputDir: string | undefined;
15
16
  }): React.ReactNode;
@@ -9,6 +9,7 @@ import fs from 'node:fs';
9
9
  import React from 'react';
10
10
  import { Box, Text, useInput } from 'ink';
11
11
  import TextInput from 'ink-text-input';
12
+ import { writeDebugLog } from '@salesforce/agents';
12
13
  import { sleep } from '@salesforce/kit';
13
14
  // Component to show a simple typing animation
14
15
  function Typing() {
@@ -56,7 +57,8 @@ export function AgentPreviewReact(props) {
56
57
  const [timestamp, setTimestamp] = React.useState(new Date().getTime());
57
58
  const [tempDir, setTempDir] = React.useState('');
58
59
  const [responses, setResponses] = React.useState([]);
59
- const { agent, id, name, outputDir } = props;
60
+ const [apexDebugLogs, setApexDebugLogs] = React.useState([]);
61
+ const { connection, agent, name, outputDir } = props;
60
62
  useInput((input, key) => {
61
63
  if (key.escape) {
62
64
  setSessionEnded(true);
@@ -77,7 +79,7 @@ export function AgentPreviewReact(props) {
77
79
  }, [sessionEnded]);
78
80
  React.useEffect(() => {
79
81
  const startSession = async () => {
80
- const session = await agent.start(id);
82
+ const session = await agent.start();
81
83
  setSessionId(session.sessionId);
82
84
  setHeader(`New session started with "${props.name}" (${session.sessionId})`);
83
85
  await sleep(500); // Add a short delay to make it feel more natural
@@ -135,6 +137,15 @@ export function AgentPreviewReact(props) {
135
137
  setIsTyping(false);
136
138
  // Add the agent's response to the chat
137
139
  setMessages((prev) => [...prev, { role: name, content: message, timestamp: new Date() }]);
140
+ // If there is an apex debug log entry, get the log and write it to the output dir
141
+ if (response.apexDebugLog && tempDir) {
142
+ // Write the apex debug to the output dir
143
+ await writeDebugLog(connection, response.apexDebugLog, tempDir);
144
+ const logId = response.apexDebugLog.Id;
145
+ if (logId) {
146
+ setApexDebugLogs((prev) => [...prev, path.join(tempDir, `${logId}.log`)]);
147
+ }
148
+ }
138
149
  } })),
139
150
  sessionEnded ? (React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
140
151
  React.createElement(Text, { bold: true }, "Session Ended"),
@@ -145,6 +156,9 @@ export function AgentPreviewReact(props) {
145
156
  outputDir ? React.createElement(Text, null,
146
157
  "API transactions: ",
147
158
  tempDir,
148
- "/responses.json") : null)) : null));
159
+ "/responses.json") : null,
160
+ apexDebugLogs.length > 0 && React.createElement(Text, null,
161
+ "Apex Debug Logs: ",
162
+ '\n' + apexDebugLogs.join('\n')))) : null));
149
163
  }
150
164
  //# sourceMappingURL=agent-preview-react.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-preview-react.js","sourceRoot":"","sources":["../../src/components/agent-preview-react.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,MAAM,OA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,YAAY,CAAC,CAAC,CAAC,CACd,oBAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAC7B,WAAW,EAAC,OAAO,EACnB,SAAS,EAAE,CAAC,EACZ,YAAY,EAAE,CAAC,EACf,WAAW,EAAE,CAAC,EACd,YAAY,EAAE,CAAC;YAEf,oBAAC,IAAI,IAAC,IAAI,0BAAqB;YAC9B,SAAS,CAAC,CAAC,CAAC,oBAAC,IAAI;;gBAAoB,OAAO;mCAAwB,CAAC,CAAC,CAAC,IAAI;YAC3E,SAAS,CAAC,CAAC,CAAC,oBAAC,IAAI;;gBAAoB,OAAO;kCAAuB,CAAC,CAAC,CAAC,IAAI;YAC1E,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,oBAAC,IAAI;;gBAAmB,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAQ,CACxF,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC"}
@@ -13,7 +13,6 @@ When the session concludes, the command asks if you want to save the API respons
13
13
  Find the agent's API name in its main details page in your org's Agent page in Setup.
14
14
 
15
15
  Before you use this command, you must complete these steps:
16
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17
16
 
18
17
  1. Create a connected app in your org as described in the "Create a Connected App" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#create-a-connected-app. Do these four additional steps:
19
18
 
@@ -51,6 +50,10 @@ Username or alias of the connected app user that's configured with web-based acc
51
50
 
52
51
  Directory where conversation transcripts are saved.
53
52
 
53
+ # flags.apex-debug.summary
54
+
55
+ Enable Apex debug logging during the agent preview conversation.
56
+
54
57
  # examples
55
58
 
56
59
  - Interact with an agent with API name "Resort_Manager" in the org with alias "my-org". Connect to your agent using the alias "my-agent-user"; this alias must point to the username who is authorized using the Web server flow:
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
- "version": "1.21.1",
3
+ "version": "1.22.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/plugin-agent",
9
- "version": "1.21.1",
9
+ "version": "1.22.0",
10
10
  "license": "BSD-3-Clause",
11
11
  "dependencies": {
12
12
  "@inquirer/core": "^10.1.6",
13
13
  "@inquirer/prompts": "^7.2.0",
14
14
  "@oclif/core": "^4",
15
15
  "@oclif/multi-stage-output": "^0.7.12",
16
- "@salesforce/agents": "0.14.11",
16
+ "@salesforce/agents": "0.15.0",
17
17
  "@salesforce/core": "^8.10.2",
18
18
  "@salesforce/kit": "^3.2.3",
19
19
  "@salesforce/sf-plugins-core": "^12.2.0",
@@ -3556,14 +3556,15 @@
3556
3556
  "license": "MIT"
3557
3557
  },
3558
3558
  "node_modules/@salesforce/agents": {
3559
- "version": "0.14.11",
3560
- "resolved": "https://registry.npmjs.org/@salesforce/agents/-/agents-0.14.11.tgz",
3561
- "integrity": "sha512-pRswx4MY7NfGAvPhKh6HDgGcvorcMJVjOaD2CHYLynVAhnvSioBv81BAc236sJoMpnOC68x/+DN312dlm3w9pw==",
3559
+ "version": "0.15.0",
3560
+ "resolved": "https://registry.npmjs.org/@salesforce/agents/-/agents-0.15.0.tgz",
3561
+ "integrity": "sha512-chshRBql+Yxm68vl2vI3BlmJdIBvyxVcj9WqlXQ51XwtzIsC64JSXZ1maybf05tdLQQiq+y8Z+b9/Vn6bfzvyw==",
3562
3562
  "license": "BSD-3-Clause",
3563
3563
  "dependencies": {
3564
- "@salesforce/core": "^8.10.2",
3564
+ "@salesforce/core": "^8.10.3",
3565
3565
  "@salesforce/kit": "^3.2.3",
3566
- "@salesforce/source-deploy-retrieve": "^12.19.3",
3566
+ "@salesforce/source-deploy-retrieve": "^12.19.5",
3567
+ "@salesforce/types": "^1.3.0",
3567
3568
  "fast-xml-parser": "^4.5.3",
3568
3569
  "nock": "^13.5.6",
3569
3570
  "yaml": "^2.7.1"
@@ -3694,9 +3695,9 @@
3694
3695
  }
3695
3696
  },
3696
3697
  "node_modules/@salesforce/core": {
3697
- "version": "8.10.2",
3698
- "resolved": "https://registry.npmjs.org/@salesforce/core/-/core-8.10.2.tgz",
3699
- "integrity": "sha512-o/Qvm0U9+nuHAdFfjXZoAXyLaeG7lDnrLmUkCQ38oquiFrwzWSbXh6crHqFEmeZyK6MYYgh0KCaInrui06XP6Q==",
3698
+ "version": "8.10.3",
3699
+ "resolved": "https://registry.npmjs.org/@salesforce/core/-/core-8.10.3.tgz",
3700
+ "integrity": "sha512-juqbU304TBrrjb8sZGw+QkeAJISKu4+v2XIMTCxGJoEjs4LLhsyI7/drxCUY+7FNye+veAGeJdn/PCxkKhSgcA==",
3700
3701
  "license": "BSD-3-Clause",
3701
3702
  "dependencies": {
3702
3703
  "@jsforce/jsforce-node": "^3.8.1",
@@ -3999,12 +4000,12 @@
3999
4000
  }
4000
4001
  },
4001
4002
  "node_modules/@salesforce/source-deploy-retrieve": {
4002
- "version": "12.19.3",
4003
- "resolved": "https://registry.npmjs.org/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.19.3.tgz",
4004
- "integrity": "sha512-rvdEfi2beJmVbN4NQ3Ve4dULq+wMFuLKBKpmNBIb9udXNVZd8Q0P7TO9pM/tzfeAfwfdTE7swXaYe2Qv5UAd+g==",
4003
+ "version": "12.19.6",
4004
+ "resolved": "https://registry.npmjs.org/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.19.6.tgz",
4005
+ "integrity": "sha512-A/886Ht23G1snfyUj26pNDjaRWuMmiWIk5ckp+d9mdQjV8i45kPiOFJj5aHzAQ8071i/JgfnDYEhnk1voDujUA==",
4005
4006
  "license": "BSD-3-Clause",
4006
4007
  "dependencies": {
4007
- "@salesforce/core": "^8.8.7",
4008
+ "@salesforce/core": "^8.10.3",
4008
4009
  "@salesforce/kit": "^3.2.3",
4009
4010
  "@salesforce/ts-types": "^2.0.12",
4010
4011
  "@salesforce/types": "^1.3.0",
package/oclif.lock CHANGED
@@ -1443,14 +1443,15 @@
1443
1443
  resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8"
1444
1444
  integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==
1445
1445
 
1446
- "@salesforce/agents@0.14.11":
1447
- version "0.14.11"
1448
- resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.14.11.tgz#3623d5d9708b9be12e72257592c1cc954a0a4d64"
1449
- integrity sha512-pRswx4MY7NfGAvPhKh6HDgGcvorcMJVjOaD2CHYLynVAhnvSioBv81BAc236sJoMpnOC68x/+DN312dlm3w9pw==
1446
+ "@salesforce/agents@0.15.0":
1447
+ version "0.15.0"
1448
+ resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.15.0.tgz#0cec640cef0f02714bfa8cf842239c9d00e6ca15"
1449
+ integrity sha512-chshRBql+Yxm68vl2vI3BlmJdIBvyxVcj9WqlXQ51XwtzIsC64JSXZ1maybf05tdLQQiq+y8Z+b9/Vn6bfzvyw==
1450
1450
  dependencies:
1451
- "@salesforce/core" "^8.10.2"
1451
+ "@salesforce/core" "^8.10.3"
1452
1452
  "@salesforce/kit" "^3.2.3"
1453
- "@salesforce/source-deploy-retrieve" "^12.19.3"
1453
+ "@salesforce/source-deploy-retrieve" "^12.19.5"
1454
+ "@salesforce/types" "^1.3.0"
1454
1455
  fast-xml-parser "^4.5.3"
1455
1456
  nock "^13.5.6"
1456
1457
  yaml "^2.7.1"
@@ -1471,10 +1472,10 @@
1471
1472
  strip-ansi "6.0.1"
1472
1473
  ts-retry-promise "^0.8.1"
1473
1474
 
1474
- "@salesforce/core@^8.10.0", "@salesforce/core@^8.10.2", "@salesforce/core@^8.5.1", "@salesforce/core@^8.8.0", "@salesforce/core@^8.8.5", "@salesforce/core@^8.8.7":
1475
- version "8.10.2"
1476
- resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.10.2.tgz#22727a7dee2e69a34b0b14dae39c025f2b258af0"
1477
- integrity sha512-o/Qvm0U9+nuHAdFfjXZoAXyLaeG7lDnrLmUkCQ38oquiFrwzWSbXh6crHqFEmeZyK6MYYgh0KCaInrui06XP6Q==
1475
+ "@salesforce/core@^8.10.0", "@salesforce/core@^8.10.2", "@salesforce/core@^8.10.3", "@salesforce/core@^8.5.1", "@salesforce/core@^8.8.0", "@salesforce/core@^8.8.5":
1476
+ version "8.10.3"
1477
+ resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.10.3.tgz#3cc2c99d097757cb4b08dab921254cfa3a00c7c1"
1478
+ integrity sha512-juqbU304TBrrjb8sZGw+QkeAJISKu4+v2XIMTCxGJoEjs4LLhsyI7/drxCUY+7FNye+veAGeJdn/PCxkKhSgcA==
1478
1479
  dependencies:
1479
1480
  "@jsforce/jsforce-node" "^3.8.1"
1480
1481
  "@salesforce/kit" "^3.2.2"
@@ -1597,12 +1598,12 @@
1597
1598
  cli-progress "^3.12.0"
1598
1599
  terminal-link "^3.0.0"
1599
1600
 
1600
- "@salesforce/source-deploy-retrieve@^12.19.3":
1601
- version "12.19.3"
1602
- resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.19.3.tgz#42b34913b624115aee36cd289cb5ea1d5de9b7b1"
1603
- integrity sha512-rvdEfi2beJmVbN4NQ3Ve4dULq+wMFuLKBKpmNBIb9udXNVZd8Q0P7TO9pM/tzfeAfwfdTE7swXaYe2Qv5UAd+g==
1601
+ "@salesforce/source-deploy-retrieve@^12.19.3", "@salesforce/source-deploy-retrieve@^12.19.5":
1602
+ version "12.19.6"
1603
+ resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.19.6.tgz#0c208d2dfef6944e24afcea74ed05aa823e966aa"
1604
+ integrity sha512-A/886Ht23G1snfyUj26pNDjaRWuMmiWIk5ckp+d9mdQjV8i45kPiOFJj5aHzAQ8071i/JgfnDYEhnk1voDujUA==
1604
1605
  dependencies:
1605
- "@salesforce/core" "^8.8.7"
1606
+ "@salesforce/core" "^8.10.3"
1606
1607
  "@salesforce/kit" "^3.2.3"
1607
1608
  "@salesforce/ts-types" "^2.0.12"
1608
1609
  "@salesforce/types" "^1.3.0"
@@ -104,7 +104,7 @@
104
104
  "agent:preview": {
105
105
  "aliases": [],
106
106
  "args": {},
107
- "description": "Use this command to have a natural language conversation with an active agent in your org, as if you were an actual user. The interface is simple: in the \"Start typing...\" prompt, enter a statement, question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To exit the conversation, hit ESC or Control+C.\n\nThis command is useful to test if the agent responds to your utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the Conversation Preview panel in your org's Agent Builder UI.\n\nWhen the session concludes, the command asks if you want to save the API responses and chat transcripts. By default, the files are saved to the \"./temp/agent-preview\" directory. Specify a new default directory by setting the environment variable \"SF_AGENT_PREVIEW_OUTPUT_DIR\" to the directory. Or you can pass the directory to the --output-dir flag.\n\nFind the agent's API name in its main details page in your org's Agent page in Setup.\n\nBefore you use this command, you must complete these steps:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n1. Create a connected app in your org as described in the \"Create a Connected App\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#create-a-connected-app. Do these four additional steps:\n\n a. When specifying the connected app's Callback URL, add this second callback URL on a new line: \"http://localhost:1717/OauthRedirect\".\n\n b. When adding the scopes to the connected app, add \"Manage user data via Web browsers (web)\".\n\n c. Ensure that the \"Require Secret for Web Server Flow\" option is not selected.\n\n d. Make note of the user that you specified as the \"Run As\" user when updating the Client Credentials Flow section.\n\n2. Add the connected app to your agent as described in the \"Add Connected App to Agent\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#add-connected-app-to-agent.\n\n3. Copy the consumer key from your connected app as described in the \"Obtain Credentials\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#obtain-credentials.\n\n4. Set the \"SFDX_AUTH_SCOPES\" environment variable to \"refresh_token sfap_api chatbot_api web api\". This step ensures that you get the specific OAuth scopes required by this command.\n\n5. Using the username of the user you specified as the \"Run As\" user above, authorize your org using the web server flow, as described in this document: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm.\n\n IMPORTANT: You must use the \"--client-id <CONNECTED-APP-CONSUMER-KEY>\" flag of \"org login web\", where CONNECTED-APP-CONSUMER-KEY is the consumer key you previously copied. This step ensures that the \"org login web\" command uses your custom connected app, and not the default CLI connected app.\n\n Press Enter to skip sharing the client secret.\n\n6. When you run this command to interact with an agent, specify the username you authorized in the preceding step with the --connected-app-user (-a) flag.",
107
+ "description": "Use this command to have a natural language conversation with an active agent in your org, as if you were an actual user. The interface is simple: in the \"Start typing...\" prompt, enter a statement, question, or command; when you're done, enter Return. Your utterance is posted on the right along with a timestamp. The agent then responds on the left. To exit the conversation, hit ESC or Control+C.\n\nThis command is useful to test if the agent responds to your utterances as you expect. For example, you can test that the agent uses a particular topic when asked a question, and then whether it invokes the correct action associated with that topic. This command is the CLI-equivalent of the Conversation Preview panel in your org's Agent Builder UI.\n\nWhen the session concludes, the command asks if you want to save the API responses and chat transcripts. By default, the files are saved to the \"./temp/agent-preview\" directory. Specify a new default directory by setting the environment variable \"SF_AGENT_PREVIEW_OUTPUT_DIR\" to the directory. Or you can pass the directory to the --output-dir flag.\n\nFind the agent's API name in its main details page in your org's Agent page in Setup.\n\nBefore you use this command, you must complete these steps:\n\n1. Create a connected app in your org as described in the \"Create a Connected App\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#create-a-connected-app. Do these four additional steps:\n\n a. When specifying the connected app's Callback URL, add this second callback URL on a new line: \"http://localhost:1717/OauthRedirect\".\n\n b. When adding the scopes to the connected app, add \"Manage user data via Web browsers (web)\".\n\n c. Ensure that the \"Require Secret for Web Server Flow\" option is not selected.\n\n d. Make note of the user that you specified as the \"Run As\" user when updating the Client Credentials Flow section.\n\n2. Add the connected app to your agent as described in the \"Add Connected App to Agent\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#add-connected-app-to-agent.\n\n3. Copy the consumer key from your connected app as described in the \"Obtain Credentials\" section here: https://developer.salesforce.com/docs/einstein/genai/guide/agent-api-get-started.html#obtain-credentials.\n\n4. Set the \"SFDX_AUTH_SCOPES\" environment variable to \"refresh_token sfap_api chatbot_api web api\". This step ensures that you get the specific OAuth scopes required by this command.\n\n5. Using the username of the user you specified as the \"Run As\" user above, authorize your org using the web server flow, as described in this document: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_web_flow.htm.\n\n IMPORTANT: You must use the \"--client-id <CONNECTED-APP-CONSUMER-KEY>\" flag of \"org login web\", where CONNECTED-APP-CONSUMER-KEY is the consumer key you previously copied. This step ensures that the \"org login web\" command uses your custom connected app, and not the default CLI connected app.\n\n Press Enter to skip sharing the client secret.\n\n6. When you run this command to interact with an agent, specify the username you authorized in the preceding step with the --connected-app-user (-a) flag.",
108
108
  "examples": [
109
109
  "Interact with an agent with API name \"Resort_Manager\" in the org with alias \"my-org\". Connect to your agent using the alias \"my-agent-user\"; this alias must point to the username who is authorized using the Web server flow:\n<%= config.bin %> <%= command.id %> --api-name \"Resort_Manager\" --target-org my-org --connected-app-user my-agent-user",
110
110
  "Same as the preceding example, but this time save the conversation transcripts to the \"./transcripts/my-preview\" directory rather than the default \"./temp/agent-preview\":\n<%= config.bin %> <%= command.id %> --api-name \"Resort_Manager\" --target-org my-org --connected-app-user my-agent-user --output-dir \"transcripts/my-preview\""
@@ -160,6 +160,13 @@
160
160
  "hasDynamicHelp": false,
161
161
  "multiple": false,
162
162
  "type": "option"
163
+ },
164
+ "apex-debug": {
165
+ "char": "x",
166
+ "name": "apex-debug",
167
+ "summary": "Enable Apex debug logging during the agent preview conversation.",
168
+ "allowNo": false,
169
+ "type": "boolean"
163
170
  }
164
171
  },
165
172
  "hasDynamicHelp": true,
@@ -1104,5 +1111,5 @@
1104
1111
  ]
1105
1112
  }
1106
1113
  },
1107
- "version": "1.21.1"
1114
+ "version": "1.22.0"
1108
1115
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
3
  "description": "Commands to interact with Salesforce agents",
4
- "version": "1.21.1",
4
+ "version": "1.22.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -9,7 +9,7 @@
9
9
  "@inquirer/prompts": "^7.2.0",
10
10
  "@oclif/core": "^4",
11
11
  "@oclif/multi-stage-output": "^0.7.12",
12
- "@salesforce/agents": "0.14.11",
12
+ "@salesforce/agents": "0.15.0",
13
13
  "@salesforce/core": "^8.10.2",
14
14
  "@salesforce/kit": "^3.2.3",
15
15
  "@salesforce/sf-plugins-core": "^12.2.0",
@@ -229,7 +229,7 @@
229
229
  "exports": "./lib/index.js",
230
230
  "type": "module",
231
231
  "sfdx": {
232
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.21.1.crt",
233
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.21.1.sig"
232
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.22.0.crt",
233
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.22.0.sig"
234
234
  }
235
235
  }