release-skill 0.9.1 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) 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 +78 -0
  7. package/INSTALL.md +2 -2
  8. package/INSTALL.zh-CN.md +2 -2
  9. package/README.md +56 -26
  10. package/README.zh-CN.md +47 -23
  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 +7 -7
  14. package/adapters/claude/bin/error-codes.json +1 -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 +4564 -1997
  18. package/adapters/claude/bin/rules.json +1 -1
  19. package/adapters/claude/schemas/release-project.schema.json +4 -0
  20. package/adapters/claude/schemas/release-run.schema.json +41 -1
  21. package/adapters/claude/skills/release-config/SKILL.md +5 -3
  22. package/adapters/claude/skills/release-docs/SKILL.md +4 -2
  23. package/adapters/claude/skills/release-finish/SKILL.md +2 -0
  24. package/adapters/claude/skills/release-help/SKILL.md +18 -3
  25. package/adapters/claude/skills/release-marketplace/SKILL.md +3 -1
  26. package/adapters/claude/skills/release-prepare/SKILL.md +12 -2
  27. package/adapters/claude/skills/release-publish/SKILL.md +17 -10
  28. package/adapters/claude/skills/release-verify/SKILL.md +2 -0
  29. package/adapters/claude/src/schemas/executable-identity-observation.schema.json +162 -0
  30. package/adapters/claude/src/schemas/filesystem-tree-observation.schema.json +18 -2
  31. package/adapters/claude/src/schemas/plugin-verification-request.schema.json +147 -22
  32. package/adapters/claude/src/schemas/plugin-verification-result.schema.json +436 -18
  33. package/adapters/claude/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  34. package/adapters/claude/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  35. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  36. package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
  37. package/adapters/codex/bin/error-codes.json +1 -1
  38. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  39. package/adapters/codex/bin/registry.json +22 -1
  40. package/adapters/codex/bin/release-skill.bundle.mjs +4564 -1997
  41. package/adapters/codex/bin/rules.json +1 -1
  42. package/adapters/codex/schemas/release-project.schema.json +4 -0
  43. package/adapters/codex/schemas/release-run.schema.json +41 -1
  44. package/adapters/codex/skills/release-config/SKILL.md +5 -3
  45. package/adapters/codex/skills/release-docs/SKILL.md +4 -2
  46. package/adapters/codex/skills/release-finish/SKILL.md +2 -0
  47. package/adapters/codex/skills/release-help/SKILL.md +18 -3
  48. package/adapters/codex/skills/release-marketplace/SKILL.md +3 -1
  49. package/adapters/codex/skills/release-prepare/SKILL.md +12 -2
  50. package/adapters/codex/skills/release-publish/SKILL.md +17 -10
  51. package/adapters/codex/skills/release-verify/SKILL.md +2 -0
  52. package/adapters/codex/src/schemas/executable-identity-observation.schema.json +162 -0
  53. package/adapters/codex/src/schemas/filesystem-tree-observation.schema.json +18 -2
  54. package/adapters/codex/src/schemas/plugin-verification-request.schema.json +147 -22
  55. package/adapters/codex/src/schemas/plugin-verification-result.schema.json +436 -18
  56. package/adapters/codex/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  57. package/adapters/codex/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  58. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  59. package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
  60. package/adapters/kimi/bin/error-codes.json +1 -1
  61. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  62. package/adapters/kimi/bin/registry.json +22 -1
  63. package/adapters/kimi/bin/release-skill.bundle.mjs +4564 -1997
  64. package/adapters/kimi/bin/rules.json +1 -1
  65. package/adapters/kimi/schemas/release-project.schema.json +4 -0
  66. package/adapters/kimi/schemas/release-run.schema.json +41 -1
  67. package/adapters/kimi/skills/release-config/SKILL.md +5 -3
  68. package/adapters/kimi/skills/release-docs/SKILL.md +4 -2
  69. package/adapters/kimi/skills/release-finish/SKILL.md +2 -0
  70. package/adapters/kimi/skills/release-help/SKILL.md +18 -3
  71. package/adapters/kimi/skills/release-marketplace/SKILL.md +3 -1
  72. package/adapters/kimi/skills/release-prepare/SKILL.md +12 -2
  73. package/adapters/kimi/skills/release-publish/SKILL.md +17 -10
  74. package/adapters/kimi/skills/release-verify/SKILL.md +2 -0
  75. package/adapters/kimi/src/schemas/executable-identity-observation.schema.json +162 -0
  76. package/adapters/kimi/src/schemas/filesystem-tree-observation.schema.json +18 -2
  77. package/adapters/kimi/src/schemas/plugin-verification-request.schema.json +147 -22
  78. package/adapters/kimi/src/schemas/plugin-verification-result.schema.json +436 -18
  79. package/adapters/kimi/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  80. package/adapters/kimi/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  81. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  82. package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
  83. package/adapters/workbuddy/bin/error-codes.json +1 -1
  84. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  85. package/adapters/workbuddy/bin/registry.json +22 -1
  86. package/adapters/workbuddy/bin/release-skill.bundle.mjs +4564 -1997
  87. package/adapters/workbuddy/bin/rules.json +1 -1
  88. package/adapters/workbuddy/schemas/release-project.schema.json +4 -0
  89. package/adapters/workbuddy/schemas/release-run.schema.json +41 -1
  90. package/adapters/workbuddy/skills/release-config/SKILL.md +5 -3
  91. package/adapters/workbuddy/skills/release-docs/SKILL.md +4 -2
  92. package/adapters/workbuddy/skills/release-finish/SKILL.md +2 -0
  93. package/adapters/workbuddy/skills/release-help/SKILL.md +18 -3
  94. package/adapters/workbuddy/skills/release-marketplace/SKILL.md +3 -1
  95. package/adapters/workbuddy/skills/release-prepare/SKILL.md +12 -2
  96. package/adapters/workbuddy/skills/release-publish/SKILL.md +17 -10
  97. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -0
  98. package/adapters/workbuddy/src/schemas/executable-identity-observation.schema.json +162 -0
  99. package/adapters/workbuddy/src/schemas/filesystem-tree-observation.schema.json +18 -2
  100. package/adapters/workbuddy/src/schemas/plugin-verification-request.schema.json +147 -22
  101. package/adapters/workbuddy/src/schemas/plugin-verification-result.schema.json +436 -18
  102. package/adapters/workbuddy/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  103. package/adapters/workbuddy/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  104. package/bin/consumer-contract-vectors.json +7 -7
  105. package/bin/error-codes.json +1 -1
  106. package/bin/foundation-resource-binding.json +1 -1
  107. package/bin/registry.json +22 -1
  108. package/bin/release-skill-cli.mjs +58 -2
  109. package/bin/release-skill.bundle.mjs +4564 -1997
  110. package/bin/rules.json +1 -1
  111. package/package.json +5 -5
  112. package/platform-manifest.json +4 -4
  113. package/references/.render-manifest.json +4 -4
  114. package/references/01-state-machine.md +34 -1
  115. package/references/02-project-config.md +20 -0
  116. package/references/05-evidence-and-errors.md +2 -2
  117. package/schemas/release-project.schema.json +4 -0
  118. package/schemas/release-run.schema.json +41 -1
  119. package/skills/release-config/SKILL.md +5 -3
  120. package/skills/release-docs/SKILL.md +4 -2
  121. package/skills/release-finish/SKILL.md +2 -0
  122. package/skills/release-help/SKILL.md +18 -3
  123. package/skills/release-marketplace/SKILL.md +3 -1
  124. package/skills/release-prepare/SKILL.md +12 -2
  125. package/skills/release-publish/SKILL.md +17 -10
  126. package/skills/release-verify/SKILL.md +2 -0
  127. package/skills-src/release-config/SKILL.md +5 -3
  128. package/skills-src/release-docs/SKILL.md +4 -2
  129. package/skills-src/release-finish/SKILL.md +2 -0
  130. package/skills-src/release-help/SKILL.md +18 -3
  131. package/skills-src/release-marketplace/SKILL.md +3 -1
  132. package/skills-src/release-prepare/SKILL.md +12 -2
  133. package/skills-src/release-publish/SKILL.md +17 -10
  134. package/skills-src/release-verify/SKILL.md +2 -0
  135. package/src/commands/post-release-local.mjs +169 -16
  136. package/src/commands/prepare.mjs +321 -11
  137. package/src/commands/route.mjs +597 -18
  138. package/src/commands/setup.mjs +2 -0
  139. package/src/commands/ship.mjs +183 -2
  140. package/src/commands/verify.mjs +21 -0
  141. package/src/core/adoption-assessment.mjs +59 -0
  142. package/src/core/foundation-plugin-verification.mjs +233 -1
  143. package/src/core/hook-cache.mjs +318 -26
  144. package/src/core/hooks.mjs +8 -1
  145. package/src/producers/foundation-resource-projection.mjs +3 -3
  146. package/src/schemas/executable-identity-observation.schema.json +162 -0
  147. package/src/schemas/filesystem-tree-observation.schema.json +18 -2
  148. package/src/schemas/plugin-verification-request.schema.json +147 -22
  149. package/src/schemas/plugin-verification-result.schema.json +436 -18
  150. package/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  151. package/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
