@qijenchen/governance 0.1.0-beta.94
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 +89 -0
- package/bin/attest.mjs +4 -0
- package/bin/check.mjs +4 -0
- package/bin/doctor.mjs +4 -0
- package/bin/generate.mjs +4 -0
- package/bin/governance.mjs +4 -0
- package/bin/hook.mjs +4 -0
- package/bin/upgrade.mjs +4 -0
- package/canonical/gates.json +42 -0
- package/canonical/manifest.json +476 -0
- package/canonical/plugin-aliases.json +25 -0
- package/canonical/provider-lifecycle.json +48 -0
- package/canonical/providers.json +455 -0
- package/canonical/roles.json +12 -0
- package/canonical/rules.json +81 -0
- package/canonical/schemas/attestation.schema.json +61 -0
- package/canonical/schemas/diagnostic.schema.json +37 -0
- package/canonical/schemas/gates.schema.json +27 -0
- package/canonical/schemas/lock.schema.json +189 -0
- package/canonical/schemas/manifest.schema.json +103 -0
- package/canonical/schemas/plugin-aliases.schema.json +59 -0
- package/canonical/schemas/provider-hook-coverage.schema.json +173 -0
- package/canonical/schemas/provider-lifecycle.schema.json +126 -0
- package/canonical/schemas/providers.schema.json +917 -0
- package/canonical/schemas/roles.schema.json +27 -0
- package/canonical/schemas/rules.schema.json +46 -0
- package/canonical/schemas/upgrade-plan.schema.json +31 -0
- package/package.json +42 -0
- package/src/authority-decision-evidence.mjs +413 -0
- package/src/canonical-order.mjs +8 -0
- package/src/carrier-projection.mjs +407 -0
- package/src/cli.mjs +114 -0
- package/src/closed-tool-execution.mjs +1001 -0
- package/src/common.mjs +278 -0
- package/src/contract.mjs +760 -0
- package/src/hook-api.mjs +107 -0
- package/src/index.mjs +14 -0
- package/src/provider-hook-normalization.mjs +1646 -0
- package/src/provider-review-binding.mjs +2377 -0
- package/src/snapshot.mjs +520 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://qijenchen.dev/schemas/governance/provider-lifecycle-v1.json",
|
|
4
|
+
"title": "Append-only provider lifecycle ledger",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"required": ["$schema", "schemaVersion", "kind", "immutableHead", "snapshots"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "const": "./schemas/provider-lifecycle.schema.json" },
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"kind": { "const": "provider-lifecycle-ledger" },
|
|
12
|
+
"immutableHead": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"required": ["releaseVersion", "snapshotSha256", "providerInventorySha256"],
|
|
16
|
+
"properties": {
|
|
17
|
+
"releaseVersion": { "$ref": "#/$defs/semver" },
|
|
18
|
+
"snapshotSha256": { "$ref": "#/$defs/sha256" },
|
|
19
|
+
"providerInventorySha256": { "$ref": "#/$defs/sha256" }
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"snapshots": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"items": { "$ref": "#/$defs/snapshot" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"$defs": {
|
|
29
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
30
|
+
"semver": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z][0-9A-Za-z.-]*)?(?:\\+[0-9A-Za-z][0-9A-Za-z.-]*)?$"
|
|
33
|
+
},
|
|
34
|
+
"discovery": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": ["providerRootNames", "instructionNames", "instructionOverrideNames", "configPaths", "pluginRootNames"],
|
|
38
|
+
"properties": {
|
|
39
|
+
"providerRootNames": { "$ref": "#/$defs/stringArray" },
|
|
40
|
+
"instructionNames": { "$ref": "#/$defs/stringArray" },
|
|
41
|
+
"instructionOverrideNames": { "$ref": "#/$defs/stringArray" },
|
|
42
|
+
"configPaths": { "$ref": "#/$defs/stringArray" },
|
|
43
|
+
"pluginRootNames": { "$ref": "#/$defs/stringArray" }
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"stringArray": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"uniqueItems": true,
|
|
49
|
+
"items": { "type": "string" }
|
|
50
|
+
},
|
|
51
|
+
"surface": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"required": ["path", "kind"],
|
|
55
|
+
"properties": {
|
|
56
|
+
"path": { "type": "string", "minLength": 1 },
|
|
57
|
+
"kind": { "enum": ["file", "tree"] }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"retiredSurface": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"required": ["path", "kind", "sha256"],
|
|
64
|
+
"properties": {
|
|
65
|
+
"path": { "type": "string", "minLength": 1 },
|
|
66
|
+
"kind": { "enum": ["file", "tree"] },
|
|
67
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"provider": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": false,
|
|
73
|
+
"required": ["id", "discovery", "surfaces"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
76
|
+
"discovery": { "$ref": "#/$defs/discovery" },
|
|
77
|
+
"surfaces": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/surface" } }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"retirement": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["id", "replacementProviderId", "retiredInVersion", "reasonCode", "discovery", "surfaces"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
86
|
+
"replacementProviderId": { "type": ["string", "null"] },
|
|
87
|
+
"retiredInVersion": { "$ref": "#/$defs/semver" },
|
|
88
|
+
"reasonCode": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$" },
|
|
89
|
+
"discovery": { "$ref": "#/$defs/discovery" },
|
|
90
|
+
"surfaces": { "type": "array", "uniqueItems": true, "items": { "$ref": "#/$defs/retiredSurface" } },
|
|
91
|
+
"transfers": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "$ref": "#/$defs/surface" } }
|
|
92
|
+
},
|
|
93
|
+
"allOf": [
|
|
94
|
+
{
|
|
95
|
+
"anyOf": [
|
|
96
|
+
{ "properties": { "surfaces": { "type": "array", "minItems": 1 } } },
|
|
97
|
+
{
|
|
98
|
+
"required": ["transfers"],
|
|
99
|
+
"properties": { "transfers": { "type": "array", "minItems": 1 } }
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"if": {
|
|
105
|
+
"properties": { "replacementProviderId": { "type": "null" } },
|
|
106
|
+
"required": ["replacementProviderId"]
|
|
107
|
+
},
|
|
108
|
+
"then": { "properties": { "transfers": false } }
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"snapshot": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"required": ["releaseVersion", "previousSnapshotSha256", "providers", "retiredProviders"],
|
|
116
|
+
"properties": {
|
|
117
|
+
"releaseVersion": { "$ref": "#/$defs/semver" },
|
|
118
|
+
"previousSnapshotSha256": {
|
|
119
|
+
"oneOf": [{ "$ref": "#/$defs/sha256" }, { "type": "null" }]
|
|
120
|
+
},
|
|
121
|
+
"providers": { "type": "array", "items": { "$ref": "#/$defs/provider" } },
|
|
122
|
+
"retiredProviders": { "type": "array", "items": { "$ref": "#/$defs/retirement" } }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|