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

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,164 @@ 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
+ /**
1053
+ * Exact suggestion settlement: required when the candidate finding carries
1054
+ * a suggestion, forbidden otherwise. Untrusted child output cannot publish
1055
+ * a GitHub replacement block by prompt compliance alone — the host keeps a
1056
+ * confirmed finding's suggestion only on an exact "committable" settlement.
1057
+ */
1058
+ readonly suggestion: Schema.optionalKey<Schema.Literals<readonly ["committable", "not-committable"]>>;
1059
+ readonly rationale: Schema.NonEmptyString;
1060
+ }>, {}>;
1061
+ declare class CandidateAssessment extends CandidateAssessment_base {}
880
1062
  /**
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.
1063
+ * Exact suggestion settlement shape: a carried suggestion must be settled and
1064
+ * nothing else may be. Enforced identically by the live delegation projection
1065
+ * and the independent host coverage fold.
883
1066
  */
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>;
1067
+ declare const assessmentSettlesSuggestionExactly: (assessment: CandidateAssessment, candidate: ReviewCandidate) => boolean;
1068
+ /**
1069
+ * Fail-closed publication of a confirmed finding: only an exact "committable"
1070
+ * settlement keeps the suggestion; anything else publishes the finding with
1071
+ * the suggestion stripped so unverified text can never become a one-click
1072
+ * GitHub replacement block.
1073
+ */
1074
+ declare const confirmedFindingForPublication: (assessment: CandidateAssessment, candidate: FindingCandidate) => ReviewFinding;
1075
+ declare const DiscoveredConcern_base: Schema.Class<DiscoveredConcern, Schema.Struct<{
1076
+ readonly concern: typeof ReviewConcern;
1077
+ readonly evidencePaths: Schema.$Array<Schema.NonEmptyString>;
1078
+ }>, {}>;
1079
+ /**
1080
+ * Concern candidates need explicit paths internally to bind the claim to
1081
+ * scheduled evidence. The verifier receives the complete bounded unit so it
1082
+ * can use neighboring evidence to falsify the claim. The public ReviewConcern
1083
+ * remains path-free after the host confirms and projects it.
1084
+ */
1085
+ declare class DiscoveredConcern extends DiscoveredConcern_base {}
1086
+ declare const FileReviewRequest_base: Schema.Class<FileReviewRequest, Schema.Struct<{
1087
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1088
+ readonly workId: Schema.NonEmptyString;
1089
+ readonly unitId: Schema.NonEmptyString;
1090
+ readonly paths: Schema.$Array<Schema.NonEmptyString>;
1091
+ readonly evidenceShardIds: Schema.$Array<Schema.NonEmptyString>;
1092
+ readonly perspective: Schema.Literals<readonly ["general", "risk-specialist", "candidate-verification"]>;
1093
+ readonly riskCategories: Schema.$Array<Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>>;
1094
+ /** Empty for discovery; the exact discovered set for unit verification. */
1095
+ readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1096
+ }>, {}>;
1097
+ /** Strict-object coordinator request for either discovery or verification. */
1098
+ declare class FileReviewRequest extends FileReviewRequest_base {}
1099
+ declare const FileReviewEvidence_base: Schema.Class<FileReviewEvidence, Schema.Struct<{
1100
+ readonly shardId: Schema.NonEmptyString;
1101
+ readonly path: Schema.NonEmptyString;
1102
+ readonly status: Schema.Literals<readonly ["added", "removed", "modified", "renamed", "copied", "changed", "unchanged"]>;
1103
+ readonly reviewMode: Schema.Literals<readonly ["diff", "content", "unavailable"]>;
1104
+ readonly ordinal: Schema.Int;
1105
+ readonly total: Schema.Int;
1106
+ readonly annotatedPatch: Schema.String;
1107
+ }>, {}>;
1108
+ /** One complete host-selected evidence shard supplied to a review child. */
1109
+ declare class FileReviewEvidence extends FileReviewEvidence_base {}
913
1110
  declare const FileReviewBrief_base: Schema.Class<FileReviewBrief, Schema.Struct<{
1111
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1112
+ readonly workId: Schema.NonEmptyString;
914
1113
  readonly unitId: Schema.NonEmptyString;
915
1114
  readonly paths: Schema.$Array<Schema.NonEmptyString>;
916
- readonly focus: Schema.NonEmptyString;
1115
+ readonly evidenceShardIds: Schema.$Array<Schema.NonEmptyString>;
1116
+ readonly perspective: Schema.Literals<readonly ["general", "risk-specialist", "candidate-verification"]>;
1117
+ readonly riskCategories: Schema.$Array<Schema.Literals<readonly ["authentication-authorization", "security-boundary", "persistence-durability", "concurrency", "credential-handling", "external-side-effects"]>>;
1118
+ readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1119
+ readonly evidence: Schema.$Array<typeof FileReviewEvidence>;
917
1120
  }>, {}>;
