MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / write_embedded_plugin

Function write_embedded_plugin

src/agents/cursor.rs:258–269  ·  view source on GitHub ↗
(install_dir: &Path, tracedecay_bin: &str)

Source from the content-addressed store, hash-verified

256}
257
258fn write_embedded_plugin(install_dir: &Path, tracedecay_bin: &str) -> Result<()> {
259 for (relative, contents) in embedded_plugin_files() {
260 let rendered = match relative {
261 ".cursor-plugin/plugin.json" => cursor_plugin_manifest(contents)?,
262 "mcp.json" => cursor_plugin_mcp(contents, tracedecay_bin)?,
263 "hooks/hooks.json" => cursor_plugin_hooks(contents, tracedecay_bin)?,
264 _ => contents.to_string(),
265 };
266 safe_write_text_file(&install_dir.join(relative), &rendered, None)?;
267 }
268 Ok(())
269}
270
271fn cursor_plugin_manifest(raw: &str) -> Result<String> {
272 super::plugin_bundle::stamp_manifest_version(raw)

Calls 5

embedded_plugin_filesFunction · 0.85
cursor_plugin_manifestFunction · 0.85
cursor_plugin_mcpFunction · 0.85
cursor_plugin_hooksFunction · 0.85
safe_write_text_fileFunction · 0.85