@cloop/runner 0.3.24 → 0.3.27

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.
Files changed (27) hide show
  1. package/README.md +2 -2
  2. package/dist/{box-OGT2NRPJ.js → box-TENZ3P6J.js} +157 -32
  3. package/dist/{chunk-YEO27QQP.js → chunk-365HFCQQ.js} +1 -1
  4. package/dist/{chunk-6F2ZM5H3.js → chunk-3OF5FEMG.js} +1 -1
  5. package/dist/{chunk-UVB722OW.js → chunk-C6EAR65U.js} +1 -1
  6. package/dist/{chunk-PQPWITU3.js → chunk-CC2S6H4W.js} +197 -54
  7. package/dist/{chunk-IXG4H623.js → chunk-KDO735VV.js} +5 -5
  8. package/dist/{chunk-IJH4O27H.js → chunk-KYGYU5G2.js} +65 -2
  9. package/dist/{chunk-F4UQ2H5F.js → chunk-MRP3S5DT.js} +1 -1
  10. package/dist/{chunk-R3CLO2FB.js → chunk-PKIEWBR7.js} +2 -0
  11. package/dist/{chunk-NVESLEXA.js → chunk-PUKYUGWD.js} +26 -7
  12. package/dist/{chunk-VH7XVQFJ.js → chunk-U57DZQSE.js} +1 -1
  13. package/dist/{chunk-MHKSBXUD.js → chunk-ZYU7Y2SE.js} +6 -6
  14. package/dist/{connect-7DUV7BMO.js → connect-YAFC76SG.js} +9 -8
  15. package/dist/{disconnect-IWGVQ2GZ.js → disconnect-AJBQUDE3.js} +9 -8
  16. package/dist/existing-runner-FWDDD3L2.js +21 -0
  17. package/dist/index.js +23 -23
  18. package/dist/{login-J3N7TYDI.js → login-TALFCKAD.js} +2 -2
  19. package/dist/{mcp-server-HPMJRI6J.js → mcp-server-RUK3JL4O.js} +5 -5
  20. package/dist/{read-permissions-SPOKGVLO.js → read-permissions-EGSGI4HL.js} +1 -1
  21. package/dist/{runner-TMR3BBL5.js → runner-GOT6CIJW.js} +3 -3
  22. package/dist/{runs-S3QKEWHY.js → runs-SUZJHP7M.js} +2 -2
  23. package/dist/{statusline-UIG25UUX.js → statusline-XHSO6GCX.js} +1 -1
  24. package/dist/{takeover-3U5V2KXY.js → takeover-B63GSUZW.js} +4 -4
  25. package/dist/{use-I2KUA64A.js → use-L4CIPDJZ.js} +10 -9
  26. package/package.json +2 -2
  27. 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 (typeof frame.of === "string") this.opts.onAck?.(frame.of, frame.ok !== false);
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
  };
@@ -9,7 +9,7 @@ import {
9
9
  runHarness,
10
10
  runLogDir,
11
11
  runLogPath
12
- } from "./chunk-NVESLEXA.js";
12
+ } from "./chunk-PUKYUGWD.js";
13
13
  import {
14
14
  sanitizeLabel,
15
15
  stripControl
@@ -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 = {
@@ -567,8 +567,9 @@ var RESULT_INSTRUCTION = [
567
567
  "```cloop-result",
568
568
  '{"summary": "One or two sentences on what you did.", "outputs": [{"kind": "pr", "title": "fix: the thing", "url": "https://github.com/org/repo/pull/1"}], "checks": [{"name": "Tests", "outcome": "passed"}]}',
569
569
  "```",
570
- "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.",
570
+ "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), wizard (title, steps). A check outcome is passed, failed or skipped.",
571
571
  "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.",
572
+ 'A wizard is for steps only the user can do by hand: a sign-in, an app permission, a key from a dashboard, or a change in a dashboard or console you cannot make yourself. When the work needs such a step, return a wizard for it, not only words. A wizard has 1 to 6 steps in order, each {"title", "body" in Markdown, optional https "url"}. Never ask the user to paste a password, key or other secret anywhere. The user sees a wizard as a walkthrough: in your own words, call it a walkthrough, never a wizard.',
572
573
  "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.",
573
574
  "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."
574
575
  ].join("\n");
@@ -633,6 +634,8 @@ function cleanOutput(o) {
633
634
  }
634
635
  case "file":
635
636
  return text(out.path, 400) ? { kind: "file", title, path: out.path } : null;
637
+ case "wizard":
638
+ return Array.isArray(out.steps) ? { kind: "wizard", title, steps: out.steps } : null;
636
639
  default:
637
640
  return null;
638
641
  }
@@ -676,6 +679,12 @@ function readRunResult(message) {
676
679
  return none;
677
680
  }
678
681
  }
