~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
Fix formatting for automation workflow files
LearningCircuitba244054159d
diff --git a/.github/sync-config.yml b/.github/sync-config.ymlnew file mode 100644index 0000000000..e498f5262e--- /dev/null+++ b/.github/sync-config.yml@@ -0,0 +1,35 @@+# Configuration for automated main-to-dev sync+sync:+ # Enable/disable automatic syncing+ enabled: true++ # Auto-merge PRs when there are no conflicts+ auto_merge_clean: true++ # Branches to sync from main to+ target_branches:+ - dev++ # Ignore sync if these strings are in the commit message+ ignore_patterns:+ - "Merge pull request"+ - "from LearningCircuit/local-deep-research:dev"+ - "[skip sync]"+ - "[no sync]"++ # Labels to add to sync PRs+ labels:+ clean: ["sync", "auto-merge"]+ conflicts: ["sync", "conflicts", "manual-review-required"]++ # Reviewers to assign for conflict resolution+ conflict_reviewers:+ - "maintainer" # Replace with actual GitHub usernames++ # Additional settings+ settings:+ # Delete sync branches after successful merge+ delete_branch_after_merge: true++ # Maximum number of sync attempts per day+ max_daily_syncs: 10diff --git a/.github/workflows/auto-merge-sync.yml b/.github/workflows/auto-merge-sync.ymlnew file mode 100644index 0000000000..84c194c08b--- /dev/null+++ b/.github/workflows/auto-merge-sync.yml@@ -0,0 +1,40 @@+name: Auto-merge Clean Syncs++on:+ pull_request:+ types: [opened, synchronize]+ branches:+ - dev++jobs:+ auto-merge-sync:+ runs-on: ubuntu-latest+ # Only run on sync PRs without conflicts+ if: startsWith(github.event.pull_request.title, '✅ Sync main to dev') && contains(github.event.pull_request.labels.*.name, 'auto-merge')++ steps:+ - name: Checkout repository+ uses: actions/checkout@v4++ - name: Enable auto-merge+ uses: actions/github-script@v7+ with:+ script: |+ await github.rest.pulls.createReview({+ owner: context.repo.owner,+ repo: context.repo.repo,+ pull_request_number: context.issue.number,+ event: 'APPROVE',+ body: '✅ Auto-approved: Clean sync with no conflicts detected.'+ });++ await github.rest.pulls.merge({+ owner: context.repo.owner,+ repo: context.repo.repo,+ pull_request_number: context.issue.number,+ commit_title: `Automated sync: ${context.payload.pull_request.title}`,+ commit_message: 'Automatically merged clean sync from main to dev',+ merge_method: 'merge'+ });++ console.log(`Auto-merged PR #${context.issue.number}`);diff --git a/.github/workflows/sync-main-to-dev.yml b/.github/workflows/sync-main-to-dev.ymlnew file mode 100644index 0000000000..8b2af091b9--- /dev/null+++ b/.github/workflows/sync-main-to-dev.yml@@ -0,0 +1,168 @@+name: Sync Main to Dev++on:+ push:+ branches:+ - main++jobs:+ sync-main-to-dev:+ runs-on: ubuntu-latest+ # Only run if the push is not from a merge of dev branch+ if: ${{ !contains(github.event.head_commit.message, 'Merge pull request') || !contains(github.event.head_commit.message, 'from LearningCircuit/local-deep-research:dev') }}++ steps:+ - name: Checkout repository+ uses: actions/checkout@v4+ with:+ fetch-depth: 0+ token: ${{ secrets.GITHUB_TOKEN }}++ - name: Configure Git+ run: |+ git config user.name "github-actions[bot]"+ git config user.email "github-actions[bot]@users.noreply.github.com"++ - name: Check if sync is needed+ id: check_sync+ run: |+ # Fetch latest changes+ git fetch origin main dev++ # Check if main and dev are already in sync+ MAIN_COMMIT=$(git rev-parse origin/main)+ DEV_COMMIT=$(git rev-parse origin/dev)++ echo "main_commit=$MAIN_COMMIT" >> $GITHUB_OUTPUT+ echo "dev_commit=$DEV_COMMIT" >> $GITHUB_OUTPUT++ if [ "$MAIN_COMMIT" = "$DEV_COMMIT" ]; then+ echo "sync_needed=false" >> $GITHUB_OUTPUT+ echo "Main and dev are already in sync"+ else+ echo "sync_needed=true" >> $GITHUB_OUTPUT+ echo "Sync needed: main ($MAIN_COMMIT) differs from dev ($DEV_COMMIT)"+ fi++ - name: Create sync branch+ if: steps.check_sync.outputs.sync_needed == 'true'+ id: create_branch+ run: |+ # Generate unique branch name with timestamp+ TIMESTAMP=$(date +%Y%m%d-%H%M%S)+ BRANCH_NAME="sync-main-to-dev-$TIMESTAMP"+ echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT++ # Create new branch from main+ git checkout -b $BRANCH_NAME origin/main++ # Push the new branch+ git push origin $BRANCH_NAME++ - name: Attempt merge and handle conflicts+ if: steps.check_sync.outputs.sync_needed == 'true'+ id: merge_attempt+ run: |+ BRANCH_NAME="${{ steps.create_branch.outputs.branch_name }}"++ # Try to merge dev into the sync branch+ if git merge origin/dev --no-edit; then+ echo "merge_conflicts=false" >> $GITHUB_OUTPUT+ echo "Merge successful, no conflicts"+ else+ echo "merge_conflicts=true" >> $GITHUB_OUTPUT+ echo "Merge conflicts detected"++ # Get list of conflicted files+ CONFLICTED_FILES=$(git diff --name-only --diff-filter=U)+ echo "conflicted_files<<EOF" >> $GITHUB_OUTPUT+ echo "$CONFLICTED_FILES" >> $GITHUB_OUTPUT+ echo "EOF" >> $GITHUB_OUTPUT++ # Abort the merge for now+ git merge --abort+ fi++ - name: Push successful merge+ if: steps.check_sync.outputs.sync_needed == 'true' && steps.merge_attempt.outputs.merge_conflicts == 'false'+ run: |+ BRANCH_NAME="${{ steps.create_branch.outputs.branch_name }}"++ # Push the merged changes+ git push origin $BRANCH_NAME++ - name: Create Pull Request+ if: steps.check_sync.outputs.sync_needed == 'true'+ uses: actions/github-script@v7+ with:+ script: |+ const branchName = '${{ steps.create_branch.outputs.branch_name }}';+ const hasConflicts = '${{ steps.merge_attempt.outputs.merge_conflicts }}' === 'true';+ const conflictedFiles = `${{ steps.merge_attempt.outputs.conflicted_files }}`.split('\n').filter(f => f.trim());++ let title, body;++ if (hasConflicts) {+ title = `🚨 Sync main to dev (CONFLICTS) - ${branchName}`;+ body = `## ⚠️ Merge Conflicts Detected++ This automated sync from main to dev has **merge conflicts** that require manual resolution.++ ### Conflicted Files:+ ${conflictedFiles.map(file => `- \`${file}\``).join('\n')}++ ### Manual Steps Required:+ 1. Check out this branch: \`git checkout ${branchName}\`+ 2. Merge dev: \`git merge dev\`+ 3. Resolve conflicts in the files listed above+ 4. Commit the resolution: \`git commit\`+ 5. Push changes: \`git push origin ${branchName}\`++ ### What's Being Synced:+ - Latest changes from main branch+ - Preserving all dev branch improvements+ - Maintaining compatibility between branches++ **⚡ Action Required:** Please resolve conflicts manually and update this PR.`;+ } else {+ title = `✅ Sync main to dev - ${branchName}`;+ body = `## Summary+ This is an automated sync of main branch changes into dev.++ ### Changes Included:+ - All latest commits from main branch+ - No merge conflicts detected+ - Ready for review and merge++ ### Automated Process:+ - ✅ Created sync branch from main+ - ✅ Successfully merged dev branch+ - ✅ No conflicts detected+ - ✅ Ready for final review++ This ensures main and dev branches stay synchronized automatically.`;+ }++ const { data: pr } = await github.rest.pulls.create({+ owner: context.repo.owner,+ repo: context.repo.repo,+ title: title,+ head: branchName,+ base: 'dev',+ body: body+ });++ console.log(`Created PR #${pr.number}: ${pr.html_url}`);++ // Add labels+ await github.rest.issues.addLabels({+ owner: context.repo.owner,+ repo: context.repo.repo,+ issue_number: pr.number,+ labels: hasConflicts ? ['sync', 'conflicts'] : ['sync', 'auto-merge']+ });++ - name: Notify if no sync needed+ if: steps.check_sync.outputs.sync_needed == 'false'+ run: |+ echo "✅ Main and dev branches are already synchronized - no action needed"