@agentdomain/eliza-plugin 0.1.0
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/README.md +19 -0
- package/dist/index.d.ts +340 -0
- package/dist/index.js +437 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @agentdomain/eliza-plugin
|
|
2
|
+
|
|
3
|
+
ElizaOS plugin for AgentDomain.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install @agentdomain/eliza-plugin
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The plugin gives Eliza agents a complete AgentDomain lifecycle surface:
|
|
10
|
+
|
|
11
|
+
- Registration quote and x402 registration
|
|
12
|
+
- Registry discovery
|
|
13
|
+
- Agent email send/list
|
|
14
|
+
- DNS management
|
|
15
|
+
- SSL repair/reconfiguration
|
|
16
|
+
- RenewalVault status, funding, and auto-renew
|
|
17
|
+
- Per-agent service-plan status and upgrades
|
|
18
|
+
|
|
19
|
+
Configure `AGENTDOMAIN_API_URL` only if you need a custom endpoint. The default is `https://agentdomain.app/api/v1`.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
interface IAgentRuntime {
|
|
2
|
+
getSetting(key: string): string | undefined;
|
|
3
|
+
character?: {
|
|
4
|
+
settings?: {
|
|
5
|
+
secrets?: Record<string, string>;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
interface Memory {
|
|
10
|
+
content: {
|
|
11
|
+
text: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const quoteRegistrationAction: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
similes: string[];
|
|
18
|
+
examples: never[];
|
|
19
|
+
validate: () => Promise<boolean>;
|
|
20
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
21
|
+
text: string;
|
|
22
|
+
data: import("@agentdomain/sdk").QuoteResult;
|
|
23
|
+
}>;
|
|
24
|
+
};
|
|
25
|
+
export declare const registerIdentityAction: {
|
|
26
|
+
name: string;
|
|
27
|
+
description: string;
|
|
28
|
+
similes: string[];
|
|
29
|
+
examples: ({
|
|
30
|
+
user: string;
|
|
31
|
+
content: {
|
|
32
|
+
text: string;
|
|
33
|
+
action?: undefined;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
user: string;
|
|
37
|
+
content: {
|
|
38
|
+
text: string;
|
|
39
|
+
action: string;
|
|
40
|
+
};
|
|
41
|
+
})[][];
|
|
42
|
+
validate: (runtime: IAgentRuntime, _message?: Memory) => Promise<boolean>;
|
|
43
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
44
|
+
text: string;
|
|
45
|
+
data: import("@agentdomain/shared").RegistrationResult;
|
|
46
|
+
}>;
|
|
47
|
+
};
|
|
48
|
+
export declare const searchAgentsAction: {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
similes: string[];
|
|
52
|
+
examples: never[];
|
|
53
|
+
validate: () => Promise<boolean>;
|
|
54
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
55
|
+
text: string;
|
|
56
|
+
data: {
|
|
57
|
+
items: import("@agentdomain/sdk").AgentRow[];
|
|
58
|
+
total: number;
|
|
59
|
+
};
|
|
60
|
+
}>;
|
|
61
|
+
};
|
|
62
|
+
export declare const listEmailAction: {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
similes: string[];
|
|
66
|
+
examples: never[];
|
|
67
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
68
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
69
|
+
text: string;
|
|
70
|
+
data: import("@agentdomain/sdk").EmailListResult;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
export declare const sendEmailAction: {
|
|
74
|
+
name: string;
|
|
75
|
+
description: string;
|
|
76
|
+
similes: string[];
|
|
77
|
+
examples: never[];
|
|
78
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
79
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
80
|
+
text: string;
|
|
81
|
+
data: import("@agentdomain/sdk").EmailResult;
|
|
82
|
+
}>;
|
|
83
|
+
};
|
|
84
|
+
export declare const renewalStatusAction: {
|
|
85
|
+
name: string;
|
|
86
|
+
description: string;
|
|
87
|
+
similes: string[];
|
|
88
|
+
examples: never[];
|
|
89
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
90
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
91
|
+
text: string;
|
|
92
|
+
data: import("@agentdomain/sdk").RenewalStatus;
|
|
93
|
+
}>;
|
|
94
|
+
};
|
|
95
|
+
export declare const fundRenewalAction: {
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
similes: string[];
|
|
99
|
+
examples: never[];
|
|
100
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
101
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
102
|
+
text: string;
|
|
103
|
+
data: import("@agentdomain/sdk").VaultFundResult;
|
|
104
|
+
}>;
|
|
105
|
+
};
|
|
106
|
+
export declare const enableAutoRenewAction: {
|
|
107
|
+
name: string;
|
|
108
|
+
description: string;
|
|
109
|
+
similes: string[];
|
|
110
|
+
examples: never[];
|
|
111
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
112
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
113
|
+
text: string;
|
|
114
|
+
data: import("@agentdomain/sdk").AutoRenewResult;
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
117
|
+
export declare const reconfigureSslAction: {
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
similes: string[];
|
|
121
|
+
examples: never[];
|
|
122
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
123
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
124
|
+
text: string;
|
|
125
|
+
data: import("@agentdomain/sdk").SslReconfigureResult;
|
|
126
|
+
}>;
|
|
127
|
+
};
|
|
128
|
+
export declare const listDnsAction: {
|
|
129
|
+
name: string;
|
|
130
|
+
description: string;
|
|
131
|
+
similes: string[];
|
|
132
|
+
examples: never[];
|
|
133
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
134
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
135
|
+
text: string;
|
|
136
|
+
data: import("@agentdomain/shared").DnsRecord[];
|
|
137
|
+
}>;
|
|
138
|
+
};
|
|
139
|
+
export declare const createDnsAction: {
|
|
140
|
+
name: string;
|
|
141
|
+
description: string;
|
|
142
|
+
similes: string[];
|
|
143
|
+
examples: never[];
|
|
144
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
145
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
146
|
+
text: string;
|
|
147
|
+
data: import("@agentdomain/shared").DnsRecord;
|
|
148
|
+
}>;
|
|
149
|
+
};
|
|
150
|
+
export declare const updateDnsAction: {
|
|
151
|
+
name: string;
|
|
152
|
+
description: string;
|
|
153
|
+
similes: string[];
|
|
154
|
+
examples: never[];
|
|
155
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
156
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
157
|
+
text: string;
|
|
158
|
+
data: import("@agentdomain/shared").DnsRecord;
|
|
159
|
+
}>;
|
|
160
|
+
};
|
|
161
|
+
export declare const deleteDnsAction: {
|
|
162
|
+
name: string;
|
|
163
|
+
description: string;
|
|
164
|
+
similes: string[];
|
|
165
|
+
examples: never[];
|
|
166
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
167
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
168
|
+
text: string;
|
|
169
|
+
data: {
|
|
170
|
+
success: boolean;
|
|
171
|
+
};
|
|
172
|
+
}>;
|
|
173
|
+
};
|
|
174
|
+
export declare const servicePlanStatusAction: {
|
|
175
|
+
name: string;
|
|
176
|
+
description: string;
|
|
177
|
+
similes: string[];
|
|
178
|
+
examples: never[];
|
|
179
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
180
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
181
|
+
text: string;
|
|
182
|
+
data: import("@agentdomain/sdk").ServicePlanStatusResult;
|
|
183
|
+
}>;
|
|
184
|
+
};
|
|
185
|
+
export declare const purchaseServicePlanAction: {
|
|
186
|
+
name: string;
|
|
187
|
+
description: string;
|
|
188
|
+
similes: string[];
|
|
189
|
+
examples: never[];
|
|
190
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
191
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
192
|
+
text: string;
|
|
193
|
+
data: import("@agentdomain/sdk").ServicePlanPurchaseResult;
|
|
194
|
+
}>;
|
|
195
|
+
};
|
|
196
|
+
export declare const agentDomainPlugin: {
|
|
197
|
+
name: string;
|
|
198
|
+
description: string;
|
|
199
|
+
actions: ({
|
|
200
|
+
name: string;
|
|
201
|
+
description: string;
|
|
202
|
+
similes: string[];
|
|
203
|
+
examples: never[];
|
|
204
|
+
validate: () => Promise<boolean>;
|
|
205
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
206
|
+
text: string;
|
|
207
|
+
data: import("@agentdomain/sdk").QuoteResult;
|
|
208
|
+
}>;
|
|
209
|
+
} | {
|
|
210
|
+
name: string;
|
|
211
|
+
description: string;
|
|
212
|
+
similes: string[];
|
|
213
|
+
examples: ({
|
|
214
|
+
user: string;
|
|
215
|
+
content: {
|
|
216
|
+
text: string;
|
|
217
|
+
action?: undefined;
|
|
218
|
+
};
|
|
219
|
+
} | {
|
|
220
|
+
user: string;
|
|
221
|
+
content: {
|
|
222
|
+
text: string;
|
|
223
|
+
action: string;
|
|
224
|
+
};
|
|
225
|
+
})[][];
|
|
226
|
+
validate: (runtime: IAgentRuntime, _message?: Memory) => Promise<boolean>;
|
|
227
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
228
|
+
text: string;
|
|
229
|
+
data: import("@agentdomain/shared").RegistrationResult;
|
|
230
|
+
}>;
|
|
231
|
+
} | {
|
|
232
|
+
name: string;
|
|
233
|
+
description: string;
|
|
234
|
+
similes: string[];
|
|
235
|
+
examples: never[];
|
|
236
|
+
validate: () => Promise<boolean>;
|
|
237
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
238
|
+
text: string;
|
|
239
|
+
data: {
|
|
240
|
+
items: import("@agentdomain/sdk").AgentRow[];
|
|
241
|
+
total: number;
|
|
242
|
+
};
|
|
243
|
+
}>;
|
|
244
|
+
} | {
|
|
245
|
+
name: string;
|
|
246
|
+
description: string;
|
|
247
|
+
similes: string[];
|
|
248
|
+
examples: never[];
|
|
249
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
250
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
251
|
+
text: string;
|
|
252
|
+
data: import("@agentdomain/sdk").EmailListResult;
|
|
253
|
+
}>;
|
|
254
|
+
} | {
|
|
255
|
+
name: string;
|
|
256
|
+
description: string;
|
|
257
|
+
similes: string[];
|
|
258
|
+
examples: never[];
|
|
259
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
260
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
261
|
+
text: string;
|
|
262
|
+
data: import("@agentdomain/sdk").EmailResult;
|
|
263
|
+
}>;
|
|
264
|
+
} | {
|
|
265
|
+
name: string;
|
|
266
|
+
description: string;
|
|
267
|
+
similes: string[];
|
|
268
|
+
examples: never[];
|
|
269
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
270
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
271
|
+
text: string;
|
|
272
|
+
data: import("@agentdomain/sdk").RenewalStatus;
|
|
273
|
+
}>;
|
|
274
|
+
} | {
|
|
275
|
+
name: string;
|
|
276
|
+
description: string;
|
|
277
|
+
similes: string[];
|
|
278
|
+
examples: never[];
|
|
279
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
280
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
281
|
+
text: string;
|
|
282
|
+
data: import("@agentdomain/sdk").AutoRenewResult;
|
|
283
|
+
}>;
|
|
284
|
+
} | {
|
|
285
|
+
name: string;
|
|
286
|
+
description: string;
|
|
287
|
+
similes: string[];
|
|
288
|
+
examples: never[];
|
|
289
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
290
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
291
|
+
text: string;
|
|
292
|
+
data: import("@agentdomain/sdk").SslReconfigureResult;
|
|
293
|
+
}>;
|
|
294
|
+
} | {
|
|
295
|
+
name: string;
|
|
296
|
+
description: string;
|
|
297
|
+
similes: string[];
|
|
298
|
+
examples: never[];
|
|
299
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
300
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
301
|
+
text: string;
|
|
302
|
+
data: import("@agentdomain/shared").DnsRecord[];
|
|
303
|
+
}>;
|
|
304
|
+
} | {
|
|
305
|
+
name: string;
|
|
306
|
+
description: string;
|
|
307
|
+
similes: string[];
|
|
308
|
+
examples: never[];
|
|
309
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
310
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
311
|
+
text: string;
|
|
312
|
+
data: import("@agentdomain/shared").DnsRecord;
|
|
313
|
+
}>;
|
|
314
|
+
} | {
|
|
315
|
+
name: string;
|
|
316
|
+
description: string;
|
|
317
|
+
similes: string[];
|
|
318
|
+
examples: never[];
|
|
319
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
320
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
321
|
+
text: string;
|
|
322
|
+
data: {
|
|
323
|
+
success: boolean;
|
|
324
|
+
};
|
|
325
|
+
}>;
|
|
326
|
+
} | {
|
|
327
|
+
name: string;
|
|
328
|
+
description: string;
|
|
329
|
+
similes: string[];
|
|
330
|
+
examples: never[];
|
|
331
|
+
validate: (runtime: IAgentRuntime) => Promise<boolean>;
|
|
332
|
+
handler: (runtime: IAgentRuntime, message: Memory) => Promise<{
|
|
333
|
+
text: string;
|
|
334
|
+
data: import("@agentdomain/sdk").ServicePlanStatusResult;
|
|
335
|
+
}>;
|
|
336
|
+
})[];
|
|
337
|
+
evaluators: never[];
|
|
338
|
+
providers: never[];
|
|
339
|
+
};
|
|
340
|
+
export default agentDomainPlugin;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { AgentDomain } from '@agentdomain/sdk';
|
|
2
|
+
import { AGENTDOMAIN_API_BASE_URL, SUPPORTED_TLDS } from '@agentdomain/shared/constants';
|
|
3
|
+
import { createPublicClient, createWalletClient, http, } from 'viem';
|
|
4
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
5
|
+
import { base, baseSepolia } from 'viem/chains';
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
function getClients(runtime, opts = {}) {
|
|
8
|
+
const apiUrl = runtime.getSetting('AGENTDOMAIN_API_URL') ?? AGENTDOMAIN_API_BASE_URL;
|
|
9
|
+
const apiKey = runtime.getSetting('AGENTDOMAIN_API_KEY');
|
|
10
|
+
const pk = runtime.getSetting('AGENT_PRIVATE_KEY');
|
|
11
|
+
const rpc = runtime.getSetting('BASE_RPC_URL') ?? 'https://mainnet.base.org';
|
|
12
|
+
const network = runtime.getSetting('AGENTDOMAIN_NETWORK') ?? 'base';
|
|
13
|
+
const chain = network === 'base-sepolia' ? baseSepolia : base;
|
|
14
|
+
if (!pk) {
|
|
15
|
+
if (opts.requireWallet)
|
|
16
|
+
throw new Error('AGENT_PRIVATE_KEY not set');
|
|
17
|
+
const ad = new AgentDomain({ apiUrl, apiKey, network });
|
|
18
|
+
return { ad, account: null, walletClient: null, publicClient: null, network, chain, rpc };
|
|
19
|
+
}
|
|
20
|
+
const account = privateKeyToAccount(pk);
|
|
21
|
+
const walletClient = createWalletClient({ account, chain, transport: http(rpc) });
|
|
22
|
+
const publicClient = createPublicClient({ chain, transport: http(rpc) });
|
|
23
|
+
const ad = new AgentDomain({
|
|
24
|
+
apiUrl,
|
|
25
|
+
apiKey,
|
|
26
|
+
network,
|
|
27
|
+
walletClient: walletClient,
|
|
28
|
+
publicClient: publicClient,
|
|
29
|
+
});
|
|
30
|
+
return { ad, account, walletClient, publicClient, network, chain, rpc };
|
|
31
|
+
}
|
|
32
|
+
const TLD_PATTERN = new RegExp(String.raw `([a-z0-9-]{3,63})\.([a-z]{2,20})\b`, 'i');
|
|
33
|
+
const UUID_PATTERN = /[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i;
|
|
34
|
+
const AMOUNT_PATTERN = /\$?\s*(\d+(?:\.\d{1,6})?)\s*(?:usdc)?/i;
|
|
35
|
+
const EMAIL_PATTERN = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/i;
|
|
36
|
+
const registerSchema = z.object({
|
|
37
|
+
preferredName: z.string(),
|
|
38
|
+
tld: z.enum(SUPPORTED_TLDS).default('xyz'),
|
|
39
|
+
registerBasename: z.boolean().default(true),
|
|
40
|
+
registerEns: z.boolean().default(false),
|
|
41
|
+
emailEnabled: z.boolean().default(false),
|
|
42
|
+
years: z.number().int().min(1).max(10).default(1),
|
|
43
|
+
autoRenew: z.boolean().default(false),
|
|
44
|
+
});
|
|
45
|
+
const dnsRecordSchema = z.object({
|
|
46
|
+
type: z.enum(['A', 'AAAA', 'ALIAS', 'CNAME', 'MX', 'TXT', 'NS', 'SRV']),
|
|
47
|
+
name: z.string(),
|
|
48
|
+
value: z.string(),
|
|
49
|
+
ttl: z.number().int().min(60).max(3600).default(3600),
|
|
50
|
+
priority: z.number().int().min(0).optional(),
|
|
51
|
+
});
|
|
52
|
+
function parseParamsFromText(text) {
|
|
53
|
+
const m = text.match(TLD_PATTERN);
|
|
54
|
+
const lower = text.toLowerCase();
|
|
55
|
+
const yearsMatch = lower.match(/([1-9]|10)\s*years?/);
|
|
56
|
+
const noBasename = lower.includes('no basename') ||
|
|
57
|
+
lower.includes('without basename') ||
|
|
58
|
+
lower.includes('skip basename');
|
|
59
|
+
const noEns = lower.includes('no ens') || lower.includes('without ens') || lower.includes('skip ens');
|
|
60
|
+
const noEmail = lower.includes('no email') ||
|
|
61
|
+
lower.includes('without email') ||
|
|
62
|
+
lower.includes('skip email') ||
|
|
63
|
+
lower.includes('no inbox');
|
|
64
|
+
const wantsEns = /\bens\b/.test(lower);
|
|
65
|
+
return {
|
|
66
|
+
preferredName: m?.[1]?.toLowerCase() ?? 'agent',
|
|
67
|
+
tld: m?.[2]?.toLowerCase() ?? 'xyz',
|
|
68
|
+
registerBasename: !noBasename,
|
|
69
|
+
registerEns: wantsEns && !noEns,
|
|
70
|
+
emailEnabled: (lower.includes('email') || lower.includes('inbox')) && !noEmail,
|
|
71
|
+
years: yearsMatch ? parseInt(yearsMatch[1], 10) : 1,
|
|
72
|
+
autoRenew: lower.includes('auto renew') || lower.includes('auto-renew') || lower.includes('autorenew'),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function requireAgentId(text) {
|
|
76
|
+
const agentId = text.match(UUID_PATTERN)?.[0];
|
|
77
|
+
if (!agentId)
|
|
78
|
+
throw new Error('Agent ID UUID is required');
|
|
79
|
+
return agentId;
|
|
80
|
+
}
|
|
81
|
+
function parseAmountUsdc(text) {
|
|
82
|
+
const amount = text.match(AMOUNT_PATTERN)?.[1];
|
|
83
|
+
if (!amount)
|
|
84
|
+
throw new Error('USDC amount is required');
|
|
85
|
+
return amount;
|
|
86
|
+
}
|
|
87
|
+
function parsePlan(text) {
|
|
88
|
+
const lower = text.toLowerCase();
|
|
89
|
+
const plan = lower.includes('enterprise') ? 'enterprise' : 'pro';
|
|
90
|
+
const interval = lower.includes('year') || lower.includes('annual') ? 'yearly' : 'monthly';
|
|
91
|
+
return { plan, interval };
|
|
92
|
+
}
|
|
93
|
+
function parsePrepayPeriods(text) {
|
|
94
|
+
const match = text.match(/\bprepay\s+([1-9]|1[0-2])\s*(?:periods?|months?|years?)?/i);
|
|
95
|
+
return match ? Number(match[1]) : 1;
|
|
96
|
+
}
|
|
97
|
+
function parseDnsRecord(text) {
|
|
98
|
+
const lower = text.toLowerCase();
|
|
99
|
+
const typeMatch = text.match(/\b(A|AAAA|ALIAS|CNAME|MX|TXT|NS|SRV)\b/i);
|
|
100
|
+
const nameMatch = text.match(/\bname[:=]\s*([^\s]+)/i);
|
|
101
|
+
const valueMatch = text.match(/\bvalue[:=]\s*([^\s]+)/i);
|
|
102
|
+
const ttlMatch = text.match(/\bttl[:=]\s*(\d+)/i);
|
|
103
|
+
const priorityMatch = text.match(/\bpriority[:=]\s*(\d+)/i);
|
|
104
|
+
const parsed = dnsRecordSchema.parse({
|
|
105
|
+
type: typeMatch?.[1]?.toUpperCase() ?? (lower.includes('txt') ? 'TXT' : 'A'),
|
|
106
|
+
name: nameMatch?.[1] ?? '@',
|
|
107
|
+
value: valueMatch?.[1] ?? text.match(/\b(?:\d{1,3}\.){3}\d{1,3}\b/)?.[0] ?? '',
|
|
108
|
+
ttl: ttlMatch ? Number(ttlMatch[1]) : 3600,
|
|
109
|
+
priority: priorityMatch ? Number(priorityMatch[1]) : undefined,
|
|
110
|
+
});
|
|
111
|
+
return parsed;
|
|
112
|
+
}
|
|
113
|
+
function parseEmailRequest(text) {
|
|
114
|
+
const to = text.match(EMAIL_PATTERN)?.[0];
|
|
115
|
+
if (!to)
|
|
116
|
+
throw new Error('Recipient email address is required');
|
|
117
|
+
const subject = text.match(/\bsubject[:=]\s*([^|]+)/i)?.[1]?.trim() ?? 'AgentDomain message';
|
|
118
|
+
const body = text.match(/\b(?:text|body|message)[:=]\s*([\s\S]+)/i)?.[1]?.trim() ??
|
|
119
|
+
text.replace(to, '').trim();
|
|
120
|
+
return { to, subject, text: body || 'Hello from AgentDomain.' };
|
|
121
|
+
}
|
|
122
|
+
export const quoteRegistrationAction = {
|
|
123
|
+
name: 'QUOTE_AGENT_REGISTRATION',
|
|
124
|
+
description: 'Quote an AgentDomain registration before paying.',
|
|
125
|
+
similes: ['PRICE_DOMAIN', 'REGISTRATION_QUOTE', 'QUOTE_IDENTITY'],
|
|
126
|
+
examples: [],
|
|
127
|
+
validate: async () => true,
|
|
128
|
+
handler: async (runtime, message) => {
|
|
129
|
+
const params = parseParamsFromText(message.content.text);
|
|
130
|
+
const { ad } = getClients(runtime);
|
|
131
|
+
const quote = await ad.quote(params);
|
|
132
|
+
return {
|
|
133
|
+
text: `Total: $${quote.totalUsdc} USDC for ${quote.domain}. Domain $${quote.domainCostUsdc}, SSL $${quote.sslCertificationFeeUsdc}, service $${quote.serviceFeeUsdc}.`,
|
|
134
|
+
data: quote,
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
export const registerIdentityAction = {
|
|
139
|
+
name: 'REGISTER_IDENTITY',
|
|
140
|
+
description: 'Register a complete agent identity bundle on AgentDomain. Domain, DNS, SSL certification, and service fee are mandatory. Users can say "no basename" to skip Basename, "with ENS" to add ENS, and "with email" to add email.',
|
|
141
|
+
similes: ['CLAIM_DOMAIN', 'CREATE_IDENTITY', 'GET_DOMAIN'],
|
|
142
|
+
examples: [
|
|
143
|
+
[
|
|
144
|
+
{ user: 'user1', content: { text: 'Register me as helpful-bot.ai with email' } },
|
|
145
|
+
{
|
|
146
|
+
user: 'agent',
|
|
147
|
+
content: {
|
|
148
|
+
text: "I'll register helpful-bot.ai with email infrastructure now.",
|
|
149
|
+
action: 'REGISTER_IDENTITY',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
],
|
|
154
|
+
validate: async (runtime, _message) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY')),
|
|
155
|
+
handler: async (runtime, message) => {
|
|
156
|
+
const params = parseParamsFromText(message.content.text);
|
|
157
|
+
const validated = registerSchema.parse(params);
|
|
158
|
+
const { ad, account, walletClient, chain } = getClients(runtime, { requireWallet: true });
|
|
159
|
+
if (!account || !walletClient)
|
|
160
|
+
throw new Error('AGENT_PRIVATE_KEY not set');
|
|
161
|
+
const result = await ad.register({
|
|
162
|
+
...validated,
|
|
163
|
+
wallet: account.address,
|
|
164
|
+
});
|
|
165
|
+
let autoRenewMsg = '';
|
|
166
|
+
if (validated.autoRenew) {
|
|
167
|
+
const vaultAddress = runtime.getSetting('RENEWAL_VAULT_ADDRESS');
|
|
168
|
+
if (vaultAddress) {
|
|
169
|
+
try {
|
|
170
|
+
const txHash = await walletClient.writeContract({
|
|
171
|
+
address: vaultAddress,
|
|
172
|
+
abi: [
|
|
173
|
+
{
|
|
174
|
+
type: 'function',
|
|
175
|
+
name: 'setAutoRenew',
|
|
176
|
+
inputs: [
|
|
177
|
+
{ name: 'tokenId', type: 'uint256' },
|
|
178
|
+
{ name: 'enabled', type: 'bool' },
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
functionName: 'setAutoRenew',
|
|
183
|
+
args: [BigInt(result.nftTokenId), true],
|
|
184
|
+
chain,
|
|
185
|
+
account,
|
|
186
|
+
});
|
|
187
|
+
autoRenewMsg = ` Auto-renew enabled via tx ${txHash}.`;
|
|
188
|
+
}
|
|
189
|
+
catch (e) {
|
|
190
|
+
autoRenewMsg = ` Failed to enable auto-renew automatically: ${String(e)}`;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
autoRenewMsg = ' (Requires RENEWAL_VAULT_ADDRESS env var to enable auto-renew on-chain).';
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
text: `Registered ${result.domain}${result.basename ? ` and ${result.basename}` : ''}. Token #${result.nftTokenId}.${autoRenewMsg}`,
|
|
199
|
+
data: result,
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
export const searchAgentsAction = {
|
|
204
|
+
name: 'SEARCH_AGENTS',
|
|
205
|
+
description: 'Search the public AgentDomain registry by name, capability, or framework.',
|
|
206
|
+
similes: ['FIND_AGENT', 'DISCOVER_AGENT'],
|
|
207
|
+
examples: [],
|
|
208
|
+
validate: async () => true,
|
|
209
|
+
handler: async (runtime, message) => {
|
|
210
|
+
const { ad } = getClients(runtime);
|
|
211
|
+
const q = message.content.text;
|
|
212
|
+
const result = await ad.search({ q, limit: 10 });
|
|
213
|
+
return {
|
|
214
|
+
text: `Found ${result.items.length} agents.`,
|
|
215
|
+
data: result,
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
export const listEmailAction = {
|
|
220
|
+
name: 'LIST_AGENT_EMAIL',
|
|
221
|
+
description: 'List text-only email messages and extracted verification codes for an AgentDomain identity.',
|
|
222
|
+
similes: ['CHECK_EMAIL', 'READ_INBOX'],
|
|
223
|
+
examples: [],
|
|
224
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY')),
|
|
225
|
+
handler: async (runtime, message) => {
|
|
226
|
+
const { ad } = getClients(runtime);
|
|
227
|
+
const agentId = message.content.text.match(/[0-9a-f-]{36}/i)?.[0];
|
|
228
|
+
if (!agentId)
|
|
229
|
+
throw new Error('Agent ID UUID is required to list email');
|
|
230
|
+
const result = await ad.listEmail(agentId, { limit: 20 });
|
|
231
|
+
return { text: `Found ${result.messages.length} messages.`, data: result };
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
export const sendEmailAction = {
|
|
235
|
+
name: 'SEND_AGENT_EMAIL',
|
|
236
|
+
description: 'Send text-only email from an AgentDomain identity.',
|
|
237
|
+
similes: ['SEND_EMAIL', 'EMAIL_FROM_AGENT'],
|
|
238
|
+
examples: [],
|
|
239
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
240
|
+
handler: async (runtime, message) => {
|
|
241
|
+
const { ad } = getClients(runtime);
|
|
242
|
+
const agentId = requireAgentId(message.content.text);
|
|
243
|
+
const payload = parseEmailRequest(message.content.text);
|
|
244
|
+
const result = await ad.sendEmail(agentId, payload);
|
|
245
|
+
return { text: `Email sent: ${result.id}.`, data: result };
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
export const renewalStatusAction = {
|
|
249
|
+
name: 'GET_RENEWAL_STATUS',
|
|
250
|
+
description: 'Get RenewalVault balance, shortfall, renewal amount, and auto-renew state.',
|
|
251
|
+
similes: ['RENEWAL_STATUS', 'CHECK_RENEWAL', 'VAULT_STATUS'],
|
|
252
|
+
examples: [],
|
|
253
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
254
|
+
handler: async (runtime, message) => {
|
|
255
|
+
const { ad } = getClients(runtime);
|
|
256
|
+
const agentId = requireAgentId(message.content.text);
|
|
257
|
+
const status = await ad.getRenewalStatus(agentId);
|
|
258
|
+
return {
|
|
259
|
+
text: `Renewal for ${status.domain}: next $${status.nextRenewalAmountUsdc}, balance $${status.vaultBalanceUsdc}, shortfall $${status.shortfallUsdc}, auto-renew ${status.autoRenewEnabled ? 'enabled' : 'off'}.`,
|
|
260
|
+
data: status,
|
|
261
|
+
};
|
|
262
|
+
},
|
|
263
|
+
};
|
|
264
|
+
export const fundRenewalAction = {
|
|
265
|
+
name: 'FUND_RENEWAL_VAULT',
|
|
266
|
+
description: 'Deposit USDC into an AgentID renewal vault.',
|
|
267
|
+
similes: ['DEPOSIT_RENEWAL', 'FUND_VAULT'],
|
|
268
|
+
examples: [],
|
|
269
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY')),
|
|
270
|
+
handler: async (runtime, message) => {
|
|
271
|
+
const { ad } = getClients(runtime, { requireWallet: true });
|
|
272
|
+
const agentId = requireAgentId(message.content.text);
|
|
273
|
+
const amountUsdc = parseAmountUsdc(message.content.text);
|
|
274
|
+
const result = await ad.fundRenewalVault(agentId, amountUsdc);
|
|
275
|
+
return {
|
|
276
|
+
text: `Deposited $${amountUsdc} USDC into renewal vault for ${result.domain}.`,
|
|
277
|
+
data: result,
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
export const enableAutoRenewAction = {
|
|
282
|
+
name: 'ENABLE_AUTO_RENEW',
|
|
283
|
+
description: 'Enable on-chain RenewalVault auto-renew for an AgentDomain identity.',
|
|
284
|
+
similes: ['AUTO_RENEW', 'ENABLE_RENEWAL'],
|
|
285
|
+
examples: [],
|
|
286
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') && runtime.getSetting('RENEWAL_VAULT_ADDRESS')),
|
|
287
|
+
handler: async (runtime, message) => {
|
|
288
|
+
const { ad } = getClients(runtime, { requireWallet: true });
|
|
289
|
+
const agentId = requireAgentId(message.content.text);
|
|
290
|
+
const result = await ad.setAutoRenew(agentId, true, {
|
|
291
|
+
renewalVaultAddress: runtime.getSetting('RENEWAL_VAULT_ADDRESS'),
|
|
292
|
+
});
|
|
293
|
+
return { text: `Auto-renew enabled for token #${result.tokenId}.`, data: result };
|
|
294
|
+
},
|
|
295
|
+
};
|
|
296
|
+
export const reconfigureSslAction = {
|
|
297
|
+
name: 'RECONFIGURE_SSL',
|
|
298
|
+
description: 'Rebuild the Cloudflare SaaS SSL hostname and sync Spaceship DNS validation records for an AgentDomain identity.',
|
|
299
|
+
similes: ['FIX_SSL', 'REPAIR_SSL', 'SYNC_SSL'],
|
|
300
|
+
examples: [],
|
|
301
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY')),
|
|
302
|
+
handler: async (runtime, message) => {
|
|
303
|
+
const { ad } = getClients(runtime);
|
|
304
|
+
const agentId = message.content.text.match(/[0-9a-f-]{36}/i)?.[0];
|
|
305
|
+
if (!agentId)
|
|
306
|
+
throw new Error('Agent ID UUID is required to reconfigure SSL');
|
|
307
|
+
const result = await ad.reconfigureSsl(agentId);
|
|
308
|
+
return {
|
|
309
|
+
text: `SSL reconfigured for ${result.domain}. Status: ${result.sslStatus}.`,
|
|
310
|
+
data: result,
|
|
311
|
+
};
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
export const listDnsAction = {
|
|
315
|
+
name: 'LIST_DNS_RECORDS',
|
|
316
|
+
description: 'List DNS records for an AgentDomain identity.',
|
|
317
|
+
similes: ['DNS_RECORDS', 'LIST_DNS'],
|
|
318
|
+
examples: [],
|
|
319
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
320
|
+
handler: async (runtime, message) => {
|
|
321
|
+
const { ad } = getClients(runtime);
|
|
322
|
+
const agentId = requireAgentId(message.content.text);
|
|
323
|
+
const records = await ad.listDnsRecords(agentId);
|
|
324
|
+
return { text: `Found ${records.length} DNS records.`, data: records };
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
export const createDnsAction = {
|
|
328
|
+
name: 'CREATE_DNS_RECORD',
|
|
329
|
+
description: 'Create a user-managed DNS record. Use text like: agentId type A name @ value 1.2.3.4.',
|
|
330
|
+
similes: ['ADD_DNS', 'CREATE_DNS'],
|
|
331
|
+
examples: [],
|
|
332
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
333
|
+
handler: async (runtime, message) => {
|
|
334
|
+
const { ad } = getClients(runtime);
|
|
335
|
+
const agentId = requireAgentId(message.content.text);
|
|
336
|
+
const record = parseDnsRecord(message.content.text);
|
|
337
|
+
const result = await ad.createDnsRecord(agentId, record);
|
|
338
|
+
return { text: `Created ${result.type} DNS record ${result.name}.`, data: result };
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
export const updateDnsAction = {
|
|
342
|
+
name: 'UPDATE_DNS_RECORD',
|
|
343
|
+
description: 'Update a user-managed DNS record. Include agent UUID and record UUID.',
|
|
344
|
+
similes: ['EDIT_DNS', 'UPDATE_DNS'],
|
|
345
|
+
examples: [],
|
|
346
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
347
|
+
handler: async (runtime, message) => {
|
|
348
|
+
const { ad } = getClients(runtime);
|
|
349
|
+
const ids = message.content.text.match(new RegExp(UUID_PATTERN.source, 'gi')) ?? [];
|
|
350
|
+
const agentId = ids[0];
|
|
351
|
+
const recordId = ids[1];
|
|
352
|
+
if (!agentId || !recordId)
|
|
353
|
+
throw new Error('Agent ID and record ID UUIDs are required');
|
|
354
|
+
const record = parseDnsRecord(message.content.text);
|
|
355
|
+
const result = await ad.updateDnsRecord(agentId, recordId, record);
|
|
356
|
+
return { text: `Updated ${result.type} DNS record ${result.name}.`, data: result };
|
|
357
|
+
},
|
|
358
|
+
};
|
|
359
|
+
export const deleteDnsAction = {
|
|
360
|
+
name: 'DELETE_DNS_RECORD',
|
|
361
|
+
description: 'Delete a user-managed DNS record. Include agent UUID and record UUID.',
|
|
362
|
+
similes: ['REMOVE_DNS', 'DELETE_DNS'],
|
|
363
|
+
examples: [],
|
|
364
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
365
|
+
handler: async (runtime, message) => {
|
|
366
|
+
const { ad } = getClients(runtime);
|
|
367
|
+
const ids = message.content.text.match(new RegExp(UUID_PATTERN.source, 'gi')) ?? [];
|
|
368
|
+
const agentId = ids[0];
|
|
369
|
+
const recordId = ids[1];
|
|
370
|
+
if (!agentId || !recordId)
|
|
371
|
+
throw new Error('Agent ID and record ID UUIDs are required');
|
|
372
|
+
const result = await ad.deleteDnsRecord(agentId, recordId);
|
|
373
|
+
return { text: `Deleted DNS record ${recordId}.`, data: result };
|
|
374
|
+
},
|
|
375
|
+
};
|
|
376
|
+
export const servicePlanStatusAction = {
|
|
377
|
+
name: 'GET_SERVICE_PLAN',
|
|
378
|
+
description: 'Get an agent service plan, limits, current period, and billing state.',
|
|
379
|
+
similes: ['PLAN_STATUS', 'CHECK_PLAN'],
|
|
380
|
+
examples: [],
|
|
381
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY') || runtime.getSetting('AGENTDOMAIN_API_KEY')),
|
|
382
|
+
handler: async (runtime, message) => {
|
|
383
|
+
const { ad } = getClients(runtime);
|
|
384
|
+
const agentId = requireAgentId(message.content.text);
|
|
385
|
+
const result = await ad.getServicePlan(agentId);
|
|
386
|
+
return {
|
|
387
|
+
text: `${result.domain} is on ${result.entitlement.plan}. Email limit ${result.entitlement.limits.emailPerHour}/hour, DNS limit ${result.entitlement.limits.dnsRecords}.`,
|
|
388
|
+
data: result,
|
|
389
|
+
};
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
export const purchaseServicePlanAction = {
|
|
393
|
+
name: 'PURCHASE_SERVICE_PLAN',
|
|
394
|
+
description: 'Upgrade an agent to AgentDomain Pro or Enterprise using x402 USDC.',
|
|
395
|
+
similes: ['BUY_PLAN', 'UPGRADE_PLAN'],
|
|
396
|
+
examples: [],
|
|
397
|
+
validate: async (runtime) => Boolean(runtime.getSetting('AGENT_PRIVATE_KEY')),
|
|
398
|
+
handler: async (runtime, message) => {
|
|
399
|
+
const { ad } = getClients(runtime, { requireWallet: true });
|
|
400
|
+
const agentId = requireAgentId(message.content.text);
|
|
401
|
+
const plan = parsePlan(message.content.text);
|
|
402
|
+
const result = await ad.purchaseServicePlan({
|
|
403
|
+
agentId,
|
|
404
|
+
...plan,
|
|
405
|
+
autoRenew: message.content.text.toLowerCase().includes('auto'),
|
|
406
|
+
prepayPeriods: parsePrepayPeriods(message.content.text),
|
|
407
|
+
});
|
|
408
|
+
return {
|
|
409
|
+
text: `Purchased ${result.entitlement.plan} ${plan.interval} for ${result.domain}.`,
|
|
410
|
+
data: result,
|
|
411
|
+
};
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
export const agentDomainPlugin = {
|
|
415
|
+
name: 'agentdomain',
|
|
416
|
+
description: 'Identity infrastructure for AI agents on Base (domain + Basename + DNS + email + SSL).',
|
|
417
|
+
actions: [
|
|
418
|
+
quoteRegistrationAction,
|
|
419
|
+
registerIdentityAction,
|
|
420
|
+
searchAgentsAction,
|
|
421
|
+
sendEmailAction,
|
|
422
|
+
listEmailAction,
|
|
423
|
+
renewalStatusAction,
|
|
424
|
+
fundRenewalAction,
|
|
425
|
+
enableAutoRenewAction,
|
|
426
|
+
reconfigureSslAction,
|
|
427
|
+
listDnsAction,
|
|
428
|
+
createDnsAction,
|
|
429
|
+
updateDnsAction,
|
|
430
|
+
deleteDnsAction,
|
|
431
|
+
servicePlanStatusAction,
|
|
432
|
+
purchaseServicePlanAction,
|
|
433
|
+
],
|
|
434
|
+
evaluators: [],
|
|
435
|
+
providers: [],
|
|
436
|
+
};
|
|
437
|
+
export default agentDomainPlugin;
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agentdomain/eliza-plugin",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ElizaOS plugin for AgentDomain - give your Eliza agent a complete identity stack",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md",
|
|
18
|
+
"package.json"
|
|
19
|
+
],
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"prepublishOnly": "pnpm run build",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"lint": "echo \"no lint\""
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@agentdomain/sdk": "workspace:^",
|
|
31
|
+
"@agentdomain/shared": "workspace:^",
|
|
32
|
+
"viem": "^2.21.55",
|
|
33
|
+
"zod": "^3.24.1"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@elizaos/core": "^1.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^5.7.2"
|
|
40
|
+
}
|
|
41
|
+
}
|