tryharness 0.2.0 → 0.3.0
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 +7 -4
- package/cli.mjs +7 -3
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -7,13 +7,16 @@ npx tryharness
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
Prints a short code — approve it in Harness (Settings, Connections, Connect a machine).
|
|
10
|
-
Then it sets up everything it finds on this machine: memory access
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
Then it sets up everything it finds on this machine: memory access, automatic sharing
|
|
11
|
+
for new sessions, accurate connection status, and task delegation for Claude Code,
|
|
12
|
+
Codex, pi, and opencode. Setup does not import old history, so it finishes quickly.
|
|
13
13
|
|
|
14
14
|
Other commands: `npx tryharness bridge` (start the task bridge again),
|
|
15
|
-
`npx tryharness
|
|
15
|
+
`npx tryharness sync --agent all` (explicitly import existing sessions),
|
|
16
16
|
`npx tryharness drain` (retry session reports that missed).
|
|
17
17
|
|
|
18
|
+
Use `npx tryharness --agent codex` (or another agent name) to connect only one
|
|
19
|
+
installed agent. Plain `npx tryharness` connects all detected agents.
|
|
20
|
+
|
|
18
21
|
No tokens to copy: approval releases the credential directly to the waiting command.
|
|
19
22
|
Everything your agents share stays between your machine and your browser.
|
package/cli.mjs
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
// lacks a built-in WebSocket (added in Node 22), the bundled `ws` package fills it in,
|
|
6
6
|
// which is why scripts run IN-PROCESS here instead of being spawned. Commands:
|
|
7
7
|
// npx tryharness pair this machine + set up every detected agent
|
|
8
|
+
// npx tryharness --agent codex set up only one detected agent
|
|
8
9
|
// npx tryharness bridge start the task bridge (after pairing)
|
|
9
|
-
// npx tryharness
|
|
10
|
+
// npx tryharness sync explicitly import existing agent sessions
|
|
10
11
|
// npx tryharness drain retry any session reports that missed
|
|
11
12
|
import fs from "node:fs";
|
|
12
13
|
import path from "node:path";
|
|
@@ -17,6 +18,7 @@ const HARNESS_DIR = path.join(os.homedir(), ".harness");
|
|
|
17
18
|
const COMMANDS = {
|
|
18
19
|
connect: { file: "connect.mjs", args: [] },
|
|
19
20
|
bridge: { file: "bridge.mjs", args: [] },
|
|
21
|
+
sync: { file: "report-session.mjs", args: ["--backfill"] },
|
|
20
22
|
backfill: { file: "report-session.mjs", args: ["--backfill"] },
|
|
21
23
|
drain: { file: "report-session.mjs", args: ["--drain"] },
|
|
22
24
|
};
|
|
@@ -25,7 +27,7 @@ const argv = process.argv.slice(2);
|
|
|
25
27
|
const sub = argv[0] && !argv[0].startsWith("-") ? argv.shift() : "connect";
|
|
26
28
|
const command = COMMANDS[sub];
|
|
27
29
|
if (!command) {
|
|
28
|
-
console.error("unknown command: " + sub + " (try: connect | bridge |
|
|
30
|
+
console.error("unknown command: " + sub + " (try: connect | bridge | sync | drain)");
|
|
29
31
|
process.exit(1);
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -41,7 +43,9 @@ const origin = (originIndex !== -1 && argv[originIndex + 1] ? argv[originIndex +
|
|
|
41
43
|
const dest = path.join(HARNESS_DIR, command.file);
|
|
42
44
|
fs.mkdirSync(HARNESS_DIR, { recursive: true });
|
|
43
45
|
try {
|
|
44
|
-
|
|
46
|
+
// 15s cap: a fetch that dials the server mid-restart can otherwise hang forever
|
|
47
|
+
// with zero output. On timeout the cached copy runs, same as any other fetch failure.
|
|
48
|
+
const res = await fetch(origin + "/" + command.file, { signal: AbortSignal.timeout(15000) });
|
|
45
49
|
if (!res.ok) throw new Error("HTTP " + res.status);
|
|
46
50
|
fs.writeFileSync(dest, await res.text());
|
|
47
51
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tryharness",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Connect
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Connect Claude Code, Codex, opencode, and pi to Harness memory, session history, status, and delegated tasks.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"tryharness": "cli.mjs"
|
|
7
7
|
},
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
"keywords": [
|
|
17
17
|
"harness",
|
|
18
18
|
"coding-agents",
|
|
19
|
-
"claude-code"
|
|
19
|
+
"claude-code",
|
|
20
|
+
"codex",
|
|
21
|
+
"opencode",
|
|
22
|
+
"pi"
|
|
20
23
|
],
|
|
21
24
|
"homepage": "https://tryharness.ai",
|
|
22
25
|
"license": "MIT",
|