opencode-readseek 0.8.22 → 0.8.24

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 +42 -36
  2. package/package.json +2 -2
package/index.ts CHANGED
@@ -1152,7 +1152,7 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1152
1152
  (result) => ({ output: boundDocumentOutput(String(result)) }),
1153
1153
  ),
1154
1154
  readseek_map: readseekTool(
1155
- "Inspect a source file's symbol outline. Use this instead of reading the whole file when only declarations, names, kinds, and ranges are needed.",
1155
+ "Inspect a source file's symbol outline. Use this instead of reading the whole file when only declarations, names, kinds, ranges, and line hashes are needed.",
1156
1156
  {
1157
1157
  path: tool.schema.string().describe("Path relative to the project directory"),
1158
1158
  language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
@@ -1167,14 +1167,14 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1167
1167
  },
1168
1168
  ),
1169
1169
  readseek_grep: readseekTool(
1170
- "Search text or regex and return matching LINE:HASH anchors. Set literal for exact text.",
1170
+ "Search text or regex in files and return matching LINE:HASH anchors. Set literal for exact text. Use for identifiers, strings, configuration, errors, comments, and documentation.",
1171
1171
  {
1172
- pattern: tool.schema.string().describe("Text or regular expression to search for"),
1173
- path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
1172
+ pattern: tool.schema.string().describe("Text or regular expression to search for; set literal for exact text"),
1173
+ path: tool.schema.string().optional().describe("File or directory to search; defaults to the project directory"),
1174
1174
  glob: tool.schema.string().optional().describe("File-name glob, such as **/*.ts"),
1175
1175
  literal: tool.schema.boolean().optional().describe("Treat pattern as literal text"),
1176
1176
  ignoreCase: tool.schema.boolean().optional().describe("Ignore case"),
1177
- context: tool.schema.number().int().nonnegative().optional().describe("Surrounding lines to return"),
1177
+ context: tool.schema.number().int().nonnegative().optional().describe("Surrounding lines for each match"),
1178
1178
  limit: tool.schema.number().int().positive().optional().describe("Maximum matching lines; defaults to 100"),
1179
1179
  },
1180
1180
  "grep",
@@ -1252,14 +1252,14 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1252
1252
  },
1253
1253
  ),
1254
1254
  readseek_search: readseekTool(
1255
- "Search code by AST structure using ast-grep-style patterns. Results include edit-ready LINE:HASH anchors. Use readseek_grep for identifiers, strings, comments, configuration, documentation, or other plain text and regex.",
1255
+ "Search code by AST structure using ast-grep-style patterns. Results include line hashes usable as LINE:HASH anchors. Use readseek_grep for identifiers, strings, comments, configuration, documentation, or other plain text and regex.",
1256
1256
  {
1257
1257
  pattern: tool.schema.string().describe("AST pattern (ast-grep style), such as console.log($$$ARGS)"),
1258
- path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
1258
+ path: tool.schema.string().optional().describe("File or directory to search; defaults to the project directory"),
1259
1259
  language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
1260
- cached: tool.schema.boolean().optional().describe("Search tracked or indexed files in a Git repository"),
1261
- others: tool.schema.boolean().optional().describe("Search untracked files in a Git repository"),
1262
- ignored: tool.schema.boolean().optional().describe("Include ignored untracked files; requires others"),
1260
+ cached: tool.schema.boolean().optional().describe("In a Git repository, search tracked/indexed files"),
1261
+ others: tool.schema.boolean().optional().describe("In a Git repository, search untracked files"),
1262
+ ignored: tool.schema.boolean().optional().describe("With others=true, include ignored untracked files"),
1263
1263
  },
1264
1264
  "search",
1265
1265
  async (input, context) => {
@@ -1273,14 +1273,14 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1273
1273
  },
1274
1274
  ),
