release-skill 0.2.8 → 0.2.9
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 +15 -0
- package/INSTALL.md +4 -4
- package/INSTALL.zh-CN.md +4 -4
- package/README.md +7 -13
- package/README.zh-CN.md +7 -13
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +39 -4
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +39 -4
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +39 -4
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +39 -4
- package/bin/release-skill-cli.mjs +4 -0
- package/bin/release-skill.bundle.mjs +39 -4
- package/package.json +1 -1
- package/src/commands/assess.mjs +18 -5
- package/src/commands/prepare.mjs +14 -2
- package/src/core/public-surface.mjs +26 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-skill",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "广州市风荷科技有限公司"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"defaultPrompt": [
|
|
21
21
|
"Assess this project for release readiness.",
|
|
22
|
-
"Prepare a release plan for version 0.2.
|
|
22
|
+
"Prepare a release plan for version 0.2.9.",
|
|
23
23
|
"Help me understand the release workflow."
|
|
24
24
|
]
|
|
25
25
|
}
|
package/.kimi-plugin/plugin.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
<!-- release-skill:changelog:start version=0.2.9 locale=en baseline=sha256:22b3d94c5d99fca0e6016334a108e4be5f3419f45507fae795b4d0714ca7ad6d -->
|
|
4
|
+
## [0.2.9] - 2026-07-31
|
|
5
|
+
|
|
6
|
+
v0.2.9 makes missing expected public-surface configuration visible during assessment and preparation without blocking existing projects.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **Adoption warning**: assess reports `PUBLIC_SURFACE_CONFIG_MISSING` for every release unit that has not configured `expectedPublicSurface`.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Prepare visibility**: prepare records and returns the same non-blocking warning, and the CLI exposes it in both JSON and human-readable output.
|
|
15
|
+
<!-- release-skill:changelog:end version=0.2.9 locale=en -->
|
|
16
|
+
|
|
17
|
+
|
|
3
18
|
<!-- release-skill:changelog:start version=0.2.8 locale=en baseline=sha256:ad6e8910f1af206463b5decf134b82590787b77f5a88faca3d8985d3686b111b -->
|
|
4
19
|
## [0.2.8] - 2026-07-30
|
|
5
20
|
|
package/INSTALL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](INSTALL.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
<!-- release-skill:release-version: 0.2.
|
|
5
|
+
<!-- release-skill:release-version: 0.2.9 -->
|
|
6
6
|
## Prerequisites
|
|
7
7
|
|
|
8
8
|
- Node.js 22.0.0 or later
|
|
@@ -128,7 +128,7 @@ as a version-pinned **manual** install plus trusted observation/attestation:
|
|
|
128
128
|
frozen version; otherwise do NOT issue an attestation.
|
|
129
129
|
|
|
130
130
|
```
|
|
131
|
-
/plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.
|
|
131
|
+
/plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.9
|
|
132
132
|
/plugins reload
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -140,7 +140,7 @@ as a version-pinned **manual** install plus trusted observation/attestation:
|
|
|
140
140
|
```json
|
|
141
141
|
{
|
|
142
142
|
"platform": "kimi",
|
|
143
|
-
"version": "0.2.
|
|
143
|
+
"version": "0.2.9",
|
|
144
144
|
"planDigest": "<64-hex frozen plan digest>",
|
|
145
145
|
"result": "passed",
|
|
146
146
|
"actor": "<person who confirmed>",
|
|
@@ -204,7 +204,7 @@ attestation (the same capability gap and closed loop as Kimi Code):
|
|
|
204
204
|
```json
|
|
205
205
|
{
|
|
206
206
|
"platform": "codebuddy",
|
|
207
|
-
"version": "0.2.
|
|
207
|
+
"version": "0.2.9",
|
|
208
208
|
"planDigest": "<64-hex frozen plan digest>",
|
|
209
209
|
"result": "passed",
|
|
210
210
|
"actor": "<person who confirmed>",
|
package/INSTALL.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](INSTALL.md)
|
|
4
4
|
|
|
5
|
-
<!-- release-skill:release-version: 0.2.
|
|
5
|
+
<!-- release-skill:release-version: 0.2.9 -->
|
|
6
6
|
## 前置条件
|
|
7
7
|
|
|
8
8
|
- Node.js 22.0.0 或更高版本
|
|
@@ -112,7 +112,7 @@ release-skill 把 Kimi 安装建模为“版本钉死的手动安装 + 可信观
|
|
|
112
112
|
必须核实已安装插件清单版本等于冻结版本;否则**不得**出具证明。
|
|
113
113
|
|
|
114
114
|
```
|
|
115
|
-
/plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.
|
|
115
|
+
/plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.9
|
|
116
116
|
/plugins reload
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -124,7 +124,7 @@ release-skill 把 Kimi 安装建模为“版本钉死的手动安装 + 可信观
|
|
|
124
124
|
```json
|
|
125
125
|
{
|
|
126
126
|
"platform": "kimi",
|
|
127
|
-
"version": "0.2.
|
|
127
|
+
"version": "0.2.9",
|
|
128
128
|
"planDigest": "<64 位十六进制冻结计划摘要>",
|
|
129
129
|
"result": "passed",
|
|
130
130
|
"actor": "<确认人>",
|
|
@@ -178,7 +178,7 @@ codebuddy CLI 可以添加市场并安装插件,但 **`plugin marketplace add`
|
|
|
178
178
|
```json
|
|
179
179
|
{
|
|
180
180
|
"platform": "codebuddy",
|
|
181
|
-
"version": "0.2.
|
|
181
|
+
"version": "0.2.9",
|
|
182
182
|
"planDigest": "<64 位十六进制冻结计划摘要>",
|
|
183
183
|
"result": "passed",
|
|
184
184
|
"actor": "<确认人>",
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](README.zh-CN.md) · Installation: [English](INSTALL.md) / [简体中文](INSTALL.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
<!-- release-skill:release-version: 0.2.
|
|
5
|
+
<!-- release-skill:release-version: 0.2.9 -->
|
|
6
6
|
Release preparation for Claude Code, CodeBuddy, WorkBuddy, Codex, and Kimi Code, with human-edited files kept intact.
|
|
7
7
|
|
|
8
8
|
release-skill helps a maintainer answer three questions: what will be released,
|
|
@@ -14,27 +14,21 @@ Setup surfaces only the deterministic `compactSummary` review view; the full
|
|
|
14
14
|
report stays in a temporary session directory.
|
|
15
15
|
|
|
16
16
|
<!-- release-skill:managed:start id=latest-release -->
|
|
17
|
-
**0.2.
|
|
17
|
+
**0.2.9** (2026-07-31)
|
|
18
18
|
|
|
19
|
-
v0.2.
|
|
19
|
+
v0.2.9 makes missing expected public-surface configuration visible during assessment and preparation without blocking existing projects.
|
|
20
20
|
|
|
21
21
|
**Added**
|
|
22
22
|
|
|
23
|
-
- **
|
|
24
|
-
- **Exhaustive classification diagnostics**: prepare reports missing mappings, unexpected mappings, unclassified files, and files that ambiguously match both include and exclude rules.
|
|
23
|
+
- **Adoption warning**: assess reports `PUBLIC_SURFACE_CONFIG_MISSING` for every release unit that has not configured `expectedPublicSurface`.
|
|
25
24
|
|
|
26
25
|
**Changed**
|
|
27
26
|
|
|
28
|
-
- **
|
|
29
|
-
- **Bounded glob and path safety**: the built-in scanner supports `*`, `?`, and `**`, rejects overlapping or escaping scan roots, and keeps workspace control paths outside the project classification surface.
|
|
30
|
-
|
|
31
|
-
**Fixed**
|
|
32
|
-
|
|
33
|
-
- **Silent release-file omission**: a file classified for publication can no longer be absent from `publicFiles` while the release still reaches `PREPARED`.
|
|
27
|
+
- **Prepare visibility**: prepare records and returns the same non-blocking warning, and the CLI exposes it in both JSON and human-readable output.
|
|
34
28
|
<!-- release-skill:managed:end id=latest-release -->
|
|
35
29
|
|
|
36
30
|
<!-- release-skill:capability:external-write-boundary -->
|
|
37
|
-
> **Current boundary:** v0.2.
|
|
31
|
+
> **Current boundary:** v0.2.9 is the current release (v0.2.2 previously held
|
|
38
32
|
> published status before the platform verification convergence fix was added).
|
|
39
33
|
> v0.1.1 completed a real production release to GitHub and npm — the first
|
|
40
34
|
> production-verified milestone — followed by
|
|
@@ -52,7 +46,7 @@ v0.2.8 adds a project-configurable expected public-surface gate so newly added o
|
|
|
52
46
|
> publish global preflight.
|
|
53
47
|
|
|
54
48
|
<!-- release-skill:capability:safe-first-command -->
|
|
55
|
-
> **Production path verified since the v0.1.1 milestone; v0.2.
|
|
49
|
+
> **Production path verified since the v0.1.1 milestone; v0.2.9 is the current
|
|
56
50
|
> release.** The npm-installed CLI is the supported user entry. Source checkout
|
|
57
51
|
> is the development/contributor fallback.
|
|
58
52
|
>
|
package/README.zh-CN.md
CHANGED
|
@@ -2,33 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · 安装指南:[中文](INSTALL.zh-CN.md) / [English](INSTALL.md)
|
|
4
4
|
|
|
5
|
-
<!-- release-skill:release-version: 0.2.
|
|
5
|
+
<!-- release-skill:release-version: 0.2.9 -->
|
|
6
6
|
面向 Claude Code、CodeBuddy、WorkBuddy、Codex 和 Kimi Code 的发布准备工具,完整保留人工维护的文件内容。
|
|
7
7
|
|
|
8
8
|
release-skill 帮助维护者回答三个问题:准备发布什么、还有哪些检查未通过、最终发布的内容是什么。它不重新生成、也不回写项目源文件。`prepare` 把每个配置的公开文件复制到隔离快照并验证字节——先冻结并供人工审阅,再从同一份冻结产物发布。`setup` 只显示确定性的 `compactSummary` 审阅视图,完整报告保留在临时会话目录中。
|
|
9
9
|
|
|
10
10
|
<!-- release-skill:managed:start id=latest-release -->
|
|
11
|
-
**0.2.
|
|
11
|
+
**0.2.9** (2026-07-31)
|
|
12
12
|
|
|
13
|
-
v0.2.
|
|
13
|
+
v0.2.9 会在评估和准备阶段提示缺少期望发布面配置,同时保持现有项目兼容,不立即阻断发布。
|
|
14
14
|
|
|
15
15
|
**新增**
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
- **穷举分类诊断**:prepare 会报告缺失映射、多余映射、未分类文件,以及同时命中包含和排除规则的歧义文件。
|
|
17
|
+
- **采用提醒**:assess 会为每个尚未配置 `expectedPublicSurface` 的发布单元报告 `PUBLIC_SURFACE_CONFIG_MISSING`。
|
|
19
18
|
|
|
20
19
|
**变更**
|
|
21
20
|
|
|
22
|
-
-
|
|
23
|
-
- **有界 glob 与路径安全**:内建扫描器支持 `*`、`?`、`**`,拒绝重叠或逃逸的扫描根,并将工作区控制面排除在项目分类范围之外。
|
|
24
|
-
|
|
25
|
-
**修复**
|
|
26
|
-
|
|
27
|
-
- **发布文件静默漏项**:已归类为应发布的文件如果缺少 `publicFiles` 映射,发布将无法再进入 `PREPARED`。
|
|
21
|
+
- **prepare 可见性**:prepare 会记录并返回同一条非阻断警告,CLI 的 JSON 与人类可读输出都会显示该提醒。
|
|
28
22
|
<!-- release-skill:managed:end id=latest-release -->
|
|
29
23
|
|
|
30
24
|
<!-- release-skill:capability:external-write-boundary -->
|
|
31
|
-
> **当前边界:** v0.2.
|
|
25
|
+
> **当前边界:** v0.2.9 是当前发布版本(v0.2.2 曾处于已发布状态,后因平台验证收敛修复而更新)。
|
|
32
26
|
> v0.1.1 已完成 GitHub 与 npm 的
|
|
33
27
|
> 真实生产发布,是首次生产验证的历史里程碑,并从冻结 Git ref 完成精确 npm
|
|
34
28
|
> 安装及 Claude/Codex 消费者安装验证;"当前发布版本"与"首次生产验证里程碑"
|
|
@@ -41,7 +35,7 @@ v0.2.8 新增项目可配置的期望发布面门禁,防止新增或漏声明
|
|
|
41
35
|
> 远端唯一性检查在 `publish` 全局预检执行。
|
|
42
36
|
|
|
43
37
|
<!-- release-skill:capability:safe-first-command -->
|
|
44
|
-
> **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.2.
|
|
38
|
+
> **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.2.9 是当前发布版本。**
|
|
45
39
|
> npm 安装的 CLI 是受支持的用户入口;源码 checkout 保留为开发/贡献者路径。
|
|
46
40
|
>
|
|
47
41
|
> **第一条命令:**
|
|
@@ -9,7 +9,7 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.9"});
|
|
13
13
|
|
|
14
14
|
var __create = Object.create;
|
|
15
15
|
var __defProp = Object.defineProperty;
|
|
@@ -21535,6 +21535,15 @@ import {
|
|
|
21535
21535
|
function compareStrings(left, right) {
|
|
21536
21536
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
21537
21537
|
}
|
|
21538
|
+
function collectExpectedPublicSurfaceAdoptionWarnings(config) {
|
|
21539
|
+
return Object.freeze(
|
|
21540
|
+
(config?.releaseUnits ?? []).filter((unit) => !unit?.expectedPublicSurface).map((unit) => Object.freeze({
|
|
21541
|
+
code: PUBLIC_SURFACE_CONFIG_MISSING,
|
|
21542
|
+
unitId: unit.id,
|
|
21543
|
+
message: `\u53D1\u5E03\u5355\u5143 "${unit.id}" \u672A\u914D\u7F6E expectedPublicSurface\uFF1B\u65B0\u589E\u6216\u6F0F\u914D\u6587\u4EF6\u4E0D\u4F1A\u88AB\u5206\u7C7B\u95E8\u7981\u53D1\u73B0\u3002\u8BF7\u5BA1\u9605\u9879\u76EE\u53D1\u5E03\u8FB9\u754C\u540E\uFF0C\u5728 .release-skill/project.yaml \u4E2D\u914D\u7F6E expectedPublicSurface.scanRoots\u3002`
|
|
21544
|
+
}))
|
|
21545
|
+
);
|
|
21546
|
+
}
|
|
21538
21547
|
function toPosixPath(path3) {
|
|
21539
21548
|
return path3.split(sep3).join("/");
|
|
21540
21549
|
}
|
|
@@ -21911,14 +21920,16 @@ async function assertExpectedPublicSurface(options) {
|
|
|
21911
21920
|
}
|
|
21912
21921
|
);
|
|
21913
21922
|
}
|
|
21914
|
-
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS;
|
|
21923
|
+
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS, PUBLIC_SURFACE_CONFIG_MISSING;
|
|
21915
21924
|
var init_public_surface = __esm({
|
|
21916
21925
|
"src/core/public-surface.mjs"() {
|
|
21917
21926
|
init_errors();
|
|
21918
21927
|
init_public_path();
|
|
21919
21928
|
ROOT_CONTROL_DIRECTORIES = Object.freeze([".git", ".release-skill"]);
|
|
21920
21929
|
UNSUPPORTED_GLOB_CHARACTERS = /[!()[\]{}]/u;
|
|
21930
|
+
PUBLIC_SURFACE_CONFIG_MISSING = "PUBLIC_SURFACE_CONFIG_MISSING";
|
|
21921
21931
|
__name(compareStrings, "compareStrings");
|
|
21932
|
+
__name(collectExpectedPublicSurfaceAdoptionWarnings, "collectExpectedPublicSurfaceAdoptionWarnings");
|
|
21922
21933
|
__name(toPosixPath, "toPosixPath");
|
|
21923
21934
|
__name(isContainedOrEqual, "isContainedOrEqual");
|
|
21924
21935
|
__name(isWorkspaceControlPath, "isWorkspaceControlPath");
|
|
@@ -23138,6 +23149,16 @@ async function assessProject(options) {
|
|
|
23138
23149
|
}
|
|
23139
23150
|
const config = configResult.config;
|
|
23140
23151
|
const topology = identifyTopology(config);
|
|
23152
|
+
for (const warning of collectExpectedPublicSurfaceAdoptionWarnings(config)) {
|
|
23153
|
+
allGaps.push(createGap({
|
|
23154
|
+
scope: GapScope.PROJECT,
|
|
23155
|
+
category: GapCategory.POLICY,
|
|
23156
|
+
severity: Severity.WARNING,
|
|
23157
|
+
code: warning.code,
|
|
23158
|
+
message: warning.message,
|
|
23159
|
+
file: ".release-skill/project.yaml"
|
|
23160
|
+
}));
|
|
23161
|
+
}
|
|
23141
23162
|
const docGaps = await checkCommonDocs(root, config);
|
|
23142
23163
|
allGaps.push(...docGaps);
|
|
23143
23164
|
const manifestGaps = await checkPluginManifests(root, config);
|
|
@@ -23174,6 +23195,7 @@ var init_assess = __esm({
|
|
|
23174
23195
|
async "src/commands/assess.mjs"() {
|
|
23175
23196
|
await init_config();
|
|
23176
23197
|
init_errors();
|
|
23198
|
+
init_public_surface();
|
|
23177
23199
|
execFile4 = promisify4(execFileCb4);
|
|
23178
23200
|
Severity = Object.freeze({
|
|
23179
23201
|
ERROR: "error",
|
|
@@ -81183,12 +81205,20 @@ async function prepareRelease(options) {
|
|
|
81183
81205
|
try {
|
|
81184
81206
|
await evidence.append({ phase: "config", status: "started" });
|
|
81185
81207
|
const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
|
|
81208
|
+
const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
|
|
81186
81209
|
await evidence.append({
|
|
81187
81210
|
phase: "config",
|
|
81188
81211
|
status: "completed",
|
|
81189
81212
|
configPath: relative22(realRoot, configPath),
|
|
81190
81213
|
configDigest
|
|
81191
81214
|
});
|
|
81215
|
+
for (const warning of adoptionWarnings) {
|
|
81216
|
+
await evidence.append({
|
|
81217
|
+
phase: "public-surface-adoption",
|
|
81218
|
+
status: "warning",
|
|
81219
|
+
...warning
|
|
81220
|
+
});
|
|
81221
|
+
}
|
|
81192
81222
|
const configUnits = config.releaseUnits ?? [];
|
|
81193
81223
|
const resolvedVersions = await resolveAllUnitVersions(
|
|
81194
81224
|
configUnits,
|
|
@@ -82110,7 +82140,8 @@ To proceed, pass --acknowledge-hook-side-effects (CLI) or hooksAuthorized=true (
|
|
|
82110
82140
|
return {
|
|
82111
82141
|
planPath: writtenPath,
|
|
82112
82142
|
planDigest,
|
|
82113
|
-
evidenceDir
|
|
82143
|
+
evidenceDir,
|
|
82144
|
+
warnings: adoptionWarnings
|
|
82114
82145
|
};
|
|
82115
82146
|
} catch (err) {
|
|
82116
82147
|
await evidence.append({
|
|
@@ -90431,9 +90462,13 @@ if (command === "prepare") {
|
|
|
90431
90462
|
...plan,
|
|
90432
90463
|
planPath: result.planPath,
|
|
90433
90464
|
planDigest: result.planDigest,
|
|
90434
|
-
evidenceDir: result.evidenceDir
|
|
90465
|
+
evidenceDir: result.evidenceDir,
|
|
90466
|
+
warnings: result.warnings
|
|
90435
90467
|
}, null, 2));
|
|
90436
90468
|
} else {
|
|
90469
|
+
for (const warning of result.warnings) {
|
|
90470
|
+
console.log(`Warning [${warning.code}] ${warning.message}`);
|
|
90471
|
+
}
|
|
90437
90472
|
console.log(`Plan frozen at: ${result.planPath}`);
|
|
90438
90473
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
90439
90474
|
console.log(`Evidence: ${result.evidenceDir}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-skill",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "广州市风荷科技有限公司"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"defaultPrompt": [
|
|
21
21
|
"Assess this project for release readiness.",
|
|
22
|
-
"Prepare a release plan for version 0.2.
|
|
22
|
+
"Prepare a release plan for version 0.2.9.",
|
|
23
23
|
"Help me understand the release workflow."
|
|
24
24
|
]
|
|
25
25
|
}
|
|
@@ -9,7 +9,7 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.9"});
|
|
13
13
|
|
|
14
14
|
var __create = Object.create;
|
|
15
15
|
var __defProp = Object.defineProperty;
|
|
@@ -21535,6 +21535,15 @@ import {
|
|
|
21535
21535
|
function compareStrings(left, right) {
|
|
21536
21536
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
21537
21537
|
}
|
|
21538
|
+
function collectExpectedPublicSurfaceAdoptionWarnings(config) {
|
|
21539
|
+
return Object.freeze(
|
|
21540
|
+
(config?.releaseUnits ?? []).filter((unit) => !unit?.expectedPublicSurface).map((unit) => Object.freeze({
|
|
21541
|
+
code: PUBLIC_SURFACE_CONFIG_MISSING,
|
|
21542
|
+
unitId: unit.id,
|
|
21543
|
+
message: `\u53D1\u5E03\u5355\u5143 "${unit.id}" \u672A\u914D\u7F6E expectedPublicSurface\uFF1B\u65B0\u589E\u6216\u6F0F\u914D\u6587\u4EF6\u4E0D\u4F1A\u88AB\u5206\u7C7B\u95E8\u7981\u53D1\u73B0\u3002\u8BF7\u5BA1\u9605\u9879\u76EE\u53D1\u5E03\u8FB9\u754C\u540E\uFF0C\u5728 .release-skill/project.yaml \u4E2D\u914D\u7F6E expectedPublicSurface.scanRoots\u3002`
|
|
21544
|
+
}))
|
|
21545
|
+
);
|
|
21546
|
+
}
|
|
21538
21547
|
function toPosixPath(path3) {
|
|
21539
21548
|
return path3.split(sep3).join("/");
|
|
21540
21549
|
}
|
|
@@ -21911,14 +21920,16 @@ async function assertExpectedPublicSurface(options) {
|
|
|
21911
21920
|
}
|
|
21912
21921
|
);
|
|
21913
21922
|
}
|
|
21914
|
-
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS;
|
|
21923
|
+
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS, PUBLIC_SURFACE_CONFIG_MISSING;
|
|
21915
21924
|
var init_public_surface = __esm({
|
|
21916
21925
|
"src/core/public-surface.mjs"() {
|
|
21917
21926
|
init_errors();
|
|
21918
21927
|
init_public_path();
|
|
21919
21928
|
ROOT_CONTROL_DIRECTORIES = Object.freeze([".git", ".release-skill"]);
|
|
21920
21929
|
UNSUPPORTED_GLOB_CHARACTERS = /[!()[\]{}]/u;
|
|
21930
|
+
PUBLIC_SURFACE_CONFIG_MISSING = "PUBLIC_SURFACE_CONFIG_MISSING";
|
|
21921
21931
|
__name(compareStrings, "compareStrings");
|
|
21932
|
+
__name(collectExpectedPublicSurfaceAdoptionWarnings, "collectExpectedPublicSurfaceAdoptionWarnings");
|
|
21922
21933
|
__name(toPosixPath, "toPosixPath");
|
|
21923
21934
|
__name(isContainedOrEqual, "isContainedOrEqual");
|
|
21924
21935
|
__name(isWorkspaceControlPath, "isWorkspaceControlPath");
|
|
@@ -23138,6 +23149,16 @@ async function assessProject(options) {
|
|
|
23138
23149
|
}
|
|
23139
23150
|
const config = configResult.config;
|
|
23140
23151
|
const topology = identifyTopology(config);
|
|
23152
|
+
for (const warning of collectExpectedPublicSurfaceAdoptionWarnings(config)) {
|
|
23153
|
+
allGaps.push(createGap({
|
|
23154
|
+
scope: GapScope.PROJECT,
|
|
23155
|
+
category: GapCategory.POLICY,
|
|
23156
|
+
severity: Severity.WARNING,
|
|
23157
|
+
code: warning.code,
|
|
23158
|
+
message: warning.message,
|
|
23159
|
+
file: ".release-skill/project.yaml"
|
|
23160
|
+
}));
|
|
23161
|
+
}
|
|
23141
23162
|
const docGaps = await checkCommonDocs(root, config);
|
|
23142
23163
|
allGaps.push(...docGaps);
|
|
23143
23164
|
const manifestGaps = await checkPluginManifests(root, config);
|
|
@@ -23174,6 +23195,7 @@ var init_assess = __esm({
|
|
|
23174
23195
|
async "src/commands/assess.mjs"() {
|
|
23175
23196
|
await init_config();
|
|
23176
23197
|
init_errors();
|
|
23198
|
+
init_public_surface();
|
|
23177
23199
|
execFile4 = promisify4(execFileCb4);
|
|
23178
23200
|
Severity = Object.freeze({
|
|
23179
23201
|
ERROR: "error",
|
|
@@ -81183,12 +81205,20 @@ async function prepareRelease(options) {
|
|
|
81183
81205
|
try {
|
|
81184
81206
|
await evidence.append({ phase: "config", status: "started" });
|
|
81185
81207
|
const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
|
|
81208
|
+
const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
|
|
81186
81209
|
await evidence.append({
|
|
81187
81210
|
phase: "config",
|
|
81188
81211
|
status: "completed",
|
|
81189
81212
|
configPath: relative22(realRoot, configPath),
|
|
81190
81213
|
configDigest
|
|
81191
81214
|
});
|
|
81215
|
+
for (const warning of adoptionWarnings) {
|
|
81216
|
+
await evidence.append({
|
|
81217
|
+
phase: "public-surface-adoption",
|
|
81218
|
+
status: "warning",
|
|
81219
|
+
...warning
|
|
81220
|
+
});
|
|
81221
|
+
}
|
|
81192
81222
|
const configUnits = config.releaseUnits ?? [];
|
|
81193
81223
|
const resolvedVersions = await resolveAllUnitVersions(
|
|
81194
81224
|
configUnits,
|
|
@@ -82110,7 +82140,8 @@ To proceed, pass --acknowledge-hook-side-effects (CLI) or hooksAuthorized=true (
|
|
|
82110
82140
|
return {
|
|
82111
82141
|
planPath: writtenPath,
|
|
82112
82142
|
planDigest,
|
|
82113
|
-
evidenceDir
|
|
82143
|
+
evidenceDir,
|
|
82144
|
+
warnings: adoptionWarnings
|
|
82114
82145
|
};
|
|
82115
82146
|
} catch (err) {
|
|
82116
82147
|
await evidence.append({
|
|
@@ -90431,9 +90462,13 @@ if (command === "prepare") {
|
|
|
90431
90462
|
...plan,
|
|
90432
90463
|
planPath: result.planPath,
|
|
90433
90464
|
planDigest: result.planDigest,
|
|
90434
|
-
evidenceDir: result.evidenceDir
|
|
90465
|
+
evidenceDir: result.evidenceDir,
|
|
90466
|
+
warnings: result.warnings
|
|
90435
90467
|
}, null, 2));
|
|
90436
90468
|
} else {
|
|
90469
|
+
for (const warning of result.warnings) {
|
|
90470
|
+
console.log(`Warning [${warning.code}] ${warning.message}`);
|
|
90471
|
+
}
|
|
90437
90472
|
console.log(`Plan frozen at: ${result.planPath}`);
|
|
90438
90473
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
90439
90474
|
console.log(`Evidence: ${result.evidenceDir}`);
|
|
@@ -9,7 +9,7 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.9"});
|
|
13
13
|
|
|
14
14
|
var __create = Object.create;
|
|
15
15
|
var __defProp = Object.defineProperty;
|
|
@@ -21535,6 +21535,15 @@ import {
|
|
|
21535
21535
|
function compareStrings(left, right) {
|
|
21536
21536
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
21537
21537
|
}
|
|
21538
|
+
function collectExpectedPublicSurfaceAdoptionWarnings(config) {
|
|
21539
|
+
return Object.freeze(
|
|
21540
|
+
(config?.releaseUnits ?? []).filter((unit) => !unit?.expectedPublicSurface).map((unit) => Object.freeze({
|
|
21541
|
+
code: PUBLIC_SURFACE_CONFIG_MISSING,
|
|
21542
|
+
unitId: unit.id,
|
|
21543
|
+
message: `\u53D1\u5E03\u5355\u5143 "${unit.id}" \u672A\u914D\u7F6E expectedPublicSurface\uFF1B\u65B0\u589E\u6216\u6F0F\u914D\u6587\u4EF6\u4E0D\u4F1A\u88AB\u5206\u7C7B\u95E8\u7981\u53D1\u73B0\u3002\u8BF7\u5BA1\u9605\u9879\u76EE\u53D1\u5E03\u8FB9\u754C\u540E\uFF0C\u5728 .release-skill/project.yaml \u4E2D\u914D\u7F6E expectedPublicSurface.scanRoots\u3002`
|
|
21544
|
+
}))
|
|
21545
|
+
);
|
|
21546
|
+
}
|
|
21538
21547
|
function toPosixPath(path3) {
|
|
21539
21548
|
return path3.split(sep3).join("/");
|
|
21540
21549
|
}
|
|
@@ -21911,14 +21920,16 @@ async function assertExpectedPublicSurface(options) {
|
|
|
21911
21920
|
}
|
|
21912
21921
|
);
|
|
21913
21922
|
}
|
|
21914
|
-
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS;
|
|
21923
|
+
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS, PUBLIC_SURFACE_CONFIG_MISSING;
|
|
21915
21924
|
var init_public_surface = __esm({
|
|
21916
21925
|
"src/core/public-surface.mjs"() {
|
|
21917
21926
|
init_errors();
|
|
21918
21927
|
init_public_path();
|
|
21919
21928
|
ROOT_CONTROL_DIRECTORIES = Object.freeze([".git", ".release-skill"]);
|
|
21920
21929
|
UNSUPPORTED_GLOB_CHARACTERS = /[!()[\]{}]/u;
|
|
21930
|
+
PUBLIC_SURFACE_CONFIG_MISSING = "PUBLIC_SURFACE_CONFIG_MISSING";
|
|
21921
21931
|
__name(compareStrings, "compareStrings");
|
|
21932
|
+
__name(collectExpectedPublicSurfaceAdoptionWarnings, "collectExpectedPublicSurfaceAdoptionWarnings");
|
|
21922
21933
|
__name(toPosixPath, "toPosixPath");
|
|
21923
21934
|
__name(isContainedOrEqual, "isContainedOrEqual");
|
|
21924
21935
|
__name(isWorkspaceControlPath, "isWorkspaceControlPath");
|
|
@@ -23138,6 +23149,16 @@ async function assessProject(options) {
|
|
|
23138
23149
|
}
|
|
23139
23150
|
const config = configResult.config;
|
|
23140
23151
|
const topology = identifyTopology(config);
|
|
23152
|
+
for (const warning of collectExpectedPublicSurfaceAdoptionWarnings(config)) {
|
|
23153
|
+
allGaps.push(createGap({
|
|
23154
|
+
scope: GapScope.PROJECT,
|
|
23155
|
+
category: GapCategory.POLICY,
|
|
23156
|
+
severity: Severity.WARNING,
|
|
23157
|
+
code: warning.code,
|
|
23158
|
+
message: warning.message,
|
|
23159
|
+
file: ".release-skill/project.yaml"
|
|
23160
|
+
}));
|
|
23161
|
+
}
|
|
23141
23162
|
const docGaps = await checkCommonDocs(root, config);
|
|
23142
23163
|
allGaps.push(...docGaps);
|
|
23143
23164
|
const manifestGaps = await checkPluginManifests(root, config);
|
|
@@ -23174,6 +23195,7 @@ var init_assess = __esm({
|
|
|
23174
23195
|
async "src/commands/assess.mjs"() {
|
|
23175
23196
|
await init_config();
|
|
23176
23197
|
init_errors();
|
|
23198
|
+
init_public_surface();
|
|
23177
23199
|
execFile4 = promisify4(execFileCb4);
|
|
23178
23200
|
Severity = Object.freeze({
|
|
23179
23201
|
ERROR: "error",
|
|
@@ -81183,12 +81205,20 @@ async function prepareRelease(options) {
|
|
|
81183
81205
|
try {
|
|
81184
81206
|
await evidence.append({ phase: "config", status: "started" });
|
|
81185
81207
|
const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
|
|
81208
|
+
const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
|
|
81186
81209
|
await evidence.append({
|
|
81187
81210
|
phase: "config",
|
|
81188
81211
|
status: "completed",
|
|
81189
81212
|
configPath: relative22(realRoot, configPath),
|
|
81190
81213
|
configDigest
|
|
81191
81214
|
});
|
|
81215
|
+
for (const warning of adoptionWarnings) {
|
|
81216
|
+
await evidence.append({
|
|
81217
|
+
phase: "public-surface-adoption",
|
|
81218
|
+
status: "warning",
|
|
81219
|
+
...warning
|
|
81220
|
+
});
|
|
81221
|
+
}
|
|
81192
81222
|
const configUnits = config.releaseUnits ?? [];
|
|
81193
81223
|
const resolvedVersions = await resolveAllUnitVersions(
|
|
81194
81224
|
configUnits,
|
|
@@ -82110,7 +82140,8 @@ To proceed, pass --acknowledge-hook-side-effects (CLI) or hooksAuthorized=true (
|
|
|
82110
82140
|
return {
|
|
82111
82141
|
planPath: writtenPath,
|
|
82112
82142
|
planDigest,
|
|
82113
|
-
evidenceDir
|
|
82143
|
+
evidenceDir,
|
|
82144
|
+
warnings: adoptionWarnings
|
|
82114
82145
|
};
|
|
82115
82146
|
} catch (err) {
|
|
82116
82147
|
await evidence.append({
|
|
@@ -90431,9 +90462,13 @@ if (command === "prepare") {
|
|
|
90431
90462
|
...plan,
|
|
90432
90463
|
planPath: result.planPath,
|
|
90433
90464
|
planDigest: result.planDigest,
|
|
90434
|
-
evidenceDir: result.evidenceDir
|
|
90465
|
+
evidenceDir: result.evidenceDir,
|
|
90466
|
+
warnings: result.warnings
|
|
90435
90467
|
}, null, 2));
|
|
90436
90468
|
} else {
|
|
90469
|
+
for (const warning of result.warnings) {
|
|
90470
|
+
console.log(`Warning [${warning.code}] ${warning.message}`);
|
|
90471
|
+
}
|
|
90437
90472
|
console.log(`Plan frozen at: ${result.planPath}`);
|
|
90438
90473
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
90439
90474
|
console.log(`Evidence: ${result.evidenceDir}`);
|
|
@@ -9,7 +9,7 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.9"});
|
|
13
13
|
|
|
14
14
|
var __create = Object.create;
|
|
15
15
|
var __defProp = Object.defineProperty;
|
|
@@ -21535,6 +21535,15 @@ import {
|
|
|
21535
21535
|
function compareStrings(left, right) {
|
|
21536
21536
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
21537
21537
|
}
|
|
21538
|
+
function collectExpectedPublicSurfaceAdoptionWarnings(config) {
|
|
21539
|
+
return Object.freeze(
|
|
21540
|
+
(config?.releaseUnits ?? []).filter((unit) => !unit?.expectedPublicSurface).map((unit) => Object.freeze({
|
|
21541
|
+
code: PUBLIC_SURFACE_CONFIG_MISSING,
|
|
21542
|
+
unitId: unit.id,
|
|
21543
|
+
message: `\u53D1\u5E03\u5355\u5143 "${unit.id}" \u672A\u914D\u7F6E expectedPublicSurface\uFF1B\u65B0\u589E\u6216\u6F0F\u914D\u6587\u4EF6\u4E0D\u4F1A\u88AB\u5206\u7C7B\u95E8\u7981\u53D1\u73B0\u3002\u8BF7\u5BA1\u9605\u9879\u76EE\u53D1\u5E03\u8FB9\u754C\u540E\uFF0C\u5728 .release-skill/project.yaml \u4E2D\u914D\u7F6E expectedPublicSurface.scanRoots\u3002`
|
|
21544
|
+
}))
|
|
21545
|
+
);
|
|
21546
|
+
}
|
|
21538
21547
|
function toPosixPath(path3) {
|
|
21539
21548
|
return path3.split(sep3).join("/");
|
|
21540
21549
|
}
|
|
@@ -21911,14 +21920,16 @@ async function assertExpectedPublicSurface(options) {
|
|
|
21911
21920
|
}
|
|
21912
21921
|
);
|
|
21913
21922
|
}
|
|
21914
|
-
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS;
|
|
21923
|
+
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS, PUBLIC_SURFACE_CONFIG_MISSING;
|
|
21915
21924
|
var init_public_surface = __esm({
|
|
21916
21925
|
"src/core/public-surface.mjs"() {
|
|
21917
21926
|
init_errors();
|
|
21918
21927
|
init_public_path();
|
|
21919
21928
|
ROOT_CONTROL_DIRECTORIES = Object.freeze([".git", ".release-skill"]);
|
|
21920
21929
|
UNSUPPORTED_GLOB_CHARACTERS = /[!()[\]{}]/u;
|
|
21930
|
+
PUBLIC_SURFACE_CONFIG_MISSING = "PUBLIC_SURFACE_CONFIG_MISSING";
|
|
21921
21931
|
__name(compareStrings, "compareStrings");
|
|
21932
|
+
__name(collectExpectedPublicSurfaceAdoptionWarnings, "collectExpectedPublicSurfaceAdoptionWarnings");
|
|
21922
21933
|
__name(toPosixPath, "toPosixPath");
|
|
21923
21934
|
__name(isContainedOrEqual, "isContainedOrEqual");
|
|
21924
21935
|
__name(isWorkspaceControlPath, "isWorkspaceControlPath");
|
|
@@ -23138,6 +23149,16 @@ async function assessProject(options) {
|
|
|
23138
23149
|
}
|
|
23139
23150
|
const config = configResult.config;
|
|
23140
23151
|
const topology = identifyTopology(config);
|
|
23152
|
+
for (const warning of collectExpectedPublicSurfaceAdoptionWarnings(config)) {
|
|
23153
|
+
allGaps.push(createGap({
|
|
23154
|
+
scope: GapScope.PROJECT,
|
|
23155
|
+
category: GapCategory.POLICY,
|
|
23156
|
+
severity: Severity.WARNING,
|
|
23157
|
+
code: warning.code,
|
|
23158
|
+
message: warning.message,
|
|
23159
|
+
file: ".release-skill/project.yaml"
|
|
23160
|
+
}));
|
|
23161
|
+
}
|
|
23141
23162
|
const docGaps = await checkCommonDocs(root, config);
|
|
23142
23163
|
allGaps.push(...docGaps);
|
|
23143
23164
|
const manifestGaps = await checkPluginManifests(root, config);
|
|
@@ -23174,6 +23195,7 @@ var init_assess = __esm({
|
|
|
23174
23195
|
async "src/commands/assess.mjs"() {
|
|
23175
23196
|
await init_config();
|
|
23176
23197
|
init_errors();
|
|
23198
|
+
init_public_surface();
|
|
23177
23199
|
execFile4 = promisify4(execFileCb4);
|
|
23178
23200
|
Severity = Object.freeze({
|
|
23179
23201
|
ERROR: "error",
|
|
@@ -81183,12 +81205,20 @@ async function prepareRelease(options) {
|
|
|
81183
81205
|
try {
|
|
81184
81206
|
await evidence.append({ phase: "config", status: "started" });
|
|
81185
81207
|
const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
|
|
81208
|
+
const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
|
|
81186
81209
|
await evidence.append({
|
|
81187
81210
|
phase: "config",
|
|
81188
81211
|
status: "completed",
|
|
81189
81212
|
configPath: relative22(realRoot, configPath),
|
|
81190
81213
|
configDigest
|
|
81191
81214
|
});
|
|
81215
|
+
for (const warning of adoptionWarnings) {
|
|
81216
|
+
await evidence.append({
|
|
81217
|
+
phase: "public-surface-adoption",
|
|
81218
|
+
status: "warning",
|
|
81219
|
+
...warning
|
|
81220
|
+
});
|
|
81221
|
+
}
|
|
81192
81222
|
const configUnits = config.releaseUnits ?? [];
|
|
81193
81223
|
const resolvedVersions = await resolveAllUnitVersions(
|
|
81194
81224
|
configUnits,
|
|
@@ -82110,7 +82140,8 @@ To proceed, pass --acknowledge-hook-side-effects (CLI) or hooksAuthorized=true (
|
|
|
82110
82140
|
return {
|
|
82111
82141
|
planPath: writtenPath,
|
|
82112
82142
|
planDigest,
|
|
82113
|
-
evidenceDir
|
|
82143
|
+
evidenceDir,
|
|
82144
|
+
warnings: adoptionWarnings
|
|
82114
82145
|
};
|
|
82115
82146
|
} catch (err) {
|
|
82116
82147
|
await evidence.append({
|
|
@@ -90431,9 +90462,13 @@ if (command === "prepare") {
|
|
|
90431
90462
|
...plan,
|
|
90432
90463
|
planPath: result.planPath,
|
|
90433
90464
|
planDigest: result.planDigest,
|
|
90434
|
-
evidenceDir: result.evidenceDir
|
|
90465
|
+
evidenceDir: result.evidenceDir,
|
|
90466
|
+
warnings: result.warnings
|
|
90435
90467
|
}, null, 2));
|
|
90436
90468
|
} else {
|
|
90469
|
+
for (const warning of result.warnings) {
|
|
90470
|
+
console.log(`Warning [${warning.code}] ${warning.message}`);
|
|
90471
|
+
}
|
|
90437
90472
|
console.log(`Plan frozen at: ${result.planPath}`);
|
|
90438
90473
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
90439
90474
|
console.log(`Evidence: ${result.evidenceDir}`);
|
|
@@ -551,8 +551,12 @@ if (command === 'prepare') {
|
|
|
551
551
|
planPath: result.planPath,
|
|
552
552
|
planDigest: result.planDigest,
|
|
553
553
|
evidenceDir: result.evidenceDir,
|
|
554
|
+
warnings: result.warnings,
|
|
554
555
|
}, null, 2));
|
|
555
556
|
} else {
|
|
557
|
+
for (const warning of result.warnings) {
|
|
558
|
+
console.log(`Warning [${warning.code}] ${warning.message}`);
|
|
559
|
+
}
|
|
556
560
|
console.log(`Plan frozen at: ${result.planPath}`);
|
|
557
561
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
558
562
|
console.log(`Evidence: ${result.evidenceDir}`);
|
|
@@ -9,7 +9,7 @@ const __bundlePkgRoot = __bundleResolve(__bundleDirname(__bundleFileURLToPath(im
|
|
|
9
9
|
// Provide a real require() for CJS packages bundled into ESM (e.g. yaml, ajv).
|
|
10
10
|
const __bundleRealRequire = __bundleCreateRequire(import.meta.url);
|
|
11
11
|
// Package identity injected at build time — closure-independent --version probe.
|
|
12
|
-
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.
|
|
12
|
+
const __bundlePkg = Object.freeze({"name":"release-skill","version":"0.2.9"});
|
|
13
13
|
|
|
14
14
|
var __create = Object.create;
|
|
15
15
|
var __defProp = Object.defineProperty;
|
|
@@ -21535,6 +21535,15 @@ import {
|
|
|
21535
21535
|
function compareStrings(left, right) {
|
|
21536
21536
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
21537
21537
|
}
|
|
21538
|
+
function collectExpectedPublicSurfaceAdoptionWarnings(config) {
|
|
21539
|
+
return Object.freeze(
|
|
21540
|
+
(config?.releaseUnits ?? []).filter((unit) => !unit?.expectedPublicSurface).map((unit) => Object.freeze({
|
|
21541
|
+
code: PUBLIC_SURFACE_CONFIG_MISSING,
|
|
21542
|
+
unitId: unit.id,
|
|
21543
|
+
message: `\u53D1\u5E03\u5355\u5143 "${unit.id}" \u672A\u914D\u7F6E expectedPublicSurface\uFF1B\u65B0\u589E\u6216\u6F0F\u914D\u6587\u4EF6\u4E0D\u4F1A\u88AB\u5206\u7C7B\u95E8\u7981\u53D1\u73B0\u3002\u8BF7\u5BA1\u9605\u9879\u76EE\u53D1\u5E03\u8FB9\u754C\u540E\uFF0C\u5728 .release-skill/project.yaml \u4E2D\u914D\u7F6E expectedPublicSurface.scanRoots\u3002`
|
|
21544
|
+
}))
|
|
21545
|
+
);
|
|
21546
|
+
}
|
|
21538
21547
|
function toPosixPath(path3) {
|
|
21539
21548
|
return path3.split(sep3).join("/");
|
|
21540
21549
|
}
|
|
@@ -21911,14 +21920,16 @@ async function assertExpectedPublicSurface(options) {
|
|
|
21911
21920
|
}
|
|
21912
21921
|
);
|
|
21913
21922
|
}
|
|
21914
|
-
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS;
|
|
21923
|
+
var ROOT_CONTROL_DIRECTORIES, UNSUPPORTED_GLOB_CHARACTERS, PUBLIC_SURFACE_CONFIG_MISSING;
|
|
21915
21924
|
var init_public_surface = __esm({
|
|
21916
21925
|
"src/core/public-surface.mjs"() {
|
|
21917
21926
|
init_errors();
|
|
21918
21927
|
init_public_path();
|
|
21919
21928
|
ROOT_CONTROL_DIRECTORIES = Object.freeze([".git", ".release-skill"]);
|
|
21920
21929
|
UNSUPPORTED_GLOB_CHARACTERS = /[!()[\]{}]/u;
|
|
21930
|
+
PUBLIC_SURFACE_CONFIG_MISSING = "PUBLIC_SURFACE_CONFIG_MISSING";
|
|
21921
21931
|
__name(compareStrings, "compareStrings");
|
|
21932
|
+
__name(collectExpectedPublicSurfaceAdoptionWarnings, "collectExpectedPublicSurfaceAdoptionWarnings");
|
|
21922
21933
|
__name(toPosixPath, "toPosixPath");
|
|
21923
21934
|
__name(isContainedOrEqual, "isContainedOrEqual");
|
|
21924
21935
|
__name(isWorkspaceControlPath, "isWorkspaceControlPath");
|
|
@@ -23138,6 +23149,16 @@ async function assessProject(options) {
|
|
|
23138
23149
|
}
|
|
23139
23150
|
const config = configResult.config;
|
|
23140
23151
|
const topology = identifyTopology(config);
|
|
23152
|
+
for (const warning of collectExpectedPublicSurfaceAdoptionWarnings(config)) {
|
|
23153
|
+
allGaps.push(createGap({
|
|
23154
|
+
scope: GapScope.PROJECT,
|
|
23155
|
+
category: GapCategory.POLICY,
|
|
23156
|
+
severity: Severity.WARNING,
|
|
23157
|
+
code: warning.code,
|
|
23158
|
+
message: warning.message,
|
|
23159
|
+
file: ".release-skill/project.yaml"
|
|
23160
|
+
}));
|
|
23161
|
+
}
|
|
23141
23162
|
const docGaps = await checkCommonDocs(root, config);
|
|
23142
23163
|
allGaps.push(...docGaps);
|
|
23143
23164
|
const manifestGaps = await checkPluginManifests(root, config);
|
|
@@ -23174,6 +23195,7 @@ var init_assess = __esm({
|
|
|
23174
23195
|
async "src/commands/assess.mjs"() {
|
|
23175
23196
|
await init_config();
|
|
23176
23197
|
init_errors();
|
|
23198
|
+
init_public_surface();
|
|
23177
23199
|
execFile4 = promisify4(execFileCb4);
|
|
23178
23200
|
Severity = Object.freeze({
|
|
23179
23201
|
ERROR: "error",
|
|
@@ -81183,12 +81205,20 @@ async function prepareRelease(options) {
|
|
|
81183
81205
|
try {
|
|
81184
81206
|
await evidence.append({ phase: "config", status: "started" });
|
|
81185
81207
|
const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
|
|
81208
|
+
const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
|
|
81186
81209
|
await evidence.append({
|
|
81187
81210
|
phase: "config",
|
|
81188
81211
|
status: "completed",
|
|
81189
81212
|
configPath: relative22(realRoot, configPath),
|
|
81190
81213
|
configDigest
|
|
81191
81214
|
});
|
|
81215
|
+
for (const warning of adoptionWarnings) {
|
|
81216
|
+
await evidence.append({
|
|
81217
|
+
phase: "public-surface-adoption",
|
|
81218
|
+
status: "warning",
|
|
81219
|
+
...warning
|
|
81220
|
+
});
|
|
81221
|
+
}
|
|
81192
81222
|
const configUnits = config.releaseUnits ?? [];
|
|
81193
81223
|
const resolvedVersions = await resolveAllUnitVersions(
|
|
81194
81224
|
configUnits,
|
|
@@ -82110,7 +82140,8 @@ To proceed, pass --acknowledge-hook-side-effects (CLI) or hooksAuthorized=true (
|
|
|
82110
82140
|
return {
|
|
82111
82141
|
planPath: writtenPath,
|
|
82112
82142
|
planDigest,
|
|
82113
|
-
evidenceDir
|
|
82143
|
+
evidenceDir,
|
|
82144
|
+
warnings: adoptionWarnings
|
|
82114
82145
|
};
|
|
82115
82146
|
} catch (err) {
|
|
82116
82147
|
await evidence.append({
|
|
@@ -90431,9 +90462,13 @@ if (command === "prepare") {
|
|
|
90431
90462
|
...plan,
|
|
90432
90463
|
planPath: result.planPath,
|
|
90433
90464
|
planDigest: result.planDigest,
|
|
90434
|
-
evidenceDir: result.evidenceDir
|
|
90465
|
+
evidenceDir: result.evidenceDir,
|
|
90466
|
+
warnings: result.warnings
|
|
90435
90467
|
}, null, 2));
|
|
90436
90468
|
} else {
|
|
90469
|
+
for (const warning of result.warnings) {
|
|
90470
|
+
console.log(`Warning [${warning.code}] ${warning.message}`);
|
|
90471
|
+
}
|
|
90437
90472
|
console.log(`Plan frozen at: ${result.planPath}`);
|
|
90438
90473
|
console.log(`Plan digest: ${result.planDigest}`);
|
|
90439
90474
|
console.log(`Evidence: ${result.evidenceDir}`);
|
package/package.json
CHANGED
package/src/commands/assess.mjs
CHANGED
|
@@ -23,6 +23,7 @@ import { promisify } from 'node:util';
|
|
|
23
23
|
|
|
24
24
|
import { loadProjectConfig } from '../core/config.mjs';
|
|
25
25
|
import { ReleaseError, CONFIG_INVALID, GATE_FAILED } from '../core/errors.mjs';
|
|
26
|
+
import { collectExpectedPublicSurfaceAdoptionWarnings } from '../core/public-surface.mjs';
|
|
26
27
|
|
|
27
28
|
const execFile = promisify(execFileCb);
|
|
28
29
|
|
|
@@ -880,23 +881,35 @@ export async function assessProject(options) {
|
|
|
880
881
|
// --- 2. Topology identification ---
|
|
881
882
|
const topology = identifyTopology(config);
|
|
882
883
|
|
|
883
|
-
// --- 3.
|
|
884
|
+
// --- 3. Expected public-surface adoption ---
|
|
885
|
+
for (const warning of collectExpectedPublicSurfaceAdoptionWarnings(config)) {
|
|
886
|
+
allGaps.push(createGap({
|
|
887
|
+
scope: GapScope.PROJECT,
|
|
888
|
+
category: GapCategory.POLICY,
|
|
889
|
+
severity: Severity.WARNING,
|
|
890
|
+
code: warning.code,
|
|
891
|
+
message: warning.message,
|
|
892
|
+
file: '.release-skill/project.yaml',
|
|
893
|
+
}));
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// --- 4. Common docs check ---
|
|
884
897
|
const docGaps = await checkCommonDocs(root, config);
|
|
885
898
|
allGaps.push(...docGaps);
|
|
886
899
|
|
|
887
|
-
// ---
|
|
900
|
+
// --- 5. Plugin manifest check ---
|
|
888
901
|
const manifestGaps = await checkPluginManifests(root, config);
|
|
889
902
|
allGaps.push(...manifestGaps);
|
|
890
903
|
|
|
891
|
-
// ---
|
|
904
|
+
// --- 6. Package metadata check ---
|
|
892
905
|
const metadataGaps = await checkPackageMetadata(root, config);
|
|
893
906
|
allGaps.push(...metadataGaps);
|
|
894
907
|
|
|
895
|
-
// ---
|
|
908
|
+
// --- 7. Remote prerequisites ---
|
|
896
909
|
const remoteGaps = await checkRemotePrerequisites(root, config, offline);
|
|
897
910
|
allGaps.push(...remoteGaps);
|
|
898
911
|
|
|
899
|
-
// ---
|
|
912
|
+
// --- 8. README structure check ---
|
|
900
913
|
const readmeGaps = await checkReadmeStructure(root, config);
|
|
901
914
|
allGaps.push(...readmeGaps);
|
|
902
915
|
|
package/src/commands/prepare.mjs
CHANGED
|
@@ -29,7 +29,10 @@ import { loadProjectConfig } from '../core/config.mjs';
|
|
|
29
29
|
import { captureBaseline } from '../core/baseline.mjs';
|
|
30
30
|
import { runHook } from '../core/hooks.mjs';
|
|
31
31
|
import { computeHookCacheKey, readHookCache, writeHookCache } from '../core/hook-cache.mjs';
|
|
32
|
-
import {
|
|
32
|
+
import {
|
|
33
|
+
assertExpectedPublicSurface,
|
|
34
|
+
collectExpectedPublicSurfaceAdoptionWarnings,
|
|
35
|
+
} from '../core/public-surface.mjs';
|
|
33
36
|
import { runSnapshotVerificationGates } from '../core/verification-gates.mjs';
|
|
34
37
|
import { createEvidenceWriter } from '../core/evidence.mjs';
|
|
35
38
|
import { computePlanDigest, writePlanAtomic, writePlanImmutable } from '../core/plan.mjs';
|
|
@@ -1670,7 +1673,7 @@ export function buildExternalActions(unitResults, resolvedVersions, productionAs
|
|
|
1670
1673
|
* every declared hook runs in full and the incremental hook cache is neither
|
|
1671
1674
|
* read nor written.
|
|
1672
1675
|
*
|
|
1673
|
-
* @returns {Promise<{ planPath: string, planDigest: string, evidenceDir: string }>}
|
|
1676
|
+
* @returns {Promise<{ planPath: string, planDigest: string, evidenceDir: string, warnings: ReadonlyArray<object> }>}
|
|
1674
1677
|
*
|
|
1675
1678
|
* @throws {ReleaseError} on any gate failure. No PREPARED plan is written.
|
|
1676
1679
|
*/
|
|
@@ -1750,6 +1753,7 @@ export async function prepareRelease(options) {
|
|
|
1750
1753
|
await evidence.append({ phase: 'config', status: 'started' });
|
|
1751
1754
|
|
|
1752
1755
|
const { config, configPath, configDigest } = await loadProjectConfig({ root: realRoot });
|
|
1756
|
+
const adoptionWarnings = collectExpectedPublicSurfaceAdoptionWarnings(config);
|
|
1753
1757
|
|
|
1754
1758
|
await evidence.append({
|
|
1755
1759
|
phase: 'config',
|
|
@@ -1757,6 +1761,13 @@ export async function prepareRelease(options) {
|
|
|
1757
1761
|
configPath: relative(realRoot, configPath),
|
|
1758
1762
|
configDigest,
|
|
1759
1763
|
});
|
|
1764
|
+
for (const warning of adoptionWarnings) {
|
|
1765
|
+
await evidence.append({
|
|
1766
|
+
phase: 'public-surface-adoption',
|
|
1767
|
+
status: 'warning',
|
|
1768
|
+
...warning,
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1760
1771
|
|
|
1761
1772
|
// --- Step 1b: Resolve authoritative versions and gate release-document
|
|
1762
1773
|
// freshness BEFORE hook authorization ---
|
|
@@ -2913,6 +2924,7 @@ export async function prepareRelease(options) {
|
|
|
2913
2924
|
planPath: writtenPath,
|
|
2914
2925
|
planDigest,
|
|
2915
2926
|
evidenceDir,
|
|
2927
|
+
warnings: adoptionWarnings,
|
|
2916
2928
|
};
|
|
2917
2929
|
} catch (err) {
|
|
2918
2930
|
// Record failure evidence
|
|
@@ -22,11 +22,37 @@ import { canonicalPublicPath } from '../snapshot/public-path.mjs';
|
|
|
22
22
|
|
|
23
23
|
const ROOT_CONTROL_DIRECTORIES = Object.freeze(['.git', '.release-skill']);
|
|
24
24
|
const UNSUPPORTED_GLOB_CHARACTERS = /[!()[\]{}]/u;
|
|
25
|
+
export const PUBLIC_SURFACE_CONFIG_MISSING = 'PUBLIC_SURFACE_CONFIG_MISSING';
|
|
25
26
|
|
|
26
27
|
function compareStrings(left, right) {
|
|
27
28
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Return actionable, non-blocking adoption warnings for release units that
|
|
33
|
+
* have not enabled the expected public-surface gate.
|
|
34
|
+
*
|
|
35
|
+
* This helper never invents project policy or writes configuration. It gives
|
|
36
|
+
* assess and prepare one stable machine code and message while legacy projects
|
|
37
|
+
* remain releasable during the adoption window.
|
|
38
|
+
*
|
|
39
|
+
* @param {object} config
|
|
40
|
+
* @returns {ReadonlyArray<object>}
|
|
41
|
+
*/
|
|
42
|
+
export function collectExpectedPublicSurfaceAdoptionWarnings(config) {
|
|
43
|
+
return Object.freeze(
|
|
44
|
+
(config?.releaseUnits ?? [])
|
|
45
|
+
.filter((unit) => !unit?.expectedPublicSurface)
|
|
46
|
+
.map((unit) => Object.freeze({
|
|
47
|
+
code: PUBLIC_SURFACE_CONFIG_MISSING,
|
|
48
|
+
unitId: unit.id,
|
|
49
|
+
message:
|
|
50
|
+
`发布单元 "${unit.id}" 未配置 expectedPublicSurface;新增或漏配文件不会被分类门禁发现。` +
|
|
51
|
+
'请审阅项目发布边界后,在 .release-skill/project.yaml 中配置 expectedPublicSurface.scanRoots。',
|
|
52
|
+
})),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
30
56
|
function toPosixPath(path) {
|
|
31
57
|
return path.split(sep).join('/');
|
|
32
58
|
}
|