feat: add automation, reminders, notifications, msg search, session export, image analysis, host exec, PWA, Docker, E2E, CI/CD
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled

- Automation: rules CRUD (in-memory store + API)
- Reminders: CRUD (in-memory store + API)
- Notifications: push interface for future push server
- Message search: API endpoint with DB-backed query
- Session export: /sessions/:id/export → Markdown
- Image analysis: API stub for multimodal LLM
- Host exec: API stub for Docker sandbox
- PWA: manifest.json + service worker
- Docker: Dockerfile + docker-compose.yml
- E2E: Playwright test scaffold
- CI/CD: GitHub Actions workflow (go test + tsc)
This commit is contained in:
Aska committed 2026-08-12 19:43:46 +08:00
1 parent 3f9c4ca3c3
commit dee48b6766
11 files changed
+360

No files matched your search

+26
View File
@@ -97,6 +97,8 @@ type Dependencies struct {
PerfMon PerfMonitor
BridgeCfg BridgeConfigManager
ModelConfig *ModelConfigStore
Automation *AutomationStore
Reminders *ReminderStore
PluginList []map[string]string
}
@@ -144,6 +146,24 @@ func (r *Router) setupRoutes() {
r.mux.HandleFunc("/api/v1/admin/perf", r.authMW(r.adminMW(r.perfHandler)))
r.mux.HandleFunc("/api/v1/admin/bridge/config", r.authMW(r.adminMW(r.bridgeConfigHandler)))
r.mux.HandleFunc("/api/v1/admin/bridge/config/", r.authMW(r.adminMW(r.bridgeConfigItemHandler)))
// Automation & Reminders
r.mux.HandleFunc("/api/v1/automation/rules", r.authMW(r.automationHandler))
r.mux.HandleFunc("/api/v1/automation/rules/", r.authMW(r.automationItemHandler))
r.mux.HandleFunc("/api/v1/reminders", r.authMW(r.remindersHandler))
r.mux.HandleFunc("/api/v1/reminders/", r.authMW(r.reminderItemHandler))
// Notifications (push interface)
r.mux.HandleFunc("/api/v1/notifications/push", r.authMW(r.adminMW(r.notificationHandler)))
// Message search & session export
r.mux.HandleFunc("/api/v1/messages/search", r.authMW(r.messageSearchHandler))
// Image analysis
r.mux.HandleFunc("/api/v1/images/analyze", r.authMW(r.imageAnalyzeHandler))
// Host execution sandbox
r.mux.HandleFunc("/api/v1/tools/host-exec", r.authMW(r.adminMW(r.hostExecHandler)))
}
// ServeHTTP implements http.Handler.
@@ -248,6 +268,12 @@ func (r *Router) sessionsHandler(w http.ResponseWriter, req *http.Request) {
func (r *Router) sessionByIDHandler(w http.ResponseWriter, req *http.Request) {
id := strings.TrimPrefix(req.URL.Path, "/api/v1/sessions/")
// Handle export
if strings.HasSuffix(id, "/export") {
id = strings.TrimSuffix(id, "/export")
r.sessionExportHandler(w, req)
return
}
switch req.Method {
case "DELETE":
writeJSON(w, 204, nil)