agent-inspect 6.29.5 → 6.29.6

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.
Files changed (29) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -1
  3. package/docs/CLI.md +1 -1
  4. package/docs/TRACE-CONTRACTS.md +10 -7
  5. package/package.json +1 -1
  6. package/packages/cli/dist/{chunk-XWQEHKGB.mjs → chunk-DBRMI7TC.mjs} +35 -3
  7. package/packages/cli/dist/chunk-DBRMI7TC.mjs.map +1 -0
  8. package/packages/cli/dist/index.cjs +36 -4
  9. package/packages/cli/dist/index.cjs.map +1 -1
  10. package/packages/cli/dist/index.mjs +6 -6
  11. package/packages/cli/dist/index.mjs.map +1 -1
  12. package/packages/cli/dist/{src-XNC4EUN3.mjs → src-6CET2GW2.mjs} +3 -3
  13. package/packages/cli/dist/{src-XNC4EUN3.mjs.map → src-6CET2GW2.mjs.map} +1 -1
  14. package/packages/core/dist/advanced.cjs +19 -1
  15. package/packages/core/dist/advanced.cjs.map +1 -1
  16. package/packages/core/dist/advanced.d.cts +2 -2
  17. package/packages/core/dist/advanced.d.ts +2 -2
  18. package/packages/core/dist/advanced.mjs +2 -2
  19. package/packages/core/dist/checks.cjs +33 -1
  20. package/packages/core/dist/checks.cjs.map +1 -1
  21. package/packages/core/dist/checks.d.cts +2 -2
  22. package/packages/core/dist/checks.d.ts +2 -2
  23. package/packages/core/dist/checks.mjs +1 -1
  24. package/packages/core/dist/{chunk-TU47EKKS.mjs → chunk-OOX25GTH.mjs} +35 -3
  25. package/packages/core/dist/chunk-OOX25GTH.mjs.map +1 -0
  26. package/packages/core/dist/{index-DvSbXNot.d.ts → index-7hG_qggp.d.ts} +5 -0
  27. package/packages/core/dist/{index-DKv7esIo.d.cts → index-CQJUNPPe.d.cts} +5 -0
  28. package/packages/cli/dist/chunk-XWQEHKGB.mjs.map +0 -1
  29. package/packages/core/dist/chunk-TU47EKKS.mjs.map +0 -1
@@ -5814,6 +5814,18 @@ function limitFindings(findings, maxFindings) {
5814
5814
  function hasRedactionMarker(value, markers) {
5815
5815
  return markers.some((marker) => value.includes(marker)) || /^\[HASH:[A-Za-z0-9_-]+\]$/.test(value);
5816
5816
  }
5817
+ function isFullyRedactedValue(value, markers = ["[REDACTED]", "[REDACTED:"]) {
5818
+ if (typeof value !== "string") return false;
5819
+ const trimmed = value.trim();
5820
+ if (trimmed.length === 0) return false;
5821
+ if (/^\[HASH:[A-Za-z0-9_-]+\]$/.test(trimmed)) return true;
5822
+ if (/^\[REDACTED:[^\]]*\]$/.test(trimmed)) return true;
5823
+ for (const marker of markers) {
5824
+ if (marker.endsWith(":")) continue;
5825
+ if (trimmed === marker) return true;
5826
+ }
5827
+ return false;
5828
+ }
5817
5829
  function isSensitiveKey(key, sensitiveKeys) {
5818
5830
  return isCredentialSensitiveKey(key, sensitiveKeys);
5819
5831
  }
