@akagilnc/pi-workflow-roles 0.1.5683 → 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.
@@ -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);