Full configuration payload passed from the CLI to the server subprocess.
Serialized to/from DA_SERVER_* environment variables so that the server
graph (which runs in a separate Python interpreter) can reconstruct the
CLI's intent without sharing memory.
ServerConfig(
self,
model: str | None = None,
model_params: dict[str, Any] | None = None,
assistant_id: str = _DEFAULT_ASSISTANT_ID,
system_prompt: str | None = None,
auto_approve: bool = False,
interactive: bool = True,
enable_shell: bool = True,
enable_ask_user: bool = False,
enable_memory: bool = True,
enable_skills: bool = True,
sandbox_type: str | None = None,
sandbox_id: str | None = None,
sandbox_setup: str | None = None,
cwd: str | None = None,
project_root: str | None = None,
mcp_config_path: str | None = None,
no_mcp: bool = False,
trust_project_mcp: bool | None = None
)| Name | Type |
|---|---|
| model | str | None |
| model_params | dict[str, Any] | None |
| assistant_id | str |
| system_prompt | str | None |
| auto_approve | bool |
| interactive | bool |
| enable_shell | bool |
| enable_ask_user | bool |
| enable_memory | bool |
| enable_skills | bool |
| sandbox_type | str | None |
| sandbox_id | str | None |
| sandbox_setup | str | None |
| cwd | str | None |
| project_root | str | None |
| mcp_config_path | str | None |
| no_mcp | bool |
| trust_project_mcp | bool | None |
Serialize this config to a DA_SERVER_* env-var mapping.
None values signal that the variable should be cleared from the
environment (rather than set to an empty string), so callers can
iterate and set or clear each variable in os.environ.
Reconstruct a ServerConfig from the current DA_SERVER_* env vars.
This is the inverse of to_env() and is called inside the server
subprocess to recover the CLI's configuration.
Build a ServerConfig from parsed CLI arguments.
Handles path normalization (e.g. resolving relative MCP config paths against the user's working directory) so that the raw serialized values are always absolute and unambiguous.