Skip to content

Commit 7165821

Browse files
committed
Merge branch 'main' into tbh/flow-update-generateObject
2 parents 9059d9c + fa18f5a commit 7165821

Some content is hidden

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

78 files changed

+4161
-1617
lines changed

.env.example

+19-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ ALI_BAILIAN_API_KEY= # Ali Bailian API Key
2020
VOLENGINE_API_KEY= # VolEngine API Key
2121

2222
HYPERBOLIC_API_KEY= # Hyperbolic API Key
23+
HYPERBOLIC_MODEL=
24+
IMAGE_HYPERBOLIC_MODEL= # Default: FLUX.1-dev
25+
SMALL_HYPERBOLIC_MODEL= # Default: meta-llama/Llama-3.2-3B-Instruct
26+
MEDIUM_HYPERBOLIC_MODEL= # Default: meta-llama/Meta-Llama-3.1-70B-Instruct
27+
LARGE_HYPERBOLIC_MODEL= # Default: meta-llama/Meta-Llama-3.1-405-Instruct
2328

2429
# Speech Synthesis
2530
ELEVENLABS_XI_API_KEY= # API key from elevenlabs
@@ -188,7 +193,12 @@ ZEROG_PRIVATE_KEY=
188193
ZEROG_FLOW_ADDRESS=
189194

190195
# TEE Configuration
191-
DSTACK_SIMULATOR_ENDPOINT=
196+
# TEE_MODE options:
197+
# - LOCAL: Uses simulator at localhost:8090 (for local development)
198+
# - DOCKER: Uses simulator at host.docker.internal:8090 (for docker development)
199+
# - PRODUCTION: No simulator, uses production endpoints
200+
# Defaults to OFF if not specified
201+
TEE_MODE=OFF #LOCAL|DOCKER|PRODUCTION
192202
WALLET_SECRET_SALT= # ONLY DEFINE IF YOU WANT TO USE TEE Plugin, otherwise it will throw errors
193203

194204
# Galadriel Configuration
@@ -218,3 +228,11 @@ INTERNET_COMPUTER_ADDRESS=
218228
# Aptos
219229
APTOS_PRIVATE_KEY= # Aptos private key
220230
APTOS_NETWORK= # must be one of mainnet, testnet
231+
232+
233+
# AWS S3 Configuration Settings for File Upload
234+
AWS_ACCESS_KEY_ID=
235+
AWS_SECRET_ACCESS_KEY=
236+
AWS_REGION=
237+
AWS_S3_BUCKET=
238+
AWS_S3_UPLOAD_PATH=

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY characters ./characters
2525

2626
# Install dependencies and build the project
2727
RUN pnpm install \
28-
&& pnpm build \
28+
&& pnpm build-docker \
2929
&& pnpm prune --prod
3030

3131
# Create a new stage for the final image

agent/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@ai16z/plugin-0g": "workspace:*",
3030
"@ai16z/plugin-aptos": "workspace:*",
3131
"@ai16z/plugin-bootstrap": "workspace:*",
32-
"@ai16z/plugin-buttplug": "workspace:*",
32+
"@ai16z/plugin-intiface": "workspace:*",
3333
"@ai16z/plugin-coinbase": "workspace:*",
3434
"@ai16z/plugin-conflux": "workspace:*",
3535
"@ai16z/plugin-evm": "workspace:*",

agent/src/index.ts

