@salesforce/plugin-agent 1.13.0 → 1.13.1-preview.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
@@ -124,7 +124,7 @@ EXAMPLES
124
124
  $ sf agent create --agent-name ResortManager --spec specs/resortManagerAgent.yaml --preview
125
125
  ```
126
126
 
127
- _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/create.ts)_
127
+ _See code: [src/commands/agent/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/create.ts)_
128
128
 
129
129
  ## `sf agent generate agent-spec`
130
130
 
@@ -217,7 +217,7 @@ EXAMPLES
217
217
  smoothly" --target-org my-org
218
218
  ```
219
219
 
220
- _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/generate/agent-spec.ts)_
220
+ _See code: [src/commands/agent/generate/agent-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/generate/agent-spec.ts)_
221
221
 
222
222
  ## `sf agent generate test-spec`
223
223
 
@@ -240,7 +240,7 @@ EXAMPLES
240
240
  $ sf agent generate test-spec
241
241
  ```
242
242
 
243
- _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/generate/test-spec.ts)_
243
+ _See code: [src/commands/agent/generate/test-spec.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/generate/test-spec.ts)_
244
244
 
245
245
  ## `sf agent preview`
246
246
 
@@ -248,10 +248,11 @@ Interact with an active agent, as a user would, to preview responses
248
248
 
249
249
  ```
250
250
  USAGE
251
- $ sf agent preview -o <value> -n <value> [--flags-dir <value>] [--api-version <value>]
251
+ $ sf agent preview -o <value> [--flags-dir <value>] [--api-version <value>] [-n <value> | -i <value>]
252
252
 
253
253
  FLAGS
254
- -n, --name=<value> (required) The name of the agent you want to preview
254
+ -i, --id=<value> The Salesforce Id of the Agent to preview.
255
+ -n, --name=<value> The name of the agent you want to preview
255
256
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
256
257
  configuration variable is already set.
257
258
  --api-version=<value> Override the api version used for api requests made by this command
@@ -275,7 +276,7 @@ FLAG DESCRIPTIONS
275
276
  the API name of the agent? (TBD based on agents library)
276
277
  ```
277
278
 
278
- _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/preview.ts)_
279
+ _See code: [src/commands/agent/preview.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/preview.ts)_
279
280
 
280
281
  ## `sf agent test cancel`
281
282
 
@@ -312,7 +313,7 @@ EXAMPLES
312
313
  $ sf agent test cancel --job-id 4KBfake0000003F4AQ --target-org my-org
313
314
  ```
314
315
 
315
- _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/test/cancel.ts)_
316
+ _See code: [src/commands/agent/test/cancel.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/test/cancel.ts)_
316
317
 
317
318
  ## `sf agent test create`
318
319
 
@@ -348,7 +349,7 @@ FLAG DESCRIPTIONS
348
349
  More information about a flag. Don't repeat the summary.
349
350
  ```
350
351
 
351
- _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/test/create.ts)_
352
+ _See code: [src/commands/agent/test/create.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/test/create.ts)_
352
353
 
353
354
  ## `sf agent test list`
354
355
 
@@ -377,7 +378,7 @@ EXAMPLES
377
378
  $ sf agent test list
378
379
  ```
379
380
 
380
- _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/test/list.ts)_
381
+ _See code: [src/commands/agent/test/list.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/test/list.ts)_
381
382
 
382
383
  ## `sf agent test results`
383
384
 
@@ -433,7 +434,7 @@ FLAG DESCRIPTIONS
433
434
  test results aren't written.
434
435
  ```
435
436
 
436
- _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/test/results.ts)_
437
+ _See code: [src/commands/agent/test/results.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/test/results.ts)_
437
438
 
438
439
  ## `sf agent test resume`
439
440
 
@@ -496,7 +497,7 @@ FLAG DESCRIPTIONS
496
497
  test results aren't written.
497
498
  ```
498
499
 
499
- _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/test/resume.ts)_
500
+ _See code: [src/commands/agent/test/resume.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/test/resume.ts)_
500
501
 
501
502
  ## `sf agent test run`
502
503
 
@@ -559,6 +560,6 @@ FLAG DESCRIPTIONS
559
560
  test results aren't written.
