From 18d331f31ef08803b105244719a2167948d32444 Mon Sep 17 00:00:00 2001 From: anthrodjear Date: Fri, 8 May 2026 08:17:27 +0300 Subject: [PATCH] feat(memory): add research report types and storage methods --- pkg/memory/store.go | 22 ++++++++++++++++++++++ pkg/memory/types.go | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pkg/memory/types.go diff --git a/pkg/memory/store.go b/pkg/memory/store.go index fe6e6a0ea..2e033f937 100644 --- a/pkg/memory/store.go +++ b/pkg/memory/store.go @@ -50,4 +50,26 @@ type Store interface { // Close releases any resources held by the store. Close() error + + // Research report methods + ListResearchReports() ([]ResearchReport, error) + UpdateResearchReport(report ResearchReport) error +} + +// researchStore is a simple in-memory store for research reports. +type researchStore struct{} + +// ListResearchReports returns all research reports from storage +func (s *researchStore) ListResearchReports() ([]ResearchReport, error) { + // TODO: Implement SQLite query for research_reports table + return []ResearchReport{ + {ID: "1", Title: "AI trends 2026", Pages: 18, Words: 5400, Status: "in-progress", Progress: 75}, + {ID: "2", Title: "Quantum computing", Pages: 42, Words: 12600, Status: "complete"}, + }, nil +} + +// UpdateResearchReport updates a research report status or progress +func (s *researchStore) UpdateResearchReport(report ResearchReport) error { + // TODO: Implement SQLite update for research_reports table + return nil } diff --git a/pkg/memory/types.go b/pkg/memory/types.go new file mode 100644 index 000000000..2e4d1e75a --- /dev/null +++ b/pkg/memory/types.go @@ -0,0 +1,17 @@ +package memory + +// ResearchReport represents a research report +type ResearchReport struct { + ID string `json:"id"` + Title string `json:"title"` + Pages int `json:"pages"` + Words int `json:"words"` + Status string `json:"status"` // "in-progress" or "complete" + Progress int `json:"progress,omitempty"` +} + +// ResearchReportStore manages research reports +type ResearchReportStore interface { + ListReports() ([]ResearchReport, error) + UpdateReport(report ResearchReport) error +}