@cloop/runner 0.3.28 → 0.3.30
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 +7 -0
- package/dist/{box-AKPKKX5S.js → box-NK3P3ESD.js} +89 -40
- package/dist/{chunk-EKLBEP32.js → chunk-3YJD6J2N.js} +1 -1
- package/dist/chunk-52CUSFDQ.js +401 -0
- package/dist/{chunk-7GLIYYIB.js → chunk-DYA2BUDB.js} +3 -3
- package/dist/{chunk-3S2ECJTO.js → chunk-EOWS3JIY.js} +182 -89
- package/dist/{chunk-EGO3GOXI.js → chunk-HGKTPD5Z.js} +1 -1
- package/dist/{chunk-MVMKRRE2.js → chunk-IYZLO64O.js} +1 -1
- package/dist/{chunk-ER5JS3RP.js → chunk-J4YN6KXM.js} +40 -137
- package/dist/{chunk-3I6NDELL.js → chunk-JQGHB2EJ.js} +1 -1
- package/dist/{chunk-W4QJS3GR.js → chunk-OTZDNYX4.js} +1 -1
- package/dist/{connect-OC5OH33U.js → connect-RYIPSXZK.js} +9 -7
- package/dist/{disconnect-6WIOMOCW.js → disconnect-FLRZVPXW.js} +7 -7
- package/dist/{existing-runner-KN37YN7Y.js → existing-runner-ATMNX2FX.js} +7 -7
- package/dist/index.js +14 -14
- package/dist/{login-YB3JV5WY.js → login-CNTB5SXY.js} +2 -2
- package/dist/{mcp-server-MD6X5AWJ.js → mcp-server-35YMJHA6.js} +2 -2
- package/dist/{runner-VU7TITZM.js → runner-JDJUWIGC.js} +3 -3
- package/dist/{runs-LM2JFG3P.js → runs-CKN4DINY.js} +2 -2
- package/dist/{statusline-2DBKYHJA.js → statusline-UD4OFVWL.js} +1 -1
- package/dist/{takeover-ANPJB6JG.js → takeover-M4KKYDHN.js} +4 -4
- package/dist/{use-JIQY32FQ.js → use-AFCJUIGA.js} +7 -7
- package/package.json +1 -1
- package/dist/chunk-KYGYU5G2.js +0 -220
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
callOutcome,
|
|
4
|
+
freshness,
|
|
5
|
+
outcomeLine,
|
|
6
|
+
runnerLog
|
|
7
|
+
} from "./chunk-52CUSFDQ.js";
|
|
5
8
|
import {
|
|
6
9
|
readRunnerState,
|
|
7
10
|
runnerStatePath,
|
|
8
11
|
threadsFilePath
|
|
9
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3YJD6J2N.js";
|
|
10
13
|
import {
|
|
11
14
|
BoxToolError,
|
|
12
15
|
CLOOP_THREAD_PREFIX,
|
|
13
16
|
ENVIRONMENTS,
|
|
17
|
+
HARNESS_SIGNED_OUT,
|
|
14
18
|
IMAGE_TYPES,
|
|
15
19
|
MIN_PROTOCOL,
|
|
16
20
|
RUNTIME_MODES,
|
|
@@ -43,7 +47,7 @@ import {
|
|
|
43
47
|
windowsExecutable,
|
|
44
48
|
windowsPowerShellEnv,
|
|
45
49
|
writeBoxConfig
|
|
46
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-EOWS3JIY.js";
|
|
47
51
|
import {
|
|
48
52
|
getMachine,
|
|
49
53
|
shortMachineName
|
|
@@ -61,17 +65,17 @@ import {
|
|
|
61
65
|
} from "./chunk-PKIEWBR7.js";
|
|
62
66
|
import {
|
|
63
67
|
connectWebhook
|
|
64
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-OTZDNYX4.js";
|
|
65
69
|
import {
|
|
66
70
|
ConnectFailure,
|
|
67
71
|
connectReport,
|
|
68
72
|
deviceLogin,
|
|
69
73
|
newAttempt,
|
|
70
74
|
sendConnectReport
|
|
71
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-IYZLO64O.js";
|
|
72
76
|
import {
|
|
73
77
|
VERSION
|
|
74
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-JQGHB2EJ.js";
|
|
75
79
|
import {
|
|
76
80
|
STAGING_ORIGIN,
|
|
77
81
|
getOrigin,
|
|
@@ -258,118 +262,14 @@ function hasChatGptApp(home, platform = process.platform, env = process.env, fs
|
|
|
258
262
|
return false;
|
|
259
263
|
}
|
|
260
264
|
|
|
261
|
-
// src/runner-log.ts
|
|
262
|
-
var RUNNER_TOOLS = [
|
|
263
|
-
"status",
|
|
264
|
-
"threads.list",
|
|
265
|
-
"thread.read",
|
|
266
|
-
"thread.launch",
|
|
267
|
-
"thread.send",
|
|
268
|
-
"thread.interrupt",
|
|
269
|
-
"setup.share",
|
|
270
|
-
"diag"
|
|
271
|
-
];
|
|
272
|
-
var RUNNER_ERRORS = [
|
|
273
|
-
"expired",
|
|
274
|
-
"bad_args",
|
|
275
|
-
"no_project",
|
|
276
|
-
"harness_unavailable",
|
|
277
|
-
"harness_signed_out",
|
|
278
|
-
"runtime_mode_unknown",
|
|
279
|
-
"already_finished",
|
|
280
|
-
"repo_busy",
|
|
281
|
-
"repo_unreachable",
|
|
282
|
-
"cannot_steer",
|
|
283
|
-
"cannot_share",
|
|
284
|
-
"t3_unauthorized",
|
|
285
|
-
"t3_unreachable",
|
|
286
|
-
"t3_error",
|
|
287
|
-
"harness_error",
|
|
288
|
-
"unknown_tool",
|
|
289
|
-
"registry_unreachable",
|
|
290
|
-
"fetch_failed",
|
|
291
|
-
"npx_missing",
|
|
292
|
-
"handover_failed"
|
|
293
|
-
];
|
|
294
|
-
var HARNESS_IDS = ["claude-code", "codex", "claudeAgent", "opencode"];
|
|
295
|
-
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
296
|
-
var VERSION2 = /^\d{1,4}\.\d{1,4}\.\d{1,4}$/;
|
|
297
|
-
var oneOf = (list) => (value) => list.includes(value) ? value : void 0;
|
|
298
|
-
var toolCode = oneOf(RUNNER_TOOLS);
|
|
299
|
-
var uuid = (value) => typeof value === "string" && UUID.test(value) ? value : void 0;
|
|
300
|
-
var count = (value) => typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 1e12 ? value : void 0;
|
|
301
|
-
var version = (value) => typeof value === "string" && VERSION2.test(value) ? value : void 0;
|
|
302
|
-
function errorCode(value) {
|
|
303
|
-
const code = typeof value === "string" && value.startsWith("unknown_tool:") ? "unknown_tool" : value;
|
|
304
|
-
return oneOf(RUNNER_ERRORS)(code);
|
|
305
|
-
}
|
|
306
|
-
function runnerLog(code, fields = {}) {
|
|
307
|
-
const shaped = {
|
|
308
|
-
call: uuid(fields.call),
|
|
309
|
-
work: uuid(fields.work),
|
|
310
|
-
tool: toolCode(fields.tool),
|
|
311
|
-
ms: count(fields.ms),
|
|
312
|
-
error: errorCode(fields.error),
|
|
313
|
-
n: count(fields.n),
|
|
314
|
-
ver: version(fields.ver)
|
|
315
|
-
};
|
|
316
|
-
const frame = { type: "log", code };
|
|
317
|
-
for (const [key, value] of Object.entries(shaped)) {
|
|
318
|
-
if (value !== void 0) Object.assign(frame, { [key]: value });
|
|
319
|
-
}
|
|
320
|
-
return frame;
|
|
321
|
-
}
|
|
322
|
-
function callOutcome(input) {
|
|
323
|
-
return {
|
|
324
|
-
at: new Date(input.at).toISOString(),
|
|
325
|
-
tool: toolCode(input.tool) ?? "other",
|
|
326
|
-
call: uuid(input.call) ?? null,
|
|
327
|
-
work: uuid(input.work) ?? null,
|
|
328
|
-
ms: count(Math.round(input.ms)) ?? 0,
|
|
329
|
-
ok: input.ok,
|
|
330
|
-
error: input.ok ? null : errorCode(input.error) ?? "other"
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
function outcomeLine(o) {
|
|
334
|
-
return `call tool=${o.tool} call=${o.call ?? "-"} work=${o.work ?? "-"} ms=${o.ms} ok=${o.ok}${o.error ? ` error=${o.error}` : ""}`;
|
|
335
|
-
}
|
|
336
|
-
var PLATFORMS = ["darwin", "linux", "win32", "freebsd", "openbsd", "aix", "sunos"];
|
|
337
|
-
var ARCHES = ["arm64", "x64", "arm", "ia32", "ppc64", "s390x"];
|
|
338
|
-
var iso = (value) => typeof value === "string" && !Number.isNaN(Date.parse(value)) && /^\d{4}-\d\d-\d\dT[\d:.]+Z$/.test(value) ? value : null;
|
|
339
|
-
function buildDiag(input) {
|
|
340
|
-
return {
|
|
341
|
-
version: version(input.version) ?? null,
|
|
342
|
-
platform: oneOf(PLATFORMS)(input.platform) ?? "other",
|
|
343
|
-
arch: oneOf(ARCHES)(input.arch) ?? "other",
|
|
344
|
-
uptime_ms: count(Math.round(input.uptimeMs)) ?? 0,
|
|
345
|
-
last_beat_at: iso(input.lastBeatAt),
|
|
346
|
-
last_wake: input.lastWake && iso(input.lastWake.woke_at) ? { slept_ms: count(input.lastWake.slept_ms) ?? 0, woke_at: input.lastWake.woke_at } : null,
|
|
347
|
-
harnesses: input.harnesses.map((h) => ({
|
|
348
|
-
id: oneOf(HARNESS_IDS)(h.id) ?? "other",
|
|
349
|
-
version: typeof h.version === "string" ? h.version.match(/\b\d{1,4}\.\d{1,4}\.\d{1,4}\b/)?.[0] ?? null : null,
|
|
350
|
-
ready: h.ready === true,
|
|
351
|
-
signed_in: h.signedIn === true
|
|
352
|
-
})),
|
|
353
|
-
update: {
|
|
354
|
-
checked_at: iso(input.update.checked_at),
|
|
355
|
-
latest: version(input.update.latest) ?? null,
|
|
356
|
-
error: errorCode(input.update.error) ?? null
|
|
357
|
-
},
|
|
358
|
-
unacked_results: count(input.unacked) ?? 0,
|
|
359
|
-
clock_offset_ms: typeof input.clockOffsetMs === "number" && Number.isInteger(input.clockOffsetMs) && Math.abs(input.clockOffsetMs) <= 1e12 ? input.clockOffsetMs : null,
|
|
360
|
-
// Already shaped: callOutcome is the only way to make one.
|
|
361
|
-
calls: input.calls
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
|
|
365
265
|
// src/box-tools.ts
|
|
366
|
-
var
|
|
266
|
+
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
367
267
|
function parseLaunchArgs(args) {
|
|
368
268
|
const str = (v, max) => typeof v === "string" && v.trim() && v.length <= max ? v.trim() : void 0;
|
|
369
269
|
const work_id = str(args.work_id, 36);
|
|
370
270
|
const title = str(args.title, 200);
|
|
371
271
|
const prompt = str(args.prompt, 1e5);
|
|
372
|
-
if (!work_id || !
|
|
272
|
+
if (!work_id || !UUID.test(work_id) || !title || !prompt) throw new BoxToolError("bad_args");
|
|
373
273
|
const runtime_mode = str(args.runtime_mode, 40);
|
|
374
274
|
if (runtime_mode && !RUNTIME_MODES.has(runtime_mode)) throw new BoxToolError("bad_args");
|
|
375
275
|
return {
|
|
@@ -390,7 +290,7 @@ function parseThreadId(args) {
|
|
|
390
290
|
}
|
|
391
291
|
function parseCommandId(args) {
|
|
392
292
|
const id = args.command_id;
|
|
393
|
-
if (typeof id !== "string" || !
|
|
293
|
+
if (typeof id !== "string" || !UUID.test(id)) throw new BoxToolError("bad_args");
|
|
394
294
|
return id;
|
|
395
295
|
}
|
|
396
296
|
function parseSendArgs(args) {
|
|
@@ -573,13 +473,13 @@ async function probeClaude(bin = "claude") {
|
|
|
573
473
|
exec(bin, ["--version"]),
|
|
574
474
|
exec(bin, ["auth", "status", "--json"])
|
|
575
475
|
]);
|
|
576
|
-
const
|
|
577
|
-
if (!
|
|
476
|
+
const version = versionOut?.trim().split(/\s+/)[0];
|
|
477
|
+
if (!version) return null;
|
|
578
478
|
const { signedIn, account } = claudeAccount(auth);
|
|
579
479
|
return {
|
|
580
480
|
id: "claude-code",
|
|
581
481
|
name: "Claude Code",
|
|
582
|
-
version
|
|
482
|
+
version,
|
|
583
483
|
ready: signedIn,
|
|
584
484
|
signedIn,
|
|
585
485
|
account,
|
|
@@ -715,7 +615,8 @@ function parseClaudeLine(raw, run) {
|
|
|
715
615
|
if (msg.type === "assistant") {
|
|
716
616
|
const content = msg.message?.content;
|
|
717
617
|
if (!Array.isArray(content)) return [];
|
|
718
|
-
|
|
618
|
+
const signedOut = msg.error === "authentication_failed" ? [{ type: "signed_out" }] : [];
|
|
619
|
+
const items = content.flatMap((block) => {
|
|
719
620
|
if (block?.type === "text" && typeof block.text === "string" && block.text.trim())
|
|
720
621
|
return [{ type: "text", text: block.text }];
|
|
721
622
|
if (block?.type === "tool_use" && typeof block.name === "string" && block.name !== "AskUserQuestion") {
|
|
@@ -735,6 +636,7 @@ function parseClaudeLine(raw, run) {
|
|
|
735
636
|
}
|
|
736
637
|
return [];
|
|
737
638
|
});
|
|
639
|
+
return [...items, ...signedOut];
|
|
738
640
|
}
|
|
739
641
|
if (msg.type === "control_request") {
|
|
740
642
|
const request = msg.request;
|
|
@@ -859,16 +761,16 @@ function codexAccount(ok, out2) {
|
|
|
859
761
|
return { signedIn: true, account: /chatgpt/i.test(out2) ? "ChatGPT" : "API key" };
|
|
860
762
|
}
|
|
861
763
|
async function probeCodex(bin = "codex") {
|
|
862
|
-
const [
|
|
764
|
+
const [version, status] = await Promise.all([
|
|
863
765
|
exec2(bin, ["--version"]),
|
|
864
766
|
exec2(bin, ["login", "status"])
|
|
865
767
|
]);
|
|
866
|
-
if (!
|
|
768
|
+
if (!version.ok) return null;
|
|
867
769
|
const { signedIn, account } = codexAccount(status.ok, status.out);
|
|
868
770
|
return {
|
|
869
771
|
id: "codex",
|
|
870
772
|
name: "Codex",
|
|
871
|
-
version:
|
|
773
|
+
version: version.out.trim().split(/\s+/).at(-1) ?? null,
|
|
872
774
|
ready: signedIn,
|
|
873
775
|
signedIn,
|
|
874
776
|
account,
|
|
@@ -929,12 +831,10 @@ function parseCodexLine(raw) {
|
|
|
929
831
|
if (msg.type === "turn.completed") return [{ type: "result", ok: true }];
|
|
930
832
|
if (msg.type === "turn.failed") {
|
|
931
833
|
const message = msg.error?.message;
|
|
834
|
+
const text = typeof message === "string" ? errorMessage(message) : void 0;
|
|
932
835
|
return [
|
|
933
|
-
{
|
|
934
|
-
|
|
935
|
-
ok: false,
|
|
936
|
-
...typeof message === "string" ? { text: errorMessage(message) } : {}
|
|
937
|
-
}
|
|
836
|
+
{ type: "result", ok: false, ...text ? { text } : {} },
|
|
837
|
+
...text && HARNESS_SIGNED_OUT.test(text) ? [{ type: "signed_out" }] : []
|
|
938
838
|
];
|
|
939
839
|
}
|
|
940
840
|
return [];
|
|
@@ -1696,18 +1596,19 @@ var endDaemonStep = (environment) => ({
|
|
|
1696
1596
|
],
|
|
1697
1597
|
mayFail: true
|
|
1698
1598
|
});
|
|
1699
|
-
function programFor(script, node, npx,
|
|
1599
|
+
function programFor(script, node, npx, version) {
|
|
1700
1600
|
if (!/[\\/]_npx[\\/]/.test(script)) return [node, script, "box", "run"];
|
|
1701
1601
|
if (!npx)
|
|
1702
1602
|
return "npx is not on PATH, so the service cannot run Cloop. Install it with `npm install -g @cloop/runner` and run `cloop connect` again.";
|
|
1703
|
-
return [npx, "-y", `@cloop/runner@${
|
|
1603
|
+
return [npx, "-y", `@cloop/runner@${version}`, "box", "run"];
|
|
1704
1604
|
}
|
|
1705
1605
|
function findNpx() {
|
|
1706
1606
|
const name = process.platform === "win32" ? "npx.cmd" : "npx";
|
|
1707
1607
|
const beside = join3(dirname2(process.execPath), name);
|
|
1708
1608
|
return existsSync5(beside) ? beside : which(name);
|
|
1709
1609
|
}
|
|
1710
|
-
|
|
1610
|
+
var FIRST_CONNECT_MS = 9e4;
|
|
1611
|
+
async function awaitDaemon(since, read = readRunnerState, { timeoutMs = FIRST_CONNECT_MS, pollMs = 500 } = {}) {
|
|
1711
1612
|
for (let waited = 0; ; waited += pollMs) {
|
|
1712
1613
|
const state = read();
|
|
1713
1614
|
if (state && Date.parse(state.connected_at) >= since) return true;
|
|
@@ -2042,9 +1943,9 @@ async function t3Answers(t3Url) {
|
|
|
2042
1943
|
}
|
|
2043
1944
|
}
|
|
2044
1945
|
function harnessLine(h) {
|
|
2045
|
-
const
|
|
1946
|
+
const version = h.version ? ` ${h.version}` : "";
|
|
2046
1947
|
const account = h.signedIn ? h.account ?? "signed in" : "signed out";
|
|
2047
|
-
return `${h.name}${
|
|
1948
|
+
return `${h.name}${version}, ${account}${h.experimental ? " (experimental)" : ""}`;
|
|
2048
1949
|
}
|
|
2049
1950
|
async function runSteps(steps, run = (command) => void execFileSync2(command[0], command.slice(1), { stdio: "ignore", timeout: 15e3 }), wait = (ms) => new Promise((r) => setTimeout(r, ms))) {
|
|
2050
1951
|
for (const step of steps) {
|
|
@@ -2136,9 +2037,12 @@ async function installService(kind, argv, attempt, services = systemServices) {
|
|
|
2136
2037
|
);
|
|
2137
2038
|
}
|
|
2138
2039
|
attempt.step = "first_connect";
|
|
2040
|
+
out(
|
|
2041
|
+
" Waiting for the machine to reach Cloop. A first start downloads the runner, so this can take a minute."
|
|
2042
|
+
);
|
|
2139
2043
|
if (!await services.awaitUp(since)) {
|
|
2140
2044
|
out(
|
|
2141
|
-
`${red("\u2717")} ${unit.path} started, but the machine did not reach Cloop within
|
|
2045
|
+
`${red("\u2717")} ${unit.path} started, but the machine did not reach Cloop within ${FIRST_CONNECT_MS / 1e3} s. Its last log lines:`
|
|
2142
2046
|
);
|
|
2143
2047
|
try {
|
|
2144
2048
|
out(services.run(unit.tail));
|
|
@@ -2516,10 +2420,10 @@ function signInClaude(bin) {
|
|
|
2516
2420
|
return runShown2([bin, "auth", "login"], true).status === 0 ? probeClaude(bin) : Promise.resolve(null);
|
|
2517
2421
|
}
|
|
2518
2422
|
async function claudeAtFloor(found, forced, update) {
|
|
2519
|
-
const
|
|
2423
|
+
const version = found.claude?.version;
|
|
2520
2424
|
const codex = forced === "codex" || !forced && !found.claude?.signedIn && Boolean(found.codex?.signedIn);
|
|
2521
|
-
if (!
|
|
2522
|
-
out(`${bold("Cloop machine")} ${claudeTooOld(
|
|
2425
|
+
if (!version || codex || !olderThan(version, CLAUDE_FLOOR)) return found;
|
|
2426
|
+
out(`${bold("Cloop machine")} ${claudeTooOld(version)} Updating it.`);
|
|
2523
2427
|
const claude = await update();
|
|
2524
2428
|
if (!claude?.version || olderThan(claude.version, CLAUDE_FLOOR))
|
|
2525
2429
|
throw new ConnectFailure(
|
|
@@ -2605,8 +2509,6 @@ async function connectCommand(argv) {
|
|
|
2605
2509
|
}
|
|
2606
2510
|
|
|
2607
2511
|
export {
|
|
2608
|
-
runnerLog,
|
|
2609
|
-
buildDiag,
|
|
2610
2512
|
classifyError,
|
|
2611
2513
|
answerCall,
|
|
2612
2514
|
SUBSCRIPTIONS,
|
|
@@ -2641,6 +2543,7 @@ export {
|
|
|
2641
2543
|
endDaemonScript,
|
|
2642
2544
|
programFor,
|
|
2643
2545
|
findNpx,
|
|
2546
|
+
FIRST_CONNECT_MS,
|
|
2644
2547
|
awaitDaemon,
|
|
2645
2548
|
unitEnv,
|
|
2646
2549
|
serviceEnv,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
DEFAULT_T3_URL,
|
|
4
4
|
DRIVER_NAME,
|
|
5
|
+
FIRST_CONNECT_MS,
|
|
5
6
|
T3PairError,
|
|
6
7
|
WINGET_UPDATE,
|
|
7
8
|
askHidden,
|
|
@@ -52,22 +53,23 @@ import {
|
|
|
52
53
|
which,
|
|
53
54
|
workFolder,
|
|
54
55
|
workFolderLine
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-J4YN6KXM.js";
|
|
57
|
+
import "./chunk-52CUSFDQ.js";
|
|
58
|
+
import "./chunk-3YJD6J2N.js";
|
|
59
|
+
import "./chunk-EOWS3JIY.js";
|
|
59
60
|
import "./chunk-NTXQLEMQ.js";
|
|
60
61
|
import "./chunk-VK6GV757.js";
|
|
61
62
|
import "./chunk-365HFCQQ.js";
|
|
62
63
|
import "./chunk-PKIEWBR7.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
64
|
+
import "./chunk-OTZDNYX4.js";
|
|
65
|
+
import "./chunk-IYZLO64O.js";
|
|
65
66
|
import "./chunk-ES5BRAKJ.js";
|
|
66
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-JQGHB2EJ.js";
|
|
67
68
|
import "./chunk-D5UZW42X.js";
|
|
68
69
|
export {
|
|
69
70
|
DEFAULT_T3_URL,
|
|
70
71
|
DRIVER_NAME,
|
|
72
|
+
FIRST_CONNECT_MS,
|
|
71
73
|
T3PairError,
|
|
72
74
|
WINGET_UPDATE,
|
|
73
75
|
askHidden,
|
|
@@ -7,18 +7,18 @@ import {
|
|
|
7
7
|
runnerOrigin,
|
|
8
8
|
stopService,
|
|
9
9
|
unitOrigin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-J4YN6KXM.js";
|
|
11
|
+
import "./chunk-52CUSFDQ.js";
|
|
12
|
+
import "./chunk-3YJD6J2N.js";
|
|
13
|
+
import "./chunk-EOWS3JIY.js";
|
|
14
14
|
import "./chunk-NTXQLEMQ.js";
|
|
15
15
|
import "./chunk-VK6GV757.js";
|
|
16
16
|
import "./chunk-365HFCQQ.js";
|
|
17
17
|
import "./chunk-PKIEWBR7.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-OTZDNYX4.js";
|
|
19
|
+
import "./chunk-IYZLO64O.js";
|
|
20
20
|
import "./chunk-ES5BRAKJ.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-JQGHB2EJ.js";
|
|
22
22
|
import "./chunk-D5UZW42X.js";
|
|
23
23
|
export {
|
|
24
24
|
disconnect,
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
existingRunnerEnvironment,
|
|
4
4
|
pinExistingRunner
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-J4YN6KXM.js";
|
|
6
|
+
import "./chunk-52CUSFDQ.js";
|
|
7
|
+
import "./chunk-3YJD6J2N.js";
|
|
8
|
+
import "./chunk-EOWS3JIY.js";
|
|
9
9
|
import "./chunk-NTXQLEMQ.js";
|
|
10
10
|
import "./chunk-VK6GV757.js";
|
|
11
11
|
import "./chunk-365HFCQQ.js";
|
|
12
12
|
import "./chunk-PKIEWBR7.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-OTZDNYX4.js";
|
|
14
|
+
import "./chunk-IYZLO64O.js";
|
|
15
15
|
import "./chunk-ES5BRAKJ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-JQGHB2EJ.js";
|
|
17
17
|
import "./chunk-D5UZW42X.js";
|
|
18
18
|
export {
|
|
19
19
|
existingRunnerEnvironment,
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-365HFCQQ.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JQGHB2EJ.js";
|
|
8
8
|
import {
|
|
9
9
|
applyEnvironmentFlag
|
|
10
10
|
} from "./chunk-D5UZW42X.js";
|
|
@@ -65,7 +65,7 @@ Add --staging to any command to use Cloop staging instead of production.
|
|
|
65
65
|
A production machine and a staging machine can run side by side on one computer.
|
|
66
66
|
`;
|
|
67
67
|
async function pinExistingRunner() {
|
|
68
|
-
const { pinExistingRunner: pin } = await import("./existing-runner-
|
|
68
|
+
const { pinExistingRunner: pin } = await import("./existing-runner-ATMNX2FX.js");
|
|
69
69
|
const { note } = pin();
|
|
70
70
|
if (note) console.error(note);
|
|
71
71
|
}
|
|
@@ -73,7 +73,7 @@ async function main() {
|
|
|
73
73
|
switch (command) {
|
|
74
74
|
case "login":
|
|
75
75
|
case "auth": {
|
|
76
|
-
const { loginCommand } = await import("./login-
|
|
76
|
+
const { loginCommand } = await import("./login-CNTB5SXY.js");
|
|
77
77
|
await loginCommand(argv);
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
@@ -83,61 +83,61 @@ async function main() {
|
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
85
|
case "serve": {
|
|
86
|
-
const { startMcpServer } = await import("./mcp-server-
|
|
86
|
+
const { startMcpServer } = await import("./mcp-server-35YMJHA6.js");
|
|
87
87
|
await startMcpServer();
|
|
88
88
|
break;
|
|
89
89
|
}
|
|
90
90
|
case "statusline": {
|
|
91
|
-
const { statuslineCommand } = await import("./statusline-
|
|
91
|
+
const { statuslineCommand } = await import("./statusline-UD4OFVWL.js");
|
|
92
92
|
statuslineCommand();
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
case "connect": {
|
|
96
|
-
const { connectCommand } = await import("./connect-
|
|
96
|
+
const { connectCommand } = await import("./connect-RYIPSXZK.js");
|
|
97
97
|
await connectCommand(argv.slice(1));
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
100
|
case "use": {
|
|
101
|
-
const { useCommand } = await import("./use-
|
|
101
|
+
const { useCommand } = await import("./use-AFCJUIGA.js");
|
|
102
102
|
process.exitCode = await useCommand(argv.slice(1));
|
|
103
103
|
break;
|
|
104
104
|
}
|
|
105
105
|
case "disconnect": {
|
|
106
|
-
const { disconnectCommand } = await import("./disconnect-
|
|
106
|
+
const { disconnectCommand } = await import("./disconnect-FLRZVPXW.js");
|
|
107
107
|
await disconnectCommand(argv.slice(1));
|
|
108
108
|
break;
|
|
109
109
|
}
|
|
110
110
|
case "box": {
|
|
111
|
-
const { boxCommand } = await import("./box-
|
|
111
|
+
const { boxCommand } = await import("./box-NK3P3ESD.js");
|
|
112
112
|
await boxCommand(argv.slice(1));
|
|
113
113
|
break;
|
|
114
114
|
}
|
|
115
115
|
case "runs": {
|
|
116
116
|
await pinExistingRunner();
|
|
117
|
-
const { runsCommand } = await import("./runs-
|
|
117
|
+
const { runsCommand } = await import("./runs-CKN4DINY.js");
|
|
118
118
|
process.exitCode = runsCommand();
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
121
|
case "watch": {
|
|
122
122
|
await pinExistingRunner();
|
|
123
|
-
const { watchCommand } = await import("./runs-
|
|
123
|
+
const { watchCommand } = await import("./runs-CKN4DINY.js");
|
|
124
124
|
process.exitCode = await watchCommand(argv.slice(1));
|
|
125
125
|
break;
|
|
126
126
|
}
|
|
127
127
|
case "takeover": {
|
|
128
128
|
await pinExistingRunner();
|
|
129
|
-
const { takeoverCommand } = await import("./takeover-
|
|
129
|
+
const { takeoverCommand } = await import("./takeover-M4KKYDHN.js");
|
|
130
130
|
process.exitCode = await takeoverCommand(argv.slice(1));
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
133
|
case "resume": {
|
|
134
134
|
await pinExistingRunner();
|
|
135
|
-
const { resumeCommand } = await import("./runs-
|
|
135
|
+
const { resumeCommand } = await import("./runs-CKN4DINY.js");
|
|
136
136
|
process.exitCode = await resumeCommand(argv.slice(1));
|
|
137
137
|
break;
|
|
138
138
|
}
|
|
139
139
|
case "runner": {
|
|
140
|
-
const { runnerCommand } = await import("./runner-
|
|
140
|
+
const { runnerCommand } = await import("./runner-JDJUWIGC.js");
|
|
141
141
|
await runnerCommand(argv.slice(1));
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
deviceLogin,
|
|
4
4
|
loginCommand,
|
|
5
5
|
refusalSentence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IYZLO64O.js";
|
|
7
7
|
import "./chunk-ES5BRAKJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JQGHB2EJ.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
deviceLogin,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
MeshSocket,
|
|
16
16
|
defaultSocketFactory
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-52CUSFDQ.js";
|
|
18
18
|
import {
|
|
19
19
|
HeartbeatClient,
|
|
20
20
|
detectPlatform,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from "./chunk-ES5BRAKJ.js";
|
|
34
34
|
import {
|
|
35
35
|
VERSION
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JQGHB2EJ.js";
|
|
37
37
|
import {
|
|
38
38
|
getMeshUrl,
|
|
39
39
|
getToken
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
connectWebhook,
|
|
4
4
|
runnerCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OTZDNYX4.js";
|
|
6
|
+
import "./chunk-IYZLO64O.js";
|
|
7
7
|
import "./chunk-ES5BRAKJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-JQGHB2EJ.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
connectWebhook,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
runsCommand,
|
|
10
10
|
sessionFolder,
|
|
11
11
|
watchCommand
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-HGKTPD5Z.js";
|
|
13
|
+
import "./chunk-EOWS3JIY.js";
|
|
14
14
|
import "./chunk-VK6GV757.js";
|
|
15
15
|
import "./chunk-D5UZW42X.js";
|
|
16
16
|
export {
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
takeoverDir,
|
|
10
10
|
writeTakeoverReply,
|
|
11
11
|
writeTakeoverRequest
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-DYA2BUDB.js";
|
|
13
|
+
import "./chunk-HGKTPD5Z.js";
|
|
14
|
+
import "./chunk-3YJD6J2N.js";
|
|
15
|
+
import "./chunk-EOWS3JIY.js";
|
|
16
16
|
import "./chunk-NTXQLEMQ.js";
|
|
17
17
|
import "./chunk-VK6GV757.js";
|
|
18
18
|
import "./chunk-ES5BRAKJ.js";
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
DRIVER_NAME,
|
|
4
4
|
pinExistingRunner,
|
|
5
5
|
runConnect
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-J4YN6KXM.js";
|
|
7
|
+
import "./chunk-52CUSFDQ.js";
|
|
8
|
+
import "./chunk-3YJD6J2N.js";
|
|
9
9
|
import {
|
|
10
10
|
isLocal,
|
|
11
11
|
readRunnerConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EOWS3JIY.js";
|
|
13
13
|
import "./chunk-NTXQLEMQ.js";
|
|
14
14
|
import "./chunk-VK6GV757.js";
|
|
15
15
|
import "./chunk-365HFCQQ.js";
|
|
16
16
|
import "./chunk-PKIEWBR7.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OTZDNYX4.js";
|
|
18
|
+
import "./chunk-IYZLO64O.js";
|
|
19
19
|
import "./chunk-ES5BRAKJ.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-JQGHB2EJ.js";
|
|
21
21
|
import "./chunk-D5UZW42X.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/use.ts
|
package/package.json
CHANGED