@akagilnc/pi-workflow-roles 0.1.3932 → 0.1.3975
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/dist/acp-host/production-host.js +2389 -6018
- package/dist/analyst-gate-cycles-read.js +15 -19
- package/dist/audit-escalation.js +16 -46
- package/dist/auditor-dossier-tool.js +7 -62
- package/dist/collector-identity.js +0 -157
- package/dist/collector-ledger.js +2 -42
- package/dist/compliance-transport.js +40 -14
- package/dist/diarist-contracts.js +2 -40
- package/dist/doctor-contracts.js +39 -108
- package/dist/doctor-evidence.js +1 -5
- package/dist/engine-detour-tool.js +1 -1
- package/dist/gatekeeper-role.js +49 -38
- package/dist/headless-host/production-host.js +4814 -8450
- package/dist/host-contracts.js +0 -5
- package/dist/merger-contracts.js +4 -6
- package/dist/navigator-attendance.js +30 -52
- package/dist/navigator-invocation-identity.js +0 -1
- package/dist/navigator-public-session.js +2 -1
- package/dist/notary-contracts.js +4 -10
- package/dist/package-contracts/auditor-output.js +5 -23
- package/dist/package-contracts/fixer-output.js +25 -49
- package/dist/package-contracts/gatekeeper-output.js +3 -13
- package/dist/package-contracts/navigator-output.js +4 -7
- package/dist/package-contracts/reviewer-output.js +1 -95
- package/dist/package-contracts/terminating-tools.js +33 -144
- package/dist/package-contracts/worker-output.js +1 -3
- package/dist/public-cli/auto-resume.js +30 -68
- package/dist/public-cli/case-dossier-delivery.js +5 -17
- package/dist/public-cli/diarist-run.js +9 -4
- package/dist/public-cli/inspector-run.js +2 -8
- package/dist/public-cli/instruction-seat-run.js +3 -7
- package/dist/public-cli/invocation.js +5 -2
- package/dist/public-cli/main.js +6068 -6964
- package/dist/public-cli/notary-run.js +1 -8
- package/dist/public-cli/post-admission.js +314 -113
- package/dist/public-cli/run-lifecycle.js +14 -38
- package/dist/public-cli/settlement.js +209 -390
- package/dist/public-cli/terminal.js +51 -45
- package/dist/public-role-summons.js +1 -12
- package/dist/reviewer-dispatch.js +12 -258
- package/dist/submission-correctable-error.js +0 -12
- package/dist/submission-errors.js +6 -1
- package/dist/submission-ledger.js +125 -168
- package/dist/ticket-provenance-contracts.js +2 -49
- package/dist/ticket-provenance.js +82 -31
- package/extensions/role-runtime.ts +1 -6
- package/package.json +1 -1
- package/resources/836-deleted-machine-instruction-inventory.md +18 -0
- package/src/acp-host/role-turn-host.ts +8 -3
- package/src/analyst-gate-cycles-read.ts +17 -29
- package/src/audit-escalation.ts +20 -50
- package/src/auditor-dossier-tool.ts +5 -103
- package/src/canonical-skill-binding.ts +3 -2
- package/src/collector-identity.ts +0 -179
- package/src/collector-ledger.ts +3 -46
- package/src/collector-role.ts +32 -61
- package/src/collector-tool-schemas.ts +20 -14
- package/src/compliance-transport.ts +55 -17
- package/src/countersign-role.ts +17 -8
- package/src/diarist-contracts.ts +3 -36
- package/src/diarist-role.ts +13 -7
- package/src/diarist.ts +4 -16
- package/src/doctor-contracts.ts +73 -94
- package/src/doctor-evidence.ts +1 -1
- package/src/doctor-role.ts +3 -3
- package/src/engine-detour-tool.ts +4 -1
- package/src/external-host-turn-loop.ts +9 -3
- package/src/gatekeeper-pass-envelope.ts +7 -12
- package/src/gatekeeper-role.ts +56 -50
- package/src/gleaner-left-role.ts +4 -2
- package/src/headless-host/role-turn-host.ts +4 -5
- package/src/host-contracts.ts +3 -8
- package/src/judge-role.ts +19 -13
- package/src/merger-contracts.ts +10 -6
- package/src/merger-role.ts +1 -5
- package/src/navigator-attendance.ts +37 -74
- package/src/navigator-invocation-identity.ts +0 -6
- package/src/navigator-public-session.ts +2 -1
- package/src/notary-contracts.ts +7 -10
- package/src/package-contracts/auditor-output.ts +4 -21
- package/src/package-contracts/fixer-output.ts +34 -52
- package/src/package-contracts/gatekeeper-output.ts +5 -22
- package/src/package-contracts/navigator-output.ts +7 -7
- package/src/package-contracts/reviewer-output.ts +2 -150
- package/src/package-contracts/terminating-tools.ts +32 -147
- package/src/package-contracts/worker-output.ts +0 -1
- package/src/pi/adapter.ts +3 -8
- package/src/public-cli/auto-resume.ts +41 -94
- package/src/public-cli/case-dossier-delivery.ts +5 -15
- package/src/public-cli/countersign-run.ts +14 -6
- package/src/public-cli/diarist-run.ts +11 -9
- package/src/public-cli/inspector-run.ts +2 -18
- package/src/public-cli/instruction-seat-run.ts +3 -17
- package/src/public-cli/invocation.ts +5 -2
- package/src/public-cli/merger-run.ts +1 -1
- package/src/public-cli/notary-run.ts +1 -18
- package/src/public-cli/post-admission.ts +385 -115
- package/src/public-cli/run-lifecycle.ts +13 -44
- package/src/public-cli/settlement.ts +314 -562
- package/src/public-cli/terminal.ts +66 -72
- package/src/public-role-summons.ts +5 -30
- package/src/reviewer-dispatch.ts +29 -331
- package/src/reviewer-role.ts +16 -83
- package/src/role-envelope.ts +16 -24
- package/src/role-runtime-dependencies.ts +1 -6
- package/src/role-runtime.ts +65 -201
- package/src/submission-correctable-error.ts +0 -14
- package/src/submission-errors.ts +6 -1
- package/src/submission-ledger.ts +187 -187
- package/src/ticket-provenance-contracts.ts +4 -60
- package/src/ticket-provenance.ts +98 -32
- package/src/worker-role.ts +35 -36
- package/dist/activation-ledger-session.js +0 -105
- package/dist/activation-ledger.js +0 -139
- package/dist/activation-trace.js +0 -33
- package/dist/atomic-write.js +0 -23
- package/dist/auditor-role.js +0 -12
- package/dist/canonical-skill-binding.js +0 -61
- package/dist/collector-handbook.js +0 -142
- package/dist/collector-receipt.js +0 -107
- package/dist/collector-role.js +0 -566
- package/dist/collector-tool-schemas.js +0 -107
- package/dist/countersign-role.js +0 -28
- package/dist/diarist-role.js +0 -44
- package/dist/diarist.js +0 -66
- package/dist/doctor-role.js +0 -75
- package/dist/fixer-bash-seatbelt.js +0 -13
- package/dist/gatekeeper-pass-envelope.js +0 -77
- package/dist/gleaner-left-role.js +0 -26
- package/dist/inspector-role.js +0 -29
- package/dist/judge-role.js +0 -104
- package/dist/merger-role.js +0 -55
- package/dist/navigator-role.js +0 -12
- package/dist/notary-role.js +0 -134
- package/dist/oauth-keepalive.js +0 -158
- package/dist/pi/adapter.js +0 -223
- package/dist/reviewer-agent.js +0 -122
- package/dist/reviewer-child-executor.js +0 -194
- package/dist/reviewer-construction.js +0 -103
- package/dist/reviewer-execution-ledger.js +0 -166
- package/dist/reviewer-failure-diagnostic.js +0 -17
- package/dist/reviewer-role.js +0 -159
- package/dist/reviewer-scope-prompt.js +0 -21
- package/dist/reviewer-settlement.js +0 -66
- package/dist/reviewer-workspace.js +0 -132
- package/dist/role-runtime.js +0 -1604
- package/dist/stderr-jsonl.js +0 -26
- package/dist/tool-execution-observation.js +0 -141
- package/dist/worker-role.js +0 -345
- package/dist/worker-submission-gates.js +0 -305
- package/src/collector-receipt.ts +0 -140
- package/src/diagnostic-tail.ts +0 -18
- package/src/reviewer-agent.ts +0 -135
- package/src/reviewer-child-executor.ts +0 -252
- package/src/reviewer-construction.ts +0 -195
- package/src/reviewer-execution-ledger.ts +0 -212
- package/src/reviewer-failure-diagnostic.ts +0 -18
- package/src/reviewer-scope-prompt.ts +0 -24
- package/src/reviewer-settlement.ts +0 -74
- package/src/reviewer-workspace.ts +0 -105
- package/src/shape-unreadable-failure.ts +0 -49
package/dist/countersign-role.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Type } from "typebox";
|
|
2
|
-
import { stringEnum } from "./host-contracts.js";
|
|
3
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
4
|
-
import { COUNTERSIGN_OUTPUT_TOOL_NAME, validateRecordedCountersignOutput, } from "./countersign-contracts.js";
|
|
5
|
-
export { COUNTERSIGN_ACCEPTED_TEXT, COUNTERSIGN_OUTPUT_TOOL_NAME } from "./countersign-contracts.js";
|
|
6
|
-
/** 给事中票庭审读五问的交卷形状(ADR 0074);形状指引,非 schema 闸。 */
|
|
7
|
-
export const countersignVerdictSchema = withInfrastructureFailureDeclaration(Type.Object({
|
|
8
|
-
countersignStatus: stringEnum(["converged", "continue", "escalate"], { description: "converged | continue | escalate" }),
|
|
9
|
-
fix: Type.Optional(Type.Object({ summary: Type.String({ minLength: 1, description: "退回摘要" }) }, { additionalProperties: false, description: "退回说明" })),
|
|
10
|
-
note: Type.Optional(Type.String({ minLength: 1, description: "附注" })),
|
|
11
|
-
evidence: Type.Optional(Type.Unknown({ description: "留存证据" })),
|
|
12
|
-
decisionGate: Type.Optional(Type.Object({
|
|
13
|
-
question: Type.String({ minLength: 1 }),
|
|
14
|
-
options: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
|
|
15
|
-
}, { additionalProperties: false, description: "需陛下处置的问题与选项" })),
|
|
16
|
-
}, { additionalProperties: true }));
|
|
17
|
-
countersignVerdictSchema.required = [];
|
|
18
|
-
/**
|
|
19
|
-
* 决定工具规格。生命周期装配(注册、activate、prompt 注入、singleton 检查、
|
|
20
|
-
* terminate)归注册信封 owner——src/role-runtime.ts(ADR 0018 / #572 R2 判词)。
|
|
21
|
-
*/
|
|
22
|
-
export const COUNTERSIGN_TOOL_SPEC = {
|
|
23
|
-
name: COUNTERSIGN_OUTPUT_TOOL_NAME,
|
|
24
|
-
label: "给事中输出",
|
|
25
|
-
description: "给事中决议。",
|
|
26
|
-
promptSnippet: "给事中决议",
|
|
27
|
-
parameters: countersignVerdictSchema,
|
|
28
|
-
};
|
package/dist/diarist-role.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Type } from "typebox";
|
|
2
|
-
import { openToolObject } from "./open-tool-schema.js";
|
|
3
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
4
|
-
import { DIARIST_OUTPUT_TOOL_NAME, validateRecordedDiaristOutput, } from "./diarist-contracts.js";
|
|
5
|
-
export { DIARIST_ACCEPTED_TEXT, DIARIST_OUTPUT_TOOL_NAME, } from "./diarist-contracts.js";
|
|
6
|
-
export { validateRecordedDiaristOutput };
|
|
7
|
-
/** 起居郎交卷形状;形状指引,非 schema 闸。 */
|
|
8
|
-
export const diaristOutputSchema = withInfrastructureFailureDeclaration(openToolObject(Type.Object({
|
|
9
|
-
status: Type.Unknown({
|
|
10
|
-
description: "completed | escalate — 形状指引,非 schema 闸",
|
|
11
|
-
}),
|
|
12
|
-
ticketNumber: Type.Optional(Type.Unknown({
|
|
13
|
-
description: "本庭对象票号(正整数)或 null/省略=真无票;下游走 typed 键;认不出用 status=escalate,不洗成无录。机械层不重判。",
|
|
14
|
-
})),
|
|
15
|
-
reason: Type.Optional(Type.String({
|
|
16
|
-
description: "status 为 escalate 时:认不出本庭对象的原因",
|
|
17
|
-
})),
|
|
18
|
-
entries: Type.Optional(Type.Array(Type.Object({
|
|
19
|
-
sourceKind: Type.String({
|
|
20
|
-
description: "来源族:cc-session | issue-body-comment | adr-decision-key | ticket-decree-block",
|
|
21
|
-
}),
|
|
22
|
-
sourceRef: Type.Object({
|
|
23
|
-
sessionFile: Type.Optional(Type.String()),
|
|
24
|
-
entryId: Type.Optional(Type.Unknown()),
|
|
25
|
-
path: Type.Optional(Type.String()),
|
|
26
|
-
url: Type.Optional(Type.String()),
|
|
27
|
-
}, { additionalProperties: true, description: "不可变源指针" }),
|
|
28
|
-
transcript: Type.String({
|
|
29
|
-
description: "整块原文(誊录整块,不指针化)",
|
|
30
|
-
}),
|
|
31
|
-
timestamp: Type.String({ description: "源时间戳 ISO" }),
|
|
32
|
-
note: Type.Optional(Type.String({ description: "该材料与本案的关系(人读)" })),
|
|
33
|
-
}, { additionalProperties: true, description: "一条入录整块" }), { description: "入录整块;空列表合法完局;escalate 时可不交" })),
|
|
34
|
-
})));
|
|
35
|
-
/**
|
|
36
|
-
* 决定工具规格。生命周期装配归注册信封 owner——src/role-runtime.ts(ADR 0018)。
|
|
37
|
-
*/
|
|
38
|
-
export const DIARIST_TOOL_SPEC = {
|
|
39
|
-
name: DIARIST_OUTPUT_TOOL_NAME,
|
|
40
|
-
label: "起居郎输出",
|
|
41
|
-
description: "起居郎入录整块与本票身份断言;认不出本庭对象则 escalate。",
|
|
42
|
-
promptSnippet: "起居郎入录整块与本票身份",
|
|
43
|
-
parameters: diaristOutputSchema,
|
|
44
|
-
};
|
package/dist/diarist.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 起居郎 volume commit — ADR 0075 `diarist-is-role` / #779.
|
|
3
|
-
* Semantic collection is the diarist role's own LLM turn (finds materials itself).
|
|
4
|
-
* This module only appends submitted whole blocks idempotently and refreshes the
|
|
5
|
-
* human view. No frozen catalog, no quote reverse-verify, no ticket-number
|
|
6
|
-
* re-judgment of LLM output (#779 owner: 机械层凭什么能判断llm的输出).
|
|
7
|
-
* No lifecycle here (ADR 0018): the seat prepares, the role envelope commits.
|
|
8
|
-
*/
|
|
9
|
-
import { appendTicketProvenanceEntry, ensureTicketProvenanceVolume, readTicketProvenance, writeTicketProvenanceHumanView, } from "./ticket-provenance.js";
|
|
10
|
-
import { projectTicketProvenanceEntry } from "./ticket-provenance-contracts.js";
|
|
11
|
-
/**
|
|
12
|
-
* Append LLM-submitted whole blocks under a bound ticket.
|
|
13
|
-
* Entry identity keeps the volume idempotent across re-summons.
|
|
14
|
-
* Shape projection is write-seam self-check only — not content judgment (#779).
|
|
15
|
-
*/
|
|
16
|
-
export async function commitDiaristEntries(input) {
|
|
17
|
-
const { ticketNumber, cwd } = input;
|
|
18
|
-
const homeOpt = input.home === undefined ? {} : { home: input.home };
|
|
19
|
-
const volumePaths = ensureTicketProvenanceVolume(ticketNumber, cwd, input.home);
|
|
20
|
-
const before = await readTicketProvenance(ticketNumber, cwd, input.home);
|
|
21
|
-
let dropped = 0;
|
|
22
|
-
for (const submitted of input.entries) {
|
|
23
|
-
const entry = projectTicketProvenanceEntry({
|
|
24
|
-
basis: {
|
|
25
|
-
method: "llm-semantic",
|
|
26
|
-
anchors: [`#${ticketNumber}`],
|
|
27
|
-
...(submitted.note === undefined ? {} : { note: submitted.note }),
|
|
28
|
-
},
|
|
29
|
-
sourceKind: submitted.sourceKind,
|
|
30
|
-
sourceRef: submitted.sourceRef,
|
|
31
|
-
transcript: submitted.transcript,
|
|
32
|
-
timestamp: submitted.timestamp,
|
|
33
|
-
});
|
|
34
|
-
if (entry === undefined) {
|
|
35
|
-
dropped += 1;
|
|
36
|
-
continue;
|
|
37
|
-
}
|
|
38
|
-
appendTicketProvenanceEntry({
|
|
39
|
-
ticketNumber,
|
|
40
|
-
cwd,
|
|
41
|
-
...homeOpt,
|
|
42
|
-
entry,
|
|
43
|
-
source: "diarist",
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
const volume = await readTicketProvenance(ticketNumber, cwd, input.home);
|
|
47
|
-
const humanViewFile = writeTicketProvenanceHumanView({
|
|
48
|
-
ticketNumber,
|
|
49
|
-
cwd,
|
|
50
|
-
...homeOpt,
|
|
51
|
-
entries: volume.entries,
|
|
52
|
-
});
|
|
53
|
-
const appended = volume.entries.length - before.entries.length;
|
|
54
|
-
return {
|
|
55
|
-
ticketNumber,
|
|
56
|
-
appended,
|
|
57
|
-
dropped,
|
|
58
|
-
volumeRecordFile: volumePaths.recordFile,
|
|
59
|
-
humanViewFile,
|
|
60
|
-
collectorStatus: appended > 0
|
|
61
|
-
? "ok"
|
|
62
|
-
: input.entries.length === 0
|
|
63
|
-
? "empty-selection"
|
|
64
|
-
: "nothing-appended",
|
|
65
|
-
};
|
|
66
|
-
}
|
package/dist/doctor-role.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { disposeComplianceDecision } from "./audit-escalation.js";
|
|
2
|
-
import { ComplianceResponseRetentionError } from "./compliance-transport.js";
|
|
3
|
-
import { joinReadableGateItems } from "./readable-gate-item.js";
|
|
4
|
-
import { DOCTOR_CANDIDATE_ENTRY_TYPE } from "./dossier-resolution.js";
|
|
5
|
-
import { DOCTOR_ACCEPTED_AUDIT_NO_RECEIPT_TEXT, DOCTOR_ACCEPTED_TEXT, DOCTOR_EVIDENCE_TOOL_NAME, DOCTOR_OUTPUT_TOOL_DESCRIPTION, DOCTOR_OUTPUT_TOOL_NAME, DoctorEvidenceStore, doctorEvidenceReadSchema, doctorSubmissionSchema, validateDoctorOutput } from "./doctor-contracts.js";
|
|
6
|
-
import { sitianReport } from "./sitian-facade.js";
|
|
7
|
-
export { DOCTOR_EVIDENCE_TOOL_NAME, DOCTOR_OUTPUT_TOOL_NAME };
|
|
8
|
-
export const DOCTOR_CASE_FLAG = { name: "ak-doctor-case", definition: { description: "Retained .ak-roles/books/<book>/issues/<n>/runs directory", type: "string" } };
|
|
9
|
-
function appendCandidate(ctx, data) {
|
|
10
|
-
try {
|
|
11
|
-
sitianReport({
|
|
12
|
-
level: "event",
|
|
13
|
-
kind: "candidate",
|
|
14
|
-
cwd: ctx.cwd,
|
|
15
|
-
sessionParent: ctx.sessionManager.getSessionFile(),
|
|
16
|
-
payload: data,
|
|
17
|
-
source: "doctor-role",
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
throw new ComplianceResponseRetentionError(`太医署候选留存失败: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
22
|
-
}
|
|
23
|
-
const append = ctx.sessionManager.appendCustomEntry;
|
|
24
|
-
if (typeof append === "function") {
|
|
25
|
-
try {
|
|
26
|
-
append.call(ctx.sessionManager, DOCTOR_CANDIDATE_ENTRY_TYPE, data);
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
throw new ComplianceResponseRetentionError(`太医署候选留存失败: ${error instanceof Error ? error.message : String(error)}`, { cause: error });
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export function createDoctorRoleRuntime(pi, dependencies, host) {
|
|
34
|
-
let activation;
|
|
35
|
-
let registered = false;
|
|
36
|
-
pi.registerFlag(DOCTOR_CASE_FLAG.name, DOCTOR_CASE_FLAG.definition);
|
|
37
|
-
return { async activate() {
|
|
38
|
-
const path = pi.getFlag(DOCTOR_CASE_FLAG.name);
|
|
39
|
-
if (typeof path !== "string" || !path.trim())
|
|
40
|
-
throw new Error("Doctor requires --ak-doctor-case");
|
|
41
|
-
const soul = (await dependencies.loadSoul()).trim();
|
|
42
|
-
if (!soul)
|
|
43
|
-
throw new Error("Doctor soul is empty");
|
|
44
|
-
const patient = await dependencies.loadCase(path);
|
|
45
|
-
activation = { soul, patient, store: new DoctorEvidenceStore(patient) };
|
|
46
|
-
if (!registered) {
|
|
47
|
-
registered = true;
|
|
48
|
-
pi.registerTool({ name: DOCTOR_EVIDENCE_TOOL_NAME, label: "太医署证据", description: "分页读取留存的 Pi session 字节。", parameters: doctorEvidenceReadSchema, async execute(_id, params) { if (!activation)
|
|
49
|
-
throw new Error("太医署未激活"); const details = activation.store.read(params.evidenceId, params.offset, params.limit); return { content: [{ type: "text", text: JSON.stringify(details) }], details }; } });
|
|
50
|
-
pi.registerTool({ name: DOCTOR_OUTPUT_TOOL_NAME, label: "太医署输出", description: DOCTOR_OUTPUT_TOOL_DESCRIPTION, parameters: doctorSubmissionSchema, async execute(id, params, signal, _update, ctx) { if (!activation)
|
|
51
|
-
throw new Error("太医署未激活"); const testimony = validateDoctorOutput(params, activation.patient, activation.store); try {
|
|
52
|
-
appendCandidate(ctx, { version: 1, testimony, readRecord: activation.store.readRecord(), patientIdentity: activation.patient.identity });
|
|
53
|
-
}
|
|
54
|
-
catch (error) {
|
|
55
|
-
host.failInfrastructure(error, ctx, id);
|
|
56
|
-
} let audit; try {
|
|
57
|
-
audit = await dependencies.auditCompliance(signal === undefined ? { context: ctx } : { context: ctx, signal });
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
host.failInfrastructure(error, ctx, id);
|
|
61
|
-
} const details = testimony.status === "completed" ? { ...testimony, cost: activation.patient.cost } : testimony; const acceptedDetails = details; return disposeComplianceDecision(audit, { pass: (usage) => ({ content: [{ type: "text", text: DOCTOR_ACCEPTED_TEXT }], details: acceptedDetails, terminate: true, ...(usage === undefined ? {} : { usage }) }), noReceipt: (auditNoReceipt, usageProjection) => ({ content: [{ type: "text", text: DOCTOR_ACCEPTED_AUDIT_NO_RECEIPT_TEXT }], details: { ...acceptedDetails, auditNoReceipt }, terminate: true, ...usageProjection }), received: (auditReceived, usageProjection) => ({ content: [{ type: "text", text: DOCTOR_ACCEPTED_TEXT }], details: { ...acceptedDetails, audit: auditReceived.reply }, terminate: true, ...usageProjection }), bounce: (violations) => { throw new Error(`太医署回执违 soul:${joinReadableGateItems(violations)}`); }, escalate: (result) => result }, acceptedDetails); } });
|
|
62
|
-
pi.on("before_agent_start", (event) => { if (!activation)
|
|
63
|
-
throw new Error("太医署未激活"); const catalog = { version: activation.patient.version, identity: activation.patient.identity, admittedMetrics: { provenance: "由留存 session 字节推导,封入受理回执。", cost: activation.patient.cost }, lawfulTargetKeys: ["case", ...activation.patient.cost.invocations.sources], evidence: activation.patient.evidence.map(({ id, kind, sha256, byteLength, contentLength }) => ({ id, kind, sha256, byteLength, contentLength })) }; return { systemPrompt: `${event.systemPrompt}\n\n<doctor_soul>\n${activation.soul}\n</doctor_soul>\n\n<doctor_case>\n${JSON.stringify(catalog)}\n</doctor_case>` }; });
|
|
64
|
-
}
|
|
65
|
-
const required = [DOCTOR_EVIDENCE_TOOL_NAME, DOCTOR_OUTPUT_TOOL_NAME];
|
|
66
|
-
const names = pi.getAllTools().map((tool) => tool.name);
|
|
67
|
-
for (const name of required)
|
|
68
|
-
if (names.filter((item) => item === name).length !== 1)
|
|
69
|
-
throw new Error(`Doctor required tool collision or missing: ${name}`);
|
|
70
|
-
pi.setActiveTools(required);
|
|
71
|
-
const active = pi.getActiveTools?.() ?? required;
|
|
72
|
-
if (active.length !== 2 || !required.every((name) => active.includes(name)))
|
|
73
|
-
throw new Error("Doctor active tool narrowing failed");
|
|
74
|
-
} };
|
|
75
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Exact case-sensitive substring literals blocked on Fixer bash (ADR 0008). */
|
|
2
|
-
export const FIXER_BASH_FORBIDDEN_LITERALS = [
|
|
3
|
-
"rm -rf",
|
|
4
|
-
"git reset --hard",
|
|
5
|
-
"git clean",
|
|
6
|
-
"git checkout --",
|
|
7
|
-
];
|
|
8
|
-
export function matchFixerBashForbiddenLiteral(command) {
|
|
9
|
-
return FIXER_BASH_FORBIDDEN_LITERALS.find((literal) => command.includes(literal));
|
|
10
|
-
}
|
|
11
|
-
export function fixerBashSeatbeltDenyReason(matched) {
|
|
12
|
-
return `修内司 bash 拦截:命中禁用字面量 ${matched}`;
|
|
13
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { bookDirectOfficerRunPointer } from "./archivist-record-entry.js";
|
|
2
|
-
import { GatekeeperDecisionError, OFFICER_CONCLUSION_REASK, projectGatekeeperRun, } from "./gatekeeper-role.js";
|
|
3
|
-
import { sessionFileFromPublicSummon } from "./session-assistant-usage.js";
|
|
4
|
-
/**
|
|
5
|
-
* Book a typed pointer under parent session/auditor-roles (archivist-owned write).
|
|
6
|
-
* Offline mocks without a real session leave no nested volume (lawful zero).
|
|
7
|
-
*/
|
|
8
|
-
function bookDirectOfficerPointer(context, officer, result, summoned) {
|
|
9
|
-
if (result.status !== "pass"
|
|
10
|
-
&& result.status !== "bounce"
|
|
11
|
-
&& result.status !== "escalate"
|
|
12
|
-
&& result.status !== "needs_reask") {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
const parentFile = context.sessionManager?.getSessionFile?.();
|
|
16
|
-
if (typeof parentFile !== "string" || parentFile.trim() === "")
|
|
17
|
-
return;
|
|
18
|
-
const sessionFile = sessionFileFromPublicSummon(summoned);
|
|
19
|
-
if (sessionFile === undefined) {
|
|
20
|
-
// No independent 正本 to point at — do not synthesize a parallel session.
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
bookDirectOfficerRunPointer({
|
|
24
|
-
parentSessionFile: parentFile,
|
|
25
|
-
officer,
|
|
26
|
-
sessionFile,
|
|
27
|
-
...(typeof summoned.runDirectory === "string" && summoned.runDirectory.trim() !== ""
|
|
28
|
-
? { runDirectory: summoned.runDirectory }
|
|
29
|
-
: {}),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Shared envelope: project gate, book officer pointer, map onto host actions.
|
|
34
|
-
* Review loop has no round cap (#753 no-round-cap).
|
|
35
|
-
*/
|
|
36
|
-
export async function requireGatekeeperPass(options) {
|
|
37
|
-
let reask;
|
|
38
|
-
// No round cap — end only on pass, bounce/escalate-to-parent, or real failure.
|
|
39
|
-
for (;;) {
|
|
40
|
-
const projected = await projectGatekeeperRun({
|
|
41
|
-
context: options.context,
|
|
42
|
-
subject: options.subject,
|
|
43
|
-
...(options.signal === undefined ? {} : { signal: options.signal }),
|
|
44
|
-
...(options.summonOfficer === undefined ? {} : { summonOfficer: options.summonOfficer }),
|
|
45
|
-
...(reask === undefined ? {} : { reask }),
|
|
46
|
-
});
|
|
47
|
-
const gatekeeper = projected.result;
|
|
48
|
-
// Envelope-owned pointer book. Failure is host infrastructure — single face.
|
|
49
|
-
if (projected.summoned !== undefined) {
|
|
50
|
-
try {
|
|
51
|
-
bookDirectOfficerPointer(options.context, projected.officer, gatekeeper, projected.summoned);
|
|
52
|
-
}
|
|
53
|
-
catch (error) {
|
|
54
|
-
options.hostActions.failInfrastructure(error, options.context, options.toolCallId);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (gatekeeper.status === "pass")
|
|
58
|
-
return;
|
|
59
|
-
if (gatekeeper.status === "needs_reask") {
|
|
60
|
-
// Resume the speaker with plain-language re-ask — never bounce the parent (#753).
|
|
61
|
-
reask = OFFICER_CONCLUSION_REASK;
|
|
62
|
-
continue;
|
|
63
|
-
}
|
|
64
|
-
if (gatekeeper.status === "transport_failure") {
|
|
65
|
-
const error = new Error(`交卷闸 transport_failure(${gatekeeper.stage}):${gatekeeper.reason}`);
|
|
66
|
-
error.stage = gatekeeper.stage;
|
|
67
|
-
error.reason = gatekeeper.reason;
|
|
68
|
-
if (gatekeeper.submission !== undefined)
|
|
69
|
-
error.submission = gatekeeper.submission;
|
|
70
|
-
options.hostActions.failInfrastructure(error, options.context, options.toolCallId);
|
|
71
|
-
}
|
|
72
|
-
// bounce | escalate | no_receipt: raw receipt (or lifecycle fact) back to parent.
|
|
73
|
-
// escalate is NOT thrown as parent next-step — parent reads the officer words (#753).
|
|
74
|
-
options.hostActions.bindSubmissionNonPass(options.toolCallId, gatekeeper);
|
|
75
|
-
throw new GatekeeperDecisionError(gatekeeper);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Type } from "typebox";
|
|
2
|
-
import { openToolObject } from "./open-tool-schema.js";
|
|
3
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
4
|
-
import { GLEANER_LEFT_OUTPUT_TOOL_NAME, validateRecordedGleanerLeftOutput, } from "./gleaner-left-contracts.js";
|
|
5
|
-
export { GLEANER_LEFT_ACCEPTED_TEXT, GLEANER_LEFT_OUTPUT_TOOL_NAME, } from "./gleaner-left-contracts.js";
|
|
6
|
-
export { validateRecordedGleanerLeftOutput };
|
|
7
|
-
/** 左拾遗弹章交卷形状;形状指引,非 schema 闸。 */
|
|
8
|
-
export const gleanerLeftOutputSchema = withInfrastructureFailureDeclaration(openToolObject(Type.Object({
|
|
9
|
-
status: Type.Unknown({
|
|
10
|
-
description: "completed — 形状指引,非 schema 闸",
|
|
11
|
-
}),
|
|
12
|
-
findings: Type.Array(Type.Object({
|
|
13
|
-
pointer: Type.String({ description: "文件/行指针" }),
|
|
14
|
-
statement: Type.String({ description: "疑点陈述" }),
|
|
15
|
-
}, { additionalProperties: true, description: "一条弹章" }), { description: "弹章列表;空列表合法完局" }),
|
|
16
|
-
})));
|
|
17
|
-
/**
|
|
18
|
-
* 决定工具规格。生命周期装配归注册信封 owner——src/role-runtime.ts(ADR 0018)。
|
|
19
|
-
*/
|
|
20
|
-
export const GLEANER_LEFT_TOOL_SPEC = {
|
|
21
|
-
name: GLEANER_LEFT_OUTPUT_TOOL_NAME,
|
|
22
|
-
label: "左拾遗输出",
|
|
23
|
-
description: "左拾遗弹章。",
|
|
24
|
-
promptSnippet: "左拾遗弹章",
|
|
25
|
-
parameters: gleanerLeftOutputSchema,
|
|
26
|
-
};
|
package/dist/inspector-role.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Type } from "typebox";
|
|
2
|
-
import { openToolObject } from "./open-tool-schema.js";
|
|
3
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
4
|
-
import { INSPECTOR_ACCEPTED_TEXT, INSPECTOR_OUTPUT_TOOL_NAME, validateRecordedInspectorOutput, } from "./inspector-contracts.js";
|
|
5
|
-
export { INSPECTOR_ACCEPTED_TEXT, INSPECTOR_OUTPUT_TOOL_NAME, };
|
|
6
|
-
export { INSPECTOR_OUTPUT_TOOL_NAME as INSPECTOR_OUTPUT_TOOL };
|
|
7
|
-
export { validateRecordedInspectorOutput };
|
|
8
|
-
/** 察院事后察举交卷形状;形状指引,非 schema 闸。 */
|
|
9
|
-
export const inspectorOutputSchema = withInfrastructureFailureDeclaration(openToolObject(Type.Object({
|
|
10
|
-
status: Type.Unknown({
|
|
11
|
-
description: "pass | bounce | escalate — 形状指引,非 schema 闸",
|
|
12
|
-
}),
|
|
13
|
-
findings: Type.Unknown({
|
|
14
|
-
description: "随交卷留存的问题记录",
|
|
15
|
-
}),
|
|
16
|
-
reason: Type.Optional(Type.Unknown({
|
|
17
|
-
description: "status 为 escalate 时的上呈理由",
|
|
18
|
-
})),
|
|
19
|
-
})));
|
|
20
|
-
/**
|
|
21
|
-
* 决定工具规格。生命周期装配归注册信封 owner——src/role-runtime.ts(ADR 0018)。
|
|
22
|
-
*/
|
|
23
|
-
export const INSPECTOR_TOOL_SPEC = {
|
|
24
|
-
name: INSPECTOR_OUTPUT_TOOL_NAME,
|
|
25
|
-
label: "察院输出",
|
|
26
|
-
description: "察院终局回执,状态为 pass、bounce 或 escalate。",
|
|
27
|
-
promptSnippet: "察院终局回执",
|
|
28
|
-
parameters: inspectorOutputSchema,
|
|
29
|
-
};
|
package/dist/judge-role.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { stringEnum } from "./host-contracts.js";
|
|
2
|
-
import { Type } from "typebox";
|
|
3
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
4
|
-
import { ParentQueueReaskError } from "./submission-errors.js";
|
|
5
|
-
import { JUDGE_ACCEPTED_TEXT, JUDGE_OUTPUT_TOOL_NAME, validateAcceptedJudgeDetails, } from "./package-contracts/judge-output.js";
|
|
6
|
-
const JUDGE_QUEUE_STATUSES = new Set(["converged", "continue", "escalate"]);
|
|
7
|
-
const JUDGE_STATUS_REASK = "judgeStatus 不是 converged、continue、escalate 三态之一。请重新交卷,status 写明其一。";
|
|
8
|
-
export { JUDGE_OUTPUT_TOOL_NAME };
|
|
9
|
-
export const judgeVerdictSchema = withInfrastructureFailureDeclaration(Type.Object({
|
|
10
|
-
judgeStatus: stringEnum(["converged", "continue", "escalate"], { description: "converged | continue | escalate — 形状指引,非 schema 闸" }),
|
|
11
|
-
fix: Type.Optional(Type.Object({ summary: Type.String({ minLength: 1, description: "continue 时的补救摘要" }) }, { additionalProperties: false, description: "continue 时的补救说明" })),
|
|
12
|
-
classes: Type.Optional(Type.Array(Type.Object({
|
|
13
|
-
name: Type.String({ minLength: 1 }),
|
|
14
|
-
owner: Type.String({ minLength: 1 }),
|
|
15
|
-
boundary: Type.String({ minLength: 1 }),
|
|
16
|
-
disposition: Type.String({ minLength: 1 }),
|
|
17
|
-
}, { additionalProperties: false }), { minItems: 1, description: "已裁决 finding 类及其 owner 与修理边界" })),
|
|
18
|
-
note: Type.Optional(Type.String({ minLength: 1, description: "可选裁决附注" })),
|
|
19
|
-
evidence: Type.Optional(Type.Unknown({ description: "留存的裁决证据" })),
|
|
20
|
-
decisionGate: Type.Optional(Type.Object({
|
|
21
|
-
question: Type.String({ minLength: 1 }),
|
|
22
|
-
options: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
|
|
23
|
-
}, { additionalProperties: false, description: "需人权威处置的问题与选项" })),
|
|
24
|
-
}, { additionalProperties: true }));
|
|
25
|
-
judgeVerdictSchema.required = [];
|
|
26
|
-
export function validateVerdict(verdict) {
|
|
27
|
-
return validateAcceptedJudgeDetails(verdict);
|
|
28
|
-
}
|
|
29
|
-
export function createJudgeRoleRuntime(pi, dependencies, hostActions) {
|
|
30
|
-
let soul;
|
|
31
|
-
let lifecycleRegistered = false;
|
|
32
|
-
return {
|
|
33
|
-
async activate() {
|
|
34
|
-
soul = (await dependencies.loadSoul()).trim();
|
|
35
|
-
if (soul.length === 0)
|
|
36
|
-
throw new Error("Judge soul is empty");
|
|
37
|
-
if (!lifecycleRegistered) {
|
|
38
|
-
lifecycleRegistered = true;
|
|
39
|
-
pi.registerTool({
|
|
40
|
-
name: JUDGE_OUTPUT_TOOL_NAME,
|
|
41
|
-
label: "大理寺输出",
|
|
42
|
-
description: "提交大理寺终局判词;受理前经符宝郎内闸与审刑院合规审核。",
|
|
43
|
-
promptSnippet: "提交大理寺终局判词",
|
|
44
|
-
parameters: judgeVerdictSchema,
|
|
45
|
-
async execute(toolCallId, parameters, signal, _onUpdate, ctx) {
|
|
46
|
-
if (soul === undefined)
|
|
47
|
-
throw new Error("大理寺职分未装载");
|
|
48
|
-
// #756 queue: read judgeStatus only — escalate skips gates (thrown to caller);
|
|
49
|
-
// unreadable status returns to judge; else 符宝郎内闸 then 审刑院合规.
|
|
50
|
-
const rawStatus = parameters !== null && typeof parameters === "object" && !Array.isArray(parameters)
|
|
51
|
-
&& typeof parameters.judgeStatus === "string"
|
|
52
|
-
? parameters.judgeStatus
|
|
53
|
-
: undefined;
|
|
54
|
-
if (rawStatus === undefined || !JUDGE_QUEUE_STATUSES.has(rawStatus)) {
|
|
55
|
-
throw new ParentQueueReaskError(JUDGE_STATUS_REASK);
|
|
56
|
-
}
|
|
57
|
-
if (rawStatus === "escalate") {
|
|
58
|
-
// Parent escalate → throw to caller as-is; officers do not attend (#753 / #756).
|
|
59
|
-
const verdict = validateVerdict(parameters);
|
|
60
|
-
return {
|
|
61
|
-
content: [{ type: "text", text: JUDGE_ACCEPTED_TEXT }],
|
|
62
|
-
details: verdict,
|
|
63
|
-
terminate: true,
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const verdict = validateVerdict(parameters);
|
|
67
|
-
// Candidate verdict is already on the parent session books as this
|
|
68
|
-
// tool-call leaf (first-record-then-audit; run 019fea05 L61/L62).
|
|
69
|
-
// #753: 符宝郎内闸 — queue only, raw receipt on bounce/escalate.
|
|
70
|
-
await pi.requireGatekeeperPass({
|
|
71
|
-
context: ctx,
|
|
72
|
-
subject: { kind: "judge_draft" },
|
|
73
|
-
...(signal === undefined ? {} : { signal }),
|
|
74
|
-
hostActions,
|
|
75
|
-
toolCallId,
|
|
76
|
-
});
|
|
77
|
-
// #756: 审刑院合规路径 — same review-queue law as 符宝郎/察院.
|
|
78
|
-
// pass → accept; bounce|escalate → raw auditor receipt back to judge;
|
|
79
|
-
// not three-state → resume auditor; no round cap; no disposeCompliance mapping.
|
|
80
|
-
await pi.requireGatekeeperPass({
|
|
81
|
-
context: ctx,
|
|
82
|
-
subject: { kind: "judge_compliance" },
|
|
83
|
-
...(signal === undefined ? {} : { signal }),
|
|
84
|
-
hostActions,
|
|
85
|
-
toolCallId,
|
|
86
|
-
});
|
|
87
|
-
return {
|
|
88
|
-
content: [{ type: "text", text: JUDGE_ACCEPTED_TEXT }],
|
|
89
|
-
details: verdict,
|
|
90
|
-
terminate: true,
|
|
91
|
-
};
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
pi.on("before_agent_start", (event) => {
|
|
95
|
-
if (soul === undefined)
|
|
96
|
-
throw new Error("大理寺职分未装载");
|
|
97
|
-
return {
|
|
98
|
-
systemPrompt: `${event.systemPrompt}\n\n<judge_soul>\n${soul}\n</judge_soul>`,
|
|
99
|
-
};
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
};
|
|
104
|
-
}
|
package/dist/merger-role.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { MERGER_ACCEPTED_TEXT, MERGER_OUTPUT_TOOL_NAME, mergerOutputSchema, validateMergerInput, } from "./merger-contracts.js";
|
|
2
|
-
import { exactUtf8 } from "./exact-utf8.js";
|
|
3
|
-
export { MERGER_OUTPUT_TOOL_NAME };
|
|
4
|
-
export const MERGER_INPUT_FLAG = { name: "ak-merger-input", definition: { description: "Path to Merger assignment materials JSON", type: "string" } };
|
|
5
|
-
function materialText(input, key) {
|
|
6
|
-
return exactUtf8(Buffer.from(input.materials[key].bytesBase64, "base64"), `Merger ${key}`);
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Merger (校书郎) role runtime.
|
|
10
|
-
* Code admits one submission and terminates the round (第 0 条).
|
|
11
|
-
* Git state / completion verification are not attendance or rejection gates (#827).
|
|
12
|
-
*/
|
|
13
|
-
export function createMergerRoleRuntime(pi, dependencies) {
|
|
14
|
-
let activation;
|
|
15
|
-
let registered = false;
|
|
16
|
-
let accepted = false;
|
|
17
|
-
pi.registerFlag(MERGER_INPUT_FLAG.name, MERGER_INPUT_FLAG.definition);
|
|
18
|
-
return {
|
|
19
|
-
async activate() {
|
|
20
|
-
const path = pi.getFlag(MERGER_INPUT_FLAG.name);
|
|
21
|
-
if (typeof path !== "string" || path.trim().length === 0)
|
|
22
|
-
throw new Error("Merger requires --ak-merger-input");
|
|
23
|
-
const soul = (await dependencies.loadSoul()).trim();
|
|
24
|
-
if (!soul)
|
|
25
|
-
throw new Error("Merger soul is empty");
|
|
26
|
-
const input = validateMergerInput(await dependencies.loadInput(path));
|
|
27
|
-
activation = { soul, input };
|
|
28
|
-
accepted = false;
|
|
29
|
-
if (!registered) {
|
|
30
|
-
registered = true;
|
|
31
|
-
pi.registerTool({
|
|
32
|
-
name: MERGER_OUTPUT_TOOL_NAME, label: "合并输出", description: "提交合并结果;输出分支为 completed 与 escalate。", promptSnippet: "提交合并结果", parameters: mergerOutputSchema,
|
|
33
|
-
async execute(_id, params, _signal, _update, _ctx) {
|
|
34
|
-
if (!activation)
|
|
35
|
-
throw new Error("校书郎未激活");
|
|
36
|
-
if (accepted)
|
|
37
|
-
throw new Error("合并回执已受理");
|
|
38
|
-
accepted = true;
|
|
39
|
-
return { content: [{ type: "text", text: MERGER_ACCEPTED_TEXT }], details: params, terminate: true };
|
|
40
|
-
},
|
|
41
|
-
});
|
|
42
|
-
pi.on("before_agent_start", (event) => {
|
|
43
|
-
if (!activation)
|
|
44
|
-
throw new Error("校书郎未激活");
|
|
45
|
-
const admitted = { attemptId: activation.input.attemptId, targetObjectId: activation.input.targetObjectId, sourceObjectId: activation.input.sourceObjectId, task: materialText(activation.input, "task"), authority: materialText(activation.input, "authority"), targetIntent: materialText(activation.input, "targetIntent"), sourceIntent: materialText(activation.input, "sourceIntent"), expectedConflictPaths: activation.input.expectedConflictPaths, resolutionScope: activation.input.resolutionScope, authorizedChecks: activation.input.authorizedChecks };
|
|
46
|
-
return { systemPrompt: `${event.systemPrompt}\n\n<merger_soul>\n${activation.soul}\n</merger_soul>\n\n<merger_assignment>\n${JSON.stringify(admitted)}\n</merger_assignment>` };
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
const all = pi.getAllTools().map((tool) => tool.name);
|
|
50
|
-
if (all.filter((item) => item === MERGER_OUTPUT_TOOL_NAME).length !== 1) {
|
|
51
|
-
throw new Error(`Merger required tool collision or missing: ${MERGER_OUTPUT_TOOL_NAME}`);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
}
|
package/dist/navigator-role.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NAVIGATOR_OUTPUT_TOOL_NAME, navigatorOutputSchema } from "./package-contracts/navigator-output.js";
|
|
2
|
-
/**
|
|
3
|
-
* 决定工具规格。生命周期装配归注册信封 owner——src/role-runtime.ts(ADR 0018)。
|
|
4
|
-
* Candidates share the route-advice shape the attendance prepare tool owns.
|
|
5
|
-
*/
|
|
6
|
-
export const NAVIGATOR_TOOL_SPEC = {
|
|
7
|
-
name: NAVIGATOR_OUTPUT_TOOL_NAME,
|
|
8
|
-
label: "游奕使建议",
|
|
9
|
-
description: "游奕使终局回执:排好序的下一步角色路线建议。",
|
|
10
|
-
promptSnippet: "游奕使建议",
|
|
11
|
-
parameters: navigatorOutputSchema,
|
|
12
|
-
};
|