agent-inspect 6.31.9 → 6.31.10
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 +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-SWUZRRDT.mjs → chunk-JCKC4ZRV.mjs} +78 -2
- package/packages/cli/dist/chunk-JCKC4ZRV.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +79 -1
- 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-XFIPYODW.mjs → src-4UD7JNDR.mjs} +3 -3
- package/packages/cli/dist/{src-XFIPYODW.mjs.map → src-4UD7JNDR.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +24 -0
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.mjs +7 -6
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/core/dist/checks.cjs +79 -0
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.d.cts +1 -1
- package/packages/core/dist/checks.d.ts +1 -1
- package/packages/core/dist/checks.mjs +3 -2
- package/packages/core/dist/{chunk-L5WLVBW4.mjs → chunk-AHUZNHFI.mjs} +4 -55
- package/packages/core/dist/chunk-AHUZNHFI.mjs.map +1 -0
- package/packages/core/dist/{chunk-2CCRUI42.mjs → chunk-CPQAOJW4.mjs} +72 -3
- package/packages/core/dist/chunk-CPQAOJW4.mjs.map +1 -0
- package/packages/core/dist/{chunk-2IRRUNIN.mjs → chunk-OAUNS5CS.mjs} +3 -3
- package/packages/core/dist/{chunk-2IRRUNIN.mjs.map → chunk-OAUNS5CS.mjs.map} +1 -1
- package/packages/core/dist/{chunk-IJJSPJXV.mjs → chunk-QOC3PJO3.mjs} +4 -4
- package/packages/core/dist/{chunk-IJJSPJXV.mjs.map → chunk-QOC3PJO3.mjs.map} +1 -1
- package/packages/core/dist/chunk-S6LQBLX5.mjs +67 -0
- package/packages/core/dist/chunk-S6LQBLX5.mjs.map +1 -0
- package/packages/core/dist/{chunk-3SPBELJB.mjs → chunk-SSG3ICI4.mjs} +16 -2
- package/packages/core/dist/chunk-SSG3ICI4.mjs.map +1 -0
- package/packages/core/dist/index.cjs +77 -0
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.mjs +3 -2
- package/packages/core/dist/index.mjs.map +1 -1
- package/packages/core/dist/persisted.cjs +11 -0
- package/packages/core/dist/persisted.cjs.map +1 -1
- package/packages/core/dist/persisted.mjs +4 -3
- package/packages/core/dist/persisted.mjs.map +1 -1
- package/packages/core/dist/{programmatic-gZTWLObB.d.cts → programmatic-BLlC7Ytq.d.cts} +1 -1
- package/packages/core/dist/{programmatic-gZTWLObB.d.ts → programmatic-BLlC7Ytq.d.ts} +1 -1
- package/packages/core/dist/readers.cjs +11 -0
- package/packages/core/dist/readers.cjs.map +1 -1
- package/packages/core/dist/readers.d.cts +1 -1
- package/packages/core/dist/readers.d.ts +1 -1
- package/packages/core/dist/readers.mjs +4 -3
- package/packages/cli/dist/chunk-SWUZRRDT.mjs.map +0 -1
- package/packages/core/dist/chunk-2CCRUI42.mjs.map +0 -1
- package/packages/core/dist/chunk-3SPBELJB.mjs.map +0 -1
- package/packages/core/dist/chunk-L5WLVBW4.mjs.map +0 -1
|
@@ -4796,6 +4796,17 @@ var init_programmatic = __esm({
|
|
|
4796
4796
|
summary: "Trace contains a parentId cycle.",
|
|
4797
4797
|
remediation: "Use visibility-first tree linking for legacy fixtures; prefer acyclic capture for new adapter output.",
|
|
4798
4798
|
relatedCodes: ["structure.cycle"]
|
|
4799
|
+
},
|
|
4800
|
+
AI_TRACE_CONTRACT_INPUT_INVALID: {
|
|
4801
|
+
code: "AI_TRACE_CONTRACT_INPUT_INVALID",
|
|
4802
|
+
summary: "evaluateTraceContract expects ({ read }, contract) or use evaluateTraceContractRead(read, contract).",
|
|
4803
|
+
remediation: "Pass TraceCheckInput as the first argument: evaluateTraceContract({ read }, contract).",
|
|
4804
|
+
relatedCodes: ["AI_CHECK_INVALID_ARGUMENTS"]
|
|
4805
|
+
},
|
|
4806
|
+
AI_INSPECT_RUN_UNSUPPORTED_OPTION: {
|
|
4807
|
+
code: "AI_INSPECT_RUN_UNSUPPORTED_OPTION",
|
|
4808
|
+
summary: 'inspectRun does not accept a "writer" option.',
|
|
4809
|
+
remediation: "Use createInspector({ writer }) then inspector.run(...). inspectRun persists via the global JSONL path (schema 0.1)."
|
|
4799
4810
|
}
|
|
4800
4811
|
});
|
|
4801
4812
|
}
|
|
@@ -9556,7 +9567,72 @@ function defineTraceContract(input3) {
|
|
|
9556
9567
|
...alternatives ? { alternatives } : {}
|
|
9557
9568
|
};
|
|
9558
9569
|
}
|
|
9570
|
+
function isTraceReadLike(value) {
|
|
9571
|
+
if (typeof value !== "object" || value === null) return false;
|
|
9572
|
+
const candidate = value;
|
|
9573
|
+
return typeof candidate.format === "string" && Array.isArray(candidate.runs) && Array.isArray(candidate.events);
|
|
9574
|
+
}
|
|
9575
|
+
function isTraceCheckInputLike(value) {
|
|
9576
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
9577
|
+
return false;
|
|
9578
|
+
}
|
|
9579
|
+
return isTraceReadLike(value.read);
|
|
9580
|
+
}
|
|
9581
|
+
function looksLikeTraceContract(value) {
|
|
9582
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
9583
|
+
return false;
|
|
9584
|
+
}
|
|
9585
|
+
if (isTraceReadLike(value) || isTraceCheckInputLike(value)) {
|
|
9586
|
+
return false;
|
|
9587
|
+
}
|
|
9588
|
+
return true;
|
|
9589
|
+
}
|
|
9590
|
+
function invalidContractInputResult() {
|
|
9591
|
+
return {
|
|
9592
|
+
ok: false,
|
|
9593
|
+
status: "error",
|
|
9594
|
+
format: "unknown",
|
|
9595
|
+
summary: {
|
|
9596
|
+
passed: 0,
|
|
9597
|
+
failed: 0,
|
|
9598
|
+
warnings: 0,
|
|
9599
|
+
errors: 1,
|
|
9600
|
+
rulesEvaluated: 0
|
|
9601
|
+
},
|
|
9602
|
+
findings: [],
|
|
9603
|
+
diagnostics: [
|
|
9604
|
+
{
|
|
9605
|
+
code: "AI_CHECK_INVALID_ARGUMENTS",
|
|
9606
|
+
message: formatProgrammaticDiagnostic("AI_TRACE_CONTRACT_INPUT_INVALID"),
|
|
9607
|
+
severity: "error"
|
|
9608
|
+
}
|
|
9609
|
+
],
|
|
9610
|
+
ruleExecutions: []
|
|
9611
|
+
};
|
|
9612
|
+
}
|
|
9613
|
+
function validateEvaluateTraceContractArgs(input3, contract) {
|
|
9614
|
+
if (isTraceCheckInputLike(input3) && looksLikeTraceContract(contract)) {
|
|
9615
|
+
return void 0;
|
|
9616
|
+
}
|
|
9617
|
+
if (looksLikeTraceContract(input3) && (isTraceCheckInputLike(contract) || isTraceReadLike(contract))) {
|
|
9618
|
+
return invalidContractInputResult();
|
|
9619
|
+
}
|
|
9620
|
+
if (isTraceReadLike(input3)) {
|
|
9621
|
+
return invalidContractInputResult();
|
|
9622
|
+
}
|
|
9623
|
+
if (!isTraceCheckInputLike(input3)) {
|
|
9624
|
+
return invalidContractInputResult();
|
|
9625
|
+
}
|
|
9626
|
+
if (!looksLikeTraceContract(contract)) {
|
|
9627
|
+
return invalidContractInputResult();
|
|
9628
|
+
}
|
|
9629
|
+
return void 0;
|
|
9630
|
+
}
|
|
9559
9631
|
function evaluateTraceContract(input3, contract, options = {}) {
|
|
9632
|
+
const inputGuard = validateEvaluateTraceContractArgs(input3, contract);
|
|
9633
|
+
if (inputGuard !== void 0) {
|
|
9634
|
+
return inputGuard;
|
|
9635
|
+
}
|
|
9560
9636
|
const shapeErrors = [
|
|
9561
9637
|
...validateAllowedStatusesShape(contract.run?.allowedStatuses),
|
|
9562
9638
|
...validateAlternativesShape(contract.alternatives),
|
|
@@ -9705,6 +9781,7 @@ var init_contract = __esm({
|
|
|
9705
9781
|
init_retry_safety();
|
|
9706
9782
|
init_tool_arguments();
|
|
9707
9783
|
init_outcomes();
|
|
9784
|
+
init_programmatic();
|
|
9708
9785
|
init_contract_scope();
|
|
9709
9786
|
init_tool_arguments();
|
|
9710
9787
|
ALLOWED_STATUS_ALIASES = {
|
|
@@ -15858,6 +15935,7 @@ var init_inspect_run = __esm({
|
|
|
15858
15935
|
"packages/core/src/inspect-run.ts"() {
|
|
15859
15936
|
init_correlation_metadata();
|
|
15860
15937
|
init_context();
|
|
15938
|
+
init_programmatic();
|
|
15861
15939
|
init_storage();
|
|
15862
15940
|
init_terminal();
|
|
15863
15941
|
init_trace_directory();
|
|
@@ -16375,7 +16453,7 @@ var init_src = __esm({
|
|
|
16375
16453
|
});
|
|
16376
16454
|
|
|
16377
16455
|
// package.json
|
|
16378
|
-
var version = "6.31.
|
|
16456
|
+
var version = "6.31.10";
|
|
16379
16457
|
|
|
16380
16458
|
// packages/cli/src/list.ts
|
|
16381
16459
|
init_advanced();
|