release-skill 0.9.15 → 0.9.17

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 (164) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codebuddy-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/.kimi-plugin/plugin.json +1 -1
  5. package/.qoder-plugin/plugin.json +10 -0
  6. package/CHANGELOG.md +61 -0
  7. package/INSTALL.md +57 -9
  8. package/INSTALL.zh-CN.md +44 -7
  9. package/README.md +88 -29
  10. package/README.zh-CN.md +70 -27
  11. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  12. package/adapters/claude/bin/release-skill.bundle.mjs +1471 -672
  13. package/adapters/claude/schemas/release-plan.schema.json +1 -1
  14. package/adapters/claude/schemas/release-project.schema.json +19 -1
  15. package/adapters/claude/skills/release-finish/SKILL.md +65 -6
  16. package/adapters/claude/skills/release-help/SKILL.md +3 -3
  17. package/adapters/claude/skills/release-verify/SKILL.md +2 -2
  18. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  19. package/adapters/codex/bin/release-skill.bundle.mjs +1471 -672
  20. package/adapters/codex/schemas/release-plan.schema.json +1 -1
  21. package/adapters/codex/schemas/release-project.schema.json +19 -1
  22. package/adapters/codex/skills/release-finish/SKILL.md +65 -6
  23. package/adapters/codex/skills/release-help/SKILL.md +3 -3
  24. package/adapters/codex/skills/release-verify/SKILL.md +2 -2
  25. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  26. package/adapters/kimi/bin/release-skill.bundle.mjs +1471 -672
  27. package/adapters/kimi/schemas/release-plan.schema.json +1 -1
  28. package/adapters/kimi/schemas/release-project.schema.json +19 -1
  29. package/adapters/kimi/skills/release-finish/SKILL.md +65 -6
  30. package/adapters/kimi/skills/release-help/SKILL.md +3 -3
  31. package/adapters/kimi/skills/release-verify/SKILL.md +2 -2
  32. package/adapters/qoder/.qoder-plugin/plugin.json +10 -0
  33. package/adapters/qoder/bin/consumer-contract-vectors.json +110 -0
  34. package/adapters/qoder/bin/error-codes.json +161 -0
  35. package/adapters/qoder/bin/foundation-legal/skill-family-contracts/LICENSE +202 -0
  36. package/adapters/qoder/bin/foundation-legal/skill-family-contracts/NOTICE +10 -0
  37. package/adapters/qoder/bin/foundation-legal/skill-family-engineering-kit/LICENSE +202 -0
  38. package/adapters/qoder/bin/foundation-legal/skill-family-engineering-kit/NOTICE +10 -0
  39. package/adapters/qoder/bin/foundation-legal/skill-family-engineering-kit/THIRD_PARTY_NOTICES +142 -0
  40. package/adapters/qoder/bin/foundation-legal/skill-family-harness-node/LICENSE +202 -0
  41. package/adapters/qoder/bin/foundation-legal/skill-family-harness-node/NOTICE +10 -0
  42. package/adapters/qoder/bin/foundation-legal/skill-family-harness-node/native-NOTICE +2 -0
  43. package/adapters/qoder/bin/foundation-resource-binding.json +1 -0
  44. package/adapters/qoder/bin/kernel-protocol.json +60 -0
  45. package/adapters/qoder/bin/license-texts/Apache-2.0.txt +201 -0
  46. package/adapters/qoder/bin/license-texts/MIT.txt +21 -0
  47. package/adapters/qoder/bin/prebuild-manifest.json +79 -0
  48. package/adapters/qoder/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  49. package/adapters/qoder/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  50. package/adapters/qoder/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  51. package/adapters/qoder/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  52. package/adapters/qoder/bin/registry.json +347 -0
  53. package/adapters/qoder/bin/release-skill-local-finish.mjs +4 -0
  54. package/adapters/qoder/bin/release-skill.bundle.mjs +149446 -0
  55. package/adapters/qoder/bin/release-skill.mjs +54 -0
  56. package/adapters/qoder/bin/rules.json +104 -0
  57. package/adapters/qoder/bin/schemas/consumer-contract-vector.schema.json +149 -0
  58. package/adapters/qoder/data/hosts/claude/host-descriptor.json +45 -0
  59. package/adapters/qoder/data/hosts/codebuddy/host-descriptor.json +26 -0
  60. package/adapters/qoder/data/hosts/codex/host-descriptor.json +45 -0
  61. package/adapters/qoder/data/hosts/deepseek-harness/host-descriptor.json +23 -0
  62. package/adapters/qoder/data/hosts/kimi-code/host-descriptor.json +36 -0
  63. package/adapters/qoder/data/hosts/qoder/host-descriptor.json +26 -0
  64. package/adapters/qoder/data/hosts/registry.json +13 -0
  65. package/adapters/qoder/data/hosts/workbuddy/host-descriptor.json +34 -0
  66. package/adapters/qoder/data/licensing/registry.json +211 -0
  67. package/adapters/qoder/data/licensing/schema.json +207 -0
  68. package/adapters/qoder/native/safe-write/binding.gyp +41 -0
  69. package/adapters/qoder/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  70. package/adapters/qoder/native/safe-write/prebuilds.json +24 -0
  71. package/adapters/qoder/native/safe-write/src/safe_write.cc +2032 -0
  72. package/adapters/qoder/schemas/.render-manifest.json +41 -0
  73. package/adapters/qoder/schemas/approval-record.schema.json +115 -0
  74. package/adapters/qoder/schemas/artifact-lock.schema.json +111 -0
  75. package/adapters/qoder/schemas/artifact-plan.schema.json +52 -0
  76. package/adapters/qoder/schemas/artifact-policy.schema.json +76 -0
  77. package/adapters/qoder/schemas/evidence-event-v2.schema.json +164 -0
  78. package/adapters/qoder/schemas/evidence-event.schema.json +89 -0
  79. package/adapters/qoder/schemas/postpublish-approval-record.schema.json +47 -0
  80. package/adapters/qoder/schemas/release-plan.schema.json +1996 -0
  81. package/adapters/qoder/schemas/release-project.schema.json +1613 -0
  82. package/adapters/qoder/schemas/release-run.schema.json +777 -0
  83. package/adapters/qoder/skills/release-assess/SKILL.md +60 -0
  84. package/adapters/qoder/skills/release-config/SKILL.md +150 -0
  85. package/adapters/qoder/skills/release-docs/SKILL.md +119 -0
  86. package/adapters/qoder/skills/release-finish/SKILL.md +141 -0
  87. package/adapters/qoder/skills/release-help/SKILL.md +153 -0
  88. package/adapters/qoder/skills/release-marketplace/SKILL.md +156 -0
  89. package/adapters/qoder/skills/release-prepare/SKILL.md +135 -0
  90. package/adapters/qoder/skills/release-publish/SKILL.md +91 -0
  91. package/adapters/qoder/skills/release-reconcile/SKILL.md +80 -0
  92. package/adapters/qoder/skills/release-setup/SKILL.md +131 -0
  93. package/adapters/qoder/skills/release-verify/SKILL.md +109 -0
  94. package/adapters/qoder/src/schemas/adapter-build-manifest.schema.json +41 -0
  95. package/adapters/qoder/src/schemas/adapter-peer-verification-request.schema.json +54 -0
  96. package/adapters/qoder/src/schemas/adapter-peer-verification-result.schema.json +54 -0
  97. package/adapters/qoder/src/schemas/adapter-source.schema.json +47 -0
  98. package/adapters/qoder/src/schemas/audit-baseline-pin.schema.json +163 -0
  99. package/adapters/qoder/src/schemas/declared-read-surface-result.schema.json +61 -0
  100. package/adapters/qoder/src/schemas/engineering-baseline.schema.json +77 -0
  101. package/adapters/qoder/src/schemas/executable-identity-observation.schema.json +162 -0
  102. package/adapters/qoder/src/schemas/filesystem-root-binding.schema.json +14 -0
  103. package/adapters/qoder/src/schemas/filesystem-tree-observation.schema.json +71 -0
  104. package/adapters/qoder/src/schemas/fixed-set-publication-manifest.schema.json +108 -0
  105. package/adapters/qoder/src/schemas/fixed-set-publication-receipt.schema.json +148 -0
  106. package/adapters/qoder/src/schemas/host-capability-fact.schema.json +31 -0
  107. package/adapters/qoder/src/schemas/host-descriptor.schema.json +137 -0
  108. package/adapters/qoder/src/schemas/host-operation-plan.schema.json +57 -0
  109. package/adapters/qoder/src/schemas/host-operation-receipt.schema.json +81 -0
  110. package/adapters/qoder/src/schemas/host-probe-result.schema.json +30 -0
  111. package/adapters/qoder/src/schemas/host-registry.schema.json +18 -0
  112. package/adapters/qoder/src/schemas/host-verification-request.schema.json +67 -0
  113. package/adapters/qoder/src/schemas/host-verification-result.schema.json +149 -0
  114. package/adapters/qoder/src/schemas/managed-file-lock.schema.json +77 -0
  115. package/adapters/qoder/src/schemas/migration-manifest.schema.json +412 -0
  116. package/adapters/qoder/src/schemas/observation-scope.schema.json +91 -0
  117. package/adapters/qoder/src/schemas/operation-request.schema.json +58 -0
  118. package/adapters/qoder/src/schemas/operation-result.schema.json +130 -0
  119. package/adapters/qoder/src/schemas/platform-difference-registry.schema.json +110 -0
  120. package/adapters/qoder/src/schemas/plugin-verification-request.schema.json +499 -0
  121. package/adapters/qoder/src/schemas/plugin-verification-result.schema.json +1217 -0
  122. package/adapters/qoder/src/schemas/profile-adoption-declaration.schema.json +111 -0
  123. package/adapters/qoder/src/schemas/profile-descriptor.schema.json +99 -0
  124. package/adapters/qoder/src/schemas/project-manifest.schema.json +67 -0
  125. package/adapters/qoder/src/schemas/project-profile.schema.json +25 -0
  126. package/adapters/qoder/src/schemas/public-boundary-declaration.schema.json +73 -0
  127. package/adapters/qoder/src/schemas/report-binding.schema.json +42 -0
  128. package/adapters/qoder/src/schemas/report-model.schema.json +308 -0
  129. package/adapters/qoder/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  130. package/adapters/qoder/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  131. package/adapters/qoder/src/schemas/source-authority-receipt.schema.json +31 -0
  132. package/adapters/qoder/src/schemas/state-event-envelope.schema.json +38 -0
  133. package/adapters/qoder/src/schemas/state-snapshot-metadata.schema.json +25 -0
  134. package/adapters/qoder/src/schemas/structured-scan-policy.schema.json +97 -0
  135. package/adapters/qoder/src/schemas/surface-scan-policy.schema.json +42 -0
  136. package/adapters/qoder/src/schemas/timeout-policy.schema.json +24 -0
  137. package/adapters/qoder/src/schemas/token-estimate-record.schema.json +75 -0
  138. package/adapters/qoder/src/schemas/token-estimate-result.schema.json +43 -0
  139. package/adapters/qoder/src/schemas/watchdog-termination-envelope.schema.json +156 -0
  140. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  141. package/adapters/workbuddy/bin/release-skill.bundle.mjs +1471 -672
  142. package/adapters/workbuddy/schemas/release-plan.schema.json +1 -1
  143. package/adapters/workbuddy/schemas/release-project.schema.json +19 -1
  144. package/adapters/workbuddy/skills/release-finish/SKILL.md +65 -6
  145. package/adapters/workbuddy/skills/release-help/SKILL.md +3 -3
  146. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -2
  147. package/bin/release-skill-cli.mjs +152 -6
  148. package/bin/release-skill.bundle.mjs +1471 -672
  149. package/package.json +4 -2
  150. package/platform-manifest.json +70 -4
  151. package/references/02-project-config.md +25 -2
  152. package/schemas/release-plan.schema.json +1 -1
  153. package/schemas/release-project.schema.json +19 -1
  154. package/skills/release-finish/SKILL.md +65 -6
  155. package/skills/release-help/SKILL.md +3 -3
  156. package/skills/release-verify/SKILL.md +2 -2
  157. package/skills-src/release-finish/SKILL.md +65 -6
  158. package/skills-src/release-help/SKILL.md +3 -3
  159. package/skills-src/release-verify/SKILL.md +2 -2
  160. package/src/commands/post-release-local.mjs +360 -51
  161. package/src/commands/verify-records.mjs +467 -0
  162. package/src/core/postpublish.mjs +1 -1
  163. package/src/core/run.mjs +1 -1
  164. package/src/producers/build-adapters.mjs +36 -13
