release-skill 0.9.0 → 0.9.3

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 (165) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +81 -0
  7. package/INSTALL.md +22 -9
  8. package/INSTALL.zh-CN.md +15 -8
  9. package/README.md +40 -35
  10. package/README.zh-CN.md +31 -29
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/consumer-contract-vectors.json +110 -0
  14. package/adapters/claude/bin/error-codes.json +8 -1
  15. package/adapters/claude/bin/foundation-resource-binding.json +1 -1
  16. package/adapters/claude/bin/registry.json +22 -1
  17. package/adapters/claude/bin/release-skill.bundle.mjs +4772 -2238
  18. package/adapters/claude/bin/rules.json +1 -1
  19. package/adapters/claude/bin/schemas/consumer-contract-vector.schema.json +149 -0
  20. package/adapters/claude/schemas/release-project.schema.json +4 -0
  21. package/adapters/claude/schemas/release-run.schema.json +41 -1
  22. package/adapters/claude/skills/release-config/SKILL.md +5 -3
  23. package/adapters/claude/skills/release-docs/SKILL.md +4 -2
  24. package/adapters/claude/skills/release-finish/SKILL.md +6 -4
  25. package/adapters/claude/skills/release-help/SKILL.md +14 -5
  26. package/adapters/claude/skills/release-marketplace/SKILL.md +3 -1
  27. package/adapters/claude/skills/release-prepare/SKILL.md +4 -2
  28. package/adapters/claude/skills/release-publish/SKILL.md +19 -10
  29. package/adapters/claude/skills/release-verify/SKILL.md +2 -0
  30. package/adapters/claude/src/schemas/executable-identity-observation.schema.json +162 -0
  31. package/adapters/claude/src/schemas/filesystem-tree-observation.schema.json +18 -2
  32. package/adapters/claude/src/schemas/migration-manifest.schema.json +271 -7
  33. package/adapters/claude/src/schemas/plugin-verification-request.schema.json +147 -22
  34. package/adapters/claude/src/schemas/plugin-verification-result.schema.json +436 -18
  35. package/adapters/claude/src/schemas/profile-adoption-declaration.schema.json +8 -0
  36. package/adapters/claude/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  37. package/adapters/claude/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  38. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  39. package/adapters/codex/bin/consumer-contract-vectors.json +110 -0
  40. package/adapters/codex/bin/error-codes.json +8 -1
  41. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  42. package/adapters/codex/bin/registry.json +22 -1
  43. package/adapters/codex/bin/release-skill.bundle.mjs +4772 -2238
  44. package/adapters/codex/bin/rules.json +1 -1
  45. package/adapters/codex/bin/schemas/consumer-contract-vector.schema.json +149 -0
  46. package/adapters/codex/schemas/release-project.schema.json +4 -0
  47. package/adapters/codex/schemas/release-run.schema.json +41 -1
  48. package/adapters/codex/skills/release-config/SKILL.md +5 -3
  49. package/adapters/codex/skills/release-docs/SKILL.md +4 -2
  50. package/adapters/codex/skills/release-finish/SKILL.md +6 -4
  51. package/adapters/codex/skills/release-help/SKILL.md +14 -5
  52. package/adapters/codex/skills/release-marketplace/SKILL.md +3 -1
  53. package/adapters/codex/skills/release-prepare/SKILL.md +4 -2
  54. package/adapters/codex/skills/release-publish/SKILL.md +19 -10
  55. package/adapters/codex/skills/release-verify/SKILL.md +2 -0
  56. package/adapters/codex/src/schemas/executable-identity-observation.schema.json +162 -0
  57. package/adapters/codex/src/schemas/filesystem-tree-observation.schema.json +18 -2
  58. package/adapters/codex/src/schemas/migration-manifest.schema.json +271 -7
  59. package/adapters/codex/src/schemas/plugin-verification-request.schema.json +147 -22
  60. package/adapters/codex/src/schemas/plugin-verification-result.schema.json +436 -18
  61. package/adapters/codex/src/schemas/profile-adoption-declaration.schema.json +8 -0
  62. package/adapters/codex/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  63. package/adapters/codex/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  64. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  65. package/adapters/kimi/bin/consumer-contract-vectors.json +110 -0
  66. package/adapters/kimi/bin/error-codes.json +8 -1
  67. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  68. package/adapters/kimi/bin/registry.json +22 -1
  69. package/adapters/kimi/bin/release-skill.bundle.mjs +4772 -2238
  70. package/adapters/kimi/bin/rules.json +1 -1
  71. package/adapters/kimi/bin/schemas/consumer-contract-vector.schema.json +149 -0
  72. package/adapters/kimi/schemas/release-project.schema.json +4 -0
  73. package/adapters/kimi/schemas/release-run.schema.json +41 -1
  74. package/adapters/kimi/skills/release-config/SKILL.md +5 -3
  75. package/adapters/kimi/skills/release-docs/SKILL.md +4 -2
  76. package/adapters/kimi/skills/release-finish/SKILL.md +6 -4
  77. package/adapters/kimi/skills/release-help/SKILL.md +14 -5
  78. package/adapters/kimi/skills/release-marketplace/SKILL.md +3 -1
  79. package/adapters/kimi/skills/release-prepare/SKILL.md +4 -2
  80. package/adapters/kimi/skills/release-publish/SKILL.md +19 -10
  81. package/adapters/kimi/skills/release-verify/SKILL.md +2 -0
  82. package/adapters/kimi/src/schemas/executable-identity-observation.schema.json +162 -0
  83. package/adapters/kimi/src/schemas/filesystem-tree-observation.schema.json +18 -2
  84. package/adapters/kimi/src/schemas/migration-manifest.schema.json +271 -7
  85. package/adapters/kimi/src/schemas/plugin-verification-request.schema.json +147 -22
  86. package/adapters/kimi/src/schemas/plugin-verification-result.schema.json +436 -18
  87. package/adapters/kimi/src/schemas/profile-adoption-declaration.schema.json +8 -0
  88. package/adapters/kimi/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  89. package/adapters/kimi/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  90. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  91. package/adapters/workbuddy/bin/consumer-contract-vectors.json +110 -0
  92. package/adapters/workbuddy/bin/error-codes.json +8 -1
  93. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  94. package/adapters/workbuddy/bin/registry.json +22 -1
  95. package/adapters/workbuddy/bin/release-skill.bundle.mjs +4772 -2238
  96. package/adapters/workbuddy/bin/rules.json +1 -1
  97. package/adapters/workbuddy/bin/schemas/consumer-contract-vector.schema.json +149 -0
  98. package/adapters/workbuddy/schemas/release-project.schema.json +4 -0
  99. package/adapters/workbuddy/schemas/release-run.schema.json +41 -1
  100. package/adapters/workbuddy/skills/release-config/SKILL.md +5 -3
  101. package/adapters/workbuddy/skills/release-docs/SKILL.md +4 -2
  102. package/adapters/workbuddy/skills/release-finish/SKILL.md +6 -4
  103. package/adapters/workbuddy/skills/release-help/SKILL.md +14 -5
  104. package/adapters/workbuddy/skills/release-marketplace/SKILL.md +3 -1
  105. package/adapters/workbuddy/skills/release-prepare/SKILL.md +4 -2
  106. package/adapters/workbuddy/skills/release-publish/SKILL.md +19 -10
  107. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -0
  108. package/adapters/workbuddy/src/schemas/executable-identity-observation.schema.json +162 -0
  109. package/adapters/workbuddy/src/schemas/filesystem-tree-observation.schema.json +18 -2
  110. package/adapters/workbuddy/src/schemas/migration-manifest.schema.json +271 -7
  111. package/adapters/workbuddy/src/schemas/plugin-verification-request.schema.json +147 -22
  112. package/adapters/workbuddy/src/schemas/plugin-verification-result.schema.json +436 -18
  113. package/adapters/workbuddy/src/schemas/profile-adoption-declaration.schema.json +8 -0
  114. package/adapters/workbuddy/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  115. package/adapters/workbuddy/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  116. package/bin/consumer-contract-vectors.json +110 -0
  117. package/bin/error-codes.json +8 -1
  118. package/bin/foundation-resource-binding.json +1 -1
  119. package/bin/registry.json +22 -1
  120. package/bin/release-skill-cli.mjs +72 -4
  121. package/bin/release-skill.bundle.mjs +4772 -2238
  122. package/bin/rules.json +1 -1
  123. package/bin/schemas/consumer-contract-vector.schema.json +149 -0
  124. package/package.json +5 -5
  125. package/platform-manifest.json +5 -5
  126. package/references/01-state-machine.md +16 -1
  127. package/references/05-evidence-and-errors.md +2 -2
  128. package/schemas/release-project.schema.json +4 -0
  129. package/schemas/release-run.schema.json +41 -1
  130. package/skills/release-config/SKILL.md +5 -3
  131. package/skills/release-docs/SKILL.md +4 -2
  132. package/skills/release-finish/SKILL.md +6 -4
  133. package/skills/release-help/SKILL.md +14 -5
  134. package/skills/release-marketplace/SKILL.md +3 -1
  135. package/skills/release-prepare/SKILL.md +4 -2
  136. package/skills/release-publish/SKILL.md +19 -10
  137. package/skills/release-verify/SKILL.md +2 -0
  138. package/skills-src/release-config/SKILL.md +5 -3
  139. package/skills-src/release-docs/SKILL.md +4 -2
  140. package/skills-src/release-finish/SKILL.md +6 -4
  141. package/skills-src/release-help/SKILL.md +14 -5
  142. package/skills-src/release-marketplace/SKILL.md +3 -1
  143. package/skills-src/release-prepare/SKILL.md +4 -2
  144. package/skills-src/release-publish/SKILL.md +19 -10
  145. package/skills-src/release-verify/SKILL.md +2 -0
  146. package/src/commands/post-release-local.mjs +249 -58
  147. package/src/commands/prepare.mjs +178 -9
  148. package/src/commands/route.mjs +597 -18
  149. package/src/commands/setup.mjs +2 -0
  150. package/src/commands/ship.mjs +143 -16
  151. package/src/commands/verify.mjs +21 -0
  152. package/src/core/adoption-assessment.mjs +59 -0
  153. package/src/core/derived-artifact-gates.mjs +32 -5
  154. package/src/core/foundation-plugin-verification.mjs +213 -1
  155. package/src/core/hook-cache.mjs +318 -26
  156. package/src/core/hooks.mjs +8 -1
  157. package/src/producers/foundation-resource-projection.mjs +16 -3
  158. package/src/schemas/executable-identity-observation.schema.json +162 -0
  159. package/src/schemas/filesystem-tree-observation.schema.json +18 -2
  160. package/src/schemas/migration-manifest.schema.json +271 -7
  161. package/src/schemas/plugin-verification-request.schema.json +147 -22
  162. package/src/schemas/plugin-verification-result.schema.json +436 -18
  163. package/src/schemas/profile-adoption-declaration.schema.json +8 -0
  164. package/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  165. package/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://contracts.skill-family.example/v1/filesystem-tree-observation.json",
