small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo

Outbound proxies #

The network settings section sends outbound connections directly or through a proxy, for everything or per service. sdk/network declares the section, parses its values, and resolves a service's route. core_settings registers it beside the daemon's other sections, so /config lists it under Tools. This is separate from the inbound OpenAI-compatible proxy.

Configure routes #

The section has four optional fields in extensions.json:

  • proxies names proxy URLs that routes can refer to.
  • proxy is the route for every service. Unset connects directly.
  • services maps a service id to a route that overrides proxy.
  • profiles maps a provider profile name to a route for that profile's model requests (generation, Fast and Daybreak checks, Codex image generation), overriding its extension's service route. Quota polls, sign-in, catalogs, and discovery share accounts across profiles and keep the service route.

A route is direct, a name from proxies, or a proxy URL with a scheme, host, and port:

  • socks5://host:port resolves the destination locally.
  • socks5h://host:port sends the destination hostname to the proxy.
  • http://host:port uses HTTP CONNECT, including for HTTP destinations.

A user, password, path, query, or fragment is refused. Proxy authentication is not supported. Setting a route does not start a proxy; it must already be reachable from the machine that connects.

{
  "network": {
    "proxies": { "tor": "socks5h://127.0.0.1:9050" },
    "proxy": "socks5h://127.0.0.1:1080",
    "services": { "models": "direct" },
    "profiles": { "work": "tor" }
  }
}

The service ids are discord, colab, mcp, models (the models.dev catalog), and each provider or search extension's id, such as claude, codex, openai, or exa; an unknown id is refused. Tool jobs, SSH commands, and the browser opened for OAuth are not routed.

Failures #

An invalid saved value or an unknown proxy name fails every routed call rather than connecting directly, and so does a proxy that refuses or cannot be reached. Destination TLS still verifies the certificate and hostname through the tunnel. Command-based quota feeds and AWS credential_process cannot honor a proxy, so they are refused under one.

Ownership #

network_context keeps the route for the calling process. routed(service, run) resolves and runs under a service's route; a spawned worker keeps its caller's route through carried. Do not set process-wide proxy environment variables or the global httpc proxy to route one service.

extension routes model provider requests, streams, catalogs, and search by extension id. Quota and oauth_flows route polls and sign-in exchanges the same way. openai_api/connect negotiates the tunnel before destination TLS, and pool keys distinguish routes. The Discord helper and Colab's SSH bridge get the route as ALBEDO_OUTBOUND_PROXY, read by albedo_plugins.proxy.