682
+ function hasResultBlock(text3) {
683
+ return /```cloop-result\s*\n/.test(text3 ?? "");
684
+ }
685
+ function resultText(final, earlier) {
686
+ return (hasResultBlock(final) ? final : hasResultBlock(earlier) ? earlier : final) ?? void 0;
687
+ }
679
688
  function parseRunResult(message) {
680
689
  return readRunResult(message).result;
681
690
  }
@@ -709,6 +718,9 @@ function isProgressSentence(value) {
709
718
  }
710
719
  var PROGRESS_MS = 3e4;
711
720
  var RUN_TEXT_MAX = 4e3;
721
+ function finalWords(text3) {
722
+ return text3.replace(/\r\n?/g, "\n").replace(/[ \t]+$/gm, "").replace(/\n{3,}/g, "\n\n").trim();
723
+ }
712
724
  function nextProgress(clock, text3, now, ms = PROGRESS_MS, force = false) {
713
725
  const summary = (parseRunResult(text3)?.summary ?? text3.split("```cloop-result")[0] ?? "").replace(/\s+/g, " ").trim().slice(0, RUN_TEXT_MAX);
714
726
  if (!isProgressSentence(summary)) return null;
@@ -756,7 +768,7 @@ import { createHash } from "crypto";
756
768
  var TOKEN_SCOPE = "agent session logs on this machine";
757
769
  var MISSING_DIAGNOSTICS = {
758
770
  status: "missing_permission",
759
- hint: "This runner's T3 pairing cannot read token usage. Run `cloop connect` on that machine; if it asks for a pairing link, make one with the diagnostics permission."
771
+ hint: "This machine's T3 pairing cannot read token usage. Run `cloop connect` on that machine; if it asks for a pairing link, make one with the diagnostics permission."
760
772
  };
761
773
  var isObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
762
774
  var count = (v) => typeof v === "number" && Number.isFinite(v) && v >= 0;
@@ -1130,8 +1142,10 @@ function outcomeOf(p) {
1130
1142
  const run2 = latestRun(p.runs ?? []);
1131
1143
  const status = run2?.status ?? "pending";
1132
1144
  const settled = TERMINAL_RUN.has(status) || Boolean(p.thread.settledAt);
1133
- const text3 = (p.messages ?? []).filter((m) => m.role === "assistant" && m.text).at(-1)?.text?.trim();
1134
- const { result, dropped } = readRunResult(text3);
1145
+ const said = (p.messages ?? []).filter((m) => m.role === "assistant" && m.text);
1146
+ const text3 = said.at(-1)?.text?.trim();
1147
+ const block = said.filter((m) => (!run2 || m.runId === run2.id) && hasResultBlock(m.text)).at(-1)?.text?.trim();
1148
+ const { result, dropped } = readRunResult(resultText(text3, block));
1135
1149
  return {
1136
1150
  status,
1137
1151
  settled,
@@ -2364,7 +2378,7 @@ ${a.text}` : a.text;
2364
2378
  const r = this.runs.get(id);
2365
2379
  const unwatch = () => set.delete(onEvent);
2366
2380
  if (!r) {
2367
- onEvent({ kind: "failed", summary: "This run is not on the runner any more." });
2381
+ onEvent({ kind: "failed", summary: "This run is not on the machine any more." });
2368
2382
  return unwatch;
2369
2383
  }
2370
2384
  if (r.end) {
@@ -2449,6 +2463,7 @@ ${a.text}` : a.text;
2449
2463
  }
2450
2464
  }
2451
2465
  spawnRun(r, prompt, resume) {
2466
+ r.block_text = void 0;
2452
2467
  const dialect = this.dialectOf(r);
2453
2468
  r.used_permission = dialect.permission?.(r);
2454
2469
  const command = commandFor(dialect.bin, dialect.args(r, resume));
@@ -2501,6 +2516,7 @@ ${RESULT_INSTRUCTION}`));
2501
2516
  return;
2502
2517
  case "text":
2503
2518
  r.last_text = item.text.slice(0, 1e5);
2519
+ if (hasResultBlock(item.text)) r.block_text = r.last_text;
2504
2520
  this.progress(r, live, item.text, false);
2505
2521
  return;
2506
2522
  case "tool": {
@@ -2550,11 +2566,11 @@ ${RESULT_INSTRUCTION}`));
2550
2566
  }
