pub struct ServerOptions {
pub name: Option<String>,
pub instructions: Option<String>,
pub source_roots: Option<SourceRootsProvider>,
pub default_repo: Option<RepoProvider>,
pub workspace: Option<Workspace>,
pub builtins: BuiltinsConfig,
}Expand description
Per-server runtime state shared by every tool dispatch.
Fields§
§name: Option<String>Server display name surfaced via initialize.
instructions: Option<String>Free-form text shown to the agent at session start.
source_roots: Option<SourceRootsProvider>Dynamic provider returning the active source roots, if any.
None disables the source tools entirely.
default_repo: Option<RepoProvider>Dynamic provider returning the active GitHub repo (org/repo).
When None, github tools require a per-call repo_name= arg.
workspace: Option<Workspace>Workspace handle (when --workspace mode is active).
builtins: BuiltinsConfigManifest-declared builtins: block. Surfaced verbatim so
downstream consumers (kglite’s graph_overview tool, for
example) can read temp_cleanup / save_graph settings and
implement the corresponding behaviour without re-parsing YAML.
Implementations§
Source§impl ServerOptions
impl ServerOptions
pub fn from_manifest(manifest: Option<&Manifest>, fallback_name: &str) -> Self
pub fn with_static_source_roots(self, roots: Vec<String>) -> Self
pub fn with_dynamic_source_roots(self, provider: SourceRootsProvider) -> Self
pub fn with_static_repo(self, repo: String) -> Self
pub fn with_dynamic_repo(self, provider: RepoProvider) -> Self
Sourcepub fn with_workspace(self, ws: Workspace) -> Self
pub fn with_workspace(self, ws: Workspace) -> Self
Bind a workspace handle. Source roots and default repo become
dynamic — both are read from the workspace’s active-repo state
at every tool call, so repo_management swapping the active
repo immediately re-points the source tools.
Trait Implementations§
Source§impl Clone for ServerOptions
impl Clone for ServerOptions
Source§fn clone(&self) -> ServerOptions
fn clone(&self) -> ServerOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more