Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions crates/tracedecay-agent-hosts/src/agents/chatgpt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ impl AgentIntegration for ChatGptIntegration {
}
}

// ---------------------------------------------------------------------------
// Staged source helpers
// ---------------------------------------------------------------------------

/// The staged portable bundle the ChatGPT host flow consumes.
pub(crate) fn chatgpt_staged_plugin_dir(home: &Path) -> PathBuf {
Expand Down Expand Up @@ -151,9 +149,7 @@ pub(crate) fn rendered_plugin_files(tracedecay_bin: &str) -> Result<Vec<(&'stati
.collect()
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

/// Check the staged ChatGPT bundle: its manifest parses, every file the
/// rendered inventory names is present, and host registration is reported as
Expand Down
6 changes: 0 additions & 6 deletions crates/tracedecay-agent-hosts/src/agents/claude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,7 @@ fn read_optional_json(path: &Path) -> std::result::Result<Option<serde_json::Val
}
}

// ---------------------------------------------------------------------------
// Plugin bundle: embedding + deploy
// ---------------------------------------------------------------------------

/// The marketplace name (matches the plugin name `tracedecay`), yielding the
/// `tracedecay@tracedecay` plugin identifier Claude Code enables by.
Expand Down Expand Up @@ -779,9 +777,7 @@ fn set_mcp_command(raw: &str, tracedecay_bin: &str) -> Result<String> {
super::plugin_bundle::set_mcp_command(raw, tracedecay_bin)
}

// ---------------------------------------------------------------------------
// Shared install helpers (permissions + CLAUDE.md)
// ---------------------------------------------------------------------------

fn ensure_claude_dir(claude_dir: &Path) -> Result<()> {
std::fs::create_dir_all(claude_dir).map_err(|e| TraceDecayError::Config {
Expand Down Expand Up @@ -1020,9 +1016,7 @@ fn uninstall_claude_md_rules(claude_md_path: &Path) -> Result<()> {
})
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

/// Check the deployed plugin bundle, marketplace registration, and enablement.
fn doctor_check_plugin(dc: &mut DoctorCounters, home: &Path) {
Expand Down
2 changes: 0 additions & 2 deletions crates/tracedecay-agent-hosts/src/agents/cline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ impl AgentIntegration for ClineIntegration {
}
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) {
let settings_path = cline_mcp_settings_path(home);
Expand Down
4 changes: 0 additions & 4 deletions crates/tracedecay-agent-hosts/src/agents/codex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,7 @@ impl AgentIntegration for CodexIntegration {
}
}

// ---------------------------------------------------------------------------
// Install helpers
// ---------------------------------------------------------------------------

/// The Codex plugin's composed deploy set, sourced from the shared `plugin/`
/// tree via [`crate::agents::plugin_bundle::codex_files`]. Each entry is
Expand Down Expand Up @@ -2078,9 +2076,7 @@ fn group_has_subcommand(group: &serde_json::Value, subcommand: &str) -> bool {
})
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_plugin(dc: &mut DoctorCounters, profile_root: &Path, home: &Path) {
match codex_foreign_bundle_entrypoints(profile_root, home) {
Expand Down
6 changes: 0 additions & 6 deletions crates/tracedecay-agent-hosts/src/agents/copilot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ fn vscode_mcp_servers_has_tracedecay(settings_path: &Path) -> bool {
.is_some()
}

// ---------------------------------------------------------------------------
// Registration paths
// ---------------------------------------------------------------------------

/// VS Code user settings. Neither a host CLI nor TraceDecay writes this
/// file; see the module documentation.
Expand Down Expand Up @@ -306,9 +304,7 @@ fn copilot_context_mcp_registration_state(
}
}

// ---------------------------------------------------------------------------
// Host-CLI-driven MCP registry lifecycle
// ---------------------------------------------------------------------------

/// Resolve Copilot's own CLI, or fail with the typed requirement.
///
Expand Down Expand Up @@ -431,9 +427,7 @@ fn run_mcp_registry_step(copilot_cli: &Path, args: &[&str], home: &Path) -> Resu
)
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

/// True when a registered server's `args` array carries every argument in
/// [`MCP_SERVER_ARGS`].
Expand Down
4 changes: 0 additions & 4 deletions crates/tracedecay-agent-hosts/src/agents/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ impl AgentIntegration for CursorIntegration {
}
}

// ---------------------------------------------------------------------------
// Plugin install helpers
// ---------------------------------------------------------------------------

