Skip to content

Commit e76e400

Browse files
authored
Merge branch 'develop' into fix/react_hooks_rules_agentroute
2 parents d584f7a + ba4752b commit e76e400

File tree

47 files changed

+5450
-1195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+5450
-1195
lines changed

.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ SUPABASE_ANON_KEY=
1919
REMOTE_CHARACTER_URLS=
2020

2121
# Logging
22-
LOG_JSON_FORMAT= # Print everything in logger as json; false by default
22+
DEFAULT_LOG_LEVEL=warn
23+
LOG_JSON_FORMAT=false # Print everything in logger as json; false by default
2324

2425
###############################
2526
#### Client Configurations ####

.github/workflows/smoke-tests.yml

+5-12
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,17 @@ on:
1010
jobs:
1111
smoke-tests:
1212
runs-on: ubuntu-latest
13-
container:
14-
image: node:23-bullseye
1513
steps:
1614
- uses: actions/checkout@v4
1715

18-
- name: Cache pnpm
19-
uses: actions/cache@v4
16+
- uses: pnpm/action-setup@v3
2017
with:
21-
path: |
22-
~/.pnpm-store
23-
**/node_modules
24-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
25-
restore-keys: ${{ runner.os }}-pnpm-
18+
version: 9.15.0
2619

27-
- name: Setup pnpm
28-
uses: pnpm/action-setup@v3
20+
- uses: actions/setup-node@v4
2921
with:
30-
version: 9.15.0
22+
node-version: "23.3.0"
23+
cache: "pnpm"
3124

3225
- name: Run smoke tests
3326
run: pnpm run smokeTests

agent/package.json

+1-10
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,14 @@
3131
"@elizaos/client-telegram": "workspace:*",
3232
"@elizaos/client-twitter": "workspace:*",
3333
"@elizaos/client-instagram": "workspace:*",
34-
"@elizaos/client-instagram": "workspace:*",
3534
"@elizaos/client-slack": "workspace:*",
3635
"@elizaos/core": "workspace:*",
3736
"@elizaos/plugin-0g": "workspace:*",
3837
"@elizaos/plugin-abstract": "workspace:*",
3938
"@elizaos/plugin-agentkit": "workspace:*",
40-
"@elizaos/plugin-agentkit": "workspace:*",
4139
"@elizaos/plugin-aptos": "workspace:*",
4240
"@elizaos/plugin-birdeye": "workspace:*",
4341
"@elizaos/plugin-coingecko": "workspace:*",
44-
"@elizaos/plugin-birdeye": "workspace:*",
45-
"@elizaos/plugin-coingecko": "workspace:*",
4642
"@elizaos/plugin-coinmarketcap": "workspace:*",
4743
"@elizaos/plugin-binance": "workspace:*",
4844
"@elizaos/plugin-avail": "workspace:*",
@@ -57,7 +53,6 @@
5753
"@elizaos/plugin-gitbook": "workspace:*",
5854
"@elizaos/plugin-story": "workspace:*",
5955
"@elizaos/plugin-gitcoin-passport": "workspace:*",
60-
"@elizaos/plugin-gitcoin-passport": "workspace:*",
6156
"@elizaos/plugin-goat": "workspace:*",
6257
"@elizaos/plugin-lensNetwork": "workspace:*",
6358
"@elizaos/plugin-icp": "workspace:*",
@@ -68,9 +63,7 @@
6863
"@elizaos/plugin-node": "workspace:*",
6964
"@elizaos/plugin-solana": "workspace:*",
7065
"@elizaos/plugin-injective": "workspace:*",
71-
"@elizaos/plugin-injective": "workspace:*",
72-
"@elizaos/plugin-solana-agentkit": "workspace:*",
73-
"@elizaos/plugin-squid-router": "workspace:*",
66+
"@elizaos/plugin-solana-agent-kit": "workspace:*",
7467
"@elizaos/plugin-squid-router": "workspace:*",
7568
"@elizaos/plugin-autonome": "workspace:*",
7669
"@elizaos/plugin-starknet": "workspace:*",
@@ -95,12 +88,10 @@
9588
"@elizaos/plugin-video-generation": "workspace:*",
9689
"@elizaos/plugin-web-search": "workspace:*",
9790
"@elizaos/plugin-dexscreener": "workspace:*",
98-
"@elizaos/plugin-dexscreener": "workspace:*",
9991
"@elizaos/plugin-letzai": "workspace:*",
10092
"@elizaos/plugin-thirdweb": "workspace:*",
10193
"@elizaos/plugin-genlayer": "workspace:*",
10294
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
103-
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
10495
"@elizaos/plugin-depin": "workspace:*",
10596
"@elizaos/plugin-open-weather": "workspace:*",
10697
"@elizaos/plugin-obsidian": "workspace:*",

