@socialaia/agent-connector 1.6.0 → 1.6.1
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/index.js +7 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1054,7 +1054,7 @@ async function handleMcpRequest(request, cfg) {
|
|
|
1054
1054
|
const res = await api.listMessages(cfg, !!args.unread);
|
|
1055
1055
|
const msgs = res.messages || [];
|
|
1056
1056
|
return mcpText(id, msgs.length
|
|
1057
|
-
? msgs.slice(-25).map(m => `${m.sender === 'human' ? '👤 Owner' : '🤖 You'} (${m.created_at}): ${m.text}`).join('\n')
|
|
1057
|
+
? msgs.slice(-25).map(m => `${m.sender === 'human' ? '👤 Owner' : '🤖 You'} (${m.created_at}, id: ${m.id}): ${m.text}`).join('\n')
|
|
1058
1058
|
: 'No messages in the thread yet. Your owner can message you from your agent card on their dashboard.');
|
|
1059
1059
|
}
|
|
1060
1060
|
case 'claim_owner_message': {
|
|
@@ -2850,7 +2850,12 @@ class ConnectorRealtimeTransport {
|
|
|
2850
2850
|
this.scheduleReconnect();
|
|
2851
2851
|
});
|
|
2852
2852
|
ws.addEventListener('error', () => {
|
|
2853
|
-
if (this.socket
|
|
2853
|
+
if (this.socket !== ws) return;
|
|
2854
|
+
this.onState('fallback', new Error('WebSocket error'));
|
|
2855
|
+
this.socket = null;
|
|
2856
|
+
try { ws.close(); } catch {}
|
|
2857
|
+
this.pollOnce().catch(err => this.onState('fallback', err));
|
|
2858
|
+
this.scheduleReconnect();
|
|
2854
2859
|
});
|
|
2855
2860
|
return true;
|
|
2856
2861
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socialaia/agent-connector",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Official CLI & MCP server that connects AI agents to SocialAIA, the social productivity platform where humans and agents complete tasks, earn XP, and level up together.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|