eval-quality 2.0.0 → 3.1.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 (45) hide show
  1. package/README.md +4 -1
  2. package/dist/application/index.d.ts +4 -0
  3. package/dist/application/index.js +2 -0
  4. package/dist/core/compile/compile.js +6 -1
  5. package/dist/core/compile/schema-version.d.ts +15 -2
  6. package/dist/core/compile/schema-version.js +11 -3
  7. package/dist/core/emit/emit.js +4 -2
  8. package/dist/core/preflight/plan.js +15 -0
  9. package/dist/core/preflight/reduce.d.ts +1 -1
  10. package/dist/core/preflight/reduce.js +5 -2
  11. package/dist/core/schemas/evaluator-configuration.d.ts +9 -0
  12. package/dist/core/schemas/evaluator-configuration.js +9 -0
  13. package/dist/core/schemas/evidence-artifact.d.ts +9 -0
  14. package/dist/core/schemas/evidence-artifact.js +9 -0
  15. package/dist/core/schemas/isolation-manifest.d.ts +18 -0
  16. package/dist/core/schemas/isolation-manifest.js +18 -0
  17. package/dist/core/schemas/preflight-verdict.d.ts +9 -0
  18. package/dist/core/schemas/preflight-verdict.js +9 -0
  19. package/dist/core/schemas/private-artifact-manifest.d.ts +10 -0
  20. package/dist/core/schemas/private-artifact-manifest.js +10 -0
  21. package/dist/core/schemas/probe.d.ts +41 -0
  22. package/dist/core/schemas/probe.js +43 -0
  23. package/dist/core/schemas/scoring-policy.d.ts +11 -0
  24. package/dist/core/schemas/scoring-policy.js +11 -0
  25. package/dist/core/schemas/sealed-evaluator-brief.d.ts +12 -0
  26. package/dist/core/schemas/sealed-evaluator-brief.js +12 -0
  27. package/dist/core/schemas/sealed-run-record.d.ts +11 -0
  28. package/dist/core/schemas/sealed-run-record.js +11 -0
  29. package/dist/core/score/score.d.ts +1 -1
  30. package/dist/core/score/score.js +23 -0
  31. package/dist/core/seal/seal.js +4 -5
  32. package/dist/gates/audit-lockfile-age.mjs +295 -0
  33. package/dist/gates/check-dependency-direction.js +303 -0
  34. package/dist/gates/check-licenses.mjs +305 -0
  35. package/dist/gates/dependency-direction.js +555 -0
  36. package/dist/gates/discover-source-files.js +44 -0
  37. package/dist/gates/gate-config.js +251 -0
  38. package/dist/gates/gates-cli.js +410 -0
  39. package/dist/gates/lineage-ownership.js +364 -0
  40. package/dist/gates/package-boundary.js +388 -0
  41. package/dist/gates/token-scan.js +203 -0
  42. package/dist/index.d.ts +11 -1
  43. package/dist/index.js +20 -1
  44. package/dist/testing/probe-conformance.d.ts +23 -18
  45. package/package.json +20 -8
@@ -3,29 +3,34 @@
3
3
  * mechanism. The subject supplies its policy and one request per denial,
4
4
  * since only it knows how its own interface-to-target mapping is wired.
5
5
  *
6
- * `runEnvironmentProbePortConformance` is the `api` arm: thirteen assertions,
7
- * every scenario HTTP (an authorized target reached, an anomalous status read
8
- * as an observation, an unmapped interface, four denied address classes, a
9
- * method, a scheme, a redirect revalidated and refused, and three caps).
10
- * `runCommandLineProbeConformance` is the `cli` arm: ten, over an authorized
11
- * invocation, a non-zero exit read as an observation, an unmapped interface, an
12
- * unmapped executable, an unauthorized subcommand path, an unpermitted
13
- * environment key, a shell-metacharacter argument proven to reach the process
14
- * as one literal token rather than a shell expansion, a declared artifact
15
- * captured, and both caps.
16
- * `runMcpProbeConformance` is the `mcp` arm: eight, over an authorized tool
17
- * call, a tool-reported error read as an observation, an unmapped interface, an
18
- * unauthorized tool, a declared argument proven to cross the JSON-RPC frame
19
- * unchanged, the structured result the operation's descriptor describes, and
20
- * both caps.
6
+ * `runEnvironmentProbePortConformance` is the `api` arm: thirteen of its own
7
+ * beside the six shared, which is what `CONFORMANCE_OUTCOME_COUNTS` declares
8
+ * for `environment-probe`. Every scenario is HTTP: an authorized target
9
+ * reached, an anomalous status read as an observation, an unmapped interface,
10
+ * four denied address classes, a method, a scheme, a redirect revalidated and
11
+ * refused, and three caps.
12
+ * `runCommandLineProbeConformance` is the `cli` arm: ten of its own beside
13
+ * the six shared, which is what `CONFORMANCE_OUTCOME_COUNTS` declares for
14
+ * `command-probe`. They run over an authorized invocation, a non-zero exit
15
+ * read as an observation, an unmapped interface, an unmapped executable, an
16
+ * unauthorized subcommand path, an unpermitted environment key, a
17
+ * shell-metacharacter argument proven to reach the process as one literal
18
+ * token rather than a shell expansion, a declared artifact captured, and both
19
+ * caps.
20
+ * `runMcpProbeConformance` is the `mcp` arm: eight of its own beside the six
21
+ * shared, which is what `CONFORMANCE_OUTCOME_COUNTS` declares for
22
+ * `mcp-probe`. They run over an authorized tool call, a tool-reported error
23
+ * read as an observation, an unmapped interface, an unauthorized tool, a
24
+ * declared argument proven to cross the JSON-RPC frame unchanged, the
25
+ * structured result the operation's descriptor describes, and both caps.
21
26
  *
