tryharness 0.7.81 → 0.7.83
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 +4 -3
- package/assets/install.sh +104 -0
- package/cli.mjs +203 -321
- package/lib/adapters.mjs +7 -6
- package/lib/agentRuntimes.mjs +2 -1
- package/lib/backupSetup.mjs +0 -52
- package/lib/boardProtocol.json +19 -1
- package/lib/browserPage.mjs +30 -0
- package/lib/cards.mjs +5 -2
- package/lib/daemon.mjs +103 -5
- package/lib/desktop.mjs +7 -1
- package/lib/dispatcher.mjs +12 -2
- package/lib/environments.mjs +4 -11
- package/lib/goalCommands.mjs +2 -1
- package/lib/hookDialects.mjs +2 -1
- package/lib/jobAnswers.mjs +2 -1
- package/lib/localStack.mjs +24 -9
- package/lib/mcp-stdio.mjs +6 -0
- package/lib/members.json +1 -1
- package/lib/museSession.mjs +2 -1
- package/lib/nativeHost.mjs +11 -2
- package/lib/network.mjs +1 -0
- package/lib/notify.mjs +48 -16
- package/lib/onboard.mjs +71 -366
- package/lib/ownMachines.mjs +4 -1
- package/lib/pairing.mjs +0 -84
- package/lib/paths.mjs +17 -0
- package/lib/personNotices.mjs +9 -25
- package/lib/profile.mjs +0 -109
- package/lib/projects.mjs +18 -4
- package/lib/removeHarness.mjs +91 -0
- package/lib/roomChannels.mjs +2 -0
- package/lib/runner.mjs +3 -3
- package/lib/runtime-install.mjs +22 -2
- package/lib/screen.mjs +133 -0
- package/lib/selfUpdate.mjs +6 -6
- package/lib/service.mjs +120 -7
- package/lib/sessionControl.mjs +10 -0
- package/lib/setupChoices.mjs +400 -0
- package/lib/setupMode.mjs +137 -0
- package/lib/t3.mjs +23 -14
- package/lib/threadActions.mjs +2 -1
- package/lib/toolCheck.mjs +136 -0
- package/lib/ui.mjs +15 -1
- package/lib/wakes.mjs +3 -3
- package/npm-shrinkwrap.json +14 -14
- package/package.json +4 -4
- package/release.json +49 -42
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import { listenControl } from "./controlSocket.mjs";
|
|
4
|
+
import { readJson, writeJsonAtomic } from "./files.mjs";
|
|
5
|
+
import {
|
|
6
|
+
keepJoinCode,
|
|
7
|
+
setupPageUrl,
|
|
8
|
+
startPairing,
|
|
9
|
+
waitForApproval,
|
|
10
|
+
} from "./pairing.mjs";
|
|
11
|
+
import { writeBrowserOffer } from "./phones.mjs";
|
|
12
|
+
import { stopSetupHere } from "./removeHarness.mjs";
|
|
13
|
+
|
|
14
|
+
// Before this computer is signed in, Harness runs here anyway, so the buddy can show setup and the installer can
|
|
15
|
+
// print the code. One pairing is held open at a time and it can be approved two ways: signing in on the page the
|
|
16
|
+
// buddy opens, or typing its code into Add a Computer on a computer already signed in. Whichever happens first
|
|
17
|
+
// signs this computer in; nothing waits on a timer. A pairing that runs out is replaced by a fresh one.
|
|
18
|
+
|
|
19
|
+
// After a pairing fails for a reason other than running out (no network, Harness down), the next try waits this long,
|
|
20
|
+
// doubling up to the cap, so a computer offline overnight does not ask Harness every second.
|
|
21
|
+
const RETRY_FIRST_MS = 2_000;
|
|
22
|
+
const RETRY_MAX_MS = 60_000;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Hold this computer's sign-in open until the person approves it, answering on the control socket meanwhile:
|
|
26
|
+
* `status` (so the buddy knows setup is showing), `setup.state` (the code and a link to sign in elsewhere) and
|
|
27
|
+
* `setup.signin` (a link that also links the browser it opens in), and `setup.cancel` (the person stopped setup:
|
|
28
|
+
* Harness comes off this computer and this daemon ends). Resolves once signed in, with the socket closed so
|
|
29
|
+
* the daemon proper can take it. `agents` are the coding agents found here, which the pairing names.
|
|
30
|
+
*/
|
|
31
|
+
export async function untilSignedIn({ paths, origin, agents = [], log }) {
|
|
32
|
+
const say = (line) => log?.(line);
|
|
33
|
+
const state = {
|
|
34
|
+
code: null,
|
|
35
|
+
own: false,
|
|
36
|
+
pairId: null,
|
|
37
|
+
error: null,
|
|
38
|
+
startedAt: null,
|
|
39
|
+
};
|
|
40
|
+
let signedIn;
|
|
41
|
+
const done = new Promise((resolve) => (signedIn = resolve));
|
|
42
|
+
|
|
43
|
+
const linkFor = async ({ withBrowser }) => {
|
|
44
|
+
if (!state.code) return null;
|
|
45
|
+
const browser = withBrowser
|
|
46
|
+
? await writeBrowserOffer({
|
|
47
|
+
identityFile: paths.phoneIdentity,
|
|
48
|
+
offerFile: paths.browserOffer,
|
|
49
|
+
}).catch(() => null)
|
|
50
|
+
: null;
|
|
51
|
+
return setupPageUrl(origin, { code: state.code, own: state.own }, browser);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const answer = async (request) => {
|
|
55
|
+
if (request.command === "status")
|
|
56
|
+
return { ok: true, setup: true, connected: false, signedIn: false };
|
|
57
|
+
if (request.command === "setup.state")
|
|
58
|
+
return {
|
|
59
|
+
ok: true,
|
|
60
|
+
phase: "signin",
|
|
61
|
+
code: state.own ? state.code : null,
|
|
62
|
+
url: await linkFor({ withBrowser: false }),
|
|
63
|
+
computer: os.hostname().replace(/\.local$/, ""),
|
|
64
|
+
error: state.error,
|
|
65
|
+
};
|
|
66
|
+
if (request.command === "setup.signin") {
|
|
67
|
+
const url = await linkFor({ withBrowser: true });
|
|
68
|
+
return url
|
|
69
|
+
? { ok: true, url }
|
|
70
|
+
: { ok: false, error: state.error || "Harness is not reachable yet." };
|
|
71
|
+
}
|
|
72
|
+
if (request.command === "setup.cancel") {
|
|
73
|
+
// Answered first: taking the app and the service off this computer ends this process.
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
say("setup: stopped by the person; taking Harness off this computer");
|
|
76
|
+
stopSetupHere({ paths });
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}, 200);
|
|
79
|
+
return { ok: true };
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
ok: false,
|
|
83
|
+
code: "not_signed_in",
|
|
84
|
+
error: "Harness on this computer is not signed in yet.",
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
if (fs.existsSync(paths.socket)) fs.unlinkSync(paths.socket);
|
|
89
|
+
const server = await listenControl({ socketPath: paths.socket, answer });
|
|
90
|
+
|
|
91
|
+
const hold = async () => {
|
|
92
|
+
let wait = RETRY_FIRST_MS;
|
|
93
|
+
for (;;) {
|
|
94
|
+
try {
|
|
95
|
+
const pairing = await startPairing(origin, agents);
|
|
96
|
+
Object.assign(state, pairing, { error: null, startedAt: Date.now() });
|
|
97
|
+
if (pairing.own) keepJoinCode(paths.machine, pairing.code);
|
|
98
|
+
say(`setup: holding a sign-in for this computer (${pairing.pairId})`);
|
|
99
|
+
wait = RETRY_FIRST_MS;
|
|
100
|
+
const token = await waitForApproval(origin, pairing.pairId);
|
|
101
|
+
return token;
|
|
102
|
+
} catch (error) {
|
|
103
|
+
// A pairing that ran out is replaced at once; anything else waits before asking Harness again.
|
|
104
|
+
const expired = /expired|ended without approval/i.test(error.message);
|
|
105
|
+
state.error = expired ? null : error.message;
|
|
106
|
+
if (expired) continue;
|
|
107
|
+
say(`setup: sign-in not held (${error.message}); trying again`);
|
|
108
|
+
await new Promise((resolve) => setTimeout(resolve, wait));
|
|
109
|
+
wait = Math.min(wait * 2, RETRY_MAX_MS);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
hold().then((token) => {
|
|
115
|
+
// Signed in through setup: the app's screens come next, until the person presses Start there. None of the folders
|
|
116
|
+
// macOS guards is searched until the person picks it there: a config without the choice means all three, which is
|
|
117
|
+
// what installs from before setup chose (localStack.mjs), so a new one starts with the choice made, empty.
|
|
118
|
+
const before = readJson(paths.config, {});
|
|
119
|
+
writeJsonAtomic(paths.config, {
|
|
120
|
+
...before,
|
|
121
|
+
origin,
|
|
122
|
+
token,
|
|
123
|
+
setupDone: false,
|
|
124
|
+
searchFolders: Array.isArray(before.searchFolders)
|
|
125
|
+
? before.searchFolders
|
|
126
|
+
: [],
|
|
127
|
+
});
|
|
128
|
+
say("setup: signed in");
|
|
129
|
+
signedIn();
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
await done;
|
|
133
|
+
// The file goes first, so a caller arriving now fails at once and tries again with the daemon proper, instead of
|
|
134
|
+
// waiting on a socket that is closing.
|
|
135
|
+
if (fs.existsSync(paths.socket)) fs.unlinkSync(paths.socket);
|
|
136
|
+
await new Promise((resolve) => server.close(resolve));
|
|
137
|
+
}
|
package/lib/t3.mjs
CHANGED
|
@@ -429,24 +429,33 @@ function laterTurn(recent, runId, activeRunId) {
|
|
|
429
429
|
return ordinal(activeRunId) > ordinal(runId) ? activeRunId : null;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
// T3 keeps a tool's call and answer as JSON in an item's text, with the tool's name first.
|
|
433
|
+
const TOOL_NAME = /"toolName":\s*"([^"]+)"/;
|
|
434
|
+
|
|
435
|
+
/** What an item did, in a line. Its text can be a tool's raw JSON, which is T3's record and not for the person to read. */
|
|
436
|
+
function didLine(item, text) {
|
|
437
|
+
if (item.type === "command_execution") {
|
|
438
|
+
const command = text.split("\n")[0].replace(/^\$\s*/, "");
|
|
439
|
+
return `ran: ${item.title === "Workspace ready" ? item.title : command}`;
|
|
440
|
+
}
|
|
441
|
+
if (item.type === "web_search") return "searched the web";
|
|
442
|
+
if (item.title) return item.title;
|
|
443
|
+
if (item.type === "dynamic_tool")
|
|
444
|
+
return TOOL_NAME.exec(text)?.[1] ?? "used a tool";
|
|
445
|
+
// A file change is its path, then the change as JSON.
|
|
446
|
+
if (item.type === "file_change") return `edited: ${text.split(" {")[0]}`;
|
|
447
|
+
const raw = /^[[{]/.test(text);
|
|
448
|
+
return (!raw && text.split("\n")[0]) || String(item.type).replace(/_/g, " ");
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/** One item of a T3 thread as a step on the board: its words, or what it did in a line; null for T3's own bookkeeping. */
|
|
452
|
+
export function t3Step(item) {
|
|
434
453
|
const text = String(item.text || "").trim();
|
|
435
454
|
if (item.type === "assistant_message")
|
|
436
455
|
return text ? { kind: "say", text } : null;
|
|
437
|
-
if (item.type === "command_execution")
|
|
438
|
-
return {
|
|
439
|
-
kind: "do",
|
|
440
|
-
text: `ran: ${(item.title === "Workspace ready" ? item.title : text.split("\n")[0].replace(/^\$\s*/, "")).slice(0, 200)}`,
|
|
441
|
-
};
|
|
442
|
-
if (item.type === "web_search")
|
|
443
|
-
return { kind: "do", text: "searched the web" };
|
|
444
456
|
if (["user_message", "reasoning", "checkpoint"].includes(item.type))
|
|
445
457
|
return null;
|
|
446
|
-
return {
|
|
447
|
-
kind: "do",
|
|
448
|
-
text: `${item.title || String(item.type).replace(/_/g, " ")}`.slice(0, 200),
|
|
449
|
-
};
|
|
458
|
+
return { kind: "do", text: didLine(item, text).slice(0, 200) };
|
|
450
459
|
}
|
|
451
460
|
|
|
452
461
|
// The option T3 gives each agent's effort under, by agent.
|
|
@@ -586,7 +595,7 @@ export function runInT3(run, emit, observe) {
|
|
|
586
595
|
!seen.has(item.itemId)
|
|
587
596
|
) {
|
|
588
597
|
seen.add(item.itemId);
|
|
589
|
-
const step =
|
|
598
|
+
const step = t3Step(item);
|
|
590
599
|
if (step) {
|
|
591
600
|
if (step.kind === "say") last = step.text;
|
|
592
601
|
observe(
|
package/lib/threadActions.mjs
CHANGED
|
@@ -361,7 +361,8 @@ export function createThreadActions({
|
|
|
361
361
|
}
|
|
362
362
|
if (finding.kind === "lease")
|
|
363
363
|
notices.notify(
|
|
364
|
-
`${nameOf(finding.agent)} stopped checking in again on: ${String(task.objective).slice(0, 80)}. Release it from the buddy or your phone, or give it to another agent
|
|
364
|
+
`${nameOf(finding.agent)} stopped checking in again on: ${String(task.objective).slice(0, 80)}. Release it from the buddy or your phone, or give it to another agent.`,
|
|
365
|
+
{ thread: thread?.id }
|
|
365
366
|
);
|
|
366
367
|
if (thread) say(thread, finding.text);
|
|
367
368
|
// Work posted on its own lives in a room of its own (task-room): it is still loose work, told to its poster too.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { spawn } from "node:child_process";
|
|
3
|
+
import { ensureDir } from "./files.mjs";
|
|
4
|
+
import { paths } from "./paths.mjs";
|
|
5
|
+
import { nameOf } from "./members.mjs";
|
|
6
|
+
|
|
7
|
+
// Whether Harness's tools actually load inside an agent, not only whether the agent answers. An agent can be signed in
|
|
8
|
+
// and still never start Harness's MCP server (a guest's agent stuck "connecting" sent everyone to /mcp to paste
|
|
9
|
+
// things). This runs the agent headless with its MCP servers and passes once this computer's daemon hears that agent
|
|
10
|
+
// load Harness's tools (its server's tools/list) or call list_agents, which the prompt asks for. The load is what
|
|
11
|
+
// counts: a small local model (Pi on Flint) sometimes answered "ready" without calling anything.
|
|
12
|
+
|
|
13
|
+
const PROMPT =
|
|
14
|
+
"Call the harness tool list_agents once. Then reply with exactly one word: ready";
|
|
15
|
+
|
|
16
|
+
// Each agent's headless run with its own MCP servers loaded (unlike readiness.mjs, which leaves them out), allowed only
|
|
17
|
+
// Harness's list_agents, saving no session where the agent allows it, and running none of the person's hooks.
|
|
18
|
+
const RUNS = {
|
|
19
|
+
"claude-code": () => ({
|
|
20
|
+
command: "claude",
|
|
21
|
+
args: [
|
|
22
|
+
"-p",
|
|
23
|
+
PROMPT,
|
|
24
|
+
"--output-format",
|
|
25
|
+
"json",
|
|
26
|
+
"--no-session-persistence",
|
|
27
|
+
"--allowedTools",
|
|
28
|
+
"mcp__harness__list_agents",
|
|
29
|
+
"--settings",
|
|
30
|
+
'{"disableAllHooks":true}',
|
|
31
|
+
],
|
|
32
|
+
}),
|
|
33
|
+
codex: () => ({
|
|
34
|
+
command: "codex",
|
|
35
|
+
args: [
|
|
36
|
+
"exec",
|
|
37
|
+
"--ephemeral",
|
|
38
|
+
"--skip-git-repo-check",
|
|
39
|
+
"-c",
|
|
40
|
+
'sandbox_mode="read-only"',
|
|
41
|
+
"-c",
|
|
42
|
+
'approval_policy="never"',
|
|
43
|
+
// With approvals off, Codex refuses every MCP call unless that tool is approved (Codex 0.166).
|
|
44
|
+
"-c",
|
|
45
|
+
'mcp_servers.harness.tools.list_agents.approval_mode="approve"',
|
|
46
|
+
"-",
|
|
47
|
+
],
|
|
48
|
+
stdin: PROMPT,
|
|
49
|
+
}),
|
|
50
|
+
pi: () => ({ command: "pi", args: ["--no-session", "-p", PROMPT] }),
|
|
51
|
+
opencode: () => ({
|
|
52
|
+
command: "opencode",
|
|
53
|
+
args: ["run", "--title", "Harness check", "--", PROMPT],
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const TOOL_CHECKABLE = Object.keys(RUNS);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Measured November 3 on MacBook-Pro-3, the whole run with this prompt (spawn to exit; Harness hears the call before
|
|
61
|
+
* the reply): Claude Code 9.1, 7.2, 6.3 s; Codex 10.4, 18.0, 7.4 s (after allowing list_agents), every run calling
|
|
62
|
+
* Harness. 60 s is 3.3x the slowest of the six, and the same as readiness.mjs's check. Three runs per agent, warm, on
|
|
63
|
+
* one computer: a first start on a slow computer may need more, and Pi and OpenCode were not measured.
|
|
64
|
+
*/
|
|
65
|
+
export const TOOL_CHECK_DEADLINE_MS = 60_000;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Run `agent` with the check prompt and say whether Harness heard its list_agents call: "loaded", "not_loaded"
|
|
69
|
+
* (it ran but never called Harness), "slow" (no call within `deadlineMs`), "not_installed" or "failed".
|
|
70
|
+
* `heardSince(agent, at)` is the daemon's word that a call came from that agent after `at`.
|
|
71
|
+
*/
|
|
72
|
+
export function checkTools(
|
|
73
|
+
agent,
|
|
74
|
+
{ heardSince, deadlineMs, cwd = path.join(paths.home, "checks"), run = spawn }
|
|
75
|
+
) {
|
|
76
|
+
const invocation = RUNS[agent]?.();
|
|
77
|
+
if (!invocation)
|
|
78
|
+
return Promise.resolve({
|
|
79
|
+
state: "unchecked",
|
|
80
|
+
detail: `Harness cannot check ${nameOf(agent)}'s tools by itself`,
|
|
81
|
+
ms: 0,
|
|
82
|
+
});
|
|
83
|
+
ensureDir(cwd);
|
|
84
|
+
const started = Date.now();
|
|
85
|
+
return new Promise((resolve) => {
|
|
86
|
+
let output = "";
|
|
87
|
+
let settled = false;
|
|
88
|
+
const finish = (state, detail = null) => {
|
|
89
|
+
if (settled) return;
|
|
90
|
+
settled = true;
|
|
91
|
+
clearTimeout(timer);
|
|
92
|
+
clearInterval(listening);
|
|
93
|
+
resolve({ state, detail, ms: Date.now() - started });
|
|
94
|
+
};
|
|
95
|
+
const child = run(invocation.command, invocation.args, {
|
|
96
|
+
cwd,
|
|
97
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
98
|
+
});
|
|
99
|
+
// The call is what counts: once heard, the run need not finish its reply.
|
|
100
|
+
const listening = setInterval(() => {
|
|
101
|
+
if (heardSince(agent, started)) {
|
|
102
|
+
child.kill("SIGTERM");
|
|
103
|
+
finish("loaded");
|
|
104
|
+
}
|
|
105
|
+
}, 250);
|
|
106
|
+
const timer = setTimeout(() => {
|
|
107
|
+
child.kill("SIGKILL");
|
|
108
|
+
finish(
|
|
109
|
+
"slow",
|
|
110
|
+
`did not reach Harness within ${Math.round(deadlineMs / 1000)} seconds`
|
|
111
|
+
);
|
|
112
|
+
}, deadlineMs);
|
|
113
|
+
child.stdout?.on("data", (chunk) => (output += chunk));
|
|
114
|
+
child.stderr?.on("data", (chunk) => (output += chunk));
|
|
115
|
+
child.stdin?.on("error", () => {});
|
|
116
|
+
child.stdin?.end(invocation.stdin ?? "");
|
|
117
|
+
child.on("error", (error) =>
|
|
118
|
+
finish(
|
|
119
|
+
error.code === "ENOENT" ? "not_installed" : "failed",
|
|
120
|
+
error.message
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
child.on("close", () => {
|
|
124
|
+
if (heardSince(agent, started)) return finish("loaded");
|
|
125
|
+
finish("not_loaded", lastLine(output));
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const lastLine = (text) =>
|
|
131
|
+
String(text)
|
|
132
|
+
.split("\n")
|
|
133
|
+
.map((line) => line.trim())
|
|
134
|
+
.filter(Boolean)
|
|
135
|
+
.at(-1)
|
|
136
|
+
?.slice(0, 200) ?? null;
|
package/lib/ui.mjs
CHANGED
|
@@ -18,6 +18,17 @@ const BAR = glyph("│", "|"),
|
|
|
18
18
|
STOP = glyph("■", "x"),
|
|
19
19
|
WARN = glyph("▲", "!");
|
|
20
20
|
|
|
21
|
+
// The spinner turning now, so a Ctrl-C handler can end it with its own words: left turning, clack ends it at exit
|
|
22
|
+
// with "Something went wrong".
|
|
23
|
+
let running = null;
|
|
24
|
+
|
|
25
|
+
/** End the spinner turning now with `text`; false when none is. */
|
|
26
|
+
export function stopSpinner(text, code = 0) {
|
|
27
|
+
if (!running) return false;
|
|
28
|
+
running.stop(text, code);
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
21
32
|
const visible = (text) => text.replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
22
33
|
|
|
23
34
|
/** Lines of text wrapped to a width, each keeping its own indent. */
|
|
@@ -107,17 +118,20 @@ export function createUi({
|
|
|
107
118
|
};
|
|
108
119
|
const spin = p.spinner(),
|
|
109
120
|
quit = () => process.exit(130);
|
|
110
|
-
|
|
121
|
+
const handle = {
|
|
111
122
|
start: (text) => {
|
|
112
123
|
spin.start(text);
|
|
124
|
+
running = handle;
|
|
113
125
|
process.once("SIGINT", quit);
|
|
114
126
|
},
|
|
115
127
|
message: (text) => spin.message(text),
|
|
116
128
|
stop: (text, code) => {
|
|
117
129
|
process.removeListener("SIGINT", quit);
|
|
130
|
+
if (running === handle) running = null;
|
|
118
131
|
spin.stop(text, code);
|
|
119
132
|
},
|
|
120
133
|
};
|
|
134
|
+
return handle;
|
|
121
135
|
},
|
|
122
136
|
waitOrType,
|
|
123
137
|
};
|
package/lib/wakes.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
|
5
5
|
import { askerOf } from "./answers.mjs";
|
|
6
6
|
import { resolveCommand, run } from "./commands.mjs";
|
|
7
7
|
import { ensureDir, readJson, writeJsonAtomic } from "./files.mjs";
|
|
8
|
-
import { paths } from "./paths.mjs";
|
|
8
|
+
import { harnessNode, paths } from "./paths.mjs";
|
|
9
9
|
|
|
10
10
|
// Agent apps that run on this computer but are not started by Harness (OpenClaw, Hermes). Setup adds Harness to each
|
|
11
11
|
// one's MCP servers and turns on its own local webhook with a secret made here; the daemon then wakes it when work is
|
|
@@ -61,7 +61,7 @@ const tail = (result) =>
|
|
|
61
61
|
export function setupOpenClaw({
|
|
62
62
|
runtimeRoot,
|
|
63
63
|
homeDir = os.homedir(),
|
|
64
|
-
nodePath =
|
|
64
|
+
nodePath = harnessNode(),
|
|
65
65
|
execute = run,
|
|
66
66
|
command = resolveCommand("openclaw"),
|
|
67
67
|
}) {
|
|
@@ -139,7 +139,7 @@ export function setupOpenClaw({
|
|
|
139
139
|
export function setupHermes({
|
|
140
140
|
runtimeRoot,
|
|
141
141
|
homeDir = os.homedir(),
|
|
142
|
-
nodePath =
|
|
142
|
+
nodePath = harnessNode(),
|
|
143
143
|
execute = run,
|
|
144
144
|
command = resolveCommand("hermes"),
|
|
145
145
|
}) {
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tryharness",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.82",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "tryharness",
|
|
9
|
-
"version": "0.7.
|
|
9
|
+
"version": "0.7.82",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@agentclientprotocol/sdk": "2.0.0",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"node": ">=18"
|
|
33
33
|
},
|
|
34
34
|
"optionalDependencies": {
|
|
35
|
-
"tryharness-desktop-darwin-arm64": "0.7.
|
|
36
|
-
"tryharness-desktop-darwin-x64": "0.7.
|
|
37
|
-
"tryharness-desktop-linux-x64": "0.7.
|
|
35
|
+
"tryharness-desktop-darwin-arm64": "0.7.83",
|
|
36
|
+
"tryharness-desktop-darwin-x64": "0.7.83",
|
|
37
|
+
"tryharness-desktop-linux-x64": "0.7.83"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"node_modules/@agentclientprotocol/sdk": {
|
|
@@ -1051,9 +1051,9 @@
|
|
|
1051
1051
|
}
|
|
1052
1052
|
},
|
|
1053
1053
|
"node_modules/tryharness-desktop-darwin-arm64": {
|
|
1054
|
-
"version": "0.7.
|
|
1055
|
-
"resolved": "https://registry.npmjs.org/tryharness-desktop-darwin-arm64/-/tryharness-desktop-darwin-arm64-0.7.
|
|
1056
|
-
"integrity": "sha512-
|
|
1054
|
+
"version": "0.7.83",
|
|
1055
|
+
"resolved": "https://registry.npmjs.org/tryharness-desktop-darwin-arm64/-/tryharness-desktop-darwin-arm64-0.7.83.tgz",
|
|
1056
|
+
"integrity": "sha512-ko0CGgTX6UAnhMHp2rwjwK0tFdbXli4gfFkURP27ZlQqbNR0ax9b4JKqfPSbL9SqhISlkjMqGGdBcrqOUGJ71g==",
|
|
1057
1057
|
"cpu": [
|
|
1058
1058
|
"arm64"
|
|
1059
1059
|
],
|
|
@@ -1064,9 +1064,9 @@
|
|
|
1064
1064
|
]
|
|
1065
1065
|
},
|
|
1066
1066
|
"node_modules/tryharness-desktop-darwin-x64": {
|
|
1067
|
-
"version": "0.7.
|
|
1068
|
-
"resolved": "https://registry.npmjs.org/tryharness-desktop-darwin-x64/-/tryharness-desktop-darwin-x64-0.7.
|
|
1069
|
-
"integrity": "sha512-
|
|
1067
|
+
"version": "0.7.83",
|
|
1068
|
+
"resolved": "https://registry.npmjs.org/tryharness-desktop-darwin-x64/-/tryharness-desktop-darwin-x64-0.7.83.tgz",
|
|
1069
|
+
"integrity": "sha512-xhqKKVZ2O5bmVYI6Y79PFPqV6nInTVmFWWlTMRfN7kcXj3TPJoIhba0fOR+k8El2HEXwc4rIoOUXgYmNmc+bLw==",
|
|
1070
1070
|
"cpu": [
|
|
1071
1071
|
"x64"
|
|
1072
1072
|
],
|
|
@@ -1077,9 +1077,9 @@
|
|
|
1077
1077
|
]
|
|
1078
1078
|
},
|
|
1079
1079
|
"node_modules/tryharness-desktop-linux-x64": {
|
|
1080
|
-
"version": "0.7.
|
|
1081
|
-
"resolved": "https://registry.npmjs.org/tryharness-desktop-linux-x64/-/tryharness-desktop-linux-x64-0.7.
|
|
1082
|
-
"integrity": "sha512-
|
|
1080
|
+
"version": "0.7.83",
|
|
1081
|
+
"resolved": "https://registry.npmjs.org/tryharness-desktop-linux-x64/-/tryharness-desktop-linux-x64-0.7.83.tgz",
|
|
1082
|
+
"integrity": "sha512-SRQlUBJ59L5270mfWDfqgZbtqxO8Ke9iMBGQEcX1sLkuS0ySlTYRAoSZiQRt8VAkFT4wrgf8Q3e3C2/g0/603g==",
|
|
1083
1083
|
"cpu": [
|
|
1084
1084
|
"x64"
|
|
1085
1085
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tryharness",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.83",
|
|
4
4
|
"description": "Harness Relay: the daemon that turns the agents on this machine into your personal swarm. Memory, history, and work handed between any of them.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tryharness": "cli.mjs"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"zod": "4.6.7"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"tryharness-desktop-darwin-arm64": "0.7.
|
|
52
|
-
"tryharness-desktop-darwin-x64": "0.7.
|
|
53
|
-
"tryharness-desktop-linux-x64": "0.7.
|
|
51
|
+
"tryharness-desktop-darwin-arm64": "0.7.83",
|
|
52
|
+
"tryharness-desktop-darwin-x64": "0.7.83",
|
|
53
|
+
"tryharness-desktop-linux-x64": "0.7.83"
|
|
54
54
|
}
|
|
55
55
|
}
|