|
1 | 1 | import { PostgresDatabaseAdapter } from "@ai16z/adapter-postgres";
|
2 | 2 | import { SqliteDatabaseAdapter } from "@ai16z/adapter-sqlite";
|
3 | 3 | import { AutoClientInterface } from "@ai16z/client-auto";
|
4 |
| -import { DirectClientInterface } from "@ai16z/client-direct"; |
5 | 4 | import { DiscordClientInterface } from "@ai16z/client-discord";
|
| 5 | +import { FarcasterAgentClient } from "@ai16z/client-farcaster"; |
| 6 | +import { SlackClientInterface } from "@ai16z/client-slack"; |
6 | 7 | import { TelegramClientInterface } from "@ai16z/client-telegram";
|
7 | 8 | import { TwitterClientInterface } from "@ai16z/client-twitter";
|
8 |
| -import { FarcasterAgentClient } from "@ai16z/client-farcaster"; |
9 | 9 | import {
|
10 | 10 | AgentRuntime,
|
11 | 11 | CacheManager,
|
12 | 12 | Character,
|
13 |
| - Clients, |
14 | 13 | DbCacheAdapter,
|
| 14 | + defaultCharacter, |
| 15 | + elizaLogger, |
15 | 16 | FsCacheAdapter,
|
16 | 17 | IAgentRuntime,
|
17 | 18 | ICacheManager,
|
18 | 19 | IDatabaseAdapter,
|
19 | 20 | IDatabaseCacheAdapter,
|
20 | 21 | ModelProviderName,
|
21 |
| - defaultCharacter, |
22 |
| - elizaLogger, |
23 | 22 | settings,
|
24 | 23 | stringToUuid,
|
25 | 24 | validateCharacterConfig,
|
26 | 25 | } from "@ai16z/eliza";
|
27 | 26 | import { zgPlugin } from "@ai16z/plugin-0g";
|
28 |
| -import createGoatPlugin from "@ai16z/plugin-goat"; |
29 | 27 | import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
|
| 28 | +import createGoatPlugin from "@ai16z/plugin-goat"; |
30 | 29 | // import { intifacePlugin } from "@ai16z/plugin-intiface";
|
| 30 | +import { DirectClient } from "@ai16z/client-direct"; |
| 31 | +import { aptosPlugin } from "@ai16z/plugin-aptos"; |
31 | 32 | import {
|
| 33 | + advancedTradePlugin, |
32 | 34 | coinbaseCommercePlugin,
|
33 | 35 | coinbaseMassPaymentsPlugin,
|
34 |
| - tradePlugin, |
35 | 36 | tokenContractPlugin,
|
| 37 | + tradePlugin, |
36 | 38 | webhookPlugin,
|
37 |
| - advancedTradePlugin, |
38 | 39 | } from "@ai16z/plugin-coinbase";
|
39 |
| -import { DirectClient } from "@ai16z/client-direct"; |
40 | 40 | import { confluxPlugin } from "@ai16z/plugin-conflux";
|
41 |
| -import { zksyncEraPlugin } from "@ai16z/plugin-zksync-era"; |
42 |
| -import { imageGenerationPlugin } from "@ai16z/plugin-image-generation"; |
43 | 41 | import { evmPlugin } from "@ai16z/plugin-evm";
|
44 |
| -import { createNodePlugin } from "@ai16z/plugin-node"; |
45 |
| -import { solanaPlugin } from "@ai16z/plugin-solana"; |
46 |
| -import { teePlugin, TEEMode } from "@ai16z/plugin-tee"; |
47 |
| -import { aptosPlugin, TransferAptosToken } from "@ai16z/plugin-aptos"; |
48 |
| -import { tonPlugin } from "@ai16z/plugin-ton"; |
49 | 42 | import { flowPlugin } from "@ai16z/plugin-flow";
|
| 43 | +import { imageGenerationPlugin } from "@ai16z/plugin-image-generation"; |
50 | 44 | import { multiversxPlugin } from "@ai16z/plugin-multiversx";
|
51 | 45 | import { nearPlugin } from "@ai16z/plugin-near";
|
| 46 | +import { createNodePlugin } from "@ai16z/plugin-node"; |
| 47 | +import { solanaPlugin } from "@ai16z/plugin-solana"; |
| 48 | +import { TEEMode, teePlugin } from "@ai16z/plugin-tee"; |
| 49 | +import { tonPlugin } from "@ai16z/plugin-ton"; |
| 50 | +import { zksyncEraPlugin } from "@ai16z/plugin-zksync-era"; |
52 | 51 | import Database from "better-sqlite3";
|
53 | 52 | import fs from "fs";
|
54 | 53 | import path from "path";
|
55 |
| -import readline from "readline"; |
56 | 54 | import { fileURLToPath } from "url";
|
57 | 55 | import yargs from "yargs";
|
58 | 56 |
|
@@ -376,6 +374,12 @@ export async function initializeClients(
|
376 | 374 |
|
377 | 375 | elizaLogger.log("client keys", Object.keys(clients));
|
378 | 376 |
|
| 377 | + // TODO: Add Slack client to the list |
| 378 | + if (clientTypes.includes("slack")) { |
| 379 | + const slackClient = await SlackClientInterface.start(runtime); |
| 380 | + if (slackClient) clients.push(slackClient); |
| 381 | + } |
| 382 | + |
379 | 383 | if (character.plugins?.length > 0) {
|
380 | 384 | for (const plugin of character.plugins) {
|
381 | 385 | // if plugin has clients, add those..
|
|
0 commit comments