@@ -6132,8 +6144,26 @@ function createToolUsageRule(options) {
6132
6144
  const findings = [];
6133
6145
  for (const required of options.required ?? []) {
6134
6146
  if (!nameSet.has(required)) {
6147
+ const otherKinds = [
6148
+ ...new Set(
6149
+ context.events.filter((event) => {
6150
+ const kind = typeof event.kind === "string" ? event.kind.toUpperCase() : "";
6151
+ if (kind === "TOOL") return false;
6152
+ return resolveCanonicalToolName(event) === required || event.name === required || event.name === `tool:${required}` || event.name.endsWith(`:${required}`);
6153
+ }).map(
6154
+ (event) => typeof event.kind === "string" ? event.kind.toUpperCase() : "UNKNOWN"
6155
+ )
6156
+ )
6157
+ ].sort();
6158
+ const hint = otherKinds.length > 0 ? ` Required name appears under non-TOOL kind(s): ${otherKinds.join(", ")}. tools.required / requiredOrder match TOOL events only.` : "";
6135
6159
  findings.push(
6136
- failFinding("tool.usage", `Required tool ${required} did not appear.`, runEvidence(context.selectedRun), required, names)
6160
+ failFinding(
6161
+ "tool.usage",
6162
+ `Required tool ${required} did not appear.${hint}`,
6163
+ runEvidence(context.selectedRun),
6164
+ required,
6165
+ names
6166
+ )
6137
6167
  );
6138
6168
  }
6139
6169
  }
@@ -6498,6 +6528,7 @@ function createSafetyRedactionRule(options = {}) {
6498
6528
  function createSafetyRawContentRule(options = {}) {
6499
6529
  const forbiddenKeys = options.forbiddenKeys ?? DEFAULT_RAW_CONTENT_KEYS;
6500
6530
  const safePathPrefixes = options.safePathPrefixes ?? DEFAULT_SAFE_RAW_CONTENT_PATH_PREFIXES;
6531
+ const markers = options.redactedMarkers ?? ["[REDACTED]", "[REDACTED:"];
6501
6532
  return {
6502
6533
  id: "safety.rawPrompt",
6503
6534
  category: "safety",
@@ -6508,6 +6539,7 @@ function createSafetyRawContentRule(options = {}) {
6508
6539
  for (const entry of eventValueEntries(event, { includeSummaries: options.includeSummaries })) {
6509
6540
  const key = entry.key ?? lastPathSegment(entry.path);
6510
6541
  if (!isRawContentPath(entry.path, key, forbiddenKeys, safePathPrefixes)) continue;
6542
+ if (isFullyRedactedValue(entry.value, markers)) continue;
6511
6543
  findings.push(
6512
6544
  failFinding(
6513
6545
  "safety.rawPrompt",
@@ -13779,7 +13811,7 @@ var init_src = __esm({
13779
13811
  });
13780
13812
 
13781
13813
  // package.json
13782
- var version = "6.29.5";
13814
+ var version = "6.29.6";
13783
13815
 
13784
13816
  // packages/cli/src/list.ts
13785
13817
  init_advanced();
@@ -27025,7 +27057,7 @@ function createCliProgram() {
27025
27057
  "add run.maxStepDuration (e.g. 30s, 5m)"
27026
27058
  ).option("--require-completed", "add run.requireCompleted").option("--detect-stalls", "add run.stall for running or incomplete events").option(
27027
27059
  "--fail-on-observation <status>",
27028
- "fail when observed outcomes match status (passed, failed, unknown, skipped; comma-separated)"
27060
+ "outcome gate: require \u22651 OUTCOME and fail when status matches (passed,failed,unknown,skipped; comma-separated). Does not invent outcomes from tool/LLM/run success; use --preset trajectory for structural checks"
27029
27061
  ).option("--session <id>", "check all runs in a workflow session (requires --dir)").option("--group <id>", "check all runs sharing a groupId (requires --dir)").option(
27030
27062
  "--correlate-group",
27031
27063
  "when using --session, also match synthetic group: session keys"
@@ -27038,7 +27070,7 @@ function createCliProgram() {
27038
27070
  "run optional circuit rules (repeatable): same-tool-repetition, max-retries, ...",
27039
27071
  (value, previous = []) => [...previous, value]
27040
27072
  ).addOption(
27041
- new commander.Option("--preset <name>", "additive check preset").choices(["trajectory", "safety", "comprehensive", "behavioral-session"])
27073
+ new commander.Option("--preset <name>", "additive check preset (trajectory=structure only; safety=share checks; not interchangeable)").choices(["trajectory", "safety", "comprehensive", "behavioral-session"])
27042
27074
  ).addOption(
27043
27075
  new commander.Option(
27044
27076
  "--evidence-on <mode>",