Riapplica la fase 5 di aKode (86e7c72e) sulla base ripulita:
- crate codex-* -> akode-*, codex-rs -> akode-rs, codex-cli -> akode-cli, binario e ausiliari akode;
- ~/.codex -> ~/.akode, CODEX_HOME -> AKODE_HOME, variabili CODEX_* -> AKODE_*, .codex/ -> .akode/ di progetto;
nessun fallback a ~/.codex o a CODEX_*;
- testi per l'utente "Codex" -> "aKode"; testi verso il modello e istruzioni di sistema invariati;
- snapshot insta rinominati (non ancora rigenerati).
I conflitti con la base ripulita sono stati risolti riapplicando la rinomina ai file senza le
funzioni di imeAI (script di mappa dei token per file).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
56 lines
1.7 KiB
Rust
56 lines
1.7 KiB
Rust
//! Bounded, untrusted descriptions for the exact MCP action under review.
|
|
//! Sync preparation applies per-source limits before rendering.
|
|
|
|
use akode_context_fragments::ContextualUserFragment;
|
|
use akode_protocol::models::ContentItem;
|
|
use akode_protocol::models::ContentItemKind;
|
|
use akode_protocol::models::input_text;
|
|
|
|
/// Descriptions may be shortened or omitted without changing the required action.
|
|
#[derive(Clone, PartialEq)]
|
|
pub struct GuardianToolDescriptions {
|
|
// Empty until sync preparation; prepared framing is always nonempty.
|
|
pub(crate) text: String,
|
|
pub(crate) tool: String,
|
|
pub(crate) connector: String,
|
|
}
|
|
|
|
impl GuardianToolDescriptions {
|
|
/// Captures descriptions without shortening them; sync preparation applies their caps.
|
|
pub fn new(tool: Option<&str>, connector: Option<&str>) -> Option<Self> {
|
|
if tool.is_none() && connector.is_none() {
|
|
return None;
|
|
}
|
|
Some(Self {
|
|
text: String::new(),
|
|
tool: tool.unwrap_or_default().to_owned(),
|
|
connector: connector.unwrap_or_default().to_owned(),
|
|
})
|
|
}
|
|
}
|
|
|
|
impl ContextualUserFragment for GuardianToolDescriptions {
|
|
fn content_kind(&self) -> ContentItemKind {
|
|
ContentItemKind("guardian.tool_descriptions".to_owned())
|
|
}
|
|
|
|
fn role(&self) -> &'static str {
|
|
"user"
|
|
}
|
|
|
|
fn markers(&self) -> (&'static str, &'static str) {
|
|
Self::type_markers()
|
|
}
|
|
|
|
fn type_markers() -> (&'static str, &'static str) {
|
|
(
|
|
"<guardian_tool_descriptions>",
|
|
"</guardian_tool_descriptions>",
|
|
)
|
|
}
|
|
|
|
fn body(&self) -> ContentItem {
|
|
input_text(self.text.clone())
|
|
}
|
|
}
|