@effect-agent/pr-review 0.1.0-beta.21 → 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.
package/dist/action.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Nt as ReviewRetirementHost, Sr as ChangedFile, St as ReviewPublisher, Zt as ReviewMode, _r as PullRequestMetadata, _t as GitHubApiFailure, bt as PriorReviews, nn as ReviewStateAuthenticator, vr as PullRequestSource, yr as PullRequestSourceFailure } from "./fan-out-D5xrmadQ.mjs";
1
+ import { $t as ReviewMode, Ft as ReviewRetirementHost, St as PriorReviews, br as PullRequestSource, in as ReviewStateAuthenticator, wr as ChangedFile, wt as ReviewPublisher, xr as PullRequestSourceFailure, yr as PullRequestMetadata, yt as GitHubApiFailure } from "./fan-out-n-00ppWr.mjs";
2
2
  import { EffortPosition, InvalidEffortInput, ReviewProgressReporter, ReviewProvider, ReviewRunOutcome, ReviewTargetUnresolved, RunReviewOptions } from "./index.mjs";
3
3
  import { Config, Effect, FileSystem, Schema } from "effect";
4
4
  import { BudgetExceeded } from "effect-agent";
@@ -165,7 +165,7 @@ declare const reviewActionProgram: Effect.Effect<{
165
165
  } | {
166
166
  _tag: "Completed";
167
167
  outcome: ReviewRunOutcome;
168
- }, import("effect-agent").AgentApprovalDenied | import("effect-agent").AgentApprovalPending | import("effect-agent").AgentChildPending | import("effect-agent").AgentInputError | import("effect-agent").AgentOutputError | import("effect-agent").AgentPolicyError | import("effect/unstable/ai/AiError").AiError | import("effect-agent").BudgetAdapterError | BudgetExceeded | Config.ConfigError | import("effect-agent").ContextOverflowError | GitHubApiFailure | GuidanceFileUnreadable | InvalidEffortInput | InvalidMaxDurationInput | import("effect-agent").ModelProtocolError | import("effect/PlatformError").PlatformError | PullRequestSourceFailure | ReviewGateFailed | ReviewTargetUnresolved | Schema.SchemaError, FileSystem.FileSystem | import("effect/unstable/http/HttpClient").HttpClient>;
168
+ }, import("effect-agent").AgentApprovalDenied | import("effect-agent").AgentApprovalPending | import("effect-agent").AgentChildPending | import("effect-agent").AgentInputError | import("effect-agent").AgentOutputError | import("effect-agent").AgentPolicyError | import("effect-agent").AgentToolAuthorizationDenied | import("effect/unstable/ai/AiError").AiError | import("effect-agent").BudgetAdapterError | BudgetExceeded | Config.ConfigError | import("effect-agent").ContextOverflowError | GitHubApiFailure | GuidanceFileUnreadable | InvalidEffortInput | InvalidMaxDurationInput | import("effect-agent").ModelProtocolError | import("effect/PlatformError").PlatformError | PullRequestSourceFailure | ReviewGateFailed | ReviewTargetUnresolved | Schema.SchemaError, FileSystem.FileSystem | import("effect/unstable/http/HttpClient").HttpClient>;
169
169
  /** Run the packaged action program on Node; the bundled action entrypoint. */
170
170
  declare const main: () => void;
171
171
  /** The packaged GitHub Actions surface. */
