feat(agent): 经验记忆 - 按任务相关度排序召回,并过期清理待批准记忆

召回按主题、情境和中文双字命中加权;30天未处理的待批准记忆会在记录和压缩调度时过期,成功计数写入运行态以免事件窗口截断后误拦。
This commit is contained in:
ddcat666
2026-10-08 10:54:40 +08:00
parent 05f90caf78
commit 5acddb9ecb
7 changed files with 229 additions and 28 deletions

View File

@@ -169,9 +169,11 @@ type cloudAgentRuntime struct {
// PiAssistantResponses counts successful assistant message_end events from
// the Pi runtime. Completion must not be inferred from a clean Node exit:
// a provider/session error can otherwise be reported as a successful run.
PiAssistantResponses int `json:"piAssistantResponses,omitempty"`
IsGenerating bool `json:"isGenerating,omitempty"`
LastError string `json:"lastError,omitempty"`
PiAssistantResponses int `json:"piAssistantResponses,omitempty"`
LessonEligibleToolSuccesses int `json:"lessonEligibleToolSuccesses,omitempty"`
RememberLessonSuccesses int `json:"rememberLessonSuccesses,omitempty"`
IsGenerating bool `json:"isGenerating,omitempty"`
LastError string `json:"lastError,omitempty"`
// EmptyOutputEscalated 记录"空输出已经升级重试过几次"(关思考 + 放大输出预算)。
EmptyOutputEscalated int `json:"emptyOutputEscalated,omitempty"`
// StepTimeoutEscalated 记录"单步墙钟到点后已经关思考重试过几次"。