pi-readseek 0.10.7 → 0.11.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-readseek",
3
- "version": "0.10.7",
3
+ "version": "0.11.1",
4
4
  "description": "Pi extension for LINE:HASH-anchored file operations and structural code navigation",
5
5
  "type": "module",
6
6
  "exports": {
@@ -39,8 +39,8 @@
39
39
  "node": ">=20.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@jarkkojs/readseek": "^0.10.7",
43
- "@jarkkojs/readseek-api": "^0.10.7",
42
+ "@jarkkojs/readseek": "^0.11.1",
43
+ "@jarkkojs/readseek-api": "^0.11.1",
44
44
  "diff": "^9.0.0",
45
45
  "xxhash-wasm": "^1.1.0"
46
46
  },
@@ -1,7 +1,7 @@
1
1
  Edit existing text files with fresh `LINE:HASH` anchors. Read or search the file first when no fresh anchors are available. Each `edits[]` item must use exactly one nested object: `{"set_line":{"anchor":"LINE:HASH","new_text":"..."}}`, `{"replace_lines":{"start_anchor":"LINE:HASH","end_anchor":"LINE:HASH","new_text":"..."}}`, `{"insert_after":{"anchor":"LINE:HASH","new_text":"..."}}`, `{"replace_symbol":{"symbol":"name","new_body":"..."}}`, or `{"replace":{"old_text":"...","new_text":"..."}}`.
2
2
 
3
- Anchors come from `readSeek_inspect`, `readSeek_grep`, `readSeek_search`,
4
- `readSeek_refs`, `readSeek_def`, or `readSeek_write`.
3
+ Anchors come from `readSeek_show_content`, `readSeek_find_text`, `readSeek_find_nodes`,
4
+ `readSeek_find_references`, `readSeek_find_definitions`, or `readSeek_write_file`.
5
5
 
6
6
  ## Variants
7
7
 
@@ -8,7 +8,7 @@ Go to a symbol definition or declaration by name. Accepts qualified or unqualifi
8
8
  - `gitScope` — in a Git repository, which files to search: `tracked`, `untracked`,
9
9
  `ignored` (untracked plus ignored), or `all`. Defaults to tracked plus untracked.
10
10
 
11
- After `readSeek_inspect` with `select: "identity"`, use
11
+ After `readSeek_show_content` with `select: "identity"`, use
12
12
  `identity.identifier.text` for the token under the cursor. Use
13
13
  `identity.symbol.qualified_name` only when intentionally navigating to the
14
14
  enclosing declaration.
@@ -1,8 +1,10 @@
1
- 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.
1
+ Search code by AST structure using ast-grep-style patterns. Results include line hashes usable as `LINE:HASH` anchors. Use `readSeek_find_text` for identifiers, strings, comments, configuration, documentation, or other plain text and regex.
2
2
 
3
3
  ## Parameters
4
4
 
5
5
  - `pattern` — AST pattern to match.
6
+ - `context` — surrounding code context for sub-statement patterns (used with `selector`).
7
+ - `selector` — target AST node kind to extract from pattern context.
6
8
  - `path` — file or directory; defaults to the current directory.
7
9
  - `language` — language override for ambiguous, extensionless, generated, or
8
10
  JSX-like source.
@@ -28,3 +30,12 @@ $OBJ.$METHOD($$$ARGS)
28
30
  <$TAG $$$ATTRS>$$$CHILDREN</$TAG>
29
31
  if ($COND) { $$$BODY }
30
32
  ```
33
+
34
+ ## Sub-statement patterns
35
+
36
+ When searching syntax fragments that cannot parse as standalone statements (such as struct fields, function parameters, or class members), provide the surrounding syntax in `context` and specify the target node kind in `selector`:
37
+
38
+ ```text
39
+ context: "struct S { int $NAME; };", selector: "field_declaration"
40
+ context: "fn foo($NAME: i32) {}", selector: "parameter"
41
+ ```
@@ -1,6 +1,6 @@
1
1
  Extract one document asset selected by a stable `asset:ID` into a destination file.
2
2
 
3
- Call `readSeek_inspect` on the document first to discover asset IDs. This tool writes binary data directly to disk and never returns those bytes through tool output.
3
+ Call `readSeek_show_content` on the document first to discover asset IDs. This tool writes binary data directly to disk and never returns those bytes through tool output.
4
4
 
5
5
  ## Parameters
6
6
 
@@ -27,7 +27,7 @@ Use this for anchored source content, diagnostics, cursor identity, shallow stru
27
27
 
28
28
  ## PDF workflow
29
29
 
30
- Inspect a PDF without a selector first. The result contains stable page, node, and asset IDs. Narrow with `page:N`, `node:ID`, or a KDL `query`. Use `readSeek_extract` only when the binary bytes of an `asset:ID` must be saved.
30
+ Inspect a PDF without a selector first. The result contains stable page, node, and asset IDs. Narrow with `page:N`, `node:ID`, or a KDL `query`. Use `readSeek_show_assets` only when the binary bytes of an `asset:ID` must be saved.
31
31
 
32
32
  ## Output
33
33
 
File without changes
File without changes
File without changes
File without changes