pi-smart-compact 7.5.1 → 7.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-smart-compact",
3
- "version": "7.5.1",
3
+ "version": "7.5.2",
4
4
  "description": "EESV smart compaction extension for Pi Coding Agent — deterministic extraction, exploration, synthesis, verification with redundancy pruning, project fingerprinting, and damage detection.",
5
5
  "license": "MIT",
6
6
  "author": "Alper Tarhan <alpertarhan@gmail.com>",
package/src/constants.ts CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import type { CompressionProfile, ProfileConfig } from "./types.ts";
6
6
 
7
- export const VERSION = "7.5.0";
7
+ export const VERSION = "7.5.2";
8
8
  export const CHARS_PER_TOKEN = 3.8;
9
9
 
10
10
  export const COMPACT_SYSTEM_PREFIX =
package/src/core.ts CHANGED
@@ -103,14 +103,6 @@ export async function runSmartCompact(
103
103
  const backupPath = backupConversation(convText, sessionId);
104
104
  const prevContext = getPreviousCompactionContext(branch);
105
105
 
106
- // ── Project fingerprint (cross-session context) ──
107
- const projectId = deriveProjectId(extraction);
108
- const fingerprint = loadProjectFingerprint(projectId);
109
- if (fingerprint) {
110
- notify("Project: " + fingerprint.language + (fingerprint.framework ? "/" + fingerprint.framework : "") + " (" + fingerprint.sessionCount + " sessions)", "info");
111
- }
112
- const projectCtx = buildProjectContext(fingerprint);
113
-
114
106
  // Phase 1
115
107
  const cachedExt = loadCachedExtraction(sessionId);
116
108
  let extraction: StructuredExtraction;
@@ -125,6 +117,14 @@ export async function runSmartCompact(
125
117
  }
126
118
  saveCachedExtraction(sessionId, extraction, llmMessages.length);
127
119
 
120
+ // ── Project fingerprint (cross-session context) ──
121
+ const projectId = deriveProjectId(extraction);
122
+ const fingerprint = loadProjectFingerprint(projectId);
123
+ if (fingerprint) {
124
+ notify("Project: " + fingerprint.language + (fingerprint.framework ? "/" + fingerprint.framework : "") + " (" + fingerprint.sessionCount + " sessions)", "info");
125
+ }
126
+ const projectCtx = buildProjectContext(fingerprint);
127
+
128
128
  let finalSummary: string;
129
129
  let method: string;
130
130
  let llmCalls = 0;