feat: añadir sistema de knowledge por agente
Implementa una base de conocimiento persistente por agente siguiendo el patrón pure core / impure shell: - pkg/knowledge/: tipos puros (Document, Store interface) - shell/knowledge/: FileStore con SQLite para indexación y archivos .md - tools/knowledge.go: 4 tools LLM (search, read, write, list) - tools/knowledge_test.go: tests unitarios de las tools - internal/config/schema.go: nuevo KnowledgeToolCfg en ToolsCfg - agents/runtime.go: inicialización del store y registro de tools - agents/*/knowledge/about-me.md: documentos semilla para cada agente Cada agente puede buscar, leer, crear y actualizar documentos de conocimiento. Los archivos .md viven en agents/<id>/knowledge/ y se indexan en SQLite (agents/<id>/data/knowledge.db). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,12 +121,18 @@ type LLMRateLimitCfg struct {
|
||||
// ── Tools ─────────────────────────────────────────────────────────────────
|
||||
|
||||
type ToolsCfg struct {
|
||||
SSH SSHToolCfg `yaml:"ssh"`
|
||||
HTTP HTTPToolCfg `yaml:"http"`
|
||||
Scripts ScriptsCfg `yaml:"scripts"`
|
||||
FileOps FileOpsCfg `yaml:"file_ops"`
|
||||
MCP MCPToolCfg `yaml:"mcp"`
|
||||
Memory MemoryToolCfg `yaml:"memory"`
|
||||
SSH SSHToolCfg `yaml:"ssh"`
|
||||
HTTP HTTPToolCfg `yaml:"http"`
|
||||
Scripts ScriptsCfg `yaml:"scripts"`
|
||||
FileOps FileOpsCfg `yaml:"file_ops"`
|
||||
MCP MCPToolCfg `yaml:"mcp"`
|
||||
Memory MemoryToolCfg `yaml:"memory"`
|
||||
Knowledge KnowledgeToolCfg `yaml:"knowledge"`
|
||||
}
|
||||
|
||||
type KnowledgeToolCfg struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
Dir string `yaml:"dir"` // default: "./knowledge" (relative to agent dir)
|
||||
}
|
||||
|
||||
type SSHToolCfg struct {
|
||||
|
||||
Reference in New Issue
Block a user