@@ -195,7 +195,7 @@ declare const PrReviewAction: {
195
195
  } | {
196
196
  _tag: "Completed";
197
197
  outcome: ReviewRunOutcome;
198
- }, import("effect-agent").AgentApprovalDenied | import("effect-agent").AgentApprovalPending | import("effect-agent").AgentChildPending | import("effect-agent").AgentInputError | import("effect-agent").AgentOutputError | import("effect-agent").AgentPolicyError | import("effect/unstable/ai/AiError").AiError | import("effect-agent").BudgetAdapterError | BudgetExceeded | Config.ConfigError | import("effect-agent").ContextOverflowError | GitHubApiFailure | GuidanceFileUnreadable | InvalidEffortInput | InvalidMaxDurationInput | import("effect-agent").ModelProtocolError | import("effect/PlatformError").PlatformError | PullRequestSourceFailure | ReviewGateFailed | ReviewTargetUnresolved | Schema.SchemaError, FileSystem.FileSystem | import("effect/unstable/http/HttpClient").HttpClient>;
198
+ }, import("effect-agent").AgentApprovalDenied | import("effect-agent").AgentApprovalPending | import("effect-agent").AgentChildPending | import("effect-agent").AgentInputError | import("effect-agent").AgentOutputError | import("effect-agent").AgentPolicyError | import("effect-agent").AgentToolAuthorizationDenied | import("effect/unstable/ai/AiError").AiError | import("effect-agent").BudgetAdapterError | BudgetExceeded | Config.ConfigError | import("effect-agent").ContextOverflowError | GitHubApiFailure | GuidanceFileUnreadable | InvalidEffortInput | InvalidMaxDurationInput | import("effect-agent").ModelProtocolError | import("effect/PlatformError").PlatformError | PullRequestSourceFailure | ReviewGateFailed | ReviewTargetUnresolved | Schema.SchemaError, FileSystem.FileSystem | import("effect/unstable/http/HttpClient").HttpClient>;
199
199
  readonly main: typeof main;
200
200
  };
201
201
  //#endregion
package/dist/action.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { A as ReviewStateAuthenticator, B as selectedPullRequestSourceLayer, G as webCryptoReviewStateAuthenticatorLayer, Jn as PullRequestSource, T as ReviewHeadComparison, U as unavailableReviewStateAuthenticatorLayer, W as validateReviewState, Zn as normalizeRepoRelativePath, a as PriorReviews, w as ReviewExecutionContext, x as retireStaleReviews, z as selectReviewRange } from "./github-DSqZp3Ce.mjs";
2
- import { C as PrReview, O as fanOutReviewBudgetLimits, U as parseEffortPosition, V as InvalidEffortInput, a as anthropicClientLayer, c as makeOpenAiReviewModel, f as gitHubReviewLayers, g as ReviewProgressReporter, k as reviewBudgetLimits, l as openAiClientLayer, m as resolveReviewTarget, n as DEFAULT_PROVIDER, o as describeReviewModel, p as readGitHubEvent, s as makeAnthropicReviewModel } from "./providers-CblG1G9b.mjs";
1
+ import { $n as normalizeRepoRelativePath, A as ReviewStateAuthenticator, B as selectedPullRequestSourceLayer, G as webCryptoReviewStateAuthenticatorLayer, T as ReviewHeadComparison, U as unavailableReviewStateAuthenticatorLayer, W as validateReviewState, Xn as PullRequestSource, a as PriorReviews, w as ReviewExecutionContext, x as retireStaleReviews, z as selectReviewRange } from "./github-BgtP7Rdv.mjs";
2
+ import { C as PrReview, O as fanOutReviewBudgetLimits, U as parseEffortPosition, V as InvalidEffortInput, a as anthropicClientLayer, c as makeOpenAiReviewModel, f as gitHubReviewLayers, g as ReviewProgressReporter, k as reviewBudgetLimits, l as openAiClientLayer, m as resolveReviewTarget, n as DEFAULT_PROVIDER, o as describeReviewModel, p as readGitHubEvent, s as makeAnthropicReviewModel } from "./providers-BguZK4B_.mjs";
3
3
  import { n as compactReviewLoggingLayer } from "./logging-Q4j0oub-.mjs";
4
4
  import { Config, Console, Effect, FileSystem, Layer, Option, Redacted, Schema } from "effect";
