Repository navigation
Add Cloud Agent dev environment config #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
01de4a1
Add Cloud Agent dev environment config
cursoragent e0ca48f
Auto-start web service in start.sh instead of terminals
cursoragent 8a60d4a
Run web service from a terminal; keep start.sh for Rust reconcile
cursoragent 9f22bef
Add auth-exempt GET /health readiness probe
cursoragent 7345975
Harden Cloud Agent install.sh (review feedback)
cursoragent 2f7d907
Make web startup ready-or-fail in start.sh
cursoragent e121e8f
Document the .cursor/ Cloud Agent environment in AGENTS.md
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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", | ||
|
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 } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
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 | ||
|
github-actions[bot] marked this conversation as resolved.
Outdated
github-actions[bot] marked this conversation as resolved.
Outdated
github-actions[bot] marked this conversation as resolved.
Outdated
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 | ||
|
github-actions[bot] marked this conversation as resolved.
Outdated
github-actions[bot] marked this conversation as resolved.
Outdated
github-actions[bot] marked this conversation as resolved.
Outdated
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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.