@fulmenhq/tsfulmen 0.3.2 → 0.4.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 (128) hide show
  1. package/CHANGELOG.md +65 -1
  2. package/README.md +30 -1
  3. package/config/crucible-ts/taxonomy/metrics.yaml +1 -1
  4. package/dist/appidentity/index.d.ts +15 -5
  5. package/dist/appidentity/index.js +9 -2204
  6. package/dist/appidentity/index.js.map +1 -1
  7. package/dist/assets/index.d.ts +179 -0
  8. package/dist/assets/index.js +4 -0
  9. package/dist/assets/index.js.map +1 -0
  10. package/dist/bin/prometheus-cli.js +15 -9134
  11. package/dist/bin/prometheus-cli.js.map +1 -1
  12. package/dist/bin/schema-cli.js +4 -6098
  13. package/dist/bin/schema-cli.js.map +1 -1
  14. package/dist/bin/signals-cli.js +15 -1910
  15. package/dist/bin/signals-cli.js.map +1 -1
  16. package/dist/chunk-3HISR2XI.js +36 -0
  17. package/dist/chunk-3HISR2XI.js.map +1 -0
  18. package/dist/chunk-5HZEJGZ5.js +725 -0
  19. package/dist/chunk-5HZEJGZ5.js.map +1 -0
  20. package/dist/chunk-7SVYOPJ3.js +9412 -0
  21. package/dist/chunk-7SVYOPJ3.js.map +1 -0
  22. package/dist/chunk-BCO3FUUO.js +682 -0
  23. package/dist/chunk-BCO3FUUO.js.map +1 -0
  24. package/dist/chunk-BJDL6JEX.js +208 -0
  25. package/dist/chunk-BJDL6JEX.js.map +1 -0
  26. package/dist/chunk-BTUS6PZZ.js +302 -0
  27. package/dist/chunk-BTUS6PZZ.js.map +1 -0
  28. package/dist/chunk-CW4CSNVF.js +410 -0
  29. package/dist/chunk-CW4CSNVF.js.map +1 -0
  30. package/dist/chunk-HIBZ2AY7.js +194 -0
  31. package/dist/chunk-HIBZ2AY7.js.map +1 -0
  32. package/dist/chunk-HS4F3BRR.js +985 -0
  33. package/dist/chunk-HS4F3BRR.js.map +1 -0
  34. package/dist/chunk-HY6JQOFN.js +32 -0
  35. package/dist/chunk-HY6JQOFN.js.map +1 -0
  36. package/dist/chunk-K2FYT43R.js +837 -0
  37. package/dist/chunk-K2FYT43R.js.map +1 -0
  38. package/dist/chunk-K7BMFGQP.js +43 -0
  39. package/dist/chunk-K7BMFGQP.js.map +1 -0
  40. package/dist/chunk-LWAH2UG7.js +103 -0
  41. package/dist/chunk-LWAH2UG7.js.map +1 -0
  42. package/dist/chunk-OHE2AOH4.js +273 -0
  43. package/dist/chunk-OHE2AOH4.js.map +1 -0
  44. package/dist/chunk-P3DNOZOG.js +1488 -0
  45. package/dist/chunk-P3DNOZOG.js.map +1 -0
  46. package/dist/chunk-PQ6TKPUN.js +27 -0
  47. package/dist/chunk-PQ6TKPUN.js.map +1 -0
  48. package/dist/chunk-QCCN6POA.js +211 -0
  49. package/dist/chunk-QCCN6POA.js.map +1 -0
  50. package/dist/chunk-RSLFR4TO.js +631 -0
  51. package/dist/chunk-RSLFR4TO.js.map +1 -0
  52. package/dist/chunk-UP2VWCW5.js +33 -0
  53. package/dist/chunk-UP2VWCW5.js.map +1 -0
  54. package/dist/chunk-W6TQFTTY.js +130 -0
  55. package/dist/chunk-W6TQFTTY.js.map +1 -0
  56. package/dist/chunk-WSMVLWLB.js +269 -0
  57. package/dist/chunk-WSMVLWLB.js.map +1 -0
  58. package/dist/config/index.d.ts +69 -11
  59. package/dist/config/index.js +24 -1227
  60. package/dist/config/index.js.map +1 -1
  61. package/dist/crucible/fulpack/index.js +2 -25
  62. package/dist/crucible/fulpack/index.js.map +1 -1
  63. package/dist/crucible/index.js +13 -1129
  64. package/dist/crucible/index.js.map +1 -1
  65. package/dist/docscribe/index.js +2 -680
  66. package/dist/docscribe/index.js.map +1 -1
  67. package/dist/errors/index.js +5 -1831
  68. package/dist/errors/index.js.map +1 -1
  69. package/dist/errors-D7KXV3QW.js +4 -0
  70. package/dist/errors-D7KXV3QW.js.map +1 -0
  71. package/dist/errors-RBJX6ETJ.js +8 -0
  72. package/dist/errors-RBJX6ETJ.js.map +1 -0
  73. package/dist/export-BWRETGYS.js +6 -0
  74. package/dist/export-BWRETGYS.js.map +1 -0
  75. package/dist/foundry/index.d.ts +1 -1
  76. package/dist/foundry/index.js +340 -3949
  77. package/dist/foundry/index.js.map +1 -1
  78. package/dist/foundry/similarity/index.js +3 -134
  79. package/dist/foundry/similarity/index.js.map +1 -1
  80. package/dist/fulencode/index.js +3 -319
  81. package/dist/fulencode/index.js.map +1 -1
  82. package/dist/fulhash/index.js +3 -611
  83. package/dist/fulhash/index.js.map +1 -1
  84. package/dist/fulpack/index.js +3 -1515
  85. package/dist/fulpack/index.js.map +1 -1
  86. package/dist/hash-YOJYVOWH.js +4 -0
  87. package/dist/hash-YOJYVOWH.js.map +1 -0
  88. package/dist/index.d.ts +2 -2
  89. package/dist/index.js +14 -4390
  90. package/dist/index.js.map +1 -1
  91. package/dist/loader-H5K7HSO5.js +9 -0
  92. package/dist/loader-H5K7HSO5.js.map +1 -0
  93. package/dist/logging/index.js +2 -723
  94. package/dist/logging/index.js.map +1 -1
  95. package/dist/pathfinder/index.js +18 -2341
  96. package/dist/pathfinder/index.js.map +1 -1
  97. package/dist/prom-client-PNEBGD3G.js +4801 -0
  98. package/dist/prom-client-PNEBGD3G.js.map +1 -0
  99. package/dist/reports/license-inventory.csv +1 -1
  100. package/dist/schema/index.d.ts +19 -6
  101. package/dist/schema/index.js +4 -6148
  102. package/dist/schema/index.js.map +1 -1
  103. package/dist/signals/index.d.ts +1 -1
  104. package/dist/signals/index.js +8 -2767
  105. package/dist/signals/index.js.map +1 -1
  106. package/dist/similarity/index.js +3 -134
  107. package/dist/similarity/index.js.map +1 -1
  108. package/dist/telemetry/http/index.js +9 -930
  109. package/dist/telemetry/http/index.js.map +1 -1
  110. package/dist/telemetry/index.js +4 -1561
  111. package/dist/telemetry/index.js.map +1 -1
  112. package/dist/telemetry/prometheus/index.js +7 -8417
  113. package/dist/telemetry/prometheus/index.js.map +1 -1
  114. package/dist/{types-Dv5TERCM.d.ts → types-CHDvDRCf.d.ts} +17 -1
  115. package/dist/validator-U4CKD2Y3.js +6 -0
  116. package/dist/validator-U4CKD2Y3.js.map +1 -0
  117. package/package.json +5 -1
  118. package/schemas/crucible-ts/library/module-manifest/v1.0.0/module-manifest.schema.json +1 -1
  119. package/schemas/crucible-ts/observability/logging/v1.0.0/definitions.schema.json +1 -1
  120. package/schemas/crucible-ts/observability/logging/v1.0.0/log-event.schema.json +13 -13
  121. package/schemas/crucible-ts/observability/logging/v1.0.0/logger-config.schema.json +2 -2
  122. package/schemas/crucible-ts/observability/logging/v1.0.0/logging-policy.schema.json +1 -1
  123. package/schemas/crucible-ts/observability/logging/v1.0.0/middleware-config.schema.json +2 -2
  124. package/schemas/crucible-ts/observability/logging/v1.0.0/severity-filter.schema.json +3 -3
  125. package/schemas/crucible-ts/upstream/3leaps/crucible/PROVENANCE.md +3 -3
  126. package/schemas/crucible-ts/upstream/3leaps/crucible/docs/catalog/classifiers/README.md +1 -1
  127. package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/classifiers-framework.md +1 -1
  128. package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/data-sensitivity-classification.md +1 -1
