Development

August 6, 2026 · View on GitHub

Checks

The same commands CI runs:

# Format, lint, and documentation
cargo fmt --all -- --check
cargo clippy --locked --all-features -- -D warnings
cargo doc --locked --no-deps --workspace

# Test
cargo test --locked --workspace

# Supply chain
cargo deny check

CI also runs buf lint and buf format --diff --exit-code from crates/schema/proto/.

Integration tests that need a reachable model provider are #[ignore]d by default; run them explicitly with cargo test -- --ignored once the provider in .sondera/sondera.toml is up.

Workspace

CratePurpose
crates/harnessgRPC harness transport, background scan dispatch, and hook-side client
crates/policy/cedarCedar policy engine and event-to-context transformation
crates/storageTurso (SQLite) local store: event ledger, agent registry, Cedar entities
crates/guardrails/signatureYARA-X signature scanning (prompt injection, exfiltration, secrets)
crates/guardrails/ifcLLM-based data classification (Microsoft Purview sensitivity labels)
crates/guardrails/policyLLM-based policy evaluation (secure code generation categories)
crates/providerRuntime-selected LLM backbone shared across Sondera applications
crates/trajectoryOff-path LLM trajectory log analysis — enrichment, never enforcement
crates/settings.sondera/ resolution and guardrail configuration semantics
crates/typesShared domain types (trajectory, events, errors)
crates/schemaProtobuf / gRPC schema for sondera.harness.v1 and sondera.console.v1
crates/mcpMCP server for interactive Cedar policy authoring
crates/hooks/coreShared hook runtime: install, dispatch, response shaping
crates/hooks/<provider>Per-provider hook adapters — see crates/hooks/README.md
crates/consoleConsole gRPC surface over the local agent/trajectory store
crates/tuiTerminal reading view: the run feed and one run's event transcript
apps/sonderaUnified sondera CLI: per-provider hooks, serve, mcp, and tui

crates/harness is depended on twice: in full by the server, and as sondera-harness-client (the same package with default-features = false, features = ["client"]) by every hook adapter, so a hook links only the gRPC client and not the policy engine.

Conventions

Working conventions for this repository — the local gate, error handling, documentation rules, and which surface owns which fact — live in AGENTS.md.