btv.connect
btv.connect.register(scheme_or_matcher, resolver)
btv.connect.register(scheme_or_matcher, resolver) — register a connector.
scheme_or_matcher— either a scheme string ("container","ssh"), matched against the URL’sscheme://prefix, or a matcher functionfn(url) -> booleanfor host-pattern routing (e.g. only*.internalhosts).resolver—fn(url) -> spec. It resolvesurlto a session-swap spec (the tablebtv.session.reconnecttakes:{ transport = …, config_source = …, keep_buffers = … }).spec.config_source(§D) picks whose config the swapped session runs —"remote"(default; the daemon’s config + plugins) or"local"(this machine’s config, the daemon backing only the seams — the dev-container shape). It MAY provision asynchronously — return a promise that fulfils with the spec — and MAY stream progress withbtv.notify(“detecting arch…”, “starting daemon…”).
Registering the same scheme twice keeps both; the later wins (reverse scan in _resolve).
Fails LOUD on a bad argument (a mistyped registration is a bug, not a silent no-op).
Defined in connect.lua.
btv.connect.connect(url)
btv.connect.connect(url) — the :connect entry point (also callable directly). Route
url through the provider registry: a matching resolver runs (async-aware) and its spec
swaps the window (§B); with no provider, hand url to the client’s built-in direct dial.
A resolver error / a non-spec return surfaces LOUD (a message), leaving the session intact
— the swap only happens once a valid spec resolves.
Defined in connect.lua.