scaffold: M0 skeleton + agent onboarding (build, architecture, progress)
Turn the design into a buildable, dependency-free M0 skeleton plus the
onboarding layer so a new agent can pick up instantly.
Build system:
- CMake + CMakePresets (dev = no deps; server-release = vcpkg) + vcpkg.json
- Skeleton builds with just a C++20 compiler; deps stay off until needed
- .gitattributes (LF), .gitignore, .clang-format
Core (libvoicecat):
- core/include/voicecat.h: full C ABI (the client/server contract), stubbed
- core/proto/voicecat.proto: control-plane wire format, matches docs/protocol.md
- src/{net,crypto,codec,protocol,session,audio,core}: subsystem stubs that
return VC_ERR_NOT_IMPLEMENTED, each pointing to its design doc
- server/ (voicecat-server) and tools/vccli/ link the core
- tests/: CTest smoke test asserting the C ABI contract (behavior, not just build)
- clients/{apple,windows}: M4 placeholders
Onboarding for agents:
- CLAUDE.md: hub — build/test commands, architecture at a glance, doc map, rules
- AGENTS.md: working method (behavior-driven; clean compile is the floor not the goal)
- PROGRESS.md: living tracker — M0 done, M1 task checklist, "where we left off"
Verified: cmake --preset dev && cmake --build --preset dev && ctest --preset dev → green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
39
core/src/net/transport.h
Normal file
39
core/src/net/transport.h
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* net/transport.h — TCP control channel + UDP media channel.
|
||||
*
|
||||
* Design: docs/architecture.md (Net thread), docs/protocol.md §1 (framing), docs/voice.md §2
|
||||
* (UDP frame). Implementation will use standalone Asio (one reactor) for sockets/timers.
|
||||
*
|
||||
* STATUS: M0 stub — interfaces only, no Asio yet.
|
||||
*/
|
||||
#ifndef VOICECAT_NET_TRANSPORT_H
|
||||
#define VOICECAT_NET_TRANSPORT_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace voicecat::net {
|
||||
|
||||
// Length-prefixed [u32 length][payload] framing over a TLS 1.3 byte stream (protocol.md §1).
|
||||
class TcpControlChannel {
|
||||
public:
|
||||
// TODO(M1): connect(host, port), TLS handshake, send/recv framed Envelopes.
|
||||
bool connected() const { return connected_; }
|
||||
|
||||
private:
|
||||
bool connected_ = false;
|
||||
};
|
||||
|
||||
// UDP media channel: encrypted voice frames (voice.md §2), bound to a session via token.
|
||||
class UdpMediaChannel {
|
||||
public:
|
||||
// TODO(M2): bind, send/recv AEAD-sealed voice frames, keepalive.
|
||||
bool bound() const { return bound_; }
|
||||
|
||||
private:
|
||||
bool bound_ = false;
|
||||
};
|
||||
|
||||
} // namespace voicecat::net
|
||||
|
||||
#endif // VOICECAT_NET_TRANSPORT_H
|
||||
Reference in New Issue
Block a user