@akagilnc/pi-workflow-roles 0.1.1837 → 0.1.1840
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.
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { lstatSync, realpathSync, statSync, writeFileSync, } from "node:fs";
|
|
2
|
-
import { dirname, isAbsolute,
|
|
3
|
-
import { SessionManager } from "@earendil-works/pi-coding-agent";
|
|
2
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
4
3
|
import { activationBookDirectory, ensureRealDirectoryTree, errnoCode, errorText, pathContainedIn, } from "./activation-ledger-topology.js";
|
|
5
|
-
export function childSessionManager(parent, cwd, childDirectory) {
|
|
6
|
-
const parentSession = parent?.getSessionFile();
|
|
7
|
-
return parentSession === undefined
|
|
8
|
-
? SessionManager.inMemory(cwd)
|
|
9
|
-
: SessionManager.create(cwd, join(parent.getSessionDir(), childDirectory), { parentSession });
|
|
10
|
-
}
|
|
11
4
|
/**
|
|
12
5
|
* Typed missing durable session principal. Callers discriminate with instanceof/code;
|
|
13
6
|
* never by parsing message prose. Original filesystem causes are retained.
|
|
@@ -313,7 +313,7 @@ export async function executeEvidenceChild(workspace, prompt, context, options =
|
|
|
313
313
|
: { parentDirectory: options.credentialScratchParent }),
|
|
314
314
|
}, async (childConfigDir) => {
|
|
315
315
|
const { openInProcessAgentSession } = await import("./in-process-session.js");
|
|
316
|
-
const {
|
|
316
|
+
const { createRecordSession } = await import("./sitian-record-entry.js");
|
|
317
317
|
let inherited;
|
|
318
318
|
try {
|
|
319
319
|
inherited = await createInheritedRuntime({
|
|
@@ -337,7 +337,11 @@ export async function executeEvidenceChild(workspace, prompt, context, options =
|
|
|
337
337
|
"Use the available evidence tools to investigate. Do not commit, push, or mutate remotes.",
|
|
338
338
|
"Return one substantive non-blank report.",
|
|
339
339
|
].join("\n"),
|
|
340
|
-
sessionManager:
|
|
340
|
+
sessionManager: createRecordSession({
|
|
341
|
+
cwd: workspace,
|
|
342
|
+
kind: "evidence-children",
|
|
343
|
+
...(context.sessionManager === undefined ? {} : { parent: context.sessionManager }),
|
|
344
|
+
}),
|
|
341
345
|
});
|
|
342
346
|
const usage = emptyUsage();
|
|
343
347
|
const unsubscribe = session.subscribe((event) => {
|
package/package.json
CHANGED
|
@@ -4,9 +4,7 @@ import {
|
|
|
4
4
|
statSync,
|
|
5
5
|
writeFileSync,
|
|
6
6
|
} from "node:fs";
|
|
7
|
-
import { dirname, isAbsolute,
|
|
8
|
-
import { SessionManager } from "@earendil-works/pi-coding-agent";
|
|
9
|
-
|
|
7
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
10
8
|
import {
|
|
11
9
|
activationBookDirectory,
|
|
12
10
|
ensureRealDirectoryTree,
|
|
@@ -15,13 +13,6 @@ import {
|
|
|
15
13
|
pathContainedIn,
|
|
16
14
|
} from "./activation-ledger-topology.ts";
|
|
17
15
|
|
|
18
|
-
export function childSessionManager(parent: { getSessionFile(): string | undefined; getSessionDir(): string } | undefined, cwd: string, childDirectory: string): SessionManager {
|
|
19
|
-
const parentSession = parent?.getSessionFile();
|
|
20
|
-
return parentSession === undefined
|
|
21
|
-
? SessionManager.inMemory(cwd)
|
|
22
|
-
: SessionManager.create(cwd, join(parent!.getSessionDir(), childDirectory), { parentSession });
|
|
23
|
-
}
|
|
24
|
-
|
|
25
16
|
/** Durable pointer to the authoritative Pi session file principal (ADR 0048/0049). */
|
|
26
17
|
export type ActivationSessionPointer = {
|
|
27
18
|
readonly kind: "session-file";
|
|
@@ -411,7 +411,7 @@ export async function executeEvidenceChild(
|
|
|
411
411
|
},
|
|
412
412
|
async (childConfigDir) => {
|
|
413
413
|
const { openInProcessAgentSession } = await import("./in-process-session.ts");
|
|
414
|
-
const {
|
|
414
|
+
const { createRecordSession } = await import("./sitian-record-entry.ts");
|
|
415
415
|
let inherited: InheritedRuntime;
|
|
416
416
|
try {
|
|
417
417
|
inherited = await createInheritedRuntime({
|
|
@@ -434,7 +434,11 @@ export async function executeEvidenceChild(
|
|
|
434
434
|
"Use the available evidence tools to investigate. Do not commit, push, or mutate remotes.",
|
|
435
435
|
"Return one substantive non-blank report.",
|
|
436
436
|
].join("\n"),
|
|
437
|
-
sessionManager:
|
|
437
|
+
sessionManager: createRecordSession({
|
|
438
|
+
cwd: workspace,
|
|
439
|
+
kind: "evidence-children",
|
|
440
|
+
...(context.sessionManager === undefined ? {} : { parent: context.sessionManager }),
|
|
441
|
+
}),
|
|
438
442
|
});
|
|
439
443
|
const usage = emptyUsage();
|
|
440
444
|
const unsubscribe = session.subscribe((event) => {
|