importer

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package importer migrates Seam v1 data (~/.seam) into Seamless. v1 encoded memories as notes with "Knowledge: {kind} - {name}" titles and domain:/project:/ session: tags; this package decodes that convention back into first-class memory frontmatter, normalizes plain notes, lifts trial notes into trials rows, and replays agent_sessions + agent_tool_calls as sessions + events. It reads v1 (files + a seam.db snapshot) and writes v2; it never modifies v1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// SourceDir is the v1 data directory (e.g. ~/.seam). Its notes/ tree and
	// seam.db are read; nothing under it is modified.
	SourceDir string
	// SkipProjects are storage-tree segments to ignore (e.g. "briefings").
	SkipProjects []string
}

Options configures an import run.

type Report

type Report struct {
	Memories int
	Notes    int
	Trials   int
	Sessions int
	Events   int
	Projects int // projects-table rows backfilled from imported items
	Skipped  int
	Warnings []string
}

Report summarizes what an import produced. Counts are of items actually written; Skipped counts items already present in v2 (idempotent re-import).

func Import

func Import(ctx context.Context, mgr *files.Manager, db *sql.DB, opts Options) (*Report, error)

Import migrates v1 data at opts.SourceDir into v2, writing memory/note files through mgr (so they are indexed and, if mgr has an embedder, embedded) and inserting trials/sessions/events directly into db. It is idempotent by id: an item already present in v2 is skipped.

func (Report) String

func (r Report) String() string

String renders a human-readable summary.

Jump to

Keyboard shortcuts

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