@effect-agent/pr-review 0.1.0-beta.25 → 0.1.0-beta.27
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/README.md +26 -3
- package/dist/action.d.mts +11 -8
- package/dist/action.mjs +24 -9
- package/dist/action.mjs.map +1 -1
- package/dist/cli.mjs +7 -4
- package/dist/cli.mjs.map +1 -1
- package/dist/{fan-out-CMEsbFLk.d.mts → fan-out-C3yG1cx3.d.mts} +45 -20
- package/dist/{github-NjgxGqwM.mjs → github-CCuLgyqb.mjs} +254 -81
- package/dist/github-CCuLgyqb.mjs.map +1 -0
- package/dist/index.d.mts +164 -13
- package/dist/index.mjs +3 -3
- package/dist/{providers-CODZQCmL.mjs → providers-Br9FRn7j.mjs} +35 -12
- package/dist/providers-Br9FRn7j.mjs.map +1 -0
- package/dist/testing.d.mts +3 -3
- package/dist/testing.mjs +1 -1
- package/dist/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/src/action.ts +48 -11
- package/src/cli.ts +14 -2
- package/src/internal/action-entry.ts +1 -0
- package/src/internal/factory.ts +2 -1
- package/src/internal/fan-out.ts +150 -66
- package/src/internal/fixtures.ts +3 -3
- package/src/internal/github.ts +169 -22
- package/src/internal/providers.ts +47 -8
- package/src/internal/review-state.ts +85 -47
- package/src/internal/run.ts +8 -3
- package/dist/github-NjgxGqwM.mjs.map +0 -1
- package/dist/providers-CODZQCmL.mjs.map +0 -1
|
@@ -462,14 +462,14 @@ declare const adjudicationIdentity: (adjudication: StoredAdjudication) => string
|
|
|
462
462
|
declare const MAX_STORED_UNREVIEWED_PATHS = 100;
|
|
463
463
|
/** Failed-pass records stored beside the leftover paths; one per unit stage. */
|
|
464
464
|
declare const MAX_STORED_UNREVIEWED_PASSES = 24;
|
|
465
|
-
/** Stages a leftover path may need retried
|
|
465
|
+
/** Stages a leftover path may need retried on the next incremental run. */
|
|
466
466
|
declare const UnreviewedStage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
|
|
467
467
|
type UnreviewedStage = typeof UnreviewedStage.Type;
|
|
468
468
|
declare const StoredUnreviewedPass_base: Schema.Class<StoredUnreviewedPass, Schema.Struct<{
|
|
469
469
|
readonly stage: Schema.Literals<readonly ["discovery", "specialist", "verification"]>;
|
|
470
470
|
readonly paths: Schema.$Array<Schema.NonEmptyString>;
|
|
471
471
|
}>, {}>;
|
|
472
|
-
/** One failed fan-out pass whose
|
|
472
|
+
/** One failed fan-out pass whose stage remains attached to its exact paths. */
|
|
473
473
|
declare class StoredUnreviewedPass extends StoredUnreviewedPass_base {}
|
|
474
474
|
declare const ReviewState_base: Schema.Class<ReviewState, Schema.Struct<{
|
|
475
475
|
readonly version: Schema.Literal<1>;
|
|
@@ -551,6 +551,20 @@ declare const ReviewHeadComparison_base: Schema.Class<ReviewHeadComparison, Sche
|
|
|
551
551
|
}>, {}>;
|
|
552
552
|
/** The bounded result of GitHub's previous-head...current-head comparison. */
|
|
553
553
|
declare class ReviewHeadComparison extends ReviewHeadComparison_base {}
|
|
554
|
+
/**
|
|
555
|
+
* Current and previous paths for 300 PR files plus bounded stored continuity
|
|
556
|
+
* paths. The live adapter refuses a larger snapshot-comparison request.
|
|
557
|
+
*/
|
|
558
|
+
declare const MAX_TREE_COMPARISON_PATHS = 750;
|
|
559
|
+
declare const ReviewTreeComparison_base: Schema.Class<ReviewTreeComparison, Schema.Struct<{
|
|
560
|
+
readonly baseSha: Schema.NonEmptyString;
|
|
561
|
+
readonly headSha: Schema.NonEmptyString;
|
|
562
|
+
readonly changedPaths: Schema.$Array<Schema.NonEmptyString>;
|
|
563
|
+
/** True when GitHub returned either recursive tree incompletely. */
|
|
564
|
+
readonly truncated: Schema.Boolean;
|
|
565
|
+
}>, {}>;
|
|
566
|
+
/** A direct comparison of two complete commit tree snapshots. */
|
|
567
|
+
declare class ReviewTreeComparison extends ReviewTreeComparison_base {}
|
|
554
568
|
/** Internal review selection applied as a decorator over the full PR source. */
|
|
555
569
|
interface ReviewSelection {
|
|
556
570
|
readonly mode: ReviewScopeMode;
|
|
@@ -559,9 +573,12 @@ interface ReviewSelection {
|
|
|
559
573
|
/** Paths whose changes invalidate prior findings, including paths reverted out of the PR. */
|
|
560
574
|
readonly affectedPaths: ReadonlyArray<string>;
|
|
561
575
|
/**
|
|
562
|
-
*
|
|
563
|
-
*
|
|
576
|
+
* Failed stages attached to the unchanged paths that own them. Verification
|
|
577
|
+
* retries reopen discovery for only their paths because candidates are not
|
|
578
|
+
* persisted in review state.
|
|
564
579
|
*/
|
|
580
|
+
readonly retryPasses?: ReadonlyArray<StoredUnreviewedPass>;
|
|
581
|
+
/** Flattened summaries retained for diagnostics and compatibility. */
|
|
565
582
|
readonly retryPaths: ReadonlyArray<string>;
|
|
566
583
|
readonly retryStages: ReadonlyArray<UnreviewedStage>;
|
|
567
584
|
readonly totalFiles: number;
|
|
@@ -596,11 +613,12 @@ declare const selectReviewRange: (input: {
|
|
|
596
613
|
readonly comparison: ReviewHeadComparison | undefined;
|
|
597
614
|
readonly baseComparison?: ReviewHeadComparison | undefined;
|
|
598
615
|
/**
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
* main-drift outside the pull request never re-enters scope.
|
|
616
|
+
* Direct commit-tree snapshot comparison used when the reviewed head is not
|
|
617
|
+
* a git ancestor. Selection hydrates these paths from the current PR files.
|
|
602
618
|
*/
|
|
603
|
-
readonly contentComparison?:
|
|
619
|
+
readonly contentComparison?: ReviewTreeComparison | undefined;
|
|
620
|
+
/** Why the direct snapshot comparison could not produce complete evidence. */
|
|
621
|
+
readonly contentComparisonFailure?: string | undefined;
|
|
604
622
|
readonly lookupFailure?: string | undefined;
|
|
605
623
|
}) => ReviewSelection;
|
|
606
624
|
declare const ReviewExecutionContext_base: Context.ServiceClass<ReviewExecutionContext, "@effect-agent/pr-review/ReviewExecutionContext", ReviewSelection>;
|
|
@@ -1280,11 +1298,11 @@ declare const PriorReviews_base: Context.ServiceClass<PriorReviews, "@effect-age
|
|
|
1280
1298
|
/** Compare a previously reviewed head to the live current head. */
|
|
1281
1299
|
readonly compareHeads: (baseSha: string, headSha: string) => Effect.Effect<ReviewHeadComparison, PriorReviewLookupFailure>;
|
|
1282
1300
|
/**
|
|
1283
|
-
*
|
|
1284
|
-
* not a git ancestor
|
|
1285
|
-
*
|
|
1301
|
+
* Compare complete commit tree snapshots for a bounded path allowlist.
|
|
1302
|
+
* Used when the reviewed head is not a git ancestor after a rebase,
|
|
1303
|
+
* amend, or force-push.
|
|
1286
1304
|
*/
|
|
1287
|
-
readonly compareTrees: (baseSha: string, headSha: string) => Effect.Effect<
|
|
1305
|
+
readonly compareTrees: (baseSha: string, headSha: string, paths: ReadonlyArray<string>) => Effect.Effect<ReviewTreeComparison, PriorReviewLookupFailure>;
|
|
1288
1306
|
}>;
|
|
1289
1307
|
/**
|
|
1290
1308
|
* Read-only view of this package's previously posted reviews on the target
|
|
@@ -1465,12 +1483,19 @@ interface FanOutPipelineInput {
|
|
|
1465
1483
|
/** Shared run budget observed by every child pass. */
|
|
1466
1484
|
readonly budget?: RunBudgetHook<BudgetExceeded | BudgetAdapterError> | undefined;
|
|
1467
1485
|
/**
|
|
1468
|
-
* Unchanged
|
|
1469
|
-
*
|
|
1486
|
+
* Unchanged leftovers from prior failed passes. Every stage stays attached
|
|
1487
|
+
* to its own paths; failed verification reopens both discovery perspectives
|
|
1488
|
+
* for only those paths because candidate payloads are not persisted.
|
|
1470
1489
|
*/
|
|
1471
1490
|
readonly retry?: {
|
|
1472
|
-
readonly
|
|
1473
|
-
|
|
1491
|
+
readonly passes?: ReadonlyArray<{
|
|
1492
|
+
readonly stage: FailedReviewPass["stage"];
|
|
1493
|
+
readonly paths: ReadonlyArray<string>;
|
|
1494
|
+
}>;
|
|
1495
|
+
/** @deprecated Pass path-bound `passes`; this flat form cannot preserve ownership. */
|
|
1496
|
+
readonly paths?: ReadonlyArray<string>;
|
|
1497
|
+
/** @deprecated Pass path-bound `passes`; this flat form cannot preserve ownership. */
|
|
1498
|
+
readonly stages?: ReadonlyArray<FailedReviewPass["stage"]>;
|
|
1474
1499
|
} | undefined;
|
|
1475
1500
|
/**
|
|
1476
1501
|
* Adjudicated identities and prior-round findings injected as discovery
|
|
@@ -1491,11 +1516,11 @@ declare const runFanOutReview: <Provider, ModelProvides, ModelRequires>(binding:
|
|
|
1491
1516
|
plan: ReviewUnitPlan;
|
|
1492
1517
|
unreviewedPaths: string[];
|
|
1493
1518
|
unreviewedPasses: {
|
|
1494
|
-
stage: "
|
|
1495
|
-
paths:
|
|
1519
|
+
readonly stage: FailedReviewPass["stage"];
|
|
1520
|
+
readonly paths: ReadonlyArray<string>;
|
|
1496
1521
|
}[];
|
|
1497
1522
|
turns: number;
|
|
1498
1523
|
}, never, import("effect-agent").IdGenerator | Exclude<Exclude<ModelRequires, import("effect-agent").EngineProvidedToolServices>, import("effect/Scope").Scope>>;
|
|
1499
1524
|
//#endregion
|
|
1500
|
-
export { ReviewRetirementInput as $,
|
|
1501
|
-
//# sourceMappingURL=fan-out-
|
|
1525
|
+
export { ReviewRetirementInput as $, FileDiffView as $n, buildPriorReviewContext as $t, makeFileReviewerInstructions as A, StoredReviewFinding as An, makeReviewInstructions as Ar, ReviewEvidenceShardId as At, fingerprintUnchanged as B, fullReviewSelection as Bn, ReviewInputViolation as Br, rankAndDedupeConcerns as Bt, ReviewWorkPerspective as C, ReviewStateAuthenticationFailure as Cn, ReviewVerdict as Cr, MAX_REPORTED_UNASSIGNED_EVIDENCE_SHARDS as Ct, defaultFileReviewerPolicy as D, ReviewTreeComparison as Dn, fileDiffView as Dr, ReviewDiscoveryPass as Dt, confirmedFindingForPublication as E, ReviewStateMarkerTooLarge as En, defaultReviewPolicy as Er, MAX_UNIT_FILES as Et, GitHubReviewTarget as F, concernIdentity as Fn, MAX_CHANGED_FILES as Fr, ReviewUnitPlan as Ft, gitHubReviewRetirementHostLayer as G, toStoredFinding as Gn, MAX_REVIEW_CONTENT_CHARS as Gr, AdjudicableThread as Gt, gitHubPullRequestSourceLayer as H, selectReviewRange as Hn, ChangedFile as Hr, reviewConcernKey as Ht, PriorReviewLookupFailure as I, findingIdentity as In, MAX_FILE_CHARS as Ir, UNIT_EVIDENCE_CHAR_BUDGET as It, RetirableReview as J, webCryptoReviewStateAuthenticatorLayer as Jn, commentableLines as Jr, MAX_THREAD_ADJUDICATION_COMMANDS as Jt, parseGitHubSubmittedAt as K, unavailableReviewStateAuthenticatorLayer as Kn, PatchLine as Kr, AdjudicationComment as Kt, PriorReviews as L, fromStoredConcern as Ln, PullRequestMetadata as Lr, classifyReviewRisks as Lt, runFanOutReview as M, UnreviewedStage as Mn, readFileHandler as Mr, ReviewRiskCategory as Mt, DEFAULT_GITHUB_REVIEW_AUTHOR_LOGIN as N, adjudicationIdentity as Nn, resolveGuidance as Nr, ReviewUnit as Nt, fileReviewerInstructions as O, StoredAdjudication as On, fileReviewEvidenceChunks as Or, ReviewDiscoveryPerspective as Ot, GitHubApiFailure as P, buildProfileMission as Pn, reviewInstructions as Pr, ReviewUnitId as Pt, ReviewRetirementHost as Q, FileDiffQuery as Qn, renderReviewContent as Qr, ReviewAdjudicationHost as Qt, PublishedReview as R, fromStoredFinding as Rn, PullRequestSource as Rr, findingAnchorInUnitEvidence as Rt, ReviewPassMisbehaved as S, ReviewState as Sn, ReviewToolkitLayer as Sr, MAX_MERGED_FINDINGS as St, assessmentSettlesSuggestionExactly as T, ReviewStateMarker as Tn, clampMaxFindings as Tr, MAX_UNIT_EVIDENCE_SHARDS as Tt, gitHubReviewAdjudicationHostLayer as U, selectedPullRequestSourceLayer as Un, ChangedFileStatus as Ur, anchorViolation as Ut, gitHubPriorReviewsLayer as V, isLineageAncestor as Vn, normalizeRepoRelativePath as Vr, rankAndDedupeFindings as Vt, gitHubReviewPublisherLayer as W, toStoredConcern as Wn, ChangedPath as Wr, AUTHORIZED_ADJUDICATION_ASSOCIATIONS as Wt, ReviewRetirementDecision as X, ChangedFilesView as Xn, isReviewableFile as Xr, PriorReviewContext as Xt, RetirableReviewComment as Y, ChangedFileSummary as Yn, hasReviewableContent as Yr, ParsedAdjudicationCommand as Yt, ReviewRetirementFailure as Z, CodeReview as Zn, parsePatch as Zr, ReviewAdjudicationFailure as Zt, MAX_REVIEW_CHILDREN as _, ReviewExecutionContext as _n, ReviewFinding as _r, assessFlatReview as _t, FanOutPipelineInput as a, parseIssueAdjudication as an, ListChangedFiles as ar, ReviewCommentDraft as at, ReviewCandidate as b, ReviewScopeMode as bn, ReviewMission as br, flatAssurance as bt, FileReviewEvidence as c, renderPriorFindingContextLine as cn, MAX_FINDINGS as cr, estimateReviewEffort as ct, FileReviewer as d, GitCommitSha as dn, MAX_WALKTHROUGH_SUMMARY_CHARS as dr, renderAgentPrompt as dt, collectReviewAdjudications as en, FileReviewEvidenceChunk as er, ReviewRetirementReport as et, FileReviewerBinding as f, MAX_REVIEW_STATE_MARKER_CHARS as fn, PullRequestReviewer as fr, CarriedScope as ft, MAX_FILE_REVIEW_TOOL_CALLS as g, MAX_TREE_COMPARISON_PATHS as gn, ReviewConcern as gr, ReviewInputCoverage as gt, MAX_CHILD_FINDINGS as h, MAX_STORED_UNREVIEWED_PATHS as hn, ReadFileDiff as hr, ReviewAssurance as ht, FanOutInstructionOptions as i, noReviewAdjudicationHostLayer as in, FindingSeverity as ir, AGENT_PROMPT_PREAMBLE as it, reviewCandidateSubjectKey as j, StoredUnreviewedPass as jn, readFileDiffHandler as jr, ReviewPassId as jt, makeFileReviewerDefinition as k, StoredReviewConcern as kn, listChangedFilesHandler as kr, ReviewEvidenceShard as kt, FileReviewReport as l, threadFindingTarget as ln, MAX_PATCH_CHARS as lr, planPublication as lt, MAX_CHILD_CONCERNS as m, MAX_STORED_UNREVIEWED_PASSES as mn, ReadFile as mr, FlatReviewAssessment as mt, ConcernCandidate as n, mergeAdjudications as nn, FileSliceQuery as nr, hasReviewMetadataMarker as nt, FanOutPipelineOutcome as o, parseThreadAdjudication as on, ListChangedFilesQuery as or, ReviewEvent as ot, FindingCandidate as p, MAX_STORED_ADJUDICATIONS as pn, REVIEW_TOOL_RESULT_MAX_BYTES as pr, FailedReviewPass as pt, INLINE_FINDING_TITLE_PATTERN as q, validateReviewState as qn, annotatePatch as qr, DerivedAdjudications as qt, DiscoveredConcern as r, noReviewAdjudicationHost as rn, FindingCategory as rr, retireStaleReviews as rt, FileReviewBrief as s, renderAdjudicationContextLine as sn, MAX_CONCERNS as sr, ReviewPublicationPlan as st, CandidateAssessment as t, deriveAdjudications as tn, FileSlice as tr, decideReviewRetirement as tt, FileReviewToolkit as u, AdjudicationDisposition as un, MAX_WALKTHROUGH_ENTRIES as ur, planWalkthrough as ut, MAX_UNIT_CANDIDATES as v, ReviewHeadComparison as vn, ReviewGuidance as vr, boundedListReason as vt, ReviewWorkPhase as w, ReviewStateAuthenticator as wn, WalkthroughEntry as wr, MAX_REVIEW_UNITS as wt, ReviewCandidateId as x, ReviewSelection as xn, ReviewToolkit as xr, splitCarriedScope as xt, REVIEW_UNIT_CONCURRENCY as y, ReviewMode as yn, ReviewInstructionOptions as yr, fanOutInputCoverage as yt, ReviewPublisher as z, fullReviewExecutionContextLayer as zn, PullRequestSourceFailure as zr, planReviewUnits as zt };
|
|
1526
|
+
//# sourceMappingURL=fan-out-C3yG1cx3.d.mts.map
|