Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "EcuBus-Pro",
"install": "bash .cursor/install.sh"
}
39 changes: 39 additions & 0 deletions .cursor/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
# Idempotent Cloud Agent bootstrap for EcuBus-Pro.
# Refreshes JS deps, the embedded standalone Python used for ODX/CDD/DBC
# parsing, the Linux native module stubs, and the bundled worker scripts.
set -euo pipefail

cd "$(dirname "$0")/.."

# Pinned to match .github/actions/setup-python-build/action.yml
PY_RELEASE="20260211"
PY_VERSION="3.13.12"
PY_ARCHIVE="cpython-${PY_VERSION}+${PY_RELEASE}-x86_64-unknown-linux-gnu-install_only.tar.gz"
PY_URL="https://github.com/astral-sh/python-build-standalone/releases/download/${PY_RELEASE}/${PY_ARCHIVE}"
PYTHON_BIN="resources/python/bin/python3"

echo "==> npm install"
npm install

if [ ! -x "$PYTHON_BIN" ]; then
echo "==> Downloading standalone Python ${PY_VERSION}"
tmp="$(mktemp -d)"
curl -fsSL -o "${tmp}/python.tar.gz" "$PY_URL"
mkdir -p resources
tar -xzf "${tmp}/python.tar.gz" -C resources
rm -rf "$tmp"
else
echo "==> Standalone Python already present, skipping download"
fi

echo "==> Installing Python requirements"
"$PYTHON_BIN" -m pip install -r resources/requirements.txt

echo "==> Building native modules (Linux stubs)"
npm run native

echo "==> Building worker scripts"
npm run worker:js

echo "==> Install complete"
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ This section captures non-obvious, durable notes for developing EcuBus-Pro in a

**Running the GUI:** This is an Electron desktop app. Run it with `DISPLAY=:1 npm run dev` (a headless X server is already running on display `:1`). It launches without extra `--no-sandbox` flags. The `Autofill.enable`/`Autofill.setAddresses` DevTools console errors at startup are harmless.

**Known pre-existing test failures on Linux (not environment issues):** There is no CI job that runs the Vitest suite, so some tests only pass on the original author's setup. `test/util/s19Parse.spec.ts > ok1` reads `./CMSIS-DAP_OpenSDA.s19` but the committed fixture is `CMSIS-DAP_OpenSDA.S19` (case mismatch, fails on case-sensitive Linux filesystems). One `test/odx` assertion (`subfunc as first param`) is sensitive to the installed `odxtools` version. Hardware-backed suites under `test/docan`, `test/dolin`, `test/pwm`, `test/sa_dll` require physical devices and are expected to fail/skip. For a quick smoke run of hardware-independent tests: `npm run test -- --run test/util test/dbc test/odx test/viewer test/cdd test/encoding`.
**Known pre-existing test failures on Linux (not environment issues):** There is no CI job that runs the Vitest suite, so some tests only pass on the original author's setup. `test/util/s19Parse.spec.ts > ok1` reads `./CMSIS-DAP_OpenSDA.s19` but the committed fixture is `CMSIS-DAP_OpenSDA.S19` (case mismatch, fails on case-sensitive Linux filesystems). `test/dbc/dbc.test.ts > id2001.dbc` has the same problem: it reads `id2001.dbc` but the committed fixture is `ID2001.dbc`. One `test/odx` assertion (`subfunc as first param`) is sensitive to the installed `odxtools` version. Hardware-backed suites under `test/docan`, `test/dolin`, `test/pwm`, `test/sa_dll` require physical devices and are expected to fail/skip. For a quick smoke run of hardware-independent tests: `npm run test -- --run test/util test/dbc test/odx test/viewer test/cdd test/encoding`.
Loading