opencode-readseek 0.10.5 → 0.10.6

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 (2) hide show
  1. package/dist/index.js +15 -16
  2. package/package.json +12 -3
package/dist/index.js CHANGED
@@ -2714,29 +2714,28 @@ function createReadSeekTools(imagePolicy) {
2714
2714
  }
2715
2715
 
2716
2716
  // v2.ts
2717
- import { define } from "@opencode-ai/plugin/v2/promise";
2718
2717
  var GUIDANCE = "For structural code navigation, consult the readseek skill when ReadSeek tools are unavailable and the readseek CLI is installed.";
2719
- var ReadSeekV2Plugin = define({
2720
- id: "opencode-readseek",
2721
- setup: async (ctx) => {
2722
- await ctx.skill.transform((draft) => {
2723
- draft.source({
2724
- type: "embedded",
2725
- skill: {
2726
- name: "readseek",
2727
- description: "Use for structural code navigation and anchored edits when the readseek CLI is installed.",
2728
- location: "/plugin/opencode-readseek/SKILL.md",
2729
- content: `# ReadSeek CLI
2718
+ var SKILL = {
2719
+ id: "readseek",
2720
+ name: "readseek",
2721
+ description: "Use for structural code navigation and anchored edits when the readseek CLI is installed.",
2722
+ path: "/plugin/opencode-readseek/SKILL.md",
2723
+ content: `# ReadSeek CLI
2730
2724
 
2731
2725
  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.
2732
2726
 
2733
2727
  This V2 plugin supplies guidance only; it does not register readseek_* tools. If the CLI is unavailable, use OpenCode's built-in tools instead.`
2734
- }
2735
- });
2728
+ };
2729
+ var ReadSeekV2Plugin = {
2730
+ id: "opencode-readseek",
2731
+ setup: async (ctx) => {
2732
+ await ctx.skill.transform((draft) => {
2733
+ if (!draft.get(SKILL.id))
2734
+ draft.add(SKILL);
2736
2735
  });
2737
2736
  await ctx.agent.transform((draft) => {
2738
2737
  for (const agent of draft.list()) {
2739
- draft.update(agent.id, (item) => {
2738
+ draft.update(String(agent.id), (item) => {
2740
2739
  if (!item.system?.includes(GUIDANCE))
2741
2740
  item.system = [item.system, GUIDANCE].filter(Boolean).join(`
2742
2741
 
@@ -2745,7 +2744,7 @@ This V2 plugin supplies guidance only; it does not register readseek_* tools. If
2745
2744
  }
2746
2745
  });
2747
2746
  }
2748
- });
2747
+ };
2749
2748
 
2750
2749
  // index.ts
2751
2750
  var ReadSeekPlugin = async (_input, options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-readseek",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "description": "OpenCode plugin for anchored file operations and structural code navigation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -32,13 +32,22 @@
32
32
  "node": ">=20.0.0"
33
33
  },
34
34
  "dependencies": {
35
- "@jarkkojs/readseek": "^0.10.5",
36
- "@jarkkojs/readseek-api": "^0.10.5",
35
+ "@jarkkojs/readseek": "^0.10.6",
36
+ "@jarkkojs/readseek-api": "^0.10.6",
37
37
  "@opencode-ai/plugin": "^1.18.18"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@bgotink/kdl": "0.4.0",
41
+ "@opencode/plugin": "^2.0.26",
41
42
  "@types/bun": "^1.3.14",
42
43
  "typescript": "^5.9.3"
44
+ },
45
+ "peerDependencies": {
46
+ "@opencode/plugin": "^2.0.26"
47
+ },
48
+ "peerDependenciesMeta": {
49
+ "@opencode/plugin": {
50
+ "optional": true
51
+ }
43
52
  }
44
53
  }