@nakafa/aksara-contracts 5.0.0 → 6.0.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 (58) hide show
  1. package/dist/artifact/integrity.d.ts +2 -2
  2. package/dist/artifact/limits.d.ts +1 -1
  3. package/dist/artifact/source.d.ts +1 -1
  4. package/dist/artifact/spec.d.ts +1 -1
  5. package/dist/artifact/verify.d.ts +1 -1
  6. package/dist/assessment/catalog.d.ts +12 -12
  7. package/dist/assessment/snapshot.d.ts +24 -24
  8. package/dist/content.d.ts +7 -7
  9. package/dist/graph/family.d.ts +2 -2
  10. package/dist/graph/identity.d.ts +1 -1
  11. package/dist/locale.d.ts +21 -10
  12. package/dist/locale.js +24 -9
  13. package/dist/preview/artifact.d.ts +6 -6
  14. package/dist/preview/document.d.ts +13 -13
  15. package/dist/preview/spec.d.ts +49 -49
  16. package/dist/preview/target.d.ts +2 -2
  17. package/dist/program/curriculum.d.ts +2 -2
  18. package/dist/program/snapshot/hash.d.ts +6 -6
  19. package/dist/program/snapshot/row.d.ts +4 -4
  20. package/dist/program/spec.d.ts +2 -2
  21. package/dist/projection/article.d.ts +6 -6
  22. package/dist/projection/digest.d.ts +6 -6
  23. package/dist/projection/hash.d.ts +6 -6
  24. package/dist/projection/material.d.ts +6 -6
  25. package/dist/projection/page.d.ts +6 -6
  26. package/dist/projection/spec.d.ts +7 -7
  27. package/dist/projection/verify.d.ts +6 -6
  28. package/dist/quran/attribution.d.ts +4 -4
  29. package/dist/quran/identity.d.ts +7 -7
  30. package/dist/quran/identity.js +3 -3
  31. package/dist/quran/provenance.d.ts +12 -12
  32. package/dist/quran/snapshot/row/hash.d.ts +39 -39
  33. package/dist/quran/snapshot/row.d.ts +12 -12
  34. package/dist/quran/source.d.ts +7 -7
  35. package/dist/quran/spec.d.ts +1 -1
  36. package/dist/quran/spec.js +3 -3
  37. package/dist/release/canonical.d.ts +2 -2
  38. package/dist/release/digest.d.ts +2 -2
  39. package/dist/release/head.d.ts +9 -9
  40. package/dist/release/items.d.ts +2 -2
  41. package/dist/release/result/digest.d.ts +5 -5
  42. package/dist/release/rollback/digest.d.ts +4 -4
  43. package/dist/release/rollback/spec.d.ts +66 -66
  44. package/dist/release/route/digest.d.ts +2 -2
  45. package/dist/release/route/page.d.ts +4 -4
  46. package/dist/release/route/spec.d.ts +6 -6
  47. package/dist/release/route/verify.d.ts +2 -2
  48. package/dist/release/snapshot/data.d.ts +12 -12
  49. package/dist/release/snapshot/verify.d.ts +22 -22
  50. package/dist/release/spec.d.ts +6 -6
  51. package/dist/runtime/spec.d.ts +23 -23
  52. package/dist/runtime/verify.d.ts +14 -14
  53. package/dist/transport/batch.d.ts +22 -22
  54. package/dist/transport/group.d.ts +69 -69
  55. package/dist/transport/request.d.ts +244 -244
  56. package/dist/transport/response.d.ts +92 -92
  57. package/dist/transport/snapshot.d.ts +24 -24
  58. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { Effect } from "effect";
2
2
  import { ArtifactHashMismatchError, ArtifactTreeComponentUnlistedError, ArtifactVerificationDecodeError } from "#contracts/artifact/spec";
3
3
  /** Computes the immutable identity of one canonical compiled payload. */
