opencode-fs-plugin 1.4.1 → 1.4.3
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/INSTALL.md +9 -9
- package/README.md +12 -8
- package/package.json +1 -1
- package/src/tools/grep.ts +1 -1
- package/src/tools/gzip.ts +2 -2
- package/src/tools/ls.ts +2 -2
- package/src/tools/stat.ts +1 -2
- package/src/tools/touch.ts +1 -1
package/INSTALL.md
CHANGED
|
@@ -17,14 +17,14 @@ Add the registry package to the plugin list:
|
|
|
17
17
|
|
|
18
18
|
```jsonc
|
|
19
19
|
{
|
|
20
|
-
"plugins": ["opencode-fs-plugin@1.4.
|
|
20
|
+
"plugins": ["opencode-fs-plugin@1.4.3"]
|
|
21
21
|
}
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Or let the CLI install and configure it:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
opencode plugin add opencode-fs-plugin@1.4.
|
|
27
|
+
opencode plugin add opencode-fs-plugin@1.4.3
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
A bare `opencode-fs-plugin` follows `latest`. OpenCode installs it into its
|
|
@@ -36,7 +36,7 @@ Option A if you also want the skill.
|
|
|
36
36
|
Download the release artifact and install it as a normal npm package:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
VERSION=1.4.
|
|
39
|
+
VERSION=1.4.3
|
|
40
40
|
curl -L -o "opencode-fs-plugin-${VERSION}.tgz" \
|
|
41
41
|
"https://github.com/masterjg/opencode-fs-plugin/releases/download/v${VERSION}/opencode-fs-plugin-${VERSION}.tgz"
|
|
42
42
|
npm install "./opencode-fs-plugin-${VERSION}.tgz"
|
|
@@ -64,20 +64,20 @@ OpenCode installs it from Git:
|
|
|
64
64
|
|
|
65
65
|
```jsonc
|
|
66
66
|
{
|
|
67
|
-
"plugins": ["github:masterjg/opencode-fs-plugin#v1.4.
|
|
67
|
+
"plugins": ["github:masterjg/opencode-fs-plugin#v1.4.3"]
|
|
68
68
|
}
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
`opencode plugin add 'github:masterjg/opencode-fs-plugin#v1.4.
|
|
71
|
+
`opencode plugin add 'github:masterjg/opencode-fs-plugin#v1.4.3'` installs the
|
|
72
72
|
same spec and writes the entry for you. The equivalent full URL is
|
|
73
|
-
`git+https://github.com/masterjg/opencode-fs-plugin.git#v1.4.
|
|
73
|
+
`git+https://github.com/masterjg/opencode-fs-plugin.git#v1.4.3`. A tag is
|
|
74
74
|
checked for updates; use a full commit hash to pin it.
|
|
75
75
|
|
|
76
76
|
Git plugins are installed under OpenCode's cache, so their package path is not
|
|
77
77
|
stable. For a stable skill path, install the tag with npm instead:
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
-
npm install "github:masterjg/opencode-fs-plugin#v1.4.
|
|
80
|
+
npm install "github:masterjg/opencode-fs-plugin#v1.4.3"
|
|
81
81
|
```
|
|
82
82
|
|
|
83
83
|
Then configure `./node_modules/opencode-fs-plugin` in `plugins` as in the
|
|
@@ -174,9 +174,9 @@ and description until the model loads it.
|
|
|
174
174
|
To let a coding agent install the plugin, use:
|
|
175
175
|
|
|
176
176
|
```text
|
|
177
|
-
Install opencode-fs-plugin 1.4.
|
|
177
|
+
Install opencode-fs-plugin 1.4.3 with "npm install opencode-fs-plugin@1.4.3",
|
|
178
178
|
or from its release tarball or the Git tag
|
|
179
|
-
"github:masterjg/opencode-fs-plugin#v1.4.
|
|
179
|
+
"github:masterjg/opencode-fs-plugin#v1.4.3". Add
|
|
180
180
|
"./node_modules/opencode-fs-plugin" to the plugins array in opencode.jsonc, add
|
|
181
181
|
"./node_modules/opencode-fs-plugin/skills" to the skills array, then verify that
|
|
182
182
|
the filesystem skill loads with the skill tool using id "filesystem".
|
package/README.md
CHANGED
|
@@ -166,18 +166,18 @@ Add the registry package directly to the plugin list:
|
|
|
166
166
|
|
|
167
167
|
```jsonc
|
|
168
168
|
{
|
|
169
|
-
"plugins": ["opencode-fs-plugin@1.4.
|
|
169
|
+
"plugins": ["opencode-fs-plugin@1.4.3"]
|
|
170
170
|
}
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
`opencode plugin add opencode-fs-plugin@1.4.
|
|
173
|
+
`opencode plugin add opencode-fs-plugin@1.4.3` installs it and writes the config
|
|
174
174
|
entry. A bare `opencode-fs-plugin` follows the `latest` tag.
|
|
175
175
|
|
|
176
176
|
OpenCode manages the package under its cache, so the path is not stable. If you
|
|
177
177
|
also want the packaged skill, install it into a project instead:
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
npm install opencode-fs-plugin@1.4.
|
|
180
|
+
npm install opencode-fs-plugin@1.4.3
|
|
181
181
|
```
|
|
182
182
|
|
|
183
183
|
```jsonc
|
|
@@ -192,7 +192,7 @@ npm install opencode-fs-plugin@1.4.1
|
|
|
192
192
|
Download the release tarball, then install it as a normal npm package:
|
|
193
193
|
|
|
194
194
|
```bash
|
|
195
|
-
VERSION=1.4.
|
|
195
|
+
VERSION=1.4.3
|
|
196
196
|
curl -L -o "opencode-fs-plugin-${VERSION}.tgz" \
|
|
197
197
|
"https://github.com/masterjg/opencode-fs-plugin/releases/download/v${VERSION}/opencode-fs-plugin-${VERSION}.tgz"
|
|
198
198
|
npm install "./opencode-fs-plugin-${VERSION}.tgz"
|
|
@@ -221,20 +221,20 @@ OpenCode installs it from Git:
|
|
|
221
221
|
|
|
222
222
|
```jsonc
|
|
223
223
|
{
|
|
224
|
-
"plugins": ["github:masterjg/opencode-fs-plugin#v1.4.
|
|
224
|
+
"plugins": ["github:masterjg/opencode-fs-plugin#v1.4.3"]
|
|
225
225
|
}
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
`opencode plugin add 'github:masterjg/opencode-fs-plugin#v1.4.
|
|
228
|
+
`opencode plugin add 'github:masterjg/opencode-fs-plugin#v1.4.3'` installs the
|
|
229
229
|
same spec and writes the config entry. The equivalent full URL is
|
|
230
|
-
`git+https://github.com/masterjg/opencode-fs-plugin.git#v1.4.
|
|
230
|
+
`git+https://github.com/masterjg/opencode-fs-plugin.git#v1.4.3`. A tag is
|
|
231
231
|
checked for updates; use a full commit hash to pin it.
|
|
232
232
|
|
|
233
233
|
Git plugins are installed under OpenCode's cache, so their package path is not
|
|
234
234
|
stable. If you also want the packaged skill, install with npm instead:
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
npm install "github:masterjg/opencode-fs-plugin#v1.4.
|
|
237
|
+
npm install "github:masterjg/opencode-fs-plugin#v1.4.3"
|
|
238
238
|
```
|
|
239
239
|
|
|
240
240
|
Then use `./node_modules/opencode-fs-plugin` in `plugins` and
|
|
@@ -349,6 +349,10 @@ when only some agents should be shell-free.
|
|
|
349
349
|
|
|
350
350
|
## Development
|
|
351
351
|
|
|
352
|
+
See [AGENTS.md](AGENTS.md) for the engineering rules: async-only I/O,
|
|
353
|
+
core-count concurrency, and where every independent operation must be
|
|
354
|
+
parallelized.
|
|
355
|
+
|
|
352
356
|
```bash
|
|
353
357
|
npm install
|
|
354
358
|
npm run typecheck
|
package/package.json
CHANGED
package/src/tools/grep.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Type, type Static } from "@sinclair/typebox";
|
|
|
9
9
|
import { FsError, fromErrno } from "../core/errors.js";
|
|
10
10
|
import { walkAll } from "../core/fsutil.js";
|
|
11
11
|
import { mapLimit } from "../core/parallel.js";
|
|
12
|
-
import { collect, inputStream
|
|
12
|
+
import { collect, inputStream } from "../core/stream.js";
|
|
13
13
|
import { textResult, type ToolSpec } from "../core/types.js";
|
|
14
14
|
|
|
15
15
|
const Schema = Type.Object(
|
package/src/tools/gzip.ts
CHANGED
|
@@ -67,7 +67,7 @@ export const gzipTool: ToolSpec<GzipInput> = {
|
|
|
67
67
|
...(input.stdout === true ? [] : [{ target: destination, boundary: destination.full }]),
|
|
68
68
|
]),
|
|
69
69
|
);
|
|
70
|
-
const results = await mapLimit(targets, ctx.concurrency, async ({
|
|
70
|
+
const results = await mapLimit(targets, ctx.concurrency, async ({ source, destination }) => {
|
|
71
71
|
/* v8 ignore next */
|
|
72
72
|
const data = await fs.readFile(source.full).catch((error) => {
|
|
73
73
|
throw fromErrno(error);
|
|
@@ -123,7 +123,7 @@ export const gunzipTool: ToolSpec<GunzipInput> = {
|
|
|
123
123
|
...(input.stdout === true ? [] : [{ target: destination, boundary: destination.full }]),
|
|
124
124
|
]),
|
|
125
125
|
);
|
|
126
|
-
const results = await mapLimit(targets, ctx.concurrency, async ({
|
|
126
|
+
const results = await mapLimit(targets, ctx.concurrency, async ({ source, destination }) => {
|
|
127
127
|
/* v8 ignore next */
|
|
128
128
|
const data = await fs.readFile(source.full).catch((error) => {
|
|
129
129
|
throw fromErrno(error);
|
package/src/tools/ls.ts
CHANGED
|
@@ -7,8 +7,8 @@ import * as fs from "node:fs/promises";
|
|
|
7
7
|
import * as path from "node:path";
|
|
8
8
|
import picomatch from "picomatch";
|
|
9
9
|
import { Type, type Static } from "@sinclair/typebox";
|
|
10
|
-
import {
|
|
11
|
-
import { formatDate, lookupGroup, lookupUser, modeString, num
|
|
10
|
+
import { fromErrno } from "../core/errors.js";
|
|
11
|
+
import { formatDate, lookupGroup, lookupUser, modeString, num } from "../core/fsutil.js";
|
|
12
12
|
import { humanSize } from "../core/format.js";
|
|
13
13
|
import { mapLimit } from "../core/parallel.js";
|
|
14
14
|
import { textResult, type ToolSpec } from "../core/types.js";
|
package/src/tools/stat.ts
CHANGED
|
@@ -51,7 +51,7 @@ export const statTool: ToolSpec<Input> = {
|
|
|
51
51
|
input.format === undefined
|
|
52
52
|
? input.terse === true
|
|
53
53
|
? await terseFormat(requested, stats)
|
|
54
|
-
: await defaultFormat(requested,
|
|
54
|
+
: await defaultFormat(requested, stats, link)
|
|
55
55
|
: await customFormat(input.format, requested, target.full, stats, link),
|
|
56
56
|
);
|
|
57
57
|
}
|
|
@@ -61,7 +61,6 @@ export const statTool: ToolSpec<Input> = {
|
|
|
61
61
|
|
|
62
62
|
async function defaultFormat(
|
|
63
63
|
requested: string,
|
|
64
|
-
full: string,
|
|
65
64
|
stats: Awaited<ReturnType<typeof fs.lstat>>,
|
|
66
65
|
link: string | undefined,
|
|
67
66
|
): Promise<string> {
|
package/src/tools/touch.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import * as fs from "node:fs/promises";
|
|
7
7
|
import { Type, type Static } from "@sinclair/typebox";
|
|
8
|
-
import { FsError, fromErrno
|
|
8
|
+
import { FsError, fromErrno } from "../core/errors.js";
|
|
9
9
|
import { textResult, type ToolSpec } from "../core/types.js";
|
|
10
10
|
|
|
11
11
|
const Schema = Type.Object(
|