@diegopetrucci/pi-extensions 0.1.16 → 0.1.18
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 +7 -6
- package/extensions/librarian/README.md +76 -0
- package/extensions/librarian/index.ts +727 -0
- package/extensions/librarian/package.json +29 -0
- package/extensions/quiet-tools/README.md +63 -0
- package/extensions/quiet-tools/index.ts +384 -0
- package/extensions/{compact-bash → quiet-tools}/package.json +4 -4
- package/package.json +4 -3
- package/extensions/compact-bash/README.md +0 -49
- package/extensions/compact-bash/index.ts +0 -241
package/README.md
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
A collection of [pi](https://github.com/earendil-works/pi-mono) agent extensions I made:
|
|
4
4
|
|
|
5
|
+
- [`confirm-destructive`](./extensions/confirm-destructive): Confirms before destructive session actions like clear, switch, and fork.
|
|
6
|
+
- [`context-cap`](./extensions/context-cap): Caps effective model context windows at 200k tokens by default so pi avoids the `dumb zone`; toggle temporarily with `/context-cap`.
|
|
7
|
+
- [`librarian`](./extensions/librarian): Adds a GitHub research scout that asks whether to use an opt-in local repo checkout cache under the OS user cache directory, with cached repos expiring after 30 days of non-use.
|
|
5
8
|
- [`minimal-footer`](./extensions/minimal-footer): Replaces pi's built-in footer with a minimal configurable two-line layout: branch/repo on the first line, context/model on the second, optional `DUMB ZONE`, plus OpenAI Codex 5-hour and 7-day usage when available.
|
|
9
|
+
- [`notify`](./extensions/notify): Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input.
|
|
6
10
|
- [`oracle`](./extensions/oracle): Adds an Amp-style read-only oracle tool that auto-selects the strongest reasoning model on the current provider/subscription, covers pi’s built-in providers with hardcoded rankings, sets reasoning to xhigh by default, and shows live status while running.
|
|
7
|
-
- [`context-cap`](./extensions/context-cap): Caps effective model context windows at 200k tokens by default so pi avoids the `dumb zone`; toggle temporarily with `/context-cap`.
|
|
8
|
-
- [`compact-bash`](./extensions/compact-bash): Renders collapsed assistant `bash` tool output as a one-line preview; toggle temporarily with `/compact-bash`.
|
|
9
11
|
- [`permission-gate`](./extensions/permission-gate): Prompts for confirmation before dangerous bash commands like `rm -rf`, `sudo`, and `chmod 777`.
|
|
10
|
-
- [`
|
|
11
|
-
- [`notify`](./extensions/notify): Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input.
|
|
12
|
+
- [`quiet-tools`](./extensions/quiet-tools): Renders collapsed built-in tool rows as quiet one-line previews without changing model-visible tool results; toggle temporarily with `/quiet-tools`.
|
|
12
13
|
|
|
13
14
|
(For the full list of pi extensions I use, [check out my dotfiles](https://github.com/diegopetrucci/dot/blob/main/.pi/agent/settings.json).)
|
|
14
15
|
|
|
@@ -23,13 +24,13 @@ pi install npm:@diegopetrucci/pi-extensions
|
|
|
23
24
|
Or pin the GitHub package to this release:
|
|
24
25
|
|
|
25
26
|
```bash
|
|
26
|
-
pi install git:github.com/diegopetrucci/pi-extensions@v0.1.
|
|
27
|
+
pi install git:github.com/diegopetrucci/pi-extensions@v0.1.18
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
Or a specific extension:
|
|
30
31
|
|
|
31
32
|
```bash
|
|
32
|
-
pi install npm:@diegopetrucci/pi-
|
|
33
|
+
pi install npm:@diegopetrucci/pi-quiet-tools
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
Then reload pi:
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# librarian
|
|
2
|
+
|
|
3
|
+
A pi GitHub research scout inspired by `pi-librarian`, with an opt-in local checkout cache.
|
|
4
|
+
|
|
5
|
+
When the `librarian` tool runs, it asks whether to cache/reuse repository checkouts locally. If you say no, cancel, time out, or run without UI, it uses GitHub API/search and temporary fetched files only.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
### Standalone npm package
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pi install npm:@diegopetrucci/pi-librarian
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Collection package
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pi install npm:@diegopetrucci/pi-extensions
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### GitHub package
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pi install git:github.com/diegopetrucci/pi-extensions
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then reload pi:
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
/reload
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Behavior
|
|
34
|
+
|
|
35
|
+
- Tool name: `librarian`
|
|
36
|
+
- Uses a restricted subagent with `bash` and `read`
|
|
37
|
+
- Uses `gh` for GitHub search/API access
|
|
38
|
+
- Asks on each call whether to use cached local checkouts
|
|
39
|
+
- Defaults to no checkout/cache
|
|
40
|
+
- Cached repos are removed lazily after 30 days without use
|
|
41
|
+
|
|
42
|
+
## Cache location
|
|
43
|
+
|
|
44
|
+
macOS:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
~/Library/Caches/pi-librarian/repos/github.com/<owner>/<repo>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Linux:
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
${XDG_CACHE_HOME:-~/.cache}/pi-librarian/repos/github.com/<owner>/<repo>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Windows:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
%LOCALAPPDATA%\pi-librarian\repos\github.com\<owner>\<repo>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Override the cache root if needed:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
export PI_LIBRARIAN_CACHE_ROOT="$HOME/Library/Caches/pi-librarian/repos"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Requirements
|
|
69
|
+
|
|
70
|
+
- GitHub CLI (`gh`) installed and authenticated for private repositories you want to inspect
|
|
71
|
+
- `git` for local checkout caching
|
|
72
|
+
- common shell tools such as `rg`, `jq`, and `base64` for best results
|
|
73
|
+
|
|
74
|
+
## Notes
|
|
75
|
+
|
|
76
|
+
Do not install this alongside another extension that registers a `librarian` tool unless you intentionally want duplicate/conflicting tool names.
|