@cloop/runner 0.3.14 → 0.3.17
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/{box-E6SANWEH.js → box-MCJBDKDN.js} +68 -34
- package/dist/{chunk-NMVZPTFM.js → chunk-2DSMNE24.js} +11 -6
- package/dist/{chunk-EPMOUT5Y.js → chunk-44BZ2K5L.js} +1 -1
- package/dist/{chunk-3J5FFRLN.js → chunk-H3RGEJME.js} +7 -10
- package/dist/{chunk-BGXIAFPO.js → chunk-K4TU7DBU.js} +1 -1
- package/dist/{chunk-B2ZI2UWS.js → chunk-LXRCJTHL.js} +58 -35
- package/dist/{chunk-5CE6AYV3.js → chunk-OHVU476O.js} +34 -7
- package/dist/{chunk-I726UEFM.js → chunk-P46CX6Z7.js} +1 -1
- package/dist/{chunk-6OF7Y676.js → chunk-QG5HVBJY.js} +1 -1
- package/dist/{connect-NPS3USHB.js → connect-SO3X4ANL.js} +10 -6
- package/dist/{disconnect-XUT7JS2D.js → disconnect-QGO6KQTH.js} +6 -6
- package/dist/{existing-runner-IUTBWXDA.js → existing-runner-WR6A3P3I.js} +6 -6
- package/dist/index.js +14 -14
- package/dist/{login-4HWONCHL.js → login-OAYCNQ2O.js} +2 -2
- package/dist/{mcp-server-KRQ643F5.js → mcp-server-XIJGOXBH.js} +1 -1
- package/dist/{runner-UVQLEEEP.js → runner-GDMWLS5G.js} +3 -3
- package/dist/{runs-4BKFXNM5.js → runs-VGVVNO4S.js} +4 -2
- package/dist/{statusline-PXEKVHFD.js → statusline-O7C5PR36.js} +1 -1
- package/dist/{takeover-FCKTVLQY.js → takeover-E6FYRR4M.js} +4 -4
- package/dist/{use-Z2BUDTNA.js → use-765ZZES6.js} +6 -6
- package/package.json +1 -1
|
@@ -5,13 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-IJH4O27H.js";
|
|
6
6
|
import {
|
|
7
7
|
serveTakeovers
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-H3RGEJME.js";
|
|
9
|
+
import "./chunk-2DSMNE24.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_FALLBACK_MODEL,
|
|
12
12
|
T3Client,
|
|
13
13
|
awaitDaemon,
|
|
14
14
|
claudeDialect,
|
|
15
|
+
cmdWord,
|
|
15
16
|
codexDialect,
|
|
16
17
|
connectCommand,
|
|
17
18
|
findNpx,
|
|
@@ -25,6 +26,7 @@ import {
|
|
|
25
26
|
probeClaudePermissions,
|
|
26
27
|
probeCodex,
|
|
27
28
|
programFor,
|
|
29
|
+
psQuote,
|
|
28
30
|
runBoxTool,
|
|
29
31
|
runSteps,
|
|
30
32
|
serviceEnv,
|
|
@@ -32,7 +34,7 @@ import {
|
|
|
32
34
|
systemServices,
|
|
33
35
|
unitFor,
|
|
34
36
|
which
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-OHVU476O.js";
|
|
36
38
|
import {
|
|
37
39
|
BoxWatch,
|
|
38
40
|
lockThreadsFile,
|
|
@@ -40,7 +42,7 @@ import {
|
|
|
40
42
|
runnerStatePath,
|
|
41
43
|
threadsFilePath,
|
|
42
44
|
writeRunnerState
|
|
43
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-K4TU7DBU.js";
|
|
44
46
|
import {
|
|
45
47
|
LocalDriver,
|
|
46
48
|
T3Driver,
|
|
@@ -50,8 +52,9 @@ import {
|
|
|
50
52
|
runnerEnvironment,
|
|
51
53
|
runnerPath,
|
|
52
54
|
showsOtherThreads,
|
|
55
|
+
windowsPowerShellEnv,
|
|
53
56
|
writeBoxConfig
|
|
54
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-LXRCJTHL.js";
|
|
55
58
|
import {
|
|
56
59
|
getMachine
|
|
57
60
|
} from "./chunk-NTXQLEMQ.js";
|
|
@@ -60,12 +63,12 @@ import {
|
|
|
60
63
|
olderThan
|
|
61
64
|
} from "./chunk-YEO27QQP.js";
|
|
62
65
|
import "./chunk-R3CLO2FB.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-P46CX6Z7.js";
|
|
67
|
+
import "./chunk-44BZ2K5L.js";
|
|
65
68
|
import "./chunk-ES5BRAKJ.js";
|
|
66
69
|
import {
|
|
67
70
|
VERSION
|
|
68
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-QG5HVBJY.js";
|
|
69
72
|
import {
|
|
70
73
|
getMeshUrl,
|
|
71
74
|
getToken,
|
|
@@ -222,23 +225,45 @@ function recordFailed(version, env) {
|
|
|
222
225
|
log(`could not record ${version} as failed: ${err.code ?? err}`);
|
|
223
226
|
}
|
|
224
227
|
}
|
|
225
|
-
function handOverCommand(platform, npx, to, kind) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
function handOverCommand(platform, npx, to, kind, script = adoptScriptPath()) {
|
|
229
|
+
if (platform === "win32")
|
|
230
|
+
return [
|
|
231
|
+
"powershell",
|
|
232
|
+
"-NoProfile",
|
|
233
|
+
"-NonInteractive",
|
|
234
|
+
"-Command",
|
|
235
|
+
[
|
|
236
|
+
"$ErrorActionPreference = 'Stop'",
|
|
237
|
+
`Start-Process -WindowStyle Hidden -FilePath (Join-Path $env:WINDIR 'System32\\conhost.exe') -ArgumentList ('--headless ' + (Join-Path $env:WINDIR 'System32\\cmd.exe') + ' /d /c ' + [char]34 + ${psQuote(script)} + [char]34)`
|
|
238
|
+
].join("; ")
|
|
239
|
+
];
|
|
240
|
+
const adopt2 = adoptWords(npx, to, kind);
|
|
237
241
|
return platform === "linux" ? ["systemd-run", "--user", "--scope", "--quiet", "--collect", "--", ...adopt2] : adopt2;
|
|
238
242
|
}
|
|
239
|
-
|
|
243
|
+
var adoptWords = (npx, to, kind) => [
|
|
244
|
+
npx,
|
|
245
|
+
"-y",
|
|
246
|
+
`@cloop/runner@${to}`,
|
|
247
|
+
"box",
|
|
248
|
+
"adopt",
|
|
249
|
+
"--from",
|
|
250
|
+
VERSION,
|
|
251
|
+
"--kind",
|
|
252
|
+
kind
|
|
253
|
+
];
|
|
254
|
+
function adoptScriptPath() {
|
|
255
|
+
return join2(updateDir(), "adopt.cmd");
|
|
256
|
+
}
|
|
257
|
+
function adoptScript(npx, to, kind, log3) {
|
|
258
|
+
return [
|
|
259
|
+
"@echo off",
|
|
260
|
+
`call ${adoptWords(npx, to, kind).map(cmdWord).join(" ")} >> ${cmdWord(log3)} 2>&1`,
|
|
261
|
+
""
|
|
262
|
+
].join("\r\n");
|
|
263
|
+
}
|
|
264
|
+
function servicePath(kind, platform) {
|
|
240
265
|
return installedService({
|
|
241
|
-
platform
|
|
266
|
+
platform,
|
|
242
267
|
kind,
|
|
243
268
|
environment: runnerEnvironment(),
|
|
244
269
|
home: homedir2(),
|
|
@@ -266,11 +291,11 @@ function fetchVersion(npx, version) {
|
|
|
266
291
|
);
|
|
267
292
|
});
|
|
268
293
|
}
|
|
269
|
-
function selfUpdate(kind) {
|
|
294
|
+
function selfUpdate(kind, platform = process.platform) {
|
|
270
295
|
let latest = null;
|
|
271
296
|
let handing = false;
|
|
272
297
|
let lastWhy = null;
|
|
273
|
-
const canDetach =
|
|
298
|
+
const canDetach = platform === "darwin" || platform === "win32" || platform === "linux" && which("systemd-run") !== null;
|
|
274
299
|
const check = async () => {
|
|
275
300
|
const read = await readLatest();
|
|
276
301
|
if (!read || read === latest || !olderThan(VERSION, read) || read === readFailed()) return;
|
|
@@ -288,10 +313,12 @@ function selfUpdate(kind) {
|
|
|
288
313
|
recordFailed(to);
|
|
289
314
|
return;
|
|
290
315
|
}
|
|
291
|
-
const [command, ...args] = handOverCommand(
|
|
316
|
+
const [command, ...args] = handOverCommand(platform, npx, to, kind);
|
|
292
317
|
let fd;
|
|
293
318
|
try {
|
|
294
319
|
mkdirSync(updateDir(), { recursive: true, mode: 448 });
|
|
320
|
+
if (platform === "win32")
|
|
321
|
+
writeFileSync(adoptScriptPath(), adoptScript(npx, to, kind, updateLogPath()));
|
|
295
322
|
fd = openSync(updateLogPath(), "a");
|
|
296
323
|
} catch (err) {
|
|
297
324
|
log(`could not open ${updateLogPath()}: ${err.code ?? err}`);
|
|
@@ -299,7 +326,11 @@ function selfUpdate(kind) {
|
|
|
299
326
|
}
|
|
300
327
|
handing = true;
|
|
301
328
|
log(`handing over ${VERSION} -> ${to}; its log is ${updateLogPath()}`);
|
|
302
|
-
const child = spawn(
|
|
329
|
+
const child = spawn(
|
|
330
|
+
command,
|
|
331
|
+
args,
|
|
332
|
+
platform === "win32" ? { stdio: "ignore", windowsHide: true, env: windowsPowerShellEnv() } : { detached: true, stdio: ["ignore", fd, fd] }
|
|
333
|
+
);
|
|
303
334
|
closeSync(fd);
|
|
304
335
|
child.unref();
|
|
305
336
|
const failed = (why) => {
|
|
@@ -309,8 +340,7 @@ function selfUpdate(kind) {
|
|
|
309
340
|
};
|
|
310
341
|
child.on("error", (err) => failed(err.message));
|
|
311
342
|
child.on("exit", (code, signal) => {
|
|
312
|
-
if (code
|
|
313
|
-
else failed(signal ? `signal ${signal}` : `exit ${code}`);
|
|
343
|
+
if (code !== 0) failed(signal ? `signal ${signal}` : `exit ${code}`);
|
|
314
344
|
});
|
|
315
345
|
};
|
|
316
346
|
return {
|
|
@@ -319,7 +349,7 @@ function selfUpdate(kind) {
|
|
|
319
349
|
const decision = updateDecision({
|
|
320
350
|
current: VERSION,
|
|
321
351
|
latest,
|
|
322
|
-
unitText: readText(servicePath(kind)),
|
|
352
|
+
unitText: readText(servicePath(kind, platform)),
|
|
323
353
|
running,
|
|
324
354
|
inFlight,
|
|
325
355
|
failed: readFailed(),
|
|
@@ -456,12 +486,15 @@ async function machineHarnesses(cfg) {
|
|
|
456
486
|
}
|
|
457
487
|
async function localDriver(cfg, name) {
|
|
458
488
|
const bin = cfg.driver === name ? cfg.bin : void 0;
|
|
489
|
+
const claude = async (at) => claudeDialect(
|
|
490
|
+
at,
|
|
491
|
+
cfg.fallbackModels ?? DEFAULT_FALLBACK_MODEL,
|
|
492
|
+
cfg.askEverything,
|
|
493
|
+
await probeClaudePermissions(at)
|
|
494
|
+
);
|
|
459
495
|
const driver = new LocalDriver({
|
|
460
|
-
dialect: name === "claude-code" ?
|
|
461
|
-
|
|
462
|
-
}) : codexDialect(bin),
|
|
463
|
-
// Codex on the same machine takes Claude Code's runs while its account is at its usage limit.
|
|
464
|
-
...name === "claude-code" ? { fallbackHarness: codexDialect() } : {},
|
|
496
|
+
dialect: name === "claude-code" ? await claude(bin) : codexDialect(bin),
|
|
497
|
+
fallbackHarness: name === "claude-code" ? codexDialect() : await claude(),
|
|
465
498
|
repos: cfg.repos,
|
|
466
499
|
label: cfg.label,
|
|
467
500
|
harnesses: () => machineHarnesses(cfg),
|
|
@@ -700,6 +733,7 @@ export {
|
|
|
700
733
|
awaitNewDeviceToken,
|
|
701
734
|
boxCommand,
|
|
702
735
|
boxPresence,
|
|
736
|
+
localDriver,
|
|
703
737
|
machineHarnesses,
|
|
704
738
|
recordConnected,
|
|
705
739
|
run,
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
localRunsFilePath,
|
|
7
7
|
readRunRecords,
|
|
8
8
|
readRunnerConfig,
|
|
9
|
+
runHarness,
|
|
9
10
|
runLogDir,
|
|
10
11
|
runLogPath
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LXRCJTHL.js";
|
|
12
13
|
import {
|
|
13
14
|
sanitizeLabel,
|
|
14
15
|
stripControl
|
|
@@ -214,6 +215,11 @@ async function sessionFolder(id, root = join(homedir(), ".claude", "projects"))
|
|
|
214
215
|
}
|
|
215
216
|
return null;
|
|
216
217
|
}
|
|
218
|
+
function ownHarness(deps) {
|
|
219
|
+
if (deps.harness) return { driver: deps.harness, ...deps.bin ? { bin: deps.bin } : {} };
|
|
220
|
+
const cfg = readRunnerConfig();
|
|
221
|
+
return cfg && isLocal(cfg) ? cfg : null;
|
|
222
|
+
}
|
|
217
223
|
async function resumeCommand(args, deps = {}) {
|
|
218
224
|
const { file, out, err } = resolved(deps);
|
|
219
225
|
const id = args[0];
|
|
@@ -221,10 +227,7 @@ async function resumeCommand(args, deps = {}) {
|
|
|
221
227
|
err("Usage: cloop resume <id>. List the runs with: cloop runs");
|
|
222
228
|
return 1;
|
|
223
229
|
}
|
|
224
|
-
const
|
|
225
|
-
const local = cfg && isLocal(cfg) ? cfg : null;
|
|
226
|
-
const harness = deps.harness ?? local?.driver ?? "claude-code";
|
|
227
|
-
const bin = deps.bin ?? local?.bin ?? (harness === "codex" ? "codex" : "claude");
|
|
230
|
+
const own = ownHarness(deps);
|
|
228
231
|
const spawn = deps.spawn ?? ((b, a, cwd) => spawnSync(b, a, { cwd, stdio: "inherit" }).status ?? 1);
|
|
229
232
|
const records = readRunRecords(file);
|
|
230
233
|
const found = findRun(records, id);
|
|
@@ -240,6 +243,7 @@ async function resumeCommand(args, deps = {}) {
|
|
|
240
243
|
err(`The repository ${r.repo} is not on this machine any more.`);
|
|
241
244
|
return 1;
|
|
242
245
|
}
|
|
246
|
+
const { harness, bin } = runHarness(r, own);
|
|
243
247
|
const session = r.session_id ?? (harness === "claude-code" ? r.work_id : null);
|
|
244
248
|
if (!session) {
|
|
245
249
|
err("This run has no session to resume.");
|
|
@@ -251,7 +255,7 @@ async function resumeCommand(args, deps = {}) {
|
|
|
251
255
|
const folder = await sessionFolder(id, deps.claudeProjects);
|
|
252
256
|
if (folder && existsSync(folder)) {
|
|
253
257
|
out(`Opening the session in ${folder}`);
|
|
254
|
-
return spawn(harness
|
|
258
|
+
return spawn(runHarness({ harness: "claude-code" }, own).bin, ["--resume", id], folder);
|
|
255
259
|
}
|
|
256
260
|
err(found.error);
|
|
257
261
|
return 1;
|
|
@@ -265,5 +269,6 @@ export {
|
|
|
265
269
|
runsCommand,
|
|
266
270
|
watchCommand,
|
|
267
271
|
sessionFolder,
|
|
272
|
+
ownHarness,
|
|
268
273
|
resumeCommand
|
|
269
274
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
findRun
|
|
4
|
-
|
|
3
|
+
findRun,
|
|
4
|
+
ownHarness
|
|
5
|
+
} from "./chunk-2DSMNE24.js";
|
|
5
6
|
import {
|
|
6
7
|
lockThreadsFile,
|
|
7
8
|
threadsFilePath
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K4TU7DBU.js";
|
|
9
10
|
import {
|
|
10
|
-
isLocal,
|
|
11
11
|
localRunsFilePath,
|
|
12
12
|
readRunRecords,
|
|
13
|
-
|
|
13
|
+
runHarness,
|
|
14
14
|
takeoverSummary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LXRCJTHL.js";
|
|
16
16
|
import {
|
|
17
17
|
shortMachineName
|
|
18
18
|
} from "./chunk-NTXQLEMQ.js";
|
|
@@ -168,10 +168,7 @@ async function takeoverCommand(args, deps = {}) {
|
|
|
168
168
|
err(`This run has ended. Open it with: cloop resume ${short}`);
|
|
169
169
|
return 1;
|
|
170
170
|
}
|
|
171
|
-
const
|
|
172
|
-
const local = cfg && isLocal(cfg) ? cfg : null;
|
|
173
|
-
const harness = deps.harness ?? local?.driver ?? "claude-code";
|
|
174
|
-
const bin = deps.bin ?? local?.bin ?? (harness === "codex" ? "codex" : "claude");
|
|
171
|
+
const { harness, bin } = runHarness(run, ownHarness(deps));
|
|
175
172
|
const session = run.session_id ?? (harness === "claude-code" ? run.work_id : null);
|
|
176
173
|
if (!session) {
|
|
177
174
|
err("This run has no session yet. Try again in a few seconds.");
|
|
@@ -340,7 +340,8 @@ var RESULT_INSTRUCTION = [
|
|
|
340
340
|
"```",
|
|
341
341
|
"An output kind is one of: pr or link (title, url), draft (title, body, optional to, optional url), doc (title, optional url or body), file (title, path). A check outcome is passed, failed or skipped.",
|
|
342
342
|
"A draft's body is the message itself, as the recipient will read it; if you saved it somewhere (a Gmail draft), put that link in url, never in body. A doc's body is the whole page in GitHub Markdown: headings, lists, bold and tables all show; a table suits one row per item. Give every product, page or source you mention as a full https link.",
|
|
343
|
-
"List as outputs only what this run made. A PR or page you only read, checked or cited goes in the summary, never in outputs."
|
|
343
|
+
"List as outputs only what this run made. A PR or page you only read, checked or cited goes in the summary, never in outputs.",
|
|
344
|
+
"When the ask is to find, compare, summarise or research something, put the whole answer in a doc output with a body, so the owner has one page to read; the summary stays one or two sentences."
|
|
344
345
|
].join("\n");
|
|
345
346
|
var text = (v, max) => typeof v === "string" && v.length <= max;
|
|
346
347
|
var optionalText = (v, max) => v === void 0 || text(v, max);
|
|
@@ -1430,7 +1431,19 @@ var COMMANDS_KEPT = 50;
|
|
|
1430
1431
|
var SUMMARY_MAX2 = 200;
|
|
1431
1432
|
var HARNESS_NAMES = { "claude-code": "Claude Code", codex: "Codex" };
|
|
1432
1433
|
var harnessName = (name) => HARNESS_NAMES[name] ?? name;
|
|
1433
|
-
|
|
1434
|
+
function runHarness(run2, own) {
|
|
1435
|
+
const driver = own?.driver === "codex" ? "codex" : "claude-code";
|
|
1436
|
+
const harness = run2.harness ?? driver;
|
|
1437
|
+
const bin = harness === driver && own?.bin ? own.bin : harness === "codex" ? "codex" : "claude";
|
|
1438
|
+
return { harness, bin };
|
|
1439
|
+
}
|
|
1440
|
+
var MOVE_STATE = {
|
|
1441
|
+
limit: "at its usage limit",
|
|
1442
|
+
signed_out: "signed out here",
|
|
1443
|
+
missing: "not installed here"
|
|
1444
|
+
};
|
|
1445
|
+
var movedLine = (move, from, to) => `${harnessName(from)} ${move.at === "run" ? "was" : "is"} ${MOVE_STATE[move.reason]}, so ${harnessName(to)} did this run.`;
|
|
1446
|
+
var movingLine = (move, from, to) => `${harnessName(from)} is ${MOVE_STATE[move.reason]}, so I moved this to ${harnessName(to)}`;
|
|
1434
1447
|
function failedEnd(harness, run2) {
|
|
1435
1448
|
const said = run2.result?.text?.trim() || run2.lastText;
|
|
1436
1449
|
const limited = HARNESS_LIMIT.test(run2.result?.text ?? "");
|
|
@@ -1442,7 +1455,7 @@ function failedEnd(harness, run2) {
|
|
|
1442
1455
|
summary: `${opening}${run2.result ? "The run ended with an error." : `The run exited with ${run2.exit}.`}`,
|
|
1443
1456
|
...error
|
|
1444
1457
|
};
|
|
1445
|
-
const lead = `${opening}${
|
|
1458
|
+
const lead = `${opening}${harnessName(harness)} said: "`;
|
|
1446
1459
|
const room = SUMMARY_MAX2 - lead.length - 1;
|
|
1447
1460
|
const quoted = words.length > room ? `${words.slice(0, room - 1)}\u2026` : words;
|
|
1448
1461
|
return { summary: `${lead}${quoted}"`, ...error };
|
|
@@ -1643,11 +1656,7 @@ var LocalDriver = class {
|
|
|
1643
1656
|
throw new BoxToolError("harness_unavailable");
|
|
1644
1657
|
const repo = pickRepo(this.deps.repos, a.repository);
|
|
1645
1658
|
this.refuseBusy(repo.path);
|
|
1646
|
-
const
|
|
1647
|
-
const dialect = moved ?? own;
|
|
1648
|
-
const harness = await dialect.probe();
|
|
1649
|
-
if (!harness) throw new BoxToolError("harness_unavailable");
|
|
1650
|
-
if (!harness.signedIn) throw new BoxToolError("harness_signed_out");
|
|
1659
|
+
const { dialect, moved } = await this.route(a);
|
|
1651
1660
|
const head = await this.repo.head(repo.path);
|
|
1652
1661
|
const concurrent = this.runs.get(a.work_id);
|
|
1653
1662
|
if (concurrent)
|
|
@@ -1667,15 +1676,14 @@ var LocalDriver = class {
|
|
|
1667
1676
|
...a.model && !moved ? { model: a.model } : {},
|
|
1668
1677
|
...a.runtime_mode ? { runtime_mode: a.runtime_mode } : {},
|
|
1669
1678
|
...a.harness ? { harness_named: true } : {},
|
|
1670
|
-
...moved ? {
|
|
1671
|
-
harness: moved.name,
|
|
1672
|
-
switched: `${HARNESS_NAMES[own.name]} is at its usage limit, so ${HARNESS_NAMES[moved.name]} did this run.`
|
|
1673
|
-
} : {},
|
|
1679
|
+
...moved ? { harness: dialect.name, moved, switched: movedLine(moved, own.name, dialect.name) } : {},
|
|
1674
1680
|
pid: null,
|
|
1675
1681
|
started_at: new Date(this.now()).toISOString(),
|
|
1676
1682
|
head_at_launch: head
|
|
1677
1683
|
};
|
|
1678
1684
|
this.runs.set(a.work_id, record);
|
|
1685
|
+
if (moved)
|
|
1686
|
+
this.log(`fallback work=${a.work_id} harness=${dialect.name} reason=${moved.reason}`);
|
|
1679
1687
|
this.spawnRun(record, a.prompt, false);
|
|
1680
1688
|
return {
|
|
1681
1689
|
thread_id: a.work_id,
|
|
@@ -1817,17 +1825,34 @@ ${a.text}` : a.text;
|
|
|
1817
1825
|
return fallback && r.harness === fallback.name ? fallback : this.deps.dialect;
|
|
1818
1826
|
}
|
|
1819
1827
|
/**
|
|
1820
|
-
* The fallback harness,
|
|
1821
|
-
*
|
|
1822
|
-
*
|
|
1828
|
+
* The fallback harness, when it may carry this run. A move never gives a
|
|
1829
|
+
* run more access than its own harness would: a run that asks the owner
|
|
1830
|
+
* does not go to a harness that asks nothing.
|
|
1823
1831
|
*/
|
|
1824
|
-
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1832
|
+
carrier(run2, own) {
|
|
1833
|
+
const to = this.deps.fallbackHarness;
|
|
1834
|
+
return to && (to.permission?.(run2) !== "full" || own === "full") ? to : null;
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* A Task that names its harness stays on it. Otherwise a run starts on the
|
|
1838
|
+
* fallback while the runner's own harness is held at its limit, or when the
|
|
1839
|
+
* own harness is signed out or not installed and the fallback is signed in.
|
|
1840
|
+
*/
|
|
1841
|
+
async route(a) {
|
|
1842
|
+
const own = this.deps.dialect;
|
|
1827
1843
|
const mode = a.runtime_mode ? { runtime_mode: a.runtime_mode } : {};
|
|
1828
|
-
|
|
1829
|
-
const
|
|
1830
|
-
|
|
1844
|
+
const to = a.harness ? null : this.carrier(mode, own.permission?.(mode));
|
|
1845
|
+
const ready = async () => Boolean(to && (await to.probe().catch(() => null))?.signedIn);
|
|
1846
|
+
if (to && this.now() < this.limitedUntil && await ready())
|
|
1847
|
+
return { dialect: to, moved: { reason: "limit", at: "launch" } };
|
|
1848
|
+
const harness = await own.probe();
|
|
1849
|
+
if (harness?.signedIn) return { dialect: own };
|
|
1850
|
+
if (to && await ready())
|
|
1851
|
+
return {
|
|
1852
|
+
dialect: to,
|
|
1853
|
+
moved: { reason: harness ? "signed_out" : "missing", at: "launch" }
|
|
1854
|
+
};
|
|
1855
|
+
throw new BoxToolError(harness ? "harness_signed_out" : "harness_unavailable");
|
|
1831
1856
|
}
|
|
1832
1857
|
/** One checkout, one run: two harnesses editing the same files at once would undo each other. */
|
|
1833
1858
|
refuseBusy(repo) {
|
|
@@ -2037,7 +2062,7 @@ ${RESULT_INSTRUCTION}`));
|
|
|
2037
2062
|
if (!next)
|
|
2038
2063
|
this.log(`model work=${r.work_id} refused=${refused} next=none catalog=${listed.length}`);
|
|
2039
2064
|
if (!next || this.stopping || r.end) return false;
|
|
2040
|
-
const moved = r.harness ? movedLine(this.deps.dialect.name, r.harness) : null;
|
|
2065
|
+
const moved = r.harness && r.moved ? movedLine(r.moved, this.deps.dialect.name, r.harness) : null;
|
|
2041
2066
|
r.refused = tried;
|
|
2042
2067
|
r.model = next;
|
|
2043
2068
|
r.session_id = null;
|
|
@@ -2049,7 +2074,7 @@ ${RESULT_INSTRUCTION}`));
|
|
|
2049
2074
|
this.log(`model work=${r.work_id} refused=${refused} next=${next}`);
|
|
2050
2075
|
this.spawnRun(
|
|
2051
2076
|
r,
|
|
2052
|
-
r.
|
|
2077
|
+
r.moved?.at === "run" ? handoverPrompt(r.prompt, harnessName(this.deps.dialect.name)) : r.prompt,
|
|
2053
2078
|
false
|
|
2054
2079
|
);
|
|
2055
2080
|
return true;
|
|
@@ -2060,14 +2085,13 @@ ${RESULT_INSTRUCTION}`));
|
|
|
2060
2085
|
* The session does not: the prompt goes again, with a note to read the
|
|
2061
2086
|
* checkout first. A limit that names no model holds the account, so new
|
|
2062
2087
|
* runs start on the fallback for LIMIT_HOLD_MS. It does not move a run
|
|
2063
|
-
* whose Task named its harness, nor one
|
|
2064
|
-
* Codex asks nothing.
|
|
2088
|
+
* whose Task named its harness, nor one the fallback may not carry.
|
|
2065
2089
|
*/
|
|
2066
2090
|
async moveHarness(r, said) {
|
|
2067
2091
|
const to = this.deps.fallbackHarness;
|
|
2068
2092
|
if (!to || r.harness) return false;
|
|
2069
2093
|
if (!limitedModel(said)) this.limitedUntil = this.now() + LIMIT_HOLD_MS;
|
|
2070
|
-
if (r.harness_named || r.used_permission
|
|
2094
|
+
if (r.harness_named || !this.carrier(r, r.used_permission) || !r.prompt) return false;
|
|
2071
2095
|
this.recovering.add(r.work_id);
|
|
2072
2096
|
try {
|
|
2073
2097
|
const probe = await to.probe().catch(() => null);
|
|
@@ -2075,19 +2099,17 @@ ${RESULT_INSTRUCTION}`));
|
|
|
2075
2099
|
} finally {
|
|
2076
2100
|
this.recovering.delete(r.work_id);
|
|
2077
2101
|
}
|
|
2078
|
-
const from =
|
|
2079
|
-
const
|
|
2102
|
+
const from = this.deps.dialect.name;
|
|
2103
|
+
const move = { reason: "limit", at: "run" };
|
|
2080
2104
|
r.harness = to.name;
|
|
2105
|
+
r.moved = move;
|
|
2081
2106
|
r.session_id = null;
|
|
2082
2107
|
r.model = void 0;
|
|
2083
|
-
r.switched = movedLine(
|
|
2108
|
+
r.switched = movedLine(move, from, to.name);
|
|
2084
2109
|
this.save();
|
|
2085
|
-
this.log(`fallback work=${r.work_id} harness=${to.name}`);
|
|
2086
|
-
this.emit(r.work_id, {
|
|
2087
|
-
|
|
2088
|
-
summary: `${from} is at its usage limit, so I moved this to ${name}`
|
|
2089
|
-
});
|
|
2090
|
-
this.spawnRun(r, handoverPrompt(r.prompt, from), false);
|
|
2110
|
+
this.log(`fallback work=${r.work_id} harness=${to.name} reason=limit`);
|
|
2111
|
+
this.emit(r.work_id, { kind: "progress", summary: movingLine(move, from, to.name) });
|
|
2112
|
+
this.spawnRun(r, handoverPrompt(r.prompt, harnessName(from)), false);
|
|
2091
2113
|
return true;
|
|
2092
2114
|
}
|
|
2093
2115
|
/**
|
|
@@ -2231,6 +2253,7 @@ export {
|
|
|
2231
2253
|
runT3,
|
|
2232
2254
|
T3Driver,
|
|
2233
2255
|
takeoverSummary,
|
|
2256
|
+
runHarness,
|
|
2234
2257
|
localRunsFilePath,
|
|
2235
2258
|
LocalDriver,
|
|
2236
2259
|
readRunRecords,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
readRunnerState,
|
|
4
4
|
runnerStatePath,
|
|
5
5
|
threadsFilePath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K4TU7DBU.js";
|
|
7
7
|
import {
|
|
8
8
|
BoxToolError,
|
|
9
9
|
CLOOP_THREAD_PREFIX,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
windowsExecutable,
|
|
32
32
|
windowsPowerShellEnv,
|
|
33
33
|
writeBoxConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-LXRCJTHL.js";
|
|
35
35
|
import {
|
|
36
36
|
getMachine,
|
|
37
37
|
shortMachineName
|
|
@@ -49,17 +49,17 @@ import {
|
|
|
49
49
|
} from "./chunk-R3CLO2FB.js";
|
|
50
50
|
import {
|
|
51
51
|
connectWebhook
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-P46CX6Z7.js";
|
|
53
53
|
import {
|
|
54
54
|
ConnectFailure,
|
|
55
55
|
connectReport,
|
|
56
56
|
deviceLogin,
|
|
57
57
|
newAttempt,
|
|
58
58
|
sendConnectReport
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-44BZ2K5L.js";
|
|
60
60
|
import {
|
|
61
61
|
VERSION
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-QG5HVBJY.js";
|
|
63
63
|
import {
|
|
64
64
|
STAGING_ORIGIN,
|
|
65
65
|
getOrigin,
|
|
@@ -1004,7 +1004,8 @@ async function disconnect(plan, opts) {
|
|
|
1004
1004
|
const env = environmentOf(plan.origin);
|
|
1005
1005
|
const run = opts.run ?? ((command) => void execFileSync(command[0], command.slice(1), {
|
|
1006
1006
|
stdio: "ignore",
|
|
1007
|
-
timeout: 15e3
|
|
1007
|
+
timeout: 15e3,
|
|
1008
|
+
...command[0] === "powershell" ? { env: windowsPowerShellEnv() } : {}
|
|
1008
1009
|
}));
|
|
1009
1010
|
if (plan.isBox && !opts.yes) {
|
|
1010
1011
|
const unit = plan.services.map((s) => basename3(s.path)).find((n) => n.startsWith("cloop-box"));
|
|
@@ -1378,7 +1379,7 @@ function registerTaskScript(task, launcher) {
|
|
|
1378
1379
|
[
|
|
1379
1380
|
"try {",
|
|
1380
1381
|
`Register-ScheduledTask -TaskName ${psQuote2(task)} -Force`,
|
|
1381
|
-
"-Action (New-ScheduledTaskAction -Execute (Join-Path $env:WINDIR 'System32\\
|
|
1382
|
+
"-Action (New-ScheduledTaskAction -Execute (Join-Path $env:WINDIR 'System32\\conhost.exe') -Argument ('--headless ' + (Join-Path $env:WINDIR 'System32\\cmd.exe') + ' /d /c ' + [char]34 + $launcher + [char]34))",
|
|
1382
1383
|
"-Trigger (New-ScheduledTaskTrigger -AtLogOn -User $user)",
|
|
1383
1384
|
"-Principal (New-ScheduledTaskPrincipal -UserId $user -LogonType Interactive -RunLevel Limited)",
|
|
1384
1385
|
"-Settings (New-ScheduledTaskSettingsSet -ExecutionTimeLimit ([TimeSpan]::Zero) -MultipleInstances IgnoreNew -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable)",
|
|
@@ -1390,6 +1391,28 @@ function registerTaskScript(task, launcher) {
|
|
|
1390
1391
|
].join(" ")
|
|
1391
1392
|
].join("; ");
|
|
1392
1393
|
}
|
|
1394
|
+
function endDaemonScript(statePath) {
|
|
1395
|
+
return [
|
|
1396
|
+
`$f = ${psQuote2(statePath)}`,
|
|
1397
|
+
[
|
|
1398
|
+
"if (Test-Path -LiteralPath $f) {",
|
|
1399
|
+
"$id = [int](Get-Content -Raw -LiteralPath $f | ConvertFrom-Json).pid;",
|
|
1400
|
+
"$p = Get-CimInstance Win32_Process -Filter ('ProcessId=' + $id);",
|
|
1401
|
+
"if ($p -and $p.CommandLine -match 'box run') { taskkill /pid $id /t /f | Out-Null }",
|
|
1402
|
+
"}"
|
|
1403
|
+
].join(" ")
|
|
1404
|
+
].join("; ");
|
|
1405
|
+
}
|
|
1406
|
+
var endDaemonStep = (environment) => ({
|
|
1407
|
+
command: [
|
|
1408
|
+
"powershell",
|
|
1409
|
+
"-NoProfile",
|
|
1410
|
+
"-NonInteractive",
|
|
1411
|
+
"-Command",
|
|
1412
|
+
endDaemonScript(runnerStatePath(environment))
|
|
1413
|
+
],
|
|
1414
|
+
mayFail: true
|
|
1415
|
+
});
|
|
1393
1416
|
function programFor(script, node, npx, version) {
|
|
1394
1417
|
if (!/[\\/]_npx[\\/]/.test(script)) return [node, script, "box", "run"];
|
|
1395
1418
|
if (!npx)
|
|
@@ -1446,6 +1469,7 @@ function installedService(opts) {
|
|
|
1446
1469
|
path: join3(opts.dir ?? join3(opts.home, "AppData", "Local", "Cloop"), `${file}.cmd`),
|
|
1447
1470
|
steps: [
|
|
1448
1471
|
{ command: ["schtasks", "/end", "/tn", task], mayFail: true },
|
|
1472
|
+
endDaemonStep(opts.environment),
|
|
1449
1473
|
{ command: ["schtasks", "/delete", "/tn", task, "/f"], mayFail: true }
|
|
1450
1474
|
],
|
|
1451
1475
|
running: ["schtasks", "/query", "/tn", task]
|
|
@@ -1523,6 +1547,7 @@ function unitFor(opts) {
|
|
|
1523
1547
|
contents: contents2,
|
|
1524
1548
|
start: [
|
|
1525
1549
|
{ command: ["schtasks", "/end", "/tn", task], mayFail: true },
|
|
1550
|
+
endDaemonStep(opts.environment),
|
|
1526
1551
|
{
|
|
1527
1552
|
command: [
|
|
1528
1553
|
"powershell",
|
|
@@ -2262,7 +2287,9 @@ export {
|
|
|
2262
2287
|
systemdWord,
|
|
2263
2288
|
cmdValue,
|
|
2264
2289
|
cmdWord,
|
|
2290
|
+
psQuote2 as psQuote,
|
|
2265
2291
|
registerTaskScript,
|
|
2292
|
+
endDaemonScript,
|
|
2266
2293
|
programFor,
|
|
2267
2294
|
findNpx,
|
|
2268
2295
|
awaitDaemon,
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
connectChosen,
|
|
18
18
|
connectCommand,
|
|
19
19
|
detect,
|
|
20
|
+
endDaemonScript,
|
|
20
21
|
ensureLinger,
|
|
21
22
|
fallbackDriver,
|
|
22
23
|
fallbackLine,
|
|
@@ -31,6 +32,7 @@ import {
|
|
|
31
32
|
parsePicks,
|
|
32
33
|
prepareAgents,
|
|
33
34
|
programFor,
|
|
35
|
+
psQuote,
|
|
34
36
|
registerTaskScript,
|
|
35
37
|
rememberedDriver,
|
|
36
38
|
rerunCommand,
|
|
@@ -50,17 +52,17 @@ import {
|
|
|
50
52
|
which,
|
|
51
53
|
workFolder,
|
|
52
54
|
workFolderLine
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
55
|
+
} from "./chunk-OHVU476O.js";
|
|
56
|
+
import "./chunk-K4TU7DBU.js";
|
|
57
|
+
import "./chunk-LXRCJTHL.js";
|
|
56
58
|
import "./chunk-NTXQLEMQ.js";
|
|
57
59
|
import "./chunk-VK6GV757.js";
|
|
58
60
|
import "./chunk-YEO27QQP.js";
|
|
59
61
|
import "./chunk-R3CLO2FB.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-P46CX6Z7.js";
|
|
63
|
+
import "./chunk-44BZ2K5L.js";
|
|
62
64
|
import "./chunk-ES5BRAKJ.js";
|
|
63
|
-
import "./chunk-
|
|
65
|
+
import "./chunk-QG5HVBJY.js";
|
|
64
66
|
import "./chunk-D5UZW42X.js";
|
|
65
67
|
export {
|
|
66
68
|
DEFAULT_T3_URL,
|
|
@@ -80,6 +82,7 @@ export {
|
|
|
80
82
|
connectChosen,
|
|
81
83
|
connectCommand,
|
|
82
84
|
detect,
|
|
85
|
+
endDaemonScript,
|
|
83
86
|
ensureLinger,
|
|
84
87
|
fallbackDriver,
|
|
85
88
|
fallbackLine,
|
|
@@ -94,6 +97,7 @@ export {
|
|
|
94
97
|
parsePicks,
|
|
95
98
|
prepareAgents,
|
|
96
99
|
programFor,
|
|
100
|
+
psQuote,
|
|
97
101
|
registerTaskScript,
|
|
98
102
|
rememberedDriver,
|
|
99
103
|
rerunCommand,
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
runnerOrigin,
|
|
8
8
|
stopService,
|
|
9
9
|
unitOrigin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-OHVU476O.js";
|
|
11
|
+
import "./chunk-K4TU7DBU.js";
|
|
12
|
+
import "./chunk-LXRCJTHL.js";
|
|
13
13
|
import "./chunk-NTXQLEMQ.js";
|
|
14
14
|
import "./chunk-VK6GV757.js";
|
|
15
15
|
import "./chunk-YEO27QQP.js";
|
|
16
16
|
import "./chunk-R3CLO2FB.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-P46CX6Z7.js";
|
|
18
|
+
import "./chunk-44BZ2K5L.js";
|
|
19
19
|
import "./chunk-ES5BRAKJ.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-QG5HVBJY.js";
|
|
21
21
|
import "./chunk-D5UZW42X.js";
|
|
22
22
|
export {
|
|
23
23
|
disconnect,
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
existingRunnerEnvironment,
|
|
4
4
|
pinExistingRunner
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OHVU476O.js";
|
|
6
|
+
import "./chunk-K4TU7DBU.js";
|
|
7
|
+
import "./chunk-LXRCJTHL.js";
|
|
8
8
|
import "./chunk-NTXQLEMQ.js";
|
|
9
9
|
import "./chunk-VK6GV757.js";
|
|
10
10
|
import "./chunk-YEO27QQP.js";
|
|
11
11
|
import "./chunk-R3CLO2FB.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-P46CX6Z7.js";
|
|
13
|
+
import "./chunk-44BZ2K5L.js";
|
|
14
14
|
import "./chunk-ES5BRAKJ.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-QG5HVBJY.js";
|
|
16
16
|
import "./chunk-D5UZW42X.js";
|
|
17
17
|
export {
|
|
18
18
|
existingRunnerEnvironment,
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-YEO27QQP.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-QG5HVBJY.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 runner and a staging runner can run side by side on one machine.
|
|
66
66
|
`;
|
|
67
67
|
async function pinExistingRunner() {
|
|
68
|
-
const { pinExistingRunner: pin } = await import("./existing-runner-
|
|
68
|
+
const { pinExistingRunner: pin } = await import("./existing-runner-WR6A3P3I.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-OAYCNQ2O.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-XIJGOXBH.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-O7C5PR36.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-SO3X4ANL.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-765ZZES6.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-QGO6KQTH.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-MCJBDKDN.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-VGVVNO4S.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-VGVVNO4S.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-E6FYRR4M.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-VGVVNO4S.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-GDMWLS5G.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-44BZ2K5L.js";
|
|
7
7
|
import "./chunk-ES5BRAKJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QG5HVBJY.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
deviceLogin,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
connectWebhook,
|
|
4
4
|
runnerCommand
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-P46CX6Z7.js";
|
|
6
|
+
import "./chunk-44BZ2K5L.js";
|
|
7
7
|
import "./chunk-ES5BRAKJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QG5HVBJY.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
connectWebhook,
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findRun,
|
|
4
4
|
lastLines,
|
|
5
|
+
ownHarness,
|
|
5
6
|
recentRuns,
|
|
6
7
|
resumeCommand,
|
|
7
8
|
runState,
|
|
8
9
|
runsCommand,
|
|
9
10
|
sessionFolder,
|
|
10
11
|
watchCommand
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-2DSMNE24.js";
|
|
13
|
+
import "./chunk-LXRCJTHL.js";
|
|
13
14
|
import "./chunk-VK6GV757.js";
|
|
14
15
|
import "./chunk-D5UZW42X.js";
|
|
15
16
|
export {
|
|
16
17
|
findRun,
|
|
17
18
|
lastLines,
|
|
19
|
+
ownHarness,
|
|
18
20
|
recentRuns,
|
|
19
21
|
resumeCommand,
|
|
20
22
|
runState,
|
|
@@ -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-H3RGEJME.js";
|
|
13
|
+
import "./chunk-2DSMNE24.js";
|
|
14
|
+
import "./chunk-K4TU7DBU.js";
|
|
15
|
+
import "./chunk-LXRCJTHL.js";
|
|
16
16
|
import "./chunk-NTXQLEMQ.js";
|
|
17
17
|
import "./chunk-VK6GV757.js";
|
|
18
18
|
import "./chunk-ES5BRAKJ.js";
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
DRIVER_NAME,
|
|
4
4
|
pinExistingRunner,
|
|
5
5
|
runConnect
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OHVU476O.js";
|
|
7
|
+
import "./chunk-K4TU7DBU.js";
|
|
8
8
|
import {
|
|
9
9
|
isLocal,
|
|
10
10
|
readRunnerConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LXRCJTHL.js";
|
|
12
12
|
import "./chunk-NTXQLEMQ.js";
|
|
13
13
|
import "./chunk-VK6GV757.js";
|
|
14
14
|
import "./chunk-YEO27QQP.js";
|
|
15
15
|
import "./chunk-R3CLO2FB.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-P46CX6Z7.js";
|
|
17
|
+
import "./chunk-44BZ2K5L.js";
|
|
18
18
|
import "./chunk-ES5BRAKJ.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-QG5HVBJY.js";
|
|
20
20
|
import "./chunk-D5UZW42X.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/use.ts
|
package/package.json
CHANGED