Documentation
¶
Index ¶
- Constants
- Variables
- func IsNormalProfile(profile string) bool
- func IsSeedProfile(profile string) bool
- func ProjectID(projectPath string) (string, error)
- func ToolHasArbitraryCode(tool Tool) bool
- type Action
- type CacheKey
- type CacheOptions
- type Catalog
- type CatalogCache
- type Example
- type Exposure
- type LegacyProvider
- type Provider
- type ProviderError
- type Registry
- type RegistryOptions
- type Safety
- type SafetyRule
- type Sender
- type Snapshot
- type Source
- type Tool
- type UnityProvider
Constants ¶
View Source
const ( CatalogSchemaV1 = "hera.tool-catalog/1" FeatureDomainEpochV1 = "domain_epoch_v1" FeatureToolCatalogV1 = "tool_catalog_v1" ContractStrict = "strict" ContractLegacy = "legacy" )
Variables ¶
Functions ¶
func IsNormalProfile ¶
func IsSeedProfile ¶
func ToolHasArbitraryCode ¶
Types ¶
type Action ¶
type Action struct {
Name string `json:"name"`
Description string `json:"description"`
Aliases []string `json:"aliases"`
InputSchema json.RawMessage `json:"input_schema"`
OutputSchema json.RawMessage `json:"output_schema"`
Safety Safety `json:"safety"`
}
type CacheKey ¶
type CacheOptions ¶
type CacheOptions struct {
Root string
MaxEntriesPerProject int
Schemas *schema.CompilerCache
}
type Catalog ¶
type Catalog struct {
SchemaVersion string `json:"schema_version"`
CatalogHash string `json:"catalog_hash"`
DomainEpoch string `json:"domain_epoch"`
ProjectID string `json:"project_id"`
Tools []Tool `json:"tools"`
}
func ParseCatalog ¶
func (*Catalog) SchemaDefinitions ¶
func (catalog *Catalog) SchemaDefinitions() []schema.Definition
type CatalogCache ¶
type CatalogCache struct {
// contains filtered or unexported fields
}
func NewCatalogCache ¶
func NewCatalogCache(options CacheOptions) *CatalogCache
func (*CatalogCache) LoadMatching ¶
func (cache *CatalogCache) LoadMatching(lookup CacheKey) (*Catalog, CacheKey, error)
type LegacyProvider ¶
type LegacyProvider struct {
// contains filtered or unexported fields
}
func NewLegacyProvider ¶
func NewLegacyProvider(sender Sender) *LegacyProvider
type ProviderError ¶
func (*ProviderError) Error ¶
func (err *ProviderError) Error() string
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry(options RegistryOptions) *Registry
type RegistryOptions ¶
type RegistryOptions struct {
Sender Sender
Cache *CatalogCache
Schemas *schema.CompilerCache
}
type Safety ¶
type Safety struct {
RiskClass string `json:"risk_class"`
ReadOnly bool `json:"read_only"`
Destructive bool `json:"destructive"`
Idempotent bool `json:"idempotent"`
MayReloadDomain bool `json:"may_reload_domain"`
RequiresPlayMode bool `json:"requires_play_mode"`
RequiresConfirmation bool `json:"requires_confirmation"`
Reversible bool `json:"reversible"`
SupportsCancellation bool `json:"supports_cancellation"`
SideEffectScope string `json:"side_effect_scope"`
Rules []SafetyRule `json:"rules"`
}
type SafetyRule ¶
type SafetyRule struct {
Operation string `json:"operation"`
When json.RawMessage `json:"when"`
Safety
}
type Snapshot ¶
type Snapshot struct {
Catalog *Catalog
Schemas *schema.CompiledCatalog
Exposure Exposure
FromCache bool
}
type Tool ¶
type Tool struct {
Name string `json:"name"`
Title string `json:"title"`
Description string `json:"description"`
Source Source `json:"source"`
ContractMode string `json:"contract_mode"`
Profiles []string `json:"profiles"`
Aliases []string `json:"aliases"`
Examples []Example `json:"examples"`
InputSchema json.RawMessage `json:"input_schema"`
OutputSchema json.RawMessage `json:"output_schema"`
Actions []Action `json:"actions"`
Safety Safety `json:"safety"`
}
type UnityProvider ¶
type UnityProvider struct {
// contains filtered or unexported fields
}
func NewUnityProvider ¶
func NewUnityProvider(sender Sender) *UnityProvider
Click to show internal directories.
Click to hide internal directories.