opencode-fs-plugin 3.0.0 → 3.0.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 +3 -1
- package/SPEC.md +3 -1
- package/package.json +1 -1
- package/src/tools/pipe.ts +1 -0
package/README.md
CHANGED
|
@@ -89,7 +89,9 @@ Prefer the canonical names.
|
|
|
89
89
|
## Pipe
|
|
90
90
|
|
|
91
91
|
`fs.pipe` joins registered tools through byte buffers. Stages run in order;
|
|
92
|
-
only pipeable tools can be used.
|
|
92
|
+
only pipeable tools can be used. Each stage asserts its own `fs_<tool>` action
|
|
93
|
+
before it runs, so a disabled stage cannot be hidden inside a pipe. `output` and
|
|
94
|
+
`append` behave like a final
|
|
93
95
|
`tee`.
|
|
94
96
|
|
|
95
97
|
```js
|
package/SPEC.md
CHANGED
|
@@ -169,7 +169,9 @@ These are not implemented:
|
|
|
169
169
|
- `sort -k` accepts field/character ranges with modifiers `bdfghiMnrV`.
|
|
170
170
|
- `tar`/`zip` extraction rejects path traversal and escaping links.
|
|
171
171
|
- `pipe` passes raw bytes and only accepts registered pipeable stages; `tar` and
|
|
172
|
-
`zip` are sink stages.
|
|
172
|
+
`zip` are sink stages. Each stage asserts its own `fs_<tool>` action before it
|
|
173
|
+
runs, so per-tool denial also applies inside a pipe. It is sequential and not a
|
|
174
|
+
batch primitive: independent
|
|
173
175
|
calls fan out with `Promise.all` in `execute`.
|
|
174
176
|
|
|
175
177
|
## Coverage policy
|
package/package.json
CHANGED
package/src/tools/pipe.ts
CHANGED
|
@@ -91,6 +91,7 @@ export const pipeTool: ToolSpec<Input> = {
|
|
|
91
91
|
}
|
|
92
92
|
const parsed = parseSchema(tool.schema, stage.args ?? {}, `${stage.tool} arguments`);
|
|
93
93
|
const gate = ctx.permissionFor(`fs_${tool.name}`);
|
|
94
|
+
await gate.assertTrusted([]);
|
|
94
95
|
const result = await tool.run(
|
|
95
96
|
{ ...ctx, permission: gate },
|
|
96
97
|
parsed,
|