@gholl-studio/pier-connector 0.3.13 → 0.3.14
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/inbound.ts +5 -6
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.
|
|
4
|
+
"version": "0.3.14",
|
|
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",
|
package/src/inbound.ts
CHANGED
|
@@ -79,28 +79,27 @@ export async function handleInbound(
|
|
|
79
79
|
logger.info(`[pier-connector:trace] Finalized inbound context for job ${jobId}. Target Agent: ${finalAgentId}, Session: ${dynamicSessionKey}`);
|
|
80
80
|
|
|
81
81
|
const ctxPayload = api.runtime.channel.reply.finalizeInboundContext({
|
|
82
|
-
AgentId: finalAgentId,
|
|
83
|
-
agentId: finalAgentId, // Redundant for compatibility
|
|
84
82
|
Body: inbound.body,
|
|
85
83
|
BodyForAgent: inbound.body,
|
|
86
84
|
RawBody: inbound.body,
|
|
87
85
|
From: inbound.senderId,
|
|
88
|
-
To: `
|
|
86
|
+
To: `chat:${jobId}`,
|
|
89
87
|
SessionKey: dynamicSessionKey,
|
|
90
88
|
AccountId: inbound.accountId,
|
|
91
89
|
ChatType: 'direct',
|
|
92
90
|
SenderId: inbound.senderId,
|
|
91
|
+
SenderName: robot.accountId,
|
|
93
92
|
Provider: 'pier',
|
|
94
93
|
Surface: 'pier',
|
|
95
94
|
OriginatingChannel: 'pier',
|
|
96
|
-
OriginatingTo: `
|
|
95
|
+
OriginatingTo: `chat:${jobId}`,
|
|
97
96
|
WasMentioned: true,
|
|
98
97
|
CommandAuthorized: true,
|
|
99
98
|
SystemPrompt: injectedPrompt,
|
|
100
99
|
MessageId: jobId,
|
|
100
|
+
MessageSid: jobId,
|
|
101
101
|
Metadata: {
|
|
102
102
|
...metadata,
|
|
103
|
-
agentId: finalAgentId, // Pinning in metadata
|
|
104
103
|
accountId: robot.accountId,
|
|
105
104
|
pierJobId: jobId,
|
|
106
105
|
routingSource: routingSource
|
|
@@ -140,7 +139,7 @@ export async function handleInbound(
|
|
|
140
139
|
try {
|
|
141
140
|
logger.info(`[pier-connector:trace] Dispatching reply to agent ${finalAgentId}...`);
|
|
142
141
|
await api.runtime.channel.reply.dispatchReplyFromConfig({
|
|
143
|
-
ctx: ctxPayload, cfg:
|
|
142
|
+
ctx: ctxPayload, cfg: accountScopedCfg, dispatcher
|
|
144
143
|
});
|
|
145
144
|
logger.info(`[pier-connector:trace] dispatchReplyFromConfig completed for job ${jobId}`);
|
|
146
145
|
} catch (err: any) {
|