scan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPromptByURI

func LoadPromptByURI(uri string) (string, error)

func ParseRun

func ParseRun(raw map[string]any) (op.Run, error)

ParseRun 从 yaml map 解析完整的 Run 结构

func ResolveRunPaths

func ResolveRunPaths(baseDir string, run *op.Run)

ResolveRunPaths 解析 run.command 中的相对路径

Types

type ScanOptions

type ScanOptions struct {
	UID     string // resource uid (must be non-empty)
	BaseDir string // base directory for agents/tools/skills
}

type Scanner

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

func NewScanner

func NewScanner(uid, scanDir string) *Scanner

func (*Scanner) Err

func (s *Scanner) Err() error

Err returns hard scanner errors such as explicit id conflicts.

func (*Scanner) Nodes

func (s *Scanner) Nodes() []*op.OpNode

Nodes returns all nodes collected by ScanAgents / ScanTools / ScanSkills.

func (*Scanner) ScanAgents

func (s *Scanner) ScanAgents(dir string, depth int) []*op.OpNode

func (*Scanner) ScanSkills

func (s *Scanner) ScanSkills(dir string, depth int) []*op.OpNode

func (*Scanner) ScanTools

func (s *Scanner) ScanTools(dir string, depth int) []*op.OpNode

func (*Scanner) WithNodeIndexBaseDir

func (s *Scanner) WithNodeIndexBaseDir(baseDir string) *Scanner

func (*Scanner) WithPathAwareAgentDedup

func (s *Scanner) WithPathAwareAgentDedup() *Scanner

WithPathAwareAgentDedup keeps one logical agent visible at multiple workspace paths. This is only for dir agent scan results; global node refresh should still dedup by id.

func (*Scanner) WithRefBaseDir

func (s *Scanner) WithRefBaseDir(baseDir string) *Scanner

WithRefBaseDir overrides the base directory used for @agents/@skills/@tools references.

Jump to

Keyboard shortcuts

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