/// The Cursor plugin's composed deploy set, sourced from the shared
/// `plugin/` tree via [`crate::agents::plugin_bundle::cursor_files`].
Expand Down Expand Up @@ -329,9 +327,7 @@ fn cursor_plugin_hooks(raw: &str, tracedecay_bin: &str) -> Result<String> {
Ok(rendered)
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_plugin(dc: &mut DoctorCounters, home: &Path) {
let plugin_dir = cursor_plugin_install_dir(home);
Expand Down
4 changes: 0 additions & 4 deletions crates/tracedecay-agent-hosts/src/agents/droid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,7 @@ impl AgentIntegration for DroidIntegration {
}
}

// ---------------------------------------------------------------------------
// Host-CLI-driven MCP registry lifecycle
// ---------------------------------------------------------------------------

/// Resolve Droid's own CLI, or fail with the typed requirement. Droid owns
/// `~/.factory/mcp.json` through `droid mcp`; its CLI is a hard requirement
Expand Down Expand Up @@ -488,9 +486,7 @@ fn droid_mcp_remove_with(droid_cli: &Path, home: &Path) -> Result<()> {
)
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

/// True when a registered server's `args` array carries every argument in
/// [`MCP_SERVER_ARGS`]. Binding the doctor's expectation to the same constant
Expand Down
4 changes: 0 additions & 4 deletions crates/tracedecay-agent-hosts/src/agents/gemini.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ impl AgentIntegration for GeminiIntegration {
}
}

// ---------------------------------------------------------------------------
// Lifecycle state
// ---------------------------------------------------------------------------

fn selects_extension(components: &[HostComponentV1]) -> bool {
components.iter().any(|component| {
Expand Down Expand Up @@ -235,9 +233,7 @@ fn gemini_extension_registration_state(
}
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_staged_extension(dc: &mut DoctorCounters, home: &Path) {
let stage_dir = extension_stage_dir(home);
Expand Down
8 changes: 0 additions & 8 deletions crates/tracedecay-agent-hosts/src/agents/gemini/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ const EXTENSION_MANIFEST_TEMPLATE: &str = r#"{
}
"#;

// ---------------------------------------------------------------------------
// Paths
// ---------------------------------------------------------------------------

/// TraceDecay's own Gemini profile root. Every path below is derived from the
/// admitted `home` rather than an ambient environment variable, because the
Expand Down Expand Up @@ -138,9 +136,7 @@ pub(super) fn settings_path(home: &Path) -> PathBuf {
gemini_home(home).join("settings.json")
}

// ---------------------------------------------------------------------------
// Staging
// ---------------------------------------------------------------------------

/// Every file the staged extension consists of, already rendered.
///
Expand Down Expand Up @@ -219,9 +215,7 @@ pub(super) fn stage_dir_is_tracedecay(stage_dir: &Path) -> bool {
== Some(EXTENSION_NAME)
}

// ---------------------------------------------------------------------------
// Installed-extension observation
// ---------------------------------------------------------------------------

/// What TraceDecay can actually see of the host's installed extension.
///
Expand Down Expand Up @@ -314,9 +308,7 @@ pub(super) fn installed_extension_is_present(home: &Path) -> bool {
installed_extension_dir(home).exists()
}

// ---------------------------------------------------------------------------
// Host CLI lifecycle
// ---------------------------------------------------------------------------

/// Resolve Gemini CLI's own binary, or fail with the typed requirement.
///
Expand Down
4 changes: 0 additions & 4 deletions crates/tracedecay-agent-hosts/src/agents/host_config_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,7 @@ pub(super) fn persist_host_config_remove_intent(path: &Path) -> Result<()> {
})
}

// ---------------------------------------------------------------------------
// Shared MCP server registration
// ---------------------------------------------------------------------------
//
// Every JSON/JSONC-configured host registers tracedecay the same way: one
// entry named `tracedecay` under a root key (`mcpServers` for the Cline
Expand Down Expand Up @@ -1136,6 +1134,4 @@ fn parse_toml_config(path: &Path, contents: &str) -> Result<toml::Value> {
Ok(toml::Value::Table(table))
}

// ---------------------------------------------------------------------------
// Git post-commit hook
// ---------------------------------------------------------------------------
2 changes: 0 additions & 2 deletions crates/tracedecay-agent-hosts/src/agents/kilo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ impl AgentIntegration for KiloIntegration {
}
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) {
doctor_check_mcp_registration(
Expand Down
8 changes: 0 additions & 8 deletions crates/tracedecay-agent-hosts/src/agents/kimi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,7 @@ impl AgentIntegration for KimiIntegration {
}
}

// ---------------------------------------------------------------------------
// Kimi Code CLI native plugin helpers
// ---------------------------------------------------------------------------

/// Resolve the Kimi Code CLI home: `$KIMI_CODE_HOME` when set, non-empty, and
/// under the admitted `home`; otherwise `~/.kimi-code`.
Expand Down Expand Up @@ -556,9 +554,7 @@ fn render_kimi_hook_commands(raw: &str, tracedecay_bin: &str) -> Result<String>
Ok(rendered)
}

// ---------------------------------------------------------------------------
// Install helpers
// ---------------------------------------------------------------------------

