@agentdomain/agentkit-plugin 0.1.0 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Md. Rakib
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -10,10 +10,10 @@ The provider exposes actions for:
10
10
 
11
11
  - Agent identity registration and quote
12
12
  - Registry search
13
- - Email send/list
13
+ - Email send/list, primary address update, and Pro/Enterprise aliases
14
14
  - DNS list/create/update/delete
15
15
  - SSL reconfiguration
16
16
  - RenewalVault status, funding, auto-renew, and withdrawal
17
- - Per-agent Pro and Enterprise service plans
17
+ - Per-agent Pro and Enterprise Premium Plans
18
18
 
19
19
  Default API base: `https://agentdomain.app/api/v1`.
package/dist/index.d.ts CHANGED
@@ -7,8 +7,9 @@ declare const QuoteSchema: z.ZodObject<{
7
7
  registerEns: z.ZodDefault<z.ZodBoolean>;
8
8
  ensLabel: z.ZodOptional<z.ZodString>;
9
9
  emailEnabled: z.ZodDefault<z.ZodBoolean>;
10
+ emailUsername: z.ZodOptional<z.ZodString>;
10
11
  years: z.ZodDefault<z.ZodNumber>;
11
- discountCode: z.ZodOptional<z.ZodString>;
12
+ premiumPlan: z.ZodDefault<z.ZodEnum<["included", "pro", "enterprise"]>>;
12
13
  }, "strip", z.ZodTypeAny, {
13
14
  preferredName: string;
14
15
  tld: "xyz" | "com" | "ai" | "org" | "io" | "net" | "co" | "app";
@@ -16,9 +17,10 @@ declare const QuoteSchema: z.ZodObject<{
16
17
  registerEns: boolean;
17
18
  emailEnabled: boolean;
18
19
  years: number;
20
+ premiumPlan: "included" | "pro" | "enterprise";
19
21
  basenameLabel?: string | undefined;
20
22
  ensLabel?: string | undefined;
21
- discountCode?: string | undefined;
23
+ emailUsername?: string | undefined;
22
24
  }, {
23
25
  preferredName: string;
24
26
  tld?: "xyz" | "com" | "ai" | "org" | "io" | "net" | "co" | "app" | undefined;
@@ -27,8 +29,9 @@ declare const QuoteSchema: z.ZodObject<{
27
29
  registerEns?: boolean | undefined;
28
30
  ensLabel?: string | undefined;
29
31
  emailEnabled?: boolean | undefined;
32
+ emailUsername?: string | undefined;
30
33
  years?: number | undefined;
31
- discountCode?: string | undefined;
34
+ premiumPlan?: "included" | "pro" | "enterprise" | undefined;
32
35
  }>;
33
36
  declare const SearchSchema: z.ZodObject<{
34
37
  q: z.ZodOptional<z.ZodString>;
@@ -86,8 +89,9 @@ export declare class AgentDomainActionProvider {
86
89
  registerEns: z.ZodDefault<z.ZodBoolean>;
87
90
  ensLabel: z.ZodOptional<z.ZodString>;
88
91
  emailEnabled: z.ZodDefault<z.ZodBoolean>;
92
+ emailUsername: z.ZodOptional<z.ZodString>;
89
93
  years: z.ZodDefault<z.ZodNumber>;
90
- discountCode: z.ZodOptional<z.ZodString>;
94
+ premiumPlan: z.ZodDefault<z.ZodEnum<["included", "pro", "enterprise"]>>;
91
95
  }, "strip", z.ZodTypeAny, {
92
96
  preferredName: string;
93
97
  tld: "xyz" | "com" | "ai" | "org" | "io" | "net" | "co" | "app";
@@ -95,9 +99,10 @@ export declare class AgentDomainActionProvider {
95
99
  registerEns: boolean;
96
100
  emailEnabled: boolean;
97
101
  years: number;
102
+ premiumPlan: "included" | "pro" | "enterprise";
98
103
  basenameLabel?: string | undefined;
99
104
  ensLabel?: string | undefined;
100
- discountCode?: string | undefined;
105
+ emailUsername?: string | undefined;
101
106
  }, {
102
107
  preferredName: string;
103
108
  tld?: "xyz" | "com" | "ai" | "org" | "io" | "net" | "co" | "app" | undefined;
@@ -106,8 +111,9 @@ export declare class AgentDomainActionProvider {
106
111
  registerEns?: boolean | undefined;
107
112
  ensLabel?: string | undefined;
108
113
  emailEnabled?: boolean | undefined;
114
+ emailUsername?: string | undefined;
109
115
  years?: number | undefined;
110
- discountCode?: string | undefined;
116
+ premiumPlan?: "included" | "pro" | "enterprise" | undefined;
111
117
  }>;
112
118
  invoke: (walletProvider: WalletProvider, args: z.infer<typeof QuoteSchema>) => Promise<string>;
113
119
  } | {
@@ -154,9 +160,13 @@ export declare class AgentDomainActionProvider {
154
160
  private withdrawRenewal;
155
161
  private getServicePlan;
156
162
  private purchaseServicePlan;
163
+ private setRegistryVisibility;
157
164
  private quote;
158
165
  private search;
159
166
  private sendEmail;
160
167
  private listEmail;
168
+ private updatePrimaryEmail;
169
+ private createEmailAlias;
170
+ private deleteEmailAlias;
161
171
  }
162
172
  export default AgentDomainActionProvider;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { AgentDomain } from '@agentdomain/sdk';
3
- import { AGENTDOMAIN_API_BASE_URL, SUPPORTED_FRAMEWORKS, SUPPORTED_TLDS, } from '@agentdomain/shared/constants';
3
+ import { AGENTDOMAIN_API_BASE_URL, SERVICE_PLAN_KEYS, SUPPORTED_FRAMEWORKS, SUPPORTED_TLDS, } from '@agentdomain/shared/constants';
4
4
  import { createPublicClient, createWalletClient, http, encodeFunctionData, } from 'viem';
5
5
  import { base, baseSepolia } from 'viem/chains';
6
6
  const RegisterSchema = z.object({
@@ -14,11 +14,17 @@ const RegisterSchema = z.object({
14
14
  .string()
15
15
  .regex(/^0x[a-fA-F0-9]{40}$/)
16
16
  .optional(),
17
- emailEnabled: z.boolean().default(false),
17
+ emailEnabled: z.boolean().default(true),
18
+ emailUsername: z
19
+ .string()
20
+ .trim()
21
+ .toLowerCase()
22
+ .regex(/^[a-z0-9](?:[a-z0-9._+-]{0,62}[a-z0-9])?$/)
23
+ .optional(),
18
24
  dnsTarget: z.string().url().optional(),
19
25
  years: z.number().int().min(1).max(10).default(1),
20
26
  autoRenew: z.boolean().default(false),
21
- discountCode: z.string().max(50).optional(),
27
+ premiumPlan: z.enum(SERVICE_PLAN_KEYS).default('included'),
22
28
  });
23
29
  const QuoteSchema = z.object({
24
30
  preferredName: z.string(),
@@ -27,9 +33,15 @@ const QuoteSchema = z.object({
27
33
  basenameLabel: z.string().min(3).max(63).optional(),
28
34
  registerEns: z.boolean().default(false),
29
35
  ensLabel: z.string().min(3).max(63).optional(),
30
- emailEnabled: z.boolean().default(false),
36
+ emailEnabled: z.boolean().default(true),
37
+ emailUsername: z
38
+ .string()
39
+ .trim()
40
+ .toLowerCase()
41
+ .regex(/^[a-z0-9](?:[a-z0-9._+-]{0,62}[a-z0-9])?$/)
42
+ .optional(),
31
43
  years: z.number().int().min(1).max(10).default(1),
32
- discountCode: z.string().max(50).optional(),
44
+ premiumPlan: z.enum(SERVICE_PLAN_KEYS).default('included'),
33
45
  });
34
46
  const SearchSchema = z.object({
35
47
  q: z.string().optional(),
@@ -42,6 +54,7 @@ const SendEmailSchema = z.object({
42
54
  to: z.union([z.string().email(), z.array(z.string().email()).min(1).max(10)]),
43
55
  subject: z.string().min(1).max(200),
44
56
  text: z.string().min(1).max(20_000),
57
+ fromAddress: z.string().email().optional(),
45
58
  });
46
59
  const ListEmailSchema = z.object({
47
60
  agentId: z.string(),
@@ -91,9 +104,23 @@ const ServicePlanStatusSchema = z.object({
91
104
  const PurchaseServicePlanSchema = z.object({
92
105
  agentId: z.string().min(1),
93
106
  plan: z.enum(['pro', 'enterprise']),
94
- interval: z.enum(['monthly', 'yearly']),
95
- autoRenew: z.boolean().default(false),
96
- prepayPeriods: z.number().int().min(1).max(12).default(1),
107
+ });
108
+ const SetRegistryVisibilitySchema = z.object({
109
+ agentId: z.string().min(1),
110
+ registryHidden: z.boolean(),
111
+ });
112
+ const UpdatePrimaryEmailSchema = z.object({
113
+ agentId: z.string().min(1),
114
+ username: z
115
+ .string()
116
+ .trim()
117
+ .toLowerCase()
118
+ .regex(/^[a-z0-9](?:[a-z0-9._+-]{0,62}[a-z0-9])?$/),
119
+ });
120
+ const CreateEmailAliasSchema = UpdatePrimaryEmailSchema;
121
+ const DeleteEmailAliasSchema = z.object({
122
+ agentId: z.string().min(1),
123
+ emailAddress: z.string().email(),
97
124
  });
98
125
  export class AgentDomainActionProvider {
99
126
  name = 'agentdomain';
@@ -138,13 +165,13 @@ export class AgentDomainActionProvider {
138
165
  return [
139
166
  {
140
167
  name: 'register_agent_identity',
141
- description: 'Register a complete agent identity bundle on AgentDomain. Domain, DNS, SSL certification, and service fee are mandatory. Set registerBasename/registerEns/emailEnabled false to skip those optional costs. Pays in USDC on Base.',
168
+ description: 'Register a complete agent identity bundle on AgentDomain. Domain, DNS, included email setup, SSL certification, AgentID NFT orchestration, and platform fee are included by default. Basename and ENS are optional paid add-ons. Pays in USDC on Base.',
142
169
  schema: RegisterSchema,
143
170
  invoke: this.register.bind(this),
144
171
  },
145
172
  {
146
173
  name: 'quote_agent_registration',
147
- description: 'Price an agent identity registration before committing. Quote includes mandatory SSL certification fee; optional Basename, ENS, and email only charge when enabled.',
174
+ description: 'Price an agent identity registration before committing. Quote includes the annual platform fee with email setup, SSL certification, and AgentID NFT orchestration; Basename and ENS only charge when enabled.',
148
175
  schema: QuoteSchema,
149
176
  invoke: this.quote.bind(this),
150
177
  },
@@ -156,7 +183,7 @@ export class AgentDomainActionProvider {
156
183
  },
157
184
  {
158
185
  name: 'send_agent_email',
159
- description: 'Send text-only email from an email-enabled agent via AWS SES.',
186
+ description: 'Send text-only email from an agent primary email or active alias via AWS SES.',
160
187
  schema: SendEmailSchema,
161
188
  invoke: this.sendEmail.bind(this),
162
189
  },
@@ -222,21 +249,45 @@ export class AgentDomainActionProvider {
222
249
  },
223
250
  {
224
251
  name: 'get_service_plan',
225
- description: 'Get the current per-agent service plan, limits, and billing state.',
252
+ description: 'Get the current per-agent Premium Plan, limits, and billing state.',
226
253
  schema: ServicePlanStatusSchema,
227
254
  invoke: this.getServicePlan.bind(this),
228
255
  },
229
256
  {
230
257
  name: 'purchase_service_plan',
231
- description: 'Upgrade one agent to AgentDomain Pro or Enterprise using x402 USDC payment.',
258
+ description: 'Upgrade one agent to an AgentDomain Pro or Enterprise Premium Plan using x402 USDC payment.',
232
259
  schema: PurchaseServicePlanSchema,
233
260
  invoke: this.purchaseServicePlan.bind(this),
234
261
  },
262
+ {
263
+ name: 'set_registry_visibility',
264
+ description: 'Hide or show one agent in the public AgentDomain registry. Hiding requires an active Pro or Enterprise Premium Plan.',
265
+ schema: SetRegistryVisibilitySchema,
266
+ invoke: this.setRegistryVisibility.bind(this),
267
+ },
268
+ {
269
+ name: 'update_primary_email',
270
+ description: 'Change one agent primary email username. The old primary address stops receiving new mail.',
271
+ schema: UpdatePrimaryEmailSchema,
272
+ invoke: this.updatePrimaryEmail.bind(this),
273
+ },
274
+ {
275
+ name: 'create_email_alias',
276
+ description: 'Create an extra receive-and-send alias for one agent. Requires available Pro or Enterprise alias capacity.',
277
+ schema: CreateEmailAliasSchema,
278
+ invoke: this.createEmailAlias.bind(this),
279
+ },
280
+ {
281
+ name: 'delete_email_alias',
282
+ description: 'Delete one active email alias from an agent.',
283
+ schema: DeleteEmailAliasSchema,
284
+ invoke: this.deleteEmailAlias.bind(this),
285
+ },
235
286
  ];
236
287
  }
237
288
  async register(walletProvider, args) {
238
289
  const { ad, wallet } = this.createAgentDomain(walletProvider);
239
- const result = await ad.register({ ...args, wallet });
290
+ const result = await ad.register({ ...args, emailEnabled: true, wallet });
240
291
  let autoRenewMsg = '';
241
292
  if (args.autoRenew && this.renewalVaultAddress) {
242
293
  try {
@@ -364,20 +415,25 @@ export class AgentDomainActionProvider {
364
415
  async getServicePlan(walletProvider, args) {
365
416
  const { ad } = this.createAgentDomain(walletProvider);
366
417
  const result = await ad.getServicePlan(args.agentId);
367
- return `Service plan for ${result.domain}: ${result.entitlement.plan} (${result.entitlement.status}), email ${result.entitlement.limits.emailPerHour}/hour and ${result.entitlement.limits.emailPerDay}/day, ${result.entitlement.limits.apiKeys} API key(s), ${result.entitlement.limits.dnsRecords} DNS records.`;
418
+ return `Premium Plan for ${result.domain}: ${result.entitlement.plan} (${result.entitlement.status}), email ${result.entitlement.limits.emailPerHour}/hour and ${result.entitlement.limits.emailPerDay}/day, ${result.entitlement.limits.apiKeys} API key(s), ${result.entitlement.limits.dnsRecords} DNS records, registry hidden ${result.registryVisibility.hidden}.`;
368
419
  }
369
420
  async purchaseServicePlan(walletProvider, args) {
370
421
  const { ad } = this.createAgentDomain(walletProvider);
371
422
  const result = await ad.purchaseServicePlan(args);
372
- return `Purchased ${result.entitlement.plan} ${args.interval} for ${result.domain}. Current period ends ${result.entitlement.currentPeriodEnd ?? 'unknown'}.`;
423
+ return `Purchased ${result.entitlement.plan} Premium Plan for ${result.domain}. Current period ends ${result.entitlement.currentPeriodEnd ?? 'unknown'}.`;
424
+ }
425
+ async setRegistryVisibility(walletProvider, args) {
426
+ const { ad } = this.createAgentDomain(walletProvider);
427
+ const result = await ad.setRegistryVisibility(args.agentId, args.registryHidden);
428
+ return `${result.domain} is now ${result.registryVisibility.hidden ? 'hidden from' : 'visible in'} the public registry.`;
373
429
  }
374
430
  async quote(walletProvider, args) {
375
431
  const { ad } = this.createAgentDomain(walletProvider);
376
432
  const q = await ad.quote(args);
377
- const emailPart = Number(q.emailFeeUsdc) > 0 ? ` + email $${q.emailFeeUsdc}` : '';
378
433
  const basenamePart = Number(q.basenameCostUsdc) > 0 ? ` + Basename $${q.basenameCostUsdc}` : '';
379
434
  const ensPart = Number(q.ensCostUsdc) > 0 ? ` + ENS $${q.ensCostUsdc}` : '';
380
- return `Total: $${q.totalUsdc} USDC (domain $${q.domainCostUsdc} + SSL $${q.sslCertificationFeeUsdc} + service $${q.serviceFeeUsdc}${emailPart}${basenamePart}${ensPart})`;
435
+ const planPart = Number(q.premiumPlanFeeUsdc ?? 0) > 0 ? ` + ${q.premiumPlanLabel} $${q.premiumPlanFeeUsdc}` : '';
436
+ return `Total: $${q.totalUsdc} USDC (domain $${q.domainCostUsdc} + platform $${q.platformFeeUsdc ?? q.serviceFeeUsdc}, email and SSL included${basenamePart}${ensPart}${planPart})`;
381
437
  }
382
438
  async search(walletProvider, args) {
383
439
  const { ad } = this.createAgentDomain(walletProvider);
@@ -390,6 +446,7 @@ export class AgentDomainActionProvider {
390
446
  const { ad } = this.createAgentDomain(walletProvider);
391
447
  const result = await ad.sendEmail(args.agentId, {
392
448
  to: args.to,
449
+ fromAddress: args.fromAddress,
393
450
  subject: args.subject,
394
451
  text: args.text,
395
452
  });
@@ -400,5 +457,20 @@ export class AgentDomainActionProvider {
400
457
  const result = await ad.listEmail(args.agentId, { limit: args.limit });
401
458
  return JSON.stringify(result, null, 2);
402
459
  }
460
+ async updatePrimaryEmail(walletProvider, args) {
461
+ const { ad } = this.createAgentDomain(walletProvider);
462
+ const result = await ad.updatePrimaryEmail(args.agentId, args.username);
463
+ return result.message;
464
+ }
465
+ async createEmailAlias(walletProvider, args) {
466
+ const { ad } = this.createAgentDomain(walletProvider);
467
+ const result = await ad.createEmailAlias(args.agentId, args.username);
468
+ return `Created email alias ${result.address.emailAddress}.`;
469
+ }
470
+ async deleteEmailAlias(walletProvider, args) {
471
+ const { ad } = this.createAgentDomain(walletProvider);
472
+ await ad.deleteEmailAlias(args.agentId, args.emailAddress);
473
+ return `Deleted email alias ${args.emailAddress}.`;
474
+ }
403
475
  }
404
476
  export default AgentDomainActionProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentdomain/agentkit-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Coinbase AgentKit action provider for AgentDomain",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,22 +20,21 @@
20
20
  "publishConfig": {
21
21
  "access": "public"
22
22
  },
23
- "scripts": {
24
- "build": "tsc",
25
- "prepublishOnly": "pnpm run build",
26
- "typecheck": "tsc --noEmit",
27
- "lint": "echo \"no lint\""
28
- },
29
23
  "dependencies": {
30
- "@agentdomain/sdk": "workspace:^",
31
- "@agentdomain/shared": "workspace:^",
32
- "viem": "^2.21.55",
33
- "zod": "^3.24.1"
24
+ "viem": "^2.55.2",
25
+ "zod": "^3.24.1",
26
+ "@agentdomain/sdk": "^0.2.0",
27
+ "@agentdomain/shared": "^0.2.0"
34
28
  },
35
29
  "peerDependencies": {
36
30
  "@coinbase/agentkit": "^0.1.0"
37
31
  },
38
32
  "devDependencies": {
39
33
  "typescript": "^5.7.2"
34
+ },
35
+ "scripts": {
36
+ "build": "tsc",
37
+ "typecheck": "tsc --noEmit",
38
+ "lint": "echo \"no lint\""
40
39
  }
41
- }
40
+ }