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
|
@@ -1288,6 +1288,76 @@ function manualTraceEventsToRunTree(events) {
|
|
|
1288
1288
|
};
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
|
+
// packages/core/src/exporters/fixtures.ts
|
|
1292
|
+
function validateOpenInferenceFixture(content) {
|
|
1293
|
+
return validateExportContent("openinference", content);
|
|
1294
|
+
}
|
|
1295
|
+
function validateOtlpJsonFixture(content) {
|
|
1296
|
+
return validateExportContent("otlp-json", content);
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
// packages/core/src/exporters/semantic-validation.ts
|
|
1300
|
+
var SEMCONV_PIN = "OTEL_GEN_AI_SEMCONV_PIN";
|
|
1301
|
+
function semanticWarnings(format, parsed) {
|
|
1302
|
+
const warnings = [];
|
|
1303
|
+
if (format === "openinference") {
|
|
1304
|
+
const spans = Array.isArray(parsed.spans) ? parsed.spans : [];
|
|
1305
|
+
if (spans.length > 0) {
|
|
1306
|
+
const first = spans[0];
|
|
1307
|
+
if (first.trace_id === void 0 && first.traceId === void 0) {
|
|
1308
|
+
warnings.push("OpenInference semantic: first span missing trace_id");
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
if (format === "otlp-json") {
|
|
1313
|
+
warnings.push(`OTLP semantic validation pinned to ${SEMCONV_PIN} mapping docs`);
|
|
1314
|
+
}
|
|
1315
|
+
return warnings;
|
|
1316
|
+
}
|
|
1317
|
+
function validateOpenInferenceSemanticFixture(content) {
|
|
1318
|
+
const base = validateOpenInferenceFixture(content);
|
|
1319
|
+
if (!base.ok) return base;
|
|
1320
|
+
try {
|
|
1321
|
+
const parsed = JSON.parse(content);
|
|
1322
|
+
return {
|
|
1323
|
+
...base,
|
|
1324
|
+
warnings: [...base.warnings, ...semanticWarnings("openinference", parsed)]
|
|
1325
|
+
};
|
|
1326
|
+
} catch {
|
|
1327
|
+
return base;
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
function validateOtlpJsonSemanticFixture(content) {
|
|
1331
|
+
const base = validateOtlpJsonFixture(content);
|
|
1332
|
+
if (!base.ok) return base;
|
|
1333
|
+
try {
|
|
1334
|
+
const parsed = JSON.parse(content);
|
|
1335
|
+
return {
|
|
1336
|
+
...base,
|
|
1337
|
+
warnings: [...base.warnings, ...semanticWarnings("otlp-json", parsed)]
|
|
1338
|
+
};
|
|
1339
|
+
} catch {
|
|
1340
|
+
return base;
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
// packages/core/src/exporters/semconv.ts
|
|
1345
|
+
var OTEL_GEN_AI_SEMCONV_PIN = {
|
|
1346
|
+
/** Human-readable pin label recorded in export metadata and docs. */
|
|
1347
|
+
version: "1.36.0",
|
|
1348
|
+
/** Public spec URL for maintainers validating attribute names. */
|
|
1349
|
+
specUrl: "https://opentelemetry.io/docs/specs/semconv/gen-ai/",
|
|
1350
|
+
/** Attribute families emitted by agent-inspect OTLP JSON export. */
|
|
1351
|
+
attributes: [
|
|
1352
|
+
"gen_ai.operation.name",
|
|
1353
|
+
"gen_ai.request.model",
|
|
1354
|
+
"gen_ai.usage.input_tokens",
|
|
1355
|
+
"gen_ai.usage.output_tokens",
|
|
1356
|
+
"gen_ai.prompt",
|
|
1357
|
+
"gen_ai.completion"
|
|
1358
|
+
]
|
|
1359
|
+
};
|
|
1360
|
+
|
|
1291
1361
|
// packages/core/src/exporters/index.ts
|
|
1292
1362
|
function mergeExportDefaults(options) {
|
|
1293
1363
|
return {
|
|
@@ -2036,6 +2106,7 @@ ${attrsSection}
|
|
|
2036
2106
|
}
|
|
2037
2107
|
|
|
2038
2108
|
exports.EXPORT_PAYLOAD_VERSION = EXPORT_PAYLOAD_VERSION;
|
|
2109
|
+
exports.OTEL_GEN_AI_SEMCONV_PIN = OTEL_GEN_AI_SEMCONV_PIN;
|
|
2039
2110
|
exports.buildRunReport = buildRunReport;
|
|
2040
2111
|
exports.compactAttributes = compactAttributes;
|
|
2041
2112
|
exports.escapeHtml = escapeHtml;
|
|
@@ -2054,5 +2125,9 @@ exports.stableJson = stableJson;
|
|
|
2054
2125
|
exports.summarizeTree = summarizeTree;
|
|
2055
2126
|
exports.validateExport = validateExport;
|
|
2056
2127
|
exports.validateExportContent = validateExportContent;
|
|
2128
|
+
exports.validateOpenInferenceFixture = validateOpenInferenceFixture;
|
|
2129
|
+
exports.validateOpenInferenceSemanticFixture = validateOpenInferenceSemanticFixture;
|
|
2130
|
+
exports.validateOtlpJsonFixture = validateOtlpJsonFixture;
|
|
2131
|
+
exports.validateOtlpJsonSemanticFixture = validateOtlpJsonSemanticFixture;
|
|
2057
2132
|
//# sourceMappingURL=exporters.cjs.map
|
|
2058
2133
|
//# sourceMappingURL=exporters.cjs.map
|