Skip to content

Commit

Permalink
- refactor: move tools engine to deno (#55)
Browse files Browse the repository at this point in the history
* - refactor: tools bundler to use deno bundle in place of esbuild

* - refactor: tools builder to contains simple and declarative types

* - refactor: shinkai-tool-echo to be deno compatible

* - refactor: shinkai-tool-download-pages to be deno compatible

* - fix: added deno files

* - fix: added file to gitignore

* - refactor: shinkai-tool-playwright-example

* - refactor: tools bundler to be compatible with shinkai viem

* - refactor: shinkai-tool-aave-state

* - refactor: shinkai-tool-coinbase-call-faucet

* - refactor: shinkai-tool-coinbase-create-wallet

* - refactor: shinkai-tool-coinbase-get-balance

* - refactor: shinkai-tool-coinbase-get-my-address

* - refactor: shinkai-tool-coinbase-get-transactions

* - refactor: shinkai-tool-coinbase-send-tx

* - refactor: shinkai-tool-defillama-tvl-rankings

* - refactor: shinkai-tool-download-pages

* - refactor: shinkai-tool-duckduckgo-search

* - refactor: shinkai-tool-echo

* - refactor: shinkai-tool-ethplorer-tokens

* - refactor: shinkai-tool-foobar

* - refactor: shinkai-tool-json-to-md

* - refactor: shinkai-tool-leiden

* - refactor: shinkai-tool-math-exp

* - refactor: shinkai-tool-perplexity

* - refactor: shinkai-tool-perplexity-api

* - refactor: shinkai-tool-playwright-example

* - refactor: shinkai-tool-token-price

* - refactor: shinkai-tool-weather-by-city

* - refactor: shinkai-tool-web3-eth-balance

* - refactor: shinkai-tool-web3-eth-uniswap

* - refactor: shinkai-tool-youtube-summary

* - refactor: shinkai-tools-builder

* - remove: shinkai-tools-bundler project

* - fix: removed unused tsconfig

* WIP: execute tools from rust side

* - refactor: rust library to execute deno code

* - fix: deno integration into rust library

* - fix: tests

* - fix: tests

* - fix: youtube video tool

* - fix: tests

* - fix: defillama test

* - improve: add logs to tests

* - fix: json from rust to ts

* - fix: disabled failing tests on aave-loan-requester tool

* - fix: added deno to the CI

* - fix: tests

* - fix: parallel tests

* - fix: missing output folder

* - fix: ci install deno deps

* - fix: echo tool test

* - fix: tests

* - fix: add lang to youtue transcript

* - fix: add lang to transcription

* - fix: perplexity test

* - ci: bump version

* - fix: skip failing tests in CI

* - improve: added non json test

* - fix: docs generator

* - fix: improve readme
  • Loading branch information
agallardol authored Nov 7, 2024
1 parent 0e5bcc8 commit cb8d9b4
Show file tree
Hide file tree
Showing 287 changed files with 11,852 additions and 50,035 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

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

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
cache: 'npm'
cache-dependency-path: package-lock.json

- uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Cache cargo assets
id: cache
uses: actions/cache@v4
Expand All @@ -43,6 +47,7 @@ jobs:
run: |
npm cache verify
npm ci --no-audit --prefer-offline
deno install
- name: Setup Chrome
id: setup-chrome
Expand Down
64 changes: 2 additions & 62 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,68 +30,8 @@ jobs:
script: |
core.setFailed('Version mismatch')
release-shinkai-tools-backend:
needs: prebuild
name: Release Shinkai Tools Backend
environment: production
strategy:
matrix:
include:
- arch: x86_64-unknown-linux-gnu
os: ubuntu-22.04
- arch: aarch64-apple-darwin
os: macos-14
- arch: x86_64-pc-windows-msvc
os: windows-2022

runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node version
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
check-latest: false
cache: 'npm'
cache-dependency-path: package-lock.json

- name: Install dependencies
run: |
npm cache verify
npm ci --no-audit --prefer-offline
- name: Run NX build
run: npx nx build @shinkai_protocol/shinkai-tools-backend --skip-nx-cache --verbose

- name: Prepare folder to upload
env:
BINARY_NAME: shinkai-tools-backend${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }}
run: |
mkdir files-to-r2
cp ./dist/apps/shinkai-tools-backend/${{ env.BINARY_NAME }} ./files-to-r2/${{ env.BINARY_NAME }}
- name: Compress files
run: |
cd ./files-to-r2
ls
7z a -tzip ${{ needs.prebuild.outputs.version }}.zip . -sdel
- name: Upload updates.json to R2
uses: shallwefootball/s3-upload-action@master
with:
endpoint: https://54bf1bf573b3e6471e574cc4d318db64.r2.cloudflarestorage.com
aws_key_id: ${{ secrets.R2_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
aws_bucket: shinkai-download
source_dir: ./files-to-r2/
destination_dir: ./shinkai-tools-backend/binaries/production/${{ matrix.arch }}/

publish-libraries:
needs: [prebuild, release-shinkai-tools-backend]
needs: [prebuild]
runs-on: ubuntu-22.04
environment: production
steps:
Expand Down Expand Up @@ -134,4 +74,4 @@ jobs:
run: npx nx run-many -t publish --verbose
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
EMBEDDING_API_URL : ${{ vars.EMBEDDING_API_URL }}
EMBEDDING_API_URL: ${{ vars.EMBEDDING_API_URL }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ libs/shinkai-tools-runner/tools
libs/shinkai-tools-runner/shinkai-tools-runner-resources
apps/shinkai-tool-aave-load-requester/src/bundled-resources
launch.json
.DS_Store
Loading

0 comments on commit cb8d9b4

Please sign in to comment.