flower-trellis 0.6.13-beta.12 → 0.6.13-beta.13
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.
|
@@ -22,7 +22,7 @@ Codex 保持普通 `codex` / `codex resume` 与默认共享服务。通过当前
|
|
|
22
22
|
先从项目根执行 `python3 .trellis/scripts/flower_confirmation_hook.py --entry`,读取实际返回的 `entry` argv,后续在其后追加 `prepare`、`wait` 等子命令。入口固定为项目内 `.trellis/scripts/flower_confirmation.py`,内部复用当前 Python 解释器,仅依赖标准库和项目脚本。`entry=null` 或工具失败才报告实际原因;不能用无 stdout 的 `test -f` 推断入口不存在。确认阶段无需 Node、npm、全局 Flower 或额外 pip 安装。
|
|
23
23
|
|
|
24
24
|
1. 在 gitignored `.trellis/.runtime/` 为当前平台和会话写一个 JSON 材料文件,路径不得复用于并行会话。不要把它放入提交集合,不生成公开报告附件。使用结构化文件写入,用户正文和 message 不拼入 shell。
|
|
25
|
-
2. JSON 的公共字段为 `kind: brief|check|push`、`task
|
|
25
|
+
2. JSON 的公共字段为 `kind: brief|check|push`、`task`。Brief 必须指定目标活动任务的精确相对路径,正文读取该任务 `brief.md`;当前会话允许尚未绑定任务,已有绑定须与目标一致。会话绑定另行冻结,等待期间变化使旧确认失效。Check/Push 使用当前精确任务相对路径,无任务为 null,另提供完整标准报告/计划的 `body`。
|
|
26
26
|
3. Check 必填 `reportVersion`、`dispositionVersion`(非空版本字符串)及 `findings: [{id:"CHK-001",status:"pending"}]`;status 只接受 pending/accepted/resolved。必须覆盖当前全部条目,禁止只传准备修复的子集来改变默认动作。
|
|
27
27
|
4. Push 必填 `mode: push|commit-only`、`evidence: {check:passed|accepted|focused,spec:no-op|written,unresolvedRisks:0}` 和有序 `repositories`。每仓包含 `root`、实际 `branch`、完整 `head`(初始空仓为 null)、实际 `upstream`(没有为 null)、精确 `message`、完整 `files` 路径列表。把已展示的生成命令、任务记录 exact files 与顺序一并保存在输入中,不在领取后扩大范围。
|
|
28
28
|
5. 从项目根执行 `python3 -X utf8 .trellis/scripts/flower_confirmation.py prepare --platform codex|claude --input <相对路径>`;用户明确指定本次时长时加 `--seconds <正整数秒>`。仅 `prepared=true` 可继续,任何错误或 false 保持原人工提示。
|
|
@@ -19,6 +19,7 @@ from pathlib import Path
|
|
|
19
19
|
|
|
20
20
|
from common.config import parse_simple_yaml
|
|
21
21
|
from common.active_task import resolve_active_task
|
|
22
|
+
from common.tasks import normalize_closeout
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
VERSION = 1
|
|
@@ -342,8 +343,14 @@ def inspect_confirmation(root, input_path, platform, session_id, seconds=None):
|
|
|
342
343
|
raise ValueError("未知确认种类")
|
|
343
344
|
active = resolve_active_task(root, {"session_id": session_id}, platform,
|
|
344
345
|
allow_single_session_fallback=False, allow_environment_context=False)
|
|
345
|
-
task = active.task_path
|
|
346
|
-
if
|
|
346
|
+
task = material.get("task") if kind == "brief" else active.task_path
|
|
347
|
+
if kind == "brief":
|
|
348
|
+
# Brief 先确认再 start,因此目标任务来自材料;会话绑定另行冻结以检测等待期间的切换。
|
|
349
|
+
if active.source_type != "session" or active.stale:
|
|
350
|
+
raise ValueError("Brief 确认的当前会话任务状态无效")
|
|
351
|
+
if not isinstance(task, str) or not re.fullmatch(r"\.trellis/tasks/[^/]+", task):
|
|
352
|
+
raise ValueError("Brief 确认必须指定活动任务目录")
|
|
353
|
+
if (kind != "brief" or active.task_path is not None) and material.get("task") != active.task_path:
|
|
347
354
|
raise ValueError("确认材料与当前会话任务不符")
|
|
348
355
|
task_manual_only = False
|
|
349
356
|
task_files = {}
|
|
@@ -352,6 +359,10 @@ def inspect_confirmation(root, input_path, platform, session_id, seconds=None):
|
|
|
352
359
|
task_metadata = json.loads(metadata_bytes.decode("utf-8"))
|
|
353
360
|
if not isinstance(task_metadata, dict) or not isinstance(task_metadata.get("meta", {}), dict):
|
|
354
361
|
raise ValueError("任务元数据无效")
|
|
362
|
+
if kind == "brief":
|
|
363
|
+
closeout = normalize_closeout(task_metadata)
|
|
364
|
+
if not closeout["valid"] or closeout["status"] == "closed":
|
|
365
|
+
raise ValueError("Brief 确认目标任务已关闭或关闭状态无效")
|
|
355
366
|
task_manual_only = task_metadata.get("meta", {}).get("confirmationTimeoutDisabled") is True
|
|
356
367
|
task_files["task.json"] = hashlib.sha256(metadata_bytes).hexdigest()
|
|
357
368
|
for name in ("prd.md", "design.md", "implement.md", "brief.md"):
|
|
@@ -359,8 +370,6 @@ def inspect_confirmation(root, input_path, platform, session_id, seconds=None):
|
|
|
359
370
|
continue
|
|
360
371
|
task_files[name] = _fingerprint(_inside(root, task + "/" + name), optional=True)
|
|
361
372
|
if kind == "brief":
|
|
362
|
-
if not task:
|
|
363
|
-
raise ValueError("Brief 确认缺少当前任务")
|
|
364
373
|
brief_bytes = _bytes(_inside(root, task + "/brief.md"))
|
|
365
374
|
task_files["brief.md"] = hashlib.sha256(brief_bytes).hexdigest()
|
|
366
375
|
body = brief_bytes.decode("utf-8")
|
|
@@ -372,6 +381,8 @@ def inspect_confirmation(root, input_path, platform, session_id, seconds=None):
|
|
|
372
381
|
if len(body.encode("utf-8")) > DOCUMENT_BYTES:
|
|
373
382
|
raise ValueError("确认正文超过 512 KiB 展示预算")
|
|
374
383
|
facts = {"task": task, "taskFiles": task_files, "inputHash": hashlib.sha256(input_bytes).hexdigest()}
|
|
384
|
+
if kind == "brief":
|
|
385
|
+
facts["sessionTask"] = active.task_path
|
|
375
386
|
count = 0
|
|
376
387
|
if kind == "check":
|
|
377
388
|
if not all(isinstance(material.get(key), str) and material[key] for key in ("reportVersion", "dispositionVersion")):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"syncedAt": "2026-11-
|
|
2
|
+
"syncedAt": "2026-11-13T09:09:34.584Z",
|
|
3
3
|
"syncedFrom": "vendor/skill-garden",
|
|
4
|
-
"sourceCommit": "
|
|
4
|
+
"sourceCommit": "db2d70b197010028391bfd00271709e594709c2a",
|
|
5
5
|
"common": {
|
|
6
6
|
"codexSkills": [
|
|
7
7
|
"aliyun-ops",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flower-trellis",
|
|
3
|
-
"version": "0.6.13-beta.
|
|
3
|
+
"version": "0.6.13-beta.13",
|
|
4
4
|
"description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"commit-and-tag-version": "^12.7.3"
|
|
74
74
|
},
|
|
75
75
|
"flowerReleaseNotes": {
|
|
76
|
-
"version": "0.6.13-beta.
|
|
76
|
+
"version": "0.6.13-beta.13",
|
|
77
77
|
"source": "CHANGELOG.md",
|
|
78
|
-
"body": "### 🐛 修复 Bug Fixes\n\n* **confirmation:**
|
|
78
|
+
"body": "### 🐛 修复 Bug Fixes\n\n* **confirmation:** 支持未绑定任务的 Brief 确认 ([d6a2cd1](https://github.com/SilentFlower/flower-trellis/commit/d6a2cd19ae662af92466e59cf05fbebf51fd1fb1))",
|
|
79
79
|
"truncated": false
|
|
80
80
|
},
|
|
81
81
|
"optionalDependencies": {
|