critical-gate 2.0.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.
- package/LICENSE +21 -0
- package/README.md +240 -0
- package/dist/cli.d.ts +20 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +224 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/critical-gate-config.d.ts +21 -0
- package/dist/config/critical-gate-config.d.ts.map +1 -0
- package/dist/config/critical-gate-config.js +81 -0
- package/dist/config/critical-gate-config.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/detectors/api-surface-detector.d.ts +3 -0
- package/dist/detectors/api-surface-detector.d.ts.map +1 -0
- package/dist/detectors/api-surface-detector.js +111 -0
- package/dist/detectors/api-surface-detector.js.map +1 -0
- package/dist/detectors/blast-radius-detector.d.ts +3 -0
- package/dist/detectors/blast-radius-detector.d.ts.map +1 -0
- package/dist/detectors/blast-radius-detector.js +90 -0
- package/dist/detectors/blast-radius-detector.js.map +1 -0
- package/dist/detectors/config-change-detector.d.ts +3 -0
- package/dist/detectors/config-change-detector.d.ts.map +1 -0
- package/dist/detectors/config-change-detector.js +68 -0
- package/dist/detectors/config-change-detector.js.map +1 -0
- package/dist/detectors/dependency-detector.d.ts +3 -0
- package/dist/detectors/dependency-detector.d.ts.map +1 -0
- package/dist/detectors/dependency-detector.js +98 -0
- package/dist/detectors/dependency-detector.js.map +1 -0
- package/dist/detectors/existing-solution-detector.d.ts +3 -0
- package/dist/detectors/existing-solution-detector.d.ts.map +1 -0
- package/dist/detectors/existing-solution-detector.js +87 -0
- package/dist/detectors/existing-solution-detector.js.map +1 -0
- package/dist/detectors/expected-companions-detector.d.ts +3 -0
- package/dist/detectors/expected-companions-detector.d.ts.map +1 -0
- package/dist/detectors/expected-companions-detector.js +65 -0
- package/dist/detectors/expected-companions-detector.js.map +1 -0
- package/dist/detectors/index.d.ts +17 -0
- package/dist/detectors/index.d.ts.map +1 -0
- package/dist/detectors/index.js +16 -0
- package/dist/detectors/index.js.map +1 -0
- package/dist/detectors/intent-verification-detector.d.ts +3 -0
- package/dist/detectors/intent-verification-detector.d.ts.map +1 -0
- package/dist/detectors/intent-verification-detector.js +43 -0
- package/dist/detectors/intent-verification-detector.js.map +1 -0
- package/dist/detectors/pattern-violation-detector.d.ts +3 -0
- package/dist/detectors/pattern-violation-detector.d.ts.map +1 -0
- package/dist/detectors/pattern-violation-detector.js +83 -0
- package/dist/detectors/pattern-violation-detector.js.map +1 -0
- package/dist/detectors/repository-intelligence-detector.d.ts +3 -0
- package/dist/detectors/repository-intelligence-detector.d.ts.map +1 -0
- package/dist/detectors/repository-intelligence-detector.js +51 -0
- package/dist/detectors/repository-intelligence-detector.js.map +1 -0
- package/dist/detectors/rewrite-detector.d.ts +3 -0
- package/dist/detectors/rewrite-detector.d.ts.map +1 -0
- package/dist/detectors/rewrite-detector.js +61 -0
- package/dist/detectors/rewrite-detector.js.map +1 -0
- package/dist/detectors/runner.d.ts +9 -0
- package/dist/detectors/runner.d.ts.map +1 -0
- package/dist/detectors/runner.js +96 -0
- package/dist/detectors/runner.js.map +1 -0
- package/dist/detectors/scope-detector.d.ts +3 -0
- package/dist/detectors/scope-detector.d.ts.map +1 -0
- package/dist/detectors/scope-detector.js +138 -0
- package/dist/detectors/scope-detector.js.map +1 -0
- package/dist/detectors/secret-path-detector.d.ts +5 -0
- package/dist/detectors/secret-path-detector.d.ts.map +1 -0
- package/dist/detectors/secret-path-detector.js +150 -0
- package/dist/detectors/secret-path-detector.js.map +1 -0
- package/dist/detectors/test-weakening-detector.d.ts +3 -0
- package/dist/detectors/test-weakening-detector.d.ts.map +1 -0
- package/dist/detectors/test-weakening-detector.js +91 -0
- package/dist/detectors/test-weakening-detector.js.map +1 -0
- package/dist/detectors/types.d.ts +15 -0
- package/dist/detectors/types.d.ts.map +1 -0
- package/dist/detectors/types.js +2 -0
- package/dist/detectors/types.js.map +1 -0
- package/dist/detectors/utility-reinvention-detector.d.ts +3 -0
- package/dist/detectors/utility-reinvention-detector.d.ts.map +1 -0
- package/dist/detectors/utility-reinvention-detector.js +78 -0
- package/dist/detectors/utility-reinvention-detector.js.map +1 -0
- package/dist/diff/git-diff-reader.d.ts +24 -0
- package/dist/diff/git-diff-reader.d.ts.map +1 -0
- package/dist/diff/git-diff-reader.js +81 -0
- package/dist/diff/git-diff-reader.js.map +1 -0
- package/dist/diff/index.d.ts +4 -0
- package/dist/diff/index.d.ts.map +1 -0
- package/dist/diff/index.js +4 -0
- package/dist/diff/index.js.map +1 -0
- package/dist/diff/parse-unified-diff.d.ts +3 -0
- package/dist/diff/parse-unified-diff.d.ts.map +1 -0
- package/dist/diff/parse-unified-diff.js +153 -0
- package/dist/diff/parse-unified-diff.js.map +1 -0
- package/dist/diff/path-classifier.d.ts +5 -0
- package/dist/diff/path-classifier.d.ts.map +1 -0
- package/dist/diff/path-classifier.js +86 -0
- package/dist/diff/path-classifier.js.map +1 -0
- package/dist/editor/diagnostics.d.ts +35 -0
- package/dist/editor/diagnostics.d.ts.map +1 -0
- package/dist/editor/diagnostics.js +55 -0
- package/dist/editor/diagnostics.js.map +1 -0
- package/dist/editor/index.d.ts +3 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +2 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/intent/index.d.ts +5 -0
- package/dist/intent/index.d.ts.map +1 -0
- package/dist/intent/index.js +5 -0
- package/dist/intent/index.js.map +1 -0
- package/dist/intent/intent-core.d.ts +4 -0
- package/dist/intent/intent-core.d.ts.map +1 -0
- package/dist/intent/intent-core.js +58 -0
- package/dist/intent/intent-core.js.map +1 -0
- package/dist/intent/intent-model.d.ts +18 -0
- package/dist/intent/intent-model.d.ts.map +1 -0
- package/dist/intent/intent-model.js +74 -0
- package/dist/intent/intent-model.js.map +1 -0
- package/dist/intent/observed-actions.d.ts +17 -0
- package/dist/intent/observed-actions.d.ts.map +1 -0
- package/dist/intent/observed-actions.js +128 -0
- package/dist/intent/observed-actions.js.map +1 -0
- package/dist/intent/scope-expansion-score.d.ts +13 -0
- package/dist/intent/scope-expansion-score.d.ts.map +1 -0
- package/dist/intent/scope-expansion-score.js +87 -0
- package/dist/intent/scope-expansion-score.js.map +1 -0
- package/dist/intent/task-analysis.d.ts +18 -0
- package/dist/intent/task-analysis.d.ts.map +1 -0
- package/dist/intent/task-analysis.js +46 -0
- package/dist/intent/task-analysis.js.map +1 -0
- package/dist/knowledge/cache.d.ts +29 -0
- package/dist/knowledge/cache.d.ts.map +1 -0
- package/dist/knowledge/cache.js +85 -0
- package/dist/knowledge/cache.js.map +1 -0
- package/dist/knowledge/graph.d.ts +16 -0
- package/dist/knowledge/graph.d.ts.map +1 -0
- package/dist/knowledge/graph.js +139 -0
- package/dist/knowledge/graph.js.map +1 -0
- package/dist/knowledge/history-index.d.ts +20 -0
- package/dist/knowledge/history-index.d.ts.map +1 -0
- package/dist/knowledge/history-index.js +117 -0
- package/dist/knowledge/history-index.js.map +1 -0
- package/dist/knowledge/index.d.ts +9 -0
- package/dist/knowledge/index.d.ts.map +1 -0
- package/dist/knowledge/index.js +8 -0
- package/dist/knowledge/index.js.map +1 -0
- package/dist/knowledge/pattern-index.d.ts +14 -0
- package/dist/knowledge/pattern-index.d.ts.map +1 -0
- package/dist/knowledge/pattern-index.js +94 -0
- package/dist/knowledge/pattern-index.js.map +1 -0
- package/dist/knowledge/provider.d.ts +18 -0
- package/dist/knowledge/provider.d.ts.map +1 -0
- package/dist/knowledge/provider.js +83 -0
- package/dist/knowledge/provider.js.map +1 -0
- package/dist/knowledge/solution-index.d.ts +17 -0
- package/dist/knowledge/solution-index.d.ts.map +1 -0
- package/dist/knowledge/solution-index.js +170 -0
- package/dist/knowledge/solution-index.js.map +1 -0
- package/dist/knowledge/symbol-index.d.ts +4 -0
- package/dist/knowledge/symbol-index.d.ts.map +1 -0
- package/dist/knowledge/symbol-index.js +11 -0
- package/dist/knowledge/symbol-index.js.map +1 -0
- package/dist/knowledge/types.d.ts +100 -0
- package/dist/knowledge/types.d.ts.map +1 -0
- package/dist/knowledge/types.js +2 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/llm/artifact.d.ts +6 -0
- package/dist/llm/artifact.d.ts.map +1 -0
- package/dist/llm/artifact.js +86 -0
- package/dist/llm/artifact.js.map +1 -0
- package/dist/llm/cache.d.ts +10 -0
- package/dist/llm/cache.d.ts.map +1 -0
- package/dist/llm/cache.js +24 -0
- package/dist/llm/cache.js.map +1 -0
- package/dist/llm/index.d.ts +8 -0
- package/dist/llm/index.d.ts.map +1 -0
- package/dist/llm/index.js +7 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/prompt.d.ts +7 -0
- package/dist/llm/prompt.d.ts.map +1 -0
- package/dist/llm/prompt.js +23 -0
- package/dist/llm/prompt.js.map +1 -0
- package/dist/llm/provider.d.ts +4 -0
- package/dist/llm/provider.d.ts.map +1 -0
- package/dist/llm/provider.js +43 -0
- package/dist/llm/provider.js.map +1 -0
- package/dist/llm/redaction.d.ts +3 -0
- package/dist/llm/redaction.d.ts.map +1 -0
- package/dist/llm/redaction.js +22 -0
- package/dist/llm/redaction.js.map +1 -0
- package/dist/llm/types.d.ts +89 -0
- package/dist/llm/types.d.ts.map +1 -0
- package/dist/llm/types.js +2 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/reporters/index.d.ts +8 -0
- package/dist/reporters/index.d.ts.map +1 -0
- package/dist/reporters/index.js +21 -0
- package/dist/reporters/index.js.map +1 -0
- package/dist/reporters/json-reporter.d.ts +3 -0
- package/dist/reporters/json-reporter.d.ts.map +1 -0
- package/dist/reporters/json-reporter.js +4 -0
- package/dist/reporters/json-reporter.js.map +1 -0
- package/dist/reporters/markdown-reporter.d.ts +3 -0
- package/dist/reporters/markdown-reporter.d.ts.map +1 -0
- package/dist/reporters/markdown-reporter.js +76 -0
- package/dist/reporters/markdown-reporter.js.map +1 -0
- package/dist/reporters/repair-reporter.d.ts +3 -0
- package/dist/reporters/repair-reporter.d.ts.map +1 -0
- package/dist/reporters/repair-reporter.js +56 -0
- package/dist/reporters/repair-reporter.js.map +1 -0
- package/dist/reporters/sarif-reporter.d.ts +3 -0
- package/dist/reporters/sarif-reporter.d.ts.map +1 -0
- package/dist/reporters/sarif-reporter.js +161 -0
- package/dist/reporters/sarif-reporter.js.map +1 -0
- package/dist/repository/index.d.ts +3 -0
- package/dist/repository/index.d.ts.map +1 -0
- package/dist/repository/index.js +3 -0
- package/dist/repository/index.js.map +1 -0
- package/dist/repository/profile.d.ts +7 -0
- package/dist/repository/profile.d.ts.map +1 -0
- package/dist/repository/profile.js +6 -0
- package/dist/repository/profile.js.map +1 -0
- package/dist/repository/utility-index.d.ts +7 -0
- package/dist/repository/utility-index.d.ts.map +1 -0
- package/dist/repository/utility-index.js +6 -0
- package/dist/repository/utility-index.js.map +1 -0
- package/dist/schema/gate-result.schema.d.ts +514 -0
- package/dist/schema/gate-result.schema.d.ts.map +1 -0
- package/dist/schema/gate-result.schema.js +326 -0
- package/dist/schema/gate-result.schema.js.map +1 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +3 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/types.d.ts +136 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/types.js +2 -0
- package/dist/schema/types.js.map +1 -0
- package/package.json +51 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Critical Gate contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# Critical Gate
|
|
2
|
+
|
|
3
|
+
Critical Gate is a repository-aware diff integrity gate for AI-assisted development. It checks
|
|
4
|
+
whether an agent-produced change is acceptably scoped, justified, and safe for the repository it
|
|
5
|
+
lands in.
|
|
6
|
+
|
|
7
|
+
It is not a generic AI code reviewer. Critical Gate is an enforcement layer for the final diff: it
|
|
8
|
+
looks for evidence-backed risks such as unrelated edits, unnecessary rewrites, unjustified
|
|
9
|
+
dependencies, weakened tests, silent public API changes, hardcoded secrets, environment leaks, and
|
|
10
|
+
configuration changes without operational context.
|
|
11
|
+
|
|
12
|
+
## Why It Matters
|
|
13
|
+
|
|
14
|
+
AI coding agents can follow instructions, but instructions do not prove that the resulting diff
|
|
15
|
+
stayed inside the requested task. A change can compile and still be dangerous because it widened the
|
|
16
|
+
blast radius, changed repository contracts, or quietly weakened tests.
|
|
17
|
+
|
|
18
|
+
Critical Gate gives teams a cheap deterministic-first checkpoint before merge. The goal is to catch
|
|
19
|
+
high-risk agent failure patterns with concrete evidence and repair guidance, while keeping noise low
|
|
20
|
+
enough to run locally, in Codex loops, and in CI.
|
|
21
|
+
|
|
22
|
+
## What It Checks
|
|
23
|
+
|
|
24
|
+
Current detectors focus on TypeScript and JavaScript repositories:
|
|
25
|
+
|
|
26
|
+
- Unrelated or unexpected file changes for the task intent.
|
|
27
|
+
- Large rewrites for small requests.
|
|
28
|
+
- New dependencies without task or documentation justification.
|
|
29
|
+
- Test weakening, removed assertions, skipped tests, and weaker matchers.
|
|
30
|
+
- Hardcoded secrets, internal hosts, absolute paths, and environment-specific leaks.
|
|
31
|
+
- Silent public export/API surface changes.
|
|
32
|
+
- Build, lint, test, CI, or config changes without explanation.
|
|
33
|
+
- Unusual historical co-change patterns.
|
|
34
|
+
- Repository convention drift and utility reinvention signals.
|
|
35
|
+
|
|
36
|
+
Every finding includes severity, confidence, evidence, tags, and a repair hint that another agent or
|
|
37
|
+
developer can act on.
|
|
38
|
+
|
|
39
|
+
## Surfaces
|
|
40
|
+
|
|
41
|
+
Critical Gate has one analysis core and multiple surfaces:
|
|
42
|
+
|
|
43
|
+
- **CLI**: canonical local and scripted interface.
|
|
44
|
+
- **GitHub Action**: CI wrapper with SARIF upload support.
|
|
45
|
+
- **Codex hook**: repair-oriented stop hook for agent workflows.
|
|
46
|
+
- **VS Code extension**: Activity Bar dashboard, status bar state, Problems diagnostics, full report
|
|
47
|
+
output, evidence navigation, and repair-copy actions.
|
|
48
|
+
|
|
49
|
+
The CLI remains the source of truth. The editor and CI surfaces consume CLI output rather than
|
|
50
|
+
reimplementing detector logic.
|
|
51
|
+
|
|
52
|
+
## Quick Start From Source
|
|
53
|
+
|
|
54
|
+
Requirements:
|
|
55
|
+
|
|
56
|
+
- Node.js 22.13 or newer.
|
|
57
|
+
- pnpm 11.1.2.
|
|
58
|
+
- Git history for baseline comparisons.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone git@github.com:criticaldeveloper/critical-gate.git
|
|
62
|
+
cd critical-gate
|
|
63
|
+
pnpm install --frozen-lockfile
|
|
64
|
+
pnpm build
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Run a local check against `main`:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
node dist/cli.js check --task "Add signup validation" --base main --format markdown
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Common output formats:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
node dist/cli.js check --task "Add signup validation" --format json --output critical-gate.json
|
|
77
|
+
node dist/cli.js check --task "Add signup validation" --format sarif --output critical-gate.sarif
|
|
78
|
+
node dist/cli.js check --task "Add signup validation" --format repair
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Exit codes:
|
|
82
|
+
|
|
83
|
+
- `0`: gate passed.
|
|
84
|
+
- `1`: findings failed the configured threshold.
|
|
85
|
+
- `2`: usage or configuration error.
|
|
86
|
+
- `3`: internal error.
|
|
87
|
+
|
|
88
|
+
## Task Intent And Baselines
|
|
89
|
+
|
|
90
|
+
The task intent tells the gate what the diff is supposed to satisfy. Good task text is specific:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
node dist/cli.js check \
|
|
94
|
+
--task "Add email validation to signup form without changing authentication flow" \
|
|
95
|
+
--base origin/main \
|
|
96
|
+
--format markdown
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Avoid generic task text such as `changes` or `update code`; that gives the scope detector less
|
|
100
|
+
signal. In CI, use PR titles, issue summaries, release notes, or a composed task string from the PR
|
|
101
|
+
body.
|
|
102
|
+
|
|
103
|
+
The `--base` option should point at the merge base or target branch. If omitted, Critical Gate uses
|
|
104
|
+
its default git baseline resolution.
|
|
105
|
+
|
|
106
|
+
## GitHub Action Example
|
|
107
|
+
|
|
108
|
+
Use full history so diff and repository-intelligence detectors have enough context:
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
name: Critical Gate
|
|
112
|
+
|
|
113
|
+
on:
|
|
114
|
+
pull_request:
|
|
115
|
+
|
|
116
|
+
permissions:
|
|
117
|
+
actions: read
|
|
118
|
+
contents: read
|
|
119
|
+
pull-requests: read
|
|
120
|
+
security-events: write
|
|
121
|
+
|
|
122
|
+
jobs:
|
|
123
|
+
critical-gate:
|
|
124
|
+
runs-on: ubuntu-latest
|
|
125
|
+
steps:
|
|
126
|
+
- uses: actions/checkout@v6
|
|
127
|
+
with:
|
|
128
|
+
fetch-depth: 0
|
|
129
|
+
|
|
130
|
+
- id: critical-gate
|
|
131
|
+
uses: ./
|
|
132
|
+
continue-on-error: true
|
|
133
|
+
with:
|
|
134
|
+
task: ${{ github.event.pull_request.title }}
|
|
135
|
+
base: ${{ github.event.pull_request.base.sha }}
|
|
136
|
+
format: sarif
|
|
137
|
+
output: critical-gate.sarif
|
|
138
|
+
|
|
139
|
+
- uses: github/codeql-action/upload-sarif@v4
|
|
140
|
+
if: always() && hashFiles('critical-gate.sarif') != ''
|
|
141
|
+
with:
|
|
142
|
+
sarif_file: critical-gate.sarif
|
|
143
|
+
|
|
144
|
+
- if: steps.critical-gate.outcome == 'failure'
|
|
145
|
+
run: exit 1
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
See [docs/github-integration.md](docs/github-integration.md) for SARIF and job-summary variants.
|
|
149
|
+
|
|
150
|
+
## Codex Hook Example
|
|
151
|
+
|
|
152
|
+
Critical Gate can run as a Codex `Stop` hook so an agent receives compact repair guidance before the
|
|
153
|
+
task is considered complete.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
pnpm build
|
|
157
|
+
node dist/cli.js hook --base main
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
This repository includes `.codex/hooks.json` as a reviewable project hook example. See
|
|
161
|
+
[docs/codex-integration.md](docs/codex-integration.md) for setup and safety notes.
|
|
162
|
+
|
|
163
|
+
## VS Code Extension
|
|
164
|
+
|
|
165
|
+
Build and package the VSIX:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
pnpm package:vscode
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Install locally:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
code --install-extension artifacts/vscode/critical-gate-vscode.vsix --force
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The extension adds:
|
|
178
|
+
|
|
179
|
+
- `Critical Gate` Activity Bar view with the `Gate Runs` dashboard.
|
|
180
|
+
- `Run Gate`, `Show Report`, `Clear`, and `Settings` actions.
|
|
181
|
+
- Latest run decision, changed files, findings, Diff Cost Score, and recent runs.
|
|
182
|
+
- Problems diagnostics mapped from findings.
|
|
183
|
+
- Evidence navigation and repair-copy actions.
|
|
184
|
+
- Status bar pass/fail state.
|
|
185
|
+
- Full Markdown-style report in the `Critical Gate` output channel.
|
|
186
|
+
|
|
187
|
+
The Marketplace extension bundles the analyzer, so users do not need to clone this repository to use
|
|
188
|
+
the VS Code surface. Configure `criticalGate.cliPath` only when testing a custom local CLI build.
|
|
189
|
+
|
|
190
|
+
## Usage Guide
|
|
191
|
+
|
|
192
|
+
For a fuller walkthrough with examples, rollout advice, report interpretation, and troubleshooting,
|
|
193
|
+
read [docs/usage-guide.md](docs/usage-guide.md).
|
|
194
|
+
|
|
195
|
+
## Development
|
|
196
|
+
|
|
197
|
+
Useful commands:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pnpm verify
|
|
201
|
+
pnpm test:vscode
|
|
202
|
+
pnpm package:vscode
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
Branch and commit conventions for this repository:
|
|
206
|
+
|
|
207
|
+
- `feature/example-two` for new implementations.
|
|
208
|
+
- `bugfix/example` for fixes.
|
|
209
|
+
- Commit format:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
[branch-name]
|
|
213
|
+
|
|
214
|
+
Implementation description
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Documentation Map
|
|
218
|
+
|
|
219
|
+
- [AGENTS.md](AGENTS.md): durable instructions for Codex and other AI agents.
|
|
220
|
+
- [docs/project-brief.md](docs/project-brief.md): product thesis, users, positioning, and scope.
|
|
221
|
+
- [docs/architecture.md](docs/architecture.md): core architecture and data flow.
|
|
222
|
+
- [docs/detectors.md](docs/detectors.md): detector catalog, severities, evidence, and implementation notes.
|
|
223
|
+
- [docs/usage-guide.md](docs/usage-guide.md): practical usage examples and troubleshooting.
|
|
224
|
+
- [docs/installation.md](docs/installation.md): CLI, GitHub Action, Codex hook, and VSIX installation.
|
|
225
|
+
- [docs/editor-surface.md](docs/editor-surface.md): VS Code dashboard and diagnostics behavior.
|
|
226
|
+
- [docs/github-integration.md](docs/github-integration.md): GitHub Action, SARIF, and threshold guidance.
|
|
227
|
+
- [docs/codex-integration.md](docs/codex-integration.md): Codex hook and repair-loop guidance.
|
|
228
|
+
- [docs/versioning-policy.md](docs/versioning-policy.md): release and versioning policy.
|
|
229
|
+
- [CHANGELOG.md](CHANGELOG.md): project-level release notes.
|
|
230
|
+
|
|
231
|
+
## Project Status
|
|
232
|
+
|
|
233
|
+
The repository contains the first TypeScript CLI implementation, deterministic detectors, Codex hook
|
|
234
|
+
integration, GitHub Action integration, optional LLM explanation boundaries, and a VS Code extension
|
|
235
|
+
surface. The root CLI package is still on the alpha release line, while the VS Code extension uses
|
|
236
|
+
Marketplace-compatible numeric versions.
|
|
237
|
+
|
|
238
|
+
## License
|
|
239
|
+
|
|
240
|
+
Critical Gate is open source under the [MIT License](LICENSE).
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { type GitDiffResult } from "./index.js";
|
|
3
|
+
export declare const CLI_VERSION = "2.0.0";
|
|
4
|
+
export declare const ExitCode: {
|
|
5
|
+
readonly Pass: 0;
|
|
6
|
+
readonly FindingsFailed: 1;
|
|
7
|
+
readonly UsageError: 2;
|
|
8
|
+
readonly InternalError: 3;
|
|
9
|
+
};
|
|
10
|
+
export type ExitCode = (typeof ExitCode)[keyof typeof ExitCode];
|
|
11
|
+
interface CliIo {
|
|
12
|
+
stdout: (message: string) => void;
|
|
13
|
+
stderr: (message: string) => void;
|
|
14
|
+
writeFile: (path: string, content: string) => void;
|
|
15
|
+
now: () => Date;
|
|
16
|
+
readDiff: (baseRef?: string) => GitDiffResult;
|
|
17
|
+
}
|
|
18
|
+
export declare function main(argv?: string[], io?: CliIo): ExitCode;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,OAAO,EASL,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,QAAQ;;;;;CAKX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC;AAUhE,UAAU,KAAK;IACb,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,GAAG,EAAE,MAAM,IAAI,CAAC;IAChB,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;CAC/C;AAYD,wBAAgB,IAAI,CAAC,IAAI,WAAwB,EAAE,EAAE,QAAY,GAAG,QAAQ,CAQ3E"}
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { writeFileSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { GATE_RESULT_SCHEMA_VERSION, loadCriticalGateConfig, readGitDiff, renderReport, runDetectors, summarizeFindings, summarizeIntentVerification } from "./index.js";
|
|
6
|
+
export const CLI_VERSION = "2.0.0";
|
|
7
|
+
export const ExitCode = {
|
|
8
|
+
Pass: 0,
|
|
9
|
+
FindingsFailed: 1,
|
|
10
|
+
UsageError: 2,
|
|
11
|
+
InternalError: 3
|
|
12
|
+
};
|
|
13
|
+
const defaultIo = {
|
|
14
|
+
stdout: (message) => console.log(message),
|
|
15
|
+
stderr: (message) => console.error(message),
|
|
16
|
+
writeFile: (path, content) => writeFileSync(path, content, "utf8"),
|
|
17
|
+
now: () => new Date(),
|
|
18
|
+
readDiff: (baseRef) => readGitDiff({ baseRef })
|
|
19
|
+
};
|
|
20
|
+
export function main(argv = process.argv.slice(2), io = defaultIo) {
|
|
21
|
+
try {
|
|
22
|
+
return runCli(argv, io);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
const message = error instanceof Error ? error.message : "Unknown internal error";
|
|
26
|
+
io.stderr(`critical-gate: ${message}`);
|
|
27
|
+
return ExitCode.InternalError;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function runCli(argv, io) {
|
|
31
|
+
if (argv.includes("--version")) {
|
|
32
|
+
io.stdout(`critical-gate ${CLI_VERSION}`);
|
|
33
|
+
return ExitCode.Pass;
|
|
34
|
+
}
|
|
35
|
+
if (argv[0] === "--help" || argv[0] === "-h") {
|
|
36
|
+
io.stdout(getHelpText());
|
|
37
|
+
return ExitCode.Pass;
|
|
38
|
+
}
|
|
39
|
+
const [command = "check", ...args] = argv;
|
|
40
|
+
if (!isCommandName(command)) {
|
|
41
|
+
io.stderr(`Unknown command: ${command}`);
|
|
42
|
+
io.stderr("Run critical-gate --help for usage.");
|
|
43
|
+
return ExitCode.UsageError;
|
|
44
|
+
}
|
|
45
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
46
|
+
io.stdout(command === "hook" ? getHookHelpText() : getCheckHelpText());
|
|
47
|
+
return ExitCode.Pass;
|
|
48
|
+
}
|
|
49
|
+
const parsed = parseCheckArgs(args, command);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
io.stderr(parsed.error);
|
|
52
|
+
io.stderr("Run critical-gate check --help for usage.");
|
|
53
|
+
return ExitCode.UsageError;
|
|
54
|
+
}
|
|
55
|
+
const diff = io.readDiff(parsed.options.base);
|
|
56
|
+
const result = createGateResult(parsed.options, io.now(), diff);
|
|
57
|
+
const rendered = command === "hook"
|
|
58
|
+
? renderReport(result.summary.decision === "pass" ? { ...result, findings: [] } : result, "repair")
|
|
59
|
+
: renderReport(result, parsed.options.format);
|
|
60
|
+
if (parsed.options.output !== undefined) {
|
|
61
|
+
io.writeFile(parsed.options.output, rendered);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
io.stdout(rendered);
|
|
65
|
+
}
|
|
66
|
+
return result.summary.decision === "fail" ? ExitCode.FindingsFailed : ExitCode.Pass;
|
|
67
|
+
}
|
|
68
|
+
function parseCheckArgs(args, command) {
|
|
69
|
+
const options = {
|
|
70
|
+
format: "markdown",
|
|
71
|
+
strict: false
|
|
72
|
+
};
|
|
73
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
74
|
+
const arg = args[index];
|
|
75
|
+
if (arg === "--strict") {
|
|
76
|
+
options.strict = true;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (arg === "--task" || arg === "--base" || arg === "--format" || arg === "--output") {
|
|
80
|
+
const value = args[index + 1];
|
|
81
|
+
if (value === undefined || value.startsWith("--")) {
|
|
82
|
+
return { ok: false, error: `Missing value for ${arg}.` };
|
|
83
|
+
}
|
|
84
|
+
index += 1;
|
|
85
|
+
if (arg === "--task") {
|
|
86
|
+
options.task = value;
|
|
87
|
+
}
|
|
88
|
+
else if (arg === "--base") {
|
|
89
|
+
options.base = value;
|
|
90
|
+
}
|
|
91
|
+
else if (arg === "--format") {
|
|
92
|
+
if (!isReportFormat(value)) {
|
|
93
|
+
return {
|
|
94
|
+
ok: false,
|
|
95
|
+
error: "Invalid --format value. Expected json, markdown, sarif, or repair."
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
options.format = value;
|
|
99
|
+
}
|
|
100
|
+
else if (arg === "--output") {
|
|
101
|
+
options.output = value;
|
|
102
|
+
}
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
return { ok: false, error: `Unknown option: ${arg}` };
|
|
106
|
+
}
|
|
107
|
+
if (options.task === undefined || options.task.trim().length === 0) {
|
|
108
|
+
if (command === "hook") {
|
|
109
|
+
options.task = "Codex completed feature implementation";
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return { ok: false, error: "Missing required --task value." };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (options.task.trim().length === 0) {
|
|
116
|
+
return { ok: false, error: "Missing required --task value." };
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
ok: true,
|
|
120
|
+
options: {
|
|
121
|
+
task: options.task,
|
|
122
|
+
base: options.base,
|
|
123
|
+
format: options.format ?? "markdown",
|
|
124
|
+
strict: options.strict ?? false,
|
|
125
|
+
output: options.output
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function createGateResult(options, generatedAt, diffResult) {
|
|
130
|
+
const configResult = loadCriticalGateConfig(diffResult.root);
|
|
131
|
+
const task = {
|
|
132
|
+
source: "cli",
|
|
133
|
+
text: options.task
|
|
134
|
+
};
|
|
135
|
+
const diff = {
|
|
136
|
+
baseRef: diffResult.baseRef,
|
|
137
|
+
headRef: diffResult.headRef,
|
|
138
|
+
files: diffResult.files
|
|
139
|
+
};
|
|
140
|
+
const context = {
|
|
141
|
+
root: diffResult.root,
|
|
142
|
+
packageManager: "pnpm",
|
|
143
|
+
repositoryProfile: diffResult.repositoryProfile,
|
|
144
|
+
utilityIndex: diffResult.utilityIndex,
|
|
145
|
+
git: {
|
|
146
|
+
baseRef: diffResult.baseRef,
|
|
147
|
+
headRef: diffResult.headRef
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const detectorContext = {
|
|
151
|
+
...context,
|
|
152
|
+
knowledge: diffResult.knowledge
|
|
153
|
+
};
|
|
154
|
+
const findings = runDetectors(task, diff, detectorContext);
|
|
155
|
+
const loadedHistoryIndex = diffResult.knowledge?.getLoadedHistoryIndex?.();
|
|
156
|
+
const loadedSolutionIndex = diffResult.knowledge?.getLoadedSolutionIndex?.();
|
|
157
|
+
context.repositoryProfile ??= loadedHistoryIndex?.profile;
|
|
158
|
+
context.utilityIndex ??= loadedSolutionIndex?.utilityIndex;
|
|
159
|
+
return {
|
|
160
|
+
schemaVersion: GATE_RESULT_SCHEMA_VERSION,
|
|
161
|
+
generatedAt: generatedAt.toISOString(),
|
|
162
|
+
task,
|
|
163
|
+
diff,
|
|
164
|
+
context,
|
|
165
|
+
findings,
|
|
166
|
+
summary: summarizeFindings(findings, task, diff, configResult.config.rollout),
|
|
167
|
+
intentVerification: summarizeIntentVerification(task, diff.files),
|
|
168
|
+
metadata: {
|
|
169
|
+
cliVersion: CLI_VERSION,
|
|
170
|
+
strict: options.strict,
|
|
171
|
+
rolloutPolicy: configResult.config.rollout,
|
|
172
|
+
configWarnings: configResult.warnings
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function getHelpText() {
|
|
177
|
+
return [
|
|
178
|
+
"critical-gate",
|
|
179
|
+
"",
|
|
180
|
+
"Usage:",
|
|
181
|
+
" critical-gate check --task <text> [--base <ref>] [--format json|markdown|sarif|repair] [--strict] [--output <path>]",
|
|
182
|
+
" critical-gate hook [--task <text>] [--base <ref>] [--output <path>]",
|
|
183
|
+
" critical-gate --version",
|
|
184
|
+
" critical-gate --help",
|
|
185
|
+
""
|
|
186
|
+
].join("\n");
|
|
187
|
+
}
|
|
188
|
+
function getCheckHelpText() {
|
|
189
|
+
return [
|
|
190
|
+
"critical-gate check",
|
|
191
|
+
"",
|
|
192
|
+
"Required:",
|
|
193
|
+
" --task <text> Task intent, issue summary, or prompt",
|
|
194
|
+
"",
|
|
195
|
+
"Options:",
|
|
196
|
+
" --base <ref> Git baseline reference",
|
|
197
|
+
" --format <format> json, markdown, sarif, or repair",
|
|
198
|
+
" --strict Fail on strict-mode findings once detectors exist",
|
|
199
|
+
" --output <path> Write report to a file instead of stdout",
|
|
200
|
+
""
|
|
201
|
+
].join("\n");
|
|
202
|
+
}
|
|
203
|
+
function getHookHelpText() {
|
|
204
|
+
return [
|
|
205
|
+
"critical-gate hook",
|
|
206
|
+
"",
|
|
207
|
+
"Options:",
|
|
208
|
+
" --task <text> Optional task intent; defaults to Codex completed feature implementation",
|
|
209
|
+
" --base <ref> Git baseline reference",
|
|
210
|
+
" --output <path> Write compact repair report to a file instead of stdout",
|
|
211
|
+
""
|
|
212
|
+
].join("\n");
|
|
213
|
+
}
|
|
214
|
+
function isCommandName(value) {
|
|
215
|
+
return value === "check" || value === "hook";
|
|
216
|
+
}
|
|
217
|
+
function isReportFormat(value) {
|
|
218
|
+
return value === "json" || value === "markdown" || value === "sarif" || value === "repair";
|
|
219
|
+
}
|
|
220
|
+
const isDirectRun = process.argv[1] !== undefined && fileURLToPath(import.meta.url) === resolve(process.argv[1]);
|
|
221
|
+
if (isDirectRun) {
|
|
222
|
+
process.exitCode = main();
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;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AAC;AACf,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO;QACL,qBAAqB;QACrB,EAAE;QACF,WAAW;QACX,6DAA6D;QAC7D,EAAE;QACF,UAAU;QACV,8CAA8C;QAC9C,wDAAwD;QACxD,yEAAyE;QACzE,gEAAgE;QAChE,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,eAAe;IACtB,OAAO;QACL,oBAAoB;QACpB,EAAE;QACF,UAAU;QACV,gGAAgG;QAChG,8CAA8C;QAC9C,+EAA+E;QAC/E,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,OAAO,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,MAAM,CAAC;AAC/C,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,UAAU,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAC7F,CAAC;AAED,MAAM,WAAW,GACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAE/F,IAAI,WAAW,EAAE,CAAC;IAChB,OAAO,CAAC,QAAQ,GAAG,IAAI,EAAE,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface CriticalGateConfig {
|
|
2
|
+
patternAliases?: Record<string, string>;
|
|
3
|
+
featureRoots?: string[];
|
|
4
|
+
serviceRoots?: string[];
|
|
5
|
+
validatorRoots?: string[];
|
|
6
|
+
excludePatterns?: string[];
|
|
7
|
+
rollout?: {
|
|
8
|
+
observationDetectors?: string[];
|
|
9
|
+
blockingDetectors?: string[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface LoadCriticalGateConfigResult {
|
|
13
|
+
config: CriticalGateConfig;
|
|
14
|
+
warnings: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface ConfigReader {
|
|
17
|
+
exists?: (path: string) => boolean;
|
|
18
|
+
readFile?: (path: string) => string;
|
|
19
|
+
}
|
|
20
|
+
export declare function loadCriticalGateConfig(root: string, reader?: ConfigReader): LoadCriticalGateConfigResult;
|
|
21
|
+
//# sourceMappingURL=critical-gate-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"critical-gate-config.d.ts","sourceRoot":"","sources":["../../src/config/critical-gate-config.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,OAAO,CAAC,EAAE;QACR,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;QAChC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;CACH;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACnC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,MAAM,GAAE,YAAiB,GACxB,4BAA4B,CAmB9B"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
export function loadCriticalGateConfig(root, reader = {}) {
|
|
4
|
+
const path = join(root, ".critical-gate.json");
|
|
5
|
+
const exists = reader.exists ?? existsSync;
|
|
6
|
+
const readFile = reader.readFile ?? ((filePath) => readFileSync(filePath, "utf8"));
|
|
7
|
+
if (!exists(path)) {
|
|
8
|
+
return { config: {}, warnings: [] };
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
return validateConfig(JSON.parse(readFile(path)));
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
return {
|
|
15
|
+
config: {},
|
|
16
|
+
warnings: [
|
|
17
|
+
`Invalid .critical-gate.json: ${error instanceof Error ? error.message : "unknown error"}.`
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function validateConfig(value) {
|
|
23
|
+
const warnings = [];
|
|
24
|
+
if (!isRecord(value)) {
|
|
25
|
+
return {
|
|
26
|
+
config: {},
|
|
27
|
+
warnings: [".critical-gate.json must contain an object."]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
config: {
|
|
32
|
+
patternAliases: readStringRecord(value, "patternAliases", warnings),
|
|
33
|
+
featureRoots: readStringArray(value, "featureRoots", warnings),
|
|
34
|
+
serviceRoots: readStringArray(value, "serviceRoots", warnings),
|
|
35
|
+
validatorRoots: readStringArray(value, "validatorRoots", warnings),
|
|
36
|
+
excludePatterns: readStringArray(value, "excludePatterns", warnings),
|
|
37
|
+
rollout: readRolloutConfig(value, warnings)
|
|
38
|
+
},
|
|
39
|
+
warnings
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function readRolloutConfig(value, warnings) {
|
|
43
|
+
const rawValue = value.rollout;
|
|
44
|
+
if (rawValue === undefined) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
if (!isRecord(rawValue)) {
|
|
48
|
+
warnings.push("rollout must be an object.");
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
observationDetectors: readStringArray(rawValue, "observationDetectors", warnings),
|
|
53
|
+
blockingDetectors: readStringArray(rawValue, "blockingDetectors", warnings)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function readStringArray(value, key, warnings) {
|
|
57
|
+
const rawValue = value[key];
|
|
58
|
+
if (rawValue === undefined) {
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
if (!Array.isArray(rawValue) || !rawValue.every((item) => typeof item === "string")) {
|
|
62
|
+
warnings.push(`${key} must be an array of strings.`);
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
return rawValue;
|
|
66
|
+
}
|
|
67
|
+
function readStringRecord(value, key, warnings) {
|
|
68
|
+
const rawValue = value[key];
|
|
69
|
+
if (rawValue === undefined) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
if (!isRecord(rawValue) || !Object.values(rawValue).every((item) => typeof item === "string")) {
|
|
73
|
+
warnings.push(`${key} must be an object of string values.`);
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
return rawValue;
|
|
77
|
+
}
|
|
78
|
+
function isRecord(value) {
|
|
79
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=critical-gate-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"critical-gate-config.js","sourceRoot":"","sources":["../../src/config/critical-gate-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAwBjC,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,SAAuB,EAAE;IAEzB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,q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AAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAE5B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;QAC9F,QAAQ,CAAC,IAAI,CAAC,GAAG,GAAG,sCAAsC,CAAC,CAAC;QAC5D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,QAAkC,CAAC;AAC5C,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EAClC,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAIvB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-surface-detector.d.ts","sourceRoot":"","sources":["../../src/detectors/api-surface-detector.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAmC3C,eAAO,MAAM,kBAAkB,EAAE,QAShC,CAAC"}
|