v1 plan: peer-to-peer support/ticketing built on hero_collab snapshot #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v1 plan — hero_assistance
Master tracking issue. SSOT for the v1 plan; supersedes prior chat. v1 is production-grade for real customers, not a demo.
Summary
A peer-to-peer support/ticketing system for the Hero stack. Two OpenRPC services in one monorepo, built by snapshot-copying hero_collab and pruning. Many-to-many topology — a client subscribes to multiple project servers; a server hosts multiple users (customers + support agents).
hero_assistance_server— one per customer-project. SQLite, OpenRPC, mycelium-bound TCP listener. Owns tickets, threaded messages, image attachments, and presence for that project.hero_assistance_client— a library crate with a thin standalone binary wrapper. Embeddable as a "Support" tab in any project's existing UI, or run standalone for users juggling multiple projects.Specs (chat 2026-04-27)
Architecture
Three-layer identity
A user has one account keyed on email. Multiple devices per user; each generates its own mycelium identity. Server-side
device_bindingstable maps mycelium_addr → user_id. Sales pre-enrolls customers by email; first connection from any device receives a magic link to bind that device.Transport
Mycelium-IPv6. Server binds an Axum listener to the host's mycelium TUN IPv6 (queried at startup via mycelium RPC
get_info()→node_subnet). On accept,peer_addr.ip()is the cryptographically-authenticated peer device address — mycelium's daemon validates source addresses at the network layer; no userspace HMAC needed. Standalone client bundles a mycelium daemon as a subprocess (detects + reuses an existing system mycelium UDS if present; otherwise spawns its own with a per-app data directory). Mycelium identity (key) generated on first run, stored under~/.local/share/hero_assistance/mycelium/.Storage
SQLite, inherited from hero_collab. New tables:
users { id, email PRIMARY, display_name, role, status, created_at }device_bindings { mycelium_addr PRIMARY, user_id FK, device_label, bound_at, last_seen }Existing collab tables retained: messages, threads, attachments, presence — semantically remapped to tickets/comments/etc.
Crate layout
Locked decisions
CallerIdentity{user_id, device_addr, role}newtype from day 1. Identity boundary is the single function at hero_collabmain.rs:210–249; ~15 call sites updated.Limitations accepted
Explicitly deferred — NOT in v1
None of these were in the original spec; all are real, all post-v1:
hero-assist://...)Phase plan
/bootstrap); D-01..D-05 + L-01..L-02 written; initial repo skeleton committedCallerIdentitynewtype,users+device_bindingsschema, magic-link enrollment RPC, ~15 call sites updatedpeer_addrextraction middlewareviewing_ticket_idTotal: ~17–19 working days (~3.5 weeks). Some phases can overlap.
v1 acceptance criteria
Demonstrable on real cross-host machines:
bash scripts/start.shexits 0.Risks / known unknowns
Methodology
This project uses the ai-pipeline v1 multi-session workflow. Local workspace at
/home/pctwo/Documents/temp/assistance_work/. After this issue is filed,/bootstrapruns in the workspace; D-01..D-05 + L-01..L-02 lift intodecisions/andlimitations/files. Each phase above corresponds to one or more sessions;prompt.md §3carries the next-session entry point.Branching & commits
Hero conventions: default branch
development; feature branchesdevelopment_<name>(underscores); squash-merge back todevelopment. Conventional-commit messages with absolute issue URL reference; no AI attribution.