@dreki-gg/pi-doc-search 0.2.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/.github/workflows/release.yml +46 -0
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +82 -0
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/bun.lock +382 -0
- package/extensions/doc-search/README.md +50 -0
- package/extensions/doc-search/api.ts +143 -0
- package/extensions/doc-search/cache.ts +415 -0
- package/extensions/doc-search/config.example.json +7 -0
- package/extensions/doc-search/config.ts +52 -0
- package/extensions/doc-search/curation.ts +192 -0
- package/extensions/doc-search/index.ts +6 -0
- package/extensions/doc-search/tools.ts +615 -0
- package/extensions/doc-search/types.ts +142 -0
- package/package.json +50 -0
- package/release-please-config.json +9 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
pull-requests: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
release-please:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
17
|
+
steps:
|
|
18
|
+
- id: release
|
|
19
|
+
uses: googleapis/release-please-action@v4
|
|
20
|
+
with:
|
|
21
|
+
config-file: release-please-config.json
|
|
22
|
+
manifest-file: .release-please-manifest.json
|
|
23
|
+
|
|
24
|
+
publish:
|
|
25
|
+
needs: release-please
|
|
26
|
+
if: needs.release-please.outputs.release_created == 'true'
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
permissions:
|
|
29
|
+
contents: read
|
|
30
|
+
id-token: write # npm trusted publishing (OIDC)
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
|
|
34
|
+
- uses: oven-sh/setup-bun@v2
|
|
35
|
+
|
|
36
|
+
- run: bun install --frozen-lockfile
|
|
37
|
+
|
|
38
|
+
- run: bun run typecheck
|
|
39
|
+
|
|
40
|
+
# npm >= 11.5.1 required for OIDC trusted publishing; Node 24 ships it
|
|
41
|
+
- uses: actions/setup-node@v4
|
|
42
|
+
with:
|
|
43
|
+
node-version: 24
|
|
44
|
+
registry-url: https://registry.npmjs.org
|
|
45
|
+
|
|
46
|
+
- run: npm publish
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @dreki-gg/pi-doc-search
|
|
2
|
+
|
|
3
|
+
> Renamed from `@dreki-gg/pi-context7` when extracted from the pi-extensions monorepo. Entries below predate the rename; tool names were `context7_*` at the time.
|
|
4
|
+
|
|
5
|
+
## 0.2.0
|
|
6
|
+
|
|
7
|
+
### Minor Changes
|
|
8
|
+
|
|
9
|
+
- Rework the model-facing prompts so agents actually reach for the docs tools.
|
|
10
|
+
`context7_get_library_docs` is now framed as a proactive step — consult it
|
|
11
|
+
before writing or editing code against a third-party library rather than only
|
|
12
|
+
when a user explicitly asks for documentation — and its one-call auto-resolve
|
|
13
|
+
path is emphasized. `context7_resolve_library_id` is demoted to the
|
|
14
|
+
ambiguous-match exception, and tool descriptions lead with behavior instead of
|
|
15
|
+
"MCP equivalent" narration.
|
|
16
|
+
|
|
17
|
+
## 0.1.9
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [`938048f`](https://github.com/dreki-gg/pi-extensions/commit/938048ffd15f8b4174e369f2042a101a42486ed8) Thanks [@jalbarrang](https://github.com/jalbarrang)! - disable terminate: true on context7 tool calls
|
|
22
|
+
|
|
23
|
+
## 0.1.8
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [`90899a5`](https://github.com/dreki-gg/pi-extensions/commit/90899a52d3910bcf4860c1dfbb376b0d203addcd) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Fix promptGuidelines to include explicit tool names instead of "this tool", following pi extension best practices. Guidelines are appended flat to the system prompt, so each bullet must name the tool it refers to.
|
|
28
|
+
|
|
29
|
+
## 0.1.7
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [`d133c3d`](https://github.com/dreki-gg/pi-extensions/commit/d133c3da917e7e5def568d27d6cde8ae8a6c00d2) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Mark pi peer dependencies as optional so npm does not auto-install pi internals when installing extension packages.
|
|
34
|
+
|
|
35
|
+
## 0.1.6
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- [`0be7b68`](https://github.com/dreki-gg/pi-extensions/commit/0be7b6877e9874b46c756b58c99d599db623ef11) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Migrate TypeBox usage and session replacement flows for Pi 0.69 compatibility.
|
|
40
|
+
|
|
41
|
+
- switch extension imports from `@sinclair/typebox` to `typebox`
|
|
42
|
+
- update package peer dependencies to require `typebox`
|
|
43
|
+
- move subagent `/run-agent` fork-at follow-up work into `withSession` so post-fork operations use the replacement session safely
|
|
44
|
+
- add command argument completions for `/run-agent`, `/delegate-agents`, `/preset`, `/mode`, and `/plan`
|
|
45
|
+
- align local development dependencies with Pi 0.69 for typechecking and compatibility checks
|
|
46
|
+
|
|
47
|
+
## 0.1.5
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- [`5e853af`](https://github.com/dreki-gg/pi-extensions/commit/5e853af054a31c4bf87d80f944513e537a39201d) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Sync the extensions repo with Pi 0.68.0 and improve direct agent runs.
|
|
52
|
+
|
|
53
|
+
- `@dreki-gg/pi-context7`: remove stale alias docs and align compatibility tests with the canonical tool names actually exported.
|
|
54
|
+
- `@dreki-gg/pi-modes`: use `before_agent_start.systemPromptOptions.selectedTools` when available so mode prompt text reflects the active prompt tool set.
|
|
55
|
+
- `@dreki-gg/pi-subagent`: add `/run-agent`, support `sessionStrategy: fork-at` in agent frontmatter, default bundled `worker` and `reviewer` to forked direct runs, and add a custom renderer for run summaries.
|
|
56
|
+
|
|
57
|
+
## 0.1.4
|
|
58
|
+
|
|
59
|
+
### Patch Changes
|
|
60
|
+
|
|
61
|
+
- [`15559e4`](https://github.com/dreki-gg/pi-extensions/commit/15559e4d3392e4b5e1779cf191a69725f029a22b) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Fix Context7 config loading to read from Pi's global extension directory (`~/.pi/agent/extensions/context7`) instead of the installed npm package directory. This restores `apiKey` detection from `config.json`, ensures authenticated requests include the Authorization header, and prevents unexpected rate limiting when a key is already configured.
|
|
62
|
+
|
|
63
|
+
## 0.1.3
|
|
64
|
+
|
|
65
|
+
### Patch Changes
|
|
66
|
+
|
|
67
|
+
- [`147eb20`](https://github.com/dreki-gg/pi-extensions/commit/147eb205ace0f842da2f2823a3a3fe163ee29ad5) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Improve compatibility with newer PI releases.
|
|
68
|
+
|
|
69
|
+
- `@dreki-gg/pi-delegate`: limit bundled agent bootstrap work to startup/reload-compatible session starts.
|
|
70
|
+
- `@dreki-gg/pi-context7`: tighten tool definitions and alias argument normalization for PI compatibility.
|
|
71
|
+
|
|
72
|
+
## 0.1.2
|
|
73
|
+
|
|
74
|
+
### Patch Changes
|
|
75
|
+
|
|
76
|
+
- [`53809f8`](https://github.com/dreki-gg/pi-extensions/commit/53809f83cdf054d1eb58c577903a1d2619a2a654) Thanks [@jalbarrang](https://github.com/jalbarrang)! - Add repository.url to package.json for npm provenance verification
|
|
77
|
+
|
|
78
|
+
## 0.1.1
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- [`b1e603c`](https://github.com/dreki-gg/pi-extensions/commit/b1e603c9dab1837eed39880c0455b553deab5cb0) Thanks [@jalbarrang](https://github.com/jalbarrang)! - init packages
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Juan Albarran
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @dreki-gg/pi-doc-search
|
|
2
|
+
|
|
3
|
+
Library doc-search tools for pi, powered by [Context7](https://context7.com). Bypasses MCP entirely — direct HTTP to the Context7 API with a persistent searchable cache.
|
|
4
|
+
|
|
5
|
+
Formerly published as `@dreki-gg/pi-context7`.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pi install npm:@dreki-gg/pi-doc-search
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Tools
|
|
14
|
+
|
|
15
|
+
| Tool | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| `doc_search_resolve_library_id` | Resolve a library/package name to a Context7 library ID |
|
|
18
|
+
| `doc_search_get_library_docs` | Fetch curated docs by ID or name (auto-resolves) |
|
|
19
|
+
| `doc_search_get_cached_doc_raw` | Read full raw cached docs by docRef or semantic lookup |
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
|
|
24
|
+
Set env var (preferred):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export CONTEXT7_API_KEY=ctx7sk-...
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or create `~/.pi/agent/extensions/doc-search/config.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"apiKey": "ctx7sk-...",
|
|
35
|
+
"cache": {
|
|
36
|
+
"resolveTtlHours": 168,
|
|
37
|
+
"docsTtlHours": 24
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
API key is optional — Context7 works without one but with lower rate limits.
|
|
43
|
+
|
|
44
|
+
## Cache
|
|
45
|
+
|
|
46
|
+
Stored under `~/.pi/agent/extensions/doc-search/cache/` with:
|
|
47
|
+
- Atomic JSON writes
|
|
48
|
+
- Structured indexes (by library name, version, ID, docRef)
|
|
49
|
+
- TTL-based expiry with stale fallback
|
|
50
|
+
- Automatic pruning of expired/orphaned entries
|