@graphrefly/stack 0.1.2 → 0.1.4

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.
Files changed (50) hide show
  1. package/dist/assets/contracts/ci/v1/artifacts.schema.json +253 -0
  2. package/dist/assets/contracts/ci/v1/golden-suite.schema.json +17 -0
  3. package/dist/assets/contracts/repository/v1/review.schema.json +44 -1
  4. package/dist/assets/contracts/semantic/v1/artifacts.schema.json +697 -0
  5. package/dist/assets/contracts/semantic/v1/golden-suite.schema.json +119 -0
  6. package/dist/assets/contracts/v1/schemas/cli-result.schema.json +11 -1
  7. package/dist/assets/fixtures/contracts/ci/v1/golden-digests.json +5 -0
  8. package/dist/assets/fixtures/contracts/ci/v1/golden-suite.json +104 -0
  9. package/dist/assets/fixtures/contracts/semantic/v1/golden-digests.json +17 -0
  10. package/dist/assets/fixtures/contracts/semantic/v1/golden-suite.json +715 -0
  11. package/dist/grfs.js +3624 -1568
  12. package/dist/review/assets/{abnfDiagram-VRR7QNED-DxGYeLns.js → abnfDiagram-VRR7QNED-BjBHcddA.js} +1 -1
  13. package/dist/review/assets/{architectureDiagram-ZJ3FMSHR-CoaG1PSB.js → architectureDiagram-ZJ3FMSHR-D2YEagFX.js} +1 -1
  14. package/dist/review/assets/{chunk-EX3LRPZG-C1ZhSVKp.js → chunk-EX3LRPZG-Cqlq9N1k.js} +1 -1
  15. package/dist/review/assets/{chunk-MOJQB5TN-Ct40HB9X.js → chunk-MOJQB5TN-CrJU23I4.js} +1 -1
  16. package/dist/review/assets/{chunk-PUDLZKDR-C2Is490W.js → chunk-PUDLZKDR-D2gPOWiF.js} +1 -1
  17. package/dist/review/assets/{chunk-V7JOEXUC-Z3n_IPe-.js → chunk-V7JOEXUC-zqKE0D3Z.js} +1 -1
  18. package/dist/review/assets/{classDiagram-OUVF2IWQ-BVlewphI.js → classDiagram-OUVF2IWQ-CRJJUaPV.js} +1 -1
  19. package/dist/review/assets/{classDiagram-v2-EOCWNBFH-BVlewphI.js → classDiagram-v2-EOCWNBFH-CRJJUaPV.js} +1 -1
  20. package/dist/review/assets/{cynefinDiagram-TSTJHNR4-Cjm1OFIk.js → cynefinDiagram-TSTJHNR4-BkymIc14.js} +1 -1
  21. package/dist/review/assets/{dagre-VKFMJZFB-EvQo1qj2.js → dagre-VKFMJZFB-e2nCgJcZ.js} +1 -1
  22. package/dist/review/assets/{diagram-G47NLZAW-k0H6Hccx.js → diagram-G47NLZAW-QL9zGpjT.js} +1 -1
  23. package/dist/review/assets/{diagram-NH7WQ7WH-VUneNb0M.js → diagram-NH7WQ7WH-DvCskT8T.js} +1 -1
  24. package/dist/review/assets/{diagram-OA4YK3LP-tUGLM6tT.js → diagram-OA4YK3LP-Cx9kjg5t.js} +1 -1
  25. package/dist/review/assets/{diagram-WEI45ONY-aN8naqL-.js → diagram-WEI45ONY-CfwqC_md.js} +1 -1
  26. package/dist/review/assets/{ebnfDiagram-CCIWWBDH-PjAeMUc1.js → ebnfDiagram-CCIWWBDH-G63kkvbq.js} +1 -1
  27. package/dist/review/assets/{erDiagram-Q63AITRT-CkxN3vs2.js → erDiagram-Q63AITRT-D3GzhK6w.js} +1 -1
  28. package/dist/review/assets/{flowDiagram-23GEKE2U-ChS1-2Qo.js → flowDiagram-23GEKE2U-DqVi9C2r.js} +1 -1
  29. package/dist/review/assets/index-BGz0YQEi.css +1 -0
  30. package/dist/review/assets/{index-CUaeHlgA.js → index-D_ZKYhz7.js} +4 -4
  31. package/dist/review/assets/{infoDiagram-FWYZ7A6U-CcLr4Fgp.js → infoDiagram-FWYZ7A6U-WJv0WBae.js} +1 -1
  32. package/dist/review/assets/{ishikawaDiagram-FXEZZL3T-p7DbRTIs.js → ishikawaDiagram-FXEZZL3T-BnZ5zRCL.js} +1 -1
  33. package/dist/review/assets/{kanban-definition-HUTT4EX6-BgXdqTkK.js → kanban-definition-HUTT4EX6-BDdmEROe.js} +1 -1
  34. package/dist/review/assets/{mindmap-definition-LN4V7U3C-zdfirl2I.js → mindmap-definition-LN4V7U3C-BH2EZxB3.js} +1 -1
  35. package/dist/review/assets/{pegDiagram-2B236MQR-ScPkpaWR.js → pegDiagram-2B236MQR-apJfnuaF.js} +1 -1
  36. package/dist/review/assets/{pieDiagram-ENE6RG2P-BAQHg9fC.js → pieDiagram-ENE6RG2P-DBZNNsNI.js} +1 -1
  37. package/dist/review/assets/{railroadDiagram-RFXS5EU6-DV8AQwDM.js → railroadDiagram-RFXS5EU6-Csr5eB8z.js} +1 -1
  38. package/dist/review/assets/{requirementDiagram-TGXJPOKE-CnPqfxpt.js → requirementDiagram-TGXJPOKE-DOGov392.js} +1 -1
  39. package/dist/review/assets/{sequenceDiagram-DBY2YBRQ-Bl7q6mbL.js → sequenceDiagram-DBY2YBRQ-CGLEdxIQ.js} +1 -1
  40. package/dist/review/assets/{stateDiagram-2N3HPSRC-iIZcI3Ny.js → stateDiagram-2N3HPSRC-DGc_GIR7.js} +1 -1
  41. package/dist/review/assets/{stateDiagram-v2-6OUMAXLB-Ct4036z_.js → stateDiagram-v2-6OUMAXLB-CB--qhqy.js} +1 -1
  42. package/dist/review/assets/{swimlanes-5IMT3BWC-DQR9TtlF.js → swimlanes-5IMT3BWC-DWuBlI_u.js} +1 -1
  43. package/dist/review/assets/{swimlanesDiagram-G3AALYLV-LS62ia1i.js → swimlanesDiagram-G3AALYLV-dXt3qLQg.js} +1 -1
  44. package/dist/review/assets/{timeline-definition-FHXFAJF6-Dm738Pbf.js → timeline-definition-FHXFAJF6-Da2ReugN.js} +1 -1
  45. package/dist/review/assets/{vennDiagram-L72KCM5P-DBxm9_YT.js → vennDiagram-L72KCM5P-CnhNeNSC.js} +1 -1
  46. package/dist/review/assets/{wardleyDiagram-EHGQE667-CKwVekAc.js → wardleyDiagram-EHGQE667-CixYg3yw.js} +1 -1
  47. package/dist/review/assets/{xychartDiagram-FW5EYKEG-TVh8_sN-.js → xychartDiagram-FW5EYKEG-BwY7805o.js} +1 -1
  48. package/dist/review/index.html +2 -2
  49. package/package.json +2 -2
  50. package/dist/review/assets/index-Cfj-JRmr.css +0 -1
