@knpkv/codecommit-web 0.11.4 → 0.14.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.
- package/dist/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/client/assets/index-DQUoxciG.js +90 -0
- package/dist/client/assets/index-NJaNHeOS.css +1 -0
- package/dist/client/assets/pr-review-workspace-C0TVEp1y.js +22 -0
- package/dist/client/assets/pr-review-workspace-mH4SV5xO.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/main.js +9 -3
- package/dist/main.js.map +1 -1
- package/dist/server/Api.d.ts +1333 -114
- package/dist/server/Api.d.ts.map +1 -1
- package/dist/server/Api.js +251 -6
- package/dist/server/Api.js.map +1 -1
- package/dist/server/Server.d.ts +13 -7
- package/dist/server/Server.d.ts.map +1 -1
- package/dist/server/Server.js +45 -13
- package/dist/server/Server.js.map +1 -1
- package/dist/server/handlers/accounts-live.d.ts +1 -1
- package/dist/server/handlers/accounts-live.d.ts.map +1 -1
- package/dist/server/handlers/audit-live.d.ts +1 -1
- package/dist/server/handlers/audit-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.d.ts +9 -1
- package/dist/server/handlers/config-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.js +33 -10
- package/dist/server/handlers/config-live.js.map +1 -1
- package/dist/server/handlers/events-live.d.ts +1 -1
- package/dist/server/handlers/events-live.d.ts.map +1 -1
- package/dist/server/handlers/notifications-live.d.ts +1 -1
- package/dist/server/handlers/notifications-live.d.ts.map +1 -1
- package/dist/server/handlers/notifications-live.js +3 -3
- package/dist/server/handlers/notifications-live.js.map +1 -1
- package/dist/server/handlers/permissions-live.d.ts +1 -1
- package/dist/server/handlers/permissions-live.d.ts.map +1 -1
- package/dist/server/handlers/prs-live.d.ts +79 -2
- package/dist/server/handlers/prs-live.d.ts.map +1 -1
- package/dist/server/handlers/prs-live.js +117 -7
- package/dist/server/handlers/prs-live.js.map +1 -1
- package/dist/server/handlers/sandbox-live.d.ts +1 -1
- package/dist/server/handlers/sandbox-live.d.ts.map +1 -1
- package/dist/server/handlers/sandbox-live.js +5 -1
- package/dist/server/handlers/sandbox-live.js.map +1 -1
- package/dist/server/handlers/stats-live.d.ts +1 -1
- package/dist/server/handlers/stats-live.d.ts.map +1 -1
- package/dist/server/handlers/subscriptions-live.d.ts +1 -1
- package/dist/server/handlers/subscriptions-live.d.ts.map +1 -1
- package/dist/server/internal/BackgroundWorkers.d.ts +1 -1
- package/dist/server/internal/BackgroundWorkers.d.ts.map +1 -1
- package/dist/server/internal/BackgroundWorkers.js +43 -5
- package/dist/server/internal/BackgroundWorkers.js.map +1 -1
- package/dist/server/internal/OwnerSessionSecurity.d.ts +46 -0
- package/dist/server/internal/OwnerSessionSecurity.d.ts.map +1 -0
- package/dist/server/internal/OwnerSessionSecurity.js +143 -0
- package/dist/server/internal/OwnerSessionSecurity.js.map +1 -0
- package/dist/server/internal/PermissionedReadClient.d.ts +27 -0
- package/dist/server/internal/PermissionedReadClient.d.ts.map +1 -0
- package/dist/server/internal/PermissionedReadClient.js +132 -0
- package/dist/server/internal/PermissionedReadClient.js.map +1 -0
- package/dist/server/review/PullRequestReview.d.ts +394 -0
- package/dist/server/review/PullRequestReview.d.ts.map +1 -0
- package/dist/server/review/PullRequestReview.js +714 -0
- package/dist/server/review/PullRequestReview.js.map +1 -0
- package/dist/server/review/RelayFindingPublisher.d.ts +39 -0
- package/dist/server/review/RelayFindingPublisher.d.ts.map +1 -0
- package/dist/server/review/RelayFindingPublisher.js +78 -0
- package/dist/server/review/RelayFindingPublisher.js.map +1 -0
- package/dist/server/review/ReviewPromptBudget.d.ts +10 -0
- package/dist/server/review/ReviewPromptBudget.d.ts.map +1 -0
- package/dist/server/review/ReviewPromptBudget.js +11 -0
- package/dist/server/review/ReviewPromptBudget.js.map +1 -0
- package/dist/server/review/ReviewSkillCatalog.d.ts +34 -0
- package/dist/server/review/ReviewSkillCatalog.d.ts.map +1 -0
- package/dist/server/review/ReviewSkillCatalog.js +204 -0
- package/dist/server/review/ReviewSkillCatalog.js.map +1 -0
- package/dist/tooling/authenticated-dev-proxy.d.ts +15 -0
- package/dist/tooling/authenticated-dev-proxy.d.ts.map +1 -0
- package/dist/tooling/authenticated-dev-proxy.js +19 -0
- package/dist/tooling/authenticated-dev-proxy.js.map +1 -0
- package/dist/tooling/authenticated-dev-proxy.test.d.ts +2 -0
- package/dist/tooling/authenticated-dev-proxy.test.d.ts.map +1 -0
- package/dist/tooling/authenticated-dev-proxy.test.js +26 -0
- package/dist/tooling/authenticated-dev-proxy.test.js.map +1 -0
- package/dist/tooling/production-prototype-boundary.d.ts.map +1 -1
- package/package.json +31 -24
- package/dist/client/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/client/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/client/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/client/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
- package/dist/client/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
- package/dist/client/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
- package/dist/client/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
- package/dist/client/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/client/assets/index-DHUFjL8d.css +0 -1
- package/dist/client/assets/index-DvOqBYkk.js +0 -90
|
@@ -0,0 +1,394 @@
|
|
|
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 RelayReviewProfile, 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
|
+
/** Exact native output contract selected before the provider process starts. */
|
|
91
|
+
export declare const relayReviewOutputSchema: (kind: RelayReviewKind) => Schema.Top;
|
|
92
|
+
export declare const parseRelayReviewResult: (message: string, kind: RelayReviewKind) => Option.Option<RelayReviewResult>;
|
|
93
|
+
/** Execute one ephemeral, read-only Relay pass over the exact provider patch. */
|
|
94
|
+
export declare const runPullRequestRelayReview: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, profile: {
|
|
95
|
+
readonly id: string;
|
|
96
|
+
readonly name: string;
|
|
97
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
98
|
+
readonly provider: "codex";
|
|
99
|
+
readonly harness: "native-codex";
|
|
100
|
+
readonly model: "configured-default" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra";
|
|
101
|
+
readonly skillIds: readonly string[];
|
|
102
|
+
}, changedFiles?: PullRequestChangedFilesSource | undefined, skillPrompt?: string | undefined, reportProgress?: RelayReviewProgressReporter | undefined) => Effect.Effect<{
|
|
103
|
+
readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
104
|
+
readonly revisionId: string;
|
|
105
|
+
readonly baseCommit: string;
|
|
106
|
+
readonly headCommit: string;
|
|
107
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
108
|
+
readonly profile: {
|
|
109
|
+
readonly id: string;
|
|
110
|
+
readonly name: string;
|
|
111
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
112
|
+
readonly provider: "codex";
|
|
113
|
+
readonly harness: "native-codex";
|
|
114
|
+
readonly model: "configured-default" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra";
|
|
115
|
+
readonly skillIds: readonly string[];
|
|
116
|
+
};
|
|
117
|
+
readonly result: {
|
|
118
|
+
readonly findings: readonly {
|
|
119
|
+
readonly id: string;
|
|
120
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
121
|
+
readonly title: string;
|
|
122
|
+
readonly summary: string;
|
|
123
|
+
readonly details: string;
|
|
124
|
+
readonly recommendation: string;
|
|
125
|
+
readonly verification: string;
|
|
126
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
127
|
+
readonly location: {
|
|
128
|
+
readonly scope: "general";
|
|
129
|
+
} | {
|
|
130
|
+
readonly scope: "file";
|
|
131
|
+
readonly filePath: string;
|
|
132
|
+
} | {
|
|
133
|
+
readonly scope: "line";
|
|
134
|
+
readonly filePath: string;
|
|
135
|
+
readonly line: number;
|
|
136
|
+
readonly side: "after" | "before";
|
|
137
|
+
};
|
|
138
|
+
}[];
|
|
139
|
+
readonly verdict: string;
|
|
140
|
+
readonly explanation?: string | undefined;
|
|
141
|
+
};
|
|
142
|
+
}, PullRequestReviewError, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
|
|
143
|
+
export declare const relayConversationOutputSchema: (kind: RelayReviewKind) => Schema.Top;
|
|
144
|
+
/** Decode a conversation against the selected review kind without changing its wire shape. */
|
|
145
|
+
export declare const parseRelayConversationResult: (message: string, kind: RelayReviewKind) => Option.Option<{
|
|
146
|
+
readonly reply: string;
|
|
147
|
+
readonly review: {
|
|
148
|
+
readonly findings: readonly {
|
|
149
|
+
readonly id: string;
|
|
150
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
151
|
+
readonly title: string;
|
|
152
|
+
readonly summary: string;
|
|
153
|
+
readonly details: string;
|
|
154
|
+
readonly recommendation: string;
|
|
155
|
+
readonly verification: string;
|
|
156
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
157
|
+
readonly location: {
|
|
158
|
+
readonly scope: "general";
|
|
159
|
+
} | {
|
|
160
|
+
readonly scope: "file";
|
|
161
|
+
readonly filePath: string;
|
|
162
|
+
} | {
|
|
163
|
+
readonly scope: "line";
|
|
164
|
+
readonly filePath: string;
|
|
165
|
+
readonly line: number;
|
|
166
|
+
readonly side: "after" | "before";
|
|
167
|
+
};
|
|
168
|
+
}[];
|
|
169
|
+
readonly verdict: string;
|
|
170
|
+
};
|
|
171
|
+
}>;
|
|
172
|
+
export declare const makeRelayConversationPrompt: (scope: ExactReviewScope, kind: RelayReviewKind, patch: string, skillPrompt: string, currentReview: typeof RelayReviewResult.Type, turns: ReadonlyArray<RelayReviewConversationTurn>, findingId: string, message: string) => string;
|
|
173
|
+
/** Continue a finding conversation while reconciling the complete deck against one exact revision. */
|
|
174
|
+
export declare const continuePullRequestRelayReview: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, profile: {
|
|
175
|
+
readonly id: string;
|
|
176
|
+
readonly name: string;
|
|
177
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
178
|
+
readonly provider: "codex";
|
|
179
|
+
readonly harness: "native-codex";
|
|
180
|
+
readonly model: "configured-default" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra";
|
|
181
|
+
readonly skillIds: readonly string[];
|
|
182
|
+
}, currentReview: {
|
|
183
|
+
readonly findings: readonly {
|
|
184
|
+
readonly id: string;
|
|
185
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
186
|
+
readonly title: string;
|
|
187
|
+
readonly summary: string;
|
|
188
|
+
readonly details: string;
|
|
189
|
+
readonly recommendation: string;
|
|
190
|
+
readonly verification: string;
|
|
191
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
192
|
+
readonly location: {
|
|
193
|
+
readonly scope: "general";
|
|
194
|
+
} | {
|
|
195
|
+
readonly scope: "file";
|
|
196
|
+
readonly filePath: string;
|
|
197
|
+
} | {
|
|
198
|
+
readonly scope: "line";
|
|
199
|
+
readonly filePath: string;
|
|
200
|
+
readonly line: number;
|
|
201
|
+
readonly side: "after" | "before";
|
|
202
|
+
};
|
|
203
|
+
}[];
|
|
204
|
+
readonly verdict: string;
|
|
205
|
+
readonly explanation?: string | undefined;
|
|
206
|
+
}, turns: readonly {
|
|
207
|
+
readonly findingId: string;
|
|
208
|
+
readonly role: "assistant" | "user";
|
|
209
|
+
readonly message: string;
|
|
210
|
+
}[], findingId: string, message: string, changedFiles?: PullRequestChangedFilesSource | undefined, skillPrompt?: string | undefined, reportProgress?: RelayReviewProgressReporter | undefined) => Effect.Effect<{
|
|
211
|
+
review: {
|
|
212
|
+
pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
213
|
+
revisionId: string;
|
|
214
|
+
baseCommit: string & import("effect/Brand").Brand<"CodeCommitCommitId">;
|
|
215
|
+
headCommit: string & import("effect/Brand").Brand<"CodeCommitCommitId">;
|
|
216
|
+
kind: "explain" | "review" | "security" | "tests";
|
|
217
|
+
profile: {
|
|
218
|
+
readonly id: string;
|
|
219
|
+
readonly name: string;
|
|
220
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
221
|
+
readonly provider: "codex";
|
|
222
|
+
readonly harness: "native-codex";
|
|
223
|
+
readonly model: "configured-default" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra";
|
|
224
|
+
readonly skillIds: readonly string[];
|
|
225
|
+
};
|
|
226
|
+
result: {
|
|
227
|
+
readonly findings: readonly {
|
|
228
|
+
readonly id: string;
|
|
229
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
230
|
+
readonly title: string;
|
|
231
|
+
readonly summary: string;
|
|
232
|
+
readonly details: string;
|
|
233
|
+
readonly recommendation: string;
|
|
234
|
+
readonly verification: string;
|
|
235
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
236
|
+
readonly location: {
|
|
237
|
+
readonly scope: "general";
|
|
238
|
+
} | {
|
|
239
|
+
readonly scope: "file";
|
|
240
|
+
readonly filePath: string;
|
|
241
|
+
} | {
|
|
242
|
+
readonly scope: "line";
|
|
243
|
+
readonly filePath: string;
|
|
244
|
+
readonly line: number;
|
|
245
|
+
readonly side: "after" | "before";
|
|
246
|
+
};
|
|
247
|
+
}[];
|
|
248
|
+
readonly verdict: string;
|
|
249
|
+
readonly explanation?: string | undefined;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
reply: string;
|
|
253
|
+
}, PullRequestReviewError, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
|
|
254
|
+
/** Convert one Relay worker into a stream with exactly one terminal event. */
|
|
255
|
+
export declare const streamRelayReviewEventsFrom: <E, R>(run: (report: RelayReviewProgressReporter) => Effect.Effect<{
|
|
256
|
+
readonly review: PullRequestRelayReviewResponse;
|
|
257
|
+
readonly reply?: string;
|
|
258
|
+
}, E, R>) => Stream.Stream<RelayReviewStreamEvent, never, R>;
|
|
259
|
+
/** Stream sanitized progress and one terminal review event. */
|
|
260
|
+
export declare const streamPullRequestRelayReview: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, profile: RelayReviewProfile, changedFiles: PullRequestChangedFilesSource | undefined, skillPrompt: string) => Stream.Stream<{
|
|
261
|
+
readonly type: "progress";
|
|
262
|
+
readonly phase: "agent" | "files" | "patch" | "posting" | "revision" | "validation";
|
|
263
|
+
readonly message: string;
|
|
264
|
+
readonly detail?: string | undefined;
|
|
265
|
+
} | {
|
|
266
|
+
readonly type: "complete";
|
|
267
|
+
readonly review: {
|
|
268
|
+
readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
269
|
+
readonly revisionId: string;
|
|
270
|
+
readonly baseCommit: string;
|
|
271
|
+
readonly headCommit: string;
|
|
272
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
273
|
+
readonly profile: {
|
|
274
|
+
readonly id: string;
|
|
275
|
+
readonly name: string;
|
|
276
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
277
|
+
readonly provider: "codex";
|
|
278
|
+
readonly harness: "native-codex";
|
|
279
|
+
readonly model: "configured-default" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra";
|
|
280
|
+
readonly skillIds: readonly string[];
|
|
281
|
+
};
|
|
282
|
+
readonly result: {
|
|
283
|
+
readonly findings: readonly {
|
|
284
|
+
readonly id: string;
|
|
285
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
286
|
+
readonly title: string;
|
|
287
|
+
readonly summary: string;
|
|
288
|
+
readonly details: string;
|
|
289
|
+
readonly recommendation: string;
|
|
290
|
+
readonly verification: string;
|
|
291
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
292
|
+
readonly location: {
|
|
293
|
+
readonly scope: "general";
|
|
294
|
+
} | {
|
|
295
|
+
readonly scope: "file";
|
|
296
|
+
readonly filePath: string;
|
|
297
|
+
} | {
|
|
298
|
+
readonly scope: "line";
|
|
299
|
+
readonly filePath: string;
|
|
300
|
+
readonly line: number;
|
|
301
|
+
readonly side: "after" | "before";
|
|
302
|
+
};
|
|
303
|
+
}[];
|
|
304
|
+
readonly verdict: string;
|
|
305
|
+
readonly explanation?: string | undefined;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
readonly reply?: string | undefined;
|
|
309
|
+
} | {
|
|
310
|
+
readonly type: "error";
|
|
311
|
+
readonly message: string;
|
|
312
|
+
}, never, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
|
|
313
|
+
/** Stream sanitized progress and one terminal reconciled conversation event. */
|
|
314
|
+
export declare const streamPullRequestRelayConversation: (client: ReadClient.CodeCommitReadClientService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, profile: RelayReviewProfile, currentReview: typeof RelayReviewResult.Type, turns: ReadonlyArray<RelayReviewConversationTurn>, findingId: string, message: string, changedFiles: PullRequestChangedFilesSource | undefined, skillPrompt: string) => Stream.Stream<{
|
|
315
|
+
readonly type: "progress";
|
|
316
|
+
readonly phase: "agent" | "files" | "patch" | "posting" | "revision" | "validation";
|
|
317
|
+
readonly message: string;
|
|
318
|
+
readonly detail?: string | undefined;
|
|
319
|
+
} | {
|
|
320
|
+
readonly type: "complete";
|
|
321
|
+
readonly review: {
|
|
322
|
+
readonly pullRequestId: string & import("effect/Brand").Brand<"PullRequestId">;
|
|
323
|
+
readonly revisionId: string;
|
|
324
|
+
readonly baseCommit: string;
|
|
325
|
+
readonly headCommit: string;
|
|
326
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
327
|
+
readonly profile: {
|
|
328
|
+
readonly id: string;
|
|
329
|
+
readonly name: string;
|
|
330
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
331
|
+
readonly provider: "codex";
|
|
332
|
+
readonly harness: "native-codex";
|
|
333
|
+
readonly model: "configured-default" | "gpt-5.6-luna" | "gpt-5.6-sol" | "gpt-5.6-terra";
|
|
334
|
+
readonly skillIds: readonly string[];
|
|
335
|
+
};
|
|
336
|
+
readonly result: {
|
|
337
|
+
readonly findings: readonly {
|
|
338
|
+
readonly id: string;
|
|
339
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
340
|
+
readonly title: string;
|
|
341
|
+
readonly summary: string;
|
|
342
|
+
readonly details: string;
|
|
343
|
+
readonly recommendation: string;
|
|
344
|
+
readonly verification: string;
|
|
345
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
346
|
+
readonly location: {
|
|
347
|
+
readonly scope: "general";
|
|
348
|
+
} | {
|
|
349
|
+
readonly scope: "file";
|
|
350
|
+
readonly filePath: string;
|
|
351
|
+
} | {
|
|
352
|
+
readonly scope: "line";
|
|
353
|
+
readonly filePath: string;
|
|
354
|
+
readonly line: number;
|
|
355
|
+
readonly side: "after" | "before";
|
|
356
|
+
};
|
|
357
|
+
}[];
|
|
358
|
+
readonly verdict: string;
|
|
359
|
+
readonly explanation?: string | undefined;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
readonly reply?: string | undefined;
|
|
363
|
+
} | {
|
|
364
|
+
readonly type: "error";
|
|
365
|
+
readonly message: string;
|
|
366
|
+
}, never, ChildProcessSpawner.ChildProcessSpawner | FileSystem.FileSystem>;
|
|
367
|
+
/** Accept and immediately post one unchanged finding through the exact-revision review client. */
|
|
368
|
+
export declare const postPullRequestRelayFinding: (client: ReadClient.CodeCommitReadClientService, publisher: RelayFindingPublisherService, pullRequest: Domain.PullRequest, expectedRevision: ExpectedReviewRevision, finding: {
|
|
369
|
+
readonly id: string;
|
|
370
|
+
readonly priority: "P1" | "P2" | "P3" | "P4";
|
|
371
|
+
readonly title: string;
|
|
372
|
+
readonly summary: string;
|
|
373
|
+
readonly details: string;
|
|
374
|
+
readonly recommendation: string;
|
|
375
|
+
readonly verification: string;
|
|
376
|
+
readonly publicationTarget: "line-comment" | "pr-comment";
|
|
377
|
+
readonly location: {
|
|
378
|
+
readonly scope: "general";
|
|
379
|
+
} | {
|
|
380
|
+
readonly scope: "file";
|
|
381
|
+
readonly filePath: string;
|
|
382
|
+
} | {
|
|
383
|
+
readonly scope: "line";
|
|
384
|
+
readonly filePath: string;
|
|
385
|
+
readonly line: number;
|
|
386
|
+
readonly side: "after" | "before";
|
|
387
|
+
};
|
|
388
|
+
}, changedFiles?: PullRequestChangedFilesSource | undefined) => Effect.Effect<{
|
|
389
|
+
findingId: string;
|
|
390
|
+
operationId: string;
|
|
391
|
+
summary: string;
|
|
392
|
+
}, PullRequestReviewError, Crypto.Crypto>;
|
|
393
|
+
export {};
|
|
394
|
+
//# 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,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