@insitue/claude-plugin 0.3.1 → 0.3.2
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/dist/mcp-server.js +7 -1
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -265,7 +265,11 @@ if (!session) {
|
|
|
265
265
|
process.stderr.write(
|
|
266
266
|
"[insitue-mcp] no companion available \u2014 `next_pick` will time out.\n"
|
|
267
267
|
);
|
|
268
|
-
}
|
|
268
|
+
}
|
|
269
|
+
var attached = false;
|
|
270
|
+
function ensureSubscriberAttached() {
|
|
271
|
+
if (attached || !session) return;
|
|
272
|
+
attached = true;
|
|
269
273
|
connectToCompanion(session);
|
|
270
274
|
}
|
|
271
275
|
var server = new McpServer({
|
|
@@ -283,6 +287,7 @@ server.registerTool(
|
|
|
283
287
|
}
|
|
284
288
|
},
|
|
285
289
|
async ({ timeout_ms }) => {
|
|
290
|
+
ensureSubscriberAttached();
|
|
286
291
|
const ms = timeout_ms ?? NEXT_PICK_DEFAULT_TIMEOUT_MS;
|
|
287
292
|
const pick = await buffer.next(ms);
|
|
288
293
|
if (!pick) {
|
|
@@ -311,6 +316,7 @@ server.registerTool(
|
|
|
311
316
|
}
|
|
312
317
|
},
|
|
313
318
|
async ({ limit }) => {
|
|
319
|
+
ensureSubscriberAttached();
|
|
314
320
|
const picks = buffer.recent(limit ?? 10);
|
|
315
321
|
return {
|
|
316
322
|
content: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insitue/claude-plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|