@pennixrv/trellis 0.7.2-beta.5 → 0.7.2-beta.7
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/dist/migrations/manifests/0.7.2-beta.6.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.7.json +9 -0
- package/dist/templates/common/bundled-skills/trellis-worktree-delegation/workflow.md +1 -0
- package/dist/templates/trellis/scripts/common/worktree_delegation.py +13 -2
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.6",
|
|
3
|
+
"description": "修复真实 Paseo 委派创建及后台节点对账",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "已有 workspace 内创建 agent 不再重复传入 background;完整检查后台与已归档节点。经明确原生拒绝及全量资源核验的未创建 agent,可凭主控证据显式恢复到 workspace_created,不重放未知创建。",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "同步升级 CLI 与可选 adapter,并通过原生 trellis update 更新控制脚本及协作方法;既有绑定和源码保留。"
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.7",
|
|
3
|
+
"description": "修复 daemon PATH 差异和已拒绝请求的幂等键冲突",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "必需 CodeGraph 由主控解析并核验绝对入口,避免 daemon PATH 不含用户安装目录导致 MCP 缺失;agent 创建幂等键包含实际请求指纹,相同请求保持稳定,经显式核验未创建后修正的请求不再撞旧指纹。",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "同步更新 CLI、可选 adapter 和原生项目资产;准备缺项仍阻断 execute,未知创建仍须原生对账,不能自动重试。"
|
|
9
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
4. `delegate-start <child>` 先持久化创建 intent,再创建 workspace 和 prepare agent。只授予准备许可;观察 native resources 与 bounded ready,核对当前源码 HEAD、完整必需能力、实际模型/effort/mode;不能只凭节点自报或 idle 就接受。主控检查 `delegate-inspect` 后,`delegate-execute` 发送实施指令。有并行包时分别准备、执行,按真实依赖集成后再派下游。
|
|
9
9
|
5. `delegate-wait <child> --timeout-ms 3600000` 使用原生等待;主控还有独立工作就先推进。没有其他工作时持续原生等待,timeout 不是完成或批准。observe/inspect 不改结果接受;`delegate-followup --instructions-ref <子任务内文件>` 返工前重核当前绑定与实际设置。interrupt 仅请求取消,不证明 writer 已停止。
|
|
10
10
|
6. 压缩/新主控恢复先 inspect,沿当前 task/binding/attempt/native ID 续接。未知创建使用 `delegate-reconcile --recover --workspace-id <完整ID> [--agent-id <完整ID>]` 预览,核验准确原生 workspace、cwd、Git common/branch/base、agent 标签后,显式 `--execute --reason ... --approval-ref ...` 接回。未知发送/取消还需要 `--delivery-evidence-ref`,引用主控实际检查的原生 timeline/turn 证据;不得把 idle 当交付证明。workspace 已映射而尚未发起 agent 时,恢复后 `delegate-start` 仅创建尚未发起的 agent。未知 agent 创建必须先找到准确 ID,不能再创建一个。
|
|
11
|
+
若原生验证明确在创建前拒绝 agent,且包含后台/归档的全量检查确认没有当前 attempt agent,可使用 `--delivery-evidence-ref` 提交主控核验的原生拒绝与未创建证据,显式恢复到 workspace_created。仅“当前列表没看到”不充分;发现匹配 agent 时必须映射准确 ID,未知结果保留现场。
|
|
11
12
|
7. owner 审查 result 的真实 commits/diff/checks、范围和控制面未被改动,依赖结果只能在集成后作为当前树事实。通过目标 owner 原生 merge/FF 集成,验证 accepted HEAD 是目标 integration branch 的祖先;禁止默认 cherry-pick。根侧 gitlink 集成单独记录。
|
|
12
13
|
8. `delegate-reconcile --disposition integrated` 预览;确认原生 agent 无 active turn、结果和接受证据、源码保全、后台 writer 与测试服务已停后,使用 `--execute --reason ... --approval-ref ... --writer-evidence-ref <子任务内证据>` 核销。取消可用 retained,保留实际 checkout/HEAD/status 和候选;没有结果时也必须保留源码,不销毁未知 writer。核销仅结束控制记录,不自动 archive/delete。资源删除由原生 owner 另按已批准处置执行。
|
|
13
14
|
|
|
@@ -6,6 +6,7 @@ import json
|
|
|
6
6
|
import os
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
import re
|
|
9
|
+
import shutil
|
|
9
10
|
import subprocess
|
|
10
11
|
import uuid
|
|
11
12
|
from typing import NoReturn
|
|
@@ -241,9 +242,14 @@ def prepare_agent(root: Path, child_dir: Path, record: dict, path: Path):
|
|
|
241
242
|
role = (root / ".trellis/agents/delegated-worktree-primary-agent.md").read_text(encoding="utf8")
|
|
242
243
|
if role.startswith("---\n"):
|
|
243
244
|
role = role.split("\n---\n", 1)[1].lstrip("\n")
|
|
245
|
+
codegraph = "codegraph" in record["requirements"].get("required_tools", [])
|
|
246
|
+
tool = shutil.which("codegraph") if codegraph else None
|
|
247
|
+
if codegraph and not tool:
|
|
248
|
+
fail("required CodeGraph executable is unavailable to the controller")
|
|
249
|
+
tool_payload = {"codegraph_command": str(Path(tool).resolve(strict=True))} if tool else {}
|
|
244
250
|
record["intent"] = "prepare-agent"
|
|
245
251
|
save(path, record)
|
|
246
|
-
agent = adapter(record, "prepare-agent", {"workspace_id": record["workspace_id"], "cwd": record["worktree_path"], "model": record["settings"]["model"], "effort": record["settings"]["effort"], "role": role, "context": str(context), "prompt": f"prepare:读取 {context},只准备并提交 ready.json;当前 agent_id 映射由主控落盘,身份不完整时只报告阻断。", "codegraph":
|
|
252
|
+
agent = adapter(record, "prepare-agent", {"workspace_id": record["workspace_id"], "cwd": record["worktree_path"], "model": record["settings"]["model"], "effort": record["settings"]["effort"], "role": role, "context": str(context), "prompt": f"prepare:读取 {context},只准备并提交 ready.json;当前 agent_id 映射由主控落盘,身份不完整时只报告阻断。", "codegraph": codegraph, **tool_payload, "labels": {"trellis.control": record["control_project_id"], "trellis.child": record["binding"]["child_task_id"], "trellis.attempt": record["attempt_id"]}})["agent"]
|
|
247
253
|
if not agent or not agent.get("id") or agent.get("workspaceId") != record["workspace_id"]:
|
|
248
254
|
fail("agent creation outcome unknown; preserve intent")
|
|
249
255
|
record.update({"agent_id": agent["id"], "status": "running", "intent": None})
|
|
@@ -276,12 +282,17 @@ def recover(root: Path, child_dir: Path, record: dict, path: Path, args):
|
|
|
276
282
|
if record.get("agent_id") and record["agent_id"] != agent_id:
|
|
277
283
|
fail("recovery cannot replace an existing agent")
|
|
278
284
|
adopted.update({"agent_id": agent_id, "status": "running"})
|
|
285
|
+
elif record["intent"] == "prepare-agent" and args.delivery_evidence_ref:
|
|
286
|
+
if any(a and a.get("labels", {}).get("trellis.attempt") == record["attempt_id"] for a in observed.get("agents", [])):
|
|
287
|
+
fail("native attempt agent exists; map its exact ID instead of asserting absence")
|
|
288
|
+
file_ref(child_dir, args.delivery_evidence_ref)
|
|
289
|
+
adopted["status"] = "workspace_created"
|
|
279
290
|
elif record["intent"] != "prepare-workspace":
|
|
280
291
|
fail("unknown agent creation must be mapped before any new agent is created")
|
|
281
292
|
else:
|
|
282
293
|
adopted["status"] = "workspace_created"
|
|
283
294
|
evidence = {"observation": observed, "intent": record["intent"]}
|
|
284
|
-
if record["intent"] in {"send_pending", "interrupt_pending"}:
|
|
295
|
+
if record["intent"] in {"send_pending", "interrupt_pending", "prepare-agent"} and (not agent_id or record["intent"] != "prepare-agent"):
|
|
285
296
|
if not args.delivery_evidence_ref:
|
|
286
297
|
fail("controller-owned native delivery/interrupt evidence required; idle alone cannot resolve unknown delivery")
|
|
287
298
|
evidence["delivery_evidence"] = file_ref(child_dir, args.delivery_evidence_ref).read_text(encoding="utf8")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pennixrv/trellis",
|
|
3
|
-
"version": "0.7.2-beta.
|
|
3
|
+
"version": "0.7.2-beta.7",
|
|
4
4
|
"description": "AI capabilities grow like ivy — Trellis provides the structure to guide them along a disciplined path",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"inquirer": "^9.3.7",
|
|
36
36
|
"undici": "^6.21.0",
|
|
37
37
|
"zod": "^4.4.2",
|
|
38
|
-
"@pennixrv/trellis-core": "0.7.2-beta.
|
|
38
|
+
"@pennixrv/trellis-core": "0.7.2-beta.7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@eslint/js": "^9.18.0",
|