@cloop/runner 0.3.34 → 0.3.36
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-RALT6JDU.js → box-DQQQYGY6.js} +23 -13
- package/dist/{chunk-3ZZLIPFM.js → chunk-6SRF3XGA.js} +57 -24
- package/dist/{chunk-BDAZQQ74.js → chunk-C5WAMQVJ.js} +1 -1
- package/dist/{chunk-YOMSLSLT.js → chunk-LFLFQOPL.js} +1 -1
- package/dist/{chunk-BCH4VHKZ.js → chunk-NC2CYUVJ.js} +3 -3
- package/dist/{chunk-75AQLUDA.js → chunk-NKUPQAVX.js} +1 -1
- package/dist/{chunk-MAUIATJ5.js → chunk-OJH72SCM.js} +12 -11
- package/dist/{chunk-SDE2XSO3.js → chunk-WZHNYHUT.js} +1 -1
- package/dist/{chunk-CQZQENZD.js → chunk-XVJP7XW3.js} +1 -1
- package/dist/{connect-LQ6YI4G5.js → connect-ZON4PSFH.js} +6 -6
- package/dist/{disconnect-JPS5XMUL.js → disconnect-F3DWFZXH.js} +6 -6
- package/dist/{existing-runner-ZP3IR3TZ.js → existing-runner-RZIY4UG5.js} +6 -6
- package/dist/index.js +14 -14
- package/dist/{login-ENRZEOHE.js → login-NWMS6K6R.js} +2 -2
- package/dist/{mcp-server-SXUOR4AK.js → mcp-server-4ZA4F7WY.js} +1 -1
- package/dist/{runner-DFKLSJ4C.js → runner-3DXSNEHV.js} +3 -3
- package/dist/{runs-J3F6FFL7.js → runs-6N57MCYW.js} +2 -2
- package/dist/{statusline-J3ZN3PGM.js → statusline-YDVFTXO7.js} +1 -1
- package/dist/{takeover-2ONTESR6.js → takeover-MQIZPP6U.js} +4 -4
- package/dist/{use-6MRJ2V5I.js → use-IP43IFMT.js} +6 -6
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
serveTakeovers
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-NC2CYUVJ.js";
|
|
5
|
+
import "./chunk-XVJP7XW3.js";
|
|
6
6
|
import {
|
|
7
7
|
CAPTURE_TICK_MS,
|
|
8
8
|
DEFAULT_FALLBACK_MODEL,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
systemServices,
|
|
39
39
|
unitFor,
|
|
40
40
|
which
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-OJH72SCM.js";
|
|
42
42
|
import {
|
|
43
43
|
MeshSocket,
|
|
44
44
|
WAKE_TICK_MS,
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
runnerStatePath,
|
|
56
56
|
threadsFilePath,
|
|
57
57
|
writeRunnerState
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-NKUPQAVX.js";
|
|
59
59
|
import {
|
|
60
60
|
BackgroundReading,
|
|
61
61
|
BoxToolError,
|
|
@@ -100,20 +100,20 @@ import {
|
|
|
100
100
|
utcWindow,
|
|
101
101
|
windowsPowerShellEnv,
|
|
102
102
|
writeBoxConfig
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-6SRF3XGA.js";
|
|
104
104
|
import "./chunk-VK6GV757.js";
|
|
105
105
|
import {
|
|
106
106
|
olderThan
|
|
107
107
|
} from "./chunk-365HFCQQ.js";
|
|
108
108
|
import "./chunk-PKIEWBR7.js";
|
|
109
|
-
import "./chunk-
|
|
110
|
-
import "./chunk-
|
|
109
|
+
import "./chunk-C5WAMQVJ.js";
|
|
110
|
+
import "./chunk-LFLFQOPL.js";
|
|
111
111
|
import {
|
|
112
112
|
getMachine
|
|
113
113
|
} from "./chunk-SBYSVZ7J.js";
|
|
114
114
|
import {
|
|
115
115
|
VERSION
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-WZHNYHUT.js";
|
|
117
117
|
import {
|
|
118
118
|
getMeshUrl,
|
|
119
119
|
getOrigin,
|
|
@@ -2461,7 +2461,8 @@ function boxPresence(beat) {
|
|
|
2461
2461
|
outsideThreads: beat.outsideThreads,
|
|
2462
2462
|
otherThreads: beat.otherThreads,
|
|
2463
2463
|
...beat.t3 ? { t3: beat.t3 } : {},
|
|
2464
|
-
...beat.hosted ? { harness: beat.hosted } : {}
|
|
2464
|
+
...beat.hosted ? { harness: beat.hosted } : {},
|
|
2465
|
+
...beat.repos?.length ? { repos: beat.repos } : {}
|
|
2465
2466
|
},
|
|
2466
2467
|
status: beat.running > 0 ? "active" : "idle",
|
|
2467
2468
|
event: beat.running > 0 ? `${beat.running} running` : ""
|
|
@@ -2702,6 +2703,7 @@ async function run2() {
|
|
|
2702
2703
|
process.platform,
|
|
2703
2704
|
(error, ver) => socket.send(runnerLog("update_failed", { error, ver }))
|
|
2704
2705
|
);
|
|
2706
|
+
let lastRepos;
|
|
2705
2707
|
const readDriver = lastKnown(
|
|
2706
2708
|
async () => {
|
|
2707
2709
|
const shown = showsOtherThreads(readRunnerConfig());
|
|
@@ -2717,9 +2719,16 @@ async function run2() {
|
|
|
2717
2719
|
void 0,
|
|
2718
2720
|
new Set(listed.threads.filter((t) => t.cloop).map((t) => t.id))
|
|
2719
2721
|
);
|
|
2720
|
-
|
|
2722
|
+
const repos = await driver.checkouts?.().catch(() => lastRepos);
|
|
2723
|
+
lastRepos = repos ?? lastRepos;
|
|
2724
|
+
return { shown, running: listed.running, outsideThreads, repos: lastRepos };
|
|
2725
|
+
},
|
|
2726
|
+
{
|
|
2727
|
+
shown: showsOtherThreads(readRunnerConfig()),
|
|
2728
|
+
running: 0,
|
|
2729
|
+
outsideThreads: [],
|
|
2730
|
+
repos: void 0
|
|
2721
2731
|
},
|
|
2722
|
-
{ shown: showsOtherThreads(readRunnerConfig()), running: 0, outsideThreads: [] },
|
|
2723
2732
|
{
|
|
2724
2733
|
ms: DRIVER_READ_MS,
|
|
2725
2734
|
what: `${driver.name} read`,
|
|
@@ -2744,7 +2753,7 @@ async function run2() {
|
|
|
2744
2753
|
try {
|
|
2745
2754
|
await renew();
|
|
2746
2755
|
const callsBefore = callsStarted;
|
|
2747
|
-
const { shown, running, outsideThreads } = await readDriver();
|
|
2756
|
+
const { shown, running, outsideThreads, repos } = await readDriver();
|
|
2748
2757
|
lastBeatAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
2749
2758
|
socket.sendPresence(
|
|
2750
2759
|
boxPresence({
|
|
@@ -2756,7 +2765,8 @@ async function run2() {
|
|
|
2756
2765
|
otherThreads: shown,
|
|
2757
2766
|
running,
|
|
2758
2767
|
t3: cfg && isT3(cfg) ? t3Presence(cfg, t3.renewalFailed) : null,
|
|
2759
|
-
...hosted ? { hosted: hosted.harness } : {}
|
|
2768
|
+
...hosted ? { hosted: hosted.harness } : {},
|
|
2769
|
+
...repos ? { repos } : {}
|
|
2760
2770
|
})
|
|
2761
2771
|
);
|
|
2762
2772
|
update?.beat({ running, inFlight: inFlight + callsStarted - callsBefore });
|
|
@@ -488,7 +488,7 @@ function windowsPowerShellEnv(env = process.env) {
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
// src/t3-bin.ts
|
|
491
|
-
import { execFileSync as execFileSync2 } from "child_process";
|
|
491
|
+
import { execFile, execFileSync as execFileSync2 } from "child_process";
|
|
492
492
|
import { existsSync, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
|
|
493
493
|
import { join as join5 } from "path";
|
|
494
494
|
var CLEAN_ENV = () => ({
|
|
@@ -565,12 +565,23 @@ function runT3(bin, args, timeout = 15e3) {
|
|
|
565
565
|
stdio: ["ignore", "pipe", "pipe"]
|
|
566
566
|
});
|
|
567
567
|
} catch (err) {
|
|
568
|
-
|
|
569
|
-
throw new Error(
|
|
570
|
-
`t3 ${args.slice(0, 3).join(" ")} failed${stderr ? `: ${stderr.slice(0, 200)}` : ""}`
|
|
571
|
-
);
|
|
568
|
+
throw t3Failed(args, err);
|
|
572
569
|
}
|
|
573
570
|
}
|
|
571
|
+
function runT3Async(bin, args, timeout = 15e3) {
|
|
572
|
+
return new Promise((resolve, reject) => {
|
|
573
|
+
execFile(bin, args, { encoding: "utf-8", env: CLEAN_ENV(), timeout }, (err, stdout, stderr) => {
|
|
574
|
+
if (err) reject(t3Failed(args, { stderr }));
|
|
575
|
+
else resolve(stdout);
|
|
576
|
+
});
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
function t3Failed(args, err) {
|
|
580
|
+
const stderr = String(err.stderr ?? "").trim().split("\n").filter((line) => line && !/ExperimentalWarning|--trace-warnings/.test(line)).at(-1);
|
|
581
|
+
return new Error(
|
|
582
|
+
`t3 ${args.slice(0, 3).join(" ")} failed${stderr ? `: ${stderr.slice(0, 200)}` : ""}`
|
|
583
|
+
);
|
|
584
|
+
}
|
|
574
585
|
function whichAll(bin) {
|
|
575
586
|
try {
|
|
576
587
|
return execFileSync2("which", ["-a", bin], {
|
|
@@ -752,7 +763,7 @@ function parseFrames(data) {
|
|
|
752
763
|
}
|
|
753
764
|
|
|
754
765
|
// src/drivers/t3.ts
|
|
755
|
-
import { execFile, execFileSync as execFileSync3 } from "child_process";
|
|
766
|
+
import { execFile as execFile2, execFileSync as execFileSync3 } from "child_process";
|
|
756
767
|
import { randomUUID } from "crypto";
|
|
757
768
|
import { existsSync as existsSync2 } from "fs";
|
|
758
769
|
import { join as join7 } from "path";
|
|
@@ -899,10 +910,6 @@ function droppedLine(dropped, run2) {
|
|
|
899
910
|
return dropped.outputs || dropped.checks ? `result_items_dropped run=${run2} outputs=${dropped.outputs} checks=${dropped.checks}` : null;
|
|
900
911
|
}
|
|
901
912
|
|
|
902
|
-
// src/drivers/attachments.ts
|
|
903
|
-
import { mkdir, writeFile } from "fs/promises";
|
|
904
|
-
import { join as join6 } from "path";
|
|
905
|
-
|
|
906
913
|
// ../clo0p-app/contracts/work-spec.ts
|
|
907
914
|
var IMAGE_TYPES = {
|
|
908
915
|
"image/jpeg": "jpg",
|
|
@@ -915,8 +922,14 @@ function isImageType(type) {
|
|
|
915
922
|
}
|
|
916
923
|
var IMAGE_MAX_BYTES = 10 * 1024 * 1024;
|
|
917
924
|
var ATTACHMENTS_MAX = 8;
|
|
925
|
+
function repoName(repository) {
|
|
926
|
+
const name = repository?.trim().toLowerCase().split("/").filter(Boolean).at(-1);
|
|
927
|
+
return name || null;
|
|
928
|
+
}
|
|
918
929
|
|
|
919
930
|
// src/drivers/attachments.ts
|
|
931
|
+
import { mkdir, writeFile } from "fs/promises";
|
|
932
|
+
import { join as join6 } from "path";
|
|
920
933
|
var FETCH_BUDGET_MS = 1e4;
|
|
921
934
|
function parseAttachments(value) {
|
|
922
935
|
if (!Array.isArray(value)) return void 0;
|
|
@@ -1396,6 +1409,7 @@ function isChild(t) {
|
|
|
1396
1409
|
}
|
|
1397
1410
|
var SESSIONS_TTL_MS = 5 * 6e4;
|
|
1398
1411
|
var STATUS_TTL_MS = 3e4;
|
|
1412
|
+
var REPOS_TTL_MS = 10 * 6e4;
|
|
1399
1413
|
var TERMINAL_RUN = /* @__PURE__ */ new Set(["completed", "interrupted", "failed", "cancelled", "rolled_back"]);
|
|
1400
1414
|
var STOPPED_IN_T3 = "You stopped this in T3.";
|
|
1401
1415
|
var IDLE_SETTLE_MS = 20 * 6e4;
|
|
@@ -1538,20 +1552,23 @@ function providerHarness(instanceId, cfg) {
|
|
|
1538
1552
|
const id = p?.driver ?? instanceId;
|
|
1539
1553
|
return { harness: PROVIDER_HARNESS[id] ?? id };
|
|
1540
1554
|
}
|
|
1555
|
+
function projectNames(p) {
|
|
1556
|
+
const names = [p.title, p.workspaceRoot.split("/").at(-1), p.repositoryIdentity?.displayName];
|
|
1557
|
+
return [...new Set(names.filter((name) => Boolean(name)))];
|
|
1558
|
+
}
|
|
1559
|
+
function isRepository(p) {
|
|
1560
|
+
return Boolean(p.repositoryIdentity) || existsSync2(join7(p.workspaceRoot, ".git"));
|
|
1561
|
+
}
|
|
1541
1562
|
function pickProject(projects, repository) {
|
|
1542
1563
|
if (!repository) {
|
|
1543
|
-
const repos = projects.filter(
|
|
1544
|
-
(p) => p.repositoryIdentity || existsSync2(join7(p.workspaceRoot, ".git"))
|
|
1545
|
-
);
|
|
1564
|
+
const repos = projects.filter(isRepository);
|
|
1546
1565
|
const pool = repos.length > 0 ? repos : projects;
|
|
1547
1566
|
const only = pool.length === 1 ? pool[0] : void 0;
|
|
1548
1567
|
if (only) return only;
|
|
1549
1568
|
throw new BoxToolError("no_project");
|
|
1550
1569
|
}
|
|
1551
|
-
const want = repository
|
|
1552
|
-
const found = projects.find(
|
|
1553
|
-
(p) => p.title.toLowerCase() === want || p.workspaceRoot.split("/").at(-1)?.toLowerCase() === want || p.repositoryIdentity?.displayName?.toLowerCase() === want
|
|
1554
|
-
);
|
|
1570
|
+
const want = repoName(repository);
|
|
1571
|
+
const found = projects.find((p) => projectNames(p).some((name) => repoName(name) === want));
|
|
1555
1572
|
if (!found) throw new BoxToolError("no_project");
|
|
1556
1573
|
return found;
|
|
1557
1574
|
}
|
|
@@ -1665,6 +1682,16 @@ var T3Driver = class {
|
|
|
1665
1682
|
}
|
|
1666
1683
|
return cache.value ? Promise.resolve(cache.value) : cache.refreshing;
|
|
1667
1684
|
}
|
|
1685
|
+
reposRead = null;
|
|
1686
|
+
/** The checkouts' projects, by every name `pickProject` matches. */
|
|
1687
|
+
async checkouts() {
|
|
1688
|
+
if (this.reposRead && this.now() - this.reposRead.at < REPOS_TTL_MS)
|
|
1689
|
+
return this.reposRead.names;
|
|
1690
|
+
const [, shell] = await this.readT3State();
|
|
1691
|
+
const names = [...new Set((shell.projects ?? []).filter(isRepository).flatMap(projectNames))];
|
|
1692
|
+
if (names.length) this.reposRead = { names, at: this.now() };
|
|
1693
|
+
return names;
|
|
1694
|
+
}
|
|
1668
1695
|
async status() {
|
|
1669
1696
|
const [cfg, shell] = await this.readT3State();
|
|
1670
1697
|
const sessions = this.listSessions();
|
|
@@ -1858,6 +1885,7 @@ var T3Driver = class {
|
|
|
1858
1885
|
resumed: launched.resumed,
|
|
1859
1886
|
permission,
|
|
1860
1887
|
...providerHarness(modelSelection.instanceId, cfg),
|
|
1888
|
+
repository: project.repositoryIdentity?.displayName ?? project.workspaceRoot.split("/").at(-1) ?? project.title,
|
|
1861
1889
|
// A resumed thread kept its first message: these photos did not go in.
|
|
1862
1890
|
...launched.resumed ? {} : delivery(a.attachments, photos2.attachments.length)
|
|
1863
1891
|
};
|
|
@@ -2384,7 +2412,7 @@ ${RESULT_INSTRUCTION}`
|
|
|
2384
2412
|
this.sessions.at = Date.now();
|
|
2385
2413
|
this.sessions.refreshing = false;
|
|
2386
2414
|
};
|
|
2387
|
-
(this.deps.execAsync ??
|
|
2415
|
+
(this.deps.execAsync ?? execFile2)(
|
|
2388
2416
|
bin,
|
|
2389
2417
|
["auth", "session", "list", ...t3BaseDirArgs(), "--json"],
|
|
2390
2418
|
{
|
|
@@ -2427,7 +2455,7 @@ ${RESULT_INSTRUCTION}`
|
|
|
2427
2455
|
};
|
|
2428
2456
|
|
|
2429
2457
|
// src/drivers/local.ts
|
|
2430
|
-
import { execFile as
|
|
2458
|
+
import { execFile as execFile3, execFileSync as execFileSync4, spawn } from "child_process";
|
|
2431
2459
|
import { chmodSync as chmodSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync2, renameSync as renameSync3, writeFileSync as writeFileSync2 } from "fs";
|
|
2432
2460
|
import { hostname } from "os";
|
|
2433
2461
|
import { basename, dirname as dirname4, join as join8 } from "path";
|
|
@@ -2518,16 +2546,16 @@ function pickRepo(repos, repository) {
|
|
|
2518
2546
|
if (repos.length === 1 && repos[0]) return repos[0];
|
|
2519
2547
|
throw new BoxToolError("no_project");
|
|
2520
2548
|
}
|
|
2521
|
-
const want = repository
|
|
2549
|
+
const want = repoName(repository);
|
|
2522
2550
|
const found = repos.find(
|
|
2523
|
-
(r) => r.label
|
|
2551
|
+
(r) => repoName(r.label) === want || repoName(basename(r.path)) === want
|
|
2524
2552
|
);
|
|
2525
2553
|
if (!found) throw new BoxToolError("no_project");
|
|
2526
2554
|
return found;
|
|
2527
2555
|
}
|
|
2528
2556
|
function run(cmd, args, cwd) {
|
|
2529
2557
|
return new Promise(
|
|
2530
|
-
(resolve, reject) =>
|
|
2558
|
+
(resolve, reject) => execFile3(
|
|
2531
2559
|
cmd,
|
|
2532
2560
|
args,
|
|
2533
2561
|
{ cwd, timeout: 1e4, encoding: "utf-8" },
|
|
@@ -2639,6 +2667,10 @@ var LocalDriver = class {
|
|
|
2639
2667
|
warmHarnesses() {
|
|
2640
2668
|
void this.harnessCheck.refresh().then(() => this.status()).catch((err) => this.log(`usage warm failed: ${err?.message}`));
|
|
2641
2669
|
}
|
|
2670
|
+
/** Its repository folders, by label and folder name, the names `pickRepo` matches. */
|
|
2671
|
+
async checkouts() {
|
|
2672
|
+
return [...new Set(this.deps.repos.flatMap((r) => [r.label, basename(r.path)]))];
|
|
2673
|
+
}
|
|
2642
2674
|
async status() {
|
|
2643
2675
|
const { harnesses, checkedAt, probing } = await this.harnessCheck.read();
|
|
2644
2676
|
const all = [...this.runs.values()];
|
|
@@ -2827,6 +2859,7 @@ ${photos2.line}` : a.prompt,
|
|
|
2827
2859
|
permission: record.used_permission,
|
|
2828
2860
|
takeover: true,
|
|
2829
2861
|
harness: dialect.name,
|
|
2862
|
+
repository: basename(repo.path),
|
|
2830
2863
|
...delivery(a.attachments, photos2.paths.length)
|
|
2831
2864
|
};
|
|
2832
2865
|
}
|
|
@@ -3394,6 +3427,7 @@ export {
|
|
|
3394
3427
|
otherThreadsChoice,
|
|
3395
3428
|
readRunnerConfig,
|
|
3396
3429
|
writeBoxConfig,
|
|
3430
|
+
IMAGE_TYPES,
|
|
3397
3431
|
runLogDir,
|
|
3398
3432
|
runLogPath,
|
|
3399
3433
|
redactSecrets,
|
|
@@ -3404,7 +3438,6 @@ export {
|
|
|
3404
3438
|
quoteWindowsArg,
|
|
3405
3439
|
windowsExecutable,
|
|
3406
3440
|
windowsPowerShellEnv,
|
|
3407
|
-
IMAGE_TYPES,
|
|
3408
3441
|
parseAttachments,
|
|
3409
3442
|
fetchImages,
|
|
3410
3443
|
delivery,
|
|
@@ -3415,7 +3448,7 @@ export {
|
|
|
3415
3448
|
t3Candidates,
|
|
3416
3449
|
pickT3Bin,
|
|
3417
3450
|
t3BaseDirArgs,
|
|
3418
|
-
|
|
3451
|
+
runT3Async,
|
|
3419
3452
|
MIN_PROTOCOL,
|
|
3420
3453
|
readEnvironment,
|
|
3421
3454
|
exchangePairing,
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
findRun,
|
|
4
4
|
ownHarness
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XVJP7XW3.js";
|
|
6
6
|
import {
|
|
7
7
|
lockThreadsFile,
|
|
8
8
|
threadsFilePath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NKUPQAVX.js";
|
|
10
10
|
import {
|
|
11
11
|
localRunsFilePath,
|
|
12
12
|
readRunRecords,
|
|
13
13
|
runHarness,
|
|
14
14
|
takeoverSummary
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6SRF3XGA.js";
|
|
16
16
|
import {
|
|
17
17
|
sanitizeLabel
|
|
18
18
|
} from "./chunk-VK6GV757.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
readRunnerState,
|
|
10
10
|
runnerStatePath,
|
|
11
11
|
threadsFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NKUPQAVX.js";
|
|
13
13
|
import {
|
|
14
14
|
BoxToolError,
|
|
15
15
|
CLOOP_THREAD_PREFIX,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
readEnvironment,
|
|
40
40
|
readRunnerConfig,
|
|
41
41
|
redactSecrets,
|
|
42
|
-
|
|
42
|
+
runT3Async,
|
|
43
43
|
runnerDir,
|
|
44
44
|
runnerEnvironment,
|
|
45
45
|
serviceIdentity,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
windowsExecutable,
|
|
49
49
|
windowsPowerShellEnv,
|
|
50
50
|
writeBoxConfig
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6SRF3XGA.js";
|
|
52
52
|
import {
|
|
53
53
|
CLAUDE_FLOOR,
|
|
54
54
|
CODEX_FLOOR,
|
|
@@ -62,14 +62,14 @@ import {
|
|
|
62
62
|
} from "./chunk-PKIEWBR7.js";
|
|
63
63
|
import {
|
|
64
64
|
connectWebhook
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-C5WAMQVJ.js";
|
|
66
66
|
import {
|
|
67
67
|
ConnectFailure,
|
|
68
68
|
connectReport,
|
|
69
69
|
deviceLogin,
|
|
70
70
|
newAttempt,
|
|
71
71
|
sendConnectReport
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-LFLFQOPL.js";
|
|
73
73
|
import {
|
|
74
74
|
defaultDeviceName,
|
|
75
75
|
getMachine,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
} from "./chunk-SBYSVZ7J.js";
|
|
78
78
|
import {
|
|
79
79
|
VERSION
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-WZHNYHUT.js";
|
|
81
81
|
import {
|
|
82
82
|
STAGING_ORIGIN,
|
|
83
83
|
getOrigin,
|
|
@@ -1643,11 +1643,12 @@ function fold(cursor, signals, out2) {
|
|
|
1643
1643
|
case "subagent":
|
|
1644
1644
|
cursor.verdict = "subagent";
|
|
1645
1645
|
return;
|
|
1646
|
-
case "thread":
|
|
1647
|
-
|
|
1648
|
-
|
|
1646
|
+
case "thread":
|
|
1647
|
+
if (signal.cwd) cursor.thread.cwd = signal.cwd;
|
|
1648
|
+
if (signal.branch) cursor.thread.branch = signal.branch;
|
|
1649
|
+
if (signal.title) cursor.thread.title = signal.title;
|
|
1650
|
+
if (signal.customTitle) cursor.thread.customTitle = signal.customTitle;
|
|
1649
1651
|
break;
|
|
1650
|
-
}
|
|
1651
1652
|
case "owner":
|
|
1652
1653
|
cursor.live = { at: signal.at, state: "working" };
|
|
1653
1654
|
cursor.ownerTurns++;
|
|
@@ -2264,7 +2265,7 @@ async function mintSession(t3Url, opts = {}) {
|
|
|
2264
2265
|
const t3Bin = opts.bin ?? pickT3Bin(t3Candidates(env.serverVersion, sources), env.serverVersion);
|
|
2265
2266
|
if (!t3Bin) throw new Error("no t3 binary found; pass --t3-bin or set T3_BIN");
|
|
2266
2267
|
const pairing = JSON.parse(
|
|
2267
|
-
|
|
2268
|
+
await runT3Async(t3Bin, [
|
|
2268
2269
|
"auth",
|
|
2269
2270
|
"pairing",
|
|
2270
2271
|
"create",
|
|
@@ -53,17 +53,17 @@ import {
|
|
|
53
53
|
which,
|
|
54
54
|
workFolder,
|
|
55
55
|
workFolderLine
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-OJH72SCM.js";
|
|
57
57
|
import "./chunk-KDTPUD2Y.js";
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-NKUPQAVX.js";
|
|
59
|
+
import "./chunk-6SRF3XGA.js";
|
|
60
60
|
import "./chunk-VK6GV757.js";
|
|
61
61
|
import "./chunk-365HFCQQ.js";
|
|
62
62
|
import "./chunk-PKIEWBR7.js";
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-C5WAMQVJ.js";
|
|
64
|
+
import "./chunk-LFLFQOPL.js";
|
|
65
65
|
import "./chunk-SBYSVZ7J.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-WZHNYHUT.js";
|
|
67
67
|
import "./chunk-D5UZW42X.js";
|
|
68
68
|
export {
|
|
69
69
|
DEFAULT_T3_URL,
|
|
@@ -7,17 +7,17 @@ import {
|
|
|
7
7
|
runnerOrigin,
|
|
8
8
|
stopService,
|
|
9
9
|
unitOrigin
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OJH72SCM.js";
|
|
11
11
|
import "./chunk-KDTPUD2Y.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NKUPQAVX.js";
|
|
13
|
+
import "./chunk-6SRF3XGA.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-C5WAMQVJ.js";
|
|
18
|
+
import "./chunk-LFLFQOPL.js";
|
|
19
19
|
import "./chunk-SBYSVZ7J.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-WZHNYHUT.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-
|
|
5
|
+
} from "./chunk-OJH72SCM.js";
|
|
6
6
|
import "./chunk-KDTPUD2Y.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-NKUPQAVX.js";
|
|
8
|
+
import "./chunk-6SRF3XGA.js";
|
|
9
9
|
import "./chunk-VK6GV757.js";
|
|
10
10
|
import "./chunk-365HFCQQ.js";
|
|
11
11
|
import "./chunk-PKIEWBR7.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-C5WAMQVJ.js";
|
|
13
|
+
import "./chunk-LFLFQOPL.js";
|
|
14
14
|
import "./chunk-SBYSVZ7J.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-WZHNYHUT.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-365HFCQQ.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WZHNYHUT.js";
|
|
8
8
|
import {
|
|
9
9
|
applyEnvironmentFlag
|
|
10
10
|
} from "./chunk-D5UZW42X.js";
|
|
@@ -68,7 +68,7 @@ Add --staging to any command to use Cloop staging instead of production.
|
|
|
68
68
|
A production machine and a staging machine can run side by side on one computer.
|
|
69
69
|
`;
|
|
70
70
|
async function pinExistingRunner() {
|
|
71
|
-
const { pinExistingRunner: pin } = await import("./existing-runner-
|
|
71
|
+
const { pinExistingRunner: pin } = await import("./existing-runner-RZIY4UG5.js");
|
|
72
72
|
const { note } = pin();
|
|
73
73
|
if (note) console.error(note);
|
|
74
74
|
}
|
|
@@ -76,7 +76,7 @@ async function main() {
|
|
|
76
76
|
switch (command) {
|
|
77
77
|
case "login":
|
|
78
78
|
case "auth": {
|
|
79
|
-
const { loginCommand } = await import("./login-
|
|
79
|
+
const { loginCommand } = await import("./login-NWMS6K6R.js");
|
|
80
80
|
await loginCommand(argv);
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
@@ -86,61 +86,61 @@ async function main() {
|
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
88
|
case "serve": {
|
|
89
|
-
const { startMcpServer } = await import("./mcp-server-
|
|
89
|
+
const { startMcpServer } = await import("./mcp-server-4ZA4F7WY.js");
|
|
90
90
|
await startMcpServer();
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
case "statusline": {
|
|
94
|
-
const { statuslineCommand } = await import("./statusline-
|
|
94
|
+
const { statuslineCommand } = await import("./statusline-YDVFTXO7.js");
|
|
95
95
|
statuslineCommand();
|
|
96
96
|
break;
|
|
97
97
|
}
|
|
98
98
|
case "connect": {
|
|
99
|
-
const { connectCommand } = await import("./connect-
|
|
99
|
+
const { connectCommand } = await import("./connect-ZON4PSFH.js");
|
|
100
100
|
await connectCommand(argv.slice(1));
|
|
101
101
|
break;
|
|
102
102
|
}
|
|
103
103
|
case "use": {
|
|
104
|
-
const { useCommand } = await import("./use-
|
|
104
|
+
const { useCommand } = await import("./use-IP43IFMT.js");
|
|
105
105
|
process.exitCode = await useCommand(argv.slice(1));
|
|
106
106
|
break;
|
|
107
107
|
}
|
|
108
108
|
case "disconnect": {
|
|
109
|
-
const { disconnectCommand } = await import("./disconnect-
|
|
109
|
+
const { disconnectCommand } = await import("./disconnect-F3DWFZXH.js");
|
|
110
110
|
await disconnectCommand(argv.slice(1));
|
|
111
111
|
break;
|
|
112
112
|
}
|
|
113
113
|
case "box": {
|
|
114
|
-
const { boxCommand } = await import("./box-
|
|
114
|
+
const { boxCommand } = await import("./box-DQQQYGY6.js");
|
|
115
115
|
await boxCommand(argv.slice(1));
|
|
116
116
|
break;
|
|
117
117
|
}
|
|
118
118
|
case "runs": {
|
|
119
119
|
await pinExistingRunner();
|
|
120
|
-
const { runsCommand } = await import("./runs-
|
|
120
|
+
const { runsCommand } = await import("./runs-6N57MCYW.js");
|
|
121
121
|
process.exitCode = runsCommand();
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
124
|
case "watch": {
|
|
125
125
|
await pinExistingRunner();
|
|
126
|
-
const { watchCommand } = await import("./runs-
|
|
126
|
+
const { watchCommand } = await import("./runs-6N57MCYW.js");
|
|
127
127
|
process.exitCode = await watchCommand(argv.slice(1));
|
|
128
128
|
break;
|
|
129
129
|
}
|
|
130
130
|
case "takeover": {
|
|
131
131
|
await pinExistingRunner();
|
|
132
|
-
const { takeoverCommand } = await import("./takeover-
|
|
132
|
+
const { takeoverCommand } = await import("./takeover-MQIZPP6U.js");
|
|
133
133
|
process.exitCode = await takeoverCommand(argv.slice(1));
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
136
136
|
case "resume": {
|
|
137
137
|
await pinExistingRunner();
|
|
138
|
-
const { resumeCommand } = await import("./runs-
|
|
138
|
+
const { resumeCommand } = await import("./runs-6N57MCYW.js");
|
|
139
139
|
process.exitCode = await resumeCommand(argv.slice(1));
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
142
|
case "runner": {
|
|
143
|
-
const { runnerCommand } = await import("./runner-
|
|
143
|
+
const { runnerCommand } = await import("./runner-3DXSNEHV.js");
|
|
144
144
|
await runnerCommand(argv.slice(1));
|
|
145
145
|
break;
|
|
146
146
|
}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
deviceLogin,
|
|
4
4
|
loginCommand,
|
|
5
5
|
refusalSentence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LFLFQOPL.js";
|
|
7
7
|
import "./chunk-SBYSVZ7J.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WZHNYHUT.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-C5WAMQVJ.js";
|
|
6
|
+
import "./chunk-LFLFQOPL.js";
|
|
7
7
|
import "./chunk-SBYSVZ7J.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-WZHNYHUT.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-XVJP7XW3.js";
|
|
13
|
+
import "./chunk-6SRF3XGA.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-NC2CYUVJ.js";
|
|
13
|
+
import "./chunk-XVJP7XW3.js";
|
|
14
|
+
import "./chunk-NKUPQAVX.js";
|
|
15
|
+
import "./chunk-6SRF3XGA.js";
|
|
16
16
|
import "./chunk-VK6GV757.js";
|
|
17
17
|
import "./chunk-SBYSVZ7J.js";
|
|
18
18
|
import "./chunk-D5UZW42X.js";
|
|
@@ -3,20 +3,20 @@ import {
|
|
|
3
3
|
DRIVER_NAME,
|
|
4
4
|
pinExistingRunner,
|
|
5
5
|
runConnect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-OJH72SCM.js";
|
|
7
7
|
import "./chunk-KDTPUD2Y.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-NKUPQAVX.js";
|
|
9
9
|
import {
|
|
10
10
|
isLocal,
|
|
11
11
|
readRunnerConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6SRF3XGA.js";
|
|
13
13
|
import "./chunk-VK6GV757.js";
|
|
14
14
|
import "./chunk-365HFCQQ.js";
|
|
15
15
|
import "./chunk-PKIEWBR7.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-C5WAMQVJ.js";
|
|
17
|
+
import "./chunk-LFLFQOPL.js";
|
|
18
18
|
import "./chunk-SBYSVZ7J.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-WZHNYHUT.js";
|
|
20
20
|
import "./chunk-D5UZW42X.js";
|
|
21
21
|
|
|
22
22
|
// src/commands/use.ts
|
package/package.json
CHANGED