@salesforce/plugin-agent 1.24.14-nga.1 → 1.24.14-nga.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.
@@ -16,12 +16,13 @@
16
16
  import path from 'node:path';
17
17
  import fs from 'node:fs';
18
18
  import * as process from 'node:process';
19
+ import { resolve } from 'node:path';
19
20
  import React from 'react';
20
21
  import { Box, Text, useInput } from 'ink';
21
22
  import TextInput from 'ink-text-input';
22
23
  import { SfError, Lifecycle } from '@salesforce/core';
23
24
  import { writeDebugLog } from '@salesforce/agents';
24
- import { sleep } from '@salesforce/kit';
25
+ import { sleep, env } from '@salesforce/kit';
25
26
  // Component to show a simple typing animation
26
27
  function Typing() {
27
28
  const [frame, setFrame] = React.useState(0);
@@ -38,7 +39,7 @@ function Typing() {
38
39
  React.createElement(Text, { color: colors[1] }, "."),
39
40
  React.createElement(Text, { color: colors[2] }, ".")));
40
41
  }
41
- const saveTranscriptsToFile = (outputDir, messages, responses) => {
42
+ export const saveTranscriptsToFile = (outputDir, messages, responses) => {
42
43
  if (!outputDir)
43
44
  return;
44
45
  fs.mkdirSync(outputDir, { recursive: true });
@@ -61,19 +62,55 @@ export function AgentPreviewReact(props) {
61
62
  const [query, setQuery] = React.useState('');
62
63
  const [isTyping, setIsTyping] = React.useState(true);
63
64
  const [sessionEnded, setSessionEnded] = React.useState(false);
65
+ const [exitRequested, setExitRequested] = React.useState(false);
66
+ const [showSavePrompt, setShowSavePrompt] = React.useState(false);
67
+ const [showDirInput, setShowDirInput] = React.useState(false);
68
+ const [saveDir, setSaveDir] = React.useState('');
69
+ const [saveConfirmed, setSaveConfirmed] = React.useState(false);
64
70
  // @ts-expect-error: Complains if this is not defined but it's not used
65
71
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
66
72
  const [timestamp, setTimestamp] = React.useState(new Date().getTime());
67
73
  const [tempDir, setTempDir] = React.useState('');
68
74
  const [responses, setResponses] = React.useState([]);
69
75
  const [apexDebugLogs, setApexDebugLogs] = React.useState([]);
70
- const { connection, agent, name, outputDir, isLocalAgent } = props;
76
+ const { connection, agent, name, outputDir, isLocalAgent, apexDebug } = props;
71
77
  useInput((input, key) => {
72
- if (key.escape) {
78
+ // If user is in directory input and presses ESC, cancel and exit without saving
79
+ if (showDirInput && (key.escape || (key.ctrl && input === 'c'))) {
73
80
  setSessionEnded(true);
81
+ return;
74
82
  }
75
- if (key.ctrl && input === 'c') {
76
- setSessionEnded(true);
83
+ // Only handle exit if we're not already in save prompt flow
84
+ if (!exitRequested && !showSavePrompt && !showDirInput) {
85
+ if (key.escape || (key.ctrl && input === 'c')) {
86
+ setExitRequested(true);
87
+ setShowSavePrompt(true);
88
+ }
89
+ return;
90
+ }
91
+ // Handle save prompt navigation
92
+ if (showSavePrompt && !showDirInput) {
93
+ if (input.toLowerCase() === 'y' || input.toLowerCase() === 'n') {
94
+ if (input.toLowerCase() === 'y') {
95
+ // If outputDir was provided via flag, use it directly
96
+ if (outputDir) {
97
+ setSaveDir(outputDir);
98
+ setSaveConfirmed(true);
99
+ setShowSavePrompt(false);
100
+ }
101
+ else {
102
+ // Otherwise, prompt for directory
103
+ setShowSavePrompt(false);
104
+ setShowDirInput(true);
105
+ const defaultDir = env.getString('SF_AGENT_PREVIEW_OUTPUT_DIR', path.join('temp', 'agent-preview'));
106
+ setSaveDir(defaultDir);
107
+ }
108
+ }
109
+ else {
110
+ // User said no, exit without saving
111
+ setSessionEnded(true);
112
+ }
113
+ }
77
114
  }
78
115
  });
79
116
  React.useEffect(() => {
@@ -91,7 +128,7 @@ export function AgentPreviewReact(props) {
91
128
  }
92
129
  };
93
130
  void endSession();
94
- }, [sessionEnded]);
131
+ }, [sessionEnded, sessionId, agent]);
95
132
  React.useEffect(() => {
96
133
  // Set up event listeners for agent compilation and simulation events
97
134
  const lifecycle = Lifecycle.getInstance();
@@ -118,10 +155,6 @@ export function AgentPreviewReact(props) {
118
155
  setHeader(`New session started with "${props.name}" (${session.sessionId})`);
119
156
  await sleep(500); // Add a short delay to make it feel more natural
120
157
  setIsTyping(false);
121
- if (outputDir) {
122
- const dateForDir = new Date().toISOString().replace(/:/g, '-').split('.')[0];
123
- setTempDir(path.join(outputDir, `${dateForDir}--${session.sessionId}`));
124
- }
125
158
  // Add disclaimer for local agents before the agent's first message
126
159
  const initialMessages = [];
127
160
  if (isLocalAgent) {
@@ -145,8 +178,43 @@ export function AgentPreviewReact(props) {
145
178
  void startSession();
146
179
  }, [agent, name, outputDir, props.name, isLocalAgent]);
147
180
  React.useEffect(() => {
148
- saveTranscriptsToFile(tempDir, messages, responses);
181
+ // Save to tempDir if it was set (during session)
182
+ if (tempDir) {
183
+ saveTranscriptsToFile(tempDir, messages, responses);
184
+ }
149
185
  }, [tempDir, messages, responses]);
186
+ // Handle saving when user confirms save on exit
187
+ React.useEffect(() => {
188
+ const saveAndExit = async () => {
189
+ if (saveConfirmed && saveDir) {
190
+ const finalDir = resolve(saveDir);
191
+ fs.mkdirSync(finalDir, { recursive: true });
192
+ // Create a timestamped subdirectory for this session
193
+ const dateForDir = new Date().toISOString().replace(/:/g, '-').split('.')[0];
194
+ const sessionDir = path.join(finalDir, `${dateForDir}--${sessionId || 'session'}`);
195
+ fs.mkdirSync(sessionDir, { recursive: true });
196
+ saveTranscriptsToFile(sessionDir, messages, responses);
197
+ // Write apex debug logs if any
198
+ if (apexDebug) {
199
+ for (const response of responses) {
200
+ if (response.apexDebugLog) {
201
+ // eslint-disable-next-line no-await-in-loop
202
+ await writeDebugLog(connection, response.apexDebugLog, sessionDir);
203
+ const logId = response.apexDebugLog.Id;
204
+ if (logId) {
205
+ setApexDebugLogs((prev) => [...prev, path.join(sessionDir, `${logId}.log`)]);
206
+ }
207
+ }
208
+ }
209
+ }
210
+ // Update tempDir so the save message shows the correct path
211
+ setTempDir(sessionDir);
212
+ // Mark session as ended to trigger exit
213
+ setSessionEnded(true);
214
+ }
215
+ };
216
+ void saveAndExit();
217
+ }, [saveConfirmed, saveDir, messages, responses, sessionId, apexDebug, connection]);
150
218
  return (React.createElement(Box, { flexDirection: "column" },
151
219
  React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", alignItems: "center", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
152
220
  React.createElement(Text, { bold: true }, header)),
@@ -166,9 +234,28 @@ export function AgentPreviewReact(props) {
166
234
  React.createElement(Typing, null))))) : null,
167
235
  React.createElement(Box, { paddingLeft: 1, paddingRight: 1 },
168
236
  React.createElement(Text, { dimColor: true }, '─'.repeat(process.stdout.columns - 2))),
169
- sessionEnded ? null : (React.createElement(Box, { marginBottom: 1 },
237
+ showSavePrompt && !showDirInput ? (React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", borderColor: "yellow", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
238
+ React.createElement(Text, { bold: true }, "Save chat history before exiting? (y/n)"),
239
+ outputDir ? (React.createElement(Text, { dimColor: true },
240
+ "Will save to: ",
241
+ outputDir)) : (React.createElement(Text, { dimColor: true }, "Press 'y' to save, 'n' to exit without saving")))) : null,
242
+ showDirInput ? (React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", borderColor: "yellow", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
243
+ React.createElement(Text, { bold: true },
244
+ "Enter output directory for ",
245
+ apexDebug ? 'debug logs and transcripts' : 'transcripts',
246
+ ":"),
247
+ React.createElement(Box, { marginTop: 1 },
248
+ React.createElement(Text, null, "> "),
249
+ React.createElement(TextInput, { showCursor: true, value: saveDir, placeholder: "Press Enter to confirm", onChange: setSaveDir, onSubmit: (dir) => {
250
+ if (dir) {
251
+ setSaveDir(dir);
252
+ setSaveConfirmed(true);
253
+ setShowDirInput(false);
254
+ }
255
+ } })))) : null,
256
+ !sessionEnded && !exitRequested && !showSavePrompt && !showDirInput ? (React.createElement(Box, { marginBottom: 1 },
170
257
  React.createElement(Text, null, "> "),
171
- React.createElement(TextInput, { showCursor: true, value: query, placeholder: "Start typing (press ESC to exit)", onChange: setQuery,
258
+ React.createElement(TextInput, { showCursor: true, value: query, placeholder: "Start typing (press ESC or Ctrl+C to exit)", onChange: setQuery,
172
259
  // eslint-disable-next-line @typescript-eslint/no-misused-promises
173
260
  onSubmit: async (content) => {
174
261
  if (!content)
@@ -187,15 +274,7 @@ export function AgentPreviewReact(props) {
187
274
  setIsTyping(false);
188
275
  // Add the agent's response to the chat
189
276
  setMessages((prev) => [...prev, { role: name, content: message, timestamp: new Date() }]);
190
- // If there is an apex debug log entry, get the log and write it to the output dir
191
- if (response.apexDebugLog && tempDir) {
192
- // Write the apex debug to the output dir
193
- await writeDebugLog(connection, response.apexDebugLog, tempDir);
194
- const logId = response.apexDebugLog.Id;
195
- if (logId) {
196
- setApexDebugLogs((prev) => [...prev, path.join(tempDir, `${logId}.log`)]);
197
- }
198
- }
277
+ // Apex debug logs will be saved when user exits and chooses to save
199
278
  }
200
279
  catch (e) {
201
280
  const sfError = SfError.wrap(e);
@@ -204,19 +283,19 @@ export function AgentPreviewReact(props) {
204
283
  setMessages([{ role: name, content: `${sfError.name} - ${sfError.message}`, timestamp: new Date() }]);
205
284
  setSessionEnded(true);
206
285
  }
207
- } }))),
208
- sessionEnded ? (React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
286
+ } }))) : null,
287
+ sessionEnded && !showSavePrompt && !showDirInput ? (React.createElement(Box, { flexDirection: "column", width: process.stdout.columns, borderStyle: "round", marginTop: 1, marginBottom: 1, paddingLeft: 1, paddingRight: 1 },
209
288
  React.createElement(Text, { bold: true }, "Session Ended"),
210
- outputDir ? React.createElement(Text, null,
289
+ tempDir ? React.createElement(Text, null,
211
290
  "Conversation log: ",
212
291
  tempDir,
213
292
  "/transcript.json") : null,
214
- outputDir ? React.createElement(Text, null,
293
+ tempDir ? React.createElement(Text, null,
215
294
  "API transactions: ",
216
295
  tempDir,
217
296
  "/responses.json") : null,
218
- apexDebugLogs.length > 0 && React.createElement(Text, null,
219
- "Apex Debug Logs: ",
220
- '\n' + apexDebugLogs.join('\n')))) : null));
297
+ apexDebugLogs.length > 0 && tempDir && React.createElement(Text, null,
298
+ "Apex Debug Logs saved to: ",
299
+ tempDir))) : null));
221
300
  }
