agentimport

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package agentimport converts local Codex and Claude Code artifacts into provider-neutral Mecatl data. Import is deliberately lossy: only user and assistant text enters conversation history. Provider-private reasoning and tool-call wire records cannot be replayed safely by another provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyStats

type CopyStats struct {
	Files           int
	Skills          int
	SkippedSymlinks int
}

CopyStats reports what an import copied and deliberately skipped.

func CopySkillSources

func CopySkillSources(sources []string, dst string) (CopyStats, error)

CopySkillSources imports bundles from all sources after checking cross-source and destination name collisions, so a duplicate is reported before any bundle is written.

func CopyWorkspace

func CopyWorkspace(src, dst string) (CopyStats, error)

CopyWorkspace merges regular files from src into dst without overwriting any existing path. The source repository's .git administration directory is not portable agent context and is omitted. Symlinks and special files are skipped.

type Source

type Source string

Source identifies an external agent transcript format.

const (
	// SourceCodex identifies the Codex external agent transcript format.
	SourceCodex Source = "codex"
	// SourceClaudeCode identifies the Claude Code external agent transcript format.
	SourceClaudeCode Source = "claude-code"
)

type Transcript

type Transcript struct {
	ExternalID string
	Workspace  string
	CreatedAt  time.Time
	Title      string
	Messages   []session.Message
}

Transcript is the provider-neutral subset of an external session.

func Parse

func Parse(source Source, r io.Reader) (Transcript, error)

Parse reads one JSONL transcript.

Jump to

Keyboard shortcuts

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