@akagilnc/pi-workflow-roles 0.1.2521 → 0.1.2653-next.71811ca
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 +129 -39
- package/README.zh-CN.md +128 -39
- package/dist/activation-ledger-topology.js +1 -1
- package/dist/archivist-record-entry.js +47 -26
- package/dist/auditor-dossier-tool.js +3 -1
- package/dist/compliance-transport.js +17 -26
- package/dist/doctor-contracts.js +1 -2
- package/dist/dossier-resolution.js +4 -8
- package/dist/engine-detour-tool.js +33 -8
- package/dist/engine-detour.js +1 -0
- package/dist/evidence-child-executor.js +277 -424
- package/dist/host-contracts.js +22 -0
- package/dist/institutional-resolution.js +88 -0
- package/dist/merger-contracts.js +1 -2
- package/dist/navigator-attendance.js +16 -0
- package/dist/notary-contracts.js +2 -3
- package/dist/package-contracts/fixer-output.js +1 -2
- package/dist/packaged-role-registry.js +102 -9
- package/dist/pi/in-process-session.js +671 -0
- package/dist/public-cli/config.js +7 -5
- package/dist/public-cli/main.js +3767 -4113
- package/dist/reviewer-child-executor.js +6 -1
- package/dist/session-opening-materials.js +10 -38
- package/dist/sitian-appender.js +146 -0
- package/dist/sitian-contracts.js +21 -0
- package/dist/sitian-facade.js +15 -0
- package/dist/sitian-reader.js +52 -0
- package/extensions/role-runtime.ts +9 -7
- package/package.json +5 -5
- package/resources/engines/cursor.md +12 -26
- package/resources/engines/hermes.md +2 -23
- package/resources/engines/opus.md +1 -16
- package/resources/navigator-route-playbook.md +2 -2
- package/scripts/build-package.mjs +0 -1
- package/souls/quality-law.md +1 -1
- package/src/activation-ledger-topology.ts +1 -1
- package/src/archivist-record-entry.ts +57 -45
- package/src/auditor-dossier-tool.ts +4 -2
- package/src/canonical-skill-binding.ts +37 -27
- package/src/collector-role.ts +11 -20
- package/src/collector-tool-schemas.ts +1 -4
- package/src/compliance-transport.ts +19 -44
- package/src/doctor-auditor.ts +1 -5
- package/src/doctor-contracts.ts +1 -4
- package/src/doctor-role.ts +31 -8
- package/src/dossier-resolution.ts +8 -8
- package/src/engine-detour-tool.ts +48 -19
- package/src/engine-detour.ts +3 -0
- package/src/evidence-child-executor.ts +277 -485
- package/src/factory-board.ts +3 -3
- package/src/gatekeeper-role.ts +21 -10
- package/src/host-contracts.ts +386 -0
- package/src/in-process-session.ts +1 -115
- package/src/institutional-resolution.ts +135 -0
- package/src/judge-auditor.ts +1 -5
- package/src/judge-role.ts +37 -51
- package/src/merger-contracts.ts +1 -4
- package/src/merger-role.ts +7 -11
- package/src/navigator-attendance.ts +20 -1
- package/src/notary-contracts.ts +8 -11
- package/src/notary-role.ts +7 -23
- package/src/notary-source-run.ts +4 -3
- package/src/package-contracts/fixer-output.ts +1 -4
- package/src/package-resources/method-skill-binding.ts +10 -34
- package/src/packaged-role-registry.ts +122 -12
- package/src/pi/adapter.ts +192 -0
- package/src/pi/durable-principal.ts +98 -0
- package/src/pi/in-process-session.ts +819 -0
- package/src/pi/known-failure.ts +77 -0
- package/src/pi/pi-normalization.ts +284 -0
- package/src/pi/role-turn-host.ts +459 -0
- package/src/public-cli/auto-resume.ts +42 -44
- package/src/public-cli/cli.ts +171 -257
- package/src/public-cli/coder-run.ts +115 -433
- package/src/public-cli/collector-run.ts +62 -314
- package/src/public-cli/config.ts +7 -5
- package/src/public-cli/doctor-run.ts +41 -52
- package/src/public-cli/fixer-run.ts +122 -427
- package/src/public-cli/invocation.ts +287 -96
- package/src/public-cli/judge-run.ts +92 -422
- package/src/public-cli/merger-run.ts +167 -429
- package/src/public-cli/notary-run.ts +41 -47
- package/src/public-cli/option-definitions.ts +136 -3
- package/src/public-cli/post-admission.ts +497 -0
- package/src/public-cli/public-run-credentials.ts +4 -4
- package/src/public-cli/reviewer-dispatch-rejection.ts +106 -0
- package/src/public-cli/reviewer-run.ts +132 -449
- package/src/public-cli/run-lifecycle.ts +339 -327
- package/src/public-cli/settlement.ts +251 -134
- package/src/public-cli/terminal.ts +3 -9
- package/src/public-cli/turn-request.ts +87 -0
- package/src/reviewer-child-executor.ts +9 -1
- package/src/reviewer-role.ts +11 -20
- package/src/role-runtime.ts +129 -78
- package/src/session-opening-materials.ts +25 -39
- package/src/sitian-appender.ts +171 -0
- package/src/sitian-contracts.ts +106 -0
- package/src/sitian-facade.ts +18 -0
- package/src/sitian-reader.ts +62 -0
- package/src/worker-role.ts +42 -40
- package/src/worker-submission-gates.ts +33 -0
- package/dist/archivist-role-run-coordinates.js +0 -28
- package/dist/package-contracts/terminating-infrastructure.js +0 -90
- package/resources/engines/sonnet.md +0 -27
- package/resources/engines/zcode.md +0 -63
- package/src/archivist-role-run-coordinates.ts +0 -45
- package/src/package-contracts/terminating-infrastructure.ts +0 -132
- package/src/public-cli/explicit-internal.ts +0 -427
- package/src/public-cli/one-shot-dispatch.ts +0 -300
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
/**
|
|
3
|
+
* Thrown activation failure with a production-owned typed cause.
|
|
4
|
+
* Prefer this over ad-hoc Error property tags so settlement retains typed identity.
|
|
5
|
+
* Final owner = host contract (#526); public-cli/pi/role-runtime all import here.
|
|
6
|
+
*/
|
|
7
|
+
export class ExplicitInternalActivationError extends Error {
|
|
8
|
+
knownCause;
|
|
9
|
+
failureCode;
|
|
10
|
+
constructor(message, options) {
|
|
11
|
+
super(message, options.cause === undefined ? undefined : { cause: options.cause });
|
|
12
|
+
this.name = options.name ?? "ExplicitInternalActivationError";
|
|
13
|
+
this.knownCause = options.knownCause;
|
|
14
|
+
if (options.code !== undefined) {
|
|
15
|
+
this.failureCode = options.code;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/** Local replacement for Pi AI's convenience constructor. */
|
|
20
|
+
export function stringEnum(values, options = {}) {
|
|
21
|
+
return Type.Union(values.map((value) => Type.Literal(value)), options);
|
|
22
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { seatModelOnly } from "./public-cli/config.js";
|
|
4
|
+
export const INSTITUTIONAL_RESOLUTION_FILE = "institutional-resolution.json";
|
|
5
|
+
export class InstitutionalResolutionError extends Error {
|
|
6
|
+
constructor(message, options) {
|
|
7
|
+
super(message, options);
|
|
8
|
+
this.name = "InstitutionalResolutionError";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
function cleanSelection(model) {
|
|
12
|
+
if (model === undefined)
|
|
13
|
+
return undefined;
|
|
14
|
+
if (typeof model.provider !== "string" || typeof model.model !== "string")
|
|
15
|
+
return undefined;
|
|
16
|
+
return {
|
|
17
|
+
provider: model.provider,
|
|
18
|
+
model: model.model,
|
|
19
|
+
...(model.thinking === undefined ? {} : { thinking: model.thinking }),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Resolve effective per-seat institutional selections (#518 §2 Hop 1):
|
|
24
|
+
* - gatekeeper / inspector / notary: seat override > gatekeeper override > parent effective
|
|
25
|
+
* - auditor / evidenceChild: parent effective
|
|
26
|
+
*/
|
|
27
|
+
export function resolveInstitutionalSeatSelections(config, parentEffectiveModel) {
|
|
28
|
+
const parentSelection = cleanSelection(parentEffectiveModel);
|
|
29
|
+
const ownInspector = cleanSelection(seatModelOnly(config.seats?.inspector));
|
|
30
|
+
const ownNotary = cleanSelection(seatModelOnly(config.seats?.notary));
|
|
31
|
+
const ownGatekeeper = cleanSelection(seatModelOnly(config.seats?.gatekeeper));
|
|
32
|
+
const gatekeeper = ownGatekeeper ?? parentSelection;
|
|
33
|
+
const inspector = ownInspector ?? ownGatekeeper ?? parentSelection;
|
|
34
|
+
const notary = ownNotary ?? ownGatekeeper ?? parentSelection;
|
|
35
|
+
const auditor = parentSelection;
|
|
36
|
+
const evidenceChild = parentSelection;
|
|
37
|
+
return {
|
|
38
|
+
version: 1,
|
|
39
|
+
seats: {
|
|
40
|
+
...(gatekeeper === undefined ? {} : { gatekeeper }),
|
|
41
|
+
...(inspector === undefined ? {} : { inspector }),
|
|
42
|
+
...(notary === undefined ? {} : { notary }),
|
|
43
|
+
...(auditor === undefined ? {} : { auditor }),
|
|
44
|
+
...(evidenceChild === undefined ? {} : { evidenceChild }),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Persist institutional resolution page to run directory (#518 §2 Hop 2).
|
|
50
|
+
* Rewritten on each dispatch and resume. Zero secrets inside page.
|
|
51
|
+
*/
|
|
52
|
+
export async function writeInstitutionalResolutionPage(runDirectory, page) {
|
|
53
|
+
const filePath = join(runDirectory, INSTITUTIONAL_RESOLUTION_FILE);
|
|
54
|
+
await writeFile(filePath, `${JSON.stringify(page, null, 2)}\n`, "utf8");
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Read institutional seat selection from run directory (#518 §2 Hop 3).
|
|
58
|
+
* Fails loud if page is missing, corrupted, or does not contain a resolution for the seat.
|
|
59
|
+
*/
|
|
60
|
+
export async function readInstitutionalSeatSelection(runDirectory, seat) {
|
|
61
|
+
const filePath = join(runDirectory, INSTITUTIONAL_RESOLUTION_FILE);
|
|
62
|
+
let raw;
|
|
63
|
+
try {
|
|
64
|
+
raw = await readFile(filePath, "utf8");
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
throw new InstitutionalResolutionError(`institutional resolution page is missing at ${filePath}`, { cause: error });
|
|
68
|
+
}
|
|
69
|
+
let page;
|
|
70
|
+
try {
|
|
71
|
+
page = JSON.parse(raw);
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
throw new InstitutionalResolutionError(`institutional resolution page is corrupted at ${filePath}`, { cause: error });
|
|
75
|
+
}
|
|
76
|
+
if (typeof page !== "object" || page === null || page.version !== 1) {
|
|
77
|
+
throw new InstitutionalResolutionError(`institutional resolution page format is invalid at ${filePath}`);
|
|
78
|
+
}
|
|
79
|
+
const seats = page.seats;
|
|
80
|
+
if (typeof seats !== "object" || seats === null) {
|
|
81
|
+
throw new InstitutionalResolutionError(`institutional resolution page missing seats object at ${filePath}`);
|
|
82
|
+
}
|
|
83
|
+
const selection = cleanSelection(seats[seat]);
|
|
84
|
+
if (selection === undefined) {
|
|
85
|
+
throw new InstitutionalResolutionError(`institutional resolution page has no resolution for seat "${seat}" at ${filePath}`);
|
|
86
|
+
}
|
|
87
|
+
return selection;
|
|
88
|
+
}
|
package/dist/merger-contracts.js
CHANGED
|
@@ -3,7 +3,6 @@ import { isFullGitObjectId } from "./git-object-id.js";
|
|
|
3
3
|
import { exactUtf8 } from "./exact-utf8.js";
|
|
4
4
|
import { sha256Hex } from "./sha256.js";
|
|
5
5
|
import { openToolObjectFromUnion } from "./open-tool-schema.js";
|
|
6
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
7
6
|
const oidPattern = "^(?:[0-9a-f]{40}|[0-9a-f]{64})$";
|
|
8
7
|
const materialSchema = Type.Object({ bytesBase64: Type.String(), sha256: Type.String() }, { additionalProperties: false });
|
|
9
8
|
const checkSchema = Type.Object({ name: Type.String({ minLength: 1 }), argv: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }) }, { additionalProperties: false });
|
|
@@ -19,7 +18,7 @@ const mergerOutputVariants = Type.Union([
|
|
|
19
18
|
Type.Object({ status: Type.Literal("completed", { description: "completed — 形状指引,非 schema 闸" }), attemptId: Type.String({ minLength: 1, description: "已受理合并 attempt 身份" }), report: Type.String({ minLength: 1, description: "如实结果报告" }), mergeCommitId: Type.String({ pattern: oidPattern, description: "已核验的完成合并 commit object ID" }) }, { additionalProperties: false }),
|
|
20
19
|
Type.Object({ status: Type.Literal("escalate", { description: "escalate — 形状指引,非 schema 闸" }), attemptId: Type.String({ minLength: 1, description: "已受理合并 attempt 身份" }), diagnosis: Type.String({ minLength: 1, description: "合并完成需升级的原因" }), report: Type.String({ minLength: 1, description: "如实结果报告" }) }, { additionalProperties: false }),
|
|
21
20
|
]);
|
|
22
|
-
export const mergerOutputSchema =
|
|
21
|
+
export const mergerOutputSchema = openToolObjectFromUnion(mergerOutputVariants);
|
|
23
22
|
export const MERGER_OUTPUT_TOOL_NAME = "ak_merger_output";
|
|
24
23
|
export const MERGER_ACCEPTED_TEXT = "合并回执已接受";
|
|
25
24
|
const record = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
@@ -11,6 +11,11 @@ import {
|
|
|
11
11
|
mintNavigatorInvocationId
|
|
12
12
|
} from "./navigator-invocation-identity.js";
|
|
13
13
|
import { PACKAGED_ROLE_REGISTRY, packagedRoleMetadata } from "./packaged-role-registry.js";
|
|
14
|
+
import {
|
|
15
|
+
activationBookDirectory,
|
|
16
|
+
resolveActivationLedgerHome
|
|
17
|
+
} from "./activation-ledger-topology.js";
|
|
18
|
+
import { sitianReport } from "./sitian-facade.js";
|
|
14
19
|
import { openInProcessAgentSession } from "./in-process-session.js";
|
|
15
20
|
import { renderPublicAkRoleCommand } from "./public-command-renderer.js";
|
|
16
21
|
import { issueRoot, subjectPath } from "./work-subject-identity.js";
|
|
@@ -996,6 +1001,17 @@ function createNativeNavigatorSessionFactory(defaultModelSettingPath = navigator
|
|
|
996
1001
|
providerFailure: () => providerFailure,
|
|
997
1002
|
appendEntry: (customType, data) => {
|
|
998
1003
|
opened.session.sessionManager.appendCustomEntry(customType, data);
|
|
1004
|
+
try {
|
|
1005
|
+
sitianReport({
|
|
1006
|
+
level: "event",
|
|
1007
|
+
kind: "attendance",
|
|
1008
|
+
cwd: context.cwd,
|
|
1009
|
+
sessionParent: opened.session.sessionManager.getSessionFile(),
|
|
1010
|
+
payload: { customType, data },
|
|
1011
|
+
source: "navigator-attendance"
|
|
1012
|
+
});
|
|
1013
|
+
} catch {
|
|
1014
|
+
}
|
|
999
1015
|
},
|
|
1000
1016
|
entries: () => opened.session.sessionManager.getEntries(),
|
|
1001
1017
|
setModel: async (next, thinkingLevel) => {
|
package/dist/notary-contracts.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Type } from "typebox";
|
|
7
7
|
import { openToolObject } from "./open-tool-schema.js";
|
|
8
|
-
import { withInfrastructureFailureDeclaration } from "./package-contracts/terminating-infrastructure.js";
|
|
9
8
|
export const NOTARY_OUTPUT_TOOL_NAME = "ak_notary_output";
|
|
10
9
|
export const NOTARY_ACCEPTED_TEXT = "符宝郎回执已接受";
|
|
11
10
|
export const NOTARY_SOURCE_RUN_FLAG = {
|
|
@@ -17,14 +16,14 @@ export const NOTARY_SOURCE_RUN_FLAG = {
|
|
|
17
16
|
};
|
|
18
17
|
/** Package-owned kickoff only — callers supply zero prompt bytes (ADR 0067 / #448). */
|
|
19
18
|
export const NOTARY_FIXED_KICKOFF = "符宝郎案卷已受理;来源 run 定位见会话材料。";
|
|
20
|
-
export const notaryOutputSchema =
|
|
19
|
+
export const notaryOutputSchema = openToolObject(Type.Object({
|
|
21
20
|
status: Type.Unknown({
|
|
22
21
|
description: "pass | bounce — 形状指引,非 schema 闸",
|
|
23
22
|
}),
|
|
24
23
|
findings: Type.Unknown({
|
|
25
24
|
description: "string[] findings,随 pass 或 bounce 留存",
|
|
26
25
|
}),
|
|
27
|
-
}))
|
|
26
|
+
}));
|
|
28
27
|
function isRecord(value) {
|
|
29
28
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
30
29
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
2
|
import { FIXER_PREREQUISITE_ID_PATTERN } from "./fixer-packet.js";
|
|
3
3
|
import { openToolObjectFromUnion } from "../open-tool-schema.js";
|
|
4
|
-
import { withInfrastructureFailureDeclaration } from "./terminating-infrastructure.js";
|
|
5
4
|
export const FIXER_OUTPUT_TOOL_NAME = "ak_fixer_output";
|
|
6
5
|
export const FIXER_ACCEPTED_TEXT = "修内司回执已接受";
|
|
7
6
|
const nonblankTransportString = Type.String({ minLength: 1 });
|
|
@@ -38,7 +37,7 @@ const fixerOutputVariants = Type.Union([
|
|
|
38
37
|
Type.Object({ status: Type.Literal("refused", { description: "refused — 形状指引,非 schema 闸" }), report: Type.String({ minLength: 1, description: "如实结果报告" }), classResults: Type.Array(classResultSchema, { minItems: 1, description: "各类拒绝结算" }) }),
|
|
39
38
|
Type.Object({ status: Type.Literal("partially_completed", { description: "partially_completed — 形状指引,非 schema 闸" }), report: Type.String({ minLength: 1, description: "如实结果报告" }), classResults: Type.Array(classResultSchema, { minItems: 1, description: "各类完成或拒绝结算" }), testEvidence: Type.Optional(testEvidenceSchema) }),
|
|
40
39
|
]);
|
|
41
|
-
export const fixerOutputSchema =
|
|
40
|
+
export const fixerOutputSchema = openToolObjectFromUnion(fixerOutputVariants);
|
|
42
41
|
export function validateFixerOutput(value, _phase) {
|
|
43
42
|
return value;
|
|
44
43
|
}
|
|
@@ -5,17 +5,108 @@ import { CODER_OUTPUT_TOOL_NAME, FIXER_OUTPUT_TOOL_NAME } from "./package-contra
|
|
|
5
5
|
import { DOCTOR_OUTPUT_TOOL_NAME } from "./doctor-contracts.js";
|
|
6
6
|
import { MERGER_OUTPUT_TOOL_NAME } from "./merger-contracts.js";
|
|
7
7
|
import { NOTARY_OUTPUT_TOOL_NAME } from "./notary-contracts.js";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const NOTARY_SESSION_MATERIALS = [
|
|
9
|
+
"CLAUDE.md",
|
|
10
|
+
"souls/notary.md",
|
|
11
|
+
"souls/gate-output-guide.md"
|
|
12
|
+
];
|
|
13
|
+
const PUBLIC_ROLE_RECORDS = [
|
|
14
|
+
{
|
|
15
|
+
role: "judge",
|
|
16
|
+
phases: [null],
|
|
17
|
+
outputTool: JUDGE_OUTPUT_TOOL_NAME,
|
|
18
|
+
inputFlag: void 0,
|
|
19
|
+
phaseFlag: void 0,
|
|
20
|
+
activationStage: "load-and-install",
|
|
21
|
+
sessionMaterials: [
|
|
22
|
+
"CLAUDE.md",
|
|
23
|
+
"souls/judge.md",
|
|
24
|
+
"souls/audit-law.md",
|
|
25
|
+
"souls/quality-law.md",
|
|
26
|
+
"souls/judge-output-guide.md"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
role: "fixer",
|
|
31
|
+
phases: ["plan", "apply"],
|
|
32
|
+
outputTool: FIXER_OUTPUT_TOOL_NAME,
|
|
33
|
+
inputFlag: "ak-fix-packet",
|
|
34
|
+
phaseFlag: "ak-fixer-phase",
|
|
35
|
+
activationStage: "load-and-install",
|
|
36
|
+
sessionMaterials: [
|
|
37
|
+
"CLAUDE.md",
|
|
38
|
+
"souls/fixer.md",
|
|
39
|
+
"souls/quality-law.md",
|
|
40
|
+
"souls/fixer-output-guide.md"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
role: "coder",
|
|
45
|
+
phases: ["plan", "apply"],
|
|
46
|
+
outputTool: CODER_OUTPUT_TOOL_NAME,
|
|
47
|
+
inputFlag: "ak-coder-task",
|
|
48
|
+
phaseFlag: "ak-coder-phase",
|
|
49
|
+
activationStage: "load-and-install",
|
|
50
|
+
sessionMaterials: [
|
|
51
|
+
"CLAUDE.md",
|
|
52
|
+
"souls/coder.md",
|
|
53
|
+
"souls/quality-law.md",
|
|
54
|
+
"souls/coder-output-guide.md"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
role: "reviewer",
|
|
59
|
+
phases: [null],
|
|
60
|
+
outputTool: REVIEWER_OUTPUT_TOOL_NAME,
|
|
61
|
+
inputFlag: void 0,
|
|
62
|
+
phaseFlag: void 0,
|
|
63
|
+
activationStage: "load-and-install",
|
|
64
|
+
sessionMaterials: [
|
|
65
|
+
"CLAUDE.md",
|
|
66
|
+
"souls/reviewer.md",
|
|
67
|
+
"souls/audit-law.md",
|
|
68
|
+
"souls/quality-law.md"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
13
71
|
// ak-collector-repo is GitHub owner/repo identity, not a local material path (#438).
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
72
|
+
{
|
|
73
|
+
role: "collector",
|
|
74
|
+
phases: [null],
|
|
75
|
+
outputTool: COLLECTOR_OUTPUT_TOOL,
|
|
76
|
+
inputFlag: void 0,
|
|
77
|
+
phaseFlag: void 0,
|
|
78
|
+
activationStage: "load-and-install",
|
|
79
|
+
sessionMaterials: ["CLAUDE.md", "souls/collector.md"]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
role: "doctor",
|
|
83
|
+
phases: [null],
|
|
84
|
+
outputTool: DOCTOR_OUTPUT_TOOL_NAME,
|
|
85
|
+
inputFlag: "ak-doctor-case",
|
|
86
|
+
phaseFlag: void 0,
|
|
87
|
+
activationStage: "load-and-install",
|
|
88
|
+
sessionMaterials: ["CLAUDE.md", "souls/doctor.md"]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
role: "merger",
|
|
92
|
+
phases: [null],
|
|
93
|
+
outputTool: MERGER_OUTPUT_TOOL_NAME,
|
|
94
|
+
inputFlag: "ak-merger-input",
|
|
95
|
+
phaseFlag: void 0,
|
|
96
|
+
activationStage: "prepare-git-and-install",
|
|
97
|
+
sessionMaterials: ["CLAUDE.md", "souls/merger.md"]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
role: "notary",
|
|
101
|
+
phases: [null],
|
|
102
|
+
outputTool: NOTARY_OUTPUT_TOOL_NAME,
|
|
103
|
+
inputFlag: "ak-notary-source-run",
|
|
104
|
+
phaseFlag: void 0,
|
|
105
|
+
activationStage: "load-and-install",
|
|
106
|
+
sessionMaterials: NOTARY_SESSION_MATERIALS
|
|
107
|
+
}
|
|
18
108
|
];
|
|
109
|
+
const PACKAGED_ROLE_REGISTRY = PUBLIC_ROLE_RECORDS.map(({ sessionMaterials: _omit, ...metadata }) => metadata);
|
|
19
110
|
function packagedRoleMetadata(role) {
|
|
20
111
|
return PACKAGED_ROLE_REGISTRY.find((entry) => entry.role === role);
|
|
21
112
|
}
|
|
@@ -29,7 +120,9 @@ function packagedRoleOutputTool(role) {
|
|
|
29
120
|
return packagedRoleMetadata(role)?.outputTool;
|
|
30
121
|
}
|
|
31
122
|
export {
|
|
123
|
+
NOTARY_SESSION_MATERIALS,
|
|
32
124
|
PACKAGED_ROLE_REGISTRY,
|
|
125
|
+
PUBLIC_ROLE_RECORDS,
|
|
33
126
|
packagedRoleInputFlag,
|
|
34
127
|
packagedRoleMetadata,
|
|
35
128
|
packagedRoleOutputTool,
|