@akagilnc/pi-workflow-roles 0.1.4586 → 0.1.4631
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/acp-host/production-host.js +1184 -717
- package/dist/activation-ledger-topology.js +0 -4
- package/dist/archivist-record-topology.js +27 -35
- package/dist/headless-host/description.js +7 -4
- package/dist/headless-host/production-host.js +998 -595
- package/dist/migrate-book-topology.js +3 -6
- package/dist/navigator-attendance.js +146 -241
- package/dist/navigator-public-session.js +81 -15
- package/dist/package-contracts/navigator-output.js +30 -12
- package/dist/pi/role-turn-host.js +0 -3
- package/dist/public-cli/auto-resume.js +26 -0
- package/dist/public-cli/judge-run.js +2 -2
- package/dist/public-cli/main.js +1119 -870
- package/dist/public-cli/option-definitions.js +1 -1
- package/dist/public-cli/post-admission.js +103 -9
- package/dist/public-cli/process-cancel.js +57 -0
- package/dist/public-cli/run-lifecycle.js +29 -7
- package/dist/public-cli/settlement.js +46 -32
- package/dist/public-cli/terminal.js +8 -27
- package/dist/public-role-summons.js +22 -4
- package/dist/submission-ledger.js +56 -23
- package/package.json +1 -1
- package/resources/836-deleted-machine-instruction-inventory.md +2 -0
- package/resources/navigator-route-playbook.md +9 -0
- package/scripts/build-package.mjs +6 -2
- package/src/acp-host/role-turn-host.ts +129 -13
- package/src/activation-ledger-topology.ts +1 -6
- package/src/activation-ledger.ts +5 -236
- package/src/analyst-entry.ts +19 -2
- package/src/analyst-ledger.ts +111 -6
- package/src/archivist-record-entry.ts +1 -1
- package/src/headless-host/description.ts +17 -7
- package/src/headless-host/role-turn-host.ts +42 -11
- package/src/navigator-attendance.ts +290 -425
- package/src/navigator-public-session.ts +126 -25
- package/src/navigator-role.ts +2 -2
- package/src/package-contracts/navigator-output.ts +41 -25
- package/src/pi/role-turn-host.ts +0 -3
- package/src/public-cli/auto-resume.ts +34 -0
- package/src/public-cli/cli.ts +30 -0
- package/src/public-cli/coder-run.ts +2 -2
- package/src/public-cli/fixer-run.ts +2 -2
- package/src/public-cli/judge-run.ts +2 -2
- package/src/public-cli/main.ts +25 -3
- package/src/public-cli/merger-run.ts +2 -2
- package/src/public-cli/option-definitions.ts +1 -1
- package/src/public-cli/post-admission.ts +175 -7
- package/src/public-cli/process-cancel.ts +75 -0
- package/src/public-cli/run-lifecycle.ts +37 -7
- package/src/public-cli/settlement.ts +42 -33
- package/src/public-cli/terminal.ts +12 -37
- package/src/public-role-summons.ts +34 -5
- package/src/role-envelope.ts +89 -4
- package/src/role-runtime.ts +78 -65
- package/src/submission-ledger.ts +63 -21
- package/dist/activation-reconciliation.js +0 -61
- package/dist/public-cli/command-renderer.js +0 -5
- package/dist/public-command-renderer.js +0 -29
- package/src/activation-reconciliation.ts +0 -163
- package/src/public-cli/command-renderer.ts +0 -9
- package/src/public-command-renderer.ts +0 -55
|
@@ -57,9 +57,6 @@ function resolveActivationLedgerHomeForPath(path) {
|
|
|
57
57
|
function activationBookDirectory(ledgerHome, bookKey) {
|
|
58
58
|
return join(ledgerHome, "books", bookKey);
|
|
59
59
|
}
|
|
60
|
-
function activationWaitingLedgerPath(ledgerHome, bookKey) {
|
|
61
|
-
return join(activationBookDirectory(ledgerHome, bookKey), "waiting.jsonl");
|
|
62
|
-
}
|
|
63
60
|
function pathContainedIn(root, candidate) {
|
|
64
61
|
const rel = relative(root, candidate);
|
|
65
62
|
return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep}`) && !isAbsolute(rel);
|
|
@@ -256,7 +253,6 @@ function assertLedgerFileInsideHome(ledgerPath, ledgerHome) {
|
|
|
256
253
|
export {
|
|
257
254
|
ActivationLedgerError,
|
|
258
255
|
activationBookDirectory,
|
|
259
|
-
activationWaitingLedgerPath,
|
|
260
256
|
assertLedgerFileInsideHome,
|
|
261
257
|
ensureRealDirectoryTree,
|
|
262
258
|
errnoCode,
|
|
@@ -1,40 +1,32 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure archivist record placement topology (ADR 0048 / 0065 / dossier-topology).
|
|
3
|
-
* No SessionManager / pi-coding-agent — cold public-bin and ledger discovery
|
|
4
|
-
* may import this without pulling open-session runtime into the graph.
|
|
5
|
-
*
|
|
6
|
-
* Navigator work-subject is the sole book-top subject partition (#852):
|
|
7
|
-
* books/<book>/navigator/<work-subject-digest>/. Callers must not re-hash
|
|
8
|
-
* subject or re-join book/navigator/digest themselves.
|
|
9
|
-
*/
|
|
10
1
|
import { createHash } from "node:crypto";
|
|
11
2
|
import { join } from "node:path";
|
|
12
3
|
import { resolveBookKeyFromGit } from "./activation-ledger-git.js";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*/
|
|
26
|
-
export function resolveNavigatorWorkSubjectPlacement(input) {
|
|
27
|
-
let ledgerHome;
|
|
28
|
-
if (input.parentSessionFile !== undefined && input.parentSessionFile.length > 0) {
|
|
29
|
-
const fromParent = tryHomeFromAkRolesPath(input.parentSessionFile);
|
|
30
|
-
if (fromParent !== undefined && fromParent.length > 0) {
|
|
31
|
-
ledgerHome = resolveActivationLedgerHome(fromParent);
|
|
32
|
-
}
|
|
4
|
+
import {
|
|
5
|
+
activationBookDirectory,
|
|
6
|
+
resolveActivationLedgerHome,
|
|
7
|
+
tryHomeFromAkRolesPath
|
|
8
|
+
} from "./activation-ledger-topology.js";
|
|
9
|
+
const NAVIGATOR_RECORD_KIND = "navigator";
|
|
10
|
+
function resolveNavigatorWorkSubjectPlacement(input) {
|
|
11
|
+
let ledgerHome;
|
|
12
|
+
if (input.parentSessionFile !== void 0 && input.parentSessionFile.length > 0) {
|
|
13
|
+
const fromParent = tryHomeFromAkRolesPath(input.parentSessionFile);
|
|
14
|
+
if (fromParent !== void 0 && fromParent.length > 0) {
|
|
15
|
+
ledgerHome = resolveActivationLedgerHome(fromParent);
|
|
33
16
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
17
|
+
}
|
|
18
|
+
ledgerHome ??= resolveActivationLedgerHome(input.home);
|
|
19
|
+
const digest = createHash("sha256").update(input.subject).digest("hex").slice(0, 32);
|
|
20
|
+
return {
|
|
21
|
+
ledgerHome,
|
|
22
|
+
sessionDir: join(
|
|
23
|
+
activationBookDirectory(ledgerHome, resolveBookKeyFromGit(input.cwd)),
|
|
24
|
+
NAVIGATOR_RECORD_KIND,
|
|
25
|
+
digest
|
|
26
|
+
)
|
|
27
|
+
};
|
|
40
28
|
}
|
|
29
|
+
export {
|
|
30
|
+
NAVIGATOR_RECORD_KIND,
|
|
31
|
+
resolveNavigatorWorkSubjectPlacement
|
|
32
|
+
};
|
|
@@ -27,9 +27,10 @@ export function headlessTurnArgs(options) {
|
|
|
27
27
|
...description.fixedArgs,
|
|
28
28
|
description.systemPromptFlag,
|
|
29
29
|
options.systemPromptPath,
|
|
30
|
-
description.jsonSchemaFlag,
|
|
31
|
-
JSON.stringify(options.jsonSchema),
|
|
32
30
|
];
|
|
31
|
+
if (options.jsonSchema !== undefined) {
|
|
32
|
+
args.push(description.jsonSchemaFlag, JSON.stringify(options.jsonSchema));
|
|
33
|
+
}
|
|
33
34
|
if (options.pluginDir)
|
|
34
35
|
args.push("--plugin-dir", options.pluginDir);
|
|
35
36
|
if (options.mcpConfigPath !== undefined && options.mcpConfigPath !== "") {
|
|
@@ -69,7 +70,7 @@ function codexTomlStringTable(entries) {
|
|
|
69
70
|
* Free-form JSON leaf for Type.Unknown under Codex strict transport.
|
|
70
71
|
* Strict rejects bare untyped nodes and root-level additionalProperties:true;
|
|
71
72
|
* a $defs anyOf of JSON values (with nested additionalProperties as $ref)
|
|
72
|
-
* is accepted and keeps array/object receipts expressible
|
|
73
|
+
* is accepted and keeps array/object receipts expressible.
|
|
73
74
|
* Package code still does not validate or reject the receipt against schema.
|
|
74
75
|
*/
|
|
75
76
|
const CODEX_JSON_VALUE_DEF = "codexJsonValue";
|
|
@@ -335,7 +336,9 @@ export function codexTurnArgs(options) {
|
|
|
335
336
|
}
|
|
336
337
|
}
|
|
337
338
|
args.push("-c", `model_instructions_file=${codexTomlString(options.systemPromptPath)}`);
|
|
338
|
-
|
|
339
|
+
if (options.outputSchemaPath !== undefined) {
|
|
340
|
+
args.push("--output-schema", options.outputSchemaPath);
|
|
341
|
+
}
|
|
339
342
|
args.push(...codexMcpConfigArgs(options.mcpServers));
|
|
340
343
|
if (options.model !== undefined && options.model !== "") {
|
|
341
344
|
args.push("-m", options.model);
|