@akagilnc/pi-workflow-roles 0.1.5679 → 0.1.5698
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/dist/acp-host/production-host.js +4016 -3944
- package/dist/external-host-turn-loop.js +35 -17
- package/dist/headless-host/production-host.js +3246 -3174
- package/dist/migrate-book-topology.js +129 -100
- package/dist/pi/role-turn-host.js +1 -1
- package/dist/public-cli/main.js +1672 -1621
- package/dist/report-ticket-tool.js +12 -2
- package/dist/role-run-path-rewrite.js +149 -0
- package/dist/role-run-relocation.js +11 -121
- package/dist/run-dossier.js +10 -1
- package/dist/session-identity.js +1 -0
- package/dist/submission-ledger.js +11 -0
- package/package.json +1 -1
- package/resources/navigator-route-playbook.md +2 -12
- package/souls/navigator.md +2 -4
- package/src/acp-host/production-host.ts +1 -0
- package/src/acp-host/role-turn-host.ts +2 -2
- package/src/external-host-turn-loop.ts +36 -22
- package/src/headless-host/production-host.ts +1 -0
- package/src/headless-host/role-turn-host.ts +2 -2
- package/src/pi/role-turn-host.ts +1 -1
- package/src/prepared-role-turn.ts +2 -0
- package/src/report-ticket-tool.ts +12 -2
- package/src/role-envelope.ts +20 -11
- package/src/role-run-path-rewrite.ts +238 -0
- package/src/role-run-relocation.ts +34 -200
- package/src/role-runtime.ts +29 -12
- package/src/run-dossier.ts +11 -1
- package/src/session-identity.ts +1 -0
- package/src/submission-ledger.ts +11 -0
package/src/run-dossier.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:
|
|
|
21
21
|
import { basename, join } from "node:path";
|
|
22
22
|
|
|
23
23
|
import { sessionFileOf } from "./role-run-placement.ts";
|
|
24
|
+
import { projectRenderedPagePaths } from "./role-run-path-rewrite.ts";
|
|
24
25
|
import { RUN_CURRENT_FILE, RUN_HISTORY_FILE, RUN_LOG_FILE, RUN_STATE_FILE, OFFICER_POINTER_RECORD_KIND } from "./run-dossier-files.ts";
|
|
25
26
|
import { appendSitianRecord } from "./sitian-appender.ts";
|
|
26
27
|
import { parseSitianRecordText } from "./sitian-reader.ts";
|
|
@@ -176,7 +177,16 @@ function render(
|
|
|
176
177
|
const whole: Record<string, unknown> = {};
|
|
177
178
|
for (const section of ["invocation", "admitted", "runState", "terminal"] as const) {
|
|
178
179
|
const page = lastPayloadOfKind(state, PAGE_ROW_KIND[section]);
|
|
179
|
-
if (page
|
|
180
|
+
if (page === undefined) continue;
|
|
181
|
+
// #1183: location fields track the directory being rendered; fact rows stay put.
|
|
182
|
+
if (
|
|
183
|
+
(section === "invocation" || section === "admitted" || section === "runState")
|
|
184
|
+
&& isRecord(page)
|
|
185
|
+
) {
|
|
186
|
+
whole[section] = projectRenderedPagePaths(page, runDirectory);
|
|
187
|
+
} else {
|
|
188
|
+
whole[section] = page;
|
|
189
|
+
}
|
|
180
190
|
}
|
|
181
191
|
let latest: Record<string, unknown> | undefined;
|
|
182
192
|
for (const row of history) {
|
package/src/session-identity.ts
CHANGED
|
@@ -29,6 +29,7 @@ export function createSessionIdentityAuthority(
|
|
|
29
29
|
const runDirectoryOf = (principal: DurablePrincipal): string =>
|
|
30
30
|
dirname(authority.decode(principal).sessionDirectory);
|
|
31
31
|
return {
|
|
32
|
+
principalAuthority: authority,
|
|
32
33
|
resolveSessionFile(principal) {
|
|
33
34
|
return authority.decode(principal).sessionFile;
|
|
34
35
|
},
|
package/src/submission-ledger.ts
CHANGED
|
@@ -19,7 +19,9 @@ import { findRunDirectoryById } from "./public-cli/run-lifecycle.ts";
|
|
|
19
19
|
import type { TerminalRoleName } from "./public-cli/terminal.ts";
|
|
20
20
|
import { isCorrectableExecuteError } from "./submission-correctable-error.ts";
|
|
21
21
|
import { failOnInfrastructureFailureDeclaration, infrastructureFailureDiagnostic } from "./package-contracts/terminating-infrastructure.ts";
|
|
22
|
+
import { reportTicketFromHostContext } from "./report-ticket-tool.ts";
|
|
22
23
|
import { REVIEW_SUBMISSION_OUTPUT_TOOL_NAME } from "./review-submission.ts";
|
|
24
|
+
import { readDeclaredTicketNumber } from "./run-ticket-number.ts";
|
|
23
25
|
|
|
24
26
|
import { isRecord, errorText } from "./unknown-value.ts";
|
|
25
27
|
|
|
@@ -554,6 +556,15 @@ export function createSubmissionLedgerHost(
|
|
|
554
556
|
host.registerTool({
|
|
555
557
|
...tool,
|
|
556
558
|
async execute(toolCallId, params, signal, update, context): Promise<HostToolResult<unknown>> {
|
|
559
|
+
// #1183: valid typed ticket on the submission is identity acquisition —
|
|
560
|
+
// bind/relocate once here, before reask / ledger restore / seal outcomes.
|
|
561
|
+
// Host return must not be the first placement (dossier-topology).
|
|
562
|
+
const typedTicket = isRecord(params)
|
|
563
|
+
? readDeclaredTicketNumber(params.ticketNumber)
|
|
564
|
+
: undefined;
|
|
565
|
+
if (typedTicket !== undefined) {
|
|
566
|
+
await reportTicketFromHostContext(context, typedTicket);
|
|
567
|
+
}
|
|
557
568
|
const runId = runIdentity(context);
|
|
558
569
|
const attemptId = attemptIdentity(context, runId);
|
|
559
570
|
const state = await stateFor(context, runId);
|