@gethmy/harness 1.0.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 ADDED
@@ -0,0 +1,66 @@
1
+ # @gethmy/harness
2
+
3
+ Execution motor for [Harmony](https://gethmy.com) playbook stages.
4
+
5
+ The motor runs **exactly one stage per invocation**, then exits. It sets up the
6
+ worktree, dispatches the stage's subagent under that stage's `role`, places and
7
+ runs a held oracle when the gate asks for one, collects the gate's evidence, and
8
+ prints what it did as newline-delimited JSON.
9
+
10
+ It deliberately does **not** decide anything. Harmony routes and advances;
11
+ `gateEvaluate` in `@harmony/shared` turns evidence into a verdict. The motor
12
+ never routes, never judges, never pushes.
13
+
14
+ A *driver* invokes it. Today the drivers are `@gethmy/agent` (unattended) and the
15
+ `hmy` skill (interactive). Installing this package on its own is useful only if
16
+ you are building a driver.
17
+
18
+ ## Prerequisites
19
+
20
+ - [Node.js](https://nodejs.org) >= 20 or [Bun](https://bun.sh) >= 1.0
21
+ - Git
22
+ - A [Harmony](https://gethmy.com) account with an API key
23
+ - [Claude Code](https://docs.anthropic.com/en/docs/claude-code) available to the
24
+ agent SDK
25
+
26
+ ## Configuration
27
+
28
+ Two environment variables, and nothing else. Both are required; the motor
29
+ refuses to start without either, naming the one that is missing rather than
30
+ failing later with a 401.
31
+
32
+ | Variable | What it is |
33
+ |---|---|
34
+ | `HARMONY_API_URL` | The Harmony API **base** URL, e.g. `https://app.gethmy.com/api`. The motor appends `/v1` per request, so do not include it. A trailing slash is trimmed. |
35
+ | `HARMONY_API_KEY` | A Harmony API key, or an OAuth access token (one starting with `hmy_at_`). Sent as the `X-API-Key` header — the same header `@gethmy/mcp` uses. |
36
+
37
+ ```bash
38
+ export HARMONY_API_URL="https://app.gethmy.com/api"
39
+ export HARMONY_API_KEY="…"
40
+ ```
41
+
42
+ Generate a key with the `harmony_generate_api_key` tool on the Harmony MCP
43
+ server, or from your account settings in Harmony.
44
+
45
+ > These two variables are **credentials**. A stage whose `role` is `implementer`
46
+ > is launched with both stripped from its environment — see `src/runner.ts` for
47
+ > exactly what that does and does not close.
48
+
49
+ ## CLI
50
+
51
+ ```bash
52
+ harmony-harness stage run \
53
+ --card <card-id> \
54
+ --stage <stage-id> \
55
+ --workspace <workspace-id> \
56
+ --repo <path-to-worktree> \
57
+ --session <agent-session-id>
58
+ ```
59
+
60
+ Every flag is required. `--stage` must match the card's `current_stage`: the
61
+ motor refuses to collect evidence for a stage the card is not on, and refuses a
62
+ stage whose `owner` is `human`.
63
+
64
+ Output is one JSON object per line on stdout — motor events, then a `result`
65
+ object. Diagnostics go to stderr. A driver parses stdout; a human reads the
66
+ driver's rendering of it.