@tempo-ai/mcp 0.0.129 → 0.0.130

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-VX564RJQ.js";
5
+ } from "./chunk-7PBXI72B.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-WIOMO2PY.js");
12
+ const { createTempoAggregate } = await import("./serve-ANTQEAY7.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-NJB2J7EH.js.map
131
+ //# sourceMappingURL=call-OO6TUWHM.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-WIOMO2PY.js");
125
+ const { runServe } = await import("./serve-ANTQEAY7.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-NJB2J7EH.js");
140
+ const { runTools } = await import("./call-OO6TUWHM.js");
141
141
  return await runTools(rest);
142
142
  }
143
143
  case "call": {
144
- const { runCall } = await import("./call-NJB2J7EH.js");
144
+ const { runCall } = await import("./call-OO6TUWHM.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-VX564RJQ.js.map
167
+ //# sourceMappingURL=chunk-7PBXI72B.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-VX564RJQ.js";
4
+ } from "./chunk-7PBXI72B.js";
5
5
  import "./chunk-24QSPUN7.js";
6
6
  import "./chunk-JKT5N6IQ.js";
7
7
  export {
@@ -28141,7 +28141,7 @@ var require_comments_reader = __commonJS({
28141
28141
  var require_path_is_absolute = __commonJS({
28142
28142
  "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) {
28143
28143
  "use strict";
28144
- function posix(path83) {
28144
+ function posix2(path83) {
28145
28145
  return path83.charAt(0) === "/";
28146
28146
  }
28147
28147
  function win32(path83) {
@@ -28151,8 +28151,8 @@ var require_path_is_absolute = __commonJS({
28151
28151
  var isUnc = Boolean(device && device.charAt(1) !== ":");
28152
28152
  return Boolean(result2[2] || isUnc);
28153
28153
  }
28154
- module2.exports = process.platform === "win32" ? win32 : posix;
28155
- module2.exports.posix = posix;
28154
+ module2.exports = process.platform === "win32" ? win32 : posix2;
28155
+ module2.exports.posix = posix2;
28156
28156
  module2.exports.win32 = win32;
28157
28157
  }
28158
28158
  });
@@ -41936,9 +41936,9 @@ var require_parse = __commonJS({
41936
41936
  const idx = prev.value.lastIndexOf("[");
41937
41937
  const pre = prev.value.slice(0, idx);
41938
41938
  const rest3 = prev.value.slice(idx + 2);
41939
- const posix = POSIX_REGEX_SOURCE[rest3];
41940
- if (posix) {
41941
- prev.value = pre + posix;
41939
+ const posix2 = POSIX_REGEX_SOURCE[rest3];
41940
+ if (posix2) {
41941
+ prev.value = pre + posix2;
41942
41942
  state.backtrack = true;
41943
41943
  advance();
41944
41944
  if (!bos.output && tokens.indexOf(prev) === 1) {
@@ -42455,7 +42455,7 @@ var require_picomatch = __commonJS({
42455
42455
  throw new TypeError("Expected pattern to be a non-empty string");
42456
42456
  }
42457
42457
  const opts = options2 || {};
42458
- const posix = opts.windows;
42458
+ const posix2 = opts.windows;
42459
42459
  const regex = isState ? picomatch3.compileRe(glob, options2) : picomatch3.makeRe(glob, options2, false, true);
42460
42460
  const state = regex.state;
42461
42461
  delete regex.state;
@@ -42465,8 +42465,8 @@ var require_picomatch = __commonJS({
42465
42465
  isIgnored = picomatch3(opts.ignore, ignoreOpts, returnState);
42466
42466
  }
42467
42467
  const matcher2 = (input, returnObject = false) => {
42468
- const { isMatch: isMatch2, match, output } = picomatch3.test(input, regex, options2, { glob, posix });
42469
- const result2 = { glob, state, regex, posix, input, output, match, isMatch: isMatch2 };
42468
+ const { isMatch: isMatch2, match, output } = picomatch3.test(input, regex, options2, { glob, posix: posix2 });
42469
+ const result2 = { glob, state, regex, posix: posix2, input, output, match, isMatch: isMatch2 };
42470
42470
  if (typeof opts.onResult === "function") {
42471
42471
  opts.onResult(result2);
42472
42472
  }
@@ -42491,7 +42491,7 @@ var require_picomatch = __commonJS({
42491
42491
  }
42492
42492
  return matcher2;
42493
42493
  };
42494
- picomatch3.test = (input, regex, options2, { glob, posix } = {}) => {
42494
+ picomatch3.test = (input, regex, options2, { glob, posix: posix2 } = {}) => {
42495
42495
  if (typeof input !== "string") {
42496
42496
  throw new TypeError("Expected input to be a string");
42497
42497
  }
@@ -42499,7 +42499,7 @@ var require_picomatch = __commonJS({
42499
42499
  return { isMatch: false, output: "" };
42500
42500
  }
42501
42501
  const opts = options2 || {};
42502
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
42502
+ const format = opts.format || (posix2 ? utils.toPosixSlashes : null);
42503
42503
  let match = input === glob;
42504
42504
  let output = match && format ? format(input) : input;
42505
42505
  if (match === false) {
@@ -42508,16 +42508,16 @@ var require_picomatch = __commonJS({
42508
42508
  }
42509
42509
  if (match === false || opts.capture === true) {
42510
42510
  if (opts.matchBase === true || opts.basename === true) {
42511
- match = picomatch3.matchBase(input, regex, options2, posix);
42511
+ match = picomatch3.matchBase(input, regex, options2, posix2);
42512
42512
  } else {
42513
42513
  match = regex.exec(output);
42514
42514
  }
42515
42515
  }
42516
42516
  return { isMatch: Boolean(match), match, output };
42517
42517
  };
42518
- picomatch3.matchBase = (input, glob, options2, posix = options2 && options2.windows) => {
42518
+ picomatch3.matchBase = (input, glob, options2, posix2 = options2 && options2.windows) => {
42519
42519
  const regex = glob instanceof RegExp ? glob : picomatch3.makeRe(glob, options2);
42520
- return regex.test(utils.basename(input, { windows: posix }));
42520
+ return regex.test(utils.basename(input, { windows: posix2 }));
42521
42521
  };
42522
42522
  picomatch3.isMatch = (str, patterns, options2) => picomatch3(patterns, options2)(str);
42523
42523
  picomatch3.parse = (pattern, options2) => {
@@ -43704,9 +43704,9 @@ var require_parse2 = __commonJS({
43704
43704
  const idx = prev.value.lastIndexOf("[");
43705
43705
  const pre = prev.value.slice(0, idx);
43706
43706
  const rest3 = prev.value.slice(idx + 2);
43707
- const posix = POSIX_REGEX_SOURCE[rest3];
43708
- if (posix) {
43709
- prev.value = pre + posix;
43707
+ const posix2 = POSIX_REGEX_SOURCE[rest3];
43708
+ if (posix2) {
43709
+ prev.value = pre + posix2;
43710
43710
  state.backtrack = true;
43711
43711
  advance();
43712
43712
  if (!bos.output && tokens.indexOf(prev) === 1) {
@@ -44222,7 +44222,7 @@ var require_picomatch3 = __commonJS({
44222
44222
  throw new TypeError("Expected pattern to be a non-empty string");
44223
44223
  }
44224
44224
  const opts = options2 || {};
44225
- const posix = opts.windows;
44225
+ const posix2 = opts.windows;
44226
44226
  const regex = isState ? picomatch3.compileRe(glob, options2) : picomatch3.makeRe(glob, options2, false, true);
44227
44227
  const state = regex.state;
44228
44228
  delete regex.state;
@@ -44232,8 +44232,8 @@ var require_picomatch3 = __commonJS({
44232
44232
  isIgnored = picomatch3(opts.ignore, ignoreOpts, returnState);
44233
44233
  }
44234
44234
  const matcher2 = (input, returnObject = false) => {
44235
- const { isMatch: isMatch2, match, output } = picomatch3.test(input, regex, options2, { glob, posix });
44236
- const result2 = { glob, state, regex, posix, input, output, match, isMatch: isMatch2 };
44235
+ const { isMatch: isMatch2, match, output } = picomatch3.test(input, regex, options2, { glob, posix: posix2 });
44236
+ const result2 = { glob, state, regex, posix: posix2, input, output, match, isMatch: isMatch2 };
44237
44237
  if (typeof opts.onResult === "function") {
44238
44238
  opts.onResult(result2);
44239
44239
  }
@@ -44258,7 +44258,7 @@ var require_picomatch3 = __commonJS({
44258
44258
  }
44259
44259
  return matcher2;
44260
44260
  };
44261
- picomatch3.test = (input, regex, options2, { glob, posix } = {}) => {
44261
+ picomatch3.test = (input, regex, options2, { glob, posix: posix2 } = {}) => {
44262
44262
  if (typeof input !== "string") {
44263
44263
  throw new TypeError("Expected input to be a string");
44264
44264
  }
@@ -44266,7 +44266,7 @@ var require_picomatch3 = __commonJS({
44266
44266
  return { isMatch: false, output: "" };
44267
44267
  }
44268
44268
  const opts = options2 || {};
44269
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
44269
+ const format = opts.format || (posix2 ? utils.toPosixSlashes : null);
44270
44270
  let match = input === glob;
44271
44271
  let output = match && format ? format(input) : input;
44272
44272
  if (match === false) {
@@ -44275,16 +44275,16 @@ var require_picomatch3 = __commonJS({
44275
44275
  }
44276
44276
  if (match === false || opts.capture === true) {
44277
44277
  if (opts.matchBase === true || opts.basename === true) {
44278
- match = picomatch3.matchBase(input, regex, options2, posix);
44278
+ match = picomatch3.matchBase(input, regex, options2, posix2);
44279
44279
  } else {
44280
44280
  match = regex.exec(output);
44281
44281
  }
44282
44282
  }
44283
44283
  return { isMatch: Boolean(match), match, output };
44284
44284
  };
44285
- picomatch3.matchBase = (input, glob, options2, posix = options2 && options2.windows) => {
44285
+ picomatch3.matchBase = (input, glob, options2, posix2 = options2 && options2.windows) => {
44286
44286
  const regex = glob instanceof RegExp ? glob : picomatch3.makeRe(glob, options2);
44287
- return regex.test(utils.basename(input, { windows: posix }));
44287
+ return regex.test(utils.basename(input, { windows: posix2 }));
44288
44288
  };
44289
44289
  picomatch3.isMatch = (str, patterns, options2) => picomatch3(patterns, options2)(str);
44290
44290
  picomatch3.parse = (pattern, options2) => {
@@ -85186,6 +85186,7 @@ function verifyCanvasPointer(resolution, canvasesDir, entry) {
85186
85186
 
85187
85187
  // ../asset-libraries/index-builder.ts
85188
85188
  import { createHash } from "crypto";
85189
+ import { posix } from "path";
85189
85190
 
85190
85191
  // ../canvas-pages/page-parser.ts
85191
85192
  import { createRequire as createRequire3 } from "module";
@@ -87162,9 +87163,47 @@ function decorateWithRedundancyWarning(entry, componentCanvasPaths) {
87162
87163
  ]
87163
87164
  };
87164
87165
  }
87165
- function assembleIndex(contributions, canvasesDir, fileResolution) {
87166
+ function assembleIndex(contributions, canvasesDir, fileResolution, excludeForeignCanvasProjects = false) {
87167
+ const configRoots = /* @__PURE__ */ new Map();
87168
+ const configuredRoot = (configFile) => {
87169
+ if (configRoots.has(configFile)) return configRoots.get(configFile);
87170
+ let root3 = null;
87171
+ const source = fileResolution?.readFile(configFile);
87172
+ if (source) {
87173
+ try {
87174
+ const config = JSON.parse(source);
87175
+ const configured = config.paths?.canvases;
87176
+ const directory = typeof configured === "string" && configured.trim() ? configured.trim().replaceAll("\\", "/") : "./designs";
87177
+ root3 = posix.normalize(
87178
+ posix.join(posix.dirname(configFile), directory)
87179
+ );
87180
+ } catch {
87181
+ }
87182
+ }
87183
+ configRoots.set(configFile, root3);
87184
+ return root3;
87185
+ };
87186
+ const belongsToAnotherCanvasProject = (file) => {
87187
+ if (!excludeForeignCanvasProjects || !fileResolution) return false;
87188
+ for (let directory = posix.dirname(file); ; directory = posix.dirname(directory)) {
87189
+ for (const config of [
87190
+ posix.join(directory, "tempo.config.json"),
87191
+ posix.join(directory, "tempo/tempo.config.json")
87192
+ ]) {
87193
+ const root3 = configuredRoot(config);
87194
+ if (root3 && file.startsWith(`${root3}/`))
87195
+ return root3 !== posix.normalize(canvasesDir).replace(/\/$/, "");
87196
+ }
87197
+ if (directory === "." || directory === "/") return false;
87198
+ }
87199
+ };
87200
+ const scopedContributions = Object.fromEntries(
87201
+ Object.entries(contributions).filter(
87202
+ ([file]) => !belongsToAnotherCanvasProject(file)
87203
+ )
87204
+ );
87166
87205
  const { winners, errorsByFile } = resolveDuplicateDeclarations(
87167
- Object.values(contributions).flatMap((contribution) => contribution.entries).map((entry) => {
87206
+ Object.values(scopedContributions).flatMap((contribution) => contribution.entries).map((entry) => {
87168
87207
  if (!fileResolution || entry.kind !== "component") return entry;
87169
87208
  const identity2 = resolveComponentIdentity(
87170
87209
  fileResolution,
@@ -87207,21 +87246,21 @@ function assembleIndex(contributions, canvasesDir, fileResolution) {
87207
87246
  }
87208
87247
  const errors = {};
87209
87248
  const errorFilePaths = /* @__PURE__ */ new Set([
87210
- ...Object.keys(contributions),
87249
+ ...Object.keys(scopedContributions),
87211
87250
  ...errorsByFile.keys()
87212
87251
  ]);
87213
87252
  for (const filePath of [...errorFilePaths].sort(
87214
87253
  (a, b2) => a.localeCompare(b2)
87215
87254
  )) {
87216
87255
  const fileErrorList = [
87217
- ...contributions[filePath]?.structuralErrors ?? [],
87256
+ ...scopedContributions[filePath]?.structuralErrors ?? [],
87218
87257
  ...errorsByFile.get(filePath) ?? []
87219
87258
  ];
87220
87259
  if (fileErrorList.length > 0) errors[filePath] = fileErrorList;
87221
87260
  }
87222
87261
  const controls = {};
87223
- for (const file of Object.keys(contributions).sort()) {
87224
- for (const declaration of contributions[file].controls ?? []) {
87262
+ for (const file of Object.keys(scopedContributions).sort()) {
87263
+ for (const declaration of scopedContributions[file].controls ?? []) {
87225
87264
  const identity2 = fileResolution ? resolveComponentIdentity(
87226
87265
  fileResolution,
87227
87266
  declaration.filePath,
@@ -87258,7 +87297,8 @@ function buildAssetIndex(files, options2 = {}, previous) {
87258
87297
  index: assembleIndex(
87259
87298
  fileContributions,
87260
87299
  canvasesDir,
87261
- options2.fileResolution
87300
+ options2.fileResolution,
87301
+ options2.excludeForeignCanvasProjects
87262
87302
  ),
87263
87303
  canvasesDir,
87264
87304
  contentHashes,
@@ -87321,6 +87361,7 @@ async function loadWorkspaceAssetIndex(context) {
87321
87361
  ]);
87322
87362
  return buildAssetIndex(files, {
87323
87363
  canvasesDir: workspaceRelativeCanvasesDir(context),
87364
+ excludeForeignCanvasProjects: true,
87324
87365
  fileResolution: {
87325
87366
  readFile: workspaceFileReader(context.workspaceRoot),
87326
87367
  workspacePackages
@@ -88094,7 +88135,7 @@ var MissingRootDepsError = class extends TempoDevServerError {
88094
88135
  // ../tempo-sdk/package.json
88095
88136
  var package_default = {
88096
88137
  name: "tempo-sdk",
88097
- version: "0.0.75",
88138
+ version: "0.0.76",
88098
88139
  publishConfig: {
88099
88140
  tag: "sdk-v2-latest"
88100
88141
  },
@@ -103882,13 +103923,13 @@ function validateAppDir(value, label = "appDir") {
103882
103923
  }
103883
103924
  const trimmed2 = value.trim();
103884
103925
  if (trimmed2.length === 0) return void 0;
103885
- const posix = toPosixPath4(trimmed2);
103886
- if (posix.startsWith("/") || posix.startsWith("../") || posix === "..") {
103926
+ const posix2 = toPosixPath4(trimmed2);
103927
+ if (posix2.startsWith("/") || posix2.startsWith("../") || posix2 === "..") {
103887
103928
  throw new Error(
103888
103929
  `tempo.config.json field "${label}" must be a relative path inside the project root`
103889
103930
  );
103890
103931
  }
103891
- return posix;
103932
+ return posix2;
103892
103933
  }
103893
103934
  function validateUiFramework(value, label) {
103894
103935
  if (value === void 0 || value === null) return void 0;
@@ -135423,7 +135464,7 @@ function buildBackends(runtime, toolsets, workspace) {
135423
135464
  }
135424
135465
 
135425
135466
  // src/version.ts
135426
- var CLI_VERSION = "0.0.129";
135467
+ var CLI_VERSION = "0.0.130";
135427
135468
 
135428
135469
  // src/canvas-hooks.ts
135429
135470
  var import_pngjs4 = __toESM(require_png(), 1);
@@ -136662,4 +136703,4 @@ unpdf/dist/index.mjs:
136662
136703
  * @license Apache-2.0
136663
136704
  *)
136664
136705
  */
136665
- //# sourceMappingURL=serve-WIOMO2PY.js.map
136706
+ //# sourceMappingURL=serve-ANTQEAY7.js.map