@@ -0,0 +1,1217 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://contracts.skill-family.example/v1/plugin-verification-result.json",
4
+ "title": "Plugin verification result",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "kind",
10
+ "operation",
11
+ "status",
12
+ "requestDigest",
13
+ "goal",
14
+ "source",
15
+ "host",
16
+ "facts",
17
+ "reason",
18
+ "requiredActions"
19
+ ],
20
+ "properties": {
21
+ "schemaVersion": {
22
+ "const": 1
23
+ },
24
+ "kind": {
25
+ "const": "skill-family.plugin-verification-result"
26
+ },
27
+ "operation": {
28
+ "const": "plugin-verification"
29
+ },
30
+ "status": {
31
+ "enum": [
32
+ "observed",
33
+ "rejected",
34
+ "failed",
35
+ "indeterminate"
36
+ ]
37
+ },
38
+ "requestDigest": {
39
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/sha256"
40
+ },
41
+ "goal": {
42
+ "$ref": "https://contracts.skill-family.example/v1/plugin-verification-request.json#/properties/goal"
43
+ },
44
+ "source": {
45
+ "$ref": "https://contracts.skill-family.example/v1/plugin-verification-request.json#/properties/source"
46
+ },
47
+ "host": {
48
+ "$ref": "https://contracts.skill-family.example/v1/plugin-verification-request.json#/properties/host"
49
+ },
50
+ "facts": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": [],
54
+ "properties": {
55
+ "input": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": [
59
+ "sourceClosureDigest",
60
+ "membersDigest",
61
+ "runtimeIdentities",
62
+ "probe"
63
+ ],
64
+ "properties": {
65
+ "sourceClosureDigest": {
66
+ "type": [
67
+ "string",
68
+ "null"
69
+ ],
70
+ "pattern": "^[0-9a-f]{64}$"
71
+ },
72
+ "membersDigest": {
73
+ "type": [
74
+ "string",
75
+ "null"
76
+ ],
77
+ "pattern": "^[0-9a-f]{64}$"
78
+ },
79
+ "runtimeIdentities": {
80
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/runtimeIdentities"
81
+ },
82
+ "probe": {
83
+ "oneOf": [
84
+ {
85
+ "$ref": "#/$defs/commandObservation"
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ]
91
+ }
92
+ }
93
+ },
94
+ "install": {
95
+ "type": [
96
+ "object",
97
+ "null"
98
+ ],
99
+ "additionalProperties": false,
100
+ "required": [
101
+ "installedClosureDigest",
102
+ "payloadMatches",
103
+ "observationDigest",
104
+ "sourceMode",
105
+ "commands",
106
+ "retained"
107
+ ],
108
+ "properties": {
109
+ "installedClosureDigest": {
110
+ "type": [
111
+ "string",
112
+ "null"
113
+ ],
114
+ "pattern": "^[0-9a-f]{64}$"
115
+ },
116
+ "payloadMatches": {
117
+ "type": [
118
+ "boolean",
119
+ "null"
120
+ ]
121
+ },
122
+ "observationDigest": {
123
+ "type": [
124
+ "string",
125
+ "null"
126
+ ],
127
+ "pattern": "^[0-9a-f]{64}$"
128
+ },
129
+ "sourceMode": {
130
+ "$ref": "https://contracts.skill-family.example/v1/plugin-verification-request.json#/properties/source/properties/type"
131
+ },
132
+ "commands": {
133
+ "type": "array",
134
+ "maxItems": 3,
135
+ "items": {
136
+ "$ref": "#/$defs/commandObservation"
137
+ }
138
+ },
139
+ "retained": {
140
+ "const": true
141
+ }
142
+ }
143
+ },
144
+ "discovery": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "status",
149
+ "basis",
150
+ "pluginId"
151
+ ],
152
+ "properties": {
153
+ "status": {
154
+ "enum": [
155
+ "observed",
156
+ "absent",
157
+ "unknown",
158
+ "not-performed"
159
+ ]
160
+ },
161
+ "basis": {
162
+ "enum": [
163
+ "native-plugin-list",
164
+ "native-init-event",
165
+ "none"
166
+ ]
167
+ },
168
+ "pluginId": {
169
+ "type": [
170
+ "string",
171
+ "null"
172
+ ],
173
+ "minLength": 1,
174
+ "maxLength": 512
175
+ }
176
+ },
177
+ "allOf": [
178
+ {
179
+ "if": {
180
+ "properties": {
181
+ "status": {
182
+ "enum": [
183
+ "unknown",
184
+ "not-performed"
185
+ ]
186
+ }
187
+ },
188
+ "required": [
189
+ "status"
190
+ ]
191
+ },
192
+ "then": {
193
+ "properties": {
194
+ "basis": {
195
+ "const": "none"
196
+ },
197
+ "pluginId": {
198
+ "const": null
199
+ }
200
+ }
201
+ }
202
+ },
203
+ {
204
+ "if": {
205
+ "properties": {
206
+ "status": {
207
+ "const": "observed"
208
+ }
209
+ },
210
+ "required": [
211
+ "status"
212
+ ]
213
+ },
214
+ "then": {
215
+ "properties": {
216
+ "basis": {
217
+ "enum": [
218
+ "native-plugin-list",
219
+ "native-init-event"
220
+ ]
221
+ },
222
+ "pluginId": {
223
+ "type": "string",
224
+ "minLength": 1,
225
+ "maxLength": 512
226
+ }
227
+ }
228
+ }
229
+ },
230
+ {
231
+ "if": {
232
+ "properties": {
233
+ "status": {
234
+ "const": "absent"
235
+ }
236
+ },
237
+ "required": [
238
+ "status"
239
+ ]
240
+ },
241
+ "then": {
242
+ "properties": {
243
+ "basis": {
244
+ "enum": [
245
+ "native-plugin-list",
246
+ "native-init-event"
247
+ ]
248
+ }
249
+ }
250
+ }
251
+ }
252
+ ]
253
+ },
254
+ "invocation": {
255
+ "type": [
256
+ "object",
257
+ "null"
258
+ ],
259
+ "additionalProperties": false,
260
+ "required": [
261
+ "execution",
262
+ "streams",
263
+ "snapshots",
264
+ "snapshotsMatch"
265
+ ],
266
+ "properties": {
267
+ "execution": {
268
+ "$ref": "#/$defs/execution"
269
+ },
270
+ "streams": {
271
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/streams"
272
+ },
273
+ "snapshots": {
274
+ "type": [
275
+ "object",
276
+ "null"
277
+ ],
278
+ "additionalProperties": false,
279
+ "required": [
280
+ "installedPlugin",
281
+ "fixture",
282
+ "protectedWorkspace"
283
+ ],
284
+ "properties": {
285
+ "installedPlugin": {
286
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/$defs/snapshot"
287
+ },
288
+ "fixture": {
289
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/$defs/snapshot"
290
+ },
291
+ "protectedWorkspace": {
292
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/$defs/snapshot"
293
+ }
294
+ }
295
+ },
296
+ "snapshotsMatch": {
297
+ "type": [
298
+ "boolean",
299
+ "null"
300
+ ]
301
+ }
302
+ }
303
+ },
304
+ "lifecycle": {
305
+ "$ref": "#/$defs/lifecycle"
306
+ }
307
+ }
308
+ },
309
+ "reason": {
310
+ "enum": [
311
+ null,
312
+ "preflight-rejected",
313
+ "executable-observation-mismatch",
314
+ "execution-failed",
315
+ "snapshot-mismatch",
316
+ "private-evidence-publication-failed",
317
+ "boundary-state-indeterminate",
318
+ "source-invalid",
319
+ "members-drift",
320
+ "tree-violation",
321
+ "channel-source-invalid",
322
+ "restriction-unsupported",
323
+ "install-write-failed",
324
+ "payload-mismatch"
325
+ ]
326
+ },
327
+ "requiredActions": {
328
+ "type": "array",
329
+ "uniqueItems": true,
330
+ "items": {
331
+ "enum": [
332
+ "manual-temporary-root-inspection-required"
333
+ ]
334
+ }
335
+ }
336
+ },
337
+ "allOf": [
338
+ {
339
+ "if": {
340
+ "type": "object",
341
+ "properties": { "goal": { "const": "native-lifecycle" } },
342
+ "required": ["goal"]
343
+ },
344
+ "then": {
345
+ "type": "object",
346
+ "properties": {
347
+ "source": {
348
+ "type": "object",
349
+ "properties": { "type": { "const": "local-marketplace" } }
350
+ },
351
+ "host": {
352
+ "type": "object",
353
+ "properties": {
354
+ "cliVersion": false,
355
+ "executableSha256": false
356
+ }
357
+ },
358
+ "facts": {
359
+ "type": "object",
360
+ "required": ["lifecycle"],
361
+ "properties": {
362
+ "lifecycle": {},
363
+ "input": false,
364
+ "install": false,
365
+ "discovery": false,
366
+ "invocation": false
367
+ }
368
+ }
369
+ }
370
+ },
371
+ "else": {
372
+ "type": "object",
373
+ "properties": {
374
+ "facts": {
375
+ "type": "object",
376
+ "required": ["input", "install", "discovery", "invocation"],
377
+ "properties": { "input": {}, "install": {}, "discovery": {}, "invocation": {}, "lifecycle": false }
378
+ }
379
+ }
380
+ }
381
+ },
382
+ {
383
+ "if": {
384
+ "type": "object",
385
+ "properties": {
386
+ "goal": { "const": "native-lifecycle" },
387
+ "status": { "const": "rejected" }
388
+ },
389
+ "required": ["goal", "status"]
390
+ },
391
+ "then": {
392
+ "type": "object",
393
+ "properties": {
394
+ "reason": { "const": "preflight-rejected" },
395
+ "requiredActions": { "type": "array", "maxItems": 0 },
396
+ "facts": {
397
+ "type": "object",
398
+ "properties": {
399
+ "lifecycle": {
400
+ "type": "object",
401
+ "properties": {
402
+ "stages": {
403
+ "type": "array",
404
+ "minItems": 12,
405
+ "maxItems": 12,
406
+ "prefixItems": [
407
+ { "$ref": "#/$defs/stageNotPerformed" },
408
+ { "$ref": "#/$defs/stageNotPerformed" },
409
+ { "$ref": "#/$defs/stageNotPerformed" },
410
+ { "$ref": "#/$defs/stageNotPerformed" },
411
+ { "$ref": "#/$defs/stageNotPerformed" },
412
+ { "$ref": "#/$defs/stageNotPerformed" },
413
+ { "$ref": "#/$defs/stageNotPerformed" },
414
+ { "$ref": "#/$defs/stageNotPerformed" },
415
+ { "$ref": "#/$defs/stageNotPerformed" },
416
+ { "$ref": "#/$defs/stageNotPerformed" },
417
+ { "$ref": "#/$defs/stageNotPerformed" },
418
+ { "$ref": "#/$defs/stageNotPerformed" }
419
+ ],
420
+ "items": false
421
+ },
422
+ "cleanup": {
423
+ "type": "object",
424
+ "properties": { "pluginAbsent": { "const": false } }
425
+ }
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ },
433
+ {
434
+ "if": {
435
+ "type": "object",
436
+ "properties": {
437
+ "goal": { "const": "native-lifecycle" },
438
+ "status": { "const": "failed" }
439
+ },
440
+ "required": ["goal", "status"]
441
+ },
442
+ "then": {
443
+ "type": "object",
444
+ "properties": {
445
+ "reason": { "const": "execution-failed" },
446
+ "requiredActions": { "type": "array", "maxItems": 0 },
447
+ "facts": {
448
+ "type": "object",
449
+ "properties": {
450
+ "lifecycle": {
451
+ "type": "object",
452
+ "properties": {
453
+ "stages": {
454
+ "type": "array",
455
+ "contains": {
456
+ "type": "object",
457
+ "properties": { "status": { "const": "failed" } },
458
+ "required": ["status"]
459
+ },
460
+ "minContains": 1
461
+ },
462
+ "cleanup": {
463
+ "type": "object",
464
+ "properties": { "pluginAbsent": { "const": false } }
465
+ }
466
+ }
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }
472
+ },
473
+ {
474
+ "if": {
475
+ "type": "object",
476
+ "properties": {
477
+ "goal": { "const": "native-lifecycle" },
478
+ "status": { "const": "indeterminate" }
479
+ },
480
+ "required": ["goal", "status"]
481
+ },
482
+ "then": {
483
+ "type": "object",
484
+ "properties": {
485
+ "reason": { "const": "boundary-state-indeterminate" },
486
+ "requiredActions": { "const": ["manual-temporary-root-inspection-required"] },
487
+ "facts": {
488
+ "type": "object",
489
+ "properties": {
490
+ "lifecycle": {
491
+ "type": "object",
492
+ "properties": {
493
+ "stages": {
494
+ "type": "array",
495
+ "contains": {
496
+ "type": "object",
497
+ "properties": { "status": { "const": "indeterminate" } },
498
+ "required": ["status"]
499
+ },
500
+ "minContains": 1
501
+ },
502
+ "cleanup": {
503
+ "type": "object",
504
+ "properties": { "pluginAbsent": { "const": false } }
505
+ }
506
+ }
507
+ }
508
+ }
509
+ }
510
+ }
511
+ }
512
+ },
513
+ {
514
+ "if": {
515
+ "type": "object",
516
+ "properties": {
517
+ "goal": { "const": "native-lifecycle" },
518
+ "status": { "const": "observed" }
519
+ },
520
+ "required": ["goal", "status"]
521
+ },
522
+ "then": {
523
+ "type": "object",
524
+ "properties": {
525
+ "facts": {
526
+ "type": "object",
527
+ "required": ["lifecycle"],
528
+ "properties": {
529
+ "lifecycle": {
530
+ "type": "object",
531
+ "required": ["stages", "cleanup"],
532
+ "properties": {
533
+ "stages": {
534
+ "type": "array",
535
+ "items": {
536
+ "type": "object",
537
+ "required": ["status"],
538
+ "properties": { "status": { "const": "observed" } }
539
+ }
540
+ },
541
+ "cleanup": {
542
+ "type": "object",
543
+ "required": ["pluginAbsent"],
544
+ "properties": { "pluginAbsent": { "const": true } }
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ }
551
+ }
552
+ },
553
+ {
554
+ "if": {
555
+ "properties": {
556
+ "status": {
557
+ "const": "observed"
558
+ }
559
+ },
560
+ "required": [
561
+ "status"
562
+ ],
563
+ "type": "object"
564
+ },
565
+ "then": {
566
+ "properties": {
567
+ "reason": {
568
+ "const": null
569
+ },
570
+ "requiredActions": {
571
+ "type": "array",
572
+ "maxItems": 0
573
+ },
574
+ "facts": {
575
+ "properties": {
576
+ "install": {
577
+ "type": "object",
578
+ "properties": {
579
+ "installedClosureDigest": {
580
+ "type": "string"
581
+ },
582
+ "observationDigest": {
583
+ "type": "string"
584
+ }
585
+ }
586
+ },
587
+ "input": {
588
+ "properties": {
589
+ "sourceClosureDigest": {
590
+ "type": "string"
591
+ },
592
+ "membersDigest": {
593
+ "type": "string"
594
+ }
595
+ },
596
+ "type": "object"
597
+ }
598
+ },
599
+ "type": "object"
600
+ }
601
+ },
602
+ "type": "object",
603
+ "allOf": [
604
+ {
605
+ "if": {
606
+ "type": "object",
607
+ "properties": {
608
+ "goal": {
609
+ "const": "install-only"
610
+ }
611
+ },
612
+ "required": [
613
+ "goal"
614
+ ]
615
+ },
616
+ "then": {
617
+ "type": "object",
618
+ "properties": {
619
+ "facts": {
620
+ "type": "object",
621
+ "properties": {
622
+ "invocation": {
623
+ "const": null
624
+ }
625
+ }
626
+ }
627
+ }
628
+ }
629
+ },
630
+ {
631
+ "if": {
632
+ "type": "object",
633
+ "properties": {
634
+ "goal": {
635
+ "const": "install-and-invoke"
636
+ }
637
+ },
638
+ "required": [
639
+ "goal"
640
+ ]
641
+ },
642
+ "then": {
643
+ "type": "object",
644
+ "properties": {
645
+ "facts": {
646
+ "type": "object",
647
+ "properties": {
648
+ "install": {
649
+ "type": "object",
650
+ "properties": {
651
+ "payloadMatches": {
652
+ "const": true
653
+ }
654
+ }
655
+ },
656
+ "invocation": {
657
+ "type": "object",
658
+ "properties": {
659
+ "execution": {
660
+ "type": "object",
661
+ "properties": {
662
+ "spawned": {
663
+ "const": true
664
+ },
665
+ "exitStatus": {
666
+ "const": 0
667
+ },
668
+ "processStatus": {
669
+ "const": "EXITED"
670
+ },
671
+ "terminationReason": {
672
+ "const": null
673
+ },
674
+ "watchdogReason": {
675
+ "const": null
676
+ },
677
+ "runnerModelOverrideAbsent": {
678
+ "const": true
679
+ }
680
+ }
681
+ },
682
+ "streams": {
683
+ "type": "object"
684
+ },
685
+ "snapshots": {
686
+ "type": "object"
687
+ },
688
+ "snapshotsMatch": {
689
+ "const": true
690
+ }
691
+ }
692
+ }
693
+ }
694
+ }
695
+ }
696
+ }
697
+ }
698
+ ]
699
+ }
700
+ },
701
+ {
702
+ "if": {
703
+ "properties": {
704
+ "status": {
705
+ "const": "rejected"
706
+ }
707
+ },
708
+ "required": [
709
+ "status"
710
+ ],
711
+ "type": "object"
712
+ },
713
+ "then": {
714
+ "properties": {
715
+ "reason": {
716
+ "enum": [
717
+ "preflight-rejected",
718
+ "source-invalid",
719
+ "members-drift",
720
+ "tree-violation",
721
+ "channel-source-invalid",
722
+ "restriction-unsupported",
723
+ "executable-observation-mismatch"
724
+ ]
725
+ },
726
+ "requiredActions": {
727
+ "type": "array",
728
+ "maxItems": 0
729
+ },
730
+ "facts": {
731
+ "properties": {
732
+ "install": {
733
+ "const": null
734
+ },
735
+ "invocation": {
736
+ "const": null
737
+ }
738
+ },
739
+ "type": "object"
740
+ }
741
+ },
742
+ "type": "object"
743
+ }
744
+ },
745
+ {
746
+ "if": {
747
+ "allOf": [
748
+ { "properties": { "status": { "const": "failed" } }, "required": ["status"] },
749
+ { "properties": { "goal": { "enum": ["install-only", "install-and-invoke"] } }, "required": ["goal"] }
750
+ ],
751
+ "required": [
752
+ "status",
753
+ "goal"
754
+ ],
755
+ "type": "object"
756
+ },
757
+ "then": {
758
+ "properties": {
759
+ "reason": {
760
+ "enum": [
761
+ "install-write-failed",
762
+ "tree-violation",
763
+ "channel-source-invalid",
764
+ "execution-failed",
765
+ "snapshot-mismatch",
766
+ "private-evidence-publication-failed",
767
+ "executable-observation-mismatch",
768
+ "payload-mismatch"
769
+ ]
770
+ },
771
+ "requiredActions": {
772
+ "type": "array",
773
+ "maxItems": 0
774
+ }
775
+ },
776
+ "anyOf": [
777
+ {
778
+ "properties": {
779
+ "facts": {
780
+ "properties": {
781
+ "install": {
782
+ "type": "object"
783
+ }
784
+ },
785
+ "required": [
786
+ "install"
787
+ ],
788
+ "type": "object"
789
+ }
790
+ },
791
+ "required": [
792
+ "facts"
793
+ ],
794
+ "type": "object"
795
+ },
796
+ {
797
+ "properties": {
798
+ "facts": {
799
+ "properties": {
800
+ "invocation": {
801
+ "type": "object"
802
+ }
803
+ },
804
+ "required": [
805
+ "invocation"
806
+ ],
807
+ "type": "object"
808
+ }
809
+ },
810
+ "required": [
811
+ "facts"
812
+ ],
813
+ "type": "object"
814
+ }
815
+ ],
816
+ "type": "object"
817
+ }
818
+ },
819
+ {
820
+ "if": {
821
+ "properties": {
822
+ "status": {
823
+ "const": "indeterminate"
824
+ }
825
+ },
826
+ "required": [
827
+ "status"
828
+ ],
829
+ "type": "object"
830
+ },
831
+ "then": {
832
+ "properties": {
833
+ "reason": {
834
+ "const": "boundary-state-indeterminate"
835
+ },
836
+ "requiredActions": {
837
+ "type": "array",
838
+ "const": [
839
+ "manual-temporary-root-inspection-required"
840
+ ]
841
+ }
842
+ },
843
+ "type": "object"
844
+ }
845
+ },
846
+ {
847
+ "if": {
848
+ "properties": {
849
+ "reason": {
850
+ "const": "payload-mismatch"
851
+ }
852
+ },
853
+ "required": [
854
+ "reason"
855
+ ],
856
+ "type": "object"
857
+ },
858
+ "then": {
859
+ "properties": {
860
+ "facts": {
861
+ "properties": {
862
+ "invocation": {
863
+ "const": null
864
+ }
865
+ },
866
+ "type": "object"
867
+ }
868
+ },
869
+ "type": "object"
870
+ }
871
+ }
872
+ ],
873
+ "$defs": {
874
+ "commandObservation": {
875
+ "type": "object",
876
+ "additionalProperties": false,
877
+ "required": [
878
+ "step",
879
+ "execution",
880
+ "streams",
881
+ "outputByteLimits",
882
+ "outputLimitExceeded"
883
+ ],
884
+ "properties": {
885
+ "step": {
886
+ "type": "string",
887
+ "minLength": 1,
888
+ "maxLength": 128,
889
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
890
+ },
891
+ "execution": {
892
+ "$ref": "#/$defs/execution"
893
+ },
894
+ "streams": {
895
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/streams"
896
+ },
897
+ "outputByteLimits": {
898
+ "anyOf": [
899
+ {
900
+ "$ref": "https://contracts.skill-family.example/v1/watchdog-termination-envelope.json#/$defs/outputByteLimits"
901
+ },
902
+ {
903
+ "type": "null"
904
+ }
905
+ ]
906
+ },
907
+ "outputLimitExceeded": {
908
+ "enum": [
909
+ "stdout",
910
+ "stderr",
911
+ null
912
+ ]
913
+ }
914
+ },
915
+ "allOf": [
916
+ {
917
+ "if": {
918
+ "properties": {
919
+ "step": {
920
+ "const": "version-probe"
921
+ }
922
+ }
923
+ },
924
+ "then": {
925
+ "properties": {
926
+ "outputByteLimits": {
927
+ "const": null
928
+ },
929
+ "outputLimitExceeded": {
930
+ "const": null
931
+ }
932
+ }
933
+ }
934
+ },
935
+ {
936
+ "if": {
937
+ "properties": {
938
+ "outputByteLimits": {
939
+ "const": null
940
+ }
941
+ }
942
+ },
943
+ "then": {
944
+ "properties": {
945
+ "outputLimitExceeded": {
946
+ "const": null
947
+ }
948
+ }
949
+ }
950
+ }
951
+ ]
952
+ },
953
+ "execution": {
954
+ "type": "object",
955
+ "additionalProperties": false,
956
+ "required": [
957
+ "spawned",
958
+ "exitStatus",
959
+ "processStatus",
960
+ "terminationReason",
961
+ "watchdogReason",
962
+ "runnerModelOverrideAbsent"
963
+ ],
964
+ "properties": {
965
+ "spawned": {
966
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/execution/properties/spawned"
967
+ },
968
+ "exitStatus": {
969
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/execution/properties/exitStatus"
970
+ },
971
+ "processStatus": {
972
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/execution/properties/processStatus"
973
+ },
974
+ "terminationReason": {
975
+ "$ref": "https://contracts.skill-family.example/v1/watchdog-termination-envelope.json#/properties/terminationReason"
976
+ },
977
+ "watchdogReason": {
978
+ "$ref": "https://contracts.skill-family.example/v1/watchdog-termination-envelope.json#/properties/watchdogReason"
979
+ },
980
+ "runnerModelOverrideAbsent": {
981
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-result.json#/properties/execution/properties/runnerModelOverrideAbsent"
982
+ }
983
+ }
984
+ },
985
+ "installObservation": {
986
+ "type": "object",
987
+ "additionalProperties": false,
988
+ "required": [
989
+ "requestDigest",
990
+ "installedRoot",
991
+ "observation"
992
+ ],
993
+ "properties": {
994
+ "requestDigest": {
995
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/sha256"
996
+ },
997
+ "installedRoot": {
998
+ "type": "string",
999
+ "pattern": "^/(?:[^/\\\\\\u0000]+(?:/[^/\\\\\\u0000]+)*)?$",
1000
+ "not": {
1001
+ "pattern": "(?:^|/)\\.{1,2}(?:/|$)"
1002
+ }
1003
+ },
1004
+ "observation": {
1005
+ "$ref": "https://contracts.skill-family.example/v1/filesystem-tree-observation.json"
1006
+ }
1007
+ }
1008
+ },
1009
+ "lifecycle": {
1010
+ "type": "object",
1011
+ "additionalProperties": false,
1012
+ "required": ["scope", "stages", "cleanup"],
1013
+ "properties": {
1014
+ "scope": { "const": "local" },
1015
+ "stages": {
1016
+ "type": "array",
1017
+ "minItems": 12,
1018
+ "maxItems": 12,
1019
+ "prefixItems": [
1020
+ { "$ref": "#/$defs/stagePreflight" },
1021
+ { "$ref": "#/$defs/stageValidateV1" },
1022
+ { "$ref": "#/$defs/stageMarketplaceAdd" },
1023
+ { "$ref": "#/$defs/stageInstallV1" },
1024
+ { "$ref": "#/$defs/stageDiscoverV1" },
1025
+ { "$ref": "#/$defs/stageInvokeV1" },
1026
+ { "$ref": "#/$defs/stageDisable" },
1027
+ { "$ref": "#/$defs/stageEnable" },
1028
+ { "$ref": "#/$defs/stageUpdateV2" },
1029
+ { "$ref": "#/$defs/stageInvokeV2" },
1030
+ { "$ref": "#/$defs/stageUninstall" },
1031
+ { "$ref": "#/$defs/stageAbsentAfterUninstall" }
1032
+ ],
1033
+ "items": false
1034
+ },
1035
+ "cleanup": {
1036
+ "type": "object",
1037
+ "additionalProperties": false,
1038
+ "required": ["pluginAbsent"],
1039
+ "properties": { "pluginAbsent": { "type": "boolean" } }
1040
+ }
1041
+ },
1042
+ "allOf": [
1043
+ {
1044
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{ "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } },
1045
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } }
1046
+ },
1047
+ {
1048
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } },
1049
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } }
1050
+ },
1051
+ {
1052
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } },
1053
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } }
1054
+ },
1055
+ {
1056
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}, {}, {}, {}], "items": false } } },
1057
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}, {}, {}, {}], "items": false } } }
1058
+ },
1059
+ {
1060
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}, {}, {}], "items": false } } },
1061
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}, {}, {}], "items": false } } }
1062
+ },
1063
+ {
1064
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}, {}], "items": false } } },
1065
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}, {}], "items": false } } }
1066
+ },
1067
+ {
1068
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}, {}], "items": false } } },
1069
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}, {}], "items": false } } }
1070
+ },
1071
+ {
1072
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}, {}], "items": false } } },
1073
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}, {}], "items": false } } }
1074
+ },
1075
+ {
1076
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}, {}], "items": false } } },
1077
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}, {}], "items": false } } }
1078
+ },
1079
+ {
1080
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}, {}], "items": false } } },
1081
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }, {}], "items": false } } }
1082
+ },
1083
+ {
1084
+ "if": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageStopped" }, {}], "items": false } } },
1085
+ "then": { "properties": { "stages": { "type": "array", "minItems": 12, "maxItems": 12, "prefixItems": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { "$ref": "#/$defs/stageNotPerformed" }], "items": false } } }
1086
+ }
1087
+ ]
1088
+ },
1089
+ "stageStopped": {
1090
+ "type": "object",
1091
+ "required": ["status"],
1092
+ "properties": { "status": { "enum": ["failed", "indeterminate", "not-performed"] } }
1093
+ },
1094
+ "stageNotPerformed": {
1095
+ "type": "object",
1096
+ "required": ["status"],
1097
+ "properties": { "status": { "const": "not-performed" } }
1098
+ },
1099
+ "stageBase": {
1100
+ "type": "object",
1101
+ "additionalProperties": false,
1102
+ "required": ["name", "status", "commands", "trees"],
1103
+ "properties": {
1104
+ "name": {
1105
+ "enum": [
1106
+ "preflight", "validate-v1", "marketplace-add", "install-v1",
1107
+ "discover-v1", "invoke-v1", "disable", "enable", "update-v2",
1108
+ "invoke-v2", "uninstall", "absent-after-uninstall"
1109
+ ]
1110
+ },
1111
+ "status": { "enum": ["observed", "failed", "indeterminate", "not-performed"] },
1112
+ "commands": { "type": "array", "maxItems": 3, "items": { "$ref": "#/$defs/commandObservation" } },
1113
+ "trees": { "type": "array", "maxItems": 6, "uniqueItems": true, "items": { "$ref": "#/$defs/treeEvidence" } }
1114
+ },
1115
+ "allOf": [
1116
+ {
1117
+ "if": { "properties": { "status": { "const": "not-performed" } }, "required": ["status"] },
1118
+ "then": {
1119
+ "properties": {
1120
+ "commands": { "type": "array", "maxItems": 0 },
1121
+ "trees": { "type": "array", "maxItems": 0 }
1122
+ }
1123
+ }
1124
+ }
1125
+ ]
1126
+ },
1127
+ "stagePreflight": {
1128
+ "allOf": [
1129
+ { "$ref": "#/$defs/stageBase" },
1130
+ { "type": "object", "properties": { "name": { "const": "preflight" }, "trees": { "type": "array", "maxItems": 0 } } }
1131
+ ]
1132
+ },
1133
+ "stageValidateV1": {
1134
+ "allOf": [
1135
+ { "$ref": "#/$defs/stageBase" },
1136
+ { "type": "object", "properties": { "name": { "const": "validate-v1" } } }
1137
+ ]
1138
+ },
1139
+ "stageMarketplaceAdd": {
1140
+ "allOf": [
1141
+ { "$ref": "#/$defs/stageBase" },
1142
+ { "type": "object", "properties": { "name": { "const": "marketplace-add" } } }
1143
+ ]
1144
+ },
1145
+ "stageInstallV1": {
1146
+ "allOf": [
1147
+ { "$ref": "#/$defs/stageBase" },
1148
+ { "type": "object", "properties": { "name": { "const": "install-v1" } } }
1149
+ ]
1150
+ },
1151
+ "stageDiscoverV1": {
1152
+ "allOf": [
1153
+ { "$ref": "#/$defs/stageBase" },
1154
+ { "type": "object", "properties": { "name": { "const": "discover-v1" } } }
1155
+ ]
1156
+ },
1157
+ "stageInvokeV1": {
1158
+ "allOf": [
1159
+ { "$ref": "#/$defs/stageBase" },
1160
+ { "type": "object", "properties": { "name": { "const": "invoke-v1" } } }
1161
+ ]
1162
+ },
1163
+ "stageDisable": {
1164
+ "allOf": [
1165
+ { "$ref": "#/$defs/stageBase" },
1166
+ { "type": "object", "properties": { "name": { "const": "disable" } } }
1167
+ ]
1168
+ },
1169
+ "stageEnable": {
1170
+ "allOf": [
1171
+ { "$ref": "#/$defs/stageBase" },
1172
+ { "type": "object", "properties": { "name": { "const": "enable" } } }
1173
+ ]
1174
+ },
1175
+ "stageUpdateV2": {
1176
+ "allOf": [
1177
+ { "$ref": "#/$defs/stageBase" },
1178
+ { "type": "object", "properties": { "name": { "const": "update-v2" } } }
1179
+ ]
1180
+ },
1181
+ "stageInvokeV2": {
1182
+ "allOf": [
1183
+ { "$ref": "#/$defs/stageBase" },
1184
+ { "type": "object", "properties": { "name": { "const": "invoke-v2" } } }
1185
+ ]
1186
+ },
1187
+ "stageUninstall": {
1188
+ "allOf": [
1189
+ { "$ref": "#/$defs/stageBase" },
1190
+ { "type": "object", "properties": { "name": { "const": "uninstall" } } }
1191
+ ]
1192
+ },
1193
+ "stageAbsentAfterUninstall": {
1194
+ "allOf": [
1195
+ { "$ref": "#/$defs/stageBase" },
1196
+ { "type": "object", "properties": { "name": { "const": "absent-after-uninstall" } } }
1197
+ ]
1198
+ },
1199
+ "treeEvidence": {
1200
+ "type": "object",
1201
+ "additionalProperties": false,
1202
+ "required": ["role", "status"],
1203
+ "properties": {
1204
+ "role": { "enum": ["source-v1", "source-v2", "installed", "cache", "config", "data"] },
1205
+ "status": { "enum": ["observed", "absent", "not-applicable"] },
1206
+ "observationDigest": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
1207
+ },
1208
+ "allOf": [
1209
+ {
1210
+ "if": { "type": "object", "properties": { "status": { "const": "observed" } }, "required": ["status"] },
1211
+ "then": { "type": "object", "required": ["observationDigest"], "properties": { "observationDigest": {} } },
1212
+ "else": { "type": "object", "properties": { "observationDigest": false } }
1213
+ }
1214
+ ]
1215
+ }
1216
+ }
1217
+ }