@knpkv/codecommit-web 0.11.3 → 0.13.0

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.
Files changed (94) hide show
  1. package/dist/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
  2. package/dist/client/assets/index-DJ8wO4ny.js +90 -0
  3. package/dist/client/assets/index-KjRfV-r_.css +1 -0
  4. package/dist/client/assets/pr-review-workspace-DPsfemKB.js +22 -0
  5. package/dist/client/assets/pr-review-workspace-mH4SV5xO.css +1 -0
  6. package/dist/client/index.html +2 -2
  7. package/dist/main.js +9 -3
  8. package/dist/main.js.map +1 -1
  9. package/dist/server/Api.d.ts +1175 -103
  10. package/dist/server/Api.d.ts.map +1 -1
  11. package/dist/server/Api.js +242 -6
  12. package/dist/server/Api.js.map +1 -1
  13. package/dist/server/Server.d.ts +13 -7
  14. package/dist/server/Server.d.ts.map +1 -1
  15. package/dist/server/Server.js +45 -13
  16. package/dist/server/Server.js.map +1 -1
  17. package/dist/server/handlers/accounts-live.d.ts +1 -1
  18. package/dist/server/handlers/accounts-live.d.ts.map +1 -1
  19. package/dist/server/handlers/audit-live.d.ts +1 -1
  20. package/dist/server/handlers/audit-live.d.ts.map +1 -1
  21. package/dist/server/handlers/config-live.d.ts +9 -1
  22. package/dist/server/handlers/config-live.d.ts.map +1 -1
  23. package/dist/server/handlers/config-live.js +33 -10
  24. package/dist/server/handlers/config-live.js.map +1 -1
  25. package/dist/server/handlers/events-live.d.ts +1 -1
  26. package/dist/server/handlers/events-live.d.ts.map +1 -1
  27. package/dist/server/handlers/notifications-live.d.ts +1 -1
  28. package/dist/server/handlers/notifications-live.d.ts.map +1 -1
  29. package/dist/server/handlers/notifications-live.js +3 -3
  30. package/dist/server/handlers/notifications-live.js.map +1 -1
  31. package/dist/server/handlers/permissions-live.d.ts +1 -1
  32. package/dist/server/handlers/permissions-live.d.ts.map +1 -1
  33. package/dist/server/handlers/prs-live.d.ts +23 -2
  34. package/dist/server/handlers/prs-live.d.ts.map +1 -1
  35. package/dist/server/handlers/prs-live.js +98 -7
  36. package/dist/server/handlers/prs-live.js.map +1 -1
  37. package/dist/server/handlers/sandbox-live.d.ts +1 -1
  38. package/dist/server/handlers/sandbox-live.d.ts.map +1 -1
  39. package/dist/server/handlers/sandbox-live.js +5 -1
  40. package/dist/server/handlers/sandbox-live.js.map +1 -1
  41. package/dist/server/handlers/stats-live.d.ts +1 -1
  42. package/dist/server/handlers/stats-live.d.ts.map +1 -1
  43. package/dist/server/handlers/subscriptions-live.d.ts +1 -1
  44. package/dist/server/handlers/subscriptions-live.d.ts.map +1 -1
  45. package/dist/server/internal/BackgroundWorkers.d.ts +1 -1
  46. package/dist/server/internal/BackgroundWorkers.d.ts.map +1 -1
  47. package/dist/server/internal/BackgroundWorkers.js +43 -5
  48. package/dist/server/internal/BackgroundWorkers.js.map +1 -1
  49. package/dist/server/internal/OwnerSessionSecurity.d.ts +46 -0
  50. package/dist/server/internal/OwnerSessionSecurity.d.ts.map +1 -0
  51. package/dist/server/internal/OwnerSessionSecurity.js +143 -0
  52. package/dist/server/internal/OwnerSessionSecurity.js.map +1 -0
  53. package/dist/server/internal/PermissionedReadClient.d.ts +27 -0
  54. package/dist/server/internal/PermissionedReadClient.d.ts.map +1 -0
  55. package/dist/server/internal/PermissionedReadClient.js +132 -0
  56. package/dist/server/internal/PermissionedReadClient.js.map +1 -0
  57. package/dist/server/review/PullRequestReview.d.ts +311 -0
  58. package/dist/server/review/PullRequestReview.d.ts.map +1 -0
  59. package/dist/server/review/PullRequestReview.js +697 -0
  60. package/dist/server/review/PullRequestReview.js.map +1 -0
  61. package/dist/server/review/RelayFindingPublisher.d.ts +39 -0
  62. package/dist/server/review/RelayFindingPublisher.d.ts.map +1 -0
  63. package/dist/server/review/RelayFindingPublisher.js +78 -0
  64. package/dist/server/review/RelayFindingPublisher.js.map +1 -0
  65. package/dist/server/review/ReviewPromptBudget.d.ts +10 -0
  66. package/dist/server/review/ReviewPromptBudget.d.ts.map +1 -0
  67. package/dist/server/review/ReviewPromptBudget.js +11 -0
  68. package/dist/server/review/ReviewPromptBudget.js.map +1 -0
  69. package/dist/server/review/ReviewSkillCatalog.d.ts +34 -0
  70. package/dist/server/review/ReviewSkillCatalog.d.ts.map +1 -0
  71. package/dist/server/review/ReviewSkillCatalog.js +204 -0
  72. package/dist/server/review/ReviewSkillCatalog.js.map +1 -0
  73. package/dist/tooling/authenticated-dev-proxy.d.ts +15 -0
  74. package/dist/tooling/authenticated-dev-proxy.d.ts.map +1 -0
  75. package/dist/tooling/authenticated-dev-proxy.js +19 -0
  76. package/dist/tooling/authenticated-dev-proxy.js.map +1 -0
  77. package/dist/tooling/authenticated-dev-proxy.test.d.ts +2 -0
  78. package/dist/tooling/authenticated-dev-proxy.test.d.ts.map +1 -0
  79. package/dist/tooling/authenticated-dev-proxy.test.js +26 -0
  80. package/dist/tooling/authenticated-dev-proxy.test.js.map +1 -0
  81. package/dist/tooling/production-prototype-boundary.d.ts.map +1 -1
  82. package/package.json +29 -24
  83. package/dist/client/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  84. package/dist/client/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  85. package/dist/client/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  86. package/dist/client/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
  87. package/dist/client/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
  88. package/dist/client/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
  89. package/dist/client/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
  90. package/dist/client/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
  91. package/dist/client/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
  92. package/dist/client/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  93. package/dist/client/assets/index-DHUFjL8d.css +0 -1
  94. package/dist/client/assets/index-DSDtEnV5.js +0 -90
