Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into ELIZAAI-18-cross…
Browse files Browse the repository at this point in the history
…-chain-swaps

# Conflicts:
#	packages/plugin-cosmos/src/actions/ibc-transfer/index.ts
#	packages/plugin-cosmos/src/actions/ibc-transfer/schema.ts
#	packages/plugin-cosmos/src/actions/ibc-transfer/services/bridge-denom-provider.ts
#	packages/plugin-cosmos/src/actions/ibc-transfer/services/ibc-transfer-action-service.ts
#	packages/plugin-cosmos/src/index.ts
#	packages/plugin-cosmos/src/shared/entities/cosmos-wallet-chains-data.ts
#	packages/plugin-cosmos/src/shared/interfaces.ts
#	packages/plugin-cosmos/src/shared/services/skip-api/assets-from-source-fetcher/skip-api-assets-from-source-fetcher.ts
#	packages/plugin-cosmos/src/templates/index.ts
#	packages/plugin-cosmos/src/tests/cosmos-ibc-transfer-action-service.test.ts
#	pnpm-lock.yaml
  • Loading branch information
stanislawkurzypBD committed Jan 20, 2025
2 parents 313564e + 3a69164 commit 79091c1
Show file tree
Hide file tree
Showing 1,251 changed files with 77,476 additions and 5,698 deletions.
19 changes: 19 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Ignore node_modules from the build context
node_modules

# Ignore logs and temporary files
*.log
*.tmp
.DS_Store

# Ignore Git files and metadata
.gitignore

# Ignore IDE and editor config files
.vscode
.idea
*.swp

# Ignore build artifacts from the host
dist
build
552 changes: 335 additions & 217 deletions .env.example

Large diffs are not rendered by default.

36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/block-mini.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Block Minified JavaScript/TypeScript

on:
pull_request:
branches: ["main", "develop", "*"]
push:
branches: ["main", "develop", "*"]

jobs:
block-minified-code:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Detect potential minified code
shell: bash
run: |
echo "Scanning for potential minified JS/TS code..."
# We'll look in .ts, .tsx, .js, .jsx files, skipping common build dirs.
FILES=$(find . \
\( -name 'node_modules' -prune \) -o \
\( -name 'dist' -prune \) -o \
\( -name 'build' -prune \) -o \
-type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' -o -name '*.jsx' \) \
-print)
if [ -z "$FILES" ]; then
echo "No relevant JS/TS files found."
exit 0
fi
THRESHOLD=1000
VIOLATIONS=0
for file in $FILES; do
# Use grep -En to capture line number and text
# If any line is ≥ THRESHOLD chars, we store those lines in RESULTS
RESULTS=$(grep -En ".{${THRESHOLD},}" "$file" || true)
if [ -n "$RESULTS" ]; then
# We have potential minified lines
while IFS= read -r match; do
# 'match' will be something like "1234:the entire matched line"
LINENUM=$(echo "$match" | cut -d: -f1)
# If you want the text, you can do:
# MATCHED_LINE=$(echo "$match" | cut -d: -f2-)
echo "::error file=$file,line=$LINENUM::Detected potential minified code (≥ $THRESHOLD chars)."
done <<< "$RESULTS"
VIOLATIONS=1
fi
done
if [ "$VIOLATIONS" -eq 1 ]; then
echo "ERROR: Minified code detected. Please remove or exclude it."
exit 1
else
echo "No minified code detected."
fi
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ jobs:
- name: Install dependencies
run: pnpm install -r --no-frozen-lockfile

- name: Run Prettier
run: pnpm run prettier --check .
- name: Setup Biome CLI
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Run Linter
run: pnpm run lint
- name: Run Biome
run: biome ci

- name: Create test env file
run: |
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/generate-readme-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ jobs:
{ code: "TH", name: "Thai" },
{ code: "TR", name: "Turkish" },
{ code: "VI", name: "Vietnamese" },
{ code: "AR", name: "Arabic" },
{ code: "RS", name: "Srpski" },
{ code: "TG", name: "Tagalog" },
{ code: "PL", name: "Polski" },
{ code: "HU", name: "Hungarian" },
{ code: "FA", name: "Persian" },
{ code: "RO", name: "Romanian" },
{ code: "GR", name: "Greek" },
{ code: "NL", name: "Dutch" },
]
permissions:
contents: write
Expand Down Expand Up @@ -53,7 +62,7 @@ jobs:
"content_path": "README.md"
}
],
"save_path": "README_${{ matrix.language.code }}.md",
save_path: "i18n/readme/README_${{ matrix.language.code }}.md",
"model": "gpt-4o"
}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/integrationTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "23.3.0"
cache: "pnpm"
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'

