@cad0p/pi-napkin 0.6.2-20260809.0 → 0.6.2

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.
@@ -171,10 +171,26 @@ function getNapkin(cwd: string): Napkin {
171
171
 
172
172
  function getOverview(n: Napkin): string | null {
173
173
  try {
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();
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
+ });
178
194
  if (!overview) return null;
179
195
 
180
196
  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-20260809.0",
3
+ "version": "0.6.2",
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.3"
67
+ "@cad0p/napkin": "^0.12.2"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@earendil-works/pi-coding-agent": ">=0.74.0",