pi-goosedump 0.8.0 → 0.9.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 +69 -71
- package/index.ts +750 -917
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,103 +1,101 @@
|
|
|
1
1
|
# pi-goosedump
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`pi-goosedump` is a pi extension for goosedump-backed session-history search,
|
|
4
|
+
entry expansion, and compaction. It exposes goosedump tools under the `goose_`
|
|
5
|
+
prefix and replaces Pi's default LLM compaction with goosedump-generated
|
|
6
|
+
summaries.
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
[`goosedump`](https://github.com/jarkkojs/goosedump).
|
|
7
|
-
|
|
8
|
-
## Install
|
|
8
|
+
## Installation
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
pi install npm:pi-goosedump
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
This installs `pi-goosedump` and its `@jarkkojs/goosedump` dependency,
|
|
15
|
-
includes platform-specific native binaries for Linux, macOS, and Windows.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`Apache-2.0 AND LGPL-2.1-or-later`.
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
Once installed, pi-goosedump registers a tool and a slash command:
|
|
14
|
+
This installs `pi-goosedump` and its `@jarkkojs/goosedump` dependency (`^0.9.0`),
|
|
15
|
+
which includes platform-specific native binaries for Linux, macOS, and Windows.
|
|
16
|
+
If the goosedump binary cannot be resolved, the extension disables itself and
|
|
17
|
+
the footer status goes dark.
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
## Tools
|
|
25
20
|
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
- **goose_search:** ranks messages by query relevance; returns compact entry
|
|
22
|
+
overviews with IDs.
|
|
23
|
+
- **goose_get:** expands specific entry IDs to their full content.
|
|
24
|
+
- **goose_grep:** filters messages by glob pattern; returns compact entries
|
|
25
|
+
with IDs.
|
|
26
|
+
- **goose_compact:** triggers a goosedump compaction now, optionally keeping
|
|
27
|
+
the last N user turns verbatim while summarizing everything before.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| `view` | View the full session transcript |
|
|
36
|
-
|
|
37
|
-
Examples:
|
|
29
|
+
The read tools (`goose_search`, `goose_get`, `goose_grep`) each accept an
|
|
30
|
+
optional `provider` (default `pi`; also `claude`, `codex`, `crush`, `gemini`,
|
|
31
|
+
`goose`, `opencode`) and `session` id. `session` defaults to the current Pi
|
|
32
|
+
session for `pi` and is required otherwise. `scope` is `lineage` (default,
|
|
33
|
+
current branch) or `all`. Targets are always provider-qualified
|
|
34
|
+
(`provider:id`); a bare id is never sent to goosedump.
|
|
38
35
|
|
|
39
36
|
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
goose_search({ query: "bug fix" })
|
|
38
|
+
goose_search({ query: "auth", scope: "all", page: 2 })
|
|
39
|
+
goose_get({ ids: ["entry-a", "entry-b"] })
|
|
40
|
+
goose_get({ ids: ["entry-a"], provider: "claude", session: "1f6b1eba-…" })
|
|
41
|
+
goose_grep({ pattern: "*rand*" })
|
|
42
|
+
goose_compact({ keep: 2 })
|
|
46
43
|
```
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
## Commands
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
47
|
+
- **`/goose-search [query]`:** search the current session history; accepts a
|
|
48
|
+
query argument or prompts inline when bare. Shows ranked results in a
|
|
49
|
+
scrollable panel; press enter to expand an entry to its full content.
|
|
50
|
+
- **`/goose-compact [keep:N]`:** compact now with goosedump. With `keep:N`
|
|
51
|
+
(N ≥ 1) the last N user turns stay verbatim and everything before is
|
|
52
|
+
summarized; with no argument goosedump summarizes up to Pi's cut.
|
|
53
|
+
- **`/goose-settings`:** edit the global and project compaction settings.
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
goosedump({ action: "list", provider: "claude" })
|
|
58
|
-
goosedump({ action: "view", provider: "claude", contextId: "0000001f" })
|
|
59
|
-
```
|
|
55
|
+
## Settings
|
|
60
56
|
|
|
61
|
-
|
|
57
|
+
`pi-goosedump` reads optional JSON settings from:
|
|
62
58
|
|
|
63
|
-
|
|
64
|
-
`
|
|
65
|
-
`codex`, `crush`, `gemini`, `goose`, `opencode`, `pi`, or `json`. JSONL providers
|
|
66
|
-
(`claude`, `codex`, `pi`, `gemini`) emit the raw session file; SQLite providers
|
|
67
|
-
(`crush`, `goose`, `opencode`) emit a row-oriented JSON projection of their
|
|
68
|
-
tables; `json` emits goosedump's structured JSON. This is round-trippable and
|
|
69
|
-
applies to `view`, `expand`, `grep`, and `search`.
|
|
59
|
+
- `~/.pi/agent/settings.json` — Global
|
|
60
|
+
- `.pi/settings.json` — Project
|
|
70
61
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
goosedump({ action: "grep", pattern: "*rand*", outputFormat: "claude" })
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Command: `/goosedump`
|
|
77
|
-
|
|
78
|
-
Opens an interactive dashboard. The sessions tab lists Pi sessions from the
|
|
79
|
-
current working directory only. The settings tab edits the global and project
|
|
80
|
-
`goosedump` settings sections.
|
|
81
|
-
|
|
82
|
-
### Compaction
|
|
83
|
-
|
|
84
|
-
pi-goosedump hooks Pi's `/compact` and auto-compaction flow. It resolves the
|
|
85
|
-
current session to its goosedump id and runs `goosedump compact <id>` with Pi's
|
|
86
|
-
compaction range (`--from`, `--until`, and `--scope`) so the generated summary
|
|
87
|
-
matches the entries Pi is about to replace.
|
|
88
|
-
|
|
89
|
-
Optional goosedump counters can also trigger compaction. `0` disables a counter;
|
|
90
|
-
when either counter fires, both counters reset to their configured values.
|
|
62
|
+
Project settings override global settings. All settings live in a `goosedump`
|
|
63
|
+
section and are optional (defaults shown):
|
|
91
64
|
|
|
92
65
|
```json
|
|
93
66
|
{
|
|
94
67
|
"goosedump": {
|
|
95
|
-
"stepsBeforeCompact": 0,
|
|
96
68
|
"turnsBeforeCompact": 0
|
|
97
69
|
}
|
|
98
70
|
}
|
|
99
71
|
```
|
|
100
72
|
|
|
73
|
+
`turnsBeforeCompact` sets how many LLM turns elapse before goosedump triggers
|
|
74
|
+
compaction, as an integer 0–255. `0` disables the counter; when enabled, the
|
|
75
|
+
footer status shows `GD: XX` counting down in hex (e.g. `GD: 0A`), or just
|
|
76
|
+
`GD` when disabled.
|
|
77
|
+
|
|
78
|
+
### Compaction flow
|
|
79
|
+
|
|
80
|
+
pi-goosedump hooks Pi's `session_before_compact` event — fired by manual
|
|
81
|
+
`/compact`, the turn counter above, and Pi's own auto-compaction — and
|
|
82
|
+
substitutes a goosedump summary for Pi's LLM summary. It resolves the current
|
|
83
|
+
session to its goosedump context by reading the `id` field from the session
|
|
84
|
+
header line, then runs `goosedump compact` over the replacement range:
|
|
85
|
+
|
|
86
|
+
- `--from` is the entry following the most recent prior compaction (so the
|
|
87
|
+
summary starts where the previous one left off); omitted on the first
|
|
88
|
+
compaction.
|
|
89
|
+
- `--until` is the first entry Pi is keeping (`firstKeptEntryId`).
|
|
90
|
+
|
|
91
|
+
goosedump composes the structured summary itself — including merging any prior
|
|
92
|
+
summary — and emits a native Pi compaction entry, from which the extension
|
|
93
|
+
extracts the `summary` field. A `keep:N` override (via `/goose-compact` or the
|
|
94
|
+
`goose_compact` tool) replaces Pi's token-based cut with a turn-based one:
|
|
95
|
+
summarize everything before the Nth-from-last user entry and keep the tail
|
|
96
|
+
verbatim. Fewer than N user turns cancels with a notice. On completion Pi
|
|
97
|
+
notifies the token reduction.
|
|
98
|
+
|
|
101
99
|
## License
|
|
102
100
|
|
|
103
101
|
`pi-goosedump` is licensed under `MIT`. See [LICENSE](LICENSE) for more
|