Files
archie/internal/memory/backup.go
T
sam bc1caf67aa feat: BasePlatformAdapter interface + Session types (16.3, 16.5, 16.9, 16.10, 16.11)
adapter.go — SendResult struct (success, message_id, error, retryable,
retry_after, continuation_message_ids, error_kind), ChatInfo struct
(name, type, chat_id, thread_id), BasePlatformAdapter interface
(Connect, Disconnect, Send, ChatInfo).

session.go — SessionSource (platform, chat_id/name/type, user_id/name,
thread_id, guild_id, scope_id, profile, is_bot, metadata) with Key()
for deterministic session key. SessionContext wrapping source with
connected_platforms, home_channels, session_key/id, timestamps.

session_store.go — SessionStore interface (GetOrCreate, Get, Reset,
List, GetByChannel, Touch, Delete, Close) + nellSessionStore backed
by nell.DocDB with mutex-guarded Save/Delete for race safety.

Verification: 4 findings fixed (gofmt alignment, race on mutex,
!= true anti-pattern, missing zero-value assertions). 58 tests pass
(incl -race), go vet + gofmt + golangci-lint clean.

Closes: archie-core-abg.16.3, 16.5, 16.9, 16.10, 16.11
2026-07-26 01:29:36 +10:00

18 lines
864 B
Go

package memory
// ── Backup paths interface ─────────────────────────────────────────────────
//
// Providers that store data outside HERMES_HOME implement BackupProvider so
// the backup/restore workflow can include those external paths.
// BackupProvider is an optional interface for providers that store data
// outside the main HERMES_HOME directory tree. Examples include external
// SQLite databases, vector-store indexes, or key-value stores that live
// at well-known paths elsewhere on the filesystem.
type BackupProvider interface {
// BackupPaths returns absolute file or directory paths that should be
// included in backup/restore workflows. Return an empty slice when the
// provider has no external data to back up.
BackupPaths() []string
}