@gholl-studio/pier-connector 0.2.42 → 0.2.44
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/openclaw.plugin.json +4 -36
- package/package.json +1 -1
- package/src/index.js +10 -2
package/openclaw.plugin.json
CHANGED
|
@@ -18,21 +18,7 @@
|
|
|
18
18
|
"default": "https://pier-connector.gholl.com/api/v1",
|
|
19
19
|
"description": "Pier API Endpoint (from Website)"
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
"type": "string",
|
|
23
|
-
"default": "",
|
|
24
|
-
"description": "Bot Node ID (obtain from pier-connector.gholl.com)"
|
|
25
|
-
},
|
|
26
|
-
"secretKey": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"default": "",
|
|
29
|
-
"description": "Bot Secret Key (obtain from pier-connector.gholl.com)"
|
|
30
|
-
},
|
|
31
|
-
"privateKey": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"default": "",
|
|
34
|
-
"description": "(Optional/Advanced) Wallet Private Key for AI Auto-Hosting"
|
|
35
|
-
},
|
|
21
|
+
|
|
36
22
|
"natsUrl": {
|
|
37
23
|
"type": "string",
|
|
38
24
|
"default": "wss://pier.gholl.com/nexus",
|
|
@@ -53,11 +39,7 @@
|
|
|
53
39
|
"default": "openclaw-workers",
|
|
54
40
|
"description": "NATS Queue Group to join for load balancing tasks"
|
|
55
41
|
},
|
|
56
|
-
|
|
57
|
-
"type": "string",
|
|
58
|
-
"default": "",
|
|
59
|
-
"description": "(Optional) The Agent ID to bind this connector to for context handling"
|
|
60
|
-
},
|
|
42
|
+
|
|
61
43
|
"walletAddress": {
|
|
62
44
|
"type": "string",
|
|
63
45
|
"default": "",
|
|
@@ -76,18 +58,7 @@
|
|
|
76
58
|
"label": "Pier API URL",
|
|
77
59
|
"placeholder": "https://pier-connector.gholl.com/api/v1"
|
|
78
60
|
},
|
|
79
|
-
|
|
80
|
-
"label": "Bot Node ID",
|
|
81
|
-
"placeholder": "uuid-..."
|
|
82
|
-
},
|
|
83
|
-
"secretKey": {
|
|
84
|
-
"label": "Bot Secret Key (Secret)",
|
|
85
|
-
"placeholder": "sk_..."
|
|
86
|
-
},
|
|
87
|
-
"privateKey": {
|
|
88
|
-
"label": "Private Key (Optional Auto-Host)",
|
|
89
|
-
"placeholder": "0x..."
|
|
90
|
-
},
|
|
61
|
+
|
|
91
62
|
"natsUrl": {
|
|
92
63
|
"label": "NATS WebSocket URL (Override)",
|
|
93
64
|
"placeholder": "wss://pier.gholl.com/nexus"
|
|
@@ -104,10 +75,7 @@
|
|
|
104
75
|
"label": "Queue Group",
|
|
105
76
|
"placeholder": "openclaw-workers"
|
|
106
77
|
},
|
|
107
|
-
|
|
108
|
-
"label": "Bound Agent ID",
|
|
109
|
-
"placeholder": "uuid-..."
|
|
110
|
-
},
|
|
78
|
+
|
|
111
79
|
"walletAddress": {
|
|
112
80
|
"label": "Wallet Address (Rewards)",
|
|
113
81
|
"placeholder": "0x..."
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gholl-studio/pier-connector",
|
|
3
3
|
"author": "gholl",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.44",
|
|
5
5
|
"description": "OpenClaw plugin that connects to the Pier job marketplace. Automatically fetches, executes, and reports distributed tasks for rewards.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "src/index.js",
|
package/src/index.js
CHANGED
|
@@ -187,8 +187,16 @@ export default function register(api) {
|
|
|
187
187
|
|
|
188
188
|
if (!finalAgentId) {
|
|
189
189
|
// Check if accountId matches an existing agent slug/ID
|
|
190
|
-
const
|
|
191
|
-
|
|
190
|
+
const rawAgents = (api.runtime && typeof api.runtime.getAgents === 'function') ? await api.runtime.getAgents() : null;
|
|
191
|
+
let isAgentValid = false;
|
|
192
|
+
|
|
193
|
+
if (Array.isArray(rawAgents)) {
|
|
194
|
+
isAgentValid = !!rawAgents.find(a => a.id === inbound.accountId);
|
|
195
|
+
} else if (rawAgents && typeof rawAgents === 'object') {
|
|
196
|
+
isAgentValid = !!rawAgents[inbound.accountId];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (isAgentValid) {
|
|
192
200
|
finalAgentId = inbound.accountId;
|
|
193
201
|
routingSource = 'name-match-fallback';
|
|
194
202
|
} else {
|