Skip to content

feat(adapter): import OpenClaw sessions #18

Description

@Airine

Upstream baseline

The fixture and implementation must remain pinned to this baseline. If upstream has changed, update the pin and document the schema delta before merging.

v1 import scope

Discover and import current SQLite sessions and transcripts, including messages, tools/results, identity/order, attachments metadata, and unknown payloads using a WAL-safe copy. Legacy JSONL may be supported only as a separately detected compatibility format.

This is import-only. Do not add an exporter until upstream exposes a stable, public restore/resume contract and it can be proven with native round-trip and real resume tests.

Dependency

Fixture and claiming process

  1. Comment with the exact upstream version/commit, fixture provenance, and intended scope.
  2. A maintainer confirms scope and assigns the issue before implementation starts.
  3. Fixtures must be synthetic or irreversibly sanitized: remove credentials/tokens, usernames, absolute home paths, repository remotes, proprietary prompts/code, model ids when sensitive, and tool output secrets.
  4. Preserve native structure, ordering, ids/relationships, encodings, and unknown record shapes; replace sensitive values deterministically and include a provenance README.

Acceptance criteria

  • Adapter descriptor, discovery/import registration, and native format metadata are added.
  • Import is deterministic and produces a valid ASP bundle.
  • Original source files remain byte-identical; the adapter never writes into native storage.
  • Malformed records fail or degrade according to the conformance contract.
  • Unknown records/fields and opaque payloads survive as evidence rather than being discarded.
  • Content, tools, thinking, usage, identity, ordering, and attachments each declare fidelity and explicit loss.
  • A sanitized fixture representing the real native structure covers the supported v1 surface.
  • SQLite fixtures include database + WAL/SHM behavior; tests copy them safely and prove the live database is unchanged.
  • CLI discovery/import, list-formats, support matrix, tests, and architecture docs are updated.
  • No exporter is advertised or implemented in v1.
  • npm run check and npm run lint:architecture pass; relevant workspace tests remain green.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:harnessHarness adapters and native session compatibilitycommunityCommunity-owned adapter contributionenhancementNew feature or requesthelp wantedExtra attention is neededneeds-fixtureRequires a sanitized real-format fixture

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions