@akagilnc/pi-workflow-roles 0.1.3356 → 0.1.3377
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 +2 -2
- package/README.zh-CN.md +3 -3
- package/dist/gatekeeper-role.js +7 -51
- package/dist/grok/production-host.js +25 -68
- package/dist/public-cli/main.js +267 -222
- package/package.json +1 -1
- package/src/analyst-gate-cycles-read.ts +99 -26
- package/src/analyst-metric-families/gate-cycles.ts +7 -1
- package/src/gatekeeper-role.ts +14 -59
- package/src/public-cli/settlement.ts +16 -13
- package/src/public-cli/terminal.ts +21 -18
- package/src/worker-role.ts +19 -14
- package/src/worker-submission-gates.ts +3 -2
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ Seat and Gate-officer configuration:
|
|
|
47
47
|
```bash
|
|
48
48
|
ak-role config set judge <provider/model[:thinking]>
|
|
49
49
|
ak-role config set navigator <provider/model[:thinking]>
|
|
50
|
-
# Gate officers (
|
|
50
|
+
# Gate officers (direct summons on DONE submissions; province remains independently callable)
|
|
51
51
|
ak-role config set gatekeeper <provider/model[:thinking]>
|
|
52
52
|
ak-role config set inspector <provider/model[:thinking]>
|
|
53
53
|
ak-role config set notary <provider/model[:thinking]>
|
|
@@ -67,7 +67,7 @@ For Gate officers (`gatekeeper` / `inspector` / `notary`) resolution is officer
|
|
|
67
67
|
|
|
68
68
|
Receipts are typed, so callers compose roles without parsing prose; ordering and stopping stay caller-owned ([ADR 0010](docs/adr/0010-callers-own-role-composition-and-repetition.md)). Programmatic consumers derive contracts from the exported schemas in `src/package-contracts/`, not from this guide.
|
|
69
69
|
|
|
70
|
-
Gate submission gate: on
|
|
70
|
+
Gate submission gate: on DONE-side submissions (`completed` / `partially_completed`) the package summons the subject officer directly (`inspector` for worker completion; `notary` for judge draft / countersign verdict) — it does not spawn a Gatekeeper child to choose the seat; bounce means rewrite-and-resubmit in that same session, not role failure; `planned` / `refused` / `unfinished` skip the officer summons and settle; `ak-role gatekeeper` remains available for independent province dispatch/pass; read gate history from the typed gate section of the receipt, never from session prose. Pointers: [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md), [ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md), [ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md). A labor-engine detour that fails to spawn, exits nonzero, or produces no usable output stops the run through the existing infrastructure-failure path with the original cause visible ([ADR 0071](docs/adr/0071-engine-detour-failure-seat-fallback-declaration.md)).
|
|
71
71
|
|
|
72
72
|
## Call the roles
|
|
73
73
|
|
package/README.zh-CN.md
CHANGED
|
@@ -47,7 +47,7 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
|
|
|
47
47
|
```bash
|
|
48
48
|
ak-role config set judge <provider/model[:thinking]>
|
|
49
49
|
ak-role config set navigator <provider/model[:thinking]>
|
|
50
|
-
#
|
|
50
|
+
# 门下省官席(DONE 交卷直接传召察院/符宝郎;门下省仍可独立直调;给事中票庭由调用者直召,见「调用百官」)
|
|
51
51
|
ak-role config set gatekeeper <provider/model[:thinking]>
|
|
52
52
|
ak-role config set inspector <provider/model[:thinking]>
|
|
53
53
|
ak-role config set notary <provider/model[:thinking]>
|
|
@@ -67,7 +67,7 @@ ak-role config set-auto-resume-limit 3
|
|
|
67
67
|
|
|
68
68
|
回执是 typed 的,调用者不必解析散文即可组合角色;顺序与停止归调用者([ADR 0010](docs/adr/0010-callers-own-role-composition-and-repetition.md))。编程消费者从 `src/package-contracts/` 导出推导契约,不从本文。
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
门下省交卷闸:DONE 侧交卷(`completed`/`partially_completed`)时包按受审物直接传召官(将作监/修内司→`inspector`;大理寺判牒/给事中署章→`notary`),不再起门下省子 session 选席;封驳=当场重写重交,不是角色失败;`planned`/`refused`/`unfinished` 不传召官、直接结算;`ak-role gatekeeper` 仍可独立 dispatch/pass;闸史读回执 typed gate 段,勿刮 session 散文。指针:[ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md)、[ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md)、[ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md)。劳务引擎绕行失败沿既有基础设施故障路径停止、真因可见([ADR 0071](docs/adr/0071-engine-detour-failure-seat-fallback-declaration.md))。
|
|
71
71
|
|
|
72
72
|
## 调用百官
|
|
73
73
|
|
|
@@ -135,7 +135,7 @@ ak-role resume <runId> "<裁定>"
|
|
|
135
135
|
| **御史台** | reviewer | **察举百弊,风闻奏事。** 置身事外审视成果;Standards/Spec 两条取证腿由 runtime 代跑,本席收腿报告出薄回执与 amendment。弹章须指明所劾之处,言不为狱——不负坐实义务,坐实归大理寺。 |
|
|
136
136
|
| **大理寺** | judge | **审理定谳。** 承接各方意见与材料,依照既定规则逐项判断,辨明是非曲直。可以准行、退回或请示更高决定,但自身不参与建设与修改。 |
|
|
137
137
|
| **审刑院** | judge-auditor/doctor-auditor(无 CLI,共享内部接缝;御史台侧闸已退役) | **复核成案。** 不重新争论事情本身,而是检查整个办理过程是否合乎规矩。关注是否有人越过职责、是否遗漏必要步骤、是否以错误方式得出正确结果。直属陛下,不入门下省编制。 |
|
|
138
|
-
| **门下省** | gatekeeper
|
|
138
|
+
| **门下省** | 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)。 |
|
|
139
139
|
| **给事中** | countersign(无交卷闸派发;开工前由调用者传召) | **票庭审读五问。** 制度符合/授权真实(以起居录为据)/文书符意/退回重议/发布资格;读码取证是本职,实现细节不上票面。票庭流水线在本席 turn 前跑起居郎工序(调用者无感);交卷闸出席符宝郎。署=放行开工,封驳=退票重议,上呈=陛下裁决。规范见 [ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)。 |
|
|
140
140
|
| **左拾遗** | gleaner-left(无交卷闸派发;合并前由调用者传召) | **合并前无锚定风闻。** 对全幅合并候选作冷眼评审;只上弹章、不封驳不裁决。规范见 [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md) 修正案。 |
|
|
141
141
|
| **察院** | inspector | **事后察举:复杂度与测试质量两轴。** 受审物是将作监/修内司完成侧交卷;封驳=当场打回重写,不是本局失败。可被门下省派发,也可 `ak-role inspector` 单独调。原给事中,ADR 0074 分立。 |
|
package/dist/gatekeeper-role.js
CHANGED
|
@@ -4,19 +4,12 @@ import { openToolObject } from "./open-tool-schema.js";
|
|
|
4
4
|
import { loadGatekeeperSessionMaterials } from "./session-opening-materials.js";
|
|
5
5
|
import { GatekeeperDecisionError } from "./submission-errors.js";
|
|
6
6
|
import { INSPECTOR_OUTPUT_TOOL_NAME } from "./inspector-contracts.js";
|
|
7
|
-
import { GATEKEEPER_OUTPUT_TOOL_NAME, gatekeeperDecisionSchema, gatekeeperOutputSchema,
|
|
7
|
+
import { GATEKEEPER_OUTPUT_TOOL_NAME, gatekeeperDecisionSchema, gatekeeperOutputSchema, } from "./package-contracts/gatekeeper-output.js";
|
|
8
8
|
export const INSPECTOR_OUTPUT_TOOL = INSPECTOR_OUTPUT_TOOL_NAME;
|
|
9
9
|
export const NOTARY_OUTPUT_TOOL = "ak_notary_output";
|
|
10
10
|
const SUBJECT_TOOL = "ak_gatekeeper_subject";
|
|
11
11
|
function gateSeatLabel(stage) {
|
|
12
|
-
|
|
13
|
-
case "gatekeeper":
|
|
14
|
-
return "门下省";
|
|
15
|
-
case "inspector":
|
|
16
|
-
return "察院";
|
|
17
|
-
case "notary":
|
|
18
|
-
return "符宝郎";
|
|
19
|
-
}
|
|
12
|
+
return stage === "inspector" ? "察院" : "符宝郎";
|
|
20
13
|
}
|
|
21
14
|
export { GatekeeperDecisionError } from "./submission-errors.js";
|
|
22
15
|
export class GatekeeperEscalationError extends Error {
|
|
@@ -110,7 +103,7 @@ function noUsableReleaseFailure(stage, decision) {
|
|
|
110
103
|
return {
|
|
111
104
|
status: "transport_failure",
|
|
112
105
|
stage,
|
|
113
|
-
reason:
|
|
106
|
+
reason: "decision 无显式 pass/bounce/escalate",
|
|
114
107
|
submission: retainedSubmission(decision),
|
|
115
108
|
};
|
|
116
109
|
}
|
|
@@ -119,19 +112,6 @@ function readRecord(value) {
|
|
|
119
112
|
return undefined;
|
|
120
113
|
return value;
|
|
121
114
|
}
|
|
122
|
-
function projectProvinceDecision(decision) {
|
|
123
|
-
// Lawful dispatch/pass discriminant is owned by package-contracts; province
|
|
124
|
-
// wraps undefined into transport_failure while retaining the submission.
|
|
125
|
-
const projected = projectLawfulGatekeeperOutput(decision);
|
|
126
|
-
if (projected === undefined)
|
|
127
|
-
return noUsableReleaseFailure("gatekeeper", decision);
|
|
128
|
-
if (projected.status === "dispatch") {
|
|
129
|
-
return { status: "dispatch", officer: projected.officer };
|
|
130
|
-
}
|
|
131
|
-
// Lawful non-dispatch release — province may pass without dispatching an officer
|
|
132
|
-
// (ADR 0074 gate-non-mandatory; gate-output-guide pass = 正常放行; #597).
|
|
133
|
-
return { status: "pass", findings: projected.findings ?? [] };
|
|
134
|
-
}
|
|
135
115
|
function projectOfficerDecision(officer, decision) {
|
|
136
116
|
const record = readRecord(decision);
|
|
137
117
|
if (record === undefined)
|
|
@@ -163,38 +143,14 @@ function projectOfficerDecision(officer, decision) {
|
|
|
163
143
|
}
|
|
164
144
|
return noUsableReleaseFailure(officer, decision);
|
|
165
145
|
}
|
|
146
|
+
/** Submission-gate summons: subject kind determines the officer without a province child. */
|
|
166
147
|
export async function runGatekeeper(options) {
|
|
167
148
|
const loadSoul = options.loadSoul ?? defaultLoadSoul;
|
|
168
|
-
|
|
169
|
-
try {
|
|
170
|
-
// Seat identity only — shared executor owns model config/registry/auth (#453 / ADR 0018).
|
|
171
|
-
provinceRun = await executeAuditorChild({
|
|
172
|
-
context: options.context,
|
|
173
|
-
roleLabel: "Gatekeeper",
|
|
174
|
-
gateSeat: "gatekeeper",
|
|
175
|
-
systemPrompt: await loadSoul("gatekeeper"),
|
|
176
|
-
prompt: "卷宗已受理。",
|
|
177
|
-
tool: createGatekeeperOutputTool(),
|
|
178
|
-
dossierTool: subjectTool(options.subject),
|
|
179
|
-
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
180
|
-
...(options.runDirectory === undefined ? {} : { runDirectory: options.runDirectory }),
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
catch (error) {
|
|
184
|
-
return { status: "transport_failure", stage: "gatekeeper", reason: failureReason(error) };
|
|
185
|
-
}
|
|
186
|
-
if (provinceRun.noReceiptLifecycle !== undefined) {
|
|
187
|
-
return { status: "no_receipt", stage: "gatekeeper", reason: `${gateSeatLabel("gatekeeper")}未产生已接受回执即散局`, facts: provinceRun.noReceiptLifecycle };
|
|
188
|
-
}
|
|
189
|
-
const province = projectProvinceDecision(provinceRun.decision);
|
|
190
|
-
if (province.status !== "dispatch")
|
|
191
|
-
return province;
|
|
192
|
-
const officer = province.officer;
|
|
149
|
+
const officer = options.subject.kind === "worker_completion" ? "inspector" : "notary";
|
|
193
150
|
try {
|
|
194
|
-
const roleLabel = officer === "inspector" ? "Inspector" : "Notary";
|
|
195
151
|
const officerRun = await executeAuditorChild({
|
|
196
152
|
context: options.context,
|
|
197
|
-
roleLabel,
|
|
153
|
+
roleLabel: officer === "inspector" ? "Inspector" : "Notary",
|
|
198
154
|
gateSeat: officer,
|
|
199
155
|
systemPrompt: await loadSoul(officer),
|
|
200
156
|
prompt: "卷宗已受理。",
|
|
@@ -223,7 +179,7 @@ export async function requireGatekeeperPass(options) {
|
|
|
223
179
|
return;
|
|
224
180
|
if (gatekeeper.status === "transport_failure") {
|
|
225
181
|
// Typed stage/reason/submission ride failInfrastructure → durable tool_result (#475).
|
|
226
|
-
const error = new Error(
|
|
182
|
+
const error = new Error(`交卷闸 transport_failure(${gatekeeper.stage}):${gatekeeper.reason}`);
|
|
227
183
|
error.stage = gatekeeper.stage;
|
|
228
184
|
error.reason = gatekeeper.reason;
|
|
229
185
|
if (gatekeeper.submission !== undefined)
|
|
@@ -8414,14 +8414,7 @@ var INSPECTOR_OUTPUT_TOOL = INSPECTOR_OUTPUT_TOOL_NAME;
|
|
|
8414
8414
|
var NOTARY_OUTPUT_TOOL = "ak_notary_output";
|
|
8415
8415
|
var SUBJECT_TOOL = "ak_gatekeeper_subject";
|
|
8416
8416
|
function gateSeatLabel(stage) {
|
|
8417
|
-
|
|
8418
|
-
case "gatekeeper":
|
|
8419
|
-
return "\u95E8\u4E0B\u7701";
|
|
8420
|
-
case "inspector":
|
|
8421
|
-
return "\u5BDF\u9662";
|
|
8422
|
-
case "notary":
|
|
8423
|
-
return "\u7B26\u5B9D\u90CE";
|
|
8424
|
-
}
|
|
8417
|
+
return stage === "inspector" ? "\u5BDF\u9662" : "\u7B26\u5B9D\u90CE";
|
|
8425
8418
|
}
|
|
8426
8419
|
var GatekeeperEscalationError = class extends Error {
|
|
8427
8420
|
gatekeeper;
|
|
@@ -8466,16 +8459,6 @@ function createOfficerDecisionTool(name) {
|
|
|
8466
8459
|
}
|
|
8467
8460
|
};
|
|
8468
8461
|
}
|
|
8469
|
-
function createGatekeeperOutputTool() {
|
|
8470
|
-
return {
|
|
8471
|
-
name: GATEKEEPER_OUTPUT_TOOL_NAME,
|
|
8472
|
-
description: "\u63D0\u4EA4\u95E8\u4E0B\u7701\u6D3E\u5B98\u51B3\u5B9A\u3002",
|
|
8473
|
-
parameters: gatekeeperDecisionSchema,
|
|
8474
|
-
async execute(_id, args) {
|
|
8475
|
-
return result(`\u5DF2\u6536 ${String(args?.status)}`, args);
|
|
8476
|
-
}
|
|
8477
|
-
};
|
|
8478
|
-
}
|
|
8479
8462
|
async function defaultLoadSoul(role) {
|
|
8480
8463
|
return loadGatekeeperSessionMaterials(role);
|
|
8481
8464
|
}
|
|
@@ -8498,7 +8481,7 @@ function noUsableReleaseFailure(stage, decision) {
|
|
|
8498
8481
|
return {
|
|
8499
8482
|
status: "transport_failure",
|
|
8500
8483
|
stage,
|
|
8501
|
-
reason:
|
|
8484
|
+
reason: "decision \u65E0\u663E\u5F0F pass/bounce/escalate",
|
|
8502
8485
|
submission: retainedSubmission(decision)
|
|
8503
8486
|
};
|
|
8504
8487
|
}
|
|
@@ -8506,14 +8489,6 @@ function readRecord(value) {
|
|
|
8506
8489
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
8507
8490
|
return value;
|
|
8508
8491
|
}
|
|
8509
|
-
function projectProvinceDecision(decision) {
|
|
8510
|
-
const projected = projectLawfulGatekeeperOutput(decision);
|
|
8511
|
-
if (projected === void 0) return noUsableReleaseFailure("gatekeeper", decision);
|
|
8512
|
-
if (projected.status === "dispatch") {
|
|
8513
|
-
return { status: "dispatch", officer: projected.officer };
|
|
8514
|
-
}
|
|
8515
|
-
return { status: "pass", findings: projected.findings ?? [] };
|
|
8516
|
-
}
|
|
8517
8492
|
function projectOfficerDecision(officer, decision) {
|
|
8518
8493
|
const record4 = readRecord(decision);
|
|
8519
8494
|
if (record4 === void 0) return noUsableReleaseFailure(officer, decision);
|
|
@@ -8546,33 +8521,11 @@ function projectOfficerDecision(officer, decision) {
|
|
|
8546
8521
|
}
|
|
8547
8522
|
async function runGatekeeper(options) {
|
|
8548
8523
|
const loadSoul = options.loadSoul ?? defaultLoadSoul;
|
|
8549
|
-
|
|
8550
|
-
try {
|
|
8551
|
-
provinceRun = await executeAuditorChild({
|
|
8552
|
-
context: options.context,
|
|
8553
|
-
roleLabel: "Gatekeeper",
|
|
8554
|
-
gateSeat: "gatekeeper",
|
|
8555
|
-
systemPrompt: await loadSoul("gatekeeper"),
|
|
8556
|
-
prompt: "\u5377\u5B97\u5DF2\u53D7\u7406\u3002",
|
|
8557
|
-
tool: createGatekeeperOutputTool(),
|
|
8558
|
-
dossierTool: subjectTool(options.subject),
|
|
8559
|
-
...options.signal === void 0 ? {} : { signal: options.signal },
|
|
8560
|
-
...options.runDirectory === void 0 ? {} : { runDirectory: options.runDirectory }
|
|
8561
|
-
});
|
|
8562
|
-
} catch (error) {
|
|
8563
|
-
return { status: "transport_failure", stage: "gatekeeper", reason: failureReason(error) };
|
|
8564
|
-
}
|
|
8565
|
-
if (provinceRun.noReceiptLifecycle !== void 0) {
|
|
8566
|
-
return { status: "no_receipt", stage: "gatekeeper", reason: `${gateSeatLabel("gatekeeper")}\u672A\u4EA7\u751F\u5DF2\u63A5\u53D7\u56DE\u6267\u5373\u6563\u5C40`, facts: provinceRun.noReceiptLifecycle };
|
|
8567
|
-
}
|
|
8568
|
-
const province = projectProvinceDecision(provinceRun.decision);
|
|
8569
|
-
if (province.status !== "dispatch") return province;
|
|
8570
|
-
const officer = province.officer;
|
|
8524
|
+
const officer = options.subject.kind === "worker_completion" ? "inspector" : "notary";
|
|
8571
8525
|
try {
|
|
8572
|
-
const roleLabel = officer === "inspector" ? "Inspector" : "Notary";
|
|
8573
8526
|
const officerRun = await executeAuditorChild({
|
|
8574
8527
|
context: options.context,
|
|
8575
|
-
roleLabel,
|
|
8528
|
+
roleLabel: officer === "inspector" ? "Inspector" : "Notary",
|
|
8576
8529
|
gateSeat: officer,
|
|
8577
8530
|
systemPrompt: await loadSoul(officer),
|
|
8578
8531
|
prompt: "\u5377\u5B97\u5DF2\u53D7\u7406\u3002",
|
|
@@ -8597,7 +8550,7 @@ async function requireGatekeeperPass(options) {
|
|
|
8597
8550
|
});
|
|
8598
8551
|
if (gatekeeper.status === "pass") return;
|
|
8599
8552
|
if (gatekeeper.status === "transport_failure") {
|
|
8600
|
-
const error = new Error(`\
|
|
8553
|
+
const error = new Error(`\u4EA4\u5377\u95F8 transport_failure\uFF08${gatekeeper.stage}\uFF09\uFF1A${gatekeeper.reason}`);
|
|
8601
8554
|
error.stage = gatekeeper.stage;
|
|
8602
8555
|
error.reason = gatekeeper.reason;
|
|
8603
8556
|
if (gatekeeper.submission !== void 0) error.submission = gatekeeper.submission;
|
|
@@ -11799,7 +11752,7 @@ var WORKER_SUBMISSION_GATE_RECORD_KIND = WORKER_SUBMISSION_GATE_KIND;
|
|
|
11799
11752
|
var WORKER_COMMIT_BASELINE_ENTRY_TYPE = "commit-baseline";
|
|
11800
11753
|
var WORKER_COMMIT_REMINDER_BOUNCE_ENTRY_TYPE = "commit-reminder-bounce";
|
|
11801
11754
|
var WORKER_PREFIX_REMINDER_BOUNCE_ENTRY_TYPE = "prefix-reminder-bounce";
|
|
11802
|
-
var
|
|
11755
|
+
var WORKER_DONE_STATUSES = /* @__PURE__ */ new Set(["completed", "partially_completed"]);
|
|
11803
11756
|
var HOOK_MARKER = "ak-roles: worker-submission-gates reference-transaction";
|
|
11804
11757
|
var HOOKS_DIR = "ak-roles-hooks";
|
|
11805
11758
|
var HOOK_FILE = "reference-transaction";
|
|
@@ -12005,7 +11958,7 @@ function createWorkerSubmissionGate(options = {}) {
|
|
|
12005
11958
|
throw new WorkerUnfinishedReasonReminderError();
|
|
12006
11959
|
}
|
|
12007
11960
|
}
|
|
12008
|
-
if (baseline === void 0 || root === void 0 || !
|
|
11961
|
+
if (baseline === void 0 || root === void 0 || !WORKER_DONE_STATUSES.has(status)) return;
|
|
12009
11962
|
const now = head(root);
|
|
12010
11963
|
const headMoved = now !== null && (baseline === null || now !== baseline);
|
|
12011
11964
|
if (!headMoved && !reminded) {
|
|
@@ -12197,13 +12150,15 @@ function createFixerRoleRuntime(pi, dependencies, hostActions) {
|
|
|
12197
12150
|
ctx,
|
|
12198
12151
|
toolCallId
|
|
12199
12152
|
);
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
|
|
12206
|
-
|
|
12153
|
+
if (WORKER_DONE_STATUSES.has(output.status)) {
|
|
12154
|
+
await pi.requireGatekeeperPass({
|
|
12155
|
+
context: ctx,
|
|
12156
|
+
subject: { kind: "worker_completion", material: JSON.stringify(output) },
|
|
12157
|
+
..._signal === void 0 ? {} : { signal: _signal },
|
|
12158
|
+
hostActions,
|
|
12159
|
+
toolCallId
|
|
12160
|
+
});
|
|
12161
|
+
}
|
|
12207
12162
|
const acceptedDetails = output;
|
|
12208
12163
|
return {
|
|
12209
12164
|
content: [{ type: "text", text: FIXER_ACCEPTED_TEXT }],
|
|
@@ -12332,13 +12287,15 @@ function createCoderRoleRuntime(pi, dependencies, hostActions) {
|
|
|
12332
12287
|
ctx2,
|
|
12333
12288
|
toolCallId
|
|
12334
12289
|
);
|
|
12335
|
-
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12290
|
+
if (WORKER_DONE_STATUSES.has(output.status)) {
|
|
12291
|
+
await pi.requireGatekeeperPass({
|
|
12292
|
+
context: ctx2,
|
|
12293
|
+
subject: { kind: "worker_completion", material: JSON.stringify(output) },
|
|
12294
|
+
..._signal === void 0 ? {} : { signal: _signal },
|
|
12295
|
+
hostActions,
|
|
12296
|
+
toolCallId
|
|
12297
|
+
});
|
|
12298
|
+
}
|
|
12342
12299
|
const acceptedDetails = output;
|
|
12343
12300
|
return {
|
|
12344
12301
|
content: [{ type: "text", text: CODER_ACCEPTED_TEXT }],
|