@bjorntech/key-ferry 0.0.0-stage → 0.1.4
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/LICENSE +21 -0
- package/README.md +209 -2
- package/SECURITY.md +87 -0
- package/dist/contracts.d.ts +133 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +29 -0
- package/dist/contracts.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/options.d.ts +44 -0
- package/dist/options.d.ts.map +1 -0
- package/dist/options.js +260 -0
- package/dist/options.js.map +1 -0
- package/dist/plugin.d.ts +24 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +215 -0
- package/dist/plugin.js.map +1 -0
- package/dist/relay/index.d.ts +37 -0
- package/dist/relay/index.d.ts.map +1 -0
- package/dist/relay/index.js +480 -0
- package/dist/relay/index.js.map +1 -0
- package/dist/remote.d.ts +62 -0
- package/dist/remote.d.ts.map +1 -0
- package/dist/remote.js +227 -0
- package/dist/remote.js.map +1 -0
- package/dist/rpc.d.ts +112 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +117 -0
- package/dist/rpc.js.map +1 -0
- package/dist/services/process.d.ts +56 -0
- package/dist/services/process.d.ts.map +1 -0
- package/dist/services/process.js +208 -0
- package/dist/services/process.js.map +1 -0
- package/dist/tui.d.ts +59 -0
- package/dist/tui.d.ts.map +1 -0
- package/dist/tui.js +93 -0
- package/dist/tui.js.map +1 -0
- package/dist/varlock/manager.d.ts +6 -0
- package/dist/varlock/manager.d.ts.map +1 -0
- package/dist/varlock/manager.js +425 -0
- package/dist/varlock/manager.js.map +1 -0
- package/dist/varlock/protocol.d.ts +67 -0
- package/dist/varlock/protocol.d.ts.map +1 -0
- package/dist/varlock/protocol.js +248 -0
- package/dist/varlock/protocol.js.map +1 -0
- package/docs/architecture.md +179 -0
- package/docs/quality.md +102 -0
- package/docs/releasing.md +149 -0
- package/docs/troubleshooting.md +214 -0
- package/examples/.env.schema +17 -0
- package/examples/opencode.jsonc +44 -0
- package/package.json +96 -4
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { Context, Data, Duration, Effect, Layer } from "effect";
|
|
3
|
+
/** Deliberately contains no command, arguments, or captured output. */
|
|
4
|
+
export class ProcessError extends Data.TaggedError("ProcessError") {
|
|
5
|
+
}
|
|
6
|
+
export class Process extends Context.Service()("key-ferry/Process") {
|
|
7
|
+
}
|
|
8
|
+
const defaultMaxBytes = 1024 * 1024;
|
|
9
|
+
const defaultGraceMs = 500;
|
|
10
|
+
const safeMessage = (phase, code) => `${phase} failed (${code})`;
|
|
11
|
+
const error = (phase, code, extra = {}) => new ProcessError({ phase, code, message: safeMessage(phase, code), ...extra });
|
|
12
|
+
const kill = (child, graceMs) => Effect.callback((resume) => {
|
|
13
|
+
let settled = false;
|
|
14
|
+
let timer;
|
|
15
|
+
const finish = () => {
|
|
16
|
+
if (!settled) {
|
|
17
|
+
settled = true;
|
|
18
|
+
if (timer)
|
|
19
|
+
clearTimeout(timer);
|
|
20
|
+
child.removeListener("close", finish);
|
|
21
|
+
resume(Effect.void);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
child.once("close", finish);
|
|
25
|
+
if (child.exitCode !== null || child.signalCode !== null)
|
|
26
|
+
return finish();
|
|
27
|
+
try {
|
|
28
|
+
child.kill("SIGTERM");
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return finish();
|
|
32
|
+
}
|
|
33
|
+
timer = setTimeout(() => {
|
|
34
|
+
if (child.exitCode === null && child.signalCode === null) {
|
|
35
|
+
try {
|
|
36
|
+
child.kill("SIGKILL");
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
// The process may have exited between the check and kill.
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
finish();
|
|
43
|
+
}, Math.max(0, graceMs));
|
|
44
|
+
return Effect.sync(() => {
|
|
45
|
+
if (timer)
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
child.removeListener("close", finish);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
const spawnRaw = (input) => Effect.acquireRelease(Effect.callback((resume) => {
|
|
51
|
+
let child;
|
|
52
|
+
try {
|
|
53
|
+
// shell is intentionally absent. Never inherit or mutate global env.
|
|
54
|
+
child = spawn(input.executable, [...input.args], {
|
|
55
|
+
cwd: input.cwd,
|
|
56
|
+
// An omitted environment is intentionally isolated. Callers that
|
|
57
|
+
// need the trusted Varlock resolver environment must pass it
|
|
58
|
+
// deliberately; never inherit the host process environment.
|
|
59
|
+
env: input.env ? { ...input.env } : {},
|
|
60
|
+
shell: false,
|
|
61
|
+
detached: false,
|
|
62
|
+
stdio: ["ignore", "ignore", "ignore"],
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
resume(Effect.fail(error("spawn", "spawn-failed")));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const completion = Effect.callback((done) => {
|
|
70
|
+
const close = (code, signal) => {
|
|
71
|
+
child.removeListener("error", onError);
|
|
72
|
+
if (code === 0)
|
|
73
|
+
done(Effect.succeed({ code, signal }));
|
|
74
|
+
else
|
|
75
|
+
done(Effect.fail(error("exit", code === null ? "signal" : "non-zero", {
|
|
76
|
+
exitCode: code ?? undefined,
|
|
77
|
+
signal: signal ?? undefined,
|
|
78
|
+
})));
|
|
79
|
+
};
|
|
80
|
+
const onError = () => done(Effect.fail(error("running", "io")));
|
|
81
|
+
child.once("close", close);
|
|
82
|
+
child.once("error", onError);
|
|
83
|
+
return Effect.sync(() => {
|
|
84
|
+
child.removeListener("close", close);
|
|
85
|
+
child.removeListener("error", onError);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
let stopped = false;
|
|
89
|
+
const stop = Effect.suspend(() => {
|
|
90
|
+
if (stopped)
|
|
91
|
+
return Effect.void;
|
|
92
|
+
stopped = true;
|
|
93
|
+
// A stop is bounded by kill's grace period, but must not be
|
|
94
|
+
// interruptible between SIGTERM and the SIGKILL fallback. Otherwise
|
|
95
|
+
// an interrupted stop can clear the fallback timer while `stopped`
|
|
96
|
+
// prevents scope finalization from trying again.
|
|
97
|
+
return Effect.uninterruptible(kill(child, input.terminateGraceMs ?? defaultGraceMs));
|
|
98
|
+
});
|
|
99
|
+
resume(Effect.succeed({
|
|
100
|
+
pid: child.pid,
|
|
101
|
+
completion,
|
|
102
|
+
health: Effect.sync(() => ({
|
|
103
|
+
pid: child.pid,
|
|
104
|
+
running: child.exitCode === null && child.signalCode === null,
|
|
105
|
+
exit: child.exitCode !== null || child.signalCode !== null
|
|
106
|
+
? { code: child.exitCode, signal: child.signalCode }
|
|
107
|
+
: undefined,
|
|
108
|
+
})),
|
|
109
|
+
stop,
|
|
110
|
+
}));
|
|
111
|
+
}), (process) => process.stop.pipe(Effect.catch(() => Effect.void)));
|
|
112
|
+
const run = (input) => {
|
|
113
|
+
const maxBytes = input.maxBytes ?? defaultMaxBytes;
|
|
114
|
+
const spawned = Effect.callback((resume, signal) => {
|
|
115
|
+
let child;
|
|
116
|
+
try {
|
|
117
|
+
child = spawn(input.executable, [...input.args], {
|
|
118
|
+
cwd: input.cwd,
|
|
119
|
+
env: input.env ? { ...input.env } : {},
|
|
120
|
+
shell: false,
|
|
121
|
+
detached: false,
|
|
122
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
resume(Effect.fail(error("spawn", "spawn-failed")));
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let stdout = "";
|
|
130
|
+
let stderr = "";
|
|
131
|
+
let limited = false;
|
|
132
|
+
const onData = (which) => (chunk) => {
|
|
133
|
+
if (which === "stdout")
|
|
134
|
+
stdout += chunk.toString("utf8");
|
|
135
|
+
else
|
|
136
|
+
stderr += chunk.toString("utf8");
|
|
137
|
+
if ((which === "stdout" ? Buffer.byteLength(stdout) : Buffer.byteLength(stderr)) > maxBytes &&
|
|
138
|
+
!limited) {
|
|
139
|
+
limited = true;
|
|
140
|
+
try {
|
|
141
|
+
child.kill("SIGTERM");
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
/* already exited */
|
|
145
|
+
}
|
|
146
|
+
setTimeout(() => {
|
|
147
|
+
if (child.exitCode === null && child.signalCode === null) {
|
|
148
|
+
try {
|
|
149
|
+
child.kill("SIGKILL");
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
/* already exited */
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}, defaultGraceMs);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const out = onData("stdout");
|
|
159
|
+
const err = onData("stderr");
|
|
160
|
+
child.stdout?.on("data", out);
|
|
161
|
+
child.stderr?.on("data", err);
|
|
162
|
+
const close = (code, sig) => {
|
|
163
|
+
if (limited)
|
|
164
|
+
resume(Effect.fail(error("capture-limit", "capture-limit")));
|
|
165
|
+
else if (code === 0)
|
|
166
|
+
resume(Effect.succeed({ code, signal: sig, stdout, stderr }));
|
|
167
|
+
else
|
|
168
|
+
resume(Effect.fail(error("exit", code === null ? "signal" : "non-zero", {
|
|
169
|
+
exitCode: code ?? undefined,
|
|
170
|
+
signal: sig ?? undefined,
|
|
171
|
+
})));
|
|
172
|
+
};
|
|
173
|
+
child.once("close", close);
|
|
174
|
+
child.once("error", () => resume(Effect.fail(error("running", "io"))));
|
|
175
|
+
signal.addEventListener("abort", () => {
|
|
176
|
+
try {
|
|
177
|
+
child.kill("SIGTERM");
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
/* already exited */
|
|
181
|
+
}
|
|
182
|
+
setTimeout(() => {
|
|
183
|
+
if (child.exitCode === null && child.signalCode === null) {
|
|
184
|
+
try {
|
|
185
|
+
child.kill("SIGKILL");
|
|
186
|
+
}
|
|
187
|
+
catch {
|
|
188
|
+
/* already exited */
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}, defaultGraceMs);
|
|
192
|
+
}, { once: true });
|
|
193
|
+
return Effect.sync(() => {
|
|
194
|
+
child.stdout?.removeListener("data", out);
|
|
195
|
+
child.stderr?.removeListener("data", err);
|
|
196
|
+
child.removeListener("close", close);
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
const bounded = input.timeoutMs === undefined
|
|
200
|
+
? spawned
|
|
201
|
+
: spawned.pipe(Effect.timeoutOrElse({
|
|
202
|
+
duration: Duration.millis(input.timeoutMs),
|
|
203
|
+
orElse: () => Effect.fail(error("timeout", "timeout")),
|
|
204
|
+
}));
|
|
205
|
+
return bounded;
|
|
206
|
+
};
|
|
207
|
+
export const ProcessLive = Layer.succeed(Process, Process.of({ run, spawn: spawnRaw }));
|
|
208
|
+
//# sourceMappingURL=process.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.js","sourceRoot":"","sources":["../../src/services/process.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAIhE,uEAAuE;AACvE,MAAM,OAAO,YAAa,SAAQ,IAAI,CAAC,WAAW,CAAC,cAAc,CAM/D;CAAG;AAgDL,MAAM,OAAO,OAAQ,SAAQ,OAAO,CAAC,OAAO,EAA2B,CAAC,mBAAmB,CAAC;CAAG;AAE/F,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,CAAC;AACpC,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,WAAW,GAAG,CAAC,KAAmB,EAAE,IAA0B,EAAU,EAAE,CAC9E,GAAG,KAAK,YAAY,IAAI,GAAG,CAAC;AAE9B,MAAM,KAAK,GAAG,CACZ,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AK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC"}
|
package/dist/tui.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Plugin } from "@opencode/plugin/tui";
|
|
2
|
+
export interface SafeStatusView {
|
|
3
|
+
readonly phase: string;
|
|
4
|
+
readonly generation: number;
|
|
5
|
+
readonly diagnostics?: readonly {
|
|
6
|
+
readonly server: string;
|
|
7
|
+
readonly code: string;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
}[];
|
|
10
|
+
readonly error?: {
|
|
11
|
+
readonly code: string;
|
|
12
|
+
readonly message: string;
|
|
13
|
+
readonly retryable: boolean;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface TuiActions {
|
|
17
|
+
readonly status: () => Promise<SafeStatusView>;
|
|
18
|
+
readonly refresh: () => Promise<SafeStatusView>;
|
|
19
|
+
readonly doctor: () => Promise<SafeStatusView>;
|
|
20
|
+
readonly show: (title: string, message: string, variant: "info" | "success" | "warning" | "error") => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function formatStatus(status: SafeStatusView): string;
|
|
23
|
+
export declare function createCommands(actions: TuiActions): readonly [{
|
|
24
|
+
readonly id: "key-ferry.status";
|
|
25
|
+
readonly title: "Key Ferry: Status";
|
|
26
|
+
readonly description: "Show safe Key Ferry sidecar state";
|
|
27
|
+
readonly group: "Varlock";
|
|
28
|
+
readonly palette: true;
|
|
29
|
+
readonly slash: {
|
|
30
|
+
readonly name: "key-ferry-status";
|
|
31
|
+
readonly aliases: string[];
|
|
32
|
+
};
|
|
33
|
+
readonly run: () => Promise<void>;
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: "key-ferry.refresh";
|
|
36
|
+
readonly title: "Key Ferry: Refresh";
|
|
37
|
+
readonly description: "Refresh the protected project environment";
|
|
38
|
+
readonly group: "Varlock";
|
|
39
|
+
readonly palette: true;
|
|
40
|
+
readonly slash: {
|
|
41
|
+
readonly name: "key-ferry-refresh";
|
|
42
|
+
readonly aliases: string[];
|
|
43
|
+
};
|
|
44
|
+
readonly run: () => Promise<void>;
|
|
45
|
+
}, {
|
|
46
|
+
readonly id: "key-ferry.doctor";
|
|
47
|
+
readonly title: "Key Ferry: Doctor";
|
|
48
|
+
readonly description: "Check Varlock readiness and protected connections";
|
|
49
|
+
readonly group: "Varlock";
|
|
50
|
+
readonly palette: true;
|
|
51
|
+
readonly slash: {
|
|
52
|
+
readonly name: "key-ferry-doctor";
|
|
53
|
+
readonly aliases: string[];
|
|
54
|
+
};
|
|
55
|
+
readonly run: () => Promise<void>;
|
|
56
|
+
}];
|
|
57
|
+
declare const _default: Plugin.Definition;
|
|
58
|
+
export default _default;
|
|
59
|
+
//# sourceMappingURL=tui.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui.d.ts","sourceRoot":"","sources":["../src/tui.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAG9C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS;QAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,EAAE,CAAC;IACJ,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;CACnG;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,CACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,KAC9C,IAAI,CAAC;CACX;AAuBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAO3D;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU;;;;;;;;0BAuBe,MAAM,EAAE;;;;;;;;;;;0BASN,MAAM,EAAE;;;;;;;;;;;0BASV,MAAM,EAAE;;;GAIxE;;AAED,wBAwBG"}
|
package/dist/tui.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Plugin } from "@opencode/plugin/tui";
|
|
2
|
+
import { KeyFerryRpc } from "./rpc.js";
|
|
3
|
+
const errorMessage = (error) => {
|
|
4
|
+
if (typeof error !== "object" || error === null)
|
|
5
|
+
return "Varlock is unavailable";
|
|
6
|
+
const code = "code" in error && typeof error.code === "string" ? error.code : "unavailable";
|
|
7
|
+
switch (code) {
|
|
8
|
+
case "invalid_config":
|
|
9
|
+
return "Varlock configuration is invalid";
|
|
10
|
+
case "start_failed":
|
|
11
|
+
return "Varlock could not start";
|
|
12
|
+
case "refresh_failed":
|
|
13
|
+
return "Varlock refresh failed";
|
|
14
|
+
case "timeout":
|
|
15
|
+
return "Varlock operation timed out";
|
|
16
|
+
case "not_ready":
|
|
17
|
+
return "Varlock is not ready";
|
|
18
|
+
case "protocol_error":
|
|
19
|
+
return "Varlock returned an invalid response";
|
|
20
|
+
default:
|
|
21
|
+
return "Varlock is unavailable";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export function formatStatus(status) {
|
|
25
|
+
const lines = status.error
|
|
26
|
+
? [`${status.error.message} (${status.error.code})`]
|
|
27
|
+
: [`State: ${status.phase}`, `Generation: ${status.generation}`];
|
|
28
|
+
for (const item of status.diagnostics ?? [])
|
|
29
|
+
lines.push(`${item.server}: ${item.message} (${item.code})`);
|
|
30
|
+
return lines.join("\n");
|
|
31
|
+
}
|
|
32
|
+
export function createCommands(actions) {
|
|
33
|
+
const run = (title, operation, success) => async () => {
|
|
34
|
+
actions.show(title, "Working…", "info");
|
|
35
|
+
try {
|
|
36
|
+
const status = await operation();
|
|
37
|
+
actions.show(title, `${success}\n\n${formatStatus(status)}`, status.error ? "warning" : "success");
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
actions.show(title, errorMessage(error), "error");
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return [
|
|
44
|
+
{
|
|
45
|
+
id: "key-ferry.status",
|
|
46
|
+
title: "Key Ferry: Status",
|
|
47
|
+
description: "Show safe Key Ferry sidecar state",
|
|
48
|
+
group: "Varlock",
|
|
49
|
+
palette: true,
|
|
50
|
+
slash: { name: "key-ferry-status", aliases: ["vstatus"] },
|
|
51
|
+
run: run("Varlock status", actions.status, "Status loaded"),
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "key-ferry.refresh",
|
|
55
|
+
title: "Key Ferry: Refresh",
|
|
56
|
+
description: "Refresh the protected project environment",
|
|
57
|
+
group: "Varlock",
|
|
58
|
+
palette: true,
|
|
59
|
+
slash: { name: "key-ferry-refresh", aliases: ["vrefresh"] },
|
|
60
|
+
run: run("Varlock refresh", actions.refresh, "Refresh completed"),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "key-ferry.doctor",
|
|
64
|
+
title: "Key Ferry: Doctor",
|
|
65
|
+
description: "Check Varlock readiness and protected connections",
|
|
66
|
+
group: "Varlock",
|
|
67
|
+
palette: true,
|
|
68
|
+
slash: { name: "key-ferry-doctor", aliases: ["vdoctor"] },
|
|
69
|
+
run: run("Varlock doctor", actions.doctor, "Check completed"),
|
|
70
|
+
},
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
export default Plugin.define({
|
|
74
|
+
id: "key-ferry.tui",
|
|
75
|
+
setup(context) {
|
|
76
|
+
// The server RPC uses Effect Schema. The generated Promise client exposes
|
|
77
|
+
// the same validated wire contract, but its declaration only admits
|
|
78
|
+
// PortableDefinition, so this boundary is typed at the safe response.
|
|
79
|
+
const rpc = context.client.rpc(KeyFerryRpc);
|
|
80
|
+
const show = (title, message, variant) => context.ui.toast.show({ title, message, variant });
|
|
81
|
+
context.keymap.layer(() => ({
|
|
82
|
+
mode: "global",
|
|
83
|
+
priority: 20,
|
|
84
|
+
commands: createCommands({
|
|
85
|
+
status: () => rpc.status({}),
|
|
86
|
+
refresh: () => rpc.refresh({}),
|
|
87
|
+
doctor: () => rpc.doctor({}),
|
|
88
|
+
show,
|
|
89
|
+
}),
|
|
90
|
+
}));
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=tui.js.map
|
package/dist/tui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui.js","sourceRoot":"","sources":["../src/tui.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAwBvC,MAAM,YAAY,GAAG,CAAC,KAAc,EAAE,EAAE;IACtC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,wBAAwB,CAAC;IACjF,MAAM,IAAI,GAAG,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;IAC5F,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,gBAAgB;YACnB,OAAO,kCAAkC,CAAC;QAC5C,KAAK,cAAc;YACjB,OAAO,yBAAyB,CAAC;QACnC,KA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E,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,WAAgD,CAAC,CAAC;QACjF,MAAM,IAAI,GAAG,CACX,KAAa,EACb,OAAe,EACf,OAAiD,EACjD,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAExD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;YAC1B,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,cAAc,CAAC;gBACvB,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAA4B;gBACvD,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAA4B;gBACzD,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAA4B;gBACvD,IAAI;aACL,CAAC;SACH,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Layer } from "effect";
|
|
2
|
+
import { ProjectKeyFerryManager, type ProjectKeyFerryManagerFactory, type ProjectKeyFerryManagerOptions, VarlockError } from "../contracts.js";
|
|
3
|
+
import { Process } from "../services/process.js";
|
|
4
|
+
export declare function makeProjectKeyFerryManager(options: ProjectKeyFerryManagerOptions, processLayer?: Layer.Layer<Process, never, never>): Layer.Layer<ProjectKeyFerryManager, VarlockError, never>;
|
|
5
|
+
export declare const projectKeyFerryManagerFactory: ProjectKeyFerryManagerFactory;
|
|
6
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/varlock/manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAoB,KAAK,EAAoB,MAAM,QAAQ,CAAC;AACnE,OAAO,EACL,sBAAsB,EACtB,KAAK,6BAA6B,EAClC,KAAK,6BAA6B,EAIlC,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,OAAO,EAKR,MAAM,wBAAwB,CAAC;AAwUhC,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,6BAA6B,EACtC,YAAY,GAAE,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAe,GAC7D,KAAK,CAAC,KAAK,CAAC,sBAAsB,EAAE,YAAY,EAAE,KAAK,CAAC,CA0U1D;AAED,eAAO,MAAM,6BAA6B,EAAE,6BAE3C,CAAC"}
|