openbroker 1.0.71 → 1.0.72

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/SKILL.md CHANGED
@@ -4,7 +4,7 @@ description: Hyperliquid trading plugin with background position monitoring and
4
4
  license: MIT
5
5
  compatibility: Requires Node.js 22+, network access to api.hyperliquid.xyz
6
6
  homepage: https://www.npmjs.com/package/openbroker
7
- metadata: {"author": "monemetrics", "version": "1.0.71", "openclaw": {"requires": {"bins": ["openbroker"], "env": ["HYPERLIQUID_PRIVATE_KEY"]}, "primaryEnv": "HYPERLIQUID_PRIVATE_KEY", "install": [{"id": "node", "kind": "node", "package": "openbroker", "bins": ["openbroker"], "label": "Install openbroker (npm)"}]}}
7
+ metadata: {"author": "monemetrics", "version": "1.0.72", "openclaw": {"requires": {"bins": ["openbroker"], "env": ["HYPERLIQUID_PRIVATE_KEY"]}, "primaryEnv": "HYPERLIQUID_PRIVATE_KEY", "install": [{"id": "node", "kind": "node", "package": "openbroker", "bins": ["openbroker"], "label": "Install openbroker (npm)"}]}}
8
8
  allowed-tools: ob_account ob_positions ob_funding ob_markets ob_search ob_spot ob_fills ob_orders ob_order_status ob_fees ob_candles ob_funding_history ob_trades ob_rate_limit ob_funding_scan ob_buy ob_sell ob_limit ob_trigger ob_tpsl ob_cancel ob_twap ob_twap_cancel ob_twap_status ob_bracket ob_chase ob_watcher_status ob_auto_run ob_auto_stop ob_auto_list Bash(openbroker:*)
9
9
  ---
10
10
 
@@ -436,15 +436,66 @@ The plugin reads wallet credentials from `~/.openbroker/.env` (set up by `openbr
436
436
 
437
437
  ### Webhook setup for watcher alerts
438
438
 
439
- For position alerts to reach the agent, enable hooks in your gateway config:
439
+ For the position watcher and automations to send alerts to the agent, you must enable webhooks in your OpenClaw gateway config and add a hook mapping. This is a manual configuration step — plugins cannot auto-configure gateway settings.
440
440
 
441
+ **1. Generate a hook token** — any secure random string:
442
+ ```bash
443
+ openssl rand -hex 32
444
+ ```
445
+
446
+ **2. Enable hooks and add a mapping** in your `openclaw.json` (or `openclaw.yaml`) deployment config:
447
+ ```json
448
+ "hooks": {
449
+ "enabled": true,
450
+ "path": "/hooks",
451
+ "token": "<your-generated-token>",
452
+ "allowedAgentIds": ["hooks", "main", "openbroker"],
453
+ "mappings": [
454
+ {
455
+ "id": "main",
456
+ "match": {
457
+ "path": "openbroker"
458
+ },
459
+ "action": "agent",
460
+ "wakeMode": "now",
461
+ "name": "Openbroker",
462
+ "agentId": "main",
463
+ "deliver": true,
464
+ "channel": "last",
465
+ "model": "anthropic/claude-sonnet-4-6"
466
+ }
467
+ ]
468
+ }
469
+ ```
470
+
471
+ | Field | Description |
472
+ |-------|-------------|
473
+ | `token` | Shared secret — must match `hooksToken` in the plugin config |
474
+ | `allowedAgentIds` | Agent IDs allowed to receive webhook requests |
475
+ | `mappings[].match.path` | Matches the webhook path sent by the plugin (always `"openbroker"`) |
476
+ | `mappings[].wakeMode` | `"now"` triggers an immediate agent turn. `"next-heartbeat"` queues for the next scheduled heartbeat |
477
+ | `mappings[].deliver` | If `true`, the agent's response is delivered to the user via the configured channel |
478
+ | `mappings[].channel` | Delivery channel: `"last"` (most recent), `"slack"`, `"telegram"`, `"discord"`, `"whatsapp"`, etc. |
479
+ | `mappings[].model` | Model override for webhook-triggered turns. Optional — uses deployment default if omitted |
480
+
481
+ **3. Set the same token in your plugin config:**
441
482
  ```yaml
442
- hooks:
443
- enabled: true
444
- token: "your-hooks-secret" # Must match hooksToken above
483
+ plugins:
484
+ entries:
485
+ openbroker:
486
+ enabled: true
487
+ config:
488
+ hooksToken: "<your-generated-token>" # Same token as hooks.token
489
+ watcher:
490
+ enabled: true
491
+ ```
492
+
493
+ **4. Restart the gateway** and verify:
494
+ ```bash
495
+ openclaw ob status
445
496
  ```
446
497
 
447
- Without hooks, the watcher still runs and tracks state (accessible via `ob_watcher_status`), but it can't wake the agent.
498
+ The watcher sends alerts to `POST /hooks/agent` with `Authorization: Bearer <token>`. The gateway matches the request against the mapping and triggers an agent turn. Without hooks enabled, the watcher still tracks state (accessible via `ob_watcher_status`), but it can't wake the agent.
448
499
 
449
500
  ### Using with or without the plugin
450
501
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openbroker",
3
3
  "name": "OpenBroker — Hyperliquid Trading",
4
- "version": "1.0.71",
4
+ "version": "1.0.72",
5
5
  "description": "Trade on Hyperliquid DEX with background position monitoring",
6
6
  "configSchema": {
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openbroker",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "Hyperliquid trading CLI - execute orders, manage positions, and run trading strategies",
5
5
  "type": "module",
6
6
  "bin": {