@fulmenhq/tsfulmen 0.3.3 → 0.4.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.
- package/CHANGELOG.md +76 -1
- package/README.md +30 -1
- package/config/crucible-ts/taxonomy/metrics.yaml +1 -1
- package/dist/appidentity/index.js +9 -2209
- package/dist/appidentity/index.js.map +1 -1
- package/dist/assets/index.d.ts +184 -0
- package/dist/assets/index.js +4 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/bin/prometheus-cli.js +15 -9139
- package/dist/bin/prometheus-cli.js.map +1 -1
- package/dist/bin/schema-cli.js +4 -6098
- package/dist/bin/schema-cli.js.map +1 -1
- package/dist/bin/signals-cli.js +15 -1910
- package/dist/bin/signals-cli.js.map +1 -1
- package/dist/chunk-24BAF63H.js +194 -0
- package/dist/chunk-24BAF63H.js.map +1 -0
- package/dist/chunk-3HISR2XI.js +36 -0
- package/dist/chunk-3HISR2XI.js.map +1 -0
- package/dist/chunk-56F2EEAG.js +328 -0
- package/dist/chunk-56F2EEAG.js.map +1 -0
- package/dist/chunk-5HZEJGZ5.js +725 -0
- package/dist/chunk-5HZEJGZ5.js.map +1 -0
- package/dist/chunk-7YWACZEJ.js +837 -0
- package/dist/chunk-7YWACZEJ.js.map +1 -0
- package/dist/chunk-BCO3FUUO.js +682 -0
- package/dist/chunk-BCO3FUUO.js.map +1 -0
- package/dist/chunk-GOTEQYAD.js +410 -0
- package/dist/chunk-GOTEQYAD.js.map +1 -0
- package/dist/chunk-HY6JQOFN.js +32 -0
- package/dist/chunk-HY6JQOFN.js.map +1 -0
- package/dist/chunk-LMNAUTW7.js +43 -0
- package/dist/chunk-LMNAUTW7.js.map +1 -0
- package/dist/chunk-LWAH2UG7.js +103 -0
- package/dist/chunk-LWAH2UG7.js.map +1 -0
- package/dist/chunk-OHE2AOH4.js +273 -0
- package/dist/chunk-OHE2AOH4.js.map +1 -0
- package/dist/chunk-P3DNOZOG.js +1488 -0
- package/dist/chunk-P3DNOZOG.js.map +1 -0
- package/dist/chunk-PQ6TKPUN.js +27 -0
- package/dist/chunk-PQ6TKPUN.js.map +1 -0
- package/dist/chunk-QCCN6POA.js +211 -0
- package/dist/chunk-QCCN6POA.js.map +1 -0
- package/dist/chunk-QGTNV4U2.js +985 -0
- package/dist/chunk-QGTNV4U2.js.map +1 -0
- package/dist/chunk-RSLFR4TO.js +631 -0
- package/dist/chunk-RSLFR4TO.js.map +1 -0
- package/dist/chunk-SNV5WG5V.js +9412 -0
- package/dist/chunk-SNV5WG5V.js.map +1 -0
- package/dist/chunk-UP2VWCW5.js +33 -0
- package/dist/chunk-UP2VWCW5.js.map +1 -0
- package/dist/chunk-VJIGX7MH.js +208 -0
- package/dist/chunk-VJIGX7MH.js.map +1 -0
- package/dist/chunk-WCCMRVZF.js +130 -0
- package/dist/chunk-WCCMRVZF.js.map +1 -0
- package/dist/chunk-WSMVLWLB.js +269 -0
- package/dist/chunk-WSMVLWLB.js.map +1 -0
- package/dist/config/index.js +6 -1220
- package/dist/config/index.js.map +1 -1
- package/dist/crucible/fulpack/index.js +2 -25
- package/dist/crucible/fulpack/index.js.map +1 -1
- package/dist/crucible/index.js +13 -1129
- package/dist/crucible/index.js.map +1 -1
- package/dist/docscribe/index.js +2 -680
- package/dist/docscribe/index.js.map +1 -1
- package/dist/errors/index.js +5 -1831
- package/dist/errors/index.js.map +1 -1
- package/dist/errors-D7KXV3QW.js +4 -0
- package/dist/errors-D7KXV3QW.js.map +1 -0
- package/dist/errors-R7ZODJXS.js +8 -0
- package/dist/errors-R7ZODJXS.js.map +1 -0
- package/dist/export-EA3RNQNS.js +6 -0
- package/dist/export-EA3RNQNS.js.map +1 -0
- package/dist/foundry/index.js +340 -3949
- package/dist/foundry/index.js.map +1 -1
- package/dist/foundry/similarity/index.js +3 -134
- package/dist/foundry/similarity/index.js.map +1 -1
- package/dist/fulencode/index.js +3 -319
- package/dist/fulencode/index.js.map +1 -1
- package/dist/fulhash/index.js +3 -611
- package/dist/fulhash/index.js.map +1 -1
- package/dist/fulpack/index.js +3 -1515
- package/dist/fulpack/index.js.map +1 -1
- package/dist/hash-YOJYVOWH.js +4 -0
- package/dist/hash-YOJYVOWH.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -4395
- package/dist/index.js.map +1 -1
- package/dist/loader-VP2ZIC4O.js +9 -0
- package/dist/loader-VP2ZIC4O.js.map +1 -0
- package/dist/logging/index.js +2 -723
- package/dist/logging/index.js.map +1 -1
- package/dist/pathfinder/index.js +18 -2341
- package/dist/pathfinder/index.js.map +1 -1
- package/dist/prom-client-PNEBGD3G.js +4801 -0
- package/dist/prom-client-PNEBGD3G.js.map +1 -0
- package/dist/reports/license-inventory.csv +1 -1
- package/dist/schema/index.d.ts +19 -6
- package/dist/schema/index.js +4 -6148
- package/dist/schema/index.js.map +1 -1
- package/dist/signals/index.js +8 -2767
- package/dist/signals/index.js.map +1 -1
- package/dist/similarity/index.js +3 -134
- package/dist/similarity/index.js.map +1 -1
- package/dist/telemetry/http/index.js +9 -930
- package/dist/telemetry/http/index.js.map +1 -1
- package/dist/telemetry/index.js +4 -1561
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/prometheus/index.js +7 -8422
- package/dist/telemetry/prometheus/index.js.map +1 -1
- package/dist/validator-I3ASDVDB.js +6 -0
- package/dist/validator-I3ASDVDB.js.map +1 -0
- package/package.json +5 -1
- package/schemas/crucible-ts/library/module-manifest/v1.0.0/module-manifest.schema.json +1 -1
- package/schemas/crucible-ts/observability/logging/v1.0.0/definitions.schema.json +1 -1
- package/schemas/crucible-ts/observability/logging/v1.0.0/log-event.schema.json +13 -13
- package/schemas/crucible-ts/observability/logging/v1.0.0/logger-config.schema.json +2 -2
- package/schemas/crucible-ts/observability/logging/v1.0.0/logging-policy.schema.json +1 -1
- package/schemas/crucible-ts/observability/logging/v1.0.0/middleware-config.schema.json +2 -2
- package/schemas/crucible-ts/observability/logging/v1.0.0/severity-filter.schema.json +3 -3
- package/schemas/crucible-ts/upstream/3leaps/crucible/PROVENANCE.md +3 -3
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/catalog/classifiers/README.md +1 -1
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/classifiers-framework.md +1 -1
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/data-sensitivity-classification.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,81 @@ _No unreleased changes._
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
+
## [0.4.1] - 2026-06-26
|
|
18
|
+
|
|
19
|
+
> **Patch — asset-resolver security hardening + CI tooling.** Hardens the public
|
|
20
|
+
> `./assets` surface (secrev follow-ups) and fixes the goneat format gate so Markdown
|
|
21
|
+
> drift is actually caught. No API removals; behavior change is limited to rejecting
|
|
22
|
+
> inputs that were never valid assets. Engine floor unchanged (`>=22.12.0`).
|
|
23
|
+
|
|
24
|
+
### Security
|
|
25
|
+
|
|
26
|
+
- **`AssetResolver` namespace tightened to the shipped subtree** — logical paths/patterns
|
|
27
|
+
must resolve under `<namespace>/crucible-ts/` (the only subtree the package ships), not
|
|
28
|
+
just a `schemas`/`config`/`docs` top segment. Consumer `baseDir` overrides
|
|
29
|
+
(`enforceNamespace: false`) are unaffected.
|
|
30
|
+
- **`FsAssetResolver` rejects symlink escapes** — `read`/`has` now resolve symlinks
|
|
31
|
+
(`realpath`) and verify the target stays within `baseDir`, so a symlink in the asset
|
|
32
|
+
tree cannot read outside the asset root.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **CI/tooling:** `.goneat/assess.yaml` gained a `format:` block so the format gate
|
|
37
|
+
(pre-commit/pre-push hooks + `goneat assess`) actually scopes Markdown/JSON/YAML;
|
|
38
|
+
`.goneatignore` expanded to exclude the Crucible-synced SSOT trees, generated modules,
|
|
39
|
+
and fixtures; and `make fmt` no longer silently no-ops (the `$GONEAT` subshell bug).
|
|
40
|
+
This closes the gap that let Markdown formatting drift slip past the gates in v0.4.0.
|
|
41
|
+
|
|
42
|
+
## [0.4.0] - 2026-06-24
|
|
43
|
+
|
|
44
|
+
> **Minor — compile-safe SSOT asset embedding.** Makes every bundled SSOT asset
|
|
45
|
+
> (schemas, JSON-Schema metaschemas, foundry catalogs, telemetry taxonomy) resolve
|
|
46
|
+
> without the filesystem, so tsfulmen works fully inside a `bun build --compile`
|
|
47
|
+
> single-file binary — including standalone `serve`, schema discovery, and config
|
|
48
|
+
> validation. No public API removals; the new surface is additive. Engine floor
|
|
49
|
+
> unchanged (`>=22.12.0`). Full details in `docs/releases/v0.4.0.md`.
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- **`@fulmenhq/tsfulmen/assets` — `AssetResolver` layer.** Central resolution for
|
|
54
|
+
bundled SSOT assets with two backends: `FsAssetResolver` (on-disk) and
|
|
55
|
+
`EmbeddedAssetResolver` (build-embedded generated modules). `resolveAssets()` /
|
|
56
|
+
`getAssetResolver()` select via `TSFULMEN_ASSET_MODE` (`auto` | `fs` | `embedded`;
|
|
57
|
+
default `auto` — filesystem when present, embedded otherwise). Logical paths are
|
|
58
|
+
package-root-relative and validated against path traversal.
|
|
59
|
+
- **Embedded SSOT asset modules** (`src/assets/generated/`, checked in): per-domain
|
|
60
|
+
manifests (metaschema, schemas, foundry catalogs, taxonomy) so loads resolve with
|
|
61
|
+
no filesystem read in a compiled binary. Regenerated via `make embed-assets`;
|
|
62
|
+
drift-guarded by `make verify-embedded-assets` (in `check-all`).
|
|
63
|
+
- **Compile-safety guards** (CI-enforced): `verify-embedded-compile` (in-binary
|
|
64
|
+
read/enumerate **and** standalone `serve` from a temp cwd) and
|
|
65
|
+
`verify-dist-asset-partition` (public entries stay lean; corpus in exactly one
|
|
66
|
+
shared chunk; per-domain presence + size report).
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- **All SSOT asset loads now route through the `AssetResolver`** — schema registry
|
|
71
|
+
discovery, validator metaschemas/vocabulary/`compileSchemaById`/cross-tree `$ref`
|
|
72
|
+
resolution, foundry catalogs + signals catalog, and telemetry taxonomy — replacing
|
|
73
|
+
`import.meta.url`/`__dirname`-relative `readFile`. `SchemaMetadata.path` is now a
|
|
74
|
+
logical (resolver-relative) path. Fixes latent cwd/layout fragility in addition to
|
|
75
|
+
enabling compile-safety.
|
|
76
|
+
- **Build emits shared chunks** (`tsup splitting: true`): the embedded corpus is
|
|
77
|
+
deduped into one shared chunk rather than duplicated per entry, and public entry
|
|
78
|
+
files stay lean. The full `dist/` tree drops to ~3.7 MB vs ~24 MB (~1.1 MB of that
|
|
79
|
+
is JS across all entries plus one shared corpus chunk; the rest is type declarations
|
|
80
|
+
and source maps). Published `dist/` now includes `chunk-*.js` (packed automatically
|
|
81
|
+
via `files: ["dist"]`).
|
|
82
|
+
- **Synced Crucible SSOT `v0.4.14 → v0.4.15`** — fixes cross-schema `$ref`/`$id`
|
|
83
|
+
vs. file-layout inconsistencies (observability/logging `$id` version-as-directory;
|
|
84
|
+
module-manifest relative-ref correction) surfaced by the resolver repoint.
|
|
85
|
+
|
|
86
|
+
### Fixed
|
|
87
|
+
|
|
88
|
+
- **Standalone `serve`, schema discovery, and config validation work in
|
|
89
|
+
`bun build --compile` single-file binaries** — the foundry signals catalog and the
|
|
90
|
+
rest of the SSOT assets are no longer read from an absent on-disk tree.
|
|
91
|
+
|
|
17
92
|
## [0.3.3] - 2026-06-17
|
|
18
93
|
|
|
19
94
|
> **Patch — compile-safety ergonomics.** Two purely-additive API options that let `bun --compile` single-file binary consumers register a build-embedded identity and load embedded config without per-consumer workarounds — ahead of the larger v0.4.0 SSOT-asset-embedding work. No breaking changes; the existing exported `LoadConfigOptions` shape is unchanged; engine floor unchanged (`>=22.12.0`). Full details in `docs/releases/v0.3.3.md`.
|
|
@@ -43,7 +118,7 @@ _No unreleased changes._
|
|
|
43
118
|
|
|
44
119
|
### Fixed
|
|
45
120
|
|
|
46
|
-
- **CLI shadowing under `bun build --compile`** (#15) — the schema/signals/prometheus CLIs self-executed on import via
|
|
121
|
+
- **CLI shadowing under `bun build --compile`** (#15) — the schema/signals/prometheus CLIs self-executed on import via a non-compile-safe main-module guard comparing `import.meta.url` to `process.argv[1]`; under `--compile` it fired for non-entry modules, so a compiled consumer importing `@fulmenhq/tsfulmen/schema` ran `tsfulmen-schema` instead of its own program. The library modules no longer parse argv on import; executables moved to dedicated bin entries out of the importable graph.
|
|
47
122
|
- **Compiled-binary WASM `ENOENT` crash** (#14) — bump `@3leaps/string-metrics-wasm` 0.3.8 → 0.3.10, fixing the eager top-level WASM load that `--compile` rewrites but does not embed. Consumers no longer need an `overrides` entry.
|
|
48
123
|
|
|
49
124
|
### Added
|
package/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
Every team writes their own HTTP status helpers, exit code enums, and country code lookups. tsfulmen provides production-grade TypeScript implementations derived from a single source of truth—so your TypeScript/Node.js services use the same codes as your Go, Rust, and Python services.
|
|
6
6
|
|
|
7
7
|
- **Zero runtime network calls**: All catalogs embedded at build time
|
|
8
|
+
- **Compile-safe**: Schemas, foundry catalogs, and standalone metrics `serve` resolve with no filesystem, so the full SDK runs inside a `bun build --compile` single-file binary
|
|
8
9
|
- **Cross-language parity**: Same exit codes, signals, and schemas as gofulmen, rsfulmen, pyfulmen
|
|
9
10
|
- **Type-safe**: Full TypeScript types with strict mode throughout
|
|
10
11
|
|
|
11
|
-
**Lifecycle Phase**: `beta` | **Version**: 0.
|
|
12
|
+
**Lifecycle Phase**: `beta` | **Version**: 0.4.0 | **Test Coverage**: 71%
|
|
12
13
|
|
|
13
14
|
**Install**: `bun add @fulmenhq/tsfulmen` (or `npm install @fulmenhq/tsfulmen`)
|
|
14
15
|
|
|
@@ -38,6 +39,7 @@ Every team writes their own HTTP status helpers, exit code enums, and country co
|
|
|
38
39
|
- ✅ **DocScribe** - Document processing with frontmatter parsing (50+ tests)
|
|
39
40
|
- ✅ **Config Path API** - XDG-compliant configuration directory resolution (26 tests)
|
|
40
41
|
- ✅ **Schema Validation** - JSON Schema 2020-12 validation with AJV and CLI (115 tests)
|
|
42
|
+
- ✅ **Compile-Safe Assets** - SSOT schemas, foundry catalogs, and telemetry taxonomy resolve with no filesystem (`AssetResolver` + `TSFULMEN_ASSET_MODE`), so schema validation and standalone `serve` run inside a `bun --compile` single-file binary
|
|
41
43
|
- ✅ **Foundry Module** - Pattern catalogs, HTTP statuses, MIME detection, similarity (278 tests)
|
|
42
44
|
- ✅ **Exit Codes** - Standardized process exit codes with simplified modes and platform detection (34 tests)
|
|
43
45
|
- ✅ **Signal Handling** - Cross-platform signal handling with graceful shutdown and Windows fallback (180 tests)
|
|
@@ -196,6 +198,33 @@ process.chdir(repoRoot);
|
|
|
196
198
|
|
|
197
199
|
See `docs/guides/crucible-assets.md` for deeper guidance.
|
|
198
200
|
|
|
201
|
+
### Compile-Safe Assets & Single-File Binaries (v0.4.0)
|
|
202
|
+
|
|
203
|
+
tsfulmen resolves its bundled SSOT assets — JSON Schemas, metaschemas, foundry catalogs, and the telemetry taxonomy — through a single `AssetResolver` with filesystem and build-embedded backends. This makes the full SDK (schema validation, foundry catalogs, and standalone metrics `serve`) work inside a `bun build --compile` single-file binary, where no asset tree exists on disk.
|
|
204
|
+
|
|
205
|
+
```typescript
|
|
206
|
+
import { getAssetResolver } from "@fulmenhq/tsfulmen/assets";
|
|
207
|
+
|
|
208
|
+
const resolver = getAssetResolver(); // auto: filesystem when present, embedded otherwise
|
|
209
|
+
const signals = await resolver.read(
|
|
210
|
+
"config/crucible-ts/library/foundry/signals.yaml",
|
|
211
|
+
);
|
|
212
|
+
const schemas = await resolver.list(["schemas/crucible-ts/**/*.schema.json"]);
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
If you consume tsfulmen normally (npm / `node dist`), there is nothing to do — the default `auto` mode reads the on-disk asset trees. Building a compiled binary needs no special flags; the embedded modules are bundled automatically:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
bun build --compile ./your-app.ts --outfile your-app
|
|
219
|
+
./your-app serve # signals catalog + metrics server resolve from embedded assets
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Force a backend with `TSFULMEN_ASSET_MODE` (`auto` | `fs` | `embedded`) when you need to (e.g. testing the embedded path locally).
|
|
223
|
+
|
|
224
|
+
> **Operator note**: the metrics `serve` HTTP server binds `127.0.0.1` (loopback) by default. Keep loopback unless you intentionally bind publicly (`--host 0.0.0.0`), in which case front it with authentication / rate-limiting.
|
|
225
|
+
|
|
226
|
+
See [Compile-safe SSOT assets](docs/development/compile-safe-assets.md) for the full guide.
|
|
227
|
+
|
|
199
228
|
### Application Identity
|
|
200
229
|
|
|
201
230
|
Load application identity from `.fulmen/app.yaml` for vendor/app-specific configuration:
|