Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Codec Carver",
"install": "bash .cursor/install.sh",
"start": "bash .cursor/start.sh",
"terminals": [
{
"name": "web",
"command": "python3 -m uvicorn saas_web:app --host 0.0.0.0 --port 8000",
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
"description": "Codec Carver FastAPI upload UI (saas_web:app) at http://localhost:8000"
}
],
"ports": [
{ "name": "web", "port": 8000 }
]
}
28 changes: 28 additions & 0 deletions .cursor/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# Idempotent Cloud Agent setup for codec-carver.
# Runs from the repository root (/workspace) after each checkout.
set -euo pipefail

# ffmpeg/ffprobe are required at runtime for probing and conversion.
# The default Cloud Agent base image already ships them; install only if missing.
if ! command -v ffmpeg >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y --no-install-recommends ffmpeg
fi
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated

# rustfmt backs `cargo fmt` (rust-toolchain.toml pins a minimal profile without it).
rustup component add rustfmt >/dev/null 2>&1 || true
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated

# Python package (codec-carver CLI) + web/mcp extras + dev/test deps
# (interrogate, hypothesis, coverage, atheris). Installed to the user site.
python3 -m pip install --user --disable-pip-version-check -e ".[dev,web,mcp]" -r requirements-dev.txt
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-actions[bot] marked this conversation as resolved.
Outdated
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

# Rust core binary (codec-carver-core) used by the audio-library CLI.
# A fresh checkout wipes rust-core/target, so (re)build it here.
cargo build --release --manifest-path rust-core/Cargo.toml

# Expose pip --user console scripts (codec-carver, codec-carver-library, ...) in
# non-login shells too. Login shells already pick up ~/.local/bin via ~/.profile.
if ! grep -q '.local/bin' "$HOME/.bashrc" 2>/dev/null; then
printf '\nif [ -d "$HOME/.local/bin" ]; then PATH="$HOME/.local/bin:$PATH"; fi\n' >> "$HOME/.bashrc"
fi
10 changes: 10 additions & 0 deletions .cursor/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Per-boot reconciliation: ensure the Rust backend binary exists after a fresh
# checkout (install is not re-run when a pod boots from a prebuilt environment).
# The FastAPI web service runs from the "web" terminal in environment.json.
set -euo pipefail
cd "$(dirname "$0")/.."

if [ ! -x rust-core/target/release/codec-carver-core ]; then
cargo build --release --manifest-path rust-core/Cargo.toml
fi
Loading