@akagilnc/pi-workflow-roles 0.1.3741 → 0.1.3747

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
@@ -76,7 +76,7 @@ Gate submission gate: on DONE-side submissions (`completed` / `partially_complet
76
76
  The examples below are usage sketches; option identity, aliases, requiredness, and mode faces are owned by `ak-role help <command>`, not by a second flag contract here.
77
77
 
78
78
  ```bash
79
- # countersign — ticket-court review before work starts; resume continues the exact session
79
+ # countersign — ticket-court review before work starts; admission runs the ticket's diarist first (#742, caller-transparent); resume continues the exact session
80
80
  ak-role countersign --attach ./ticket.md "裁:本票 #582 是否足以开工。"
81
81
 
82
82
  # gleaner-left — unanchored pre-merge memorials; resume continues the exact session; --base required; instruction may be empty; callers must not pass directional instruction
@@ -116,10 +116,10 @@ ak-role gatekeeper --attach ./submission.json "审:这批材料该谁审?"
116
116
  # navigator — direct route advice (ordered next-role candidates); automatic attendance unchanged
117
117
  ak-role navigator "刚完成 coder apply 收敛,下一步?"
118
118
 
119
- # diarist — gather and organize this case's decision basis into its per-ticket 起居录
119
+ # diarist — gather and organize this case's decision basis into its per-ticket 起居录 (LLM resolves the ticket itself, no mechanical verification since #779; countersign admission runs it automatically, other stations summon it explicitly)
120
120
  ak-role diarist "整理 #708 的本案依据。"
121
121
 
122
- # countersign — ticket-court five questions; ticket recognition via instruction
122
+ # countersign — ticket-court five questions; ticket recognition via instruction; admission runs the ticket's diarist first (#742)
123
123
  ak-role countersign --attach ./ticket.md "裁:本票 #582 是否足以开工。"
124
124
 
125
125
  # analyst — deterministic metrics; bare call = whole book
package/README.zh-CN.md CHANGED
@@ -110,7 +110,7 @@ ak-role gatekeeper --attach ./submission.json "审:这批材料该谁审?"
110
110
  # 游奕使——直调路线建议(有序的下一步角色候选);自动出席不变
111
111
  ak-role navigator "刚完成 coder apply 收敛,下一步?"
112
112
 
113
- # 给事中——票庭五问;票号经由 instruction 识别
113
+ # 给事中——票庭五问;票号经由 instruction 识别;受理内先自动起居郎再本席(#742,调用者无感)
114
114
  ak-role countersign --attach ./ticket.md "裁:本票 #582 是否足以开工。"
115
115
 
116
116
  # 左拾遗——合并前无锚定风闻;可 resume 续同一 session;--base 必填;instruction 可空;调用者不得传方向性 instruction
@@ -137,14 +137,14 @@ ak-role resume <runId> "<裁定>"
137
137
  | **大理寺** | judge | **审理定谳。** 承接各方意见与材料,依照既定规则逐项判断,辨明是非曲直。可以准行、退回或请示更高决定,但自身不参与建设与修改。 |
138
138
  | **审刑院** | judge-auditor/doctor-auditor(无 CLI,共享内部接缝;御史台侧闸已退役) | **复核成案。** 不重新争论事情本身,而是检查整个办理过程是否合乎规矩。关注是否有人越过职责、是否遗漏必要步骤、是否以错误方式得出正确结果。直属陛下,不入门下省编制。 |
139
139
  | **门下省** | gatekeeper(交卷闸不再自动出席;可 `ak-role gatekeeper` 独立直调) | **审署诏敕与质量保证的省。** 交卷闸按受审物直接传召察院/符宝郎,本省不介入选席;调用者仍可独立传召本省作 dispatch/pass;给事中票庭由调用者开工前传召;左拾遗由调用者合并前传召;省内政,不是外层编排器。规范见 [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md)、[ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md)、[ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md)。 |
140
- | **给事中** | countersign(无交卷闸派发;开工前由调用者传召) | **票庭审读五问。** 制度符合/授权真实(以起居录为据)/文书符意/退回重议/发布资格;读码取证是本职,实现细节不上票面。起居录由起居郎(独立角色)修,先后归调用者;交卷闸出席符宝郎。署=放行开工,封驳=退票重议,上呈=陛下裁决。规范见 [ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)。 |
140
+ | **给事中** | countersign(无交卷闸派发;开工前由调用者传召) | **票庭审读五问。** 制度符合/授权真实(以起居录为据)/文书符意/退回重议/发布资格;读码取证是本职,实现细节不上票面。受理内自动先起居郎再本席(#742,调用者无感);其余衙门前的起居郎由调用者传召;交卷闸出席符宝郎。署=放行开工,封驳=退票重议,上呈=陛下裁决。规范见 [ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)。 |
141
141
  | **左拾遗** | gleaner-left(无交卷闸派发;合并前由调用者传召) | **合并前无锚定风闻。** 对全幅合并候选作冷眼评审;只上弹章、不封驳不裁决。规范见 [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md) 修正案。 |
142
142
  | **察院** | inspector | **事后察举:复杂度与测试质量两轴。** 受审物是将作监/修内司完成侧交卷;封驳=当场打回重写,不是本局失败。可被门下省派发,也可 `ak-role inspector` 单独调。原给事中,ADR 0074 分立。 |
143
143
  | **符宝郎** | notary | **首责唯一:核实实际授权出处**(防乱编乱扩)。行事两步:读该票起居录→以录核旨;引语真伪与票面对齐为手段。受审物是大理寺拟判与给事中署章;可被门下省派发,也可 `ak-role notary` 单独调。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)。 |
144
144
  | **通进司** | collector | **承接百议/收证。** 门下省下的收证衙门:收集外部 GitHub PR 材料与意见,只收不审、不替人裁决。canonical 键仍为 `collector`。 |
145
145
  | **校书郎** | merger | **雠校异文。** 面对不同来源的修改,负责整理、校合与调和。保留双方有价值的部分,解决彼此冲突;遇到无法自行决定之处,则留待重新裁量。 |
146
146
  | **游奕使** | navigator(自动出席,亦可 `ak-role navigator` 直调) | **巡行问路。** 不掌具体事务,而是观察全局变化,结合当前局面提醒下一步方向。它提供建议与路径参考,但最终选择仍由执掌之人决定。 |
147
- | **起居郎** | diarist(`ak-role diarist` 单独传召) | **修起居录。** 为本票搜集、整理决策依据,写进每票起居录;LLM 语义收集是它自己的 turn,机械保全带(来源枚举、逐字反验、幂等落盘、水印)为其工具门禁。只记录已作出的决定,不立法、不批准设计、不指挥施工。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md) `diarist-is-role`、[ADR 0081](docs/adr/0081-diarist-case-context-and-delivery.md)。 |
147
+ | **起居郎** | diarist(`ak-role diarist` 单独传召;给事中受理内自动先起,#742) | **修起居录。** 为本票搜集、整理决策依据,写进每票起居录;LLM 自行搜集、整理、认票(#779 后无机械验真,机械只做 IO;起居录供符宝郎读录核旨)。只记录已作出的决定,不立法、不批准设计、不指挥施工。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md) `diarist-is-role`、[ADR 0081](docs/adr/0081-diarist-case-context-and-delivery.md)。 |
148
148
 
149
149
  其余席位:
150
150
 
@@ -24832,7 +24832,12 @@ function connectAcpStdio(options) {
24832
24832
  for (const handler of notificationHandlers) handler(message.method, params);
24833
24833
  if (typeof message.id === "number") {
24834
24834
  if (message.method !== "session/request_permission") {
24835
- terminate(acpError("acp-unsupported-client-request", `Unsupported ACP client request: ${message.method}`));
24835
+ child.stdin.write(`${JSON.stringify({
24836
+ jsonrpc: "2.0",
24837
+ id: message.id,
24838
+ error: { code: -32601, message: `Method not found: ${message.method}` }
24839
+ })}
24840
+ `);
24836
24841
  return;
24837
24842
  }
24838
24843
  const choices = Array.isArray(params.options) ? params.options : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.3741",
3
+ "version": "0.1.3747",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -120,8 +120,9 @@ export function connectAcpStdio(options: {
120
120
  for (const waiter of pending.values()) waiter.reject(error);
121
121
  pending.clear();
122
122
  };
123
- // One terminal path: any malformed/unsupported frame or process death closes stdin,
124
- // kills the child, and settles every pending request with the same typed error.
123
+ // Framing corruption or a known required capability with unusable shape still
124
+ // closes the child. Unknown client methods are answered in-band (JSON-RPC
125
+ // method not found) and do not terminate the leg (#760).
125
126
  const terminate = (error: Error): void => {
126
127
  settleClosed(error);
127
128
  child.stdin.end();
@@ -142,7 +143,13 @@ export function connectAcpStdio(options: {
142
143
  for (const handler of notificationHandlers) handler(message.method, params);
143
144
  if (typeof message.id === "number") {
144
145
  if (message.method !== "session/request_permission") {
145
- terminate(acpError("acp-unsupported-client-request", `Unsupported ACP client request: ${message.method}`));
146
+ // Vendor extensions (_x.ai/*, …) and any other unhandled client request:
147
+ // JSON-RPC method-not-found reply; session continues (#760).
148
+ child.stdin.write(`${JSON.stringify({
149
+ jsonrpc: "2.0",
150
+ id: message.id,
151
+ error: { code: -32601, message: `Method not found: ${message.method}` },
152
+ })}\n`);
146
153
  return;
147
154
  }
148
155
  const choices = Array.isArray(params.options) ? params.options : [];