project-ara 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- project_ara-0.0.1/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
- project_ara-0.0.1/.github/ISSUE_TEMPLATE/config.yml +8 -0
- project_ara-0.0.1/.github/ISSUE_TEMPLATE/feature_request.yml +38 -0
- project_ara-0.0.1/.github/dependabot.yml +21 -0
- project_ara-0.0.1/.github/pull_request_template.md +35 -0
- project_ara-0.0.1/.github/workflows/publish.yml +75 -0
- project_ara-0.0.1/.github/workflows/test.yml +39 -0
- project_ara-0.0.1/.gitignore +232 -0
- project_ara-0.0.1/.python-version +1 -0
- project_ara-0.0.1/AGENTS.md +115 -0
- project_ara-0.0.1/CLAUDE.md +2 -0
- project_ara-0.0.1/CODE_OF_CONDUCT.md +58 -0
- project_ara-0.0.1/CONTRIBUTING.md +74 -0
- project_ara-0.0.1/LICENSE +202 -0
- project_ara-0.0.1/NOTICE +4 -0
- project_ara-0.0.1/PKG-INFO +152 -0
- project_ara-0.0.1/README.md +137 -0
- project_ara-0.0.1/SECURITY.md +40 -0
- project_ara-0.0.1/ara/__init__.py +7 -0
- project_ara-0.0.1/ara/acquire.py +142 -0
- project_ara-0.0.1/ara/apps.py +176 -0
- project_ara-0.0.1/ara/backends/__init__.py +3 -0
- project_ara-0.0.1/ara/backends/ane.py +10 -0
- project_ara-0.0.1/ara/backends/apple.py +178 -0
- project_ara-0.0.1/ara/backends/coral.py +10 -0
- project_ara-0.0.1/ara/backends/cpu.py +151 -0
- project_ara-0.0.1/ara/backends/cuda.py +217 -0
- project_ara-0.0.1/ara/backends/esp32.py +12 -0
- project_ara-0.0.1/ara/backends/hexagon.py +11 -0
- project_ara-0.0.1/ara/backends/intel_npu.py +10 -0
- project_ara-0.0.1/ara/backends/oneapi.py +10 -0
- project_ara-0.0.1/ara/backends/vulkan.py +175 -0
- project_ara-0.0.1/ara/backends/webgpu.py +11 -0
- project_ara-0.0.1/ara/backends/xdna.py +11 -0
- project_ara-0.0.1/ara/calibration.py +28 -0
- project_ara-0.0.1/ara/catalog.py +325 -0
- project_ara-0.0.1/ara/cli.py +1848 -0
- project_ara-0.0.1/ara/contracts/__init__.py +9 -0
- project_ara-0.0.1/ara/contracts/driver.py +87 -0
- project_ara-0.0.1/ara/contracts/ramp.py +257 -0
- project_ara-0.0.1/ara/contracts/worker.py +51 -0
- project_ara-0.0.1/ara/db.py +207 -0
- project_ara-0.0.1/ara/detect.py +592 -0
- project_ara-0.0.1/ara/engine_env.py +152 -0
- project_ara-0.0.1/ara/engines.py +253 -0
- project_ara-0.0.1/ara/estimate.py +96 -0
- project_ara-0.0.1/ara/hardware.py +1215 -0
- project_ara-0.0.1/ara/hf_auth.py +168 -0
- project_ara-0.0.1/ara/hub.py +35 -0
- project_ara-0.0.1/ara/mlx.py +103 -0
- project_ara-0.0.1/ara/profile.py +38 -0
- project_ara-0.0.1/ara/pythons.py +312 -0
- project_ara-0.0.1/ara/registry.py +68 -0
- project_ara-0.0.1/ara/serialize.py +54 -0
- project_ara-0.0.1/ara/status.py +252 -0
- project_ara-0.0.1/ara/ui.py +86 -0
- project_ara-0.0.1/ara/versions.py +98 -0
- project_ara-0.0.1/ara/workers/__init__.py +2 -0
- project_ara-0.0.1/ara/workers/cpu_llama.py +360 -0
- project_ara-0.0.1/ara/workers/vulkan_llama.py +465 -0
- project_ara-0.0.1/pyproject.toml +70 -0
- project_ara-0.0.1/tests/conftest.py +128 -0
- project_ara-0.0.1/tests/test_acquire.py +368 -0
- project_ara-0.0.1/tests/test_apps.py +175 -0
- project_ara-0.0.1/tests/test_backends_apple.py +405 -0
- project_ara-0.0.1/tests/test_backends_cpu.py +228 -0
- project_ara-0.0.1/tests/test_backends_cuda.py +457 -0
- project_ara-0.0.1/tests/test_backends_stubs.py +36 -0
- project_ara-0.0.1/tests/test_backends_vulkan.py +338 -0
- project_ara-0.0.1/tests/test_calibration.py +42 -0
- project_ara-0.0.1/tests/test_catalog.py +653 -0
- project_ara-0.0.1/tests/test_cli.py +4354 -0
- project_ara-0.0.1/tests/test_cli_contract.py +159 -0
- project_ara-0.0.1/tests/test_contracts_driver.py +251 -0
- project_ara-0.0.1/tests/test_contracts_ramp.py +345 -0
- project_ara-0.0.1/tests/test_contracts_worker.py +67 -0
- project_ara-0.0.1/tests/test_db.py +231 -0
- project_ara-0.0.1/tests/test_detect.py +880 -0
- project_ara-0.0.1/tests/test_engine_contract.py +122 -0
- project_ara-0.0.1/tests/test_engine_env.py +359 -0
- project_ara-0.0.1/tests/test_engines.py +318 -0
- project_ara-0.0.1/tests/test_estimate.py +132 -0
- project_ara-0.0.1/tests/test_hardware.py +2303 -0
- project_ara-0.0.1/tests/test_hf_auth.py +338 -0
- project_ara-0.0.1/tests/test_hub.py +57 -0
- project_ara-0.0.1/tests/test_integration_cpu.py +91 -0
- project_ara-0.0.1/tests/test_integration_vulkan.py +93 -0
- project_ara-0.0.1/tests/test_lazy_import.py +57 -0
- project_ara-0.0.1/tests/test_methodology_matrix.py +113 -0
- project_ara-0.0.1/tests/test_mlx.py +96 -0
- project_ara-0.0.1/tests/test_profile.py +54 -0
- project_ara-0.0.1/tests/test_pythons.py +431 -0
- project_ara-0.0.1/tests/test_registry.py +108 -0
- project_ara-0.0.1/tests/test_serialize.py +43 -0
- project_ara-0.0.1/tests/test_status.py +337 -0
- project_ara-0.0.1/tests/test_ui.py +127 -0
- project_ara-0.0.1/tests/test_versions.py +143 -0
- project_ara-0.0.1/tests/test_workers_cpu_llama.py +160 -0
- project_ara-0.0.1/tests/test_workers_vulkan_llama.py +193 -0
- project_ara-0.0.1/uv.lock +907 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: "🐞 Bug report"
|
|
2
|
+
description: Something didn't behave as expected — wrong detection, a crash, or bad output.
|
|
3
|
+
title: "[bug] "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for the report! ARA is recon-first, so the most useful thing is the **exact
|
|
10
|
+
command and its output** (use `--json` if the text rendering is the issue), plus what
|
|
11
|
+
you expected instead.
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: what-happened
|
|
14
|
+
attributes:
|
|
15
|
+
label: What happened
|
|
16
|
+
description: What did you expect, and what actually occurred?
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: command
|
|
21
|
+
attributes:
|
|
22
|
+
label: Command + output
|
|
23
|
+
description: The exact `uv run ara ...` command and its output (`--json` welcome).
|
|
24
|
+
render: shell
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: input
|
|
28
|
+
id: machine
|
|
29
|
+
attributes:
|
|
30
|
+
label: Machine
|
|
31
|
+
description: Chip / OS (the top of `ara detect` is perfect), e.g. "Apple M4 Pro, macOS 15.7".
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: input
|
|
35
|
+
id: versions
|
|
36
|
+
attributes:
|
|
37
|
+
label: ARA + Python + uv versions
|
|
38
|
+
description: Commit/version of ARA, `python3 --version`, `uv --version`.
|
|
39
|
+
validations:
|
|
40
|
+
required: false
|
|
41
|
+
- type: textarea
|
|
42
|
+
id: extra
|
|
43
|
+
attributes:
|
|
44
|
+
label: Anything else
|
|
45
|
+
description: Logs, screenshots, or context that might help.
|
|
46
|
+
validations:
|
|
47
|
+
required: false
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: true
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Contributing guide
|
|
4
|
+
url: https://github.com/willsarg/project-ara/blob/main/CONTRIBUTING.md
|
|
5
|
+
about: Setup, conventions, the read-only/advisory rules, and how to land a change.
|
|
6
|
+
- name: Security report (private)
|
|
7
|
+
url: https://github.com/willsarg/project-ara/security
|
|
8
|
+
about: Please report vulnerabilities privately, not as a public issue.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: "✨ Feature request"
|
|
2
|
+
description: Suggest a command, recon coverage, a backend, or an improvement.
|
|
3
|
+
title: "[feat] "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Ideas welcome — especially **recon coverage** (a tool/app/model store/interpreter ARA
|
|
10
|
+
doesn't know about), **new backends** (e.g. CUDA), or sharper readouts. Please keep
|
|
11
|
+
ARA's boundaries in mind ([AGENTS.md](https://github.com/willsarg/project-ara/blob/main/AGENTS.md)):
|
|
12
|
+
recon is read-only, `profile` is consent-gated, and ARA stays advisory.
|
|
13
|
+
- type: dropdown
|
|
14
|
+
id: area
|
|
15
|
+
attributes:
|
|
16
|
+
label: Area
|
|
17
|
+
options:
|
|
18
|
+
- New command
|
|
19
|
+
- Recon coverage (tool / app / model store / interpreter)
|
|
20
|
+
- New backend (e.g. CUDA)
|
|
21
|
+
- Output / UX
|
|
22
|
+
- Other
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: problem
|
|
27
|
+
attributes:
|
|
28
|
+
label: The problem / what's missing
|
|
29
|
+
description: What can't you do today, or what does ARA get wrong or fail to surface?
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
- type: textarea
|
|
33
|
+
id: proposal
|
|
34
|
+
attributes:
|
|
35
|
+
label: Proposed behavior
|
|
36
|
+
description: What should ARA do? If it's coverage, how would ARA detect it reliably?
|
|
37
|
+
validations:
|
|
38
|
+
required: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Weekly Dependabot updates, each grouped into a single low-noise PR:
|
|
2
|
+
# - github-actions: keep the SHA-pinned actions fresh (pins otherwise go stale + miss security fixes)
|
|
3
|
+
# - uv: keep the Python deps (pyproject.toml + uv.lock) current
|
|
4
|
+
# https://docs.github.com/code-security/dependabot
|
|
5
|
+
version: 2
|
|
6
|
+
updates:
|
|
7
|
+
- package-ecosystem: github-actions
|
|
8
|
+
directory: /
|
|
9
|
+
schedule:
|
|
10
|
+
interval: weekly
|
|
11
|
+
groups:
|
|
12
|
+
actions:
|
|
13
|
+
patterns: ["*"] # one combined PR for all action bumps
|
|
14
|
+
|
|
15
|
+
- package-ecosystem: uv
|
|
16
|
+
directory: /
|
|
17
|
+
schedule:
|
|
18
|
+
interval: weekly
|
|
19
|
+
groups:
|
|
20
|
+
python:
|
|
21
|
+
patterns: ["*"] # one combined PR for all Python dep bumps
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!-- Thanks for contributing! Keep PRs focused on a single change. -->
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
<!-- What does this change and why? -->
|
|
6
|
+
|
|
7
|
+
Related issue: <!-- e.g. Fixes #N -->
|
|
8
|
+
|
|
9
|
+
## Type of change
|
|
10
|
+
|
|
11
|
+
- [ ] Bug fix
|
|
12
|
+
- [ ] New feature
|
|
13
|
+
- [ ] Recon coverage (new tool / app / model store / interpreter)
|
|
14
|
+
- [ ] New backend
|
|
15
|
+
- [ ] Docs only
|
|
16
|
+
- [ ] Refactor / cleanup (no behavior change)
|
|
17
|
+
|
|
18
|
+
## ARA's rules (see [AGENTS.md](../AGENTS.md))
|
|
19
|
+
|
|
20
|
+
- [ ] **Recon stays read-only** — no new code path under `detect`/`status`/`python`/`apps`/`mlx`
|
|
21
|
+
stresses the machine, loads a model, or mutates state.
|
|
22
|
+
- [ ] **`profile` stays consent-gated** — it only measures/downloads with explicit opt-in.
|
|
23
|
+
- [ ] **Advisory, not destructive** — nothing here runs or prescribes a state-mutating command.
|
|
24
|
+
- [ ] **Core stays engine-free** — no hardware-specific import outside a lazily-loaded backend.
|
|
25
|
+
- [ ] Reports the **user's** environment, not ARA's (venv stripped where relevant).
|
|
26
|
+
|
|
27
|
+
## Conventions
|
|
28
|
+
|
|
29
|
+
- [ ] `uv` only (no `--break-system-packages`); HF CLI is `hf`.
|
|
30
|
+
- [ ] Tests added/updated; `uv run pytest` green at **100%** statement + branch coverage.
|
|
31
|
+
- [ ] New curated-catalog entries note how they were verified.
|
|
32
|
+
|
|
33
|
+
## Evidence
|
|
34
|
+
|
|
35
|
+
<!-- Paste relevant command output (e.g. `ara apps` before/after), and note the machine. -->
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Publish project-ara to PyPI via Trusted Publishing (OIDC) — no API token stored.
|
|
2
|
+
# Fires when a version tag (v*) is pushed. The PyPI side is a "trusted publisher" registered at
|
|
3
|
+
# https://pypi.org/manage/account/publishing/ bound to: owner willsarg, repo project-ara,
|
|
4
|
+
# workflow publish.yml, environment pypi. See https://docs.pypi.org/trusted-publishers/.
|
|
5
|
+
#
|
|
6
|
+
# NOTE: version is static in pyproject.toml — the first build step fails if the tag doesn't match it.
|
|
7
|
+
#
|
|
8
|
+
# Security hardening: deny-all token by default (each job opts into the minimum), actions pinned to
|
|
9
|
+
# full commit SHAs (mutable tags are a supply-chain risk), checkout credentials not persisted,
|
|
10
|
+
# id-token:write scoped to the publish job alone, environment binding, per-job timeouts.
|
|
11
|
+
name: Publish to PyPI
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
tags:
|
|
16
|
+
- "v*"
|
|
17
|
+
|
|
18
|
+
permissions: {} # deny-all at the top; each job opts into only what it needs
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
# Tests gate the release (test → build → publish): a v* tag runs the cross-OS suite first via the
|
|
22
|
+
# shared test.yml, and build/publish only proceed if every OS passes.
|
|
23
|
+
test:
|
|
24
|
+
uses: ./.github/workflows/test.yml
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
|
|
28
|
+
build:
|
|
29
|
+
needs: test # no build unless tests pass on all OSes
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
timeout-minutes: 15
|
|
32
|
+
permissions:
|
|
33
|
+
contents: read # checkout only
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
36
|
+
with:
|
|
37
|
+
persist-credentials: false
|
|
38
|
+
- name: Verify tag matches pyproject version
|
|
39
|
+
env:
|
|
40
|
+
TAG: ${{ github.ref_name }} # e.g. v0.0.2 — via env, never inlined into the script
|
|
41
|
+
run: |
|
|
42
|
+
file_version="$(python3 -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")"
|
|
43
|
+
tag_version="${TAG#v}" # strip the leading v
|
|
44
|
+
echo "tag=$TAG (->$tag_version) pyproject=$file_version"
|
|
45
|
+
if [ "$tag_version" != "$file_version" ]; then
|
|
46
|
+
echo "::error::tag $TAG does not match pyproject.toml version $file_version — bump the version (or fix the tag) so they line up, then re-tag."
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
- name: Install uv
|
|
50
|
+
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.12"
|
|
53
|
+
- name: Build sdist + wheel
|
|
54
|
+
run: uv build # uses the declared hatchling backend
|
|
55
|
+
- name: Upload dist artifact
|
|
56
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
57
|
+
with:
|
|
58
|
+
name: dist
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
publish:
|
|
62
|
+
needs: build
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
timeout-minutes: 10
|
|
65
|
+
environment: pypi # bind to the GitHub Environment the PyPI publisher trusts
|
|
66
|
+
permissions:
|
|
67
|
+
id-token: write # OIDC token for Trusted Publishing — the ONLY elevated scope
|
|
68
|
+
steps:
|
|
69
|
+
- name: Download dist artifact
|
|
70
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
71
|
+
with:
|
|
72
|
+
name: dist
|
|
73
|
+
path: dist/
|
|
74
|
+
- name: Publish to PyPI
|
|
75
|
+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# The test suite, run on all three OSes — primarily to catch POSIX/path/filesystem differences
|
|
2
|
+
# (the project has Windows-specific code paths). Runs the mocked unit suite + 100% coverage gate
|
|
3
|
+
# (both baked into the default `pytest` in pyproject.toml). Integration tests (`-m integration`) are
|
|
4
|
+
# hardware-gated and stay manual on the real boxes.
|
|
5
|
+
#
|
|
6
|
+
# Two entry points:
|
|
7
|
+
# - workflow_call: the release pipeline (publish.yml) calls this so a v* tag is gated on tests.
|
|
8
|
+
# - workflow_dispatch: run it by hand from the Actions tab for on-demand cross-platform feedback.
|
|
9
|
+
#
|
|
10
|
+
# Hardening: read-only token, actions pinned to commit SHAs, checkout creds not persisted, locked
|
|
11
|
+
# deps, per-job timeout. The run steps are single uv commands, so they work in bash (Linux/macOS)
|
|
12
|
+
# and PowerShell (Windows) unchanged — no shell-specific syntax.
|
|
13
|
+
name: Test
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
workflow_call:
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
test:
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false # show every OS's result, not just the first failure
|
|
26
|
+
matrix:
|
|
27
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
28
|
+
runs-on: ${{ matrix.os }}
|
|
29
|
+
timeout-minutes: 20
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
32
|
+
with:
|
|
33
|
+
persist-credentials: false
|
|
34
|
+
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.12"
|
|
37
|
+
enable-cache: true
|
|
38
|
+
- run: uv sync --frozen --group dev
|
|
39
|
+
- run: uv run pytest # unit suite + 100% coverage gate
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# Local agent/session artifacts — archive useful summaries in the private vault, not the repo
|
|
221
|
+
.superpowers/
|
|
222
|
+
superpowers/
|
|
223
|
+
.playwright-mcp/
|
|
224
|
+
|
|
225
|
+
# macOS local metadata
|
|
226
|
+
.DS_Store
|
|
227
|
+
**/.DS_Store
|
|
228
|
+
mutants/
|
|
229
|
+
.mutmut-cache
|
|
230
|
+
|
|
231
|
+
# Claude Code local agent workspace (not part of the project)
|
|
232
|
+
.claude/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# AGENTS.md — purpose, boundaries, and conventions for ARA
|
|
2
|
+
|
|
3
|
+
This is the source of truth for *what ARA is and how to work on it*. Read it before
|
|
4
|
+
contributing (human or agent). [CONTRIBUTING.md](./CONTRIBUTING.md) covers the human
|
|
5
|
+
workflow (setup, landing a change); this covers the **why** and the **rules**.
|
|
6
|
+
|
|
7
|
+
## What ARA is
|
|
8
|
+
|
|
9
|
+
**Project ARA — "AI Runs Anywhere."** A tool you reach for to **honestly assess any machine
|
|
10
|
+
with a Python runtime for AI workloads**, then run local models safely on whatever hardware
|
|
11
|
+
is present. Apple Silicon (MLX), NVIDIA (CUDA), and any CPU all run models today; recon works everywhere.
|
|
12
|
+
|
|
13
|
+
### The three rules (the invariant core)
|
|
14
|
+
|
|
15
|
+
ARA's mission — *"AI Runs Anywhere: safely, reliably, and accurately — train, run, and govern AI
|
|
16
|
+
workloads on any infrastructure"* — **is** three numbered rules. Every change, in every part of the
|
|
17
|
+
system, answers to all three. Canonical statement: the private vault's `ARA - Product` note.
|
|
18
|
+
|
|
19
|
+
1. **Safety** — *don't crash the system.* Never exceed the memory wall; run right up to the safe
|
|
20
|
+
edge and no further. In ARA's core this means **recon is read-only** and **`characterize` is
|
|
21
|
+
consent-gated** (see Hard rules); the engines (wmx/wcx) enforce the wall when they measure and
|
|
22
|
+
launch.
|
|
23
|
+
2. **Reliability** — *every component is properly tested.* `fail_under = 100` (statement + branch);
|
|
24
|
+
new code lands with tests (see Conventions). A component you can't trust isn't shipped.
|
|
25
|
+
3. **Accuracy** — *report true data; never lie to the user.* For deterministic recon **and**
|
|
26
|
+
non-deterministic model output alike: report the user's *real* environment, never ARA's
|
|
27
|
+
internals; never claim something ARA didn't observe; `unknown` is a first-class answer
|
|
28
|
+
(distinguish measured / curated / unknown); never surface a model's hallucination as fact.
|
|
29
|
+
|
|
30
|
+
### ARA-specific design values
|
|
31
|
+
|
|
32
|
+
- **Well-scoped tools.** Each command does one clear job with a predictable boundary:
|
|
33
|
+
- `detect` — **read-only recon**. Observes the machine; never stresses, benchmarks, or
|
|
34
|
+
loads an ML engine.
|
|
35
|
+
- `status` — running AI/ML processes, right now.
|
|
36
|
+
- `python` — every interpreter + its AI libraries + install cautions.
|
|
37
|
+
- `apps` — installed AI/ML apps, versions, source, and Homebrew drift.
|
|
38
|
+
- `mlx` — the MLX ecosystem + Apple readiness.
|
|
39
|
+
- `profile` — **engine-free** analytic capability assessment: estimates the safe memory
|
|
40
|
+
budget from recon facts; never loads an engine or a model.
|
|
41
|
+
- `characterize` — **the command that measures**: opt-in; crosses the seam into the engine to
|
|
42
|
+
find a model's real safe context ceiling (refusing before it risks the memory wall).
|
|
43
|
+
- `recommend` — ranks cached models that fit this machine's budget, by estimated usable context.
|
|
44
|
+
- `run` — governed one-shot inference, capped under the measured safe ceiling (CPU · MLX · CUDA).
|
|
45
|
+
- `models` / `search` — catalog cached models (with measured ceilings) / search the HF Hub.
|
|
46
|
+
- `hf login` / `logout` / `status` — manage the Hugging Face token (needed for gated models). An
|
|
47
|
+
**action** command (writes the standard HF token store, so every fetch + worker reads it), not
|
|
48
|
+
recon; verifies via the Hub and never prints the token.
|
|
49
|
+
- **Broad compatibility.** Cover the open-source AI ecosystem widely — engines (MLX,
|
|
50
|
+
llama.cpp, Ollama, LM Studio, vLLM), model stores (HF, Ollama, LM Studio, Jan, GPT4All),
|
|
51
|
+
frameworks (PyTorch, transformers, TensorFlow), and apps — not one vendor's corner.
|
|
52
|
+
|
|
53
|
+
## The architecture boundary (don't break this)
|
|
54
|
+
|
|
55
|
+
- **Pure-Python core, swappable backend adapters.** The core (`ara/detect.py`, `cli.py`,
|
|
56
|
+
recon modules) must **never import a hardware-specific engine**. Backends live behind a
|
|
57
|
+
registry and are loaded lazily — only the one chosen for the machine.
|
|
58
|
+
- **Apple backend wraps [`wmx-suite`](https://github.com/willsarg/wmx-suite).** The engine
|
|
59
|
+
import happens *inside* the adapter's functions, not at module load — so nothing
|
|
60
|
+
MLX-shaped loads until ARA actually runs the engine.
|
|
61
|
+
- **Engines install on demand, not as dependencies.** The hardware engine is **not** in
|
|
62
|
+
`pyproject.toml`. ARA probes the machine and installs the matched suite at runtime via
|
|
63
|
+
`ara install` (`ara/engines.py` is the catalog + `uv pip install git+<spec>` logic). This
|
|
64
|
+
keeps the core universal, the lock engine-free, and `uv sync` identical on every OS — and
|
|
65
|
+
never ships MLX to a non-Apple machine. `--engine {wmx|wcx|cpu|auto}` is the consent surface
|
|
66
|
+
(the flag itself authorizes the install, so it stays scriptable).
|
|
67
|
+
|
|
68
|
+
## Hard rules
|
|
69
|
+
|
|
70
|
+
These are how **Rule #1 (Safety)** and **Rule #3 (Accuracy)** are enforced in the recon core:
|
|
71
|
+
|
|
72
|
+
- **Recon is read-only.** Nothing under `detect`/`status`/`python`/`apps`/`mlx` may stress
|
|
73
|
+
the machine, load a model, or mutate state.
|
|
74
|
+
- **Measuring is consent-gated.** `characterize` is the only command that loads an engine and a
|
|
75
|
+
model (downloading weights on demand) — it runs only with explicit user opt-in. `profile` stays
|
|
76
|
+
engine-free and read-only.
|
|
77
|
+
- **Advisory, never destructive.** ARA surfaces facts and considerations. It does **not**
|
|
78
|
+
run or prescribe state-mutating commands on the user's behalf. (A flag may *describe* a
|
|
79
|
+
fix; it must not tell the user to run something that silently destroys state.)
|
|
80
|
+
- **Honest about the user's environment, not ARA's.** When probing tools/interpreters, strip
|
|
81
|
+
ARA's own virtualenv so results reflect what the *user* has, not ARA's bundled deps.
|
|
82
|
+
|
|
83
|
+
## Conventions
|
|
84
|
+
|
|
85
|
+
- **`uv` only.** No `pip install --break-system-packages`. The HF CLI is `hf`, not the
|
|
86
|
+
deprecated `huggingface-cli`.
|
|
87
|
+
- **Tests are the bar.** `fail_under = 100` (statement + branch). New code lands with tests.
|
|
88
|
+
The suite runs **without** `wmx-suite` on purpose — it proves the core stays engine-free;
|
|
89
|
+
the seam is covered via a fake `wmx_suite`.
|
|
90
|
+
- **Planning/design docs live in the private vault, not the repo.** This repo is code +
|
|
91
|
+
standard community files. Don't add design specs or logs here.
|
|
92
|
+
- **Write portable; claim only what's tested.** Shared layers (the engine env, worker IPC,
|
|
93
|
+
paths) must be OS-agnostic — use `pathlib`/`os.path`, branch interpreter/venv layout on
|
|
94
|
+
`os.name` (`Scripts\python.exe` vs `bin/python`), keep OS-specific recon (sysctl, Homebrew
|
|
95
|
+
paths) behind a platform guard. ARA is developed on macOS (Apple Silicon) and tested green on
|
|
96
|
+
macOS (CPU + MLX), Windows (CPU + CUDA, RTX 2070), and Linux (CPU); **claim a platform only once
|
|
97
|
+
the suite is green there** — CUDA-on-Linux shares the Windows code path but isn't claimed yet
|
|
98
|
+
(no NVIDIA-on-Linux box has run it).
|
|
99
|
+
|
|
100
|
+
## License & AI agents (Apache 2.0)
|
|
101
|
+
|
|
102
|
+
Project ARA is licensed **Apache-2.0** (`LICENSE`, `NOTICE`). Abide by it in both directions.
|
|
103
|
+
|
|
104
|
+
**Contributing here (inbound — Apache §5, inbound = outbound; no CLA/DCO):**
|
|
105
|
+
- All contributions are under Apache-2.0.
|
|
106
|
+
- Add only original code, or code under an Apache-2.0-compatible permissive license (MIT/BSD/ISC/Apache-2.0); preserve its copyright/license and record third-party components in `NOTICE`.
|
|
107
|
+
- Never introduce GPL/LGPL/AGPL, proprietary, or unknown-provenance code.
|
|
108
|
+
- Start every new source file with: `# SPDX-License-Identifier: Apache-2.0` and `# Copyright 2026 Will Sarg`.
|
|
109
|
+
- Do not alter or remove `LICENSE`, `NOTICE`, or existing SPDX headers.
|
|
110
|
+
|
|
111
|
+
**Cloning / forking / redistributing (outbound — Apache §4):**
|
|
112
|
+
- Keep `LICENSE` and `NOTICE` intact in any copy or fork.
|
|
113
|
+
- Retain all SPDX headers and copyright notices in files you carry.
|
|
114
|
+
- State significant changes you make.
|
|
115
|
+
- You may relicense *your own* additions; the Apache-2.0-covered files stay Apache-2.0.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as contributors and maintainers pledge to make participation in Project ARA a
|
|
6
|
+
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
|
7
|
+
disability, ethnicity, sex characteristics, gender identity and expression, level of
|
|
8
|
+
experience, education, socio-economic status, nationality, personal appearance, race, caste,
|
|
9
|
+
color, religion, or sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
|
|
12
|
+
inclusive, and healthy community.
|
|
13
|
+
|
|
14
|
+
## Our Standards
|
|
15
|
+
|
|
16
|
+
Examples of behavior that contributes to a positive environment:
|
|
17
|
+
|
|
18
|
+
- Demonstrating empathy and kindness toward other people
|
|
19
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
20
|
+
- Giving and gracefully accepting constructive feedback
|
|
21
|
+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning
|
|
22
|
+
from the experience
|
|
23
|
+
- Focusing on what is best not just for us as individuals, but for the overall community
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior:
|
|
26
|
+
|
|
27
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
28
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
- Public or private harassment
|
|
30
|
+
- Publishing others' private information, such as a physical or electronic address, without
|
|
31
|
+
explicit permission
|
|
32
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
33
|
+
|
|
34
|
+
## Enforcement Responsibilities
|
|
35
|
+
|
|
36
|
+
Maintainers are responsible for clarifying and enforcing our standards of acceptable behavior
|
|
37
|
+
and will take appropriate and fair corrective action in response to any behavior that they
|
|
38
|
+
deem inappropriate, threatening, offensive, or harmful.
|
|
39
|
+
|
|
40
|
+
## Scope
|
|
41
|
+
|
|
42
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual
|
|
43
|
+
is officially representing the community in public spaces.
|
|
44
|
+
|
|
45
|
+
## Enforcement
|
|
46
|
+
|
|
47
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported via
|
|
48
|
+
GitHub's private messaging or through the repo's
|
|
49
|
+
[Security tab](https://github.com/willsarg/project-ara/security). All reports will be
|
|
50
|
+
reviewed and investigated promptly and fairly. Maintainers are obligated to respect the
|
|
51
|
+
privacy and security of the reporter.
|
|
52
|
+
|
|
53
|
+
## Attribution
|
|
54
|
+
|
|
55
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1,
|
|
56
|
+
available at <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
|
|
57
|
+
|
|
58
|
+
[homepage]: https://www.contributor-covenant.org
|