@elizaos/plugin-xai 2.0.0-alpha.6 → 2.0.0-beta.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.
Files changed (89) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -19
  3. package/auto-enable.ts +17 -0
  4. package/dist/browser/index.browser.js +3 -3
  5. package/dist/browser/index.browser.js.map +5 -5
  6. package/dist/cjs/index.node.cjs +362 -11075
  7. package/dist/cjs/index.node.js.map +5 -110
  8. package/dist/index.browser.d.ts +2 -5
  9. package/dist/index.browser.d.ts.map +1 -1
  10. package/dist/index.d.ts +0 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/models/grok.d.ts.map +1 -1
  13. package/dist/node/index.node.js +339 -11125
  14. package/dist/node/index.node.js.map +5 -110
  15. package/package.json +34 -100
  16. package/dist/actions/post.d.ts +0 -3
  17. package/dist/actions/post.d.ts.map +0 -1
  18. package/dist/base.d.ts +0 -55
  19. package/dist/base.d.ts.map +0 -1
  20. package/dist/client/api-types.d.ts +0 -28
  21. package/dist/client/api-types.d.ts.map +0 -1
  22. package/dist/client/auth-providers/broker.d.ts +0 -19
  23. package/dist/client/auth-providers/broker.d.ts.map +0 -1
  24. package/dist/client/auth-providers/env.d.ts +0 -20
  25. package/dist/client/auth-providers/env.d.ts.map +0 -1
  26. package/dist/client/auth-providers/factory.d.ts +0 -5
  27. package/dist/client/auth-providers/factory.d.ts.map +0 -1
  28. package/dist/client/auth-providers/interactive.d.ts +0 -7
  29. package/dist/client/auth-providers/interactive.d.ts.map +0 -1
  30. package/dist/client/auth-providers/oauth2-pkce.d.ts +0 -24
  31. package/dist/client/auth-providers/oauth2-pkce.d.ts.map +0 -1
  32. package/dist/client/auth-providers/pkce.d.ts +0 -5
  33. package/dist/client/auth-providers/pkce.d.ts.map +0 -1
  34. package/dist/client/auth-providers/token-store.d.ts +0 -31
  35. package/dist/client/auth-providers/token-store.d.ts.map +0 -1
  36. package/dist/client/auth-providers/types.d.ts +0 -35
  37. package/dist/client/auth-providers/types.d.ts.map +0 -1
  38. package/dist/client/auth.d.ts +0 -38
  39. package/dist/client/auth.d.ts.map +0 -1
  40. package/dist/client/client.d.ts +0 -462
  41. package/dist/client/client.d.ts.map +0 -1
  42. package/dist/client/errors.d.ts +0 -72
  43. package/dist/client/errors.d.ts.map +0 -1
  44. package/dist/client/index.d.ts +0 -21
  45. package/dist/client/index.d.ts.map +0 -1
  46. package/dist/client/posts.d.ts +0 -325
  47. package/dist/client/posts.d.ts.map +0 -1
  48. package/dist/client/profile.d.ts +0 -140
  49. package/dist/client/profile.d.ts.map +0 -1
  50. package/dist/client/relationships.d.ts +0 -47
  51. package/dist/client/relationships.d.ts.map +0 -1
  52. package/dist/client/search.d.ts +0 -48
  53. package/dist/client/search.d.ts.map +0 -1
  54. package/dist/client/types.d.ts +0 -24
  55. package/dist/client/types.d.ts.map +0 -1
  56. package/dist/constants.d.ts +0 -5
  57. package/dist/constants.d.ts.map +0 -1
  58. package/dist/discovery.d.ts +0 -37
  59. package/dist/discovery.d.ts.map +0 -1
  60. package/dist/environment.d.ts +0 -40
  61. package/dist/environment.d.ts.map +0 -1
  62. package/dist/generated/prompts/typescript/prompts.d.ts +0 -22
  63. package/dist/generated/prompts/typescript/prompts.d.ts.map +0 -1
  64. package/dist/generated/specs/spec-helpers.d.ts +0 -49
  65. package/dist/generated/specs/spec-helpers.d.ts.map +0 -1
  66. package/dist/generated/specs/specs.d.ts +0 -65
  67. package/dist/generated/specs/specs.d.ts.map +0 -1
  68. package/dist/interactions.d.ts +0 -129
  69. package/dist/interactions.d.ts.map +0 -1
  70. package/dist/post.d.ts +0 -43
  71. package/dist/post.d.ts.map +0 -1
  72. package/dist/services/x.service.d.ts +0 -23
  73. package/dist/services/x.service.d.ts.map +0 -1
  74. package/dist/templates.d.ts +0 -6
  75. package/dist/templates.d.ts.map +0 -1
  76. package/dist/timeline.d.ts +0 -46
  77. package/dist/timeline.d.ts.map +0 -1
  78. package/dist/types.d.ts +0 -150
  79. package/dist/types.d.ts.map +0 -1
  80. package/dist/utils/error-handler.d.ts +0 -20
  81. package/dist/utils/error-handler.d.ts.map +0 -1
  82. package/dist/utils/memory.d.ts +0 -21
  83. package/dist/utils/memory.d.ts.map +0 -1
  84. package/dist/utils/settings.d.ts +0 -3
  85. package/dist/utils/settings.d.ts.map +0 -1
  86. package/dist/utils/time.d.ts +0 -2
  87. package/dist/utils/time.d.ts.map +0 -1
  88. package/dist/utils.d.ts +0 -36
  89. package/dist/utils.d.ts.map +0 -1