2551
2567
  if (code === 0 && live.result?.ok) {
2552
2568
  const text3 = live.result.text?.trim() || r.last_text;
2553
- const { result, dropped } = readRunResult(text3);
2569
+ const { result, dropped } = readRunResult(resultText(text3, r.block_text));
2554
2570
  const lost = droppedLine(dropped, r.work_id);
2555
2571
  if (lost) this.log(lost);
2556
2572
  const { pr, note } = await this.outcome(r, text3);
2557
- const summary = [r.switched, note, text3].filter(Boolean).join(" ").replace(/\s+/g, " ");
2573
+ const summary = finalWords([r.switched, note, text3].filter(Boolean).join("\n\n"));
2558
2574
  await this.end(r, {
2559
2575
  kind: "settled",
2560
2576
  ...result ? { result } : {},
@@ -2754,11 +2770,14 @@ export {
2754
2770
  RESULT_INSTRUCTION,
2755
2771
  resultPrUrl,
2756
2772
  readRunResult,
2773
+ hasResultBlock,
2774
+ resultText,
2757
2775
  RUNTIME_MODES,
2758
2776
  BoxToolError,
2759
2777
  CLOOP_THREAD_PREFIX,
2760
2778
  questionLine,
2761
2779
  RUN_TEXT_MAX,
2780
+ finalWords,
2762
2781
  nextProgress,
2763
2782
  isYes,
2764
2783
  HARNESS_LIMIT,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/version.ts
4
- var VERSION = true ? "0.3.24" : "0.0.0-dev";
4
+ var VERSION = true ? "0.3.27" : "0.0.0-dev";
5
5
 
6
6
  export {
7
7
  VERSION
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  findRun,
4
4
  ownHarness
5
- } from "./chunk-F4UQ2H5F.js";
5
+ } from "./chunk-MRP3S5DT.js";
6
6
  import {
7
7
  lockThreadsFile,
8
8
  threadsFilePath
9
- } from "./chunk-6F2ZM5H3.js";
9
+ } from "./chunk-3OF5FEMG.js";
10
10
  import {
11
11
  localRunsFilePath,
12
12
  readRunRecords,
13
13
  runHarness,
14
14
  takeoverSummary
15
- } from "./chunk-NVESLEXA.js";
15
+ } from "./chunk-PUKYUGWD.js";
16
16
  import {
17
17
  shortMachineName
18
18
  } from "./chunk-NTXQLEMQ.js";
@@ -190,7 +190,7 @@ async function takeoverCommand(args, deps = {}) {
190
190
  try {
191
191
  if (run.pid !== null && (deps.alive ?? processAlive)(run.pid))
192
192
  return fail(
193
- `The runner is not running, but the run's process (pid ${run.pid}) is. Start the runner, or stop the process, then run this again.`,
193
+ `Cloop is not running on this machine, but the run's process (pid ${run.pid}) is. Start Cloop, or stop the process, then run this again.`,
194
194
  "orphan"
195
195
  );
196
196
  endInFile(file, run.work_id, machine, now());
@@ -213,12 +213,12 @@ async function takeoverCommand(args, deps = {}) {
213
213
  const refused = takeTakeoverReply(dir, run.work_id);
214
214
  if (refused)
215
215
  return fail(
216
- `The runner could not stop the run (${refused}). Stop it from Threads, then run: cloop resume ${short}`,
216
+ `The machine could not stop the run (${refused}). Stop it from Threads, then run: cloop resume ${short}`,
217
217
  `refused:${refused}`
218
218
  );
219
219
  if (Date.now() > deadline)
220
220
  return fail(
221
- `The runner did not stop the run. Stop it from Threads, then run: cloop resume ${short}`,
221
+ `The machine did not stop the run. Stop it from Threads, then run: cloop resume ${short}`,
222
222
  "daemon_silent"
223
223
  );
224
224
  await sleep(deps.pollMs ?? 250);
@@ -52,17 +52,18 @@ import {
52
52
  which,
53
53
  workFolder,
54
54
  workFolderLine
55
- } from "./chunk-PQPWITU3.js";
56
- import "./chunk-6F2ZM5H3.js";
57
- import "./chunk-NVESLEXA.js";
55
+ } from "./chunk-CC2S6H4W.js";
56
+ import "./chunk-KYGYU5G2.js";
57
+ import "./chunk-3OF5FEMG.js";
58
+ import "./chunk-PUKYUGWD.js";
58
59
  import "./chunk-NTXQLEMQ.js";
59
60
  import "./chunk-VK6GV757.js";
60
- import "./chunk-YEO27QQP.js";
61
- import "./chunk-R3CLO2FB.js";
62
- import "./chunk-IXG4H623.js";
63
- import "./chunk-UVB722OW.js";
61
+ import "./chunk-365HFCQQ.js";
62
+ import "./chunk-PKIEWBR7.js";
63
+ import "./chunk-KDO735VV.js";
64
+ import "./chunk-C6EAR65U.js";
64
65
  import "./chunk-ES5BRAKJ.js";
65
- import "./chunk-VH7XVQFJ.js";
66
+ import "./chunk-U57DZQSE.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-PQPWITU3.js";
11
- import "./chunk-6F2ZM5H3.js";
12
- import "./chunk-NVESLEXA.js";
10
+ } from "./chunk-CC2S6H4W.js";
11
+ import "./chunk-KYGYU5G2.js";
12
+ import "./chunk-3OF5FEMG.js";
13
+ import "./chunk-PUKYUGWD.js";
13
14
  import "./chunk-NTXQLEMQ.js";
14
15
  import "./chunk-VK6GV757.js";
15
- import "./chunk-YEO27QQP.js";
16
- import "./chunk-R3CLO2FB.js";
17
- import "./chunk-IXG4H623.js";
18
- import "./chunk-UVB722OW.js";
16
+ import "./chunk-365HFCQQ.js";
17
+ import "./chunk-PKIEWBR7.js";
18
+ import "./chunk-KDO735VV.js";
19
+ import "./chunk-C6EAR65U.js";
19
20
  import "./chunk-ES5BRAKJ.js";
20
- import "./chunk-VH7XVQFJ.js";
21
+ import "./chunk-U57DZQSE.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-CC2S6H4W.js";
6
+ import "./chunk-KYGYU5G2.js";
7
+ import "./chunk-3OF5FEMG.js";
8
+ import "./chunk-PUKYUGWD.js";
9
+ import "./chunk-NTXQLEMQ.js";
10
+ import "./chunk-VK6GV757.js";
11
+ import "./chunk-365HFCQQ.js";
12
+ import "./chunk-PKIEWBR7.js";
13
+ import "./chunk-KDO735VV.js";
14
+ import "./chunk-C6EAR65U.js";
15
+ import "./chunk-ES5BRAKJ.js";
16
+ import "./chunk-U57DZQSE.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-YEO27QQP.js";
4
+ } from "./chunk-365HFCQQ.js";
5
5
  import {
6
6
  VERSION
7
- } from "./chunk-VH7XVQFJ.js";
7
+ } from "./chunk-U57DZQSE.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 machine a Cloop runner: T3 Code, else
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 runner in one environment: revoke
47
- this computer on Cloop, remove its service and runner files
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 runner calls (daemon)
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 runner endpoint
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 runner and delete its local secret
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 runner and a staging runner can run side by side on one machine.
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-4UYED6LY.js");
68
+ const { pinExistingRunner: pin } = await import("./existing-runner-FWDDD3L2.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-J3N7TYDI.js");
76
+ const { loginCommand } = await import("./login-TALFCKAD.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-HPMJRI6J.js");
86
+ const { startMcpServer } = await import("./mcp-server-RUK3JL4O.js");
87
87
  await startMcpServer();
