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/lib/onboard.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from "./wakes.mjs";
|
|
9
9
|
import { columns, createUi, wrap } from "./ui.mjs";
|
|
10
10
|
import { CHECKABLE, SIGN_IN } from "./readiness.mjs";
|
|
11
|
+
import { relayCommand } from "./runtime-install.mjs";
|
|
11
12
|
|
|
12
13
|
// "Your swarm" in setup: every agent class with how Harness reaches it, the recommended way already chosen, and a real
|
|
13
14
|
// test at the end that passes only when the agent claims and reports a task. Also reachable on its own as
|
|
@@ -20,10 +21,10 @@ const LABEL = {
|
|
|
20
21
|
"grok-bot": "Grok Bot",
|
|
21
22
|
};
|
|
22
23
|
const later = (agent) =>
|
|
23
|
-
`Later: ${pc.cyan(
|
|
24
|
+
`Later: ${pc.cyan(`${relayCommand()} agents setup ${agent}`)}`;
|
|
24
25
|
|
|
25
|
-
// The Harness mark
|
|
26
|
-
//
|
|
26
|
+
// The Harness mark, as the app's walkthrough draws it, in box characters: dim corners, the bright one in Harness teal,
|
|
27
|
+
// the wordmark beside it. Plain when the output is not a terminal or NO_COLOR is set.
|
|
27
28
|
export function banner(version, { color = pc.isColorSupported } = {}) {
|
|
28
29
|
const c = pc.createColors(color),
|
|
29
30
|
teal = (text) => (color ? `\x1b[38;5;36m${text}\x1b[39m` : text);
|
|
@@ -120,7 +121,7 @@ export async function testAgent({
|
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
spin.stop(
|
|
123
|
-
`No answer after ${Math.round(waitMs / 60_000)} minutes. Check that ${name} is running, then:
|
|
124
|
+
`No answer after ${Math.round(waitMs / 60_000)} minutes. Check that ${name} is running, then: ${relayCommand()} agents test ${agent}`,
|
|
124
125
|
2
|
|
125
126
|
);
|
|
126
127
|
return false;
|
|
@@ -292,7 +293,7 @@ async function setupGrok({ ui, daemonRequest, clipboard }) {
|
|
|
292
293
|
});
|
|
293
294
|
if (!saved.ok) {
|
|
294
295
|
ui.warn(
|
|
295
|
-
`${saved.error}. Try again:
|
|
296
|
+
`${saved.error}. Try again: ${relayCommand()} agents setup grok-bot`
|
|
296
297
|
);
|
|
297
298
|
return false;
|
|
298
299
|
}
|
|
@@ -363,7 +364,7 @@ async function setupGrok({ ui, daemonRequest, clipboard }) {
|
|
|
363
364
|
? { ok, line: "Grok registered its address" }
|
|
364
365
|
: {
|
|
365
366
|
ok,
|
|
366
|
-
line:
|
|
367
|
+
line: `Grok has not registered yet. When it has: ${relayCommand()} agents test grok-bot`,
|
|
367
368
|
}
|
|
368
369
|
);
|
|
369
370
|
const answer = await ui.waitOrType({
|
|
@@ -444,8 +445,12 @@ export async function setupSwarm({
|
|
|
444
445
|
);
|
|
445
446
|
}
|
|
446
447
|
|
|
447
|
-
|
|
448
|
-
const
|
|
448
|
+
// A function, not a constant: the installed command only exists once setup has installed the runtime.
|
|
449
|
+
const ADD_LATER = () =>
|
|
450
|
+
`Add another agent any time: ${pc.cyan(`${relayCommand()} agents add`)}, or Settings, then Your swarm, in the Harness app.`;
|
|
451
|
+
// A function, not a constant: the installed command only exists once setup has installed the runtime.
|
|
452
|
+
const JOINS_LATER = () =>
|
|
453
|
+
`Install or sign in another agent any time: it joins your swarm by itself once it answers. ${pc.dim(`Or: ${relayCommand()} agents add`)}`;
|
|
449
454
|
|
|
450
455
|
const COMMAND = {
|
|
451
456
|
"claude-code": "claude",
|
|
@@ -609,10 +614,11 @@ export async function setupChosen({
|
|
|
609
614
|
);
|
|
610
615
|
for (const entry of local)
|
|
611
616
|
await setupLocal({ entry, runtimeRoot, ui, daemonRequest, ask: false });
|
|
612
|
-
ui.info(JOINS_LATER);
|
|
617
|
+
ui.info(JOINS_LATER());
|
|
613
618
|
}
|
|
614
619
|
|
|
615
|
-
|
|
620
|
+
// A function, not a constant: the installed command only exists once setup has installed the runtime.
|
|
621
|
+
const T3_LATER = () => `Later: ${pc.cyan(`${relayCommand()} t3`)}`;
|
|
616
622
|
const t3Line = (access) =>
|
|
617
623
|
access?.state === "send"
|
|
618
624
|
? {
|
|
@@ -651,7 +657,7 @@ export async function setupT3({ ui = createUi(), daemonRequest, open }) {
|
|
|
651
657
|
if (first.t3?.state === "expired")
|
|
652
658
|
ui.info("Harness's approval in T3 Code ran out.");
|
|
653
659
|
if (!ui.interactive) {
|
|
654
|
-
ui.info(T3_LATER);
|
|
660
|
+
ui.info(T3_LATER());
|
|
655
661
|
return;
|
|
656
662
|
}
|
|
657
663
|
const approve = await ui.select({
|
|
@@ -666,7 +672,7 @@ export async function setupT3({ ui = createUi(), daemonRequest, open }) {
|
|
|
666
672
|
],
|
|
667
673
|
});
|
|
668
674
|
if (approve !== "approve") {
|
|
669
|
-
ui.info(`Skipped. ${T3_LATER}`);
|
|
675
|
+
ui.info(`Skipped. ${T3_LATER()}`);
|
|
670
676
|
return;
|
|
671
677
|
}
|
|
672
678
|
for (;;) {
|
|
@@ -675,7 +681,7 @@ export async function setupT3({ ui = createUi(), daemonRequest, open }) {
|
|
|
675
681
|
if (!started.ok) {
|
|
676
682
|
ui.warn(started.error || "Harness could not start the approval.");
|
|
677
683
|
if (started.code !== "not_running") {
|
|
678
|
-
ui.info(T3_LATER);
|
|
684
|
+
ui.info(T3_LATER());
|
|
679
685
|
return;
|
|
680
686
|
}
|
|
681
687
|
const next = await ui.select({
|
|
@@ -686,7 +692,7 @@ export async function setupT3({ ui = createUi(), daemonRequest, open }) {
|
|
|
686
692
|
],
|
|
687
693
|
});
|
|
688
694
|
if (next !== "check") {
|
|
689
|
-
ui.info(`Skipped. ${T3_LATER}`);
|
|
695
|
+
ui.info(`Skipped. ${T3_LATER()}`);
|
|
690
696
|
return;
|
|
691
697
|
}
|
|
692
698
|
continue;
|
|
@@ -718,7 +724,7 @@ export async function setupT3({ ui = createUi(), daemonRequest, open }) {
|
|
|
718
724
|
if (answer.cancelled) {
|
|
719
725
|
settled = true;
|
|
720
726
|
ui.info(
|
|
721
|
-
`Stopped waiting. Approving it on that page still counts. ${T3_LATER}`
|
|
727
|
+
`Stopped waiting. Approving it on that page still counts. ${T3_LATER()}`
|
|
722
728
|
);
|
|
723
729
|
return;
|
|
724
730
|
}
|
|
@@ -754,7 +760,7 @@ export async function showLineup({ daemonRequest, ui = createUi() }) {
|
|
|
754
760
|
const lineup = await daemonRequest({ command: "swarm.lineup" });
|
|
755
761
|
if (!lineup?.ok) {
|
|
756
762
|
ui.warn(
|
|
757
|
-
lineup?.error ||
|
|
763
|
+
lineup?.error || `Harness is not running here. Run: ${relayCommand()}`
|
|
758
764
|
);
|
|
759
765
|
return;
|
|
760
766
|
}
|
|
@@ -765,7 +771,7 @@ export async function showLineup({ daemonRequest, ui = createUi() }) {
|
|
|
765
771
|
ui.step(
|
|
766
772
|
`Your swarm ${pc.dim("· ✓ in it, + can be added")}\n${rows.join("\n")}`
|
|
767
773
|
);
|
|
768
|
-
ui.info(ADD_LATER);
|
|
774
|
+
ui.info(ADD_LATER());
|
|
769
775
|
}
|
|
770
776
|
|
|
771
777
|
/**
|
|
@@ -781,7 +787,7 @@ export async function addAgents({
|
|
|
781
787
|
const lineup = await daemonRequest({ command: "swarm.lineup" });
|
|
782
788
|
if (!lineup?.ok) {
|
|
783
789
|
ui.warn(
|
|
784
|
-
lineup?.error ||
|
|
790
|
+
lineup?.error || `Harness is not running here. Run: ${relayCommand()}`
|
|
785
791
|
);
|
|
786
792
|
return false;
|
|
787
793
|
}
|
|
@@ -806,7 +812,7 @@ export async function addAgents({
|
|
|
806
812
|
}
|
|
807
813
|
if (!ui.interactive) {
|
|
808
814
|
ui.info(
|
|
809
|
-
`Can be added: ${open.map((entry) => entry.id).join(", ")}. Run:
|
|
815
|
+
`Can be added: ${open.map((entry) => entry.id).join(", ")}. Run: ${relayCommand()} agents add <agent>`
|
|
810
816
|
);
|
|
811
817
|
return true;
|
|
812
818
|
}
|
|
@@ -856,7 +862,7 @@ export async function removeAgent({ daemonRequest, agent, ui = createUi() }) {
|
|
|
856
862
|
return false;
|
|
857
863
|
}
|
|
858
864
|
ui.success(
|
|
859
|
-
`${removed.name} is out of your swarm. Add it back any time:
|
|
865
|
+
`${removed.name} is out of your swarm. Add it back any time: ${relayCommand()} agents add ${agent}`
|
|
860
866
|
);
|
|
861
867
|
return true;
|
|
862
868
|
}
|
package/lib/oneLine.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// A field one agent wrote that another agent reads as one line (an objective, an origin chain, a thread title in a
|
|
2
|
-
// a steering header, a card's model) is made safe here: a line break or control character in it could otherwise
|
|
3
|
-
// line of its own and forge one, such as a "Harness task board:" line in another agent's session start (33
|
|
4
|
-
// task objectives on
|
|
5
|
-
//
|
|
1
|
+
// A field one agent wrote that another agent reads as one line (an objective, an origin chain, a thread title in a
|
|
2
|
+
// frame, a steering header, a card's model) is made safe here: a line break or control character in it could otherwise
|
|
3
|
+
// start a line of its own and forge one, such as a "Harness task board:" line in another agent's session start (33
|
|
4
|
+
// agent-written task objectives on one real board held line breaks). Every control and separator character becomes one
|
|
5
|
+
// space, and the field is cut to a fixed length, marked with an ellipsis.
|
|
6
6
|
|
|
7
7
|
// The length the relay already cuts titles at (run titles, plan lines, the coordinator's session titles). Measured on
|
|
8
|
-
//
|
|
9
|
-
//
|
|
8
|
+
// one real board: every thread title (60, at most 120) and file name (334, at most 51) fits whole; task objectives
|
|
9
|
+
// (median 346) are cut, and get_task still gives each whole.
|
|
10
10
|
export const LINE_LIMIT = 120;
|
|
11
11
|
|
|
12
12
|
// C0 and C1 controls with DEL (Cc), the line and paragraph separators (U+2028, U+2029) and format characters that
|