@cloop/runner 0.3.24 → 0.3.28
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 +2 -2
- package/dist/{box-OGT2NRPJ.js → box-AKPKKX5S.js} +234 -64
- package/dist/{chunk-YEO27QQP.js → chunk-365HFCQQ.js} +1 -1
- package/dist/{chunk-VH7XVQFJ.js → chunk-3I6NDELL.js} +1 -1
- package/dist/{chunk-NVESLEXA.js → chunk-3S2ECJTO.js} +275 -73
- package/dist/{chunk-MHKSBXUD.js → chunk-7GLIYYIB.js} +6 -6
- package/dist/{chunk-F4UQ2H5F.js → chunk-EGO3GOXI.js} +1 -1
- package/dist/{chunk-6F2ZM5H3.js → chunk-EKLBEP32.js} +2 -1
- package/dist/{chunk-PQPWITU3.js → chunk-ER5JS3RP.js} +232 -64
- package/dist/{chunk-IJH4O27H.js → chunk-KYGYU5G2.js} +65 -2
- package/dist/{chunk-UVB722OW.js → chunk-MVMKRRE2.js} +1 -1
- package/dist/{chunk-R3CLO2FB.js → chunk-PKIEWBR7.js} +2 -0
- package/dist/{chunk-IXG4H623.js → chunk-W4QJS3GR.js} +5 -5
- package/dist/{connect-7DUV7BMO.js → connect-OC5OH33U.js} +9 -8
- package/dist/{disconnect-IWGVQ2GZ.js → disconnect-6WIOMOCW.js} +9 -8
- package/dist/existing-runner-KN37YN7Y.js +21 -0
- package/dist/index.js +23 -23
- package/dist/{login-J3N7TYDI.js → login-YB3JV5WY.js} +2 -2
- package/dist/{mcp-server-HPMJRI6J.js → mcp-server-MD6X5AWJ.js} +5 -5
- package/dist/{read-permissions-SPOKGVLO.js → read-permissions-EGSGI4HL.js} +1 -1
- package/dist/{runner-TMR3BBL5.js → runner-VU7TITZM.js} +3 -3
- package/dist/{runs-S3QKEWHY.js → runs-LM2JFG3P.js} +2 -2
- package/dist/{statusline-UIG25UUX.js → statusline-2DBKYHJA.js} +1 -1
- package/dist/{takeover-3U5V2KXY.js → takeover-ANPJB6JG.js} +4 -4
- package/dist/{use-I2KUA64A.js → use-JIQY32FQ.js} +10 -9
- package/package.json +2 -2
- package/dist/existing-runner-4UYED6LY.js +0 -20
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// src/wake.ts
|
|
4
|
+
var WAKE_TICK_MS = 5e3;
|
|
5
|
+
var SLEEP_GAP_MS = 3e4;
|
|
6
|
+
var systemClocks = { wall: () => Date.now(), mono: () => performance.now() };
|
|
7
|
+
function wakeWatch(clocks = systemClocks) {
|
|
8
|
+
let wall = clocks.wall();
|
|
9
|
+
let mono = clocks.mono();
|
|
10
|
+
return () => {
|
|
11
|
+
const nowWall = clocks.wall();
|
|
12
|
+
const nowMono = clocks.mono();
|
|
13
|
+
const gap = nowWall - wall - (nowMono - mono);
|
|
14
|
+
wall = nowWall;
|
|
15
|
+
mono = nowMono;
|
|
16
|
+
return gap > SLEEP_GAP_MS ? { slept_ms: Math.round(gap), woke_at: new Date(nowWall).toISOString() } : null;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
3
20
|
// src/mesh-socket.ts
|
|
4
21
|
var WS_OPEN = 1;
|
|
5
22
|
function backoffDelay(attempt, { base = 1e3, max = 6e4, jitter = 0.2 } = {}, rand = Math.random) {
|
|
@@ -7,6 +24,15 @@ function backoffDelay(attempt, { base = 1e3, max = 6e4, jitter = 0.2 } = {}, ran
|
|
|
7
24
|
const spread = raw * jitter;
|
|
8
25
|
return Math.round(raw - spread + rand() * spread * 2);
|
|
9
26
|
}
|
|
27
|
+
var CALL_GRACE_MS = 15e3;
|
|
28
|
+
var PING_RTT_MAX_MS = 1e4;
|
|
29
|
+
var PING_CLOCKS_AGREE_MS = 1e3;
|
|
30
|
+
function freshness(deadline, now, offset) {
|
|
31
|
+
if (deadline === void 0 || offset === null) return "fresh";
|
|
32
|
+
const meshNow = now + offset;
|
|
33
|
+
if (meshNow <= deadline) return "fresh";
|
|
34
|
+
return meshNow > deadline + CALL_GRACE_MS ? "expired" : "late";
|
|
35
|
+
}
|
|
10
36
|
function wsUrl(meshUrl, sessionKey, kind) {
|
|
11
37
|
const base = meshUrl.replace(/^http/, "ws").replace(/\/+$/, "");
|
|
12
38
|
const kindParam = kind && kind !== "agent" ? `&kind=${encodeURIComponent(kind)}` : "";
|
|
@@ -26,6 +52,8 @@ var MeshSocket = class {
|
|
|
26
52
|
token;
|
|
27
53
|
/** The newest beat the caller gave, sent again each time the socket opens. */
|
|
28
54
|
presence = null;
|
|
55
|
+
ping_ = null;
|
|
56
|
+
offset = null;
|
|
29
57
|
/** Connect again with a new device token, after a refusal of the old one. */
|
|
30
58
|
restart(token) {
|
|
31
59
|
this.token = token;
|
|
@@ -54,6 +82,7 @@ var MeshSocket = class {
|
|
|
54
82
|
this.open = true;
|
|
55
83
|
this.attempt = 0;
|
|
56
84
|
if (this.presence) this.send({ type: "presence", ...this.presence });
|
|
85
|
+
if (this.opts.kind === "workstation") this.ping();
|
|
57
86
|
this.opts.onOpen?.();
|
|
58
87
|
});
|
|
59
88
|
ws.on("message", (data) => this.handleMessage(data));
|
|
@@ -84,13 +113,19 @@ var MeshSocket = class {
|
|
|
84
113
|
type: "call",
|
|
85
114
|
id: frame.id,
|
|
86
115
|
tool: frame.tool,
|
|
87
|
-
args: frame.args ?? {}
|
|
116
|
+
args: frame.args ?? {},
|
|
117
|
+
...typeof frame.deadline === "number" && Number.isFinite(frame.deadline) ? { deadline: frame.deadline } : {}
|
|
88
118
|
});
|
|
89
119
|
}
|
|
90
120
|
return;
|
|
91
121
|
}
|
|
92
122
|
if (frame.type === "ack") {
|
|
93
|
-
if (
|
|
123
|
+
if (frame.of === "ping") this.measureOffset(frame.now);
|
|
124
|
+
else if (typeof frame.of === "string") this.opts.onAck?.(frame.of, frame.ok !== false);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (frame.type === "result_ack") {
|
|
128
|
+
if (typeof frame.id === "string") this.opts.onResultAck?.(frame.id);
|
|
94
129
|
return;
|
|
95
130
|
}
|
|
96
131
|
if (frame.type !== "delegate" && frame.type !== "dm") return;
|
|
@@ -112,6 +147,31 @@ var MeshSocket = class {
|
|
|
112
147
|
}, delay);
|
|
113
148
|
this.timer.unref?.();
|
|
114
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Send a ping and time its round trip. Only a ping this socket sent and
|
|
152
|
+
* timed measures the offset, never a queued call frame, whose delay is
|
|
153
|
+
* exactly what the offset must not absorb.
|
|
154
|
+
*/
|
|
155
|
+
ping() {
|
|
156
|
+
const clocks = this.opts.clocks ?? systemClocks;
|
|
157
|
+
const sent = { wall: clocks.wall(), mono: clocks.mono() };
|
|
158
|
+
if (this.send({ type: "ping" })) this.ping_ = sent;
|
|
159
|
+
}
|
|
160
|
+
/** The mesh's clock minus this machine's, from the latest timed ping. Null until one answers with its clock. */
|
|
161
|
+
clockOffset() {
|
|
162
|
+
return this.offset;
|
|
163
|
+
}
|
|
164
|
+
measureOffset(meshNow) {
|
|
165
|
+
const sent = this.ping_;
|
|
166
|
+
this.ping_ = null;
|
|
167
|
+
if (!sent || typeof meshNow !== "number" || !Number.isFinite(meshNow)) return;
|
|
168
|
+
const clocks = this.opts.clocks ?? systemClocks;
|
|
169
|
+
const rtt = clocks.mono() - sent.mono;
|
|
170
|
+
const wallRtt = clocks.wall() - sent.wall;
|
|
171
|
+
if (rtt < 0 || wallRtt > PING_RTT_MAX_MS || Math.abs(wallRtt - rtt) > PING_CLOCKS_AGREE_MS)
|
|
172
|
+
return;
|
|
173
|
+
this.offset = Math.round(meshNow - (sent.wall + rtt / 2));
|
|
174
|
+
}
|
|
115
175
|
isConnected() {
|
|
116
176
|
return this.open && this.ws?.readyState === WS_OPEN;
|
|
117
177
|
}
|
|
@@ -152,6 +212,9 @@ async function defaultSocketFactory() {
|
|
|
152
212
|
}
|
|
153
213
|
|
|
154
214
|
export {
|
|
215
|
+
WAKE_TICK_MS,
|
|
216
|
+
wakeWatch,
|
|
217
|
+
freshness,
|
|
155
218
|
MeshSocket,
|
|
156
219
|
defaultSocketFactory
|
|
157
220
|
};
|
|
@@ -29,6 +29,8 @@ var READ_TOOLS = [
|
|
|
29
29
|
"mcp__cloop__get_task_context",
|
|
30
30
|
"mcp__cloop__list_tasks",
|
|
31
31
|
"mcp__cloop__search",
|
|
32
|
+
// Lists and reads Cloop's playbooks; a skill writes nothing itself.
|
|
33
|
+
"mcp__cloop__skill",
|
|
32
34
|
...READ_PREFIXES.map((prefix) => `Bash(${prefix} *)`)
|
|
33
35
|
];
|
|
34
36
|
var FLAGS = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ConnectFailure,
|
|
4
4
|
deviceLogin
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MVMKRRE2.js";
|
|
6
6
|
import {
|
|
7
7
|
ApiError,
|
|
8
8
|
ReauthError,
|
|
@@ -51,14 +51,14 @@ function storedLabel(path) {
|
|
|
51
51
|
} catch {
|
|
52
52
|
}
|
|
53
53
|
throw new Error(
|
|
54
|
-
`local_file_unreadable: Cannot read the existing
|
|
54
|
+
`local_file_unreadable: Cannot read the existing cloud agent file at ${path}. Run cloop connect --webhook <endpoint> --name <different-name>.`
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
function assertNoPathCollision(path, label) {
|
|
58
58
|
const existingLabel = storedLabel(path);
|
|
59
59
|
if (existingLabel && existingLabel !== label) {
|
|
60
60
|
throw new Error(
|
|
61
|
-
`local_file_collision:
|
|
61
|
+
`local_file_collision: Cloud agent labels "${existingLabel}" and "${label}" use the same local file ${path}. Run cloop connect --webhook <endpoint> --name <different-name>.`
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -259,7 +259,7 @@ async function connectWebhook(argv, attempt) {
|
|
|
259
259
|
);
|
|
260
260
|
}
|
|
261
261
|
if (existing?.verified) {
|
|
262
|
-
console.log(`Cloop
|
|
262
|
+
console.log(`Cloop machine ${name} is already a verified cloud agent.`);
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
if (!existing || argv.includes("--rotate-secret")) {
|
|
@@ -303,7 +303,7 @@ The command will now wait for your endpoint to answer while you set it up.`
|
|
|
303
303
|
attempt.step = "webhook_verify";
|
|
304
304
|
await waitForVerification(name);
|
|
305
305
|
console.log(`[workstation:cloud-connect] Verified ${name}.`);
|
|
306
|
-
console.log(`Cloop
|
|
306
|
+
console.log(`Cloop machine ${name} is a verified cloud agent.`);
|
|
307
307
|
}
|
|
308
308
|
async function runnerCommand(argv) {
|
|
309
309
|
switch (argv[0]) {
|
|
@@ -52,17 +52,18 @@ import {
|
|
|
52
52
|
which,
|
|
53
53
|
workFolder,
|
|
54
54
|
workFolderLine
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
55
|
+
} from "./chunk-ER5JS3RP.js";
|
|
56
|
+
import "./chunk-KYGYU5G2.js";
|
|
57
|
+
import "./chunk-EKLBEP32.js";
|
|
58
|
+
import "./chunk-3S2ECJTO.js";
|
|
58
59
|
import "./chunk-NTXQLEMQ.js";
|
|
59
60
|
import "./chunk-VK6GV757.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-365HFCQQ.js";
|
|
62
|
+
import "./chunk-PKIEWBR7.js";
|
|
63
|
+
import "./chunk-W4QJS3GR.js";
|
|
64
|
+
import "./chunk-MVMKRRE2.js";
|
|
64
65
|
import "./chunk-ES5BRAKJ.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-3I6NDELL.js";
|
|
66
67
|
import "./chunk-D5UZW42X.js";
|
|
67
68
|
export {
|
|
68
69
|
DEFAULT_T3_URL,
|
|
@@ -7,17 +7,18 @@ import {
|
|
|
7
7
|
runnerOrigin,
|
|
8
8
|
stopService,
|
|
9
9
|
unitOrigin
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ER5JS3RP.js";
|
|
11
|
+
import "./chunk-KYGYU5G2.js";
|
|
12
|
+
import "./chunk-EKLBEP32.js";
|
|
13
|
+
import "./chunk-3S2ECJTO.js";
|
|
13
14
|
import "./chunk-NTXQLEMQ.js";
|
|
14
15
|
import "./chunk-VK6GV757.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-365HFCQQ.js";
|
|
17
|
+
import "./chunk-PKIEWBR7.js";
|
|
18
|
+
import "./chunk-W4QJS3GR.js";
|
|
19
|
+
import "./chunk-MVMKRRE2.js";
|
|
19
20
|
import "./chunk-ES5BRAKJ.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-3I6NDELL.js";
|
|
21
22
|
import "./chunk-D5UZW42X.js";
|
|
22
23
|
export {
|
|
23
24
|
disconnect,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
existingRunnerEnvironment,
|
|
4
|
+
pinExistingRunner
|
|
5
|
+
} from "./chunk-ER5JS3RP.js";
|
|
6
|
+
import "./chunk-KYGYU5G2.js";
|
|
7
|
+
import "./chunk-EKLBEP32.js";
|
|
8
|
+
import "./chunk-3S2ECJTO.js";
|
|
9
|
+
import "./chunk-NTXQLEMQ.js";
|
|
10
|
+
import "./chunk-VK6GV757.js";
|
|
11
|
+
import "./chunk-365HFCQQ.js";
|
|
12
|
+
import "./chunk-PKIEWBR7.js";
|
|
13
|
+
import "./chunk-W4QJS3GR.js";
|
|
14
|
+
import "./chunk-MVMKRRE2.js";
|
|
15
|
+
import "./chunk-ES5BRAKJ.js";
|
|
16
|
+
import "./chunk-3I6NDELL.js";
|
|
17
|
+
import "./chunk-D5UZW42X.js";
|
|
18
|
+
export {
|
|
19
|
+
existingRunnerEnvironment,
|
|
20
|
+
pinExistingRunner
|
|
21
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
nodeTooOld
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-365HFCQQ.js";
|
|
5
5
|
import {
|
|
6
6
|
VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3I6NDELL.js";
|
|
8
8
|
import {
|
|
9
9
|
applyEnvironmentFlag
|
|
10
10
|
} from "./chunk-D5UZW42X.js";
|
|
@@ -32,7 +32,7 @@ Usage:
|
|
|
32
32
|
cloop connect [--repo <path>]... [--driver t3|claude-code|codex] [--fallback-model <list>]
|
|
33
33
|
[--no-service] [--no-start] [--ask] [--ask-everything] [--t3-pair <link>]
|
|
34
34
|
[--hide-other-threads | --show-other-threads]
|
|
35
|
-
Make this
|
|
35
|
+
Make this computer a Cloop machine: T3 Code, else
|
|
36
36
|
Claude Code or Codex in the folders you name,
|
|
37
37
|
else ~/Cloop. No repository is needed. --ask
|
|
38
38
|
lists your recent checkouts to pick from.
|
|
@@ -43,10 +43,10 @@ Usage:
|
|
|
43
43
|
started yourself; --hide-other-threads hides them
|
|
44
44
|
cloop use t3|claude-code|codex Run Cloop work here with that harness. It reconnects
|
|
45
45
|
this machine, swaps its service, and keeps the choice
|
|
46
|
-
cloop disconnect [--yes] Stop being a Cloop
|
|
47
|
-
this computer on Cloop, remove its service and
|
|
46
|
+
cloop disconnect [--yes] Stop being a Cloop machine in one environment: revoke
|
|
47
|
+
this computer on Cloop, remove its service and machine files
|
|
48
48
|
cloop box connect cloop connect with T3 Code forced
|
|
49
|
-
cloop box run Answer the Cloop Agent's
|
|
49
|
+
cloop box run Answer the Cloop Agent's machine calls (daemon)
|
|
50
50
|
cloop runs List this machine's runs: open ones, and the last 24 hours
|
|
51
51
|
cloop watch [id] Follow a run as it works. No id: the newest open run.
|
|
52
52
|
Stop it from Threads.
|
|
@@ -54,18 +54,18 @@ Usage:
|
|
|
54
54
|
in this terminal. No id: the newest open run.
|
|
55
55
|
cloop resume <id> Open a finished run in Claude Code, in its repository
|
|
56
56
|
cloop runner register --webhook <url> --label <name> [--reactivate] [--rotate-secret]
|
|
57
|
-
Register a cloud
|
|
57
|
+
Register a cloud agent endpoint
|
|
58
58
|
cloop runner verify --label <name>
|
|
59
59
|
Send a fresh verification request
|
|
60
60
|
cloop runner revoke --label <name>
|
|
61
|
-
Revoke a cloud
|
|
61
|
+
Revoke a cloud agent and delete its local secret
|
|
62
62
|
cloop --help Show this help
|
|
63
63
|
|
|
64
64
|
Add --staging to any command to use Cloop staging instead of production.
|
|
65
|
-
A production
|
|
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-KN37YN7Y.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-YB3JV5WY.js");
|
|
77
77
|
await loginCommand(argv);
|
|
78
78
|
break;
|
|
79
79
|
}
|
|
@@ -83,67 +83,67 @@ 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-MD6X5AWJ.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-2DBKYHJA.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-OC5OH33U.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-JIQY32FQ.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-6WIOMOCW.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-AKPKKX5S.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-LM2JFG3P.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-LM2JFG3P.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-ANPJB6JG.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-LM2JFG3P.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-VU7TITZM.js");
|
|
141
141
|
await runnerCommand(argv.slice(1));
|
|
142
142
|
break;
|
|
143
143
|
}
|
|
144
144
|
case "hook": {
|
|
145
145
|
if (argv[1] === "runner-permission") {
|
|
146
|
-
const { runnerPermissionHook } = await import("./read-permissions-
|
|
146
|
+
const { runnerPermissionHook } = await import("./read-permissions-EGSGI4HL.js");
|
|
147
147
|
await runnerPermissionHook();
|
|
148
148
|
} else if (argv[1] === "session-start") {
|
|
149
149
|
const { hookSessionStart } = await import("./hook-session-start-5JYNMGX4.js");
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
deviceLogin,
|
|
4
4
|
loginCommand,
|
|
5
5
|
refusalSentence
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MVMKRRE2.js";
|
|
7
7
|
import "./chunk-ES5BRAKJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3I6NDELL.js";
|
|
9
9
|
import "./chunk-D5UZW42X.js";
|
|
10
10
|
export {
|
|
11
11
|
deviceLogin,
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
syncInboxPending,
|
|
7
7
|
writeState
|
|
8
8
|
} from "./chunk-6QXNXJ7C.js";
|
|
9
|
-
import {
|
|
10
|
-
MeshSocket,
|
|
11
|
-
defaultSocketFactory
|
|
12
|
-
} from "./chunk-IJH4O27H.js";
|
|
13
9
|
import {
|
|
14
10
|
readSessionState,
|
|
15
11
|
toolPhrase,
|
|
16
12
|
writeSessionState
|
|
17
13
|
} from "./chunk-EVIVOEJY.js";
|
|
14
|
+
import {
|
|
15
|
+
MeshSocket,
|
|
16
|
+
defaultSocketFactory
|
|
17
|
+
} from "./chunk-KYGYU5G2.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-3I6NDELL.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-W4QJS3GR.js";
|
|
6
|
+
import "./chunk-MVMKRRE2.js";
|
|
7
7
|
import "./chunk-ES5BRAKJ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3I6NDELL.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-EGO3GOXI.js";
|
|
13
|
+
import "./chunk-3S2ECJTO.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-7GLIYYIB.js";
|
|
13
|
+
import "./chunk-EGO3GOXI.js";
|
|
14
|
+
import "./chunk-EKLBEP32.js";
|
|
15
|
+
import "./chunk-3S2ECJTO.js";
|
|
16
16
|
import "./chunk-NTXQLEMQ.js";
|
|
17
17
|
import "./chunk-VK6GV757.js";
|
|
18
18
|
import "./chunk-ES5BRAKJ.js";
|
|
@@ -3,20 +3,21 @@ import {
|
|
|
3
3
|
DRIVER_NAME,
|
|
4
4
|
pinExistingRunner,
|
|
5
5
|
runConnect
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-ER5JS3RP.js";
|
|
7
|
+
import "./chunk-KYGYU5G2.js";
|
|
8
|
+
import "./chunk-EKLBEP32.js";
|
|
8
9
|
import {
|
|
9
10
|
isLocal,
|
|
10
11
|
readRunnerConfig
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3S2ECJTO.js";
|
|
12
13
|
import "./chunk-NTXQLEMQ.js";
|
|
13
14
|
import "./chunk-VK6GV757.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-365HFCQQ.js";
|
|
16
|
+
import "./chunk-PKIEWBR7.js";
|
|
17
|
+
import "./chunk-W4QJS3GR.js";
|
|
18
|
+
import "./chunk-MVMKRRE2.js";
|
|
18
19
|
import "./chunk-ES5BRAKJ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-3I6NDELL.js";
|
|
20
21
|
import "./chunk-D5UZW42X.js";
|
|
21
22
|
|
|
22
23
|
// src/commands/use.ts
|
|
@@ -45,7 +46,7 @@ async function useCommand(argv, deps = {}) {
|
|
|
45
46
|
log(`[runner:use] from=${from} to=${driver} outcome=${error ? `failed error=${error}` : "ok"}`);
|
|
46
47
|
if (error) return 1;
|
|
47
48
|
out(
|
|
48
|
-
`${machineNoun(deps.platform ?? process.platform)}'s ${environment}
|
|
49
|
+
`${machineNoun(deps.platform ?? process.platform)}'s ${environment} machine now runs Cloop work in ${DRIVER_NAME[driver]}.`
|
|
49
50
|
);
|
|
50
51
|
return 0;
|
|
51
52
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloop/runner",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.28",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"description": "Make your
|
|
6
|
+
"description": "Make your computer and your agents Cloop machines: device login, the machine daemon, the Cloop MCP server, and Claude Code hooks.",
|
|
7
7
|
"homepage": "https://mycloop.com",
|
|
8
8
|
"bugs": {
|
|
9
9
|
"url": "https://github.com/ClosedLoopTechnologies/clo0p/issues"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
existingRunnerEnvironment,
|
|
4
|
-
pinExistingRunner
|
|
5
|
-
} from "./chunk-PQPWITU3.js";
|
|
6
|
-
import "./chunk-6F2ZM5H3.js";
|
|
7
|
-
import "./chunk-NVESLEXA.js";
|
|
8
|
-
import "./chunk-NTXQLEMQ.js";
|
|
9
|
-
import "./chunk-VK6GV757.js";
|
|
10
|
-
import "./chunk-YEO27QQP.js";
|
|
11
|
-
import "./chunk-R3CLO2FB.js";
|
|
12
|
-
import "./chunk-IXG4H623.js";
|
|
13
|
-
import "./chunk-UVB722OW.js";
|
|
14
|
-
import "./chunk-ES5BRAKJ.js";
|
|
15
|
-
import "./chunk-VH7XVQFJ.js";
|
|
16
|
-
import "./chunk-D5UZW42X.js";
|
|
17
|
-
export {
|
|
18
|
-
existingRunnerEnvironment,
|
|
19
|
-
pinExistingRunner
|
|
20
|
-
};
|