@salesforce/plugin-agent 1.37.0 → 1.38.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 +221 -20
- package/lib/agentSessionScanner.d.ts +12 -0
- package/lib/agentSessionScanner.js +56 -0
- package/lib/agentSessionScanner.js.map +1 -0
- package/lib/commands/agent/trace/delete.d.ts +21 -0
- package/lib/commands/agent/trace/delete.js +118 -0
- package/lib/commands/agent/trace/delete.js.map +1 -0
- package/lib/commands/agent/trace/list.d.ts +22 -0
- package/lib/commands/agent/trace/list.js +101 -0
- package/lib/commands/agent/trace/list.js.map +1 -0
- package/lib/commands/agent/trace/read.d.ts +75 -0
- package/lib/commands/agent/trace/read.js +308 -0
- package/lib/commands/agent/trace/read.js.map +1 -0
- package/messages/agent.trace.delete.md +87 -0
- package/messages/agent.trace.list.md +87 -0
- package/messages/agent.trace.read.md +171 -0
- package/oclif.manifest.json +622 -335
- package/package.json +4 -4
- package/schemas/agent-trace-delete.json +28 -0
- package/schemas/agent-trace-list.json +34 -0
- package/schemas/agent-trace-read.json +466 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
List the trace files that were recorded during all agent preview sessions.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Lists trace files recorded during agent preview sessions. By default, lists all traces 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).
|
|
8
|
+
|
|
9
|
+
Each 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.
|
|
10
|
+
|
|
11
|
+
# flags.agent.summary
|
|
12
|
+
|
|
13
|
+
Only show traces for this agent name (substring match). Matches against the name used when starting the session, whether that's an authoring bundle or a published agent API name.
|
|
14
|
+
|
|
15
|
+
# flags.session-id.summary
|
|
16
|
+
|
|
17
|
+
Session ID used to filter the list of trace files.
|
|
18
|
+
|
|
19
|
+
# flags.since.summary
|
|
20
|
+
|
|
21
|
+
Date used to filter the list of trace files; only those recorded on or after the date are listed.
|
|
22
|
+
|
|
23
|
+
# flags.since.description
|
|
24
|
+
|
|
25
|
+
Accepts ISO 8601 format: date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or date-time with milliseconds (2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
|
|
26
|
+
|
|
27
|
+
# error.invalidSince
|
|
28
|
+
|
|
29
|
+
Invalid --since value: '%s'. Use ISO 8601 format — date-only (2026-04-20), date-time (2026-04-20T14:00:00Z), or with milliseconds (2026-04-20T14:00:00.000Z). The "Recorded At" values shown in the table output are valid inputs.
|
|
30
|
+
|
|
31
|
+
# output.empty
|
|
32
|
+
|
|
33
|
+
No trace files found.
|
|
34
|
+
|
|
35
|
+
# output.tableHeader.agent
|
|
36
|
+
|
|
37
|
+
Agent
|
|
38
|
+
|
|
39
|
+
# output.tableHeader.sessionId
|
|
40
|
+
|
|
41
|
+
Session ID
|
|
42
|
+
|
|
43
|
+
# output.tableHeader.planId
|
|
44
|
+
|
|
45
|
+
Plan ID
|
|
46
|
+
|
|
47
|
+
# output.tableHeader.mtime
|
|
48
|
+
|
|
49
|
+
Recorded At
|
|
50
|
+
|
|
51
|
+
# output.tableHeader.size
|
|
52
|
+
|
|
53
|
+
Size
|
|
54
|
+
|
|
55
|
+
# output.tableHeader.path
|
|
56
|
+
|
|
57
|
+
Path
|
|
58
|
+
|
|
59
|
+
# examples
|
|
60
|
+
|
|
61
|
+
- List all traces for all agents and sessions:
|
|
62
|
+
|
|
63
|
+
<%= config.bin %> <%= command.id %>
|
|
64
|
+
|
|
65
|
+
- List all traces for a specific agent:
|
|
66
|
+
|
|
67
|
+
<%= config.bin %> <%= command.id %> --agent My_Agent
|
|
68
|
+
|
|
69
|
+
- List traces for a specific session:
|
|
70
|
+
|
|
71
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>
|
|
72
|
+
|
|
73
|
+
- List traces recorded on or after April 20, 2026 (date-only, interpreted as UTC midnight):
|
|
74
|
+
|
|
75
|
+
<%= config.bin %> <%= command.id %> --since 2026-04-20
|
|
76
|
+
|
|
77
|
+
- List traces recorded on or after a specific UTC time:
|
|
78
|
+
|
|
79
|
+
<%= config.bin %> <%= command.id %> --since 2026-04-20T14:00:00Z
|
|
80
|
+
|
|
81
|
+
- Filter by agent and date together:
|
|
82
|
+
|
|
83
|
+
<%= config.bin %> <%= command.id %> --agent My_Agent --since 2026-04-20
|
|
84
|
+
|
|
85
|
+
- Return results as JSON:
|
|
86
|
+
|
|
87
|
+
<%= config.bin %> <%= command.id %> --json
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Read and analyze trace files from an agent preview session.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Reads trace files recorded during an agent preview session and outputs them in one of three formats.
|
|
8
|
+
|
|
9
|
+
**--format 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 session.
|
|
10
|
+
|
|
11
|
+
**--format detail**: Diagnostic drill-down into a specific dimension (--dimension required). Filters output to only the trace steps relevant to that dimension, minimizing noise.
|
|
12
|
+
|
|
13
|
+
**--format raw**: Unprocessed trace JSON. Use this as a fallback when the trace schema has changed or you need to perform custom analysis.
|
|
14
|
+
|
|
15
|
+
Available dimensions for --format detail: actions, grounding, routing, errors.
|
|
16
|
+
|
|
17
|
+
Use --turn N to scope output to a single conversation turn.
|
|
18
|
+
|
|
19
|
+
# flags.session-id.summary
|
|
20
|
+
|
|
21
|
+
Session ID to read traces for.
|
|
22
|
+
|
|
23
|
+
# flags.format.summary
|
|
24
|
+
|
|
25
|
+
Output format: summary (default), detail, or raw. Use detail with --dimension to drill into a specific aspect of the trace.
|
|
26
|
+
|
|
27
|
+
# flags.dimension.summary
|
|
28
|
+
|
|
29
|
+
Dimension to drill into when using --format detail. One of: actions, grounding, routing, errors. Required when --format is detail.
|
|
30
|
+
|
|
31
|
+
# flags.turn.summary
|
|
32
|
+
|
|
33
|
+
Scope output to this conversation turn number.
|
|
34
|
+
|
|
35
|
+
# error.detailRequiresDimension
|
|
36
|
+
|
|
37
|
+
--format detail requires --dimension. Specify one of: actions, grounding, routing, errors.
|
|
38
|
+
|
|
39
|
+
# error.sessionNotFound
|
|
40
|
+
|
|
41
|
+
Session '%s' was not found in the local session cache. Run "sf agent trace list" to see available sessions.
|
|
42
|
+
|
|
43
|
+
# error.turnIndexNotFound
|
|
44
|
+
|
|
45
|
+
No turn index found for session '%s'. Cannot filter by --turn without a turn index.
|
|
46
|
+
|
|
47
|
+
# error.turnNotFound
|
|
48
|
+
|
|
49
|
+
Turn %s was not found in session '%s'.
|
|
50
|
+
|
|
51
|
+
# error.parseFailedAll
|
|
52
|
+
|
|
53
|
+
Trace parsing failed for all files: %s. The trace schema may have changed. Try --format raw to access unprocessed trace data.
|
|
54
|
+
|
|
55
|
+
# warn.dimensionIgnored
|
|
56
|
+
|
|
57
|
+
--dimension is ignored when --format is '%s'. Use --format detail to drill into a dimension.
|
|
58
|
+
|
|
59
|
+
# warn.parseFailed
|
|
60
|
+
|
|
61
|
+
Trace parsing failed for some files (skipped): %s. Try --format raw to access unprocessed trace data.
|
|
62
|
+
|
|
63
|
+
# output.empty
|
|
64
|
+
|
|
65
|
+
No traces found for this session.
|
|
66
|
+
|
|
67
|
+
# output.emptyDimension
|
|
68
|
+
|
|
69
|
+
No '%s' data found in the traces for this session.
|
|
70
|
+
|
|
71
|
+
# output.tableHeader.turn
|
|
72
|
+
|
|
73
|
+
Turn
|
|
74
|
+
|
|
75
|
+
# output.tableHeader.topic
|
|
76
|
+
|
|
77
|
+
Topic
|
|
78
|
+
|
|
79
|
+
# output.tableHeader.userInput
|
|
80
|
+
|
|
81
|
+
User Input
|
|
82
|
+
|
|
83
|
+
# output.tableHeader.agentResponse
|
|
84
|
+
|
|
85
|
+
Agent Response
|
|
86
|
+
|
|
87
|
+
# output.tableHeader.actionsExecuted
|
|
88
|
+
|
|
89
|
+
Actions Executed
|
|
90
|
+
|
|
91
|
+
# output.tableHeader.latencyMs
|
|
92
|
+
|
|
93
|
+
Latency
|
|
94
|
+
|
|
95
|
+
# output.tableHeader.error
|
|
96
|
+
|
|
97
|
+
Error
|
|
98
|
+
|
|
99
|
+
# output.tableHeader.action
|
|
100
|
+
|
|
101
|
+
Action
|
|
102
|
+
|
|
103
|
+
# output.tableHeader.input
|
|
104
|
+
|
|
105
|
+
Input
|
|
106
|
+
|
|
107
|
+
# output.tableHeader.output
|
|
108
|
+
|
|
109
|
+
Output
|
|
110
|
+
|
|
111
|
+
# output.tableHeader.prompt
|
|
112
|
+
|
|
113
|
+
Prompt
|
|
114
|
+
|
|
115
|
+
# output.tableHeader.response
|
|
116
|
+
|
|
117
|
+
Response
|
|
118
|
+
|
|
119
|
+
# output.tableHeader.intent
|
|
120
|
+
|
|
121
|
+
Intent
|
|
122
|
+
|
|
123
|
+
# output.tableHeader.fromTopic
|
|
124
|
+
|
|
125
|
+
From Topic
|
|
126
|
+
|
|
127
|
+
# output.tableHeader.toTopic
|
|
128
|
+
|
|
129
|
+
To Topic
|
|
130
|
+
|
|
131
|
+
# output.tableHeader.source
|
|
132
|
+
|
|
133
|
+
Source
|
|
134
|
+
|
|
135
|
+
# output.tableHeader.errorCode
|
|
136
|
+
|
|
137
|
+
Error Code
|
|
138
|
+
|
|
139
|
+
# output.tableHeader.message
|
|
140
|
+
|
|
141
|
+
Message
|
|
142
|
+
|
|
143
|
+
# examples
|
|
144
|
+
|
|
145
|
+
- Show a session summary (all turns):
|
|
146
|
+
|
|
147
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>
|
|
148
|
+
|
|
149
|
+
- Show summary for a single turn:
|
|
150
|
+
|
|
151
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --turn 2
|
|
152
|
+
|
|
153
|
+
- Drill into action execution across all turns:
|
|
154
|
+
|
|
155
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension actions
|
|
156
|
+
|
|
157
|
+
- Drill into routing decisions for a specific turn:
|
|
158
|
+
|
|
159
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension routing --turn 1
|
|
160
|
+
|
|
161
|
+
- Show all errors across the session:
|
|
162
|
+
|
|
163
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format detail --dimension errors
|
|
164
|
+
|
|
165
|
+
- Output raw trace JSON for custom parsing:
|
|
166
|
+
|
|
167
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --format raw
|
|
168
|
+
|
|
169
|
+
- Return results as JSON:
|
|
170
|
+
|
|
171
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID> --json
|