MCPcopy Create free account
hub / github.com/compozy/agh / MemoryHistory

Method MemoryHistory

internal/api/core/memory.go:108–126  ·  view source on GitHub ↗

MemoryHistory returns bounded, redacted memory operation history.

(c *gin.Context)

Source from the content-addressed store, hash-verified

106
107// MemoryHistory returns bounded, redacted memory operation history.
108func (h *BaseHandlers) MemoryHistory(c *gin.Context) {
109 if h.MemoryStore == nil {
110 h.respondMemoryError(c, http.StatusInternalServerError, errors.New("memory store is not configured"), nil)
111 return
112 }
113
114 query, err := parseMemoryHistoryQuery(c)
115 if err != nil {
116 h.respondMemoryError(c, StatusForMemoryError(err), err, nil)
117 return
118 }
119 records, err := h.MemoryStore.History(c.Request.Context(), query)
120 if err != nil {
121 h.respondMemoryError(c, StatusForMemoryError(err), err, nil)
122 return
123 }
124
125 c.JSON(http.StatusOK, contract.MemoryOperationHistoryResponse{Operations: MemoryOperationHistoryPayloads(records)})
126}
127
128// MemoryScopeShow reports the effective selector and precedence chain.
129func (h *BaseHandlers) MemoryScopeShow(c *gin.Context) {

Callers

nothing calls this directly

Calls 5

respondMemoryErrorMethod · 0.95
parseMemoryHistoryQueryFunction · 0.85
StatusForMemoryErrorFunction · 0.85
HistoryMethod · 0.65

Tested by

no test coverage detected