@nakafa/aksara-contracts 0.39.0 → 0.40.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.
- package/README.md +6 -5
- package/dist/adoption/protected.d.ts +125 -0
- package/dist/adoption/protected.js +70 -0
- package/dist/adoption/public.d.ts +619 -0
- package/dist/adoption/public.js +121 -0
- package/dist/adoption/runtime.d.ts +1297 -0
- package/dist/adoption/runtime.js +40 -0
- package/dist/adoption/schema.d.ts +3794 -0
- package/dist/adoption/schema.js +125 -0
- package/dist/adoption/transport.d.ts +23257 -0
- package/dist/adoption/transport.js +74 -0
- package/dist/adoption/verify.d.ts +457 -0
- package/dist/adoption/verify.js +167 -0
- package/dist/artifact/integrity.d.ts +1 -4
- package/dist/artifact/limits.d.ts +1 -4
- package/dist/artifact/source.d.ts +1 -4
- package/dist/artifact/spec.d.ts +5 -45
- package/dist/artifact/spec.js +2 -20
- package/dist/artifact/verify.d.ts +2 -5
- package/dist/artifact/verify.js +0 -1
- package/dist/content.d.ts +8 -48
- package/dist/content.js +4 -9
- package/dist/preview/artifact.d.ts +1 -1
- package/dist/preview/artifact.js +1 -1
- package/dist/preview/auth.d.ts +3 -20
- package/dist/projection/digest.d.ts +35 -35
- package/dist/projection/verify.d.ts +87 -87
- package/dist/quran/snapshot/row/hash.d.ts +50 -50
- package/dist/release/current/evidence.d.ts +9 -63
- package/dist/release/current/state.d.ts +15 -105
- package/dist/release/hash.d.ts +0 -1
- package/dist/release/lifecycle.d.ts +6 -42
- package/dist/release/lifecycle.js +1 -3
- package/dist/release/result/digest.d.ts +4 -4
- package/dist/release/rollback/spec.d.ts +6 -24
- package/dist/release/signing.js +0 -1
- package/dist/release/snapshot/verify.d.ts +21 -21
- package/dist/release/spec.d.ts +0 -6
- package/dist/release/spec.js +0 -3
- package/dist/release/verify.d.ts +1 -2
- package/dist/renderer/compatibility.d.ts +10 -46
- package/dist/renderer/compatibility.js +20 -45
- package/dist/renderer/component.d.ts +7 -97
- package/dist/renderer/component.js +15 -93
- package/dist/renderer/contract.d.ts +14 -86
- package/dist/renderer/contract.js +16 -54
- package/dist/renderer/manifest.d.ts +10 -72
- package/dist/renderer/manifest.js +40 -41
- package/dist/runtime/protected/spec.d.ts +13 -76
- package/dist/runtime/protected/verify.d.ts +5 -25
- package/dist/runtime/protected/verify.js +2 -4
- package/dist/runtime/spec.d.ts +12 -75
- package/dist/runtime/verify.d.ts +64 -106
- package/dist/runtime/verify.js +2 -4
- package/dist/transport/batch.d.ts +2 -8
- package/dist/transport/group.d.ts +3 -12
- package/dist/transport/request.d.ts +116 -256
- package/dist/transport/response.d.ts +187 -467
- package/dist/tryout/catalog-hash.d.ts +18 -18
- package/dist/tryout/runtime/verify.d.ts +1 -1
- package/package.json +28 -1
- package/dist/renderer/selection.d.ts +0 -39
- package/dist/renderer/selection.js +0 -87
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { verifySignedContentArtifactIntegrity as verifyRetainedArtifact } from "@nakafa/aksara-retained/artifact/integrity";
|
|
2
|
+
import { verifySignedContentRelease as verifyRetainedRelease } from "@nakafa/aksara-retained/release/verify";
|
|
3
|
+
import { validateRendererManifestHash as validateRetainedRenderer } from "@nakafa/aksara-retained/renderer/manifest";
|
|
4
|
+
import { ContentVerificationKeyResolver as RetainedKeyResolver } from "@nakafa/aksara-retained/signature/spec";
|
|
5
|
+
import { verifySignedTryoutRuntimeBundle as verifyRetainedRuntime } from "@nakafa/aksara-retained/tryout/runtime/verify";
|
|
6
|
+
import { Effect, Schema } from "effect";
|
|
7
|
+
import { ContentReleaseBundleSchema, RendererManifestEnvelopeSchema, RetainedRendererComponentUnsupportedError, RollbackContentReleaseBundleSchema, SignedContentArtifactSchema, SignedContentReleaseSchema, } from "#contracts/adoption/schema";
|
|
8
|
+
import { verifySignedContentArtifactIntegrity as verifyCurrentArtifact } from "#contracts/artifact/integrity";
|
|
9
|
+
import { ArtifactCompiledByteLengthMismatchError as CurrentArtifactCompiledByteLengthMismatchError, ArtifactHashComputationError as CurrentArtifactHashComputationError, ArtifactHashMismatchError as CurrentArtifactHashMismatchError, ArtifactPayloadFieldByteLimitError as CurrentArtifactPayloadFieldByteLimitError, ArtifactRendererComponentMissingError as CurrentArtifactRendererComponentMissingError, ArtifactRendererDomainUnpublishedError as CurrentArtifactRendererDomainUnpublishedError, ArtifactSourceHashComputationError as CurrentArtifactSourceHashComputationError, ArtifactSourceHashMismatchError as CurrentArtifactSourceHashMismatchError, ArtifactVerificationByteLimitError as CurrentArtifactVerificationByteLimitError, ArtifactVerificationDecodeError as CurrentArtifactVerificationDecodeError, } from "#contracts/artifact/spec";
|
|
10
|
+
import { SignedContentArtifactSchema as CurrentArtifactSchema } from "#contracts/content";
|
|
11
|
+
import { decodeContract } from "#contracts/decode";
|
|
12
|
+
import { ContractDecodeError } from "#contracts/errors";
|
|
13
|
+
import { ReleaseHashComputationError } from "#contracts/release/hash";
|
|
14
|
+
import { ReleaseBundleVerificationDecodeError as CurrentReleaseBundleVerificationDecodeError, ReleaseManifestHashMismatchError as CurrentReleaseManifestHashMismatchError, ReleaseVerificationDecodeError as CurrentReleaseVerificationDecodeError, verifySignedContentRelease as verifyCurrentSignedContentRelease, } from "#contracts/release/verify";
|
|
15
|
+
import { RendererManifestHashComputeError as CurrentRendererManifestHashComputeError, RendererManifestHashMismatchError as CurrentRendererManifestHashMismatchError, } from "#contracts/renderer/contract";
|
|
16
|
+
import { validateRendererManifestHash as validateCurrentRenderer } from "#contracts/renderer/manifest";
|
|
17
|
+
import { ContentVerificationKeyResolver as CurrentContentVerificationKeyResolver, PublicKeyParseError as CurrentPublicKeyParseError, PublicKeyTypeError as CurrentPublicKeyTypeError, SignatureCheckError as CurrentSignatureCheckError, SignatureInvalidError as CurrentSignatureInvalidError, SigningKeyNotFoundError as CurrentSigningKeyNotFoundError, SigningKeyResolutionError as CurrentSigningKeyResolutionError, } from "#contracts/signature/spec";
|
|
18
|
+
import { TryoutRuntimeBundleHashComputationError } from "#contracts/tryout/runtime/hash";
|
|
19
|
+
import { TryoutRuntimeBundleHashMismatchError as CurrentTryoutRuntimeBundleHashMismatchError, TryoutRuntimeBundleRendererMismatchError as CurrentTryoutRuntimeBundleRendererMismatchError, TryoutRuntimeBundleSnapshotMismatchError as CurrentTryoutRuntimeBundleSnapshotMismatchError, TryoutRuntimeBundleVerificationDecodeError as CurrentTryoutRuntimeBundleVerificationDecodeError, verifySignedTryoutRuntimeBundle as verifyCurrentSignedTryoutRuntimeBundle, } from "#contracts/tryout/runtime/verify";
|
|
20
|
+
const RetainedFailureSchema = Schema.Union([
|
|
21
|
+
CurrentArtifactHashComputationError,
|
|
22
|
+
CurrentArtifactHashMismatchError,
|
|
23
|
+
CurrentArtifactVerificationDecodeError,
|
|
24
|
+
CurrentArtifactVerificationByteLimitError,
|
|
25
|
+
CurrentArtifactCompiledByteLengthMismatchError,
|
|
26
|
+
CurrentArtifactPayloadFieldByteLimitError,
|
|
27
|
+
CurrentArtifactSourceHashComputationError,
|
|
28
|
+
CurrentArtifactSourceHashMismatchError,
|
|
29
|
+
CurrentSigningKeyNotFoundError,
|
|
30
|
+
CurrentSigningKeyResolutionError,
|
|
31
|
+
CurrentPublicKeyParseError,
|
|
32
|
+
CurrentPublicKeyTypeError,
|
|
33
|
+
CurrentSignatureCheckError,
|
|
34
|
+
CurrentSignatureInvalidError,
|
|
35
|
+
CurrentReleaseVerificationDecodeError,
|
|
36
|
+
CurrentReleaseManifestHashMismatchError,
|
|
37
|
+
CurrentRendererManifestHashComputeError,
|
|
38
|
+
CurrentRendererManifestHashMismatchError,
|
|
39
|
+
CurrentTryoutRuntimeBundleVerificationDecodeError,
|
|
40
|
+
CurrentTryoutRuntimeBundleHashMismatchError,
|
|
41
|
+
CurrentTryoutRuntimeBundleSnapshotMismatchError,
|
|
42
|
+
CurrentTryoutRuntimeBundleRendererMismatchError,
|
|
43
|
+
ContractDecodeError,
|
|
44
|
+
ReleaseHashComputationError,
|
|
45
|
+
TryoutRuntimeBundleHashComputationError,
|
|
46
|
+
]);
|
|
47
|
+
/** Reconstitutes current tagged errors at the temporary published-package seam. */
|
|
48
|
+
const failRetained = Effect.fn("AksaraContracts.adoption.failRetained")((error) => Schema.decodeUnknownEffect(RetainedFailureSchema)(error).pipe(Effect.orDie, Effect.flatMap(Effect.fail)));
|
|
49
|
+
/** Authenticates original bytes before inspecting any execution capability. */
|
|
50
|
+
export const verifySignedContentArtifactIntegrity = Effect.fn("AksaraContracts.adoption.verifyArtifactIntegrity")(function* (input) {
|
|
51
|
+
const artifact = yield* Schema.decodeUnknownEffect(SignedContentArtifactSchema)(input, { onExcessProperty: "error" }).pipe(Effect.mapError(() => new CurrentArtifactVerificationDecodeError({
|
|
52
|
+
message: "Artifact verification input does not satisfy its exact wire contract.",
|
|
53
|
+
})));
|
|
54
|
+
if (Schema.is(CurrentArtifactSchema)(artifact)) {
|
|
55
|
+
return yield* verifyCurrentArtifact(artifact);
|
|
56
|
+
}
|
|
57
|
+
const resolver = yield* CurrentContentVerificationKeyResolver;
|
|
58
|
+
return yield* verifyRetainedArtifact(artifact).pipe(Effect.provideService(RetainedKeyResolver, resolver), Effect.catch(failRetained));
|
|
59
|
+
});
|
|
60
|
+
/** Selects unsigned execution names only after the caller authenticates bytes. */
|
|
61
|
+
export const selectVerifiedArtifactRenderer = Effect.fn("AksaraContracts.adoption.selectVerifiedArtifactRenderer")(function* (artifact) {
|
|
62
|
+
if (Schema.is(CurrentArtifactSchema)(artifact)) {
|
|
63
|
+
return artifact.payload;
|
|
64
|
+
}
|
|
65
|
+
for (const component of artifact.payload.requiredComponents) {
|
|
66
|
+
if (component.version !== 1) {
|
|
67
|
+
return yield* new RetainedRendererComponentUnsupportedError({
|
|
68
|
+
componentName: component.name,
|
|
69
|
+
contentKey: artifact.payload.contentKey,
|
|
70
|
+
version: component.version,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
contentKey: artifact.payload.contentKey,
|
|
76
|
+
rendererDomain: artifact.payload.rendererDomain,
|
|
77
|
+
requiredComponents: artifact.payload.requiredComponents.map(({ name }) => name),
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
/** Verifies each renderer with its exact published canonicalizer. */
|
|
81
|
+
export const validateRendererManifestHash = Effect.fn("AksaraContracts.adoption.validateRenderer")(function* (input) {
|
|
82
|
+
const renderer = yield* decodeContract(RendererManifestEnvelopeSchema, "RendererManifestEnvelope", input);
|
|
83
|
+
if (renderer.format === "nakafa-mdx-renderer") {
|
|
84
|
+
return yield* validateCurrentRenderer(renderer);
|
|
85
|
+
}
|
|
86
|
+
return yield* validateRetainedRenderer(renderer).pipe(Effect.catch(failRetained));
|
|
87
|
+
});
|
|
88
|
+
/** Verifies an independently signed artifact against an authenticated renderer. */
|
|
89
|
+
export const verifySignedContentArtifact = Effect.fn("AksaraContracts.adoption.verifyArtifact")(function* (input) {
|
|
90
|
+
const request = yield* Schema.decodeUnknownEffect(Schema.Struct({
|
|
91
|
+
artifact: SignedContentArtifactSchema,
|
|
92
|
+
rendererManifest: RendererManifestEnvelopeSchema,
|
|
93
|
+
}))(input, { onExcessProperty: "error" }).pipe(Effect.mapError(() => new CurrentArtifactVerificationDecodeError({
|
|
94
|
+
message: "Artifact verification input does not satisfy its exact wire contract.",
|
|
95
|
+
})));
|
|
96
|
+
const artifact = yield* verifySignedContentArtifactIntegrity(request.artifact);
|
|
97
|
+
const selection = yield* selectVerifiedArtifactRenderer(artifact);
|
|
98
|
+
const renderer = yield* validateRendererManifestHash(request.rendererManifest);
|
|
99
|
+
if (!renderer.publishedDomains.includes(selection.rendererDomain)) {
|
|
100
|
+
return yield* new CurrentArtifactRendererDomainUnpublishedError({
|
|
101
|
+
contentKey: selection.contentKey,
|
|
102
|
+
rendererDomain: selection.rendererDomain,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
const available = renderer.format === "nakafa-mdx-renderer"
|
|
106
|
+
? [
|
|
107
|
+
...renderer.base,
|
|
108
|
+
...renderer.domains
|
|
109
|
+
.filter(({ name }) => name === selection.rendererDomain)
|
|
110
|
+
.flatMap(({ components }) => components),
|
|
111
|
+
]
|
|
112
|
+
: [
|
|
113
|
+
...renderer.base.supportedComponents,
|
|
114
|
+
...renderer.domains
|
|
115
|
+
.filter(({ name }) => name === selection.rendererDomain)
|
|
116
|
+
.flatMap(({ supportedComponents }) => supportedComponents),
|
|
117
|
+
]
|
|
118
|
+
.filter(({ version }) => version === 1)
|
|
119
|
+
.map(({ name }) => name);
|
|
120
|
+
for (const name of selection.requiredComponents) {
|
|
121
|
+
if (!available.includes(name)) {
|
|
122
|
+
return yield* new CurrentArtifactRendererComponentMissingError({
|
|
123
|
+
componentName: name,
|
|
124
|
+
contentKey: selection.contentKey,
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return artifact;
|
|
129
|
+
});
|
|
130
|
+
/** Authenticates old and current release envelopes without rewriting manifests. */
|
|
131
|
+
export const verifySignedContentRelease = Effect.fn("AksaraContracts.adoption.verifyRelease")(function* (input) {
|
|
132
|
+
const release = yield* Schema.decodeUnknownEffect(SignedContentReleaseSchema)(input, { onExcessProperty: "error" }).pipe(Effect.mapError(() => new CurrentReleaseVerificationDecodeError({
|
|
133
|
+
message: "Release verification input does not satisfy its exact wire contract.",
|
|
134
|
+
})));
|
|
135
|
+
if (!("rendererContractVersion" in release.manifest)) {
|
|
136
|
+
return yield* verifyCurrentSignedContentRelease(release);
|
|
137
|
+
}
|
|
138
|
+
const resolver = yield* CurrentContentVerificationKeyResolver;
|
|
139
|
+
return yield* verifyRetainedRelease(release).pipe(Effect.provideService(RetainedKeyResolver, resolver), Effect.catch(failRetained));
|
|
140
|
+
});
|
|
141
|
+
/** Authenticates release and renderer independently, retaining exact hash binding. */
|
|
142
|
+
export const verifyContentReleaseBundle = Effect.fn("AksaraContracts.adoption.verifyBundle")(function* (input) {
|
|
143
|
+
const bundle = yield* Schema.decodeUnknownEffect(ContentReleaseBundleSchema)(input, { onExcessProperty: "error" }).pipe(Effect.mapError(() => new CurrentReleaseBundleVerificationDecodeError({
|
|
144
|
+
message: "Release bundle verification input does not satisfy its exact wire contract.",
|
|
145
|
+
})));
|
|
146
|
+
yield* verifySignedContentRelease(bundle.release);
|
|
147
|
+
yield* validateRendererManifestHash(bundle.rendererManifest);
|
|
148
|
+
return bundle;
|
|
149
|
+
});
|
|
150
|
+
/** Authenticates a renderer-bound inverse from either encoding before recovery. */
|
|
151
|
+
export const verifyRollbackContentReleaseBundle = Effect.fn("AksaraContracts.adoption.verifyRollbackBundle")(function* (input) {
|
|
152
|
+
const bundle = yield* Schema.decodeUnknownEffect(RollbackContentReleaseBundleSchema)(input, { onExcessProperty: "error" }).pipe(Effect.mapError(() => new CurrentReleaseBundleVerificationDecodeError({
|
|
153
|
+
message: "Release bundle verification input does not satisfy its exact wire contract.",
|
|
154
|
+
})));
|
|
155
|
+
yield* verifySignedContentRelease(bundle.release);
|
|
156
|
+
yield* validateRendererManifestHash(bundle.rendererManifest);
|
|
157
|
+
return bundle;
|
|
158
|
+
});
|
|
159
|
+
/** Keeps permanent runtime bundles bound to their exact frozen renderer hash. */
|
|
160
|
+
export const verifySignedTryoutRuntimeBundle = Effect.fn("AksaraContracts.adoption.verifyRuntimeBundle")(function* (input) {
|
|
161
|
+
const renderer = yield* validateRendererManifestHash(input.rendererManifest);
|
|
162
|
+
if (renderer.format === "nakafa-mdx-renderer") {
|
|
163
|
+
return yield* verifyCurrentSignedTryoutRuntimeBundle(input);
|
|
164
|
+
}
|
|
165
|
+
const resolver = yield* CurrentContentVerificationKeyResolver;
|
|
166
|
+
return yield* verifyRetainedRuntime(input).pipe(Effect.provideService(RetainedKeyResolver, resolver), Effect.catch(failRetained));
|
|
167
|
+
});
|
|
@@ -19,10 +19,7 @@ export declare const verifySignedContentArtifactIntegrity: (input: unknown) => E
|
|
|
19
19
|
readonly plainText: string;
|
|
20
20
|
readonly rawMdx: string;
|
|
21
21
|
readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
|
|
22
|
-
readonly requiredComponents: readonly
|
|
23
|
-
readonly name: string;
|
|
24
|
-
readonly version: number;
|
|
25
|
-
}[];
|
|
22
|
+
readonly requiredComponents: readonly string[];
|
|
26
23
|
readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
27
24
|
};
|
|
28
25
|
readonly signature: string & import("effect/Brand").Brand<"@NakafaAI/AksaraEd25519Signature">;
|
|
@@ -16,10 +16,7 @@ export declare const validateArtifactByteIntegrity: (artifact: {
|
|
|
16
16
|
readonly plainText: string;
|
|
17
17
|
readonly rawMdx: string;
|
|
18
18
|
readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
|
|
19
|
-
readonly requiredComponents: readonly
|
|
20
|
-
readonly name: string;
|
|
21
|
-
readonly version: number;
|
|
22
|
-
}[];
|
|
19
|
+
readonly requiredComponents: readonly string[];
|
|
23
20
|
readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
24
21
|
};
|
|
25
22
|
readonly signature: string & import("effect/Brand").Brand<"@NakafaAI/AksaraEd25519Signature">;
|
|
@@ -13,9 +13,6 @@ export declare const verifyCompiledContentSourceHash: (payload: {
|
|
|
13
13
|
readonly plainText: string;
|
|
14
14
|
readonly rawMdx: string;
|
|
15
15
|
readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
|
|
16
|
-
readonly requiredComponents: readonly
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly version: number;
|
|
19
|
-
}[];
|
|
16
|
+
readonly requiredComponents: readonly string[];
|
|
20
17
|
readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
21
18
|
}) => Effect.Effect<void, ArtifactSourceHashComputationError | ArtifactSourceHashMismatchError, never>;
|
package/dist/artifact/spec.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
/**
|
|
3
|
-
* Complete server-only input needed to authenticate one compiled artifact.
|
|
4
|
-
* `rendererContractVersion` comes from the active release because payloads do
|
|
5
|
-
* not duplicate that release-scoped value.
|
|
6
|
-
*/
|
|
2
|
+
/** Complete input needed to authenticate an artifact against its renderer. */
|
|
7
3
|
export declare const ArtifactVerificationRequestSchema: Schema.Struct<{
|
|
8
4
|
readonly artifact: Schema.Struct<{
|
|
9
5
|
readonly artifactHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
@@ -20,41 +16,20 @@ export declare const ArtifactVerificationRequestSchema: Schema.Struct<{
|
|
|
20
16
|
readonly plainText: Schema.String;
|
|
21
17
|
readonly rawMdx: Schema.String;
|
|
22
18
|
readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
23
|
-
readonly requiredComponents: Schema.$Array<Schema.
|
|
24
|
-
readonly name: Schema.String;
|
|
25
|
-
readonly version: Schema.Finite;
|
|
26
|
-
}>>;
|
|
19
|
+
readonly requiredComponents: Schema.$Array<Schema.String>;
|
|
27
20
|
readonly sourceHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
28
21
|
}>;
|
|
29
22
|
readonly signature: Schema.brand<Schema.String, "@NakafaAI/AksaraEd25519Signature">;
|
|
30
23
|
}>;
|
|
31
|
-
readonly rendererContractVersion: Schema.String;
|
|
32
24
|
readonly rendererManifest: Schema.Struct<{
|
|
33
|
-
readonly base: Schema.
|
|
34
|
-
authoringComponents: Schema.$Array<Schema.Struct<{
|
|
35
|
-
readonly name: Schema.String;
|
|
36
|
-
readonly version: Schema.Finite;
|
|
37
|
-
}>>;
|
|
38
|
-
supportedComponents: Schema.$Array<Schema.Struct<{
|
|
39
|
-
readonly name: Schema.String;
|
|
40
|
-
readonly version: Schema.Finite;
|
|
41
|
-
}>>;
|
|
42
|
-
}>;
|
|
25
|
+
readonly base: Schema.$Array<Schema.String>;
|
|
43
26
|
readonly domains: Schema.$Array<Schema.Struct<{
|
|
44
|
-
readonly
|
|
45
|
-
readonly name: Schema.String;
|
|
46
|
-
readonly version: Schema.Finite;
|
|
47
|
-
}>>;
|
|
27
|
+
readonly components: Schema.$Array<Schema.String>;
|
|
48
28
|
readonly name: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
49
|
-
readonly supportedComponents: Schema.$Array<Schema.Struct<{
|
|
50
|
-
readonly name: Schema.String;
|
|
51
|
-
readonly version: Schema.Finite;
|
|
52
|
-
}>>;
|
|
53
29
|
}>>;
|
|
54
|
-
readonly format: Schema.Literal<"nakafa-mdx-renderer
|
|
30
|
+
readonly format: Schema.Literal<"nakafa-mdx-renderer">;
|
|
55
31
|
readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
56
32
|
readonly publishedDomains: Schema.$Array<Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>>;
|
|
57
|
-
readonly rendererContractVersion: Schema.Literal<"1.0.0">;
|
|
58
33
|
}>;
|
|
59
34
|
}>;
|
|
60
35
|
export type ArtifactVerificationRequest = typeof ArtifactVerificationRequestSchema.Type;
|
|
@@ -116,13 +91,6 @@ declare const ArtifactSourceHashMismatchError_base: Schema.Class<ArtifactSourceH
|
|
|
116
91
|
/** The authenticated source hash does not identify the complete raw MDX. */
|
|
117
92
|
export declare class ArtifactSourceHashMismatchError extends ArtifactSourceHashMismatchError_base {
|
|
118
93
|
}
|
|
119
|
-
declare const RendererContractVersionMismatchError_base: Schema.Class<RendererContractVersionMismatchError, Schema.TaggedStruct<"RendererContractVersionMismatchError", {
|
|
120
|
-
readonly actualVersion: Schema.String;
|
|
121
|
-
readonly expectedVersion: Schema.String;
|
|
122
|
-
}>, import("effect/Cause").YieldableError>;
|
|
123
|
-
/** The runtime and hash-validated renderer envelope disagree globally. */
|
|
124
|
-
export declare class RendererContractVersionMismatchError extends RendererContractVersionMismatchError_base {
|
|
125
|
-
}
|
|
126
94
|
declare const ArtifactRendererComponentMissingError_base: Schema.Class<ArtifactRendererComponentMissingError, Schema.TaggedStruct<"ArtifactRendererComponentMissingError", {
|
|
127
95
|
readonly componentName: Schema.String;
|
|
128
96
|
readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
|
|
@@ -130,14 +98,6 @@ declare const ArtifactRendererComponentMissingError_base: Schema.Class<ArtifactR
|
|
|
130
98
|
/** A custom component required by the artifact is absent from the renderer. */
|
|
131
99
|
export declare class ArtifactRendererComponentMissingError extends ArtifactRendererComponentMissingError_base {
|
|
132
100
|
}
|
|
133
|
-
declare const ArtifactRendererVersionUnsupportedError_base: Schema.Class<ArtifactRendererVersionUnsupportedError, Schema.TaggedStruct<"ArtifactRendererVersionUnsupportedError", {
|
|
134
|
-
readonly componentName: Schema.String;
|
|
135
|
-
readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
|
|
136
|
-
readonly requiredVersion: Schema.Finite;
|
|
137
|
-
}>, import("effect/Cause").YieldableError>;
|
|
138
|
-
/** The renderer does not implement the exact required component version. */
|
|
139
|
-
export declare class ArtifactRendererVersionUnsupportedError extends ArtifactRendererVersionUnsupportedError_base {
|
|
140
|
-
}
|
|
141
101
|
declare const ArtifactRendererDomainUnpublishedError_base: Schema.Class<ArtifactRendererDomainUnpublishedError, Schema.TaggedStruct<"ArtifactRendererDomainUnpublishedError", {
|
|
142
102
|
readonly contentKey: Schema.brand<Schema.String, "@NakafaAI/AksaraContentKey">;
|
|
143
103
|
readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
package/dist/artifact/spec.js
CHANGED
|
@@ -2,16 +2,11 @@ import { Schema } from "effect";
|
|
|
2
2
|
import { SignedContentArtifactSchema } from "#contracts/content";
|
|
3
3
|
import { ContentKeySchema, Sha256HashSchema } from "#contracts/ids";
|
|
4
4
|
import { RendererComponentNameSchema } from "#contracts/renderer/component";
|
|
5
|
-
import {
|
|
5
|
+
import { RendererManifestEnvelopeSchema } from "#contracts/renderer/contract";
|
|
6
6
|
import { RendererDomainSchema } from "#contracts/renderer/domain";
|
|
7
|
-
/**
|
|
8
|
-
* Complete server-only input needed to authenticate one compiled artifact.
|
|
9
|
-
* `rendererContractVersion` comes from the active release because payloads do
|
|
10
|
-
* not duplicate that release-scoped value.
|
|
11
|
-
*/
|
|
7
|
+
/** Complete input needed to authenticate an artifact against its renderer. */
|
|
12
8
|
export const ArtifactVerificationRequestSchema = Schema.Struct({
|
|
13
9
|
artifact: SignedContentArtifactSchema,
|
|
14
|
-
rendererContractVersion: RendererContractVersionSchema,
|
|
15
10
|
rendererManifest: RendererManifestEnvelopeSchema,
|
|
16
11
|
});
|
|
17
12
|
/** Unknown artifact input did not exactly satisfy the verification contract. */
|
|
@@ -65,25 +60,12 @@ export class ArtifactSourceHashMismatchError extends Schema.TaggedError()("Artif
|
|
|
65
60
|
expectedHash: Sha256HashSchema,
|
|
66
61
|
}) {
|
|
67
62
|
}
|
|
68
|
-
/** The runtime and hash-validated renderer envelope disagree globally. */
|
|
69
|
-
export class RendererContractVersionMismatchError extends Schema.TaggedError()("RendererContractVersionMismatchError", {
|
|
70
|
-
actualVersion: RendererContractVersionSchema,
|
|
71
|
-
expectedVersion: RendererContractVersionSchema,
|
|
72
|
-
}) {
|
|
73
|
-
}
|
|
74
63
|
/** A custom component required by the artifact is absent from the renderer. */
|
|
75
64
|
export class ArtifactRendererComponentMissingError extends Schema.TaggedError()("ArtifactRendererComponentMissingError", {
|
|
76
65
|
componentName: RendererComponentNameSchema,
|
|
77
66
|
contentKey: ContentKeySchema,
|
|
78
67
|
}) {
|
|
79
68
|
}
|
|
80
|
-
/** The renderer does not implement the exact required component version. */
|
|
81
|
-
export class ArtifactRendererVersionUnsupportedError extends Schema.TaggedError()("ArtifactRendererVersionUnsupportedError", {
|
|
82
|
-
componentName: RendererComponentNameSchema,
|
|
83
|
-
contentKey: ContentKeySchema,
|
|
84
|
-
requiredVersion: Schema.Finite.pipe(Schema.check(Schema.isInt()), Schema.check(Schema.isGreaterThan(0))),
|
|
85
|
-
}) {
|
|
86
|
-
}
|
|
87
69
|
/** The deployed Nakafa app cannot route this artifact's renderer domain. */
|
|
88
70
|
export class ArtifactRendererDomainUnpublishedError extends Schema.TaggedError()("ArtifactRendererDomainUnpublishedError", {
|
|
89
71
|
contentKey: ContentKeySchema,
|
|
@@ -16,11 +16,8 @@ export declare const verifySignedContentArtifact: (input: unknown) => Effect.Eff
|
|
|
16
16
|
readonly plainText: string;
|
|
17
17
|
readonly rawMdx: string;
|
|
18
18
|
readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
|
|
19
|
-
readonly requiredComponents: readonly
|
|
20
|
-
readonly name: string;
|
|
21
|
-
readonly version: number;
|
|
22
|
-
}[];
|
|
19
|
+
readonly requiredComponents: readonly string[];
|
|
23
20
|
readonly sourceHash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
24
21
|
};
|
|
25
22
|
readonly signature: string & import("effect/Brand").Brand<"@NakafaAI/AksaraEd25519Signature">;
|
|
26
|
-
}, import("#contracts/artifact/spec").ArtifactCompiledByteLengthMismatchError | import("#contracts/artifact/spec").ArtifactHashComputationError | import("#contracts/artifact/spec").ArtifactHashMismatchError | import("#contracts/artifact/spec").ArtifactPayloadFieldByteLimitError | import("#contracts/artifact/spec").ArtifactRendererComponentMissingError | import("#contracts/artifact/spec").ArtifactRendererDomainUnpublishedError | import("#contracts/artifact/spec").
|
|
23
|
+
}, import("#contracts/artifact/spec").ArtifactCompiledByteLengthMismatchError | import("#contracts/artifact/spec").ArtifactHashComputationError | import("#contracts/artifact/spec").ArtifactHashMismatchError | import("#contracts/artifact/spec").ArtifactPayloadFieldByteLimitError | import("#contracts/artifact/spec").ArtifactRendererComponentMissingError | import("#contracts/artifact/spec").ArtifactRendererDomainUnpublishedError | import("#contracts/artifact/spec").ArtifactSourceHashComputationError | import("#contracts/artifact/spec").ArtifactSourceHashMismatchError | import("#contracts/artifact/spec").ArtifactVerificationByteLimitError | ArtifactVerificationDecodeError | import("../errors.js").ContractDecodeError | import("../signature/spec.js").PublicKeyParseError | import("../signature/spec.js").PublicKeyTypeError | import("../renderer/contract.js").RendererDomainCapabilityMissingError | import("../renderer/contract.js").RendererManifestHashComputeError | import("../renderer/contract.js").RendererManifestHashMismatchError | import("../signature/spec.js").SignatureCheckError | import("../signature/spec.js").SignatureInvalidError | import("../signature/spec.js").SigningKeyNotFoundError | import("../signature/spec.js").SigningKeyResolutionError, import("../signature/spec.js").ContentVerificationKeyResolver>;
|
package/dist/artifact/verify.js
CHANGED
|
@@ -11,7 +11,6 @@ export const verifySignedContentArtifact = Effect.fn("AksaraContracts.verifySign
|
|
|
11
11
|
const artifact = yield* verifySignedContentArtifactIntegrity(request.artifact);
|
|
12
12
|
yield* verifyContentRendererCompatibility({
|
|
13
13
|
payload: artifact.payload,
|
|
14
|
-
rendererContractVersion: request.rendererContractVersion,
|
|
15
14
|
rendererManifest: request.rendererManifest,
|
|
16
15
|
});
|
|
17
16
|
return artifact;
|
package/dist/content.d.ts
CHANGED
|
@@ -44,31 +44,14 @@ export declare const CompileDocumentRequestSchema: Schema.Struct<{
|
|
|
44
44
|
readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
45
45
|
readonly sourcePath: Schema.brand<Schema.String, "@NakafaAI/AksaraCorpusSourcePath">;
|
|
46
46
|
readonly rendererManifest: Schema.Struct<{
|
|
47
|
-
readonly base: Schema.
|
|
48
|
-
authoringComponents: Schema.$Array<Schema.Struct<{
|
|
49
|
-
readonly name: Schema.String;
|
|
50
|
-
readonly version: Schema.Finite;
|
|
51
|
-
}>>;
|
|
52
|
-
supportedComponents: Schema.$Array<Schema.Struct<{
|
|
53
|
-
readonly name: Schema.String;
|
|
54
|
-
readonly version: Schema.Finite;
|
|
55
|
-
}>>;
|
|
56
|
-
}>;
|
|
47
|
+
readonly base: Schema.$Array<Schema.String>;
|
|
57
48
|
readonly domains: Schema.$Array<Schema.Struct<{
|
|
58
|
-
readonly
|
|
59
|
-
readonly name: Schema.String;
|
|
60
|
-
readonly version: Schema.Finite;
|
|
61
|
-
}>>;
|
|
49
|
+
readonly components: Schema.$Array<Schema.String>;
|
|
62
50
|
readonly name: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
63
|
-
readonly supportedComponents: Schema.$Array<Schema.Struct<{
|
|
64
|
-
readonly name: Schema.String;
|
|
65
|
-
readonly version: Schema.Finite;
|
|
66
|
-
}>>;
|
|
67
51
|
}>>;
|
|
68
|
-
readonly format: Schema.Literal<"nakafa-mdx-renderer
|
|
52
|
+
readonly format: Schema.Literal<"nakafa-mdx-renderer">;
|
|
69
53
|
readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
70
54
|
readonly publishedDomains: Schema.$Array<Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>>;
|
|
71
|
-
readonly rendererContractVersion: Schema.Literal<"1.0.0">;
|
|
72
55
|
}>;
|
|
73
56
|
}>;
|
|
74
57
|
export type CompileDocumentRequest = typeof CompileDocumentRequestSchema.Type;
|
|
@@ -85,10 +68,7 @@ export declare const CompiledContentPayloadSchema: Schema.Struct<{
|
|
|
85
68
|
readonly plainText: Schema.String;
|
|
86
69
|
readonly rawMdx: Schema.String;
|
|
87
70
|
readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
88
|
-
readonly requiredComponents: Schema.$Array<Schema.
|
|
89
|
-
readonly name: Schema.String;
|
|
90
|
-
readonly version: Schema.Finite;
|
|
91
|
-
}>>;
|
|
71
|
+
readonly requiredComponents: Schema.$Array<Schema.String>;
|
|
92
72
|
readonly sourceHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
93
73
|
}>;
|
|
94
74
|
export type CompiledContentPayload = typeof CompiledContentPayloadSchema.Type;
|
|
@@ -108,10 +88,7 @@ export declare const SignedContentArtifactSchema: Schema.Struct<{
|
|
|
108
88
|
readonly plainText: Schema.String;
|
|
109
89
|
readonly rawMdx: Schema.String;
|
|
110
90
|
readonly rendererDomain: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
111
|
-
readonly requiredComponents: Schema.$Array<Schema.
|
|
112
|
-
readonly name: Schema.String;
|
|
113
|
-
readonly version: Schema.Finite;
|
|
114
|
-
}>>;
|
|
91
|
+
readonly requiredComponents: Schema.$Array<Schema.String>;
|
|
115
92
|
readonly sourceHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
116
93
|
}>;
|
|
117
94
|
readonly signature: Schema.brand<Schema.String, "@NakafaAI/AksaraEd25519Signature">;
|
|
@@ -131,31 +108,14 @@ export declare const decodeCompileDocumentRequest: (input: unknown) => Effect.Ef
|
|
|
131
108
|
readonly rendererDomain: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
|
|
132
109
|
readonly sourcePath: string & import("effect/Brand").Brand<"@NakafaAI/AksaraCorpusSourcePath">;
|
|
133
110
|
readonly rendererManifest: {
|
|
134
|
-
readonly base:
|
|
135
|
-
readonly authoringComponents: readonly {
|
|
136
|
-
readonly name: string;
|
|
137
|
-
readonly version: number;
|
|
138
|
-
}[];
|
|
139
|
-
readonly supportedComponents: readonly {
|
|
140
|
-
readonly name: string;
|
|
141
|
-
readonly version: number;
|
|
142
|
-
}[];
|
|
143
|
-
};
|
|
111
|
+
readonly base: readonly string[];
|
|
144
112
|
readonly domains: readonly {
|
|
145
|
-
readonly
|
|
146
|
-
readonly name: string;
|
|
147
|
-
readonly version: number;
|
|
148
|
-
}[];
|
|
113
|
+
readonly components: readonly string[];
|
|
149
114
|
readonly name: "ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math";
|
|
150
|
-
readonly supportedComponents: readonly {
|
|
151
|
-
readonly name: string;
|
|
152
|
-
readonly version: number;
|
|
153
|
-
}[];
|
|
154
115
|
}[];
|
|
155
|
-
readonly format: "nakafa-mdx-renderer
|
|
116
|
+
readonly format: "nakafa-mdx-renderer";
|
|
156
117
|
readonly hash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
157
118
|
readonly publishedDomains: readonly ("ai-ds" | "biology" | "chemistry" | "mathematics" | "physics" | "politics" | "site" | "snbt-general" | "snbt-math" | "snbt-plain" | "snbt-quant" | "tka-math")[];
|
|
158
|
-
readonly rendererContractVersion: "1.0.0";
|
|
159
119
|
};
|
|
160
120
|
}, import("./errors.js").ContractDecodeError, never>;
|
|
161
121
|
/** Strictly decodes one authored source before a publication recompile. */
|
package/dist/content.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Effect, Schema } from "effect";
|
|
|
2
2
|
import { decodeContract } from "#contracts/decode";
|
|
3
3
|
import { ContentKeySchema, CorpusSourcePathSchema, Ed25519SignatureSchema, Sha256HashSchema, SigningKeyIdSchema, } from "#contracts/ids";
|
|
4
4
|
import { ArtifactLocaleSchema, } from "#contracts/locale";
|
|
5
|
-
import {
|
|
5
|
+
import { RendererComponentsSchema } from "#contracts/renderer/component";
|
|
6
6
|
import { RendererManifestEnvelopeSchema } from "#contracts/renderer/contract";
|
|
7
7
|
import { RendererDomainSchema } from "#contracts/renderer/domain";
|
|
8
8
|
import { compareCodeUnits } from "#contracts/text/order";
|
|
@@ -45,9 +45,7 @@ export const CompileDocumentSourceSchema = Schema.Struct({
|
|
|
45
45
|
export const CompileDocumentRequestSchema = Schema.Struct({
|
|
46
46
|
...CompileDocumentSourceSchema.fields,
|
|
47
47
|
rendererManifest: RendererManifestEnvelopeSchema,
|
|
48
|
-
})
|
|
49
|
-
message: "Expected the selected renderer domain to have a capability.",
|
|
50
|
-
})));
|
|
48
|
+
});
|
|
51
49
|
/** Precompiled trusted payload stored and signed before server-only execution. */
|
|
52
50
|
export const CompiledContentPayloadSchema = Schema.Struct({
|
|
53
51
|
artifactLocale: ArtifactLocaleSchema,
|
|
@@ -61,7 +59,7 @@ export const CompiledContentPayloadSchema = Schema.Struct({
|
|
|
61
59
|
plainText: Schema.String,
|
|
62
60
|
rawMdx: Schema.String,
|
|
63
61
|
rendererDomain: RendererDomainSchema,
|
|
64
|
-
requiredComponents:
|
|
62
|
+
requiredComponents: RendererComponentsSchema,
|
|
65
63
|
sourceHash: Sha256HashSchema,
|
|
66
64
|
});
|
|
67
65
|
/** Immutable compiled payload plus its asymmetric authenticity proof. */
|
|
@@ -86,10 +84,7 @@ export function canonicalizeCompiledContentPayload(payload) {
|
|
|
86
84
|
plainText: payload.plainText,
|
|
87
85
|
rawMdx: payload.rawMdx,
|
|
88
86
|
rendererDomain: payload.rendererDomain,
|
|
89
|
-
requiredComponents: payload.requiredComponents
|
|
90
|
-
name,
|
|
91
|
-
version,
|
|
92
|
-
})),
|
|
87
|
+
requiredComponents: payload.requiredComponents,
|
|
93
88
|
sourceHash: payload.sourceHash,
|
|
94
89
|
});
|
|
95
90
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
export declare const LOCAL_PREVIEW_ARTIFACT_PREFIX = "/
|
|
2
|
+
export declare const LOCAL_PREVIEW_ARTIFACT_PREFIX = "/artifacts/";
|
|
3
3
|
/** Builds the one content-addressed path owned by the preview protocol. */
|
|
4
4
|
export declare function localPreviewArtifactPath(artifactHash: string): string;
|
|
5
5
|
/** One signed artifact reference and its exact current renderer projection. */
|
package/dist/preview/artifact.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { Sha256HashSchema } from "#contracts/ids";
|
|
3
3
|
import { ContentProjectionSchema } from "#contracts/projection/spec";
|
|
4
|
-
export const LOCAL_PREVIEW_ARTIFACT_PREFIX = "/
|
|
4
|
+
export const LOCAL_PREVIEW_ARTIFACT_PREFIX = "/artifacts/";
|
|
5
5
|
/** Builds the one content-addressed path owned by the preview protocol. */
|
|
6
6
|
export function localPreviewArtifactPath(artifactHash) {
|
|
7
7
|
return `${LOCAL_PREVIEW_ARTIFACT_PREFIX}${encodeURIComponent(artifactHash)}`;
|
package/dist/preview/auth.d.ts
CHANGED
|
@@ -15,31 +15,14 @@ export type PreviewRendererProof = typeof PreviewRendererProofSchema.Type;
|
|
|
15
15
|
export declare const PreviewRendererResponseSchema: Schema.Struct<{
|
|
16
16
|
readonly format: Schema.Literal<"aksara-renderer-auth-v1">;
|
|
17
17
|
readonly manifest: Schema.Struct<{
|
|
18
|
-
readonly base: Schema.
|
|
19
|
-
authoringComponents: Schema.$Array<Schema.Struct<{
|
|
20
|
-
readonly name: Schema.String;
|
|
21
|
-
readonly version: Schema.Finite;
|
|
22
|
-
}>>;
|
|
23
|
-
supportedComponents: Schema.$Array<Schema.Struct<{
|
|
24
|
-
readonly name: Schema.String;
|
|
25
|
-
readonly version: Schema.Finite;
|
|
26
|
-
}>>;
|
|
27
|
-
}>;
|
|
18
|
+
readonly base: Schema.$Array<Schema.String>;
|
|
28
19
|
readonly domains: Schema.$Array<Schema.Struct<{
|
|
29
|
-
readonly
|
|
30
|
-
readonly name: Schema.String;
|
|
31
|
-
readonly version: Schema.Finite;
|
|
32
|
-
}>>;
|
|
20
|
+
readonly components: Schema.$Array<Schema.String>;
|
|
33
21
|
readonly name: Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>;
|
|
34
|
-
readonly supportedComponents: Schema.$Array<Schema.Struct<{
|
|
35
|
-
readonly name: Schema.String;
|
|
36
|
-
readonly version: Schema.Finite;
|
|
37
|
-
}>>;
|
|
38
22
|
}>>;
|
|
39
|
-
readonly format: Schema.Literal<"nakafa-mdx-renderer
|
|
23
|
+
readonly format: Schema.Literal<"nakafa-mdx-renderer">;
|
|
40
24
|
readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
41
25
|
readonly publishedDomains: Schema.$Array<Schema.Literals<readonly ["ai-ds", "biology", "chemistry", "mathematics", "physics", "politics", "site", "snbt-general", "snbt-math", "snbt-plain", "snbt-quant", "tka-math"]>>;
|
|
42
|
-
readonly rendererContractVersion: Schema.Literal<"1.0.0">;
|
|
43
26
|
}>;
|
|
44
27
|
readonly proof: Schema.String;
|
|
45
28
|
}>;
|