opencode-fs-plugin 1.5.1 → 1.5.2
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 +1 -1
- package/skills/filesystem/SKILL.md +18 -0
package/package.json
CHANGED
|
@@ -94,6 +94,19 @@ the tool run with defaults (often `.`), not fail.
|
|
|
94
94
|
| `url` + optional `output` | `fs.http_request` |
|
|
95
95
|
| `stages` + optional `input`/`output` | `fs.pipe` |
|
|
96
96
|
|
|
97
|
+
### Common mistakes
|
|
98
|
+
|
|
99
|
+
- `fs.hash` takes `files`, not `paths`; with neither files nor stdin it fails.
|
|
100
|
+
- `fs.mkdir` takes `path`; every other path tool takes `paths`.
|
|
101
|
+
- `fs.sed` takes `expressions` (plural) and only `s/.../.../flags`; line ranges
|
|
102
|
+
need `head`/`tail` or `pipe`.
|
|
103
|
+
- `fs.grep` takes `maxCount`, not `limit`; add `recursive: true` for a directory.
|
|
104
|
+
- `fs.cat` and text filters read `paths`; Code Mode has no stdin, so `fs.cat({})`
|
|
105
|
+
fails. Use `fs.pipe` for stdin.
|
|
106
|
+
- There is no `fs.write`; use the built-in `write` or `fs.tee({ paths, content })`.
|
|
107
|
+
- `fs.mktemp` needs a template ending in at least three `X`; use `suffix` for an
|
|
108
|
+
extension.
|
|
109
|
+
|
|
97
110
|
## Pipe
|
|
98
111
|
|
|
99
112
|
Stages run sequentially and pass bytes. Only pipeable tools are allowed. The
|
|
@@ -313,6 +326,11 @@ await tools.fs.http_request({
|
|
|
313
326
|
|
|
314
327
|
- Paths resolve against the project directory. Paths outside it require
|
|
315
328
|
`external_directory` approval, except tool-owned temp/trash paths.
|
|
329
|
+
- The global config allows `/tmp/opencode/**` and the OpenCode cache, state, and
|
|
330
|
+
config trees (`$HOME/.cache/opencode/**`, `$HOME/.local/share/opencode/**`,
|
|
331
|
+
`$HOME/.local/state/opencode/**`, `$HOME/.config/opencode/**`). Prefer
|
|
332
|
+
`fs.mktemp` for scratch files; a denied path is a blocker, not a reason to
|
|
333
|
+
switch to shell.
|
|
316
334
|
- Symlinks are handled per command: `rm`/`mv` never follow the final link, `cp`
|
|
317
335
|
follows unless `archive`/`dereference: false`, and `stat`/`ls` use lstat
|
|
318
336
|
unless asked to follow.
|