agent-inspect 6.29.1 → 6.29.2
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 +12 -0
- package/README.md +1 -1
- package/docs/API.md +4 -0
- package/docs/CLI.md +2 -0
- package/docs/LIMITATIONS.md +1 -0
- package/docs/NETWORK-BEHAVIOR.md +8 -0
- package/docs/TRACE-CONTRACTS.md +11 -0
- package/package.json +2 -2
- package/packages/cli/dist/index.cjs +45 -10
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +46 -11
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/core/dist/advanced.cjs +38 -1
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +2 -2
- package/packages/core/dist/advanced.d.ts +2 -2
- package/packages/core/dist/advanced.mjs +3 -3
- package/packages/core/dist/checks.cjs +15 -2
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.d.cts +2 -2
- package/packages/core/dist/checks.d.ts +2 -2
- package/packages/core/dist/checks.mjs +1 -1
- package/packages/core/dist/{chunk-GPGBKN7W.mjs → chunk-QZIXYP7U.mjs} +17 -4
- package/packages/core/dist/{chunk-GPGBKN7W.mjs.map → chunk-QZIXYP7U.mjs.map} +1 -1
- package/packages/core/dist/{chunk-AQMJFKI6.mjs → chunk-XRI3GB6I.mjs} +40 -3
- package/packages/core/dist/chunk-XRI3GB6I.mjs.map +1 -0
- package/packages/core/dist/{index-C61p7wBR.d.cts → index-BaQ48jrq.d.cts} +9 -1
- package/packages/core/dist/{index-DTO2iGeq.d.ts → index-CrnEOoRu.d.ts} +9 -1
- package/packages/core/dist/index.cjs +38 -1
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.mjs +2 -2
- package/packages/core/dist/chunk-AQMJFKI6.mjs.map +0 -1
|
@@ -6,8 +6,8 @@ import { a as InspectRunTree } from './inspect-event-CDqjcrG_.cjs';
|
|
|
6
6
|
export { A as AttributionConfidence, E as EventSource, b as InspectEvent, I as InspectKind, c as InspectNode } from './inspect-event-CDqjcrG_.cjs';
|
|
7
7
|
import { P as PersistedInspectEvent } from './persisted-inspect-event-DPaCiars.cjs';
|
|
8
8
|
import { Stats } from 'node:fs';
|
|
9
|
-
import { aR as SessionWorkflowMetadata, aS as SessionRunRecord, aT as EnrichSessionSummaryOptions, aU as SessionStatus, aV as SessionSummary, aW as SessionIndex, aX as BuildActivitySummaryOptions, aY as ActivitySummary, aZ as SessionWarning, a_ as BuildSessionIndexOptions, N as TraceCheckResult, X as TraceCheckStatus, a2 as TraceContractInput, Z as TraceContract } from './index-
|
|
10
|
-
export { a$ as ActivityEntry, b0 as CriticalPathStep, b1 as HandoffEdge, b2 as RetryLink, b3 as SESSION_WORKFLOW_KEYS, b4 as SessionCheckSummary, b5 as SessionConfidence, b6 as SessionEdgeSource, b7 as SessionGroup, b8 as SessionLastError, b9 as SessionWorkflowKey } from './index-
|
|
9
|
+
import { aR as SessionWorkflowMetadata, aS as SessionRunRecord, aT as EnrichSessionSummaryOptions, aU as SessionStatus, aV as SessionSummary, aW as SessionIndex, aX as BuildActivitySummaryOptions, aY as ActivitySummary, aZ as SessionWarning, a_ as BuildSessionIndexOptions, N as TraceCheckResult, X as TraceCheckStatus, a2 as TraceContractInput, Z as TraceContract } from './index-BaQ48jrq.cjs';
|
|
10
|
+
export { a$ as ActivityEntry, b0 as CriticalPathStep, b1 as HandoffEdge, b2 as RetryLink, b3 as SESSION_WORKFLOW_KEYS, b4 as SessionCheckSummary, b5 as SessionConfidence, b6 as SessionEdgeSource, b7 as SessionGroup, b8 as SessionLastError, b9 as SessionWorkflowKey } from './index-BaQ48jrq.cjs';
|
|
11
11
|
import { b as ObservedOutcome } from './types-BA_IOdg4.cjs';
|
|
12
12
|
export { a as ObservedOutcomeStatus } from './types-BA_IOdg4.cjs';
|
|
13
13
|
import './writers.cjs';
|
|
@@ -6,8 +6,8 @@ import { a as InspectRunTree } from './inspect-event-CDqjcrG_.js';
|
|
|
6
6
|
export { A as AttributionConfidence, E as EventSource, b as InspectEvent, I as InspectKind, c as InspectNode } from './inspect-event-CDqjcrG_.js';
|
|
7
7
|
import { P as PersistedInspectEvent } from './persisted-inspect-event-BMwvGIB8.js';
|
|
8
8
|
import { Stats } from 'node:fs';
|
|
9
|
-
import { aR as SessionWorkflowMetadata, aS as SessionRunRecord, aT as EnrichSessionSummaryOptions, aU as SessionStatus, aV as SessionSummary, aW as SessionIndex, aX as BuildActivitySummaryOptions, aY as ActivitySummary, aZ as SessionWarning, a_ as BuildSessionIndexOptions, N as TraceCheckResult, X as TraceCheckStatus, a2 as TraceContractInput, Z as TraceContract } from './index-
|
|
10
|
-
export { a$ as ActivityEntry, b0 as CriticalPathStep, b1 as HandoffEdge, b2 as RetryLink, b3 as SESSION_WORKFLOW_KEYS, b4 as SessionCheckSummary, b5 as SessionConfidence, b6 as SessionEdgeSource, b7 as SessionGroup, b8 as SessionLastError, b9 as SessionWorkflowKey } from './index-
|
|
9
|
+
import { aR as SessionWorkflowMetadata, aS as SessionRunRecord, aT as EnrichSessionSummaryOptions, aU as SessionStatus, aV as SessionSummary, aW as SessionIndex, aX as BuildActivitySummaryOptions, aY as ActivitySummary, aZ as SessionWarning, a_ as BuildSessionIndexOptions, N as TraceCheckResult, X as TraceCheckStatus, a2 as TraceContractInput, Z as TraceContract } from './index-CrnEOoRu.js';
|
|
10
|
+
export { a$ as ActivityEntry, b0 as CriticalPathStep, b1 as HandoffEdge, b2 as RetryLink, b3 as SESSION_WORKFLOW_KEYS, b4 as SessionCheckSummary, b5 as SessionConfidence, b6 as SessionEdgeSource, b7 as SessionGroup, b8 as SessionLastError, b9 as SessionWorkflowKey } from './index-CrnEOoRu.js';
|
|
11
11
|
import { b as ObservedOutcome } from './types-BA_IOdg4.js';
|
|
12
12
|
export { a as ObservedOutcomeStatus } from './types-BA_IOdg4.js';
|
|
13
13
|
import './writers.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { extractSessionWorkflowMetadata, sessionKeyForRun, defineTraceContract, runTraceChecks, createRunStatusRule, createToolUsageRule, createRunDurationRule, createLlmUsageRule, createObservedOutcomeRule } from './chunk-
|
|
2
|
-
export { extractSessionWorkflowMetadata, sessionKeyForRun } from './chunk-
|
|
3
|
-
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-
|
|
1
|
+
import { extractSessionWorkflowMetadata, sessionKeyForRun, defineTraceContract, runTraceChecks, createRunStatusRule, createToolUsageRule, createRunDurationRule, createLlmUsageRule, createObservedOutcomeRule } from './chunk-QZIXYP7U.mjs';
|
|
2
|
+
export { extractSessionWorkflowMetadata, sessionKeyForRun } from './chunk-QZIXYP7U.mjs';
|
|
3
|
+
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-XRI3GB6I.mjs';
|
|
4
4
|
import { buildRunTimeline, filterTraces, extractMetadata, buildRunSummary } from './chunk-5RF7FYGL.mjs';
|
|
5
5
|
export { buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildTraceStats, extractMetadata, filterTraces, formatStepLabel, renderRunWhat, renderTimeline, renderTraceStats } from './chunk-5RF7FYGL.mjs';
|
|
6
6
|
import { extractOutcomesFromTraceEvents, parseObservationFilter, summarizeObservedOutcomes, extractOutcomesFromPersistedEvents, renderObservedOutcomesHtml } from './chunk-COZPMOUF.mjs';
|
|
@@ -1579,15 +1579,28 @@ function jsonType(value) {
|
|
|
1579
1579
|
function valuesEqual(left, right) {
|
|
1580
1580
|
return canonicalStructuredEqual(left, right).equal === true;
|
|
1581
1581
|
}
|
|
1582
|
+
function isStructuredArgumentEvidence(value) {
|
|
1583
|
+
return value !== void 0 && value !== null && typeof value === "object";
|
|
1584
|
+
}
|
|
1582
1585
|
function extractToolArgumentPayload(event) {
|
|
1583
1586
|
const attrs2 = event.attributes ?? {};
|
|
1584
1587
|
for (const key of ["arguments", "input", "toolArguments"]) {
|
|
1585
1588
|
const candidate = attrs2[key];
|
|
1586
|
-
if (candidate
|
|
1589
|
+
if (isStructuredArgumentEvidence(candidate)) {
|
|
1587
1590
|
return { present: true, value: candidate };
|
|
1588
1591
|
}
|
|
1589
1592
|
}
|
|
1590
|
-
|
|
1593
|
+
const metadata = attrs2.metadata;
|
|
1594
|
+
if (isStructuredArgumentEvidence(metadata) && !Array.isArray(metadata)) {
|
|
1595
|
+
const nested = metadata;
|
|
1596
|
+
for (const key of ["arguments", "input", "toolArguments"]) {
|
|
1597
|
+
const candidate = nested[key];
|
|
1598
|
+
if (isStructuredArgumentEvidence(candidate)) {
|
|
1599
|
+
return { present: true, value: candidate };
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
if (isStructuredArgumentEvidence(event.inputSummary)) {
|
|
1591
1604
|
return { present: true, value: event.inputSummary };
|
|
1592
1605
|
}
|
|
1593
1606
|
return { present: false, value: void 0 };
|