@cloudhal/core-contracts 0.9.0 → 0.10.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/dist/scripts/schema-list.d.ts +1 -1
- package/dist/scripts/schema-list.js +4 -0
- package/dist/src/generated/index.d.ts +2 -0
- package/dist/src/generated/index.js +2 -0
- package/dist/src/generated/release-keys.d.ts +62 -0
- package/dist/src/generated/release-keys.js +66 -0
- package/dist/src/generated/release-yank-list.d.ts +68 -0
- package/dist/src/generated/release-yank-list.js +72 -0
- package/dist/src/generated/schemas.d.ts +420 -0
- package/dist/src/generated/schemas.js +276 -0
- package/dist/src/generated/validators.d.ts +3 -1
- package/dist/src/generated/validators.js +1332 -0
- package/dist/src/validate.d.ts +3 -1
- package/dist/src/validate.js +6 -0
- package/package.json +1 -1
- package/schemas/release-keys.schema.json +86 -0
- package/schemas/release-yank-list.schema.json +113 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Single list of root contracts. Order is the order generators emit in; keep it stable
|
|
3
3
|
* so generated files and `tools/list`-style outputs are deterministic.
|
|
4
4
|
*/
|
|
5
|
-
export declare const ROOT_SCHEMAS: readonly ["project", "site", "page", "section", "content-entry", "snapshot", "skill-manifest", "taxonomy", "term", "redirect", "asset", "menu", "analytics-event", "analytics-beacon", "comment", "comment-submission", "release", "automation", "schedule-run", "glossary", "release-manifest", "release-statement"];
|
|
5
|
+
export declare const ROOT_SCHEMAS: readonly ["project", "site", "page", "section", "content-entry", "snapshot", "skill-manifest", "taxonomy", "term", "redirect", "asset", "menu", "analytics-event", "analytics-beacon", "comment", "comment-submission", "release", "automation", "schedule-run", "glossary", "release-manifest", "release-statement", "release-keys", "release-yank-list"];
|
|
6
6
|
export type RootSchemaName = (typeof ROOT_SCHEMAS)[number];
|
|
7
7
|
/**
|
|
8
8
|
* Roots whose module the package index re-exports only by these names. The release roots
|
|
@@ -25,6 +25,8 @@ export const ROOT_SCHEMAS = [
|
|
|
25
25
|
"glossary",
|
|
26
26
|
"release-manifest",
|
|
27
27
|
"release-statement",
|
|
28
|
+
"release-keys",
|
|
29
|
+
"release-yank-list",
|
|
28
30
|
] ;
|
|
29
31
|
|
|
30
32
|
|
|
@@ -39,6 +41,8 @@ export const ROOT_SCHEMAS = [
|
|
|
39
41
|
export const INDEX_EXPORTS = {
|
|
40
42
|
"release-manifest": ["ReleaseManifest", "WorkerArtifact", "BindingTemplate"],
|
|
41
43
|
"release-statement": ["ReleaseStatement", "StatementAsset"],
|
|
44
|
+
"release-keys": ["ReleaseKeys", "ListedKey"],
|
|
45
|
+
"release-yank-list": ["ReleaseYankList"],
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
export const COMMON_SCHEMA = "common";
|
|
@@ -23,3 +23,5 @@ export type { ScheduleRunId, ScheduleRunSubject, ScheduleRunState, ScheduleRun,
|
|
|
23
23
|
export type { Glossary, GlossaryEntry } from "./glossary.js";
|
|
24
24
|
export type { ReleaseManifest, WorkerArtifact, BindingTemplate } from "./release-manifest.js";
|
|
25
25
|
export type { ReleaseStatement, StatementAsset } from "./release-statement.js";
|
|
26
|
+
export type { ReleaseKeys, ListedKey } from "./release-keys.js";
|
|
27
|
+
export type { ReleaseYankList } from "./release-yank-list.js";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT.
|
|
3
|
+
* Source: packages/core-contracts/schemas/*.schema.json (run `pnpm gen`)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.
|
|
7
|
+
*
|
|
8
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
9
|
+
* via the `definition` "SchemaVersion".
|
|
10
|
+
*/
|
|
11
|
+
export type SchemaVersion = 1;
|
|
12
|
+
/**
|
|
13
|
+
* RFC 3339 / ISO 8601 instant in UTC.
|
|
14
|
+
*
|
|
15
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
16
|
+
* via the `definition` "Timestamp".
|
|
17
|
+
*/
|
|
18
|
+
export type Timestamp = string;
|
|
19
|
+
/**
|
|
20
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
21
|
+
* via the `definition` "KeyId".
|
|
22
|
+
*/
|
|
23
|
+
export type KeyId = string;
|
|
24
|
+
/**
|
|
25
|
+
* cloudhal.release-keys@1 (RFC-0046 §9): the root-signed list of Cloudhal's release and yank keys, published as keys.json at https://cloudhal.dev/.well-known/cloudhal/keys.json next to keys.json.sig (a raw 64-byte Ed25519 signature by the offline root over the exact bytes). A consumer uses it only to reduce trust in the keys it pins: revoke, mark retiring, narrow a validity window; it never adds a key. Canonical bytes as for the release statement.
|
|
26
|
+
*/
|
|
27
|
+
export interface ReleaseKeys {
|
|
28
|
+
schemaVersion: SchemaVersion;
|
|
29
|
+
format: "cloudhal.release-keys@1";
|
|
30
|
+
issuedAt: Timestamp;
|
|
31
|
+
/**
|
|
32
|
+
* RFC 3339 / ISO 8601 instant in UTC.
|
|
33
|
+
*/
|
|
34
|
+
expires: string;
|
|
35
|
+
signing: {
|
|
36
|
+
/**
|
|
37
|
+
* The root key that signed this list.
|
|
38
|
+
*/
|
|
39
|
+
keyId: string;
|
|
40
|
+
algorithm: "Ed25519";
|
|
41
|
+
signature: "keys.json.sig";
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* @maxItems 64
|
|
45
|
+
*/
|
|
46
|
+
keys: ListedKey[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
50
|
+
* via the `definition` "ListedKey".
|
|
51
|
+
*/
|
|
52
|
+
export interface ListedKey {
|
|
53
|
+
keyId: KeyId;
|
|
54
|
+
/**
|
|
55
|
+
* The raw 32-byte Ed25519 public key, base64.
|
|
56
|
+
*/
|
|
57
|
+
publicKey: string;
|
|
58
|
+
role: "release" | "yank";
|
|
59
|
+
notBefore: Timestamp;
|
|
60
|
+
notAfter: Timestamp;
|
|
61
|
+
status: "active" | "retiring" | "revoked";
|
|
62
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* biome-ignore-all lint: generated */
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — DO NOT EDIT.
|
|
5
|
+
* Source: packages/core-contracts/schemas/*.schema.json (run `pnpm gen`)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.
|
|
10
|
+
*
|
|
11
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
12
|
+
* via the `definition` "SchemaVersion".
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* RFC 3339 / ISO 8601 instant in UTC.
|
|
17
|
+
*
|
|
18
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
19
|
+
* via the `definition` "Timestamp".
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
24
|
+
* via the `definition` "KeyId".
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* cloudhal.release-keys@1 (RFC-0046 §9): the root-signed list of Cloudhal's release and yank keys, published as keys.json at https://cloudhal.dev/.well-known/cloudhal/keys.json next to keys.json.sig (a raw 64-byte Ed25519 signature by the offline root over the exact bytes). A consumer uses it only to reduce trust in the keys it pins: revoke, mark retiring, narrow a validity window; it never adds a key. Canonical bytes as for the release statement.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* This interface was referenced by `ReleaseKeys`'s JSON-Schema
|
|
54
|
+
* via the `definition` "ListedKey".
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED FILE — DO NOT EDIT.
|
|
3
|
+
* Source: packages/core-contracts/schemas/*.schema.json (run `pnpm gen`)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.
|
|
7
|
+
*
|
|
8
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
9
|
+
* via the `definition` "SchemaVersion".
|
|
10
|
+
*/
|
|
11
|
+
export type SchemaVersion = 1;
|
|
12
|
+
/**
|
|
13
|
+
* RFC 3339 / ISO 8601 instant in UTC.
|
|
14
|
+
*
|
|
15
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
16
|
+
* via the `definition` "Timestamp".
|
|
17
|
+
*/
|
|
18
|
+
export type Timestamp = string;
|
|
19
|
+
/**
|
|
20
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
21
|
+
* via the `definition` "CloudhalVersion".
|
|
22
|
+
*/
|
|
23
|
+
export type CloudhalVersion = string;
|
|
24
|
+
/**
|
|
25
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
26
|
+
* via the `definition` "KeyId".
|
|
27
|
+
*/
|
|
28
|
+
export type KeyId = string;
|
|
29
|
+
/**
|
|
30
|
+
* cloudhal.release-yank-list@1 (RFC-0046 §9): the yank list, published as yanked.json at https://cloudhal.dev/.well-known/cloudhal/yanked.json next to yanked.json.sig (a raw 64-byte Ed25519 signature by a yank-role key from keys.json over the exact bytes). It only reduces trust: versions no consumer may install, and release key ids every consumer must refuse. Re-signed weekly; it expires 30 days after issuedAt, and a stale list blocks new installs only.
|
|
31
|
+
*/
|
|
32
|
+
export interface ReleaseYankList {
|
|
33
|
+
schemaVersion: SchemaVersion;
|
|
34
|
+
format: "cloudhal.release-yank-list@1";
|
|
35
|
+
/**
|
|
36
|
+
* Increases by one at every signing. A consumer that keeps state refuses a serial lower than the last one it saw (a rollback to an older, validly signed list).
|
|
37
|
+
*/
|
|
38
|
+
serial: number;
|
|
39
|
+
issuedAt: Timestamp;
|
|
40
|
+
/**
|
|
41
|
+
* RFC 3339 / ISO 8601 instant in UTC.
|
|
42
|
+
*/
|
|
43
|
+
expires: string;
|
|
44
|
+
signing: {
|
|
45
|
+
/**
|
|
46
|
+
* The yank-role key that signed this list.
|
|
47
|
+
*/
|
|
48
|
+
keyId: string;
|
|
49
|
+
algorithm: "Ed25519";
|
|
50
|
+
signature: "yanked.json.sig";
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* @maxItems 1000
|
|
54
|
+
*/
|
|
55
|
+
versions: {
|
|
56
|
+
version: CloudhalVersion;
|
|
57
|
+
yankedAt: Timestamp;
|
|
58
|
+
reason: string;
|
|
59
|
+
}[];
|
|
60
|
+
/**
|
|
61
|
+
* @maxItems 64
|
|
62
|
+
*/
|
|
63
|
+
revokedKeys: {
|
|
64
|
+
keyId: KeyId;
|
|
65
|
+
revokedAt: Timestamp;
|
|
66
|
+
reason: string;
|
|
67
|
+
}[];
|
|
68
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* biome-ignore-all lint: generated */
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — DO NOT EDIT.
|
|
5
|
+
* Source: packages/core-contracts/schemas/*.schema.json (run `pnpm gen`)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.
|
|
10
|
+
*
|
|
11
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
12
|
+
* via the `definition` "SchemaVersion".
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* RFC 3339 / ISO 8601 instant in UTC.
|
|
17
|
+
*
|
|
18
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
19
|
+
* via the `definition` "Timestamp".
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
24
|
+
* via the `definition` "CloudhalVersion".
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This interface was referenced by `ReleaseYankList`'s JSON-Schema
|
|
29
|
+
* via the `definition` "KeyId".
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* cloudhal.release-yank-list@1 (RFC-0046 §9): the yank list, published as yanked.json at https://cloudhal.dev/.well-known/cloudhal/yanked.json next to yanked.json.sig (a raw 64-byte Ed25519 signature by a yank-role key from keys.json over the exact bytes). It only reduces trust: versions no consumer may install, and release key ids every consumer must refuse. Re-signed weekly; it expires 30 days after issuedAt, and a stale list blocks new installs only.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|