~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
feat: add automated NPM dependency update workflow
LearningCircuit471232a8c0b8
diff --git a/.github/workflows/README.md b/.github/workflows/README.mdnew file mode 100644index 0000000000..b5c5a59602--- /dev/null+++ b/.github/workflows/README.md@@ -0,0 +1,52 @@+# GitHub Actions Workflows++This directory contains GitHub Actions workflows for automated development tasks.++## Update NPM Dependencies Workflow++**File**: `update-npm-dependencies.yml`++### Purpose+Automatically updates NPM dependencies across all package.json files in the project and fixes security vulnerabilities.++### Triggers+- **Scheduled**: Every Thursday at 08:00 UTC (day after PDM updates)+- **Manual**: Can be triggered manually via GitHub Actions UI+- **Workflow Call**: Can be called by other workflows++### What it does+1. **Security Audit**: Runs `npm audit` to identify security vulnerabilities+2. **Security Fixes**: Automatically fixes moderate+ severity vulnerabilities with `npm audit fix`+3. **Dependency Updates**: Updates all dependencies to latest compatible versions with `npm update`+4. **Testing**: Runs relevant tests to ensure updates don't break functionality+5. **Pull Request**: Creates automated PR with all changes++### Directories Managed+- `/` - Main web dependencies (Vite, Bootstrap, etc.)+- `/tests` - Test utilities (Puppeteer, Chai, Mocha)+- `/tests/ui_tests` - UI test dependencies (Puppeteer)+- `/tests/infrastructure_tests` - Infrastructure test dependencies (Jest)++### Branch Strategy+- Creates branch: `update-npm-dependencies-{run_number}`+- Targets: `dev` branch+- Labels: `maintenance 🔧`+- Reviewers: `djpetti,HashedViking,LearningCircuit`++### Security Focus+- Only auto-fixes moderate+ severity vulnerabilities+- Preserves compatible version updates (no major version bumps)+- Runs security audit before and after updates+- Requires tests to pass before creating PR++### Manual Usage+You can manually trigger this workflow:+1. Go to Actions tab in GitHub+2. Select "Update NPM dependencies"+3. Click "Run workflow"+4. Optionally specify custom npm arguments++### Troubleshooting+- If tests fail, the PR won't be created+- Check the workflow logs for specific error messages+- Security issues that can't be auto-fixed will need manual interventiondiff --git a/.github/workflows/update-npm-dependencies.yml b/.github/workflows/update-npm-dependencies.ymlnew file mode 100644index 0000000000..364ca248fc--- /dev/null+++ b/.github/workflows/update-npm-dependencies.yml@@ -0,0 +1,128 @@+name: Update NPM dependencies+on:+ workflow_call:+ inputs:+ npm_args:+ description: Arguments to pass to npm update+ type: string+ default: --save+ workflow_dispatch:+ inputs:+ npm_args:+ description: Arguments to pass to npm update+ type: string+ default: --save+ schedule:+ - cron: '0 8 * * 4' # every Thursday at 08:00 UTC (day after PDM updates)++jobs:+ update:+ name: 📦 Update with NPM+ runs-on: ubuntu-latest+ permissions:+ contents: write # Required for creating PRs+ pull-requests: write # Required for creating PRs+ strategy:+ matrix:+ npm_directory:+ - { path: '.', build_cmd: 'npm run build', test_cmd: '', cache_path: 'package-lock.json' }+ - { path: 'tests', build_cmd: '', test_cmd: 'npm run test:api-key', cache_path: 'package-lock.json' }+ - { path: 'tests/ui_tests', build_cmd: '', test_cmd: 'echo "Skipping UI tests in CI - requires server"', cache_path: 'package-lock.json' }+ - { path: 'tests/infrastructure_tests', build_cmd: '', test_cmd: 'npm test', cache_path: 'package-lock.json' }+ steps:+ - name: 📰 Checkout+ uses: actions/checkout@v4+ with:+ ref: dev++ - name: 🟢 Setup Node.js+ uses: actions/setup-node@v4+ with:+ node-version: '20'+ cache: 'npm'+ cache-dependency-path: ${{ matrix.npm_directory.path }}/${{ matrix.npm_directory.cache_path }}++ - name: 📦 Install dependencies (if needed)+ run: |+ cd ${{ matrix.npm_directory.path }}+ if [ ! -f "package-lock.json" ]; then+ npm install+ fi++ - name: 🔍 Security audit+ run: |+ cd ${{ matrix.npm_directory.path }}+ npm audit --audit-level moderate++ - name: 🔐 Fix security vulnerabilities+ run: |+ cd ${{ matrix.npm_directory.path }}+ npm audit fix --level moderate --force++ - name: 👚 Update to latest compatible versions+ run: |+ cd ${{ matrix.npm_directory.path }}+ npm update ${{ inputs.npm_args || '--save' }}++ - name: 🔨 Build (if applicable)+ run: |+ cd ${{ matrix.npm_directory.path }}+ ${{ matrix.npm_directory.build_cmd }}+ if: matrix.npm_directory.build_cmd != ''++ - name: 🧪 Test (if applicable)+ run: |+ cd ${{ matrix.npm_directory.path }}+ ${{ matrix.npm_directory.test_cmd }}+ if: matrix.npm_directory.test_cmd != ''++ - name: 📝 Check for changes+ id: verify-changed-files+ run: |+ # Check if we're in the matrix directory+ if [ -d "${{ matrix.npm_directory.path }}" ]; then+ cd ${{ matrix.npm_directory.path }}++ # Check if package.json exists+ if [ -f "package.json" ]; then+ # Check for changes in package.json or package-lock.json+ git add package.json package-lock.json 2>/dev/null || true+ if git diff --cached --quiet package.json package-lock.json 2>/dev/null; then+ echo "changed=false" >> $GITHUB_OUTPUT+ else+ echo "changed=true" >> $GITHUB_OUTPUT+ echo "path=${{ matrix.npm_directory.path }}" >> $GITHUB_OUTPUT+ fi+ else+ echo "changed=false" >> $GITHUB_OUTPUT+ fi+ else+ echo "changed=false" >> $GITHUB_OUTPUT+ fi++ - name: 📝 Create pull request+ uses: peter-evans/create-pull-request@v7+ if: steps.verify-changed-files.outputs.changed == 'true'+ with:+ branch: update-npm-dependencies-${{ github.run_number }}+ title: 🤖 Update NPM dependencies+ body: |+ This PR updates NPM dependencies to their latest compatible versions and fixes security vulnerabilities.++ **Updated directory:** `${{ steps.verify-changed-files.outputs.path }}`++ **Changes include:**+ - Security vulnerability fixes (moderate severity and above)+ - Compatible version updates for dependencies+ - Updated lock files for reproducible builds++ This PR was created by the NPM Update Bot.+ sign-commits: true+ add-paths: |+ ${{ steps.verify-changed-files.outputs.path }}/package.json+ ${{ steps.verify-changed-files.outputs.path }}/package-lock.json+ commit-message: 🤖 Update NPM dependencies in ${{ matrix.npm_directory.path }}+ labels: maintenance 🔧+ draft: false+ base: dev+ reviewers: djpetti,HashedViking,LearningCircuit