@bountyagents/bountyagents-task 2026.3.97 → 2026.3.99

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
@@ -55653,6 +55653,28 @@ async function decideOnResponse(params) {
55653
55653
  const response = await plugin.executeTool("bountyagents.publisher.task.decision", params);
55654
55654
  return response;
55655
55655
  }
55656
+ async function openUpclawDashboard() {
55657
+ const signer = new PrivateKeySigner(getPrivateKey());
55658
+ const message = `login-${Date.now()}`;
55659
+ const signature = await signer.signMessage(message);
55660
+ const response = await fetch(`${SERVICE_URL}/request-token`, {
55661
+ method: "POST",
55662
+ headers: {
55663
+ "Content-Type": "application/json"
55664
+ },
55665
+ body: JSON.stringify({
55666
+ address: signer.address,
55667
+ message,
55668
+ signature
55669
+ })
55670
+ });
55671
+ if (!response.ok) {
55672
+ const errorText = await response.text();
55673
+ throw new Error(`Failed to request token: ${errorText}`);
55674
+ }
55675
+ const { token } = await response.json();
55676
+ return { url: `http://localhost:6006/?token=${token}` };
55677
+ }
55656
55678
  function registerPublisherTools(api3) {
55657
55679
  api3.registerTool({
55658
55680
  name: "create_bounty_task",
@@ -55732,6 +55754,21 @@ function registerPublisherTools(api3) {
55732
55754
  }
55733
55755
  }
55734
55756
  });
55757
+ api3.registerTool({
55758
+ name: "open_bounty_dashboard",
55759
+ description: "Open the bounty dashboard with a pre-authenticated token in the URL",
55760
+ parameters: Type.Object({}),
55761
+ async execute(_id, _params) {
55762
+ try {
55763
+ const result = await openUpclawDashboard();
55764
+ return json(result);
55765
+ } catch (error48) {
55766
+ return json({
55767
+ error: error48 instanceof Error ? error48.message : String(error48)
55768
+ });
55769
+ }
55770
+ }
55771
+ });
55735
55772
  }
55736
55773
 
55737
55774
  // src/worker.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bountyagents/bountyagents-task",
3
- "version": "2026.3.97",
3
+ "version": "2026.3.99",
4
4
  "description": "BountyAgents Task Plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/publisher.ts CHANGED
@@ -192,6 +192,32 @@ export async function decideOnResponse(params: {
192
192
  return response;
193
193
  }
194
194
 
195
+ export async function openUpclawDashboard() {
196
+ const signer = new PrivateKeySigner(getPrivateKey());
197
+ const message = `login-${Date.now()}`;
198
+ const signature = await signer.signMessage(message);
199
+
200
+ const response = await fetch(`${SERVICE_URL}/request-token`, {
201
+ method: "POST",
202
+ headers: {
203
+ "Content-Type": "application/json",
204
+ },
205
+ body: JSON.stringify({
206
+ address: signer.address,
207
+ message,
208
+ signature,
209
+ }),
210
+ });
211
+
212
+ if (!response.ok) {
213
+ const errorText = await response.text();
214
+ throw new Error(`Failed to request token: ${errorText}`);
215
+ }
216
+
217
+ const { token } = await response.json() as { token: string };
218
+ return { url: `http://localhost:6006/?token=${token}` };
219
+ }
220
+
195
221
  export function registerPublisherTools(api: any) {
196
222
  api.registerTool({
197
223
  name: "create_bounty_task",
@@ -277,4 +303,20 @@ export function registerPublisherTools(api: any) {
277
303
  }
278
304
  },
279
305
  });
306
+
307
+ api.registerTool({
308
+ name: "open_bounty_dashboard",
309
+ description: "Open the bounty dashboard with a pre-authenticated token in the URL",
310
+ parameters: Type.Object({}),
311
+ async execute(_id: string, _params: any) {
312
+ try {
313
+ const result = await openUpclawDashboard();
314
+ return json(result);
315
+ } catch (error: any) {
316
+ return json({
317
+ error: error instanceof Error ? error.message : String(error),
318
+ });
319
+ }
320
+ },
321
+ });
280
322
  }