4
4
  "title": "Filesystem tree observation",
5
- "description": "A complete same-pass fact observation of a bound filesystem tree (FND-DES-014 section 6.1). Private data only: it is returned by the public read-only harness entry, but never enters a public plugin verification result. The record keeps the original root binding so consumers re-verify the same bound root and never re-bind a replacement. Members are canonical relative paths sorted by Unicode code point; directories carry identity/type/permission facts only; file bytes come from the same native descriptor that supplies statMode.",
5
+ "description": "A complete same-pass fact observation of a bound filesystem tree (FND-DES-014 section 6.1). Private data only: it is returned by the public read-only harness entry, but never enters a public plugin verification result. The record keeps the original root binding so consumers re-verify the same bound root and never re-bind a replacement. Default and explicit reject preserve the 0.14 UTF-16 order; record mode uses Unicode code point order. Directories carry identity/type/permission facts only; file bytes come from the same native descriptor that supplies statMode.",
6
6
  "type": "object",
7
7
  "additionalProperties": false,
8
8
  "required": ["schemaVersion", "kind", "rootBinding", "members", "membersDigest"],
@@ -25,7 +25,8 @@
25
25
  "member": {
26
26
  "oneOf": [
27
27
  { "$ref": "#/$defs/fileMember" },
28
- { "$ref": "#/$defs/directoryMember" }
28
+ { "$ref": "#/$defs/directoryMember" },
29
+ { "$ref": "#/$defs/symlinkMember" }
29
30
  ]
30
31
  },