/// Install-or-refresh prompt rules in AGENTS.md.
fn install_prompt_rules(agents_md: &Path) -> Result<()> {
Expand All @@ -571,18 +567,14 @@ fn install_prompt_rules(agents_md: &Path) -> Result<()> {
super::prompt_rules::reconcile_prompt_rules(agents_md, PROMPT_RULE_MARKER, &block)
}

// ---------------------------------------------------------------------------
// Uninstall helpers
// ---------------------------------------------------------------------------

/// Remove tracedecay rules from AGENTS.md.
fn uninstall_prompt_rules(agents_md: &Path) -> Result<()> {
super::prompt_rules::remove_standard_prompt_rules(agents_md)
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

/// Check the Kimi Code CLI native plugin: registered in `installed.json` and
/// its host-managed bundle matches the staged source. Like the other
Expand Down
6 changes: 0 additions & 6 deletions crates/tracedecay-agent-hosts/src/agents/kiro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,7 @@ fn mcp_registry_has_tracedecay(path: &Path) -> bool {
mcp_config_has_tracedecay(path, "mcpServers", load_json_file)
}

// ---------------------------------------------------------------------------
// Install helpers
// ---------------------------------------------------------------------------

fn mcp_server_entry(tracedecay_bin: &str) -> serde_json::Value {
json!({
Expand Down Expand Up @@ -574,9 +572,7 @@ missing decision or an external or destructive action outside that authority.",
)
}

// ---------------------------------------------------------------------------
// Uninstall helpers
// ---------------------------------------------------------------------------

fn uninstall_mcp_server(path: &Path) -> Result<()> {
uninstall_mcp_server_entry(path, "mcpServers", JsonConfigDialect::Json)
Expand Down Expand Up @@ -662,9 +658,7 @@ fn owned_steering_ranges(contents: &str) -> Vec<Range<usize>> {
})
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_mcp_config(dc: &mut DoctorCounters, home: &Path) -> Option<serde_json::Value> {
let path = mcp_config_path(home);
Expand Down
8 changes: 0 additions & 8 deletions crates/tracedecay-agent-hosts/src/agents/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ pub fn export_managed_skills_to_agent_hosts(
reports
}

// ---------------------------------------------------------------------------
// AgentIntegration trait
// ---------------------------------------------------------------------------

/// What [`AgentIntegration::require_host`] proved about the host.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
Expand Down Expand Up @@ -644,9 +642,7 @@ pub(crate) enum InstallScope {
ProjectLocal,
}

// ---------------------------------------------------------------------------
// Registry
// ---------------------------------------------------------------------------

/// Returns the agent matching `id`, or an error if unknown.
pub fn get_integration(id: &str) -> Result<Box<dyn AgentIntegration>> {
Expand Down Expand Up @@ -800,9 +796,7 @@ pub fn inspect_receipt_backed_host_components(
)
}

// ---------------------------------------------------------------------------
// DoctorCounters
// ---------------------------------------------------------------------------

/// Diagnostic counters for doctor checks, plus every check line in order so
/// `tracedecay doctor --json` carries exactly what the terminal showed.
Expand Down Expand Up @@ -902,9 +896,7 @@ impl DoctorCounters {
}
}

// ---------------------------------------------------------------------------
// Shared helpers
// ---------------------------------------------------------------------------

#[macro_export]
macro_rules! cli_fallback_args_invocation_lit {
Expand Down
8 changes: 0 additions & 8 deletions crates/tracedecay-agent-hosts/src/agents/opencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ fn config_has_tracedecay(config: &Value) -> bool {
.is_some()
}

// ---------------------------------------------------------------------------
// Config path resolution
// ---------------------------------------------------------------------------

/// Honors the profile's absolute `$XDG_CONFIG_HOME` only inside `home`.
///
Expand Down Expand Up @@ -636,9 +634,7 @@ fn remove_opencode_plugin(path: &Path) -> Result<()> {
})
}

// ---------------------------------------------------------------------------
// Install helpers
// ---------------------------------------------------------------------------

/// Merge TraceDecay's MCP registration into `opencode.json`.
///
Expand Down Expand Up @@ -758,9 +754,7 @@ fn install_prompt_rules(prompt_path: &Path) -> Result<()> {
super::prompt_rules::reconcile_prompt_rules(prompt_path, PROMPT_RULE_MARKER, &block)
}

// ---------------------------------------------------------------------------
// Uninstall helpers
// ---------------------------------------------------------------------------

/// Outcome of the uninstall transform, reported after publication.
enum OpenCodeRegistrationRemoval {
Expand Down Expand Up @@ -876,9 +870,7 @@ fn uninstall_prompt_rules(prompt_path: &Path) -> Result<()> {
super::prompt_rules::remove_standard_prompt_rules(prompt_path)
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_config(dc: &mut DoctorCounters, home: &Path, profile: &ProfileRoot) {
let config_path = opencode_config_path(home, profile);
Expand Down
2 changes: 0 additions & 2 deletions crates/tracedecay-agent-hosts/src/agents/roo_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ impl AgentIntegration for RooCodeIntegration {
}
}

// ---------------------------------------------------------------------------
// Healthcheck helpers
// ---------------------------------------------------------------------------

fn doctor_check_settings(dc: &mut DoctorCounters, home: &Path) {
let settings_path = roo_settings_path(home);
Expand Down
Loading
Loading