champollion 0.3.4 → 0.5.0

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.
Files changed (138) hide show
  1. package/README.md +41 -26
  2. package/bin/cli.js +53 -5
  3. package/index.js +63 -2
  4. package/lib/api-key.js +17 -4
  5. package/lib/autofix.js +82 -37
  6. package/lib/bridge/method_bridge.py +15 -3
  7. package/lib/cards/reader.js +34 -0
  8. package/lib/cards/remote.js +15 -0
  9. package/lib/cards/search-names.js +178 -0
  10. package/lib/command-help.js +286 -85
  11. package/lib/commands/audit.js +10 -3
  12. package/lib/commands/card.js +583 -226
  13. package/lib/commands/doctor.js +54 -18
  14. package/lib/commands/help.js +37 -32
  15. package/lib/commands/init.js +1709 -101
  16. package/lib/commands/integrity.js +127 -40
  17. package/lib/commands/leaderboard.js +187 -67
  18. package/lib/commands/models.js +9 -2
  19. package/lib/commands/provenance.js +7 -2
  20. package/lib/commands/recommend.js +43 -14
  21. package/lib/commands/register-corpus.js +632 -125
  22. package/lib/commands/seal-corpus.js +1 -1
  23. package/lib/commands/status.js +564 -27
  24. package/lib/commands/submit.js +17 -12
  25. package/lib/commands/sync.js +31 -7
  26. package/lib/commands/tm.js +15 -9
  27. package/lib/commands/verify.js +27 -3
  28. package/lib/commands/wrap.js +63 -5
  29. package/lib/commands/xliff.js +135 -64
  30. package/lib/commercial-eligibility.js +1 -1
  31. package/lib/config.js +230 -17
  32. package/lib/content-estimate.js +96 -0
  33. package/lib/content-refusals.js +284 -0
  34. package/lib/content-review.js +372 -0
  35. package/lib/content-sync.js +1136 -345
  36. package/lib/content.js +94 -7
  37. package/lib/corpus-registration.mjs +194 -35
  38. package/lib/cost-label.js +29 -0
  39. package/lib/cost-report.js +727 -79
  40. package/lib/diff.js +38 -4
  41. package/lib/docusaurus-sync.js +975 -262
  42. package/lib/edit-distance.js +31 -0
  43. package/lib/fallback.js +1102 -0
  44. package/lib/file-scope.js +106 -0
  45. package/lib/flatten.js +80 -3
  46. package/lib/flutter-locales.js +124 -0
  47. package/lib/format.js +266 -12
  48. package/lib/hash.js +146 -21
  49. package/lib/icu-structure.js +929 -0
  50. package/lib/integrity.js +223 -75
  51. package/lib/language-pair.js +157 -0
  52. package/lib/lint.js +78 -16
  53. package/lib/local-only-marks.js +106 -0
  54. package/lib/locale-layout.js +1103 -0
  55. package/lib/locale-state.js +575 -0
  56. package/lib/methods/anthropic.js +5 -0
  57. package/lib/methods/apertium.js +6 -3
  58. package/lib/methods/api.js +138 -25
  59. package/lib/methods/base.js +17 -0
  60. package/lib/methods/coaching-data.js +153 -0
  61. package/lib/methods/content-separator.js +43 -0
  62. package/lib/methods/deepl.js +1 -1
  63. package/lib/methods/direct-llm.js +257 -103
  64. package/lib/methods/external.js +146 -63
  65. package/lib/methods/gemini.js +1 -0
  66. package/lib/methods/google-translate.js +1 -0
  67. package/lib/methods/http-utils.js +41 -0
  68. package/lib/methods/libretranslate.js +7 -2
  69. package/lib/methods/llm-coached.js +71 -129
  70. package/lib/methods/llm.js +87 -33
  71. package/lib/methods/local.js +93 -10
  72. package/lib/methods/microsoft-translator.js +1 -2
  73. package/lib/methods/openai.js +4 -2
  74. package/lib/methods/openrouter-client.js +20 -19
  75. package/lib/methods/openrouter-pricing.js +150 -13
  76. package/lib/methods/prompt-methods.js +20 -0
  77. package/lib/methods/provider-pricing.js +42 -1
  78. package/lib/methods/request-capture.js +104 -0
  79. package/lib/methods/tilde.js +1 -1
  80. package/lib/methods/translated.js +1 -2
  81. package/lib/missing-key.js +93 -0
  82. package/lib/models.js +102 -55
  83. package/lib/name-rules.js +32 -0
  84. package/lib/named-keys.js +172 -0
  85. package/lib/no-translate.js +4 -3
  86. package/lib/output.js +160 -19
  87. package/lib/pairs.js +586 -30
  88. package/lib/placeholders.js +394 -0
  89. package/lib/plugins.js +8 -0
  90. package/lib/plural-gap-redo.js +109 -0
  91. package/lib/plurals.js +323 -0
  92. package/lib/po.js +1187 -0
  93. package/lib/public-catalogue.js +74 -0
  94. package/lib/recommend.js +527 -32
  95. package/lib/redo.js +95 -0
  96. package/lib/refusal-category.js +44 -0
  97. package/lib/registers.js +255 -11
  98. package/lib/repair-script.js +20 -13
  99. package/lib/scripts.js +6 -1
  100. package/lib/seal.mjs +4 -3
  101. package/lib/sealed-qualifier.mjs +1 -1
  102. package/lib/segment.js +24 -8
  103. package/lib/seo.js +19 -9
  104. package/lib/serve.js +43 -6
  105. package/lib/shared-output-seed.js +164 -0
  106. package/lib/source-contexts.js +39 -0
  107. package/lib/submit.mjs +57 -5
  108. package/lib/sync.js +2923 -474
  109. package/lib/terminology.js +13 -4
  110. package/lib/tm-evict.js +179 -0
  111. package/lib/tm-seed.js +5 -2
  112. package/lib/tm.js +818 -36
  113. package/lib/translate-pair.js +639 -34
  114. package/lib/translate.js +78 -5
  115. package/lib/types.js +22 -3
  116. package/lib/validate.js +996 -21
  117. package/lib/verify.js +1332 -104
  118. package/lib/watch.js +32 -13
  119. package/lib/xliff.js +44 -3
  120. package/package.json +1 -1
  121. package/shared/CORPORA-CARDS.md +2 -0
  122. package/shared/cards-fallback.json +1 -1
  123. package/shared/curated-orthography-conventions.json +26 -8
  124. package/shared/gettext-plural-forms.json +45 -0
  125. package/shared/licenses.json +99 -3
  126. package/shared/method-registry.json +2 -0
  127. package/shared/metric-registry.json +96 -18
  128. package/shared/retired-model-aliases.json +9 -0
  129. package/shared/schemas/champollion-plugin.schema.json +4 -0
  130. package/shared/schemas/corpora-card.schema.json +8 -2
  131. package/shared/schemas/human-services.schema.json +1 -1
  132. package/shared/schemas/method-index-record.schema.json +67 -0
  133. package/shared/schemas/method-registry.schema.json +4 -0
  134. package/shared/schemas/metric-registry.schema.json +55 -1
  135. package/shared/schemas/retired-model-aliases.schema.json +32 -0
  136. package/shared/docent/corpus.json +0 -11739
  137. package/shared/model-aliases.json +0 -7
  138. package/shared/schemas/model-aliases.schema.json +0 -27
