@akagilnc/pi-workflow-roles 0.1.5365 → 0.1.5375
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 +5585 -5655
- package/dist/activation-ledger-git.js +2 -2
- package/dist/activation-ledger-topology.js +1 -7
- package/dist/analyst-entry.js +4 -8
- package/dist/analyst-gate-cycles-read.js +3 -11
- package/dist/analyst-index.js +3 -9
- package/dist/analyst-ledger.js +1 -11
- package/dist/analyst-metric-families/acceptance-success-rework.js +1 -3
- package/dist/analyst-metric-families/round-timeline.js +1 -3
- package/dist/analyst-page.js +2 -2
- package/dist/archivist-record-topology.js +2 -2
- package/dist/audit-escalation.js +2 -1
- package/dist/auditor-soul.js +2 -1
- package/dist/collector-config.js +6 -8
- package/dist/compliance-transport.js +2 -1
- package/dist/countersign-contracts.js +2 -1
- package/dist/diarist-contracts.js +3 -2
- package/dist/doctor-contracts.js +1 -3
- package/dist/doctor-evidence.js +7 -8
- package/dist/dossier-resolution.js +1 -3
- package/dist/engine-detour-usage.js +1 -3
- package/dist/gatekeeper-role.js +2 -9
- package/dist/gleaner-left-contracts.js +2 -1
- package/dist/headless-host/description.js +14 -17
- package/dist/headless-host/production-host.js +1665 -1737
- package/dist/host-session-record.js +3 -2
- package/dist/inspector-contracts.js +2 -1
- package/dist/ledger-session-read.js +1 -3
- package/dist/merger-contracts.js +9 -9
- package/dist/migrate-book-topology.js +348 -314
- package/dist/navigator-attendance.js +9 -11
- package/dist/navigator-invocation-identity.js +3 -2
- package/dist/navigator-public-session.js +3 -5
- package/dist/navigator-session-contracts.js +8 -10
- package/dist/navigator-work-base.js +5 -8
- package/dist/notary-contracts.js +3 -5
- package/dist/package-contracts/auditor-output.js +1 -3
- package/dist/package-contracts/fixer-packet.js +3 -6
- package/dist/package-contracts/gatekeeper-output.js +1 -3
- package/dist/package-contracts/navigator-output.js +8 -8
- package/dist/package-contracts/terminating-infrastructure.js +5 -9
- package/dist/package-contracts/terminating-tools.js +4 -3
- package/dist/public-cli/analyst-run.js +3 -2
- package/dist/public-cli/auto-resume.js +4 -9
- package/dist/public-cli/cli.js +66 -64
- package/dist/public-cli/config.js +12 -11
- package/dist/public-cli/countersign-run.js +1 -3
- package/dist/public-cli/host-providers.js +7 -14
- package/dist/public-cli/instruction-seat-run.js +69 -43
- package/dist/public-cli/invocation.js +141 -136
- package/dist/public-cli/main.js +1919 -1968
- package/dist/public-cli/post-admission.js +89 -89
- package/dist/public-cli/role-seat-runtime.js +29 -0
- package/dist/public-cli/run-lifecycle.js +20 -32
- package/dist/public-cli/settlement.js +10 -26
- package/dist/public-cli/turn-request.js +14 -0
- package/dist/public-role-summons.js +23 -35
- package/dist/receipt-delivery-policy.js +1 -3
- package/dist/role-run-placement.js +7 -5
- package/dist/role-run-relocation.js +12 -19
- package/dist/run-terminal-artifacts.js +1 -11
- package/dist/run-ticket-number.js +2 -4
- package/dist/session-assistant-usage.js +2 -1
- package/dist/session-dialogue.js +1 -14
- package/dist/sitian-reader.js +2 -4
- package/dist/submission-correctable-error.js +2 -1
- package/dist/submission-errors.js +2 -1
- package/dist/submission-gate.js +2 -1
- package/dist/submission-ledger.js +4 -5
- package/dist/ticket-provenance-contracts.js +1 -3
- package/dist/ticket-provenance.js +2 -1
- package/dist/typed-provider-http.js +4 -7
- package/dist/unknown-value.js +28 -0
- package/dist/user-dialogue-stdin.js +2 -1
- package/package.json +1 -1
- package/src/acp-host/role-turn-host.ts +4 -2
- package/src/activation-ledger-git.ts +3 -2
- package/src/activation-ledger-topology.ts +4 -12
- package/src/analyst-entry.ts +3 -11
- package/src/analyst-gate-cycles-read.ts +3 -15
- package/src/analyst-index.ts +3 -13
- package/src/analyst-ledger.ts +2 -16
- package/src/analyst-metric-families/acceptance-success-rework.ts +2 -4
- package/src/analyst-metric-families/round-timeline.ts +2 -4
- package/src/analyst-page.ts +2 -2
- package/src/archivist-record-topology.ts +2 -2
- package/src/audit-escalation.ts +2 -1
- package/src/auditor-soul.ts +3 -1
- package/src/book-topology-migration-placement.ts +8 -21
- package/src/book-topology-migrators-t11.ts +16 -15
- package/src/book-topology-mixed-volume-migrators.ts +3 -6
- package/src/book-topology-record-class-migrators.ts +7 -10
- package/src/book-topology-runs-migrator.ts +4 -3
- package/src/collector-config.ts +7 -9
- package/src/compliance-transport.ts +2 -1
- package/src/countersign-contracts.ts +2 -1
- package/src/diarist-contracts.ts +3 -2
- package/src/doctor-contracts.ts +3 -1
- package/src/doctor-evidence.ts +8 -7
- package/src/doctor-role.ts +4 -2
- package/src/dossier-resolution.ts +2 -4
- package/src/engine-detour-tool.ts +0 -2
- package/src/engine-detour-usage.ts +2 -4
- package/src/external-host-turn-loop.ts +3 -1
- package/src/factory-board.ts +1 -8
- package/src/gatekeeper-role.ts +2 -10
- package/src/gleaner-left-contracts.ts +3 -1
- package/src/headless-host/description.ts +15 -18
- package/src/headless-host/role-turn-host.ts +10 -9
- package/src/host-session-record.ts +4 -2
- package/src/inspector-contracts.ts +2 -1
- package/src/ledger-session-read.ts +2 -5
- package/src/merger-contracts.ts +10 -9
- package/src/navigator-attendance.ts +10 -12
- package/src/navigator-invocation-identity.ts +3 -2
- package/src/navigator-public-session.ts +4 -6
- package/src/navigator-session-contracts.ts +8 -11
- package/src/navigator-work-base.ts +5 -8
- package/src/navigator-work-context.ts +2 -1
- package/src/notary-contracts.ts +4 -6
- package/src/oauth-keepalive.ts +5 -18
- package/src/package-contracts/auditor-output.ts +2 -4
- package/src/package-contracts/fixer-packet.ts +4 -6
- package/src/package-contracts/gatekeeper-output.ts +2 -4
- package/src/package-contracts/judge-output.ts +0 -1
- package/src/package-contracts/navigator-output.ts +8 -8
- package/src/package-contracts/terminating-infrastructure.ts +6 -20
- package/src/package-contracts/terminating-tools.ts +8 -12
- package/src/pi/adapter.ts +0 -1
- package/src/pi/role-turn-host.ts +0 -1
- package/src/public-cli/analyst-run.ts +4 -2
- package/src/public-cli/auto-resume.ts +5 -12
- package/src/public-cli/cli.ts +77 -83
- package/src/public-cli/config.ts +16 -27
- package/src/public-cli/countersign-run.ts +2 -4
- package/src/public-cli/host-providers.ts +10 -27
- package/src/public-cli/instruction-seat-run.ts +87 -58
- package/src/public-cli/invocation.ts +159 -172
- package/src/public-cli/post-admission.ts +115 -103
- package/src/public-cli/role-seat-runtime.ts +72 -0
- package/src/public-cli/run-lifecycle.ts +27 -67
- package/src/public-cli/settlement.ts +11 -33
- package/src/public-cli/terminal.ts +2 -17
- package/src/public-cli/turn-request.ts +26 -0
- package/src/public-role-summons.ts +24 -48
- package/src/receipt-delivery-policy.ts +1 -4
- package/src/reviewer-role.ts +0 -1
- package/src/role-envelope.ts +5 -3
- package/src/role-run-placement.ts +9 -10
- package/src/role-run-relocation.ts +13 -23
- package/src/role-runtime.ts +9 -15
- package/src/run-terminal-artifacts.ts +2 -16
- package/src/run-ticket-number.ts +4 -10
- package/src/session-assistant-usage.ts +3 -1
- package/src/session-dialogue.ts +1 -4
- package/src/session-identity.ts +0 -1
- package/src/sitian-reader.ts +2 -4
- package/src/submission-correctable-error.ts +3 -1
- package/src/submission-errors.ts +2 -1
- package/src/submission-gate.ts +3 -1
- package/src/submission-ledger.ts +5 -6
- package/src/ticket-provenance-contracts.ts +1 -4
- package/src/ticket-provenance.ts +3 -1
- package/src/ticket-snapshot.ts +2 -4
- package/src/ticket-trajectory.ts +1 -8
- package/src/typed-provider-http.ts +5 -15
- package/src/unknown-value.ts +34 -0
- package/src/user-dialogue-stdin.ts +3 -1
- package/src/worker-role.ts +2 -5
- package/src/worker-submission-gates.ts +5 -7
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Seat differences are composition-root fields. An omitted reviewer lens
|
|
4
4
|
* starts two ordinary single-axis runs here.
|
|
5
5
|
*/
|
|
6
|
-
import { dirname, resolve
|
|
6
|
+
import { dirname, resolve } from "node:path";
|
|
7
|
+
import { isUnboundRunDirectory } from "../role-run-placement.js";
|
|
7
8
|
import { AUDITOR_DOSSIER_PROMPT } from "../compliance-transport.js";
|
|
8
9
|
import { bookDirectOfficerRunPointer } from "../archivist-record-pointer.js";
|
|
9
10
|
import { createPiDoctorAuditor } from "../doctor-auditor.js";
|
|
@@ -22,7 +23,7 @@ import { isSafePositiveTicketNumber, readBoardTicketNumber } from "../run-ticket
|
|
|
22
23
|
import { NotarySourceRunError, resolveNotarySourceRunLocator } from "../notary-source-run.js";
|
|
23
24
|
import { engineSessionMaterialFromOptions, pickEngineAxis } from "../package-resources/engine-material.js";
|
|
24
25
|
import { packagedAdmitsCountersign, packagedBindsBoardTicket, packagedRebindSourceOnResume, packagedRoleMetadata, } from "../packaged-role-registry.js";
|
|
25
|
-
import {
|
|
26
|
+
import { readAuditorResumeBinding } from "../auditor-soul.js";
|
|
26
27
|
import { CliUsageError } from "./cli-errors.js";
|
|
27
28
|
import { admitPublicRole, bindAdmittedTicketNumber, buildInstructionTransportPrompt, materializeCountersignInvocation, persistAdmittedSourceRunPath, recordAdmittedCorrelation, recordChildDiaristRun, relocateAdmittedRunToTicket, withPreparedAttachments, } from "./invocation.js";
|
|
28
29
|
import { presentControlledFailure, prepareSummonsResumeMaterials, roleTurnOptions, runPostAdmissionOneShot, runPostAdmissionResumable, runPostAdmissionSeatResume, showResumeErrorPointer, resumeTurnRequestProjectionOptions, } from "./post-admission.js";
|
|
@@ -31,8 +32,9 @@ import { tryResumeSameTicketSeatRun } from "./seat-ticket-binding.js";
|
|
|
31
32
|
import { presentStructuralRejection, readBoundSessionEntries, seatKnownFailureResolver, attachPostAuditProjection, trySettlePublicSeat, } from "./settlement.js";
|
|
32
33
|
import { warnMissingMethodSkills } from "./machine-method-skills.js";
|
|
33
34
|
import { formatTerminalResult, isLawfulTypedTerminalOutcome, } from "./terminal.js";
|
|
34
|
-
import { admittedSeatTurnDetails, projectRoleTurnRequest, requiredMethodSkills, } from "./turn-request.js";
|
|
35
|
+
import { admittedSeatTurnDetails, projectPublicTurnAxes, projectRoleTurnRequest, requiredMethodSkills, } from "./turn-request.js";
|
|
35
36
|
import { invokeCourtDiarist, latestPayloadEscalated, } from "./countersign-run.js";
|
|
37
|
+
import { isRecord, errorText } from "../unknown-value.js";
|
|
36
38
|
const AUDITED_ROLES = new Set(["judge", "fixer", "coder", "secretariat", "countersign", "doctor"]);
|
|
37
39
|
const SECRETARIAT_STATUS_REASK = "secretariatStatus 不是 converged、escalate 之一。请重新交卷,secretariatStatus 写明其一。";
|
|
38
40
|
const COUNTERSIGN_STATUS_REASK = "status 不是 converged、continue、escalate 三态之一。请重新交卷,status 写明其一。";
|
|
@@ -73,7 +75,7 @@ function unreadablePostSubmissionStatus(admitted, terminal) {
|
|
|
73
75
|
if (route === undefined)
|
|
74
76
|
return undefined;
|
|
75
77
|
const payload = terminal.roleOutcome.payloads?.at(-1);
|
|
76
|
-
const status =
|
|
78
|
+
const status = isRecord(payload)
|
|
77
79
|
? payload.status
|
|
78
80
|
: undefined;
|
|
79
81
|
return typeof status === "string" && route.statuses.has(status)
|
|
@@ -309,6 +311,29 @@ async function runOmittedLensBatch(argv, parsed, env, io) {
|
|
|
309
311
|
io.stdout(formatTerminalResult(terminal));
|
|
310
312
|
return { exitCode: failed ? 1 : 0, terminal };
|
|
311
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* One same-parent lookup. Seat branches still build their own summons.
|
|
316
|
+
* A found child resumes that child; no prior run returns undefined so the caller mints.
|
|
317
|
+
*/
|
|
318
|
+
function resumeSameParentInstructionSeat(input) {
|
|
319
|
+
return tryResumeSameTicketSeatRun({
|
|
320
|
+
home: input.env.home,
|
|
321
|
+
projectRoot: input.projectRoot,
|
|
322
|
+
role: input.role,
|
|
323
|
+
parentRunPath: input.parentRunPath,
|
|
324
|
+
...(input.ticketNumber === undefined ? {} : { ticketNumber: input.ticketNumber }),
|
|
325
|
+
freshSummons: input.env.freshSummons,
|
|
326
|
+
summons: input.summons,
|
|
327
|
+
resume: (runId, materials) => runPublicInstructionSeatResume({ runId, ...(materials === undefined ? {} : { summons: materials }) }, input.env, input.io),
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/** Re-ask words when the parent supplied them; otherwise the caller's own instruction. */
|
|
331
|
+
function sameParentInstruction(env, fallback) {
|
|
332
|
+
const resumeInstruction = env.reviewReask ?? env.gateReviewInstruction;
|
|
333
|
+
if (resumeInstruction === undefined)
|
|
334
|
+
return fallback;
|
|
335
|
+
return { instruction: resumeInstruction, instructionEmpty: false };
|
|
336
|
+
}
|
|
312
337
|
/**
|
|
313
338
|
* Countersign on the shared entry: gate parent resume, deferred materialization,
|
|
314
339
|
* then the same one-shot settlement as every other seat.
|
|
@@ -319,19 +344,20 @@ async function runCountersignBody(parsed, env, io) {
|
|
|
319
344
|
: undefined;
|
|
320
345
|
if (gateParentRunPath !== undefined) {
|
|
321
346
|
const resumeInstruction = env.reviewReask ?? env.gateReviewInstruction ?? parsed.instruction ?? "";
|
|
322
|
-
const resumed = await
|
|
323
|
-
|
|
347
|
+
const resumed = await resumeSameParentInstructionSeat({
|
|
348
|
+
env,
|
|
349
|
+
io,
|
|
324
350
|
projectRoot: resolve(parsed.project ?? env.cwd),
|
|
325
351
|
role: "countersign",
|
|
326
352
|
parentRunPath: gateParentRunPath,
|
|
327
|
-
...(isSafePositiveTicketNumber(env.boundTicketNumber)
|
|
328
|
-
|
|
353
|
+
...(isSafePositiveTicketNumber(env.boundTicketNumber)
|
|
354
|
+
? { ticketNumber: env.boundTicketNumber }
|
|
355
|
+
: {}),
|
|
329
356
|
summons: {
|
|
330
357
|
sourceRunPath: gateParentRunPath,
|
|
331
358
|
instruction: resumeInstruction,
|
|
332
359
|
instructionEmpty: resumeInstruction.trim() === "",
|
|
333
360
|
},
|
|
334
|
-
resume: (runId, materials) => runPublicInstructionSeatResume({ runId, ...(materials === undefined ? {} : { summons: materials }) }, env, io),
|
|
335
361
|
});
|
|
336
362
|
if (resumed != null)
|
|
337
363
|
return resumed;
|
|
@@ -364,12 +390,7 @@ async function runCountersignBody(parsed, env, io) {
|
|
|
364
390
|
admitted = { ...admitted, sourceRunPath: gateParentRunPath };
|
|
365
391
|
}
|
|
366
392
|
const turnProjection = {
|
|
367
|
-
|
|
368
|
-
home: env.home,
|
|
369
|
-
agentDir: env.agentDir,
|
|
370
|
-
...(env.model === undefined ? {} : { model: env.model }),
|
|
371
|
-
...pickEngineAxis(env),
|
|
372
|
-
...(env.timeoutMs === undefined ? {} : { timeoutMs: env.timeoutMs }),
|
|
393
|
+
...projectPublicTurnAxes(env),
|
|
373
394
|
...(env.correlationId === undefined || env.correlationId.trim() === ""
|
|
374
395
|
? {}
|
|
375
396
|
: { correlationId: env.correlationId }),
|
|
@@ -446,47 +467,47 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
|
|
|
446
467
|
let auditorSubject;
|
|
447
468
|
let auditorSource;
|
|
448
469
|
let auditorTicket;
|
|
470
|
+
let resolvedNotarySource;
|
|
449
471
|
if (record.sameParent === "subject-source") {
|
|
450
|
-
if (
|
|
472
|
+
if (parsed.subject === undefined) {
|
|
451
473
|
presentStructuralRejection(new CliUsageError("auditor --subject requires judge|doctor"), io);
|
|
452
474
|
return { exitCode: 2 };
|
|
453
475
|
}
|
|
454
476
|
auditorSubject = parsed.subject;
|
|
455
|
-
|
|
456
|
-
if (source === "") {
|
|
477
|
+
if (parsed.sourceRun === undefined) {
|
|
457
478
|
presentStructuralRejection(new CliUsageError("auditor --source-run requires a run locator"), io);
|
|
458
479
|
return { exitCode: 2 };
|
|
459
480
|
}
|
|
481
|
+
const source = parsed.sourceRun;
|
|
460
482
|
try {
|
|
461
483
|
const resolved = await resolveNotarySourceRunLocator({ projectRoot, sourceRun: source, home: env.home });
|
|
462
484
|
auditorSource = resolved.runDirectory;
|
|
463
485
|
auditorTicket = await readBoardTicketNumber(resolved.runDirectory);
|
|
464
486
|
}
|
|
465
487
|
catch (error) {
|
|
466
|
-
presentStructuralRejection(new CliUsageError(
|
|
488
|
+
presentStructuralRejection(new CliUsageError(errorText(error)), io);
|
|
467
489
|
return { exitCode: 2 };
|
|
468
490
|
}
|
|
469
491
|
if (auditorSource === undefined)
|
|
470
492
|
return { exitCode: 2 };
|
|
471
493
|
const sourceDirectory = auditorSource;
|
|
472
|
-
const resumeInstruction = env.reviewReask ?? env.gateReviewInstruction;
|
|
473
494
|
const summons = {
|
|
474
|
-
...(
|
|
475
|
-
|
|
476
|
-
:
|
|
495
|
+
...sameParentInstruction(env, {
|
|
496
|
+
instruction: parsed.instruction ?? "",
|
|
497
|
+
instructionEmpty: (parsed.instruction ?? "").trim() === "",
|
|
498
|
+
}),
|
|
477
499
|
attachmentPaths: parsed.attachmentPaths ?? [],
|
|
478
500
|
};
|
|
479
501
|
const resumed = await withAuditorSoulEnv({
|
|
480
502
|
subject: auditorSubject,
|
|
481
503
|
sourceRunDirectory: auditorSource,
|
|
482
|
-
run: () =>
|
|
483
|
-
|
|
504
|
+
run: () => resumeSameParentInstructionSeat({
|
|
505
|
+
env,
|
|
506
|
+
io,
|
|
484
507
|
projectRoot,
|
|
485
508
|
role,
|
|
486
509
|
parentRunPath: sourceDirectory,
|
|
487
|
-
freshSummons: env.freshSummons,
|
|
488
510
|
summons,
|
|
489
|
-
resume: (runId, materials) => runPublicInstructionSeatResume({ runId, ...(materials === undefined ? {} : { summons: materials }) }, env, io),
|
|
490
511
|
}),
|
|
491
512
|
});
|
|
492
513
|
if (resumed != null)
|
|
@@ -495,22 +516,21 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
|
|
|
495
516
|
if (record.sameParent === "gate-pointer") {
|
|
496
517
|
const parentRunPath = parentRunPathFromGatePointerInstruction(parsed.instruction ?? "");
|
|
497
518
|
if (parentRunPath !== undefined) {
|
|
498
|
-
const resumeInstruction = env.reviewReask ?? env.gateReviewInstruction;
|
|
499
519
|
const summons = {
|
|
500
520
|
sourceRunPath: parentRunPath,
|
|
501
|
-
...(
|
|
502
|
-
|
|
503
|
-
:
|
|
521
|
+
...sameParentInstruction(env, {
|
|
522
|
+
instruction: parsed.instruction ?? "",
|
|
523
|
+
instructionEmpty: (parsed.instruction ?? "").trim() === "",
|
|
524
|
+
}),
|
|
504
525
|
attachmentPaths: parsed.attachmentPaths ?? [],
|
|
505
526
|
};
|
|
506
|
-
const resumed = await
|
|
507
|
-
|
|
527
|
+
const resumed = await resumeSameParentInstructionSeat({
|
|
528
|
+
env,
|
|
529
|
+
io,
|
|
508
530
|
projectRoot,
|
|
509
531
|
role,
|
|
510
532
|
parentRunPath,
|
|
511
|
-
freshSummons: env.freshSummons,
|
|
512
533
|
summons,
|
|
513
|
-
resume: (runId, materials) => runPublicInstructionSeatResume({ runId, ...(materials === undefined ? {} : { summons: materials }) }, env, io),
|
|
514
534
|
});
|
|
515
535
|
if (resumed != null)
|
|
516
536
|
return resumed;
|
|
@@ -536,23 +556,29 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
|
|
|
536
556
|
const summons = {
|
|
537
557
|
sourceRunPath: source.runDirectory,
|
|
538
558
|
sourceRun: source,
|
|
539
|
-
...(resumeInstruction === undefined
|
|
559
|
+
...(resumeInstruction === undefined
|
|
560
|
+
? {}
|
|
561
|
+
: { instruction: resumeInstruction, instructionEmpty: false }),
|
|
540
562
|
};
|
|
541
|
-
|
|
542
|
-
|
|
563
|
+
resolvedNotarySource = source;
|
|
564
|
+
const resumed = await resumeSameParentInstructionSeat({
|
|
565
|
+
env,
|
|
566
|
+
io,
|
|
543
567
|
projectRoot,
|
|
544
568
|
role,
|
|
545
569
|
parentRunPath: source.runDirectory,
|
|
546
|
-
freshSummons: env.freshSummons,
|
|
547
570
|
summons,
|
|
548
|
-
resume: (runId, materials) => runPublicInstructionSeatResume({ runId, ...(materials === undefined ? {} : { summons: materials }) }, env, io),
|
|
549
571
|
});
|
|
550
572
|
if (resumed != null)
|
|
551
573
|
return resumed;
|
|
552
574
|
}
|
|
553
575
|
let admitted;
|
|
554
576
|
try {
|
|
555
|
-
|
|
577
|
+
const admissionOverride = {
|
|
578
|
+
...(auditorTicket === undefined ? {} : { assertedTicketNumber: auditorTicket }),
|
|
579
|
+
...(resolvedNotarySource === undefined ? {} : { resolvedSourceRun: resolvedNotarySource }),
|
|
580
|
+
};
|
|
581
|
+
admitted = await admitPublicRole(role, parsed, env, auditorTicket === undefined && resolvedNotarySource === undefined ? undefined : admissionOverride);
|
|
556
582
|
}
|
|
557
583
|
catch (error) {
|
|
558
584
|
const rejected = usageExit(error, io);
|
|
@@ -589,7 +615,7 @@ export async function runPublicInstructionSeat(argv, env, io, role, parseArgv) {
|
|
|
589
615
|
timedOut: false, code: null, stderr: "", thrown: error,
|
|
590
616
|
}, seatAdapters(admitted, env), env.principalAuthority, io);
|
|
591
617
|
}
|
|
592
|
-
if (outcome.admitted
|
|
618
|
+
if (outcome.admitted !== undefined && isUnboundRunDirectory(outcome.admitted.runDirectory)) {
|
|
593
619
|
await recordChildDiaristRun(admitted, outcome.admitted.runId);
|
|
594
620
|
}
|
|
595
621
|
if (outcome.failedWithoutEscalate !== undefined) {
|
|
@@ -760,7 +786,7 @@ async function auditSubmittedRole(turn, env, io, passedOfficer, passedReceipt, p
|
|
|
760
786
|
const accepted = turn.terminal.roleOutcome.payloads?.at(-1);
|
|
761
787
|
if (accepted === undefined)
|
|
762
788
|
throw new Error("accepted submission has no payload");
|
|
763
|
-
const record =
|
|
789
|
+
const record = isRecord(accepted)
|
|
764
790
|
? accepted : undefined;
|
|
765
791
|
const status = admitted.role === "secretariat" ? record?.secretariatStatus : record?.status;
|
|
766
792
|
if (admitted.role === "secretariat" && status !== "converged" && status !== "escalate") {
|