@akagilnc/pi-workflow-roles 0.1.4631 → 0.1.4641

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.
@@ -8182,6 +8182,14 @@ var init_gatekeeper_output = __esm({
8182
8182
  }
8183
8183
  });
8184
8184
 
8185
+ // src/run-terminal-artifacts.ts
8186
+ var init_run_terminal_artifacts = __esm({
8187
+ "src/run-terminal-artifacts.ts"() {
8188
+ "use strict";
8189
+ init_role_run_placement();
8190
+ }
8191
+ });
8192
+
8185
8193
  // src/gatekeeper-role.ts
8186
8194
  var init_gatekeeper_role = __esm({
8187
8195
  "src/gatekeeper-role.ts"() {
@@ -8190,6 +8198,7 @@ var init_gatekeeper_role = __esm({
8190
8198
  init_submission_errors();
8191
8199
  init_inspector_contracts();
8192
8200
  init_gatekeeper_output();
8201
+ init_run_terminal_artifacts();
8193
8202
  init_submission_errors();
8194
8203
  }
8195
8204
  });
@@ -288,6 +288,10 @@ export async function runPublicCountersign(argv, env, io, parseCountersignArgv)
288
288
  instruction: parsed.instruction,
289
289
  projectRoot: admitted.projectRoot,
290
290
  failureLabel: "unbound summons",
291
+ // #969: parent durable ticket is the resume/bind key (ADR 0079).
292
+ ...(env.boundTicketNumber === undefined
293
+ ? {}
294
+ : { boundTicketNumber: env.boundTicketNumber }),
291
295
  }, env, io);
292
296
  }
293
297
  catch (error) {
@@ -321,16 +325,30 @@ export async function runPublicCountersign(argv, env, io, parseCountersignArgv)
321
325
  }, countersignAdapters(), env.principalAuthority, io);
322
326
  }
323
327
  // Missing lawful 起居郎 terminal is not countersign body failure: leave
324
- // unbound and continue (true-unbound face). Escalate / typed failure above;
325
- // bound refresh still fails honest via runCountersignCourtDiaristStation.
328
+ // unbound and continue (true-unbound face) — unless parent gate handoff
329
+ // already carries the durable board ticket (#969). Escalate / typed
330
+ // failure above; bound refresh still fails honest via station.
326
331
  if (outcome.identity.kind === "ticket") {
327
- const assertedTicket = outcome.identity.ticketNumber;
328
- typedTicket = assertedTicket;
332
+ // #969: parent durable handoff wins over 起居郎 re-assert when both
333
+ // present (receipt/assert mismatch → parent resume key).
334
+ typedTicket = isSafePositiveTicketNumber(env.boundTicketNumber)
335
+ ? env.boundTicketNumber
336
+ : outcome.identity.ticketNumber;
329
337
  // #871: identity may hand a co-review set; absent field defaults to [main].
330
338
  typedCourtTicketNumbers = outcome.identity.courtTicketNumbers;
339
+ }
340
+ else if (isSafePositiveTicketNumber(env.boundTicketNumber)) {
341
+ // Parent board handoff present; 起居郎 returned true-unbound — still
342
+ // resume/bind under the parent key (omitted receipt ticketNumber path).
343
+ typedTicket = env.boundTicketNumber;
344
+ }
345
+ if (typedTicket !== undefined) {
346
+ // #969/#879: gate re-ask / parent submission body share summons.instruction
347
+ // (reask wins; argv instruction remains the 起居郎 identity face above).
348
+ const resumeInstruction = env.reviewReask ?? env.gateReviewInstruction ?? parsed.instruction;
331
349
  const summons = {
332
- instruction: parsed.instruction,
333
- instructionEmpty: parsed.instruction.trim() === "",
350
+ instruction: resumeInstruction,
351
+ instructionEmpty: resumeInstruction.trim() === "",
334
352
  };
335
353
  const resumed = await tryResumeSameTicketSeatRun({
336
354
  home: env.home,
@@ -407,10 +425,13 @@ export async function runPublicCountersign(argv, env, io, parseCountersignArgv)
407
425
  : { correlationId: env.correlationId }),
408
426
  continuation: {
409
427
  kind: "initial",
410
- prompt: buildCountersignTransportPrompt(admitted, engineSessionMaterialFromOptions({
411
- ...pickEngineAxis(env),
412
- packageRoot: env.packageRoot,
413
- })),
428
+ // #969/#879: gate path first mint carries parent payload as dialogue content;
429
+ // ordinary public entry keeps package transport prompt.
430
+ prompt: (env.reviewReask ?? env.gateReviewInstruction)
431
+ ?? buildCountersignTransportPrompt(admitted, engineSessionMaterialFromOptions({
432
+ ...pickEngineAxis(env),
433
+ packageRoot: env.packageRoot,
434
+ })),
414
435
  },
415
436
  };
416
437
  // Mutable shell: ticket bind re-projects activation before executeTurn.