5
5
  import { BudgetExceeded, UsageBudgetLimits } from "effect-agent";
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { c as fingerprintUnchanged } from "./github-DSqZp3Ce.mjs";
2
- import { C as PrReview, N as ReviewPublicationPlan, U as parseEffortPosition, V as InvalidEffortInput, a as anthropicClientLayer, c as makeOpenAiReviewModel, f as gitHubReviewLayers, l as openAiClientLayer, m as resolveReviewTarget, n as DEFAULT_PROVIDER, o as describeReviewModel, s as makeAnthropicReviewModel, t as DEFAULT_MODEL } from "./providers-CblG1G9b.mjs";
1
+ import { c as fingerprintUnchanged } from "./github-BgtP7Rdv.mjs";
2
+ import { C as PrReview, N as ReviewPublicationPlan, U as parseEffortPosition, V as InvalidEffortInput, a as anthropicClientLayer, c as makeOpenAiReviewModel, f as gitHubReviewLayers, l as openAiClientLayer, m as resolveReviewTarget, n as DEFAULT_PROVIDER, o as describeReviewModel, s as makeAnthropicReviewModel, t as DEFAULT_MODEL } from "./providers-BguZK4B_.mjs";
3
3
  import { Console, Effect, Layer, Option, Schema } from "effect";
4
4
  import { BudgetExceeded } from "effect-agent";
5
5
  import { FetchHttpClient } from "effect/unstable/http";
@@ -1049,9 +1049,29 @@ declare const reviewCandidateSubjectKey: (candidate: ReviewCandidate) => string;
1049
1049
  declare const CandidateAssessment_base: Schema.Class<CandidateAssessment, Schema.Struct<{
1050
1050
  readonly candidateId: Schema.NonEmptyString;
1051
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"]>>;
1052
1059
  readonly rationale: Schema.NonEmptyString;
1053
1060
  }>, {}>;
1054
1061
  declare class CandidateAssessment extends CandidateAssessment_base {}
1062
+ /**
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.
1066
+ */
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;
1055
1075
  declare const DiscoveredConcern_base: Schema.Class<DiscoveredConcern, Schema.Struct<{
1056
1076
  readonly concern: typeof ReviewConcern;
1057
1077
  readonly evidencePaths: Schema.$Array<Schema.NonEmptyString>;
@@ -1244,5 +1264,5 @@ declare const fanOutHandlersLayer: <Provider, ModelProvides, ModelRequires>(chil
1244
1264
  readonly message?: string;
1245
1265
  }, never>>;
1246
1266
  //#endregion
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
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
@@ -483,7 +483,7 @@ var ReviewFinding = class extends Schema.Class("@effect-agent/pr-review/ReviewFi
483
483
  title: Schema.NonEmptyString.check(Schema.isMaxLength(120)),
484
484
  body: Schema.NonEmptyString.check(Schema.isMaxLength(2e3)),
485
485
  /** Replacement for exactly lines startLine..endLine; omit when unsure. */
486
- suggestion: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(2e3)))
486
+ suggestion: Schema.optionalKey(Schema.String.annotate({ description: "Committable replacement source code for exactly lines startLine..endLine: the full replacement for every line in the range and nothing else — never prose describing the change, which belongs in body." }).check(Schema.isMaxLength(2e3)))
487
487
  }) {};
