champollion 0.3.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/LICENSE +133 -0
- package/README.md +387 -0
- package/bin/cli.js +278 -0
- package/index.js +135 -0
- package/lib/api-key.js +127 -0
- package/lib/autofix.js +432 -0
- package/lib/bridge/method_bridge.py +430 -0
- package/lib/card-source-resolution.mjs +284 -0
- package/lib/cards/cache.js +169 -0
- package/lib/cards/env.js +82 -0
- package/lib/cards/fetch-card-child.js +38 -0
- package/lib/cards/reader.js +435 -0
- package/lib/cards/refresh.js +111 -0
- package/lib/cards/remote.js +387 -0
- package/lib/cldf-export.mjs +540 -0
- package/lib/cldf-terms.mjs +62 -0
- package/lib/command-help.js +790 -0
- package/lib/commands/audit.js +49 -0
- package/lib/commands/card.js +454 -0
- package/lib/commands/doctor.js +559 -0
- package/lib/commands/fonts.js +489 -0
- package/lib/commands/help.js +91 -0
- package/lib/commands/init.js +1259 -0
- package/lib/commands/integrity.js +148 -0
- package/lib/commands/leaderboard.js +478 -0
- package/lib/commands/lint.js +30 -0
- package/lib/commands/models.js +177 -0
- package/lib/commands/plugin.js +103 -0
- package/lib/commands/provenance.js +45 -0
- package/lib/commands/recommend.js +75 -0
- package/lib/commands/register-corpus.js +678 -0
- package/lib/commands/repair-script.js +42 -0
- package/lib/commands/seal-corpus.js +355 -0
- package/lib/commands/seo.js +72 -0
- package/lib/commands/serve.js +147 -0
- package/lib/commands/status.js +265 -0
- package/lib/commands/submit.js +332 -0
- package/lib/commands/sync.js +89 -0
- package/lib/commands/tm.js +573 -0
- package/lib/commands/verify.js +39 -0
- package/lib/commands/watch.js +20 -0
- package/lib/commands/wrap.js +138 -0
- package/lib/commands/xliff.js +327 -0
- package/lib/commercial-eligibility.js +235 -0
- package/lib/concurrent.js +87 -0
- package/lib/config.js +523 -0
- package/lib/contamination-lane.js +76 -0
- package/lib/content-sync.js +731 -0
- package/lib/content.js +733 -0
- package/lib/corpus-registration.mjs +608 -0
- package/lib/cost-report.js +346 -0
- package/lib/diff.js +155 -0
- package/lib/docusaurus-sync.js +1256 -0
- package/lib/flatten.js +55 -0
- package/lib/format.js +954 -0
- package/lib/hash.js +159 -0
- package/lib/icu.js +473 -0
- package/lib/integrity.js +689 -0
- package/lib/license-gate.mjs +478 -0
- package/lib/license-identify.mjs +229 -0
- package/lib/lint.js +629 -0
- package/lib/method-manifest.js +60 -0
- package/lib/methods/anthropic.js +140 -0
- package/lib/methods/apertium.js +163 -0
- package/lib/methods/api.js +316 -0
- package/lib/methods/base.js +184 -0
- package/lib/methods/content-separator.js +45 -0
- package/lib/methods/deepl.js +426 -0
- package/lib/methods/direct-llm.js +586 -0
- package/lib/methods/external.js +332 -0
- package/lib/methods/fetch-with-retry.js +124 -0
- package/lib/methods/gemini.js +147 -0
- package/lib/methods/google-translate.js +402 -0
- package/lib/methods/http-utils.js +122 -0
- package/lib/methods/libretranslate.js +314 -0
- package/lib/methods/llm-coached.js +670 -0
- package/lib/methods/llm.js +592 -0
- package/lib/methods/local.js +76 -0
- package/lib/methods/microsoft-translator.js +331 -0
- package/lib/methods/openai.js +131 -0
- package/lib/methods/openrouter-client.js +327 -0
- package/lib/methods/openrouter-pricing.js +156 -0
- package/lib/methods/provider-env.js +115 -0
- package/lib/methods/provider-pricing.js +310 -0
- package/lib/methods/tilde.js +150 -0
- package/lib/methods/translated.js +229 -0
- package/lib/methods/translation-error.js +80 -0
- package/lib/models.js +258 -0
- package/lib/no-translate.js +233 -0
- package/lib/output.js +238 -0
- package/lib/pairs.js +547 -0
- package/lib/plugins.js +447 -0
- package/lib/provenance.js +323 -0
- package/lib/recommend.js +648 -0
- package/lib/registers.js +1185 -0
- package/lib/repair-script.js +266 -0
- package/lib/scripts.js +994 -0
- package/lib/seal.mjs +464 -0
- package/lib/sealed-qualifier.mjs +211 -0
- package/lib/security.js +59 -0
- package/lib/segment.js +369 -0
- package/lib/seo.js +275 -0
- package/lib/serve.js +854 -0
- package/lib/string-classify.js +85 -0
- package/lib/submit.mjs +344 -0
- package/lib/sync.js +969 -0
- package/lib/tags/bcp47.js +202 -0
- package/lib/tags/resolve.js +314 -0
- package/lib/terminology.js +111 -0
- package/lib/tm-seed.js +294 -0
- package/lib/tm.js +515 -0
- package/lib/translate-pair.js +197 -0
- package/lib/translate.js +203 -0
- package/lib/types.js +230 -0
- package/lib/validate.js +510 -0
- package/lib/verify.js +451 -0
- package/lib/watch.js +145 -0
- package/lib/xliff.js +184 -0
- package/package.json +93 -0
- package/shared/ATTRIBUTION.md +145 -0
- package/shared/CORPORA-CARDS.md +288 -0
- package/shared/DATA-SOVEREIGNTY.md +500 -0
- package/shared/LANGUAGE-CARD-FIELDS.md +532 -0
- package/shared/card-lint-baseline.json +3189 -0
- package/shared/cards-fallback.json +1 -0
- package/shared/catalogue/card-config.json +6091 -0
- package/shared/catalogue/external-results.json +3888 -0
- package/shared/catalogue/gender-guidance.json +1038 -0
- package/shared/catalogue/method-coverage.json +1751 -0
- package/shared/catalogue/metric-coverage.json +170 -0
- package/shared/catalogue/metric-reliability.json +1 -0
- package/shared/catalogue/register-presets.json +3180 -0
- package/shared/catalogue/vitality-scales.json +55 -0
- package/shared/cldr-index.json +1115 -0
- package/shared/code-bridge.json +253 -0
- package/shared/corpora-cards-v1-reference.md +281 -0
- package/shared/curated-dictionary-flags.json +35 -0
- package/shared/curated-endonyms.json +35 -0
- package/shared/curated-fsts.json +51 -0
- package/shared/curated-orthography-conventions.json +26 -0
- package/shared/curated-sil-resources.json +374 -0
- package/shared/curated-tools.json +41 -0
- package/shared/docent/corpus.json +11333 -0
- package/shared/docent/faq.en.json +564 -0
- package/shared/docent/register-blocks.json +60 -0
- package/shared/docent/system-prompt.md +144 -0
- package/shared/domain-taxonomy.json +35 -0
- package/shared/explainers/glossary.json +2975 -0
- package/shared/explainers/tc-features.json +20112 -0
- package/shared/explainers/term-watchlist.json +147 -0
- package/shared/human-services.json +59 -0
- package/shared/license-corrections.json +261 -0
- package/shared/license-evidence.json +13452 -0
- package/shared/licenses.json +6781 -0
- package/shared/method-registry.json +236 -0
- package/shared/metric-registry.json +620 -0
- package/shared/model-aliases.json +7 -0
- package/shared/schemas/champollion-plugin.schema.json +206 -0
- package/shared/schemas/corpora-card.schema.json +957 -0
- package/shared/schemas/domain-taxonomy.schema.json +64 -0
- package/shared/schemas/external-results.schema.json +314 -0
- package/shared/schemas/human-services.schema.json +90 -0
- package/shared/schemas/language-card.schema.json +1308 -0
- package/shared/schemas/licenses.schema.json +155 -0
- package/shared/schemas/method-card.schema.json +412 -0
- package/shared/schemas/method-registry.schema.json +85 -0
- package/shared/schemas/metric-registry.schema.json +96 -0
- package/shared/schemas/metric-reliability.schema.json +178 -0
- package/shared/schemas/model-aliases.schema.json +27 -0
- package/shared/schemas/source-snapshot.schema.json +96 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/gamedaysuits/champollion/schemas/champollion-plugin.schema.json",
|
|
4
|
+
"title": "champollion Method Plugin",
|
|
5
|
+
"description": "JSON Schema for method.json plugin manifests consumed by champollion. Plugins are pre-packaged translation recipes with config, coaching data, benchmarks, and provenance metadata.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
|
|
8
|
+
"required": ["name", "type", "version", "locales"],
|
|
9
|
+
|
|
10
|
+
"properties": {
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^[a-z0-9][a-z0-9-]*$",
|
|
14
|
+
"description": "Unique method identifier in kebab-case (e.g., 'french-formal-v1')."
|
|
15
|
+
},
|
|
16
|
+
"type": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["llm", "llm-coached", "api", "google-translate", "deepl", "microsoft-translator", "libretranslate", "openai", "anthropic", "gemini"],
|
|
19
|
+
"description": "Champollion method type. Determines which translation engine handles this plugin."
|
|
20
|
+
},
|
|
21
|
+
"version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+",
|
|
24
|
+
"description": "Semver version of this method export."
|
|
25
|
+
},
|
|
26
|
+
"description": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Human-readable description of the method."
|
|
29
|
+
},
|
|
30
|
+
"author": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Who developed and tested this method."
|
|
33
|
+
},
|
|
34
|
+
"locales": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": { "type": "string" },
|
|
37
|
+
"minItems": 1,
|
|
38
|
+
"description": "Which locale codes this method targets (e.g., ['fr', 'de'])."
|
|
39
|
+
},
|
|
40
|
+
"endpoint": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"format": "uri",
|
|
43
|
+
"description": "Required for type 'api'. The server-side translation endpoint URL."
|
|
44
|
+
},
|
|
45
|
+
"config": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"description": "Method configuration — canonical MethodConfig shape.",
|
|
48
|
+
"properties": {
|
|
49
|
+
"model": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "OpenRouter model identifier (e.g., 'google/gemini-3.5-flash')."
|
|
52
|
+
},
|
|
53
|
+
"register": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Target language register/tone instruction."
|
|
56
|
+
},
|
|
57
|
+
"batchSize": {
|
|
58
|
+
"type": "integer",
|
|
59
|
+
"minimum": 1,
|
|
60
|
+
"maximum": 200,
|
|
61
|
+
"default": 30,
|
|
62
|
+
"description": "Keys per API batch."
|
|
63
|
+
},
|
|
64
|
+
"temperature": {
|
|
65
|
+
"type": "number",
|
|
66
|
+
"minimum": 0,
|
|
67
|
+
"maximum": 2,
|
|
68
|
+
"default": 0.3,
|
|
69
|
+
"description": "LLM sampling temperature."
|
|
70
|
+
},
|
|
71
|
+
"coachingFile": {
|
|
72
|
+
"type": ["string", "null"],
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "Path to free-text coaching prompt file."
|
|
75
|
+
},
|
|
76
|
+
"coachingPrompt": {
|
|
77
|
+
"type": ["string", "null"],
|
|
78
|
+
"default": null,
|
|
79
|
+
"description": "Resolved coaching prompt text (read from coachingFile)."
|
|
80
|
+
},
|
|
81
|
+
"promptContext": {
|
|
82
|
+
"type": ["string", "null"],
|
|
83
|
+
"default": null,
|
|
84
|
+
"description": "Application context string injected into system prompt."
|
|
85
|
+
},
|
|
86
|
+
"qualityTier": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"enum": ["standard", "high", "research", "verified"],
|
|
89
|
+
"description": "Quality classification for champollion status display."
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": true
|
|
93
|
+
},
|
|
94
|
+
"benchmarks": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "Per-locale benchmark results from the eval harness.",
|
|
97
|
+
"additionalProperties": {
|
|
98
|
+
"$ref": "#/$defs/benchmarkEntry"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"provenance": {
|
|
102
|
+
"$ref": "#/$defs/provenanceBlock",
|
|
103
|
+
"description": "Licensing and resource dependency metadata."
|
|
104
|
+
},
|
|
105
|
+
"coaching": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"description": "Coaching data configuration.",
|
|
108
|
+
"properties": {
|
|
109
|
+
"dir": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"default": "coaching",
|
|
112
|
+
"description": "Relative path (from plugin root) to the coaching data directory."
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
"if": {
|
|
120
|
+
"properties": { "type": { "const": "api" } }
|
|
121
|
+
},
|
|
122
|
+
"then": {
|
|
123
|
+
"required": ["endpoint"]
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
|
|
128
|
+
"$defs": {
|
|
129
|
+
"benchmarkEntry": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"description": "Benchmark results for a single locale.",
|
|
132
|
+
"required": ["date", "corpus_size", "exact_match_rate", "model", "harness_version"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"date": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"format": "date-time",
|
|
137
|
+
"description": "ISO 8601 timestamp of the benchmark run."
|
|
138
|
+
},
|
|
139
|
+
"corpus_size": {
|
|
140
|
+
"type": "integer",
|
|
141
|
+
"minimum": 1,
|
|
142
|
+
"description": "Number of entries evaluated."
|
|
143
|
+
},
|
|
144
|
+
"exact_match_rate": {
|
|
145
|
+
"type": "number",
|
|
146
|
+
"minimum": 0,
|
|
147
|
+
"maximum": 1,
|
|
148
|
+
"description": "Proportion of exact matches (0.0–1.0)."
|
|
149
|
+
},
|
|
150
|
+
"corpus_chrf": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"minimum": 0,
|
|
153
|
+
"maximum": 100,
|
|
154
|
+
"description": "chrF++ score (0–100)."
|
|
155
|
+
},
|
|
156
|
+
"corpus_bleu": {
|
|
157
|
+
"type": "number",
|
|
158
|
+
"minimum": 0,
|
|
159
|
+
"maximum": 100,
|
|
160
|
+
"description": "BLEU score (0–100)."
|
|
161
|
+
},
|
|
162
|
+
"model": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "Model used during evaluation."
|
|
165
|
+
},
|
|
166
|
+
"harness_version": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "Version of the evaluation harness used."
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"additionalProperties": false
|
|
172
|
+
},
|
|
173
|
+
"provenanceBlock": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"description": "Licensing and resource dependency metadata. Defaults to non-commercial until explicitly cleared.",
|
|
176
|
+
"properties": {
|
|
177
|
+
"resources": {
|
|
178
|
+
"type": "array",
|
|
179
|
+
"items": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"properties": {
|
|
182
|
+
"name": { "type": "string" },
|
|
183
|
+
"license": { "type": "string" },
|
|
184
|
+
"type": { "type": "string" }
|
|
185
|
+
},
|
|
186
|
+
"required": ["name", "license"]
|
|
187
|
+
},
|
|
188
|
+
"default": [],
|
|
189
|
+
"description": "List of bundled resources with name and license."
|
|
190
|
+
},
|
|
191
|
+
"commercialReady": {
|
|
192
|
+
"type": "boolean",
|
|
193
|
+
"default": false,
|
|
194
|
+
"description": "Whether the plugin is cleared for commercial distribution."
|
|
195
|
+
},
|
|
196
|
+
"flags": {
|
|
197
|
+
"type": "array",
|
|
198
|
+
"items": { "type": "string" },
|
|
199
|
+
"default": ["license-unclear"],
|
|
200
|
+
"description": "Machine-readable status flags (e.g., 'license-unclear')."
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"additionalProperties": false
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|