Documentation
¶
Index ¶
- Constants
- Variables
- func CollectProviderModels(models map[string]string) (map[string][]string, error)
- func GenerateContextDir(runtimeDir string, agents []AgentContextInput) error
- func GenerateToken(agentID string) string
- func InjectCompiledModelPolicy(meta map[string]any, models map[string]string) map[string]any
- func NormalizeProviderID(provider string) string
- func ProviderQualifiedModelRef(ref string) (string, string, bool)
- func ProxyBaseURL(proxyType string) string
- func ProxyHealthcheckBinary(proxyType string) string
- func ProxyImageRef(proxyType string) string
- func ProxyServiceName(proxyType string) string
- func ProxyType(proxyType string) string
- func SplitProviderModelRef(ref string) (string, string, bool)
- type AgentContextInput
- type AllowedModel
- type AuthEntry
- type FeedManifestEntry
- type IngressSurface
- type MemoryManifestEntry
- type MemoryOp
- type ModelPolicy
- type ServiceAuthEntry
- type ToolExecution
- type ToolManifest
- type ToolManifestEntry
- type ToolPolicy
Constants ¶
const ModelPolicyModeClamp = "clamp"
Variables ¶
var DefaultToolPolicy = ToolPolicy{
MaxRounds: 8,
TimeoutPerToolMS: 30000,
TotalTimeoutMS: 120000,
}
Functions ¶
func CollectProviderModels ¶ added in v0.8.5
CollectProviderModels groups declared model refs by normalized provider and emits deterministic provider-prefixed model IDs.
func GenerateContextDir ¶
func GenerateContextDir(runtimeDir string, agents []AgentContextInput) error
GenerateContextDir writes per-agent context files under:
<runtimeDir>/context/<agent-id>/{AGENTS.md,CLAWDAPUS.md,metadata.json,feeds.json,tools.json,memory.json,service-auth/...}
func GenerateToken ¶
GenerateToken returns a bearer token in "<agent-id>:<48-hex-secret>" format.
func InjectCompiledModelPolicy ¶ added in v0.4.3
InjectCompiledModelPolicy clones meta and attaches a compiled model_policy block when the agent declares any MODEL refs.
func NormalizeProviderID ¶ added in v0.8.5
NormalizeProviderID canonicalizes provider aliases that Clawdapus accepts in operator-facing model refs before they are compiled to cllama-facing config.
func ProviderQualifiedModelRef ¶ added in v0.8.5
ProviderQualifiedModelRef returns the normalized provider plus a canonical provider-prefixed model ref for use in cllama-facing runner config.
func ProxyBaseURL ¶ added in v0.2.0
ProxyBaseURL returns the API base URL for a proxy inside the compose network.
func ProxyHealthcheckBinary ¶ added in v0.2.0
ProxyHealthcheckBinary returns the binary path used by compose healthchecks.
func ProxyImageRef ¶ added in v0.2.0
ProxyImageRef returns the default image reference for a proxy type.
func ProxyServiceName ¶ added in v0.2.0
ProxyServiceName returns the compose service name for a proxy type. Passthrough is the canonical default and maps to "cllama".
func SplitProviderModelRef ¶ added in v0.8.5
SplitProviderModelRef splits a provider/model ref and normalizes the provider to the canonical ID Clawdapus uses for cllama wiring. Bare model IDs default to the anthropic provider for compatibility with existing model-ref handling.
Types ¶
type AgentContextInput ¶
type AgentContextInput struct {
AgentID string
AgentsMD string
ClawdapusMD string
Metadata map[string]interface{}
Feeds []FeedManifestEntry
Tools []ToolManifestEntry
Memory *MemoryManifestEntry
ServiceAuth []ServiceAuthEntry
}
type AllowedModel ¶ added in v0.4.3
type FeedManifestEntry ¶ added in v0.3.1
type IngressSurface ¶ added in v0.8.5
type IngressSurface string
const ( IngressSurfaceOpenAIChatCompletions IngressSurface = "openai-chat-completions" IngressSurfaceAnthropicMessages IngressSurface = "anthropic-messages" )
func IngressSurfaceForProvider ¶ added in v0.8.5
func IngressSurfaceForProvider(provider string) IngressSurface
IngressSurfaceForProvider returns the canonical cllama ingress surface a runner should target for the given provider when cllama is enabled.
func (IngressSurface) RequestPath ¶ added in v0.8.5
func (surface IngressSurface) RequestPath() string
RequestPath returns the canonical HTTP path for the ingress surface. Runner config templates and proxy docs should derive paths from this contract instead of duplicating string literals.
type MemoryManifestEntry ¶ added in v0.5.0
type ModelPolicy ¶ added in v0.4.3
type ModelPolicy struct {
Mode string `json:"mode"`
Allowed []AllowedModel `json:"allowed"`
}
func CompileModelPolicy ¶ added in v0.4.3
func CompileModelPolicy(models map[string]string) *ModelPolicy
CompileModelPolicy builds a deterministic per-agent model policy from resolved MODEL directives. Empty refs are ignored. When no valid refs remain, nil is returned and no policy should be emitted.
type ServiceAuthEntry ¶ added in v0.3.1
type ToolExecution ¶ added in v0.5.0
type ToolManifest ¶ added in v0.5.0
type ToolManifest struct {
Version int `json:"version"`
Tools []ToolManifestEntry `json:"tools"`
Policy ToolPolicy `json:"policy"`
}
type ToolManifestEntry ¶ added in v0.5.0
type ToolManifestEntry struct {
Name string `json:"name"`
Description string `json:"description"`
InputSchema map[string]interface{} `json:"inputSchema"`
Annotations map[string]interface{} `json:"annotations,omitempty"`
Execution ToolExecution `json:"execution"`
}