1.9 KiB
1.9 KiB
Package: dirigent_zed
Zed editor integration for Dirigent -- detection, agent discovery, binary resolution.
Quick Facts
- Type: Library
- Main Entry: src/lib.rs
- Dependencies: dirigent_config, dirs, serde, serde_json, thiserror, tracing
- Status: Initial implementation
Purpose
Detects Zed editor installations on the current system, discovers configured
ACP agents from Zed's settings.json, and resolves downloaded binary paths
from the Zed data directory.
Key Types
ZedChannel-- Release channel enum (Stable, Preview, Nightly, Dev)ZedAgent-- Discovered agent with name, type, binary path, env overridesAgentServerType-- Registry, Custom, or ExtensionZedInstallation-- Detected installation with channel, paths, and agents
Module Organization
paths.rs-- Platform path resolution for Zed config/data directoriesagents.rs-- Agent discovery from settings.json, JSONC stripping, binary resolutiondetection.rs-- High-level installation detection combining paths and agents
Platform Paths
| Platform | Config Dir | Data Dir |
|---|---|---|
| Linux | $XDG_CONFIG_HOME/zed |
$XDG_DATA_HOME/zed |
| macOS | ~/.config/zed |
~/Library/Application Support/Zed |
| Windows | %APPDATA%\Zed |
%LOCALAPPDATA%\Zed |
Usage
let installations = dirigent_zed::detect_installations();
for inst in &installations {
for agent in &inst.agents {
if let Some(ref binary) = agent.binary_path {
println!("{}: {}", agent.name, binary.display());
}
}
}
Testing
cargo test -p dirigent_zed
Related Packages
- dirigent_config -- Dirigent's own path resolution (dependency)
- dirigent_core -- Will consume this crate for Zed connector integration (future)
Research
See docs/research/zed-integration.md for detailed platform paths and detection strategies.