feat: Page AI Reasonix desktop session alignment, settings IA cleanup, knowledge RAG hardening
- ACP client/session manager: Reasonix desktop live session context - Hermes tools: knowledge_rag tool manifest and skill updates - Browser runtime: sidebar page AI permission/profile/render/session/tree modules - Routes: hermes_client, hermes_tools, knowledge_rag, web_shell - Scripts: reasonix ACP wrapper, LightRAG MCP, smoke tasks 159/558/559/561/562 - Skills: mnote-knowledge-rag and mnote-lightrag-bridge SKILL.md updates
This commit is contained in:
@@ -14,6 +14,7 @@ pub fn manifest() -> Value {
|
||||
doc_find_tool(),
|
||||
knowledge_rag_status_tool(),
|
||||
knowledge_rag_query_tool(),
|
||||
knowledge_rag_section_context_tool(),
|
||||
knowledge_rag_open_reference_tool(),
|
||||
block_fetch_tool(),
|
||||
doc_plan_update_tool(),
|
||||
@@ -328,6 +329,14 @@ fn knowledge_rag_query_tool() -> Value {
|
||||
"includeChunkContent".into(),
|
||||
json!({ "type": "boolean", "default": true }),
|
||||
);
|
||||
map.insert(
|
||||
"includeDocumentStructureIndex".into(),
|
||||
json!({
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "返回由 LightRAG sidecar headings 派生的 document_structure_index;适合大书/长文档问题做章节导航和上下文扩展,不替代 references 引用证据。"
|
||||
}),
|
||||
);
|
||||
map.insert(
|
||||
"sourcePaths".into(),
|
||||
json!({
|
||||
@@ -376,6 +385,51 @@ fn knowledge_rag_open_reference_tool() -> Value {
|
||||
})
|
||||
}
|
||||
|
||||
fn knowledge_rag_section_context_tool() -> Value {
|
||||
let mut properties = base_identity_properties();
|
||||
if let Value::Object(map) = &mut properties {
|
||||
map.insert("rootUri".into(), json!({ "type": "string" }));
|
||||
map.insert("sourcePath".into(), json!({ "type": "string" }));
|
||||
map.insert("sourceId".into(), json!({ "type": "string" }));
|
||||
map.insert("lightRagDocId".into(), json!({ "type": "string" }));
|
||||
map.insert("filePath".into(), json!({ "type": "string" }));
|
||||
map.insert("sectionId".into(), json!({ "type": "string" }));
|
||||
map.insert("startBlockOrdinal".into(), json!({ "type": "integer" }));
|
||||
map.insert("endBlockOrdinal".into(), json!({ "type": "integer" }));
|
||||
map.insert("startParagraphOrdinal".into(), json!({ "type": "integer" }));
|
||||
map.insert("endParagraphOrdinal".into(), json!({ "type": "integer" }));
|
||||
map.insert(
|
||||
"contextBefore".into(),
|
||||
json!({ "type": "integer", "default": 1 }),
|
||||
);
|
||||
map.insert(
|
||||
"contextAfter".into(),
|
||||
json!({ "type": "integer", "default": 1 }),
|
||||
);
|
||||
map.insert(
|
||||
"maxBlocks".into(),
|
||||
json!({ "type": "integer", "default": 24 }),
|
||||
);
|
||||
map.insert(
|
||||
"maxChars".into(),
|
||||
json!({ "type": "integer", "default": 12000 }),
|
||||
);
|
||||
}
|
||||
json!({
|
||||
"name": "mnote.knowledge_rag.section_context",
|
||||
"description": "按 documentStructureIndex section 的 block/paragraph range,从 LightRAG native sidecar 拉取有限正文 blocks/chunks,供大书/长文档二次解读;不做检索、重排或 fallback。",
|
||||
"schemaVersion": TOOL_SCHEMA_VERSION,
|
||||
"capabilityScope": ["knowledge_rag.read", "evidence.read"],
|
||||
"status": "available",
|
||||
"annotations": tool_annotations(true, false, true, false),
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"required": ["workspaceId", "rootUri"],
|
||||
"properties": properties
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 旧 local index agent 工具仅保留为历史对照;当前 manifest() 不注册这些工具。
|
||||
#[allow(dead_code)]
|
||||
fn index_status_tool() -> Value {
|
||||
|
||||
Reference in New Issue
Block a user