@effect-agent/pr-review 0.1.0-beta.20 → 0.1.0-beta.21

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.
@@ -130,6 +130,8 @@ declare class PullRequestSource extends PullRequestSource_base {}
130
130
  declare const MAX_FINDINGS = 20;
131
131
  /** The hard non-anchored-concerns bound carried by the CodeReview schema. */
132
132
  declare const MAX_CONCERNS = 10;
133
+ /** Maximum characters in one deterministic model-visible evidence chunk. */
134
+ declare const MAX_PATCH_CHARS = 60000;
133
135
  /** The encoded Tool result must retain one complete bounded content fallback. */
134
136
  declare const REVIEW_TOOL_RESULT_MAX_BYTES: number;
135
137
  declare const ChangedFileSummary_base: Schema.Class<ChangedFileSummary, Schema.Struct<{
@@ -179,6 +181,14 @@ declare const FileDiffView_base: Schema.Class<FileDiffView, Schema.Struct<{
179
181
  readonly truncated: Schema.Boolean;
180
182
  }>, {}>;
181
183
  declare class FileDiffView extends FileDiffView_base {}
184
+ interface FileReviewEvidenceChunk {
185
+ readonly reviewMode: "diff" | "content" | "unavailable";
186
+ readonly annotatedPatch: string;
187
+ }
188
+ /** Complete bounded evidence chunks used by deterministic fan-out planning. */
189
+ declare const fileReviewEvidenceChunks: (file: ChangedFile) => ReadonlyArray<FileReviewEvidenceChunk>;
190
+ /** Host-owned rendering of one changed file's bounded review evidence. */
191
+ declare const fileDiffView: (file: ChangedFile) => FileDiffView;
182
192
  declare const ReadFileDiff: Tool.Tool<"read_file_diff", {
183
193
  readonly parameters: typeof FileDiffQuery;
184
194
  readonly success: typeof FileDiffView;
@@ -370,6 +380,10 @@ declare const PullRequestReviewer: import("effect-agent").Definition<typeof Revi
370
380
  }, PullRequestSource>;
371
381
  }>, undefined>;
372
382
  //#endregion
383
+ //#region src/internal/anchors.d.ts
384
+ /** Why a finding cannot anchor to the current new-version diff, if any. */
385
+ declare const anchorViolation: (finding: ReviewFinding, files: ReadonlyArray<ChangedFile>) => string | undefined;
386
+ //#endregion
373
387
  //#region src/internal/coverage.d.ts
374
388
  declare const ReviewShape: Schema.Literals<readonly ["flat", "fan-out"]>;
375
389
  type ReviewShape = typeof ReviewShape.Type;
@@ -386,18 +400,64 @@ declare const ReviewCoverage_base: Schema.Class<ReviewCoverage, Schema.Struct<{
386
400
  readonly failedUnits: Schema.$Array<typeof FailedReviewUnit>;
387
401
  readonly reasons: Schema.$Array<Schema.NonEmptyString>;
388
402
  }>, {}>;
389
- declare class ReviewCoverage extends ReviewCoverage_base {}
390
403
  /**
391
- * Host-verified per-file summaries from the fan-out run's Tool events: for
392
- * every successfully settled delegation, the child-reported `fileSummaries`
393
- * whose paths belong to that invocation's requested unit. This is the
394
- * declassification check `projectResult` cannot perform itself (it never sees
395
- * the request): a child assigned file A cannot smuggle a summary for changed
396
- * file B into the merged walkthrough, and a coordinator cannot invent or edit
397
- * entries — only exact child-reported, in-unit summaries survive.
404
+ * Compatibility diagnostic retained for callers that consumed the original
405
+ * `coverage` field. New UI and state decisions use ReviewInputCoverage and
406
+ * ReviewAssurance directly.
398
407
  */