@@ -1,37 +0,0 @@
1
- import { type IAgentRuntime } from "@elizaos/core";
2
- import type { ClientBase } from "./base";
3
- export declare class XDiscoveryClient {
4
- private xClient;
5
- private runtime;
6
- private config;
7
- private isRunning;
8
- private isDryRun;
9
- constructor(client: ClientBase, runtime: IAgentRuntime, state: Record<string, unknown>);
10
- /**
11
- * Sanitizes a topic for use in X search queries
12
- * - Removes common stop words that might be interpreted as operators
13
- * - Handles special characters
14
- * - Simplifies complex phrases
15
- */
16
- private sanitizeTopic;
17
- private buildDiscoveryConfig;
18
- private extractTopicsFromBio;
19
- start(): Promise<void>;
20
- stop(): Promise<void>;
21
- private runDiscoveryCycle;
22
- private discoverContent;
23
- private discoverFromTopics;
24
- private discoverFromThreads;
25
- private discoverFromPopularAccounts;
26
- private scorePost;
27
- private scoreAccount;
28
- private processAccounts;
29
- private processPosts;
30
- private checkIfFollowing;
31
- private generateReply;
32
- private generateQuote;
33
- private saveEngagementMemory;
34
- private saveFollowMemory;
35
- private delay;
36
- }
37
- //# sourceMappingURL=discovery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAInB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAuCzC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,QAAQ,CAAU;gBAEd,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAoBtF;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,oBAAoB;IAqD5B,OAAO,CAAC,oBAAoB;IAiBtB,KAAK;IA+BL,IAAI;YAKI,iBAAiB;YAmBjB,eAAe;YAyDf,kBAAkB;YAgHlB,mBAAmB;YAyDnB,2BAA2B;IAiEzC,OAAO,CAAC,SAAS;IAgEjB,OAAO,CAAC,YAAY;YAuBN,eAAe;YAqEf,YAAY;YAqGZ,gBAAgB;YAehB,aAAa;YAsCb,aAAa;YAsCb,oBAAoB;YAyCpB,gBAAgB;IAwC9B,OAAO,CAAC,KAAK;CAGd"}
@@ -1,40 +0,0 @@
1
- import type { IAgentRuntime } from "@elizaos/core";
2
- import { z } from "zod";
3
- export declare const xEnvSchema: z.ZodObject<{
4
- X_AUTH_MODE: z.ZodDefault<z.ZodEnum<{
5
- env: "env";
6
- oauth: "oauth";
7
- bearer: "bearer";
8
- }>>;
9
- X_API_KEY: z.ZodDefault<z.ZodString>;
10
- X_API_SECRET: z.ZodDefault<z.ZodString>;
11
- X_ACCESS_TOKEN: z.ZodDefault<z.ZodString>;
12
- X_ACCESS_TOKEN_SECRET: z.ZodDefault<z.ZodString>;
13
- X_BEARER_TOKEN: z.ZodDefault<z.ZodString>;
14
- X_CLIENT_ID: z.ZodDefault<z.ZodString>;
15
- X_REDIRECT_URI: z.ZodDefault<z.ZodString>;
16
- X_DRY_RUN: z.ZodDefault<z.ZodString>;
17
- X_TARGET_USERS: z.ZodDefault<z.ZodString>;
18
- X_ENABLE_POST: z.ZodDefault<z.ZodString>;
19
- X_ENABLE_REPLIES: z.ZodDefault<z.ZodString>;
20
- X_ENABLE_ACTIONS: z.ZodDefault<z.ZodString>;
21
- X_ENABLE_DISCOVERY: z.ZodDefault<z.ZodString>;
22
- X_POST_INTERVAL_MIN: z.ZodDefault<z.ZodString>;
23
- X_POST_INTERVAL_MAX: z.ZodDefault<z.ZodString>;
24
- X_ENGAGEMENT_INTERVAL_MIN: z.ZodDefault<z.ZodString>;
25
- X_ENGAGEMENT_INTERVAL_MAX: z.ZodDefault<z.ZodString>;
26
- X_DISCOVERY_INTERVAL_MIN: z.ZodDefault<z.ZodString>;
27
- X_DISCOVERY_INTERVAL_MAX: z.ZodDefault<z.ZodString>;
28
- X_MAX_ENGAGEMENTS_PER_RUN: z.ZodDefault<z.ZodString>;
29
- X_MAX_POST_LENGTH: z.ZodDefault<z.ZodString>;
30
- X_RETRY_LIMIT: z.ZodDefault<z.ZodString>;
31
- }, z.core.$strip>;
32
- export type TwitterConfig = z.infer<typeof xEnvSchema>;
33
- export declare function shouldTargetUser(username: string, targetConfig: string): boolean;
34
- export declare function getTargetUsers(targetConfig: string): string[];
35
- export declare function validateXConfig(runtime: IAgentRuntime): Promise<TwitterConfig>;
36
- export declare function getRandomInterval(runtime: IAgentRuntime, type: "post" | "engagement" | "discovery"): number;
37
- export declare function loadConfig(): TwitterConfig;
38
- export declare function validateConfig(config: unknown): TwitterConfig;
39
- export declare function loadConfigFromFile(): Partial<TwitterConfig>;
40
- //# sourceMappingURL=environment.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwBrB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAUvD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAMhF;AAED,wBAAgB,cAAc,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAE7D;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAmDpF;AAOD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,EACtB,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,WAAW,GACxC,MAAM,CA2BR;AAED,wBAAgB,UAAU,IAAI,aAAa,CA2B1C;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,aAAa,CAE7D;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,aAAa,CAAC,CAE3D"}
@@ -1,22 +0,0 @@
1
- /**
2
- * Auto-generated prompt templates
3
- * DO NOT EDIT - Generated from ../../../../prompts/*.txt
4
- *
5
- * These prompts use Handlebars-style template syntax:
6
- * - {{variableName}} for simple substitution
7
- * - {{#each items}}...{{/each}} for iteration
8
- * - {{#if condition}}...{{/if}} for conditionals
9
- */
10
- export declare const generatePostTemplate = "You are {{agentName}}.\n{{bio}}\n\nGenerate a post based on: {{request}}\n\nStyle:\n- Be specific, opinionated, authentic\n- No generic content or platitudes\n- Share insights, hot takes, unique perspectives\n- Conversational and punchy\n- Under 280 characters\n- Skip hashtags unless essential\n\nTopics: {{topics}}\n\nPost:";
11
- export declare const GENERATE_POST_TEMPLATE = "You are {{agentName}}.\n{{bio}}\n\nGenerate a post based on: {{request}}\n\nStyle:\n- Be specific, opinionated, authentic\n- No generic content or platitudes\n- Share insights, hot takes, unique perspectives\n- Conversational and punchy\n- Under 280 characters\n- Skip hashtags unless essential\n\nTopics: {{topics}}\n\nPost:";
12
- export declare const messageHandlerTemplate = "{{agentName}} is replying to you:\n{{senderName}}: {{userMessage}}\n\n# Task: Generate a reply for {{agentName}}.\n{{providers}}\n\n# Instructions: Write a thoughtful response to {{senderName}} that is appropriate and relevant to their message. Do not including any thinking, self-reflection or internal dialog in your response.";
13
- export declare const MESSAGE_HANDLER_TEMPLATE = "{{agentName}} is replying to you:\n{{senderName}}: {{userMessage}}\n\n# Task: Generate a reply for {{agentName}}.\n{{providers}}\n\n# Instructions: Write a thoughtful response to {{senderName}} that is appropriate and relevant to their message. Do not including any thinking, self-reflection or internal dialog in your response.";
14
- export declare const quoteTweetTemplate = "# Task: Write a quote post in the voice, style, and perspective of {{agentName}} @{{xUserName}}.\n\n{{bio}}\n{{postDirections}}\n\n<response>\n <thought>Your thought here, explaining why the quote post is meaningful or how it connects to what {{agentName}} cares about</thought>\n <post>The quote post content here, under 280 characters, without emojis, no questions</post>\n</response>\n\nYour quote post should be:\n- A reaction, agreement, disagreement, or expansion of the original post\n- Personal and unique to {{agentName}}'s style and point of view\n- 1 to 3 sentences long, chosen at random\n- No questions, no emojis, concise\n- Use \"\\n\\n\" (double spaces) between multiple sentences\n- Max 280 characters including line breaks\n\nYour output must ONLY contain the XML block.";
15
- export declare const QUOTE_TWEET_TEMPLATE = "# Task: Write a quote post in the voice, style, and perspective of {{agentName}} @{{xUserName}}.\n\n{{bio}}\n{{postDirections}}\n\n<response>\n <thought>Your thought here, explaining why the quote post is meaningful or how it connects to what {{agentName}} cares about</thought>\n <post>The quote post content here, under 280 characters, without emojis, no questions</post>\n</response>\n\nYour quote post should be:\n- A reaction, agreement, disagreement, or expansion of the original post\n- Personal and unique to {{agentName}}'s style and point of view\n- 1 to 3 sentences long, chosen at random\n- No questions, no emojis, concise\n- Use \"\\n\\n\" (double spaces) between multiple sentences\n- Max 280 characters including line breaks\n\nYour output must ONLY contain the XML block.";
16
- export declare const replyTweetTemplate = "# Task: Write a reply post in the voice, style, and perspective of {{agentName}} @{{xUserName}}.\n\n{{bio}}\n{{postDirections}}\n\n<response>\n <thought>Your thought here, explaining why this reply is meaningful or how it connects to what {{agentName}} cares about</thought>\n <post>The reply post content here, under 280 characters, without emojis, no questions</post>\n</response>\n\nYour reply should be:\n- A direct response, agreement, disagreement, or personal take on the original post\n- Reflective of {{agentName}}'s unique voice and values\n- 1 to 2 sentences long, chosen at random\n- No questions, no emojis, concise\n- Use \"\\n\\n\" (double spaces) between multiple sentences if needed\n- Max 280 characters including line breaks\n\nYour output must ONLY contain the XML block.";
17
- export declare const REPLY_TWEET_TEMPLATE = "# Task: Write a reply post in the voice, style, and perspective of {{agentName}} @{{xUserName}}.\n\n{{bio}}\n{{postDirections}}\n\n<response>\n <thought>Your thought here, explaining why this reply is meaningful or how it connects to what {{agentName}} cares about</thought>\n <post>The reply post content here, under 280 characters, without emojis, no questions</post>\n</response>\n\nYour reply should be:\n- A direct response, agreement, disagreement, or personal take on the original post\n- Reflective of {{agentName}}'s unique voice and values\n- 1 to 2 sentences long, chosen at random\n- No questions, no emojis, concise\n- Use \"\\n\\n\" (double spaces) between multiple sentences if needed\n- Max 280 characters including line breaks\n\nYour output must ONLY contain the XML block.";
18
- export declare const xActionTemplate = "# INSTRUCTIONS: Determine actions for {{agentName}} (@{{xUserName}}) based on:\n{{bio}}\n{{postDirections}}\n\nGuidelines:\n- Engage with content that relates to character's interests and expertise\n- Direct mentions should be prioritized when relevant\n- Consider engaging with:\n - Content directly related to your topics\n - Interesting discussions you can contribute to\n - Questions you can help answer\n - Content from users you've interacted with before\n- Skip content that is:\n - Completely off-topic or spam\n - Inflammatory or highly controversial (unless it's your area)\n - Pure marketing/promotional with no value\n\nActions (respond only with tags):\n[LIKE] - Content is relevant and interesting (7/10 or higher)\n[REPOST] - Content is valuable and worth sharing (8/10 or higher)\n[QUOTE] - You can add meaningful commentary (7.5/10 or higher)\n[REPLY] - You can contribute helpful insights (7/10 or higher)";
19
- export declare const X_ACTION_TEMPLATE = "# INSTRUCTIONS: Determine actions for {{agentName}} (@{{xUserName}}) based on:\n{{bio}}\n{{postDirections}}\n\nGuidelines:\n- Engage with content that relates to character's interests and expertise\n- Direct mentions should be prioritized when relevant\n- Consider engaging with:\n - Content directly related to your topics\n - Interesting discussions you can contribute to\n - Questions you can help answer\n - Content from users you've interacted with before\n- Skip content that is:\n - Completely off-topic or spam\n - Inflammatory or highly controversial (unless it's your area)\n - Pure marketing/promotional with no value\n\nActions (respond only with tags):\n[LIKE] - Content is relevant and interesting (7/10 or higher)\n[REPOST] - Content is valuable and worth sharing (8/10 or higher)\n[QUOTE] - You can add meaningful commentary (7.5/10 or higher)\n[REPLY] - You can contribute helpful insights (7/10 or higher)";
20
- export declare const xMessageHandlerTemplate = "# Task: Generate dialog and actions for {{agentName}}.\n{{providers}}\nHere is the current post text again. Remember to include an action if the current post text includes a prompt that asks for one of the available actions mentioned above (does not need to be exact)\n{{currentPost}}\n{{imageDescriptions}}\n\n# Instructions: Write the next message for {{agentName}}. Include the appropriate action from the list: {{actionNames}}\nResponse format should be formatted in a valid JSON block like this:\n```json\n{ \"thought\": \"<string>\", \"name\": \"{{agentName}}\", \"text\": \"<string>\", \"action\": \"<string>\" }\n```\n\nThe \"action\" field should be one of the options in [Available Actions] and the \"text\" field should be the response you want to send. Do not including any thinking or internal reflection in the \"text\" field. \"thought\" should be a short description of what the agent is thinking about before responding, inlcuding a brief justification for the response.";
21
- export declare const X_MESSAGE_HANDLER_TEMPLATE = "# Task: Generate dialog and actions for {{agentName}}.\n{{providers}}\nHere is the current post text again. Remember to include an action if the current post text includes a prompt that asks for one of the available actions mentioned above (does not need to be exact)\n{{currentPost}}\n{{imageDescriptions}}\n\n# Instructions: Write the next message for {{agentName}}. Include the appropriate action from the list: {{actionNames}}\nResponse format should be formatted in a valid JSON block like this:\n```json\n{ \"thought\": \"<string>\", \"name\": \"{{agentName}}\", \"text\": \"<string>\", \"action\": \"<string>\" }\n```\n\nThe \"action\" field should be one of the options in [Available Actions] and the \"text\" field should be the response you want to send. Do not including any thinking or internal reflection in the \"text\" field. \"thought\" should be a short description of what the agent is thinking about before responding, inlcuding a brief justification for the response.";
22
- //# sourceMappingURL=prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../../generated/prompts/typescript/prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,oBAAoB,0UAe3B,CAAC;AAEP,eAAO,MAAM,sBAAsB,0UAAuB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,6UAMkK,CAAC;AAEtM,eAAO,MAAM,wBAAwB,6UAAyB,CAAC;AAE/D,eAAO,MAAM,kBAAkB,2xBAkBc,CAAC;AAE9C,eAAO,MAAM,oBAAoB,2xBAAqB,CAAC;AAEvD,eAAO,MAAM,kBAAkB,8xBAkBc,CAAC;AAE9C,eAAO,MAAM,oBAAoB,8xBAAqB,CAAC;AAEvD,eAAO,MAAM,eAAe,u6BAqBmC,CAAC;AAEhE,eAAO,MAAM,iBAAiB,u6BAAkB,CAAC;AAEjD,eAAO,MAAM,uBAAuB,g+BAY4T,CAAC;AAEjW,eAAO,MAAM,0BAA0B,g+BAA0B,CAAC"}
@@ -1,49 +0,0 @@
1
- /**
2
- * Helper functions to lookup action/provider/evaluator specs by name.
3
- * These allow language-specific implementations to import their text content
4
- * (description, similes, examples) from the centralized specs.
5
- *
6
- * DO NOT EDIT the spec data - update prompts/actions.json, prompts/providers.json, prompts/evaluators.json and regenerate.
7
- */
8
- import { type ActionDoc, type EvaluatorDoc, type ProviderDoc } from "./specs";
9
- /**
10
- * Get an action spec by name from the core specs.
11
- * @param name - The action name
12
- * @returns The action spec or undefined if not found
13
- */
14
- export declare function getActionSpec(name: string): ActionDoc | undefined;
15
- /**
16
- * Get an action spec by name, throwing if not found.
17
- * @param name - The action name
18
- * @returns The action spec
19
- * @throws Error if the action is not found
20
- */
21
- export declare function requireActionSpec(name: string): ActionDoc;
22
- /**
23
- * Get a provider spec by name from the core specs.
24
- * @param name - The provider name
25
- * @returns The provider spec or undefined if not found
26
- */
27
- export declare function getProviderSpec(name: string): ProviderDoc | undefined;
28
- /**
29
- * Get a provider spec by name, throwing if not found.
30
- * @param name - The provider name
31
- * @returns The provider spec
32
- * @throws Error if the provider is not found
33
- */
34
- export declare function requireProviderSpec(name: string): ProviderDoc;
35
- /**
36
- * Get an evaluator spec by name from the core specs.
37
- * @param name - The evaluator name
38
- * @returns The evaluator spec or undefined if not found
39
- */
40
- export declare function getEvaluatorSpec(name: string): EvaluatorDoc | undefined;
41
- /**
42
- * Get an evaluator spec by name, throwing if not found.
43
- * @param name - The evaluator name
44
- * @returns The evaluator spec
45
- * @throws Error if the evaluator is not found
46
- */
47
- export declare function requireEvaluatorSpec(name: string): EvaluatorDoc;
48
- export type { ActionDoc, ProviderDoc, EvaluatorDoc };
49
- //# sourceMappingURL=spec-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spec-helpers.d.ts","sourceRoot":"","sources":["../../../generated/specs/spec-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,SAAS,EAOd,KAAK,YAAY,EACjB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAgBjB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAM7D;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEvE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAM/D;AAGD,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
@@ -1,65 +0,0 @@
1
- /**
2
- * Auto-generated canonical action/provider/evaluator docs for plugin-xai.
3
- * DO NOT EDIT - Generated from prompts/specs/**.
4
- */
5
- export type ActionDoc = {
6
- name: string;
7
- description: string;
8
- similes?: readonly string[];
9
- parameters?: readonly unknown[];
10
- examples?: readonly (readonly unknown[])[];
11
- };
12
- export type ProviderDoc = {
13
- name: string;
14
- description: string;
15
- position?: number;
16
- dynamic?: boolean;
17
- };
18
- export type EvaluatorDoc = {
19
- name: string;
20
- description: string;
21
- similes?: readonly string[];
22
- alwaysRun?: boolean;
23
- examples?: readonly unknown[];
24
- };
25
- export declare const coreActionsSpec: {
26
- readonly version: "1.0.0";
27
- readonly actions: readonly [{
28
- readonly name: "POST";
29
- readonly description: "Post content on X (formerly Twitter)";
30
- readonly similes: readonly ["POST_TO_X", "POST", "SEND_POST", "SHARE_ON_X"];
31
- readonly parameters: readonly [];
32
- }];
33
- };
34
- export declare const allActionsSpec: {
35
- readonly version: "1.0.0";
36
- readonly actions: readonly [{
37
- readonly name: "POST";
38
- readonly description: "Post content on X (formerly Twitter)";
39
- readonly similes: readonly ["POST_TO_X", "POST", "SEND_POST", "SHARE_ON_X"];
40
- readonly parameters: readonly [];
41
- }];
42
- };
43
- export declare const coreProvidersSpec: {
44
- readonly version: "1.0.0";
45
- readonly providers: readonly [];
46
- };
47
- export declare const allProvidersSpec: {
48
- readonly version: "1.0.0";
49
- readonly providers: readonly [];
50
- };
51
- export declare const coreEvaluatorsSpec: {
52
- readonly version: "1.0.0";
53
- readonly evaluators: readonly [];
54
- };
55
- export declare const allEvaluatorsSpec: {
56
- readonly version: "1.0.0";
57
- readonly evaluators: readonly [];
58
- };
59
- export declare const coreActionDocs: readonly ActionDoc[];
60
- export declare const allActionDocs: readonly ActionDoc[];
61
- export declare const coreProviderDocs: readonly ProviderDoc[];
62
- export declare const allProviderDocs: readonly ProviderDoc[];
63
- export declare const coreEvaluatorDocs: readonly EvaluatorDoc[];
64
- export declare const allEvaluatorDocs: readonly EvaluatorDoc[];
65
- //# sourceMappingURL=specs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../generated/specs/specs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;CAUlB,CAAC;AACX,eAAO,MAAM,cAAc;;;;;;;;CAUjB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AACX,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EAA4B,CAAC;AAC5E,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAA2B,CAAC;AAC1E,eAAO,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAAgC,CAAC;AACpF,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAA+B,CAAC;AAClF,eAAO,MAAM,iBAAiB,EAAE,SAAS,YAAY,EAAkC,CAAC;AACxF,eAAO,MAAM,gBAAgB,EAAE,SAAS,YAAY,EAAiC,CAAC"}
@@ -1,129 +0,0 @@
1
- import { type IAgentRuntime, type Memory } from "@elizaos/core";
2
- import type { ClientBase } from "./base";
3
- import type { Post as ClientPost } from "./client/posts";
4
- /**
5
- * Template for generating dialog and actions for a X message handler.
6
- *
7
- * @type {string}
8
- */
9
- /**
10
- * Templates for XAI plugin interactions.
11
- * Auto-generated from prompts/*.txt
12
- * DO NOT EDIT - Generated from ./generated/prompts/typescript/prompts.ts
13
- */
14
- import { messageHandlerTemplate, xMessageHandlerTemplate } from "./generated/prompts/typescript/prompts.js";
15
- import type { XInteractionMemory, XInteractionPayload } from "./types";
16
- export { xMessageHandlerTemplate, messageHandlerTemplate };
17
- /**
18
- * The XInteractionClient class manages X interactions,
19
- * including handling mentions, managing timelines, and engaging with other users.
20
- * It extends the base X client functionality to provide mention handling,
21
- * user interaction, and follow change detection capabilities.
22
- *
23
- * @extends ClientBase
24
- */
25
- export declare class XInteractionClient {
26
- client: ClientBase;
27
- runtime: IAgentRuntime;
28
- xUsername: string;
29
- xUserId: string;
30
- private isDryRun;
31
- private state;
32
- private isRunning;
33
- /**
34
- * Constructor to initialize the X interaction client with runtime and state management.
35
- *
36
- * @param {ClientBase} client - The client instance.
37
- * @param {IAgentRuntime} runtime - The runtime instance for agent operations.
38
- * @param {Record<string, unknown>} state - The state object containing configuration settings.
39
- */
40
- constructor(client: ClientBase, runtime: IAgentRuntime, state: Record<string, unknown>);
41
- /**
42
- * Asynchronously starts the process of handling X interactions on a loop.
43
- * Uses the X_ENGAGEMENT_INTERVAL setting.
44
- */
45
- start(): Promise<void>;
46
- /**
47
- * Stops the X interaction client
48
- */
49
- stop(): Promise<void>;
50
- /**
51
- * Asynchronously handles X interactions by checking for mentions and target user posts.
52
- */
53
- handleXInteractions(): Promise<void>;
54
- /**
55
- * Handle mentions and replies
56
- */
57
- private handleMentions;
58
- /**
59
- * Handle autonomous engagement with target users' posts
60
- */
61
- private handleTargetUserPosts;
62
- /**
63
- * Process posts from target users for potential engagement
64
- */
65
- private processTargetUserPosts;
66
- /**
67
- * Process timeline for engagement when wildcard is configured
68
- */
69
- private processTimelineForEngagement;
70
- /**
71
- * Determine if the bot should engage with a specific post
72
- */
73
- private shouldEngageWithPost;
74
- /**
75
- * Ensure post context exists (world, room, entity)
76
- */
77
- private ensurePostContext;
78
- /**
79
- * Engage with a post by generating and sending a reply
80
- */
81
- private engageWithPost;
82
- /**
83
- * Processes all incoming posts that mention the bot.
84
- * For each new post:
85
- * - Ensures world, room, and connection exist
86
- * - Saves the post as memory
87
- * - Emits thread-related events (THREAD_CREATED / THREAD_UPDATED)
88
- * - Delegates post content to `handlePost` for reply generation
89
- */
90
- processMentionPosts(mentionCandidates: ClientPost[]): Promise<void>;
91
- /**
92
- * Handles X interactions such as likes, reposts, and quotes.
93
- * For each interaction:
94
- * - Creates a memory object
95
- * - Emits platform-specific events (LIKE_RECEIVED, REPOST_RECEIVED, QUOTE_RECEIVED)
96
- * - Emits a generic REACTION_RECEIVED event with metadata
97
- */
98
- handleInteraction(interaction: XInteractionPayload): Promise<void>;
99
- /**
100
- * Creates a memory object for a given X interaction.
101
- *
102
- * @param {string} type - The type of interaction (e.g., 'like', 'repost', 'quote').
103
- * @param {string} id - The unique identifier for the interaction.
104
- * @param {string} userId - The ID of the user who initiated the interaction.
105
- * @param {string} conversationId - The ID of the conversation context.
106
- * @returns {XInteractionMemory} The constructed memory object.
107
- */
108
- createMemoryObject(type: string, id: string, userId: string, conversationId: string): XInteractionMemory;
109
- /**
110
- * Asynchronously handles a post by generating a response and sending it.
111
- * This method processes the post content, determines if a response is needed,
112
- * generates appropriate response text, and sends the post reply.
113
- *
114
- * @param {object} params - The parameters object containing the post, message, and thread.
115
- * @param {Post} params.post - The post object to handle.
116
- * @param {Memory} params.message - The memory object associated with the post.
117
- * @param {Post[]} params.thread - The array of posts in the thread.
118
- * @returns {object} - An object containing the text of the response and any relevant actions.
119
- */
120
- handlePost({ post, message, thread, }: {
121
- post: ClientPost;
122
- message: Memory;
123
- thread: ClientPost[];
124
- }): Promise<{
125
- text: string;
126
- actions: string[];
127
- }>;
128
- }
129
- //# sourceMappingURL=interactions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interactions.d.ts","sourceRoot":"","sources":["../interactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,aAAa,EAElB,KAAK,MAAM,EAKZ,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEzD;;;;GAIG;AACH;;;;GAIG;AACH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EAKpB,MAAM,SAAS,CAAC;AAMjB,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,CAAC;AAE3D;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;;;;OAMG;gBACS,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAmBtF;;;OAGG;IACG,KAAK;IA2BX;;OAEG;IACG,IAAI;IAKV;;OAEG;IACG,mBAAmB;IAmCzB;;OAEG;YACW,cAAc;IAgC5B;;OAEG;YACW,qBAAqB;IAiDnC;;OAEG;YACW,sBAAsB;IAsDpC;;OAEG;YACW,4BAA4B;IA4B1C;;OAEG;YACW,oBAAoB;IA8DlC;;OAEG;YACW,iBAAiB;IAsD/B;;OAEG;YACW,cAAc;IAsC5B;;;;;;;OAOG;IACG,mBAAmB,CAAC,iBAAiB,EAAE,UAAU,EAAE;IAkNzD;;;;;;OAMG;IACG,iBAAiB,CAAC,WAAW,EAAE,mBAAmB;IAmGxD;;;;;;;;OAQG;IACH,kBAAkB,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GACrB,kBAAkB;IAcrB;;;;;;;;;;OAUG;IACG,UAAU,CAAC,EACf,IAAI,EACJ,OAAO,EACP,MAAM,GACP,EAAE;QACD,IAAI,EAAE,UAAU,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,UAAU,EAAE,CAAC;KACtB;;;;CA6GF"}
package/dist/post.d.ts DELETED
@@ -1,43 +0,0 @@
1
- import { type IAgentRuntime } from "@elizaos/core";
2
- import type { ClientBase } from "./base";
3
- /**
4
- * Class representing an X post client for generating and posting.
5
- */
6
- export declare class XPostClient {
7
- client: ClientBase;
8
- runtime: IAgentRuntime;
9
- xUsername: string;
10
- private isDryRun;
11
- private state;
12
- private isRunning;
13
- private isPosting;
14
- /**
15
- * Creates an instance of XPostClient.
16
- * @param {ClientBase} client - The client instance.
17
- * @param {IAgentRuntime} runtime - The runtime instance.
18
- * @param {Record<string, unknown>} state - The state object containing configuration settings
19
- */
20
- constructor(client: ClientBase, runtime: IAgentRuntime, state: Record<string, unknown>);
21
- /**
22
- * Stops the X post client
23
- */
24
- stop(): Promise<void>;
25
- /**
26
- * Starts the X post client, setting up a loop to periodically generate new posts.
27
- */
28
- start(): Promise<void>;
29
- /**
30
- * Handles the creation and posting of a post by emitting standardized events.
31
- * This approach aligns with our platform-independent architecture.
32
- * @returns {Promise<boolean>} true if post was posted successfully
33
- */
34
- generateNewPost(): Promise<boolean>;
35
- /**
36
- * Posts content to X
37
- * @param {string} text The post text to create
38
- * @param {MediaData[]} mediaData Optional media to attach to the post
39
- * @returns {Promise<PostResponse | null>} The result from the X API
40
- */
41
- private postToX;
42
- }
43
- //# sourceMappingURL=post.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"post.d.ts","sourceRoot":"","sources":["../post.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,aAAa,EAMnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAWzC;;GAEG;AACH,qBAAa,WAAW;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,SAAS,CAAkB;IAEnC;;;;;OAKG;gBACS,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAwCtF;;OAEG;IACG,IAAI;IAKV;;OAEG;IACG,KAAK;IA8DX;;;;OAIG;IACG,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IA2OzC;;;;;OAKG;YACW,OAAO;CA6BtB"}
@@ -1,23 +0,0 @@
1
- import { type IAgentRuntime, Service } from "@elizaos/core";
2
- import { ClientBase } from "../base";
3
- import { XDiscoveryClient } from "../discovery";
4
- import { XInteractionClient } from "../interactions";
5
- import { XPostClient } from "../post";
6
- import { XTimelineClient } from "../timeline";
7
- import type { IXClient } from "../types";
8
- export declare class XClientInstance implements IXClient {
9
- client: ClientBase;
10
- post?: XPostClient;
11
- interaction?: XInteractionClient;
12
- timeline?: XTimelineClient;
13
- discovery?: XDiscoveryClient;
14
- constructor(runtime: IAgentRuntime, state: Record<string, unknown>);
15
- }
16
- export declare class XService extends Service {
17
- static serviceType: string;
18
- capabilityDescription: string;
19
- xClient?: XClientInstance;
20
- static start(runtime: IAgentRuntime): Promise<XService>;
21
- stop(): Promise<void>;
22
- }
23
- //# sourceMappingURL=x.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"x.service.d.ts","sourceRoot":"","sources":["../../services/x.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAgC,OAAO,EAAE,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,qBAAa,eAAgB,YAAW,QAAQ;IAC9C,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,SAAS,CAAC,EAAE,gBAAgB,CAAC;gBAEjB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CA6BnE;AAED,qBAAa,QAAS,SAAQ,OAAO;IACnC,MAAM,CAAC,WAAW,SAAO;IACzB,qBAAqB,SAAoD;IAElE,OAAO,CAAC,EAAE,eAAe,CAAC;WAEpB,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC;IAkCvD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAO5B"}
@@ -1,6 +0,0 @@
1
- /**
2
- * Re-export generated prompt templates
3
- * These are auto-generated from ./generated/prompts/typescript/prompts.ts
4
- */
5
- export { GENERATE_POST_TEMPLATE, generatePostTemplate, MESSAGE_HANDLER_TEMPLATE, messageHandlerTemplate, QUOTE_TWEET_TEMPLATE, quoteTweetTemplate, quoteTweetTemplate as quotePostTemplate, REPLY_TWEET_TEMPLATE, replyTweetTemplate, replyTweetTemplate as replyPostTemplate, X_ACTION_TEMPLATE, X_MESSAGE_HANDLER_TEMPLATE, xActionTemplate, xMessageHandlerTemplate, } from "./generated/prompts/typescript/prompts";
6
- //# sourceMappingURL=templates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,IAAI,iBAAiB,EACvC,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,IAAI,iBAAiB,EACvC,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,uBAAuB,GACxB,MAAM,wCAAwC,CAAC"}
@@ -1,46 +0,0 @@
1
- import { type IAgentRuntime } from "@elizaos/core";
2
- import type { ClientBase } from "./base";
3
- import type { Client, Post } from "./client/index";
4
- declare enum TIMELINE_TYPE {
5
- ForYou = "foryou",
6
- Following = "following"
7
- }
8
- export declare class XTimelineClient {
9
- client: ClientBase;
10
- xClient: Client;
11
- runtime: IAgentRuntime;
12
- isDryRun: boolean;
13
- timelineType: TIMELINE_TYPE;
14
- private state;
15
- private isRunning;
16
- constructor(client: ClientBase, runtime: IAgentRuntime, state: Record<string, unknown>);
17
- start(): Promise<void>;
18
- stop(): Promise<void>;
19
- getTimeline(count: number): Promise<Post[]>;
20
- createPostId(runtime: IAgentRuntime, post: Post): string;
21
- formMessage(runtime: IAgentRuntime, post: Post): {
22
- id: string;
23
- agentId: string;
24
- content: {
25
- text: string | undefined;
26
- url: string | undefined;
27
- imageUrls: string[];
28
- inReplyTo: string | undefined;
29
- source: string;
30
- channelType: "GROUP";
31
- post: Record<string, string | number | boolean | null | undefined>;
32
- };
33
- entityId: string;
34
- roomId: string;
35
- createdAt: number;
36
- };
37
- handleTimeline(): Promise<void>;
38
- private processTimelineActions;
39
- private ensurePostWorldContext;
40
- handleLikeAction(post: Post): Promise<void>;
41
- handleRepostAction(post: Post): Promise<void>;
42
- handleQuoteAction(post: Post): Promise<void>;
43
- handleReplyAction(post: Post): Promise<void>;
44
- }
45
- export {};
46
- //# sourceMappingURL=timeline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../timeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAOnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAQnD,aAAK,aAAa;IAChB,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,qBAAa,eAAe;IAC1B,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,aAAa,CAAC;IAC5B,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,SAAS,CAAkB;gBAEvB,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAmBhF,KAAK;IAiCL,IAAI;IAKJ,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAWjD,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI;IAO/C,WAAW,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI;;;;;;;;;;kBAuBnC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;;;;;;IAQjE,cAAc;YA+HN,sBAAsB;YA0GtB,sBAAsB;IAsB9B,gBAAgB,CAAC,IAAI,EAAE,IAAI;IAoB3B,kBAAkB,CAAC,IAAI,EAAE,IAAI;IAoB7B,iBAAiB,CAAC,IAAI,EAAE,IAAI;IA8E5B,iBAAiB,CAAC,IAAI,EAAE,IAAI;CA2DnC"}