@muvon/octofs 0.9.0 → 0.10.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/README.md +26 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -313,15 +313,40 @@ To read several files, make multiple `view` calls — they run in parallel.
|
|
|
313
313
|
{"path": "src/", "max_depth": 2, "include_hidden": true}
|
|
314
314
|
```
|
|
315
315
|
|
|
316
|
-
`pattern`
|
|
316
|
+
`pattern` uses the same gitignore-style glob grammar as ripgrep's `-g/--glob`:
|
|
317
|
+
without `/` it matches filenames at any depth, while a pattern containing `/`
|
|
318
|
+
matches the returned relative path. It supports `*` within one path component,
|
|
319
|
+
`**` across directories, `?`, character classes such as `[abc]`, brace alternatives
|
|
320
|
+
such as `*.{rs,toml}`, and leading `!` exclusions. Use `|` to pass ordered globs in
|
|
321
|
+
one MCP string; later globs take precedence:
|
|
322
|
+
|
|
323
|
+
```json
|
|
324
|
+
{"path": ".", "pattern": "**/*.{rs,toml}|!target/**"}
|
|
325
|
+
{"path": ".", "content": "unsafe", "pattern": "src/**/*.rs|!src/generated/**"}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
The glob filters files discovered by Octofs' gitignore-aware traversal. Use
|
|
329
|
+
`include_hidden: true` to include hidden paths; gitignored paths remain excluded.
|
|
330
|
+
Patterns are limited to 4096 UTF-8 bytes, 64 `|`-separated rules, and 16 nested
|
|
331
|
+
brace levels. They must be a single line and are validated before traversal.
|
|
332
|
+
Escape a literal leading `#` or `!` as `\#` or `\!`; otherwise `#` is rejected
|
|
333
|
+
instead of silently acting as a gitignore comment. Empty brace alternatives such
|
|
334
|
+
as `{,rs}` are rejected because ripgrep does not support them.
|
|
317
335
|
|
|
318
336
|
**Content search:** (literal by default; set `regex: true` for a Rust regex, `(?i)` = case-insensitive)
|
|
319
337
|
```json
|
|
320
338
|
{"path": "src", "content": "fn main"}
|
|
321
339
|
{"path": "src", "content": "unwrap()", "context": 3}
|
|
322
340
|
{"path": "src", "content": "(?i)error", "regex": true}
|
|
341
|
+
{"path": "docs|scripts|BENCHMARK.md", "content": "update_benchmark.py", "context": 4}
|
|
323
342
|
```
|
|
324
343
|
|
|
344
|
+
For an rg-style search across several roots, `path` accepts `|`-separated literal
|
|
345
|
+
files and directories when `content` is set. The roots are not regexes: as with
|
|
346
|
+
rg's positional path arguments, each one must exist. A real path containing `|`
|
|
347
|
+
takes precedence over this shorthand. Root lists must be single-line, contain no
|
|
348
|
+
duplicates, and are limited to 32 roots and 8192 UTF-8 bytes.
|
|
349
|
+
|
|
325
350
|
Directory listings annotate each file as `path<TAB>NL<TAB>~Nt` (line count + estimated tokens) so you can budget reads before opening files; binary files show `path<TAB>(binary)`.
|
|
326
351
|
|
|
327
352
|
---
|