opencode-readseek 0.10.6 → 0.11.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 +67 -11
- package/dist/index.js +1058 -1062
- package/dist/v2.js +60 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -13,12 +13,28 @@ For OpenCode with the legacy server plugin API, add the plugin to `opencode.json
|
|
|
13
13
|
}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
OpenCode V2
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
For OpenCode V2, install the package locally:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm install --save-dev opencode-readseek
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then select the isolated entrypoint in your project's `opencode.json`:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"plugins": ["./node_modules/opencode-readseek/dist/v2.js"]
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Local plugin modules can also import the default export from `opencode-readseek/v2`.
|
|
31
|
+
This entrypoint does not load the legacy tool implementation. The existing
|
|
32
|
+
`opencode-readseek` and `opencode-readseek/server` entrypoints remain unchanged.
|
|
33
|
+
|
|
34
|
+
The V2 entrypoint supplies a ReadSeek skill and agent guidance only; it does not
|
|
35
|
+
register custom tools. The `readseek_*` tools listed below require the legacy
|
|
36
|
+
server plugin API. To use the V2 skill, install `@jarkkojs/readseek` globally so
|
|
37
|
+
`readseek` is on PATH; otherwise use OpenCode's built-in tools.
|
|
22
38
|
|
|
23
39
|
The plugin uses the AppImage on Linux (without FUSE) and native executables on
|
|
24
40
|
macOS/Windows supplied by `@jarkkojs/readseek`. Set
|
|
@@ -26,9 +42,46 @@ macOS/Windows supplied by `@jarkkojs/readseek`. Set
|
|
|
26
42
|
|
|
27
43
|
## Tools
|
|
28
44
|
|
|
29
|
-
|
|
30
|
-
`
|
|
31
|
-
`
|
|
45
|
+
- Read without inference: `readseek_show_content`, `readseek_show_structure`,
|
|
46
|
+
`readseek_show_metadata`, `readseek_show_assets`.
|
|
47
|
+
- Check: `readseek_check_syntax`, `readseek_check_rules`.
|
|
48
|
+
- Explicit inference: `readseek_generate_caption`, `readseek_detect_objects`,
|
|
49
|
+
`readseek_recognize_text`.
|
|
50
|
+
- Find: `readseek_find_text`, `readseek_find_nodes`, `readseek_find_definitions`,
|
|
51
|
+
`readseek_find_references`.
|
|
52
|
+
- Mutate: `readseek_edit_text`, `readseek_rename_symbol`, `readseek_write_file`.
|
|
53
|
+
|
|
54
|
+
Tool names mirror native verb-object commands, such as `show content`,
|
|
55
|
+
`find nodes`, and `edit text`. Paths resolve against the project directory.
|
|
56
|
+
Use `at` selectors (`line:N[:COLUMN]`, `hash:H[:COLUMN]`, `symbol:NAME`,
|
|
57
|
+
`page:N`, `node:ID`, or `asset:ID`) where supported. Structure defaults to
|
|
58
|
+
`depth: 1`. Use separate structure, metadata, and syntax tools rather than
|
|
59
|
+
combining facets in a content request.
|
|
60
|
+
|
|
61
|
+
`readseek_find_nodes` accepts `pattern`, `context` with `selector`, or `rule`.
|
|
62
|
+
`readseek_find_references` requires exactly one of `name` or `at`; binding
|
|
63
|
+
references and renames use line or hash cursors. KDL selection/check rules
|
|
64
|
+
may be inline or `@path`; tool calls cannot supply standard input.
|
|
65
|
+
|
|
66
|
+
`readseek_find_text` accepts exactly one of literal `text` or regex `pattern`.
|
|
67
|
+
The adapter also supports `literal`, `ignoreCase`, `glob`, `context`, `limit`,
|
|
68
|
+
and per-file `summary`. Native `find text --text` searches literally.
|
|
69
|
+
|
|
70
|
+
Read fresh `LINE:HASH` anchors before editing. Each edit item contains exactly
|
|
71
|
+
one nested `set_line`, `replace_lines`, `insert_after`, `replace_symbol`, or
|
|
72
|
+
`replace` object. Edits and renames default to applying after a verified plan
|
|
73
|
+
and edit permission; use `apply: false` to preview and `planHash` to require
|
|
74
|
+
that plan when applying. `write_file` replaces complete text files.
|
|
75
|
+
|
|
76
|
+
Syntax and rule checks treat exit 1 as findings, not transport failure;
|
|
77
|
+
exit 0 is clean and exit 2 is failure. Syntax checks do not typecheck.
|
|
78
|
+
|
|
79
|
+
Assets auto-materialize into the cache. Content and asset tools return usable
|
|
80
|
+
cached paths and attach images according to `imageMode`; there is no extract
|
|
81
|
+
command or asset output-path parameter. Inference is only requested through
|
|
82
|
+
the explicit inference tools (`level: low|medium|high`, default `low`). Caption
|
|
83
|
+
`include` may request `text` and/or `objects`. Models must already be installed;
|
|
84
|
+
reading never silently invokes OCR or downloads a model.
|
|
32
85
|
|
|
33
86
|
To control image handling:
|
|
34
87
|
|
|
@@ -43,12 +96,15 @@ To control image handling:
|
|
|
43
96
|
## Development
|
|
44
97
|
|
|
45
98
|
```sh
|
|
46
|
-
bun install
|
|
47
99
|
bun test
|
|
48
|
-
|
|
100
|
+
npm run build
|
|
101
|
+
npm run typecheck
|
|
49
102
|
```
|
|
50
103
|
|
|
51
104
|
|
|
105
|
+
For real-binary checks, set `READSEEK_BINARY` to the built native executable,
|
|
106
|
+
for example `/absolute/path/to/packages/readseek/build/readseek`.
|
|
107
|
+
|
|
52
108
|
## Licensing
|
|
53
109
|
|
|
54
110
|
`opencode-readseek` is licensed under the Apache 2.0 license. See [LICENSE](LICENSE)
|