agents

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAgent

func CreateAgent(name, scope string) error

CreateAgent creates a new agent directory under ~/.agents/agents/<scope>/<name>/.

func ImportAgentIn

func ImportAgentIn(deps Deps, name, projectPath string) error

ImportAgentIn links ~/.agents/agents/<project>/<name>/ into the repo as symlinks and ensures .agentsrc.json lists the agent.

func NewAgentsCmd

func NewAgentsCmd(deps Deps) *cobra.Command

NewAgentsCmd builds the `da agents` command tree from injected dependencies.

func PromoteAgentIn

func PromoteAgentIn(name, projectPath string, force bool) error

PromoteAgentIn promotes a repo-local agent (.agents/agents/<name>/) into the shared agents store. The canonical location (~/.agents/agents/<project>/<name>/) becomes the real directory, and the repo-local path is converted to a managed symlink pointing at it.

func RemoveAgentIn

func RemoveAgentIn(deps Deps, name, projectPath string, purge bool) error

RemoveAgentIn removes managed repo symlinks for an agent, drops the name from .agentsrc.json when listed, and optionally deletes the canonical directory.

Types

type Deps

type Deps struct {
	Flags                 GlobalFlags
	ErrorWithHints        func(message string, hints ...string) error
	UsageError            func(message string, hints ...string) error
	MaximumNArgsWithHints func(n int, hints ...string) cobra.PositionalArgs
	RangeArgsWithHints    func(min, max int, hints ...string) cobra.PositionalArgs
	ExactArgsWithHints    func(n int, hints ...string) cobra.PositionalArgs
}

Deps carries UX helpers from commands without an import cycle.

type GlobalFlags

type GlobalFlags struct {
	Yes bool
}

GlobalFlags mirrors the subset of commands.Flags used by agents subcommands.

Jump to

Keyboard shortcuts

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