diff --git a/.a0proj/audit.db b/.a0proj/audit.db new file mode 100644 index 0000000..4f7696f Binary files /dev/null and b/.a0proj/audit.db differ diff --git a/.a0proj/memory/embedding.json b/.a0proj/memory/embedding.json index 1be289d..a58407b 100644 --- a/.a0proj/memory/embedding.json +++ b/.a0proj/memory/embedding.json @@ -1 +1 @@ -{"model_provider": "openai", "model_name": "BAAI/bge-m3"} \ No newline at end of file +{"model_provider": "ollama", "model_name": "bge-m3:latest"} \ No newline at end of file diff --git a/.a0proj/memory/index.faiss b/.a0proj/memory/index.faiss index 731d491..4a15e1b 100644 Binary files a/.a0proj/memory/index.faiss and b/.a0proj/memory/index.faiss differ diff --git a/.a0proj/memory/index.faiss.sha256 b/.a0proj/memory/index.faiss.sha256 index e87d7f7..04beea4 100644 --- a/.a0proj/memory/index.faiss.sha256 +++ b/.a0proj/memory/index.faiss.sha256 @@ -1 +1 @@ -8e95e0e8cec343042859ef1896dffae2d6bfba986fa2daeaf86600f62e39f71c \ No newline at end of file +9cde4598eb68e4b1810cdf657333d8ca9e228ebcb4b4717524b62a61ae06f900 \ No newline at end of file diff --git a/.a0proj/memory/index.pkl b/.a0proj/memory/index.pkl index d1fe0d0..0f3a0c9 100644 Binary files a/.a0proj/memory/index.pkl and b/.a0proj/memory/index.pkl differ diff --git a/.a0proj/memory/knowledge_import.json b/.a0proj/memory/knowledge_import.json index fa0df5a..d65d6c6 100644 --- a/.a0proj/memory/knowledge_import.json +++ b/.a0proj/memory/knowledge_import.json @@ -1 +1 @@ -{"/a0/usr/knowledge/main/echo-greeting.promptinclude.md": {"file": "/a0/usr/knowledge/main/echo-greeting.promptinclude.md", "checksum": "ad54de76e40288003564157a95ac89ef", "ids": ["qXFLuCv9Q9", "UjhNYB9CkP"]}, "/a0/usr/knowledge/main/Iran-US-Conflict-Update-2026-04-01.md": {"file": "/a0/usr/knowledge/main/Iran-US-Conflict-Update-2026-04-01.md", "checksum": "6beea9874c3bcb846d17f9a60c29d528", "ids": ["5sQkc0Ylqa", "FeZVPLWYss", "kYBRtDfHjJ"]}, "/a0/usr/knowledge/main/ollama-27b-modelfile.txt": {"file": "/a0/usr/knowledge/main/ollama-27b-modelfile.txt", "checksum": "3f4f724d6f777e0620df9781ebc82f36", "ids": ["yZoFOCA99D"]}, "/a0/usr/knowledge/main/behavioral-rules.md": {"file": "/a0/usr/knowledge/main/behavioral-rules.md", "checksum": "ff4230d5f02891487008864de55151e8", "ids": ["5LhBKVgUXB"]}, "/a0/usr/knowledge/main/utility_test.txt": {"file": "/a0/usr/knowledge/main/utility_test.txt", "checksum": "c8c29a129e935836a77048f47e231705", "ids": ["vrbKe4D4sR"]}, "/a0/usr/knowledge/main/welcome.md": {"file": "/a0/usr/knowledge/main/welcome.md", "checksum": "d947ce81d6dcc977a3ddf52e8d5e4712", "ids": ["0Qx7U1mSZH"]}, "/a0/usr/knowledge/main/capability_test_results.txt": {"file": "/a0/usr/knowledge/main/capability_test_results.txt", "checksum": "880b2a6e355125561f22e1f0ac38a3c4", "ids": ["hmVC8arGTg"]}, "/a0/usr/knowledge/main/Iran-US-Conflict-Analysis-2026.md": {"file": "/a0/usr/knowledge/main/Iran-US-Conflict-Analysis-2026.md", "checksum": "ffa6e16f560fc2c021df9c656e8dfdcc", "ids": ["WKKtg5Rj2e", "VBSDN1KENS"]}, "/a0/knowledge/main/tool_call_reference_examples.md": {"file": "/a0/knowledge/main/tool_call_reference_examples.md", "checksum": "1558e6e118619185e31224b1ed646b9a", "ids": ["mLgFu7vH7Z"]}, "/a0/knowledge/main/about/architecture.md": {"file": "/a0/knowledge/main/about/architecture.md", "checksum": "0de7a9280419982ef5fc98d0cc6ad2dc", "ids": ["VG5QHEdqZt", "oALIWNguyG"]}, "/a0/knowledge/main/about/configuration.md": {"file": "/a0/knowledge/main/about/configuration.md", "checksum": "9f83690fdca64631d063c75fd324d42c", "ids": ["XX5kcVMvDu", "T2B8pFL10O"]}, "/a0/knowledge/main/about/capabilities.md": {"file": "/a0/knowledge/main/about/capabilities.md", "checksum": "cf4d100df544af245940971464357e0b", "ids": ["S6MH1eLPzP", "laWnXkj3Ky"]}, "/a0/knowledge/main/about/identity.md": {"file": "/a0/knowledge/main/about/identity.md", "checksum": "63a2c83c6c3bf4c4008786c396618755", "ids": ["Yi3PLqGcaj"]}, "/a0/knowledge/main/about/setup-and-deployment.md": {"file": "/a0/knowledge/main/about/setup-and-deployment.md", "checksum": "3cf57d685f11a6989a73cf041c2018a3", "ids": ["KVJ5zsWDQX", "LoANN0xNbF"]}} \ No newline at end of file +{"/a0/usr/knowledge/main/Iran-US-Conflict-Update-2026-04-01.md": {"file": "/a0/usr/knowledge/main/Iran-US-Conflict-Update-2026-04-01.md", "checksum": "6beea9874c3bcb846d17f9a60c29d528", "ids": ["5sQkc0Ylqa", "FeZVPLWYss", "kYBRtDfHjJ"]}, "/a0/usr/knowledge/main/ollama-27b-modelfile.txt": {"file": "/a0/usr/knowledge/main/ollama-27b-modelfile.txt", "checksum": "3f4f724d6f777e0620df9781ebc82f36", "ids": ["yZoFOCA99D"]}, "/a0/usr/knowledge/main/behavioral-rules.md": {"file": "/a0/usr/knowledge/main/behavioral-rules.md", "checksum": "ff4230d5f02891487008864de55151e8", "ids": ["5LhBKVgUXB"]}, "/a0/usr/knowledge/main/utility_test.txt": {"file": "/a0/usr/knowledge/main/utility_test.txt", "checksum": "c8c29a129e935836a77048f47e231705", "ids": ["vrbKe4D4sR"]}, "/a0/usr/knowledge/main/welcome.md": {"file": "/a0/usr/knowledge/main/welcome.md", "checksum": "d947ce81d6dcc977a3ddf52e8d5e4712", "ids": ["0Qx7U1mSZH"]}, "/a0/usr/knowledge/main/capability_test_results.txt": {"file": "/a0/usr/knowledge/main/capability_test_results.txt", "checksum": "880b2a6e355125561f22e1f0ac38a3c4", "ids": ["hmVC8arGTg"]}, "/a0/usr/knowledge/main/Iran-US-Conflict-Analysis-2026.md": {"file": "/a0/usr/knowledge/main/Iran-US-Conflict-Analysis-2026.md", "checksum": "ffa6e16f560fc2c021df9c656e8dfdcc", "ids": ["WKKtg5Rj2e", "VBSDN1KENS"]}, "/a0/knowledge/main/tool_call_reference_examples.md": {"file": "/a0/knowledge/main/tool_call_reference_examples.md", "checksum": "1558e6e118619185e31224b1ed646b9a", "ids": ["mLgFu7vH7Z"]}, "/a0/knowledge/main/about/architecture.md": {"file": "/a0/knowledge/main/about/architecture.md", "checksum": "0de7a9280419982ef5fc98d0cc6ad2dc", "ids": ["VG5QHEdqZt", "oALIWNguyG"]}, "/a0/knowledge/main/about/configuration.md": {"file": "/a0/knowledge/main/about/configuration.md", "checksum": "9f83690fdca64631d063c75fd324d42c", "ids": ["XX5kcVMvDu", "T2B8pFL10O"]}, "/a0/knowledge/main/about/capabilities.md": {"file": "/a0/knowledge/main/about/capabilities.md", "checksum": "cf4d100df544af245940971464357e0b", "ids": ["S6MH1eLPzP", "laWnXkj3Ky"]}, "/a0/knowledge/main/about/identity.md": {"file": "/a0/knowledge/main/about/identity.md", "checksum": "63a2c83c6c3bf4c4008786c396618755", "ids": ["Yi3PLqGcaj"]}, "/a0/knowledge/main/about/setup-and-deployment.md": {"file": "/a0/knowledge/main/about/setup-and-deployment.md", "checksum": "3cf57d685f11a6989a73cf041c2018a3", "ids": ["KVJ5zsWDQX", "LoANN0xNbF"]}} \ No newline at end of file diff --git a/.a0proj/variables.env b/.a0proj/variables.env index f19a66a..8dfbfe8 100644 --- a/.a0proj/variables.env +++ b/.a0proj/variables.env @@ -1,3 +1,3 @@ -EMBEDDING_MODEL=BAAI/bge-m3 -OLLAMA_HOST=http://ares.moon-dragon.us:11435 +EMBEDDING_MODEL=bge-m3:latest +OLLAMA_HOST=http://ares.moon-dragon.us:11434 LLM_MODEL=qwen3.5:9b diff --git a/src/packages/mod.rs b/src/packages/mod.rs index ee6e729..ef62ddf 100644 --- a/src/packages/mod.rs +++ b/src/packages/mod.rs @@ -98,8 +98,18 @@ impl AptBackend { /// Run apt command and capture output fn run_apt(&self, args: &[&str]) -> Result { - let output = Command::new("apt") - .args(args) + // Use sudo for operations that modify packages (install, upgrade, remove, purge) + let needs_sudo = args.first().map_or(false, |&cmd| { + matches!(cmd, "install" | "upgrade" | "remove" | "purge" | "dist-upgrade" | "autoremove") + }); + let (program, cmd_args): (&str, Vec<&str>) = if needs_sudo { + ("sudo", ["apt"].iter().chain(args.iter()).copied().collect()) + } else { + ("apt", args.to_vec()) + }; + + let output = Command::new(program) + .args(&cmd_args) .output() .context("Failed to execute apt command")?; @@ -330,7 +340,8 @@ impl PackageManagerBackend for AptBackend { for line in output.lines() { let parts: Vec<&str> = line.split_whitespace().collect(); if parts.len() >= 3 { - let name = parts[0].to_string(); + // Strip release suffix from package name (e.g., "pkg/noble-updates,noble-security" → "pkg") + let name = parts[0].split('/').next().unwrap_or(parts[0]).to_string(); let current_version = parts[1].to_string(); let available_version = parts[2].to_string();