Skip to content

Commit 478be43

Browse files
committed
chore: sync with develop and fix conflicts
2 parents 0ae4d39 + bcad0c4 commit 478be43

File tree

94 files changed

+8168
-584
lines changed

Some content is hidden

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

94 files changed

+8168
-584
lines changed

.env.example

+54
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ STARKNET_ADDRESS=
306306
STARKNET_PRIVATE_KEY=
307307
STARKNET_RPC_URL=
308308

309+
# Lens Network Configuration
310+
LENS_ADDRESS=
311+
LENS_PRIVATE_KEY=
312+
309313
# Coinbase
310314
COINBASE_COMMERCE_KEY= # From Coinbase developer portal
311315
COINBASE_API_KEY= # From Coinbase developer portal
@@ -476,3 +480,53 @@ TAVILY_API_KEY=
476480
# Verifiable Inference Configuration
477481
VERIFIABLE_INFERENCE_ENABLED=false # Set to false to disable verifiable inference
478482
VERIFIABLE_INFERENCE_PROVIDER=opacity # Options: opacity
483+
484+
485+
# Autonome Configuration
486+
AUTONOME_JWT_TOKEN=
487+
AUTONOME_RPC=https://wizard-bff-rpc.alt.technology/v1/bff/aaa/apps
488+
489+
####################################
490+
#### Akash Network Configuration ####
491+
####################################
492+
AKASH_ENV=mainnet
493+
AKASH_NET=https://raw.githubusercontent.com/ovrclk/net/master/mainnet
494+
RPC_ENDPOINT=https://rpc.akashnet.net:443
495+
AKASH_GAS_PRICES=0.025uakt
496+
AKASH_GAS_ADJUSTMENT=1.5
497+
AKASH_KEYRING_BACKEND=os
498+
AKASH_FROM=default
499+
AKASH_FEES=20000uakt
500+
AKASH_DEPOSIT=500000uakt
501+
AKASH_MNEMONIC=
502+
AKASH_WALLET_ADDRESS=
503+
# Akash Pricing API
504+
AKASH_PRICING_API_URL=https://console-api.akash.network/v1/pricing
505+
# Default values # 1 CPU = 1000 1GB = 1000000000 1GB = 1000000000
506+
AKASH_DEFAULT_CPU=1000
507+
AKASH_DEFAULT_MEMORY=1000000000
508+
AKASH_DEFAULT_STORAGE=1000000000
509+
AKASH_SDL=example.sdl.yml
510+
# Close deployment
511+
# Close all deployments = closeAll
512+
# Close a single deployment = dseq and add the value in AKASH_CLOSE_DSEQ
513+
AKASH_CLOSE_DEP=closeAll
514+
AKASH_CLOSE_DSEQ=19729929
515+
# Provider Info we added one to check you will have to pass this into the action
516+
AKASH_PROVIDER_INFO=akash1ccktptfkvdc67msasmesuy5m7gpc76z75kukpz
517+
# Deployment Status
518+
# AKASH_DEP_STATUS = dseq or param_passed when you are building you wil pass the dseq dinamically to test you
519+
# you can pass the dseq using AKASH_DEP_DSEQ 19729929 is an example of a dseq we test while build.
520+
AKASH_DEP_STATUS=dseq
521+
AKASH_DEP_DSEQ=19729929
522+
# Gas Estimation Options: close, create, or update
523+
# qseq is required when operation is "close" 19729929 is an example of a dseq we test while build.
524+
AKASH_GAS_OPERATION=close
525+
AKASH_GAS_DSEQ=19729929
526+
# Manifest
527+
# Values: "auto" | "manual" | "validate_only" Default: "auto"
528+
AKASH_MANIFEST_MODE=auto
529+
# Default: Will use the SDL directory
530+
AKASH_MANIFEST_PATH=
531+
# Values: "strict" | "lenient" | "none" - Default: "strict"
532+
AKASH_MANIFEST_VALIDATION_LEVEL=strict

.github/workflows/integrationTests.yaml

+6-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
branches:
55
- "*"
6-
pull_request_target:
6+
pull_request:
77
branches:
88
- "*"
99

@@ -33,12 +33,9 @@ jobs:
3333
- name: Build packages
3434
run: pnpm build
3535

36-
- name: Check for API key
37-
run: |
38-
if [ -z "$OPENAI_API_KEY" ]; then
39-
echo "Error: OPENAI_API_KEY is not set."
40-
exit 1
41-
fi
42-
4336
- name: Run integration tests
44-
run: pnpm run integrationTests
37+
env:
38+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
39+
COINBASE_COMMERCE_KEY: ${{ secrets.COINBASE_COMMERCE_KEY }}
40+
run: |
41+
pnpm run integrationTests

