@bjorntech/key-ferry 0.1.12 → 0.1.14
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 +20 -0
- package/dist/broker-registry.d.ts +32 -0
- package/dist/broker-registry.d.ts.map +1 -1
- package/dist/broker-registry.js +376 -42
- package/dist/broker-registry.js.map +1 -1
- package/dist/contracts.d.ts +13 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +3 -0
- package/dist/contracts.js.map +1 -1
- package/dist/options.d.ts +1 -0
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js +17 -0
- package/dist/options.js.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +4 -4
- package/dist/plugin.js.map +1 -1
- package/dist/rpc.d.ts +62 -12
- package/dist/rpc.d.ts.map +1 -1
- package/dist/rpc.js +41 -27
- package/dist/rpc.js.map +1 -1
- package/dist/scoped-controller.d.ts +5 -3
- package/dist/scoped-controller.d.ts.map +1 -1
- package/dist/scoped-controller.js +110 -44
- package/dist/scoped-controller.js.map +1 -1
- package/dist/scopes/controller-helpers.d.ts.map +1 -1
- package/dist/scopes/controller-helpers.js +15 -6
- package/dist/scopes/controller-helpers.js.map +1 -1
- package/dist/services/process.d.ts +3 -0
- package/dist/services/process.d.ts.map +1 -1
- package/dist/services/process.js +22 -6
- package/dist/services/process.js.map +1 -1
- package/dist/varlock/diagnostics.d.ts +7 -0
- package/dist/varlock/diagnostics.d.ts.map +1 -0
- package/dist/varlock/diagnostics.js +35 -0
- package/dist/varlock/diagnostics.js.map +1 -0
- package/dist/varlock/manager.d.ts.map +1 -1
- package/dist/varlock/manager.js +265 -72
- package/dist/varlock/manager.js.map +1 -1
- package/dist/varlock/ownership.d.ts +60 -0
- package/dist/varlock/ownership.d.ts.map +1 -0
- package/dist/varlock/ownership.js +372 -0
- package/dist/varlock/ownership.js.map +1 -0
- package/package.json +1 -1
package/dist/rpc.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { VarlockError, type SafeStatus } from "./contracts.js";
|
|
3
3
|
export declare const SafeStatusSchema: Schema.Struct<{
|
|
4
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
4
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
5
5
|
readonly projectDirectory: Schema.String;
|
|
6
6
|
readonly generation: Schema.Number;
|
|
7
7
|
readonly pid: Schema.optional<Schema.Number>;
|
|
8
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
8
9
|
readonly endpoint: Schema.optional<Schema.String>;
|
|
9
10
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
11
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
12
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
10
13
|
readonly error: Schema.optional<Schema.Struct<{
|
|
11
14
|
readonly code: Schema.String;
|
|
12
15
|
readonly message: Schema.String;
|
|
13
16
|
readonly retryable: Schema.Boolean;
|
|
17
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
18
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
14
19
|
}>>;
|
|
15
20
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
16
21
|
readonly code: Schema.String;
|
|
@@ -20,15 +25,20 @@ export declare const SafeStatusSchema: Schema.Struct<{
|
|
|
20
25
|
readonly scopes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
21
26
|
readonly scope: Schema.Literals<readonly ["global", "project"]>;
|
|
22
27
|
readonly projectDirectory: Schema.String;
|
|
23
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
28
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
24
29
|
readonly generation: Schema.Number;
|
|
25
30
|
readonly pid: Schema.optional<Schema.Number>;
|
|
31
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
26
32
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
27
33
|
readonly error: Schema.optional<Schema.Struct<{
|
|
28
34
|
readonly code: Schema.String;
|
|
29
35
|
readonly message: Schema.String;
|
|
30
36
|
readonly retryable: Schema.Boolean;
|
|
37
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
38
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
31
39
|
}>>;
|
|
40
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
41
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
32
42
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
33
43
|
readonly code: Schema.String;
|
|
34
44
|
readonly server: Schema.String;
|
|
@@ -47,16 +57,21 @@ export declare const KeyFerryRpc: {
|
|
|
47
57
|
readonly server: Schema.optional<Schema.NonEmptyString>;
|
|
48
58
|
}>;
|
|
49
59
|
readonly output: Schema.Struct<{
|
|
50
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
60
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
51
61
|
readonly projectDirectory: Schema.String;
|
|
52
62
|
readonly generation: Schema.Number;
|
|
53
63
|
readonly pid: Schema.optional<Schema.Number>;
|
|
64
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
54
65
|
readonly endpoint: Schema.optional<Schema.String>;
|
|
55
66
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
67
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
68
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
56
69
|
readonly error: Schema.optional<Schema.Struct<{
|
|
57
70
|
readonly code: Schema.String;
|
|
58
71
|
readonly message: Schema.String;
|
|
59
72
|
readonly retryable: Schema.Boolean;
|
|
73
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
74
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
60
75
|
}>>;
|
|
61
76
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
62
77
|
readonly code: Schema.String;
|
|
@@ -66,15 +81,20 @@ export declare const KeyFerryRpc: {
|
|
|
66
81
|
readonly scopes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
67
82
|
readonly scope: Schema.Literals<readonly ["global", "project"]>;
|
|
68
83
|
readonly projectDirectory: Schema.String;
|
|
69
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
84
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
70
85
|
readonly generation: Schema.Number;
|
|
71
86
|
readonly pid: Schema.optional<Schema.Number>;
|
|
87
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
72
88
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
73
89
|
readonly error: Schema.optional<Schema.Struct<{
|
|
74
90
|
readonly code: Schema.String;
|
|
75
91
|
readonly message: Schema.String;
|
|
76
92
|
readonly retryable: Schema.Boolean;
|
|
93
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
94
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
77
95
|
}>>;
|
|
96
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
97
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
78
98
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
79
99
|
readonly code: Schema.String;
|
|
80
100
|
readonly server: Schema.String;
|
|
@@ -96,16 +116,21 @@ export declare const KeyFerryRpc: {
|
|
|
96
116
|
readonly server: Schema.optional<Schema.NonEmptyString>;
|
|
97
117
|
}>;
|
|
98
118
|
readonly output: Schema.Struct<{
|
|
99
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
119
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
100
120
|
readonly projectDirectory: Schema.String;
|
|
101
121
|
readonly generation: Schema.Number;
|
|
102
122
|
readonly pid: Schema.optional<Schema.Number>;
|
|
123
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
103
124
|
readonly endpoint: Schema.optional<Schema.String>;
|
|
104
125
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
126
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
127
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
105
128
|
readonly error: Schema.optional<Schema.Struct<{
|
|
106
129
|
readonly code: Schema.String;
|
|
107
130
|
readonly message: Schema.String;
|
|
108
131
|
readonly retryable: Schema.Boolean;
|
|
132
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
133
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
109
134
|
}>>;
|
|
110
135
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
111
136
|
readonly code: Schema.String;
|
|
@@ -115,15 +140,20 @@ export declare const KeyFerryRpc: {
|
|
|
115
140
|
readonly scopes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
116
141
|
readonly scope: Schema.Literals<readonly ["global", "project"]>;
|
|
117
142
|
readonly projectDirectory: Schema.String;
|
|
118
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
143
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
119
144
|
readonly generation: Schema.Number;
|
|
120
145
|
readonly pid: Schema.optional<Schema.Number>;
|
|
146
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
121
147
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
122
148
|
readonly error: Schema.optional<Schema.Struct<{
|
|
123
149
|
readonly code: Schema.String;
|
|
124
150
|
readonly message: Schema.String;
|
|
125
151
|
readonly retryable: Schema.Boolean;
|
|
152
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
153
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
126
154
|
}>>;
|
|
155
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
156
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
127
157
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
128
158
|
readonly code: Schema.String;
|
|
129
159
|
readonly server: Schema.String;
|
|
@@ -145,16 +175,21 @@ export declare const KeyFerryRpc: {
|
|
|
145
175
|
readonly server: Schema.optional<Schema.NonEmptyString>;
|
|
146
176
|
}>;
|
|
147
177
|
readonly output: Schema.Struct<{
|
|
148
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
178
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
149
179
|
readonly projectDirectory: Schema.String;
|
|
150
180
|
readonly generation: Schema.Number;
|
|
151
181
|
readonly pid: Schema.optional<Schema.Number>;
|
|
182
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
152
183
|
readonly endpoint: Schema.optional<Schema.String>;
|
|
153
184
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
185
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
186
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
154
187
|
readonly error: Schema.optional<Schema.Struct<{
|
|
155
188
|
readonly code: Schema.String;
|
|
156
189
|
readonly message: Schema.String;
|
|
157
190
|
readonly retryable: Schema.Boolean;
|
|
191
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
192
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
158
193
|
}>>;
|
|
159
194
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
160
195
|
readonly code: Schema.String;
|
|
@@ -164,15 +199,20 @@ export declare const KeyFerryRpc: {
|
|
|
164
199
|
readonly scopes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
165
200
|
readonly scope: Schema.Literals<readonly ["global", "project"]>;
|
|
166
201
|
readonly projectDirectory: Schema.String;
|
|
167
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
202
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
168
203
|
readonly generation: Schema.Number;
|
|
169
204
|
readonly pid: Schema.optional<Schema.Number>;
|
|
205
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
170
206
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
171
207
|
readonly error: Schema.optional<Schema.Struct<{
|
|
172
208
|
readonly code: Schema.String;
|
|
173
209
|
readonly message: Schema.String;
|
|
174
210
|
readonly retryable: Schema.Boolean;
|
|
211
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
212
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
175
213
|
}>>;
|
|
214
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
215
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
176
216
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
177
217
|
readonly code: Schema.String;
|
|
178
218
|
readonly server: Schema.String;
|
|
@@ -191,16 +231,21 @@ export declare const KeyFerryRpc: {
|
|
|
191
231
|
readonly activateProject: {
|
|
192
232
|
readonly input: Schema.Struct<{}>;
|
|
193
233
|
readonly output: Schema.Struct<{
|
|
194
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
234
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
195
235
|
readonly projectDirectory: Schema.String;
|
|
196
236
|
readonly generation: Schema.Number;
|
|
197
237
|
readonly pid: Schema.optional<Schema.Number>;
|
|
238
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
198
239
|
readonly endpoint: Schema.optional<Schema.String>;
|
|
199
240
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
241
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
242
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
200
243
|
readonly error: Schema.optional<Schema.Struct<{
|
|
201
244
|
readonly code: Schema.String;
|
|
202
245
|
readonly message: Schema.String;
|
|
203
246
|
readonly retryable: Schema.Boolean;
|
|
247
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
248
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
204
249
|
}>>;
|
|
205
250
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
206
251
|
readonly code: Schema.String;
|
|
@@ -210,15 +255,20 @@ export declare const KeyFerryRpc: {
|
|
|
210
255
|
readonly scopes: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
211
256
|
readonly scope: Schema.Literals<readonly ["global", "project"]>;
|
|
212
257
|
readonly projectDirectory: Schema.String;
|
|
213
|
-
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping"]>;
|
|
258
|
+
readonly phase: Schema.Literals<readonly ["stopped", "starting", "ready", "degraded", "failed", "stopping", "idle"]>;
|
|
214
259
|
readonly generation: Schema.Number;
|
|
215
260
|
readonly pid: Schema.optional<Schema.Number>;
|
|
261
|
+
readonly idleUntil: Schema.optional<Schema.String>;
|
|
216
262
|
readonly lastRefreshAt: Schema.optional<Schema.String>;
|
|
217
263
|
readonly error: Schema.optional<Schema.Struct<{
|
|
218
264
|
readonly code: Schema.String;
|
|
219
265
|
readonly message: Schema.String;
|
|
220
266
|
readonly retryable: Schema.Boolean;
|
|
267
|
+
readonly stderrTail: Schema.optional<Schema.String>;
|
|
268
|
+
readonly stderrCode: Schema.optional<Schema.String>;
|
|
221
269
|
}>>;
|
|
270
|
+
readonly lastFailureAt: Schema.optional<Schema.String>;
|
|
271
|
+
readonly nextRetryAt: Schema.optional<Schema.String>;
|
|
222
272
|
readonly diagnostics: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
223
273
|
readonly code: Schema.String;
|
|
224
274
|
readonly server: Schema.String;
|
|
@@ -237,11 +287,11 @@ export declare const KeyFerryRpc: {
|
|
|
237
287
|
};
|
|
238
288
|
readonly events: {};
|
|
239
289
|
};
|
|
240
|
-
declare const publicMessage: (error: VarlockError) =>
|
|
290
|
+
declare const publicMessage: (error: VarlockError) => string;
|
|
241
291
|
/** Rebuild a safe status without trusting an adapter error message. */
|
|
242
292
|
export declare function sanitizeStatus(status: SafeStatus): SafeStatus;
|
|
243
293
|
export declare function rpcError(error: VarlockError): {
|
|
244
|
-
code: "invalid_config" | "unavailable" | "start_failed" | "refresh_failed" | "not_ready" | "disposed" | "protocol_error" | "timeout";
|
|
294
|
+
code: "invalid_config" | "unavailable" | "start_failed" | "refresh_failed" | "not_ready" | "disposed" | "protocol_error" | "timeout" | "ownership_unavailable";
|
|
245
295
|
};
|
|
246
296
|
export { publicMessage };
|
|
247
297
|
//# sourceMappingURL=rpc.d.ts.map
|
package/dist/rpc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,YAAY,EAGZ,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,YAAY,EAGZ,KAAK,UAAU,EAEhB,MAAM,gBAAgB,CAAC;AAyCxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc3B,CAAC;AAsBH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCtB,CAAC;AAYH,QAAA,MAAM,aAAa,GAAI,OAAO,YAAY,WACc,CAAC;AAEzD,uEAAuE;AACvE,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAQ7D;AA+FD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,YAAY;;EAE3C;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/rpc.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Rpc } from "@opencode/plugin/effect";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { VarlockError, } from "./contracts.js";
|
|
4
|
+
import { safeStderrMessage } from "./varlock/diagnostics.js";
|
|
4
5
|
const statusError = Schema.Struct({
|
|
5
6
|
code: Schema.String,
|
|
6
7
|
message: Schema.String,
|
|
7
8
|
retryable: Schema.Boolean,
|
|
9
|
+
stderrTail: Schema.optional(Schema.String),
|
|
10
|
+
stderrCode: Schema.optional(Schema.String),
|
|
8
11
|
});
|
|
9
12
|
const scopeId = Schema.Literals(["global", "project"]);
|
|
10
13
|
const managerPhase = Schema.Literals([
|
|
@@ -14,6 +17,7 @@ const managerPhase = Schema.Literals([
|
|
|
14
17
|
"degraded",
|
|
15
18
|
"failed",
|
|
16
19
|
"stopping",
|
|
20
|
+
"idle",
|
|
17
21
|
]);
|
|
18
22
|
const diagnostic = Schema.Struct({
|
|
19
23
|
code: Schema.String,
|
|
@@ -26,8 +30,11 @@ const scopeStatus = Schema.Struct({
|
|
|
26
30
|
phase: managerPhase,
|
|
27
31
|
generation: Schema.Number,
|
|
28
32
|
pid: Schema.optional(Schema.Number),
|
|
33
|
+
idleUntil: Schema.optional(Schema.String),
|
|
29
34
|
lastRefreshAt: Schema.optional(Schema.String),
|
|
30
35
|
error: Schema.optional(statusError),
|
|
36
|
+
lastFailureAt: Schema.optional(Schema.String),
|
|
37
|
+
nextRetryAt: Schema.optional(Schema.String),
|
|
31
38
|
diagnostics: Schema.optional(Schema.Array(diagnostic)),
|
|
32
39
|
activation: Schema.optional(Schema.Literals(["auto", "manual", "awaiting_activation"])),
|
|
33
40
|
});
|
|
@@ -36,8 +43,11 @@ export const SafeStatusSchema = Schema.Struct({
|
|
|
36
43
|
projectDirectory: Schema.String,
|
|
37
44
|
generation: Schema.Number,
|
|
38
45
|
pid: Schema.optional(Schema.Number),
|
|
46
|
+
idleUntil: Schema.optional(Schema.String),
|
|
39
47
|
endpoint: Schema.optional(Schema.String),
|
|
40
48
|
lastRefreshAt: Schema.optional(Schema.String),
|
|
49
|
+
lastFailureAt: Schema.optional(Schema.String),
|
|
50
|
+
nextRetryAt: Schema.optional(Schema.String),
|
|
41
51
|
error: Schema.optional(statusError),
|
|
42
52
|
diagnostics: Schema.optional(Schema.Array(diagnostic)),
|
|
43
53
|
scopes: Schema.optional(Schema.Array(scopeStatus)),
|
|
@@ -48,14 +58,18 @@ const selector = Schema.Struct({
|
|
|
48
58
|
server: Schema.optional(Schema.NonEmptyString),
|
|
49
59
|
});
|
|
50
60
|
const Empty = Schema.Struct({});
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
const varlockErrorCodes = new Set([
|
|
62
|
+
"invalid_config",
|
|
63
|
+
"ownership_unavailable",
|
|
64
|
+
"unavailable",
|
|
65
|
+
"start_failed",
|
|
66
|
+
"refresh_failed",
|
|
67
|
+
"not_ready",
|
|
68
|
+
"disposed",
|
|
69
|
+
"protocol_error",
|
|
70
|
+
"timeout",
|
|
71
|
+
]);
|
|
72
|
+
const isVarlockErrorCode = (value) => typeof value === "string" && varlockErrorCodes.has(value);
|
|
59
73
|
export const KeyFerryRpc = Rpc.define({
|
|
60
74
|
id: "key-ferry",
|
|
61
75
|
methods: {
|
|
@@ -90,26 +104,17 @@ export const KeyFerryRpc = Rpc.define({
|
|
|
90
104
|
},
|
|
91
105
|
events: {},
|
|
92
106
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return "Varlock operation timed out";
|
|
103
|
-
case "not_ready":
|
|
104
|
-
return "Varlock is not ready";
|
|
105
|
-
case "disposed":
|
|
106
|
-
return "Varlock manager is stopped";
|
|
107
|
-
case "protocol_error":
|
|
108
|
-
return "Varlock returned an invalid response";
|
|
109
|
-
default:
|
|
110
|
-
return "Varlock is unavailable";
|
|
111
|
-
}
|
|
107
|
+
const publicMessages = {
|
|
108
|
+
invalid_config: "Varlock configuration is invalid",
|
|
109
|
+
ownership_unavailable: "Key Ferry could not secure its private runtime directory; see doctor.",
|
|
110
|
+
start_failed: "Varlock could not start",
|
|
111
|
+
refresh_failed: "Varlock refresh failed",
|
|
112
|
+
timeout: "Varlock operation timed out",
|
|
113
|
+
not_ready: "Varlock is not ready",
|
|
114
|
+
disposed: "Varlock manager is stopped",
|
|
115
|
+
protocol_error: "Varlock returned an invalid response",
|
|
112
116
|
};
|
|
117
|
+
const publicMessage = (error) => publicMessages[error.code] ?? "Varlock is unavailable";
|
|
113
118
|
/** Rebuild a safe status without trusting an adapter error message. */
|
|
114
119
|
export function sanitizeStatus(status) {
|
|
115
120
|
return {
|
|
@@ -128,6 +133,9 @@ function sanitizeLegacyFields(status) {
|
|
|
128
133
|
...optionalField("pid", status.pid),
|
|
129
134
|
...optionalField("endpoint", status.endpoint),
|
|
130
135
|
...optionalField("lastRefreshAt", status.lastRefreshAt),
|
|
136
|
+
...optionalField("lastFailureAt", status.lastFailureAt),
|
|
137
|
+
...optionalField("nextRetryAt", status.nextRetryAt),
|
|
138
|
+
...optionalField("idleUntil", status.idleUntil),
|
|
131
139
|
...optionalField("error", status.error === undefined ? undefined : sanitizeError(status.error)),
|
|
132
140
|
};
|
|
133
141
|
}
|
|
@@ -171,6 +179,9 @@ function sanitizeScopeStatus(status) {
|
|
|
171
179
|
generation: status.generation,
|
|
172
180
|
...optionalField("pid", status.pid),
|
|
173
181
|
...optionalField("lastRefreshAt", status.lastRefreshAt),
|
|
182
|
+
...optionalField("lastFailureAt", status.lastFailureAt),
|
|
183
|
+
...optionalField("nextRetryAt", status.nextRetryAt),
|
|
184
|
+
...optionalField("idleUntil", status.idleUntil),
|
|
174
185
|
...optionalField("error", status.error === undefined ? undefined : sanitizeError(status.error)),
|
|
175
186
|
...optionalField("diagnostics", status.diagnostics?.map(sanitizeDiagnostic)),
|
|
176
187
|
...optionalField("activation", status.activation),
|
|
@@ -178,10 +189,13 @@ function sanitizeScopeStatus(status) {
|
|
|
178
189
|
}
|
|
179
190
|
function sanitizeError(error) {
|
|
180
191
|
const code = isVarlockErrorCode(error.code) ? error.code : "unavailable";
|
|
192
|
+
const stderrTail = safeStderrMessage(error.stderrCode, error.stderrTail);
|
|
181
193
|
return new VarlockError({
|
|
182
194
|
code,
|
|
183
195
|
message: publicMessage(new VarlockError({ code, message: "", retryable: false })),
|
|
184
196
|
retryable: error.retryable === true,
|
|
197
|
+
...(stderrTail ? { stderrTail } : {}),
|
|
198
|
+
...(stderrTail && error.stderrCode ? { stderrCode: error.stderrCode } : {}),
|
|
185
199
|
});
|
|
186
200
|
}
|
|
187
201
|
function sanitizeBindings(bindings) {
|
package/dist/rpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,YAAY,GAKb,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc.js","sourceRoot":"","sources":["../src/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,YAAY,GAKb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,SAAS,EAAE,MAAM,CAAC,OAAO;IACzB,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CAC3C,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC,CAAC;AAChE,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC;IACnC,SAAS;IACT,UAAU;IACV,OAAO;IACP,UAAU;IACV,QAAQ;IACR,UAAU;IACV,MAAM;CACE,CAAC,CAAC;AACZ,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM;IAC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AAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,SAAS,CAAC;YAAE,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;IAC/F,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAmB;IAC1C,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;AAC9B,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Effect, Scope } from "effect";
|
|
2
|
-
import type
|
|
1
|
+
import { Cause, Effect, Scope } from "effect";
|
|
2
|
+
import { type BrokerRegistry } from "./broker-registry.js";
|
|
3
3
|
import type { ProjectKeyFerryManagerFactory, SafeStatus, ScopeId } from "./contracts.js";
|
|
4
4
|
import { type McpEditor } from "./plugin.js";
|
|
5
5
|
import { type RemoteRelayFactory } from "./remote.js";
|
|
@@ -31,8 +31,10 @@ export declare function makeScopedController(options: ScopedControllerOptions):
|
|
|
31
31
|
}) => Effect.Effect<SafeStatus, any, never>;
|
|
32
32
|
activateProject: Effect.Effect<SafeStatus, never, never>;
|
|
33
33
|
replaceProject: (next: ScopedConfiguration) => Effect.Effect<void, never, never>;
|
|
34
|
-
watch: (load: () => Promise<ScopedConfiguration>) => Effect.Effect<import("effect/Fiber").Fiber<
|
|
34
|
+
watch: (load: () => Promise<ScopedConfiguration>) => Effect.Effect<import("effect/Fiber").Fiber<never, Cause.UnknownError>, never, never>;
|
|
35
35
|
dispose: Effect.Effect<void, never, never>;
|
|
36
|
+
configuration: () => ScopedConfiguration;
|
|
37
|
+
recordFailure: (error: unknown) => Effect.Effect<void, never, never>;
|
|
36
38
|
runtimes: Map<ScopeId, Runtime>;
|
|
37
39
|
};
|
|
38
40
|
//# sourceMappingURL=scoped-controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scoped-controller.d.ts","sourceRoot":"","sources":["../src/scoped-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,KAAK,EAAU,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"scoped-controller.d.ts","sourceRoot":"","sources":["../src/scoped-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAS,MAAM,EAAQ,KAAK,EAAU,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAkC,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,KAAK,EACV,6BAA6B,EAE7B,UAAU,EACV,OAAO,EACR,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,oBAAoB,CAAC;AAkB3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAwB5D,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,aAAa,EAAE,mBAAmB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,6BAA6B,CAAC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,g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