@diffpal/lintpal-win32-x64 0.5.4 → 0.6.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/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # LintPal
2
2
 
3
+ <img src="docs/assets/lintpal-thumbnail.png" alt="DiffPal family mascot sticker with a white outline" width="120">
4
+
3
5
  [![ci](https://github.com/diffpal/lintpal/actions/workflows/ci.yml/badge.svg)](https://github.com/diffpal/lintpal/actions/workflows/ci.yml)
4
6
  [![lintpal-dev review](https://github.com/diffpal/lintpal/actions/workflows/lintpal-dev-review.yml/badge.svg)](https://github.com/diffpal/lintpal/actions/workflows/lintpal-dev-review.yml)
5
7
  [![npm](https://img.shields.io/npm/v/lintpal?label=npm)](https://www.npmjs.com/package/lintpal)
@@ -12,6 +14,11 @@ repository. It produces findings on changed lines, applies a deterministic
12
14
  severity gate, and can publish the result directly to GitHub. Use it for
13
15
  specific requirements your team wants enforced on every change.
14
16
 
17
+ LintPal is part of the [DiffPal family](https://github.com/diffpal/diffpal).
18
+ It checks explicit repository rules; [DiffPal](https://diffpal.github.io/)
19
+ provides broader AI pull-request review across GitHub, GitLab, and Azure DevOps.
20
+
21
+ [Website](https://lintpal.metalagman.dev) ·
15
22
  [Quickstart](docs/guides/getting-started.md) ·
16
23
  [Documentation](docs/index.md) ·
17
24
  [Rule packs](https://github.com/diffpal/lintpal-rules) ·
@@ -23,6 +30,8 @@ gate can then fail the check.
23
30
 
24
31
  ## Features
25
32
 
33
+ - **Provider choice:** use TypeSafe/Jev, OpenRouter, OpenAI, or your own
34
+ compatible Decisions service with the same repository rules and CI workflow.
26
35
  - **Freeform rules:** write one clear requirement per Markdown file, with
27
36
  optional severity and decision-threshold policy in frontmatter.
28
37
  - **Rule packs:** import a local directory or a versioned GitHub catalog, then
@@ -32,14 +41,32 @@ gate can then fail the check.
32
41
  - **Platform feedback:** publish a deterministic GitHub review summary and
33
42
  inline comments, or consume the same findings as JSON or Markdown in CI.
34
43
 
44
+ ## Supported Providers
45
+
46
+ Choose the provider that fits your account and deployment. Your Markdown rules,
47
+ findings, and severity gate work the same way across providers.
48
+
49
+ | Provider | Choose it for | CLI option | Credential |
50
+ | --- | --- | --- | --- |
51
+ | [**TypeSafe / Jev**](docs/guides/configuration.md#typesafe--jev) | Direct access to Jev; the default setup | `--provider jev` | `TYPESAFE_API_KEY` |
52
+ | [**OpenRouter**](docs/guides/configuration.md#openrouter) | Decisions through your OpenRouter account | `--provider openrouter` | `OPENROUTER_API_KEY` |
53
+ | [**OpenAI**](docs/guides/configuration.md#openai) | A preset for compatible OpenAI Decisions | `--provider openai --model <model-id>` | `OPENAI_API_KEY` |
54
+ | [**Custom**](docs/guides/configuration.md#custom-compatible-service) | Your own compatible service, including a local endpoint | `--provider custom --base-url <url> --api-path <path>` | `LINTPAL_TOKEN` or your chosen token variable |
55
+
56
+ The OpenAI preset assumes a compatible `/v1/decisions` API; live availability
57
+ has not been verified. These options describe this source revision; check
58
+ [releases](https://github.com/diffpal/lintpal/releases) for published package support.
59
+ See [provider setup and commands](docs/guides/configuration.md#supported-providers)
60
+ for all four options. The quickstart below uses TypeSafe/Jev.
61
+
35
62
  ## How It Works
36
63
 
37
64
  | Stage | What LintPal does |
38
65
  | --- | --- |
39
66
  | Rules | Loads the repository's `.lintpal/rules/**/*.md` requirements |
40
- | Diff | Reads changed lines between two committed Git revisions |
67
+ | Diff | Reads changed lines from the unique merge base through head, or from `HEAD` to the working tree with `--uncommitted` |
41
68
  | Decisions | Evaluates each applicable rule through the configured provider |
42
- | Findings | Writes line-anchored findings in the shared findings v5 format |
69
+ | Findings | Writes line-anchored findings in LintPal's findings v5 format |
43
70
  | Feedback | Publishes inline GitHub comments and applies the configured gate |
44
71
 
45
72
  LintPal is a focused policy checker. It does not generate a narrative code
@@ -47,14 +74,15 @@ review or invent new review criteria during a run.
47
74
 
48
75
  ## Minimal GitHub Quickstart
49
76
 
50
- Install LintPal and add a versioned rule pack:
77
+ Install the CLI globally and add a versioned rule pack in your repository:
51
78
 
52
79
  ```bash
53
- npm install --save-dev lintpal
54
- npx lintpal rule import github:diffpal/lintpal-rules//general@v1.1.0
55
- npx lintpal rule validate
80
+ npm install -g lintpal
81
+ lintpal rule import github:diffpal/lintpal-rules//general@v1.1.0
82
+ lintpal rule validate
56
83
  ```
57
84
 
85
+ Review and commit `.lintpal/rules/` so the workflow can load the rules.
58
86
  The selected remote provider receives bounded source context and rule text.
59
87
  Check whether that transfer is permitted for your repository before adding
60
88
  `TYPESAFE_API_KEY` as an Actions secret; see [privacy](docs/architecture/privacy.md).
@@ -81,15 +109,19 @@ jobs:
81
109
  - uses: actions/setup-node@v6
82
110
  with:
83
111
  node-version: 24
84
- - uses: diffpal/lintpal-action@v1
85
- with:
86
- lintpal-version: "0.5.4"
87
- base: ${{ github.event.pull_request.base.sha }}
88
- head: ${{ github.event.pull_request.head.sha }}
89
- block-on: high
90
- gate: true
112
+ - run: npm install -g lintpal
113
+ - name: Lint pull request
114
+ run: |
115
+ mkdir -p .artifacts/lintpal
116
+ lintpal lint --no-env-file --provider jev \
117
+ --base ${{ github.event.pull_request.base.sha }} \
118
+ --head ${{ github.event.pull_request.head.sha }} \
119
+ --block-on high --format json --out .artifacts/lintpal/findings.json
91
120
  env:
92
121
  TYPESAFE_API_KEY: ${{ secrets.TYPESAFE_API_KEY }}
122
+ - name: Publish review and apply gate
123
+ run: lintpal feedback github --in .artifacts/lintpal/findings.json --gate
124
+ env:
93
125
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94
126
  - uses: actions/upload-artifact@v4
95
127
  if: always()
@@ -101,11 +133,14 @@ jobs:
101
133
 
102
134
  Open a same-repository pull request. LintPal publishes a review with
103
135
  `No blocking findings`, `1 blocking finding`, or `N blocking findings`, plus
104
- one inline comment for each finding GitHub can attach to the diff. The workflow
105
- also keeps `.artifacts/lintpal/findings.json` for later steps.
136
+ one inline comment for each finding GitHub can attach to the diff. The gate
137
+ runs after publication; the workflow keeps `.artifacts/lintpal/findings.json`
138
+ even when a blocking finding fails the job. Draft and fork pull requests are
139
+ skipped. GitHub supplies the pull-request context to the feedback command.
106
140
 
107
- See the [LintPal Action](https://github.com/diffpal/lintpal-action) for every
108
- input, artifact upload, provider selection, and fork pull-request guidance.
141
+ See the [CLI reference](docs/reference/cli.md) for provider selection,
142
+ feedback commands, and exit codes. The [LintPal Action](https://github.com/diffpal/lintpal-action)
143
+ is also available for workflows that prefer an Action wrapper.
109
144
 
110
145
  ## Write Rules in Markdown
111
146
 
@@ -127,10 +162,10 @@ through the same pull-request process as code. LintPal ships without hidden or
127
162
  built-in mandates.
128
163
 
129
164
  ```bash
130
- npx lintpal rule list
131
- npx lintpal rule view general/authorization.md
132
- npx lintpal rule validate
133
- npx lintpal rule import github:diffpal/lintpal-rules//go@v1.1.0
165
+ lintpal rule list
166
+ lintpal rule view general/authorization.md
167
+ lintpal rule validate
168
+ lintpal rule import github:diffpal/lintpal-rules//go@v1.1.0
134
169
  ```
135
170
 
136
171
  Read [rule authoring](docs/rules/authoring.md) for the complete format and
@@ -142,21 +177,25 @@ Check uncommitted changes in your working tree before committing, or compare two
142
177
 
143
178
  ```bash
144
179
  export TYPESAFE_API_KEY='your-provider-key'
145
- npx lintpal doctor
180
+ lintpal doctor
146
181
 
147
182
  # Lint uncommitted working-tree changes (staged, unstaged, and untracked regular files)
148
- npx lintpal lint --uncommitted
183
+ lintpal lint --uncommitted
149
184
 
150
185
  # Or lint committed revisions
151
- npx lintpal lint --base origin/main --head HEAD
186
+ lintpal lint --base origin/main --head HEAD
152
187
  ```
153
188
 
189
+ Committed comparisons start at the unique merge base of base and head; changes
190
+ found only on the base branch are excluded. See the [CLI reference](docs/reference/cli.md)
191
+ for report revision fields and uncommitted behavior.
192
+
154
193
  Markdown findings go to stdout. Use `--out` to retain the complete JSON
155
194
  artifact, or `--format json` for JSON on stdout. The default gate returns exit
156
195
  code `10` when a high or critical finding blocks the run.
157
196
 
158
- The default provider is Jev. LintPal also supports OpenRouter and a trusted
159
- custom endpoint. Provider credentials stay in environment variables; the
197
+ Choose TypeSafe/Jev, OpenRouter, OpenAI, or a custom compatible endpoint
198
+ from [Supported Providers](#supported-providers). Provider credentials stay in environment variables; the
160
199
  selected provider receives bounded source context and rule text.
161
200
  See [configuration](docs/guides/configuration.md) and [privacy](docs/architecture/privacy.md).
162
201
 
package/bin/lintpal.exe CHANGED
Binary file
package/package.json CHANGED
@@ -17,5 +17,5 @@
17
17
  "type": "git",
18
18
  "url": "git+https://github.com/diffpal/lintpal.git"
19
19
  },
20
- "version": "0.5.4"
20
+ "version": "0.6.0"
21
21
  }