222
301
  //# 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;;;;;;;;;;;;;;GAcG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAc,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAA8C,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,8CAA8C;AAC9C,SAAS,MAAM;IACb,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE5C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;YAC7B,QAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACrC,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpC,CA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YACzE,OAAO,CAAC,CAAC,CAAC,oBAAC,IAAI;;gBAAoB,OAAO;kCAAuB,CAAC,CAAC,CAAC,IAAI;YACxE,aAAa,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,IAAI,oBAAC,IAAI;;gBAA4B,OAAO,CAAQ,CACpF,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;AACJ,CAAC"}
@@ -4,6 +4,8 @@ Create an agent in your org using a local agent spec file.
4
4
 
5
5
  # description
6
6
 
7
+ NOTE: This command creates an agent that doesn't use Agent Script as its blueprint. We generally don't recommend you use this workflow to create an agent. Rather, use the "agent generate|validate|publish authoring-bundle" commands to author agents that use the Agent Script language. See "Author an Agent" (https://developer.salesforce.com/docs/einstein/genai/guide/agent-dx-nga-author-agent.html) for details.
8
+
7
9
  To run this command, you must have an agent spec file, which is a YAML file that define the agent properties and contains a list of AI-generated topics. Topics define the range of jobs the agent can handle. Use the "agent generate agent-spec" CLI command to generate an agent spec file. Then specify the file to this command using the --spec flag, along with the name (label) of the new agent with the --name flag. If you don't specify any of the required flags, the command prompts you.
8
10
 
9
11
  When this command completes, your org contains the new agent, which you can then edit and customize in the Agent Builder UI. The new agent's topics are the same as the ones listed in the agent spec file. The agent might also have some AI-generated actions, or you can add them. This command also retrieves all the metadata files associated with the new agent to your local Salesforce DX project.
@@ -4,7 +4,7 @@ Generate an agent spec, which is a YAML file that captures what an agent can do.
4
4
 
5
5
  # description
6
6
 
7
- The first step in creating an agent in your org with Salesforce CLI is to generate an agent spec using this command. An agent spec is a YAML-formatted file that contains information about the agent, such as its role and company description, and then an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.
7
+ An agent spec is a YAML-formatted file that contains basic information about the agent, such as its role, company description, and an AI-generated list of topics based on this information. Topics define the range of jobs your agent can handle.
8
8
 
9
9
  Use flags, such as --role and --company-description, to provide details about your company and the role that the agent plays in your company. If you prefer, you can also be prompted for the basic information; use --full-interview to be prompted for all required and optional properties. Upon command execution, the large language model (LLM) associated with your org uses the provided information to generate a list of topics for the agent. Because the LLM uses the company and role information to generate the topics, we recommend that you provide accurate, complete, and specific details so the LLM generates the best and most relevant topics. Once generated, you can edit the spec file; for example, you can remove topics that don't apply or change a topic's description.
10
10
 
@@ -12,7 +12,7 @@ You can also iterate the spec generation process by using the --spec flag to pas
12
12
 
13
13
  You can also specify other agent properties, such as a custom prompt template, how to ground the prompt template to add context to the agent's prompts, the tone of the prompts, and the username of a user in the org to assign to the agent.
14
14
 
15
- When your agent spec is ready, you then create the agent in your org by running the "agent create" CLI command and specifying the spec with the --spec flag.
15
+ When your agent spec is ready, generate an authoring bundle from it by passing the spec file to the --spec flag of the "agent generate authoring-bundle" CLI command. An authoring bundle is a metadata type that contains an Agent Script file, which is the blueprint for an agent. (While not recommended, you can also use the agent spec file to immediately create an agent with the "agent create" command. We don't recommend this workflow because these types of agents don't use Agent Script, and are thus less flexible and more difficult to maintain.)
16
16
 
17
17
  # flags.type.summary
18
18
 
@@ -1,12 +1,18 @@
1
1
  # summary
2
2
 
3
- Generate a local authoring bundle from an existing agent spec YAML file.
3
+ Generate an authoring bundle from an existing agent spec YAML file.
4
4
 
5
5
  # description
6
6
 
7
- Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension ".agent") that fully describes the next-gen agent. Use this command to generate an authoring bundle based on an agent spec YAML file, which you create with the "agent create agent-spec" command.
7
+ Authoring bundles are metadata components that contain an agent's Agent Script file. The Agent Script file is the agent's blueprint; it fully describes what the agent can do using the Agent Script language.
8
8
 
