capability

package
v1.34.18 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package capability negotiates optional PawnKit tool adapters.

Index

Constants

View Source
const ProtocolVersion = 1

Variables

View Source
var (
	ErrUnavailable  = errors.New("capability: tool unavailable")
	ErrIncompatible = errors.New("capability: incompatible protocol")
)

Functions

This section is empty.

Types

type Document

type Document struct {
	ProtocolVersion int      `json:"protocolVersion"`
	Tool            string   `json:"tool"`
	Version         string   `json:"version"`
	Commands        []string `json:"commands"`
}

func Probe

func Probe(ctx context.Context, runner Runner, executable string) (Document, error)

func (Document) Supports

func (d Document) Supports(command string) bool

type OSRunner

type OSRunner struct{}

func (OSRunner) Run

func (OSRunner) Run(ctx context.Context, name string, args ...string) ([]byte, error)

type Runner

type Runner interface {
	Run(context.Context, string, ...string) ([]byte, error)
}

Jump to

Keyboard shortcuts

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