@gholl-studio/pier-connector 0.2.33 → 0.2.35
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/package.json +2 -2
- package/src/index.js +5 -5
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.35",
|
|
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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@gholl-studio/pier-sdk": "^1.0.
|
|
37
|
+
"@gholl-studio/pier-sdk": "^1.0.3",
|
|
38
38
|
"@nats-io/jetstream": "^3.3.1",
|
|
39
39
|
"@nats-io/transport-node": "^3.0.0",
|
|
40
40
|
"ethers": "^6.16.0",
|
package/src/index.js
CHANGED
|
@@ -155,7 +155,7 @@ export default function register(api) {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
const route = api.runtime.channel.routing.resolveAgentRoute({
|
|
158
|
-
cfg: api.config,
|
|
158
|
+
cfg: api.runtime.config,
|
|
159
159
|
channel: 'pier',
|
|
160
160
|
accountId: inbound.accountId,
|
|
161
161
|
peer: { kind: 'direct', id: jobId }
|
|
@@ -217,8 +217,8 @@ export default function register(api) {
|
|
|
217
217
|
});
|
|
218
218
|
|
|
219
219
|
const { dispatcher, markDispatchIdle } = api.runtime.channel.reply.createReplyDispatcherWithTyping({
|
|
220
|
-
cfg: api.config,
|
|
221
|
-
agentId: route.agentId,
|
|
220
|
+
cfg: api.runtime.config,
|
|
221
|
+
agentId: this.config.agentId || route.agentId,
|
|
222
222
|
deliver: async (payload) => {
|
|
223
223
|
const currentMeta = this.activeNodeJobs.get(jobId);
|
|
224
224
|
await pierChannel.outbound.sendText({
|
|
@@ -244,7 +244,7 @@ export default function register(api) {
|
|
|
244
244
|
|
|
245
245
|
try {
|
|
246
246
|
await api.runtime.channel.reply.dispatchReplyFromConfig({
|
|
247
|
-
ctx: ctxPayload, cfg: api.config, dispatcher
|
|
247
|
+
ctx: ctxPayload, cfg: api.runtime.config, dispatcher
|
|
248
248
|
});
|
|
249
249
|
} finally {
|
|
250
250
|
markDispatchIdle();
|
|
@@ -585,7 +585,7 @@ export default function register(api) {
|
|
|
585
585
|
logger.debug(`[pier-connector][${accountId}] 🫨 Suppressing reply for non-assigned job ${jobId}`);
|
|
586
586
|
} else {
|
|
587
587
|
const chatPayload = {
|
|
588
|
-
id: crypto.randomUUID ? crypto.randomUUID() : (Math.random().toString(36).substring(2)),
|
|
588
|
+
id: (typeof crypto !== 'undefined' && crypto.randomUUID) ? crypto.randomUUID() : (Math.random().toString(36).substring(2) + Date.now().toString(36)),
|
|
589
589
|
job_id: jobId,
|
|
590
590
|
sender_id: robot.config.nodeId || 'anonymous',
|
|
591
591
|
sender_name: accountId,
|