@akagilnc/pi-workflow-roles 0.1.3641 → 0.1.3644

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.
@@ -4226,13 +4226,6 @@ function instructResumeHandbookRead(prompt, engineMaterial) {
4226
4226
  return line2;
4227
4227
  }).join("\n");
4228
4228
  }
4229
- function appendResumeMaterialReread(prompt, materialPath) {
4230
- const instruction = resumeRereadInstruction(materialPath, false);
4231
- const lines = prompt.split("\n");
4232
- if (lines.includes(instruction)) return prompt;
4233
- return prompt.length === 0 ? instruction : `${prompt}
4234
- ${instruction}`;
4235
- }
4236
4229
  function selectResumeContinuationPrompt(message, engineMaterial) {
4237
4230
  const base = message !== void 0 ? message : RESUME_TRANSPORT_ENVELOPE;
4238
4231
  return instructResumeHandbookRead(
@@ -16592,24 +16585,16 @@ async function dispatchPostAdmissionTurn(input) {
16592
16585
  }
16593
16586
  }
16594
16587
  function resumeTurnRequestProjectionOptions(admitted, request, env, summonsPrepared) {
16595
- const engineMaterial = engineSessionMaterialFromOptions({
16596
- ...env.engine === void 0 ? {} : { engine: env.engine },
16597
- packageRoot: env.packageRoot
16598
- });
16599
16588
  let prompt;
16600
16589
  if (request.message !== void 0) {
16601
- if (summonsPrepared !== void 0 && summonsPrepared.attachments.length > 0) {
16602
- prompt = instructResumeHandbookRead(
16603
- buildInstructionTransportPrompt(
16604
- {
16605
- instruction: request.message,
16606
- instructionEmpty: false,
16607
- attachments: summonsPrepared.attachments
16608
- },
16609
- engineMaterial
16610
- ),
16611
- engineMaterial
16612
- );
16590
+ if (summonsPrepared !== void 0) {
16591
+ prompt = buildInstructionTransportPrompt({
16592
+ instruction: request.message,
16593
+ instructionEmpty: false,
16594
+ attachments: summonsPrepared.attachments
16595
+ });
16596
+ } else if (request.summons !== void 0) {
16597
+ prompt = request.message;
16613
16598
  } else {
16614
16599
  prompt = buildResumeContinuationPrompt({
16615
16600
  packageRoot: env.packageRoot,
@@ -16618,10 +16603,9 @@ function resumeTurnRequestProjectionOptions(admitted, request, env, summonsPrepa
16618
16603
  });
16619
16604
  }
16620
16605
  } else if (summonsPrepared !== void 0) {
16621
- prompt = instructResumeHandbookRead(
16622
- buildInstructionTransportPrompt(summonsPrepared, engineMaterial),
16623
- engineMaterial
16624
- );
16606
+ prompt = buildInstructionTransportPrompt(summonsPrepared);
16607
+ } else if (request.summons !== void 0) {
16608
+ prompt = RESUME_TRANSPORT_ENVELOPE;
16625
16609
  } else {
16626
16610
  prompt = buildResumeContinuationPrompt({
16627
16611
  packageRoot: env.packageRoot,
@@ -16936,7 +16920,6 @@ var init_post_admission = __esm({
16936
16920
  init_cli_errors();
16937
16921
  init_invocation();
16938
16922
  init_activation_ledger_topology();
16939
- init_engine_material();
16940
16923
  init_host_transition_prior_native();
16941
16924
  init_public_run_credentials();
16942
16925
  init_run_lifecycle();
@@ -16981,7 +16964,6 @@ __export(notary_run_exports, {
16981
16964
  runPublicNotary: () => runPublicNotary,
16982
16965
  runPublicNotaryResume: () => runPublicNotaryResume
16983
16966
  });
16984
- import { existsSync as existsSync9 } from "node:fs";
16985
16967
  function buildNotaryTurnRequest(admitted, options) {
16986
16968
  return projectRoleTurnRequest(
16987
16969
  admitted,
@@ -17123,19 +17105,14 @@ async function runPublicNotaryResume(request, env, io) {
17123
17105
  }
17124
17106
  return loaded;
17125
17107
  },
17126
- buildTurnRequest: (admitted, effective) => {
17127
- const projection = resumeTurnRequestProjectionOptions(
17108
+ buildTurnRequest: (admitted, effective) => (
17109
+ // #755: review continuation is plain dialogue / resume envelope — no
17110
+ //「重新读」candidate line, no engine handbook packaging.
17111
+ buildNotaryTurnRequest(
17128
17112
  admitted,
17129
- effective,
17130
- env
17131
- );
17132
- const candidatePath = gateSubmissionCandidatePath(admitted.sourceRunPath);
17133
- const prompt = existsSync9(candidatePath) ? appendResumeMaterialReread(projection.continuation.prompt, candidatePath) : projection.continuation.prompt;
17134
- return buildNotaryTurnRequest(admitted, {
17135
- ...projection,
17136
- continuation: { kind: "resume", prompt }
17137
- });
17138
- },
17113
+ resumeTurnRequestProjectionOptions(admitted, effective, env)
17114
+ )
17115
+ ),
17139
17116
  adapters: notaryAdapters(),
17140
17117
  ...env.engine === void 0 ? {} : { effectiveEngine: env.engine }
17141
17118
  });
@@ -17143,7 +17120,6 @@ async function runPublicNotaryResume(request, env, io) {
17143
17120
  var init_notary_run = __esm({
17144
17121
  "src/public-cli/notary-run.ts"() {
17145
17122
  "use strict";
17146
- init_auditor_dossier_tool();
17147
17123
  init_notary_source_run();
17148
17124
  init_engine_material();
17149
17125
  init_cli_errors();
@@ -17840,7 +17816,7 @@ __export(public_role_summons_exports, {
17840
17816
  summonGateOfficer: () => summonGateOfficer,
17841
17817
  summonPublicRole: () => summonPublicRole
17842
17818
  });
17843
- import { existsSync as existsSync10 } from "node:fs";
17819
+ import { existsSync as existsSync9 } from "node:fs";
17844
17820
  import { join as join27 } from "node:path";
17845
17821
  function createCapturingIo() {
17846
17822
  const chunks = [];
@@ -17864,7 +17840,7 @@ function parentDir(path) {
17864
17840
  function walkPackageRoot(start) {
17865
17841
  let dir = start;
17866
17842
  for (let i = 0; i < 12; i += 1) {
17867
- if (existsSync10(join27(dir, "package.json")) && existsSync10(join27(dir, "souls"))) {
17843
+ if (existsSync9(join27(dir, "package.json")) && existsSync9(join27(dir, "souls"))) {
17868
17844
  return dir;
17869
17845
  }
17870
17846
  const parent = parentDir(dir);
@@ -18325,7 +18301,7 @@ __export(archivist_record_entry_exports, {
18325
18301
  createRecordSessionOpen: () => createRecordSessionOpen,
18326
18302
  subjectKeyedRecordDirectory: () => subjectKeyedRecordDirectory
18327
18303
  });
18328
- import { existsSync as existsSync11, mkdirSync as mkdirSync4, readFileSync as readFileSync5, realpathSync as realpathSync2, writeFileSync as writeFileSync5 } from "node:fs";
18304
+ import { existsSync as existsSync10, mkdirSync as mkdirSync4, readFileSync as readFileSync5, realpathSync as realpathSync2, writeFileSync as writeFileSync5 } from "node:fs";
18329
18305
  import { dirname as dirname13, resolve as resolve13, join as join29 } from "node:path";
18330
18306
  import { SessionManager } from "@earendil-works/pi-coding-agent";
18331
18307
  function readCurrentSession(sessionDir) {
@@ -18408,7 +18384,7 @@ function createRecordSessionOpen(options) {
18408
18384
  sessionDir = physicallyContainedIn(ledgerHome, parentResolved) ? join29(dirname13(parentResolved), options.kind) : join29(activationBookDirectory(ledgerHome, resolveBookKeyFromGit(cwd)), options.kind);
18409
18385
  parentSession = parentFile;
18410
18386
  }
18411
- const nestAlreadyExists = existsSync11(sessionDir);
18387
+ const nestAlreadyExists = existsSync10(sessionDir);
18412
18388
  ensureRealDirectoryTree(ledgerHome, sessionDir);
18413
18389
  const mayResumeSameNest = options.subject !== void 0 || options.kind === WORKER_SUBMISSION_GATE_KIND;
18414
18390
  if (mayResumeSameNest && nestAlreadyExists) {
@@ -18426,7 +18402,7 @@ function createRecordSessionOpen(options) {
18426
18402
  );
18427
18403
  if (session.isPersisted()) {
18428
18404
  const file = session.getSessionFile();
18429
- if (file !== void 0 && !existsSync11(file)) {
18405
+ if (file !== void 0 && !existsSync10(file)) {
18430
18406
  const header = session.getHeader();
18431
18407
  if (header !== null && header.type === "session") {
18432
18408
  writeFileSync5(file, `${JSON.stringify(header)}
@@ -22076,7 +22052,7 @@ init_sitian_facade();
22076
22052
  init_submission_errors();
22077
22053
  init_submission_errors();
22078
22054
  import { execFileSync as execFileSync4 } from "node:child_process";
22079
- import { existsSync as existsSync12, lstatSync as lstatSync3, readdirSync as readdirSync2, readFileSync as readFileSync6, rmdirSync, rmSync } from "node:fs";
22055
+ import { existsSync as existsSync11, lstatSync as lstatSync3, readdirSync as readdirSync2, readFileSync as readFileSync6, rmdirSync, rmSync } from "node:fs";
22080
22056
  import { resolve as resolve18 } from "node:path";
22081
22057
  var WORKER_SUBMISSION_GATE_RECORD_KIND = WORKER_SUBMISSION_GATE_KIND;
22082
22058
  var WORKER_COMMIT_BASELINE_ENTRY_TYPE = "commit-baseline";
@@ -22107,7 +22083,7 @@ function statusOf(error) {
22107
22083
  return typeof error === "object" && error !== null && "status" in error ? error.status : void 0;
22108
22084
  }
22109
22085
  function tryGetAll(file, key) {
22110
- if (!existsSync12(file)) return [];
22086
+ if (!existsSync11(file)) return [];
22111
22087
  try {
22112
22088
  const out = gitFile(file, ["--get-all", key]);
22113
22089
  return out.length === 0 ? [] : out.split("\n");
@@ -22117,7 +22093,7 @@ function tryGetAll(file, key) {
22117
22093
  }
22118
22094
  }
22119
22095
  function ownedHook(path) {
22120
- if (!existsSync12(path)) return false;
22096
+ if (!existsSync11(path)) return false;
22121
22097
  return readFileSync6(path, "utf8").includes(HOOK_MARKER);
22122
22098
  }
22123
22099
  function escapeGitConfigValueRegex(value) {
@@ -22144,11 +22120,11 @@ function rmOwnedDir(dir) {
22144
22120
  const hookPath = resolve18(dir, HOOK_FILE);
22145
22121
  if (!ownedHook(hookPath)) return;
22146
22122
  rmSync(hookPath, { force: true });
22147
- if (existsSync12(dir) && readdirSync2(dir).length === 0) rmdirSync(dir);
22123
+ if (existsSync11(dir) && readdirSync2(dir).length === 0) rmdirSync(dir);
22148
22124
  }
22149
22125
  function linkedGitDirs(commonDir) {
22150
22126
  const root = resolve18(commonDir, "worktrees");
22151
- if (!existsSync12(root)) return [];
22127
+ if (!existsSync11(root)) return [];
22152
22128
  return readdirSync2(root).map((name) => resolve18(root, name)).filter((dir) => lstatSync3(dir).isDirectory());
22153
22129
  }
22154
22130
  function uninstallPackageWorkerHooks(cwd) {