399
- declare const collectUnitFileSummaries: (events: ReadonlyArray<RunEvent>) => ReadonlyArray<WalkthroughEntry>;
400
- /** Assess one settled run without trusting its prose summary or verdict. */
408
+ declare class ReviewCoverage extends ReviewCoverage_base {}
409
+ declare const ReviewInputCoverage_base: Schema.Class<ReviewInputCoverage, Schema.Struct<{
410
+ readonly status: Schema.Literals<readonly ["complete", "incomplete"]>;
411
+ readonly requiredPaths: Schema.$Array<Schema.NonEmptyString>;
412
+ readonly assignedPaths: Schema.$Array<Schema.NonEmptyString>;
413
+ /** Assigned paths whose model-visible diff was truncated by the evidence bound. */
414
+ readonly partialPaths: Schema.$Array<Schema.NonEmptyString>;
415
+ readonly unassignedPaths: Schema.$Array<Schema.NonEmptyString>;
416
+ readonly reasons: Schema.$Array<Schema.NonEmptyString>;
417
+ }>, {}>;
418
+ declare class ReviewInputCoverage extends ReviewInputCoverage_base {}
419
+ declare const FailedReviewPass_base: Schema.Class<FailedReviewPass, Schema.Struct<{
420
+ readonly workId: Schema.NonEmptyString;
421
+ readonly stage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
422
+ readonly errorTag: Schema.NonEmptyString;
423
+ }>, {}>;
424
+ declare class FailedReviewPass extends FailedReviewPass_base {}
425
+ declare const ReviewAssurance_base: Schema.Class<ReviewAssurance, Schema.Struct<{
426
+ readonly status: Schema.Literals<readonly ["settled", "incomplete", "unverified"]>;
427
+ readonly requiredGeneralDiscoveryPasses: Schema.Int;
428
+ readonly completedGeneralDiscoveryPasses: Schema.Int;
429
+ readonly requiredSpecialistPasses: Schema.Int;
430
+ readonly completedSpecialistPasses: Schema.Int;
431
+ readonly requiredVerificationPasses: Schema.Int;
432
+ readonly completedVerificationPasses: Schema.Int;
433
+ readonly discoveredCandidates: Schema.Int;
434
+ readonly confirmedCandidates: Schema.Int;
435
+ readonly rejectedCandidates: Schema.Int;
436
+ readonly unsettledCandidates: Schema.Int;
437
+ /** Every failure remains visible within the coordinator's 32-call hard bound. */
438
+ readonly failedPasses: Schema.$Array<typeof FailedReviewPass>;
439
+ readonly reasons: Schema.$Array<Schema.NonEmptyString>;
440
+ }>, {}>;
441
+ declare class ReviewAssurance extends ReviewAssurance_base {}
442
+ interface ReviewPipelineAssessment {
443
+ readonly inputCoverage: ReviewInputCoverage;
444
+ readonly assurance: ReviewAssurance;
445
+ /** Deprecated compatibility aggregate. */
446
+ readonly coverage: ReviewCoverage;
447
+ readonly confirmedFindings: ReadonlyArray<ReviewFinding>;
448
+ readonly confirmedConcerns: ReadonlyArray<ReviewConcern>;
449
+ readonly walkthrough: ReadonlyArray<WalkthroughEntry>;
450
+ }
451
+ /** Assess one settled run without trusting coordinator prose or findings. */
452
+ declare const assessReviewPipeline: (input: {
453
+ readonly shape: ReviewShape;
454
+ readonly files: ReadonlyArray<ChangedFile>;
455
+ readonly totalFiles: number;
456
+ readonly anchorFiles: ReadonlyArray<ChangedFile>;
457
+ readonly totalAnchorFiles: number;
458
+ readonly events: ReadonlyArray<RunEvent>;
459
+ }) => ReviewPipelineAssessment;
460
+ /** Compatibility helper; prefer assessReviewPipeline for precise claims. */
401
461
  declare const assessReviewCoverage: (input: {
402
462
  readonly shape: ReviewShape;
403
463
  readonly files: ReadonlyArray<ChangedFile>;
@@ -406,6 +466,8 @@ declare const assessReviewCoverage: (input: {
406
466
  readonly totalAnchorFiles: number;
407
467
  readonly events: ReadonlyArray<RunEvent>;
408
468
  }) => ReviewCoverage;
469
+ /** Host-verified summaries from successful general discovery passes only. */
470
+ declare const collectUnitFileSummaries: (events: ReadonlyArray<RunEvent>) => ReadonlyArray<WalkthroughEntry>;
409
471
  //#endregion
410
472
  //#region src/internal/review-state.d.ts
411
473
  declare const ReviewMode: Schema.Literals<readonly ["incremental", "final"]>;
@@ -446,10 +508,12 @@ declare const ReviewState_base: Schema.Class<ReviewState, Schema.Struct<{
446
508
  readonly lastReviewMode: Schema.Literals<readonly ["incremental", "full"]>;
447
509
  }>, {}>;
448
510
  /**
449
- * Versioned state embedded in one successfully covered review. The reviewed
450
- * head plus the full-scope fingerprint means every path not represented by an
451
- * unresolved item is accepted at that head; storing hundreds of path strings
452
- * separately would not fit GitHub's bounded review body in the worst case.
511
+ * Versioned state embedded only after complete input assignment and settled
512
+ * configured review assurance. The head plus full-scope fingerprint forms an
513
+ * incremental baseline; an absent unresolved item never means the path is
514
+ * defect-free. The `acceptedScopeFingerprint` name is retained for wire
515
+ * compatibility. Storing hundreds of path strings separately would not fit
516
+ * GitHub's bounded review body in the worst case.
453
517
  */
454
518
  declare class ReviewState extends ReviewState_base {}
455
519
  declare const toStoredFinding: (finding: ReviewFinding) => StoredReviewFinding;
@@ -595,7 +659,6 @@ declare const estimateReviewEffort: (files: ReadonlyArray<ChangedFile>) => {
595
659
  * Why one finding cannot become an inline comment, or undefined when it can.
596
660
  * Exported so tests can pin each rule individually.
597
661
  */
598
- declare const anchorViolation: (finding: ReviewFinding, files: ReadonlyArray<ChangedFile>) => string | undefined;
599
662
  /**
600
663
  * Turn one validated review into the exact GitHub publication payload.
601
664
  * `applyVerdict: false` (the safe default) always posts a COMMENT review;
@@ -628,7 +691,11 @@ declare const planPublication: (review: CodeReview, files: ReadonlyArray<Changed
628
691
  readonly fingerprint?: string | undefined;
629
692
  /** Host-owned coverage; incomplete coverage is rendered and fails the check. */
630
693
  readonly coverage?: ReviewCoverage | undefined;
631
- /** Unchanged unresolved items carried from the prior successfully reviewed head. */
694
+ /** Host-owned path/evidence assignment, separate from review assurance. */
695
+ readonly inputCoverage?: ReviewInputCoverage | undefined;
696
+ /** Host-owned discovery/specialist/verification settlement. */
697
+ readonly assurance?: ReviewAssurance | undefined;
698
+ /** Unchanged unresolved items carried from the prior settled assurance baseline. */
632
699
  readonly carriedFindings?: ReadonlyArray<ReviewFinding> | undefined;
633
700
  readonly carriedConcerns?: ReadonlyArray<ReviewConcern> | undefined;
634
701
  /** Selected review scope, made visible whenever orchestration chose it. */
@@ -813,16 +880,65 @@ declare const fingerprintUnchanged: (current: string) => Effect.Effect<boolean,
813
880
  declare const MAX_REVIEW_UNITS = 8;
814
881
  /** A unit never carries more files than this, regardless of their size. */
815
882
  declare const MAX_UNIT_FILES = 12;
816
- /** Soft changed-line budget per unit; a single oversized file still gets its own unit. */
883
+ /** Compatibility export; complete evidence chars now own unit packing. */
817
884
  declare const UNIT_CHANGED_LINE_BUDGET = 800;
885
+ /**
886
+ * Bound the complete model-visible evidence assigned to one child. This is a
887
+ * character bound rather than a token estimate because it is deterministic,
888
+ * provider-independent, and enforced before any model call.
889
+ */
890
+ declare const UNIT_EVIDENCE_CHAR_BUDGET = 240000;
891
+ /** Maximum complete evidence shards placed in one child brief. */
892
+ declare const MAX_UNIT_EVIDENCE_SHARDS = 12;
893
+ /**
894
+ * Keep overflow diagnostics bounded to one plan's total assignment capacity.
895
+ * The plan separately records the exact overflow count and every affected
896
+ * path, so identifiers are a deterministic diagnostic sample rather than the
897
+ * authority for whether input coverage is complete.
898
+ */
899
+ declare const MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS: number;
900
+ /** @deprecated Use `MAX_PATCH_CHARS`; this is now the per-shard bound. */
901
+ declare const MAX_FILE_EVIDENCE_CHARS = 60000;
818
902
  /** The merged review never exceeds the `CodeReview` findings bound. */
819
903
  declare const MAX_MERGED_FINDINGS = 20;
820
904
  declare const ReviewUnitId: Schema.NonEmptyString;
905
+ /** High-risk surfaces that receive an explicit specialist focus label. */
906
+ declare const ReviewRiskCategory: Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>;
907
+ type ReviewRiskCategory = typeof ReviewRiskCategory.Type;
908
+ declare const ReviewDiscoveryPerspective: Schema.Literals<readonly ["general", "risk-specialist"]>;
909
+ type ReviewDiscoveryPerspective = typeof ReviewDiscoveryPerspective.Type;
910
+ declare const ReviewPassId: Schema.NonEmptyString;
911
+ declare const ReviewEvidenceShardId: Schema.NonEmptyString;
912
+ declare const ReviewEvidenceShard_base: Schema.Class<ReviewEvidenceShard, Schema.Struct<{
913
+ readonly shardId: Schema.NonEmptyString;
914
+ readonly path: Schema.NonEmptyString;
915
+ readonly ordinal: Schema.Int;
916
+ readonly total: Schema.Int;
917
+ readonly evidenceChars: Schema.Int;
918
+ }>, {}>;
919
+ /** One complete bounded slice of a changed path's model-visible evidence. */
920
+ declare class ReviewEvidenceShard extends ReviewEvidenceShard_base {}
921
+ declare const ReviewDiscoveryPass_base: Schema.Class<ReviewDiscoveryPass, Schema.Struct<{
922
+ readonly passId: Schema.NonEmptyString;
923
+ readonly unitId: Schema.NonEmptyString;
924
+ readonly paths: Schema.$Array<Schema.NonEmptyString>;
925
+ readonly evidenceShardIds: Schema.$Array<Schema.NonEmptyString>;
926
+ readonly perspective: Schema.Literals<readonly ["general", "risk-specialist"]>;
927
+ /** Empty for the general pass; explicit deterministic focus for specialists. */
928
+ readonly riskCategories: Schema.$Array<Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>>;
929
+ }>, {}>;
930
+ /** One required, independently scoped discovery attempt. */
931
+ declare class ReviewDiscoveryPass extends ReviewDiscoveryPass_base {}
821
932
  declare const ReviewUnit_base: Schema.Class<ReviewUnit, Schema.Struct<{
822
933
  readonly unitId: Schema.NonEmptyString;
823
934
  readonly paths: Schema.$Array<Schema.NonEmptyString>;
935
+ readonly evidenceShards: Schema.$Array<typeof ReviewEvidenceShard>;
824
936
  /** additions + deletions across the unit's files, for honest sizing. */
825
937
  readonly changedLines: Schema.Int;
938
+ /** Complete model-visible diff/content evidence assigned to each child. */
939
+ readonly evidenceChars: Schema.Int;
940
+ /** Host-classified focus labels for the unit's redundant specialist pass. */
941
+ readonly riskCategories: Schema.$Array<Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>>;
826
942
  }>, {}>;
827
943
  /** One bounded slice of the changeset delegated to one child reviewer. */
828
944
  declare class ReviewUnit extends ReviewUnit_base {}
@@ -831,8 +947,16 @@ declare const ReviewUnitPlan_base: Schema.Class<ReviewUnitPlan, Schema.Struct<{
831
947
  /** True when the source returned fewer files than the pull request has. */
832
948
  readonly truncated: Schema.Boolean;
833
949
  readonly units: Schema.$Array<typeof ReviewUnit>;
950
+ /** Exact discovery calls the coordinator must make. */
951
+ readonly discoveryPasses: Schema.$Array<typeof ReviewDiscoveryPass>;
834
952
  /** Changed files with neither a textual diff nor bounded base/head text. */
835
953
  readonly undiffablePaths: Schema.$Array<Schema.NonEmptyString>;
954
+ /** Assigned paths with one or more evidence shards beyond plan capacity. */
955
+ readonly partialEvidencePaths: Schema.$Array<Schema.NonEmptyString>;
956
+ /** Exact number of shards beyond the bounded unit capacity. */
957
+ readonly unassignedEvidenceShardCount: Schema.Int;
958
+ /** Bounded deterministic prefix of the unassigned shard identifiers. */
959
+ readonly unassignedEvidenceShardIds: Schema.$Array<Schema.NonEmptyString>;
836
960
  /**
837
961
  * Diffable files beyond the fan-out capacity (MAX_REVIEW_UNITS units of
838
962
  * MAX_UNIT_FILES files). Never silently dropped: the coordinator must name
@@ -842,22 +966,36 @@ declare const ReviewUnitPlan_base: Schema.Class<ReviewUnitPlan, Schema.Struct<{
842
966
  }>, {}>;
843
967
  /** The complete deterministic fan-out plan over one changeset. */
844
968
  declare class ReviewUnitPlan extends ReviewUnitPlan_base {}
969
+ /**
970
+ * Deterministic host policy for specialist assignment. It intentionally
971
+ * favors false positives: an extra bounded pass costs work, while a missed
972
+ * high-risk classification removes redundancy. This is not a claim that the
973
+ * keyword policy recognizes every semantically risky change.
974
+ */
975
+ declare const classifyReviewRisks: (file: ChangedFile) => ReadonlyArray<ReviewRiskCategory>;
976
+ /**
977
+ * Whether every claimed finding anchor was present in the exact bounded
978
+ * evidence shards assigned to one unit. This is stricter than checking the
979
+ * full pull-request diff when an oversized path spans multiple units.
980
+ */
981
+ declare const findingAnchorInUnitEvidence: (finding: ReviewFinding, unit: ReviewUnit, files: ReadonlyArray<ChangedFile>) => boolean;
845
982
  /**
846
983
  * Group the changeset into at most `MAX_REVIEW_UNITS` review units.
847
984
  *
848
985
  * Deterministic by construction: files are ordered by path (so files sharing
849
986
  * a directory become neighbors — directory affinity without a heuristic),
850
- * then packed greedily in that order under the soft changed-line budget and
851
- * the hard per-unit file bound. Capacity is finite and explicit:
987
+ * then split into complete line-bounded evidence shards and packed greedily
988
+ * under the hard evidence and per-unit shard bounds. Capacity is finite and
989
+ * explicit:
852
990
  *
853
991
  * - files without a textual diff are still delegated when the source
854
992
  * recovered complete bounded UTF-8 base/head content. Findings from that
855
993
  * evidence cannot anchor inline and are reported as concerns;
856
994
  * - files with neither form of textual evidence surface in
857
995
  * `undiffablePaths` instead of laundering missing coverage;
858
- * - reviewable files beyond `MAX_REVIEW_UNITS` full units surface in
859
- * `unassignedPaths` so the review can report them as unreviewed, never
860
- * silently truncated.
996
+ * - an oversized path spans as many deterministic shards and units as needed;
997
+ * - shards beyond `MAX_REVIEW_UNITS` full units surface explicitly, so a path
998
+ * is partial only when finite plan capacity is genuinely exhausted.
861
999
  */
862
1000
  declare const planReviewUnits: (files: ReadonlyArray<ChangedFile>, options: {
863
1001
  readonly totalChangedFiles: number;
@@ -873,116 +1011,144 @@ declare const planReviewUnits: (files: ReadonlyArray<ChangedFile>, options: {
873
1011
  declare const rankAndDedupeFindings: (findings: ReadonlyArray<ReviewFinding>) => ReadonlyArray<ReviewFinding>;
874
1012
  //#endregion
875
1013
  //#region src/internal/fan-out.d.ts
876
- /** One child returns at most this many findings; the merge caps the total. */
877
- declare const MAX_CHILD_FINDINGS = 8;
878
- /** One child returns at most this many non-anchored concerns. */
1014
+ /** One discovery pass returns at most this many anchored candidates. */
1015
+ declare const MAX_CHILD_FINDINGS = 6;
1016
+ /** One discovery pass returns at most this many non-anchored candidates. */
879
1017
  declare const MAX_CHILD_CONCERNS = 3;
1018
+ /** Every unit receives independent general and specialist discovery passes. */
1019
+ declare const MAX_UNIT_CANDIDATES: number;
1020
+ /** General + specialist discovery for every unit, then one verifier per unit. */
1021
+ declare const MAX_REVIEW_CHILDREN: number;
1022
+ /** Structural minimum for a child that exposes no tools. */
1023
+ declare const MAX_FILE_REVIEW_TOOL_CALLS = 1;
1024
+ declare const ReviewWorkPhase: Schema.Literals<readonly ["discovery", "verification"]>;
1025
+ type ReviewWorkPhase = typeof ReviewWorkPhase.Type;
1026
+ declare const ReviewWorkPerspective: Schema.Literals<readonly ["general", "risk-specialist", "candidate-verification"]>;
1027
+ type ReviewWorkPerspective = typeof ReviewWorkPerspective.Type;
1028
+ declare const ReviewCandidateId: Schema.NonEmptyString;
1029
+ declare const FindingCandidate_base: Schema.Class<FindingCandidate, Schema.TaggedStruct<"FindingCandidate", {
1030
+ readonly candidateId: Schema.NonEmptyString;
1031
+ readonly workId: Schema.NonEmptyString;
1032
+ readonly unitId: Schema.NonEmptyString;
1033
+ readonly finding: typeof ReviewFinding;
1034
+ readonly evidencePaths: Schema.$Array<Schema.NonEmptyString>;
1035
+ }>, {}>;
1036
+ declare class FindingCandidate extends FindingCandidate_base {}
1037
+ declare const ConcernCandidate_base: Schema.Class<ConcernCandidate, Schema.TaggedStruct<"ConcernCandidate", {
1038
+ readonly candidateId: Schema.NonEmptyString;
1039
+ readonly workId: Schema.NonEmptyString;
1040
+ readonly unitId: Schema.NonEmptyString;
1041
+ readonly concern: typeof ReviewConcern;
1042
+ readonly evidencePaths: Schema.$Array<Schema.NonEmptyString>;
1043
+ }>, {}>;
1044
+ declare class ConcernCandidate extends ConcernCandidate_base {}
1045
+ declare const ReviewCandidate: Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>;
1046
+ type ReviewCandidate = typeof ReviewCandidate.Type;
1047
+ /** Deterministic host equivalence for claims repeated across discovery passes. */
1048
+ declare const reviewCandidateSubjectKey: (candidate: ReviewCandidate) => string;
1049
+ declare const CandidateAssessment_base: Schema.Class<CandidateAssessment, Schema.Struct<{
1050
+ readonly candidateId: Schema.NonEmptyString;
1051
+ readonly disposition: Schema.Literals<readonly ["confirmed", "rejected"]>;
1052
+ readonly rationale: Schema.NonEmptyString;
1053
+ }>, {}>;
1054
+ declare class CandidateAssessment extends CandidateAssessment_base {}
1055
+ declare const DiscoveredConcern_base: Schema.Class<DiscoveredConcern, Schema.Struct<{
1056
+ readonly concern: typeof ReviewConcern;
1057
+ readonly evidencePaths: Schema.$Array<Schema.NonEmptyString>;
1058
+ }>, {}>;
880
1059
  /**
881
- * One mandatory diff read plus one bounded context read for every path in a
882
- * maximum-size unit. Keep the child and delegation reservation aligned.
1060
+ * Concern candidates need explicit paths internally to bind the claim to
1061
+ * scheduled evidence. The verifier receives the complete bounded unit so it
1062
+ * can use neighboring evidence to falsify the claim. The public ReviewConcern
1063
+ * remains path-free after the host confirms and projects it.
883
1064
  */
884
- declare const MAX_FILE_REVIEW_TOOL_CALLS: number;
885
- declare const FileReviewToolkit: Toolkit.Toolkit<{
886
- readonly read_file: Tool.Tool<"read_file", {
887
- readonly parameters: typeof FileSliceQuery;
888
- readonly success: typeof FileSlice;
889
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
890
- readonly failureMode: "return";
891
- }, PullRequestSource>;
892
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
893
- readonly parameters: typeof FileDiffQuery;
894
- readonly success: typeof FileDiffView;
895
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
896
- readonly failureMode: "return";
897
- }, PullRequestSource>;
898
- }>;
899
- declare const FileReviewToolkitLayer: import("effect/Layer").Layer<Tool.HandlersFor<{
900
- readonly read_file: Tool.Tool<"read_file", {
901
- readonly parameters: typeof FileSliceQuery;
902
- readonly success: typeof FileSlice;
903
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
904
- readonly failureMode: "return";
905
- }, PullRequestSource>;
906
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
907
- readonly parameters: typeof FileDiffQuery;
908
- readonly success: typeof FileDiffView;
909
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
910
- readonly failureMode: "return";
911
- }, PullRequestSource>;
912
- }>, never, never>;
1065
+ declare class DiscoveredConcern extends DiscoveredConcern_base {}
1066
+ declare const FileReviewRequest_base: Schema.Class<FileReviewRequest, Schema.Struct<{
1067
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1068
+ readonly workId: Schema.NonEmptyString;
1069
+ readonly unitId: Schema.NonEmptyString;
1070
+ readonly paths: Schema.$Array<Schema.NonEmptyString>;
1071
+ readonly evidenceShardIds: Schema.$Array<Schema.NonEmptyString>;
1072
+ readonly perspective: Schema.Literals<readonly ["general", "risk-specialist", "candidate-verification"]>;
1073
+ readonly riskCategories: Schema.$Array<Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>>;
1074
+ /** Empty for discovery; the exact discovered set for unit verification. */
1075
+ readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1076
+ }>, {}>;
1077
+ /** Strict-object coordinator request for either discovery or verification. */
1078
+ declare class FileReviewRequest extends FileReviewRequest_base {}
1079
+ declare const FileReviewEvidence_base: Schema.Class<FileReviewEvidence, Schema.Struct<{
1080
+ readonly shardId: Schema.NonEmptyString;
1081
+ readonly path: Schema.NonEmptyString;
1082
+ readonly status: Schema.Literals<readonly ["added", "removed", "modified", "renamed", "copied", "changed", "unchanged"]>;
1083
+ readonly reviewMode: Schema.Literals<readonly ["diff", "content", "unavailable"]>;
1084
+ readonly ordinal: Schema.Int;
1085
+ readonly total: Schema.Int;
1086
+ readonly annotatedPatch: Schema.String;
1087
+ }>, {}>;
1088
+ /** One complete host-selected evidence shard supplied to a review child. */
1089
+ declare class FileReviewEvidence extends FileReviewEvidence_base {}
913
1090
  declare const FileReviewBrief_base: Schema.Class<FileReviewBrief, Schema.Struct<{
1091
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1092
+ readonly workId: Schema.NonEmptyString;
914
1093
  readonly unitId: Schema.NonEmptyString;
915
1094
  readonly paths: Schema.$Array<Schema.NonEmptyString>;
916
- readonly focus: Schema.NonEmptyString;
1095
+ readonly evidenceShardIds: Schema.$Array<Schema.NonEmptyString>;
1096
+ readonly perspective: Schema.Literals<readonly ["general", "risk-specialist", "candidate-verification"]>;
1097
+ readonly riskCategories: Schema.$Array<Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>>;
1098
+ readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1099
+ readonly evidence: Schema.$Array<typeof FileReviewEvidence>;
917
1100
  }>, {}>;
918
- /** The child Agent input: one briefed unit of the changeset. */
1101
+ /** Host-prepared child input with complete bounded diff/content evidence. */
919
1102
  declare class FileReviewBrief extends FileReviewBrief_base {}
920
1103
  declare const FileReviewReport_base: Schema.Class<FileReviewReport, Schema.Struct<{
1104
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1105
+ readonly workId: Schema.NonEmptyString;
921
1106
  readonly unitId: Schema.NonEmptyString;
922
1107
  readonly findings: Schema.$Array<typeof ReviewFinding>;
923
- /** Unit-scoped concerns with no diff line to anchor to. */
924
- readonly concerns: Schema.optionalKey<Schema.$Array<typeof ReviewConcern>>;
925
- /** One-sentence per-file change summaries for the merged walkthrough. */
926
- readonly fileSummaries: Schema.optionalKey<Schema.$Array<typeof WalkthroughEntry>>;
1108
+ readonly concerns: Schema.$Array<typeof DiscoveredConcern>;
1109
+ readonly fileSummaries: Schema.$Array<typeof WalkthroughEntry>;
1110
+ readonly assessments: Schema.$Array<typeof CandidateAssessment>;
927
1111
  }>, {}>;
928
- /** The child Agent output: the briefed unit's bounded findings and concerns. */
1112
+ /** Child output; phase-inapplicable collections must be empty. */
929
1113
  declare class FileReviewReport extends FileReviewReport_base {}
930
- /**
931
- * Guidance for delegated children must be static: child instructions are a
932
- * pure function of the brief, and the coordinator's mission never crosses the
933
- * delegation boundary (context isolation), so mission-dependent guidance
934
- * cannot be resolved for a child.
935
- */
936
- interface FanOutInstructionOptions {
937
- readonly guidance?: string | ReadonlyArray<string> | undefined;
938
- }
939
- /** Build the child file-reviewer instructions with optional static guidance. */
940
- declare const makeFileReviewerInstructions: (options?: FanOutInstructionOptions) => (brief: FileReviewBrief) => string;
941
- declare const fileReviewerInstructions: (brief: FileReviewBrief) => string;
942
- /** The default per-unit child execution bounds. */
943
- declare const defaultFileReviewerPolicy: AgentPolicy;
944
- declare const FileReviewRequest_base: Schema.Class<FileReviewRequest, Schema.Struct<{
945
- readonly unitId: Schema.NonEmptyString;
946
- readonly paths: Schema.$Array<Schema.NonEmptyString>;
947
- }>, {}>;
948
- /** The model-decoded delegation parameters: which unit to review. */
949
- declare class FileReviewRequest extends FileReviewRequest_base {}
950
1114
  declare const FileReviewUnitResult_base: Schema.Class<FileReviewUnitResult, Schema.Struct<{
1115
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1116
+ readonly workId: Schema.NonEmptyString;
951
1117
  readonly unitId: Schema.NonEmptyString;
952
- readonly findings: Schema.$Array<typeof ReviewFinding>;
953
- /** Unit-scoped concerns with no diff line to anchor to. */
954
- readonly concerns: Schema.optionalKey<Schema.$Array<typeof ReviewConcern>>;
955
- /** One-sentence per-file change summaries for the merged walkthrough. */
956
- readonly fileSummaries: Schema.optionalKey<Schema.$Array<typeof WalkthroughEntry>>;
1118
+ readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1119
+ readonly fileSummaries: Schema.$Array<typeof WalkthroughEntry>;
1120
+ readonly assessments: Schema.$Array<typeof CandidateAssessment>;
957
1121
  }>, {}>;
958
- /** The bounded parent-visible result of one delegated unit review. */
1122
+ /** Bounded coordinator-visible result with host-assigned candidate IDs. */
959
1123
  declare class FileReviewUnitResult extends FileReviewUnitResult_base {}
960
1124
  declare const FileReviewUnitFailed_base: Schema.Class<FileReviewUnitFailed, Schema.TaggedStruct<"FileReviewUnitFailed", {
961
1125
  readonly childErrorTag: Schema.NonEmptyString;
962
1126
  readonly message: Schema.String;
963
1127
  }>, import("effect/Cause").YieldableError>;
964
- /**
965
- * One unit's review failed: the child Run ended in a typed failure (policy
966
- * bound, output violation, model fault). The marker is bounded and carries no
967
- * child transcript content beyond the failure tag and message.
968
- */
969
1128
  declare class FileReviewUnitFailed extends FileReviewUnitFailed_base {}
970
- /**
971
- * Finite per-invocation bounds (SUB-009), aligned with the child's own
972
- * AgentPolicy: the child's policy is the limit that trips typed; the
973
- * reservation mirrors it so parent-side accounting stays honest.
974
- */
1129
+ declare const FileReviewWorkRejected_base: Schema.Class<FileReviewWorkRejected, Schema.TaggedStruct<"FileReviewWorkRejected", {
1130
+ readonly workId: Schema.NonEmptyString;
1131
+ readonly reason: Schema.NonEmptyString;
1132
+ }>, import("effect/Cause").YieldableError>;
1133
+ declare class FileReviewWorkRejected extends FileReviewWorkRejected_base {}
1134
+ declare const FileReviewFailure: Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>;
1135
+ interface FanOutInstructionOptions {
1136
+ readonly guidance?: string | ReadonlyArray<string> | undefined;
1137
+ }
1138
+ /** Discovery and verification instructions share one child definition. */
1139
+ declare const makeFileReviewerInstructions: (options?: FanOutInstructionOptions) => (brief: FileReviewBrief) => string;
1140
+ declare const fileReviewerInstructions: (brief: FileReviewBrief) => string;
1141
+ declare const FileReviewToolkit: Toolkit.Toolkit<{}>;
1142
+ /** Compatibility export: the evidence-only child has no handler requirements. */
1143
+ declare const FileReviewToolkitLayer: Layer.Layer<never, never, never>;
1144
+ declare const defaultFileReviewerPolicy: AgentPolicy;
975
1145
  declare const fileReviewPolicy: SubagentPolicy;
976
- /**
977
- * Total mapping from every expected child Run failure to the declared unit
978
- * failure (SUB-028): the tag plus a bounded message, nothing else crosses.
979
- */
980
1146
  declare const mapFileReviewChildFailure: (failure: {
981
1147
  readonly _tag: string;
982
1148
  readonly message?: string;
983
1149
  }) => FileReviewUnitFailed;
1150
+ declare const makeFileReviewDelegation: (child: ReturnType<typeof makeFileReviewerDefinition>) => import("effect-agent").SubagentDelegation<"delegate_file_review", typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {}, typeof FileReviewRequest, typeof FileReviewUnitResult, Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>, PullRequestSource, PullRequestSource, "return">;
984
1151
  declare const ListReviewUnitsQuery_base: Schema.Class<ListReviewUnitsQuery, Schema.Struct<{
985
- /** Explicit constant keeps the zero-choice operation compatible with strict provider schemas. */
986
1152
  readonly scope: Schema.Literal<"all">;
987
1153
  }>, {}>;
988
1154
  declare class ListReviewUnitsQuery extends ListReviewUnitsQuery_base {}
@@ -1000,63 +1166,24 @@ declare const FanOutCoordinatorToolkit: Toolkit.Toolkit<{
1000
1166
  readonly failureMode: "error";
1001
1167
  }, PullRequestSource>;
1002
1168
  }>;
1003
- declare const FanOutCoordinatorToolkitLayer: import("effect/Layer").Layer<Tool.Handler<"list_review_units">, never, never>;
1004
- /**
1005
- * Build the coordinator's instructions. The same consumer guidance the
1006
- * children receive is injected between the mission framing and the procedure
1007
- * so the merged summary and verdict are shaped by the same review profile,
1008
- * and the configured findings bound reaches the merge step instead of only
1009
- * the host-side trim.
1010
- */
1169
+ declare const FanOutCoordinatorToolkitLayer: Layer.Layer<Tool.Handler<"list_review_units">, never, never>;
1011
1170
  declare const makeFanOutReviewInstructions: (options?: FanOutInstructionOptions & {
1012
1171
  readonly maxFindings?: number | undefined;
1013
1172
  }) => (mission: ReviewMission) => string;
1014
1173
  declare const fanOutReviewInstructions: (mission: ReviewMission) => string;
1015
- /** The default fan-out coordinator execution bounds. */
1016
1174
  declare const defaultFanOutPolicy: AgentPolicy;
1017
- /** Everything one fan-out configuration is made of, built as one unit so the
1018
- * delegation always targets exactly the child definition that will run. */
1019
1175
  interface FanOutReviewSuite {
1020
1176
  readonly child: ReturnType<typeof makeFileReviewerDefinition>;
1021
1177
  readonly parent: ReturnType<typeof makeFanOutReviewerDefinition>;
1022
1178
  readonly delegation: ReturnType<typeof makeFileReviewDelegation>;
1023
1179
  }
1024
- declare const makeFileReviewerDefinition: (options?: FanOutInstructionOptions) => import("effect-agent").Definition<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, Toolkit.Toolkit<{
1025
- readonly read_file: Tool.Tool<"read_file", {
1026
- readonly parameters: typeof FileSliceQuery;
1027
- readonly success: typeof FileSlice;
1028
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1029
- readonly failureMode: "return";
1030
- }, PullRequestSource>;
1031
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
1032
- readonly parameters: typeof FileDiffQuery;
1033
- readonly success: typeof FileDiffView;
1034
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1035
- readonly failureMode: "return";
1036
- }, PullRequestSource>;
1037
- }>, undefined>;
1038
- /** Options for one coherent fan-out suite: shared guidance plus the merge bound. */
1039
- interface FanOutSuiteOptions extends FanOutInstructionOptions {
1180
+ declare const makeFileReviewerDefinition: (options?: FanOutInstructionOptions) => import("effect-agent").Definition<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, Toolkit.Toolkit<{}>, undefined>;
1181
+ declare const makeFanOutReviewerDefinition: (options: FanOutInstructionOptions & {
1040
1182
  readonly maxFindings?: number | undefined;
1041
- }
1042
- declare const makeFileReviewDelegation: (child: ReturnType<typeof makeFileReviewerDefinition>) => import("effect-agent").SubagentDelegation<"delegate_file_review", typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {
1043
- readonly read_file: Tool.Tool<"read_file", {
1044
- readonly parameters: typeof FileSliceQuery;
1045
- readonly success: typeof FileSlice;
1046
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1047
- readonly failureMode: "return";
1048
- }, PullRequestSource>;
1049
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
1050
- readonly parameters: typeof FileDiffQuery;
1051
- readonly success: typeof FileDiffView;
1052
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1053
- readonly failureMode: "return";
1054
- }, PullRequestSource>;
1055
- }, typeof FileReviewRequest, typeof FileReviewUnitResult, typeof FileReviewUnitFailed, never, never, "return">;
1056
- declare const makeFanOutReviewerDefinition: (options: FanOutSuiteOptions, delegation: ReturnType<typeof makeFileReviewDelegation>) => import("effect-agent").Definition<typeof ReviewMission, typeof CodeReview, (mission: ReviewMission) => string, Toolkit.Toolkit<{
1183
+ }, delegation: ReturnType<typeof makeFileReviewDelegation>) => import("effect-agent").Definition<typeof ReviewMission, typeof CodeReview, (mission: ReviewMission) => string, Toolkit.Toolkit<{
1057
1184
  readonly delegate_file_review: Tool.Tool<"delegate_file_review", {
1058
1185
  readonly parameters: typeof FileReviewRequest;
1059
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1186
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1060
1187
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1061
1188
  readonly failureMode: "error";
1062
1189
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
@@ -1067,28 +1194,15 @@ declare const makeFanOutReviewerDefinition: (options: FanOutSuiteOptions, delega
1067
1194
  readonly failureMode: "error";
1068
1195
  }, PullRequestSource>;
1069
1196
  }>, undefined>;
1070
- /** Build one coherent fan-out suite: child, coordinator, and delegation. */
1197
+ interface FanOutSuiteOptions extends FanOutInstructionOptions {
1198
+ readonly maxFindings?: number | undefined;
1199
+ }
1071
1200
  declare const makeFanOutReviewSuite: (options?: FanOutSuiteOptions) => FanOutReviewSuite;
1072
- /** The default child Agent Definition. */
1073
- declare const FileReviewer: import("effect-agent").Definition<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, Toolkit.Toolkit<{
1074
- readonly read_file: Tool.Tool<"read_file", {
1075
- readonly parameters: typeof FileSliceQuery;
1076
- readonly success: typeof FileSlice;
1077
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1078
- readonly failureMode: "return";
1079
- }, PullRequestSource>;
1080
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
1081
- readonly parameters: typeof FileDiffQuery;
1082
- readonly success: typeof FileDiffView;
1083
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1084
- readonly failureMode: "return";
1085
- }, PullRequestSource>;
1086
- }>, undefined>;
1087
- /** The default coordinator Agent Definition. */
1201
+ declare const FileReviewer: import("effect-agent").Definition<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, Toolkit.Toolkit<{}>, undefined>;
1088
1202
  declare const FanOutReviewer: import("effect-agent").Definition<typeof ReviewMission, typeof CodeReview, (mission: ReviewMission) => string, Toolkit.Toolkit<{
1089
1203
  readonly delegate_file_review: Tool.Tool<"delegate_file_review", {
1090
1204
  readonly parameters: typeof FileReviewRequest;
1091
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1205
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1092
1206
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1093
1207
  readonly failureMode: "error";
1094
1208
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
@@ -1099,33 +1213,17 @@ declare const FanOutReviewer: import("effect-agent").Definition<typeof ReviewMis
1099
1213
  readonly failureMode: "error";
1100
1214
  }, PullRequestSource>;
1101
1215
  }>, undefined>;
1102
- /** The default delegation over the default child. */
1103
- declare const fileReviewDelegation: import("effect-agent").SubagentDelegation<"delegate_file_review", typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {
1104
- readonly read_file: Tool.Tool<"read_file", {
1105
- readonly parameters: typeof FileSliceQuery;
1106
- readonly success: typeof FileSlice;
1107
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1108
- readonly failureMode: "return";
1109
- }, PullRequestSource>;
1110
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
1111
- readonly parameters: typeof FileDiffQuery;
1112
- readonly success: typeof FileDiffView;
1113
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1114
- readonly failureMode: "return";
1115
- }, PullRequestSource>;
1116
- }, typeof FileReviewRequest, typeof FileReviewUnitResult, typeof FileReviewUnitFailed, never, never, "return">;
1117
- /** The default coordinator-facing delegation Tool (first-party contained mode). */
1216
+ declare const fileReviewDelegation: import("effect-agent").SubagentDelegation<"delegate_file_review", typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {}, typeof FileReviewRequest, typeof FileReviewUnitResult, Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>, PullRequestSource, PullRequestSource, "return">;
1118
1217
  declare const DelegateFileReview: Tool.Tool<"delegate_file_review", {
1119
1218
  readonly parameters: typeof FileReviewRequest;
1120
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1219
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1121
1220
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1122
1221
  readonly failureMode: "error";
1123
1222
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
1124
- /** The default coordinator Toolkit. */
1125
1223
  declare const FanOutReviewToolkit: Toolkit.Toolkit<{
1126
1224
  readonly delegate_file_review: Tool.Tool<"delegate_file_review", {
1127
1225
  readonly parameters: typeof FileReviewRequest;
1128
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1226
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1129
1227
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1130
1228
  readonly failureMode: "error";
1131
1229
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
@@ -1136,48 +1234,15 @@ declare const FanOutReviewToolkit: Toolkit.Toolkit<{
1136
1234
  readonly failureMode: "error";
1137
1235
  }, PullRequestSource>;
1138
1236
  }>;
1139
- /**
1140
- * The contained failure family the delegation can surface as result data
1141
- * (SUB-033), derived from the delegation itself so the coverage decoder can
1142
- * never diverge from what the runtime actually contains.
1143
- */
1144
- declare const FileReviewDelegationFailure: import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>;
1145
- /** Runtime wiring: one delegation plus one explicit child Binding. */
1146
- declare const fanOutHandlersLayerFor: (delegation: ReturnType<typeof makeFileReviewDelegation>) => <Provider, ModelProvides, ModelRequires>(childBinding: RuntimeBinding<typeof FileReviewBrief, typeof FileReviewReport, ReturnType<typeof makeFileReviewerInstructions>, Toolkit.Tools<typeof FileReviewToolkit>, Provider, ModelProvides, ModelRequires>) => import("effect/Layer").Layer<Tool.Handler<"delegate_file_review">, never, import("effect-agent").SubagentLayerRequirements<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {
1147
- readonly read_file: Tool.Tool<"read_file", {
1148
- readonly parameters: typeof FileSliceQuery;
1149
- readonly success: typeof FileSlice;
1150
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1151
- readonly failureMode: "return";
1152
- }, PullRequestSource>;
1153
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
1154
- readonly parameters: typeof FileDiffQuery;
1155
- readonly success: typeof FileDiffView;
1156
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1157
- readonly failureMode: "return";
1158
- }, PullRequestSource>;
1159
- }, Provider, ModelProvides, ModelRequires, never, never, never, {
1237
+ declare const FileReviewDelegationFailure: import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>;
1238
+ declare const fanOutHandlersLayerFor: (delegation: ReturnType<typeof makeFileReviewDelegation>) => <Provider, ModelProvides, ModelRequires>(childBinding: RuntimeBinding<typeof FileReviewBrief, typeof FileReviewReport, ReturnType<typeof makeFileReviewerInstructions>, Toolkit.Tools<typeof FileReviewToolkit>, Provider, ModelProvides, ModelRequires>) => Layer.Layer<Tool.Handler<"delegate_file_review">, never, import("effect-agent").SubagentLayerRequirements<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {}, Provider, ModelProvides, ModelRequires, PullRequestSource, PullRequestSource, never, {
1160
1239
  readonly _tag: string;
1161
1240
  readonly message?: string;
1162
1241
  }, never>>;
1163
- /** Runtime wiring over the default delegation, mirroring the leaf example. */
1164
- declare const fanOutHandlersLayer: <Provider, ModelProvides, ModelRequires>(childBinding: RuntimeBinding<typeof FileReviewBrief, typeof FileReviewReport, ReturnType<typeof makeFileReviewerInstructions>, Toolkit.Tools<typeof FileReviewToolkit>, Provider, ModelProvides, ModelRequires>) => import("effect/Layer").Layer<Tool.Handler<"delegate_file_review">, never, import("effect-agent").SubagentLayerRequirements<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {
1165
- readonly read_file: Tool.Tool<"read_file", {
1166
- readonly parameters: typeof FileSliceQuery;
1167
- readonly success: typeof FileSlice;
1168
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1169
- readonly failureMode: "return";
1170
- }, PullRequestSource>;
1171
- readonly read_file_diff: Tool.Tool<"read_file_diff", {
1172
- readonly parameters: typeof FileDiffQuery;
1173
- readonly success: typeof FileDiffView;
1174
- readonly failure: Schema.Union<readonly [typeof PullRequestSourceFailure, typeof ReviewInputViolation]>;
1175
- readonly failureMode: "return";
1176
- }, PullRequestSource>;
1177
- }, Provider, ModelProvides, ModelRequires, never, never, never, {
1242
+ declare const fanOutHandlersLayer: <Provider, ModelProvides, ModelRequires>(childBinding: RuntimeBinding<typeof FileReviewBrief, typeof FileReviewReport, ReturnType<typeof makeFileReviewerInstructions>, Toolkit.Tools<typeof FileReviewToolkit>, Provider, ModelProvides, ModelRequires>) => Layer.Layer<Tool.Handler<"delegate_file_review">, never, import("effect-agent").SubagentLayerRequirements<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, {}, Provider, ModelProvides, ModelRequires, PullRequestSource, PullRequestSource, never, {
1178
1243
  readonly _tag: string;
1179
1244
  readonly message?: string;
1180
1245
  }, never>>;
1181
1246
  //#endregion
1182
- export { gitHubPullRequestSourceLayer as $, ChangedFilesView as $t, fileReviewerInstructions as A, readFileDiffHandler as An, ReviewStateAuthenticationFailure as At, ReviewUnitPlan as B, normalizeRepoRelativePath as Bn, selectReviewRange as Bt, defaultFanOutPolicy as C, ReviewToolkitLayer as Cn, MAX_REVIEW_STATE_MARKER_CHARS as Ct, fanOutReviewInstructions as D, defaultReviewPolicy as Dn, ReviewScopeMode as Dt, fanOutHandlersLayerFor as E, clampMaxFindings as En, ReviewMode as Et, MAX_MERGED_FINDINGS as F, MAX_FILE_CHARS as Fn, StoredReviewFinding as Ft, GitHubApiFailure as G, PatchLine as Gn, validateReviewState as Gt, planReviewUnits as H, ChangedFileStatus as Hn, toStoredConcern as Ht, MAX_REVIEW_UNITS as I, PullRequestMetadata as In, buildProfileMission as It, PriorReviews as J, hasReviewableContent as Jn, ReviewCoverage as Jt, GitHubReviewTarget as K, annotatePatch as Kn, webCryptoReviewStateAuthenticatorLayer as Kt, MAX_UNIT_FILES as L, PullRequestSource as Ln, computeProfileFingerprint as Lt, makeFanOutReviewSuite as M, resolveGuidance as Mn, ReviewStateMarker as Mt, makeFileReviewerInstructions as N, reviewInstructions as Nn, ReviewStateMarkerTooLarge as Nt, fileReviewDelegation as O, listChangedFilesHandler as On, ReviewSelection as Ot, mapFileReviewChildFailure as P, MAX_CHANGED_FILES as Pn, StoredReviewConcern as Pt, gitHubPriorReviewsLayer as Q, ChangedFileSummary as Qt, ReviewUnit as R, PullRequestSourceFailure as Rn, fromStoredConcern as Rt, MAX_FILE_REVIEW_TOOL_CALLS as S, ReviewToolkit as Sn, GitCommitSha as St, fanOutHandlersLayer as T, WalkthroughEntry as Tn, ReviewHeadComparison as Tt, rankAndDedupeFindings as U, ChangedPath as Un, toStoredFinding as Ut, UNIT_CHANGED_LINE_BUDGET as V, ChangedFile as Vn, selectedPullRequestSourceLayer as Vt, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as W, MAX_REVIEW_CONTENT_CHARS as Wn, unavailableReviewStateAuthenticatorLayer as Wt, ReviewPublisher as X, parsePatch as Xn, assessReviewCoverage as Xt, PublishedReview as Y, isReviewableFile as Yn, ReviewShape as Yt, fingerprintUnchanged as Z, renderReviewContent as Zn, collectUnitFileSummaries as Zt, FileReviewer as _, ReviewConcern as _n, anchorViolation as _t, FanOutReviewSuite as a, FindingCategory as an, ReviewRetirementDecision as at, MAX_CHILD_CONCERNS as b, ReviewInstructionOptions as bn, planWalkthrough as bt, FanOutSuiteOptions as c, ListChangedFilesQuery as cn, ReviewRetirementInput as ct, FileReviewReport as d, MAX_WALKTHROUGH_ENTRIES as dn, hasReviewMetadataMarker as dt, CodeReview as en, gitHubReviewPublisherLayer as et, FileReviewRequest as f, MAX_WALKTHROUGH_SUMMARY_CHARS as fn, retireStaleReviews as ft, FileReviewUnitResult as g, ReadFileDiff as gn, ReviewPublicationPlan as gt, FileReviewUnitFailed as h, ReadFile as hn, ReviewEvent as ht, FanOutInstructionOptions as i, FileSliceQuery as in, RetirableReviewComment as it, makeFanOutReviewInstructions as j, readFileHandler as jn, ReviewStateAuthenticator as jt, fileReviewPolicy as k, makeReviewInstructions as kn, ReviewState as kt, FileReviewBrief as l, MAX_CONCERNS as ln, ReviewRetirementReport as lt, FileReviewToolkitLayer as m, REVIEW_TOOL_RESULT_MAX_BYTES as mn, ReviewCommentDraft as mt, FanOutCoordinatorToolkit as n, FileDiffView as nn, parseGitHubSubmittedAt as nt, FanOutReviewToolkit as o, FindingSeverity as on, ReviewRetirementFailure as ot, FileReviewToolkit as p, PullRequestReviewer as pn, AGENT_PROMPT_PREAMBLE as pt, PriorReviewLookupFailure as q, commentableLines as qn, FailedReviewUnit as qt, FanOutCoordinatorToolkitLayer as r, FileSlice as rn, RetirableReview as rt, FanOutReviewer as s, ListChangedFiles as sn, ReviewRetirementHost as st, DelegateFileReview as t, FileDiffQuery as tn, gitHubReviewRetirementHostLayer as tt, FileReviewDelegationFailure as u, MAX_FINDINGS as un, decideReviewRetirement as ut, ListReviewUnits as v, ReviewFinding as vn, estimateReviewEffort as vt, defaultFileReviewerPolicy as w, ReviewVerdict as wn, ReviewExecutionContext as wt, MAX_CHILD_FINDINGS as x, ReviewMission as xn, renderAgentPrompt as xt, ListReviewUnitsQuery as y, ReviewGuidance as yn, planPublication as yt, ReviewUnitId as z, ReviewInputViolation as zn, fromStoredFinding as zt };
1183
- //# sourceMappingURL=fan-out-CQFA-o0v.d.mts.map
1247
+ export { MAX_UNIT_EVIDENCE_SHARDS as $, ReviewInstructionOptions as $n, ReviewSelection as $t, MAX_REVIEW_CHILDREN as A, ChangedFilesView as An, isReviewableFile as Ar, RetirableReviewComment as At, fanOutReviewInstructions as B, ListChangedFilesQuery as Bn, ReviewCommentDraft as Bt, FileReviewer as C, ReviewPipelineAssessment as Cn, ChangedFileStatus as Cr, fingerprintUnchanged as Ct, MAX_CHILD_CONCERNS as D, collectUnitFileSummaries as Dn, annotatePatch as Dr, gitHubReviewRetirementHostLayer as Dt, ListReviewUnitsQuery as E, assessReviewPipeline as En, PatchLine as Er, gitHubReviewPublisherLayer as Et, ReviewWorkPhase as F, FileSlice as Fn, ReviewRetirementReport as Ft, makeFanOutReviewSuite as G, MAX_WALKTHROUGH_SUMMARY_CHARS as Gn, planWalkthrough as Gt, fileReviewPolicy as H, MAX_FINDINGS as Hn, ReviewPublicationPlan as Ht, defaultFanOutPolicy as I, FileSliceQuery as In, decideReviewRetirement as It, reviewCandidateSubjectKey as J, ReadFile as Jn, MAX_REVIEW_STATE_MARKER_CHARS as Jt, makeFileReviewerInstructions as K, PullRequestReviewer as Kn, renderAgentPrompt as Kt, defaultFileReviewerPolicy as L, FindingCategory as Ln, hasReviewMetadataMarker as Lt, ReviewCandidate as M, FileDiffQuery as Mn, renderReviewContent as Mr, ReviewRetirementFailure as Mt, ReviewCandidateId as N, FileDiffView as Nn, ReviewRetirementHost as Nt, MAX_CHILD_FINDINGS as O, anchorViolation as On, commentableLines as Or, parseGitHubSubmittedAt as Ot, ReviewWorkPerspective as P, FileReviewEvidenceChunk as Pn, ReviewRetirementInput as Pt, MAX_REVIEW_UNITS as Q, ReviewGuidance as Qn, ReviewScopeMode as Qt, fanOutHandlersLayer as R, FindingSeverity as Rn, retireStaleReviews as Rt, FileReviewWorkRejected as S, ReviewInputCoverage as Sn, ChangedFile as Sr, ReviewPublisher as St, ListReviewUnits as T, assessReviewCoverage as Tn, MAX_REVIEW_CONTENT_CHARS as Tr, gitHubPullRequestSourceLayer as Tt, fileReviewerInstructions as U, MAX_PATCH_CHARS as Un, estimateReviewEffort as Ut, fileReviewDelegation as V, MAX_CONCERNS as Vn, ReviewEvent as Vt, makeFanOutReviewInstructions as W, MAX_WALKTHROUGH_ENTRIES as Wn, planPublication as Wt, MAX_MERGED_FINDINGS as X, ReviewConcern as Xn, ReviewHeadComparison as Xt, MAX_FILE_EVIDENCE_CHARS as Y, ReadFileDiff as Yn, ReviewExecutionContext as Yt, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Z, ReviewFinding as Zn, ReviewMode as Zt, FileReviewRequest as _, webCryptoReviewStateAuthenticatorLayer as _n, PullRequestMetadata as _r, GitHubApiFailure as _t, FanOutCoordinatorToolkit as a, StoredReviewConcern as an, clampMaxFindings as ar, ReviewPassId as at, FileReviewUnitFailed as b, ReviewAssurance as bn, ReviewInputViolation as br, PriorReviews as bt, FanOutReviewSuite as c, computeProfileFingerprint as cn, fileReviewEvidenceChunks as cr, ReviewUnitId as ct, FanOutSuiteOptions as d, selectReviewRange as dn, readFileDiffHandler as dr, UNIT_EVIDENCE_CHAR_BUDGET as dt, ReviewState as en, ReviewMission as er, MAX_UNIT_FILES as et, FileReviewBrief as f, selectedPullRequestSourceLayer as fn, readFileHandler as fr, classifyReviewRisks as ft, FileReviewReport as g, validateReviewState as gn, MAX_FILE_CHARS as gr, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as gt, FileReviewFailure as h, unavailableReviewStateAuthenticatorLayer as hn, MAX_CHANGED_FILES as hr, rankAndDedupeFindings as ht, DiscoveredConcern as i, ReviewStateMarkerTooLarge as in, WalkthroughEntry as ir, ReviewEvidenceShardId as it, MAX_UNIT_CANDIDATES as j, CodeReview as jn, parsePatch as jr, ReviewRetirementDecision as jt, MAX_FILE_REVIEW_TOOL_CALLS as k, ChangedFileSummary as kn, hasReviewableContent as kr, RetirableReview as kt, FanOutReviewToolkit as l, fromStoredConcern as ln, listChangedFilesHandler as lr, ReviewUnitPlan as lt, FileReviewEvidence as m, toStoredFinding as mn, reviewInstructions as mr, planReviewUnits as mt, ConcernCandidate as n, ReviewStateAuthenticator as nn, ReviewToolkitLayer as nr, ReviewDiscoveryPerspective as nt, FanOutCoordinatorToolkitLayer as o, StoredReviewFinding as on, defaultReviewPolicy as or, ReviewRiskCategory as ot, FileReviewDelegationFailure as p, toStoredConcern as pn, resolveGuidance as pr, findingAnchorInUnitEvidence as pt, mapFileReviewChildFailure as q, REVIEW_TOOL_RESULT_MAX_BYTES as qn, GitCommitSha as qt, DelegateFileReview as r, ReviewStateMarker as rn, ReviewVerdict as rr, ReviewEvidenceShard as rt, FanOutInstructionOptions as s, buildProfileMission as sn, fileDiffView as sr, ReviewUnit as st, CandidateAssessment as t, ReviewStateAuthenticationFailure as tn, ReviewToolkit as tr, ReviewDiscoveryPass as tt, FanOutReviewer as u, fromStoredFinding as un, makeReviewInstructions as ur, UNIT_CHANGED_LINE_BUDGET as ut, FileReviewToolkit as v, FailedReviewPass as vn, PullRequestSource as vr, GitHubReviewTarget as vt, FindingCandidate as w, ReviewShape as wn, ChangedPath as wr, gitHubPriorReviewsLayer as wt, FileReviewUnitResult as x, ReviewCoverage as xn, normalizeRepoRelativePath as xr, PublishedReview as xt, FileReviewToolkitLayer as y, FailedReviewUnit as yn, PullRequestSourceFailure as yr, PriorReviewLookupFailure as yt, fanOutHandlersLayerFor as z, ListChangedFiles as zn, AGENT_PROMPT_PREAMBLE as zt };
1248
+ //# sourceMappingURL=fan-out-D5xrmadQ.d.mts.map