@dereekb/dbx-components-mcp 13.35.0 → 13.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dbx-components-mcp.js
CHANGED
|
@@ -10,19 +10,19 @@ 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: "13.
|
|
13
|
+
version: "13.37.0",
|
|
14
14
|
type: "module",
|
|
15
15
|
bin: {
|
|
16
16
|
"dbx-components-mcp": "dbx-components-mcp.js"
|
|
17
17
|
},
|
|
18
18
|
dependencies: {
|
|
19
|
-
"@modelcontextprotocol/
|
|
19
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
20
20
|
arktype: "^2.2.0",
|
|
21
21
|
"ts-morph": "^21.0.0"
|
|
22
22
|
},
|
|
23
23
|
peerDependencies: {
|
|
24
|
-
"@dereekb/dbx-cli": "13.
|
|
25
|
-
"@dereekb/util": "13.
|
|
24
|
+
"@dereekb/dbx-cli": "13.37.0",
|
|
25
|
+
"@dereekb/util": "13.37.0"
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -16507,12 +16507,12 @@ function detectMissingRouteModels(states, warnings) {
|
|
|
16507
16507
|
}
|
|
16508
16508
|
|
|
16509
16509
|
// packages/dbx-components-mcp/src/server.ts
|
|
16510
|
-
import {
|
|
16511
|
-
import {
|
|
16510
|
+
import { serveStdio } from "@modelcontextprotocol/server/stdio";
|
|
16511
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
16512
16512
|
import { dirname as dirname23, isAbsolute as isAbsolute19, resolve as resolvePath4 } from "node:path";
|
|
16513
16513
|
|
|
16514
16514
|
// packages/dbx-components-mcp/src/resources/form-fields.resource.ts
|
|
16515
|
-
import { ResourceTemplate } from "@modelcontextprotocol/
|
|
16515
|
+
import { ResourceTemplate } from "@modelcontextprotocol/server";
|
|
16516
16516
|
|
|
16517
16517
|
// packages/dbx-components-mcp/src/resources/_resource-helpers.ts
|
|
16518
16518
|
function pickFirstVariable(value) {
|
|
@@ -16602,7 +16602,7 @@ function registerFormFieldsResource(server, config) {
|
|
|
16602
16602
|
},
|
|
16603
16603
|
async (uri, variables) => buildSlugDetailResponse({
|
|
16604
16604
|
uri,
|
|
16605
|
-
rawSlug: variables
|
|
16605
|
+
rawSlug: variables["slug"],
|
|
16606
16606
|
resolveEntry: (slug) => registry.findBySlug(slug) ?? registry.findByFactoryName(slug),
|
|
16607
16607
|
listAvailableSlugs: () => registry.all.map((f) => f.slug),
|
|
16608
16608
|
label: "Form field"
|
|
@@ -16617,7 +16617,7 @@ function registerFormFieldsResource(server, config) {
|
|
|
16617
16617
|
mimeType: "application/json"
|
|
16618
16618
|
},
|
|
16619
16619
|
async (uri, variables) => {
|
|
16620
|
-
const producesValue = variables
|
|
16620
|
+
const producesValue = variables["produces"];
|
|
16621
16621
|
const produces = Array.isArray(producesValue) ? producesValue[0] : producesValue;
|
|
16622
16622
|
let text;
|
|
16623
16623
|
let isJson = false;
|
|
@@ -16652,7 +16652,7 @@ function registerFormFieldsResource(server, config) {
|
|
|
16652
16652
|
mimeType: "application/json"
|
|
16653
16653
|
},
|
|
16654
16654
|
async (uri, variables) => {
|
|
16655
|
-
const tierValue = variables
|
|
16655
|
+
const tierValue = variables["tier"];
|
|
16656
16656
|
const tier = Array.isArray(tierValue) ? tierValue[0] : tierValue;
|
|
16657
16657
|
const valid = tier && FORM_TIER_ORDER.includes(tier);
|
|
16658
16658
|
let text;
|
|
@@ -16682,7 +16682,7 @@ function registerFormFieldsResource(server, config) {
|
|
|
16682
16682
|
mimeType: "application/json"
|
|
16683
16683
|
},
|
|
16684
16684
|
async (uri, variables) => {
|
|
16685
|
-
const value = variables
|
|
16685
|
+
const value = variables["arrayOutput"];
|
|
16686
16686
|
const arrayOutput = Array.isArray(value) ? value[0] : value;
|
|
16687
16687
|
const valid = arrayOutput && ARRAY_OUTPUT_VALUES.includes(arrayOutput);
|
|
16688
16688
|
let text;
|
|
@@ -16706,7 +16706,7 @@ function registerFormFieldsResource(server, config) {
|
|
|
16706
16706
|
}
|
|
16707
16707
|
|
|
16708
16708
|
// packages/dbx-components-mcp/src/resources/firebase-models.resource.ts
|
|
16709
|
-
import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/
|
|
16709
|
+
import { ResourceTemplate as ResourceTemplate2 } from "@modelcontextprotocol/server";
|
|
16710
16710
|
|
|
16711
16711
|
// packages/dbx-components-mcp/src/tools/model-hierarchy.formatter.ts
|
|
16712
16712
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -16994,7 +16994,7 @@ function registerFirebaseModelsResource(server) {
|
|
|
16994
16994
|
mimeType: "application/json"
|
|
16995
16995
|
},
|
|
16996
16996
|
async (uri, variables) => {
|
|
16997
|
-
const rawName = variables
|
|
16997
|
+
const rawName = variables["name"];
|
|
16998
16998
|
const name = Array.isArray(rawName) ? rawName[0] : rawName;
|
|
16999
16999
|
const model = name ? getFirebaseModel(name) : void 0;
|
|
17000
17000
|
let text;
|
|
@@ -17026,7 +17026,7 @@ function registerFirebaseModelsResource(server) {
|
|
|
17026
17026
|
mimeType: "application/json"
|
|
17027
17027
|
},
|
|
17028
17028
|
async (uri, variables) => {
|
|
17029
|
-
const rawPrefix = variables
|
|
17029
|
+
const rawPrefix = variables["prefix"];
|
|
17030
17030
|
const prefix = Array.isArray(rawPrefix) ? rawPrefix[0] : rawPrefix;
|
|
17031
17031
|
let text;
|
|
17032
17032
|
let isJson = false;
|
|
@@ -17061,7 +17061,7 @@ function registerFirebaseModelsResource(server) {
|
|
|
17061
17061
|
mimeType: "application/json"
|
|
17062
17062
|
},
|
|
17063
17063
|
async (uri, variables) => {
|
|
17064
|
-
const rawParent = variables
|
|
17064
|
+
const rawParent = variables["parent"];
|
|
17065
17065
|
const parent = Array.isArray(rawParent) ? rawParent[0] : rawParent;
|
|
17066
17066
|
let text;
|
|
17067
17067
|
let isJson = false;
|
|
@@ -17113,7 +17113,7 @@ function registerFirebaseModelsResource(server) {
|
|
|
17113
17113
|
mimeType: "application/json"
|
|
17114
17114
|
},
|
|
17115
17115
|
async (uri, variables) => {
|
|
17116
|
-
const rawRoot = variables
|
|
17116
|
+
const rawRoot = variables["root"];
|
|
17117
17117
|
const root = Array.isArray(rawRoot) ? rawRoot[0] : rawRoot;
|
|
17118
17118
|
let text;
|
|
17119
17119
|
let mimeType = "application/json";
|
|
@@ -17242,7 +17242,7 @@ function registerFirebaseModelsResource(server) {
|
|
|
17242
17242
|
}
|
|
17243
17243
|
|
|
17244
17244
|
// packages/dbx-components-mcp/src/resources/archetypes.resource.ts
|
|
17245
|
-
import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/
|
|
17245
|
+
import { ResourceTemplate as ResourceTemplate3 } from "@modelcontextprotocol/server";
|
|
17246
17246
|
var ARCHETYPES_URI = "dbx://model-archetype/entries";
|
|
17247
17247
|
var ARCHETYPE_TEMPLATE = "dbx://model-archetype/entries/{slug}";
|
|
17248
17248
|
var ARCHETYPES_BY_SYNC_MODE_TEMPLATE = "dbx://model-archetype/by-sync-mode/{mode}";
|
|
@@ -17292,7 +17292,7 @@ function registerModelArchetypesResource(server) {
|
|
|
17292
17292
|
mimeType: "application/json"
|
|
17293
17293
|
},
|
|
17294
17294
|
async (uri, variables) => {
|
|
17295
|
-
const raw = variables
|
|
17295
|
+
const raw = variables["slug"];
|
|
17296
17296
|
const slug = Array.isArray(raw) ? raw[0] : raw;
|
|
17297
17297
|
let text;
|
|
17298
17298
|
let mimeType = "application/json";
|
|
@@ -17321,7 +17321,7 @@ function registerModelArchetypesResource(server) {
|
|
|
17321
17321
|
mimeType: "application/json"
|
|
17322
17322
|
},
|
|
17323
17323
|
async (uri, variables) => {
|
|
17324
|
-
const rawMode = variables
|
|
17324
|
+
const rawMode = variables["mode"];
|
|
17325
17325
|
const mode = Array.isArray(rawMode) ? rawMode[0] : rawMode;
|
|
17326
17326
|
let text;
|
|
17327
17327
|
let mimeType = "application/json";
|
|
@@ -17344,8 +17344,8 @@ function registerModelArchetypesResource(server) {
|
|
|
17344
17344
|
mimeType: "application/json"
|
|
17345
17345
|
},
|
|
17346
17346
|
async (uri, variables) => {
|
|
17347
|
-
const rawAxis = variables
|
|
17348
|
-
const rawValue = variables
|
|
17347
|
+
const rawAxis = variables["axisName"];
|
|
17348
|
+
const rawValue = variables["axisValue"];
|
|
17349
17349
|
const axisName = Array.isArray(rawAxis) ? rawAxis[0] : rawAxis;
|
|
17350
17350
|
const axisValue = Array.isArray(rawValue) ? rawValue[0] : rawValue;
|
|
17351
17351
|
let text;
|
|
@@ -17369,7 +17369,7 @@ function registerModelArchetypesResource(server) {
|
|
|
17369
17369
|
mimeType: "application/json"
|
|
17370
17370
|
},
|
|
17371
17371
|
async (uri, variables) => {
|
|
17372
|
-
const raw = variables
|
|
17372
|
+
const raw = variables["kind"];
|
|
17373
17373
|
const kind = Array.isArray(raw) ? raw[0] : raw;
|
|
17374
17374
|
let text;
|
|
17375
17375
|
let mimeType = "application/json";
|
|
@@ -17387,7 +17387,7 @@ function registerModelArchetypesResource(server) {
|
|
|
17387
17387
|
}
|
|
17388
17388
|
|
|
17389
17389
|
// packages/dbx-components-mcp/src/resources/actions.resource.ts
|
|
17390
|
-
import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/
|
|
17390
|
+
import { ResourceTemplate as ResourceTemplate4 } from "@modelcontextprotocol/server";
|
|
17391
17391
|
var ACTIONS_URI = "dbx://action/entries";
|
|
17392
17392
|
var ACTION_TEMPLATE = "dbx://action/entries/{slug}";
|
|
17393
17393
|
var ACTIONS_BY_ROLE_TEMPLATE = "dbx://action/entries/role/{role}";
|
|
@@ -17444,7 +17444,7 @@ function registerActionsResource(server, options) {
|
|
|
17444
17444
|
},
|
|
17445
17445
|
async (uri, variables) => buildSlugDetailResponse({
|
|
17446
17446
|
uri,
|
|
17447
|
-
rawSlug: variables
|
|
17447
|
+
rawSlug: variables["slug"],
|
|
17448
17448
|
resolveEntry: (slug) => registry.findBySlug(slug),
|
|
17449
17449
|
listAvailableSlugs: () => registry.all.map((e) => e.slug),
|
|
17450
17450
|
label: "Action entry"
|
|
@@ -17459,7 +17459,7 @@ function registerActionsResource(server, options) {
|
|
|
17459
17459
|
mimeType: "application/json"
|
|
17460
17460
|
},
|
|
17461
17461
|
async (uri, variables) => {
|
|
17462
|
-
const rawRole = variables
|
|
17462
|
+
const rawRole = variables["role"];
|
|
17463
17463
|
const role = Array.isArray(rawRole) ? rawRole[0] : rawRole;
|
|
17464
17464
|
const valid = role !== void 0 && ACTION_ROLE_ORDER.includes(role);
|
|
17465
17465
|
let text;
|
|
@@ -17483,7 +17483,7 @@ function registerActionsResource(server, options) {
|
|
|
17483
17483
|
}
|
|
17484
17484
|
|
|
17485
17485
|
// packages/dbx-components-mcp/src/resources/ui-components.resource.ts
|
|
17486
|
-
import { ResourceTemplate as ResourceTemplate5 } from "@modelcontextprotocol/
|
|
17486
|
+
import { ResourceTemplate as ResourceTemplate5 } from "@modelcontextprotocol/server";
|
|
17487
17487
|
var UI_COMPONENTS_URI = "dbx://ui/components";
|
|
17488
17488
|
var UI_COMPONENT_TEMPLATE = "dbx://ui/components/{slug}";
|
|
17489
17489
|
var UI_COMPONENTS_BY_CATEGORY_TEMPLATE = "dbx://ui/components/category/{category}";
|
|
@@ -17533,7 +17533,7 @@ function registerUiComponentsResource(server, options) {
|
|
|
17533
17533
|
},
|
|
17534
17534
|
async (uri, variables) => buildSlugDetailResponse({
|
|
17535
17535
|
uri,
|
|
17536
|
-
rawSlug: variables
|
|
17536
|
+
rawSlug: variables["slug"],
|
|
17537
17537
|
resolveEntry: (slug) => {
|
|
17538
17538
|
const slugHits = registry.findBySlug(slug);
|
|
17539
17539
|
return slugHits.length > 0 ? slugHits[0] : registry.findByClassName(slug) ?? registry.findBySelector(slug);
|
|
@@ -17551,7 +17551,7 @@ function registerUiComponentsResource(server, options) {
|
|
|
17551
17551
|
mimeType: "application/json"
|
|
17552
17552
|
},
|
|
17553
17553
|
async (uri, variables) => {
|
|
17554
|
-
const rawCategory = variables
|
|
17554
|
+
const rawCategory = variables["category"];
|
|
17555
17555
|
const category = Array.isArray(rawCategory) ? rawCategory[0] : rawCategory;
|
|
17556
17556
|
const valid = category !== void 0 && UI_COMPONENT_CATEGORIES.includes(category);
|
|
17557
17557
|
let text;
|
|
@@ -17581,7 +17581,7 @@ function registerUiComponentsResource(server, options) {
|
|
|
17581
17581
|
mimeType: "application/json"
|
|
17582
17582
|
},
|
|
17583
17583
|
async (uri, variables) => {
|
|
17584
|
-
const rawKind = variables
|
|
17584
|
+
const rawKind = variables["kind"];
|
|
17585
17585
|
const kind = Array.isArray(rawKind) ? rawKind[0] : rawKind;
|
|
17586
17586
|
const valid = kind !== void 0 && UI_COMPONENT_KINDS.includes(kind);
|
|
17587
17587
|
let text;
|
|
@@ -17605,7 +17605,7 @@ function registerUiComponentsResource(server, options) {
|
|
|
17605
17605
|
}
|
|
17606
17606
|
|
|
17607
17607
|
// packages/dbx-components-mcp/src/resources/pipes.resource.ts
|
|
17608
|
-
import { ResourceTemplate as ResourceTemplate6 } from "@modelcontextprotocol/
|
|
17608
|
+
import { ResourceTemplate as ResourceTemplate6 } from "@modelcontextprotocol/server";
|
|
17609
17609
|
var PIPES_URI = "dbx://pipe/entries";
|
|
17610
17610
|
var PIPE_TEMPLATE = "dbx://pipe/entries/{slug}";
|
|
17611
17611
|
var PIPES_BY_CATEGORY_TEMPLATE = "dbx://pipe/entries/category/{category}";
|
|
@@ -17655,7 +17655,7 @@ function registerPipesResource(server, options) {
|
|
|
17655
17655
|
},
|
|
17656
17656
|
async (uri, variables) => buildSlugDetailResponse({
|
|
17657
17657
|
uri,
|
|
17658
|
-
rawSlug: variables
|
|
17658
|
+
rawSlug: variables["slug"],
|
|
17659
17659
|
resolveEntry: (slug) => registry.findBySlug(slug),
|
|
17660
17660
|
listAvailableSlugs: () => registry.all.map((e) => e.slug),
|
|
17661
17661
|
label: "Pipe"
|
|
@@ -17670,7 +17670,7 @@ function registerPipesResource(server, options) {
|
|
|
17670
17670
|
mimeType: "application/json"
|
|
17671
17671
|
},
|
|
17672
17672
|
async (uri, variables) => {
|
|
17673
|
-
const rawCategory = variables
|
|
17673
|
+
const rawCategory = variables["category"];
|
|
17674
17674
|
const category = Array.isArray(rawCategory) ? rawCategory[0] : rawCategory;
|
|
17675
17675
|
const valid = category && PIPE_CATEGORY_ORDER.includes(category);
|
|
17676
17676
|
let text;
|
|
@@ -17694,7 +17694,7 @@ function registerPipesResource(server, options) {
|
|
|
17694
17694
|
}
|
|
17695
17695
|
|
|
17696
17696
|
// packages/dbx-components-mcp/src/resources/utils.resource.ts
|
|
17697
|
-
import { ResourceTemplate as ResourceTemplate7 } from "@modelcontextprotocol/
|
|
17697
|
+
import { ResourceTemplate as ResourceTemplate7 } from "@modelcontextprotocol/server";
|
|
17698
17698
|
var UTILS_URI = "dbx://util/entries";
|
|
17699
17699
|
var UTIL_TEMPLATE = "dbx://util/entries/{slug}";
|
|
17700
17700
|
var UTILS_BY_CATEGORY_TEMPLATE = "dbx://util/entries/category/{category}";
|
|
@@ -17748,7 +17748,7 @@ function registerUtilsResource(server, options) {
|
|
|
17748
17748
|
},
|
|
17749
17749
|
async (uri, variables) => buildSlugDetailResponse({
|
|
17750
17750
|
uri,
|
|
17751
|
-
rawSlug: variables
|
|
17751
|
+
rawSlug: variables["slug"],
|
|
17752
17752
|
resolveEntry: (slug) => registry.findBySlug(slug),
|
|
17753
17753
|
listAvailableSlugs: () => registry.all.map((e) => e.slug),
|
|
17754
17754
|
label: "Util"
|
|
@@ -17763,7 +17763,7 @@ function registerUtilsResource(server, options) {
|
|
|
17763
17763
|
mimeType: "application/json"
|
|
17764
17764
|
},
|
|
17765
17765
|
async (uri, variables) => {
|
|
17766
|
-
const category = pickFirstVariable(variables
|
|
17766
|
+
const category = pickFirstVariable(variables["category"]);
|
|
17767
17767
|
let text;
|
|
17768
17768
|
let valid = false;
|
|
17769
17769
|
if (category && registry.categories.includes(category)) {
|
|
@@ -17793,7 +17793,7 @@ function registerUtilsResource(server, options) {
|
|
|
17793
17793
|
mimeType: "application/json"
|
|
17794
17794
|
},
|
|
17795
17795
|
async (uri, variables) => {
|
|
17796
|
-
const module = pickFirstVariable(variables
|
|
17796
|
+
const module = pickFirstVariable(variables["module"]);
|
|
17797
17797
|
let text;
|
|
17798
17798
|
let valid = false;
|
|
17799
17799
|
if (module && registry.modules.includes(module)) {
|
|
@@ -17823,7 +17823,7 @@ function registerUtilsResource(server, options) {
|
|
|
17823
17823
|
mimeType: "application/json"
|
|
17824
17824
|
},
|
|
17825
17825
|
async (uri, variables) => {
|
|
17826
|
-
const tag = pickFirstVariable(variables
|
|
17826
|
+
const tag = pickFirstVariable(variables["tag"]);
|
|
17827
17827
|
let text;
|
|
17828
17828
|
let valid = false;
|
|
17829
17829
|
if (tag && tag.length > 0) {
|
|
@@ -17847,7 +17847,7 @@ function registerUtilsResource(server, options) {
|
|
|
17847
17847
|
}
|
|
17848
17848
|
|
|
17849
17849
|
// packages/dbx-components-mcp/src/resources/model-snapshot-fields.resource.ts
|
|
17850
|
-
import { ResourceTemplate as ResourceTemplate8 } from "@modelcontextprotocol/
|
|
17850
|
+
import { ResourceTemplate as ResourceTemplate8 } from "@modelcontextprotocol/server";
|
|
17851
17851
|
var URI = "dbx://model-snapshot-field/entries";
|
|
17852
17852
|
var TEMPLATE = "dbx://model-snapshot-field/entries/{slug}";
|
|
17853
17853
|
var BY_CATEGORY_TEMPLATE = "dbx://model-snapshot-field/entries/category/{category}";
|
|
@@ -17902,7 +17902,7 @@ function registerModelSnapshotFieldsResource(server, options) {
|
|
|
17902
17902
|
},
|
|
17903
17903
|
async (uri, variables) => buildSlugDetailResponse({
|
|
17904
17904
|
uri,
|
|
17905
|
-
rawSlug: variables
|
|
17905
|
+
rawSlug: variables["slug"],
|
|
17906
17906
|
resolveEntry: (slug) => registry.findBySlug(slug),
|
|
17907
17907
|
listAvailableSlugs: () => registry.all.map((e) => e.slug),
|
|
17908
17908
|
label: "Model snapshot field"
|
|
@@ -17917,7 +17917,7 @@ function registerModelSnapshotFieldsResource(server, options) {
|
|
|
17917
17917
|
mimeType: "application/json"
|
|
17918
17918
|
},
|
|
17919
17919
|
async (uri, variables) => {
|
|
17920
|
-
const category = pickFirstVariable(variables
|
|
17920
|
+
const category = pickFirstVariable(variables["category"]);
|
|
17921
17921
|
let text;
|
|
17922
17922
|
let valid = false;
|
|
17923
17923
|
if (category && registry.categories.includes(category)) {
|
|
@@ -17947,7 +17947,7 @@ function registerModelSnapshotFieldsResource(server, options) {
|
|
|
17947
17947
|
mimeType: "application/json"
|
|
17948
17948
|
},
|
|
17949
17949
|
async (uri, variables) => {
|
|
17950
|
-
const module = pickFirstVariable(variables
|
|
17950
|
+
const module = pickFirstVariable(variables["module"]);
|
|
17951
17951
|
let text;
|
|
17952
17952
|
let valid = false;
|
|
17953
17953
|
if (module && registry.modules.includes(module)) {
|
|
@@ -17977,7 +17977,7 @@ function registerModelSnapshotFieldsResource(server, options) {
|
|
|
17977
17977
|
mimeType: "application/json"
|
|
17978
17978
|
},
|
|
17979
17979
|
async (uri, variables) => {
|
|
17980
|
-
const tag = pickFirstVariable(variables
|
|
17980
|
+
const tag = pickFirstVariable(variables["tag"]);
|
|
17981
17981
|
let text;
|
|
17982
17982
|
let valid = false;
|
|
17983
17983
|
if (tag && tag.length > 0) {
|
|
@@ -18001,7 +18001,7 @@ function registerModelSnapshotFieldsResource(server, options) {
|
|
|
18001
18001
|
}
|
|
18002
18002
|
|
|
18003
18003
|
// packages/dbx-components-mcp/src/resources/model-firebase-index.resource.ts
|
|
18004
|
-
import { ResourceTemplate as ResourceTemplate9 } from "@modelcontextprotocol/
|
|
18004
|
+
import { ResourceTemplate as ResourceTemplate9 } from "@modelcontextprotocol/server";
|
|
18005
18005
|
var CATALOG_URI = "dbx://model-firebase-index/entries";
|
|
18006
18006
|
var SCHEMA_URI = "dbx://model-firebase-index/schema";
|
|
18007
18007
|
var RULES_URI = "dbx://model-firebase-index/rules";
|
|
@@ -18109,7 +18109,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18109
18109
|
},
|
|
18110
18110
|
async (uri, variables) => buildSlugDetailResponse({
|
|
18111
18111
|
uri,
|
|
18112
|
-
rawSlug: variables
|
|
18112
|
+
rawSlug: variables["slug"],
|
|
18113
18113
|
resolveEntry: (slug) => registry.findBySlug(slug),
|
|
18114
18114
|
listAvailableSlugs: () => registry.all.map((e) => e.slug),
|
|
18115
18115
|
label: "Model firebase index"
|
|
@@ -18124,7 +18124,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18124
18124
|
mimeType: "application/json"
|
|
18125
18125
|
},
|
|
18126
18126
|
async (uri, variables) => {
|
|
18127
|
-
const collection = pickFirstVariable(variables
|
|
18127
|
+
const collection = pickFirstVariable(variables["collection"]);
|
|
18128
18128
|
let text;
|
|
18129
18129
|
let valid = false;
|
|
18130
18130
|
if (collection !== void 0 && registry.collections.includes(collection)) {
|
|
@@ -18154,7 +18154,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18154
18154
|
mimeType: "application/json"
|
|
18155
18155
|
},
|
|
18156
18156
|
async (uri, variables) => {
|
|
18157
|
-
const model = pickFirstVariable(variables
|
|
18157
|
+
const model = pickFirstVariable(variables["model"]);
|
|
18158
18158
|
let text;
|
|
18159
18159
|
let valid = false;
|
|
18160
18160
|
if (model !== void 0 && registry.models.includes(model)) {
|
|
@@ -18184,7 +18184,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18184
18184
|
mimeType: "application/json"
|
|
18185
18185
|
},
|
|
18186
18186
|
async (uri, variables) => {
|
|
18187
|
-
const category = pickFirstVariable(variables
|
|
18187
|
+
const category = pickFirstVariable(variables["category"]);
|
|
18188
18188
|
let text;
|
|
18189
18189
|
let valid = false;
|
|
18190
18190
|
if (category !== void 0 && registry.categories.includes(category)) {
|
|
@@ -18214,7 +18214,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18214
18214
|
mimeType: "application/json"
|
|
18215
18215
|
},
|
|
18216
18216
|
async (uri, variables) => {
|
|
18217
|
-
const module = pickFirstVariable(variables
|
|
18217
|
+
const module = pickFirstVariable(variables["module"]);
|
|
18218
18218
|
let text;
|
|
18219
18219
|
let valid = false;
|
|
18220
18220
|
if (module !== void 0 && registry.modules.includes(module)) {
|
|
@@ -18244,7 +18244,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18244
18244
|
mimeType: "application/json"
|
|
18245
18245
|
},
|
|
18246
18246
|
async (uri, variables) => {
|
|
18247
|
-
const tag = pickFirstVariable(variables
|
|
18247
|
+
const tag = pickFirstVariable(variables["tag"]);
|
|
18248
18248
|
let text;
|
|
18249
18249
|
let valid = false;
|
|
18250
18250
|
if (tag !== void 0 && tag.length > 0) {
|
|
@@ -18304,7 +18304,7 @@ function registerModelFirebaseIndexResource(server, options) {
|
|
|
18304
18304
|
}
|
|
18305
18305
|
|
|
18306
18306
|
// packages/dbx-components-mcp/src/resources/filters.resource.ts
|
|
18307
|
-
import { ResourceTemplate as ResourceTemplate10 } from "@modelcontextprotocol/
|
|
18307
|
+
import { ResourceTemplate as ResourceTemplate10 } from "@modelcontextprotocol/server";
|
|
18308
18308
|
var FILTERS_URI = "dbx://filter/entries";
|
|
18309
18309
|
var FILTER_TEMPLATE = "dbx://filter/entries/{slug}";
|
|
18310
18310
|
var FILTERS_BY_KIND_TEMPLATE = "dbx://filter/entries/kind/{kind}";
|
|
@@ -18351,7 +18351,7 @@ function registerFiltersResource(server, options) {
|
|
|
18351
18351
|
},
|
|
18352
18352
|
async (uri, variables) => buildSlugDetailResponse({
|
|
18353
18353
|
uri,
|
|
18354
|
-
rawSlug: variables
|
|
18354
|
+
rawSlug: variables["slug"],
|
|
18355
18355
|
resolveEntry: (slug) => registry.findBySlug(slug),
|
|
18356
18356
|
listAvailableSlugs: () => registry.all.map((e) => e.slug),
|
|
18357
18357
|
label: "Filter"
|
|
@@ -18366,7 +18366,7 @@ function registerFiltersResource(server, options) {
|
|
|
18366
18366
|
mimeType: "application/json"
|
|
18367
18367
|
},
|
|
18368
18368
|
async (uri, variables) => {
|
|
18369
|
-
const rawKind = variables
|
|
18369
|
+
const rawKind = variables["kind"];
|
|
18370
18370
|
const kind = Array.isArray(rawKind) ? rawKind[0] : rawKind;
|
|
18371
18371
|
const valid = kind && FILTER_KIND_ORDER.includes(kind);
|
|
18372
18372
|
let text;
|
|
@@ -18390,7 +18390,7 @@ function registerFiltersResource(server, options) {
|
|
|
18390
18390
|
}
|
|
18391
18391
|
|
|
18392
18392
|
// packages/dbx-components-mcp/src/resources/semantic-types.resource.ts
|
|
18393
|
-
import { ResourceTemplate as ResourceTemplate11 } from "@modelcontextprotocol/
|
|
18393
|
+
import { ResourceTemplate as ResourceTemplate11 } from "@modelcontextprotocol/server";
|
|
18394
18394
|
var SEMANTIC_TYPES_URI = "dbx://semantic-type/entries";
|
|
18395
18395
|
var SEMANTIC_TYPE_ENTRY_TEMPLATE = "dbx://semantic-type/entries/{name}";
|
|
18396
18396
|
var SEMANTIC_TYPE_BY_TOPIC_TEMPLATE = "dbx://semantic-type/topic/{topic}";
|
|
@@ -18435,7 +18435,7 @@ function registerSemanticTypesResource(server, config) {
|
|
|
18435
18435
|
mimeType: "application/json"
|
|
18436
18436
|
},
|
|
18437
18437
|
async (uri, variables) => {
|
|
18438
|
-
const rawName = variables
|
|
18438
|
+
const rawName = variables["name"];
|
|
18439
18439
|
const name = Array.isArray(rawName) ? rawName[0] : rawName;
|
|
18440
18440
|
const matches = name ? registry.findByName(name) : [];
|
|
18441
18441
|
let text;
|
|
@@ -18470,7 +18470,7 @@ function registerSemanticTypesResource(server, config) {
|
|
|
18470
18470
|
mimeType: "application/json"
|
|
18471
18471
|
},
|
|
18472
18472
|
async (uri, variables) => {
|
|
18473
|
-
const rawTopic = variables
|
|
18473
|
+
const rawTopic = variables["topic"];
|
|
18474
18474
|
const topic = Array.isArray(rawTopic) ? rawTopic[0] : rawTopic;
|
|
18475
18475
|
let text;
|
|
18476
18476
|
let mimeType;
|
|
@@ -18502,7 +18502,7 @@ function registerSemanticTypesResource(server, config) {
|
|
|
18502
18502
|
mimeType: "application/json"
|
|
18503
18503
|
},
|
|
18504
18504
|
async (uri, variables) => {
|
|
18505
|
-
const rawPackage = variables
|
|
18505
|
+
const rawPackage = variables["package"];
|
|
18506
18506
|
const packageLabel = Array.isArray(rawPackage) ? rawPackage[0] : rawPackage;
|
|
18507
18507
|
let text;
|
|
18508
18508
|
let mimeType;
|
|
@@ -18528,7 +18528,7 @@ function registerSemanticTypesResource(server, config) {
|
|
|
18528
18528
|
}
|
|
18529
18529
|
|
|
18530
18530
|
// packages/dbx-components-mcp/src/resources/tokens.resource.ts
|
|
18531
|
-
import { ResourceTemplate as ResourceTemplate12 } from "@modelcontextprotocol/
|
|
18531
|
+
import { ResourceTemplate as ResourceTemplate12 } from "@modelcontextprotocol/server";
|
|
18532
18532
|
var TOKENS_URI = "dbx://token/entries";
|
|
18533
18533
|
var TOKENS_BY_SOURCE_TEMPLATE = "dbx://token/source/{source}";
|
|
18534
18534
|
var TOKENS_BY_ROLE_TEMPLATE = "dbx://token/role/{role}";
|
|
@@ -18575,7 +18575,7 @@ function registerTokensResource(server, options) {
|
|
|
18575
18575
|
mimeType: "application/json"
|
|
18576
18576
|
},
|
|
18577
18577
|
async (uri, variables) => {
|
|
18578
|
-
const rawSource = variables
|
|
18578
|
+
const rawSource = variables["source"];
|
|
18579
18579
|
const source = Array.isArray(rawSource) ? rawSource[0] : rawSource;
|
|
18580
18580
|
const valid = source !== void 0 && TOKEN_SOURCES.includes(source);
|
|
18581
18581
|
let text;
|
|
@@ -18605,7 +18605,7 @@ function registerTokensResource(server, options) {
|
|
|
18605
18605
|
mimeType: "application/json"
|
|
18606
18606
|
},
|
|
18607
18607
|
async (uri, variables) => {
|
|
18608
|
-
const rawRole = variables
|
|
18608
|
+
const rawRole = variables["role"];
|
|
18609
18609
|
const role = Array.isArray(rawRole) ? rawRole[0] : rawRole;
|
|
18610
18610
|
const valid = role !== void 0 && TOKEN_ROLES.includes(role);
|
|
18611
18611
|
let text;
|
|
@@ -18635,7 +18635,7 @@ function registerTokensResource(server, options) {
|
|
|
18635
18635
|
mimeType: "application/json"
|
|
18636
18636
|
},
|
|
18637
18637
|
async (uri, variables) => {
|
|
18638
|
-
const rawVar = variables
|
|
18638
|
+
const rawVar = variables["cssVariable"];
|
|
18639
18639
|
const cssVariable = Array.isArray(rawVar) ? rawVar[0] : rawVar;
|
|
18640
18640
|
let text;
|
|
18641
18641
|
let entry;
|
|
@@ -18663,7 +18663,7 @@ function registerTokensResource(server, options) {
|
|
|
18663
18663
|
}
|
|
18664
18664
|
|
|
18665
18665
|
// packages/dbx-components-mcp/src/resources/css-utility.resource.ts
|
|
18666
|
-
import { ResourceTemplate as ResourceTemplate13 } from "@modelcontextprotocol/
|
|
18666
|
+
import { ResourceTemplate as ResourceTemplate13 } from "@modelcontextprotocol/server";
|
|
18667
18667
|
var CSS_UTILITY_URI = "dbx://css-utility/entries";
|
|
18668
18668
|
var CSS_UTILITY_BY_SLUG_TEMPLATE = "dbx://css-utility/entries/{slug}";
|
|
18669
18669
|
var CSS_UTILITY_BY_ROLE_TEMPLATE = "dbx://css-utility/role/{role}";
|
|
@@ -18711,7 +18711,7 @@ function registerCssUtilityResource(server, options) {
|
|
|
18711
18711
|
mimeType: "application/json"
|
|
18712
18712
|
},
|
|
18713
18713
|
async (uri, variables) => {
|
|
18714
|
-
const rawSlug = variables
|
|
18714
|
+
const rawSlug = variables["slug"];
|
|
18715
18715
|
const slug = Array.isArray(rawSlug) ? rawSlug[0] : rawSlug;
|
|
18716
18716
|
const entry = slug === void 0 ? void 0 : registry.findByName(slug);
|
|
18717
18717
|
let text;
|
|
@@ -18742,7 +18742,7 @@ function registerCssUtilityResource(server, options) {
|
|
|
18742
18742
|
mimeType: "application/json"
|
|
18743
18743
|
},
|
|
18744
18744
|
async (uri, variables) => {
|
|
18745
|
-
const rawRole = variables
|
|
18745
|
+
const rawRole = variables["role"];
|
|
18746
18746
|
const role = Array.isArray(rawRole) ? rawRole[0] : rawRole;
|
|
18747
18747
|
const valid = role !== void 0 && CSS_UTILITY_ROLES.includes(role);
|
|
18748
18748
|
let text;
|
|
@@ -18772,7 +18772,7 @@ function registerCssUtilityResource(server, options) {
|
|
|
18772
18772
|
mimeType: "application/json"
|
|
18773
18773
|
},
|
|
18774
18774
|
async (uri, variables) => {
|
|
18775
|
-
const rawSource = variables
|
|
18775
|
+
const rawSource = variables["source"];
|
|
18776
18776
|
const source = Array.isArray(rawSource) ? rawSource[0] : rawSource;
|
|
18777
18777
|
let text;
|
|
18778
18778
|
if (source === void 0) {
|
|
@@ -18801,7 +18801,7 @@ function registerCssUtilityResource(server, options) {
|
|
|
18801
18801
|
mimeType: "application/json"
|
|
18802
18802
|
},
|
|
18803
18803
|
async (uri, variables) => {
|
|
18804
|
-
const rawSlug = variables
|
|
18804
|
+
const rawSlug = variables["slug"];
|
|
18805
18805
|
const slug = Array.isArray(rawSlug) ? rawSlug[0] : rawSlug;
|
|
18806
18806
|
let text;
|
|
18807
18807
|
if (slug === void 0) {
|
|
@@ -18824,7 +18824,7 @@ function registerCssUtilityResource(server, options) {
|
|
|
18824
18824
|
}
|
|
18825
18825
|
|
|
18826
18826
|
// packages/dbx-components-mcp/src/resources/auth.resource.ts
|
|
18827
|
-
import { ResourceTemplate as ResourceTemplate14 } from "@modelcontextprotocol/
|
|
18827
|
+
import { ResourceTemplate as ResourceTemplate14 } from "@modelcontextprotocol/server";
|
|
18828
18828
|
var AUTH_CATALOG_URI = "dbx://auth/catalog";
|
|
18829
18829
|
var AUTH_CLAIM_TEMPLATE = "dbx://auth/claim/{key}";
|
|
18830
18830
|
var AUTH_ROLE_TEMPLATE = "dbx://auth/role/{role}";
|
|
@@ -18869,7 +18869,7 @@ function registerAuthResource(server, options) {
|
|
|
18869
18869
|
mimeType: "application/json"
|
|
18870
18870
|
},
|
|
18871
18871
|
async (uri, variables) => {
|
|
18872
|
-
const key = pickFirstVariable(variables
|
|
18872
|
+
const key = pickFirstVariable(variables["key"]);
|
|
18873
18873
|
const entry = key ? registry.findClaim(key) : void 0;
|
|
18874
18874
|
let text;
|
|
18875
18875
|
if (entry !== void 0) {
|
|
@@ -18899,7 +18899,7 @@ function registerAuthResource(server, options) {
|
|
|
18899
18899
|
mimeType: "application/json"
|
|
18900
18900
|
},
|
|
18901
18901
|
async (uri, variables) => {
|
|
18902
|
-
const role = pickFirstVariable(variables
|
|
18902
|
+
const role = pickFirstVariable(variables["role"]);
|
|
18903
18903
|
const entry = role ? registry.findRole(role) : void 0;
|
|
18904
18904
|
let text;
|
|
18905
18905
|
if (entry !== void 0) {
|
|
@@ -18930,7 +18930,7 @@ function registerAuthResource(server, options) {
|
|
|
18930
18930
|
mimeType: "application/json"
|
|
18931
18931
|
},
|
|
18932
18932
|
async (uri, variables) => {
|
|
18933
|
-
const tag = pickFirstVariable(variables
|
|
18933
|
+
const tag = pickFirstVariable(variables["tag"]);
|
|
18934
18934
|
let text;
|
|
18935
18935
|
if (tag) {
|
|
18936
18936
|
const roles = registry.findRolesByTag(tag);
|
|
@@ -18958,7 +18958,7 @@ function registerAuthResource(server, options) {
|
|
|
18958
18958
|
mimeType: "application/json"
|
|
18959
18959
|
},
|
|
18960
18960
|
async (uri, variables) => {
|
|
18961
|
-
const scope = pickFirstVariable(variables
|
|
18961
|
+
const scope = pickFirstVariable(variables["scope"]);
|
|
18962
18962
|
const entry = scope ? registry.findScope(scope) : void 0;
|
|
18963
18963
|
let text;
|
|
18964
18964
|
if (entry !== void 0) {
|
|
@@ -18988,7 +18988,7 @@ function registerAuthResource(server, options) {
|
|
|
18988
18988
|
mimeType: "application/json"
|
|
18989
18989
|
},
|
|
18990
18990
|
async (uri, variables) => {
|
|
18991
|
-
const app = pickFirstVariable(variables
|
|
18991
|
+
const app = pickFirstVariable(variables["app"]);
|
|
18992
18992
|
const entry = app ? registry.findApp(app) : void 0;
|
|
18993
18993
|
let text;
|
|
18994
18994
|
if (entry !== void 0) {
|
|
@@ -19055,9 +19055,6 @@ function registerResources(server, options = {}) {
|
|
|
19055
19055
|
}
|
|
19056
19056
|
}
|
|
19057
19057
|
|
|
19058
|
-
// packages/dbx-components-mcp/src/tools/index.ts
|
|
19059
|
-
import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
19060
|
-
|
|
19061
19058
|
// packages/dbx-components-mcp/src/tools/lookup-form.tool.ts
|
|
19062
19059
|
import { type as type43 } from "arktype";
|
|
19063
19060
|
|
|
@@ -19271,6 +19268,11 @@ function toolError(message) {
|
|
|
19271
19268
|
const result = { content: [{ type: "text", text: message }], isError: true };
|
|
19272
19269
|
return result;
|
|
19273
19270
|
}
|
|
19271
|
+
function toCallToolResult(result) {
|
|
19272
|
+
const content = result.content.map(({ type: type107, text }) => ({ type: type107, text }));
|
|
19273
|
+
const callToolResult = result.isError === void 0 ? { content } : { content, isError: result.isError };
|
|
19274
|
+
return callToolResult;
|
|
19275
|
+
}
|
|
19274
19276
|
|
|
19275
19277
|
// packages/dbx-components-mcp/src/tools/lookup-form.tool.ts
|
|
19276
19278
|
var DBX_FORM_LOOKUP_TOOL = {
|
|
@@ -28672,9 +28674,9 @@ async function readTsconfigPaths(workspaceRoot) {
|
|
|
28672
28674
|
const tsconfigPath = join10(workspaceRoot, TSCONFIG_BASE);
|
|
28673
28675
|
const json = await readJsonFileSafe(tsconfigPath, stripJsonComments);
|
|
28674
28676
|
let result;
|
|
28675
|
-
if (isRecord(json) && isRecord(json
|
|
28677
|
+
if (isRecord(json) && isRecord(json["compilerOptions"]) && isRecord(json["compilerOptions"]["paths"])) {
|
|
28676
28678
|
const entries = /* @__PURE__ */ new Map();
|
|
28677
|
-
for (const [alias, target] of Object.entries(json
|
|
28679
|
+
for (const [alias, target] of Object.entries(json["compilerOptions"]["paths"])) {
|
|
28678
28680
|
if (!Array.isArray(target) || target.length === 0) continue;
|
|
28679
28681
|
const first = target[0];
|
|
28680
28682
|
if (typeof first !== "string") continue;
|
|
@@ -34646,12 +34648,12 @@ function summarizeEntry(entry, full = false) {
|
|
|
34646
34648
|
instanceMethodNames: entry.instanceMethods.map((m) => m.name)
|
|
34647
34649
|
};
|
|
34648
34650
|
if (full) {
|
|
34649
|
-
summary
|
|
34650
|
-
summary
|
|
34651
|
-
summary
|
|
34652
|
-
summary
|
|
34653
|
-
summary
|
|
34654
|
-
summary
|
|
34651
|
+
summary["fixtureExtendsGenerics"] = entry.fixtureExtendsGenerics;
|
|
34652
|
+
summary["instanceExtendsGenerics"] = entry.instanceExtendsGenerics;
|
|
34653
|
+
summary["factory"] = entry.factory;
|
|
34654
|
+
summary["params"] = entry.params;
|
|
34655
|
+
summary["fixtureMethods"] = entry.fixtureMethods;
|
|
34656
|
+
summary["instanceMethods"] = entry.instanceMethods;
|
|
34655
34657
|
}
|
|
34656
34658
|
return summary;
|
|
34657
34659
|
}
|
|
@@ -39049,7 +39051,7 @@ function coerceToDocument(data) {
|
|
|
39049
39051
|
throw new Error("Input data must be a JSON object (the Firestore document). Got: " + (Array.isArray(parsed) ? "array" : typeof parsed));
|
|
39050
39052
|
}
|
|
39051
39053
|
const docRecord = parsed;
|
|
39052
|
-
const rawKey = docRecord
|
|
39054
|
+
const rawKey = docRecord["key"] ?? docRecord["_key"] ?? docRecord["id"];
|
|
39053
39055
|
const extraKey = typeof rawKey === "string" ? rawKey : void 0;
|
|
39054
39056
|
const result = { doc: docRecord, extraKey };
|
|
39055
39057
|
return result;
|
|
@@ -39927,7 +39929,7 @@ var DBX_MODEL_STORE_SCAFFOLD_TOOL = {
|
|
|
39927
39929
|
model_name: { type: "string", description: "PascalCase model name." },
|
|
39928
39930
|
app_prefix: { type: "string", description: "Lowercase app prefix." },
|
|
39929
39931
|
firebase_package: { type: "string", description: "Module specifier of the firebase model package." },
|
|
39930
|
-
shape: { type: "string", enum: STORE_SHAPES, description: "Store shape; defaults to 'root'." },
|
|
39932
|
+
shape: { type: "string", enum: [...STORE_SHAPES], description: "Store shape; defaults to 'root'." },
|
|
39931
39933
|
collections_class: { type: "string", description: "Firestore-collections class name (required except for system-state)." },
|
|
39932
39934
|
collection_accessor: { type: "string", description: "Root collection accessor name. Defaults to `<modelCamel>Collection`." },
|
|
39933
39935
|
factory_accessor: { type: "string", description: "Sub-collection factory accessor. Defaults to `<modelCamel>CollectionFactory`." },
|
|
@@ -41661,20 +41663,20 @@ function deriveAxes(archetype, q) {
|
|
|
41661
41663
|
switch (archetype.slug) {
|
|
41662
41664
|
case "single-item-sub": {
|
|
41663
41665
|
const subPurpose = deriveSingleItemSubPurpose(q);
|
|
41664
|
-
if (subPurpose) axes
|
|
41666
|
+
if (subPurpose) axes["subPurpose"] = subPurpose;
|
|
41665
41667
|
break;
|
|
41666
41668
|
}
|
|
41667
41669
|
case "denormalised-aggregate": {
|
|
41668
41670
|
if (q.docIdSource && ["parent-id", "bucket-code", "composite-flat-key", "numeric-short-id"].includes(q.docIdSource)) {
|
|
41669
|
-
axes
|
|
41671
|
+
axes["keying"] = q.docIdSource;
|
|
41670
41672
|
}
|
|
41671
41673
|
if (q.syncMode && ["trigger-eventual", "flag-eventual", "scheduled-rebuild"].includes(q.syncMode)) {
|
|
41672
|
-
axes
|
|
41674
|
+
axes["syncMode"] = q.syncMode;
|
|
41673
41675
|
}
|
|
41674
41676
|
break;
|
|
41675
41677
|
}
|
|
41676
41678
|
case "reference-registry": {
|
|
41677
|
-
if (q.hasInheritance !== void 0) axes
|
|
41679
|
+
if (q.hasInheritance !== void 0) axes["hasInheritance"] = String(q.hasInheritance);
|
|
41678
41680
|
break;
|
|
41679
41681
|
}
|
|
41680
41682
|
default:
|
|
@@ -41703,9 +41705,9 @@ function deriveAxisAlternatives(archetype, q) {
|
|
|
41703
41705
|
const alternatives = {};
|
|
41704
41706
|
if (archetype.slug === "denormalised-aggregate" && q.parentRelation === "user-uid") {
|
|
41705
41707
|
if (q.docIdSource === "bucket-code") {
|
|
41706
|
-
alternatives
|
|
41708
|
+
alternatives["keying"] = ["composite-flat-key"];
|
|
41707
41709
|
} else if (q.docIdSource === "composite-flat-key") {
|
|
41708
|
-
alternatives
|
|
41710
|
+
alternatives["keying"] = ["bucket-code"];
|
|
41709
41711
|
}
|
|
41710
41712
|
}
|
|
41711
41713
|
return alternatives;
|
|
@@ -45519,7 +45521,7 @@ async function readEntry(input) {
|
|
|
45519
45521
|
}
|
|
45520
45522
|
let result;
|
|
45521
45523
|
if (!readError && isRecord2(parsed)) {
|
|
45522
|
-
const name = typeof parsed
|
|
45524
|
+
const name = typeof parsed["name"] === "string" ? parsed["name"] : input.projectRoot.split(sep18).pop() ?? input.projectRoot;
|
|
45523
45525
|
const ports = collectPorts(parsed);
|
|
45524
45526
|
result = {
|
|
45525
45527
|
name,
|
|
@@ -45530,21 +45532,21 @@ async function readEntry(input) {
|
|
|
45530
45532
|
return result;
|
|
45531
45533
|
}
|
|
45532
45534
|
function collectPorts(projectJson) {
|
|
45533
|
-
const targets = isRecord2(projectJson
|
|
45534
|
-
const serve = targets && isRecord2(targets
|
|
45535
|
+
const targets = isRecord2(projectJson["targets"]) ? projectJson["targets"] : void 0;
|
|
45536
|
+
const serve = targets && isRecord2(targets["serve"]) ? targets["serve"] : void 0;
|
|
45535
45537
|
const out = /* @__PURE__ */ new Set();
|
|
45536
45538
|
if (!serve) {
|
|
45537
45539
|
return [];
|
|
45538
45540
|
}
|
|
45539
|
-
const options = isRecord2(serve
|
|
45540
|
-
if (options && typeof options
|
|
45541
|
-
out.add(options
|
|
45541
|
+
const options = isRecord2(serve["options"]) ? serve["options"] : void 0;
|
|
45542
|
+
if (options && typeof options["port"] === "number") {
|
|
45543
|
+
out.add(options["port"]);
|
|
45542
45544
|
}
|
|
45543
|
-
const configurations = isRecord2(serve
|
|
45545
|
+
const configurations = isRecord2(serve["configurations"]) ? serve["configurations"] : void 0;
|
|
45544
45546
|
if (configurations) {
|
|
45545
45547
|
for (const value of Object.values(configurations)) {
|
|
45546
|
-
if (isRecord2(value) && typeof value
|
|
45547
|
-
out.add(value
|
|
45548
|
+
if (isRecord2(value) && typeof value["port"] === "number") {
|
|
45549
|
+
out.add(value["port"]);
|
|
45548
45550
|
}
|
|
45549
45551
|
}
|
|
45550
45552
|
}
|
|
@@ -46904,10 +46906,10 @@ function buildCatalogSearchInputSchema(input) {
|
|
|
46904
46906
|
const properties = { ...CATALOG_BASE_SCHEMA_PROPERTIES };
|
|
46905
46907
|
const overrides = input?.descriptions;
|
|
46906
46908
|
if (overrides?.category !== void 0) {
|
|
46907
|
-
properties
|
|
46909
|
+
properties["category"] = { ...properties["category"], description: overrides.category };
|
|
46908
46910
|
}
|
|
46909
46911
|
if (overrides?.module !== void 0) {
|
|
46910
|
-
properties
|
|
46912
|
+
properties["module"] = { ...properties["module"], description: overrides.module };
|
|
46911
46913
|
}
|
|
46912
46914
|
const extras = input?.extraProperties;
|
|
46913
46915
|
if (extras !== void 0) {
|
|
@@ -54695,13 +54697,14 @@ function registerTools(server, options = {}) {
|
|
|
54695
54697
|
if (options.authRegistry !== void 0) {
|
|
54696
54698
|
tools.push(.../* @__PURE__ */ createAuthClusterTools(options.authRegistry));
|
|
54697
54699
|
}
|
|
54698
|
-
underlyingServer.setRequestHandler(
|
|
54700
|
+
underlyingServer.setRequestHandler("tools/list", async () => {
|
|
54699
54701
|
return { tools: tools.map((t) => t.definition) };
|
|
54700
54702
|
});
|
|
54701
|
-
underlyingServer.setRequestHandler(
|
|
54703
|
+
underlyingServer.setRequestHandler("tools/call", async (request) => {
|
|
54702
54704
|
const { name, arguments: toolArgs } = request.params;
|
|
54703
54705
|
const tool = tools.find((t) => t.definition.name === name);
|
|
54704
|
-
|
|
54706
|
+
const result = tool ? await tool.run(toolArgs) : toolError(`Unknown tool: ${name}. Known tools: ${tools.map((t) => t.definition.name).join(", ")}.`);
|
|
54707
|
+
return toCallToolResult(result);
|
|
54705
54708
|
});
|
|
54706
54709
|
}
|
|
54707
54710
|
|
|
@@ -54752,17 +54755,7 @@ UI styling reverse/forward lookup:
|
|
|
54752
54755
|
- dbx_ui_smell_check \u2014 reverse: paste component HTML/SCSS, get smells + canonical fix. **Run this after writing component SCSS** so hardcoded paddings/radii/shadows/colors get caught before they ship.
|
|
54753
54756
|
|
|
54754
54757
|
Fall back to dbx-components prose skills only for content this server doesn't carry: Firestore security rules, multi-file orchestration walkthroughs, model design phase, naming/tier checklists, and decision/why content beyond catalog lookup.`;
|
|
54755
|
-
async function
|
|
54756
|
-
const server = new McpServer(
|
|
54757
|
-
{
|
|
54758
|
-
name: SERVER_NAME,
|
|
54759
|
-
version: SERVER_VERSION
|
|
54760
|
-
},
|
|
54761
|
-
{
|
|
54762
|
-
instructions: SERVER_INSTRUCTIONS
|
|
54763
|
-
}
|
|
54764
|
-
);
|
|
54765
|
-
server.server.registerCapabilities({ tools: {} });
|
|
54758
|
+
async function loadServerContext(options = {}) {
|
|
54766
54759
|
const externalCounts = {};
|
|
54767
54760
|
const cwd = options.cwd ?? process.cwd();
|
|
54768
54761
|
const configResult = await findAndLoadConfig({ cwd });
|
|
@@ -54916,8 +54909,25 @@ async function createServer(options = {}) {
|
|
|
54916
54909
|
};
|
|
54917
54910
|
const authRegistry = await resolveAuthRegistry({ injected: options.authRegistry, cwd, onAuthLoaderResult: options.onAuthLoaderResult });
|
|
54918
54911
|
await emitDownstreamHints({ cwd, externalCounts, onDownstreamHints: options.onDownstreamHints });
|
|
54919
|
-
|
|
54920
|
-
|
|
54912
|
+
const context = {
|
|
54913
|
+
resources: { semanticTypeRegistry: registry, forgeFieldRegistry: forgeRegistry, pipeRegistry, utilRegistry, modelSnapshotFieldRegistry, modelFirebaseIndexRegistry, uiComponentRegistry: uiRegistry, actionRegistry, filterRegistry, tokenRegistry, cssUtilityRegistry, authRegistry },
|
|
54914
|
+
tools: { semanticTypeRegistry: registry, forgeFieldRegistry: forgeRegistry, pipeRegistry, utilRegistry, modelSnapshotFieldRegistry, modelFirebaseIndexRegistry, uiComponentRegistry: uiRegistry, dbxDocsUiExamplesRegistry, actionRegistry, filterRegistry, tokenRegistry, cssUtilityRegistry, fixtureModelRegistry, modelValidateRuleOptions, authRegistry, cwd, logSearchConfig }
|
|
54915
|
+
};
|
|
54916
|
+
return context;
|
|
54917
|
+
}
|
|
54918
|
+
function buildServer(context) {
|
|
54919
|
+
const server = new McpServer(
|
|
54920
|
+
{
|
|
54921
|
+
name: SERVER_NAME,
|
|
54922
|
+
version: SERVER_VERSION
|
|
54923
|
+
},
|
|
54924
|
+
{
|
|
54925
|
+
instructions: SERVER_INSTRUCTIONS
|
|
54926
|
+
}
|
|
54927
|
+
);
|
|
54928
|
+
server.server.registerCapabilities({ tools: {} });
|
|
54929
|
+
registerResources(server, context.resources);
|
|
54930
|
+
registerTools(server, context.tools);
|
|
54921
54931
|
return server;
|
|
54922
54932
|
}
|
|
54923
54933
|
async function resolveOptionalRegistry(args) {
|
|
@@ -54975,9 +54985,8 @@ function resolveLogSearchConfig(config, configBaseDir) {
|
|
|
54975
54985
|
return result;
|
|
54976
54986
|
}
|
|
54977
54987
|
async function runStdioServer() {
|
|
54978
|
-
const
|
|
54979
|
-
|
|
54980
|
-
await server.connect(transport);
|
|
54988
|
+
const context = await loadServerContext();
|
|
54989
|
+
serveStdio(() => buildServer(context));
|
|
54981
54990
|
}
|
|
54982
54991
|
function reportRegistryLoaderResult(label, warningPrefix, result) {
|
|
54983
54992
|
const { registry, configPath, configWarnings, loaderWarnings, externalSourceCount } = result;
|
|
@@ -92,6 +92,46 @@
|
|
|
92
92
|
],
|
|
93
93
|
"example": "fields: {\n payload: firestorePassThroughField<MyType>()\n}"
|
|
94
94
|
},
|
|
95
|
+
{
|
|
96
|
+
"slug": "optional-firestore-passthrough-json-field",
|
|
97
|
+
"name": "optionalFirestorePassthroughJsonField",
|
|
98
|
+
"kind": "factory",
|
|
99
|
+
"category": "object",
|
|
100
|
+
"module": "@dereekb/firebase",
|
|
101
|
+
"subpath": "common/firestore/snapshot/snapshot.field",
|
|
102
|
+
"signature": "optionalFirestorePassthroughJsonField(config?: OptionalFirestorePassthroughJsonFieldConfig<T>): FirestoreModelFieldMapFunctionsConfig<Maybe<T>, Maybe<T>>",
|
|
103
|
+
"description": "Creates a field mapping configuration for an optional object field that is stored as-is, aside from\nthe values the filter strips out on the way in.\n\nThis is the field for json a converter should not model: a third-party api response, a request config\nwhose parameters the vendor extends without warning, an sdk-shaped payload. A strict converter would\nsilently drop whatever it does not name; this one keeps everything.\n\nThe one thing it does not keep is a value Firestore rejects. Firestore refuses an explicit `undefined`\noutright — one absent optional field anywhere in the payload fails the whole write — and such a value\nis exactly what assembling json from `Maybe` inputs produces (a usage object built from whichever\ntoken counts a response happened to report, a config a caller spread a `Maybe` into). Solved per-writer\nit has to be remembered at every call site; solved here it cannot be forgotten.\n\nThe filtering is RECURSIVE, since json of this kind is nested and its interior is just as capable of\ncarrying an `undefined` as its top level. Non-plain values are retained by reference, so a `Date` (or\na `Timestamp`, or a `DocumentReference`) survives the copy intact.\n\nFiltering happens on WRITE only. Reads are the plain passthrough — no copy, no traversal — since data\nthat came out of Firestore cannot contain the values being filtered in the first place.\n\nA top-level `null` still clears the field: {@link optionalFirestoreField} short-circuits `x == null`\nahead of the transform, so `update({ myField: null })` is untouched by this.",
|
|
104
|
+
"optional": true,
|
|
105
|
+
"params": [
|
|
106
|
+
{
|
|
107
|
+
"name": "config",
|
|
108
|
+
"type": "OptionalFirestorePassthroughJsonFieldConfig<T>",
|
|
109
|
+
"description": "- Filtering and storage configuration. Defaults to stripping `undefined` values at every depth.",
|
|
110
|
+
"optional": true
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"returns": "A field mapping configuration for optional passthrough json values.",
|
|
114
|
+
"tags": [
|
|
115
|
+
"json",
|
|
116
|
+
"passthrough",
|
|
117
|
+
"object",
|
|
118
|
+
"raw",
|
|
119
|
+
"optional",
|
|
120
|
+
"undefined",
|
|
121
|
+
"filter",
|
|
122
|
+
"recursive",
|
|
123
|
+
"factory",
|
|
124
|
+
"firestore",
|
|
125
|
+
"field",
|
|
126
|
+
"optionalfirestorepassthroughjsonfield"
|
|
127
|
+
],
|
|
128
|
+
"example": "fields: {\n // { model: 'm', temperature: undefined, provider: { only: ['openai'], sort: undefined } }\n // stores as { model: 'm', provider: { only: ['openai'] } }\n config: optionalFirestorePassthroughJsonField<MyVendorConfig>(),\n // store null rather than an empty object when nothing survives the filtering\n usage: optionalFirestorePassthroughJsonField<MyVendorUsage>({ filterEmptyValues: true, dontStoreIfEmpty: true })\n}",
|
|
129
|
+
"relatedSlugs": [
|
|
130
|
+
"optional-firestore-field",
|
|
131
|
+
"firestore-pass-through-field",
|
|
132
|
+
"firestore-sub-object"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
95
135
|
{
|
|
96
136
|
"slug": "firestore-string",
|
|
97
137
|
"name": "firestoreString",
|
|
@@ -7081,6 +7081,88 @@
|
|
|
7081
7081
|
"object-keys-equality-comparator-function"
|
|
7082
7082
|
]
|
|
7083
7083
|
},
|
|
7084
|
+
{
|
|
7085
|
+
"slug": "copy-value-deep-function",
|
|
7086
|
+
"name": "copyValueDeepFunction",
|
|
7087
|
+
"kind": "factory",
|
|
7088
|
+
"category": "object",
|
|
7089
|
+
"module": "@dereekb/util",
|
|
7090
|
+
"subpath": "object/object.copy",
|
|
7091
|
+
"signature": "copyValueDeepFunction(config?: Maybe<CopyValueDeepConfig>): CopyValueDeepFunction",
|
|
7092
|
+
"description": "Creates a reusable {@link CopyValueDeepFunction}.\n\nPlain objects and arrays are copied recursively. Every other value is retained by reference:\nprimitives have nothing to copy, and a `Date`/`Map`/`Set`/class instance is a value in its own right,\nnot a bag of keys to rebuild — copying one key-by-key would replace a `Date` with `{}`. This is what\nmakes the function safe to use on data that carries such instances (a Firestore `Timestamp`, a\n`DocumentReference`) alongside plain json.\n\nThe root value itself is never filtered — only the values found within an object or array are, since\nthe filter is a decision about a key/value pair. A root `undefined` therefore copies to `undefined`.\n\nRepeated and cyclical references are tracked, so a value referenced twice is copied once and a cycle\nterminates rather than overflowing the stack.",
|
|
7093
|
+
"params": [
|
|
7094
|
+
{
|
|
7095
|
+
"name": "config",
|
|
7096
|
+
"type": "Maybe<CopyValueDeepConfig>",
|
|
7097
|
+
"description": "- Filter, array handling, and transform configuration. Defaults to removing `undefined` values.",
|
|
7098
|
+
"optional": true
|
|
7099
|
+
}
|
|
7100
|
+
],
|
|
7101
|
+
"returns": "Recursively copies any input value.",
|
|
7102
|
+
"tags": [
|
|
7103
|
+
"object",
|
|
7104
|
+
"copy",
|
|
7105
|
+
"clone",
|
|
7106
|
+
"deep",
|
|
7107
|
+
"recursive",
|
|
7108
|
+
"filter",
|
|
7109
|
+
"transform",
|
|
7110
|
+
"undefined",
|
|
7111
|
+
"factory",
|
|
7112
|
+
"value",
|
|
7113
|
+
"function",
|
|
7114
|
+
"copyvaluedeepfunction"
|
|
7115
|
+
],
|
|
7116
|
+
"example": "// remove undefined values at any depth\nconst copyFn = copyValueDeepFunction();\ncopyFn({ a: 1, b: undefined, c: { d: undefined, e: [1, undefined] } });\n// { a: 1, c: { e: [1] } }\n\n// remove null and undefined values, and prune anything left empty\nconst copyCleanFn = copyValueDeepFunction({ filter: KeyValueTypleValueFilter.NULL, filterEmptyValues: true });\ncopyCleanFn({ a: 1, b: { c: null } });\n// { a: 1 }",
|
|
7117
|
+
"relatedSlugs": [
|
|
7118
|
+
"copy-value-deep",
|
|
7119
|
+
"filter-from-pojo-function",
|
|
7120
|
+
"copy-object"
|
|
7121
|
+
]
|
|
7122
|
+
},
|
|
7123
|
+
{
|
|
7124
|
+
"slug": "copy-value-deep",
|
|
7125
|
+
"name": "copyValueDeep",
|
|
7126
|
+
"kind": "function",
|
|
7127
|
+
"category": "object",
|
|
7128
|
+
"module": "@dereekb/util",
|
|
7129
|
+
"subpath": "object/object.copy",
|
|
7130
|
+
"signature": "copyValueDeep(value: T, config?: Maybe<CopyValueDeepConfig>): T",
|
|
7131
|
+
"description": "Recursively copies a value, filtering values as it goes.\n\nSee {@link copyValueDeepFunction} for the copy/filter semantics. Prefer the factory when copying more\nthan one value with the same configuration.",
|
|
7132
|
+
"params": [
|
|
7133
|
+
{
|
|
7134
|
+
"name": "value",
|
|
7135
|
+
"type": "T",
|
|
7136
|
+
"description": "- The value to copy.",
|
|
7137
|
+
"optional": false
|
|
7138
|
+
},
|
|
7139
|
+
{
|
|
7140
|
+
"name": "config",
|
|
7141
|
+
"type": "Maybe<CopyValueDeepConfig>",
|
|
7142
|
+
"description": "- Filter, array handling, and transform configuration. Defaults to removing `undefined` values.",
|
|
7143
|
+
"optional": true
|
|
7144
|
+
}
|
|
7145
|
+
],
|
|
7146
|
+
"returns": "A recursive copy of the value.",
|
|
7147
|
+
"tags": [
|
|
7148
|
+
"object",
|
|
7149
|
+
"copy",
|
|
7150
|
+
"clone",
|
|
7151
|
+
"deep",
|
|
7152
|
+
"recursive",
|
|
7153
|
+
"filter",
|
|
7154
|
+
"transform",
|
|
7155
|
+
"undefined",
|
|
7156
|
+
"value",
|
|
7157
|
+
"copyvaluedeep"
|
|
7158
|
+
],
|
|
7159
|
+
"example": "copyValueDeep({ a: 1, b: { c: undefined } });\n// { a: 1, b: {} }",
|
|
7160
|
+
"relatedSlugs": [
|
|
7161
|
+
"copy-value-deep-function",
|
|
7162
|
+
"filter-from-pojo",
|
|
7163
|
+
"copy-object"
|
|
7164
|
+
]
|
|
7165
|
+
},
|
|
7084
7166
|
{
|
|
7085
7167
|
"slug": "object-is-empty",
|
|
7086
7168
|
"name": "objectIsEmpty",
|
|
@@ -7970,6 +8052,39 @@
|
|
|
7970
8052
|
"maptoobject"
|
|
7971
8053
|
]
|
|
7972
8054
|
},
|
|
8055
|
+
{
|
|
8056
|
+
"slug": "is-plain-object",
|
|
8057
|
+
"name": "isPlainObject",
|
|
8058
|
+
"kind": "function",
|
|
8059
|
+
"category": "object",
|
|
8060
|
+
"module": "@dereekb/util",
|
|
8061
|
+
"subpath": "object/object",
|
|
8062
|
+
"signature": "isPlainObject(value: unknown): value is Record<string, unknown>",
|
|
8063
|
+
"description": "Checks whether the value is a \"plain\" object, meaning an object literal or an object created with a\nnull prototype.\n\nArrays, `Date`, `RegExp`, `Map`, `Set`, and class instances are NOT plain objects. This is the check\nto use before recursing into a value's keys: a class instance's keys are an implementation detail and\ncopying them key-by-key produces a lifeless imitation of the original (a `Date` becomes `{}`).",
|
|
8064
|
+
"params": [
|
|
8065
|
+
{
|
|
8066
|
+
"name": "value",
|
|
8067
|
+
"type": "unknown",
|
|
8068
|
+
"description": "- The value to check.",
|
|
8069
|
+
"optional": false
|
|
8070
|
+
}
|
|
8071
|
+
],
|
|
8072
|
+
"returns": "`true` if the value is an object literal or has a null prototype.",
|
|
8073
|
+
"tags": [
|
|
8074
|
+
"object",
|
|
8075
|
+
"pojo",
|
|
8076
|
+
"plain",
|
|
8077
|
+
"literal",
|
|
8078
|
+
"type-guard",
|
|
8079
|
+
"check",
|
|
8080
|
+
"is",
|
|
8081
|
+
"isplainobject"
|
|
8082
|
+
],
|
|
8083
|
+
"relatedSlugs": [
|
|
8084
|
+
"object-has-no-keys",
|
|
8085
|
+
"copy-value-deep"
|
|
8086
|
+
]
|
|
8087
|
+
},
|
|
7973
8088
|
{
|
|
7974
8089
|
"slug": "copy-object",
|
|
7975
8090
|
"name": "copyObject",
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-components-mcp",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.37.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"dbx-components-mcp": "dbx-components-mcp.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@modelcontextprotocol/
|
|
9
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
10
10
|
"arktype": "^2.2.0",
|
|
11
11
|
"ts-morph": "^21.0.0"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@dereekb/dbx-cli": "13.
|
|
15
|
-
"@dereekb/util": "13.
|
|
14
|
+
"@dereekb/dbx-cli": "13.37.0",
|
|
15
|
+
"@dereekb/util": "13.37.0"
|
|
16
16
|
}
|
|
17
17
|
}
|