@akagilnc/pi-workflow-roles 0.1.4800 → 0.1.4870
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 +19434 -18218
- package/dist/analyst-book-key.js +63 -0
- package/dist/analyst-cohort.js +167 -0
- package/dist/analyst-entry.js +320 -0
- package/dist/analyst-index.js +247 -0
- package/dist/analyst-ledger.js +561 -0
- package/dist/analyst-median.js +16 -0
- package/dist/analyst-metric-families/acceptance-success-rework.js +249 -0
- package/dist/analyst-metric-families/b2-frame-buckets-actions.js +189 -0
- package/dist/analyst-metric-families/gate-cycles.js +77 -0
- package/dist/analyst-metric-families/leg-wall-clock.js +56 -0
- package/dist/analyst-metric-families/round-timeline.js +126 -0
- package/dist/analyst-metric-families.js +23 -0
- package/dist/analyst-metric-family.js +11 -0
- package/dist/analyst-model-groups.js +135 -0
- package/dist/analyst-page.js +182 -0
- package/dist/atomic-write.js +23 -0
- package/dist/auditor-soul.js +1 -1
- package/dist/countersign-contracts.js +0 -2
- package/dist/diarist-contracts.js +0 -1
- package/dist/doctor-contracts.js +2 -2
- package/dist/gatekeeper-role.js +15 -16
- package/dist/gleaner-left-contracts.js +0 -2
- package/dist/headless-host/production-host.js +16967 -15749
- package/dist/host-contracts.js +0 -4
- package/dist/inspector-contracts.js +0 -2
- package/dist/institutional-resolution.js +4 -2
- package/dist/merger-contracts.js +0 -2
- package/dist/migrate-book-topology.js +3908 -3089
- package/dist/navigator-public-session.js +4 -3
- package/dist/notary-contracts.js +0 -2
- package/dist/package-contracts/auditor-output.js +0 -1
- package/dist/package-contracts/collector-output.js +0 -2
- package/dist/package-contracts/fixer-output.js +0 -2
- package/dist/package-contracts/gatekeeper-output.js +0 -2
- package/dist/package-contracts/judge-output.js +0 -2
- package/dist/package-contracts/navigator-output.js +0 -2
- package/dist/package-contracts/reviewer-output.js +0 -2
- package/dist/package-contracts/terminating-tools.js +32 -92
- package/dist/package-contracts/worker-output.js +0 -4
- package/dist/packaged-role-registry.js +518 -36
- package/dist/pi/role-turn-host.js +2 -1
- package/dist/public-cli/analyst-run.js +185 -0
- package/dist/public-cli/cli.js +885 -0
- package/dist/public-cli/config.js +12 -9
- package/dist/public-cli/countersign-run.js +4 -311
- package/dist/public-cli/instruction-seat-run.js +628 -158
- package/dist/public-cli/invocation.js +806 -1550
- package/dist/public-cli/main.js +6962 -9882
- package/dist/public-cli/option-definitions.js +51 -99
- package/dist/public-cli/post-admission.js +30 -2
- package/dist/public-cli/run-lifecycle.js +234 -353
- package/dist/public-cli/seat-ticket-binding.js +6 -0
- package/dist/public-cli/settlement.js +261 -675
- package/dist/public-cli/turn-request.js +76 -0
- package/dist/public-role-summons.js +38 -112
- package/dist/role-activation-flags.js +23 -45
- package/dist/secretariat-contracts.js +0 -2
- package/dist/session-identity.js +17 -8
- package/dist/session-opening-materials.js +3 -2
- package/extensions/role-runtime.ts +6 -80
- package/package.json +1 -1
- package/souls/coder.md +1 -2
- package/src/acp-host/role-turn-host.ts +4 -1
- package/src/analyst-metric-families/acceptance-success-rework.ts +3 -2
- package/src/auditor-role.ts +1 -2
- package/src/auditor-soul.ts +1 -1
- package/src/collector-role.ts +2 -2
- package/src/countersign-contracts.ts +0 -1
- package/src/countersign-role.ts +1 -1
- package/src/diarist-contracts.ts +0 -1
- package/src/diarist-role.ts +0 -1
- package/src/doctor-auditor.ts +1 -2
- package/src/doctor-contracts.ts +1 -1
- package/src/doctor-role.ts +3 -2
- package/src/external-host-turn-loop.ts +1 -1
- package/src/factory-board.ts +10 -7
- package/src/gatekeeper-role.ts +16 -10
- package/src/gleaner-left-contracts.ts +0 -1
- package/src/gleaner-left-role.ts +0 -1
- package/src/headless-host/role-turn-host.ts +7 -1
- package/src/host-contracts.ts +10 -6
- package/src/inspector-contracts.ts +0 -1
- package/src/inspector-role.ts +0 -2
- package/src/institutional-resolution.ts +6 -4
- package/src/judge-role.ts +3 -3
- package/src/merger-contracts.ts +0 -1
- package/src/merger-role.ts +2 -2
- package/src/navigator-public-session.ts +7 -6
- package/src/navigator-work-context.ts +6 -8
- package/src/notary-contracts.ts +0 -1
- package/src/notary-role.ts +2 -3
- package/src/package-contracts/auditor-output.ts +0 -1
- package/src/package-contracts/collector-output.ts +0 -1
- package/src/package-contracts/fixer-output.ts +0 -1
- package/src/package-contracts/gatekeeper-output.ts +0 -1
- package/src/package-contracts/judge-output.ts +0 -1
- package/src/package-contracts/navigator-output.ts +0 -1
- package/src/package-contracts/reviewer-output.ts +0 -1
- package/src/package-contracts/terminating-tools.ts +27 -99
- package/src/package-contracts/worker-output.ts +0 -2
- package/src/packaged-role-registry.ts +604 -35
- package/src/pi/role-turn-host.ts +2 -1
- package/src/public-cli/cli.ts +64 -259
- package/src/public-cli/config.ts +18 -10
- package/src/public-cli/countersign-run.ts +14 -449
- package/src/public-cli/instruction-seat-run.ts +758 -277
- package/src/public-cli/invocation.ts +1097 -2051
- package/src/public-cli/option-definitions.ts +62 -127
- package/src/public-cli/post-admission.ts +47 -2
- package/src/public-cli/run-lifecycle.ts +303 -613
- package/src/public-cli/seat-ticket-binding.ts +6 -0
- package/src/public-cli/settlement.ts +399 -1185
- package/src/public-cli/turn-request.ts +92 -1
- package/src/public-role-summons.ts +44 -128
- package/src/reviewer-role.ts +3 -2
- package/src/role-activation-flags.ts +20 -41
- package/src/role-runtime-dependencies.ts +25 -26
- package/src/role-runtime.ts +121 -232
- package/src/secretariat-contracts.ts +0 -1
- package/src/secretariat-role.ts +0 -2
- package/src/session-identity.ts +23 -8
- package/src/session-opening-materials.ts +2 -1
- package/src/worker-role.ts +3 -4
- package/dist/doctor-auditor.js +0 -25
- package/dist/public-cli/diarist-run.js +0 -130
- package/dist/public-cli/doctor-run.js +0 -87
- package/dist/public-cli/inspector-run.js +0 -151
- package/dist/public-cli/judge-run.js +0 -114
- package/dist/public-cli/notary-run.js +0 -174
- package/dist/public-cli/reviewer-run.js +0 -339
- package/src/public-cli/coder-run.ts +0 -255
- package/src/public-cli/collector-run.ts +0 -189
- package/src/public-cli/diarist-run.ts +0 -233
- package/src/public-cli/doctor-run.ts +0 -167
- package/src/public-cli/fixer-run.ts +0 -265
- package/src/public-cli/gleaner-left-run.ts +0 -167
- package/src/public-cli/inspector-run.ts +0 -261
- package/src/public-cli/judge-run.ts +0 -196
- package/src/public-cli/merger-run.ts +0 -294
- package/src/public-cli/notary-run.ts +0 -279
- package/src/public-cli/reviewer-run.ts +0 -480
- package/src/public-cli/secretariat-run.ts +0 -265
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { CliUsageError } from "./cli-errors.ts";
|
|
15
|
+
import { PUBLIC_CALLABLE_ROLES, type PublicCallableRole } from "./registry.ts";
|
|
15
16
|
|
|
16
17
|
/** Analyst public query faces (#336/#337/#338/#399). model-groups CLI face disabled (library kernel retained). */
|
|
17
18
|
export type AnalystMode = "issue" | "sweep" | "cohort";
|
|
@@ -19,25 +20,8 @@ export type AnalystMode = "issue" | "sweep" | "cohort";
|
|
|
19
20
|
/** Coder/Fixer public phase tokens. */
|
|
20
21
|
export type RolePhase = "plan" | "apply";
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| "judge"
|
|
25
|
-
| "countersign"
|
|
26
|
-
| "coder"
|
|
27
|
-
| "fixer"
|
|
28
|
-
| "reviewer"
|
|
29
|
-
| "collector"
|
|
30
|
-
| "doctor"
|
|
31
|
-
| "merger"
|
|
32
|
-
| "notary"
|
|
33
|
-
| "gleaner-left"
|
|
34
|
-
| "inspector"
|
|
35
|
-
| "gatekeeper"
|
|
36
|
-
| "navigator"
|
|
37
|
-
| "auditor"
|
|
38
|
-
| "diarist"
|
|
39
|
-
| "secretariat"
|
|
40
|
-
| "analyst";
|
|
23
|
+
/** global, every composition-root role, and the deterministic analyst command. */
|
|
24
|
+
export type OptionOwner = "global" | PublicCallableRole | "analyst";
|
|
41
25
|
|
|
42
26
|
/**
|
|
43
27
|
* One public option (or positional mode/phase token) identity.
|
|
@@ -386,10 +370,29 @@ function bindOwner(
|
|
|
386
370
|
return { ...semantics, owner };
|
|
387
371
|
}
|
|
388
372
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
373
|
+
/** Seats whose public face is only project + attach. Unique rows stay explicit. */
|
|
374
|
+
function projectAndAttach(owner: OptionOwner): readonly PublicOptionDefinition[] {
|
|
375
|
+
return [
|
|
376
|
+
bindOwner(owner, SHARED_PROJECT_SEMANTICS),
|
|
377
|
+
bindOwner(owner, SHARED_ATTACH_SEMANTICS),
|
|
378
|
+
];
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const SHARED_PHASE_SEMANTICS = {
|
|
382
|
+
id: "phase",
|
|
383
|
+
canonical: "plan|apply",
|
|
384
|
+
aliases: ["plan", "apply"],
|
|
385
|
+
valueMetavar: null,
|
|
386
|
+
required: false,
|
|
387
|
+
repeatable: false,
|
|
388
|
+
defaultValue: "apply",
|
|
389
|
+
form: "positional",
|
|
390
|
+
phases: ["plan", "apply"],
|
|
391
|
+
description: {
|
|
392
|
+
en: "Optional phase token before the instruction; defaults to apply.",
|
|
393
|
+
zh: "指令前可选 phase 词元;默认 apply。",
|
|
394
|
+
},
|
|
395
|
+
} as const satisfies Omit<PublicOptionDefinition, "owner">;
|
|
393
396
|
|
|
394
397
|
const GLEANER_LEFT_OPTIONS = [
|
|
395
398
|
bindOwner("gleaner-left", SHARED_PROJECT_SEMANTICS),
|
|
@@ -410,24 +413,8 @@ const GLEANER_LEFT_OPTIONS = [
|
|
|
410
413
|
},
|
|
411
414
|
] as const satisfies readonly PublicOptionDefinition[];
|
|
412
415
|
|
|
413
|
-
const INSPECTOR_OPTIONS = [
|
|
414
|
-
bindOwner("inspector", SHARED_PROJECT_SEMANTICS),
|
|
415
|
-
bindOwner("inspector", SHARED_ATTACH_SEMANTICS),
|
|
416
|
-
] as const satisfies readonly PublicOptionDefinition[];
|
|
417
|
-
|
|
418
|
-
const GATEKEEPER_OPTIONS = [
|
|
419
|
-
bindOwner("gatekeeper", SHARED_PROJECT_SEMANTICS),
|
|
420
|
-
bindOwner("gatekeeper", SHARED_ATTACH_SEMANTICS),
|
|
421
|
-
] as const satisfies readonly PublicOptionDefinition[];
|
|
422
|
-
|
|
423
|
-
const NAVIGATOR_OPTIONS = [
|
|
424
|
-
bindOwner("navigator", SHARED_PROJECT_SEMANTICS),
|
|
425
|
-
bindOwner("navigator", SHARED_ATTACH_SEMANTICS),
|
|
426
|
-
] as const satisfies readonly PublicOptionDefinition[];
|
|
427
|
-
|
|
428
416
|
const AUDITOR_OPTIONS = [
|
|
429
|
-
|
|
430
|
-
bindOwner("auditor", SHARED_ATTACH_SEMANTICS),
|
|
417
|
+
...projectAndAttach("auditor"),
|
|
431
418
|
{
|
|
432
419
|
id: "subject",
|
|
433
420
|
owner: "auditor",
|
|
@@ -458,61 +445,14 @@ const AUDITOR_OPTIONS = [
|
|
|
458
445
|
},
|
|
459
446
|
] as const satisfies readonly PublicOptionDefinition[];
|
|
460
447
|
|
|
461
|
-
const COUNTERSIGN_OPTIONS = [
|
|
462
|
-
bindOwner("countersign", SHARED_PROJECT_SEMANTICS),
|
|
463
|
-
bindOwner("countersign", SHARED_ATTACH_SEMANTICS),
|
|
464
|
-
] as const satisfies readonly PublicOptionDefinition[];
|
|
465
|
-
|
|
466
|
-
const DIARIST_OPTIONS = [
|
|
467
|
-
bindOwner("diarist", SHARED_PROJECT_SEMANTICS),
|
|
468
|
-
bindOwner("diarist", SHARED_ATTACH_SEMANTICS),
|
|
469
|
-
] as const satisfies readonly PublicOptionDefinition[];
|
|
470
|
-
|
|
471
|
-
const SECRETARIAT_OPTIONS = [
|
|
472
|
-
bindOwner("secretariat", SHARED_PROJECT_SEMANTICS),
|
|
473
|
-
bindOwner("secretariat", SHARED_ATTACH_SEMANTICS),
|
|
474
|
-
] as const satisfies readonly PublicOptionDefinition[];
|
|
475
|
-
|
|
476
448
|
const CODER_OPTIONS = [
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
owner: "coder",
|
|
480
|
-
canonical: "plan|apply",
|
|
481
|
-
aliases: ["plan", "apply"],
|
|
482
|
-
valueMetavar: null,
|
|
483
|
-
required: false,
|
|
484
|
-
repeatable: false,
|
|
485
|
-
defaultValue: "apply",
|
|
486
|
-
form: "positional",
|
|
487
|
-
phases: ["plan", "apply"],
|
|
488
|
-
description: {
|
|
489
|
-
en: "Optional phase token before the instruction; defaults to apply.",
|
|
490
|
-
zh: "指令前可选 phase 词元;默认 apply。",
|
|
491
|
-
},
|
|
492
|
-
},
|
|
493
|
-
bindOwner("coder", SHARED_PROJECT_SEMANTICS),
|
|
494
|
-
bindOwner("coder", SHARED_ATTACH_SEMANTICS),
|
|
449
|
+
bindOwner("coder", SHARED_PHASE_SEMANTICS),
|
|
450
|
+
...projectAndAttach("coder"),
|
|
495
451
|
] as const satisfies readonly PublicOptionDefinition[];
|
|
496
452
|
|
|
497
453
|
const FIXER_OPTIONS = [
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
owner: "fixer",
|
|
501
|
-
canonical: "plan|apply",
|
|
502
|
-
aliases: ["plan", "apply"],
|
|
503
|
-
valueMetavar: null,
|
|
504
|
-
required: false,
|
|
505
|
-
repeatable: false,
|
|
506
|
-
defaultValue: "apply",
|
|
507
|
-
form: "positional",
|
|
508
|
-
phases: ["plan", "apply"],
|
|
509
|
-
description: {
|
|
510
|
-
en: "Optional phase token before the instruction; defaults to apply.",
|
|
511
|
-
zh: "指令前可选 phase 词元;默认 apply。",
|
|
512
|
-
},
|
|
513
|
-
},
|
|
514
|
-
bindOwner("fixer", SHARED_PROJECT_SEMANTICS),
|
|
515
|
-
bindOwner("fixer", SHARED_ATTACH_SEMANTICS),
|
|
454
|
+
bindOwner("fixer", SHARED_PHASE_SEMANTICS),
|
|
455
|
+
...projectAndAttach("fixer"),
|
|
516
456
|
{
|
|
517
457
|
id: "prerequisites",
|
|
518
458
|
owner: "fixer",
|
|
@@ -577,8 +517,7 @@ const REVIEWER_OPTIONS = [
|
|
|
577
517
|
] as const satisfies readonly PublicOptionDefinition[];
|
|
578
518
|
|
|
579
519
|
const COLLECTOR_OPTIONS = [
|
|
580
|
-
|
|
581
|
-
bindOwner("collector", SHARED_ATTACH_SEMANTICS),
|
|
520
|
+
...projectAndAttach("collector"),
|
|
582
521
|
{
|
|
583
522
|
id: "pr",
|
|
584
523
|
owner: "collector",
|
|
@@ -639,8 +578,7 @@ const COLLECTOR_OPTIONS = [
|
|
|
639
578
|
] as const satisfies readonly PublicOptionDefinition[];
|
|
640
579
|
|
|
641
580
|
const DOCTOR_OPTIONS = [
|
|
642
|
-
|
|
643
|
-
bindOwner("doctor", SHARED_ATTACH_SEMANTICS),
|
|
581
|
+
...projectAndAttach("doctor"),
|
|
644
582
|
{
|
|
645
583
|
id: "issue",
|
|
646
584
|
owner: "doctor",
|
|
@@ -841,13 +779,12 @@ const ANALYST_OPTIONS = [
|
|
|
841
779
|
] as const satisfies readonly PublicOptionDefinition[];
|
|
842
780
|
|
|
843
781
|
/**
|
|
844
|
-
*
|
|
845
|
-
*
|
|
782
|
+
* Seats whose public rows are not the shared project+attach face.
|
|
783
|
+
* A new project+attach seat needs no entry here.
|
|
846
784
|
*/
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
countersign: COUNTERSIGN_OPTIONS,
|
|
785
|
+
const SEAT_OPTION_ROWS: Partial<
|
|
786
|
+
Record<PublicCallableRole, readonly PublicOptionDefinition[]>
|
|
787
|
+
> = {
|
|
851
788
|
"gleaner-left": GLEANER_LEFT_OPTIONS,
|
|
852
789
|
coder: CODER_OPTIONS,
|
|
853
790
|
fixer: FIXER_OPTIONS,
|
|
@@ -856,37 +793,35 @@ export const PUBLIC_OPTION_TABLE = {
|
|
|
856
793
|
doctor: DOCTOR_OPTIONS,
|
|
857
794
|
merger: MERGER_OPTIONS,
|
|
858
795
|
notary: NOTARY_OPTIONS,
|
|
859
|
-
inspector: INSPECTOR_OPTIONS,
|
|
860
|
-
gatekeeper: GATEKEEPER_OPTIONS,
|
|
861
|
-
navigator: NAVIGATOR_OPTIONS,
|
|
862
796
|
auditor: AUDITOR_OPTIONS,
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
function seatOptionRows(role: PublicCallableRole): readonly PublicOptionDefinition[] {
|
|
800
|
+
return SEAT_OPTION_ROWS[role] ?? projectAndAttach(role);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Sole production option tables keyed by PUBLIC_ROLE_ARGV / global owner.
|
|
805
|
+
* Rows are readonly definition lists — parsers look up spellings here.
|
|
806
|
+
* Callable seats come from the composition root; only a different face is listed above.
|
|
807
|
+
*/
|
|
808
|
+
function publicOptionTable(): Record<OptionOwner, readonly PublicOptionDefinition[]> {
|
|
809
|
+
const roles = {} as Record<PublicCallableRole, readonly PublicOptionDefinition[]>;
|
|
810
|
+
for (const role of PUBLIC_CALLABLE_ROLES) {
|
|
811
|
+
roles[role] = seatOptionRows(role);
|
|
812
|
+
}
|
|
813
|
+
return { global: GLOBAL_OPTIONS, ...roles, analyst: ANALYST_OPTIONS };
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export const PUBLIC_OPTION_TABLE = publicOptionTable();
|
|
867
817
|
|
|
868
818
|
export type PublicRoleOptionOwner = Exclude<OptionOwner, "global">;
|
|
869
819
|
|
|
870
|
-
/** Role/deterministic owners that appear on PUBLIC_ROLE_ARGV. */
|
|
871
|
-
export const PUBLIC_ROLE_OPTION_OWNERS = [
|
|
872
|
-
|
|
873
|
-
"countersign",
|
|
874
|
-
"gleaner-left",
|
|
875
|
-
"coder",
|
|
876
|
-
"fixer",
|
|
877
|
-
"reviewer",
|
|
878
|
-
"collector",
|
|
879
|
-
"doctor",
|
|
880
|
-
"merger",
|
|
881
|
-
"notary",
|
|
882
|
-
"inspector",
|
|
883
|
-
"gatekeeper",
|
|
884
|
-
"navigator",
|
|
885
|
-
"auditor",
|
|
886
|
-
"diarist",
|
|
887
|
-
"secretariat",
|
|
820
|
+
/** Role/deterministic owners that appear on PUBLIC_ROLE_ARGV. Roles follow the composition root; analyst is the deterministic command. */
|
|
821
|
+
export const PUBLIC_ROLE_OPTION_OWNERS: readonly PublicRoleOptionOwner[] = [
|
|
822
|
+
...PUBLIC_CALLABLE_ROLES,
|
|
888
823
|
"analyst",
|
|
889
|
-
]
|
|
824
|
+
];
|
|
890
825
|
|
|
891
826
|
export function optionsForOwner(
|
|
892
827
|
owner: OptionOwner,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import { readRecordedSubmissionRows } from "../submission-ledger.ts";
|
|
27
27
|
import { pathContainedIn } from "../activation-ledger-topology.ts";
|
|
28
28
|
import { pickEngineAxis } from "../package-resources/engine-material.ts";
|
|
29
|
-
import { resolveHostAwareSessionAvailability } from "../session-identity.ts";
|
|
29
|
+
import { readStoredHostSessionId, resolveHostAwareSessionAvailability } from "../session-identity.ts";
|
|
30
30
|
import { rewriteRunDirectoryPathValue } from "../role-run-relocation.ts";
|
|
31
31
|
|
|
32
32
|
import type {
|
|
@@ -39,7 +39,7 @@ import type {
|
|
|
39
39
|
RoleTurnResult,
|
|
40
40
|
SessionCustomEntryAppender,
|
|
41
41
|
} from "../host-contracts.ts";
|
|
42
|
-
import { isOfficerReviewSeat } from "../
|
|
42
|
+
import { isOfficerReviewSeat } from "../packaged-role-registry.ts";
|
|
43
43
|
import { deliverCaseDossierAsAttachment } from "./case-dossier-delivery.ts";
|
|
44
44
|
|
|
45
45
|
/** Original error bytes, never relabeled — a secondary fact riding beside a classified cause. */
|
|
@@ -323,6 +323,11 @@ export type PostAdmissionEnv = {
|
|
|
323
323
|
* and mint a new run. Absent on ordinary role commands and on `ak-role resume`.
|
|
324
324
|
*/
|
|
325
325
|
freshSummons?: true;
|
|
326
|
+
/**
|
|
327
|
+
* Typed ticket already carried into this summons (parent board / 起居录).
|
|
328
|
+
* Admission places the run under it. Not a public CLI flag.
|
|
329
|
+
*/
|
|
330
|
+
boundTicketNumber?: number;
|
|
326
331
|
/** Station child role run (#840): omit automatic navigator attendance. */
|
|
327
332
|
stationChild?: boolean;
|
|
328
333
|
/**
|
|
@@ -1380,6 +1385,30 @@ export function resumeTurnRequestProjectionOptions(
|
|
|
1380
1385
|
};
|
|
1381
1386
|
}
|
|
1382
1387
|
|
|
1388
|
+
/** Shared new-turn and in-call auto-resume projection. Seat code supplies prompt and activation. */
|
|
1389
|
+
export function roleTurnOptions(
|
|
1390
|
+
env: PostAdmissionEnv,
|
|
1391
|
+
admitted: { readonly correlationId?: string },
|
|
1392
|
+
continuation: RoleTurnRequest["continuation"],
|
|
1393
|
+
extra?: { readonly cwd?: string },
|
|
1394
|
+
): RoleTurnRequestProjectionOptions {
|
|
1395
|
+
const correlationId = admitted.correlationId ?? env.correlationId;
|
|
1396
|
+
return {
|
|
1397
|
+
packageRoot: env.packageRoot,
|
|
1398
|
+
home: env.home,
|
|
1399
|
+
agentDir: env.agentDir,
|
|
1400
|
+
...(env.model === undefined ? {} : { model: env.model }),
|
|
1401
|
+
...pickEngineAxis(env),
|
|
1402
|
+
...(env.timeoutMs === undefined ? {} : { timeoutMs: env.timeoutMs }),
|
|
1403
|
+
...(correlationId === undefined || correlationId.trim() === ""
|
|
1404
|
+
? {}
|
|
1405
|
+
: { correlationId }),
|
|
1406
|
+
continuation,
|
|
1407
|
+
...(extra?.cwd === undefined ? {} : { cwd: extra.cwd }),
|
|
1408
|
+
...(env.stationChild === undefined ? {} : { stationChild: env.stationChild }),
|
|
1409
|
+
};
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1383
1412
|
/**
|
|
1384
1413
|
* Build the turn request, then hand off to dispatch. When a writer lease is
|
|
1385
1414
|
* held, release it if build throws before handoff — dispatch's finally only
|
|
@@ -1568,6 +1597,22 @@ export async function runPostAdmissionSeatResume<
|
|
|
1568
1597
|
}
|
|
1569
1598
|
|
|
1570
1599
|
let turnRequest = await input.buildTurnRequest(admittedForBuild, request);
|
|
1600
|
+
if (
|
|
1601
|
+
turnRequest.continuation.kind === "resume"
|
|
1602
|
+
&& turnRequest.continuation.hostSessionId === undefined
|
|
1603
|
+
) {
|
|
1604
|
+
const hostSessionId = await readStoredHostSessionId(
|
|
1605
|
+
env.host,
|
|
1606
|
+
env.principalAuthority,
|
|
1607
|
+
admittedForBuild.principal,
|
|
1608
|
+
);
|
|
1609
|
+
if (hostSessionId !== undefined) {
|
|
1610
|
+
turnRequest = {
|
|
1611
|
+
...turnRequest,
|
|
1612
|
+
continuation: { ...turnRequest.continuation, hostSessionId },
|
|
1613
|
+
};
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1571
1616
|
|
|
1572
1617
|
// Open court continue, or new court for summons / message re-review
|
|
1573
1618
|
// (clause 0 新庭可再交卷; #833). Bare resume without open court omits id.
|