@helloleo/plugins 0.1.1 → 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
CHANGED
|
@@ -12382,7 +12382,7 @@ ${body}`;
|
|
|
12382
12382
|
});
|
|
12383
12383
|
var CreatePlanPlugin = async () => {
|
|
12384
12384
|
return {
|
|
12385
|
-
tool: {
|
|
12385
|
+
tool: { create_plan: createPlan }
|
|
12386
12386
|
};
|
|
12387
12387
|
};
|
|
12388
12388
|
// src/tools/list-plans.ts
|
|
@@ -12441,7 +12441,7 @@ var listPlans = tool({
|
|
|
12441
12441
|
});
|
|
12442
12442
|
var ListPlansPlugin = async () => {
|
|
12443
12443
|
return {
|
|
12444
|
-
tool: {
|
|
12444
|
+
tool: { list_plans: listPlans }
|
|
12445
12445
|
};
|
|
12446
12446
|
};
|
|
12447
12447
|
// src/tools/modify-plan.ts
|
|
@@ -12503,13 +12503,13 @@ ${output}`;
|
|
|
12503
12503
|
});
|
|
12504
12504
|
var ModifyPlanPlugin = async () => {
|
|
12505
12505
|
return {
|
|
12506
|
-
tool: {
|
|
12506
|
+
tool: { modify_plan: modifyPlan }
|
|
12507
12507
|
};
|
|
12508
12508
|
};
|
|
12509
|
-
// src/tools/remove
|
|
12509
|
+
// src/tools/remove.ts
|
|
12510
12510
|
import { unlink } from "fs/promises";
|
|
12511
12511
|
import path4 from "path";
|
|
12512
|
-
var
|
|
12512
|
+
var remove = tool({
|
|
12513
12513
|
description: "Remove a file from the project. The file path must be relative to the project root. " + "This tool will ask for permission before deleting. " + "Cannot delete files outside the project boundary.",
|
|
12514
12514
|
args: {
|
|
12515
12515
|
filePath: tool.schema.string().describe("Relative path to the file to remove (e.g. src/App.tsx)")
|
|
@@ -12526,7 +12526,7 @@ var removeFile = tool({
|
|
|
12526
12526
|
}
|
|
12527
12527
|
const relative = path4.relative(context.directory, resolved);
|
|
12528
12528
|
await context.ask({
|
|
12529
|
-
permission: "remove
|
|
12529
|
+
permission: "remove",
|
|
12530
12530
|
patterns: [resolved],
|
|
12531
12531
|
always: [resolved],
|
|
12532
12532
|
metadata: { filePath: relative }
|
|
@@ -12535,9 +12535,9 @@ var removeFile = tool({
|
|
|
12535
12535
|
return `Removed ${relative}`;
|
|
12536
12536
|
}
|
|
12537
12537
|
});
|
|
12538
|
-
var
|
|
12538
|
+
var RemovePlugin = async () => {
|
|
12539
12539
|
return {
|
|
12540
|
-
tool: {
|
|
12540
|
+
tool: { remove }
|
|
12541
12541
|
};
|
|
12542
12542
|
};
|
|
12543
12543
|
// src/tools/scaffold.ts
|
|
@@ -12797,7 +12797,7 @@ var ScaffoldPlugin = async () => {
|
|
|
12797
12797
|
};
|
|
12798
12798
|
export {
|
|
12799
12799
|
ScaffoldPlugin,
|
|
12800
|
-
|
|
12800
|
+
RemovePlugin,
|
|
12801
12801
|
ModifyPlanPlugin,
|
|
12802
12802
|
ListPlansPlugin,
|
|
12803
12803
|
CreatePlanPlugin
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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",
|
|
@@ -8,16 +8,19 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": "./dist/index.js"
|
|
10
10
|
},
|
|
11
|
-
"files": [
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"src"
|
|
14
|
+
],
|
|
12
15
|
"publishConfig": {
|
|
13
16
|
"access": "public"
|
|
14
17
|
},
|
|
15
18
|
"scripts": {
|
|
16
19
|
"build": "bun build src/index.ts --outdir dist --target bun --format esm",
|
|
17
|
-
"prepublishOnly": "bun run build",
|
|
18
20
|
"format": "bunx --bun @biomejs/biome format --write src",
|
|
19
21
|
"lint": "bunx --bun @biomejs/biome lint --write src",
|
|
20
|
-
"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"
|
|
21
24
|
},
|
|
22
25
|
"dependencies": {
|
|
23
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
|
};
|