@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,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags, SfCommand, toHelpSection } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { listSessionTraces } from '@salesforce/agents';
|
|
19
|
+
import { listAllAgentSessions } from '../../../agentSessionScanner.js';
|
|
20
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
21
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.trace.list');
|
|
22
|
+
const ISO_8601 = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?Z)?$/;
|
|
23
|
+
export default class AgentTraceList extends SfCommand {
|
|
24
|
+
static summary = messages.getMessage('summary');
|
|
25
|
+
static description = messages.getMessage('description');
|
|
26
|
+
static examples = messages.getMessages('examples');
|
|
27
|
+
static requiresProject = true;
|
|
28
|
+
static errorCodes = toHelpSection('ERROR CODES', {
|
|
29
|
+
'Succeeded (0)': 'Trace files listed successfully (or empty list if none found).',
|
|
30
|
+
});
|
|
31
|
+
static flags = {
|
|
32
|
+
'session-id': Flags.string({
|
|
33
|
+
summary: messages.getMessage('flags.session-id.summary'),
|
|
34
|
+
}),
|
|
35
|
+
agent: Flags.string({
|
|
36
|
+
summary: messages.getMessage('flags.agent.summary'),
|
|
37
|
+
char: 'a',
|
|
38
|
+
}),
|
|
39
|
+
since: Flags.custom({
|
|
40
|
+
summary: messages.getMessage('flags.since.summary'),
|
|
41
|
+
description: messages.getMessage('flags.since.description'),
|
|
42
|
+
// eslint-disable-next-line @typescript-eslint/require-await
|
|
43
|
+
parse: async (raw) => {
|
|
44
|
+
if (!ISO_8601.test(raw)) {
|
|
45
|
+
throw new SfError(messages.getMessage('error.invalidSince', [raw]), 'InvalidDate');
|
|
46
|
+
}
|
|
47
|
+
const d = new Date(raw);
|
|
48
|
+
if (isNaN(d.getTime())) {
|
|
49
|
+
throw new SfError(messages.getMessage('error.invalidSince', [raw]), 'InvalidDate');
|
|
50
|
+
}
|
|
51
|
+
return d;
|
|
52
|
+
},
|
|
53
|
+
})(),
|
|
54
|
+
};
|
|
55
|
+
async run() {
|
|
56
|
+
const { flags } = await this.parse(AgentTraceList);
|
|
57
|
+
const agentNameFilter = flags.agent?.toLowerCase();
|
|
58
|
+
const allSessions = await listAllAgentSessions(this.project);
|
|
59
|
+
const result = [];
|
|
60
|
+
for (const { agentId, displayName, sessionId } of allSessions) {
|
|
61
|
+
if (agentNameFilter && !displayName.toLowerCase().includes(agentNameFilter))
|
|
62
|
+
continue;
|
|
63
|
+
if (flags['session-id'] && sessionId !== flags['session-id'])
|
|
64
|
+
continue;
|
|
65
|
+
// eslint-disable-next-line no-await-in-loop
|
|
66
|
+
let traces = await listSessionTraces(agentId, sessionId);
|
|
67
|
+
if (flags.since) {
|
|
68
|
+
traces = traces.filter((t) => t.mtime >= flags.since);
|
|
69
|
+
}
|
|
70
|
+
for (const t of traces) {
|
|
71
|
+
result.push({
|
|
72
|
+
agent: displayName,
|
|
73
|
+
sessionId,
|
|
74
|
+
planId: t.planId,
|
|
75
|
+
path: t.path,
|
|
76
|
+
size: t.size,
|
|
77
|
+
mtime: t.mtime.toISOString(),
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (result.length === 0) {
|
|
82
|
+
this.log(messages.getMessage('output.empty'));
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
if (!this.jsonEnabled()) {
|
|
86
|
+
this.table({
|
|
87
|
+
data: result.map((r) => ({ ...r, size: `${r.size}B` })),
|
|
88
|
+
columns: [
|
|
89
|
+
{ key: 'agent', name: messages.getMessage('output.tableHeader.agent') },
|
|
90
|
+
{ key: 'sessionId', name: messages.getMessage('output.tableHeader.sessionId') },
|
|
91
|
+
{ key: 'planId', name: messages.getMessage('output.tableHeader.planId') },
|
|
92
|
+
{ key: 'mtime', name: messages.getMessage('output.tableHeader.mtime') },
|
|
93
|
+
{ key: 'size', name: messages.getMessage('output.tableHeader.size') },
|
|
94
|
+
{ key: 'path', name: messages.getMessage('output.tableHeader.path') },
|
|
95
|
+
],
|
|
96
|
+
});
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C;gBACvD,OAAO,EAAE;oBACP,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE;oBACvE,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC,EAAE;oBAC/E,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC,EAAE;oBACzE,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC,EAAE;oBACvE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC,EAAE;oBACrE,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC,EAAE;iBACtE;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { type PlannerResponse } from '@salesforce/agents';
|
|
3
|
+
export declare const DIMENSIONS: readonly ["actions", "grounding", "routing", "errors"];
|
|
4
|
+
export type Dimension = (typeof DIMENSIONS)[number];
|
|
5
|
+
export type TurnSummary = {
|
|
6
|
+
turn: number;
|
|
7
|
+
planId: string;
|
|
8
|
+
topic: string;
|
|
9
|
+
userInput: string;
|
|
10
|
+
agentResponse: string;
|
|
11
|
+
actionsExecuted: string[];
|
|
12
|
+
latencyMs: number;
|
|
13
|
+
error: string | null;
|
|
14
|
+
};
|
|
15
|
+
export type ActionsRow = {
|
|
16
|
+
dimension: 'actions';
|
|
17
|
+
turn: number;
|
|
18
|
+
planId: string;
|
|
19
|
+
action: string;
|
|
20
|
+
input: string;
|
|
21
|
+
output: string;
|
|
22
|
+
latencyMs: number;
|
|
23
|
+
error: string | null;
|
|
24
|
+
};
|
|
25
|
+
export type GroundingRow = {
|
|
26
|
+
dimension: 'grounding';
|
|
27
|
+
turn: number;
|
|
28
|
+
planId: string;
|
|
29
|
+
prompt: string;
|
|
30
|
+
response: string;
|
|
31
|
+
latencyMs: number;
|
|
32
|
+
};
|
|
33
|
+
export type RoutingRow = {
|
|
34
|
+
dimension: 'routing';
|
|
35
|
+
turn: number;
|
|
36
|
+
planId: string;
|
|
37
|
+
fromTopic: string;
|
|
38
|
+
toTopic: string;
|
|
39
|
+
intent: string;
|
|
40
|
+
};
|
|
41
|
+
export type ErrorsRow = {
|
|
42
|
+
dimension: 'errors';
|
|
43
|
+
turn: number;
|
|
44
|
+
planId: string;
|
|
45
|
+
source: string;
|
|
46
|
+
errorCode: string;
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
export type DimensionRow = ActionsRow | GroundingRow | RoutingRow | ErrorsRow;
|
|
50
|
+
export type AgentTraceReadResult = {
|
|
51
|
+
sessionId: string;
|
|
52
|
+
format: 'summary' | 'detail' | 'raw';
|
|
53
|
+
dimension?: Dimension;
|
|
54
|
+
turns?: TurnSummary[];
|
|
55
|
+
detail?: DimensionRow[];
|
|
56
|
+
raw?: PlannerResponse[];
|
|
57
|
+
};
|
|
58
|
+
export default class AgentTraceRead extends SfCommand<AgentTraceReadResult> {
|
|
59
|
+
static readonly summary: string;
|
|
60
|
+
static readonly description: string;
|
|
61
|
+
static readonly examples: string[];
|
|
62
|
+
static readonly requiresProject = true;
|
|
63
|
+
static readonly flags: {
|
|
64
|
+
'session-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
65
|
+
format: import("@oclif/core/interfaces").OptionFlag<"summary" | "detail" | "raw", import("@oclif/core/interfaces").CustomOptions>;
|
|
66
|
+
dimension: import("@oclif/core/interfaces").OptionFlag<"errors" | "actions" | "grounding" | "routing" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
67
|
+
turn: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
68
|
+
};
|
|
69
|
+
run(): Promise<AgentTraceReadResult>;
|
|
70
|
+
private resolveAgentId;
|
|
71
|
+
private formatOutput;
|
|
72
|
+
private formatDetail;
|
|
73
|
+
private renderDetailTable;
|
|
74
|
+
private formatSummary;
|
|
75
|
+
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026, Salesforce, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags, SfCommand } from '@salesforce/sf-plugins-core';
|
|
17
|
+
import { Messages, SfError } from '@salesforce/core';
|
|
18
|
+
import { listSessionTraces, readSessionTrace, readTurnIndex, } from '@salesforce/agents';
|
|
19
|
+
import { listAllAgentSessions } from '../../../agentSessionScanner.js';
|
|
20
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
21
|
+
const messages = Messages.loadMessages('@salesforce/plugin-agent', 'agent.trace.read');
|
|
22
|
+
export const DIMENSIONS = ['actions', 'grounding', 'routing', 'errors'];
|
|
23
|
+
const isFunctionStep = (s) => s.type === 'FunctionStep';
|
|
24
|
+
const asFunctionWithErrors = (s) => s;
|
|
25
|
+
function summarizeTurn(turn, planId, trace) {
|
|
26
|
+
const plan = trace.plan;
|
|
27
|
+
const userInput = plan.find((s) => s.type === 'UserInputStep');
|
|
28
|
+
const finalResponse = plan.find((s) => s.type === 'PlannerResponseStep');
|
|
29
|
+
const functionSteps = plan.filter(isFunctionStep).map(asFunctionWithErrors);
|
|
30
|
+
const errorStep = functionSteps.find((s) => s.function.errors?.length);
|
|
31
|
+
const errorMsg = errorStep?.function.errors?.[0]?.message ?? null;
|
|
32
|
+
const totalLatency = functionSteps.reduce((acc, s) => acc + (s.executionLatency ?? 0), 0);
|
|
33
|
+
return {
|
|
34
|
+
turn,
|
|
35
|
+
planId,
|
|
36
|
+
topic: trace.topic,
|
|
37
|
+
userInput: userInput?.type === 'UserInputStep' ? userInput.message : '',
|
|
38
|
+
agentResponse: finalResponse?.type === 'PlannerResponseStep' ? finalResponse.message : '',
|
|
39
|
+
actionsExecuted: functionSteps.map((s) => s.function.name),
|
|
40
|
+
latencyMs: totalLatency,
|
|
41
|
+
error: errorMsg,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function extractActions(turn, planId, trace) {
|
|
45
|
+
return trace.plan
|
|
46
|
+
.filter(isFunctionStep)
|
|
47
|
+
.map(asFunctionWithErrors)
|
|
48
|
+
.map((step) => ({
|
|
49
|
+
dimension: 'actions',
|
|
50
|
+
turn,
|
|
51
|
+
planId,
|
|
52
|
+
action: step.function.name,
|
|
53
|
+
input: JSON.stringify(step.function.input),
|
|
54
|
+
output: JSON.stringify(step.function.output),
|
|
55
|
+
latencyMs: step.executionLatency,
|
|
56
|
+
error: step.function.errors?.length ? step.function.errors[0].message : null,
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
function extractGrounding(turn, planId, trace) {
|
|
60
|
+
return trace.plan
|
|
61
|
+
.filter((s) => s.type === 'LLMExecutionStep')
|
|
62
|
+
.filter((s) => s.promptName.includes('React'))
|
|
63
|
+
.map((step) => ({
|
|
64
|
+
dimension: 'grounding',
|
|
65
|
+
turn,
|
|
66
|
+
planId,
|
|
67
|
+
prompt: step.promptName,
|
|
68
|
+
response: step.promptResponse.slice(0, 500),
|
|
69
|
+
latencyMs: step.executionLatency,
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
function extractRouting(turn, planId, trace) {
|
|
73
|
+
const topicStep = trace.plan.find((s) => s.type === 'UpdateTopicStep');
|
|
74
|
+
const eventStep = trace.plan.find((s) => s.type === 'EventStep' && s.eventName === 'topicChangeEvent');
|
|
75
|
+
const fromTopic = eventStep?.type === 'EventStep' ? eventStep.payload.oldTopic : 'null';
|
|
76
|
+
const toTopic = topicStep?.type === 'UpdateTopicStep' ? topicStep.topic : trace.topic;
|
|
77
|
+
return [{ dimension: 'routing', turn, planId, fromTopic, toTopic, intent: trace.intent }];
|
|
78
|
+
}
|
|
79
|
+
function extractErrors(turn, planId, trace) {
|
|
80
|
+
const rows = [];
|
|
81
|
+
for (const step of trace.plan) {
|
|
82
|
+
if (step.type === 'FunctionStep') {
|
|
83
|
+
const errors = asFunctionWithErrors(step).function.errors ?? [];
|
|
84
|
+
for (const e of errors) {
|
|
85
|
+
rows.push({
|
|
86
|
+
dimension: 'errors',
|
|
87
|
+
turn,
|
|
88
|
+
planId,
|
|
89
|
+
source: step.function.name,
|
|
90
|
+
errorCode: e.statusCode,
|
|
91
|
+
message: e.message,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (step.type === 'EventStep' && step.isError) {
|
|
96
|
+
rows.push({
|
|
97
|
+
dimension: 'errors',
|
|
98
|
+
turn,
|
|
99
|
+
planId,
|
|
100
|
+
source: step.eventName,
|
|
101
|
+
errorCode: 'EVENT_ERROR',
|
|
102
|
+
message: JSON.stringify(step.payload),
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return rows;
|
|
107
|
+
}
|
|
108
|
+
async function resolvePlanIds(agentId, sessionId, turn) {
|
|
109
|
+
const turnIndex = await readTurnIndex(agentId, sessionId);
|
|
110
|
+
if (turn !== undefined) {
|
|
111
|
+
// Try the turn index first (planId may be null if trace wasn't correlated)
|
|
112
|
+
const entry = turnIndex?.turns.find((t) => t.turn === turn && t.planId);
|
|
113
|
+
if (entry?.planId) {
|
|
114
|
+
return [{ turn: entry.turn, planId: entry.planId }];
|
|
115
|
+
}
|
|
116
|
+
// Fall back to positional order from trace files on disk
|
|
117
|
+
const traceFiles = await listSessionTraces(agentId, sessionId);
|
|
118
|
+
const byPosition = traceFiles[turn - 1];
|
|
119
|
+
if (!byPosition) {
|
|
120
|
+
throw new SfError(messages.getMessage('error.turnNotFound', [turn, sessionId]), 'TurnNotFound');
|
|
121
|
+
}
|
|
122
|
+
return [{ turn, planId: byPosition.planId }];
|
|
123
|
+
}
|
|
124
|
+
if (turnIndex) {
|
|
125
|
+
return turnIndex.turns.filter((t) => t.planId !== null).map((t) => ({ turn: t.turn, planId: t.planId }));
|
|
126
|
+
}
|
|
127
|
+
// Fall back to listing trace files when no turn index exists
|
|
128
|
+
const traceFiles = await listSessionTraces(agentId, sessionId);
|
|
129
|
+
return traceFiles.map((f, i) => ({ turn: i + 1, planId: f.planId }));
|
|
130
|
+
}
|
|
131
|
+
async function readTraces(agentId, sessionId, planIds) {
|
|
132
|
+
const traces = [];
|
|
133
|
+
const failedFiles = [];
|
|
134
|
+
for (const { turn, planId } of planIds) {
|
|
135
|
+
// eslint-disable-next-line no-await-in-loop
|
|
136
|
+
const trace = await readSessionTrace(agentId, sessionId, planId);
|
|
137
|
+
if (!trace?.plan || !Array.isArray(trace.plan)) {
|
|
138
|
+
failedFiles.push(planId);
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
traces.push({ turn, planId, trace });
|
|
142
|
+
}
|
|
143
|
+
return { traces, failedFiles };
|
|
144
|
+
}
|
|
145
|
+
function extractDimension(turn, planId, trace, dimension) {
|
|
146
|
+
if (dimension === 'actions')
|
|
147
|
+
return extractActions(turn, planId, trace);
|
|
148
|
+
if (dimension === 'grounding')
|
|
149
|
+
return extractGrounding(turn, planId, trace);
|
|
150
|
+
if (dimension === 'routing')
|
|
151
|
+
return extractRouting(turn, planId, trace);
|
|
152
|
+
return extractErrors(turn, planId, trace);
|
|
153
|
+
}
|
|
154
|
+
export default class AgentTraceRead extends SfCommand {
|
|
155
|
+
static summary = messages.getMessage('summary');
|
|
156
|
+
static description = messages.getMessage('description');
|
|
157
|
+
static examples = messages.getMessages('examples');
|
|
158
|
+
static requiresProject = true;
|
|
159
|
+
static flags = {
|
|
160
|
+
'session-id': Flags.string({
|
|
161
|
+
summary: messages.getMessage('flags.session-id.summary'),
|
|
162
|
+
required: true,
|
|
163
|
+
char: 's',
|
|
164
|
+
}),
|
|
165
|
+
format: Flags.option({
|
|
166
|
+
options: ['summary', 'detail', 'raw'],
|
|
167
|
+
default: 'summary',
|
|
168
|
+
summary: messages.getMessage('flags.format.summary'),
|
|
169
|
+
char: 'f',
|
|
170
|
+
})(),
|
|
171
|
+
dimension: Flags.option({
|
|
172
|
+
options: DIMENSIONS,
|
|
173
|
+
summary: messages.getMessage('flags.dimension.summary'),
|
|
174
|
+
char: 'd',
|
|
175
|
+
})(),
|
|
176
|
+
turn: Flags.integer({
|
|
177
|
+
summary: messages.getMessage('flags.turn.summary'),
|
|
178
|
+
char: 't',
|
|
179
|
+
}),
|
|
180
|
+
};
|
|
181
|
+
async run() {
|
|
182
|
+
const { flags } = await this.parse(AgentTraceRead);
|
|
183
|
+
const sessionId = flags['session-id'];
|
|
184
|
+
if (flags.format === 'detail' && !flags.dimension) {
|
|
185
|
+
throw new SfError(messages.getMessage('error.detailRequiresDimension'), 'MissingDimension');
|
|
186
|
+
}
|
|
187
|
+
if (flags.dimension && flags.format !== 'detail') {
|
|
188
|
+
this.warn(messages.getMessage('warn.dimensionIgnored', [flags.format]));
|
|
189
|
+
}
|
|
190
|
+
const agentId = await this.resolveAgentId(sessionId);
|
|
191
|
+
const planIds = await resolvePlanIds(agentId, sessionId, flags.turn);
|
|
192
|
+
if (planIds.length === 0) {
|
|
193
|
+
this.log(messages.getMessage('output.empty'));
|
|
194
|
+
return { sessionId, format: flags.format, turns: [], detail: [], raw: [] };
|
|
195
|
+
}
|
|
196
|
+
const { traces, failedFiles } = await readTraces(agentId, sessionId, planIds);
|
|
197
|
+
if (failedFiles.length > 0 && traces.length === 0) {
|
|
198
|
+
throw new SfError(messages.getMessage('error.parseFailedAll', [failedFiles.join(', ')]), 'TraceParseError');
|
|
199
|
+
}
|
|
200
|
+
if (failedFiles.length > 0) {
|
|
201
|
+
this.warn(messages.getMessage('warn.parseFailed', [failedFiles.join(', ')]));
|
|
202
|
+
}
|
|
203
|
+
return this.formatOutput(sessionId, flags.format, flags.dimension, traces);
|
|
204
|
+
}
|
|
205
|
+
async resolveAgentId(sessionId) {
|
|
206
|
+
const allSessions = await listAllAgentSessions(this.project);
|
|
207
|
+
const entry = allSessions.find((s) => s.sessionId === sessionId);
|
|
208
|
+
if (!entry) {
|
|
209
|
+
throw new SfError(messages.getMessage('error.sessionNotFound', [sessionId]), 'SessionNotFound');
|
|
210
|
+
}
|
|
211
|
+
return entry.agentId;
|
|
212
|
+
}
|
|
213
|
+
formatOutput(sessionId, format, dimension, traces) {
|
|
214
|
+
if (format === 'raw') {
|
|
215
|
+
const raw = traces.map((t) => t.trace);
|
|
216
|
+
if (!this.jsonEnabled())
|
|
217
|
+
this.log(JSON.stringify(raw, null, 2));
|
|
218
|
+
return { sessionId, format: 'raw', raw };
|
|
219
|
+
}
|
|
220
|
+
if (format === 'detail') {
|
|
221
|
+
return this.formatDetail(sessionId, dimension, traces);
|
|
222
|
+
}
|
|
223
|
+
return this.formatSummary(sessionId, traces);
|
|
224
|
+
}
|
|
225
|
+
formatDetail(sessionId, dimension, traces) {
|
|
226
|
+
const detail = traces.flatMap(({ turn, planId, trace }) => extractDimension(turn, planId, trace, dimension));
|
|
227
|
+
if (detail.length === 0) {
|
|
228
|
+
this.log(messages.getMessage('output.emptyDimension', [dimension]));
|
|
229
|
+
return { sessionId, format: 'detail', dimension, detail: [] };
|
|
230
|
+
}
|
|
231
|
+
if (!this.jsonEnabled()) {
|
|
232
|
+
this.renderDetailTable(dimension, detail);
|
|
233
|
+
}
|
|
234
|
+
return { sessionId, format: 'detail', dimension, detail };
|
|
235
|
+
}
|
|
236
|
+
renderDetailTable(dimension, detail) {
|
|
237
|
+
if (dimension === 'actions') {
|
|
238
|
+
this.table({
|
|
239
|
+
data: detail,
|
|
240
|
+
columns: [
|
|
241
|
+
{ key: 'turn', name: messages.getMessage('output.tableHeader.turn') },
|
|
242
|
+
{ key: 'action', name: messages.getMessage('output.tableHeader.action') },
|
|
243
|
+
{ key: 'input', name: messages.getMessage('output.tableHeader.input') },
|
|
244
|
+
{ key: 'output', name: messages.getMessage('output.tableHeader.output') },
|
|
245
|
+
{ key: 'latencyMs', name: messages.getMessage('output.tableHeader.latencyMs') },
|
|
246
|
+
{ key: 'error', name: messages.getMessage('output.tableHeader.error') },
|
|
247
|
+
],
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
else if (dimension === 'grounding') {
|
|
251
|
+
this.table({
|
|
252
|
+
data: detail,
|
|
253
|
+
columns: [
|
|
254
|
+
{ key: 'turn', name: messages.getMessage('output.tableHeader.turn') },
|
|
255
|
+
{ key: 'prompt', name: messages.getMessage('output.tableHeader.prompt') },
|
|
256
|
+
{ key: 'response', name: messages.getMessage('output.tableHeader.response') },
|
|
257
|
+
{ key: 'latencyMs', name: messages.getMessage('output.tableHeader.latencyMs') },
|
|
258
|
+
],
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
else if (dimension === 'routing') {
|
|
262
|
+
this.table({
|
|
263
|
+
data: detail,
|
|
264
|
+
columns: [
|
|
265
|
+
{ key: 'turn', name: messages.getMessage('output.tableHeader.turn') },
|
|
266
|
+
{ key: 'intent', name: messages.getMessage('output.tableHeader.intent') },
|
|
267
|
+
{ key: 'fromTopic', name: messages.getMessage('output.tableHeader.fromTopic') },
|
|
268
|
+
{ key: 'toTopic', name: messages.getMessage('output.tableHeader.toTopic') },
|
|
269
|
+
],
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
this.table({
|
|
274
|
+
data: detail,
|
|
275
|
+
columns: [
|
|
276
|
+
{ key: 'turn', name: messages.getMessage('output.tableHeader.turn') },
|
|
277
|
+
{ key: 'source', name: messages.getMessage('output.tableHeader.source') },
|
|
278
|
+
{ key: 'errorCode', name: messages.getMessage('output.tableHeader.errorCode') },
|
|
279
|
+
{ key: 'message', name: messages.getMessage('output.tableHeader.message') },
|
|
280
|
+
],
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
formatSummary(sessionId, traces) {
|
|
285
|
+
const turns = traces.map(({ turn, planId, trace }) => summarizeTurn(turn, planId, trace));
|
|
286
|
+
if (!this.jsonEnabled()) {
|
|
287
|
+
this.table({
|
|
288
|
+
data: turns.map((t) => ({
|
|
289
|
+
...t,
|
|
290
|
+
actionsExecuted: t.actionsExecuted.join(', ') || '—',
|
|
291
|
+
error: t.error ?? '—',
|
|
292
|
+
latencyMs: `${t.latencyMs}ms`,
|
|
293
|
+
})),
|
|
294
|
+
columns: [
|
|
295
|
+
{ key: 'turn', name: messages.getMessage('output.tableHeader.turn') },
|
|
296
|
+
{ key: 'topic', name: messages.getMessage('output.tableHeader.topic') },
|
|
297
|
+
{ key: 'userInput', name: messages.getMessage('output.tableHeader.userInput') },
|
|
298
|
+
{ key: 'agentResponse', name: messages.getMessage('output.tableHeader.agentResponse') },
|
|
299
|
+
{ key: 'actionsExecuted', name: messages.getMessage('output.tableHeader.actionsExecuted') },
|
|
300
|
+
{ key: 'latencyMs', name: messages.getMessage('output.tableHeader.latencyMs') },
|
|
301
|
+
{ key: 'error', name: messages.getMessage('output.tableHeader.error') },
|
|
302
|
+
],
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
return { sessionId, format: 'summary', turns };
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
//# sourceMappingURL=read.js.map
|
|
@@ -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0B,CAAC,EAAE;iBACxE;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACjD,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Delete agent preview trace files.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Deletes trace files recorded during agent preview sessions. By default, shows a preview of what will be deleted and prompts for confirmation. Use --no-prompt to skip confirmation.
|
|
8
|
+
|
|
9
|
+
Without filters, deletes all traces for all agents and sessions. Use flags to narrow the scope: filter by agent name (--agent), by session (--session-id), or by age (--older-than).
|
|
10
|
+
|
|
11
|
+
# flags.agent.summary
|
|
12
|
+
|
|
13
|
+
Only delete 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
|
+
Only delete traces from this session ID.
|
|
18
|
+
|
|
19
|
+
# flags.older-than.summary
|
|
20
|
+
|
|
21
|
+
Only delete traces older than this duration. Accepts a number followed by a unit: m/minutes, h/hours, d/days, w/weeks (e.g. 7d, 24h, 2w).
|
|
22
|
+
|
|
23
|
+
# flags.no-prompt.summary
|
|
24
|
+
|
|
25
|
+
Skip the confirmation prompt and delete immediately.
|
|
26
|
+
|
|
27
|
+
# error.invalidOlderThan
|
|
28
|
+
|
|
29
|
+
Invalid --older-than value: '%s'. Use a number followed by a unit: m/minutes, h/hours, d/days, w/weeks (e.g. 7d, 24h, 30m, 2w).
|
|
30
|
+
|
|
31
|
+
# prompt.confirm
|
|
32
|
+
|
|
33
|
+
Delete %s trace file(s)? This cannot be undone.
|
|
34
|
+
|
|
35
|
+
# output.noneFound
|
|
36
|
+
|
|
37
|
+
No trace files matched the specified filters.
|
|
38
|
+
|
|
39
|
+
# output.preview
|
|
40
|
+
|
|
41
|
+
Found %s trace file(s) to delete:
|
|
42
|
+
|
|
43
|
+
# output.cancelled
|
|
44
|
+
|
|
45
|
+
Deletion cancelled.
|
|
46
|
+
|
|
47
|
+
# output.deleted
|
|
48
|
+
|
|
49
|
+
Deleted %s trace file(s).
|
|
50
|
+
|
|
51
|
+
# output.tableHeader.agent
|
|
52
|
+
|
|
53
|
+
Agent
|
|
54
|
+
|
|
55
|
+
# output.tableHeader.sessionId
|
|
56
|
+
|
|
57
|
+
Session ID
|
|
58
|
+
|
|
59
|
+
# output.tableHeader.planId
|
|
60
|
+
|
|
61
|
+
Plan ID
|
|
62
|
+
|
|
63
|
+
# examples
|
|
64
|
+
|
|
65
|
+
- Delete all traces for all agents and sessions (with confirmation prompt):
|
|
66
|
+
|
|
67
|
+
<%= config.bin %> <%= command.id %>
|
|
68
|
+
|
|
69
|
+
- Delete all traces for a specific agent:
|
|
70
|
+
|
|
71
|
+
<%= config.bin %> <%= command.id %> --agent My_Agent
|
|
72
|
+
|
|
73
|
+
- Delete traces from a specific session:
|
|
74
|
+
|
|
75
|
+
<%= config.bin %> <%= command.id %> --session-id <SESSION_ID>
|
|
76
|
+
|
|
77
|
+
- Delete traces older than 7 days:
|
|
78
|
+
|
|
79
|
+
<%= config.bin %> <%= command.id %> --older-than 7d
|
|
80
|
+
|
|
81
|
+
- Delete traces older than 24 hours for a specific agent, no prompt:
|
|
82
|
+
|
|
83
|
+
<%= config.bin %> <%= command.id %> --agent My_Agent --older-than 24h --no-prompt
|
|
84
|
+
|
|
85
|
+
- Delete all traces without confirmation:
|
|
86
|
+
|
|
87
|
+
<%= config.bin %> <%= command.id %> --no-prompt
|