@spaceflow/review 0.59.0 → 0.60.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.59.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.58.0...@spaceflow/review@0.59.0) (2026-03-02)
4
+
5
+ ### 新特性
6
+
7
+ * **review-summary:** 实现 review-summary 命令核心功能 ([5964eec](https://github.com/Lydanne/spaceflow/commit/5964eec0e2ee4ac46f74808466429b0edc0cbaa1))
8
+ * **review-summary:** 新增文件过滤功能并优化缺陷率计算 ([9655f82](https://github.com/Lydanne/spaceflow/commit/9655f828cec77c4a7db29ae1cda59fd3ea10ceab))
9
+
10
+ ### 修复BUG
11
+
12
+ * **actions:** 修正 GitHub Actions 路径并优化命令行选项 ([50a9946](https://github.com/Lydanne/spaceflow/commit/50a99464633afe234ef56d4a081c6d04686b3e57))
13
+
14
+ ### 代码重构
15
+
16
+ * **core:** 统一插件配置中的 'extensions' 为 'skills' ([50646a0](https://github.com/Lydanne/spaceflow/commit/50646a061f66ec6935c66199d78915b9d7896bd3))
17
+
18
+ ### 文档更新
19
+
20
+ * **docs:** 统一扩展类型命名:extension 改为 skill ([96db479](https://github.com/Lydanne/spaceflow/commit/96db47948981c0c2b5860c2835f86dec77736cf0))
21
+ * 更新 MCP 架构为 Meta-tool 代理模式并统一导出类型命名 ([f60c53b](https://github.com/Lydanne/spaceflow/commit/f60c53b103f24e8a4123e4c4ec850885cb40f7d7))
22
+ * 简化 MCP 工具声明方式并完善扩展系统文档 ([9cdcab9](https://github.com/Lydanne/spaceflow/commit/9cdcab986559bd34c75e48b6c380c74516adb05c))
23
+
24
+ ### 其他修改
25
+
26
+ * **core:** released version 0.22.0 [no ci] ([68aa47d](https://github.com/Lydanne/spaceflow/commit/68aa47df425eb9d1ceac1237fee3cc1b29de668f))
27
+ * **publish:** released version 0.46.0 [no ci] ([68ebfc3](https://github.com/Lydanne/spaceflow/commit/68ebfc32bfb5b39354947f08b73306b5f8512fdf))
28
+ * **review-summary:** released version 0.23.0 [no ci] ([f6681ec](https://github.com/Lydanne/spaceflow/commit/f6681ecdcd8f8036da3c4ac7778e5cc75af59c9f))
29
+ * **review-summary:** released version 0.24.0 [no ci] ([690e9ed](https://github.com/Lydanne/spaceflow/commit/690e9ed64b197f50e201afe73dc55e866867a7fd))
30
+ * **review-summary:** released version 0.25.0 [no ci] ([4eaca03](https://github.com/Lydanne/spaceflow/commit/4eaca0397411585112697e6800b66484bd73ffde))
31
+ * **review-summary:** released version 0.26.0 [no ci] ([5e8dedf](https://github.com/Lydanne/spaceflow/commit/5e8dedf10cb7104dcc15550d7f5ba05f10cae7d3))
32
+ * **scripts:** released version 0.23.0 [no ci] ([2f18d22](https://github.com/Lydanne/spaceflow/commit/2f18d2274e83b65ce006dceed47a985942c8dd1d))
33
+ * **shell:** released version 0.23.0 [no ci] ([0668aa9](https://github.com/Lydanne/spaceflow/commit/0668aa97671ca235509bef547503c301237324f9))
34
+
3
35
  ## [0.58.0](https://github.com/Lydanne/spaceflow/compare/@spaceflow/review@0.57.0...@spaceflow/review@0.58.0) (2026-03-02)
4
36
 
5
37
  ### 新特性
package/dist/index.js CHANGED
@@ -3822,8 +3822,8 @@ ${fileChanges || "无"}`;
3822
3822
  // 将变更文件的历史 issue 标记为无效
3823
3823
  let invalidatedCount = 0;
3824
3824
  const updatedIssues = issues.map((issue)=>{
3825
- // 如果 issue 已修复或已无效,不需要处理
3826
- if (issue.fixed || issue.valid === "false") {
3825
+ // 如果 issue 已修复、已解决或已无效,不需要处理
3826
+ if (issue.fixed || issue.resolved || issue.valid === "false") {
3827
3827
  return issue;
3828
3828
  }
3829
3829
  // 如果 issue 所在文件有变更,标记为无效
@@ -3863,8 +3863,8 @@ ${fileChanges || "无"}`;
3863
3863
  let updatedCount = 0;
3864
3864
  let invalidatedCount = 0;
3865
3865
  const updatedIssues = issues.map((issue)=>{
3866
- // 如果 issue 已修复或无效,不需要更新行号
3867
- if (issue.fixed || issue.valid === "false") {
3866
+ // 如果 issue 已修复、已解决或无效,不需要更新行号
3867
+ if (issue.fixed || issue.resolved || issue.valid === "false") {
3868
3868
  return issue;
3869
3869
  }
3870
3870
  const patch = filePatchMap.get(issue.file);
@@ -4123,7 +4123,7 @@ class IssueVerifyService {
4123
4123
  continue;
4124
4124
  }
4125
4125
  // valid === 'false' 的问题跳过复查(已确认无效的问题无需再次验证)
4126
- if (issue.valid === "false") {
4126
+ if (issue.valid === FALSE) {
4127
4127
  if (shouldLog(verbose, 1)) {
4128
4128
  console.log(` ⏭️ 跳过无效问题: ${issue.file}:${issue.line} (${issue.ruleId})`);
4129
4129
  }
@@ -4213,7 +4213,7 @@ class IssueVerifyService {
4213
4213
  if (result) {
4214
4214
  const updatedIssue = {
4215
4215
  ...issue,
4216
- valid: result.valid ? TRUE : FALSE
4216
+ valid: issue.fixed || issue.resolved ? TRUE : result.valid ? TRUE : FALSE
4217
4217
  };
4218
4218
  if (result.fixed) {
4219
4219
  if (shouldLog(verbose, 1)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceflow/review",
3
- "version": "0.59.0",
3
+ "version": "0.60.0",
4
4
  "description": "Spaceflow 代码审查插件,使用 LLM 对 PR 代码进行自动审查",
5
5
  "license": "MIT",
6
6
  "author": "Lydanne",
@@ -28,7 +28,7 @@
28
28
  "@spaceflow/cli": "0.38.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@spaceflow/core": "0.22.0"
31
+ "@spaceflow/core": "0.23.0"
32
32
  },
33
33
  "spaceflow": {
34
34
  "type": "flow",
@@ -92,7 +92,7 @@ export class IssueVerifyService {
92
92
  }
93
93
 
94
94
  // valid === 'false' 的问题跳过复查(已确认无效的问题无需再次验证)
95
- if (issue.valid === "false") {
95
+ if (issue.valid === FALSE) {
96
96
  if (shouldLog(verbose, 1)) {
97
97
  console.log(` ⏭️ 跳过无效问题: ${issue.file}:${issue.line} (${issue.ruleId})`);
98
98
  }
@@ -201,7 +201,7 @@ export class IssueVerifyService {
201
201
  if (result) {
202
202
  const updatedIssue: ReviewIssue = {
203
203
  ...issue,
204
- valid: result.valid ? TRUE : FALSE,
204
+ valid: issue.fixed || issue.resolved ? TRUE : result.valid ? TRUE : FALSE,
205
205
  };
206
206
 
207
207
  if (result.fixed) {
@@ -696,12 +696,10 @@ export class ReviewService {
696
696
 
697
697
  // 验证历史问题是否已修复
698
698
  if (context.verifyFixes) {
699
- existingIssues = await this.verifyAndUpdateIssues(
700
- context,
701
- existingIssues,
702
- commits,
703
- { specs, fileContents },
704
- );
699
+ existingIssues = await this.verifyAndUpdateIssues(context, existingIssues, commits, {
700
+ specs,
701
+ fileContents,
702
+ });
705
703
  } else {
706
704
  if (shouldLog(verbose, 1)) {
707
705
  console.log(` ⏭️ 跳过历史问题验证 (verifyFixes=false)`);
@@ -917,9 +915,7 @@ export class ReviewService {
917
915
  preloaded?: { specs: ReviewSpec[]; fileContents: FileContentsMap },
918
916
  ): Promise<ReviewIssue[]> {
919
917
  const { owner, repo, prNumber, llmMode, specSources, verbose } = context;
920
- const unfixedIssues = issues.filter(
921
- (i) => i.valid !== "false" && !i.fixed,
922
- );
918
+ const unfixedIssues = issues.filter((i) => i.valid !== "false" && !i.fixed);
923
919
 
924
920
  if (unfixedIssues.length === 0) {
925
921
  return issues;
@@ -2520,7 +2516,9 @@ ${fileChanges || "无"}`;
2520
2516
  if (issues.length === 0) {
2521
2517
  parts.push(`> ✅ 未发现新问题`);
2522
2518
  } else {
2523
- parts.push(`> **${issues.length}** 个新问题 · **${fileCount}** 个文件${badges.length > 0 ? " · " + badges.join(" ") : ""}`);
2519
+ parts.push(
2520
+ `> **${issues.length}** 个新问题 · **${fileCount}** 个文件${badges.length > 0 ? " · " + badges.join(" ") : ""}`,
2521
+ );
2524
2522
  }
2525
2523
 
2526
2524
  // 上轮回顾
@@ -2532,7 +2530,9 @@ ${fileChanges || "无"}`;
2532
2530
  const prevInvalid = prevIssues.filter((i) => i.valid === "false").length;
2533
2531
  const prevPending = prevIssues.length - prevFixed - prevResolved - prevInvalid;
2534
2532
  parts.push("");
2535
- parts.push(`<details><summary>📊 Round ${round - 1} 回顾 (${prevIssues.length} 个问题)</summary>\n`);
2533
+ parts.push(
2534
+ `<details><summary>📊 Round ${round - 1} 回顾 (${prevIssues.length} 个问题)</summary>\n`,
2535
+ );
2536
2536
  parts.push(`| 状态 | 数量 |`);
2537
2537
  parts.push(`|------|------|`);
2538
2538
  if (prevFixed > 0) parts.push(`| ✅ 已修复 | ${prevFixed} |`);
@@ -2644,8 +2644,8 @@ ${fileChanges || "无"}`;
2644
2644
  // 将变更文件的历史 issue 标记为无效
2645
2645
  let invalidatedCount = 0;
2646
2646
  const updatedIssues = issues.map((issue) => {
2647
- // 如果 issue 已修复或已无效,不需要处理
2648
- if (issue.fixed || issue.valid === "false") {
2647
+ // 如果 issue 已修复、已解决或已无效,不需要处理
2648
+ if (issue.fixed || issue.resolved || issue.valid === "false") {
2649
2649
  return issue;
2650
2650
  }
2651
2651
 
@@ -2691,8 +2691,8 @@ ${fileChanges || "无"}`;
2691
2691
  let updatedCount = 0;
2692
2692
  let invalidatedCount = 0;
2693
2693
  const updatedIssues = issues.map((issue) => {
2694
- // 如果 issue 已修复或无效,不需要更新行号
2695
- if (issue.fixed || issue.valid === "false") {
2694
+ // 如果 issue 已修复、已解决或无效,不需要更新行号
2695
+ if (issue.fixed || issue.resolved || issue.valid === "false") {
2696
2696
  return issue;
2697
2697
  }
2698
2698