console

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package console is the owner's mind console: a private live web view of everything about the agent. It writes only what the owner reviews: labels on decisions, and their judgment.

It never shares a server with the public profile page. It listens on localhost, or, anywhere else, only with a token.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(ctx context.Context, addr string, h http.Handler, log *slog.Logger) error

Serve has no write timeout: the live stream stays open.

Types

type Info

type Info struct {
	Name    string
	Tools   []ToolServer
	Skills  []string // "name: description"
	Zone    *time.Location
	Started time.Time
	System1 string
	System2 string
	Sets    []string
}

type Server

type Server struct {
	Info    Info
	Store   Store
	Formats *render.Set // what a work can be downloaded as
	Token   string      // required when set; empty only on localhost
	Log     *slog.Logger
	Poll    time.Duration
}

func (*Server) Handler

func (s *Server) Handler() http.Handler

type Store

type Store interface {
	DecisionLog(ctx context.Context, after time.Time, limit int, newestFirst bool) ([]store.LogEntry, error)
	DecisionChain(ctx context.Context, id ulid.ULID) ([]store.LogEntry, error)
	Vitals(ctx context.Context, since time.Time) (store.Vitals, error)
	CostByDay(ctx context.Context, since time.Time, zone *time.Location) ([]store.DayCost, error)
	Counts(ctx context.Context) (store.Counts, error)
	AllFacts(ctx context.Context, limit int) ([]store.FactView, error)
	AllPeople(ctx context.Context, limit int) ([]memory.Person, error)
	AllProjects(ctx context.Context, limit int) ([]memory.Project, error)
	IntentionsDue(ctx context.Context, from, to time.Time) ([]memory.Intention, error)
	WorksBetween(ctx context.Context, from, to time.Time) ([]memory.Work, error)
	WebLog(ctx context.Context, kind string, limit int) ([]store.WebEntry, error)
	RecentActions(ctx context.Context, limit int) ([]memory.Action, error)
	RecentWorks(ctx context.Context, limit int) ([]memory.Work, error)
	Work(ctx context.Context, id ulid.ULID) (memory.Work, bool, error)
	Conversations(ctx context.Context) ([]memory.Conversation, error)
	RecentExchanges(ctx context.Context, source, thread string, since time.Time, exclude ulid.ULID, limit int) ([]memory.Exchange, error)
	RecentApprovals(ctx context.Context, limit int) ([]memory.Approval, error)
	Labels(ctx context.Context, decisions []ulid.ULID) ([]memory.Label, error)
	SaveLabel(ctx context.Context, l memory.Label) error
	Dreams(ctx context.Context, activeOnly bool) ([]memory.Dream, error)
	Goals(ctx context.Context, activeOnly bool) ([]memory.Goal, error)
	Skills(ctx context.Context) ([]memory.Skill, error)
	RecentEvidence(ctx context.Context, skill string, limit int) ([]memory.Evidence, error)
	LatestWork(ctx context.Context, kind string) (memory.Work, bool, error)
	Lessons(ctx context.Context, skill string, limit int) ([]memory.Lesson, error)
	Plans(ctx context.Context, activeOnly bool) ([]memory.LearningPlan, error)
	Resources(ctx context.Context, plan ulid.ULID) ([]memory.Resource, error)
	Principles(ctx context.Context, status string) ([]memory.Principle, error)
	JudgmentCases(ctx context.Context, status string, types []string) ([]memory.JudgmentCase, error)
	ReviewPrinciple(ctx context.Context, id ulid.ULID, status, text string, at time.Time) (bool, error)
	RankPriority(ctx context.Context, id ulid.ULID, rank int, at time.Time) (bool, error)
	ReviewCase(ctx context.Context, id ulid.ULID, status, reason string, at time.Time) (bool, error)
	RecentCalls(ctx context.Context, status string, limit int) ([]memory.Call, error)
	Agreement(ctx context.Context, n int) ([]memory.Agreement, error)
	AgreementByStakes(ctx context.Context, n int) ([]memory.Agreement, error)
	Call(ctx context.Context, id ulid.ULID) (memory.Call, bool, error)
	AnswerCall(ctx context.Context, c memory.Call, asCase bool) (bool, error)
	GiveCallReason(ctx context.Context, id ulid.ULID, reason string, at time.Time) error
	SetOutcome(ctx context.Context, id ulid.ULID, outcome, verdict, note, by string, at time.Time) (bool, error)
	SaveTaste(ctx context.Context, t memory.Taste) error
	Tastes(ctx context.Context, limit int) ([]memory.Taste, error)
	RetireTaste(ctx context.Context, id ulid.ULID, at time.Time) (bool, error)
}

type ToolServer

type ToolServer struct {
	Name  string   `json:"name"`
	Tools []string `json:"tools"`
	Err   string   `json:"error,omitempty"`
}

ToolServer is an MCP server it was given: the tools it offers, or why none.

Jump to

Keyboard shortcuts

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