agent-inspect 6.3.0 → 6.4.1
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 +2 -2
- package/package.json +2 -2
- package/packages/cli/dist/{chunk-YS2I722C.mjs → chunk-M6PC5KUT.mjs} +78 -31
- package/packages/cli/dist/chunk-M6PC5KUT.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +153 -42
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +88 -36
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-FVNE44UA.mjs → src-27LC2BB3.mjs} +8 -5
- package/packages/cli/dist/src-27LC2BB3.mjs.map +1 -0
- package/packages/core/dist/advanced.cjs +91 -35
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +36 -12
- package/packages/core/dist/advanced.d.ts +36 -12
- package/packages/core/dist/advanced.mjs +77 -24
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/core/dist/checks.cjs +113 -0
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.d.cts +40 -599
- package/packages/core/dist/checks.d.ts +40 -599
- package/packages/core/dist/checks.mjs +1 -1
- package/packages/core/dist/{chunk-QLYOCCEF.mjs → chunk-EWHN6NA4.mjs} +114 -3
- package/packages/core/dist/chunk-EWHN6NA4.mjs.map +1 -0
- package/packages/core/dist/{context-DyKbkmd4.d.cts → context-BHAgRjOe.d.cts} +4 -4
- package/packages/core/dist/{context-BJ5UQLDi.d.ts → context-Blyjb5my.d.ts} +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 +75 -0
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.d.cts +29 -4
- package/packages/core/dist/exporters.d.ts +29 -4
- package/packages/core/dist/exporters.mjs +71 -1
- package/packages/core/dist/exporters.mjs.map +1 -1
- package/packages/core/dist/index-BblJEdYZ.d.ts +618 -0
- package/packages/core/dist/index-DyKk7iR9.d.cts +618 -0
- package/packages/core/dist/index.d.cts +7 -7
- package/packages/core/dist/index.d.ts +7 -7
- package/packages/core/dist/{inspect-event-IqwOHbGo.d.cts → inspect-event-DVg84S4v.d.cts} +1 -1
- package/packages/core/dist/{inspect-event-IqwOHbGo.d.ts → inspect-event-DVg84S4v.d.ts} +1 -1
- package/packages/core/dist/{log-config-CW8w5YQ9.d.cts → log-config-BG1WmWf2.d.cts} +1 -1
- package/packages/core/dist/{log-config-SRA4xTp8.d.ts → log-config-Ck0aT_Ou.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-DruwqARZ.d.ts → persisted-inspect-event-ChE7pGb7.d.ts} +1 -1
- package/packages/core/dist/{persisted-inspect-event-Gd-W8vB7.d.cts → persisted-inspect-event-d-mSP8kd.d.cts} +1 -1
- package/packages/core/dist/persisted.d.cts +5 -5
- package/packages/core/dist/persisted.d.ts +5 -5
- package/packages/core/dist/readers.d.cts +2 -2
- package/packages/core/dist/readers.d.ts +2 -2
- package/packages/core/dist/{types-J3Xtuf9x.d.cts → types-B562HgN_.d.cts} +1 -1
- package/packages/core/dist/{types-J3Xtuf9x.d.ts → types-B562HgN_.d.ts} +1 -1
- package/packages/core/dist/{types-B1X87dUW.d.cts → types-BLX3tiOW.d.cts} +1 -1
- package/packages/core/dist/{types-BVkjSd0q.d.ts → types-MuwXSJ4b.d.ts} +1 -1
- package/packages/core/dist/writers.d.cts +2 -2
- package/packages/core/dist/writers.d.ts +2 -2
- package/packages/cli/dist/chunk-YS2I722C.mjs.map +0 -1
- package/packages/cli/dist/src-FVNE44UA.mjs.map +0 -1
- package/packages/core/dist/chunk-QLYOCCEF.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as RedactionProfile, h as TraceEvent } from './types-
|
|
3
|
-
import './log-config-
|
|
1
|
+
import { a as InspectRunTree, b as InspectNode } from './inspect-event-DVg84S4v.cjs';
|
|
2
|
+
import { R as RedactionProfile, h as TraceEvent } from './types-BLX3tiOW.cjs';
|
|
3
|
+
import './log-config-BG1WmWf2.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* v0.7 local export formats. No sinks — string output only.
|
|
@@ -94,6 +94,31 @@ declare function exportOtlpJson(tree: InspectRunTree, options?: Partial<ExportOp
|
|
|
94
94
|
|
|
95
95
|
declare function validateExportContent(format: ExportFormat, content: string): ExportValidationResult;
|
|
96
96
|
|
|
97
|
+
/** Validate committed or exported OpenInference-compatible JSON fixtures. */
|
|
98
|
+
declare function validateOpenInferenceFixture(content: string): ExportValidationResult;
|
|
99
|
+
/** Validate committed or exported OTLP JSON fixtures. */
|
|
100
|
+
declare function validateOtlpJsonFixture(content: string): ExportValidationResult;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Semantic field checks beyond shape validation for standards fixtures.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
declare function validateOpenInferenceSemanticFixture(content: string): ExportValidationResult;
|
|
107
|
+
declare function validateOtlpJsonSemanticFixture(content: string): ExportValidationResult;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Documented OpenTelemetry GenAI semantic convention reference for OTLP JSON exports.
|
|
111
|
+
* Local mapping only — no OTel SDK dependency in core.
|
|
112
|
+
*/
|
|
113
|
+
declare const OTEL_GEN_AI_SEMCONV_PIN: {
|
|
114
|
+
/** Human-readable pin label recorded in export metadata and docs. */
|
|
115
|
+
readonly version: "1.36.0";
|
|
116
|
+
/** Public spec URL for maintainers validating attribute names. */
|
|
117
|
+
readonly specUrl: "https://opentelemetry.io/docs/specs/semconv/gen-ai/";
|
|
118
|
+
/** Attribute families emitted by agent-inspect OTLP JSON export. */
|
|
119
|
+
readonly attributes: readonly ["gen_ai.operation.name", "gen_ai.request.model", "gen_ai.usage.input_tokens", "gen_ai.usage.output_tokens", "gen_ai.prompt", "gen_ai.completion"];
|
|
120
|
+
};
|
|
121
|
+
|
|
97
122
|
interface RedactRunTreeForExportOptions {
|
|
98
123
|
redactionProfile?: RedactionProfile;
|
|
99
124
|
}
|
|
@@ -135,4 +160,4 @@ interface ReportResult {
|
|
|
135
160
|
*/
|
|
136
161
|
declare function buildRunReport(events: TraceEvent[], options: ReportOptions): ReportResult;
|
|
137
162
|
|
|
138
|
-
export { EXPORT_PAYLOAD_VERSION, type ExportFormat, type ExportOptions, type ExportResult, type ExportValidationResult, type OpenInferenceExport, type OpenInferenceSpan, type ReportFormat, type ReportOptions, type ReportResult, type TraceExporter, buildRunReport, compactAttributes, escapeHtml, escapeMarkdown, exportHtml, exportMarkdown, exportOpenInference, exportOtlpJson, exportRunTree, flattenTree, manualTraceEventsToRunTree, mergeExportDefaults, redactRunTreeForExport, safeString, stableJson, summarizeTree, validateExport, validateExportContent };
|
|
163
|
+
export { EXPORT_PAYLOAD_VERSION, type ExportFormat, type ExportOptions, type ExportResult, type ExportValidationResult, OTEL_GEN_AI_SEMCONV_PIN, type OpenInferenceExport, type OpenInferenceSpan, type ReportFormat, type ReportOptions, type ReportResult, type TraceExporter, buildRunReport, compactAttributes, escapeHtml, escapeMarkdown, exportHtml, exportMarkdown, exportOpenInference, exportOtlpJson, exportRunTree, flattenTree, manualTraceEventsToRunTree, mergeExportDefaults, redactRunTreeForExport, safeString, stableJson, summarizeTree, validateExport, validateExportContent, validateOpenInferenceFixture, validateOpenInferenceSemanticFixture, validateOtlpJsonFixture, validateOtlpJsonSemanticFixture };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as RedactionProfile, h as TraceEvent } from './types-
|
|
3
|
-
import './log-config-
|
|
1
|
+
import { a as InspectRunTree, b as InspectNode } from './inspect-event-DVg84S4v.js';
|
|
2
|
+
import { R as RedactionProfile, h as TraceEvent } from './types-MuwXSJ4b.js';
|
|
3
|
+
import './log-config-Ck0aT_Ou.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* v0.7 local export formats. No sinks — string output only.
|
|
@@ -94,6 +94,31 @@ declare function exportOtlpJson(tree: InspectRunTree, options?: Partial<ExportOp
|
|
|
94
94
|
|
|
95
95
|
declare function validateExportContent(format: ExportFormat, content: string): ExportValidationResult;
|
|
96
96
|
|
|
97
|
+
/** Validate committed or exported OpenInference-compatible JSON fixtures. */
|
|
98
|
+
declare function validateOpenInferenceFixture(content: string): ExportValidationResult;
|
|
99
|
+
/** Validate committed or exported OTLP JSON fixtures. */
|
|
100
|
+
declare function validateOtlpJsonFixture(content: string): ExportValidationResult;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Semantic field checks beyond shape validation for standards fixtures.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
declare function validateOpenInferenceSemanticFixture(content: string): ExportValidationResult;
|
|
107
|
+
declare function validateOtlpJsonSemanticFixture(content: string): ExportValidationResult;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Documented OpenTelemetry GenAI semantic convention reference for OTLP JSON exports.
|
|
111
|
+
* Local mapping only — no OTel SDK dependency in core.
|
|
112
|
+
*/
|
|
113
|
+
declare const OTEL_GEN_AI_SEMCONV_PIN: {
|
|
114
|
+
/** Human-readable pin label recorded in export metadata and docs. */
|
|
115
|
+
readonly version: "1.36.0";
|
|
116
|
+
/** Public spec URL for maintainers validating attribute names. */
|
|
117
|
+
readonly specUrl: "https://opentelemetry.io/docs/specs/semconv/gen-ai/";
|
|
118
|
+
/** Attribute families emitted by agent-inspect OTLP JSON export. */
|
|
119
|
+
readonly attributes: readonly ["gen_ai.operation.name", "gen_ai.request.model", "gen_ai.usage.input_tokens", "gen_ai.usage.output_tokens", "gen_ai.prompt", "gen_ai.completion"];
|
|
120
|
+
};
|
|
121
|
+
|
|
97
122
|
interface RedactRunTreeForExportOptions {
|
|
98
123
|
redactionProfile?: RedactionProfile;
|
|
99
124
|
}
|
|
@@ -135,4 +160,4 @@ interface ReportResult {
|
|
|
135
160
|
*/
|
|
136
161
|
declare function buildRunReport(events: TraceEvent[], options: ReportOptions): ReportResult;
|
|
137
162
|
|
|
138
|
-
export { EXPORT_PAYLOAD_VERSION, type ExportFormat, type ExportOptions, type ExportResult, type ExportValidationResult, type OpenInferenceExport, type OpenInferenceSpan, type ReportFormat, type ReportOptions, type ReportResult, type TraceExporter, buildRunReport, compactAttributes, escapeHtml, escapeMarkdown, exportHtml, exportMarkdown, exportOpenInference, exportOtlpJson, exportRunTree, flattenTree, manualTraceEventsToRunTree, mergeExportDefaults, redactRunTreeForExport, safeString, stableJson, summarizeTree, validateExport, validateExportContent };
|
|
163
|
+
export { EXPORT_PAYLOAD_VERSION, type ExportFormat, type ExportOptions, type ExportResult, type ExportValidationResult, OTEL_GEN_AI_SEMCONV_PIN, type OpenInferenceExport, type OpenInferenceSpan, type ReportFormat, type ReportOptions, type ReportResult, type TraceExporter, buildRunReport, compactAttributes, escapeHtml, escapeMarkdown, exportHtml, exportMarkdown, exportOpenInference, exportOtlpJson, exportRunTree, flattenTree, manualTraceEventsToRunTree, mergeExportDefaults, redactRunTreeForExport, safeString, stableJson, summarizeTree, validateExport, validateExportContent, validateOpenInferenceFixture, validateOpenInferenceSemanticFixture, validateOtlpJsonFixture, validateOtlpJsonSemanticFixture };
|
|
@@ -984,6 +984,76 @@ function manualTraceEventsToRunTree(events) {
|
|
|
984
984
|
};
|
|
985
985
|
}
|
|
986
986
|
|
|
987
|
+
// packages/core/src/exporters/fixtures.ts
|
|
988
|
+
function validateOpenInferenceFixture(content) {
|
|
989
|
+
return validateExportContent("openinference", content);
|
|
990
|
+
}
|
|
991
|
+
function validateOtlpJsonFixture(content) {
|
|
992
|
+
return validateExportContent("otlp-json", content);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
// packages/core/src/exporters/semantic-validation.ts
|
|
996
|
+
var SEMCONV_PIN = "OTEL_GEN_AI_SEMCONV_PIN";
|
|
997
|
+
function semanticWarnings(format, parsed) {
|
|
998
|
+
const warnings = [];
|
|
999
|
+
if (format === "openinference") {
|
|
1000
|
+
const spans = Array.isArray(parsed.spans) ? parsed.spans : [];
|
|
1001
|
+
if (spans.length > 0) {
|
|
1002
|
+
const first = spans[0];
|
|
1003
|
+
if (first.trace_id === void 0 && first.traceId === void 0) {
|
|
1004
|
+
warnings.push("OpenInference semantic: first span missing trace_id");
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
if (format === "otlp-json") {
|
|
1009
|
+
warnings.push(`OTLP semantic validation pinned to ${SEMCONV_PIN} mapping docs`);
|
|
1010
|
+
}
|
|
1011
|
+
return warnings;
|
|
1012
|
+
}
|
|
1013
|
+
function validateOpenInferenceSemanticFixture(content) {
|
|
1014
|
+
const base = validateOpenInferenceFixture(content);
|
|
1015
|
+
if (!base.ok) return base;
|
|
1016
|
+
try {
|
|
1017
|
+
const parsed = JSON.parse(content);
|
|
1018
|
+
return {
|
|
1019
|
+
...base,
|
|
1020
|
+
warnings: [...base.warnings, ...semanticWarnings("openinference", parsed)]
|
|
1021
|
+
};
|
|
1022
|
+
} catch {
|
|
1023
|
+
return base;
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
function validateOtlpJsonSemanticFixture(content) {
|
|
1027
|
+
const base = validateOtlpJsonFixture(content);
|
|
1028
|
+
if (!base.ok) return base;
|
|
1029
|
+
try {
|
|
1030
|
+
const parsed = JSON.parse(content);
|
|
1031
|
+
return {
|
|
1032
|
+
...base,
|
|
1033
|
+
warnings: [...base.warnings, ...semanticWarnings("otlp-json", parsed)]
|
|
1034
|
+
};
|
|
1035
|
+
} catch {
|
|
1036
|
+
return base;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
// packages/core/src/exporters/semconv.ts
|
|
1041
|
+
var OTEL_GEN_AI_SEMCONV_PIN = {
|
|
1042
|
+
/** Human-readable pin label recorded in export metadata and docs. */
|
|
1043
|
+
version: "1.36.0",
|
|
1044
|
+
/** Public spec URL for maintainers validating attribute names. */
|
|
1045
|
+
specUrl: "https://opentelemetry.io/docs/specs/semconv/gen-ai/",
|
|
1046
|
+
/** Attribute families emitted by agent-inspect OTLP JSON export. */
|
|
1047
|
+
attributes: [
|
|
1048
|
+
"gen_ai.operation.name",
|
|
1049
|
+
"gen_ai.request.model",
|
|
1050
|
+
"gen_ai.usage.input_tokens",
|
|
1051
|
+
"gen_ai.usage.output_tokens",
|
|
1052
|
+
"gen_ai.prompt",
|
|
1053
|
+
"gen_ai.completion"
|
|
1054
|
+
]
|
|
1055
|
+
};
|
|
1056
|
+
|
|
987
1057
|
// packages/core/src/exporters/index.ts
|
|
988
1058
|
function mergeExportDefaults(options) {
|
|
989
1059
|
return {
|
|
@@ -1179,6 +1249,6 @@ ${attrsSection}
|
|
|
1179
1249
|
};
|
|
1180
1250
|
}
|
|
1181
1251
|
|
|
1182
|
-
export { EXPORT_PAYLOAD_VERSION, buildRunReport, exportHtml, exportMarkdown, exportOpenInference, exportOtlpJson, exportRunTree, manualTraceEventsToRunTree, mergeExportDefaults, redactRunTreeForExport, validateExport, validateExportContent };
|
|
1252
|
+
export { EXPORT_PAYLOAD_VERSION, OTEL_GEN_AI_SEMCONV_PIN, buildRunReport, exportHtml, exportMarkdown, exportOpenInference, exportOtlpJson, exportRunTree, manualTraceEventsToRunTree, mergeExportDefaults, redactRunTreeForExport, validateExport, validateExportContent, validateOpenInferenceFixture, validateOpenInferenceSemanticFixture, validateOtlpJsonFixture, validateOtlpJsonSemanticFixture };
|
|
1183
1253
|
//# sourceMappingURL=exporters.mjs.map
|
|
1184
1254
|
//# sourceMappingURL=exporters.mjs.map
|