ability

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: 3 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 ability is what the agent can do beyond writing from what it already knows. An ability gets the material an activity works from; adding one is a type that implements Ability and a line in main that adds it to the Set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fence

func Fence(text string) string

Fence marks text from outside (a book, an article, a web page) as material, so nothing in it is taken as an instruction.

Types

type Ability

type Ability interface {
	Name() string
	// Describe tells the planner what it is for and what to give as the
	// query, in one line; "" if the planner never chooses it (the journal).
	Describe() string
	Risk() Risk
	Prepare(ctx context.Context, a Act) (Material, error)
}

type Act

type Act struct {
	Intention memory.Intention
	Project   *memory.Project
	Now       time.Time
	Zone      *time.Location
}

func (Act) Query

func (a Act) Query() string

type Chained

type Chained interface {
	Next() []Ability
}

Chained is an ability that can be followed, in the same activity, by another call to the abilities Next returns (a tool, then another from its server: search, then read what it found).

type Continuer

type Continuer interface {
	Continues(p memory.Project) bool
}

Continuer is an ability that carries a project on by itself, like a book being read: an activity on such a project uses it without naming it.

type Material

type Material struct {
	Note     string          // added to System 2's note; fence anything from outside
	Project  *memory.Project // the project, moved on or newly started; saved only if the activity succeeds
	Done     bool
	WorkKind string // "": System 2 chooses
}

type Risk

type Risk int

Risk is what an ability can affect, for the autonomy gate to check.

const (
	Private Risk = iota
	ReadsWeb
	UsesTools // reads through a tool from an MCP server
)

func (Risk) String

func (r Risk) String() string

type Set

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

A nil Set has no abilities.

func NewSet

func NewSet(abilities ...Ability) *Set

func (*Set) For

func (s *Set) For(i memory.Intention, p *memory.Project) (a Ability, ok bool)

For returns the ability an activity uses: the one it names, or else one that carries its project on; nil if it only writes. ok is false if it names an ability the agent doesn't have.

func (*Set) Get

func (s *Set) Get(name string) (Ability, bool)

func (*Set) Names

func (s *Set) Names() []string

func (*Set) Planned

func (s *Set) Planned() []Ability

Directories

Path Synopsis
Package journal is the agent writing its journal at night: a short, honest look back at its day, from what it planned, how that went and what it made.
Package journal is the agent writing its journal at night: a short, honest look back at its day, from what it planned, how that went and what it made.
Package reading is the agent reading books a passage a sitting over many days, and Wikipedia articles at once.
Package reading is the agent reading books a passage a sitting over many days, and Wikipedia articles at once.
Package web is the agent searching and reading the open web, within a daily cap.
Package web is the agent searching and reading the open web, within a daily cap.

Jump to

Keyboard shortcuts

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