@dereekb/dbx-components-mcp 14.5.0 → 14.5.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.
@@ -10,7 +10,7 @@ var __export = (target, all) => {
10
10
  // packages/dbx-components-mcp/package.json
11
11
  var package_default = {
12
12
  name: "@dereekb/dbx-components-mcp",
13
- version: "14.5.0",
13
+ version: "14.5.1",
14
14
  sideEffects: false,
15
15
  type: "module",
16
16
  bin: {
@@ -22,8 +22,8 @@ var package_default = {
22
22
  "ts-morph": "^21.0.0"
23
23
  },
24
24
  peerDependencies: {
25
- "@dereekb/dbx-cli": "14.5.0",
26
- "@dereekb/util": "14.5.0"
25
+ "@dereekb/dbx-cli": "14.5.1",
26
+ "@dereekb/util": "14.5.1"
27
27
  }
28
28
  };
29
29
 
@@ -4925,10 +4925,10 @@ function extractCandidateParams(candidate, descriptions) {
4925
4925
  for (const param of params) {
4926
4926
  const name = param.getName();
4927
4927
  const typeNode = param.getTypeNode()?.getText();
4928
- const type109 = typeNode ?? param.getType().getText() ?? "unknown";
4928
+ const type110 = typeNode ?? param.getType().getText() ?? "unknown";
4929
4929
  const description = descriptions.get(name) ?? "";
4930
4930
  const optional = param.isOptional() || param.hasInitializer();
4931
- out.push({ name, type: type109, description, optional });
4931
+ out.push({ name, type: type110, description, optional });
4932
4932
  }
4933
4933
  return out;
4934
4934
  }
@@ -6411,13 +6411,13 @@ function parseDecoratorInput(property) {
6411
6411
  const decoratorArg = decorator.getCallExpression()?.getArguments()[0];
6412
6412
  const { alias, requiredFromDecorator } = readInputDecoratorArg(decoratorArg);
6413
6413
  const required = requiredFromDecorator ?? !property.hasQuestionToken();
6414
- const type109 = property.getTypeNode()?.getText() ?? "unknown";
6414
+ const type110 = property.getTypeNode()?.getText() ?? "unknown";
6415
6415
  const initializer = property.getInitializer();
6416
6416
  const defaultValue = initializer === void 0 ? void 0 : initializer.getText();
6417
6417
  return {
6418
6418
  propertyName,
6419
6419
  alias: alias ?? propertyName,
6420
- type: type109,
6420
+ type: type110,
6421
6421
  required,
6422
6422
  description: readPropertyDescription(property),
6423
6423
  ...defaultValue === void 0 ? {} : { defaultValue }
@@ -6510,22 +6510,22 @@ function parseDecoratorOutput(property) {
6510
6510
  alias = decoratorArg.getLiteralText();
6511
6511
  }
6512
6512
  const initializer = property.getInitializer();
6513
- let type109 = "unknown";
6513
+ let type110 = "unknown";
6514
6514
  if (initializer !== void 0 && Node9.isNewExpression(initializer)) {
6515
6515
  const typeArgs = initializer.getTypeArguments();
6516
6516
  if (typeArgs.length > 0) {
6517
- type109 = typeArgs[0].getText();
6517
+ type110 = typeArgs[0].getText();
6518
6518
  }
6519
6519
  } else {
6520
6520
  const explicit = property.getTypeNode()?.getText();
6521
6521
  if (explicit !== void 0) {
6522
- type109 = explicit;
6522
+ type110 = explicit;
6523
6523
  }
6524
6524
  }
6525
6525
  return {
6526
6526
  propertyName,
6527
6527
  name: alias ?? propertyName,
6528
- type: type109,
6528
+ type: type110,
6529
6529
  description: readPropertyDescription(property)
6530
6530
  };
6531
6531
  }
@@ -6540,7 +6540,7 @@ function parseSignalOutput(property) {
6540
6540
  }
6541
6541
  const propertyName = property.getName();
6542
6542
  const typeArgs = initializer.getTypeArguments();
6543
- const type109 = typeArgs.length > 0 ? typeArgs[0].getText() : "void";
6543
+ const type110 = typeArgs.length > 0 ? typeArgs[0].getText() : "void";
6544
6544
  const args = initializer.getArguments();
6545
6545
  let alias;
6546
6546
  if (args.length > 0 && Node9.isObjectLiteralExpression(args[0])) {
@@ -6549,7 +6549,7 @@ function parseSignalOutput(property) {
6549
6549
  return {
6550
6550
  propertyName,
6551
6551
  name: alias ?? propertyName,
6552
- type: type109,
6552
+ type: type110,
6553
6553
  description: readPropertyDescription(property)
6554
6554
  };
6555
6555
  }
@@ -11274,10 +11274,10 @@ function collectParams(decl, descriptions) {
11274
11274
  for (const param of params) {
11275
11275
  const name = param.getName();
11276
11276
  const typeNode = param.getTypeNode()?.getText();
11277
- const type109 = typeNode ?? param.getType().getText() ?? "unknown";
11277
+ const type110 = typeNode ?? param.getType().getText() ?? "unknown";
11278
11278
  const description = descriptions.get(name) ?? "";
11279
11279
  const optional = param.isOptional() || param.hasInitializer();
11280
- out.push({ name, type: type109, description, optional });
11280
+ out.push({ name, type: type110, description, optional });
11281
11281
  }
11282
11282
  return out;
11283
11283
  }
@@ -12957,10 +12957,10 @@ function readTransformSignature(method, fallbackParamDescriptions) {
12957
12957
  for (let i = 1; i < params.length; i += 1) {
12958
12958
  const param = params[i];
12959
12959
  const name = param.getName();
12960
- const type109 = readParamType(param);
12960
+ const type110 = readParamType(param);
12961
12961
  const description = methodParamDescriptions.get(name) ?? fallbackParamDescriptions.get(name) ?? "";
12962
12962
  const required = !param.isOptional() && !param.hasInitializer();
12963
- args.push({ name, type: type109, description, required });
12963
+ args.push({ name, type: type110, description, required });
12964
12964
  }
12965
12965
  return { inputType, outputType, args };
12966
12966
  }
@@ -14956,7 +14956,7 @@ async function loadForgeFieldRegistry(input) {
14956
14956
  }
14957
14957
 
14958
14958
  // packages/dbx-cli/src/lib/mcp-scan/manifest/load-model-firebase-index-registry.ts
14959
- import { dirname as dirname9, isAbsolute as isAbsolute9, resolve as resolve27 } from "node:path";
14959
+ import { dirname as dirname10, isAbsolute as isAbsolute9, resolve as resolve28 } from "node:path";
14960
14960
 
14961
14961
  // packages/dbx-cli/firestore-indexes/src/firestore-indexes-generate.ts
14962
14962
  function generateFirestoreIndexesJson(input) {
@@ -15186,7 +15186,7 @@ function computeDiff(input) {
15186
15186
 
15187
15187
  // packages/dbx-cli/firestore-indexes/src/generate-firestore-indexes-cli.ts
15188
15188
  import { readFile as nodeReadFile7, writeFile as nodeWriteFile3 } from "node:fs/promises";
15189
- import { resolve as resolve26 } from "node:path";
15189
+ import { resolve as resolve27 } from "node:path";
15190
15190
 
15191
15191
  // packages/dbx-cli/firestore-indexes/src/model-firebase-index-runtime.ts
15192
15192
  // @__NO_SIDE_EFFECTS__
@@ -15288,17 +15288,128 @@ function pushInto13(map, key, entry) {
15288
15288
  }
15289
15289
  }
15290
15290
 
15291
+ // packages/dbx-cli/firestore-indexes/src/model-firebase-index-package-manifests.ts
15292
+ import { type as type42 } from "arktype";
15293
+ import { readdir as nodeReadDir } from "node:fs/promises";
15294
+ import { createRequire } from "node:module";
15295
+ import { dirname as dirname9, resolve as resolve26 } from "node:path";
15296
+ var MODEL_FIREBASE_INDEX_MANIFEST_FILENAME_SUFFIX = ".model-firebase-index.mcp.generated.json";
15297
+ var BUNDLED_MODEL_FIREBASE_INDEX_MANIFEST_PACKAGE = "@dereekb/dbx-components-mcp";
15298
+ var BUNDLED_MANIFEST_DIRECTORY_NAME = "generated";
15299
+ var defaultBundledManifestDirectoryResolver = (cwd) => {
15300
+ let result;
15301
+ try {
15302
+ const requireFromCwd = createRequire(resolve26(cwd, "noop.js"));
15303
+ const packageJsonPath = requireFromCwd.resolve(`${BUNDLED_MODEL_FIREBASE_INDEX_MANIFEST_PACKAGE}/package.json`);
15304
+ result = resolve26(dirname9(packageJsonPath), BUNDLED_MANIFEST_DIRECTORY_NAME);
15305
+ } catch {
15306
+ result = null;
15307
+ }
15308
+ return result;
15309
+ };
15310
+ var defaultReadDir = (path) => nodeReadDir(path);
15311
+ async function loadModelFirebaseIndexPackageManifests(input) {
15312
+ const { cwd, manifestPaths = [], discoverBundled = false, readFile: readFile33 = defaultReadFile, readDir = defaultReadDir, resolveBundledDirectory = defaultBundledManifestDirectoryResolver } = input;
15313
+ const paths = manifestPaths.map((path) => resolve26(cwd, path));
15314
+ let failure = null;
15315
+ if (discoverBundled) {
15316
+ const bundledDirectory = resolveBundledDirectory(cwd);
15317
+ if (bundledDirectory == null) {
15318
+ failure = { kind: "no-bundled-package", packageName: BUNDLED_MODEL_FIREBASE_INDEX_MANIFEST_PACKAGE };
15319
+ } else {
15320
+ paths.push(...await readBundledManifestPaths(bundledDirectory, readDir));
15321
+ }
15322
+ }
15323
+ const loaded = [];
15324
+ for (const path of paths) {
15325
+ if (failure != null) {
15326
+ break;
15327
+ }
15328
+ const readResult = await readManifestFile(path, readFile33);
15329
+ if (readResult.kind === "ok") {
15330
+ loaded.push({ path, manifest: readResult.manifest });
15331
+ } else {
15332
+ failure = readResult.outcome;
15333
+ }
15334
+ }
15335
+ return failure ?? { kind: "success", loaded };
15336
+ }
15337
+ function formatModelFirebaseIndexPackageManifestFailure(outcome) {
15338
+ let result;
15339
+ switch (outcome.kind) {
15340
+ case "unreadable-manifest":
15341
+ result = `could not read manifest at ${outcome.path} \u2014 ${outcome.error}`;
15342
+ break;
15343
+ case "invalid-manifest":
15344
+ result = `manifest at ${outcome.path} failed validation \u2014 ${outcome.error}`;
15345
+ break;
15346
+ default:
15347
+ result = `${outcome.packageName} is not installed, so no bundled index manifests could be discovered. Install it, or pass --manifest <path> explicitly.`;
15348
+ break;
15349
+ }
15350
+ return result;
15351
+ }
15352
+ async function readBundledManifestPaths(directory, readDir) {
15353
+ let result;
15354
+ try {
15355
+ const names = await readDir(directory);
15356
+ result = names.filter((name) => name.endsWith(MODEL_FIREBASE_INDEX_MANIFEST_FILENAME_SUFFIX)).toSorted().map((name) => resolve26(directory, name));
15357
+ } catch {
15358
+ result = [];
15359
+ }
15360
+ return result;
15361
+ }
15362
+ async function readManifestFile(path, readFile33) {
15363
+ let raw = null;
15364
+ let readError = null;
15365
+ try {
15366
+ raw = await readFile33(path);
15367
+ } catch (err) {
15368
+ readError = err instanceof Error ? err.message : String(err);
15369
+ }
15370
+ let result;
15371
+ if (raw == null) {
15372
+ result = { kind: "fail", outcome: { kind: "unreadable-manifest", path, error: readError ?? "unknown error" } };
15373
+ } else {
15374
+ let parsed;
15375
+ let parseError = null;
15376
+ try {
15377
+ parsed = JSON.parse(raw);
15378
+ } catch (err) {
15379
+ parseError = err instanceof Error ? err.message : String(err);
15380
+ }
15381
+ if (parseError == null) {
15382
+ const validated = ModelFirebaseIndexManifest(parsed);
15383
+ if (validated instanceof type42.errors) {
15384
+ result = { kind: "fail", outcome: { kind: "invalid-manifest", path, error: validated.summary } };
15385
+ } else {
15386
+ result = { kind: "ok", manifest: validated };
15387
+ }
15388
+ } else {
15389
+ result = { kind: "fail", outcome: { kind: "invalid-manifest", path, error: parseError } };
15390
+ }
15391
+ }
15392
+ return result;
15393
+ }
15394
+
15291
15395
  // packages/dbx-cli/firestore-indexes/src/generate-firestore-indexes-cli.ts
15292
15396
  var DEFAULT_BIN_NAME = "dbx-cli-generate-firestore-indexes";
15293
15397
  function buildUsage(binName) {
15294
15398
  return [
15295
- `Usage: ${binName} --component <dir> [--component <dir> ...] [--output <path>] [--check] [--json] [--help]`,
15399
+ `Usage: ${binName} [--component <dir> ...] [--packages] [--manifest <path> ...] [--output <path>] [--check] [--json] [--help]`,
15296
15400
  "",
15297
15401
  "Generates `firestore.indexes.json` from `@dbxModelFirebaseIndex`-tagged factories.",
15298
15402
  "",
15299
15403
  "Options:",
15300
- " --component <dir> Required, repeatable. Relative path to a `-firebase` component or package.",
15301
- " Repeat to derive one indexes file from several packages at once.",
15404
+ " --component <dir> Repeatable. Relative path to a `-firebase` component or package whose",
15405
+ " source is scanned for tagged factories. Repeat to derive one indexes",
15406
+ " file from several packages at once.",
15407
+ " --packages Also merge the pre-built index manifests bundled in the installed",
15408
+ " @dereekb/dbx-components-mcp. Lets an app derive the framework models\u2019",
15409
+ " indexes without a scannable copy of their source.",
15410
+ " --manifest <path> Repeatable. Merge a specific pre-built manifest JSON file.",
15411
+ "",
15412
+ " At least one of --component / --packages / --manifest is required.",
15302
15413
  " --output <path> Output path. Defaults to `firestore.indexes.json` at the cwd.",
15303
15414
  " --check Compare against the on-disk file; exit 1 on drift, do not write.",
15304
15415
  " --json Print the diff summary as JSON instead of human-readable text.",
@@ -15318,18 +15429,18 @@ async function runGenerateFirestoreIndexesCli(input) {
15318
15429
  stderr(usage);
15319
15430
  return { exitCode: 2 };
15320
15431
  }
15321
- if (parsed.components.length === 0) {
15322
- stderr("generate-firestore-indexes: --component is required");
15432
+ if (parsed.components.length === 0 && parsed.manifests.length === 0 && !parsed.packages) {
15433
+ stderr("generate-firestore-indexes: at least one of --component / --packages / --manifest is required");
15323
15434
  stderr(usage);
15324
15435
  return { exitCode: 2 };
15325
15436
  }
15326
- const outputAbs = resolve26(cwd, parsed.output);
15437
+ const outputAbs = resolve27(cwd, parsed.output);
15327
15438
  const entries = [];
15328
15439
  const loadedSources = [];
15329
15440
  let sawUnresolvedModel = false;
15330
15441
  for (const component of parsed.components) {
15331
15442
  const buildOutcome = await buildModelFirebaseIndexManifest({
15332
- projectRoot: resolve26(cwd, component),
15443
+ projectRoot: resolve27(cwd, component),
15333
15444
  generator
15334
15445
  });
15335
15446
  if (buildOutcome.kind !== "success") {
@@ -15347,6 +15458,15 @@ async function runGenerateFirestoreIndexesCli(input) {
15347
15458
  }
15348
15459
  loadedSources.push(buildOutcome.manifest.source);
15349
15460
  }
15461
+ if (parsed.packages || parsed.manifests.length > 0) {
15462
+ const merged = await collectPackageManifestEntries({ cwd, manifestPaths: parsed.manifests, discoverBundled: parsed.packages, readFile: readFile33 });
15463
+ if (merged.kind === "fail") {
15464
+ stderr(merged.message);
15465
+ return { exitCode: 1 };
15466
+ }
15467
+ entries.push(...merged.entries);
15468
+ loadedSources.push(...merged.sources);
15469
+ }
15350
15470
  if (sawUnresolvedModel) {
15351
15471
  stderr("generate-firestore-indexes: one or more @dbxModelFirebaseIndexModel tags could not be resolved, so their indexes were dropped. Add the missing identity file to the component\u2019s `dbx-mcp.scan.json` include globs.");
15352
15472
  return { exitCode: 1 };
@@ -15373,8 +15493,29 @@ async function runGenerateFirestoreIndexesCli(input) {
15373
15493
  }
15374
15494
  return { exitCode: 0 };
15375
15495
  }
15496
+ async function collectPackageManifestEntries(input) {
15497
+ const { cwd, manifestPaths, discoverBundled, readFile: readFile33 } = input;
15498
+ const outcome = await loadModelFirebaseIndexPackageManifests({ cwd, manifestPaths, discoverBundled, readFile: readFile33 });
15499
+ let result;
15500
+ if (outcome.kind === "success") {
15501
+ const entries = [];
15502
+ const sources = [];
15503
+ for (const { manifest } of outcome.loaded) {
15504
+ for (const entry of manifest.entries) {
15505
+ entries.push(toModelFirebaseIndexEntryInfo(entry));
15506
+ }
15507
+ sources.push(manifest.source);
15508
+ }
15509
+ result = { kind: "ok", entries, sources };
15510
+ } else {
15511
+ result = { kind: "fail", message: `generate-firestore-indexes: ${formatModelFirebaseIndexPackageManifestFailure(outcome)}` };
15512
+ }
15513
+ return result;
15514
+ }
15376
15515
  function parseArgv(argv) {
15377
15516
  const components = [];
15517
+ const manifests = [];
15518
+ let packages = false;
15378
15519
  let output = "firestore.indexes.json";
15379
15520
  let check = false;
15380
15521
  let json = false;
@@ -15392,6 +15533,17 @@ function parseArgv(argv) {
15392
15533
  components.push(argv[i]);
15393
15534
  }
15394
15535
  break;
15536
+ case "--manifest":
15537
+ i += 1;
15538
+ if (i >= argv.length) {
15539
+ error = "generate-firestore-indexes: --manifest requires a value";
15540
+ } else {
15541
+ manifests.push(argv[i]);
15542
+ }
15543
+ break;
15544
+ case "--packages":
15545
+ packages = true;
15546
+ break;
15395
15547
  case "--output":
15396
15548
  i += 1;
15397
15549
  if (i >= argv.length) {
@@ -15416,7 +15568,7 @@ function parseArgv(argv) {
15416
15568
  }
15417
15569
  i += 1;
15418
15570
  }
15419
- return { components, output, check, json, help, error };
15571
+ return { components, manifests, packages, output, check, json, help, error };
15420
15572
  }
15421
15573
  async function readExistingIndexes(input) {
15422
15574
  const text = await readExistingIndexesText(input);
@@ -15542,7 +15694,7 @@ async function loadModelFirebaseIndexManifests(input) {
15542
15694
  var DEFAULT_BUNDLED_FILENAMES7 = ["dereekb-firebase.model-firebase-index.mcp.generated.json"];
15543
15695
  var DEFAULT_BUNDLED_PATHS7 = () => {
15544
15696
  const packageRoot = findPackageRoot(import.meta.url);
15545
- return DEFAULT_BUNDLED_FILENAMES7.map((name) => resolve27(packageRoot, "generated", name));
15697
+ return DEFAULT_BUNDLED_FILENAMES7.map((name) => resolve28(packageRoot, "generated", name));
15546
15698
  };
15547
15699
  async function loadModelFirebaseIndexRegistry(input) {
15548
15700
  const { cwd, bundledManifestPaths = DEFAULT_BUNDLED_PATHS7, readFile: readFile33 } = input;
@@ -15550,10 +15702,10 @@ async function loadModelFirebaseIndexRegistry(input) {
15550
15702
  const configResult = await findAndLoadConfig({ cwd, readFile: readFile33 });
15551
15703
  const externalSources = [];
15552
15704
  if (configResult.config != null && configResult.configPath != null) {
15553
- const baseDir = dirname9(configResult.configPath);
15705
+ const baseDir = dirname10(configResult.configPath);
15554
15706
  const declared = configResult.config.modelFirebaseIndex?.sources ?? [];
15555
15707
  for (const source of declared) {
15556
- const absolute = isAbsolute9(source) ? source : resolve27(baseDir, source);
15708
+ const absolute = isAbsolute9(source) ? source : resolve28(baseDir, source);
15557
15709
  externalSources.push({ origin: "external", path: absolute });
15558
15710
  }
15559
15711
  }
@@ -15579,7 +15731,7 @@ async function loadModelFirebaseIndexRegistry(input) {
15579
15731
  }
15580
15732
 
15581
15733
  // packages/dbx-cli/src/lib/mcp-scan/manifest/load-model-snapshot-fields-registry.ts
15582
- import { dirname as dirname10, isAbsolute as isAbsolute10, resolve as resolve28 } from "node:path";
15734
+ import { dirname as dirname11, isAbsolute as isAbsolute10, resolve as resolve29 } from "node:path";
15583
15735
 
15584
15736
  // packages/dbx-cli/src/lib/mcp-scan/manifest/model-snapshot-fields-loader.ts
15585
15737
  async function loadModelSnapshotFieldManifests(input) {
@@ -15596,7 +15748,7 @@ async function loadModelSnapshotFieldManifests(input) {
15596
15748
  var DEFAULT_BUNDLED_FILENAMES8 = ["dereekb-firebase.model-snapshot-fields.mcp.generated.json"];
15597
15749
  var DEFAULT_BUNDLED_PATHS8 = () => {
15598
15750
  const packageRoot = findPackageRoot(import.meta.url);
15599
- return DEFAULT_BUNDLED_FILENAMES8.map((name) => resolve28(packageRoot, "generated", name));
15751
+ return DEFAULT_BUNDLED_FILENAMES8.map((name) => resolve29(packageRoot, "generated", name));
15600
15752
  };
15601
15753
  async function loadModelSnapshotFieldRegistry(input) {
15602
15754
  const { cwd, bundledManifestPaths = DEFAULT_BUNDLED_PATHS8, readFile: readFile33 } = input;
@@ -15604,10 +15756,10 @@ async function loadModelSnapshotFieldRegistry(input) {
15604
15756
  const configResult = await findAndLoadConfig({ cwd, readFile: readFile33 });
15605
15757
  const externalSources = [];
15606
15758
  if (configResult.config != null && configResult.configPath != null) {
15607
- const baseDir = dirname10(configResult.configPath);
15759
+ const baseDir = dirname11(configResult.configPath);
15608
15760
  const declared = configResult.config.modelSnapshotFields?.sources ?? [];
15609
15761
  for (const source of declared) {
15610
- const absolute = isAbsolute10(source) ? source : resolve28(baseDir, source);
15762
+ const absolute = isAbsolute10(source) ? source : resolve29(baseDir, source);
15611
15763
  externalSources.push({ origin: "external", path: absolute });
15612
15764
  }
15613
15765
  }
@@ -15634,7 +15786,7 @@ async function loadModelSnapshotFieldRegistry(input) {
15634
15786
  }
15635
15787
 
15636
15788
  // packages/dbx-cli/src/lib/mcp-scan/manifest/load-pipes-registry.ts
15637
- import { dirname as dirname11, isAbsolute as isAbsolute11, resolve as resolve29 } from "node:path";
15789
+ import { dirname as dirname12, isAbsolute as isAbsolute11, resolve as resolve30 } from "node:path";
15638
15790
 
15639
15791
  // packages/dbx-cli/src/lib/mcp-scan/manifest/pipes-loader.ts
15640
15792
  async function loadPipeManifests(input) {
@@ -15651,7 +15803,7 @@ async function loadPipeManifests(input) {
15651
15803
  var DEFAULT_BUNDLED_FILENAMES9 = ["dereekb-dbx-core.pipes.mcp.generated.json"];
15652
15804
  var DEFAULT_BUNDLED_PATHS9 = () => {
15653
15805
  const packageRoot = findPackageRoot(import.meta.url);
15654
- return DEFAULT_BUNDLED_FILENAMES9.map((name) => resolve29(packageRoot, "generated", name));
15806
+ return DEFAULT_BUNDLED_FILENAMES9.map((name) => resolve30(packageRoot, "generated", name));
15655
15807
  };
15656
15808
  async function loadPipeRegistry(input) {
15657
15809
  const { cwd, bundledManifestPaths = DEFAULT_BUNDLED_PATHS9, readFile: readFile33 } = input;
@@ -15659,10 +15811,10 @@ async function loadPipeRegistry(input) {
15659
15811
  const configResult = await findAndLoadConfig({ cwd, readFile: readFile33 });
15660
15812
  const externalSources = [];
15661
15813
  if (configResult.config != null && configResult.configPath != null) {
15662
- const baseDir = dirname11(configResult.configPath);
15814
+ const baseDir = dirname12(configResult.configPath);
15663
15815
  const declared = configResult.config.pipes?.sources ?? [];
15664
15816
  for (const source of declared) {
15665
- const absolute = isAbsolute11(source) ? source : resolve29(baseDir, source);
15817
+ const absolute = isAbsolute11(source) ? source : resolve30(baseDir, source);
15666
15818
  externalSources.push({ origin: "external", path: absolute });
15667
15819
  }
15668
15820
  }
@@ -15685,17 +15837,17 @@ async function loadPipeRegistry(input) {
15685
15837
  }
15686
15838
 
15687
15839
  // packages/dbx-cli/src/lib/mcp-scan/manifest/load-tokens-registry.ts
15688
- import { dirname as dirname12, isAbsolute as isAbsolute12, resolve as resolve30 } from "node:path";
15840
+ import { dirname as dirname13, isAbsolute as isAbsolute12, resolve as resolve31 } from "node:path";
15689
15841
 
15690
15842
  // packages/dbx-cli/src/lib/mcp-scan/manifest/tokens-schema.ts
15691
- import { type as type42 } from "arktype";
15843
+ import { type as type43 } from "arktype";
15692
15844
  var TOKEN_ROLES = ["color", "text-color", "surface", "spacing", "radius", "elevation", "shadow", "typography", "motion", "state-layer", "size", "breakpoint", "misc"];
15693
15845
  var TOKEN_SOURCES = ["dbx-web", "dbx-form", "mat-sys", "mdc", "app"];
15694
- var TokenDefaults = type42({
15846
+ var TokenDefaults = type43({
15695
15847
  "light?": "string",
15696
15848
  "dark?": "string"
15697
15849
  });
15698
- var TokenEntry = type42({
15850
+ var TokenEntry = type43({
15699
15851
  cssVariable: "string",
15700
15852
  "scssVariable?": "string",
15701
15853
  source: '"dbx-web" | "dbx-form" | "mat-sys" | "mdc" | "app"',
@@ -15709,7 +15861,7 @@ var TokenEntry = type42({
15709
15861
  "recommendedPrimitive?": "string",
15710
15862
  "seeAlso?": "string[]"
15711
15863
  });
15712
- var TokenManifest = type42({
15864
+ var TokenManifest = type43({
15713
15865
  version: "1",
15714
15866
  source: "string",
15715
15867
  module: "string",
@@ -15733,7 +15885,7 @@ async function loadTokenManifests(input) {
15733
15885
  var DEFAULT_BUNDLED_FILENAMES10 = ["dereekb-dbx-web.tokens.mcp.generated.json", "dereekb-dbx-form.tokens.mcp.generated.json", "angular-material-m3.tokens.mcp.generated.json", "angular-material-mdc.tokens.mcp.generated.json"];
15734
15886
  var DEFAULT_BUNDLED_PATHS10 = () => {
15735
15887
  const packageRoot = findPackageRoot(import.meta.url);
15736
- return DEFAULT_BUNDLED_FILENAMES10.map((name) => resolve30(packageRoot, "generated", name));
15888
+ return DEFAULT_BUNDLED_FILENAMES10.map((name) => resolve31(packageRoot, "generated", name));
15737
15889
  };
15738
15890
  async function loadTokenRegistry(input) {
15739
15891
  const { cwd, bundledManifestPaths = DEFAULT_BUNDLED_PATHS10, readFile: readFile33 } = input;
@@ -15760,7 +15912,7 @@ async function loadTokenRegistry(input) {
15760
15912
  function collectExternalTokenSources(configResult) {
15761
15913
  const externalSources = [];
15762
15914
  if (configResult.config != null && configResult.configPath != null) {
15763
- const baseDir = dirname12(configResult.configPath);
15915
+ const baseDir = dirname13(configResult.configPath);
15764
15916
  const tokensCluster = configResult.config.tokens;
15765
15917
  for (const source of tokensCluster?.sources ?? []) {
15766
15918
  externalSources.push({ origin: "external", path: toAbsolutePath2(baseDir, source) });
@@ -15775,11 +15927,11 @@ function collectExternalTokenSources(configResult) {
15775
15927
  return externalSources;
15776
15928
  }
15777
15929
  function toAbsolutePath2(baseDir, value) {
15778
- return isAbsolute12(value) ? value : resolve30(baseDir, value);
15930
+ return isAbsolute12(value) ? value : resolve31(baseDir, value);
15779
15931
  }
15780
15932
 
15781
15933
  // packages/dbx-cli/src/lib/mcp-scan/manifest/load-ui-components-registry.ts
15782
- import { dirname as dirname13, isAbsolute as isAbsolute13, resolve as resolve31 } from "node:path";
15934
+ import { dirname as dirname14, isAbsolute as isAbsolute13, resolve as resolve32 } from "node:path";
15783
15935
 
15784
15936
  // packages/dbx-cli/src/lib/mcp-scan/manifest/ui-components-loader.ts
15785
15937
  async function loadUiComponentManifests(input) {
@@ -15796,7 +15948,7 @@ async function loadUiComponentManifests(input) {
15796
15948
  var DEFAULT_BUNDLED_FILENAMES11 = ["dereekb-dbx-web.ui-components.mcp.generated.json"];
15797
15949
  var DEFAULT_BUNDLED_PATHS11 = () => {
15798
15950
  const packageRoot = findPackageRoot(import.meta.url);
15799
- return DEFAULT_BUNDLED_FILENAMES11.map((name) => resolve31(packageRoot, "generated", name));
15951
+ return DEFAULT_BUNDLED_FILENAMES11.map((name) => resolve32(packageRoot, "generated", name));
15800
15952
  };
15801
15953
  async function loadUiComponentRegistry(input) {
15802
15954
  const { cwd, bundledManifestPaths = DEFAULT_BUNDLED_PATHS11, readFile: readFile33 } = input;
@@ -15804,10 +15956,10 @@ async function loadUiComponentRegistry(input) {
15804
15956
  const configResult = await findAndLoadConfig({ cwd, readFile: readFile33 });
15805
15957
  const externalSources = [];
15806
15958
  if (configResult.config != null && configResult.configPath != null) {
15807
- const baseDir = dirname13(configResult.configPath);
15959
+ const baseDir = dirname14(configResult.configPath);
15808
15960
  const declared = configResult.config.uiComponents?.sources ?? [];
15809
15961
  for (const source of declared) {
15810
- const absolute = isAbsolute13(source) ? source : resolve31(baseDir, source);
15962
+ const absolute = isAbsolute13(source) ? source : resolve32(baseDir, source);
15811
15963
  externalSources.push({ origin: "external", path: absolute });
15812
15964
  }
15813
15965
  }
@@ -15830,7 +15982,7 @@ async function loadUiComponentRegistry(input) {
15830
15982
  }
15831
15983
 
15832
15984
  // packages/dbx-cli/src/lib/mcp-scan/manifest/load-utils-registry.ts
15833
- import { dirname as dirname14, isAbsolute as isAbsolute14, resolve as resolve32 } from "node:path";
15985
+ import { dirname as dirname15, isAbsolute as isAbsolute14, resolve as resolve33 } from "node:path";
15834
15986
 
15835
15987
  // packages/dbx-cli/src/lib/mcp-scan/manifest/utils-loader.ts
15836
15988
  async function loadUtilManifests(input) {
@@ -15847,7 +15999,7 @@ async function loadUtilManifests(input) {
15847
15999
  var DEFAULT_BUNDLED_FILENAMES12 = ["dereekb-util.utils.mcp.generated.json", "dereekb-date.utils.mcp.generated.json", "dereekb-rxjs.utils.mcp.generated.json", "dereekb-model.utils.mcp.generated.json"];
15848
16000
  var DEFAULT_BUNDLED_PATHS12 = () => {
15849
16001
  const packageRoot = findPackageRoot(import.meta.url);
15850
- return DEFAULT_BUNDLED_FILENAMES12.map((name) => resolve32(packageRoot, "generated", name));
16002
+ return DEFAULT_BUNDLED_FILENAMES12.map((name) => resolve33(packageRoot, "generated", name));
15851
16003
  };
15852
16004
  async function loadUtilRegistry(input) {
15853
16005
  const { cwd, bundledManifestPaths = DEFAULT_BUNDLED_PATHS12, readFile: readFile33 } = input;
@@ -15855,10 +16007,10 @@ async function loadUtilRegistry(input) {
15855
16007
  const configResult = await findAndLoadConfig({ cwd, readFile: readFile33 });
15856
16008
  const externalSources = [];
15857
16009
  if (configResult.config != null && configResult.configPath != null) {
15858
- const baseDir = dirname14(configResult.configPath);
16010
+ const baseDir = dirname15(configResult.configPath);
15859
16011
  const declared = configResult.config.utils?.sources ?? [];
15860
16012
  for (const source of declared) {
15861
- const absolute = isAbsolute14(source) ? source : resolve32(baseDir, source);
16013
+ const absolute = isAbsolute14(source) ? source : resolve33(baseDir, source);
15862
16014
  externalSources.push({ origin: "external", path: absolute });
15863
16015
  }
15864
16016
  }
@@ -16574,7 +16726,7 @@ function loadRouteTree(args) {
16574
16726
  }
16575
16727
 
16576
16728
  // packages/dbx-cli/src/lib/route/component-resolve.ts
16577
- import { dirname as dirname15, join as join5, normalize } from "node:path/posix";
16729
+ import { dirname as dirname16, join as join5, normalize } from "node:path/posix";
16578
16730
  var TRY_EXTENSIONS = [".ts", ".tsx", "/index.ts", "/index.tsx"];
16579
16731
  function resolveComponentSourceFromSources(input) {
16580
16732
  const byName = /* @__PURE__ */ new Map();
@@ -16594,7 +16746,7 @@ function resolveComponentSourceFromSources(input) {
16594
16746
  function resolveSpecifier(specifier, routerFile, byName) {
16595
16747
  let result;
16596
16748
  if (specifier.startsWith(".")) {
16597
- const base = normalize(join5(dirname15(routerFile), specifier));
16749
+ const base = normalize(join5(dirname16(routerFile), specifier));
16598
16750
  let resolved;
16599
16751
  for (const ext of TRY_EXTENSIONS) {
16600
16752
  const candidate = base + ext;
@@ -17006,7 +17158,7 @@ function detectMissingRouteModels(states, warnings) {
17006
17158
  // packages/dbx-components-mcp/src/server.ts
17007
17159
  import { serveStdio } from "@modelcontextprotocol/server/stdio";
17008
17160
  import { McpServer } from "@modelcontextprotocol/server";
17009
- import { dirname as dirname23, isAbsolute as isAbsolute20, resolve as resolvePath4 } from "node:path";
17161
+ import { dirname as dirname24, isAbsolute as isAbsolute20, resolve as resolvePath4 } from "node:path";
17010
17162
 
17011
17163
  // packages/dbx-components-mcp/src/resources/form-fields.resource.ts
17012
17164
  import { ResourceTemplate } from "@modelcontextprotocol/server";
@@ -19512,7 +19664,7 @@ function registerAuthResource(server, options) {
19512
19664
 
19513
19665
  // packages/dbx-components-mcp/src/resources/firestore-rules.resource.ts
19514
19666
  import { readFile as readFile4 } from "node:fs/promises";
19515
- import { resolve as resolve33 } from "node:path";
19667
+ import { resolve as resolve34 } from "node:path";
19516
19668
  import { ResourceTemplate as ResourceTemplate15 } from "@modelcontextprotocol/server";
19517
19669
 
19518
19670
  // packages/dbx-cli/firestore-rules/src/firestore-rules-scan.ts
@@ -19739,7 +19891,7 @@ function registerFirestoreRulesResource(server, options = {}) {
19739
19891
  const cwd = options.cwd ?? process.cwd();
19740
19892
  let result;
19741
19893
  try {
19742
- result = { scan: scanFirestoreRules(await readFile4(resolve33(cwd, rulesFile), "utf8")) };
19894
+ result = { scan: scanFirestoreRules(await readFile4(resolve34(cwd, rulesFile), "utf8")) };
19743
19895
  } catch (e) {
19744
19896
  result = { error: `Failed to read ${rulesFile}: ${e instanceof Error ? e.message : String(e)}` };
19745
19897
  }
@@ -19862,7 +20014,7 @@ function registerResources(server, options = {}) {
19862
20014
  }
19863
20015
 
19864
20016
  // packages/dbx-components-mcp/src/tools/lookup-form.tool.ts
19865
- import { type as type43 } from "arktype";
20017
+ import { type as type44 } from "arktype";
19866
20018
 
19867
20019
  // packages/dbx-components-mcp/src/tools/form-alias-resolver.ts
19868
20020
  var ALIASES = {
@@ -20087,7 +20239,7 @@ function toolError(message) {
20087
20239
  return result;
20088
20240
  }
20089
20241
  function toCallToolResult(result) {
20090
- const content = result.content.map(({ type: type109, text }) => ({ type: type109, text }));
20242
+ const content = result.content.map(({ type: type110, text }) => ({ type: type110, text }));
20091
20243
  const callToolResult = result.isError === void 0 ? { content } : { content, isError: result.isError };
20092
20244
  return callToolResult;
20093
20245
  }
@@ -20124,13 +20276,13 @@ var DBX_FORM_LOOKUP_TOOL = {
20124
20276
  required: ["topic"]
20125
20277
  }
20126
20278
  };
20127
- var LookupFormArgsType = type43({
20279
+ var LookupFormArgsType = type44({
20128
20280
  topic: "string",
20129
20281
  "depth?": "'brief' | 'full'"
20130
20282
  });
20131
20283
  function parseLookupFormArgs(raw) {
20132
20284
  const parsed = LookupFormArgsType(raw);
20133
- if (parsed instanceof type43.errors) {
20285
+ if (parsed instanceof type44.errors) {
20134
20286
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
20135
20287
  }
20136
20288
  return {
@@ -20254,14 +20406,14 @@ function createLookupFormTool(config) {
20254
20406
  }
20255
20407
 
20256
20408
  // packages/dbx-components-mcp/src/tools/_search/score.ts
20257
- import { type as type44 } from "arktype";
20258
- var SEARCH_ARGS_TYPE = type44({
20409
+ import { type as type45 } from "arktype";
20410
+ var SEARCH_ARGS_TYPE = type45({
20259
20411
  query: "string",
20260
20412
  "limit?": "number"
20261
20413
  });
20262
20414
  function parseSearchArgs(raw, config) {
20263
20415
  const parsed = SEARCH_ARGS_TYPE(raw);
20264
- if (parsed instanceof type44.errors) {
20416
+ if (parsed instanceof type45.errors) {
20265
20417
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
20266
20418
  }
20267
20419
  const rawLimit = parsed.limit ?? config.defaultLimit;
@@ -20506,7 +20658,7 @@ function createSearchFormTool(config) {
20506
20658
  }
20507
20659
 
20508
20660
  // packages/dbx-components-mcp/src/tools/form-examples.tool.ts
20509
- import { type as type45 } from "arktype";
20661
+ import { type as type46 } from "arktype";
20510
20662
 
20511
20663
  // packages/dbx-components-mcp/src/tools/data/patterns/forms/form.address-form.pattern.ts
20512
20664
  var FORM_PATTERN_ADDRESS_FORM = {
@@ -20795,13 +20947,13 @@ var DBX_FORM_EXAMPLES_TOOL = {
20795
20947
  required: ["pattern"]
20796
20948
  }
20797
20949
  };
20798
- var ExamplesArgsType = type45({
20950
+ var ExamplesArgsType = type46({
20799
20951
  pattern: "string",
20800
20952
  "depth?": "'minimal' | 'brief' | 'full'"
20801
20953
  });
20802
20954
  function parseExamplesArgs(raw) {
20803
20955
  const parsed = ExamplesArgsType(raw);
20804
- if (parsed instanceof type45.errors) {
20956
+ if (parsed instanceof type46.errors) {
20805
20957
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
20806
20958
  }
20807
20959
  const result = {
@@ -20862,7 +21014,7 @@ var FORM_EXAMPLES_TOOL = {
20862
21014
  };
20863
21015
 
20864
21016
  // packages/dbx-components-mcp/src/tools/form-scaffold.tool.ts
20865
- import { type as type46 } from "arktype";
21017
+ import { type as type47 } from "arktype";
20866
21018
  var DEFAULT_VALUE_TYPE_NAME = "ScaffoldedFormValue";
20867
21019
  var DBX_FORM_SCAFFOLD_TOOL = {
20868
21020
  name: "dbx_form_scaffold",
@@ -20900,14 +21052,14 @@ var DBX_FORM_SCAFFOLD_TOOL = {
20900
21052
  required: ["fields"]
20901
21053
  }
20902
21054
  };
20903
- var ScaffoldArgsType = type46({
21055
+ var ScaffoldArgsType = type47({
20904
21056
  fields: "string[]>0",
20905
21057
  "valueTypeName?": "string",
20906
21058
  "wrapInSection?": "boolean"
20907
21059
  });
20908
21060
  function parseScaffoldArgs(raw) {
20909
21061
  const parsed = ScaffoldArgsType(raw);
20910
- if (parsed instanceof type46.errors) {
21062
+ if (parsed instanceof type47.errors) {
20911
21063
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
20912
21064
  }
20913
21065
  const result = {
@@ -21065,7 +21217,7 @@ ${code17}
21065
21217
  }
21066
21218
 
21067
21219
  // packages/dbx-components-mcp/src/tools/lookup-ui.tool.ts
21068
- import { type as type47 } from "arktype";
21220
+ import { type as type48 } from "arktype";
21069
21221
  var DBX_UI_LOOKUP_TOOL = {
21070
21222
  name: "dbx_ui_lookup",
21071
21223
  description: [
@@ -21095,13 +21247,13 @@ var DBX_UI_LOOKUP_TOOL = {
21095
21247
  required: ["topic"]
21096
21248
  }
21097
21249
  };
21098
- var LookupUiArgsType = type47({
21250
+ var LookupUiArgsType = type48({
21099
21251
  topic: "string",
21100
21252
  "depth?": "'brief' | 'full'"
21101
21253
  });
21102
21254
  function parseLookupUiArgs(raw) {
21103
21255
  const parsed = LookupUiArgsType(raw);
21104
- if (parsed instanceof type47.errors) {
21256
+ if (parsed instanceof type48.errors) {
21105
21257
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
21106
21258
  }
21107
21259
  const result = {
@@ -21359,7 +21511,7 @@ function createLookupUiTool(input) {
21359
21511
  }
21360
21512
 
21361
21513
  // packages/dbx-components-mcp/src/tools/search-ui.tool.ts
21362
- import { type as type48 } from "arktype";
21514
+ import { type as type49 } from "arktype";
21363
21515
  var DEFAULT_LIMIT2 = 10;
21364
21516
  var MAX_LIMIT2 = 25;
21365
21517
  var DBX_UI_SEARCH_TOOL = {
@@ -21396,14 +21548,14 @@ var DBX_UI_SEARCH_TOOL = {
21396
21548
  required: ["query"]
21397
21549
  }
21398
21550
  };
21399
- var SearchUiArgsType = type48({
21551
+ var SearchUiArgsType = type49({
21400
21552
  query: "string",
21401
21553
  "category?": "'layout' | 'list' | 'button' | 'card' | 'feedback' | 'overlay' | 'navigation' | 'text' | 'screen' | 'action' | 'router' | 'misc'",
21402
21554
  "limit?": "number"
21403
21555
  });
21404
21556
  function parseSearchUiArgs(raw) {
21405
21557
  const parsed = SearchUiArgsType(raw);
21406
- if (parsed instanceof type48.errors) {
21558
+ if (parsed instanceof type49.errors) {
21407
21559
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
21408
21560
  }
21409
21561
  const rawLimit = parsed.limit ?? DEFAULT_LIMIT2;
@@ -21603,7 +21755,7 @@ function createSearchUiTool(input) {
21603
21755
  }
21604
21756
 
21605
21757
  // packages/dbx-components-mcp/src/tools/ui-examples.tool.ts
21606
- import { type as type49 } from "arktype";
21758
+ import { type as type50 } from "arktype";
21607
21759
 
21608
21760
  // packages/dbx-components-mcp/src/tools/data/patterns/ui/ui.card-with-action.pattern.ts
21609
21761
  var UI_PATTERN_CARD_WITH_ACTION = {
@@ -22001,13 +22153,13 @@ var DBX_UI_EXAMPLES_TOOL = {
22001
22153
  required: ["pattern"]
22002
22154
  }
22003
22155
  };
22004
- var UiExamplesArgsType = type49({
22156
+ var UiExamplesArgsType = type50({
22005
22157
  pattern: "string",
22006
22158
  "depth?": "'minimal' | 'brief' | 'full'"
22007
22159
  });
22008
22160
  function parseUiExamplesArgs(raw) {
22009
22161
  const parsed = UiExamplesArgsType(raw);
22010
- if (parsed instanceof type49.errors) {
22162
+ if (parsed instanceof type50.errors) {
22011
22163
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
22012
22164
  }
22013
22165
  return {
@@ -22176,7 +22328,7 @@ function createUiExamplesTool(input = {}) {
22176
22328
  }
22177
22329
 
22178
22330
  // packages/dbx-components-mcp/src/tools/lookup-model.tool.ts
22179
- import { type as type50 } from "arktype";
22331
+ import { type as type51 } from "arktype";
22180
22332
 
22181
22333
  // packages/dbx-components-mcp/src/tools/firebase-lookup.formatter.ts
22182
22334
  function applyFieldsFilter(model, filter) {
@@ -25680,10 +25832,10 @@ function formatSeeAlso(ref) {
25680
25832
 
25681
25833
  // packages/dbx-cli/validate/src/lib/_core/validate-input.ts
25682
25834
  import { glob as fsGlob5, readFile as readFile5, stat as stat4 } from "node:fs/promises";
25683
- import { resolve as resolve34, sep as sep5 } from "node:path";
25835
+ import { resolve as resolve35, sep as sep5 } from "node:path";
25684
25836
  function ensurePathInsideCwd(relative23, cwd) {
25685
25837
  const cwdPrefix = cwd.endsWith(sep5) ? cwd : cwd + sep5;
25686
- const absolute = resolve34(cwd, relative23);
25838
+ const absolute = resolve35(cwd, relative23);
25687
25839
  if (!absolute.startsWith(cwdPrefix) && absolute !== cwd) {
25688
25840
  throw new Error(`Path \`${relative23}\` resolves outside the server cwd and is not allowed.`);
25689
25841
  }
@@ -25705,7 +25857,7 @@ async function resolveFolderPaths(config) {
25705
25857
  }
25706
25858
  if (glob2) {
25707
25859
  for await (const match of fsGlob5(glob2, { cwd })) {
25708
- const absolute = resolve34(cwd, match);
25860
+ const absolute = resolve35(cwd, match);
25709
25861
  try {
25710
25862
  const stats = await stat4(absolute);
25711
25863
  if (!stats.isDirectory()) continue;
@@ -25742,7 +25894,7 @@ async function resolveValidatorSources(config) {
25742
25894
  for (const relative23 of pathList) {
25743
25895
  if (seenNames.has(relative23)) continue;
25744
25896
  ensurePathInsideCwd(relative23, cwd);
25745
- const absolute = resolve34(cwd, relative23);
25897
+ const absolute = resolve35(cwd, relative23);
25746
25898
  const text = await readFile5(absolute, "utf8");
25747
25899
  seenNames.add(relative23);
25748
25900
  collected.push({ name: relative23, text });
@@ -30134,7 +30286,7 @@ function normalize2(value) {
30134
30286
 
30135
30287
  // packages/dbx-cli/validate/src/lib/model-api-validate-app/source-roots.ts
30136
30288
  import { readFile as readFile10, stat as stat8 } from "node:fs/promises";
30137
- import { dirname as dirname16, isAbsolute as isAbsolute15, join as join10, relative as relative10, resolve as resolve35, sep as sep7 } from "node:path";
30289
+ import { dirname as dirname17, isAbsolute as isAbsolute15, join as join10, relative as relative10, resolve as resolve36, sep as sep7 } from "node:path";
30138
30290
  var TSCONFIG_BASE = "tsconfig.base.json";
30139
30291
  var COMPONENT_PACKAGE_JSON = "package.json";
30140
30292
  var SRC_LIB_SUBPATH = "src/lib";
@@ -30160,7 +30312,7 @@ async function resolveApiSourceRoots(input) {
30160
30312
  return { roots, workspaceRoot };
30161
30313
  }
30162
30314
  async function findWorkspaceRoot(startAbs) {
30163
- let current = resolve35(startAbs);
30315
+ let current = resolve36(startAbs);
30164
30316
  for (; ; ) {
30165
30317
  const candidate = join10(current, TSCONFIG_BASE);
30166
30318
  try {
@@ -30168,7 +30320,7 @@ async function findWorkspaceRoot(startAbs) {
30168
30320
  if (s.isFile()) return current;
30169
30321
  } catch {
30170
30322
  }
30171
- const parent = dirname16(current);
30323
+ const parent = dirname17(current);
30172
30324
  if (parent === current) return void 0;
30173
30325
  current = parent;
30174
30326
  }
@@ -30244,8 +30396,8 @@ async function readTsconfigPaths(workspaceRoot) {
30244
30396
  function resolvePackageRoot(input) {
30245
30397
  const target = input.paths.entries.get(input.packageName);
30246
30398
  if (!target) return void 0;
30247
- const targetAbs = isAbsolute15(target) ? target : resolve35(input.workspaceRoot, target);
30248
- return dirname16(dirname16(targetAbs));
30399
+ const targetAbs = isAbsolute15(target) ? target : resolve36(input.workspaceRoot, target);
30400
+ return dirname17(dirname17(targetAbs));
30249
30401
  }
30250
30402
  async function isDirectory2(path) {
30251
30403
  let result = false;
@@ -37427,7 +37579,7 @@ __export(server_actions_list_app_exports, {
37427
37579
 
37428
37580
  // packages/dbx-cli/validate/src/lib/server-actions-list-app/extract.ts
37429
37581
  import { readdir as readdir10, readFile as readFile21 } from "node:fs/promises";
37430
- import { dirname as dirname17, join as join21, relative as relative18, sep as sep15 } from "node:path";
37582
+ import { dirname as dirname18, join as join21, relative as relative18, sep as sep15 } from "node:path";
37431
37583
  import { Node as Node34, Project as Project18 } from "ts-morph";
37432
37584
  var ACTION_SERVER_SUFFIX2 = ".action.server.ts";
37433
37585
  var COMMON_MODEL_SUBPATH2 = "src/app/common/model";
@@ -37502,7 +37654,7 @@ async function inspectSiblingModule(actionFilePath, className) {
37502
37654
  return { modulePath: moduleCandidates[0], providedByModule: false, exportedByModule: false };
37503
37655
  }
37504
37656
  async function findModuleCandidates(actionFilePath) {
37505
- const dir = dirname17(actionFilePath);
37657
+ const dir = dirname18(actionFilePath);
37506
37658
  const out = [];
37507
37659
  try {
37508
37660
  const entries = await readdir10(dir, { withFileTypes: true });
@@ -40088,7 +40240,7 @@ var DBX_MODEL_LOOKUP_TOOL = {
40088
40240
  required: ["topic"]
40089
40241
  }
40090
40242
  };
40091
- var LookupModelArgsType = type50({
40243
+ var LookupModelArgsType = type51({
40092
40244
  topic: "string",
40093
40245
  "depth?": "'brief' | 'full'",
40094
40246
  "scope?": "'all' | 'upstream' | 'downstream'",
@@ -40115,7 +40267,7 @@ function normalizeFieldsFilter(raw) {
40115
40267
  }
40116
40268
  function parseLookupModelArgs(raw) {
40117
40269
  const parsed = LookupModelArgsType(raw);
40118
- if (parsed instanceof type50.errors) {
40270
+ if (parsed instanceof type51.errors) {
40119
40271
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
40120
40272
  }
40121
40273
  return {
@@ -40247,10 +40399,10 @@ var LOOKUP_MODEL_TOOL = {
40247
40399
  };
40248
40400
 
40249
40401
  // packages/dbx-components-mcp/src/tools/search-model.tool.ts
40250
- import { type as type51 } from "arktype";
40402
+ import { type as type52 } from "arktype";
40251
40403
  var DEFAULT_LIMIT3 = 10;
40252
40404
  var MAX_LIMIT3 = 25;
40253
- var SearchArgsType = type51({
40405
+ var SearchArgsType = type52({
40254
40406
  query: "string",
40255
40407
  "limit?": "number",
40256
40408
  "scope?": "'all' | 'upstream' | 'downstream'",
@@ -40407,7 +40559,7 @@ function formatSourceLine(scope, upstreamCount, downstreamPackages) {
40407
40559
  }
40408
40560
  function parseArgs2(rawArgs) {
40409
40561
  const parsed = SearchArgsType(rawArgs);
40410
- if (parsed instanceof type51.errors) {
40562
+ if (parsed instanceof type52.errors) {
40411
40563
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
40412
40564
  }
40413
40565
  return {
@@ -40481,7 +40633,7 @@ var SEARCH_MODEL_TOOL = {
40481
40633
  };
40482
40634
 
40483
40635
  // packages/dbx-components-mcp/src/tools/model-decode.tool.ts
40484
- import { type as type52 } from "arktype";
40636
+ import { type as type53 } from "arktype";
40485
40637
 
40486
40638
  // packages/dbx-components-mcp/src/tools/decode.formatter.ts
40487
40639
  function formatDecode(context) {
@@ -40651,14 +40803,14 @@ var DBX_MODEL_DECODE_TOOL = {
40651
40803
  }
40652
40804
  }
40653
40805
  };
40654
- var DecodeArgsType = type52({
40806
+ var DecodeArgsType = type53({
40655
40807
  "data?": "string | object",
40656
40808
  "key?": "string",
40657
40809
  "model?": "string"
40658
40810
  });
40659
40811
  function parseDecodeArgs(raw) {
40660
40812
  const parsed = DecodeArgsType(raw);
40661
- if (parsed instanceof type52.errors) {
40813
+ if (parsed instanceof type53.errors) {
40662
40814
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
40663
40815
  }
40664
40816
  const result = {
@@ -40914,9 +41066,9 @@ var MODEL_DECODE_TOOL = {
40914
41066
  };
40915
41067
 
40916
41068
  // packages/dbx-components-mcp/src/tools/validate-tool.ts
40917
- import { resolve as resolve36 } from "node:path";
40918
- import { type as type53 } from "arktype";
40919
- var FolderValidateArgsType = type53({
41069
+ import { resolve as resolve37 } from "node:path";
41070
+ import { type as type54 } from "arktype";
41071
+ var FolderValidateArgsType = type54({
40920
41072
  "paths?": "string[]",
40921
41073
  "glob?": "string"
40922
41074
  });
@@ -40925,7 +41077,7 @@ function createFolderValidateTool(config) {
40925
41077
  const { definition, inspectFolder: inspectFolder5, validate, format } = config;
40926
41078
  async function run24(rawArgs) {
40927
41079
  const parsed = FolderValidateArgsType(rawArgs);
40928
- if (parsed instanceof type53.errors) {
41080
+ if (parsed instanceof type54.errors) {
40929
41081
  return toolError(`Invalid arguments: ${parsed.summary}`);
40930
41082
  }
40931
41083
  const hasAny = parsed.paths && parsed.paths.length > 0 || parsed.glob;
@@ -40951,7 +41103,7 @@ function createFolderValidateTool(config) {
40951
41103
  let readError;
40952
41104
  try {
40953
41105
  for (const relative23 of paths) {
40954
- const absolute = resolve36(cwd, relative23);
41106
+ const absolute = resolve37(cwd, relative23);
40955
41107
  const inspection = await inspectFolder5(absolute);
40956
41108
  const relativized = { ...inspection, path: relative23 };
40957
41109
  inspections.push(relativized);
@@ -40976,8 +41128,8 @@ function createFolderValidateTool(config) {
40976
41128
  const tool = { definition, run: run24 };
40977
41129
  return tool;
40978
41130
  }
40979
- var SourceValidateArgsType = type53({
40980
- "sources?": type53({ name: "string", text: "string" }).array(),
41131
+ var SourceValidateArgsType = type54({
41132
+ "sources?": type54({ name: "string", text: "string" }).array(),
40981
41133
  "paths?": "string[]",
40982
41134
  "glob?": "string"
40983
41135
  });
@@ -40986,7 +41138,7 @@ function createSourceValidateTool(config) {
40986
41138
  const { definition, validate, format } = config;
40987
41139
  async function run24(rawArgs) {
40988
41140
  const parsed = SourceValidateArgsType(rawArgs);
40989
- if (parsed instanceof type53.errors) {
41141
+ if (parsed instanceof type54.errors) {
40990
41142
  return toolError(`Invalid arguments: ${parsed.summary}`);
40991
41143
  }
40992
41144
  const hasAny = parsed.sources && parsed.sources.length > 0 || parsed.paths && parsed.paths.length > 0 || parsed.glob;
@@ -41019,7 +41171,7 @@ function createSourceValidateTool(config) {
41019
41171
  const tool = { definition, run: run24 };
41020
41172
  return tool;
41021
41173
  }
41022
- var TwoSideValidateArgsType = type53({
41174
+ var TwoSideValidateArgsType = type54({
41023
41175
  componentDir: "string",
41024
41176
  apiDir: "string"
41025
41177
  });
@@ -41037,9 +41189,9 @@ function resolveTwoSideInput(parsed) {
41037
41189
  }
41038
41190
  if (ensureError === void 0) {
41039
41191
  result = {
41040
- componentAbs: resolve36(cwd, componentRel),
41192
+ componentAbs: resolve37(cwd, componentRel),
41041
41193
  componentRel,
41042
- apiAbs: resolve36(cwd, apiRel),
41194
+ apiAbs: resolve37(cwd, apiRel),
41043
41195
  apiRel
41044
41196
  };
41045
41197
  } else {
@@ -41052,7 +41204,7 @@ function createTwoSideValidateTool(config) {
41052
41204
  const { definition, inspectAndValidate, format } = config;
41053
41205
  async function run24(rawArgs) {
41054
41206
  const parsed = TwoSideValidateArgsType(rawArgs);
41055
- if (parsed instanceof type53.errors) {
41207
+ if (parsed instanceof type54.errors) {
41056
41208
  return toolError(`Invalid arguments: ${parsed.summary}`);
41057
41209
  }
41058
41210
  const resolved = resolveTwoSideInput(parsed);
@@ -41070,7 +41222,7 @@ function createTwoSideValidateTool(config) {
41070
41222
  const tool = { definition, run: run24 };
41071
41223
  return tool;
41072
41224
  }
41073
- var ListAppArgsType = type53({
41225
+ var ListAppArgsType = type54({
41074
41226
  componentDir: "string",
41075
41227
  apiDir: "string",
41076
41228
  "format?": "'markdown' | 'json'"
@@ -41080,7 +41232,7 @@ function createListAppTool(config) {
41080
41232
  const { definition, inspectAndList, formatMarkdown: formatMarkdown3, formatJson: formatJson3 } = config;
41081
41233
  async function run24(rawArgs) {
41082
41234
  const parsed = ListAppArgsType(rawArgs);
41083
- if (parsed instanceof type53.errors) {
41235
+ if (parsed instanceof type54.errors) {
41084
41236
  return toolError(`Invalid arguments: ${parsed.summary}`);
41085
41237
  }
41086
41238
  const resolved = resolveTwoSideInput(parsed);
@@ -41201,10 +41353,10 @@ var modelValidateApiTool = createSourceValidateTool({
41201
41353
  });
41202
41354
 
41203
41355
  // packages/dbx-components-mcp/src/tools/model-api-list-app.tool.ts
41204
- import { resolve as resolve37 } from "node:path";
41205
- import { type as type54 } from "arktype";
41356
+ import { resolve as resolve38 } from "node:path";
41357
+ import { type as type55 } from "arktype";
41206
41358
  var { formatReportAsJson: formatReportAsJson9, formatReportAsMarkdown: formatReportAsMarkdown9, listAppModelApi: listAppModelApi2 } = model_api_list_app_exports;
41207
- var ListArgsType = type54({
41359
+ var ListArgsType = type55({
41208
41360
  componentDir: "string",
41209
41361
  "model?": "string",
41210
41362
  "identity?": "string",
@@ -41244,7 +41396,7 @@ var TOOL = {
41244
41396
  };
41245
41397
  async function run(rawArgs) {
41246
41398
  const parsed = ListArgsType(rawArgs);
41247
- if (parsed instanceof type54.errors) {
41399
+ if (parsed instanceof type55.errors) {
41248
41400
  return toolError(`Invalid arguments: ${parsed.summary}`);
41249
41401
  }
41250
41402
  const cwd = process.cwd();
@@ -41256,7 +41408,7 @@ async function run(rawArgs) {
41256
41408
  ensureError = err instanceof Error ? err.message : String(err);
41257
41409
  }
41258
41410
  if (ensureError === void 0) {
41259
- const componentAbs = resolve37(cwd, parsed.componentDir);
41411
+ const componentAbs = resolve38(cwd, parsed.componentDir);
41260
41412
  const modelFilter = parsed.model ?? (parsed.identity ? identityToModel(parsed.identity) : void 0);
41261
41413
  let report;
41262
41414
  let listError;
@@ -41284,10 +41436,10 @@ function identityToModel(identity) {
41284
41436
  var MODEL_API_LIST_APP_TOOL = { definition: TOOL, run };
41285
41437
 
41286
41438
  // packages/dbx-components-mcp/src/tools/model-api-lookup.tool.ts
41287
- import { resolve as resolve38 } from "node:path";
41288
- import { type as type55 } from "arktype";
41439
+ import { resolve as resolve39 } from "node:path";
41440
+ import { type as type56 } from "arktype";
41289
41441
  var { formatLookupAsJson: formatLookupAsJson3, formatLookupAsMarkdown: formatLookupAsMarkdown3, lookupModelApi: lookupModelApi2 } = model_api_lookup_exports;
41290
- var LookupArgsType = type55({
41442
+ var LookupArgsType = type56({
41291
41443
  componentDir: "string",
41292
41444
  "apiDir?": "string",
41293
41445
  "model?": "string",
@@ -41326,7 +41478,7 @@ var TOOL2 = {
41326
41478
  };
41327
41479
  async function run2(rawArgs) {
41328
41480
  const parsed = LookupArgsType(rawArgs);
41329
- if (parsed instanceof type55.errors) {
41481
+ if (parsed instanceof type56.errors) {
41330
41482
  return toolError(`Invalid arguments: ${parsed.summary}`);
41331
41483
  }
41332
41484
  if (!parsed.model && !parsed.identity) {
@@ -41344,8 +41496,8 @@ async function run2(rawArgs) {
41344
41496
  ensureError = err instanceof Error ? err.message : String(err);
41345
41497
  }
41346
41498
  if (ensureError === void 0) {
41347
- const componentAbs = resolve38(cwd, parsed.componentDir);
41348
- const apiAbs = parsed.apiDir ? resolve38(cwd, parsed.apiDir) : void 0;
41499
+ const componentAbs = resolve39(cwd, parsed.componentDir);
41500
+ const apiAbs = parsed.apiDir ? resolve39(cwd, parsed.apiDir) : void 0;
41349
41501
  const modelFilter = parsed.model ?? identityToModel2(parsed.identity);
41350
41502
  let report;
41351
41503
  let lookupError;
@@ -41383,10 +41535,10 @@ function identityToModel2(identity) {
41383
41535
  var MODEL_API_LOOKUP_TOOL = { definition: TOOL2, run: run2 };
41384
41536
 
41385
41537
  // packages/dbx-components-mcp/src/tools/model-api-validate-app.tool.ts
41386
- import { resolve as resolve39 } from "node:path";
41387
- import { type as type56 } from "arktype";
41538
+ import { resolve as resolve40 } from "node:path";
41539
+ import { type as type57 } from "arktype";
41388
41540
  var { formatValidationAsJson: formatValidationAsJson3, formatValidationAsMarkdown: formatValidationAsMarkdown3, validateAppModelApi: validateAppModelApi2 } = model_api_validate_app_exports;
41389
- var ValidateArgsType = type56({
41541
+ var ValidateArgsType = type57({
41390
41542
  componentDir: "string",
41391
41543
  apiDir: "string",
41392
41544
  "model?": "string",
@@ -41428,7 +41580,7 @@ var TOOL3 = {
41428
41580
  };
41429
41581
  async function run3(rawArgs) {
41430
41582
  const parsed = ValidateArgsType(rawArgs);
41431
- if (parsed instanceof type56.errors) {
41583
+ if (parsed instanceof type57.errors) {
41432
41584
  return toolError(`Invalid arguments: ${parsed.summary}`);
41433
41585
  }
41434
41586
  const cwd = process.cwd();
@@ -41441,8 +41593,8 @@ async function run3(rawArgs) {
41441
41593
  ensureError = err instanceof Error ? err.message : String(err);
41442
41594
  }
41443
41595
  if (ensureError === void 0) {
41444
- const componentAbs = resolve39(cwd, parsed.componentDir);
41445
- const apiAbs = resolve39(cwd, parsed.apiDir);
41596
+ const componentAbs = resolve40(cwd, parsed.componentDir);
41597
+ const apiAbs = resolve40(cwd, parsed.apiDir);
41446
41598
  const modelFilter = parsed.model ?? (parsed.identity ? identityToModel3(parsed.identity) : void 0);
41447
41599
  let report;
41448
41600
  let validateError;
@@ -41513,7 +41665,7 @@ function createModelValidateFolderTool(options = {}) {
41513
41665
  }
41514
41666
 
41515
41667
  // packages/dbx-components-mcp/src/tools/model-store-scaffold.tool.ts
41516
- import { type as type57 } from "arktype";
41668
+ import { type as type58 } from "arktype";
41517
41669
  var STORE_SHAPES = ["root", "root-singleton", "sub-collection", "singleton-sub", "system-state"];
41518
41670
  var SHAPE_PROFILES = {
41519
41671
  root: { defaultSurfaces: ["document", "collection"], allowedSurfaces: ["document", "collection"], hasParent: false, emitsDirectives: true, requiresCollectionsClass: true, requiresSystemStateTypeConst: false },
@@ -41609,7 +41761,7 @@ var DBX_MODEL_STORE_SCAFFOLD_TOOL = {
41609
41761
  required: ["model_name", "app_prefix", "firebase_package"]
41610
41762
  }
41611
41763
  };
41612
- var ScaffoldArgsType2 = type57({
41764
+ var ScaffoldArgsType2 = type58({
41613
41765
  model_name: "string",
41614
41766
  app_prefix: "string",
41615
41767
  firebase_package: "string",
@@ -41629,7 +41781,7 @@ var ScaffoldArgsType2 = type57({
41629
41781
  name: "string",
41630
41782
  functions_path: "string"
41631
41783
  },
41632
- "crud_functions?": type57({
41784
+ "crud_functions?": type58({
41633
41785
  name: "string",
41634
41786
  kind: "'create' | 'update' | 'crud'",
41635
41787
  functions_path: "string"
@@ -41649,7 +41801,7 @@ function requireString(value, label) {
41649
41801
  }
41650
41802
  function parseArgs3(raw) {
41651
41803
  const parsed = ScaffoldArgsType2(raw);
41652
- if (parsed instanceof type57.errors) {
41804
+ if (parsed instanceof type58.errors) {
41653
41805
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
41654
41806
  }
41655
41807
  const modelName = requireString(parsed.model_name, "model_name");
@@ -42094,9 +42246,9 @@ var MODEL_STORE_SCAFFOLD_TOOL = {
42094
42246
  };
42095
42247
 
42096
42248
  // packages/dbx-components-mcp/src/tools/model-fixture-list-app.tool.ts
42097
- import { resolve as resolve40 } from "node:path";
42098
- import { type as type58 } from "arktype";
42099
- var ListArgsType2 = type58({
42249
+ import { resolve as resolve41 } from "node:path";
42250
+ import { type as type59 } from "arktype";
42251
+ var ListArgsType2 = type59({
42100
42252
  apiDir: "string",
42101
42253
  "format?": "'markdown' | 'json'"
42102
42254
  });
@@ -42124,7 +42276,7 @@ var TOOL4 = {
42124
42276
  };
42125
42277
  async function run4(rawArgs) {
42126
42278
  const parsed = ListArgsType2(rawArgs);
42127
- if (parsed instanceof type58.errors) {
42279
+ if (parsed instanceof type59.errors) {
42128
42280
  return toolError(`Invalid arguments: ${parsed.summary}`);
42129
42281
  }
42130
42282
  const cwd = process.cwd();
@@ -42136,7 +42288,7 @@ async function run4(rawArgs) {
42136
42288
  }
42137
42289
  let result;
42138
42290
  if (ensureError === void 0) {
42139
- const apiAbs = resolve40(cwd, parsed.apiDir);
42291
+ const apiAbs = resolve41(cwd, parsed.apiDir);
42140
42292
  let extraction;
42141
42293
  let inspectError;
42142
42294
  try {
@@ -42158,9 +42310,9 @@ async function run4(rawArgs) {
42158
42310
  var MODEL_FIXTURE_LIST_APP_TOOL = { definition: TOOL4, run: run4 };
42159
42311
 
42160
42312
  // packages/dbx-components-mcp/src/tools/model-fixture-lookup.tool.ts
42161
- import { resolve as resolve41 } from "node:path";
42162
- import { type as type59 } from "arktype";
42163
- var LookupArgsType2 = type59({
42313
+ import { resolve as resolve42 } from "node:path";
42314
+ import { type as type60 } from "arktype";
42315
+ var LookupArgsType2 = type60({
42164
42316
  apiDir: "string",
42165
42317
  "model?": "string",
42166
42318
  "identity?": "string",
@@ -42192,7 +42344,7 @@ var TOOL5 = {
42192
42344
  };
42193
42345
  async function run5(rawArgs) {
42194
42346
  const parsed = LookupArgsType2(rawArgs);
42195
- if (parsed instanceof type59.errors) {
42347
+ if (parsed instanceof type60.errors) {
42196
42348
  return toolError(`Invalid arguments: ${parsed.summary}`);
42197
42349
  }
42198
42350
  if (!parsed.model && !parsed.identity) {
@@ -42202,7 +42354,7 @@ async function run5(rawArgs) {
42202
42354
  const ensureError = runEnsurePathInsideCwd(parsed.apiDir, cwd);
42203
42355
  let result;
42204
42356
  if (ensureError === void 0) {
42205
- const apiAbs = resolve41(cwd, parsed.apiDir);
42357
+ const apiAbs = resolve42(cwd, parsed.apiDir);
42206
42358
  const inspection = await inspectFixturesSafe(apiAbs, parsed.apiDir);
42207
42359
  if (inspection.kind === "error") {
42208
42360
  result = toolError(inspection.message);
@@ -42261,10 +42413,10 @@ function identityToModel4(identity) {
42261
42413
  var MODEL_FIXTURE_LOOKUP_TOOL = { definition: TOOL5, run: run5 };
42262
42414
 
42263
42415
  // packages/dbx-components-mcp/src/tools/model-fixture-validate-app.tool.ts
42264
- import { resolve as resolve42 } from "node:path";
42265
- import { type as type60 } from "arktype";
42416
+ import { resolve as resolve43 } from "node:path";
42417
+ import { type as type61 } from "arktype";
42266
42418
  var { formatValidationAsJson: formatValidationAsJson4, formatValidationAsMarkdown: formatValidationAsMarkdown4, validateAppFixtures: validateAppFixtures2 } = model_fixture_shared_exports;
42267
- var ValidateArgsType2 = type60({
42419
+ var ValidateArgsType2 = type61({
42268
42420
  apiDir: "string",
42269
42421
  "format?": "'markdown' | 'json'"
42270
42422
  });
@@ -42298,7 +42450,7 @@ var TOOL6 = {
42298
42450
  function createModelFixtureValidateAppTool(config = {}) {
42299
42451
  async function run24(rawArgs) {
42300
42452
  const parsed = ValidateArgsType2(rawArgs);
42301
- if (parsed instanceof type60.errors) {
42453
+ if (parsed instanceof type61.errors) {
42302
42454
  return toolError(`Invalid arguments: ${parsed.summary}`);
42303
42455
  }
42304
42456
  const cwd = process.cwd();
@@ -42310,7 +42462,7 @@ function createModelFixtureValidateAppTool(config = {}) {
42310
42462
  ensureError = err instanceof Error ? err.message : String(err);
42311
42463
  }
42312
42464
  if (ensureError === void 0) {
42313
- const apiAbs = resolve42(cwd, parsed.apiDir);
42465
+ const apiAbs = resolve43(cwd, parsed.apiDir);
42314
42466
  let extraction;
42315
42467
  let inspectError;
42316
42468
  try {
@@ -42339,16 +42491,16 @@ function createModelFixtureValidateAppTool(config = {}) {
42339
42491
 
42340
42492
  // packages/dbx-components-mcp/src/tools/model-fixture-scaffold.tool.ts
42341
42493
  import { readFile as readFile23, writeFile } from "node:fs/promises";
42342
- import { join as join23, resolve as resolve43 } from "node:path";
42343
- import { type as type61 } from "arktype";
42344
- var ScaffoldArgsType3 = type61({
42494
+ import { join as join23, resolve as resolve44 } from "node:path";
42495
+ import { type as type62 } from "arktype";
42496
+ var ScaffoldArgsType3 = type62({
42345
42497
  apiDir: "string",
42346
42498
  model: "string",
42347
42499
  archetype: "'top-level-simple' | 'top-level-with-deps' | 'sub-collection' | 'sub-collection-traversal'",
42348
42500
  "prefix?": "string",
42349
42501
  "parentFixture?": "string",
42350
42502
  "parentFixtureField?": "string",
42351
- "paramsDependsOn?": type61({
42503
+ "paramsDependsOn?": type62({
42352
42504
  field: "string",
42353
42505
  fixtureModel: "string",
42354
42506
  "optional?": "boolean",
@@ -42409,7 +42561,7 @@ var TOOL7 = {
42409
42561
  };
42410
42562
  async function run6(rawArgs) {
42411
42563
  const parsed = ScaffoldArgsType3(rawArgs);
42412
- if (parsed instanceof type61.errors) {
42564
+ if (parsed instanceof type62.errors) {
42413
42565
  return toolError(`Invalid arguments: ${parsed.summary}`);
42414
42566
  }
42415
42567
  const cwd = process.cwd();
@@ -42425,7 +42577,7 @@ async function run6(rawArgs) {
42425
42577
  return runScaffold(parsed, cwd);
42426
42578
  }
42427
42579
  async function runScaffold(parsed, cwd) {
42428
- const apiAbs = resolve43(cwd, parsed.apiDir);
42580
+ const apiAbs = resolve44(cwd, parsed.apiDir);
42429
42581
  let extraction;
42430
42582
  let extractionError;
42431
42583
  try {
@@ -42535,10 +42687,10 @@ function collectConflicts(extraction, rendered) {
42535
42687
  var MODEL_FIXTURE_SCAFFOLD_TOOL = { definition: TOOL7, run: run6 };
42536
42688
 
42537
42689
  // packages/dbx-components-mcp/src/tools/model-fixture-forward.tool.ts
42538
- import { join as join24, resolve as resolve44 } from "node:path";
42539
- import { type as type62 } from "arktype";
42690
+ import { join as join24, resolve as resolve45 } from "node:path";
42691
+ import { type as type63 } from "arktype";
42540
42692
  import { Project as Project21 } from "ts-morph";
42541
- var ForwardArgsType = type62({
42693
+ var ForwardArgsType = type63({
42542
42694
  apiDir: "string",
42543
42695
  model: "string",
42544
42696
  "methods?": "string[]"
@@ -42572,7 +42724,7 @@ var TOOL8 = {
42572
42724
  };
42573
42725
  async function run7(rawArgs) {
42574
42726
  const parsed = ForwardArgsType(rawArgs);
42575
- if (parsed instanceof type62.errors) {
42727
+ if (parsed instanceof type63.errors) {
42576
42728
  return toolError(`Invalid arguments: ${parsed.summary}`);
42577
42729
  }
42578
42730
  const cwd = process.cwd();
@@ -42584,7 +42736,7 @@ async function run7(rawArgs) {
42584
42736
  ensureError = toErrorMessage(err);
42585
42737
  }
42586
42738
  if (ensureError === void 0) {
42587
- const apiAbs = resolve44(cwd, parsed.apiDir);
42739
+ const apiAbs = resolve45(cwd, parsed.apiDir);
42588
42740
  let extraction;
42589
42741
  let inspectError;
42590
42742
  try {
@@ -42674,9 +42826,9 @@ function appendListSection(lines, heading, names) {
42674
42826
  var MODEL_FIXTURE_FORWARD_TOOL = { definition: TOOL8, run: run7 };
42675
42827
 
42676
42828
  // packages/dbx-components-mcp/src/tools/model-test-list-app.tool.ts
42677
- import { resolve as resolve45 } from "node:path";
42678
- import { type as type63 } from "arktype";
42679
- var ListAppArgsType2 = type63({
42829
+ import { resolve as resolve46 } from "node:path";
42830
+ import { type as type64 } from "arktype";
42831
+ var ListAppArgsType2 = type64({
42680
42832
  apiDir: "string",
42681
42833
  "group?": "string",
42682
42834
  "format?": "'markdown' | 'json'"
@@ -42716,7 +42868,7 @@ var TOOL9 = {
42716
42868
  };
42717
42869
  async function run8(rawArgs) {
42718
42870
  const parsed = ListAppArgsType2(rawArgs);
42719
- if (parsed instanceof type63.errors) {
42871
+ if (parsed instanceof type64.errors) {
42720
42872
  return toolError(`Invalid arguments: ${parsed.summary}`);
42721
42873
  }
42722
42874
  const cwd = process.cwd();
@@ -42728,7 +42880,7 @@ async function run8(rawArgs) {
42728
42880
  }
42729
42881
  let result;
42730
42882
  if (ensureError === void 0) {
42731
- const apiAbs = resolve45(cwd, parsed.apiDir);
42883
+ const apiAbs = resolve46(cwd, parsed.apiDir);
42732
42884
  let catalog;
42733
42885
  let discoveryError;
42734
42886
  try {
@@ -42763,9 +42915,9 @@ function filterCatalogByGroup(catalog, group) {
42763
42915
  var MODEL_TEST_LIST_APP_TOOL = { definition: TOOL9, run: run8 };
42764
42916
 
42765
42917
  // packages/dbx-components-mcp/src/tools/model-test-tree.tool.ts
42766
- import { resolve as resolve46 } from "node:path";
42767
- import { type as type64 } from "arktype";
42768
- var TreeArgsType = type64({
42918
+ import { resolve as resolve47 } from "node:path";
42919
+ import { type as type65 } from "arktype";
42920
+ var TreeArgsType = type65({
42769
42921
  specFile: "string",
42770
42922
  "apiDir?": "string",
42771
42923
  "view?": "'all' | 'describes' | 'fixtures' | 'its' | 'helpers'",
@@ -42805,7 +42957,7 @@ var TOOL10 = {
42805
42957
  };
42806
42958
  async function run9(rawArgs) {
42807
42959
  const parsed = TreeArgsType(rawArgs);
42808
- if (parsed instanceof type64.errors) {
42960
+ if (parsed instanceof type65.errors) {
42809
42961
  return toolError(`Invalid arguments: ${parsed.summary}`);
42810
42962
  }
42811
42963
  const cwd = process.cwd();
@@ -42818,8 +42970,8 @@ async function run9(rawArgs) {
42818
42970
  }
42819
42971
  let result;
42820
42972
  if (ensureError === void 0) {
42821
- const specAbs = resolve46(cwd, parsed.specFile);
42822
- const apiAbs = parsed.apiDir === void 0 ? void 0 : resolve46(cwd, parsed.apiDir);
42973
+ const specAbs = resolve47(cwd, parsed.specFile);
42974
+ const apiAbs = parsed.apiDir === void 0 ? void 0 : resolve47(cwd, parsed.apiDir);
42823
42975
  let tree;
42824
42976
  let inspectError;
42825
42977
  try {
@@ -42843,9 +42995,9 @@ async function run9(rawArgs) {
42843
42995
  var MODEL_TEST_TREE_TOOL = { definition: TOOL10, run: run9 };
42844
42996
 
42845
42997
  // packages/dbx-components-mcp/src/tools/model-test-search.tool.ts
42846
- import { resolve as resolve47 } from "node:path";
42847
- import { type as type65 } from "arktype";
42848
- var SearchArgsType2 = type65({
42998
+ import { resolve as resolve48 } from "node:path";
42999
+ import { type as type66 } from "arktype";
43000
+ var SearchArgsType2 = type66({
42849
43001
  specFile: "string",
42850
43002
  "apiDir?": "string",
42851
43003
  "model?": "string",
@@ -42888,7 +43040,7 @@ var TOOL11 = {
42888
43040
  };
42889
43041
  async function run10(rawArgs) {
42890
43042
  const parsed = SearchArgsType2(rawArgs);
42891
- if (parsed instanceof type65.errors) {
43043
+ if (parsed instanceof type66.errors) {
42892
43044
  return toolError(`Invalid arguments: ${parsed.summary}`);
42893
43045
  }
42894
43046
  const queryFields = [
@@ -42914,8 +43066,8 @@ async function run10(rawArgs) {
42914
43066
  ensureError = err instanceof Error ? err.message : String(err);
42915
43067
  }
42916
43068
  if (ensureError === void 0) {
42917
- const specAbs = resolve47(cwd, parsed.specFile);
42918
- const apiAbs = parsed.apiDir === void 0 ? void 0 : resolve47(cwd, parsed.apiDir);
43069
+ const specAbs = resolve48(cwd, parsed.specFile);
43070
+ const apiAbs = parsed.apiDir === void 0 ? void 0 : resolve48(cwd, parsed.apiDir);
42919
43071
  let tree;
42920
43072
  let inspectError;
42921
43073
  try {
@@ -42938,9 +43090,9 @@ async function run10(rawArgs) {
42938
43090
  var MODEL_TEST_SEARCH_TOOL = { definition: TOOL11, run: run10 };
42939
43091
 
42940
43092
  // packages/dbx-components-mcp/src/tools/model-test-convention.tool.ts
42941
- import { type as type66 } from "arktype";
43093
+ import { type as type67 } from "arktype";
42942
43094
  var API_DIR_PLACEHOLDER = "<apiDir>";
42943
- var ConventionArgsType = type66({
43095
+ var ConventionArgsType = type67({
42944
43096
  group: "string",
42945
43097
  "apiDir?": "string",
42946
43098
  "bucket?": "'crud' | 'scenario'",
@@ -42979,7 +43131,7 @@ var TOOL12 = {
42979
43131
  };
42980
43132
  function parseArgs4(rawArgs) {
42981
43133
  const parsed = ConventionArgsType(rawArgs);
42982
- if (parsed instanceof type66.errors) {
43134
+ if (parsed instanceof type67.errors) {
42983
43135
  return toolError(`Invalid arguments: ${parsed.summary}`);
42984
43136
  }
42985
43137
  if (parsed.subgroups !== void 0 && parsed.bucket === void 0) {
@@ -43067,9 +43219,9 @@ async function run11(rawArgs) {
43067
43219
  var MODEL_TEST_CONVENTION_TOOL = { definition: TOOL12, run: run11 };
43068
43220
 
43069
43221
  // packages/dbx-components-mcp/src/tools/model-test-hotspots.tool.ts
43070
- import { resolve as resolve48 } from "node:path";
43071
- import { type as type67 } from "arktype";
43072
- var HotspotsArgsType = type67({
43222
+ import { resolve as resolve49 } from "node:path";
43223
+ import { type as type68 } from "arktype";
43224
+ var HotspotsArgsType = type68({
43073
43225
  apiDir: "string",
43074
43226
  model: "string",
43075
43227
  "format?": "'markdown' | 'json'"
@@ -43102,7 +43254,7 @@ var TOOL13 = {
43102
43254
  };
43103
43255
  async function run12(rawArgs) {
43104
43256
  const parsed = HotspotsArgsType(rawArgs);
43105
- if (parsed instanceof type67.errors) {
43257
+ if (parsed instanceof type68.errors) {
43106
43258
  return toolError(`Invalid arguments: ${parsed.summary}`);
43107
43259
  }
43108
43260
  const cwd = process.cwd();
@@ -43114,7 +43266,7 @@ async function run12(rawArgs) {
43114
43266
  }
43115
43267
  let result;
43116
43268
  if (ensureError === void 0) {
43117
- const apiAbs = resolve48(cwd, parsed.apiDir);
43269
+ const apiAbs = resolve49(cwd, parsed.apiDir);
43118
43270
  let hotspots;
43119
43271
  let lookupError;
43120
43272
  try {
@@ -43136,11 +43288,11 @@ async function run12(rawArgs) {
43136
43288
  var MODEL_TEST_HOTSPOTS_TOOL = { definition: TOOL13, run: run12 };
43137
43289
 
43138
43290
  // packages/dbx-components-mcp/src/tools/model-test-validate-app.tool.ts
43139
- import { resolve as resolve49 } from "node:path";
43140
- import { type as type68 } from "arktype";
43291
+ import { resolve as resolve50 } from "node:path";
43292
+ import { type as type69 } from "arktype";
43141
43293
  var { extractComponentModels: extractComponentModels2 } = model_list_component_exports;
43142
43294
  var { formatModelTestValidateAppJson: formatModelTestValidateAppJson2, formatModelTestValidateAppMarkdown: formatModelTestValidateAppMarkdown2, validateModelTestApp: validateModelTestApp2 } = model_test_validate_app_exports;
43143
- var ValidateAppArgsType = type68({
43295
+ var ValidateAppArgsType = type69({
43144
43296
  componentDir: "string",
43145
43297
  apiDir: "string",
43146
43298
  "strict?": "boolean",
@@ -43178,7 +43330,7 @@ var TOOL14 = {
43178
43330
  };
43179
43331
  async function run13(rawArgs) {
43180
43332
  const parsed = ValidateAppArgsType(rawArgs);
43181
- if (parsed instanceof type68.errors) {
43333
+ if (parsed instanceof type69.errors) {
43182
43334
  return toolError(`Invalid arguments: ${parsed.summary}`);
43183
43335
  }
43184
43336
  const cwd = process.cwd();
@@ -43192,8 +43344,8 @@ async function run13(rawArgs) {
43192
43344
  if (ensureError !== void 0) {
43193
43345
  return toolError(ensureError);
43194
43346
  }
43195
- const componentAbs = resolve49(cwd, parsed.componentDir);
43196
- const apiAbs = resolve49(cwd, parsed.apiDir);
43347
+ const componentAbs = resolve50(cwd, parsed.componentDir);
43348
+ const apiAbs = resolve50(cwd, parsed.apiDir);
43197
43349
  let catalog;
43198
43350
  let extraction;
43199
43351
  let inspectionError;
@@ -43221,7 +43373,7 @@ async function run13(rawArgs) {
43221
43373
  var MODEL_TEST_VALIDATE_APP_TOOL = { definition: TOOL14, run: run13 };
43222
43374
 
43223
43375
  // packages/dbx-components-mcp/src/tools/archetype-recommend.tool.ts
43224
- import { type as type69 } from "arktype";
43376
+ import { type as type70 } from "arktype";
43225
43377
 
43226
43378
  // packages/dbx-components-mcp/src/tools/archetype/score.ts
43227
43379
  var FRAMEWORK_SHORT_CIRCUITS = [
@@ -43613,7 +43765,7 @@ function formatArchetypeCatalog(archetypes) {
43613
43765
  // packages/dbx-components-mcp/src/tools/archetype-recommend.tool.ts
43614
43766
  var DEFAULT_PEER_COUNT = 5;
43615
43767
  var DEFAULT_MAX_RESULTS = 3;
43616
- var QuestionnaireType = type69({
43768
+ var QuestionnaireType = type70({
43617
43769
  "candidateName?": "string",
43618
43770
  "candidateGroup?": "string",
43619
43771
  "domainDescription?": "string",
@@ -43651,7 +43803,7 @@ var QuestionnaireType = type69({
43651
43803
  "estimatedItemsPerParent?": "'0-50' | '50-500' | '500+' | 'unknown'",
43652
43804
  "alwaysReadWithParent?": "boolean"
43653
43805
  });
43654
- var RecommendArgsType = type69({
43806
+ var RecommendArgsType = type70({
43655
43807
  questionnaire: QuestionnaireType,
43656
43808
  "archetypeHint?": "string",
43657
43809
  "scope?": "'all' | 'upstream' | 'downstream'",
@@ -43705,7 +43857,7 @@ var DBX_MODEL_ARCHETYPE_RECOMMEND_TOOL = {
43705
43857
  };
43706
43858
  function parseArgs5(raw) {
43707
43859
  const parsed = RecommendArgsType(raw);
43708
- if (parsed instanceof type69.errors) {
43860
+ if (parsed instanceof type70.errors) {
43709
43861
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
43710
43862
  }
43711
43863
  const result = {
@@ -43815,7 +43967,7 @@ var ARCHETYPE_RECOMMEND_TOOL = {
43815
43967
  };
43816
43968
 
43817
43969
  // packages/dbx-components-mcp/src/tools/archetype-lookup.tool.ts
43818
- import { type as type70 } from "arktype";
43970
+ import { type as type71 } from "arktype";
43819
43971
  var DBX_MODEL_ARCHETYPE_LOOKUP_TOOL = {
43820
43972
  name: "dbx_model_archetype_lookup",
43821
43973
  description: [
@@ -43839,14 +43991,14 @@ var DBX_MODEL_ARCHETYPE_LOOKUP_TOOL = {
43839
43991
  required: ["slug"]
43840
43992
  }
43841
43993
  };
43842
- var LookupArgsType3 = type70({
43994
+ var LookupArgsType3 = type71({
43843
43995
  slug: "string",
43844
43996
  "axes?": { "[string]": "string" }
43845
43997
  });
43846
43998
  var CATALOG_KEYWORDS = /* @__PURE__ */ new Set(["list", "catalog", "all"]);
43847
43999
  function parseArgs6(raw) {
43848
44000
  const parsed = LookupArgsType3(raw);
43849
- if (parsed instanceof type70.errors) {
44001
+ if (parsed instanceof type71.errors) {
43850
44002
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
43851
44003
  }
43852
44004
  return { slug: parsed.slug, axes: parsed.axes };
@@ -43894,9 +44046,9 @@ var ARCHETYPE_LOOKUP_TOOL = {
43894
44046
  };
43895
44047
 
43896
44048
  // packages/dbx-components-mcp/src/tools/archetype-search.tool.ts
43897
- import { type as type71 } from "arktype";
44049
+ import { type as type72 } from "arktype";
43898
44050
  var DEFAULT_LIMIT4 = 25;
43899
- var SearchArgsType3 = type71({
44051
+ var SearchArgsType3 = type72({
43900
44052
  archetype: "string",
43901
44053
  "axes?": { "[string]": "string" },
43902
44054
  "scope?": "'all' | 'upstream' | 'downstream'",
@@ -43932,7 +44084,7 @@ var DBX_MODEL_ARCHETYPE_SEARCH_TOOL = {
43932
44084
  };
43933
44085
  function parseArgs7(raw) {
43934
44086
  const parsed = SearchArgsType3(raw);
43935
- if (parsed instanceof type71.errors) {
44087
+ if (parsed instanceof type72.errors) {
43936
44088
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
43937
44089
  }
43938
44090
  return {
@@ -44042,7 +44194,7 @@ var ARCHETYPE_SEARCH_TOOL = {
44042
44194
  };
44043
44195
 
44044
44196
  // packages/dbx-components-mcp/src/tools/model-hierarchy.tool.ts
44045
- import { type as type72 } from "arktype";
44197
+ import { type as type73 } from "arktype";
44046
44198
  var DBX_MODEL_HIERARCHY_TOOL = {
44047
44199
  name: "dbx_model_hierarchy",
44048
44200
  description: [
@@ -44100,7 +44252,7 @@ var DBX_MODEL_HIERARCHY_TOOL = {
44100
44252
  }
44101
44253
  }
44102
44254
  };
44103
- var HierarchyArgsType = type72({
44255
+ var HierarchyArgsType = type73({
44104
44256
  "rootModel?": "string",
44105
44257
  "maxDepth?": "number.integer >= 0",
44106
44258
  "format?": "'tree' | 'flat' | 'both'",
@@ -44110,7 +44262,7 @@ var HierarchyArgsType = type72({
44110
44262
  });
44111
44263
  function parseHierarchyArgs(raw) {
44112
44264
  const parsed = HierarchyArgsType(raw ?? {});
44113
- if (parsed instanceof type72.errors) {
44265
+ if (parsed instanceof type73.errors) {
44114
44266
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
44115
44267
  }
44116
44268
  return {
@@ -44531,10 +44683,10 @@ var systemMValidateFolderTool = createFolderValidateTool({
44531
44683
  });
44532
44684
 
44533
44685
  // packages/dbx-components-mcp/src/tools/system-m-list-app.tool.ts
44534
- import { resolve as resolve50 } from "node:path";
44535
- import { type as type73 } from "arktype";
44686
+ import { resolve as resolve51 } from "node:path";
44687
+ import { type as type74 } from "arktype";
44536
44688
  var { formatReportAsJson: formatReportAsJson12, formatReportAsMarkdown: formatReportAsMarkdown12, listAppSystem: listAppSystem2 } = system_m_list_app_exports;
44537
- var ListAppArgsType3 = type73({
44689
+ var ListAppArgsType3 = type74({
44538
44690
  componentDir: "string",
44539
44691
  "format?": "'markdown' | 'json'"
44540
44692
  });
@@ -44562,7 +44714,7 @@ var TOOL15 = {
44562
44714
  };
44563
44715
  async function run14(rawArgs) {
44564
44716
  const parsed = ListAppArgsType3(rawArgs);
44565
- if (parsed instanceof type73.errors) {
44717
+ if (parsed instanceof type74.errors) {
44566
44718
  return toolError(`Invalid arguments: ${parsed.summary}`);
44567
44719
  }
44568
44720
  const cwd = process.cwd();
@@ -44574,7 +44726,7 @@ async function run14(rawArgs) {
44574
44726
  ensureError = err instanceof Error ? err.message : String(err);
44575
44727
  }
44576
44728
  if (ensureError === void 0) {
44577
- const componentAbs = resolve50(cwd, parsed.componentDir);
44729
+ const componentAbs = resolve51(cwd, parsed.componentDir);
44578
44730
  let report;
44579
44731
  let listError;
44580
44732
  try {
@@ -44711,7 +44863,7 @@ var dbxAssetValidateFolderTool = createTwoSideValidateTool({
44711
44863
  });
44712
44864
 
44713
44865
  // packages/dbx-components-mcp/src/tools/dbx-asset-scaffold.tool.ts
44714
- import { type as type74 } from "arktype";
44866
+ import { type as type75 } from "arktype";
44715
44867
  var ASSET_BUILDERS = [
44716
44868
  { kind: "local", helper: "localAsset", signature: "(path: SlashPath)" },
44717
44869
  { kind: "remote", helper: "remoteAsset", signature: "(url: WebsiteUrlWithPrefix)" },
@@ -44747,7 +44899,7 @@ var DBX_ASSET_SCAFFOLD_TOOL_DEFINITION = {
44747
44899
  required: ["name", "kind"]
44748
44900
  }
44749
44901
  };
44750
- var ScaffoldArgsType4 = type74({
44902
+ var ScaffoldArgsType4 = type75({
44751
44903
  name: "string",
44752
44904
  kind: "'local' | 'remote' | 'folder' | 'remote-base'",
44753
44905
  "path?": "string",
@@ -44757,7 +44909,7 @@ var ScaffoldArgsType4 = type74({
44757
44909
  });
44758
44910
  function parseScaffoldArgs2(raw) {
44759
44911
  const parsed = ScaffoldArgsType4(raw);
44760
- if (parsed instanceof type74.errors) {
44912
+ if (parsed instanceof type75.errors) {
44761
44913
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
44762
44914
  }
44763
44915
  const name = parsed.name.trim();
@@ -44901,8 +45053,8 @@ var DBX_ASSET_SCAFFOLD_TOOL = {
44901
45053
  };
44902
45054
 
44903
45055
  // packages/dbx-components-mcp/src/tools/dbx-color-template-list-app.tool.ts
44904
- import { resolve as resolve51 } from "node:path";
44905
- import { type as type75 } from "arktype";
45056
+ import { resolve as resolve52 } from "node:path";
45057
+ import { type as type76 } from "arktype";
44906
45058
  var { formatReportAsJson: formatReportAsJson14, formatReportAsMarkdown: formatReportAsMarkdown14, inspectColorTemplates: inspectColorTemplates2, listAppColorTemplates: listAppColorTemplates2 } = dbx_color_template_list_app_exports;
44907
45059
  var DBX_COLOR_TEMPLATE_LIST_APP_TOOL_DEFINITION = {
44908
45060
  name: "dbx_color_template_list_app",
@@ -44928,14 +45080,14 @@ var DBX_COLOR_TEMPLATE_LIST_APP_TOOL_DEFINITION = {
44928
45080
  required: ["apiDir"]
44929
45081
  }
44930
45082
  };
44931
- var ColorTemplateListAppArgs = type75({
45083
+ var ColorTemplateListAppArgs = type76({
44932
45084
  apiDir: "string",
44933
45085
  "format?": "'markdown' | 'json'"
44934
45086
  });
44935
45087
  async function run15(rawArgs) {
44936
45088
  const parsed = ColorTemplateListAppArgs(rawArgs);
44937
45089
  let result;
44938
- if (parsed instanceof type75.errors) {
45090
+ if (parsed instanceof type76.errors) {
44939
45091
  result = toolError(`Invalid arguments: ${parsed.summary}`);
44940
45092
  } else {
44941
45093
  const cwd = process.cwd();
@@ -44947,7 +45099,7 @@ async function run15(rawArgs) {
44947
45099
  pathError = err instanceof Error ? err.message : String(err);
44948
45100
  }
44949
45101
  if (pathError === void 0) {
44950
- const apiAbs = resolve51(cwd, apiRel);
45102
+ const apiAbs = resolve52(cwd, apiRel);
44951
45103
  const inspection = await inspectColorTemplates2(apiAbs, apiRel);
44952
45104
  if (inspection.appExists) {
44953
45105
  const report = listAppColorTemplates2(inspection);
@@ -44968,8 +45120,8 @@ var DBX_COLOR_TEMPLATE_LIST_APP_TOOL = {
44968
45120
  };
44969
45121
 
44970
45122
  // packages/dbx-components-mcp/src/tools/dbx-color-smell-check.tool.ts
44971
- import { resolve as resolve52 } from "node:path";
44972
- import { type as type76 } from "arktype";
45123
+ import { resolve as resolve53 } from "node:path";
45124
+ import { type as type77 } from "arktype";
44973
45125
  var { extractHtmlLiterals: extractHtmlLiterals2, extractTsLiterals: extractTsLiterals2, formatResultAsJson: formatResultAsJson2, formatResultAsMarkdown: formatResultAsMarkdown2, groupColorSmells: groupColorSmells2 } = dbx_color_smell_check_exports;
44974
45126
  var { extractColorTemplates: extractColorTemplates2, inspectColorTemplates: inspectColorTemplates3 } = dbx_color_template_list_app_exports;
44975
45127
  var DBX_COLOR_SMELL_CHECK_TOOL_DEFINITION = {
@@ -45002,7 +45154,7 @@ var DBX_COLOR_SMELL_CHECK_TOOL_DEFINITION = {
45002
45154
  }
45003
45155
  }
45004
45156
  };
45005
- var ColorSmellCheckArgs = type76({
45157
+ var ColorSmellCheckArgs = type77({
45006
45158
  "paths?": "string[]",
45007
45159
  "glob?": "string",
45008
45160
  "equivalenceMode?": "'exact' | 'normalized'",
@@ -45012,7 +45164,7 @@ var ColorSmellCheckArgs = type76({
45012
45164
  });
45013
45165
  async function run16(rawArgs) {
45014
45166
  const parsed = ColorSmellCheckArgs(rawArgs);
45015
- if (parsed instanceof type76.errors) {
45167
+ if (parsed instanceof type77.errors) {
45016
45168
  return toolError(`Invalid arguments: ${parsed.summary}`);
45017
45169
  }
45018
45170
  const hasAny = parsed.paths && parsed.paths.length > 0 || parsed.glob;
@@ -45062,7 +45214,7 @@ async function resolveCrossReferenceTemplates(input) {
45062
45214
  let result;
45063
45215
  if (pathError === void 0) {
45064
45216
  try {
45065
- const inspection = await inspectColorTemplates3(resolve52(input.cwd, input.apiDir), input.apiDir);
45217
+ const inspection = await inspectColorTemplates3(resolve53(input.cwd, input.apiDir), input.apiDir);
45066
45218
  if (inspection.appExists) {
45067
45219
  const extracted = extractColorTemplates2(inspection);
45068
45220
  result = { kind: "value", value: extracted.templates };
@@ -45084,7 +45236,7 @@ var DBX_COLOR_SMELL_CHECK_TOOL = {
45084
45236
  };
45085
45237
 
45086
45238
  // packages/dbx-components-mcp/src/tools/lookup-action.tool.ts
45087
- import { type as type77 } from "arktype";
45239
+ import { type as type78 } from "arktype";
45088
45240
  var DBX_ACTION_LOOKUP_TOOL = {
45089
45241
  name: "dbx_action_lookup",
45090
45242
  description: [
@@ -45117,13 +45269,13 @@ var DBX_ACTION_LOOKUP_TOOL = {
45117
45269
  required: ["topic"]
45118
45270
  }
45119
45271
  };
45120
- var LookupActionArgsType = type77({
45272
+ var LookupActionArgsType = type78({
45121
45273
  topic: "string",
45122
45274
  "depth?": "'brief' | 'full'"
45123
45275
  });
45124
45276
  function parseLookupActionArgs(raw) {
45125
45277
  const parsed = LookupActionArgsType(raw);
45126
- if (parsed instanceof type77.errors) {
45278
+ if (parsed instanceof type78.errors) {
45127
45279
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
45128
45280
  }
45129
45281
  const result = {
@@ -45597,7 +45749,7 @@ function createSearchActionTool(config) {
45597
45749
  }
45598
45750
 
45599
45751
  // packages/dbx-components-mcp/src/tools/action-examples.tool.ts
45600
- import { type as type78 } from "arktype";
45752
+ import { type as type79 } from "arktype";
45601
45753
 
45602
45754
  // packages/dbx-components-mcp/src/tools/data/patterns/actions/action.auto-trigger-on-modify.pattern.ts
45603
45755
  var ACTION_PATTERN_AUTO_TRIGGER_ON_MODIFY = {
@@ -46034,13 +46186,13 @@ var DBX_ACTION_EXAMPLES_TOOL = {
46034
46186
  required: ["pattern"]
46035
46187
  }
46036
46188
  };
46037
- var ActionExamplesArgsType = type78({
46189
+ var ActionExamplesArgsType = type79({
46038
46190
  pattern: "string",
46039
46191
  "depth?": "'minimal' | 'brief' | 'full'"
46040
46192
  });
46041
46193
  function parseActionExamplesArgs(raw) {
46042
46194
  const parsed = ActionExamplesArgsType(raw);
46043
- if (parsed instanceof type78.errors) {
46195
+ if (parsed instanceof type79.errors) {
46044
46196
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
46045
46197
  }
46046
46198
  const result = {
@@ -46102,7 +46254,7 @@ var ACTION_EXAMPLES_TOOL = {
46102
46254
  };
46103
46255
 
46104
46256
  // packages/dbx-components-mcp/src/tools/action-scaffold.tool.ts
46105
- import { type as type79 } from "arktype";
46257
+ import { type as type80 } from "arktype";
46106
46258
  var TRIGGER_VALUES = ["button", "form", "auto-modify"];
46107
46259
  var SUCCESS_FEEDBACK_VALUES = ["snackbar", "redirect", "none"];
46108
46260
  var CONTEXT_PROVIDER_VALUES = ["inline", "parent", "host-component"];
@@ -46136,7 +46288,7 @@ var DBX_ACTION_SCAFFOLD_TOOL = {
46136
46288
  required: ["use_case", "trigger", "value_type"]
46137
46289
  }
46138
46290
  };
46139
- var ScaffoldArgsType5 = type79({
46291
+ var ScaffoldArgsType5 = type80({
46140
46292
  use_case: "string",
46141
46293
  trigger: "'button' | 'form' | 'auto-modify'",
46142
46294
  "confirm?": "boolean",
@@ -46147,7 +46299,7 @@ var ScaffoldArgsType5 = type79({
46147
46299
  });
46148
46300
  function parseScaffoldArgs3(raw) {
46149
46301
  const parsed = ScaffoldArgsType5(raw);
46150
- if (parsed instanceof type79.errors) {
46302
+ if (parsed instanceof type80.errors) {
46151
46303
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
46152
46304
  }
46153
46305
  const useCase = parsed.use_case.trim();
@@ -46373,14 +46525,14 @@ var ACTION_SCAFFOLD_TOOL = {
46373
46525
  };
46374
46526
 
46375
46527
  // packages/dbx-components-mcp/src/tools/route-tree.tool.ts
46376
- import { type as type80 } from "arktype";
46528
+ import { type as type81 } from "arktype";
46377
46529
 
46378
46530
  // packages/dbx-components-mcp/src/tools/route/load-sources.ts
46379
46531
  import { glob as fsGlob6, readFile as readFile24, stat as stat14 } from "node:fs/promises";
46380
- import { dirname as dirname18, isAbsolute as isAbsolute16, resolve as resolve53, sep as sep17 } from "node:path";
46532
+ import { dirname as dirname19, isAbsolute as isAbsolute16, resolve as resolve54, sep as sep17 } from "node:path";
46381
46533
  var TRY_EXTENSIONS2 = [".ts", ".tsx", "/index.ts", "/index.tsx"];
46382
46534
  async function loadRouteSources(args) {
46383
- const cwdResolved = args.cwd ? resolve53(process.cwd(), args.cwd) : process.cwd();
46535
+ const cwdResolved = args.cwd ? resolve54(process.cwd(), args.cwd) : process.cwd();
46384
46536
  guardCwdInsideServer(args.cwd, cwdResolved);
46385
46537
  const collected = /* @__PURE__ */ new Map();
46386
46538
  if (args.sources) {
@@ -46452,7 +46604,7 @@ async function loadOne(relative23, cwd, into) {
46452
46604
  if (into.has(relative23)) {
46453
46605
  return;
46454
46606
  }
46455
- const absolute = resolve53(cwd, relative23);
46607
+ const absolute = resolve54(cwd, relative23);
46456
46608
  const cwdPrefix = cwd.endsWith(sep17) ? cwd : cwd + sep17;
46457
46609
  if (!absolute.startsWith(cwdPrefix) && absolute !== cwd) {
46458
46610
  throw new Error(`Path \`${relative23}\` resolves outside the server cwd and is not allowed.`);
@@ -46463,9 +46615,9 @@ async function loadOne(relative23, cwd, into) {
46463
46615
  async function resolveRelativeImport(fromFile, specifier, cwd) {
46464
46616
  let result;
46465
46617
  if (specifier.startsWith(".")) {
46466
- const fromAbsolute = isAbsolute16(fromFile) ? fromFile : resolve53(cwd, fromFile);
46467
- const fromDir = dirname18(fromAbsolute);
46468
- const baseAbsolute = resolve53(fromDir, specifier);
46618
+ const fromAbsolute = isAbsolute16(fromFile) ? fromFile : resolve54(cwd, fromFile);
46619
+ const fromDir = dirname19(fromAbsolute);
46620
+ const baseAbsolute = resolve54(fromDir, specifier);
46469
46621
  const cwdPrefix = cwd.endsWith(sep17) ? cwd : cwd + sep17;
46470
46622
  for (const ext of TRY_EXTENSIONS2) {
46471
46623
  const candidateAbsolute = baseAbsolute + ext;
@@ -46690,8 +46842,8 @@ var DBX_ROUTE_TREE_TOOL = {
46690
46842
  }
46691
46843
  }
46692
46844
  };
46693
- var TreeArgsType2 = type80({
46694
- "sources?": type80({ name: "string", text: "string" }).array(),
46845
+ var TreeArgsType2 = type81({
46846
+ "sources?": type81({ name: "string", text: "string" }).array(),
46695
46847
  "paths?": "string[]",
46696
46848
  "glob?": "string",
46697
46849
  "format?": "'markdown' | 'json' | 'flat'",
@@ -46700,7 +46852,7 @@ var TreeArgsType2 = type80({
46700
46852
  });
46701
46853
  function parseArgs8(raw) {
46702
46854
  const parsed = TreeArgsType2(raw);
46703
- if (parsed instanceof type80.errors) {
46855
+ if (parsed instanceof type81.errors) {
46704
46856
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
46705
46857
  }
46706
46858
  const result = {
@@ -46756,7 +46908,7 @@ var ROUTE_TREE_TOOL = {
46756
46908
  };
46757
46909
 
46758
46910
  // packages/dbx-components-mcp/src/tools/route-lookup.tool.ts
46759
- import { type as type81 } from "arktype";
46911
+ import { type as type82 } from "arktype";
46760
46912
 
46761
46913
  // packages/dbx-components-mcp/src/tools/route/page-models.ts
46762
46914
  function buildPageModelsIndex(sources) {
@@ -46816,9 +46968,9 @@ var DBX_ROUTE_LOOKUP_TOOL = {
46816
46968
  required: ["topic"]
46817
46969
  }
46818
46970
  };
46819
- var LookupArgsType4 = type81({
46971
+ var LookupArgsType4 = type82({
46820
46972
  topic: "string",
46821
- "sources?": type81({ name: "string", text: "string" }).array(),
46973
+ "sources?": type82({ name: "string", text: "string" }).array(),
46822
46974
  "paths?": "string[]",
46823
46975
  "glob?": "string",
46824
46976
  "depth?": "'brief' | 'full'",
@@ -46826,7 +46978,7 @@ var LookupArgsType4 = type81({
46826
46978
  });
46827
46979
  function parseArgs9(raw) {
46828
46980
  const parsed = LookupArgsType4(raw);
46829
- if (parsed instanceof type81.errors) {
46981
+ if (parsed instanceof type82.errors) {
46830
46982
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
46831
46983
  }
46832
46984
  const result = {
@@ -47051,7 +47203,7 @@ var ROUTE_LOOKUP_TOOL = {
47051
47203
  };
47052
47204
 
47053
47205
  // packages/dbx-components-mcp/src/tools/route-search.tool.ts
47054
- import { type as type82 } from "arktype";
47206
+ import { type as type83 } from "arktype";
47055
47207
  var DBX_ROUTE_SEARCH_TOOL = {
47056
47208
  name: "dbx_route_search",
47057
47209
  description: [
@@ -47079,9 +47231,9 @@ var DBX_ROUTE_SEARCH_TOOL = {
47079
47231
  required: ["query"]
47080
47232
  }
47081
47233
  };
47082
- var SearchArgsType4 = type82({
47234
+ var SearchArgsType4 = type83({
47083
47235
  query: "string",
47084
- "sources?": type82({ name: "string", text: "string" }).array(),
47236
+ "sources?": type83({ name: "string", text: "string" }).array(),
47085
47237
  "paths?": "string[]",
47086
47238
  "glob?": "string",
47087
47239
  "scope?": "'name' | 'url' | 'component' | 'resolve' | 'all'",
@@ -47089,7 +47241,7 @@ var SearchArgsType4 = type82({
47089
47241
  });
47090
47242
  function parseArgs10(raw) {
47091
47243
  const parsed = SearchArgsType4(raw);
47092
- if (parsed instanceof type82.errors) {
47244
+ if (parsed instanceof type83.errors) {
47093
47245
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
47094
47246
  }
47095
47247
  const result = {
@@ -47188,18 +47340,18 @@ var ROUTE_SEARCH_TOOL = {
47188
47340
  };
47189
47341
 
47190
47342
  // packages/dbx-components-mcp/src/tools/route-resolve-url.tool.ts
47191
- import { type as type83 } from "arktype";
47343
+ import { type as type84 } from "arktype";
47192
47344
 
47193
47345
  // packages/dbx-components-mcp/src/tools/route/resolve-url.ts
47194
47346
  import { readFile as readFile26, stat as stat15 } from "node:fs/promises";
47195
- import { dirname as dirname20, isAbsolute as isAbsolute17, resolve as resolve55, sep as sep19 } from "node:path";
47347
+ import { dirname as dirname21, isAbsolute as isAbsolute17, resolve as resolve56, sep as sep19 } from "node:path";
47196
47348
 
47197
47349
  // packages/dbx-components-mcp/src/tools/route/app-port-map.ts
47198
47350
  import { glob as fsGlob7, readFile as readFile25 } from "node:fs/promises";
47199
- import { dirname as dirname19, resolve as resolve54, sep as sep18 } from "node:path";
47351
+ import { dirname as dirname20, resolve as resolve55, sep as sep18 } from "node:path";
47200
47352
  var CACHE = /* @__PURE__ */ new Map();
47201
47353
  async function loadAppPortMap(cwd) {
47202
- const resolved = cwd ? resolve54(process.cwd(), cwd) : process.cwd();
47354
+ const resolved = cwd ? resolve55(process.cwd(), cwd) : process.cwd();
47203
47355
  let pending = CACHE.get(resolved);
47204
47356
  if (!pending) {
47205
47357
  pending = scanAppPortMap(resolved);
@@ -47210,8 +47362,8 @@ async function loadAppPortMap(cwd) {
47210
47362
  async function scanAppPortMap(cwdResolved) {
47211
47363
  const entries = [];
47212
47364
  for await (const match of fsGlob7("apps/*/project.json", { cwd: cwdResolved })) {
47213
- const projectRoot = dirname19(match);
47214
- const absolute = resolve54(cwdResolved, match);
47365
+ const projectRoot = dirname20(match);
47366
+ const absolute = resolve55(cwdResolved, match);
47215
47367
  const entry = await readEntry({ projectJsonAbsolute: absolute, projectRoot });
47216
47368
  if (entry) {
47217
47369
  entries.push(entry);
@@ -47439,8 +47591,8 @@ function collectSiblings(node) {
47439
47591
  }
47440
47592
  var TRY_EXTENSIONS3 = [".ts", ".tsx", "/index.ts", "/index.tsx"];
47441
47593
  async function resolveComponentFile(input) {
47442
- const cwdResolved = input.cwd ? resolve55(process.cwd(), input.cwd) : process.cwd();
47443
- const routerAbsolute = isAbsolute17(input.routerFile) ? input.routerFile : resolve55(cwdResolved, input.routerFile);
47594
+ const cwdResolved = input.cwd ? resolve56(process.cwd(), input.cwd) : process.cwd();
47595
+ const routerAbsolute = isAbsolute17(input.routerFile) ? input.routerFile : resolve56(cwdResolved, input.routerFile);
47444
47596
  let text;
47445
47597
  try {
47446
47598
  text = await readFile26(routerAbsolute, "utf8");
@@ -47461,8 +47613,8 @@ async function resolveSpecifierToFile(input) {
47461
47613
  if (!specifier.startsWith(".")) {
47462
47614
  return { path: specifier, moduleSpecifier: specifier };
47463
47615
  }
47464
- const fromDir = dirname20(routerAbsolute);
47465
- const baseAbsolute = resolve55(fromDir, specifier);
47616
+ const fromDir = dirname21(routerAbsolute);
47617
+ const baseAbsolute = resolve56(fromDir, specifier);
47466
47618
  const cwdPrefix = cwdResolved.endsWith(sep19) ? cwdResolved : cwdResolved + sep19;
47467
47619
  let resolved;
47468
47620
  for (const ext of TRY_EXTENSIONS3) {
@@ -47548,7 +47700,7 @@ var DBX_ROUTE_RESOLVE_URL_TOOL = {
47548
47700
  required: ["url"]
47549
47701
  }
47550
47702
  };
47551
- var ResolveUrlArgsType = type83({
47703
+ var ResolveUrlArgsType = type84({
47552
47704
  url: "string",
47553
47705
  "app?": "string",
47554
47706
  "cwd?": "string",
@@ -47557,7 +47709,7 @@ var ResolveUrlArgsType = type83({
47557
47709
  });
47558
47710
  function parseArgs11(raw) {
47559
47711
  const parsed = ResolveUrlArgsType(raw);
47560
- if (parsed instanceof type83.errors) {
47712
+ if (parsed instanceof type84.errors) {
47561
47713
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
47562
47714
  }
47563
47715
  const result = {
@@ -47797,14 +47949,14 @@ var ROUTE_RESOLVE_URL_TOOL = {
47797
47949
  };
47798
47950
 
47799
47951
  // packages/dbx-components-mcp/src/tools/_lookup.factory.ts
47800
- import { type as type84 } from "arktype";
47801
- var LOOKUP_ARGS_TYPE = type84({
47952
+ import { type as type85 } from "arktype";
47953
+ var LOOKUP_ARGS_TYPE = type85({
47802
47954
  topic: "string",
47803
47955
  "depth?": "'brief' | 'full'"
47804
47956
  });
47805
47957
  function parseLookupArgs(raw) {
47806
47958
  const parsed = LOOKUP_ARGS_TYPE(raw);
47807
- if (parsed instanceof type84.errors) {
47959
+ if (parsed instanceof type85.errors) {
47808
47960
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
47809
47961
  }
47810
47962
  const result = {
@@ -48008,7 +48160,7 @@ function createLookupFilterTool(input) {
48008
48160
  }
48009
48161
 
48010
48162
  // packages/dbx-components-mcp/src/tools/filter-scaffold.tool.ts
48011
- import { type as type85 } from "arktype";
48163
+ import { type as type86 } from "arktype";
48012
48164
  var DBX_FILTER_SCAFFOLD_TOOL = {
48013
48165
  name: "dbx_filter_scaffold",
48014
48166
  description: [
@@ -48033,7 +48185,7 @@ var DBX_FILTER_SCAFFOLD_TOOL = {
48033
48185
  required: ["model_name", "filter_type"]
48034
48186
  }
48035
48187
  };
48036
- var ScaffoldArgsType6 = type85({
48188
+ var ScaffoldArgsType6 = type86({
48037
48189
  model_name: "string",
48038
48190
  filter_type: "string",
48039
48191
  "preset_keys?": "string[]",
@@ -48041,7 +48193,7 @@ var ScaffoldArgsType6 = type85({
48041
48193
  });
48042
48194
  function parseArgs12(raw) {
48043
48195
  const parsed = ScaffoldArgsType6(raw);
48044
- if (parsed instanceof type85.errors) {
48196
+ if (parsed instanceof type86.errors) {
48045
48197
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
48046
48198
  }
48047
48199
  const modelName = parsed.model_name.trim();
@@ -49103,10 +49255,10 @@ function createSearchModelSnapshotFieldTool(config) {
49103
49255
 
49104
49256
  // packages/dbx-components-mcp/src/tools/list-app-model-snapshot-fields.tool.ts
49105
49257
  import { glob, readFile as readFile27 } from "node:fs/promises";
49106
- import { resolve as resolve56 } from "node:path";
49107
- import { type as type86 } from "arktype";
49258
+ import { resolve as resolve57 } from "node:path";
49259
+ import { type as type87 } from "arktype";
49108
49260
  import { Node as Node37, Project as Project22 } from "ts-morph";
49109
- var ListAppArgsType4 = type86({
49261
+ var ListAppArgsType4 = type87({
49110
49262
  componentDir: "string",
49111
49263
  "apiDir?": "string",
49112
49264
  "format?": "'markdown' | 'json'"
@@ -49141,7 +49293,7 @@ function createListAppModelSnapshotFieldsTool(input) {
49141
49293
  async function run24(rawArgs) {
49142
49294
  const parsed = ListAppArgsType4(rawArgs);
49143
49295
  let result;
49144
- if (parsed instanceof type86.errors) {
49296
+ if (parsed instanceof type87.errors) {
49145
49297
  result = toolError(`Invalid arguments: ${parsed.summary}`);
49146
49298
  } else {
49147
49299
  const cwd = process.cwd();
@@ -49155,8 +49307,8 @@ function createListAppModelSnapshotFieldsTool(input) {
49155
49307
  pathError = err instanceof Error ? err.message : String(err);
49156
49308
  }
49157
49309
  if (pathError === void 0) {
49158
- const componentAbs = resolve56(cwd, parsed.componentDir);
49159
- const apiAbs = parsed.apiDir === void 0 ? void 0 : resolve56(cwd, parsed.apiDir);
49310
+ const componentAbs = resolve57(cwd, parsed.componentDir);
49311
+ const apiAbs = parsed.apiDir === void 0 ? void 0 : resolve57(cwd, parsed.apiDir);
49160
49312
  let report;
49161
49313
  let buildError;
49162
49314
  try {
@@ -49205,14 +49357,14 @@ async function buildListAppReport(input) {
49205
49357
  const project = new Project22({ useInMemoryFileSystem: true, skipAddingFilesFromTsConfig: true });
49206
49358
  const componentFiles = await collectFiles(componentAbs, COMPONENT_MODEL_GLOBS);
49207
49359
  for (const rel of componentFiles) {
49208
- const abs = resolve56(componentAbs, rel);
49360
+ const abs = resolve57(componentAbs, rel);
49209
49361
  const text = await readFile27(abs, "utf-8");
49210
49362
  project.createSourceFile(`/component/${rel}`, text, { overwrite: true });
49211
49363
  }
49212
49364
  if (apiAbs !== void 0) {
49213
49365
  const apiFiles = await collectFiles(apiAbs, API_MODEL_GLOBS);
49214
49366
  for (const rel of apiFiles) {
49215
- const abs = resolve56(apiAbs, rel);
49367
+ const abs = resolve57(apiAbs, rel);
49216
49368
  const text = await readFile27(abs, "utf-8");
49217
49369
  project.createSourceFile(`/api/${rel}`, text, { overwrite: true });
49218
49370
  }
@@ -49818,9 +49970,9 @@ function createSearchModelFirebaseIndexTool(config) {
49818
49970
  }
49819
49971
 
49820
49972
  // packages/dbx-components-mcp/src/tools/list-app-model-firebase-index.tool.ts
49821
- import { resolve as resolve57 } from "node:path";
49822
- import { type as type87 } from "arktype";
49823
- var ListAppArgsType5 = type87({
49973
+ import { resolve as resolve58 } from "node:path";
49974
+ import { type as type88 } from "arktype";
49975
+ var ListAppArgsType5 = type88({
49824
49976
  componentDir: "string",
49825
49977
  "format?": "'markdown' | 'json'",
49826
49978
  "model?": "string",
@@ -49869,7 +50021,7 @@ var DBX_MODEL_FIREBASE_INDEX_LIST_APP_TOOL = {
49869
50021
  async function runListAppModelFirebaseIndex(rawArgs) {
49870
50022
  const parsed = ListAppArgsType5(rawArgs);
49871
50023
  let result;
49872
- if (parsed instanceof type87.errors) {
50024
+ if (parsed instanceof type88.errors) {
49873
50025
  result = toolError(`Invalid arguments: ${parsed.summary}`);
49874
50026
  } else {
49875
50027
  const cwd = process.cwd();
@@ -49880,7 +50032,7 @@ async function runListAppModelFirebaseIndex(rawArgs) {
49880
50032
  pathError = err instanceof Error ? err.message : String(err);
49881
50033
  }
49882
50034
  if (pathError === void 0) {
49883
- const componentAbs = resolve57(cwd, parsed.componentDir);
50035
+ const componentAbs = resolve58(cwd, parsed.componentDir);
49884
50036
  const filters = {
49885
50037
  model: parsed.model,
49886
50038
  category: parsed.category,
@@ -50276,8 +50428,8 @@ function formatReportAsJson16(report) {
50276
50428
 
50277
50429
  // packages/dbx-components-mcp/src/tools/validate-app-model-firebase-index.tool.ts
50278
50430
  import { readFile as readFile28 } from "node:fs/promises";
50279
- import { resolve as resolve58 } from "node:path";
50280
- import { type as type88 } from "arktype";
50431
+ import { resolve as resolve59 } from "node:path";
50432
+ import { type as type89 } from "arktype";
50281
50433
 
50282
50434
  // packages/dbx-components-mcp/src/tools/model-firebase-index-validate-app/format-warnings.ts
50283
50435
  function mapModelFirebaseIndexBuildWarning(warning) {
@@ -50492,7 +50644,7 @@ function buildFirebaseIndexValidateAppViolation(mapped) {
50492
50644
  }
50493
50645
 
50494
50646
  // packages/dbx-components-mcp/src/tools/validate-app-model-firebase-index.tool.ts
50495
- var ValidateAppArgsType2 = type88({
50647
+ var ValidateAppArgsType2 = type89({
50496
50648
  componentDir: "string",
50497
50649
  "indexesFile?": "string",
50498
50650
  "format?": "'markdown' | 'json'"
@@ -50614,7 +50766,7 @@ var DBX_MODEL_FIREBASE_INDEX_VALIDATE_APP_TOOL = {
50614
50766
  };
50615
50767
  async function runValidateAppModelFirebaseIndex(rawArgs) {
50616
50768
  const parsed = ValidateAppArgsType2(rawArgs);
50617
- if (parsed instanceof type88.errors) {
50769
+ if (parsed instanceof type89.errors) {
50618
50770
  return toolError(`Invalid arguments: ${parsed.summary}`);
50619
50771
  }
50620
50772
  const cwd = process.cwd();
@@ -50630,8 +50782,8 @@ async function runValidateAppModelFirebaseIndex(rawArgs) {
50630
50782
  }
50631
50783
  if (ensureError === void 0) {
50632
50784
  const indexesRelative = parsed.indexesFile ?? "firestore.indexes.json";
50633
- const componentAbs = resolve58(cwd, parsed.componentDir);
50634
- const indexesAbs = resolve58(cwd, indexesRelative);
50785
+ const componentAbs = resolve59(cwd, parsed.componentDir);
50786
+ const indexesAbs = resolve59(cwd, indexesRelative);
50635
50787
  let report;
50636
50788
  let buildError;
50637
50789
  try {
@@ -50985,8 +51137,8 @@ function formatReportAsJson17(report) {
50985
51137
 
50986
51138
  // packages/dbx-components-mcp/src/tools/artifact-scaffold.tool.ts
50987
51139
  import { access } from "node:fs/promises";
50988
- import { resolve as resolve59, sep as sep20 } from "node:path";
50989
- import { type as type89 } from "arktype";
51140
+ import { resolve as resolve60, sep as sep20 } from "node:path";
51141
+ import { type as type90 } from "arktype";
50990
51142
 
50991
51143
  // packages/dbx-components-mcp/src/tools/artifact-scaffold/templates.ts
50992
51144
  function splitWords(input) {
@@ -51556,7 +51708,7 @@ var DBX_ARTIFACT_SCAFFOLD_TOOL = {
51556
51708
  required: ["artifact", "name", "componentDir", "apiDir"]
51557
51709
  }
51558
51710
  };
51559
- var ScaffoldArtifactArgsType = type89({
51711
+ var ScaffoldArtifactArgsType = type90({
51560
51712
  artifact: ARTIFACT_KIND_LITERAL_UNION,
51561
51713
  name: "string",
51562
51714
  componentDir: "string",
@@ -51569,7 +51721,7 @@ var ScaffoldArtifactArgsType = type89({
51569
51721
  });
51570
51722
  function parseArgs13(raw) {
51571
51723
  const parsed = ScaffoldArtifactArgsType(raw);
51572
- if (parsed instanceof type89.errors) {
51724
+ if (parsed instanceof type90.errors) {
51573
51725
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
51574
51726
  }
51575
51727
  const result = {
@@ -51582,7 +51734,7 @@ function parseArgs13(raw) {
51582
51734
  return result;
51583
51735
  }
51584
51736
  function ensureInsideCwd(relativePath, cwd) {
51585
- const absolute = resolve59(cwd, relativePath);
51737
+ const absolute = resolve60(cwd, relativePath);
51586
51738
  const cwdPrefix = cwd.endsWith(sep20) ? cwd : cwd + sep20;
51587
51739
  if (!absolute.startsWith(cwdPrefix) && absolute !== cwd) {
51588
51740
  throw new Error(`Path \`${relativePath}\` resolves outside the server cwd and is not allowed.`);
@@ -51621,7 +51773,7 @@ async function runArtifactScaffold(rawArgs) {
51621
51773
  scaffoldError = `Scaffold failed: ${message}`;
51622
51774
  }
51623
51775
  if (scaffoldError === void 0) {
51624
- const checked = await applyIdempotency(raw, (relativePath) => fileExists4(resolve59(cwd, relativePath)));
51776
+ const checked = await applyIdempotency(raw, (relativePath) => fileExists4(resolve60(cwd, relativePath)));
51625
51777
  const text = formatResult21(checked);
51626
51778
  result = { content: [{ type: "text", text }] };
51627
51779
  } else {
@@ -51642,7 +51794,7 @@ var ARTIFACT_SCAFFOLD_TOOL = {
51642
51794
  };
51643
51795
 
51644
51796
  // packages/dbx-components-mcp/src/tools/artifact-file-convention.tool.ts
51645
- import { type as type90 } from "arktype";
51797
+ import { type as type91 } from "arktype";
51646
51798
 
51647
51799
  // packages/dbx-components-mcp/src/tools/artifact-file-convention/spec.ts
51648
51800
  var FIRESTORE_MODEL = {
@@ -52118,7 +52270,7 @@ var DBX_ARTIFACT_FILE_CONVENTION_TOOL = {
52118
52270
  required: ["artifact"]
52119
52271
  }
52120
52272
  };
52121
- var FileConventionArgsType = type90({
52273
+ var FileConventionArgsType = type91({
52122
52274
  artifact: ARTIFACT_KIND_LITERAL_UNION2,
52123
52275
  "componentDir?": "string",
52124
52276
  "apiDir?": "string",
@@ -52126,7 +52278,7 @@ var FileConventionArgsType = type90({
52126
52278
  });
52127
52279
  function parseArgs14(raw) {
52128
52280
  const parsed = FileConventionArgsType(raw);
52129
- if (parsed instanceof type90.errors) {
52281
+ if (parsed instanceof type91.errors) {
52130
52282
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
52131
52283
  }
52132
52284
  const result = {
@@ -52160,8 +52312,8 @@ var ARTIFACT_FILE_CONVENTION_TOOL = {
52160
52312
  };
52161
52313
 
52162
52314
  // packages/dbx-components-mcp/src/tools/explain-rule.tool.ts
52163
- import { type as type91 } from "arktype";
52164
- var ExplainRuleArgsType = type91({
52315
+ import { type as type92 } from "arktype";
52316
+ var ExplainRuleArgsType = type92({
52165
52317
  "code?": "string",
52166
52318
  "source?": "string",
52167
52319
  "severity?": "'error' | 'warning'",
@@ -52204,7 +52356,7 @@ var TOOL16 = {
52204
52356
  };
52205
52357
  async function run17(rawArgs) {
52206
52358
  const parsed = ExplainRuleArgsType(rawArgs);
52207
- if (parsed instanceof type91.errors) {
52359
+ if (parsed instanceof type92.errors) {
52208
52360
  return toolError(`Invalid arguments: ${parsed.summary}`);
52209
52361
  }
52210
52362
  if (parsed.code !== void 0) {
@@ -52292,9 +52444,9 @@ function groupBySource(entries) {
52292
52444
  var EXPLAIN_RULE_TOOL = { definition: TOOL16, run: run17 };
52293
52445
 
52294
52446
  // packages/dbx-components-mcp/src/tools/app-validate.tool.ts
52295
- import { resolve as resolve60, join as join25 } from "node:path";
52447
+ import { resolve as resolve61, join as join25 } from "node:path";
52296
52448
  import { readdir as readdir11, readFile as readFile29, stat as stat16 } from "node:fs/promises";
52297
- import { type as type92 } from "arktype";
52449
+ import { type as type93 } from "arktype";
52298
52450
  var { inspectAppStorageFiles: inspectAppStorageFiles4, validateAppStorageFiles: validateAppStorageFiles3 } = storagefile_m_validate_app_exports;
52299
52451
  var { inspectAppNotifications: inspectAppNotifications4, validateAppNotifications: validateAppNotifications3 } = notification_m_validate_app_exports;
52300
52452
  var { validateAppFixtures: validateAppFixtures3 } = model_fixture_shared_exports;
@@ -52306,7 +52458,7 @@ var { validateAppModelApi: validateAppModelApi3 } = model_api_validate_app_expor
52306
52458
  var { validateModelTestApp: validateModelTestApp3 } = model_test_validate_app_exports;
52307
52459
  var { extractComponentModels: extractComponentModels3 } = model_list_component_exports;
52308
52460
  var Cluster = "'storagefile_m' | 'notification_m' | 'model_folder' | 'system_m' | 'fixture' | 'manifest' | 'model_api' | 'firebase_index' | 'asset' | 'model_test'";
52309
- var AppValidateArgsType = type92({
52461
+ var AppValidateArgsType = type93({
52310
52462
  componentDir: "string",
52311
52463
  apiDir: "string",
52312
52464
  "webDir?": "string",
@@ -52362,17 +52514,17 @@ var TOOL17 = {
52362
52514
  };
52363
52515
  async function run18(rawArgs) {
52364
52516
  const parsed = AppValidateArgsType(rawArgs);
52365
- if (parsed instanceof type92.errors) {
52517
+ if (parsed instanceof type93.errors) {
52366
52518
  return toolError(`Invalid arguments: ${parsed.summary}`);
52367
52519
  }
52368
52520
  const cwd = process.cwd();
52369
52521
  const pathCheck = ensureArgPaths(parsed, cwd);
52370
52522
  if (pathCheck !== void 0) return pathCheck;
52371
- const componentAbs = resolve60(cwd, parsed.componentDir);
52372
- const apiAbs = resolve60(cwd, parsed.apiDir);
52373
- const webAbs = parsed.webDir === void 0 ? void 0 : resolve60(cwd, parsed.webDir);
52523
+ const componentAbs = resolve61(cwd, parsed.componentDir);
52524
+ const apiAbs = resolve61(cwd, parsed.apiDir);
52525
+ const webAbs = parsed.webDir === void 0 ? void 0 : resolve61(cwd, parsed.webDir);
52374
52526
  const indexesRel = parsed.indexesFile ?? "firestore.indexes.json";
52375
- const indexesAbs = resolve60(cwd, indexesRel);
52527
+ const indexesAbs = resolve61(cwd, indexesRel);
52376
52528
  const skip = new Set(parsed.skip ?? []);
52377
52529
  const findings = [];
52378
52530
  const skipped = [];
@@ -52730,9 +52882,9 @@ var APP_VALIDATE_TOOL = { definition: TOOL17, run: run18 };
52730
52882
 
52731
52883
  // packages/dbx-components-mcp/src/tools/firestore-rules-scan.tool.ts
52732
52884
  import { readFile as readFile30 } from "node:fs/promises";
52733
- import { resolve as resolve61 } from "node:path";
52734
- import { type as type93 } from "arktype";
52735
- var ScanArgsType = type93({
52885
+ import { resolve as resolve62 } from "node:path";
52886
+ import { type as type94 } from "arktype";
52887
+ var ScanArgsType = type94({
52736
52888
  "rulesFile?": "string",
52737
52889
  "collection?": "string",
52738
52890
  "serverOnly?": "boolean",
@@ -52838,7 +52990,7 @@ function formatFirestoreRulesScanReportAsMarkdown(report) {
52838
52990
  }
52839
52991
  async function run19(rawArgs) {
52840
52992
  const parsed = ScanArgsType(rawArgs ?? {});
52841
- if (parsed instanceof type93.errors) {
52993
+ if (parsed instanceof type94.errors) {
52842
52994
  return toolError(`Invalid arguments: ${parsed.summary}`);
52843
52995
  }
52844
52996
  const cwd = process.cwd();
@@ -52853,7 +53005,7 @@ async function run19(rawArgs) {
52853
53005
  if (failure === void 0) {
52854
53006
  let source;
52855
53007
  try {
52856
- source = await readFile30(resolve61(cwd, rulesFile), "utf8");
53008
+ source = await readFile30(resolve62(cwd, rulesFile), "utf8");
52857
53009
  } catch (err) {
52858
53010
  failure = `Failed to read ${rulesFile}: ${err instanceof Error ? err.message : String(err)}`;
52859
53011
  }
@@ -52875,8 +53027,8 @@ var FIRESTORE_RULES_SCAN_TOOL = { definition: TOOL18, run: run19 };
52875
53027
 
52876
53028
  // packages/dbx-components-mcp/src/tools/model-server-only-validate-app.tool.ts
52877
53029
  import { readdir as readdir12, readFile as readFile31, stat as stat17 } from "node:fs/promises";
52878
- import { join as join26, relative as relative20, resolve as resolve62 } from "node:path";
52879
- import { type as type94 } from "arktype";
53030
+ import { join as join26, relative as relative20, resolve as resolve63 } from "node:path";
53031
+ import { type as type95 } from "arktype";
52880
53032
 
52881
53033
  // packages/dbx-components-mcp/src/tools/model-server-only-validate-app/extract-service-flags.ts
52882
53034
  var SERVICE_FACTORY_TAG2 = /@dbxModelServiceFactory\s+([A-Za-z_$][\w$]*)/;
@@ -53197,7 +53349,7 @@ function buildViolation(input) {
53197
53349
  }
53198
53350
 
53199
53351
  // packages/dbx-components-mcp/src/tools/model-server-only-validate-app.tool.ts
53200
- var ValidateAppArgsType3 = type94({
53352
+ var ValidateAppArgsType3 = type95({
53201
53353
  componentDir: "string",
53202
53354
  "rulesFile?": "string",
53203
53355
  "serviceFile?": "string",
@@ -53251,7 +53403,7 @@ async function scanModelFacts(input) {
53251
53403
  const interfaces = /* @__PURE__ */ new Map();
53252
53404
  const identities = /* @__PURE__ */ new Map();
53253
53405
  for (const dir of input.dirs) {
53254
- for (const filePath of await walkTypeScriptFiles(resolve62(input.cwd, dir))) {
53406
+ for (const filePath of await walkTypeScriptFiles(resolve63(input.cwd, dir))) {
53255
53407
  const text = await readFile31(filePath, "utf8");
53256
53408
  if (!text.includes("firestoreModelIdentity(") && !text.includes("@dbxModel")) continue;
53257
53409
  const relativePath = relative20(input.cwd, filePath);
@@ -53300,7 +53452,7 @@ async function isDirectory5(path) {
53300
53452
  }
53301
53453
  async function run20(rawArgs) {
53302
53454
  const parsed = ValidateAppArgsType3(rawArgs);
53303
- if (parsed instanceof type94.errors) {
53455
+ if (parsed instanceof type95.errors) {
53304
53456
  return toolError(`Invalid arguments: ${parsed.summary}`);
53305
53457
  }
53306
53458
  const cwd = process.cwd();
@@ -53317,22 +53469,22 @@ async function run20(rawArgs) {
53317
53469
  if (failure !== void 0) {
53318
53470
  return toolError(failure);
53319
53471
  }
53320
- const rulesSource = await readOptionalFile(resolve62(cwd, rulesFile));
53472
+ const rulesSource = await readOptionalFile(resolve63(cwd, rulesFile));
53321
53473
  if (rulesSource === void 0) {
53322
53474
  return toolError(`Failed to read rules file \`${rulesFile}\`.`);
53323
53475
  }
53324
- const serviceSource = await readOptionalFile(resolve62(cwd, serviceFile));
53476
+ const serviceSource = await readOptionalFile(resolve63(cwd, serviceFile));
53325
53477
  if (serviceSource === void 0) {
53326
53478
  return toolError(`Failed to read service file \`${serviceFile}\`. Pass \`serviceFile\` when the component does not use the conventional \`src/lib/model/service.ts\` path.`);
53327
53479
  }
53328
53480
  const requestedDirs = [`${parsed.componentDir.replace(/[/\\]+$/, "")}/src/lib`, ...DEFAULT_UPSTREAM_MODEL_DIRS, ...parsed.modelDirs ?? []];
53329
53481
  const modelDirs = [];
53330
53482
  for (const dir of requestedDirs) {
53331
- if (!modelDirs.includes(dir) && await isDirectory5(resolve62(cwd, dir))) {
53483
+ if (!modelDirs.includes(dir) && await isDirectory5(resolve63(cwd, dir))) {
53332
53484
  modelDirs.push(dir);
53333
53485
  }
53334
53486
  }
53335
- const manifestSource = parsed.manifestFile === void 0 ? void 0 : await readOptionalFile(resolve62(cwd, parsed.manifestFile));
53487
+ const manifestSource = parsed.manifestFile === void 0 ? void 0 : await readOptionalFile(resolve63(cwd, parsed.manifestFile));
53336
53488
  if (parsed.manifestFile !== void 0 && manifestSource === void 0) {
53337
53489
  return toolError(`Failed to read model manifest \`${parsed.manifestFile}\`.`);
53338
53490
  }
@@ -53354,10 +53506,10 @@ async function run20(rawArgs) {
53354
53506
  var MODEL_SERVER_ONLY_VALIDATE_APP_TOOL = { definition: TOOL19, run: run20 };
53355
53507
 
53356
53508
  // packages/dbx-components-mcp/src/tools/model-list-component.tool.ts
53357
- import { resolve as resolve63 } from "node:path";
53358
- import { type as type95 } from "arktype";
53509
+ import { resolve as resolve64 } from "node:path";
53510
+ import { type as type96 } from "arktype";
53359
53511
  var { formatReportAsJson: formatReportAsJson18, formatReportAsMarkdown: formatReportAsMarkdown18, listComponentModels: listComponentModels2 } = model_list_component_exports;
53360
- var ListArgsType3 = type95({
53512
+ var ListArgsType3 = type96({
53361
53513
  componentDir: "string",
53362
53514
  "apiDir?": "string",
53363
53515
  "format?": "'markdown' | 'json'"
@@ -53388,7 +53540,7 @@ var TOOL20 = {
53388
53540
  };
53389
53541
  async function run21(rawArgs) {
53390
53542
  const parsed = ListArgsType3(rawArgs);
53391
- if (parsed instanceof type95.errors) {
53543
+ if (parsed instanceof type96.errors) {
53392
53544
  return toolError(`Invalid arguments: ${parsed.summary}`);
53393
53545
  }
53394
53546
  const cwd = process.cwd();
@@ -53401,8 +53553,8 @@ async function run21(rawArgs) {
53401
53553
  ensureError = err instanceof Error ? err.message : String(err);
53402
53554
  }
53403
53555
  if (ensureError === void 0) {
53404
- const componentAbs = resolve63(cwd, parsed.componentDir);
53405
- const apiAbs = parsed.apiDir ? resolve63(cwd, parsed.apiDir) : void 0;
53556
+ const componentAbs = resolve64(cwd, parsed.componentDir);
53557
+ const apiAbs = parsed.apiDir ? resolve64(cwd, parsed.apiDir) : void 0;
53406
53558
  let report;
53407
53559
  let listError;
53408
53560
  try {
@@ -53424,10 +53576,10 @@ async function run21(rawArgs) {
53424
53576
  var MODEL_LIST_COMPONENT_TOOL = { definition: TOOL20, run: run21 };
53425
53577
 
53426
53578
  // packages/dbx-components-mcp/src/tools/server-actions-list-app.tool.ts
53427
- import { resolve as resolve64 } from "node:path";
53428
- import { type as type96 } from "arktype";
53579
+ import { resolve as resolve65 } from "node:path";
53580
+ import { type as type97 } from "arktype";
53429
53581
  var { formatReportAsJson: formatReportAsJson19, formatReportAsMarkdown: formatReportAsMarkdown19, listAppServerActions: listAppServerActions2 } = server_actions_list_app_exports;
53430
- var ListArgsType4 = type96({
53582
+ var ListArgsType4 = type97({
53431
53583
  apiDir: "string",
53432
53584
  "format?": "'markdown' | 'json'"
53433
53585
  });
@@ -53456,7 +53608,7 @@ var TOOL21 = {
53456
53608
  };
53457
53609
  async function run22(rawArgs) {
53458
53610
  const parsed = ListArgsType4(rawArgs);
53459
- if (parsed instanceof type96.errors) {
53611
+ if (parsed instanceof type97.errors) {
53460
53612
  return toolError(`Invalid arguments: ${parsed.summary}`);
53461
53613
  }
53462
53614
  const cwd = process.cwd();
@@ -53468,7 +53620,7 @@ async function run22(rawArgs) {
53468
53620
  ensureError = err instanceof Error ? err.message : String(err);
53469
53621
  }
53470
53622
  if (ensureError === void 0) {
53471
- const apiAbs = resolve64(cwd, parsed.apiDir);
53623
+ const apiAbs = resolve65(cwd, parsed.apiDir);
53472
53624
  let report;
53473
53625
  let listError;
53474
53626
  try {
@@ -53490,16 +53642,16 @@ async function run22(rawArgs) {
53490
53642
  var SERVER_ACTIONS_LIST_APP_TOOL = { definition: TOOL21, run: run22 };
53491
53643
 
53492
53644
  // packages/dbx-components-mcp/src/tools/mcp-config.tool.ts
53493
- import { type as type97 } from "arktype";
53494
- import { resolve as resolve67 } from "node:path";
53645
+ import { type as type98 } from "arktype";
53646
+ import { resolve as resolve68 } from "node:path";
53495
53647
 
53496
53648
  // packages/dbx-components-mcp/src/tools/mcp-config/snapshot.ts
53497
- import { dirname as dirname21, isAbsolute as isAbsolute18, relative as relative21, resolve as resolve65 } from "node:path";
53649
+ import { dirname as dirname22, isAbsolute as isAbsolute18, relative as relative21, resolve as resolve66 } from "node:path";
53498
53650
  import { stat as stat18 } from "node:fs/promises";
53499
53651
  async function buildSnapshot(input) {
53500
53652
  const { workspaceRoot, explicitDirs } = input;
53501
53653
  const configResult = await findAndLoadConfig({ cwd: workspaceRoot });
53502
- const configBaseDir = configResult.configPath === null ? workspaceRoot : dirname21(configResult.configPath);
53654
+ const configBaseDir = configResult.configPath === null ? workspaceRoot : dirname22(configResult.configPath);
53503
53655
  const registeredSources = await collectRegisteredSources(configResult.config, configBaseDir, workspaceRoot);
53504
53656
  const packages = await discoverDownstreamPackages({ workspaceRoot, explicitDirs });
53505
53657
  const packageSnapshots = packages.map((pkg) => ({
@@ -53521,7 +53673,7 @@ async function collectRegisteredSources(config, configBaseDir, workspaceRoot) {
53521
53673
  for (const cluster of DOWNSTREAM_CLUSTERS) {
53522
53674
  const declared = config[cluster]?.sources ?? [];
53523
53675
  for (const declaredPath of declared) {
53524
- const absolutePath = isAbsolute18(declaredPath) ? declaredPath : resolve65(configBaseDir, declaredPath);
53676
+ const absolutePath = isAbsolute18(declaredPath) ? declaredPath : resolve66(configBaseDir, declaredPath);
53525
53677
  const exists = await fileExists5(absolutePath);
53526
53678
  const relativePath = relativeOrAbsolute(workspaceRoot, absolutePath);
53527
53679
  out.push({ cluster, declaredPath, absolutePath, relativePath, exists });
@@ -53561,7 +53713,7 @@ function relativeOrAbsolute(from, target) {
53561
53713
 
53562
53714
  // packages/dbx-components-mcp/src/tools/mcp-config/init.ts
53563
53715
  import { writeFile as nodeWriteFile4, mkdir as nodeMkdir, readFile as nodeReadFile8 } from "node:fs/promises";
53564
- import { dirname as dirname22, relative as relative22, resolve as resolve66 } from "node:path";
53716
+ import { dirname as dirname23, relative as relative22, resolve as resolve67 } from "node:path";
53565
53717
  var HEURISTIC_CLUSTERS = ["uiComponents", "forgeFields", "pipes", "actions", "filters"];
53566
53718
  var CLUSTER_FILENAME_SEGMENT = {
53567
53719
  semanticTypes: "semantic",
@@ -53600,7 +53752,7 @@ async function applyInitPlan(plan, opts) {
53600
53752
  const mkdir = opts?.mkdir ?? defaultMkdir;
53601
53753
  for (const change of plan.changes) {
53602
53754
  if (change.reason === "unchanged") continue;
53603
- await mkdir(dirname22(change.absolutePath));
53755
+ await mkdir(dirname23(change.absolutePath));
53604
53756
  await writeFile2(change.absolutePath, change.after);
53605
53757
  }
53606
53758
  }
@@ -53625,7 +53777,7 @@ function upsertClusterSection(input) {
53625
53777
  async function planPackageScanConfig(input) {
53626
53778
  const { snapshot, packageSnapshot, readFile: readFile33 } = input;
53627
53779
  const { pkg } = packageSnapshot;
53628
- const scanConfigPath = resolve66(pkg.absDir, "dbx-mcp.scan.json");
53780
+ const scanConfigPath = resolve67(pkg.absDir, "dbx-mcp.scan.json");
53629
53781
  const before = await tryRead(scanConfigPath, readFile33);
53630
53782
  const parsed = parseExisting(before);
53631
53783
  const targetClusters = HEURISTIC_CLUSTERS.filter((c) => pkg.candidateClusters.includes(c));
@@ -53655,7 +53807,7 @@ async function planPackageScanConfig(input) {
53655
53807
  }
53656
53808
  async function planRootConfig(input) {
53657
53809
  const { snapshot, sourcesToRegister, readFile: readFile33 } = input;
53658
- const configPath = snapshot.configPath ?? resolve66(snapshot.workspaceRoot, "dbx-mcp.config.json");
53810
+ const configPath = snapshot.configPath ?? resolve67(snapshot.workspaceRoot, "dbx-mcp.config.json");
53659
53811
  const before = snapshot.configPath === null ? null : await tryRead(configPath, readFile33);
53660
53812
  const baseConfig = snapshot.config === null ? { version: 1 } : cloneConfig(snapshot.config);
53661
53813
  if (baseConfig.version !== 1) baseConfig.version = 1;
@@ -53684,14 +53836,14 @@ async function planRootConfig(input) {
53684
53836
  };
53685
53837
  }
53686
53838
  function defaultOutFor(input) {
53687
- const targetAbs = resolve66(input.snapshot.workspaceRoot, ".tmp/dbx-mcp", `${input.slug}.${clusterFilenameSegment(input.cluster)}.json`);
53688
- return relative22(dirname22(input.scanConfigPath), targetAbs).replaceAll("\\", "/");
53839
+ const targetAbs = resolve67(input.snapshot.workspaceRoot, ".tmp/dbx-mcp", `${input.slug}.${clusterFilenameSegment(input.cluster)}.json`);
53840
+ return relative22(dirname23(input.scanConfigPath), targetAbs).replaceAll("\\", "/");
53689
53841
  }
53690
53842
  function resolveScanOut(scanConfigPath, out) {
53691
- return resolve66(dirname22(scanConfigPath), out);
53843
+ return resolve67(dirname23(scanConfigPath), out);
53692
53844
  }
53693
53845
  function relativeFromConfig(snapshot, absolute) {
53694
- const configDir = snapshot.configPath === null ? snapshot.workspaceRoot : dirname22(snapshot.configPath);
53846
+ const configDir = snapshot.configPath === null ? snapshot.workspaceRoot : dirname23(snapshot.configPath);
53695
53847
  return relative22(configDir, absolute).replaceAll("\\", "/");
53696
53848
  }
53697
53849
  function workspaceRel(workspaceRoot, absolute) {
@@ -54024,7 +54176,7 @@ var TOOL22 = {
54024
54176
  required: ["op"]
54025
54177
  }
54026
54178
  };
54027
- var McpConfigArgsType = type97({
54179
+ var McpConfigArgsType = type98({
54028
54180
  op: "'status' | 'validate' | 'init' | 'refresh'",
54029
54181
  "cwd?": "string",
54030
54182
  "dryRun?": "boolean",
@@ -54032,10 +54184,10 @@ var McpConfigArgsType = type97({
54032
54184
  });
54033
54185
  function parseArgs15(rawArgs, defaultCwd) {
54034
54186
  const parsed = McpConfigArgsType(rawArgs);
54035
- if (parsed instanceof type97.errors) {
54187
+ if (parsed instanceof type98.errors) {
54036
54188
  return `Invalid arguments: ${parsed.summary}`;
54037
54189
  }
54038
- const workspaceRoot = parsed.cwd !== void 0 && parsed.cwd.length > 0 ? resolve67(defaultCwd, parsed.cwd) : defaultCwd;
54190
+ const workspaceRoot = parsed.cwd !== void 0 && parsed.cwd.length > 0 ? resolve68(defaultCwd, parsed.cwd) : defaultCwd;
54039
54191
  const invalidDirError = validateExplicitDirs(parsed.explicitDirs, workspaceRoot);
54040
54192
  let result;
54041
54193
  if (invalidDirError === void 0) {
@@ -54104,12 +54256,12 @@ var MCP_CONFIG_TOOL = {
54104
54256
  };
54105
54257
 
54106
54258
  // packages/dbx-components-mcp/src/tools/log-search.tool.ts
54107
- import { type as type98 } from "arktype";
54259
+ import { type as type99 } from "arktype";
54108
54260
  import { basename as basename10 } from "node:path";
54109
54261
 
54110
54262
  // packages/dbx-components-mcp/src/tools/log-search/discover-logs.ts
54111
54263
  import { readdir as readdir13, stat as stat19 } from "node:fs/promises";
54112
- import { basename as basename9, join as join27, resolve as resolve68 } from "node:path";
54264
+ import { basename as basename9, join as join27, resolve as resolve69 } from "node:path";
54113
54265
  var DBX_LOG_PATH_ENV_VAR = "DBX_LOG_PATH";
54114
54266
  function resolveLogBasePath(input) {
54115
54267
  let result;
@@ -54117,11 +54269,11 @@ function resolveLogBasePath(input) {
54117
54269
  const fromEnv = input.env[DBX_LOG_PATH_ENV_VAR]?.trim();
54118
54270
  const fromConfig = input.configBasePath?.trim();
54119
54271
  if (fromArg !== void 0 && fromArg.length > 0) {
54120
- result = { kind: "ok", absolutePath: resolve68(fromArg), source: "arg" };
54272
+ result = { kind: "ok", absolutePath: resolve69(fromArg), source: "arg" };
54121
54273
  } else if (fromEnv !== void 0 && fromEnv.length > 0) {
54122
- result = { kind: "ok", absolutePath: resolve68(fromEnv), source: "env" };
54274
+ result = { kind: "ok", absolutePath: resolve69(fromEnv), source: "env" };
54123
54275
  } else if (fromConfig !== void 0 && fromConfig.length > 0) {
54124
- result = { kind: "ok", absolutePath: resolve68(fromConfig), source: "config" };
54276
+ result = { kind: "ok", absolutePath: resolve69(fromConfig), source: "config" };
54125
54277
  } else {
54126
54278
  result = { kind: "error", message: `No log path configured. Set ${DBX_LOG_PATH_ENV_VAR}, pass basePath, or add a logs.basePath block to dbx-mcp.config.json.` };
54127
54279
  }
@@ -54517,7 +54669,7 @@ var DBX_LOG_SEARCH_TOOL = {
54517
54669
  }
54518
54670
  }
54519
54671
  };
54520
- var LogSearchArgsType = type98({
54672
+ var LogSearchArgsType = type99({
54521
54673
  "query?": "string",
54522
54674
  "mode?": "'fuzzy' | 'keyword' | 'list'",
54523
54675
  "basePath?": "string",
@@ -54530,7 +54682,7 @@ var LogSearchArgsType = type98({
54530
54682
  });
54531
54683
  function parseArgs16(input) {
54532
54684
  const parsed = LogSearchArgsType(input.raw ?? {});
54533
- if (parsed instanceof type98.errors) {
54685
+ if (parsed instanceof type99.errors) {
54534
54686
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
54535
54687
  }
54536
54688
  const rawQuery = parsed.query?.trim();
@@ -54652,7 +54804,7 @@ function createLogSearchTool(config) {
54652
54804
  var LOG_SEARCH_TOOL = createLogSearchTool();
54653
54805
 
54654
54806
  // packages/dbx-components-mcp/src/tools/lookup-semantic-type.tool.ts
54655
- import { type as type99 } from "arktype";
54807
+ import { type as type100 } from "arktype";
54656
54808
 
54657
54809
  // packages/dbx-components-mcp/src/tools/semantic-type-lookup.formatter.ts
54658
54810
  function formatSemanticTypeEntry(entry, depth) {
@@ -54828,13 +54980,13 @@ var DBX_SEMANTIC_TYPE_LOOKUP_TOOL = {
54828
54980
  required: ["name"]
54829
54981
  }
54830
54982
  };
54831
- var LookupSemanticTypeArgsType = type99({
54983
+ var LookupSemanticTypeArgsType = type100({
54832
54984
  name: "string",
54833
54985
  "depth?": "'brief' | 'full'"
54834
54986
  });
54835
54987
  function parseLookupArgs2(raw) {
54836
54988
  const parsed = LookupSemanticTypeArgsType(raw);
54837
- if (parsed instanceof type99.errors) {
54989
+ if (parsed instanceof type100.errors) {
54838
54990
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
54839
54991
  }
54840
54992
  const result = {
@@ -54896,7 +55048,7 @@ function formatNotFound16(name, registry) {
54896
55048
  }
54897
55049
 
54898
55050
  // packages/dbx-components-mcp/src/tools/search-semantic-type.tool.ts
54899
- import { type as type100 } from "arktype";
55051
+ import { type as type101 } from "arktype";
54900
55052
  var DEFAULT_LIMIT9 = 25;
54901
55053
  var MAX_LIMIT8 = 100;
54902
55054
  var DBX_SEMANTIC_TYPE_SEARCH_TOOL = {
@@ -54929,7 +55081,7 @@ var DBX_SEMANTIC_TYPE_SEARCH_TOOL = {
54929
55081
  }
54930
55082
  }
54931
55083
  };
54932
- var SearchSemanticTypeArgsType = type100({
55084
+ var SearchSemanticTypeArgsType = type101({
54933
55085
  "topic?": "string",
54934
55086
  "baseType?": "string",
54935
55087
  "package?": "string",
@@ -54938,7 +55090,7 @@ var SearchSemanticTypeArgsType = type100({
54938
55090
  });
54939
55091
  function parseSearchArgs2(raw) {
54940
55092
  const parsed = SearchSemanticTypeArgsType(raw);
54941
- if (parsed instanceof type100.errors) {
55093
+ if (parsed instanceof type101.errors) {
54942
55094
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
54943
55095
  }
54944
55096
  const rawLimit = parsed.limit ?? DEFAULT_LIMIT9;
@@ -55055,7 +55207,7 @@ function describeFilters(args) {
55055
55207
  }
55056
55208
 
55057
55209
  // packages/dbx-components-mcp/src/tools/css-token-lookup.tool.ts
55058
- import { type as type101 } from "arktype";
55210
+ import { type as type102 } from "arktype";
55059
55211
 
55060
55212
  // packages/dbx-components-mcp/src/tools/css-token-lookup/synonyms.ts
55061
55213
  var INTENT_SYNONYMS = /* @__PURE__ */ new Map([
@@ -55624,7 +55776,7 @@ var DBX_CSS_TOKEN_LOOKUP_TOOL = {
55624
55776
  }
55625
55777
  }
55626
55778
  };
55627
- var CssTokenLookupArgs = type101({
55779
+ var CssTokenLookupArgs = type102({
55628
55780
  "intent?": "string",
55629
55781
  "value?": "string",
55630
55782
  "role?": "string",
@@ -55633,7 +55785,7 @@ var CssTokenLookupArgs = type101({
55633
55785
  });
55634
55786
  function parseArgs17(raw) {
55635
55787
  const parsed = CssTokenLookupArgs(raw);
55636
- if (parsed instanceof type101.errors) {
55788
+ if (parsed instanceof type102.errors) {
55637
55789
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
55638
55790
  }
55639
55791
  const result = {
@@ -55665,7 +55817,7 @@ function createCssTokenLookupTool(input) {
55665
55817
  }
55666
55818
 
55667
55819
  // packages/dbx-components-mcp/src/tools/css-class-lookup.tool.ts
55668
- import { type as type102 } from "arktype";
55820
+ import { type as type103 } from "arktype";
55669
55821
  var DBX_CSS_CLASS_LOOKUP_TOOL = {
55670
55822
  name: "dbx_css_class_lookup",
55671
55823
  description: [
@@ -55703,7 +55855,7 @@ var DBX_CSS_CLASS_LOOKUP_TOOL = {
55703
55855
  }
55704
55856
  }
55705
55857
  };
55706
- var CssClassLookupArgs = type102({
55858
+ var CssClassLookupArgs = type103({
55707
55859
  "name?": "string",
55708
55860
  "declarations?": "string",
55709
55861
  "intent?": "string",
@@ -55714,7 +55866,7 @@ var CssClassLookupArgs = type102({
55714
55866
  });
55715
55867
  function parseArgs18(raw) {
55716
55868
  const parsed = CssClassLookupArgs(raw);
55717
- if (parsed instanceof type102.errors) {
55869
+ if (parsed instanceof type103.errors) {
55718
55870
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
55719
55871
  }
55720
55872
  return {
@@ -56022,8 +56174,8 @@ function renderAmbiguous(matches) {
56022
56174
 
56023
56175
  // packages/dbx-components-mcp/src/tools/ui-smell-check.tool.ts
56024
56176
  import { readFile as nodeReadFile9 } from "node:fs/promises";
56025
- import { basename as basename11, extname, isAbsolute as isAbsolute19, resolve as resolve69 } from "node:path";
56026
- import { type as type103 } from "arktype";
56177
+ import { basename as basename11, extname, isAbsolute as isAbsolute19, resolve as resolve70 } from "node:path";
56178
+ import { type as type104 } from "arktype";
56027
56179
  var { detectSmellsDetailed: detectSmellsDetailed2, formatBatchSmellResult: formatBatchSmellResult2, formatSmellResult: formatSmellResult2 } = ui_smell_check_exports;
56028
56180
  var DBX_UI_SMELL_CHECK_TOOL = {
56029
56181
  name: "dbx_ui_smell_check",
@@ -56057,18 +56209,18 @@ var DBX_UI_SMELL_CHECK_TOOL = {
56057
56209
  }
56058
56210
  }
56059
56211
  };
56060
- var SmellCheckArgs = type103({
56212
+ var SmellCheckArgs = type104({
56061
56213
  "html?": "string",
56062
56214
  "scss?": "string",
56063
56215
  "htmlPath?": "string",
56064
56216
  "scssPath?": "string",
56065
56217
  "paths?": "string[]",
56066
56218
  "context?": "string",
56067
- "projectConventions?": type103({ "cardWrapperClasses?": "string[]" })
56219
+ "projectConventions?": type104({ "cardWrapperClasses?": "string[]" })
56068
56220
  });
56069
56221
  function parseArgs19(raw, defaults) {
56070
56222
  const parsed = SmellCheckArgs(raw);
56071
- if (parsed instanceof type103.errors) {
56223
+ if (parsed instanceof type104.errors) {
56072
56224
  throw new TypeError(`Invalid arguments: ${parsed.summary}`);
56073
56225
  }
56074
56226
  const html = parsed.html ?? "";
@@ -56080,7 +56232,7 @@ function parseArgs19(raw, defaults) {
56080
56232
  }
56081
56233
  var DEFAULT_READ_FILE17 = (path) => nodeReadFile9(path, "utf-8");
56082
56234
  async function readPathInput(path, cwd, readFile33) {
56083
- const absolute = isAbsolute19(path) ? path : resolve69(cwd, path);
56235
+ const absolute = isAbsolute19(path) ? path : resolve70(cwd, path);
56084
56236
  return readFile33(absolute);
56085
56237
  }
56086
56238
  function pairBatchPaths(paths) {
@@ -56287,7 +56439,7 @@ async function tryReadBatchPath(path, cwd, reader) {
56287
56439
  }
56288
56440
 
56289
56441
  // packages/dbx-components-mcp/src/tools/auth-claim-lookup.tool.ts
56290
- import { type as type104 } from "arktype";
56442
+ import { type as type105 } from "arktype";
56291
56443
  var DBX_AUTH_CLAIM_LOOKUP_TOOL = {
56292
56444
  name: "dbx_auth_claim_lookup",
56293
56445
  description: [
@@ -56307,7 +56459,7 @@ var DBX_AUTH_CLAIM_LOOKUP_TOOL = {
56307
56459
  required: ["topic"]
56308
56460
  }
56309
56461
  };
56310
- var ClaimArgsType = type104({
56462
+ var ClaimArgsType = type105({
56311
56463
  topic: "string",
56312
56464
  "app?": "string",
56313
56465
  "depth?": "'brief' | 'full'"
@@ -56320,7 +56472,7 @@ function createAuthClaimLookupTool(input) {
56320
56472
  run(rawArgs) {
56321
56473
  const parsed = ClaimArgsType(rawArgs);
56322
56474
  let result;
56323
- if (parsed instanceof type104.errors) {
56475
+ if (parsed instanceof type105.errors) {
56324
56476
  result = toolError(`Invalid arguments: ${parsed.summary}`);
56325
56477
  } else {
56326
56478
  const { topic, app, depth = "full" } = parsed;
@@ -56419,7 +56571,7 @@ function code16(value) {
56419
56571
  }
56420
56572
 
56421
56573
  // packages/dbx-components-mcp/src/tools/auth-scope-lookup.tool.ts
56422
- import { type as type105 } from "arktype";
56574
+ import { type as type106 } from "arktype";
56423
56575
  var DBX_AUTH_SCOPE_LOOKUP_TOOL = {
56424
56576
  name: "dbx_auth_scope_lookup",
56425
56577
  description: ["Look up an OIDC scope (`model.read`, `model.write`, `demo`).", "", "Returns the prefix family, the CRUD verb (when a callModel scope), the source `path:line` declaration, every gate that enforces it, the error code thrown on rejection, and the apps that accept it."].join("\n"),
@@ -56432,7 +56584,7 @@ var DBX_AUTH_SCOPE_LOOKUP_TOOL = {
56432
56584
  required: ["topic"]
56433
56585
  }
56434
56586
  };
56435
- var ScopeArgsType = type105({
56587
+ var ScopeArgsType = type106({
56436
56588
  topic: "string",
56437
56589
  "depth?": "'brief' | 'full'"
56438
56590
  });
@@ -56444,7 +56596,7 @@ function createAuthScopeLookupTool(input) {
56444
56596
  run(rawArgs) {
56445
56597
  const parsed = ScopeArgsType(rawArgs);
56446
56598
  let result;
56447
- if (parsed instanceof type105.errors) {
56599
+ if (parsed instanceof type106.errors) {
56448
56600
  result = toolError(`Invalid arguments: ${parsed.summary}`);
56449
56601
  } else {
56450
56602
  const { topic, depth = "full" } = parsed;
@@ -56516,7 +56668,7 @@ function sourceLink2(path, line) {
56516
56668
  }
56517
56669
 
56518
56670
  // packages/dbx-components-mcp/src/tools/auth-role-lookup.tool.ts
56519
- import { type as type106 } from "arktype";
56671
+ import { type as type107 } from "arktype";
56520
56672
  var DBX_AUTH_ROLE_LOOKUP_TOOL = {
56521
56673
  name: "dbx_auth_role_lookup",
56522
56674
  description: [
@@ -56538,7 +56690,7 @@ var DBX_AUTH_ROLE_LOOKUP_TOOL = {
56538
56690
  }
56539
56691
  }
56540
56692
  };
56541
- var RoleArgsType = type106({
56693
+ var RoleArgsType = type107({
56542
56694
  "topic?": "string",
56543
56695
  "tag?": "string",
56544
56696
  "model?": "string",
@@ -56553,7 +56705,7 @@ function createAuthRoleLookupTool(input) {
56553
56705
  run(rawArgs) {
56554
56706
  const parsed = RoleArgsType(rawArgs);
56555
56707
  let result;
56556
- if (parsed instanceof type106.errors) {
56708
+ if (parsed instanceof type107.errors) {
56557
56709
  result = toolError(`Invalid arguments: ${parsed.summary}`);
56558
56710
  } else {
56559
56711
  const text = dispatchRoleLookup(registry, parsed);
@@ -56706,7 +56858,7 @@ function sourceLink3(path, line) {
56706
56858
  }
56707
56859
 
56708
56860
  // packages/dbx-components-mcp/src/tools/auth-token-explain.tool.ts
56709
- import { type as type107 } from "arktype";
56861
+ import { type as type108 } from "arktype";
56710
56862
  var DBX_AUTH_TOKEN_EXPLAIN_TOOL = {
56711
56863
  name: "dbx_auth_token_explain",
56712
56864
  description: [
@@ -56724,7 +56876,7 @@ var DBX_AUTH_TOKEN_EXPLAIN_TOOL = {
56724
56876
  }
56725
56877
  }
56726
56878
  };
56727
- var TokenArgsType = type107({
56879
+ var TokenArgsType = type108({
56728
56880
  "token?": "string",
56729
56881
  "claims?": "object",
56730
56882
  "app?": "string",
@@ -56739,7 +56891,7 @@ function createAuthTokenExplainTool(input) {
56739
56891
  run(rawArgs) {
56740
56892
  const parsed = TokenArgsType(rawArgs);
56741
56893
  let result;
56742
- if (parsed instanceof type107.errors) {
56894
+ if (parsed instanceof type108.errors) {
56743
56895
  result = toolError(`Invalid arguments: ${parsed.summary}`);
56744
56896
  } else {
56745
56897
  const { token, claims: claimsObj, app, expectedIssuer } = parsed;
@@ -56951,7 +57103,7 @@ function describeReserved(key) {
56951
57103
  }
56952
57104
 
56953
57105
  // packages/dbx-components-mcp/src/tools/auth-list-app.tool.ts
56954
- import { type as type108 } from "arktype";
57106
+ import { type as type109 } from "arktype";
56955
57107
  var DBX_AUTH_LIST_APP_TOOL = {
56956
57108
  name: "dbx_auth_list_app",
56957
57109
  description: ["Enumerate the auth surface of one app: every custom claim on its `*ApiAuthClaims` interface, every OIDC scope it accepts, and every server-action gate wired up.", "", 'Pass `app="list"` to enumerate the apps catalogued by the registry.'].join("\n"),
@@ -56963,7 +57115,7 @@ var DBX_AUTH_LIST_APP_TOOL = {
56963
57115
  required: ["app"]
56964
57116
  }
56965
57117
  };
56966
- var ListAppArgsType6 = type108({
57118
+ var ListAppArgsType6 = type109({
56967
57119
  app: "string"
56968
57120
  });
56969
57121
  // @__NO_SIDE_EFFECTS__
@@ -56974,7 +57126,7 @@ function createAuthListAppTool(input) {
56974
57126
  run(rawArgs) {
56975
57127
  const parsed = ListAppArgsType6(rawArgs);
56976
57128
  let result;
56977
- if (parsed instanceof type108.errors) {
57129
+ if (parsed instanceof type109.errors) {
56978
57130
  result = toolError(`Invalid arguments: ${parsed.summary}`);
56979
57131
  } else {
56980
57132
  const { app } = parsed;
@@ -57285,7 +57437,7 @@ async function loadServerContext(options = {}) {
57285
57437
  `);
57286
57438
  }
57287
57439
  const modelValidateRuleOptions = resolveModelValidateRuleOptions(configResult.config);
57288
- const configBaseDir = configResult.configPath !== null && configResult.configPath !== void 0 ? dirname23(configResult.configPath) : cwd;
57440
+ const configBaseDir = configResult.configPath !== null && configResult.configPath !== void 0 ? dirname24(configResult.configPath) : cwd;
57289
57441
  const logSearchConfig = resolveLogSearchConfig(configResult.config, configBaseDir);
57290
57442
  const registry = await resolveOptionalRegistry({
57291
57443
  injected: options.semanticTypeRegistry,