Skip to content

Commit 84066b0

Browse files
authored
Remove db-manager CLI (#1652)
* Remove db-manager CLI * Add OS-specific db managers * Remove sendMessage property * "Standardize ping messages"
1 parent 3b40b50 commit 84066b0

File tree

11 files changed

+20
-35
lines changed

11 files changed

+20
-35
lines changed

agents/agents.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,133 +4,114 @@ const agents: AgentConfig[] = [
44
{
55
name: "elsa",
66
address: "0xe15aa1ba585aea8a4639331ce5f9aec86f8c4541",
7-
sendMessage: "hi",
87
networks: ["production"],
98
live: true,
109
},
1110
{
1211
name: "ponder",
1312
address: "0x2674f0B09B648551d2623177e2761242D708FBb2",
14-
sendMessage: "hi",
1513
networks: [],
1614
live: true,
1715
},
1816
{
1917
name: "flaunchy",
2018
address: "0x557463B158F70e4E269bB7BCcF6C587e3BC878F4",
21-
sendMessage: "hi",
2219
networks: ["production"],
2320
live: true,
2421
},
2522
{
2623
name: "mamo",
2724
address: "0x99B10779557cc52c6E3a97C9A6C3446f021290cc",
28-
sendMessage: "hi",
2925
networks: ["production"],
3026
live: true,
3127
},
3228
{
3329
name: "squabble",
3430
address: "0xD60d560c9Ae4ad9b7C252FacE7B664A8d7A426da",
35-
sendMessage: "@squabble.base.eth",
3631
networks: ["production"],
3732
live: true,
3833
},
3934
{
4035
name: "arma",
4136
address: "0x1456350CD79c51814567b0c1E767d3032dBD1647",
42-
sendMessage: "hi",
4337
networks: ["production"],
4438
live: true,
4539
},
4640
{
4741
name: "jesse",
4842
address: "0x2f9e2F8FdDEae391720D58D656a8Af0578006eD2",
49-
sendMessage: "@jesse.base.eth",
5043
networks: ["production"],
5144
live: true,
5245
},
5346
{
5447
name: "onit",
5548
address: "0xE9C89b50f3b947125FdBCdF8FBff35b9f38fB0C4",
56-
sendMessage: "hey",
5749
networks: [],
5850
live: true,
5951
},
6052
{
6153
name: "byte",
6254
address: "0xdfc00a0B28Df3c07b0942300E896C97d62014499",
63-
sendMessage: "hi",
6455
networks: [],
6556
live: true,
6657
},
6758
{
6859
name: "freysa",
6960
address: "0xEb7DB3ED8609165Ec5d99966CfDdeaE587070cD8",
70-
sendMessage: "hi",
7161
networks: ["production"],
7262
live: true,
7363
},
7464
{
7565
name: "neurobro",
7666
address: "0x9D2B24b027F4732BB87cD6531E16ce4Dc571c30c",
77-
sendMessage: "hi",
7867
networks: ["production"],
7968
live: true,
8069
},
8170
{
8271
name: "bracky",
8372
address: "0x62db4c5A8fdF004754b9EFe92dF39927aB68920d",
84-
sendMessage: "hi",
8573
networks: [],
8674
live: false,
8775
},
8876
{
8977
name: "bankr",
9078
address: "0x7f1c0d2955f873fc91f1728c19b2ed7be7a9684d",
91-
sendMessage: "hey there how are you?",
9279
networks: ["production"],
9380
live: true,
9481
},
9582
{
9683
name: "bitte",
9784
address: "0xb177e33734e982828eBb5993627ebcD7C8A9106a",
98-
sendMessage: "hi",
9985
networks: [],
10086
live: false,
10187
},
10288
{
10389
name: "tokenbot",
10490
address: "0x9E73e4126bb22f79f89b6281352d01dd3d203466",
105-
sendMessage: "@tokenbot",
10691
networks: [],
10792
live: false,
10893
},
10994
{
11095
name: "basemate",
11196
address: "0xB257b5C180b7b2cb80E35d6079AbE68D9CF0467F",
112-
sendMessage: "hi",
11397
networks: ["production"],
11498
live: true,
11599
},
116100
{
117101
name: "echo",
118102
address: "0x194c31cae1418d5256e8c58e0d08aee1046c6ed0",
119-
sendMessage: "hi from QAs",
120103
networks: ["dev"],
121104
live: false,
122105
},
123106
{
124107
name: "gm",
125108
address: "0x194c31cae1418d5256e8c58e0d08aee1046c6ed0",
126-
sendMessage: "hi from QA",
127109
networks: ["dev", "production"],
128110
live: false,
129111
},
130112
{
131113
name: "key-check",
132114
address: "0x235017975ed5F55e23a71979697Cd67DcAE614Fa",
133-
sendMessage: "/kc",
134115
networks: ["dev", "production"],
135116
live: false,
136117
},

agents/debug-dm.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { fileURLToPath } from "node:url";
22
import agents from "@agents/agents";
3+
import { PING_MESSAGE } from "@agents/helper";
34
import { Agent } from "@agents/versions";
45
import { type DecodedMessage } from "@xmtp/node-sdk";
56
import yargs from "yargs";
@@ -63,7 +64,7 @@ export async function runSendCommand(options: SendOptions): Promise<void> {
6364
);
6465
}
6566
target = agent.address;
66-
message = message || agent.sendMessage;
67+
message = message || PING_MESSAGE;
6768
console.log(`🤖 Using agent: ${agent.name} (${agent.address})`);
6869
}
6970

