@bountyagents/bountyagents-task 2026.3.117 → 2026.3.118

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.
Files changed (2) hide show
  1. package/dist/index.js +33 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -55894,6 +55894,16 @@ function registerWorkerTools(api3) {
55894
55894
 
55895
55895
  // index.ts
55896
55896
  import * as fs2 from "fs";
55897
+ import * as readline from "readline";
55898
+ function question(prompt) {
55899
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
55900
+ return new Promise((resolve) => {
55901
+ rl.question(prompt, (answer) => {
55902
+ rl.close();
55903
+ resolve(answer.trim());
55904
+ });
55905
+ });
55906
+ }
55897
55907
  function register(api3) {
55898
55908
  api3.registerCommand({
55899
55909
  name: "mycustomcommand",
@@ -55906,7 +55916,7 @@ function register(api3) {
55906
55916
  }
55907
55917
  });
55908
55918
  api3.registerCli(({ program }) => {
55909
- program.command("upclaw").description("UpClaw Bounty Agents CLI").argument("[action]", "action: status, init, reset, etc.", "status").option("-v, --verbose", "verbose output").action((action, options) => {
55919
+ program.command("upclaw").description("UpClaw Bounty Agents CLI").argument("[action]", "action: status, init, reset, etc.", "status").option("-v, --verbose", "verbose output").action(async (action, options) => {
55910
55920
  if (options.verbose)
55911
55921
  console.log("Verbose mode");
55912
55922
  if (action === "status") {
@@ -55921,15 +55931,34 @@ function register(api3) {
55921
55931
  }
55922
55932
  if (action === "init") {
55923
55933
  try {
55924
- if (!fs2.existsSync(KEY_PATH)) {
55934
+ if (fs2.existsSync(KEY_PATH)) {
55935
+ console.log(`EVM private key already exists at ${KEY_PATH}. Run 'openclaw upclaw reset' first to use a different key.`);
55936
+ return;
55937
+ }
55938
+ console.log("");
55939
+ console.log(" 1) Generate a new random private key");
55940
+ console.log(" 2) Enter an existing private key to store");
55941
+ console.log("");
55942
+ const choice = await question("Choose 1 or 2: ");
55943
+ if (choice === "1") {
55925
55944
  const pk = generatePrivateKey();
55926
55945
  fs2.writeFileSync(KEY_PATH, pk, "utf-8");
55946
+ const address = privateKeyToAccount(pk).address;
55927
55947
  console.log(`Initialized new EVM private key and saved to ${KEY_PATH}`);
55948
+ console.log("Wallet Address:", address);
55928
55949
  return;
55929
- } else {
55930
- console.log(`EVM private key already exists at ${KEY_PATH}, if you want to use a different key, run 'openclaw upclaw reset' first to initialize a new key`);
55950
+ }
55951
+ if (choice === "2") {
55952
+ const raw = await question("Enter private key (hex, with or without 0x): ");
55953
+ const key = raw.startsWith("0x") ? raw : `0x${raw}`;
55954
+ privateKeyToAccount(key);
55955
+ fs2.writeFileSync(KEY_PATH, key, "utf-8");
55956
+ const address = privateKeyToAccount(key).address;
55957
+ console.log(`Stored existing private key at ${KEY_PATH}`);
55958
+ console.log("Wallet Address:", address);
55931
55959
  return;
55932
55960
  }
55961
+ console.error("Invalid choice. Enter 1 or 2.");
55933
55962
  } catch (error48) {
55934
55963
  console.error("Failed to initialize key:", error48.message);
55935
55964
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bountyagents/bountyagents-task",
3
- "version": "2026.3.117",
3
+ "version": "2026.3.118",
4
4
  "description": "BountyAgents Task Plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",