9
- By default, authoring bundles are generated in the force-app/main/default/aiAuthoringBundles/<api-name> directory. Use the --output-dir to generate them elsewhere.
9
+ Use this command to generate a new authoring bundle based on an agent spec YAML file, which you create with the "agent generate agent-spec" command. The agent spec YAML file is a high-level description of the agent; it describes its essence rather than exactly what it can do.
10
+
11
+ The metadata type for authoring bundles is aiAuthoringBundle, which consist of a standard "<bundle-name>.bundle-meta.xml" metadata file and the Agent Script file (with extension ".agent"). When you run this command, the new authoring bundle is generated in the force-app/main/default/aiAuthoringBundles/<bundle-name> directory. Use the --output-dir flag to generate them elsewhere.
12
+
13
+ After you generate the initial authoring bundle, vibe code (modify using natural language) the Agent Script file so your agent behaves exactly as you want. The generated Agent Script file is just a first draft of your agent! Then publish the agent to your org with the "agent publish authoring-bundle" command.
14
+
15
+ This command requires an org because it uses it to access an LLM for generating the Agent Script file.
10
16
 
11
17
  # flags.spec.summary
12
18
 
@@ -30,13 +36,13 @@ API name of the new authoring bundle
30
36
 
31
37
  # examples
32
38
 