@@ -32,6 +32,21 @@
32
32
  "decision": { "type": "string", "enum": ["founder-pending", "accepted", "rejected"] }
33
33
  }
34
34
  }
35
+ },
36
+ "_rename_decisions": {
37
+ "type": "array",
38
+ "description": "Rename proposals the FOUNDER has already decided, moved out of _proposed_renames with the decision recorded verbatim (dated wording such as KEEP or DEFER, which the pending-proposal enum does not express). Advisory — not consumed by code.",
39
+ "items": {
40
+ "type": "object",
41
+ "required": ["current", "proposal", "impact", "decision"],
42
+ "additionalProperties": false,
43
+ "properties": {
44
+ "current": { "type": "string" },
45
+ "proposal": { "type": "string" },
46
+ "impact": { "type": "string" },
47
+ "decision": { "type": "string", "minLength": 1 }
48
+ }
49
+ }
35
50
  }
36
51
  },
37
52
  "$defs": {
@@ -89,7 +104,46 @@
89
104
  "type": "boolean",
90
105
  "description": "True iff the verifier can deterministically re-derive it from the sha-pinned corpus + stored entries (+ card-pinned FST / pinned neural model under the fail-closed contract). Speed/cost/style metrics are false."
91
106
  },
92
- "notes": { "type": "string" }
107
+ "notes": { "type": "string" },
108
+ "ranking": { "$ref": "#/$defs/ranking" }
109
+ }
110
+ },
111
+ "ranking": {
112
+ "type": "object",
113
+ "description": "Present iff a contest may rank on this metric (contests.metadata.primary_metric). Absent = not rankable. Adding a metric to the rankable set is a data change here plus a rankable_metrics row (migration 076 pattern), never a code change.",
114
+ "required": ["rounding", "ci_columns", "segment_level", "signature"],
115
+ "additionalProperties": false,
116
+ "properties": {
117
+ "rounding": {
118
+ "type": "integer", "minimum": 0, "maximum": 6,
119
+ "description": "Display rounding; also the precision of the point-equality tie rung."
120
+ },
121
+ "ci_columns": {
122
+ "description": "The run_cards bootstrap-CI column pair [lower, upper] for the CI-overlap tie rung, or null when the metric has no CI columns.",
123
+ "oneOf": [
124
+ { "type": "null" },
125
+ { "type": "array", "items": { "type": "string" }, "minItems": 2, "maxItems": 2 }
126
+ ]
127
+ },
128
+ "segment_level": {
129
+ "type": "boolean",
130
+ "description": "True iff the harness has a corpus function over per-segment rows (significance.py) so a paired test (approximate randomization / paired bootstrap) can compare two entries on this metric."
131
+ },
132
+ "retired": {
133
+ "type": "string",
134
+ "minLength": 1,
135
+ "description": "Present iff the metric is RETIRED as a ranking choice for NEW contests (the reason, said to whoever tries). A contest that already recorded it as metadata.primary_metric still ranks on it, labelled legacy; the block stays so the rankable_metrics table (migration 076) keeps its row and existing contests keep passing contest_lifecycle_guard()."
136
+ },
137
+ "signature": {
138
+ "type": "object",
139
+ "description": "How this metric's computation is identified, so a contest can freeze it as a promise (contests.metadata.metric_signature). sacrebleu: the run card's scores.sacrebleu_signatures[key]; model: the run card's scores[key] (the neural model id) plus the harness version; harness: the harness version alone.",
140
+ "required": ["kind"],
141
+ "additionalProperties": false,
142
+ "properties": {
143
+ "kind": { "type": "string", "enum": ["sacrebleu", "model", "harness"] },
144
+ "key": { "type": "string", "minLength": 1 }
145
+ }
146
+ }
93
147
  }
94
148
  }
