@akagilnc/pi-workflow-roles 0.1.3886 → 0.1.3891

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
@@ -25,7 +25,7 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
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 (`--flag` → persistent seat → package default). 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. `[message]` applies only to seats that accept caller instruction: for those seats the optional `message` after `runId` is passed through unchanged as the continuation prompt (opaque: not parsed as flags); omit it to use the package resume envelope. Notary/符宝郎 must omit `message` and derives evidence from the existing source-run/dossier binding. Global `--model` / `--host` / `--engine` override the table for that resume only. 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.
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 (`--flag` → persistent seat → package default). 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. `[message]` applies only to seats that accept caller instruction: for those seats the optional `message` after `runId` is passed through unchanged as the continuation prompt (opaque: not parsed as flags); omit it to use the package resume envelope. Notary/符宝郎 must omit `message` and derives evidence from the existing source-run/dossier binding. 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
  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.
31
31
 
package/README.zh-CN.md CHANGED
@@ -25,7 +25,7 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
25
25
 
26
26
  退出码报的是生命周期诚实,不是业务成败:一切合法 typed 终态(含 `audit_escalation`)退出零;无合法终态的失败退出非零,其 Terminal 携带 Error Artifact 引用与原始原因,不伪造回执。
27
27
 
28
- `ak-role resume <runId> [message]` 按**现行席位表**的 model / host / engine 续跑该次运行——与新起角色腿同一解析(调用旗 → 席位持久 → 包默认)。角色 `escalate`(直通御前)后拿到 owner 裁定,标准续跑是 `ak-role resume <runId> "<裁定>"`——把裁定喂回同一 run,角色继续走到终局。`[message]` 只适用于接收 caller instruction 的席位:对这些席位,`runId` 后可选的 `message` 原样作为续跑 prompt(opaque:不进全局旗标语法);省略则用包自带 resume envelope。Notary/符宝郎必须省略 `message`,仅从既有 source-run/案卷绑定自取证。全局 `--model` / `--host` / `--engine` 仅覆盖本次 resume。真实换宿主时(现行席位 host 与上一次 invocation host 不同),将前序宿主原生卷宗一次性作为 context 交付目标宿主;同宿主续跑不重复注入。各宿主仅直写自身原生卷宗(Pi:`session/session.jsonl`;Grok CLI 原始会话留在操作员 grok 家,工厂卷宗为该 run 的司天台记录),统一账目归入司天台。要不要续跑由调用者决定:不再要求 typed HTTP 429,也不要求 `resumable` 状态。未知 run ID、session 主体不在则拒绝。所有可调用角色均可手动 resume:给事中、左拾遗始于 #599,通进司、太医署、符宝郎、察院始于 #633。
28
+ `ak-role resume <runId> [message]` 按**现行席位表**的 model / host / engine 续跑该次运行——与新起角色腿同一解析(调用旗 → 席位持久 → 包默认)。角色 `escalate`(直通御前)后拿到 owner 裁定,标准续跑是 `ak-role resume <runId> "<裁定>"`——把裁定喂回同一 run,角色继续走到终局。`[message]` 只适用于接收 caller instruction 的席位:对这些席位,`runId` 后可选的 `message` 原样作为续跑 prompt(opaque:不进全局旗标语法);省略则用包自带 resume envelope。Notary/符宝郎必须省略 `message`,仅从既有 source-run/案卷绑定自取证。全局 `--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
 
@@ -6128,8 +6128,8 @@ var init_option_definitions = __esm({
6128
6128
  repeatable: false,
6129
6129
  form: "option",
6130
6130
  description: {
6131
- en: "Override the effective seat model for this invocation (before or after the command).",
6132
- zh: "\u8986\u76D6\u672C\u8C03\u7528\u6709\u6548\u5E2D\u4F4D\u6A21\u578B\uFF08\u53EF\u7F6E\u4E8E\u5B50\u547D\u4EE4\u524D\u6216\u540E\uFF09\u3002"
6131
+ en: "Override the effective seat model for this invocation (before or after the command name).",
6132
+ zh: "\u8986\u76D6\u672C\u8C03\u7528\u6709\u6548\u5E2D\u4F4D\u6A21\u578B\uFF08\u53EF\u7F6E\u4E8E\u5B50\u547D\u4EE4\u540D\u524D\u6216\u540E\uFF09\u3002"
6133
6133
  }
6134
6134
  },
6135
6135
  {
@@ -6846,13 +6846,14 @@ var init_option_definitions = __esm({
6846
6846
  },
6847
6847
  resume: {
6848
6848
  command: "resume",
6849
- summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/\u7B26\u5B9D\u90CE must omit message and derives evidence from the existing source-run/dossier binding.",
6849
+ summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/\u7B26\u5B9D\u90CE must omit message and derives evidence from the existing source-run/dossier binding. Global --model/--thinking/--host/--engine must be placed before <runId> (either before `resume` or between `resume` and <runId>); the one argv after <runId> is the opaque message, not a flag position (#471).",
6850
6850
  usage: ["ak-role resume <runId> [message]"],
6851
6851
  examples: [
6852
6852
  "ak-role resume 01abc\u2026",
6853
6853
  'ak-role resume 01abc\u2026 "owner ruling"',
6854
6854
  "ak-role --host grok-build resume 01abc\u2026",
6855
- "ak-role --engine agy resume 01abc\u2026"
6855
+ "ak-role --engine agy resume 01abc\u2026",
6856
+ 'ak-role resume --model xai/grok-4.5 01abc\u2026 "owner ruling"'
6856
6857
  ]
6857
6858
  },
6858
6859
  new: {
@@ -6049,8 +6049,8 @@ var init_option_definitions = __esm({
6049
6049
  repeatable: false,
6050
6050
  form: "option",
6051
6051
  description: {
6052
- en: "Override the effective seat model for this invocation (before or after the command).",
6053
- zh: "\u8986\u76D6\u672C\u8C03\u7528\u6709\u6548\u5E2D\u4F4D\u6A21\u578B\uFF08\u53EF\u7F6E\u4E8E\u5B50\u547D\u4EE4\u524D\u6216\u540E\uFF09\u3002"
6052
+ en: "Override the effective seat model for this invocation (before or after the command name).",
6053
+ zh: "\u8986\u76D6\u672C\u8C03\u7528\u6709\u6548\u5E2D\u4F4D\u6A21\u578B\uFF08\u53EF\u7F6E\u4E8E\u5B50\u547D\u4EE4\u540D\u524D\u6216\u540E\uFF09\u3002"
6054
6054
  }
6055
6055
  },
6056
6056
  {
@@ -6767,13 +6767,14 @@ var init_option_definitions = __esm({
6767
6767
  },
6768
6768
  resume: {
6769
6769
  command: "resume",
6770
- summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/\u7B26\u5B9D\u90CE must omit message and derives evidence from the existing source-run/dossier binding.",
6770
+ summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/\u7B26\u5B9D\u90CE must omit message and derives evidence from the existing source-run/dossier binding. Global --model/--thinking/--host/--engine must be placed before <runId> (either before `resume` or between `resume` and <runId>); the one argv after <runId> is the opaque message, not a flag position (#471).",
6771
6771
  usage: ["ak-role resume <runId> [message]"],
6772
6772
  examples: [
6773
6773
  "ak-role resume 01abc\u2026",
6774
6774
  'ak-role resume 01abc\u2026 "owner ruling"',
6775
6775
  "ak-role --host grok-build resume 01abc\u2026",
6776
- "ak-role --engine agy resume 01abc\u2026"
6776
+ "ak-role --engine agy resume 01abc\u2026",
6777
+ 'ak-role resume --model xai/grok-4.5 01abc\u2026 "owner ruling"'
6777
6778
  ]
6778
6779
  },
6779
6780
  new: {
@@ -19477,8 +19477,8 @@ var init_option_definitions = __esm({
19477
19477
  repeatable: false,
19478
19478
  form: "option",
19479
19479
  description: {
19480
- en: "Override the effective seat model for this invocation (before or after the command).",
19481
- zh: "\u8986\u76D6\u672C\u8C03\u7528\u6709\u6548\u5E2D\u4F4D\u6A21\u578B\uFF08\u53EF\u7F6E\u4E8E\u5B50\u547D\u4EE4\u524D\u6216\u540E\uFF09\u3002"
19480
+ en: "Override the effective seat model for this invocation (before or after the command name).",
19481
+ zh: "\u8986\u76D6\u672C\u8C03\u7528\u6709\u6548\u5E2D\u4F4D\u6A21\u578B\uFF08\u53EF\u7F6E\u4E8E\u5B50\u547D\u4EE4\u540D\u524D\u6216\u540E\uFF09\u3002"
19482
19482
  }
19483
19483
  },
19484
19484
  {
@@ -20196,13 +20196,14 @@ var init_option_definitions = __esm({
20196
20196
  },
20197
20197
  resume: {
20198
20198
  command: "resume",
20199
- summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/\u7B26\u5B9D\u90CE must omit message and derives evidence from the existing source-run/dossier binding.",
20199
+ summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/\u7B26\u5B9D\u90CE must omit message and derives evidence from the existing source-run/dossier binding. Global --model/--thinking/--host/--engine must be placed before <runId> (either before `resume` or between `resume` and <runId>); the one argv after <runId> is the opaque message, not a flag position (#471).",
20200
20200
  usage: ["ak-role resume <runId> [message]"],
20201
20201
  examples: [
20202
20202
  "ak-role resume 01abc\u2026",
20203
20203
  'ak-role resume 01abc\u2026 "owner ruling"',
20204
20204
  "ak-role --host grok-build resume 01abc\u2026",
20205
- "ak-role --engine agy resume 01abc\u2026"
20205
+ "ak-role --engine agy resume 01abc\u2026",
20206
+ 'ak-role resume --model xai/grok-4.5 01abc\u2026 "owner ruling"'
20206
20207
  ]
20207
20208
  },
20208
20209
  new: {
@@ -32067,10 +32068,10 @@ function parseArgv(argv) {
32067
32068
  function parseResumeRequest(args) {
32068
32069
  const runId = args[0];
32069
32070
  if (runId === void 0 || runId.trim() === "" || runId.startsWith("-")) {
32070
- throw new CliUsageError("usage: ak-role resume <runId> [message]");
32071
+ throw new CliUsageError(RESUME_USAGE_ERROR);
32071
32072
  }
32072
32073
  if (args.length > 2) {
32073
- throw new CliUsageError("usage: ak-role resume <runId> [message]");
32074
+ throw new CliUsageError(RESUME_USAGE_ERROR);
32074
32075
  }
32075
32076
  if (args.length === 2) {
32076
32077
  return { runId, message: args[1] };
@@ -32200,6 +32201,7 @@ function renderHelp() {
32200
32201
  "Persistent host (callable roles): ak-role config set-host <seat> <name> | unset-host <seat>",
32201
32202
  "Host providers: ~/.ak-roles/host-providers.json (owner-edited; table > unique host directory > fail)",
32202
32203
  "Host resolution: --host \u2192 persistent seat host \u2192 pi (resume uses the same order; #617)",
32204
+ "Resume flag position: --model/--thinking/--host/--engine go before <runId> (before `resume` or between `resume` and <runId>); the one argv after <runId> is always the opaque message, never a flag (#471)",
32203
32205
  "Effective seats: ak-role roles"
32204
32206
  );
32205
32207
  return `${lines.join("\n")}