560
561
  ```
561
562
 
562
- _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.0/src/commands/agent/test/run.ts)_
563
+ _See code: [src/commands/agent/test/run.ts](https://github.com/salesforcecli/plugin-agent/blob/1.13.1-preview.0/src/commands/agent/test/run.ts)_
563
564
 
564
565
  <!-- commandsstop -->
@@ -9,7 +9,8 @@ export default class AgentPreview extends SfCommand<AgentPreviewResult> {
9
9
  static readonly flags: {
10
10
  'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
11
11
  'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
- name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ id: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
14
  };
14
15
  run(): Promise<AgentPreviewResult>;
15
16
  }
@@ -5,9 +5,11 @@
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
7
  import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
8
- import { Messages } from '@salesforce/core';
8
+ import { Messages, SfError } from '@salesforce/core';
9
9
  import React from 'react';
10
10
  import { render } from 'ink';
11
+ import { AgentPreview as Preview } from '@salesforce/agents';
12
+ import { select } from '@inquirer/prompts';
11
13
  import { AgentPreviewReact } from '../../components/agent-preview-react.js';
12
14
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
13
15
  const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.preview');
@@ -24,13 +26,58 @@ export default class AgentPreview extends SfCommand {
24
26
  summary: messages.getMessage('flags.name.summary'),
25
27
  description: messages.getMessage('flags.name.description'),
26
28
  char: 'n',
27
- required: true,
29
+ exclusive: ['id'],
30
+ }),
31
+ id: Flags.salesforceId({
32
+ summary: messages.getMessage('flags.id.summary'),
33
+ char: 'i',
34
+ length: 'both',
35
+ startsWith: '0Xx',
36
+ exclusive: ['name'],
28
37
  }),
29
38
  };
30
39
  async run() {
31
40
  const { flags } = await this.parse(AgentPreview);
32
- this.log(`previewing ${flags.name}`);
33
- const instance = render(React.createElement(AgentPreviewReact, null));
41
+ const { id, name, 'target-org': org } = flags;
42
+ const conn = org.getConnection(flags['api-version']);
43
+ let agent;
44
+ if (name ?? id) {
45
+ try {
46
+ const where = name ? `MasterLabel='${!name}'` : `Id='${!id}'`;
47
+ agent = await conn.singleRecordQuery(`SELECT Id, MasterLabel FROM BotDefinition WHERE ${where}`);
48
+ }
49
+ catch (err) {
50
+ const error = err;
51
+ if (error.name === 'SingleRecordQuery_NoRecords') {
52
+ const type = name ? `name "${!name}"` : `id "${!id}"`;
53
+ this.warn(`No Agents were found with the ${type}. Searching org for Agents...`);
54
+ this.log('');
55
+ }
56
+ else {
57
+ throw error;
58
+ }
59
+ }
60
+ }
61
+ if (!agent?.Id) {
62
+ // TODO: Find a way to only return active agents
63
+ const agents = await conn.query('SELECT Id, MasterLabel from BotDefinition LIMIT 100');
64
+ const agentsInOrg = agents.records.map((agentInOrg) => ({
65
+ name: agentInOrg.MasterLabel,
66
+ value: {
67
+ Id: agentInOrg.Id,
68
+ MasterLabel: agentInOrg.MasterLabel,
69
+ },
70
+ }));
71
+ agent = await select({
72
+ message: 'Select an agent',
73
+ choices: agentsInOrg,
74
+ });
75
+ }
76
+ if (!agent?.Id) {
77
+ throw new SfError('No Agent selected');
78
+ }
79
+ const agentPreview = new Preview(conn);
80
+ const instance = render(React.createElement(AgentPreviewReact, { agent: agentPreview, id: agent.Id, name: agent.MasterLabel }));
34
81
  await instance.waitUntilExit();
35
82
  }
36
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/commands/agent/preview.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,0BAA0B,EAAE,eAAe,CAAC,CAAC;AAIpF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAA6B;IAC9D,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AqD,CAAC,CAAC;YAEnG,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;gBACtD,IAAI,EAAE,UAAU,CAAC,WAAW;gBAC5B,KAAK,EAAE;oBACL,EAAE,EAAE,UAAU,CAAC,EAAE;oBACjB,WAAW,EAAE,UAAU,CAAC,WAAW;iBACpC;aACF,CAAC,CAAC,CAAC;YAEJ,KAAK,GAAG,MAAM,MAAM,CAAC;gBACnB,OAAO,EAAE,iBAAiB;gBAC1B,OAAO,EAAE,WAAW;aACrB,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC;YACf,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,MAAM,CACrB,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,CAAC,CACvG,CAAC;QACF,MAAM,QAAQ,CAAC,aAAa,EAAE,CAAC;IACjC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { AgentPreview } from '@salesforce/agents';
2
3
  /**
3
4
  * Ideas:
4
5
  * - Limit height based on terminal height
@@ -6,4 +7,8 @@ import React from 'react';
6
7
  * - Add keystroke to scroll up
7
8
  * - Add keystroke to scroll down
8
9
  */
9
- export declare function AgentPreviewReact(): React.ReactNode;
10
+ export declare function AgentPreviewReact(props: {
11
+ readonly agent: AgentPreview;
12
+ readonly id: string;
13
+ readonly name: string;
14
+ }): React.ReactNode;
@@ -4,11 +4,53 @@
4
4
  * Licensed under the BSD 3-Clause license.
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
+ import path from 'node:path';
8
+ import { tmpdir } from 'node:os';
9
+ import fs from 'node:fs';
7
10
  import React from 'react';
8
11
  import { Box, Text } from 'ink';
9
12
  import figures from '@inquirer/figures';
10
13
  import TextInput from 'ink-text-input';
11
14
  import { sleep } from '@salesforce/kit';
15
+ // TODO:
16
+ // - [ ] Add a way to end the session
17
+ // - [ ] On exit, notify that the transcript and results have been saved
18
+ // - [x] Fix timestamp on Typing
19
+ // - [ ] Break this into more components
20
+ // - [ ] Flashing in iterm2
21
+ // - [x] Correct the content width calculation
22
+ // - [x] Add a way to save the transcript to a file
23
+ // - [x] Add a way to save API results to a file
24
+ // - [ ] If you ask to be connected with a human, then messages[0].message is empty...
25
+ // - [ ] It looks like if the type is Escalate, then the next message is empty
26
+ // - [ ] Add the response type on the AgentResponse
27
+ // Component to show a simple typing animation
28
+ function Typing() {
29
+ const [frame, setFrame] = React.useState(0);
30
+ React.useEffect(() => {
31
+ const timer = setInterval(() => {
32
+ setFrame((prev) => (prev + 1) % 4);
33
+ }, 350);
34
+ return () => clearInterval(timer);
35
+ }, []);
36
+ const colors = ['grey', 'grey', 'grey'];
37
+ colors[frame] = 'white';
38
+ return (React.createElement(Text, null,
39
+ React.createElement(Text, { color: colors[0] }, "."),
40
+ React.createElement(Text, { color: colors[1] }, "."),
41
+ React.createElement(Text, { color: colors[2] }, ".")));
42
+ }
43
+ // We split the content on newlines, then find the longest array element
44
+ const calculateWidth = (content) => content.split('\n').reduce((acc, line) => Math.max(acc, line.length), 0) + 4;
45
+ const saveTranscriptsToFile = (tempDir, messages, responses) => {
46
+ if (!tempDir)
47
+ return;
48
+ fs.mkdirSync(tempDir, { recursive: true });
49
+ const transcriptPath = path.join(tempDir, 'transcript.json');
50
+ fs.writeFileSync(transcriptPath, JSON.stringify(messages, null, 2));
51
+ const responsesPath = path.join(tempDir, 'responses.json');
52
+ fs.writeFileSync(responsesPath, JSON.stringify(responses, null, 2));
53
+ };
12
54
  /**
13
55
  * Ideas:
14
56
  * - Limit height based on terminal height
@@ -16,19 +58,56 @@ import { sleep } from '@salesforce/kit';
16
58
  * - Add keystroke to scroll up
17
59
  * - Add keystroke to scroll down
18
60
  */
19
- export function AgentPreviewReact() {
20
- const [comments, setComments] = React.useState([]);
61
+ export function AgentPreviewReact(props) {
62
+ const [messages, setMessages] = React.useState([]);
63
+ const [header, setHeader] = React.useState('Starting session...');
64
+ const [sessionId, setSessionId] = React.useState('');
21
65
  const [query, setQuery] = React.useState('');
66
+ const [isTyping, setIsTyping] = React.useState(true);
67
+ // @ts-expect-error: Complains if this is not defined but it's not used
68
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
69
+ const [timestamp, setTimestamp] = React.useState(new Date().getTime());
70
+ const [tempDir, setTempDir] = React.useState('');
71
+ // TODO: Fix type
72
+ const [responses, setResponses] = React.useState([]);
73
+ const { agent, id, name } = props;
74
+ React.useEffect(() => {
75
+ const startSession = async () => {
76
+ const session = await agent.start(id);
77
+ setSessionId(session.sessionId);
78
+ setHeader(`New session started with "${props.name}" (${session.sessionId})`);
79
+ await sleep(1300); // Add a delay to make it feel more natural
80
+ setIsTyping(false);
81
+ setTempDir(path.join(tmpdir(), 'agent-preview', `${timestamp}-${session.sessionId}`));
82
+ setMessages([{ role: name, content: session.messages[0].message, timestamp: new Date() }]);
83
+ };
84
+ void startSession();
85
+ }, []);
86
+ React.useEffect(() => {
87
+ saveTranscriptsToFile(tempDir, messages, responses);
88
+ }, [tempDir, messages, responses]);
22
89
  return (React.createElement(Box, { flexDirection: "column" },
23
- comments.length > 0 && (React.createElement(Box, { flexDirection: "column" },
24
- comments.map(({ timestamp, role, content }, idx) => (React.createElement(Box, { key: role + '__' + timestamp.toISOString() + '__' + idx.toString(), alignItems: role === 'user' ? 'flex-end' : 'flex-start', flexDirection: "column" },
90
+ React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", alignItems: "center", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
91
+ React.createElement(Text, { bold: true }, header)),
92
+ messages.length > 0 && (React.createElement(Box, { flexDirection: "column" }, messages.map(({ timestamp: ts, role, content }, idx) => (React.createElement(Box, { key: role + '__' + ts.toISOString() + '__' + idx.toString(), alignItems: role === 'user' ? 'flex-end' : 'flex-start', flexDirection: "column" },
93
+ React.createElement(Box, { flexDirection: "row", columnGap: 1 },
94
+ React.createElement(Text, null, role === 'user' ? 'You' : role),
95
+ React.createElement(Text, { color: "grey" }, ts.toLocaleString())),
96
+ React.createElement(Box
97
+ // Use 70% of the terminal width, or the width of a single line of content, whichever is smaller
98
+ , {
99
+ // Use 70% of the terminal width, or the width of a single line of content, whichever is smaller
100
+ width: Math.min(process.stdout.columns * 0.7, calculateWidth(content)), borderStyle: "round", paddingLeft: 1, paddingRight: 1 },
101
+ React.createElement(Text, null, content))))))),
102
+ isTyping ? (React.createElement(Box, { flexDirection: "column" },
103
+ React.createElement(Box, { alignItems: "flex-start", flexDirection: "column" },
25
104
  React.createElement(Box, { flexDirection: "row", columnGap: 1 },
26
- React.createElement(Text, null, role === 'user' ? 'You' : role),
27
- React.createElement(Text, { color: "gray" }, timestamp.toLocaleString())),
28
- React.createElement(Box, { width: Math.min(process.stdout.columns - 4, content.length + 4), borderStyle: "round", paddingLeft: 1, paddingRight: 1 },
29
- React.createElement(Text, null, content))))),
30
- React.createElement(Box, { paddingLeft: 1, paddingRight: 1 },
31
- React.createElement(Text, { dimColor: true }, '─'.repeat(process.stdout.columns - 2))))),
105
+ React.createElement(Text, null, name),
106
+ React.createElement(Text, { color: "grey" }, new Date().toLocaleString())),
107
+ React.createElement(Box, { width: 7, borderStyle: "round", paddingLeft: 1, paddingRight: 1 },
108
+ React.createElement(Typing, null))))) : null,
109
+ React.createElement(Box, { paddingLeft: 1, paddingRight: 1 },
110
+ React.createElement(Text, { dimColor: true }, '─'.repeat(process.stdout.columns - 2))),
32
111
  React.createElement(Box, null,
33
112
  React.createElement(Text, null,
34
113
  figures.pointer,
@@ -39,18 +118,18 @@ export function AgentPreviewReact() {
39
118
  if (!content)
40
119
  return;
41
120
  setQuery('');
42
- setComments((prev) => [...prev, { role: 'user', content, timestamp: new Date() }]);
43
- await sleep(1000);
44
- setComments((prev) => {
45
- const lastComment = prev[prev.length - 1];
46
- // TODO - use agents library for generations
47
- return (Math.random() * 2) % 2 > 1
48
- ? [
49
- ...prev,
50
- { role: 'system', content: "I'm sorry, I can't help with this request", timestamp: new Date() },
51
- ]
52
- : [...prev, { ...lastComment, role: 'system', content: 'We have a scuba class at 9:30 AM' }];
53
- });
121
+ // Add the most recent user message to the chat window
122
+ setMessages((prev) => [...prev, { role: 'user', content, timestamp: new Date() }]);
123
+ setIsTyping(true);
124
+ const response = await agent.send(sessionId, content);
125
+ setResponses((prev) => [...prev, response]);
126
+ const message = response.messages[0].message;
127
+ if (!message) {
128
+ throw new Error('Failed to send message');
129
+ }
130
+ setIsTyping(false);
131
+ // Add the agent's response to the chat
132
+ setMessages((prev) => [...prev, { role: name, content: message, timestamp: new Date() }]);
54
133
  } }))));
55
134
  }
56
135
  //# 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,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAC5C,EAAE,CACH,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAA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AAC,GACD,CACE,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -18,3 +18,7 @@ the API name of the agent? (TBD based on agents library)
18
18
 
19
19
  - <%= config.bin %> <%= command.id %> --agent HelpDeskAgent
20
20
  - <%= config.bin %> <%= command.id %> --agent ConciergeAgent --target-org production
21
+
22
+ # flags.id.summary
23
+
24
+ The Salesforce Id of the Agent to preview.
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-agent",
3
- "version": "1.13.0",
3
+ "version": "1.13.1-preview.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/plugin-agent",
9
- "version": "1.13.0",
9
+ "version": "1.13.1-preview.0",
10
10
  "license": "BSD-3-Clause",
11
11
  "dependencies": {
12
12
  "@inquirer/figures": "^1.0.7",
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.9.2",
16
+ "@salesforce/agents": "0.9.5-preview.1",
17
17
  "@salesforce/core": "^8.8.0",
18
18
  "@salesforce/kit": "^3.2.1",
19
19
  "@salesforce/sf-plugins-core": "^12.1.0",
@@ -2981,6 +2981,15 @@
2981
2981
  "url": "https://github.com/chalk/ansi-styles?sponsor=1"
2982
2982
  }
2983
2983
  },
2984
+ "node_modules/@oclif/core/node_modules/ansis": {
2985
+ "version": "3.9.0",
2986
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.9.0.tgz",
2987
+ "integrity": "sha512-PcDrVe15ldexeZMsVLBAzBwF2KhZgaU0R+CHxH+x5kqn/pO+UWVBZJ+NEXMPpEOLUFeNsnNdoWYc2gwO+MVkDg==",
2988
+ "license": "ISC",
2989
+ "engines": {
2990
+ "node": ">=16"
2991
+ }
2992
+ },
2984
2993
  "node_modules/@oclif/core/node_modules/minimatch": {
2985
2994
  "version": "9.0.5",
2986
2995
  "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
@@ -3228,9 +3237,9 @@
3228
3237
  }
3229
3238
  },
3230
3239
  "node_modules/@oclif/table": {
3231
- "version": "0.4.3",
3232
- "resolved": "https://registry.npmjs.org/@oclif/table/-/table-0.4.3.tgz",
3233
- "integrity": "sha512-fioTULPaOilLeLVKfgcd7cJXzFBHeRKumjYcj3NeuYiyl6J4EcaCDYsy6tSyrBASqoWD0xzc5Hv21zCLG0CS+g==",
3240
+ "version": "0.4.5",
3241
+ "resolved": "https://registry.npmjs.org/@oclif/table/-/table-0.4.5.tgz",
3242
+ "integrity": "sha512-ldqrkQjWMCsIZ+yApLMs+eVqIgdBsp7lwTPTcSn8dvEVcifmTnBbMbZidhryKlsr9G+4MgjefOZ4akJvdcPN3A==",
3234
3243
  "license": "MIT",
3235
3244
  "dependencies": {
3236
3245
  "@oclif/core": "^4",
@@ -3350,17 +3359,18 @@
3350
3359
  }
3351
3360
  },
3352
3361
  "node_modules/@salesforce/agents": {
3353
- "version": "0.9.2",
3354
- "resolved": "https://registry.npmjs.org/@salesforce/agents/-/agents-0.9.2.tgz",
3355
- "integrity": "sha512-z/+mMa1GgiEwFpg+FD40ahzJhtf7Am5G8H+qHXjrUBijk7CdFm5lGZGvX0+LzhxD/Atn44qOo05V3Z3RuN7qYw==",
3362
+ "version": "0.9.5-preview.1",
3363
+ "resolved": "https://registry.npmjs.org/@salesforce/agents/-/agents-0.9.5-preview.1.tgz",
3364
+ "integrity": "sha512-gqCXKkdugI7zn3jzCPRnZQrYPBYvya+3MG0H0HiJo0tUwnX8ar98BtilReuav7T5pIlxnQX1PaXixVn3hNvhbA==",
3356
3365
  "license": "BSD-3-Clause",
3357
3366
  "dependencies": {
3358
3367
  "@salesforce/core": "^8.8.2",
3359
3368
  "@salesforce/kit": "^3.2.3",
3360
- "@salesforce/sf-plugins-core": "^12.1.2",
3369
+ "@salesforce/sf-plugins-core": "^12.1.3",
3361
3370
  "@salesforce/source-deploy-retrieve": "^12.14.1",
3362
- "ansis": "^3.9.0",
3371
+ "ansis": "^3.10.0",
3363
3372
  "fast-xml-parser": "^4.5.1",
3373
+ "got": "^11.8.6",
3364
3374
  "nock": "^13.5.6",
3365
3375
  "yaml": "^2.7.0"
3366
3376
  },
@@ -3368,6 +3378,65 @@
3368
3378
  "node": ">=18.0.0"
3369
3379
  }
3370
3380
  },
3381
+ "node_modules/@salesforce/agents/node_modules/@oclif/core": {
3382
+ "version": "4.2.5",
3383
+ "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.2.5.tgz",
3384
+ "integrity": "sha512-bdXOojq8GaPnWnDgVOw030JlUROJEiDLXiV3XUUGUQDEp6YpVQvEYLIrUsEvyfASU3z3FGg3DC9k0kprcOYdhw==",
3385
+ "license": "MIT",
3386
+ "dependencies": {
3387
+ "ansi-escapes": "^4.3.2",
3388
+ "ansis": "^3.9.0",
3389
+ "clean-stack": "^3.0.1",
3390
+ "cli-spinners": "^2.9.2",
3391
+ "debug": "^4.4.0",
3392
+ "ejs": "^3.1.10",
3393
+ "get-package-type": "^0.1.0",
3394
+ "globby": "^11.1.0",
3395
+ "indent-string": "^4.0.0",
3396
+ "is-wsl": "^2.2.0",
3397
+ "lilconfig": "^3.1.3",
3398
+ "minimatch": "^9.0.5",
3399
+ "semver": "^7.6.3",
3400
+ "string-width": "^4.2.3",
3401
+ "supports-color": "^8",
3402
+ "widest-line": "^3.1.0",
3403
+ "wordwrap": "^1.0.0",
3404
+ "wrap-ansi": "^7.0.0"
3405
+ },
3406
+ "engines": {
3407
+ "node": ">=18.0.0"
3408
+ }
3409
+ },
3410
+ "node_modules/@salesforce/agents/node_modules/@salesforce/sf-plugins-core": {
3411
+ "version": "12.1.3",
3412
+ "resolved": "https://registry.npmjs.org/@salesforce/sf-plugins-core/-/sf-plugins-core-12.1.3.tgz",
3413
+ "integrity": "sha512-xJSzwl2G7OYSpZTokzWgq9Ybfw/ZtR3reQEFvJTNATLoPk7nv7UGo8WWbX1gcaepURBVvtmQlHsa8mVyoKjYmw==",
3414
+ "license": "BSD-3-Clause",
3415
+ "dependencies": {
3416
+ "@inquirer/confirm": "^3.1.22",
3417
+ "@inquirer/password": "^2.2.0",
3418
+ "@oclif/core": "^4.2.4",
3419
+ "@oclif/table": "^0.4.0",
3420
+ "@salesforce/core": "^8.5.1",
3421
+ "@salesforce/kit": "^3.2.3",
3422
+ "@salesforce/ts-types": "^2.0.12",
3423
+ "ansis": "^3.3.2",
3424
+ "cli-progress": "^3.12.0",
3425
+ "terminal-link": "^3.0.0"
3426
+ },
3427
+ "engines": {
3428
+ "node": ">=18.0.0"
3429
+ }
3430
+ },
3431
+ "node_modules/@salesforce/agents/node_modules/@salesforce/sf-plugins-core/node_modules/ansis": {
3432
+ "version": "3.3.2",
3433
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.3.2.tgz",
3434
+ "integrity": "sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==",
3435
+ "license": "ISC",
3436
+ "engines": {
3437
+ "node": ">=15"
3438
+ }
3439
+ },
3371
3440
  "node_modules/@salesforce/agents/node_modules/@salesforce/source-deploy-retrieve": {
3372
3441
  "version": "12.14.1",
3373
3442
  "resolved": "https://registry.npmjs.org/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.14.1.tgz",
@@ -3393,6 +3462,30 @@
3393
3462
  "node": ">=18.0.0"
3394
3463
  }
3395
3464
  },
3465
+ "node_modules/@salesforce/agents/node_modules/ansi-styles": {
3466
+ "version": "4.3.0",
3467
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
3468
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
3469
+ "license": "MIT",
3470
+ "dependencies": {
3471
+ "color-convert": "^2.0.1"
3472
+ },
3473
+ "engines": {
3474
+ "node": ">=8"
3475
+ },
3476
+ "funding": {
3477
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
3478
+ }
3479
+ },
3480
+ "node_modules/@salesforce/agents/node_modules/ansis": {
3481
+ "version": "3.10.0",
3482
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.10.0.tgz",
3483
+ "integrity": "sha512-hxDKLYT7hy3Y4sF3HxI926A3urzPxi73mZBB629m9bCVF+NyKNxbwCqqm+C/YrGPtxLwnl6d8/ZASCsz6SyvJA==",
3484
+ "license": "ISC",
3485
+ "engines": {
3486
+ "node": ">=16"
3487
+ }
3488
+ },
3396
3489
  "node_modules/@salesforce/agents/node_modules/minimatch": {
3397
3490
  "version": "9.0.5",
3398
3491
  "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
@@ -3408,6 +3501,38 @@
3408
3501
  "url": "https://github.com/sponsors/isaacs"
3409
3502
  }
3410
3503
  },
3504
+ "node_modules/@salesforce/agents/node_modules/supports-color": {
3505
+ "version": "8.1.1",
3506
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
3507
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
3508
+ "license": "MIT",
3509
+ "dependencies": {
3510
+ "has-flag": "^4.0.0"
3511
+ },
3512
+ "engines": {
3513
+ "node": ">=10"
3514
+ },
3515
+ "funding": {
3516
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
3517
+ }
3518
+ },
3519
+ "node_modules/@salesforce/agents/node_modules/wrap-ansi": {
3520
+ "version": "7.0.0",
3521
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
3522
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
3523
+ "license": "MIT",
3524
+ "dependencies": {
3525
+ "ansi-styles": "^4.0.0",
3526
+ "string-width": "^4.1.0",
3527
+ "strip-ansi": "^6.0.0"
3528
+ },
3529
+ "engines": {
3530
+ "node": ">=10"
3531
+ },
3532
+ "funding": {
3533
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
3534
+ }
3535
+ },
3411
3536
  "node_modules/@salesforce/cli-plugins-testkit": {
3412
3537
  "version": "5.3.35",
3413
3538
  "resolved": "https://registry.npmjs.org/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-5.3.35.tgz",
@@ -5285,12 +5410,12 @@
5285
5410
  }
5286
5411
  },
5287
5412
  "node_modules/ansis": {
5288
- "version": "3.9.0",
5289
- "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.9.0.tgz",
5290
- "integrity": "sha512-PcDrVe15ldexeZMsVLBAzBwF2KhZgaU0R+CHxH+x5kqn/pO+UWVBZJ+NEXMPpEOLUFeNsnNdoWYc2gwO+MVkDg==",
5413
+ "version": "3.3.2",
5414
+ "resolved": "https://registry.npmjs.org/ansis/-/ansis-3.3.2.tgz",
5415
+ "integrity": "sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==",
5291
5416
  "license": "ISC",
5292
5417
  "engines": {
5293
- "node": ">=16"
5418
+ "node": ">=15"
5294
5419
  }
5295
5420
  },
5296
5421
  "node_modules/anymatch": {
@@ -5562,6 +5687,12 @@
5562
5687
  "node": ">=4"
5563
5688
  }
5564
5689
  },
5690
+ "node_modules/ast-types/node_modules/tslib": {
5691
+ "version": "2.8.1",
5692
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
5693
+ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
5694
+ "license": "0BSD"
5695
+ },
5565
5696
  "node_modules/async": {
5566
5697
  "version": "3.2.4",
5567
5698
  "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz",
@@ -14527,9 +14658,9 @@
14527
14658
  }
14528
14659
  },
14529
14660
  "node_modules/tslib": {
14530
- "version": "2.8.1",
14531
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
14532
- "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
14661
+ "version": "2.6.3",
14662
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
14663
+ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
14533
14664
  "license": "0BSD"
14534
14665
  },
14535
14666
  "node_modules/tunnel-agent": {
package/oclif.lock CHANGED
@@ -1377,6 +1377,30 @@
1377
1377
  wordwrap "^1.0.0"
1378
1378
  wrap-ansi "^7.0.0"
1379
1379
 
1380
+ "@oclif/core@^4.2.4":
1381
+ version "4.2.5"
1382
+ resolved "https://registry.yarnpkg.com/@oclif/core/-/core-4.2.5.tgz#6b51e1db17272204b2431fee3eba93a21d59ebbe"
1383
+ integrity sha512-bdXOojq8GaPnWnDgVOw030JlUROJEiDLXiV3XUUGUQDEp6YpVQvEYLIrUsEvyfASU3z3FGg3DC9k0kprcOYdhw==
1384
+ dependencies:
1385
+ ansi-escapes "^4.3.2"
1386
+ ansis "^3.9.0"
1387
+ clean-stack "^3.0.1"
1388
+ cli-spinners "^2.9.2"
1389
+ debug "^4.4.0"
1390
+ ejs "^3.1.10"
1391
+ get-package-type "^0.1.0"
1392
+ globby "^11.1.0"
1393
+ indent-string "^4.0.0"
1394
+ is-wsl "^2.2.0"
1395
+ lilconfig "^3.1.3"
1396
+ minimatch "^9.0.5"
1397
+ semver "^7.6.3"
1398
+ string-width "^4.2.3"
1399
+ supports-color "^8"
1400
+ widest-line "^3.1.0"
1401
+ wordwrap "^1.0.0"
1402
+ wrap-ansi "^7.0.0"
1403
+
1380
1404
  "@oclif/multi-stage-output@^0.7.12":
1381
1405
  version "0.7.12"
1382
1406
  resolved "https://registry.yarnpkg.com/@oclif/multi-stage-output/-/multi-stage-output-0.7.12.tgz#04df5efb6dce527920cf475c9ad9f20236803ccd"
@@ -1434,9 +1458,9 @@
1434
1458
  lodash "^4.17.21"
1435
1459
 
1436
1460
  "@oclif/table@^0.4.0":
1437
- version "0.4.3"
1438
- resolved "https://registry.yarnpkg.com/@oclif/table/-/table-0.4.3.tgz#5766e0f745f6533575843eabc59259c269d4e87f"
1439
- integrity sha512-fioTULPaOilLeLVKfgcd7cJXzFBHeRKumjYcj3NeuYiyl6J4EcaCDYsy6tSyrBASqoWD0xzc5Hv21zCLG0CS+g==
1461
+ version "0.4.5"
1462
+ resolved "https://registry.yarnpkg.com/@oclif/table/-/table-0.4.5.tgz#f878cf3b5a381351753d78f23f9fe2db3c849e41"
1463
+ integrity sha512-ldqrkQjWMCsIZ+yApLMs+eVqIgdBsp7lwTPTcSn8dvEVcifmTnBbMbZidhryKlsr9G+4MgjefOZ4akJvdcPN3A==
1440
1464
  dependencies:
1441
1465
  "@oclif/core" "^4"
1442
1466
  "@types/react" "^18.3.12"
@@ -1462,17 +1486,18 @@
1462
1486
  resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
1463
1487
  integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
1464
1488
 
1465
- "@salesforce/agents@^0.9.2":
1466
- version "0.9.2"
1467
- resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.9.2.tgz#eacad6fab97cd156484b78a974f47389efaefb27"
1468
- integrity sha512-z/+mMa1GgiEwFpg+FD40ahzJhtf7Am5G8H+qHXjrUBijk7CdFm5lGZGvX0+LzhxD/Atn44qOo05V3Z3RuN7qYw==
1489
+ "@salesforce/agents@0.9.5-preview.1":
1490
+ version "0.9.5-preview.1"
1491
+ resolved "https://registry.yarnpkg.com/@salesforce/agents/-/agents-0.9.5-preview.1.tgz#a2fd8da687b1ce8835d4c953635ec0dd6b1a3f15"
1492
+ integrity sha512-gqCXKkdugI7zn3jzCPRnZQrYPBYvya+3MG0H0HiJo0tUwnX8ar98BtilReuav7T5pIlxnQX1PaXixVn3hNvhbA==
1469
1493
  dependencies:
1470
1494
  "@salesforce/core" "^8.8.2"
1471
1495
  "@salesforce/kit" "^3.2.3"
1472
- "@salesforce/sf-plugins-core" "^12.1.2"
1496
+ "@salesforce/sf-plugins-core" "^12.1.3"
1473
1497
  "@salesforce/source-deploy-retrieve" "^12.14.1"
1474
- ansis "^3.9.0"
1498
+ ansis "^3.10.0"
1475
1499
  fast-xml-parser "^4.5.1"
1500
+ got "^11.8.6"
1476
1501
  nock "^13.5.6"
1477
1502
  yaml "^2.7.0"
1478
1503
 
@@ -1602,7 +1627,7 @@
1602
1627
  string-width "^7.2.0"
1603
1628
  terminal-link "^3.0.0"
1604
1629
 
1605
- "@salesforce/sf-plugins-core@^12.1.0", "@salesforce/sf-plugins-core@^12.1.2":
1630
+ "@salesforce/sf-plugins-core@^12.1.0":
1606
1631
  version "12.1.2"
1607
1632
  resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.1.2.tgz#0c4fba3787ee670014c8bca447c2fc59fb9c3ec3"
1608
1633
  integrity sha512-qrmGZr2mG7uOpqhOpeOJjBEVztM7Mt8B10lD3rG+aOBZQelTm3YQ738yZYcwHjksQW3AOyf0QtqZICCfe0nD8A==
@@ -1618,6 +1643,22 @@
1618
1643
  cli-progress "^3.12.0"
1619
1644
  terminal-link "^3.0.0"
1620
1645
 
1646
+ "@salesforce/sf-plugins-core@^12.1.3":
1647
+ version "12.1.3"
1648
+ resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.1.3.tgz#4150b231f50bcdb64d6bd471a9d8f25f7ca57273"
1649
+ integrity sha512-xJSzwl2G7OYSpZTokzWgq9Ybfw/ZtR3reQEFvJTNATLoPk7nv7UGo8WWbX1gcaepURBVvtmQlHsa8mVyoKjYmw==
1650
+ dependencies:
1651
+ "@inquirer/confirm" "^3.1.22"
1652
+ "@inquirer/password" "^2.2.0"
1653
+ "@oclif/core" "^4.2.4"
1654
+ "@oclif/table" "^0.4.0"
1655
+ "@salesforce/core" "^8.5.1"
1656
+ "@salesforce/kit" "^3.2.3"
1657
+ "@salesforce/ts-types" "^2.0.12"
1658
+ ansis "^3.3.2"
1659
+ cli-progress "^3.12.0"
1660
+ terminal-link "^3.0.0"
1661
+
1621
1662
  "@salesforce/source-deploy-retrieve@^12.14.0":
1622
1663
  version "12.14.0"
1623
1664
  resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.14.0.tgz#04036f76301071b2188c92f70d77a138bc0d72cf"
@@ -2681,7 +2722,17 @@ ansi-styles@^6.0.0, ansi-styles@^6.1.0, ansi-styles@^6.2.1:
2681
2722
  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
2682
2723
  integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
2683
2724
 
2684
- ansis@^3.3.1, ansis@^3.3.2, ansis@^3.8.1, ansis@^3.9.0:
2725
+ ansis@^3.10.0, ansis@^3.9.0:
2726
+ version "3.10.0"
2727
+ resolved "https://registry.yarnpkg.com/ansis/-/ansis-3.10.0.tgz#6886afb0f729b1fa865df6b710b97a9915b7d0d4"
2728
+ integrity sha512-hxDKLYT7hy3Y4sF3HxI926A3urzPxi73mZBB629m9bCVF+NyKNxbwCqqm+C/YrGPtxLwnl6d8/ZASCsz6SyvJA==
2729
+
2730
+ ansis@^3.3.1, ansis@^3.3.2:
2731
+ version "3.3.2"
2732
+ resolved "https://registry.yarnpkg.com/ansis/-/ansis-3.3.2.tgz#15adc36fea112da95c74d309706e593618accac3"
2733
+ integrity sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==
2734
+
2735
+ ansis@^3.8.1:
2685
2736
  version "3.9.0"
2686
2737
  resolved "https://registry.yarnpkg.com/ansis/-/ansis-3.9.0.tgz#d195c93c31a333916142ff8f0be4d7e3872f262e"
2687
2738
  integrity sha512-PcDrVe15ldexeZMsVLBAzBwF2KhZgaU0R+CHxH+x5kqn/pO+UWVBZJ+NEXMPpEOLUFeNsnNdoWYc2gwO+MVkDg==
@@ -7499,16 +7550,7 @@ stack-utils@^2.0.6:
7499
7550
  dependencies:
7500
7551
  escape-string-regexp "^2.0.0"
7501
7552
 
7502
- "string-width-cjs@npm:string-width@^4.2.0":
7503
- version "4.2.3"
7504
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
7505
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
7506
- dependencies:
7507
- emoji-regex "^8.0.0"
7508
- is-fullwidth-code-point "^3.0.0"
7509
- strip-ansi "^6.0.1"
7510
-
7511
- string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7553
+ "string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7512
7554
  version "4.2.3"
7513
7555
  resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
7514
7556
  integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -7603,14 +7645,7 @@ string_decoder@~1.1.1:
7603
7645
  dependencies:
7604
7646
  safe-buffer "~5.1.0"
7605
7647
 
7606
- "strip-ansi-cjs@npm:strip-ansi@^6.0.1":
7607
- version "6.0.1"
7608
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
7609
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
7610
- dependencies:
7611
- ansi-regex "^5.0.1"
7612
-
7613
- strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
7648
+ "strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1:
7614
7649
  version "6.0.1"
7615
7650
  resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
7616
7651
  integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -7832,11 +7867,16 @@ tsconfig-paths@^3.15.0:
7832
7867
  minimist "^1.2.6"
7833
7868
  strip-bom "^3.0.0"
7834
7869
 
7835
- tslib@^2.0.1, tslib@^2.0.3, tslib@^2.5.0, tslib@^2.6.2:
7870
+ tslib@^2.0.1:
7836
7871
  version "2.8.1"
7837
7872
  resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
7838
7873
  integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
7839
7874
 
7875
+ tslib@^2.0.3, tslib@^2.5.0, tslib@^2.6.2:
7876
+ version "2.6.3"
7877
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
7878
+ integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
7879
+
7840
7880
  tunnel-agent@*, tunnel-agent@^0.6.0:
7841
7881
  version "0.6.0"
7842
7882
  resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
@@ -8219,7 +8259,7 @@ workerpool@^6.5.1:
8219
8259
  resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"
8220
8260
  integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==
8221
8261
 
8222
- "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
8262
+ "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
8223
8263
  version "7.0.0"
8224
8264
  resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
8225
8265
  integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -8237,15 +8277,6 @@ wrap-ansi@^6.2.0:
8237
8277
  string-width "^4.1.0"
8238
8278
  strip-ansi "^6.0.0"
8239
8279
 
8240
- wrap-ansi@^7.0.0:
8241
- version "7.0.0"
8242
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
8243
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
8244
- dependencies:
8245
- ansi-styles "^4.0.0"
8246
- string-width "^4.1.0"
8247
- strip-ansi "^6.0.0"
8248
-
8249
8280
  wrap-ansi@^8.1.0:
8250
8281
  version "8.1.0"
8251
8282
  resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
@@ -138,12 +138,25 @@
138
138
  "name": {
139
139
  "char": "n",
140
140
  "description": "the API name of the agent? (TBD based on agents library)",
141
+ "exclusive": [
142
+ "id"
143
+ ],
141
144
  "name": "name",
142
- "required": true,
143
145
  "summary": "The name of the agent you want to preview",
144
146
  "hasDynamicHelp": false,
145
147
  "multiple": false,
146
148
  "type": "option"
149
+ },
150
+ "id": {
151
+ "char": "i",
152
+ "exclusive": [
153
+ "name"
154
+ ],
155
+ "name": "id",
156
+ "summary": "The Salesforce Id of the Agent to preview.",
157
+ "hasDynamicHelp": false,
158
+ "multiple": false,
159
+ "type": "option"
147
160
  }
148
161
  },
149
162
  "hasDynamicHelp": true,
@@ -985,5 +998,5 @@
985
998
  ]
986
999
  }
987
1000
  },
988
- "version": "1.13.0"
1001
+ "version": "1.13.1-preview.0"
989
1002
  }
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.13.0",
4
+ "version": "1.13.1-preview.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.9.2",
12
+ "@salesforce/agents": "0.9.5-preview.1",
13
13
  "@salesforce/core": "^8.8.0",
14
14
  "@salesforce/kit": "^3.2.1",
15
15
  "@salesforce/sf-plugins-core": "^12.1.0",
@@ -226,7 +226,7 @@
226
226
  "exports": "./lib/index.js",
227
227
  "type": "module",
228
228
  "sfdx": {
229
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.13.0.crt",
230
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.13.0.sig"
229
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.13.1-preview.0.crt",
230
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.13.1-preview.0.sig"
231
231
  }
232
232
  }