Expand description
subc daemon attach — transport edge.
When AFT is launched as aft --subc <connection-file>, it does NOT run the
standalone NDJSON-over-stdin loop. Instead it connects to a running subc
daemon over loopback TCP, authenticates with the pre-envelope HMAC handshake
(subc-transport), then speaks the subc frame protocol (subc-protocol):
ModuleHello → HelloAck (register as a tool provider), then a channel-0
control loop (Ping/Pong, RouteBind) plus route-channel tool calls.
Concurrency: subc routes tool calls through the executor. The tokio
edge never dispatches against AppContext inline; per-actor executor lanes
own the reader/mutator epoch, while a writer task serializes outbound frames.
Enums§
Functions§
- run_
subc_ mode - Entry point for
aft --subc <connection-file>. Synchronous on the outside; owns an isolated current-thread tokio runtime for the async transport. ReturnsErr(fail-loud) on any connect/auth/protocol failure — we never fall back to the standalone loop, to avoid split-brain index state.
Type Aliases§
- Dispatch
Fn - Sync command dispatch, passed in from
main(the binary owns the command table). Invoked only inside executor jobs in subc mode.