Skip to content

Transport-agnostic host client + cli/mcp --connect <url> resolver #123

@lxsaah

Description

@lxsaah

Follow-up to #39 / doc 041. Independent, pure-std PR; only useful once a second transport exists (#tcp / #serial), so sequence it after one of those lands.

Lets an operator pick the transport at runtime, mirroring the scheme:// form records already use for links.

Scope

  • aimdb-client: AimxConnection::connect_over(dialer: impl Dialer) (transport-agnostic entry point) + connect_url(url); keep connect(path) as connect_over(UdsDialer::new(path)).
  • A dial(url) -> Box<dyn Dialer> resolver mapping unix:// / tcp:// / serial:// (+ bare path, + legacy --socket) to the linked-in transport's Dialer; unknown scheme = clean startup error listing the built-ins.
  • aimdb-cli: --connect <url> flag (and --socket kept as unix:// shorthand).
  • aimdb-mcp: AIMDB_CONNECT env + config; connection pool re-keyed by URL instead of socket path.
  • Build-time menu = which transport crates the binary links in (default: uds + tcp + serial).

Verification

  • Resolver unit test: unix:// / tcp:// / serial:// / bare path / legacy --socket map to the right Dialer; unknown scheme rejected with a clear error.
  • Existing cli/mcp socket usage + mcp pool keep working unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions