@akagilnc/pi-workflow-roles 0.1.4782 → 0.1.4800
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/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/acp-host/production-host.js +104 -215
- package/dist/headless-host/production-host.js +149 -229
- package/dist/migrate-book-topology.js +1 -1
- package/dist/pi/role-turn-host.js +1 -1
- package/dist/public-cli/auto-resume.js +9 -15
- package/dist/public-cli/countersign-run.js +75 -87
- package/dist/public-cli/diarist-run.js +6 -26
- package/dist/public-cli/inspector-run.js +1 -1
- package/dist/public-cli/main.js +64 -177
- package/dist/public-cli/notary-run.js +0 -3
- package/dist/public-cli/option-definitions.js +1 -1
- package/dist/public-cli/post-admission.js +35 -65
- package/dist/public-cli/reviewer-run.js +1 -1
- package/dist/public-cli/run-lifecycle.js +14 -46
- package/dist/public-cli/seat-ticket-binding.js +11 -25
- package/dist/public-role-summons.js +2 -0
- package/package.json +1 -1
- package/src/headless-host/role-turn-host.ts +49 -12
- package/src/pi/role-turn-host.ts +1 -1
- package/src/public-cli/auto-resume.ts +19 -18
- package/src/public-cli/countersign-run.ts +76 -129
- package/src/public-cli/diarist-run.ts +6 -33
- package/src/public-cli/inspector-run.ts +1 -1
- package/src/public-cli/invocation.ts +5 -0
- package/src/public-cli/notary-run.ts +3 -7
- package/src/public-cli/option-definitions.ts +1 -1
- package/src/public-cli/post-admission.ts +37 -69
- package/src/public-cli/reviewer-run.ts +1 -1
- package/src/public-cli/run-lifecycle.ts +18 -66
- package/src/public-cli/seat-ticket-binding.ts +12 -28
- package/src/public-role-summons.ts +15 -6
- package/src/role-runtime.ts +9 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ ak-role judge --model <provider/model[:thinking]> --attach ./plan.md "Review thi
|
|
|
25
25
|
|
|
26
26
|
Exit status reports lifecycle honesty, not business success: every lawful typed result (including `audit_escalation`) exits zero; a failure without a lawful result exits nonzero, and its Terminal carries the Error Artifact ref and original cause instead of a fabricated receipt.
|
|
27
27
|
|
|
28
|
-
`ak-role resume <runId> [message]` reopens that run under the **current seat table** for model / host / engine — the same resolution as starting a new leg (model: `--model` → persistent seat → officer inherit; still none → error. host: `--host` → persistent seat host → package default `pi`). Configure seats first with `ak-role config set <seat> <provider/model[:thinking]>` or pass `--model` per invocation. Standard chain after a role `escalate`s: take the owner ruling and feed it back with `ak-role resume <runId> "<ruling>"` so the same run continues to a terminal.
|
|
28
|
+
`ak-role resume <runId> [message]` reopens that run under the **current seat table** for model / host / engine — the same resolution as starting a new leg (model: `--model` → persistent seat → officer inherit; still none → error. host: `--host` → persistent seat host → package default `pi`). Configure seats first with `ak-role config set <seat> <provider/model[:thinking]>` or pass `--model` per invocation. Standard chain after a role `escalate`s: take the owner ruling and feed it back with `ak-role resume <runId> "<ruling>"` so the same run continues to a terminal. For every callable seat, including Notary/符宝郎, the optional `message` after `runId` is passed through unchanged as the continuation prompt (opaque: not parsed as flags); when omitted, the package adds no continuation text. Notary's separate explicit `new` command still accepts only its source-run locator, not a caller prompt. Global `--model` / `--thinking` / `--host` / `--engine` override the table for that resume only — place them before `<runId>` (either before `resume` or between `resume` and `<runId>`, e.g. `ak-role --model xai/grok-4.5 resume 01abc…` or `ak-role resume --model xai/grok-4.5 01abc…`); the one argv after `<runId>` is always the opaque message, never a flag (#471). On a real host switch (live seat host differs from the previous invocation host), prior native records of the previous host are delivered once as context to the target host; same-host resume does not re-inject. Each host writes only its native volume (Pi: `session/session.jsonl`; Grok CLI journals stay in the operator grok home, factory dossier is sitian records on the run), with unified ledger entries recorded in 司天台 (Sitian). Whether to resume is the caller's decision: the command does not require a typed HTTP 429 or a `resumable` state. Unknown run IDs and missing session principals are rejected. Every callable role accepts manual resume; Countersign and Gleaner-Left gained it in #599, Collector, Doctor, Notary, and Inspector in #633.
|
|
29
29
|
|
|
30
30
|
All callable roles also retry a non-lawful LLM call in place (same `runId` and session) up to `autoResumeLimit` times. Unset defaults to 2; `ak-role config set-auto-resume-limit <N>` writes the ceiling (`0` disables). Lawful typed terminals (`accepted`, `audit_escalation`, `no_receipt`) stop immediately. Manual `ak-role resume` stays available.
|
|
31
31
|
|
package/README.zh-CN.md
CHANGED
|
@@ -25,7 +25,7 @@ ak-role judge --model <provider/model[:thinking]> --attach ./plan.md "Review thi
|
|
|
25
25
|
|
|
26
26
|
退出码报的是生命周期诚实,不是业务成败:一切合法 typed 终态(含 `audit_escalation`)退出零;无合法终态的失败退出非零,其 Terminal 携带 Error Artifact 引用与原始原因,不伪造回执。
|
|
27
27
|
|
|
28
|
-
`ak-role resume <runId> [message]` 按**现行席位表**的 model / host / engine 续跑该次运行——与新起角色腿同一解析(model:`--model` → 席位持久 → 官席继承;仍无则报错。host:`--host` → 席位持久 host → 包默认 `pi`)。先 `ak-role config set <seat> <provider/model[:thinking]>` 配席,或逐次带 `--model`。角色 `escalate`(直通御前)后拿到 owner 裁定,标准续跑是 `ak-role resume <runId> "<裁定>"`——把裁定喂回同一 run
|
|
28
|
+
`ak-role resume <runId> [message]` 按**现行席位表**的 model / host / engine 续跑该次运行——与新起角色腿同一解析(model:`--model` → 席位持久 → 官席继承;仍无则报错。host:`--host` → 席位持久 host → 包默认 `pi`)。先 `ak-role config set <seat> <provider/model[:thinking]>` 配席,或逐次带 `--model`。角色 `escalate`(直通御前)后拿到 owner 裁定,标准续跑是 `ak-role resume <runId> "<裁定>"`——把裁定喂回同一 run,角色继续走到终局。所有可调用席位(包括 Notary/符宝郎)都会将 `runId` 后可选的 `message` 原样作为续跑 prompt(opaque:不进全局旗标语法);省略时包不会添加续跑文本。Notary 另行的显式 `new` 命令仍只接受 source-run locator,不接受 caller prompt。全局 `--model` / `--thinking` / `--host` / `--engine` 仅覆盖本次 resume——须置于 `<runId>` 之前(放 `resume` 之前或 `resume` 与 `<runId>` 之间均可,例如 `ak-role --model xai/grok-4.5 resume 01abc…` 或 `ak-role resume --model xai/grok-4.5 01abc…`);`<runId>` 之后的那一个 argv 恒为原样透传的 message,绝非旗位(#471)。真实换宿主时(现行席位 host 与上一次 invocation host 不同),将前序宿主原生卷宗一次性作为 context 交付目标宿主;同宿主续跑不重复注入。各宿主仅直写自身原生卷宗(Pi:`session/session.jsonl`;Grok CLI 原始会话留在操作员 grok 家,工厂卷宗为该 run 的司天台记录),统一账目归入司天台。要不要续跑由调用者决定:不再要求 typed HTTP 429,也不要求 `resumable` 状态。未知 run ID、session 主体不在则拒绝。所有可调用角色均可手动 resume:给事中、左拾遗始于 #599,通进司、太医署、符宝郎、台院始于 #633。
|
|
29
29
|
|
|
30
30
|
全部可调用角色在单次调用内对非 lawful LLM 终态原地续跑(同一 `runId` 与 session),次数上限为 `autoResumeLimit`。缺键默认 2;`ak-role config set-auto-resume-limit <N>` 写入(`0` 关闭自动续)。lawful typed 终态(`accepted` / `audit_escalation` / `no_receipt`)立即停止。手动 `ak-role resume` 仍可用。
|
|
31
31
|
|