@@ -32873,7 +32875,7 @@ async function runAkRole(argv, env) {
32873
32875
  return { exitCode: 1 };
32874
32876
  }
32875
32877
  }
32876
- var RESUME_SEAT_DISPATCH, PUBLIC_ROLE_ARGV, PUBLIC_GLOBAL_OPTIONS, HostSelectionError;
32878
+ var RESUME_SEAT_DISPATCH, PUBLIC_ROLE_ARGV, PUBLIC_GLOBAL_OPTIONS, HostSelectionError, RESUME_USAGE_ERROR;
32877
32879
  var init_cli = __esm({
32878
32880
  "src/public-cli/cli.ts"() {
32879
32881
  "use strict";
@@ -32953,6 +32955,7 @@ var init_cli = __esm({
32953
32955
  }
32954
32956
  failure;
32955
32957
  };
32958
+ RESUME_USAGE_ERROR = "usage: ak-role resume <runId> [message] (put --model/--thinking/--host/--engine before <runId>; the one argv after <runId> is the opaque message, #471)";
32956
32959
  }
32957
32960
  });
32958
32961
 
@@ -179,8 +179,8 @@ const GLOBAL_OPTIONS = [
179
179
  repeatable: false,
180
180
  form: "option",
181
181
  description: {
182
- en: "Override the effective seat model for this invocation (before or after the command).",
183
- zh: "覆盖本调用有效席位模型(可置于子命令前或后)。",
182
+ en: "Override the effective seat model for this invocation (before or after the command name).",
183
+ zh: "覆盖本调用有效席位模型(可置于子命令名前或后)。",
184
184
  },
185
185
  },