31
32
  "fileMember": {
@@ -50,6 +51,21 @@
50
51
  "type": { "const": "directory" },
51
52
  "statMode": { "$ref": "#/$defs/statMode" }
52
53
  }
54
+ },
55
+ "symlinkMember": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "required": ["path", "type", "targetBase64", "bytes", "statMode"],
59
+ "properties": {
60
+ "path": { "type": "string", "minLength": 1 },
61
+ "type": { "const": "symlink" },
62
+ "targetBase64": {
63
+ "type": "string",
64
+ "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
65
+ },
66
+ "bytes": { "type": "integer", "minimum": 0, "maximum": 1048576 },
67
+ "statMode": { "$ref": "#/$defs/statMode" }
68
+ }
53
69
  }
54
70
  }
55
71
  }
@@ -13,6 +13,138 @@
13
13
  "kind": {
14
14
  "const": "skill-family.migration-manifest"
15
15
  },
16
+ "capabilityUseContext": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["scope", "locale"],
20
+ "properties": {
21
+ "scope": {
22
+ "type": "string",
23
+ "enum": ["contracts", "harness", "engineering-kit", "profile", "all"]
24
+ },
25
+ "locale": {
26
+ "type": "string",
27
+ "enum": ["en", "zh-CN"]
28
+ }
29
+ }
30
+ },
31
+ "capabilityUses": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "maxItems": 200,
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["useId", "problemStatement", "constraints", "retainedGuarantees"],
39
+ "properties": {
40
+ "useId": {
41
+ "type": "string",
42
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
43
+ "maxLength": 80
44
+ },
45
+ "problemStatement": {
46
+ "allOf": [
47
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
48
+ { "type": "string", "maxLength": 1000 }
49
+ ]
50
+ },
51
+ "constraints": {
52
+ "type": "array",
53
+ "maxItems": 20,
54
+ "uniqueItems": true,
55
+ "items": {
56
+ "allOf": [
57
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
58
+ { "type": "string", "maxLength": 500 }
59
+ ]
60
+ }
61
+ },
62
+ "retainedGuarantees": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "maxItems": 20,
66
+ "uniqueItems": true,
67
+ "items": {
68
+ "allOf": [
69
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
70
+ { "type": "string", "maxLength": 500 }
71
+ ]
72
+ }
73
+ },
74
+ "catalogFilters": {
75
+ "type": "array",
76
+ "maxItems": 20,
77
+ "uniqueItems": true,
78
+ "items": {
79
+ "allOf": [
80
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
81
+ { "type": "string", "maxLength": 200 }
82
+ ]
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "capabilityDecisions": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["useId", "disposition", "reason"],
94
+ "properties": {
95
+ "useId": {
96
+ "type": "string",
97
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
98
+ "maxLength": 80
99
+ },
100
+ "disposition": {
101
+ "type": "string",
102
+ "enum": ["direct-adoption", "compatibility-layer", "keep-business", "foundation-gap"]
103
+ },
104
+ "targetCapability": {
105
+ "type": "string",
106
+ "pattern": "^foundation\\.[a-z0-9\\-]+(\\.[a-z0-9\\-]+)+$"
107
+ },
108
+ "reason": {
109
+ "type": "string",
110
+ "minLength": 1,
111
+ "maxLength": 1000
112
+ }
113
+ },
114
+ "allOf": [
115
+ {
116
+ "if": {
117
+ "required": ["disposition"],
118
+ "properties": {
119
+ "disposition": {
120
+ "enum": ["direct-adoption", "compatibility-layer"]
121
+ }
122
+ }
123
+ },
124
+ "then": {
125
+ "required": ["targetCapability"],
126
+ "properties": { "targetCapability": { "type": "string" } }
127
+ }
128
+ },
129
+ {
130
+ "if": {
131
+ "required": ["disposition"],
132
+ "properties": {
133
+ "disposition": {
134
+ "enum": ["keep-business", "foundation-gap"]
135
+ }
136
+ }
137
+ },
138
+ "then": {
139
+ "not": {
140
+ "required": ["targetCapability"],
141
+ "properties": { "targetCapability": { "type": "string" } }
142
+ }
143
+ }
144
+ }
145
+ ]
146
+ }
147
+ },
16
148
  "manifestVersion": {
17
149
  "type": "integer",
18
150
  "minimum": 1,
@@ -31,11 +163,34 @@
31
163
  "description": "Relative POSIX path of one legacy implementation. Shape only: absolute paths, traversal, UNC/drive forms and symlink escapes are rejected by harness containment at assessment time, fail-closed."
32
164
  },
