tools: add journal tools to main registry, fix journal MCP access

journal_tools() was only in memory_and_journal_tools() for
subconscious agents — not in the main tools() registry. Added
so consciousness and MCP server can use journal_new/tail/update.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
ProofOfConcept 2026-04-04 16:48:33 -04:00 committed by Kent Overstreet
parent 1554d88694
commit e9d803c4ea
3 changed files with 1 additions and 8 deletions

View file

@ -154,6 +154,7 @@ pub fn tools() -> Vec<Tool> {
];
all.extend(web::tools());
all.extend(memory::memory_tools());
all.extend(memory::journal_tools());
all.extend(channels::tools());
all.extend(control::tools());
all

View file

@ -712,11 +712,6 @@ fn deserialize_path<'de, D: serde::Deserializer<'de>>(d: D) -> Result<PathBuf, D
Ok(expand_home(&s))
}
fn deserialize_path_opt<'de, D: serde::Deserializer<'de>>(d: D) -> Result<Option<PathBuf>, D::Error> {
let s: Option<String> = serde::Deserialize::deserialize(d)?;
Ok(s.map(|s| expand_home(&s)))
}
pub fn expand_home(path: &str) -> PathBuf {
if let Some(rest) = path.strip_prefix("~/") {
dirs::home_dir().unwrap_or_default().join(rest)

View file

@ -31,9 +31,6 @@ use std::io;
use crate::user::ui_channel::{ContextInfo, SharedContextState, StatusInfo, UiMessage};
pub(crate) const SCREEN_LEGEND: &str = " F1=interact F2=conscious F3=subconscious F4=unconscious F5=thalamus ";
pub(crate) const SUBCONSCIOUS_AGENTS: &[&str] = &["surface-observe", "journal", "reflect"];
#[allow(dead_code)]
pub(crate) const UNCONSCIOUS_AGENTS: &[&str] = &["linker", "organize", "distill", "split"];
pub(crate) fn strip_ansi(text: &str) -> String {
let mut out = String::with_capacity(text.len());