pi-readseek 0.7.7 → 0.7.9

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.
Files changed (60) hide show
  1. package/README.md +28 -46
  2. package/dist/index.js +7333 -0
  3. package/package.json +8 -7
  4. package/index.ts +0 -147
  5. package/src/binary-detect.ts +0 -22
  6. package/src/check.ts +0 -92
  7. package/src/coerce-obvious-int.ts +0 -41
  8. package/src/confusable-hyphens.ts +0 -6
  9. package/src/def.ts +0 -143
  10. package/src/diff-data.ts +0 -302
  11. package/src/edit-classify.ts +0 -58
  12. package/src/edit-diff.ts +0 -359
  13. package/src/edit-output.ts +0 -110
  14. package/src/edit-render-helpers.ts +0 -141
  15. package/src/edit-syntax-validate.ts +0 -65
  16. package/src/edit.ts +0 -686
  17. package/src/file-map.ts +0 -17
  18. package/src/fs-error.ts +0 -33
  19. package/src/grep-budget.ts +0 -35
  20. package/src/grep-output.ts +0 -181
  21. package/src/grep-render-helpers.ts +0 -77
  22. package/src/grep-symbol-scope.ts +0 -184
  23. package/src/grep.ts +0 -608
  24. package/src/hashline.ts +0 -736
  25. package/src/hover.ts +0 -140
  26. package/src/path-utils.ts +0 -24
  27. package/src/pending-diff-preview.ts +0 -269
  28. package/src/read-local-bundle.ts +0 -75
  29. package/src/read-output.ts +0 -186
  30. package/src/read-render-helpers.ts +0 -104
  31. package/src/read.ts +0 -661
  32. package/src/readseek/constants.ts +0 -17
  33. package/src/readseek/enums.ts +0 -38
  34. package/src/readseek/formatter.ts +0 -350
  35. package/src/readseek/symbol-error-format.ts +0 -18
  36. package/src/readseek/symbol-lookup.ts +0 -240
  37. package/src/readseek/symbol-tree.ts +0 -21
  38. package/src/readseek/types.ts +0 -49
  39. package/src/readseek-client.ts +0 -1250
  40. package/src/readseek-params.ts +0 -39
  41. package/src/readseek-settings.ts +0 -263
  42. package/src/readseek-value.ts +0 -184
  43. package/src/refs-output.ts +0 -47
  44. package/src/refs.ts +0 -161
  45. package/src/register-tool.ts +0 -29
  46. package/src/rename.ts +0 -182
  47. package/src/replace-symbol.ts +0 -77
  48. package/src/runtime.ts +0 -3
  49. package/src/search-output.ts +0 -50
  50. package/src/search.ts +0 -214
  51. package/src/session-anchors.ts +0 -34
  52. package/src/stat-search-path.ts +0 -29
  53. package/src/syntax-validate-mode.ts +0 -15
  54. package/src/tool-prompt-metadata.ts +0 -107
  55. package/src/tool-types.ts +0 -12
  56. package/src/tui-diff-component.ts +0 -108
  57. package/src/tui-diff-renderer.ts +0 -92
  58. package/src/tui-render-utils.ts +0 -286
  59. package/src/view.ts +0 -158
  60. package/src/write.ts +0 -357
package/README.md CHANGED
@@ -1,13 +1,8 @@
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 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
-
8
- When the ReadSeek binary is available, the extension adds model guidance that
9
- prefers its anchored read, edit, write, rename, and syntax-check workflow while
10
- leaving Pi's built-ins available as fallbacks.
3
+ `pi-readseek` adds ReadSeek's anchored file tools, structural search, and symbol
4
+ navigation to Pi. Built-in tools remain unchanged unless `replacedTools` maps
5
+ `read`, `edit`, `write`, or `grep` to the ReadSeek implementation.
11
6
 
12
7
  ## Installation
13
8
 
@@ -15,37 +10,28 @@ leaving Pi's built-ins available as fallbacks.
15
10
  pi install npm:pi-readseek
