@irogane/kaji 0.2.0-beta.11

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 (136) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +598 -0
  3. package/contracts/README.md +14 -0
  4. package/contracts/beta-core-v1.json +52 -0
  5. package/contracts/cli/init-cases-v1.json +27 -0
  6. package/contracts/errors/error-codes.json +48 -0
  7. package/contracts/errors/integration-recovery-v1.json +127 -0
  8. package/contracts/errors/provider-normalization.json +111 -0
  9. package/contracts/events/conformance-invalid.json +20 -0
  10. package/contracts/events/conformance.json +511 -0
  11. package/contracts/events/new-kaji-event-v1.schema.json +1021 -0
  12. package/contracts/events/stored-kaji-event-v1.schema.json +1025 -0
  13. package/contracts/feature-tiers-v1.json +488 -0
  14. package/contracts/integrations/abi-index-v1.json +8 -0
  15. package/contracts/integrations/conformance-invalid.json +443 -0
  16. package/contracts/integrations/conformance-valid.json +121 -0
  17. package/contracts/integrations/copy-provenance-v1.schema.json +61 -0
  18. package/contracts/integrations/echo-tool-abi-v1.json +37 -0
  19. package/contracts/integrations/github-api-conformance-v1.json +644 -0
  20. package/contracts/integrations/github-tool-abi-typescript-v1.json +369 -0
  21. package/contracts/integrations/github-tool-abi-v1.json +146 -0
  22. package/contracts/integrations/gmail-api-conformance-v1.json +750 -0
  23. package/contracts/integrations/gmail-tool-abi-v1.json +62 -0
  24. package/contracts/integrations/index.schema.json +37 -0
  25. package/contracts/integrations/manifest.schema.json +119 -0
  26. package/contracts/parity/expected-normalized.json +4906 -0
  27. package/contracts/parity/scenarios.json +100 -0
  28. package/contracts/parity/scenarios.schema.json +214 -0
  29. package/contracts/providers/cost-conformance.json +112 -0
  30. package/contracts/release/github-proof-v1.schema.json +138 -0
  31. package/contracts/release/gmail-proof-v1.schema.json +138 -0
  32. package/contracts/release/kaji-ts-consumer-handoff-v1.schema.json +1289 -0
  33. package/contracts/release/publisher-identity-receipt-v1.schema.json +319 -0
  34. package/contracts/release/typescript-onboarding-evidence-v1.schema.json +740 -0
  35. package/contracts/tools/conformance-invalid.json +271 -0
  36. package/contracts/tools/conformance-valid.json +78 -0
  37. package/contracts/tools/tool-schema-v1.schema.json +18 -0
  38. package/dist/anthropic.cjs +1231 -0
  39. package/dist/anthropic.cjs.map +1 -0
  40. package/dist/anthropic.d.cts +26 -0
  41. package/dist/anthropic.d.ts +26 -0
  42. package/dist/anthropic.js +270 -0
  43. package/dist/anthropic.js.map +1 -0
  44. package/dist/auth.cjs +1507 -0
  45. package/dist/auth.cjs.map +1 -0
  46. package/dist/auth.d.cts +129 -0
  47. package/dist/auth.d.ts +129 -0
  48. package/dist/auth.js +1039 -0
  49. package/dist/auth.js.map +1 -0
  50. package/dist/base-B9FRMcP8.d.cts +140 -0
  51. package/dist/base-nHQd1VtS.d.ts +140 -0
  52. package/dist/chunk-AAM33KAO.js +4367 -0
  53. package/dist/chunk-AAM33KAO.js.map +1 -0
  54. package/dist/chunk-KAJ6BM64.js +153 -0
  55. package/dist/chunk-KAJ6BM64.js.map +1 -0
  56. package/dist/chunk-KCAXIOZS.js +308 -0
  57. package/dist/chunk-KCAXIOZS.js.map +1 -0
  58. package/dist/chunk-LSJ4AVO2.js +243 -0
  59. package/dist/chunk-LSJ4AVO2.js.map +1 -0
  60. package/dist/chunk-TM7ZGOJX.js +716 -0
  61. package/dist/chunk-TM7ZGOJX.js.map +1 -0
  62. package/dist/cli/bin.d.ts +2 -0
  63. package/dist/cli/bin.js +13 -0
  64. package/dist/cli/bin.js.map +1 -0
  65. package/dist/cli/chunk-2RCWPRVY.js +6277 -0
  66. package/dist/cli/chunk-2RCWPRVY.js.map +1 -0
  67. package/dist/cli/chunk-SEBX54TR.js +681 -0
  68. package/dist/cli/chunk-SEBX54TR.js.map +1 -0
  69. package/dist/cli/index.d.ts +232 -0
  70. package/dist/cli/index.js +11 -0
  71. package/dist/cli/index.js.map +1 -0
  72. package/dist/cli/init-worker.d.ts +2 -0
  73. package/dist/cli/init-worker.js +18 -0
  74. package/dist/cli/init-worker.js.map +1 -0
  75. package/dist/cli/integration-copy-worker.js +48 -0
  76. package/dist/cli/integration-copy-worker.js.map +1 -0
  77. package/dist/cli/package-entry-cjs.cjs +21 -0
  78. package/dist/cli/package-entry-cjs.cjs.map +1 -0
  79. package/dist/cli/package-entry-cjs.d.cts +2 -0
  80. package/dist/cli/package-entry.d.ts +2 -0
  81. package/dist/cli/package-entry.js +13 -0
  82. package/dist/cli/package-entry.js.map +1 -0
  83. package/dist/context-BaFHrQHv.d.cts +21 -0
  84. package/dist/context-BaFHrQHv.d.ts +21 -0
  85. package/dist/context-C-YPY-GS.d.cts +1538 -0
  86. package/dist/context-C-YPY-GS.d.ts +1538 -0
  87. package/dist/index.cjs +12346 -0
  88. package/dist/index.cjs.map +1 -0
  89. package/dist/index.d.cts +1560 -0
  90. package/dist/index.d.ts +1560 -0
  91. package/dist/index.js +7852 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/integrations/github.cjs +2092 -0
  94. package/dist/integrations/github.cjs.map +1 -0
  95. package/dist/integrations/github.d.cts +21 -0
  96. package/dist/integrations/github.d.ts +21 -0
  97. package/dist/integrations/github.js +2088 -0
  98. package/dist/integrations/github.js.map +1 -0
  99. package/dist/integrations.cjs +3370 -0
  100. package/dist/integrations.cjs.map +1 -0
  101. package/dist/integrations.d.cts +202 -0
  102. package/dist/integrations.d.ts +202 -0
  103. package/dist/integrations.js +2650 -0
  104. package/dist/integrations.js.map +1 -0
  105. package/dist/observability-Cj--OkME.d.cts +96 -0
  106. package/dist/observability-Cj--OkME.d.ts +96 -0
  107. package/dist/openai.cjs +1235 -0
  108. package/dist/openai.cjs.map +1 -0
  109. package/dist/openai.d.cts +32 -0
  110. package/dist/openai.d.ts +32 -0
  111. package/dist/openai.js +272 -0
  112. package/dist/openai.js.map +1 -0
  113. package/dist/testing.cjs +554 -0
  114. package/dist/testing.cjs.map +1 -0
  115. package/dist/testing.d.cts +43 -0
  116. package/dist/testing.d.ts +43 -0
  117. package/dist/testing.js +118 -0
  118. package/dist/testing.js.map +1 -0
  119. package/package.json +188 -0
  120. package/registry/echo/index.ts +53 -0
  121. package/registry/echo/manifest.json +53 -0
  122. package/registry/github/LICENSE +105 -0
  123. package/registry/github/client.ts +1727 -0
  124. package/registry/github/index.ts +263 -0
  125. package/registry/github/manifest.json +227 -0
  126. package/registry/github/owner-fixtures.json +10 -0
  127. package/registry/github/tests/github.test.ts +32 -0
  128. package/registry/gmail/LICENSE +105 -0
  129. package/registry/gmail/client.ts +548 -0
  130. package/registry/gmail/index.ts +165 -0
  131. package/registry/gmail/manifest.json +102 -0
  132. package/registry/gmail/owner-fixtures.json +10 -0
  133. package/registry/gmail/tests/gmail.test.ts +32 -0
  134. package/registry/index.json +21 -0
  135. package/registry/index.schema.json +37 -0
  136. package/registry/schema.json +119 -0
