dsh-standards 1.3.0 → 1.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/40-checker/scripts/build-sidecar.mjs +238 -8
- package/40-checker/src/author-cli.mjs +274 -7
- package/40-checker/src/author-report.mjs +14 -3
- package/40-checker/src/bundle-static.mjs +181 -0
- package/40-checker/src/cli.mjs +27 -3
- package/40-checker/src/client-shape.mjs +33 -3
- package/40-checker/src/declarations.mjs +53 -8
- package/40-checker/src/index.mjs +3 -1
- package/40-checker/src/manifest.mjs +87 -14
- package/40-checker/src/remediation.mjs +109 -8
- package/40-checker/src/report.mjs +83 -7
- package/40-checker/src/semver.mjs +112 -65
- package/40-checker/src/util.mjs +51 -8
- package/CHANGELOG.md +27 -0
- package/README.md +28 -16
- package/docs/coverage.md +82 -0
- package/package.json +1 -1
- package/spec/coverage-contract.md +100 -0
- package/spec/dsc-clauses.json +766 -0
- package/spec/examples/boost-card.example.json +15 -0
- package/spec/examples/flow-evidence.example.json +113 -0
- package/spec/remediation.json +54 -54
- package/spec/schemas/boost-card.schema.json +107 -0
- package/spec/schemas/conformance.schema.json +848 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/PerryLink/dsh-standards/spec/schemas/boost-card.schema.json",
|
|
4
|
+
"title": "DSH BOOST evidence card (dsh-boost-card/1)",
|
|
5
|
+
"description": "One evidence card per practice, per plugin. These are exactly the thirteen fields `40-checker/scripts/level-audit.mjs` requires (BOOST_CARD_FIELDS); a missing or malformed field downgrades the practice to not-measured. `expiresAt` must not precede `generatedAt`, and a past `expiresAt` makes the card stale; both rules need the run date, so they live in level-audit rather than in this schema. `recordHash` is sha256 over the card JSON without that field; the validator checks the shape, a reviewer recomputes it. The card may sit under `evidenceCard` or as an object under `evidence` in the LEV evidence file.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"subject",
|
|
10
|
+
"host",
|
|
11
|
+
"method",
|
|
12
|
+
"scope",
|
|
13
|
+
"command",
|
|
14
|
+
"result",
|
|
15
|
+
"negativeControl",
|
|
16
|
+
"generatedAt",
|
|
17
|
+
"expiresAt",
|
|
18
|
+
"recordHash",
|
|
19
|
+
"claimLevel",
|
|
20
|
+
"issuer",
|
|
21
|
+
"selfAssessed"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"subject": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"description": "What was measured, as name@version. Not the repository name."
|
|
28
|
+
},
|
|
29
|
+
"host": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1,
|
|
32
|
+
"description": "DSH / Cordis / Node versions and the platform, for example \"dsh 0.2.2-alpha.3 / cordis 4.0.6-alpha.2 / node 24.9 / linux-x64\"."
|
|
33
|
+
},
|
|
34
|
+
"method": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"description": "How it was measured, including the run count or comparator and any caveat such as single-run."
|
|
38
|
+
},
|
|
39
|
+
"scope": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"minLength": 1,
|
|
42
|
+
"description": "Which LEV practice and which part of the plugin, for example \"LEV-6 stable prefix / assembly\"."
|
|
43
|
+
},
|
|
44
|
+
"command": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"description": "The exact command that produced the result."
|
|
48
|
+
},
|
|
49
|
+
"result": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"description": "Numbers, before -> after. No adjectives."
|
|
53
|
+
},
|
|
54
|
+
"negativeControl": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"description": "The same measurement with the practice disabled or the plugin off; without it a number is not evidence."
|
|
58
|
+
},
|
|
59
|
+
"generatedAt": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"format": "date",
|
|
62
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
|
|
63
|
+
"description": "The day the measurement was run (YYYY-MM-DD)."
|
|
64
|
+
},
|
|
65
|
+
"expiresAt": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"format": "date",
|
|
68
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
|
|
69
|
+
"description": "When the measurement stops being current (YYYY-MM-DD), not before generatedAt. 180 days is a reasonable cap."
|
|
70
|
+
},
|
|
71
|
+
"recordHash": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^sha256:[0-9a-f]{64}$",
|
|
74
|
+
"description": "sha256 over the canonical card JSON without this field."
|
|
75
|
+
},
|
|
76
|
+
"claimLevel": {
|
|
77
|
+
"enum": ["self-reported", "self-assessed", "host-reviewed", "independent", "reference"],
|
|
78
|
+
"description": "Be honest; anything stronger than self-reported is not self-declared."
|
|
79
|
+
},
|
|
80
|
+
"issuer": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"description": "Who ran it: author, an org, or a CI job."
|
|
84
|
+
},
|
|
85
|
+
"selfAssessed": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "True only when the author ran and judged the measurement."
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"examples": [
|
|
91
|
+
{
|
|
92
|
+
"subject": "@acme/dsh-hello@0.1.0",
|
|
93
|
+
"host": "dsh 0.2.2-alpha.3 / cordis 4.0.6-alpha.2 / node 24.9 / linux-x64",
|
|
94
|
+
"method": "single run: startup, reload, and tokens per turn; nonce arm as negative control",
|
|
95
|
+
"scope": "LEV-6 stable prefix / assembly - hello example tool and prompt declarations",
|
|
96
|
+
"command": "node bench/hello.mjs",
|
|
97
|
+
"result": "startup 180 -> 150 ms (-17%); reload 900 -> 600 ms (-33%); tokens 1200 -> 900/turn (-25%); loc 420 -> 380",
|
|
98
|
+
"negativeControl": "same bench with the nonce arm: prefix reuse 0%, first divergence at system byte 0",
|
|
99
|
+
"generatedAt": "2026-11-06",
|
|
100
|
+
"expiresAt": "2027-05-06",
|
|
101
|
+
"recordHash": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
|
|
102
|
+
"claimLevel": "self-assessed",
|
|
103
|
+
"issuer": "author",
|
|
104
|
+
"selfAssessed": true
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|