Documentation
¶
Overview ¶
Package memory is the public SDK facade over Harbor's internal/memory package — the session-scoped memory store, its strategies, and the LLM-context patch vocabulary (RFC §3.6, §6.6; D-204). Alias-based re-exports only: no behavior lives here. Driver factories, event emission helpers, and Protocol wire projections are deliberately private.
Index ¶
Constants ¶
const ( // HealthHealthy — the store is fully operational. HealthHealthy = internal.HealthHealthy // HealthRetry — transient failures; retrying. HealthRetry = internal.HealthRetry // HealthDegraded — the store is degraded. HealthDegraded = internal.HealthDegraded // HealthRecovering — the store is recovering. HealthRecovering = internal.HealthRecovering )
Health values.
const ( // StrategyNone — no compaction. StrategyNone = internal.StrategyNone // StrategyTruncation — drop-oldest truncation. StrategyTruncation = internal.StrategyTruncation // StrategyRollingSummary — LLM-backed rolling summarisation. StrategyRollingSummary = internal.StrategyRollingSummary )
Strategy values.
const DefaultDriver = internal.DefaultDriver
DefaultDriver is the driver name Open resolves when the config names none.
const OverflowDropOldest = internal.OverflowDropOldest
OverflowDropOldest is the default bounded-buffer overflow policy.
Variables ¶
var ( // ErrNotFound — no record under that key. ErrNotFound = internal.ErrNotFound // ErrIdentityRequired — the identity triple is incomplete. ErrIdentityRequired = internal.ErrIdentityRequired // ErrUnknownDriver — the named memory driver is not registered. ErrUnknownDriver = internal.ErrUnknownDriver // ErrStoreClosed — the store has been closed. ErrStoreClosed = internal.ErrStoreClosed // ErrInvalidSnapshot — the snapshot does not fit the strategy. ErrInvalidSnapshot = internal.ErrInvalidSnapshot )
Re-exported sentinel errors callers compare via errors.Is.
var From = internal.From
From extracts the store from ctx, reporting presence.
var MustFrom = internal.MustFrom
MustFrom extracts the store from ctx, panicking when absent.
var Open = internal.Open
Open resolves the configured memory driver and opens it.
var OpenDriver = internal.OpenDriver
OpenDriver opens a memory driver by explicit name.
var RegisteredDrivers = internal.RegisteredDrivers
RegisteredDrivers lists the seated memory driver names (blank-import sdk/drivers/prod to seat the production set).
var SnapshotFromConfig = internal.SnapshotFromConfig
SnapshotFromConfig projects the operator config block into the resolved ConfigSnapshot Open consumes.
var WithStore = internal.WithStore
WithStore returns a child context carrying the store.
Functions ¶
This section is empty.
Types ¶
type ConfigSnapshot ¶
type ConfigSnapshot = internal.ConfigSnapshot
ConfigSnapshot is the resolved memory configuration.
type ConversationTurn ¶
type ConversationTurn = internal.ConversationTurn
ConversationTurn is one conversational turn in a snapshot.
type LLMContextPatch ¶
type LLMContextPatch = internal.LLMContextPatch
LLMContextPatch is the planner-visible memory projection.
type MemoryStore ¶
type MemoryStore = internal.MemoryStore
MemoryStore is the identity-mandatory memory store interface.
type OverflowPolicy ¶
type OverflowPolicy = internal.OverflowPolicy
OverflowPolicy names the bounded-buffer overflow behavior.
type SummarizeRequest ¶
type SummarizeRequest = internal.SummarizeRequest
SummarizeRequest is the summarizer input.
type SummarizeResponse ¶
type SummarizeResponse = internal.SummarizeResponse
SummarizeResponse is the summarizer output.
type Summarizer ¶
type Summarizer = internal.Summarizer
Summarizer produces rolling summaries for the strategy.
type TrajectoryDigest ¶
type TrajectoryDigest = internal.TrajectoryDigest
TrajectoryDigest is a compacted prior-trajectory digest.