Skip to content

Commit 045388d

Browse files
committed
docs(config): rewrite WorkspaceConfig + HardwareConfig doc comments for onboard clarity (zeroclaw-labs#5951)
The existing docstrings were shorthand for schema contributors ("Whether hardware access is enabled", "Transport mode", "Enable workspace isolation. Default: false.") and landed in onboard prompts where users had no other context. Rewrote the fields users actually encounter in `zeroclaw onboard workspace` / `onboard hardware`: workspace.enabled: explains what multi-workspace means (separate memory / secrets / audit per profile) and when to enable it. workspace.active_workspace / workspaces_dir / isolate_*: explains how each isolation knob scopes the profile vs the single-workspace default. hardware.enabled: "direct communication with physical hardware — GPIO, USB MCUs, JTAG" beats "Whether hardware access is enabled". hardware.transport: enumerates the native/serial/probe/none choices inline so the select's cryptic variant names read as "pick one of these". hardware.serial_port / baud_rate / probe_target / workspace_datasheets: same treatment — short, concrete, with per-platform / per-chip examples. No behavior change. Purely surfaces via the doc-comment capture wired up in the previous commit.
1 parent 8979fdd commit 045388d

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

crates/zeroclaw-config/src/schema.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -463,25 +463,25 @@ pub struct Config {
463463
#[cfg_attr(feature = "schema-export", derive(schemars::JsonSchema))]
464464
#[prefix = "workspace"]
465465
pub struct WorkspaceConfig {
466-
/// Enable workspace isolation. Default: false.
466+
/// Enable multi-workspace profiles — each named workspace gets its own memory / secrets / audit directories, isolated from the others. Leave disabled for single-workspace (default) mode where everything lives under `~/.zeroclaw/workspace`.
467467
#[serde(default)]
468468
pub enabled: bool,
469-
/// Currently active workspace name.
469+
/// Active workspace profile name. Required when multi-workspace is enabled; picks which `<workspaces_dir>/<name>/` directory ZeroClaw reads from and writes to.
470470
#[serde(default)]
471471
pub active_workspace: Option<String>,
472-
/// Base directory for workspace profiles.
472+
/// Parent directory holding all workspace profiles (one subdirectory per profile).
473473
#[serde(default = "default_workspaces_dir")]
474474
pub workspaces_dir: String,
475-
/// Isolate memory databases per workspace. Default: true.
475+
/// Isolate memory databases per workspace — each profile gets its own `brain.db` so conversation history doesn't bleed across profiles.
476476
#[serde(default = "default_true")]
477477
pub isolate_memory: bool,
478-
/// Isolate secrets namespaces per workspace. Default: true.
478+
/// Isolate secrets namespaces per workspace — provider API keys and channel tokens are scoped to the active profile.
479479
#[serde(default = "default_true")]
480480
pub isolate_secrets: bool,
481-
/// Isolate audit logs per workspace. Default: true.
481+
/// Isolate audit logs per workspace — each profile gets its own tool-call / channel-message audit trail.
482482
#[serde(default = "default_true")]
483483
pub isolate_audit: bool,
484-
/// Allow searching across workspaces. Default: false (security).
484+
/// Allow memory search to cross workspace boundaries. Off by default — turning this on defeats the point of isolation.
485485
#[serde(default)]
486486
pub cross_workspace_search: bool,
487487
}
@@ -780,22 +780,22 @@ impl std::fmt::Display for HardwareTransport {
780780
#[cfg_attr(feature = "schema-export", derive(schemars::JsonSchema))]
781781
#[prefix = "hardware"]
782782
pub struct HardwareConfig {
783-
/// Whether hardware access is enabled
783+
/// Enable direct communication with physical hardware — GPIO pins, USB-connected microcontrollers (Arduino, ESP32, Nucleo), or SWD/JTAG debug probes. Leave off for software-only use.
784784
#[serde(default)]
785785
pub enabled: bool,
786-
/// Transport mode
786+
/// How ZeroClaw reaches the hardware: `native` (direct GPIO on a Linux SBC like Raspberry Pi), `serial` (USB-tethered MCU at a path like `/dev/ttyACM0`), `probe` (SWD/JTAG debug probe via probe-rs), or `none` (disabled).
787787
#[serde(default)]
788788
pub transport: HardwareTransport,
789-
/// Serial port path (e.g. "/dev/ttyACM0")
789+
/// Serial device path for `transport = serial` (e.g. `/dev/ttyACM0` on Linux, `/dev/tty.usbmodem1`on macOS, `COM3` on Windows).
790790
#[serde(default)]
791791
pub serial_port: Option<String>,
792-
/// Serial baud rate
792+
/// Baud rate for the serial link. 115200 is the common Arduino / ESP32 default; bump to 230400+ for faster MCU comms.
793793
#[serde(default = "default_baud_rate")]
794794
pub baud_rate: u32,
795-
/// Probe target chip (e.g. "STM32F401RE")
795+
/// Target chip identifier for `transport = probe` (e.g. `STM32F401RE`, `nRF52840_xxAA`). Passed to probe-rs for flash/debug operations.
796796
#[serde(default)]
797797
pub probe_target: Option<String>,
798-
/// Enable workspace datasheet RAG (index PDF schematics for AI pin lookups)
798+
/// Index PDF schematics and datasheets from the workspace into a local RAG store so the agent can look up pin assignments and electrical specs inline.
799799
#[serde(default)]
800800
pub workspace_datasheets: bool,
801801
}

0 commit comments

Comments
 (0)