Skip to main content

Crate trusty_console

Crate trusty_console 

Source
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 ServiceConnector implementations 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.rs to 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.
PortArgs
Arguments for trusty-console port.
ServeArgs
Arguments for trusty-console serve.

Enums§

Commands
Available subcommands.

Constants§

DEFAULT_HTTP
Default console HTTP bind address (used for both serve and port reporting).
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 port subcommand: print the console’s bound/default port and exit.
run_serve
Run the serve subcommand.