186
186
  {
@@ -1110,13 +1110,14 @@ const SUPPORT_COMMAND_HELP = {
1110
1110
  },
1111
1111
  resume: {
1112
1112
  command: "resume",
1113
- summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/符宝郎 must omit message and derives evidence from the existing source-run/dossier binding.",
1113
+ summary: "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/符宝郎 must omit message and derives evidence from the existing source-run/dossier binding. Global --model/--thinking/--host/--engine must be placed before <runId> (either before `resume` or between `resume` and <runId>); the one argv after <runId> is the opaque message, not a flag position (#471).",
1114
1114
  usage: ["ak-role resume <runId> [message]"],
1115
1115
  examples: [
1116
1116
  "ak-role resume 01abc…",
1117
1117
  "ak-role resume 01abc… \"owner ruling\"",
1118
1118
  "ak-role --host grok-build resume 01abc…",
1119
1119
  "ak-role --engine agy resume 01abc…",
1120
+ "ak-role resume --model xai/grok-4.5 01abc… \"owner ruling\"",
1120
1121
  ],
1121
1122
  },
1122
1123
  new: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.3886",
3
+ "version": "0.1.3891",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -605,13 +605,16 @@ function parseArgv(argv: readonly string[]): ParsedGlobal {
605
605
  * Unique public resume request parser (#471).
606
606
  * One optional argv after runId is the opaque message; no further positionals.
607
607
  */
608
+ const RESUME_USAGE_ERROR =
609
+ "usage: ak-role resume <runId> [message] (put --model/--thinking/--host/--engine before <runId>; the one argv after <runId> is the opaque message, #471)";
610
+
608
611
  function parseResumeRequest(args: readonly string[]): PublicResumeRequest {
609
612
  const runId = args[0];
610
613
  if (runId === undefined || runId.trim() === "" || runId.startsWith("-")) {
611
- throw new CliUsageError("usage: ak-role resume <runId> [message]");
614
+ throw new CliUsageError(RESUME_USAGE_ERROR);
612
615
  }
613
616
  if (args.length > 2) {
614
- throw new CliUsageError("usage: ak-role resume <runId> [message]");
617
+ throw new CliUsageError(RESUME_USAGE_ERROR);
615
618
  }
616
619
  if (args.length === 2) {
617
620
  return { runId, message: args[1]! };
@@ -781,6 +784,7 @@ function renderHelp(): string {
781
784
  "Persistent host (callable roles): ak-role config set-host <seat> <name> | unset-host <seat>",
782
785
  "Host providers: ~/.ak-roles/host-providers.json (owner-edited; table > unique host directory > fail)",
783
786
  "Host resolution: --host → persistent seat host → pi (resume uses the same order; #617)",
787
+ "Resume flag position: --model/--thinking/--host/--engine go before <runId> (before `resume` or between `resume` and <runId>); the one argv after <runId> is always the opaque message, never a flag (#471)",
784
788
  "Effective seats: ak-role roles",
785
789
  );
786
790
  return `${lines.join("\n")}\n`;
@@ -276,8 +276,8 @@ const GLOBAL_OPTIONS = [
276
276
  repeatable: false,
277
277
  form: "option",
278
278
  description: {
279
- en: "Override the effective seat model for this invocation (before or after the command).",
280
- zh: "覆盖本调用有效席位模型(可置于子命令前或后)。",
279
+ en: "Override the effective seat model for this invocation (before or after the command name).",
280
+ zh: "覆盖本调用有效席位模型(可置于子命令名前或后)。",
281
281
  },
282
282
  },
283
283
  {
@@ -1341,13 +1341,14 @@ const SUPPORT_COMMAND_HELP = {
1341
1341
  resume: {
1342
1342
  command: "resume",
1343
1343
  summary:
1344
- "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/符宝郎 must omit message and derives evidence from the existing source-run/dossier binding.",
1344
+ "Resume a role run under the live seat table (model/host/engine); session principal must still exist. [message] applies only to seats that accept caller instruction; Notary/符宝郎 must omit message and derives evidence from the existing source-run/dossier binding. Global --model/--thinking/--host/--engine must be placed before <runId> (either before `resume` or between `resume` and <runId>); the one argv after <runId> is the opaque message, not a flag position (#471).",
1345
1345
  usage: ["ak-role resume <runId> [message]"],
1346
1346
  examples: [
1347
1347
  "ak-role resume 01abc…",
1348
1348
  "ak-role resume 01abc… \"owner ruling\"",
1349
1349
  "ak-role --host grok-build resume 01abc…",
1350
1350
  "ak-role --engine agy resume 01abc…",
1351
+ "ak-role resume --model xai/grok-4.5 01abc… \"owner ruling\"",
1351
1352
  ],
1352
1353
  },
1353
1354
  new: {