agent-inspect 6.17.6 → 6.17.7

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.
@@ -1,4 +1,4 @@
1
- import { runTraceChecks, createRunStatusRule, createToolUsageRule, createRunDurationRule, createLlmUsageRule, createObservedOutcomeRule } from './chunk-DIZPIPY2.mjs';
1
+ import { runTraceChecks, createRunStatusRule, createToolUsageRule, createRunDurationRule, createLlmUsageRule, createObservedOutcomeRule } from './chunk-LQC7IED3.mjs';
2
2
  export { MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, TERMINAL_INDENT, TraceDirectory, createInspector, createInspectorRuntime, formatTerminalName, getCurrentContext, getCurrentCorrelationMetadata, getCurrentDepth, getCurrentRunId, getCurrentRunName, getCurrentStepId, getIndent, getParentStepId, getTraceDirFromContext, getTraceSafetyFromContext, hasActiveContext, isAgentInspectEnabled, isSilentContext, maybeInspectRun, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, renderErrorLine, renderRunSummary, renderStepLine, resolveTraceDir, runWithContext, runWithStepContext } from './chunk-ZWA5RWMV.mjs';
3
3
  import { buildRunTimeline, filterTraces, extractMetadata, buildRunSummary } from './chunk-SGL4JGCD.mjs';
4
4
  export { buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildTraceStats, extractMetadata, filterTraces, formatStepLabel, renderRunWhat, renderTimeline, renderTraceStats } from './chunk-SGL4JGCD.mjs';
@@ -452,29 +452,30 @@ async function searchTraces(metas, options) {
452
452
  }
453
453
  function matchRunLevel(m, opts) {
454
454
  if (opts.stepTypeFilter || opts.toolQuery) return [];
455
- const out = [];
455
+ if (opts.statusFilter && m.status !== opts.statusFilter) return [];
456
+ if (opts.nameQuery && !nameMatches(m.name ?? m.runId, opts.nameQuery)) {
457
+ return [];
458
+ }
459
+ if (opts.durationFilter && !durationMatches(m.durationMs, opts.durationFilter)) {
460
+ return [];
461
+ }
456
462
  const fields = [];
457
- if (opts.statusFilter && m.status === opts.statusFilter) {
458
- fields.push("run.status");
459
- }
460
- if (opts.nameQuery && nameMatches(m.name ?? m.runId, opts.nameQuery)) {
461
- fields.push("run.name");
462
- }
463
- if (opts.durationFilter && durationMatches(m.durationMs, opts.durationFilter)) {
464
- fields.push("run.durationMs");
465
- }
466
- if (fields.length === 0) return out;
467
- out.push({
468
- runId: m.runId,
469
- runName: m.name,
470
- runStatus: m.status,
471
- timestamp: m.startedAt,
472
- durationMs: m.durationMs,
473
- matchReason: `run match: ${fields.join(", ")}`,
474
- matchedFields: fields,
475
- filePath: m.filePath
476
- });
477
- return out;
463
+ if (opts.statusFilter) fields.push("run.status");
464
+ if (opts.nameQuery) fields.push("run.name");
465
+ if (opts.durationFilter) fields.push("run.durationMs");
466
+ if (fields.length === 0) return [];
467
+ return [
468
+ {
469
+ runId: m.runId,
470
+ runName: m.name,
471
+ runStatus: m.status,
472
+ timestamp: m.startedAt,
473
+ durationMs: m.durationMs,
474
+ matchReason: `run match: ${fields.join(", ")}`,
475
+ matchedFields: fields,
476
+ filePath: m.filePath
477
+ }
478
+ ];
478
479
  }
479
480
  function matchStepLevel(m, events, opts) {
480
481
  const out = [];