@diffclarity/companion 0.3.0 → 0.4.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 +25 -6
- package/dist/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/main.js +43 -14
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,14 +5,14 @@ Answers questions from a DiffClarity review with the coding agent you already us
|
|
|
5
5
|
It needs Node 22.21 or later and one of those agents on your PATH, signed in.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npx @diffclarity/companion connect
|
|
8
|
+
npx @diffclarity/companion@latest connect
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
It connects to DiffClarity at `https://diffclarity.com`. For another DiffClarity, such as a local stage or your own deployment, name it with `--origin`, as the review's Assistant panel shows (`npx @diffclarity/companion connect --origin https://diffclarity.example`); `disconnect` takes it too. Leaving out `--origin` and naming `https://diffclarity.com` are the same, and use the same saved access.
|
|
11
|
+
It connects to DiffClarity at `https://diffclarity.com`. For another DiffClarity, such as a local stage or your own deployment, name it with `--origin`, as the review's Assistant panel shows (`npx @diffclarity/companion@latest connect --origin https://diffclarity.example`); `disconnect` takes it too. Leaving out `--origin` and naming `https://diffclarity.com` are the same, and use the same saved access.
|
|
12
12
|
|
|
13
|
-
The first run opens your browser
|
|
13
|
+
The first run opens your browser, where you tick each workspace the companion may answer in. It then waits for questions from the review page's Ask tab and runs the agent you choose there, from an empty directory, with DiffClarity's tools as its only tools (Codex also keeps its own code execution, in its read-only sandbox). Keep it running while you review.
|
|
14
14
|
|
|
15
|
-
It prints each step. Once connected it says which workspace it answers
|
|
15
|
+
It prints each step. Once connected it says which workspace it answers in:
|
|
16
16
|
|
|
17
17
|
```text
|
|
18
18
|
Found Claude Code 2.1.314, Codex 0.166.0.
|
|
@@ -22,12 +22,31 @@ Connection open. Waiting for DiffClarity to confirm it…
|
|
|
22
22
|
Connected to https://diffclarity.com for the workspace “Acme” with Claude Code, Codex. It answers questions asked in reviews of that workspace only. Ask in a review's Assistant panel; keep this running, and press Ctrl+C to stop.
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
In a terminal, it names its tab "DiffClarity companion" instead of "node", and adds what it is doing: starting, waiting for you in the browser, connecting, answering, or that it can't connect. Rex also shows that as the tab's activity, and Ghostty and Windows Terminal as a progress indicator. When it stops, it clears its status and gives the title back. It writes none of this when its output goes to a pipe or a file, or in CI.
|
|
26
|
+
|
|
25
27
|
When it can't connect, it says which step failed and why, for example `DiffClarity didn't answer the connection within 20 s.` or `DiffClarity refused the connection (HTTP 401: …).`, then tries again after a pause that grows to a minute.
|
|
26
28
|
|
|
27
|
-
A companion
|
|
29
|
+
A companion allowed in several workspaces answers in each over its own connection, and each line it prints starts with its workspace (`[Acme] Connected…`); the terminal's tab names them too. At each start in a terminal it asks which to answer in this time, all ticked at first:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
Answer in which workspaces this time?
|
|
33
|
+
› [x] Personal
|
|
34
|
+
[x] Acme
|
|
35
|
+
[ ] Better Off
|
|
36
|
+
↑↓ move · space tick · a all or none · + allow it in more workspaces · enter connect · q stop
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For a script, name them instead, once for each, by name or id (`personal` is your own); nothing is asked. `--all-workspaces` answers in every one, as `connect` does when it can't ask (its output isn't a terminal, or in CI). `workspaces` lists them with their ids:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx @diffclarity/companion@latest connect --workspace Acme --workspace personal
|
|
43
|
+
npx @diffclarity/companion@latest workspaces
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
To allow it in more workspaces, press `+` in the list, or run this; tick each in the browser, in one visit:
|
|
28
47
|
|
|
29
48
|
```sh
|
|
30
|
-
npx @diffclarity/companion connect --add-workspace
|
|
49
|
+
npx @diffclarity/companion@latest connect --add-workspace
|
|
31
50
|
```
|
|
32
51
|
|
|
33
52
|
The companion keeps its access to each workspace in a file only you can read, under `~/.config/diffclarity`, one for each DiffClarity, and uses it each time it starts, without asking again. Account → Connected agents lists it once for each workspace; allowing it again in a workspace replaces that entry. `disconnect` forgets its access in every workspace but keeps its registration, so connecting again replaces this machine's entries rather than adding more; to end its access at once, remove it there too. An installed copy (`npm install --global @diffclarity/companion`) offers the same commands as `diffclarity connect` and `diffclarity disconnect`.
|