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,10 +1,10 @@
|
|
|
1
|
-
import { I as InspectRunOptions, S as StepOptions, O as ObserveOptions } from './types-
|
|
2
|
-
export { E as ErrorInfo, R as RedactionProfile, a as Run, b as RunStatus, c as Step, d as StepMetadata, e as StepStatus, f as StepType,
|
|
3
|
-
export { C as CreateInspectorOptions, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, d as InspectorStepOptions, e as createInspector, g as getCurrentCorrelationMetadata, m as maybeInspectRun } from './context-
|
|
4
|
-
import {
|
|
5
|
-
import './log-config-
|
|
6
|
-
import './inspect-event-
|
|
7
|
-
import './persisted-inspect-event-
|
|
1
|
+
import { I as InspectRunOptions, S as StepOptions, O as ObserveOptions } from './types-BSzhK7Z1.cjs';
|
|
2
|
+
export { E as ErrorInfo, R as RedactionProfile, a as Run, b as RunStatus, c as Step, d as StepMetadata, e as StepStatus, f as StepType, T as TokenMetadata, g as TraceCorrelationMetadata } from './types-BSzhK7Z1.cjs';
|
|
3
|
+
export { C as CreateInspectorOptions, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, d as InspectorStepOptions, e as createInspector, g as getCurrentCorrelationMetadata, m as maybeInspectRun } from './context-BhaVHtOT.cjs';
|
|
4
|
+
import { O as ObserveOutcomeOptions } from './types-BA_IOdg4.cjs';
|
|
5
|
+
import './log-config-DcjV8ZjF.cjs';
|
|
6
|
+
import './inspect-event-CDqjcrG_.cjs';
|
|
7
|
+
import './persisted-inspect-event-DPaCiars.cjs';
|
|
8
8
|
import './writers.cjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { I as InspectRunOptions, S as StepOptions, O as ObserveOptions } from './types-
|
|
2
|
-
export { E as ErrorInfo, R as RedactionProfile, a as Run, b as RunStatus, c as Step, d as StepMetadata, e as StepStatus, f as StepType,
|
|
3
|
-
export { C as CreateInspectorOptions, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, d as InspectorStepOptions, e as createInspector, g as getCurrentCorrelationMetadata, m as maybeInspectRun } from './context-
|
|
4
|
-
import {
|
|
5
|
-
import './log-config-
|
|
6
|
-
import './inspect-event-
|
|
7
|
-
import './persisted-inspect-event-
|
|
1
|
+
import { I as InspectRunOptions, S as StepOptions, O as ObserveOptions } from './types-C5Y8Idle.js';
|
|
2
|
+
export { E as ErrorInfo, R as RedactionProfile, a as Run, b as RunStatus, c as Step, d as StepMetadata, e as StepStatus, f as StepType, T as TokenMetadata, g as TraceCorrelationMetadata } from './types-C5Y8Idle.js';
|
|
3
|
+
export { C as CreateInspectorOptions, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, d as InspectorStepOptions, e as createInspector, g as getCurrentCorrelationMetadata, m as maybeInspectRun } from './context-B8zzsmjX.js';
|
|
4
|
+
import { O as ObserveOutcomeOptions } from './types-BA_IOdg4.js';
|
|
5
|
+
import './log-config-N_c5AE09.js';
|
|
6
|
+
import './inspect-event-CDqjcrG_.js';
|
|
7
|
+
import './persisted-inspect-event-BMwvGIB8.js';
|
|
8
8
|
import './writers.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { getCurrentContext, getCurrentDepth, getParentStepId, getTraceSafetyFromContext, runWithStepContext, printStepStart, printStepComplete, printError, printFailedAt, inspectRun } from './chunk-
|
|
2
|
-
export { createInspector, getCurrentCorrelationMetadata, inspectRun, maybeInspectRun } from './chunk-
|
|
3
|
-
import { normalizeObserveOutcomeInput, prepareOutcomeEventForDisk } from './chunk-
|
|
1
|
+
import { getCurrentContext, getCurrentDepth, getParentStepId, getTraceSafetyFromContext, runWithStepContext, printStepStart, printStepComplete, printError, printFailedAt, inspectRun } from './chunk-TIGBAVED.mjs';
|
|
2
|
+
export { createInspector, getCurrentCorrelationMetadata, inspectRun, maybeInspectRun } from './chunk-TIGBAVED.mjs';
|
|
3
|
+
import { normalizeObserveOutcomeInput, prepareOutcomeEventForDisk } from './chunk-MVRZ7JBH.mjs';
|
|
4
4
|
import './chunk-BT7CATSD.mjs';
|
|
5
|
-
import { prepareTraceEventForDisk, writeTraceEvent } from './chunk-
|
|
5
|
+
import { prepareTraceEventForDisk, writeTraceEvent } from './chunk-3B24355S.mjs';
|
|
6
6
|
import './chunk-VU6O5QAH.mjs';
|
|
7
7
|
import './chunk-S4YWKV4G.mjs';
|
|
8
|
-
import { warn, createStepId, formatError, truncateName } from './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import { warn, createStepId, formatError, truncateName } from './chunk-SJ3C5RIS.mjs';
|
|
9
|
+
import './chunk-QJI52TH3.mjs';
|
|
10
10
|
import './chunk-7TGZLWEE.mjs';
|
|
11
11
|
|
|
12
12
|
// packages/core/src/step.ts
|
|
@@ -47,4 +47,4 @@ interface InspectRunTree {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export type { AttributionConfidence as A, EventSource as E, InspectKind as I, InspectRunTree as a,
|
|
50
|
+
export type { AttributionConfidence as A, EventSource as E, InspectKind as I, InspectRunTree as a, InspectEvent as b, InspectNode as c };
|
|
@@ -47,4 +47,4 @@ interface InspectRunTree {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export type { AttributionConfidence as A, EventSource as E, InspectKind as I, InspectRunTree as a,
|
|
50
|
+
export type { AttributionConfidence as A, EventSource as E, InspectKind as I, InspectRunTree as a, InspectEvent as b, InspectNode as c };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as LogIngestConfig, a as LogEventMapping, R as RedactionRule } from './log-config-
|
|
2
|
-
export { b as RedactionStrategy } from './log-config-
|
|
3
|
-
import {
|
|
1
|
+
import { L as LogIngestConfig, a as LogEventMapping, R as RedactionRule } from './log-config-DcjV8ZjF.cjs';
|
|
2
|
+
export { b as RedactionStrategy } from './log-config-DcjV8ZjF.cjs';
|
|
3
|
+
import { b as InspectEvent, a as InspectRunTree } from './inspect-event-CDqjcrG_.cjs';
|
|
4
4
|
|
|
5
5
|
type ParserWarningCode = "MALFORMED_JSON" | "MISSING_RUN_ID" | "MISSING_EVENT" | "MISSING_TIMESTAMP" | "UNSUPPORTED_LOG4JS_PAYLOAD" | "CONFIG_ERROR" | "UNKNOWN";
|
|
6
6
|
interface ParserWarning {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as LogIngestConfig, a as LogEventMapping, R as RedactionRule } from './log-config-
|
|
2
|
-
export { b as RedactionStrategy } from './log-config-
|
|
3
|
-
import {
|
|
1
|
+
import { L as LogIngestConfig, a as LogEventMapping, R as RedactionRule } from './log-config-N_c5AE09.js';
|
|
2
|
+
export { b as RedactionStrategy } from './log-config-N_c5AE09.js';
|
|
3
|
+
import { b as InspectEvent, a as InspectRunTree } from './inspect-event-CDqjcrG_.js';
|
|
4
4
|
|
|
5
5
|
type ParserWarningCode = "MALFORMED_JSON" | "MISSING_RUN_ID" | "MISSING_EVENT" | "MISSING_TIMESTAMP" | "UNSUPPORTED_LOG4JS_PAYLOAD" | "CONFIG_ERROR" | "UNKNOWN";
|
|
6
6
|
interface ParserWarning {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InspectKind, A as AttributionConfidence } from './inspect-event-
|
|
1
|
+
import { I as InspectKind, A as AttributionConfidence } from './inspect-event-CDqjcrG_.js';
|
|
2
2
|
|
|
3
3
|
type PersistedSchemaVersion = "0.2" | "1.0";
|
|
4
4
|
type PersistedEventSourceType = "manual" | "json-log" | "log4js" | "adapter" | "ai-sdk" | "otel";
|
|
@@ -17,7 +17,12 @@ interface PersistedTokenUsage {
|
|
|
17
17
|
input?: number;
|
|
18
18
|
output?: number;
|
|
19
19
|
total?: number;
|
|
20
|
+
/** Cache-read tokens (informational; never added to total). */
|
|
20
21
|
cached?: number;
|
|
22
|
+
/** Cache-write / cache-creation tokens (informational; never added to total). */
|
|
23
|
+
cacheWrite?: number;
|
|
24
|
+
/** Reasoning / thinking tokens when providers report them separately. */
|
|
25
|
+
reasoning?: number;
|
|
21
26
|
}
|
|
22
27
|
interface PersistedTraceContext {
|
|
23
28
|
traceId?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as InspectKind, A as AttributionConfidence } from './inspect-event-
|
|
1
|
+
import { I as InspectKind, A as AttributionConfidence } from './inspect-event-CDqjcrG_.cjs';
|
|
2
2
|
|
|
3
3
|
type PersistedSchemaVersion = "0.2" | "1.0";
|
|
4
4
|
type PersistedEventSourceType = "manual" | "json-log" | "log4js" | "adapter" | "ai-sdk" | "otel";
|
|
@@ -17,7 +17,12 @@ interface PersistedTokenUsage {
|
|
|
17
17
|
input?: number;
|
|
18
18
|
output?: number;
|
|
19
19
|
total?: number;
|
|
20
|
+
/** Cache-read tokens (informational; never added to total). */
|
|
20
21
|
cached?: number;
|
|
22
|
+
/** Cache-write / cache-creation tokens (informational; never added to total). */
|
|
23
|
+
cacheWrite?: number;
|
|
24
|
+
/** Reasoning / thinking tokens when providers report them separately. */
|
|
25
|
+
reasoning?: number;
|
|
21
26
|
}
|
|
22
27
|
interface PersistedTraceContext {
|
|
23
28
|
traceId?: string;
|
|
@@ -85,6 +85,8 @@ function isPersistedTokenUsage(value) {
|
|
|
85
85
|
if (!isOptionalNonNegativeNumber(value.output)) return false;
|
|
86
86
|
if (!isOptionalNonNegativeNumber(value.total)) return false;
|
|
87
87
|
if (!isOptionalNonNegativeNumber(value.cached)) return false;
|
|
88
|
+
if (!isOptionalNonNegativeNumber(value.cacheWrite)) return false;
|
|
89
|
+
if (!isOptionalNonNegativeNumber(value.reasoning)) return false;
|
|
88
90
|
return true;
|
|
89
91
|
}
|
|
90
92
|
function isPersistedTraceContext(value) {
|
|
@@ -177,16 +179,20 @@ function normalizeTokenUsage(value) {
|
|
|
177
179
|
const output = nonNegativeFinite(value.output);
|
|
178
180
|
const suppliedTotal = nonNegativeFinite(value.total);
|
|
179
181
|
const cached = nonNegativeFinite(value.cached);
|
|
182
|
+
const cacheWrite = nonNegativeFinite(value.cacheWrite);
|
|
183
|
+
const reasoning = nonNegativeFinite(value.reasoning);
|
|
180
184
|
const derivedTotal = input !== void 0 && output !== void 0 && Number.isFinite(input + output) ? input + output : void 0;
|
|
181
185
|
const total = suppliedTotal ?? derivedTotal;
|
|
182
|
-
if (input === void 0 && output === void 0 && total === void 0 && cached === void 0) {
|
|
186
|
+
if (input === void 0 && output === void 0 && total === void 0 && cached === void 0 && cacheWrite === void 0 && reasoning === void 0) {
|
|
183
187
|
return void 0;
|
|
184
188
|
}
|
|
185
189
|
return {
|
|
186
190
|
...input !== void 0 ? { input } : {},
|
|
187
191
|
...output !== void 0 ? { output } : {},
|
|
188
192
|
...total !== void 0 ? { total } : {},
|
|
189
|
-
...cached !== void 0 ? { cached } : {}
|
|
193
|
+
...cached !== void 0 ? { cached } : {},
|
|
194
|
+
...cacheWrite !== void 0 ? { cacheWrite } : {},
|
|
195
|
+
...reasoning !== void 0 ? { reasoning } : {}
|
|
190
196
|
};
|
|
191
197
|
}
|
|
192
198
|
|