Expand description
trusty-console library entry point.
Why: Expose the console daemon’s startup sequence as a public run()
function so bundled shim binaries inside host crates (trusty-search,
trusty-memory, trusty-analyze, trusty-review, trusty-mpm) can call
trusty_console::run() without duplicating any logic. This mirrors the
exact pattern used by trusty-embedderd (bundled into trusty-search via
issue #187) and trusty-bm25-daemon (bundled into trusty-memory via PR #190).
What: Re-exports all public submodules and provides run_from(argv) as the
canonical library entry point that parses an explicit argv vector and
dispatches to subcommands; run() is a thin wrapper passing the process’s
global argv.
Test: cargo test -p trusty-console exercises the CLI parsing tests defined
in the submodules.
Modules§
- bind
- Bind-address resolution for trusty-console.
- connector
- ServiceConnector trait — the extensibility seam for all per-service adapters.
- console_
ui - The console’s own Svelte SPA, served from the binary at
/and/ui/. - detect
- Concrete
ServiceConnectorimplementations for trusty-search, trusty-memory, trusty-analyze, and trusty-review. - host_
status - Background whole-machine host-metrics sampler + cache for the console (#6517).
- mcp_
handle - Supervised stdio MCP connection to a local service (epic #1104 Phase 0b).
- metrics_
poller - Background metrics poller for supervised stdio MCP connections (epic #1104).
- poller
- Background health-poll cache for all registered daemon connectors.
- proxy
- Reverse-proxy module for trusty-console (#1849 Phase 2).
- routes
- HTTP route handlers extracted from
server.rsto keep that file under the 500-SLOC production cap. - search_
uds - trusty-console’s one client to trusty-search, over the daemon’s Unix socket (#6285).
- server
- Axum HTTP server for the trusty-console.
- service
- Handler for
trusty-console service(macOS launchd integration). - tools_
ui - The search dashboard SPA, served from the console under
/tools/search/. - webhook
POST /api/webhooks/{source}— the console’s webhook ingress (#5089 step 3).
Structs§
- Cli
- trusty-console: web dashboard for trusty services.
- Port
Args - Arguments for
trusty-console port. - Serve
Args - Arguments for
trusty-console serve.
Enums§
- Commands
- Available subcommands.
Constants§
- DEFAULT_
HTTP - Default console HTTP bind address (used for both serve and
portreporting). - DEFAULT_
PORT - Default console port, parsed once from
DEFAULT_HTTP.
Functions§
- resolve_
reported_ addr - Resolve the console’s reportable HTTP address (host, port).
- run
- Library entry point for the trusty-console daemon, using the process argv.
- run_
from - Library entry point parameterised on an explicit argv vector.
- run_
port - Run the
portsubcommand: print the console’s bound/default port and exit. - run_
serve - Run the
servesubcommand.