1275
1275
  readseek_def: readseekTool(
1276
- "Go to a symbol definition or declaration by name. Accepts qualified or unqualified names and returns LINE:HASH anchors; use this instead of text search for functions, methods, classes, types, and other declarations.",
1276
+ "Go to a symbol definition or declaration by name. Accepts qualified or unqualified names; use this instead of text search for functions, methods, classes, types, and other declarations.",
1277
1277
  {
1278
- name: tool.schema.string().describe("Symbol name"),
1279
- path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
1278
+ name: tool.schema.string().describe("Qualified or unqualified symbol name"),
1279
+ path: tool.schema.string().optional().describe("File or directory to search; defaults to the project directory"),
1280
1280
  language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
1281
- cached: tool.schema.boolean().optional().describe("Search tracked or indexed files in a Git repository"),
1282
- others: tool.schema.boolean().optional().describe("Search untracked files in a Git repository"),
1283
- ignored: tool.schema.boolean().optional().describe("Include ignored untracked files; requires others"),
1281
+ cached: tool.schema.boolean().optional().describe("In a Git repository, search tracked/indexed files"),
1282
+ others: tool.schema.boolean().optional().describe("In a Git repository, search untracked files"),
1283
+ ignored: tool.schema.boolean().optional().describe("With others=true, include ignored untracked files"),
1284
1284
  },
1285
1285
  "def",
1286
1286
  async (input, context) => {
@@ -1293,17 +1293,17 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1293
1293
  },
1294
1294
  ),
1295
1295
  readseek_refs: readseekTool(
1296
- "Find references or usages of an identifier by name or cursor binding. Results include enclosing symbols and edit-ready LINE:HASH anchors. Without cursor scope, results are identifier-name matches; with scope, they follow one binding and exclude shadows. Use text search for literal occurrences in strings or comments, and use this tool before renaming or deleting a symbol.",
1296
+ "Find references or usages of an identifier by name or cursor binding. Results include enclosing symbols and line hashes usable as LINE:HASH anchors. Without cursor scope, results are identifier-name matches; with scope, they follow one binding and exclude shadows. Use text search for literal occurrences in strings or comments, and use this tool before renaming or deleting a symbol.",
1297
1297
  {
1298
- name: tool.schema.string().describe("Identifier name"),
1299
- path: tool.schema.string().optional().describe("File or directory, defaulting to the project directory"),
1298
+ name: tool.schema.string().describe("Identifier to find references for"),
1299
+ path: tool.schema.string().optional().describe("File or directory to search; defaults to the project directory"),
1300
1300
  language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
1301
1301
  scope: tool.schema.boolean().optional().describe("Restrict results to the binding at the cursor"),
1302
- line: tool.schema.number().int().positive().optional().describe("Cursor line, required with scope"),
1303
- column: tool.schema.number().int().positive().optional().describe("Cursor byte column for disambiguation"),
1304
- cached: tool.schema.boolean().optional().describe("Search tracked or indexed files in a Git repository"),
1305
- others: tool.schema.boolean().optional().describe("Search untracked files in a Git repository"),
1306
- ignored: tool.schema.boolean().optional().describe("Include ignored untracked files; requires others"),
1302
+ line: tool.schema.number().int().positive().optional().describe("One-based cursor line; required with scope"),
1303
+ column: tool.schema.number().int().positive().optional().describe("One-based cursor byte column for disambiguation"),
1304
+ cached: tool.schema.boolean().optional().describe("In a Git repository, search tracked/indexed files"),
1305
+ others: tool.schema.boolean().optional().describe("In a Git repository, search untracked files"),
1306
+ ignored: tool.schema.boolean().optional().describe("With others=true, include ignored untracked files"),
1307
1307
  },
1308
1308
  "refs",
1309
1309
  async (input, context) => {
@@ -1327,7 +1327,7 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1327
1327
  {
1328
1328
  path: tool.schema.string().describe("Path relative to the project directory"),
1329
1329
  line: tool.schema.number().int().positive().describe("One-based cursor line"),
1330
- column: tool.schema.number().int().positive().optional().describe("One-based cursor byte column"),
1330
+ column: tool.schema.number().int().positive().optional().describe("One-based cursor byte column for disambiguation"),
1331
1331
  language: tool.schema.string().optional().describe("Language override when auto-detection is ambiguous"),
1332
1332
  },
1333
1333
  "hover",
@@ -1341,14 +1341,14 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1341
1341
  },
1342
1342
  ),
