release-skill 0.9.0 → 0.9.1
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 +32 -0
- package/INSTALL.md +22 -9
- package/INSTALL.zh-CN.md +15 -8
- package/README.md +37 -30
- package/README.zh-CN.md +32 -27
- 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 +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +1719 -1291
- package/adapters/claude/bin/rules.json +1 -1
- package/adapters/claude/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/claude/skills/release-finish/SKILL.md +4 -4
- package/adapters/claude/skills/release-help/SKILL.md +3 -2
- package/adapters/claude/skills/release-prepare/SKILL.md +2 -2
- package/adapters/claude/skills/release-publish/SKILL.md +3 -1
- package/adapters/claude/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/claude/src/schemas/profile-adoption-declaration.schema.json +8 -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 +1 -1
- package/adapters/codex/bin/release-skill.bundle.mjs +1719 -1291
- package/adapters/codex/bin/rules.json +1 -1
- package/adapters/codex/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/codex/skills/release-finish/SKILL.md +4 -4
- package/adapters/codex/skills/release-help/SKILL.md +3 -2
- package/adapters/codex/skills/release-prepare/SKILL.md +2 -2
- package/adapters/codex/skills/release-publish/SKILL.md +3 -1
- package/adapters/codex/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/codex/src/schemas/profile-adoption-declaration.schema.json +8 -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 +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +1719 -1291
- package/adapters/kimi/bin/rules.json +1 -1
- package/adapters/kimi/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/kimi/skills/release-finish/SKILL.md +4 -4
- package/adapters/kimi/skills/release-help/SKILL.md +3 -2
- package/adapters/kimi/skills/release-prepare/SKILL.md +2 -2
- package/adapters/kimi/skills/release-publish/SKILL.md +3 -1
- package/adapters/kimi/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/kimi/src/schemas/profile-adoption-declaration.schema.json +8 -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 +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +1719 -1291
- package/adapters/workbuddy/bin/rules.json +1 -1
- package/adapters/workbuddy/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/adapters/workbuddy/skills/release-finish/SKILL.md +4 -4
- package/adapters/workbuddy/skills/release-help/SKILL.md +3 -2
- package/adapters/workbuddy/skills/release-prepare/SKILL.md +2 -2
- package/adapters/workbuddy/skills/release-publish/SKILL.md +3 -1
- package/adapters/workbuddy/src/schemas/migration-manifest.schema.json +271 -7
- package/adapters/workbuddy/src/schemas/profile-adoption-declaration.schema.json +8 -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 +1 -1
- package/bin/release-skill-cli.mjs +40 -4
- package/bin/release-skill.bundle.mjs +1719 -1291
- package/bin/rules.json +1 -1
- package/bin/schemas/consumer-contract-vector.schema.json +149 -0
- package/package.json +4 -4
- package/platform-manifest.json +5 -5
- package/skills/release-finish/SKILL.md +4 -4
- package/skills/release-help/SKILL.md +3 -2
- package/skills/release-prepare/SKILL.md +2 -2
- package/skills/release-publish/SKILL.md +3 -1
- package/skills-src/release-finish/SKILL.md +4 -4
- package/skills-src/release-help/SKILL.md +3 -2
- package/skills-src/release-prepare/SKILL.md +2 -2
- package/skills-src/release-publish/SKILL.md +3 -1
- package/src/commands/post-release-local.mjs +249 -58
- package/src/commands/prepare.mjs +39 -4
- package/src/commands/ship.mjs +124 -16
- package/src/core/derived-artifact-gates.mjs +32 -5
- package/src/producers/foundation-resource-projection.mjs +16 -3
- package/src/schemas/migration-manifest.schema.json +271 -7
- package/src/schemas/profile-adoption-declaration.schema.json +8 -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
|
+
}
|
|
@@ -52,13 +52,13 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
52
52
|
|
|
53
53
|
只传用户选择且计划声明的宿主。宿主 CLI 不存在时返回 `SKIPPED_NOT_INSTALLED`。各宿主按以下规则处理:
|
|
54
54
|
|
|
55
|
-
- Claude
|
|
56
|
-
- Kimi
|
|
57
|
-
- CodeBuddy/WorkBuddy
|
|
55
|
+
- Claude 先重新绑定冻结市场,再重新观察安装状态;旧插件若仍存在,才调用正式更新命令。Codex 继续按正式市场协议移除并安装冻结的 Git 引用。两者都在安装后核对插件、市场、版本和市场检出提交。
|
|
56
|
+
- Kimi 的精确当前安装会在返回 `ALREADY_CURRENT` 前核对真实载荷;发生安装或迁移时,只在操作完成后核对结果。包名、版本、发布标签、已安装修订号和受管安装根必须与冻结计划一致;`.git` 只提供附加诊断,不是通过条件。旧的本地路径安装会在同一个受控终端交互界面(TUI)会话中先移除,再按发布标签安装、确认信任并重新加载。
|
|
57
|
+
- CodeBuddy/WorkBuddy 只处理同一 bundled-family 插件和市场。只有冻结标签与计划声明的可变分支都从同一远端解析到冻结提交时,才调用正式市场更新和插件更新命令;完成后重新读取安装列表,并精确核对唯一条目的市场、版本和修订号。目标未安装、来源不符、远端不可访问或身份不一致时返回 `MANUAL_REQUIRED`,不修改宿主。
|
|
58
58
|
|
|
59
59
|
任何宿主失败都保留其他宿主的实际结果,不回滚,也不把失败冒充成功。
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
完成后报告每个宿主的状态,并提醒用户重启已更新的宿主。本机结果只记录收尾事实,不改变发布状态。
|
|
62
62
|
|
|
63
63
|
## 临时归属
|
|
64
64
|
|
|
@@ -12,7 +12,7 @@ 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
|
|
@@ -35,7 +35,8 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
35
35
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" help --json
|
|
36
36
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" setup --root <path> --json
|
|
37
37
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
38
|
-
#
|
|
38
|
+
# 日常发布快速路径:发布前确认可读计划摘要,状态文件可恢复。
|
|
39
|
+
# 受限 postPublish hook 的 checkpoint 批准与计划批准分开。
|
|
39
40
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> --target-version <version> --json
|
|
40
41
|
# 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
|
|
41
42
|
# 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
|
|
@@ -29,7 +29,7 @@ description: Freeze an immutable release plan with local configuration, document
|
|
|
29
29
|
2. 配置含 `releaseDocuments` 时,先运行只读演练 `${CLI} docs refresh --unit <id> --json`;`status: "changes"` 时展示逐文件路径/语种/版本/`refreshDigest`,取得"本地发布文档写入"明确授权后才执行 `nextCommand.argv` 写入,审阅并提交刷新结果后再继续;`status: "clean"` 时直接进入 prepare
|
|
30
30
|
3. 运行 `${CLI} prepare --root <path> --offline --json`
|
|
31
31
|
4. 检查 exit code 0,读取 JSON 返回的 immutable `planPath=plans/<planDigest>.json`,再从该文件读取 `status`、`units`、`externalActions`
|
|
32
|
-
5. 向用户展示可读的 `approvalSummary
|
|
32
|
+
5. 向用户展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部外部动作、例外,以及需要独立 checkpoint 批准的 postPublish hook。`planDigest` 仅作为内部绑定字段,不要求用户复制或确认。后续 approve/publish 只能使用该 immutable planPath,等待确认后再 approve。计划批准不包含受限 postPublish hook 的 checkpoint 批准
|
|
33
33
|
|
|
34
34
|
若用户明确要求 GitHub+npm 生产发布,加入 `--production`。该模式还会封存独立
|
|
35
35
|
Git commit/tree 和 npm tarball,并把路径、SHA/integrity、branch/tag 写入计划。
|
|
@@ -89,4 +89,4 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --on
|
|
|
89
89
|
|
|
90
90
|
## 后续引导
|
|
91
91
|
|
|
92
|
-
计划冻结后,读取命令返回的 immutable `planPath` 和 `approvalSummary` 展示给用户,等待确认后再 approve。`planDigest` 由系统自动计算和绑定,不作为人工交互口令。`release-plan.json` 等 latest alias 只用于浏览,不得作为生产 authority
|
|
92
|
+
计划冻结后,读取命令返回的 immutable `planPath` 和 `approvalSummary` 展示给用户,等待确认后再 approve。`planDigest` 由系统自动计算和绑定,不作为人工交互口令。`release-plan.json` 等 latest alias 只用于浏览,不得作为生产 authority 传递。冻结计划批准是正常发布级流程的唯一批准门;有效 `requiresApproval: true` 的 postPublish hook 仍须使用绑定 `(planDigest, hookId)` 且最长有效 24 小时的独立 checkpoint 批准。
|
|
@@ -44,10 +44,12 @@ description: "从已批准的生产计划发布冻结 Git branch/tag、npm tarba
|
|
|
44
44
|
|
|
45
45
|
## 授权门
|
|
46
46
|
|
|
47
|
-
1. 展示可读的 `approvalSummary
|
|
47
|
+
1. 展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部 actions、例外,以及需要独立 checkpoint 批准的 postPublish hook。
|
|
48
48
|
2. 必须存在未过期且由系统绑定同一内部 digest 的 approval record;批准后不再要求用户复制摘要做二次确认。
|
|
49
49
|
3. 只有 CLI exit code 0 且结构化状态为 `PUBLISHED` 才算外写阶段通过;随后必须运行 verify,只有 `VERIFIED` 才是完整终态。
|
|
50
50
|
|
|
51
|
+
冻结计划批准是正常发布级流程的唯一批准门。它包含计划内的外部动作和验证门禁,不包含有效 `requiresApproval: true` 的 postPublish checkpoint。这类 hook 仍须使用绑定 `(planDigest, hookId)` 且最长有效 24 小时的独立批准记录。
|
|
52
|
+
|
|
51
53
|
## 确定性执行
|
|
52
54
|
|
|
53
55
|
```bash
|
|
@@ -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
|
-
"
|
|
35
|
-
|
|
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
|
-
"
|
|
61
|
-
|
|
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
|
}
|
|
@@ -54,6 +54,14 @@
|
|
|
54
54
|
"stability": { "enum": ["stable", "candidate-only"] }
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
+
"capabilities": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"uniqueItems": true,
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^foundation\\.[a-z0-9\\-]+(?:\\.[a-z0-9\\-]+)+$"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
57
65
|
"foundation_pin": {
|
|
58
66
|
"type": "object",
|
|
59
67
|
"additionalProperties": false,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"kind": "skill-family.contracts.consumer-contract-vectors",
|
|
4
|
+
"foundationVersion": "0.14.0",
|
|
5
|
+
"sets": [
|
|
6
|
+
{
|
|
7
|
+
"capabilityId": "foundation.contracts.object-validation",
|
|
8
|
+
"vectorSetId": "foundation.contracts.object-validation.consumer-v1",
|
|
9
|
+
"contractId": "skill-family-contracts:validateDocument",
|
|
10
|
+
"strategy": "real-pure",
|
|
11
|
+
"vectors": [
|
|
12
|
+
{
|
|
13
|
+
"schemaVersion": 1,
|
|
14
|
+
"kind": "skill-family.consumer-contract-vector",
|
|
15
|
+
"vectorId": "foundation.contracts.object-validation.consumer-v1.indeterminate",
|
|
16
|
+
"vectorSetId": "foundation.contracts.object-validation.consumer-v1",
|
|
17
|
+
"capabilityId": "foundation.contracts.object-validation",
|
|
18
|
+
"foundationVersion": "0.14.0",
|
|
19
|
+
"contractId": "skill-family-contracts:validateDocument",
|
|
20
|
+
"caseClass": "indeterminate",
|
|
21
|
+
"strategy": "real-pure",
|
|
22
|
+
"request": {
|
|
23
|
+
"document": { "schemaVersion": 1, "kind": "skill-family.project-manifest" },
|
|
24
|
+
"options": { "schemaId": "https://contracts.skill-family.example/v1/project-manifest.json", "dialect": "2020-12", "policy": "strict" }
|
|
25
|
+
},
|
|
26
|
+
"expected": { "outcome": "indeterminate", "allowedStates": ["return", "throw"], "failClosed": true }
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"schemaVersion": 1,
|
|
30
|
+
"kind": "skill-family.consumer-contract-vector",
|
|
31
|
+
"vectorId": "foundation.contracts.object-validation.consumer-v1.negative",
|
|
32
|
+
"vectorSetId": "foundation.contracts.object-validation.consumer-v1",
|
|
33
|
+
"capabilityId": "foundation.contracts.object-validation",
|
|
34
|
+
"foundationVersion": "0.14.0",
|
|
35
|
+
"contractId": "skill-family-contracts:validateDocument",
|
|
36
|
+
"caseClass": "negative",
|
|
37
|
+
"strategy": "real-pure",
|
|
38
|
+
"request": {
|
|
39
|
+
"document": { "schemaVersion": 1, "kind": "skill-family.project-manifest", "project": { "id": "demo-project", "name": "Demo Project" }, "contracts": { "version": "not-a-version", "profile": "generic" } },
|
|
40
|
+
"options": { "schemaId": "https://contracts.skill-family.example/v1/project-manifest.json", "dialect": "2020-12", "policy": "strict" }
|
|
41
|
+
},
|
|
42
|
+
"expected": { "outcome": "return", "value": { "valid": false, "errorCode": "SFC1001", "errors": [{ "keyword": "pattern", "instancePath": "/contracts/version", "schemaPath": "#/properties/contracts/properties/version/pattern", "message": "must match pattern \"^[0-9]+\\.[0-9]+\\.[0-9]+$\"", "params": { "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" } }], "data": { "schemaVersion": 1, "kind": "skill-family.project-manifest", "project": { "id": "demo-project", "name": "Demo Project" }, "contracts": { "version": "not-a-version", "profile": "generic" } } } }
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"schemaVersion": 1,
|
|
46
|
+
"kind": "skill-family.consumer-contract-vector",
|
|
47
|
+
"vectorId": "foundation.contracts.object-validation.consumer-v1.positive",
|
|
48
|
+
"vectorSetId": "foundation.contracts.object-validation.consumer-v1",
|
|
49
|
+
"capabilityId": "foundation.contracts.object-validation",
|
|
50
|
+
"foundationVersion": "0.14.0",
|
|
51
|
+
"contractId": "skill-family-contracts:validateDocument",
|
|
52
|
+
"caseClass": "positive",
|
|
53
|
+
"strategy": "real-pure",
|
|
54
|
+
"request": {
|
|
55
|
+
"document": { "schemaVersion": 1, "kind": "skill-family.project-manifest", "project": { "id": "demo-project", "name": "Demo Project" }, "contracts": { "version": "1.0.0", "profile": "generic" } },
|
|
56
|
+
"options": { "schemaId": "https://contracts.skill-family.example/v1/project-manifest.json", "dialect": "2020-12", "policy": "strict" }
|
|
57
|
+
},
|
|
58
|
+
"expected": { "outcome": "return", "value": { "valid": true, "errorCode": null, "errors": [], "data": { "schemaVersion": 1, "kind": "skill-family.project-manifest", "project": { "id": "demo-project", "name": "Demo Project" }, "contracts": { "version": "1.0.0", "profile": "generic" } } } }
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"capabilityId": "foundation.harness.atomic-write",
|
|
64
|
+
"vectorSetId": "foundation.harness.atomic-write.consumer-v1",
|
|
65
|
+
"contractId": "skill-family-harness-node:writeFileAtomic",
|
|
66
|
+
"strategy": "official-fake",
|
|
67
|
+
"vectors": [
|
|
68
|
+
{
|
|
69
|
+
"schemaVersion": 1,
|
|
70
|
+
"kind": "skill-family.consumer-contract-vector",
|
|
71
|
+
"vectorId": "foundation.harness.atomic-write.consumer-v1.indeterminate",
|
|
72
|
+
"vectorSetId": "foundation.harness.atomic-write.consumer-v1",
|
|
73
|
+
"capabilityId": "foundation.harness.atomic-write",
|
|
74
|
+
"foundationVersion": "0.14.0",
|
|
75
|
+
"contractId": "skill-family-harness-node:writeFileAtomic",
|
|
76
|
+
"caseClass": "indeterminate",
|
|
77
|
+
"strategy": "official-fake",
|
|
78
|
+
"request": { "root": { "runtimeBinding": "atomic-write-canonical-root" }, "relPath": "records/item.json", "data": "fixture-data", "options": { "mode": 420 } },
|
|
79
|
+
"expected": { "outcome": "indeterminate", "allowedStates": ["return", "throw"], "failClosed": true }
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"schemaVersion": 1,
|
|
83
|
+
"kind": "skill-family.consumer-contract-vector",
|
|
84
|
+
"vectorId": "foundation.harness.atomic-write.consumer-v1.negative",
|
|
85
|
+
"vectorSetId": "foundation.harness.atomic-write.consumer-v1",
|
|
86
|
+
"capabilityId": "foundation.harness.atomic-write",
|
|
87
|
+
"foundationVersion": "0.14.0",
|
|
88
|
+
"contractId": "skill-family-harness-node:writeFileAtomic",
|
|
89
|
+
"caseClass": "negative",
|
|
90
|
+
"strategy": "official-fake",
|
|
91
|
+
"request": { "root": { "runtimeBinding": "atomic-write-canonical-root" }, "relPath": "../outside.json", "data": "fixture-data", "options": { "mode": 420 } },
|
|
92
|
+
"expected": { "outcome": "throw", "errorCode": "SFC2004", "errorKind": "path-traversal" }
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"schemaVersion": 1,
|
|
96
|
+
"kind": "skill-family.consumer-contract-vector",
|
|
97
|
+
"vectorId": "foundation.harness.atomic-write.consumer-v1.positive",
|
|
98
|
+
"vectorSetId": "foundation.harness.atomic-write.consumer-v1",
|
|
99
|
+
"capabilityId": "foundation.harness.atomic-write",
|
|
100
|
+
"foundationVersion": "0.14.0",
|
|
101
|
+
"contractId": "skill-family-harness-node:writeFileAtomic",
|
|
102
|
+
"caseClass": "positive",
|
|
103
|
+
"strategy": "official-fake",
|
|
104
|
+
"request": { "root": { "runtimeBinding": "atomic-write-canonical-root" }, "relPath": "records/item.json", "data": "fixture-data", "options": { "mode": 420 } },
|
|
105
|
+
"expected": { "outcome": "return", "valueRelation": "atomic-write-contained-absolute-target" }
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|