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.
- package/README.md +10 -5
- package/assets/dsh-plugin.mjs +72 -0
- package/assets/opencode-plugin.js +4 -3
- package/cli.mjs +115 -36
- package/lib/adapters.mjs +157 -222
- package/lib/agentRuntimes.mjs +26 -16
- package/lib/agentSignIn.mjs +226 -0
- package/lib/audit.mjs +643 -0
- package/lib/backupSetup.mjs +141 -0
- package/lib/boardAccess.mjs +8 -1
- package/lib/boardBackup.mjs +283 -0
- package/lib/boardMirror.mjs +71 -7
- package/lib/boardProtocol.json +59 -2
- package/lib/boardWaits.mjs +102 -0
- package/lib/book.mjs +659 -0
- package/lib/bridge.mjs +1 -1
- package/lib/cards.mjs +138 -28
- package/lib/cloudBoot.mjs +124 -0
- package/lib/commands.mjs +7 -2
- package/lib/context.mjs +18 -4
- package/lib/contractGate.mjs +377 -0
- package/lib/coordinator.mjs +149 -43
- package/lib/daemon.mjs +349 -28
- package/lib/desk.mjs +239 -0
- package/lib/desktop.mjs +106 -6
- package/lib/environments.mjs +237 -7
- package/lib/folders.mjs +2 -2
- package/lib/gitHost.mjs +174 -0
- package/lib/hookDialects.mjs +298 -0
- package/lib/landed.mjs +887 -0
- package/lib/live.mjs +284 -13
- package/lib/mcp-stdio.mjs +68 -2
- package/lib/members.json +16 -2
- package/lib/models.mjs +8 -8
- package/lib/museSession.mjs +16 -13
- package/lib/nativeHost.mjs +1 -1
- package/lib/neovim.mjs +126 -0
- package/lib/nudge.mjs +47 -16
- package/lib/ownMachines.mjs +343 -39
- package/lib/pairing.mjs +27 -10
- package/lib/paths.mjs +4 -0
- package/lib/personModel.mjs +89 -0
- package/lib/phones.mjs +66 -11
- package/lib/places.mjs +330 -10
- package/lib/readiness.mjs +135 -18
- package/lib/record.mjs +115 -0
- package/lib/runWorker.mjs +17 -2
- package/lib/runner.mjs +8 -4
- package/lib/sessionControl.mjs +377 -89
- package/lib/specialties.json +74 -0
- package/lib/specialties.mjs +477 -0
- package/lib/specialtyKeys.d.ts +3 -0
- package/lib/specialtyKeys.js +58 -0
- package/lib/specialtyNotice.mjs +147 -0
- package/lib/specialtySnapshot.mjs +138 -0
- package/lib/store.mjs +284 -1
- package/lib/swarm.mjs +137 -21
- package/lib/t3.mjs +13 -4
- package/lib/taskCommands.mjs +36 -9
- package/lib/taskRuns.mjs +9 -2
- package/lib/team.json +255 -148
- package/lib/team.mjs +529 -188
- package/lib/threadLine.mjs +116 -0
- package/lib/threadRuns.mjs +75 -11
- package/lib/threadView.mjs +15 -2
- package/lib/worktrees.mjs +51 -13
- package/package.json +4 -4
- package/lib/modelTiers.json +0 -1183
- package/lib/modelTiers.mjs +0 -133
package/lib/boardProtocol.json
CHANGED
|
@@ -35,6 +35,9 @@
|
|
|
35
35
|
"board.goal.list": "goals",
|
|
36
36
|
"board.goal.resume": "goals",
|
|
37
37
|
"board.goal.stop": "goals",
|
|
38
|
+
"board.landed.folder": "landed",
|
|
39
|
+
"board.landed.open": "landed",
|
|
40
|
+
"board.landed.thread": "landed",
|
|
38
41
|
"board.list": "task",
|
|
39
42
|
"board.live": "live",
|
|
40
43
|
"board.live.focus": "live",
|
|
@@ -122,6 +125,10 @@
|
|
|
122
125
|
"board.swarm.model": "swarm",
|
|
123
126
|
"board.swarm.models": "swarm",
|
|
124
127
|
"board.swarm.note": "swarm",
|
|
128
|
+
"board.swarm.office": "swarm",
|
|
129
|
+
"board.swarm.offices": "swarm",
|
|
130
|
+
"board.swarm.pin": "swarm",
|
|
131
|
+
"board.swarm.notice": "specialtyNotice",
|
|
125
132
|
"board.swarm.place": "swarm",
|
|
126
133
|
"board.swarm.places": "swarm",
|
|
127
134
|
"board.swarm.post": "swarm",
|
|
@@ -130,6 +137,8 @@
|
|
|
130
137
|
"board.swarm.rounds": "swarm",
|
|
131
138
|
"board.swarm.routing": "swarm",
|
|
132
139
|
"board.swarm.search": "swarm",
|
|
140
|
+
"board.swarm.specialties": "swarm",
|
|
141
|
+
"board.swarm.specialty": "swarm",
|
|
133
142
|
"board.swarm.start": "swarm",
|
|
134
143
|
"board.swarm.start_run": "swarm",
|
|
135
144
|
"board.swarm.stop": "swarm",
|
|
@@ -181,7 +190,8 @@
|
|
|
181
190
|
"board.native.read": "nativeRequests",
|
|
182
191
|
"board.native.decide": "nativeRequests",
|
|
183
192
|
"board.swarm.links": "swarm",
|
|
184
|
-
"board.swarm.link": "swarm"
|
|
193
|
+
"board.swarm.link": "swarm",
|
|
194
|
+
"board.wait": "waits"
|
|
185
195
|
},
|
|
186
196
|
"families": [
|
|
187
197
|
{
|
|
@@ -197,6 +207,12 @@
|
|
|
197
207
|
"board.swarm."
|
|
198
208
|
]
|
|
199
209
|
},
|
|
210
|
+
{
|
|
211
|
+
"owner": "landed",
|
|
212
|
+
"prefixes": [
|
|
213
|
+
"board.landed."
|
|
214
|
+
]
|
|
215
|
+
},
|
|
200
216
|
{
|
|
201
217
|
"owner": "relay",
|
|
202
218
|
"prefixes": [
|
|
@@ -263,6 +279,18 @@
|
|
|
263
279
|
"prefixes": [
|
|
264
280
|
"board.vault."
|
|
265
281
|
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"owner": "desk",
|
|
285
|
+
"prefixes": [
|
|
286
|
+
"board.desk."
|
|
287
|
+
]
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"owner": "audit",
|
|
291
|
+
"prefixes": [
|
|
292
|
+
"board.audit."
|
|
293
|
+
]
|
|
266
294
|
}
|
|
267
295
|
],
|
|
268
296
|
"access": {
|
|
@@ -390,6 +418,8 @@
|
|
|
390
418
|
"board.swarm.use_browser",
|
|
391
419
|
"board.swarm.agents",
|
|
392
420
|
"board.swarm.note",
|
|
421
|
+
"board.swarm.specialty",
|
|
422
|
+
"board.swarm.notice",
|
|
393
423
|
"board.swarm.places",
|
|
394
424
|
"board.swarm.browse",
|
|
395
425
|
"board.swarm.place",
|
|
@@ -551,6 +581,9 @@
|
|
|
551
581
|
"board.room.search"
|
|
552
582
|
],
|
|
553
583
|
"desktop": [
|
|
584
|
+
"board.audit.week",
|
|
585
|
+
"board.desk.book",
|
|
586
|
+
"board.desk.contract",
|
|
554
587
|
"board.list",
|
|
555
588
|
"board.get",
|
|
556
589
|
"board.children",
|
|
@@ -586,6 +619,12 @@
|
|
|
586
619
|
"board.swarm.discard",
|
|
587
620
|
"board.swarm.agents",
|
|
588
621
|
"board.swarm.note",
|
|
622
|
+
"board.swarm.specialties",
|
|
623
|
+
"board.swarm.specialty",
|
|
624
|
+
"board.swarm.pin",
|
|
625
|
+
"board.swarm.offices",
|
|
626
|
+
"board.swarm.office",
|
|
627
|
+
"board.swarm.notice",
|
|
589
628
|
"board.swarm.lessons",
|
|
590
629
|
"board.swarm.lessons.edit",
|
|
591
630
|
"board.swarm.lessons.remove",
|
|
@@ -636,6 +675,8 @@
|
|
|
636
675
|
"board.swarm.held",
|
|
637
676
|
"machines.list",
|
|
638
677
|
"machines.add",
|
|
678
|
+
"machines.models",
|
|
679
|
+
"machines.model",
|
|
639
680
|
"swarm.lineup",
|
|
640
681
|
"swarm.add",
|
|
641
682
|
"swarm.remove",
|
|
@@ -695,7 +736,11 @@
|
|
|
695
736
|
"board.vault.share",
|
|
696
737
|
"board.vault.unshare",
|
|
697
738
|
"board.vault.import",
|
|
698
|
-
"board.vault.allow"
|
|
739
|
+
"board.vault.allow",
|
|
740
|
+
"board.wait",
|
|
741
|
+
"board.landed.thread",
|
|
742
|
+
"board.landed.folder",
|
|
743
|
+
"board.landed.open"
|
|
699
744
|
],
|
|
700
745
|
"plainPerson": [
|
|
701
746
|
"board.standing.off"
|
|
@@ -708,6 +753,18 @@
|
|
|
708
753
|
"board.goal.get",
|
|
709
754
|
"board.goal.list",
|
|
710
755
|
"board.room.read"
|
|
756
|
+
],
|
|
757
|
+
"browserMachines": [
|
|
758
|
+
"machines.add",
|
|
759
|
+
"machines.list"
|
|
760
|
+
],
|
|
761
|
+
"browserSignIn": [
|
|
762
|
+
"agents.signin.status",
|
|
763
|
+
"agents.signin.start",
|
|
764
|
+
"agents.signin.read",
|
|
765
|
+
"agents.signin.send",
|
|
766
|
+
"agents.signin.stop",
|
|
767
|
+
"agents.signin.key"
|
|
711
768
|
]
|
|
712
769
|
},
|
|
713
770
|
"metadata": {
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// The board's revision, and whoever waits for it to move. Every surface that shows the board (the buddy over the local
|
|
2
|
+
// socket, the PiP and the phone through Harness) reads it again the moment it changes, rather than on a timer (owner,
|
|
3
|
+
// October 23: "syncing and cohesion of the relay state across all devices as well as the pip and phone have to be damn
|
|
4
|
+
// near instant").
|
|
5
|
+
//
|
|
6
|
+
// The revision is the board's change log head (boardMirror.mjs: every write to a board table, through any of the
|
|
7
|
+
// daemon's paths, and every page copied from home) with a count of changes kept outside those tables (the T3 Code work
|
|
8
|
+
// listed beside the board). A write the daemon names (`changed`) is seen at once; any other is seen within CHECK_MS,
|
|
9
|
+
// checked only while someone waits or listens.
|
|
10
|
+
|
|
11
|
+
const CHECK_MS = 100;
|
|
12
|
+
// A wait's longest hold: under the buddy's 20 s socket read (packages/desktop/src-tauri/src/daemon.rs), so a quiet
|
|
13
|
+
// board answers before the socket gives up.
|
|
14
|
+
const MOST_HOLD_MS = 15_000;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* `head` reads the change log's newest seq. `onChange` hears each move of the revision, once for all the changes made
|
|
18
|
+
* in one check.
|
|
19
|
+
*/
|
|
20
|
+
export function createBoardWaits({ head }) {
|
|
21
|
+
let outside = 0;
|
|
22
|
+
let seen = head();
|
|
23
|
+
const waiters = new Set();
|
|
24
|
+
const listeners = new Set();
|
|
25
|
+
let timer = null;
|
|
26
|
+
let checkQueued = false;
|
|
27
|
+
|
|
28
|
+
const revision = () => `${seen}.${outside}`;
|
|
29
|
+
|
|
30
|
+
const check = () => {
|
|
31
|
+
const now = head();
|
|
32
|
+
if (now === seen) return;
|
|
33
|
+
seen = now;
|
|
34
|
+
moved();
|
|
35
|
+
};
|
|
36
|
+
const moved = () => {
|
|
37
|
+
const current = revision();
|
|
38
|
+
for (const waiter of [...waiters]) waiter(current);
|
|
39
|
+
for (const listener of [...listeners])
|
|
40
|
+
try {
|
|
41
|
+
listener(current);
|
|
42
|
+
} catch {}
|
|
43
|
+
};
|
|
44
|
+
const keepChecking = () => {
|
|
45
|
+
const wanted = waiters.size > 0 || listeners.size > 0;
|
|
46
|
+
if (wanted && !timer) {
|
|
47
|
+
timer = setInterval(check, CHECK_MS);
|
|
48
|
+
timer.unref?.();
|
|
49
|
+
}
|
|
50
|
+
if (!wanted && timer) {
|
|
51
|
+
clearInterval(timer);
|
|
52
|
+
timer = null;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
revision,
|
|
58
|
+
/** A board write the daemon just made: checked as soon as the current turn of the event loop ends. */
|
|
59
|
+
changed() {
|
|
60
|
+
if (checkQueued) return;
|
|
61
|
+
checkQueued = true;
|
|
62
|
+
setImmediate(() => {
|
|
63
|
+
checkQueued = false;
|
|
64
|
+
check();
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
/** Something shown with the board that is not in its tables changed (the T3 Code work beside it). */
|
|
68
|
+
bump() {
|
|
69
|
+
check();
|
|
70
|
+
outside += 1;
|
|
71
|
+
moved();
|
|
72
|
+
},
|
|
73
|
+
/** The revision once it is not `after`: at once when it already is not, else when it moves or the hold ends. */
|
|
74
|
+
wait({ after, holdMs = MOST_HOLD_MS } = {}) {
|
|
75
|
+
check();
|
|
76
|
+
if (String(after ?? "") !== revision())
|
|
77
|
+
return Promise.resolve(revision());
|
|
78
|
+
const hold = Math.max(0, Math.min(MOST_HOLD_MS, Number(holdMs) || 0));
|
|
79
|
+
return new Promise((resolve) => {
|
|
80
|
+
const done = (current) => {
|
|
81
|
+
clearTimeout(timeout);
|
|
82
|
+
waiters.delete(done);
|
|
83
|
+
keepChecking();
|
|
84
|
+
resolve(current);
|
|
85
|
+
};
|
|
86
|
+
const timeout = setTimeout(() => done(revision()), hold);
|
|
87
|
+
waiters.add(done);
|
|
88
|
+
keepChecking();
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
/** Whether any surface waits on the local socket now: what is shown beside the board is kept fresh meanwhile. */
|
|
92
|
+
watched: () => waiters.size > 0,
|
|
93
|
+
onChange(listener) {
|
|
94
|
+
listeners.add(listener);
|
|
95
|
+
keepChecking();
|
|
96
|
+
return () => {
|
|
97
|
+
listeners.delete(listener);
|
|
98
|
+
keepChecking();
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|