opencode-readseek 0.6.3 → 0.6.4

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/index.ts +30 -30
  2. package/package.json +2 -2
package/index.ts CHANGED
@@ -355,8 +355,8 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
355
355
  tool: {
356
356
  readseek_read: readseekTool(
357
357
  imagePolicy === "off"
358
- ? "Read text with stable LINE:HASH anchors. Image and PDF files are skipped."
359
- : `Read text with stable LINE:HASH anchors. For images and PDFs, explicitly select image: ${imageModes.join(", ")}; omitting image skips the file.`,
358
+ ? "Read text with LINE:HASH anchors for durable references. Images and PDFs are skipped."
359
+ : `Read text with LINE:HASH anchors for durable references. For images or PDFs, select a mode (${imageModes.join(", ")}) or omit image to skip.`,
360
360
  {
361
361
  path: tool.schema.string().describe("Path relative to the project directory"),
362
362
  offset: tool.schema.number().int().positive().optional().describe("One-based starting line"),
@@ -365,7 +365,7 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
365
365
  ? {}
366
366
  : {
367
367
  image: tool.schema.enum(imageModes as [ImageMode, ...ImageMode[]]).optional()
368
- .describe(`Image/PDF mode: ${imageModes.join(", ")}. Must be selected explicitly.`),
368
+ .describe("Image or PDF processing mode"),
369
369
  }),
370
370
  },
371
371
  "read",
@@ -388,7 +388,7 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
388
388
  },
389
389
  ),
390
390
  readseek_map: readseekTool(
391
- "Build a structural symbol map for a source file.",
391
+ "List symbols and ranges in a source file. Use to inspect structure without reading the full file.",
392
392
  { path: tool.schema.string().describe("Path relative to the project directory") },
393
393
  "map",
394
394
  async (input, context) => {
@@ -398,14 +398,14 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
398
398
  },
399
399
  ),
400
400
  readseek_search: readseekTool(
401
- "Search source code using an ast-grep structural pattern. Results include LINE:HASH anchors.",
401
+ "Search syntax-aware code shapes with an ast-grep pattern and return LINE:HASH anchors. Use for calls, imports, declarations, JSX, or control flow; use text search for plain text.",
402
402
  {
403
- pattern: tool.schema.string().describe("AST pattern"),
403
+ pattern: tool.schema.string().describe("ast-grep pattern, such as console.log($$$ARGS)"),
404
404
  path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
405
- language: tool.schema.string().optional().describe("ast-grep language"),
406
- cached: tool.schema.boolean().optional(),
407
- others: tool.schema.boolean().optional(),
408
- ignored: tool.schema.boolean().optional(),
405
+ language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
406
+ cached: tool.schema.boolean().optional().describe("Search tracked or indexed files in a Git repository"),
407
+ others: tool.schema.boolean().optional().describe("Search untracked files in a Git repository"),
408
+ ignored: tool.schema.boolean().optional().describe("Include ignored untracked files; requires others"),
409
409
  },
410
410
  "search",
411
411
  async (input, context) => {
@@ -419,14 +419,14 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
419
419
  },
420
420
  ),
421
421
  readseek_def: readseekTool(
422
- "Find structural definitions of a symbol. Results include LINE:HASH anchors.",
422
+ "Find symbol declarations by name and return LINE:HASH anchors. Use instead of text search to locate where a function, class, type, or other symbol is defined.",
423
423
  {
424
424
  name: tool.schema.string().describe("Symbol name"),
425
425
  path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
426
- language: tool.schema.string().optional(),
427
- cached: tool.schema.boolean().optional(),
428
- others: tool.schema.boolean().optional(),
429
- ignored: tool.schema.boolean().optional(),
426
+ language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
427
+ cached: tool.schema.boolean().optional().describe("Search tracked or indexed files in a Git repository"),
428
+ others: tool.schema.boolean().optional().describe("Search untracked files in a Git repository"),
429
+ ignored: tool.schema.boolean().optional().describe("Include ignored untracked files; requires others"),
430
430
  },
431
431
  "def",
432
432
  async (input, context) => {
@@ -439,17 +439,17 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
439
439
  },
440
440
  ),
