@pennixrv/trellis 0.7.2-beta.33 → 0.7.2-beta.35
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.34.json +9 -0
- package/dist/migrations/manifests/0.7.2-beta.35.json +9 -0
- package/dist/templates/common/bundled-skills/trellis-worktree-delegation/workflow.md +4 -0
- package/dist/templates/trellis/scripts/common/worktree_delegation.py +14 -2
- package/dist/templates/trellis/scripts/common/worktree_delegation_messages.py +15 -2
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.34",
|
|
3
|
+
"description": "Recover delegated preparation through controlled clarification inputs",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Expose preparation blocked reports in wait and inspect. Reuse delegate-followup for new frozen preparation clarifications without granting implementation permission, replaying old inputs or allowing an older ready to bypass the latest prerequisite.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No task-data, binding or candidate-format migration. Upgrade the synchronized CLI/core/adapter cohort through its owner, then use native trellis update for corrected scripts and controller guidance. Retained attempts remain unaccepted; preparation clarification requires a current approved attempt, exact base and source identity, and known uncontaminated delivery."
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.7.2-beta.35",
|
|
3
|
+
"description": "Complete normal reconciliation after recovered delegated blockers",
|
|
4
|
+
"breaking": false,
|
|
5
|
+
"recommendMigrate": false,
|
|
6
|
+
"changelog": "Preserve validated blocked reports from recovered preparation and business turns during normal integration. Require the latest preparation to be ready and the current business input to have a complete result; validate every historical input batch without rewriting its report.",
|
|
7
|
+
"migrations": [],
|
|
8
|
+
"notes": "No task-data, binding or candidate-format migration. Upgrade the synchronized CLI/core/adapter cohort through its owner, then use native trellis update. Historical blocked evidence is not source acceptance; unresolved current blockers, missing reports, mismatched input identities and remaining work still prevent integration."
|
|
9
|
+
}
|
|
@@ -53,6 +53,8 @@ binding format 3 固定包、父合同、子 PRD、设置、能力、角色、
|
|
|
53
53
|
|
|
54
54
|
`delegate-followup <child> --instructions-ref <子任务内文件>` 在同一未变包内续接。同 Agent 正在运行时使用原生 queue,不默认 steer/interrupt;每次输入持久保存准确 prompt、messageId、冻结 context 和候选路径。input ID 就是原生 messageId。节点结果 version 2 按输入/实际批次保留,主控从完整公开 timeline 关联多输入到一个 turn;外部输入污染、缺页、epoch 不可恢复、未知发送和旧结果都阻止接受。no-op 仍需本轮证据。
|
|
55
55
|
|
|
56
|
+
尚无 execute、许可仍为 preparation 时,同一 followup 命令用于补充准备信息,保存新的 prepare 输入,不重发首轮,也不授业务源码写权。wait/inspect 会展示当前准备 blocked;主控可补已批准的只读资料引用,节点不能改用主控 Task CLI。最新准备输入仍排队、未消费或 missing 非空时,旧 ready 不触发 execute;准备续接仍核准确 base、干净源码、身份与父授权,未知或污染输入须先保全和核验。进入实施后,followup 保持原业务续接语义。
|
|
57
|
+
|
|
56
58
|
超范围的新需求走独立批准任务或包。父合同整体冻结;修改父合同会撤销其旧绑定,不新增可变的包级权限。
|
|
57
59
|
|
|
58
60
|
正常包关闭后,同一控制根可在新绑定显式使用 `--reuse-task <旧子任务>` 复用语境。旧包须正常 owner 接受、原生运行关闭、输入全部已消费、队列与后台工作为空,并具有准确稳定 locator;checkout、运行设置、角色和节点方法必须匹配。新包仍重新准备,历史输入不覆盖。旧格式、配置不符或 quarantined Agent 不复用,也不私改 launchEnv。
|
|
@@ -81,6 +83,8 @@ binding format 3 固定包、父合同、子 PRD、设置、能力、角色、
|
|
|
81
83
|
|
|
82
84
|
`delegate-reconcile --disposition integrated` 先预览,再用 `--execute --reason ... --approval-ref ... --writer-evidence-ref <当前外部 writer 证据> --acceptance-ref <准确接受文件>` 核销。所有应完成输入都须消费并有对应候选;队列、原生运行和后台 writer 必须关闭。执行核销通过原生 `kill_agent` 关闭运行态,保留未归档的历史和 checkout,不 delete。实施阶段接受前必须完成资源核销,idle 不足。
|
|
83
85
|
|
|
86
|
+
已恢复的历史输入可以保留其真实 blocked,不能为了核销补写 ready 或 result。每个历史批次仍核准确身份和消费,最新准备必须 ready/missing=[],当前业务输入必须交合格 result/remaining=[];未恢复的当前阻断不能作为接受结果。
|
|
87
|
+
|
|
84
88
|
dirty 或半成品使用 `--disposition retained` 保全实际 HEAD/status,不要求合格 result;retained 不是成果接受。owner 后续接手完成源码时,可在有效授权内以 owner-result-ref 登记 version 1、kind=owner_result 的独立结果,包含准确 attempt、binding、base、head、changed_paths、source_commits、checks 和空 remaining,再显式请求 integrated;它不冒充旧 Agent 的消费/自检证据。
|
|
85
89
|
|
|
86
90
|
记录位于 ignored `.trellis/.runtime/delegation/<child>/`,冻结输入和稳定 Agent locator 也在 runtime;PRD、设计和 owner 接受证据仍在原生任务中。旧 binding/candidate 与 meta 记录保留原合同读取、核验和安全收尾,不用于新创建或猜造投递证明。完成、取消、转移、解绑、移动及重命名前收口资源;未知状态保留现场。第五阶段需要实施返工时,主控先返回有效授权的第四阶段。
|
|
@@ -495,7 +495,12 @@ def run(args):
|
|
|
495
495
|
fail("initial execution input already exists; use a new authorized followup")
|
|
496
496
|
source_clean(record, path)
|
|
497
497
|
instructions = file_ref(child_dir, args.instructions_ref).read_text(encoding="utf8") if operation == "followup" else ""
|
|
498
|
-
|
|
498
|
+
stage = operation
|
|
499
|
+
if operation == "followup" and not any(item["stage"] != "prepare" for item in record.get("inputs", [])):
|
|
500
|
+
if not record.get("inputs"):
|
|
501
|
+
fail("preparation input must exist before a clarification")
|
|
502
|
+
stage = "prepare"
|
|
503
|
+
send_input(root, child_dir, record, path, stage, instructions, rpc=rpc)
|
|
499
504
|
print(json.dumps(record, ensure_ascii=False))
|
|
500
505
|
return 0
|
|
501
506
|
fail("legacy inputs have no message-scoped contract; retain before rebinding")
|
|
@@ -570,15 +575,22 @@ def run(args):
|
|
|
570
575
|
native_lifecycle(record, rpc=rpc)
|
|
571
576
|
if record.get("quarantined") or not record.get("inputs"):
|
|
572
577
|
fail("quarantined or inputless attempt cannot be accepted as integrated")
|
|
578
|
+
if any(item["stage"] == "prepare" for item in record["inputs"]):
|
|
579
|
+
ready = candidate(record, "ready", current_head=False)
|
|
580
|
+
if not ready or ready.get("missing") != []:
|
|
581
|
+
fail("latest preparation must be ready before acceptance")
|
|
573
582
|
for item in record["inputs"]:
|
|
574
583
|
report = candidate(record, "ready" if item["stage"] == "prepare" else "result",
|
|
575
584
|
current_head=False, input_id=item["id"])
|
|
585
|
+
if not report:
|
|
586
|
+
report = candidate(record, "blocked", current_head=False, input_id=item["id"])
|
|
576
587
|
if not report:
|
|
577
588
|
fail("every consumed input batch needs its own candidate before acceptance")
|
|
578
589
|
if item["stage"] != "prepare":
|
|
579
590
|
git(Path(record["worktree_path"]), "merge-base", "--is-ancestor",
|
|
580
591
|
report["head_commit"], "HEAD")
|
|
581
|
-
|
|
592
|
+
if report["kind"] == "result":
|
|
593
|
+
clean_result(record, report, path)
|
|
582
594
|
result = candidate(record, "result") if args.disposition == "integrated" else None
|
|
583
595
|
if not result and args.disposition != "retained":
|
|
584
596
|
fail("bounded result and preserved source evidence required before retirement")
|
|
@@ -140,9 +140,11 @@ def send_input(root: Path, child_dir: Path, record: dict, path: Path, stage: str
|
|
|
140
140
|
package_admission(root, child_dir, record, path)
|
|
141
141
|
if record.get("intent") or record.get("cancel_requested") or record.get("quarantined"):
|
|
142
142
|
fail("pending operation or quarantine prevents new input")
|
|
143
|
+
if stage == "prepare" and record.get("inputs") and not instructions.strip():
|
|
144
|
+
fail("preparation input already exists; use an explicit authorized clarification")
|
|
143
145
|
tree = assert_worktree(record)
|
|
144
146
|
observed = native_lifecycle(record, rpc=rpc)["agents"][0]
|
|
145
|
-
if stage != "prepare":
|
|
147
|
+
if stage != "prepare" or record.get("inputs"):
|
|
146
148
|
runtime = observed.get("runtimeInfo") or {}
|
|
147
149
|
model = runtime.get("model") or observed.get("model")
|
|
148
150
|
mode = runtime.get("modeId") or observed.get("currentModeId")
|
|
@@ -154,7 +156,16 @@ def send_input(root: Path, child_dir: Path, record: dict, path: Path, stage: str
|
|
|
154
156
|
if record.get("intent") or record.get("cancel_requested") or record.get("quarantined"):
|
|
155
157
|
fail("input preflight became stale; preserve the pending operation without sending")
|
|
156
158
|
if stage == "prepare" and record.get("inputs"):
|
|
157
|
-
|
|
159
|
+
if (not instructions.strip() or record.get("execution_permission") != "preparation"
|
|
160
|
+
or any(item["stage"] != "prepare" for item in record["inputs"])):
|
|
161
|
+
fail("preparation clarification cannot replace an existing business input or permission")
|
|
162
|
+
package_admission(root, child_dir, record, path)
|
|
163
|
+
if any(item.get("delivery") not in {"queued", "consumed"} or item.get("foreign_input")
|
|
164
|
+
for item in record["inputs"]):
|
|
165
|
+
fail("preparation delivery is unresolved or contaminated; reconcile before clarifying")
|
|
166
|
+
if git(tree, "rev-parse", "HEAD") != record["binding"]["base_commit"]:
|
|
167
|
+
fail("preparation clarification requires the exact approved HEAD")
|
|
168
|
+
contract.source_clean(record, path)
|
|
158
169
|
if stage == "execute":
|
|
159
170
|
if any(item["stage"] != "prepare" for item in record.get("inputs", [])):
|
|
160
171
|
fail("initial business input was already allocated during preflight")
|
|
@@ -201,6 +212,8 @@ def send_input(root: Path, child_dir: Path, record: dict, path: Path, stage: str
|
|
|
201
212
|
|
|
202
213
|
|
|
203
214
|
def candidate_input(record: dict, name: str):
|
|
215
|
+
if name == "blocked":
|
|
216
|
+
return next(reversed(record.get("inputs", [])), None)
|
|
204
217
|
stage = "prepare" if name == "ready" else None
|
|
205
218
|
return next((item for item in reversed(record.get("inputs", []))
|
|
206
219
|
if (item["stage"] == stage if stage else item["stage"] != "prepare")), None)
|
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.35",
|
|
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.35"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@eslint/js": "^9.18.0",
|