@agentspec/sdk 0.3.0 → 0.5.0

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 (114) hide show
  1. package/README.md +46 -0
  2. package/dist/evidence-points-C6j4PSsQ.d.cts +1139 -0
  3. package/dist/evidence-points-C6j4PSsQ.d.ts +1139 -0
  4. package/dist/index.cjs +1733 -346
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1026 -2549
  7. package/dist/index.d.ts +1026 -2549
  8. package/dist/index.js +1684 -345
  9. package/dist/index.js.map +1 -1
  10. package/dist/runtime.cjs +930 -0
  11. package/dist/runtime.cjs.map +1 -0
  12. package/dist/runtime.d.cts +63 -0
  13. package/dist/runtime.d.ts +63 -0
  14. package/dist/runtime.js +921 -0
  15. package/dist/runtime.js.map +1 -0
  16. package/package.json +15 -8
  17. package/schemas/evidence/v1/contract.schema.json +2078 -0
  18. package/schemas/evidence/v1/fixtures/drifted/EvalResult.n-as-string.json +1 -0
  19. package/schemas/evidence/v1/fixtures/drifted/EvalResult.pass-rate-above-one.json +1 -0
  20. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.bad-sha.json +1 -0
  21. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.extra-field.json +1 -0
  22. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.fail-without-reason.json +1 -0
  23. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.missing-ttl.json +1 -0
  24. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.not-verifiable-without-reason.json +1 -0
  25. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.observed-at-epoch.json +1 -0
  26. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.observed-at-out-of-range.json +1 -0
  27. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.observed-at-space-separated.json +1 -0
  28. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.sample-size-boolean.json +1 -0
  29. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.ttl-as-string.json +1 -0
  30. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.unknown-collector.json +1 -0
  31. package/schemas/evidence/v1/fixtures/drifted/EvidenceRecord.unknown-source.json +1 -0
  32. package/schemas/evidence/v1/fixtures/drifted/Heartbeat.bad-contract-version.json +1 -0
  33. package/schemas/evidence/v1/fixtures/drifted/Heartbeat.bad-record.json +1 -0
  34. package/schemas/evidence/v1/fixtures/drifted/Heartbeat.point-records-over-limit.json +1 -0
  35. package/schemas/evidence/v1/fixtures/drifted/Heartbeat.with-gap.json +1 -0
  36. package/schemas/evidence/v1/fixtures/drifted/ReadinessFinding.bad-severity.json +1 -0
  37. package/schemas/evidence/v1/fixtures/drifted/SidecarPush.missing-sha.json +1 -0
  38. package/schemas/evidence/v1/fixtures/drifted/TrustPolicy.lenient.json +1 -0
  39. package/schemas/evidence/v1/fixtures/valid/EvalResult.live.json +1 -0
  40. package/schemas/evidence/v1/fixtures/valid/EvalResult.null-dataset.json +1 -0
  41. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.fail.json +1 -0
  42. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.null-collector.json +1 -0
  43. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.pass-null-reason.json +1 -0
  44. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.pass.json +1 -0
  45. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.timezone-offset.json +1 -0
  46. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.unknown-reason-code.json +1 -0
  47. package/schemas/evidence/v1/fixtures/valid/EvidenceRecord.with-collector.json +1 -0
  48. package/schemas/evidence/v1/fixtures/valid/Heartbeat.contract-null.json +1 -0
  49. package/schemas/evidence/v1/fixtures/valid/Heartbeat.contract-version.json +1 -0
  50. package/schemas/evidence/v1/fixtures/valid/Heartbeat.evidence-points.json +1 -0
  51. package/schemas/evidence/v1/fixtures/valid/Heartbeat.full.json +1 -0
  52. package/schemas/evidence/v1/fixtures/valid/Heartbeat.sdk-no-records.json +1 -0
  53. package/schemas/evidence/v1/fixtures/valid/Heartbeat.sdk.json +1 -0
  54. package/schemas/evidence/v1/fixtures/valid/ReadinessFinding.open-code.json +1 -0
  55. package/schemas/evidence/v1/fixtures/valid/ReadinessFinding.with-subject.json +1 -0
  56. package/schemas/evidence/v1/fixtures/valid/SidecarPush.declared.json +1 -0
  57. package/schemas/evidence/v1/fixtures/valid/TrustPolicy.standard.json +1 -0
  58. package/schemas/evidence/v1/fixtures/valid/TrustPolicy.strict.json +1 -0
  59. package/schemas/grader/v1/fixtures/accepts-fractional-seconds.json +62 -0
  60. package/schemas/grader/v1/fixtures/accepts-leap-day-in-year-below-100.json +62 -0
  61. package/schemas/grader/v1/fixtures/accepts-more-than-6-fractional-digits.json +62 -0
  62. package/schemas/grader/v1/fixtures/accepts-numeric-offset.json +62 -0
  63. package/schemas/grader/v1/fixtures/all-records-must-pass.json +58 -0
  64. package/schemas/grader/v1/fixtures/below-threshold-not-graded.json +61 -0
  65. package/schemas/grader/v1/fixtures/derived-rule-fails-when-a-parent-fails.json +67 -0
  66. package/schemas/grader/v1/fixtures/derived-rule-follows-memory-write-parent.json +43 -0
  67. package/schemas/grader/v1/fixtures/derived-rule-passes-with-its-parents.json +64 -0
  68. package/schemas/grader/v1/fixtures/derived-rule-unverified-when-a-parent-has-no-evidence.json +51 -0
  69. package/schemas/grader/v1/fixtures/expired-record-is-stale.json +66 -0
  70. package/schemas/grader/v1/fixtures/fail-beats-not-verifiable.json +62 -0
  71. package/schemas/grader/v1/fixtures/grade-band-b.json +62 -0
  72. package/schemas/grader/v1/fixtures/independent-from-listed-collector-is-admitted.json +39 -0
  73. package/schemas/grader/v1/fixtures/independent-from-unlisted-collector-is-rejected.json +47 -0
  74. package/schemas/grader/v1/fixtures/low-severity-coverage-only.json +90 -0
  75. package/schemas/grader/v1/fixtures/malformed-point-is-ignored.json +67 -0
  76. package/schemas/grader/v1/fixtures/never-admitted-sources-standard.json +196 -0
  77. package/schemas/grader/v1/fixtures/never-admitted-sources-strict.json +196 -0
  78. package/schemas/grader/v1/fixtures/not-admitted-outranks-mismatch.json +64 -0
  79. package/schemas/grader/v1/fixtures/not-verifiable-ignored-when-one-passes.json +58 -0
  80. package/schemas/grader/v1/fixtures/not-verifiable-only-keeps-reason.json +71 -0
  81. package/schemas/grader/v1/fixtures/not-wired-point-drops-a-fail-when-no-point-of-the-rule-is-wired.json +59 -0
  82. package/schemas/grader/v1/fixtures/not-wired-point-drops-a-wired-point-pass.json +87 -0
  83. package/schemas/grader/v1/fixtures/not-wired-point-drops-its-own-earlier-fail-when-another-point-is-wired.json +70 -0
  84. package/schemas/grader/v1/fixtures/not-wired-point-ignores-a-wired-point-fail-without-the-rule-id.json +69 -0
  85. package/schemas/grader/v1/fixtures/not-wired-point-keeps-a-wired-point-fail.json +79 -0
  86. package/schemas/grader/v1/fixtures/not-wired-point-keeps-independent-evidence.json +64 -0
  87. package/schemas/grader/v1/fixtures/not-wired-point-never-passes.json +107 -0
  88. package/schemas/grader/v1/fixtures/offline-record-is-not-admitted-yet.json +47 -0
  89. package/schemas/grader/v1/fixtures/record-without-collector-is-admitted-until-producers-set-it.json +38 -0
  90. package/schemas/grader/v1/fixtures/records-without-rule-id-never-graded.json +62 -0
  91. package/schemas/grader/v1/fixtures/rejects-compact-timestamp.json +56 -0
  92. package/schemas/grader/v1/fixtures/rejects-hour-24-lowercase-separator.json +56 -0
  93. package/schemas/grader/v1/fixtures/rejects-hour-24-space-separator.json +56 -0
  94. package/schemas/grader/v1/fixtures/rejects-hour-24.json +56 -0
  95. package/schemas/grader/v1/fixtures/rejects-impossible-date-feb-29.json +56 -0
  96. package/schemas/grader/v1/fixtures/rejects-lowercase-t.json +56 -0
  97. package/schemas/grader/v1/fixtures/rejects-lowercase-z.json +56 -0
  98. package/schemas/grader/v1/fixtures/rejects-offset-hours-above-23.json +56 -0
  99. package/schemas/grader/v1/fixtures/rejects-offset-minutes-above-59.json +56 -0
  100. package/schemas/grader/v1/fixtures/rejects-offsetless-timestamp.json +56 -0
  101. package/schemas/grader/v1/fixtures/rejects-space-separator.json +56 -0
  102. package/schemas/grader/v1/fixtures/rejects-year-zero.json +56 -0
  103. package/schemas/grader/v1/fixtures/rounds-coverage-before-the-threshold.json +850 -0
  104. package/schemas/grader/v1/fixtures/rounds-verified-before-the-band.json +674 -0
  105. package/schemas/grader/v1/fixtures/sdk-observed-from-evidence-point-rule-is-admitted-standard.json +39 -0
  106. package/schemas/grader/v1/fixtures/sdk-observed-from-evidence-point-rule-is-not-admitted-strict.json +47 -0
  107. package/schemas/grader/v1/fixtures/sdk-observed-standard.json +58 -0
  108. package/schemas/grader/v1/fixtures/sdk-observed-strict.json +66 -0
  109. package/schemas/grader/v1/fixtures/sdk-observed-without-evidence-point-source-is-rejected.json +47 -0
  110. package/schemas/grader/v1/fixtures/sdk-only-agent-all-points-fired.json +116 -0
  111. package/schemas/grader/v1/fixtures/stale-outranks-mismatch.json +64 -0
  112. package/schemas/grader/v1/fixtures/strict-admits-independent.json +39 -0
  113. package/schemas/grader/v1/fixtures/sub-millisecond-expiry-boundary.json +38 -0
  114. package/schemas/v1/agent.schema.json +372 -198
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "not-wired-point-drops-a-wired-point-pass",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "tool:TOOL-01",
7
+ "ruleId": "TOOL-01",
8
+ "status": "pass",
9
+ "source": "sdk-observed",
10
+ "origin": "in_process",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 3600,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ }
21
+ ],
22
+ "applicableRules": [
23
+ {
24
+ "id": "TOOL-01",
25
+ "severity": "high"
26
+ }
27
+ ],
28
+ "policy": "standard",
29
+ "now": "2026-10-22T12:00:00Z",
30
+ "points": [
31
+ {
32
+ "point": "tool",
33
+ "target": "local",
34
+ "state": "fired",
35
+ "counts": {
36
+ "pass": 1,
37
+ "fail": 0,
38
+ "not_verifiable": 0
39
+ },
40
+ "records": [
41
+ {
42
+ "checkId": "tool:TOOL-01",
43
+ "ruleId": "TOOL-01",
44
+ "status": "pass",
45
+ "source": "sdk-observed",
46
+ "origin": "in_process",
47
+ "observedAt": "2026-10-22T11:00:00Z",
48
+ "window": {
49
+ "start": "2026-10-22T10:00:00Z",
50
+ "end": "2026-10-22T11:00:00Z"
51
+ },
52
+ "ttlSeconds": 3600,
53
+ "sampleSize": 1,
54
+ "traceIds": [],
55
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "point": "mcpClient",
61
+ "target": "tools/call",
62
+ "state": "not_wired",
63
+ "counts": {
64
+ "pass": 0,
65
+ "fail": 0,
66
+ "not_verifiable": 0
67
+ },
68
+ "records": []
69
+ }
70
+ ]
71
+ },
72
+ "expected": {
73
+ "verified": 0,
74
+ "coverage": 0,
75
+ "independentShare": 0,
76
+ "grade": "Not graded",
77
+ "unverified": [
78
+ {
79
+ "ruleId": "TOOL-01",
80
+ "severity": "high",
81
+ "reason": {
82
+ "code": "not_wired"
83
+ }
84
+ }
85
+ ]
86
+ }
87
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "not-wired-point-drops-its-own-earlier-fail-when-another-point-is-wired",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "tool:TOOL-01",
7
+ "ruleId": "TOOL-01",
8
+ "status": "fail",
9
+ "source": "sdk-observed",
10
+ "origin": "in_process",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 3600,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ }
21
+ ],
22
+ "applicableRules": [
23
+ {
24
+ "id": "TOOL-01",
25
+ "severity": "high"
26
+ }
27
+ ],
28
+ "policy": "standard",
29
+ "now": "2026-10-22T12:00:00Z",
30
+ "points": [
31
+ {
32
+ "point": "tool",
33
+ "target": "local",
34
+ "state": "not_wired",
35
+ "counts": {
36
+ "pass": 0,
37
+ "fail": 0,
38
+ "not_verifiable": 0
39
+ },
40
+ "records": []
41
+ },
42
+ {
43
+ "point": "mcpClient",
44
+ "target": "tools/call",
45
+ "state": "wired",
46
+ "counts": {
47
+ "pass": 0,
48
+ "fail": 0,
49
+ "not_verifiable": 0
50
+ },
51
+ "records": []
52
+ }
53
+ ]
54
+ },
55
+ "expected": {
56
+ "verified": 0,
57
+ "coverage": 0,
58
+ "independentShare": 0,
59
+ "grade": "Not graded",
60
+ "unverified": [
61
+ {
62
+ "ruleId": "TOOL-01",
63
+ "severity": "high",
64
+ "reason": {
65
+ "code": "not_wired"
66
+ }
67
+ }
68
+ ]
69
+ }
70
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "not-wired-point-ignores-a-wired-point-fail-without-the-rule-id",
3
+ "input": {
4
+ "records": [],
5
+ "applicableRules": [
6
+ {
7
+ "id": "TOOL-01",
8
+ "severity": "high"
9
+ }
10
+ ],
11
+ "policy": "standard",
12
+ "now": "2026-10-22T12:00:00Z",
13
+ "points": [
14
+ {
15
+ "point": "tool",
16
+ "target": "local",
17
+ "state": "fired",
18
+ "counts": {
19
+ "pass": 0,
20
+ "fail": 1,
21
+ "not_verifiable": 0
22
+ },
23
+ "records": [
24
+ {
25
+ "checkId": "tool:search",
26
+ "status": "fail",
27
+ "source": "sdk-observed",
28
+ "origin": "in_process",
29
+ "observedAt": "2026-10-22T11:00:00Z",
30
+ "window": {
31
+ "start": "2026-10-22T10:00:00Z",
32
+ "end": "2026-10-22T11:00:00Z"
33
+ },
34
+ "ttlSeconds": 3600,
35
+ "sampleSize": 1,
36
+ "traceIds": [],
37
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "point": "mcpClient",
43
+ "target": "tools/call",
44
+ "state": "not_wired",
45
+ "counts": {
46
+ "pass": 0,
47
+ "fail": 0,
48
+ "not_verifiable": 0
49
+ },
50
+ "records": []
51
+ }
52
+ ]
53
+ },
54
+ "expected": {
55
+ "verified": 0,
56
+ "coverage": 0,
57
+ "independentShare": 0,
58
+ "grade": "Not graded",
59
+ "unverified": [
60
+ {
61
+ "ruleId": "TOOL-01",
62
+ "severity": "high",
63
+ "reason": {
64
+ "code": "not_wired"
65
+ }
66
+ }
67
+ ]
68
+ }
69
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "not-wired-point-keeps-a-wired-point-fail",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "tool:TOOL-01",
7
+ "ruleId": "TOOL-01",
8
+ "status": "fail",
9
+ "source": "sdk-observed",
10
+ "origin": "in_process",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 3600,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ }
21
+ ],
22
+ "applicableRules": [
23
+ {
24
+ "id": "TOOL-01",
25
+ "severity": "high"
26
+ }
27
+ ],
28
+ "policy": "standard",
29
+ "now": "2026-10-22T12:00:00Z",
30
+ "points": [
31
+ {
32
+ "point": "tool",
33
+ "target": "local",
34
+ "state": "fired",
35
+ "counts": {
36
+ "pass": 0,
37
+ "fail": 1,
38
+ "not_verifiable": 0
39
+ },
40
+ "records": [
41
+ {
42
+ "checkId": "tool:TOOL-01",
43
+ "ruleId": "TOOL-01",
44
+ "status": "fail",
45
+ "source": "sdk-observed",
46
+ "origin": "in_process",
47
+ "observedAt": "2026-10-22T11:00:00Z",
48
+ "window": {
49
+ "start": "2026-10-22T10:00:00Z",
50
+ "end": "2026-10-22T11:00:00Z"
51
+ },
52
+ "ttlSeconds": 3600,
53
+ "sampleSize": 1,
54
+ "traceIds": [],
55
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ "point": "mcpClient",
61
+ "target": "tools/call",
62
+ "state": "not_wired",
63
+ "counts": {
64
+ "pass": 0,
65
+ "fail": 0,
66
+ "not_verifiable": 0
67
+ },
68
+ "records": []
69
+ }
70
+ ]
71
+ },
72
+ "expected": {
73
+ "verified": 0,
74
+ "coverage": 100,
75
+ "independentShare": 0,
76
+ "grade": "F",
77
+ "unverified": []
78
+ }
79
+ }
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "not-wired-point-keeps-independent-evidence",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "SEC-LLM-01",
7
+ "ruleId": "SEC-LLM-01",
8
+ "status": "pass",
9
+ "source": "independent",
10
+ "origin": "probe",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 3600,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
20
+ "collector": "sidecar-probe"
21
+ }
22
+ ],
23
+ "applicableRules": [
24
+ {
25
+ "id": "SEC-LLM-01",
26
+ "severity": "high"
27
+ },
28
+ {
29
+ "id": "SEC-LLM-02",
30
+ "severity": "high"
31
+ }
32
+ ],
33
+ "policy": "standard",
34
+ "now": "2026-10-22T12:00:00Z",
35
+ "points": [
36
+ {
37
+ "point": "guardrail",
38
+ "target": "input",
39
+ "state": "not_wired",
40
+ "counts": {
41
+ "pass": 0,
42
+ "fail": 0,
43
+ "not_verifiable": 0
44
+ },
45
+ "records": []
46
+ }
47
+ ]
48
+ },
49
+ "expected": {
50
+ "verified": 100,
51
+ "coverage": 50,
52
+ "independentShare": 100,
53
+ "grade": "Not graded",
54
+ "unverified": [
55
+ {
56
+ "ruleId": "SEC-LLM-02",
57
+ "severity": "high",
58
+ "reason": {
59
+ "code": "no_evidence"
60
+ }
61
+ }
62
+ ]
63
+ }
64
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "name": "not-wired-point-never-passes",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "guardrail:SEC-LLM-01",
7
+ "ruleId": "SEC-LLM-01",
8
+ "status": "pass",
9
+ "source": "sdk-observed",
10
+ "origin": "in_process",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 3600,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ },
21
+ {
22
+ "checkId": "guardrail:SEC-LLM-02",
23
+ "ruleId": "SEC-LLM-02",
24
+ "status": "pass",
25
+ "source": "sdk-observed",
26
+ "origin": "in_process",
27
+ "observedAt": "2026-10-22T11:00:00Z",
28
+ "window": {
29
+ "start": "2026-10-22T10:00:00Z",
30
+ "end": "2026-10-22T11:00:00Z"
31
+ },
32
+ "ttlSeconds": 3600,
33
+ "sampleSize": 1,
34
+ "traceIds": [],
35
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
36
+ }
37
+ ],
38
+ "applicableRules": [
39
+ {
40
+ "id": "SEC-LLM-01",
41
+ "severity": "high"
42
+ },
43
+ {
44
+ "id": "SEC-LLM-02",
45
+ "severity": "high"
46
+ }
47
+ ],
48
+ "policy": "standard",
49
+ "now": "2026-10-22T12:00:00Z",
50
+ "points": [
51
+ {
52
+ "point": "guardrail",
53
+ "target": "input",
54
+ "state": "fired",
55
+ "counts": {
56
+ "pass": 1,
57
+ "fail": 0,
58
+ "not_verifiable": 0
59
+ },
60
+ "records": [
61
+ {
62
+ "checkId": "guardrail:SEC-LLM-01",
63
+ "ruleId": "SEC-LLM-01",
64
+ "status": "pass",
65
+ "source": "sdk-observed",
66
+ "origin": "in_process",
67
+ "observedAt": "2026-10-22T11:00:00Z",
68
+ "window": {
69
+ "start": "2026-10-22T10:00:00Z",
70
+ "end": "2026-10-22T11:00:00Z"
71
+ },
72
+ "ttlSeconds": 3600,
73
+ "sampleSize": 1,
74
+ "traceIds": [],
75
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "point": "guardrail",
81
+ "target": "output",
82
+ "state": "not_wired",
83
+ "counts": {
84
+ "pass": 0,
85
+ "fail": 0,
86
+ "not_verifiable": 0
87
+ },
88
+ "records": []
89
+ }
90
+ ]
91
+ },
92
+ "expected": {
93
+ "verified": 100,
94
+ "coverage": 50,
95
+ "independentShare": 0,
96
+ "grade": "Not graded",
97
+ "unverified": [
98
+ {
99
+ "ruleId": "SEC-LLM-02",
100
+ "severity": "high",
101
+ "reason": {
102
+ "code": "not_wired"
103
+ }
104
+ }
105
+ ]
106
+ }
107
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "offline-record-is-not-admitted-yet",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "check:MEM-01",
7
+ "ruleId": "MEM-01",
8
+ "status": "pass",
9
+ "source": "offline",
10
+ "origin": "gateway",
11
+ "collector": "lock",
12
+ "observedAt": "2026-10-22T11:00:00Z",
13
+ "window": {
14
+ "start": "2026-10-22T10:00:00Z",
15
+ "end": "2026-10-22T11:00:00Z"
16
+ },
17
+ "ttlSeconds": 86400,
18
+ "sampleSize": 1,
19
+ "traceIds": [],
20
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
21
+ }
22
+ ],
23
+ "applicableRules": [
24
+ {
25
+ "id": "MEM-01",
26
+ "severity": "high"
27
+ }
28
+ ],
29
+ "policy": "standard",
30
+ "now": "2026-10-22T12:00:00Z"
31
+ },
32
+ "expected": {
33
+ "verified": 0,
34
+ "coverage": 0,
35
+ "independentShare": 0,
36
+ "grade": "Not graded",
37
+ "unverified": [
38
+ {
39
+ "ruleId": "MEM-01",
40
+ "severity": "high",
41
+ "reason": {
42
+ "code": "source_not_admitted"
43
+ }
44
+ }
45
+ ]
46
+ }
47
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "record-without-collector-is-admitted-until-producers-set-it",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "check:MODEL-03",
7
+ "ruleId": "MODEL-03",
8
+ "status": "pass",
9
+ "source": "independent",
10
+ "origin": "gateway",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 86400,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ }
21
+ ],
22
+ "applicableRules": [
23
+ {
24
+ "id": "MODEL-03",
25
+ "severity": "high"
26
+ }
27
+ ],
28
+ "policy": "standard",
29
+ "now": "2026-10-22T12:00:00Z"
30
+ },
31
+ "expected": {
32
+ "verified": 100,
33
+ "coverage": 100,
34
+ "independentShare": 100,
35
+ "grade": "A",
36
+ "unverified": []
37
+ }
38
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "records-without-rule-id-never-graded",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "check:None",
7
+ "ruleId": null,
8
+ "status": "pass",
9
+ "source": "independent",
10
+ "origin": "gateway",
11
+ "observedAt": "2026-10-22T11:00:00Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 86400,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ },
21
+ {
22
+ "checkId": "check:OTHER",
23
+ "ruleId": "OTHER",
24
+ "status": "pass",
25
+ "source": "independent",
26
+ "origin": "gateway",
27
+ "observedAt": "2026-10-22T11:00:00Z",
28
+ "window": {
29
+ "start": "2026-10-22T10:00:00Z",
30
+ "end": "2026-10-22T11:00:00Z"
31
+ },
32
+ "ttlSeconds": 86400,
33
+ "sampleSize": 1,
34
+ "traceIds": [],
35
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
36
+ }
37
+ ],
38
+ "applicableRules": [
39
+ {
40
+ "id": "R1",
41
+ "severity": "high"
42
+ }
43
+ ],
44
+ "policy": "standard",
45
+ "now": "2026-10-22T12:00:00Z"
46
+ },
47
+ "expected": {
48
+ "verified": 0,
49
+ "coverage": 0,
50
+ "independentShare": 0,
51
+ "grade": "Not graded",
52
+ "unverified": [
53
+ {
54
+ "ruleId": "R1",
55
+ "severity": "high",
56
+ "reason": {
57
+ "code": "no_evidence"
58
+ }
59
+ }
60
+ ]
61
+ }
62
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "rejects-compact-timestamp",
3
+ "input": {
4
+ "records": [
5
+ {
6
+ "checkId": "check:R1",
7
+ "ruleId": "R1",
8
+ "status": "pass",
9
+ "source": "independent",
10
+ "origin": "gateway",
11
+ "observedAt": "20261022T110000Z",
12
+ "window": {
13
+ "start": "2026-10-22T10:00:00Z",
14
+ "end": "2026-10-22T11:00:00Z"
15
+ },
16
+ "ttlSeconds": 86400,
17
+ "sampleSize": 1,
18
+ "traceIds": [],
19
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
+ },
21
+ {
22
+ "checkId": "check:R2",
23
+ "ruleId": "R2",
24
+ "status": "fail",
25
+ "source": "independent",
26
+ "origin": "gateway",
27
+ "observedAt": "2026-10-22T11:00:00Z",
28
+ "window": {
29
+ "start": "2026-10-22T10:00:00Z",
30
+ "end": "2026-10-22T11:00:00Z"
31
+ },
32
+ "ttlSeconds": 86400,
33
+ "sampleSize": 1,
34
+ "traceIds": [],
35
+ "manifestSha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36
+ "reason": {
37
+ "code": "no_evidence",
38
+ "detail": "fixture"
39
+ }
40
+ }
41
+ ],
42
+ "applicableRules": [
43
+ {
44
+ "id": "R1",
45
+ "severity": "high"
46
+ },
47
+ {
48
+ "id": "R2",
49
+ "severity": "low"
50
+ }
51
+ ],
52
+ "policy": "standard",
53
+ "now": "2026-10-22T12:00:00Z"
54
+ },
55
+ "expectedError": "observedAt.*20261022T110000Z"
56
+ }