@@ -50,12 +50,7 @@
50
50
  "facts": {
51
51
  "type": "object",
52
52
  "additionalProperties": false,
53
- "required": [
54
- "input",
55
- "install",
56
- "discovery",
57
- "invocation"
58
- ],
53
+ "required": [],
59
54
  "properties": {
60
55
  "input": {
61
56
  "type": "object",
@@ -305,6 +300,9 @@
305
300
  ]
306
301
  }
307
302
  }
303
+ },
304
+ "lifecycle": {
305
+ "$ref": "#/$defs/lifecycle"
308
306
  }
309
307
  }
310
308
  },
@@ -337,6 +335,221 @@
337
335
  }
338
336
  },
339
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
+ },
340
553
  {
341
554
  "if": {
342
555
  "properties": {
@@ -531,13 +744,13 @@
531
744
  },
532
745
  {
533
746
  "if": {
534
- "properties": {
535
- "status": {
536
- "const": "failed"
537
- }
538
- },
747
+ "allOf": [
748
+ { "properties": { "status": { "const": "failed" } }, "required": ["status"] },
749
+ { "properties": { "goal": { "enum": ["install-only", "install-and-invoke"] } }, "required": ["goal"] }
750
+ ],
539
751
  "required": [
540
- "status"
752
+ "status",
753
+ "goal"
541
754
  ],
542
755
  "type": "object"
543
756
  },
@@ -670,12 +883,10 @@
670
883
  ],
671
884
  "properties": {
672
885
  "step": {
673
- "enum": [
674
- "version-probe",
675
- "marketplace-add",
676
- "plugin-install",
677
- "plugin-list"
678
- ]
886
+ "type": "string",
887
+ "minLength": 1,
888
+ "maxLength": 128,
889
+ "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
679
890
  },
680
891
  "execution": {
681
892
  "$ref": "#/$defs/execution"
@@ -794,6 +1005,213 @@
794
1005
  "$ref": "https://contracts.skill-family.example/v1/filesystem-tree-observation.json"
795
1006
  }
796
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
+ ]
797
1215
  }
798
1216
  }
