Documentation
¶
Index ¶
- Constants
- Variables
- 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 ProxyBaseURL(proxyType string) string
- func ProxyHealthcheckBinary(proxyType string) string
- func ProxyImageRef(proxyType string) string
- func ProxyServiceName(proxyType string) string
- func ProxyType(proxyType string) string
- type AgentContextInput
- type AllowedModel
- type AuthEntry
- type FeedManifestEntry
- 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 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 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. Passthrough uses the consolidated "ghcr.io/mostlydev/cllama:latest" image.
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".
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 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"`
}