@agentdomain/agentkit-plugin 0.3.0 → 0.4.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/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, primary address update, and Pro/Enterprise aliases
13
+ - Email send/list/delete/batch, monthly usage, signed inbound webhooks, primary address updates, and Starter/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 Premium Plans
17
+ - Per-agent Starter, Pro, and exact Enterprise-tier Premium Plan purchase and renewal selection
18
18
 
19
19
  Default API base: `https://agentdomain.app/api/v1`.
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ declare const QuoteSchema: z.ZodObject<{
9
9
  emailEnabled: z.ZodDefault<z.ZodBoolean>;
10
10
  emailUsername: z.ZodOptional<z.ZodString>;
11
11
  years: z.ZodDefault<z.ZodNumber>;
12
- premiumPlan: z.ZodDefault<z.ZodEnum<["included", "pro", "enterprise"]>>;
12
+ premiumPlan: z.ZodDefault<z.ZodEnum<["included", "starter", "pro", "enterprise"]>>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  preferredName: string;
15
15
  tld: "xyz" | "com" | "ai" | "org" | "io" | "net" | "co" | "app";
@@ -17,7 +17,7 @@ declare const QuoteSchema: z.ZodObject<{
17
17
  registerEns: boolean;
18
18
  emailEnabled: boolean;
19
19
  years: number;
20
- premiumPlan: "included" | "pro" | "enterprise";
20
+ premiumPlan: "included" | "starter" | "pro" | "enterprise";
21
21
  basenameLabel?: string | undefined;
22
22
  ensLabel?: string | undefined;
23
23
  emailUsername?: string | undefined;
@@ -31,7 +31,7 @@ declare const QuoteSchema: z.ZodObject<{
31
31
  emailEnabled?: boolean | undefined;
32
32
  emailUsername?: string | undefined;
33
33
  years?: number | undefined;
34
- premiumPlan?: "included" | "pro" | "enterprise" | undefined;
34
+ premiumPlan?: "included" | "starter" | "pro" | "enterprise" | undefined;
35
35
  }>;
36
36
  declare const SearchSchema: z.ZodObject<{
37
37
  q: z.ZodOptional<z.ZodString>;
@@ -49,7 +49,7 @@ declare const SearchSchema: z.ZodObject<{
49
49
  capability?: string | undefined;
50
50
  limit?: number | undefined;
51
51
  }>;
52
- declare const RenewalStatusSchema: z.ZodObject<{
52
+ declare const EmailUsageSchema: z.ZodObject<{
53
53
  agentId: z.ZodString;
54
54
  }, "strip", z.ZodTypeAny, {
55
55
  agentId: string;
@@ -91,7 +91,7 @@ export declare class AgentDomainActionProvider {
91
91
  emailEnabled: z.ZodDefault<z.ZodBoolean>;
92
92
  emailUsername: z.ZodOptional<z.ZodString>;
93
93
  years: z.ZodDefault<z.ZodNumber>;
94
- premiumPlan: z.ZodDefault<z.ZodEnum<["included", "pro", "enterprise"]>>;
94
+ premiumPlan: z.ZodDefault<z.ZodEnum<["included", "starter", "pro", "enterprise"]>>;
95
95
  }, "strip", z.ZodTypeAny, {
96
96
  preferredName: string;
97
97
  tld: "xyz" | "com" | "ai" | "org" | "io" | "net" | "co" | "app";
@@ -99,7 +99,7 @@ export declare class AgentDomainActionProvider {
99
99
  registerEns: boolean;
100
100
  emailEnabled: boolean;
101
101
  years: number;
102
- premiumPlan: "included" | "pro" | "enterprise";
102
+ premiumPlan: "included" | "starter" | "pro" | "enterprise";
103
103
  basenameLabel?: string | undefined;
104
104
  ensLabel?: string | undefined;
105
105
  emailUsername?: string | undefined;
@@ -113,7 +113,7 @@ export declare class AgentDomainActionProvider {
113
113
  emailEnabled?: boolean | undefined;
114
114
  emailUsername?: string | undefined;
115
115
  years?: number | undefined;
116
- premiumPlan?: "included" | "pro" | "enterprise" | undefined;
116
+ premiumPlan?: "included" | "starter" | "pro" | "enterprise" | undefined;
117
117
  }>;
118
118
  invoke: (walletProvider: WalletProvider, args: z.infer<typeof QuoteSchema>) => Promise<string>;
119
119
  } | {
@@ -146,7 +146,7 @@ export declare class AgentDomainActionProvider {
146
146
  }, {
147
147
  agentId: string;
148
148
  }>;
149
- invoke: (walletProvider: WalletProvider, args: z.infer<typeof RenewalStatusSchema>) => Promise<string>;
149
+ invoke: (walletProvider: WalletProvider, args: z.infer<typeof EmailUsageSchema>) => Promise<string>;
150
150
  })[];
151
151
  private register;
152
152
  private renewalStatus;
@@ -161,10 +161,15 @@ export declare class AgentDomainActionProvider {
161
161
  private getServicePlan;
162
162
  private purchaseServicePlan;
163
163
  private setRegistryVisibility;
164
+ private scheduleServicePlanRenewal;
164
165
  private quote;
165
166
  private search;
166
167
  private sendEmail;
167
168
  private listEmail;
169
+ private deleteEmailMessage;
170
+ private sendEmailBatch;
171
+ private emailUsage;
172
+ private configureEmailWebhook;
168
173
  private updatePrimaryEmail;
169
174
  private createEmailAlias;
170
175
  private deleteEmailAlias;
package/dist/index.js CHANGED
@@ -60,6 +60,22 @@ const ListEmailSchema = z.object({
60
60
  agentId: z.string(),
61
61
  limit: z.number().int().min(1).max(100).default(20),
62
62
  });
63
+ const DeleteEmailMessageSchema = z.object({
64
+ agentId: z.string().uuid(),
65
+ messageId: z.string().uuid(),
66
+ });
67
+ const BatchEmailSchema = z.object({
68
+ agentId: z.string(),
69
+ messages: z.array(SendEmailSchema.omit({ agentId: true })).max(100),
70
+ idempotencyKey: z.string().max(256).optional(),
71
+ });
72
+ const EmailUsageSchema = z.object({ agentId: z.string() });
73
+ const EmailWebhookSchema = z.object({
74
+ agentId: z.string(),
75
+ url: z.string().url(),
76
+ payloadMode: z.enum(['metadata', 'inline_text']).default('metadata'),
77
+ enabled: z.boolean().default(true),
78
+ });
63
79
  const RenewalStatusSchema = z.object({
64
80
  agentId: z.string().min(1),
65
81
  });
@@ -103,12 +119,18 @@ const ServicePlanStatusSchema = z.object({
103
119
  });
104
120
  const PurchaseServicePlanSchema = z.object({
105
121
  agentId: z.string().min(1),
106
- plan: z.enum(['pro', 'enterprise']),
122
+ plan: z.enum(['starter', 'pro', 'enterprise']),
123
+ planSku: z.custom().optional(),
107
124
  });
108
125
  const SetRegistryVisibilitySchema = z.object({
109
126
  agentId: z.string().min(1),
110
127
  registryHidden: z.boolean(),
111
128
  });
129
+ const ScheduleServicePlanRenewalSchema = z.object({
130
+ agentId: z.string().uuid(),
131
+ plan: z.enum(['included', 'starter', 'pro', 'enterprise']),
132
+ planSku: z.custom(),
133
+ });
112
134
  const UpdatePrimaryEmailSchema = z.object({
113
135
  agentId: z.string().min(1),
114
136
  username: z
@@ -193,6 +215,30 @@ export class AgentDomainActionProvider {
193
215
  schema: ListEmailSchema,
194
216
  invoke: this.listEmail.bind(this),
195
217
  },
218
+ {
219
+ name: 'delete_agent_email',
220
+ description: 'Permanently delete one email message from an agent inbox.',
221
+ schema: DeleteEmailMessageSchema,
222
+ invoke: this.deleteEmailMessage.bind(this),
223
+ },
224
+ {
225
+ name: 'send_agent_email_batch',
226
+ description: 'Queue up to 100 emails in one API request.',
227
+ schema: BatchEmailSchema,
228
+ invoke: this.sendEmailBatch.bind(this),
229
+ },
230
+ {
231
+ name: 'get_agent_email_usage',
232
+ description: 'Get combined monthly sent and received email usage.',
233
+ schema: EmailUsageSchema,
234
+ invoke: this.emailUsage.bind(this),
235
+ },
236
+ {
237
+ name: 'configure_email_webhook',
238
+ description: 'Configure signed inbound email events for this agent.',
239
+ schema: EmailWebhookSchema,
240
+ invoke: this.configureEmailWebhook.bind(this),
241
+ },
196
242
  {
197
243
  name: 'get_renewal_status',
198
244
  description: 'Get exact next renewal amount, shortfall, vault balance, expiry date, and auto-renew state for an AgentDomain identity.',
@@ -255,16 +301,22 @@ export class AgentDomainActionProvider {
255
301
  },
256
302
  {
257
303
  name: 'purchase_service_plan',
258
- description: 'Upgrade one agent to an AgentDomain Pro or Enterprise Premium Plan using x402 USDC payment.',
304
+ description: 'Upgrade one agent to an AgentDomain Starter, Pro, or Enterprise Premium Plan using x402 USDC payment.',
259
305
  schema: PurchaseServicePlanSchema,
260
306
  invoke: this.purchaseServicePlan.bind(this),
261
307
  },
262
308
  {
263
309
  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.',
310
+ description: 'Hide or show one agent in the public AgentDomain registry. Hiding requires an active paid Premium Plan.',
265
311
  schema: SetRegistryVisibilitySchema,
266
312
  invoke: this.setRegistryVisibility.bind(this),
267
313
  },
314
+ {
315
+ name: 'schedule_service_plan_renewal',
316
+ description: 'Choose the exact Premium Plan SKU for the next identity renewal, including Enterprise tiers.',
317
+ schema: ScheduleServicePlanRenewalSchema,
318
+ invoke: this.scheduleServicePlanRenewal.bind(this),
319
+ },
268
320
  {
269
321
  name: 'update_primary_email',
270
322
  description: 'Change one agent primary email username. The old primary address stops receiving new mail.',
@@ -273,7 +325,7 @@ export class AgentDomainActionProvider {
273
325
  },
274
326
  {
275
327
  name: 'create_email_alias',
276
- description: 'Create an extra receive-and-send alias for one agent. Requires available Pro or Enterprise alias capacity.',
328
+ description: 'Create an extra receive-and-send alias for one agent. Requires available paid-plan alias capacity.',
277
329
  schema: CreateEmailAliasSchema,
278
330
  invoke: this.createEmailAlias.bind(this),
279
331
  },
@@ -415,7 +467,7 @@ export class AgentDomainActionProvider {
415
467
  async getServicePlan(walletProvider, args) {
416
468
  const { ad } = this.createAgentDomain(walletProvider);
417
469
  const result = await ad.getServicePlan(args.agentId);
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}.`;
470
+ return `Premium Plan for ${result.domain}: ${result.entitlement.plan} (${result.entitlement.status}), ${result.entitlement.limits.monthlyEmails} combined emails/month, ${result.entitlement.limits.apiKeys} API key(s), ${result.entitlement.limits.dnsRecords} DNS records, registry hidden ${result.registryVisibility.hidden}.`;
419
471
  }
420
472
  async purchaseServicePlan(walletProvider, args) {
421
473
  const { ad } = this.createAgentDomain(walletProvider);
@@ -427,12 +479,19 @@ export class AgentDomainActionProvider {
427
479
  const result = await ad.setRegistryVisibility(args.agentId, args.registryHidden);
428
480
  return `${result.domain} is now ${result.registryVisibility.hidden ? 'hidden from' : 'visible in'} the public registry.`;
429
481
  }
482
+ async scheduleServicePlanRenewal(walletProvider, args) {
483
+ const { ad } = this.createAgentDomain(walletProvider);
484
+ const result = await ad.scheduleServicePlanRenewal(args.agentId, args);
485
+ return `Scheduled ${result.renewalPlanSku} for the next identity renewal.`;
486
+ }
430
487
  async quote(walletProvider, args) {
431
488
  const { ad } = this.createAgentDomain(walletProvider);
432
489
  const q = await ad.quote(args);
433
490
  const basenamePart = Number(q.basenameCostUsdc) > 0 ? ` + Basename $${q.basenameCostUsdc}` : '';
434
491
  const ensPart = Number(q.ensCostUsdc) > 0 ? ` + ENS $${q.ensCostUsdc}` : '';
435
- const planPart = Number(q.premiumPlanFeeUsdc ?? 0) > 0 ? ` + ${q.premiumPlanLabel} $${q.premiumPlanFeeUsdc}` : '';
492
+ const planPart = Number(q.premiumPlanFeeUsdc ?? 0) > 0
493
+ ? ` + ${q.premiumPlanLabel} $${q.premiumPlanFeeUsdc}`
494
+ : '';
436
495
  return `Total: $${q.totalUsdc} USDC (domain $${q.domainCostUsdc} + platform $${q.platformFeeUsdc ?? q.serviceFeeUsdc}, email and SSL included${basenamePart}${ensPart}${planPart})`;
437
496
  }
438
497
  async search(walletProvider, args) {
@@ -450,13 +509,33 @@ export class AgentDomainActionProvider {
450
509
  subject: args.subject,
451
510
  text: args.text,
452
511
  });
453
- return `Email sent via SES: ${result.id}`;
512
+ return `Email queued: ${result.id}`;
454
513
  }
455
514
  async listEmail(walletProvider, args) {
456
515
  const { ad } = this.createAgentDomain(walletProvider);
457
516
  const result = await ad.listEmail(args.agentId, { limit: args.limit });
458
517
  return JSON.stringify(result, null, 2);
459
518
  }
519
+ async deleteEmailMessage(walletProvider, args) {
520
+ const { ad } = this.createAgentDomain(walletProvider);
521
+ await ad.deleteEmailMessage(args.agentId, args.messageId);
522
+ return `Deleted email message ${args.messageId}.`;
523
+ }
524
+ async sendEmailBatch(walletProvider, args) {
525
+ const { ad } = this.createAgentDomain(walletProvider);
526
+ return JSON.stringify(await ad.sendEmailBatch(args.agentId, {
527
+ messages: args.messages,
528
+ idempotencyKey: args.idempotencyKey,
529
+ }), null, 2);
530
+ }
531
+ async emailUsage(walletProvider, args) {
532
+ const { ad } = this.createAgentDomain(walletProvider);
533
+ return JSON.stringify(await ad.getEmailUsage(args.agentId), null, 2);
534
+ }
535
+ async configureEmailWebhook(walletProvider, args) {
536
+ const { ad } = this.createAgentDomain(walletProvider);
537
+ return JSON.stringify(await ad.setEmailWebhook(args.agentId, args), null, 2);
538
+ }
460
539
  async updatePrimaryEmail(walletProvider, args) {
461
540
  const { ad } = this.createAgentDomain(walletProvider);
462
541
  const result = await ad.updatePrimaryEmail(args.agentId, args.username);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentdomain/agentkit-plugin",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Coinbase AgentKit action provider for AgentDomain",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "https://github.com/0xmdrakib/AgentDomain.git",
@@ -26,8 +26,8 @@
26
26
  "dependencies": {
27
27
  "viem": "^2.55.2",
28
28
  "zod": "^3.24.1",
29
- "@agentdomain/sdk": "^0.3.0",
30
- "@agentdomain/shared": "^0.3.0"
29
+ "@agentdomain/sdk": "^0.4.1",
30
+ "@agentdomain/shared": "^0.4.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@coinbase/agentkit": "^0.1.0"