@salesforce/plugin-agent 1.27.7 → 1.29.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 +223 -16
- package/lib/commands/agent/generate/authoring-bundle.d.ts +0 -1
- package/lib/commands/agent/generate/authoring-bundle.js +77 -49
- package/lib/commands/agent/generate/authoring-bundle.js.map +1 -1
- package/lib/commands/agent/preview/end.d.ts +20 -0
- package/lib/commands/agent/preview/end.js +77 -0
- package/lib/commands/agent/preview/end.js.map +1 -0
- package/lib/commands/agent/preview/send.d.ts +23 -0
- package/lib/commands/agent/preview/send.js +74 -0
- package/lib/commands/agent/preview/send.js.map +1 -0
- package/lib/commands/agent/preview/sessions.d.ts +14 -0
- package/lib/commands/agent/preview/sessions.js +58 -0
- package/lib/commands/agent/preview/sessions.js.map +1 -0
- package/lib/commands/agent/preview/start.d.ts +19 -0
- package/lib/commands/agent/preview/start.js +66 -0
- package/lib/commands/agent/preview/start.js.map +1 -0
- package/lib/components/agent-preview-react.js.map +1 -1
- package/lib/previewSessionStore.d.ts +45 -0
- package/lib/previewSessionStore.js +159 -0
- package/lib/previewSessionStore.js.map +1 -0
- package/messages/agent.generate.authoring-bundle.md +51 -3
- package/messages/agent.preview.end.md +47 -0
- package/messages/agent.preview.md +1 -1
- package/messages/agent.preview.send.md +47 -0
- package/messages/agent.preview.sessions.md +27 -0
- package/messages/agent.preview.start.md +41 -0
- package/oclif.manifest.json +431 -102
- package/package.json +3 -3
- package/schemas/agent-preview-end.json +19 -0
- package/schemas/agent-preview-send.json +28 -0
- package/schemas/agent-preview-sessions.json +25 -0
- package/schemas/agent-preview-start.json +16 -0
|
@@ -16,7 +16,7 @@ This command requires an org because it uses it to access an LLM for generating
|
|
|
16
16
|
|
|
17
17
|
# flags.spec.summary
|
|
18
18
|
|
|
19
|
-
Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.
|
|
19
|
+
Path to the agent spec YAML file. If you don't specify the flag, the command provides a list that you can choose from. Use the --no-spec flag to skip using an agent spec entirely.
|
|
20
20
|
|
|
21
21
|
# flags.spec.prompt
|
|
22
22
|
|
|
@@ -44,7 +44,7 @@ API name of the new authoring bundle; if not specified, the API name is derived
|
|
|
44
44
|
|
|
45
45
|
# flags.api-name.prompt
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Enter authoring bundle API name
|
|
48
48
|
|
|
49
49
|
# examples
|
|
50
50
|
|
|
@@ -78,4 +78,52 @@ The specified file is not a valid agent spec YAML file.
|
|
|
78
78
|
|
|
79
79
|
# error.failed-to-create-agent
|
|
80
80
|
|
|
81
|
-
Failed to
|
|
81
|
+
Failed to generate authoring bundle: %s.
|
|
82
|
+
|
|
83
|
+
# wizard.specType.prompt
|
|
84
|
+
|
|
85
|
+
Select an authoring bundle template
|
|
86
|
+
|
|
87
|
+
# wizard.specType.option.default.name
|
|
88
|
+
|
|
89
|
+
Default template (Recommended)
|
|
90
|
+
|
|
91
|
+
# wizard.specType.option.default.description
|
|
92
|
+
|
|
93
|
+
Start with a ready-to-use Agent Script template.
|
|
94
|
+
|
|
95
|
+
# wizard.specType.option.fromSpec.name
|
|
96
|
+
|
|
97
|
+
From an agent spec YAML file (Advanced)
|
|
98
|
+
|
|
99
|
+
# wizard.specType.option.fromSpec.description
|
|
100
|
+
|
|
101
|
+
Generate an Agent Script file from an existing agent spec YAML file.
|
|
102
|
+
|
|
103
|
+
# wizard.specFile.prompt
|
|
104
|
+
|
|
105
|
+
Select the agent spec YAML file
|
|
106
|
+
|
|
107
|
+
# wizard.name.prompt
|
|
108
|
+
|
|
109
|
+
Enter the authoring bundle name
|
|
110
|
+
|
|
111
|
+
# wizard.name.validation.required
|
|
112
|
+
|
|
113
|
+
Authoring bundle name is required.
|
|
114
|
+
|
|
115
|
+
# wizard.name.validation.empty
|
|
116
|
+
|
|
117
|
+
Authoring bundle name can't be empty.
|
|
118
|
+
|
|
119
|
+
# progress.title
|
|
120
|
+
|
|
121
|
+
Generating authoring bundle: %s
|
|
122
|
+
|
|
123
|
+
# success.message
|
|
124
|
+
|
|
125
|
+
Authoring bundle "%s" was generated successfully.
|
|
126
|
+
|
|
127
|
+
# warning.noSpecDir
|
|
128
|
+
|
|
129
|
+
No agent spec directory found at %s.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
End an existing programmatic agent preview session and get trace location.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
You must have previously started a programmatic agent preview session with the "agent preview start" command to then use this command to end it. This command also displays the local directory where the session trace files are stored.
|
|
8
|
+
|
|
9
|
+
The original "agent preview start" command outputs a session ID which you then use with the --session-id flag of this command to end the session. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the "aiAuthoringBundles" metadata directory. Similarly, the published agent's API name is the same as its directory name under the "Bots" metadata directory.
|
|
10
|
+
|
|
11
|
+
# flags.session-id.summary
|
|
12
|
+
|
|
13
|
+
Session ID outputted by "agent preview start". Not required when the agent has exactly one active session. Run "agent preview sessions" to see the list of all sessions.
|
|
14
|
+
|
|
15
|
+
# flags.api-name.summary
|
|
16
|
+
|
|
17
|
+
API name of the activated published agent you want to preview.
|
|
18
|
+
|
|
19
|
+
# flags.authoring-bundle.summary
|
|
20
|
+
|
|
21
|
+
API name of the authoring bundle metadata component that contains the agent's Agent Script file.
|
|
22
|
+
|
|
23
|
+
# error.noSession
|
|
24
|
+
|
|
25
|
+
No agent preview session found. Run "sf agent preview start" to start a new agent preview session.
|
|
26
|
+
|
|
27
|
+
# error.multipleSessions
|
|
28
|
+
|
|
29
|
+
Multiple preview sessions found for this agent. Use the --session-id flag to identify a specific session. Sessions: %s
|
|
30
|
+
|
|
31
|
+
# output.tracesPath
|
|
32
|
+
|
|
33
|
+
Session traces: %s
|
|
34
|
+
|
|
35
|
+
# examples
|
|
36
|
+
|
|
37
|
+
- End a preview session of a published agent by specifying its session ID and API name ; use the default org:
|
|
38
|
+
|
|
39
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --api-name My_Published_Agent
|
|
40
|
+
|
|
41
|
+
- Similar to previous example, but don't specify a session ID; you get an error if the published agent has more than one active session. Use the org with alias "my-dev-org":
|
|
42
|
+
|
|
43
|
+
<%= config.bin %> <%= command.id %> --api-name My_Published_Agent --target-org my-dev-org
|
|
44
|
+
|
|
45
|
+
- End a preview session of an agent using its authoring bundle API name; you get an error if the agent has more than one active session.
|
|
46
|
+
|
|
47
|
+
<%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent
|
|
@@ -21,7 +21,7 @@ When the session concludes, the command asks if you want to save the API respons
|
|
|
21
21
|
|
|
22
22
|
# flags.api-name.summary
|
|
23
23
|
|
|
24
|
-
API name of the published
|
|
24
|
+
API name of the activated published agent you want to interact with.
|
|
25
25
|
|
|
26
26
|
# flags.authoring-bundle.summary
|
|
27
27
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Send a message to an existing agent preview session.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
You must have previously started a programmatic agent preview session with the "agent preview start" command to then use this command to send the agent a message (utterance). This command then displays the agent's response.
|
|
8
|
+
|
|
9
|
+
The original "agent preview start" command outputs a session ID which you then use with the --session-id flag of this command to send a message. You don't have to specify the --session-id flag if an agent has only one active preview session. You must also use either the --authoring-bundle or --api-name flag to specify the API name of the authoring bundle or the published agent, respecitvely. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the "aiAuthoringBundles" metadata directory. Similarly, the published agent's API name is the same as its directory name under the "Bots" metadata directory.
|
|
10
|
+
|
|
11
|
+
# flags.session-id.summary
|
|
12
|
+
|
|
13
|
+
Session ID outputted by "agent preview start". Not required when the agent has exactly one active session. Run "agent preview sessions" to see list of all sessions.
|
|
14
|
+
|
|
15
|
+
# flags.utterance.summary
|
|
16
|
+
|
|
17
|
+
Utterance to send to the agent, enclosed in double quotes.
|
|
18
|
+
|
|
19
|
+
# flags.api-name.summary
|
|
20
|
+
|
|
21
|
+
API name of the activated published agent you want to preview.
|
|
22
|
+
|
|
23
|
+
# flags.authoring-bundle.summary
|
|
24
|
+
|
|
25
|
+
API name of the authoring bundle metadata component that contains the agent's Agent Script file.
|
|
26
|
+
|
|
27
|
+
# error.noSession
|
|
28
|
+
|
|
29
|
+
No agent preview session found. Run "sf agent preview start" to start a new agent preview session.
|
|
30
|
+
|
|
31
|
+
# error.multipleSessions
|
|
32
|
+
|
|
33
|
+
Multiple preview sessions found for this agent. Use the --session-id flag to identify a specific session. Sessions: %s
|
|
34
|
+
|
|
35
|
+
# examples
|
|
36
|
+
|
|
37
|
+
- Send a message to an activated published agent using its API name and session ID; use the default org:
|
|
38
|
+
|
|
39
|
+
<%= config.bin %> <%= command.id %> --utterance "What can you help me with?" --api-name My_Published_Agent --session-id <SESSION_ID>
|
|
40
|
+
|
|
41
|
+
- Similar to previous example, but don't specify a session ID; you get an error if the agent has more than one active session. Use the org with alias "my-dev-org":
|
|
42
|
+
|
|
43
|
+
<%= config.bin %> <%= command.id %> --utterance "What can you help me with?" --api-name My_Published_Agent --target-org my-dev-org
|
|
44
|
+
|
|
45
|
+
- Send a message to an agent using its authoring bundle API name; you get an error if the agent has more than one active session:
|
|
46
|
+
|
|
47
|
+
<%= config.bin %> <%= command.id %> --utterance "what can you help me with?" --authoring-bundle My_Local_Agent
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List all known programmatic agent preview sessions.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
This command lists the agent preview sessions that were started with the "agent preview start" command and are still in the local cache. Use this command to discover specific session IDs that you can pass to the "agent preview send" or "agent preview end" commands with the --session-id flag.
|
|
8
|
+
|
|
9
|
+
Programmatic agent preview sessions can be started for both published activated agents and by using an agent's local authoring bundle, which contains its Agent Script file. In this command's output table, the Agent column contains either the API name of the authoring bundle or the published agent, whichever was used when starting the session. In the table, if the same API name has multiple rows with different session IDs, then it means that you previously started multiple preview sessions with the associated agent.
|
|
10
|
+
|
|
11
|
+
# output.empty
|
|
12
|
+
|
|
13
|
+
No cached agent preview sessions found.
|
|
14
|
+
|
|
15
|
+
# output.tableHeader.agent
|
|
16
|
+
|
|
17
|
+
Agent (authoring bundle or API name)
|
|
18
|
+
|
|
19
|
+
# output.tableHeader.sessionId
|
|
20
|
+
|
|
21
|
+
Session ID
|
|
22
|
+
|
|
23
|
+
# examples
|
|
24
|
+
|
|
25
|
+
- List all cached agent preview sessions:
|
|
26
|
+
|
|
27
|
+
<%= config.bin %> <%= command.id %>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Start a programmatic agent preview session.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
This command outputs a session ID that you then use with the "agent preview send" command to send an utterance to the agent. Use the "agent preview sessions" command to list all active sessions and the "agent preview end" command to end a specific session.
|
|
8
|
+
|
|
9
|
+
Identify the agent you want to start previewing with either the --authoring-bundle flag to specify a local authoring bundle's API name or --api-name to specify an activated published agent's API name. To find either API name, navigate to your package directory in your DX project. The API name of an authoring bundle is the same as its directory name under the "aiAuthoringBundles" metadata directory. Similarly, the published agent's API name is the same as its directory name under the "Bots" metadata directory.
|
|
10
|
+
|
|
11
|
+
When starting a preview session using the authoring bundle, which contains the agent's Agent Script file, the preview uses mocked actions by default. Specify --use-live-actions for live mode, which uses the real Apex classes, flows, etc, in the org for the actions.
|
|
12
|
+
|
|
13
|
+
# flags.api-name.summary
|
|
14
|
+
|
|
15
|
+
API name of the activated published agent you want to preview.
|
|
16
|
+
|
|
17
|
+
# flags.authoring-bundle.summary
|
|
18
|
+
|
|
19
|
+
API name of the authoring bundle metadata component that contains the agent's Agent Script file.
|
|
20
|
+
|
|
21
|
+
# flags.use-live-actions.summary
|
|
22
|
+
|
|
23
|
+
Use real actions in the org; if not specified, preview uses AI to simulate (mock) actions.
|
|
24
|
+
|
|
25
|
+
# output.sessionId
|
|
26
|
+
|
|
27
|
+
Session ID: %s
|
|
28
|
+
|
|
29
|
+
# examples
|
|
30
|
+
|
|
31
|
+
- Start a programmatic agent preview session by specifying an authoring bundle; uses mocked actions by default. Use the org with alias "my-dev-org":
|
|
32
|
+
|
|
33
|
+
<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --target-org my-dev-org
|
|
34
|
+
|
|
35
|
+
- Similar to previous example but use live actions and the default org:
|
|
36
|
+
|
|
37
|
+
<%= config.bin %> <%= command.id %> --authoring-bundle My_Agent_Bundle --use-live-actions
|
|
38
|
+
|
|
39
|
+
- Start a preview session with an activated published agent:
|
|
40
|
+
|
|
41
|
+
<%= config.bin %> <%= command.id %> --api-name My_Published_Agent
|