@knpkv/codecommit-core 0.11.0 → 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/README.md +44 -3
- package/dist/AwsClient/AwsClientGated.d.ts.map +1 -1
- package/dist/AwsClient/AwsClientGated.js +3 -3
- package/dist/AwsClient/AwsClientGated.js.map +1 -1
- package/dist/AwsClient/approvalRuleContent.js.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.js +4 -4
- package/dist/AwsClient/getCommentsForPullRequest.js.map +1 -1
- package/dist/AwsClient/getDifferences.js +1 -1
- package/dist/AwsClient/getDifferences.js.map +1 -1
- package/dist/AwsClient/getPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequest.js +7 -1
- package/dist/AwsClient/getPullRequest.js.map +1 -1
- package/dist/AwsClient/getPullRequests.d.ts +2 -1
- package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequests.js +14 -12
- package/dist/AwsClient/getPullRequests.js.map +1 -1
- package/dist/AwsClient/index.d.ts +1 -0
- package/dist/AwsClient/index.d.ts.map +1 -1
- package/dist/AwsClient/internal.d.ts +36 -11
- package/dist/AwsClient/internal.d.ts.map +1 -1
- package/dist/AwsClient/internal.js +17 -14
- package/dist/AwsClient/internal.js.map +1 -1
- package/dist/AwsClientConfig/internal/ProfileCredentialProvider.d.ts +18 -0
- package/dist/AwsClientConfig/internal/ProfileCredentialProvider.d.ts.map +1 -0
- package/dist/AwsClientConfig/internal/ProfileCredentialProvider.js +7 -0
- package/dist/AwsClientConfig/internal/ProfileCredentialProvider.js.map +1 -0
- package/dist/AwsClientConfig.d.ts +16 -25
- package/dist/AwsClientConfig.d.ts.map +1 -1
- package/dist/AwsClientConfig.js +37 -0
- package/dist/AwsClientConfig.js.map +1 -1
- package/dist/CacheService/CacheError.js +1 -1
- package/dist/CacheService/CacheError.js.map +1 -1
- package/dist/CacheService/Database.d.ts +5 -4
- package/dist/CacheService/Database.d.ts.map +1 -1
- package/dist/CacheService/Database.js +8 -5
- package/dist/CacheService/Database.js.map +1 -1
- package/dist/CacheService/EventsHub.d.ts +2 -2
- package/dist/CacheService/EventsHub.d.ts.map +1 -1
- package/dist/CacheService/diff.js +2 -2
- package/dist/CacheService/diff.js.map +1 -1
- package/dist/CacheService/internal/PrivateDatabasePathNode.d.ts +34 -0
- package/dist/CacheService/internal/PrivateDatabasePathNode.d.ts.map +1 -0
- package/dist/CacheService/internal/PrivateDatabasePathNode.js +63 -0
- package/dist/CacheService/internal/PrivateDatabasePathNode.js.map +1 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.d.ts +5 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.d.ts.map +1 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.js +4 -0
- package/dist/CacheService/migrations/0016_sandbox_access_password.js.map +1 -0
- package/dist/CacheService/repos/CommentRepo.d.ts +3 -3
- package/dist/CacheService/repos/CommentRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/NotificationRepo.d.ts +3 -3
- package/dist/CacheService/repos/NotificationRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts +108 -108
- package/dist/CacheService/repos/PullRequestRepo/index.d.ts.map +1 -1
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts +106 -106
- package/dist/CacheService/repos/PullRequestRepo/queries.d.ts.map +1 -1
- package/dist/CacheService/repos/SandboxRepo.d.ts +73 -67
- package/dist/CacheService/repos/SandboxRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SandboxRepo.js +3 -2
- package/dist/CacheService/repos/SandboxRepo.js.map +1 -1
- package/dist/CacheService/repos/StatsRepo/index.d.ts +3 -3
- package/dist/CacheService/repos/StatsRepo/index.d.ts.map +1 -1
- package/dist/CacheService/repos/SubscriptionRepo.d.ts +8 -8
- package/dist/CacheService/repos/SubscriptionRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts +3 -3
- package/dist/CacheService/repos/SyncMetadataRepo.d.ts.map +1 -1
- package/dist/CacheService/repos/commentLocations.d.ts.map +1 -1
- package/dist/CacheService/repos/commentLocations.js +9 -8
- package/dist/CacheService/repos/commentLocations.js.map +1 -1
- package/dist/ChildEnv.d.ts +80 -2
- package/dist/ChildEnv.d.ts.map +1 -1
- package/dist/ChildEnv.js +96 -14
- package/dist/ChildEnv.js.map +1 -1
- package/dist/ConfigService/SandboxPolicy.d.ts +37 -0
- package/dist/ConfigService/SandboxPolicy.d.ts.map +1 -0
- package/dist/ConfigService/SandboxPolicy.js +72 -0
- package/dist/ConfigService/SandboxPolicy.js.map +1 -0
- package/dist/ConfigService/index.d.ts +3 -1
- package/dist/ConfigService/index.d.ts.map +1 -1
- package/dist/ConfigService/index.js +10 -2
- package/dist/ConfigService/index.js.map +1 -1
- package/dist/ConfigService/internal.d.ts +15 -0
- package/dist/ConfigService/internal.d.ts.map +1 -1
- package/dist/ConfigService/internal.js +22 -9
- package/dist/ConfigService/internal.js.map +1 -1
- package/dist/ConfigService/load.d.ts +37 -23
- package/dist/ConfigService/load.d.ts.map +1 -1
- package/dist/ConfigService/load.js +2 -2
- package/dist/ConfigService/load.js.map +1 -1
- package/dist/ConfigService/reset.d.ts +36 -22
- package/dist/ConfigService/reset.d.ts.map +1 -1
- package/dist/ConfigService/save.d.ts +36 -22
- package/dist/ConfigService/save.d.ts.map +1 -1
- package/dist/Domain.d.ts +29 -0
- package/dist/Domain.d.ts.map +1 -1
- package/dist/Domain.js +77 -10
- package/dist/Domain.js.map +1 -1
- package/dist/Errors.d.ts +11 -1
- package/dist/Errors.d.ts.map +1 -1
- package/dist/Errors.js +19 -10
- package/dist/Errors.js.map +1 -1
- package/dist/ManagedReviewProtocol.d.ts +5 -0
- package/dist/ManagedReviewProtocol.d.ts.map +1 -0
- package/dist/ManagedReviewProtocol.js +5 -0
- package/dist/ManagedReviewProtocol.js.map +1 -0
- package/dist/MockTransport.d.ts +24 -0
- package/dist/MockTransport.d.ts.map +1 -0
- package/dist/MockTransport.js +58 -0
- package/dist/MockTransport.js.map +1 -0
- package/dist/PRService/index.d.ts +8 -7
- package/dist/PRService/index.d.ts.map +1 -1
- package/dist/PRService/index.js.map +1 -1
- package/dist/PRService/internal.d.ts +31 -31
- package/dist/PRService/internal.d.ts.map +1 -1
- package/dist/PRService/internal.js +5 -5
- package/dist/PRService/internal.js.map +1 -1
- package/dist/PRService/refresh.d.ts.map +1 -1
- package/dist/PRService/refresh.js +12 -3
- package/dist/PRService/refresh.js.map +1 -1
- package/dist/PRService/refreshFetch.d.ts +2 -1
- package/dist/PRService/refreshFetch.d.ts.map +1 -1
- package/dist/PRService/refreshFetch.js +24 -6
- package/dist/PRService/refreshFetch.js.map +1 -1
- package/dist/PRService/refreshResolve.d.ts +6 -6
- package/dist/PRService/refreshResolve.d.ts.map +1 -1
- package/dist/PRService/refreshResolve.js +3 -1
- package/dist/PRService/refreshResolve.js.map +1 -1
- package/dist/PRService/refreshSinglePR.d.ts +7 -1
- package/dist/PRService/refreshSinglePR.d.ts.map +1 -1
- package/dist/PRService/refreshSinglePR.js +8 -5
- package/dist/PRService/refreshSinglePR.js.map +1 -1
- package/dist/PermissionService/AuditLog.d.ts +3 -3
- package/dist/PermissionService/AuditLog.d.ts.map +1 -1
- package/dist/PermissionService/AuditLog.js +2 -2
- package/dist/PermissionService/AuditLog.js.map +1 -1
- package/dist/PermissionService/PermissionGateLive.d.ts +3 -0
- package/dist/PermissionService/PermissionGateLive.d.ts.map +1 -1
- package/dist/PermissionService/PermissionGateLive.js +9 -20
- package/dist/PermissionService/PermissionGateLive.js.map +1 -1
- package/dist/PermissionService/index.d.ts +2 -2
- package/dist/PermissionService/index.d.ts.map +1 -1
- package/dist/PermissionService/index.js +9 -1
- package/dist/PermissionService/index.js.map +1 -1
- package/dist/PermissionService/operations.d.ts +24 -2
- package/dist/PermissionService/operations.d.ts.map +1 -1
- package/dist/PermissionService/operations.js +18 -0
- package/dist/PermissionService/operations.js.map +1 -1
- package/dist/ReadClient/ReadClient.d.ts +18 -3
- package/dist/ReadClient/ReadClient.d.ts.map +1 -1
- package/dist/ReadClient/ReadClient.js +35 -7
- package/dist/ReadClient/ReadClient.js.map +1 -1
- package/dist/ReadClient/ReadProvider.d.ts +6 -0
- package/dist/ReadClient/ReadProvider.d.ts.map +1 -1
- package/dist/ReadClient/ReadProvider.js +4 -3
- package/dist/ReadClient/ReadProvider.js.map +1 -1
- package/dist/ReadClient/errors.js +3 -3
- package/dist/ReadClient/errors.js.map +1 -1
- package/dist/ReadClient/models.d.ts +15 -1
- package/dist/ReadClient/models.d.ts.map +1 -1
- package/dist/ReadClient/models.js +14 -1
- package/dist/ReadClient/models.js.map +1 -1
- package/dist/ReviewClient/ReviewClient.d.ts.map +1 -1
- package/dist/ReviewClient/ReviewClient.js +57 -4
- package/dist/ReviewClient/ReviewClient.js.map +1 -1
- package/dist/ReviewClient/ReviewProvider.d.ts +30 -0
- package/dist/ReviewClient/ReviewProvider.d.ts.map +1 -1
- package/dist/ReviewClient/ReviewProvider.js +67 -5
- package/dist/ReviewClient/ReviewProvider.js.map +1 -1
- package/dist/ReviewClient/errors.d.ts +3 -1
- package/dist/ReviewClient/errors.d.ts.map +1 -1
- package/dist/ReviewClient/errors.js +73 -2
- package/dist/ReviewClient/errors.js.map +1 -1
- package/dist/ReviewClient/index.d.ts +1 -1
- package/dist/ReviewClient/index.d.ts.map +1 -1
- package/dist/ReviewClient/index.js +1 -1
- package/dist/ReviewClient/index.js.map +1 -1
- package/dist/ReviewClient/models.d.ts +38 -1
- package/dist/ReviewClient/models.d.ts.map +1 -1
- package/dist/ReviewClient/models.js +15 -3
- package/dist/ReviewClient/models.js.map +1 -1
- package/dist/ReviewProfile.d.ts +42 -0
- package/dist/ReviewProfile.d.ts.map +1 -0
- package/dist/ReviewProfile.js +75 -0
- package/dist/ReviewProfile.js.map +1 -0
- package/dist/SandboxService/DockerService.d.ts +24 -15
- package/dist/SandboxService/DockerService.d.ts.map +1 -1
- package/dist/SandboxService/DockerService.js +22 -6
- package/dist/SandboxService/DockerService.js.map +1 -1
- package/dist/SandboxService/PluginService.d.ts +2 -2
- package/dist/SandboxService/PluginService.d.ts.map +1 -1
- package/dist/SandboxService/SandboxService.d.ts +88 -73
- package/dist/SandboxService/SandboxService.d.ts.map +1 -1
- package/dist/SandboxService/SandboxService.js +69 -21
- package/dist/SandboxService/SandboxService.js.map +1 -1
- package/dist/SandboxService/SandboxWorkerScope.d.ts +2 -2
- package/dist/SandboxService/SandboxWorkerScope.d.ts.map +1 -1
- package/dist/SandboxService/SandboxWorkerScope.js.map +1 -1
- package/package.json +8 -6
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import * as codecommit from "@distilled.cloud/aws/codecommit";
|
|
8
|
+
import * as sts from "@distilled.cloud/aws/sts";
|
|
8
9
|
import { Context, Effect, Layer } from "effect";
|
|
9
10
|
import { HttpClient } from "effect/unstable/http";
|
|
10
11
|
import { makeApiError, withAwsContext } from "../AwsClient/internal.js";
|
|
@@ -12,7 +13,63 @@ import { AwsClientConfig } from "../AwsClientConfig.js";
|
|
|
12
13
|
/** Injectable raw provider service for CodeCommit review actions. */
|
|
13
14
|
export class CodeCommitReviewProvider extends Context.Service()("@knpkv/codecommit-core/CodeCommitReviewProvider") {
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
/** Non-idempotent merge submissions stay supervised until the provider settles. */
|
|
17
|
+
export const reviewProviderTimeoutPolicy = (operation) => {
|
|
18
|
+
switch (operation) {
|
|
19
|
+
case "mergePullRequestByFastForward":
|
|
20
|
+
case "mergePullRequestBySquash":
|
|
21
|
+
case "mergePullRequestByThreeWay":
|
|
22
|
+
return "none";
|
|
23
|
+
default:
|
|
24
|
+
return "operation";
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const callProvider = (operation, target, effect) => withAwsContext(operation, target.account, effect.pipe(Effect.mapError((cause) => makeApiError(operation, target.account.profile, target.account.region, cause))), reviewProviderTimeoutPolicy(operation) === "none" ? { retry: false, timeout: "none" } : { retry: false });
|
|
28
|
+
const mapRawProviderError = (operation, target) => (cause) => makeApiError(operation, target.account.profile, target.account.region, cause);
|
|
29
|
+
const mergeOperation = (strategy) => {
|
|
30
|
+
switch (strategy) {
|
|
31
|
+
case "fast-forward":
|
|
32
|
+
return "mergePullRequestByFastForward";
|
|
33
|
+
case "squash":
|
|
34
|
+
return "mergePullRequestBySquash";
|
|
35
|
+
case "three-way":
|
|
36
|
+
return "mergePullRequestByThreeWay";
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const liveCodeCommitMergeOperations = {
|
|
40
|
+
getRepository: (repositoryName) => codecommit.getRepository({ repositoryName }),
|
|
41
|
+
getCallerIdentity: () => sts.getCallerIdentity({}),
|
|
42
|
+
mergeFastForward: codecommit.mergePullRequestByFastForward,
|
|
43
|
+
mergeSquash: codecommit.mergePullRequestBySquash,
|
|
44
|
+
mergeThreeWay: codecommit.mergePullRequestByThreeWay
|
|
45
|
+
};
|
|
46
|
+
/** Run preflight identity checks, authorization, and exactly one strategy-specific merge dispatch. */
|
|
47
|
+
export const authorizeAndMerge = (action, authorize, operations) => {
|
|
48
|
+
const operation = mergeOperation(action.strategy);
|
|
49
|
+
const request = makeMergePullRequestRequest(action);
|
|
50
|
+
const mapMergeError = mapRawProviderError(operation, action.target);
|
|
51
|
+
return Effect.gen(function* () {
|
|
52
|
+
const repositoryIdentity = yield* operations.getRepository(action.target.repositoryName).pipe(Effect.mapError(mapRawProviderError("getRepository", action.target)));
|
|
53
|
+
const callerIdentity = yield* operations.getCallerIdentity().pipe(Effect.mapError(mapRawProviderError("getCallerIdentity", action.target)));
|
|
54
|
+
yield* authorize({ callerIdentity, repositoryIdentity });
|
|
55
|
+
switch (action.strategy) {
|
|
56
|
+
case "fast-forward":
|
|
57
|
+
return yield* operations.mergeFastForward(request).pipe(Effect.mapError(mapMergeError));
|
|
58
|
+
case "squash":
|
|
59
|
+
return yield* operations.mergeSquash(request).pipe(Effect.mapError(mapMergeError));
|
|
60
|
+
case "three-way":
|
|
61
|
+
return yield* operations.mergeThreeWay(request).pipe(Effect.mapError(mapMergeError));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Verify caller and repository ownership, then dispatch under one credential snapshot.
|
|
67
|
+
* The authorization callback owns Schema decoding while this provider owns runtime atomicity.
|
|
68
|
+
*/
|
|
69
|
+
const callAuthorizedMerge = (action, authorize) => {
|
|
70
|
+
const operation = mergeOperation(action.strategy);
|
|
71
|
+
return withAwsContext(operation, action.target.account, authorizeAndMerge(action, authorize, liveCodeCommitMergeOperations), { retry: false, timeout: "none" });
|
|
72
|
+
};
|
|
16
73
|
/** Map one decoded comment action to the exact Distilled CodeCommit request. */
|
|
17
74
|
export const makePostCommentForPullRequestRequest = (action) => ({
|
|
18
75
|
pullRequestId: action.target.pullRequestId,
|
|
@@ -21,9 +78,7 @@ export const makePostCommentForPullRequestRequest = (action) => ({
|
|
|
21
78
|
afterCommitId: action.target.sourceCommit,
|
|
22
79
|
content: action.content,
|
|
23
80
|
clientRequestToken: action.clientRequestToken,
|
|
24
|
-
...(action._tag === "comment" && action.location !== undefined
|
|
25
|
-
? { location: action.location }
|
|
26
|
-
: {})
|
|
81
|
+
...((action._tag === "comment" && action.location !== undefined) && { location: action.location })
|
|
27
82
|
});
|
|
28
83
|
/** Map an update action to the exact CodeCommit comment mutation request. */
|
|
29
84
|
export const makeUpdateCommentRequest = (action) => ({
|
|
@@ -36,6 +91,12 @@ export const makePostCommentReplyRequest = (action) => ({
|
|
|
36
91
|
content: action.content,
|
|
37
92
|
clientRequestToken: action.clientRequestToken
|
|
38
93
|
});
|
|
94
|
+
/** Map a merge action to a provider request pinned to the reviewed source commit. */
|
|
95
|
+
export const makeMergePullRequestRequest = (action) => ({
|
|
96
|
+
pullRequestId: action.target.pullRequestId,
|
|
97
|
+
repositoryName: action.target.repositoryName,
|
|
98
|
+
sourceCommitId: action.target.sourceCommit
|
|
99
|
+
});
|
|
39
100
|
/** Live raw provider layer backed by @distilled.cloud/aws CodeCommit operations. */
|
|
40
101
|
export const CodeCommitReviewProviderLive = Layer.effect(CodeCommitReviewProvider, Effect.gen(function* () {
|
|
41
102
|
const config = yield* AwsClientConfig;
|
|
@@ -50,6 +111,7 @@ export const CodeCommitReviewProviderLive = Layer.effect(CodeCommitReviewProvide
|
|
|
50
111
|
revisionId: action.target.revisionId,
|
|
51
112
|
approvalState: action._tag === "approve" ? "APPROVE" : "REVOKE"
|
|
52
113
|
}))),
|
|
114
|
+
mergePullRequest: (action, authorize) => provideRuntime(callAuthorizedMerge(action, authorize)),
|
|
53
115
|
getApprovalStates: (target) => provideRuntime(callProvider("getPullRequestApprovalStates", target, codecommit.getPullRequestApprovalStates({
|
|
54
116
|
pullRequestId: target.pullRequestId,
|
|
55
117
|
revisionId: target.revisionId
|
|
@@ -60,7 +122,7 @@ export const CodeCommitReviewProviderLive = Layer.effect(CodeCommitReviewProvide
|
|
|
60
122
|
beforeCommitId: target.destinationCommit,
|
|
61
123
|
afterCommitId: target.sourceCommit,
|
|
62
124
|
maxResults: 100,
|
|
63
|
-
...(nextToken === null
|
|
125
|
+
...(!(nextToken === null) && { nextToken })
|
|
64
126
|
})))
|
|
65
127
|
};
|
|
66
128
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReviewProvider.js","sourceRoot":"","sources":["../../src/ReviewClient/ReviewProvider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAA;AAG7D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,C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AwsCredentialError, AwsThrottleError } from "../Error
|
|
|
4
4
|
import type { CodeCommitBlobTooLargeError, CodeCommitMalformedResponseError, CodeCommitReadNotFoundError } from "../ReadClient/errors.js";
|
|
5
5
|
declare const CodeCommitReviewConflictError_base: Schema.Class<CodeCommitReviewConflictError, Schema.TaggedStruct<"CodeCommitReviewConflictError", {
|
|
6
6
|
readonly operation: Schema.String;
|
|
7
|
-
readonly reason: Schema.Literals<readonly ["revision-changed", "source-commit-changed", "destination-commit-changed", "destination-reference-changed", "repository-changed", "pull-request-closed", "approval-by-author", "approval-rules-unsatisfied", "merge-conflict"]>;
|
|
7
|
+
readonly reason: Schema.Literals<readonly ["revision-changed", "source-commit-changed", "destination-commit-changed", "destination-reference-changed", "repository-changed", "caller-account-changed", "repository-account-changed", "pull-request-closed", "approval-by-author", "approval-rules-unsatisfied", "merge-conflict"]>;
|
|
8
8
|
}>, import("effect/Cause").YieldableError>;
|
|
9
9
|
/** The authorized immutable pull-request revision is no longer current or actionable. */
|
|
10
10
|
export declare class CodeCommitReviewConflictError extends CodeCommitReviewConflictError_base {
|
|
11
11
|
}
|
|
12
12
|
/** Closed error union for CodeCommit review operations. */
|
|
13
13
|
export type CodeCommitReviewError = AwsCredentialError | AwsThrottleError | AwsApiError | CodeCommitBlobTooLargeError | CodeCommitMalformedResponseError | CodeCommitReadNotFoundError | CodeCommitReviewConflictError;
|
|
14
|
+
/** True only when a raw merge failure does not prove that the provider rejected the mutation. */
|
|
15
|
+
export declare const isAmbiguousMergeProviderError: (error: AwsApiError) => boolean;
|
|
14
16
|
export {};
|
|
15
17
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/ReviewClient/errors.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/ReviewClient/errors.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAa,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACrF,OAAO,KAAK,EACV,2BAA2B,EAC3B,gCAAgC,EAChC,2BAA2B,EAC5B,MAAM,yBAAyB,CAAA;;;;;AAIhC,yFAAyF;AACzF,qBAAa,6BAA8B,SAAQ,kCAkBlD;CAAG;AAEJ,2DAA2D;AAC3D,MAAM,MAAM,qBAAqB,GAC7B,kBAAkB,GAClB,gBAAgB,GAChB,WAAW,GACX,2BAA2B,GAC3B,gCAAgC,GAChC,2BAA2B,GAC3B,6BAA6B,CAAA;AAiEjC,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,UAAW,WAAW,KAAG,OAIlE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** Typed failures produced by the CodeCommit review boundary. @module */
|
|
2
|
-
import { Schema } from "effect";
|
|
2
|
+
import { Predicate, Schema } from "effect";
|
|
3
3
|
const OperationName = Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(100));
|
|
4
4
|
/** The authorized immutable pull-request revision is no longer current or actionable. */
|
|
5
|
-
export class CodeCommitReviewConflictError extends Schema.
|
|
5
|
+
export class CodeCommitReviewConflictError extends Schema.TaggedError()("CodeCommitReviewConflictError", {
|
|
6
6
|
operation: OperationName,
|
|
7
7
|
reason: Schema.Literals([
|
|
8
8
|
"revision-changed",
|
|
@@ -10,6 +10,8 @@ export class CodeCommitReviewConflictError extends Schema.TaggedErrorClass()("Co
|
|
|
10
10
|
"destination-commit-changed",
|
|
11
11
|
"destination-reference-changed",
|
|
12
12
|
"repository-changed",
|
|
13
|
+
"caller-account-changed",
|
|
14
|
+
"repository-account-changed",
|
|
13
15
|
"pull-request-closed",
|
|
14
16
|
"approval-by-author",
|
|
15
17
|
"approval-rules-unsatisfied",
|
|
@@ -17,4 +19,73 @@ export class CodeCommitReviewConflictError extends Schema.TaggedErrorClass()("Co
|
|
|
17
19
|
])
|
|
18
20
|
}) {
|
|
19
21
|
}
|
|
22
|
+
const mergeProviderOperations = new Set([
|
|
23
|
+
"mergePullRequestByFastForward",
|
|
24
|
+
"mergePullRequestBySquash",
|
|
25
|
+
"mergePullRequestByThreeWay"
|
|
26
|
+
]);
|
|
27
|
+
// Modeled provider responses that prove the merge was rejected before mutation.
|
|
28
|
+
// Network, timeout, server, and future unknown tags stay conservative.
|
|
29
|
+
const definitiveMergeRejectionTags = new Set([
|
|
30
|
+
"AccessDeniedException",
|
|
31
|
+
"CommitMessageLengthExceededException",
|
|
32
|
+
"ConcurrentReferenceUpdateException",
|
|
33
|
+
"EncryptionIntegrityChecksFailedException",
|
|
34
|
+
"EncryptionKeyAccessDeniedException",
|
|
35
|
+
"EncryptionKeyDisabledException",
|
|
36
|
+
"EncryptionKeyNotFoundException",
|
|
37
|
+
"EncryptionKeyUnavailableException",
|
|
38
|
+
"ExpiredTokenException",
|
|
39
|
+
"FileContentSizeLimitExceededException",
|
|
40
|
+
"FolderContentSizeLimitExceededException",
|
|
41
|
+
"IncompleteSignature",
|
|
42
|
+
"InvalidCommitIdException",
|
|
43
|
+
"InvalidConflictDetailLevelException",
|
|
44
|
+
"InvalidConflictResolutionException",
|
|
45
|
+
"InvalidConflictResolutionStrategyException",
|
|
46
|
+
"InvalidEmailException",
|
|
47
|
+
"InvalidFileModeException",
|
|
48
|
+
"InvalidPathException",
|
|
49
|
+
"InvalidPullRequestIdException",
|
|
50
|
+
"InvalidReplacementContentException",
|
|
51
|
+
"InvalidReplacementTypeException",
|
|
52
|
+
"InvalidRepositoryNameException",
|
|
53
|
+
"MalformedHttpRequestException",
|
|
54
|
+
"ManualMergeRequiredException",
|
|
55
|
+
"MaximumConflictResolutionEntriesExceededException",
|
|
56
|
+
"MaximumFileContentToLoadExceededException",
|
|
57
|
+
"MaximumItemsToCompareExceededException",
|
|
58
|
+
"MultipleConflictResolutionEntriesException",
|
|
59
|
+
"NameLengthExceededException",
|
|
60
|
+
"NotAuthorized",
|
|
61
|
+
"OptInRequired",
|
|
62
|
+
"PathRequiredException",
|
|
63
|
+
"PullRequestAlreadyClosedException",
|
|
64
|
+
"PullRequestApprovalRulesNotSatisfiedException",
|
|
65
|
+
"PullRequestDoesNotExistException",
|
|
66
|
+
"PullRequestIdRequiredException",
|
|
67
|
+
"ReferenceDoesNotExistException",
|
|
68
|
+
"ReplacementContentRequiredException",
|
|
69
|
+
"ReplacementTypeRequiredException",
|
|
70
|
+
"RepositoryDoesNotExistException",
|
|
71
|
+
"RepositoryNameRequiredException",
|
|
72
|
+
"RepositoryNotAssociatedWithPullRequestException",
|
|
73
|
+
"RequestEntityTooLargeException",
|
|
74
|
+
"RequestExpired",
|
|
75
|
+
"ThrottlingException",
|
|
76
|
+
"TipOfSourceReferenceIsDifferentException",
|
|
77
|
+
"TipsDivergenceExceededException",
|
|
78
|
+
"UnknownOperationException",
|
|
79
|
+
"UnrecognizedClientException",
|
|
80
|
+
"ValidationError",
|
|
81
|
+
"ValidationException"
|
|
82
|
+
]);
|
|
83
|
+
/** True only when a raw merge failure does not prove that the provider rejected the mutation. */
|
|
84
|
+
export const isAmbiguousMergeProviderError = (error) => {
|
|
85
|
+
if (!mergeProviderOperations.has(error.operation))
|
|
86
|
+
return false;
|
|
87
|
+
if (!Predicate.hasProperty(error.cause, "_tag") || !Predicate.isString(error.cause._tag))
|
|
88
|
+
return true;
|
|
89
|
+
return !definitiveMergeRejectionTags.has(error.cause._tag);
|
|
90
|
+
};
|
|
20
91
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/ReviewClient/errors.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../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ACxC,4CAA4C;IAC5C,6BAA6B;IAC7B,eAAe;IACf,eAAe;IACf,uBAAuB;IACvB,mCAAmC;IACnC,+CAA+C;IAC/C,kCAAkC;IAClC,gCAAgC;IAChC,gCAAgC;IAChC,qCAAqC;IACrC,kCAAkC;IAClC,iCAAiC;IACjC,iCAAiC;IACjC,iDAAiD;IACjD,gCAAgC;IAChC,gBAAgB;IAChB,qBAAqB;IACrB,0CAA0C;IAC1C,iCAAiC;IACjC,2BAA2B;IAC3B,6BAA6B;IAC7B,iBAAiB;IACjB,qBAAqB;CACtB,CAAC,CAAA;AAEF,iGAAiG;AACjG,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAkB,EAAW,EAAE;IAC3E,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC;QAAE,OAAO,KAAK,CAAA;IAC/D,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IACrG,OAAO,CAAC,4BAA4B,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC5D,CAAC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Supported CodeCommit
|
|
1
|
+
/** Supported CodeCommit review boundary plus direct receipt-waiting TUI merge; governed servers must exclude merge. @module */
|
|
2
2
|
export * from "./errors.js";
|
|
3
3
|
export * from "./models.js";
|
|
4
4
|
export * from "./ReviewClient.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ReviewClient/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ReviewClient/index.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAC/H,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Supported CodeCommit
|
|
1
|
+
/** Supported CodeCommit review boundary plus direct receipt-waiting TUI merge; governed servers must exclude merge. @module */
|
|
2
2
|
export * from "./errors.js";
|
|
3
3
|
export * from "./models.js";
|
|
4
4
|
export * from "./ReviewClient.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ReviewClient/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ReviewClient/index.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAC/H,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA"}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* @module
|
|
6
6
|
*/
|
|
7
7
|
import { Schema } from "effect";
|
|
8
|
+
/** Native CodeCommit strategy used to merge an exact pull-request head. */
|
|
9
|
+
export declare const CodeCommitMergeStrategy: Schema.Literals<readonly ["fast-forward", "squash", "three-way"]>;
|
|
10
|
+
/** Decoded native CodeCommit pull-request merge strategy. */
|
|
11
|
+
export type CodeCommitMergeStrategy = typeof CodeCommitMergeStrategy.Type;
|
|
8
12
|
/** Exact provider revision against which a review action was authorized. */
|
|
9
13
|
export declare const CodeCommitReviewTarget: Schema.Struct<{
|
|
10
14
|
readonly account: Schema.Struct<{
|
|
@@ -20,6 +24,23 @@ export declare const CodeCommitReviewTarget: Schema.Struct<{
|
|
|
20
24
|
}>;
|
|
21
25
|
/** Decoded immutable review target. */
|
|
22
26
|
export type CodeCommitReviewTarget = typeof CodeCommitReviewTarget.Type;
|
|
27
|
+
/** Merge target additionally bound to the resolved caller and repository-owner accounts. */
|
|
28
|
+
export declare const CodeCommitMergeTarget: Schema.Struct<{
|
|
29
|
+
readonly account: Schema.Struct<{
|
|
30
|
+
readonly profile: Schema.brand<Schema.String, "AwsProfileName">;
|
|
31
|
+
readonly region: Schema.brand<Schema.String, "AwsRegion">;
|
|
32
|
+
}>;
|
|
33
|
+
readonly repositoryName: Schema.brand<Schema.String, "RepositoryName">;
|
|
34
|
+
readonly pullRequestId: Schema.brand<Schema.String, "PullRequestId">;
|
|
35
|
+
readonly revisionId: Schema.String;
|
|
36
|
+
readonly sourceCommit: Schema.brand<Schema.String, "CodeCommitCommitId">;
|
|
37
|
+
readonly destinationCommit: Schema.brand<Schema.String, "CodeCommitCommitId">;
|
|
38
|
+
readonly destinationReference: Schema.String;
|
|
39
|
+
readonly expectedCallerAccountId: Schema.String;
|
|
40
|
+
readonly expectedRepositoryAccountId: Schema.String;
|
|
41
|
+
}>;
|
|
42
|
+
/** Decoded merge target with captured account authority. */
|
|
43
|
+
export type CodeCommitMergeTarget = typeof CodeCommitMergeTarget.Type;
|
|
23
44
|
declare const CodeCommitReviewLocation_base: Schema.Class<CodeCommitReviewLocation, Schema.Struct<{
|
|
24
45
|
readonly filePath: Schema.String;
|
|
25
46
|
readonly filePosition: Schema.Int;
|
|
@@ -28,7 +49,7 @@ declare const CodeCommitReviewLocation_base: Schema.Class<CodeCommitReviewLocati
|
|
|
28
49
|
/** Exact CodeCommit file position for one inline pull-request comment. */
|
|
29
50
|
export declare class CodeCommitReviewLocation extends CodeCommitReviewLocation_base {
|
|
30
51
|
}
|
|
31
|
-
/** Closed set of CodeCommit review mutations supported by the owning package. */
|
|
52
|
+
/** Closed set of CodeCommit pull-request review and merge mutations supported by the owning package. */
|
|
32
53
|
export declare const CodeCommitReviewAction: Schema.toTaggedUnion<"_tag", readonly [Schema.TaggedStruct<"request-review", {
|
|
33
54
|
target: Schema.Struct<{
|
|
34
55
|
readonly account: Schema.Struct<{
|
|
@@ -133,6 +154,22 @@ export declare const CodeCommitReviewAction: Schema.toTaggedUnion<"_tag", readon
|
|
|
133
154
|
readonly destinationCommit: Schema.brand<Schema.String, "CodeCommitCommitId">;
|
|
134
155
|
readonly destinationReference: Schema.String;
|
|
135
156
|
}>;
|
|
157
|
+
}>, Schema.TaggedStruct<"merge", {
|
|
158
|
+
readonly target: Schema.Struct<{
|
|
159
|
+
readonly account: Schema.Struct<{
|
|
160
|
+
readonly profile: Schema.brand<Schema.String, "AwsProfileName">;
|
|
161
|
+
readonly region: Schema.brand<Schema.String, "AwsRegion">;
|
|
162
|
+
}>;
|
|
163
|
+
readonly repositoryName: Schema.brand<Schema.String, "RepositoryName">;
|
|
164
|
+
readonly pullRequestId: Schema.brand<Schema.String, "PullRequestId">;
|
|
165
|
+
readonly revisionId: Schema.String;
|
|
166
|
+
readonly sourceCommit: Schema.brand<Schema.String, "CodeCommitCommitId">;
|
|
167
|
+
readonly destinationCommit: Schema.brand<Schema.String, "CodeCommitCommitId">;
|
|
168
|
+
readonly destinationReference: Schema.String;
|
|
169
|
+
readonly expectedCallerAccountId: Schema.String;
|
|
170
|
+
readonly expectedRepositoryAccountId: Schema.String;
|
|
171
|
+
}>;
|
|
172
|
+
readonly strategy: Schema.Literals<readonly ["fast-forward", "squash", "three-way"]>;
|
|
136
173
|
}>]>;
|
|
137
174
|
/** Decoded CodeCommit review mutation. */
|
|
138
175
|
export type CodeCommitReviewAction = typeof CodeCommitReviewAction.Type;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/ReviewClient/models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAiB/B,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB;;;;;;;;;;;EAQkB,CAAA;AAErD,uCAAuC;AACvC,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAA
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/ReviewClient/models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAiB/B,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,mEAA2D,CAAA;AAE/F,6DAA6D;AAC7D,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAC,IAAI,CAAA;AAEzE,4EAA4E;AAC5E,eAAO,MAAM,sBAAsB;;;;;;;;;;;EAQkB,CAAA;AAErD,uCAAuC;AACvC,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAA;AAEvE,4FAA4F;AAC5F,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;EAIkB,CAAA;AAEpD,4DAA4D;AAC5D,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAA;;;;;;AAErE,0EAA0E;AAC1E,qBAAa,wBAAyB,SAAQ,6BAM5C;CAAG;AAeL,wGAAwG;AACxG,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAeE,CAAA;AAErC,0CAA0C;AAC1C,MAAM,MAAM,sBAAsB,GAAG,OAAO,sBAAsB,CAAC,IAAI,CAAA;;;;;AAEvE,sEAAsE;AACtE,qBAAa,uBAAwB,SAAQ,4BAK3C;CAAG;AAEL,2EAA2E;AAC3E,eAAO,MAAM,8BAA8B;;;;IAIN,CAAA;AAErC,qCAAqC;AACrC,MAAM,MAAM,8BAA8B,GAAG,OAAO,8BAA8B,CAAC,IAAI,CAAA"}
|
|
@@ -13,9 +13,11 @@ const ClientRequestToken = NonEmptyString.check(Schema.isMaxLength(64));
|
|
|
13
13
|
const ReviewRevision = NonEmptyString.check(Schema.isMaxLength(64));
|
|
14
14
|
const ReviewCommitId = CodeCommitCommitId.check(Schema.isMaxLength(64));
|
|
15
15
|
const ReviewReference = NonEmptyString.check(Schema.isMaxLength(256));
|
|
16
|
-
const ReviewFilePath =
|
|
16
|
+
const ReviewFilePath = Schema.String.check(Schema.isNonEmpty(), Schema.isMaxLength(1_024));
|
|
17
17
|
const ReviewFilePosition = Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: Number.MAX_SAFE_INTEGER }));
|
|
18
18
|
const ReviewCommentId = NonEmptyString.check(Schema.isMaxLength(512));
|
|
19
|
+
/** Native CodeCommit strategy used to merge an exact pull-request head. */
|
|
20
|
+
export const CodeCommitMergeStrategy = Schema.Literals(["fast-forward", "squash", "three-way"]);
|
|
19
21
|
/** Exact provider revision against which a review action was authorized. */
|
|
20
22
|
export const CodeCommitReviewTarget = Schema.Struct({
|
|
21
23
|
account: CodeCommitReadAccount,
|
|
@@ -26,6 +28,12 @@ export const CodeCommitReviewTarget = Schema.Struct({
|
|
|
26
28
|
destinationCommit: ReviewCommitId,
|
|
27
29
|
destinationReference: ReviewReference
|
|
28
30
|
}).annotate({ identifier: "CodeCommitReviewTarget" });
|
|
31
|
+
/** Merge target additionally bound to the resolved caller and repository-owner accounts. */
|
|
32
|
+
export const CodeCommitMergeTarget = Schema.Struct({
|
|
33
|
+
...CodeCommitReviewTarget.fields,
|
|
34
|
+
expectedCallerAccountId: NonEmptyString,
|
|
35
|
+
expectedRepositoryAccountId: NonEmptyString
|
|
36
|
+
}).annotate({ identifier: "CodeCommitMergeTarget" });
|
|
29
37
|
/** Exact CodeCommit file position for one inline pull-request comment. */
|
|
30
38
|
export class CodeCommitReviewLocation extends Schema.Class("CodeCommitReviewLocation")({
|
|
31
39
|
filePath: ReviewFilePath,
|
|
@@ -44,7 +52,7 @@ const ExistingCommentActionFields = {
|
|
|
44
52
|
content: BoundedText,
|
|
45
53
|
clientRequestToken: ClientRequestToken
|
|
46
54
|
};
|
|
47
|
-
/** Closed set of CodeCommit review mutations supported by the owning package. */
|
|
55
|
+
/** Closed set of CodeCommit pull-request review and merge mutations supported by the owning package. */
|
|
48
56
|
export const CodeCommitReviewAction = Schema.Union([
|
|
49
57
|
Schema.TaggedStruct("request-review", CommentActionFields),
|
|
50
58
|
Schema.TaggedStruct("comment", {
|
|
@@ -55,7 +63,11 @@ export const CodeCommitReviewAction = Schema.Union([
|
|
|
55
63
|
Schema.TaggedStruct("reply-comment", ExistingCommentActionFields),
|
|
56
64
|
Schema.TaggedStruct("request-changes", CommentActionFields),
|
|
57
65
|
Schema.TaggedStruct("approve", { target: CodeCommitReviewTarget }),
|
|
58
|
-
Schema.TaggedStruct("revoke-approval", { target: CodeCommitReviewTarget })
|
|
66
|
+
Schema.TaggedStruct("revoke-approval", { target: CodeCommitReviewTarget }),
|
|
67
|
+
Schema.TaggedStruct("merge", {
|
|
68
|
+
target: CodeCommitMergeTarget,
|
|
69
|
+
strategy: CodeCommitMergeStrategy
|
|
70
|
+
})
|
|
59
71
|
]).pipe(Schema.toTaggedUnion("_tag"));
|
|
60
72
|
/** Safe provider receipt returned only after a confirmed mutation. */
|
|
61
73
|
export class CodeCommitReviewReceipt extends Schema.Class("CodeCommitReviewReceipt")({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/ReviewClient/models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AACjF,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAEnF,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAA;AACnF,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CA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AAY,CAAC,OAAO,EAAE;QAC3B,MAAM,EAAE,qBAAqB;QAC7B,QAAQ,EAAE,uBAAuB;KAClC,CAAC;CACH,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA;AAKrC,sEAAsE;AACtE,MAAM,OAAO,uBAAwB,SAAQ,MAAM,CAAC,KAAK,CACvD,yBAAyB,CAC1B,CAAC;IACA,WAAW,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC1D,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;CACzD,CAAC;CAAG;AAEL,2EAA2E;AAC3E,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,KAAK,CAAC;IACzD,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,EAAE,CAAC;IAClC,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IACtE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;CAC5F,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Shared persisted and transported Relay review profile contract. @module */
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
/** Maximum prompt-only skills accepted by one persisted review profile. */
|
|
4
|
+
export declare const reviewProfileSkillLimit = 24;
|
|
5
|
+
export declare const ReviewKind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
6
|
+
export type ReviewKind = typeof ReviewKind.Type;
|
|
7
|
+
export declare const reviewKindOptions: readonly ["review", "security", "tests", "explain"];
|
|
8
|
+
export declare const ReviewProvider: Schema.Literals<readonly ["codex"]>;
|
|
9
|
+
export type ReviewProvider = typeof ReviewProvider.Type;
|
|
10
|
+
export declare const ReviewHarness: Schema.Literals<readonly ["native-codex"]>;
|
|
11
|
+
export type ReviewHarness = typeof ReviewHarness.Type;
|
|
12
|
+
export declare const ReviewModel: Schema.Literals<readonly ["configured-default", "gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"]>;
|
|
13
|
+
export type ReviewModel = typeof ReviewModel.Type;
|
|
14
|
+
export declare const reviewProviderOptions: readonly ["codex"];
|
|
15
|
+
export declare const reviewHarnessOptions: readonly ["native-codex"];
|
|
16
|
+
export declare const reviewModelOptions: readonly ["configured-default", "gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"];
|
|
17
|
+
export declare const ReviewProfileConfig: Schema.Struct<{
|
|
18
|
+
readonly id: Schema.String;
|
|
19
|
+
readonly name: Schema.String;
|
|
20
|
+
readonly kind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
21
|
+
readonly provider: Schema.withDecodingDefaultTypeKey<Schema.Literals<readonly ["codex"]>, never>;
|
|
22
|
+
readonly harness: Schema.withDecodingDefaultTypeKey<Schema.Literals<readonly ["native-codex"]>, never>;
|
|
23
|
+
readonly model: Schema.withDecodingDefaultTypeKey<Schema.Literals<readonly ["configured-default", "gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"]>, never>;
|
|
24
|
+
readonly skillIds: Schema.$Array<Schema.String>;
|
|
25
|
+
}>;
|
|
26
|
+
export type ReviewProfileConfig = typeof ReviewProfileConfig.Type;
|
|
27
|
+
export declare const defaultReviewProfiles: ReadonlyArray<ReviewProfileConfig>;
|
|
28
|
+
export declare const ReviewConfig: Schema.Struct<{
|
|
29
|
+
readonly defaultProfileId: Schema.withDecodingDefaultTypeKey<Schema.String, never>;
|
|
30
|
+
readonly profiles: Schema.withDecodingDefaultTypeKey<Schema.$Array<Schema.Struct<{
|
|
31
|
+
readonly id: Schema.String;
|
|
32
|
+
readonly name: Schema.String;
|
|
33
|
+
readonly kind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
34
|
+
readonly provider: Schema.withDecodingDefaultTypeKey<Schema.Literals<readonly ["codex"]>, never>;
|
|
35
|
+
readonly harness: Schema.withDecodingDefaultTypeKey<Schema.Literals<readonly ["native-codex"]>, never>;
|
|
36
|
+
readonly model: Schema.withDecodingDefaultTypeKey<Schema.Literals<readonly ["configured-default", "gpt-5.6-luna", "gpt-5.6-terra", "gpt-5.6-sol"]>, never>;
|
|
37
|
+
readonly skillIds: Schema.$Array<Schema.String>;
|
|
38
|
+
}>>, never>;
|
|
39
|
+
}>;
|
|
40
|
+
export type ReviewConfig = typeof ReviewConfig.Type;
|
|
41
|
+
export declare const defaultReviewConfig: ReviewConfig;
|
|
42
|
+
//# sourceMappingURL=ReviewProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewProfile.d.ts","sourceRoot":"","sources":["../src/ReviewProfile.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvC,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAIzC,eAAO,MAAM,UAAU,sEAA8D,CAAA;AACrF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAC/C,eAAO,MAAM,iBAAiB,qDAAsB,CAAA;AAEpD,eAAO,MAAM,cAAc,qCAA6B,CAAA;AACxD,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,eAAO,MAAM,aAAa,4CAAoC,CAAA;AAC9D,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,WAAW,kGAKtB,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,eAAO,MAAM,qBAAqB,oBAA0B,CAAA;AAC5D,eAAO,MAAM,oBAAoB,2BAAyB,CAAA;AAC1D,eAAO,MAAM,kBAAkB,iFAAuB,CAAA;AAEtD,eAAO,MAAM,mBAAmB;;;;;;;;EAe9B,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAEjE,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,mBAAmB,CAqCpE,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;EAkBxB,CAAA;AACD,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AAEnD,eAAO,MAAM,mBAAmB,EAAE,YAGjC,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/** Shared persisted and transported Relay review profile contract. @module */
|
|
2
|
+
import { Effect, Schema } from "effect";
|
|
3
|
+
/** Maximum prompt-only skills accepted by one persisted review profile. */
|
|
4
|
+
export const reviewProfileSkillLimit = 24;
|
|
5
|
+
const decodingDefault = (value) => Effect.succeed(value);
|
|
6
|
+
export const ReviewKind = Schema.Literals(["review", "security", "tests", "explain"]);
|
|
7
|
+
export const reviewKindOptions = ReviewKind.literals;
|
|
8
|
+
export const ReviewProvider = Schema.Literals(["codex"]);
|
|
9
|
+
export const ReviewHarness = Schema.Literals(["native-codex"]);
|
|
10
|
+
export const ReviewModel = Schema.Literals([
|
|
11
|
+
"configured-default",
|
|
12
|
+
"gpt-5.6-luna",
|
|
13
|
+
"gpt-5.6-terra",
|
|
14
|
+
"gpt-5.6-sol"
|
|
15
|
+
]);
|
|
16
|
+
export const reviewProviderOptions = ReviewProvider.literals;
|
|
17
|
+
export const reviewHarnessOptions = ReviewHarness.literals;
|
|
18
|
+
export const reviewModelOptions = ReviewModel.literals;
|
|
19
|
+
export const ReviewProfileConfig = Schema.Struct({
|
|
20
|
+
id: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(64), Schema.isPattern(/^[a-z][a-z0-9-]*$/u)),
|
|
21
|
+
name: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(80)),
|
|
22
|
+
kind: ReviewKind,
|
|
23
|
+
provider: ReviewProvider.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault("codex"))),
|
|
24
|
+
harness: ReviewHarness.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault("native-codex"))),
|
|
25
|
+
model: ReviewModel.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault("configured-default"))),
|
|
26
|
+
skillIds: Schema.Array(Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(256))).check(Schema.isMaxLength(reviewProfileSkillLimit), Schema.isUnique())
|
|
27
|
+
});
|
|
28
|
+
export const defaultReviewProfiles = [
|
|
29
|
+
{
|
|
30
|
+
id: "thorough",
|
|
31
|
+
name: "Thorough review",
|
|
32
|
+
kind: "review",
|
|
33
|
+
provider: "codex",
|
|
34
|
+
harness: "native-codex",
|
|
35
|
+
model: "configured-default",
|
|
36
|
+
skillIds: ["builtin:pr-review", "builtin:pr-review-diff"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "security",
|
|
40
|
+
name: "Security review",
|
|
41
|
+
kind: "security",
|
|
42
|
+
provider: "codex",
|
|
43
|
+
harness: "native-codex",
|
|
44
|
+
model: "configured-default",
|
|
45
|
+
skillIds: ["builtin:pr-review-diff"]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "tests",
|
|
49
|
+
name: "Test review",
|
|
50
|
+
kind: "tests",
|
|
51
|
+
provider: "codex",
|
|
52
|
+
harness: "native-codex",
|
|
53
|
+
model: "configured-default",
|
|
54
|
+
skillIds: ["builtin:pr-review-diff"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "explain",
|
|
58
|
+
name: "Explain change",
|
|
59
|
+
kind: "explain",
|
|
60
|
+
provider: "codex",
|
|
61
|
+
harness: "native-codex",
|
|
62
|
+
model: "configured-default",
|
|
63
|
+
skillIds: []
|
|
64
|
+
}
|
|
65
|
+
];
|
|
66
|
+
export const ReviewConfig = Schema.Struct({
|
|
67
|
+
defaultProfileId: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(64), Schema.isPattern(/^[a-z][a-z0-9-]*$/u)).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault("thorough"))),
|
|
68
|
+
profiles: Schema.Array(ReviewProfileConfig).check(Schema.isMinLength(1), Schema.isMaxLength(12)).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(defaultReviewProfiles)))
|
|
69
|
+
}).check(Schema.makeFilter(({ defaultProfileId, profiles }) => new Set(profiles.map(({ id }) => id)).size === profiles.length &&
|
|
70
|
+
profiles.some(({ id }) => id === defaultProfileId), { expected: "unique review profile ids containing the default profile" }));
|
|
71
|
+
export const defaultReviewConfig = {
|
|
72
|
+
defaultProfileId: "thorough",
|
|
73
|
+
profiles: defaultReviewProfiles
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=ReviewProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewProfile.js","sourceRoot":"","sources":["../src/ReviewProfile.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEvC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAEzC,MAAM,eAAe,GAAG,CAAI,KAAQ,EAAwC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAEpG,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;AAErF,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC,QAAQ,CAA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