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

agent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleTapping    = "tapping"
	ModuleTappingOff = "tapping_off"
)
View Source
const ModuleChat = "chat"

Variables

This section is empty.

Functions

func BridgeAgentAvailable

func BridgeAgentAvailable() bool

func BridgeAgentChat

func BridgeAgentChat(rpc clientrpc.MaliceRPCClient, sess *client.Session,
	text, model, provider string, maxTurns uint32) (*clientpb.Task, error)

BridgeAgentChat sends a BridgeAgentRequest carrying the selected provider/model from config ai.

func Chat

func Chat(rpc clientrpc.MaliceRPCClient, sess *client.Session, text string) (*clientpb.Task, error)

func ChatCmd

func ChatCmd(cmd *cobra.Command, con *core.Console, args []string) error

func Commands

func Commands(con *core.Console) []*cobra.Command

Commands returns all LLM agent-related commands.

func DispatchChat

func DispatchChat(rpc clientrpc.MaliceRPCClient, sess *client.Session, opts ChatOptions) (*clientpb.Task, error)

func ExecuteBridgeChat

func ExecuteBridgeChat(rpc clientrpc.MaliceRPCClient, sess *client.Session, text string) (*clientpb.Task, error)

ExecuteBridgeChat sends a natural-language chat request through the bridge-backed session path. The bridge injects the message into the hijacked agent session and streams back observe events as LLMEvent spites.

func Register

func Register(con *core.Console)

Register registers callback handlers for agent commands.

func RegisterChatFunc

func RegisterChatFunc(con *core.Console)

func RegisterTappingFunc

func RegisterTappingFunc(con *core.Console)

RegisterTappingFunc registers the tapping command's DoneCallback for parsing LLMEvent spites and formatting them as readable output.

func SkillCmd

func SkillCmd(cmd *cobra.Command, con *core.Console, args []string) error

SkillCmd loads a SKILL.md file, renders its Markdown body, and sends the result through the same unified chat dispatch path as the chat command.

func SkillListCmd

func SkillListCmd(cmd *cobra.Command, con *core.Console) error

SkillListCmd lists all discovered skills.

func SkillNameCompleter

func SkillNameCompleter() carapace.Action

SkillNameCompleter returns a carapace.Action that completes skill names.

func Tapping

func Tapping(rpc clientrpc.MaliceRPCClient, sess *client.Session) (*clientpb.Task, error)

Tapping sends a tapping request to the CLIProxyAPI bridge via ExecuteModule. The bridge acknowledges the module; observe events are continuously forwarded and displayed via the DoneCallback.

func TappingCmd

func TappingCmd(cmd *cobra.Command, con *core.Console) error

TappingCmd handles the tapping command from the CLI.

func TappingOff

func TappingOff(rpc clientrpc.MaliceRPCClient, sess *client.Session) (*clientpb.Task, error)

TappingOff sends a tapping_off request to stop observe event forwarding.

func TappingOffCmd

func TappingOffCmd(cmd *cobra.Command, con *core.Console) error

TappingOffCmd handles the "tapping off" command from the CLI.

Types

type ChatOptions

type ChatOptions struct {
	Text     string
	Model    string
	Provider string
	MaxTurns uint32
}

type Skill

type Skill struct {
	Name        string `yaml:"name"`
	Description string `yaml:"description"`
	Body        string // Markdown content after frontmatter
	Dir         string // directory containing SKILL.md
}

Skill represents a loaded SKILL.md file with parsed frontmatter and body.

func LoadSkill

func LoadSkill(name string) (*Skill, error)

LoadSkill loads a skill by name, searching local > global > embedded.

type SkillInfo

type SkillInfo struct {
	Name        string
	Description string
	Source      string // "local", "global", or "builtin"
}

SkillInfo is a summary returned by DiscoverSkills for listing and completion.

func DiscoverSkills

func DiscoverSkills() []SkillInfo

DiscoverSkills scans local, global, and embedded skills directories. Priority: local > global > builtin (embedded). Same-name skills are deduplicated.

Jump to

Keyboard shortcuts

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