moadocs

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package moadocs serves moa's own documentation to the agent.

A user who installed the binary has no copy of the moa repository, so without this the agent can only answer questions about moa from whatever it remembers — which is how confident, wrong answers about flags and config files get produced. The docs travel inside the binary, so they always describe the exact version being run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Description

func Description() string

Description builds the tool description. The page names live here on purpose: every registered tool already costs one line in the system prompt, so listing them inside that line adds no new block, and without them the model does not know an Automation API page exists — it would answer from memory instead of looking it up, which is the whole failure being fixed.

func NewTool

func NewTool() core.Tool

NewTool returns the tool that reads an embedded documentation page.

func Read

func Read(name string) (string, bool)

Read returns the markdown of a page. The name is matched as the agent would write it, with a few forgiving variants ("cli.md", "docs/cli") so a near miss costs a retry instead of a failed answer.

Types

type Page

type Page struct {
	Name  string // "cli", "recipes/linear"
	Title string // first markdown heading
	// contains filtered or unexported fields
}

Page is one documentation page, addressed by the name the agent uses.

func Pages

func Pages() []Page

Pages returns the embedded documentation, ordered for presentation.

Jump to

Keyboard shortcuts

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