resources

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package resources serves read-only MCP resources.

Index

Constants

View Source
const (
	SessionsHistoryURI            = "remindb://sessions/history"
	SessionsHistoryByHashTemplate = "remindb://sessions/history/{hash}"
)
View Source
const (
	SessionsLogsURI         = "remindb://sessions/logs"
	SessionsLogByIDTemplate = "remindb://sessions/logs/{id}"
)
View Source
const (
	SnapshotsURI           = "remindb://snapshots"
	SnapshotsLimitTemplate = "remindb://snapshots{?limit}"
	SnapshotDiffsTemplate  = "remindb://snapshots/{id}/diffs"
)
View Source
const (
	TreeURI            = "remindb://tree"
	TreeByRootTemplate = "remindb://tree/{rootId}{?depth}"
)
View Source
const DoctorURI = "remindb://doctor"
View Source
const FilesURI = "remindb://files"
View Source
const GraphURI = "remindb://graph"
View Source
const LogsURI = "remindb://logs"
View Source
const OverviewURI = "remindb://overview"
View Source
const RescanURI = "remindb://rescan"
View Source
const SessionsURI = "remindb://sessions"
View Source
const TemperatureURI = "remindb://temperature"

Variables

View Source
var Subscribable = map[string]string{
	"graph":       GraphURI,
	"snapshots":   SnapshotsURI,
	"temperature": TemperatureURI,
	"tree":        TreeURI,
	"files":       FilesURI,
	"logs":        LogsURI,
	"rescan":      RescanURI,
}

Functions

func Register

func Register(srv *gomcp.Server, d *Deps)

Register every read-only resource on the server.

Types

type Deps

type Deps struct {
	Store         *store.Store
	HotThreshold  float64
	ColdThreshold float64
	LogBuffer     *logbuf.Buffer
	Sessions      *session.Registry
	Ledger        *ledger.Ledger
	RescanStatus  *rescanstat.Status
	SessionLogDir string
}

func (*Deps) HandleDoctor

func (*Deps) HandleFiles

func (*Deps) HandleGraph

func (*Deps) HandleLogs

func (*Deps) HandleOverview

func (d *Deps) HandleOverview(ctx context.Context, _ *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleRescan

func (*Deps) HandleSessions

func (d *Deps) HandleSessions(ctx context.Context, _ *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSessionsHistory added in v0.3.5

func (d *Deps) HandleSessionsHistory(ctx context.Context, _ *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSessionsHistoryByHash added in v0.3.5

func (d *Deps) HandleSessionsHistoryByHash(ctx context.Context, req *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSessionsLogByID added in v0.3.5

func (d *Deps) HandleSessionsLogByID(ctx context.Context, req *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSessionsLogs added in v0.3.5

func (d *Deps) HandleSessionsLogs(ctx context.Context, _ *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSnapshotDiffs

func (d *Deps) HandleSnapshotDiffs(ctx context.Context, req *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSnapshots

func (d *Deps) HandleSnapshots(ctx context.Context, _ *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleSnapshotsLimited

func (d *Deps) HandleSnapshotsLimited(ctx context.Context, req *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleTemperature

func (d *Deps) HandleTemperature(ctx context.Context, _ *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

func (*Deps) HandleTree

func (*Deps) HandleTreeByRoot

func (d *Deps) HandleTreeByRoot(ctx context.Context, req *gomcp.ReadResourceRequest) (*gomcp.ReadResourceResult, error)

Jump to

Keyboard shortcuts

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