88
88
  break;
89
89
  }
90
90
  case "statusline": {
91
- const { statuslineCommand } = await import("./statusline-UIG25UUX.js");
91
+ const { statuslineCommand } = await import("./statusline-XHSO6GCX.js");
92
92
  statuslineCommand();
93
93
  break;
94
94
  }
95
95
  case "connect": {
96
- const { connectCommand } = await import("./connect-7DUV7BMO.js");
96
+ const { connectCommand } = await import("./connect-YAFC76SG.js");
97
97
  await connectCommand(argv.slice(1));
98
98
  break;
99
99
  }
100
100
  case "use": {
101
- const { useCommand } = await import("./use-I2KUA64A.js");
101
+ const { useCommand } = await import("./use-L4CIPDJZ.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-IWGVQ2GZ.js");
106
+ const { disconnectCommand } = await import("./disconnect-AJBQUDE3.js");
107
107
  await disconnectCommand(argv.slice(1));
108
108
  break;
109
109
  }
110
110
  case "box": {
111
- const { boxCommand } = await import("./box-OGT2NRPJ.js");
111
+ const { boxCommand } = await import("./box-TENZ3P6J.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-S3QKEWHY.js");
117
+ const { runsCommand } = await import("./runs-SUZJHP7M.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-S3QKEWHY.js");
123
+ const { watchCommand } = await import("./runs-SUZJHP7M.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-3U5V2KXY.js");
129
+ const { takeoverCommand } = await import("./takeover-B63GSUZW.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-S3QKEWHY.js");
135
+ const { resumeCommand } = await import("./runs-SUZJHP7M.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-TMR3BBL5.js");
140
+ const { runnerCommand } = await import("./runner-GOT6CIJW.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-SPOKGVLO.js");
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-UVB722OW.js";
6
+ } from "./chunk-C6EAR65U.js";
7
7
  import "./chunk-ES5BRAKJ.js";
