@tempo-ai/mcp 0.0.113-staging.2 → 0.0.113-staging.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.
package/dist/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __tempoCreateRequire } from 'node:module'; const require = __tempoCreateRequire(import.meta.url);
3
3
  import {
4
4
  run
5
- } from "./chunk-OSUCQ23V.js";
5
+ } from "./chunk-IC3SRTRB.js";
6
6
  import "./chunk-3J3V3CVG.js";
7
7
  import "./chunk-WRI3HTCJ.js";
8
8
 
@@ -9,7 +9,7 @@ import "./chunk-WRI3HTCJ.js";
9
9
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
10
10
  import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
11
11
  async function connectAggregate(options) {
12
- const { createTempoAggregate } = await import("./serve-RQQ7X7E2.js");
12
+ const { createTempoAggregate } = await import("./serve-B3XMDJMJ.js");
13
13
  const handle = await createTempoAggregate(options, { stageDocuments: false });
14
14
  const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
15
15
  const client = new Client({ name: "tempo-mcp-cli", version: "0" });
@@ -128,4 +128,4 @@ export {
128
128
  runCall,
129
129
  runTools
130
130
  };
131
- //# sourceMappingURL=call-YX5RP352.js.map
131
+ //# sourceMappingURL=call-ZENVEMBV.js.map
@@ -157,7 +157,7 @@ async function run(argv) {
157
157
  process.stderr.write(USAGE);
158
158
  return 1;
159
159
  }
160
- const { runServe } = await import("./serve-RQQ7X7E2.js");
160
+ const { runServe } = await import("./serve-B3XMDJMJ.js");
161
161
  return await runServe(options);
162
162
  }
