@cad0p/pi-napkin 0.6.2 → 0.6.3-20260810.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
@@ -372,6 +372,8 @@ pi-napkin owns a single contiguous block in the vault's `.gitignore`, delimited
372
372
  # Local tmp/cache + common secrets (belt-and-braces; auto-init's
373
373
  # `git add .` would otherwise capture them in the initial commit
374
374
  # even on vaults that happen to contain dev work).
375
+ search-cache.json
376
+ overview-cache.json
375
377
  # (full canonical body in extensions/distill/auto-setup.ts:BLOCK_CONTENT)
376
378
  # END NAPKIN-DISTILL MANAGED
377
379
  ```
@@ -152,6 +152,7 @@ export const BLOCK_CONTENT: readonly string[] = [
152
152
  "",
153
153
  "# Local tmp/cache",
154
154
  "search-cache.json",
155
+ "overview-cache.json",
155
156
  ".DS_Store",
156
157
  "",
157
158
  "# Common secrets — belt-and-braces for vaults that end up alongside dev",
@@ -171,26 +171,10 @@ function getNapkin(cwd: string): Napkin {
171
171
 
172
172
  function getOverview(n: Napkin): string | null {
173
173
  try {
174
- // napkin >= 0.12.2 keeps upstream-identical defaults (maxRows 0 =
175
- // unlimited, collapseDepth 1) so its equivalence oracle holds. The fork's
176
- // historical context-protection defaults are restored here, still
177
- // overridable via the vault config's `overview` section.
178
- const configPath = path.join(n.vault.configPath, "config.json");
179
- let overviewCfg: Record<string, unknown> = {};
180
- try {
181
- if (fs.existsSync(configPath)) {
182
- overviewCfg = (JSON.parse(fs.readFileSync(configPath, "utf-8"))
183
- .overview ?? {}) as Record<string, unknown>;
184
- }
185
- } catch {
186
- // Corrupt/unreadable config — fall back to the defaults below.
187
- }
188
- const num = (v: unknown, fallback: number) =>
189
- typeof v === "number" ? v : fallback;
190
- const overview = n.overview({
191
- maxRows: num(overviewCfg.maxRows, 100),
192
- collapseDepth: num(overviewCfg.collapseDepth, 2),
193
- });
174
+ // napkin >= 0.12.3 ships the fork's defaults (collapseDepth 2, maxRows
175
+ // 100) in DEFAULT_CONFIG, so the extension must not diverge from napkin —
176
+ // it relies on napkin's defaults, overridable via the vault config.
177
+ const overview = n.overview();
194
178
  if (!overview) return null;
195
179
 
196
180
  let text = overview.context || "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cad0p/pi-napkin",
3
- "version": "0.6.2",
3
+ "version": "0.6.3-20260810.0",
4
4
  "description": "📜 Napkin integration for pi — vault context, knowledge tools, and automatic distillation with git-worktree concurrency safety",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -64,7 +64,7 @@
64
64
  "vitest": "^2.1.0"
65
65
  },
66
66
  "dependencies": {
67
- "@cad0p/napkin": "^0.12.2"
67
+ "@cad0p/napkin": "^0.12.3"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@earendil-works/pi-coding-agent": ">=0.74.0",