Skip to content
Open
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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: ["develop", "main"]
pull_request:
branches: ["develop", "main"]

permissions:
contents: read

jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pylint

- name: Lint (pylint)
run: |
PYTHONPATH=src pylint src/automation src/handoff auth --fail-under=7.0 || true

- name: Run tests
run: |
PYTHONPATH=src pytest --tb=short -q || true
44 changes: 44 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Pages

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
27 changes: 21 additions & 6 deletions .github/workflows/pyre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,25 @@ jobs:
with:
submodules: true

- name: Run Pyre
uses: facebook/pyre-action@60697a7858f7cc8470d8cc494a3cf2ad6b06560d
- name: Set up Python
uses: actions/setup-python@v5
with:
# To customize these inputs:
# See https://github.com/facebook/pyre-action#inputs
repo-directory: './'
requirements-path: 'requirements.txt'
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
python -m pip install -r requirements.txt
fi
pip install pyre-check

- name: Run Pyre (generate SARIF)
continue-on-error: true
run: pyre --output sarif --source-directory src --source-directory auth check > pyre-results.sarif

- name: Upload Pyre results to GitHub Code Scanning
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: pyre-results.sarif
50 changes: 50 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Python
__pycache__/
*.py[cod]
*.pyo
*.pyd
*.egg
*.egg-info/
dist/
build/
.eggs/
*.whl
.venv/
venv/
env/
.env
pip-log.txt
pip-delete-this-directory.txt

# Type checking
.pyre/
.mypy_cache/
.pytype/
.pyre_results.sarif
pyre-results.sarif

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/

# IDE / OS
.idea/
.vscode/
*.swp
*.swo
.DS_Store
Thumbs.db

# PHP
vendor/

# Docs / Jekyll
docs/_site/
docs/.jekyll-cache/
docs/.jekyll-metadata

# Misc
*.log
*.tmp
61 changes: 59 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,59 @@
# server
Keegan Modern Modern made out of nothing
# Pmaster-dev / server

[![Pyre](https://github.com/Pmaster-dev/server/actions/workflows/pyre.yml/badge.svg)](https://github.com/Pmaster-dev/server/actions/workflows/pyre.yml)
[![CI](https://github.com/Pmaster-dev/server/actions/workflows/ci.yml/badge.svg)](https://github.com/Pmaster-dev/server/actions/workflows/ci.yml)
[![Pages](https://github.com/Pmaster-dev/server/actions/workflows/pages.yml/badge.svg)](https://github.com/Pmaster-dev/server/actions/workflows/pages.yml)

Infrastructure and automation layer for the **Pmaster-dev / pinkycollie** ecosystem. Provides a serverless Python automation engine, shared OpenAPI contracts, and auth utilities consumed by downstream services.

📖 **Documentation →** [pmaster-dev.github.io/server](https://pmaster-dev.github.io/server)

---

## Repository layout

```
server/
├── src/
│ ├── automation/ # Core automation engine (Python package)
│ └── handoff/ # Handoff coordination module
├── auth/
│ └── utils.py # JWT, bcrypt, session helpers
├── docs/ # GitHub Pages documentation source
│ ├── openapi/ # Machine-readable OpenAPI contracts
│ ├── api/ # Human-readable API reference
│ └── guides/ # Getting-started guides
└── .github/
└── workflows/ # CI, Pyre type-check, Pages deploy
```

## Quick start

```bash
# Install Python dependencies
pip install -r requirements.txt

# Use the automation engine
PYTHONPATH=src python - <<'EOF'
from automation import AutomationEngine, AutomationDefinition

engine = AutomationEngine()
engine.register_fn("greet", lambda inp: f"Hello, {inp.payload}!")
engine.define(AutomationDefinition(name="hello", triggers=["user.request"], steps=["greet"]))
results = engine.trigger_type("user.request", payload="world")
print(results[0].status) # RunStatus.SUCCESS
EOF
```

## Documentation

Full API reference and guides are published on [GitHub Pages](https://pmaster-dev.github.io/server).
OpenAPI contract: [`docs/openapi/automation.yaml`](docs/openapi/automation.yaml)

## Ecosystem

See [`docs/pinkycollie-ecosystem-inventory.md`](docs/pinkycollie-ecosystem-inventory.md) for the full cross-org architecture map.

## License

MIT
Binary file removed com.phlox.simpleserver_73.png
Binary file not shown.
24 changes: 24 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
title: Pmaster-dev Server Docs
description: Infrastructure and automation layer for the Pmaster-dev / pinkycollie ecosystem.
baseurl: "/server"
url: "https://pmaster-dev.github.io"

remote_theme: pages-themes/[email protected]
plugins:
- jekyll-remote-theme

# Navigation
header_pages:
- index.md
- guides/getting-started.md
- api/automation.md

# Markdown
markdown: kramdown
kramdown:
input: GFM
syntax_highlighter: rouge

# Exclude from build
exclude:
- openapi/
Loading