Skip to main content

Module launch

Module launch 

Source
Expand description

Handing the terminal over to the agent.

Re-exports§

pub use crate::agents::via_gateway::shell_quote;

Structs§

Prepared
A gateway session ready to start.

Functions§

exec_agent
Replace this process with the agent, so the terminal, signals and exit code are the agent’s. Returns only by exiting: 127 when the executable cannot be started.
gateway_setting_env
The environment variable that gives the gateway setting key of the user config, for when the file cannot be written.
gateway_settings_hint
Where the gateway’s settings are made, for somebody whose gateway is not ready or who wants another one.
gateway_summary
What visdom init set up for the gateway, and where each setting comes from.
key_helper_command
The command a launched agent runs to get its gateway key: this visdom, asked for the key of one console and project.
key_http_client
The HTTP client for getting a key: the agent does not start without it, so it may take longer than a check.
launch_error_message
What to tell the user when the agent’s executable cannot be started.
no_model
Why there is no model alias for agent to ask the gateway for, and what to set: without one the agent asks for its own default, which a project’s allow-list of aliases does not have.
prepare_gateway
Everything the agent needs to run through the gateway: the developer’s key (the kept one, or a new one), a model alias and the ids that attribute the session. The second value holds what the developer should know (no model alias to ask for).
usable_model
Whether model is one the agent can ask the gateway for: an alias the key may call. Err says what is wrong and what to set — no alias at all (no_model), or one (set at source) that the project does not have.