@helloleo/plugins 0.1.0 → 0.1.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/dist/index.js +12804 -0
- package/package.json +10 -4
- package/src/index.ts +1 -1
- package/src/tools/create-plan.ts +1 -1
- package/src/tools/list-plans.ts +1 -1
- package/src/tools/modify-plan.ts +1 -1
- package/src/tools/{remove-file.ts → remove.ts} +4 -4
package/package.json
CHANGED
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helloleo/plugins",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "OpenCode plugins for HelloLeo",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
7
8
|
"exports": {
|
|
8
|
-
".": "./
|
|
9
|
+
".": "./dist/index.js"
|
|
9
10
|
},
|
|
10
|
-
"files": [
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
11
15
|
"publishConfig": {
|
|
12
16
|
"access": "public"
|
|
13
17
|
},
|
|
14
18
|
"scripts": {
|
|
19
|
+
"build": "bun build src/index.ts --outdir dist --target bun --format esm",
|
|
15
20
|
"format": "bunx --bun @biomejs/biome format --write src",
|
|
16
21
|
"lint": "bunx --bun @biomejs/biome lint --write src",
|
|
17
|
-
"check": "bunx --bun @biomejs/biome check --write src"
|
|
22
|
+
"check": "bunx --bun @biomejs/biome check --write src",
|
|
23
|
+
"prepublishOnly": "bun run check && bun run build"
|
|
18
24
|
},
|
|
19
25
|
"dependencies": {
|
|
20
26
|
"@opencode-ai/plugin": "1.2.27"
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CreatePlanPlugin } from "./tools/create-plan.ts";
|
|
2
2
|
export { ListPlansPlugin } from "./tools/list-plans.ts";
|
|
3
3
|
export { ModifyPlanPlugin } from "./tools/modify-plan.ts";
|
|
4
|
-
export {
|
|
4
|
+
export { RemovePlugin } from "./tools/remove.ts";
|
|
5
5
|
export { ScaffoldPlugin } from "./tools/scaffold.ts";
|
package/src/tools/create-plan.ts
CHANGED
package/src/tools/list-plans.ts
CHANGED
package/src/tools/modify-plan.ts
CHANGED
|
@@ -3,7 +3,7 @@ import path from "node:path";
|
|
|
3
3
|
import type { Plugin } from "@opencode-ai/plugin";
|
|
4
4
|
import { tool } from "@opencode-ai/plugin";
|
|
5
5
|
|
|
6
|
-
export const
|
|
6
|
+
export const remove = tool({
|
|
7
7
|
description:
|
|
8
8
|
"Remove a file from the project. The file path must be relative to the project root. " +
|
|
9
9
|
"This tool will ask for permission before deleting. " +
|
|
@@ -34,7 +34,7 @@ export const removeFile = tool({
|
|
|
34
34
|
const relative = path.relative(context.directory, resolved);
|
|
35
35
|
|
|
36
36
|
await context.ask({
|
|
37
|
-
permission: "remove
|
|
37
|
+
permission: "remove",
|
|
38
38
|
patterns: [resolved],
|
|
39
39
|
always: [resolved],
|
|
40
40
|
metadata: { filePath: relative },
|
|
@@ -46,8 +46,8 @@ export const removeFile = tool({
|
|
|
46
46
|
},
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
export const
|
|
49
|
+
export const RemovePlugin: Plugin = async () => {
|
|
50
50
|
return {
|
|
51
|
-
tool: {
|
|
51
|
+
tool: { remove: remove },
|
|
52
52
|
};
|
|
53
53
|
};
|