Documentation
¶
Index ¶
- func Register(name string, d Driver)
- type ChannelConfig
- type ChannelDMConfig
- type ChannelGuildConfig
- type ChannelInfo
- type ContainerRef
- type Driver
- type GeneratedSkill
- type GuildInfo
- type HandleInfo
- type Health
- type Healthcheck
- type Invocation
- type MaterializeOpts
- type MaterializeResult
- type Mount
- type PostApplyOpts
- type ResolvedClaw
- type ResolvedSkill
- type ResolvedSurface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChannelConfig ¶
type ChannelConfig struct {
Guilds map[string]ChannelGuildConfig // guild ID → routing config
DM ChannelDMConfig
}
ChannelConfig is the full routing config declared in a map-form channel surface. Non-nil only when the pod declares map form (channel://discord: {...}).
type ChannelDMConfig ¶
type ChannelDMConfig struct {
Enabled bool
Policy string // "allowlist", "denylist", or ""
AllowFrom []string // user IDs allowed to DM the bot
}
ChannelDMConfig is the DM routing config for a channel surface.
type ChannelGuildConfig ¶
type ChannelGuildConfig struct {
Policy string // "allowlist", "denylist", or "" (inherit platform default)
Users []string // user IDs for the policy list
RequireMention bool
}
ChannelGuildConfig is the routing config for one guild in a channel surface.
type ChannelInfo ¶
ChannelInfo describes a single channel within a guild.
type ContainerRef ¶
type Driver ¶
type Driver interface {
Validate(rc *ResolvedClaw) error
Materialize(rc *ResolvedClaw, opts MaterializeOpts) (*MaterializeResult, error)
PostApply(rc *ResolvedClaw, opts PostApplyOpts) error
HealthProbe(ref ContainerRef) (*Health, error)
}
Driver translates Clawfile intent into runner-specific enforcement. Fail-closed: Validate runs before compose up, PostApply runs after.
type GeneratedSkill ¶
type GuildInfo ¶
type GuildInfo struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
Channels []ChannelInfo `json:"channels,omitempty"`
}
GuildInfo describes one guild/server/workspace membership.
type HandleInfo ¶
type HandleInfo struct {
ID string `json:"id"`
Username string `json:"username,omitempty"`
Guilds []GuildInfo `json:"guilds,omitempty"`
}
HandleInfo is the full contact card for an agent on a platform. Enables sibling services to mention, message, and route to this agent.
type Healthcheck ¶
type Invocation ¶
type Invocation struct {
Schedule string // 5-field cron expression (e.g., "15 8 * * 1-5")
Message string // agent task payload (agentTurn message)
To string // Discord channel ID for delivery (empty = openclaw uses last channel)
Name string // human-readable job name (optional, derived from message if empty)
}
Invocation is a scheduled agent task resolved from image labels or pod x-claw.invoke.
type MaterializeOpts ¶
type MaterializeResult ¶
type MaterializeResult struct {
Mounts []Mount
Tmpfs []string // paths needing tmpfs (for read_only: true)
Environment map[string]string // additional env vars
Healthcheck *Healthcheck
ReadOnly bool // default: true
Restart string // default: "on-failure"
SkillDir string // container path for skills (e.g., "/claw/skills")
SkillLayout string // "" (flat, default) or "directory" (Claude Code: skills/name/SKILL.md)
}
MaterializeResult describes what the compose generator must add to the service.
type PostApplyOpts ¶
type PostApplyOpts struct {
ContainerID string
}
type ResolvedClaw ¶
type ResolvedClaw struct {
ServiceName string
ImageRef string
ClawType string
Agent string // filename from image labels (e.g., "AGENTS.md")
AgentHostPath string // resolved host path for bind mount
Models map[string]string // slot -> provider/model
Handles map[string]*HandleInfo // platform -> contact card (from x-claw handles block)
PeerHandles map[string]map[string]*HandleInfo // service name -> platform -> HandleInfo for sibling services
Surfaces []ResolvedSurface
Skills []ResolvedSkill
Privileges map[string]string
Configures []string // openclaw config set commands from labels
Invocations []Invocation // scheduled agent tasks from image labels + pod x-claw.invoke
Count int // from pod x-claw (default 1)
Environment map[string]string // from pod environment block
Cllama []string // ordered cllama proxy types (e.g., ["passthrough"])
CllamaToken string // per-agent bearer token injected when cllama is active
}
ResolvedClaw combines image-level claw labels with pod-level x-claw overrides.
type ResolvedSkill ¶
type ResolvedSurface ¶
type ResolvedSurface struct {
Scheme string // channel, service, volume, host, egress
Target string // discord, fleet-master, shared-cache, etc.
AccessMode string // read-only, read-write (for volume/host surfaces)
Ports []string // exposed ports from service definition (service surfaces only)
ChannelConfig *ChannelConfig // non-nil only for map-form channel surfaces
}