22
27
  * Every field an authorization scopes owes a denial, which is the largest term
23
28
  * in the three counts: an HTTP authorization scopes the interface, four
24
29
  * address classes, the method and the scheme; a command authorization the
25
30
  * interface, the executable, the subcommand path and the permitted environment
26
- * keys; a tool-server authorization the interface and the tool. Each arm then adds the caps its
27
- * mechanism can be made to exceed and the answers it has to read as
28
- * observations.
31
+ * keys; a tool-server authorization the interface and the tool. Each arm then
32
+ * adds the caps its mechanism can be made to exceed and the answers it has to
33
+ * read as observations.
29
34
  *
30
35
  * The arms are separate functions rather than one, because their subjects need
31
36
  * disjoint fixtures (an HTTP redirect chain has no command analogue, and a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eval-quality",
3
- "version": "2.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Compile disciplined Behavioral Evaluation Contracts and score their ability to catch known defects.",
5
5
  "author": "Murat Ozcan",
6
6
  "license": "Apache-2.0",
@@ -9,7 +9,8 @@
9
9
  "module": "dist/index.js",
10
10
  "types": "dist/index.d.ts",
11
11
  "bin": {
12
- "eval-quality": "dist/cli/main.js"
12
+ "eval-quality": "dist/cli/main.js",
13
+ "eval-quality-gates": "dist/gates/gates-cli.js"
13
14
  },
14
15
  "type": "module",
15
16
  "keywords": [
@@ -65,7 +66,7 @@
65
66
  },
66
67
  "scripts": {
67
68
  "hooks:install": "husky",
68
- "build": "tsc -p tsconfig-build.json",
69
+ "build": "tsc -p tsconfig-build.json && tsc -p tsconfig-gates.json",
69
70
  "clean": "rm -rf dist",
70
71
  "typecheck": "tsc --noEmit -p tsconfig.json",
71
72
  "lint": "biome check .",
@@ -93,14 +94,17 @@
93
94
  "check:ad33-table": "node scripts/check-ad33-table.ts",
94
95
  "generate:ad21-table": "node scripts/generate-ad21-table.ts",
95
96
  "check:ad21-table": "node scripts/check-ad21-table.ts",
96
- "check:layers": "node scripts/check-dependency-direction.ts",
97
- "check:lineage": "node scripts/check-lineage-ownership.ts",
98
- "check:boundary": "node scripts/check-package-boundary.ts",
97
+ "check:layers": "node scripts/gates-cli.ts dependency-direction",
98
+ "check:lineage": "node scripts/gates-cli.ts field-ownership",
99
+ "check:boundary": "node scripts/gates-cli.ts package-boundary",
99
100
  "generate:dev-corpus": "node scripts/generate-dev-corpus.ts",
100
101
  "check:corpus": "node scripts/check-dev-corpus.ts",
101
102
  "generate:worked-example": "node scripts/generate-worked-example.ts",
102
103
  "check:worked-example": "node scripts/check-worked-example.ts",
103
- "check:website-deps": "node scripts/audit-lockfile-age.mjs --lockfile website/package-lock.json && node scripts/check-licenses.mjs --lockfile website/package-lock.json",
104
+ "generate:version": "node scripts/generate-version.ts",
105
+ "check:version": "node scripts/check-version.ts",
106
+ "check:lockfile-age": "node dist/gates/gates-cli.js lockfile-age",
107
+ "check:licences": "node scripts/gates-cli.ts licences",
104
108
  "check:shareable": "node scripts/check-shareable.mjs",
105
109
  "bench:digest": "node scripts/bench-digest.ts",
106
110
  "docs:dev": "npm --prefix website run dev",
@@ -112,13 +116,21 @@
112
116
  "release:major": "gh workflow run publish.yml --ref main -f bump=major",
113
117
  "release:prepare": "node scripts/release-prepare.mjs",
114
118
  "release:publish": "gh workflow run publish.yml --ref main -f bump=none",
115
- "validate": "npm run build && npm run typecheck && npm run lint && npm run check:docs && npm run check:doc-invocations && npm run check:shareable && npm run lint:spine && npm run check:vectors && npm run check:schemas && npm run check:ad5-registry && npm run check:ad28-registry && npm run check:ad31-table && npm run check:ad33-table && npm run check:ad21-table && npm run check:layers && npm run check:lineage && npm run check:boundary && npm run check:corpus && npm run check:doc-counts && npm run check:doc-claims && npm run check:worked-example && npm run check:website-deps && npm run test:coverage",
119
+ "validate": "npm run build && npm run typecheck && npm run lint && npm run check:docs && npm run check:doc-invocations && npm run check:shareable && npm run lint:spine && npm run check:vectors && npm run check:schemas && npm run check:ad5-registry && npm run check:ad28-registry && npm run check:ad31-table && npm run check:ad33-table && npm run check:ad21-table && npm run check:layers && npm run check:lineage && npm run check:boundary && npm run check:corpus && npm run check:doc-counts && npm run check:doc-claims && npm run check:worked-example && npm run check:version && npm run check:lockfile-age && npm run check:licences && npm run test:coverage",
116
120
  "prepack": "npm run clean && npm run build",
117
121
  "prepublishOnly": "node scripts/assert-publish-authorized.mjs"
118
122
  },
119
123
  "dependencies": {
120
124
  "zod": "4.4.3"
121
125
  },
126
+ "peerDependencies": {
127
+ "typescript": ">=5.7.0"
128
+ },
129
+ "peerDependenciesMeta": {
130
+ "typescript": {
131
+ "optional": true
132
+ }
133
+ },
122
134
  "devDependencies": {
123
135
  "@biomejs/biome": "2.5.10",
124
136
  "@types/node": "22.20.1",