pi-readseek 0.6.11 → 0.6.12

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 CHANGED
@@ -1,50 +1,43 @@
1
1
  # pi-readseek
2
2
 
3
- `pi-readseek` is a pi extension for readseek-backed file reading, hash-anchored
4
- editing, anchored grep, structural maps, symbol lookup, and structural search.
5
- It exposes readseek tools under the `readSeek_` prefix. Built-in pi tools stay
6
- active unless excluded in settings.
3
+ `pi-readseek` is a Pi extension for ReadSeek-backed file reading, hash-anchored
4
+ editing, anchored grep, structural maps, symbol navigation, and structural search.
5
+ Pi's built-in tools remain unchanged by default. `replacedTools` can register the
6
+ corresponding ReadSeek implementations under built-in names.
7
7
 
8
8
  ## Installation
9
9
 
10
- ```bash
10
+ ```sh
11
11
  pi install npm:pi-readseek
12
12
  ```
13
13
 
14
- The structural search and map features require the `@jarkkojs/readseek` native
15
- binary. The extension auto-installs the correct platform package, or you can
16
- install it manually:
17
-
18
- ```bash
19
- # Auto-installed by the extension on supported platforms.
20
- # Manual install (if needed):
21
- npm install --save-dev @jarkkojs/readseek
22
- ```
14
+ `pi-readseek` depends on `@jarkkojs/readseek`; installation includes the native
15
+ binary automatically on supported platforms.
23
16
 
24
17
  ## Tools
25
18
 
26
- - **readSeek_read:** reads text with `LINE:HASH` anchors; when image modes are
19
+ - `readSeek_read`: reads text with `LINE:HASH` anchors; when image modes are
27
20
  enabled, images and PDFs can be returned as base64 or analyzed locally.
28
- - **readSeek_edit:** edits existing text files using fresh `LINE:HASH` anchors.
29
- - **readSeek_grep:** searches text and returns edit-ready anchors.
30
- - **readSeek_search:** searches code by structural AST pattern.
31
- - **readSeek_refs:** finds identifier references with enclosing symbols.
32
- - **readSeek_rename:** plans or applies binding-aware renames.
33
- - **readSeek_hover:** identifies the cursor token and enclosing symbol.
34
- - **readSeek_def:** finds structural symbol definitions.
35
- - **readSeek_check:** checks a source file for parser errors and missing syntax.
36
- - **readSeek_write:** creates or overwrites whole files and returns anchors.
21
+ - `readSeek_edit`: edits existing text files using fresh `LINE:HASH` anchors.
22
+ - `readSeek_grep`: searches text and returns edit-ready anchors.
23
+ - `readSeek_search`: searches code by structural AST pattern.
24
+ - `readSeek_refs`: finds identifier references with enclosing symbols.
25
+ - `readSeek_rename`: plans or applies binding-aware renames; workspace matches are
26
+ name-based where binding support is unavailable.
27
+ - `readSeek_hover`: identifies the cursor token and enclosing symbol.
28
+ - `readSeek_def`: finds structural symbol definitions.
29
+ - `readSeek_check`: checks a source file for parser errors and missing syntax.
30
+ - `readSeek_write`: creates or overwrites whole files and returns anchors.
37
31
 
38
32
  ## Settings
39
33
 
40
34
  `pi-readseek` reads optional JSON settings from:
41
35
 
42
- - `~/.pi/agent/settings.json` — Global
43
- - `.pi/settings.json` — Project
36
+ - `~/.pi/agent/settings.json` — global settings.
37
+ - `.pi/settings.json` — project settings.
44
38
 
45
- Project settings override global settings. The `readseek` section lives inside pi's
46
- shared `settings.json`, alongside other extensions' sections. All settings are
47
- optional (defaults shown):
39
+ Project settings override global settings. The `readseek` section lives in Pi's
40
+ shared `settings.json`. All settings are optional; defaults are shown below.
48
41
 
49
42
  ```json
50
43
  {
@@ -61,18 +54,18 @@ optional (defaults shown):
61
54
  }