agent/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@
5050
"@elizaos/plugin-gitbook": "workspace:*",
5151
"@elizaos/plugin-story": "workspace:*",
5252
"@elizaos/plugin-goat": "workspace:*",
53+
"@elizaos/plugin-lensNetwork": "workspace:*",
5354
"@elizaos/plugin-icp": "workspace:*",
5455
"@elizaos/plugin-image-generation": "workspace:*",
5556
"@elizaos/plugin-movement": "workspace:*",
5657
"@elizaos/plugin-nft-generation": "workspace:*",
5758
"@elizaos/plugin-node": "workspace:*",
5859
"@elizaos/plugin-solana": "workspace:*",
5960
"@elizaos/plugin-solana-agentkit": "workspace:*",
61+
"@elizaos/plugin-autonome": "workspace:*",
6062
"@elizaos/plugin-starknet": "workspace:*",
6163
"@elizaos/plugin-stargaze": "workspace:*",
6264
"@elizaos/plugin-giphy": "workspace:*",
@@ -74,6 +76,7 @@
7476
"@elizaos/plugin-3d-generation": "workspace:*",
7577
"@elizaos/plugin-fuel": "workspace:*",
7678
"@elizaos/plugin-avalanche": "workspace:*",
79+
"@elizaos/plugin-video-generation": "workspace:*",
7780
"@elizaos/plugin-web-search": "workspace:*",
7881
"@elizaos/plugin-letzai": "workspace:*",
7982
"@elizaos/plugin-thirdweb": "workspace:*",
@@ -85,6 +88,7 @@
8588
"@elizaos/plugin-allora": "workspace:*",
8689
"@elizaos/plugin-opacity": "workspace:*",
8790
"@elizaos/plugin-hyperliquid": "workspace:*",
91+
"@elizaos/plugin-akash": "workspace:*",
8892
"readline": "1.3.0",
8993
"ws": "8.18.0",
9094
"yargs": "17.7.2"

agent/src/index.ts

+49-15
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import { flowPlugin } from "@elizaos/plugin-flow";
6363
import { fuelPlugin } from "@elizaos/plugin-fuel";
6464
import { genLayerPlugin } from "@elizaos/plugin-genlayer";
6565
import { imageGenerationPlugin } from "@elizaos/plugin-image-generation";
66+
import { lensPlugin } from "@elizaos/plugin-lensNetwork";
6667
import { multiversxPlugin } from "@elizaos/plugin-multiversx";
6768
import { nearPlugin } from "@elizaos/plugin-near";
6869
import { nftGenerationPlugin } from "@elizaos/plugin-nft-generation";
@@ -71,6 +72,7 @@ import { obsidianPlugin } from "@elizaos/plugin-obsidian";
7172
import { sgxPlugin } from "@elizaos/plugin-sgx";
7273
import { solanaPlugin } from "@elizaos/plugin-solana";
7374
import { solanaAgentkitPlguin } from "@elizaos/plugin-solana-agentkit";
75+
import { autonomePlugin } from "@elizaos/plugin-autonome";
7476
import { storyPlugin } from "@elizaos/plugin-story";
7577
import { suiPlugin } from "@elizaos/plugin-sui";
7678
import { TEEMode, teePlugin } from "@elizaos/plugin-tee";
@@ -89,6 +91,7 @@ import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
8991
import { OpacityAdapter } from "@elizaos/plugin-opacity";
9092
import { openWeatherPlugin } from "@elizaos/plugin-open-weather";
9193
import { stargazePlugin } from "@elizaos/plugin-stargaze";
94+
import { akashPlugin } from "@elizaos/plugin-akash";
9295
import Database from "better-sqlite3";
9396
import fs from "fs";
9497
import net from "net";
@@ -142,10 +145,6 @@ function tryLoadFile(filePath: string): string | null {
142145
}
143146
}
144147

