memory

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 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 writes a record keyed by memory.name: update_mask names the fields to write, allow_missing decides whether an absent name is created or answered NotFound.

An ABSENT mask means every field here rather than the fields the request populated, because this caller is a person editing a form that submits every box it shows, so an emptied one has to clear the field instead of reading as unchanged.

Jump to

Keyboard shortcuts

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