opencode-readseek 0.10.6 → 0.10.7
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 +22 -6
- package/dist/index.js +1 -0
- package/dist/v2.js +37 -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
|
package/dist/index.js
CHANGED
package/dist/v2.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// v2.ts
|
|
2
|
+
var GUIDANCE = "For structural code navigation, consult the readseek skill when ReadSeek tools are unavailable and the readseek CLI is installed.";
|
|
3
|
+
var SKILL = {
|
|
4
|
+
id: "readseek",
|
|
5
|
+
name: "readseek",
|
|
6
|
+
description: "Use for structural code navigation and anchored edits when the readseek CLI is installed.",
|
|
7
|
+
path: "/plugin/opencode-readseek/SKILL.md",
|
|
8
|
+
content: `# ReadSeek CLI
|
|
9
|
+
|
|
10
|
+
When ReadSeek tools are unavailable, use the readseek CLI for structural navigation and anchored edits if it is installed and available on PATH. Run \`readseek --help\` to inspect supported commands before invoking them. Get fresh anchors before editing; re-read after external file changes.
|
|
11
|
+
|
|
12
|
+
This V2 plugin supplies guidance only; it does not register readseek_* tools. If the CLI is unavailable, use OpenCode's built-in tools instead.`
|
|
13
|
+
};
|
|
14
|
+
var ReadSeekV2Plugin = {
|
|
15
|
+
id: "opencode-readseek",
|
|
16
|
+
setup: async (ctx) => {
|
|
17
|
+
await ctx.skill.transform((draft) => {
|
|
18
|
+
if (!draft.get(SKILL.id))
|
|
19
|
+
draft.add(SKILL);
|
|
20
|
+
});
|
|
21
|
+
await ctx.agent.transform((draft) => {
|
|
22
|
+
for (const agent of draft.list()) {
|
|
23
|
+
draft.update(String(agent.id), (item) => {
|
|
24
|
+
if (!item.system?.includes(GUIDANCE))
|
|
25
|
+
item.system = [item.system, GUIDANCE].filter(Boolean).join(`
|
|
26
|
+
|
|
27
|
+
`);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var v2_default = ReadSeekV2Plugin;
|
|
34
|
+
export {
|
|
35
|
+
ReadSeekV2Plugin,
|
|
36
|
+
v2_default as default
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-readseek",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.7",
|
|
4
4
|
"description": "OpenCode plugin for anchored file operations and structural code navigation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dist/index.js",
|
|
9
|
-
"./server": "./dist/index.js"
|
|
9
|
+
"./server": "./dist/index.js",
|
|
10
|
+
"./v2": "./dist/v2.js"
|
|
10
11
|
},
|
|
11
12
|
"keywords": [
|
|
12
13
|
"opencode",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"README.md"
|
|
25
26
|
],
|
|
26
27
|
"scripts": {
|
|
27
|
-
"build": "bun build ./index.ts --
|
|
28
|
+
"build": "bun build ./index.ts ./v2.ts --outdir dist --target=node --format=esm --packages=external",
|
|
28
29
|
"prepack": "npm run build",
|
|
29
30
|
"typecheck": "tsc --noEmit"
|
|
30
31
|
},
|
|
@@ -32,8 +33,8 @@
|
|
|
32
33
|
"node": ">=20.0.0"
|
|
33
34
|
},
|
|
34
35
|
"dependencies": {
|
|
35
|
-
"@jarkkojs/readseek": "^0.10.
|
|
36
|
-
"@jarkkojs/readseek-api": "^0.10.
|
|
36
|
+
"@jarkkojs/readseek": "^0.10.7",
|
|
37
|
+
"@jarkkojs/readseek-api": "^0.10.7",
|
|
37
38
|
"@opencode-ai/plugin": "^1.18.18"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|