notes

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Overview

Package notes is the console-facing NotesService handler: a READ-ONLY view over the workspace's human-authored notes, both the shared store in the checkout and the private one on this machine.

It is the deliberate opposite of the memory handler beside it. Memory is agent-written, so a browser edit/delete surface is its safety valve against records nobody curates. A note is human-written, and that guarantee IS its value: a note is the one node class the knowledge graph does not derive from the workspace, so nothing here corroborates it later and its only provenance is the person who wrote it. A browser write would put an unattributable author on that store and undoing it would not restore the guarantee, so this handler has no write path at all - the CLI's `magus notes edit` opens an editor, and that stays the way in.

A note's body is UNTRUSTED in the ordinary sense that it is prose from a file: clients must render it as text, never as trusted HTML. The distinction from memory is about provenance, not about escaping.

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 notesv1alpha1connect.NotesServiceHandler over the on-disk note stores.

func NewService

func NewService(ws workspace, cfg config.Config) *Service

NewService builds a NotesService handler over the workspace ws. cfg carries the two declared store paths; neither is guessed, because a store magus invented would be a location the reader never opted in to.

func (*Service) GetNote

GetNote returns one note in full, including its body. The store is carried in the name ("shared/x", "private/x") rather than inferred: a bare name can exist in both, and the two mean different things to a reader, so guessing which was meant must not happen.

func (*Service) ListNotes

ListNotes returns every note in both stores with its anchors already checked. Pagination is wired in the contract but the store returns all notes today (bounded by its own scan cap), so next_page_token is always empty.

A graph that will not load is NOT a failure here. The structural read - what notes exist, what they say, where they live - stands on its own, and a console that shows nothing because the symbol index is cold is worse than one that shows the notes and admits it could not check them. Every anchor then reports UNVERIFIED, which is a distinct answer from "fine".

Jump to

Keyboard shortcuts

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