agent-inspect 5.3.0 → 5.4.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/CHANGELOG.md +6 -0
- package/docs/CLI.md +5 -1
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-4LKKB4Z5.mjs → chunk-YS2I722C.mjs} +112 -3
- package/packages/cli/dist/chunk-YS2I722C.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +131 -6
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +18 -9
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-4SGS3Q2D.mjs → src-FVNE44UA.mjs} +3 -3
- package/packages/cli/dist/{src-4SGS3Q2D.mjs.map → src-FVNE44UA.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +116 -0
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +7 -1
- package/packages/core/dist/advanced.d.ts +7 -1
- package/packages/core/dist/advanced.mjs +113 -1
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/cli/dist/chunk-4LKKB4Z5.mjs.map +0 -1
|
@@ -877,6 +877,12 @@ declare function runSuite(options?: RunSuiteOptions): Promise<SuiteRunResult>;
|
|
|
877
877
|
declare function renderSuiteReportMarkdown(result: SuiteRunResult): string;
|
|
878
878
|
declare function renderSuiteReport(result: SuiteRunResult, options?: RenderSuiteReportOptions): string;
|
|
879
879
|
|
|
880
|
+
declare const SUITE_TEMPLATE_IDS: readonly ["customer-support-agent", "refund-agent", "sales-assistant", "browser-task-agent", "mcp-tool-agent", "workflow-agent", "rag-answer-agent", "human-approval-agent"];
|
|
881
|
+
type SuiteTemplateId = (typeof SUITE_TEMPLATE_IDS)[number];
|
|
882
|
+
declare function listSuiteTemplates(): SuiteTemplateId[];
|
|
883
|
+
declare function getSuiteTemplate(id: string): SuiteConfig | undefined;
|
|
884
|
+
declare function resolveSuiteTemplate(id: string): SuiteConfig;
|
|
885
|
+
|
|
880
886
|
type CohortMetricId = "errorRate" | "duration" | "toolChoice" | "toolOrdering" | "llmCallCount" | "tokenUsage" | "retryCount" | "observationFailure" | "guardrailFailure" | "circuitViolation" | "redactionWarning";
|
|
881
887
|
declare const COHORT_METRIC_IDS: readonly CohortMetricId[];
|
|
882
888
|
interface CohortRunMetrics {
|
|
@@ -1010,4 +1016,4 @@ declare function renderGateGithubStepSummary(result: GateResult): string;
|
|
|
1010
1016
|
declare function renderGateJUnit(result: GateResult): string;
|
|
1011
1017
|
declare function renderGateReport(result: GateResult, options?: RenderGateReportOptions): string;
|
|
1012
1018
|
|
|
1013
|
-
export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, type EnrichSessionSummaryOptions, ErrorInfo, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, formatDuration, formatError, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getTraceFilePath, groupSessionCohorts, initializeTraceFile, isAgentInspectTrace, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveTraceDir, runGate, runSuite, searchTraces, serializeEvent, sessionKeyForRun, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateSuiteConfig, warn, writeTraceEvent };
|
|
1019
|
+
export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, type EnrichSessionSummaryOptions, ErrorInfo, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, type SuiteTemplateId, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, formatDuration, formatError, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getSuiteTemplate, getTraceFilePath, groupSessionCohorts, initializeTraceFile, isAgentInspectTrace, listSuiteTemplates, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, searchTraces, serializeEvent, sessionKeyForRun, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateSuiteConfig, warn, writeTraceEvent };
|
|
@@ -877,6 +877,12 @@ declare function runSuite(options?: RunSuiteOptions): Promise<SuiteRunResult>;
|
|
|
877
877
|
declare function renderSuiteReportMarkdown(result: SuiteRunResult): string;
|
|
878
878
|
declare function renderSuiteReport(result: SuiteRunResult, options?: RenderSuiteReportOptions): string;
|
|
879
879
|
|
|
880
|
+
declare const SUITE_TEMPLATE_IDS: readonly ["customer-support-agent", "refund-agent", "sales-assistant", "browser-task-agent", "mcp-tool-agent", "workflow-agent", "rag-answer-agent", "human-approval-agent"];
|
|
881
|
+
type SuiteTemplateId = (typeof SUITE_TEMPLATE_IDS)[number];
|
|
882
|
+
declare function listSuiteTemplates(): SuiteTemplateId[];
|
|
883
|
+
declare function getSuiteTemplate(id: string): SuiteConfig | undefined;
|
|
884
|
+
declare function resolveSuiteTemplate(id: string): SuiteConfig;
|
|
885
|
+
|
|
880
886
|
type CohortMetricId = "errorRate" | "duration" | "toolChoice" | "toolOrdering" | "llmCallCount" | "tokenUsage" | "retryCount" | "observationFailure" | "guardrailFailure" | "circuitViolation" | "redactionWarning";
|
|
881
887
|
declare const COHORT_METRIC_IDS: readonly CohortMetricId[];
|
|
882
888
|
interface CohortRunMetrics {
|
|
@@ -1010,4 +1016,4 @@ declare function renderGateGithubStepSummary(result: GateResult): string;
|
|
|
1010
1016
|
declare function renderGateJUnit(result: GateResult): string;
|
|
1011
1017
|
declare function renderGateReport(result: GateResult, options?: RenderGateReportOptions): string;
|
|
1012
1018
|
|
|
1013
|
-
export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, type EnrichSessionSummaryOptions, ErrorInfo, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, formatDuration, formatError, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getTraceFilePath, groupSessionCohorts, initializeTraceFile, isAgentInspectTrace, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveTraceDir, runGate, runSuite, searchTraces, serializeEvent, sessionKeyForRun, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateSuiteConfig, warn, writeTraceEvent };
|
|
1019
|
+
export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, type EnrichSessionSummaryOptions, ErrorInfo, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, type SuiteTemplateId, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, formatDuration, formatError, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getSuiteTemplate, getTraceFilePath, groupSessionCohorts, initializeTraceFile, isAgentInspectTrace, listSuiteTemplates, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, searchTraces, serializeEvent, sessionKeyForRun, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateSuiteConfig, warn, writeTraceEvent };
|
|
@@ -2220,6 +2220,118 @@ function renderSuiteReport(result, options = {}) {
|
|
|
2220
2220
|
return renderSuiteReportMarkdown(result);
|
|
2221
2221
|
}
|
|
2222
2222
|
|
|
2223
|
+
// packages/core/src/suite/templates.ts
|
|
2224
|
+
var SUITE_TEMPLATE_IDS = [
|
|
2225
|
+
"customer-support-agent",
|
|
2226
|
+
"refund-agent",
|
|
2227
|
+
"sales-assistant",
|
|
2228
|
+
"browser-task-agent",
|
|
2229
|
+
"mcp-tool-agent",
|
|
2230
|
+
"workflow-agent",
|
|
2231
|
+
"rag-answer-agent",
|
|
2232
|
+
"human-approval-agent"
|
|
2233
|
+
];
|
|
2234
|
+
function baseTemplate(name, cases) {
|
|
2235
|
+
return {
|
|
2236
|
+
name,
|
|
2237
|
+
traces: "./.agent-inspect",
|
|
2238
|
+
cases,
|
|
2239
|
+
checks: {
|
|
2240
|
+
select: ["run.status", "outcome.status"],
|
|
2241
|
+
run: { maxDurationMs: 6e4 }
|
|
2242
|
+
},
|
|
2243
|
+
redactionProfile: "local",
|
|
2244
|
+
artifacts: { outputDir: ".agent-inspect/suite-runs" }
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
var TEMPLATES = {
|
|
2248
|
+
"customer-support-agent": baseTemplate("customer-support-agent", [
|
|
2249
|
+
{
|
|
2250
|
+
id: "support-ticket",
|
|
2251
|
+
runId: "support-ticket",
|
|
2252
|
+
requireTools: ["searchDocs"],
|
|
2253
|
+
forbidTools: ["deleteAccount"],
|
|
2254
|
+
expectedObservations: ["answerReady"],
|
|
2255
|
+
maxDurationMs: 45e3
|
|
2256
|
+
}
|
|
2257
|
+
]),
|
|
2258
|
+
"refund-agent": baseTemplate("refund-agent", [
|
|
2259
|
+
{
|
|
2260
|
+
id: "refund-flow",
|
|
2261
|
+
runId: "refund-flow",
|
|
2262
|
+
requireTools: ["searchDocs"],
|
|
2263
|
+
forbidTools: ["deleteAccount"],
|
|
2264
|
+
expectedObservations: ["policyShown"],
|
|
2265
|
+
maxDurationMs: 3e4
|
|
2266
|
+
}
|
|
2267
|
+
]),
|
|
2268
|
+
"sales-assistant": baseTemplate("sales-assistant", [
|
|
2269
|
+
{
|
|
2270
|
+
id: "quote-request",
|
|
2271
|
+
runId: "quote-request",
|
|
2272
|
+
requireTools: ["lookupPricing"],
|
|
2273
|
+
maxDurationMs: 3e4
|
|
2274
|
+
}
|
|
2275
|
+
]),
|
|
2276
|
+
"browser-task-agent": baseTemplate("browser-task-agent", [
|
|
2277
|
+
{
|
|
2278
|
+
id: "browser-nav",
|
|
2279
|
+
runId: "browser-nav",
|
|
2280
|
+
requireTools: ["browserNavigate"],
|
|
2281
|
+
maxDurationMs: 12e4
|
|
2282
|
+
}
|
|
2283
|
+
]),
|
|
2284
|
+
"mcp-tool-agent": baseTemplate("mcp-tool-agent", [
|
|
2285
|
+
{
|
|
2286
|
+
id: "mcp-call",
|
|
2287
|
+
runId: "mcp-call",
|
|
2288
|
+
requireTools: ["mcp:tools/list"],
|
|
2289
|
+
maxDurationMs: 3e4
|
|
2290
|
+
}
|
|
2291
|
+
]),
|
|
2292
|
+
"workflow-agent": baseTemplate("workflow-agent", [
|
|
2293
|
+
{
|
|
2294
|
+
id: "workflow-handoff",
|
|
2295
|
+
runId: "workflow-handoff",
|
|
2296
|
+
requireTools: ["handoff"],
|
|
2297
|
+
maxDurationMs: 6e4
|
|
2298
|
+
}
|
|
2299
|
+
]),
|
|
2300
|
+
"rag-answer-agent": baseTemplate("rag-answer-agent", [
|
|
2301
|
+
{
|
|
2302
|
+
id: "rag-answer",
|
|
2303
|
+
runId: "rag-answer",
|
|
2304
|
+
requireTools: ["retrieve", "answer"],
|
|
2305
|
+
expectedObservations: ["citationShown"],
|
|
2306
|
+
maxDurationMs: 45e3
|
|
2307
|
+
}
|
|
2308
|
+
]),
|
|
2309
|
+
"human-approval-agent": baseTemplate("human-approval-agent", [
|
|
2310
|
+
{
|
|
2311
|
+
id: "approval-gate",
|
|
2312
|
+
runId: "approval-gate",
|
|
2313
|
+
expectedObservations: ["approvalRequested", "approvalGranted"],
|
|
2314
|
+
maxDurationMs: 6e4
|
|
2315
|
+
}
|
|
2316
|
+
])
|
|
2317
|
+
};
|
|
2318
|
+
function listSuiteTemplates() {
|
|
2319
|
+
return [...SUITE_TEMPLATE_IDS];
|
|
2320
|
+
}
|
|
2321
|
+
function getSuiteTemplate(id) {
|
|
2322
|
+
if (!SUITE_TEMPLATE_IDS.includes(id)) return void 0;
|
|
2323
|
+
return structuredClone(TEMPLATES[id]);
|
|
2324
|
+
}
|
|
2325
|
+
function resolveSuiteTemplate(id) {
|
|
2326
|
+
const template = getSuiteTemplate(id);
|
|
2327
|
+
if (template === void 0) {
|
|
2328
|
+
throw new Error(
|
|
2329
|
+
`Unknown suite template "${id}". Available: ${SUITE_TEMPLATE_IDS.join(", ")}`
|
|
2330
|
+
);
|
|
2331
|
+
}
|
|
2332
|
+
return template;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2223
2335
|
// packages/core/src/cohort/types.ts
|
|
2224
2336
|
var COHORT_METRIC_IDS = [
|
|
2225
2337
|
"errorRate",
|
|
@@ -3132,6 +3244,6 @@ function renderGateReport(result, options = {}) {
|
|
|
3132
3244
|
return renderGateSummaryMarkdown(result);
|
|
3133
3245
|
}
|
|
3134
3246
|
|
|
3135
|
-
export { COHORT_METRIC_IDS, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, SESSION_WORKFLOW_KEYS, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compareCohortAggregates, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, enrichSessionRunRecord, enrichSessionSummary, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, gateHasThresholds, groupSessionCohorts, isAgentInspectTrace, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDurationFilter, parseGateList, parseGateNumber, parseGroupBySpec, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderSuiteReport, renderSuiteReportMarkdown, renderTraceStats, resolveBundleRunIds, resolveSuiteCaseTrace, resolveSuiteConfigPath, runGate, runSuite, searchTraces, sessionKeyForRun, toMetadataSafeStatus, traceMetasToSessionRunRecords, validateSuiteConfig };
|
|
3247
|
+
export { COHORT_METRIC_IDS, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compareCohortAggregates, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, enrichSessionRunRecord, enrichSessionSummary, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, gateHasThresholds, getSuiteTemplate, groupSessionCohorts, isAgentInspectTrace, listSuiteTemplates, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDurationFilter, parseGateList, parseGateNumber, parseGroupBySpec, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderSuiteReport, renderSuiteReportMarkdown, renderTraceStats, resolveBundleRunIds, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, runGate, runSuite, searchTraces, sessionKeyForRun, toMetadataSafeStatus, traceMetasToSessionRunRecords, validateSuiteConfig };
|
|
3136
3248
|
//# sourceMappingURL=advanced.mjs.map
|
|
3137
3249
|
//# sourceMappingURL=advanced.mjs.map
|