pi-smart-compact 7.15.0 → 7.16.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/CHANGELOG.md +58 -0
- package/README.md +166 -283
- package/SECURITY.md +14 -5
- package/SUPPORT.md +18 -5
- package/dist/app/run-smart-compact.d.ts.map +1 -1
- package/dist/app/steps/extract.d.ts.map +1 -1
- package/dist/app/steps/persist.d.ts.map +1 -1
- package/dist/app/steps/recover.d.ts.map +1 -1
- package/dist/app/steps/state.d.ts.map +1 -1
- package/dist/app/steps/synthesize.d.ts.map +1 -1
- package/dist/app/steps/window.d.ts.map +1 -1
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/domain/summary-parse.d.ts +19 -6
- package/dist/domain/summary-parse.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +482 -133
- package/dist/infra/ai-messages.d.ts +40 -0
- package/dist/infra/ai-messages.d.ts.map +1 -0
- package/dist/infra/paths.d.ts +2 -0
- package/dist/infra/paths.d.ts.map +1 -1
- package/dist/phases/explore.d.ts +1 -1
- package/dist/phases/explore.d.ts.map +1 -1
- package/dist/phases/synthesize.d.ts +7 -0
- package/dist/phases/synthesize.d.ts.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/overlays.d.ts +10 -2
- package/dist/ui/overlays.d.ts.map +1 -1
- package/dist/utils/damage.d.ts +14 -0
- package/dist/utils/damage.d.ts.map +1 -1
- package/dist/utils/helpers.d.ts +33 -0
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/session-log.d.ts.map +1 -1
- package/dist/utils/state.d.ts +7 -0
- package/dist/utils/state.d.ts.map +1 -1
- package/docs/RELEASE.md +1 -1
- package/docs/assets/banner.svg +71 -0
- package/package.json +2 -2
package/SECURITY.md
CHANGED
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
Security fixes target the latest published version of `pi-smart-compact`.
|
|
6
6
|
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| Latest `7.x` | ✅ |
|
|
10
|
+
| Older | ❌ |
|
|
11
|
+
|
|
7
12
|
## Reporting a vulnerability
|
|
8
13
|
|
|
9
|
-
Please do **not** open a public issue for vulnerabilities, leaked secrets, or
|
|
14
|
+
Please do **not** open a public issue for vulnerabilities, leaked secrets, or
|
|
15
|
+
private-session data exposure.
|
|
10
16
|
|
|
11
17
|
Report privately through GitHub Security Advisories:
|
|
12
18
|
|
|
@@ -14,15 +20,18 @@ Report privately through GitHub Security Advisories:
|
|
|
14
20
|
|
|
15
21
|
If advisories are unavailable, contact the maintainer listed in `package.json`.
|
|
16
22
|
|
|
17
|
-
## Data handling
|
|
23
|
+
## Data handling
|
|
18
24
|
|
|
19
|
-
`pi-smart-compact` processes Pi session content to produce compaction summaries.
|
|
25
|
+
`pi-smart-compact` processes Pi session content to produce compaction summaries.
|
|
26
|
+
Depending on the session, this may include repository paths, command output,
|
|
27
|
+
tool results, and user-provided context.
|
|
20
28
|
|
|
21
29
|
Operational guidance:
|
|
22
30
|
|
|
23
31
|
- Do not paste secrets into sessions you plan to compact.
|
|
24
32
|
- Redact private logs before attaching them to issues.
|
|
25
33
|
- Treat generated compaction summaries as potentially sensitive project context.
|
|
26
|
-
- Review provider/model configuration before enabling auto-triggered compaction.
|
|
34
|
+
- Review provider / model configuration before enabling auto-triggered compaction.
|
|
27
35
|
|
|
28
|
-
Runtime artifacts are written under `~/.pi/agent/`; see
|
|
36
|
+
Runtime artifacts are written under `~/.pi/agent/`; see the
|
|
37
|
+
[runtime artifacts table](./README.md#runtime-artifacts) in the README.
|
package/SUPPORT.md
CHANGED
|
@@ -1,17 +1,30 @@
|
|
|
1
1
|
# Support
|
|
2
2
|
|
|
3
|
-
For usage questions or bug reports specific to `pi-smart-compact`, open an
|
|
3
|
+
For usage questions or bug reports specific to `pi-smart-compact`, open an
|
|
4
|
+
issue in this repository:
|
|
4
5
|
|
|
5
6
|
<https://github.com/alpertarhan/pi-smart-compact/issues>
|
|
6
7
|
|
|
7
|
-
For Pi Coding Agent core behavior that reproduces without this extension,
|
|
8
|
+
For Pi Coding Agent core behavior that reproduces **without** this extension,
|
|
9
|
+
use the upstream Pi repository:
|
|
8
10
|
|
|
9
11
|
<https://github.com/earendil-works/pi>
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
## Before you file
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
Helpful things to include:
|
|
16
|
+
|
|
17
|
+
- `pi-smart-compact` version (from `package.json` or `/smart-compact` output)
|
|
14
18
|
- Pi Coding Agent version
|
|
15
|
-
- the
|
|
19
|
+
- the integration surface used (`/smart-compact`, `smart_compact`, or auto-trigger)
|
|
16
20
|
- relevant non-secret `smartCompact` configuration
|
|
17
21
|
- redacted error output or logs
|
|
22
|
+
|
|
23
|
+
## Self-service diagnostics
|
|
24
|
+
|
|
25
|
+
- `/smart-compact metrics` — profile / provider comparison from the metrics log
|
|
26
|
+
- `/smart-compact dashboard` — interactive TUI dashboard (overview, latest run, current session, recent runs)
|
|
27
|
+
- `/smart-compact dashboard` → *Write HTML dashboard* — a local `~/.pi/agent/.cache/smart-compact-report.html`
|
|
28
|
+
|
|
29
|
+
For security issues, see [`SECURITY.md`](./SECURITY.md) — please do **not**
|
|
30
|
+
open a public issue for vulnerabilities.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-smart-compact.d.ts","sourceRoot":"","sources":["../../src/app/run-smart-compact.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EA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,CAAC;
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../src/app/steps/extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkB/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,QAAQ,GAAG,WAAW,CA0J1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/app/steps/persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"persist.d.ts","sourceRoot":"","sources":["../../../src/app/steps/persist.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAc,MAAM,gBAAgB,CAAC;AAUpE;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAGxD;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAkCvD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,UAAU,GAAG,iBAAiB,CAcxE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,GAAG,IAAI,CAmBpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recover.d.ts","sourceRoot":"","sources":["../../../src/app/steps/recover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"recover.d.ts","sourceRoot":"","sources":["../../../src/app/steps/recover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOjE,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,UAAU,GAAG,WAAW,CAgB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/app/steps/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/app/steps/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAY9D,wBAAgB,UAAU,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAqFnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../../src/app/steps/synthesize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGpE,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"synthesize.d.ts","sourceRoot":"","sources":["../../../src/app/steps/synthesize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGpE,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAoNnF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQhE,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../../src/app/steps/window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQhE,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CA+DzE"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { CompressionProfile, ProfileConfig } from "./types.ts";
|
|
|
8
8
|
* `package.json#version`. Do not hand-edit this line for releases; bump
|
|
9
9
|
* package.json and run `bun run sync-version`.
|
|
10
10
|
*/
|
|
11
|
-
export declare const VERSION = "7.
|
|
11
|
+
export declare const VERSION = "7.16.0";
|
|
12
12
|
export declare const CHARS_PER_TOKEN = 3.8;
|
|
13
13
|
export declare const COMPACT_SYSTEM_PREFIX: string;
|
|
14
14
|
export declare const PROFILES: Record<CompressionProfile, ProfileConfig>;
|
|
@@ -22,6 +22,7 @@ export declare const DEFAULT_CONFIG: {
|
|
|
22
22
|
backupEnabled: boolean;
|
|
23
23
|
backupDir: string;
|
|
24
24
|
minContextPercent: number;
|
|
25
|
+
pinPaths: string[];
|
|
25
26
|
};
|
|
26
27
|
export declare const NO_OP_RE: RegExp;
|
|
27
28
|
export declare const SHIFT_RE: RegExp;
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,qBAAqB,QAKqB,CAAC;AAExD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAyB9D,CAAC;AAEF,eAAO,MAAM,cAAc;aACF,kBAAkB;;kBAEnB,MAAM,GAAG,IAAI;uBACR,MAAM,GAAG,IAAI;;;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEpE;;;;;GAKG;AACH,eAAO,MAAM,OAAO,WAAW,CAAC;AAChC,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,eAAO,MAAM,qBAAqB,QAKqB,CAAC;AAExD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAyB9D,CAAC;AAEF,eAAO,MAAM,cAAc;aACF,kBAAkB;;kBAEnB,MAAM,GAAG,IAAI;uBACR,MAAM,GAAG,IAAI;;;;;;cAMxB,MAAM,EAAE;CACzB,CAAC;AAEF,eAAO,MAAM,QAAQ,QAA+E,CAAC;AACrG,eAAO,MAAM,QAAQ,QAAuH,CAAC;AAC7I,eAAO,MAAM,SAAS,QAAmG,CAAC;AAI1H,eAAO,MAAM,kBAAkB,QAgB+C,CAAC;AAE/E,eAAO,MAAM,kBAAkB,yHACyF,CAAC;AAEzH,eAAO,MAAM,mBAAmB,QAWoB,CAAC;AAErD,eAAO,MAAM,mBAAmB,8DAA8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AU6T,CAAC"}
|
|
@@ -31,16 +31,29 @@ export declare function hasSection(summary: CanonicalSummary | string, kind: Sec
|
|
|
31
31
|
export declare function renderSummary(summary: CanonicalSummary, opts?: {
|
|
32
32
|
canonicalHeadings?: boolean;
|
|
33
33
|
}): string;
|
|
34
|
+
/**
|
|
35
|
+
* Placement hint for `upsertSection` when inserting a *new* section.
|
|
36
|
+
*
|
|
37
|
+
* `before`/`after` name the *kind* of an existing section that the new entry
|
|
38
|
+
* should anchor against. `before` inserts immediately ahead of the anchor;
|
|
39
|
+
* `after` inserts immediately behind it. When both are given, `before` wins
|
|
40
|
+
* (kept for back-compat with positional callers). When neither anchor is found
|
|
41
|
+
* the section falls back to append-at-end.
|
|
42
|
+
*
|
|
43
|
+
* This is how the synthesis pipeline keeps `Open Loops` ahead of `Next Steps`
|
|
44
|
+
* deterministically, and the delta injector places `Changes Since Last
|
|
45
|
+
* Compaction` directly after `Open Loops` when present.
|
|
46
|
+
*/
|
|
47
|
+
export interface SectionPlacement {
|
|
48
|
+
before?: SectionKind;
|
|
49
|
+
after?: SectionKind;
|
|
50
|
+
}
|
|
34
51
|
/**
|
|
35
52
|
* Insert or replace a section. If a section with the same `kind` exists, its
|
|
36
53
|
* heading is replaced with the canonical one and the body is overwritten. If
|
|
37
|
-
* not, the section is appended.
|
|
38
|
-
*
|
|
39
|
-
* `before` hints at which section *kind* the new entry should precede; when
|
|
40
|
-
* absent the section is appended. This is how the synthesis pipeline keeps
|
|
41
|
-
* `Open Loops` ahead of `Next Steps` deterministically.
|
|
54
|
+
* not, the section is inserted according to `placement` (or appended).
|
|
42
55
|
*/
|
|
43
|
-
export declare function upsertSection(summary: CanonicalSummary, kind: SectionKind, body: string,
|
|
56
|
+
export declare function upsertSection(summary: CanonicalSummary, kind: SectionKind, body: string, placement?: SectionKind | SectionPlacement): CanonicalSummary;
|
|
44
57
|
/**
|
|
45
58
|
* Append text to an existing section body. If the section is missing, it is
|
|
46
59
|
* created with the provided body. This is the structural equivalent of the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary-parse.d.ts","sourceRoot":"","sources":["../../src/domain/summary-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAqC,MAAM,qBAAqB,CAAC;AAmBhH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAiC/D;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CAGtG;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAS3G;AAED
|
|
1
|
+
{"version":3,"file":"summary-parse.d.ts","sourceRoot":"","sources":["../../src/domain/summary-parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,WAAW,EAAqC,MAAM,qBAAqB,CAAC;AAmBhH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAiC/D;AAED,0DAA0D;AAC1D,wBAAgB,WAAW,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,SAAS,CAGtG;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,GAAE;IAAE,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,CAS3G;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,WAAW,GAAG,gBAAgB,GACzC,gBAAgB,CAoClB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,MAAM,EACZ,YAAY,SAAK,GAChB,gBAAgB,CAWlB"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AA4EtF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,iCAAiC,CAAC;AA4EtF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,EAAE,YAAY,QAsQ7D"}
|