@akagilnc/pi-workflow-roles 0.1.5577 → 0.1.5593

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.
@@ -30,7 +30,6 @@ import {
30
30
  import { isSafePositiveTicketNumber, readBoardTicketNumber } from "../run-ticket-number.ts";
31
31
  import type { NotarySourceRunLocator } from "../notary-contracts.ts";
32
32
  import { NotarySourceRunError, resolveNotarySourceRunLocator } from "../notary-source-run.ts";
33
- import { engineSessionMaterialFromOptions, pickEngineAxis } from "../package-resources/engine-material.ts";
34
33
  import type { PackagedRole } from "../packaged-role-registry.ts";
35
34
  import {
36
35
  packagedAdmitsCountersign,
@@ -49,7 +48,6 @@ import {
49
48
  recordAdmittedCorrelation,
50
49
  recordChildDiaristRun,
51
50
  relocateAdmittedRunToTicket,
52
- withPreparedAttachments,
53
51
  type AdmittedCountersignInvocation,
54
52
  type AdmittedRoleInvocation,
55
53
  type PublicSeatParse,
@@ -302,13 +300,7 @@ function initialPrompt(
302
300
  if (reask !== undefined && "reaskPrompt" in record && record.reaskPrompt === true) {
303
301
  return reask;
304
302
  }
305
- return buildInstructionTransportPrompt(
306
- admitted,
307
- engineSessionMaterialFromOptions({
308
- ...pickEngineAxis(env),
309
- packageRoot: env.packageRoot,
310
- }),
311
- );
303
+ return buildInstructionTransportPrompt(admitted);
312
304
  }
313
305
 
314
306
  function isBoardTicketSeat(
@@ -439,10 +431,7 @@ async function dispatchAdmitted(
439
431
  admitted,
440
432
  roleTurnOptions(activeEnv, admitted, {
441
433
  kind: "resume",
442
- prompt: buildAutoResumeContinuationPrompt({
443
- packageRoot: activeEnv.packageRoot,
444
- ...pickEngineAxis(activeEnv),
445
- }),
434
+ prompt: buildAutoResumeContinuationPrompt(),
446
435
  }),
447
436
  ),
448
437
  adapters,
@@ -628,7 +617,7 @@ async function runCountersignBody(
628
617
  summons: {
629
618
  sourceRunPath: gateParentRunPath,
630
619
  instruction: resumeInstruction,
631
- instructionEmpty: resumeInstruction.trim() === "",
620
+ instructionEmpty: resumeInstruction.length === 0,
632
621
  },
633
622
  });
634
623
  if (resumed != null) return resumed;
@@ -644,12 +633,12 @@ async function runCountersignBody(
644
633
  }
645
634
 
646
635
  try {
647
- return await withPreparedAttachments(parsed.attachmentPaths ?? [], async (preparedAttachments) => {
636
+ {
648
637
  const materializeAdmission = async (ticketNumber?: number): Promise<void> => {
649
638
  await materializeCountersignInvocation(admitted, {
650
639
  home: env.home,
651
640
  principalAuthority: env.principalAuthority,
652
- preparedAttachments,
641
+ attachmentPaths: parsed.attachmentPaths ?? [],
653
642
  ...(env.model === undefined ? {} : { model: env.model }),
654
643
  ...(ticketNumber === undefined ? {} : { ticketNumber }),
655
644
  });
@@ -666,13 +655,7 @@ async function runCountersignBody(
666
655
  const turnProjection = roleTurnOptions(env, admitted, {
667
656
  kind: "initial",
668
657
  prompt: (env.reviewReask ?? env.gateReviewInstruction)
669
- ?? buildInstructionTransportPrompt(
670
- admitted,
671
- engineSessionMaterialFromOptions({
672
- ...pickEngineAxis(env),
673
- packageRoot: env.packageRoot,
674
- }),
675
- ),
658
+ ?? buildInstructionTransportPrompt(admitted),
676
659
  });
677
660
  const turnRequest = buildInstructionSeatTurnRequest(admitted, turnProjection);
678
661
  const result = await runPostAdmissionOneShot({
@@ -692,7 +675,7 @@ async function runCountersignBody(
692
675
  });
693
676
  await relocateAdmittedRunToTicket(admitted, env.principalAuthority);
694
677
  return result;
695
- });
678
+ }
696
679
  } catch (error) {
697
680
  const rejected = usageExit(error, io);
698
681
  if (rejected !== undefined) return rejected;
@@ -765,7 +748,7 @@ export async function runPublicInstructionSeat(
765
748
  const summons: SameTicketSummonsMaterials = {
766
749
  ...sameParentInstruction(env, {
767
750
  instruction: parsed.instruction ?? "",
768
- instructionEmpty: (parsed.instruction ?? "").trim() === "",
751
+ instructionEmpty: (parsed.instruction ?? "").length === 0,
769
752
  }),
770
753
  attachmentPaths: parsed.attachmentPaths ?? [],
771
754
  };
@@ -791,7 +774,7 @@ export async function runPublicInstructionSeat(
791
774
  sourceRunPath: parentRunPath,
792
775
  ...sameParentInstruction(env, {
793
776
  instruction: parsed.instruction ?? "",
794
- instructionEmpty: (parsed.instruction ?? "").trim() === "",
777
+ instructionEmpty: (parsed.instruction ?? "").length === 0,
795
778
  }),
796
779
  attachmentPaths: parsed.attachmentPaths ?? [],
797
780
  };
@@ -881,7 +864,7 @@ export async function runPublicInstructionSeat(
881
864
  instruction: parsed.instruction ?? "",
882
865
  projectRoot: admitted.projectRoot,
883
866
  failureLabel: "secretariat unbound summons",
884
- attachmentPaths: admitted.attachments.map((attachment) => attachment.frozenPath),
867
+ attachmentPaths: admitted.attachments.map((attachment) => attachment.path),
885
868
  correlationId: admitted.runId,
886
869
  }, env, io);
887
870
  } catch (error) {