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/modelTiers.mjs
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
|
-
|
|
3
|
-
// How strong the model an agent runs on is, by an independent benchmark, so the team's important roles go to agents
|
|
4
|
-
// that can hold them (owner, October 20: "higher tier models get more important roles", "the most important roles ...
|
|
5
|
-
// must have a floor", "where each model sits on an independent third party benchmark to create standard deviations of
|
|
6
|
-
// groups"; the person overrides any of it). modelTiers.json is a snapshot of that benchmark with its source and date and
|
|
7
|
-
// the cutoffs worked out from it; it is updated on purpose, so roles do not move when the benchmark adds a model.
|
|
8
|
-
//
|
|
9
|
-
// A tier is top, middle or bottom by the snapshot, or unknown when the agent's model is not on it (or Auto picks a model
|
|
10
|
-
// per run): an unknown agent may hold any role whose floor is not top. The person's own tier for an agent wins.
|
|
11
|
-
|
|
12
|
-
const SNAPSHOT = JSON.parse(
|
|
13
|
-
readFileSync(new URL("./modelTiers.json", import.meta.url), "utf8")
|
|
14
|
-
);
|
|
15
|
-
export const TIERS = ["top", "middle", "bottom"];
|
|
16
|
-
// Lowest first. A score named with no effort is the model's one variant. "minimal" sits under low; the benchmark lists
|
|
17
|
-
// none, so it takes low's score (the nearest stronger), never medium's (review, October 21).
|
|
18
|
-
const EFFORT_ORDER = [
|
|
19
|
-
"none",
|
|
20
|
-
"minimal",
|
|
21
|
-
"low",
|
|
22
|
-
"medium",
|
|
23
|
-
"high",
|
|
24
|
-
"xhigh",
|
|
25
|
-
"max",
|
|
26
|
-
];
|
|
27
|
-
// What the agents call the same settings: Pi's "off" is no reasoning.
|
|
28
|
-
const EFFORT_NAMES = { off: "none", "non-reasoning": "none" };
|
|
29
|
-
// An agent whose effort is not set is read at medium: neither its best nor its worst.
|
|
30
|
-
const UNSET_EFFORT = "medium";
|
|
31
|
-
|
|
32
|
-
const variants = new Map();
|
|
33
|
-
for (const entry of SNAPSHOT.entries) {
|
|
34
|
-
const [, family, inner] =
|
|
35
|
-
entry.name.match(/^(.*?)(?:\s*\(([^)]*)\))?$/) ?? [];
|
|
36
|
-
const effort = !inner
|
|
37
|
-
? null
|
|
38
|
-
: /non-reasoning/.test(inner)
|
|
39
|
-
? "none"
|
|
40
|
-
: (EFFORT_ORDER.find((level) => inner.startsWith(level)) ?? null);
|
|
41
|
-
const key = family.trim().toLowerCase();
|
|
42
|
-
variants.set(key, [...(variants.get(key) ?? []), { ...entry, effort }]);
|
|
43
|
-
}
|
|
44
|
-
const familyOf = new Map(
|
|
45
|
-
Object.entries(SNAPSHOT.models).flatMap(([family, ids]) =>
|
|
46
|
-
ids.map((id) => [id, family])
|
|
47
|
-
)
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
const levelOf = (score) =>
|
|
51
|
-
score >= SNAPSHOT.cutoffs.top
|
|
52
|
-
? "top"
|
|
53
|
-
: score < SNAPSHOT.cutoffs.bottom
|
|
54
|
-
? "bottom"
|
|
55
|
-
: "middle";
|
|
56
|
-
|
|
57
|
-
// The variant at the effort asked; else the nearest stronger setting's weakest score; else the nearest weaker one.
|
|
58
|
-
function variantAt(list, effort) {
|
|
59
|
-
const single = list.find((variant) => variant.effort === null);
|
|
60
|
-
if (single) return single;
|
|
61
|
-
const wanted = EFFORT_ORDER.indexOf(effort);
|
|
62
|
-
const ranked = list
|
|
63
|
-
.map((variant) => ({
|
|
64
|
-
variant,
|
|
65
|
-
at: EFFORT_ORDER.indexOf(variant.effort),
|
|
66
|
-
}))
|
|
67
|
-
.filter((each) => each.at >= 0);
|
|
68
|
-
const exact = ranked.find((each) => each.at === wanted);
|
|
69
|
-
if (exact) return exact.variant;
|
|
70
|
-
const above = ranked
|
|
71
|
-
.filter((each) => each.at > wanted)
|
|
72
|
-
.sort((a, b) => a.at - b.at)[0];
|
|
73
|
-
if (above) return above.variant;
|
|
74
|
-
return ranked.sort((a, b) => b.at - a.at)[0]?.variant ?? null;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* An agent's tier: { level, because, score?, benchmark? }. `model` as its settings or the person's choice name it (a
|
|
79
|
-
* provider prefix is dropped), `effort` likewise; `auto` when Auto picks per run; `chosen` the person's own tier.
|
|
80
|
-
*/
|
|
81
|
-
export function tierOf({
|
|
82
|
-
model = null,
|
|
83
|
-
effort = null,
|
|
84
|
-
auto = false,
|
|
85
|
-
chosen = null,
|
|
86
|
-
}) {
|
|
87
|
-
if (TIERS.includes(chosen))
|
|
88
|
-
return { level: chosen, because: "the tier you set for it" };
|
|
89
|
-
if (auto)
|
|
90
|
-
return {
|
|
91
|
-
level: "unknown",
|
|
92
|
-
because:
|
|
93
|
-
"Auto picks its model for each run; choose a model for it or set its tier",
|
|
94
|
-
};
|
|
95
|
-
// The model's own name: no provider ("anthropic/"), no context mark ("[1m]"), no ":free", no release date.
|
|
96
|
-
const id = String(model ?? "")
|
|
97
|
-
.trim()
|
|
98
|
-
.toLowerCase()
|
|
99
|
-
.split("/")
|
|
100
|
-
.pop()
|
|
101
|
-
.replace(/\[[^\]]*\]$/, "")
|
|
102
|
-
.replace(/:[a-z0-9-]+$/, "")
|
|
103
|
-
.replace(/-20\d{6}$/, "");
|
|
104
|
-
const family = familyOf.get(id);
|
|
105
|
-
const named = String(effort ?? UNSET_EFFORT).toLowerCase();
|
|
106
|
-
const level = EFFORT_NAMES[named] ?? named;
|
|
107
|
-
const variant = family
|
|
108
|
-
? variantAt(
|
|
109
|
-
variants.get(family) ?? [],
|
|
110
|
-
EFFORT_ORDER.includes(level) ? level : UNSET_EFFORT
|
|
111
|
-
)
|
|
112
|
-
: null;
|
|
113
|
-
if (!variant)
|
|
114
|
-
return {
|
|
115
|
-
level: "unknown",
|
|
116
|
-
because: model
|
|
117
|
-
? `${model} is not on the ${SNAPSHOT.index} snapshot (${SNAPSHOT.fetched})`
|
|
118
|
-
: "its model is not known here",
|
|
119
|
-
};
|
|
120
|
-
return {
|
|
121
|
-
level: levelOf(variant.score),
|
|
122
|
-
score: variant.score,
|
|
123
|
-
benchmark: variant.name,
|
|
124
|
-
because: `${variant.name} scores ${variant.score} on the ${SNAPSHOT.index} (${SNAPSHOT.fetched}; top from ${SNAPSHOT.cutoffs.top}, bottom under ${SNAPSHOT.cutoffs.bottom})`,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/** Whether an agent at `level` may hold a role with this floor: top, middle (anything known not to be weak) or any. */
|
|
129
|
-
export function meetsFloor(level, floor = "any") {
|
|
130
|
-
if (floor === "top") return level === "top";
|
|
131
|
-
if (floor === "middle") return level !== "bottom";
|
|
132
|
-
return true;
|
|
133
|
-
}
|