@insitue/claude-plugin 0.7.6 → 0.7.7

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "insitue",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "Drive a Claude Code session from the InSitue browser overlay. Pick an element in your app, claude reads the file and proposes the edit.",
5
5
  "mcpServers": {
6
6
  "insitue": {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # @insitue/claude-plugin
2
2
 
3
+ ## 0.7.7
4
+
5
+ - **New `/insitue:watch` — hands-free pick mode.** Acts on every browser pick the instant you make it (press Esc once to chat; the watch resumes after). `/insitue:connect` stays the responsive default (never blocks your typing; a pick is grabbed on your next message). Pick whichever fits — on a poll you can have instant OR non-blocking, not both.
6
+ - **Channels demoted to a footnote.** The connect message and README now point you at `/insitue:watch` for hands-free instead of the per-launch `--dangerously-load-development-channels` flag (which can't be enabled once-and-for-all by individual users). Channels remain documented as the future zero-friction push path.
7
+
3
8
  ## 0.7.6
4
9
 
5
10
  - **Fix the channels command (again) — use ONE flag.** `--dangerously-load-development-channels` is itself variadic and takes the channel entry directly; passing `--channels` after it makes the dev flag swallow `--channels` as an (invalid) entry ("entries must be tagged"). Correct form: `claude --dangerously-load-development-channels plugin:insitue@insitue-plugins`. (`--channels` alone is the separate allowlisted-plugin path.)
package/README.md CHANGED
@@ -47,15 +47,22 @@ auto-start the InSitue companion process in the background of
47
47
  your `claude` session — no separate terminal to babysit. The
48
48
  slash command `/insitue:connect` enters the loop.
49
49
 
50
- The plugin ships four slash commands:
50
+ The plugin ships five slash commands:
51
51
 
52
52
  | Command | What it does |
53
53
  |---|---|
54
- | `/insitue:connect` | Enter the pick→edit loop receive browser picks and act on them. |
54
+ | `/insitue:connect` | Enter the pick→edit loop (responsive): act on picks, never blocks your typing — a pick is grabbed on your next message. |
55
+ | `/insitue:watch` | Hands-free pick mode (proactive): act on every pick the instant you make it. Press Esc once to chat; the watch resumes after. |
55
56
  | `/insitue:disconnect` | Leave the loop: close the WS, stop receiving picks, and kill the companion the plugin spawned. |
56
57
  | `/insitue:login` | Browser sign-in (PKCE) to InSitue Cloud, then auto-link this repo to its project. |
57
58
  | `/insitue:logout` | Revoke the token server-side and clear local credentials. |
58
59
 
60
+ **Two watch modes, because polling forces a trade-off.** `/insitue:connect`
61
+ keeps your chat fully responsive but a pick waits for your next message;
62
+ `/insitue:watch` acts on picks instantly but you press Esc to interject. You
63
+ can't have both on a poll — only *push* (channels, below) gives instant +
64
+ non-blocking, and that's still a research preview.
65
+
59
66
  ### 1B. Claude Desktop — one-command setup
60
67
 
61
68
  Claude Desktop doesn't have a plugin marketplace, but it does
@@ -186,35 +193,37 @@ before writing. After it writes, your dev server's HMR picks up
186
193
  the change and you see it live in the browser. Pick the next
187
194
  thing.
188
195
 
189
- ### Live picks without blocking the chat (channels, preview)
196
+ ### Hands-free picks `/insitue:watch` now, channels later
190
197
 
191
- By default the agent polls `next_pick` every ~8 s — the chat is
192
- technically available between polls, but the polling loop runs
193
- continuously in the background.
198
+ By default (`/insitue:connect`) the chat stays fully responsive and a pick
199
+ is grabbed on your next message. For a heads-down session where you want
200
+ every pick acted on the instant you make it, run **`/insitue:watch`** (press
201
+ Esc once to chat; the watch resumes after).
194
202
 
195
- As an opt-in upgrade (Claude Code CLI only, research preview),
196
- you can have picks **pushed** directly into the session so the
197
- chat stays completely free between picks:
203
+ Neither polling mode is *both* instant and non-blocking that needs picks
204
+ **pushed** into an idle session, which Claude Code supports today only as a
205
+ research-preview "channel":
198
206
 
199
207
  ```bash
200
208
  claude --dangerously-load-development-channels plugin:insitue@insitue-plugins
201
209
  ```
202
210
 
203
- With this flag, every pick the user sends from the browser wakes
204
- Claude immediately via a channel notification no polling needed,
205
- and the chat is genuinely idle between picks. Claude still buffers
206
- picks for `next_pick` in parallel, so a stale session or a missing
207
- channel listener falls back to the normal poll automatically.
211
+ With that flag, every browser pick wakes Claude immediately via a channel
212
+ notification instant *and* the chat stays free. Claude still buffers picks
213
+ for `next_pick` in parallel, so a missing channel listener falls back to
214
+ polling automatically.
208
215
 
209
216
  **Notes:**
210
- - This is a **Claude Code research-preview** feature. The flag
211
- `--dangerously-load-development-channels` is required during the
212
- preview period and may change or be renamed in a future release.
213
- - **Dropping the flag:** on Team/Enterprise, an admin can add `insitue`
214
- to the `allowedChannelPlugins` org policy then the channel runs with
215
- just `claude --channels plugin:insitue@insitue-plugins` (no dangerous flag). Once
216
- channels leave research preview / the plugin is on Anthropic's default
217
- allowlist, the flag won't be needed at all.
217
+ - Channels are a **Claude Code research preview**, and the flag must be
218
+ passed **every launch** — there's no settings-level enable for individual
219
+ users yet, so it isn't an "opt in once" experience. Until it graduates,
220
+ `/insitue:watch` is the no-flag way to get hands-free picks.
221
+ - The flag `--dangerously-load-development-channels` may change or be renamed
222
+ during the preview.
223
+ - **Org allowlist:** on Team/Enterprise an admin can add `insitue` to the
224
+ `allowedChannelPlugins` policy then it runs with just
225
+ `claude --channels plugin:insitue@insitue-plugins`. Once channels leave
226
+ research preview, no flag will be needed at all.
218
227
  - It works only with the CLI (`claude`), not Claude Desktop.
219
228
  - The standard `/insitue:connect` workflow (plain `claude`, no
220
229
  extra flags) continues to work exactly as before via polling —
@@ -66,13 +66,13 @@ your context and skip any id you've already processed.
66
66
  ("you picked X but haven't sent a description yet — make sure
67
67
  to click Send in the InSitue panel"). Otherwise say:
68
68
 
69
- > Connected. Pick an element in the browser and I'll act on it
70
- > here. You can also just type to ask me anything — I'll answer
71
- > right away, then keep watching.
69
+ > Connected. Pick an element in the browser, then send me any
70
+ > message and I'll act on it — or just type to ask me anything,
71
+ > anytime. I never block your typing.
72
72
  >
73
- > Tip: for hands-free background picks (so I act the moment you
74
- > pick, without you waiting on me), relaunch with
75
- > `claude --dangerously-load-development-channels plugin:insitue@insitue-plugins`.
73
+ > Tip: for a hands-free session where I act on every pick the
74
+ > instant you make it (no need to message me first), run
75
+ > `/insitue:watch`.
76
76
 
77
77
  2. **Watch for a pick — ONE poll, then hand control back.** Call
78
78
  `mcp__insitue__next_pick` (it long-polls ~8s).
@@ -87,9 +87,10 @@ your context and skip any id you've already processed.
87
87
  > grab whatever you picked.
88
88
 
89
89
  Then wait for the user. You resume watching on their next message
90
- (step 3). In plain poll mode you catch picks when the user next
91
- interacts for truly hands-free push *between* messages, they need
92
- channel mode (the tip in step 1).
90
+ (step 3). In this mode you catch picks when the user next interacts.
91
+ If they want every pick acted on the instant it's made (hands-free),
92
+ tell them to run `/insitue:watch` (proactive mode; Esc to chat). True
93
+ push *between* messages also works if they started in channel mode.
93
94
  - On `status: "ok"` (a pick arrived):
94
95
  - **Always echo the prompt back first.** Before any action,
95
96
  diff, or follow-up question, lead with:
@@ -0,0 +1,73 @@
1
+ ---
2
+ description: Hands-free InSitue pick mode — Claude watches and acts on every browser pick the instant you make it (press Esc to chat).
3
+ ---
4
+
5
+ # /insitue:watch
6
+
7
+ Proactive pick mode. Unlike `/insitue:connect` — which hands control
8
+ back after each short poll so you can type freely, and grabs your pick
9
+ on your next message — this **stays watching**: Claude long-polls for
10
+ picks and acts on each one the moment you make it, truly hands-free.
11
+
12
+ The trade-off (a Claude Code constraint, not a choice): while a poll is
13
+ running, the only way to send a message is to press **Esc** once. Claude
14
+ answers, then resumes watching. So:
15
+
16
+ - Use **`/insitue:watch`** for heads-down sessions — you're clicking
17
+ through the UI and want every pick handled with zero nudging.
18
+ - Use **`/insitue:connect`** for mixed work — you chat as much as you
19
+ pick and never want to hit Esc (a pick waits for your next message).
20
+
21
+ ## Your behaviour
22
+
23
+ 1. **Attach + announce.** Call `mcp__insitue__list_recent_picks` once —
24
+ this attaches the subscriber, so the browser launcher turns purple.
25
+ Handle any already-buffered picks (step 2 rules). Then say, in one
26
+ line:
27
+
28
+ > 👀 Hands-free watch on — pick anywhere in the browser and I'll act
29
+ > on it immediately. Press **Esc** once if you want to ask me
30
+ > something; I'll pick the watch back up after.
31
+
32
+ 2. **Watch loop.** Call `mcp__insitue__next_pick` with a long
33
+ `timeout_ms` (`600000` — 10 min; a pick still returns the instant
34
+ it's made, the timeout is just a heartbeat).
35
+ - On `status: "ok"`: handle the pick using the **same rules as
36
+ `/insitue:connect`** — echo the prompt verbatim FIRST
37
+ (`> **You asked:** <pick.userNote>` + `source.file:line` +
38
+ `confidence`), read the file around `source.line`, warn if
39
+ `confidence` is `approximate`, refuse `selector-only`, propose a
40
+ diff, wait for explicit approval, then write with the Edit tool
41
+ (Code) / `mcp__insitue__apply_edit` (Desktop). Then call
42
+ `next_pick` again — keep watching.
43
+ - On `status: "timeout"`: just call `next_pick` again. **Do not
44
+ narrate the loop** ("still watching…"). The browser prints
45
+ `[insitue] 📥 pick received` itself when a pick lands.
46
+
47
+ 3. **When the user interjects** (they pressed Esc and typed): answer
48
+ them fully and do whatever they ask, then resume the watch loop by
49
+ calling `next_pick` again. Their message is always the priority —
50
+ never tell them to cancel or re-run anything to talk to you.
51
+
52
+ 4. **Exit.** When the user says "stop watching", "done", "stop", "quit",
53
+ or runs `/insitue:disconnect`, call `mcp__insitue__end_session` once,
54
+ confirm in a single line, and stop calling `next_pick`. If their
55
+ "stop" is clearly scoped to the current task (not ending InSitue),
56
+ keep watching — read the room.
57
+
58
+ ## Guardrails
59
+
60
+ Same as `/insitue:connect`: one pick = one approved edit, never
61
+ auto-apply, trust `pick.userNote` as the instruction (it's a change
62
+ request, not a discussion), cite the file + lines you read, and defer
63
+ broad refactors with a follow-up question rather than bundling silently.
64
+
65
+ ## Why two modes?
66
+
67
+ Browser picks reach Claude by polling the companion (`next_pick`). A
68
+ running poll can't be interrupted except with Esc, and Claude Code only
69
+ delivers a queued message when a turn ends — so a watch is either
70
+ proactive (this command, Esc to talk) or non-blocking (`/insitue:connect`,
71
+ pick waits for your next message), not both. When Claude Code Channels
72
+ leave research preview, InSitue will push picks to an idle session and
73
+ this trade-off disappears.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insitue/claude-plugin",
3
- "version": "0.7.6",
3
+ "version": "0.7.7",
4
4
  "description": "Drive Claude (Code AND Desktop) from the InSitue browser overlay — pick an element in your app, claude reads the file and proposes the edit.",
5
5
  "keywords": [
6
6
  "insitue",