pod

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 9 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 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
	Surfaces     []driver.ResolvedSurface
	Skills       []string
	Invoke       []InvokeEntry
}

ClawBlock represents the x-claw extension on a service.

type CllamaProxyConfig

type CllamaProxyConfig struct {
	ProxyType      string            // e.g. "passthrough", "policy"
	Image          string            // e.g. ghcr.io/mostlydev/cllama-passthrough:latest
	ContextHostDir string            // host path for shared context dir
	AuthHostDir    string            // host path for provider auth state
	Environment    map[string]string // proxy-only env (e.g. CLAW_POD, provider keys)
	PodName        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 // channel name (resolved to channel ID from handles at compose-up time)
}

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

type Pod

type Pod struct {
	Name     string
	Services map[string]*Service
}

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 Service

type Service struct {
	Image       string
	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