@akagilnc/pi-workflow-roles 0.1.5382 → 0.1.5406

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.
Files changed (51) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +2 -0
  3. package/dist/acp-host/production-host.js +2523 -1880
  4. package/dist/archivist-record-pointer.js +38 -0
  5. package/dist/compliance-transport.js +5 -0
  6. package/dist/doctor-auditor.js +1 -0
  7. package/dist/engine-detour-usage.js +6 -6
  8. package/dist/headless-host/production-host.js +1097 -454
  9. package/dist/judge-role.js +14 -1
  10. package/dist/migrate-book-topology.js +190 -74
  11. package/dist/navigator-attendance.js +10 -9
  12. package/dist/navigator-invocation-identity.js +18 -0
  13. package/dist/pi/role-turn-host.js +9 -0
  14. package/dist/public-cli/cli.js +1 -0
  15. package/dist/public-cli/instruction-seat-run.js +250 -44
  16. package/dist/public-cli/main.js +929 -323
  17. package/dist/public-cli/post-admission.js +427 -244
  18. package/dist/public-cli/settlement.js +111 -48
  19. package/dist/public-cli/terminal.js +12 -1
  20. package/dist/public-cli/turn-request.js +3 -0
  21. package/dist/receipt-delivery-policy.js +152 -17
  22. package/dist/submission-errors.js +11 -1
  23. package/dist/submission-gate.js +27 -4
  24. package/package.json +1 -1
  25. package/src/archivist-record-pointer.ts +48 -0
  26. package/src/compliance-transport.ts +10 -2
  27. package/src/doctor-auditor.ts +3 -0
  28. package/src/engine-detour-usage.ts +7 -6
  29. package/src/external-host-turn-loop.ts +24 -12
  30. package/src/gatekeeper-role.ts +2 -2
  31. package/src/host-contracts.ts +7 -0
  32. package/src/judge-role.ts +24 -5
  33. package/src/navigator-attendance.ts +17 -12
  34. package/src/navigator-invocation-identity.ts +31 -0
  35. package/src/pi/adapter.ts +33 -8
  36. package/src/pi/role-turn-host.ts +7 -0
  37. package/src/public-cli/cli.ts +1 -0
  38. package/src/public-cli/instruction-seat-run.ts +283 -49
  39. package/src/public-cli/post-admission.ts +556 -324
  40. package/src/public-cli/settlement.ts +112 -50
  41. package/src/public-cli/terminal.ts +16 -4
  42. package/src/public-cli/turn-request.ts +10 -1
  43. package/src/receipt-delivery-policy.ts +209 -17
  44. package/src/role-envelope.ts +5 -1
  45. package/src/role-runtime-dependencies.ts +1 -0
  46. package/src/role-runtime.ts +65 -21
  47. package/src/submission-correctable-error.ts +5 -2
  48. package/src/submission-errors.ts +12 -1
  49. package/src/submission-gate.ts +34 -4
  50. package/src/worker-role.ts +19 -7
  51. package/src/worker-submission-gates.ts +29 -7
package/README.md CHANGED
@@ -29,6 +29,8 @@ Exit status reports lifecycle honesty, not business success: every lawful typed
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
 
32
+ `autoResumeLimit` is the single ceiling for the runtime's automatic re-requests (#1132). A role turn that ends normally without submitting is **not** settled straight to `no_receipt`: the runtime first asks the same run's own host session to submit again, over that same value, counting only the requests it actually sent — `no_receipt` is recorded once the budget is spent, and `deliveryTurns` reports what really went out (zero stays zero). A receipt obtained that way goes on to audit in the usual order. The same value bounds the `unfinished`-without-reason reminder (ADR 0050) and the external host's own re-ask rounds; the first turn of each loop never counts as a re-request. The one-shot soft reminders (ADR 0066 / 0070) and the uncapped auditor re-submission (ADR 0007) are unchanged.
33
+
32
34
  Seat and Gate-officer configuration:
33
35
 
34
36
  ```bash
package/README.zh-CN.md CHANGED
@@ -29,6 +29,8 @@ ak-role judge --model <provider/model[:thinking]> --attach ./plan.md "Review thi
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
 
32
+ `autoResumeLimit` 同时是运行期各类自动催交的统一上限(#1132)。宿主正常结束而没交卷时**不直接结 `no_receipt`**:执行接缝先让同一 run 的原宿主 session 重交,次数取同一个值,只记实发次数——额度用尽仍无卷才记 `no_receipt`,`deliveryTurns` 记真正发出的催交次数(零次即记零)。催交取得的卷按既有顺序接回审核。同一个值也管 `unfinished` 缺理由催全(ADR 0050)与外部宿主自身的重交轮次;各循环的首轮都不计重交。一次软提醒(ADR 0066 / 0070)与审刑院重交无帽(ADR 0007)不变。
33
+
32
34
  席位与官席配置:
33
35
 
34
36
  ```bash