aKode 0.8.0: grafo del codice locale (tree-sitter + git) e strumento code_graph, memorie ancorate ai simboli con stato stale, client MCP akode-mcp-client

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-15 11:14:42 +01:00
parent b87057603d
commit 83959bccd0
74 changed files with 5019 additions and 229 deletions

View File

@@ -639,6 +639,27 @@
},
"type": "object"
},
"CodeGraphToml": {
"additionalProperties": false,
"description": "`[code_graph]` table: local code graph and the read-only `code_graph` tool.",
"properties": {
"enabled": {
"description": "Index the repository of the working directory and offer the `code_graph` tool. The index lives in `<akode home>/code-graph/`. Default: true.",
"type": "boolean"
},
"max_output_tokens": {
"description": "Token budget of one `code_graph` answer. Default: 1200 (300-4000).",
"format": "uint32",
"minimum": 0.0,
"type": "integer"
},
"repo_map": {
"description": "Add a short map of the repository (folders and languages) to the initial context. Default: false.",
"type": "boolean"
}
},
"type": "object"
},
"CodeModeConfigToml": {
"additionalProperties": false,
"properties": {
@@ -2884,6 +2905,10 @@
"additionalProperties": false,
"description": "`[memoria]` table: session-start briefing and session delivery of the imeAI `memoria` plugin.",
"properties": {
"anchors": {
"description": "Tie project memories to the symbols they cite (path, symbol name and a hash of its text; never the source) and flag them as stale in `memory_recall` and in the briefing when that code changes. Checked locally. Default: true.",
"type": "boolean"
},
"briefing": {
"description": "Add the memory briefing (preferences, project memories, memories linked to the files in `git status`) to the prompt at session start. Default: true. Only used while the `memoria` plugin is enabled and its MCP server is ready.",
"type": "boolean"
@@ -7734,6 +7759,14 @@
],
"description": "Removed: cloud-owned feature settings are accepted and ignored."
},
"code_graph": {
"allOf": [
{
"$ref": "#/definitions/CodeGraphToml"
}
],
"description": "Local code graph of the repository (tree-sitter and git, no model) and the `code_graph` tool."
},
"compact_prompt": {
"description": "Compact prompt used for history compaction.",
"type": "string"

View File

@@ -712,6 +712,24 @@ impl Default for MemoriaDeliveryConfig {
}
}
/// Local code graph (`[code_graph]`).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct CodeGraphConfig {
pub enabled: bool,
pub repo_map: bool,
pub max_output_tokens: u32,
}
impl Default for CodeGraphConfig {
fn default() -> Self {
Self {
enabled: true,
repo_map: false,
max_output_tokens: 1200,
}
}
}
/// Session-start briefing of the `memoria` plugin (`[memoria]`).
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct MemoriaBriefingConfig {
@@ -1271,6 +1289,12 @@ pub struct Config {
/// Session delivery of the `memoria` plugin (`[memoria]`).
pub memoria_delivery: MemoriaDeliveryConfig,
/// Memory anchors to code symbols, checked locally (`[memoria] anchors`).
pub memoria_anchors: bool,
/// Local code graph and the `code_graph` tool (`[code_graph]`).
pub code_graph: CodeGraphConfig,
/// Idle timeout for unsubscribed app-server threads.
pub thread_unload_delay: Duration,
@@ -4295,6 +4319,23 @@ impl Config {
.clamp(1, 1440),
}
};
let memoria_anchors = cfg
.memoria
.as_ref()
.and_then(|memoria| memoria.anchors)
.unwrap_or(true);
let code_graph = {
let defaults = CodeGraphConfig::default();
let toml = cfg.code_graph.clone().unwrap_or_default();
CodeGraphConfig {
enabled: toml.enabled.unwrap_or(defaults.enabled),
repo_map: toml.repo_map.unwrap_or(defaults.repo_map),
max_output_tokens: toml
.max_output_tokens
.unwrap_or(defaults.max_output_tokens)
.clamp(300, 4000),
}
};
let background_terminal_max_timeout = cfg
.background_terminal_max_timeout
.unwrap_or(DEFAULT_MAX_BACKGROUND_TERMINAL_TIMEOUT_MS)
@@ -4896,6 +4937,8 @@ impl Config {
announce_nudges,
memoria_briefing,
memoria_delivery,
memoria_anchors,
code_graph,
thread_unload_delay,
ghost_snapshot,
multi_agent_v2,