@nakafa/aksara-contracts 0.48.6 → 0.48.8
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/dist/artifact/spec.js +6 -8
- package/dist/errors.d.ts +5 -0
- package/dist/errors.js +6 -0
- package/dist/preview/target.d.ts +5 -0
- package/dist/preview/target.js +5 -3
- package/dist/projection/verify.d.ts +114 -114
- package/dist/projection/verify.js +1 -1
- package/dist/release/count.d.ts +3 -0
- package/dist/release/count.js +3 -0
- package/dist/release/current/evidence.d.ts +12 -12
- package/dist/release/current/state.d.ts +4 -4
- package/dist/release/identity.d.ts +33 -0
- package/dist/release/identity.js +14 -0
- package/dist/release/items.js +2 -1
- package/dist/release/lifecycle.d.ts +4 -4
- package/dist/release/mismatch.d.ts +6 -0
- package/dist/release/mismatch.js +7 -1
- package/dist/release/policy.js +3 -7
- package/dist/release/rollback/spec.js +8 -16
- package/dist/release/route/verify.d.ts +1 -1
- package/dist/release/route/verify.js +1 -1
- package/dist/release/snapshot/data.js +7 -12
- package/dist/release/snapshot/verify.d.ts +29 -29
- package/dist/release/spec.d.ts +49 -51
- package/dist/release/spec.js +4 -14
- package/dist/release/verify.js +2 -6
- package/dist/renderer/contract.js +2 -4
- package/dist/runtime/spec.d.ts +15 -15
- package/dist/runtime/verify.d.ts +46 -46
- package/dist/transport/request.d.ts +701 -701
- package/dist/transport/response.d.ts +228 -228
- package/dist/tryout/runtime/verify.d.ts +1 -1
- package/dist/tryout/runtime/verify.js +2 -4
- package/package.json +5 -1
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Schema, Stream } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import type { ContentReleaseManifest } from "#contracts/release/spec";
|
|
3
3
|
declare const RouteDecodeError_base: Schema.Class<RouteDecodeError, Schema.TaggedStruct<"RouteDecodeError", {
|
|
4
4
|
readonly routeOffset: Schema.Finite;
|
|
5
5
|
}>, import("effect/Cause").YieldableError>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Effect, MutableHashMap, Option, Schema, Stream } from "effect";
|
|
2
2
|
import { routeIdentity } from "#contracts/content";
|
|
3
3
|
import { PublicPathSchema } from "#contracts/ids";
|
|
4
|
+
import { ReleaseCountSchema } from "#contracts/release/count";
|
|
4
5
|
import { ReleaseDigestMismatchFields } from "#contracts/release/mismatch";
|
|
5
6
|
import { digestRoutes } from "#contracts/release/route/digest";
|
|
6
7
|
import { ContentRouteItemSchema } from "#contracts/release/route/spec";
|
|
7
|
-
import { ReleaseCountSchema, } from "#contracts/release/spec";
|
|
8
8
|
/** One streamed route failed strict wire decoding. */
|
|
9
9
|
export class RouteDecodeError extends Schema.TaggedError()("RouteDecodeError", { routeOffset: ReleaseCountSchema }) {
|
|
10
10
|
}
|
|
@@ -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 =
|
|
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 =
|
|
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 =
|
|
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,
|
|
@@ -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 categories: readonly {
|
|
603
|
+
readonly categoryKey: string;
|
|
604
|
+
readonly label: string;
|
|
605
|
+
readonly order: number;
|
|
606
|
+
}[];
|
|
607
|
+
readonly kind: "category";
|
|
608
|
+
readonly statements: readonly {
|
|
609
|
+
readonly correctCategoryKey: string;
|
|
610
|
+
readonly label: string;
|
|
611
|
+
readonly order: number;
|
|
612
|
+
readonly statementKey: string;
|
|
613
|
+
}[];
|
|
614
|
+
} | {
|
|
615
|
+
readonly kind: "multiple-choice";
|
|
616
|
+
readonly options: readonly {
|
|
617
|
+
readonly isCorrect: boolean;
|
|
618
|
+
readonly label: string;
|
|
619
|
+
readonly optionKey: string;
|
|
620
|
+
readonly order: number;
|
|
621
|
+
}[];
|
|
622
|
+
} | {
|
|
623
|
+
readonly kind: "single-choice";
|
|
624
|
+
readonly options: readonly {
|
|
625
|
+
readonly isCorrect: boolean;
|
|
626
|
+
readonly label: string;
|
|
627
|
+
readonly optionKey: string;
|
|
628
|
+
readonly order: number;
|
|
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;
|
package/dist/release/spec.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { type AppLocale } from "#contracts/locale";
|
|
3
3
|
/** Semantic wire identity of the current localized content release. */
|
|
4
4
|
export declare const CONTENT_RELEASE_FORMAT = "localized-content-release";
|
|
5
|
-
/** Nonnegative release inventory count authenticated by one manifest. */
|
|
6
|
-
export declare const ReleaseCountSchema: Schema.Finite;
|
|
7
5
|
/** One immutable artifact selected for a locale-specific content head. */
|
|
8
6
|
export declare const ContentUpsertSchema: Schema.Struct<{
|
|
9
7
|
readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
@@ -263,25 +261,10 @@ export declare const RollbackSignedContentReleaseSchema: Schema.refine<RollbackS
|
|
|
263
261
|
/** Pre-activation evidence proving the fully staged release is coherent. */
|
|
264
262
|
export declare const ReleaseVerificationEvidenceSchema: Schema.Struct<{
|
|
265
263
|
readonly activeAppLocales: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
|
|
266
|
-
readonly baseActiveAppLocales: Schema.NullOr<Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>>;
|
|
267
|
-
readonly baseManifestHash: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
268
|
-
readonly baseReleaseId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">>;
|
|
269
|
-
readonly baseResultCount: Schema.Finite;
|
|
270
|
-
readonly baseResultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
271
|
-
readonly deleteHeads: Schema.Finite;
|
|
272
|
-
readonly itemCount: Schema.Finite;
|
|
273
|
-
readonly itemsDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
274
264
|
readonly manifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
275
|
-
readonly projectionCount: Schema.Finite;
|
|
276
|
-
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
277
265
|
readonly releaseId: Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">;
|
|
278
|
-
readonly rendererManifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
279
266
|
readonly resultCount: Schema.Finite;
|
|
280
267
|
readonly resultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
281
|
-
readonly rollbackCount: Schema.Finite;
|
|
282
|
-
readonly rollbackDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
283
|
-
readonly routeCount: Schema.Finite;
|
|
284
|
-
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
285
268
|
readonly snapshots: Schema.Struct<{
|
|
286
269
|
readonly program: Schema.Struct<{
|
|
287
270
|
readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
@@ -305,6 +288,21 @@ export declare const ReleaseVerificationEvidenceSchema: Schema.Struct<{
|
|
|
305
288
|
readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
306
289
|
}>;
|
|
307
290
|
}>;
|
|
291
|
+
readonly baseActiveAppLocales: Schema.NullOr<Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>>;
|
|
292
|
+
readonly baseManifestHash: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
293
|
+
readonly baseReleaseId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">>;
|
|
294
|
+
readonly baseResultCount: Schema.Finite;
|
|
295
|
+
readonly baseResultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
296
|
+
readonly deleteHeads: Schema.Finite;
|
|
297
|
+
readonly itemCount: Schema.Finite;
|
|
298
|
+
readonly itemsDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
299
|
+
readonly projectionCount: Schema.Finite;
|
|
300
|
+
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
301
|
+
readonly rendererManifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
302
|
+
readonly rollbackCount: Schema.Finite;
|
|
303
|
+
readonly rollbackDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
304
|
+
readonly routeCount: Schema.Finite;
|
|
305
|
+
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
308
306
|
readonly stagedArtifacts: Schema.Finite;
|
|
309
307
|
readonly stagedRoutes: Schema.Finite;
|
|
310
308
|
readonly stagedSnapshotRows: Schema.Finite;
|
|
@@ -321,25 +319,10 @@ export declare const ReleaseVerificationPendingSchema: Schema.Struct<{
|
|
|
321
319
|
export declare const ReleaseVerificationCompleteSchema: Schema.Struct<{
|
|
322
320
|
readonly evidence: Schema.Struct<{
|
|
323
321
|
readonly activeAppLocales: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
|
|
324
|
-
readonly baseActiveAppLocales: Schema.NullOr<Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>>;
|
|
325
|
-
readonly baseManifestHash: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
326
|
-
readonly baseReleaseId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">>;
|
|
327
|
-
readonly baseResultCount: Schema.Finite;
|
|
328
|
-
readonly baseResultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
329
|
-
readonly deleteHeads: Schema.Finite;
|
|
330
|
-
readonly itemCount: Schema.Finite;
|
|
331
|
-
readonly itemsDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
332
322
|
readonly manifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
333
|
-
readonly projectionCount: Schema.Finite;
|
|
334
|
-
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
335
323
|
readonly releaseId: Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">;
|
|
336
|
-
readonly rendererManifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
337
324
|
readonly resultCount: Schema.Finite;
|
|
338
325
|
readonly resultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
339
|
-
readonly rollbackCount: Schema.Finite;
|
|
340
|
-
readonly rollbackDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
341
|
-
readonly routeCount: Schema.Finite;
|
|
342
|
-
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
343
326
|
readonly snapshots: Schema.Struct<{
|
|
344
327
|
readonly program: Schema.Struct<{
|
|
345
328
|
readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
@@ -363,6 +346,21 @@ export declare const ReleaseVerificationCompleteSchema: Schema.Struct<{
|
|
|
363
346
|
readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
364
347
|
}>;
|
|
365
348
|
}>;
|
|
349
|
+
readonly baseActiveAppLocales: Schema.NullOr<Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>>;
|
|
350
|
+
readonly baseManifestHash: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
351
|
+
readonly baseReleaseId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">>;
|
|
352
|
+
readonly baseResultCount: Schema.Finite;
|
|
353
|
+
readonly baseResultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
354
|
+
readonly deleteHeads: Schema.Finite;
|
|
355
|
+
readonly itemCount: Schema.Finite;
|
|
356
|
+
readonly itemsDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
357
|
+
readonly projectionCount: Schema.Finite;
|
|
358
|
+
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
359
|
+
readonly rendererManifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
360
|
+
readonly rollbackCount: Schema.Finite;
|
|
361
|
+
readonly rollbackDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
362
|
+
readonly routeCount: Schema.Finite;
|
|
363
|
+
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
366
364
|
readonly stagedArtifacts: Schema.Finite;
|
|
367
365
|
readonly stagedRoutes: Schema.Finite;
|
|
368
366
|
readonly stagedSnapshotRows: Schema.Finite;
|
|
@@ -378,25 +376,10 @@ export declare const ReleaseVerificationStatusSchema: Schema.Union<readonly [Sch
|
|
|
378
376
|
}>, Schema.Struct<{
|
|
379
377
|
readonly evidence: Schema.Struct<{
|
|
380
378
|
readonly activeAppLocales: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
|
|
381
|
-
readonly baseActiveAppLocales: Schema.NullOr<Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>>;
|
|
382
|
-
readonly baseManifestHash: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
383
|
-
readonly baseReleaseId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">>;
|
|
384
|
-
readonly baseResultCount: Schema.Finite;
|
|
385
|
-
readonly baseResultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
386
|
-
readonly deleteHeads: Schema.Finite;
|
|
387
|
-
readonly itemCount: Schema.Finite;
|
|
388
|
-
readonly itemsDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
389
379
|
readonly manifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
390
|
-
readonly projectionCount: Schema.Finite;
|
|
391
|
-
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
392
380
|
readonly releaseId: Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">;
|
|
393
|
-
readonly rendererManifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
394
381
|
readonly resultCount: Schema.Finite;
|
|
395
382
|
readonly resultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
396
|
-
readonly rollbackCount: Schema.Finite;
|
|
397
|
-
readonly rollbackDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
398
|
-
readonly routeCount: Schema.Finite;
|
|
399
|
-
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
400
383
|
readonly snapshots: Schema.Struct<{
|
|
401
384
|
readonly program: Schema.Struct<{
|
|
402
385
|
readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
@@ -420,6 +403,21 @@ export declare const ReleaseVerificationStatusSchema: Schema.Union<readonly [Sch
|
|
|
420
403
|
readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
421
404
|
}>;
|
|
422
405
|
}>;
|
|
406
|
+
readonly baseActiveAppLocales: Schema.NullOr<Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>>;
|
|
407
|
+
readonly baseManifestHash: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
408
|
+
readonly baseReleaseId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">>;
|
|
409
|
+
readonly baseResultCount: Schema.Finite;
|
|
410
|
+
readonly baseResultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
411
|
+
readonly deleteHeads: Schema.Finite;
|
|
412
|
+
readonly itemCount: Schema.Finite;
|
|
413
|
+
readonly itemsDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
414
|
+
readonly projectionCount: Schema.Finite;
|
|
415
|
+
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
416
|
+
readonly rendererManifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
417
|
+
readonly rollbackCount: Schema.Finite;
|
|
418
|
+
readonly rollbackDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
419
|
+
readonly routeCount: Schema.Finite;
|
|
420
|
+
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
423
421
|
readonly stagedArtifacts: Schema.Finite;
|
|
424
422
|
readonly stagedRoutes: Schema.Finite;
|
|
425
423
|
readonly stagedSnapshotRows: Schema.Finite;
|
|
@@ -430,15 +428,11 @@ export declare const ReleaseVerificationStatusSchema: Schema.Union<readonly [Sch
|
|
|
430
428
|
export type ReleaseVerificationStatus = typeof ReleaseVerificationStatusSchema.Type;
|
|
431
429
|
/** Delta evidence returned after a release is staged and activated. */
|
|
432
430
|
export declare const PublicationReceiptSchema: Schema.Struct<{
|
|
433
|
-
readonly activatedHeads: Schema.Finite;
|
|
434
431
|
readonly activeAppLocales: Schema.NonEmptyArray<Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraAppLocale">>;
|
|
435
|
-
readonly deletedHeads: Schema.Finite;
|
|
436
432
|
readonly manifestHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
437
|
-
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
438
433
|
readonly releaseId: Schema.brand<Schema.String, "@NakafaAI/AksaraReleaseId">;
|
|
439
434
|
readonly resultCount: Schema.Finite;
|
|
440
435
|
readonly resultDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
441
|
-
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
442
436
|
readonly snapshots: Schema.Struct<{
|
|
443
437
|
readonly program: Schema.Struct<{
|
|
444
438
|
readonly baseSnapshotId: Schema.NullOr<Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">>;
|
|
@@ -462,6 +456,10 @@ export declare const PublicationReceiptSchema: Schema.Struct<{
|
|
|
462
456
|
readonly rowDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
463
457
|
}>;
|
|
464
458
|
}>;
|
|
459
|
+
readonly activatedHeads: Schema.Finite;
|
|
460
|
+
readonly deletedHeads: Schema.Finite;
|
|
461
|
+
readonly projectionDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
462
|
+
readonly routeDigest: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
465
463
|
readonly stagedArtifacts: Schema.Finite;
|
|
466
464
|
readonly stagedItems: Schema.Finite;
|
|
467
465
|
readonly stagedProjections: Schema.Finite;
|
package/dist/release/spec.js
CHANGED
|
@@ -3,6 +3,8 @@ import { ContentFamilySchema } from "#contracts/content";
|
|
|
3
3
|
import { ContentDeliveryClassSchema } from "#contracts/delivery";
|
|
4
4
|
import { ContentKeySchema, CorpusSourcePathSchema, Ed25519SignatureSchema, ReleaseIdSchema, Sha256HashSchema, SigningKeyIdSchema, } from "#contracts/ids";
|
|
5
5
|
import { ActiveAppLocaleListSchema, ArtifactLocaleSchema, } from "#contracts/locale";
|
|
6
|
+
import { ReleaseCountSchema } from "#contracts/release/count";
|
|
7
|
+
import { ActiveCatalogIdentitySchema } from "#contracts/release/identity";
|
|
6
8
|
import { ReleaseOriginSchema, RollbackReleaseOriginSchema, } from "#contracts/release/origin";
|
|
7
9
|
import { EMPTY_RESULT_CATALOG_DIGEST } from "#contracts/release/result/spec";
|
|
8
10
|
import { PublicationScopeSchema } from "#contracts/release/snapshot/scope";
|
|
@@ -10,8 +12,6 @@ import { ContentSnapshotSetSchema, hasEmptySnapshotBases, hasGitSnapshotModes, h
|
|
|
10
12
|
import { RendererDomainSchema } from "#contracts/renderer/domain";
|
|
11
13
|
/** Semantic wire identity of the current localized content release. */
|
|
12
14
|
export const CONTENT_RELEASE_FORMAT = "localized-content-release";
|
|
13
|
-
/** Nonnegative release inventory count authenticated by one manifest. */
|
|
14
|
-
export const ReleaseCountSchema = Schema.Finite.pipe(Schema.check(Schema.isInt()), Schema.check(Schema.isGreaterThanOrEqualTo(0)));
|
|
15
15
|
/** Stable inventory and provenance fields owned by the current release. */
|
|
16
16
|
const ContentReleaseManifestFields = {
|
|
17
17
|
baseActiveAppLocales: Schema.NullOr(ActiveAppLocaleListSchema),
|
|
@@ -133,7 +133,7 @@ function hasCoherentVerificationCounts(input) {
|
|
|
133
133
|
}
|
|
134
134
|
/** Pre-activation evidence proving the fully staged release is coherent. */
|
|
135
135
|
export const ReleaseVerificationEvidenceSchema = Schema.Struct({
|
|
136
|
-
|
|
136
|
+
...ActiveCatalogIdentitySchema.fields,
|
|
137
137
|
baseActiveAppLocales: Schema.NullOr(ActiveAppLocaleListSchema),
|
|
138
138
|
baseManifestHash: Schema.NullOr(Sha256HashSchema),
|
|
139
139
|
baseReleaseId: Schema.NullOr(ReleaseIdSchema),
|
|
@@ -142,18 +142,13 @@ export const ReleaseVerificationEvidenceSchema = Schema.Struct({
|
|
|
142
142
|
deleteHeads: ReleaseCountSchema,
|
|
143
143
|
itemCount: ReleaseCountSchema,
|
|
144
144
|
itemsDigest: Sha256HashSchema,
|
|
145
|
-
manifestHash: Sha256HashSchema,
|
|
146
145
|
projectionCount: ReleaseCountSchema,
|
|
147
146
|
projectionDigest: Sha256HashSchema,
|
|
148
|
-
releaseId: ReleaseIdSchema,
|
|
149
147
|
rendererManifestHash: Sha256HashSchema,
|
|
150
|
-
resultCount: ReleaseCountSchema,
|
|
151
|
-
resultDigest: Sha256HashSchema,
|
|
152
148
|
rollbackCount: ReleaseCountSchema,
|
|
153
149
|
rollbackDigest: Sha256HashSchema,
|
|
154
150
|
routeCount: ReleaseCountSchema,
|
|
155
151
|
routeDigest: Sha256HashSchema,
|
|
156
|
-
snapshots: ContentSnapshotSetSchema,
|
|
157
152
|
stagedArtifacts: ReleaseCountSchema,
|
|
158
153
|
stagedRoutes: ReleaseCountSchema,
|
|
159
154
|
stagedSnapshotRows: ReleaseCountSchema,
|
|
@@ -179,16 +174,11 @@ export const ReleaseVerificationStatusSchema = Schema.Union([
|
|
|
179
174
|
]);
|
|
180
175
|
/** Delta evidence returned after a release is staged and activated. */
|
|
181
176
|
export const PublicationReceiptSchema = Schema.Struct({
|
|
177
|
+
...ActiveCatalogIdentitySchema.fields,
|
|
182
178
|
activatedHeads: ReleaseCountSchema,
|
|
183
|
-
activeAppLocales: ActiveAppLocaleListSchema,
|
|
184
179
|
deletedHeads: ReleaseCountSchema,
|
|
185
|
-
manifestHash: Sha256HashSchema,
|
|
186
180
|
projectionDigest: Sha256HashSchema,
|
|
187
|
-
releaseId: ReleaseIdSchema,
|
|
188
|
-
resultCount: ReleaseCountSchema,
|
|
189
|
-
resultDigest: Sha256HashSchema,
|
|
190
181
|
routeDigest: Sha256HashSchema,
|
|
191
|
-
snapshots: ContentSnapshotSetSchema,
|
|
192
182
|
stagedArtifacts: ReleaseCountSchema,
|
|
193
183
|
stagedItems: ReleaseCountSchema,
|
|
194
184
|
stagedProjections: ReleaseCountSchema,
|
package/dist/release/verify.js
CHANGED
|
@@ -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", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Array as Arr, Effect, HashSet, Option, Order, Schema } from "effect";
|
|
2
|
+
import { Sha256MismatchFields } from "#contracts/errors";
|
|
2
3
|
import { Sha256HashSchema } from "#contracts/ids";
|
|
3
4
|
import { RendererComponentsSchema, } from "#contracts/renderer/component";
|
|
4
5
|
import { RENDERER_DOMAINS, RendererDomainSchema, } from "#contracts/renderer/domain";
|
|
@@ -65,10 +66,7 @@ export const selectRendererDomainCapability = Effect.fn("AksaraContracts.selectR
|
|
|
65
66
|
export class RendererManifestHashComputeError extends Schema.TaggedError()("RendererManifestHashComputeError", { cause: Schema.Unknown }) {
|
|
66
67
|
}
|
|
67
68
|
/** The renderer envelope hash does not authenticate its canonical tuple. */
|
|
68
|
-
export class RendererManifestHashMismatchError extends Schema.TaggedError()("RendererManifestHashMismatchError", {
|
|
69
|
-
actualHash: Sha256HashSchema,
|
|
70
|
-
expectedHash: Sha256HashSchema,
|
|
71
|
-
}) {
|
|
69
|
+
export class RendererManifestHashMismatchError extends Schema.TaggedError()("RendererManifestHashMismatchError", { ...Sha256MismatchFields }) {
|
|
72
70
|
}
|
|
73
71
|
/** Serializes the exact domain-scoped renderer tuple covered by SHA-256. */
|
|
74
72
|
export function canonicalizeRendererManifestContract(input) {
|
package/dist/runtime/spec.d.ts
CHANGED
|
@@ -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
|
} | {
|