@fulmenhq/tsfulmen 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +616 -0
- package/LICENSE +57 -0
- package/README.md +674 -0
- package/config/crucible-ts/README.md +38 -0
- package/config/crucible-ts/library/foundry/country-codes.yaml +29 -0
- package/config/crucible-ts/library/foundry/exit-codes.snapshot.json +351 -0
- package/config/crucible-ts/library/foundry/exit-codes.yaml +483 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/invalid-behavior.yaml +45 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/invalid-exit-code.yaml +51 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/malformed.yaml +44 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/invalid/missing-required.yaml +36 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/parity-snapshot.json +162 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/valid/complete.yaml +314 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/valid/custom-behavior.yaml +96 -0
- package/config/crucible-ts/library/foundry/fixtures/signals/valid/minimal.yaml +55 -0
- package/config/crucible-ts/library/foundry/http-statuses.yaml +148 -0
- package/config/crucible-ts/library/foundry/mime-types.yaml +39 -0
- package/config/crucible-ts/library/foundry/patterns.yaml +185 -0
- package/config/crucible-ts/library/foundry/signals.yaml +331 -0
- package/config/crucible-ts/library/foundry/similarity-fixtures.yaml +432 -0
- package/config/crucible-ts/library/foundry/simplified-modes.snapshot.json +117 -0
- package/config/crucible-ts/library/fulhash/fixtures.yaml +160 -0
- package/config/crucible-ts/library/v1.0.0/module-manifest.yaml +179 -0
- package/config/crucible-ts/repository/app-identity/app-identity.example.yaml +42 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-binary-name.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-env-prefix.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/invalid-vendor.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/malformed-yaml.yaml +8 -0
- package/config/crucible-ts/repository/app-identity/fixtures/invalid/missing-required.yaml +6 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/complete.yaml +20 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/minimal.yaml +7 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/monorepo-api.yaml +10 -0
- package/config/crucible-ts/repository/app-identity/fixtures/valid/monorepo-worker.yaml +10 -0
- package/config/crucible-ts/repository/app-identity/parity-snapshot.json +125 -0
- package/config/crucible-ts/server/management/server-management.yaml +141 -0
- package/config/crucible-ts/sync/README.md +13 -0
- package/config/crucible-ts/sync/sync-keys.yaml +74 -0
- package/config/crucible-ts/taxonomy/languages.yaml +33 -0
- package/config/crucible-ts/taxonomy/metrics.yaml +115 -0
- package/config/crucible-ts/taxonomy/repository-categories.yaml +66 -0
- package/config/crucible-ts/terminal/v1.0.0/terminal-overrides-defaults.yaml +38 -0
- package/config/crucible-ts/web/branding/site-branding.yaml +21 -0
- package/config/crucible-ts/web/styling/site-styling.yaml +104 -0
- package/dist/appidentity/index.d.ts +304 -0
- package/dist/appidentity/index.js +5519 -0
- package/dist/appidentity/index.js.map +1 -0
- package/dist/config/index.d.ts +144 -0
- package/dist/config/index.js +5752 -0
- package/dist/config/index.js.map +1 -0
- package/dist/crucible/index.d.ts +78 -0
- package/dist/crucible/index.js +6038 -0
- package/dist/crucible/index.js.map +1 -0
- package/dist/docscribe/index.d.ts +110 -0
- package/dist/docscribe/index.js +682 -0
- package/dist/docscribe/index.js.map +1 -0
- package/dist/errors/index.d.ts +150 -0
- package/dist/errors/index.js +5583 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/foundry/index.d.ts +1557 -0
- package/dist/foundry/index.js +5474 -0
- package/dist/foundry/index.js.map +1 -0
- package/dist/foundry/similarity/index.d.ts +17 -0
- package/dist/foundry/similarity/index.js +136 -0
- package/dist/foundry/similarity/index.js.map +1 -0
- package/dist/fulhash/index.d.ts +82 -0
- package/dist/fulhash/index.js +374 -0
- package/dist/fulhash/index.js.map +1 -0
- package/dist/fulmen-error-B_kX8jSC.d.ts +309 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +6197 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-JU2jYitA.d.ts +171 -0
- package/dist/logging/index.d.ts +198 -0
- package/dist/logging/index.js +578 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/pathfinder/index.d.ts +532 -0
- package/dist/pathfinder/index.js +6750 -0
- package/dist/pathfinder/index.js.map +1 -0
- package/dist/registry-x1-Qi_Tz.d.ts +349 -0
- package/dist/schema/index.d.ts +388 -0
- package/dist/schema/index.js +5522 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/suggest-CLqjLZ5L.d.ts +168 -0
- package/dist/telemetry/index.d.ts +161 -0
- package/dist/telemetry/index.js +5610 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/types-B_WtvQbS.d.ts +214 -0
- package/package.json +130 -0
- package/schemas/crucible-ts/api/http/v1.0.0/README.md +22 -0
- package/schemas/crucible-ts/api/http/v1.0.0/error-response.schema.json +54 -0
- package/schemas/crucible-ts/api/http/v1.0.0/health-response.schema.json +70 -0
- package/schemas/crucible-ts/api/http/v1.0.0/success-response.schema.json +51 -0
- package/schemas/crucible-ts/api/http/v1.0.0/version-response.schema.json +61 -0
- package/schemas/crucible-ts/ascii/v1.0.0/README.md +69 -0
- package/schemas/crucible-ts/ascii/v1.0.0/box-chars.schema.json +60 -0
- package/schemas/crucible-ts/ascii/v1.0.0/string-analysis.schema.json +45 -0
- package/schemas/crucible-ts/assessment/README.md +25 -0
- package/schemas/crucible-ts/assessment/v1.0.0/severity-definitions.schema.json +60 -0
- package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/README.md +11 -0
- package/schemas/crucible-ts/config/fulmen-ecosystem/v1.0.0/fulmen-config-paths.schema.json +61 -0
- package/schemas/crucible-ts/config/goneat/README.md +60 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/dates.yaml +234 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/goneat-config.yaml +344 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/lifecycle-phase.json +20 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/release-phase.json +17 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/security-policy.yaml +178 -0
- package/schemas/crucible-ts/config/goneat/v1.0.0/version-policy.schema.yaml +205 -0
- package/schemas/crucible-ts/config/repository/app-identity/v1.0.0/app-identity.schema.json +143 -0
- package/schemas/crucible-ts/config/repository/v1.0.0/lifecycle-phase.json +20 -0
- package/schemas/crucible-ts/config/repository-category/codex/v1.0.0/codex-config.schema.json +288 -0
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-adoption-status.json +60 -0
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-frontmatter.schema.json +225 -0
- package/schemas/crucible-ts/config/standards/v1.0.0/adr-lifecycle-status.json +62 -0
- package/schemas/crucible-ts/config/sync-consumer-config.yaml +51 -0
- package/schemas/crucible-ts/config/sync-keys.schema.yaml +37 -0
- package/schemas/crucible-ts/content/README.md +19 -0
- package/schemas/crucible-ts/content/binary-embed-manifest/v1.0.0/README.md +13 -0
- package/schemas/crucible-ts/content/binary-embed-manifest/v1.0.0/binary-embed-manifest.schema.yaml +36 -0
- package/schemas/crucible-ts/content/embed-manifest/v1.1.0/README.md +13 -0
- package/schemas/crucible-ts/content/embed-manifest/v1.1.0/embed-manifest.schema.yaml +78 -0
- package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/README.md +200 -0
- package/schemas/crucible-ts/content/ssot-provenance/v1.0.0/ssot-provenance.schema.json +128 -0
- package/schemas/crucible-ts/error-handling/v1.0.0/error-response.schema.json +75 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/country-codes.schema.json +58 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/exit-codes.schema.json +300 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/http-status-groups.schema.json +74 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/mime-types.schema.json +60 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/patterns.schema.json +97 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/signals.schema.json +457 -0
- package/schemas/crucible-ts/library/foundry/v1.0.0/similarity.schema.json +260 -0
- package/schemas/crucible-ts/library/foundry/v2.0.0/similarity.schema.json +558 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/README.md +6 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/checksum-string.schema.json +8 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/digest.schema.json +100 -0
- package/schemas/crucible-ts/library/fulhash/v1.0.0/fixtures.schema.json +227 -0
- package/schemas/crucible-ts/library/module-manifest/v1.0.0/README.md +31 -0
- package/schemas/crucible-ts/library/module-manifest/v1.0.0/module-manifest.schema.json +132 -0
- package/schemas/crucible-ts/meta/README.md +23 -0
- package/schemas/crucible-ts/meta/draft-07/schema.json +245 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/applicator.json +81 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/content.json +21 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/core.json +64 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/format-annotation.json +15 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/meta-data.json +35 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/unevaluated.json +18 -0
- package/schemas/crucible-ts/meta/draft-2020-12/meta/validation.json +119 -0
- package/schemas/crucible-ts/meta/draft-2020-12/schema.json +80 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/README.md +82 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/definitions.schema.json +140 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/log-event.schema.json +179 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/logger-config.schema.json +518 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/logging-policy.schema.json +225 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/middleware-config.schema.json +181 -0
- package/schemas/crucible-ts/observability/logging/v1.0.0/severity-filter.schema.json +38 -0
- package/schemas/crucible-ts/observability/metrics/v1.0.0/metrics-event.schema.json +86 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/README.md +104 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/error-response.schema.json +35 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/find-query.schema.json +49 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/finder-config.schema.json +91 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/metadata.schema.json +61 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/path-constraint.schema.json +50 -0
- package/schemas/crucible-ts/pathfinder/v1.0.0/path-result.schema.json +40 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/README.md +22 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/error-response.schema.json +54 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/health-response.schema.json +70 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/success-response.schema.json +51 -0
- package/schemas/crucible-ts/protocol/http/v1.0.0/version-response.schema.json +61 -0
- package/schemas/crucible-ts/schema-validation/v1.0.0/README.md +65 -0
- package/schemas/crucible-ts/schema-validation/v1.0.0/schema-registry.schema.json +31 -0
- package/schemas/crucible-ts/schema-validation/v1.0.0/validator-config.schema.json +36 -0
- package/schemas/crucible-ts/server/management/v1.0.0/server-management.schema.json +199 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/README.md +30 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-key.schema.json +17 -0
- package/schemas/crucible-ts/taxonomy/language/v1.0.0/language-metadata.schema.json +44 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/README.md +31 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-key.schema.json +19 -0
- package/schemas/crucible-ts/taxonomy/repository-category/v1.0.0/category-metadata.schema.json +39 -0
- package/schemas/crucible-ts/terminal/v1.0.0/README.md +45 -0
- package/schemas/crucible-ts/terminal/v1.0.0/catalog/apple-terminal.yaml +2 -0
- package/schemas/crucible-ts/terminal/v1.0.0/catalog/ghostty.yaml +13 -0
- package/schemas/crucible-ts/terminal/v1.0.0/catalog/iterm2.yaml +13 -0
- package/schemas/crucible-ts/terminal/v1.0.0/schema.json +40 -0
- package/schemas/crucible-ts/tooling/external-tools/v1.0.0/README.md +164 -0
- package/schemas/crucible-ts/tooling/external-tools/v1.0.0/external-tools-manifest.schema.yaml +83 -0
- package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/README.md +177 -0
- package/schemas/crucible-ts/tooling/goneat-tools/v1.0.0/goneat-tools-config.schema.yaml +146 -0
- package/schemas/crucible-ts/web/branding/v1.0.0/site-branding.schema.json +79 -0
- package/schemas/crucible-ts/web/styling/v1.0.0/site-styling.schema.json +321 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/library/foundry/v2.0.0/similarity.schema.json",
|
|
4
|
+
"title": "Foundry Similarity Fixtures v2.0",
|
|
5
|
+
"description": "Test fixtures for text similarity and normalization utilities (v2.0 - breaking changes)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version",
|
|
9
|
+
"test_cases"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"version": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Schema version (CalVer)",
|
|
15
|
+
"pattern": "^\\d{4}\\.\\d{1,2}\\.\\d{1,2}$",
|
|
16
|
+
"examples": [
|
|
17
|
+
"2025.10.3"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"test_cases": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "Organized test cases by metric category",
|
|
23
|
+
"items": {
|
|
24
|
+
"$ref": "#/definitions/TestCaseGroup"
|
|
25
|
+
},
|
|
26
|
+
"minItems": 1
|
|
27
|
+
},
|
|
28
|
+
"notes": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Notes about fixture generation methodology and reference implementations"
|
|
31
|
+
},
|
|
32
|
+
"generator": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"description": "Metadata about automated fixture generation (optional, omit for hand-written fixtures)",
|
|
35
|
+
"properties": {
|
|
36
|
+
"tool": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Name of the generator tool",
|
|
39
|
+
"examples": [
|
|
40
|
+
"similarity-validator",
|
|
41
|
+
"pyfulmen-fixture-gen"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
"tool_version": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Version of the generator tool (semver)",
|
|
47
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?$",
|
|
48
|
+
"examples": [
|
|
49
|
+
"0.1.0",
|
|
50
|
+
"1.2.3-beta.1"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"source_library": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Canonical implementation library used for generation",
|
|
56
|
+
"examples": [
|
|
57
|
+
"rapidfuzz-rs",
|
|
58
|
+
"rapidfuzz",
|
|
59
|
+
"strsim-rs"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"source_version": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"description": "Version of the source library",
|
|
65
|
+
"examples": [
|
|
66
|
+
"3.0.5",
|
|
67
|
+
"0.11.1"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"generated_at": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"format": "date-time",
|
|
73
|
+
"description": "ISO 8601 timestamp of generation",
|
|
74
|
+
"examples": [
|
|
75
|
+
"2025-10-27T20:15:00Z"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"command": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "Command used to generate (for reproducibility)",
|
|
81
|
+
"examples": [
|
|
82
|
+
"similarity-validator generate --input basic.yaml --output basic.yaml --overwrite"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": [
|
|
87
|
+
"tool",
|
|
88
|
+
"tool_version",
|
|
89
|
+
"source_library",
|
|
90
|
+
"generated_at"
|
|
91
|
+
],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"definitions": {
|
|
96
|
+
"TestCaseGroup": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"required": [
|
|
99
|
+
"category",
|
|
100
|
+
"cases"
|
|
101
|
+
],
|
|
102
|
+
"properties": {
|
|
103
|
+
"category": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": [
|
|
106
|
+
"levenshtein",
|
|
107
|
+
"damerau_osa",
|
|
108
|
+
"damerau_unrestricted",
|
|
109
|
+
"jaro_winkler",
|
|
110
|
+
"substring",
|
|
111
|
+
"normalization_presets",
|
|
112
|
+
"suggestions"
|
|
113
|
+
],
|
|
114
|
+
"description": "Test case category by metric type"
|
|
115
|
+
},
|
|
116
|
+
"cases": {
|
|
117
|
+
"type": "array",
|
|
118
|
+
"description": "Test cases in this category",
|
|
119
|
+
"items": {
|
|
120
|
+
"anyOf": [
|
|
121
|
+
{
|
|
122
|
+
"$ref": "#/definitions/LevenshteinTestCase"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"$ref": "#/definitions/DamerauOSATestCase"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"$ref": "#/definitions/DamerauUnrestrictedTestCase"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"$ref": "#/definitions/JaroWinklerTestCase"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"$ref": "#/definitions/SubstringTestCase"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"$ref": "#/definitions/NormalizationTestCase"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"$ref": "#/definitions/SuggestionTestCase"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"minItems": 1
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"LevenshteinTestCase": {
|
|
149
|
+
"type": "object",
|
|
150
|
+
"required": [
|
|
151
|
+
"input_a",
|
|
152
|
+
"input_b",
|
|
153
|
+
"expected_distance",
|
|
154
|
+
"expected_score"
|
|
155
|
+
],
|
|
156
|
+
"properties": {
|
|
157
|
+
"input_a": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"description": "First input string"
|
|
160
|
+
},
|
|
161
|
+
"input_b": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Second input string"
|
|
164
|
+
},
|
|
165
|
+
"expected_distance": {
|
|
166
|
+
"type": "integer",
|
|
167
|
+
"minimum": 0,
|
|
168
|
+
"description": "Expected Levenshtein distance"
|
|
169
|
+
},
|
|
170
|
+
"expected_score": {
|
|
171
|
+
"type": "number",
|
|
172
|
+
"minimum": 0,
|
|
173
|
+
"maximum": 1,
|
|
174
|
+
"description": "Expected similarity score (0.0-1.0)"
|
|
175
|
+
},
|
|
176
|
+
"description": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "Human-readable test case description"
|
|
179
|
+
},
|
|
180
|
+
"tags": {
|
|
181
|
+
"type": "array",
|
|
182
|
+
"items": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
},
|
|
185
|
+
"description": "Optional tags (e.g., 'unicode', 'emoji', 'edge_case')"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"additionalProperties": false
|
|
189
|
+
},
|
|
190
|
+
"DamerauOSATestCase": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"required": [
|
|
193
|
+
"input_a",
|
|
194
|
+
"input_b",
|
|
195
|
+
"expected_distance",
|
|
196
|
+
"expected_score"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"input_a": {
|
|
200
|
+
"type": "string"
|
|
201
|
+
},
|
|
202
|
+
"input_b": {
|
|
203
|
+
"type": "string"
|
|
204
|
+
},
|
|
205
|
+
"expected_distance": {
|
|
206
|
+
"type": "integer",
|
|
207
|
+
"minimum": 0,
|
|
208
|
+
"description": "Expected Damerau-Levenshtein distance (Optimal String Alignment variant)"
|
|
209
|
+
},
|
|
210
|
+
"expected_score": {
|
|
211
|
+
"type": "number",
|
|
212
|
+
"minimum": 0,
|
|
213
|
+
"maximum": 1
|
|
214
|
+
},
|
|
215
|
+
"description": {
|
|
216
|
+
"type": "string"
|
|
217
|
+
},
|
|
218
|
+
"tags": {
|
|
219
|
+
"type": "array",
|
|
220
|
+
"items": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"additionalProperties": false
|
|
226
|
+
},
|
|
227
|
+
"DamerauUnrestrictedTestCase": {
|
|
228
|
+
"type": "object",
|
|
229
|
+
"required": [
|
|
230
|
+
"input_a",
|
|
231
|
+
"input_b",
|
|
232
|
+
"expected_distance",
|
|
233
|
+
"expected_score"
|
|
234
|
+
],
|
|
235
|
+
"properties": {
|
|
236
|
+
"input_a": {
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"input_b": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
},
|
|
242
|
+
"expected_distance": {
|
|
243
|
+
"type": "integer",
|
|
244
|
+
"minimum": 0,
|
|
245
|
+
"description": "Expected Damerau-Levenshtein distance (unrestricted variant)"
|
|
246
|
+
},
|
|
247
|
+
"expected_score": {
|
|
248
|
+
"type": "number",
|
|
249
|
+
"minimum": 0,
|
|
250
|
+
"maximum": 1
|
|
251
|
+
},
|
|
252
|
+
"description": {
|
|
253
|
+
"type": "string"
|
|
254
|
+
},
|
|
255
|
+
"tags": {
|
|
256
|
+
"type": "array",
|
|
257
|
+
"items": {
|
|
258
|
+
"type": "string"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"additionalProperties": false
|
|
263
|
+
},
|
|
264
|
+
"JaroWinklerTestCase": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"required": [
|
|
267
|
+
"input_a",
|
|
268
|
+
"input_b",
|
|
269
|
+
"expected_score"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"input_a": {
|
|
273
|
+
"type": "string"
|
|
274
|
+
},
|
|
275
|
+
"input_b": {
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"expected_score": {
|
|
279
|
+
"type": "number",
|
|
280
|
+
"minimum": 0,
|
|
281
|
+
"maximum": 1,
|
|
282
|
+
"description": "Expected Jaro-Winkler similarity score"
|
|
283
|
+
},
|
|
284
|
+
"prefix_scale": {
|
|
285
|
+
"type": "number",
|
|
286
|
+
"minimum": 0,
|
|
287
|
+
"maximum": 0.25,
|
|
288
|
+
"default": 0.1,
|
|
289
|
+
"description": "Prefix scaling factor (if non-default)"
|
|
290
|
+
},
|
|
291
|
+
"max_prefix": {
|
|
292
|
+
"type": "integer",
|
|
293
|
+
"minimum": 1,
|
|
294
|
+
"maximum": 8,
|
|
295
|
+
"default": 4,
|
|
296
|
+
"description": "Maximum prefix length (if non-default)"
|
|
297
|
+
},
|
|
298
|
+
"description": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"tags": {
|
|
302
|
+
"type": "array",
|
|
303
|
+
"items": {
|
|
304
|
+
"type": "string"
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"additionalProperties": false
|
|
309
|
+
},
|
|
310
|
+
"SubstringTestCase": {
|
|
311
|
+
"type": "object",
|
|
312
|
+
"required": [
|
|
313
|
+
"needle",
|
|
314
|
+
"haystack",
|
|
315
|
+
"expected_score"
|
|
316
|
+
],
|
|
317
|
+
"properties": {
|
|
318
|
+
"needle": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"description": "Substring to search for"
|
|
321
|
+
},
|
|
322
|
+
"haystack": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"description": "String to search in"
|
|
325
|
+
},
|
|
326
|
+
"expected_score": {
|
|
327
|
+
"type": "number",
|
|
328
|
+
"minimum": 0,
|
|
329
|
+
"maximum": 1,
|
|
330
|
+
"description": "Expected substring similarity score"
|
|
331
|
+
},
|
|
332
|
+
"expected_range": {
|
|
333
|
+
"type": "object",
|
|
334
|
+
"required": [
|
|
335
|
+
"start",
|
|
336
|
+
"end"
|
|
337
|
+
],
|
|
338
|
+
"properties": {
|
|
339
|
+
"start": {
|
|
340
|
+
"type": "integer",
|
|
341
|
+
"minimum": 0,
|
|
342
|
+
"description": "Start index (inclusive, 0-based character position)"
|
|
343
|
+
},
|
|
344
|
+
"end": {
|
|
345
|
+
"type": "integer",
|
|
346
|
+
"minimum": 0,
|
|
347
|
+
"description": "End index (exclusive, one past last character)"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"description": "Expected matched range [start, end) in normalized haystack"
|
|
351
|
+
},
|
|
352
|
+
"normalize_preset": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"enum": [
|
|
355
|
+
"none",
|
|
356
|
+
"minimal",
|
|
357
|
+
"default",
|
|
358
|
+
"aggressive"
|
|
359
|
+
],
|
|
360
|
+
"default": "none",
|
|
361
|
+
"description": "Normalization preset to apply before matching"
|
|
362
|
+
},
|
|
363
|
+
"description": {
|
|
364
|
+
"type": "string"
|
|
365
|
+
},
|
|
366
|
+
"tags": {
|
|
367
|
+
"type": "array",
|
|
368
|
+
"items": {
|
|
369
|
+
"type": "string"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
"additionalProperties": false
|
|
374
|
+
},
|
|
375
|
+
"NormalizationTestCase": {
|
|
376
|
+
"type": "object",
|
|
377
|
+
"required": [
|
|
378
|
+
"input",
|
|
379
|
+
"preset",
|
|
380
|
+
"expected"
|
|
381
|
+
],
|
|
382
|
+
"properties": {
|
|
383
|
+
"input": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"description": "Input string to normalize"
|
|
386
|
+
},
|
|
387
|
+
"preset": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"enum": [
|
|
390
|
+
"none",
|
|
391
|
+
"minimal",
|
|
392
|
+
"default",
|
|
393
|
+
"aggressive"
|
|
394
|
+
],
|
|
395
|
+
"description": "Normalization preset to apply"
|
|
396
|
+
},
|
|
397
|
+
"expected": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"description": "Expected normalized output"
|
|
400
|
+
},
|
|
401
|
+
"description": {
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
"tags": {
|
|
405
|
+
"type": "array",
|
|
406
|
+
"items": {
|
|
407
|
+
"type": "string"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
"additionalProperties": false
|
|
412
|
+
},
|
|
413
|
+
"SuggestionTestCase": {
|
|
414
|
+
"type": "object",
|
|
415
|
+
"required": [
|
|
416
|
+
"input",
|
|
417
|
+
"candidates",
|
|
418
|
+
"expected"
|
|
419
|
+
],
|
|
420
|
+
"properties": {
|
|
421
|
+
"input": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"description": "Input string to find suggestions for"
|
|
424
|
+
},
|
|
425
|
+
"candidates": {
|
|
426
|
+
"type": "array",
|
|
427
|
+
"items": {
|
|
428
|
+
"type": "string"
|
|
429
|
+
},
|
|
430
|
+
"description": "Candidate strings to match against",
|
|
431
|
+
"minItems": 1
|
|
432
|
+
},
|
|
433
|
+
"options": {
|
|
434
|
+
"$ref": "#/definitions/SuggestOptions",
|
|
435
|
+
"description": "Suggestion options"
|
|
436
|
+
},
|
|
437
|
+
"expected": {
|
|
438
|
+
"type": "array",
|
|
439
|
+
"items": {
|
|
440
|
+
"$ref": "#/definitions/Suggestion"
|
|
441
|
+
},
|
|
442
|
+
"description": "Expected suggestions in order"
|
|
443
|
+
},
|
|
444
|
+
"description": {
|
|
445
|
+
"type": "string"
|
|
446
|
+
},
|
|
447
|
+
"tags": {
|
|
448
|
+
"type": "array",
|
|
449
|
+
"items": {
|
|
450
|
+
"type": "string"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"additionalProperties": false
|
|
455
|
+
},
|
|
456
|
+
"SuggestOptions": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {
|
|
459
|
+
"min_score": {
|
|
460
|
+
"type": "number",
|
|
461
|
+
"minimum": 0,
|
|
462
|
+
"maximum": 1,
|
|
463
|
+
"default": 0.6
|
|
464
|
+
},
|
|
465
|
+
"max_suggestions": {
|
|
466
|
+
"type": "integer",
|
|
467
|
+
"minimum": 0,
|
|
468
|
+
"default": 3
|
|
469
|
+
},
|
|
470
|
+
"metric": {
|
|
471
|
+
"type": "string",
|
|
472
|
+
"enum": [
|
|
473
|
+
"levenshtein",
|
|
474
|
+
"damerau_osa",
|
|
475
|
+
"damerau_unrestricted",
|
|
476
|
+
"jaro_winkler",
|
|
477
|
+
"substring"
|
|
478
|
+
],
|
|
479
|
+
"default": "levenshtein",
|
|
480
|
+
"description": "Distance metric to use"
|
|
481
|
+
},
|
|
482
|
+
"normalize_preset": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"enum": [
|
|
485
|
+
"none",
|
|
486
|
+
"minimal",
|
|
487
|
+
"default",
|
|
488
|
+
"aggressive"
|
|
489
|
+
],
|
|
490
|
+
"default": "default",
|
|
491
|
+
"description": "Normalization preset"
|
|
492
|
+
},
|
|
493
|
+
"prefer_prefix": {
|
|
494
|
+
"type": "boolean",
|
|
495
|
+
"default": false,
|
|
496
|
+
"description": "Apply bonus for prefix matches"
|
|
497
|
+
},
|
|
498
|
+
"jaro_prefix_scale": {
|
|
499
|
+
"type": "number",
|
|
500
|
+
"minimum": 0,
|
|
501
|
+
"maximum": 0.25,
|
|
502
|
+
"default": 0.1,
|
|
503
|
+
"description": "Jaro-Winkler prefix scale (only for jaro_winkler metric)"
|
|
504
|
+
},
|
|
505
|
+
"jaro_max_prefix": {
|
|
506
|
+
"type": "integer",
|
|
507
|
+
"minimum": 1,
|
|
508
|
+
"maximum": 8,
|
|
509
|
+
"default": 4,
|
|
510
|
+
"description": "Jaro-Winkler max prefix length (only for jaro_winkler metric)"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"additionalProperties": false
|
|
514
|
+
},
|
|
515
|
+
"Suggestion": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"required": [
|
|
518
|
+
"value",
|
|
519
|
+
"score"
|
|
520
|
+
],
|
|
521
|
+
"properties": {
|
|
522
|
+
"value": {
|
|
523
|
+
"type": "string",
|
|
524
|
+
"description": "Suggested candidate value"
|
|
525
|
+
},
|
|
526
|
+
"score": {
|
|
527
|
+
"type": "number",
|
|
528
|
+
"minimum": 0,
|
|
529
|
+
"maximum": 1,
|
|
530
|
+
"description": "Similarity score (0.0-1.0)"
|
|
531
|
+
},
|
|
532
|
+
"matched_range": {
|
|
533
|
+
"type": "object",
|
|
534
|
+
"properties": {
|
|
535
|
+
"start": {
|
|
536
|
+
"type": "integer",
|
|
537
|
+
"minimum": 0
|
|
538
|
+
},
|
|
539
|
+
"end": {
|
|
540
|
+
"type": "integer",
|
|
541
|
+
"minimum": 0
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
"description": "Matched range for substring metric (optional)"
|
|
545
|
+
},
|
|
546
|
+
"reason": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"description": "Optional reason code (e.g., 'prefix_match', 'typo_correction')"
|
|
549
|
+
},
|
|
550
|
+
"normalized_value": {
|
|
551
|
+
"type": "string",
|
|
552
|
+
"description": "Result of applying normalization preset (optional)"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"additionalProperties": false
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# FulHash Schemas (v1.0.0)
|
|
2
|
+
|
|
3
|
+
- `digest.schema.json` – canonical JSON payload returned by FulHash helpers when computing digests (algorithm + hex + optional formatted/bytes fields).
|
|
4
|
+
- `checksum-string.schema.json` – canonical checksum string format `<algorithm>:<hex>` used for metadata fields (e.g., Pathfinder checksums).
|
|
5
|
+
|
|
6
|
+
These schemas validate assets generated by FulHash implementations in all Fulmen helper libraries.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/library/fulhash/v1.0.0/checksum-string.schema.json",
|
|
4
|
+
"title": "FulHash Checksum String",
|
|
5
|
+
"description": "Canonical checksum string '<algorithm>:<hex>'",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"pattern": "^(xxh3-128:[0-9a-f]{32}|sha256:[0-9a-f]{64})$"
|
|
8
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.fulmenhq.dev/library/fulhash/v1.0.0/digest.schema.json",
|
|
4
|
+
"title": "FulHash Digest",
|
|
5
|
+
"description": "Standard digest payload returned by FulHash helpers",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"algorithm": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": [
|
|
11
|
+
"xxh3-128",
|
|
12
|
+
"sha256"
|
|
13
|
+
],
|
|
14
|
+
"description": "Hash algorithm identifier"
|
|
15
|
+
},
|
|
16
|
+
"hex": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Lowercase hexadecimal representation of the digest"
|
|
19
|
+
},
|
|
20
|
+
"formatted": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Canonical string representation '<algorithm>:<hex>'"
|
|
23
|
+
},
|
|
24
|
+
"bytes": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"description": "Raw digest bytes (optional)",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 0,
|
|
30
|
+
"maximum": 255
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"algorithm",
|
|
36
|
+
"hex",
|
|
37
|
+
"formatted"
|
|
38
|
+
],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"allOf": [
|
|
41
|
+
{
|
|
42
|
+
"if": {
|
|
43
|
+
"properties": {
|
|
44
|
+
"algorithm": {
|
|
45
|
+
"const": "xxh3-128"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"required": [
|
|
49
|
+
"algorithm"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"then": {
|
|
53
|
+
"properties": {
|
|
54
|
+
"hex": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"pattern": "^[0-9a-f]{32}$"
|
|
57
|
+
},
|
|
58
|
+
"formatted": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"pattern": "^xxh3-128:[0-9a-f]{32}$"
|
|
61
|
+
},
|
|
62
|
+
"bytes": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"minItems": 16,
|
|
65
|
+
"maxItems": 16
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"if": {
|
|
72
|
+
"properties": {
|
|
73
|
+
"algorithm": {
|
|
74
|
+
"const": "sha256"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"algorithm"
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"then": {
|
|
82
|
+
"properties": {
|
|
83
|
+
"hex": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
86
|
+
},
|
|
87
|
+
"formatted": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
90
|
+
},
|
|
91
|
+
"bytes": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"minItems": 32,
|
|
94
|
+
"maxItems": 32
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|