33
- - Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My Authoring Bundle":
39
+ - Generate an authoring bundle from the "specs/agentSpec.yaml" agent spec YAML file and give it the label "My Authoring Bundle"; use your default org:
34
40
 
35
- <%= config.bin %> <%= command.id %> --spec-file specs/agentSpec.yaml --name "My Authoring Bundle"
41
+ <%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name "My Authoring Bundle"
36
42
 
37
- - Same as previous example, but generate the files in the other-package-dir/main/default/aiAuthoringBundles directory:
43
+ - Same as previous example, but generate the files in the "other-package-dir/main/default" package directory; use the org with alias "my-dev-org":
38
44
 
39
- <%= config.bin %> <%= command.id %> --spec-file specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir other-package-dir/main/default/aiAuthoringBundles
45
+ <%= config.bin %> <%= command.id %> --spec specs/agentSpec.yaml --name "My Authoring Bundle" --output-dir other-package-dir/main/default --target-org my-dev-org
40
46
 
41
47
  # error.no-spec-file
42
48
 
@@ -48,4 +54,4 @@ The specified file is not a valid agent spec YAML file.
48
54
 
49
55
  # error.failed-to-create-agent
50
56
 
51
- Failed to create a next-gen agent from the agent spec YAML file.
57
+ Failed to create an authoring bundle from the agent spec YAML file.
@@ -1,20 +1,20 @@
1
1
  # summary