441
441
  readseek_refs: readseekTool(
442
- "Find references to an identifier. Use scope with a cursor to identify a specific binding.",
442
+ "Find identifier usages with enclosing symbols. Use before changing or deleting a symbol; add a cursor scope to exclude same-named bindings.",
443
443
  {
444
444
  name: tool.schema.string().describe("Identifier name"),
445
445
  path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
446
- language: tool.schema.string().optional(),
447
- scope: tool.schema.boolean().optional(),
448
- line: tool.schema.number().int().positive().optional(),
449
- column: tool.schema.number().int().positive().optional(),
450
- cached: tool.schema.boolean().optional(),
451
- others: tool.schema.boolean().optional(),
452
- ignored: tool.schema.boolean().optional(),
446
+ language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
447
+ scope: tool.schema.boolean().optional().describe("Restrict results to the binding at the cursor"),
448
+ line: tool.schema.number().int().positive().optional().describe("Cursor line, required with scope"),
449
+ column: tool.schema.number().int().positive().optional().describe("Cursor byte column for disambiguation"),
450
+ cached: tool.schema.boolean().optional().describe("Search tracked or indexed files in a Git repository"),
451
+ others: tool.schema.boolean().optional().describe("Search untracked files in a Git repository"),
452
+ ignored: tool.schema.boolean().optional().describe("Include ignored untracked files; requires others"),
453
453
  },
454
454
  "refs",
455
455
  async (input, context) => {
@@ -469,12 +469,12 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
469
469
  },
470
470
  ),
471
471
  readseek_hover: readseekTool(
472
- "Identify the token and enclosing symbol at a source cursor.",
472
+ "Identify the token and enclosing symbol at a cursor. Use before definition lookup or rename, or to identify a line's enclosing symbol.",
473
473
  {
474
474
  path: tool.schema.string().describe("Path relative to the project directory"),
475
475
  line: tool.schema.number().int().positive().describe("One-based cursor line"),
476
476
  column: tool.schema.number().int().positive().optional().describe("One-based cursor byte column"),
477
- language: tool.schema.string().optional(),
477
+ language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
478
478
  },
479
479
  "hover",
480
480
  async (input, context) => {
@@ -487,12 +487,12 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
487
487
  },
488
488
  ),
489
489
  readseek_rename: readseekTool(
490
- "Plan a binding-aware rename. This tool never writes files; apply the returned plan through OpenCode's normal edit tools.",
490
+ "Plan a symbol rename without changing same-named bindings. Never writes files; apply the returned edits with OpenCode's edit tools.",
491
491
  {
492
492
  path: tool.schema.string().describe("Path relative to the project directory"),
493
- line: tool.schema.number().int().positive().describe("One-based cursor line of the binding"),
494
- column: tool.schema.number().int().positive().optional().describe("One-based cursor byte column"),
495
- to: tool.schema.string().min(1).describe("New binding name"),
493
+ line: tool.schema.number().int().positive().describe("One-based line of the symbol to rename"),
494
+ column: tool.schema.number().int().positive().optional().describe("One-based byte column for disambiguation"),
495
+ to: tool.schema.string().min(1).describe("New symbol name"),
496
496
  workspace: tool.schema.boolean().optional().describe("Include project-wide occurrences"),
497
497
  },
498
498
  "rename",
@@ -513,7 +513,7 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
513
513
  },
514
514
  ),
515
515
  readseek_check: readseekTool(
516
- "Check a source file for parser errors and missing syntax.",
516
+ "Check a source file for parser errors and missing syntax. Use after edits for quick syntax validation, not as a compiler or linter.",
517
517
  { path: tool.schema.string().describe("Path relative to the project directory") },
518
518
  "check",
519
519
  async (input, context) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-readseek",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "OpenCode plugin for readseek-backed structural code navigation",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -30,7 +30,7 @@
30
30
  "node": ">=20.0.0"
31
31
  },
32
32
  "dependencies": {
33
- "@jarkkojs/readseek": "^0.6.3",
33
+ "@jarkkojs/readseek": "^0.6.4",
34
34
  "@opencode-ai/plugin": "^1.17.20"
35
35
  },
36
36
  "devDependencies": {