@fulmenhq/tsfulmen 0.2.0 → 0.2.3
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 +70 -0
- package/README.md +61 -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 +31 -109
- package/dist/appidentity/index.js +369 -60
- package/dist/appidentity/index.js.map +1 -1
- package/dist/config/index.d.ts +46 -1
- package/dist/config/index.js +427 -62
- package/dist/config/index.js.map +1 -1
- package/dist/crucible/index.js +367 -59
- package/dist/crucible/index.js.map +1 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +367 -59
- package/dist/errors/index.js.map +1 -1
- package/dist/foundry/index.d.ts +2 -1
- package/dist/foundry/index.js +368 -60
- 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 +4 -3
- package/dist/index.js +370 -61
- package/dist/index.js.map +1 -1
- package/dist/pathfinder/index.d.ts +1 -1
- package/dist/pathfinder/index.js +367 -59
- package/dist/pathfinder/index.js.map +1 -1
- package/dist/reports/license-inventory.csv +31 -24
- package/dist/schema/index.d.ts +16 -3
- package/dist/schema/index.js +368 -60
- package/dist/schema/index.js.map +1 -1
- package/dist/signals/index.d.ts +483 -395
- package/dist/signals/index.js +368 -60
- package/dist/signals/index.js.map +1 -1
- package/dist/telemetry/http/index.js +368 -59
- package/dist/telemetry/http/index.js.map +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +367 -59
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/prometheus/index.d.ts +1 -1
- package/dist/telemetry/prometheus/index.js +369 -59
- package/dist/telemetry/prometheus/index.js.map +1 -1
- package/dist/{types-BJswWpQC.d.ts → types-DdoeE7F5.d.ts} +1 -1
- package/dist/types-Dv5TERCM.d.ts +108 -0
- package/package.json +13 -8
- 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,76 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
12
12
|
|
|
13
13
|
_No unreleased changes._
|
|
14
14
|
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## [0.2.3] - 2026-01-28
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Vitest Upgrade** - Updated test framework from v2.1.9 to v4.0.18
|
|
22
|
+
- Resolves 70 Go stdlib CVEs in bundled esbuild binaries (dev/CI dependencies only)
|
|
23
|
+
- Critical vulnerabilities reduced from 6 to 0
|
|
24
|
+
- Test execution 32% faster (38s vs 56s)
|
|
25
|
+
- No breaking changes to test suite
|
|
26
|
+
|
|
27
|
+
### Security
|
|
28
|
+
|
|
29
|
+
- **CVE Remediation** - Eliminated critical Go 1.20.12 vulnerabilities in vite's nested esbuild
|
|
30
|
+
- Before: 94 findings (6 critical, 34 high, 54 medium)
|
|
31
|
+
- After: 24 findings (0 critical, 10 high, 14 medium)
|
|
32
|
+
- Remaining findings are recent 2025 CVEs in Go 1.25.5 (not legacy issues)
|
|
33
|
+
- **Note**: All vulnerabilities are in dev/CI tooling (esbuild binaries); production code surface has 0 findings
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## [0.2.2] - 2026-01-28
|
|
38
|
+
|
|
39
|
+
**Skipped** - Version number consumed by npm publish workflow reading local package.json before version bump completed. No package published to npm under this version.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## [0.2.1] - 2026-01-27
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- **Lifecycle Phase** - Project graduates from `alpha` to `beta` per Repository Lifecycle Standard
|
|
48
|
+
- 71% line coverage (above 60% beta threshold)
|
|
49
|
+
- Feature-complete modules with stable APIs
|
|
50
|
+
- Documentation kept current
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **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
|
|
55
|
+
- Uses Crucible v0.4.9 meta catalog with bundled metaschemas and vocabulary schemas
|
|
56
|
+
- Dialect auto-detection from `$schema` declaration
|
|
57
|
+
- Per-dialect AJV instance caching for performance
|
|
58
|
+
|
|
59
|
+
- **Improved Schema Validation** - `validateSchema()` now validates schemas against their declared `$schema` dialect (not just "can AJV compile it")
|
|
60
|
+
- Two-phase validation: meta-validation against dialect, then compilation check
|
|
61
|
+
- Better error messages for dialect-specific violations
|
|
62
|
+
|
|
63
|
+
- **Fulencode Module** (`@fulmenhq/tsfulmen/fulencode`) - Canonical encoding/decoding facade
|
|
64
|
+
- **Core API**: `fulencode.encode()` / `fulencode.decode()` for consistent interface
|
|
65
|
+
- **Binary Encodings**: base64, base64url, base64_raw, hex, base32, base32hex
|
|
66
|
+
- **Text Encodings**: utf-8, utf-16le, utf-16be, iso-8859-1, ascii
|
|
67
|
+
- **Features**: padding control, line wrapping, whitespace handling, checksum computation (sha256, xxh3-128)
|
|
68
|
+
- **Error Handling**: Structured `FulencodeError` with operation context and error codes
|
|
69
|
+
- Standard entry point for future non-stdlib encodings
|
|
70
|
+
|
|
71
|
+
### Changed
|
|
72
|
+
|
|
73
|
+
- **Crucible SSOT** - Updated to v0.4.9
|
|
74
|
+
- Bundled JSON Schema metaschemas for offline validation
|
|
75
|
+
- Meta catalog with draft-04 through draft-2020-12 vocabulary schemas
|
|
76
|
+
|
|
77
|
+
- **Test Coverage Improvements** - Overall coverage improved from 63.4% to 71.16%
|
|
78
|
+
- fulencode: 52.8% → 99.6% (+46.8%)
|
|
79
|
+
- fulpack: 41.7% → 72.5% (+30.8%)
|
|
80
|
+
- schema: 51.2% → 70.1% (+18.9%)
|
|
81
|
+
- pathfinder: 77.4% → 88.3% (+10.9%)
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
15
85
|
## [0.2.0] - 2026-01-13
|
|
16
86
|
|
|
17
87
|
### 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.3 | **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)
|
|
@@ -43,6 +44,7 @@ Every team writes their own HTTP status helpers, exit code enums, and country co
|
|
|
43
44
|
- ✅ **Application Identity** - .fulmen/app.yaml discovery with caching and validation (93 tests)
|
|
44
45
|
- ✅ **Pathfinder** - Filesystem traversal, repository root discovery with security boundaries, checksums, and observability (70 tests)
|
|
45
46
|
- ✅ **Three-Layer Config Loading** - Defaults → User → Env pattern with schema validation (6 tests)
|
|
47
|
+
- ✅ **Workhorse Control-Plane** - Config reload endpoint, control discovery, runtime info for service orchestration
|
|
46
48
|
|
|
47
49
|
## Installation
|
|
48
50
|
|
|
@@ -120,11 +122,12 @@ src/
|
|
|
120
122
|
├── crucible/ # 🚧 Crucible SSOT shim
|
|
121
123
|
├── errors/ # ✅ Error handling & propagation
|
|
122
124
|
├── foundry/ # ✅ Pattern catalogs, HTTP statuses, MIME detection
|
|
125
|
+
├── fulencode/ # ✅ Canonical encoding/decoding (base64, hex, base32, text)
|
|
123
126
|
├── fulhash/ # ✅ Fast hashing with XXH3-128 and SHA-256
|
|
124
127
|
├── fulpack/ # ✅ Archive operations (TAR, TAR.GZ, ZIP, GZIP)
|
|
125
128
|
├── logging/ # ✅ Progressive logging with policy enforcement
|
|
126
129
|
├── pathfinder/ # ✅ Filesystem traversal with checksums and observability
|
|
127
|
-
├── schema/ # ✅ Schema validation (AJV + CLI)
|
|
130
|
+
├── schema/ # ✅ Schema validation (AJV + CLI, multi-dialect)
|
|
128
131
|
└── telemetry/ # ✅ Metrics collection & export
|
|
129
132
|
```
|
|
130
133
|
|
|
@@ -268,6 +271,45 @@ const error = new FulmenError({
|
|
|
268
271
|
});
|
|
269
272
|
```
|
|
270
273
|
|
|
274
|
+
### Fulencode (Encoding/Decoding)
|
|
275
|
+
|
|
276
|
+
Canonical encoding/decoding facade for binary and text formats:
|
|
277
|
+
|
|
278
|
+
```typescript
|
|
279
|
+
import { fulencode } from "@fulmenhq/tsfulmen/fulencode";
|
|
280
|
+
|
|
281
|
+
// Encode binary to base64
|
|
282
|
+
const encoded = await fulencode.encode(
|
|
283
|
+
new Uint8Array([72, 101, 108, 108, 111]),
|
|
284
|
+
"base64",
|
|
285
|
+
);
|
|
286
|
+
console.log(encoded.data); // "SGVsbG8="
|
|
287
|
+
|
|
288
|
+
// Decode base64 to binary
|
|
289
|
+
const decoded = await fulencode.decode("SGVsbG8=", "base64");
|
|
290
|
+
console.log(new TextDecoder().decode(decoded.data)); // "Hello"
|
|
291
|
+
|
|
292
|
+
// Hex encoding with checksum
|
|
293
|
+
const hex = await fulencode.encode(data, "hex", {
|
|
294
|
+
hexCase: "upper",
|
|
295
|
+
computeChecksum: "sha256",
|
|
296
|
+
});
|
|
297
|
+
console.log(hex.data); // "48656C6C6F"
|
|
298
|
+
console.log(hex.checksum); // "sha256:2cf24dba..."
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**Supported Formats**:
|
|
302
|
+
|
|
303
|
+
| Binary | Text |
|
|
304
|
+
| ----------------- | ------------------ |
|
|
305
|
+
| base64 | utf-8 |
|
|
306
|
+
| base64url | utf-16le, utf-16be |
|
|
307
|
+
| base64_raw | iso-8859-1, ascii |
|
|
308
|
+
| hex | |
|
|
309
|
+
| base32, base32hex | |
|
|
310
|
+
|
|
311
|
+
**Features**: Padding control, line wrapping, whitespace handling, checksum computation (sha256, xxh3-128), structured `FulencodeError` with error codes.
|
|
312
|
+
|
|
271
313
|
### Telemetry & Metrics
|
|
272
314
|
|
|
273
315
|
```typescript
|
|
@@ -468,12 +510,15 @@ console.log(metadata.activeLayers); // ["defaults", "user", "env"]
|
|
|
468
510
|
|
|
469
511
|
### Schema Validation
|
|
470
512
|
|
|
513
|
+
Multi-dialect JSON Schema validation supporting draft-04, draft-06, draft-07, draft-2019-09, and draft-2020-12:
|
|
514
|
+
|
|
471
515
|
```typescript
|
|
472
516
|
import {
|
|
473
517
|
getGlobalRegistry,
|
|
474
518
|
compileSchemaById,
|
|
475
519
|
validateDataBySchemaId,
|
|
476
520
|
validateFileBySchemaId,
|
|
521
|
+
validateSchema,
|
|
477
522
|
normalizeSchema,
|
|
478
523
|
} from "@fulmenhq/tsfulmen/schema";
|
|
479
524
|
|
|
@@ -496,10 +541,19 @@ const fileResult = await validateFileBySchemaId(
|
|
|
496
541
|
"./my-config.yaml",
|
|
497
542
|
);
|
|
498
543
|
|
|
544
|
+
// Validate a schema document against its declared dialect
|
|
545
|
+
const schemaResult = await validateSchema({
|
|
546
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
547
|
+
type: "object",
|
|
548
|
+
properties: { name: { type: "string" } },
|
|
549
|
+
});
|
|
550
|
+
|
|
499
551
|
// Normalize schema for comparison
|
|
500
552
|
const normalized = await normalizeSchema("./schema.yaml");
|
|
501
553
|
```
|
|
502
554
|
|
|
555
|
+
**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).
|
|
556
|
+
|
|
503
557
|
### Schema Validation CLI (Developer Tool)
|
|
504
558
|
|
|
505
559
|
TSFulmen includes a CLI for schema exploration and validation during development:
|
|
@@ -1131,12 +1185,12 @@ tsfulmen is licensed under MIT license - see [LICENSE](LICENSE) for complete det
|
|
|
1131
1185
|
|
|
1132
1186
|
## Status
|
|
1133
1187
|
|
|
1134
|
-
**Lifecycle Phase**: `
|
|
1188
|
+
**Lifecycle Phase**: `beta` ([Repository Lifecycle Standard](docs/crucible-ts/standards/repository-lifecycle.md))
|
|
1135
1189
|
|
|
1136
|
-
- **Quality Bar**:
|
|
1137
|
-
- **Stability**:
|
|
1138
|
-
- **Breaking Changes**:
|
|
1139
|
-
- **Documentation**:
|
|
1190
|
+
- **Quality Bar**: 60% minimum test coverage (currently: 71%)
|
|
1191
|
+
- **Stability**: Feature-complete; stabilizing behavior
|
|
1192
|
+
- **Breaking Changes**: Addressed promptly with migration guidance
|
|
1193
|
+
- **Documentation**: Kept current
|
|
1140
1194
|
|
|
1141
1195
|
See `LIFECYCLE_PHASE` file and [CHANGELOG.md](CHANGELOG.md) for version history.
|
|
1142
1196
|
|
|
@@ -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: >
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { I as Identity, L as LoadIdentityOptions } from '../types-Dv5TERCM.js';
|
|
2
|
+
export { A as AppIdentity, a as IdentityMetadata, P as PythonMetadata, R as RepositoryCategory } from '../types-Dv5TERCM.js';
|
|
1
3
|
import { F as FulmenError } from '../fulmen-error-B_kX8jSC.js';
|
|
2
|
-
import { b as SchemaValidationDiagnostic } from '../types-
|
|
4
|
+
import { b as SchemaValidationDiagnostic } from '../types-DdoeE7F5.js';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Application Identity Constants
|
|
@@ -28,113 +30,6 @@ declare const APP_IDENTITY_SCHEMA_ID = "config/repository/app-identity/v1.0.0/ap
|
|
|
28
30
|
*/
|
|
29
31
|
declare const MAX_ANCESTOR_SEARCH_DEPTH = 20;
|
|
30
32
|
|
|
31
|
-
/**
|
|
32
|
-
* Application Identity Types
|
|
33
|
-
*
|
|
34
|
-
* TypeScript interfaces matching the Crucible app-identity schema v1.0.0
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Repository category taxonomy from Fulmen standards
|
|
38
|
-
*/
|
|
39
|
-
type RepositoryCategory = "cli" | "workhorse" | "service" | "library" | "pipeline" | "codex" | "sdk";
|
|
40
|
-
/**
|
|
41
|
-
* Python-specific packaging metadata
|
|
42
|
-
* Field names use snake_case to match Crucible schema
|
|
43
|
-
*/
|
|
44
|
-
interface PythonMetadata {
|
|
45
|
-
readonly distribution_name?: string;
|
|
46
|
-
readonly package_name?: string;
|
|
47
|
-
readonly console_scripts?: ReadonlyArray<{
|
|
48
|
-
readonly name: string;
|
|
49
|
-
readonly entry_point: string;
|
|
50
|
-
}>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Required application identity fields
|
|
54
|
-
*
|
|
55
|
-
* All fields are readonly to enforce immutability
|
|
56
|
-
* Field names use snake_case to match Crucible schema
|
|
57
|
-
*/
|
|
58
|
-
interface AppIdentity {
|
|
59
|
-
/**
|
|
60
|
-
* Lowercase kebab-case binary/executable name
|
|
61
|
-
* Pattern: ^[a-z][a-z0-9-]{0,62}[a-z0-9]$
|
|
62
|
-
*/
|
|
63
|
-
readonly binary_name: string;
|
|
64
|
-
/**
|
|
65
|
-
* Lowercase alphanumeric vendor namespace (no hyphens)
|
|
66
|
-
* Pattern: ^[a-z][a-z0-9]{0,62}[a-z0-9]$
|
|
67
|
-
*/
|
|
68
|
-
readonly vendor: string;
|
|
69
|
-
/**
|
|
70
|
-
* Uppercase environment variable prefix (must end with _)
|
|
71
|
-
* Pattern: ^[A-Z][A-Z0-9_]*_$
|
|
72
|
-
*/
|
|
73
|
-
readonly env_prefix: string;
|
|
74
|
-
/**
|
|
75
|
-
* Filesystem-safe config directory name
|
|
76
|
-
* Pattern: ^[a-z][a-z0-9-]{0,62}[a-z0-9]$
|
|
77
|
-
*/
|
|
78
|
-
readonly config_name: string;
|
|
79
|
-
/**
|
|
80
|
-
* One-line application description (10-200 chars)
|
|
81
|
-
*/
|
|
82
|
-
readonly description: string;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Optional metadata fields
|
|
86
|
-
*
|
|
87
|
-
* Additional properties are allowed for extensibility
|
|
88
|
-
* Field names use snake_case to match Crucible schema
|
|
89
|
-
*/
|
|
90
|
-
interface IdentityMetadata {
|
|
91
|
-
readonly project_url?: string;
|
|
92
|
-
readonly support_email?: string;
|
|
93
|
-
readonly license?: string;
|
|
94
|
-
readonly repository_category?: RepositoryCategory;
|
|
95
|
-
readonly telemetry_namespace?: string;
|
|
96
|
-
readonly registry_id?: string;
|
|
97
|
-
readonly python?: PythonMetadata;
|
|
98
|
-
readonly [key: string]: unknown;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Complete application identity document
|
|
102
|
-
*/
|
|
103
|
-
interface Identity {
|
|
104
|
-
readonly app: AppIdentity;
|
|
105
|
-
readonly metadata?: IdentityMetadata;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Options for loading identity
|
|
109
|
-
*/
|
|
110
|
-
interface LoadIdentityOptions {
|
|
111
|
-
/**
|
|
112
|
-
* Explicit path override
|
|
113
|
-
* Highest priority in discovery algorithm
|
|
114
|
-
*/
|
|
115
|
-
readonly path?: string;
|
|
116
|
-
/**
|
|
117
|
-
* Test injection - bypass filesystem and discovery
|
|
118
|
-
* Never cached
|
|
119
|
-
*/
|
|
120
|
-
readonly identity?: Identity;
|
|
121
|
-
/**
|
|
122
|
-
* Starting directory for ancestor search
|
|
123
|
-
* Defaults to process.cwd()
|
|
124
|
-
*/
|
|
125
|
-
readonly startDir?: string;
|
|
126
|
-
/**
|
|
127
|
-
* Force reload, bypass cache
|
|
128
|
-
* Useful for testing cache behavior
|
|
129
|
-
*/
|
|
130
|
-
readonly skipCache?: boolean;
|
|
131
|
-
/**
|
|
132
|
-
* Skip schema validation (dangerous)
|
|
133
|
-
* Only use for testing or when identity is pre-validated
|
|
134
|
-
*/
|
|
135
|
-
readonly skipValidation?: boolean;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
33
|
/**
|
|
139
34
|
* Embedded Identity Registration
|
|
140
35
|
*
|
|
@@ -383,4 +278,31 @@ declare function clearIdentityCache(): void;
|
|
|
383
278
|
*/
|
|
384
279
|
declare function loadIdentity(options?: LoadIdentityOptions): Promise<Identity>;
|
|
385
280
|
|
|
386
|
-
|
|
281
|
+
type RuntimeName = "bun" | "node" | "unknown";
|
|
282
|
+
interface RuntimeInfo {
|
|
283
|
+
service: {
|
|
284
|
+
name: string;
|
|
285
|
+
vendor?: string;
|
|
286
|
+
version?: string;
|
|
287
|
+
};
|
|
288
|
+
runtime: {
|
|
289
|
+
name: RuntimeName;
|
|
290
|
+
version?: string;
|
|
291
|
+
};
|
|
292
|
+
platform: {
|
|
293
|
+
os: NodeJS.Platform;
|
|
294
|
+
arch: string;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
interface BuildRuntimeInfoOptions {
|
|
298
|
+
identity?: Identity;
|
|
299
|
+
version?: string;
|
|
300
|
+
serviceName?: string;
|
|
301
|
+
vendor?: string;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Build a minimal runtime info payload suitable for discovery endpoints.
|
|
305
|
+
*/
|
|
306
|
+
declare function buildRuntimeInfo(options?: BuildRuntimeInfoOptions): RuntimeInfo;
|
|
307
|
+
|
|
308
|
+
export { APP_IDENTITY_DIR, APP_IDENTITY_ENV_VAR, APP_IDENTITY_FILENAME, APP_IDENTITY_SCHEMA_ID, AppIdentityError, type BuildRuntimeInfoOptions, type ConfigIdentifiers, Identity, LoadIdentityOptions, MAX_ANCESTOR_SEARCH_DEPTH, type RuntimeInfo, type RuntimeName, buildEnvVar, buildRuntimeInfo, clearEmbeddedIdentity, clearIdentityCache, getBinaryName, getCachedIdentity, getConfigIdentifiers, getConfigName, getEmbeddedIdentity, getEnvPrefix, getEnvVar, getTelemetryNamespace, getVendor, hasEmbeddedIdentity, loadIdentity, registerEmbeddedIdentity };
|