memory

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package memory is the console-facing MemoryService handler: an observable, editable view over the durable handoff-journal entries the MCP magus_memory tool writes. It is a second door onto the EXACT on-disk store that tool maintains (internal/memory, aliased `store` here), never a second store of its own, so the browser edit surface and the agent-facing tool share one set of records. Its reason to exist: an agent can accumulate stale or bloated records, and a human list/edit/delete surface is the safety valve.

A record's body/refs are AGENT-WRITTEN and therefore UNTRUSTED: clients must render them as text, never as trusted HTML. The daemon mounts this on the loopback listener behind the same bearer guard as the other console services and never on the LAN share listener.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements memoryv1alpha1connect.MemoryServiceHandler over the on-disk record store.

func NewService

func NewService(ws workspace) *Service

NewService builds a MemoryService handler over the workspace ws.

func (*Service) DeleteMemory

DeleteMemory removes a record by name. allow_missing=true makes deleting an absent record a no-op; otherwise an absent record is NotFound. Any other failure is a storage error.

func (*Service) GetCursor added in v0.3.0

GetCursor returns a legacy cursor snapshot for migration. New handoffs use named entries.

func (*Service) ListMemories added in v0.3.0

ListMemories returns every record in full. Pagination is wired in the contract but the store returns all records today, so next_page_token is always empty.

func (*Service) UpdateCursor added in v0.3.0

UpdateCursor rejects global cursor writes: a shared single snapshot lets one session erase another's handoff. The RPC remains in the schema so older consoles receive a migration hint.

func (*Service) UpdateMemory added in v0.3.0

UpdateMemory upserts a record keyed by memory.name. allow_missing=true creates the record when absent (the upsert); allow_missing=false rejects an absent record with NotFound. Only a full replace is supported, so a non-empty update_mask is rejected rather than silently dropping the fields the mask omits.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL