@fulmenhq/tsfulmen 0.2.0 → 0.2.2
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 +42 -0
- package/README.md +60 -7
- package/config/crucible-ts/agentic/roles/README.md +3 -3
- package/config/crucible-ts/library/fulencode/fixtures/README.md +18 -0
- package/config/crucible-ts/library/fulencode/fixtures/bom/bom.yaml +14 -0
- package/config/crucible-ts/library/fulencode/fixtures/detection/detection.yaml +12 -0
- package/config/crucible-ts/library/fulencode/fixtures/invalid-encodings/base64.yaml +10 -0
- package/config/crucible-ts/library/fulencode/fixtures/normalization/text-safe.yaml +10 -0
- package/config/crucible-ts/library/fulencode/fixtures/telemetry/telemetry-test-cases.yaml +24 -0
- package/config/crucible-ts/library/fulencode/fixtures/valid-encodings/base64.yaml +11 -0
- package/config/crucible-ts/taxonomy/library/platform-modules/v1.0.0/modules.yaml +2 -2
- package/config/crucible-ts/taxonomy/metrics.yaml +79 -1
- package/dist/appidentity/index.d.ts +1 -1
- package/dist/appidentity/index.js +122 -56
- package/dist/appidentity/index.js.map +1 -1
- package/dist/config/index.js +122 -56
- package/dist/config/index.js.map +1 -1
- package/dist/crucible/index.js +122 -56
- package/dist/crucible/index.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +122 -56
- package/dist/errors/index.js.map +1 -1
- package/dist/foundry/index.js +122 -56
- package/dist/foundry/index.js.map +1 -1
- package/dist/fulencode/index.d.ts +102 -0
- package/dist/fulencode/index.js +806 -0
- package/dist/fulencode/index.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +123 -57
- package/dist/index.js.map +1 -1
- package/dist/pathfinder/index.d.ts +1 -1
- package/dist/pathfinder/index.js +122 -56
- package/dist/pathfinder/index.js.map +1 -1
- package/dist/reports/license-inventory.csv +7 -6
- package/dist/schema/index.d.ts +2 -2
- package/dist/schema/index.js +122 -56
- package/dist/schema/index.js.map +1 -1
- package/dist/signals/index.js +122 -56
- package/dist/signals/index.js.map +1 -1
- package/dist/telemetry/http/index.js +122 -56
- package/dist/telemetry/http/index.js.map +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +122 -56
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/prometheus/index.d.ts +1 -1
- package/dist/telemetry/prometheus/index.js +122 -56
- package/dist/telemetry/prometheus/index.js.map +1 -1
- package/dist/{types-BJswWpQC.d.ts → types-DdoeE7F5.d.ts} +1 -1
- package/package.json +7 -2
- package/schemas/crucible-ts/library/fulencode/v1.0.0/README.md +37 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/bom-result.schema.json +48 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/decode-options.schema.json +60 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/decoding-result.schema.json +70 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/detect-options.schema.json +25 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/detection-result.schema.json +57 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/encode-options.schema.json +71 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/encoding-result.schema.json +57 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/fulencode-config.schema.json +8 -4
- package/schemas/crucible-ts/library/fulencode/v1.0.0/fulencode-error.schema.json +66 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/normalization-result.schema.json +73 -0
- package/schemas/crucible-ts/library/fulencode/v1.0.0/normalize-options.schema.json +44 -0
- package/schemas/crucible-ts/meta/README.md +38 -2
- package/schemas/crucible-ts/meta/draft-04/schema.json +222 -0
- package/schemas/crucible-ts/meta/draft-06/schema.json +218 -0
- package/schemas/crucible-ts/meta/draft-2019-09/meta/applicator.json +93 -0
- package/schemas/crucible-ts/meta/draft-2019-09/meta/content.json +21 -0
- package/schemas/crucible-ts/meta/draft-2019-09/meta/core.json +58 -0
- package/schemas/crucible-ts/meta/draft-2019-09/meta/format.json +15 -0
- package/schemas/crucible-ts/meta/draft-2019-09/meta/meta-data.json +35 -0
- package/schemas/crucible-ts/meta/draft-2019-09/meta/validation.json +119 -0
- package/schemas/crucible-ts/meta/draft-2019-09/offline.schema.json +148 -0
- package/schemas/crucible-ts/meta/draft-2019-09/schema.json +62 -0
- package/schemas/crucible-ts/meta/fixtures/draft-04-sample.json +16 -0
- package/schemas/crucible-ts/meta/fixtures/draft-06-sample.json +16 -0
- package/schemas/crucible-ts/meta/fixtures/draft-07-sample.json +34 -0
- package/schemas/crucible-ts/meta/fixtures/draft-2019-09-sample.json +21 -0
- package/schemas/crucible-ts/meta/fixtures/draft-2020-12-sample.json +21 -0
- package/schemas/crucible-ts/taxonomy/library/fulencode/normalization-profiles/v1.0.0/profiles.yaml +16 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/PROVENANCE.md +64 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/access-tier.dimension.json +103 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/retention-lifecycle.dimension.json +103 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/schema-stability.dimension.json +100 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/sensitivity.dimension.json +130 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/velocity-mode.dimension.json +79 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/volatility.dimension.json +72 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/config/classifiers/dimensions/volume-tier.dimension.json +66 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/catalog/classifiers/README.md +29 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/access-tier-classification.md +163 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/classifiers-framework.md +157 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/data-sensitivity-classification.md +259 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/retention-lifecycle-classification.md +200 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/schema-stability-classification.md +205 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/velocity-mode-classification.md +222 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/volatility-classification.md +209 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/docs/standards/volume-tier-classification.md +200 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/ailink/v0/README.md +48 -0
- package/schemas/crucible-ts/upstream/3leaps/{ailink → crucible/schemas/ailink}/v0/prompt.schema.json +4 -18
- package/schemas/crucible-ts/upstream/3leaps/{ailink → crucible/schemas/ailink}/v0/search-response.schema.json +7 -37
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/classifiers/v0/dimension-definition.schema.json +247 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/classifiers/v0/sensitivity-level.schema.json +67 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/foundation/v0/error-response.schema.json +59 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/foundation/v0/lifecycle-phases.data.json +102 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/foundation/v0/lifecycle-phases.schema.json +101 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/foundation/v0/release-phase.schema.json +18 -0
- package/schemas/crucible-ts/upstream/3leaps/crucible/schemas/foundation/v0/types.schema.json +177 -0
- package/schemas/crucible-ts/upstream/3leaps/PROVENANCE.md +0 -43
- /package/schemas/crucible-ts/upstream/3leaps/{agentic → crucible/schemas/agentic}/v0/role-prompt.schema.json +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
12
12
|
|
|
13
13
|
_No unreleased changes._
|
|
14
14
|
|
|
15
|
+
## [0.2.1] - 2026-01-27
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Lifecycle Phase** - Project graduates from `alpha` to `beta` per Repository Lifecycle Standard
|
|
20
|
+
- 71% line coverage (above 60% beta threshold)
|
|
21
|
+
- Feature-complete modules with stable APIs
|
|
22
|
+
- Documentation kept current
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- **Schema Multi-Dialect Support** - Meta-validation and compilation now supports JSON Schema drafts draft-04, draft-06, draft-07, draft-2019-09, and draft-2020-12
|
|
27
|
+
- Uses Crucible v0.4.9 meta catalog with bundled metaschemas and vocabulary schemas
|
|
28
|
+
- Dialect auto-detection from `$schema` declaration
|
|
29
|
+
- Per-dialect AJV instance caching for performance
|
|
30
|
+
|
|
31
|
+
- **Improved Schema Validation** - `validateSchema()` now validates schemas against their declared `$schema` dialect (not just "can AJV compile it")
|
|
32
|
+
- Two-phase validation: meta-validation against dialect, then compilation check
|
|
33
|
+
- Better error messages for dialect-specific violations
|
|
34
|
+
|
|
35
|
+
- **Fulencode Module** (`@fulmenhq/tsfulmen/fulencode`) - Canonical encoding/decoding facade
|
|
36
|
+
- **Core API**: `fulencode.encode()` / `fulencode.decode()` for consistent interface
|
|
37
|
+
- **Binary Encodings**: base64, base64url, base64_raw, hex, base32, base32hex
|
|
38
|
+
- **Text Encodings**: utf-8, utf-16le, utf-16be, iso-8859-1, ascii
|
|
39
|
+
- **Features**: padding control, line wrapping, whitespace handling, checksum computation (sha256, xxh3-128)
|
|
40
|
+
- **Error Handling**: Structured `FulencodeError` with operation context and error codes
|
|
41
|
+
- Standard entry point for future non-stdlib encodings
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- **Crucible SSOT** - Updated to v0.4.9
|
|
46
|
+
- Bundled JSON Schema metaschemas for offline validation
|
|
47
|
+
- Meta catalog with draft-04 through draft-2020-12 vocabulary schemas
|
|
48
|
+
|
|
49
|
+
- **Test Coverage Improvements** - Overall coverage improved from 63.4% to 71.16%
|
|
50
|
+
- fulencode: 52.8% → 99.6% (+46.8%)
|
|
51
|
+
- fulpack: 41.7% → 72.5% (+30.8%)
|
|
52
|
+
- schema: 51.2% → 70.1% (+18.9%)
|
|
53
|
+
- pathfinder: 77.4% → 88.3% (+10.9%)
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
15
57
|
## [0.2.0] - 2026-01-13
|
|
16
58
|
|
|
17
59
|
### Added
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Every team writes their own HTTP status helpers, exit code enums, and country co
|
|
|
8
8
|
- **Cross-language parity**: Same exit codes, signals, and schemas as gofulmen, rsfulmen, pyfulmen
|
|
9
9
|
- **Type-safe**: Full TypeScript types with strict mode throughout
|
|
10
10
|
|
|
11
|
-
**Lifecycle Phase**: `
|
|
11
|
+
**Lifecycle Phase**: `beta` | **Version**: 0.2.1 | **Test Coverage**: 71%
|
|
12
12
|
|
|
13
13
|
**Install**: `bun add @fulmenhq/tsfulmen` (or `npm install @fulmenhq/tsfulmen`)
|
|
14
14
|
|
|
@@ -27,6 +27,7 @@ Every team writes their own HTTP status helpers, exit code enums, and country co
|
|
|
27
27
|
## Features
|
|
28
28
|
|
|
29
29
|
- ✅ **Error Handling** - Schema-backed FulmenError with severity levels (43 tests)
|
|
30
|
+
- ✅ **Fulencode** - Canonical encoding/decoding facade for base64, hex, base32, and text formats (40+ tests)
|
|
30
31
|
- ✅ **Telemetry & Metrics** - Counter/gauge/histogram with OTLP export (85 tests)
|
|
31
32
|
- ✅ **Telemetry Instrumentation** - Metrics in config, schema, crucible modules (24 tests)
|
|
32
33
|
- ✅ **HTTP Server Metrics** - Type-safe HTTP instrumentation with Express/Fastify/Bun middleware (40+ tests)
|
|
@@ -120,11 +121,12 @@ src/
|
|
|
120
121
|
├── crucible/ # 🚧 Crucible SSOT shim
|
|
121
122
|
├── errors/ # ✅ Error handling & propagation
|
|
122
123
|
├── foundry/ # ✅ Pattern catalogs, HTTP statuses, MIME detection
|
|
124
|
+
├── fulencode/ # ✅ Canonical encoding/decoding (base64, hex, base32, text)
|
|
123
125
|
├── fulhash/ # ✅ Fast hashing with XXH3-128 and SHA-256
|
|
124
126
|
├── fulpack/ # ✅ Archive operations (TAR, TAR.GZ, ZIP, GZIP)
|
|
125
127
|
├── logging/ # ✅ Progressive logging with policy enforcement
|
|
126
128
|
├── pathfinder/ # ✅ Filesystem traversal with checksums and observability
|
|
127
|
-
├── schema/ # ✅ Schema validation (AJV + CLI)
|
|
129
|
+
├── schema/ # ✅ Schema validation (AJV + CLI, multi-dialect)
|
|
128
130
|
└── telemetry/ # ✅ Metrics collection & export
|
|
129
131
|
```
|
|
130
132
|
|
|
@@ -268,6 +270,45 @@ const error = new FulmenError({
|
|
|
268
270
|
});
|
|
269
271
|
```
|
|
270
272
|
|
|
273
|
+
### Fulencode (Encoding/Decoding)
|
|
274
|
+
|
|
275
|
+
Canonical encoding/decoding facade for binary and text formats:
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
import { fulencode } from "@fulmenhq/tsfulmen/fulencode";
|
|
279
|
+
|
|
280
|
+
// Encode binary to base64
|
|
281
|
+
const encoded = await fulencode.encode(
|
|
282
|
+
new Uint8Array([72, 101, 108, 108, 111]),
|
|
283
|
+
"base64",
|
|
284
|
+
);
|
|
285
|
+
console.log(encoded.data); // "SGVsbG8="
|
|
286
|
+
|
|
287
|
+
// Decode base64 to binary
|
|
288
|
+
const decoded = await fulencode.decode("SGVsbG8=", "base64");
|
|
289
|
+
console.log(new TextDecoder().decode(decoded.data)); // "Hello"
|
|
290
|
+
|
|
291
|
+
// Hex encoding with checksum
|
|
292
|
+
const hex = await fulencode.encode(data, "hex", {
|
|
293
|
+
hexCase: "upper",
|
|
294
|
+
computeChecksum: "sha256",
|
|
295
|
+
});
|
|
296
|
+
console.log(hex.data); // "48656C6C6F"
|
|
297
|
+
console.log(hex.checksum); // "sha256:2cf24dba..."
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
**Supported Formats**:
|
|
301
|
+
|
|
302
|
+
| Binary | Text |
|
|
303
|
+
| -------------- | ---------------------------------------- |
|
|
304
|
+
| base64 | utf-8 |
|
|
305
|
+
| base64url | utf-16le, utf-16be |
|
|
306
|
+
| base64_raw | iso-8859-1, ascii |
|
|
307
|
+
| hex | |
|
|
308
|
+
| base32, base32hex | |
|
|
309
|
+
|
|
310
|
+
**Features**: Padding control, line wrapping, whitespace handling, checksum computation (sha256, xxh3-128), structured `FulencodeError` with error codes.
|
|
311
|
+
|
|
271
312
|
### Telemetry & Metrics
|
|
272
313
|
|
|
273
314
|
```typescript
|
|
@@ -468,12 +509,15 @@ console.log(metadata.activeLayers); // ["defaults", "user", "env"]
|
|
|
468
509
|
|
|
469
510
|
### Schema Validation
|
|
470
511
|
|
|
512
|
+
Multi-dialect JSON Schema validation supporting draft-04, draft-06, draft-07, draft-2019-09, and draft-2020-12:
|
|
513
|
+
|
|
471
514
|
```typescript
|
|
472
515
|
import {
|
|
473
516
|
getGlobalRegistry,
|
|
474
517
|
compileSchemaById,
|
|
475
518
|
validateDataBySchemaId,
|
|
476
519
|
validateFileBySchemaId,
|
|
520
|
+
validateSchema,
|
|
477
521
|
normalizeSchema,
|
|
478
522
|
} from "@fulmenhq/tsfulmen/schema";
|
|
479
523
|
|
|
@@ -496,10 +540,19 @@ const fileResult = await validateFileBySchemaId(
|
|
|
496
540
|
"./my-config.yaml",
|
|
497
541
|
);
|
|
498
542
|
|
|
543
|
+
// Validate a schema document against its declared dialect
|
|
544
|
+
const schemaResult = await validateSchema({
|
|
545
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
546
|
+
type: "object",
|
|
547
|
+
properties: { name: { type: "string" } },
|
|
548
|
+
});
|
|
549
|
+
|
|
499
550
|
// Normalize schema for comparison
|
|
500
551
|
const normalized = await normalizeSchema("./schema.yaml");
|
|
501
552
|
```
|
|
502
553
|
|
|
554
|
+
**Supported Dialects**: draft-04, draft-06, draft-07, draft-2019-09, draft-2020-12. Dialect is auto-detected from the schema's `$schema` field (defaults to draft-2020-12).
|
|
555
|
+
|
|
503
556
|
### Schema Validation CLI (Developer Tool)
|
|
504
557
|
|
|
505
558
|
TSFulmen includes a CLI for schema exploration and validation during development:
|
|
@@ -1131,12 +1184,12 @@ tsfulmen is licensed under MIT license - see [LICENSE](LICENSE) for complete det
|
|
|
1131
1184
|
|
|
1132
1185
|
## Status
|
|
1133
1186
|
|
|
1134
|
-
**Lifecycle Phase**: `
|
|
1187
|
+
**Lifecycle Phase**: `beta` ([Repository Lifecycle Standard](docs/crucible-ts/standards/repository-lifecycle.md))
|
|
1135
1188
|
|
|
1136
|
-
- **Quality Bar**:
|
|
1137
|
-
- **Stability**:
|
|
1138
|
-
- **Breaking Changes**:
|
|
1139
|
-
- **Documentation**:
|
|
1189
|
+
- **Quality Bar**: 60% minimum test coverage (currently: 71%)
|
|
1190
|
+
- **Stability**: Feature-complete; stabilizing behavior
|
|
1191
|
+
- **Breaking Changes**: Addressed promptly with migration guidance
|
|
1192
|
+
- **Documentation**: Kept current
|
|
1140
1193
|
|
|
1141
1194
|
See `LIFECYCLE_PHASE` file and [CHANGELOG.md](CHANGELOG.md) for version history.
|
|
1142
1195
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Baseline role prompts for AI agent sessions in the FulmenHQ ecosystem.
|
|
4
4
|
|
|
5
|
-
**Schema**: [`role-prompt.schema.json`](../../../schemas/upstream/3leaps/agentic/v0/role-prompt.schema.json) (vendored from [3leaps/crucible](https://github.com/3leaps/crucible))
|
|
5
|
+
**Schema**: [`role-prompt.schema.json`](../../../schemas/upstream/3leaps/crucible/schemas/agentic/v0/role-prompt.schema.json) (vendored from [3leaps/crucible](https://github.com/3leaps/crucible))
|
|
6
6
|
|
|
7
7
|
## Available Roles
|
|
8
8
|
|
|
@@ -48,13 +48,13 @@ Reference roles by slug in `AGENTS.md`:
|
|
|
48
48
|
|
|
49
49
|
## Schema Validation
|
|
50
50
|
|
|
51
|
-
All role files conform to the [role-prompt schema](../../../schemas/upstream/3leaps/agentic/v0/role-prompt.schema.json).
|
|
51
|
+
All role files conform to the [role-prompt schema](../../../schemas/upstream/3leaps/crucible/schemas/agentic/v0/role-prompt.schema.json).
|
|
52
52
|
|
|
53
53
|
Validate with:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
56
|
# Using goneat
|
|
57
|
-
goneat schema validate --schema schemas/upstream/3leaps/agentic/v0/role-prompt.schema.json config/agentic/roles/*.yaml
|
|
57
|
+
goneat schema validate --schema schemas/upstream/3leaps/crucible/schemas/agentic/v0/role-prompt.schema.json config/agentic/roles/*.yaml
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
## Extending Roles
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Fulencode Fixtures
|
|
2
|
+
|
|
3
|
+
These fixtures provide cross-language, deterministic inputs for Fulencode parity tests.
|
|
4
|
+
|
|
5
|
+
Design goals:
|
|
6
|
+
|
|
7
|
+
- ASCII-only source files; represent bytes as hex strings.
|
|
8
|
+
- Small, stable fixtures; large/pathological payloads should be generated in tests.
|
|
9
|
+
- Fixtures are SSOT and should not be duplicated in `lang/*` directories.
|
|
10
|
+
|
|
11
|
+
Directory layout:
|
|
12
|
+
|
|
13
|
+
- `valid-encodings/` - Known-good inputs/outputs for encode/decode
|
|
14
|
+
- `invalid-encodings/` - Inputs that must trigger canonical errors
|
|
15
|
+
- `normalization/` - Inputs/outputs for normalization profiles
|
|
16
|
+
- `bom/` - BOM detection/removal cases
|
|
17
|
+
- `detection/` - Minimal detection cases (BOM, UTF-8 validity, ASCII ambiguity)
|
|
18
|
+
- `telemetry/` - Expected metric emissions for parity tests
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
cases:
|
|
3
|
+
- name: "utf8-bom"
|
|
4
|
+
input_hex: "efbbbf48656c6c6f"
|
|
5
|
+
expected:
|
|
6
|
+
bom_type: "utf-8"
|
|
7
|
+
byte_length: 3
|
|
8
|
+
encoding_implied: "utf-8"
|
|
9
|
+
- name: "no-bom"
|
|
10
|
+
input_hex: "48656c6c6f"
|
|
11
|
+
expected:
|
|
12
|
+
bom_type: null
|
|
13
|
+
byte_length: 0
|
|
14
|
+
encoding_implied: null
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
cases:
|
|
3
|
+
- name: "invalid-base64-character"
|
|
4
|
+
format: "base64"
|
|
5
|
+
encoded: "SGVsbG8*"
|
|
6
|
+
expected_error_code: "INVALID_ENCODING"
|
|
7
|
+
- name: "invalid-base64-padding"
|
|
8
|
+
format: "base64"
|
|
9
|
+
encoded: "SGVsbG8="
|
|
10
|
+
expected_error_code: "INVALID_ENCODING"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
cases:
|
|
3
|
+
- name: "reject-zero-width"
|
|
4
|
+
profile: "text_safe"
|
|
5
|
+
input: "paypal.com"
|
|
6
|
+
expected_error_code: "ZERO_WIDTH_CHARACTER"
|
|
7
|
+
- name: "reject-bidi-override"
|
|
8
|
+
profile: "text_safe"
|
|
9
|
+
input: "abcdef"
|
|
10
|
+
expected_error_code: "BIDI_CONTROL_CHARACTER"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
cases:
|
|
3
|
+
- name: "decode-base64-success"
|
|
4
|
+
operation: "decode"
|
|
5
|
+
format: "base64"
|
|
6
|
+
result: "success"
|
|
7
|
+
expected_metrics:
|
|
8
|
+
- metric: "fulencode_operation_total"
|
|
9
|
+
tags:
|
|
10
|
+
operation: "decode"
|
|
11
|
+
format: "base64"
|
|
12
|
+
result: "success"
|
|
13
|
+
value: 1
|
|
14
|
+
- name: "detect-utf8-bom"
|
|
15
|
+
operation: "detect"
|
|
16
|
+
result: "success"
|
|
17
|
+
expected_metrics:
|
|
18
|
+
- metric: "fulencode_detect_result_total"
|
|
19
|
+
tags:
|
|
20
|
+
encoding: "utf-8"
|
|
21
|
+
confidence: "high"
|
|
22
|
+
result: "success"
|
|
23
|
+
source: "bom"
|
|
24
|
+
value: 1
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
version: "1.0"
|
|
2
|
+
cases:
|
|
3
|
+
- name: "hello-world-base64"
|
|
4
|
+
format: "base64"
|
|
5
|
+
input_hex: "48656c6c6f2c20576f726c6421"
|
|
6
|
+
encoded: "SGVsbG8sIFdvcmxkIQ=="
|
|
7
|
+
- name: "hello-world-base64url-unpadded"
|
|
8
|
+
format: "base64url"
|
|
9
|
+
input_hex: "48656c6c6f2c20576f726c6421"
|
|
10
|
+
encoded: "SGVsbG8sIFdvcmxkIQ"
|
|
11
|
+
notes: "No padding, URL-safe alphabet"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# For reference data catalogs, see foundry-catalogs.yaml
|
|
4
4
|
# Manually maintained but automatically validated
|
|
5
5
|
version: "1.0.0"
|
|
6
|
-
last_updated: "
|
|
6
|
+
last_updated: "2026-01-26"
|
|
7
7
|
modules:
|
|
8
8
|
# ============================================================================
|
|
9
9
|
# CORE TIER - Always present, zero optional dependencies
|
|
@@ -301,7 +301,7 @@ modules:
|
|
|
301
301
|
rationale: Widely useful reference data access; zero external dependencies
|
|
302
302
|
evidence:
|
|
303
303
|
has_schema: true
|
|
304
|
-
schema_path: schemas/library/foundry/
|
|
304
|
+
schema_path: schemas/library/foundry/v1.0.0/
|
|
305
305
|
has_config: true
|
|
306
306
|
config_path: config/library/foundry/
|
|
307
307
|
languages:
|
|
@@ -44,6 +44,19 @@ $defs:
|
|
|
44
44
|
- fulhash_hash_string_total
|
|
45
45
|
- fulhash_bytes_hashed_total
|
|
46
46
|
- fulhash_operation_ms
|
|
47
|
+
- fulencode_operation_total
|
|
48
|
+
- fulencode_operation_duration_seconds
|
|
49
|
+
- fulencode_bytes_processed_total
|
|
50
|
+
- fulencode_expansion_ratio_percent
|
|
51
|
+
- fulencode_detect_result_total
|
|
52
|
+
- fulencode_detect_duration_seconds
|
|
53
|
+
- fulencode_normalize_total
|
|
54
|
+
- fulencode_normalize_semantic_changes_total
|
|
55
|
+
- fulencode_security_violations_total
|
|
56
|
+
- fulencode_corrections_total
|
|
57
|
+
- fulencode_bom_operations_total
|
|
58
|
+
- fulencode_bom_mismatches_total
|
|
59
|
+
- fulencode_errors_total
|
|
47
60
|
- http_requests_total
|
|
48
61
|
- http_request_duration_seconds
|
|
49
62
|
- http_request_size_bytes
|
|
@@ -108,7 +121,7 @@ required:
|
|
|
108
121
|
- version
|
|
109
122
|
- metrics
|
|
110
123
|
additionalProperties: false
|
|
111
|
-
version: "0.4.
|
|
124
|
+
version: "0.4.9"
|
|
112
125
|
defaults:
|
|
113
126
|
histogram_buckets:
|
|
114
127
|
ms_metrics:
|
|
@@ -304,6 +317,71 @@ metrics:
|
|
|
304
317
|
description: >
|
|
305
318
|
Hash operation latency in milliseconds for all algorithms. Uses ADR-0007 buckets: [1, 5, 10, 50, 100, 500, 1000, 5000, 10000]. Enables performance benchmarking across XXH3-128 and SHA256.
|
|
306
319
|
|
|
320
|
+
- name: fulencode_operation_total
|
|
321
|
+
unit: count
|
|
322
|
+
description: >
|
|
323
|
+
Total Fulencode operations executed. Required tags: operation (encode|decode|detect|normalize|bom), result (success|error). Optional tags: format (bounded set from EncodingFormat).
|
|
324
|
+
|
|
325
|
+
- name: fulencode_operation_duration_seconds
|
|
326
|
+
unit: s
|
|
327
|
+
description: >
|
|
328
|
+
Fulencode operation duration in seconds. Histogram metric. Required tags: operation (encode|decode|detect|normalize|bom), result (success|error). Optional tags: format. Uses default seconds buckets.
|
|
329
|
+
|
|
330
|
+
- name: fulencode_bytes_processed_total
|
|
331
|
+
unit: bytes
|
|
332
|
+
description: >
|
|
333
|
+
Total bytes processed by Fulencode. Counter or histogram payloads are permitted depending on implementation. Required tags: operation (encode|decode), direction (in|out), result (success|error). Optional tags: format.
|
|
334
|
+
|
|
335
|
+
- name: fulencode_expansion_ratio_percent
|
|
336
|
+
unit: percent
|
|
337
|
+
description: >
|
|
338
|
+
Expansion ratio (output/input) expressed as a percentage for encode/decode operations. Histogram metric. Required tags: operation (encode|decode), result (success|error). Optional tags: format. Implementations MUST emit value as ratio*100 (e.g., 250 = 2.5x expansion).
|
|
339
|
+
|
|
340
|
+
- name: fulencode_detect_result_total
|
|
341
|
+
unit: count
|
|
342
|
+
description: >
|
|
343
|
+
Total encoding detection outcomes. Required tags: encoding (detected encoding or unknown), confidence (high|medium|low), result (success|error). Optional tags: source (bom|validation|heuristic|multibase).
|
|
344
|
+
|
|
345
|
+
- name: fulencode_detect_duration_seconds
|
|
346
|
+
unit: s
|
|
347
|
+
description: >
|
|
348
|
+
Encoding detection duration in seconds. Histogram metric. Required tags: result (success|error). Optional tags: sample_size_bucket (<1kb|1-10kb|10-100kb|>100kb). Uses default seconds buckets.
|
|
349
|
+
|
|
350
|
+
- name: fulencode_normalize_total
|
|
351
|
+
unit: count
|
|
352
|
+
description: >
|
|
353
|
+
Total normalization operations executed. Required tags: profile (nfc|nfd|nfkc|nfkd|custom profile name), result (success|error).
|
|
354
|
+
|
|
355
|
+
- name: fulencode_normalize_semantic_changes_total
|
|
356
|
+
unit: count
|
|
357
|
+
description: >
|
|
358
|
+
Total semantic changes detected during normalization (typically NFKC/NFKD). Required tags: profile (nfkc|nfkd), change_type (ligatures|superscripts_subscripts|roman_numerals|circled_numbers|enclosed_alphanumerics|fractions|other).
|
|
359
|
+
|
|
360
|
+
- name: fulencode_security_violations_total
|
|
361
|
+
unit: count
|
|
362
|
+
description: >
|
|
363
|
+
Total security violations detected by Fulencode. Required tags: type (invalid_utf8|invalid_utf16|encoding_bomb|excessive_combining|zero_width|bidi_controls|bom_mismatch|other), operation (encode|decode|detect|normalize|bom).
|
|
364
|
+
|
|
365
|
+
- name: fulencode_corrections_total
|
|
366
|
+
unit: count
|
|
367
|
+
description: >
|
|
368
|
+
Total corrections applied in non-strict modes (replace/fallback). Required tags: error_mode (replace|fallback|ignore), error_type (invalid_utf8|invalid_utf16|invalid_encoding|bom_mismatch|other).
|
|
369
|
+
|
|
370
|
+
- name: fulencode_bom_operations_total
|
|
371
|
+
unit: count
|
|
372
|
+
description: >
|
|
373
|
+
Total BOM operations executed. Required tags: operation (detect|remove|add|validate|correct), bom_type (utf-8|utf-16le|utf-16be|utf-32le|utf-32be|none), result (success|error).
|
|
374
|
+
|
|
375
|
+
- name: fulencode_bom_mismatches_total
|
|
376
|
+
unit: count
|
|
377
|
+
description: >
|
|
378
|
+
Total BOM mismatch events detected. Required tags: detected_bom, expected_encoding, action (error|fix|ignore).
|
|
379
|
+
|
|
380
|
+
- name: fulencode_errors_total
|
|
381
|
+
unit: count
|
|
382
|
+
description: >
|
|
383
|
+
Total Fulencode errors by canonical error code. Required tags: operation (encode|decode|detect|normalize|bom), code (canonical FulencodeError code).
|
|
384
|
+
|
|
307
385
|
- name: http_requests_total
|
|
308
386
|
unit: count
|
|
309
387
|
description: >
|