Add 10 new tasks under tasks/architecture/ for Phase 0a (ADR writing): - 9 ADR tasks (026-034) with dependency-ordered structure - 1 review checkpoint task before Phase 0b spec writing ADR dependency graph (3 generations): Gen 1 (parallel): 026, 029, 030, 031, 032, 034 Gen 2 (depends on 029): 027, 028 Gen 3 (depends on 027+028): 033 Gen 4: review checkpoint Also mark all 34 prior implementation tasks as completed — they were finished but still showing as pending in the taskgraph.
2.3 KiB
2.3 KiB
id, name, status, depends_on, scope, risk, impact, level
| id | name | status | depends_on | scope | risk | impact | level | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| client/connect-options | Implement ConnectOptions struct and client session orchestration with graceful shutdown | completed |
|
moderate | medium | component | implementation |
Description
Implement ConnectOptions — the programmatic configuration struct (ADR-011) for the client — and the top-level client session orchestrator that ties together transport, channel manager, SOCKS5 server, and port forwards.
The client session lifecycle:
- Create transport based on
ConnectOptions - Connect transport, authenticate SSH session
- Start SOCKS5 server
- Start port forward listeners
- Run until SIGTERM/SIGINT or fatal error
- Graceful shutdown
Graceful shutdown (SIGTERM/SIGINT):
- Stop accepting new SOCKS5 connections and port forward connections
- Send SSH disconnect message to server
- Wait for in-flight data to drain (~2 second timeout)
- Close transport stream
- Exit
Acceptance Criteria
crates/alknet-core/src/client/mod.rsre-exports all client componentsConnectOptionsstruct with fields matching client.md CLI interface:server,peer,transport_mode,identity,socks5_addr,forwards,remote_forwards,proxy,iroh_relay,tls_server_name,insecureConnectOptions::identityacceptsKeySource(file or in-memory)ClientSession::new(opts: ConnectOptions) -> Result<Self>— creates transport, connects, authenticatesClientSession::run()— starts SOCKS5 server, port forwards, waits for shutdown signal- SOCKS5 is always enabled when running (per constraint)
- Port forwards are optional and started based on
ConnectOptions ClientSession::shutdown()— graceful shutdown: stop accepting, send SSH disconnect, drain timeout, close- SIGTERM/SIGINT handled via tokio signal
- Integration test: full client-to-server session via mock transport, SOCKS5 proxy works, shutdown completes
References
- docs/architecture/client.md — full client spec, CLI interface, graceful shutdown
- docs/architecture/decisions/011-no-ssh-config-programmatic-api.md — ConnectOptions programmatic struct
Notes
To be filled by implementation agent
Summary
To be filled on completion