@dereekb/dbx-cli 13.11.18 → 13.12.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.
Files changed (156) hide show
  1. package/firebase-api-manifest/main.js +70 -9
  2. package/firebase-api-manifest/package.json +1 -1
  3. package/firestore-indexes/src/firestore-indexes-generate.d.ts +125 -0
  4. package/firestore-indexes/src/firestore-model-identity-resolver.d.ts +93 -0
  5. package/firestore-indexes/src/firestore-query-helpers.d.ts +108 -0
  6. package/firestore-indexes/src/generate-firestore-indexes-cli.d.ts +94 -0
  7. package/firestore-indexes/src/index.d.ts +7 -0
  8. package/firestore-indexes/src/model-firebase-index-analyze.d.ts +68 -0
  9. package/firestore-indexes/src/model-firebase-index-build-manifest.d.ts +123 -0
  10. package/firestore-indexes/src/model-firebase-index-extract.d.ts +246 -0
  11. package/firestore-indexes/src/model-firebase-index-runtime.d.ts +126 -0
  12. package/firestore-indexes/src/model-firebase-index-scan-config-schema.d.ts +58 -0
  13. package/firestore-indexes/src/model-firebase-index-schema.d.ts +366 -0
  14. package/generate-firestore-indexes/main.js +1 -1
  15. package/generate-firestore-indexes/package.json +1 -1
  16. package/generate-mcp-manifest/main.js +1314 -0
  17. package/generate-mcp-manifest/package.json +6 -0
  18. package/generated/firebase-models.generated.d.ts +3 -0
  19. package/index.cjs.js +45614 -640
  20. package/index.esm.js +45321 -643
  21. package/lint-cache/main.js +32 -28
  22. package/lint-cache/package.json +2 -2
  23. package/manifest-extract/index.cjs.js +169 -4
  24. package/manifest-extract/index.esm.js +169 -4
  25. package/manifest-extract/package.json +1 -1
  26. package/manifest-extract/src/lib/types.d.ts +26 -1
  27. package/package.json +14 -10
  28. package/src/lib/index.d.ts +3 -0
  29. package/src/lib/manifest/types.d.ts +155 -0
  30. package/src/lib/mcp-scan/config/config-schema.d.ts +226 -0
  31. package/src/lib/mcp-scan/config/load-config.d.ts +63 -0
  32. package/src/lib/mcp-scan/index.d.ts +16 -0
  33. package/src/lib/mcp-scan/manifest/actions-loader.d.ts +49 -0
  34. package/src/lib/mcp-scan/manifest/actions-schema.d.ts +328 -0
  35. package/src/lib/mcp-scan/manifest/core-topics.d.ts +38 -0
  36. package/src/lib/mcp-scan/manifest/css-utilities-loader.d.ts +55 -0
  37. package/src/lib/mcp-scan/manifest/css-utilities-schema.d.ts +168 -0
  38. package/src/lib/mcp-scan/manifest/dbx-docs-ui-examples-loader.d.ts +33 -0
  39. package/src/lib/mcp-scan/manifest/dbx-docs-ui-examples-schema.d.ts +133 -0
  40. package/src/lib/mcp-scan/manifest/filters-loader.d.ts +61 -0
  41. package/src/lib/mcp-scan/manifest/filters-schema.d.ts +190 -0
  42. package/src/lib/mcp-scan/manifest/forge-fields-loader.d.ts +53 -0
  43. package/src/lib/mcp-scan/manifest/forge-fields-schema.d.ts +170 -0
  44. package/src/lib/mcp-scan/manifest/index.d.ts +43 -0
  45. package/src/lib/mcp-scan/manifest/load-actions-registry.d.ts +38 -0
  46. package/src/lib/mcp-scan/manifest/load-auth-registry.d.ts +82 -0
  47. package/src/lib/mcp-scan/manifest/load-css-utilities-registry.d.ts +67 -0
  48. package/src/lib/mcp-scan/manifest/load-dbx-docs-ui-examples-registry.d.ts +45 -0
  49. package/src/lib/mcp-scan/manifest/load-filters-registry.d.ts +69 -0
  50. package/src/lib/mcp-scan/manifest/load-forge-fields-registry.d.ts +70 -0
  51. package/src/lib/mcp-scan/manifest/load-model-firebase-index-registry.d.ts +61 -0
  52. package/src/lib/mcp-scan/manifest/load-model-snapshot-fields-registry.d.ts +74 -0
  53. package/src/lib/mcp-scan/manifest/load-pipes-registry.d.ts +69 -0
  54. package/src/lib/mcp-scan/manifest/load-registry.d.ts +76 -0
  55. package/src/lib/mcp-scan/manifest/load-tokens-registry.d.ts +69 -0
  56. package/src/lib/mcp-scan/manifest/load-ui-components-registry.d.ts +70 -0
  57. package/src/lib/mcp-scan/manifest/load-utils-registry.d.ts +73 -0
  58. package/src/lib/mcp-scan/manifest/loader.d.ts +120 -0
  59. package/src/lib/mcp-scan/manifest/manifest-loader-base.d.ts +130 -0
  60. package/src/lib/mcp-scan/manifest/model-firebase-index-loader.d.ts +53 -0
  61. package/src/lib/mcp-scan/manifest/model-snapshot-fields-loader.d.ts +54 -0
  62. package/src/lib/mcp-scan/manifest/model-snapshot-fields-schema.d.ts +127 -0
  63. package/src/lib/mcp-scan/manifest/pipes-loader.d.ts +54 -0
  64. package/src/lib/mcp-scan/manifest/pipes-schema.d.ts +125 -0
  65. package/src/lib/mcp-scan/manifest/semantic-types-schema.d.ts +108 -0
  66. package/src/lib/mcp-scan/manifest/tokens-loader.d.ts +55 -0
  67. package/src/lib/mcp-scan/manifest/tokens-schema.d.ts +116 -0
  68. package/src/lib/mcp-scan/manifest/ui-components-loader.d.ts +54 -0
  69. package/src/lib/mcp-scan/manifest/ui-components-schema.d.ts +149 -0
  70. package/src/lib/mcp-scan/manifest/utils-loader.d.ts +54 -0
  71. package/src/lib/mcp-scan/manifest/utils-schema.d.ts +120 -0
  72. package/src/lib/mcp-scan/registry/actions-runtime.d.ts +173 -0
  73. package/src/lib/mcp-scan/registry/archetypes.d.ts +235 -0
  74. package/src/lib/mcp-scan/registry/auth-builtin.d.ts +59 -0
  75. package/src/lib/mcp-scan/registry/auth-runtime.d.ts +343 -0
  76. package/src/lib/mcp-scan/registry/css-utilities-runtime.d.ts +133 -0
  77. package/src/lib/mcp-scan/registry/dbx-docs-ui-examples-runtime.d.ts +58 -0
  78. package/src/lib/mcp-scan/registry/downstream-models-runtime.d.ts +93 -0
  79. package/src/lib/mcp-scan/registry/filters-runtime.d.ts +128 -0
  80. package/src/lib/mcp-scan/registry/firebase-models.d.ts +387 -0
  81. package/src/lib/mcp-scan/registry/forge-fields.d.ts +101 -0
  82. package/src/lib/mcp-scan/registry/form-fields.d.ts +203 -0
  83. package/src/lib/mcp-scan/registry/index.d.ts +165 -0
  84. package/src/lib/mcp-scan/registry/model-snapshot-fields-runtime.d.ts +138 -0
  85. package/src/lib/mcp-scan/registry/pipes-runtime.d.ts +136 -0
  86. package/src/lib/mcp-scan/registry/reserved-model-folders.d.ts +29 -0
  87. package/src/lib/mcp-scan/registry/semantic-types.d.ts +81 -0
  88. package/src/lib/mcp-scan/registry/tokens-runtime.d.ts +96 -0
  89. package/src/lib/mcp-scan/registry/ui-components-runtime.d.ts +90 -0
  90. package/src/lib/mcp-scan/registry/utils-runtime.d.ts +136 -0
  91. package/src/lib/mcp-scan/scan/_jsdoc-tagged-export/extract-base.d.ts +245 -0
  92. package/src/lib/mcp-scan/scan/actions-build-manifest.d.ts +58 -0
  93. package/src/lib/mcp-scan/scan/actions-cli.d.ts +38 -0
  94. package/src/lib/mcp-scan/scan/actions-extract.d.ts +99 -0
  95. package/src/lib/mcp-scan/scan/actions-scan-config-schema.d.ts +42 -0
  96. package/src/lib/mcp-scan/scan/auth-extract.d.ts +127 -0
  97. package/src/lib/mcp-scan/scan/build-manifest.d.ts +76 -0
  98. package/src/lib/mcp-scan/scan/cli.d.ts +60 -0
  99. package/src/lib/mcp-scan/scan/css-utilities-build-manifest.d.ts +76 -0
  100. package/src/lib/mcp-scan/scan/css-utilities-cli.d.ts +36 -0
  101. package/src/lib/mcp-scan/scan/css-utilities-extract.d.ts +187 -0
  102. package/src/lib/mcp-scan/scan/css-utilities-scan-config-schema.d.ts +57 -0
  103. package/src/lib/mcp-scan/scan/dbx-docs-ui-examples-build-manifest.d.ts +68 -0
  104. package/src/lib/mcp-scan/scan/dbx-docs-ui-examples-cli.d.ts +20 -0
  105. package/src/lib/mcp-scan/scan/dbx-docs-ui-examples-extract.d.ts +160 -0
  106. package/src/lib/mcp-scan/scan/dbx-docs-ui-examples-scan-config-schema.d.ts +56 -0
  107. package/src/lib/mcp-scan/scan/discover-downstream-packages.d.ts +76 -0
  108. package/src/lib/mcp-scan/scan/discover-firebase-packages.d.ts +58 -0
  109. package/src/lib/mcp-scan/scan/extract-models/assemble.d.ts +105 -0
  110. package/src/lib/mcp-scan/scan/extract-models/collect-inherited.d.ts +22 -0
  111. package/src/lib/mcp-scan/scan/extract-models/find-converters.d.ts +19 -0
  112. package/src/lib/mcp-scan/scan/extract-models/find-enums.d.ts +19 -0
  113. package/src/lib/mcp-scan/scan/extract-models/find-identities.d.ts +25 -0
  114. package/src/lib/mcp-scan/scan/extract-models/find-interfaces.d.ts +31 -0
  115. package/src/lib/mcp-scan/scan/extract-models/find-model-groups.d.ts +21 -0
  116. package/src/lib/mcp-scan/scan/extract-models/find-service-factories.d.ts +19 -0
  117. package/src/lib/mcp-scan/scan/extract-models/find-sub-object-consts.d.ts +20 -0
  118. package/src/lib/mcp-scan/scan/extract-models/index.d.ts +74 -0
  119. package/src/lib/mcp-scan/scan/extract-models/infer-collection-kind.d.ts +22 -0
  120. package/src/lib/mcp-scan/scan/extract-models/service-factory-constants.d.ts +6 -0
  121. package/src/lib/mcp-scan/scan/extract-models/types.d.ts +171 -0
  122. package/src/lib/mcp-scan/scan/extract.d.ts +82 -0
  123. package/src/lib/mcp-scan/scan/filters-build-manifest.d.ts +78 -0
  124. package/src/lib/mcp-scan/scan/filters-cli.d.ts +37 -0
  125. package/src/lib/mcp-scan/scan/filters-extract.d.ts +101 -0
  126. package/src/lib/mcp-scan/scan/filters-scan-config-schema.d.ts +56 -0
  127. package/src/lib/mcp-scan/scan/forge-fields-build-manifest.d.ts +78 -0
  128. package/src/lib/mcp-scan/scan/forge-fields-cli.d.ts +37 -0
  129. package/src/lib/mcp-scan/scan/forge-fields-extract.d.ts +165 -0
  130. package/src/lib/mcp-scan/scan/forge-fields-scan-config-schema.d.ts +61 -0
  131. package/src/lib/mcp-scan/scan/index.d.ts +60 -0
  132. package/src/lib/mcp-scan/scan/model-firebase-index-cli.d.ts +22 -0
  133. package/src/lib/mcp-scan/scan/model-firebase-index-dispatcher-credit.d.ts +47 -0
  134. package/src/lib/mcp-scan/scan/model-firebase-index-reference-scan.d.ts +100 -0
  135. package/src/lib/mcp-scan/scan/model-snapshot-fields-build-manifest.d.ts +79 -0
  136. package/src/lib/mcp-scan/scan/model-snapshot-fields-cli.d.ts +37 -0
  137. package/src/lib/mcp-scan/scan/model-snapshot-fields-extract.d.ts +115 -0
  138. package/src/lib/mcp-scan/scan/model-snapshot-fields-scan-config-schema.d.ts +59 -0
  139. package/src/lib/mcp-scan/scan/pipes-build-manifest.d.ts +78 -0
  140. package/src/lib/mcp-scan/scan/pipes-cli.d.ts +37 -0
  141. package/src/lib/mcp-scan/scan/pipes-extract.d.ts +90 -0
  142. package/src/lib/mcp-scan/scan/pipes-scan-config-schema.d.ts +56 -0
  143. package/src/lib/mcp-scan/scan/scan-angular-io.d.ts +89 -0
  144. package/src/lib/mcp-scan/scan/scan-cli-base.d.ts +162 -0
  145. package/src/lib/mcp-scan/scan/scan-config-schema.d.ts +44 -0
  146. package/src/lib/mcp-scan/scan/ui-components-build-manifest.d.ts +78 -0
  147. package/src/lib/mcp-scan/scan/ui-components-cli.d.ts +37 -0
  148. package/src/lib/mcp-scan/scan/ui-components-extract.d.ts +124 -0
  149. package/src/lib/mcp-scan/scan/ui-components-scan-config-schema.d.ts +62 -0
  150. package/src/lib/mcp-scan/scan/utils-build-manifest.d.ts +78 -0
  151. package/src/lib/mcp-scan/scan/utils-cli.d.ts +37 -0
  152. package/src/lib/mcp-scan/scan/utils-extract.d.ts +103 -0
  153. package/src/lib/mcp-scan/scan/utils-scan-config-schema.d.ts +57 -0
  154. package/test/package.json +9 -9
  155. package/index.cjs.default.js +0 -1
  156. package/index.cjs.mjs +0 -2
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Arktype schemas for the dbx-docs-ui-examples manifest format.
3
+ *
4
+ * Each manifest catalogs runnable UI example components scraped from a
5
+ * downstream app's docs module — components that wrap a self-contained
6
+ * `<dbx-docs-ui-example>` template tagged with `@dbxDocsUiExample` JSDoc
7
+ * markers. The merged registry feeds the `dbx_ui_examples` and
8
+ * `dbx_ui_search` MCP tools.
9
+ *
10
+ * Entries reuse the closed UI category vocabulary so cross-cluster joins
11
+ * (e.g. surface examples whose `relatedSlugs` overlap a UI component's slug)
12
+ * stay schema-aligned.
13
+ */
14
+ /**
15
+ * Kinds the resolver may emit for an entry in `uses[]`. Wider than
16
+ * `UiComponentKindValue` because supporting sources can be plain
17
+ * interfaces, type aliases, functions, or constants in addition to Angular
18
+ * constructs.
19
+ */
20
+ export declare const DBX_DOCS_UI_EXAMPLE_USE_KINDS: readonly ["component", "directive", "pipe", "service", "interface", "typeAlias", "function", "const", "class"];
21
+ /**
22
+ * Static type inferred from {@link DBX_DOCS_UI_EXAMPLE_USE_KINDS}.
23
+ */
24
+ export type DbxDocsUiExampleUseKind = (typeof DBX_DOCS_UI_EXAMPLE_USE_KINDS)[number];
25
+ /**
26
+ * One supporting source captured by a `@dbxDocsUiExampleUses` tag. The
27
+ * scanner resolves the named identifier through the example component
28
+ * file's import declarations, then captures the declaration source.
29
+ *
30
+ * For inline-template components the template body is already inlined in
31
+ * `classSource`, so it is not duplicated as a separate field. Source
32
+ * file paths are intentionally not persisted because downstream consumers
33
+ * never have access to the originating app's source tree.
34
+ */
35
+ export declare const DbxDocsUiExampleUseEntry: import("arktype/internal/variants/object.ts").ObjectType<{
36
+ kind: "function" | "pipe" | "component" | "directive" | "service" | "class" | "const" | "interface" | "typeAlias";
37
+ className: string;
38
+ classSource: string;
39
+ role?: string | undefined;
40
+ selector?: string | undefined;
41
+ pipeName?: string | undefined;
42
+ }, {}>;
43
+ /**
44
+ * Static type inferred from {@link DbxDocsUiExampleUseEntry}.
45
+ */
46
+ export type DbxDocsUiExampleUseEntry = typeof DbxDocsUiExampleUseEntry.infer;
47
+ /**
48
+ * One example entry inside a manifest. Each entry describes a single
49
+ * tagged Angular component whose template is anchored on a
50
+ * `<dbx-docs-ui-example>` wrapper.
51
+ *
52
+ * Required fields are the minimum needed for `dbx_ui_examples` to render
53
+ * a useful answer. `uses` is required (may be empty) so consumers can
54
+ * count on its shape. The wrapper component's source is intentionally
55
+ * not persisted: it imports `<dbx-docs-ui-example*>` scaffolding that
56
+ * only exists inside the originating docs app, so copy-pasting it into
57
+ * a downstream consumer would resolve to non-existent imports. The
58
+ * canonical invocation is captured in `snippet`.
59
+ */
60
+ export declare const DbxDocsUiExampleEntry: import("arktype/internal/variants/object.ts").ObjectType<{
61
+ slug: string;
62
+ category: "action" | "list" | "screen" | "text" | "layout" | "button" | "card" | "feedback" | "overlay" | "navigation" | "router" | "misc";
63
+ summary: string;
64
+ header: string;
65
+ className: string;
66
+ selector: string;
67
+ module: string;
68
+ appRef: string;
69
+ info: string;
70
+ snippet: string;
71
+ uses: {
72
+ kind: "function" | "pipe" | "component" | "directive" | "service" | "class" | "const" | "interface" | "typeAlias";
73
+ className: string;
74
+ classSource: string;
75
+ role?: string | undefined;
76
+ selector?: string | undefined;
77
+ pipeName?: string | undefined;
78
+ }[];
79
+ hint?: string | undefined;
80
+ relatedSlugs?: string[] | undefined;
81
+ skillRefs?: string[] | undefined;
82
+ imports?: string | undefined;
83
+ notes?: string | undefined;
84
+ }, {}>;
85
+ /**
86
+ * Static type inferred from {@link DbxDocsUiExampleEntry}.
87
+ */
88
+ export type DbxDocsUiExampleEntry = typeof DbxDocsUiExampleEntry.infer;
89
+ /**
90
+ * Top-level manifest envelope. One file per source. The `source` field is
91
+ * the workspace-unique label used to detect collisions; `module` carries
92
+ * the project label (e.g. `apps/demo`) the entries ship in.
93
+ *
94
+ * `version` is the schema version. The loader currently accepts only
95
+ * `version: 1`; manifests with any other value are rejected (strict
96
+ * sources) or warned-and-skipped (non-strict sources).
97
+ */
98
+ export declare const DbxDocsUiExampleManifest: import("arktype/internal/variants/object.ts").ObjectType<{
99
+ version: 1;
100
+ source: string;
101
+ module: string;
102
+ generatedAt: string;
103
+ generator: string;
104
+ entries: {
105
+ slug: string;
106
+ category: "action" | "list" | "screen" | "text" | "layout" | "button" | "card" | "feedback" | "overlay" | "navigation" | "router" | "misc";
107
+ summary: string;
108
+ header: string;
109
+ className: string;
110
+ selector: string;
111
+ module: string;
112
+ appRef: string;
113
+ info: string;
114
+ snippet: string;
115
+ uses: {
116
+ kind: "function" | "pipe" | "component" | "directive" | "service" | "class" | "const" | "interface" | "typeAlias";
117
+ className: string;
118
+ classSource: string;
119
+ role?: string | undefined;
120
+ selector?: string | undefined;
121
+ pipeName?: string | undefined;
122
+ }[];
123
+ hint?: string | undefined;
124
+ relatedSlugs?: string[] | undefined;
125
+ skillRefs?: string[] | undefined;
126
+ imports?: string | undefined;
127
+ notes?: string | undefined;
128
+ }[];
129
+ }, {}>;
130
+ /**
131
+ * Static type inferred from {@link DbxDocsUiExampleManifest}.
132
+ */
133
+ export type DbxDocsUiExampleManifest = typeof DbxDocsUiExampleManifest.infer;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Loader for filters manifests.
3
+ *
4
+ * Reads one or more manifest files (bundled `@dereekb/*` registries plus any
5
+ * downstream-app manifests discovered via `dbx-mcp.config.json`), validates
6
+ * them against {@link FilterManifest}, and merges them into a single
7
+ * lookup-ready registry.
8
+ *
9
+ * Failure handling mirrors the semantic-types and pipes loaders: bundled
10
+ * sources are strict by default, external sources are not. If no source
11
+ * loads successfully the loader throws — silent empty registries are the
12
+ * worst failure mode.
13
+ */
14
+ import { type FilterEntry } from './filters-schema.js';
15
+ import { type ManifestLoaderWarning, type ManifestReadFile, type ManifestSource } from './manifest-loader-base.js';
16
+ /**
17
+ * One manifest the loader is asked to ingest. `path` must be absolute (the
18
+ * caller resolves any repo-relative `dbx-mcp.config.json` entries against
19
+ * the config file's directory before invoking the loader).
20
+ */
21
+ export type FilterManifestSource = ManifestSource;
22
+ /**
23
+ * Function shape used by the loader to read manifest contents. Defaults to
24
+ * `node:fs/promises.readFile(path, 'utf-8')` when not supplied.
25
+ */
26
+ export type FilterManifestReadFile = ManifestReadFile;
27
+ /**
28
+ * Discriminated union of all non-fatal events the loader emits. Strict
29
+ * sources convert these into thrown errors; non-strict sources collect
30
+ * them into the result's `warnings` array.
31
+ */
32
+ export type FilterLoaderWarning = ManifestLoaderWarning;
33
+ /**
34
+ * Input to {@link loadFilterManifests}.
35
+ */
36
+ export interface LoadFilterManifestsInput {
37
+ readonly sources: readonly FilterManifestSource[];
38
+ readonly readFile?: FilterManifestReadFile;
39
+ }
40
+ /**
41
+ * Result of {@link loadFilterManifests}. `entries` is the merged lookup map
42
+ * keyed by `${module}::${slug}`; `kindIndex` is the inverted index from
43
+ * kind value to entry keys (sorted alphabetically for deterministic output).
44
+ * `warnings` is sorted deterministically so test assertions are stable
45
+ * across runs.
46
+ */
47
+ export interface LoadFilterManifestsResult {
48
+ readonly entries: ReadonlyMap<string, FilterEntry>;
49
+ readonly kindIndex: ReadonlyMap<string, readonly string[]>;
50
+ readonly warnings: readonly FilterLoaderWarning[];
51
+ readonly loadedSources: readonly string[];
52
+ }
53
+ /**
54
+ * Loads, validates, and merges the supplied manifest sources into a single
55
+ * registry suitable for the `dbx_filter_lookup` MCP tool.
56
+ *
57
+ * @param input - Manifest sources plus an optional injected `readFile`
58
+ * @returns Merged entries, kind index, deterministic warnings, and the list of source labels that loaded.
59
+ * @throws {Error} When a strict source fails or when zero manifests load successfully.
60
+ */
61
+ export declare function loadFilterManifests(input: LoadFilterManifestsInput): Promise<LoadFilterManifestsResult>;
@@ -0,0 +1,190 @@
1
+ /**
2
+ * Arktype schemas for the filters manifest format.
3
+ *
4
+ * Manifests are JSON files that catalog the dbx-components filter surface —
5
+ * the `[dbxFilter*]` directive family plus shape-only patterns such as
6
+ * `ClickableFilterPreset`. One manifest per source — bundled `@dereekb/*`
7
+ * packages plus any downstream-app manifests discovered via
8
+ * `dbx-mcp.config.json` — feeds the merged registry that powers the
9
+ * `dbx_filter_lookup` MCP tool.
10
+ *
11
+ * The schemas in this module are the *contract* — once a downstream app
12
+ * commits a manifest file, breaking changes here mean every downstream
13
+ * regenerates. Optional fields can be added in v1; structural breaks must
14
+ * bump the manifest `version` and update the loader's accepted versions.
15
+ */
16
+ /**
17
+ * Discriminator between Angular directives (`[dbxFilter*]`) and shape-only
18
+ * patterns (`ClickableFilterPreset`). Mirrors the existing `FilterEntryKind`
19
+ * exposed by the legacy hand-authored module.
20
+ */
21
+ export declare const FILTER_KINDS: readonly ["directive", "pattern"];
22
+ /**
23
+ * Static type for the closed kind vocabulary.
24
+ */
25
+ export type FilterKindValue = (typeof FILTER_KINDS)[number];
26
+ /**
27
+ * One documented input on a filter directive — alias, type, description.
28
+ * Filter directives are read-mostly: most have zero inputs, a few accept a
29
+ * single map key; required flags are not tracked because every input is
30
+ * optional in the rendered docs.
31
+ */
32
+ export declare const FilterInputEntry: import("arktype/internal/variants/object.ts").ObjectType<{
33
+ name: string;
34
+ type: string;
35
+ description: string;
36
+ }, {}>;
37
+ /**
38
+ * Static type inferred from {@link FilterInputEntry}.
39
+ */
40
+ export type FilterInputEntry = typeof FilterInputEntry.infer;
41
+ /**
42
+ * Directive entry. Captures the `@Directive({selector})` plus any inputs and
43
+ * outputs declared on the class. Required fields are the minimum needed for
44
+ * `dbx_filter_lookup` to render a useful answer.
45
+ */
46
+ export declare const FilterDirectiveEntry: import("arktype/internal/variants/object.ts").ObjectType<{
47
+ kind: "directive";
48
+ slug: string;
49
+ selector: string;
50
+ className: string;
51
+ module: string;
52
+ description: string;
53
+ inputs: {
54
+ name: string;
55
+ type: string;
56
+ description: string;
57
+ }[];
58
+ outputs: {
59
+ name: string;
60
+ type: string;
61
+ description: string;
62
+ }[];
63
+ example: string;
64
+ relatedSlugs?: string[] | undefined;
65
+ skillRefs?: string[] | undefined;
66
+ deprecated?: string | boolean | undefined;
67
+ since?: string | undefined;
68
+ }, {}>;
69
+ /**
70
+ * Static type inferred from {@link FilterDirectiveEntry}.
71
+ */
72
+ export type FilterDirectiveEntry = typeof FilterDirectiveEntry.infer;
73
+ /**
74
+ * Pattern entry. Shape-only entries (interfaces, type aliases) without an
75
+ * Angular `@Directive` decorator. The `selector` field is omitted — pattern
76
+ * entries are referenced in TypeScript code, not the template DOM.
77
+ */
78
+ export declare const FilterPatternEntry: import("arktype/internal/variants/object.ts").ObjectType<{
79
+ kind: "pattern";
80
+ slug: string;
81
+ className: string;
82
+ module: string;
83
+ description: string;
84
+ example: string;
85
+ relatedSlugs?: string[] | undefined;
86
+ skillRefs?: string[] | undefined;
87
+ deprecated?: string | boolean | undefined;
88
+ since?: string | undefined;
89
+ }, {}>;
90
+ /**
91
+ * Static type inferred from {@link FilterPatternEntry}.
92
+ */
93
+ export type FilterPatternEntry = typeof FilterPatternEntry.infer;
94
+ /**
95
+ * Discriminated union of every filter entry shape. Matches the legacy
96
+ * `FilterEntryInfo` shape's `kind: 'directive' | 'pattern'` discriminator
97
+ * so the runtime registry can preserve consumer-visible field names.
98
+ */
99
+ export declare const FilterEntry: import("arktype/internal/variants/object.ts").ObjectType<{
100
+ kind: "directive";
101
+ slug: string;
102
+ selector: string;
103
+ className: string;
104
+ module: string;
105
+ description: string;
106
+ inputs: {
107
+ name: string;
108
+ type: string;
109
+ description: string;
110
+ }[];
111
+ outputs: {
112
+ name: string;
113
+ type: string;
114
+ description: string;
115
+ }[];
116
+ example: string;
117
+ relatedSlugs?: string[] | undefined;
118
+ skillRefs?: string[] | undefined;
119
+ deprecated?: string | boolean | undefined;
120
+ since?: string | undefined;
121
+ } | {
122
+ kind: "pattern";
123
+ slug: string;
124
+ className: string;
125
+ module: string;
126
+ description: string;
127
+ example: string;
128
+ relatedSlugs?: string[] | undefined;
129
+ skillRefs?: string[] | undefined;
130
+ deprecated?: string | boolean | undefined;
131
+ since?: string | undefined;
132
+ }, {}>;
133
+ /**
134
+ * Static type inferred from {@link FilterEntry}.
135
+ */
136
+ export type FilterEntry = typeof FilterEntry.infer;
137
+ /**
138
+ * Top-level manifest envelope. One file per source. The `source` field is
139
+ * the workspace-unique label used to detect collisions; `module` carries
140
+ * the npm package the entries ship in.
141
+ *
142
+ * `version` is the schema version. The loader currently accepts only
143
+ * `version: 1`; manifests with any other value are rejected (strict
144
+ * sources) or warned-and-skipped (non-strict sources).
145
+ */
146
+ export declare const FilterManifest: import("arktype/internal/variants/object.ts").ObjectType<{
147
+ version: 1;
148
+ source: string;
149
+ module: string;
150
+ generatedAt: string;
151
+ generator: string;
152
+ entries: ({
153
+ kind: "directive";
154
+ slug: string;
155
+ selector: string;
156
+ className: string;
157
+ module: string;
158
+ description: string;
159
+ inputs: {
160
+ name: string;
161
+ type: string;
162
+ description: string;
163
+ }[];
164
+ outputs: {
165
+ name: string;
166
+ type: string;
167
+ description: string;
168
+ }[];
169
+ example: string;
170
+ relatedSlugs?: string[] | undefined;
171
+ skillRefs?: string[] | undefined;
172
+ deprecated?: string | boolean | undefined;
173
+ since?: string | undefined;
174
+ } | {
175
+ kind: "pattern";
176
+ slug: string;
177
+ className: string;
178
+ module: string;
179
+ description: string;
180
+ example: string;
181
+ relatedSlugs?: string[] | undefined;
182
+ skillRefs?: string[] | undefined;
183
+ deprecated?: string | boolean | undefined;
184
+ since?: string | undefined;
185
+ })[];
186
+ }, {}>;
187
+ /**
188
+ * Static type inferred from {@link FilterManifest}.
189
+ */
190
+ export type FilterManifest = typeof FilterManifest.infer;
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Loader for forge-fields manifests.
3
+ *
4
+ * Reads one or more manifest files (bundled `@dereekb/*` registries plus any
5
+ * downstream-app manifests discovered via `dbx-mcp.config.json`), validates
6
+ * them against {@link ForgeFieldManifest}, and merges them into a single
7
+ * lookup-ready registry.
8
+ *
9
+ * Failure handling mirrors the semantic-types and ui-components loaders:
10
+ * bundled sources are strict by default, external sources are not. If no
11
+ * source loads successfully the loader throws.
12
+ */
13
+ import { type ForgeFieldEntry } from './forge-fields-schema.js';
14
+ import { type ManifestLoaderWarning, type ManifestReadFile, type ManifestSource } from './manifest-loader-base.js';
15
+ /**
16
+ * One manifest the loader is asked to ingest. `path` must be absolute.
17
+ */
18
+ export type ForgeFieldManifestSource = ManifestSource;
19
+ /**
20
+ * Function shape used by the loader to read manifest contents.
21
+ */
22
+ export type ForgeFieldManifestReadFile = ManifestReadFile;
23
+ /**
24
+ * Discriminated union of all non-fatal events the loader emits.
25
+ */
26
+ export type ForgeFieldLoaderWarning = ManifestLoaderWarning;
27
+ /**
28
+ * Input to {@link loadForgeFieldManifests}.
29
+ */
30
+ export interface LoadForgeFieldManifestsInput {
31
+ readonly sources: readonly ForgeFieldManifestSource[];
32
+ readonly readFile?: ForgeFieldManifestReadFile;
33
+ }
34
+ /**
35
+ * Result of {@link loadForgeFieldManifests}. `entries` is the merged lookup
36
+ * map keyed by `${module}::${slug}`; `tierIndex` is the inverted index from
37
+ * tier value to entry keys (sorted alphabetically for deterministic output).
38
+ */
39
+ export interface LoadForgeFieldManifestsResult {
40
+ readonly entries: ReadonlyMap<string, ForgeFieldEntry>;
41
+ readonly tierIndex: ReadonlyMap<string, readonly string[]>;
42
+ readonly warnings: readonly ForgeFieldLoaderWarning[];
43
+ readonly loadedSources: readonly string[];
44
+ }
45
+ /**
46
+ * Loads, validates, and merges the supplied manifest sources into a single
47
+ * registry suitable for the `lookup-form` / `search-form` MCP tools.
48
+ *
49
+ * @param input - Manifest sources plus an optional injected `readFile`
50
+ * @returns Merged entries, tier index, deterministic warnings, and the list of source labels that loaded.
51
+ * @throws {Error} When a strict source fails or when zero manifests load successfully.
52
+ */
53
+ export declare function loadForgeFieldManifests(input: LoadForgeFieldManifestsInput): Promise<LoadForgeFieldManifestsResult>;
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Arktype schemas for the forge-fields manifest format.
3
+ *
4
+ * Manifests are JSON files that catalog @dereekb/dbx-form factory exports —
5
+ * field factories (`dbxForgeTextField`), composite builders (`dbxForgeDateRangeRow`),
6
+ * and layout primitives (`dbxForgeRow`). One manifest per source — bundled
7
+ * `@dereekb/*` packages plus any downstream-app manifests discovered via
8
+ * `dbx-mcp.config.json` — feeds the merged registry that powers the
9
+ * `lookup-form` and `search-form` MCP tools.
10
+ *
11
+ * The schemas in this module are the *contract* — once a downstream app
12
+ * commits a manifest file, breaking changes here mean every downstream
13
+ * regenerates. Optional fields can be added in v1; structural breaks must
14
+ * bump the manifest `version` and update the loader's accepted versions.
15
+ */
16
+ /**
17
+ * Five-tier classification of forge factories — see the
18
+ * `dbx__ref__dbx-forge-field` skill for the canonical definitions.
19
+ *
20
+ * - `field-factory` dbxForgeFieldFunction / dbxForgeMaterialFormFieldWrappedFieldFunction — registers a type
21
+ * - `field-derivative` pre-configured wrapper around a single field-factory; returns one field of the same shape with presets baked in (does NOT register a type)
22
+ * - `composite-builder` plain function composing other forge entries into ONE field/group — does NOT register a type
23
+ * - `template-builder` returns multiple related fields as an array/tuple — distinct from composite-builders, which compose into a single container
24
+ * - `primitive` core layout helper (row, group, array, section)
25
+ */
26
+ export declare const FORGE_FIELD_TIERS: readonly ["field-factory", "field-derivative", "composite-builder", "template-builder", "primitive"];
27
+ /**
28
+ * Static type for the closed tier vocabulary.
29
+ */
30
+ export type ForgeFieldTierValue = (typeof FORGE_FIELD_TIERS)[number];
31
+ /**
32
+ * Factory-only flag describing how a field-factory entry is built.
33
+ *
34
+ * - `unwrapped` `dbxForgeFieldFunction` — the field renders its own chrome
35
+ * - `material-form-field-wrapped` `dbxForgeMaterialFormFieldWrappedFieldFunction` — wrapped in mat-form-field
36
+ */
37
+ export declare const FORGE_FIELD_WRAPPER_PATTERNS: readonly ["unwrapped", "material-form-field-wrapped"];
38
+ /**
39
+ * Static type for the closed wrapper-pattern vocabulary.
40
+ */
41
+ export type ForgeFieldWrapperPatternValue = (typeof FORGE_FIELD_WRAPPER_PATTERNS)[number];
42
+ /**
43
+ * Composite-builder-only suffix advertising the return shape of the builder.
44
+ *
45
+ * - `Row` `dbxForgeXRow` → `RowField`
46
+ * - `Group` `dbxForgeXGroup` → `GroupField`
47
+ * - `Fields` `dbxForgeXFields` → `FieldDef[]`
48
+ * - `Field` `dbxForgeXField` → single field (composite array fields keep `Field`)
49
+ * - `Wrapper` `dbxForgeXWrapper` → WrapperConfig or composed layout
50
+ * - `Layout` `dbxForgeXLayout` → GroupField with responsive flex configuration
51
+ */
52
+ export declare const FORGE_FIELD_COMPOSITE_SUFFIXES: readonly ["Row", "Group", "Fields", "Field", "Wrapper", "Layout"];
53
+ /**
54
+ * Static type for the closed composite-suffix vocabulary.
55
+ */
56
+ export type ForgeFieldCompositeSuffixValue = (typeof FORGE_FIELD_COMPOSITE_SUFFIXES)[number];
57
+ /**
58
+ * Whether an entry's output is an array, single value, or configurable.
59
+ *
60
+ * - `yes` entry always produces a collection (form value is an array, OR
61
+ * composite returns `FieldDef[]`).
62
+ * - `no` entry produces a single value / single field.
63
+ * - `optional` entry can be configured either way (e.g. searchable-chip).
64
+ */
65
+ export declare const FORGE_FIELD_ARRAY_OUTPUTS: readonly ["yes", "no", "optional"];
66
+ /**
67
+ * Static type for the closed array-output vocabulary.
68
+ */
69
+ export type ForgeFieldArrayOutputValue = (typeof FORGE_FIELD_ARRAY_OUTPUTS)[number];
70
+ /**
71
+ * One property auto-extracted from the entry's config interface. Mirrors the
72
+ * shape of {@link PropertyInfo} from the registry barrel — captured here for
73
+ * the manifest contract, with `default` stored as a string so JSON
74
+ * serialization is lossless.
75
+ */
76
+ export declare const ForgeFieldPropertyEntry: import("arktype/internal/variants/object.ts").ObjectType<{
77
+ name: string;
78
+ type: string;
79
+ description: string;
80
+ required: boolean;
81
+ default?: string | undefined;
82
+ }, {}>;
83
+ /**
84
+ * Static type inferred from {@link ForgeFieldPropertyEntry}.
85
+ */
86
+ export type ForgeFieldPropertyEntry = typeof ForgeFieldPropertyEntry.infer;
87
+ /**
88
+ * One forge-field entry inside a manifest. Each entry describes a single
89
+ * exported factory — its slug, tier classification, output type, and the
90
+ * config properties callers wire to.
91
+ *
92
+ * Tier-specific fields are optional at the schema level; the runtime
93
+ * registry asserts the right combination per tier. Required fields are the
94
+ * minimum needed for `lookup-form` to render a useful answer; every other
95
+ * field is optional so the auto-generator can populate them progressively.
96
+ */
97
+ export declare const ForgeFieldEntry: import("arktype/internal/variants/object.ts").ObjectType<{
98
+ slug: string;
99
+ factoryName: string;
100
+ tier: "field-factory" | "field-derivative" | "composite-builder" | "template-builder" | "primitive";
101
+ produces: string;
102
+ arrayOutput: "yes" | "no" | "optional";
103
+ description: string;
104
+ example: string;
105
+ properties: {
106
+ name: string;
107
+ type: string;
108
+ description: string;
109
+ required: boolean;
110
+ default?: string | undefined;
111
+ }[];
112
+ wrapperPattern?: "unwrapped" | "material-form-field-wrapped" | undefined;
113
+ ngFormType?: string | undefined;
114
+ generic?: string | undefined;
115
+ suffix?: "Row" | "Group" | "Fields" | "Field" | "Wrapper" | "Layout" | undefined;
116
+ composesFromSlugs?: string[] | undefined;
117
+ returns?: string | undefined;
118
+ configInterface?: string | undefined;
119
+ deprecated?: string | boolean | undefined;
120
+ since?: string | undefined;
121
+ }, {}>;
122
+ /**
123
+ * Static type inferred from {@link ForgeFieldEntry}.
124
+ */
125
+ export type ForgeFieldEntry = typeof ForgeFieldEntry.infer;
126
+ /**
127
+ * Top-level manifest envelope. One file per source. The `source` field is
128
+ * the workspace-unique label used to detect collisions; `module` carries
129
+ * the npm package the entries ship in.
130
+ *
131
+ * `version` is the schema version. The loader currently accepts only
132
+ * `version: 1`; manifests with any other value are rejected (strict
133
+ * sources) or warned-and-skipped (non-strict sources).
134
+ */
135
+ export declare const ForgeFieldManifest: import("arktype/internal/variants/object.ts").ObjectType<{
136
+ version: 1;
137
+ source: string;
138
+ module: string;
139
+ generatedAt: string;
140
+ generator: string;
141
+ entries: {
142
+ slug: string;
143
+ factoryName: string;
144
+ tier: "field-factory" | "field-derivative" | "composite-builder" | "template-builder" | "primitive";
145
+ produces: string;
146
+ arrayOutput: "yes" | "no" | "optional";
147
+ description: string;
148
+ example: string;
149
+ properties: {
150
+ name: string;
151
+ type: string;
152
+ description: string;
153
+ required: boolean;
154
+ default?: string | undefined;
155
+ }[];
156
+ wrapperPattern?: "unwrapped" | "material-form-field-wrapped" | undefined;
157
+ ngFormType?: string | undefined;
158
+ generic?: string | undefined;
159
+ suffix?: "Row" | "Group" | "Fields" | "Field" | "Wrapper" | "Layout" | undefined;
160
+ composesFromSlugs?: string[] | undefined;
161
+ returns?: string | undefined;
162
+ configInterface?: string | undefined;
163
+ deprecated?: string | boolean | undefined;
164
+ since?: string | undefined;
165
+ }[];
166
+ }, {}>;
167
+ /**
168
+ * Static type inferred from {@link ForgeFieldManifest}.
169
+ */
170
+ export type ForgeFieldManifest = typeof ForgeFieldManifest.infer;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Manifest barrel for the dbx-components MCP scan infrastructure.
3
+ *
4
+ * Exposes the loader functions and arktype schemas used by the runtime
5
+ * MCP tools and by build-time CLIs that consume the JSON manifests
6
+ * produced under `dbx-components-mcp/generated/`.
7
+ */
8
+ export * from './core-topics.js';
9
+ export * from './semantic-types-schema.js';
10
+ export * from './loader.js';
11
+ export * from './load-registry.js';
12
+ export * from './load-actions-registry.js';
13
+ export * from './load-auth-registry.js';
14
+ export * from './load-css-utilities-registry.js';
15
+ export * from './load-dbx-docs-ui-examples-registry.js';
16
+ export * from './load-filters-registry.js';
17
+ export * from './load-forge-fields-registry.js';
18
+ export * from './load-model-firebase-index-registry.js';
19
+ export * from './load-model-snapshot-fields-registry.js';
20
+ export * from './load-pipes-registry.js';
21
+ export * from './load-tokens-registry.js';
22
+ export * from './load-ui-components-registry.js';
23
+ export * from './load-utils-registry.js';
24
+ export * from './actions-schema.js';
25
+ export * from './css-utilities-schema.js';
26
+ export * from './dbx-docs-ui-examples-schema.js';
27
+ export * from './filters-schema.js';
28
+ export * from './forge-fields-schema.js';
29
+ export * from './model-snapshot-fields-schema.js';
30
+ export * from './pipes-schema.js';
31
+ export * from './tokens-schema.js';
32
+ export * from './tokens-loader.js';
33
+ export * from './ui-components-schema.js';
34
+ export * from './ui-components-loader.js';
35
+ export * from './utils-schema.js';
36
+ export * from './actions-loader.js';
37
+ export * from './model-firebase-index-loader.js';
38
+ export * from './model-snapshot-fields-loader.js';
39
+ export * from './pipes-loader.js';
40
+ export * from './forge-fields-loader.js';
41
+ export * from './dbx-docs-ui-examples-loader.js';
42
+ export * from './filters-loader.js';
43
+ export * from './utils-loader.js';