Documentation
¶
Index ¶
- Constants
- func CanRecallGonchoMemoryV1(req GonchoMemoryV1RecallRequest, item GonchoMemoryV1Item) (bool, string)
- func GonchoMemoryV1Checksum(content string) string
- func RenderGonchoMemoryV1Markdown(doc GonchoMemoryV1Document) (string, error)
- func ValidateGonchoMemoryV1Item(item GonchoMemoryV1Item) error
- type GonchoMarkdownConflict
- type GonchoMarkdownExportResult
- type GonchoMarkdownReloadResult
- type GonchoMarkdownStore
- type GonchoMarkdownStoreConfig
- type GonchoMemoryV1Document
- type GonchoMemoryV1Item
- type GonchoMemoryV1RecallRequest
- type SqliteStore
Constants ¶
View Source
const ( GonchoMemoryV1ContractVersion = "1" GonchoMemoryV1MarkdownFormat = "1" GonchoMemoryV1MCPToolContract = "1" )
View Source
const ( CrossChatDecisionAllowed = "allowed" CrossChatDecisionDenied = "denied" CrossChatDecisionDegraded = "degraded" CrossChatFallbackSameChat = "same-chat" )
Variables ¶
This section is empty.
Functions ¶
func CanRecallGonchoMemoryV1 ¶
func CanRecallGonchoMemoryV1(req GonchoMemoryV1RecallRequest, item GonchoMemoryV1Item) (bool, string)
func GonchoMemoryV1Checksum ¶
func RenderGonchoMemoryV1Markdown ¶
func RenderGonchoMemoryV1Markdown(doc GonchoMemoryV1Document) (string, error)
func ValidateGonchoMemoryV1Item ¶
func ValidateGonchoMemoryV1Item(item GonchoMemoryV1Item) error
Types ¶
type GonchoMarkdownConflict ¶
type GonchoMarkdownStore ¶
type GonchoMarkdownStore struct {
Config GonchoMarkdownStoreConfig
// contains filtered or unexported fields
}
func NewGonchoMarkdownStore ¶
func NewGonchoMarkdownStore(db *sql.DB, cfg GonchoMarkdownStoreConfig) *GonchoMarkdownStore
func (*GonchoMarkdownStore) Export ¶
func (s *GonchoMarkdownStore) Export(ctx context.Context) (GonchoMarkdownExportResult, error)
func (*GonchoMarkdownStore) Reload ¶
func (s *GonchoMarkdownStore) Reload(ctx context.Context) (GonchoMarkdownReloadResult, error)
type GonchoMemoryV1Document ¶
type GonchoMemoryV1Document struct {
FormatVersion string `json:"format_version"`
ContractVersion string `json:"contract_version"`
Items []GonchoMemoryV1Item `json:"items"`
}
func ParseGonchoMemoryV1Markdown ¶
func ParseGonchoMemoryV1Markdown(body []byte) (GonchoMemoryV1Document, error)
type GonchoMemoryV1Item ¶
type GonchoMemoryV1Item struct {
MemoryID string `json:"memory_id" yaml:"memory_id"`
Revision int `json:"revision" yaml:"revision"`
AgentID string `json:"agent_id" yaml:"agent_id"`
WorkspaceID string `json:"workspace_id" yaml:"workspace_id"`
PeerID string `json:"peer_id" yaml:"peer_id"`
SessionID string `json:"session_id" yaml:"session_id"`
Scope string `json:"scope" yaml:"scope"`
State string `json:"state" yaml:"state"`
SourceKind string `json:"source_kind" yaml:"source_kind"`
SourceTurnID string `json:"source_turn_id,omitempty" yaml:"source_turn_id,omitempty"`
TombstonedAt string `json:"tombstoned_at,omitempty" yaml:"tombstoned_at,omitempty"`
TombstoneReason string `json:"tombstone_reason,omitempty" yaml:"tombstone_reason,omitempty"`
Checksum string `json:"checksum" yaml:"checksum"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Importance float64 `json:"importance" yaml:"importance"`
CreatedAt string `json:"created_at" yaml:"created_at"`
UpdatedAt string `json:"updated_at" yaml:"updated_at"`
ProvenanceJSON string `json:"provenance_json,omitempty" yaml:"provenance_json,omitempty"`
Content string `json:"content" yaml:"-"`
}
type SqliteStore ¶
type SqliteStore struct {
// contains filtered or unexported fields
}
func OpenSqlite ¶
func (*SqliteStore) DB ¶
func (s *SqliteStore) DB() *sql.DB
Click to show internal directories.
Click to hide internal directories.