agent-inspect 6.27.0 → 6.29.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 +12 -0
- package/README.md +1 -1
- package/docs/BUNDLES.md +4 -1
- package/docs/LIMITATIONS.md +1 -1
- package/docs/SAFE-TRACE-SHARING.md +2 -0
- package/docs/SCHEMA.md +1 -1
- package/package.json +2 -1
- package/packages/cli/dist/{chunk-WQITHDXH.mjs → chunk-D7PT6TXM.mjs} +4368 -3805
- package/packages/cli/dist/chunk-D7PT6TXM.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +4593 -4019
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +4 -4
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-T2ATN6XF.mjs → src-QONEBW2F.mjs} +3 -3
- package/packages/cli/dist/{src-T2ATN6XF.mjs.map → src-QONEBW2F.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +3062 -2490
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +174 -16
- package/packages/core/dist/advanced.d.ts +174 -16
- package/packages/core/dist/advanced.mjs +374 -44
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/core/dist/checks.cjs +10 -1
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.d.cts +9 -476
- package/packages/core/dist/checks.d.ts +9 -476
- package/packages/core/dist/checks.mjs +5 -5
- package/packages/core/dist/{chunk-U25RHRSU.mjs → chunk-3B24355S.mjs} +12 -5
- package/packages/core/dist/chunk-3B24355S.mjs.map +1 -0
- package/packages/core/dist/{chunk-NXQF73EC.mjs → chunk-5B4DNGFB.mjs} +9 -5
- package/packages/core/dist/chunk-5B4DNGFB.mjs.map +1 -0
- package/packages/core/dist/{chunk-NDRMIL7Z.mjs → chunk-FKUTGUFG.mjs} +12 -4
- package/packages/core/dist/chunk-FKUTGUFG.mjs.map +1 -0
- package/packages/core/dist/{chunk-B6PH7A24.mjs → chunk-LGTPSHH2.mjs} +3615 -3606
- package/packages/core/dist/chunk-LGTPSHH2.mjs.map +1 -0
- package/packages/core/dist/{chunk-R4SSYU6D.mjs → chunk-MVRZ7JBH.mjs} +3 -3
- package/packages/core/dist/{chunk-R4SSYU6D.mjs.map → chunk-MVRZ7JBH.mjs.map} +1 -1
- package/packages/core/dist/{chunk-P366CCL2.mjs → chunk-QJI52TH3.mjs} +4 -2
- package/packages/core/dist/chunk-QJI52TH3.mjs.map +1 -0
- package/packages/core/dist/{chunk-WRE4CNPF.mjs → chunk-SJ3C5RIS.mjs} +3 -3
- package/packages/core/dist/chunk-SJ3C5RIS.mjs.map +1 -0
- package/packages/core/dist/{chunk-WGDSM37E.mjs → chunk-TIGBAVED.mjs} +5 -5
- package/packages/core/dist/{chunk-WGDSM37E.mjs.map → chunk-TIGBAVED.mjs.map} +1 -1
- package/packages/core/dist/{chunk-JBNRJLIV.mjs → chunk-TNOPL75V.mjs} +33 -7
- package/packages/core/dist/chunk-TNOPL75V.mjs.map +1 -0
- package/packages/core/dist/{context-DOX2-RjH.d.ts → context-B8zzsmjX.d.ts} +4 -4
- package/packages/core/dist/{context-DOOT9GZ-.d.cts → context-BhaVHtOT.d.cts} +4 -4
- package/packages/core/dist/diff.d.cts +3 -3
- package/packages/core/dist/diff.d.ts +3 -3
- package/packages/core/dist/exporters.cjs +29 -3
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.d.cts +3 -3
- package/packages/core/dist/exporters.d.ts +3 -3
- package/packages/core/dist/exporters.mjs +5 -5
- package/packages/core/dist/{index-DLLz9sce.d.cts → index-BT3KcO6-.d.cts} +2 -2
- package/packages/core/dist/{index-CR4CCRqP.d.cts → index-C61p7wBR.d.cts} +473 -6
- package/packages/core/dist/{index-CtK_p-ps.d.ts → index-DTO2iGeq.d.ts} +473 -6
- package/packages/core/dist/{index-D72DPqAF.d.ts → index-reskZCVW.d.ts} +2 -2
- package/packages/core/dist/index.cjs +10 -1
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.d.cts +7 -7
- package/packages/core/dist/index.d.ts +7 -7
- package/packages/core/dist/index.mjs +6 -6
- package/packages/core/dist/{inspect-event-DRthdZlf.d.cts → inspect-event-CDqjcrG_.d.cts} +1 -1
- package/packages/core/dist/{inspect-event-DRthdZlf.d.ts → inspect-event-CDqjcrG_.d.ts} +1 -1
- package/packages/core/dist/{log-config-CFlIJHTf.d.cts → log-config-DcjV8ZjF.d.cts} +1 -1
- package/packages/core/dist/{log-config-OZRfpHED.d.ts → log-config-N_c5AE09.d.ts} +1 -1
- package/packages/core/dist/logs.d.cts +3 -3
- package/packages/core/dist/logs.d.ts +3 -3
- package/packages/core/dist/{persisted-inspect-event-BVucFVrP.d.ts → persisted-inspect-event-BMwvGIB8.d.ts} +6 -1
- package/packages/core/dist/{persisted-inspect-event-CVZWZldL.d.cts → persisted-inspect-event-DPaCiars.d.cts} +6 -1
- package/packages/core/dist/persisted.cjs +8 -2
- package/packages/core/dist/persisted.cjs.map +1 -1
- package/packages/core/dist/persisted.d.cts +5 -5
- package/packages/core/dist/persisted.d.ts +5 -5
- package/packages/core/dist/persisted.mjs +3 -3
- package/packages/core/dist/readers.cjs +16 -2
- package/packages/core/dist/readers.cjs.map +1 -1
- package/packages/core/dist/readers.d.cts +3 -3
- package/packages/core/dist/readers.d.ts +3 -3
- package/packages/core/dist/readers.mjs +4 -4
- package/packages/core/dist/{types-B562HgN_.d.cts → types-BA_IOdg4.d.cts} +1 -1
- package/packages/core/dist/{types-B562HgN_.d.ts → types-BA_IOdg4.d.ts} +1 -1
- package/packages/core/dist/{types-VzKihKQo.d.cts → types-BSzhK7Z1.d.cts} +11 -2
- package/packages/core/dist/{types-Bx3mEZ04.d.ts → types-C5Y8Idle.d.ts} +11 -2
- package/packages/core/dist/writers.cjs +10 -1
- package/packages/core/dist/writers.cjs.map +1 -1
- package/packages/core/dist/writers.d.cts +2 -2
- package/packages/core/dist/writers.d.ts +2 -2
- package/packages/core/dist/writers.mjs +3 -3
- package/packages/cli/dist/chunk-WQITHDXH.mjs.map +0 -1
- package/packages/core/dist/chunk-B6PH7A24.mjs.map +0 -1
- package/packages/core/dist/chunk-JBNRJLIV.mjs.map +0 -1
- package/packages/core/dist/chunk-NDRMIL7Z.mjs.map +0 -1
- package/packages/core/dist/chunk-NXQF73EC.mjs.map +0 -1
- package/packages/core/dist/chunk-P366CCL2.mjs.map +0 -1
- package/packages/core/dist/chunk-U25RHRSU.mjs.map +0 -1
- package/packages/core/dist/chunk-WRE4CNPF.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { D as DEFAULT_TRACE_READERS, T as TraceFormatCandidate, a as TraceFormatDetectionResult, b as TraceFormatDetectionStatus, c as TraceInput, d as TraceReadError, e as TraceReadErrorCode, f as TraceReadOptions, g as TraceReadResult, h as TraceReadWarning, i as TraceReadWarningSeverity, j as TraceReader, k as TraceReaderDetectOptions, l as TraceReaderReadOptions, m as agentInspectJsonlReader, n as assertTraceInput, o as detectTraceFormat, p as openInferenceJsonReader, q as openTrace, r as openTraceDirectory, s as openTraceFile, t as openTraceText, u as otlpJsonReader, v as readTrace } from './index-
|
|
1
|
+
export { D as DEFAULT_TRACE_READERS, T as TraceFormatCandidate, a as TraceFormatDetectionResult, b as TraceFormatDetectionStatus, c as TraceInput, d as TraceReadError, e as TraceReadErrorCode, f as TraceReadOptions, g as TraceReadResult, h as TraceReadWarning, i as TraceReadWarningSeverity, j as TraceReader, k as TraceReaderDetectOptions, l as TraceReaderReadOptions, m as agentInspectJsonlReader, n as assertTraceInput, o as detectTraceFormat, p as openInferenceJsonReader, q as openTrace, r as openTraceDirectory, s as openTraceFile, t as openTraceText, u as otlpJsonReader, v as readTrace } from './index-BT3KcO6-.cjs';
|
|
2
2
|
export { P as PROGRAMMATIC_DIAGNOSTIC_SPECS, a as ProgrammaticDiagnosticCode, b as ProgrammaticDiagnosticSpec, f as formatProgrammaticDiagnostic } from './programmatic-gZTWLObB.cjs';
|
|
3
|
-
import './inspect-event-
|
|
4
|
-
import './persisted-inspect-event-
|
|
3
|
+
import './inspect-event-CDqjcrG_.cjs';
|
|
4
|
+
import './persisted-inspect-event-DPaCiars.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Version-pinned reader/exporter mapping ledger (6.22).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { D as DEFAULT_TRACE_READERS, T as TraceFormatCandidate, a as TraceFormatDetectionResult, b as TraceFormatDetectionStatus, c as TraceInput, d as TraceReadError, e as TraceReadErrorCode, f as TraceReadOptions, g as TraceReadResult, h as TraceReadWarning, i as TraceReadWarningSeverity, j as TraceReader, k as TraceReaderDetectOptions, l as TraceReaderReadOptions, m as agentInspectJsonlReader, n as assertTraceInput, o as detectTraceFormat, p as openInferenceJsonReader, q as openTrace, r as openTraceDirectory, s as openTraceFile, t as openTraceText, u as otlpJsonReader, v as readTrace } from './index-
|
|
1
|
+
export { D as DEFAULT_TRACE_READERS, T as TraceFormatCandidate, a as TraceFormatDetectionResult, b as TraceFormatDetectionStatus, c as TraceInput, d as TraceReadError, e as TraceReadErrorCode, f as TraceReadOptions, g as TraceReadResult, h as TraceReadWarning, i as TraceReadWarningSeverity, j as TraceReader, k as TraceReaderDetectOptions, l as TraceReaderReadOptions, m as agentInspectJsonlReader, n as assertTraceInput, o as detectTraceFormat, p as openInferenceJsonReader, q as openTrace, r as openTraceDirectory, s as openTraceFile, t as openTraceText, u as otlpJsonReader, v as readTrace } from './index-reskZCVW.js';
|
|
2
2
|
export { P as PROGRAMMATIC_DIAGNOSTIC_SPECS, a as ProgrammaticDiagnosticCode, b as ProgrammaticDiagnosticSpec, f as formatProgrammaticDiagnostic } from './programmatic-gZTWLObB.js';
|
|
3
|
-
import './inspect-event-
|
|
4
|
-
import './persisted-inspect-event-
|
|
3
|
+
import './inspect-event-CDqjcrG_.js';
|
|
4
|
+
import './persisted-inspect-event-BMwvGIB8.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Version-pinned reader/exporter mapping ledger (6.22).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { BUILTIN_MAPPING_LEDGERS, DEFAULT_TRACE_READERS, OPENINFERENCE_MAPPING_LEDGER, OTLP_JSON_MAPPING_LEDGER, TraceReadError, agentInspectJsonlReader, assertTraceInput, detectTraceFormat, getMappingLedger, openInferenceJsonReader, openTrace, openTraceDirectory, openTraceFile, openTraceText, otlpJsonReader, readTrace } from './chunk-
|
|
1
|
+
export { BUILTIN_MAPPING_LEDGERS, DEFAULT_TRACE_READERS, OPENINFERENCE_MAPPING_LEDGER, OTLP_JSON_MAPPING_LEDGER, TraceReadError, agentInspectJsonlReader, assertTraceInput, detectTraceFormat, getMappingLedger, openInferenceJsonReader, openTrace, openTraceDirectory, openTraceFile, openTraceText, otlpJsonReader, readTrace } from './chunk-FKUTGUFG.mjs';
|
|
2
2
|
export { PROGRAMMATIC_DIAGNOSTIC_SPECS, formatProgrammaticDiagnostic } from './chunk-FWK3Q3OJ.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-5B4DNGFB.mjs';
|
|
4
4
|
import './chunk-S4YWKV4G.mjs';
|
|
5
5
|
import './chunk-AK5EN4U2.mjs';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-SJ3C5RIS.mjs';
|
|
7
|
+
import './chunk-QJI52TH3.mjs';
|
|
8
8
|
import './chunk-7TGZLWEE.mjs';
|
|
9
9
|
//# sourceMappingURL=readers.mjs.map
|
|
10
10
|
//# sourceMappingURL=readers.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RedactionRule } from './log-config-
|
|
1
|
+
import { R as RedactionRule } from './log-config-DcjV8ZjF.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Discriminator for what kind of work a {@link Step} represents.
|
|
@@ -22,7 +22,12 @@ interface TokenMetadata {
|
|
|
22
22
|
input?: number;
|
|
23
23
|
output?: number;
|
|
24
24
|
total?: number;
|
|
25
|
+
/** Cache-read tokens (informational; never added to total). */
|
|
25
26
|
cached?: number;
|
|
27
|
+
/** Cache-write / cache-creation tokens (informational). */
|
|
28
|
+
cacheWrite?: number;
|
|
29
|
+
/** Reasoning / thinking tokens when reported separately. */
|
|
30
|
+
reasoning?: number;
|
|
26
31
|
}
|
|
27
32
|
/** Arbitrary structured fields for a step; safe extensions use string keys. */
|
|
28
33
|
interface StepMetadata {
|
|
@@ -105,6 +110,10 @@ interface RunSummary {
|
|
|
105
110
|
total?: number;
|
|
106
111
|
/** Sum of supplied cached counts; cached is not added to total. */
|
|
107
112
|
cached?: number;
|
|
113
|
+
/** Sum of cache-write / cache-creation counts; not added to total. */
|
|
114
|
+
cacheWrite?: number;
|
|
115
|
+
/** Sum of reasoning token counts; not added to total. */
|
|
116
|
+
reasoning?: number;
|
|
108
117
|
};
|
|
109
118
|
}
|
|
110
119
|
/** Fields shared by every persisted trace event line. */
|
|
@@ -243,4 +252,4 @@ declare function isStepStatus(value: unknown): value is StepStatus;
|
|
|
243
252
|
*/
|
|
244
253
|
declare function isTraceEvent(value: unknown): value is TraceEvent;
|
|
245
254
|
|
|
246
|
-
export { type ActiveStepContext as A, type ErrorInfo as E, type InspectRunOptions as I, type ObserveOptions as O, type RedactionProfile as R, type StepOptions as S, type
|
|
255
|
+
export { type ActiveStepContext as A, type ErrorInfo as E, type InspectRunOptions as I, type ObserveOptions as O, type RedactionProfile as R, type StepOptions as S, type TokenMetadata as T, type Run as a, type RunStatus as b, type Step as c, type StepMetadata as d, type StepStatus as e, type StepType as f, type TraceCorrelationMetadata as g, type TraceEvent as h, type ExecutionContext as i, type TraceMetadataStatus as j, type RunSummary as k, type TraceMetadata as l, type RunCompletedEvent as m, type RunStartedEvent as n, type StepCompletedEvent as o, type StepStartedEvent as p, type TraceEventBase as q, type TraceSchemaVersion as r, isStepStatus as s, isStepType as t, isTraceEvent as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as RedactionRule } from './log-config-
|
|
1
|
+
import { R as RedactionRule } from './log-config-N_c5AE09.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Discriminator for what kind of work a {@link Step} represents.
|
|
@@ -22,7 +22,12 @@ interface TokenMetadata {
|
|
|
22
22
|
input?: number;
|
|
23
23
|
output?: number;
|
|
24
24
|
total?: number;
|
|
25
|
+
/** Cache-read tokens (informational; never added to total). */
|
|
25
26
|
cached?: number;
|
|
27
|
+
/** Cache-write / cache-creation tokens (informational). */
|
|
28
|
+
cacheWrite?: number;
|
|
29
|
+
/** Reasoning / thinking tokens when reported separately. */
|
|
30
|
+
reasoning?: number;
|
|
26
31
|
}
|
|
27
32
|
/** Arbitrary structured fields for a step; safe extensions use string keys. */
|
|
28
33
|
interface StepMetadata {
|
|
@@ -105,6 +110,10 @@ interface RunSummary {
|
|
|
105
110
|
total?: number;
|
|
106
111
|
/** Sum of supplied cached counts; cached is not added to total. */
|
|
107
112
|
cached?: number;
|
|
113
|
+
/** Sum of cache-write / cache-creation counts; not added to total. */
|
|
114
|
+
cacheWrite?: number;
|
|
115
|
+
/** Sum of reasoning token counts; not added to total. */
|
|
116
|
+
reasoning?: number;
|
|
108
117
|
};
|
|
109
118
|
}
|
|
110
119
|
/** Fields shared by every persisted trace event line. */
|
|
@@ -243,4 +252,4 @@ declare function isStepStatus(value: unknown): value is StepStatus;
|
|
|
243
252
|
*/
|
|
244
253
|
declare function isTraceEvent(value: unknown): value is TraceEvent;
|
|
245
254
|
|
|
246
|
-
export { type ActiveStepContext as A, type ErrorInfo as E, type InspectRunOptions as I, type ObserveOptions as O, type RedactionProfile as R, type StepOptions as S, type
|
|
255
|
+
export { type ActiveStepContext as A, type ErrorInfo as E, type InspectRunOptions as I, type ObserveOptions as O, type RedactionProfile as R, type StepOptions as S, type TokenMetadata as T, type Run as a, type RunStatus as b, type Step as c, type StepMetadata as d, type StepStatus as e, type StepType as f, type TraceCorrelationMetadata as g, type TraceEvent as h, type ExecutionContext as i, type TraceMetadataStatus as j, type RunSummary as k, type TraceMetadata as l, type RunCompletedEvent as m, type RunStartedEvent as n, type StepCompletedEvent as o, type StepStartedEvent as p, type TraceEventBase as q, type TraceSchemaVersion as r, isStepStatus as s, isStepType as t, isTraceEvent as u };
|
|
@@ -282,6 +282,8 @@ function isPersistedTokenUsage(value) {
|
|
|
282
282
|
if (!isOptionalNonNegativeNumber(value.output)) return false;
|
|
283
283
|
if (!isOptionalNonNegativeNumber(value.total)) return false;
|
|
284
284
|
if (!isOptionalNonNegativeNumber(value.cached)) return false;
|
|
285
|
+
if (!isOptionalNonNegativeNumber(value.cacheWrite)) return false;
|
|
286
|
+
if (!isOptionalNonNegativeNumber(value.reasoning)) return false;
|
|
285
287
|
return true;
|
|
286
288
|
}
|
|
287
289
|
function isPersistedTraceContext(value) {
|
|
@@ -563,7 +565,14 @@ function preparePersistedErrorForDisk(value, opts) {
|
|
|
563
565
|
function prepareTokenUsage(value) {
|
|
564
566
|
if (!isRecord3(value)) return void 0;
|
|
565
567
|
const out = {};
|
|
566
|
-
for (const key of [
|
|
568
|
+
for (const key of [
|
|
569
|
+
"input",
|
|
570
|
+
"output",
|
|
571
|
+
"total",
|
|
572
|
+
"cached",
|
|
573
|
+
"cacheWrite",
|
|
574
|
+
"reasoning"
|
|
575
|
+
]) {
|
|
567
576
|
const item = safeGet(value, key);
|
|
568
577
|
if (typeof item === "number" && Number.isFinite(item) && item >= 0) {
|
|
569
578
|
out[key] = item;
|