@critiquedotsh/harness 0.1.7 → 0.1.10
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 +53 -2
- package/dist/cli.js +9094 -2980
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **CritiqueCode** (this package) | [`@critiquedotsh/harness`](https://www.npmjs.com/package/@critiquedotsh/harness) | `critique-code` | Author: write the change, then survive review |
|
|
8
8
|
| **Critique CLI** | [`@critiquedotsh/cli`](https://www.npmjs.com/package/@critiquedotsh/cli) | `critique` | Sidecar reviewer for agents you already run |
|
|
9
9
|
|
|
10
|
-
Same npm org. Different products. Do not install CritiqueCode by swapping `@critiquedotsh/cli`.
|
|
10
|
+
Same npm org. Different products. Do not install CritiqueCode by swapping `@critiquedotsh/cli`. Native evidence stays on `/review`. `/critique` and `critique_cli` spawn the installed `critique` sidecar when you want that binary.
|
|
11
11
|
|
|
12
12
|
Docs: [CritiqueCode](https://critique.sh/docs/platform/critique-code) · [Inference API](https://critique.sh/docs/platform/inference-api) · [Critique CLI](https://critique.sh/docs/platform/cli)
|
|
13
13
|
|
|
@@ -77,6 +77,22 @@ Or skip the TTY and open a local browser UI (still the same author kernel in thi
|
|
|
77
77
|
critique-code web
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
Pair a phone to that same laptop process (Wi-Fi PIN, Slack/Telegram DM, or `--anywhere` with your own tunnel). The kernel never moves to Critique Cloud:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
critique-code remote
|
|
84
|
+
critique-code remote --slack --anywhere
|
|
85
|
+
critique-code slack
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Drive it from the website instead. Open [critique.sh/code](https://critique.sh/code), click **Connect this PC**, then paste the printed code on this machine:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
critique-code connect K7M2-9QWX
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The site is a remote, not a runner: prompts, approvals, and event output relay through critique.sh, but the kernel and every file write stay on this laptop. It needs `critique-code login` (a `crt_` key) so the laptop can claim the code outbound.
|
|
95
|
+
|
|
80
96
|
Describe the change. Slash lines (`/review`, `/ship`, …) are never sent to the model.
|
|
81
97
|
|
|
82
98
|
## What a session does
|
|
@@ -87,7 +103,7 @@ Describe the change. Slash lines (`/review`, `/ship`, …) are never sent to the
|
|
|
87
103
|
4. **`/repair`** runs verified repair on promoted findings. It is not auto-applied chatter.
|
|
88
104
|
5. `none_promoted` means nothing was promoted. It is **not** a correctness proof.
|
|
89
105
|
|
|
90
|
-
The author can fan out **`critique_task`** workers (`explore` is read-only; `general` / `implement` can write through the same CAS path). Independent review is still `/review`, not a worker. `critique_run` still needs your approval. Workers cannot nest `critique_task`.
|
|
106
|
+
The author can fan out **`critique_task`** workers (`explore` is read-only; `general` / `implement` can write through the same CAS path). Independent native review is still `/review`, not a worker. `critique_cli` spawns the installed Critique CLI sidecar when you ask for that binary. `critique_run` still needs your approval. Workers cannot nest `critique_task` or `critique_cli`.
|
|
91
107
|
|
|
92
108
|
The TTY shows a wordmark, a compact live status (`thinking` / `write path` / `task explore …`), then a one-line `▸` summary before the reply. It does not stream thinking paragraphs.
|
|
93
109
|
|
|
@@ -99,10 +115,15 @@ Interactive TTY sessions keep **stdout quiet**. Pass `--json` for the session en
|
|
|
99
115
|
critique-code
|
|
100
116
|
critique-code chat [--intent <text>] [--models provider/model,...] [--cwd <dir>] [--store <dir>] [--voice] [--json]
|
|
101
117
|
critique-code web [--port <n>] [--cwd <dir>] [--store <dir>] [--models ...]
|
|
118
|
+
critique-code remote [--anywhere] [--site] [--slack] [--telegram] [--port <n>] [--cwd <dir>]
|
|
119
|
+
critique-code connect [CODE] [--cwd <dir>]
|
|
120
|
+
critique-code slack [--port <n>] [--cwd <dir>]
|
|
121
|
+
critique-code telegram [--port <n>] [--cwd <dir>]
|
|
102
122
|
critique-code login
|
|
103
123
|
critique-code settings | keys | models
|
|
104
124
|
critique-code review [--depth quick|standard|paranoid] [--focus general,security] [--models ...] [--base <ref>] [--intent <text>] [--cwd <dir>] [--store <dir>]
|
|
105
125
|
critique-code repair <review-run-id> [--store <dir>] [--cwd <dir>] [--models ...]
|
|
126
|
+
critique-code critique [sidecar argv...] [--cwd <dir>]
|
|
106
127
|
critique-code capabilities [--cwd <dir>]
|
|
107
128
|
critique-code skills [--cwd <dir>]
|
|
108
129
|
critique-code import-skills [--cwd <dir>]
|
|
@@ -113,10 +134,14 @@ critique-code help
|
|
|
113
134
|
| --- | --- |
|
|
114
135
|
| `critique-code` / `chat` | Interactive author session |
|
|
115
136
|
| `web` | Local browser UI on `127.0.0.1` (same author kernel; no TTY required) |
|
|
137
|
+
| `remote` | Phone pairing to this laptop: LAN PIN, optional `--anywhere` tunnel. Not Critique Cloud. |
|
|
138
|
+
| `connect [CODE]` | Register this PC on critique.sh/code. The website is a remote; the kernel stays here. |
|
|
139
|
+
| `slack` / `telegram` | Outbound bots. DM the agent from those apps; the kernel stays in this process. |
|
|
116
140
|
| `login` | Browser device approval; connect Critique Inference |
|
|
117
141
|
| `settings` / `keys` / `models` | TUI for route, stored keys, and model ids |
|
|
118
142
|
| `review` | Evidence harness (JSON on stdout) |
|
|
119
143
|
| `repair <id>` | Verified repair for a stored review run |
|
|
144
|
+
| `critique [argv…]` | Spawn the installed Critique CLI sidecar (`critique review --json` by default) |
|
|
120
145
|
| `capabilities` | Discovered local check tools |
|
|
121
146
|
| `skills` | Built-in plus imported Claude Code / Codex / Cursor `SKILL.md` folders |
|
|
122
147
|
| `import-skills` | Copy discovered skills into `~/.critique/code/skills` |
|
|
@@ -135,6 +160,8 @@ critique-code help
|
|
|
135
160
|
| `--voice` | Start the author session in voice mode |
|
|
136
161
|
| `--json` | Print the session envelope on stdout even on a TTY |
|
|
137
162
|
| `--port <n>` | Loopback port for `critique-code web` (`0` = ephemeral) |
|
|
163
|
+
| `--anywhere` | For `remote`: publish an outbound `cloudflared` or `ngrok` URL. Still this laptop. |
|
|
164
|
+
| `--slack` / `--telegram` | Attach those portals to `web` / `remote` |
|
|
138
165
|
| `-h` / `help` | Help |
|
|
139
166
|
|
|
140
167
|
`critique-code review` is read-only. Use `critique-code repair <review-run-id>` for explicit repair. `--repair apply` on `review` is rejected.
|
|
@@ -147,11 +174,16 @@ Type `/` or `/help` for a selectable picker. **Lines that start with `/` never g
|
|
|
147
174
|
| --- | --- |
|
|
148
175
|
| `/` `/help` | Picker / help |
|
|
149
176
|
| `/login` | Connect Critique Inference in the browser |
|
|
177
|
+
| `/remote` | Pair a phone; this laptop stays the agent |
|
|
178
|
+
| `/slack` | Attach Slack Socket Mode |
|
|
179
|
+
| `/telegram` | Attach a Telegram bot |
|
|
150
180
|
| `/voice` | Record one spoken prompt (Qwen3 ASR) |
|
|
151
181
|
| `/voice on` | Keep listening after each reply |
|
|
152
182
|
| `/voice off` | Return to the keyboard |
|
|
153
183
|
| `/review` | Evidence harness since the last review checkpoint |
|
|
154
184
|
| `/review all` | Evidence harness on the current tree even if unchanged |
|
|
185
|
+
| `/critique` | Spawn the Critique CLI sidecar (`critique review --json`) |
|
|
186
|
+
| `/critique finish` | Sidecar `finish --repair pack`; apply stays an explicit slash |
|
|
155
187
|
| `/repair` | Verified repair of promoted findings |
|
|
156
188
|
| `/ship` | Review, then end if the controller allows |
|
|
157
189
|
| `/settings` | Keys, route, models |
|
|
@@ -225,6 +257,24 @@ Also:
|
|
|
225
257
|
- `CRITIQUE_INFERENCE_BASE_URL` — override `https://critique.sh/api/v1`
|
|
226
258
|
- `CRITIQUE_SITE_URL` — site origin for device login (default derived from the inference URL)
|
|
227
259
|
- `CRITIQUE_CODE_PI_DRIVER=off` — disable the live author kernel (sessions stay `kernel_required`)
|
|
260
|
+
- `SLACK_BOT_TOKEN` + `SLACK_APP_TOKEN` — Slack Socket Mode (outbound). Optional `CRITIQUE_CODE_PORTAL_USERS`
|
|
261
|
+
- `TELEGRAM_BOT_TOKEN` — Telegram long poll (outbound). Optional `CRITIQUE_CODE_PORTAL_CHATS`
|
|
262
|
+
- `CRITIQUE_CODE_PORTAL_SECRET` — shared secret for `POST /api/portal/inbound` from other portals
|
|
263
|
+
- `CRITIQUE_CODE_TUNNEL` — prefer `cloudflared` or `ngrok` for `--anywhere`
|
|
264
|
+
|
|
265
|
+
## Remote phone and portals
|
|
266
|
+
|
|
267
|
+
The agent is this process on this laptop. Phone, Slack, Telegram, and the website are remotes. They are not Critique Cloud.
|
|
268
|
+
|
|
269
|
+
1. Leave the machine awake with the session running.
|
|
270
|
+
2. Same Wi-Fi: `critique-code remote`, open the LAN URL on the phone, enter the PIN from the terminal.
|
|
271
|
+
3. Anywhere: DM the Slack or Telegram bot (`critique-code slack` / `critique-code telegram` / `--slack`). Those open outbound sockets. No inbound port.
|
|
272
|
+
4. Website: `critique-code connect CODE` after `critique-code login` claims the PC from [critique.sh/code](https://critique.sh/code). The site relays prompts and approvals; the kernel stays here.
|
|
273
|
+
5. Optional `--anywhere` uses **your** `cloudflared` or `ngrok`. The tunnel is a pipe. Writes still happen in this working tree.
|
|
274
|
+
|
|
275
|
+
Slack Socket Mode needs `SLACK_BOT_TOKEN` (`xoxb-`) and `SLACK_APP_TOKEN` (`xapp-`) with message events. Telegram needs `TELEGRAM_BOT_TOKEN`. Optional allowlists: `CRITIQUE_CODE_PORTAL_USERS`, `CRITIQUE_CODE_PORTAL_CHATS`.
|
|
276
|
+
|
|
277
|
+
From an already-open TTY: `/remote`, `/slack`, `/telegram`.
|
|
228
278
|
|
|
229
279
|
## Files on disk
|
|
230
280
|
|
|
@@ -234,6 +284,7 @@ Nothing secret is written into the repository.
|
|
|
234
284
|
| --- | --- |
|
|
235
285
|
| `~/.critique/code/auth.json` | Stored API keys (mode `0600`) |
|
|
236
286
|
| `~/.critique/code/settings.json` | Route and model selection |
|
|
287
|
+
| `~/.critique/code/portals.json` | Slack / Telegram / webhook portal tokens (mode `0600`) |
|
|
237
288
|
| Review/repair store | Outcomes and repair artifacts (`--store` or the default store root) |
|
|
238
289
|
|
|
239
290
|
Project `REVIEW_GUIDELINES.md` is loaded as a review constraint. `AGENTS.md`, `CRITIQUE.md`, and `CLAUDE.md` can seed author instructions.
|