Documentation
¶
Index ¶
- Variables
- type ApprovalMode
- type ApprovalRequirement
- type CatalogKind
- type CatalogSource
- type ConflictError
- type FeatureGate
- type FileStorePath
- type HookRequirement
- type Layer
- type ModelChoice
- type Requirements
- type Source
- type Sourced
- type SourcedHooks
- type SourcedToolPolicy
- type ToolPolicyRequirement
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLayer = errors.New("requirements: invalid layer") ErrConflict = errors.New("requirements: conflicting layers") )
Functions ¶
This section is empty.
Types ¶
type ApprovalMode ¶
type ApprovalMode string
const ( ApprovalUnspecified ApprovalMode = "" ApprovalNever ApprovalMode = "never" ApprovalOnRequest ApprovalMode = "on_request" ApprovalAlways ApprovalMode = "always" )
type ApprovalRequirement ¶
type ApprovalRequirement struct {
Mode ApprovalMode
}
type CatalogKind ¶
type CatalogKind string
const ( CatalogPlugin CatalogKind = "plugin" CatalogAgent CatalogKind = "agent" CatalogSkill CatalogKind = "skill" )
type CatalogSource ¶
type CatalogSource struct {
Name string
Kind CatalogKind
Path string
URI string
}
type ConflictError ¶
type ConflictError struct {
Field string
ExistingSource Source
IncomingSource Source
Message string
}
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
func (*ConflictError) Is ¶
func (e *ConflictError) Is(target error) bool
type FeatureGate ¶
type FileStorePath ¶
type HookRequirement ¶
type HookRequirement struct {
Config hooks.Config
Hooks []hooks.CommandHook
}
type Layer ¶
type Layer struct {
Source Source
Approval *ApprovalRequirement
ToolPolicy *ToolPolicyRequirement
Hooks *HookRequirement
MCPServers []mcp.ServerConfig
Catalogs []CatalogSource
Models []ModelChoice
FileStores []FileStorePath
FeatureGates []FeatureGate
}
type ModelChoice ¶
type Requirements ¶
type Requirements struct {
Approval *Sourced[ApprovalRequirement] `json:"approval,omitempty"`
ToolPolicy SourcedToolPolicy `json:"tool_policy"`
Hooks SourcedHooks `json:"hooks"`
MCPServers map[string]Sourced[mcp.ServerConfig] `json:"mcp_servers,omitempty"`
Catalogs map[string]Sourced[CatalogSource] `json:"catalogs,omitempty"`
Models map[string]Sourced[ModelChoice] `json:"models,omitempty"`
FileStores map[string]Sourced[FileStorePath] `json:"file_stores,omitempty"`
FeatureGates map[string]Sourced[FeatureGate] `json:"feature_gates,omitempty"`
}
func Compose ¶
func Compose(layers ...Layer) (Requirements, error)
func (Requirements) CommandPolicyConfig ¶
func (r Requirements) CommandPolicyConfig() tools.CommandPolicyConfig
func (Requirements) HookRuntimeConfig ¶
func (r Requirements) HookRuntimeConfig() (hooks.Config, []hooks.CommandHook)
type Source ¶
type SourcedHooks ¶
type SourcedToolPolicy ¶
type SourcedToolPolicy struct {
DefaultDecision *Sourced[tools.DecisionCode] `json:"default_decision,omitempty"`
ResolveHostExecutables *Sourced[bool] `json:"resolve_host_executables,omitempty"`
Rules []Sourced[tools.CommandRule] `json:"rules,omitempty"`
HostExecutables []Sourced[tools.HostExecutable] `json:"host_executables,omitempty"`
}
type ToolPolicyRequirement ¶
type ToolPolicyRequirement struct {
DefaultDecision tools.DecisionCode
ResolveHostExecutables *bool
Rules []tools.CommandRule
HostExecutables []tools.HostExecutable
}
Click to show internal directories.
Click to hide internal directories.