agent/src/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
8585
import { quaiPlugin } from "@elizaos/plugin-quai";
8686
import { sgxPlugin } from "@elizaos/plugin-sgx";
8787
import { solanaPlugin } from "@elizaos/plugin-solana";
88-
import { solanaAgentkitPlugin } from "@elizaos/plugin-solana-agentkit";
88+
import { solanaAgentkitPlugin } from "@elizaos/plugin-solana-agent-kit";
8989
import { squidRouterPlugin } from "@elizaos/plugin-squid-router";
9090
import { stargazePlugin } from "@elizaos/plugin-stargaze";
9191
import { storyPlugin } from "@elizaos/plugin-story";
@@ -197,7 +197,7 @@ export async function loadCharacterFromOnchain(): Promise<Character[]> {
197197
const jsonText = onchainJson;
198198

199199
console.log("JSON:", jsonText);
200-
if (jsonText == "null") return [];
200+
if (!jsonText) return [];
201201
const loadedCharacters = [];
202202
try {
203203
const character = JSON.parse(jsonText);
@@ -1200,7 +1200,7 @@ const startAgents = async () => {
12001200
characters = await loadCharacterFromOnchain();
12011201
}
12021202

1203-
if ((onchainJson == "null" && charactersArg) || hasValidRemoteUrls()) {
1203+
if ((!onchainJson && charactersArg) || hasValidRemoteUrls()) {
12041204
characters = await loadCharacters(charactersArg);
12051205
}
12061206

characters/cosmosHelper.character.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"knowledge": [
2626
"Knows how Cosmos blockchain works",
27-
"Knows what actions should he call for token transfer, swapping or bridging",
27+
"Knows what actions should be called for token transfer, swapping or bridging",
2828
"Knows that users might want to do specific actions multiple times and should help them by doing it again.",
2929
"Should always ask for confirmation before calling an COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP actions.",
3030
"Should call actions COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP only after previous confirmation."
@@ -86,7 +86,7 @@
8686
{
8787
"user": "CosmosHelper",
8888
"content": {
89-
"text": "Sure, your transfer i being processed."
89+
"text": "Sure, your transfer is being processed."
9090
}
9191
}
9292
]

characters/eternalai.character.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
{
8383
"user": "{{user1}}",
8484
"content": {
85-
"text": "arent you worried about agi killing us all, or everyone gettig addicted to ai holodecks or any of that"
85+
"text": "arent you worried about agi killing us all, or everyone getting addicted to ai holodecks or any of that"
8686
}
8787
},
8888
{

client/src/components/ui/breadcrumb.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ const BreadcrumbEllipsis = ({
102102
<span className="sr-only">More</span>
103103
</span>
104104
);
105-
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
105+
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
106106

107107
export {
108108
Breadcrumb,

client/version.cmd

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
@echo off
2+
setlocal enabledelayedexpansion
3+
4+
set "LERNA_FILE=..\lerna.json"
5+
6+
if not exist "%LERNA_FILE%" (
7+
echo Error: %LERNA_FILE% does not exist.
8+
exit /b 1
9+
)
10+
11+
for /f "tokens=2 delims=:, " %%a in ('findstr "version" "%LERNA_FILE%"') do (
12+
set "VERSION=%%~a"
13+
)
14+
15+
if "!VERSION!"=="" (
16+
echo Error: Unable to extract version from %LERNA_FILE%.
17+
exit /b 1
18+
)
19+
20+
if not exist "src\" mkdir src
21+
echo { "version": !VERSION! } > src\info.json
22+
if errorlevel 1 (
23+
echo Error: Failed to write src\info.json
24+
exit /b 1
25+
)

packages/client-discord/src/actions/summarize_conversation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const dateRangeTemplate = `# Messages we are summarizing (the conversatio
2828
{{recentMessages}}
2929
3030
# Instructions: {{senderName}} is requesting a summary of the conversation. Your goal is to determine their objective, along with the range of dates that their request covers.
31-
The "objective" is a detailed description of what the user wants to summarize based on the conversation. If they just ask for a general summary, you can either base it off the converation if the summary range is very recent, or set the object to be general, like "a detailed summary of the conversation between all users".
31+
The "objective" is a detailed description of what the user wants to summarize based on the conversation. If they just ask for a general summary, you can either base it off the conversation if the summary range is very recent, or set the object to be general, like "a detailed summary of the conversation between all users".
3232
The "start" and "end" are the range of dates that the user wants to summarize, relative to the current time. The start and end should be relative to the current time, and measured in seconds, minutes, hours and days. The format is "2 days ago" or "3 hours ago" or "4 minutes ago" or "5 seconds ago", i.e. "<integer> <unit> ago".
3333
If you aren't sure, you can use a default range of "0 minutes ago" to "2 hours ago" or more. Better to err on the side of including too much than too little.
3434
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import { describe, it, expect, vi } from 'vitest';
2+
import { validateInstagramConfig, instagramEnvSchema } from '../src/environment';
3+
import { IAgentRuntime } from '@elizaos/core';
4+
5+
describe('Instagram Environment Configuration', () => {
6+
const mockRuntime: IAgentRuntime = {
7+
getSetting: vi.fn(),
8+
} as unknown as IAgentRuntime;
9+
10+
it('validates correct Instagram configuration', async () => {
11+
const validConfig = {
12+
INSTAGRAM_DRY_RUN: false,
13+
INSTAGRAM_USERNAME: 'test_user',
14+
INSTAGRAM_PASSWORD: 'test_password',
15+
INSTAGRAM_APP_ID: 'test_app_id',
16+
INSTAGRAM_APP_SECRET: 'test_app_secret',
17+
INSTAGRAM_POST_INTERVAL_MIN: 60,
18+
INSTAGRAM_POST_INTERVAL_MAX: 120,
19+
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
20+
INSTAGRAM_ACTION_INTERVAL: 5,
21+
INSTAGRAM_MAX_ACTIONS: 1,
22+
};
23+
24+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
25+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
26+
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
27+
return validConfig[key as keyof typeof validConfig];
28+
});
29+
30+
const config = await validateInstagramConfig(mockRuntime);
31+
expect(config).toEqual(validConfig);
32+
});
33+
34+
it('validates configuration with optional business account', async () => {
35+
const validConfig = {
36+
INSTAGRAM_DRY_RUN: false,
37+
INSTAGRAM_USERNAME: 'test_user',
38+
INSTAGRAM_PASSWORD: 'test_password',
39+
INSTAGRAM_APP_ID: 'test_app_id',
40+
INSTAGRAM_APP_SECRET: 'test_app_secret',
41+
INSTAGRAM_BUSINESS_ACCOUNT_ID: 'business_123',
42+
INSTAGRAM_POST_INTERVAL_MIN: 60,
43+
INSTAGRAM_POST_INTERVAL_MAX: 120,
44+
INSTAGRAM_ENABLE_ACTION_PROCESSING: false,
45+
INSTAGRAM_ACTION_INTERVAL: 5,
46+
INSTAGRAM_MAX_ACTIONS: 1,
47+
};
48+
49+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
50+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
51+
if (key === 'INSTAGRAM_ENABLE_ACTION_PROCESSING') return 'false';
52+
return validConfig[key as keyof typeof validConfig];
53+
});
54+
55+
const config = await validateInstagramConfig(mockRuntime);
56+
expect(config).toEqual(validConfig);
57+
});
58+
59+
it('throws error for invalid username format', async () => {
60+
const invalidConfig = {
61+
INSTAGRAM_DRY_RUN: false,
62+
INSTAGRAM_USERNAME: 'invalid@username', // Invalid characters
63+
INSTAGRAM_PASSWORD: 'test_password',
64+
INSTAGRAM_APP_ID: 'test_app_id',
65+
INSTAGRAM_APP_SECRET: 'test_app_secret',
66+
};
67+
68+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
69+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
70+
return invalidConfig[key as keyof typeof invalidConfig];
71+
});
72+
73+
await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
74+
});
75+
76+
it('throws error for missing required fields', async () => {
77+
const invalidConfig = {
78+
INSTAGRAM_DRY_RUN: false,
79+
INSTAGRAM_USERNAME: 'test_user',
80+
// Missing password and other required fields
81+
};
82+
83+
vi.mocked(mockRuntime.getSetting).mockImplementation((key: string) => {
84+
if (key === 'INSTAGRAM_DRY_RUN') return 'false';
85+
return invalidConfig[key as keyof typeof invalidConfig];
86+
});
87+
88+
await expect(validateInstagramConfig(mockRuntime)).rejects.toThrow();
89+
});
90+
});

0 commit comments

Comments
 (0)