@akagilnc/pi-workflow-roles 0.1.2173 → 0.1.2175

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 CHANGED
@@ -23,7 +23,9 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
23
23
 
24
24
  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.
25
25
 
26
- A run interrupted by a typed Codex/xAI HTTP 429 with no lawful result prints a complete `ak-role resume <runId>` command in its failure Terminal. Resume reopens the exact session; override the model for one run with the global flags. The package never auto-switches providers, only a typed 429 makes a run resumable, and unknown, terminal, or concurrently-resumed run IDs are rejected. Collector and Doctor are one-shot.
26
+ `ak-role resume <runId>` reopens that run's exact Pi session. 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. Collector and Doctor remain one-shot. The package never auto-switches providers; override the model for one run with the global flags.
27
+
28
+ Judge, coder, fixer, reviewer, and merger 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.
27
29
 
28
30
  Global overrides work before or after the role: `ak-role --model xai/grok-4.5:high resume <runId>`.
29
31
 
@@ -34,9 +36,10 @@ ak-role config set navigator openai-codex/gpt-5.6-luna:medium
34
36
  # persistent labor engine (callable roles; not navigator); one-shot override remains --engine
35
37
  ak-role config set-engine judge opus
36
38
  ak-role config unset-engine judge
39
+ ak-role config set-auto-resume-limit 3
37
40
  ```
38
41
 
39
- `config set` stores the seat model default; `config set-engine` / `unset-engine` store or clear the persistent labor-engine name on callable roles (same seats as `--engine`; navigator refused — no independent activation). Usage and refusal text are owned by `ak-role config` in the public CLI.
42
+ `config set` stores the seat model default; `config set-engine` / `unset-engine` store or clear the persistent labor-engine name on callable roles (same seats as `--engine`; navigator refused — no independent activation). `config set-auto-resume-limit` stores the single-call auto-resume ceiling. Usage and refusal text are owned by `ak-role config` in the public CLI.
40
43
 
41
44
  Receipts are typed, so callers compose roles without parsing prose; ordering and stopping stay caller-owned. Programmatic consumers derive contracts from the exported schemas in `src/package-contracts/`, not from this guide.
42
45
 
package/README.zh-CN.md CHANGED
@@ -23,7 +23,9 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
23
23
 
24
24
  退出码报的是生命周期诚实,不是业务成败:一切合法 typed 终态(含 `audit_escalation`)退出零;无合法终态的失败退出非零,其 Terminal 携带 Error Artifact 引用与原始原因,不伪造回执。
25
25
 
26
- 被 Codex/xAI typed HTTP 429 打断且无合法终态的运行,其失败 Terminal 内含完整 `ak-role resume <runId>` 命令。resume 重开同一 session;临时换模型用全局旗标。包绝不自动换 provider;只有 typed 429 可恢复;未知、已终结、并发重复的 run ID 一律拒绝。门下省、太医署为一次性,无 resume
26
+ `ak-role resume <runId>` 重开该次运行的同一 Pi session。要不要续跑由调用者决定:不再要求 typed HTTP 429,也不要求 `resumable` 状态。未知 run ID、session 主体不在则拒绝。门下省、太医署仍为一次性,无 resume。包绝不自动换 provider;临时换模型用全局旗标。
27
+
28
+ 大理寺、将作监、修内司、御史台、校书郎在单次调用内对非 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` 仍可用。
27
29
 
28
30
  全局覆盖前后皆可:`ak-role --model xai/grok-4.5:high resume <runId>`。
29
31
 
@@ -34,9 +36,10 @@ ak-role config set navigator openai-codex/gpt-5.6-luna:medium
34
36
  # 持久劳务引擎(可调用角色;不含 navigator);一次性覆盖仍用 --engine
35
37
  ak-role config set-engine judge opus
36
38
  ak-role config unset-engine judge
39
+ ak-role config set-auto-resume-limit 3
37
40
  ```
38
41
 
39
- `config set` 存席位模型默认;`config set-engine` / `unset-engine` 在可调用角色上写入或清除持久劳务引擎名(与 `--engine` 同轴;拒收 navigator——无独立 activation)。用法与拒绝文案以公开 CLI 的 `ak-role config` 为准。
42
+ `config set` 存席位模型默认;`config set-engine` / `unset-engine` 在可调用角色上写入或清除持久劳务引擎名(与 `--engine` 同轴;拒收 navigator——无独立 activation)。`config set-auto-resume-limit` 写入单次调用自动续跑上限。用法与拒绝文案以公开 CLI 的 `ak-role config` 为准。
40
43
 
41
44
  回执是 typed 的,调用者不必解析散文即可组合角色;顺序与停止归调用者。编程消费者从 `src/package-contracts/` 导出推导契约,不从本文。
42
45
 
@@ -16492,7 +16492,7 @@ var init_option_definitions = __esm({
16492
16492
  },
16493
16493
  config: {
16494
16494
  command: "config",
16495
- summary: "Persistent seat model and labor-engine defaults.",
16495
+ summary: "Persistent seat model, labor-engine, and auto-resume defaults.",
16496
16496
  usage: [
16497
16497
  "ak-role config set <seat> <provider/model[:thinking]> [<seat> <spec> ...]",
16498
16498
  "ak-role config set-engine <seat> <name>",
@@ -16513,7 +16513,7 @@ var init_option_definitions = __esm({
16513
16513
  },
16514
16514
  resume: {
16515
16515
  command: "resume",
16516
- summary: "Reopen an exact role run after a typed HTTP 429.",
16516
+ summary: "Reopen an exact role run whose Pi session principal still exists.",
16517
16517
  usage: ["ak-role resume <runId>"],
16518
16518
  examples: ["ak-role resume 01abc\u2026"]
16519
16519
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.2173",
3
+ "version": "0.1.2175",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -740,8 +740,8 @@ export async function runAkRole(
740
740
  };
741
741
  }
742
742
 
743
- // Resume reopens an exact Role run after a typed HTTP 429 (#108/#109).
744
- // Seat and dispatch follow the durable admitted role (role-correct continuation).
743
+ // Resume reopens an exact Role run (#416): caller decides; session principal
744
+ // must still exist. Seat and dispatch follow the durable admitted role.
745
745
  if (parsed.command === "resume") {
746
746
  const agentDir = resolveAgentDir(env, home);
747
747
  const cwd = env.cwd ?? process.cwd();
@@ -1093,7 +1093,7 @@ const SUPPORT_COMMAND_HELP = {
1093
1093
  },
1094
1094
  config: {
1095
1095
  command: "config",
1096
- summary: "Persistent seat model and labor-engine defaults.",
1096
+ summary: "Persistent seat model, labor-engine, and auto-resume defaults.",
1097
1097
  usage: [
1098
1098
  "ak-role config set <seat> <provider/model[:thinking]> [<seat> <spec> ...]",
1099
1099
  "ak-role config set-engine <seat> <name>",
@@ -1114,7 +1114,7 @@ const SUPPORT_COMMAND_HELP = {
1114
1114
  },
1115
1115
  resume: {
1116
1116
  command: "resume",
1117
- summary: "Reopen an exact role run after a typed HTTP 429.",
1117
+ summary: "Reopen an exact role run whose Pi session principal still exists.",
1118
1118
  usage: ["ak-role resume <runId>"],
1119
1119
  examples: ["ak-role resume 01abc…"],
1120
1120
  },