@tempo-ai/mcp 0.0.108 → 0.0.109-staging.1

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-TLB5CTFV.js";
5
+ } from "./chunk-I5V4NC67.js";
6
6
  import "./chunk-KFUOQZBJ.js";
7
7
 
8
8
  // src/bin.ts
@@ -8,7 +8,7 @@ import {
8
8
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
9
9
  import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
10
10
  async function connectAggregate(options) {
11
- const { createTempoAggregate } = await import("./serve-C7D3CKVT.js");
11
+ const { createTempoAggregate } = await import("./serve-T3XPU4YF.js");
12
12
  const handle = await createTempoAggregate(options);
13
13
  const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
14
14
  const client = new Client({ name: "tempo-mcp-cli", version: "0" });
@@ -127,4 +127,4 @@ export {
127
127
  runCall,
128
128
  runTools
129
129
  };
130
- //# sourceMappingURL=call-VWBUQAPD.js.map
130
+ //# sourceMappingURL=call-ZAJ4EHFP.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-C7D3CKVT.js");
160
+ const { runServe } = await import("./serve-T3XPU4YF.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-VWBUQAPD.js");
175
+ const { runTools } = await import("./call-ZAJ4EHFP.js");
176
176
  return await runTools(rest);
177
177
  }
178
178
  case "call": {
179
- const { runCall } = await import("./call-VWBUQAPD.js");
179
+ const { runCall } = await import("./call-ZAJ4EHFP.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-TLB5CTFV.js.map
198
+ //# sourceMappingURL=chunk-I5V4NC67.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-TLB5CTFV.js";
4
+ } from "./chunk-I5V4NC67.js";
5
5
  import "./chunk-KFUOQZBJ.js";
6
6
  export {
7
7
  run
@@ -30198,8 +30198,9 @@ Hint: ${current.hint}` : "";
30198
30198
  if (!publicUrl) {
30199
30199
  const crashed = this.lastExitCrashed;
30200
30200
  const probeBlocked = !crashed && !this.stopped && !probeResult.sawResponder;
30201
- const wrongResponder = !crashed && !this.stopped && probeResult.sawResponder && !probeResult.identityFailure;
30202
- const identityFailure = !crashed && !this.stopped && probeResult.identityFailure;
30201
+ const canClassifyResponder = !crashed && this.hasLivenessAuthority();
30202
+ const wrongResponder = canClassifyResponder && probeResult.sawResponder && !probeResult.identityFailure;
30203
+ const identityFailure = canClassifyResponder && probeResult.identityFailure;
30203
30204
  let message = crashed ? "Dev server exited before its URL became reachable" : "Tempo host URL did not become reachable in time";
30204
30205
  if (wrongResponder) {
30205
30206
  const target = publicUrlCandidates[0] ?? "";
@@ -47499,8 +47500,7 @@ function readNavigatedMark(error) {
47499
47500
  return error !== null && typeof error === "object" && navigatedErrors.has(error);
47500
47501
  }
47501
47502
  function documentReplaced(start, now, expectedNavigations) {
47502
- const ownSameDocument = now.sameDocumentIssued - start.sameDocumentIssued;
47503
- return now.navigationRequests > start.navigationRequests + expectedNavigations || now.frameNavigations > start.frameNavigations + expectedNavigations + ownSameDocument;
47503
+ return now.navigationRequests > start.navigationRequests + expectedNavigations || now.documentCommits > start.documentCommits + expectedNavigations;
47504
47504
  }
47505
47505
  var BOARD_ATTEMPT_LIMIT = 3;
47506
47506
  function decideBoardRetry(attempt, attemptIndex, attemptLimit = BOARD_ATTEMPT_LIMIT) {
@@ -47590,6 +47590,7 @@ async function startCaptureSession(options) {
47590
47590
  await context.addInitScript(buildFreezeInitScript());
47591
47591
  await context.addInitScript(installRenderProfileInPage);
47592
47592
  const page = await context.newPage();
47593
+ const documentEvents = await context.newCDPSession(page);
47593
47594
  const worker = {
47594
47595
  context,
47595
47596
  page,
@@ -47598,12 +47599,13 @@ async function startCaptureSession(options) {
47598
47599
  hasNavigated: false,
47599
47600
  counters: {
47600
47601
  navigationRequests: 0,
47601
- frameNavigations: 0,
47602
- sameDocumentIssued: 0
47602
+ documentCommits: 0
47603
47603
  },
47604
47604
  documentsLoaded: 0,
47605
47605
  navigationsInFlight: 0,
47606
47606
  async dispose() {
47607
+ await documentEvents.detach().catch(() => {
47608
+ });
47607
47609
  await page.close().catch(() => {
47608
47610
  });
47609
47611
  await context.close().catch(() => {
@@ -47627,9 +47629,10 @@ async function startCaptureSession(options) {
47627
47629
  if (!isMainFrameNavigation(request)) return;
47628
47630
  worker.navigationsInFlight = Math.max(0, worker.navigationsInFlight - 1);
47629
47631
  });
47630
- page.on("framenavigated", (frame) => {
47631
- if (frame === page.mainFrame()) worker.counters.frameNavigations += 1;
47632
+ documentEvents.on("Page.frameNavigated", ({ frame }) => {
47633
+ if (!frame.parentId) worker.counters.documentCommits += 1;
47632
47634
  });
47635
+ await documentEvents.send("Page.enable");
47633
47636
  page.on("domcontentloaded", () => {
47634
47637
  worker.documentsLoaded += 1;
47635
47638
  worker.navigationsInFlight = 0;
@@ -47695,10 +47698,11 @@ async function startCaptureSession(options) {
47695
47698
  } else {
47696
47699
  if (worker.currentSelector === selector) {
47697
47700
  await page.evaluate((url) => {
47698
- history.replaceState(null, "", url);
47699
- window.dispatchEvent(new PopStateEvent("popstate"));
47701
+ history.replaceState(history.state, "", url);
47702
+ window.dispatchEvent(
47703
+ new PopStateEvent("popstate", { state: history.state })
47704
+ );
47700
47705
  }, buildDirectRenderIdleUrl(options.hostUrl));
47701
- worker.counters.sameDocumentIssued += 1;
47702
47706
  await page.waitForSelector(worker.currentSelector, {
47703
47707
  state: "detached",
47704
47708
  timeout: capture.settleTimeoutMs ?? options.settleTimeoutMs ?? 3e4
@@ -47709,12 +47713,13 @@ async function startCaptureSession(options) {
47709
47713
  const captureWindow = window;
47710
47714
  captureWindow.__tempoResetCaptureDeterminism?.();
47711
47715
  captureWindow.__tempoCaptureRenderProfile?.begin(nextSelector);
47712
- history.replaceState(null, "", url);
47713
- window.dispatchEvent(new PopStateEvent("popstate"));
47716
+ history.replaceState(history.state, "", url);
47717
+ window.dispatchEvent(
47718
+ new PopStateEvent("popstate", { state: history.state })
47719
+ );
47714
47720
  },
47715
47721
  { url: targetUrl, nextSelector: selector }
47716
47722
  );
47717
- worker.counters.sameDocumentIssued += 1;
47718
47723
  }
47719
47724
  worker.currentSelector = selector;
47720
47725
  } finally {
@@ -48035,7 +48040,7 @@ async function startCaptureSession(options) {
48035
48040
  if (isReloadStorm(recentReloadRetries, stormWindow)) {
48036
48041
  aborted = true;
48037
48042
  throw new CaptureReloadStormError(
48038
- `capture aborted: the devserver reloaded during the last ${stormWindow} storyboards in a row (${reloadRetriesTotal} re-captures so far) \u2014 it is re-optimizing or restarting continuously; see the "devserver:" lines above`
48043
+ `capture aborted: the document reloaded during the last ${stormWindow} storyboards in a row (${reloadRetriesTotal} re-captures so far) \u2014 check the devserver output and storyboard navigation for repeated reloads`
48039
48044
  );
48040
48045
  }
48041
48046
  if (result.status === "render-error") {
@@ -51334,7 +51339,7 @@ function buildBackends(runtime, toolsets, workspace) {
51334
51339
  }
51335
51340
 
51336
51341
  // src/version.ts
51337
- var CLI_VERSION = "0.0.108";
51342
+ var CLI_VERSION = "0.0.109-staging.1";
51338
51343
 
51339
51344
  // src/canvas-hooks.ts
51340
51345
  var import_pngjs4 = __toESM(require_png(), 1);
@@ -52271,4 +52276,4 @@ export {
52271
52276
  runServe,
52272
52277
  scopeParamsFor
52273
52278
  };
52274
- //# sourceMappingURL=serve-C7D3CKVT.js.map
52279
+ //# sourceMappingURL=serve-T3XPU4YF.js.map