tryharness 0.7.53 → 0.7.57
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 +23 -19
- package/assets/dsh-plugin.mjs +72 -0
- package/assets/opencode-plugin.js +4 -3
- package/cli.mjs +484 -90
- package/lib/activity.mjs +10 -10
- package/lib/adapters.mjs +173 -222
- package/lib/agentBinaries.mjs +71 -0
- package/lib/agentRuntimeConfig.mjs +1 -1
- package/lib/agentRuntimes.mjs +34 -18
- package/lib/agentSignIn.mjs +456 -0
- package/lib/answers.mjs +5 -5
- package/lib/archetypes.d.ts +64 -0
- package/lib/archetypes.js +989 -0
- package/lib/asks.mjs +4 -4
- package/lib/audit.mjs +666 -0
- package/lib/backupSetup.mjs +143 -0
- package/lib/boardAccess.mjs +24 -11
- package/lib/boardBackup.mjs +283 -0
- package/lib/boardFileCommands.mjs +6 -6
- package/lib/boardFiles.mjs +13 -12
- package/lib/boardMirror.mjs +124 -25
- package/lib/boardProtocol.json +88 -2
- package/lib/boardWaits.mjs +101 -0
- package/lib/book.mjs +659 -0
- package/lib/bridge.mjs +6 -6
- package/lib/cards.mjs +138 -28
- package/lib/cloudAgents.mjs +216 -0
- package/lib/cloudAi.mjs +1312 -0
- package/lib/cloudAssistants.mjs +242 -0
- package/lib/cloudBoot.mjs +119 -0
- package/lib/cloudSave.mjs +197 -0
- package/lib/cloudSsh.mjs +178 -0
- package/lib/commands.mjs +7 -2
- package/lib/context.mjs +19 -5
- package/lib/contractGate.mjs +399 -0
- package/lib/control-client.mjs +9 -1
- package/lib/controlSocket.mjs +86 -0
- package/lib/coordinator.mjs +252 -144
- package/lib/daemon.mjs +1351 -2767
- package/lib/desk.mjs +240 -0
- package/lib/desktop.mjs +178 -74
- package/lib/directLink.mjs +16 -5
- package/lib/environment.mjs +2 -1
- package/lib/environments.mjs +247 -9
- package/lib/firewall.mjs +9 -9
- package/lib/folders.mjs +20 -16
- package/lib/frames.mjs +2 -3
- package/lib/gitHost.mjs +174 -0
- package/lib/goalCommands.mjs +25 -7
- package/lib/goals.mjs +7 -7
- package/lib/guestRequests.mjs +94 -0
- package/lib/handoffs.mjs +8 -7
- package/lib/handover.mjs +4 -4
- package/lib/harnessModel.mjs +6 -6
- package/lib/harnessOffers.mjs +266 -0
- package/lib/hookDialects.mjs +298 -0
- package/lib/inference.mjs +26 -8
- package/lib/jobAnswers.mjs +190 -0
- package/lib/landed.mjs +887 -0
- package/lib/lane.mjs +42 -11
- package/lib/lessons.mjs +16 -16
- package/lib/library.mjs +3 -3
- package/lib/lineup.mjs +3 -0
- package/lib/linkRelay.mjs +574 -0
- package/lib/live.mjs +284 -13
- package/lib/localAgentAsk.mjs +74 -0
- package/lib/localStack.mjs +536 -0
- package/lib/localmodels.mjs +6 -4
- package/lib/loopBackstop.mjs +4 -4
- package/lib/machineIdentity.mjs +9 -1
- package/lib/machineRoutes.mjs +181 -2
- package/lib/machineRuns.mjs +76 -1
- package/lib/machineSeal.mjs +39 -12
- package/lib/mcp-stdio.mjs +163 -27
- package/lib/mcpRelay.mjs +1 -1
- package/lib/members.json +29 -2
- package/lib/members.mjs +1 -1
- package/lib/models.mjs +85 -31
- package/lib/museSession.mjs +21 -13
- package/lib/nativeHost.mjs +36 -8
- package/lib/neovim.mjs +126 -0
- package/lib/network.mjs +50 -5
- package/lib/notify.mjs +7 -5
- package/lib/nudge.mjs +50 -19
- package/lib/ocr.mjs +9 -9
- package/lib/onboard.mjs +26 -20
- package/lib/oneLine.mjs +7 -7
- package/lib/ownMachines.mjs +1223 -140
- package/lib/pairing.mjs +60 -16
- package/lib/paths.mjs +19 -1
- package/lib/peerProcess.mjs +124 -0
- package/lib/personModel.mjs +89 -0
- package/lib/personNotices.mjs +151 -0
- package/lib/phones.mjs +538 -31
- package/lib/placeCommands.mjs +4 -4
- package/lib/places.mjs +400 -12
- package/lib/profile.mjs +67 -14
- package/lib/projectGit.mjs +158 -14
- package/lib/projectPieces.mjs +902 -0
- package/lib/projectSettings.mjs +7 -4
- package/lib/projects.mjs +384 -62
- package/lib/provenance.mjs +5 -1
- package/lib/proxyLinks.mjs +267 -0
- package/lib/reactions.mjs +7 -5
- package/lib/readiness.mjs +145 -23
- package/lib/record.mjs +128 -0
- package/lib/redact.mjs +4 -4
- package/lib/relayLimits.mjs +62 -0
- package/lib/release.mjs +170 -0
- package/lib/releaseKeys.json +6 -0
- package/lib/repoLinks.mjs +4 -4
- package/lib/roomChannels.mjs +24 -0
- package/lib/roomPage.mjs +1 -1
- package/lib/runAuthority.mjs +101 -0
- package/lib/runBrief.mjs +19 -8
- package/lib/runWorker.mjs +31 -7
- package/lib/runner.mjs +223 -29
- package/lib/runtime-install.mjs +143 -9
- package/lib/schedules.mjs +2 -2
- package/lib/screens.mjs +1 -1
- package/lib/sealed.mjs +11 -2
- package/lib/sealedThreads.mjs +671 -0
- package/lib/secretPatterns.json +1 -1
- package/lib/secrets.mjs +4 -4
- package/lib/seen.mjs +6 -6
- package/lib/serverWords.mjs +175 -0
- package/lib/service.mjs +22 -12
- package/lib/sessionControl.mjs +378 -90
- package/lib/specialties.json +74 -0
- package/lib/specialties.mjs +477 -0
- package/lib/specialtyKeys.d.ts +3 -0
- package/lib/specialtyKeys.js +57 -0
- package/lib/specialtyNotice.mjs +147 -0
- package/lib/specialtySnapshot.mjs +138 -0
- package/lib/speech.mjs +5 -5
- package/lib/store.mjs +420 -36
- package/lib/stuck.mjs +1 -1
- package/lib/swarm.mjs +304 -37
- package/lib/swarmDevices.mjs +319 -0
- package/lib/swarmMemory.mjs +27 -25
- package/lib/t3.mjs +24 -15
- package/lib/taskCommands.mjs +80 -20
- package/lib/taskRooms.mjs +125 -0
- package/lib/taskRuns.mjs +45 -3
- package/lib/team.json +255 -148
- package/lib/team.mjs +554 -190
- package/lib/threadActions.mjs +315 -0
- package/lib/threadAuthority.mjs +101 -0
- package/lib/threadBriefs.mjs +178 -0
- package/lib/threadLine.mjs +116 -0
- package/lib/threadRuns.mjs +209 -50
- package/lib/threadView.mjs +20 -7
- package/lib/usageTotals.mjs +2 -3
- package/lib/vault.mjs +101 -10
- package/lib/vaultCloud.mjs +2 -2
- package/lib/vaultCommands.mjs +15 -6
- package/lib/vaultTools.js +2 -2
- package/lib/verdicts.mjs +328 -0
- package/lib/wakes.mjs +1 -1
- package/lib/watches.mjs +2 -2
- package/lib/windowAsks.mjs +13 -5
- package/lib/worktrees.mjs +157 -25
- package/npm-shrinkwrap.json +1093 -0
- package/package.json +12 -11
- package/release.json +220 -0
- package/lib/modelTiers.json +0 -1183
- package/lib/modelTiers.mjs +0 -133
package/README.md
CHANGED
|
@@ -103,8 +103,8 @@ Use selected page text previews the permitted selection, address and capture tim
|
|
|
103
103
|
Add to reply preserves existing reply text and edits. The person's Send shares it
|
|
104
104
|
with the shown thread participants. Page context Pause prevents a new read.
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
Which agents are available depends on what is installed on the computer. Native
|
|
107
|
+
session authentication still requires each agent’s own setup.
|
|
108
108
|
|
|
109
109
|
## Daemon ownership
|
|
110
110
|
|
|
@@ -149,11 +149,11 @@ asks for Start, so recovery preserves the request without replaying unknown effe
|
|
|
149
149
|
|
|
150
150
|
`lib/boardProtocol.json` owns command names, routing, protocol/inbox versions,
|
|
151
151
|
metadata fields and the separate grants for each caller surface. Node consumers use
|
|
152
|
-
`boardProtocol.mjs`; web
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
152
|
+
`boardProtocol.mjs`; the Harness web app reads the same JSON; the Rust desktop
|
|
153
|
+
adapter embeds the JSON at build time. A surface uses only its own list: adding a
|
|
154
|
+
command to the catalog does not enable it for any caller. Browser and hosted Harness
|
|
155
|
+
grants deliberately differ. When adding a command, update its owner and only the
|
|
156
|
+
intended surface grants, then exercise that caller's runtime path.
|
|
157
157
|
|
|
158
158
|
## Operations
|
|
159
159
|
|
|
@@ -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
|
|
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
|
|
@@ -276,13 +278,12 @@ content, grant or tool definition invalidates its previous approval. Reusing a
|
|
|
276
278
|
request ID cannot repeat an uncertain effect. `connections result <operation-id>`
|
|
277
279
|
reports returned, failed, unknown or cancelled; returned does not mean verified.
|
|
278
280
|
|
|
279
|
-
Dashboard Settings → Tools & connections → Apps and buddy Settings → Apps manage
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
automatically transferred.
|
|
281
|
+
Dashboard Settings → Tools & connections → Apps and buddy Settings → Apps manage the
|
|
282
|
+
same accounts, grants and approvals. Calendar access has a picker populated from the
|
|
283
|
+
connected account; custom operation restrictions remain advanced exact JSON arguments.
|
|
284
|
+
Pending requests refresh while settings is visible. The older browser-owned
|
|
285
|
+
connected-server card remains available under Apps, with separate custody and grants;
|
|
286
|
+
no credentials are automatically transferred.
|
|
286
287
|
|
|
287
288
|
## Local models
|
|
288
289
|
|
|
@@ -428,9 +429,12 @@ this computer" in its setup, an optional permission), the Harness window links b
|
|
|
428
429
|
it, `tryharness link` does the same. Each browser is paired with the computer it linked to;
|
|
429
430
|
Settings lists every computer's and revokes each where it lives.
|
|
430
431
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
Each agent's card names its model and effort and its specialties on that model, each with its
|
|
433
|
+
evidence: a specialist agent's fixed role (Bankr, Quotient), benchmarks, its record on this board and
|
|
434
|
+
the person's own adds. The person adds or removes a specialty (a removal is final for that agent and
|
|
435
|
+
model), pins an agent for a specialty and appoints offices through the relay
|
|
436
|
+
(`board.swarm.specialty`, `board.swarm.pin`, `board.swarm.office`). An office is one of the swarm's
|
|
437
|
+
standing functions, held by Harness or by the agent the person appoints.
|
|
434
438
|
|
|
435
439
|
## Goals
|
|
436
440
|
|
|
@@ -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 = "
|
|
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 () =>
|