Initial commit

Co-Authored-By: Quentin Torroba <quentin.torroba@mistral.ai>
Co-Authored-By: Laure Hugo <laure.hugo@mistral.ai>
Co-Authored-By: Benjamin Trom <benjamin.trom@mistral.ai>
Co-Authored-By: Mathias Gesbert <mathias.gesbert@ext.mistral.ai>
Co-Authored-By: Michel Thomazo <michel.thomazo@mistral.ai>
Co-Authored-By: Clément Drouin <clement.drouin@mistral.ai>
Co-Authored-By: Vincent Guilloux <vincent.guilloux@mistral.ai>
Co-Authored-By: Valentin Berard <val@mistral.ai>
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Quentin Torroba 2025-12-09 13:13:22 +01:00 committed by Quentin Torroba
commit fa15fc977b
200 changed files with 30484 additions and 0 deletions

86
.github/workflows/build-and-upload.yml vendored Normal file
View file

@ -0,0 +1,86 @@
name: Build and upload
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-and-upload:
name: ${{ matrix.os }}-${{ matrix.arch }}
strategy:
matrix:
include:
# Linux
- runner: ubuntu-22.04
os: linux
arch: x86_64
# - runner: ubuntu-22.04-arm # ubuntu-22.04-arm, ubuntu-24.04-arm and windows-11-arm are not supported yet for private repositories
# os: linux
# arch: aarch64
# macOS
- runner: macos-15-intel
os: darwin
arch: x86_64
- runner: macos-14
os: darwin
arch: aarch64
# Windows
- runner: windows-2022
os: windows
arch: x86_64
# - runner: windows-11-arm # ubuntu-22.04-arm, ubuntu-24.04-arm and windows-11-arm are not supported yet for private repositories
# os: windows
# arch: aarch64
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Install uv with caching
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Sync dependencies
run: uv sync --all-extras
- name: Build with PyInstaller
run: uv run pyinstaller vibe-acp.spec
- name: Get package version with uv (Unix)
id: get_version_unix
if: ${{ matrix.os != 'windows' }}
run: python -c "import subprocess; version = subprocess.check_output(['uv', 'version']).decode().split()[1]; print(f'version={version}')" >> $GITHUB_OUTPUT
- name: Get package version with uv (Windows)
id: get_version_windows
if: ${{ matrix.os == 'windows' }}
shell: pwsh
run: python -c "import subprocess; version = subprocess.check_output(['uv', 'version']).decode().split()[1]; print(f'version={version}')" >> $env:GITHUB_OUTPUT
- name: Upload binary as artifact (Unix)
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
if: ${{ matrix.os != 'windows' }}
with:
name: vibe-acp-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.get_version_unix.outputs.version }}
path: dist/vibe-acp
- name: Upload binary as artifact (Windows)
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
if: ${{ matrix.os == 'windows' }}
with:
name: vibe-acp-${{ matrix.os }}-${{ matrix.arch }}-${{ steps.get_version_windows.outputs.version }}
path: dist/vibe-acp.exe

126
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,126 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
PYTHON_VERSION: "3.12"
jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Install uv with caching
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Sync dependencies
run: uv sync --all-extras
- name: Install pip (required by pre-commit)
run: uv pip install pip
- name: Add virtual environment to PATH
run: echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
- name: Cache pre-commit
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit
run: uv run pre-commit run --all-files --show-diff-on-failure
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Install uv with caching
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Sync dependencies
run: uv sync --all-extras
- name: Verify CLI can start
run: |
uv run vibe --help
uv run vibe-acp --help
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Run tests
run: uv run pytest --ignore tests/snapshots
snapshot-tests:
name: Snapshot Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Install uv with caching
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7
with:
version: "latest"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Sync dependencies
run: uv sync --all-extras
- name: Run snapshot tests
id: snapshot-tests
run: uv run pytest tests/snapshots
continue-on-error: true
- name: Upload snapshot report
if: steps.snapshot-tests.outcome == 'failure'
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: snapshot-report
path: snapshot_report.html
if-no-files-found: warn
retention-days: 3
- name: Fail job if snapshot tests failed
if: steps.snapshot-tests.outcome == 'failure'
run: |
echo "Snapshot tests failed, failing job."
exit 1

44
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: Release to Pipy
on:
release:
types: [published]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mistral-vibe
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
- name: Install dependencies
run: uv sync --locked --dev
- name: Build package
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
with:
name: dist
path: dist/
- name: Publish distribution to PyPI
if: github.repository == 'mistralai/mistral-vibe'
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0