1343
1343
  readseek_rename: readseekTool(
1344
- "Rename a symbol at a source location. Resolvable same-named bindings are preserved; verified edits apply by default. Set `apply` to false to preview the plan before changing files.",
1344
+ "Rename a symbol at a source location. Resolvable same-named bindings are preserved; verified edits apply by default. Set `apply: false` to preview the plan before changing files.",
1345
1345
  {
1346
1346
  path: tool.schema.string().describe("Path relative to the project directory"),
1347
1347
  line: tool.schema.number().int().positive().describe("One-based cursor line of the symbol to rename"),
1348
1348
  column: tool.schema.number().int().positive().optional().describe("One-based cursor byte column for disambiguation"),
1349
1349
  to: tool.schema.string().min(1).describe("New symbol name"),
1350
- workspace: tool.schema.boolean().optional().describe("Include project-wide occurrences"),
1351
- apply: tool.schema.boolean().optional().describe("Apply verified edits; defaults to true"),
1350
+ workspace: tool.schema.boolean().optional().describe("Rename across the project"),
1351
+ apply: tool.schema.boolean().optional().describe("Apply the verified edits; defaults to true"),
1352
1352
  },
1353
1353
  "rename",
1354
1354
  async (input, context) => {
@@ -1376,24 +1376,30 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1376
1376
  },
1377
1377
  ),
1378
1378
  readseek_edit: readseekTool(
1379
- "Edit an existing text file with fresh LINE:HASH anchors. Stale hashes are rejected before writing.",
1379
+ "Edit an existing text file with fresh LINE:HASH anchors. Supports set_line, replace_lines, and insert_after only. Stale hashes are rejected before writing.",
1380
1380
  {
1381
1381
  path: tool.schema.string().describe("Path relative to the project directory"),
1382
1382
  edits: tool.schema.array(tool.schema.union([
1383
1383
  tool.schema.object({
1384
- set_line: tool.schema.object({ anchor: tool.schema.string(), new_text: tool.schema.string() }).strict(),
1384
+ set_line: tool.schema.object({
1385
+ anchor: tool.schema.string().describe("Fresh LINE:HASH anchor for the line to replace"),
1386
+ new_text: tool.schema.string().describe("Replacement text; use an empty string to delete the line"),
1387
+ }).strict(),
1385
1388
  }).strict(),
1386
1389
  tool.schema.object({
1387
1390
  replace_lines: tool.schema.object({
1388
- start_anchor: tool.schema.string(),
1389
- end_anchor: tool.schema.string(),
1390
- new_text: tool.schema.string(),
1391
+ start_anchor: tool.schema.string().describe("Fresh LINE:HASH anchor for the first line in the range"),
1392
+ end_anchor: tool.schema.string().describe("Fresh LINE:HASH anchor for the last line in the range"),
1393
+ new_text: tool.schema.string().describe("Replacement text; use an empty string to delete the range"),
1391
1394
  }).strict(),
1392
1395
  }).strict(),
1393
1396
  tool.schema.object({
1394
- insert_after: tool.schema.object({ anchor: tool.schema.string(), new_text: tool.schema.string() }).strict(),
1397
+ insert_after: tool.schema.object({
1398
+ anchor: tool.schema.string().describe("Fresh LINE:HASH anchor for the line after which to insert"),
1399
+ new_text: tool.schema.string().describe("Text to insert after the anchored line"),
1400
+ }).strict(),
1395
1401
  }).strict(),
1396
- ])).min(1).describe("LINE:HASH-anchored edits to apply"),
1402
+ ])).min(1).describe("Anchored edits: set_line, replace_lines, or insert_after"),
1397
1403
  },
1398
1404
  "edit",
1399
1405
  async (input, context) => {
@@ -1422,7 +1428,7 @@ export const ReadSeekPlugin: Plugin = async (_input, options) => {
1422
1428
  },
1423
1429
  ),
1424
1430
  readseek_write: readseekTool(
1425
- "Create or replace a whole text file and return LINE:HASH anchors.",
1431
+ "Create or replace a complete text file and return LINE:HASH anchors. Use anchored edits for small changes to an existing file. Binary-looking content is rejected before writing.",
1426
1432
  {
1427
1433
  path: tool.schema.string().describe("Path relative to the project directory"),
1428
1434
  content: tool.schema.string().describe("Complete text file content"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-readseek",
3
- "version": "0.8.22",
3
+ "version": "0.8.24",
4
4
  "description": "OpenCode plugin for anchored file operations and structural code navigation",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -31,7 +31,7 @@
31
31
  "node": ">=20.0.0"
32
32
  },
33
33
  "dependencies": {
34
- "@jarkkojs/readseek": "^0.8.22",
34
+ "@jarkkojs/readseek": "^0.8.24",
35
35
  "@opencode-ai/plugin": "^1.17.20"
36
36
  },
37
37
  "devDependencies": {