migrate

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package migrate converts OpenClaw session history to Roger format.

OpenClaw stores sessions as event-sourced JSONL files (one event per line) in ~/.openclaw/agents/main/sessions/<sessionId>.jsonl with a sessions.json index mapping session keys to session IDs.

Roger stores sessions as flat JSONL files (one Message per line) in its own sessions directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateConfig

func MigrateConfig(openclawDir, rogerDir string) (string, error)

MigrateConfig reads ~/.openclaw/openclaw.json, injects Roger-specific fields (e.g. coding-agent CLI subagent), and writes ~/.roger/config.json. Returns the output path. If the target file already exists it is not overwritten (returns path, nil).

func MigrateJobsFile

func MigrateJobsFile(openclawDir, rogerDir string) (string, bool, error)

MigrateJobsFile copies ~/.openclaw/cron/jobs.json to ~/.roger/cron/jobs.json if the target doesn't exist. Rewrites openclaw command references and paths to use roger equivalents. Returns the output path and whether a copy was made. Returns ("", false, nil) if the source doesn't exist or target already exists.

func Run

func Run(openclawDir, targetDir string) (int, error)

Run migrates OpenClaw sessions to Roger format. openclawDir defaults to ~/.openclaw if empty. targetDir defaults to ~/.roger/agents/main/sessions if empty. Returns the number of sessions successfully migrated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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