Skip to content

Commit

Permalink
conflict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSero committed Jan 18, 2025
2 parents 631dfcb + 87793af commit 1d6d21d
Show file tree
Hide file tree
Showing 110 changed files with 8,494 additions and 2,004 deletions.
10 changes: 8 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SUPABASE_ANON_KEY=
# Comma separated list of remote character urls (optional)
REMOTE_CHARACTER_URLS=

# Logging
DEFAULT_LOG_LEVEL=warn
LOG_JSON_FORMAT=false # Print everything in logger as json; false by default

###############################
#### Client Configurations ####
###############################
Expand Down Expand Up @@ -232,8 +236,10 @@ LARGE_ANTHROPIC_MODEL= # Default: claude-3-5-sonnet-20241022
HEURIST_API_KEY= # Get from https://heurist.ai/dev-access
SMALL_HEURIST_MODEL= # Default: meta-llama/llama-3-70b-instruct
MEDIUM_HEURIST_MODEL= # Default: meta-llama/llama-3-70b-instruct
LARGE_HEURIST_MODEL= # Default: meta-llama/llama-3.1-405b-instruct
HEURIST_IMAGE_MODEL= # Default: PepeXL
LARGE_HEURIST_MODEL= # Default: meta-llama/llama-3.3-70b-instruct
HEURIST_IMAGE_MODEL= # Default: FLUX.1-dev
HEURIST_EMBEDDING_MODEL= # Default: BAAI/bge-large-en-v1.5
USE_HEURIST_EMBEDDING= # Set to TRUE for HEURIST embedding, leave blank for local

# Gaianet Configuration
GAIANET_MODEL=
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest
container:
image: node:23-bullseye
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4