33
165
  "replacedBy": {
34
- "type": "string",
35
- "minLength": 1,
166
+ "oneOf": [
167
+ { "type": "string", "minLength": 1 },
168
+ { "type": "null" }
169
+ ],
36
170
  "description": "The replacement facility (tool/command/module) that supersedes this legacy entry. An empty replacement is never a valid exit claim."
171
+ },
172
+ "useId": {
173
+ "type": "string",
174
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
175
+ "maxLength": 80
176
+ },
177
+ "recoveryRef": {
178
+ "type": "string",
179
+ "minLength": 1
37
180
  }
38
- }
181
+ },
182
+ "allOf": [
183
+ {
184
+ "if": {
185
+ "required": ["replacedBy"],
186
+ "properties": { "replacedBy": { "type": "null" } }
187
+ },
188
+ "then": {
189
+ "required": ["useId"],
190
+ "properties": { "useId": { "type": "string" } }
191
+ }
192
+ }
193
+ ]
39
194
  }
40
195
  },
41
196
  "legacyReferences": {
@@ -57,11 +212,30 @@
57
212
  "description": "Exact literal text that must be absent from the file. No regex; byte-exact UTF-8 match."
58
213
  },
59
214
  "replacedBy": {
60
- "type": "string",
61
- "minLength": 1,
215
+ "oneOf": [
216
+ { "type": "string", "minLength": 1 },
217
+ { "type": "null" }
218
+ ],
62
219
  "description": "The replacement facility that supersedes this old reference. Empty is never valid."
220
+ },
221
+ "useId": {
222
+ "type": "string",
223
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
224
+ "maxLength": 80
63
225
  }