agents/helper.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ export interface AgentConfig {
88
name: string;
99
/** Ethereum address */
1010
address: string;
11-
/** Message to send for testing */
12-
sendMessage: string;
13-
/** Expected response messages (optional) */
14-
expectedMessage?: string[];
1511
/** Networks the agent supports */
1612
networks: string[];
1713
/** the agent is production */
@@ -64,6 +60,7 @@ export interface WaitForResponseOptions {
6460
attempt?: number;
6561
messageFilter?: (message: DecodedMessage) => boolean;
6662
}
63+
export const PING_MESSAGE = "ping from QA";
6764
export const AGENT_RESPONSE_TIMEOUT = 8000; // 10 seconds
6865

6966
/**

agents/monitoring/agents-dms.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import productionAgents from "@agents/agents";
22
import {
33
AGENT_RESPONSE_TIMEOUT,
4+
PING_MESSAGE,
45
waitForResponse,
56
type AgentConfig,
67
} from "@agents/helper";
@@ -42,7 +43,7 @@ describe(testName, () => {
4243
);
4344

4445
console.log(
45-
`📤 Sending "${agentConfig.sendMessage}" to ${agentConfig.name} (${agentConfig.address})`,
46+
`📤 Sending "${PING_MESSAGE}" to ${agentConfig.name} (${agentConfig.address})`,
4647
);
4748

4849
const result = await waitForResponse({
@@ -53,7 +54,7 @@ describe(testName, () => {
5354
conversationId: conversation.id,
5455
senderInboxId: agent.client.inboxId,
5556
timeout: AGENT_RESPONSE_TIMEOUT,
56-
messageText: agentConfig.sendMessage,
57+
messageText: PING_MESSAGE,
5758
});
5859

5960
const responseTime = Math.max(result.responseTime || 0, 0.0001);

agents/monitoring/agents-stress.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import productionAgents from "@agents/agents";
2+
import { PING_MESSAGE } from "@agents/helper";
23
import { Agent, type XmtpEnv } from "@agents/versions";
34
import { ActionsCodec } from "agents/utils/inline-actions/types/ActionsContent";
45
import { IntentCodec } from "agents/utils/inline-actions/types/IntentContent";
@@ -51,7 +52,7 @@ describe(testName, () => {
5152
const group = groups[i];
5253
for (let j = 0; j < messagesPerGroup; j++) {
5354
await group.send(
54-
`Stress test message ${j + 1}/${messagesPerGroup} to group ${i + 1}`,
55+
`${PING_MESSAGE} - ${j + 1}/${messagesPerGroup} to group ${i + 1}`,
5556
);
5657
}
5758
console.log(

agents/monitoring/agents-tagged.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import productionAgents from "@agents/agents";
22
import {
33
AGENT_RESPONSE_TIMEOUT,
4+
PING_MESSAGE,
45
waitForResponse,
56
type AgentConfig,
67
} from "@agents/helper";
@@ -38,7 +39,7 @@ describe(testName, () => {
3839
});
3940

4041
try {
41-
const testMessage = `@${agentConfig.name} ${agentConfig.sendMessage}`;
42+
const testMessage = `@${agentConfig.name} ${PING_MESSAGE}`;
4243
const testUserAddress = getInboxes(1)[0].accountAddress;
4344
const conversation = await agent.createGroupWithAddresses([
4445
agentConfig.address,

agents/monitoring/agents-text.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import productionAgents from "@agents/agents";
22
import {
33
AGENT_RESPONSE_TIMEOUT,
4+
PING_MESSAGE,
45
waitForResponse,
56
type AgentConfig,
67
} from "@agents/helper";
@@ -42,7 +43,7 @@ describe(testName, () => {
4243
);
4344

4445
console.log(
45-
`📤 Sending "${agentConfig.sendMessage}" to ${agentConfig.name} (${agentConfig.address})`,
46+
`📤 Sending "${PING_MESSAGE}" to ${agentConfig.name} (${agentConfig.address})`,
4647
);
4748

4849
const result = await waitForResponse({
@@ -53,7 +54,7 @@ describe(testName, () => {
5354
conversationId: conversation.id,
5455
senderInboxId: agent.client.inboxId,
5556
timeout: AGENT_RESPONSE_TIMEOUT,
56-
messageText: agentConfig.sendMessage,
57+
messageText: PING_MESSAGE,
5758
messageFilter: (message) => {
5859
return message.contentType?.typeId === "text";
5960
},

agents/monitoring/agents-untagged.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import productionAgents from "@agents/agents";
22
import {
33
AGENT_RESPONSE_TIMEOUT,
4+
PING_MESSAGE,
45
waitForResponse,
56
type AgentConfig,
67
} from "@agents/helper";
@@ -59,7 +60,7 @@ describe(testName, () => {
5960
conversationId: conversation.id,
6061
senderInboxId: agent.client.inboxId,
6162
timeout: AGENT_RESPONSE_TIMEOUT,
62-
messageText: "hi",
63+
messageText: PING_MESSAGE,
6364
});
6465
} catch {
6566
// Welcome message timeout is acceptable
@@ -77,7 +78,7 @@ describe(testName, () => {
7778
conversationId: conversation.id,
7879
senderInboxId: agent.client.inboxId,
7980
timeout: AGENT_RESPONSE_TIMEOUT,
80-
messageText: "hi",
81+
messageText: PING_MESSAGE,
8182
});
8283
} catch {
8384
// No response is expected for untagged messages

cli/db-manager/db-manager-macos

5.83 MB
Binary file not shown.

0 commit comments

Comments
 (0)