@fulmenhq/tsfulmen 0.1.6
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 +616 -0
- package/LICENSE +57 -0
- package/README.md +674 -0
- package/config/crucible-ts/README.md +38 -0
- package/config/crucible-ts/library/foundry/country-codes.yaml +29 -0
- package/config/crucible-ts/library/foundry/exit-codes.snapshot.json +351 -0
- package/config/crucible-ts/library/foundry/exit-codes.yaml +483 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/invalid-behavior.yaml +45 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/invalid-exit-code.yaml +51 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/malformed.yaml +44 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/missing-required.yaml +36 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/parity-snapshot.json +162 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/valid/complete.yaml +314 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/valid/custom-behavior.yaml +96 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/valid/minimal.yaml +55 -0
- package/config/crucible-ts/library/foundry/http-statuses.yaml +148 -0
- package/config/crucible-ts/library/foundry/mime-types.yaml +39 -0
- package/config/crucible-ts/library/foundry/patterns.yaml +185 -0
- package/config/crucible-ts/library/foundry/signals.yaml +331 -0
- package/config/crucible-ts/library/foundry/similarity-fixtures.yaml +432 -0
- package/config/crucible-ts/library/foundry/simplified-modes.snapshot.json +117 -0
- package/config/crucible-ts/library/fulhash/fixtures.yaml +160 -0
- package/config/crucible-ts/library/v1.0.0/module-manifest.yaml +179 -0
- package/config/crucible-ts/repository/app-identity/app-identity.example.yaml +42 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-binary-name.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-env-prefix.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-vendor.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/malformed-yaml.yaml +8 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/missing-required.yaml +6 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/complete.yaml +20 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/minimal.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/monorepo-api.yaml +10 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/monorepo-worker.yaml +10 -0
- package/config/crucible-ts/repository/app-identity/parity-snapshot.json +125 -0
- package/config/crucible-ts/server/management/server-management.yaml +141 -0
- package/config/crucible-ts/sync/README.md +13 -0
- package/config/crucible-ts/sync/sync-keys.yaml +74 -0
- package/config/crucible-ts/taxonomy/languages.yaml +33 -0
- package/config/crucible-ts/taxonomy/metrics.yaml +115 -0
- package/config/crucible-ts/taxonomy/repository-categories.yaml +66 -0
- package/config/crucible-ts/terminal/v1.0.0/terminal-overrides-defaults.yaml +38 -0
- package/config/crucible-ts/web/branding/site-branding.yaml +21 -0
- package/config/crucible-ts/web/styling/site-styling.yaml +104 -0
- package/dist/appidentity/index.d.ts +304 -0
- package/dist/appidentity/index.js +5519 -0
- package/dist/appidentity/index.js.map +1 -0
- package/dist/config/index.d.ts +144 -0
- package/dist/config/index.js +5752 -0
- package/dist/config/index.js.map +1 -0
- package/dist/crucible/index.d.ts +78 -0
- package/dist/crucible/index.js +6038 -0
- package/dist/crucible/index.js.map +1 -0
- package/dist/docscribe/index.d.ts +110 -0
- package/dist/docscribe/index.js +682 -0
- package/dist/docscribe/index.js.map +1 -0
- package/dist/errors/index.d.ts +150 -0
- package/dist/errors/index.js +5583 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/foundry/index.d.ts +1557 -0
- package/dist/foundry/index.js +5474 -0
- package/dist/foundry/index.js.map +1 -0
- package/dist/foundry/similarity/index.d.ts +17 -0
- package/dist/foundry/similarity/index.js +136 -0
- package/dist/foundry/similarity/index.js.map +1 -0
- package/dist/fulhash/index.d.ts +82 -0
- package/dist/fulhash/index.js +374 -0
- package/dist/fulhash/index.js.map +1 -0
- package/dist/fulmen-error-B_kX8jSC.d.ts +309 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +6197 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-JU2jYitA.d.ts +171 -0
- package/dist/logging/index.d.ts +198 -0
- package/dist/logging/index.js +578 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/pathfinder/index.d.ts +532 -0
- package/dist/pathfinder/index.js +6750 -0
- package/dist/pathfinder/index.js.map +1 -0
- package/dist/registry-x1-Qi_Tz.d.ts +349 -0
- package/dist/schema/index.d.ts +388 -0
- package/dist/schema/index.js +5522 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/suggest-CLqjLZ5L.d.ts +168 -0
- package/dist/telemetry/index.d.ts +161 -0
- package/dist/telemetry/index.js +5610 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/types-B_WtvQbS.d.ts +214 -0
- package/package.json +130 -0
- package/schemas/crucible-ts/api/http/v1.0.0/README.md +22 -0
- package/schemas/crucible-ts/api/http/v1.0.0/error-response.schema.json +54 -0
- package/schemas/crucible-ts/api/http/v1.0.0/health-response.schema.json +70 -0
- package/schemas/crucible-ts/api/http/v1.0.0/success-response.schema.json +51 -0
- package/schemas/crucible-ts/api/http/v1.0.0/version-response.schema.json +61 -0
- package/schemas/crucible-ts/ascii/v1.0.0/README.md +69 -0
- package/schemas/crucible-ts/ascii/v1.0.0/box-chars.schema.json +60 -0
- package/schemas/crucible-ts/ascii/v1.0.0/string-analysis.schema.json +45 -0
- package/schemas/crucible-ts/assessment/README.md +25 -0
- package/schemas/crucible-ts/assessment/v1.0.0/severity-definitions.schema.json +60 -0
- package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/README.md +11 -0
- package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/fulmen-config-paths.schema.json +61 -0
- package/schemas/crucible-ts/config/goneat/README.md +60 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/dates.yaml +234 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/goneat-config.yaml +344 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/lifecycle-phase.json +20 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/release-phase.json +17 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/security-policy.yaml +178 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/version-policy.schema.yaml +205 -0
- package/schemas/crucible-ts/config/repository/app-identity/v1.0.0/app-identity.schema.json +143 -0
- package/schemas/crucible-ts/config/repository/v1.0.0/lifecycle-phase.json +20 -0
- package/schemas/crucible-ts/config/repository-category/codex/v1.0.0/codex-config.schema.json +288 -0
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-adoption-status.json +60 -0
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-frontmatter.schema.json +225 -0
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-lifecycle-status.json +62 -0
- package/schemas/crucible-ts/config/sync-consumer-config.yaml +51 -0
- package/schemas/crucible-ts/config/sync-keys.schema.yaml +37 -0
- package/schemas/crucible-ts/content/README.md +19 -0
- package/schemas/crucible-ts/content/binary-embed-manifest/v1.0.0/README.md +13 -0
- package/schemas/crucible-ts/content/binary-embed-manifest/v1.0.0/binary-embed-manifest.schema.yaml +36 -0
- package/schemas/crucible-ts/content/embed-manifest/v1.1.0/README.md +13 -0
- package/schemas/crucible-ts/content/embed-manifest/v1.1.0/embed-manifest.schema.yaml +78 -0
- package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/README.md +200 -0
- package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/ssot-provenance.schema.json +128 -0
- package/schemas/crucible-ts/error-handling/v1.0.0/error-response.schema.json +75 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/country-codes.schema.json +58 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/exit-codes.schema.json +300 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/http-status-groups.schema.json +74 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/mime-types.schema.json +60 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/patterns.schema.json +97 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/signals.schema.json +457 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/similarity.schema.json +260 -0
- package/schemas/crucible-ts/library/foundry/v2.0.0/similarity.schema.json +558 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/README.md +6 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/checksum-string.schema.json +8 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/digest.schema.json +100 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/fixtures.schema.json +227 -0
- package/schemas/crucible-ts/library/module-manifest/v1.0.0/README.md +31 -0
- package/schemas/crucible-ts/library/module-manifest/v1.0.0/module-manifest.schema.json +132 -0
- package/schemas/crucible-ts/meta/README.md +23 -0
- package/schemas/crucible-ts/meta/draft-07/schema.json +245 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/applicator.json +81 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/content.json +21 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/core.json +64 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/format-annotation.json +15 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/meta-data.json +35 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/unevaluated.json +18 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/validation.json +119 -0
- package/schemas/crucible-ts/meta/draft-2020-12/schema.json +80 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/README.md +82 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/definitions.schema.json +140 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/log-event.schema.json +179 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/logger-config.schema.json +518 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/logging-policy.schema.json +225 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/middleware-config.schema.json +181 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/severity-filter.schema.json +38 -0
- package/schemas/crucible-ts/observability/metrics/v1.0.0/metrics-event.schema.json +86 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/README.md +104 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/error-response.schema.json +35 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/find-query.schema.json +49 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/finder-config.schema.json +91 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/metadata.schema.json +61 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/path-constraint.schema.json +50 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/path-result.schema.json +40 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/README.md +22 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/error-response.schema.json +54 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/health-response.schema.json +70 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/success-response.schema.json +51 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/version-response.schema.json +61 -0
- package/schemas/crucible-ts/schema-validation/v1.0.0/README.md +65 -0
- package/schemas/crucible-ts/schema-validation/v1.0.0/schema-registry.schema.json +31 -0
- package/schemas/crucible-ts/schema-validation/v1.0.0/validator-config.schema.json +36 -0
- package/schemas/crucible-ts/server/management/v1.0.0/server-management.schema.json +199 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/README.md +30 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-key.schema.json +17 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-metadata.schema.json +44 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/README.md +31 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-key.schema.json +19 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-metadata.schema.json +39 -0
- package/schemas/crucible-ts/terminal/v1.0.0/README.md +45 -0
- package/schemas/crucible-ts/terminal/v1.0.0/catalog/apple-terminal.yaml +2 -0
- package/schemas/crucible-ts/terminal/v1.0.0/catalog/ghostty.yaml +13 -0
- package/schemas/crucible-ts/terminal/v1.0.0/catalog/iterm2.yaml +13 -0
- package/schemas/crucible-ts/terminal/v1.0.0/schema.json +40 -0
- package/schemas/crucible-ts/tooling/external-tools/v1.0.0/README.md +164 -0
- package/schemas/crucible-ts/tooling/external-tools/v1.0.0/external-tools-manifest.schema.yaml +83 -0
- package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/README.md +177 -0
- package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/goneat-tools-config.schema.yaml +146 -0
- package/schemas/crucible-ts/web/branding/v1.0.0/site-branding.schema.json +79 -0
- package/schemas/crucible-ts/web/styling/v1.0.0/site-styling.schema.json +321 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## [0.1.5] - 2025-11-05
|
|
13
|
+
|
|
14
|
+
**Application Identity Module** - Complete implementation of Crucible app-identity standard v1.0.0 with discovery, caching, validation, and CLI tooling.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **App Identity Module** (`@fulmenhq/tsfulmen/appidentity`)
|
|
19
|
+
- **Core Functions**: `loadIdentity()`, `getCachedIdentity()`, `clearIdentityCache()`
|
|
20
|
+
- **Discovery Algorithm**: 3-tier precedence (explicit path → `FULMEN_APP_IDENTITY_PATH` → ancestor search)
|
|
21
|
+
- Configurable max search depth (20 ancestors default)
|
|
22
|
+
- Rich error messages with searched paths
|
|
23
|
+
- **Schema Validation**: Validates against `app-identity/v1.0.0` schema via existing registry
|
|
24
|
+
- Deep freezing for immutability (custom `deepFreeze()` utility)
|
|
25
|
+
- Optional validation bypass for test scenarios
|
|
26
|
+
- **Helper Functions**: 8 convenience accessors
|
|
27
|
+
- `getBinaryName()`, `getVendor()`, `getEnvPrefix()`, `getConfigName()`
|
|
28
|
+
- `getTelemetryNamespace()` with fallback to binary_name
|
|
29
|
+
- `getConfigIdentifiers()` returns frozen tuple for config paths
|
|
30
|
+
- `buildEnvVar()` with character normalization (`[^A-Z0-9_]` → `_`)
|
|
31
|
+
- `getEnvVar()` with default value support
|
|
32
|
+
- **Process-Level Caching**: Singleton cache with `skipCache` option
|
|
33
|
+
- **Test Injection**: `identity` parameter bypasses filesystem and validation
|
|
34
|
+
- **CLI Commands**: `identity-show` and `identity-validate`
|
|
35
|
+
- Pretty and JSON output formats
|
|
36
|
+
- Proper exit codes (0, 51, 60) per Foundry catalog
|
|
37
|
+
- **Makefile Integration**:
|
|
38
|
+
- `make validate-app-identity` - Quick validation
|
|
39
|
+
- `make verify-app-identity-parity` - Cross-language parity check
|
|
40
|
+
- **Parity Verification**: `scripts/verify-app-identity.ts` validates against Crucible snapshot
|
|
41
|
+
- 9 test cases (4 valid + 5 invalid)
|
|
42
|
+
- Stricter error type matching (fails on type mismatch)
|
|
43
|
+
- **Comprehensive Testing**: 93 test cases, 96.09% line coverage
|
|
44
|
+
- Type inference, discovery precedence, caching behavior
|
|
45
|
+
- Schema validation, error handling, CLI exit codes
|
|
46
|
+
- All fixtures from Crucible v0.2.4
|
|
47
|
+
|
|
48
|
+
- **Signal Handling Module** (`@fulmenhq/tsfulmen/foundry/signals`)
|
|
49
|
+
- **Signal Catalog**: Load and query Crucible's canonical signal definitions (POSIX + Windows)
|
|
50
|
+
- `getSignalsVersion()`, `listSignals()`, `getSignal()`, `listBehaviors()`, `getBehavior()`
|
|
51
|
+
- Full behavior metadata (exit codes, default actions, retry hints, OS mappings)
|
|
52
|
+
- **Platform Capabilities**: Runtime detection and guards
|
|
53
|
+
- `isPOSIX()`, `isWindows()`, `supportsSignal()`, `supportsSignalExitCodes()`
|
|
54
|
+
- `ensureSupported()`, `ensurePOSIX()`, `ensureWindows()` with actionable errors
|
|
55
|
+
- **Signal Manager**: Registration and lifecycle management
|
|
56
|
+
- `createSignalManager()` with FIFO execution, priority overrides, timeout enforcement (30s default)
|
|
57
|
+
- `register()`, `unregister()`, `trigger()`, `shutdown()`, `isRegistered()`
|
|
58
|
+
- Comprehensive logging and telemetry (`fulmen.signal.*` events)
|
|
59
|
+
- **Windows Fallback**: Structured guidance for unsupported signals
|
|
60
|
+
- `handleWindowsFallback()` logs at INFO, emits telemetry, returns no-op registration
|
|
61
|
+
- `getHttpFallbackGuidance()` provides HTTP endpoint scaffolding instructions
|
|
62
|
+
- **Double-Tap Logic**: Ctrl+C debounce with configurable window (2s default)
|
|
63
|
+
- `createDoubleTapTracker()`, `handleDoubleTap()`, immediate exit on second tap (exit 130)
|
|
64
|
+
- **Convenience Wrappers**: Common signal patterns
|
|
65
|
+
- `onShutdown()` (SIGTERM/SIGINT), `onReload()` (SIGHUP), `onUSR1()`, `onUSR2()`
|
|
66
|
+
- `onEmergencyQuit()` (SIGQUIT), `onAnyShutdown()` (all shutdown signals)
|
|
67
|
+
- **Config Reload Helper**: Schema-validated configuration reloading
|
|
68
|
+
- `createConfigReloadHandler()` validates via TSFulmen schema module before restart
|
|
69
|
+
- `ConfigReloadTracker` tracks reload attempts, successes, failures
|
|
70
|
+
- **HTTP Endpoint Helper**: Framework-agnostic signal triggering via HTTP
|
|
71
|
+
- `createSignalEndpoint()` - POST /admin/signal handler with auth/rate-limiting hooks
|
|
72
|
+
- `createBearerTokenAuth()`, `createSimpleRateLimiter()` - production-ready examples
|
|
73
|
+
- Platform-aware: serves Windows deployments, enhances POSIX observability
|
|
74
|
+
- **Comprehensive Testing**: 180 test cases covering all modules
|
|
75
|
+
- Parity tests against Crucible fixtures and snapshot
|
|
76
|
+
- Unit tests for manager, timeout, priority, double-tap, platform detection
|
|
77
|
+
- Integration tests for config reload, HTTP helper, concurrency
|
|
78
|
+
|
|
79
|
+
### Changed
|
|
80
|
+
|
|
81
|
+
- **buildEnvVar**: Now normalizes invalid characters (hyphens, dots, etc.) to underscores
|
|
82
|
+
- **Exit Codes**: Fixed SIGUSR1/SIGUSR2 codes to use BSD values (159/160) for platform consistency
|
|
83
|
+
- Examples:
|
|
84
|
+
- `'database-url'` → `'MYAPP_DATABASE_URL'`
|
|
85
|
+
- `'my.config'` → `'MYAPP_MY_CONFIG'`
|
|
86
|
+
- **CLI Entry Point**: Added main execution block to `src/schema/cli.ts`
|
|
87
|
+
- **Version**: Bumped to 0.1.5 across all metadata
|
|
88
|
+
|
|
89
|
+
### Performance
|
|
90
|
+
|
|
91
|
+
- **FulHash Small Input Optimization** (22x faster)
|
|
92
|
+
- One-shot XXH3-128 operations now use cached `xxhash128()` helper from hash-wasm
|
|
93
|
+
- Small input performance: 0.132ms → 0.006ms per operation (182,265 ops/sec)
|
|
94
|
+
- XXH3-128 now correctly outperforms SHA-256 for all input sizes
|
|
95
|
+
- Large input throughput maintained (>4 GB/s)
|
|
96
|
+
- Streaming API consistency improved (variance reduced from ±97% to ±5%)
|
|
97
|
+
- See `.plans/active/v0.1.5/fulhash-performance-comparison.md` for detailed benchmarks
|
|
98
|
+
|
|
99
|
+
### Documentation
|
|
100
|
+
|
|
101
|
+
- **README.md**: Added Application Identity section with usage examples
|
|
102
|
+
- **docs/tsfulmen_overview.md**: Updated module catalog with app-identity entry
|
|
103
|
+
- **docs/crucible-ts/guides/consuming-crucible-assets.md**: Added identity integration examples
|
|
104
|
+
- **AGENTS.md**: Added caveat about `bun test` vs `bun run test`
|
|
105
|
+
|
|
106
|
+
### Dependencies
|
|
107
|
+
|
|
108
|
+
- Synced with Crucible v0.2.4 app-identity schema and fixtures
|
|
109
|
+
- No new external dependencies
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## [0.1.3] - 2025-11-01
|
|
114
|
+
|
|
115
|
+
**Foundry Similarity v2.0.0** - Major upgrade to similarity module with multiple distance metrics, normalization presets, WASM-backed performance, and Turkish locale support.
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
- **Similarity v2.0.0**: Complete implementation of Crucible Foundry Similarity Standard v2.0.0
|
|
120
|
+
- **Multiple Metrics**: Five distance/similarity algorithms
|
|
121
|
+
- Levenshtein distance (Wagner-Fischer)
|
|
122
|
+
- Damerau-Levenshtein OSA (Optimal String Alignment)
|
|
123
|
+
- Damerau-Levenshtein unrestricted (true Damerau)
|
|
124
|
+
- Jaro-Winkler similarity with prefix scaling
|
|
125
|
+
- Longest common substring (LCS)
|
|
126
|
+
- **Normalization Presets**: Four standardized text normalization levels
|
|
127
|
+
- `none`: No transformation
|
|
128
|
+
- `minimal`: NFC + trim
|
|
129
|
+
- `default`: NFC + casefold + trim
|
|
130
|
+
- `aggressive`: NFKD + casefold + strip accents + remove punctuation
|
|
131
|
+
- **Turkish Locale Support**: Proper İ/i handling via `@3leaps/string-metrics-wasm` v0.3.8
|
|
132
|
+
- **Rich Suggestion API**: Enhanced metadata in suggestion results
|
|
133
|
+
- `matchedRange`: Character positions for substring matches
|
|
134
|
+
- `reason`: Score explanation strings
|
|
135
|
+
- `normalizedValue`: Post-normalization text
|
|
136
|
+
- **WASM Performance**: 4x faster than pure TypeScript implementation
|
|
137
|
+
- Levenshtein: 0.0028ms avg (was 0.059ms)
|
|
138
|
+
- Score: 0.0022ms avg (was 0.058ms)
|
|
139
|
+
- <1ms p95 target exceeded: 0.004ms p95
|
|
140
|
+
- **Comprehensive Testing**: 143 tests including fixture-driven validation
|
|
141
|
+
- 76 fixture tests against Crucible v2.0.0 standard
|
|
142
|
+
- 67 unit and integration tests
|
|
143
|
+
- Build artifacts test prevents WASM bundling
|
|
144
|
+
|
|
145
|
+
### Changed
|
|
146
|
+
|
|
147
|
+
- **Similarity API**: Metric parameter added to distance/score functions
|
|
148
|
+
- `distance(a, b, metric?)` - specify algorithm
|
|
149
|
+
- `score(a, b, metric?)` - normalized similarity with metric selection
|
|
150
|
+
- Backward compatible: defaults to `"levenshtein"`
|
|
151
|
+
- **Normalization API**: Preset-based interface with backward compatibility
|
|
152
|
+
- `normalize(value, preset?, locale?)` - preset string parameter
|
|
153
|
+
- Legacy `normalize(value, options)` still supported
|
|
154
|
+
- Enhanced with locale parameter for Turkish/Lithuanian/Azeri
|
|
155
|
+
- **Suggestion Options**: Extended with v2 parameters
|
|
156
|
+
- `metric`: Algorithm selection
|
|
157
|
+
- `normalizePreset`: Preset-based normalization
|
|
158
|
+
- `preferPrefix`: Jaro-Winkler prefix boost
|
|
159
|
+
- Legacy `normalize` boolean still supported
|
|
160
|
+
|
|
161
|
+
### Dependencies
|
|
162
|
+
|
|
163
|
+
- Added `@3leaps/string-metrics-wasm` v0.3.8 (WASM-backed algorithms)
|
|
164
|
+
- Upgraded normalization to support locale-aware casefolding
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
- Turkish dotted İ now correctly normalized to lowercase i with `locale: "tr"`
|
|
169
|
+
- Build artifacts test prevents accidental WASM bundling (tsup externalization verified)
|
|
170
|
+
|
|
171
|
+
### Documentation
|
|
172
|
+
|
|
173
|
+
- Updated `src/foundry/similarity/README.md` with v2 API documentation
|
|
174
|
+
- Migration guide for v1 to v2 upgrade
|
|
175
|
+
- Performance benchmarks and Unicode support details
|
|
176
|
+
- Turkish locale support memo in `.plans/memos/`
|
|
177
|
+
|
|
178
|
+
### Added
|
|
179
|
+
|
|
180
|
+
- **Pathfinder Module**: Enterprise filesystem traversal with observability and checksums
|
|
181
|
+
- **Core Traversal**: Recursive directory scanning with glob pattern matching
|
|
182
|
+
- `includePatterns` and `excludePatterns` for flexible file selection
|
|
183
|
+
- `maxDepth` control for traversal depth limiting
|
|
184
|
+
- `followSymlinks` and `includeHidden` for advanced filesystem access
|
|
185
|
+
- Streaming results via `findIterable()` for memory-efficient large directory processing
|
|
186
|
+
- **Ignore File Support**: `.fulmenignore` and `.gitignore` with nested precedence
|
|
187
|
+
- Hierarchical ignore pattern loading from directory tree
|
|
188
|
+
- Child directory patterns override parent directory rules
|
|
189
|
+
- Configurable via `honorIgnoreFiles: boolean`
|
|
190
|
+
- **FulHash Integration**: Optional streaming checksum calculation
|
|
191
|
+
- Algorithms: `xxh3-128` (default) and `sha256` support
|
|
192
|
+
- Streaming implementation prevents memory exhaustion on large files
|
|
193
|
+
- Checksum errors handled gracefully with error metadata preservation
|
|
194
|
+
- `<10% performance overhead` verified via benchmarks
|
|
195
|
+
- **Path Constraints**: Security-focused path validation with enforcement levels
|
|
196
|
+
- `EnforcementLevel.STRICT`: Reject violations with FulmenError
|
|
197
|
+
- `EnforcementLevel.WARN`: Log warnings and continue operation
|
|
198
|
+
- `EnforcementLevel.PERMISSIVE`: No enforcement (default)
|
|
199
|
+
- Path traversal attack prevention with root boundary enforcement
|
|
200
|
+
- `allowedPrefixes` and `forbiddenPatterns` for fine-grained control
|
|
201
|
+
- **Enterprise Observability**: Full integration with TSFulmen infrastructure
|
|
202
|
+
- Structured `FulmenError` with correlation IDs and severity levels
|
|
203
|
+
- Telemetry metrics: `pathfinder_find_ms`, `pathfinder_security_warnings`
|
|
204
|
+
- Progressive logging integration with policy-driven profiles
|
|
205
|
+
- Schema validation via existing TSFulmen schema module
|
|
206
|
+
- **Convenience Helpers**: Pre-configured finders for common use cases
|
|
207
|
+
- `findConfigFiles()`: Discover YAML/JSON configuration files
|
|
208
|
+
- `findSchemaFiles()`: Find `.schema.json` and `.schema.yaml` files
|
|
209
|
+
- `findByExtensions()`: Generic extension-based file discovery
|
|
210
|
+
- **Cross-Platform Support**: Linux, macOS, Windows compatibility
|
|
211
|
+
- Path normalization and separator handling
|
|
212
|
+
- Symlink resolution consistent across platforms
|
|
213
|
+
- Windows-specific path length and character constraints
|
|
214
|
+
- **Comprehensive Testing**: 44 tests with 111 assertions
|
|
215
|
+
- Unit tests for all core functionality
|
|
216
|
+
- Integration tests with real filesystem operations
|
|
217
|
+
- Cross-platform fixture validation
|
|
218
|
+
- Performance benchmark verification
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## [0.1.2] - 2025-10-25
|
|
223
|
+
|
|
224
|
+
**Error Handling, Telemetry, and Core Utilities** - Comprehensive error handling with FulmenError, telemetry instrumentation across modules, FulHash for integrity verification, Similarity utilities, DocScribe for document processing, Progressive Logging, and complete Crucible Shim.
|
|
225
|
+
|
|
226
|
+
### Added
|
|
227
|
+
|
|
228
|
+
- **Error Handling Module**: Schema-backed error handling with FulmenError
|
|
229
|
+
- `FulmenError` class with immutable data structure and schema validation
|
|
230
|
+
- Static constructors: `fromError()`, `wrap()`, `fromData()`
|
|
231
|
+
- Schema-compliant JSON serialization via `toJSON()`
|
|
232
|
+
- Correlation ID support for distributed tracing
|
|
233
|
+
- Severity levels with numeric mapping (critical: 1000, high: 750, medium: 500, low: 250, info: 100)
|
|
234
|
+
- Exit code guidance for CLI applications
|
|
235
|
+
- Context preservation from wrapped errors
|
|
236
|
+
- Type guards: `isFulmenError()`, `isFulmenErrorData()`
|
|
237
|
+
- Validator integration for schema compliance checking
|
|
238
|
+
- 43 tests covering construction, wrapping, serialization, and validation
|
|
239
|
+
|
|
240
|
+
- **Telemetry Module**: Metrics collection and aggregation with OTLP export support
|
|
241
|
+
- **Counter**: Monotonically increasing values (`inc()`)
|
|
242
|
+
- **Gauge**: Arbitrary point-in-time values (`set()`, `inc()`, `dec()`)
|
|
243
|
+
- **Histogram**: Distribution tracking with automatic bucketing
|
|
244
|
+
- ADR-0007 compliant buckets for `_ms` metrics: [1, 5, 10, 50, 100, 500, 1000, 5000, 10000]
|
|
245
|
+
- Percentile calculations (p50, p95, p99)
|
|
246
|
+
- Count, sum, min, max aggregations
|
|
247
|
+
- **Global Registry**: Singleton registry accessible via `metrics.counter()`, `metrics.gauge()`, `metrics.histogram()`
|
|
248
|
+
- **Export Formats**: OTLP-compatible JSON with RFC3339 timestamps
|
|
249
|
+
- **Taxonomy Integration**: Loads metric definitions from `config/crucible-ts/taxonomy/metrics.yaml`
|
|
250
|
+
- **Lifecycle Management**: `export()`, `flush()`, `clear()` for metric lifecycle
|
|
251
|
+
- **Type Safety**: Full TypeScript types for all metric operations
|
|
252
|
+
- 85 tests covering counters, gauges, histograms, registry, and taxonomy
|
|
253
|
+
|
|
254
|
+
- **Telemetry Instrumentation**: Observability across config, schema, and crucible modules
|
|
255
|
+
- **Config Module Metrics**:
|
|
256
|
+
- `config_load_ms` histogram - Directory/file operation timing
|
|
257
|
+
- `config_load_errors` counter - Failed operations
|
|
258
|
+
- Instrumented: `ensureDirExists()`, `resolveConfigPath()`
|
|
259
|
+
- 7 telemetry integration tests
|
|
260
|
+
- **Schema Module Metrics**:
|
|
261
|
+
- `schema_validations` counter - Successful validations
|
|
262
|
+
- `schema_validation_errors` counter - Failed validations
|
|
263
|
+
- Instrumented: `validateData()`, `compileSchemaById()`, `validateDataBySchemaId()`, `validateFileBySchemaId()`
|
|
264
|
+
- 9 telemetry integration tests
|
|
265
|
+
- **Crucible Module Metrics**:
|
|
266
|
+
- `foundry_lookup_count` counter - Successful asset loads
|
|
267
|
+
- Instrumented: `loadSchemaById()`, `getDocumentation()`, `getConfigDefaults()`
|
|
268
|
+
- 8 telemetry integration tests
|
|
269
|
+
- **Zero Breaking Changes**: All error types unchanged, telemetry is transparent observation layer
|
|
270
|
+
- **Taxonomy Compliance**: All metrics defined in Crucible taxonomy
|
|
271
|
+
- 24 total telemetry tests, all existing tests pass
|
|
272
|
+
|
|
273
|
+
- **FulHash Module**: Fast, cross-language compatible hashing for integrity verification and checksums
|
|
274
|
+
- **Block Hashing API**: One-shot hashing for in-memory data
|
|
275
|
+
- `hash()` - Hash strings or byte arrays with configurable algorithm
|
|
276
|
+
- `hashString()` - Convenience wrapper for string inputs
|
|
277
|
+
- `hashBytes()` - Convenience wrapper for Uint8Array inputs
|
|
278
|
+
- Async API supporting both SHA-256 and XXH3-128
|
|
279
|
+
- Default algorithm: XXH3-128 (7.5 GB/s throughput, non-cryptographic)
|
|
280
|
+
- SHA-256 option for cryptographic integrity (2.4 GB/s throughput)
|
|
281
|
+
- **Streaming API**: Incremental hashing for large files without memory pressure
|
|
282
|
+
- `createStreamHasher()` - Factory for streaming hash operations
|
|
283
|
+
- `update()` - Chainable method for incremental data feeding
|
|
284
|
+
- `digest()` - Finalize and return hash digest
|
|
285
|
+
- `reset()` - Reuse hasher for multiple operations
|
|
286
|
+
- State management preventing incorrect usage patterns
|
|
287
|
+
- Concurrency-safe with factory pattern (each hasher owns WASM instance)
|
|
288
|
+
- **Digest Operations**: Parse, verify, and compare hash checksums
|
|
289
|
+
- `Digest.parse()` - Parse formatted checksums (`algorithm:hex`)
|
|
290
|
+
- `Digest.verify()` - Verify data against checksum
|
|
291
|
+
- `digest.equals()` - Compare digests for equality
|
|
292
|
+
- `digest.formatted` - Standard `algorithm:hex` format
|
|
293
|
+
- Immutable digest objects with defensive copying
|
|
294
|
+
- **Cross-Language Compatibility**: Matches gofulmen/pyfulmen implementations
|
|
295
|
+
- Standard checksum format: `algorithm:lowercase-hex`
|
|
296
|
+
- Shared fixture validation (12 fixtures: 6 hash, 4 format, 2 error)
|
|
297
|
+
- Consistent error naming across ecosystem
|
|
298
|
+
- **High Performance**: Exceeds standard targets by 7-24x
|
|
299
|
+
- XXH3-128: 7.5 GB/s on 100MB (target: 1 GB/s)
|
|
300
|
+
- SHA-256: 2.4 GB/s on 100MB (target: 100 MB/s)
|
|
301
|
+
- Streaming overhead: -33% (faster than block hashing!)
|
|
302
|
+
- Small string hashing: <0.5ms per operation (10K ops)
|
|
303
|
+
- Concurrent hashing: 1 GB/s aggregate throughput (100 ops)
|
|
304
|
+
- **Concurrency Safety**: Factory pattern prevents race conditions
|
|
305
|
+
- Each hash operation gets fresh WASM instance
|
|
306
|
+
- No shared state between concurrent operations
|
|
307
|
+
- Deterministic results under high concurrency
|
|
308
|
+
- Stream hashers maintain independent state
|
|
309
|
+
- **Error Handling**: Clear, actionable error messages
|
|
310
|
+
- `UnsupportedAlgorithmError` - Lists supported algorithms
|
|
311
|
+
- `InvalidChecksumFormatError` - Describes expected format
|
|
312
|
+
- `InvalidChecksumError` - Explains validation failure
|
|
313
|
+
- `DigestStateError` - Prevents incorrect hasher reuse
|
|
314
|
+
- All errors extend `FulHashError` base class
|
|
315
|
+
- **Package Exports**: Added `@fulmenhq/tsfulmen/fulhash` subpath
|
|
316
|
+
- **Comprehensive Testing**: 157 tests across 11 test suites
|
|
317
|
+
- Block hashing: 21 tests (SHA-256, XXH3-128, fixtures)
|
|
318
|
+
- Streaming API: 20 tests (state management, reset, chaining)
|
|
319
|
+
- Digest operations: 30 tests (parse, verify, compare, format)
|
|
320
|
+
- Concurrency safety: 17 tests (race conditions, isolation)
|
|
321
|
+
- Integration examples: 17 tests (real-world usage patterns)
|
|
322
|
+
- Performance benchmarks: 10 tests (throughput, overhead)
|
|
323
|
+
- Fixture validation: 12 tests (cross-language parity)
|
|
324
|
+
- Error handling: 15 tests (all error conditions)
|
|
325
|
+
- Type contracts: 15 tests (TypeScript interface validation)
|
|
326
|
+
- **Documentation**: Complete API reference in `src/fulhash/README.md`
|
|
327
|
+
- Quick start examples
|
|
328
|
+
- Block and streaming usage patterns
|
|
329
|
+
- Checksum validation workflows
|
|
330
|
+
- Performance characteristics
|
|
331
|
+
- Security considerations (crypto vs non-crypto)
|
|
332
|
+
- Error handling guide
|
|
333
|
+
- Cross-language compatibility notes
|
|
334
|
+
- **Type Safety**: Full TypeScript strict mode with exported types
|
|
335
|
+
- `Algorithm` enum (SHA256, XXH3_128)
|
|
336
|
+
- `Digest` interface (immutable hash result)
|
|
337
|
+
- `HashOptions` interface (algorithm, encoding)
|
|
338
|
+
- `StreamHasher` interface (update, digest, reset)
|
|
339
|
+
- `StreamHasherOptions` interface (algorithm configuration)
|
|
340
|
+
|
|
341
|
+
- **Foundry Similarity Module**: Text similarity and normalization utilities implementing Crucible 2025.10.2 standard
|
|
342
|
+
- **Levenshtein Distance**: Wagner-Fischer algorithm with O(min(m,n)) space complexity
|
|
343
|
+
- `distance()` - Calculate edit distance between strings
|
|
344
|
+
- Grapheme cluster support via spread operator
|
|
345
|
+
- Handles Unicode, emoji, combining marks correctly
|
|
346
|
+
- **Similarity Scoring**: Normalized 0.0-1.0 similarity scores
|
|
347
|
+
- `score()` - Calculate normalized similarity (1 - distance/maxLen)
|
|
348
|
+
- Empty string handling (returns 1.0 for identical empty strings)
|
|
349
|
+
- **Unicode Normalization**: Text normalization with configurable options
|
|
350
|
+
- `normalize()` - Trim, case folding, optional accent stripping
|
|
351
|
+
- `casefold()` - Unicode-aware lowercase with locale support
|
|
352
|
+
- `stripAccents()` - NFD decomposition + combining mark removal
|
|
353
|
+
- `equalsIgnoreCase()` - Normalized string comparison
|
|
354
|
+
- Turkish locale support (dotted/dotless i handling)
|
|
355
|
+
- **Suggestion API**: Ranked suggestions with configurable thresholds
|
|
356
|
+
- `suggest()` - Get ranked suggestions with score filtering
|
|
357
|
+
- Configurable minScore (default: 0.6), maxSuggestions (default: 3)
|
|
358
|
+
- Optional normalization (default: true)
|
|
359
|
+
- Score-based sorting with alphabetical tie-breaking
|
|
360
|
+
- **High Performance**: <0.1ms p95 latency for 128-character strings (11x faster than <1ms target)
|
|
361
|
+
- **Package Exports**: Added `@fulmenhq/tsfulmen/foundry` and `@fulmenhq/tsfulmen/foundry/similarity` subpaths
|
|
362
|
+
- **Comprehensive Testing**: 127 tests with fixture-driven validation
|
|
363
|
+
- **Type Safety**: Full TypeScript strict mode with exported types (Suggestion, SuggestOptions, NormalizeOptions)
|
|
364
|
+
- **Documentation**: Complete API reference in `src/foundry/similarity/README.md`
|
|
365
|
+
|
|
366
|
+
- **Progressive Logging Module**: Policy-based logging with profile support (Phase 2 complete)
|
|
367
|
+
- **Logging Profiles**: Simple, Standard, Detailed, Audit with automatic policy enforcement
|
|
368
|
+
- **Policy Engine**: Enforces allowed fields, metadata, and severity levels per profile
|
|
369
|
+
- **Pino Integration**: High-performance structured logging with 9.5.0
|
|
370
|
+
- **Middleware System**: Transform events before emission
|
|
371
|
+
- **Type Safety**: Full TypeScript types with discriminated unions
|
|
372
|
+
- **Package Exports**: Added `@fulmenhq/tsfulmen/logging` subpath
|
|
373
|
+
- **Comprehensive Testing**: 83 tests across 6 test suites
|
|
374
|
+
- **Documentation**: Complete API reference in `src/logging/README.md`
|
|
375
|
+
|
|
376
|
+
- **Crucible Shim Module**: Complete implementation (Phases 1-4)
|
|
377
|
+
- **Asset Discovery**: Fast discovery across schemas, docs, config with glob-based filtering
|
|
378
|
+
- **Schema Access**: `listSchemas()`, `loadSchemaById()` with kind filtering (api, config, meta, etc.)
|
|
379
|
+
- **Documentation Access**: `listDocumentation()`, `getDocumentation()` with metadata extraction
|
|
380
|
+
- **Config Defaults**: `listConfigDefaults()`, `getConfigDefaults()` with version matching
|
|
381
|
+
- **Version Parsing**: Intelligent version extraction from asset IDs
|
|
382
|
+
- **Normalization**: Asset ID to path conversion with category awareness
|
|
383
|
+
- **Error Handling**: AssetNotFoundError with similarity-based suggestions (3 suggestions, 60% threshold)
|
|
384
|
+
- **Performance**: <250ms full discovery, <5ms individual category discovery
|
|
385
|
+
- **Type Safety**: Full TypeScript types for all asset categories
|
|
386
|
+
- **Comprehensive Testing**: 96 tests including integration and performance benchmarks
|
|
387
|
+
|
|
388
|
+
- **DocScribe Module**: Complete document processing pipeline
|
|
389
|
+
- **Format Detection**: Identifies markdown, YAML, JSON, TOML, YAML-stream, and plain text
|
|
390
|
+
- Magic number detection (JSON: `{`/`[`, YAML: `---`)
|
|
391
|
+
- Heuristic analysis for ambiguous formats
|
|
392
|
+
- Frontmatter-aware (distinguishes markdown with YAML from pure YAML)
|
|
393
|
+
- YAML stream detection (multiple `---` separators)
|
|
394
|
+
- **Frontmatter Processing**: YAML frontmatter parsing with schema awareness
|
|
395
|
+
- `parseFrontmatter()` - Extract metadata and body with line tracking
|
|
396
|
+
- `stripFrontmatter()` - Remove frontmatter, return body only
|
|
397
|
+
- `extractMetadata()` - Metadata extraction only
|
|
398
|
+
- Schema-aware normalization (title, author, date, tags, version, etc.)
|
|
399
|
+
- Error handling with line/column position information
|
|
400
|
+
- Handles empty frontmatter gracefully
|
|
401
|
+
- **Header Extraction**: Markdown header parsing with slug generation
|
|
402
|
+
- `extractHeaders()` - Extract all headers with level, text, slug, line number
|
|
403
|
+
- ATX-style headers (`# Header`) with configurable depth limit
|
|
404
|
+
- Customizable slugification function
|
|
405
|
+
- Line number tracking for each header
|
|
406
|
+
- **Document Splitting**: Multi-document splitting for YAML streams and markdown
|
|
407
|
+
- `splitDocuments()` - Split content into individual documents
|
|
408
|
+
- YAML stream support (multiple `---` separators)
|
|
409
|
+
- Markdown splitting with heuristic detection
|
|
410
|
+
- Fence-aware (respects code blocks: ```/~~~)
|
|
411
|
+
- Configurable document limit with automatic merging
|
|
412
|
+
- Line range tracking for each split
|
|
413
|
+
- **Document Inspection**: Comprehensive document analysis
|
|
414
|
+
- `inspectDocument()` - Full document metadata, format, headers, sections
|
|
415
|
+
- Returns format, frontmatter status, metadata, header count, line count, size
|
|
416
|
+
- Estimated section count based on headers
|
|
417
|
+
- **Polymorphic Input**: Accepts `string | Uint8Array | ArrayBufferLike`
|
|
418
|
+
- UTF-8 decoding with TextDecoder
|
|
419
|
+
- Consistent normalization via `normalizeInput()`
|
|
420
|
+
- **Type Safety**: Readonly types, discriminated unions, comprehensive error hierarchy
|
|
421
|
+
- **Test Coverage**: 4 test suites with fixtures (frontmatter, format, headers, split)
|
|
422
|
+
|
|
423
|
+
- **Updated SSOT Dependencies**: Synced artifacts from Crucible
|
|
424
|
+
- New schemas: `error-handling/v1.0.0/error-response.schema.json`
|
|
425
|
+
- New schemas: `observability/metrics/v1.0.0/metrics-event.schema.json`
|
|
426
|
+
- New standards: `library/modules/docscribe.md`, `library/modules/error-handling-propagation.md`, `library/modules/telemetry-metrics.md`
|
|
427
|
+
- Updated standards: `devsecops/pre-commit-processes.md`, observability/logging enhancements
|
|
428
|
+
- Updated ecosystem docs: Fulmen Forge Workhorse Standard, ecosystem guide
|
|
429
|
+
|
|
430
|
+
### Changed
|
|
431
|
+
|
|
432
|
+
- Version bump to 0.1.2
|
|
433
|
+
- Updated `docs/tsfulmen_overview.md` with all module statuses
|
|
434
|
+
- Updated `package.json` with error, telemetry, fulhash, logging, and docscribe export paths
|
|
435
|
+
- Updated README.md with comprehensive usage examples for new modules
|
|
436
|
+
- Enhanced test coverage to 981/991 tests passing (98.4% pass rate)
|
|
437
|
+
|
|
438
|
+
### Fixed
|
|
439
|
+
|
|
440
|
+
- Linting issues in format.ts and foundry modules
|
|
441
|
+
- Performance test thresholds adjusted to realistic values
|
|
442
|
+
- YAML detection and stream splitting improvements in docscribe and foundry
|
|
443
|
+
- Crucible schemas discovery performance threshold adjustment
|
|
444
|
+
|
|
445
|
+
---
|
|
446
|
+
|
|
447
|
+
## [0.1.1] - 2025-10-20
|
|
448
|
+
|
|
449
|
+
**Enterprise Module Implementation** - Implements Config Path API, Schema Validation, and complete Foundry module with pattern catalogs, HTTP status helpers, MIME type detection, and country codes.
|
|
450
|
+
|
|
451
|
+
### Added
|
|
452
|
+
|
|
453
|
+
- **Config Path API**: XDG-compliant configuration directory resolution
|
|
454
|
+
- `getAppConfigDir()`, `getAppDataDir()`, `getAppCacheDir()` for application directories
|
|
455
|
+
- `getFulmenConfigDir()`, `getFulmenDataDir()`, `getFulmenCacheDir()` for ecosystem directories
|
|
456
|
+
- Platform-aware path resolution (Linux/XDG, macOS, Windows)
|
|
457
|
+
- Security validation for absolute paths and traversal protection
|
|
458
|
+
- Comprehensive cross-platform test coverage
|
|
459
|
+
|
|
460
|
+
- **Schema Validation Module**: JSON Schema 2020-12 validation with AJV
|
|
461
|
+
- `validateDataBySchemaId()` for validating data against Crucible schemas
|
|
462
|
+
- `validateFileBySchemaId()` for validating JSON/YAML files
|
|
463
|
+
- `getGlobalRegistry()` for accessing schema registry
|
|
464
|
+
- `compileSchemaById()` for pre-compiling schemas
|
|
465
|
+
- `normalizeSchema()` for schema comparison and validation
|
|
466
|
+
- Optional goneat bridge for cross-tool validation parity
|
|
467
|
+
- Schema validation CLI (`bunx tsfulmen-schema`) for development
|
|
468
|
+
- Draft 2020-12 support with meta-schema loading from Crucible
|
|
469
|
+
- 45+ tests covering validation, registry, and goneat bridge
|
|
470
|
+
|
|
471
|
+
- **Foundry Module**: Complete pattern catalog implementation
|
|
472
|
+
- **Pattern Catalog**: 21 regex/glob patterns with language-specific flags
|
|
473
|
+
- `getPattern()`, `getPatternRegex()`, `matchPattern()` for pattern access
|
|
474
|
+
- `listPatterns()`, `describePattern()` for catalog exploration
|
|
475
|
+
- Deep immutability with frozen objects and defensive copying
|
|
476
|
+
- Lazy regex compilation with caching
|
|
477
|
+
- Glob pattern support via picomatch
|
|
478
|
+
- **HTTP Status Catalog**: 58 HTTP status codes across 5 groups
|
|
479
|
+
- `getHttpStatus()` for status lookup
|
|
480
|
+
- `isInformational()`, `isSuccess()`, `isRedirection()`, `isClientError()`, `isServerError()` helpers
|
|
481
|
+
- `getStatusReason()` for reason phrase lookup
|
|
482
|
+
- `listHttpStatuses()` for catalog exploration
|
|
483
|
+
- **MIME Type Catalog**: Content-based detection with magic numbers
|
|
484
|
+
- Magic number pattern database for JSON, XML, YAML (exact byte matching)
|
|
485
|
+
- Heuristic detection for NDJSON, CSV, Protocol Buffers, plain text
|
|
486
|
+
- Priority-based detection engine with UTF-8 BOM handling
|
|
487
|
+
- Streaming support for Buffer, ReadableStream, Node.js Readable, and file paths
|
|
488
|
+
- `detectMimeType()` polymorphic function for all input types
|
|
489
|
+
- `detectMimeTypeFromBuffer()` for direct buffer analysis
|
|
490
|
+
- `detectMimeTypeFromFile()` with Bun.file() optimization and Node.js fallback
|
|
491
|
+
- `detectMimeTypeFromStream()` for Web and Node.js streams
|
|
492
|
+
- `matchMagicNumber()` utility for pattern verification
|
|
493
|
+
- `getMimeTypeByExtension()` for fast extension-based lookup
|
|
494
|
+
- DetectionOptions interface for configurable byte reading and fallback
|
|
495
|
+
- 60+ tests for magic number detection across all formats
|
|
496
|
+
- Test fixtures for integration testing
|
|
497
|
+
- **Country Code Catalog**: ISO 3166 country codes with normalization
|
|
498
|
+
- `getCountryByAlpha2()`, `getCountryByAlpha3()`, `getCountryByNumeric()` lookups
|
|
499
|
+
- Case-insensitive alpha code matching (US, us, Us all work)
|
|
500
|
+
- Numeric code normalization with left-padding (76 → "076")
|
|
501
|
+
- `listCountries()` for catalog exploration
|
|
502
|
+
- Precomputed indexes for O(1) lookups
|
|
503
|
+
- 5 countries in MVP (US, CA, JP, DE, BR)
|
|
504
|
+
|
|
505
|
+
- **Foundry Infrastructure**:
|
|
506
|
+
- YAML catalog loading with schema validation via AJV
|
|
507
|
+
- Fail-fast error handling with descriptive FoundryCatalogError
|
|
508
|
+
- Bun-first file loading with Node.js fallback
|
|
509
|
+
- `loadAllCatalogs()` for parallel catalog initialization
|
|
510
|
+
- Comprehensive test coverage (193 tests across all catalogs)
|
|
511
|
+
- Zero runtime dependencies (uses yaml, ajv, picomatch)
|
|
512
|
+
|
|
513
|
+
### Changed
|
|
514
|
+
|
|
515
|
+
- Updated README with comprehensive usage examples for all modules
|
|
516
|
+
- Enhanced test coverage from 30%+ to 70%+ (292 total tests)
|
|
517
|
+
- Improved documentation with API examples and detection strategies
|
|
518
|
+
|
|
519
|
+
### Fixed
|
|
520
|
+
|
|
521
|
+
- Foundry loader test regression with readonly Bun global property
|
|
522
|
+
- Import ordering and linting issues across all new modules
|
|
523
|
+
|
|
524
|
+
---
|
|
525
|
+
|
|
526
|
+
## [0.1.0] - 2025-10-15
|
|
527
|
+
|
|
528
|
+
**Bootstrap Scaffold Release** - Establishes project foundation, governance, and tooling infrastructure. No working module implementations yet.
|
|
529
|
+
|
|
530
|
+
**Release Strategy**: TSFulmen follows a progressive upscaling approach:
|
|
531
|
+
|
|
532
|
+
- **v0.1.0**: Bootstrap scaffold (this release)
|
|
533
|
+
- **v0.1.1 - v0.1.x**: Progressive module implementations (Config Path API, Crucible Shim, Logging, Schema Validation)
|
|
534
|
+
- **v0.2.0**: First public release with complete Fulmen Helper Library Standard compliance
|
|
535
|
+
|
|
536
|
+
**Not Production Ready**: This release is for maintainer coordination and ecosystem alignment only. First usable release will be v0.2.0.
|
|
537
|
+
|
|
538
|
+
### Added
|
|
539
|
+
|
|
540
|
+
- **Project Foundation**: Initial repository structure and governance
|
|
541
|
+
- TypeScript library scaffold with src/ layout
|
|
542
|
+
- Bun-based dependency management and build tooling
|
|
543
|
+
- tsup bundler configuration for ESM/CJS dual exports
|
|
544
|
+
- Vitest testing framework with coverage support
|
|
545
|
+
- Biome for linting and formatting
|
|
546
|
+
|
|
547
|
+
- **Repository Governance**: Complete project governance framework
|
|
548
|
+
- AGENTS.md with Module Weaver identity (@module-weaver)
|
|
549
|
+
- MAINTAINERS.md with human maintainer roster
|
|
550
|
+
- REPOSITORY_SAFETY_PROTOCOLS.md for operational safety
|
|
551
|
+
- CONTRIBUTING.md with development guidelines
|
|
552
|
+
- MIT LICENSE
|
|
553
|
+
|
|
554
|
+
- **Makefile Standard**: FulmenHQ-compliant Makefile with all required standard targets
|
|
555
|
+
- Core targets: `bootstrap`, `tools`, `sync-ssot`, `test`, `build`, `build-all`, `clean`
|
|
556
|
+
- Quality targets: `lint` (Biome + goneat assess), `fmt` (Biome + goneat format), `typecheck` (tsc)
|
|
557
|
+
- Version targets: `version`, `version-set`, `version-bump-{major,minor,patch,calver}`
|
|
558
|
+
- Release targets: `release-check`, `release-prepare`, `release-build`
|
|
559
|
+
- Hook targets: `precommit`, `prepush`
|
|
560
|
+
- ADR targets: `adr-validate`, `adr-new`
|
|
561
|
+
- Additional: `test-watch`, `test-coverage`, `bootstrap-force`
|
|
562
|
+
- **Split linting approach**: Biome for TS/JS source, goneat for JSON/YAML/Markdown (matches pyfulmen/gofulmen pattern)
|
|
563
|
+
|
|
564
|
+
- **SSOT Integration**: Crucible asset synchronization via goneat
|
|
565
|
+
- .goneat/ssot-consumer.yaml configuration
|
|
566
|
+
- docs/crucible-ts/ for synced documentation
|
|
567
|
+
- schemas/crucible-ts/ for synced JSON schemas
|
|
568
|
+
- config/crucible-ts/ for synced config defaults
|
|
569
|
+
- .crucible/metadata/ for sync metadata
|
|
570
|
+
|
|
571
|
+
- **Documentation**: Comprehensive project documentation
|
|
572
|
+
- README.md with quick start and architecture overview
|
|
573
|
+
- docs/tsfulmen_overview.md with module catalog and roadmap
|
|
574
|
+
- docs/development/ with operations, bootstrap, and ADR documentation
|
|
575
|
+
- docs/development/adr/ for Architecture Decision Records
|
|
576
|
+
- Local ADR index and guidelines
|
|
577
|
+
- Ecosystem ADR adoption tracking
|
|
578
|
+
- ADR validation and creation tooling via Makefile
|
|
579
|
+
- **ADR-0001**: Split linting approach (Biome for TS/JS, goneat for config/docs)
|
|
580
|
+
- VSCode workspace configuration for development
|
|
581
|
+
- Cross-references to ecosystem standards
|
|
582
|
+
|
|
583
|
+
- **Package Configuration**: Modern TypeScript package setup
|
|
584
|
+
- package.json with proper exports and scripts
|
|
585
|
+
- tsconfig.json with strict TypeScript configuration
|
|
586
|
+
- ESM/CJS dual module support
|
|
587
|
+
- Type definitions for all exports
|
|
588
|
+
|
|
589
|
+
- **Development Tools**: Quality assurance tooling
|
|
590
|
+
- Biome configuration (biome.json)
|
|
591
|
+
- Vitest configuration (vitest.config.ts)
|
|
592
|
+
- Git hooks preparation
|
|
593
|
+
- EditorConfig for consistent formatting
|
|
594
|
+
|
|
595
|
+
- **Version Management**: Initial versioning infrastructure
|
|
596
|
+
- VERSION file (0.1.0)
|
|
597
|
+
- LIFECYCLE_PHASE file (alpha)
|
|
598
|
+
- Semantic versioning support via Makefile
|
|
599
|
+
|
|
600
|
+
### Changed
|
|
601
|
+
|
|
602
|
+
- **Agent Documentation**: Enhanced AGENTS.md with improvements from sibling repos
|
|
603
|
+
- Added DO NOT Rules section with TypeScript-specific guidelines
|
|
604
|
+
- Enhanced agent identity section with Mission, Capabilities, Communication Channels
|
|
605
|
+
- Improved commit attribution examples
|
|
606
|
+
- Added Safety Protocols and Development Philosophy sections
|
|
607
|
+
- Added Getting Started section for agent interaction
|
|
608
|
+
|
|
609
|
+
### Fixed
|
|
610
|
+
|
|
611
|
+
- Repository structure aligned with Fulmen Helper Library Standard
|
|
612
|
+
- Cross-language consistency with gofulmen and pyfulmen governance
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
_Note: This changelog tracks the progressive upscaling of TSFulmen through v0.1.x releases._
|
package/LICENSE
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 3 Leaps, LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Copyright 2025 3 Leaps, LLC
|
|
26
|
+
|
|
27
|
+
Licensed under the MIT License (the "License");
|
|
28
|
+
you may not use this file except in compliance with the License.
|
|
29
|
+
You may obtain a copy of the License at
|
|
30
|
+
|
|
31
|
+
https://opensource.org/licenses/MIT
|
|
32
|
+
|
|
33
|
+
Unless required by applicable law or agreed to in writing, software
|
|
34
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
35
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
36
|
+
See the License for the specific language governing permissions and
|
|
37
|
+
limitations under the License.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Trademark Notice
|
|
42
|
+
|
|
43
|
+
"3 Leaps®" is a registered trademark of 3 Leaps, LLC, a Florida LLC with offices in South Carolina. "Fulmen™", "Fulmens™", "FulmenHQ™", "MDMeld™", "Docemist™", the "Fulmen logo™", the "MDMeld icon™", and the "Docemist logo™" are trademarks of 3 Leaps, LLC, claimed through use in commerce, with plans for USPTO registration.
|
|
44
|
+
|
|
45
|
+
While code and documentation are open under the MIT License above, use of these trademarks and associated logos, icons, and visual elements is reserved for official implementations to prevent confusion and protect the ecosystem. Use of these marks in derivative works does not imply endorsement by 3 Leaps, LLC. As a courtesy, rename derivative projects to avoid using "3leaps", "fulmen", "fulmens", "fulmenhq", "mdmeld", or "docemist" in repository or package names. Setup scripts provided in Fulmen repositories will assist in this process.
|
|
46
|
+
|
|
47
|
+
For questions regarding trademark usage, contact legal@3leaps.net.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Acceptable Use of "Fulmen"
|
|
52
|
+
|
|
53
|
+
"Fulmen" (Latin for lightning or thunderbolt) is a reusable project template by 3 Leaps, LLC, designed for lightning-fast, enterprise-grade solutions. Use "Fulmen" as a standalone noun (for example, "Use a fulmen to start your project") and avoid descriptors like "template" or "blueprint." We encourage referencing "fulmen" in contexts identifying permissibly licensed content, provided the `3leaps-` prefix is not used to avoid confusion with official 3 Leaps content. As a courtesy, acknowledge the origin by linking to `https://github.com/fulmenhq/fulmen-cosmography` in your documentation. For full branding guidelines, visit `https://fulmenhq.dev`.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
For additional governance details and contributor obligations, see the 3 Leaps Open Source Policies at https://github.com/3leaps/oss-policies.
|