Skip to the content.

Export and import

Portable Context Archive (PCA) is how you take a vault with you. Export writes an encrypted file under ~/.pch/exports/. Import stages first, then applies with your resolutions. Imported objects are marked untrusted.

Connections, grants, manifests, action intents, approvals, and shared state are skipped on export. Pair agents again on the destination machine.

Export from the UI

Export (/export) → choose a passphrase → download/save space-*.pca.

Owner HTTP:

POST /v1/export
{ "passphrase": "…", "filters": {} }

filters is optional. The file is encrypted with age when pyrage works; otherwise a PCH1 + Fernet fallback (PBKDF2 480_000 iterations).

Inner zip layout (PCA generator version 0.1.0):

manifest.json                  # counts + sha256 integrity
objects/*.jsonl                # projects, goals, commitments, …
objects/versions.jsonl
events.jsonl                   # audit
interoperability/pam/memory-store.json
interoperability/ump/memories.ump.json
schemas/memory.schema.json

Import from the UI

Import (/import) → stage the .pca file → review → apply.

POST /v1/import/stage
GET  /v1/import/staging/{id}
POST /v1/import/staging/{id}/apply

Apply sends per-object resolutions (ResolutionChoice). Conflicts stay visible until you resolve them. Authority on imported rows is not silently upgraded to user_confirmed.

Vendor import

Some foreign memory dumps can be queued without a PCA file:

POST /v1/import/vendor
GET  /v1/import/vendor/{batch_id}
POST /v1/import/vendor/{batch_id}/archive

Treat vendor batches as untrusted until you archive/admit them. Do not paste other people’s exports into issues or chats.

Round-trip check (developers)

There is no export CLI. The pch-archive tool compares two Hub data directories:

uv run pch-archive verify-roundtrip /path/to/src-hub /path/to/dst-hub

It lists project, goal, commitment, decision, memory, preference, artifact, and profile and compares (id, authority, classification). Automated coverage: packages/pch-archive/tests/test_roundtrip.py.

What not to do