918
- /** The child Agent input: one briefed unit of the changeset. */
1121
+ /** Host-prepared child input with complete bounded diff/content evidence. */
919
1122
  declare class FileReviewBrief extends FileReviewBrief_base {}
920
1123
  declare const FileReviewReport_base: Schema.Class<FileReviewReport, Schema.Struct<{
1124
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1125
+ readonly workId: Schema.NonEmptyString;
921
1126
  readonly unitId: Schema.NonEmptyString;
922
1127
  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>>;
1128
+ readonly concerns: Schema.$Array<typeof DiscoveredConcern>;
1129
+ readonly fileSummaries: Schema.$Array<typeof WalkthroughEntry>;
1130
+ readonly assessments: Schema.$Array<typeof CandidateAssessment>;
927
1131
  }>, {}>;
928
- /** The child Agent output: the briefed unit's bounded findings and concerns. */
1132
+ /** Child output; phase-inapplicable collections must be empty. */
929
1133
  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
1134
  declare const FileReviewUnitResult_base: Schema.Class<FileReviewUnitResult, Schema.Struct<{
1135
+ readonly phase: Schema.Literals<readonly ["discovery", "verification"]>;
1136
+ readonly workId: Schema.NonEmptyString;
951
1137
  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>>;
1138
+ readonly candidates: Schema.$Array<Schema.Union<readonly [typeof FindingCandidate, typeof ConcernCandidate]>>;
1139
+ readonly fileSummaries: Schema.$Array<typeof WalkthroughEntry>;
1140
+ readonly assessments: Schema.$Array<typeof CandidateAssessment>;
957
1141
  }>, {}>;
958
- /** The bounded parent-visible result of one delegated unit review. */
1142
+ /** Bounded coordinator-visible result with host-assigned candidate IDs. */
959
1143
  declare class FileReviewUnitResult extends FileReviewUnitResult_base {}
960
1144
  declare const FileReviewUnitFailed_base: Schema.Class<FileReviewUnitFailed, Schema.TaggedStruct<"FileReviewUnitFailed", {
961
1145
  readonly childErrorTag: Schema.NonEmptyString;
962
1146
  readonly message: Schema.String;
963
1147
  }>, 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
1148
  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
- */
1149
+ declare const FileReviewWorkRejected_base: Schema.Class<FileReviewWorkRejected, Schema.TaggedStruct<"FileReviewWorkRejected", {
1150
+ readonly workId: Schema.NonEmptyString;
1151
+ readonly reason: Schema.NonEmptyString;
1152
+ }>, import("effect/Cause").YieldableError>;
1153
+ declare class FileReviewWorkRejected extends FileReviewWorkRejected_base {}
1154
+ declare const FileReviewFailure: Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>;
1155
+ interface FanOutInstructionOptions {
1156
+ readonly guidance?: string | ReadonlyArray<string> | undefined;
1157
+ }
1158
+ /** Discovery and verification instructions share one child definition. */
1159
+ declare const makeFileReviewerInstructions: (options?: FanOutInstructionOptions) => (brief: FileReviewBrief) => string;
1160
+ declare const fileReviewerInstructions: (brief: FileReviewBrief) => string;
1161
+ declare const FileReviewToolkit: Toolkit.Toolkit<{}>;
1162
+ /** Compatibility export: the evidence-only child has no handler requirements. */
1163
+ declare const FileReviewToolkitLayer: Layer.Layer<never, never, never>;
1164
+ declare const defaultFileReviewerPolicy: AgentPolicy;
975
1165
  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
1166
  declare const mapFileReviewChildFailure: (failure: {
981
1167
  readonly _tag: string;
982
1168
  readonly message?: string;
983
1169
  }) => FileReviewUnitFailed;