2
2
 
3
- Publish an authoring bundle to your org, which results in a new next-gen agent.
3
+ Publish an authoring bundle to your org, which results in a new or updated agent.
4
4
 
5
5
  # description
6
6
 
7
- When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the agent file (with extension ".agent") successfully compiles. Then the authoring bundle metadata component is deployed to the org, and all associated metadata components, such as the Bot, BotVersion, and GenAiXXX components, are either created or updated. The org then creates a new next-gen agent based on the deployed authoring bundle and associated metadata. Finally, all the metadata associated with the new agent is retrieved back to your local DX project.
7
+ An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that fully describes the agent using the Agent Script language.
8
8
 
9
- Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension ".agent") that fully describes the next-gen agent.
9
+ When you publish an authoring bundle to your org, a number of things happen. First, this command validates that the Agent Script file successfully compiles. If there are compilation errors, the command exits and you must fix the Agent Script file to continue. Once the Agent Script file compiles, then the authoring bundle metadata component is deployed to the org, and all associated agent metadata components, such as the Bot, BotVersion, and GenAiXXX components, are either created or updated. The org then either creates a new agent based on the deployed authoring bundle, or creates a new version of the agent if it already existed. Finally, all the new or changed metadata components associated with the new agent are retrieved back to your local DX project.
10
10
 
11
- This command requires the API name of the authoring bundle; if you don't provide it with the --api-name flag, the command prompts you for it.
11
+ This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
12
12
 
13
13
  # examples
