Help us shape the future of Go! Take the 2026 Go Developer Survey

definition

package
v0.4.45 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package definition loads subagent definitions (agents/<name>.md files) and renders them for help output. It is split from runtime/subagent so consumers that only list or inspect definitions do not pull in the execution stack (runtime/agent, session stores, telemetry).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDirs

func DefaultDirs() []string

DefaultDirs returns the dirs scanned when config.dirs is empty.

func Doc

func Doc(ctx context.Context, ws workspace.Service, dirs []string, name string) (string, error)

Doc renders one definition's details, falling back to pluginkit kind docs when no agents/<name>.md file defines it.

func Find

func Find(defs []subagent.Definition, name string) (subagent.Definition, bool)

Find looks up a definition by name, case-insensitively.

func Format

func Format(def capsubagent.Definition) string

Format renders one definition as help text.

func FormatList

func FormatList(ctx context.Context, ws workspace.Service, dirs []string) (string, error)

FormatList renders the registered-definition list for /subagent help output.

func Load

func Load(ctx context.Context, ws workspace.Service, dirs []string) ([]subagent.Definition, error)

Load scans dirs in precedence order and returns subagent definitions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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