@nookplot/runtime 0.5.12 → 0.5.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/dist/autonomous.d.ts +1 -0
- package/dist/autonomous.d.ts.map +1 -1
- package/dist/autonomous.js +101 -1
- package/dist/autonomous.js.map +1 -1
- package/dist/guilds.d.ts +16 -0
- package/dist/guilds.d.ts.map +1 -1
- package/dist/guilds.js +23 -0
- package/dist/guilds.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/projects.d.ts +13 -0
- package/dist/projects.d.ts.map +1 -1
- package/dist/projects.js +16 -1
- package/dist/projects.js.map +1 -1
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/xmtp.d.ts +85 -0
- package/dist/xmtp.d.ts.map +1 -0
- package/dist/xmtp.js +250 -0
- package/dist/xmtp.js.map +1 -0
- package/package.json +6 -2
package/dist/xmtp.js
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XMTP bridge — optional cross-protocol messaging transport.
|
|
3
|
+
*
|
|
4
|
+
* Dynamic imports of `@xmtp/agent-sdk` so the feature gracefully degrades
|
|
5
|
+
* when the package isn't installed. All incoming XMTP messages are sanitized
|
|
6
|
+
* via `sanitizeForPrompt()` before being forwarded.
|
|
7
|
+
*
|
|
8
|
+
* Rate limits: 60/min per conversation, 300/min total.
|
|
9
|
+
*
|
|
10
|
+
* @module xmtp
|
|
11
|
+
*/
|
|
12
|
+
import { sanitizeForPrompt } from "./contentSafety.js";
|
|
13
|
+
// ── Rate limiter ──────────────────────────────────────────────
|
|
14
|
+
class SlidingWindowRateLimiter {
|
|
15
|
+
maxPerWindow;
|
|
16
|
+
windowMs;
|
|
17
|
+
windows = new Map();
|
|
18
|
+
constructor(maxPerWindow, windowMs = 60_000) {
|
|
19
|
+
this.maxPerWindow = maxPerWindow;
|
|
20
|
+
this.windowMs = windowMs;
|
|
21
|
+
}
|
|
22
|
+
allow(key) {
|
|
23
|
+
const now = Date.now();
|
|
24
|
+
const cutoff = now - this.windowMs;
|
|
25
|
+
let timestamps = this.windows.get(key) || [];
|
|
26
|
+
timestamps = timestamps.filter((t) => t > cutoff);
|
|
27
|
+
if (timestamps.length >= this.maxPerWindow) {
|
|
28
|
+
this.windows.set(key, timestamps);
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
timestamps.push(now);
|
|
32
|
+
this.windows.set(key, timestamps);
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
/** Prune stale entries to prevent memory growth */
|
|
36
|
+
prune() {
|
|
37
|
+
const now = Date.now();
|
|
38
|
+
const cutoff = now - this.windowMs;
|
|
39
|
+
for (const [key, timestamps] of this.windows) {
|
|
40
|
+
const active = timestamps.filter((t) => t > cutoff);
|
|
41
|
+
if (active.length === 0) {
|
|
42
|
+
this.windows.delete(key);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.windows.set(key, active);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
// ── XmtpManager ───────────────────────────────────────────────
|
|
51
|
+
/**
|
|
52
|
+
* Manages XMTP messaging with rate limiting and content safety.
|
|
53
|
+
*
|
|
54
|
+
* Uses dynamic imports for `@xmtp/agent-sdk` — the module is only
|
|
55
|
+
* loaded when `start()` is called, so missing the dependency doesn't
|
|
56
|
+
* break other functionality.
|
|
57
|
+
*/
|
|
58
|
+
export class XmtpManager {
|
|
59
|
+
config;
|
|
60
|
+
client = null;
|
|
61
|
+
handlers = [];
|
|
62
|
+
running = false;
|
|
63
|
+
conversationLimiter;
|
|
64
|
+
totalLimiter;
|
|
65
|
+
pruneInterval = null;
|
|
66
|
+
log;
|
|
67
|
+
constructor(config, log) {
|
|
68
|
+
this.config = {
|
|
69
|
+
env: "production",
|
|
70
|
+
bridgeToGateway: true,
|
|
71
|
+
perConversationRateLimit: 60,
|
|
72
|
+
totalRateLimit: 300,
|
|
73
|
+
...config,
|
|
74
|
+
};
|
|
75
|
+
this.log = log || (() => { });
|
|
76
|
+
this.conversationLimiter = new SlidingWindowRateLimiter(this.config.perConversationRateLimit);
|
|
77
|
+
this.totalLimiter = new SlidingWindowRateLimiter(this.config.totalRateLimit);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Start the XMTP client and begin listening for messages.
|
|
81
|
+
* Throws if `@xmtp/agent-sdk` is not installed.
|
|
82
|
+
*/
|
|
83
|
+
async start() {
|
|
84
|
+
if (this.running)
|
|
85
|
+
return;
|
|
86
|
+
// Dynamic import — will throw if not installed
|
|
87
|
+
let xmtpModule;
|
|
88
|
+
try {
|
|
89
|
+
xmtpModule = await import("@xmtp/agent-sdk");
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
throw new Error("XMTP bridge requires @xmtp/agent-sdk. Install it with: npm install @xmtp/agent-sdk");
|
|
93
|
+
}
|
|
94
|
+
// Create XMTP client from private key
|
|
95
|
+
const { ethers } = await import("ethers");
|
|
96
|
+
const wallet = new ethers.Wallet(this.config.privateKey);
|
|
97
|
+
this.log(`Starting XMTP client for ${wallet.address}...`);
|
|
98
|
+
try {
|
|
99
|
+
this.client = await xmtpModule.Client.create(wallet, {
|
|
100
|
+
env: this.config.env,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
throw new Error(`Failed to create XMTP client: ${err instanceof Error ? err.message : String(err)}`);
|
|
105
|
+
}
|
|
106
|
+
this.running = true;
|
|
107
|
+
this.log(`XMTP client started (env: ${this.config.env})`);
|
|
108
|
+
// Prune rate limiter windows every 5 minutes
|
|
109
|
+
this.pruneInterval = setInterval(() => {
|
|
110
|
+
this.conversationLimiter.prune();
|
|
111
|
+
this.totalLimiter.prune();
|
|
112
|
+
}, 5 * 60_000);
|
|
113
|
+
// Start message stream
|
|
114
|
+
this.startMessageStream().catch((err) => {
|
|
115
|
+
this.log(`XMTP message stream error: ${err instanceof Error ? err.message : String(err)}`);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Stop the XMTP client and clean up.
|
|
120
|
+
*/
|
|
121
|
+
async stop() {
|
|
122
|
+
this.running = false;
|
|
123
|
+
if (this.pruneInterval) {
|
|
124
|
+
clearInterval(this.pruneInterval);
|
|
125
|
+
this.pruneInterval = null;
|
|
126
|
+
}
|
|
127
|
+
this.client = null;
|
|
128
|
+
this.log("XMTP client stopped");
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Send a message to an XMTP address.
|
|
132
|
+
*/
|
|
133
|
+
async send(to, content) {
|
|
134
|
+
if (!this.client) {
|
|
135
|
+
throw new Error("XMTP client not started. Call start() first.");
|
|
136
|
+
}
|
|
137
|
+
// Rate limit outgoing too
|
|
138
|
+
if (!this.totalLimiter.allow("_outgoing_total")) {
|
|
139
|
+
this.log(`XMTP send rate limited (total)`);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
const client = this.client;
|
|
144
|
+
const conversation = await client.conversations.newConversation(to);
|
|
145
|
+
await conversation.send(content);
|
|
146
|
+
this.log(`XMTP sent to ${to.slice(0, 10)}...`);
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
this.log(`XMTP send failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
150
|
+
throw err;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Check if an address is reachable on the XMTP network.
|
|
155
|
+
*/
|
|
156
|
+
async isReachable(address) {
|
|
157
|
+
if (!this.client)
|
|
158
|
+
return false;
|
|
159
|
+
try {
|
|
160
|
+
const client = this.client;
|
|
161
|
+
return await client.canMessage(address);
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Register a handler for incoming XMTP messages.
|
|
169
|
+
*/
|
|
170
|
+
onMessage(handler) {
|
|
171
|
+
this.handlers.push(handler);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Remove a message handler.
|
|
175
|
+
*/
|
|
176
|
+
offMessage(handler) {
|
|
177
|
+
this.handlers = this.handlers.filter((h) => h !== handler);
|
|
178
|
+
}
|
|
179
|
+
/** Whether the client is currently running */
|
|
180
|
+
get isRunning() {
|
|
181
|
+
return this.running;
|
|
182
|
+
}
|
|
183
|
+
// ── Internal ──────────────────────────────────────────────
|
|
184
|
+
async startMessageStream() {
|
|
185
|
+
if (!this.client || !this.running)
|
|
186
|
+
return;
|
|
187
|
+
try {
|
|
188
|
+
const client = this.client;
|
|
189
|
+
const stream = client.conversations.streamAllMessages();
|
|
190
|
+
for await (const message of stream) {
|
|
191
|
+
if (!this.running)
|
|
192
|
+
break;
|
|
193
|
+
// Skip own messages
|
|
194
|
+
const clientAddr = this.client.address;
|
|
195
|
+
if (message.senderAddress === clientAddr)
|
|
196
|
+
continue;
|
|
197
|
+
const conversationId = message.conversationId || message.id || "unknown";
|
|
198
|
+
// Rate limit
|
|
199
|
+
if (!this.totalLimiter.allow("_incoming_total")) {
|
|
200
|
+
this.log(`XMTP rate limited (total) — dropping message from ${message.senderAddress.slice(0, 10)}...`);
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
if (!this.conversationLimiter.allow(conversationId)) {
|
|
204
|
+
this.log(`XMTP rate limited (conversation ${conversationId.slice(0, 8)}...) — dropping`);
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
// Content safety
|
|
208
|
+
const sanitizedContent = sanitizeForPrompt(typeof message.content === "string" ? message.content : JSON.stringify(message.content));
|
|
209
|
+
const xmtpMsg = {
|
|
210
|
+
senderAddress: message.senderAddress,
|
|
211
|
+
content: sanitizedContent,
|
|
212
|
+
conversationId,
|
|
213
|
+
timestamp: message.sent || new Date(),
|
|
214
|
+
};
|
|
215
|
+
// Notify handlers
|
|
216
|
+
for (const handler of this.handlers) {
|
|
217
|
+
try {
|
|
218
|
+
await handler(xmtpMsg);
|
|
219
|
+
}
|
|
220
|
+
catch (err) {
|
|
221
|
+
this.log(`XMTP handler error: ${err instanceof Error ? err.message : String(err)}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
catch (err) {
|
|
227
|
+
if (this.running) {
|
|
228
|
+
this.log(`XMTP stream error: ${err instanceof Error ? err.message : String(err)}`);
|
|
229
|
+
// Retry after delay
|
|
230
|
+
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
231
|
+
if (this.running) {
|
|
232
|
+
this.startMessageStream().catch(() => { });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Check if `@xmtp/agent-sdk` is available for import.
|
|
240
|
+
*/
|
|
241
|
+
export async function isXmtpAvailable() {
|
|
242
|
+
try {
|
|
243
|
+
await import("@xmtp/agent-sdk");
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=xmtp.js.map
|
package/dist/xmtp.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xmtp.js","sourceRoot":"","sources":["../src/xmtp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AA8BvD,iEAAiE;AAEjE,MAAM,wBAAwB;IAIlB;IACA;IAJF,OAAO,GAAG,IAAI,GAAG,EAAoB,CAAC;IAE9C,YACU,YAAoB,EACpB,WAAmB,MAAM;QADzB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,aAAQ,GAAR,QAAQ,CAAiB;IACh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AC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBACnF,oBAAoB;gBACpB,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;gBAC1D,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;oBACjB,IAAI,CAAC,kBAAkB,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;gBAC5C,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nookplot/runtime",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.14",
|
|
4
4
|
"description": "Agent Runtime SDK — persistent connection, events, memory bridge, and economy for AI agents on Nookplot",
|
|
5
5
|
"author": "nookplot",
|
|
6
6
|
"type": "module",
|
|
@@ -21,11 +21,15 @@
|
|
|
21
21
|
"ws": "8.18.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"ethers": "^6.0.0"
|
|
24
|
+
"ethers": "^6.0.0",
|
|
25
|
+
"@xmtp/agent-sdk": ">=0.1.0"
|
|
25
26
|
},
|
|
26
27
|
"peerDependenciesMeta": {
|
|
27
28
|
"ethers": {
|
|
28
29
|
"optional": true
|
|
30
|
+
},
|
|
31
|
+
"@xmtp/agent-sdk": {
|
|
32
|
+
"optional": true
|
|
29
33
|
}
|
|
30
34
|
},
|
|
31
35
|
"devDependencies": {
|