feat: NoMemory/Cleaner memory system + doc update

- _sdk_local/ removed (moved to standalone sdk repo)
- internal/agent/core: NoMemory/Cleaner data-flow breakpoints
- internal/memory: clean_text, document store refactor
- internal/plugin/registry.go: plugin API alignment
- docs: PLUGIN_DEV.md, ARCHITECTURE.md NoMemory/Cleaner docs
- plan.md, review.md: status update
This commit is contained in:
JianFeeeee
2026-07-25 11:17:31 +08:00
parent 4a2df503ed
commit 31664a7853
36 changed files with 639 additions and 2488 deletions

View File

@ -220,6 +220,7 @@ func main() {
input, _ := evt.Payload["input"].(string)
response, _ := evt.Payload["response"].(string)
toolsUsed, _ := evt.Payload["tools_used"].([]string)
toolResults, _ := evt.Payload["tool_results"].([]interface{})
agentID, _ := evt.Payload["agent_id"].(string)
if input != "" && textMem != nil {
@ -242,6 +243,15 @@ func main() {
if response != "" && memDB != nil {
distiller.Append("agent", "assistant", response)
}
// 工具输出接入蒸馏管线
for _, tr := range toolResults {
if trMap, ok := tr.(map[string]interface{}); ok {
if text, ok := trMap["output"].(string); ok && text != "" && memDB != nil {
distiller.Append("agent", "tool", text)
}
}
}
}
}
}
@ -423,8 +433,7 @@ func main() {
if err := pluginReg.Load(cfg.Plugin.Dir); err != nil {
log.Printf("[homed] warning: load plugins: %v", err)
}
memory.SetTextCleaner(pluginReg.CleanText)
log.Printf("[homed] stage host ready with %d registered tools, text cleaner set", stageHost.ToolCount())
log.Printf("[homed] stage host ready with %d registered tools", stageHost.ToolCount())
// 日志管理:层级压缩 + 保留策略
logManager := logpkg.NewManager(logDir, cfgReg)

View File

@ -1,21 +0,0 @@
package main
type termios struct {
Iflag uint32
Oflag uint32
Cflag uint32
Lflag uint32
Cc [20]byte
Ispeed uint32
Ospeed uint32
}
const (
TCGETS = 0x5401
TCSETS = 0x5402
ICANON = 0x2
ECHO = 0x8
ISIG = 0x1
VMIN = 6
VTIME = 5
)

View File

@ -1,9 +0,0 @@
//go:build !linux
package main
import "fmt"
func setRawMode(fd int) (func(), error) {
return func() {}, fmt.Errorf("raw terminal mode not supported on this platform")
}