valija 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -8,7 +8,7 @@ The name comes from *valija diplomática* — a sealed pouch that crosses border
8
8
 
9
9
  ## Status
10
10
 
11
- **0.1.0** — young but working. The vault format (schema v1) will be migrated forward, not broken.
11
+ **0.2.0** — young but working. The vault format is migrated forward, not broken (schema v1 v2 upgrades in place, with a backup).
12
12
 
13
13
  ## Quickstart (5 minutes)
14
14
 
@@ -31,6 +31,32 @@ valija export my-project # print the context pack (paste it into any non-MCP
31
31
  valija doctor # checks node, keychain, vault, client configs
32
32
  ```
33
33
 
34
+ ## Import your history
35
+
36
+ A fresh vault is empty — but your history already lives in ChatGPT and Claude. Import it:
37
+
38
+ ```
39
+ valija import chatgpt-export.zip -p my-history # lists conversations, writes nothing
40
+ valija import chatgpt-export.zip -p my-history --all # import all of them
41
+ valija import claude.zip -p work --query "postgres" # or pick by title / date / index
42
+ valija import export.json -p misc --from generic --all # any other provider (see below)
43
+ ```
44
+
45
+ Get the export from the provider's **Export data** (ChatGPT → a `.zip` containing `conversations.json`; Claude → a `.zip`/JSON). valija auto-detects the source, or pass `--from chatgpt|claude|generic`. With no selection flag it **lists** conversations so you can look before importing; select with `--pick 1,3-5`, `--query`, `--since <YYYY-MM-DD>`, or `--all`, and add `--dry-run` to preview. `.zip` files are read entirely in memory — nothing is extracted to disk.
46
+
47
+ Imported conversations are **searchable** (`valija search`, `valija show <project> --type imported`) but stay **out of context packs** — they're a searchable archive, not context that auto-loads into your AI tools.
48
+
49
+ **Any other provider — two doors:**
50
+
51
+ - **Generic JSON** — hand any exporter this shape and import it with `--from generic`:
52
+ ```json
53
+ { "valija_import_version": 1,
54
+ "conversations": [
55
+ { "id": "abc", "title": "optional", "createdAt": "2024-05-01T09:00:00Z",
56
+ "messages": [ { "role": "user", "content": "…" }, { "role": "assistant", "content": "…" } ] } ] }
57
+ ```
58
+ - **Via a connected AI (no parser needed)** — because valija is an MCP server, you can hand any AI tool an arbitrary export and ask it to distill the important parts into `save_context`. Those become real, pack-eligible context (decisions, preferences, facts).
59
+
34
60
  ### The MCP surface (what your AI tools see)
35
61
 
36
62
  Five tools: `save_context`, `save_handoff`, `get_context`, `search_context`, `list_projects` — plus `/save-context` and `/load-context` prompts in clients that support them.