flower-trellis 0.6.8-beta.2 → 0.6.8

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "syncedAt": "2026-09-15T08:32:43.985Z",
2
+ "syncedAt": "2026-09-16T09:48:56.489Z",
3
3
  "syncedFrom": "vendor/skill-garden",
4
4
  "sourceCommit": "66f538fafba63953cf40b7044bc390055012c4a7",
5
5
  "common": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flower-trellis",
3
- "version": "0.6.8-beta.2",
3
+ "version": "0.6.8",
4
4
  "description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -70,9 +70,9 @@
70
70
  "commit-and-tag-version": "^12.7.3"
71
71
  },
72
72
  "flowerReleaseNotes": {
73
- "version": "0.6.8-beta.2",
73
+ "version": "0.6.8",
74
74
  "source": "CHANGELOG.md",
75
- "body": "### 🐛 修复 Bug Fixes\n\n* **auto-loop:** 同步恢复自纠与回归验证 ([288bd9f](https://github.com/SilentFlower/flower-trellis/commit/288bd9f1fd029203243cc41cb8bdf7858d831c77))\n* **auto-loop:** 同步框架冲突修复与回归验证 ([f240a17](https://github.com/SilentFlower/flower-trellis/commit/f240a172d16abb6e7826b4ae79e37d8ce9ff5fcc))\n* **codex:** 强化 Astra 工作流确认边界 ([fd14a49](https://github.com/SilentFlower/flower-trellis/commit/fd14a49df6f5086b3097a06a1d1355fd7e0a6915))\n* **trellis:** 同步风险展示优化与回归验证 ([07f17a8](https://github.com/SilentFlower/flower-trellis/commit/07f17a8ea40c72fe62d3c99ffef37beb36c06101))",
75
+ "body": "### 🐛 修复 Bug Fixes\n\n* **trellis:** 减少重复确认与输出,修复技能之间的流程衔接 ([01f79eb](https://github.com/SilentFlower/flower-trellis/commit/01f79eb94dc61b1283f35187b1756f0d2fbe1206))\n - **任务 Brief**:避免进入实现或恢复会话时重复展示、确认已批准的内容。\n - **任务恢复**:Start 统一交给 Continue 恢复进度,复用已加载的有效上下文。\n - **收尾提交**:归档与会话日志合并为一次精确提交,保留原有自动推送条件。\n - **输出精简**:Push 成功后简要显示结果;Check-All 的问题处置选项只展示一次。\n - **规范更新**:统一 Check-All、Update-Spec 和 Break-Loop 的承接规则;已有规范覆盖时允许无需修改。\n - **需求处理**:修正 PRD 创建顺序、需求准确性与覆盖率检查方向,避免把必要的实现细节误判为需求扩张。\n - **平台与入口**:创建命令时遵循实际平台目录;修正普通检查和软件发版的入口指引。\n* **auto-loop:** 同步恢复自纠与回归验证 ([288bd9f](https://github.com/SilentFlower/flower-trellis/commit/288bd9f1fd029203243cc41cb8bdf7858d831c77))\n* **auto-loop:** 同步框架冲突修复与回归验证 ([f240a17](https://github.com/SilentFlower/flower-trellis/commit/f240a172d16abb6e7826b4ae79e37d8ce9ff5fcc))\n* **check-all:** 同步报告落盘规则与规范 ([0477456](https://github.com/SilentFlower/flower-trellis/commit/04774560d8cde20b6bb6abe025bcaa0bf1bb5514))\n* **codex:** 强化 Astra 工作流确认边界 ([fd14a49](https://github.com/SilentFlower/flower-trellis/commit/fd14a49df6f5086b3097a06a1d1355fd7e0a6915))\n* **hooks:** 修复 Windows 更新检查入口与路径参数 ([ed7e68f](https://github.com/SilentFlower/flower-trellis/commit/ed7e68f0cfac6cead9c88817d82ab795450bd724))\n* **push:** 同步保留变更展示与落盘规则 ([9bcd747](https://github.com/SilentFlower/flower-trellis/commit/9bcd74761777f108be0a7286f0e253c06b0cb0ba))\n* **skills:** 迁移通用技能到共享 agents 目录 ([7ebdf05](https://github.com/SilentFlower/flower-trellis/commit/7ebdf0560ccc53ecd252f6e8b259d417d0a53d78))\n* **trellis:** 同步风险展示优化与回归验证 ([07f17a8](https://github.com/SilentFlower/flower-trellis/commit/07f17a8ea40c72fe62d3c99ffef37beb36c06101))\n\n\n### 🧰 维护 Maintenance\n\n* **trellis:** 同步 Flower 0.6.7 与插件安装记录 ([690f1b4](https://github.com/SilentFlower/flower-trellis/commit/690f1b4e87d4bffdb02800e576acf882382de566))\n* **trellis:** 同步 Flower 0.6.8-beta.0 安装记录 ([2ea16ed](https://github.com/SilentFlower/flower-trellis/commit/2ea16ed3f0ddfe8a7d34d1b132fb3cb55d419344))",
76
76
  "truncated": false
77
77
  },
