pub struct WorkspaceConfig {
pub kind: WorkspaceKind,
pub root: Option<String>,
pub watch: bool,
pub applies_to: Option<AppliesTo>,
}Fields§
§kind: WorkspaceKind§root: Option<String>Local-mode only: path to the directory to bind as the source root. Relative paths resolve against the YAML’s parent dir.
watch: boolLocal-mode only: wire the framework’s file watcher to root
(debounced rebuild trigger via the post-activate hook).
applies_to: Option<AppliesTo>Optional opt-in for the find_workspace_manifest parent-walk
fallback. When set, this manifest is auto-discovered by
mcp-server --workspace DIR (and similar callers) only when
the operator’s DIR matches the declaration here. When
unset, the parent-walk fallback NEVER fires for this manifest
— operators must pass --mcp-config explicitly.
Values are glob patterns matching the workspace dir’s basename (single-segment match — parent-walk is always single-level). Three forms:
- Single pattern (
./repos,repos,*,a*,prod-?): match against the workspace dir’s basename. Literal strings likereposmatch onlyrepos; glob patterns like*orprod-*match any name fitting the pattern. - List of patterns (
[./repos, ./clones],[prod-*, test-*]): match if any pattern matches. Useful for curated subsets or multiple naming conventions in one manifest.
Leading ./ is optional and stripped at parse time. Patterns
must be single-segment — ./a/b is rejected. Invalid glob
syntax is rejected at parse time.
Eliminates the accidental-discovery footgun where a workspace manifest is auto-picked-up by an unrelated sibling dir. The manifest’s own declaration is the opt-in.
Trait Implementations§
Source§impl Clone for WorkspaceConfig
impl Clone for WorkspaceConfig
Source§fn clone(&self) -> WorkspaceConfig
fn clone(&self) -> WorkspaceConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more