@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/package.json CHANGED
@@ -1,20 +1,26 @@
1
1
  {
2
2
  "name": "@helloleo/plugins",
3
- "version": "0.1.0",
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
- ".": "./src/index.ts"
9
+ ".": "./dist/index.js"
9
10
  },
10
- "files": ["src"],
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 { RemoveFilePlugin } from "./tools/remove-file.ts";
4
+ export { RemovePlugin } from "./tools/remove.ts";
5
5
  export { ScaffoldPlugin } from "./tools/scaffold.ts";
@@ -56,6 +56,6 @@ export const createPlan = tool({
56
56
 
57
57
  export const CreatePlanPlugin: Plugin = async () => {
58
58
  return {
59
- tool: { "create-plan": createPlan },
59
+ tool: { create_plan: createPlan },
60
60
  };
61
61
  };
@@ -80,6 +80,6 @@ export const listPlans = tool({
80
80
 
81
81
  export const ListPlansPlugin: Plugin = async () => {
82
82
  return {
83
- tool: { "list-plans": listPlans },
83
+ tool: { list_plans: listPlans },
84
84
  };
85
85
  };
@@ -74,6 +74,6 @@ export const modifyPlan = tool({
74
74
 
75
75
  export const ModifyPlanPlugin: Plugin = async () => {
76
76
  return {
77
- tool: { "modify-plan": modifyPlan },
77
+ tool: { modify_plan: modifyPlan },
78
78
  };
79
79
  };
@@ -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 removeFile = tool({
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-file",
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 RemoveFilePlugin: Plugin = async () => {
49
+ export const RemovePlugin: Plugin = async () => {
50
50
  return {
51
- tool: { "remove-file": removeFile },
51
+ tool: { remove: remove },
52
52
  };
53
53
  };