instruckt 0.4.19 → 0.4.21

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.
@@ -2348,20 +2348,6 @@ function nodeFilter(node) {
2348
2348
  if ((_a2 = node.getAttribute) == null ? void 0 : _a2.call(node, "data-instruckt")) return false;
2349
2349
  return true;
2350
2350
  }
2351
- function hasShadowDOM() {
2352
- if (document.querySelector("[data-flux], flux\\:button, flux\\:input")) return true;
2353
- for (const child of document.body.querySelectorAll("*")) {
2354
- if (child.shadowRoot && !child.hasAttribute("data-instruckt")) return true;
2355
- }
2356
- return false;
2357
- }
2358
- var _useScreenCapture = null;
2359
- function shouldUseScreenCapture() {
2360
- if (_useScreenCapture === null) {
2361
- _useScreenCapture = hasShadowDOM();
2362
- }
2363
- return _useScreenCapture;
2364
- }
2365
2351
  var activeStream = null;
2366
2352
  async function getStream() {
2367
2353
  if (activeStream && activeStream.active) return activeStream;
@@ -2408,15 +2394,13 @@ function captureRectFromStream(stream, rect) {
2408
2394
  });
2409
2395
  }
2410
2396
  async function captureElement(el) {
2411
- if (!shouldUseScreenCapture()) {
2412
- try {
2413
- const dataUrl = await domToPng(el, {
2414
- scale: 2,
2415
- filter: nodeFilter
2416
- });
2417
- if (dataUrl) return dataUrl;
2418
- } catch (e) {
2419
- }
2397
+ try {
2398
+ const dataUrl = await domToPng(el, {
2399
+ scale: 2,
2400
+ filter: nodeFilter
2401
+ });
2402
+ if (dataUrl) return dataUrl;
2403
+ } catch (e) {
2420
2404
  }
2421
2405
  try {
2422
2406
  const stream = await getStream();
@@ -2427,15 +2411,13 @@ async function captureElement(el) {
2427
2411
  }
2428
2412
  }
2429
2413
  async function captureRegion(rect) {
2430
- if (!shouldUseScreenCapture()) {
2431
- try {
2432
- const full = await domToPng(document.body, {
2433
- scale: 2,
2434
- filter: nodeFilter
2435
- });
2436
- if (full) return await cropImage(full, rect);
2437
- } catch (e) {
2438
- }
2414
+ try {
2415
+ const full = await domToPng(document.body, {
2416
+ scale: 2,
2417
+ filter: nodeFilter
2418
+ });
2419
+ if (full) return await cropImage(full, rect);
2420
+ } catch (e) {
2439
2421
  }
2440
2422
  try {
2441
2423
  const stream = await getStream();
@@ -3770,6 +3752,14 @@ No open annotations.`;
3770
3752
  lines.push("");
3771
3753
  });
3772
3754
  }
3755
+ const hasScreenshots = pending.some((a) => a.screenshot && !a.screenshot.startsWith("data:"));
3756
+ lines.push("---");
3757
+ lines.push("");
3758
+ if (hasScreenshots) {
3759
+ lines.push("Use the `instruckt.get_screenshot` MCP tool to view screenshots. After making changes, use `instruckt.resolve` to mark each annotation as resolved.");
3760
+ } else {
3761
+ lines.push("After making changes, use the `instruckt.resolve` MCP tool to mark each annotation as resolved.");
3762
+ }
3773
3763
  return lines.join("\n").trim();
3774
3764
  }
3775
3765
  // ── Public API ────────────────────────────────────────────────