Skip to main content

Independent verification layer for software projects

Project description

Assay

Independent verification layer for software projects. Assay runs Playwright-based browser tests in Docker, captures screenshots and results, formats them as structured task packets, and delivers them to a Grain workflow via the ingest API.

Requirements

  • Python 3.11+
  • Docker (for assay run)
  • Node.js 18+ (for the TypeScript browser SDK)

Install

pip install assay-kit

Or from source:

git clone <repo>
cd assay
pip install -e .

Quick Start

1. Configure

Create assay.toml in your project root (all fields optional — defaults shown):

[project]
name = "my-project"

[runner]
docker_image = "assay-playwright:latest"
timeout_seconds = 300

[output]
directory = "./assay-output"

[serve]
host = "127.0.0.1"
port = 8000

[keys]
store = "~/.assay/keys.json"

[schedule]
store = "~/.assay/schedules.json"

2. Run a test

assay run --target https://your-app.example.com

Exit codes: 0 = pass, 3 = fail, 1 = inconclusive or error.

3. Start the ingest server

# Create an API key first
assay key create --name ci

# Start the server
assay serve

4. Schedule recurring runs

# Add a schedule (standard 5-field cron)
assay schedule add --cron "0 8 * * *" --suite smoke --target https://your-app.example.com

# List schedules
assay schedule list

# Start the scheduler (foreground; Ctrl+C to stop)
assay schedule run

# Remove a schedule
assay schedule remove <id>

Browser SDK

Install the TypeScript SDK in your web app:

npm install assay-sdk
import { AssaySDK } from "assay-sdk";

const sdk = new AssaySDK({
  apiKey: "your-api-key",
  endpoint: "http://localhost:8000",
});

// Capture a screenshot + metadata and POST to /ingest
await sdk.capture({ comment: "Optional human note" });

Docker Runner

The assay run command requires a pre-built Docker image containing Playwright.

Build locally

cd runner
docker build -t assay-playwright:latest .

Use a custom image

Set docker_image in assay.toml:

[runner]
docker_image = "myregistry.example.com/assay-playwright:latest"

Or override per-run (future flag — not yet wired in v0.1).

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src/ tests/

# Type check
mypy src/assay

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

assay_kit-0.1.0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

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

assay_kit-0.1.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file assay_kit-0.1.0.tar.gz.

File metadata

  • Download URL: assay_kit-0.1.0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for assay_kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1b0ed11ac83fbe275f31b1e8b9c9af595485cc172594865847f4b8dce9d1b32
MD5 bf3a37f6aa8d6812a6c010edad26403e
BLAKE2b-256 0c49b9bd8c56cf074c9af4600be1c67b7a202af86a35808a5d9a7701573e8316

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_kit-0.1.0.tar.gz:

Publisher: release.yml on Diwata-Labs/Assay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file assay_kit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: assay_kit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for assay_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8b9e851d296b0d2e6c4c9004fe5b6fd11e9690096bd891be9d737d906af6a21
MD5 a0bad64c9c6e1f69739dfcf689f37775
BLAKE2b-256 faa56867e140e7e0f992b48f53ec210ae87da91c94f15e39be33a1500589b8d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for assay_kit-0.1.0-py3-none-any.whl:

Publisher: release.yml on Diwata-Labs/Assay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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