pod

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitCompose

func EmitCompose(p *Pod, results map[string]*driver.MaterializeResult, proxies ...CllamaProxyConfig) (string, error)

EmitCompose generates a compose.generated.yml string from pod definition and driver materialization results. Output is deterministic (sorted service names).

func ParseSurface

func ParseSurface(raw string) (driver.ResolvedSurface, error)

ParseSurface parses a raw surface string like "volume://research-cache read-only" into a ResolvedSurface.

Types

type ClawAPIConfig added in v0.3.1

type ClawAPIConfig struct {
	Image              string // e.g. ghcr.io/mostlydev/claw-api:latest
	Addr               string // e.g. :8080
	ManifestHostPath   string // host path to pod-manifest.json
	PrincipalsHostPath string // host path to principals.json
	DockerSockHostPath string // host path to docker socket
	GovernanceHostPath string // host path to .claw-governance/ dir (write plane override files)
	PodName            string
	Environment        map[string]string // extra env vars (e.g. CLAW_ALERT_* thresholds)
}

type ClawBlock

type ClawBlock struct {
	Agent        string
	Persona      string
	Cllama       []string
	CllamaEnv    map[string]string
	CllamaTokens map[string]string // runtime-only: expanded service name -> token
	Count        int
	Handles      map[string]*driver.HandleInfo // platform → contact card
	Feeds        []FeedEntry
	Include      []IncludeEntry
	Surfaces     []driver.ResolvedSurface
	Skills       []string
	Invoke       []InvokeEntry
	ClawAPIMode  string // "self" when claw-api: self is declared; empty otherwise
}

ClawBlock represents the x-claw extension on a service.

type ClawdashConfig added in v0.2.0

type ClawdashConfig struct {
	Image              string // e.g. ghcr.io/mostlydev/clawdash:latest
	Addr               string // e.g. :8082
	ManifestHostPath   string // host path to pod-manifest.json
	DockerSockHostPath string // host path to docker socket
	CllamaCostsURL     string // external costs URL for operator browser
	PodName            string
}

type CllamaProxyConfig

type CllamaProxyConfig struct {
	ProxyType      string            // e.g. "passthrough", "policy"
	Image          string            // e.g. ghcr.io/mostlydev/cllama:latest
	ContextHostDir string            // host path for shared context dir
	AuthHostDir    string            // host path for provider auth state
	DashboardPort  string            // host port published to proxy UI :8081 (default "8181")
	Environment    map[string]string // proxy-only env (e.g. CLAW_POD, provider keys)
	PodName        string
}

type FeedEntry added in v0.3.1

type FeedEntry struct {
	Name        string
	Source      string
	Path        string
	TTL         int
	Description string
	Unresolved  bool
}

type IncludeEntry added in v0.2.0

type IncludeEntry struct {
	ID          string
	File        string
	Mode        string
	Description string
}

type InvokeEntry

type InvokeEntry struct {
	Schedule string // 5-field cron expression
	Message  string // agent task payload
	Name     string // optional human-readable job name
	To       string // delivery target (name or ID; optional platform prefix "platform:target")
}

InvokeEntry is a scheduled agent task declared in the pod x-claw.invoke block.

type Pod

type Pod struct {
	Name                  string
	Master                string
	SequentialConformance bool // when true, shared handle IDs across services are allowed (sequential conformance spikes only)
	Services              map[string]*Service
	Compose               map[string]interface{} // preserved top-level compose keys except x-claw and services
	ClawAPI               *ClawAPIConfig
	Clawdash              *ClawdashConfig // runtime-only dashboard sidecar config, injected by claw up
	Principals            []PodPrincipal
	AlertWebhooks         []string // pod-scoped Discord webhook URLs for pool-transition alerts
	AlertMentions         []string // pod-scoped @-mention targets for alerts (e.g. "@wojtek", "@infra")
}

Pod represents a parsed claw-pod.yml.

func Parse

func Parse(r io.Reader) (*Pod, error)

Parse reads a claw-pod.yml from the given reader.

type PodPrincipal added in v0.3.6

type PodPrincipal struct {
	Name            string   `yaml:"name"`
	Verbs           []string `yaml:"verbs"`
	Scope           string   `yaml:"scope,omitempty"`
	Services        []string `yaml:"services,omitempty"`
	ClawIDs         []string `yaml:"claw_ids,omitempty"`
	ComposeServices []string `yaml:"compose_services,omitempty"`
	InjectInto      string   `yaml:"inject-into,omitempty"`
}

PodPrincipal is an explicit principal declared in the pod-level x-claw.principals list.

type Service

type Service struct {
	Image       string
	Compose     map[string]interface{} // preserved compose service keys except x-claw
	Claw        *ClawBlock
	Environment map[string]string
	Expose      []string // ports exposed to other containers (from compose expose:)
	Ports       []string // container-side ports from compose ports: (host:container or plain container)
}

Service represents a service in a claw-pod.yml.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL