@muvon/octofs 0.20.5 → 0.22.0
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 +35 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -130,10 +130,35 @@ cargo build --release
|
|
|
130
130
|
|
|
131
131
|
## Quick Start
|
|
132
132
|
|
|
133
|
+
### Pair with Octocode
|
|
134
|
+
|
|
135
|
+
The shared-ID workflow requires the next Octocode release or a build of the updated source. OctoFS’s existing line-ID format is unchanged.
|
|
136
|
+
|
|
137
|
+
Use [Octocode](https://github.com/muvon/octocode) to find definitions, usages, and code relationships, then use OctoFS to read or edit the matching files. Octocode's MCP `structural_search` emits the same `N:hh|content` source line IDs that OctoFS accepts for `batch_edit`, using their shared Octolib utility. You do not need another `view` just to obtain IDs for lines already returned.
|
|
138
|
+
|
|
139
|
+
Run both servers against the same checkout. IDs describe that source snapshot: changed targets are verified at edit time, and an error supplies current context rather than guessing where to write. Exact-name lookups return complete small definitions; previews of larger matches name the ranges you can read with OctoFS.
|
|
140
|
+
|
|
133
141
|
### 1. Configure Your AI Assistant
|
|
134
142
|
|
|
135
143
|
The CLI uses a `mcp` subcommand — your config must pass `["mcp"]` as args.
|
|
136
144
|
|
|
145
|
+
**Claude Code (CLI):**
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
claude mcp add octofs -- octofs mcp --path /path/to/your/project
|
|
149
|
+
claude mcp add octocode -- octocode mcp --path /path/to/your/project
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Codex CLI:**
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
codex mcp add octofs -- octofs mcp --path /path/to/your/project
|
|
156
|
+
codex mcp add octocode -- octocode mcp --path /path/to/your/project
|
|
157
|
+
codex mcp list
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The Octocode registration is optional. Install the servers you use and replace the paths with the same absolute checkout path. See the [official Codex MCP documentation](https://developers.openai.com/codex/mcp).
|
|
161
|
+
|
|
137
162
|
**Cursor** (`~/.cursor/mcp.json`):
|
|
138
163
|
```json
|
|
139
164
|
{
|
|
@@ -223,7 +248,7 @@ Ask your AI assistant to:
|
|
|
223
248
|
### Line Identifiers
|
|
224
249
|
|
|
225
250
|
Every line is addressed by a composite id `N:hh` — its 1-indexed position plus a
|
|
226
|
-
2-character hex hash (FNV-1a) of its content. `view` renders lines as `N:hh|content`:
|
|
251
|
+
2-character hex hash (FNV-1a) of its content. Octocode structural-search source output uses the same shared utility and IDs. `view` renders lines as `N:hh|content`:
|
|
227
252
|
|
|
228
253
|
```
|
|
229
254
|
1:a3|fn main() {
|
|
@@ -345,6 +370,10 @@ Do not re-read overlapping ranges or repeatedly narrow a range just to pick edit
|
|
|
345
370
|
Re-read when the file may have changed, output was truncated, or prior context is unavailable.
|
|
346
371
|
Empty files return `[empty file, 0 lines]` on an initial or forced full read.
|
|
347
372
|
|
|
373
|
+
**Images:** a path with a `png`, `jpg`/`jpeg`, `gif` or `webp` extension returns the
|
|
374
|
+
image itself as an MCP image block (up to 5 MB; the bytes must match the extension).
|
|
375
|
+
`start`/`end` and `content` do not apply to it.
|
|
376
|
+
|
|
348
377
|
**Delta views:** a whole-file view of a file the session already served returns
|
|
349
378
|
only the hunks changed since — the same `...`/`-`/`+` style as edit results, with
|
|
350
379
|
removed lines collapsed to their old id range — or
|
|
@@ -497,10 +526,11 @@ can retarget without a re-view. The result is a diff with fresh ids.
|
|
|
497
526
|
}
|
|
498
527
|
```
|
|
499
528
|
|
|
500
|
-
`from_end` is optional (omit to copy a single line). `from_start
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
529
|
+
`from_end` is optional (omit to copy a single line). `from_start` and `from_end`
|
|
530
|
+
each accept a line number or a line id (`"12:a3"`, verified against the file).
|
|
531
|
+
`append_line` positions the copy in the target: a line id to insert after
|
|
532
|
+
(verified against the target), `0` = beginning, or `-1` = end. Like every edit
|
|
533
|
+
target it takes no other plain line number.
|
|
504
534
|
|
|
505
535
|
---
|
|
506
536
|
|