4
4
  export declare const hashCompiledContentPayload: (payload: {
5
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
5
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
6
6
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
7
7
  readonly compilerVersion: "0.2.0";
8
8
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -27,7 +27,7 @@ export declare const verifySignedContentArtifactIntegrity: (input: unknown) => E
27
27
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
28
28
  readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
29
29
  readonly payload: {
30
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
30
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
31
31
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
32
32
  readonly compilerVersion: "0.2.0";
33
33
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -5,7 +5,7 @@ export declare const validateArtifactByteIntegrity: (artifact: {
5
5
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
6
6
  readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
7
7
  readonly payload: {
8
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
8
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
9
9
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
10
10
  readonly compilerVersion: "0.2.0";
11
11
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -2,7 +2,7 @@ import { Effect } from "effect";
2
2
  import { ArtifactSourceHashMismatchError } from "#contracts/artifact/spec";
3
3
  /** Verifies that sourceHash identifies the complete authenticated raw MDX. */
4
4
  export declare const verifyCompiledContentSourceHash: (payload: {
5
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
5
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
6
6
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
7
7
  readonly compilerVersion: "0.2.0";
8
8
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -5,7 +5,7 @@ export declare const ArtifactVerificationRequestSchema: Schema.Struct<{
5
5
  readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
6
6
  readonly keyId: Schema.brand<Schema.String, "@NakafaAI/AksaraSigningKeyId">;
7
7
  readonly payload: Schema.Struct<{
8
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
8
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
9
9
  readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
10
10
  readonly compilerVersion: Schema.Literal<"0.2.0">;
11
11
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -5,7 +5,7 @@ export declare const verifySignedContentArtifact: (input: unknown) => Effect.Eff
5
5
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
6
6
  readonly keyId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSigningKeyId">;
7
7
  readonly payload: {
8
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
8
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
9
9
  readonly compilerConfigHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
10
10
  readonly compilerVersion: "0.2.0";
11
11
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
@@ -14,7 +14,7 @@ export declare const GroupAxisSchema: Schema.Literals<readonly ["grade", "instit
14
14
  export declare const SectionVisibilitySchema: Schema.Literals<readonly ["internal-entry", "visible"]>;
15
15
  /** One localized country of the catalog. */
16
16
  export declare const CatalogCountrySchema: Schema.Struct<{
17
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
17
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
18
18
  readonly description: Schema.optionalKey<Schema.String>;
19
19
  readonly graph: Schema.Struct<{
20
20
  readonly alignmentId: Schema.String;
@@ -33,7 +33,7 @@ export declare const CatalogCountrySchema: Schema.Struct<{
33
33
  }>;
34
34
  /** One localized exam of a country, and the axis that divides its tracks into groups. */
35
35
  export declare const CatalogExamSchema: Schema.Struct<{
36
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
36
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
37
37
  readonly description: Schema.optionalKey<Schema.String>;
38
38
  readonly graph: Schema.Struct<{
39
39
  readonly alignmentId: Schema.String;
@@ -53,7 +53,7 @@ export declare const CatalogExamSchema: Schema.Struct<{
53
53
  }>;
54
54
  /** One localized group of an exam on its axis: a year, a grade, or an institution. */
55
55
  export declare const CatalogGroupSchema: Schema.Struct<{
56
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
56
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
57
57
  readonly description: Schema.optionalKey<Schema.String>;
58
58
  readonly graph: Schema.Struct<{
59
59
  readonly alignmentId: Schema.String;
@@ -78,7 +78,7 @@ export declare const CatalogGroupSchema: Schema.Struct<{
78
78
  * track without its group.
79
79
  */
80
80
  export declare const CatalogTrackSchema: Schema.Struct<{
81
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
81
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
82
82
  readonly description: Schema.optionalKey<Schema.String>;
83
83
  readonly graph: Schema.Struct<{
84
84
  readonly alignmentId: Schema.String;
@@ -103,7 +103,7 @@ export declare const CatalogTrackSchema: Schema.Struct<{
103
103
  * that section.
104
104
  */
105
105
  export declare const CatalogSetSchema: Schema.Struct<{
106
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
106
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
107
107
  readonly description: Schema.optionalKey<Schema.String>;
108
108
  readonly graph: Schema.Struct<{
109
109
  readonly alignmentId: Schema.String;
@@ -133,7 +133,7 @@ export declare const CatalogSetSchema: Schema.Struct<{
133
133
  * its items, and its scoring, and the paper owns its places.
134
134
  */
135
135
  export declare const CatalogSectionSchema: Schema.Struct<{
136
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
136
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
137
137
  readonly description: Schema.optionalKey<Schema.String>;
138
138
  readonly graph: Schema.Struct<{
139
139
  readonly alignmentId: Schema.String;
@@ -156,7 +156,7 @@ export declare const CatalogSectionSchema: Schema.Struct<{
156
156
  }>;
157
157
  /** One row of the catalog, the navigation of the public try-outs. */
158
158
  export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
159
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
159
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
160
160
  readonly description: Schema.optionalKey<Schema.String>;
161
161
  readonly graph: Schema.Struct<{
162
162
  readonly alignmentId: Schema.String;
@@ -173,7 +173,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
173
173
  readonly order: Schema.Int;
174
174
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
175
175
  }>, Schema.Struct<{
176
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
176
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
177
177
  readonly description: Schema.optionalKey<Schema.String>;
178
178
  readonly graph: Schema.Struct<{
179
179
  readonly alignmentId: Schema.String;
@@ -191,7 +191,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
191
191
  readonly order: Schema.Int;
192
192
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
193
193
  }>, Schema.Struct<{
194
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
194
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
195
195
  readonly description: Schema.optionalKey<Schema.String>;
196
196
  readonly graph: Schema.Struct<{
197
197
  readonly alignmentId: Schema.String;
@@ -209,7 +209,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
209
209
  readonly order: Schema.Int;
210
210
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
211
211
  }>, Schema.Struct<{
212
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
212
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
213
213
  readonly description: Schema.optionalKey<Schema.String>;
214
214
  readonly graph: Schema.Struct<{
215
215
  readonly alignmentId: Schema.String;
@@ -228,7 +228,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
228
228
  readonly order: Schema.Int;
229
229
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
230
230
  }>, Schema.Struct<{
231
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
231
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
232
232
  readonly description: Schema.optionalKey<Schema.String>;
233
233
  readonly graph: Schema.Struct<{
234
234
  readonly alignmentId: Schema.String;
@@ -252,7 +252,7 @@ export declare const CatalogRowSchema: Schema.Union<readonly [Schema.Struct<{
252
252
  }>;
253
253
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
254
254
  }>, Schema.Struct<{
255
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
255
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
256
256
  readonly description: Schema.optionalKey<Schema.String>;
257
257
  readonly graph: Schema.Struct<{
258
258
  readonly alignmentId: Schema.String;
@@ -9,7 +9,7 @@ export declare const ASSESSMENT_SNAPSHOT_FORMAT = "assessment-snapshot";
9
9
  export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
10
10
  readonly kind: Schema.Literal<"catalog">;
11
11
  readonly row: Schema.Union<readonly [Schema.Struct<{
12
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
12
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
13
13
  readonly description: Schema.optionalKey<Schema.String>;
14
14
  readonly graph: Schema.Struct<{
15
15
  readonly alignmentId: Schema.String;
@@ -26,7 +26,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
26
26
  readonly order: Schema.Int;
27
27
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
28
28
  }>, Schema.Struct<{
29
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
29
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
30
30
  readonly description: Schema.optionalKey<Schema.String>;
31
31
  readonly graph: Schema.Struct<{
32
32
  readonly alignmentId: Schema.String;
@@ -44,7 +44,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
44
44
  readonly order: Schema.Int;
45
45
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
46
46
  }>, Schema.Struct<{
47
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
47
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
48
48
  readonly description: Schema.optionalKey<Schema.String>;
49
49
  readonly graph: Schema.Struct<{
50
50
  readonly alignmentId: Schema.String;
@@ -62,7 +62,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
62
62
  readonly order: Schema.Int;
63
63
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
64
64
  }>, Schema.Struct<{
65
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
65
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
66
66
  readonly description: Schema.optionalKey<Schema.String>;
67
67
  readonly graph: Schema.Struct<{
68
68
  readonly alignmentId: Schema.String;
@@ -81,7 +81,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
81
81
  readonly order: Schema.Int;
82
82
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
83
83
  }>, Schema.Struct<{
84
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
84
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
85
85
  readonly description: Schema.optionalKey<Schema.String>;
86
86
  readonly graph: Schema.Struct<{
87
87
  readonly alignmentId: Schema.String;
@@ -105,7 +105,7 @@ export declare const AssessmentRowSchema: Schema.Union<readonly [Schema.Struct<{
105
105
  }>;
106
106
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
107
107
  }>, Schema.Struct<{
108
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
108
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
109
109
  readonly description: Schema.optionalKey<Schema.String>;
110
110
  readonly graph: Schema.Struct<{
111
111
  readonly alignmentId: Schema.String;
@@ -610,7 +610,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
610
610
  readonly row: Schema.Union<readonly [Schema.Struct<{
611
611
  readonly kind: Schema.Literal<"catalog">;
612
612
  readonly row: Schema.Union<readonly [Schema.Struct<{
613
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
613
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
614
614
  readonly description: Schema.optionalKey<Schema.String>;
615
615
  readonly graph: Schema.Struct<{
616
616
  readonly alignmentId: Schema.String;
@@ -627,7 +627,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
627
627
  readonly order: Schema.Int;
628
628
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
629
629
  }>, Schema.Struct<{
630
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
630
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
631
631
  readonly description: Schema.optionalKey<Schema.String>;
632
632
  readonly graph: Schema.Struct<{
633
633
  readonly alignmentId: Schema.String;
@@ -645,7 +645,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
645
645
  readonly order: Schema.Int;
646
646
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
647
647
  }>, Schema.Struct<{
648
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
648
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
649
649
  readonly description: Schema.optionalKey<Schema.String>;
650
650
  readonly graph: Schema.Struct<{
651
651
  readonly alignmentId: Schema.String;
@@ -663,7 +663,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
663
663
  readonly order: Schema.Int;
664
664
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
665
665
  }>, Schema.Struct<{
666
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
666
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
667
667
  readonly description: Schema.optionalKey<Schema.String>;
668
668
  readonly graph: Schema.Struct<{
669
669
  readonly alignmentId: Schema.String;
@@ -682,7 +682,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
682
682
  readonly order: Schema.Int;
683
683
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
684
684
  }>, Schema.Struct<{
685
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
685
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
686
686
  readonly description: Schema.optionalKey<Schema.String>;
687
687
  readonly graph: Schema.Struct<{
688
688
  readonly alignmentId: Schema.String;
@@ -706,7 +706,7 @@ export declare const AssessmentRecordSchema: Schema.Struct<{
706
706
  }>;
707
707
  readonly publicPath: Schema.brand<Schema.String, "@NakafaAI/AksaraPublicPath">;
708
708
  }>, Schema.Struct<{
709
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
709
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
710
710
  readonly description: Schema.optionalKey<Schema.String>;
711
711
  readonly graph: Schema.Struct<{
712
712
  readonly alignmentId: Schema.String;
@@ -1265,7 +1265,7 @@ export declare const AssessmentRowOrder: Order.Order<AssessmentRow>;
1265
1265
  export declare const hashAssessmentRow: (row: {
1266
1266
  readonly kind: "catalog";
1267
1267
  readonly row: {
1268
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1268
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1269
1269
  readonly description?: string;
1270
1270
  readonly graph: {
1271
1271
  readonly alignmentId: string;
@@ -1282,7 +1282,7 @@ export declare const hashAssessmentRow: (row: {
1282
1282
  readonly order: number;
1283
1283
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1284
1284
  } | {
1285
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1285
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1286
1286
  readonly description?: string;
1287
1287
  readonly graph: {
1288
1288
  readonly alignmentId: string;
@@ -1300,7 +1300,7 @@ export declare const hashAssessmentRow: (row: {
1300
1300
  readonly order: number;
1301
1301
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1302
1302
  } | {
1303
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1303
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1304
1304
  readonly description?: string;
1305
1305
  readonly graph: {
1306
1306
  readonly alignmentId: string;
@@ -1318,7 +1318,7 @@ export declare const hashAssessmentRow: (row: {
1318
1318
  readonly order: number;
1319
1319
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1320
1320
  } | {
1321
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1321
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1322
1322
  readonly description?: string;
1323
1323
  readonly graph: {
1324
1324
  readonly alignmentId: string;
@@ -1337,7 +1337,7 @@ export declare const hashAssessmentRow: (row: {
1337
1337
  readonly order: number;
1338
1338
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1339
1339
  } | {
1340
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1340
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1341
1341
  readonly description?: string;
1342
1342
  readonly graph: {
1343
1343
  readonly alignmentId: string;
@@ -1361,7 +1361,7 @@ export declare const hashAssessmentRow: (row: {
1361
1361
  };
1362
1362
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
1363
1363
  } | {
1364
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1364
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
1365
1365
  readonly description?: string;
1366
1366
  readonly graph: {
1367
1367
  readonly alignmentId: string;
@@ -2545,7 +2545,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2545
2545
  readonly row: {
2546
2546
  readonly kind: "catalog";
2547
2547
  readonly row: {
2548
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2548
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2549
2549
  readonly description?: string;
2550
2550
  readonly graph: {
2551
2551
  readonly alignmentId: string;
@@ -2562,7 +2562,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2562
2562
  readonly order: number;
2563
2563
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2564
2564
  } | {
2565
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2565
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2566
2566
  readonly description?: string;
2567
2567
  readonly graph: {
2568
2568
  readonly alignmentId: string;
@@ -2580,7 +2580,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2580
2580
  readonly order: number;
2581
2581
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2582
2582
  } | {
2583
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2583
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2584
2584
  readonly description?: string;
2585
2585
  readonly graph: {
2586
2586
  readonly alignmentId: string;
@@ -2598,7 +2598,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2598
2598
  readonly order: number;
2599
2599
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2600
2600
  } | {
2601
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2601
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2602
2602
  readonly description?: string;
2603
2603
  readonly graph: {
2604
2604
  readonly alignmentId: string;
@@ -2617,7 +2617,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2617
2617
  readonly order: number;
2618
2618
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2619
2619
  } | {
2620
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2620
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2621
2621
  readonly description?: string;
2622
2622
  readonly graph: {
2623
2623
  readonly alignmentId: string;
@@ -2641,7 +2641,7 @@ export declare const digestAssessmentRows: <E, R>(records: Stream.Stream<{
2641
2641
  };
2642
2642
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
2643
2643
  } | {
2644
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2644
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
2645
2645
  readonly description?: string;
2646
2646
  readonly graph: {
2647
2647
  readonly alignmentId: string;
package/dist/content.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare const ContentAuthorSchema: Schema.Struct<{
11
11
  export type ContentAuthor = typeof ContentAuthorSchema.Type;
12
12
  /** Language-specific content head identity that artifacts and heads share. */
13
13
  export declare const ContentHeadIdentitySchema: Schema.Struct<{
14
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
14
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
15
15
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
16
16
  }>;
17
17
  /** Stable language-specific identity shared by artifacts and content heads. */
@@ -31,7 +31,7 @@ export declare const AKSARA_COMPILER_VERSION = "0.2.0";
31
31
  export declare const MDX_COMPILER_VERSION = "3.1.1";
32
32
  /** Authored source identity accepted before deterministic compilation. */
33
33
  export declare const CompileDocumentSourceSchema: Schema.Struct<{
34
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
34
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
35
35
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
36
36
  readonly rawMdx: Schema.String;
37
37
  readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
@@ -40,7 +40,7 @@ export declare const CompileDocumentSourceSchema: Schema.Struct<{
40
40
  export type CompileDocumentSource = typeof CompileDocumentSourceSchema.Type;
41
41
  /** Validated request accepted by the trusted MDX compiler. */
42
42
  export declare const CompileDocumentRequestSchema: Schema.Struct<{
43
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
43
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
44
44
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
45
45
  readonly rawMdx: Schema.String;
46
46
  readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
@@ -59,7 +59,7 @@ export declare const CompileDocumentRequestSchema: Schema.Struct<{
59
59
  export type CompileDocumentRequest = typeof CompileDocumentRequestSchema.Type;
60
60
  /** Compiled trusted payload: its evaluated content tree is what Nakafa renders. */
61
61
  export declare const CompiledContentPayloadSchema: Schema.Struct<{
62
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
62
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
63
63
  readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
64
64
  readonly compilerVersion: Schema.Literal<"0.2.0">;
65
65
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -92,7 +92,7 @@ export declare const SignedContentArtifactSchema: Schema.Struct<{
92
92
  readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
93
93
  readonly keyId: Schema.brand<Schema.String, "@NakafaAI/AksaraSigningKeyId">;
94
94
  readonly payload: Schema.Struct<{
95
- readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
95
+ readonly artifactLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
96
96
  readonly compilerConfigHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
97
97
  readonly compilerVersion: Schema.Literal<"0.2.0">;
98
98
  readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
@@ -130,7 +130,7 @@ export declare function canonicalizeContentArtifactSigningInput(artifactHash: ty
130
130
  export declare function canonicalizeSignedContentArtifact(artifact: SignedContentArtifact): string;
131
131
  /** Decodes unknown compiler input without throwing parser exceptions. */
132
132
  export declare const decodeCompileDocumentRequest: (input: unknown) => Effect.Effect<{
133
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
133
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
134
134
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
135
135
  readonly rawMdx: string;
136
136
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
@@ -148,7 +148,7 @@ export declare const decodeCompileDocumentRequest: (input: unknown) => Effect.Ef
148
148
  }, import("./errors.js").ContractDecodeError, never>;
149
149
  /** Strictly decodes one authored source before a publication recompile. */
150
150
  export declare const decodeCompileDocumentSource: (input: unknown) => Effect.Effect<{
151
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
151
+ readonly artifactLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
152
152
  readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
153
153
  readonly rawMdx: string;
154
154
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
@@ -7,7 +7,7 @@ export declare const LearningGraphAssetIdSchema: Schema.brand<Schema.String, "@N
7
7
  export type LearningGraphAssetId = typeof LearningGraphAssetIdSchema.Type;
8
8
  /** Semantic owner extracted from one exact current learning-graph asset ID. */
9
9
  export declare const LearningGraphAssetOwnerSchema: Schema.Struct<{
10
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
10
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
11
11
  readonly family: Schema.Literals<readonly ["article", "material", "quran", "tryout"]>;
12
12
  }>;
13
13
  export type LearningGraphAssetOwner = typeof LearningGraphAssetOwnerSchema.Type;
@@ -35,7 +35,7 @@ export declare class LearningGraphFamilyError extends LearningGraphFamilyError_b
35
35
  }
36
36
  /** Classifies one assetId-only reference without fabricating a full identity. */
37
37
  export declare const classifyLearningGraphAssetId: (input: string) => Effect.Effect<{
38
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
38
+ readonly appLocale: ("de" | "en" | "id" | "ms") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
39
39
  readonly family: "article" | "material" | "quran" | "tryout";
40
40
  }, LearningGraphAssetFamilyError, never>;
41
41
  /** Classifies one coherent current learning-graph identity for direct dispatch. */
@@ -2,7 +2,7 @@ import { Effect, Schema } from "effect";
2
2
  import { type LearningGraphIdentity } from "#contracts/graph/spec";
3
3
  /** Validated hierarchy segments required to derive one graph identity. */
4
4
  export declare const LearningGraphSegmentsSchema: Schema.Struct<{
5
- readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
5
+ readonly appLocale: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
6
6
  readonly concept: Schema.NonEmptyArray<Schema.String>;
7
7
  readonly learningObject: Schema.NonEmptyArray<Schema.String>;
8
8
  readonly lens: Schema.NonEmptyArray<Schema.String>;
package/dist/locale.d.ts CHANGED
@@ -1,17 +1,22 @@
1
1
  import { Schema } from "effect";
2
- /** Stable locale codes supported by the current Aksara contract. */
3
- export declare const AppLocaleCodeSchema: Schema.Literals<readonly ["en", "id", "de"]>;
2
+ /**
3
+ * Every locale code the contract declares, in canonical order: the active
4
+ * locales first, then a declared locale whose corpus is still being written.
5
+ * Malay (`ms`) is declared so its copy and content can be written completely
6
+ * before one release makes it active; an active locale never falls back.
7
+ */
8
+ export declare const AppLocaleCodeSchema: Schema.Literals<readonly ["en", "id", "de", "ms"]>;
4
9
  export type AppLocaleCode = typeof AppLocaleCodeSchema.Type;
5
- export declare const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE,]: readonly ["en", "id", "de"];
10
+ export declare const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE, MALAY_APP_LOCALE_CODE,]: readonly ["en", "id", "de", "ms"];
6
11
  /** Application locale used for Nakafa-owned interface and explanation copy. */
7
- export declare const AppLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">;
12
+ export declare const AppLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraAppLocale">;
8
13
  export type AppLocale = typeof AppLocaleSchema.Type;
9
14
  /** Narrows one canonical locale code while preserving application identity. */
10
15
  export declare function appLocaleLiteral<const Code extends AppLocaleCode>(code: Code): Schema.brand<Schema.Literal<Code>, "@NakafaAI/AksaraAppLocale">;
11
16
  /** Constructs one application locale without widening its literal identity. */
12
17
  export declare function makeAppLocale<const Code extends AppLocaleCode>(code: Code): Code & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
13
18
  /** Language delivered by content whose language may differ from the app shell. */
14
- export declare const DeliveryLanguageSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraDeliveryLanguage">;
19
+ export declare const DeliveryLanguageSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraDeliveryLanguage">;
15
20
  export type DeliveryLanguage = typeof DeliveryLanguageSchema.Type;
16
21
  /**
17
22
  * A language of one assessment text, as a BCP 47 tag in its canonical form, such
@@ -23,11 +28,14 @@ export type DeliveryLanguage = typeof DeliveryLanguageSchema.Type;
23
28
  export declare const ContentLanguageSchema: Schema.brand<Schema.String, "@NakafaAI/AksaraContentLanguage">;
24
29
  export type ContentLanguage = typeof ContentLanguageSchema.Type;
25
30
  /** Locale identity of one immutable compiled content artifact. */
26
- export declare const ArtifactLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraArtifactLocale">;
31
+ export declare const ArtifactLocaleSchema: Schema.brand<Schema.Literals<readonly ["en", "id", "de", "ms"]>, "@NakafaAI/AksaraArtifactLocale">;
27
32
  export type ArtifactLocale = typeof ArtifactLocaleSchema.Type;
28
33
  /** Canonical locale order used by every active-locale subset. */
29
- export declare const APP_LOCALE_CODES: readonly ["en", "id", "de"];
30
- /** Source-controlled application locale codes included by this corpus. */
34
+ export declare const APP_LOCALE_CODES: readonly ["en", "id", "de", "ms"];
35
+ /**
36
+ * Source-controlled application locale codes included by this corpus: every
37
+ * scope authors each of them, and the product serves each of them.
38
+ */
31
39
  export declare const ActiveAppLocaleCodeSchema: Schema.Literals<readonly ["en", "id", "de"]>;
32
40
  export type ActiveAppLocaleCode = typeof ActiveAppLocaleCodeSchema.Type;
33
41
  /** Source-controlled codes used to index the currently complete corpus. */
@@ -38,8 +46,11 @@ export type ActiveAppLocale = typeof ActiveAppLocaleSchema.Type;
38
46
  /** Returns the plain source-map key for one validated active app locale. */
39
47
  export declare function activeAppLocaleCode(appLocale: ActiveAppLocale): "de" | "en" | "id";
40
48
  /** Returns the plain source-map key for one validated artifact locale. */
41
- export declare function artifactLocaleCode(artifactLocale: ArtifactLocale): "de" | "en" | "id";
42
- /** Nonempty unique active locale subset in canonical contract order. */
49
+ export declare function artifactLocaleCode(artifactLocale: ArtifactLocale): "de" | "en" | "id" | "ms";
50
+ /**
51
+ * Nonempty unique active locale subset in canonical contract order. A declared
52
+ * locale joins it only once the contract makes that locale active.
53
+ */
43
54
  export declare const ActiveAppLocaleListSchema: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
44
55
  export type ActiveAppLocaleList = typeof ActiveAppLocaleListSchema.Type;
45
56
  /** Source-controlled application locales included by the current corpus. */
package/dist/locale.js CHANGED
@@ -1,8 +1,13 @@
1
1
  import { Array as Arr, Option, Schema } from "effect";
2
2
  import { hasCanonicalOrder } from "#contracts/canonical";
3
- /** Stable locale codes supported by the current Aksara contract. */
4
- export const AppLocaleCodeSchema = Schema.Literals(["en", "id", "de"]);
5
- export const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE,] = AppLocaleCodeSchema.literals;
3
+ /**
4
+ * Every locale code the contract declares, in canonical order: the active
5
+ * locales first, then a declared locale whose corpus is still being written.
6
+ * Malay (`ms`) is declared so its copy and content can be written completely
7
+ * before one release makes it active; an active locale never falls back.
8
+ */
9
+ export const AppLocaleCodeSchema = Schema.Literals(["en", "id", "de", "ms"]);
10
+ export const [ENGLISH_APP_LOCALE_CODE, INDONESIAN_APP_LOCALE_CODE, GERMAN_APP_LOCALE_CODE, MALAY_APP_LOCALE_CODE,] = AppLocaleCodeSchema.literals;
6
11
  const APP_LOCALE_BRAND = "@NakafaAI/AksaraAppLocale";
7
12
  /** Application locale used for Nakafa-owned interface and explanation copy. */
8
13
  export const AppLocaleSchema = AppLocaleCodeSchema.pipe(Schema.brand(APP_LOCALE_BRAND));
@@ -44,8 +49,15 @@ export const ContentLanguageSchema = Schema.String.pipe(Schema.check(Schema.make
44
49
  export const ArtifactLocaleSchema = AppLocaleCodeSchema.pipe(Schema.brand("@NakafaAI/AksaraArtifactLocale"));
45
50
  /** Canonical locale order used by every active-locale subset. */
46
51
  export const APP_LOCALE_CODES = AppLocaleCodeSchema.literals;
47
- /** Source-controlled application locale codes included by this corpus. */
48
- export const ActiveAppLocaleCodeSchema = AppLocaleCodeSchema;
52
+ /**
53
+ * Source-controlled application locale codes included by this corpus: every
54
+ * scope authors each of them, and the product serves each of them.
55
+ */
56
+ export const ActiveAppLocaleCodeSchema = AppLocaleCodeSchema.pick([
57
+ ENGLISH_APP_LOCALE_CODE,
58
+ INDONESIAN_APP_LOCALE_CODE,
59
+ GERMAN_APP_LOCALE_CODE,
60
+ ]);
49
61
  /** Source-controlled codes used to index the currently complete corpus. */
50
62
  export const ACTIVE_APP_LOCALE_CODES = ActiveAppLocaleCodeSchema.literals;
51
63
  /** Application locale currently required from every authored scope. */
@@ -60,11 +72,14 @@ export function artifactLocaleCode(artifactLocale) {
60
72
  }
61
73
  /** Checks a nonempty locale subset for uniqueness and canonical order. */
62
74
  function hasCanonicalActiveAppLocales(locales) {
63
- return hasCanonicalOrder(APP_LOCALE_CODES, locales);
75
+ return hasCanonicalOrder(ACTIVE_APP_LOCALE_CODES, locales);
64
76
  }
65
- /** Nonempty unique active locale subset in canonical contract order. */
66
- export const ActiveAppLocaleListSchema = Schema.NonEmptyArray(AppLocaleSchema).pipe(Schema.check(Schema.makeFilter(hasCanonicalActiveAppLocales, {
67
- message: "Active app locales must be unique and follow en, id, de order.",
77
+ /**
78
+ * Nonempty unique active locale subset in canonical contract order. A declared
79
+ * locale joins it only once the contract makes that locale active.
80
+ */
81
+ export const ActiveAppLocaleListSchema = Schema.NonEmptyArray(ActiveAppLocaleSchema).pipe(Schema.check(Schema.makeFilter(hasCanonicalActiveAppLocales, {
82
+ message: `Active app locales must be unique and follow ${Arr.join(ACTIVE_APP_LOCALE_CODES, ", ")} order.`,
68
83
  })));
69
84
  /** Source-controlled application locales included by the current corpus. */
70
85
  export const ACTIVE_APP_LOCALES = Schema.decodeSync(Schema.NonEmptyArray(ActiveAppLocaleSchema))(ACTIVE_APP_LOCALE_CODES);