Documentation
¶
Index ¶
- Constants
- type Backend
- type Option
- type Provider
- func (p *Provider) Initialize(ctx context.Context, init memcontract.ProviderInit) error
- func (p *Provider) OnMemoryWrite(ctx context.Context, rec memcontract.WriteRecord) error
- func (p *Provider) OnPreCompress(ctx context.Context, _ memcontract.PreCompressRequest) (memcontract.PreCompressHint, error)
- func (p *Provider) OnSessionEnd(ctx context.Context, _ memcontract.SessionEndRecord) error
- func (p *Provider) OnSessionSwitch(ctx context.Context, _ memcontract.SessionSwitchRecord) error
- func (p *Provider) Prefetch(ctx context.Context, _ memcontract.PrefetchRequest) error
- func (p *Provider) Recall(ctx context.Context, req memcontract.RecallRequest) (memcontract.RecallResult, error)
- func (p *Provider) Shutdown(ctx context.Context) error
- func (p *Provider) SyncTurn(ctx context.Context, _ memcontract.TurnRecord) error
- func (p *Provider) SystemPromptBlock(ctx context.Context, req memcontract.SnapshotRequest) (memcontract.SnapshotResult, error)
Constants ¶
const Name = "local"
Name is the bundled local MemoryProvider registration name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
EnsureDirs() error
LoadPromptIndex(scope memcontract.Scope) (content string, truncated bool, err error)
List(scope memcontract.Scope) ([]memcontract.Header, error)
Recall(
ctx context.Context,
query memcontract.Query,
opts memcontract.RecallOptions,
) (memcontract.Packaged, error)
ApplyDecision(ctx context.Context, decision memcontract.Decision) error
ForWorkspace(workspaceRoot string) Backend
ForAgent(workspaceID string, agentName string, tier memcontract.AgentTier) Backend
}
Backend is the contract-typed substrate the local provider needs from AGH's memory store without depending on controller or recall internals directly.
type Option ¶
type Option func(*Provider)
Option customizes the bundled local Provider.
func WithLogger ¶
WithLogger injects a provider logger used until Initialize overrides it.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the bundled local MemoryProvider over Store seams.
func (*Provider) Initialize ¶
func (p *Provider) Initialize(ctx context.Context, init memcontract.ProviderInit) error
Initialize prepares local memory directories and records workspace metadata.
func (*Provider) OnMemoryWrite ¶
func (p *Provider) OnMemoryWrite(ctx context.Context, rec memcontract.WriteRecord) error
OnMemoryWrite applies a controller decision through the local store.
func (*Provider) OnPreCompress ¶
func (p *Provider) OnPreCompress( ctx context.Context, _ memcontract.PreCompressRequest, ) (memcontract.PreCompressHint, error)
OnPreCompress returns no local pre-compression hint.
func (*Provider) OnSessionEnd ¶
func (p *Provider) OnSessionEnd(ctx context.Context, _ memcontract.SessionEndRecord) error
OnSessionEnd is a no-op for the bundled local provider.
func (*Provider) OnSessionSwitch ¶
func (p *Provider) OnSessionSwitch(ctx context.Context, _ memcontract.SessionSwitchRecord) error
OnSessionSwitch is a no-op for the bundled local provider.
func (*Provider) Prefetch ¶
func (p *Provider) Prefetch(ctx context.Context, _ memcontract.PrefetchRequest) error
Prefetch is a no-op for the bundled local provider.
func (*Provider) Recall ¶
func (p *Provider) Recall( ctx context.Context, req memcontract.RecallRequest, ) (memcontract.RecallResult, error)
Recall delegates deterministic read-path packaging to the local store.
func (*Provider) Shutdown ¶
Shutdown marks the local provider unavailable for future lifecycle calls.
func (*Provider) SyncTurn ¶
func (p *Provider) SyncTurn(ctx context.Context, _ memcontract.TurnRecord) error
SyncTurn is a no-op for the bundled local provider.
func (*Provider) SystemPromptBlock ¶
func (p *Provider) SystemPromptBlock( ctx context.Context, req memcontract.SnapshotRequest, ) (memcontract.SnapshotResult, error)
SystemPromptBlock returns the prompt-safe local MEMORY.md block for one scope.