Documentation
¶
Index ¶
- func Apply(ctx context.Context, cfg *Config, adapters *host.AdapterRegistry, ...) error
- func ApplySkillLookups(_ context.Context, cfg *Config, registry *skills.Registry) error
- func ApplySkillProviders(_ context.Context, cfg *Config, registry *skills.Registry, ...) error
- func ApplyWithOptions(ctx context.Context, cfg *Config, adapters *host.AdapterRegistry, ...) error
- func EventCallbackSink(cfg *Config, client *http.Client) engine.EventSink
- func HasEventProtocolV2(cfg *Config) bool
- func ModelCredentialManager(cfg *Config, store agentcore.Store) (*modelauth.Manager, error)
- func RequiresRunModelCredentials(cfg *Config, appID string) bool
- func ResolveTokenEnv(cfg *Config, getenv func(string) string)
- func UsesEventProtocolV2(cfg *Config, appID string) bool
- func Validate(cfg *Config) error
- func ValidateRunModelEndpoint(cfg *Config, appID string, model *sdk.RunModel) error
- type App
- type AppHealth
- type AppSummary
- type ApplyOptions
- type ArtifactProvider
- type BrowserConfig
- type ComponentHealth
- type ComponentSummary
- type Config
- type EventCallback
- type MCPProvider
- type ModelCredentialCallback
- type ModelEndpoint
- type SkillProvider
- type WorkspaceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySkillLookups ¶
func ApplySkillProviders ¶
func ApplyWithOptions ¶
func EventCallbackSink ¶
EventCallbackSink builds the app-scoped HTTP delivery sink from the resolved application configuration. Apps without event_callbacks do not receive HTTP events; global log/NATS delivery is configured independently.
func HasEventProtocolV2 ¶
HasEventProtocolV2 reports whether any configured host app requires the v2 publisher. Callers use it to reject a startup that would otherwise persist v2 events without delivering them to the host projection.
func ModelCredentialManager ¶
func RequiresRunModelCredentials ¶
RequiresRunModelCredentials reads trusted per-app policy. Omitted policy preserves standalone and existing host integrations' default-key behavior.
func ResolveTokenEnv ¶
func UsesEventProtocolV2 ¶
UsesEventProtocolV2 reports whether an app opted into the durable ordered event protocol. An omitted value deliberately remains v1 for compatibility.
Types ¶
type App ¶
type App struct {
MemoryLearningCallback *EventCallback `json:"memory_learning_callback,omitempty" yaml:"memory_learning_callback,omitempty"`
ModelEndpoints []ModelEndpoint `json:"model_endpoints,omitempty" yaml:"model_endpoints,omitempty"`
RequireRunModelCredentials bool `json:"require_run_model_credentials,omitempty" yaml:"require_run_model_credentials,omitempty"`
ModelCredentialCallback *ModelCredentialCallback `json:"model_credential_callback,omitempty" yaml:"model_credential_callback,omitempty"`
AppID string `json:"app_id" yaml:"app_id"`
EventProtocol string `json:"event_protocol,omitempty" yaml:"event_protocol,omitempty"`
ContextEndpoint string `json:"context_endpoint,omitempty" yaml:"context_endpoint,omitempty"`
ContextToken string `json:"context_token,omitempty" yaml:"context_token,omitempty"`
ContextTokenEnv string `json:"context_token_env,omitempty" yaml:"context_token_env,omitempty"`
EventCallbacks []EventCallback `json:"event_callbacks,omitempty" yaml:"event_callbacks,omitempty"`
MCPProviders []MCPProvider `json:"mcp_providers,omitempty" yaml:"mcp_providers,omitempty"`
WorkspaceProvider *WorkspaceProvider `json:"workspace_provider,omitempty" yaml:"workspace_provider,omitempty"`
SkillProvider *SkillProvider `json:"skill_provider,omitempty" yaml:"skill_provider,omitempty"`
Browser *BrowserConfig `json:"browser,omitempty" yaml:"browser,omitempty"`
}
type AppHealth ¶
type AppHealth struct {
AppID string `json:"app_id"`
Components []ComponentHealth `json:"components"`
}
type AppSummary ¶
type AppSummary struct {
ModelEndpoints []sdk.ModelEndpoint `json:"model_endpoints,omitempty"`
RequireRunModelCredentials bool `json:"require_run_model_credentials"`
AppID string `json:"app_id"`
Components []ComponentSummary `json:"components"`
}
func Summaries ¶
func Summaries(cfg *Config) []AppSummary
func SummaryForApp ¶
func SummaryForApp(cfg *Config, appID string) *AppSummary
type ApplyOptions ¶
type ArtifactProvider ¶
type ArtifactProvider struct {
Transport string `json:"transport,omitempty" yaml:"transport,omitempty"`
UploadEndpoint string `json:"upload_endpoint" yaml:"upload_endpoint"`
Token string `json:"token,omitempty" yaml:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty" yaml:"token_env,omitempty"`
}
type BrowserConfig ¶
type BrowserConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
AllowedDomains []string `json:"allowed_domains,omitempty" yaml:"allowed_domains,omitempty"`
ArtifactProvider *ArtifactProvider `json:"artifact_provider,omitempty" yaml:"artifact_provider,omitempty"`
}
BrowserConfig opts one host application into the shared browser runtime. Policy and artifact persistence are app-scoped so a multi-app deployment never reuses another host's domains, credentials, or storage endpoint.
type ComponentHealth ¶
type ComponentHealth struct {
ComponentSummary
Status string `json:"status"`
HTTPStatus int `json:"http_status,omitempty"`
Error string `json:"error,omitempty"`
}
type ComponentSummary ¶
type Config ¶
type Config struct {
Apps []App `json:"apps" yaml:"apps"`
}
func Decode ¶
Decode accepts JSON or YAML. JSON remains the canonical wire format while YAML is convenient for reviewed deployment files.
func LoadFromEnv ¶
type EventCallback ¶
type MCPProvider ¶
type MCPProvider struct {
Name string `json:"name" yaml:"name"`
Transport string `json:"transport" yaml:"transport"`
URL string `json:"url,omitempty" yaml:"url,omitempty"`
Token string `json:"token,omitempty" yaml:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty" yaml:"token_env,omitempty"`
Command string `json:"command,omitempty" yaml:"command,omitempty"`
Args []string `json:"args,omitempty" yaml:"args,omitempty"`
Env map[string]string `json:"env,omitempty" yaml:"env,omitempty"`
ToolPrefix string `json:"tool_prefix,omitempty" yaml:"tool_prefix,omitempty"`
ToolNamespace string `json:"tool_namespace,omitempty" yaml:"tool_namespace,omitempty"`
AllowedTools []string `json:"allowed_tools,omitempty" yaml:"allowed_tools,omitempty"`
RefreshInterval string `json:"refresh_interval,omitempty" yaml:"refresh_interval,omitempty"`
StartupPolicy string `json:"startup_policy,omitempty" yaml:"startup_policy,omitempty"`
UnknownRefreshCooldown string `json:"unknown_refresh_cooldown,omitempty" yaml:"unknown_refresh_cooldown,omitempty"`
}
type ModelCredentialCallback ¶
type ModelEndpoint ¶
type ModelEndpoint struct {
ID string `json:"id" yaml:"id"`
BaseURL string `json:"base_url" yaml:"base_url"`
AuthMode string `json:"auth_mode" yaml:"auth_mode"`
AllowHTTP bool `json:"allow_http,omitempty" yaml:"allow_http,omitempty"`
}
ModelEndpoint approves one immutable destination/authentication binding. HTTP is opt-in for local/private installations; no run flag can enable it.
type SkillProvider ¶
type SkillProvider struct {
Transport string `json:"transport" yaml:"transport"`
BaseURL string `json:"base_url" yaml:"base_url"`
Token string `json:"token,omitempty" yaml:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty" yaml:"token_env,omitempty"`
PackageBaseURL string `json:"package_base_url,omitempty" yaml:"package_base_url,omitempty"`
PackageToken string `json:"package_token,omitempty" yaml:"package_token,omitempty"`
PackageTokenEnv string `json:"package_token_env,omitempty" yaml:"package_token_env,omitempty"`
}
type WorkspaceProvider ¶
type WorkspaceProvider struct {
Transport string `json:"transport" yaml:"transport"`
BaseURL string `json:"base_url" yaml:"base_url"`
Token string `json:"token,omitempty" yaml:"token,omitempty"`
TokenEnv string `json:"token_env,omitempty" yaml:"token_env,omitempty"`
RootDir string `json:"root_dir,omitempty" yaml:"root_dir,omitempty"`
}