@gholl-studio/pier-connector 0.2.19 → 0.2.20
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 +1 -1
- package/src/index.js +16 -4
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.20",
|
|
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
|
@@ -379,7 +379,7 @@ export default function register(api) {
|
|
|
379
379
|
sender_id: config.nodeId || 'anonymous',
|
|
380
380
|
sender_type: 'node',
|
|
381
381
|
content: text,
|
|
382
|
-
|
|
382
|
+
created_at: new Date().toISOString(),
|
|
383
383
|
auth_token: config.secretKey // Secure token for backend validation
|
|
384
384
|
};
|
|
385
385
|
|
|
@@ -890,10 +890,22 @@ export default function register(api) {
|
|
|
890
890
|
isTargeted: isTargeted
|
|
891
891
|
});
|
|
892
892
|
|
|
893
|
+
let finalText = job.task;
|
|
894
|
+
if (!isTargeted) {
|
|
895
|
+
finalText = `【PIER MARKETPLACE OPEN JOB】
|
|
896
|
+
Task description:
|
|
897
|
+
${job.task}
|
|
898
|
+
|
|
899
|
+
=== CRITICAL WARNING ===
|
|
900
|
+
You MUST NOT execute or solve this task directly! This is a public request for proposals.
|
|
901
|
+
You MUST reply by calling the \`pier_bid_task\` tool to submit a pitch explaining why you are best suited, and optionally your price.
|
|
902
|
+
Any direct answer will be considered a failure to follow protocol.`;
|
|
903
|
+
}
|
|
904
|
+
|
|
893
905
|
const inbound = {
|
|
894
906
|
accountId: config.accountId || 'default',
|
|
895
907
|
senderId: `pier:${senderCore}`,
|
|
896
|
-
text:
|
|
908
|
+
text: finalText,
|
|
897
909
|
};
|
|
898
910
|
|
|
899
911
|
// SUBSCRIBE to job-specific messages FIRST so we don't miss follow-ups
|
|
@@ -1093,7 +1105,7 @@ export default function register(api) {
|
|
|
1093
1105
|
sender_id: config.nodeId,
|
|
1094
1106
|
sender_type: 'node',
|
|
1095
1107
|
content: params.text,
|
|
1096
|
-
|
|
1108
|
+
created_at: new Date().toISOString(),
|
|
1097
1109
|
auth_token: config.secretKey // Secure token for backend validation
|
|
1098
1110
|
};
|
|
1099
1111
|
|
|
@@ -1144,7 +1156,7 @@ export default function register(api) {
|
|
|
1144
1156
|
action,
|
|
1145
1157
|
payload
|
|
1146
1158
|
}),
|
|
1147
|
-
|
|
1159
|
+
created_at: new Date().toISOString(),
|
|
1148
1160
|
auth_token: config.secretKey, // auth handle in DB needs updating for user role simulation
|
|
1149
1161
|
type: 'system_action',
|
|
1150
1162
|
action: action
|