@dereekb/dbx-cli 13.11.17 → 13.12.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.
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/src/generate-mcp-manifest/main.d.ts +26 -0
  17. package/generate-mcp-manifest/src/generate-mcp-manifest/render.d.ts +38 -0
  18. package/generated/firebase-models.generated.d.ts +3 -0
  19. package/index.cjs.js +45234 -640
  20. package/index.esm.js +44941 -643
  21. package/lint-cache/main.js +19 -19
  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 +120 -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,127 @@
1
+ /**
2
+ * Arktype schemas for the model-snapshot-fields manifest format.
3
+ *
4
+ * Manifests catalog the snapshot field factories and reusable field
5
+ * constants opted in via the `@dbxModelSnapshotField` JSDoc marker — the
6
+ * building blocks composed inside `snapshotConverterFunctions<T>({
7
+ * fields: { ... } })` to convert Firestore documents to/from app models.
8
+ * One manifest per source — bundled `@dereekb/firebase` plus any
9
+ * downstream-app manifests discovered via `dbx-mcp.config.json` — feeds
10
+ * the merged registry that powers the `dbx_model_snapshot_field_lookup`,
11
+ * `dbx_model_snapshot_field_search`, and `dbx_model_snapshot_field_list_app`
12
+ * MCP tools.
13
+ *
14
+ * Mirrors {@link UtilManifest} (`utils-schema.ts`) — both are produced by
15
+ * tag-driven scanners over plain TS exports, so the schema shapes line up
16
+ * one-to-one. The model-snapshot-field schema adds an `optional` flag for
17
+ * the `optionalFirestore*` variants.
18
+ */
19
+ /**
20
+ * Closed vocabulary describing the kind of TypeScript export a snapshot
21
+ * field is. Only `factory` (a function returning a converter config) and
22
+ * `const` (a pre-built converter constant like `firestoreModelKeyString`)
23
+ * are supported — classes and free functions don't fit the snapshot-field
24
+ * shape.
25
+ */
26
+ export declare const MODEL_SNAPSHOT_FIELD_KINDS: readonly ["factory", "const"];
27
+ /**
28
+ * Static type for the closed kind vocabulary.
29
+ */
30
+ export type ModelSnapshotFieldKindValue = (typeof MODEL_SNAPSHOT_FIELD_KINDS)[number];
31
+ /**
32
+ * One documented parameter of a factory snapshot field. Mirrors
33
+ * {@link UtilParamEntry} so the same JSDoc-`@param` extraction logic can
34
+ * be reused.
35
+ */
36
+ export declare const ModelSnapshotFieldParamEntry: import("arktype/internal/variants/object.ts").ObjectType<{
37
+ name: string;
38
+ type: string;
39
+ description: string;
40
+ optional: boolean;
41
+ }, {}>;
42
+ /**
43
+ * Static type inferred from {@link ModelSnapshotFieldParamEntry}.
44
+ */
45
+ export type ModelSnapshotFieldParamEntry = typeof ModelSnapshotFieldParamEntry.infer;
46
+ /**
47
+ * One snapshot-field entry inside a manifest. Each entry describes a
48
+ * single exported symbol used inside a `snapshotConverterFunctions` field
49
+ * map — its slug, kind, category, signature, optional/required flag, and
50
+ * the documented parameters/return.
51
+ *
52
+ * Required fields are the minimum needed for `dbx_model_snapshot_field_lookup`
53
+ * to render a useful answer; every other field is optional so the auto-
54
+ * generator can populate them progressively.
55
+ */
56
+ export declare const ModelSnapshotFieldEntry: import("arktype/internal/variants/object.ts").ObjectType<{
57
+ slug: string;
58
+ name: string;
59
+ kind: "const" | "factory";
60
+ category: string;
61
+ module: string;
62
+ subpath: string;
63
+ signature: string;
64
+ description: string;
65
+ optional: boolean;
66
+ params: {
67
+ name: string;
68
+ type: string;
69
+ description: string;
70
+ optional: boolean;
71
+ }[];
72
+ returns: string;
73
+ tags: string[];
74
+ example?: string | undefined;
75
+ relatedSlugs?: string[] | undefined;
76
+ skillRefs?: string[] | undefined;
77
+ deprecated?: string | boolean | undefined;
78
+ since?: string | undefined;
79
+ }, {}>;
80
+ /**
81
+ * Static type inferred from {@link ModelSnapshotFieldEntry}.
82
+ */
83
+ export type ModelSnapshotFieldEntry = typeof ModelSnapshotFieldEntry.infer;
84
+ /**
85
+ * Top-level manifest envelope. One file per source. The `source` field is
86
+ * the workspace-unique label used to detect collisions; `module` carries
87
+ * the npm package the entries ship in.
88
+ *
89
+ * `version` is the schema version. The loader currently accepts only
90
+ * `version: 1`; manifests with any other value are rejected (strict
91
+ * sources) or warned-and-skipped (non-strict sources).
92
+ */
93
+ export declare const ModelSnapshotFieldManifest: import("arktype/internal/variants/object.ts").ObjectType<{
94
+ version: 1;
95
+ source: string;
96
+ module: string;
97
+ generatedAt: string;
98
+ generator: string;
99
+ entries: {
100
+ slug: string;
101
+ name: string;
102
+ kind: "const" | "factory";
103
+ category: string;
104
+ module: string;
105
+ subpath: string;
106
+ signature: string;
107
+ description: string;
108
+ optional: boolean;
109
+ params: {
110
+ name: string;
111
+ type: string;
112
+ description: string;
113
+ optional: boolean;
114
+ }[];
115
+ returns: string;
116
+ tags: string[];
117
+ example?: string | undefined;
118
+ relatedSlugs?: string[] | undefined;
119
+ skillRefs?: string[] | undefined;
120
+ deprecated?: string | boolean | undefined;
121
+ since?: string | undefined;
122
+ }[];
123
+ }, {}>;
124
+ /**
125
+ * Static type inferred from {@link ModelSnapshotFieldManifest}.
126
+ */
127
+ export type ModelSnapshotFieldManifest = typeof ModelSnapshotFieldManifest.infer;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Loader for pipes 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 PipeManifest}, and merges them into a single
7
+ * lookup-ready registry.
8
+ *
9
+ * Failure handling mirrors the semantic-types and forge-fields 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 PipeEntry } from './pipes-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 PipeManifestSource = ManifestSource;
19
+ /**
20
+ * Function shape used by the loader to read manifest contents.
21
+ */
22
+ export type PipeManifestReadFile = ManifestReadFile;
23
+ /**
24
+ * Discriminated union of all non-fatal events the loader emits.
25
+ */
26
+ export type PipeLoaderWarning = ManifestLoaderWarning;
27
+ /**
28
+ * Input to {@link loadPipeManifests}.
29
+ */
30
+ export interface LoadPipeManifestsInput {
31
+ readonly sources: readonly PipeManifestSource[];
32
+ readonly readFile?: PipeManifestReadFile;
33
+ }
34
+ /**
35
+ * Result of {@link loadPipeManifests}. `entries` is the merged lookup map
36
+ * keyed by `${module}::${slug}`; `categoryIndex` is the inverted index from
37
+ * category value to entry keys (sorted alphabetically for deterministic
38
+ * output).
39
+ */
40
+ export interface LoadPipeManifestsResult {
41
+ readonly entries: ReadonlyMap<string, PipeEntry>;
42
+ readonly categoryIndex: ReadonlyMap<string, readonly string[]>;
43
+ readonly warnings: readonly PipeLoaderWarning[];
44
+ readonly loadedSources: readonly string[];
45
+ }
46
+ /**
47
+ * Loads, validates, and merges the supplied manifest sources into a single
48
+ * registry suitable for the `dbx_pipe_lookup` MCP tool.
49
+ *
50
+ * @param input - Manifest sources plus an optional injected `readFile`
51
+ * @returns Merged entries, category index, deterministic warnings, and the list of source labels that loaded.
52
+ * @throws {Error} When a strict source fails or when zero manifests load successfully.
53
+ */
54
+ export declare function loadPipeManifests(input: LoadPipeManifestsInput): Promise<LoadPipeManifestsResult>;
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Arktype schemas for the pipes manifest format.
3
+ *
4
+ * Manifests are JSON files that catalog Angular pipe classes — value pipes
5
+ * (`dollarAmount`, `cutText`, `getValue` / `getValueOnce`), the async helper
6
+ * (`asObservable`), `prettyjson`, and the date pipe family. One manifest per
7
+ * source — bundled `@dereekb/*` packages plus any downstream-app manifests
8
+ * discovered via `dbx-mcp.config.json` — feeds the merged registry that
9
+ * powers the `dbx_pipe_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
+ * Browse-friendly category grouping. Mirrors the on-disk folder layout of
18
+ * `packages/dbx-core/src/lib/pipe/` (`value/`, `date/`, `async/`, `misc/`).
19
+ */
20
+ export declare const PIPE_CATEGORIES: readonly ["value", "date", "async", "misc"];
21
+ /**
22
+ * Static type for the closed category vocabulary.
23
+ */
24
+ export type PipeCategoryValue = (typeof PIPE_CATEGORIES)[number];
25
+ /**
26
+ * Whether the pipe is `pure: true` (default — runs only when the reference
27
+ * to its inputs change) or `pure: false` (runs on every change detection).
28
+ */
29
+ export declare const PIPE_PURITIES: readonly ["pure", "impure"];
30
+ /**
31
+ * Static type for the closed purity vocabulary.
32
+ */
33
+ export type PipePurityValue = (typeof PIPE_PURITIES)[number];
34
+ /**
35
+ * One documented argument supplied to the pipe `transform()` method on top
36
+ * of the piped value (e.g. `{{ value | dollarAmount:'N/A' }}` — `'N/A'` is
37
+ * the `defaultIfNull` argument).
38
+ */
39
+ export declare const PipeArgEntry: import("arktype/internal/variants/object.ts").ObjectType<{
40
+ name: string;
41
+ type: string;
42
+ description: string;
43
+ required: boolean;
44
+ }, {}>;
45
+ /**
46
+ * Static type inferred from {@link PipeArgEntry}.
47
+ */
48
+ export type PipeArgEntry = typeof PipeArgEntry.infer;
49
+ /**
50
+ * One pipe entry inside a manifest. Each entry describes a single exported
51
+ * pipe class — its slug, category, Angular pipe name, transform signature,
52
+ * and the documented arguments.
53
+ *
54
+ * Required fields are the minimum needed for `dbx_pipe_lookup` to render a
55
+ * useful answer; every other field is optional so the auto-generator can
56
+ * populate them progressively.
57
+ */
58
+ export declare const PipeEntry: import("arktype/internal/variants/object.ts").ObjectType<{
59
+ slug: string;
60
+ category: "value" | "date" | "misc" | "async";
61
+ pipeName: string;
62
+ className: string;
63
+ module: string;
64
+ inputType: string;
65
+ outputType: string;
66
+ purity: "pure" | "impure";
67
+ description: string;
68
+ args: {
69
+ name: string;
70
+ type: string;
71
+ description: string;
72
+ required: boolean;
73
+ }[];
74
+ example: string;
75
+ relatedSlugs?: string[] | undefined;
76
+ skillRefs?: string[] | undefined;
77
+ deprecated?: string | boolean | undefined;
78
+ since?: string | undefined;
79
+ }, {}>;
80
+ /**
81
+ * Static type inferred from {@link PipeEntry}.
82
+ */
83
+ export type PipeEntry = typeof PipeEntry.infer;
84
+ /**
85
+ * Top-level manifest envelope. One file per source. The `source` field is
86
+ * the workspace-unique label used to detect collisions; `module` carries
87
+ * the npm package the entries ship in.
88
+ *
89
+ * `version` is the schema version. The loader currently accepts only
90
+ * `version: 1`; manifests with any other value are rejected (strict
91
+ * sources) or warned-and-skipped (non-strict sources).
92
+ */
93
+ export declare const PipeManifest: import("arktype/internal/variants/object.ts").ObjectType<{
94
+ version: 1;
95
+ source: string;
96
+ module: string;
97
+ generatedAt: string;
98
+ generator: string;
99
+ entries: {
100
+ slug: string;
101
+ category: "value" | "date" | "misc" | "async";
102
+ pipeName: string;
103
+ className: string;
104
+ module: string;
105
+ inputType: string;
106
+ outputType: string;
107
+ purity: "pure" | "impure";
108
+ description: string;
109
+ args: {
110
+ name: string;
111
+ type: string;
112
+ description: string;
113
+ required: boolean;
114
+ }[];
115
+ example: string;
116
+ relatedSlugs?: string[] | undefined;
117
+ skillRefs?: string[] | undefined;
118
+ deprecated?: string | boolean | undefined;
119
+ since?: string | undefined;
120
+ }[];
121
+ }, {}>;
122
+ /**
123
+ * Static type inferred from {@link PipeManifest}.
124
+ */
125
+ export type PipeManifest = typeof PipeManifest.infer;
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Arktype schemas for the semantic-types manifest format.
3
+ *
4
+ * Manifests are JSON files that catalog semantic types (`EmailAddress`,
5
+ * `Milliseconds`, `LatLngPoint`, …) from one source — either a `@dereekb/*`
6
+ * package bundled with this MCP, or a downstream-app manifest discovered via
7
+ * `dbx-mcp.config.json`. Each manifest contributes its entries to a merged,
8
+ * cross-package index that the (future) `lookup-semantic-type` and
9
+ * `search-semantic-type` MCP tools query.
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
+ * One semantic-type entry inside a manifest. Each entry describes a single
18
+ * exported TypeScript type — its definition, where it lives, what topics it
19
+ * indexes under, and the companion functions (guards, factories, converters)
20
+ * that travel with it.
21
+ *
22
+ * Required fields are the minimum needed for lookup to render a useful
23
+ * answer. Every other field is optional so the auto-generator can populate
24
+ * them progressively (e.g. fill `examples` from JSDoc `@example` blocks when
25
+ * present and skip them otherwise).
26
+ */
27
+ export declare const SemanticTypeEntry: import("arktype/internal/variants/object.ts").ObjectType<{
28
+ name: string;
29
+ package: string;
30
+ module: string;
31
+ kind: "semantic-type" | "type-alias";
32
+ definition: string;
33
+ baseType: "string" | "number" | "boolean" | "object" | "branded" | "union-literal" | "template-literal" | "other";
34
+ topics: string[];
35
+ unionValues?: string[] | undefined;
36
+ typeParameters?: string[] | undefined;
37
+ aliases?: string[] | undefined;
38
+ related?: string[] | undefined;
39
+ reExportedFrom?: {
40
+ package: string;
41
+ module: string;
42
+ }[] | undefined;
43
+ guards?: string[] | undefined;
44
+ factories?: string[] | undefined;
45
+ converters?: string[] | undefined;
46
+ examples?: {
47
+ code: string;
48
+ caption?: string | undefined;
49
+ }[] | undefined;
50
+ notes?: string | undefined;
51
+ deprecated?: string | boolean | undefined;
52
+ since?: string | undefined;
53
+ }, {}>;
54
+ /**
55
+ * Static type inferred from {@link SemanticTypeEntry}. Co-named with the const
56
+ * so callers can write `import { SemanticTypeEntry }` and use it in both
57
+ * value and type positions.
58
+ */
59
+ export type SemanticTypeEntry = typeof SemanticTypeEntry.infer;
60
+ /**
61
+ * Top-level manifest envelope. One file per source. The `source` field is
62
+ * the workspace-unique label used to detect collisions and to scope
63
+ * namespaced topics; `topicNamespace` is the prefix attached to those
64
+ * topics (e.g. `dereekb-util:duration`).
65
+ *
66
+ * `version` is the schema version. The loader currently accepts only
67
+ * `version: 1`; manifests with any other value are rejected (strict
68
+ * sources) or warned-and-skipped (non-strict sources).
69
+ */
70
+ export declare const SemanticTypeManifest: import("arktype/internal/variants/object.ts").ObjectType<{
71
+ version: 1;
72
+ source: string;
73
+ topicNamespace: string;
74
+ generatedAt: string;
75
+ generator: string;
76
+ topics: string[];
77
+ entries: {
78
+ name: string;
79
+ package: string;
80
+ module: string;
81
+ kind: "semantic-type" | "type-alias";
82
+ definition: string;
83
+ baseType: "string" | "number" | "boolean" | "object" | "branded" | "union-literal" | "template-literal" | "other";
84
+ topics: string[];
85
+ unionValues?: string[] | undefined;
86
+ typeParameters?: string[] | undefined;
87
+ aliases?: string[] | undefined;
88
+ related?: string[] | undefined;
89
+ reExportedFrom?: {
90
+ package: string;
91
+ module: string;
92
+ }[] | undefined;
93
+ guards?: string[] | undefined;
94
+ factories?: string[] | undefined;
95
+ converters?: string[] | undefined;
96
+ examples?: {
97
+ code: string;
98
+ caption?: string | undefined;
99
+ }[] | undefined;
100
+ notes?: string | undefined;
101
+ deprecated?: string | boolean | undefined;
102
+ since?: string | undefined;
103
+ }[];
104
+ }, {}>;
105
+ /**
106
+ * Static type inferred from {@link SemanticTypeManifest}.
107
+ */
108
+ export type SemanticTypeManifest = typeof SemanticTypeManifest.infer;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Loader for design-token manifests.
3
+ *
4
+ * Reads one or more manifest files (bundled `dereekb-dbx-web`,
5
+ * `angular-material-m3`, `angular-material-mdc` registries plus any
6
+ * downstream-app manifests discovered via `dbx-mcp.config.json`),
7
+ * validates them against {@link TokenManifest}, and merges them into a
8
+ * single lookup-ready registry.
9
+ *
10
+ * Like the ui-components loader, the merged-map key is built from the
11
+ * entry's own `source` field combined with `cssVariable` so the same
12
+ * variable name can appear in multiple sources without colliding.
13
+ */
14
+ import { type TokenEntry } from './tokens-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.
18
+ */
19
+ export type TokenManifestSource = ManifestSource;
20
+ /**
21
+ * Function shape used by the loader to read manifest contents.
22
+ */
23
+ export type TokenManifestReadFile = ManifestReadFile;
24
+ /**
25
+ * Discriminated union of all non-fatal events the loader emits.
26
+ */
27
+ export type TokenLoaderWarning = ManifestLoaderWarning;
28
+ /**
29
+ * Input to {@link loadTokenManifests}.
30
+ */
31
+ export interface LoadTokenManifestsInput {
32
+ readonly sources: readonly TokenManifestSource[];
33
+ readonly readFile?: TokenManifestReadFile;
34
+ }
35
+ /**
36
+ * Result of {@link loadTokenManifests}. `entries` is the merged lookup
37
+ * map keyed by `${entry.source}::${entry.cssVariable}`; `roleIndex` is
38
+ * the inverted index from role to entry keys (sorted alphabetically).
39
+ */
40
+ export interface LoadTokenManifestsResult {
41
+ readonly entries: ReadonlyMap<string, TokenEntry>;
42
+ readonly roleIndex: ReadonlyMap<string, readonly string[]>;
43
+ readonly warnings: readonly TokenLoaderWarning[];
44
+ readonly loadedSources: readonly string[];
45
+ }
46
+ /**
47
+ * Loads, validates, and merges the supplied manifest sources into a single
48
+ * registry suitable for the `dbx_css_token_lookup` and `dbx_ui_smell_check`
49
+ * MCP tools.
50
+ *
51
+ * @param input - Manifest sources plus an optional injected `readFile`
52
+ * @returns Merged entries, role index, deterministic warnings, and the list of source labels that loaded.
53
+ * @throws {Error} When a strict source fails or when zero manifests load successfully.
54
+ */
55
+ export declare function loadTokenManifests(input: LoadTokenManifestsInput): Promise<LoadTokenManifestsResult>;
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Arktype schemas for the design-token manifest format.
3
+ *
4
+ * Manifests catalog CSS custom properties (and their SCSS-side wrappers)
5
+ * exposed by `@dereekb/dbx-web`, Angular Material's `--mat-sys-*` system, the
6
+ * underlying `--mdc-*` component tokens, and any downstream-app tokens
7
+ * declared via `dbx-mcp.config.json`. Each entry advertises the canonical
8
+ * `var(--…)` reference, intent/role metadata, light/dark defaults, and (when
9
+ * relevant) the `@dereekb/dbx-web` UI primitive that already wraps the
10
+ * underlying CSS value.
11
+ *
12
+ * The merged registry feeds both `dbx_css_token_lookup` (forward — intent →
13
+ * token) and `dbx_ui_smell_check` (reverse — paste raw values → flag the
14
+ * canonical replacement).
15
+ */
16
+ /**
17
+ * High-level role for a token — drives both filtering and the heuristic
18
+ * fallback applied when the SCSS extractor finds no `///` sassdoc block.
19
+ */
20
+ export declare const TOKEN_ROLES: readonly ["color", "text-color", "surface", "spacing", "radius", "elevation", "shadow", "typography", "motion", "state-layer", "size", "breakpoint", "misc"];
21
+ /**
22
+ * Static type for the closed token-role vocabulary.
23
+ */
24
+ export type TokenRoleValue = (typeof TOKEN_ROLES)[number];
25
+ /**
26
+ * Origin of a token — used for filtering (`category=mat-sys`) and to indicate
27
+ * authoritative source. `dbx-web` aliases live alongside `mat-sys` system
28
+ * values; downstream apps surface as `app`.
29
+ */
30
+ export declare const TOKEN_SOURCES: readonly ["dbx-web", "mat-sys", "mdc", "app"];
31
+ /**
32
+ * Static type for the closed token-source vocabulary.
33
+ */
34
+ export type TokenSourceValue = (typeof TOKEN_SOURCES)[number];
35
+ /**
36
+ * Default values resolved from the source SCSS / theme partials. `light`
37
+ * and `dark` are both optional — a token might only have one mode, or the
38
+ * value might be a CSS function reference (`var(--mat-sys-…)`) that gets
39
+ * captured verbatim.
40
+ */
41
+ export declare const TokenDefaults: import("arktype/internal/variants/object.ts").ObjectType<{
42
+ light?: string | undefined;
43
+ dark?: string | undefined;
44
+ }, {}>;
45
+ /**
46
+ * Static type inferred from {@link TokenDefaults}.
47
+ */
48
+ export type TokenDefaults = typeof TokenDefaults.infer;
49
+ /**
50
+ * One token entry in a manifest. Captures everything `dbx_css_token_lookup` and
51
+ * `dbx_ui_smell_check` need to render an answer — the CSS variable, optional
52
+ * SCSS-side wrapper, role bucket, intent strings (used for fuzzy intent
53
+ * matching), light/dark defaults (used for value-distance scoring), utility
54
+ * classes, and a recommended dbx-web primitive when one wraps the underlying
55
+ * value.
56
+ */
57
+ export declare const TokenEntry: import("arktype/internal/variants/object.ts").ObjectType<{
58
+ cssVariable: string;
59
+ source: "app" | "dbx-web" | "mat-sys" | "mdc";
60
+ role: "breakpoint" | "size" | "misc" | "spacing" | "color" | "text-color" | "surface" | "radius" | "elevation" | "shadow" | "typography" | "motion" | "state-layer";
61
+ intents: string[];
62
+ description: string;
63
+ defaults: {
64
+ light?: string | undefined;
65
+ dark?: string | undefined;
66
+ };
67
+ scssVariable?: string | undefined;
68
+ antiUseNotes?: string | undefined;
69
+ utilityClasses?: string[] | undefined;
70
+ componentScope?: string | undefined;
71
+ recommendedPrimitive?: string | undefined;
72
+ seeAlso?: string[] | undefined;
73
+ }, {}>;
74
+ /**
75
+ * Static type inferred from {@link TokenEntry}.
76
+ */
77
+ export type TokenEntry = typeof TokenEntry.infer;
78
+ /**
79
+ * Top-level token manifest envelope. One file per source label
80
+ * (`dereekb-dbx-web`, `angular-material-m3`, `angular-material-mdc`,
81
+ * `<app-name>`). The loader merges these into a single registry,
82
+ * detecting source-label collisions and entry-key collisions per the
83
+ * existing `loadManifestsBase` pattern.
84
+ *
85
+ * `version` is the schema version. The loader currently accepts only
86
+ * `version: 1`; any other value is rejected (strict) or warn-and-skip
87
+ * (non-strict) per `loadManifestsBase`.
88
+ */
89
+ export declare const TokenManifest: import("arktype/internal/variants/object.ts").ObjectType<{
90
+ version: 1;
91
+ source: string;
92
+ module: string;
93
+ generatedAt: string;
94
+ generator: string;
95
+ entries: {
96
+ cssVariable: string;
97
+ source: "app" | "dbx-web" | "mat-sys" | "mdc";
98
+ role: "breakpoint" | "size" | "misc" | "spacing" | "color" | "text-color" | "surface" | "radius" | "elevation" | "shadow" | "typography" | "motion" | "state-layer";
99
+ intents: string[];
100
+ description: string;
101
+ defaults: {
102
+ light?: string | undefined;
103
+ dark?: string | undefined;
104
+ };
105
+ scssVariable?: string | undefined;
106
+ antiUseNotes?: string | undefined;
107
+ utilityClasses?: string[] | undefined;
108
+ componentScope?: string | undefined;
109
+ recommendedPrimitive?: string | undefined;
110
+ seeAlso?: string[] | undefined;
111
+ }[];
112
+ }, {}>;
113
+ /**
114
+ * Static type inferred from {@link TokenManifest}.
115
+ */
116
+ export type TokenManifest = typeof TokenManifest.infer;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Loader for ui-components 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 UiComponentManifest}, and merges them into a single
7
+ * lookup-ready registry.
8
+ *
9
+ * Unlike the other domain loaders, ui-components builds its merged-map key
10
+ * from `entry.module` rather than `manifest.module` — entries can carry a
11
+ * package label that differs from the manifest envelope's module field
12
+ * (e.g. components re-exported from sibling packages).
13
+ */
14
+ import { type UiComponentEntry } from './ui-components-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.
18
+ */
19
+ export type UiComponentManifestSource = ManifestSource;
20
+ /**
21
+ * Function shape used by the loader to read manifest contents.
22
+ */
23
+ export type UiComponentManifestReadFile = ManifestReadFile;
24
+ /**
25
+ * Discriminated union of all non-fatal events the loader emits.
26
+ */
27
+ export type UiComponentLoaderWarning = ManifestLoaderWarning;
28
+ /**
29
+ * Input to {@link loadUiComponentManifests}.
30
+ */
31
+ export interface LoadUiComponentManifestsInput {
32
+ readonly sources: readonly UiComponentManifestSource[];
33
+ readonly readFile?: UiComponentManifestReadFile;
34
+ }
35
+ /**
36
+ * Result of {@link loadUiComponentManifests}. `entries` is the merged lookup
37
+ * map keyed by `${entry.module}::${entry.slug}`; `categoryIndex` is the
38
+ * inverted index from category to entry keys (sorted alphabetically).
39
+ */
40
+ export interface LoadUiComponentManifestsResult {
41
+ readonly entries: ReadonlyMap<string, UiComponentEntry>;
42
+ readonly categoryIndex: ReadonlyMap<string, readonly string[]>;
43
+ readonly warnings: readonly UiComponentLoaderWarning[];
44
+ readonly loadedSources: readonly string[];
45
+ }
46
+ /**
47
+ * Loads, validates, and merges the supplied manifest sources into a single
48
+ * registry suitable for the `lookup-ui` / `search-ui` MCP tools.
49
+ *
50
+ * @param input - Manifest sources plus an optional injected `readFile`
51
+ * @returns Merged entries, category index, deterministic warnings, and the list of source labels that loaded.
52
+ * @throws {Error} When a strict source fails or when zero manifests load successfully.
53
+ */
54
+ export declare function loadUiComponentManifests(input: LoadUiComponentManifestsInput): Promise<LoadUiComponentManifestsResult>;