Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
agallardol committed Jun 4, 2024
1 parent 8248f52 commit 938e7c1
Show file tree
Hide file tree
Showing 972 changed files with 101,606 additions and 9,444 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/node_modules
**/android
**/ios
53 changes: 53 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"root": true,
"extends": ["eslint:recommended", "plugin:react/recommended"],
"ignorePatterns": ["**/*"],
"plugins": ["@nx", "simple-import-sort"],
"rules": {
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
"simple-import-sort/imports": "error",
"react/jsx-sort-props": "warn",
"react/prop-types": "off",
"react/self-closing-comp": "warn"
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"react/no-unknown-property": ["error", { "ignore": ["cmdk-input-wrapper"] }]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apps/shinkai-desktop/src-tauri/bin/* filter=lfs diff=lfs merge=lfs -text
apps/shinkai-desktop/src-tauri/bin/** filter=lfs diff=lfs merge=lfs -text
7 changes: 3 additions & 4 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
branches: [main]
schedule:
- cron: "0 5 ? * 0" # Weekly every Sunday 05:00 UTC
- cron: "0 5 * * 0" # Weekly every Sunday 05:00 UTC

workflow_dispatch:

Expand All @@ -22,7 +22,6 @@ jobs:
# must use login shell (-l) to have nvm preinstalled, -e exits shell on nonzero exit codes
shell: bash -e -l {0}
run: |
cd visor-extension
NODE=$(jq -r .engines.node ./package.json)
NPM=$(jq -r .engines.npm ./package.json)
echo "Node/npm version: ${NODE}/${NPM} - found on package.json"
Expand All @@ -31,6 +30,6 @@ jobs:
echo "RUN:\"npm i -g npm@${NPM}\" => Set up npm ${NPM}"
npm i -g npm@"${NPM}"
echo "RUN:\"npm i --package-lock-only\" => Creates package-lock.json which is used by audit, also audits, but always exits with 0 and gives a very short output."
npm i --package-lock-only
npm i --package-lock-only --ignore-scripts
echo "RUN:\"npm audit\" => Runs the actual audit."
npm audit --audit-level=moderate
npm audit --audit-level=moderate --omit=dev @tauri-apps/cli
80 changes: 80 additions & 0 deletions .github/workflows/pr-ci-healchecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: PR CI Health checks

on:
pull_request:
branches: [ main ]

defaults:
run:
working-directory: ./

jobs:
health-checks:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use nx set shas
uses: nrwl/nx-set-shas@v3


- name: Setup Node version
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: false
registry-url: https://registry.npmjs.org
cache: "npm"
cache-dependency-path: package-lock.json

- name: Install dependencies
run: |
npm cache verify
npm ci --no-audit --prefer-offline
- name: Download side binaries
env:
ARCH: x86_64-unknown-linux-gnu
SHINKAI_NODE_VERSION: v0.7.6
OLLAMA_VERSION: v0.1.41
run: |
npx ts-node ./ci-scripts/download-side-binaries.ts
- name: (Linux) Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev
- name: Run NX target on all projects
env:
OPEN_AI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
run: |
npx nx run-many -t lint,build,test --parallel=3 --skip-nx-cache --verbose --exclude=shinkai-desktop
npx nx lint shinkai-desktop
# - name: Run E2E for Visor
# id: visor-e2e-tests
# continue-on-error: true
# env:
# OPEN_AI_API_KEY: ${{ secrets.OPEN_AI_API_KEY }}
# SHINKAI_NODE_EXEC_PATH: ./apps/shinkai-visor-e2e/src/shinkai-node/shinkai_node_linux
# run: |
# chmod +x ./apps/shinkai-visor-e2e/src/shinkai-node/shinkai_node_linux
# npx nx e2e shinkai-visor-e2e --verbose
#
# - name: Upload playwright trace and videos
# uses: actions/upload-artifact@v4
# if: steps.visor-e2e-tests.outcome == 'failure'
# with:
# name: visor-e2e-results
# path: ./apps/shinkai-visor-e2e/test-report/
# retention-days: 1
#
# - name: Fail when Visor E2E failed and reports were uploaded
# if: steps.visor-e2e-tests.outcome == 'failure'
# run: |
# echo "Visor E2E failed"
# exit 1
Loading

0 comments on commit 938e7c1

Please sign in to comment.