@zosmaai/pi-llm-wiki 0.8.2 → 0.9.1

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.
@@ -73,6 +73,20 @@ This searches both your **personal wiki** (`~/.llm-wiki/`) and the **project wik
73
73
 
74
74
  The extension also briefly searches automatically, but explicit calls with task-specific terms get better results.
75
75
 
76
+ #### Two-Stage Recall (links-first for large vaults)
77
+
78
+ Recall scales with vault size via **two-stage retrieval** (memex-style):
79
+
80
+ - **Small vaults** (page count ≤ threshold): recall returns inline **content previews** — read them directly, no extra step.
81
+ - **Large vaults** (page count > threshold): recall returns a **ranked list of links** only — `id`, `title`, `type`, `score`, and a 1-line snippet. **No full previews are injected**, to protect your context window.
82
+
83
+ **The two-step contract for large vaults:**
84
+
85
+ 1. **Stage 1 — scan the links.** `wiki_recall` (and the auto-injected "Relevant Wiki Knowledge (links-first)" section) gives you ranked `[[id]]` links with scores and short snippets. Use the scores and snippets to pick the few pages that actually matter.
86
+ 2. **Stage 2 — expand on demand.** Call `read` (or `wiki_read`) on the chosen link **paths** to pull their full content. Do **not** assume the snippet is the whole page — open the link before relying on its content.
87
+
88
+ The gate is the `recallLinksThreshold` setting (namespaced `llm-wiki`, default **50** pages). Page count is read from `meta/registry.json` (O(1), no page-body I/O). Set it to `0` to force links-first always, or a large number to always keep previews inline.
89
+
76
90
  ### At End — Save Insights with wiki_retro
77
91
 
78
92
  After completing any meaningful task, call `wiki_retro` to save key insights:
@@ -95,6 +109,22 @@ For thorough research, also use `wiki_search` to browse the full registry:
95
109
  wiki_search(query="broad topic")
96
110
  ```
97
111
 
112
+ ### Background Model Selection (`/wiki-model`)
113
+
114
+ The wiki's background work (ingest synthesis, etc.) runs on a model you can choose. By **default it uses the current session model** — zero config.
115
+
116
+ - **View / pick interactively:** run `/wiki-model` with no argument to see the active model and pick from the available models.
117
+ - **Set directly (scriptable):** `/wiki-model anthropic/claude-haiku` (a `provider/id` ref).
118
+ - **Revert to session model:** `/wiki-model session` (also `clear`/`default`/`reset`).
119
+
120
+ The choice is persisted to project settings (`.pi/settings.json` under `llm-wiki.taskModel`) and shown in the status bar.
121
+
122
+ **Per-call override:** heavy tools accept an optional `model` param (`provider/id`) that overrides the configured model for that one call. Precedence is **override > configured `taskModel` > session model**; an unknown ref degrades gracefully to the configured/session model. Example:
123
+
124
+ ```
125
+ wiki_ingest(model="anthropic/claude-haiku")
126
+ ```
127
+
98
128
  ### Auto-Bootstrap (One-Time)
99
129
 
100
130
  The extension creates the wiki vault automatically on startup. On the first turn, it injects a directive asking you to infer topic and mode, then call: