Commit Graph

188 Commits

Author SHA1 Message Date
Michael Mikovsky 4f0042411d Add straceable protocol operation binaries
Factor the benchmark scenarios into standalone example binaries that can be traced directly without cargo run, and simplify the hot call and hook lookup paths using the benchmark output as guidance.
2026-04-25 12:56:29 -06:00
Michael Mikovsky 16164354e3 Update protocol_bench.rs 2026-04-25 12:45:46 -06:00
Michael Mikovsky 1f70f99ba6 Add protocol benchmark example
Measure representative protocol paths in nanoseconds over hundreds of samples and report standard deviation so framing, routing, and local-delivery changes can be compared with less jitter.
2026-04-25 12:45:23 -06:00
Michael Mikovsky 4a131e6b63 Reformat lines. 2026-04-25 12:41:10 -06:00
Michael Mikovsky 080f55ddd3 Rebuild protocol runtime from scratch
Implement an aligned two-section frame format, a compiled prefix router, a minimal pending and active hook engine, and a header-first receive path that only decodes payloads on local delivery. Recreate the protocol-focused test suite and document the explicit framing deviation in src/protocol/PROTOCOL_CHANGES.md.
2026-04-25 12:37:54 -06:00
Michael Mikovsky 3d92b5cf0d Rewrite protocol flow around compiled routing
Compile routing prefixes once per endpoint, restore minimal pending-to-active hook transitions, and route call/data/fault packets from the header before decoding payloads for local delivery only. Document the remaining protocol-level pressure points in src/protocol/PROTOCOL_CHANGES.md.
2026-04-25 12:15:38 -06:00
Michael Mikovsky 62b22be39f Simplify hook runtime state
Remove the unused pending-hook layer and dead protocol trait wrappers, and resolve active hooks through a direct active-only flow with peer-side indexing instead of scan-based recovery.
2026-04-25 11:57:37 -06:00
Michael Mikovsky 7b5b148ef3 Reduce protocol packet-flow allocations
Replace vector-backed endpoint outcomes with single-action results, skip payload deserialization on forwarded data and faults, and route local call and data emissions without encode/decode roundtrips.
2026-04-25 11:46:45 -06:00
Michael Mikovsky 792eb28457 Add back minimize profile 2026-04-25 11:36:10 -06:00
Michael Mikovsky 6bdf59c5c9 Align protocol runtime with spec boundaries
Move demo leaf echo behavior out of the core protocol runtime, treat procedure IDs as opaque protocol fields, and return direct registered children in endpoint introspection to match the spec.
2026-04-25 11:27:29 -06:00
Michael Mikovsky ba3f28a78c Improve Rust code clarity across the workspace
Document public APIs and non-obvious control flow so the protocol, simulator, and macro crates are easier to follow. Tighten a few helper paths and feature gates while preserving behavior and keeping the workspace warning-free.
2026-04-25 11:11:19 -06:00
Michael Mikovsky f49af7fa22 Delete documented_rust_file.rs 2026-04-25 10:58:09 -06:00
Michael Mikovsky a7fdd63790 Clean up some of the root files. 2026-04-25 10:55:49 -06:00
Michael Mikovsky 5192b83c53 add documented rust file example 2026-04-25 10:49:09 -06:00
Michael Mikovsky cc83acd0d1 Update README.md 2026-04-24 22:48:08 -06:00
Michael Mikovsky 655026dee6 Move LICENCE to LICENCE.md 2026-04-24 22:32:12 -06:00
Michael Mikovsky 9262e27094 Add banner and logo 2026-04-24 22:27:26 -06:00
Michael Mikovsky 10f1aa52a7 Update PROTOCOL.md 2026-04-24 19:25:27 -06:00
Michael Mikovsky b38d9d2149 finish treetest documentation sweep 2026-04-24 18:30:44 -06:00
Michael Mikovsky 9e74f6d6f3 Update CLAUDE.md 2026-04-24 17:49:15 -06:00
Michael Mikovsky c1a7a19c58 Update builders.rs 2026-04-24 17:45:04 -06:00
Michael Mikovsky 5a5323514b document remaining treetest modules 2026-04-24 17:44:13 -06:00
Michael Mikovsky ef62befe9a expand treetest documentation and rationale 2026-04-24 17:34:05 -06:00
Michael Mikovsky 943c820f30 further split treetest modules and docs 2026-04-24 17:21:39 -06:00
Michael Mikovsky 539d98a9e9 refactor treetest into documented modules 2026-04-24 17:02:54 -06:00
Michael Mikovsky 18cdefaefb add realistic root knowledge mode to treetest 2026-04-24 16:46:56 -06:00
Michael Mikovsky de3a7d3381 refactor treetest app into ui modules 2026-04-24 16:22:17 -06:00
Michael Mikovsky 2b633ce019 add treetest protocol simulator and ui 2026-04-24 16:19:42 -06:00
Michael Mikovsky 555663bd3d refactor: split logger into focused modules 2026-04-24 14:32:59 -06:00
Michael Mikovsky 11674bae8f Add newlines and reformat for better code quality 2026-04-24 14:27:55 -06:00
Michael Mikovsky fc8638d014 refactor: split protocol endpoint into focused modules 2026-04-24 14:25:35 -06:00
Michael Mikovsky 71afc49ac9 fix: remove panics from handle_introspection 2026-04-24 14:15:40 -06:00
Michael Mikovsky 3f1116c26a Improve protocol implementation. 2026-04-24 14:10:03 -06:00
Michael Mikovsky 49901b6370 Reorganize protocol. 2026-04-24 13:37:30 -06:00
Michael Mikovsky dcf0fe230b Work on implementing the protocol. 2026-04-24 12:32:24 -06:00
Michael Mikovsky 275f6c4ba2 Remove some redundency. 2026-04-23 22:39:01 -06:00
Michael Mikovsky 24e84084ac Fix 5. 2026-04-23 22:28:52 -06:00
Michael Mikovsky fd5916b65a Fix 4. 2026-04-23 22:17:49 -06:00
Michael Mikovsky 8d2f22cab9 Fix 3. 2026-04-23 22:09:25 -06:00
Michael Mikovsky 5213f38680 Fix some more clairity 2026-04-23 22:01:35 -06:00
Michael Mikovsky cc61d297de Some improvements. 2026-04-23 21:47:20 -06:00
Michael Mikovsky 351bf8f5ae Combine end and cancel since hook and stream are combined. 2026-04-23 20:00:49 -06:00
Michael Mikovsky 43b182468b Merge streams and hooks. 2026-04-23 15:55:38 -06:00
Michael Mikovsky 1fe6275169 Improve clarity of PROTOCOL.md 2026-04-23 15:36:27 -06:00
Michael Mikovsky 6c91b40441 Add revision 2026-04-23 06:36:39 -06:00
Michael Mikovsky 717f5332e8 Update PROTOCOL.md 2026-04-22 21:39:08 -06:00
Michael Mikovsky d0ca53f5c7 Working network test 2026-04-22 13:12:25 -06:00
Michael Mikovsky cd301dea67 Add documentation to treetest 2026-04-22 10:25:03 -06:00
Michael Mikovsky 1af134104e Add TreeTest 2026-04-22 10:03:24 -06:00
Michael Mikovsky fcb3b2be17 feat: complete protocol spec and initial implementation
- Write PROTOCOL.md with full wire format spec and 8 real-world scenario
  analyses (reconnect, multi-operator, large files, AV evasion, router crash,
  malformed packets, future pivoting)

- Rewrite workspace structure:
  - unshell lib: protocol types (PacketHeader, TreeRequest/Response,
    HandshakeMessage/Ack), Transport trait, TcpTransport, Tree routing
  - ush-router: router binary with per-node threads, NodeRegistry with
    longest-prefix path matching, packet relay
  - ush-payload: implant binary with reconnect loop, module tree, InfoModule
  - ush-cli: operator REPL with rustyline, session management, command parser

- Protocol design: two-part rkyv frame [header][payload]; router reads only
  header for routing, payload bytes forwarded opaque

- All code documented with doc comments and examples
- Zero warnings, zero errors across entire workspace
- 32 tests pass (unit tests for tree routing, TCP transport, framing,
  command parsing, node registry)
2026-04-20 23:38:02 -06:00