@insitue/claude-plugin 0.6.1 → 0.6.3

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.5.1",
3
+ "version": "0.5.3",
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,13 @@
1
1
  # @insitue/claude-plugin
2
2
 
3
+ ## 0.6.3
4
+
5
+ - **Responsive watch — interject without cancelling.** The `next_pick` long-poll is now 8s (was 25s). While the watch is running you can just type a message: Claude Code queues it and delivers it the moment the poll returns (≤~8s), so you no longer have to cancel the watch to ask a question. The connect instructions now make clear the watch never needs to be cancelled to talk — Claude answers and resumes watching.
6
+
7
+ ## 0.6.2
8
+
9
+ - **Echo the request before fixing.** The cloud-issue instructions (connect.md + the `claim_cloud_issue` tool) now require Claude to print the exact request verbatim ("Fixing locally: …") before any analysis or edits, so you always see what it's about to act on.
10
+
3
11
  ## 0.6.1
4
12
 
5
13
  - **Fix: refuse to reuse a stale companion.** `ensureCompanion` now checks a reachable companion's version via the handshake and, if it is older than the cloud-feature floor (0.7.0), tears it down and spawns the current one — instead of silently attaching to a stale companion left on the port.
@@ -31,13 +31,17 @@ Either path is fine; pick whichever your runtime has.
31
31
  any picks the user made before you attached, summarise them
32
32
  ("you picked X but haven't sent a description yet — make sure
33
33
  to click Send in the InSitue panel"). Otherwise just say
34
- "Connected. Pick something in the browser when you're ready."
34
+ "Connected pick something in the browser when you're ready.
35
+ You can also just type to ask me anything anytime; I'll answer
36
+ and keep watching, no need to cancel."
35
37
  2. Enter the loop: call `mcp__insitue__next_pick`. It long-polls
36
- (~25s default — short on purpose so the chat stays responsive
37
- to other questions the user might type while you wait). When
38
- it returns with `status: "timeout"`, **call it again immediately
39
- without announcing it** the timeout is just a heartbeat, not
40
- news. When it returns with `status: "ok"`:
38
+ (~8sdeliberately short. The user can type at ANY time without
39
+ cancelling: Claude Code queues their message and delivers it the
40
+ moment this call returns, so a short poll means they wait at most
41
+ ~8s to reach you and never need to hit Esc). When it returns with
42
+ `status: "timeout"` **and the user hasn't said anything**, call it
43
+ again immediately without announcing it — the timeout is just a
44
+ heartbeat, not news. When it returns with `status: "ok"`:
41
45
  - **Always echo the prompt back first.** Before any action,
42
46
  diff, or follow-up question, lead with:
43
47
 
@@ -73,10 +77,14 @@ Either path is fine; pick whichever your runtime has.
73
77
  again. **Do not narrate the loop** — no "still waiting…", no
74
78
  "polling again…". The user sees `[insitue] 📥 pick received`
75
79
  on stderr the moment their pick lands; that's the
76
- confirmation, not your narration. If the user types another
77
- question while you're between calls, answer it first (since
78
- the chat is responsive), then resume the loop with
79
- `next_pick`.
80
+ confirmation, not your narration. **The user never has to cancel
81
+ the watch to talk to you.** When a message from the user arrives
82
+ while you're watching (it queues during the poll and lands the
83
+ moment `next_pick` returns), STOP looping, answer it fully, and do
84
+ whatever they ask — then resume the watch by calling `next_pick`
85
+ again. Their message is the priority; the watch waits for them, not
86
+ the other way around. Never tell the user to cancel or re-run
87
+ `/insitue:connect` just to ask a question.
80
88
  4. **End the session properly.** When the user says "stop",
81
89
  "done", "quit", "thanks", "exit", "disconnect", "stop
82
90
  insitue", or anything else that clearly ends the InSitue
@@ -160,8 +168,14 @@ action.
160
168
  **Typical loop:**
161
169
 
162
170
  1. `list_cloud_issues` → pick an issue with the user.
163
- 2. `claim_cloud_issue <id>` → read `source.file` around `source.line`,
164
- understand the repro from `note` + `consoleErrors`, make the fix.
171
+ 2. `claim_cloud_issue <id>` → **before doing anything else**, echo the
172
+ exact request verbatim to the developer:
173
+
174
+ > **Fixing locally:** [verbatim `note` from the claim response]
175
+ > (Source: `source.file:source.line`)
176
+
177
+ Then read `source.file` around `source.line`, understand the repro
178
+ from `note` + `consoleErrors`, make the fix.
165
179
  3. Open a PR.
166
180
  4. `resolve_cloud_issue <id> <prUrl>`.
167
181
 
@@ -169,6 +183,18 @@ The cloud-issue workflow follows the same guardrails as browser picks:
169
183
  never auto-apply writes, always wait for explicit user approval before
170
184
  editing files.
171
185
 
186
+ **Echo guardrail (cloud-issue path).** Mirroring the pick-loop rule
187
+ ("Always echo the prompt back first"): after a successful
188
+ `claim_cloud_issue`, the FIRST thing you output to the developer MUST
189
+ be the exact issue `note` in the format above — verbatim, not
190
+ paraphrased. The CLI transcript only shows your output, not the
191
+ dashboard description the reporter wrote. Without the echo the
192
+ developer cannot confirm you're acting on the right issue before edits
193
+ begin. Note: when an issue arrives via the browser "Fix locally"
194
+ button it flows through the normal pick loop and the existing
195
+ pick-echo rule already applies — but the same requirement holds when
196
+ you claim via the cloud-issue tool path directly.
197
+
172
198
  ## Failure modes to handle gracefully
173
199
 
174
200
  - **`source.file` doesn't exist**: tell the user the path the
@@ -204,7 +204,7 @@ function readPackageVersion() {
204
204
  return "unknown";
205
205
  }
206
206
  var MAX_BUFFERED_PICKS = 32;
207
- var NEXT_PICK_DEFAULT_TIMEOUT_MS = 25 * 1e3;
207
+ var NEXT_PICK_DEFAULT_TIMEOUT_MS = 8 * 1e3;
208
208
  var NEXT_PICK_MAX_TIMEOUT_MS = 30 * 60 * 1e3;
209
209
  function findSession(projectDir2) {
210
210
  const candidate = join3(projectDir2, ".insitue", "session.json");
@@ -999,7 +999,7 @@ server.registerTool(
999
999
  source,
1000
1000
  url,
1001
1001
  consoleErrors,
1002
- instructions: "Read the source file around the line, reproduce the issue from the description, make the fix, open a PR, then call resolve_cloud_issue with the PR url."
1002
+ instructions: 'FIRST, echo the exact issue note verbatim to the developer before any analysis or edits: output "**Fixing locally:** <note>" followed by "(Source: <file>:<line>)" so they can confirm what is being acted on. THEN read the source file around the line, reproduce the issue from the description, make the fix, open a PR, then call resolve_cloud_issue with the PR url.'
1003
1003
  })
1004
1004
  }
1005
1005
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insitue/claude-plugin",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
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",