@tempo-ai/mcp 0.0.126-staging.2 → 0.0.127-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-M4DBXHZ2.js";
5
+ } from "./chunk-QN4UUFIJ.js";
6
6
  import "./chunk-24QSPUN7.js";
7
7
  import "./chunk-JKT5N6IQ.js";
8
8
 
@@ -9,7 +9,7 @@ import "./chunk-JKT5N6IQ.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-SECMASHD.js");
12
+ const { createTempoAggregate } = await import("./serve-H3AJBZ7O.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-WAXCGHEO.js.map
131
+ //# sourceMappingURL=call-IJD353NP.js.map
@@ -122,7 +122,7 @@ async function run(argv) {
122
122
  process.stderr.write(USAGE);
123
123
  return 1;
124
124
  }
125
- const { runServe } = await import("./serve-SECMASHD.js");
125
+ const { runServe } = await import("./serve-H3AJBZ7O.js");
126
126
  return await runServe(options);
127
127
  }
128
128
  switch (subcommand) {
@@ -137,11 +137,11 @@ async function run(argv) {
137
137
  return await runToken(rest);
138
138
  }
139
139
  case "tools": {
140
- const { runTools } = await import("./call-WAXCGHEO.js");
140
+ const { runTools } = await import("./call-IJD353NP.js");
141
141
  return await runTools(rest);
142
142
  }
143
143
  case "call": {
144
- const { runCall } = await import("./call-WAXCGHEO.js");
144
+ const { runCall } = await import("./call-IJD353NP.js");
145
145
  return await runCall(rest);
146
146
  }
147
147
  default:
@@ -164,4 +164,4 @@ async function run(argv) {
164
164
  export {
165
165
  run
166
166
  };
167
- //# sourceMappingURL=chunk-M4DBXHZ2.js.map
167
+ //# sourceMappingURL=chunk-QN4UUFIJ.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-M4DBXHZ2.js";
4
+ } from "./chunk-QN4UUFIJ.js";
5
5
  import "./chunk-24QSPUN7.js";
6
6
  import "./chunk-JKT5N6IQ.js";
7
7
  export {
@@ -75697,10 +75697,12 @@ function registerAgentTools(server, deps) {
75697
75697
  },
75698
75698
  async (args, ctx) => {
75699
75699
  try {
75700
+ const originChatTabId = getOriginChatTabId?.();
75700
75701
  const origin = ctx.artifactOrigin;
75701
75702
  const branchName = origin && getCurrentBranch2 ? (await getCurrentBranch2().catch(() => null))?.trim() || origin.branchName : origin?.branchName;
75702
75703
  const runId = await convex.mutation(api4.agentRuns.runAgentManually, {
75703
75704
  agentId: args.agentId,
75705
+ ...originChatTabId ? { originChatTabId } : {},
75704
75706
  ...args.task ? { task: args.task } : {},
75705
75707
  ...origin && branchName ? {
75706
75708
  artifactOrigin: {
@@ -87951,7 +87953,7 @@ var MissingRootDepsError = class extends TempoDevServerError {
87951
87953
  // ../tempo-sdk/package.json
87952
87954
  var package_default = {
87953
87955
  name: "tempo-sdk",
87954
- version: "0.0.60",
87956
+ version: "0.0.61",
87955
87957
  publishConfig: {
87956
87958
  tag: "sdk-v2-latest"
87957
87959
  },
@@ -88080,6 +88082,8 @@ var package_default = {
88080
88082
  "@vitejs/plugin-react": "catalog:",
88081
88083
  playwright: "^1.58.2",
88082
88084
  "react-dom": "catalog:",
88085
+ "react-dom18": "npm:react-dom@18.3.1",
88086
+ react18: "npm:react@18.3.1",
88083
88087
  svelte: "5.56.9",
88084
88088
  tsup: "^8.5.1",
88085
88089
  typescript: "catalog:",
@@ -103979,6 +103983,9 @@ function vite() {
103979
103983
  transform(code, id) {
103980
103984
  const file = id.split("?", 1)[0];
103981
103985
  if (!file.endsWith(".css") || readPlan().major !== 4) return;
103986
+ // Vite loads raw/url assets as JavaScript before transform hooks run.
103987
+ // Keep those imports intact; inline/direct requests still contain CSS.
103988
+ if (/(?:\?|&)(?:raw|url)(?:&|$)/.test(id)) return;
103982
103989
  const ast = postcss.parse(code, { from: file });
103983
103990
  if (!augment(ast, file)) return;
103984
103991
  this.addWatchFile(planFile);
@@ -119554,6 +119561,7 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119554
119561
  var remaining = Math.max(0, Math.min(options.timeoutMs, options.resourceBudget ? options.resourceBudget.remainingMs : options.timeoutMs));
119555
119562
  var timerAt;
119556
119563
  var queued = 0;
119564
+ var admittedSlice;
119557
119565
  var checksPending = false;
119558
119566
  var checksDirty = false;
119559
119567
  var revision = 0;
@@ -119564,6 +119572,8 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119564
119572
  failures.push(url ? { kind: kind, url: url } : { kind: kind });
119565
119573
  }
119566
119574
  function finish(status) {
119575
+ if (stopped) return;
119576
+ if (status === 'ready' && options.onReadyProof) options.onReadyProof();
119567
119577
  if (stopped) return;
119568
119578
  stopped = true;
119569
119579
  if (options.resourceBudget) options.resourceBudget.remainingMs = queued ? remaining :
@@ -119594,7 +119604,10 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119594
119604
  remaining = Math.max(0, remaining - (Date.now() - timerAt));
119595
119605
  }
119596
119606
  try {
119607
+ if (admittedSlice && admittedSlice.canContinue && admittedSlice.canContinue())
119608
+ return callback(admittedSlice);
119597
119609
  return await Promise.race([terminal, options.scheduleWork(function(slice) {
119610
+ admittedSlice = slice;
119598
119611
  if (!stopped) return callback(slice);
119599
119612
  }, options.signal)]);
119600
119613
  } finally {
@@ -119666,9 +119679,27 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119666
119679
  return Array.from(doc.querySelectorAll('img')).filter(visibleImage);
119667
119680
  }
119668
119681
  async function scheduledImages() {
119669
- var candidates = await work(function() { return Array.from(doc.querySelectorAll('img')); });
119670
- if (stopped) return [];
119671
- return mapWork(candidates, function(img) { if (visibleImage(img)) return img; });
119682
+ var candidates, selected = [], offset = 0;
119683
+ do {
119684
+ await work(function(slice) {
119685
+ if (!candidates) candidates = Array.from(doc.querySelectorAll('img'));
119686
+ var limit = Math.min(offset + 32, candidates.length);
119687
+ while (offset < limit) {
119688
+ var img = candidates[offset++];
119689
+ if (visibleImage(img)) selected.push(img);
119690
+ if (slice && !slice.hasTime()) break;
119691
+ }
119692
+ });
119693
+ } while (!stopped && candidates && offset < candidates.length);
119694
+ return selected;
119695
+ }
119696
+ function decodeImage(img) {
119697
+ if (!img.isConnected || !visibleImage(img)) return {};
119698
+ if (!img.naturalWidth) { failure('image', img.currentSrc || img.src); return {}; }
119699
+ // A holder keeps a resource decode promise outside CPU admission.
119700
+ return { decode: img.decode && img.decode().catch(function() {
119701
+ failure('image', img.currentSrc || img.src);
119702
+ }) };
119672
119703
  }
119673
119704
  function waitElement(element, ready, kind, url) {
119674
119705
  if (ready()) return Promise.resolve();
@@ -119711,23 +119742,30 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119711
119742
  };
119712
119743
  }
119713
119744
  async function scheduledInventory() {
119714
- var atRevision = revision;
119715
- var selectedLinks = await work(links);
119716
- if (stopped) return { links: [], images: [], styles: [] };
119717
- var selectedImages = await scheduledImages();
119718
- return {
119719
- revision: atRevision,
119720
- links: selectedLinks.map(function(link) {
119721
- // Resource evidence can change during a font/image await without
119722
- // changing this node's URL or media. Revalidate the same readiness
119723
- // facts, not CSSStyleSheet object identities or a content hash.
119724
- return [link, link.href, link.media, !!link.sheet,
119725
- link.getAttribute('data-tempo-stylesheet-pending') === link.href,
119726
- link.getAttribute('data-tempo-stylesheet-error') === link.href];
119727
- }),
119728
- images: selectedImages.map(function(img) { return [img, img.currentSrc, img.src, img.srcset]; }),
119729
- styles: await work(function() { return Array.from(doc.querySelectorAll('style')).map(function(style) { return [style, style.textContent]; }); })
119730
- };
119745
+ var candidates, offset = 0;
119746
+ var result = { revision: revision, links: [], images: [], styles: [] };
119747
+ // Small inventories finish in one admission. Large ones retain the
119748
+ // same 32-node/time bound, without paying a task per resource category.
119749
+ do {
119750
+ await work(function(slice) {
119751
+ if (!candidates) candidates = Array.from(doc.querySelectorAll('link[rel~="stylesheet"],img,style'));
119752
+ var limit = Math.min(offset + 32, candidates.length);
119753
+ while (offset < limit) {
119754
+ var node = candidates[offset++];
119755
+ if (node.localName === 'link' && applicable(node)) {
119756
+ result.links.push([node, node.href, node.media, !!node.sheet,
119757
+ node.getAttribute('data-tempo-stylesheet-pending') === node.href,
119758
+ node.getAttribute('data-tempo-stylesheet-error') === node.href]);
119759
+ } else if (node.localName === 'img' && visibleImage(node)) {
119760
+ result.images.push([node, node.currentSrc, node.src, node.srcset]);
119761
+ } else if (node.localName === 'style') {
119762
+ result.styles.push([node, node.textContent]);
119763
+ }
119764
+ if (slice && !slice.hasTime()) break;
119765
+ }
119766
+ });
119767
+ } while (!stopped && candidates && offset < candidates.length);
119768
+ return result;
119731
119769
  }
119732
119770
  function same(a, b) {
119733
119771
  return ['links', 'images', 'styles'].every(function(key) {
@@ -119769,27 +119807,30 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119769
119807
  var selected = options.scheduleWork ? await scheduledImages() : images();
119770
119808
  if (stopped) return;
119771
119809
  if (options.scheduleWork) {
119810
+ var pendingImages = [], pendingLoads = [];
119772
119811
  var imageWaits = await mapWork(selected, function(img) {
119773
- return (async function() {
119774
- if (img.loading === 'lazy') img.loading = 'eager';
119775
- await Promise.race([terminal, waitElement(img, function() {
119776
- return !img.isConnected || !visibleImage(img) || img.complete;
119777
- }, 'image', img.currentSrc || img.src)]);
119778
- if (stopped) return;
119779
- var proof = await work(function() {
119780
- if (!img.isConnected || !visibleImage(img)) return {};
119781
- if (!img.naturalWidth) { failure('image', img.currentSrc || img.src); return {}; }
119782
- // Return a holder, so the resource decode promise itself does
119783
- // not pause its timeout as if it were queued CPU work.
119784
- return { decode: img.decode && img.decode().catch(function() {
119785
- failure('image', img.currentSrc || img.src);
119786
- }) };
119787
- });
119788
- if (stopped) return;
119789
- await Promise.race([terminal, Promise.resolve(proof.decode)]);
119790
- })().catch(function() { finish('cancelled'); });
119812
+ if (img.loading === 'lazy') img.loading = 'eager';
119813
+ // Warm images need no load-event continuation. Prepare their
119814
+ // decodes in this bounded batch rather than one new task per image.
119815
+ if (img.complete) {
119816
+ var proof = decodeImage(img);
119817
+ return Promise.race([terminal, Promise.resolve(proof.decode)]);
119818
+ }
119819
+ pendingImages.push(img);
119820
+ pendingLoads.push(Promise.race([terminal, waitElement(img, function() {
119821
+ return !img.isConnected || !visibleImage(img) || img.complete;
119822
+ }, 'image', img.currentSrc || img.src)]));
119823
+ });
119824
+ await Promise.race([terminal, Promise.all(pendingLoads)]);
119825
+ if (stopped) return;
119826
+ // Load events often arrive together from the browser cache. Decode
119827
+ // their now-ready images in bounded batches, rather than granting
119828
+ // each event its own renderer task. Warm decodes above stay in flight.
119829
+ var loadedDecodes = await mapWork(pendingImages, function(img) {
119830
+ var proof = decodeImage(img);
119831
+ return Promise.race([terminal, Promise.resolve(proof.decode)]);
119791
119832
  });
119792
- await Promise.race([terminal, Promise.all(imageWaits)]);
119833
+ await Promise.race([terminal, Promise.all(imageWaits.concat(loadedDecodes))]);
119793
119834
  } else {
119794
119835
  await Promise.race([terminal, Promise.all(selected.map(async function(img) {
119795
119836
  if (img.loading === 'lazy') img.loading = 'eager';
@@ -119812,7 +119853,7 @@ var DOCUMENT_VISUAL_READINESS_SOURCE = String.raw`
119812
119853
  // A scheduled inventory can span multiple tasks. A mutation during
119813
119854
  // its geometry reads cannot certify a mixed document observation.
119814
119855
  if (options.scheduleWork && observer.takeRecords().length) revision++;
119815
- if ((!options.scheduleWork || (before.revision === after.revision && after.revision === revision)) &&
119856
+ if ((!options.scheduleWork || options.requireStableDom === false || (before.revision === after.revision && after.revision === revision)) &&
119816
119857
  same(before, after) && (!doc.fonts || fontRejected ||
119817
119858
  (doc.fonts.status !== 'loading' && doc.fonts.ready === fontPromise))) {
119818
119859
  finish('ready'); return;
@@ -124990,7 +125031,7 @@ function buildBackends(runtime, toolsets, workspace) {
124990
125031
  }
124991
125032
 
124992
125033
  // src/version.ts
124993
- var CLI_VERSION = "0.0.126-staging.2";
125034
+ var CLI_VERSION = "0.0.127-staging.1";
124994
125035
 
124995
125036
  // src/canvas-hooks.ts
124996
125037
  var import_pngjs4 = __toESM(require_png(), 1);
@@ -126220,4 +126261,4 @@ unpdf/dist/index.mjs:
126220
126261
  * @license Apache-2.0
126221
126262
  *)
126222
126263
  */
126223
- //# sourceMappingURL=serve-SECMASHD.js.map
126264
+ //# sourceMappingURL=serve-H3AJBZ7O.js.map