@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
|
@@ -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
|
*/
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Identity Types
|
|
3
|
+
*
|
|
4
|
+
* TypeScript interfaces matching the Crucible app-identity schema v1.0.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Repository category taxonomy from Fulmen standards
|
|
8
|
+
*/
|
|
9
|
+
type RepositoryCategory = "cli" | "workhorse" | "service" | "library" | "pipeline" | "codex" | "sdk";
|
|
10
|
+
/**
|
|
11
|
+
* Python-specific packaging metadata
|
|
12
|
+
* Field names use snake_case to match Crucible schema
|
|
13
|
+
*/
|
|
14
|
+
interface PythonMetadata {
|
|
15
|
+
readonly distribution_name?: string;
|
|
16
|
+
readonly package_name?: string;
|
|
17
|
+
readonly console_scripts?: ReadonlyArray<{
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly entry_point: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Required application identity fields
|
|
24
|
+
*
|
|
25
|
+
* All fields are readonly to enforce immutability
|
|
26
|
+
* Field names use snake_case to match Crucible schema
|
|
27
|
+
*/
|
|
28
|
+
interface AppIdentity {
|
|
29
|
+
/**
|
|
30
|
+
* Lowercase kebab-case binary/executable name
|
|
31
|
+
* Pattern: ^[a-z][a-z0-9-]{0,62}[a-z0-9]$
|
|
32
|
+
*/
|
|
33
|
+
readonly binary_name: string;
|
|
34
|
+
/**
|
|
35
|
+
* Lowercase alphanumeric vendor namespace (no hyphens)
|
|
36
|
+
* Pattern: ^[a-z][a-z0-9]{0,62}[a-z0-9]$
|
|
37
|
+
*/
|
|
38
|
+
readonly vendor: string;
|
|
39
|
+
/**
|
|
40
|
+
* Uppercase environment variable prefix (must end with _)
|
|
41
|
+
* Pattern: ^[A-Z][A-Z0-9_]*_$
|
|
42
|
+
*/
|
|
43
|
+
readonly env_prefix: string;
|
|
44
|
+
/**
|
|
45
|
+
* Filesystem-safe config directory name
|
|
46
|
+
* Pattern: ^[a-z][a-z0-9-]{0,62}[a-z0-9]$
|
|
47
|
+
*/
|
|
48
|
+
readonly config_name: string;
|
|
49
|
+
/**
|
|
50
|
+
* One-line application description (10-200 chars)
|
|
51
|
+
*/
|
|
52
|
+
readonly description: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Optional metadata fields
|
|
56
|
+
*
|
|
57
|
+
* Additional properties are allowed for extensibility
|
|
58
|
+
* Field names use snake_case to match Crucible schema
|
|
59
|
+
*/
|
|
60
|
+
interface IdentityMetadata {
|
|
61
|
+
readonly project_url?: string;
|
|
62
|
+
readonly support_email?: string;
|
|
63
|
+
readonly license?: string;
|
|
64
|
+
readonly repository_category?: RepositoryCategory;
|
|
65
|
+
readonly telemetry_namespace?: string;
|
|
66
|
+
readonly registry_id?: string;
|
|
67
|
+
readonly python?: PythonMetadata;
|
|
68
|
+
readonly [key: string]: unknown;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Complete application identity document
|
|
72
|
+
*/
|
|
73
|
+
interface Identity {
|
|
74
|
+
readonly app: AppIdentity;
|
|
75
|
+
readonly metadata?: IdentityMetadata;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Options for loading identity
|
|
79
|
+
*/
|
|
80
|
+
interface LoadIdentityOptions {
|
|
81
|
+
/**
|
|
82
|
+
* Explicit path override
|
|
83
|
+
* Highest priority in discovery algorithm
|
|
84
|
+
*/
|
|
85
|
+
readonly path?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Test injection - bypass filesystem and discovery
|
|
88
|
+
* Never cached
|
|
89
|
+
*/
|
|
90
|
+
readonly identity?: Identity;
|
|
91
|
+
/**
|
|
92
|
+
* Starting directory for ancestor search
|
|
93
|
+
* Defaults to process.cwd()
|
|
94
|
+
*/
|
|
95
|
+
readonly startDir?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Force reload, bypass cache
|
|
98
|
+
* Useful for testing cache behavior
|
|
99
|
+
*/
|
|
100
|
+
readonly skipCache?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Skip schema validation (dangerous)
|
|
103
|
+
* Only use for testing or when identity is pre-validated
|
|
104
|
+
*/
|
|
105
|
+
readonly skipValidation?: boolean;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type { AppIdentity as A, Identity as I, LoadIdentityOptions as L, PythonMetadata as P, RepositoryCategory as R, IdentityMetadata as a };
|
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,19 +24,19 @@
|
|
|
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": "^4.0.
|
|
27
|
-
"@vitest/ui": "^
|
|
27
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
28
|
+
"@vitest/ui": "^4.0.18",
|
|
28
29
|
"fastify": "^5.2.0",
|
|
29
30
|
"prettier": "^3.6.2",
|
|
30
31
|
"prom-client": "^15.1.3",
|
|
31
32
|
"tsup": "^8.3.5",
|
|
32
33
|
"tsx": "^4.19.2",
|
|
33
34
|
"typescript": "^5.7.2",
|
|
34
|
-
"vitest": "^
|
|
35
|
+
"vitest": "^4.0.18"
|
|
35
36
|
},
|
|
36
37
|
"engines": {
|
|
37
|
-
"bun": "
|
|
38
|
-
"node": "
|
|
38
|
+
"bun": ">=1.0.0",
|
|
39
|
+
"node": ">=20.0.0"
|
|
39
40
|
},
|
|
40
41
|
"exports": {
|
|
41
42
|
".": {
|
|
@@ -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"
|
|
@@ -160,13 +165,13 @@
|
|
|
160
165
|
"dev": "tsx src/index.ts",
|
|
161
166
|
"lint": "make lint",
|
|
162
167
|
"lint:fix": "make fmt",
|
|
163
|
-
"prepublishOnly": "bun run quality
|
|
168
|
+
"prepublishOnly": "bunx tsx scripts/release-guard-prepublish.ts && bun run quality && bun run validate:all && bunx tsx scripts/prepare-wasm-package.ts",
|
|
164
169
|
"quality": "make quality",
|
|
165
170
|
"test": "make test",
|
|
166
171
|
"test:coverage": "make test-coverage",
|
|
167
172
|
"test:watch": "make test-watch",
|
|
168
173
|
"typecheck": "make typecheck",
|
|
169
|
-
"validate:all": "bun run validate:exports
|
|
174
|
+
"validate:all": "bun run validate:exports && bun run validate:tsup && bun run validate:source-modules && bun run validate:package && bun run validate:imports && bun run validate:types",
|
|
170
175
|
"validate:exports": "bunx tsx scripts/validate-exports.ts",
|
|
171
176
|
"validate:imports": "bunx tsx scripts/validate-imports.ts",
|
|
172
177
|
"validate:package": "bunx tsx scripts/validate-package-contents.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.3"
|
|
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
|
}
|