tryharness 0.7.44 → 0.7.53
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 +232 -12
- package/cli.mjs +406 -184
- package/lib/actorRoster.mjs +28 -5
- package/lib/adapters.mjs +9 -1
- package/lib/agentRuntimeConfig.mjs +36 -0
- package/lib/agentRuntimes.mjs +560 -0
- package/lib/atlas.mjs +7 -2
- package/lib/boardCommands.mjs +5 -10
- package/lib/boardFileCommands.mjs +2 -1
- package/lib/boardMirror.mjs +459 -0
- package/lib/boardProtocol.json +259 -6
- package/lib/boardTools.mjs +2 -6
- package/lib/bridge.mjs +27 -3
- package/lib/browserWake.mjs +60 -0
- package/lib/cards.mjs +35 -2
- package/lib/commands.mjs +20 -5
- package/lib/connectionTools.d.ts +13 -0
- package/lib/connectionTools.js +45 -0
- package/lib/connectorAuth.mjs +309 -0
- package/lib/connectorCatalog.json +41 -0
- package/lib/connectorCommands.mjs +121 -0
- package/lib/connectorGoogle.mjs +513 -0
- package/lib/connectors.mjs +805 -0
- package/lib/coordinator.mjs +16 -2
- package/lib/coreModels.mjs +78 -0
- package/lib/daemon.mjs +775 -46
- package/lib/desktop.mjs +7 -2
- package/lib/digest.mjs +32 -0
- package/lib/directLink.mjs +283 -0
- package/lib/environments.mjs +595 -0
- package/lib/folders.mjs +2 -2
- package/lib/goalCommands.mjs +61 -12
- package/lib/inference.mjs +263 -152
- package/lib/lessons.mjs +6 -0
- package/lib/lineup.mjs +324 -0
- package/lib/localmodels.mjs +10 -0
- package/lib/machineIdentity.mjs +3 -0
- package/lib/machineRoutes.mjs +40 -2
- package/lib/machineRuns.mjs +30 -3
- package/lib/machineSeal.mjs +69 -10
- package/lib/mcp-stdio.mjs +180 -98
- package/lib/mcpRelay.mjs +119 -0
- package/lib/members.json +12 -0
- package/lib/members.mjs +33 -0
- package/lib/modelMemory.mjs +100 -0
- package/lib/modelTiers.json +1183 -0
- package/lib/modelTiers.mjs +133 -0
- package/lib/models.mjs +41 -8
- package/lib/museSession.mjs +119 -0
- package/lib/nativeHost.mjs +203 -0
- package/lib/network.mjs +38 -1
- package/lib/nudge.mjs +10 -2
- package/lib/onboard.mjs +430 -1
- package/lib/oneclawLocal.mjs +150 -0
- package/lib/ownMachines.mjs +521 -36
- package/lib/pairing.mjs +165 -0
- package/lib/paths.mjs +4 -0
- package/lib/phones.mjs +61 -0
- package/lib/placeCommands.mjs +27 -0
- package/lib/places.mjs +10 -2
- package/lib/plans.mjs +151 -27
- package/lib/profile.mjs +152 -0
- package/lib/projectGit.mjs +328 -0
- package/lib/projectSettings.mjs +120 -0
- package/lib/projects.mjs +2539 -0
- package/lib/readiness.mjs +283 -0
- package/lib/repoLinks.mjs +354 -0
- package/lib/roomChannels.mjs +641 -0
- package/lib/runBrief.mjs +32 -2
- package/lib/runRequests.mjs +157 -0
- package/lib/runWorker.mjs +20 -7
- package/lib/runner.mjs +67 -8
- package/lib/secretPatterns.json +55 -0
- package/lib/secrets.mjs +10 -27
- package/lib/seen.mjs +102 -0
- package/lib/service.mjs +11 -6
- package/lib/sessionControl.mjs +10 -8
- package/lib/sessionIndex.mjs +5 -3
- package/lib/store.mjs +559 -30
- package/lib/subagents.mjs +8 -4
- package/lib/swarm.mjs +379 -38
- package/lib/swarmMemory.mjs +947 -0
- package/lib/t3.mjs +43 -13
- package/lib/taskCommands.mjs +58 -5
- package/lib/taskRuns.mjs +61 -11
- package/lib/team.json +17 -15
- package/lib/team.mjs +68 -18
- package/lib/threadRuns.mjs +50 -7
- package/lib/threadView.mjs +68 -15
- package/lib/tokenizer.mjs +405 -0
- package/lib/ui.mjs +16 -2
- package/lib/usageTotals.mjs +148 -0
- package/lib/vault.mjs +1144 -0
- package/lib/vaultCloud.mjs +117 -0
- package/lib/vaultCommands.mjs +201 -0
- package/lib/vaultTools.d.ts +12 -0
- package/lib/vaultTools.js +42 -0
- package/lib/windowAsks.mjs +42 -0
- package/lib/workFocus.mjs +59 -0
- package/lib/workLinks.mjs +90 -0
- package/package.json +9 -4
package/lib/service.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { spawn } from "node:child_process";
|
|
5
|
-
import {
|
|
5
|
+
import { detectAgents, run } from "./commands.mjs";
|
|
6
6
|
import { ensureDir } from "./files.mjs";
|
|
7
7
|
import { paths } from "./paths.mjs";
|
|
8
8
|
import { appProgram } from "./desktop.mjs";
|
|
@@ -143,9 +143,8 @@ function agentPath() {
|
|
|
143
143
|
"/usr/bin",
|
|
144
144
|
"/bin",
|
|
145
145
|
]);
|
|
146
|
-
for (const
|
|
147
|
-
|
|
148
|
-
if (found) dirs.add(path.dirname(found));
|
|
146
|
+
for (const agent of detectAgents()) {
|
|
147
|
+
if (agent.path) dirs.add(path.dirname(agent.path));
|
|
149
148
|
}
|
|
150
149
|
return [...dirs].join(path.delimiter);
|
|
151
150
|
}
|
|
@@ -243,7 +242,12 @@ export function installService({
|
|
|
243
242
|
run("launchctl", ["kickstart", "-k", `${domain}/${LABEL}`]);
|
|
244
243
|
return { manager: "launchd", file: plist };
|
|
245
244
|
}
|
|
246
|
-
|
|
245
|
+
// A Linux computer without a systemd user session (a container, WSL, a minimal install) starts the daemon for this
|
|
246
|
+
// login instead, as other platforms do; setup used to stop here with "could not start Harness daemon with systemd".
|
|
247
|
+
if (
|
|
248
|
+
platform === "linux" &&
|
|
249
|
+
execute("systemctl", ["--user", "show-environment"]).ok
|
|
250
|
+
) {
|
|
247
251
|
const unit = servicePath();
|
|
248
252
|
ensureDir(path.dirname(unit));
|
|
249
253
|
fs.writeFileSync(
|
|
@@ -323,7 +327,8 @@ export function serviceInfo({
|
|
|
323
327
|
manager:
|
|
324
328
|
platform === "darwin"
|
|
325
329
|
? "launchd"
|
|
326
|
-
: platform === "linux"
|
|
330
|
+
: platform === "linux" &&
|
|
331
|
+
execute("systemctl", ["--user", "show-environment"]).ok
|
|
327
332
|
? "systemd"
|
|
328
333
|
: "detached",
|
|
329
334
|
installed: Boolean(file && fs.existsSync(file)),
|
package/lib/sessionControl.mjs
CHANGED
|
@@ -48,6 +48,8 @@ export function createSessionControl({
|
|
|
48
48
|
validAgent,
|
|
49
49
|
opencodeExecutable,
|
|
50
50
|
activeRuns,
|
|
51
|
+
// Every value in the person's vault out of what a live read shows (vault.mjs).
|
|
52
|
+
scrub = (value) => value,
|
|
51
53
|
}) {
|
|
52
54
|
const saidKey = (agent, sessionId) => `said:${agent}:${sessionId}`;
|
|
53
55
|
const said = (agent, sessionId) => {
|
|
@@ -684,10 +686,12 @@ export function createSessionControl({
|
|
|
684
686
|
if (agentId === "opencode")
|
|
685
687
|
return {
|
|
686
688
|
ok: true,
|
|
687
|
-
items:
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
689
|
+
items: scrub(
|
|
690
|
+
opencodeFeed(
|
|
691
|
+
opencodeExecutable || "opencode",
|
|
692
|
+
sessionId,
|
|
693
|
+
Math.min(200, Number(request.limit) || 80)
|
|
694
|
+
)
|
|
691
695
|
),
|
|
692
696
|
};
|
|
693
697
|
const file = sessionFile(
|
|
@@ -699,10 +703,8 @@ export function createSessionControl({
|
|
|
699
703
|
if (!file) return { ok: true, items: [] };
|
|
700
704
|
return {
|
|
701
705
|
ok: true,
|
|
702
|
-
items:
|
|
703
|
-
agentId,
|
|
704
|
-
file,
|
|
705
|
-
Math.min(200, Number(request.limit) || 80)
|
|
706
|
+
items: scrub(
|
|
707
|
+
sessionFeed(agentId, file, Math.min(200, Number(request.limit) || 80))
|
|
706
708
|
),
|
|
707
709
|
};
|
|
708
710
|
}
|
package/lib/sessionIndex.mjs
CHANGED
|
@@ -14,6 +14,8 @@ export function createSessionIndex({
|
|
|
14
14
|
state,
|
|
15
15
|
saveStatus,
|
|
16
16
|
log,
|
|
17
|
+
// Every value in the person's vault out of what an agent's session says, before it is kept or passed on (vault.mjs).
|
|
18
|
+
scrub = (value) => value,
|
|
17
19
|
}) {
|
|
18
20
|
const opencodeExecutable =
|
|
19
21
|
detected.find((entry) => entry.agent === "opencode")?.path || null;
|
|
@@ -100,7 +102,7 @@ export function createSessionIndex({
|
|
|
100
102
|
const sessionId = path.basename(item.file);
|
|
101
103
|
if (!store.needsIndex(agent, sessionId, item.mtime, item.size))
|
|
102
104
|
return false;
|
|
103
|
-
const parsed = await parseSessionFile(agent, item.file);
|
|
105
|
+
const parsed = scrub(await parseSessionFile(agent, item.file));
|
|
104
106
|
store.indexParsed({
|
|
105
107
|
agent,
|
|
106
108
|
sessionId,
|
|
@@ -139,7 +141,7 @@ export function createSessionIndex({
|
|
|
139
141
|
);
|
|
140
142
|
if (!messagesResponse.ok) return false;
|
|
141
143
|
const messages = await messagesResponse.json();
|
|
142
|
-
const raw = JSON.stringify({ info, messages });
|
|
144
|
+
const raw = scrub(JSON.stringify({ info, messages }));
|
|
143
145
|
store.indexRaw({
|
|
144
146
|
agent: "opencode",
|
|
145
147
|
sessionId,
|
|
@@ -230,7 +232,7 @@ export function createSessionIndex({
|
|
|
230
232
|
// traffic is served from the normalized SQLite transcript and never ships raw logs.
|
|
231
233
|
try {
|
|
232
234
|
return {
|
|
233
|
-
raw: fs.readFileSync(row.source, "utf8"),
|
|
235
|
+
raw: scrub(fs.readFileSync(row.source, "utf8")),
|
|
234
236
|
cwd: row.cwd || undefined,
|
|
235
237
|
};
|
|
236
238
|
} catch {
|