@@ -123,22 +123,29 @@ interface ConfigPathOptions {
123
123
  }
124
124
 
125
125
  /**
126
- * Options for loading configuration
126
+ * Fields common to all `loadConfig` call shapes (independent of how the
127
+ * defaults layer is supplied).
127
128
  */
128
- interface LoadConfigOptions {
129
+ interface BaseLoadConfigOptions {
129
130
  /**
130
131
  * Application identifier for resolving user config paths
131
132
  */
132
133
  identity: AppIdentifier;
133
134
  /**
134
- * Absolute path to the defaults configuration file
135
- * This file MUST exist
135
+ * Optional absolute path to a schema file for validation.
136
+ *
137
+ * If both `schemaPath` and inline `schema` are given, `schema` takes precedence.
136
138
  */
137
- defaultsPath: string;
139
+ schemaPath?: string;
138
140
  /**
139
- * Optional absolute path to a schema file for validation
141
+ * Inline schema content (JSON or YAML string) for validation.
142
+ *
143
+ * Provide this instead of `schemaPath` when the schema is embedded at build
144
+ * time. Note: schema validation still requires the JSON-Schema metaschema,
145
+ * which tsfulmen currently loads from disk — full in-binary config validation
146
+ * lands with the asset-embedding work (Phase 2 / v0.4.0).
140
147
  */
141
- schemaPath?: string;
148
+ schema?: string;
142
149
  /**
143
150
  * Optional environment variable prefix for overrides
144
151
  * Defaults to identity.app.env_prefix if available, otherwise identity.app upper-cased
@@ -157,14 +164,56 @@ interface LoadConfigOptions {
157
164
  */
158
165
  includeEnvVarReport?: boolean;
159
166
  }
167
+ /**
168
+ * Options for loading configuration from a defaults **file path**.
169
+ *
170
+ * This is the original, patch-stable shape: `defaultsPath` is required and
171
+ * typed `string`. For build-time embedded defaults (no file on disk), use
172
+ * {@link LoadInlineConfigOptions} instead.
173
+ */
174
+ interface LoadConfigOptions extends BaseLoadConfigOptions {
175
+ /**
176
+ * Absolute path to the defaults configuration file. This file MUST exist.
177
+ */
178
+ defaultsPath: string;
179
+ /** Mutually exclusive with {@link LoadInlineConfigOptions.defaults}. */
180
+ defaults?: never;
181
+ }
182
+ /**
183
+ * Options for loading configuration from **inline defaults** content.
184
+ *
185
+ * Provide a pre-parsed `defaults` object instead of a `defaultsPath` when the
186
+ * defaults are embedded at build time (e.g. a `bun --compile` single-file
187
+ * binary, where the defaults file is not on disk). Avoids the temp-file dance
188
+ * of writing embedded content out just to pass a path.
189
+ */
190
+ interface LoadInlineConfigOptions extends BaseLoadConfigOptions {
191
+ /**
192
+ * Inline defaults content as a pre-parsed object.
193
+ */
194
+ defaults: Record<string, unknown>;
195
+ /** Mutually exclusive with {@link LoadConfigOptions.defaultsPath}. */
196
+ defaultsPath?: never;
197
+ }
160
198
  /**
161
199
  * Metadata about the loaded configuration
162
200
  */
163
201
  interface ConfigMetadata {
164
202
  /**
165
- * Path to the defaults file used
203
+ * Path to the defaults file used.
204
+ *
205
+ * Empty string (`""`) when inline `defaults` was provided (there is no backing
206
+ * file). Path-based callers always get the path they passed — the static type
207
+ * stays `string` for patch compatibility. Use `defaultsSource` to distinguish
208
+ * the inline case unambiguously.
166
209
  */
167
210
  defaultsPath: string;
211
+ /**
212
+ * Origin of the defaults layer: a file path (`"path"`) or inline `defaults`
213
+ * content (`"inline"`). Optional/additive — present from the inline-defaults
214
+ * feature onward.
215
+ */
216
+ defaultsSource?: "path" | "inline";
168
217
  /**
169
218
  * Path to the user config file used (null if not found)
170
219
  */
@@ -190,9 +239,16 @@ interface ConfigMetadata {
190
239
  */
191
240
  schema: {
192
241
  /**
193
- * Path to the schema file used (if any)
242
+ * Path to the schema file used (null when none, or when inline `schema`
243
+ * content was provided — inline has no backing file).
194
244
  */
195
245
  path: string | null;
246
+ /**
247
+ * Origin of the schema used for validation: a file path (`"path"`) or inline
248
+ * `schema` content (`"inline"`), or `null` when no schema was provided.
249
+ * Optional/additive.
250
+ */
251
+ source?: "path" | "inline" | null;
196
252
  /**
197
253
  * Whether validation was performed
198
254
  */
@@ -214,11 +270,13 @@ interface LoadedConfig<T> {
214
270
  }
215
271
  /**
216
272
  * Load configuration using the Three-Layer pattern:
217
- * 1. Defaults (required)
273
+ * 1. Defaults (required) — from a file path ({@link LoadConfigOptions}) or
274
+ * inline content ({@link LoadInlineConfigOptions})
218
275
  * 2. User Config (optional, XDG-compliant)
219
276
  * 3. Environment Variables (optional, prefix-based)
220
277
  */
221
278
  declare function loadConfig<T>(options: LoadConfigOptions): Promise<LoadedConfig<T>>;
279
+ declare function loadConfig<T>(options: LoadInlineConfigOptions): Promise<LoadedConfig<T>>;
222
280
 
223
281
  /**
224
282
  * Config Path API - implements Fulmen Config Path Standard
@@ -277,4 +335,4 @@ declare function resolveConfigPath(filename: string, searchPaths: string[], opti
277
335
  */
278
336
  declare const VERSION = "0.1.0";
279
337
 
280
- export { type AppIdentifier, type ConfigMetadata, ConfigPathError, type ConfigPathOptions, ConfigValidationError, type EnvAliasConflict, type LoadConfigOptions, type LoadedConfig, type PlatformDirs, type ResolveEnvAliasesResult, VERSION, type XDGBaseDirs, ensureDirExists, getAppCacheDir, getAppConfigDir, getAppDataDir, getConfigSearchPaths, getFulmenCacheDir, getFulmenConfigDir, getFulmenDataDir, getXDGBaseDirs, loadConfig, resolveConfigPath, resolveEnvAliases };
338
+ export { type AppIdentifier, type BaseLoadConfigOptions, type ConfigMetadata, ConfigPathError, type ConfigPathOptions, ConfigValidationError, type EnvAliasConflict, type LoadConfigOptions, type LoadInlineConfigOptions, type LoadedConfig, type PlatformDirs, type ResolveEnvAliasesResult, VERSION, type XDGBaseDirs, ensureDirExists, getAppCacheDir, getAppConfigDir, getAppDataDir, getConfigSearchPaths, getFulmenCacheDir, getFulmenConfigDir, getFulmenDataDir, getXDGBaseDirs, loadConfig, resolveConfigPath, resolveEnvAliases };