+30-8
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ import {
2525
validateCharacterConfig,
2626
} from "@ai16z/eliza";
2727
import { zgPlugin } from "@ai16z/plugin-0g";
28-
import { goatPlugin } from "@ai16z/plugin-goat";
28+
import createGoatPlugin from "@ai16z/plugin-goat";
2929
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
30-
// import { buttplugPlugin } from "@ai16z/plugin-buttplug";
30+
// import { intifacePlugin } from "@ai16z/plugin-intiface";
3131
import {
3232
coinbaseCommercePlugin,
3333
coinbaseMassPaymentsPlugin,
@@ -41,9 +41,9 @@ import { imageGenerationPlugin } from "@ai16z/plugin-image-generation";
4141
import { evmPlugin } from "@ai16z/plugin-evm";
4242
import { createNodePlugin } from "@ai16z/plugin-node";
4343
import { solanaPlugin } from "@ai16z/plugin-solana";
44+
import { teePlugin, TEEMode } from "@ai16z/plugin-tee";
4445
import { aptosPlugin, TransferAptosToken } from "@ai16z/plugin-aptos";
4546
import { flowPlugin } from "@ai16z/plugin-flow";
46-
import { teePlugin } from "@ai16z/plugin-tee";
4747
import Database from "better-sqlite3";
4848
import fs from "fs";
4949
import path from "path";
@@ -359,7 +359,7 @@ function getSecret(character: Character, secret: string) {
359359

360360
let nodePlugin: any | undefined;
361361

362-
export function createAgent(
362+
export async function createAgent(
363363
character: Character,
364364
db: IDatabaseAdapter,
365365
cache: ICacheManager,
@@ -373,6 +373,21 @@ export function createAgent(
373373

374374
nodePlugin ??= createNodePlugin();
375375

376+
const teeMode = getSecret(character, "TEE_MODE") || "OFF";
377+
const walletSecretSalt = getSecret(character, "WALLET_SECRET_SALT");
378+
379+
// Validate TEE configuration
380+
if (teeMode !== TEEMode.OFF && !walletSecretSalt) {
381+
elizaLogger.error(
382+
"WALLET_SECRET_SALT required when TEE_MODE is enabled"
383+
);
384+
throw new Error("Invalid TEE configuration");
385+
}
386+
387+
const goatPlugin = await createGoatPlugin((secret) =>
388+
getSecret(character, secret)
389+
);
390+
376391
return new AgentRuntime({
377392
databaseAdapter: db,
378393
token,
@@ -392,7 +407,7 @@ export function createAgent(
392407
: null,
393408
getSecret(character, "EVM_PRIVATE_KEY") ||
394409
(getSecret(character, "WALLET_PUBLIC_KEY") &&
395-
!getSecret(character, "WALLET_PUBLIC_KEY")?.startsWith("0x"))
410+
getSecret(character, "WALLET_PUBLIC_KEY")?.startsWith("0x"))
396411
? evmPlugin
397412
: null,
398413
getSecret(character, "ZEROG_PRIVATE_KEY") ? zgPlugin : null,
@@ -406,14 +421,21 @@ export function createAgent(
406421
: null,
407422
...(getSecret(character, "COINBASE_API_KEY") &&
408423
getSecret(character, "COINBASE_PRIVATE_KEY")
409-
? [coinbaseMassPaymentsPlugin, tradePlugin, tokenContractPlugin, advancedTradePlugin]
424+
? [
425+
coinbaseMassPaymentsPlugin,
426+
tradePlugin,
427+
tokenContractPlugin,
428+
advancedTradePlugin,
429+
]
430+
: []),
431+
...(teeMode !== TEEMode.OFF && walletSecretSalt
432+
? [teePlugin, solanaPlugin]
410433
: []),
411434
getSecret(character, "COINBASE_API_KEY") &&
412435
getSecret(character, "COINBASE_PRIVATE_KEY") &&
413436
getSecret(character, "COINBASE_NOTIFICATION_URI")
414437
? webhookPlugin
415438
: null,
416-
getSecret(character, "WALLET_SECRET_SALT") ? teePlugin : null,
417439
getSecret(character, "ALCHEMY_API_KEY") ? goatPlugin : null,
418440
getSecret(character, "FLOW_ADDRESS") &&
419441
getSecret(character, "FLOW_PRIVATE_KEY")
@@ -460,7 +482,7 @@ async function startAgent(character: Character, directClient) {
460482
await db.init();
461483

462484
const cache = intializeDbCache(character, db);
463-
const runtime = createAgent(character, db, cache, token);
485+
const runtime = await createAgent(character, db, cache, token);
464486

465487
await runtime.initialize();
466488

docs/api/enumerations/ModelProviderName.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Available model providers
1414

1515
[packages/core/src/types.ts:215](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L215)
1616

17-
***
17+
---
1818

1919
### ETERNALAI
2020

@@ -24,7 +24,7 @@ Available model providers
2424

2525
[packages/core/src/types.ts:216](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L216)
2626

27-
***
27+
---
2828

2929
### ANTHROPIC
3030

@@ -34,7 +34,7 @@ Available model providers
3434

3535
[packages/core/src/types.ts:217](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L217)
3636

37-
***
37+
---
3838

3939
### GROK
4040

@@ -44,7 +44,7 @@ Available model providers
4444

4545
[packages/core/src/types.ts:218](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L218)
4646

47-
***
47+
---
4848

4949
### GROQ
5050

@@ -54,7 +54,7 @@ Available model providers
5454

5555
[packages/core/src/types.ts:219](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L219)
5656

57-
***
57+
---
5858

5959
### LLAMACLOUD
6060

@@ -64,7 +64,7 @@ Available model providers
6464

6565
[packages/core/src/types.ts:220](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L220)
6666

67-
***
67+
---
6868

6969
### TOGETHER
7070

@@ -74,7 +74,7 @@ Available model providers
7474

7575
[packages/core/src/types.ts:221](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L221)
7676

77-
***
77+
---
7878

7979
### LLAMALOCAL
8080

@@ -84,7 +84,7 @@ Available model providers
8484

8585
[packages/core/src/types.ts:222](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L222)
8686

87-
***
87+
---
8888

8989
### GOOGLE
9090

@@ -94,17 +94,17 @@ Available model providers
9494

9595
[packages/core/src/types.ts:223](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L223)
9696

97-
***
97+
---
9898

99-
### CLAUDE\_VERTEX
99+
### CLAUDE_VERTEX
100100

101-
> **CLAUDE\_VERTEX**: `"claude_vertex"`
101+
> **CLAUDE_VERTEX**: `"claude_vertex"`
102102
103103
#### Defined in
104104

105105
[packages/core/src/types.ts:224](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L224)
106106

107-
***
107+
---
108108

109109
### REDPILL
110110

@@ -114,7 +114,7 @@ Available model providers
114114

115115
[packages/core/src/types.ts:225](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L225)
116116

117-
***
117+
---
118118

119119
### OPENROUTER
120120

@@ -124,7 +124,7 @@ Available model providers
124124

125125
[packages/core/src/types.ts:226](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L226)
126126

127-
***
127+
---
128128

129129
### OLLAMA
130130

@@ -134,7 +134,7 @@ Available model providers
134134

135135
[packages/core/src/types.ts:227](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L227)
136136

137-
***
137+
---
138138

139139
### HEURIST
140140

@@ -144,7 +144,7 @@ Available model providers
144144

145145
[packages/core/src/types.ts:228](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L228)
146146

147-
***
147+
---
148148

149149
### GALADRIEL
150150

@@ -154,7 +154,7 @@ Available model providers
154154

155155
[packages/core/src/types.ts:229](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L229)
156156

157-
***
157+
---
158158

159159
### FAL
160160

@@ -164,7 +164,7 @@ Available model providers
164164

165165
[packages/core/src/types.ts:230](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L230)
166166

167-
***
167+
---
168168

169169
### GAIANET
170170

@@ -174,17 +174,17 @@ Available model providers
174174

175175
[packages/core/src/types.ts:231](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L231)
176176

177-
***
177+
---
178178

179-
### ALI\_BAILIAN
179+
### ALI_BAILIAN
180180

181-
> **ALI\_BAILIAN**: `"ali_bailian"`
181+
> **ALI_BAILIAN**: `"ali_bailian"`
182182
183183
#### Defined in
184184

185185
[packages/core/src/types.ts:232](https://github.com/ai16z/eliza/blob/main/packages/core/src/types.ts#L232)
186186

187-
***
187+
---
188188

189189
### VOLENGINE
190190

docs/api/type-aliases/Models.md

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Model configurations by provider
3636

3737
> **together**: [`Model`](Model.md)
3838
39+
### together
40+
41+
> **together**: [`Model`](Model.md)
42+
3943
### llama\_local
4044

4145
> **llama\_local**: [`Model`](Model.md)

0 commit comments

Comments
 (0)