16
11
  ```
17
12
 
18
- `pi-readseek` depends on `@jarkkojs/readseek`; installation includes the native
19
- binary automatically on supported platforms.
13
+ The extension depends on `@jarkkojs/readseek`, which installs the native binary on
14
+ supported platforms.
20
15
 
21
16
  ## Tools
22
17
 
23
- - `readSeek_read`: reads text with `LINE:HASH` anchors; when image modes are
24
- enabled, images and PDFs can be returned as base64 or analyzed locally.
25
- PDF reads select one page by default and accept an explicit page.
26
- - `readSeek_edit`: edits existing text files using fresh `LINE:HASH` anchors.
18
+ - `readSeek_read`: reads anchored text by range, symbol, or structural map; it can
19
+ also read or analyze images and PDFs.
20
+ - `readSeek_edit`: applies hash-verified edits to existing text files.
21
+ - `readSeek_write`: creates or replaces complete files and returns anchors.
27
22
  - `readSeek_grep`: searches text and returns edit-ready anchors.
28
- - `readSeek_search`: searches code by structural AST pattern.
29
- - `readSeek_refs`: finds identifier references with enclosing symbols.
30
- - `readSeek_rename`: applies a binding-aware verified rename by default;
31
- `apply: false` returns a dry-run plan. Workspace matches are name-based where
32
- binding support is unavailable.
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_view`: creates or reuses a PDF index, returns its overview, or
37
- narrows it by page, node, kind, or depth.
38
- - `readSeek_write`: creates or overwrites whole files and returns anchors.
23
+ - `readSeek_search`: searches code with structural AST patterns.
24
+ - `readSeek_def`, `readSeek_refs`, `readSeek_hover`: navigate symbols.
25
+ - `readSeek_rename`: applies binding-aware renames by default. Set `apply: false`
26
+ for a dry run; workspace matches are name-based where binding support is unavailable.
27
+ - `readSeek_check`: reports parser errors and missing syntax.
28
+ - `readSeek_view`: indexes a PDF or narrows an existing index by page, node, kind,
29
+ or depth.
39
30
 
40
31
  ## Settings
41
32
 
42
- `pi-readseek` reads optional JSON settings from:
43
-
44
- - `~/.pi/agent/settings.json` — global settings.
45
- - `.pi/settings.json` — project settings.
46
-
47
- Project settings override global settings. The `readseek` section lives in Pi's
48
- shared `settings.json`. All settings are optional; defaults are shown below.
33
+ Add an optional `readseek` section to `~/.pi/agent/settings.json` (global) or
34
+ `.pi/settings.json` (project). Project settings take precedence. Defaults:
49
35
 
50
36
  ```json
51
37
  {
@@ -62,23 +48,19 @@ shared `settings.json`. All settings are optional; defaults are shown below.
62
48
  }
63
49
  ```
64
50
 
65
- - `replacedTools`: built-in tool names to replace with ReadSeek implementations.
66
- Valid values are `"read"`, `"edit"`, `"write"`, and `"grep"`. For a
67
- ReadSeek-only file surface, use `["read", "edit", "write", "grep"]`.
51
+ - `replacedTools`: built-in tools backed by ReadSeek. Valid values are `"read"`,
52
+ `"edit"`, `"write"`, and `"grep"`.
68
53
  - `imageMode`: `"auto"` exposes `none`, `all`, `ocr`, `caption`, and `objects`;
69
- `"on"` omits `none`; `"off"` removes the `image` parameter and always skips
70
- image/PDF files. Omitting `image` also skips visual files.
71
- - `syntaxValidation`: pre-write syntax-regression check in `readSeek_edit`:
72
- `"warn"` writes with a warning, `"block"` aborts without writing, and `"off"`
73
- skips the check.
74
- - `timeoutMs`: ReadSeek invocation timeout in milliseconds.
75
- - `grep.maxLines` / `grep.maxBytes`: visible `readSeek_grep` output budget; values
54
+ `"on"` omits `none`; `"off"` skips images and PDFs. Omitting `image` also skips
55
+ visual files.
56
+ - `syntaxValidation`: syntax-regression handling for `readSeek_edit`. `"warn"`
57
+ writes with a warning, `"block"` aborts, and `"off"` disables the check.
58
+ - `timeoutMs`: ReadSeek command timeout in milliseconds.
59
+ - `grep.maxLines` and `grep.maxBytes`: output limits for `readSeek_grep`. Values
76
60
  above the defaults are clamped.
77
61
 
78
62
  ## Licensing
79
63
 
80
- `pi-readseek` is licensed under `Apache-2.0`. See [LICENSE](LICENSE) for more
81
- information.
82
-
83
- The upstream `@jarkkojs/readseek` packages are licensed separately as
64
+ `pi-readseek` is licensed under `Apache-2.0`; see [LICENSE](LICENSE).
65
+ `@jarkkojs/readseek` is licensed separately under
84
66
  `Apache-2.0 AND LGPL-2.1-or-later`.