145-
function isAllStrings(arr: unknown[]): boolean {
146-
return Array.isArray(arr) && arr.every((item) => typeof item === "string");
147-
}
148-
149148
export async function loadCharacters(
150149
charactersArg: string
151150
): Promise<Character[]> {
@@ -231,16 +230,9 @@ export async function loadCharacters(
231230
}
232231

233232
// Handle plugins
234-
if (isAllStrings(character.plugins)) {
235-
elizaLogger.info("Plugins are: ", character.plugins);
236-
const importedPlugins = await Promise.all(
237-
character.plugins.map(async (plugin) => {
238-
const importedPlugin = await import(plugin);
239-
return importedPlugin.default;
240-
})
241-
);
242-
character.plugins = importedPlugins;
243-
}
233+
character.plugins = await handlePluginImporting(
234+
character.plugins
235+
);
244236

245237
loadedCharacters.push(character);
246238
elizaLogger.info(
@@ -263,6 +255,36 @@ export async function loadCharacters(
263255
return loadedCharacters;
264256
}
265257

258+
async function handlePluginImporting(plugins: string[]) {
259+
if (plugins.length > 0) {
260+
elizaLogger.info("Plugins are: ", plugins);
261+
const importedPlugins = await Promise.all(
262+
plugins.map(async (plugin) => {
263+
try {
264+
const importedPlugin = await import(plugin);
265+
const functionName =
266+
plugin
267+
.replace("@elizaos/plugin-", "")
268+
.replace(/-./g, (x) => x[1].toUpperCase()) +
269+
"Plugin"; // Assumes plugin function is camelCased with Plugin suffix
270+
return (
271+
importedPlugin.default || importedPlugin[functionName]
272+
);
273+
} catch (importError) {
274+
elizaLogger.error(
275+
`Failed to import plugin: ${plugin}`,
276+
importError
277+
);
278+
return []; // Return null for failed imports
279+
}
280+
})
281+
);
282+
return importedPlugins;
283+
} else {
284+
return [];
285+
}
286+
}
287+
266288
export function getTokenForProvider(
267289
provider: ModelProviderName,
268290
character: Character
@@ -618,6 +640,7 @@ export async function createAgent(
618640
getSecret(character, "SOLANA_PRIVATE_KEY")
619641
? solanaAgentkitPlguin
620642
: null,
643+
getSecret(character, "AUTONOME_JWT_TOKEN") ? autonomePlugin : null,
621644
(getSecret(character, "NEAR_ADDRESS") ||
622645
getSecret(character, "NEAR_WALLET_PUBLIC_KEY")) &&
623646
getSecret(character, "NEAR_WALLET_SECRET_KEY")
@@ -695,6 +718,10 @@ export async function createAgent(
695718
getSecret(character, "FLOW_PRIVATE_KEY")
696719
? flowPlugin
697720
: null,
721+
getSecret(character, "LENS_ADDRESS") &&
722+
getSecret(character, "LENS_PRIVATE_KEY")
723+
? lensPlugin
724+
: null,
698725
getSecret(character, "APTOS_PRIVATE_KEY") ? aptosPlugin : null,
699726
getSecret(character, "MVX_PRIVATE_KEY") ? multiversxPlugin : null,
700727
getSecret(character, "ZKSYNC_PRIVATE_KEY") ? zksyncEraPlugin : null,
@@ -738,6 +765,10 @@ export async function createAgent(
738765
getSecret(character, "HYPERLIQUID_TESTNET")
739766
? hyperliquidPlugin
740767
: null,
768+
getSecret(character, "AKASH_MNEMONIC") &&
769+
getSecret(character, "AKASH_WALLET_ADDRESS")
770+
? akashPlugin
771+
: null,
741772
].filter(Boolean),
742773
providers: [],
743774
actions: [],
@@ -927,7 +958,10 @@ const startAgents = async () => {
927958
}
928959

929960
// upload some agent functionality into directClient
930-
directClient.startAgent = async (character: Character) => {
961+
directClient.startAgent = async (character) => {
962+
// Handle plugins
963+
character.plugins = await handlePluginImporting(character.plugins);
964+
931965
// wrap it so we don't have to inject directClient later
932966
return startAgent(character, directClient);
933967
};

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ To create new tests, add a `.test.ts` file adjacent to the code you're testing.
176176

177177
## Docs Updates
178178

179-
Please make sure to vetify if the documentation provided is correct. In order to do so, please run the docs service.
179+
Please make sure to verify if the documentation provided is correct. In order to do so, please run the docs service.
180180

181181
```console
182182
docker compose -f docker-compose-docs.yaml up --build

docs/api/classes/DatabaseAdapter.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Retrieves memories based on the specified parameters.
194194

195195
• **params**
196196

197-
An object containing parameters for the memory retrieval.
197+
An object containing parameters for memory retrieval.
198198

199199
• **params.agentId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`
200200

@@ -300,7 +300,7 @@ An object containing parameters for the embedding retrieval.
300300

301301
`Promise`\<`object`[]\>
302302

303-
A Promise that resolves to an array of objects containing embeddings and levenshtein scores.
303+
A Promise that resolves to an array of objects containing embeddings and Levenshtein scores.
304304

305305
#### Implementation of
306306

docs/api/functions/composeContext.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The parameters for composing the context.
2020

2121
• **params.state**: [`State`](../interfaces/State.md)
2222

23-
The state object containing values to replace the placeholders in the template.
23+
The state object contains values to replace the placeholders in the template.
2424

2525
• **params.template**: `string` | `Function`
2626

docs/api/functions/configureSettings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Configures environment settings for browser usage
1010

1111
• **settings**: `Settings`
1212

13-
Object containing environment variables
13+
The object containing environment variables
1414

1515
## Returns
1616

docs/api/functions/splitChunks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Number of characters to overlap between chunks (default: 100)
2424

2525
`Promise`\<`string`[]\>
2626

27-
Promise resolving to array of text chunks with bleed sections
27+
Promise resolving to an array of text chunks with bleed sections
2828

2929
## Defined in
3030

docs/api/interfaces/ActionExample.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Interface: ActionExample
44

5-
Example content with associated user for demonstration purposes
5+
Example content with the associated user for demonstration purposes
66

77
## Properties
88

docs/api/interfaces/ConversationExample.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Example conversation content with user ID
1010

1111
> **userId**: \`$\{string\}-$\{string\}-$\{string\}-$\{string\}-$\{string\}\`
1212

13-
UUID of user in conversation
13+
UUID of the user in conversation
1414

1515
#### Defined in
1616

0 commit comments

Comments
 (0)