You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- SDK now connects as client (hegeld is the server)
- Removed HegelMode enum and mode-related functions
- Renamed set_embedded_connection to set_connection
- SDK waits for hegeld to start and initiates version negotiation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,16 +55,16 @@ hegel-rust/
55
55
56
56
### How It Works
57
57
58
-
The SDK spawns the `hegel` CLI as a subprocess with `--client-mode`. The test binary creates a Unix socket server, and hegel connects for each test case. The build script (`build.rs`) automatically installs Python and hegel into cargo's `OUT_DIR/hegel` via uv if not found on PATH.
58
+
The SDK creates a socket path and spawns the `hegel` CLI as a subprocess. Hegeld binds to the socket and listens for connections. The SDK then connects as a client, and a single persistent connection is maintained for the program run. Multiple tests can be executed over this connection. The build script (`build.rs`) automatically installs Python and hegel into cargo's `OUT_DIR/hegel` via uv if not found on PATH.
59
59
60
60
### Protocol
61
61
62
-
Each test case follows this handshake:
63
-
1.Hegel connects to the SDK's socket
64
-
2.Hegel sends: `{"is_last_run": bool}` (is_last_run=true on final replay for output)
65
-
3. SDK responds: `{"type": "handshake_ack"}`
66
-
4. SDK runs test, communicating via `generate`/`start_span`/`stop_span` commands
0 commit comments