@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
|
@@ -113,7 +113,7 @@ interface SchemaRegistryOptions {
|
|
|
113
113
|
/**
|
|
114
114
|
* Schema input types
|
|
115
115
|
*/
|
|
116
|
-
type SchemaInput = string | Buffer | Record<string, unknown>;
|
|
116
|
+
type SchemaInput = string | Buffer | boolean | Record<string, unknown>;
|
|
117
117
|
/**
|
|
118
118
|
* Schema source information
|
|
119
119
|
*/
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"dependencies": {
|
|
4
4
|
"@3leaps/string-metrics-wasm": "0.3.8",
|
|
5
5
|
"ajv": "^8.17.1",
|
|
6
|
+
"ajv-draft-04": "^1.0.0",
|
|
6
7
|
"ajv-formats": "^3.0.1",
|
|
7
8
|
"archiver": "^7.0.1",
|
|
8
9
|
"commander": "^14.0.1",
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
"@types/node": "^22.9.0",
|
|
24
25
|
"@types/picomatch": "^4.0.2",
|
|
25
26
|
"@types/unzipper": "^0.10.11",
|
|
26
|
-
"@vitest/coverage-v8": "^
|
|
27
|
+
"@vitest/coverage-v8": "^2.1.5",
|
|
27
28
|
"@vitest/ui": "^2.1.5",
|
|
28
29
|
"fastify": "^5.2.0",
|
|
29
30
|
"prettier": "^3.6.2",
|
|
@@ -74,6 +75,10 @@
|
|
|
74
75
|
"import": "./dist/foundry/similarity/index.js",
|
|
75
76
|
"types": "./dist/foundry/similarity/index.d.ts"
|
|
76
77
|
},
|
|
78
|
+
"./fulencode": {
|
|
79
|
+
"import": "./dist/fulencode/index.js",
|
|
80
|
+
"types": "./dist/fulencode/index.d.ts"
|
|
81
|
+
},
|
|
77
82
|
"./fulhash": {
|
|
78
83
|
"import": "./dist/fulhash/index.js",
|
|
79
84
|
"types": "./dist/fulhash/index.d.ts"
|
|
@@ -179,5 +184,5 @@
|
|
|
179
184
|
},
|
|
180
185
|
"type": "module",
|
|
181
186
|
"types": "./dist/index.d.ts",
|
|
182
|
-
"version": "0.2.
|
|
187
|
+
"version": "0.2.2"
|
|
183
188
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Fulencode Schemas (v1.0.0)
|
|
2
|
+
|
|
3
|
+
These schemas define the SSOT contracts for the Fulencode module.
|
|
4
|
+
|
|
5
|
+
Fulencode is an opt-in (Specialized-tier) facade that standardizes encoding/decoding, text encoding validation/detection, Unicode normalization, BOM handling, and security limits across Fulmen helper libraries.
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
- `fulencode-config.schema.json` - Module configuration (limits + defaults).
|
|
10
|
+
|
|
11
|
+
Method option schemas:
|
|
12
|
+
|
|
13
|
+
- `encode-options.schema.json`
|
|
14
|
+
- `decode-options.schema.json`
|
|
15
|
+
- `detect-options.schema.json`
|
|
16
|
+
- `normalize-options.schema.json`
|
|
17
|
+
|
|
18
|
+
Result payload schemas:
|
|
19
|
+
|
|
20
|
+
- `encoding-result.schema.json`
|
|
21
|
+
- `decoding-result.schema.json`
|
|
22
|
+
- `detection-result.schema.json`
|
|
23
|
+
- `normalization-result.schema.json`
|
|
24
|
+
- `bom-result.schema.json`
|
|
25
|
+
|
|
26
|
+
Error envelope:
|
|
27
|
+
|
|
28
|
+
- `fulencode-error.schema.json`
|
|
29
|
+
|
|
30
|
+
## Related SSOT (Taxonomies + Standard)
|
|
31
|
+
|
|
32
|
+
- Standard: `docs/standards/library/modules/fulencode.md`
|
|
33
|
+
- Encoding formats taxonomy: `schemas/taxonomy/library/fulencode/encoding-families/v1.0.0/families.yaml`
|
|
34
|
+
- Normalization profiles taxonomy: `schemas/taxonomy/library/fulencode/normalization-profiles/v1.0.0/profiles.yaml`
|
|
35
|
+
- Detection confidence taxonomy: `schemas/taxonomy/library/fulencode/detection-confidence/v1.0.0/levels.yaml`
|
|
36
|
+
|
|
37
|
+
These schemas validate data structures produced by helper libraries and support cross-language parity fixtures.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/bom-result.schema.json",
|
|
4
|
+
"title": "Fulencode BOM Result",
|
|
5
|
+
"description": "Result payload for fulencode BOM detection",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"bom_type": {
|
|
9
|
+
"description": "Detected BOM type or null when none.",
|
|
10
|
+
"oneOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"utf-8",
|
|
15
|
+
"utf-16le",
|
|
16
|
+
"utf-16be",
|
|
17
|
+
"utf-32le",
|
|
18
|
+
"utf-32be"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"type": "null"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"byte_length": {
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 0
|
|
29
|
+
},
|
|
30
|
+
"encoding_implied": {
|
|
31
|
+
"description": "Encoding implied by the BOM when present.",
|
|
32
|
+
"oneOf": [
|
|
33
|
+
{
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"required": [
|
|
43
|
+
"bom_type",
|
|
44
|
+
"byte_length",
|
|
45
|
+
"encoding_implied"
|
|
46
|
+
],
|
|
47
|
+
"additionalProperties": false
|
|
48
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/decode-options.schema.json",
|
|
4
|
+
"title": "Fulencode Decode Options",
|
|
5
|
+
"description": "Options for fulencode decode() operation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"verify_checksum": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"description": "Verify embedded checksum when present."
|
|
11
|
+
},
|
|
12
|
+
"compute_checksum": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Checksum algorithm to compute on decoded output.",
|
|
15
|
+
"enum": [
|
|
16
|
+
"xxh3-128",
|
|
17
|
+
"sha256",
|
|
18
|
+
"sha512",
|
|
19
|
+
"sha1",
|
|
20
|
+
"md5"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"max_decoded_size": {
|
|
24
|
+
"type": "integer",
|
|
25
|
+
"description": "Maximum decoded output size in bytes.",
|
|
26
|
+
"minimum": 1024
|
|
27
|
+
},
|
|
28
|
+
"max_expansion_ratio": {
|
|
29
|
+
"type": "number",
|
|
30
|
+
"description": "Maximum decode expansion ratio (encoding bomb protection).",
|
|
31
|
+
"minimum": 1.0
|
|
32
|
+
},
|
|
33
|
+
"on_error": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Error handling mode.",
|
|
36
|
+
"enum": [
|
|
37
|
+
"strict",
|
|
38
|
+
"replace",
|
|
39
|
+
"ignore",
|
|
40
|
+
"fallback"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"fallback_formats": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"description": "Fallback formats to attempt when on_error is fallback.",
|
|
46
|
+
"items": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"ignore_whitespace": {
|
|
51
|
+
"type": "boolean",
|
|
52
|
+
"description": "Ignore ASCII whitespace in encoded input when supported."
|
|
53
|
+
},
|
|
54
|
+
"validate_padding": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Require correct padding when supported."
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/decoding-result.schema.json",
|
|
4
|
+
"title": "Fulencode Decoding Result",
|
|
5
|
+
"description": "Result payload for fulencode decode()",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"data": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 0,
|
|
13
|
+
"maximum": 255
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"format": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": [
|
|
19
|
+
"base64",
|
|
20
|
+
"base64url",
|
|
21
|
+
"base64_raw",
|
|
22
|
+
"base32",
|
|
23
|
+
"base32hex",
|
|
24
|
+
"hex",
|
|
25
|
+
"utf-8",
|
|
26
|
+
"utf-16le",
|
|
27
|
+
"utf-16be",
|
|
28
|
+
"iso-8859-1",
|
|
29
|
+
"cp1252",
|
|
30
|
+
"ascii"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"input_size": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"minimum": 0
|
|
36
|
+
},
|
|
37
|
+
"output_size": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 0
|
|
40
|
+
},
|
|
41
|
+
"checksum": {
|
|
42
|
+
"type": "string"
|
|
43
|
+
},
|
|
44
|
+
"checksum_verified": {
|
|
45
|
+
"type": "boolean"
|
|
46
|
+
},
|
|
47
|
+
"checksum_algorithm": {
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
"warnings": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"corrections_applied": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"minimum": 0
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"required": [
|
|
62
|
+
"data",
|
|
63
|
+
"format",
|
|
64
|
+
"input_size",
|
|
65
|
+
"output_size",
|
|
66
|
+
"warnings",
|
|
67
|
+
"corrections_applied"
|
|
68
|
+
],
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/detect-options.schema.json",
|
|
4
|
+
"title": "Fulencode Detect Options",
|
|
5
|
+
"description": "Options for fulencode detect() operation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"max_sample_size": {
|
|
9
|
+
"type": "integer",
|
|
10
|
+
"description": "Maximum bytes to analyze.",
|
|
11
|
+
"minimum": 32
|
|
12
|
+
},
|
|
13
|
+
"min_confidence": {
|
|
14
|
+
"type": "number",
|
|
15
|
+
"description": "Minimum confidence threshold for a non-error detection result.",
|
|
16
|
+
"minimum": 0.0,
|
|
17
|
+
"maximum": 1.0
|
|
18
|
+
},
|
|
19
|
+
"recognize_multibase": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Recognize multibase prefixes (detection only; encoding may require extension module)."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/detection-result.schema.json",
|
|
4
|
+
"title": "Fulencode Detection Result",
|
|
5
|
+
"description": "Result payload for fulencode detect()",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"encoding": {
|
|
9
|
+
"description": "Detected encoding or null when unknown.",
|
|
10
|
+
"oneOf": [
|
|
11
|
+
{
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "null"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"confidence": {
|
|
20
|
+
"type": "number",
|
|
21
|
+
"minimum": 0.0,
|
|
22
|
+
"maximum": 1.0
|
|
23
|
+
},
|
|
24
|
+
"level": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": [
|
|
27
|
+
"high",
|
|
28
|
+
"medium",
|
|
29
|
+
"low"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"multibase_prefix": {
|
|
33
|
+
"description": "Detected multibase prefix if present.",
|
|
34
|
+
"oneOf": [
|
|
35
|
+
{
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "null"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"warnings": {
|
|
44
|
+
"type": "array",
|
|
45
|
+
"items": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"encoding",
|
|
52
|
+
"confidence",
|
|
53
|
+
"level",
|
|
54
|
+
"warnings"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/encode-options.schema.json",
|
|
4
|
+
"title": "Fulencode Encode Options",
|
|
5
|
+
"description": "Options for fulencode encode() operation",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"padding": {
|
|
9
|
+
"type": "boolean",
|
|
10
|
+
"description": "Enable/disable padding when supported (Base64/Base32)."
|
|
11
|
+
},
|
|
12
|
+
"case": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Hex output case.",
|
|
15
|
+
"enum": [
|
|
16
|
+
"upper",
|
|
17
|
+
"lower"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"line_length": {
|
|
21
|
+
"description": "Optional line wrap length for text output.",
|
|
22
|
+
"oneOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "integer",
|
|
25
|
+
"minimum": 1
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "null"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"line_ending": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Line ending to use when line wrapping.",
|
|
35
|
+
"enum": [
|
|
36
|
+
"\n",
|
|
37
|
+
"\r\n"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"max_encoded_size": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"description": "Maximum encoded output size in bytes.",
|
|
43
|
+
"minimum": 1024
|
|
44
|
+
},
|
|
45
|
+
"compute_checksum": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Checksum algorithm to compute on encoded output.",
|
|
48
|
+
"enum": [
|
|
49
|
+
"xxh3-128",
|
|
50
|
+
"sha256",
|
|
51
|
+
"sha512",
|
|
52
|
+
"sha1",
|
|
53
|
+
"md5"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"embed_checksum": {
|
|
57
|
+
"type": "boolean",
|
|
58
|
+
"description": "Whether to embed checksum alongside encoded output (implementation-defined framing)."
|
|
59
|
+
},
|
|
60
|
+
"on_error": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Error handling mode when encoding text inputs.",
|
|
63
|
+
"enum": [
|
|
64
|
+
"strict",
|
|
65
|
+
"replace",
|
|
66
|
+
"ignore"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/encoding-result.schema.json",
|
|
4
|
+
"title": "Fulencode Encoding Result",
|
|
5
|
+
"description": "Result payload for fulencode encode()",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"data": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"format": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"base64",
|
|
15
|
+
"base64url",
|
|
16
|
+
"base64_raw",
|
|
17
|
+
"base32",
|
|
18
|
+
"base32hex",
|
|
19
|
+
"hex",
|
|
20
|
+
"utf-8",
|
|
21
|
+
"utf-16le",
|
|
22
|
+
"utf-16be",
|
|
23
|
+
"iso-8859-1",
|
|
24
|
+
"cp1252",
|
|
25
|
+
"ascii"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"input_size": {
|
|
29
|
+
"type": "integer",
|
|
30
|
+
"minimum": 0
|
|
31
|
+
},
|
|
32
|
+
"output_size": {
|
|
33
|
+
"type": "integer",
|
|
34
|
+
"minimum": 0
|
|
35
|
+
},
|
|
36
|
+
"checksum": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"checksum_algorithm": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"warnings": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"required": [
|
|
50
|
+
"data",
|
|
51
|
+
"format",
|
|
52
|
+
"input_size",
|
|
53
|
+
"output_size",
|
|
54
|
+
"warnings"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": false
|
|
57
|
+
}
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"minimum": 1,
|
|
34
34
|
"maximum": 100
|
|
35
35
|
}
|
|
36
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"additionalProperties": false
|
|
37
38
|
},
|
|
38
39
|
"defaults": {
|
|
39
40
|
"type": "object",
|
|
@@ -66,7 +67,8 @@
|
|
|
66
67
|
"description": "Default normalization profile",
|
|
67
68
|
"default": "nfc"
|
|
68
69
|
}
|
|
69
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"additionalProperties": false
|
|
70
72
|
},
|
|
71
73
|
"detection": {
|
|
72
74
|
"type": "object",
|
|
@@ -84,7 +86,9 @@
|
|
|
84
86
|
"default": 8192,
|
|
85
87
|
"minimum": 32
|
|
86
88
|
}
|
|
87
|
-
}
|
|
89
|
+
},
|
|
90
|
+
"additionalProperties": false
|
|
88
91
|
}
|
|
89
|
-
}
|
|
92
|
+
},
|
|
93
|
+
"additionalProperties": false
|
|
90
94
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/fulencode-error.schema.json",
|
|
4
|
+
"title": "Fulencode Error",
|
|
5
|
+
"description": "Canonical error envelope for Fulencode operations",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"code": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"message": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"operation": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"input_format": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"output_format": {
|
|
21
|
+
"type": "string"
|
|
22
|
+
},
|
|
23
|
+
"details": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"byte_offset": {
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": 0
|
|
29
|
+
},
|
|
30
|
+
"codepoint_offset": {
|
|
31
|
+
"type": "integer",
|
|
32
|
+
"minimum": 0
|
|
33
|
+
},
|
|
34
|
+
"detected_encoding": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"confidence": {
|
|
38
|
+
"type": "number",
|
|
39
|
+
"minimum": 0.0,
|
|
40
|
+
"maximum": 1.0
|
|
41
|
+
},
|
|
42
|
+
"invalid_bytes": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"minimum": 0,
|
|
47
|
+
"maximum": 255
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"expected": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
"actual": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"code",
|
|
62
|
+
"message",
|
|
63
|
+
"operation"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/crucible/library/fulencode/v1.0.0/normalization-result.schema.json",
|
|
4
|
+
"title": "Fulencode Normalization Result",
|
|
5
|
+
"description": "Result payload for fulencode normalize()",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"text": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"profile": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"input_length": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"minimum": 0
|
|
17
|
+
},
|
|
18
|
+
"output_length": {
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"minimum": 0
|
|
21
|
+
},
|
|
22
|
+
"transformations_applied": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"semantic_changes": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"position": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"minimum": 0
|
|
36
|
+
},
|
|
37
|
+
"original": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"normalized": {
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
"reason": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"position",
|
|
49
|
+
"original",
|
|
50
|
+
"normalized",
|
|
51
|
+
"reason"
|
|
52
|
+
],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"warnings": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"required": [
|
|
64
|
+
"text",
|
|
65
|
+
"profile",
|
|
66
|
+
"input_length",
|
|
67
|
+
"output_length",
|
|
68
|
+
"transformations_applied",
|
|
69
|
+
"semantic_changes",
|
|
70
|
+
"warnings"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": false
|
|
73
|
+
}
|