migrate

package
v0.0.0-...-7cf926f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm() bool

func ConvertConfig

func ConvertConfig(data map[string]any) (*config.Config, []string, error)

func LoadOpenClawConfig

func LoadOpenClawConfig(configPath string) (map[string]any, error)

func MergeConfig

func MergeConfig(existing, incoming *config.Config) *config.Config

func PrintPlan

func PrintPlan(actions []Action, warnings []string)

func PrintSummary

func PrintSummary(result *Result)

Types

type Action

type Action struct {
	Type        ActionType
	Source      string
	Destination string
	Description string
}

func Plan

func Plan(opts Options, openclawHome, picoClawHome string) ([]Action, []string, error)

func PlanWorkspaceMigration

func PlanWorkspaceMigration(srcWorkspace, dstWorkspace string, force bool) ([]Action, error)

type ActionType

type ActionType int
const (
	ActionCopy ActionType = iota
	ActionSkip
	ActionBackup
	ActionConvertConfig
	ActionCreateDir
	ActionMergeConfig
)

type Options

type Options struct {
	DryRun        bool
	ConfigOnly    bool
	WorkspaceOnly bool
	Force         bool
	Refresh       bool
	OpenClawHome  string
	PicoClawHome  string
}

type Result

type Result struct {
	FilesCopied    int
	FilesSkipped   int
	BackupsCreated int
	ConfigMigrated bool
	DirsCreated    int
	Warnings       []string
	Errors         []error
}

func Execute

func Execute(actions []Action, openclawHome, picoClawHome string) *Result

func Run

func Run(opts Options) (*Result, error)

Jump to

Keyboard shortcuts

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