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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +81 -0
- package/INSTALL.md +22 -9
- package/INSTALL.zh-CN.md +15 -8
- package/README.md +40 -35
- package/README.zh-CN.md +31 -29
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/consumer-contract-vectors.json +110 -0
- package/adapters/claude/bin/error-codes.json +8 -1
- package/adapters/claude/bin/foundation-resource-binding.json +1 -1
- package/adapters/claude/bin/registry.json +22 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +4772 -2238
- package/adapters/claude/bin/rules.json +1 -1
- package/adapters/claude/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/claude/schemas/release-project.schema.json +4 -0
- package/adapters/claude/schemas/release-run.schema.json +41 -1
- package/adapters/claude/skills/release-config/SKILL.md +5 -3
- package/adapters/claude/skills/release-docs/SKILL.md +4 -2
- package/adapters/claude/skills/release-finish/SKILL.md +6 -4
- package/adapters/claude/skills/release-help/SKILL.md +14 -5
- package/adapters/claude/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/claude/skills/release-prepare/SKILL.md +4 -2
- package/adapters/claude/skills/release-publish/SKILL.md +19 -10
- package/adapters/claude/skills/release-verify/SKILL.md +2 -0
- package/adapters/claude/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/claude/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/claude/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/claude/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/claude/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/claude/src/schemas/profile-adoption-declaration.schema.json +8 -0
- package/adapters/claude/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/claude/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/consumer-contract-vectors.json +110 -0
- package/adapters/codex/bin/error-codes.json +8 -1
- package/adapters/codex/bin/foundation-resource-binding.json +1 -1
- package/adapters/codex/bin/registry.json +22 -1
- package/adapters/codex/bin/release-skill.bundle.mjs +4772 -2238
- package/adapters/codex/bin/rules.json +1 -1
- package/adapters/codex/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/codex/schemas/release-project.schema.json +4 -0
- package/adapters/codex/schemas/release-run.schema.json +41 -1
- package/adapters/codex/skills/release-config/SKILL.md +5 -3
- package/adapters/codex/skills/release-docs/SKILL.md +4 -2
- package/adapters/codex/skills/release-finish/SKILL.md +6 -4
- package/adapters/codex/skills/release-help/SKILL.md +14 -5
- package/adapters/codex/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/codex/skills/release-prepare/SKILL.md +4 -2
- package/adapters/codex/skills/release-publish/SKILL.md +19 -10
- package/adapters/codex/skills/release-verify/SKILL.md +2 -0
- package/adapters/codex/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/codex/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/codex/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/codex/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/codex/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/codex/src/schemas/profile-adoption-declaration.schema.json +8 -0
- package/adapters/codex/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/codex/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/consumer-contract-vectors.json +110 -0
- package/adapters/kimi/bin/error-codes.json +8 -1
- package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
- package/adapters/kimi/bin/registry.json +22 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +4772 -2238
- package/adapters/kimi/bin/rules.json +1 -1
- package/adapters/kimi/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/kimi/schemas/release-project.schema.json +4 -0
- package/adapters/kimi/schemas/release-run.schema.json +41 -1
- package/adapters/kimi/skills/release-config/SKILL.md +5 -3
- package/adapters/kimi/skills/release-docs/SKILL.md +4 -2
- package/adapters/kimi/skills/release-finish/SKILL.md +6 -4
- package/adapters/kimi/skills/release-help/SKILL.md +14 -5
- package/adapters/kimi/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/kimi/skills/release-prepare/SKILL.md +4 -2
- package/adapters/kimi/skills/release-publish/SKILL.md +19 -10
- package/adapters/kimi/skills/release-verify/SKILL.md +2 -0
- package/adapters/kimi/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/kimi/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/kimi/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/kimi/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/kimi/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/kimi/src/schemas/profile-adoption-declaration.schema.json +8 -0
- package/adapters/kimi/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/kimi/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/consumer-contract-vectors.json +110 -0
- package/adapters/workbuddy/bin/error-codes.json +8 -1
- package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
- package/adapters/workbuddy/bin/registry.json +22 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +4772 -2238
- package/adapters/workbuddy/bin/rules.json +1 -1
- package/adapters/workbuddy/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/workbuddy/schemas/release-project.schema.json +4 -0
- package/adapters/workbuddy/schemas/release-run.schema.json +41 -1
- package/adapters/workbuddy/skills/release-config/SKILL.md +5 -3
- package/adapters/workbuddy/skills/release-docs/SKILL.md +4 -2
- package/adapters/workbuddy/skills/release-finish/SKILL.md +6 -4
- package/adapters/workbuddy/skills/release-help/SKILL.md +14 -5
- package/adapters/workbuddy/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/workbuddy/skills/release-prepare/SKILL.md +4 -2
- package/adapters/workbuddy/skills/release-publish/SKILL.md +19 -10
- package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -0
- package/adapters/workbuddy/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/workbuddy/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/workbuddy/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/workbuddy/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/workbuddy/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/workbuddy/src/schemas/profile-adoption-declaration.schema.json +8 -0
- package/adapters/workbuddy/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/workbuddy/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/bin/consumer-contract-vectors.json +110 -0
- package/bin/error-codes.json +8 -1
- package/bin/foundation-resource-binding.json +1 -1
- package/bin/registry.json +22 -1
- package/bin/release-skill-cli.mjs +72 -4
- package/bin/release-skill.bundle.mjs +4772 -2238
- package/bin/rules.json +1 -1
- package/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/package.json +5 -5
- package/platform-manifest.json +5 -5
- package/references/01-state-machine.md +16 -1
- package/references/05-evidence-and-errors.md +2 -2
- package/schemas/release-project.schema.json +4 -0
- package/schemas/release-run.schema.json +41 -1
- package/skills/release-config/SKILL.md +5 -3
- package/skills/release-docs/SKILL.md +4 -2
- package/skills/release-finish/SKILL.md +6 -4
- package/skills/release-help/SKILL.md +14 -5
- package/skills/release-marketplace/SKILL.md +3 -1
- package/skills/release-prepare/SKILL.md +4 -2
- package/skills/release-publish/SKILL.md +19 -10
- package/skills/release-verify/SKILL.md +2 -0
- package/skills-src/release-config/SKILL.md +5 -3
- package/skills-src/release-docs/SKILL.md +4 -2
- package/skills-src/release-finish/SKILL.md +6 -4
- package/skills-src/release-help/SKILL.md +14 -5
- package/skills-src/release-marketplace/SKILL.md +3 -1
- package/skills-src/release-prepare/SKILL.md +4 -2
- package/skills-src/release-publish/SKILL.md +19 -10
- package/skills-src/release-verify/SKILL.md +2 -0
- package/src/commands/post-release-local.mjs +249 -58
- package/src/commands/prepare.mjs +178 -9
- package/src/commands/route.mjs +597 -18
- package/src/commands/setup.mjs +2 -0
- package/src/commands/ship.mjs +143 -16
- package/src/commands/verify.mjs +21 -0
- package/src/core/adoption-assessment.mjs +59 -0
- package/src/core/derived-artifact-gates.mjs +32 -5
- package/src/core/foundation-plugin-verification.mjs +213 -1
- package/src/core/hook-cache.mjs +318 -26
- package/src/core/hooks.mjs +8 -1
- package/src/producers/foundation-resource-projection.mjs +16 -3
- package/src/schemas/executable-identity-observation.schema.json +162 -0
- package/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/src/schemas/migration-manifest.schema.json +271 -7
- package/src/schemas/plugin-verification-request.schema.json +147 -22
- package/src/schemas/plugin-verification-result.schema.json +436 -18
- package/src/schemas/profile-adoption-declaration.schema.json +8 -0
- package/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.skill-family.example/v1/consumer-contract-vector.json",
|
|
4
|
+
"title": "ConsumerContractVector",
|
|
5
|
+
"description": "A public, version-bound input and expected-observation vector for a Foundation consumer contract.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "kind", "vectorId", "vectorSetId", "capabilityId", "foundationVersion", "contractId", "caseClass", "strategy", "request", "expected"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"kind": { "const": "skill-family.consumer-contract-vector" },
|
|
12
|
+
"vectorId": { "type": "string", "minLength": 1 },
|
|
13
|
+
"vectorSetId": { "type": "string", "minLength": 1 },
|
|
14
|
+
"capabilityId": { "type": "string", "minLength": 1 },
|
|
15
|
+
"foundationVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
|
|
16
|
+
"contractId": { "type": "string", "minLength": 1 },
|
|
17
|
+
"caseClass": { "enum": ["positive", "negative", "indeterminate"] },
|
|
18
|
+
"strategy": { "enum": ["real-pure", "official-fake"] },
|
|
19
|
+
"request": { "type": "object" },
|
|
20
|
+
"expected": {
|
|
21
|
+
"oneOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": ["outcome", "valueRelation"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"outcome": { "const": "return" },
|
|
28
|
+
"valueRelation": { "const": "atomic-write-contained-absolute-target" }
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"required": ["outcome", "value"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"outcome": { "const": "return" },
|
|
37
|
+
"value": {}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"required": ["outcome", "errorCode"],
|
|
44
|
+
"properties": {
|
|
45
|
+
"outcome": { "const": "throw" },
|
|
46
|
+
"errorCode": { "type": "string", "pattern": "^SFC[0-9]{4}$" }
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "object",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"required": ["outcome", "errorCode", "errorKind"],
|
|
53
|
+
"properties": {
|
|
54
|
+
"outcome": { "const": "throw" },
|
|
55
|
+
"errorCode": { "type": "string", "pattern": "^SFC[0-9]{4}$" },
|
|
56
|
+
"errorKind": { "const": "path-traversal" }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["outcome", "allowedStates", "failClosed"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"outcome": { "const": "indeterminate" },
|
|
65
|
+
"allowedStates": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"minItems": 1,
|
|
68
|
+
"items": { "enum": ["return", "throw", "indeterminate"] },
|
|
69
|
+
"uniqueItems": true
|
|
70
|
+
},
|
|
71
|
+
"failClosed": { "const": true }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"allOf": [
|
|
78
|
+
{
|
|
79
|
+
"if": {
|
|
80
|
+
"properties": { "capabilityId": { "const": "foundation.harness.atomic-write" } },
|
|
81
|
+
"required": ["capabilityId"]
|
|
82
|
+
},
|
|
83
|
+
"then": {
|
|
84
|
+
"properties": {
|
|
85
|
+
"request": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": ["root"],
|
|
88
|
+
"properties": { "root": { "$ref": "#/$defs/atomicRoot" } }
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"else": {
|
|
93
|
+
"properties": {
|
|
94
|
+
"request": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"properties": {
|
|
97
|
+
"root": {
|
|
98
|
+
"not": {
|
|
99
|
+
"type": "object",
|
|
100
|
+
"required": ["runtimeBinding"],
|
|
101
|
+
"properties": { "runtimeBinding": { "const": "atomic-write-canonical-root" } }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"if": {
|
|
111
|
+
"properties": {
|
|
112
|
+
"capabilityId": { "const": "foundation.harness.atomic-write" },
|
|
113
|
+
"caseClass": { "const": "negative" }
|
|
114
|
+
},
|
|
115
|
+
"required": ["capabilityId", "caseClass"]
|
|
116
|
+
},
|
|
117
|
+
"then": {
|
|
118
|
+
"properties": {
|
|
119
|
+
"expected": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"required": ["errorKind"],
|
|
122
|
+
"properties": { "errorKind": { "const": "path-traversal" } }
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"else": {
|
|
127
|
+
"properties": {
|
|
128
|
+
"expected": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"not": {
|
|
131
|
+
"required": ["errorKind"],
|
|
132
|
+
"properties": { "errorKind": true }
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"$defs": {
|
|
140
|
+
"atomicRoot": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": ["runtimeBinding"],
|
|
144
|
+
"properties": {
|
|
145
|
+
"runtimeBinding": { "const": "atomic-write-canonical-root" }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
@@ -601,7 +601,47 @@
|
|
|
601
601
|
"foundationStatus": { "const": "observed" },
|
|
602
602
|
"payloadMatches": { "const": true },
|
|
603
603
|
"observationDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
604
|
-
"observedAt": { "type": "string", "format": "date-time" }
|
|
604
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
605
|
+
"extraInstalledPaths": {
|
|
606
|
+
"type": "array",
|
|
607
|
+
"minItems": 1,
|
|
608
|
+
"uniqueItems": true,
|
|
609
|
+
"items": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*\\/\\/)(?!.*\\u0000)(?!.*\\/$).+$"
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"extraInstalledLinks": {
|
|
615
|
+
"type": "array",
|
|
616
|
+
"minItems": 1,
|
|
617
|
+
"uniqueItems": true,
|
|
618
|
+
"items": {
|
|
619
|
+
"type": "object",
|
|
620
|
+
"additionalProperties": false,
|
|
621
|
+
"required": ["path", "targetBase64", "bytes", "statMode"],
|
|
622
|
+
"properties": {
|
|
623
|
+
"path": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*\\/\\/)(?!.*\\u0000)(?!.*\\/$).+$"
|
|
626
|
+
},
|
|
627
|
+
"targetBase64": {
|
|
628
|
+
"type": "string",
|
|
629
|
+
"minLength": 4,
|
|
630
|
+
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
|
|
631
|
+
},
|
|
632
|
+
"bytes": {
|
|
633
|
+
"type": "integer",
|
|
634
|
+
"minimum": 1,
|
|
635
|
+
"maximum": 9007199254740991
|
|
636
|
+
},
|
|
637
|
+
"statMode": {
|
|
638
|
+
"type": "integer",
|
|
639
|
+
"minimum": 0,
|
|
640
|
+
"maximum": 65535
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
605
645
|
}
|
|
606
646
|
}
|
|
607
647
|
},
|
|
@@ -46,7 +46,7 @@ prepare 的真实输出是 plan 内的 `workflowDecision`。
|
|
|
46
46
|
|
|
47
47
|
## 正向执行路径
|
|
48
48
|
|
|
49
|
-
1. 运行 `release-skill route --root <path> --json` 获取 diff
|
|
49
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类;已知目标版本时显式传入,route 只是工作流建议
|
|
50
50
|
2. 若推荐 `workflowKind === 'config-only'`,则使用本技能
|
|
51
51
|
3. 执行步骤②:运行 `release-skill assess --root <path> --offline --json` 进行 schema validation
|
|
52
52
|
4. 执行步骤③:运行 `release-skill prepare --offline --workflow config --target-version <ver> --json`
|
|
@@ -61,8 +61,10 @@ prepare 的真实输出是 plan 内的 `workflowDecision`。
|
|
|
61
61
|
## 确定性脚本调用
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
# Step 1: Diff classification confirmation (config-only)
|
|
64
|
+
# Step 1: Diff classification confirmation (config-only; pass the known target)
|
|
65
65
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
66
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
67
|
+
--root <path> --target-version <version> --json
|
|
66
68
|
|
|
67
69
|
# Step 2: Assess with schema validation
|
|
68
70
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
@@ -96,7 +98,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" verify \
|
|
|
96
98
|
| prepare 检测到基线漂移 | BASELINE_DRIFT_DETECTED | 人工审查 drift 后决定是否继续或回滚 |
|
|
97
99
|
| workflowDecision 不可判定(无对比 plan) | indeterminable | fail-safe 到 publish-needed,走场景 B |
|
|
98
100
|
| approval expired | APPROVAL_EXPIRED | 重新执行 approve,digest 必须匹配 |
|
|
99
|
-
| remote conflict at publish | REMOTE_CONFLICT |
|
|
101
|
+
| remote conflict at publish | REMOTE_CONFLICT | 人工决策;不得 force override 或覆盖远端状态 |
|
|
100
102
|
|
|
101
103
|
## 决策树 (Step 4)
|
|
102
104
|
|
|
@@ -36,7 +36,7 @@ plan 记录 `workflowKind: 'docs'` 与 `workflowDecision`(绑定进 plan diges
|
|
|
36
36
|
|
|
37
37
|
## 正向执行路径
|
|
38
38
|
|
|
39
|
-
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff
|
|
39
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类和工作流建议;已知目标版本时显式传入,route 不承担发布授权
|
|
40
40
|
2. 若推荐 `workflowKind === 'docs-only'`,则使用本技能
|
|
41
41
|
3. 执行步骤②:调用 `check-style.mjs <doc-path>...` 执行事实/可读性/风格检查
|
|
42
42
|
4. 执行步骤③:调用 `render-public-site.mjs --check [--repo <name>]` 验证渲染无漂移
|
|
@@ -49,8 +49,10 @@ plan 记录 `workflowKind: 'docs'` 与 `workflowDecision`(绑定进 plan diges
|
|
|
49
49
|
## 确定性脚本调用
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
# Step 1: Diff classification (from release-skill route)
|
|
52
|
+
# Step 1: Diff classification (from release-skill route; pass the known target)
|
|
53
53
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
54
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
55
|
+
--root <path> --target-version <version> --json
|
|
54
56
|
|
|
55
57
|
# Step 2: Style-guard three gates (check-style.mjs takes file paths only)
|
|
56
58
|
node "${WORKBUDDY_ROOT}/adapters/workbuddy/skills/skill-family-docs-style-guard/scripts/check-style.mjs" \
|
|
@@ -21,6 +21,7 @@ description: 发布达到 VERIFIED 后处理可选的本地收尾:按发布分
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
24
|
+
--root <project-root> \
|
|
24
25
|
--plan <plan-path> \
|
|
25
26
|
--run <verified-run-path> \
|
|
26
27
|
--json
|
|
@@ -42,6 +43,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
45
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
46
|
+
--root <project-root> \
|
|
45
47
|
--plan <plan-path> \
|
|
46
48
|
--run <verified-run-path> \
|
|
47
49
|
--update-local-hosts \
|
|
@@ -52,13 +54,13 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
52
54
|
|
|
53
55
|
只传用户选择且计划声明的宿主。宿主 CLI 不存在时返回 `SKIPPED_NOT_INSTALLED`。各宿主按以下规则处理:
|
|
54
56
|
|
|
55
|
-
- Claude
|
|
56
|
-
- Kimi
|
|
57
|
-
- CodeBuddy/WorkBuddy
|
|
57
|
+
- Claude 先重新绑定冻结市场,再重新观察安装状态;旧插件若仍存在,才调用正式更新命令。Codex 继续按正式市场协议移除并安装冻结的 Git 引用。两者都在安装后核对插件、市场、版本和市场检出提交。
|
|
58
|
+
- Kimi 的精确当前安装会在返回 `ALREADY_CURRENT` 前核对真实载荷;发生安装或迁移时,只在操作完成后核对结果。包名、版本、发布标签、已安装修订号和受管安装根必须与冻结计划一致;`.git` 只提供附加诊断,不是通过条件。旧的本地路径安装会在同一个受控终端交互界面(TUI)会话中先移除,再按发布标签安装、确认信任并重新加载。
|
|
59
|
+
- CodeBuddy/WorkBuddy 只处理同一 bundled-family 插件和市场。只有冻结标签与计划声明的可变分支都从同一远端解析到冻结提交时,才调用正式市场更新和插件更新命令;完成后重新读取安装列表,并精确核对唯一条目的市场、版本和修订号。目标未安装、来源不符、远端不可访问或身份不一致时返回 `MANUAL_REQUIRED`,不修改宿主。
|
|
58
60
|
|
|
59
61
|
任何宿主失败都保留其他宿主的实际结果,不回滚,也不把失败冒充成功。
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
完成后报告每个宿主的状态,并提醒用户重启已更新的宿主。本机结果只记录收尾事实,不改变发布状态。
|
|
62
64
|
|
|
63
65
|
## 临时归属
|
|
64
66
|
|
|
@@ -12,11 +12,17 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
12
12
|
## 职责
|
|
13
13
|
|
|
14
14
|
- 依赖和环境检查:Node.js >= 22、Git 决定本地准备就绪度;npm/gh 另行决定生产依赖就绪度
|
|
15
|
-
- 能力说明:缺少配置时走 `help → setup → assess`;已有配置的安全默认路径是 `help → assess → prepare --offline`;日常生产发布优先使用可恢复的 `ship`,兼容的分阶段闭环仍是 `prepare --online --production → approve → publish → verify`
|
|
15
|
+
- 能力说明:缺少配置时走 `help → setup → assess`;已有配置的安全默认路径是 `help → assess → prepare --offline`;日常生产发布优先使用可恢复的 `ship`,兼容的分阶段闭环仍是 `prepare --online --production → approve → publish → verify`。冻结计划批准是正常发布级流程的唯一批准门;声明 `requiresApproval: true` 的 postPublish hook 仍须等待独立 checkpoint 批准
|
|
16
16
|
- 最小示例:展示从 release-help 到 release-assess 的最短路径
|
|
17
17
|
- 只读诊断:运行 dry-run 检查,不修改任何文件
|
|
18
18
|
- 故障引导:根据错误码指向对应的修复 Skill
|
|
19
19
|
|
|
20
|
+
## 0.9.3 候选边界
|
|
21
|
+
|
|
22
|
+
当前源码候选已接入四项工作流保护、Hook cache v2 和稳定隔离安装树记录。三项 Foundation 依赖精确使用 0.15.0 的公开包根 API。Hook cache 只复用绝对路径或经真实 cwd 校验的 cwd-relative executable identity;裸 PATH、PATHEXT、Windows 和观察不可用时,Hook 仍冷执行,缓存复用失败关闭且不写入 v2 cache。缓存没有 TTL。
|
|
23
|
+
|
|
24
|
+
稳定隔离安装树记录只在宿主命令退出、目录已隔离且扫描期间没有并发写入时执行;宿主附加链接只记录、不跟随,声明载荷中的 symlink 失败关闭,legacy 全树语义保持不变。0.9.3 仍是源码候选,不能从本说明推断已批准、发布或验证。
|
|
25
|
+
|
|
20
26
|
**阶段通过规则**: `status` 与 `readiness.localPreparation.status` 只判断本地 help/assess/prepare;其充要条件是 `READY` 且 exit code 为 0。`missingRequired` 列出缺失的 Node/Git。生产发布必须另外读取 `readiness.productionPublish`:缺少 npm/gh 时为 `NOT_READY`,依赖存在时仍是 `AUTH_CHECK_REQUIRED`,因为 help 不访问网络、不验证认证。Agent 无权把本地就绪解释为生产就绪。
|
|
21
27
|
|
|
22
28
|
**边界**: help 不修改文件系统、不执行外部写操作、不生成发布计划。优先探测 PATH 上的全局安装命令 `release-skill`,不可用时回退到源码路径。每个 unit 必须配置 `previousPublicBaseline`:首次发布且确认无前序版本用 none,已有版本用 bound + repo/ref/commit;none 不是绕过 publish 唯一性预检的开关。v0.1.1 已完成 GitHub/npm 真实生产发布、冻结 Git ref 的 Claude/Codex 消费者安装、精确 npm 安装 smoke 与最终 VERIFIED;生产等价本地协议套件继续覆盖 fake gh/npm/Claude/Codex 和本地 bare Git。测试未做 OS 级禁网,且一次成功发布不能证明其他项目的认证、权限、限流或最终一致性行为;每个项目的首次生产发布仍应作为受监控 canary。
|
|
@@ -26,7 +32,7 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
26
32
|
1. 使用插件根相对路径运行 CLI:`node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" help --json`
|
|
27
33
|
2. 检查 `readiness.localPreparation`;需要生产发布时再检查 `readiness.productionPublish`
|
|
28
34
|
3. 若环境就绪且缺少 `.release-skill/project.yaml`,先路由 `release-setup`;配置已存在才运行 `release-assess`
|
|
29
|
-
4.
|
|
35
|
+
4. 默认在审阅本地计划和快照后停止;只有用户明确要求且完成摘要审批时才进入 `release-publish`。已持有合法批准的 production plan 时,publish 自行完成权威校验,不把 route 当作授权门
|
|
30
36
|
|
|
31
37
|
## 确定性脚本调用
|
|
32
38
|
|
|
@@ -35,7 +41,8 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
35
41
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" help --json
|
|
36
42
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" setup --root <path> --json
|
|
37
43
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
38
|
-
#
|
|
44
|
+
# 日常发布快速路径:发布前确认可读计划摘要,状态文件可恢复。
|
|
45
|
+
# 受限 postPublish hook 的 checkpoint 批准与计划批准分开。
|
|
39
46
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> --target-version <version> --json
|
|
40
47
|
# 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
|
|
41
48
|
# 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
|
|
@@ -75,7 +82,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
|
75
82
|
| CLI 入口不存在 | 确认 `${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs` 存在;不存在时重新安装插件 |
|
|
76
83
|
| 项目配置不存在 | 路由 `release-setup`,默认只读;不得直接生成或覆盖 README/配置 |
|
|
77
84
|
| assess 失败 | 运行 `node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --offline --json` 获取详情 |
|
|
78
|
-
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound
|
|
85
|
+
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound 基线;人工审阅后直接调用 `release-publish`,由 publish 自行完成计划、approval、digest、远端冲突和 `PARTIAL` 校验 |
|
|
79
86
|
| RELEASE_DOCS_INVALID | 配置或说明源语义非法(重复键、alias、未知字段、版本漂移等);修正配置或说明源后重新演练 |
|
|
80
87
|
| RELEASE_DOCS_TRANSLATION_MISSING | 配置语种缺失或多余;补齐说明源语种,与 `releaseDocuments.locales` 完全一致,不得回退 |
|
|
81
88
|
|
|
@@ -84,8 +91,10 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
|
84
91
|
对于不清楚如何开始的用户,推荐使用 `release-skill route` 命令进行自动化工作流选择:
|
|
85
92
|
|
|
86
93
|
```bash
|
|
87
|
-
#
|
|
94
|
+
# 快速分类变更并推荐工作流;已知目标版本时显式传入,未知时省略
|
|
88
95
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
96
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> \
|
|
97
|
+
--target-version <version> --json
|
|
89
98
|
|
|
90
99
|
# JSON 输出包含 classification 和 recommendation 字段
|
|
91
100
|
{
|
|
@@ -44,7 +44,7 @@ byte、platform manifest 是核心 gate,由 workspace 自己的生成器与
|
|
|
44
44
|
|
|
45
45
|
## 正向执行路径
|
|
46
46
|
|
|
47
|
-
1. 运行 `release-skill route --root <path> --json` 获取 diff
|
|
47
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类;已知目标版本时显式传入,route 只是工作流建议
|
|
48
48
|
2. 若推荐 `workflowKind === 'marketplace-only'`,则使用本技能
|
|
49
49
|
3. 执行步骤②:手动审查并更新 `plugins.mjs`(唯一 truth source)
|
|
50
50
|
4. 执行步骤③:调用 workspace 自己的生成器再生成 `public-snapshot/`
|
|
@@ -59,6 +59,8 @@ byte、platform manifest 是核心 gate,由 workspace 自己的生成器与
|
|
|
59
59
|
# Step 1: Diff classification confirmation (marketplace-only)
|
|
60
60
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
61
61
|
--root <workspace-root> --json
|
|
62
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
63
|
+
--root <workspace-root> --target-version <version> --json
|
|
62
64
|
|
|
63
65
|
# Step 2: Manual review and update plugins.mjs
|
|
64
66
|
# Human-in-the-loop: entry is the sole truth source
|
|
@@ -13,6 +13,8 @@ description: Freeze an immutable release plan with local configuration, document
|
|
|
13
13
|
|
|
14
14
|
运行项目构建/测试 hook,生成公开快照并扫描泄漏,冻结不可变发布计划。prepare 自身不调用发布 adapter,但会执行用户配置的 hook。
|
|
15
15
|
|
|
16
|
+
0.9.3 候选的 Hook cache v2 只复用有完整身份和输入证据的成功 Hook 结果。裸 PATH、PATHEXT、Windows、TTL、损坏记录或 Foundation 观察不可用时,缓存保持失败关闭,Hook 仍按完整路径冷执行;该机制不改变 prepare 的计划、批准和发布权威。
|
|
17
|
+
|
|
16
18
|
**Hook 授权契约(配置时刻即授权,FM-16 处置 A)**: hook 是任意本地进程——在 `.release-skill/project.yaml` 中配置 hook 命令即完成授权,构成「配置时刻即授权」的显式契约。hook 不提供沙箱、无文件系统/网络隔离、触发前无确认点,命令调用本身即授权执行已配置的 hook 和 gate,不再设置额外人工授权环节;hook 可能产生项目目录外的副作用或远端写入,配置者须对其内容负责。旧参数 `--acknowledge-hook-side-effects` 和 `--acknowledge-gate-side-effects` 仍可解析,但只作为无效果的兼容输入,不能改变授权或执行语义。恢复「触发前强制确认门」属于后续加固项(属设计变更,需随新版本引入),当前版本不提供该确认门。
|
|
17
19
|
|
|
18
20
|
**阶段通过规则**: 本阶段的通过只能由 CLI exit code 0 和结构化状态码 `PREPARED` 确认。Agent 无权自行宣布计划冻结成功。
|
|
@@ -29,7 +31,7 @@ description: Freeze an immutable release plan with local configuration, document
|
|
|
29
31
|
2. 配置含 `releaseDocuments` 时,先运行只读演练 `${CLI} docs refresh --unit <id> --json`;`status: "changes"` 时展示逐文件路径/语种/版本/`refreshDigest`,取得"本地发布文档写入"明确授权后才执行 `nextCommand.argv` 写入,审阅并提交刷新结果后再继续;`status: "clean"` 时直接进入 prepare
|
|
30
32
|
3. 运行 `${CLI} prepare --root <path> --offline --json`
|
|
31
33
|
4. 检查 exit code 0,读取 JSON 返回的 immutable `planPath=plans/<planDigest>.json`,再从该文件读取 `status`、`units`、`externalActions`
|
|
32
|
-
5. 向用户展示可读的 `approvalSummary
|
|
34
|
+
5. 向用户展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部外部动作、例外,以及需要独立 checkpoint 批准的 postPublish hook。`planDigest` 仅作为内部绑定字段,不要求用户复制或确认。后续 approve/publish 只能使用该 immutable planPath,等待确认后再 approve。计划批准不包含受限 postPublish hook 的 checkpoint 批准
|
|
33
35
|
|
|
34
36
|
若用户明确要求 GitHub+npm 生产发布,加入 `--production`。该模式还会封存独立
|
|
35
37
|
Git commit/tree 和 npm tarball,并把路径、SHA/integrity、branch/tag 写入计划。
|
|
@@ -89,4 +91,4 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --onlin
|
|
|
89
91
|
|
|
90
92
|
## 后续引导
|
|
91
93
|
|
|
92
|
-
计划冻结后,读取命令返回的 immutable `planPath` 和 `approvalSummary` 展示给用户,等待确认后再 approve。`planDigest` 由系统自动计算和绑定,不作为人工交互口令。`release-plan.json` 等 latest alias 只用于浏览,不得作为生产 authority
|
|
94
|
+
计划冻结后,读取命令返回的 immutable `planPath` 和 `approvalSummary` 展示给用户,等待确认后再 approve。`planDigest` 由系统自动计算和绑定,不作为人工交互口令。`release-plan.json` 等 latest alias 只用于浏览,不得作为生产 authority 传递。冻结计划批准是正常发布级流程的唯一批准门;有效 `requiresApproval: true` 的 postPublish hook 仍须使用绑定 `(planDigest, hookId)` 且最长有效 24 小时的独立 checkpoint 批准。
|
|
@@ -21,16 +21,23 @@ description: "从已批准的生产计划发布冻结 Git branch/tag、npm tarba
|
|
|
21
21
|
|
|
22
22
|
## 前置条件:工作流选择
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
调用方持有合法、未过期且绑定当前 production plan 的 approval record 时,
|
|
25
|
+
`release-publish` 直接执行自身的计划、批准、冻结制品身份和远端预检。`route` 只提供
|
|
26
|
+
工作流建议,不是已批准 production plan 的授权门。
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
尚未形成计划时,可以先使用 `release-skill route --root <path> --json` 确定变更类型。
|
|
29
|
+
已知目标版本时一并传入 `--target-version <version>`,使恢复建议只读取与该目标绑定的
|
|
30
|
+
完整运行血缘。未传目标时,route 仍按 diff/baseline 选择工作流;历史 diagnostics 只作
|
|
31
|
+
报告,不得覆盖当前建议。
|
|
32
|
+
|
|
33
|
+
根据推荐的 `workflowKind` 选择对应路径:
|
|
34
|
+
|
|
35
|
+
- `docs-only` → 先执行 `release-docs` 完整流程
|
|
36
|
+
- `config-only` → 先执行 `release-config`,仅在 public surface 变化时进入 publish
|
|
37
|
+
- `marketplace-only` → 先执行 `release-marketplace`,然后由 workspace exclusive skill 接管
|
|
38
|
+
- `full-happy-end` → 直接进入标准完整流程:`prepare → approve → publish → verify`
|
|
39
|
+
- `reconcile` → 先执行 `release-reconcile` 恢复 PARTIAL 状态
|
|
40
|
+
- `help` → 无变更,无需 publish
|
|
34
41
|
|
|
35
42
|
**注意**: `release-publish` 是标准工作流中的第⑦步,必须在以下步骤之后:
|
|
36
43
|
- 步骤⑤: `release-prepare` (或轻量级 prepare)
|
|
@@ -44,10 +51,12 @@ description: "从已批准的生产计划发布冻结 Git branch/tag、npm tarba
|
|
|
44
51
|
|
|
45
52
|
## 授权门
|
|
46
53
|
|
|
47
|
-
1. 展示可读的 `approvalSummary
|
|
54
|
+
1. 展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部 actions、例外,以及需要独立 checkpoint 批准的 postPublish hook。
|
|
48
55
|
2. 必须存在未过期且由系统绑定同一内部 digest 的 approval record;批准后不再要求用户复制摘要做二次确认。
|
|
49
56
|
3. 只有 CLI exit code 0 且结构化状态为 `PUBLISHED` 才算外写阶段通过;随后必须运行 verify,只有 `VERIFIED` 才是完整终态。
|
|
50
57
|
|
|
58
|
+
冻结计划批准是正常发布级流程的唯一批准门。它包含计划内的外部动作和验证门禁,不包含有效 `requiresApproval: true` 的 postPublish checkpoint。这类 hook 仍须使用绑定 `(planDigest, hookId)` 且最长有效 24 小时的独立批准记录。
|
|
59
|
+
|
|
51
60
|
## 确定性执行
|
|
52
61
|
|
|
53
62
|
```bash
|
|
@@ -29,6 +29,8 @@ verify 只接受 `PUBLISHED` 状态的源 run;`VERIFIED` 是终态,不会再
|
|
|
29
29
|
|
|
30
30
|
验证远端所有自动化 action 的实际状态与冻结计划一致。执行精确 `<package>@<version>` npm 安装到隔离目录,验证包名、版本、静态入口闭包,并在配置时验证 bin 路径安全和 CLI 烟雾输出。对 Claude/Codex marketplace distribution 执行全新隔离消费者安装验证。新计划中的 Kimi/CodeBuddy 安装只返回 `manualFollowUps`,明确标记 `verifiedBySystem: false`,不阻塞 `VERIFIED`;缺少该策略字段的旧冻结计划继续走历史 attestation 兼容路径。
|
|
31
31
|
|
|
32
|
+
0.9.3 的稳定隔离安装树记录只消费宿主命令退出后的隔离树观察:宿主附加 link 记录自身但不跟随,声明载荷 symlink 失败关闭,legacy 全树语义保持不变。该观察属于安装树事实,不替代远端状态、发布计划或 `VERIFIED` 判断。
|
|
33
|
+
|
|
32
34
|
**attestation 证明力边界**: `attest` 命令记录的旧计划兼容人工证明(`humanConfirmed: true` → `PASSED_MANUAL`)是本地自声明收据,不是签名见证:`--actor` 仅做非空字符串校验,无外部签名或身份核验,任何能运行 CLI 的进程都能自称任意 actor;伪造收据需写 `.release-skill` authority 目录,与直接改写收据文件属同一信任边界。因此旧兼容路径的人工证明只用于旧冻结计划收尾,不构成独立可审计的人工见证。新计划的 Kimi/CodeBuddy 安装一律走 `manualFollowUps`(`verifiedBySystem: false`),不参与 `VERIFIED` 终态判定。
|
|
33
35
|
|
|
34
36
|
**阶段通过规则**: 只有 CLI exit code 0 和结构化状态码 `VERIFIED` 才是完整终态。
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://contracts.skill-family.example/v1/executable-identity-observation.json",
|
|
4
|
+
"title": "Executable identity observation",
|
|
5
|
+
"description": "A single, private observation of an executable lookup and its explicit launch image. Absolute roots and file bytes are intentionally represented only by the bound root and digest facts.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["schemaVersion", "kind", "lookup", "canonicalEntry", "interpreter", "launch", "observationDigest"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"schemaVersion": { "const": 1 },
|
|
11
|
+
"kind": { "const": "skill-family.executable-identity-observation" },
|
|
12
|
+
"lookup": { "$ref": "#/$defs/lookup" },
|
|
13
|
+
"canonicalEntry": { "$ref": "#/$defs/canonicalEntry" },
|
|
14
|
+
"interpreter": {
|
|
15
|
+
"oneOf": [
|
|
16
|
+
{ "type": "null" },
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["request", "canonicalEntry", "shebangArgs"],
|
|
21
|
+
"properties": {
|
|
22
|
+
"request": {
|
|
23
|
+
"oneOf": [
|
|
24
|
+
{ "$ref": "#/$defs/bareCommand" },
|
|
25
|
+
{ "$ref": "#/$defs/absolutePath" }
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"canonicalEntry": {
|
|
29
|
+
"allOf": [
|
|
30
|
+
{ "$ref": "#/$defs/canonicalEntry" },
|
|
31
|
+
{ "type": "object", "properties": { "entryKind": { "const": "native-binary" } } }
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"shebangArgs": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"maxItems": 8,
|
|
37
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[^\\u0000\\r\\n]+$" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"launch": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"required": ["file", "argvPrefix"],
|
|
47
|
+
"properties": {
|
|
48
|
+
"file": { "$ref": "#/$defs/absolutePath" },
|
|
49
|
+
"argvPrefix": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"maxItems": 8,
|
|
52
|
+
"items": { "$ref": "#/$defs/absolutePath" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"observationDigest": { "$ref": "#/$defs/sha256" }
|
|
57
|
+
},
|
|
58
|
+
"allOf": [
|
|
59
|
+
{
|
|
60
|
+
"if": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"properties": { "canonicalEntry": { "type": "object", "properties": { "entryKind": { "const": "interpreter-script" } }, "required": ["entryKind"] } },
|
|
63
|
+
"required": ["canonicalEntry"]
|
|
64
|
+
},
|
|
65
|
+
"then": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"interpreter": { "type": "object" },
|
|
69
|
+
"launch": { "type": "object", "properties": { "argvPrefix": { "type": "array", "minItems": 1 } } }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"else": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {
|
|
75
|
+
"interpreter": { "type": "null" },
|
|
76
|
+
"launch": { "type": "object", "properties": { "argvPrefix": { "type": "array", "maxItems": 0 } } }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"$defs": {
|
|
82
|
+
"sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
83
|
+
"absolutePath": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"minLength": 1,
|
|
86
|
+
"maxLength": 4096,
|
|
87
|
+
"pattern": "^/(?:[^/\\\\\\u0000]+(?:/[^/\\\\\\u0000]+)*)?$",
|
|
88
|
+
"not": { "pattern": "(?:^|/)\\.{1,2}(?:/|$)" }
|
|
89
|
+
},
|
|
90
|
+
"relativePath": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"maxLength": 4096,
|
|
94
|
+
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*(?:^|/)\\.(?:/|$))(?!.*\\\\)(?!.*\\u0000)[^/\\\\\\u0000]+(?:/[^/\\\\\\u0000]+)*$"
|
|
95
|
+
},
|
|
96
|
+
"bareCommand": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"maxLength": 256,
|
|
100
|
+
"pattern": "^[^/\\\\\\u0000]+$"
|
|
101
|
+
},
|
|
102
|
+
"rootBinding": { "$ref": "https://contracts.skill-family.example/v1/filesystem-root-binding.json" },
|
|
103
|
+
"lookup": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": false,
|
|
106
|
+
"required": ["requested", "mode", "selectedPath"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"requested": { "type": "string", "minLength": 1, "maxLength": 4096 },
|
|
109
|
+
"mode": { "enum": ["absolute-path", "explicit-path-search"] },
|
|
110
|
+
"path": { "$ref": "#/$defs/absolutePath" },
|
|
111
|
+
"pathEntries": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"minItems": 1,
|
|
114
|
+
"maxItems": 64,
|
|
115
|
+
"uniqueItems": true,
|
|
116
|
+
"items": { "$ref": "#/$defs/absolutePath" }
|
|
117
|
+
},
|
|
118
|
+
"selectedPath": { "$ref": "#/$defs/absolutePath" }
|
|
119
|
+
},
|
|
120
|
+
"allOf": [
|
|
121
|
+
{
|
|
122
|
+
"if": { "type": "object", "properties": { "mode": { "const": "absolute-path" } }, "required": ["mode"] },
|
|
123
|
+
"then": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"required": ["path"],
|
|
126
|
+
"properties": { "path": {}, "pathEntries": false }
|
|
127
|
+
},
|
|
128
|
+
"else": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": ["pathEntries"],
|
|
131
|
+
"properties": { "pathEntries": {}, "path": false }
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"symlink": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"required": ["path", "targetBase64", "bytes"],
|
|
140
|
+
"properties": {
|
|
141
|
+
"path": { "$ref": "#/$defs/absolutePath" },
|
|
142
|
+
"targetBase64": { "type": "string", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" },
|
|
143
|
+
"bytes": { "type": "integer", "minimum": 0, "maximum": 1048576 }
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"canonicalEntry": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"additionalProperties": false,
|
|
149
|
+
"required": ["path", "symlinkChain", "binding", "relPath", "sha256", "bytes", "statMode", "entryKind"],
|
|
150
|
+
"properties": {
|
|
151
|
+
"path": { "$ref": "#/$defs/absolutePath" },
|
|
152
|
+
"symlinkChain": { "type": "array", "maxItems": 40, "items": { "$ref": "#/$defs/symlink" } },
|
|
153
|
+
"binding": { "$ref": "#/$defs/rootBinding" },
|
|
154
|
+
"relPath": { "$ref": "#/$defs/relativePath" },
|
|
155
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
156
|
+
"bytes": { "type": "integer", "minimum": 0, "maximum": 1073741824 },
|
|
157
|
+
"statMode": { "type": "integer", "minimum": 0, "maximum": 4294967295 },
|
|
158
|
+
"entryKind": { "enum": ["native-binary", "interpreter-script", "opaque-executable"] }
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|