@nakafa/aksara-contracts 0.48.6 → 0.48.7

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.
@@ -43,22 +43,20 @@ export class ArtifactPayloadFieldByteLimitError extends Schema.TaggedError()("Ar
43
43
  /** SHA-256 computation failed before authenticity could be established. */
44
44
  export class ArtifactHashComputationError extends Schema.TaggedError()("ArtifactHashComputationError", { contentKey: ContentKeySchema }) {
45
45
  }
46
- /** The signed artifact hash does not identify its canonical payload. */
47
- export class ArtifactHashMismatchError extends Schema.TaggedError()("ArtifactHashMismatchError", {
46
+ /** Fields that name one content hash, its content key, and the hash that failed. */
47
+ const ContentHashMismatchFields = {
48
48
  actualHash: Sha256HashSchema,
49
49
  contentKey: ContentKeySchema,
50
50
  expectedHash: Sha256HashSchema,
51
- }) {
51
+ };
52
+ /** The signed artifact hash does not identify its canonical payload. */
53
+ export class ArtifactHashMismatchError extends Schema.TaggedError()("ArtifactHashMismatchError", { ...ContentHashMismatchFields }) {
52
54
  }
53
55
  /** SHA-256 could not be calculated for the authenticated authored source. */
54
56
  export class ArtifactSourceHashComputationError extends Schema.TaggedError()("ArtifactSourceHashComputationError", { contentKey: ContentKeySchema }) {
55
57
  }
56
58
  /** The authenticated source hash does not identify the complete raw MDX. */
57
- export class ArtifactSourceHashMismatchError extends Schema.TaggedError()("ArtifactSourceHashMismatchError", {
58
- actualHash: Sha256HashSchema,
59
- contentKey: ContentKeySchema,
60
- expectedHash: Sha256HashSchema,
61
- }) {
59
+ export class ArtifactSourceHashMismatchError extends Schema.TaggedError()("ArtifactSourceHashMismatchError", { ...ContentHashMismatchFields }) {
62
60
  }
63
61
  /** A custom component required by the artifact is absent from the renderer. */
64
62
  export class ArtifactRendererComponentMissingError extends Schema.TaggedError()("ArtifactRendererComponentMissingError", {
@@ -0,0 +1,33 @@
1
+ import { Schema } from "effect";
2
+ /** Immutable identity of the active content catalog that one release builds on or replaces. */
3
+ export declare const ActiveCatalogIdentitySchema: Schema.Struct<{
4
+ readonly activeAppLocales: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
5
+ readonly manifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
6
+ readonly releaseId: Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">;
7
+ readonly resultCount: Schema.Finite;
8
+ readonly resultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
9
+ readonly snapshots: Schema.Struct<{
10
+ readonly program: Schema.Struct<{
11
+ readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
12
+ readonly mode: Schema.Literals<readonly ["inherit", "replace", "restore"]>;
13
+ readonly resultSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
14
+ readonly rowCount: Schema.Int;
15
+ readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
16
+ }>;
17
+ readonly quran: Schema.Struct<{
18
+ readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
19
+ readonly mode: Schema.Literals<readonly ["inherit", "replace", "restore"]>;
20
+ readonly resultSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
21
+ readonly rowCount: Schema.Int;
22
+ readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
23
+ }>;
24
+ readonly tryout: Schema.Struct<{
25
+ readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
26
+ readonly mode: Schema.Literals<readonly ["inherit", "replace", "restore"]>;
27
+ readonly resultSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
28
+ readonly rowCount: Schema.Int;
29
+ readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
30
+ }>;
31
+ }>;
32
+ }>;
33
+ export type ActiveCatalogIdentity = typeof ActiveCatalogIdentitySchema.Type;
@@ -0,0 +1,14 @@
1
+ import { Schema } from "effect";
2
+ import { ReleaseIdSchema, Sha256HashSchema } from "#contracts/ids";
3
+ import { ActiveAppLocaleListSchema } from "#contracts/locale";
4
+ import { ContentSnapshotSetSchema } from "#contracts/release/snapshot/spec";
5
+ import { ReleaseCountSchema } from "#contracts/release/spec";
6
+ /** Immutable identity of the active content catalog that one release builds on or replaces. */
7
+ export const ActiveCatalogIdentitySchema = Schema.Struct({
8
+ activeAppLocales: ActiveAppLocaleListSchema,
9
+ manifestHash: Sha256HashSchema,
10
+ releaseId: ReleaseIdSchema,
11
+ resultCount: ReleaseCountSchema,
12
+ resultDigest: Sha256HashSchema,
13
+ snapshots: ContentSnapshotSetSchema,
14
+ });
@@ -10,3 +10,9 @@ export declare const ReleaseCountMismatchFields: {
10
10
  expectedCount: import("effect/Schema").Finite;
11
11
  releaseId: import("effect/Schema").brand<import("effect/Schema").String, "@NakafaAI/AksaraReleaseId">;
12
12
  };
13
+ /** Fields that name one signed release manifest hash and the recomputed hash that failed. */
14
+ export declare const ReleaseHashMismatchFields: {
15
+ actualHash: import("effect/Schema").brand<import("effect/Schema").String, "@NakafaAI/AksaraSha256Hash">;
16
+ expectedHash: import("effect/Schema").brand<import("effect/Schema").String, "@NakafaAI/AksaraSha256Hash">;
17
+ releaseId: import("effect/Schema").brand<import("effect/Schema").String, "@NakafaAI/AksaraReleaseId">;
18
+ };
@@ -12,3 +12,9 @@ export const ReleaseCountMismatchFields = {
12
12
  expectedCount: ReleaseCountSchema,
13
13
  releaseId: ReleaseIdSchema,
14
14
  };
15
+ /** Fields that name one signed release manifest hash and the recomputed hash that failed. */
16
+ export const ReleaseHashMismatchFields = {
17
+ actualHash: Sha256HashSchema,
18
+ expectedHash: Sha256HashSchema,
19
+ releaseId: ReleaseIdSchema,
20
+ };
@@ -1,6 +1,7 @@
1
1
  import { Array as Arr, Effect, Schema } from "effect";
2
2
  import { ContentFamilySchema } from "#contracts/content";
3
3
  import { ActiveAppLocaleListSchema } from "#contracts/locale";
4
+ import { hasSameAppLocales } from "#contracts/release/current/evidence";
4
5
  import { ContentSnapshotKindSchema, } from "#contracts/release/snapshot/scope";
5
6
  const ClosureFieldSchema = Schema.Literals([
6
7
  "activeAppLocales",
@@ -21,14 +22,9 @@ export class ReleasePolicyClosureError extends Schema.TaggedError()("ReleasePoli
21
22
  field: ClosureFieldSchema,
22
23
  }) {
23
24
  }
24
- /** Compares locale lists without exchanging their branded element roles. */
25
- function hasSameLocaleCodes(left, right) {
26
- return (left.length === right.length &&
27
- Arr.every(left, (locale, index) => locale === right[index]));
28
- }
29
25
  /** Returns whether two release policies have the same signed identity. */
30
26
  function hasSamePolicy(left, right) {
31
- return hasSameLocaleCodes(left.activeAppLocales, right.activeAppLocales);
27
+ return hasSameAppLocales(left.activeAppLocales, right.activeAppLocales);
32
28
  }
33
29
  /** Fails with one exact structured-scope policy mismatch. */
34
30
  function failClosure(input) {
@@ -36,7 +32,7 @@ function failClosure(input) {
36
32
  }
37
33
  /** Verifies one replacement snapshot against the new release policy. */
38
34
  function verifyManifestPolicy(manifest, policy) {
39
- if (!hasSameLocaleCodes(manifest.manifest.activeAppLocales, policy.activeAppLocales)) {
35
+ if (!hasSameAppLocales(manifest.manifest.activeAppLocales, policy.activeAppLocales)) {
40
36
  return failClosure({
41
37
  actual: Arr.join(manifest.manifest.activeAppLocales, ","),
42
38
  expected: Arr.join(policy.activeAppLocales, ","),
@@ -73,7 +73,7 @@ export declare const digestResultCatalog: <E, R>(releaseId: string & import("eff
73
73
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
74
74
  readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
75
75
  readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
76
- readonly family: "page";
76
+ readonly family: "article";
77
77
  } | {
78
78
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
79
79
  readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
@@ -85,7 +85,7 @@ export declare const digestResultCatalog: <E, R>(releaseId: string & import("eff
85
85
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
86
86
  readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
87
87
  readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
88
- readonly family: "question";
88
+ readonly family: "material";
89
89
  } | {
90
90
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
91
91
  readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
@@ -97,7 +97,7 @@ export declare const digestResultCatalog: <E, R>(releaseId: string & import("eff
97
97
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
98
98
  readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
99
99
  readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
100
- readonly family: "article";
100
+ readonly family: "page";
101
101
  } | {
102
102
  readonly artifactHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
103
103
  readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
@@ -109,7 +109,7 @@ export declare const digestResultCatalog: <E, R>(releaseId: string & import("eff
109
109
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
110
110
  readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
111
111
  readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
112
- readonly family: "material";
112
+ readonly family: "question";
113
113
  }, E, R>) => Effect.Effect<{
114
114
  count: number;
115
115
  digest: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
@@ -18,26 +18,18 @@ export const RollbackAbsentStateSchema = Schema.Struct({
18
18
  family: ContentFamilySchema,
19
19
  state: Schema.Literal("absent"),
20
20
  });
21
+ /** Builds the compact prior state of one content family from its head schema. */
22
+ function headStateSchema(state, head) {
23
+ return Schema.Struct({ head, state: Schema.Literal(state) });
24
+ }
21
25
  /** Compact authoritative prior article head protected by one rollback digest. */
22
- export const RollbackArticleStateSchema = Schema.Struct({
23
- head: ArticleHeadSchema,
24
- state: Schema.Literal("article"),
25
- });
26
+ export const RollbackArticleStateSchema = headStateSchema("article", ArticleHeadSchema);
26
27
  /** Compact authoritative prior head protected by one rollback snapshot digest. */
27
- export const RollbackMaterialStateSchema = Schema.Struct({
28
- head: MaterialHeadSchema,
29
- state: Schema.Literal("material"),
30
- });
28
+ export const RollbackMaterialStateSchema = headStateSchema("material", MaterialHeadSchema);
31
29
  /** Compact authoritative prior page head protected by one rollback digest. */
32
- export const RollbackPageStateSchema = Schema.Struct({
33
- head: PageHeadSchema,
34
- state: Schema.Literal("page"),
35
- });
30
+ export const RollbackPageStateSchema = headStateSchema("page", PageHeadSchema);
36
31
  /** Compact authoritative prior question head protected by one rollback digest. */
37
- export const RollbackQuestionStateSchema = Schema.Struct({
38
- head: QuestionHeadSchema,
39
- state: Schema.Literal("question"),
40
- });
32
+ export const RollbackQuestionStateSchema = headStateSchema("question", QuestionHeadSchema);
41
33
  /** Complete compact state vocabulary authenticated for one future rollback. */
42
34
  export const RollbackSnapshotStateSchema = Schema.Union([
43
35
  RollbackAbsentStateSchema,
@@ -8,21 +8,16 @@ import { encodeJsonText } from "#contracts/text/json";
8
8
  import { TryoutCatalogRecordSchema } from "#contracts/tryout/catalog";
9
9
  import { TryoutPlacementRecordSchema } from "#contracts/tryout/placement";
10
10
  import { TryoutSnapshotSchema } from "#contracts/tryout/snapshot/spec";
11
+ /** Pairs one family literal with the snapshot manifest it selects. */
12
+ function familyManifestSchema(family, manifest) {
13
+ return Schema.Struct({ family: Schema.Literal(family), manifest });
14
+ }
11
15
  /** Program manifest selected by one globally signed content release. */
12
- const ProgramManifestSchema = Schema.Struct({
13
- family: Schema.Literal("program"),
14
- manifest: ProgramSnapshotSchema,
15
- });
16
+ const ProgramManifestSchema = familyManifestSchema("program", ProgramSnapshotSchema);
16
17
  /** Quran manifest selected by one globally signed content release. */
17
- const QuranManifestSchema = Schema.Struct({
18
- family: Schema.Literal("quran"),
19
- manifest: QuranSnapshotSchema,
20
- });
18
+ const QuranManifestSchema = familyManifestSchema("quran", QuranSnapshotSchema);
21
19
  /** Try-out manifest selected by one globally signed content release. */
22
- const TryoutManifestSchema = Schema.Struct({
23
- family: Schema.Literal("tryout"),
24
- manifest: TryoutSnapshotSchema,
25
- });
20
+ const TryoutManifestSchema = familyManifestSchema("tryout", TryoutSnapshotSchema);
26
21
  /** Complete structured snapshot manifest vocabulary staged before its rows. */
27
22
  export const ContentSnapshotManifestSchema = Schema.Union([
28
23
  ProgramManifestSchema,
@@ -207,6 +207,81 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
207
207
  readonly family: "quran";
208
208
  readonly record: {
209
209
  readonly payload: {
210
+ readonly firstQuranNumber: number;
211
+ readonly firstVerse: number;
212
+ readonly kind: "quran-chunk";
213
+ readonly lastVerse: number;
214
+ readonly surahNumber: number;
215
+ readonly verses: readonly [{
216
+ readonly meta: {
217
+ readonly hizbQuarter: number;
218
+ readonly juz: number;
219
+ readonly manzil: number;
220
+ readonly page: number;
221
+ readonly ruku: number;
222
+ readonly sajda: "obligatory" | "recommended" | null;
223
+ };
224
+ readonly number: {
225
+ readonly inQuran: number;
226
+ readonly inSurah: number;
227
+ };
228
+ readonly tafsir: readonly {
229
+ readonly appLocale: "id";
230
+ readonly footnotes: string | null;
231
+ readonly text: string;
232
+ }[];
233
+ readonly text: {
234
+ readonly arabic: string;
235
+ };
236
+ readonly translations: readonly [{
237
+ readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
238
+ readonly value: {
239
+ readonly footnotes: string;
240
+ readonly text: string;
241
+ };
242
+ }, ...{
243
+ readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
244
+ readonly value: {
245
+ readonly footnotes: string;
246
+ readonly text: string;
247
+ };
248
+ }[]];
249
+ }, ...{
250
+ readonly meta: {
251
+ readonly hizbQuarter: number;
252
+ readonly juz: number;
253
+ readonly manzil: number;
254
+ readonly page: number;
255
+ readonly ruku: number;
256
+ readonly sajda: "obligatory" | "recommended" | null;
257
+ };
258
+ readonly number: {
259
+ readonly inQuran: number;
260
+ readonly inSurah: number;
261
+ };
262
+ readonly tafsir: readonly {
263
+ readonly appLocale: "id";
264
+ readonly footnotes: string | null;
265
+ readonly text: string;
266
+ }[];
267
+ readonly text: {
268
+ readonly arabic: string;
269
+ };
270
+ readonly translations: readonly [{
271
+ readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
272
+ readonly value: {
273
+ readonly footnotes: string;
274
+ readonly text: string;
275
+ };
276
+ }, ...{
277
+ readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
278
+ readonly value: {
279
+ readonly footnotes: string;
280
+ readonly text: string;
281
+ };
282
+ }[]];
283
+ }[]];
284
+ } | {
210
285
  readonly activeAppLocales: readonly [("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">, ...(("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">)[]];
211
286
  readonly kind: "quran-attribution";
212
287
  readonly sources: readonly [{
@@ -343,81 +418,6 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
343
418
  readonly notice: string;
344
419
  readonly sourceId: "mokhtasar-german";
345
420
  })[]];
346
- } | {
347
- readonly firstQuranNumber: number;
348
- readonly firstVerse: number;
349
- readonly kind: "quran-chunk";
350
- readonly lastVerse: number;
351
- readonly surahNumber: number;
352
- readonly verses: readonly [{
353
- readonly meta: {
354
- readonly hizbQuarter: number;
355
- readonly juz: number;
356
- readonly manzil: number;
357
- readonly page: number;
358
- readonly ruku: number;
359
- readonly sajda: "obligatory" | "recommended" | null;
360
- };
361
- readonly number: {
362
- readonly inQuran: number;
363
- readonly inSurah: number;
364
- };
365
- readonly tafsir: readonly {
366
- readonly appLocale: "id";
367
- readonly footnotes: string | null;
368
- readonly text: string;
369
- }[];
370
- readonly text: {
371
- readonly arabic: string;
372
- };
373
- readonly translations: readonly [{
374
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
375
- readonly value: {
376
- readonly footnotes: string;
377
- readonly text: string;
378
- };
379
- }, ...{
380
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
381
- readonly value: {
382
- readonly footnotes: string;
383
- readonly text: string;
384
- };
385
- }[]];
386
- }, ...{
387
- readonly meta: {
388
- readonly hizbQuarter: number;
389
- readonly juz: number;
390
- readonly manzil: number;
391
- readonly page: number;
392
- readonly ruku: number;
393
- readonly sajda: "obligatory" | "recommended" | null;
394
- };
395
- readonly number: {
396
- readonly inQuran: number;
397
- readonly inSurah: number;
398
- };
399
- readonly tafsir: readonly {
400
- readonly appLocale: "id";
401
- readonly footnotes: string | null;
402
- readonly text: string;
403
- }[];
404
- readonly text: {
405
- readonly arabic: string;
406
- };
407
- readonly translations: readonly [{
408
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
409
- readonly value: {
410
- readonly footnotes: string;
411
- readonly text: string;
412
- };
413
- }, ...{
414
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
415
- readonly value: {
416
- readonly footnotes: string;
417
- readonly text: string;
418
- };
419
- }[]];
420
- }[]];
421
421
  } | {
422
422
  readonly name: {
423
423
  readonly arabic: string;
@@ -468,23 +468,11 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
468
468
  };
469
469
  readonly sourceRevision: string;
470
470
  readonly title: string;
471
+ readonly countryCode: string;
471
472
  readonly countryKey: string;
472
- readonly examKey: string;
473
- readonly kind: "section";
474
- readonly marks?: {
475
- readonly blank: number;
476
- readonly correct: number;
477
- readonly wrong: number;
478
- };
473
+ readonly kind: "country";
479
474
  readonly order: number;
480
- readonly publicPath?: (string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">) | undefined;
481
- readonly questionCount: number;
482
- readonly questionSourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
483
- readonly sectionKey: string;
484
- readonly setKey: string;
485
- readonly timeLimitSeconds: number;
486
- readonly trackKey: string;
487
- readonly visibility: "internal-entry" | "visible";
475
+ readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
488
476
  } | {
489
477
  readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
490
478
  readonly description?: string | undefined;
@@ -499,16 +487,10 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
499
487
  readonly title: string;
500
488
  readonly countryKey: string;
501
489
  readonly examKey: string;
502
- readonly internalEntrySectionKey?: string | undefined;
503
- readonly kind: "set";
490
+ readonly kind: "exam";
504
491
  readonly order: number;
505
492
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
506
- readonly questionCount: number;
507
493
  readonly scoringStrategy: "irt" | "penalized" | "raw";
508
- readonly sectionCount: number;
509
- readonly setKey: string;
510
- readonly trackKey: string;
511
- readonly visibleSectionCount: number;
512
494
  } | {
513
495
  readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
514
496
  readonly description?: string | undefined;
@@ -546,10 +528,16 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
546
528
  readonly title: string;
547
529
  readonly countryKey: string;
548
530
  readonly examKey: string;
549
- readonly kind: "exam";
531
+ readonly internalEntrySectionKey?: string | undefined;
532
+ readonly kind: "set";
550
533
  readonly order: number;
551
534
  readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
535
+ readonly questionCount: number;
552
536
  readonly scoringStrategy: "irt" | "penalized" | "raw";
537
+ readonly sectionCount: number;
538
+ readonly setKey: string;
539
+ readonly trackKey: string;
540
+ readonly visibleSectionCount: number;
553
541
  } | {
554
542
  readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
555
543
  readonly description?: string | undefined;
@@ -562,11 +550,23 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
562
550
  };
563
551
  readonly sourceRevision: string;
564
552
  readonly title: string;
565
- readonly countryCode: string;
566
553
  readonly countryKey: string;
567
- readonly kind: "country";
554
+ readonly examKey: string;
555
+ readonly kind: "section";
556
+ readonly marks?: {
557
+ readonly blank: number;
558
+ readonly correct: number;
559
+ readonly wrong: number;
560
+ };
568
561
  readonly order: number;
569
- readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
562
+ readonly publicPath?: (string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">) | undefined;
563
+ readonly questionCount: number;
564
+ readonly questionSourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
565
+ readonly sectionKey: string;
566
+ readonly setKey: string;
567
+ readonly timeLimitSeconds: number;
568
+ readonly trackKey: string;
569
+ readonly visibility: "internal-entry" | "visible";
570
570
  };
571
571
  readonly rowHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
572
572
  };
@@ -599,6 +599,35 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
599
599
  readonly questionSourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
600
600
  readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
601
601
  readonly response: {
602
+ readonly kind: "single-choice";
603
+ readonly options: readonly {
604
+ readonly isCorrect: boolean;
605
+ readonly label: string;
606
+ readonly optionKey: string;
607
+ readonly order: number;
608
+ }[];
609
+ } | {
610
+ readonly kind: "multiple-choice";
611
+ readonly options: readonly {
612
+ readonly isCorrect: boolean;
613
+ readonly label: string;
614
+ readonly optionKey: string;
615
+ readonly order: number;
616
+ }[];
617
+ } | {
618
+ readonly categories: readonly {
619
+ readonly categoryKey: string;
620
+ readonly label: string;
621
+ readonly order: number;
622
+ }[];
623
+ readonly kind: "category";
624
+ readonly statements: readonly {
625
+ readonly correctCategoryKey: string;
626
+ readonly label: string;
627
+ readonly order: number;
628
+ readonly statementKey: string;
629
+ }[];
630
+ } | {
602
631
  readonly criteria: readonly {
603
632
  readonly criterionKey: string;
604
633
  readonly finalAnswer?: {
@@ -633,35 +662,6 @@ export declare function decodeContentSnapshotRows<E, R>(rows: Stream.Stream<unkn
633
662
  }[];
634
663
  }[];
635
664
  readonly kind: "rubric";
636
- } | {
637
- readonly categories: readonly {
638
- readonly categoryKey: string;
639
- readonly label: string;
640
- readonly order: number;
641
- }[];
642
- readonly kind: "category";
643
- readonly statements: readonly {
644
- readonly correctCategoryKey: string;
645
- readonly label: string;
646
- readonly order: number;
647
- readonly statementKey: string;
648
- }[];
649
- } | {
650
- readonly kind: "multiple-choice";
651
- readonly options: readonly {
652
- readonly isCorrect: boolean;
653
- readonly label: string;
654
- readonly optionKey: string;
655
- readonly order: number;
656
- }[];
657
- } | {
658
- readonly kind: "single-choice";
659
- readonly options: readonly {
660
- readonly isCorrect: boolean;
661
- readonly label: string;
662
- readonly optionKey: string;
663
- readonly order: number;
664
- }[];
665
665
  } | {
666
666
  readonly key: {
667
667
  readonly acceptsFractions: boolean;
@@ -1,7 +1,7 @@
1
1
  import { Effect, Schema } from "effect";
2
- import { ReleaseIdSchema, Sha256HashSchema } from "#contracts/ids";
3
2
  import { hashContentReleaseManifest } from "#contracts/release/hash";
4
3
  import { ContentReleaseBundleSchema, RollbackContentReleaseBundleSchema, } from "#contracts/release/lifecycle";
4
+ import { ReleaseHashMismatchFields } from "#contracts/release/mismatch";
5
5
  import { canonicalizeContentReleaseSigningInput } from "#contracts/release/signing";
6
6
  import { SignedContentReleaseSchema, } from "#contracts/release/spec";
7
7
  import { validateRendererManifestHash } from "#contracts/renderer/manifest";
@@ -12,11 +12,7 @@ export class ReleaseVerificationDecodeError extends Schema.TaggedError()("Releas
12
12
  }) {
13
13
  }
14
14
  /** The envelope hash does not identify its complete canonical manifest. */
15
- export class ReleaseManifestHashMismatchError extends Schema.TaggedError()("ReleaseManifestHashMismatchError", {
16
- actualHash: Sha256HashSchema,
17
- expectedHash: Sha256HashSchema,
18
- releaseId: ReleaseIdSchema,
19
- }) {
15
+ export class ReleaseManifestHashMismatchError extends Schema.TaggedError()("ReleaseManifestHashMismatchError", { ...ReleaseHashMismatchFields }) {
20
16
  }
21
17
  /** Stored release recovery input does not satisfy its exact bundle contract. */
22
18
  export class ReleaseBundleVerificationDecodeError extends Schema.TaggedError()("ReleaseBundleVerificationDecodeError", {
@@ -495,21 +495,6 @@ export declare const decodePublicContentRuntimeResponse: (input: unknown) => Eff
495
495
  readonly activeReleaseId: string & import("effect/Brand").Brand<"@NakafaAI/AksaraReleaseId">;
496
496
  readonly delivery: "public";
497
497
  readonly projection: {
498
- readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
499
- readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
500
- readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
501
- readonly pageKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPageKey">;
502
- readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
503
- readonly kind: "public-page";
504
- readonly metadata: {
505
- readonly dateModified?: string;
506
- readonly datePublished: string;
507
- readonly description: string;
508
- readonly title: string;
509
- };
510
- readonly sitemap: true;
511
- readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
512
- } | {
513
498
  readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
514
499
  readonly articleRouteSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleRouteSlug">;
515
500
  readonly articleSlug: string & import("effect/Brand").Brand<"@NakafaAI/AksaraArticleSlug">;
@@ -578,6 +563,21 @@ export declare const decodePublicContentRuntimeResponse: (input: unknown) => Eff
578
563
  readonly parentPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
579
564
  readonly sitemap: true;
580
565
  readonly topicTitle: string;
566
+ } | {
567
+ readonly appLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraAppLocale">;
568
+ readonly artifactLocale: ("de" | "en" | "id") & import("effect/Brand").Brand<"@NakafaAI/AksaraArtifactLocale">;
569
+ readonly contentKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentKey">;
570
+ readonly pageKey: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPageKey">;
571
+ readonly publicPath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraPublicPath">;
572
+ readonly kind: "public-page";
573
+ readonly metadata: {
574
+ readonly dateModified?: string;
575
+ readonly datePublished: string;
576
+ readonly description: string;
577
+ readonly title: string;
578
+ };
579
+ readonly sitemap: true;
580
+ readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
581
581
  };
582
582
  readonly projectionHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
583
583
  } | {