Core features: - Microkernel architecture with Actor model - Session management with JSONL persistence - Tool system (5 built-in tools) - Skill system with SKILL.md parsing - Sandbox security execution - Ollama integration with gemma4:e4b - Prompt-based tool calling (compatible with native function calling) - REPL interface 11 packages, all tests passing
29 lines
989 B
Go
29 lines
989 B
Go
package session
|
|
|
|
// Store defines the persistence interface for session message storage.
|
|
//
|
|
// Implementations must be safe for concurrent use. The default implementation
|
|
// uses JSONL files (one file per session) with O(1) append writes.
|
|
type Store interface {
|
|
// Save appends a single message to a session's history.
|
|
// Creates the session file if it does not exist.
|
|
Save(sessionID string, msg SessionMessage) error
|
|
|
|
// Load retrieves all messages for a session in chronological order.
|
|
// Returns an error if the session does not exist.
|
|
Load(sessionID string) ([]SessionMessage, error)
|
|
|
|
// List returns all known session IDs.
|
|
List() ([]string, error)
|
|
|
|
// Exists checks whether a session exists in the store.
|
|
Exists(sessionID string) (bool, error)
|
|
|
|
// Archive marks a session as archived (read-only).
|
|
// This is a soft delete that preserves the data.
|
|
Archive(sessionID string) error
|
|
|
|
// Delete removes a session permanently from the store.
|
|
Delete(sessionID string) error
|
|
}
|