diffpal 0.1.48
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 +19 -0
- package/README.md +137 -0
- package/diffpal.js +49 -0
- package/package.json +28 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright 2026 DiffPal contributors
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# DiffPal
|
|
2
|
+
|
|
3
|
+
[](https://github.com/diffpal/diffpal/actions/workflows/ci.yml)
|
|
4
|
+
[](https://github.com/diffpal/diffpal/actions/workflows/diffpal-dev-review.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/@diffpal/diffpal)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://www.producthunt.com/products/diffpal)
|
|
8
|
+
|
|
9
|
+
**Open-source AI pull request review that runs in your CI.**
|
|
10
|
+
|
|
11
|
+
DiffPal is for teams that want AI review feedback without adopting a mandatory
|
|
12
|
+
hosted review service. Bring Codex, Copilot, OpenCode, another supported
|
|
13
|
+
provider, or any ACP-compatible agent, and keep one review workflow across
|
|
14
|
+
GitHub, GitLab, and Azure DevOps.
|
|
15
|
+
|
|
16
|
+
[Quickstart](docs/getting-started/github-quickstart.md) ·
|
|
17
|
+
[Documentation](docs/README.md) ·
|
|
18
|
+
[Live Demo](https://github.com/diffpal/demo/pull/13) ·
|
|
19
|
+
[Security](docs/security.md) ·
|
|
20
|
+
[GitHub](https://github.com/diffpal/diffpal)
|
|
21
|
+
|
|
22
|
+
## What Users Get
|
|
23
|
+
|
|
24
|
+
| Output | Where it shows up |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| PR/MR summary | GitHub reviews, GitLab summaries, Azure PR threads |
|
|
27
|
+
| Actionable findings | Inline comments, discussions, or PR threads on changed lines |
|
|
28
|
+
| Machine-readable artifacts | Findings JSON, summary Markdown, SARIF, and Code Quality reports |
|
|
29
|
+
| Optional merge gates | CI exit status, checks, commit statuses, or PR statuses |
|
|
30
|
+
|
|
31
|
+
## Why DiffPal
|
|
32
|
+
|
|
33
|
+
- **Runs in your CI:** review happens in the workflow you already control.
|
|
34
|
+
- **Provider choice:** use the default Codex copy-paste setup, another supported
|
|
35
|
+
provider, or an ACP-compatible agent with the same DiffPal workflow.
|
|
36
|
+
- **Repository-owned configuration:** review policy, instructions, artifacts,
|
|
37
|
+
and gates live with the codebase.
|
|
38
|
+
- **No mandatory hosted service:** DiffPal standardizes review output without
|
|
39
|
+
requiring a hosted DiffPal review platform.
|
|
40
|
+
|
|
41
|
+
## Minimal GitHub Quickstart
|
|
42
|
+
|
|
43
|
+
Generate a GitHub Actions config with the default Codex API-key recipe:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npx -y @diffpal/diffpal@latest init --wizard --setup codex-api-key --platform github
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Add `OPENAI_API_KEY` as a repository secret, then download the workflow:
|
|
50
|
+
|
|
51
|
+
`OPENAI_API_KEY` is a provider credential. DiffPal runs in your CI and sends
|
|
52
|
+
review input to the provider you configure, so keep this secret out of
|
|
53
|
+
untrusted fork PR jobs.
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mkdir -p .github/workflows
|
|
57
|
+
curl -fsSL \
|
|
58
|
+
https://raw.githubusercontent.com/diffpal/diffpal/main/examples/ci/github-actions/codex-api-key.yml \
|
|
59
|
+
-o .github/workflows/diffpal.yml
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Open a same-repository pull request. After the first successful run, expect a
|
|
63
|
+
`DiffPal Review Summary`, inline findings when actionable issues exist, and
|
|
64
|
+
the retained `diffpal-review` artifact containing
|
|
65
|
+
`.artifacts/diffpal/findings.json`.
|
|
66
|
+
|
|
67
|
+
For full setup details, provider alternatives, and fork PR guidance, use the
|
|
68
|
+
[GitHub quickstart](docs/getting-started/github-quickstart.md).
|
|
69
|
+
|
|
70
|
+
## Review Before Committing
|
|
71
|
+
|
|
72
|
+
Run the latest published CLI directly:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npx -y @diffpal/diffpal@latest --profile local review uncommitted
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The command changes the provider task: the backend inspects the uncommitted
|
|
79
|
+
state in its workspace snapshot with its own tools. DiffPal does not construct a
|
|
80
|
+
second Git snapshot or pass changed files one by one. See the
|
|
81
|
+
[CLI reference](docs/reference/cli.md#diffpal-review-uncommitted).
|
|
82
|
+
|
|
83
|
+
## Coding-Agent Plugin
|
|
84
|
+
|
|
85
|
+
DiffPal includes an instruction-only plugin for Codex, Claude Code, Grok Build,
|
|
86
|
+
GitHub Copilot CLI, Cursor, OpenCode, and Agent Plugins 1.0.0 clients. Its three
|
|
87
|
+
skills configure separate local and CI profiles, run review with explicit
|
|
88
|
+
provider/publishing boundaries, and merge safe CI automation for GitHub,
|
|
89
|
+
GitLab, Azure, or custom runners.
|
|
90
|
+
|
|
91
|
+
See the [plugin guide](plugins/diffpal/README.md) for host installation and the
|
|
92
|
+
exact setup, review, and CI skill names.
|
|
93
|
+
|
|
94
|
+
## Supported Integrations
|
|
95
|
+
|
|
96
|
+
| Host | Native outputs | Guide |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| GitHub Actions | PR review summary, file-level review comments, SARIF | [GitHub Actions](docs/integrations/github-actions.md) |
|
|
99
|
+
| GitLab CI | MR summary, discussions, Code Quality, SARIF, status | [GitLab CI](docs/integrations/gitlab-ci.md) |
|
|
100
|
+
| Azure Pipelines | PR summary thread, PR threads, PR status | [Azure Pipelines](docs/integrations/azure-pipelines.md) |
|
|
101
|
+
| Custom CI/CD | Artifact-only review, or publishing through a supported code host | [Custom CI/CD](docs/integrations/custom-ci.md) |
|
|
102
|
+
|
|
103
|
+
GitHub users can also install the
|
|
104
|
+
[DiffPal Review action](https://github.com/marketplace/actions/diffpal-review).
|
|
105
|
+
Azure users can install the
|
|
106
|
+
[DiffPal Review extension](https://marketplace.visualstudio.com/items?itemName=diffpal.diffpal).
|
|
107
|
+
|
|
108
|
+
## Documentation By Goal
|
|
109
|
+
|
|
110
|
+
| Goal | Start here |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| Run the first GitHub review | [GitHub quickstart](docs/getting-started/github-quickstart.md) |
|
|
113
|
+
| Confirm the first run worked | [Verify First Review](docs/getting-started/verify-first-review.md) |
|
|
114
|
+
| Improve a working setup | [Next Steps](docs/getting-started/next-steps.md) |
|
|
115
|
+
| Understand the concepts | [Concepts](docs/concepts/README.md) and [Glossary](docs/reference/glossary.md) |
|
|
116
|
+
| Choose a provider or ACP agent | [Providers](docs/providers/README.md) |
|
|
117
|
+
| Set up GitLab, Azure, or custom CI | [Integrations](docs/integrations/README.md) |
|
|
118
|
+
| Secure secrets and fork PRs | [Secrets and fork PRs](docs/guides/secrets-and-fork-prs.md) |
|
|
119
|
+
| Tune review policy | [Configuration reference](docs/reference/configuration.md) |
|
|
120
|
+
| Consume artifacts or schemas | [Artifacts](docs/reference/artifacts.md) and [findings schema](docs/reference/findings-schema.md) |
|
|
121
|
+
| Debug setup problems | [Troubleshooting](docs/help/troubleshooting.md) |
|
|
122
|
+
| Get quick answers | [FAQ](docs/help/faq.md) |
|
|
123
|
+
| Compare DiffPal to alternatives | [Comparison guide](docs/concepts/comparison.md) |
|
|
124
|
+
|
|
125
|
+
## Project Status
|
|
126
|
+
|
|
127
|
+
DiffPal is under active development. The public docs describe the current
|
|
128
|
+
supported workflow and integration surface.
|
|
129
|
+
|
|
130
|
+
## Contributing
|
|
131
|
+
|
|
132
|
+
Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) for
|
|
133
|
+
local setup, verification commands, and repository conventions.
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
DiffPal is released under the [MIT License](LICENSE).
|
package/diffpal.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const platform = os.platform();
|
|
6
|
+
const arch = os.arch();
|
|
7
|
+
|
|
8
|
+
const platformMap = {
|
|
9
|
+
'darwin': { x64: 'darwin-x64', arm64: 'darwin-arm64' },
|
|
10
|
+
'linux': { x64: 'linux-x64', arm64: 'linux-arm64' },
|
|
11
|
+
'win32': { x64: 'win32-x64' }
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const archMap = { x64: 'x64', arm64: 'arm64', ia32: 'x86' };
|
|
15
|
+
const cpu = archMap[arch] || arch;
|
|
16
|
+
|
|
17
|
+
const osKey = platform === 'win32' ? 'win32' : platform;
|
|
18
|
+
const platformKey = platformMap[osKey]?.[cpu];
|
|
19
|
+
|
|
20
|
+
if (!platformKey) {
|
|
21
|
+
console.error('Unsupported platform: ' + platform + '/' + cpu);
|
|
22
|
+
console.error('Expected package: diffpal-<os>-<cpu>');
|
|
23
|
+
process.exit(1);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const platformPkgName = '@diffpal/diffpal-' + platformKey;
|
|
27
|
+
const binaryName = platform === 'win32' ? 'diffpal.exe' : 'diffpal';
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const { execFileSync } = require('child_process');
|
|
31
|
+
const platformPkgJSON = require.resolve(platformPkgName + '/package.json', { paths: [__dirname] });
|
|
32
|
+
const platformPkgDir = path.dirname(platformPkgJSON);
|
|
33
|
+
const binaryPath = path.join(platformPkgDir, 'bin', binaryName);
|
|
34
|
+
process.exit(execFileSync(binaryPath, process.argv.slice(2), { stdio: 'inherit' }));
|
|
35
|
+
} catch (e) {
|
|
36
|
+
if (e.code === 'ENOENT') {
|
|
37
|
+
console.error('Binary not found in package: ' + platformPkgName);
|
|
38
|
+
console.error('Expected platform package: ' + '@diffpal/diffpal-' + platformKey);
|
|
39
|
+
console.error('This may be an unsupported platform or installation issue.');
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
if (e.code === 'MODULE_NOT_FOUND') {
|
|
43
|
+
console.error('Platform package not installed: ' + platformPkgName);
|
|
44
|
+
console.error('Expected platform package: ' + '@diffpal/diffpal-' + platformKey);
|
|
45
|
+
console.error('Try reinstalling the package, and ensure optional dependencies are enabled.');
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
process.exit(e.status || 1);
|
|
49
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"bin": {
|
|
3
|
+
"diffpal": "diffpal.js"
|
|
4
|
+
},
|
|
5
|
+
"description": "Meta package for diffpal",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=16"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"diffpal.js",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
15
|
+
"name": "diffpal",
|
|
16
|
+
"optionalDependencies": {
|
|
17
|
+
"@diffpal/diffpal-darwin-arm64": "0.1.48",
|
|
18
|
+
"@diffpal/diffpal-darwin-x64": "0.1.48",
|
|
19
|
+
"@diffpal/diffpal-linux-arm64": "0.1.48",
|
|
20
|
+
"@diffpal/diffpal-linux-x64": "0.1.48",
|
|
21
|
+
"@diffpal/diffpal-win32-x64": "0.1.48"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/diffpal/diffpal.git"
|
|
26
|
+
},
|
|
27
|
+
"version": "0.1.48"
|
|
28
|
+
}
|