163
163
  switch (subcommand) {
@@ -172,11 +172,11 @@ async function run(argv) {
172
172
  return await runToken(rest);
173
173
  }
174
174
  case "tools": {
175
- const { runTools } = await import("./call-YX5RP352.js");
175
+ const { runTools } = await import("./call-ZENVEMBV.js");
176
176
  return await runTools(rest);
177
177
  }
178
178
  case "call": {
179
- const { runCall } = await import("./call-YX5RP352.js");
179
+ const { runCall } = await import("./call-ZENVEMBV.js");
180
180
  return await runCall(rest);
181
181
  }
182
182
  default:
@@ -195,4 +195,4 @@ async function run(argv) {
195
195
  export {
196
196
  run
197
197
  };
198
- //# sourceMappingURL=chunk-OSUCQ23V.js.map
198
+ //# sourceMappingURL=chunk-IC3SRTRB.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tempoCreateRequire } from 'node:module'; const require = __tempoCreateRequire(import.meta.url);
2
2
  import {
3
3
  run
4
- } from "./chunk-OSUCQ23V.js";
4
+ } from "./chunk-IC3SRTRB.js";
5
5
  import "./chunk-3J3V3CVG.js";
6
6
  import "./chunk-WRI3HTCJ.js";
7
7
  export {
@@ -47542,6 +47542,7 @@ var SETTLE_STEPS = [
47542
47542
  "content-quiet",
47543
47543
  "paint"
47544
47544
  ];
47545
+ var VIDEO_FRAME_WAIT_CAP_MS = 2e3;
47545
47546
  var DEFAULT_SETTLE_QUIET_MS = 300;
47546
47547
  var DEFAULT_SETTLE_STEP_TIMEOUT_MS = 15e3;
47547
47548
  var DEFAULT_SETTLE_POLL_MS = 50;
@@ -47617,22 +47618,48 @@ function buildSettleWaitScript(options) {
47617
47618
 
47618
47619
  var quietKey = null;
47619
47620
  var quietSince = 0;
47621
+ // When a rendered video was first seen without a decoded frame, and how
47622
+ // long that may hold the quiet window before we give up on it.
47623
+ var videoWaitStartedAt = null;
47624
+ var videoWaitCapMs = ${VIDEO_FRAME_WAIT_CAP_MS};
47620
47625
  // Images that take part in the capture: laid out and not hidden. A
47621
47626
  // hidden responsive variant never starts native lazy loading and must
47622
47627
  // not hold the window; a rendered lazy image never starts either,
47623
47628
  // because a capture does not scroll, so it is asked for eagerly.
47624
- function renderedImages(target) {
47625
- var all = Array.prototype.slice.call(target.querySelectorAll('img'));
47629
+ function renderedMatches(target, tag) {
47630
+ var all = Array.prototype.slice.call(target.querySelectorAll(tag));
47626
47631
  var rendered = [];
47627
47632
  for (var i = 0; i < all.length; i++) {
47628
- var img = all[i];
47629
- if (img.getClientRects().length === 0) continue;
47630
- var visibility = getComputedStyle(img).visibility;
47633
+ var el = all[i];
47634
+ if (el.getClientRects().length === 0) continue;
47635
+ var visibility = getComputedStyle(el).visibility;
47631
47636
  if (visibility === 'hidden' || visibility === 'collapse') continue;
47632
- rendered.push(img);
47637
+ rendered.push(el);
47633
47638
  }
47634
47639
  return rendered;
47635
47640
  }
47641
+ function renderedImages(target) {
47642
+ return renderedMatches(target, 'img');
47643
+ }
47644
+ // A video paints its current frame only once that frame is DECODED.
47645
+ // HAVE_CURRENT_DATA (2) is exactly that bar.
47646
+ //
47647
+ // Everything else here is about FAILING OPEN. The baseline lane runs
47648
+ // this step strict, so a video that can never reach that bar would turn
47649
+ // a capture that used to succeed into a settle.content-quiet timeout \u2014
47650
+ // for every storyboard in the repo, not just ones we had in mind. So a
47651
+ // video only holds the window while it is plausibly ON ITS WAY to a
47652
+ // frame: an errored element, one with no source at all, and one the page
47653
+ // explicitly opted out of loading (preload="none", whose poster-or-
47654
+ // nothing paint is already deterministic) are all treated as finished.
47655
+ function videoFrameReady(video) {
47656
+ if (video.error) return true;
47657
+ if (video.preload === 'none') return true;
47658
+ var networkState = video.networkState;
47659
+ if (networkState === 0 /* NETWORK_EMPTY */) return true;
47660
+ if (networkState === 3 /* NETWORK_NO_SOURCE */) return true;
47661
+ return video.readyState >= 2 /* HAVE_CURRENT_DATA */;
47662
+ }
47636
47663
  function contentQuiet() {
47637
47664
  var target = document.querySelector(selector);
47638
47665
  if (!target) return false;
@@ -47648,6 +47675,23 @@ function buildSettleWaitScript(options) {
47648
47675
  return false;
47649
47676
  }
47650
47677
  }
47678
+ // Second line of defence behind videoFrameReady's fail-open rules: a
47679
+ // video that is legitimately loading can still stall forever (a dev
47680
+ // server that never answers, a huge asset). Waiting is an OPTIMISATION
47681
+ // for baseline stability, never a reason to fail a capture, so the
47682
+ // whole video wait is bounded \u2014 past the cap we capture whatever is
47683
+ // on screen, exactly as we did before videos were considered at all.
47684
+ var videos = renderedMatches(target, 'video');
47685
+ for (var w = 0; w < videos.length; w++) {
47686
+ if (!videoFrameReady(videos[w])) {
47687
+ if (videoWaitStartedAt === null) videoWaitStartedAt = now();
47688
+ if (now() - videoWaitStartedAt < videoWaitCapMs) {
47689
+ quietKey = null;
47690
+ return false;
47691
+ }
47692
+ break;
47693
+ }
47694
+ }
47651
47695
  var rect = target.getBoundingClientRect();
47652
47696
  var text = target.innerText || '';
47653
47697
  var key = [
@@ -52120,7 +52164,7 @@ function buildBackends(runtime, toolsets, workspace) {
52120
52164
  }
52121
52165
 
52122
52166
  // src/version.ts
52123
- var CLI_VERSION = "0.0.113-staging.2";
52167
+ var CLI_VERSION = "0.0.113-staging.3";
52124
52168
 
52125
52169
  // src/canvas-hooks.ts
52126
52170
  var import_pngjs4 = __toESM(require_png(), 1);
@@ -53066,4 +53110,4 @@ unpdf/dist/index.mjs:
53066
53110
  * @license Apache-2.0
53067
53111
  *)
53068
53112
  */
53069
- //# sourceMappingURL=serve-RQQ7X7E2.js.map
53113
+ //# sourceMappingURL=serve-B3XMDJMJ.js.map