tryharness 0.7.53 → 0.7.54

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 (69) hide show
  1. package/README.md +10 -5
  2. package/assets/dsh-plugin.mjs +72 -0
  3. package/assets/opencode-plugin.js +4 -3
  4. package/cli.mjs +115 -36
  5. package/lib/adapters.mjs +157 -222
  6. package/lib/agentRuntimes.mjs +26 -16
  7. package/lib/agentSignIn.mjs +226 -0
  8. package/lib/audit.mjs +643 -0
  9. package/lib/backupSetup.mjs +141 -0
  10. package/lib/boardAccess.mjs +8 -1
  11. package/lib/boardBackup.mjs +283 -0
  12. package/lib/boardMirror.mjs +71 -7
  13. package/lib/boardProtocol.json +59 -2
  14. package/lib/boardWaits.mjs +102 -0
  15. package/lib/book.mjs +659 -0
  16. package/lib/bridge.mjs +1 -1
  17. package/lib/cards.mjs +138 -28
  18. package/lib/cloudBoot.mjs +124 -0
  19. package/lib/commands.mjs +7 -2
  20. package/lib/context.mjs +18 -4
  21. package/lib/contractGate.mjs +377 -0
  22. package/lib/coordinator.mjs +149 -43
  23. package/lib/daemon.mjs +349 -28
  24. package/lib/desk.mjs +239 -0
  25. package/lib/desktop.mjs +106 -6
  26. package/lib/environments.mjs +237 -7
  27. package/lib/folders.mjs +2 -2
  28. package/lib/gitHost.mjs +174 -0
  29. package/lib/hookDialects.mjs +298 -0
  30. package/lib/landed.mjs +887 -0
  31. package/lib/live.mjs +284 -13
  32. package/lib/mcp-stdio.mjs +68 -2
  33. package/lib/members.json +16 -2
  34. package/lib/models.mjs +8 -8
  35. package/lib/museSession.mjs +16 -13
  36. package/lib/nativeHost.mjs +1 -1
  37. package/lib/neovim.mjs +126 -0
  38. package/lib/nudge.mjs +47 -16
  39. package/lib/ownMachines.mjs +343 -39
  40. package/lib/pairing.mjs +27 -10
  41. package/lib/paths.mjs +4 -0
  42. package/lib/personModel.mjs +89 -0
  43. package/lib/phones.mjs +66 -11
  44. package/lib/places.mjs +330 -10
  45. package/lib/readiness.mjs +135 -18
  46. package/lib/record.mjs +115 -0
  47. package/lib/runWorker.mjs +17 -2
  48. package/lib/runner.mjs +8 -4
  49. package/lib/sessionControl.mjs +377 -89
  50. package/lib/specialties.json +74 -0
  51. package/lib/specialties.mjs +477 -0
  52. package/lib/specialtyKeys.d.ts +3 -0
  53. package/lib/specialtyKeys.js +58 -0
  54. package/lib/specialtyNotice.mjs +147 -0
  55. package/lib/specialtySnapshot.mjs +138 -0
  56. package/lib/store.mjs +284 -1
  57. package/lib/swarm.mjs +137 -21
  58. package/lib/t3.mjs +13 -4
  59. package/lib/taskCommands.mjs +36 -9
  60. package/lib/taskRuns.mjs +9 -2
  61. package/lib/team.json +255 -148
  62. package/lib/team.mjs +529 -188
  63. package/lib/threadLine.mjs +116 -0
  64. package/lib/threadRuns.mjs +75 -11
  65. package/lib/threadView.mjs +15 -2
  66. package/lib/worktrees.mjs +51 -13
  67. package/package.json +4 -4
  68. package/lib/modelTiers.json +0 -1183
  69. package/lib/modelTiers.mjs +0 -133
package/README.md CHANGED
@@ -165,12 +165,14 @@ npx tryharness task <run-id> --follow
165
165
  npx tryharness logs --follow
166
166
  npx tryharness board
167
167
  npx tryharness board post --for claude-code --objective "Port the parser" --file ./brief.md
