@akagilnc/pi-workflow-roles 0.1.4200 → 0.1.4211
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/CLAUDE.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/acp-host/production-host.js +4 -4
- package/dist/analyst-gate-cycles-read.js +1 -1
- package/dist/diarist-contracts.js +1 -1
- package/dist/headless-host/production-host.js +4 -4
- package/dist/host-transition-prior-native.js +1 -1
- package/dist/packaged-role-registry.js +1 -1
- package/dist/pi/role-turn-host.js +2 -1
- package/dist/public-cli/auto-resume.js +2 -2
- package/dist/public-cli/case-dossier-delivery.js +2 -2
- package/dist/public-cli/main.js +2 -2
- package/dist/public-cli/post-admission.js +6 -6
- package/dist/public-cli/seat-ticket-binding.js +1 -1
- package/dist/ticket-provenance.js +1 -1
- package/package.json +1 -1
- package/resources/diarist-collect.md +13 -20
- package/src/activation-ledger.ts +1 -1
- package/src/activation-reconciliation.ts +1 -1
- package/src/analyst-gate-cycles-read.ts +1 -1
- package/src/diarist-contracts.ts +4 -4
- package/src/diarist.ts +1 -1
- package/src/host-transition-prior-native.ts +1 -1
- package/src/package-contracts/reviewer-output.ts +1 -1
- package/src/package-resources/engine-material.ts +1 -1
- package/src/packaged-role-registry.ts +1 -1
- package/src/pi/role-turn-host.ts +2 -1
- package/src/public-cli/auto-resume.ts +2 -2
- package/src/public-cli/case-dossier-delivery.ts +2 -2
- package/src/public-cli/cli.ts +1 -1
- package/src/public-cli/countersign-run.ts +9 -10
- package/src/public-cli/diarist-run.ts +2 -2
- package/src/public-cli/post-admission.ts +6 -6
- package/src/public-cli/seat-ticket-binding.ts +1 -1
- package/src/public-role-summons.ts +1 -1
- package/src/reviewer-role.ts +3 -3
- package/src/role-envelope.ts +2 -1
- package/src/ticket-provenance.ts +1 -1
- package/src/work-subject-identity.ts +1 -1
- package/src/worker-submission-gates.ts +1 -1
package/CLAUDE.md
CHANGED
|
@@ -82,7 +82,7 @@ A probe is temporary evidence. After its evidence purpose is disposed, either de
|
|
|
82
82
|
|
|
83
83
|
**票面先过给事中再开工;决策问题上呈陛下。**(ADR 0074:票庭审读由大理寺移交门下省给事中。)
|
|
84
84
|
|
|
85
|
-
**设计修订后重新过庭。** 施工中实质设计变更须由陛下拍定;拍定后将修订后的票重新送给事中,由起居郎补录修订依据(ADR 0075
|
|
85
|
+
**设计修订后重新过庭。** 施工中实质设计变更须由陛下拍定;拍定后将修订后的票重新送给事中,由起居郎补录修订依据(ADR 0075:不规定谁调用起居郎、顺序归调用者),给事中通过后再按新设计继续施工。既定设计内的实现取舍不属设计修订。
|
|
86
86
|
|
|
87
87
|
丞相编排建议:御史台 findings 宜经大理寺裁决后再派修理腿(劾→判→修)。
|
|
88
88
|
|
package/README.zh-CN.md
CHANGED
|
@@ -138,7 +138,7 @@ ak-role resume <runId> "<裁定>"
|
|
|
138
138
|
| **通进司** | collector | **承接百议/收证。** 门下省下的收证衙门:收集外部 GitHub PR 材料与意见,只收不审、不替人裁决。canonical 键仍为 `collector`。 |
|
|
139
139
|
| **校书郎** | merger | **雠校异文。** 面对不同来源的修改,负责整理、校合与调和。保留双方有价值的部分,解决彼此冲突;无进行中合并、无活可干或遇到无法自行决定之处,则升级。 |
|
|
140
140
|
| **游奕使** | navigator(随公开入口顶层腿自动出席,亦可 `ak-role navigator` 直调) | **巡行问路。** 不掌具体事务,而是观察全局变化,结合当前局面提醒下一步方向。它提供建议与路径参考,但最终选择仍由执掌之人决定。 |
|
|
141
|
-
| **起居郎** | diarist(`ak-role diarist` 单独传召;给事中受理内自动先起,#742) | **修起居录。** 为本票搜集、整理决策依据,写进每票起居录;LLM 自行搜集、整理、认票(#779 后无机械验真,机械只做 IO;起居录供符宝郎读录核旨)。只记录已作出的决定,不立法、不批准设计、不指挥施工。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)
|
|
141
|
+
| **起居郎** | diarist(`ak-role diarist` 单独传召;给事中受理内自动先起,#742) | **修起居录。** 为本票搜集、整理决策依据,写进每票起居录;LLM 自行搜集、整理、认票(#779 后无机械验真,机械只做 IO;起居录供符宝郎读录核旨)。只记录已作出的决定,不立法、不批准设计、不指挥施工。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)(起居郎是 LLM 角色)、[ADR 0081](docs/adr/0081-diarist-case-context-and-delivery.md)。 |
|
|
142
142
|
|
|
143
143
|
其余席位:
|
|
144
144
|
|
|
@@ -2353,7 +2353,7 @@ var init_packaged_role_registry = __esm({
|
|
|
2353
2353
|
activationStage: "load-and-install",
|
|
2354
2354
|
sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
|
|
2355
2355
|
},
|
|
2356
|
-
// #708 / ADR 0075
|
|
2356
|
+
// #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
|
|
2357
2357
|
// No input flag — LLM finds materials itself (caller-transparent).
|
|
2358
2358
|
{
|
|
2359
2359
|
role: "diarist",
|
|
@@ -21908,9 +21908,9 @@ init_reviewer_pinned_git();
|
|
|
21908
21908
|
init_reviewer_output();
|
|
21909
21909
|
import { Type as Type23 } from "typebox";
|
|
21910
21910
|
var reviewerAmendmentsSchema = Type23.Object({
|
|
21911
|
-
standards: Type23.Optional(Type23.String({ description: "\
|
|
21912
|
-
spec: Type23.Optional(Type23.String({ description: "\
|
|
21913
|
-
}, { additionalProperties: true, description: "\
|
|
21911
|
+
standards: Type23.Optional(Type23.String({ description: "\u6807\u51C6\u8F74\u5F39\u7AE0\u6B63\u6587" })),
|
|
21912
|
+
spec: Type23.Optional(Type23.String({ description: "\u89C4\u683C\u8F74\u5F39\u7AE0\u6B63\u6587" }))
|
|
21913
|
+
}, { additionalProperties: true, description: "\u9010\u8F74\u5F39\u7AE0\u6B63\u6587\uFF1B\u65E0\u5F39\u7AE0\u7684\u8F74\u53EF\u7701\u7565\u3002" });
|
|
21914
21914
|
var REVIEWER_STATUS_DESCRIPTION = "completed | refused \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8";
|
|
21915
21915
|
var reviewerOutputVariants = Type23.Union([
|
|
21916
21916
|
Type23.Object({
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* the same throw→ledger `auditor-roles` unreadable seam. Unknown/non-contract
|
|
20
20
|
* dispatch status stays loud (#475 abolished Gatekeeper incomplete special-case).
|
|
21
21
|
* Lawful province non-dispatch release (`pass` on a dispatch tool) opens no
|
|
22
|
-
* round and must not throw (#597 / ADR 0074
|
|
22
|
+
* round and must not throw (#597 / ADR 0074: 角色调动无强制,交卷闸派发不断).
|
|
23
23
|
* True non-gate volumes (soul-audit noise, etc.) stay omitted from pairing.
|
|
24
24
|
* Historical dispatch↔officer pairing requires a shared typed
|
|
25
25
|
* `ak_auditor_parent_attempt_binding.parent.attemptEntryId` — never seat/time guessing.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public 起居郎 (diarist) terminating receipt contracts — ADR 0075
|
|
2
|
+
* Public 起居郎 (diarist) terminating receipt contracts — ADR 0075(起居郎是 LLM 角色)。
|
|
3
3
|
* Lawful explicit releases: completed (入录) | escalate (认不出本庭对象上抛).
|
|
4
4
|
* Machine facts about the volume come from the mechanical sitian seam, never
|
|
5
5
|
* from model self-report (锚定宪法); this module owns the receipt shape only.
|
|
@@ -2656,7 +2656,7 @@ var init_packaged_role_registry = __esm({
|
|
|
2656
2656
|
activationStage: "load-and-install",
|
|
2657
2657
|
sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
|
|
2658
2658
|
},
|
|
2659
|
-
// #708 / ADR 0075
|
|
2659
|
+
// #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
|
|
2660
2660
|
// No input flag — LLM finds materials itself (caller-transparent).
|
|
2661
2661
|
{
|
|
2662
2662
|
role: "diarist",
|
|
@@ -22032,9 +22032,9 @@ init_reviewer_pinned_git();
|
|
|
22032
22032
|
init_reviewer_output();
|
|
22033
22033
|
import { Type as Type23 } from "typebox";
|
|
22034
22034
|
var reviewerAmendmentsSchema = Type23.Object({
|
|
22035
|
-
standards: Type23.Optional(Type23.String({ description: "\
|
|
22036
|
-
spec: Type23.Optional(Type23.String({ description: "\
|
|
22037
|
-
}, { additionalProperties: true, description: "\
|
|
22035
|
+
standards: Type23.Optional(Type23.String({ description: "\u6807\u51C6\u8F74\u5F39\u7AE0\u6B63\u6587" })),
|
|
22036
|
+
spec: Type23.Optional(Type23.String({ description: "\u89C4\u683C\u8F74\u5F39\u7AE0\u6B63\u6587" }))
|
|
22037
|
+
}, { additionalProperties: true, description: "\u9010\u8F74\u5F39\u7AE0\u6B63\u6587\uFF1B\u65E0\u5F39\u7AE0\u7684\u8F74\u53EF\u7701\u7565\u3002" });
|
|
22038
22038
|
var REVIEWER_STATUS_DESCRIPTION = "completed | refused \u2014 \u5F62\u72B6\u6307\u5F15\uFF0C\u975E schema \u95F8";
|
|
22039
22039
|
var reviewerOutputVariants = Type23.Union([
|
|
22040
22040
|
Type23.Object({
|
|
@@ -58,7 +58,7 @@ async function listSitianRecordPaths(sessionParent) {
|
|
|
58
58
|
* still yields a typed switch (empty path list).
|
|
59
59
|
*
|
|
60
60
|
* Pi wrote its own session.jsonl; every other host's run volume is the sitian
|
|
61
|
-
* record set on the live run (ADR 0077
|
|
61
|
+
* record set on the live run (ADR 0077 全宿主 session 卷宗统一直写, #717) — the CLI's
|
|
62
62
|
* own journals stay in the operator home and are never copied here.
|
|
63
63
|
*/
|
|
64
64
|
export async function projectHostTransitionPriorNative(input) {
|
|
@@ -195,7 +195,7 @@ const PUBLIC_ROLE_RECORDS = [
|
|
|
195
195
|
activationStage: "load-and-install",
|
|
196
196
|
sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
|
|
197
197
|
},
|
|
198
|
-
// #708 / ADR 0075
|
|
198
|
+
// #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
|
|
199
199
|
// No input flag — LLM finds materials itself (caller-transparent).
|
|
200
200
|
{
|
|
201
201
|
role: "diarist",
|
|
@@ -72,7 +72,8 @@ function buildMethodArgs(methods) {
|
|
|
72
72
|
return skillArgs;
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
-
* Pi-native `/skill:<name>` for a single forced method (ADR 0082
|
|
75
|
+
* Pi-native `/skill:<name>` for a single forced method (ADR 0082: pi is one adapter
|
|
76
|
+
* with no privilege; Pi-only seams stay inside the pi adapter).
|
|
76
77
|
* Driven by typed RoleTurnRequest.methods — middle-layer decision, Pi-only syntax.
|
|
77
78
|
* Zero/many methods leave the prompt alone (Fixer optional pair stays `--skill` only).
|
|
78
79
|
*/
|
|
@@ -70,8 +70,8 @@ async function finalizeExceptionRunBestEffort(runDirectory, io) {
|
|
|
70
70
|
/**
|
|
71
71
|
* Thrown by dispatchPostAdmissionTurn when a failure happens inside its own
|
|
72
72
|
* settlement authority (presentControlledFailure) after the host turn
|
|
73
|
-
* genuinely started — never to fabricate a replacement terminal (ADR 0080
|
|
74
|
-
*
|
|
73
|
+
* genuinely started — never to fabricate a replacement terminal (ADR 0080:
|
|
74
|
+
* one settlement disposition owner — settlement stays exactly presentControlledFailure
|
|
75
75
|
* / settleFailureTerminalResult, or — once the retry budget is exhausted —
|
|
76
76
|
* this loop's own dispatchExceptionFailureTerminal). Its only job is to carry
|
|
77
77
|
* the "turn already started" fact across the throw boundary so this loop
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 系统随案递送本票起居录的中立指针段(ADR 0081
|
|
2
|
+
* 系统随案递送本票起居录的中立指针段(ADR 0081:公共入口直接挂案卷,Soul 只说明用途不负责派送;
|
|
3
3
|
* #709 公共入口通用递送与 #742 给事中受理链路同源;
|
|
4
|
-
* 指针输入沿 ADR 0079
|
|
4
|
+
* 指针输入沿 ADR 0079(指针是绑定材料由代码精准递送),不把卷宗正文塞进提示词)。
|
|
5
5
|
* 只读已有案卷:不刷新、不生成、不校验内容、不新增拒收或停工条件。
|
|
6
6
|
* 机器文本仅中立标识材料(ADR 0073),用途说明归角色材料所有。
|
|
7
7
|
*
|
package/dist/public-cli/main.js
CHANGED
|
@@ -15142,7 +15142,7 @@ var init_packaged_role_registry = __esm({
|
|
|
15142
15142
|
activationStage: "load-and-install",
|
|
15143
15143
|
sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
|
|
15144
15144
|
},
|
|
15145
|
-
// #708 / ADR 0075
|
|
15145
|
+
// #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
|
|
15146
15146
|
// No input flag — LLM finds materials itself (caller-transparent).
|
|
15147
15147
|
{
|
|
15148
15148
|
role: "diarist",
|
|
@@ -30294,7 +30294,7 @@ async function invokeCourtDiarist(input, env, io) {
|
|
|
30294
30294
|
...env.signal === void 0 ? {} : { signal: env.signal },
|
|
30295
30295
|
...input.boundTicketNumber === void 0 ? {} : { boundTicketNumber: input.boundTicketNumber },
|
|
30296
30296
|
// Child seat selects from the composition-root table. Do not pass the
|
|
30297
|
-
// already-selected parent adapter (#840 / ADR 0082 host
|
|
30297
|
+
// already-selected parent adapter (#840 / ADR 0082: --host 旗标>席位配置>缺省 pi).
|
|
30298
30298
|
...env.hostAdapters === void 0 ? {} : { hostAdapters: env.hostAdapters }
|
|
30299
30299
|
});
|
|
30300
30300
|
const roleOutcome = result2.terminal?.roleOutcome;
|
|
@@ -209,8 +209,8 @@ export async function presentControlledFailure(admitted, failureInput, adapters,
|
|
|
209
209
|
/**
|
|
210
210
|
* presentControlledFailure, called only where the host turn has already
|
|
211
211
|
* genuinely started (#840 r9 判词 class 1 boundary). If presentControlledFailure
|
|
212
|
-
* itself fails, this never fabricates a replacement terminal (ADR 0080
|
|
213
|
-
*
|
|
212
|
+
* itself fails, this never fabricates a replacement terminal (ADR 0080:
|
|
213
|
+
* one settlement disposition owner — presentControlledFailure /
|
|
214
214
|
* settleFailureTerminalResult stays the one authority); it re-throws a
|
|
215
215
|
* TurnDispatchedFailure so runWithAutoResumeLoop still learns the turn
|
|
216
216
|
* started and selects a resume payload on the next attempt, while settling
|
|
@@ -230,8 +230,8 @@ async function settleAfterTurnStarted(admitted, failureInput, adapters, authorit
|
|
|
230
230
|
* (needsPersist — station-child / resumable auto-resume loop, #416/#840):
|
|
231
231
|
* that write must land outside the loop's own retried-dispatch try, but its
|
|
232
232
|
* failure still settles through the single existing controlled-failure
|
|
233
|
-
* authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080
|
|
234
|
-
*
|
|
233
|
+
* authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080:
|
|
234
|
+
* one settlement disposition owner) — never a second hand-rolled
|
|
235
235
|
* classify/artifact/Terminal (#836 r12 class 3), and never lawful/non-lawful
|
|
236
236
|
* settling differently (#836 r13 class 2: a caller's io here may be a no-op,
|
|
237
237
|
* so a stderr-only trace is never seen and the failure is otherwise
|
|
@@ -437,8 +437,8 @@ export async function dispatchPostAdmissionTurn(input) {
|
|
|
437
437
|
// 判词 class 1 boundary — 覆盖 executeTurn 已启动后至返回带 turnDispatched
|
|
438
438
|
// 结果前的全部异常). Each fallible step routes any failure through the
|
|
439
439
|
// single existing settlement authority (presentControlledFailure /
|
|
440
|
-
// settleFailureTerminalResult) rather than a second one (ADR 0080
|
|
441
|
-
//
|
|
440
|
+
// settleFailureTerminalResult) rather than a second one (ADR 0080:
|
|
441
|
+
// one settlement disposition owner) — never by fabricating a terminal here.
|
|
442
442
|
// A cleanup step that runs only after a real settlement (clearCurrentCourt)
|
|
443
443
|
// is protected by logging and keeping that already-obtained result, never
|
|
444
444
|
// by discarding it (#840 已交劳动只整理终局不重做). A failure inside the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared ticket identity seam for public court seats (#635 / #637 / #709 / #747 / #771).
|
|
3
3
|
*
|
|
4
|
-
* ADR 0075
|
|
4
|
+
* ADR 0075(起居郎 LLM 自行认票): the diarist LLM recognizes the
|
|
5
5
|
* court target; recognized ticket → provenance, truly unbound → no provenance,
|
|
6
6
|
* or escalate when it cannot recognize one. Code does not re-judge the ticket
|
|
7
7
|
* (锚定宪法; owner 2026-09-08: 代码不准做判断). Other seats reuse a typed
|
|
@@ -222,7 +222,7 @@ export function renderTicketProvenanceMarkdown(input) {
|
|
|
222
222
|
/**
|
|
223
223
|
* Ensure the per-ticket JSONL volume partition exists (empty file OK).
|
|
224
224
|
* Every bound-ticket court establishes the volume even with zero diary entries
|
|
225
|
-
* (ADR 0075
|
|
225
|
+
* (ADR 0075: 每票一份起居录送司天台). Does not forge entries.
|
|
226
226
|
*/
|
|
227
227
|
export function ensureTicketProvenanceVolume(ticketNumber, cwd, home) {
|
|
228
228
|
const volume = resolveTicketProvenanceVolume(ticketNumber, cwd, home);
|
package/package.json
CHANGED
|
@@ -1,44 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 起居郎收集方法
|
|
2
2
|
|
|
3
|
-
本文件是起居郎语义收集的方法真源(ADR 0075
|
|
3
|
+
本文件是起居郎语义收集的方法真源(ADR 0075;#779 调用方无感)。
|
|
4
4
|
|
|
5
5
|
## 任务
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
判断本庭对象是哪张票、本票对话起止于何处并交出边界;正文与定位由机械按边界从会话卷投影。不整块誊录正文,不自行搜集材料替代机械投影;本文件不新立职掌、不替 soul 立法、不复制 schema 与 CLI 说明。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 如何定边界
|
|
10
10
|
|
|
11
|
-
你是 LLM
|
|
11
|
+
你是 LLM,自己读以判断边界:
|
|
12
12
|
|
|
13
|
-
-
|
|
13
|
+
- 本仓相关会话卷(路径里的 `_` 在目录名里常写作 `-`;主 clone 与 worktree 可能共用或分列,自行辨认)
|
|
14
14
|
- 本票票面与评论:用 `gh` 或等价方式读 GitHub issue
|
|
15
|
-
- 票面引用的 ADR 原件:仓内 `docs/adr/`
|
|
16
15
|
|
|
17
|
-
调用方只给传召文与 `--project
|
|
16
|
+
调用方只给传召文与 `--project`。边界定不下来就如实说明并走既有 reask/escalate,不编造。
|
|
18
17
|
|
|
19
|
-
##
|
|
18
|
+
## 何谓本票对话
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
与本票决策相关的陛下与 runner 对话均应落入边界:
|
|
22
21
|
|
|
23
22
|
- 本票要立什么、不立什么、范围如何收束
|
|
24
23
|
- 命名、工序先后、调用面、闸位、存量是否补档等裁决
|
|
25
24
|
- 对既有 ADR / 法源的采纳、修正或明确不适用
|
|
26
25
|
- 陛下(owner)原话、确认、否决、收口条件
|
|
27
|
-
-
|
|
26
|
+
- 为上述裁决提供必要上下文的紧邻对话
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## 誊录整块
|
|
32
|
-
|
|
33
|
-
- 入选即整块保留:交卷对象里写完整 `transcript`,并带上可回指的 `sourceRef`(会话文件+entry、issue URL、ADR path 等)。
|
|
34
|
-
- 不指针化、不摘要替代正文。
|
|
35
|
-
- 宁多勿漏:拿不准是否决策相关时入选。
|
|
28
|
+
工具输出与机器块不入录。无关闲聊、与本票决策无涉的他票材料不划进边界。相关性由你裁决。
|
|
36
29
|
|
|
37
30
|
## 本票身份
|
|
38
31
|
|
|
39
|
-
由你(本席 LLM)判断当前要办的是哪张票,在交卷对象上以 typed 字段交出——代码不做认票裁定(ADR 0075
|
|
32
|
+
由你(本席 LLM)判断当前要办的是哪张票,在交卷对象上以 typed 字段交出——代码不做认票裁定(ADR 0075:起居郎 LLM 自行认票;认得出→有录,真无票→无录;机械层不做引文/票号/相关性判定)。
|
|
40
33
|
|
|
41
|
-
- 认得出本庭对象:`status: completed` 且 `ticketNumber: N
|
|
34
|
+
- 认得出本庭对象:`status: completed` 且 `ticketNumber: N`,并交边界。
|
|
42
35
|
- 真无票对象(方案/派单/处置案等):`status: completed` 且 `ticketNumber: null`(或省略)。真无票是合法结果,不入录。
|
|
43
36
|
- 认不出本庭对象是哪一张:`status: escalate` 并写明 `reason`。识别不了就上抛,不得省略票号假装无录,也不得猜一个号。
|
|
44
37
|
- 不得从旁及的他票或任何猜测里挑一个号顶替认不出的身份。
|
package/src/activation-ledger.ts
CHANGED
|
@@ -100,7 +100,7 @@ export function correlationIdentityFromEnv(
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Descriptor-driven top-level pick: only ACCEPTED_ACTIVATION_FACT_KEYS leave this boundary.
|
|
103
|
-
* Nested session/correlation are rebuilt closed before the pick (ADR 0049 zero
|
|
103
|
+
* Nested session/correlation are rebuilt closed before the pick (ADR 0049: first-phase ledger holds zero content bytes by construction).
|
|
104
104
|
*/
|
|
105
105
|
function projectAcceptedActivationFact(
|
|
106
106
|
input: AcceptedActivationFactInput,
|
|
@@ -28,7 +28,7 @@ export type DispatchStubFactInput = Omit<DispatchStubFact, "event">;
|
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Construct the closed dispatch stub from trusted typed inputs only.
|
|
31
|
-
* Nested dispatch/correlation are rebuilt closed (ADR 0049 zero
|
|
31
|
+
* Nested dispatch/correlation are rebuilt closed (ADR 0049: first-phase ledger holds zero content bytes by construction).
|
|
32
32
|
*/
|
|
33
33
|
export function buildDispatchStubFact(input: DispatchStubFactInput): DispatchStubFact {
|
|
34
34
|
return {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* the same throw→ledger `auditor-roles` unreadable seam. Unknown/non-contract
|
|
20
20
|
* dispatch status stays loud (#475 abolished Gatekeeper incomplete special-case).
|
|
21
21
|
* Lawful province non-dispatch release (`pass` on a dispatch tool) opens no
|
|
22
|
-
* round and must not throw (#597 / ADR 0074
|
|
22
|
+
* round and must not throw (#597 / ADR 0074: 角色调动无强制,交卷闸派发不断).
|
|
23
23
|
* True non-gate volumes (soul-audit noise, etc.) stay omitted from pairing.
|
|
24
24
|
* Historical dispatch↔officer pairing requires a shared typed
|
|
25
25
|
* `ak_auditor_parent_attempt_binding.parent.attemptEntryId` — never seat/time guessing.
|
package/src/diarist-contracts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public 起居郎 (diarist) terminating receipt contracts — ADR 0075
|
|
2
|
+
* Public 起居郎 (diarist) terminating receipt contracts — ADR 0075(起居郎是 LLM 角色)。
|
|
3
3
|
* Lawful explicit releases: completed (入录) | escalate (认不出本庭对象上抛).
|
|
4
4
|
* Machine facts about the volume come from the mechanical sitian seam, never
|
|
5
5
|
* from model self-report (锚定宪法); this module owns the receipt shape only.
|
|
@@ -21,7 +21,7 @@ export const DIARIST_OUTPUT_TOOL_NAME = "ak_diarist_output";
|
|
|
21
21
|
export const DIARIST_ACCEPTED_TEXT = "起居郎回执已接受";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* One whole block the diarist chose to enter (ADR 0075
|
|
24
|
+
* One whole block the diarist chose to enter (ADR 0075 誊录整块对话)。
|
|
25
25
|
* LLM supplies the block bytes + source pointer; mechanical layer appends as-is.
|
|
26
26
|
*/
|
|
27
27
|
export type DiaristEntrySubmission = {
|
|
@@ -38,13 +38,13 @@ export type DiaristOutput =
|
|
|
38
38
|
| {
|
|
39
39
|
readonly status: "completed";
|
|
40
40
|
/**
|
|
41
|
-
* Typed court-target assertion (ADR 0075
|
|
41
|
+
* Typed court-target assertion (ADR 0075 起居郎 LLM 自行认票)。
|
|
42
42
|
* Positive integer = 本庭对象=票N; null/absent = true-unbound (真无票→无录).
|
|
43
43
|
* LLM owns recognition; mechanical layer does not re-judge the number.
|
|
44
44
|
*/
|
|
45
45
|
readonly ticketNumber?: number | null;
|
|
46
46
|
/**
|
|
47
|
-
* #871 typed co-review set (ADR 0075
|
|
47
|
+
* #871 typed co-review set (ADR 0075 合审票集 narrow extension)。
|
|
48
48
|
* Positive integers = tickets that should each receive a diary this court (includes main).
|
|
49
49
|
* Field absent → no new set this turn (resume keeps stored run fact; first court defaults to [main]).
|
|
50
50
|
* Explicit empty array → single-ticket face [main] whole-set replace.
|
package/src/diarist.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 起居郎 volume commit — ADR 0075
|
|
2
|
+
* 起居郎 volume commit — ADR 0075(起居郎是 LLM 角色)/ #779.
|
|
3
3
|
* Semantic collection is the diarist role's own LLM turn (finds materials itself).
|
|
4
4
|
* This module only appends submitted whole blocks idempotently and refreshes the
|
|
5
5
|
* human view. No frozen catalog, no quote reverse-verify, no ticket-number
|
|
@@ -57,7 +57,7 @@ async function listSitianRecordPaths(sessionParent: string): Promise<string[]> {
|
|
|
57
57
|
* still yields a typed switch (empty path list).
|
|
58
58
|
*
|
|
59
59
|
* Pi wrote its own session.jsonl; every other host's run volume is the sitian
|
|
60
|
-
* record set on the live run (ADR 0077
|
|
60
|
+
* record set on the live run (ADR 0077 全宿主 session 卷宗统一直写, #717) — the CLI's
|
|
61
61
|
* own journals stay in the operator home and are never copied here.
|
|
62
62
|
*/
|
|
63
63
|
export async function projectHostTransitionPriorNative(input: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export const REVIEWER_OUTPUT_TOOL_NAME = "ak_reviewer_output";
|
|
4
4
|
export const REVIEWER_ACCEPTED_TEXT = "御史台回执已接受";
|
|
5
5
|
|
|
6
|
-
/** Seat-owned per-axis
|
|
6
|
+
/** Seat-owned per-axis finding body text (standards / spec). */
|
|
7
7
|
export type ReviewerAmendments = Readonly<Partial<Record<"standards" | "spec", string>>>;
|
|
8
8
|
export type ReviewerIntent =
|
|
9
9
|
| Readonly<{ status: "completed"; amendments?: ReviewerAmendments }>
|
|
@@ -87,7 +87,7 @@ export function resolveEngineMaterialPath(
|
|
|
87
87
|
/**
|
|
88
88
|
* Path-safety syntax gate for engine labels at real I/O seams.
|
|
89
89
|
* Returns the canonical name on success; throws Error on illegal syntax.
|
|
90
|
-
* Does not consult any material catalog (ADR 0069
|
|
90
|
+
* Does not consult any material catalog (ADR 0069: 引擎权威是 owner 池令;能力通用可插拔).
|
|
91
91
|
*/
|
|
92
92
|
export function assertLegalEngineName(name: string): string {
|
|
93
93
|
if (!isEngineNameSyntax(name)) {
|
|
@@ -211,7 +211,7 @@ export const PUBLIC_ROLE_RECORDS = [
|
|
|
211
211
|
activationStage: "load-and-install",
|
|
212
212
|
sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS,
|
|
213
213
|
},
|
|
214
|
-
// #708 / ADR 0075
|
|
214
|
+
// #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
|
|
215
215
|
// No input flag — LLM finds materials itself (caller-transparent).
|
|
216
216
|
{
|
|
217
217
|
role: "diarist",
|
package/src/pi/role-turn-host.ts
CHANGED
|
@@ -92,7 +92,8 @@ function buildMethodArgs(methods: readonly MethodBinding[]): string[] {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* Pi-native `/skill:<name>` for a single forced method (ADR 0082
|
|
95
|
+
* Pi-native `/skill:<name>` for a single forced method (ADR 0082: pi is one adapter
|
|
96
|
+
* with no privilege; Pi-only seams stay inside the pi adapter).
|
|
96
97
|
* Driven by typed RoleTurnRequest.methods — middle-layer decision, Pi-only syntax.
|
|
97
98
|
* Zero/many methods leave the prompt alone (Fixer optional pair stays `--skill` only).
|
|
98
99
|
*/
|
|
@@ -119,8 +119,8 @@ export type AutoResumeDispatchResult = {
|
|
|
119
119
|
/**
|
|
120
120
|
* Thrown by dispatchPostAdmissionTurn when a failure happens inside its own
|
|
121
121
|
* settlement authority (presentControlledFailure) after the host turn
|
|
122
|
-
* genuinely started — never to fabricate a replacement terminal (ADR 0080
|
|
123
|
-
*
|
|
122
|
+
* genuinely started — never to fabricate a replacement terminal (ADR 0080:
|
|
123
|
+
* one settlement disposition owner — settlement stays exactly presentControlledFailure
|
|
124
124
|
* / settleFailureTerminalResult, or — once the retry budget is exhausted —
|
|
125
125
|
* this loop's own dispatchExceptionFailureTerminal). Its only job is to carry
|
|
126
126
|
* the "turn already started" fact across the throw boundary so this loop
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 系统随案递送本票起居录的中立指针段(ADR 0081
|
|
2
|
+
* 系统随案递送本票起居录的中立指针段(ADR 0081:公共入口直接挂案卷,Soul 只说明用途不负责派送;
|
|
3
3
|
* #709 公共入口通用递送与 #742 给事中受理链路同源;
|
|
4
|
-
* 指针输入沿 ADR 0079
|
|
4
|
+
* 指针输入沿 ADR 0079(指针是绑定材料由代码精准递送),不把卷宗正文塞进提示词)。
|
|
5
5
|
* 只读已有案卷:不刷新、不生成、不校验内容、不新增拒收或停工条件。
|
|
6
6
|
* 机器文本仅中立标识材料(ADR 0073),用途说明归角色材料所有。
|
|
7
7
|
*
|
package/src/public-cli/cli.ts
CHANGED
|
@@ -361,7 +361,7 @@ function createRoleEnvironment(
|
|
|
361
361
|
// host-facing provider (table > unique directory > fail). Bad host never
|
|
362
362
|
// reaches model resolution.
|
|
363
363
|
// Nested summons reuse this table and select by the child seat — never the
|
|
364
|
-
// already-selected parent adapter (#840 / ADR 0082 host
|
|
364
|
+
// already-selected parent adapter (#840 / ADR 0082: --host 旗标>席位配置>缺省 pi).
|
|
365
365
|
const hostAdapters = composeRoleTurnHostAdapters(
|
|
366
366
|
{
|
|
367
367
|
packageRoot: env.packageRoot,
|
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
* Public Countersign Role run: admit ticket materials → court-pipeline prior
|
|
3
3
|
* station (起居郎) → shared post-admission coordinator → settle Terminal result
|
|
4
4
|
* (#572 / ADR 0074 / ADR 0075 / #742 / #771). #599: manual resume continues the
|
|
5
|
-
* exact session. ADR 0079: same-ticket re-summons resume the seat's previous run
|
|
6
|
-
*
|
|
7
|
-
* (`explicit-fresh-summons`).
|
|
5
|
+
* exact session. ADR 0079: same-ticket re-summons resume the seat's previous run;
|
|
6
|
+
* explicit `ak-role new` mints fresh (显式派新腿入口与显式 resume 并列).
|
|
8
7
|
*
|
|
9
8
|
* Court admission auto-runs 起居郎 so the 起居郎 LLM asserts the court target;
|
|
10
9
|
* mechanical layer only verifies; countersign reuses that typed identity for bind
|
|
11
10
|
* and same-ticket resume lookup (ADR 0075 / 0081 / 0079). Code never matches
|
|
12
11
|
* instruction text against book-known numbers. Who may call 起居郎 and in what
|
|
13
|
-
* order is not written into law (ADR 0075
|
|
12
|
+
* order is not written into law (ADR 0075 不规定谁调用起居郎、顺序归调用者); the present admission
|
|
14
13
|
* effect is what this seat currently does. 起居录 path delivery is owned once by
|
|
15
14
|
* post-admission (#709 / ADR 0081).
|
|
16
15
|
*
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
* (incl. verification failure) settle as countersign controlled failure — never
|
|
21
20
|
* wash into 真无票. Only a true missing lawful typed terminal stays unbound and
|
|
22
21
|
* continues the body (r5 unbound-continue). Bound refresh hands the typed key to
|
|
23
|
-
* 起居郎 so freeze loads issue face (
|
|
22
|
+
* 起居郎 so freeze loads issue face (ADR 0075: 每次过庭都跑是调用者用法 / typed handoff).
|
|
24
23
|
*/
|
|
25
24
|
import type { DurablePrincipalAuthority, RoleTurnRequest } from "../host-contracts.ts";
|
|
26
25
|
import { engineSessionMaterialFromOptions, pickEngineAxis } from "../package-resources/engine-material.ts";
|
|
@@ -223,7 +222,7 @@ async function invokeCourtDiarist(input: {
|
|
|
223
222
|
? {}
|
|
224
223
|
: { boundTicketNumber: input.boundTicketNumber }),
|
|
225
224
|
// Child seat selects from the composition-root table. Do not pass the
|
|
226
|
-
// already-selected parent adapter (#840 / ADR 0082 host
|
|
225
|
+
// already-selected parent adapter (#840 / ADR 0082: --host 旗标>席位配置>缺省 pi).
|
|
227
226
|
...(env.hostAdapters === undefined ? {} : { hostAdapters: env.hostAdapters }),
|
|
228
227
|
});
|
|
229
228
|
|
|
@@ -267,7 +266,7 @@ async function invokeCourtDiarist(input: {
|
|
|
267
266
|
|
|
268
267
|
/**
|
|
269
268
|
* Court-pipeline prior station: refresh this ticket's 起居录 before the
|
|
270
|
-
* countersign body turn when already bound (ADR 0075
|
|
269
|
+
* countersign body turn when already bound (ADR 0075 每次过庭都跑)。
|
|
271
270
|
* Caller-invisible — no diarist argv on the countersign command line.
|
|
272
271
|
*
|
|
273
272
|
* Missing ticketNumber (true-unbound / identity deferred) skips the refresh
|
|
@@ -285,7 +284,7 @@ export async function runCountersignCourtDiaristStation(
|
|
|
285
284
|
await env.runCourtDiaristStation(admitted);
|
|
286
285
|
return;
|
|
287
286
|
}
|
|
288
|
-
// Production
|
|
287
|
+
// Production court refresh (ADR 0075: 每次过庭都跑是调用者用法) only under a known ticket identity.
|
|
289
288
|
// First-entry unbound identity is owned by runPublicCountersign.
|
|
290
289
|
if (admitted.ticketNumber === undefined) return;
|
|
291
290
|
|
|
@@ -461,7 +460,7 @@ export async function runPublicCountersign(
|
|
|
461
460
|
await relocateAdmittedRunToTicket(admitted, env.principalAuthority);
|
|
462
461
|
await markRunTerminal(admitted.runDirectory);
|
|
463
462
|
// Identity 起居郎 asserted unbound (no issue face). Resume still runs
|
|
464
|
-
// the bound refresh station under the typed key (
|
|
463
|
+
// the bound refresh station under the typed key (ADR 0075: 每次过庭都跑是调用者用法).
|
|
465
464
|
// #871: hand the identity set so resume can whole-replace the run fact
|
|
466
465
|
// when this summons produced a new typed set (never union).
|
|
467
466
|
return await runPublicCountersignResume(
|
|
@@ -590,7 +589,7 @@ function countersignAdapters(options?: {
|
|
|
590
589
|
/**
|
|
591
590
|
* Resume a previously admitted Countersign run (#599 / DK-3 / #637).
|
|
592
591
|
* Restores role/ticket/session identity. Bound court re-entry runs the diarist
|
|
593
|
-
* refresh station first (ADR 0075
|
|
592
|
+
* refresh station first (ADR 0075 每次过庭都跑); unbound skips refresh.
|
|
594
593
|
* Same-ticket summons deliver this turn's instruction + frozen attachments on
|
|
595
594
|
* the resume prompt; manual resume keeps package-envelope / caller-message
|
|
596
595
|
* semantics and birth attachments. 起居录 path delivery remains post-admission's
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public Diarist (起居郎) Role run — #708 / ADR 0075
|
|
2
|
+
* Public Diarist (起居郎) Role run — #708 / ADR 0075(起居郎是 LLM 角色)/ #779.
|
|
3
3
|
* Same admit → post-admission → settle shape as the other instruction seats.
|
|
4
4
|
* Semantic collection is the role's own turn: LLM finds materials itself
|
|
5
5
|
* (no frozen candidate catalog, no path/attachment burden on the caller).
|
|
6
|
-
* Who calls it and in what order is the caller's business (ADR 0010
|
|
6
|
+
* Who calls it and in what order is the caller's business (ADR 0010; ADR 0075 不规定调用顺序).
|
|
7
7
|
*/
|
|
8
8
|
import type { DurablePrincipalAuthority, RoleTurnRequest } from "../host-contracts.ts";
|
|
9
9
|
import { engineSessionMaterialFromOptions, pickEngineAxis } from "../package-resources/engine-material.ts";
|
|
@@ -467,8 +467,8 @@ export async function presentControlledFailure<
|
|
|
467
467
|
/**
|
|
468
468
|
* presentControlledFailure, called only where the host turn has already
|
|
469
469
|
* genuinely started (#840 r9 判词 class 1 boundary). If presentControlledFailure
|
|
470
|
-
* itself fails, this never fabricates a replacement terminal (ADR 0080
|
|
471
|
-
*
|
|
470
|
+
* itself fails, this never fabricates a replacement terminal (ADR 0080:
|
|
471
|
+
* one settlement disposition owner — presentControlledFailure /
|
|
472
472
|
* settleFailureTerminalResult stays the one authority); it re-throws a
|
|
473
473
|
* TurnDispatchedFailure so runWithAutoResumeLoop still learns the turn
|
|
474
474
|
* started and selects a resume payload on the next attempt, while settling
|
|
@@ -505,8 +505,8 @@ async function settleAfterTurnStarted<
|
|
|
505
505
|
* (needsPersist — station-child / resumable auto-resume loop, #416/#840):
|
|
506
506
|
* that write must land outside the loop's own retried-dispatch try, but its
|
|
507
507
|
* failure still settles through the single existing controlled-failure
|
|
508
|
-
* authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080
|
|
509
|
-
*
|
|
508
|
+
* authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080:
|
|
509
|
+
* one settlement disposition owner) — never a second hand-rolled
|
|
510
510
|
* classify/artifact/Terminal (#836 r12 class 3), and never lawful/non-lawful
|
|
511
511
|
* settling differently (#836 r13 class 2: a caller's io here may be a no-op,
|
|
512
512
|
* so a stderr-only trace is never seen and the failure is otherwise
|
|
@@ -816,8 +816,8 @@ export async function dispatchPostAdmissionTurn<
|
|
|
816
816
|
// 判词 class 1 boundary — 覆盖 executeTurn 已启动后至返回带 turnDispatched
|
|
817
817
|
// 结果前的全部异常). Each fallible step routes any failure through the
|
|
818
818
|
// single existing settlement authority (presentControlledFailure /
|
|
819
|
-
// settleFailureTerminalResult) rather than a second one (ADR 0080
|
|
820
|
-
//
|
|
819
|
+
// settleFailureTerminalResult) rather than a second one (ADR 0080:
|
|
820
|
+
// one settlement disposition owner) — never by fabricating a terminal here.
|
|
821
821
|
// A cleanup step that runs only after a real settlement (clearCurrentCourt)
|
|
822
822
|
// is protected by logging and keeping that already-obtained result, never
|
|
823
823
|
// by discarding it (#840 已交劳动只整理终局不重做). A failure inside the
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared ticket identity seam for public court seats (#635 / #637 / #709 / #747 / #771).
|
|
3
3
|
*
|
|
4
|
-
* ADR 0075
|
|
4
|
+
* ADR 0075(起居郎 LLM 自行认票): the diarist LLM recognizes the
|
|
5
5
|
* court target; recognized ticket → provenance, truly unbound → no provenance,
|
|
6
6
|
* or escalate when it cannot recognize one. Code does not re-judge the ticket
|
|
7
7
|
* (锚定宪法; owner 2026-09-08: 代码不准做判断). Other seats reuse a typed
|
|
@@ -272,7 +272,7 @@ export async function summonPublicRole(
|
|
|
272
272
|
options.credentials ?? (await loadCredentialProviders(agentDir));
|
|
273
273
|
const config = await loadPublicCliConfig(home);
|
|
274
274
|
// Nested summons resolve host on the officer seat only (flag>seat>default pi).
|
|
275
|
-
// Parent run host is not an override channel (#821 / ADR 0082 host
|
|
275
|
+
// Parent run host is not an override channel (#821 / ADR 0082: --host 旗标>席位配置>缺省 pi).
|
|
276
276
|
const seat = resolveEffectiveSeat(config, options.role, credentials);
|
|
277
277
|
let summonEnv;
|
|
278
278
|
try {
|
package/src/reviewer-role.ts
CHANGED
|
@@ -22,9 +22,9 @@ export type ReviewerAdmittedInputs = Readonly<{
|
|
|
22
22
|
}>;
|
|
23
23
|
|
|
24
24
|
const reviewerAmendmentsSchema = Type.Object({
|
|
25
|
-
standards: Type.Optional(Type.String({ description: "
|
|
26
|
-
spec: Type.Optional(Type.String({ description: "
|
|
27
|
-
}, { additionalProperties: true, description: "
|
|
25
|
+
standards: Type.Optional(Type.String({ description: "标准轴弹章正文" })),
|
|
26
|
+
spec: Type.Optional(Type.String({ description: "规格轴弹章正文" })),
|
|
27
|
+
}, { additionalProperties: true, description: "逐轴弹章正文;无弹章的轴可省略。" });
|
|
28
28
|
// #836 r16 class 1: diagnostic is LLM/human-read narrative content — no code
|
|
29
29
|
// branches on its length (src/reviewer-role.ts consumer: reviewer content is
|
|
30
30
|
// returned as submitted, ADR 0057).
|
package/src/role-envelope.ts
CHANGED
|
@@ -46,7 +46,8 @@ type ContentPart = { type: "text"; text: string } | { type: "image"; data: strin
|
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Build host-side Skill expansion evidence from pre-read RoleTurnRequest.methods.
|
|
49
|
-
* Non-pi hosts never parse Pi `/skill:` syntax (ADR 0082
|
|
49
|
+
* Non-pi hosts never parse Pi `/skill:` syntax (ADR 0082: pi is one adapter with
|
|
50
|
+
* no privilege; Pi-only seams stay inside the pi adapter);
|
|
50
51
|
* a single bound method treats the plain prompt as the preserved user message.
|
|
51
52
|
* Pi-native slash forms stay inside `src/pi/` only.
|
|
52
53
|
*/
|
package/src/ticket-provenance.ts
CHANGED
|
@@ -302,7 +302,7 @@ export function renderTicketProvenanceMarkdown(input: {
|
|
|
302
302
|
/**
|
|
303
303
|
* Ensure the per-ticket JSONL volume partition exists (empty file OK).
|
|
304
304
|
* Every bound-ticket court establishes the volume even with zero diary entries
|
|
305
|
-
* (ADR 0075
|
|
305
|
+
* (ADR 0075: 每票一份起居录送司天台). Does not forge entries.
|
|
306
306
|
*/
|
|
307
307
|
export function ensureTicketProvenanceVolume(
|
|
308
308
|
ticketNumber: number,
|
|
@@ -38,7 +38,7 @@ function workIdentityFromCwd(cwd: string): string | undefined {
|
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
/** Machine-ledger session paths are not work identity (ADR 0048 session
|
|
41
|
+
/** Machine-ledger session paths are not work identity (ADR 0048: session 直落家). */
|
|
42
42
|
function isMachineLedgerSessionPath(sessionPath: string): boolean {
|
|
43
43
|
// Physical containment under the package ledger home — never directory spelling,
|
|
44
44
|
// and stable across macOS /var ↔ /private/var realpath asymmetry. Path → ledger
|
|
@@ -23,7 +23,7 @@ export const WORKER_COMMIT_BASELINE_ENTRY_TYPE = "commit-baseline";
|
|
|
23
23
|
export const WORKER_COMMIT_REMINDER_BOUNCE_ENTRY_TYPE = "commit-reminder-bounce";
|
|
24
24
|
export const WORKER_PREFIX_REMINDER_BOUNCE_ENTRY_TYPE = "prefix-reminder-bounce";
|
|
25
25
|
|
|
26
|
-
/** Statuses that enter the officer submission gate (ADR 0066
|
|
26
|
+
/** Statuses that enter the officer submission gate (ADR 0066: completed/partially_completed 进闸①;planned/refused/unfinished 零 commit 合法). */
|
|
27
27
|
export const WORKER_DONE_STATUSES: ReadonlySet<string> = new Set(["completed", "partially_completed"]);
|
|
28
28
|
/** Historical package hook ownership marker — uninstall criterion only. */
|
|
29
29
|
const HOOK_MARKER = "ak-roles: worker-submission-gates reference-transaction";
|