describe

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDescriptorFile = ".claw-describe.json"

Variables

This section is empty.

Functions

func BuildFeedRegistry

func BuildFeedRegistry(descriptors map[string]*ServiceDescriptor) (map[string]FeedSpec, error)

func ResolveBuildContextDir

func ResolveBuildContextDir(baseDir string, raw interface{}) (string, error)

func ResolveBuildContextFile

func ResolveBuildContextFile(baseDir string, buildRaw interface{}, containerPath string) (string, error)

Types

type AuthDescriptor

type AuthDescriptor struct {
	Type string `json:"type"`
	Env  string `json:"env,omitempty"`
}

type EndpointDescriptor

type EndpointDescriptor struct {
	Method      string `json:"method"`
	Path        string `json:"path"`
	Description string `json:"description,omitempty"`
}

type FeedDescriptor

type FeedDescriptor struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	TTL         int    `json:"ttl"`
	Description string `json:"description,omitempty"`
}

type FeedSpec

type FeedSpec struct {
	Name        string
	Source      string
	Path        string
	TTL         int
	Description string
	Auth        *AuthDescriptor
}

type MemoryDescriptor added in v0.5.0

type MemoryDescriptor struct {
	Recall *MemoryEndpoint `json:"recall,omitempty"`
	Retain *MemoryEndpoint `json:"retain,omitempty"`
	Forget *MemoryEndpoint `json:"forget,omitempty"`
}

type MemoryEndpoint added in v0.5.0

type MemoryEndpoint struct {
	Path string `json:"path"`
}

type ServiceDescriptor

type ServiceDescriptor struct {
	Version     int                  `json:"version"`
	Description string               `json:"description,omitempty"`
	Feeds       []FeedDescriptor     `json:"feeds,omitempty"`
	Tools       []ToolDescriptor     `json:"tools,omitempty"`
	Memory      *MemoryDescriptor    `json:"memory,omitempty"`
	Endpoints   []EndpointDescriptor `json:"endpoints,omitempty"`
	Auth        *AuthDescriptor      `json:"auth,omitempty"`
	Skill       string               `json:"skill,omitempty"`
}

func LoadFromBuildContext

func LoadFromBuildContext(baseDir string, buildRaw interface{}, descriptorPath string) (*ServiceDescriptor, string, error)

func LoadFromFile

func LoadFromFile(path string) (*ServiceDescriptor, error)

func LoadFromImage

func LoadFromImage(imageRef, descriptorPath string) (*ServiceDescriptor, error)

func Parse

func Parse(data []byte) (*ServiceDescriptor, error)

func (*ServiceDescriptor) Validate

func (d *ServiceDescriptor) Validate() error

type ToolDescriptor added in v0.5.0

type ToolDescriptor struct {
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	InputSchema map[string]interface{} `json:"inputSchema"`
	HTTP        *ToolHTTP              `json:"http,omitempty"`
	Annotations map[string]interface{} `json:"annotations,omitempty"`
}

type ToolHTTP added in v0.5.0

type ToolHTTP struct {
	Method  string `json:"method"`
	Path    string `json:"path"`
	Body    string `json:"body,omitempty"`
	BodyKey string `json:"body_key,omitempty"`
}

type ToolRegistry added in v0.5.0

type ToolRegistry map[string][]ToolSpec

func BuildToolRegistry added in v0.5.0

func BuildToolRegistry(descriptors map[string]*ServiceDescriptor) (ToolRegistry, error)

type ToolSpec added in v0.5.0

type ToolSpec struct {
	Name        string
	Service     string
	Description string
	InputSchema map[string]interface{}
	HTTP        *ToolHTTP
	Annotations map[string]interface{}
}

Jump to

Keyboard shortcuts

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