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

systemdoc

package
v0.1.58 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(prefixes []string, uri string) bool

Matches reports whether uri is under any of the provided system prefixes.

func Normalize

func Normalize(uri string) string

Normalize converts various URI/path forms into a comparable workspace/file URI.

func Prefixes

func Prefixes(agent *agmodel.Agent) []string

Prefixes extracts normalized system resource prefixes from the agent definition.

Types

type Resolver

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

Resolver caches system resource prefixes per agent so callers can classify document URIs without reloading agent definitions on every lookup.

func NewResolver

func NewResolver(f agmodel.Finder) *Resolver

NewResolver builds a Resolver backed by the provided agent finder.

func (*Resolver) Clear

func (r *Resolver) Clear(agentID string)

Clear evicts cached prefixes for an agent. Useful in tests.

func (*Resolver) IsSystem

func (r *Resolver) IsSystem(ctx context.Context, agentID, uri string) bool

IsSystem reports whether uri belongs to a system-scoped resource for agentID.

func (*Resolver) Prefixes

func (r *Resolver) Prefixes(ctx context.Context, agentID string) []string

Prefixes returns the cached system prefixes for an agent, loading them when needed.

Jump to

Keyboard shortcuts

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