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

bundle

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIconRef

func DefaultIconRef(service string) string

DefaultIconRef returns an iconRef for well-known built-in tool services. UI is expected to resolve these IDs to PNG assets.

func ResolveDefinitions

func ResolveDefinitions(b *Bundle, matchFn func(pattern string) []*llm.ToolDefinition) []llm.ToolDefinition

ResolveDefinitions expands bundle match rules into concrete tool definitions using matchFn. It applies rule-level excludes and de-duplicates by canonical tool name.

Types

type Bundle

type Bundle struct {
	ID          string `yaml:"id" json:"id"`
	Title       string `yaml:"title,omitempty" json:"title,omitempty"`
	Description string `yaml:"description,omitempty" json:"description,omitempty"`

	// IconRef refers to a built-in icon identifier (UI-owned mapping).
	IconRef string `yaml:"iconRef,omitempty" json:"iconRef,omitempty"`
	// IconURI references a workspace-local image (workspace://... only).
	IconURI string `yaml:"iconURI,omitempty" json:"iconURI,omitempty"`

	Priority int `yaml:"priority,omitempty" json:"priority,omitempty"`

	Match []llm.Tool `yaml:"match,omitempty" json:"match,omitempty"`
}

Bundle groups tool patterns into a selectable unit. Bundles are global (workspace) and may be referenced by ID from agents or runtime inputs.

func DeriveBundles

func DeriveBundles(defs []llm.ToolDefinition) []*Bundle

DeriveBundles groups concrete tool definitions by their service name and returns a default bundle list. It is used when no workspace bundles exist.

func (*Bundle) Validate

func (b *Bundle) Validate() error

type ResolveResult

type ResolveResult struct {
	Definitions  []llm.ToolDefinition
	ApprovalByID map[string]*llm.ApprovalConfig
	AsyncByID    map[string]*llm.Tool
}

func ResolveDefinitionsWithOptions

func ResolveDefinitionsWithOptions(b *Bundle, matchFn func(pattern string) []*llm.ToolDefinition) ResolveResult

ResolveDefinitionsWithOptions expands bundle match rules and returns both definitions and per-tool approval config.

Jump to

Keyboard shortcuts

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