initimport

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Emit

func Emit(plan Plan, dir string) error

Types

type Channels

type Channels struct {
	Discord  *DiscordChannel
	Slack    *SlackChannel
	Telegram *TelegramChannel
}

type Descriptor

type Descriptor struct {
	Kind      SourceKind
	Config    string
	Root      string
	AgentName string
	Identity  string
	Models    ModelSlots
	Cllama    bool
	Channels  Channels
	EnvVars   map[string]string
	SkillsDir string
	CronDir   string
	RawNotes  []string
}

func Detect

func Detect(fromPath string, override SourceKind) (Descriptor, error)

type DiscordChannel

type DiscordChannel struct {
	Token          string
	BotID          string
	RequireMention bool
	AllowFrom      []string
	DMPolicy       string
	Guilds         []DiscordGuild
}

type DiscordGuild

type DiscordGuild struct {
	ID             string
	RequireMention bool
	Users          []string
}

type DiscordSurface

type DiscordSurface struct {
	DMAllowFrom []string
	DMPolicy    string
	Guilds      []DiscordGuild
}

type HandlePlan

type HandlePlan struct {
	Platform string
	IDEnv    string
	Username string
	Guilds   []DiscordGuild
}

type ModelRef

type ModelRef struct {
	Provider string
	Model    string
	BaseURL  string
	APIKey   string
}

func SplitModelRef

func SplitModelRef(ref string) (ModelRef, bool)

func (ModelRef) String

func (m ModelRef) String() string

type ModelSlots

type ModelSlots struct {
	Primary  ModelRef
	Fallback []ModelRef
}

type Notes

type Notes struct {
	Applied     []string
	Action      []string
	SecretNotes []string
}

type Options

type Options struct {
	ProjectName    string
	AgentName      string
	ModelOverride  string
	CllamaOverride string
	BaseImage      string
}

type Plan

type Plan struct {
	Source        Descriptor
	Target        TargetRuntime
	ProjectName   string
	AgentName     string
	BaseImage     string
	Model         ModelRef
	Fallback      []ModelRef
	Cllama        bool
	Handles       []HandlePlan
	Environment   map[string]string
	CllamaEnv     map[string]string
	Surfaces      []SurfacePlan
	AgentContract string
	SoulContent   string
	SkillsDir     string
	CronDir       string
	Notes         Notes
}

func Translate

func Translate(src Descriptor, opts Options) (Plan, error)

type SlackChannel

type SlackChannel struct {
	BotToken     string
	AppToken     string
	BotID        string
	AllowedUsers []string
}

type SourceKind

type SourceKind string
const (
	SourceOpenClaw SourceKind = "openclaw"
	SourceHermes   SourceKind = "hermes"
)

type SurfacePlan

type SurfacePlan struct {
	Platform string
	Discord  *DiscordSurface
}

type TargetRuntime

type TargetRuntime string
const (
	TargetOpenClaw TargetRuntime = "openclaw"
	TargetHermes   TargetRuntime = "hermes"
)

type TelegramChannel

type TelegramChannel struct {
	Token string
	BotID string
}

Jump to

Keyboard shortcuts

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