@@ -0,0 +1,132 @@
1
+ /** Permission and audit boundary for Schema-decoded CodeCommit provider reads. @module */
2
+ import { AwsApiError, PermissionDeniedError } from "@knpkv/codecommit-core/Errors.js";
3
+ import { AuditLogRepo } from "@knpkv/codecommit-core/PermissionService/AuditLog.js";
4
+ import { PermissionService } from "@knpkv/codecommit-core/PermissionService/index.js";
5
+ import { getOperationMeta } from "@knpkv/codecommit-core/PermissionService/operations.js";
6
+ import { PermissionGate } from "@knpkv/codecommit-core/PermissionService/PermissionGate.js";
7
+ import * as ReadClient from "@knpkv/codecommit-core/ReadClient.js";
8
+ import { Clock, Context, Effect, Option, Random, Stream } from "effect";
9
+ const MAXIMUM_CHANGED_FILE_PAGE_REQUESTS = 1_001;
10
+ /** Holds the decoded provider client before permission enforcement. */
11
+ export class InnerCodeCommitReadClient extends Context.Service()("@knpkv/codecommit-web/InnerCodeCommitReadClient") {
12
+ }
13
+ const deniedError = (params, reason) => new AwsApiError({
14
+ operation: params.operation,
15
+ profile: params.account.profile,
16
+ region: params.account.region,
17
+ cause: new PermissionDeniedError({ operation: params.operation, reason })
18
+ });
19
+ /** Construct a read client that checks permission and audits before every provider call. */
20
+ export const makePermissionedReadClient = Effect.fn("PermissionedReadClient.make")(function* (inner) {
21
+ const permissions = yield* PermissionService;
22
+ const permissionGate = yield* PermissionGate;
23
+ const auditLog = yield* AuditLogRepo;
24
+ const audit = (params, permissionState, durationMs) => permissions.isAuditEnabled().pipe(Effect.flatMap((enabled) => enabled
25
+ ? Clock.currentTimeMillis.pipe(Effect.flatMap((now) => auditLog.log({
26
+ timestamp: new Date(now).toISOString(),
27
+ operation: params.operation,
28
+ accountProfile: params.account.profile,
29
+ region: params.account.region,
30
+ permissionState,
31
+ context: params.context,
32
+ durationMs
33
+ })))
34
+ : Effect.void), Effect.ignore);
35
+ const check = (params) => Effect.gen(function* () {
36
+ const state = yield* permissions.check(params.operation);
37
+ if (state === "always_allow")
38
+ return "always_allowed";
39
+ if (state === "deny") {
40
+ yield* audit(params, "denied", null);
41
+ return yield* deniedError(params, "denied");
42
+ }
43
+ const now = yield* Clock.currentTimeMillis;
44
+ const nonce = yield* Random.nextIntBetween(0, 999_999_999);
45
+ const response = yield* permissionGate.request({
46
+ id: `gate-${now}-${nonce}`,
47
+ operation: params.operation,
48
+ category: getOperationMeta(params.operation).category,
49
+ context: params.context
50
+ }).pipe(Effect.catchTag("PermissionDeniedError", (error) => Effect.gen(function* () {
51
+ if (error.reason === "denied") {
52
+ yield* permissions.set(params.operation, "deny");
53
+ yield* audit(params, "denied", null);
54
+ }
55
+ else {
56
+ yield* audit(params, "timed_out", null);
57
+ }
58
+ return yield* deniedError(params, error.reason);
59
+ })));
60
+ if (response === "always_allow") {
61
+ yield* permissions.set(params.operation, "always_allow");
62
+ return "always_allowed";
63
+ }
64
+ if (response === "deny") {
65
+ yield* permissions.set(params.operation, "deny");
66
+ yield* audit(params, "denied", null);
67
+ return yield* deniedError(params, "denied");
68
+ }
69
+ return "allowed";
70
+ });
71
+ const gated = (operation, context, account, method) => (request) => {
72
+ const params = { operation, context: context(request), account: account(request) };
73
+ return Effect.gen(function* () {
74
+ const permissionState = yield* check(params);
75
+ const startedAt = yield* Clock.currentTimeMillis;
76
+ return yield* method(request).pipe(Effect.ensuring(Clock.currentTimeMillis.pipe(Effect.flatMap((completedAt) => audit(params, permissionState, completedAt - startedAt)))));
77
+ });
78
+ };
79
+ const self = (account) => account;
80
+ const nested = (request) => request.account;
81
+ const listPullRequestIdsPage = gated("listPullRequests", (request) => `List pull requests in ${request.repositoryName}`, nested, inner.listPullRequestIdsPage);
82
+ const getPullRequest = gated("getPullRequest", (request) => `Fetch PR #${request.pullRequestId}`, nested, inner.getPullRequest);
83
+ const listPullRequestsPage = (request) => Effect.gen(function* () {
84
+ const page = yield* listPullRequestIdsPage(request);
85
+ const pullRequests = yield* Effect.forEach(page.pullRequestIds, (pullRequestId) => getPullRequest({ account: request.account, pullRequestId }));
86
+ return new ReadClient.CodeCommitPullRequestPage({ pullRequests, nextToken: page.nextToken });
87
+ });
88
+ const getChangedFilesPage = gated("getDifferences", (request) => `Read differences in ${request.repositoryName}`, nested, inner.getChangedFilesPage);
89
+ const initialPageToken = () => null;
90
+ const streamPullRequests = (request) => Stream.paginate(initialPageToken(), (nextToken) => listPullRequestsPage({ ...request, nextToken }).pipe(Effect.map((page) => [
91
+ page.pullRequests,
92
+ page.nextToken === null ? Option.none() : Option.some(page.nextToken)
93
+ ])));
94
+ const streamChangedFiles = (request) => Stream.paginate({ nextToken: null, pageRequests: 0, seenTokens: new Set() }, Effect.fn("PermissionedReadClient.changedFilesPage")(function* (state) {
95
+ if (state.pageRequests >= MAXIMUM_CHANGED_FILE_PAGE_REQUESTS) {
96
+ return yield* new ReadClient.CodeCommitMalformedResponseError({
97
+ operation: "GetDifferences",
98
+ diagnosticCode: "page-request-limit"
99
+ });
100
+ }
101
+ const page = yield* getChangedFilesPage({ ...request, nextToken: state.nextToken });
102
+ if (page.nextToken === null)
103
+ return [page.files, Option.none()];
104
+ if (state.seenTokens.has(page.nextToken)) {
105
+ return yield* new ReadClient.CodeCommitMalformedResponseError({
106
+ operation: "GetDifferences",
107
+ diagnosticCode: "repeated-page-token"
108
+ });
109
+ }
110
+ return [
111
+ page.files,
112
+ Option.some({
113
+ nextToken: page.nextToken,
114
+ pageRequests: state.pageRequests + 1,
115
+ seenTokens: new Set([...state.seenTokens, page.nextToken])
116
+ })
117
+ ];
118
+ }));
119
+ return {
120
+ discoverAccount: gated("getCallerIdentity", (account) => `Discover account for ${account.profile}`, self, inner.discoverAccount),
121
+ listRepositoriesPage: gated("listRepositories", (request) => `List repositories for ${request.account.profile}`, nested, inner.listRepositoriesPage),
122
+ getBlob: gated("getBlob", (request) => `Read immutable blob in ${request.repositoryName}`, nested, inner.getBlob),
123
+ listPullRequestIdsPage,
124
+ listPullRequestsPage,
125
+ streamPullRequests,
126
+ getPullRequest,
127
+ getRepositoryIdentity: gated("getRepository", (request) => `Read repository identity for ${request.repositoryName}`, nested, inner.getRepositoryIdentity),
128
+ getChangedFilesPage,
129
+ streamChangedFiles
130
+ };
131
+ });
132
+ //# sourceMappingURL=PermissionedReadClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionedReadClient.js","sourceRoot":"","sources":["../../../src/server/internal/PermissionedReadClient.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,EAAE,YAAY,EAAyB,MAAM,sDAAsD,CAAA;AAC1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,mDAAmD,CAAA;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAA;AAC3F,OAAO,KAAK,UAAU,MAAM,sCAAsC,CAAA;AAClE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASvE,MAAM,kCAAkC,GAAG,KAAK,CAAA;AAQhD,uEAAuE;AACvE,MAAM,OAAO,yBAA0B,SAAQ,OAAO,CAAC,OAAO,EAG3D,CAAC,iDAAiD,CAAC;CAAG;AAEzD,MAAM,WAAW,GAAG,CAAC,MAAkB,EAAE,MAA4B,EAAE,EAAE,CACvE,IAAI,WAAW,CAAC;IACd,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO;IAC/B,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;IAC7B,KAAK,EAAE,IAAI,qBAAqB,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;CAC1E,CAAC,CAAA;AAEJ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 -0,0 +1,311 @@
1
+ import type * as Domain from "@knpkv/codecommit-core/Domain.js";
2
+ import type * as ReadClient from "@knpkv/codecommit-core/ReadClient.js";
3
+ import { createTwoFilesPatch } from "diff";
4
+ import { Cause, Effect, Option, Schema, Stream } from "effect";
5
+ import * as Crypto from "effect/Crypto";
6
+ import * as FileSystem from "effect/FileSystem";
7
+ import type * as Semaphore from "effect/Semaphore";
8
+ import type * as ChildProcessSpawner from "effect/unstable/process/ChildProcessSpawner";
9
+ import { type PullRequestRelayReviewResponse, type RelayReviewConversationTurn, type RelayReviewKind, type RelayReviewProgressPhase, RelayReviewResult, type RelayReviewStreamEvent } from "../Api.js";
10
+ import type { RelayFindingPublisherService } from "./RelayFindingPublisher.js";
11
+ declare const PullRequestReviewError_base: Schema.Class<PullRequestReviewError, Schema.TaggedStruct<"PullRequestReviewError", {
12
+ readonly operation: Schema.String;
13
+ readonly message: Schema.String;
14
+ readonly cause: Schema.optional<Schema.Defect>;
15
+ }>, Cause.YieldableError>;
16
+ export declare class PullRequestReviewError extends PullRequestReviewError_base {
17
+ }
18
+ interface ExactReviewScope {
19
+ readonly account: ReadClient.CodeCommitReadAccount;
20
+ readonly pullRequest: Domain.PullRequest;
21
+ readonly revision: ReadClient.CodeCommitPullRequestRevision;
22
+ }
23
+ interface ExpectedReviewRevision {
24
+ readonly revisionId: string;
25
+ readonly baseCommit: string;
26
+ readonly headCommit: string;
27
+ }
28
+ /** Group-lifetime source for exact-revision changed-file inventories. */
29
+ export interface PullRequestChangedFilesSource {
30
+ readonly get: (account: ReadClient.CodeCommitReadAccount, revision: ReadClient.CodeCommitPullRequestRevision) => Effect.Effect<ReadonlyArray<ReadClient.CodeCommitChangedFile>, PullRequestReviewError>;
31
+ }
32
+ interface RelayFileAnchors {
33
+ readonly beforePath: string | null;
34
+ readonly afterPath: string | null;
35
+ readonly beforeLines: ReadonlySet<number>;
36
+ readonly afterLines: ReadonlySet<number>;
37
+ }
38
+ interface RelayPatchEvidence {
39
+ readonly patch: string;
40
+ readonly anchors: ReadonlyArray<RelayFileAnchors>;
41
+ }
42
+ export interface RelayReviewProgress {
43
+ readonly phase: RelayReviewProgressPhase;
44
+ readonly message: string;
45
+ readonly detail?: string;
46
+ }
47
+ export type RelayReviewProgressReporter = (progress: RelayReviewProgress) => Effect.Effect<void>;
48
+ /** Build one bounded cache shared by the PR handler group. */
49
+ export declare const makePullRequestChangedFilesSource: (client: ReadClient.CodeCommitReadClientService) => Effect.Effect<{
50
+ get: (account: {
51
+ readonly profile: string & import("effect/Brand").Brand<"AwsProfileName">;
52
+ readonly region: string & import("effect/Brand").Brand<"AwsRegion">;
53
+ }, revision: ReadClient.CodeCommitPullRequestRevision) => Effect.Effect<ReadClient.CodeCommitChangedFile[], PullRequestReviewError, never>;
54
+ }, never, never>;
55
+ /** Load the complete changed-file inventory without exposing provider blob locators. */
56
+ export declare const loadPullRequestDiff: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, changedFiles?: PullRequestChangedFilesSource | undefined) => Effect.Effect<{
57
+ readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
58
+ readonly revisionId: string;
59
+ readonly baseCommit: string;
60
+ readonly headCommit: string;
61
+ readonly files: readonly {
62
+ readonly index: number;
63
+ readonly status: "added" | "deleted" | "modified" | "renamed";
64
+ readonly path: string;
65
+ readonly previousPath: string | null;
66
+ readonly beforeMode: string | null;
67
+ readonly afterMode: string | null;
68
+ }[];
69
+ }, PullRequestReviewError, never>;
70
+ /** Load both text sides for one indexed file after an exact-revision preflight. */
71
+ export declare const loadPullRequestDiffContent: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, fileIndex: number, changedFiles?: PullRequestChangedFilesSource | undefined) => Effect.Effect<{
72
+ readonly fileIndex: number;
73
+ readonly revisionId: string;
74
+ readonly state: "binary" | "oversized" | "text";
75
+ readonly before: string | null;
76
+ readonly after: string | null;
77
+ }, PullRequestReviewError, never>;
78
+ /** Build one bounded exact patch and its changed-line evidence from Schema-decoded provider blobs. */
79
+ export declare const collectRelayPatchEvidence: (client: ReadClient.CodeCommitReadClientService, scope: ExactReviewScope, files: readonly ReadClient.CodeCommitChangedFile[], renderPatch?: typeof createTwoFilesPatch | undefined) => Effect.Effect<RelayPatchEvidence, PullRequestReviewError, never>;
80
+ /** Build one bounded exact patch from Schema-decoded provider blobs. */
81
+ export declare const collectRelayPatch: (client: ReadClient.CodeCommitReadClientService, scope: ExactReviewScope, files: readonly ReadClient.CodeCommitChangedFile[], renderPatch?: typeof createTwoFilesPatch | undefined) => Effect.Effect<string, PullRequestReviewError, never>;
82
+ /** Reject Relay locations that are not exact changed-line or changed-file evidence. */
83
+ export declare const validateRelayReviewAnchors: (result: RelayReviewResult, evidence: RelayPatchEvidence) => Effect.Effect<void, PullRequestReviewError>;
84
+ /** Run Relay only when the group-level execution slot is immediately available. */
85
+ export declare const withRelayReviewPermit: <A, E, R>(semaphore: Semaphore.Semaphore, effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | PullRequestReviewError, R>;
86
+ /** Hold the review slot for the complete streamed agent lifetime. */
87
+ export declare const withRelayReviewStreamPermit: <A, E, R>(semaphore: Semaphore.Semaphore, stream: Stream.Stream<A, E, R>) => Stream.Stream<A, E | PullRequestReviewError, R>;
88
+ /** Host-authored Relay prompt; repository content is isolated as untrusted evidence. */
89
+ export declare const makeRelayReviewPrompt: (scope: ExactReviewScope, kind: RelayReviewKind, patch: string, skillPrompt?: string) => string;
90
+ export declare const parseRelayReviewResult: (message: string, kind: RelayReviewKind) => Option.Option<RelayReviewResult>;
91
+ /** Execute one ephemeral, read-only Relay pass over the exact provider patch. */
92
+ export declare const runPullRequestRelayReview: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, kind: "explain" | "review" | "security" | "tests", changedFiles?: PullRequestChangedFilesSource | undefined, skillPrompt?: string | undefined, reportProgress?: RelayReviewProgressReporter | undefined) => Effect.Effect<{
93
+ readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
94
+ readonly revisionId: string;
95
+ readonly baseCommit: string;
96
+ readonly headCommit: string;
97
+ readonly kind: "explain" | "review" | "security" | "tests";
98
+ readonly result: {
99
+ readonly findings: readonly {
100
+ readonly id: string;
101
+ readonly priority: "P1" | "P2" | "P3" | "P4";
102
+ readonly title: string;
103
+ readonly summary: string;
104
+ readonly details: string;
105
+ readonly recommendation: string;
106
+ readonly verification: string;
107
+ readonly publicationTarget: "line-comment" | "pr-comment";
108
+ readonly location: {
109
+ readonly scope: "general";
110
+ } | {
111
+ readonly scope: "file";
112
+ readonly filePath: string;
113
+ } | {
114
+ readonly scope: "line";
115
+ readonly filePath: string;
116
+ readonly line: number;
117
+ readonly side: "after" | "before";
118
+ };
119
+ }[];
120
+ readonly verdict: string;
121
+ readonly explanation?: string | undefined;
122
+ };
123
+ }, PullRequestReviewError, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
124
+ export declare const makeRelayConversationPrompt: (scope: ExactReviewScope, kind: RelayReviewKind, patch: string, skillPrompt: string, currentReview: typeof RelayReviewResult.Type, turns: ReadonlyArray<RelayReviewConversationTurn>, findingId: string, message: string) => string;
125
+ /** Continue a finding conversation while reconciling the complete deck against one exact revision. */
126
+ export declare const continuePullRequestRelayReview: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, kind: "explain" | "review" | "security" | "tests", currentReview: {
127
+ readonly findings: readonly {
128
+ readonly id: string;
129
+ readonly priority: "P1" | "P2" | "P3" | "P4";
130
+ readonly title: string;
131
+ readonly summary: string;
132
+ readonly details: string;
133
+ readonly recommendation: string;
134
+ readonly verification: string;
135
+ readonly publicationTarget: "line-comment" | "pr-comment";
136
+ readonly location: {
137
+ readonly scope: "general";
138
+ } | {
139
+ readonly scope: "file";
140
+ readonly filePath: string;
141
+ } | {
142
+ readonly scope: "line";
143
+ readonly filePath: string;
144
+ readonly line: number;
145
+ readonly side: "after" | "before";
146
+ };
147
+ }[];
148
+ readonly verdict: string;
149
+ readonly explanation?: string | undefined;
150
+ }, turns: readonly {
151
+ readonly findingId: string;
152
+ readonly role: "assistant" | "user";
153
+ readonly message: string;
154
+ }[], findingId: string, message: string, changedFiles?: PullRequestChangedFilesSource | undefined, skillPrompt?: string | undefined, reportProgress?: RelayReviewProgressReporter | undefined) => Effect.Effect<{
155
+ review: {
156
+ pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
157
+ revisionId: string;
158
+ baseCommit: string & import("effect/Brand").Brand<"CodeCommitCommitId">;
159
+ headCommit: string & import("effect/Brand").Brand<"CodeCommitCommitId">;
160
+ kind: "explain" | "review" | "security" | "tests";
161
+ result: {
162
+ readonly findings: readonly {
163
+ readonly id: string;
164
+ readonly priority: "P1" | "P2" | "P3" | "P4";
165
+ readonly title: string;
166
+ readonly summary: string;
167
+ readonly details: string;
168
+ readonly recommendation: string;
169
+ readonly verification: string;
170
+ readonly publicationTarget: "line-comment" | "pr-comment";
171
+ readonly location: {
172
+ readonly scope: "general";
173
+ } | {
174
+ readonly scope: "file";
175
+ readonly filePath: string;
176
+ } | {
177
+ readonly scope: "line";
178
+ readonly filePath: string;
179
+ readonly line: number;
180
+ readonly side: "after" | "before";
181
+ };
182
+ }[];
183
+ readonly verdict: string;
184
+ readonly explanation?: string | undefined;
185
+ };
186
+ };
187
+ reply: string;
188
+ }, PullRequestReviewError, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
189
+ /** Convert one Relay worker into a stream with exactly one terminal event. */
190
+ export declare const streamRelayReviewEventsFrom: <E, R>(run: (report: RelayReviewProgressReporter) => Effect.Effect<{
191
+ readonly review: PullRequestRelayReviewResponse;
192
+ readonly reply?: string;
193
+ }, E, R>) => Stream.Stream<RelayReviewStreamEvent, never, R>;
194
+ /** Stream sanitized progress and one terminal review event. */
195
+ export declare const streamPullRequestRelayReview: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, kind: RelayReviewKind, changedFiles: PullRequestChangedFilesSource | undefined, skillPrompt: string) => Stream.Stream<{
196
+ readonly type: "progress";
197
+ readonly phase: "agent" | "files" | "patch" | "posting" | "revision" | "validation";
198
+ readonly message: string;
199
+ readonly detail?: string | undefined;
200
+ } | {
201
+ readonly type: "complete";
202
+ readonly review: {
203
+ readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
204
+ readonly revisionId: string;
205
+ readonly baseCommit: string;
206
+ readonly headCommit: string;
207
+ readonly kind: "explain" | "review" | "security" | "tests";
208
+ readonly result: {
209
+ readonly findings: readonly {
210
+ readonly id: string;
211
+ readonly priority: "P1" | "P2" | "P3" | "P4";
212
+ readonly title: string;
213
+ readonly summary: string;
214
+ readonly details: string;
215
+ readonly recommendation: string;
216
+ readonly verification: string;
217
+ readonly publicationTarget: "line-comment" | "pr-comment";
218
+ readonly location: {
219
+ readonly scope: "general";
220
+ } | {
221
+ readonly scope: "file";
222
+ readonly filePath: string;
223
+ } | {
224
+ readonly scope: "line";
225
+ readonly filePath: string;
226
+ readonly line: number;
227
+ readonly side: "after" | "before";
228
+ };
229
+ }[];
230
+ readonly verdict: string;
231
+ readonly explanation?: string | undefined;
232
+ };
233
+ };
234
+ readonly reply?: string | undefined;
235
+ } | {
236
+ readonly type: "error";
237
+ readonly message: string;
238
+ }, never, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
239
+ /** Stream sanitized progress and one terminal reconciled conversation event. */
240
+ export declare const streamPullRequestRelayConversation: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, kind: RelayReviewKind, currentReview: typeof RelayReviewResult.Type, turns: ReadonlyArray<RelayReviewConversationTurn>, findingId: string, message: string, changedFiles: PullRequestChangedFilesSource | undefined, skillPrompt: string) => Stream.Stream<{
241
+ readonly type: "progress";
242
+ readonly phase: "agent" | "files" | "patch" | "posting" | "revision" | "validation";
243
+ readonly message: string;
244
+ readonly detail?: string | undefined;
245
+ } | {
246
+ readonly type: "complete";
247
+ readonly review: {
248
+ readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
249
+ readonly revisionId: string;
250
+ readonly baseCommit: string;
251
+ readonly headCommit: string;
252
+ readonly kind: "explain" | "review" | "security" | "tests";
253
+ readonly result: {
254
+ readonly findings: readonly {
255
+ readonly id: string;
256
+ readonly priority: "P1" | "P2" | "P3" | "P4";
257
+ readonly title: string;
258
+ readonly summary: string;
259
+ readonly details: string;
260
+ readonly recommendation: string;
261
+ readonly verification: string;
262
+ readonly publicationTarget: "line-comment" | "pr-comment";
263
+ readonly location: {
264
+ readonly scope: "general";
265
+ } | {
266
+ readonly scope: "file";
267
+ readonly filePath: string;
268
+ } | {
269
+ readonly scope: "line";
270
+ readonly filePath: string;
271
+ readonly line: number;
272
+ readonly side: "after" | "before";
273
+ };
274
+ }[];
275
+ readonly verdict: string;
276
+ readonly explanation?: string | undefined;
277
+ };
278
+ };
279
+ readonly reply?: string | undefined;
280
+ } | {
281
+ readonly type: "error";
282
+ readonly message: string;
283
+ }, never, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
284
+ /** Accept and immediately post one unchanged finding through the exact-revision review client. */
285
+ export declare const postPullRequestRelayFinding: (client: ReadClient.CodeCommitReadClientService, publisher: RelayFindingPublisherService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, finding: {
286
+ readonly id: string;
287
+ readonly priority: "P1" | "P2" | "P3" | "P4";
288
+ readonly title: string;
289
+ readonly summary: string;
290
+ readonly details: string;
291
+ readonly recommendation: string;
292
+ readonly verification: string;
293
+ readonly publicationTarget: "line-comment" | "pr-comment";
294
+ readonly location: {
295
+ readonly scope: "general";
296
+ } | {
297
+ readonly scope: "file";
298
+ readonly filePath: string;
299
+ } | {
300
+ readonly scope: "line";
301
+ readonly filePath: string;
302
+ readonly line: number;
303
+ readonly side: "after" | "before";
304
+ };
305
+ }, changedFiles?: PullRequestChangedFilesSource | undefined) => Effect.Effect<{
306
+ findingId: string;
307
+ operationId: string;
308
+ summary: string;
309
+ }, PullRequestReviewError, Crypto.Crypto>;
310
+ export {};
311
+ //# sourceMappingURL=PullRequestReview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PullRequestReview.d.ts","sourceRoot":"","sources":["../../../src/server/review/PullRequestReview.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,MAAM,kCAAkC,CAAA;AAC/D,OAAO,KAAK,KAAK,UAAU,MAAM,sCAAsC,CAAA;AAEvE,OAAO,EAAE,mBAAmB,EAAc,MAAM,MAAM,CAAA;AACtD,OAAO,EAAS,KAAK,EAAQ,MAAM,EAAQ,MAAM,EAAoB,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AACnG,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,KAAK,SAAS,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,KAAK,mBAAmB,MAAM,6CAA6C,CAAA;AAEvF,OAAO,EAGL,KAAK,8BAA8B,EAEnC,KAAK,2BAA2B,EAEhC,KAAK,eAAe,EAEpB,KAAK,wBAAwB,EAC7B,iBAAiB,EACjB,KAAK,sBAAsB,EAC5B,MAAM,WAAW,CAAA;AAClB,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;;;;;;AAU9E,qBAAa,sBAAuB,SAAQ,2BAO3C;CAAG;AAEJ,UAAU,gBAAgB;IACxB,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC,qBAAqB,CAAA;IAClD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,CAAA;IACxC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC,6BAA6B,CAAA;CAC5D;AAED,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,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