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:
2026-03-06 23:02:39 +00:00
parent 37882f1c24
commit 69607b3a65
11 changed files with 981 additions and 11 deletions
+12
View File
@@ -0,0 +1,12 @@
package shellknowledge
import (
"database/sql"
moderncsqlite "modernc.org/sqlite"
)
func init() {
// Register pure-Go SQLite driver as "sqlite3" for tests.
sql.Register("sqlite3", &moderncsqlite.Driver{})
}