eval-quality 3.0.0 → 3.2.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 (43) 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/emit/emit.js +4 -2
  5. package/dist/core/preflight/reduce.d.ts +1 -1
  6. package/dist/core/preflight/reduce.js +5 -2
  7. package/dist/core/schemas/evaluator-configuration.d.ts +9 -0
  8. package/dist/core/schemas/evaluator-configuration.js +9 -0
  9. package/dist/core/schemas/evidence-artifact.d.ts +9 -0
  10. package/dist/core/schemas/evidence-artifact.js +9 -0
  11. package/dist/core/schemas/isolation-manifest.d.ts +18 -0
  12. package/dist/core/schemas/isolation-manifest.js +18 -0
  13. package/dist/core/schemas/preflight-verdict.d.ts +9 -0
  14. package/dist/core/schemas/preflight-verdict.js +9 -0
  15. package/dist/core/schemas/private-artifact-manifest.d.ts +10 -0
  16. package/dist/core/schemas/private-artifact-manifest.js +10 -0
  17. package/dist/core/schemas/scoring-policy.d.ts +11 -0
  18. package/dist/core/schemas/scoring-policy.js +11 -0
  19. package/dist/core/schemas/sealed-evaluator-brief.d.ts +12 -0
  20. package/dist/core/schemas/sealed-evaluator-brief.js +12 -0
  21. package/dist/core/schemas/sealed-run-record.d.ts +11 -0
  22. package/dist/core/schemas/sealed-run-record.js +11 -0
  23. package/dist/core/seal/seal.js +4 -5
  24. package/dist/gates/audit-lockfile-age.mjs +392 -0
  25. package/dist/gates/check-dependency-direction.js +303 -0
  26. package/dist/gates/check-doc-claims.js +1012 -0
  27. package/dist/gates/check-doc-counts.js +408 -0
  28. package/dist/gates/check-doc-invocations.mjs +618 -0
  29. package/dist/gates/check-licenses.mjs +378 -0
  30. package/dist/gates/consumer-pattern.js +104 -0
  31. package/dist/gates/dependency-direction.js +555 -0
  32. package/dist/gates/discover-source-files.js +44 -0
  33. package/dist/gates/gate-config.js +415 -0
  34. package/dist/gates/gates-cli.js +607 -0
  35. package/dist/gates/lineage-ownership.js +364 -0
  36. package/dist/gates/module-value.js +187 -0
  37. package/dist/gates/package-boundary.js +277 -0
  38. package/dist/gates/scanned-paths.js +110 -0
  39. package/dist/gates/token-scan.js +203 -0
  40. package/dist/index.d.ts +11 -1
  41. package/dist/index.js +20 -1
  42. package/dist/testing/probe-conformance.d.ts +23 -18
  43. package/package.json +24 -11
@@ -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": "3.0.0",
3
+ "version": "3.2.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,16 +66,16 @@
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 .",
72
73
  "lint:fix": "biome check --write .",
73
74
  "format": "biome format --write .",
74
75
  "check:docs": "node scripts/check-docs.mjs",
75
- "check:doc-invocations": "node scripts/check-doc-invocations.mjs",
76
- "check:doc-counts": "node scripts/check-doc-counts.ts",
77
- "check:doc-claims": "node scripts/check-doc-claims.ts",
76
+ "check:doc-invocations": "node scripts/gates-cli.ts doc-invocations",
77
+ "check:doc-counts": "node scripts/gates-cli.ts doc-counts",
78
+ "check:doc-claims": "node scripts/gates-cli.ts doc-claims",
78
79
  "lint:spine": "python3 scripts/spine-lint/lint_spine.py --registry-ad 5 --workspace-root . --fail-on high",
79
80
  "test:spine-lint": "uv run --with pytest pytest scripts/spine-lint/tests -q",
80
81
  "build:shareable": "node scripts/build-shareable.mjs",
@@ -93,14 +94,18 @@
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
+ "generate:lockfile-age-cache": "node scripts/generate-lockfile-age-cache.ts",
107
+ "check:lockfile-age": "node dist/gates/gates-cli.js lockfile-age",
108
+ "check:licences": "node scripts/gates-cli.ts licences",
104
109
  "check:shareable": "node scripts/check-shareable.mjs",
105
110
  "bench:digest": "node scripts/bench-digest.ts",
106
111
  "docs:dev": "npm --prefix website run dev",
@@ -112,13 +117,21 @@
112
117
  "release:major": "gh workflow run publish.yml --ref main -f bump=major",
113
118
  "release:prepare": "node scripts/release-prepare.mjs",
114
119
  "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",
120
+ "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
121
  "prepack": "npm run clean && npm run build",
117
122
  "prepublishOnly": "node scripts/assert-publish-authorized.mjs"
118
123
  },
119
124
  "dependencies": {
120
125
  "zod": "4.4.3"
121
126
  },
127
+ "peerDependencies": {
128
+ "typescript": ">=5.7.0"
129
+ },
130
+ "peerDependenciesMeta": {
131
+ "typescript": {
132
+ "optional": true
133
+ }
134
+ },
122
135
  "devDependencies": {
123
136
  "@biomejs/biome": "2.5.10",
124
137
  "@types/node": "22.20.1",