Documentation
¶
Overview ¶
Package capability defines the manifest-based capability catalogue shared by Airlock's broker and agent runtimes. It does not import the root SDK package.
Index ¶
- Constants
- func External(kind Kind, namespace, alias string, operations []string) (map[string]Path, error)
- type AnalyzeImageInput
- type ConnectionRequestInput
- type Definition
- type Discovery
- type EmbedInput
- type FileEditLinesInput
- type FileGrepInput
- type FileLinesInput
- type FileListInput
- type FileNLinesInput
- type FileReadRangeInput
- type FileSedInput
- type FileShareURLInput
- type FileWriteInput
- type GenerateImageInput
- type HTTPRequestInput
- type Kind
- type LineEditInput
- type OutputInput
- type Path
- type PathInput
- type QueryDBInput
- type RequestUpgradeInput
- type SpeakInput
- type Target
- type TranscribeAudioInput
- type TransformInput
- type WebSearchInput
Constants ¶
const ( Air = binding.Air Tool = binding.Tool Connection = binding.Connection Topic = binding.Topic MCP = binding.MCP MaxDirectNameLength = binding.MaxDirectNameLength )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnalyzeImageInput ¶
type ConnectionRequestInput ¶
type ConnectionRequestInput struct {
Method string `json:"method" jsonschema:"description=HTTP method (GET, POST, ...)."`
Path string `json:"path" jsonschema:"description=Path appended to the connection's base URL."`
Body any `` /* 152-byte string literal not displayed */
Headers map[string]string `json:"headers,omitempty"`
}
type Definition ¶
type Definition struct {
Path Path
Target Target
Access wire.Access
Description string
LLMHint string
InputSchema json.RawMessage
OutputSchema json.RawMessage
// TextOutput marks plain-text tool results that must remain strings in JS,
// even when their contents happen to be valid JSON (for example file_read).
TextOutput bool
InputExamples []json.RawMessage
}
Definition is a capability contract, not a grant. The broker intersects the catalogue with the authenticated run's policy before exposing either alias.
func Catalog ¶
func Catalog(manifest wire.AgentManifest, discovery Discovery) ([]Definition, error)
Catalog constructs identities from declarations, never presentation aliases. It rejects collisions across the entire catalogue before policy selection so selecting a subset cannot hide a conflicting definition and escalate access. Declared tools retain their manifest schemas and examples verbatim.
func Fixed ¶
func Fixed() []Definition
Fixed returns the complete fixed inventory, never a caller-selected subset. Directory-specific read/write/list checks still apply at execution time.
type Discovery ¶
type Discovery struct {
MCPSchemas map[string][]wire.MCPToolSchema
}
Discovery contains platform-resolved schemas for declared external MCP servers.
type EmbedInput ¶
type FileEditLinesInput ¶
type FileEditLinesInput struct {
Src string `json:"src"`
Edits []LineEditInput `` /* 156-byte string literal not displayed */
Dst string `json:"dst,omitempty" jsonschema:"description=Optional destination. Pass src to edit in place; omit for an auto scratch path."`
}
type FileGrepInput ¶
type FileGrepInput struct {
Path string `json:"path" jsonschema:"description=Storage path."`
Pattern string `json:"pattern" jsonschema:"description=Regex pattern (RE2)."`
IgnoreCase bool `json:"ignoreCase,omitempty"`
Invert bool `json:"invert,omitempty"`
LineNumbers bool `json:"lineNumbers,omitempty"`
Max int `json:"max,omitempty" jsonschema:"description=Cap matched lines; 0 = default."`
}
type FileLinesInput ¶
type FileListInput ¶
type FileNLinesInput ¶
type FileReadRangeInput ¶
type FileSedInput ¶
type FileShareURLInput ¶
type FileShareURLInput struct {
}
type FileWriteInput ¶
type FileWriteInput struct {
Path string `json:"path"`
Data string `json:"data" jsonschema:"description=UTF-8 text contents. For binary, set base64 instead."`
Base64 string `json:"base64,omitempty" jsonschema:"description=Base64-encoded contents. Mutually exclusive with data."`
ContentType string `json:"contentType,omitempty"`
}
type GenerateImageInput ¶
type HTTPRequestInput ¶
type HTTPRequestInput struct {
URL string `json:"url"`
Method string `json:"method,omitempty" jsonschema:"description=Defaults to GET."`
Headers map[string]string `json:"headers,omitempty"`
Body string `json:"body,omitempty" jsonschema:"description=Request body. JSON-encode objects yourself; Content-Type is not auto-set."`
Timeout int `json:"timeout,omitempty"`
SaveAs string `` /* 143-byte string literal not displayed */
Raw bool `json:"raw,omitempty" jsonschema:"description=Skip HTML to markdown conversion (default is to convert HTML)."`
AllHeaders bool `json:"allHeaders,omitempty"`
}
type LineEditInput ¶
type LineEditInput struct {
From int `json:"from,omitempty" jsonschema:"description=1-based start line. Required unless 'append' is set."`
Count int `json:"count,omitempty" jsonschema:"description=Lines from 'from' to operate on. 0 with text = insert before 'from'."`
Text string `json:"text,omitempty" jsonschema:"description=Replacement / insertion text."`
Append string `json:"append,omitempty" jsonschema:"description=When set, append this text to the end of the file."`
}
type OutputInput ¶
type OutputInput struct {
Parts []wire.DisplayPart `` /* 241-byte string literal not displayed */
}
type PathInput ¶
type PathInput struct {
Path string `` /* 157-byte string literal not displayed */
}
These input contracts are shared by catalogue schemas and app executors.
type QueryDBInput ¶
type RequestUpgradeInput ¶
type RequestUpgradeInput struct {
Description string `json:"description"`
}
type SpeakInput ¶
type TranscribeAudioInput ¶
type TransformInput ¶
type TransformInput struct {
Src string `json:"src" jsonschema:"description=Source storage path."`
Codec string `json:"codec" jsonschema:"description=Codec name (base64, base64url, hex, gzip; or a charset for fileDecodeText)."`
Dst string `json:"dst,omitempty" jsonschema:"description=Optional destination path. Omit for an auto scratch path. Must differ from src."`
}