@abitat_reece/host-daemon 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +186 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/local-control/codex-bridge.d.ts +14 -0
- package/dist/local-control/codex-bridge.d.ts.map +1 -0
- package/dist/local-control/codex-bridge.js +778 -0
- package/dist/local-control/codex-bridge.js.map +1 -0
- package/dist/local-control/relay-client.d.ts +36 -0
- package/dist/local-control/relay-client.d.ts.map +1 -0
- package/dist/local-control/relay-client.js +164 -0
- package/dist/local-control/relay-client.js.map +1 -0
- package/dist/local-control/server.d.ts +107 -0
- package/dist/local-control/server.d.ts.map +1 -0
- package/dist/local-control/server.js +393 -0
- package/dist/local-control/server.js.map +1 -0
- package/dist/local-control/state.d.ts +85 -0
- package/dist/local-control/state.d.ts.map +1 -0
- package/dist/local-control/state.js +264 -0
- package/dist/local-control/state.js.map +1 -0
- package/dist/local-control/transport.d.ts +78 -0
- package/dist/local-control/transport.d.ts.map +1 -0
- package/dist/local-control/transport.js +408 -0
- package/dist/local-control/transport.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { execFile as execFileCallback, spawn } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
const execFile = promisify(execFileCallback);
|
|
4
|
+
export async function resolveLocalControlTransport(input) {
|
|
5
|
+
if (input.endpoint) {
|
|
6
|
+
return {
|
|
7
|
+
bindHost: "0.0.0.0",
|
|
8
|
+
endpoint: trimTrailingSlash(input.endpoint),
|
|
9
|
+
transport: input.requestedTransport === "auto" || input.requestedTransport === "temporary-tunnel"
|
|
10
|
+
? "manual"
|
|
11
|
+
: input.requestedTransport
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
if (input.requestedTransport === "tailscale" || input.requestedTransport === "auto") {
|
|
15
|
+
const tailscale = await resolveTailscaleEndpoint(input.port, input.execFile ?? execFile).catch((error) => ({
|
|
16
|
+
warning: `Tailscale endpoint unavailable: ${errorMessage(error)}`
|
|
17
|
+
}));
|
|
18
|
+
if ("endpoint" in tailscale) {
|
|
19
|
+
return tailscale;
|
|
20
|
+
}
|
|
21
|
+
if (input.requestedTransport === "tailscale") {
|
|
22
|
+
return {
|
|
23
|
+
bindHost: "127.0.0.1",
|
|
24
|
+
endpoint: `http://127.0.0.1:${input.port}`,
|
|
25
|
+
transport: "local",
|
|
26
|
+
warning: tailscale.warning
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
bindHost: "127.0.0.1",
|
|
31
|
+
endpoint: `http://127.0.0.1:${input.port}`,
|
|
32
|
+
transport: "local",
|
|
33
|
+
warning: tailscale.warning
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (input.requestedTransport === "quick-tunnel") {
|
|
37
|
+
return {
|
|
38
|
+
bindHost: "127.0.0.1",
|
|
39
|
+
endpoint: `http://127.0.0.1:${input.port}`,
|
|
40
|
+
transport: "quick-tunnel",
|
|
41
|
+
warning: "Quick Tunnel endpoint will be resolved after the local server starts."
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
if (input.requestedTransport === "relay") {
|
|
45
|
+
const relayEndpoint = trimTrailingSlash(input.relayEndpoint ?? "https://workspace.abitat.io");
|
|
46
|
+
return {
|
|
47
|
+
bindHost: "127.0.0.1",
|
|
48
|
+
endpoint: relayEndpoint,
|
|
49
|
+
relayEndpoint,
|
|
50
|
+
transport: "relay",
|
|
51
|
+
warning: "Relay endpoint will route through this Mac after the local server starts."
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (input.requestedTransport === "temporary-tunnel") {
|
|
55
|
+
return {
|
|
56
|
+
bindHost: "127.0.0.1",
|
|
57
|
+
endpoint: `http://127.0.0.1:${input.port}`,
|
|
58
|
+
transport: "manual",
|
|
59
|
+
warning: "Temporary tunnel endpoint will be resolved after the local server starts."
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
bindHost: "127.0.0.1",
|
|
64
|
+
endpoint: `http://127.0.0.1:${input.port}`,
|
|
65
|
+
transport: "local"
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export function startQuickTunnel(input) {
|
|
69
|
+
const spawnProcess = input.spawnProcess ??
|
|
70
|
+
((file, args) => spawn(file, args, { stdio: ["ignore", "pipe", "pipe"] }));
|
|
71
|
+
const child = spawnProcess("cloudflared", ["tunnel", "--url", input.localUrl]);
|
|
72
|
+
const timeoutMs = input.timeoutMs ?? 30_000;
|
|
73
|
+
return new Promise((resolve, reject) => {
|
|
74
|
+
let settled = false;
|
|
75
|
+
let output = "";
|
|
76
|
+
const timer = setTimeout(() => {
|
|
77
|
+
fail(new Error("Timed out waiting for Cloudflare Quick Tunnel URL from cloudflared. Check the cloudflared output and try again."));
|
|
78
|
+
}, timeoutMs);
|
|
79
|
+
timer.unref?.();
|
|
80
|
+
const onData = (chunk) => {
|
|
81
|
+
output += chunk.toString();
|
|
82
|
+
const endpoint = parseQuickTunnelEndpoint(output);
|
|
83
|
+
if (!endpoint) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
cleanup();
|
|
87
|
+
settled = true;
|
|
88
|
+
resolve({
|
|
89
|
+
endpoint,
|
|
90
|
+
close: () => closeQuickTunnelProcess(child)
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const onError = (error) => {
|
|
94
|
+
fail(quickTunnelStartError(error));
|
|
95
|
+
};
|
|
96
|
+
const onExit = (code, signal) => {
|
|
97
|
+
fail(new Error(`cloudflared exited before creating a Quick Tunnel URL (code=${code ?? "null"}, signal=${signal ?? "null"}). Install cloudflared on the Mac with: brew install cloudflared`));
|
|
98
|
+
};
|
|
99
|
+
const cleanup = () => {
|
|
100
|
+
clearTimeout(timer);
|
|
101
|
+
child.stdout.off("data", onData);
|
|
102
|
+
child.stderr.off("data", onData);
|
|
103
|
+
child.off("error", onError);
|
|
104
|
+
child.off("exit", onExit);
|
|
105
|
+
};
|
|
106
|
+
const fail = (error) => {
|
|
107
|
+
if (settled) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
cleanup();
|
|
111
|
+
settled = true;
|
|
112
|
+
reject(error);
|
|
113
|
+
};
|
|
114
|
+
child.stdout.on("data", onData);
|
|
115
|
+
child.stderr.on("data", onData);
|
|
116
|
+
child.once("error", onError);
|
|
117
|
+
child.once("exit", onExit);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export function startLocalhostRunTunnel(input) {
|
|
121
|
+
const origin = new URL(input.localUrl);
|
|
122
|
+
const port = origin.port || (origin.protocol === "https:" ? "443" : "80");
|
|
123
|
+
const remote = `80:${origin.hostname}:${port}`;
|
|
124
|
+
const spawnProcess = input.spawnProcess ??
|
|
125
|
+
((file, args) => spawn(file, args, { stdio: ["ignore", "pipe", "pipe"] }));
|
|
126
|
+
const child = spawnProcess("ssh", [
|
|
127
|
+
"-o",
|
|
128
|
+
"BatchMode=yes",
|
|
129
|
+
"-o",
|
|
130
|
+
"ConnectTimeout=10",
|
|
131
|
+
"-o",
|
|
132
|
+
"ExitOnForwardFailure=yes",
|
|
133
|
+
"-o",
|
|
134
|
+
"ServerAliveInterval=15",
|
|
135
|
+
"-o",
|
|
136
|
+
"StrictHostKeyChecking=accept-new",
|
|
137
|
+
"-R",
|
|
138
|
+
remote,
|
|
139
|
+
"nokey@localhost.run"
|
|
140
|
+
]);
|
|
141
|
+
const timeoutMs = input.timeoutMs ?? 30_000;
|
|
142
|
+
return new Promise((resolve, reject) => {
|
|
143
|
+
let settled = false;
|
|
144
|
+
let output = "";
|
|
145
|
+
const timer = setTimeout(() => {
|
|
146
|
+
fail(new Error("Timed out waiting for localhost.run tunnel URL from ssh."));
|
|
147
|
+
}, timeoutMs);
|
|
148
|
+
timer.unref?.();
|
|
149
|
+
const onData = (chunk) => {
|
|
150
|
+
output += chunk.toString();
|
|
151
|
+
const endpoint = parseLocalhostRunEndpoint(output);
|
|
152
|
+
if (!endpoint) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
cleanup();
|
|
156
|
+
settled = true;
|
|
157
|
+
resolve({
|
|
158
|
+
endpoint,
|
|
159
|
+
close: () => closeQuickTunnelProcess(child)
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const onError = (error) => {
|
|
163
|
+
fail(localhostRunStartError(error));
|
|
164
|
+
};
|
|
165
|
+
const onExit = (code, signal) => {
|
|
166
|
+
fail(new Error(`ssh exited before creating a localhost.run tunnel URL (code=${code ?? "null"}, signal=${signal ?? "null"}).`));
|
|
167
|
+
};
|
|
168
|
+
const cleanup = () => {
|
|
169
|
+
clearTimeout(timer);
|
|
170
|
+
child.stdout.off("data", onData);
|
|
171
|
+
child.stderr.off("data", onData);
|
|
172
|
+
child.off("error", onError);
|
|
173
|
+
child.off("exit", onExit);
|
|
174
|
+
};
|
|
175
|
+
const fail = (error) => {
|
|
176
|
+
if (settled) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
cleanup();
|
|
180
|
+
settled = true;
|
|
181
|
+
reject(error);
|
|
182
|
+
};
|
|
183
|
+
child.stdout.on("data", onData);
|
|
184
|
+
child.stderr.on("data", onData);
|
|
185
|
+
child.once("error", onError);
|
|
186
|
+
child.once("exit", onExit);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
export function startPinggyTunnel(input) {
|
|
190
|
+
const origin = new URL(input.localUrl);
|
|
191
|
+
const port = origin.port || (origin.protocol === "https:" ? "443" : "80");
|
|
192
|
+
const remote = `0:${origin.hostname}:${port}`;
|
|
193
|
+
const spawnProcess = input.spawnProcess ??
|
|
194
|
+
((file, args) => spawn(file, args, { stdio: ["ignore", "pipe", "pipe"] }));
|
|
195
|
+
const child = spawnProcess("ssh", [
|
|
196
|
+
"-o",
|
|
197
|
+
"BatchMode=yes",
|
|
198
|
+
"-o",
|
|
199
|
+
"ConnectTimeout=10",
|
|
200
|
+
"-o",
|
|
201
|
+
"ExitOnForwardFailure=yes",
|
|
202
|
+
"-o",
|
|
203
|
+
"ServerAliveInterval=15",
|
|
204
|
+
"-o",
|
|
205
|
+
"StrictHostKeyChecking=accept-new",
|
|
206
|
+
"-p",
|
|
207
|
+
"443",
|
|
208
|
+
"-R",
|
|
209
|
+
remote,
|
|
210
|
+
"a.pinggy.io"
|
|
211
|
+
]);
|
|
212
|
+
const timeoutMs = input.timeoutMs ?? 30_000;
|
|
213
|
+
return new Promise((resolve, reject) => {
|
|
214
|
+
let settled = false;
|
|
215
|
+
let output = "";
|
|
216
|
+
const timer = setTimeout(() => {
|
|
217
|
+
fail(new Error("Timed out waiting for Pinggy tunnel URL from ssh."));
|
|
218
|
+
}, timeoutMs);
|
|
219
|
+
timer.unref?.();
|
|
220
|
+
const onData = (chunk) => {
|
|
221
|
+
output += chunk.toString();
|
|
222
|
+
const endpoint = parsePinggyEndpoint(output);
|
|
223
|
+
if (!endpoint) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
cleanup();
|
|
227
|
+
settled = true;
|
|
228
|
+
resolve({
|
|
229
|
+
endpoint,
|
|
230
|
+
close: () => closeQuickTunnelProcess(child)
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
const onError = (error) => {
|
|
234
|
+
fail(pinggyStartError(error));
|
|
235
|
+
};
|
|
236
|
+
const onExit = (code, signal) => {
|
|
237
|
+
fail(new Error(`ssh exited before creating a Pinggy tunnel URL (code=${code ?? "null"}, signal=${signal ?? "null"}).`));
|
|
238
|
+
};
|
|
239
|
+
const cleanup = () => {
|
|
240
|
+
clearTimeout(timer);
|
|
241
|
+
child.stdout.off("data", onData);
|
|
242
|
+
child.stderr.off("data", onData);
|
|
243
|
+
child.off("error", onError);
|
|
244
|
+
child.off("exit", onExit);
|
|
245
|
+
};
|
|
246
|
+
const fail = (error) => {
|
|
247
|
+
if (settled) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
cleanup();
|
|
251
|
+
settled = true;
|
|
252
|
+
reject(error);
|
|
253
|
+
};
|
|
254
|
+
child.stdout.on("data", onData);
|
|
255
|
+
child.stderr.on("data", onData);
|
|
256
|
+
child.once("error", onError);
|
|
257
|
+
child.once("exit", onExit);
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
export function startTemporarySshTunnel(input) {
|
|
261
|
+
return startLocalhostRunTunnel(input).catch((error) => {
|
|
262
|
+
input.onFallback?.(error);
|
|
263
|
+
return startPinggyTunnel(input);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
export async function waitForQuickTunnelReady(endpoint, input = {}) {
|
|
267
|
+
const runFetch = input.fetch ?? fetch;
|
|
268
|
+
const timeoutMs = input.timeoutMs ?? 20_000;
|
|
269
|
+
const intervalMs = input.intervalMs ?? 750;
|
|
270
|
+
const healthUrl = new URL("/health", trimTrailingSlash(endpoint)).toString();
|
|
271
|
+
const deadline = Date.now() + timeoutMs;
|
|
272
|
+
let lastError = "not checked yet";
|
|
273
|
+
while (Date.now() <= deadline) {
|
|
274
|
+
try {
|
|
275
|
+
const response = await runFetch(healthUrl, { method: "GET" });
|
|
276
|
+
if (response.ok) {
|
|
277
|
+
const body = (await response.json().catch(() => null));
|
|
278
|
+
if (body?.ok === true) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
lastError = "health endpoint did not return ok=true";
|
|
282
|
+
}
|
|
283
|
+
else {
|
|
284
|
+
lastError = `${response.status} ${response.statusText || "response"}`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
catch (error) {
|
|
288
|
+
lastError = errorMessage(error);
|
|
289
|
+
}
|
|
290
|
+
await sleep(intervalMs);
|
|
291
|
+
}
|
|
292
|
+
throw new Error(`Tunnel endpoint is not reachable at ${healthUrl} (${lastError}). Keep the tunnel running on the Mac and try again.`);
|
|
293
|
+
}
|
|
294
|
+
export function startEndpointHealthMonitor(endpoint, input) {
|
|
295
|
+
const runFetch = input.fetch ?? fetch;
|
|
296
|
+
const intervalMs = input.intervalMs ?? 15_000;
|
|
297
|
+
const maxFailures = input.maxFailures ?? 2;
|
|
298
|
+
const healthUrl = new URL(input.healthPath ?? "/health", trimTrailingSlash(endpoint)).toString();
|
|
299
|
+
let stopped = false;
|
|
300
|
+
let failures = 0;
|
|
301
|
+
const check = async () => {
|
|
302
|
+
if (stopped) {
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
try {
|
|
306
|
+
const response = await runFetch(healthUrl, { method: "GET" });
|
|
307
|
+
if (!response.ok) {
|
|
308
|
+
throw new Error(`${response.status} ${response.statusText || "response"}`);
|
|
309
|
+
}
|
|
310
|
+
const body = (await response.json().catch(() => null));
|
|
311
|
+
if (body?.ok !== true) {
|
|
312
|
+
throw new Error("health endpoint did not return ok=true");
|
|
313
|
+
}
|
|
314
|
+
failures = 0;
|
|
315
|
+
}
|
|
316
|
+
catch (error) {
|
|
317
|
+
failures += 1;
|
|
318
|
+
if (failures >= maxFailures && !stopped) {
|
|
319
|
+
stopped = true;
|
|
320
|
+
input.onUnhealthy(new Error(`Tunnel endpoint is no longer reachable at ${healthUrl}: ${errorMessage(error)}`));
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
const timer = setInterval(() => void check(), intervalMs);
|
|
325
|
+
timer.unref?.();
|
|
326
|
+
void check();
|
|
327
|
+
return {
|
|
328
|
+
stop() {
|
|
329
|
+
stopped = true;
|
|
330
|
+
clearInterval(timer);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
async function resolveTailscaleEndpoint(port, run) {
|
|
335
|
+
const { stdout } = await run("tailscale", ["status", "--json"]);
|
|
336
|
+
const status = JSON.parse(stdout);
|
|
337
|
+
const ips = Array.isArray(status.Self?.TailscaleIPs) ? status.Self?.TailscaleIPs : [];
|
|
338
|
+
const ipv4 = ips.find((ip) => typeof ip === "string" && /^\d+\./u.test(ip));
|
|
339
|
+
if (!ipv4) {
|
|
340
|
+
throw new Error("no Tailscale IPv4 address found");
|
|
341
|
+
}
|
|
342
|
+
return {
|
|
343
|
+
bindHost: "0.0.0.0",
|
|
344
|
+
endpoint: `http://${ipv4}:${port}`,
|
|
345
|
+
transport: "tailscale"
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
function trimTrailingSlash(value) {
|
|
349
|
+
return value.replace(/\/+$/u, "");
|
|
350
|
+
}
|
|
351
|
+
function errorMessage(error) {
|
|
352
|
+
return error instanceof Error ? error.message : String(error);
|
|
353
|
+
}
|
|
354
|
+
function parseQuickTunnelEndpoint(output) {
|
|
355
|
+
return output.match(/https:\/\/[a-z0-9-]+\.trycloudflare\.com/iu)?.[0] ?? null;
|
|
356
|
+
}
|
|
357
|
+
function parseLocalhostRunEndpoint(output) {
|
|
358
|
+
return output.match(/https:\/\/[a-z0-9-]+\.lhr\.life/iu)?.[0] ?? null;
|
|
359
|
+
}
|
|
360
|
+
function parsePinggyEndpoint(output) {
|
|
361
|
+
return output.match(/https:\/\/[a-z0-9-]+\.run\.pinggy-free\.link/iu)?.[0] ?? null;
|
|
362
|
+
}
|
|
363
|
+
function quickTunnelStartError(error) {
|
|
364
|
+
const message = errorMessage(error);
|
|
365
|
+
const code = error && typeof error === "object" && "code" in error ? String(error.code) : undefined;
|
|
366
|
+
if (code === "ENOENT" || message.includes("ENOENT")) {
|
|
367
|
+
return new Error("Install cloudflared on the Mac with: brew install cloudflared. The iPhone does not need Cloudflare or Tailscale.");
|
|
368
|
+
}
|
|
369
|
+
return new Error(`Unable to start Cloudflare Quick Tunnel: ${message}`);
|
|
370
|
+
}
|
|
371
|
+
function localhostRunStartError(error) {
|
|
372
|
+
const message = errorMessage(error);
|
|
373
|
+
const code = error && typeof error === "object" && "code" in error ? String(error.code) : undefined;
|
|
374
|
+
if (code === "ENOENT" || message.includes("ENOENT")) {
|
|
375
|
+
return new Error("Unable to start localhost.run fallback tunnel because ssh is unavailable.");
|
|
376
|
+
}
|
|
377
|
+
return new Error(`Unable to start localhost.run fallback tunnel: ${message}`);
|
|
378
|
+
}
|
|
379
|
+
function pinggyStartError(error) {
|
|
380
|
+
const message = errorMessage(error);
|
|
381
|
+
const code = error && typeof error === "object" && "code" in error ? String(error.code) : undefined;
|
|
382
|
+
if (code === "ENOENT" || message.includes("ENOENT")) {
|
|
383
|
+
return new Error("Unable to start Pinggy fallback tunnel because ssh is unavailable.");
|
|
384
|
+
}
|
|
385
|
+
return new Error(`Unable to start Pinggy fallback tunnel: ${message}`);
|
|
386
|
+
}
|
|
387
|
+
function sleep(ms) {
|
|
388
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
389
|
+
}
|
|
390
|
+
function closeQuickTunnelProcess(child) {
|
|
391
|
+
return new Promise((resolve) => {
|
|
392
|
+
if (child.killed) {
|
|
393
|
+
resolve();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
const timer = setTimeout(() => {
|
|
397
|
+
child.kill("SIGKILL");
|
|
398
|
+
resolve();
|
|
399
|
+
}, 1000);
|
|
400
|
+
timer.unref?.();
|
|
401
|
+
child.once("exit", () => {
|
|
402
|
+
clearTimeout(timer);
|
|
403
|
+
resolve();
|
|
404
|
+
});
|
|
405
|
+
child.kill("SIGTERM");
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
//# sourceMappingURL=transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/local-control/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAoEtC,MAAM,QAAQ,GAAG,SAAS,CAAC,gBAAgB,CAAa,CAAC;AAEzD,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,KAAwC;IAExC,IAAI,KAAK,CAAC,QAAQ,EAAE,CA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AAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAyB;IACxD,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QAED,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACtB,OAAO,EAAE,CAAC;QACZ,CAAC,EAAE,IAAI,CAAC,CAAC;QACT,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAChB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE;YACtB,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abitat_reece/host-daemon",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Mac host daemon for Abitat Workspace remote Codex control",
|
|
7
7
|
"bin": {
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"node-pty": "^1.1.0",
|
|
24
|
+
"qrcode-terminal": "0.12.0",
|
|
24
25
|
"ws": "^8.20.0",
|
|
25
|
-
"@abitat_reece/shared": "0.1.
|
|
26
|
+
"@abitat_reece/shared": "0.1.1"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
29
|
+
"@types/qrcode-terminal": "0.12.2",
|
|
28
30
|
"@types/ws": "^8.18.1",
|
|
29
31
|
"tsx": "4.21.0"
|
|
30
32
|
},
|