toolmeta

package
v0.3.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package toolmeta renders safe, provider-neutral tool progress presentation metadata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDescriptorMetadata

func ValidateDescriptorMetadata(friendlyVerb string, preview string) error

ValidateDescriptorMetadata rejects executable or multiline presentation hints.

Types

type DescriptorLookup

type DescriptorLookup interface {
	LookupToolMetadata(workspaceID string, toolID string) (DescriptorMetadata, bool)
}

DescriptorLookup resolves optional extension or MCP presentation metadata within one workspace.

type DescriptorMetadata

type DescriptorMetadata struct {
	ID           string
	DisplayTitle string
	FriendlyVerb string
	Preview      string
}

DescriptorMetadata is the narrow presentation-only view implemented by tool registries.

type Entry

type Entry struct {
	Verb         string
	Connector    string
	DropsPreview bool
	Emoji        string
	Preview      string
}

Entry is the curated presentation metadata for one native tool family.

func NativeEntry

func NativeEntry(toolID string) (Entry, bool)

NativeEntry returns curated progress metadata for Compozy's native tool namespace.

type Presentation

type Presentation struct {
	ToolID    string
	Label     string
	Preview   string
	Emoji     string
	Connector string
	Fallback  bool
}

Presentation is the daemon-rendered progress chrome sent to bridge adapters.

func Render

func Render(toolID string, rawInput []byte, opts RenderOptions) Presentation

Render builds one redacted presentation payload without exposing raw arguments.

func (Presentation) ProgressFields

func (p Presentation) ProgressFields() (string, string)

ProgressFields returns provider-neutral fields for the bridge SDK renderer.

func (Presentation) String

func (p Presentation) String() string

String renders one human-readable progress line.

type RenderOptions

type RenderOptions struct {
	Descriptor   DescriptorMetadata
	PreviewLimit int
	Verbose      bool
}

RenderOptions controls safe preview rendering.

Jump to

Keyboard shortcuts

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