flower-trellis 0.6.8-beta.2 → 0.6.9-beta.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "syncedAt": "2026-09-15T08:32:43.985Z",
2
+ "syncedAt": "2026-09-16T09:56:10.375Z",
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.9-beta.0",
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.9-beta.0",
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": "### 🧰 维护 Maintenance\n\n* 以 `0.6.8` 正式版为基线,延续全部修复(包括 Windows 更新检查入口与路径参数修复),发布到 `beta` 通道,供持续使用 beta 的用户升级。",
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 检查超时,不能据此判定未安装"}