refactor!: rebrand wraith to alknet
Rename all crates, CLI commands, constants, type names, doc comments, and documentation from wraith to alknet. Includes wire-protocol changes: ALPN wraith-ssh -> alknet-ssh, reserved destination prefix wraith- -> alknet-, SSH auth username wraith -> alknet.
This commit is contained in:
@@ -13,23 +13,23 @@ level: implementation
|
||||
|
||||
## Description
|
||||
|
||||
Implement the NAPI `connect()` function per ADR-007. This is fundamentally different from CLI `wraith connect`:
|
||||
Implement the NAPI `connect()` function per ADR-007. This is fundamentally different from CLI `alknet connect`:
|
||||
|
||||
- **NAPI `connect()`**: Opens a single SSH channel and returns it as a Node.js `Duplex` stream. No SOCKS5 server, no port forwarding. The caller reads and writes bytes directly.
|
||||
- **CLI `wraith connect`**: Full SSH client session with SOCKS5 server and port forwarding.
|
||||
- **CLI `alknet connect`**: Full SSH client session with SOCKS5 server and port forwarding.
|
||||
|
||||
The function accepts `WraithConnectOptions` and returns `Promise<Duplex>`. The NAPI layer handles transport selection, SSH authentication, and channel setup, then hands the caller a stream.
|
||||
The function accepts `AlknetConnectOptions` and returns `Promise<Duplex>`. The NAPI layer handles transport selection, SSH authentication, and channel setup, then hands the caller a stream.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] `#[napi]` function `connect(options: WraithConnectOptions) -> Result<DuplexStream>` in `crates/wraith-napi/src/connect.rs`
|
||||
- [ ] `WraithConnectOptions` struct with napi fields: `server`, `peer`, `transport`, `identity`, `tlsServerName`, `insecure`, `irohRelay`, `proxy`
|
||||
- [ ] `#[napi]` function `connect(options: AlknetConnectOptions) -> Result<DuplexStream>` in `crates/alknet-napi/src/connect.rs`
|
||||
- [ ] `AlknetConnectOptions` struct with napi fields: `server`, `peer`, `transport`, `identity`, `tlsServerName`, `insecure`, `irohRelay`, `proxy`
|
||||
- [ ] Transport creation from options (tcp, tls, iroh) — same logic as CLI but programmatic
|
||||
- [ ] SSH client connection: create transport stream, authenticate, open single `direct_tcpip` channel
|
||||
- [ ] Channel returned as `napi::DuplexStream` for JavaScript consumption
|
||||
- [ ] Key material: `identity` field accepts file path (string) or `Buffer` (in-memory data) per ADR-011
|
||||
- [ ] Error marshalling: Rust errors become JavaScript exceptions with descriptive messages
|
||||
- [ ] TypeScript type: `(options: WraithConnectOptions) => Promise<Duplex>`
|
||||
- [ ] TypeScript type: `(options: AlknetConnectOptions) => Promise<Duplex>`
|
||||
- [ ] Integration test from JS: connect to a test server, write/receive bytes through stream
|
||||
|
||||
## References
|
||||
|
||||
Reference in New Issue
Block a user