@diffpal/diffpal-win32-x64 0.1.37 → 0.1.39

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
@@ -5,394 +5,104 @@
5
5
  [![npm](https://img.shields.io/npm/v/@diffpal/diffpal?label=npm)](https://www.npmjs.com/package/@diffpal/diffpal)
6
6
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7
7
 
8
- **Open-source, provider-agnostic AI review for pull requests.**
8
+ **Open-source AI pull request review that runs in your CI.**
9
9
 
10
- DiffPal is an open-source PR review system that turns changed code into
11
- structured findings, clear summaries, file-level feedback, artifacts, and merge
12
- gates. Teams bring their own AI provider or ACP-compatible CLI, so there is no
13
- mandatory hosted DiffPal review service and no required per-seat review
14
- platform.
10
+ DiffPal is for teams that want AI review feedback without adopting a mandatory
11
+ hosted review service. Bring Codex, Copilot, OpenCode, another supported
12
+ provider, or any ACP-compatible agent, and keep one review workflow across
13
+ GitHub, GitLab, and Azure DevOps.
15
14
 
16
- DiffPal exists to make AI code review something teams control, not another
17
- review platform they rent. It runs in your CI, uses the AI provider you choose,
18
- and turns every pull request into clear summaries, actionable file-level feedback,
19
- review artifacts, and merge gates.
15
+ [Quickstart](docs/getting-started/github-quickstart.md) ·
16
+ [Documentation](docs/README.md) ·
17
+ [Security](docs/security.md) ·
18
+ [GitHub](https://github.com/diffpal/diffpal)
20
19
 
21
- Use the provider path that already works for your team and keep the review
22
- workflow in your repository. DiffPal's goal is to make AI PR review portable,
23
- affordable, and enforceable across GitHub, GitLab, and Azure DevOps.
20
+ ## What Users Get
24
21
 
25
- | Works with | Publishes | Gates on |
26
- | --- | --- | --- |
27
- | GitHub Actions, GitLab CI, Azure Pipelines | summaries, file-level comments, checks/statuses, SARIF, Code Quality | policy thresholds through native CI checks and PR statuses |
28
-
29
- [Quickstart](docs/quickstart.md) · [CI examples](docs/ci-examples.md) · [Config reference](docs/config-reference.md) · [Provider recipes](examples/README.md)
30
-
31
- ## How DiffPal Works
32
-
33
- ```text
34
- pull request diff
35
- -> DiffPal config and policy
36
- -> selected ACP or hosted provider
37
- -> structured findings bundle
38
- -> platform publisher and CI artifacts
39
- ```
40
-
41
- DiffPal coordinates the review workflow around the model call. Your provider
42
- supplies the review intelligence; DiffPal keeps PR feedback, artifacts, and
43
- merge policy consistent across hosts.
44
-
45
- Review instructions are produced by DiffPal's versioned Prompt Pack. Findings
46
- artifacts include the prompt id, prompt version, purpose, and findings schema
47
- version, so a review can be traced back to the exact prompt contract that
48
- generated it. See the [config reference](docs/config-reference.md#prompt-pack)
49
- and [findings schema](docs/findings-schema.md) for the current metadata.
50
-
51
- ## Bring Your Own Provider
52
-
53
- DiffPal decouples AI review from any one vendor or hosted service. Choose
54
- Codex, Copilot, OpenCode, Gemini, Claude Code, a hosted API provider, an ordered
55
- provider pool, or any ACP-compatible CLI without rebuilding your PR review
56
- workflow.
22
+ | Output | Where it shows up |
23
+ | --- | --- |
24
+ | PR/MR summary | GitHub reviews, GitLab summaries, Azure PR threads |
25
+ | Actionable findings | Inline comments, discussions, or PR threads on changed lines |
26
+ | Machine-readable artifacts | Findings JSON, summary Markdown, SARIF, and Code Quality reports |
27
+ | Optional merge gates | CI exit status, checks, commit statuses, or PR statuses |
57
28
 
58
- That model keeps cost control with your team. DiffPal does not require a hosted
59
- review service or per-seat platform subscription to collect diffs, publish PR
60
- feedback, write artifacts, or enforce merge gates.
29
+ ## Why DiffPal
61
30
 
62
- ## Quick Start: GitHub Actions
31
+ - **Runs in your CI:** review happens in the workflow you already control.
32
+ - **Provider choice:** use the default Codex copy-paste setup, another supported
33
+ provider, or an ACP-compatible agent with the same DiffPal workflow.
34
+ - **Repository-owned configuration:** review policy, instructions, artifacts,
35
+ and gates live with the codebase.
36
+ - **No mandatory hosted service:** DiffPal standardizes review output without
37
+ requiring a hosted DiffPal review platform.
63
38
 
64
- This is the fastest production-shaped setup using the default Codex API-key
65
- recipe: DiffPal installs itself through the GitHub Action, Codex is selected as
66
- the review provider, and `OPENAI_API_KEY` stays in GitHub Secrets. You can swap
67
- the provider recipe while keeping the same DiffPal review workflow.
39
+ ## Minimal GitHub Quickstart
68
40
 
69
- 1. Generate the config:
41
+ Generate a GitHub Actions config with the default Codex API-key recipe:
70
42
 
71
43
  ```bash
72
44
  npx -y @diffpal/diffpal@latest init --wizard --setup codex-api-key --platform github
73
45
  ```
74
46
 
75
- This writes `.config/diffpal/config.yaml` with a visible `ci` profile. Existing
76
- files are kept unless you pass `--force`.
47
+ Add `OPENAI_API_KEY` as a repository secret, then copy the workflow:
77
48
 
78
- 2. Add a repository secret:
79
-
80
- | Secret | Purpose |
81
- | --- | --- |
82
- | `OPENAI_API_KEY` | Authenticates Codex for the review provider. |
83
-
84
- For public open-source repositories, keep provider credentials away from fork PR
85
- code. GitHub's fork workflow approval settings control whether outside
86
- contributors' fork workflows run automatically; they do not make it safe to
87
- release provider secrets to fork code. Keep DiffPal's secret-backed review job
88
- limited to same-repository pull requests. Fork PRs should run no-secret CI only.
89
-
90
- 3. Add the workflow:
49
+ `OPENAI_API_KEY` is a provider credential. DiffPal runs in your CI and sends
50
+ review input to the provider you configure, so keep this secret out of
51
+ untrusted fork PR jobs.
91
52
 
92
53
  ```bash
93
54
  mkdir -p .github/workflows
94
55
  cp examples/ci/github-actions/codex-api-key.yml .github/workflows/diffpal.yml
95
56
  ```
96
57
 
97
- 4. Open a same-repository pull request.
98
-
99
- Expected result:
58
+ Open a same-repository pull request. After the first successful run, expect a
59
+ `DiffPal Review Summary`, inline findings when actionable issues exist, and
60
+ `.artifacts/diffpal/findings.json` in the workflow workspace.
100
61
 
101
- - a `DiffPal Review Summary` PR review with an overview of the change
102
- - file-level review comments for actionable findings
103
- - `.artifacts/diffpal/findings.json` in the job workspace
104
- - a failed job only when `gate: true` and blocking findings exist, or when setup
105
- or publishing fails
62
+ For full setup details, provider alternatives, and fork PR guidance, use the
63
+ [GitHub quickstart](docs/getting-started/github-quickstart.md).
106
64
 
107
- The GitHub Action installs the latest DiffPal CLI by default. After your first
108
- successful run, pin `diffpal-version`, provider CLIs, and bridge packages when
109
- you need fully reproducible credentialed CI.
65
+ ## Supported Integrations
110
66
 
111
- ## Supported CI Systems
112
-
113
- Use the same `.config/diffpal/config.yaml` shape in every CI system. GitHub,
114
- GitLab, and Azure are publishing targets; the core workflow only changes how CI
115
- checks out code, installs the provider, passes the platform token, and runs
116
- DiffPal.
117
-
118
- | CI system | Examples | Output surfaces |
67
+ | Host | Native outputs | Guide |
119
68
  | --- | --- | --- |
120
- | GitHub Actions | [`examples/ci/github-actions`](examples/ci/github-actions) | PR review summary, file-level review comments, SARIF |
121
- | GitLab CI | [`examples/ci/gitlab`](examples/ci/gitlab) | MR summary, discussions, Code Quality, SARIF |
122
- | Azure Pipelines | [`examples/ci/azure-pipelines`](examples/ci/azure-pipelines) | PR summary thread, PR threads, PR status |
123
-
124
- ## GitHub Action
125
-
126
- GitHub Actions users can install the
127
- [DiffPal Review action](https://github.com/marketplace/actions/diffpal-review)
128
- with `uses: diffpal/action@v1`. The action source and release automation live in
129
- the separate [diffpal/action](https://github.com/diffpal/action) repository.
69
+ | GitHub Actions | PR review summary, file-level review comments, SARIF | [GitHub Actions](docs/integrations/github-actions.md) |
70
+ | GitLab CI | MR summary, discussions, Code Quality, SARIF, status | [GitLab CI](docs/integrations/gitlab-ci.md) |
71
+ | Azure Pipelines | PR summary thread, PR threads, PR status | [Azure Pipelines](docs/integrations/azure-pipelines.md) |
72
+ | Custom CI/CD | Artifact-only review, or publishing through a supported code host | [Custom CI/CD](docs/integrations/custom-ci.md) |
130
73
 
131
- The action installs `@diffpal/diffpal` by default, then runs
132
- `diffpal review github`. You still own provider setup and authentication in the
133
- workflow, so switching provider recipes does not require switching PR review
134
- platforms.
74
+ GitHub users can also install the
75
+ [DiffPal Review action](https://github.com/marketplace/actions/diffpal-review).
76
+ Azure users can install the
77
+ [DiffPal Review extension](https://marketplace.visualstudio.com/items?itemName=diffpal.diffpal).
135
78
 
136
- ## Azure DevOps Marketplace Extension
79
+ ## Documentation By Goal
137
80
 
138
- Azure Pipelines users can install the public
139
- [DiffPal Review extension](https://marketplace.visualstudio.com/items?itemName=diffpal.diffpal)
140
- from the Azure DevOps Marketplace and add the `DiffPalReview@1` task to PR
141
- validation pipelines. Extension source and release automation live in the
142
- separate [diffpal/azure-devops](https://github.com/diffpal/azure-devops)
143
- repository.
144
-
145
- The task installs `@diffpal/diffpal` by default, then runs `diffpal review ado`.
146
- You still need a committed DiffPal config, a provider credential such as
147
- `OPENAI_API_KEY`, `SYSTEM_ACCESSTOKEN` for PR feedback publishing, and a full git
148
- checkout. See the [Azure Pipelines setup guide](docs/ci-examples.md#azure-pipelines)
149
- for copy-paste examples.
150
-
151
- Example GitHub Actions workflow:
152
-
153
- ```yaml
154
- name: diffpal
155
-
156
- on:
157
- pull_request:
158
- types: [opened, synchronize, reopened, ready_for_review]
159
-
160
- jobs:
161
- review:
162
- name: review
163
- # Provider credentials are only exposed to same-repository PRs.
164
- # Fork PRs should run no-secret CI only.
165
- if: ${{ !github.event.pull_request.draft && github.event.pull_request.head.repo.full_name == github.repository }}
166
- runs-on: ubuntu-latest
167
- permissions:
168
- contents: read
169
- pull-requests: write
170
- steps:
171
- - uses: actions/checkout@v6
172
- with:
173
- fetch-depth: 0
174
-
175
- - uses: actions/setup-node@v6
176
- with:
177
- node-version: 22
178
-
179
- - name: Install Codex provider
180
- run: npm install --global @openai/codex@0.139.0 @normahq/codex-acp-bridge@1.6.3
181
-
182
- - name: Authenticate Codex
183
- run: printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key
184
- env:
185
- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
186
-
187
- - uses: diffpal/action@v1
188
- with:
189
- base: ${{ github.event.pull_request.base.sha }}
190
- head: ${{ github.event.pull_request.head.sha }}
191
- profile: ci
192
- gate: true
193
- feedback: review
194
- env:
195
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
196
- ```
197
-
198
- `pull_request_target` runs from the default branch of the base repository and is
199
- useful for trusted automation such as labeling or commenting. Do not combine it
200
- with checking out the PR head or running package installs, tests, build scripts,
201
- hooks, provider CLIs, or other fork code. That pattern can expose privileged
202
- tokens or secrets to untrusted code.
203
-
204
- If you prefer copying files manually, use
205
- [`examples/configs/codex-api-key/config.yaml`](examples/configs/codex-api-key/config.yaml).
206
- For full copy-paste files and host-specific notes, read
207
- [`docs/ci-examples.md`](docs/ci-examples.md).
208
-
209
- ## Config You Commit
210
-
211
- DiffPal uses the current profile-based config shape. There is no legacy
212
- `defaults` block.
213
-
214
- ```yaml
215
- version: v1
216
-
217
- runtime:
218
- providers:
219
- codex-acp:
220
- type: codex_acp
221
- codex_acp:
222
- reasoning_effort: low
223
-
224
- diffpal:
225
- provider: codex-acp
226
- gate:
227
- block_on: high
228
- review:
229
- language: en
230
- instructions: |
231
- Prefer actionable findings that are directly supported by the diff.
232
- platforms:
233
- github: {}
234
- gitlab: {}
235
- azure: {}
236
-
237
- profiles:
238
- ci:
239
- diffpal:
240
- gate:
241
- block_on: high
242
- ```
243
-
244
- DiffPal uses a fixed finding taxonomy: security, correctness, reliability,
245
- performance, maintainability, testing, and style. Use review instructions to
246
- change or extend the review scope, for example `Review for OWASP best practices
247
- and authz/authn regressions.`
248
-
249
- Severity is impact-based across all categories. The full critical/high/medium/low
250
- matrix is in the [config reference](docs/config-reference.md#severity-matrix).
251
-
252
- Use `diffpal.review.instructions`, the `instructions` action input, or
253
- `--instructions-file` for repository-specific review guidance.
254
- For large pull requests or slower providers, set `diffpal.review.timeout`
255
- in the selected profile, for example `profiles.ci.diffpal.review.timeout: 10m`.
256
-
257
- ## Provider Recipes and Runtime Types
258
-
259
- DiffPal delegates review to `diffpal.provider`, which points at a provider
260
- under `runtime.providers`.
261
-
262
- Ready-made config recipes. These are the same names accepted by
263
- `diffpal init --wizard --setup ...`:
264
-
265
- | Setup | Config | Secret |
266
- | --- | --- | --- |
267
- | Generic ACP CLI | [`examples/configs/generic-acp/config.yaml`](examples/configs/generic-acp/config.yaml) | provider-specific |
268
- | Codex API key | [`examples/configs/codex-api-key/config.yaml`](examples/configs/codex-api-key/config.yaml) | `OPENAI_API_KEY` |
269
- | Codex subscription auth | [`examples/configs/codex-subscription/config.yaml`](examples/configs/codex-subscription/config.yaml) | `CODEX_AUTH_JSON_B64` |
270
- | Copilot fine-grained PAT | [`examples/configs/copilot-github-token/config.yaml`](examples/configs/copilot-github-token/config.yaml) | `COPILOT_GITHUB_TOKEN` |
271
- | OpenCode ACP | [`examples/configs/opencode-acp/config.yaml`](examples/configs/opencode-acp/config.yaml) | OpenCode-specific |
272
-
273
- For Codex subscription auth, generate a fresh `CODEX_AUTH_JSON_B64` value with
274
- the command recipe in [`examples/README.md`](examples/README.md#generate-codex_auth_json_b64).
275
-
276
- Use `generic_acp` for any CLI that can start an ACP stdio server:
277
-
278
- ```yaml
279
- runtime:
280
- providers:
281
- my-review-agent:
282
- type: generic_acp
283
- generic_acp:
284
- cmd: ["your-acp-cli", "acp", "--stdio"]
285
-
286
- diffpal:
287
- provider: my-review-agent
288
- ```
289
-
290
- Common provider aliases are available when the CLI is already installed and
291
- authenticated:
292
-
293
- | Type | Runtime command |
81
+ | Goal | Start here |
294
82
  | --- | --- |
295
- | `codex_acp` | Codex ACP via the configured Codex bridge |
296
- | `copilot_acp` | Copilot ACP |
297
- | `opencode_acp` | `opencode acp` |
298
- | `gemini_acp` | Gemini ACP |
299
- | `claude_code_acp` | Claude Code ACP |
300
- | `generic_acp` | Your explicit command |
301
- | `openai`, `aistudio` | Hosted API providers |
302
- | `pool` | Ordered provider failover |
83
+ | Run the first GitHub review | [GitHub quickstart](docs/getting-started/github-quickstart.md) |
84
+ | Confirm the first run worked | [Verify First Review](docs/getting-started/verify-first-review.md) |
85
+ | Improve a working setup | [Next Steps](docs/getting-started/next-steps.md) |
86
+ | Understand the concepts | [Concepts](docs/concepts/README.md) and [Glossary](docs/concepts/glossary.md) |
87
+ | Choose a provider or ACP agent | [Providers](docs/providers/README.md) |
88
+ | Set up GitLab, Azure, or custom CI | [Integrations](docs/integrations/README.md) |
89
+ | Secure secrets and fork PRs | [Secrets and fork PRs](docs/guides/secrets-and-fork-prs.md) |
90
+ | Tune review policy | [Configuration reference](docs/reference/configuration.md) |
91
+ | Consume artifacts or schemas | [Artifacts](docs/reference/artifacts.md) and [findings schema](docs/reference/findings-schema.md) |
92
+ | Debug setup problems | [Troubleshooting](docs/help/troubleshooting.md) |
93
+ | Get quick answers | [FAQ](docs/help/faq.md) |
94
+ | Compare DiffPal to alternatives | [Comparison guide](docs/concepts/comparison.md) |
303
95
 
304
- DiffPal passes the review task snapshot with base and head revisions. Providers
305
- inspect the repository diff and supporting code through their available Git and
306
- filesystem tools, then DiffPal validates the structured findings against the
307
- changed ranges it collected internally.
96
+ ## Project Status
308
97
 
309
- ## MCP Servers
310
-
311
- DiffPal can pass MCP servers through the Norma runtime to providers that support
312
- them. Declare servers once, then attach them to the provider:
313
-
314
- ```yaml
315
- runtime:
316
- mcp_servers:
317
- repo-docs:
318
- type: stdio
319
- cmd: ["your-docs-mcp-server"]
320
- args: ["--root", "."]
321
- env:
322
- DOCS_TOKEN: "${DOCS_TOKEN}"
323
- policy-api:
324
- type: http
325
- url: "https://policy.example.com/mcp"
326
- headers:
327
- Authorization: "Bearer ${POLICY_MCP_TOKEN}"
328
- providers:
329
- opencode-acp:
330
- type: opencode_acp
331
- mcp_servers:
332
- - repo-docs
333
- - policy-api
334
- opencode_acp:
335
- model: opencode/big-pickle
336
-
337
- diffpal:
338
- provider: opencode-acp
339
- ```
98
+ DiffPal is under active development. The public docs describe the current
99
+ supported workflow and integration surface.
340
100
 
341
- Keep MCP credentials in CI secrets. Use envsubst placeholders only for values
342
- that are guaranteed to exist in that job.
343
-
344
- ## Feedback
345
-
346
- Use `feedback` for the normal user-facing shape:
347
-
348
- | Feedback | Behavior |
349
- | --- | --- |
350
- | `summary` | Summary plus non-file artifacts such as SARIF, Code Quality, or status. No file-level findings are published. |
351
- | `review` | Summary plus file-level findings for the platform; non-blocking findings stay visible but do not become merge blockers. The summary does not duplicate file-level finding details. |
352
-
353
- Use `summary-overview: false` or `--summary-overview=false` if you do not want
354
- the semantic change overview in the summary.
355
-
356
- If two DiffPal workflows run on the same PR, give them separate channels:
357
-
358
- ```yaml
359
- with:
360
- review-channel: diffpal-dev
361
- review-id: github-pr-${{ github.event.pull_request.number }}-diffpal-dev
362
- ```
363
-
364
- That produces a separate `diffpal-dev` PR review with its own summary and file-level
365
- comments.
366
-
367
- ## Local Debugging
368
-
369
- CI is the main path, but local checks help when wiring a provider:
370
-
371
- ```bash
372
- npm install --global @diffpal/diffpal@latest @openai/codex@0.139.0 @normahq/codex-acp-bridge@1.6.3
373
- printf '%s' "$OPENAI_API_KEY" | codex login --with-api-key
374
- diffpal doctor --mode github
375
- diffpal review local --base origin/main --head HEAD --profile ci
376
- ```
377
-
378
- To inspect the prompt contract without calling any provider:
379
-
380
- ```bash
381
- diffpal debug prompt --base origin/main --head HEAD --profile ci --format text
382
- ```
101
+ ## Contributing
383
102
 
384
- The debug command renders the system prompt, the review task snapshot, and a
385
- schema-valid mock findings bundle through the normal review validation path.
386
- It does not require API keys.
103
+ Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) for
104
+ local setup, verification commands, and repository conventions.
387
105
 
388
- ## Documentation
106
+ ## License
389
107
 
390
- - [Quickstart](docs/quickstart.md)
391
- - [CI setup guide](docs/ci-examples.md)
392
- - [Examples](examples/README.md)
393
- - [Config reference](docs/config-reference.md)
394
- - [Findings schema](docs/findings-schema.md)
395
- - [GitLab adapter reference](docs/platform-gitlab.md)
396
- - [Azure adapter reference](docs/platform-azure.md)
397
- - [Release process](docs/release.md)
398
- - [Contributing](CONTRIBUTING.md)
108
+ DiffPal is released under the [MIT License](LICENSE).
package/bin/diffpal.exe CHANGED
Binary file
package/package.json CHANGED
@@ -13,5 +13,5 @@
13
13
  "os": [
14
14
  "win32"
15
15
  ],
16
- "version": "0.1.37"
16
+ "version": "0.1.39"
17
17
  }