488
488
  const ReviewVerdict = Schema.Literals([
489
489
  "approve",
@@ -967,9 +967,33 @@ const reviewCandidateSubjectKey = (candidate) => candidate._tag === "FindingCand
967
967
  var CandidateAssessment = class extends Schema.Class("@effect-agent/pr-review/CandidateAssessment")({
968
968
  candidateId: ReviewCandidateId,
969
969
  disposition: Schema.Literals(["confirmed", "rejected"]),
970
+ /**
971
+ * Exact suggestion settlement: required when the candidate finding carries
972
+ * a suggestion, forbidden otherwise. Untrusted child output cannot publish
973
+ * a GitHub replacement block by prompt compliance alone — the host keeps a
974
+ * confirmed finding's suggestion only on an exact "committable" settlement.
975
+ */
976
+ suggestion: Schema.optionalKey(Schema.Literals(["committable", "not-committable"]).annotate({ description: "Required exactly when the candidate finding carries a suggestion: \"committable\" only when its text is the full replacement source for exactly lines startLine..endLine and nothing else. Forbidden for candidates without a suggestion." })),
970
977
  rationale: Schema.NonEmptyString.check(Schema.isMaxLength(600))
971
978
  }) {};
972
979
  /**
980
+ * Exact suggestion settlement shape: a carried suggestion must be settled and
981
+ * nothing else may be. Enforced identically by the live delegation projection
982
+ * and the independent host coverage fold.
983
+ */
984
+ const assessmentSettlesSuggestionExactly = (assessment, candidate) => candidate._tag === "FindingCandidate" && candidate.finding.suggestion !== void 0 ? assessment.suggestion !== void 0 : assessment.suggestion === void 0;
985
+ /**
986
+ * Fail-closed publication of a confirmed finding: only an exact "committable"
987
+ * settlement keeps the suggestion; anything else publishes the finding with
988
+ * the suggestion stripped so unverified text can never become a one-click
989
+ * GitHub replacement block.
990
+ */
991
+ const confirmedFindingForPublication = (assessment, candidate) => {
992
+ if (candidate.finding.suggestion === void 0 || assessment.suggestion === "committable") return candidate.finding;
993
+ const { suggestion: _stripped, ...finding } = candidate.finding;
994
+ return ReviewFinding.make(finding);
995
+ };
996
+ /**
973
997
  * Concern candidates need explicit paths internally to bind the claim to
974
998
  * scheduled evidence. The verifier receives the complete bounded unit so it
975
999
  * can use neighboring evidence to falsify the claim. The public ReviewConcern
@@ -1070,7 +1094,8 @@ const makeFileReviewerInstructions = (options = {}) => (brief) => {
1070
1094
  "Independently verify every candidate in the input. You did not receive another reviewer's transcript or reasoning; use only the candidate claim and bounded evidence.",
1071
1095
  "The evidence array contains the complete bounded unit, including neighboring changed code that may confirm or falsify a locally plausible claim.",
1072
1096
  "For each candidate, try to falsify it first. Confirm only when the cited behavior is supported and actionable. Reject unsupported, speculative, duplicate, or non-actionable candidates.",
1073
- "Return ONLY JSON with phase \"verification\", the exact workId/unitId, empty findings/concerns/fileSummaries arrays, and exactly one assessment per candidateId. Each assessment is {\"candidateId\": <exact id>, \"disposition\": <\"confirmed\" | \"rejected\">, \"rationale\": <bounded evidence-based reason>}. Never add or omit an id."
1097
+ "Return ONLY JSON with phase \"verification\", the exact workId/unitId, empty findings/concerns/fileSummaries arrays, and exactly one assessment per candidateId. Each assessment is {\"candidateId\": <exact id>, \"disposition\": <\"confirmed\" | \"rejected\">, \"suggestion\": <\"committable\" | \"not-committable\", present exactly when the candidate finding carries a suggestion>, \"rationale\": <bounded evidence-based reason>}. Never add or omit an id.",
1098
+ "Settle every carried suggestion independently of the claim: answer \"committable\" only when its text is the full replacement source for exactly lines startLine..endLine and nothing else — it compiles in context and preserves the finding's intent, never prose describing a change. Otherwise answer \"not-committable\"; the host then publishes the confirmed finding without its suggestion. Omit the assessment \"suggestion\" field for candidates without one."
1074
1099
  ].join("\n");
1075
1100
  const focus = brief.perspective === "risk-specialist" ? brief.riskCategories.length > 0 ? `This is a fresh specialist discovery pass. Concentrate on these host-classified risks without relying on another pass: ${brief.riskCategories.join(", ")}.` : "This is a fresh specialist discovery pass. The host found no keyword-classified category, so independently scrutinize authentication/authorization, security boundaries, durability, concurrency, credentials, and external side effects rather than treating classification silence as low risk." : "This is the general discovery pass. Review broadly for correctness, security, concurrency, resource, API, and error-handling defects.";
1076
1101
  return [
@@ -1078,7 +1103,9 @@ const makeFileReviewerInstructions = (options = {}) => (brief) => {
1078
1103
  focus,
1079
1104
  "The discovery evidence array contains every complete shard in the unit. Review every entry and every shard of a multi-shard path. A later independent verifier, not you, decides which candidates publish.",
1080
1105
  "When a non-anchored concern depends on one or more unit files, list 1-3 exact evidencePaths to bind the claim to scheduled evidence.",
1081
- `Return ONLY JSON with phase "discovery", the exact workId/unitId, up to 6 findings, up to 3 concerns shaped as {concern, evidencePaths}, one factual file summary per path (<= 240 chars), and an empty assessments array. Empty candidate arrays are valid; do not invent defects.`
1106
+ `Return ONLY JSON with phase "discovery", the exact workId/unitId, up to 6 findings, up to 3 concerns shaped as {concern, evidencePaths}, one factual file summary per path (<= 240 chars), and an empty assessments array. Empty candidate arrays are valid; do not invent defects.`,
1107
+ "Each finding is {\"path\": <a unit file path>, \"startLine\": <integer, an R-marked new-file line>, \"endLine\": <integer, >= startLine, same file, R-marked>, \"severity\": <\"blocking\" | \"important\" | \"nit\">, \"category\": <OPTIONAL problem-kind label>, \"title\": <string, <= 120 chars>, \"body\": <string, why it matters and what to do>, \"suggestion\": <string, OPTIONAL: replacement source code for exactly lines startLine..endLine, ready to commit>}.",
1108
+ "Include \"suggestion\" only when you are confident the replacement compiles and preserves intent; its text must contain the full replacement source for every line in the range and nothing else — never prose describing the change, which belongs in \"body\"."
1082
1109
  ].join("\n");
1083
1110
  };
1084
1111
  const fileReviewerInstructions = makeFileReviewerInstructions();
@@ -1165,13 +1192,15 @@ const projectReviewResult = (report, context, request) => {
1165
1192
  if (report.phase !== request.phase || report.workId !== request.workId || report.unitId !== request.unitId) return Effect.fail(rejectWork(request.workId, "review output identity does not match the scheduled request"));
1166
1193
  if (report.phase === "verification") {
1167
1194
  if (report.findings.length > 0 || report.concerns.length > 0 || report.fileSummaries.length > 0) return Effect.fail(rejectWork(report.workId, "verification output contained discovery-only fields"));
1168
- const expectedIds = new Set(request.candidates.map((candidate) => candidate.candidateId));
1195
+ const expectedById = new Map(request.candidates.map((candidate) => [candidate.candidateId, candidate]));
1169
1196
  const assessedIds = /* @__PURE__ */ new Set();
1170
1197
  for (const assessment of report.assessments) {
1171
- if (!expectedIds.has(assessment.candidateId) || assessedIds.has(assessment.candidateId)) return Effect.fail(rejectWork(report.workId, "verification output did not assess the exact candidate set"));
1198
+ const candidate = expectedById.get(assessment.candidateId);
1199
+ if (candidate === void 0 || assessedIds.has(assessment.candidateId)) return Effect.fail(rejectWork(report.workId, "verification output did not assess the exact candidate set"));
1200
+ if (!assessmentSettlesSuggestionExactly(assessment, candidate)) return Effect.fail(rejectWork(report.workId, "verification output did not settle suggestion publication exactly"));
1172
1201
  assessedIds.add(assessment.candidateId);
1173
1202
  }
1174
- if (assessedIds.size !== expectedIds.size) return Effect.fail(rejectWork(report.workId, "verification output did not assess the exact candidate set"));
1203
+ if (assessedIds.size !== expectedById.size) return Effect.fail(rejectWork(report.workId, "verification output did not assess the exact candidate set"));
1175
1204
  return Effect.succeed(FileReviewUnitResult.make({
1176
1205
  phase: report.phase,
1177
1206
  workId: report.workId,
@@ -2269,6 +2298,6 @@ const fingerprintUnchanged = (current) => Effect.gen(function* () {
2269
2298
  return Option.isSome(latest) && latest.value === current;
2270
2299
  });
2271
2300
  //#endregion
2272
- export { DiscoveredConcern as $, ChangedFile as $n, ReviewUnit as $t, ReviewStateAuthenticator as A, ReviewMission as An, fanOutHandlersLayer as At, selectedPullRequestSourceLayer as B, makeReviewInstructions as Bn, reviewCandidateSubjectKey as Bt, MAX_REVIEW_STATE_MARKER_CHARS as C, MAX_WALKTHROUGH_SUMMARY_CHARS as Cn, MAX_UNIT_CANDIDATES as Ct, ReviewScopeMode as D, ReadFileDiff as Dn, ReviewWorkPhase as Dt, ReviewMode as E, ReadFile as En, ReviewWorkPerspective as Et, buildProfileMission as F, clampMaxFindings as Fn, fileReviewerInstructions as Ft, webCryptoReviewStateAuthenticatorLayer as G, MAX_CHANGED_FILES as Gn, MAX_UNIT_EVIDENCE_SHARDS as Gt, toStoredFinding as H, readFileHandler as Hn, MAX_MERGED_FINDINGS as Ht, computeProfileFingerprint as I, defaultReviewPolicy as In, makeFanOutReviewInstructions as It, extractFingerprint as J, PullRequestSource as Jn, ReviewDiscoveryPerspective as Jt, FINGERPRINT_MARKER_LENGTH as K, MAX_FILE_CHARS as Kn, MAX_UNIT_FILES as Kt, fromStoredConcern as L, fileDiffView as Ln, makeFanOutReviewSuite as Lt, ReviewStateMarkerTooLarge as M, ReviewToolkitLayer as Mn, fanOutReviewInstructions as Mt, StoredReviewConcern as N, ReviewVerdict as Nn, fileReviewDelegation as Nt, ReviewState as O, ReviewConcern as On, defaultFanOutPolicy as Ot, StoredReviewFinding as P, WalkthroughEntry as Pn, fileReviewPolicy as Pt, DelegateFileReview as Q, anchorViolation as Qn, ReviewRiskCategory as Qt, fromStoredFinding as R, fileReviewEvidenceChunks as Rn, makeFileReviewerInstructions as Rt, GitCommitSha as S, MAX_WALKTHROUGH_ENTRIES as Sn, MAX_REVIEW_CHILDREN as St, ReviewHeadComparison as T, REVIEW_TOOL_RESULT_MAX_BYTES as Tn, ReviewCandidateId as Tt, unavailableReviewStateAuthenticatorLayer as U, resolveGuidance as Un, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Ut, toStoredConcern as V, readFileDiffHandler as Vn, MAX_FILE_EVIDENCE_CHARS as Vt, validateReviewState as W, reviewInstructions as Wn, MAX_REVIEW_UNITS as Wt, CandidateAssessment as X, ReviewInputViolation as Xn, ReviewEvidenceShardId as Xt, renderFingerprintMarker as Y, PullRequestSourceFailure as Yn, ReviewEvidenceShard as Yt, ConcernCandidate as Z, normalizeRepoRelativePath as Zn, ReviewPassId as Zt, ReviewRetirementHost as _, ListChangedFiles as _n, ListReviewUnits as _t, PriorReviews as a, findingAnchorInUnitEvidence as an, hasReviewableContent as ar, FileReviewDelegationFailure as at, hasReviewMetadataMarker as b, MAX_FINDINGS as bn, MAX_CHILD_FINDINGS as bt, fingerprintUnchanged as c, ChangedFileSummary as cn, renderReviewContent as cr, FileReviewReport as ct, gitHubReviewPublisherLayer as d, FileDiffQuery as dn, FileReviewToolkitLayer as dt, ReviewUnitId as en, ChangedFileStatus as er, FanOutCoordinatorToolkit as et, gitHubReviewRetirementHostLayer as f, FileDiffView as fn, FileReviewUnitFailed as ft, ReviewRetirementFailure as g, FindingSeverity as gn, FindingCandidate as gt, RetirableReviewComment as h, FindingCategory as hn, FileReviewer as ht, PriorReviewLookupFailure as i, classifyReviewRisks as in, commentableLines as ir, FileReviewBrief as it, ReviewStateMarker as j, ReviewToolkit as jn, fanOutHandlersLayerFor as jt, ReviewStateAuthenticationFailure as k, ReviewFinding as kn, defaultFileReviewerPolicy as kt, gitHubPriorReviewsLayer as l, ChangedFilesView as ln, FileReviewRequest as lt, RetirableReview as m, FileSliceQuery as mn, FileReviewWorkRejected as mt, GitHubApiFailure as n, UNIT_CHANGED_LINE_BUDGET as nn, MAX_REVIEW_CONTENT_CHARS as nr, FanOutReviewToolkit as nt, PublishedReview as o, planReviewUnits as on, isReviewableFile as or, FileReviewEvidence as ot, parseGitHubSubmittedAt as p, FileSlice as pn, FileReviewUnitResult as pt, computeChangesetFingerprint as q, PullRequestMetadata as qn, ReviewDiscoveryPass as qt, GitHubReviewTarget as r, UNIT_EVIDENCE_CHAR_BUDGET as rn, annotatePatch as rr, FanOutReviewer as rt, ReviewPublisher as s, rankAndDedupeFindings as sn, parsePatch as sr, FileReviewFailure as st, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as t, ReviewUnitPlan as tn, ChangedPath as tr, FanOutCoordinatorToolkitLayer as tt, gitHubPullRequestSourceLayer as u, CodeReview as un, FileReviewToolkit as ut, ReviewRetirementReport as v, ListChangedFilesQuery as vn, ListReviewUnitsQuery as vt, ReviewExecutionContext as w, PullRequestReviewer as wn, ReviewCandidate as wt, retireStaleReviews as x, MAX_PATCH_CHARS as xn, MAX_FILE_REVIEW_TOOL_CALLS as xt, decideReviewRetirement as y, MAX_CONCERNS as yn, MAX_CHILD_CONCERNS as yt, selectReviewRange as z, listChangedFilesHandler as zn, mapFileReviewChildFailure as zt };
2301
+ export { DiscoveredConcern as $, normalizeRepoRelativePath as $n, ReviewPassId as $t, ReviewStateAuthenticator as A, ReviewConcern as An, defaultFanOutPolicy as At, selectedPullRequestSourceLayer as B, fileReviewEvidenceChunks as Bn, makeFileReviewerInstructions as Bt, MAX_REVIEW_STATE_MARKER_CHARS as C, MAX_PATCH_CHARS as Cn, MAX_UNIT_CANDIDATES as Ct, ReviewScopeMode as D, REVIEW_TOOL_RESULT_MAX_BYTES as Dn, ReviewWorkPhase as Dt, ReviewMode as E, PullRequestReviewer as En, ReviewWorkPerspective as Et, buildProfileMission as F, ReviewVerdict as Fn, fileReviewDelegation as Ft, webCryptoReviewStateAuthenticatorLayer as G, resolveGuidance as Gn, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Gt, toStoredFinding as H, makeReviewInstructions as Hn, reviewCandidateSubjectKey as Ht, computeProfileFingerprint as I, WalkthroughEntry as In, fileReviewPolicy as It, extractFingerprint as J, MAX_FILE_CHARS as Jn, MAX_UNIT_FILES as Jt, FINGERPRINT_MARKER_LENGTH as K, reviewInstructions as Kn, MAX_REVIEW_UNITS as Kt, fromStoredConcern as L, clampMaxFindings as Ln, fileReviewerInstructions as Lt, ReviewStateMarkerTooLarge as M, ReviewMission as Mn, fanOutHandlersLayer as Mt, StoredReviewConcern as N, ReviewToolkit as Nn, fanOutHandlersLayerFor as Nt, ReviewState as O, ReadFile as On, assessmentSettlesSuggestionExactly as Ot, StoredReviewFinding as P, ReviewToolkitLayer as Pn, fanOutReviewInstructions as Pt, DelegateFileReview as Q, ReviewInputViolation as Qn, ReviewEvidenceShardId as Qt, fromStoredFinding as R, defaultReviewPolicy as Rn, makeFanOutReviewInstructions as Rt, GitCommitSha as S, MAX_FINDINGS as Sn, MAX_REVIEW_CHILDREN as St, ReviewHeadComparison as T, MAX_WALKTHROUGH_SUMMARY_CHARS as Tn, ReviewCandidateId as Tt, unavailableReviewStateAuthenticatorLayer as U, readFileDiffHandler as Un, MAX_FILE_EVIDENCE_CHARS as Ut, toStoredConcern as V, listChangedFilesHandler as Vn, mapFileReviewChildFailure as Vt, validateReviewState as W, readFileHandler as Wn, MAX_MERGED_FINDINGS as Wt, CandidateAssessment as X, PullRequestSource as Xn, ReviewDiscoveryPerspective as Xt, renderFingerprintMarker as Y, PullRequestMetadata as Yn, ReviewDiscoveryPass as Yt, ConcernCandidate as Z, PullRequestSourceFailure as Zn, ReviewEvidenceShard as Zt, ReviewRetirementHost as _, FindingCategory as _n, ListReviewUnits as _t, PriorReviews as a, UNIT_EVIDENCE_CHAR_BUDGET as an, annotatePatch as ar, FileReviewDelegationFailure as at, hasReviewMetadataMarker as b, ListChangedFilesQuery as bn, MAX_CHILD_FINDINGS as bt, fingerprintUnchanged as c, planReviewUnits as cn, isReviewableFile as cr, FileReviewReport as ct, gitHubReviewPublisherLayer as d, ChangedFilesView as dn, FileReviewToolkitLayer as dt, ReviewRiskCategory as en, anchorViolation as er, FanOutCoordinatorToolkit as et, gitHubReviewRetirementHostLayer as f, CodeReview as fn, FileReviewUnitFailed as ft, ReviewRetirementFailure as g, FileSliceQuery as gn, FindingCandidate as gt, RetirableReviewComment as h, FileSlice as hn, FileReviewer as ht, PriorReviewLookupFailure as i, UNIT_CHANGED_LINE_BUDGET as in, MAX_REVIEW_CONTENT_CHARS as ir, FileReviewBrief as it, ReviewStateMarker as j, ReviewFinding as jn, defaultFileReviewerPolicy as jt, ReviewStateAuthenticationFailure as k, ReadFileDiff as kn, confirmedFindingForPublication as kt, gitHubPriorReviewsLayer as l, rankAndDedupeFindings as ln, parsePatch as lr, FileReviewRequest as lt, RetirableReview as m, FileDiffView as mn, FileReviewWorkRejected as mt, GitHubApiFailure as n, ReviewUnitId as nn, ChangedFileStatus as nr, FanOutReviewToolkit as nt, PublishedReview as o, classifyReviewRisks as on, commentableLines as or, FileReviewEvidence as ot, parseGitHubSubmittedAt as p, FileDiffQuery as pn, FileReviewUnitResult as pt, computeChangesetFingerprint as q, MAX_CHANGED_FILES as qn, MAX_UNIT_EVIDENCE_SHARDS as qt, GitHubReviewTarget as r, ReviewUnitPlan as rn, ChangedPath as rr, FanOutReviewer as rt, ReviewPublisher as s, findingAnchorInUnitEvidence as sn, hasReviewableContent as sr, FileReviewFailure as st, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as t, ReviewUnit as tn, ChangedFile as tr, FanOutCoordinatorToolkitLayer as tt, gitHubPullRequestSourceLayer as u, ChangedFileSummary as un, renderReviewContent as ur, FileReviewToolkit as ut, ReviewRetirementReport as v, FindingSeverity as vn, ListReviewUnitsQuery as vt, ReviewExecutionContext as w, MAX_WALKTHROUGH_ENTRIES as wn, ReviewCandidate as wt, retireStaleReviews as x, MAX_CONCERNS as xn, MAX_FILE_REVIEW_TOOL_CALLS as xt, decideReviewRetirement as y, ListChangedFiles as yn, MAX_CHILD_CONCERNS as yt, selectReviewRange as z, fileDiffView as zn, makeFanOutReviewSuite as zt };
2273
2302
 
2274
- //# sourceMappingURL=github-DSqZp3Ce.mjs.map
2303
+ //# sourceMappingURL=github-BgtP7Rdv.mjs.map