@salesforce/plugin-agent 1.38.1 → 1.39.1
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 +120 -79
- package/lib/commands/agent/preview/end.d.ts +32 -6
- package/lib/commands/agent/preview/end.js +194 -31
- package/lib/commands/agent/preview/end.js.map +1 -1
- package/messages/agent.preview.end.md +40 -2
- package/messages/agent.trace.delete.md +13 -11
- package/messages/agent.trace.list.md +9 -9
- package/messages/agent.trace.read.md +25 -22
- package/oclif.manifest.json +65 -30
- package/package.json +3 -3
- package/schemas/agent-preview-end.json +20 -0
package/oclif.manifest.json
CHANGED
|
@@ -882,11 +882,13 @@
|
|
|
882
882
|
"agent:preview:end": {
|
|
883
883
|
"aliases": [],
|
|
884
884
|
"args": {},
|
|
885
|
-
"description": "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.\n\nThe 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,
|
|
885
|
+
"description": "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.\n\nThe 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, respectively. 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.\n\nUse the --all flag to end all active preview sessions at once. You can combine --all with --api-name or --authoring-bundle to end only sessions for a specific agent, or use --all on its own to end every session across all agents in the project.",
|
|
886
886
|
"examples": [
|
|
887
|
-
"End a preview session of a published agent by specifying its session ID and API name
|
|
887
|
+
"End a preview session of a published agent by specifying its session ID and API name; use the default org:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --api-name My_Published_Agent",
|
|
888
888
|
"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\":\n<%= config.bin %> <%= command.id %> --api-name My_Published_Agent --target-org my-dev-org",
|
|
889
|
-
"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.\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent"
|
|
889
|
+
"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.\n<%= config.bin %> <%= command.id %> --authoring-bundle My_Local_Agent",
|
|
890
|
+
"End all active preview sessions for a specific agent without prompting:\n<%= config.bin %> <%= command.id %> --all --authoring-bundle My_Local_Agent --target-org <target_org> --no-prompt",
|
|
891
|
+
"End all active preview sessions across every agent in the local session cache for an org:\n<%= config.bin %> <%= command.id %> --all --target-org <target_org>"
|
|
890
892
|
],
|
|
891
893
|
"flags": {
|
|
892
894
|
"json": {
|
|
@@ -922,6 +924,9 @@
|
|
|
922
924
|
"type": "option"
|
|
923
925
|
},
|
|
924
926
|
"session-id": {
|
|
927
|
+
"exclusive": [
|
|
928
|
+
"all"
|
|
929
|
+
],
|
|
925
930
|
"name": "session-id",
|
|
926
931
|
"required": false,
|
|
927
932
|
"summary": "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.",
|
|
@@ -931,6 +936,9 @@
|
|
|
931
936
|
},
|
|
932
937
|
"api-name": {
|
|
933
938
|
"char": "n",
|
|
939
|
+
"exclusive": [
|
|
940
|
+
"authoring-bundle"
|
|
941
|
+
],
|
|
934
942
|
"name": "api-name",
|
|
935
943
|
"summary": "API name of the activated published agent you want to preview.",
|
|
936
944
|
"hasDynamicHelp": false,
|
|
@@ -938,11 +946,30 @@
|
|
|
938
946
|
"type": "option"
|
|
939
947
|
},
|
|
940
948
|
"authoring-bundle": {
|
|
949
|
+
"exclusive": [
|
|
950
|
+
"api-name"
|
|
951
|
+
],
|
|
941
952
|
"name": "authoring-bundle",
|
|
942
953
|
"summary": "API name of the authoring bundle metadata component that contains the agent's Agent Script file.",
|
|
943
954
|
"hasDynamicHelp": false,
|
|
944
955
|
"multiple": false,
|
|
945
956
|
"type": "option"
|
|
957
|
+
},
|
|
958
|
+
"all": {
|
|
959
|
+
"exclusive": [
|
|
960
|
+
"session-id"
|
|
961
|
+
],
|
|
962
|
+
"name": "all",
|
|
963
|
+
"summary": "End all active preview sessions. Combine with --api-name or --authoring-bundle to limit to a specific agent, or use with only --target-org to end sessions for all agents found in the local session cache. Requires --target-org.",
|
|
964
|
+
"allowNo": false,
|
|
965
|
+
"type": "boolean"
|
|
966
|
+
},
|
|
967
|
+
"no-prompt": {
|
|
968
|
+
"char": "p",
|
|
969
|
+
"name": "no-prompt",
|
|
970
|
+
"summary": "Don't prompt for confirmation before ending sessions. Has an effect only when used with --all.",
|
|
971
|
+
"allowNo": false,
|
|
972
|
+
"type": "boolean"
|
|
946
973
|
}
|
|
947
974
|
},
|
|
948
975
|
"hasDynamicHelp": true,
|
|
@@ -971,6 +998,10 @@
|
|
|
971
998
|
"name": "Succeeded (0)",
|
|
972
999
|
"description": "Preview session ended successfully and traces saved."
|
|
973
1000
|
},
|
|
1001
|
+
{
|
|
1002
|
+
"name": "ExactlyOneRequired (2)",
|
|
1003
|
+
"description": "Neither --api-name nor --authoring-bundle was provided (required when --all is not set)."
|
|
1004
|
+
},
|
|
974
1005
|
{
|
|
975
1006
|
"name": "NotFound (2)",
|
|
976
1007
|
"description": "Agent not found, or no preview session exists for this agent."
|
|
@@ -979,6 +1010,10 @@
|
|
|
979
1010
|
"name": "PreviewEndFailed (4)",
|
|
980
1011
|
"description": "Failed to end the preview session."
|
|
981
1012
|
},
|
|
1013
|
+
{
|
|
1014
|
+
"name": "PreviewEndPartialFailure (68)",
|
|
1015
|
+
"description": "With --all, one or more sessions failed to end while others succeeded."
|
|
1016
|
+
},
|
|
982
1017
|
{
|
|
983
1018
|
"name": "SessionAmbiguous (5)",
|
|
984
1019
|
"description": "Multiple preview sessions found; specify --session-id to choose one."
|
|
@@ -2309,14 +2344,14 @@
|
|
|
2309
2344
|
"agent:trace:delete": {
|
|
2310
2345
|
"aliases": [],
|
|
2311
2346
|
"args": {},
|
|
2312
|
-
"description": "
|
|
2347
|
+
"description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Use this command to delete some or all of the trace files.\n\nBy default, this command shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation.\n\nWithout filters, this comamnd deletes all trace files for all agents and sessions. Use flags to narrow the scope: filter by agent API name (--agent), by session (--session-id), or by age (--older-than).",
|
|
2313
2348
|
"examples": [
|
|
2314
|
-
"Delete all traces for all agents and sessions
|
|
2349
|
+
"Delete all traces for all agents and sessions; prompt for confirmation:\n<%= config.bin %> <%= command.id %>",
|
|
2315
2350
|
"Delete all traces for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
|
|
2316
2351
|
"Delete traces from a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
|
|
2317
2352
|
"Delete traces older than 7 days:\n<%= config.bin %> <%= command.id %> --older-than 7d",
|
|
2318
|
-
"Delete traces older than 24 hours for a specific agent
|
|
2319
|
-
"Delete all traces
|
|
2353
|
+
"Delete traces older than 24 hours for a specific agent; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt",
|
|
2354
|
+
"Delete all traces for all agents and sessions; don't prompt for confirmation:\n<%= config.bin %> <%= command.id %> --no-prompt"
|
|
2320
2355
|
],
|
|
2321
2356
|
"flags": {
|
|
2322
2357
|
"json": {
|
|
@@ -2337,21 +2372,21 @@
|
|
|
2337
2372
|
"agent": {
|
|
2338
2373
|
"char": "a",
|
|
2339
2374
|
"name": "agent",
|
|
2340
|
-
"summary": "
|
|
2375
|
+
"summary": "API name of the agent used to filter the list of trace files you want to delete. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
|
|
2341
2376
|
"hasDynamicHelp": false,
|
|
2342
2377
|
"multiple": false,
|
|
2343
2378
|
"type": "option"
|
|
2344
2379
|
},
|
|
2345
2380
|
"session-id": {
|
|
2346
2381
|
"name": "session-id",
|
|
2347
|
-
"summary": "
|
|
2382
|
+
"summary": "Session ID used to filter the list of trace files you want to delete. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
|
|
2348
2383
|
"hasDynamicHelp": false,
|
|
2349
2384
|
"multiple": false,
|
|
2350
2385
|
"type": "option"
|
|
2351
2386
|
},
|
|
2352
2387
|
"older-than": {
|
|
2353
2388
|
"name": "older-than",
|
|
2354
|
-
"summary": "
|
|
2389
|
+
"summary": "Duration used to filter the list of trace files; only files older than the duration are deleted. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks. Examples: 7d, 24h, 2w.",
|
|
2355
2390
|
"hasDynamicHelp": false,
|
|
2356
2391
|
"multiple": false,
|
|
2357
2392
|
"type": "option"
|
|
@@ -2370,7 +2405,7 @@
|
|
|
2370
2405
|
"pluginName": "@salesforce/plugin-agent",
|
|
2371
2406
|
"pluginType": "core",
|
|
2372
2407
|
"strict": true,
|
|
2373
|
-
"summary": "Delete agent preview
|
|
2408
|
+
"summary": "Delete trace files from an agent preview session.",
|
|
2374
2409
|
"enableJsonFlag": true,
|
|
2375
2410
|
"requiresProject": true,
|
|
2376
2411
|
"errorCodes": {
|
|
@@ -2403,13 +2438,13 @@
|
|
|
2403
2438
|
"agent:trace:list": {
|
|
2404
2439
|
"aliases": [],
|
|
2405
2440
|
"args": {},
|
|
2406
|
-
"description": "
|
|
2441
|
+
"description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. By default, this command lists all trace files for all agents and all of their sessions. Use flags to narrow results: filter by agent name (--agent), by session (--session-id), or by date (--since).\n\nEach row in the output corresponds to one trace file, which in turn corresponds to one agent session. The Agent column shows the authoring bundle or API name used when starting the session.",
|
|
2407
2442
|
"examples": [
|
|
2408
|
-
"List all
|
|
2409
|
-
"List all
|
|
2410
|
-
"List
|
|
2411
|
-
"List
|
|
2412
|
-
"List
|
|
2443
|
+
"List all trace files for all agents and sessions:\n<%= config.bin %> <%= command.id %>",
|
|
2444
|
+
"List all trace files for a specific agent:\n<%= config.bin %> <%= command.id %> --agent My_Agent",
|
|
2445
|
+
"List trace files for a specific session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
|
|
2446
|
+
"List trace files recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):\n<%= config.bin %> <%= command.id %> --since 2026-04-20",
|
|
2447
|
+
"List trace files recorded on or after a specific UTC time:\n<%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z",
|
|
2413
2448
|
"Filter by agent and date together:\n<%= config.bin %> <%= command.id %> --agent My_Agent --since 2026-04-20",
|
|
2414
2449
|
"Return results as JSON:\n<%= config.bin %> <%= command.id %> --json"
|
|
2415
2450
|
],
|
|
@@ -2431,7 +2466,7 @@
|
|
|
2431
2466
|
},
|
|
2432
2467
|
"session-id": {
|
|
2433
2468
|
"name": "session-id",
|
|
2434
|
-
"summary": "Session ID used to filter the list of trace files.",
|
|
2469
|
+
"summary": "Session ID used to filter the list of trace files. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs.",
|
|
2435
2470
|
"hasDynamicHelp": false,
|
|
2436
2471
|
"multiple": false,
|
|
2437
2472
|
"type": "option"
|
|
@@ -2439,7 +2474,7 @@
|
|
|
2439
2474
|
"agent": {
|
|
2440
2475
|
"char": "a",
|
|
2441
2476
|
"name": "agent",
|
|
2442
|
-
"summary": "
|
|
2477
|
+
"summary": "API name of the agent used to filter the list of available trace files. Matches against the API name used when starting the session, either an authoring bundle or a published agent API name.",
|
|
2443
2478
|
"hasDynamicHelp": false,
|
|
2444
2479
|
"multiple": false,
|
|
2445
2480
|
"type": "option"
|
|
@@ -2460,7 +2495,7 @@
|
|
|
2460
2495
|
"pluginName": "@salesforce/plugin-agent",
|
|
2461
2496
|
"pluginType": "core",
|
|
2462
2497
|
"strict": true,
|
|
2463
|
-
"summary": "List the trace files that were recorded during all agent preview sessions.",
|
|
2498
|
+
"summary": "List the available trace files that were recorded during all agent preview sessions.",
|
|
2464
2499
|
"enableJsonFlag": true,
|
|
2465
2500
|
"requiresProject": true,
|
|
2466
2501
|
"errorCodes": {
|
|
@@ -2493,12 +2528,12 @@
|
|
|
2493
2528
|
"agent:trace:read": {
|
|
2494
2529
|
"aliases": [],
|
|
2495
2530
|
"args": {},
|
|
2496
|
-
"description": "
|
|
2531
|
+
"description": "When you run an agent preview conversation (either interactive or programmatic), trace files are automatically recorded and saved in your local DX project. Each turn (utterance or response) of a conversation creates trace data. Use this command to view trace data for a specific preview session, so you can then analyze the trace data to observe, monitor, investigate, and troubleshoot agent events and behavior.\n\nUse the --format flag to specify one of these formats of the outputted trace data:\n\n- summary (Default): A per-turn narrative showing topic routing, actions executed, and the agent's response. Use this to quickly understand what happened in a preview session.\n- detail: Diagnostic drill-down into a specific dimension. Filters output to only the trace steps relevant to that dimension, minimizing noise.\n- raw: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.\n\nIf you specify \"--format detail\", you must also specify a dimension with the --dimension flag. Dimensions are a way to slice and analyze the agent execution trace from a specific angle or concern. Instead of looking at the raw sequence of everything that happened, each dimension filters and organizes the trace data to answer a specific type of question. These are the available dimensions and the information they provide:\n\n- actions: The actions the agent executed. Includes action name, input parameters, output, and latency. Use this dimension to understand what the agent actually did when answering an utterance in the preview session.\n- grounding: The reasoning steps used by the LLM. Use this dimension to see how the agent \"thought\" about the problem - the AI reasoning that determined which actions to take.\n- routing: How the agent navigated between subagents. Use this dimension to understand conversation flow - when and why the agent switched between different subagents or contexts during the conversation.\n- errors: Aggregates all errors during the session. Use this dimension to quickly identify and debug issues across all steps.",
|
|
2497
2532
|
"examples": [
|
|
2498
|
-
"Show a session summary
|
|
2499
|
-
"Show summary for
|
|
2533
|
+
"Show a session trace summary for all turns in the session with the specified ID:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>",
|
|
2534
|
+
"Show a trace summary for the second turn (utterance or response) of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2",
|
|
2500
2535
|
"Drill into action execution across all turns:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions",
|
|
2501
|
-
"Drill into routing decisions for
|
|
2536
|
+
"Drill into routing decisions for the first turn of the conversation:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1",
|
|
2502
2537
|
"Show all errors across the session:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors",
|
|
2503
2538
|
"Output raw trace JSON for custom parsing:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw",
|
|
2504
2539
|
"Return results as JSON:\n<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json"
|
|
@@ -2523,7 +2558,7 @@
|
|
|
2523
2558
|
"char": "s",
|
|
2524
2559
|
"name": "session-id",
|
|
2525
2560
|
"required": true,
|
|
2526
|
-
"summary": "Session ID to read traces for.",
|
|
2561
|
+
"summary": "Session ID to read traces for. Use the \"agent preview sessions\" CLI command to list all known agent preview sessions along with their session IDs",
|
|
2527
2562
|
"hasDynamicHelp": false,
|
|
2528
2563
|
"multiple": false,
|
|
2529
2564
|
"type": "option"
|
|
@@ -2531,7 +2566,7 @@
|
|
|
2531
2566
|
"format": {
|
|
2532
2567
|
"char": "f",
|
|
2533
2568
|
"name": "format",
|
|
2534
|
-
"summary": "Output format
|
|
2569
|
+
"summary": "Output format of the trace data; specifies the level of detail you want in the trace files.",
|
|
2535
2570
|
"default": "summary",
|
|
2536
2571
|
"hasDynamicHelp": false,
|
|
2537
2572
|
"multiple": false,
|
|
@@ -2545,7 +2580,7 @@
|
|
|
2545
2580
|
"dimension": {
|
|
2546
2581
|
"char": "d",
|
|
2547
2582
|
"name": "dimension",
|
|
2548
|
-
"summary": "Dimension to drill into when using --format detail
|
|
2583
|
+
"summary": "Dimension to drill into when using \"--format detail\"; used to filter and organize the trace data to answer a specific type of question.",
|
|
2549
2584
|
"hasDynamicHelp": false,
|
|
2550
2585
|
"multiple": false,
|
|
2551
2586
|
"options": [
|
|
@@ -2559,7 +2594,7 @@
|
|
|
2559
2594
|
"turn": {
|
|
2560
2595
|
"char": "t",
|
|
2561
2596
|
"name": "turn",
|
|
2562
|
-
"summary": "
|
|
2597
|
+
"summary": "Turn number for which you want trace data. A turn is a single utterance or response in a conversation, starting with 1.",
|
|
2563
2598
|
"hasDynamicHelp": false,
|
|
2564
2599
|
"multiple": false,
|
|
2565
2600
|
"type": "option"
|
|
@@ -2572,7 +2607,7 @@
|
|
|
2572
2607
|
"pluginName": "@salesforce/plugin-agent",
|
|
2573
2608
|
"pluginType": "core",
|
|
2574
2609
|
"strict": true,
|
|
2575
|
-
"summary": "Read
|
|
2610
|
+
"summary": "Read trace files from an agent preview session.",
|
|
2576
2611
|
"enableJsonFlag": true,
|
|
2577
2612
|
"requiresProject": true,
|
|
2578
2613
|
"isESM": true,
|
|
@@ -2708,5 +2743,5 @@
|
|
|
2708
2743
|
]
|
|
2709
2744
|
}
|
|
2710
2745
|
},
|
|
2711
|
-
"version": "1.
|
|
2746
|
+
"version": "1.39.1"
|
|
2712
2747
|
}
|
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.
|
|
4
|
+
"version": "1.39.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/forcedotcom/cli/issues",
|
|
7
7
|
"enableO11y": true,
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
"exports": "./lib/index.js",
|
|
241
241
|
"type": "module",
|
|
242
242
|
"sfdx": {
|
|
243
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
244
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.
|
|
243
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.39.1.crt",
|
|
244
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-agent/1.39.1.sig"
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
"$ref": "#/definitions/AgentPreviewEndResult",
|
|
4
4
|
"definitions": {
|
|
5
5
|
"AgentPreviewEndResult": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"ended": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"$ref": "#/definitions/EndedSession"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["ended"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"$ref": "#/definitions/EndedSession"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"EndedSession": {
|
|
6
26
|
"type": "object",
|
|
7
27
|
"properties": {
|
|
8
28
|
"sessionId": {
|