62
55
  ```
63
56
 
64
- - **replacedTools:** built-in tool names to replace with their `readSeek_*` equivalents.
57
+ - `replacedTools`: built-in tool names to replace with ReadSeek implementations.
65
58
  Valid values are `"read"`, `"edit"`, `"write"`, and `"grep"`. For a
66
- readseek-only file surface, use `["read", "edit", "write", "grep"]`.
67
- - **imageMode:** `"auto"` exposes `none`, `all`, `ocr`, `caption`, and `objects`;
59
+ ReadSeek-only file surface, use `["read", "edit", "write", "grep"]`.
60
+ - `imageMode`: `"auto"` exposes `none`, `all`, `ocr`, `caption`, and `objects`;
68
61
  `"on"` omits `none`; `"off"` removes the `image` parameter and always skips
69
62
  image/PDF files. Omitting `image` also skips visual files.
70
- - **syntaxValidation:** pre-write syntax-regression check in `readSeek_edit`:
71
- `"warn"` writes with a warning, `"block"` aborts without writing, `"off"`
63
+ - `syntaxValidation`: pre-write syntax-regression check in `readSeek_edit`:
64
+ `"warn"` writes with a warning, `"block"` aborts without writing, and `"off"`
72
65
  skips the check.
73
- - **timeoutMs:** readseek invocation timeout in milliseconds.
74
- - **grep.maxLines** / **grep.maxBytes:** visible `readSeek_grep` output
75
- budget; values above the defaults are clamped.
66
+ - `timeoutMs`: ReadSeek invocation timeout in milliseconds.
67
+ - `grep.maxLines` / `grep.maxBytes`: visible `readSeek_grep` output budget; values
68
+ above the defaults are clamped.
76
69
 
77
70
  ## Licensing
78
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-readseek",
3
- "version": "0.6.11",
3
+ "version": "0.6.12",
4
4
  "description": "Pi extension for readseek-backed hash-anchored read/edit/grep, structural code maps, structural search, and file exploration",
5
5
  "type": "module",
6
6
  "exports": {
@@ -39,7 +39,7 @@
39
39
  "node": ">=20.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@jarkkojs/readseek": "^0.6.11",
42
+ "@jarkkojs/readseek": "^0.6.12",
43
43
  "diff": "^8.0.3",
44
44
  "xxhash-wasm": "^1.1.0"
45
45
  },
@@ -59,7 +59,6 @@
59
59
  "vitest": "^4.1.0"
60
60
  },
61
61
  "directories": {
62
- "doc": "docs",
63
62
  "test": "tests"
64
63
  },
65
64
  "bugs": {
package/prompts/check.md CHANGED
@@ -2,7 +2,7 @@ Check a source file for parser errors and missing syntax. Use after edits for qu
2
2
 
3
3
  ## Parameters
4
4
 
5
- - `path` - source file to check.
5
+ - `path` — source file to check.
6
6
 
7
7
  ## Output
8
8
 
package/prompts/edit.md CHANGED
@@ -42,9 +42,9 @@ matches before continuing.
42
42
  ## `replace_symbol`
43
43
 
44
44
  Use `replace_symbol` for one whole mapped `Name`, `Class.method`, or
45
- `Name@<line>` in TypeScript, JavaScript, Rust, or Java. `new_body` must be
46
- non-empty and unindented. Confirm fuzzy symbol matches first; do not overlap it
47
- with anchored edits.
45
+ `Name@<line>` in any mappable source file. `new_body` must be non-empty and
46
+ unindented. Confirm fuzzy symbol matches first; do not overlap them with anchored
47
+ edits.
48
48
 
49
49
  ## Stale anchors
50
50
 
@@ -59,9 +59,10 @@ Retry with those anchors, or read/search again. Verify any auto-relocation warni
59
59
  ## Validation and warnings
60
60
 
61
61
  All edits validate before writing; hard failures write nothing. Anchored edits run
62
- bottom-up. `no-op` means no change. Syntax validation for Rust, C++, C headers,
63
- and Java follows `readseek.syntaxValidation`: `warn` (default), `block`, or `off`.
64
- It reports only newly introduced parser errors.
62
+ bottom-up. `no-op` means no change. Syntax validation for every language with a
63
+ tree-sitter parser follows `readseek.syntaxValidation`: `warn` (default), `block`,
64
+ or `off`. It triggers when error or missing-node counts increase and reports the
65
+ post-edit diagnostic ranges.
65
66
 
66
67
  ## Optional post-edit verification
67
68
 
package/prompts/grep.md CHANGED
@@ -19,4 +19,6 @@ Search plain text or regex in files and return edit-ready `LINE:HASH` anchors. U
19
19
  - `scope` — only `"symbol"` is supported.
20
20
  - `scopeContext` — non-negative context within symbol scope; requires `scope: "symbol"`.
21
21
 
22
- If output says results were truncated at `limit` or by display budget, narrow before editing. Good narrowing order: `summary` → `path`/`glob` → stricter pattern → `scope: "symbol"` or `context`.
22
+ If output is truncated at `limit` or by the display budget, narrow with `summary`,
23
+ then `path`/`glob`, then a stricter pattern. Request context or symbol blocks only
24
+ after narrowing.
package/prompts/read.md CHANGED
@@ -24,7 +24,7 @@ Truncated full-file reads append a map when available. Use its ranges for follow
24
24
 
25
25
  | Query | Reads |
26
26
  |---|---|
27
- | `{ "symbol": "processEvent" }` | function or top-level symbol |
27
+ | `{ "symbol": "processEvent" }` | function or unqualified symbol |
28
28
  | `{ "symbol": "EventEmitter" }` | class/interface/type/enum/etc. |
29
29
  | `{ "symbol": "EventEmitter.emit" }` | child method/member |
30
30
  | `{ "symbol": "Foo.bar@42" }` | overload/definition near line 42 |
package/prompts/refs.md CHANGED
@@ -20,5 +20,6 @@ shadows.
20
20
 
21
21
  ## Git selection
22
22
 
23
- In Git repositories, directory search includes tracked/indexed and untracked
24
- non-ignored files. `ignored` requires `others`.
23
+ In Git repositories, directory search includes tracked/indexed and untracked,
24
+ non-ignored files by default. `cached` or `others` restricts the search to that
25
+ group; `ignored` requires `others`.
package/prompts/rename.md CHANGED
@@ -1,8 +1,9 @@
1
- Rename the symbol at a cursor without changing same-named bindings. Use for symbol renames; use search and edit for broader refactors.
1
+ Rename the symbol at a cursor without changing resolvable same-named bindings. Use for symbol renames; use search and edit for broader refactors.
2
2
 
3
3
  ## Parameters
4
4
 
5
5
  - `path`, `line`, `to` — required file, one-based cursor line, and plain new name.
6
6
  - `column` — optional one-based cursor byte column.
7
- - `workspace` — expand across the project; local shadows in other files are excluded.
7
+ - `workspace` — expand across the project; local shadows are excluded where binding
8
+ support is available, and other files are otherwise matched by name.
8
9
  - `apply` — default `true`; set `false` to return only the verified plan.
package/prompts/search.md CHANGED
@@ -30,6 +30,6 @@ punctuation must be valid for the selected language.
30
30
 
31
31
  ## Git selection
32
32
 
33
- In Git repositories, directory search includes tracked/indexed and untracked
34
- non-ignored files. Use `cached`, `others`, and `ignored` to choose; `ignored`
35
- requires `others`.
33
+ In Git repositories, directory search includes tracked/indexed and untracked,
34
+ non-ignored files by default. `cached` or `others` restricts the search to that
35
+ group; `ignored` requires `others`.
package/prompts/write.md CHANGED
@@ -1,6 +1,6 @@
1
1
  Create or replace a complete file and return `LINE:HASH` anchors. Use for new or fully generated files; use anchored edits for small changes.
2
2
 
3
- ## Use / avoid
3
+ ## Usage
4
4
 
5
5
  Existing files are overwritten without confirmation. Binary-looking content is
6
6
  rejected without writing.