799
1217
  }
@@ -0,0 +1,100 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://contracts.skill-family.example/v1/skill-family-directory-verification-request.json",
4
+ "title": "Skill-family directory verification request",
5
+ "description": "A public, closed request for the Kimi skill-family directory adapter. Family roots, member tables, executable identity inputs and authentication sources are private bindings and never occur here.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "kind", "operation", "verificationSetId", "host", "expectedSkills", "familyTree", "workload", "auth"],
9
+ "properties": {
10
+ "schemaVersion": { "const": 1 },
11
+ "kind": { "const": "skill-family.skill-family-directory-verification-request" },
12
+ "operation": { "const": "skill-family-directory-verification" },
13
+ "verificationSetId": { "$ref": "#/$defs/opaque" },
14
+ "host": { "$ref": "#/$defs/host" },
15
+ "expectedSkills": {
16
+ "type": "array",
17
+ "minItems": 2,
18
+ "maxItems": 128,
19
+ "uniqueItems": true,
20
+ "items": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["name", "sourceSha256"],
24
+ "properties": {
25
+ "name": { "$ref": "#/$defs/skillName" },
26
+ "sourceSha256": { "$ref": "#/$defs/sha256" }
27
+ }
28
+ }
29
+ },
30
+ "familyTree": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["sourceManifestSha256", "membersDigest"],
34
+ "properties": {
35
+ "sourceManifestSha256": { "$ref": "#/$defs/sha256" },
36
+ "membersDigest": { "$ref": "#/$defs/sha256" }
37
+ }
38
+ },
39
+ "workload": { "$ref": "#/$defs/workload" },
40
+ "auth": { "$ref": "#/$defs/auth" }
41
+ },
42
+ "$defs": {
43
+ "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
44
+ "opaque": { "type": "string", "minLength": 1, "maxLength": 512, "pattern": "^[^\\u0000\\r\\n]+$" },
45
+ "skillName": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$" },
46
+ "host": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["hostId", "descriptorSha256", "driverId", "driverVersion", "cliVersion"],
50
+ "properties": {
51
+ "hostId": { "const": "kimi-code" },
52
+ "descriptorSha256": { "$ref": "#/$defs/sha256" },
53
+ "driverId": { "const": "kimi-code-print-v1" },
54
+ "driverVersion": { "const": "1.0.0" },
55
+ "cliVersion": { "const": "0.39.1" }
56
+ }
57
+ },
58
+ "semver": { "type": "string", "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?$" },
59
+ "timeoutPolicy": {
60
+ "$ref": "https://contracts.skill-family.example/v1/timeout-policy.json"
61
+ },
62
+ "workload": {
63
+ "type": "object",
64
+ "additionalProperties": false,
65
+ "required": ["effectivePromptSha256", "fixtureClosureDigest", "protectedWorkspaceClosureDigest", "timeoutPolicy", "modelOverridePolicy", "restrictions"],
66
+ "properties": {
67
+ "effectivePromptSha256": { "$ref": "#/$defs/sha256" },
68
+ "fixtureClosureDigest": { "$ref": "#/$defs/sha256" },
69
+ "protectedWorkspaceClosureDigest": { "$ref": "#/$defs/sha256" },
70
+ "timeoutPolicy": { "$ref": "#/$defs/timeoutPolicy" },
71
+ "modelOverridePolicy": { "const": "forbidden" },
72
+ "restrictions": { "$ref": "#/$defs/restrictions" }
73
+ }
74
+ },
75
+ "restrictions": {
76
+ "type": "object",
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "approvalPolicy": { "const": "deny-unattended" },
80
+ "tools": { "const": "skill-only" },
81
+ "mcp": { "const": "disabled" },
82
+ "settingsSources": { "const": "empty" },
83
+ "sessionPersistence": { "const": "disabled" },
84
+ "history": { "const": "fresh" },
85
+ "browserIntegration": { "const": "disabled" },
86
+ "maxTurns": { "type": "integer", "minimum": 1, "maximum": 100 },
87
+ "maxBudgetUsd": { "type": "number", "exclusiveMinimum": 0, "maximum": 100 }
88
+ }
89
+ },
90
+ "auth": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["strategy", "credentialMutation"],
94
+ "properties": {
95
+ "strategy": { "const": "existing-user-state" },
96
+ "credentialMutation": { "const": "host-managed" }
97
+ }
98
+ }
99
+ }
100
+ }