Commit Graph

62 Commits

Author SHA1 Message Date
Michael Mikovsky 99d1097f2a Add root-default endpoint creation macro 2026-04-26 15:36:45 -06:00
Michael Mikovsky 54c44b407e Remove the old leaf declaration path
Delete the deprecated Leaf derive path, migrate the remaining tests and example to leaf!, and add direct coverage for endpoint-only, TUI-only, and shared-host leaf declarations.
2026-04-26 14:14:49 -06:00
Michael Mikovsky bc22d349bf Add compile-time leaf declarations
Introduce a function-like leaf declaration macro, bind endpoint and TUI hosts to shared generated metadata, and move remote shell endpoint construction out of the leaf module into the examples and runtime assembly code.
2026-04-26 13:54:44 -06:00
Michael Mikovsky 4f8835bd25 Fix examples for renamed leaf endpoint surface
Update the remote shell examples to use unshell::leaves and the leaf_endpoint feature-gated endpoint module, and restore the local macro aliasing needed after removing the direct unshell dependency from unshell-leaves.
2026-04-26 12:57:56 -06:00
Michael Mikovsky d4100d0604 Split protocol and leaf surfaces into crates
Move the protocol runtime into unshell-protocol and remote shell leaf code into unshell-leaves so endpoint and TUI roles can compile independently without circular dependencies.
2026-04-26 12:39:06 -06:00
Michael Mikovsky 74f08333ae Split unshell macros into focused modules 2026-04-26 12:08:34 -06:00
Michael Mikovsky 2b753685ca Document examples and add local remote shell endpoint demo 2026-04-26 11:25:46 -06:00
Michael Mikovsky f332e58e44 Deepen protocol docs and explain runtime flow 2026-04-26 11:18:49 -06:00
Michael Mikovsky 17be0f9daa Improve protocol documentation and runtime structure 2026-04-26 01:53:37 -06:00
Michael Mikovsky 01faebc44b Remove hook-path micro-optimizations 2026-04-26 01:34:51 -06:00
Michael Mikovsky 7a9e338d68 Collapse local procedure lookup into one pass 2026-04-26 01:18:59 -06:00
Michael Mikovsky a043d9747d Shortcut pending hook activation on first data 2026-04-25 23:45:17 -06:00
Michael Mikovsky e50ebb1e35 Reuse host hook keys during inbound hook resolution 2026-04-25 23:42:28 -06:00
Michael Mikovsky 090c2740f8 Simplify hook state and preallocate frame encoding 2026-04-25 22:42:45 -06:00
Michael Mikovsky 80611a4d74 Avoid cloning call payloads in runtimes 2026-04-25 21:14:02 -06:00
Michael Mikovsky 31a0bd39b0 Simplify endpoint outcome state handling 2026-04-25 20:47:37 -06:00
Michael Mikovsky f2c6a54060 Optimize framed packet encoding 2026-04-25 20:41:02 -06:00
Michael Mikovsky 25988de1e1 Optimize framed packet encoding 2026-04-25 19:03:08 -06:00
Michael Mikovsky 7bea3e2b6b Add procedure-scoped stateful leaves 2026-04-25 17:42:39 -06:00
Michael Mikovsky 5e9b49a4d9 Split remote shell leaf module 2026-04-25 16:27:10 -06:00
Michael Mikovsky 7e266e2a38 Add stateful call leaf runtime 2026-04-25 15:35:08 -06:00
Michael Mikovsky b1ebe34ec1 Add derive-based protocol leaf declarations 2026-04-25 14:41:00 -06:00
Michael Mikovsky 9895248bbf Clarify tree protocol runtime and routing
Document the hook lifecycle, ingress rules, and longest-prefix routing behavior so the tree endpoint code is easier to follow. Keep the pass behavior-neutral while tightening local names and comments around non-obvious protocol paths.
2026-04-25 13:34:18 -06:00
Michael Mikovsky 412960203c Align frame header and extend benchmark driver
Align the framed header section so decode can avoid hidden alignment repair on the hot path, and teach protocol_bench.rs to build and run the standalone tracing binaries directly. The updated benchmark shows lower encode, decode, forward, local call, and hook data costs than the previous baseline.
2026-04-25 13:28:20 -06:00
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 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 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 c1a7a19c58 Update builders.rs 2026-04-24 17:45:04 -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 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
Michael Mikovsky 959ea469a8 Fix bug in proc_impl_switcher.rs 2026-04-20 23:14:07 -06:00
Michael Mikovsky 512823585f Fix core dump bug in tree path search 2026-03-18 12:01:21 -06:00
Michael Mikovsky 95d335a271 Add tree type 2026-03-17 17:29:36 -06:00
Michael Mikovsky f3a59f5082 Convert to no_std, add request type 2026-03-17 16:40:05 -06:00
Michael Mikovsky 3a5605bc0d Remove error type 2026-03-17 15:15:37 -06:00
Michael Mikovsky 2c3962fa99 Remove warnings from unused colors. 2026-03-04 12:22:23 -07:00
Michael Mikovsky 07e3f83bcf Put logging time behind log_debug 2026-03-04 10:00:06 -07:00
Michael Mikovsky 76eb533911 Fix error in pretty logger. 2026-03-04 09:30:27 -07:00