@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: { "create-plan": createPlan }
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: { "list-plans": listPlans }
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: { "modify-plan": modifyPlan }
12506
+ tool: { modify_plan: modifyPlan }
12507
12507
  };
12508
12508
  };
12509
- // src/tools/remove-file.ts
12509
+ // src/tools/remove.ts
12510
12510
  import { unlink } from "fs/promises";
12511
12511
  import path4 from "path";
12512
- var removeFile = tool({
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-file",
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 RemoveFilePlugin = async () => {
12538
+ var RemovePlugin = async () => {
12539
12539
  return {
12540
- tool: { "remove-file": removeFile }
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
- RemoveFilePlugin,
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.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": ["dist", "src"],
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 { 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
  };