1170
+ 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
1171
  declare const ListReviewUnitsQuery_base: Schema.Class<ListReviewUnitsQuery, Schema.Struct<{
985
- /** Explicit constant keeps the zero-choice operation compatible with strict provider schemas. */
986
1172
  readonly scope: Schema.Literal<"all">;
987
1173
  }>, {}>;
988
1174
  declare class ListReviewUnitsQuery extends ListReviewUnitsQuery_base {}
@@ -1000,63 +1186,24 @@ declare const FanOutCoordinatorToolkit: Toolkit.Toolkit<{
1000
1186
  readonly failureMode: "error";
1001
1187
  }, PullRequestSource>;
1002
1188
  }>;
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
- */
1189
+ declare const FanOutCoordinatorToolkitLayer: Layer.Layer<Tool.Handler<"list_review_units">, never, never>;
1011
1190
  declare const makeFanOutReviewInstructions: (options?: FanOutInstructionOptions & {
1012
1191
  readonly maxFindings?: number | undefined;
1013
1192
  }) => (mission: ReviewMission) => string;
1014
1193
  declare const fanOutReviewInstructions: (mission: ReviewMission) => string;
1015
- /** The default fan-out coordinator execution bounds. */
1016
1194
  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
1195
  interface FanOutReviewSuite {
1020
1196
  readonly child: ReturnType<typeof makeFileReviewerDefinition>;
1021
1197
  readonly parent: ReturnType<typeof makeFanOutReviewerDefinition>;
1022
1198
  readonly delegation: ReturnType<typeof makeFileReviewDelegation>;
1023
1199
  }
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 {
1200
+ declare const makeFileReviewerDefinition: (options?: FanOutInstructionOptions) => import("effect-agent").Definition<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, Toolkit.Toolkit<{}>, undefined>;
1201
+ declare const makeFanOutReviewerDefinition: (options: FanOutInstructionOptions & {
1040
1202
  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<{
1203
+ }, delegation: ReturnType<typeof makeFileReviewDelegation>) => import("effect-agent").Definition<typeof ReviewMission, typeof CodeReview, (mission: ReviewMission) => string, Toolkit.Toolkit<{
1057
1204
  readonly delegate_file_review: Tool.Tool<"delegate_file_review", {
1058
1205
  readonly parameters: typeof FileReviewRequest;
1059
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1206
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1060
1207
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1061
1208
  readonly failureMode: "error";
1062
1209
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
@@ -1067,28 +1214,15 @@ declare const makeFanOutReviewerDefinition: (options: FanOutSuiteOptions, delega
1067
1214
  readonly failureMode: "error";
1068
1215
  }, PullRequestSource>;
1069
1216
  }>, undefined>;
1070
- /** Build one coherent fan-out suite: child, coordinator, and delegation. */
1217
+ interface FanOutSuiteOptions extends FanOutInstructionOptions {
1218
+ readonly maxFindings?: number | undefined;
1219
+ }
1071
1220
  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. */
1221
+ declare const FileReviewer: import("effect-agent").Definition<typeof FileReviewBrief, typeof FileReviewReport, (brief: FileReviewBrief) => string, Toolkit.Toolkit<{}>, undefined>;
1088
1222
  declare const FanOutReviewer: import("effect-agent").Definition<typeof ReviewMission, typeof CodeReview, (mission: ReviewMission) => string, Toolkit.Toolkit<{
1089
1223
  readonly delegate_file_review: Tool.Tool<"delegate_file_review", {
1090
1224
  readonly parameters: typeof FileReviewRequest;
1091
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1225
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1092
1226
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1093
1227
  readonly failureMode: "error";
1094
1228
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
@@ -1099,33 +1233,17 @@ declare const FanOutReviewer: import("effect-agent").Definition<typeof ReviewMis
1099
1233
  readonly failureMode: "error";
1100
1234
  }, PullRequestSource>;
1101
1235
  }>, 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). */
1236
+ 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
1237
  declare const DelegateFileReview: Tool.Tool<"delegate_file_review", {
1119
1238
  readonly parameters: typeof FileReviewRequest;
1120
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1239
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1121
1240
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1122
1241
  readonly failureMode: "error";
1123
1242
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
1124
- /** The default coordinator Toolkit. */
1125
1243
  declare const FanOutReviewToolkit: Toolkit.Toolkit<{
1126
1244
  readonly delegate_file_review: Tool.Tool<"delegate_file_review", {
1127
1245
  readonly parameters: typeof FileReviewRequest;
1128
- readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<typeof FileReviewUnitFailed>]>;
1246
+ readonly success: Schema.Union<readonly [typeof FileReviewUnitResult, import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>]>;
1129
1247
  readonly failure: import("effect-agent").SubagentReturnModeFailure;
1130
1248
  readonly failureMode: "error";
1131
1249
  }, import("effect-agent").AgentSpawner | import("effect-agent").IdGenerator | import("effect-agent").RunEventSink | import("effect-agent").SubagentDurability>;
@@ -1136,48 +1254,15 @@ declare const FanOutReviewToolkit: Toolkit.Toolkit<{
1136
1254
  readonly failureMode: "error";
1137
1255
  }, PullRequestSource>;
1138
1256
  }>;
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, {
1257
+ declare const FileReviewDelegationFailure: import("effect-agent").SubagentContainedFailure<Schema.Union<readonly [typeof FileReviewUnitFailed, typeof FileReviewWorkRejected]>>;
1258
+ 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
1259
  readonly _tag: string;
1161
1260
  readonly message?: string;
1162
1261
  }, 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, {
1262
+ 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
1263
  readonly _tag: string;
1179
1264
  readonly message?: string;
1180
1265
  }, never>>;
1181
1266
  //#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
1267
+ export { MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as $, ReviewFinding as $n, ReviewMode as $t, MAX_REVIEW_CHILDREN as A, anchorViolation as An, commentableLines as Ar, parseGitHubSubmittedAt as At, fanOutHandlersLayer as B, FindingSeverity as Bn, retireStaleReviews as Bt, FileReviewer as C, ReviewCoverage as Cn, normalizeRepoRelativePath as Cr, PublishedReview as Ct, MAX_CHILD_CONCERNS as D, assessReviewCoverage as Dn, MAX_REVIEW_CONTENT_CHARS as Dr, gitHubPullRequestSourceLayer as Dt, ListReviewUnitsQuery as E, ReviewShape as En, ChangedPath as Er, gitHubPriorReviewsLayer as Et, ReviewWorkPhase as F, FileDiffView as Fn, ReviewRetirementHost as Ft, fileReviewerInstructions as G, MAX_PATCH_CHARS as Gn, estimateReviewEffort as Gt, fanOutReviewInstructions as H, ListChangedFilesQuery as Hn, ReviewCommentDraft as Ht, assessmentSettlesSuggestionExactly as I, FileReviewEvidenceChunk as In, ReviewRetirementInput as It, makeFileReviewerInstructions as J, PullRequestReviewer as Jn, renderAgentPrompt as Jt, makeFanOutReviewInstructions as K, MAX_WALKTHROUGH_ENTRIES as Kn, planPublication as Kt, confirmedFindingForPublication as L, FileSlice as Ln, ReviewRetirementReport as Lt, ReviewCandidate as M, ChangedFilesView as Mn, isReviewableFile as Mr, RetirableReviewComment as Mt, ReviewCandidateId as N, CodeReview as Nn, parsePatch as Nr, ReviewRetirementDecision as Nt, MAX_CHILD_FINDINGS as O, assessReviewPipeline as On, PatchLine as Or, gitHubReviewPublisherLayer as Ot, ReviewWorkPerspective as P, FileDiffQuery as Pn, renderReviewContent as Pr, ReviewRetirementFailure as Pt, MAX_MERGED_FINDINGS as Q, ReviewConcern as Qn, ReviewHeadComparison as Qt, defaultFanOutPolicy as R, FileSliceQuery as Rn, decideReviewRetirement as Rt, FileReviewWorkRejected as S, ReviewAssurance as Sn, ReviewInputViolation as Sr, PriorReviews as St, ListReviewUnits as T, ReviewPipelineAssessment as Tn, ChangedFileStatus as Tr, fingerprintUnchanged as Tt, fileReviewDelegation as U, MAX_CONCERNS as Un, ReviewEvent as Ut, fanOutHandlersLayerFor as V, ListChangedFiles as Vn, AGENT_PROMPT_PREAMBLE as Vt, fileReviewPolicy as W, MAX_FINDINGS as Wn, ReviewPublicationPlan as Wt, reviewCandidateSubjectKey as X, ReadFile as Xn, MAX_REVIEW_STATE_MARKER_CHARS as Xt, mapFileReviewChildFailure as Y, REVIEW_TOOL_RESULT_MAX_BYTES as Yn, GitCommitSha as Yt, MAX_FILE_EVIDENCE_CHARS as Z, ReadFileDiff as Zn, ReviewExecutionContext as Zt, FileReviewRequest as _, unavailableReviewStateAuthenticatorLayer as _n, MAX_CHANGED_FILES as _r, rankAndDedupeFindings as _t, FanOutCoordinatorToolkit as a, ReviewStateMarker as an, ReviewVerdict as ar, ReviewEvidenceShard as at, FileReviewUnitFailed as b, FailedReviewPass as bn, PullRequestSource as br, GitHubReviewTarget as bt, FanOutReviewSuite as c, StoredReviewFinding as cn, defaultReviewPolicy as cr, ReviewRiskCategory as ct, FanOutSuiteOptions as d, fromStoredConcern as dn, listChangedFilesHandler as dr, ReviewUnitPlan as dt, ReviewScopeMode as en, ReviewGuidance as er, MAX_REVIEW_UNITS as et, FileReviewBrief as f, fromStoredFinding as fn, makeReviewInstructions as fr, UNIT_CHANGED_LINE_BUDGET as ft, FileReviewReport as g, toStoredFinding as gn, reviewInstructions as gr, planReviewUnits as gt, FileReviewFailure as h, toStoredConcern as hn, resolveGuidance as hr, findingAnchorInUnitEvidence as ht, DiscoveredConcern as i, ReviewStateAuthenticator as in, ReviewToolkitLayer as ir, ReviewDiscoveryPerspective as it, MAX_UNIT_CANDIDATES as j, ChangedFileSummary as jn, hasReviewableContent as jr, RetirableReview as jt, MAX_FILE_REVIEW_TOOL_CALLS as k, collectUnitFileSummaries as kn, annotatePatch as kr, gitHubReviewRetirementHostLayer as kt, FanOutReviewToolkit as l, buildProfileMission as ln, fileDiffView as lr, ReviewUnit as lt, FileReviewEvidence as m, selectedPullRequestSourceLayer as mn, readFileHandler as mr, classifyReviewRisks as mt, ConcernCandidate as n, ReviewState as nn, ReviewMission as nr, MAX_UNIT_FILES as nt, FanOutCoordinatorToolkitLayer as o, ReviewStateMarkerTooLarge as on, WalkthroughEntry as or, ReviewEvidenceShardId as ot, FileReviewDelegationFailure as p, selectReviewRange as pn, readFileDiffHandler as pr, UNIT_EVIDENCE_CHAR_BUDGET as pt, makeFanOutReviewSuite as q, MAX_WALKTHROUGH_SUMMARY_CHARS as qn, planWalkthrough as qt, DelegateFileReview as r, ReviewStateAuthenticationFailure as rn, ReviewToolkit as rr, ReviewDiscoveryPass as rt, FanOutInstructionOptions as s, StoredReviewConcern as sn, clampMaxFindings as sr, ReviewPassId as st, CandidateAssessment as t, ReviewSelection as tn, ReviewInstructionOptions as tr, MAX_UNIT_EVIDENCE_SHARDS as tt, FanOutReviewer as u, computeProfileFingerprint as un, fileReviewEvidenceChunks as ur, ReviewUnitId as ut, FileReviewToolkit as v, validateReviewState as vn, MAX_FILE_CHARS as vr, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as vt, FindingCandidate as w, ReviewInputCoverage as wn, ChangedFile as wr, ReviewPublisher as wt, FileReviewUnitResult as x, FailedReviewUnit as xn, PullRequestSourceFailure as xr, PriorReviewLookupFailure as xt, FileReviewToolkitLayer as y, webCryptoReviewStateAuthenticatorLayer as yn, PullRequestMetadata as yr, GitHubApiFailure as yt, defaultFileReviewerPolicy as z, FindingCategory as zn, hasReviewMetadataMarker as zt };
1268
+ //# sourceMappingURL=fan-out-n-00ppWr.d.mts.map