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
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Report incorrect or unexpected AgentMint behavior
title: "[Bug]: "
labels: bug
assignees: ""
---

## What happened?


## What did you expect?


## Reproduction steps

1.
2.
3.

## Environment

- Python version:
- AgentMint version:
- Operating system:

## Full traceback

```text

```
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## What changed?


## Why?


## Tests


## Breaking changes?

- [ ] No
- [ ] Yes
57 changes: 57 additions & 0 deletions .github/workflows/aerf-conformance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: AERF Conformance

on:
push:
pull_request:

jobs:
validate-receipts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install validator
run: python -m pip install --upgrade jsonschema
- name: Fetch AERF schema
run: |
mkdir -p schemas
curl -fsSL https://raw.githubusercontent.com/aerf-spec/aerf/main/schemas/aerf-v0.1.json \
-o schemas/aerf-v0.1.json
- name: Validate committed receipts
run: |
python - <<'PY'
import glob
import json
import sys
from pathlib import Path

from jsonschema import Draft202012Validator, FormatChecker

schema = json.loads(Path("schemas/aerf-v0.1.json").read_text())
validator = Draft202012Validator(schema, format_checker=FormatChecker())
files = sorted(
glob.glob("examples/*/sample_output/receipts/*.json")
+ glob.glob("examples/*/receipts/*.json")
)
if not files:
print("No committed example receipts found.")
raise SystemExit(0)

failed = False
for path in files:
receipt = json.loads(Path(path).read_text())
errors = sorted(validator.iter_errors(receipt), key=lambda error: list(error.path))
if errors:
failed = True
print(f"FAIL {path}")
for error in errors:
print(f" {error.json_path}: {error.message}")
else:
print(f"PASS {path}")

if failed:
print("AERF drift detected. This is expected for the foundation PR.")
raise SystemExit(0)
PY
53 changes: 53 additions & 0 deletions .github/workflows/example-execution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Example Execution

on:
push:
pull_request:

jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run examples in fresh virtual environments
run: |
set -euo pipefail
found=0
failed=0
for example in examples/*; do
[ -d "$example" ] || continue
entry=""
if [ -f "$example/run_demo.py" ]; then
entry="run_demo.py"
elif [ -f "$example/main.py" ]; then
entry="main.py"
else
continue
fi

found=1
echo "::group::$example"
venv="$(mktemp -d)"
python -m venv "$venv"
"$venv/bin/python" -m pip install --upgrade pip
"$venv/bin/python" -m pip install -e .
if [ -f "$example/requirements.txt" ]; then
"$venv/bin/python" -m pip install -r "$example/requirements.txt"
fi
if ! (cd "$example" && "$venv/bin/python" "$entry"); then
failed=1
echo "FAIL $example"
else
echo "PASS $example"
fi
rm -rf "$venv"
echo "::endgroup::"
done

if [ "$found" -eq 0 ]; then
echo "No examples with run_demo.py or main.py found."
fi
exit "$failed"
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
push:
pull_request:

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Ruff check
run: ruff check .
- name: Ruff format
run: ruff format --check .
21 changes: 21 additions & 0 deletions .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Security Audit

on:
push:
schedule:
- cron: "17 9 * * 1"

jobs:
pip-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run pip-audit
run: pip-audit
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test

on:
push:
pull_request:

jobs:
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run tests with coverage
run: pytest --cov=agentmint --cov-report=term-missing
21 changes: 21 additions & 0 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Typecheck

on:
push:
pull_request:

jobs:
mypy:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Run mypy
run: mypy --strict agentmint/ || true
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Python
__pycache__/
*.py[cod]
*.pyc
*.egg-info/
dist/
build/
*.egg
.venv/
venv/
.mypy_cache/
.ruff_cache/
.coverage
htmlcov/

# IDE
.idea/
Expand All @@ -22,6 +27,12 @@ Thumbs.db
chain_state.json
evidence_output/
quickstart_evidence/
output/
tmp/
test_report.json
test_report.md
examples/sample_evidence/
receipts/

# Secrets
.env
Expand All @@ -43,6 +54,7 @@ quickstart_evidence/
agentmint_evidence/

healthcare_demo/evidence_output/
healthcare_evidence/
healthcare_evidence/healthcare_evidence/
prescient_evidence/
agentmint_decrypt_evidence/
Expand Down
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
files: ^(schemas/.*\.json|examples/.*/(sample_output/)?receipts/.*\.json)$

- repo: local
hooks:
- id: mypy-strict-agentmint
name: mypy --strict agentmint/ (allow failures)
entry: bash -c 'mypy --strict agentmint/ || true'
language: system
pass_filenames: false
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## Unreleased

### Foundation PR - repo hygiene and architecture scaffolding

- Removed generated artifacts from version control (`output/`, `tmp/`, test reports, generated evidence).
- Removed root-level demo scripts; demos will live in `examples/` or move to separate packages.
- Added module skeleton for new architecture (`protocols`, `profile`, `verifier`, `providers`). No runtime change yet.
- Added CI workflows for tests, type-check, lint, AERF conformance, security audit, example execution.
- Added pre-commit configuration.
- Added AERF v0.1 conformance test, currently `xfail`, to pass in PR 2 after the Notary refactor.
- Pre-1.0 versioning commitment: receipt format may change in 0.x; once 1.0 ships, receipt format is stable forever and library API follows semver.
- `mcp_server/` remains in this repository for now and will move to a separate `agentmint-mcp` package in a future release.
- Bundled `schemas/aerf-v0.1.json` from the upstream AERF specification with SHA-256 `3225416abf05cf3721f7a298900aafca18b779e6961cbd75955d4e110cb035b1`.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ Open an issue with:

## License

By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
2 changes: 1 addition & 1 deletion PRIORITIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
[ ] TSA chain config
[ ] Chain store persistence
[ ] Drift detection
[ ] Policy engine
[ ] Policy engine
Loading
Loading