@aikdna/kdna-core 0.20.0 → 0.21.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/CHANGELOG.md +52 -0
- package/README.md +10 -2
- package/package.json +1 -1
- package/schema/manifest.schema.json +24 -14
- package/schema/payload-profile.schema.json +156 -6
- package/schema/runtime-capsule.schema.json +45 -4
- package/src/asset-reader.js +9 -100
- package/src/container/index.js +275 -36
- package/src/crypto-profile.js +18 -3
- package/src/external-key-grant.js +4 -8
- package/src/index.mjs +0 -2
- package/src/public-api.js +0 -12
- package/src/runtime-capsule.js +19 -1
- package/src/types.d.ts +9 -19
package/src/types.d.ts
CHANGED
|
@@ -240,7 +240,6 @@ export interface KDNAManifest {
|
|
|
240
240
|
[key: string]: any;
|
|
241
241
|
};
|
|
242
242
|
content_digest?: string;
|
|
243
|
-
signature?: string;
|
|
244
243
|
[key: string]: any;
|
|
245
244
|
}
|
|
246
245
|
|
|
@@ -292,7 +291,6 @@ export interface KdnaAssetVerifyResult {
|
|
|
292
291
|
manifest: KDNAManifest | null;
|
|
293
292
|
asset_digest: string;
|
|
294
293
|
content_digest: string;
|
|
295
|
-
signature_valid: boolean | null;
|
|
296
294
|
}
|
|
297
295
|
|
|
298
296
|
export interface KdnaAssetIndexProfile {
|
|
@@ -338,7 +336,6 @@ export interface KdnaAssetReader {
|
|
|
338
336
|
options?: {
|
|
339
337
|
asset_digest?: string;
|
|
340
338
|
content_digest?: string;
|
|
341
|
-
requireSignature?: boolean;
|
|
342
339
|
requireDecryption?: boolean;
|
|
343
340
|
} & KdnaDecryptOptions,
|
|
344
341
|
): KdnaAssetVerifyResult;
|
|
@@ -347,7 +344,6 @@ export interface KdnaAssetReader {
|
|
|
347
344
|
options?: {
|
|
348
345
|
asset_digest?: string;
|
|
349
346
|
content_digest?: string;
|
|
350
|
-
requireSignature?: boolean;
|
|
351
347
|
requireDecryption?: boolean;
|
|
352
348
|
} & KdnaDecryptOptions,
|
|
353
349
|
): Promise<KdnaAssetVerifyResult>;
|
|
@@ -736,7 +732,6 @@ export interface KDNAInspectResult {
|
|
|
736
732
|
entries: string[];
|
|
737
733
|
asset_digest: string;
|
|
738
734
|
content_digest: string;
|
|
739
|
-
signature_valid: boolean | null;
|
|
740
735
|
ok: boolean | null;
|
|
741
736
|
errors: string[];
|
|
742
737
|
warnings: string[];
|
|
@@ -798,7 +793,7 @@ export interface KDNARuntimeCapsule {
|
|
|
798
793
|
judgment_version: string;
|
|
799
794
|
};
|
|
800
795
|
digests: KDNADigestEvidence;
|
|
801
|
-
signature: { state: '
|
|
796
|
+
signature: { state: 'absent' };
|
|
802
797
|
access: 'public' | 'licensed' | 'remote';
|
|
803
798
|
profile: 'index' | 'compact' | 'scenario' | 'full';
|
|
804
799
|
context: Record<string, any>;
|
|
@@ -809,8 +804,13 @@ export interface KDNARuntimeCapsule {
|
|
|
809
804
|
input_kind: 'packaged_file' | 'packaged_bytes';
|
|
810
805
|
runtime_eligible: true;
|
|
811
806
|
schema_valid: true;
|
|
812
|
-
signature_state: '
|
|
807
|
+
signature_state: 'absent';
|
|
813
808
|
profile: 'index' | 'compact' | 'scenario' | 'full';
|
|
809
|
+
projection_report?: {
|
|
810
|
+
status: 'complete' | 'partial';
|
|
811
|
+
omitted: Array<{ path: string; count: number }>;
|
|
812
|
+
omitted_total: number;
|
|
813
|
+
};
|
|
814
814
|
};
|
|
815
815
|
}
|
|
816
816
|
|
|
@@ -852,7 +852,7 @@ export function buildRuntimeCapsule(input: {
|
|
|
852
852
|
projection: Record<string, any>;
|
|
853
853
|
manifest: KDNAManifest;
|
|
854
854
|
digests: KDNADigestEvidence;
|
|
855
|
-
signature
|
|
855
|
+
signature?: { state: 'absent' };
|
|
856
856
|
inputKind: 'packaged_file' | 'packaged_bytes';
|
|
857
857
|
loadedAt?: string;
|
|
858
858
|
schemaValid?: boolean;
|
|
@@ -1296,7 +1296,6 @@ export function verifyAsset(
|
|
|
1296
1296
|
options?: {
|
|
1297
1297
|
asset_digest?: string;
|
|
1298
1298
|
content_digest?: string;
|
|
1299
|
-
requireSignature?: boolean;
|
|
1300
1299
|
requireDecryption?: boolean;
|
|
1301
1300
|
} & KdnaDecryptOptions,
|
|
1302
1301
|
): Promise<KdnaAssetVerifyResult>;
|
|
@@ -1305,7 +1304,6 @@ export function verifyAssetSync(
|
|
|
1305
1304
|
options?: {
|
|
1306
1305
|
asset_digest?: string;
|
|
1307
1306
|
content_digest?: string;
|
|
1308
|
-
requireSignature?: boolean;
|
|
1309
1307
|
requireDecryption?: boolean;
|
|
1310
1308
|
} & KdnaDecryptOptions,
|
|
1311
1309
|
): KdnaAssetVerifyResult;
|
|
@@ -1319,14 +1317,6 @@ export function verifyDigestSync(
|
|
|
1319
1317
|
expectedDigest: string,
|
|
1320
1318
|
options?: KdnaDecryptOptions,
|
|
1321
1319
|
): KdnaAssetVerifyResult;
|
|
1322
|
-
export function verifySignature(
|
|
1323
|
-
input: KDNAAssetInput,
|
|
1324
|
-
options?: KdnaDecryptOptions,
|
|
1325
|
-
): Promise<KdnaAssetVerifyResult>;
|
|
1326
|
-
export function verifySignatureSync(
|
|
1327
|
-
input: KDNAAssetInput,
|
|
1328
|
-
options?: KdnaDecryptOptions,
|
|
1329
|
-
): KdnaAssetVerifyResult;
|
|
1330
1320
|
export function matchDomain(
|
|
1331
1321
|
input: string,
|
|
1332
1322
|
candidates: Array<KDNAAssetInput | KDNAInspectResult>,
|
|
@@ -1393,7 +1383,7 @@ export function inspect(
|
|
|
1393
1383
|
input: string | Uint8Array,
|
|
1394
1384
|
options?: Record<string, any>,
|
|
1395
1385
|
): Record<string, any>;
|
|
1396
|
-
export const KDNA_LOADER_VERSION: '0.
|
|
1386
|
+
export const KDNA_LOADER_VERSION: '0.21.0';
|
|
1397
1387
|
export const STRICT_LOADER_VERSION: RegExp;
|
|
1398
1388
|
export function parseLoaderVersion(version: unknown): readonly [string, string, string] | null;
|
|
1399
1389
|
export function compareLoaderVersions(left: string, right: string): -1 | 0 | 1;
|