Files
wraith/tasks/meta/napi-layer.md

1.1 KiB

id, name, status, depends_on, scope, risk, impact, level
id name status depends_on scope risk impact level
meta/napi-layer Complete NAPI layer — project setup, connect(), serve() completed
napi/project-setup
napi/connect-function
napi/serve-function
moderate high phase planning

Description

Meta task that clusters NAPI tasks. Once complete, the @alkdev/wraith Node.js native addon provides connect() and serve() returning duplex streams for TypeScript consumers.

Acceptance Criteria

  • All NAPI tasks completed
  • connect() returns Duplex stream, no SOCKS5, no port forwarding
  • serve() returns WraithServer with close() and onConnection events
  • Key material from Buffer (in-memory) and file paths both work
  • JS-to-Rust and Rust-to-JS error marshalling works correctly

References

  • docs/architecture/napi-and-pubsub.md

Summary

NAPI layer complete. connect() returns WraithStream (read/write/close), serve() returns WraithServer with close()/onConnection(). Key material works from both file paths and in-memory Buffers. TCP transport fully supported; TLS/iroh return helpful errors in NAPI layer.