@critiquedotsh/harness 0.1.8 → 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 +47 -0
- package/dist/cli.js +4178 -426
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -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
|
|
@@ -99,6 +115,10 @@ 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>]
|
|
@@ -114,6 +134,9 @@ critique-code help
|
|
|
114
134
|
| --- | --- |
|
|
115
135
|
| `critique-code` / `chat` | Interactive author session |
|
|
116
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. |
|
|
117
140
|
| `login` | Browser device approval; connect Critique Inference |
|
|
118
141
|
| `settings` / `keys` / `models` | TUI for route, stored keys, and model ids |
|
|
119
142
|
| `review` | Evidence harness (JSON on stdout) |
|
|
@@ -137,6 +160,8 @@ critique-code help
|
|
|
137
160
|
| `--voice` | Start the author session in voice mode |
|
|
138
161
|
| `--json` | Print the session envelope on stdout even on a TTY |
|
|
139
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` |
|
|
140
165
|
| `-h` / `help` | Help |
|
|
141
166
|
|
|
142
167
|
`critique-code review` is read-only. Use `critique-code repair <review-run-id>` for explicit repair. `--repair apply` on `review` is rejected.
|
|
@@ -149,6 +174,9 @@ Type `/` or `/help` for a selectable picker. **Lines that start with `/` never g
|
|
|
149
174
|
| --- | --- |
|
|
150
175
|
| `/` `/help` | Picker / help |
|
|
151
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 |
|
|
152
180
|
| `/voice` | Record one spoken prompt (Qwen3 ASR) |
|
|
153
181
|
| `/voice on` | Keep listening after each reply |
|
|
154
182
|
| `/voice off` | Return to the keyboard |
|
|
@@ -229,6 +257,24 @@ Also:
|
|
|
229
257
|
- `CRITIQUE_INFERENCE_BASE_URL` — override `https://critique.sh/api/v1`
|
|
230
258
|
- `CRITIQUE_SITE_URL` — site origin for device login (default derived from the inference URL)
|
|
231
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`.
|
|
232
278
|
|
|
233
279
|
## Files on disk
|
|
234
280
|
|
|
@@ -238,6 +284,7 @@ Nothing secret is written into the repository.
|
|
|
238
284
|
| --- | --- |
|
|
239
285
|
| `~/.critique/code/auth.json` | Stored API keys (mode `0600`) |
|
|
240
286
|
| `~/.critique/code/settings.json` | Route and model selection |
|
|
287
|
+
| `~/.critique/code/portals.json` | Slack / Telegram / webhook portal tokens (mode `0600`) |
|
|
241
288
|
| Review/repair store | Outcomes and repair artifacts (`--store` or the default store root) |
|
|
242
289
|
|
|
243
290
|
Project `REVIEW_GUIDELINES.md` is loaded as a review constraint. `AGENTS.md`, `CRITIQUE.md`, and `CLAUDE.md` can seed author instructions.
|