MCPcopy Create free account
hub / github.com/astercloud/aster / OnAgentStop

Method OnAgentStop

pkg/middleware/logic_memory.go:169–177  ·  view source on GitHub ↗

OnAgentStop Agent 停止时停止事件处理器

(ctx context.Context, agentID string)

Source from the content-addressed store, hash-verified

167
168// OnAgentStop Agent 停止时停止事件处理器
169func (m *LogicMemoryMiddleware) OnAgentStop(ctx context.Context, agentID string) error {
170 // 停止异步事件处理
171 if m.config.AsyncCapture && m.config.EnableCapture {
172 close(m.stopCh)
173 m.wg.Wait()
174 lmLog.Info(context.Background(), "stopped async event processor", map[string]any{"agent_id": agentID})
175 }
176 return nil
177}
178
179// WrapModelCall 包装模型调用,注入 Logic Memory 到 system prompt
180func (m *LogicMemoryMiddleware) WrapModelCall(ctx context.Context, req *ModelRequest, handler ModelCallHandler) (*ModelResponse, error) {

Calls 2

WaitMethod · 0.80
InfoMethod · 0.65

Tested by 1