@gholl-studio/pier-connector 0.3.26 → 0.3.27

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gholl-studio/pier-connector",
3
3
  "author": "gholl",
4
- "version": "0.3.26",
4
+ "version": "0.3.27",
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.ts",
@@ -40,7 +40,7 @@
40
40
  ],
41
41
  "license": "MIT",
42
42
  "dependencies": {
43
- "@gholl-studio/pier-sdk": "^1.0.3",
43
+ "@gholl-studio/pier-sdk": "^1.1.0",
44
44
  "@nats-io/jetstream": "^3.3.1",
45
45
  "@nats-io/transport-node": "^3.0.0",
46
46
  "ethers": "^6.16.0",
package/src/robot.ts CHANGED
@@ -214,7 +214,7 @@ export class PierRobot {
214
214
  return;
215
215
  }
216
216
 
217
- const { job } = parsed;
217
+ const job = parsed.job!;
218
218
  const senderCore = job.meta?.sender ?? 'anonymous';
219
219
 
220
220
  this.activeNodeJobs.set(job.id, {
@@ -225,7 +225,7 @@ export class PierRobot {
225
225
  isTargeted: isTargeted
226
226
  });
227
227
 
228
- let finalText = job.task;
228
+ let finalText = job.task || '';
229
229
  if (!isTargeted) {
230
230
  finalText = `【PIER MARKETPLACE OPEN JOB】\nJob ID: ${job.id}\nTask: ${job.task}\n\n=== CRITICAL ===\nYou MUST use \`pier_bid_task\` to bid. Do not solve directly.`;
231
231
  } else {
@@ -1,25 +0,0 @@
1
- /**
2
- * @file pier-sdk.d.ts
3
- * @description TypeScript declaration file for the @gholl-studio/pier-sdk to support plugin compilation.
4
- */
5
-
6
- declare module '@gholl-studio/pier-sdk' {
7
- export class PierClient {
8
- constructor(config: { apiUrl: string; natsUrl?: string; logger?: any });
9
- connectNats(): Promise<any>;
10
- getNatsConnection(): Promise<any>;
11
- heartbeat(nodeId: string, secretKey: string, capabilities: string[]): Promise<any>;
12
- claimJob(jobId: string, nodeId: string, secretKey: string): Promise<any>;
13
- autoRegister(privateKey: string, hostName: string): Promise<{ nodeId: string; secretKey: string; walletAddress: string }>;
14
- getUserProfile(secretKey: string): Promise<any>;
15
- drainNats(): Promise<void>;
16
- nats: { url: string };
17
- }
18
-
19
- export const protocol: {
20
- normalizeInboundPayload(payload: any): { ok: boolean; job?: any; error?: string };
21
- createRequestPayload(data: any): any;
22
- createResultPayload(data: any): any;
23
- createErrorPayload(data: any): any;
24
- };
25
- }