Documentation
¶
Overview ¶
Package fileconfig provides file-backed SDK host configuration.
The loader accepts CRD-shaped ModeTemplate YAML and plain mode specs, while exposing only SDK-native types to clients. Built-in "chat" and "plan" modes are always available and can be overridden by files of the same name.
Index ¶
- func BuildModeDirective(spec *sdkmode.TemplateSpec) string
- func BuiltinModes() []sdkmode.TemplateSpec
- func DefaultRootDir() string
- func LoadRoleCatalog(dir string) (agentsdk.RoleCatalog, error)
- type Option
- type Source
- func (s *Source) AgentDir() string
- func (s *Source) GetMode(ctx context.Context, name string) (*sdkmode.TemplateSpec, error)
- func (s *Source) GuardrailRules(context.Context) ([]agentsdk.GuardrailRule, error)
- func (s *Source) HandoffHistory(context.Context) ([]agentsdk.RunItem, error)
- func (s *Source) ListModes(ctx context.Context) ([]sdkmode.TemplateSpec, error)
- func (s *Source) ModeDir() string
- func (s *Source) ModeDirective(ctx context.Context) (string, error)
- func (s *Source) ModeSnapshot(ctx context.Context) (*sdkmode.TemplateSpec, error)
- func (s *Source) PermissionMode(ctx context.Context) (agentsdk.PermissionMode, error)
- func (s *Source) RoleCatalog(ctx context.Context) (agentsdk.RoleCatalog, error)
- func (s *Source) RootDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildModeDirective ¶
func BuildModeDirective(spec *sdkmode.TemplateSpec) string
func BuiltinModes ¶ added in v0.0.36
func BuiltinModes() []sdkmode.TemplateSpec
BuiltinModes returns the built-in mode templates shipped with the SDK. "chat" is the interactive default; "plan" is a read-only planning preset. Files in the modes directory override built-ins of the same name.
func DefaultRootDir ¶
func DefaultRootDir() string
func LoadRoleCatalog ¶
func LoadRoleCatalog(dir string) (agentsdk.RoleCatalog, error)
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source loads modes, roles, and host configuration from a config directory.
Directory layout:
~/.gratefulagents/ modes/*.yaml agents/*.md
func (*Source) GuardrailRules ¶
func (*Source) HandoffHistory ¶
func (*Source) ModeDirective ¶ added in v0.0.36
func (*Source) ModeSnapshot ¶
func (*Source) PermissionMode ¶
func (*Source) RoleCatalog ¶
Click to show internal directories.
Click to hide internal directories.