@knpkv/codecommit-core 0.10.1 → 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.
- package/README.md +44 -3
- package/dist/AwsClient/approvalRuleContent.js.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts +3 -1
- package/dist/AwsClient/getCommentsForPullRequest.d.ts.map +1 -1
- package/dist/AwsClient/getCommentsForPullRequest.js +14 -7
- 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 +1 -1
- package/dist/AwsClient/getPullRequests.d.ts.map +1 -1
- package/dist/AwsClient/getPullRequests.js +6 -7
- package/dist/AwsClient/getPullRequests.js.map +1 -1
- package/dist/AwsClient/internal.d.ts +7 -3
- package/dist/AwsClient/internal.d.ts.map +1 -1
- package/dist/AwsClient/internal.js +15 -5
- package/dist/AwsClient/internal.js.map +1 -1
- package/dist/AwsClient/listBranches.d.ts.map +1 -1
- package/dist/AwsClient/listBranches.js +1 -1
- package/dist/AwsClient/listBranches.js.map +1 -1
- package/dist/AwsClientConfig.d.ts +3 -3
- package/dist/AwsClientConfig.d.ts.map +1 -1
- 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 +1 -1
- package/dist/CacheService/repos/commentLocations.d.ts.map +1 -1
- package/dist/CacheService/repos/commentLocations.js +15 -79
- package/dist/CacheService/repos/commentLocations.js.map +1 -1
- package/dist/ChildEnv.d.ts +67 -2
- package/dist/ChildEnv.d.ts.map +1 -1
- package/dist/ChildEnv.js +47 -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 +33 -0
- package/dist/ConfigService/internal.d.ts.map +1 -1
- package/dist/ConfigService/internal.js +64 -9
- package/dist/ConfigService/internal.js.map +1 -1
- package/dist/ConfigService/load.d.ts +34 -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 +33 -22
- package/dist/ConfigService/reset.d.ts.map +1 -1
- package/dist/ConfigService/save.d.ts +33 -22
- package/dist/ConfigService/save.d.ts.map +1 -1
- package/dist/Domain.d.ts +17 -1
- package/dist/Domain.d.ts.map +1 -1
- package/dist/Domain.js +15 -6
- 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/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 +2 -2
- package/dist/PRService/refresh.d.ts.map +1 -1
- package/dist/PRService/refresh.js +22 -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 +34 -5
- 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 +17 -5
- package/dist/ReviewClient/models.js.map +1 -1
- package/dist/ReviewProfile.d.ts +3 -0
- package/dist/ReviewProfile.d.ts.map +1 -0
- package/dist/ReviewProfile.js +3 -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 +7 -6
package/dist/ChildEnv.js
CHANGED
|
@@ -42,19 +42,24 @@
|
|
|
42
42
|
* same paths, so clearing them would point the child at a different file and
|
|
43
43
|
* break legitimate custom config locations.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* tombstone and the AWS CLI
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
45
|
+
* CASE INSENSITIVITY. Clearing works by mapping each name to `undefined` in an
|
|
46
|
+
* object merged over the inherited environment, and that merge matches keys
|
|
47
|
+
* exactly. Windows environment names are case-insensitive, so a host exporting
|
|
48
|
+
* `Aws_Access_Key_Id` would keep that entry alive beside the `AWS_ACCESS_KEY_ID`
|
|
49
|
+
* tombstone and the AWS CLI could still read it. `profileScopedEnv` therefore
|
|
50
|
+
* takes the inherited environment and tombstones the spellings actually present
|
|
51
|
+
* as well as the canonical names, which closes the gap without taking `PATH` and
|
|
52
|
+
* every other inherited variable into this module's hands: the spawn stays
|
|
53
|
+
* `extendEnv: true`.
|
|
54
|
+
*
|
|
55
|
+
* The folding is unconditional, on every platform. On POSIX a lowercase
|
|
56
|
+
* `aws_access_key_id` is a genuinely distinct variable that the AWS chain never
|
|
57
|
+
* reads, so dropping it is broader than strictly required — deliberately, because
|
|
58
|
+
* detecting a case-insensitive host would mean reading the platform from this
|
|
59
|
+
* module, and a variable differing only in case carries the same intent. Nothing
|
|
60
|
+
* we spawn (`git`, `aws`, `assume`, `docker`) reads the lowercase spellings.
|
|
57
61
|
*/
|
|
62
|
+
import { Context, Layer } from "effect";
|
|
58
63
|
const OVERRIDING_AWS_VARIABLES = [
|
|
59
64
|
"AWS_ACCESS_KEY_ID",
|
|
60
65
|
"AWS_SECRET_ACCESS_KEY",
|
|
@@ -67,25 +72,53 @@ const OVERRIDING_AWS_VARIABLES = [
|
|
|
67
72
|
"AWS_REGION",
|
|
68
73
|
"AWS_DEFAULT_REGION"
|
|
69
74
|
];
|
|
75
|
+
/** Whether an inherited name denotes an overriding AWS variable under any casing. */
|
|
76
|
+
const isOverridingAwsVariable = (name) => {
|
|
77
|
+
// `toUpperCase`, not `toLocaleUpperCase`: these names are ASCII and a Turkish
|
|
78
|
+
// locale would fold `AWS_..._ID` differently, reintroducing the gap it closes.
|
|
79
|
+
const canonical = name.toUpperCase();
|
|
80
|
+
return OVERRIDING_AWS_VARIABLES.some((candidate) => candidate === canonical);
|
|
81
|
+
};
|
|
70
82
|
/**
|
|
71
83
|
* Builds a child environment where `overrides` are the only AWS credential and
|
|
72
84
|
* region inputs, dropping any ambient values that would outrank them.
|
|
73
85
|
*
|
|
86
|
+
* `inherited` is the environment the child will extend. It is read only to find
|
|
87
|
+
* which spellings of the overriding names are actually present, so a
|
|
88
|
+
* case-insensitive host cannot keep `Aws_Access_Key_Id` alive beside the
|
|
89
|
+
* canonical tombstone. Pass the environment the spawn will really inherit —
|
|
90
|
+
* `HostEnvironment.variables` at a runtime call site.
|
|
91
|
+
*
|
|
74
92
|
* Must be paired with `extendEnv: true`; on its own it does not carry `PATH`.
|
|
75
93
|
*
|
|
76
94
|
* @example
|
|
77
95
|
* ```ts
|
|
96
|
+
* const host = yield* ChildEnv.HostEnvironment
|
|
78
97
|
* ChildProcess.make("git", args, {
|
|
79
|
-
* env: ChildEnv.profileScopedEnv({ AWS_PROFILE: profile }),
|
|
98
|
+
* env: ChildEnv.profileScopedEnv(host.variables, { AWS_PROFILE: profile }),
|
|
80
99
|
* extendEnv: true
|
|
81
100
|
* })
|
|
82
101
|
* ```
|
|
83
102
|
*/
|
|
84
|
-
export const profileScopedEnv = (overrides) => {
|
|
103
|
+
export const profileScopedEnv = (inherited, overrides) => {
|
|
85
104
|
const cleared = {};
|
|
86
105
|
for (const name of OVERRIDING_AWS_VARIABLES) {
|
|
87
106
|
cleared[name] = undefined;
|
|
88
107
|
}
|
|
108
|
+
for (const name of Object.keys(inherited)) {
|
|
109
|
+
if (isOverridingAwsVariable(name))
|
|
110
|
+
cleared[name] = undefined;
|
|
111
|
+
}
|
|
89
112
|
return { ...cleared, ...overrides };
|
|
90
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* The environment a spawned child will inherit.
|
|
116
|
+
*
|
|
117
|
+
* A service rather than a direct read because only the executable boundary may
|
|
118
|
+
* touch the host process, while the spawns that need it sit deep in the runtime.
|
|
119
|
+
*/
|
|
120
|
+
export class HostEnvironment extends Context.Service()("@knpkv/codecommit-core/ChildEnv/HostEnvironment") {
|
|
121
|
+
}
|
|
122
|
+
/** Binds the inherited environment read at the executable boundary. */
|
|
123
|
+
export const layerHostEnvironment = (variables) => Layer.succeed(HostEnvironment, HostEnvironment.of({ variables }));
|
|
91
124
|
//# sourceMappingURL=ChildEnv.js.map
|
package/dist/ChildEnv.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChildEnv.js","sourceRoot":"","sources":["../src/ChildEnv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH
|
|
1
|
+
{"version":3,"file":"ChildEnv.js","sourceRoot":"","sources":["../src/ChildEnv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAEvC,MAAM,wBAAwB,GAA0B;IACtD,mBAAmB;IACnB,uBAAuB;IACvB,mBAAmB;IACnB,oBAAoB;IACpB,2BAA2B;IAC3B,cAAc;IACd,6BAA6B;IAC7B,uBAAuB;IACvB,YAAY;IACZ,oBAAoB;CACrB,CAAA;AAED,qFAAqF;AACrF,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAW,EAAE;IACxD,8EAA8E;IAC9E,+EAA+E;IAC/E,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;IACpC,OAAO,wBAAwB,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,SAAS,CAAC,CAAA;AAC9E,CAAC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,SAA6C,EAC7C,SAA6C,EAC7C,EAAE;IACF,MAAM,OAAO,GAAuC,EAAE,CAAA;IACtD,KAAK,MAAM,IAAI,IAAI,wBAAwB,EAAE,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IAC3B,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAC1C,IAAI,uBAAuB,CAAC,IAAI,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IAC9D,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,SAAS,EAAE,CAAA;AACrC,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO,CAAC,OAAO,EAEhD,CAAC,iDAAiD,CAAC;CAAG;AAE1D,uEAAuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAA6C,EACf,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import * as FileSystem from "effect/FileSystem";
|
|
3
|
+
import * as Path from "effect/Path";
|
|
4
|
+
import { SandboxConfigurationError } from "../Errors.js";
|
|
5
|
+
/** Dedicated host root for explicit sandbox volume sharing. */
|
|
6
|
+
export declare const sandboxVolumeRoot: (homePath: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Validate all authority-bearing sandbox settings at a persistence or execution boundary.
|
|
9
|
+
*/
|
|
10
|
+
export declare const validateSandboxConfig: (config: {
|
|
11
|
+
readonly image: string;
|
|
12
|
+
readonly extensions: readonly string[];
|
|
13
|
+
readonly setupCommands: readonly string[];
|
|
14
|
+
readonly env: {
|
|
15
|
+
readonly [x: string]: string;
|
|
16
|
+
};
|
|
17
|
+
readonly volumeMounts: readonly {
|
|
18
|
+
readonly hostPath: string;
|
|
19
|
+
readonly containerPath: string;
|
|
20
|
+
readonly readonly: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
readonly cloneDepth: number;
|
|
23
|
+
}, homePath: string) => Effect.Effect<{
|
|
24
|
+
readonly image: string;
|
|
25
|
+
readonly extensions: readonly string[];
|
|
26
|
+
readonly setupCommands: readonly string[];
|
|
27
|
+
readonly env: {
|
|
28
|
+
readonly [x: string]: string;
|
|
29
|
+
};
|
|
30
|
+
readonly volumeMounts: readonly {
|
|
31
|
+
readonly hostPath: string;
|
|
32
|
+
readonly containerPath: string;
|
|
33
|
+
readonly readonly: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
readonly cloneDepth: number;
|
|
36
|
+
}, SandboxConfigurationError, FileSystem.FileSystem | Path.Path>;
|
|
37
|
+
//# sourceMappingURL=SandboxPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SandboxPolicy.d.ts","sourceRoot":"","sources":["../../src/ConfigService/SandboxPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAaxD,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,aAAc,MAAM,KAAG,MAAmD,CAAA;AAExG;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;gEAkFjC,CAAA"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import * as FileSystem from "effect/FileSystem";
|
|
3
|
+
import * as Path from "effect/Path";
|
|
4
|
+
import { SandboxConfigurationError } from "../Errors.js";
|
|
5
|
+
const digestPinnedImage = /@sha256:[0-9a-f]{64}$/u;
|
|
6
|
+
const environmentVariableName = /^[A-Za-z_][A-Za-z0-9_]*$/u;
|
|
7
|
+
const reservedEnvironmentKeys = new Set(["HASHED_PASSWORD", "PASSWORD"]);
|
|
8
|
+
const permittedContainerRoots = ["/home/coder", "/tmp/.local/share/code-server"];
|
|
9
|
+
const reject = (message) => new SandboxConfigurationError({ message });
|
|
10
|
+
const expandHome = (input, homePath) => input === "~" ? homePath : input.startsWith("~/") ? `${homePath}${input.slice(1)}` : input;
|
|
11
|
+
/** Dedicated host root for explicit sandbox volume sharing. */
|
|
12
|
+
export const sandboxVolumeRoot = (homePath) => `${homePath}/.codecommit/sandbox-volumes`;
|
|
13
|
+
/**
|
|
14
|
+
* Validate all authority-bearing sandbox settings at a persistence or execution boundary.
|
|
15
|
+
*/
|
|
16
|
+
export const validateSandboxConfig = Effect.fn("SandboxPolicy.validateSandboxConfig")(function* (config, homePath) {
|
|
17
|
+
const path = yield* Path.Path;
|
|
18
|
+
const fileSystem = yield* FileSystem.FileSystem;
|
|
19
|
+
if (!digestPinnedImage.test(config.image)) {
|
|
20
|
+
return yield* reject("Sandbox image must be pinned to an immutable sha256 digest");
|
|
21
|
+
}
|
|
22
|
+
for (const [key, value] of Object.entries(config.env)) {
|
|
23
|
+
if (!environmentVariableName.test(key)) {
|
|
24
|
+
return yield* reject(`Sandbox environment variable ${key} has an invalid name`);
|
|
25
|
+
}
|
|
26
|
+
if (reservedEnvironmentKeys.has(key.toUpperCase())) {
|
|
27
|
+
return yield* reject(`Sandbox environment variable ${key} is reserved`);
|
|
28
|
+
}
|
|
29
|
+
if (/\r|\n/u.test(value)) {
|
|
30
|
+
return yield* reject(`Sandbox environment variable ${key} must be a single line`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const resolvedHomePath = path.resolve(homePath);
|
|
34
|
+
const allowedRoot = path.resolve(sandboxVolumeRoot(resolvedHomePath));
|
|
35
|
+
for (const mount of config.volumeMounts) {
|
|
36
|
+
const hostPath = path.resolve(expandHome(mount.hostPath, homePath));
|
|
37
|
+
const relativeHostPath = path.relative(allowedRoot, hostPath);
|
|
38
|
+
if (relativeHostPath === "" ||
|
|
39
|
+
relativeHostPath === ".." ||
|
|
40
|
+
relativeHostPath.startsWith(`..${path.sep}`) ||
|
|
41
|
+
path.isAbsolute(relativeHostPath)) {
|
|
42
|
+
return yield* reject(`Sandbox mount ${mount.hostPath} must be a child of ~/.codecommit/sandbox-volumes`);
|
|
43
|
+
}
|
|
44
|
+
const canonicalRoot = yield* fileSystem.realPath(allowedRoot).pipe(Effect.mapError(() => reject("Sandbox volume root must exist before adding mounts")));
|
|
45
|
+
const canonicalHomePath = yield* fileSystem.realPath(resolvedHomePath).pipe(Effect.mapError(() => reject("Sandbox home directory must exist before adding mounts")));
|
|
46
|
+
const expectedCanonicalRoot = path.resolve(canonicalHomePath, ".codecommit", "sandbox-volumes");
|
|
47
|
+
if (canonicalRoot !== expectedCanonicalRoot) {
|
|
48
|
+
return yield* reject("Sandbox volume root must not redirect outside ~/.codecommit/sandbox-volumes");
|
|
49
|
+
}
|
|
50
|
+
const canonicalHostPath = yield* fileSystem.realPath(hostPath).pipe(Effect.mapError(() => reject(`Sandbox mount ${mount.hostPath} must already exist`)));
|
|
51
|
+
const relativeCanonicalPath = path.relative(canonicalRoot, canonicalHostPath);
|
|
52
|
+
if (relativeCanonicalPath === "" ||
|
|
53
|
+
relativeCanonicalPath === ".." ||
|
|
54
|
+
relativeCanonicalPath.startsWith(`..${path.sep}`) ||
|
|
55
|
+
path.isAbsolute(relativeCanonicalPath)) {
|
|
56
|
+
return yield* reject(`Sandbox mount ${mount.hostPath} must resolve inside ~/.codecommit/sandbox-volumes`);
|
|
57
|
+
}
|
|
58
|
+
const containerPath = path.normalize(mount.containerPath);
|
|
59
|
+
const isPermittedContainerChild = permittedContainerRoots.some((root) => {
|
|
60
|
+
const relativeContainerPath = path.relative(root, containerPath);
|
|
61
|
+
return relativeContainerPath !== "" &&
|
|
62
|
+
relativeContainerPath !== ".." &&
|
|
63
|
+
!relativeContainerPath.startsWith(`..${path.sep}`) &&
|
|
64
|
+
!path.isAbsolute(relativeContainerPath);
|
|
65
|
+
});
|
|
66
|
+
if (!isPermittedContainerChild) {
|
|
67
|
+
return yield* reject(`Sandbox mount target ${mount.containerPath} must be a child of /home/coder or the code-server runtime data root`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return config;
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=SandboxPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SandboxPolicy.js","sourceRoot":"","sources":["../../src/ConfigService/SandboxPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAGxD,MAAM,iBAAiB,GAAG,wBAAwB,CAAA;AAClD,MAAM,uBAAuB,GAAG,2BAA2B,CAAA;AAC3D,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAA;AACxE,MAAM,uBAAuB,GAAG,CAAC,aAAa,EAAE,+BAA+B,CAAC,CAAA;AAEhF,MAAM,MAAM,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AAE9E,MAAM,UAA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AA;QAC3C,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,yBAAyB,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAC,CAAC,MAAM,CAClB,wBAAwB,KAAK,CAAC,aAAa,sEAAsE,CAClH,CAAA;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC,CACF,CAAA"}
|
|
@@ -10,8 +10,10 @@ import type * as Path from "effect/Path";
|
|
|
10
10
|
import { EventsHub } from "../CacheService/EventsHub.js";
|
|
11
11
|
import type { DetectedProfile, TuiConfig } from "./internal.js";
|
|
12
12
|
import type { ConfigValidationResult } from "./validate.js";
|
|
13
|
+
export { reviewProfileSkillLimit } from "../ReviewProfile.js";
|
|
13
14
|
export { discoverAwsProfiles } from "./detectProfiles.js";
|
|
14
|
-
export { AccountConfig, defaultSandboxConfig, DetectedProfile, SandboxConfig, TuiConfig } from "./internal.js";
|
|
15
|
+
export { AccountConfig, defaultReviewConfig, defaultReviewProfiles, defaultSandboxConfig, defaultSandboxImage, DetectedProfile, ReviewConfig, ReviewKind, ReviewProfileConfig, SandboxConfig, TuiConfig } from "./internal.js";
|
|
16
|
+
export { sandboxVolumeRoot, validateSandboxConfig } from "./SandboxPolicy.js";
|
|
15
17
|
export { ConfigValidationResult } from "./validate.js";
|
|
16
18
|
declare const ConfigService_base: Context.ServiceClass<ConfigService, "@knpkv/codecommit-core/ConfigService", {
|
|
17
19
|
readonly load: Effect.Effect<TuiConfig, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ConfigService/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAU,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AACvD,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,KAAK,IAAI,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE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AAC,MAAM,EAAE,OAAO,CAAC;oBAC/B,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC;uBAC9B,MAAM,CAAC,MAAM,CAAC,sBAAsB,EAAE,OAAO,CAAC;;AATrE,qBAAa,aAAc,SAAQ,kBAWQ;CAAG;AAwC9C,eAAO,MAAM,iBAAiB,kFAkCQ,CAAA"}
|
|
@@ -12,10 +12,13 @@ import { detectProfiles } from "./detectProfiles.js";
|
|
|
12
12
|
import { ConfigPaths } from "./internal.js";
|
|
13
13
|
import { makeLoad } from "./load.js";
|
|
14
14
|
import { makeReset } from "./reset.js";
|
|
15
|
+
import { validateSandboxConfig } from "./SandboxPolicy.js";
|
|
15
16
|
import { save } from "./save.js";
|
|
16
17
|
import { validate } from "./validate.js";
|
|
18
|
+
export { reviewProfileSkillLimit } from "../ReviewProfile.js";
|
|
17
19
|
export { discoverAwsProfiles } from "./detectProfiles.js";
|
|
18
|
-
export { AccountConfig, defaultSandboxConfig, DetectedProfile, SandboxConfig, TuiConfig } from "./internal.js";
|
|
20
|
+
export { AccountConfig, defaultReviewConfig, defaultReviewProfiles, defaultSandboxConfig, defaultSandboxImage, DetectedProfile, ReviewConfig, ReviewKind, ReviewProfileConfig, SandboxConfig, TuiConfig } from "./internal.js";
|
|
21
|
+
export { sandboxVolumeRoot, validateSandboxConfig } from "./SandboxPolicy.js";
|
|
19
22
|
export { ConfigValidationResult } from "./validate.js";
|
|
20
23
|
// ---------------------------------------------------------------------------
|
|
21
24
|
// Service Definition
|
|
@@ -41,7 +44,12 @@ export const ConfigServiceLive = Layer.effect(ConfigService, Effect.gen(function
|
|
|
41
44
|
const reset = makeReset(detectProfilesLive);
|
|
42
45
|
return {
|
|
43
46
|
load: provide(load),
|
|
44
|
-
save: (config) => provide(
|
|
47
|
+
save: (config) => provide(Effect.gen(function* () {
|
|
48
|
+
const paths = yield* ConfigPaths;
|
|
49
|
+
const homePath = yield* paths.homePath;
|
|
50
|
+
yield* validateSandboxConfig(config.sandbox, homePath);
|
|
51
|
+
yield* save(config);
|
|
52
|
+
})).pipe(Effect.tap(() => hub.publish({ _tag: "Config" }))),
|
|
45
53
|
detectProfiles: provide(detectProfilesLive),
|
|
46
54
|
getConfigPath: provide(ConfigPaths.pipe(Effect.flatMap((p) => p.configPath))),
|
|
47
55
|
backup: provide(backup),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ConfigService/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAGvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ConfigService/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAGvD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACj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AAQ,CAAC;KAC5B,CAAA;AACH,CAAC,CAAC,CACH,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAA"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Context, Effect, Schema } from "effect";
|
|
5
5
|
import type { ConfigError, ProfileDetectionError } from "../Errors.js";
|
|
6
|
+
export declare const defaultSandboxImage = "codercom/code-server@sha256:b88ed46a6ace76a0294a17a24f39aa88032ed0a3692c3d8ab5433b47ab57ccbf";
|
|
6
7
|
declare const DetectedProfile_base: Schema.Class<DetectedProfile, Schema.Struct<{
|
|
7
8
|
readonly name: Schema.brand<Schema.NonEmptyString, "AwsProfileName">;
|
|
8
9
|
readonly region: Schema.optionalKey<Schema.brand<Schema.String, "AwsRegion">>;
|
|
@@ -29,6 +30,27 @@ export declare const AccountConfig: Schema.Struct<{
|
|
|
29
30
|
readonly enabled: Schema.withDecodingDefaultTypeKey<Schema.Boolean, never>;
|
|
30
31
|
}>;
|
|
31
32
|
export type AccountConfig = typeof AccountConfig.Type;
|
|
33
|
+
export declare const ReviewKind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
34
|
+
export type ReviewKind = typeof ReviewKind.Type;
|
|
35
|
+
export declare const ReviewProfileConfig: Schema.Struct<{
|
|
36
|
+
readonly id: Schema.String;
|
|
37
|
+
readonly name: Schema.String;
|
|
38
|
+
readonly kind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
39
|
+
readonly skillIds: Schema.$Array<Schema.String>;
|
|
40
|
+
}>;
|
|
41
|
+
export type ReviewProfileConfig = typeof ReviewProfileConfig.Type;
|
|
42
|
+
export declare const defaultReviewProfiles: ReadonlyArray<ReviewProfileConfig>;
|
|
43
|
+
export declare const ReviewConfig: Schema.Struct<{
|
|
44
|
+
readonly defaultProfileId: Schema.withDecodingDefaultTypeKey<Schema.String, never>;
|
|
45
|
+
readonly profiles: Schema.withDecodingDefaultTypeKey<Schema.$Array<Schema.Struct<{
|
|
46
|
+
readonly id: Schema.String;
|
|
47
|
+
readonly name: Schema.String;
|
|
48
|
+
readonly kind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
49
|
+
readonly skillIds: Schema.$Array<Schema.String>;
|
|
50
|
+
}>>, never>;
|
|
51
|
+
}>;
|
|
52
|
+
export type ReviewConfig = typeof ReviewConfig.Type;
|
|
53
|
+
export declare const defaultReviewConfig: ReviewConfig;
|
|
32
54
|
export declare const TuiConfig: Schema.Struct<{
|
|
33
55
|
readonly accounts: Schema.$Array<Schema.Struct<{
|
|
34
56
|
readonly profile: Schema.brand<Schema.String, "AwsProfileName">;
|
|
@@ -38,6 +60,15 @@ export declare const TuiConfig: Schema.Struct<{
|
|
|
38
60
|
readonly autoDetect: Schema.withDecodingDefaultTypeKey<Schema.Boolean, never>;
|
|
39
61
|
readonly autoRefresh: Schema.withDecodingDefaultTypeKey<Schema.Boolean, never>;
|
|
40
62
|
readonly refreshIntervalSeconds: Schema.withDecodingDefaultTypeKey<Schema.Number, never>;
|
|
63
|
+
readonly review: Schema.withDecodingDefaultTypeKey<Schema.Struct<{
|
|
64
|
+
readonly defaultProfileId: Schema.withDecodingDefaultTypeKey<Schema.String, never>;
|
|
65
|
+
readonly profiles: Schema.withDecodingDefaultTypeKey<Schema.$Array<Schema.Struct<{
|
|
66
|
+
readonly id: Schema.String;
|
|
67
|
+
readonly name: Schema.String;
|
|
68
|
+
readonly kind: Schema.Literals<readonly ["review", "security", "tests", "explain"]>;
|
|
69
|
+
readonly skillIds: Schema.$Array<Schema.String>;
|
|
70
|
+
}>>, never>;
|
|
71
|
+
}>, never>;
|
|
41
72
|
readonly sandbox: Schema.withDecodingDefaultTypeKey<Schema.Struct<{
|
|
42
73
|
readonly image: Schema.withDecodingDefaultTypeKey<Schema.String, never>;
|
|
43
74
|
readonly extensions: Schema.withDecodingDefaultTypeKey<Schema.$Array<Schema.String>, never>;
|
|
@@ -52,6 +83,8 @@ export declare const TuiConfig: Schema.Struct<{
|
|
|
52
83
|
}>, never>;
|
|
53
84
|
}>;
|
|
54
85
|
export type TuiConfig = typeof TuiConfig.Type;
|
|
86
|
+
/** Migrate only the mutable image tag previously emitted by the settings UI. */
|
|
87
|
+
export declare const migrateLegacySandboxImage: (config: TuiConfig) => TuiConfig;
|
|
55
88
|
export declare const accountsFromDetected: (detected: ReadonlyArray<DetectedProfile>) => TuiConfig["accounts"];
|
|
56
89
|
export declare const makeDefaultConfig: (detected?: ReadonlyArray<DetectedProfile>) => TuiConfig;
|
|
57
90
|
export declare const parseAwsConfig: (content: string) => ReadonlyArray<DetectedProfile>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/ConfigService/internal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAgB,OAAO,EAAE,MAAM,EAAgB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/ConfigService/internal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAgB,OAAO,EAAE,MAAM,EAAgB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE5E,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAoBtE,eAAO,MAAM,mBAAmB,iGACgE,CAAA;;;;;AAGhG,qBAAa,eAAgB,SAAQ,oBAGnC;CAAG;AAEL,eAAO,MAAM,aAAa;;;;;;;;;;;EAuBxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,eAAO,MAAM,oBAAoB,EAAE,aAAoD,CAAA;AAEvF,eAAO,MAAM,aAAa;;;;EAMxB,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,OAAO,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} from "../ReviewProfile.js";
|
|
6
7
|
// ---------------------------------------------------------------------------
|
|
7
8
|
// Schemas
|
|
8
9
|
// ---------------------------------------------------------------------------
|
|
@@ -12,20 +13,22 @@ const emptyStrings = [];
|
|
|
12
13
|
const emptyEnv = {};
|
|
13
14
|
const emptyVolumeMounts = [];
|
|
14
15
|
const defaultAccountRegions = [decodeAwsRegion("us-east-1")];
|
|
16
|
+
export const defaultSandboxImage = "codercom/code-server@sha256:b88ed46a6ace76a0294a17a24f39aa88032ed0a3692c3d8ab5433b47ab57ccbf";
|
|
17
|
+
const legacyDefaultSandboxImage = "codercom/code-server:latest";
|
|
15
18
|
export class DetectedProfile extends Schema.Class("DetectedProfile")({
|
|
16
19
|
name: Schema.NonEmptyString.pipe(Schema.brand("AwsProfileName")),
|
|
17
20
|
region: Schema.optionalKey(AwsRegion)
|
|
18
21
|
}) {
|
|
19
22
|
}
|
|
20
23
|
export const SandboxConfig = Schema.Struct({
|
|
21
|
-
image: Schema.String.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(
|
|
24
|
+
image: Schema.String.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(defaultSandboxImage))),
|
|
22
25
|
extensions: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(emptyStrings))),
|
|
23
26
|
setupCommands: Schema.Array(Schema.String).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(emptyStrings))),
|
|
24
27
|
env: Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(emptyEnv))),
|
|
25
28
|
volumeMounts: Schema.Array(Schema.Struct({
|
|
26
29
|
hostPath: Schema.String,
|
|
27
30
|
containerPath: Schema.String,
|
|
28
|
-
readonly: Schema.Boolean.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(
|
|
31
|
+
readonly: Schema.Boolean.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(true)))
|
|
29
32
|
})).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(emptyVolumeMounts))),
|
|
30
33
|
cloneDepth: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(0)))
|
|
31
34
|
});
|
|
@@ -35,16 +38,63 @@ export const AccountConfig = Schema.Struct({
|
|
|
35
38
|
regions: Schema.Array(AwsRegion).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(defaultAccountRegions))),
|
|
36
39
|
enabled: Schema.Boolean.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(true)))
|
|
37
40
|
});
|
|
41
|
+
export const ReviewKind = Schema.Literals(["review", "security", "tests", "explain"]);
|
|
42
|
+
export const ReviewProfileConfig = Schema.Struct({
|
|
43
|
+
id: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(64), Schema.isPattern(/^[a-z][a-z0-9-]*$/u)),
|
|
44
|
+
name: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(80)),
|
|
45
|
+
kind: ReviewKind,
|
|
46
|
+
skillIds: Schema.Array(Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(256))).check(Schema.isMaxLength(reviewProfileSkillLimit), Schema.isUnique())
|
|
47
|
+
});
|
|
48
|
+
export const defaultReviewProfiles = [
|
|
49
|
+
{
|
|
50
|
+
id: "thorough",
|
|
51
|
+
name: "Thorough review",
|
|
52
|
+
kind: "review",
|
|
53
|
+
skillIds: ["builtin:pr-review", "builtin:pr-review-diff"]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: "security",
|
|
57
|
+
name: "Security review",
|
|
58
|
+
kind: "security",
|
|
59
|
+
skillIds: ["builtin:pr-review-diff"]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "tests",
|
|
63
|
+
name: "Test review",
|
|
64
|
+
kind: "tests",
|
|
65
|
+
skillIds: ["builtin:pr-review-diff"]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "explain",
|
|
69
|
+
name: "Explain change",
|
|
70
|
+
kind: "explain",
|
|
71
|
+
skillIds: []
|
|
72
|
+
}
|
|
73
|
+
];
|
|
74
|
+
export const ReviewConfig = Schema.Struct({
|
|
75
|
+
defaultProfileId: Schema.String.check(Schema.isTrimmed(), Schema.isNonEmpty(), Schema.isMaxLength(64), Schema.isPattern(/^[a-z][a-z0-9-]*$/u)).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault("thorough"))),
|
|
76
|
+
profiles: Schema.Array(ReviewProfileConfig).check(Schema.isMinLength(1), Schema.isMaxLength(12)).pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(defaultReviewProfiles)))
|
|
77
|
+
}).check(Schema.makeFilter(({ defaultProfileId, profiles }) => new Set(profiles.map(({ id }) => id)).size === profiles.length &&
|
|
78
|
+
profiles.some(({ id }) => id === defaultProfileId), { expected: "unique review profile ids containing the default profile" }));
|
|
79
|
+
export const defaultReviewConfig = {
|
|
80
|
+
defaultProfileId: "thorough",
|
|
81
|
+
profiles: defaultReviewProfiles
|
|
82
|
+
};
|
|
38
83
|
export const TuiConfig = Schema.Struct({
|
|
39
84
|
accounts: Schema.Array(AccountConfig),
|
|
40
85
|
autoDetect: Schema.Boolean.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(true))),
|
|
41
86
|
autoRefresh: Schema.Boolean.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(true))),
|
|
42
87
|
refreshIntervalSeconds: Schema.Number.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(300))),
|
|
88
|
+
review: ReviewConfig.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(defaultReviewConfig))),
|
|
43
89
|
sandbox: SandboxConfig.pipe(Schema.withDecodingDefaultTypeKey(decodingDefault(defaultSandboxConfig)))
|
|
44
90
|
});
|
|
91
|
+
/** Migrate only the mutable image tag previously emitted by the settings UI. */
|
|
92
|
+
export const migrateLegacySandboxImage = (config) => config.sandbox.image === legacyDefaultSandboxImage
|
|
93
|
+
? { ...config, sandbox: { ...config.sandbox, image: defaultSandboxImage } }
|
|
94
|
+
: config;
|
|
45
95
|
export const accountsFromDetected = (detected) => detected.map((profile) => ({
|
|
46
96
|
profile: profile.name,
|
|
47
|
-
regions: profile.region ? [profile.region] : [],
|
|
97
|
+
regions: profile.region !== undefined && profile.region.length > 0 ? [profile.region] : [],
|
|
48
98
|
enabled: false
|
|
49
99
|
}));
|
|
50
100
|
export const makeDefaultConfig = (detected = []) => ({
|
|
@@ -52,6 +102,7 @@ export const makeDefaultConfig = (detected = []) => ({
|
|
|
52
102
|
autoDetect: true,
|
|
53
103
|
autoRefresh: true,
|
|
54
104
|
refreshIntervalSeconds: 300,
|
|
105
|
+
review: defaultReviewConfig,
|
|
55
106
|
sandbox: defaultSandboxConfig
|
|
56
107
|
});
|
|
57
108
|
// ---------------------------------------------------------------------------
|
|
@@ -64,22 +115,26 @@ const parseIniSections = (content) => {
|
|
|
64
115
|
let current = null;
|
|
65
116
|
for (const line of lines) {
|
|
66
117
|
const trimmed = line.trim();
|
|
67
|
-
if (
|
|
118
|
+
if (trimmed.length === 0 || trimmed.startsWith("#") || trimmed.startsWith(";"))
|
|
68
119
|
continue;
|
|
69
120
|
const profileMatch = trimmed.match(/^\[(?:profile\s+)?(.+)\]$/);
|
|
70
|
-
if (profileMatch?.[1]) {
|
|
71
|
-
if (current)
|
|
121
|
+
if (profileMatch?.[1] !== undefined) {
|
|
122
|
+
if (current !== null)
|
|
72
123
|
sections.push(current);
|
|
73
124
|
current = { name: profileMatch[1].trim() };
|
|
74
125
|
}
|
|
75
|
-
else if (current && trimmed.includes("=")) {
|
|
126
|
+
else if (current !== null && trimmed.includes("=")) {
|
|
76
127
|
const [key, ...valueParts] = trimmed.split("=");
|
|
77
128
|
if (key?.trim().toLowerCase() === "region") {
|
|
78
|
-
|
|
129
|
+
const region = valueParts.join("=").trim();
|
|
130
|
+
if (region.length === 0)
|
|
131
|
+
delete current.region;
|
|
132
|
+
else
|
|
133
|
+
current.region = region;
|
|
79
134
|
}
|
|
80
135
|
}
|
|
81
136
|
}
|
|
82
|
-
if (current)
|
|
137
|
+
if (current !== null)
|
|
83
138
|
sections.push(current);
|
|
84
139
|
return sections;
|
|
85
140
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/ConfigService/internal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,IAAI,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/ConfigService/internal.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,IAAI,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExD,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAE7D,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,eAAe,GAAG,CAAI,KAAQ,EAA+C,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;AAQ3G,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;AACpD,MAAM,YAAY,GAAkB,EAAE,CAAA;AACtC,MAAM,QAAQ,GAA2B,EAAE,CAAA;AAC3C,MAAM,iBAAiB,GAAqC,EAAE,CAAA;AAC9D,MAAM,qBAAqB,GAAqB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAA;AAC9E,MAAM,CAAC,MAAM,mBAAmB,GAC9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KAAK,CAAC;oBAAE,OAAO,OAAO,CAAC,MAAM,CAAA;;oBACzC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAA;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,OAAO,KAAK,IAAI;QAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC5C,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAe,EAAkC,EAAE,CAChF,IAAI,CACF,gBAAgB,CAAC,OAAO,CAAC,EACzB,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,EACpD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACzB,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EACnC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,CAC5C,CAAA;AAEH,8EAA8E;AAC9E,0CAA0C;AAC1C,8EAA8E;AAE9E,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAM7C,CAAC,oCAAoC,CAAC;CAAG"}
|
|
@@ -1,32 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @internal
|
|
3
3
|
*/
|
|
4
|
-
import { Effect
|
|
4
|
+
import { Effect } from "effect";
|
|
5
5
|
import * as FileSystem from "effect/FileSystem";
|
|
6
6
|
import type * as Path from "effect/Path";
|
|
7
7
|
import { ConfigError, ConfigParseError } from "../Errors.js";
|
|
8
8
|
import type { ProfileDetectionError } from "../Errors.js";
|
|
9
9
|
import { ConfigPaths, type DetectedProfile } from "./internal.js";
|
|
10
|
-
export declare const makeLoad: (detectProfiles: Effect.Effect<readonly DetectedProfile[], ProfileDetectionError, ConfigPaths | FileSystem.FileSystem | Path.Path>) => Effect.Effect<
|
|
11
|
-
readonly accounts:
|
|
12
|
-
readonly profile:
|
|
13
|
-
readonly regions:
|
|
14
|
-
readonly enabled:
|
|
15
|
-
}
|
|
16
|
-
readonly autoDetect:
|
|
17
|
-
readonly autoRefresh:
|
|
18
|
-
readonly refreshIntervalSeconds:
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
readonly
|
|
30
|
-
|
|
31
|
-
|
|
10
|
+
export declare const makeLoad: (detectProfiles: Effect.Effect<readonly DetectedProfile[], ProfileDetectionError, ConfigPaths | FileSystem.FileSystem | Path.Path>) => Effect.Effect<{
|
|
11
|
+
readonly accounts: readonly {
|
|
12
|
+
readonly profile: string & import("effect/Brand").Brand<"AwsProfileName">;
|
|
13
|
+
readonly regions: readonly (string & import("effect/Brand").Brand<"AwsRegion">)[];
|
|
14
|
+
readonly enabled: boolean;
|
|
15
|
+
}[];
|
|
16
|
+
readonly autoDetect: boolean;
|
|
17
|
+
readonly autoRefresh: boolean;
|
|
18
|
+
readonly refreshIntervalSeconds: number;
|
|
19
|
+
readonly review: {
|
|
20
|
+
readonly defaultProfileId: string;
|
|
21
|
+
readonly profiles: readonly {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly kind: "explain" | "review" | "security" | "tests";
|
|
25
|
+
readonly skillIds: readonly string[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
readonly sandbox: {
|
|
29
|
+
readonly image: string;
|
|
30
|
+
readonly extensions: readonly string[];
|
|
31
|
+
readonly setupCommands: readonly string[];
|
|
32
|
+
readonly env: {
|
|
33
|
+
readonly [x: string]: string;
|
|
34
|
+
};
|
|
35
|
+
readonly volumeMounts: readonly {
|
|
36
|
+
readonly hostPath: string;
|
|
37
|
+
readonly containerPath: string;
|
|
38
|
+
readonly readonly: boolean;
|
|
39
|
+
}[];
|
|
40
|
+
readonly cloneDepth: number;
|
|
41
|
+
};
|
|
42
|
+
}, ConfigError | ConfigParseError, ConfigPaths | FileSystem.FileSystem | Path.Path>;
|
|
32
43
|
//# sourceMappingURL=load.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/ConfigService/load.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/ConfigService/load.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAA;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,KAAK,IAAI,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAEL,WAAW,EACX,KAAK,eAAe,EAIrB,MAAM,eAAe,CAAA;AAItB,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mFA+CnB,CAAA"}
|