@@ -0,0 +1,1289 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://kaji.dev/contracts/release/kaji-ts-consumer-handoff-v1.schema.json",
4
+ "title": "Kaji TypeScript consumer handoff manifest v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "artifact",
10
+ "package",
11
+ "source",
12
+ "github",
13
+ "upstreamVerification",
14
+ "securityEvidence",
15
+ "license"
16
+ ],
17
+ "properties": {
18
+ "schemaVersion": { "const": 1 },
19
+ "artifact": { "$ref": "#/$defs/artifact" },
20
+ "package": { "$ref": "#/$defs/package" },
21
+ "source": { "$ref": "#/$defs/source" },
22
+ "github": { "$ref": "#/$defs/githubContract" },
23
+ "upstreamVerification": { "$ref": "#/$defs/sevenReceipts" },
24
+ "securityEvidence": { "$ref": "#/$defs/securityEvidence" },
25
+ "license": { "$ref": "#/$defs/license" }
26
+ },
27
+ "x-kajiConformance": {
28
+ "semverBasename": [
29
+ { "value": "0.2.0", "valid": true, "basename": "irogane-kaji-0.2.0.tgz" },
30
+ { "value": "0.2.0-beta.1", "valid": true, "basename": "irogane-kaji-0.2.0-beta.1.tgz" },
31
+ { "value": "1.0.0-0", "valid": true, "basename": "irogane-kaji-1.0.0-0.tgz" },
32
+ { "value": "1.2.3-alpha.1+build.5", "valid": true, "basename": "irogane-kaji-1.2.3-alpha.1+build.5.tgz" },
33
+ { "value": "01.2.3", "valid": false },
34
+ { "value": "1.2", "valid": false },
35
+ { "value": "1.2.3-01", "valid": false },
36
+ { "value": "v1.2.3", "valid": false },
37
+ { "value": "1.2.3+", "valid": false },
38
+ { "value": " 1.2.3", "valid": false },
39
+ { "value": "1.2.3 ", "valid": false },
40
+ { "value": "1.2.3\n", "valid": false },
41
+ { "value": "1.2.3-alpha.é", "valid": false }
42
+ ],
43
+ "aliases": {
44
+ "positiveInt": [
45
+ { "value": 1, "valid": true },
46
+ { "value": 9007199254740991, "valid": true },
47
+ { "value": 0, "valid": false },
48
+ { "value": -1, "valid": false },
49
+ { "value": 9007199254740992, "valid": false },
50
+ { "value": 1.5, "valid": false },
51
+ { "value": true, "valid": false }
52
+ ],
53
+ "nonEmptyString": [
54
+ { "value": "!", "valid": true },
55
+ { "value": "release-proof", "valid": true },
56
+ { "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "valid": true },
57
+ { "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "valid": false },
58
+ { "value": "", "valid": false },
59
+ { "value": "contains space", "valid": false },
60
+ { "value": "line\nbreak", "valid": false },
61
+ { "value": "é", "valid": false }
62
+ ],
63
+ "email": [
64
+ { "value": "a@b.co", "valid": true },
65
+ { "value": "release.signer+ci@example.com", "valid": true },
66
+ { "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com", "valid": true },
67
+ { "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com", "valid": false },
68
+ { "value": "release@bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.com", "valid": true },
69
+ { "value": "release@bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.com", "valid": false },
70
+ { "value": "missing-tld@example", "valid": false },
71
+ { "value": "@example.com", "valid": false },
72
+ { "value": "release signer@example.com", "valid": false },
73
+ { "value": "rélease@example.com", "valid": false }
74
+ ],
75
+ "tagName": [
76
+ { "value": "kaji-a", "valid": true },
77
+ { "value": "kaji-release_1.alpha", "valid": true },
78
+ { "value": "kaji-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "valid": true },
79
+ { "value": "kaji-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "valid": false },
80
+ { "value": "kaji-", "valid": false },
81
+ { "value": "release-1", "valid": false },
82
+ { "value": "kaji-a..b", "valid": false },
83
+ { "value": "kaji-a.", "valid": false },
84
+ { "value": "kaji-a.lock", "valid": false },
85
+ { "value": "kaji-a/b", "valid": false },
86
+ { "value": "kaji-é", "valid": false }
87
+ ],
88
+ "httpsUrl": [
89
+ { "value": "https://github.com/enkyuan/alloy/attestations/attestation-1", "valid": true },
90
+ { "value": "http://github.com/enkyuan/alloy/attestations/a", "valid": false },
91
+ { "value": "https://example.com/enkyuan/alloy/attestations/a", "valid": false },
92
+ { "value": "https://user@github.com/enkyuan/alloy/attestations/a", "valid": false },
93
+ { "value": "https://github.com:443/enkyuan/alloy/attestations/a", "valid": false },
94
+ { "value": "https://github.com/enkyuan/alloy/attestations/a?x=1", "valid": false },
95
+ { "value": "https://github.com/enkyuan/alloy/attestations/a#x", "valid": false },
96
+ { "value": "https://github.com/enkyuan/alloy/attestations/%61", "valid": false }
97
+ ],
98
+ "signerWorkflowRef": [
99
+ { "value": "enkyuan/alloy/.github/workflows/kaji.handoff.trusted.yml@4444444444444444444444444444444444444444", "valid": true },
100
+ { "value": "enkyuan/alloy/.github/workflows/kaji.handoff.trusted.yml@4444", "valid": false },
101
+ { "value": "enkyuan/alloy/.github/workflows/kaji.handoff.trusted.yml@AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "valid": false },
102
+ { "value": "enkyuan/alloy/.github/workflows/other.yml@4444444444444444444444444444444444444444", "valid": false }
103
+ ],
104
+ "repoPath": [
105
+ { "value": "kaji/packages/ts/tests/github-client.test.ts", "valid": true },
106
+ { "value": "/kaji/packages/ts/tests/github-client.test.ts", "valid": false },
107
+ { "value": "kaji/", "valid": false },
108
+ { "value": "kaji//tests/file.ts", "valid": false },
109
+ { "value": "kaji/./tests/file.ts", "valid": false },
110
+ { "value": "kaji/../tests/file.ts", "valid": false },
111
+ { "value": "kaji\\tests\\file.ts", "valid": false },
112
+ { "value": "C:/kaji/tests/file.ts", "valid": false }
113
+ ]
114
+ },
115
+ "tagSourceRefs": [
116
+ { "tag": "kaji-a", "valid": true, "ref": "refs/tags/kaji-a" },
117
+ { "tag": "kaji-release_1.alpha", "valid": true, "ref": "refs/tags/kaji-release_1.alpha" },
118
+ { "tag": "kaji-a.lock", "valid": false }
119
+ ],
120
+ "signerWorkflowIdentities": [
121
+ {
122
+ "value": {
123
+ "repository": "enkyuan/alloy",
124
+ "filePath": ".github/workflows/kaji.handoff.trusted.yml",
125
+ "digest": "4444444444444444444444444444444444444444",
126
+ "ref": "enkyuan/alloy/.github/workflows/kaji.handoff.trusted.yml@4444444444444444444444444444444444444444"
127
+ },
128
+ "schemaValid": true,
129
+ "relationValid": true
130
+ },
131
+ {
132
+ "value": {
133
+ "repository": "enkyuan/alloy",
134
+ "filePath": ".github/workflows/kaji.handoff.trusted.yml",
135
+ "digest": "4444444444444444444444444444444444444444",
136
+ "ref": "enkyuan/alloy/.github/workflows/kaji.handoff.trusted.yml@5555555555555555555555555555555555555555"
137
+ },
138
+ "schemaValid": true,
139
+ "relationValid": false
140
+ },
141
+ {
142
+ "value": {
143
+ "repository": "attacker/alloy",
144
+ "filePath": ".github/workflows/kaji.handoff.trusted.yml",
145
+ "digest": "4444444444444444444444444444444444444444",
146
+ "ref": "enkyuan/alloy/.github/workflows/kaji.handoff.trusted.yml@4444444444444444444444444444444444444444"
147
+ },
148
+ "schemaValid": false,
149
+ "relationValid": false
150
+ }
151
+ ]
152
+ },
153
+ "$defs": {
154
+ "hex40": {
155
+ "type": "string",
156
+ "minLength": 40,
157
+ "maxLength": 40,
158
+ "pattern": "^[0-9a-f]{40}$"
159
+ },
160
+ "hex64": {
161
+ "type": "string",
162
+ "minLength": 64,
163
+ "maxLength": 64,
164
+ "pattern": "^[0-9a-f]{64}$"
165
+ },
166
+ "semver": {
167
+ "type": "string",
168
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$",
169
+ "not": { "pattern": "[^!-~]" }
170
+ },
171
+ "npmSha512": {
172
+ "type": "string",
173
+ "pattern": "^sha512-[A-Za-z0-9+/]+={0,2}$",
174
+ "not": { "pattern": "[^!-~]" }
175
+ },
176
+ "basename": {
177
+ "type": "string",
178
+ "pattern": "^irogane-kaji-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?\\.tgz$",
179
+ "not": { "pattern": "[^!-~]" }
180
+ },
181
+ "positiveInt": {
182
+ "type": "integer",
183
+ "minimum": 1,
184
+ "maximum": 9007199254740991
185
+ },
186
+ "nonEmptyString": {
187
+ "type": "string",
188
+ "minLength": 1,
189
+ "maxLength": 256,
190
+ "pattern": "^[!-~]+$",
191
+ "not": { "pattern": "[^!-~]" }
192
+ },
193
+ "email": {
194
+ "type": "string",
195
+ "minLength": 3,
196
+ "maxLength": 254,
197
+ "pattern": "^[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]{1,64}@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$",
198
+ "not": { "pattern": "[^!-~]" }
199
+ },
200
+ "tagName": {
201
+ "type": "string",
202
+ "minLength": 6,
203
+ "maxLength": 128,
204
+ "pattern": "^kaji-[A-Za-z0-9](?:[A-Za-z0-9_-]*[A-Za-z0-9])?(?:\\.[A-Za-z0-9](?:[A-Za-z0-9_-]*[A-Za-z0-9])?)*$",
205
+ "allOf": [
206
+ { "not": { "pattern": "\\.lock$" } },
207
+ { "not": { "pattern": "[^!-~]" } }
208
+ ]
209
+ },
210
+ "httpsUrl": {
211
+ "type": "string",
212
+ "minLength": 1,
213
+ "maxLength": 2048,
214
+ "pattern": "^https://github\\.com/enkyuan/alloy/attestations/[A-Za-z0-9._~-]{1,128}$",
215
+ "not": { "pattern": "[^!-~]" }
216
+ },
217
+ "signerWorkflowRef": {
218
+ "type": "string",
219
+ "pattern": "^enkyuan/alloy/\\.github/workflows/kaji\\.handoff\\.trusted\\.yml@[0-9a-f]{40}$",
220
+ "not": { "pattern": "[^!-~]" }
221
+ },
222
+ "rangeSpec": {
223
+ "type": "string",
224
+ "minLength": 82,
225
+ "maxLength": 82,
226
+ "pattern": "^[0-9a-f]{40}\\.\\.[0-9a-f]{40}$"
227
+ },
228
+ "repoPath": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "maxLength": 512,
232
+ "pattern": "^(?!/)(?![A-Za-z]:)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*//)(?!.*\\/$)[!-~]+$",
233
+ "allOf": [
234
+ { "not": { "pattern": "[^!-~]" } },
235
+ { "not": { "pattern": "\\\\" } }
236
+ ]
237
+ },
238
+ "signerWorkflowIdentity": {
239
+ "type": "object",
240
+ "additionalProperties": false,
241
+ "required": ["repository", "filePath", "digest", "ref"],
242
+ "properties": {
243
+ "repository": { "const": "enkyuan/alloy" },
244
+ "filePath": { "const": ".github/workflows/kaji.handoff.trusted.yml" },
245
+ "digest": { "$ref": "#/$defs/hex40" },
246
+ "ref": { "$ref": "#/$defs/signerWorkflowRef" }
247
+ }
248
+ },
249
+ "construction": {
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "required": ["cleanCheckoutBuild", "packInvocationCount"],
253
+ "properties": {
254
+ "cleanCheckoutBuild": { "const": "passed" },
255
+ "packInvocationCount": { "const": 1 }
256
+ }
257
+ },
258
+ "reproducibility": {
259
+ "type": "object",
260
+ "additionalProperties": false,
261
+ "required": ["comparison"],
262
+ "properties": {
263
+ "comparison": { "const": "not-run" }
264
+ }
265
+ },
266
+ "artifact": {
267
+ "type": "object",
268
+ "additionalProperties": false,
269
+ "required": [
270
+ "filename",
271
+ "size",
272
+ "sha256",
273
+ "npmIntegrity",
274
+ "construction",
275
+ "reproducibility"
276
+ ],
277
+ "properties": {
278
+ "filename": { "$ref": "#/$defs/basename" },
279
+ "size": { "$ref": "#/$defs/positiveInt" },
280
+ "sha256": { "$ref": "#/$defs/hex64" },
281
+ "npmIntegrity": { "$ref": "#/$defs/npmSha512" },
282
+ "construction": { "$ref": "#/$defs/construction" },
283
+ "reproducibility": { "$ref": "#/$defs/reproducibility" }
284
+ }
285
+ },
286
+ "conditionalExport": {
287
+ "type": "object",
288
+ "additionalProperties": false,
289
+ "required": ["import", "require"],
290
+ "properties": {
291
+ "import": { "$ref": "#/$defs/exportBranch" },
292
+ "require": { "$ref": "#/$defs/exportBranch" }
293
+ }
294
+ },
295
+ "exportBranch": {
296
+ "type": "object",
297
+ "additionalProperties": false,
298
+ "required": ["types", "default"],
299
+ "properties": {
300
+ "types": { "type": "string" },
301
+ "default": { "type": "string" }
302
+ }
303
+ },
304
+ "rootExport": {
305
+ "allOf": [
306
+ { "$ref": "#/$defs/conditionalExport" },
307
+ {
308
+ "const": {
309
+ "import": { "types": "./dist/index.d.ts", "default": "./dist/index.js" },
310
+ "require": { "types": "./dist/index.d.cts", "default": "./dist/index.cjs" }
311
+ }
312
+ }
313
+ ]
314
+ },
315
+ "testingExport": {
316
+ "allOf": [
317
+ { "$ref": "#/$defs/conditionalExport" },
318
+ {
319
+ "const": {
320
+ "import": { "types": "./dist/testing.d.ts", "default": "./dist/testing.js" },
321
+ "require": { "types": "./dist/testing.d.cts", "default": "./dist/testing.cjs" }
322
+ }
323
+ }
324
+ ]
325
+ },
326
+ "openaiExport": {
327
+ "allOf": [
328
+ { "$ref": "#/$defs/conditionalExport" },
329
+ {
330
+ "const": {
331
+ "import": { "types": "./dist/openai.d.ts", "default": "./dist/openai.js" },
332
+ "require": { "types": "./dist/openai.d.cts", "default": "./dist/openai.cjs" }
333
+ }
334
+ }
335
+ ]
336
+ },
337
+ "anthropicExport": {
338
+ "allOf": [
339
+ { "$ref": "#/$defs/conditionalExport" },
340
+ {
341
+ "const": {
342
+ "import": { "types": "./dist/anthropic.d.ts", "default": "./dist/anthropic.js" },
343
+ "require": { "types": "./dist/anthropic.d.cts", "default": "./dist/anthropic.cjs" }
344
+ }
345
+ }
346
+ ]
347
+ },
348
+ "integrationsExport": {
349
+ "allOf": [
350
+ { "$ref": "#/$defs/conditionalExport" },
351
+ {
352
+ "const": {
353
+ "import": { "types": "./dist/integrations.d.ts", "default": "./dist/integrations.js" },
354
+ "require": { "types": "./dist/integrations.d.cts", "default": "./dist/integrations.cjs" }
355
+ }
356
+ }
357
+ ]
358
+ },
359
+ "githubExport": {
360
+ "allOf": [
361
+ { "$ref": "#/$defs/conditionalExport" },
362
+ {
363
+ "const": {
364
+ "import": { "types": "./dist/integrations/github.d.ts", "default": "./dist/integrations/github.js" },
365
+ "require": { "types": "./dist/integrations/github.d.cts", "default": "./dist/integrations/github.cjs" }
366
+ }
367
+ }
368
+ ]
369
+ },
370
+ "authExport": {
371
+ "allOf": [
372
+ { "$ref": "#/$defs/conditionalExport" },
373
+ {
374
+ "const": {
375
+ "import": { "types": "./dist/auth.d.ts", "default": "./dist/auth.js" },
376
+ "require": { "types": "./dist/auth.d.cts", "default": "./dist/auth.cjs" }
377
+ }
378
+ }
379
+ ]
380
+ },
381
+ "cliExport": {
382
+ "allOf": [
383
+ { "$ref": "#/$defs/conditionalExport" },
384
+ {
385
+ "const": {
386
+ "import": {
387
+ "types": "./dist/cli/package-entry.d.ts",
388
+ "default": "./dist/cli/package-entry.js"
389
+ },
390
+ "require": {
391
+ "types": "./dist/cli/package-entry-cjs.d.cts",
392
+ "default": "./dist/cli/package-entry-cjs.cjs"
393
+ }
394
+ }
395
+ }
396
+ ]
397
+ },
398
+ "exactExports": {
399
+ "type": "object",
400
+ "additionalProperties": false,
401
+ "required": [
402
+ ".",
403
+ "./testing",
404
+ "./openai",
405
+ "./anthropic",
406
+ "./integrations",
407
+ "./integrations/github",
408
+ "./auth",
409
+ "./cli"
410
+ ],
411
+ "properties": {
412
+ ".": { "$ref": "#/$defs/rootExport" },
413
+ "./testing": { "$ref": "#/$defs/testingExport" },
414
+ "./openai": { "$ref": "#/$defs/openaiExport" },
415
+ "./anthropic": { "$ref": "#/$defs/anthropicExport" },
416
+ "./integrations": { "$ref": "#/$defs/integrationsExport" },
417
+ "./integrations/github": { "$ref": "#/$defs/githubExport" },
418
+ "./auth": { "$ref": "#/$defs/authExport" },
419
+ "./cli": { "$ref": "#/$defs/cliExport" }
420
+ }
421
+ },
422
+ "githubSymbols4": {
423
+ "type": "array",
424
+ "minItems": 4,
425
+ "maxItems": 4,
426
+ "uniqueItems": true,
427
+ "prefixItems": [
428
+ { "const": "CreateGitHubIntegrationOptions" },
429
+ { "const": "GitHubIntegration" },
430
+ { "const": "createGithubIntegration" },
431
+ { "const": "inspectIntegration" }
432
+ ],
433
+ "items": false
434
+ },
435
+ "package": {
436
+ "type": "object",
437
+ "additionalProperties": false,
438
+ "required": ["name", "version", "exports", "publicSymbols"],
439
+ "properties": {
440
+ "name": { "const": "kaji" },
441
+ "version": { "$ref": "#/$defs/semver" },
442
+ "exports": { "$ref": "#/$defs/exactExports" },
443
+ "publicSymbols": {
444
+ "type": "object",
445
+ "additionalProperties": false,
446
+ "required": ["github"],
447
+ "properties": {
448
+ "github": { "$ref": "#/$defs/githubSymbols4" }
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "source": {
454
+ "type": "object",
455
+ "additionalProperties": false,
456
+ "required": ["repository", "commit", "tree", "mergeBase", "verifierCommit", "signature"],
457
+ "properties": {
458
+ "repository": { "const": "https://github.com/enkyuan/alloy.git" },
459
+ "commit": { "$ref": "#/$defs/hex40" },
460
+ "tree": { "$ref": "#/$defs/hex40" },
461
+ "mergeBase": { "$ref": "#/$defs/hex40" },
462
+ "verifierCommit": { "$ref": "#/$defs/hex40" },
463
+ "signature": {
464
+ "type": "object",
465
+ "additionalProperties": false,
466
+ "required": ["required", "result", "mechanism"],
467
+ "properties": {
468
+ "required": { "const": true },
469
+ "result": { "const": "passed" },
470
+ "mechanism": {
471
+ "enum": [
472
+ "github-rest-commit-verification",
473
+ "github-rest-commit-and-annotated-tag-verification"
474
+ ]
475
+ }
476
+ }
477
+ }
478
+ }
479
+ },
480
+ "tools15": {
481
+ "type": "array",
482
+ "minItems": 15,
483
+ "maxItems": 15,
484
+ "uniqueItems": true,
485
+ "prefixItems": [
486
+ { "const": "add_comment" }, { "const": "create_issue" },
487
+ { "const": "get_file" }, { "const": "get_issue" },
488
+ { "const": "list_issues" }, { "const": "search_code" },
489
+ { "const": "get_commit" }, { "const": "get_pull_request" },
490
+ { "const": "list_pull_request_files" }, { "const": "list_check_runs" },
491
+ { "const": "get_workflow_run" }, { "const": "list_workflow_jobs" },
492
+ { "const": "list_file_commits" }, { "const": "get_release" },
493
+ { "const": "list_deployments" }
494
+ ],
495
+ "items": false
496
+ },
497
+ "reads13": {
498
+ "type": "array",
499
+ "minItems": 13,
500
+ "maxItems": 13,
501
+ "uniqueItems": true,
502
+ "prefixItems": [
503
+ { "const": "get_file" }, { "const": "get_issue" },
504
+ { "const": "list_issues" }, { "const": "search_code" },
505
+ { "const": "get_commit" }, { "const": "get_pull_request" },
506
+ { "const": "list_pull_request_files" }, { "const": "list_check_runs" },
507
+ { "const": "get_workflow_run" }, { "const": "list_workflow_jobs" },
508
+ { "const": "list_file_commits" }, { "const": "get_release" },
509
+ { "const": "list_deployments" }
510
+ ],
511
+ "items": false
512
+ },
513
+ "sharedTools6": {
514
+ "type": "array",
515
+ "minItems": 6,
516
+ "maxItems": 6,
517
+ "uniqueItems": true,
518
+ "prefixItems": [
519
+ { "const": "add_comment" }, { "const": "create_issue" },
520
+ { "const": "get_file" }, { "const": "get_issue" },
521
+ { "const": "list_issues" }, { "const": "search_code" }
522
+ ],
523
+ "items": false
524
+ },
525
+ "sharedReads4": {
526
+ "type": "array",
527
+ "minItems": 4,
528
+ "maxItems": 4,
529
+ "uniqueItems": true,
530
+ "prefixItems": [
531
+ { "const": "get_file" }, { "const": "get_issue" },
532
+ { "const": "list_issues" }, { "const": "search_code" }
533
+ ],
534
+ "items": false
535
+ },
536
+ "githubContract": {
537
+ "type": "object",
538
+ "additionalProperties": false,
539
+ "required": [
540
+ "abi", "userAgentVersion", "sharedManifestVersion", "totalCount",
541
+ "readCount", "tools", "readTools", "shared"
542
+ ],
543
+ "properties": {
544
+ "abi": {
545
+ "type": "object",
546
+ "additionalProperties": false,
547
+ "required": ["schemaVersion", "catalogVersion"],
548
+ "properties": {
549
+ "schemaVersion": { "const": "1.0.0" },
550
+ "catalogVersion": { "const": "0.2.0" }
551
+ }
552
+ },
553
+ "userAgentVersion": { "const": "0.2.0" },
554
+ "sharedManifestVersion": { "const": "0.1.0" },
555
+ "totalCount": { "const": 15 },
556
+ "readCount": { "const": 13 },
557
+ "tools": { "$ref": "#/$defs/tools15" },
558
+ "readTools": { "$ref": "#/$defs/reads13" },
559
+ "shared": {
560
+ "type": "object",
561
+ "additionalProperties": false,
562
+ "required": ["totalCount", "readCount", "tools", "readTools"],
563
+ "properties": {
564
+ "totalCount": { "const": 6 },
565
+ "readCount": { "const": 4 },
566
+ "tools": { "$ref": "#/$defs/sharedTools6" },
567
+ "readTools": { "$ref": "#/$defs/sharedReads4" }
568
+ }
569
+ }
570
+ }
571
+ },
572
+ "sourceEvidence": {
573
+ "type": "object",
574
+ "additionalProperties": false,
575
+ "required": [
576
+ "repository", "headCommit", "treeSha", "mergeBase", "revisionCommand",
577
+ "range", "checkout", "clean", "trustedVerifierCommit", "rawResultSha256"
578
+ ],
579
+ "properties": {
580
+ "repository": { "const": "https://github.com/enkyuan/alloy.git" },
581
+ "headCommit": { "$ref": "#/$defs/hex40" },
582
+ "treeSha": { "$ref": "#/$defs/hex40" },
583
+ "mergeBase": { "$ref": "#/$defs/hex40" },
584
+ "revisionCommand": {
585
+ "type": "array",
586
+ "minItems": 5,
587
+ "maxItems": 5,
588
+ "prefixItems": [
589
+ { "const": "git" }, { "const": "rev-list" },
590
+ { "const": "--reverse" }, { "const": "--topo-order" },
591
+ { "$ref": "#/$defs/rangeSpec" }
592
+ ],
593
+ "items": false
594
+ },
595
+ "range": {
596
+ "type": "array",
597
+ "items": { "$ref": "#/$defs/hex40" },
598
+ "uniqueItems": true
599
+ },
600
+ "checkout": { "const": "separate-fetch-depth-0" },
601
+ "clean": { "const": true },
602
+ "trustedVerifierCommit": { "$ref": "#/$defs/hex40" },
603
+ "rawResultSha256": { "$ref": "#/$defs/hex64" }
604
+ }
605
+ },
606
+ "commitSignature": {
607
+ "type": "object",
608
+ "additionalProperties": false,
609
+ "required": ["sha", "verified", "reason", "signerEmail", "payloadSha256"],
610
+ "properties": {
611
+ "sha": { "$ref": "#/$defs/hex40" },
612
+ "verified": { "const": true },
613
+ "reason": { "const": "valid" },
614
+ "signerEmail": { "$ref": "#/$defs/email" },
615
+ "payloadSha256": { "$ref": "#/$defs/hex64" }
616
+ }
617
+ },
618
+ "tagSignature": {
619
+ "type": "object",
620
+ "additionalProperties": false,
621
+ "required": [
622
+ "name", "objectSha", "targetCommit", "taggerEmail", "verified", "reason"
623
+ ],
624
+ "properties": {
625
+ "name": { "$ref": "#/$defs/tagName" },
626
+ "objectSha": { "$ref": "#/$defs/hex40" },
627
+ "targetCommit": { "$ref": "#/$defs/hex40" },
628
+ "taggerEmail": { "$ref": "#/$defs/email" },
629
+ "verified": { "const": true },
630
+ "reason": { "const": "valid" }
631
+ }
632
+ },
633
+ "signatureEvidenceCommit": {
634
+ "type": "object",
635
+ "additionalProperties": false,
636
+ "required": [
637
+ "identityField", "approvedSignerEmail", "verifierSource", "headCommit",
638
+ "treeSha", "verifierCommit", "verifierScriptSha256", "mergeBase", "range",
639
+ "commits", "rawResultSha256", "mechanism"
640
+ ],
641
+ "properties": {
642
+ "identityField": { "const": "gitCommit.committer.email" },
643
+ "approvedSignerEmail": { "$ref": "#/$defs/email" },
644
+ "verifierSource": { "const": "trusted-default-branch" },
645
+ "headCommit": { "$ref": "#/$defs/hex40" },
646
+ "treeSha": { "$ref": "#/$defs/hex40" },
647
+ "verifierCommit": { "$ref": "#/$defs/hex40" },
648
+ "verifierScriptSha256": { "$ref": "#/$defs/hex64" },
649
+ "mergeBase": { "$ref": "#/$defs/hex40" },
650
+ "range": {
651
+ "type": "array",
652
+ "items": { "$ref": "#/$defs/hex40" },
653
+ "uniqueItems": true
654
+ },
655
+ "commits": {
656
+ "type": "array",
657
+ "minItems": 1,
658
+ "items": { "$ref": "#/$defs/commitSignature" },
659
+ "uniqueItems": true
660
+ },
661
+ "rawResultSha256": { "$ref": "#/$defs/hex64" },
662
+ "mechanism": { "const": "github-rest-commit-verification" }
663
+ }
664
+ },
665
+ "signatureEvidenceTag": {
666
+ "type": "object",
667
+ "additionalProperties": false,
668
+ "required": [
669
+ "identityField", "approvedSignerEmail", "verifierSource", "headCommit",
670
+ "treeSha", "verifierCommit", "verifierScriptSha256", "mergeBase", "range",
671
+ "commits", "rawResultSha256", "mechanism", "tag"
672
+ ],
673
+ "properties": {
674
+ "identityField": { "const": "gitCommit.committer.email" },
675
+ "approvedSignerEmail": { "$ref": "#/$defs/email" },
676
+ "verifierSource": { "const": "trusted-default-branch" },
677
+ "headCommit": { "$ref": "#/$defs/hex40" },
678
+ "treeSha": { "$ref": "#/$defs/hex40" },
679
+ "verifierCommit": { "$ref": "#/$defs/hex40" },
680
+ "verifierScriptSha256": { "$ref": "#/$defs/hex64" },
681
+ "mergeBase": { "$ref": "#/$defs/hex40" },
682
+ "range": {
683
+ "type": "array",
684
+ "items": { "$ref": "#/$defs/hex40" },
685
+ "uniqueItems": true
686
+ },
687
+ "commits": {
688
+ "type": "array",
689
+ "minItems": 1,
690
+ "items": { "$ref": "#/$defs/commitSignature" },
691
+ "uniqueItems": true
692
+ },
693
+ "rawResultSha256": { "$ref": "#/$defs/hex64" },
694
+ "mechanism": { "const": "github-rest-commit-and-annotated-tag-verification" },
695
+ "tag": { "$ref": "#/$defs/tagSignature" }
696
+ }
697
+ },
698
+ "signatureEvidence": {
699
+ "oneOf": [
700
+ { "$ref": "#/$defs/signatureEvidenceCommit" },
701
+ { "$ref": "#/$defs/signatureEvidenceTag" }
702
+ ]
703
+ },
704
+ "packEvidence": {
705
+ "type": "object",
706
+ "additionalProperties": false,
707
+ "required": [
708
+ "mode", "package", "artifact", "toolchain", "construction",
709
+ "reproducibility", "registry", "sourceTreeRecheck"
710
+ ],
711
+ "properties": {
712
+ "mode": { "enum": ["release", "internal-evaluation"] },
713
+ "package": {
714
+ "type": "object",
715
+ "additionalProperties": false,
716
+ "required": ["name", "version"],
717
+ "properties": {
718
+ "name": { "const": "kaji" },
719
+ "version": { "$ref": "#/$defs/semver" }
720
+ }
721
+ },
722
+ "artifact": {
723
+ "type": "object",
724
+ "additionalProperties": false,
725
+ "required": ["filename", "size", "npmIntegrity"],
726
+ "properties": {
727
+ "filename": { "$ref": "#/$defs/basename" },
728
+ "size": { "$ref": "#/$defs/positiveInt" },
729
+ "npmIntegrity": { "$ref": "#/$defs/npmSha512" }
730
+ }
731
+ },
732
+ "toolchain": { "$ref": "#/$defs/toolchain" },
733
+ "construction": { "$ref": "#/$defs/construction" },
734
+ "reproducibility": { "$ref": "#/$defs/reproducibility" },
735
+ "registry": {
736
+ "oneOf": [
737
+ {
738
+ "type": "object",
739
+ "additionalProperties": false,
740
+ "required": ["status"],
741
+ "properties": { "status": { "const": "version-unused" } }
742
+ },
743
+ {
744
+ "type": "object",
745
+ "additionalProperties": false,
746
+ "required": ["status"],
747
+ "properties": { "status": { "const": "package-absent" } }
748
+ },
749
+ {
750
+ "type": "object",
751
+ "additionalProperties": false,
752
+ "required": ["status"],
753
+ "properties": { "status": { "const": "not-claimed" } }
754
+ }
755
+ ]
756
+ },
757
+ "sourceTreeRecheck": { "const": "passed" }
758
+ }
759
+ },
760
+ "toolchain": {
761
+ "type": "object",
762
+ "additionalProperties": false,
763
+ "required": ["node", "npm", "bun", "uv"],
764
+ "properties": {
765
+ "node": { "$ref": "#/$defs/semver" },
766
+ "npm": { "$ref": "#/$defs/semver" },
767
+ "bun": { "$ref": "#/$defs/semver" },
768
+ "uv": { "$ref": "#/$defs/semver" }
769
+ }
770
+ },
771
+ "passedCheck": {
772
+ "type": "object",
773
+ "additionalProperties": false,
774
+ "required": ["id", "result"],
775
+ "properties": {
776
+ "id": { "type": "string" },
777
+ "result": { "const": "passed" }
778
+ }
779
+ },
780
+ "artifactSubchecks16": {
781
+ "type": "array",
782
+ "minItems": 16,
783
+ "maxItems": 16,
784
+ "uniqueItems": true,
785
+ "prefixItems": [
786
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "safe-packlist", "result": "passed" } }] },
787
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "source-byte-equality", "result": "passed" } }] },
788
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "export-targets", "result": "passed" } }] },
789
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "declarations", "result": "passed" } }] },
790
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "typescript-5.7.3-mts", "result": "passed" } }] },
791
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "typescript-5.7.3-cts", "result": "passed" } }] },
792
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "typescript-current-mts", "result": "passed" } }] },
793
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "typescript-current-cts", "result": "passed" } }] },
794
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "npm-install", "result": "passed" } }] },
795
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "bun-install", "result": "passed" } }] },
796
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "public-github-surface", "result": "passed" } }] },
797
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "typescript-catalog-15-13", "result": "passed" } }] },
798
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "shared-python-catalog-6-4", "result": "passed" } }] },
799
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "lifecycle-identity", "result": "passed" } }] },
800
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "policy-before-token", "result": "passed" } }] },
801
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "packaged-license", "result": "passed" } }] }
802
+ ],
803
+ "items": false
804
+ },
805
+ "artifactContractEvidence": {
806
+ "type": "object",
807
+ "additionalProperties": false,
808
+ "required": [
809
+ "subchecks", "packlist", "package", "typescript", "installs", "catalogs",
810
+ "lifecycle", "policy", "license"
811
+ ],
812
+ "properties": {
813
+ "subchecks": { "$ref": "#/$defs/artifactSubchecks16" },
814
+ "packlist": {
815
+ "type": "object",
816
+ "additionalProperties": false,
817
+ "required": ["memberCount", "membersSha256"],
818
+ "properties": {
819
+ "memberCount": { "$ref": "#/$defs/positiveInt" },
820
+ "membersSha256": { "$ref": "#/$defs/hex64" }
821
+ }
822
+ },
823
+ "package": {
824
+ "type": "object",
825
+ "additionalProperties": false,
826
+ "required": ["exports", "publicSymbols"],
827
+ "properties": {
828
+ "exports": { "$ref": "#/$defs/exactExports" },
829
+ "publicSymbols": { "$ref": "#/$defs/githubSymbols4" }
830
+ }
831
+ },
832
+ "typescript": {
833
+ "type": "object",
834
+ "additionalProperties": false,
835
+ "required": ["minimumVersion", "currentVersion"],
836
+ "properties": {
837
+ "minimumVersion": { "const": "5.7.3" },
838
+ "currentVersion": { "$ref": "#/$defs/semver" }
839
+ }
840
+ },
841
+ "installs": {
842
+ "type": "object",
843
+ "additionalProperties": false,
844
+ "required": ["npm", "bun"],
845
+ "properties": {
846
+ "npm": { "$ref": "#/$defs/installEvidence" },
847
+ "bun": { "$ref": "#/$defs/installEvidence" }
848
+ }
849
+ },
850
+ "catalogs": {
851
+ "type": "object",
852
+ "additionalProperties": false,
853
+ "required": ["typescript", "shared"],
854
+ "properties": {
855
+ "typescript": { "$ref": "#/$defs/typescriptCatalog" },
856
+ "shared": { "$ref": "#/$defs/sharedCatalog" }
857
+ }
858
+ },
859
+ "lifecycle": {
860
+ "type": "object",
861
+ "additionalProperties": false,
862
+ "required": ["githubFailure", "syntheticCompletion"],
863
+ "properties": {
864
+ "githubFailure": { "$ref": "#/$defs/githubFailureLifecycle" },
865
+ "syntheticCompletion": { "$ref": "#/$defs/syntheticCompletionLifecycle" }
866
+ }
867
+ },
868
+ "policy": { "$ref": "#/$defs/policyEvidence" },
869
+ "license": {
870
+ "type": "object",
871
+ "additionalProperties": false,
872
+ "required": ["id", "sha256"],
873
+ "properties": {
874
+ "id": { "const": "FSL-1.1-ALv2" },
875
+ "sha256": { "$ref": "#/$defs/hex64" }
876
+ }
877
+ }
878
+ }
879
+ },
880
+ "installEvidence": {
881
+ "type": "object",
882
+ "additionalProperties": false,
883
+ "required": ["artifactSha256", "realCopy"],
884
+ "properties": {
885
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
886
+ "realCopy": { "const": true }
887
+ }
888
+ },
889
+ "typescriptCatalog": {
890
+ "type": "object",
891
+ "additionalProperties": false,
892
+ "required": [
893
+ "schemaVersion", "catalogVersion", "totalCount", "readCount", "tools", "readTools"
894
+ ],
895
+ "properties": {
896
+ "schemaVersion": { "const": "1.0.0" },
897
+ "catalogVersion": { "const": "0.2.0" },
898
+ "totalCount": { "const": 15 },
899
+ "readCount": { "const": 13 },
900
+ "tools": { "$ref": "#/$defs/tools15" },
901
+ "readTools": { "$ref": "#/$defs/reads13" }
902
+ }
903
+ },
904
+ "sharedCatalog": {
905
+ "type": "object",
906
+ "additionalProperties": false,
907
+ "required": ["manifestVersion", "totalCount", "readCount", "tools", "readTools"],
908
+ "properties": {
909
+ "manifestVersion": { "const": "0.1.0" },
910
+ "totalCount": { "const": 6 },
911
+ "readCount": { "const": 4 },
912
+ "tools": { "$ref": "#/$defs/sharedTools6" },
913
+ "readTools": { "$ref": "#/$defs/sharedReads4" }
914
+ }
915
+ },
916
+ "githubFailureLifecycle": {
917
+ "type": "object",
918
+ "additionalProperties": false,
919
+ "required": ["stages", "providerAlias", "catalogName", "sameIdentityAtEveryStage"],
920
+ "properties": {
921
+ "stages": {
922
+ "type": "array",
923
+ "minItems": 3,
924
+ "maxItems": 3,
925
+ "prefixItems": [
926
+ { "const": "requested" }, { "const": "started" }, { "const": "failed" }
927
+ ],
928
+ "items": false
929
+ },
930
+ "providerAlias": { "$ref": "#/$defs/nonEmptyString" },
931
+ "catalogName": { "const": "github.get_file" },
932
+ "sameIdentityAtEveryStage": { "const": true }
933
+ }
934
+ },
935
+ "syntheticCompletionLifecycle": {
936
+ "type": "object",
937
+ "additionalProperties": false,
938
+ "required": ["stages", "providerAlias", "catalogName", "sameIdentityAtEveryStage"],
939
+ "properties": {
940
+ "stages": {
941
+ "type": "array",
942
+ "minItems": 3,
943
+ "maxItems": 3,
944
+ "prefixItems": [
945
+ { "const": "requested" }, { "const": "started" }, { "const": "completed" }
946
+ ],
947
+ "items": false
948
+ },
949
+ "providerAlias": { "$ref": "#/$defs/nonEmptyString" },
950
+ "catalogName": { "const": "synthetic.complete" },
951
+ "sameIdentityAtEveryStage": { "const": true }
952
+ }
953
+ },
954
+ "policyEvidence": {
955
+ "type": "object",
956
+ "additionalProperties": false,
957
+ "required": ["testFile", "testName", "tokenLookups", "requestAttempts"],
958
+ "properties": {
959
+ "testFile": { "const": "kaji/packages/ts/tests/github-registry.test.ts" },
960
+ "testName": {
961
+ "const": "rejects approval for github_create_issue before token or HTTP"
962
+ },
963
+ "tokenLookups": { "const": 0 },
964
+ "requestAttempts": { "const": 0 }
965
+ }
966
+ },
967
+ "nodeChecks4": {
968
+ "type": "array",
969
+ "minItems": 4,
970
+ "maxItems": 4,
971
+ "uniqueItems": true,
972
+ "prefixItems": [
973
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "npm-install", "result": "passed" } }] },
974
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "esm-import", "result": "passed" } }] },
975
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "commonjs-require", "result": "passed" } }] },
976
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "catalog-15-13", "result": "passed" } }] }
977
+ ],
978
+ "items": false
979
+ },
980
+ "node22Evidence": {
981
+ "type": "object",
982
+ "additionalProperties": false,
983
+ "required": [
984
+ "nodeMajor", "nodeVersion", "npmVersion", "installedArtifactSha256", "realCopy", "checks"
985
+ ],
986
+ "properties": {
987
+ "nodeMajor": { "const": 22 },
988
+ "nodeVersion": { "$ref": "#/$defs/semver" },
989
+ "npmVersion": { "$ref": "#/$defs/semver" },
990
+ "installedArtifactSha256": { "$ref": "#/$defs/hex64" },
991
+ "realCopy": { "const": true },
992
+ "checks": { "$ref": "#/$defs/nodeChecks4" }
993
+ }
994
+ },
995
+ "node24Evidence": {
996
+ "type": "object",
997
+ "additionalProperties": false,
998
+ "required": [
999
+ "nodeMajor", "nodeVersion", "npmVersion", "installedArtifactSha256", "realCopy", "checks"
1000
+ ],
1001
+ "properties": {
1002
+ "nodeMajor": { "const": 24 },
1003
+ "nodeVersion": { "$ref": "#/$defs/semver" },
1004
+ "npmVersion": { "$ref": "#/$defs/semver" },
1005
+ "installedArtifactSha256": { "$ref": "#/$defs/hex64" },
1006
+ "realCopy": { "const": true },
1007
+ "checks": { "$ref": "#/$defs/nodeChecks4" }
1008
+ }
1009
+ },
1010
+ "receiptDigests6": {
1011
+ "type": "object",
1012
+ "additionalProperties": false,
1013
+ "required": [
1014
+ "sourceEquivalence", "signatureVerification", "packOnce",
1015
+ "artifactContract", "node22", "node24"
1016
+ ],
1017
+ "properties": {
1018
+ "sourceEquivalence": { "$ref": "#/$defs/hex64" },
1019
+ "signatureVerification": { "$ref": "#/$defs/hex64" },
1020
+ "packOnce": { "$ref": "#/$defs/hex64" },
1021
+ "artifactContract": { "$ref": "#/$defs/hex64" },
1022
+ "node22": { "$ref": "#/$defs/hex64" },
1023
+ "node24": { "$ref": "#/$defs/hex64" }
1024
+ }
1025
+ },
1026
+ "releaseChecks6": {
1027
+ "type": "array",
1028
+ "minItems": 6,
1029
+ "maxItems": 6,
1030
+ "uniqueItems": true,
1031
+ "prefixItems": [
1032
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "source-policy", "result": "passed" } }] },
1033
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "toolchain-policy", "result": "passed" } }] },
1034
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "registry-policy", "result": "passed" } }] },
1035
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "runtime-evidence-split", "result": "passed" } }] },
1036
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "artifact-policy", "result": "passed" } }] },
1037
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "license-policy", "result": "passed" } }] }
1038
+ ],
1039
+ "items": false
1040
+ },
1041
+ "internalChecks5": {
1042
+ "type": "array",
1043
+ "minItems": 5,
1044
+ "maxItems": 5,
1045
+ "uniqueItems": true,
1046
+ "prefixItems": [
1047
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "source-policy", "result": "passed" } }] },
1048
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "toolchain-policy", "result": "passed" } }] },
1049
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "runtime-evidence-split", "result": "passed" } }] },
1050
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "artifact-policy", "result": "passed" } }] },
1051
+ { "allOf": [{ "$ref": "#/$defs/passedCheck" }, { "const": { "id": "license-policy", "result": "passed" } }] }
1052
+ ],
1053
+ "items": false
1054
+ },
1055
+ "releaseGateEvidence": {
1056
+ "type": "object",
1057
+ "additionalProperties": false,
1058
+ "required": [
1059
+ "mode", "registry", "signerWorkflow", "toolchain", "publicReleaseClaim",
1060
+ "licenseUseClaim", "receiptSha256", "checks"
1061
+ ],
1062
+ "properties": {
1063
+ "mode": { "const": "release" },
1064
+ "registry": { "enum": ["version-unused", "package-absent"] },
1065
+ "signerWorkflow": { "$ref": "#/$defs/signerWorkflowIdentity" },
1066
+ "toolchain": {
1067
+ "type": "object",
1068
+ "additionalProperties": false,
1069
+ "required": ["node", "npm", "bun", "uv"],
1070
+ "properties": {
1071
+ "node": { "$ref": "#/$defs/semver" },
1072
+ "npm": { "$ref": "#/$defs/semver" },
1073
+ "bun": { "const": "1.3.11" },
1074
+ "uv": { "const": "0.11.25" }
1075
+ }
1076
+ },
1077
+ "publicReleaseClaim": { "const": "eligible" },
1078
+ "licenseUseClaim": { "const": "permitted-purpose-only" },
1079
+ "receiptSha256": { "$ref": "#/$defs/receiptDigests6" },
1080
+ "checks": { "$ref": "#/$defs/releaseChecks6" }
1081
+ }
1082
+ },
1083
+ "internalGateEvidence": {
1084
+ "type": "object",
1085
+ "additionalProperties": false,
1086
+ "required": [
1087
+ "mode", "registry", "signerWorkflow", "toolchain", "publicReleaseClaim",
1088
+ "licenseUseClaim", "receiptSha256", "checks"
1089
+ ],
1090
+ "properties": {
1091
+ "mode": { "const": "internal-evaluation" },
1092
+ "registry": { "const": "not-claimed" },
1093
+ "signerWorkflow": { "$ref": "#/$defs/signerWorkflowIdentity" },
1094
+ "toolchain": { "$ref": "#/$defs/toolchain" },
1095
+ "publicReleaseClaim": { "const": "not-claimed" },
1096
+ "licenseUseClaim": { "const": "permitted-purpose-only" },
1097
+ "receiptSha256": { "$ref": "#/$defs/receiptDigests6" },
1098
+ "checks": { "$ref": "#/$defs/internalChecks5" }
1099
+ }
1100
+ },
1101
+ "sourceReceipt": {
1102
+ "type": "object",
1103
+ "additionalProperties": false,
1104
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1105
+ "properties": {
1106
+ "id": { "const": "source-equivalence" },
1107
+ "result": { "const": "passed" },
1108
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1109
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1110
+ "evidence": { "$ref": "#/$defs/sourceEvidence" }
1111
+ }
1112
+ },
1113
+ "signatureReceipt": {
1114
+ "type": "object",
1115
+ "additionalProperties": false,
1116
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1117
+ "properties": {
1118
+ "id": { "const": "signature-verification" },
1119
+ "result": { "const": "passed" },
1120
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1121
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1122
+ "evidence": { "$ref": "#/$defs/signatureEvidence" }
1123
+ }
1124
+ },
1125
+ "packReceipt": {
1126
+ "type": "object",
1127
+ "additionalProperties": false,
1128
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1129
+ "properties": {
1130
+ "id": { "const": "pack-once" },
1131
+ "result": { "const": "passed" },
1132
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1133
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1134
+ "evidence": { "$ref": "#/$defs/packEvidence" }
1135
+ }
1136
+ },
1137
+ "artifactContractReceipt": {
1138
+ "type": "object",
1139
+ "additionalProperties": false,
1140
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1141
+ "properties": {
1142
+ "id": { "const": "artifact-contract" },
1143
+ "result": { "const": "passed" },
1144
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1145
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1146
+ "evidence": { "$ref": "#/$defs/artifactContractEvidence" }
1147
+ }
1148
+ },
1149
+ "node22Receipt": {
1150
+ "type": "object",
1151
+ "additionalProperties": false,
1152
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1153
+ "properties": {
1154
+ "id": { "const": "node-22" },
1155
+ "result": { "const": "passed" },
1156
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1157
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1158
+ "evidence": { "$ref": "#/$defs/node22Evidence" }
1159
+ }
1160
+ },
1161
+ "node24Receipt": {
1162
+ "type": "object",
1163
+ "additionalProperties": false,
1164
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1165
+ "properties": {
1166
+ "id": { "const": "node-24" },
1167
+ "result": { "const": "passed" },
1168
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1169
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1170
+ "evidence": { "$ref": "#/$defs/node24Evidence" }
1171
+ }
1172
+ },
1173
+ "releaseGateReceipt": {
1174
+ "type": "object",
1175
+ "additionalProperties": false,
1176
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1177
+ "properties": {
1178
+ "id": { "const": "release-gate" },
1179
+ "result": { "const": "passed" },
1180
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1181
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1182
+ "evidence": { "$ref": "#/$defs/releaseGateEvidence" }
1183
+ }
1184
+ },
1185
+ "internalGateReceipt": {
1186
+ "type": "object",
1187
+ "additionalProperties": false,
1188
+ "required": ["id", "result", "sourceCommit", "artifactSha256", "evidence"],
1189
+ "properties": {
1190
+ "id": { "const": "internal-evaluation-gate" },
1191
+ "result": { "const": "passed" },
1192
+ "sourceCommit": { "$ref": "#/$defs/hex40" },
1193
+ "artifactSha256": { "$ref": "#/$defs/hex64" },
1194
+ "evidence": { "$ref": "#/$defs/internalGateEvidence" }
1195
+ }
1196
+ },
1197
+ "sevenReceipts": {
1198
+ "type": "array",
1199
+ "minItems": 7,
1200
+ "maxItems": 7,
1201
+ "uniqueItems": true,
1202
+ "prefixItems": [
1203
+ { "$ref": "#/$defs/sourceReceipt" },
1204
+ { "$ref": "#/$defs/signatureReceipt" },
1205
+ { "$ref": "#/$defs/packReceipt" },
1206
+ { "$ref": "#/$defs/artifactContractReceipt" },
1207
+ { "$ref": "#/$defs/node22Receipt" },
1208
+ { "$ref": "#/$defs/node24Receipt" },
1209
+ {
1210
+ "oneOf": [
1211
+ { "$ref": "#/$defs/releaseGateReceipt" },
1212
+ { "$ref": "#/$defs/internalGateReceipt" }
1213
+ ]
1214
+ }
1215
+ ],
1216
+ "items": false
1217
+ },
1218
+ "securityEvidence": {
1219
+ "type": "object",
1220
+ "additionalProperties": false,
1221
+ "required": ["policyBeforeRequest"],
1222
+ "properties": {
1223
+ "policyBeforeRequest": {
1224
+ "type": "object",
1225
+ "additionalProperties": false,
1226
+ "required": [
1227
+ "testFile", "testName", "result", "tokenLookups", "requestAttempts"
1228
+ ],
1229
+ "properties": {
1230
+ "testFile": { "const": "kaji/packages/ts/tests/github-registry.test.ts" },
1231
+ "testName": {
1232
+ "const": "rejects approval for github_create_issue before token or HTTP"
1233
+ },
1234
+ "result": { "const": "passed" },
1235
+ "tokenLookups": { "const": 0 },
1236
+ "requestAttempts": { "const": 0 }
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ "license": {
1242
+ "type": "object",
1243
+ "additionalProperties": false,
1244
+ "required": [
1245
+ "id", "file", "sha256", "competingUseApproved", "futureLicense",
1246
+ "futureLicenseAfter"
1247
+ ],
1248
+ "properties": {
1249
+ "id": { "const": "FSL-1.1-ALv2" },
1250
+ "file": { "const": "LICENSE" },
1251
+ "sha256": { "$ref": "#/$defs/hex64" },
1252
+ "competingUseApproved": { "const": false },
1253
+ "futureLicense": { "const": "Apache-2.0" },
1254
+ "futureLicenseAfter": { "const": "second-anniversary" }
1255
+ }
1256
+ },
1257
+ "failure": {
1258
+ "type": "object",
1259
+ "additionalProperties": false,
1260
+ "required": [
1261
+ "schemaVersion", "command", "result", "failureCode", "sourceCommit", "artifactSha256"
1262
+ ],
1263
+ "properties": {
1264
+ "schemaVersion": { "const": 1 },
1265
+ "command": {
1266
+ "enum": ["source-verify", "preflight", "stage", "finalize", "validate", "import"]
1267
+ },
1268
+ "result": { "const": "failed" },
1269
+ "failureCode": {
1270
+ "enum": [
1271
+ "INVALID_ARGUMENT", "UNSAFE_PATH", "OUTPUT_EXISTS", "SOURCE_NOT_ISOLATED",
1272
+ "SOURCE_DIRTY", "SOURCE_COMMIT_MISMATCH", "TRUSTED_VERIFIER_NOT_ON_DEFAULT",
1273
+ "SIGNATURE_RANGE_EMPTY", "SIGNATURE_INVALID", "SIGNER_NOT_APPROVED", "TAG_INVALID",
1274
+ "TOOLCHAIN_MISMATCH", "REGISTRY_UNAVAILABLE", "BUILD_FAILED", "PACK_FAILED",
1275
+ "PACK_COUNT_INVALID", "ARTIFACT_CHANGED", "RECEIPT_INVALID", "SCHEMA_INVALID",
1276
+ "VALIDATION_FAILED", "TRANSPORT_UNTRUSTED", "ATTESTATION_INVALID",
1277
+ "IMPORT_COLLISION", "INTERNAL_ERROR"
1278
+ ]
1279
+ },
1280
+ "sourceCommit": {
1281
+ "oneOf": [{ "$ref": "#/$defs/hex40" }, { "type": "null" }]
1282
+ },
1283
+ "artifactSha256": {
1284
+ "oneOf": [{ "$ref": "#/$defs/hex64" }, { "type": "null" }]
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }