Skip to main content

AEMS Local Bridge Agent — local filesystem access for exam PDFs

Project description

AEMS Local Bridge Agent

A lightweight companion service that runs on localhost and provides REST API access to the local filesystem, enabling the AEMS web app to read/write exam PDFs to a user-chosen folder.

Installation

pip (recommended for development)

pip install aems-agent

Binary installers

Download pre-built installers from Releases:

Platform File Notes
Windows aems-agent-setup.exe Installs to %LOCALAPPDATA%\AEMS Agent
macOS AEMS-Agent.dmg Drag to Applications
Linux aems-agent-linux.tar.gz Extract and run ./aems-agent run

Usage

# Start the agent (default: http://127.0.0.1:61234)
aems-agent run

# Start with system tray icon
aems-agent run --tray

# Custom port/host
aems-agent run --port 9000 --host 0.0.0.0

# Enforce runtime license policy
aems-agent run --license-policy warn
aems-agent run --license-policy soft-block
aems-agent run --license-policy hard-block

# Show auth token
aems-agent token

# Set exam storage directory
aems-agent set-path /path/to/exams

# Show config directory location
aems-agent config-dir

# Store a license JWT token
aems-agent license-store "<jwt-token>"

# Validate token signature + claims + heartbeat
aems-agent license-check \
  --license-url https://license.domain.com \
  --issuer https://license.domain.com \
  --audience aems-agent

Configuration

Config files are stored in a platform-specific directory:

Platform Path
Windows %APPDATA%\AEMS\agent\
macOS ~/.config/aems/agent/
Linux ~/.config/aems/agent/ (or $XDG_CONFIG_HOME/aems/agent/)

Files:

  • config.json - storage path, port, allowed origins, license settings
  • auth_token - bearer token for API authentication
  • license.jwt - stored license token
  • agent.log - rotating log file

Runtime license policy modes:

  • warn: agent starts and logs validation failures.
  • soft-block: agent starts in limited mode when license is invalid. Write operations (PUT/DELETE /files/*, PUT /config/path) are blocked until license becomes valid again.
  • hard-block: startup fails and exits non-zero when license is invalid/revoked/grace-expired; runtime checks also terminate the process non-zero on hard-block failures.

API Endpoints

Method Path Auth Description
GET /status No Alive check
GET /health Yes Detailed health with disk info
GET/PUT /config/path Yes Get/set storage path
GET /files/{assignment_id} Yes List submissions
GET/PUT/DELETE /files/{aid}/{sid} Yes Manage submission PDFs
GET/PUT /files/{aid}/{sid}/annotated Yes Manage annotated PDFs
POST /pair/initiate No Start browser pairing
POST /pair/complete No Complete pairing

Development

git clone https://github.com/artkula/aems-agent.git
cd aems-agent
python -m pip install -e ".[dev]"
python -m pytest -v

Release Trust and Verification

Release pipeline:

  • .github/workflows/build.yml
  • Windows tagged releases are Authenticode-signed.
  • macOS tagged releases are code-signed, notarized, and stapled.
  • release-manifest.json and sha256sums.txt are signed with cosign as supplemental integrity proof.

Verification examples:

Windows:

Get-AuthenticodeSignature .\aems-agent-setup.exe | Format-List

macOS:

codesign --verify --deep --strict --verbose=2 "AEMS Agent.app"
spctl --assess --type open --context context:primary-signature --verbose=4 "AEMS-Agent.dmg"

Cosign manifest verification:

cosign verify-blob \
  --certificate release-manifest.pem \
  --signature release-manifest.sig \
  release-manifest.json

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aems_agent-0.2.0.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aems_agent-0.2.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file aems_agent-0.2.0.tar.gz.

File metadata

  • Download URL: aems_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for aems_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 933008ac8f3af78db72a799a341661d1bd872037fb5f4a02785faec03398b8a3
MD5 bcfe3b931c55cd25f568497e36c848b5
BLAKE2b-256 b2055c9bb54ed25b5761d368add331cec01184d7a2db8ae8576139d88bc25eaa

See more details on using hashes here.

File details

Details for the file aems_agent-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aems_agent-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for aems_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c8d14f7ca680fbb5f67d1614766827a80208d0fb7fb5b7144ba0e0850993865
MD5 a8d036686b9a861a8ede90b9c8e60919
BLAKE2b-256 19951feaff5a6c55021dd4e8b94d5998c79b221bf28f18660c1040bfe05ff877

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page