diffprism 0.49.0 → 1.1.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 +60 -20
- package/dist/bin.js +457 -358
- package/dist/{chunk-QGWYCEJN.js → chunk-3GMPE2ZR.js} +13 -0
- package/dist/{chunk-24B33UN6.js → chunk-EPU4F7WT.js} +6 -56
- package/dist/{chunk-7UQM4WBZ.js → chunk-FWPE5EA6.js} +2 -2
- package/dist/{chunk-EPUCA2N5.js → chunk-KRHZSUEK.js} +704 -287
- package/dist/{demo-VPKUCZT3.js → demo-Z2XUXEV3.js} +3 -3
- package/dist/mcp-server.js +432 -963
- package/dist/{src-KF5HRJPX.js → src-DNNNQ2RD.js} +2 -2
- package/dist/{src-AMCPIYDZ.js → src-OZQ32NDN.js} +3 -1
- package/package.json +1 -1
- package/ui-dist/assets/index-BulxhOr3.css +1 -0
- package/ui-dist/assets/index-Zw97bHGn.js +345 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/assets/index-DpPy4Hg4.css +0 -1
- package/ui-dist/assets/index-Dt04Ez08.js +0 -335
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Then in Claude Code:
|
|
|
29
29
|
→ calls get_file_diff + get_file_context → full file from your local clone
|
|
30
30
|
|
|
31
31
|
> Flag line 47 as a concern
|
|
32
|
-
→ calls
|
|
32
|
+
→ calls annotate → annotation appears on the diff in your browser
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
## Setup
|
|
@@ -57,24 +57,16 @@ The server auto-detects your local clone by matching `git remote -v` against the
|
|
|
57
57
|
|
|
58
58
|
## MCP Tools
|
|
59
59
|
|
|
60
|
-
DiffPrism exposes 14 MCP tools to your AI
|
|
60
|
+
DiffPrism exposes 14 MCP tools to your AI.
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
| Tool | Purpose |
|
|
64
|
-
|------|---------|
|
|
65
|
-
| `get_pr_context` | High-level PR overview: metadata, briefing, file list, local repo status |
|
|
66
|
-
| `get_file_diff` | Diff hunks for a specific file with triage category |
|
|
67
|
-
| `get_file_context` | Full file content from local repo via `git show` |
|
|
68
|
-
| `add_review_comment` | Post a comment that appears inline on the diff in real-time |
|
|
69
|
-
| `get_review_comments` | Read all comments and annotations on the session |
|
|
70
|
-
| `get_user_focus` | What file/line the user is currently viewing in the browser |
|
|
62
|
+
Reviews are **one per repo**: opening a review for a repo that already has one updates it instead of starting another, and keeps its annotations. Tools that work on an open review act on the one for the repo your AI is running in, or take `session_id` / `repo_path` — and if that's ambiguous they say so rather than guess.
|
|
71
63
|
|
|
72
|
-
###
|
|
64
|
+
### Opening and deciding
|
|
73
65
|
| Tool | Purpose |
|
|
74
66
|
|------|---------|
|
|
75
|
-
| `open_review` | Open
|
|
76
|
-
| `get_review_result` |
|
|
77
|
-
| `update_review_context` | Push updated reasoning/description to
|
|
67
|
+
| `open_review` | Open a review of local changes and **wait for the decision** (`wait: false` to return at once) |
|
|
68
|
+
| `get_review_result` | Check the decision on a review already open |
|
|
69
|
+
| `update_review_context` | Push updated reasoning/description to an open review |
|
|
78
70
|
|
|
79
71
|
### Analysis
|
|
80
72
|
| Tool | Purpose |
|
|
@@ -82,12 +74,37 @@ DiffPrism exposes 14 MCP tools to your AI:
|
|
|
82
74
|
| `analyze_diff` | Returns analysis JSON (patterns, complexity, test gaps) |
|
|
83
75
|
| `get_diff` | Returns structured diff JSON (file-level and hunk-level changes) |
|
|
84
76
|
|
|
85
|
-
###
|
|
77
|
+
### Working in an open review
|
|
86
78
|
| Tool | Purpose |
|
|
87
79
|
|------|---------|
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
80
|
+
| `annotate` | Post findings inline on the diff; `warning` flags the session for attention |
|
|
81
|
+
| `get_review_comments` | Read every thread on the session; `awaiting_reply` narrows to unanswered ones |
|
|
82
|
+
| `reply` | Reply to a thread — answer the reviewer's question on a line |
|
|
83
|
+
| `wait_for_comments` | Block until the reviewer writes something the agent hasn't answered |
|
|
84
|
+
| `get_review_state` | Session status, attention and new-changes flags, and annotations |
|
|
85
|
+
| `get_user_focus` | What file/line the user is currently viewing in the browser |
|
|
86
|
+
| `get_pr_context` | High-level PR overview: metadata, briefing, file list, local repo status |
|
|
87
|
+
| `get_file_diff` | Diff hunks for a specific file with triage category |
|
|
88
|
+
| `get_file_context` | Full file content from local repo via `git show` |
|
|
89
|
+
|
|
90
|
+
In a local review, **Ask agent now** in a line's comment form asks the agent while you're still reviewing: the agent's wait for your decision ends with your question, it answers in the thread, and goes back to waiting.
|
|
91
|
+
|
|
92
|
+
PR reviews are opened with `diffprism review <PR URL>` or the dashboard — not by `open_review` — and your AI then works inside them with the tools above. Click a line to ask the agent about it; an agent listening with `wait_for_comments` answers in the thread.
|
|
93
|
+
|
|
94
|
+
When you're done, **Approve**, **Request changes** or **Comment** from the bar at the bottom: DiffPrism posts it to GitHub as a pull request review. Your threads are a conversation with the agent, so none of them goes to GitHub unless you tick it; a ticked thread posts your opening message as an inline review comment. The token comes from `GITHUB_TOKEN`, `gh auth token`, or `~/.diffprism/config.json`.
|
|
95
|
+
|
|
96
|
+
## Choosing a scope
|
|
97
|
+
|
|
98
|
+
Every review — CLI, dashboard, and the MCP tools — defaults to the **working copy**.
|
|
99
|
+
|
|
100
|
+
| Scope | Shows |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `working-copy` *(default)* | Everything uncommitted; staged and unstaged as separate groups |
|
|
103
|
+
| `staged` | Only what the next commit contains |
|
|
104
|
+
| `unstaged` | Only edits not yet staged |
|
|
105
|
+
| `HEAD~3..HEAD`, `main..feature` | A range of commits |
|
|
106
|
+
|
|
107
|
+
The one exception is the [commit gate](#commit-gate), which always reviews `staged`.
|
|
91
108
|
|
|
92
109
|
## Local Agent Review
|
|
93
110
|
|
|
@@ -113,7 +130,9 @@ diffprism hook install # Add the gate to this repo's pre-commit hoo
|
|
|
113
130
|
diffprism hook uninstall # Remove it
|
|
114
131
|
```
|
|
115
132
|
|
|
116
|
-
|
|
133
|
+
It reviews **staged** changes only, where every other entry point defaults to the whole
|
|
134
|
+
working copy: a commit contains exactly the index, so unstaged edits aren't part of what
|
|
135
|
+
is being approved. By default a staged diff of **120+ changed lines** opens a review; anything smaller
|
|
117
136
|
commits untouched. A gate that stops every commit is one you learn to skip with
|
|
118
137
|
`--no-verify`, and a skipped gate is worse than none. Tune it per repo:
|
|
119
138
|
|
|
@@ -137,6 +156,13 @@ Commit blocked: the review requested changes.
|
|
|
137
156
|
Install adds one line between markers, so uninstall removes exactly that and leaves
|
|
138
157
|
the rest of your hook alone. Repos using `core.hooksPath` are handled.
|
|
139
158
|
|
|
159
|
+
**Reviews take as long as they take.** An agent's shell command usually times out long
|
|
160
|
+
before a person finishes reading, so the review outlives the `git commit` that opened it.
|
|
161
|
+
A decision stands for as long as the staged diff it answered is unchanged: re-run the
|
|
162
|
+
same commit after the reviewer decides and it is picked up immediately, with no second
|
|
163
|
+
review. Agents running `git commit` should use a long shell timeout — the `/review`
|
|
164
|
+
skill tells them so.
|
|
165
|
+
|
|
140
166
|
## Features
|
|
141
167
|
|
|
142
168
|
- **AI-powered PR review** — Your AI gets full codebase context via 14 MCP tools
|
|
@@ -161,9 +187,23 @@ diffprism server status # Check server status
|
|
|
161
187
|
diffprism server stop # Stop the server
|
|
162
188
|
diffprism hook install # Gate commits on a review
|
|
163
189
|
diffprism hook uninstall # Remove the gate
|
|
190
|
+
diffprism feedback # Share feedback as a prefilled GitHub issue
|
|
191
|
+
diffprism feedback --bug # Report a bug, including the last error
|
|
164
192
|
diffprism teardown # Remove configuration
|
|
165
193
|
```
|
|
166
194
|
|
|
195
|
+
## Feedback
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
diffprism feedback # Share an idea or what's working
|
|
199
|
+
diffprism feedback --bug # Report a bug
|
|
200
|
+
diffprism feedback -m "…" --print # Start with text; print the URL instead of opening it
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Both open a **prefilled GitHub issue** in your browser — DiffPrism version, OS, Node, and for a bug the last error it hit, with your home directory replaced by `~`. Nothing is sent automatically and DiffPrism collects no telemetry: you read and edit the issue, then submit it or don't. The dashboard has a **Send feedback** link that does the same.
|
|
204
|
+
|
|
205
|
+
When a command fails, it says how to report it, and keeps the error in `~/.diffprism/last-error.json` so `--bug` can include it.
|
|
206
|
+
|
|
167
207
|
## Development
|
|
168
208
|
|
|
169
209
|
```bash
|