168
- npx tryharness disconnect
168
+ npx tryharness uninstall
169
169
  ```
170
170
 
171
171
  `status` is the normal health view. `doctor` verifies pairing, the login service, the
172
172
  daemon, the bridge, the database, and agent discovery. `sync` requests a background
173
- rescan; it is diagnostic, not part of normal setup.
173
+ rescan; it is diagnostic, not part of normal setup. `uninstall` removes the app, the service and
174
+ Harness's setup in every agent, and keeps the board, history and keys in `~/.harness`;
175
+ `uninstall --everything` deletes those too.
174
176
 
175
177
  Delegated coding tasks start when the user presses Start on Harness's proposal card, or
176
178
  at once when standing permission covers the folder (see Task board); either way the task is
@@ -428,9 +430,12 @@ this computer" in its setup, an optional permission), the Harness window links b
428
430
  it, `tryharness link` does the same. Each browser is paired with the computer it linked to;
429
431
  Settings lists every computer's and revokes each where it lives.
430
432
 
431
- `tryharness agents tier <agent> top|middle|bottom|auto` sets who may hold a team's important
432
- roles. Auto goes by the agent's model and effort in a snapshot of a public benchmark: the reviewer
433
- needs a top model, the synthesizer, director, builder and checker a middle one.
433
+ Each agent's card names its model and effort and its specialties on that model, each with its
434
+ evidence: a specialist agent's fixed role (Bankr, Quotient), benchmarks, its record on this board and
435
+ the person's own adds. The person adds or removes a specialty (a removal is final for that agent and
436
+ model), pins an agent for a specialty and appoints offices through the relay
437
+ (`board.swarm.specialty`, `board.swarm.pin`, `board.swarm.office`); see
438
+ [docs/swarm-organization.md](../docs/swarm-organization.md).
434
439
 
435
440
  ## Goals
436
441
 
@@ -0,0 +1,72 @@
1
+ // Installed by tryharness for DeepSeek Harness: a Cordis plugin its own patch file loads (~/.dsh/cordis.patch.yml).
2
+ // It tells a session about its board when it starts, notes the person's prompts with what changed on the board, and
3
+ // hands a session what the person sent it from Harness when its turn would end, with lib/nudge.mjs, the code Claude
4
+ // Code's hooks run. Its tools come from the Harness server in the same patch file. Read from DeepSeek Harness's
5
+ // source (deepseek-ai/deepseek-harness, October 2026): packages/experimental/hooks-claude-code, core/agent-loop.
6
+ import { randomUUID } from "node:crypto";
7
+ import path from "node:path";
8
+ import { pathToFileURL } from "node:url";
9
+
10
+ // Filled in by setup: the runtime the other agents' Harness server runs from.
11
+ const RUNTIME = "__HARNESS_RUNTIME__";
12
+ const AGENT = "dsh";
13
+ const harness = () =>
14
+ import(pathToFileURL(path.join(RUNTIME, "lib", "nudge.mjs")).href).catch(
15
+ () => null
16
+ );
17
+
18
+ export const name = "tryharness";
19
+
20
+ const pids = [process.pid, process.ppid];
21
+ // A message as DeepSeek Harness's createUserMessage makes one; its source says Harness added it, not the person.
22
+ const message = (text) =>
23
+ Object.freeze({
24
+ role: "user",
25
+ content: [{ type: "text", text }],
26
+ source: { kind: "tryharness" },
27
+ id: randomUUID(),
28
+ });
29
+ const where = (agent) => ({
30
+ session_id: agent?.session?.header?.id,
31
+ cwd: process.cwd(),
32
+ });
33
+ const typedByPerson = (messages) =>
34
+ messages.some((entry) => entry?.source?.kind === "user");
35
+
36
+ export function apply(ctx) {
37
+ // A session starting: where it runs, and the whole board.
38
+ ctx.on("agent/created", async ({ agent }) => {
39
+ const board = await harness();
40
+ if (!board || !where(agent).session_id) return;
41
+ await board.notePlace(AGENT, where(agent), pids);
42
+ const notice = await board.boardNudge(AGENT);
43
+ if (notice) agent.inject(message(notice));
44
+ });
45
+ // The person's prompt: noted, with a message from Harness and what changed on the board since the session last saw it.
46
+ ctx.on("agent/pre-step", async ({ agent, messages }, next) => {
47
+ const downstream = await next();
48
+ if (!typedByPerson(messages ?? []) || downstream.kind !== "enter")
49
+ return downstream;
50
+ const board = await harness();
51
+ if (!board || !where(agent).session_id) return downstream;
52
+ await board.notePrompt(AGENT, where(agent), pids);
53
+ const waiting = await board.takeMessages(AGENT, where(agent).session_id);
54
+ const text = [
55
+ waiting.length ? board.messagesText(waiting) : "",
56
+ await board.boardNudgeIfChanged(AGENT),
57
+ ]
58
+ .filter(Boolean)
59
+ .join("\n\n");
60
+ return text
61
+ ? { ...downstream, messages: [...downstream.messages, message(text)] }
62
+ : downstream;
63
+ });
64
+ // A turn about to end: a message waiting from Harness keeps it going; otherwise the session waits for the person.
65
+ ctx.on("agent/turn-stopping", async ({ agent }) => {
66
+ const board = await harness();
67
+ if (!board || !where(agent).session_id) return;
68
+ const waiting = await board.takeMessages(AGENT, where(agent).session_id);
69
+ if (waiting.length) agent.steer(message(board.messagesText(waiting)));
70
+ else await board.noteTurn(AGENT, where(agent), pids);
71
+ });
72
+ }
@@ -1,13 +1,14 @@
1
- // Installed globally by tryharness. It tells opencode about its board and hands it what the person sends a session from
1
+ // Installed globally by tryharness for OpenCode and Kilo. It tells opencode about its board and hands it what the person sends a session from
2
2
  // Harness with lib/nudge.mjs, the code Claude Code's and Codex's hooks run, and nudges the local daemon to index a session; indexing and retry state stay in the daemon's
3
3
  // SQLite database and never block opencode's idle event. Its tools come from the Harness server in its MCP config.
4
4
  import net from "node:net";
5
5
  import path from "node:path";
6
6
  import { pathToFileURL } from "node:url";
7
7
 
8
- // Filled in by setup: the runtime the other agents' Harness server runs from.
8
+ // Filled in by setup: the runtime the other agents' Harness server runs from, and the agent this copy serves (OpenCode,
9
+ // or Kilo, its fork with the same plugin API).
9
10
  const RUNTIME = "__HARNESS_RUNTIME__";
10
- const AGENT = "opencode";
11
+ const AGENT = "__HARNESS_AGENT__";
11
12
  const harness = () =>
12
13
  import(pathToFileURL(path.join(RUNTIME, "lib", "nudge.mjs")).href);
13
14
  const socketPath = async () =>
package/cli.mjs CHANGED
@@ -28,11 +28,14 @@ import { agentsHere, createLineup, lineupOf } from "./lib/lineup.mjs";
28
28
  import { CHECKABLE, createAgentReadiness } from "./lib/readiness.mjs";
29
29
  import { writeBrowserOffer } from "./lib/phones.mjs";
30
30
  import { createUi } from "./lib/ui.mjs";
31
+ import { backupCommand, offerBackup } from "./lib/backupSetup.mjs";
31
32
  import pc from "picocolors";
32
33
  import { removeLocalWakes } from "./lib/wakes.mjs";
33
34
  import { detectAgents } from "./lib/commands.mjs";
34
35
  import { daemonRequest } from "./lib/control-client.mjs";
35
36
  import { ensureDir, readJson, writeJsonAtomic } from "./lib/files.mjs";
37
+ import { hostApp, processTable } from "./lib/live.mjs";
38
+ import { noteSetupTerminal } from "./lib/places.mjs";
36
39
  import { paths } from "./lib/paths.mjs";
37
40
  import {
38
41
  joinSwarm,
@@ -41,6 +44,7 @@ import {
41
44
  waitForApproval,
42
45
  } from "./lib/pairing.mjs";
43
46
  import { setupProfile } from "./lib/profile.mjs";
47
+ import { cloudEnroll } from "./lib/cloudBoot.mjs";
44
48
  import { currentRuntime, installRuntime } from "./lib/runtime-install.mjs";
45
49
  import { installNativeHost, removeNativeHost } from "./lib/nativeHost.mjs";
46
50
  import { CORE, coreSizeMb } from "./lib/coreModels.mjs";
@@ -54,7 +58,7 @@ import {
54
58
  import {
55
59
  canShowDesktop,
56
60
  openDesktop,
57
- retireDesktop,
61
+ uninstallDesktop,
58
62
  setupDesktop,
59
63
  } from "./lib/desktop.mjs";
60
64
 
@@ -234,6 +238,12 @@ async function connect() {
234
238
  .filter((entry) => AGENTS.includes(entry.id))
235
239
  .map((entry) => entry.id);
236
240
  const ui = createUi();
241
+ // Where the person works, for Open until it has seen their sessions (places.mjs).
242
+ const table = processTable();
243
+ noteSetupTerminal({
244
+ host: hostApp(table, process.pid),
245
+ tty: table.get(process.pid)?.tty ?? null,
246
+ });
237
247
  console.log(`\n${banner(VERSION)}\n`);
238
248
  ui.intro(
239
249
  `${pc.bgCyan(pc.black(" tryharness "))} Setting up Harness on this computer`
@@ -319,7 +329,6 @@ async function connect() {
319
329
  spin.stop(
320
330
  `Harness is running on this computer ${pc.dim(`· ${service.manager}`)}`
321
331
  );
322
- await joinSwarm({ ui, code: setupCode, daemonRequest });
323
332
  // Harness already runs, so the browser lists the agents while the person tells them who they work for.
324
333
  await setupProfile({ ui, origin: pairOrigin, token: config.token });
325
334
  const joined = await walkThrough({
@@ -394,6 +403,21 @@ async function connect() {
394
403
  } catch (error) {
395
404
  ui.warn(`Browser not linked (${error.message}). Run: npx tryharness link`);
396
405
  }
406
+ // Last, so nothing else waits on it: an added computer works on its own until its code is typed on home.
407
+ const role = await joinSwarm({ ui, code: setupCode, daemonRequest });
408
+ // A Resident coming back gets their board back; one without a backup may start one.
409
+ const onBoard = await daemonRequest({
410
+ command: "board.list",
411
+ agent: "user",
412
+ all: true,
413
+ limit: 1,
414
+ }).catch(() => null);
415
+ await offerBackup({
416
+ ui,
417
+ daemonRequest,
418
+ role,
419
+ boardIsEmpty: onBoard?.ok === true && !onBoard.tasks?.length,
420
+ });
397
421
  const library = !readJson(paths.config, {}).libraryOff;
398
422
  const modelsHere = modelsPresent(path.join(paths.home, "local"), CORE);
399
423
  ui.note(
@@ -772,7 +796,7 @@ async function machines() {
772
796
  const response = await daemonRequest({ command: "machines.home" }, 20_000);
773
797
  if (!response.ok) throw new Error(response.error || "not moved");
774
798
  console.log(
775
- "This computer is home now: it holds the board from here on. The board on the computer that was home stays there; work it held is not moved."
799
+ "This computer is home now: it holds the board from here on. What the computer that was home has and this one does not comes here once it is back."
776
800
  );
777
801
  return;
778
802
  }
@@ -785,12 +809,12 @@ async function machines() {
785
809
  throw new Error(response.error || "the daemon could not list computers");
786
810
  const { self, joinCode } = response;
787
811
  console.log(
788
- `This computer: ${self.label} (${self.role === "worker" ? "worker" : self.standingInFor ? `standing in as home for ${self.standingInFor} until it is back` : "home, holds the board"})${self.fingerprint ? `, key ${self.fingerprint}` : ""}`
812
+ `This computer: ${self.label} (${self.role === "worker" ? (self.alone ? "worker, working on its own until it joins your swarm" : "worker") : self.standingInFor ? `standing in as home for ${self.standingInFor} until it is back` : "home, holds the board"})${self.fingerprint ? `, key ${self.fingerprint}` : ""}`
789
813
  );
790
814
  if (joinCode) {
791
815
  const home = response.machines.find((machine) => machine.role === "home");
792
816
  console.log(
793
- `Join code: ${joinCode}\nOn your home computer${home?.label ? ` (${home.label})` : ""}, choose Add a Computer in the Harness menu and type it, or run: npx tryharness machines add ${joinCode}`
817
+ `Join code: ${joinCode}\nOn your home computer${home?.label ? ` (${home.label})` : ""}, choose Add a Computer in the Harness menu and type it, or run: npx tryharness machines add ${joinCode}. What this computer does meanwhile goes there when it joins.`
794
818
  );
795
819
  }
796
820
  if (!response.machines.length) {
@@ -1733,24 +1757,94 @@ function logs() {
1733
1757
  );
1734
1758
  }
1735
1759
 
1736
- async function disconnect() {
1760
+ // A cloud computer's daemon (docs/cloud-swarm.md §5.3), run by the harness-cloud service as the harness user once
1761
+ // cloud-enroll has written its config: the agents the boot script installed are connected to the swarm the first
1762
+ // time, as setup connects them, and then the daemon runs from the installed package itself.
1763
+ async function cloudStart() {
1764
+ const config = readJson(paths.config, {});
1765
+ if (!config.cloud || !config.token)
1766
+ throw new Error("this is not an enrolled cloud computer");
1767
+ if (!config.agentStates) {
1768
+ const states = configureAgents({ runtimeRoot: SOURCE_ROOT });
1769
+ writeJsonAtomic(paths.config, {
1770
+ ...readJson(paths.config, config),
1771
+ version: VERSION,
1772
+ runtimeRoot: SOURCE_ROOT,
1773
+ agentStates: Object.fromEntries(
1774
+ states.map((state) => [state.agent, state])
1775
+ ),
1776
+ });
1777
+ }
1778
+ const { startDaemon } = await import("./lib/daemon.mjs");
1779
+ await startDaemon();
1780
+ }
1781
+
1782
+ // What setup downloaded into ~/.harness (the daemon's runtime, local models and their engine): uninstall takes it out
1783
+ // and keeps what is the person's, their board, history and keys, unless they ask for everything.
1784
+ const downloadedParts = () => [
1785
+ paths.runtime,
1786
+ paths.models,
1787
+ path.join(paths.home, "local"),
1788
+ ];
1789
+
1790
+ function folderBytes(target) {
1791
+ let stat;
1792
+ try {
1793
+ stat = fs.lstatSync(target);
1794
+ } catch {
1795
+ return 0;
1796
+ }
1797
+ if (!stat.isDirectory()) return stat.size;
1798
+ return fs
1799
+ .readdirSync(target)
1800
+ .reduce((total, name) => total + folderBytes(path.join(target, name)), 0);
1801
+ }
1802
+
1803
+ const megabytes = (bytes) => `${Math.max(1, Math.round(bytes / 1_000_000))} MB`;
1804
+
1805
+ async function uninstall() {
1806
+ const everything = has("--everything");
1807
+ // Harness first, while the daemon is still connected: this computer comes off the account and its pairing stops
1808
+ // working, so a computer set up later is not taken for a worker of this one.
1809
+ const left = await daemonRequest({ command: "machines.leave" }, 15_000).catch(
1810
+ () => null
1811
+ );
1737
1812
  uninstallService();
1738
- removeNativeHost();
1739
- retireDesktop({});
1740
1813
  try {
1741
1814
  await daemonRequest({ command: "shutdown" }, 2_000);
1742
1815
  } catch {}
1816
+ removeNativeHost();
1817
+ uninstallDesktop();
1743
1818
  removeAgentConfigurations();
1744
1819
  removeLocalWakes();
1745
- try {
1746
- fs.renameSync(paths.config, paths.config + `.disconnected-${Date.now()}`);
1747
- } catch {}
1748
- for (const target of [paths.status, paths.socket])
1820
+ const removed = everything
1821
+ ? [paths.home]
1822
+ : [...downloadedParts(), paths.status, paths.socket];
1823
+ for (const target of removed)
1749
1824
  try {
1750
- fs.unlinkSync(target);
1825
+ fs.rmSync(target, { recursive: true, force: true });
1751
1826
  } catch {}
1827
+ // The pairing goes; the person's choices stay (who is in their swarm, who they took out), so setting up again
1828
+ // keeps their swarm (October 23: a reinstall came back without Bankr, Quotient, Grok Bot and Muse).
1829
+ if (!everything) {
1830
+ const { token: _token, ...choices } = readJson(paths.config, {});
1831
+ if (Object.keys(choices).length) writeJsonAtomic(paths.config, choices);
1832
+ }
1833
+ if (!left?.ok)
1834
+ console.log(
1835
+ "Harness could not be told this computer is gone (it was not connected). Setting Harness up again on it still makes it home."
1836
+ );
1837
+ if (everything) {
1838
+ console.log(
1839
+ "Harness is uninstalled, and everything it kept on this computer is deleted."
1840
+ );
1841
+ return;
1842
+ }
1843
+ const shown = paths.home.replace(os.homedir(), "~");
1752
1844
  console.log(
1753
- "Harness disconnected. The local history database was preserved."
1845
+ `Harness is uninstalled: the app, its background service and its setup in your agents are gone.\n` +
1846
+ `Your board, history and keys are kept in ${shown} (${megabytes(folderBytes(paths.home))}), so setting Harness up again picks up where you left off.\n` +
1847
+ `To delete them too: npx tryharness uninstall --everything`
1754
1848
  );
1755
1849
  }
1756
1850
 
@@ -1946,25 +2040,6 @@ async function agents() {
1946
2040
  );
1947
2041
  return;
1948
2042
  }
1949
- // The person's tier for one agent, over its model's benchmark tier: who may hold the team's important roles.
1950
- if (sub === "tier") {
1951
- const tier = argv[2];
1952
- if (!agent || !tier)
1953
- throw new Error(
1954
- "usage: tryharness agents tier <agent> top|middle|bottom|auto"
1955
- );
1956
- const response = await daemonRequest({
1957
- command: "board.swarm.tier",
1958
- agent: "user",
1959
- target: agent,
1960
- tier,
1961
- });
1962
- if (!response.ok) throw new Error(response.error);
1963
- console.log(
1964
- `${response.agent} is ${response.tier?.level ?? "unknown"} tier: ${response.tier?.because ?? ""}`
1965
- );
1966
- return;
1967
- }
1968
2043
  if (sub === "note") {
1969
2044
  const text = argv
1970
2045
  .slice(2)
@@ -2275,7 +2350,7 @@ async function t3() {
2275
2350
 
2276
2351
  function help() {
2277
2352
  console.log(
2278
- `tryharness ${VERSION}\n\nCommands:\n tryharness set up everything and start the daemon\n tryharness desktop open the Harness desktop app (setup opens it too; --no-desktop skips it)\n tryharness status show daemon, bridge, agent, and index health\n tryharness doctor diagnose the complete connection\n tryharness local [learn] the relay's local models, where they run, what is indexed and the last learning\n tryharness local on|off search over your Desktop, Documents and Downloads by what is in the files (on by default)\n tryharness local add|remove <folder> another folder to search the same way\n tryharness watch [add <name> --run <command> [--every 5m] [--field f | --age f | --count text] [--above n] [--below n] | start <id> | remove <id>]\n watches the relay checks and says out loud only when they are off\n tryharness sync [--agent] rescan local coding history in the background\n tryharness task <id> --follow\n follow a delegated agent run in this terminal\n tryharness board [--all] list open work on the machine's task board\n tryharness board post --for <agent> --objective <text> [--file <brief.md>]\n tryharness board show <id>\n tryharness board post --for codex --objective <text> --run --workspace <dir>\n the daemon runs it and reports back on the task\n tryharness board run <id> authorize a run an agent asked for\n tryharness board release <id>\n tryharness board agents when each agent last read the board\n tryharness board --watch follow the board in this terminal\n tryharness notify on|off desktop notifications for what waits on you\n tryharness usage-totals on|off daily counts of your swarm's work, without your account or any text (on by default)\n tryharness board send <task> <message> send a held reply to another person's agent\n tryharness board snippet [<id> share|keep] code an agent elsewhere asked to see; nothing leaves until you share it\n tryharness board auto <task> on|off auto-send replies on that thread\n tryharness board end <task> --outcome <text>\n tryharness board context <task> <query> search everything written about a task\n tryharness goal set --objective <text> [--team a,b] [--workspace <dir>] a goal your agents work together in one room\n tryharness goal [list | show <id> | stop <id> | resume <id>]\n tryharness room <goal> | room post <goal> <text> [--ask agent,agent]\n tryharness swarm rounds [<thread>] what the coordinator saw, chose and cost each round\n tryharness swarm health [<thread>] who decided each day's rounds: Harness, a backup, or no one\n tryharness swarm ceiling <thread> <dollars|off> what a thread may spend of your Harness credits\n tryharness swarm checkin <thread> "<what>" (--in 2h | --at 14:30 | --every 30m | --daily 09:00 [--days mon-fri]) [--wake codex] [--times n] [--until <date>]\n the thread comes back on its own then, waking those agents or its lead\n tryharness swarm checkins [<thread>] [--all] | swarm checkin remove <id>\n tryharness swarm coordinator [harness|local] who coordinates your threads\n tryharness connect <handle/agent> --about <text> ask another person's agent to work an issue with yours, sealed to their computer\n tryharness peers the keys of other people's computers this one has worked with, to compare\n tryharness machines your computers: which holds the board (home) and which work through it; machines add <code> | name <name> | home\n tryharness agents who is in your swarm, and who can be added\n tryharness agents add [<agent>…] put agents in your swarm; with no name, pick from the ones found here\n tryharness agents remove <agent> take an agent out of your swarm\n tryharness agents setup [<agent>] | agents test <agent> how Harness wakes each agent\n tryharness agents cards what each of your agents is told about the others\n tryharness agents note <agent> <text> [--clear] your own note on an agent's card, told to every other agent\n tryharness agents tier <agent> top|middle|bottom|auto who may hold the team's important roles; auto goes by its model's benchmark\n tryharness lessons [--replaced | --retired] | lessons remove <id> | lessons edit <id> "<text>"\n what your swarm learned from your words, to read, change or take out\n tryharness memory [dream | forget <id> | delete <post id> | back <id>]\n what your swarm keeps from its work, overnight; forget, delete or bring back\n tryharness agents models [<agent>] [--refresh] the models each coding agent lists and the one it runs on\n tryharness agents model <agent> <model> [--effort <level>] | auto | default the model it runs on; auto lets Harness pick per run\n tryharness agents routing "<text>" [--clear] how Auto picks models for your swarm\n tryharness connections on|off outside apps (Gmail, Calendar, Slack, Notion, Linear) for your agents; off by default\n tryharness connections connect apps, choose agent access and review approvals (connections catalog for providers)\n tryharness vault your secrets, kept on this computer: agents use them without seeing them (vault add <name> --hosts <host> | allow <agent> <name> | runs <agent> <name> <VARIABLE> | backup <email> | share <name>)\n tryharness mcp grok-bot print the MCP snippet that puts Grok Bot on the board\n tryharness link connect the browser you use Harness in to this computer, end to end (--print shows the link)\n tryharness phone pair show a QR code that pairs your phone with this computer\n tryharness phone list | revoke <id>\n tryharness t3 approve Harness in T3 Code once, so your messages go into its threads (t3 status | t3 forget)\n tryharness logs [--follow]\n tryharness disconnect\n`
2353
+ `tryharness ${VERSION}\n\nCommands:\n tryharness set up everything and start the daemon\n tryharness desktop open the Harness desktop app (setup opens it too; --no-desktop skips it)\n tryharness status show daemon, bridge, agent, and index health\n tryharness doctor diagnose the complete connection\n tryharness local [learn] the relay's local models, where they run, what is indexed and the last learning\n tryharness local on|off search over your Desktop, Documents and Downloads by what is in the files (on by default)\n tryharness local add|remove <folder> another folder to search the same way\n tryharness watch [add <name> --run <command> [--every 5m] [--field f | --age f | --count text] [--above n] [--below n] | start <id> | remove <id>]\n watches the relay checks and says out loud only when they are off\n tryharness sync [--agent] rescan local coding history in the background\n tryharness task <id> --follow\n follow a delegated agent run in this terminal\n tryharness board [--all] list open work on the machine's task board\n tryharness board post --for <agent> --objective <text> [--file <brief.md>]\n tryharness board show <id>\n tryharness board post --for codex --objective <text> --run --workspace <dir>\n the daemon runs it and reports back on the task\n tryharness board run <id> authorize a run an agent asked for\n tryharness board release <id>\n tryharness board agents when each agent last read the board\n tryharness board --watch follow the board in this terminal\n tryharness notify on|off desktop notifications for what waits on you\n tryharness usage-totals on|off daily counts of your swarm's work, without your account or any text (on by default)\n tryharness board send <task> <message> send a held reply to another person's agent\n tryharness board snippet [<id> share|keep] code an agent elsewhere asked to see; nothing leaves until you share it\n tryharness board auto <task> on|off auto-send replies on that thread\n tryharness board end <task> --outcome <text>\n tryharness board context <task> <query> search everything written about a task\n tryharness goal set --objective <text> [--team a,b] [--workspace <dir>] a goal your agents work together in one room\n tryharness goal [list | show <id> | stop <id> | resume <id>]\n tryharness room <goal> | room post <goal> <text> [--ask agent,agent]\n tryharness swarm rounds [<thread>] what the coordinator saw, chose and cost each round\n tryharness swarm health [<thread>] who decided each day's rounds: Harness, a backup, or no one\n tryharness swarm ceiling <thread> <dollars|off> what a thread may spend of your Harness credits\n tryharness swarm checkin <thread> "<what>" (--in 2h | --at 14:30 | --every 30m | --daily 09:00 [--days mon-fri]) [--wake codex] [--times n] [--until <date>]\n the thread comes back on its own then, waking those agents or its lead\n tryharness swarm checkins [<thread>] [--all] | swarm checkin remove <id>\n tryharness swarm coordinator [harness|local] who coordinates your threads\n tryharness connect <handle/agent> --about <text> ask another person's agent to work an issue with yours, sealed to their computer\n tryharness peers the keys of other people's computers this one has worked with, to compare\n tryharness machines your computers: which holds the board (home) and which work through it; machines add <code> | name <name> | home\n tryharness backup [on | now | restore | off] an encrypted backup of your board, for Residents; only your passphrase opens it\n tryharness agents who is in your swarm, and who can be added\n tryharness agents add [<agent>…] put agents in your swarm; with no name, pick from the ones found here\n tryharness agents remove <agent> take an agent out of your swarm\n tryharness agents setup [<agent>] | agents test <agent> how Harness wakes each agent\n tryharness agents cards what each of your agents is told about the others\n tryharness agents note <agent> <text> [--clear] your own note on an agent's card, told to every other agent\n tryharness lessons [--replaced | --retired] | lessons remove <id> | lessons edit <id> "<text>"\n what your swarm learned from your words, to read, change or take out\n tryharness memory [dream | forget <id> | delete <post id> | back <id>]\n what your swarm keeps from its work, overnight; forget, delete or bring back\n tryharness agents models [<agent>] [--refresh] the models each coding agent lists and the one it runs on\n tryharness agents model <agent> <model> [--effort <level>] | auto | default the model it runs on; auto lets Harness pick per run\n tryharness agents routing "<text>" [--clear] how Auto picks models for your swarm\n tryharness connections on|off outside apps (Gmail, Calendar, Slack, Notion, Linear) for your agents; off by default\n tryharness connections connect apps, choose agent access and review approvals (connections catalog for providers)\n tryharness vault your secrets, kept on this computer: agents use them without seeing them (vault add <name> --hosts <host> | allow <agent> <name> | runs <agent> <name> <VARIABLE> | backup <email> | share <name>)\n tryharness mcp grok-bot print the MCP snippet that puts Grok Bot on the board\n tryharness link connect the browser you use Harness in to this computer, end to end (--print shows the link)\n tryharness phone pair show a QR code that pairs your phone with this computer\n tryharness phone list | revoke <id>\n tryharness t3 approve Harness in T3 Code once, so your messages go into its threads (t3 status | t3 forget)\n tryharness logs [--follow]\n tryharness uninstall [--everything] take Harness off this computer; --everything also deletes your board and history\n`
2279
2354
  );
2280
2355
  }
2281
2356
 
@@ -2336,17 +2411,21 @@ try {
2336
2411
  else if (command === "t3") await t3();
2337
2412
  else if (command === "peers") await peers();
2338
2413
  else if (command === "machines") await machines();
2414
+ else if (command === "backup")
2415
+ await backupCommand({ argv, ui: createUi(), daemonRequest });
2339
2416
  else if (command === "connect") await connectAgent();
2340
2417
  else if (command === "desktop") {
2341
2418
  const shown = await desktop();
2342
2419
  console.log(shown.text);
2343
2420
  if (!shown.ok) process.exitCode = 1;
2344
2421
  } else if (command === "logs") logs();
2345
- else if (command === "disconnect") await disconnect();
2422
+ else if (command === "uninstall") await uninstall();
2346
2423
  else if (command === "daemon") {
2347
2424
  const { startDaemon } = await import("./lib/daemon.mjs");
2348
2425
  await startDaemon();
2349
- } else if (command === "version") console.log(VERSION);
2426
+ } else if (command === "cloud-enroll") await cloudEnroll();
2427
+ else if (command === "cloud-start") await cloudStart();
2428
+ else if (command === "version") console.log(VERSION);
2350
2429
  else if (["help", "--help", "-h"].includes(command)) help();
2351
2430
  else throw new Error(`unknown command '${command}' (run: tryharness help)`);
2352
2431
  } catch (error) {