14
14
 
15
- - Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-org", resulting in a new agent named "My Fab Agent"::
15
+ - Publish an authoring bundle with API name MyAuthoringBundle to the org with alias "my-org":
16
16
 
17
- <%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --agent-name "My Fab Agent" --target-org my-org
17
+ <%= config.bin %> <%= command.id %> --api-name MyAuthoringbundle --target-org my-org
18
18
 
19
19
  # flags.api-name.summary
20
20
 
@@ -24,10 +24,6 @@ API name of the authoring bundle you want to publish.
24
24
 
25
25
  API name of the authoring bundle to publish
26
26
 
27
- # flags.agent-name.summary
28
-
29
- Name for the new agent that is created from the published authoring bundle.
30
-
31
27
  # error.missingRequiredFlags
32
28
 
33
29
  Required flag(s) missing: %s.
@@ -43,8 +39,8 @@ Failed to publish agent with the following errors:
43
39
 
44
40
  # error.agentNotFound
45
41
 
46
- Could not find a .bundle-meta.xml file with API name '%s' in the project.
42
+ Couldn't find a ".bundle-meta.xml" file with API name '%s' in the DX project.
47
43
 
48
44
  # error.agentNotFoundAction
49
45
 
50
- Check that the API name is correct and that the .agent file exists in your project directory.
46
+ Check that the API name is correct and that the ".agent" file exists in your DX project directory.
@@ -1,18 +1,18 @@
1
1
  # summary
2
2
 
3
- Validate a local authoring bundle to ensure it compiles successfully and can be used to create a next-gen agent.
3
+ Validate an authoring bundle to ensure its Agent Script file compiles successfully and can be used to publish an agent.
4
4
 
5
5
  # description
6
6
 
7
- Authoring bundles are metadata types that represent the next-gen Salesforce agents. Their exact metadata name is AiAuthoringBundle and they consist of a standard "\*-meta.xml" metadata file and an agent file (with extension ".agent") that fully describes the next-gen agent. Generate a local authoring bundle with the "agent generate authoring-bundle" command.
7
+ An authoring bundle is a metadata type (named aiAuthoringBundle) that provides the blueprint for an agent. The metadata type contains two files: the standard metatada XML file and an Agent Script file (extension ".agent") that fully describes the agent using the Agent Script language.
8
8
 
9
- This command validates that the agent file (with extension ".agent") that's part of the authoring bundle compiles without errors and can later be used to successfully create a next-gen agent.
9
+ This command validates that the Agent Script file in the authoring bundle compiles without errors so that you can later publish the bundle to your org. Use this command while you vibe code (modify with natural language) the Agent Script file to ensure that it's always valid. If the validation fails, the command outputs the list of syntax errors, a brief description of the error, and the location in the Agent Script file where the error occurred.
10
10
 
11
- This command requires the API name of the authoring bundle; if you don't provide it with the --api-name flag, the command prompts you for it.
11
+ This command uses the API name of the authoring bundle. If you don't provide an API name with the --api-name flag, the command searches the current DX project and outputs a list of authoring bundles that it found for you to choose from.
12
12
 
13
13
  # examples
14
14
 
15
- - Validate a local authoring bundle with API name MyAuthoringBundle:
15
+ - Validate an authoring bundle with API name MyAuthoringBundle:
16
16
 
17
17
  <%= config.bin %> <%= command.id %> --api-name MyAuthoringBundle
18
18
 
@@ -34,13 +34,13 @@ Invalid authoring bundle path. Provide a valid directory path to the authoring b
34
34
 
35
35
  # error.compilationFailed
36
36
 
37
- Compilation of the agent file failed with the following errors:
37
+ Compilation of the Agent Script file failed with the following errors:
38
38
  %s
39
39
 
40
40
  # error.agentNotFound
41
41
 
42
- Could not find a .bundle-meta.xml file with API name '%s' in the project.
42
+ Couldn't find a ".bundle-meta.xml" file with API name '%s' in the DX project.
43
43
 
44
44
  # error.agentNotFoundAction
45
45
 
46
- Check that the API name is correct and that the ".agent" file exists in your project directory.
46
+ Check that the API name is correct and that the ".agent" file exists in your DX project directory.