Files
dora-webcam/AGENTS.md
T
cristhian 3c0e0f327d
validate / validate (push) Successful in 59m15s
add dora-webcam node
Captures frames from a V4L2 camera and publishes them as std/media/v1/Image:
an Arrow struct of width, height, encoding and data, so a receiver needs
nothing from the message metadata. For a compressed encoding the recorded
dimensions are the image's, not the length of the payload.

Based on opencv-video-capture from dora-hub, with three changes. The output is
the typed image struct rather than a flat UInt8 buffer plus metadata. Camera
selection by id reads /dev/v4l/by-id/ only; the upstream macOS system_profiler
and Windows PowerShell enumeration is not carried. CAPTURE_FRAMES bounds a run
so a test ends on its own, in place of upstream's ten-second CI cutoff -- a
timeout would have made the CI step exit non-zero.

CI=true keeps a failed capture from raising, publishing a labelled black frame
instead, which is what lets dataflow.yml run on a machine with no camera.

Two dataflows, run one at a time, as dora has no cross-dataflow wiring:
dataflow.yml is the camera alone and the CI gate; dataflow_view.yml wires it
into dora-image-view and is not run by CI, since it fetches that node over the
network and needs a tag to exist there.
2026-09-15 06:04:25 -03:00

26 lines
1.1 KiB
Markdown

# AGENTS.md
Rules for AI coding assistants working in this repository.
- **dora >= 1.0.** Verified against `dora-cli 1.0.1`, which CI pins in
`.gitea/workflows/validate.yml`.
- **`uv` for everything:** `uv sync --group dev`, `uv run pytest`,
`uv run ruff check .`, `uv run python ...`. Never `pip` into the ambient
environment.
- **`ruff` is the linter and the formatter.** `uv run ruff check .` must be clean.
- **Markdown is linted too.** `uv run pymarkdown scan *.md` must be clean. Its line
length is set in `pyproject.toml`.
- **numpy-style docstrings.**
- **Dependencies must ship prebuilt wheels for linux-x86_64, linux-aarch64 and
macos-arm64.** `uv sync` is the whole install: no system packages, no compiler.
- **Run the workflow locally with `act` before asking for a commit.** It lives in
`.gitea/workflows/`, which is not where `act` looks by default:
```bash
act pull_request -W .gitea/workflows/validate.yml \
-P ubuntu-latest=catthehacker/ubuntu:act-latest
```
- **Do not commit or push.** Leave changes in the working tree and wait to be asked.
- **Do not mention AI tools in commit messages or documentation.**