78
78
  "optionalDependencies": {
@@ -9,6 +9,7 @@ from __future__ import annotations
9
9
 
10
10
  import argparse
11
11
  import json
12
+ import ntpath
12
13
  import os
13
14
  import re
14
15
  import shutil
@@ -144,25 +145,45 @@ def _project_dir(hook_input: dict) -> Path:
144
145
 
145
146
 
146
147
  def _run_self_check(project_dir: Path) -> dict | None:
147
- """执行 flower-trellis self-check 并解析 JSON。"""
148
+ """执行 flower-trellis self-check,保留目标路径并解析 JSON。
149
+
150
+ Args:
151
+ project_dir: 要检查的项目目录。
152
+ Returns:
153
+ CLI 检查结果或安装、环境诊断。
154
+ """
148
155
  bootstrap = _check_cli(project_dir)
149
156
  if bootstrap:
150
157
  return bootstrap
158
+ # Windows 不会按 PATHEXT 为裸命令补 .CMD,执行时必须使用探测到的入口路径。
159
+ cli_path = shutil.which("flower-trellis")
160
+ if not cli_path:
161
+ return {"status": "cli_unavailable", "reason": "Flower 入口在执行前已不可用,请检查 PATH"}
162
+ command = [cli_path, "self-check", "--json", "--target", str(project_dir)]
163
+ run_options = {}
164
+ if os.name == "nt" and os.path.splitext(cli_path)[1].lower() in {".cmd", ".bat"}:
165
+ command_processor = os.environ.get("COMSPEC")
166
+ if not command_processor and os.environ.get("SystemRoot"):
167
+ command_processor = os.path.join(os.environ["SystemRoot"], "System32", "cmd.exe")
168
+ if not command_processor or not ntpath.isabs(command_processor):
169
+ return {"status": "cli_unavailable", "reason": "Windows 命令解释器的绝对路径无法确认,请检查 COMSPEC 与 SystemRoot"}
170
+ # 批处理即使 shell=False 也会经过 CMD;带引号的环境占位符保留路径中的 &、^ 和 %。
171
+ # 禁用 AutoRun 与延迟展开,避免宿主配置或 !变量! 改变检查命令及路径。
172
+ environment = os.environ.copy()
173
+ environment["FLOWER_UPDATE_HOOK_CLI"] = cli_path
174
+ environment["FLOWER_UPDATE_HOOK_TARGET"] = str(project_dir)
175
+ command = f'"{command_processor}" /d /v:off /s /c ""%FLOWER_UPDATE_HOOK_CLI%" self-check --json --target "%FLOWER_UPDATE_HOOK_TARGET%""'
176
+ run_options = {"executable": command_processor, "env": environment}
151
177
  try:
152
178
  result = subprocess.run(
153
- [
154
- "flower-trellis",
155
- "self-check",
156
- "--json",
157
- "--target",
158
- str(project_dir),
159
- ],
179
+ command,
160
180
  capture_output=True,
161
181
  text=True,
162
182
  encoding="utf-8",
163
183
  errors="replace",
164
184
  timeout=SELF_CHECK_TIMEOUT_SECONDS,
165
185
  cwd=str(project_dir),
186
+ **run_options,
166
187
  )
167
188
  except subprocess.TimeoutExpired:
168
189
  return {"status": "cli_unavailable", "reason": "Flower CLI 检查超时,不能据此判定未安装"}