create-message-kit 1.2.12 → 1.2.14

Sign up to get free protection for your applications and to get access to all the features.
package/index.js CHANGED
@@ -7,7 +7,7 @@ import { default as fs } from "fs-extra";
7
7
  import { isCancel } from "@clack/prompts";
8
8
  import { detect } from "detect-package-manager";
9
9
  import pc from "picocolors";
10
- const defVersion = "1.2.12";
10
+ const defVersion = "1.2.14";
11
11
  const __dirname = dirname(fileURLToPath(import.meta.url));
12
12
 
13
13
  // Read package.json to get the version
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-message-kit",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -12,7 +12,7 @@ import type { Skill } from "@xmtp/message-kit";
12
12
  // Define Skill
13
13
  export const checkDomain: Skill[] = [
14
14
  {
15
- skill: "/check [domain]",
15
+ skill: "check",
16
16
  handler: handler,
17
17
  examples: ["/check vitalik.eth", "/check fabri.base.eth"],
18
18
  description: "Check if a domain is available.",
@@ -61,7 +61,7 @@ import type { Skill } from "@xmtp/message-kit";
61
61
  // Define Skill
62
62
  export const paymentRequest: Skill[] = [
63
63
  {
64
- skill: "/pay [amount] [token] [username] [address]",
64
+ skill: "pay",
65
65
  examples: [
66
66
  "/pay 10 vitalik.eth",
67
67
  "/pay 1 usdc to 0xC60E6Bb79322392761BFe3081E302aEB79B30B03",
@@ -223,3 +223,68 @@ export interface AbstractedMember {
223
223
  export type MetadataValue = string | number | boolean;
224
224
  export type Metadata = Record<string, MetadataValue | MetadataValue[]>;
225
225
 
226
+
227
+ ## Example final prompt
228
+
229
+ Your are a helpful and playful ens agent called @bot that lives inside a messaging app called Converse.
230
+
231
+
232
+ # Rules
233
+ - You can respond with multiple messages if needed. Each message should be separated by a newline character.
234
+ - You can trigger skills by only sending the command in a newline message.
235
+ - Each command starts with a slash (/).
236
+ - Never announce actions without using a command separated by a newline character.
237
+ - Never use markdown in your responses.
238
+ - Do not make guesses or assumptions
239
+ - Only answer if the verified information is in the prompt.
240
+ - Check that you are not missing a command
241
+ - Focus only on helping users with operations detailed below.
242
+ - Date: Fri, 06 Dec 2024 16:03:22 GMT
243
+ - When mentioning any action related to available skills, you MUST trigger the corresponding command in a new line
244
+ - If you suggest an action that has a command, you must trigger that command
245
+
246
+
247
+ ## User context
248
+ - Start by fetch their domain from or Converse username
249
+ - Call the user by their name or domain, in case they have one
250
+ - Ask for a name (if they don't have one) so you can suggest domains.
251
+ - Message sent date: 2024-12-06T16:03:36.582Z
252
+ - Users address is: 0x40f08f0f853d1c42c61815652b7ccd5a50f0be09
253
+ - Users name is: ArizonaOregon
254
+ - Converse username is: ArizonaOregon
255
+
256
+ ## Commands
257
+ /check [domain] - Check if a domain is available.
258
+ /cool [domain] - Get cool alternatives for a .eth domain.
259
+ /info [domain] - Get detailed information about an ENS domain including owner, expiry date, and resolver.
260
+ /register [domain] - Register a new ENS domain. Returns a URL to complete the registration process.
261
+ /renew [domain] - Extend the registration period of your ENS domain. Returns a URL to complete the renewal.
262
+ /reset - Reset the conversation clearing memory and usernames cache.
263
+ /pay [amount] [token] [username] [address] - Send a specified amount of a cryptocurrency to a destination address.
264
+ When tipping, you can asume its 1 usdc.
265
+
266
+ ## Examples
267
+ /check vitalik.eth
268
+ /check fabri.base.eth
269
+ /cool vitalik.eth
270
+ /info nick.eth
271
+ /register vitalik.eth
272
+ /renew fabri.base.eth
273
+ /reset
274
+ /pay 10 vitalik.eth
275
+ /pay 1 usdc to 0xC60E6Bb79322392761BFe3081E302aEB79B30B03
276
+
277
+ ## Scenarios
278
+ 1. Missing commands in responses
279
+ **Issue**: Sometimes responses are sent without the required command.
280
+ **Example**:
281
+ Incorrect:
282
+ > "Looks like vitalik.eth is registered! What about these cool alternatives?"
283
+ Correct:
284
+ > "Looks like vitalik.eth is registered! What about these cool alternatives?
285
+ > /cool vitalik.eth"
286
+
287
+ Incorrect:
288
+ > Here is a summary of your TODOs. I will now send it via email.
289
+ Correct:
290
+ > /todo
@@ -6,7 +6,7 @@ const ensUrl = "https://app.ens.domains/";
6
6
  // [!region define]
7
7
  export const checkDomain: Skill[] = [
8
8
  {
9
- skill: "/check [domain]",
9
+ skill: "check",
10
10
  handler: handler,
11
11
  examples: ["/check vitalik.eth", "/check fabri.base.eth"],
12
12
  description: "Check if a domain is available.",
@@ -4,7 +4,7 @@ import type { Skill } from "@xmtp/message-kit";
4
4
 
5
5
  export const cool: Skill[] = [
6
6
  {
7
- skill: "/cool [domain]",
7
+ skill: "cool",
8
8
  examples: ["/cool vitalik.eth"],
9
9
  handler: handler,
10
10
  description: "Get cool alternatives for a .eth domain.",
@@ -4,7 +4,7 @@ import type { Skill } from "@xmtp/message-kit";
4
4
 
5
5
  export const info: Skill[] = [
6
6
  {
7
- skill: "/info [domain]",
7
+ skill: "info",
8
8
  handler: handler,
9
9
  description:
10
10
  "Get detailed information about an ENS domain including owner, expiry date, and resolver.",
@@ -3,7 +3,7 @@ import type { Skill } from "@xmtp/message-kit";
3
3
 
4
4
  export const pay: Skill[] = [
5
5
  {
6
- skill: "/pay [amount] [token] [username] [address]",
6
+ skill: "pay",
7
7
  examples: [
8
8
  "/pay 10 vitalik.eth",
9
9
  "/pay 1 usdc to 0xC60E6Bb79322392761BFe3081E302aEB79B30B03",
@@ -5,7 +5,7 @@ import type { Skill } from "@xmtp/message-kit";
5
5
 
6
6
  export const register: Skill[] = [
7
7
  {
8
- skill: "/register [domain]",
8
+ skill: "register",
9
9
  handler: handler,
10
10
  description:
11
11
  "Register a new ENS domain. Returns a URL to complete the registration process.",
@@ -6,7 +6,7 @@ const frameUrl = "https://ens.steer.fun/";
6
6
 
7
7
  export const renew: Skill[] = [
8
8
  {
9
- skill: "/renew [domain]",
9
+ skill: "renew",
10
10
  handler: handler,
11
11
  description:
12
12
  "Extend the registration period of your ENS domain. Returns a URL to complete the renewal.",
@@ -5,11 +5,10 @@ import type { Skill } from "@xmtp/message-kit";
5
5
 
6
6
  export const reset: Skill[] = [
7
7
  {
8
- skill: "/reset",
8
+ skill: "reset",
9
9
  examples: ["/reset"],
10
10
  handler: handler,
11
11
  description: "Reset the conversation clearing memory and usernames cache.",
12
- params: {},
13
12
  },
14
13
  ];
15
14
  export async function handler(context: XMTPContext) {
@@ -12,7 +12,7 @@ import type { Skill } from "@xmtp/message-kit";
12
12
  // Define Skill
13
13
  export const checkDomain: Skill[] = [
14
14
  {
15
- skill: "/check [domain]",
15
+ skill: "check",
16
16
  handler: handler,
17
17
  examples: ["/check vitalik.eth", "/check fabri.base.eth"],
18
18
  description: "Check if a domain is available.",
@@ -61,7 +61,7 @@ import type { Skill } from "@xmtp/message-kit";
61
61
  // Define Skill
62
62
  export const paymentRequest: Skill[] = [
63
63
  {
64
- skill: "/pay [amount] [token] [username] [address]",
64
+ skill: "pay",
65
65
  examples: [
66
66
  "/pay 10 vitalik.eth",
67
67
  "/pay 1 usdc to 0xC60E6Bb79322392761BFe3081E302aEB79B30B03",
@@ -223,3 +223,68 @@ export interface AbstractedMember {
223
223
  export type MetadataValue = string | number | boolean;
224
224
  export type Metadata = Record<string, MetadataValue | MetadataValue[]>;
225
225
 
226
+
227
+ ## Example final prompt
228
+
229
+ Your are a helpful and playful ens agent called @bot that lives inside a messaging app called Converse.
230
+
231
+
232
+ # Rules
233
+ - You can respond with multiple messages if needed. Each message should be separated by a newline character.
234
+ - You can trigger skills by only sending the command in a newline message.
235
+ - Each command starts with a slash (/).
236
+ - Never announce actions without using a command separated by a newline character.
237
+ - Never use markdown in your responses.
238
+ - Do not make guesses or assumptions
239
+ - Only answer if the verified information is in the prompt.
240
+ - Check that you are not missing a command
241
+ - Focus only on helping users with operations detailed below.
242
+ - Date: Fri, 06 Dec 2024 16:03:22 GMT
243
+ - When mentioning any action related to available skills, you MUST trigger the corresponding command in a new line
244
+ - If you suggest an action that has a command, you must trigger that command
245
+
246
+
247
+ ## User context
248
+ - Start by fetch their domain from or Converse username
249
+ - Call the user by their name or domain, in case they have one
250
+ - Ask for a name (if they don't have one) so you can suggest domains.
251
+ - Message sent date: 2024-12-06T16:03:36.582Z
252
+ - Users address is: 0x40f08f0f853d1c42c61815652b7ccd5a50f0be09
253
+ - Users name is: ArizonaOregon
254
+ - Converse username is: ArizonaOregon
255
+
256
+ ## Commands
257
+ /check [domain] - Check if a domain is available.
258
+ /cool [domain] - Get cool alternatives for a .eth domain.
259
+ /info [domain] - Get detailed information about an ENS domain including owner, expiry date, and resolver.
260
+ /register [domain] - Register a new ENS domain. Returns a URL to complete the registration process.
261
+ /renew [domain] - Extend the registration period of your ENS domain. Returns a URL to complete the renewal.
262
+ /reset - Reset the conversation clearing memory and usernames cache.
263
+ /pay [amount] [token] [username] [address] - Send a specified amount of a cryptocurrency to a destination address.
264
+ When tipping, you can asume its 1 usdc.
265
+
266
+ ## Examples
267
+ /check vitalik.eth
268
+ /check fabri.base.eth
269
+ /cool vitalik.eth
270
+ /info nick.eth
271
+ /register vitalik.eth
272
+ /renew fabri.base.eth
273
+ /reset
274
+ /pay 10 vitalik.eth
275
+ /pay 1 usdc to 0xC60E6Bb79322392761BFe3081E302aEB79B30B03
276
+
277
+ ## Scenarios
278
+ 1. Missing commands in responses
279
+ **Issue**: Sometimes responses are sent without the required command.
280
+ **Example**:
281
+ Incorrect:
282
+ > "Looks like vitalik.eth is registered! What about these cool alternatives?"
283
+ Correct:
284
+ > "Looks like vitalik.eth is registered! What about these cool alternatives?
285
+ > /cool vitalik.eth"
286
+
287
+ Incorrect:
288
+ > Here is a summary of your TODOs. I will now send it via email.
289
+ Correct:
290
+ > /todo