64
- }
226
+ },
227
+ "allOf": [
228
+ {
229
+ "if": {
230
+ "required": ["replacedBy"],
231
+ "properties": { "replacedBy": { "type": "null" } }
232
+ },
233
+ "then": {
234
+ "required": ["useId"],
235
+ "properties": { "useId": { "type": "string" } }
236
+ }
237
+ }
238
+ ]
65
239
  }
66
240
  },
67
241
  "exceptions": {
@@ -144,5 +318,95 @@
144
318
  }
145
319
  }
146
320
  }
147
- }
321
+ },
322
+ "$defs": {
323
+ "trimmedCapabilityUseText": {
324
+ "type": "string",
325
+ "minLength": 1,
326
+ "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?![\\s\\S]*\\u0000)[\\s\\S]+$"
327
+ }
328
+ },
329
+ "allOf": [
330
+ {
331
+ "if": {
332
+ "required": ["capabilityUses"],
333
+ "properties": { "capabilityUses": { "type": "array" } }
334
+ },
335
+ "then": {
336
+ "required": ["capabilityUseContext"],
337
+ "properties": { "capabilityUseContext": { "type": "object" } }
338
+ },
339
+ "else": {
340
+ "not": {
341
+ "anyOf": [
342
+ {
343
+ "required": ["capabilityUseContext"],
344
+ "properties": { "capabilityUseContext": { "type": "object" } }
345
+ },
346
+ {
347
+ "required": ["capabilityDecisions"],
348
+ "properties": { "capabilityDecisions": { "type": "array" } }
349
+ }
350
+ ]
351
+ }
352
+ }
353
+ },
354
+ {
355
+ "if": {
356
+ "required": ["capabilityDecisions"],
357
+ "properties": { "capabilityDecisions": { "type": "array" } }
358
+ },
359
+ "then": {
360
+ "required": ["capabilityUses", "capabilityUseContext"],
361
+ "properties": {
362
+ "capabilityUses": { "type": "array" },
363
+ "capabilityUseContext": { "type": "object" }
364
+ }
365
+ }
366
+ },
367
+ {
368
+ "if": {
369
+ "required": ["legacyInfra"],
370
+ "properties": {
371
+ "legacyInfra": {
372
+ "type": "array",
373
+ "contains": {
374
+ "type": "object",
375
+ "required": ["useId"],
376
+ "properties": { "useId": { "type": "string" } }
377
+ }
378
+ }
379
+ }
380
+ },
381
+ "then": {
382
+ "required": ["capabilityUses", "capabilityUseContext"],
383
+ "properties": {
384
+ "capabilityUses": { "type": "array" },
385
+ "capabilityUseContext": { "type": "object" }
386
+ }
387
+ }
388
+ },
389
+ {
390
+ "if": {
391
+ "required": ["legacyReferences"],
392
+ "properties": {
393
+ "legacyReferences": {
394
+ "type": "array",
395
+ "contains": {
396
+ "type": "object",
397
+ "required": ["useId"],
398
+ "properties": { "useId": { "type": "string" } }
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "then": {
404
+ "required": ["capabilityUses", "capabilityUseContext"],
405
+ "properties": {
406
+ "capabilityUses": { "type": "array" },
407
+ "capabilityUseContext": { "type": "object" }
408
+ }
409
+ }
410
+ }
411
+ ]
148
412
  }
@@ -30,23 +30,20 @@
30
30
  "goal": {
31
31
  "enum": [
32
32
  "install-only",
33
- "install-and-invoke"
33
+ "install-and-invoke",
34
+ "native-lifecycle"
34
35
  ]
35
36
  },
36
37
  "source": {
37
38
  "type": "object",
38
39
  "additionalProperties": false,
39
- "required": [
40
- "type",
41
- "candidateRef",
42
- "sourceManifestSha256",
43
- "membersDigest"
44
- ],
40
+ "required": ["type"],
45
41
  "properties": {
46
42
  "type": {
47
43
  "enum": [
48
44
  "local-staged",
49
- "public-channel"
45
+ "public-channel",
46
+ "local-marketplace"
50
47
  ]
51
48
  },
52
49
  "candidateRef": {
@@ -58,6 +55,21 @@
58
55
  "membersDigest": {
59
56
  "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/sha256"
60
57
  },
58
+ "marketplaceId": {
59
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/opaque"
60
+ },
61
+ "pluginId": {
62
+ "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/opaque"
63
+ },
64
+ "revisions": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": ["v1", "v2"],
68
+ "properties": {
69
+ "v1": { "$ref": "#/$defs/marketplaceRevision" },
70
+ "v2": { "$ref": "#/$defs/marketplaceRevision" }
71
+ }
72
+ },
61
73
  "channel": {
62
74
  "type": "object",
63
75
  "additionalProperties": false,
@@ -86,7 +98,48 @@
86
98
  }
87
99
  }
88
100
  }
89
- }
101
+ },
102
+ "allOf": [
103
+ {
104
+ "if": {
105
+ "properties": { "type": { "const": "local-staged" } },
106
+ "required": ["type"]
107
+ },
108
+ "then": {
109
+ "required": ["candidateRef", "sourceManifestSha256", "membersDigest"],
110
+ "properties": {
111
+ "candidateRef": {}, "sourceManifestSha256": {}, "membersDigest": {},
112
+ "channel": false, "marketplaceId": false, "pluginId": false, "revisions": false
113
+ }
114
+ }
115
+ },
116
+ {
117
+ "if": {
118
+ "properties": { "type": { "const": "public-channel" } },
119
+ "required": ["type"]
120
+ },
121
+ "then": {
122
+ "required": ["candidateRef", "sourceManifestSha256", "membersDigest", "channel"],
123
+ "properties": {
124
+ "candidateRef": {}, "sourceManifestSha256": {}, "membersDigest": {}, "channel": {},
125
+ "marketplaceId": false, "pluginId": false, "revisions": false
126
+ }
127
+ }
128
+ },
129
+ {
130
+ "if": {
131
+ "properties": { "type": { "const": "local-marketplace" } },
132
+ "required": ["type"]
133
+ },
134
+ "then": {
135
+ "required": ["candidateRef", "marketplaceId", "pluginId", "revisions"],
136
+ "properties": {
137
+ "candidateRef": {}, "marketplaceId": {}, "pluginId": {}, "revisions": {},
138
+ "sourceManifestSha256": false, "membersDigest": false, "channel": false
139
+ }
140
+ }
141
+ }
142
+ ]
90
143
  },