- name: Clean up
run: pnpm clean
- name: Configure pnpm
run: |
pnpm config set store-dir ~/.pnpm-store
pnpm config set prefer-offline true
pnpm config set node-linker hoisted
pnpm config set shamefully-hoist true
pnpm config list
- name: Install dependencies
run: pnpm install -r --no-frozen-lockfile
run: pnpm install -r --no-frozen-lockfile --prefer-offline

- name: Build packages
run: pnpm build
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,26 @@ on:
jobs:
smoke-tests:
runs-on: ubuntu-latest
container:
image: node:23-bullseye
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
- name: Cache pnpm
uses: actions/cache@v4
with:
version: 9.15.0
path: |
~/.pnpm-store
**/node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-

- uses: actions/setup-node@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
node-version: "23.3.0"
cache: "pnpm"
version: 9.15.0

- name: Run smoke tests
run: pnpm run smokeTests
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ tsup.config.bundled_*.mjs
.turbo
.cursorrules
.pnpm-store
instructions.md
wallet_data.txt

coverage
.eslintcache
Expand All @@ -60,4 +62,4 @@ agent/content

eliza.manifest
eliza.manifest.sgx
eliza.sig
eliza.sig
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@
- Add OLLAMA as Model Provider [\#221](https://github.com/elizaOS/eliza/pull/221) ([o-on-x](https://github.com/o-on-x))
- lazy load llama [\#220](https://github.com/elizaOS/eliza/pull/220) ([lalalune](https://github.com/lalalune))
- Implement grok beta [\#216](https://github.com/elizaOS/eliza/pull/216) ([MeDott29](https://github.com/MeDott29))
- Abstracts Eliza into a Package to enble publishing onto NPM along with plugin system [\#214](https://github.com/elizaOS/eliza/pull/214) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- Abstracts Eliza into a Package to enable publishing onto NPM along with plugin system [\#214](https://github.com/elizaOS/eliza/pull/214) ([ponderingdemocritus](https://github.com/ponderingdemocritus))
- add the template overrides [\#207](https://github.com/elizaOS/eliza/pull/207) ([lalalune](https://github.com/lalalune))
- Shaw fix characters paths, .ts requirement and missings args [\#204](https://github.com/elizaOS/eliza/pull/204) ([lalalune](https://github.com/lalalune))
- Fix Discord Voice and DMs [\#203](https://github.com/elizaOS/eliza/pull/203) ([lalalune](https://github.com/lalalune))
Expand Down
62 changes: 43 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,62 @@
# Use a specific Node.js version for better reproducibility
FROM node:23.3.0-slim AS builder

# Install pnpm globally and install necessary build tools
# Install pnpm globally and necessary build tools
RUN npm install -g [email protected] && \
apt-get update && \
apt-get install -y git python3 make g++ && \
apt-get upgrade -y && \
apt-get install -y \
git \
python3 \
python3-pip \
curl \
node-gyp \
ffmpeg \
libtool-bin \
autoconf \
automake \
libopus-dev \
make \
g++ \
build-essential \
libcairo2-dev \
libjpeg-dev \
libpango1.0-dev \
libgif-dev \
openssl \
libssl-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set Python 3 as the default python
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN ln -sf /usr/bin/python3 /usr/bin/python

# Set the working directory
WORKDIR /app

# Copy package.json and other configuration files
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc turbo.json ./
# Copy application code
COPY . .

# Copy the rest of the application code
COPY agent ./agent
COPY packages ./packages
COPY scripts ./scripts
COPY characters ./characters
# Install dependencies
RUN pnpm install --no-frozen-lockfile

# Install dependencies and build the project
RUN pnpm install \
&& pnpm build-docker \
&& pnpm prune --prod
# Build the project
RUN pnpm run build && pnpm prune --prod

# Create a new stage for the final image
# Final runtime image
FROM node:23.3.0-slim

# Install runtime dependencies if needed
# Install runtime dependencies
RUN npm install -g [email protected] && \
apt-get update && \
apt-get install -y git python3 && \
apt-get install -y \
git \
python3 \
ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy built artifacts and production dependencies from the builder stage
Expand All @@ -47,9 +66,14 @@ COPY --from=builder /app/.npmrc ./
COPY --from=builder /app/turbo.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/agent ./agent
COPY --from=builder /app/client ./client
COPY --from=builder /app/lerna.json ./
COPY --from=builder /app/packages ./packages
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/characters ./characters

# Set the command to run the application
CMD ["pnpm", "start"]
# Expose necessary ports
EXPOSE 3000 5173

# Command to start the application
CMD ["sh", "-c", "pnpm start & pnpm start:client"]
Loading

0 comments on commit 79091c1

Please sign in to comment.