@bountyagents/bountyagents-task 2026.2.26 → 2026.2.262

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 ADDED
@@ -0,0 +1,26 @@
1
+ # bountyagents-task
2
+
3
+ ## Tutorial
4
+
5
+ To install and use this plugin, follow these steps:
6
+
7
+ 1. **Install the plugin:**
8
+ ```bash
9
+ openclaw plugins install @bountyagents/bountyagents-task
10
+ ```
11
+
12
+ 2. **Enable the plugin:**
13
+ ```bash
14
+ openclaw plugins enable bountyagents-task
15
+ ```
16
+
17
+ 3. **Restart the gateway:**
18
+ ```bash
19
+ openclaw gateway restart
20
+ ```
21
+
22
+ 4. **Create a task:**
23
+ You can now run the following command in your terminal:
24
+ ```bash
25
+ openclaw createtask
26
+ ```
package/dist/index.js CHANGED
@@ -42368,27 +42368,52 @@ class PrivateKeySigner {
42368
42368
 
42369
42369
  // index.ts
42370
42370
  import crypto2 from "node:crypto";
42371
- function plugin_default(api2) {
42372
- api2.registerCli(({ program }) => {
42373
- program.command("createtask").action(async () => {
42374
- const signer = new PrivateKeySigner("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80");
42375
- const plugin = new BountyAgentsPublisherPlugin(signer, {
42376
- serviceUrl: "http://localhost:3000",
42377
- contractAddress: "0x55D45aFA265d0381C8A81328FfeA408D2Dd45F40"
42378
- });
42379
- try {
42380
- const task = await plugin.executeTool("bountyagents.publisher.task.create", {
42381
- id: crypto2.randomUUID(),
42382
- title: "Test Task from CLI",
42383
- content: "This is a test task created via the CLI tool."
42371
+ function register(api2) {
42372
+ api2.registerCommand({
42373
+ name: "task",
42374
+ description: "Bounty Agents Task commands",
42375
+ acceptsArgs: true,
42376
+ handler: async (ctx) => {
42377
+ const args = ctx.args?.trim() ?? "";
42378
+ const tokens = args.split(/\s+/).filter(Boolean);
42379
+ const action = (tokens[0] ?? "status").toLowerCase();
42380
+ if (action === "create") {
42381
+ const signer = new PrivateKeySigner("0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80");
42382
+ const plugin = new BountyAgentsPublisherPlugin(signer, {
42383
+ serviceUrl: "http://localhost:3000",
42384
+ contractAddress: "0x55D45aFA265d0381C8A81328FfeA408D2Dd45F40"
42384
42385
  });
42385
- console.log("Task created successfully:", task);
42386
- } catch (error) {
42387
- console.error("Failed to create task:", error);
42386
+ try {
42387
+ const task = await plugin.executeTool("bountyagents.publisher.task.create", {
42388
+ id: crypto2.randomUUID(),
42389
+ title: "Test Task from CLI",
42390
+ content: "This is a test task created via the CLI tool."
42391
+ });
42392
+ console.log("Task created successfully:", task);
42393
+ return {
42394
+ text: `Task created successfully: ${task.id}`
42395
+ };
42396
+ } catch (error) {
42397
+ console.error("Failed to create task:", error);
42398
+ return {
42399
+ text: "Failed to create task:",
42400
+ error
42401
+ };
42402
+ }
42388
42403
  }
42389
- });
42390
- }, { commands: ["createtask"] });
42404
+ return {
42405
+ text: [
42406
+ "Voice commands:",
42407
+ "",
42408
+ "/voice status",
42409
+ "/voice list [limit]",
42410
+ "/voice set <voiceId|name>"
42411
+ ].join(`
42412
+ `)
42413
+ };
42414
+ }
42415
+ });
42391
42416
  }
42392
42417
  export {
42393
- plugin_default as default
42418
+ register as default
42394
42419
  };
package/index.ts CHANGED
@@ -2,10 +2,17 @@ import { BountyAgentsPublisherPlugin } from "./src/index.js";
2
2
  import { PrivateKeySigner } from "./src/signers.js";
3
3
  import crypto from "node:crypto";
4
4
 
5
- export default function (api: any) {
6
- api.registerCli(
7
- ({ program }: { program: any }) => {
8
- program.command("createtask").action(async () => {
5
+ export default function register(api: any) {
6
+ api.registerCommand({
7
+ name: "task",
8
+ description: "Bounty Agents Task commands",
9
+ acceptsArgs: true,
10
+ handler: async (ctx) => {
11
+ const args = ctx.args?.trim() ?? "";
12
+ const tokens = args.split(/\s+/).filter(Boolean);
13
+ const action = (tokens[0] ?? "status").toLowerCase();
14
+
15
+ if (action === "create") {
9
16
  const signer = new PrivateKeySigner(
10
17
  "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
11
18
  );
@@ -24,11 +31,56 @@ export default function (api: any) {
24
31
  }
25
32
  );
26
33
  console.log("Task created successfully:", task);
34
+ return {
35
+ text: `Task created successfully: ${task.id}`,
36
+ };
27
37
  } catch (error) {
28
38
  console.error("Failed to create task:", error);
39
+ return {
40
+ text: "Failed to create task:",
41
+ error: error,
42
+ };
29
43
  }
30
- });
44
+ }
45
+
46
+ return {
47
+ text: [
48
+ "Voice commands:",
49
+ "",
50
+ "/voice status",
51
+ "/voice list [limit]",
52
+ "/voice set <voiceId|name>",
53
+ ].join("\n"),
54
+ };
31
55
  },
32
- { commands: ["createtask"] }
33
- );
56
+ });
57
+
58
+ // api.registerCli(
59
+ // ({ program }: { program: any }) => {
60
+ // program.command("createtask").action(async () => {
61
+ // const signer = new PrivateKeySigner(
62
+ // "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
63
+ // );
64
+ // const plugin = new BountyAgentsPublisherPlugin(signer, {
65
+ // serviceUrl: "http://localhost:3000",
66
+ // contractAddress: "0x55D45aFA265d0381C8A81328FfeA408D2Dd45F40",
67
+ // });
68
+
69
+ // try {
70
+ // const task = await plugin.executeTool(
71
+ // "bountyagents.publisher.task.create",
72
+ // {
73
+ // id: crypto.randomUUID(),
74
+ // title: "Test Task from CLI",
75
+ // content: "This is a test task created via the CLI tool.",
76
+ // }
77
+ // );
78
+ // console.log("Task created successfully:", task);
79
+ // } catch (error) {
80
+ // console.error("Failed to create task:", error);
81
+ // }
82
+ // });
83
+ // },
84
+ // { commands: ["createtask"] }
85
+ // );
34
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bountyagents/bountyagents-task",
3
- "version": "2026.2.26",
3
+ "version": "2026.2.262",
4
4
  "description": "BountyAgents Task Plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/.env.local DELETED
@@ -1 +0,0 @@
1
- NPM_TOKEN=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