Expand Down
14 changes: 2 additions & 12 deletions agent/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@elizaos/agent",
"version": "0.1.9-alpha.1",
"version": "0.1.9-alpha.1",
"main": "src/index.ts",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -32,18 +31,14 @@
"@elizaos/client-telegram": "workspace:*",
"@elizaos/client-twitter": "workspace:*",
"@elizaos/client-instagram": "workspace:*",
"@elizaos/client-instagram": "workspace:*",
"@elizaos/client-slack": "workspace:*",
"@elizaos/core": "workspace:*",
"@elizaos/plugin-0g": "workspace:*",
"@elizaos/plugin-abstract": "workspace:*",
"@elizaos/plugin-agentkit": "workspace:*",
"@elizaos/plugin-agentkit": "workspace:*",
"@elizaos/plugin-aptos": "workspace:*",
"@elizaos/plugin-birdeye": "workspace:*",
"@elizaos/plugin-coingecko": "workspace:*",
"@elizaos/plugin-birdeye": "workspace:*",
"@elizaos/plugin-coingecko": "workspace:*",
"@elizaos/plugin-coinmarketcap": "workspace:*",
"@elizaos/plugin-binance": "workspace:*",
"@elizaos/plugin-avail": "workspace:*",
Expand All @@ -58,7 +53,6 @@
"@elizaos/plugin-gitbook": "workspace:*",
"@elizaos/plugin-story": "workspace:*",
"@elizaos/plugin-gitcoin-passport": "workspace:*",
"@elizaos/plugin-gitcoin-passport": "workspace:*",
"@elizaos/plugin-goat": "workspace:*",
"@elizaos/plugin-lensNetwork": "workspace:*",
"@elizaos/plugin-icp": "workspace:*",
Expand All @@ -69,9 +63,7 @@
"@elizaos/plugin-node": "workspace:*",
"@elizaos/plugin-solana": "workspace:*",
"@elizaos/plugin-injective": "workspace:*",
"@elizaos/plugin-injective": "workspace:*",
"@elizaos/plugin-solana-agentkit": "workspace:*",
"@elizaos/plugin-squid-router": "workspace:*",
"@elizaos/plugin-solana-agent-kit": "workspace:*",
"@elizaos/plugin-squid-router": "workspace:*",
"@elizaos/plugin-autonome": "workspace:*",
"@elizaos/plugin-starknet": "workspace:*",
Expand All @@ -96,12 +88,10 @@
"@elizaos/plugin-video-generation": "workspace:*",
"@elizaos/plugin-web-search": "workspace:*",
"@elizaos/plugin-dexscreener": "workspace:*",
"@elizaos/plugin-dexscreener": "workspace:*",
"@elizaos/plugin-letzai": "workspace:*",
"@elizaos/plugin-thirdweb": "workspace:*",
"@elizaos/plugin-genlayer": "workspace:*",
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
"@elizaos/plugin-tee-verifiable-log": "workspace:*",
"@elizaos/plugin-depin": "workspace:*",
"@elizaos/plugin-open-weather": "workspace:*",
"@elizaos/plugin-obsidian": "workspace:*",
Expand All @@ -125,4 +115,4 @@
"ts-node": "10.9.2",
"tsup": "8.3.5"
}
}
}
9 changes: 5 additions & 4 deletions agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { SlackClientInterface } from "@elizaos/client-slack";
import { TelegramClientInterface } from "@elizaos/client-telegram";
import { TwitterClientInterface } from "@elizaos/client-twitter";
import { FarcasterClientInterface } from "@elizaos/client-farcaster";
import { DirectClient } from "@elizaos/client-direct";
// import { ReclaimAdapter } from "@elizaos/plugin-reclaim";
import { PrimusAdapter } from "@elizaos/plugin-primus";
import { elizaCodeinPlugin, onchainJson } from "@elizaos/plugin-iq6900";
Expand Down Expand Up @@ -84,7 +85,7 @@ import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
import { quaiPlugin } from "@elizaos/plugin-quai";
import { sgxPlugin } from "@elizaos/plugin-sgx";
import { solanaPlugin } from "@elizaos/plugin-solana";
import { solanaAgentkitPlugin } from "@elizaos/plugin-solana-agentkit";
import { solanaAgentkitPlugin } from "@elizaos/plugin-solana-agent-kit";
import { squidRouterPlugin } from "@elizaos/plugin-squid-router";
import { stargazePlugin } from "@elizaos/plugin-stargaze";
import { storyPlugin } from "@elizaos/plugin-story";
Expand Down Expand Up @@ -196,7 +197,7 @@ export async function loadCharacterFromOnchain(): Promise<Character[]> {
const jsonText = onchainJson;

console.log("JSON:", jsonText);
if (jsonText == "null") return [];
if (!jsonText) return [];
const loadedCharacters = [];
try {
const character = JSON.parse(jsonText);
Expand Down Expand Up @@ -769,7 +770,7 @@ export async function createAgent(
// Validate TEE configuration
if (teeMode !== TEEMode.OFF && !walletSecretSalt) {
elizaLogger.error(
"WALLET_SECRET_SALT required when TEE_MODE is enabled"
"A WALLET_SECRET_SALT required when TEE_MODE is enabled"
);
throw new Error("Invalid TEE configuration");
}
Expand Down Expand Up @@ -1199,7 +1200,7 @@ const startAgents = async () => {
characters = await loadCharacterFromOnchain();
}

if ((onchainJson == "null" && charactersArg) || hasValidRemoteUrls()) {
if ((!onchainJson && charactersArg) || hasValidRemoteUrls()) {
characters = await loadCharacters(charactersArg);
}

Expand Down
4 changes: 2 additions & 2 deletions characters/cosmosHelper.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
],
"knowledge": [
"Knows how Cosmos blockchain works",
"Knows what actions should he call for token transfer, swapping or bridging",
"Knows what actions should be called for token transfer, swapping or bridging",
"Knows that users might want to do specific actions multiple times and should help them by doing it again.",
"Should always ask for confirmation before calling an COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP actions.",
"Should call actions COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP only after previous confirmation."
Expand Down Expand Up @@ -86,7 +86,7 @@
{
"user": "CosmosHelper",
"content": {
"text": "Sure, your transfer i being processed."
"text": "Sure, your transfer is being processed."
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion characters/eternalai.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
{
"user": "{{user1}}",
"content": {
"text": "arent you worried about agi killing us all, or everyone gettig addicted to ai holodecks or any of that"
"text": "arent you worried about agi killing us all, or everyone getting addicted to ai holodecks or any of that"
}
},
{
Expand Down
3 changes: 1 addition & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"extract-version": "sh version.sh",
"dev": "pnpm run extract-version && vite",
"build": "pnpm run extract-version && tsc -b && vite build",
"preview": "vite preview",
"lint": "eslint ."
"preview": "vite preview"
},
"dependencies": {
"@elizaos/core": "workspace:*",
Expand Down
27 changes: 18 additions & 9 deletions client/src/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@/components/ui/chat/chat-bubble";
import { ChatInput } from "@/components/ui/chat/chat-input";
import { ChatMessageList } from "@/components/ui/chat/chat-message-list";
import { useTransition, animated } from "@react-spring/web";
import { useTransition, animated, AnimatedProps } from "@react-spring/web";
import { Paperclip, Send, X } from "lucide-react";
import { useEffect, useRef, useState } from "react";
import type { Content, UUID } from "@elizaos/core";
Expand All @@ -23,14 +23,18 @@ import type { IAttachment } from "@/types";
import { AudioRecorder } from "./audio-recorder";
import { Badge } from "./ui/badge";

interface ExtraContentFields {
type ExtraContentFields = {
user: string;
createdAt: number;
isLoading?: boolean;
}
};

type ContentWithUser = Content & ExtraContentFields;

type AnimatedDivProps = AnimatedProps<{ style: React.CSSProperties }> & {
children?: React.ReactNode;
};

export default function Page({ agentId }: { agentId: UUID }) {
const { toast } = useToast();
const [selectedFile, setSelectedFile] = useState<File | null>(null);
Expand Down Expand Up @@ -67,7 +71,6 @@ export default function Page({ agentId }: { agentId: UUID }) {
}
};


const handleSendMessage = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (!input) return;
Expand Down Expand Up @@ -167,17 +170,23 @@ export default function Page({ agentId }: { agentId: UUID }) {
leave: { opacity: 0, transform: "translateY(10px)" },
});

const CustomAnimatedDiv = animated.div as React.FC<AnimatedDivProps>;

return (
<div className="flex flex-col w-full h-[calc(100dvh)] p-4">
<div className="flex-1 overflow-y-auto">
<ChatMessageList ref={messagesContainerRef}>
{transitions((styles, message) => {
const variant = getMessageVariant(message?.user);
return (
// @ts-expect-error
<animated.div
style={styles}
className="flex flex-col gap-2 p-4"
<CustomAnimatedDiv
style={{
...styles,
display: "flex",
flexDirection: "column",
gap: "0.5rem",
padding: "1rem",
}}
>
<ChatBubble
variant={variant}
Expand Down Expand Up @@ -266,7 +275,7 @@ export default function Page({ agentId }: { agentId: UUID }) {
</div>
</div>
</ChatBubble>
</animated.div>
</CustomAnimatedDiv>
);
})}
</ChatMessageList>
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/ui/breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const BreadcrumbEllipsis = ({
<span className="sr-only">More</span>
</span>
);
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";

export {
Breadcrumb,
Expand Down
2 changes: 1 addition & 1 deletion client/src/lib/api.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { UUID, Character } from "@elizaos/core";

const BASE_URL = `http://localhost:${import.meta.env.VITE_SERVER_PORT}`;
const BASE_URL = `http://localhost:${import.meta.env.VITE_SERVER_PORT ?? 3000}`;

const fetcher = async ({
url,
Expand Down
7 changes: 4 additions & 3 deletions client/src/routes/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ import type { UUID } from "@elizaos/core";
export default function AgentRoute() {
const { agentId } = useParams<{ agentId: UUID }>();

if (!agentId) return <div>No data.</div>;

const query = useQuery({
queryKey: ["agent", agentId],
queryFn: () => apiClient.getAgent(agentId),
queryFn: () => apiClient.getAgent(agentId ?? ""),
refetchInterval: 5_000,
enabled: Boolean(agentId),
});

if (!agentId) return <div>No data.</div>;

const character = query?.data?.character;

if (!character) return null;
Expand Down
25 changes: 25 additions & 0 deletions client/version.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off
setlocal enabledelayedexpansion

set "LERNA_FILE=..\lerna.json"

if not exist "%LERNA_FILE%" (
echo Error: %LERNA_FILE% does not exist.
exit /b 1
)

for /f "tokens=2 delims=:, " %%a in ('findstr "version" "%LERNA_FILE%"') do (
set "VERSION=%%~a"
)

if "!VERSION!"=="" (
echo Error: Unable to extract version from %LERNA_FILE%.
exit /b 1
)

if not exist "src\" mkdir src
echo { "version": !VERSION! } > src\info.json
if errorlevel 1 (
echo Error: Failed to write src\info.json
exit /b 1
)
4 changes: 2 additions & 2 deletions docs/api/classes/MemoryCacheAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

### new MemoryCacheAdapter()

> **new MemoryCacheAdapter**(`initalData`?): [`MemoryCacheAdapter`](MemoryCacheAdapter.md)
> **new MemoryCacheAdapter**(`initialData`?): [`MemoryCacheAdapter`](MemoryCacheAdapter.md)
#### Parameters

**initalData?**: `Map`\<`string`, `string`\>
**initialData?**: `Map`\<`string`, `string`\>

#### Returns

Expand Down
2 changes: 1 addition & 1 deletion docs/community/ai16z/degenai/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We can rebuild him
- ai16z is the biggest holder of degenai (a pumpfun coin)
- Current plan for ai16z still is buybacks of degenai
- To-do: We need to surface this better (like a website)
- DegenspartanAI also stacks his own coin as well
- DegenSpartanAI also stacks his own coin as well
- Shitposting while trading
- He might just dump your shit
- May do psyops like self fuds his own bags
Expand Down
Loading

0 comments on commit 1d6d21d

Please sign in to comment.