feat: rename Loki to Coyote

This commit is contained in:
2026-05-27 12:47:32 -06:00
parent 8b2f54fe1f
commit a122ae36f0
58 changed files with 506 additions and 3202 deletions
+2 -2
View File
@@ -879,7 +879,7 @@ mod tests {
#[test]
fn from_files_loads_single_text_file() {
let dir = env::temp_dir().join(format!(
"loki-input-test-{}",
"coyote-input-test-{}",
SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
@@ -906,7 +906,7 @@ mod tests {
#[test]
fn from_files_loads_multiple_files() {
let dir = env::temp_dir().join(format!(
"loki-input-test-multi-{}",
"coyote-input-test-multi-{}",
SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap()
+6 -6
View File
@@ -136,7 +136,7 @@ impl Drop for TempRepoDir {
}
fn clone_to_temp(url: &str, reference: Option<&str>) -> Result<TempRepoDir> {
let dest = utils::temp_file("loki-remote-install-", "");
let dest = utils::temp_file("coyote-remote-install-", "");
let dest_arg: OsString = dest.as_os_str().into();
let is_sha = reference
@@ -875,7 +875,7 @@ fn print_secret_summary(added: &[String], deferred: &[String]) {
if !deferred.is_empty() {
println!(
"\nThe following secrets are still required by your MCP servers. \
Add them with `loki --add-secret <NAME>` or `.vault add <NAME>` in the REPL:"
Add them with `coyote --add-secret <NAME>` or `.vault add <NAME>` in the REPL:"
);
for name in deferred {
println!(" {{{{ {name} }}}}");
@@ -1265,12 +1265,12 @@ mod tests {
let target = dir.join("target.json");
write_mcp(
&remote,
r#"{"mcpServers": {"x": {"type":"stdio","command":"echo","env":{"K":"{{LOKI_TEST_MERGE_SECRET}}"}}}}"#,
r#"{"mcpServers": {"x": {"type":"stdio","command":"echo","env":{"K":"{{COYOTE_TEST_MERGE_SECRET}}"}}}}"#,
);
let report = merge_mcp_json(None, &remote, &target, false).unwrap();
assert_eq!(report.missing_secrets, vec!["LOKI_TEST_MERGE_SECRET"]);
assert_eq!(report.missing_secrets, vec!["COYOTE_TEST_MERGE_SECRET"]);
let _ = fs::remove_dir_all(&dir);
}
@@ -1300,8 +1300,8 @@ mod tests {
#[test]
fn handle_missing_secrets_defers_all_in_non_tty() {
let missing = vec![
"LOKI_TEST_STEP4_A".to_string(),
"LOKI_TEST_STEP4_B".to_string(),
"COYOTE_TEST_STEP4_A".to_string(),
"COYOTE_TEST_STEP4_B".to_string(),
];
assert!(handle_missing_secrets(&missing).is_ok());
+3 -3
View File
@@ -104,13 +104,13 @@ const DEFAULT_VISIBLE_TOOLS: [&str; 18] = [
"get_current_weather.sh",
"search_wikipedia.sh",
"search_arxiv.sh",
"web_search_loki.sh",
"web_search_coyote.sh",
];
const CLIENTS_FIELD: &str = "clients";
const SYNC_MODELS_URL: &str =
"https://raw.githubusercontent.com/Dark-Alex-17/loki/refs/heads/main/models.yaml";
"https://raw.githubusercontent.com/Dark-Alex-17/coyote/refs/heads/main/models.yaml";
const SUMMARIZATION_PROMPT: &str =
"Summarize the discussion briefly in 200 words or less to use as a prompt for future context.";
@@ -625,7 +625,7 @@ pub async fn create_config_file(config_path: &Path) -> Result<()> {
let config_data = serde_yaml::to_string(&config).with_context(|| "Failed to create config")?;
let config_data = format!(
"# see https://github.com/Dark-Alex-17/loki/blob/main/config.example.yaml\n\n{config_data}"
"# see https://github.com/Dark-Alex-17/coyote/blob/main/config.example.yaml\n\n{config_data}"
);
ensure_parent_exists(config_path)?;
+2 -2
View File
@@ -1498,7 +1498,7 @@ impl RequestContext {
if !target_path.exists() {
fs::write(
&target_path,
"# see https://github.com/Dark-Alex-17/loki/blob/main/config.agent.example.yaml\n",
"# see https://github.com/Dark-Alex-17/coyote/blob/main/config.agent.example.yaml\n",
)
.with_context(|| format!("Failed to write to '{}'", target_path.display()))?;
}
@@ -2706,7 +2706,7 @@ mod tests {
.duration_since(UNIX_EPOCH)
.unwrap()
.as_nanos();
let path = env::temp_dir().join(format!("loki-request-context-tests-{unique}"));
let path = env::temp_dir().join(format!("coyote-request-context-tests-{unique}"));
create_dir_all(&path).unwrap();
unsafe {
env::set_var(&key, &path);
+17 -17
View File
@@ -69,7 +69,7 @@ fn normalize_version(requested: Option<String>) -> Option<String> {
}
fn is_dir_writable(dir: &Path) -> bool {
let probe = dir.join(format!(".loki-update-write-test-{}", process::id()));
let probe = dir.join(format!(".coyote-update-write-test-{}", process::id()));
match OpenOptions::new().write(true).create_new(true).open(&probe) {
Ok(_) => {
let _ = fs::remove_file(&probe);
@@ -83,24 +83,24 @@ pub fn run_self_update(requested: Option<String>, force: bool) -> Result<()> {
let target_tag = normalize_version(requested);
let exe_path = env::current_exe()
.context("Could not determine the path of the running loki executable")?;
.context("Could not determine the path of the running coyote executable")?;
let resolved = canonicalize(&exe_path).unwrap_or_else(|_| exe_path.clone());
let source = classify_install_path(&resolved);
if source.is_package_managed() {
let body = match source {
InstallSource::Homebrew => format!(
"Loki appears to be installed via Homebrew ({}).\n\
"Coyote appears to be installed via Homebrew ({}).\n\
Updating in place replaces the binary inside Homebrew's Cellar; `brew` will\n\
then report a version that no longer matches the file on disk, and a later\n\
`brew upgrade`/`brew reinstall` may overwrite it or fail.\n\
The clean way to update is: brew upgrade loki",
The clean way to update is: brew upgrade coyote",
exe_path.display()
),
InstallSource::Cargo => format!(
"Loki appears to be installed via `cargo install` ({}).\n\
"Coyote appears to be installed via `cargo install` ({}).\n\
Updating in place leaves Cargo's records out of sync with the binary on disk.\n\
The clean way to update is: cargo install --locked loki-ai",
The clean way to update is: cargo install --locked coyote-ai",
exe_path.display()
),
InstallSource::Manual => unreachable!("Manual installs are not package-managed"),
@@ -130,7 +130,7 @@ pub fn run_self_update(requested: Option<String>, force: bool) -> Result<()> {
{
bail!(
"No write permission for '{}'. Re-run with elevated permissions (e.g. sudo), \
or update Loki through your package manager.",
or update Coyote through your package manager.",
parent.display()
);
}
@@ -139,8 +139,8 @@ pub fn run_self_update(requested: Option<String>, force: bool) -> Result<()> {
let mut builder = Update::configure();
builder
.repo_owner("Dark-Alex-17")
.repo_name("loki")
.bin_name("loki")
.repo_name("coyote")
.bin_name("coyote")
.current_version(env!("CARGO_PKG_VERSION"))
.no_confirm(true)
.show_download_progress(interactive);
@@ -155,10 +155,10 @@ pub fn run_self_update(requested: Option<String>, force: bool) -> Result<()> {
match status {
Status::UpToDate(version) => {
println!("Loki is already up to date (v{version}).");
println!("Coyote is already up to date (v{version}).");
}
Status::Updated(version) => {
println!("Loki updated to v{version}. Restart loki to use the new version.");
println!("Coyote updated to v{version}. Restart coyote to use the new version.");
}
}
Ok(())
@@ -172,7 +172,7 @@ mod tests {
#[test]
fn classify_cargo_install() {
assert_eq!(
classify_install_path(&PathBuf::from("/home/u/.cargo/bin/loki")),
classify_install_path(&PathBuf::from("/home/u/.cargo/bin/coyote")),
InstallSource::Cargo
);
}
@@ -180,7 +180,7 @@ mod tests {
#[test]
fn classify_homebrew_opt_prefix() {
assert_eq!(
classify_install_path(&PathBuf::from("/opt/homebrew/bin/loki")),
classify_install_path(&PathBuf::from("/opt/homebrew/bin/coyote")),
InstallSource::Homebrew
);
}
@@ -188,7 +188,7 @@ mod tests {
#[test]
fn classify_homebrew_cellar() {
assert_eq!(
classify_install_path(&PathBuf::from("/usr/local/Cellar/loki/0.3.0/bin/loki")),
classify_install_path(&PathBuf::from("/usr/local/Cellar/coyote/0.3.0/bin/coyote")),
InstallSource::Homebrew
);
}
@@ -196,7 +196,7 @@ mod tests {
#[test]
fn classify_homebrew_linuxbrew() {
assert_eq!(
classify_install_path(&PathBuf::from("/home/linuxbrew/.linuxbrew/bin/loki")),
classify_install_path(&PathBuf::from("/home/linuxbrew/.linuxbrew/bin/coyote")),
InstallSource::Homebrew
);
}
@@ -204,7 +204,7 @@ mod tests {
#[test]
fn classify_manual_usr_local_bin() {
assert_eq!(
classify_install_path(&PathBuf::from("/usr/local/bin/loki")),
classify_install_path(&PathBuf::from("/usr/local/bin/coyote")),
InstallSource::Manual
);
}
@@ -212,7 +212,7 @@ mod tests {
#[test]
fn classify_manual_local_bin() {
assert_eq!(
classify_install_path(&PathBuf::from("/home/u/.local/bin/loki")),
classify_install_path(&PathBuf::from("/home/u/.local/bin/coyote")),
InstallSource::Manual
);
}