8
- import "./chunk-VH7XVQFJ.js";
8
+ import "./chunk-U57DZQSE.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-VH7XVQFJ.js";
36
+ } from "./chunk-U57DZQSE.js";
37
37
  import {
38
38
  getMeshUrl,
39
39
  getToken
@@ -6,7 +6,7 @@ import {
6
6
  needsReadGuard,
7
7
  readOnlySettings,
8
8
  runnerPermissionHook
9
- } from "./chunk-R3CLO2FB.js";
9
+ } from "./chunk-PKIEWBR7.js";
10
10
  export {
11
11
  READ_PREFIXES,
12
12
  READ_TOOLS,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  connectWebhook,
4
4
  runnerCommand
5
- } from "./chunk-IXG4H623.js";
6
- import "./chunk-UVB722OW.js";
5
+ } from "./chunk-KDO735VV.js";
6
+ import "./chunk-C6EAR65U.js";
7
7
  import "./chunk-ES5BRAKJ.js";
8
- import "./chunk-VH7XVQFJ.js";
8
+ import "./chunk-U57DZQSE.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-F4UQ2H5F.js";
13
- import "./chunk-NVESLEXA.js";
12
+ } from "./chunk-MRP3S5DT.js";
13
+ import "./chunk-PUKYUGWD.js";
14
14
  import "./chunk-VK6GV757.js";
15
15
  import "./chunk-D5UZW42X.js";
16
16
  export {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-VK6GV757.js";
8
8
  import {
9
9
  VERSION
10
- } from "./chunk-VH7XVQFJ.js";
10
+ } from "./chunk-U57DZQSE.js";
11
11
  import {
12
12
  getToken
13
13
  } from "./chunk-D5UZW42X.js";
@@ -9,10 +9,10 @@ import {
9
9
  takeoverDir,
10
10
  writeTakeoverReply,
11
11
  writeTakeoverRequest
12
- } from "./chunk-MHKSBXUD.js";
13
- import "./chunk-F4UQ2H5F.js";
14
- import "./chunk-6F2ZM5H3.js";
15
- import "./chunk-NVESLEXA.js";
12
+ } from "./chunk-ZYU7Y2SE.js";
13
+ import "./chunk-MRP3S5DT.js";
14
+ import "./chunk-3OF5FEMG.js";
15
+ import "./chunk-PUKYUGWD.js";
16
16
  import "./chunk-NTXQLEMQ.js";
17
17
  import "./chunk-VK6GV757.js";
18
18
  import "./chunk-ES5BRAKJ.js";