@@ -0,0 +1,253 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "urn:graphrefly-stack:schema:ci-artifacts:v1",
4
+ "title": "GraphReFly Stack CI artifacts v1",
5
+ "definitions": {
6
+ "Hash": {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": ["algorithm", "value"],
10
+ "properties": {
11
+ "algorithm": { "const": "sha256" },
12
+ "value": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
13
+ }
14
+ },
15
+ "GitOid": {
16
+ "type": "object",
17
+ "additionalProperties": false,
18
+ "required": ["algorithm", "value"],
19
+ "properties": {
20
+ "algorithm": { "enum": ["sha1", "sha256"] },
21
+ "value": { "type": "string", "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$" }
22
+ }
23
+ },
24
+ "DecimalId": {
25
+ "type": "string",
26
+ "pattern": "^[1-9][0-9]*$",
27
+ "maxLength": 32
28
+ },
29
+ "Identifier": {
30
+ "type": "string",
31
+ "minLength": 1,
32
+ "maxLength": 64,
33
+ "pattern": "^[A-Za-z][A-Za-z0-9._-]*$"
34
+ },
35
+ "RuntimeVersion": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "maxLength": 64,
39
+ "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?$"
40
+ },
41
+ "GitHubEvent": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": ["name", "pullRequestNumber", "base", "head"],
45
+ "properties": {
46
+ "name": { "const": "pull_request" },
47
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
48
+ "base": { "$ref": "#/definitions/GitOid" },
49
+ "head": { "$ref": "#/definitions/GitOid" }
50
+ }
51
+ },
52
+ "CacheInputs": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "operatingSystem",
57
+ "architecture",
58
+ "nodeVersion",
59
+ "pnpmVersion",
60
+ "lockfilePath",
61
+ "lockfileDigest",
62
+ "packageManifestDigest",
63
+ "stackVersion",
64
+ "graphreflyVersion",
65
+ "cacheKey"
66
+ ],
67
+ "properties": {
68
+ "operatingSystem": { "type": "string", "minLength": 1, "maxLength": 64 },
69
+ "architecture": { "type": "string", "minLength": 1, "maxLength": 32 },
70
+ "nodeVersion": { "$ref": "#/definitions/RuntimeVersion" },
71
+ "pnpmVersion": { "$ref": "#/definitions/RuntimeVersion" },
72
+ "lockfilePath": { "const": "pnpm-lock.yaml" },
73
+ "lockfileDigest": { "$ref": "#/definitions/Hash" },
74
+ "packageManifestDigest": { "$ref": "#/definitions/Hash" },
75
+ "stackVersion": { "$ref": "#/definitions/RuntimeVersion" },
76
+ "graphreflyVersion": { "$ref": "#/definitions/RuntimeVersion" },
77
+ "cacheKey": { "type": "string", "minLength": 1, "maxLength": 512 }
78
+ }
79
+ },
80
+ "CIInvocation": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": [
84
+ "schema",
85
+ "adapter",
86
+ "repository",
87
+ "event",
88
+ "workflow",
89
+ "run",
90
+ "plan",
91
+ "cacheInputs",
92
+ "identity"
93
+ ],
94
+ "properties": {
95
+ "schema": { "const": "graphrefly.stack.ci-invocation.v1" },
96
+ "adapter": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": ["provider", "version"],
100
+ "properties": {
101
+ "provider": { "const": "github-actions" },
102
+ "version": { "const": "v1" }
103
+ }
104
+ },
105
+ "repository": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": ["id", "ownerId", "headRepositoryId"],
109
+ "properties": {
110
+ "id": { "$ref": "#/definitions/DecimalId" },
111
+ "ownerId": { "$ref": "#/definitions/DecimalId" },
112
+ "headRepositoryId": { "$ref": "#/definitions/DecimalId" }
113
+ }
114
+ },
115
+ "event": { "$ref": "#/definitions/GitHubEvent" },
116
+ "workflow": {
117
+ "type": "object",
118
+ "additionalProperties": false,
119
+ "required": ["ref", "sha"],
120
+ "properties": {
121
+ "ref": { "type": "string", "minLength": 1, "maxLength": 1024 },
122
+ "sha": { "$ref": "#/definitions/GitOid" }
123
+ }
124
+ },
125
+ "run": {
126
+ "type": "object",
127
+ "additionalProperties": false,
128
+ "required": ["id", "attempt", "actorId", "jobName"],
129
+ "properties": {
130
+ "id": { "$ref": "#/definitions/DecimalId" },
131
+ "attempt": { "type": "integer", "minimum": 1 },
132
+ "actorId": { "$ref": "#/definitions/DecimalId" },
133
+ "jobName": { "const": "GraphReFly Stack / Semantic Gate" }
134
+ }
135
+ },
136
+ "plan": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["id", "policyDigest"],
140
+ "properties": {
141
+ "id": { "$ref": "#/definitions/Identifier" },
142
+ "policyDigest": { "$ref": "#/definitions/Hash" }
143
+ }
144
+ },
145
+ "cacheInputs": { "$ref": "#/definitions/CacheInputs" },
146
+ "identity": {
147
+ "type": "object",
148
+ "additionalProperties": false,
149
+ "required": ["assurance"],
150
+ "properties": { "assurance": { "const": "platform-asserted" } }
151
+ }
152
+ }
153
+ },
154
+ "CIResult": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "schema",
159
+ "invocationDigest",
160
+ "outcome",
161
+ "gateInputDigest",
162
+ "gateResult",
163
+ "portableBundleDigest",
164
+ "provenance",
165
+ "redaction",
166
+ "summary",
167
+ "artifactName"
168
+ ],
169
+ "properties": {
170
+ "schema": { "const": "graphrefly.stack.ci-result.v1" },
171
+ "invocationDigest": { "$ref": "#/definitions/Hash" },
172
+ "outcome": { "enum": ["pass", "blocked", "error"] },
173
+ "gateInputDigest": { "$ref": "#/definitions/Hash" },
174
+ "gateResult": {
175
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/GateResult"
176
+ },
177
+ "portableBundleDigest": { "$ref": "#/definitions/Hash" },
178
+ "provenance": {
179
+ "type": "object",
180
+ "additionalProperties": false,
181
+ "required": ["provider", "repositoryId", "workflowSha", "runId", "attempt"],
182
+ "properties": {
183
+ "provider": { "const": "github-actions" },
184
+ "repositoryId": { "$ref": "#/definitions/DecimalId" },
185
+ "workflowSha": { "$ref": "#/definitions/GitOid" },
186
+ "runId": { "$ref": "#/definitions/DecimalId" },
187
+ "attempt": { "type": "integer", "minimum": 1 }
188
+ }
189
+ },
190
+ "redaction": {
191
+ "type": "object",
192
+ "additionalProperties": false,
193
+ "required": ["excludes"],
194
+ "properties": {
195
+ "excludes": {
196
+ "type": "array",
197
+ "items": {
198
+ "enum": [
199
+ "source-content",
200
+ "raw-blueprint",
201
+ "check-output",
202
+ "credentials",
203
+ "environment",
204
+ "model-response"
205
+ ]
206
+ },
207
+ "minItems": 6,
208
+ "maxItems": 6,
209
+ "uniqueItems": true
210
+ }
211
+ }
212
+ },
213
+ "summary": {
214
+ "type": "object",
215
+ "additionalProperties": false,
216
+ "required": ["verdict", "affectedWorkUnitIds", "reasonCodes"],
217
+ "properties": {
218
+ "verdict": { "enum": ["pass", "blocked", "error"] },
219
+ "affectedWorkUnitIds": {
220
+ "type": "array",
221
+ "items": { "type": "string", "minLength": 1, "maxLength": 64 },
222
+ "uniqueItems": true
223
+ },
224
+ "reasonCodes": {
225
+ "type": "array",
226
+ "items": {
227
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/ReasonCode"
228
+ },
229
+ "uniqueItems": true
230
+ }
231
+ }
232
+ },
233
+ "artifactName": {
234
+ "type": "string",
235
+ "pattern": "^graphrefly-stack-ci-[0-9a-f]{64}$"
236
+ }
237
+ }
238
+ },
239
+ "CIBundle": {
240
+ "type": "object",
241
+ "additionalProperties": false,
242
+ "required": ["schema", "invocation", "result", "portableBundle"],
243
+ "properties": {
244
+ "schema": { "const": "graphrefly.stack.ci-bundle.v1" },
245
+ "invocation": { "$ref": "#/definitions/CIInvocation" },
246
+ "result": { "$ref": "#/definitions/CIResult" },
247
+ "portableBundle": {
248
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/SemanticPortableBundle"
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "urn:graphrefly-stack:schema:ci-golden-suite:v1",
4
+ "title": "GraphReFly Stack CI golden suite v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "invocation", "result"],
8
+ "properties": {
9
+ "schema": { "const": "graphrefly.stack.ci-golden-suite.v1" },
10
+ "invocation": {
11
+ "$ref": "urn:graphrefly-stack:schema:ci-artifacts:v1#/definitions/CIInvocation"
12
+ },
13
+ "result": {
14
+ "$ref": "urn:graphrefly-stack:schema:ci-artifacts:v1#/definitions/CIResult"
15
+ }
16
+ }
17
+ }
@@ -29,8 +29,51 @@
29
29
  "minItems": 1,
30
30
  "items": { "$ref": "#/definitions/ReviewCommit" }
31
31
  },
32
- "semanticStatus": { "const": "not-configured" }
32
+ "semanticStatus": { "enum": ["not-configured", "evaluated"] },
33
+ "semantic": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": ["plan", "bindings", "records", "checks", "gateResult", "invalidWorkUnitIds"],
37
+ "properties": {
38
+ "plan": {
39
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/AcceptedChangePlan"
40
+ },
41
+ "bindings": {
42
+ "type": "array",
43
+ "items": {
44
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/CommitWorkUnitBinding"
45
+ }
46
+ },
47
+ "records": {
48
+ "type": "array",
49
+ "items": {
50
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/SemanticChangeRecord"
51
+ }
52
+ },
53
+ "checks": {
54
+ "type": "array",
55
+ "items": {
56
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/CheckResult"
57
+ }
58
+ },
59
+ "gateResult": {
60
+ "$ref": "urn:graphrefly-stack:schema:semantic-artifacts:v1#/definitions/GateResult"
61
+ },
62
+ "invalidWorkUnitIds": {
63
+ "type": "array",
64
+ "items": { "type": "string" },
65
+ "uniqueItems": true
66
+ }
67
+ }
68
+ }
33
69
  },
70
+ "allOf": [
71
+ {
72
+ "if": { "properties": { "semanticStatus": { "const": "evaluated" } } },
73
+ "then": { "properties": { "semantic": {} }, "required": ["semantic"] },
74
+ "else": { "not": { "required": ["semantic"] } }
75
+ }
76
+ ],
34
77
  "definitions": {
35
78
  "GitOid": { "type": "string", "pattern": "^(?:[0-9a-f]{40}|[0-9a-f]{64})$" },
36
79
  "Hash": {