95
149
  }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://champollion.dev/schemas/retired-model-aliases.schema.json",
4
+ "title": "Champollion retired model aliases (shared/retired-model-aliases.json)",
5
+ "description": "Short model names Champollion USED to accept, each with the exact provider slug it used to stand for. Founder ruling 2026-10-05: exact slugs only, no aliasing — every name in `retired` is REFUSED with a message naming its slug; it never resolves. The bundled mini-schema validator does not support additionalProperties-as-schema, so per-entry validation iterates `retired` against $defs.aliasName / $defs.modelId (see cli/test/shared-ssot-schemas.test.js).",
6
+ "type": "object",
7
+ "required": ["_comment", "retired"],
8
+ "properties": {
9
+ "_comment": {
10
+ "type": "string",
11
+ "description": "Human note: why these names are retired."
12
+ },
13
+ "retired": {
14
+ "type": "object",
15
+ "description": "Retired short name → the exact slug it used to stand for (used ONLY in the refusal message)."
16
+ }
17
+ },
18
+ "$defs": {
19
+ "aliasName": {
20
+ "type": "string",
21
+ "description": "Retired short name: lowercase alphanumerics and hyphens.",
22
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
23
+ "minLength": 2
24
+ },
25
+ "modelId": {
26
+ "type": "string",
27
+ "description": "Exact provider-qualified model slug: <provider>/<model>, never a floating id (no leading '~', no '-latest').",
28
+ "pattern": "^[a-z0-9-]+/[A-Za-z0-9._-]+$",
29
+ "minLength": 3
30
+ }
31
+ }
32
+ }