agent-inspect 6.31.32 → 6.31.34
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/TRACE-CONTRACTS.md +2 -0
- package/package.json +1 -1
- package/packages/cli/dist/{chunk-PEGM6T2X.mjs → chunk-6TXW53UR.mjs} +138 -36
- package/packages/cli/dist/chunk-6TXW53UR.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +197 -50
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +64 -19
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-CWUJTMRD.mjs → src-GCLC4DIC.mjs} +3 -3
- package/packages/cli/dist/{src-CWUJTMRD.mjs.map → src-GCLC4DIC.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +79 -20
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.mjs +9 -9
- package/packages/core/dist/checks.cjs +133 -32
- package/packages/core/dist/checks.cjs.map +1 -1
- package/packages/core/dist/checks.mjs +3 -3
- package/packages/core/dist/{chunk-6S666BF4.mjs → chunk-2SKAI5ZN.mjs} +3 -3
- package/packages/core/dist/{chunk-6S666BF4.mjs.map → chunk-2SKAI5ZN.mjs.map} +1 -1
- package/packages/core/dist/{chunk-FBPDF7HO.mjs → chunk-6F6KLGCR.mjs} +3 -3
- package/packages/core/dist/{chunk-FBPDF7HO.mjs.map → chunk-6F6KLGCR.mjs.map} +1 -1
- package/packages/core/dist/{chunk-6G67ZN72.mjs → chunk-CXC7L4PY.mjs} +136 -35
- package/packages/core/dist/chunk-CXC7L4PY.mjs.map +1 -0
- package/packages/core/dist/{chunk-RB6WANSW.mjs → chunk-PU3FF5AP.mjs} +5 -4
- package/packages/core/dist/chunk-PU3FF5AP.mjs.map +1 -0
- package/packages/core/dist/{chunk-VIEJJ5JB.mjs → chunk-X5RP2E2H.mjs} +4 -4
- package/packages/core/dist/{chunk-VIEJJ5JB.mjs.map → chunk-X5RP2E2H.mjs.map} +1 -1
- package/packages/core/dist/exporters.cjs +33 -9
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.mjs +33 -10
- package/packages/core/dist/exporters.mjs.map +1 -1
- package/packages/core/dist/index.cjs +3 -2
- package/packages/core/dist/index.cjs.map +1 -1
- package/packages/core/dist/index.mjs +4 -4
- package/packages/core/dist/writers.cjs +3 -2
- package/packages/core/dist/writers.cjs.map +1 -1
- package/packages/core/dist/writers.mjs +1 -1
- package/packages/cli/dist/chunk-PEGM6T2X.mjs.map +0 -1
- package/packages/core/dist/chunk-6G67ZN72.mjs.map +0 -1
- package/packages/core/dist/chunk-RB6WANSW.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.31.34
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c0726d8: Detect underscore-adjacent Stripe keys across redact, credential-value, and verify-safe patterns (#528; thanks Frank). Align `gate --evidence-on` check-results `aggregateStatus` with residual artifact assessment while keeping gate pass/fail separate (#529; thanks Frank). Fail unfinished before-order occurrences even when a finished peer exists, and treat after-start without a terminal as order-relevant. Harden Gary/Nest saved verifiers, refuse ambiguous HTML lifecycle joins, and evaluate Roy UNPROVABLE positive controls.
|
|
8
|
+
|
|
9
|
+
## 6.31.33
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b2adf03: Fail requiredOrder when a before tool starts but never finishes while after runs (#521). Escape mixed-script lookalike tool names in tool.usage findings and sort allowlist causes first (#522).
|
|
14
|
+
|
|
3
15
|
## 6.31.32
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -213,7 +213,7 @@ The root package is enough for custom capture, the CLI, checks, and Evidence wor
|
|
|
213
213
|
|
|
214
214
|
## Status and documentation
|
|
215
215
|
|
|
216
|
-
**Current published baseline:** **6.31.
|
|
216
|
+
**Current published baseline:** **6.31.34** · persisted schema `1.0` · Node.js `>=20` · MIT.
|
|
217
217
|
|
|
218
218
|
Legacy v0.1 and v0.2 traces remain readable. Check the npm badge and [changelog](CHANGELOG.md) for the current published version.
|
|
219
219
|
|
package/docs/TRACE-CONTRACTS.md
CHANGED
|
@@ -45,6 +45,7 @@ Contracts compile to deterministic check rules for common cases:
|
|
|
45
45
|
- `all-occurrences` requires every `before` occurrence to finish before every `after` occurrence starts (`max(before.end) <= min(after.start)`);
|
|
46
46
|
- causal modes fail when a required interval boundary cannot be resolved instead of falling back to encounter order.
|
|
47
47
|
- when the boundary timestamps tie at millisecond resolution (for example scripted or mocked tools that start and finish inside one millisecond), causal modes decide by recorded event order: the before event must have been recorded as finished before the after event was recorded as started. Such findings carry `resolvedBy: "recorded-order"`.
|
|
48
|
+
- a `before` tool that starts but never finishes (`status: "running"`) while a later `after` tool finishes fails the order rule in every mode with `tool.order.interval-unresolved` (unfinished before), naming the abandoned tool — not only the generic incomplete-running `run.status` finding.
|
|
48
49
|
|
|
49
50
|
Examples for `requiredOrder: ["retrieve_policy", "send_email"]` (both TOOL-typed):
|
|
50
51
|
|
|
@@ -120,6 +121,7 @@ The evaluator expands each list into adjacent pairs and applies one `requiredOrd
|
|
|
120
121
|
- `requiredOrderMode: "all-occurrences"` requires every before to end before every after starts; any cross-boundary overlap or later before fails.
|
|
121
122
|
- Missing interval boundaries fail closed in the two causal modes.
|
|
122
123
|
- Millisecond timestamp ties are decided by recorded event order in the two causal modes.
|
|
124
|
+
- A started-but-never-finished `before` tool (running, no completion) fails order in every mode when `after` has finished, with `tool.order.interval-unresolved`.
|
|
123
125
|
|
|
124
126
|
### `alternatives.anyOf` (shipped)
|
|
125
127
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "6.31.
|
|
3
|
+
"version": "6.31.34",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Local evidence debugger and trajectory-test toolkit for TypeScript AI agents — execution trees, TraceContract checks, Evidence v2, and read-only MCP",
|
|
@@ -938,8 +938,9 @@ var HIGH_CONFIDENCE_CREDENTIAL_PATTERNS = [
|
|
|
938
938
|
/\beyJ[a-zA-Z0-9_-]{8,}\.[a-zA-Z0-9_-]{8,}\.[a-zA-Z0-9_-]{8,}\b/,
|
|
939
939
|
/\b(?:sk-(?:proj-)?[a-zA-Z0-9_-]{16,}|sk-ant-[a-zA-Z0-9_-]{16,}|AIza[0-9A-Za-z_-]{20,})\b/,
|
|
940
940
|
// Stripe secret / restricted keys use underscores (not sk-). Keep in sync with
|
|
941
|
-
// packages/redact/src/index.ts + packages/core/src/checks DEFAULT_SECRET_PATTERNS (#520).
|
|
942
|
-
|
|
941
|
+
// packages/redact/src/index.ts + packages/core/src/checks DEFAULT_SECRET_PATTERNS (#520/#528).
|
|
942
|
+
// Use non-alnum lookarounds so underscore-adjacent forms (acct_sk_live_…, …_eu) match.
|
|
943
|
+
/(?<![A-Za-z0-9])(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{16,}(?![A-Za-z0-9])/,
|
|
943
944
|
/\bxox[abposr]-[A-Za-z0-9-]{10,}\b/,
|
|
944
945
|
/\b(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9_]{20,}\b/,
|
|
945
946
|
/\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/,
|
|
@@ -7051,10 +7052,17 @@ function contractToRules(contract) {
|
|
|
7051
7052
|
(event) => event.status === "running"
|
|
7052
7053
|
);
|
|
7053
7054
|
if (running.length > 0) {
|
|
7055
|
+
const labels = running.map((event) => {
|
|
7056
|
+
if (event.kind === "TOOL") {
|
|
7057
|
+
return `tool ${resolveCanonicalToolName(event)}`;
|
|
7058
|
+
}
|
|
7059
|
+
return `${event.kind} ${event.name}`;
|
|
7060
|
+
});
|
|
7061
|
+
const message = labels.length === 1 ? `Run contains incomplete running events: ${labels[0]} never completed.` : `Run contains incomplete running events: ${labels.join("; ")}.`;
|
|
7054
7062
|
findings.push(
|
|
7055
7063
|
contractFailFinding(
|
|
7056
7064
|
"contract.run.allowedStatuses",
|
|
7057
|
-
|
|
7065
|
+
message,
|
|
7058
7066
|
running.map((event) => ({
|
|
7059
7067
|
runId: event.runId,
|
|
7060
7068
|
eventId: event.eventId,
|
|
@@ -7063,7 +7071,10 @@ function contractToRules(contract) {
|
|
|
7063
7071
|
status: event.status
|
|
7064
7072
|
})),
|
|
7065
7073
|
"no running events",
|
|
7066
|
-
|
|
7074
|
+
{
|
|
7075
|
+
count: running.length,
|
|
7076
|
+
unfinished: labels
|
|
7077
|
+
}
|
|
7067
7078
|
)
|
|
7068
7079
|
);
|
|
7069
7080
|
}
|
|
@@ -7822,10 +7833,11 @@ var SAFE_USAGE_LEAF_KEYS = /* @__PURE__ */ new Set([
|
|
|
7822
7833
|
var DEFAULT_SECRET_PATTERNS = [
|
|
7823
7834
|
{ id: "bearer-token", pattern: /Bearer\s+[A-Za-z0-9._~+/-]{12,}=*/ },
|
|
7824
7835
|
{ id: "openai-key", pattern: /sk-[A-Za-z0-9_-]{16,}/ },
|
|
7825
|
-
// Stripe + Slack: keep in sync with packages/redact + credential-value-patterns (#520).
|
|
7836
|
+
// Stripe + Slack: keep in sync with packages/redact + credential-value-patterns (#520/#528).
|
|
7837
|
+
// Non-alnum lookarounds so underscore-adjacent forms (acct_sk_live_…, …_eu) match.
|
|
7826
7838
|
{
|
|
7827
7839
|
id: "stripe-key",
|
|
7828
|
-
pattern:
|
|
7840
|
+
pattern: /(?<![A-Za-z0-9])(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{16,}(?![A-Za-z0-9])/
|
|
7829
7841
|
},
|
|
7830
7842
|
{ id: "slack-token", pattern: /\bxox[abposr]-[A-Za-z0-9-]{10,}\b/ },
|
|
7831
7843
|
{ id: "aws-access-key", pattern: /AKIA[0-9A-Z]{16}/ },
|
|
@@ -8009,6 +8021,11 @@ function compareFindings(eventById) {
|
|
|
8009
8021
|
if (STATUS_RANK[a.status] !== STATUS_RANK[b.status]) {
|
|
8010
8022
|
return STATUS_RANK[a.status] - STATUS_RANK[b.status];
|
|
8011
8023
|
}
|
|
8024
|
+
if (a.ruleId === "tool.usage") {
|
|
8025
|
+
const aHasEvent = a.evidence[0]?.eventId !== void 0;
|
|
8026
|
+
const bHasEvent = b.evidence[0]?.eventId !== void 0;
|
|
8027
|
+
if (aHasEvent !== bHasEvent) return aHasEvent ? -1 : 1;
|
|
8028
|
+
}
|
|
8012
8029
|
const byRun = compareStrings(a.evidence[0]?.runId, b.evidence[0]?.runId);
|
|
8013
8030
|
if (byRun !== 0) return byRun;
|
|
8014
8031
|
const byTime = eventTimestamp(a, eventById).localeCompare(eventTimestamp(b, eventById));
|
|
@@ -8134,6 +8151,37 @@ function failFinding(ruleId, message, evidence, expected, actual, meta) {
|
|
|
8134
8151
|
function toolName(event) {
|
|
8135
8152
|
return resolveCanonicalToolName(event);
|
|
8136
8153
|
}
|
|
8154
|
+
function formatToolNameForMessage(name) {
|
|
8155
|
+
const details = [];
|
|
8156
|
+
for (let index = 0; index < name.length; ) {
|
|
8157
|
+
const codePoint = name.codePointAt(index);
|
|
8158
|
+
const width = codePoint > 65535 ? 2 : 1;
|
|
8159
|
+
if (codePoint > 127) {
|
|
8160
|
+
details.push(
|
|
8161
|
+
`U+${codePoint.toString(16).toUpperCase().padStart(4, "0")} at index ${index}`
|
|
8162
|
+
);
|
|
8163
|
+
}
|
|
8164
|
+
index += width;
|
|
8165
|
+
}
|
|
8166
|
+
if (details.length === 0) return name;
|
|
8167
|
+
return `"${name}" (contains ${details.join("; ")})`;
|
|
8168
|
+
}
|
|
8169
|
+
function describeRunningEvent(event) {
|
|
8170
|
+
if (event.kind === "TOOL") {
|
|
8171
|
+
return `tool ${formatToolNameForMessage(resolveCanonicalToolName(event))}`;
|
|
8172
|
+
}
|
|
8173
|
+
if (event.kind === "LLM") {
|
|
8174
|
+
return `llm ${stepEndpointName(event, "LLM")}`;
|
|
8175
|
+
}
|
|
8176
|
+
return `${event.kind} ${event.name}`;
|
|
8177
|
+
}
|
|
8178
|
+
function incompleteRunningMessage(prefix, running) {
|
|
8179
|
+
const labels = running.map(describeRunningEvent);
|
|
8180
|
+
if (labels.length === 1) {
|
|
8181
|
+
return `${prefix}: ${labels[0]} never completed.`;
|
|
8182
|
+
}
|
|
8183
|
+
return `${prefix}: ${labels.join("; ")}.`;
|
|
8184
|
+
}
|
|
8137
8185
|
function stepEndpointName(event, kind) {
|
|
8138
8186
|
if (kind === "TOOL") return resolveCanonicalToolName(event);
|
|
8139
8187
|
for (const prefix of ["llm:", "generation:", "transcription:", "speech:"]) {
|
|
@@ -8475,10 +8523,13 @@ function createRunStatusRule(options = {}) {
|
|
|
8475
8523
|
findings.push(
|
|
8476
8524
|
failFinding(
|
|
8477
8525
|
"run.status",
|
|
8478
|
-
"Run contains incomplete running events
|
|
8526
|
+
incompleteRunningMessage("Run contains incomplete running events", running),
|
|
8479
8527
|
running.map((event) => eventEvidence3(event)),
|
|
8480
8528
|
"no running events",
|
|
8481
|
-
|
|
8529
|
+
{
|
|
8530
|
+
count: running.length,
|
|
8531
|
+
unfinished: running.map(describeRunningEvent)
|
|
8532
|
+
}
|
|
8482
8533
|
)
|
|
8483
8534
|
);
|
|
8484
8535
|
}
|
|
@@ -8648,6 +8699,34 @@ function createToolUsageRule(options) {
|
|
|
8648
8699
|
const names = tools.map(toolName);
|
|
8649
8700
|
const nameSet = new Set(names);
|
|
8650
8701
|
const findings = [];
|
|
8702
|
+
const forbidden = new Set(options.forbidden ?? []);
|
|
8703
|
+
const allowed = options.allowed?.length ? new Set(options.allowed) : void 0;
|
|
8704
|
+
for (const event of tools) {
|
|
8705
|
+
const name = toolName(event);
|
|
8706
|
+
const display = formatToolNameForMessage(name);
|
|
8707
|
+
if (forbidden.has(name)) {
|
|
8708
|
+
findings.push(
|
|
8709
|
+
failFinding(
|
|
8710
|
+
"tool.usage",
|
|
8711
|
+
`Forbidden tool ${display} appeared.`,
|
|
8712
|
+
[eventEvidence3(event)],
|
|
8713
|
+
"tool absent",
|
|
8714
|
+
name
|
|
8715
|
+
)
|
|
8716
|
+
);
|
|
8717
|
+
}
|
|
8718
|
+
if (allowed && !allowed.has(name)) {
|
|
8719
|
+
findings.push(
|
|
8720
|
+
failFinding(
|
|
8721
|
+
"tool.usage",
|
|
8722
|
+
`Tool ${display} is not in the allowed tool set.`,
|
|
8723
|
+
[eventEvidence3(event)],
|
|
8724
|
+
[...allowed].sort(),
|
|
8725
|
+
name
|
|
8726
|
+
)
|
|
8727
|
+
);
|
|
8728
|
+
}
|
|
8729
|
+
}
|
|
8651
8730
|
for (const required of options.required ?? []) {
|
|
8652
8731
|
if (!nameSet.has(required)) {
|
|
8653
8732
|
const otherKinds = [
|
|
@@ -8665,7 +8744,7 @@ function createToolUsageRule(options) {
|
|
|
8665
8744
|
findings.push(
|
|
8666
8745
|
failFinding(
|
|
8667
8746
|
"tool.usage",
|
|
8668
|
-
`Required tool ${required} did not appear.${hint}`,
|
|
8747
|
+
`Required tool ${formatToolNameForMessage(required)} did not appear.${hint}`,
|
|
8669
8748
|
runEvidence(context.selectedRun),
|
|
8670
8749
|
required,
|
|
8671
8750
|
names
|
|
@@ -8673,21 +8752,6 @@ function createToolUsageRule(options) {
|
|
|
8673
8752
|
);
|
|
8674
8753
|
}
|
|
8675
8754
|
}
|
|
8676
|
-
const forbidden = new Set(options.forbidden ?? []);
|
|
8677
|
-
const allowed = options.allowed?.length ? new Set(options.allowed) : void 0;
|
|
8678
|
-
for (const event of tools) {
|
|
8679
|
-
const name = toolName(event);
|
|
8680
|
-
if (forbidden.has(name)) {
|
|
8681
|
-
findings.push(
|
|
8682
|
-
failFinding("tool.usage", `Forbidden tool ${name} appeared.`, [eventEvidence3(event)], "tool absent", name)
|
|
8683
|
-
);
|
|
8684
|
-
}
|
|
8685
|
-
if (allowed && !allowed.has(name)) {
|
|
8686
|
-
findings.push(
|
|
8687
|
-
failFinding("tool.usage", `Tool ${name} is not in the allowed tool set.`, [eventEvidence3(event)], [...allowed].sort(), name)
|
|
8688
|
-
);
|
|
8689
|
-
}
|
|
8690
|
-
}
|
|
8691
8755
|
if (options.minCount !== void 0 && tools.length < options.minCount) {
|
|
8692
8756
|
findings.push(
|
|
8693
8757
|
failFinding("tool.usage", `Tool count ${tools.length} was below minimum ${options.minCount}.`, runEvidence(context.selectedRun), { minCount: options.minCount }, tools.length)
|
|
@@ -8721,7 +8785,36 @@ function createStepOrderingRule(options) {
|
|
|
8721
8785
|
const afterEvents = finishedEvents(context, options.after.kind).filter(
|
|
8722
8786
|
(event) => stepEndpointName(event, options.after.kind) === options.after.name
|
|
8723
8787
|
);
|
|
8724
|
-
|
|
8788
|
+
const beforeRunning = semanticEvents(context).filter(
|
|
8789
|
+
(event) => event.kind === options.before.kind && event.status === "running" && stepEndpointName(event, options.before.kind) === options.before.name
|
|
8790
|
+
);
|
|
8791
|
+
const afterRunning = semanticEvents(context).filter(
|
|
8792
|
+
(event) => event.kind === options.after.kind && event.status === "running" && stepEndpointName(event, options.after.kind) === options.after.name
|
|
8793
|
+
);
|
|
8794
|
+
const afterStarted = afterEvents.length > 0 || afterRunning.length > 0;
|
|
8795
|
+
const afterEvidenceEvent = afterEvents[0] ?? afterRunning[0];
|
|
8796
|
+
if (beforeRunning.length > 0 && afterStarted && afterEvidenceEvent !== void 0) {
|
|
8797
|
+
const endpointExpected2 = bothTools ? { before: options.before.name, after: options.after.name } : { before: options.before, after: options.after };
|
|
8798
|
+
return [
|
|
8799
|
+
failFinding(
|
|
8800
|
+
ruleId,
|
|
8801
|
+
`${subject} ${beforeLabel} started but never finished before ${afterLabel} ran.`,
|
|
8802
|
+
[
|
|
8803
|
+
...beforeRunning.map((event) => eventEvidence3(event)),
|
|
8804
|
+
eventEvidence3(afterEvidenceEvent)
|
|
8805
|
+
],
|
|
8806
|
+
{ ...endpointExpected2, mode },
|
|
8807
|
+
{
|
|
8808
|
+
code: bothTools ? "tool.order.interval-unresolved" : "step.order.interval-unresolved",
|
|
8809
|
+
unfinishedBefore: true,
|
|
8810
|
+
beforeStatus: "running",
|
|
8811
|
+
...beforeEvents.length > 0 ? { finishedBeforeMasked: true } : {},
|
|
8812
|
+
...afterEvents.length === 0 ? { afterStatus: "running" } : {}
|
|
8813
|
+
}
|
|
8814
|
+
)
|
|
8815
|
+
];
|
|
8816
|
+
}
|
|
8817
|
+
if (beforeEvents.length === 0 || !afterStarted) {
|
|
8725
8818
|
if (!requireEndpoints) return [];
|
|
8726
8819
|
const findings = [];
|
|
8727
8820
|
if (beforeEvents.length === 0) {
|
|
@@ -8745,7 +8838,7 @@ function createStepOrderingRule(options) {
|
|
|
8745
8838
|
)
|
|
8746
8839
|
);
|
|
8747
8840
|
}
|
|
8748
|
-
if (
|
|
8841
|
+
if (!afterStarted) {
|
|
8749
8842
|
const otherKinds = otherKindsForStepName(
|
|
8750
8843
|
context,
|
|
8751
8844
|
options.after.kind,
|
|
@@ -8768,9 +8861,15 @@ function createStepOrderingRule(options) {
|
|
|
8768
8861
|
}
|
|
8769
8862
|
return findings;
|
|
8770
8863
|
}
|
|
8771
|
-
const
|
|
8772
|
-
|
|
8773
|
-
|
|
8864
|
+
const afterForOrder = afterEvents.length > 0 ? afterEvents : afterRunning;
|
|
8865
|
+
const encounter = [
|
|
8866
|
+
...finishedEvents(context).filter(
|
|
8867
|
+
(event) => event.kind === options.before.kind && stepEndpointName(event, options.before.kind) === options.before.name || event.kind === options.after.kind && stepEndpointName(event, options.after.kind) === options.after.name
|
|
8868
|
+
),
|
|
8869
|
+
...afterEvents.length === 0 ? afterRunning.filter(
|
|
8870
|
+
(event) => !finishedEvents(context).some((finished) => finished.eventId === event.eventId)
|
|
8871
|
+
) : []
|
|
8872
|
+
];
|
|
8774
8873
|
let beforeIndex;
|
|
8775
8874
|
let afterIndex;
|
|
8776
8875
|
for (const [position, event] of encounter.entries()) {
|
|
@@ -8801,7 +8900,7 @@ function createStepOrderingRule(options) {
|
|
|
8801
8900
|
];
|
|
8802
8901
|
}
|
|
8803
8902
|
const beforeEvent = beforeEvents[0];
|
|
8804
|
-
const afterEvent =
|
|
8903
|
+
const afterEvent = afterForOrder[0];
|
|
8805
8904
|
const beforeEnd = eventEndMs(beforeEvent);
|
|
8806
8905
|
const afterStart = eventStartMs(afterEvent);
|
|
8807
8906
|
const endpointExpected = bothTools ? { before: options.before.name, after: options.after.name } : { before: options.before, after: options.after };
|
|
@@ -8887,7 +8986,7 @@ function createStepOrderingRule(options) {
|
|
|
8887
8986
|
latestBefore = { event, end };
|
|
8888
8987
|
}
|
|
8889
8988
|
}
|
|
8890
|
-
for (const event of
|
|
8989
|
+
for (const event of afterForOrder) {
|
|
8891
8990
|
const start = eventStartMs(event);
|
|
8892
8991
|
if (start === void 0) {
|
|
8893
8992
|
missingAfterStarts += 1;
|
|
@@ -8916,7 +9015,7 @@ function createStepOrderingRule(options) {
|
|
|
8916
9015
|
const tie = tiedEnd === tiedStart ? recordedTieOrder(
|
|
8917
9016
|
context,
|
|
8918
9017
|
beforeEvents.filter((event) => eventEndMs(event) === tiedEnd),
|
|
8919
|
-
|
|
9018
|
+
afterForOrder.filter((event) => eventStartMs(event) === tiedStart)
|
|
8920
9019
|
) : void 0;
|
|
8921
9020
|
if (latestBefore.end > earliestAfter.start || tie !== void 0 && tie.inOrder !== true) {
|
|
8922
9021
|
return [
|
|
@@ -9097,10 +9196,13 @@ function createStructureIncompleteRule(options = {}) {
|
|
|
9097
9196
|
findings.push(
|
|
9098
9197
|
failFinding(
|
|
9099
9198
|
"structure.incomplete",
|
|
9100
|
-
"Trace contains incomplete running events
|
|
9199
|
+
incompleteRunningMessage("Trace contains incomplete running events", running),
|
|
9101
9200
|
running.map((event) => eventEvidence3(event, "status")),
|
|
9102
9201
|
"no running events",
|
|
9103
|
-
|
|
9202
|
+
{
|
|
9203
|
+
count: running.length,
|
|
9204
|
+
unfinished: running.map(describeRunningEvent)
|
|
9205
|
+
}
|
|
9104
9206
|
)
|
|
9105
9207
|
);
|
|
9106
9208
|
}
|
|
@@ -16084,5 +16186,5 @@ function renderGateReport(result, options = {}) {
|
|
|
16084
16186
|
}
|
|
16085
16187
|
|
|
16086
16188
|
export { ATTRIBUTION_CONFIDENCES, COHORT_METRIC_IDS, DEFAULT_REDACT_KEYS, DEFAULT_SUITE_ARTIFACTS_DIR, DELIVERY_CONFLICT_ATTR, DELIVERY_EVENT_BASE_ATTR, EVIDENCE_FORMAT_VERSION, EVIDENCE_HTML_FILENAME, EVIDENCE_MANIFEST_FILENAME, IDENTITY_CONFLICT_ATTR, Redactor, TraceDirectory, TraceReadError, TreeBuilder, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, applyProfileMetadataCaps, assertBundlePathContained, assertEvidenceRelativePath, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildEvidenceCausalFailureViewHtml, buildEvidenceCiPackage, buildEvidenceCircuitViewHtml, buildEvidenceContractsViewHtml, buildEvidenceDiffViewHtml, buildEvidenceHtmlShell, buildEvidenceManifest, buildEvidenceOutcomesViewHtml, buildEvidenceProvenanceViewHtml, buildEvidenceSafetyViewHtml, buildEvidenceTimelineViewHtml, buildEvidenceToolsLlmViewHtml, buildEvidenceTreeViewHtml, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, buildZipArchive, bundleFailsOnSafety, bundleRunAssetRelativePath, collectTraceSchemaVersions, compactAttributes, createBaselineRegressionRule, createLlmUsageRule, createMaxStepDurationRule, createObservedOutcomeRule, createRequireCompletedRule, createRunDepthRule, createRunDurationRule, createRunStatusRule, createSafetyOversizedAttributeRule, createSafetyRawContentRule, createSafetyRedactionRule, createSafetySecretPatternRule, createStallDetectionRule, createStructureCycleRule, createStructureOrphanRule, createStructureParallelWidthRule, createStructureRelationshipRule, createToolUsageRule, defaultBundleOutputPath, defaultSuiteConfigTemplate, defineTraceContract, diffRuns, diffTraceEvents, enrichSessionRunRecord, escapeHtml, escapeMarkdown, evaluateTraceContract, extractMetadata, extractOutcomesFromTraceEvents, filterMetasBySessionScope, filterTraces, flattenTree, formatDuration2 as formatDuration, formatStepLabel, formatTimestamp, gateHasThresholds, getIndent, getTraceFilePath, inferEvidenceFileRole, isAgentInspectTrace, isAttributionConfidence, isCredentialSensitiveKey, isPersistedInspectEvent, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, manualTraceEventsToComparableRun, nanoid, normalizeBundleOutputPath, openTrace, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseTraceJsonl, persistedInspectEventsToRunTrees, persistedInspectEventsToTraceEvents, projectLogicalEvents, renderActivitySummaryHuman, renderCohortReport, renderErrorLine, renderGateReport, renderObservedOutcomesHtml, renderObservedOutcomesMarkdown, renderRunDiff, renderRunWhat, renderStepLine, renderSuiteReport, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, runTraceChecks, safeString, sanitizeBundleRunId, searchTraces, serializeEvidenceManifest, sha256Hex, stableJson, stringContainsHighConfidenceCredential, summarizeObservedOutcomes, summarizeSemanticParity, traceEventToPersistedInspectEvent, truncateName, truncateStringForProfile, validateEvent, validateSuiteConfig, verifyEvidenceDirectory, zeroKinds };
|
|
16087
|
-
//# sourceMappingURL=chunk-
|
|
16088
|
-
//# sourceMappingURL=chunk-
|
|
16189
|
+
//# sourceMappingURL=chunk-6TXW53UR.mjs.map
|
|
16190
|
+
//# sourceMappingURL=chunk-6TXW53UR.mjs.map
|