91
144
  "host": {
92
145
  "type": "object",
@@ -211,14 +264,17 @@
211
264
  "allOf": [
212
265
  {
213
266
  "if": {
214
- "type": "object",
215
- "properties": {
216
- "goal": {
217
- "const": "install-and-invoke"
267
+ "anyOf": [
268
+ {
269
+ "type": "object",
270
+ "properties": { "goal": { "const": "install-and-invoke" } },
271
+ "required": ["goal"]
272
+ },
273
+ {
274
+ "type": "object",
275
+ "properties": { "goal": { "const": "native-lifecycle" } },
276
+ "required": ["goal"]
218
277
  }
219
- },
220
- "required": [
221
- "goal"
222
278
  ]
223
279
  },
224
280
  "then": {
@@ -284,6 +340,17 @@
284
340
  },
285
341
  "else": {
286
342
  "type": "object",
343
+ "if": {
344
+ "properties": {
345
+ "source": {
346
+ "type": "object",
347
+ "properties": { "type": { "const": "local-staged" } },
348
+ "required": ["type"]
349
+ }
350
+ },
351
+ "required": ["source"]
352
+ },
353
+ "then": {
287
354
  "properties": {
288
355
  "source": {
289
356
  "type": "object",
@@ -299,6 +366,7 @@
299
366
  }
300
367
  }
301
368
  }
369
+ }
302
370
  }
303
371
  },
304
372
  {
@@ -333,6 +401,11 @@
333
401
  "required": [
334
402
  "source"
335
403
  ]
404
+ },
405
+ {
406
+ "type": "object",
407
+ "properties": { "goal": { "const": "native-lifecycle" } },
408
+ "required": ["goal"]
336
409
  }
337
410
  ]
338
411
  },
@@ -348,13 +421,37 @@
348
421
  "properties": {
349
422
  "cliVersion": {},
350
423
  "executableSha256": {}
424
+ }
425
+ }
426
+ },
427
+ "allOf": [
428
+ {
429
+ "if": {
430
+ "type": "object",
431
+ "properties": { "goal": { "const": "native-lifecycle" } },
432
+ "required": ["goal"]
351
433
  },
352
- "required": [
353
- "cliVersion",
354
- "executableSha256"
355
- ]
434
+ "then": {
435
+ "type": "object",
436
+ "properties": {
437
+ "host": {
438
+ "type": "object",
439
+ "properties": { "cliVersion": false, "executableSha256": false }
440
+ }
441
+ }
442
+ },
443
+ "else": {
444
+ "type": "object",
445
+ "properties": {
446
+ "host": {
447
+ "type": "object",
448
+ "required": ["cliVersion", "executableSha256"],
449
+ "properties": { "cliVersion": {}, "executableSha256": {} }
450
+ }
451
+ }
452
+ }
356
453
  }
357
- }
454
+ ]
358
455
  },
359
456
  "else": {
360
457
  "type": "object",
@@ -369,6 +466,34 @@
369
466
  }
370
467
  }
371
468
  }
469
+ },
470
+ {
471
+ "if": {
472
+ "properties": { "goal": { "const": "native-lifecycle" } },
473
+ "required": ["goal"]
474
+ },
475
+ "then": {
476
+ "properties": {
477
+ "source": {
478
+ "type": "object",
479
+ "properties": { "type": { "const": "local-marketplace" } },
480
+ "required": ["type"]
481
+ }
482
+ },
483
+ "required": ["auth", "invocation"]
484
+ }
485
+ }
486
+ ],
487
+ "$defs": {
488
+ "marketplaceRevision": {
489
+ "type": "object",
490
+ "additionalProperties": false,
491
+ "required": ["version", "sourceManifestSha256", "membersDigest"],
492
+ "properties": {
493
+ "version": { "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/host/properties/driverVersion" },
494
+ "sourceManifestSha256": { "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/sha256" },
495
+ "membersDigest": { "$ref": "https://contracts.skill-family.example/v1/host-verification-request.json#/$defs/sha256" }
496
+ }
372
497
  }
373
- ]
498
+ }
374
499
  }