pactown 0.1.5__tar.gz → 0.1.47__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.
- {pactown-0.1.5 → pactown-0.1.47}/.bumpversion.cfg +1 -1
- pactown-0.1.47/CHANGELOG.md +92 -0
- {pactown-0.1.5 → pactown-0.1.47}/Makefile +23 -5
- {pactown-0.1.5 → pactown-0.1.47}/PKG-INFO +65 -9
- {pactown-0.1.5 → pactown-0.1.47}/README.md +60 -8
- pactown-0.1.47/TODO.md +38 -0
- pactown-0.1.47/docs/CLOUDFLARE_WORKERS_COMPARISON.md +336 -0
- {pactown-0.1.5 → pactown-0.1.47}/docs/CONFIGURATION.md +7 -2
- {pactown-0.1.5 → pactown-0.1.47}/docs/DEPLOYMENT.md +6 -1
- pactown-0.1.47/docs/FAST_START.md +322 -0
- {pactown-0.1.5 → pactown-0.1.47}/docs/GENERATOR.md +13 -16
- pactown-0.1.47/docs/LOGGING.md +346 -0
- {pactown-0.1.5 → pactown-0.1.47}/docs/NETWORK.md +5 -1
- {pactown-0.1.5 → pactown-0.1.47}/docs/QUADLET.md +12 -0
- pactown-0.1.47/docs/SECURITY.md +244 -0
- pactown-0.1.47/docs/SECURITY_POLICY.md +310 -0
- {pactown-0.1.5 → pactown-0.1.47}/docs/SPECIFICATION.md +4 -0
- pactown-0.1.47/docs/USER_ISOLATION.md +390 -0
- pactown-0.1.47/examples/api-gateway-webhooks/README.md +391 -0
- pactown-0.1.47/examples/email-llm-responder/README.md +398 -0
- pactown-0.1.47/examples/fast-start-demo/README.md +82 -0
- pactown-0.1.47/examples/fast-start-demo/demo.py +120 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/microservices/services/go-gateway/README.md +1 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/microservices/services/python-ml/README.md +1 -0
- pactown-0.1.47/examples/realtime-notifications/README.md +372 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/services/api/README.md +1 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/services/cli/README.md +4 -4
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/services/database/README.md +2 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/services/gateway/README.md +4 -4
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/services/web/README.md +4 -4
- pactown-0.1.47/examples/security-policy/README.md +92 -0
- pactown-0.1.47/examples/security-policy/demo.py +105 -0
- pactown-0.1.47/examples/user-isolation/README.md +94 -0
- pactown-0.1.47/examples/user-isolation/demo.py +110 -0
- pactown-0.1.47/project.functions.toon +785 -0
- pactown-0.1.47/project.toon +480 -0
- {pactown-0.1.5 → pactown-0.1.47}/pyproject.toml +9 -1
- pactown-0.1.47/src/pactown/__init__.py +197 -0
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/cli.py +352 -80
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/config.py +12 -11
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/base.py +34 -32
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/compose.py +59 -58
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/docker.py +40 -41
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/kubernetes.py +43 -42
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/podman.py +55 -56
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/quadlet.py +369 -108
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/quadlet_api.py +66 -70
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/quadlet_shell.py +111 -116
- pactown-0.1.47/src/pactown/events.py +1066 -0
- pactown-0.1.47/src/pactown/fast_start.py +514 -0
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/generator.py +30 -29
- pactown-0.1.47/src/pactown/llm.py +450 -0
- pactown-0.1.47/src/pactown/markpact_blocks.py +50 -0
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/network.py +59 -38
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/orchestrator.py +90 -93
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/parallel.py +40 -40
- pactown-0.1.47/src/pactown/platform.py +146 -0
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/registry/client.py +45 -46
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/registry/models.py +25 -25
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/registry/server.py +24 -24
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/resolver.py +30 -30
- pactown-0.1.47/src/pactown/runner_api.py +458 -0
- pactown-0.1.47/src/pactown/sandbox_manager.py +729 -0
- pactown-0.1.47/src/pactown/security.py +682 -0
- pactown-0.1.47/src/pactown/service_runner.py +1201 -0
- pactown-0.1.47/src/pactown/user_isolation.py +458 -0
- {pactown-0.1.5 → pactown-0.1.47}/tests/test_config.py +4 -5
- pactown-0.1.47/tests/test_llm.py +311 -0
- pactown-0.1.47/tests/test_markpact_blocks.py +51 -0
- {pactown-0.1.5 → pactown-0.1.47}/tests/test_network.py +22 -24
- {pactown-0.1.5 → pactown-0.1.47}/tests/test_parallel.py +25 -28
- pactown-0.1.47/tests/test_platform.py +56 -0
- pactown-0.1.47/tests/test_quadlet_security.py +690 -0
- {pactown-0.1.5 → pactown-0.1.47}/tests/test_registry.py +18 -21
- {pactown-0.1.5 → pactown-0.1.47}/tests/test_resolver.py +11 -11
- pactown-0.1.47/tests/test_runner_api.py +108 -0
- pactown-0.1.47/tests/test_service_runner_fast_run_fallback.py +75 -0
- pactown-0.1.47/tests/test_user_isolation_manager.py +152 -0
- pactown-0.1.5/TODO.md +0 -5
- pactown-0.1.5/examples/quadlet-vps/sample.container +0 -44
- pactown-0.1.5/project.functions.toon +0 -364
- pactown-0.1.5/project.toon +0 -265
- pactown-0.1.5/src/pactown/__init__.py +0 -23
- pactown-0.1.5/src/pactown/markpact_blocks.py +0 -33
- pactown-0.1.5/src/pactown/sandbox_manager.py +0 -338
- {pactown-0.1.5 → pactown-0.1.47}/.gitignore +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/LICENSE +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/microservices/README.md +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/microservices/saas.pactown.yaml +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/microservices/services/node-api/README.md +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/quadlet-vps/README.md +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/README.md +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples/saas-platform/saas.pactown.yaml +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/examples.md +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/img.png +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/project.sh +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/project.toon-schema.json +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/saas.pactown.yaml +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/deploy/__init__.py +3 -3
- {pactown-0.1.5 → pactown-0.1.47}/src/pactown/registry/__init__.py +1 -1
- {pactown-0.1.5 → pactown-0.1.47}/tests/__init__.py +0 -0
- {pactown-0.1.5 → pactown-0.1.47}/tests/test_deploy_dockerfile.py +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.4.0] - 2026-01-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Fast Start Module** (`fast_start.py`)
|
|
13
|
+
- Dependency caching with hash-based venv reuse
|
|
14
|
+
- ~50-100ms startup for cached deps vs ~5-10s fresh
|
|
15
|
+
- `ServiceRunner.fast_run()` method
|
|
16
|
+
- Parallel file writing for sandbox creation
|
|
17
|
+
|
|
18
|
+
- **Security Policy Module** (`security.py`)
|
|
19
|
+
- Rate limiting with token bucket algorithm
|
|
20
|
+
- User profiles with tier-based limits (FREE/BASIC/PRO/ENTERPRISE)
|
|
21
|
+
- Concurrent service limits per user
|
|
22
|
+
- Anomaly logging for admin monitoring
|
|
23
|
+
- Server load throttling
|
|
24
|
+
|
|
25
|
+
- **User Isolation Module** (`user_isolation.py`)
|
|
26
|
+
- Linux user-based sandbox isolation
|
|
27
|
+
- Per-SaaS-user home directories
|
|
28
|
+
- Process isolation with different UIDs
|
|
29
|
+
- Export/import for user data migration
|
|
30
|
+
- REST API endpoints for user management
|
|
31
|
+
|
|
32
|
+
- **Detailed Logging**
|
|
33
|
+
- Structured logging in sandbox_manager
|
|
34
|
+
- STDERR/STDOUT capture on process failure
|
|
35
|
+
- Signal interpretation (SIGTERM, SIGKILL, etc.)
|
|
36
|
+
- Per-service error log files
|
|
37
|
+
|
|
38
|
+
- **New Documentation**
|
|
39
|
+
- `docs/FAST_START.md` - Dependency caching guide
|
|
40
|
+
- `docs/SECURITY_POLICY.md` - Rate limiting and user profiles
|
|
41
|
+
- `docs/USER_ISOLATION.md` - Multi-tenant isolation
|
|
42
|
+
- `docs/LOGGING.md` - Structured logging guide
|
|
43
|
+
- Navigation links across all docs
|
|
44
|
+
|
|
45
|
+
- **New Examples**
|
|
46
|
+
- `examples/fast-start-demo/` - Fast startup with caching
|
|
47
|
+
- `examples/security-policy/` - Rate limiting demo
|
|
48
|
+
- `examples/user-isolation/` - Multi-tenant isolation demo
|
|
49
|
+
|
|
50
|
+
### Changed
|
|
51
|
+
|
|
52
|
+
- README.md restructured with feature menu and quick navigation
|
|
53
|
+
- All docs updated with cross-links for easier navigation
|
|
54
|
+
- sandbox_manager.py: Better error capture and signal handling
|
|
55
|
+
- service_runner.py: Added delays to prevent race conditions on restart
|
|
56
|
+
|
|
57
|
+
### Fixed
|
|
58
|
+
|
|
59
|
+
- Process killed by SIGTERM on restart (race condition)
|
|
60
|
+
- Truncated error output from crashed processes
|
|
61
|
+
- **Hardcoded port mismatch** - Auto-replace hardcoded ports (e.g., `--port 8009`) with requested port
|
|
62
|
+
- PORT and MARKPACT_PORT environment variables now always set
|
|
63
|
+
|
|
64
|
+
## [Unreleased]
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- Podman Quadlet deployment backend (`pactown.deploy.quadlet`) with templates, backend operations, and Traefik integration.
|
|
69
|
+
- Interactive Quadlet shell (`pactown quadlet shell`).
|
|
70
|
+
- Quadlet REST API (`pactown quadlet api`) and entrypoint `pactown-quadlet-api`.
|
|
71
|
+
- Security hardening and injection test suite (`tests/test_quadlet_security.py`).
|
|
72
|
+
- Quadlet security guide (`docs/SECURITY.md`).
|
|
73
|
+
- Cloudflare Workers comparison (`docs/CLOUDFLARE_WORKERS_COMPARISON.md`).
|
|
74
|
+
- Practical Quadlet examples in `examples/*` where the user edits only `README.md` (embedded code blocks) and deployment artifacts are generated into `./sandbox`.
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
|
|
78
|
+
- Dockerfile Python healthcheck now uses `MARKPACT_PORT` with fallback to `PORT` to maintain compatibility.
|
|
79
|
+
- Registry timestamps use timezone-aware datetimes (`datetime.now(timezone.utc)`) to avoid Python 3.13 deprecations.
|
|
80
|
+
- Makefile:
|
|
81
|
+
- Prefers project venv python if present.
|
|
82
|
+
- `lint`/`format` fall back to `pipx run ruff` when ruff is not installed in the interpreter.
|
|
83
|
+
- `test` explicitly loads `pytest_asyncio.plugin` to work with `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1`.
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
- Multiple Quadlet injection vectors (container name, env var, volume, Traefik label, systemd unit) mitigated via input sanitization.
|
|
88
|
+
- Ruff lint issues across `src/` and `tests/`.
|
|
89
|
+
|
|
90
|
+
## [0.1.5]
|
|
91
|
+
|
|
92
|
+
- Initial public version.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.PHONY: help install dev test test-cov lint format build clean registry up down status examples check-pypi-deps publish-pypi bump-patch bump-minor bump-major release
|
|
2
2
|
|
|
3
|
-
PYTHON ?= python3
|
|
3
|
+
PYTHON ?= $(shell if [ -x ./venv/bin/python3 ]; then echo ./venv/bin/python3; elif [ -x ./.venv/bin/python3 ]; then echo ./.venv/bin/python3; else echo python3; fi)
|
|
4
4
|
CONFIG ?= saas.pactown.yaml
|
|
5
5
|
README ?= README.md
|
|
6
6
|
SANDBOX ?= ./sandbox
|
|
@@ -22,16 +22,34 @@ dev: ## Install dev dependencies
|
|
|
22
22
|
$(PYTHON) -m pip install -e ".[dev]"
|
|
23
23
|
|
|
24
24
|
test: ## Run tests
|
|
25
|
-
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest tests/ -v
|
|
25
|
+
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest -p pytest_asyncio.plugin tests/ -v
|
|
26
26
|
|
|
27
27
|
test-cov: ## Run tests with coverage
|
|
28
|
-
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest tests/ -v --cov=src/pactown --cov-report=term-missing
|
|
28
|
+
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTHONPATH=src $(PYTHON) -m pytest -p pytest_asyncio.plugin tests/ -v --cov=src/pactown --cov-report=term-missing
|
|
29
29
|
|
|
30
30
|
lint: ## Run linter
|
|
31
|
-
$(PYTHON) -
|
|
31
|
+
@if $(PYTHON) -c "import ruff" >/dev/null 2>&1; then \
|
|
32
|
+
$(PYTHON) -m ruff check src/ tests/; \
|
|
33
|
+
elif command -v ruff >/dev/null 2>&1; then \
|
|
34
|
+
ruff check src/ tests/; \
|
|
35
|
+
elif command -v pipx >/dev/null 2>&1; then \
|
|
36
|
+
pipx run ruff check src/ tests/; \
|
|
37
|
+
else \
|
|
38
|
+
echo "Missing dependency: ruff. Run: make dev (or install via pipx)."; \
|
|
39
|
+
exit 1; \
|
|
40
|
+
fi
|
|
32
41
|
|
|
33
42
|
format: ## Format code
|
|
34
|
-
$(PYTHON) -
|
|
43
|
+
@if $(PYTHON) -c "import ruff" >/dev/null 2>&1; then \
|
|
44
|
+
$(PYTHON) -m ruff format src/ tests/; \
|
|
45
|
+
elif command -v ruff >/dev/null 2>&1; then \
|
|
46
|
+
ruff format src/ tests/; \
|
|
47
|
+
elif command -v pipx >/dev/null 2>&1; then \
|
|
48
|
+
pipx run ruff format src/ tests/; \
|
|
49
|
+
else \
|
|
50
|
+
echo "Missing dependency: ruff. Run: make dev (or install via pipx)."; \
|
|
51
|
+
exit 1; \
|
|
52
|
+
fi
|
|
35
53
|
|
|
36
54
|
build: clean ## Build package
|
|
37
55
|
@$(PYTHON) -c "import build" >/dev/null 2>&1 || (echo "Missing dependency: build. Run: $(PYTHON) -m pip install -e \".[dev]\" (or: $(PYTHON) -m pip install build)" && exit 1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pactown
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.47
|
|
4
4
|
Summary: Decentralized Service Ecosystem Orchestrator - Build interconnected microservices from Markdown using markpact
|
|
5
5
|
Project-URL: Homepage, https://github.com/wronai/pactown
|
|
6
6
|
Project-URL: Repository, https://github.com/wronai/pactown
|
|
@@ -30,6 +30,8 @@ Requires-Dist: pyyaml>=6.0
|
|
|
30
30
|
Requires-Dist: rich>=13.0
|
|
31
31
|
Requires-Dist: uvicorn>=0.20.0
|
|
32
32
|
Requires-Dist: watchfiles>=0.20.0
|
|
33
|
+
Provides-Extra: all
|
|
34
|
+
Requires-Dist: lolm>=0.1.6; extra == 'all'
|
|
33
35
|
Provides-Extra: dev
|
|
34
36
|
Requires-Dist: build; extra == 'dev'
|
|
35
37
|
Requires-Dist: bump2version>=1.0; extra == 'dev'
|
|
@@ -38,6 +40,8 @@ Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
|
38
40
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
39
41
|
Requires-Dist: ruff>=0.1; extra == 'dev'
|
|
40
42
|
Requires-Dist: twine; extra == 'dev'
|
|
43
|
+
Provides-Extra: llm
|
|
44
|
+
Requires-Dist: lolm>=0.1.6; extra == 'llm'
|
|
41
45
|
Description-Content-Type: text/markdown
|
|
42
46
|
|
|
43
47
|

|
|
@@ -74,6 +78,7 @@ Pactown enables you to compose multiple independent markpact projects into a uni
|
|
|
74
78
|
|
|
75
79
|
## Key Features
|
|
76
80
|
|
|
81
|
+
### Core Features
|
|
77
82
|
- **🔗 Service Composition** – Combine multiple markpact READMEs into one ecosystem
|
|
78
83
|
- **📦 Local Registry** – Store and share markpact artifacts across projects
|
|
79
84
|
- **🔄 Dependency Resolution** – Automatic startup order based on service dependencies
|
|
@@ -84,14 +89,43 @@ Pactown enables you to compose multiple independent markpact projects into a uni
|
|
|
84
89
|
- **🔍 Service Discovery** – Name-based service lookup, no hardcoded URLs
|
|
85
90
|
- **⚡ Config Generator** – Auto-generate config from folder of READMEs
|
|
86
91
|
|
|
87
|
-
|
|
92
|
+
### New in v0.4.0
|
|
93
|
+
- **⚡ Fast Start** – Dependency caching for millisecond startup times ([docs](docs/FAST_START.md))
|
|
94
|
+
- **🛡️ Security Policy** – Rate limiting, user profiles, anomaly logging ([docs](docs/SECURITY_POLICY.md))
|
|
95
|
+
- **👤 User Isolation** – Linux user-based sandbox isolation for multi-tenant SaaS ([docs](docs/USER_ISOLATION.md))
|
|
96
|
+
- **📊 Detailed Logging** – Structured logs with error capture ([docs](docs/LOGGING.md))
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 📚 Documentation
|
|
101
|
+
|
|
102
|
+
### Quick Navigation
|
|
103
|
+
|
|
104
|
+
| Category | Documents |
|
|
105
|
+
|----------|-----------|
|
|
106
|
+
| **Getting Started** | [Quick Start](#quick-start) · [Installation](#installation) · [Commands](#commands) |
|
|
107
|
+
| **Core Concepts** | [Specification](docs/SPECIFICATION.md) · [Configuration](docs/CONFIGURATION.md) · [Network](docs/NETWORK.md) |
|
|
108
|
+
| **Deployment** | [Deployment Guide](docs/DEPLOYMENT.md) · [Quadlet/VPS](docs/QUADLET.md) · [Generator](docs/GENERATOR.md) |
|
|
109
|
+
| **Security** | [Security Policy](docs/SECURITY_POLICY.md) · [Quadlet Security](docs/SECURITY.md) · [User Isolation](docs/USER_ISOLATION.md) |
|
|
110
|
+
| **Performance** | [Fast Start](docs/FAST_START.md) · [Logging](docs/LOGGING.md) |
|
|
111
|
+
| **Comparisons** | [vs Cloudflare Workers](docs/CLOUDFLARE_WORKERS_COMPARISON.md) |
|
|
112
|
+
|
|
113
|
+
### All Documentation
|
|
88
114
|
|
|
89
115
|
| Document | Description |
|
|
90
116
|
|----------|-------------|
|
|
91
117
|
| [Specification](docs/SPECIFICATION.md) | Architecture and design |
|
|
92
118
|
| [Configuration](docs/CONFIGURATION.md) | YAML config reference |
|
|
119
|
+
| [Deployment](docs/DEPLOYMENT.md) | Production deployment guide (Compose/Kubernetes/Quadlet) |
|
|
93
120
|
| [Network](docs/NETWORK.md) | Dynamic ports & service discovery |
|
|
94
121
|
| [Generator](docs/GENERATOR.md) | Auto-generate configs |
|
|
122
|
+
| [Quadlet](docs/QUADLET.md) | Podman Quadlet deployment for VPS production |
|
|
123
|
+
| [Security](docs/SECURITY.md) | Quadlet security hardening and injection test suite |
|
|
124
|
+
| [Security Policy](docs/SECURITY_POLICY.md) | Rate limiting, user profiles, resource monitoring |
|
|
125
|
+
| [Fast Start](docs/FAST_START.md) | Dependency caching for fast startup |
|
|
126
|
+
| [User Isolation](docs/USER_ISOLATION.md) | Linux user-based sandbox isolation |
|
|
127
|
+
| [Logging](docs/LOGGING.md) | Structured logging and error capture |
|
|
128
|
+
| [Cloudflare Workers comparison](docs/CLOUDFLARE_WORKERS_COMPARISON.md) | When to use Pactown vs Cloudflare Workers |
|
|
95
129
|
|
|
96
130
|
### Source Code Reference
|
|
97
131
|
|
|
@@ -102,7 +136,29 @@ Pactown enables you to compose multiple independent markpact projects into a uni
|
|
|
102
136
|
| [`resolver.py`](src/pactown/resolver.py) | Dependency resolution |
|
|
103
137
|
| [`network.py`](src/pactown/network.py) | Port allocation & discovery |
|
|
104
138
|
| [`generator.py`](src/pactown/generator.py) | Config file generator |
|
|
139
|
+
| [`service_runner.py`](src/pactown/service_runner.py) | High-level service runner API |
|
|
140
|
+
| [`security.py`](src/pactown/security.py) | Security policy & rate limiting |
|
|
141
|
+
| [`fast_start.py`](src/pactown/fast_start.py) | Dependency caching & fast startup |
|
|
142
|
+
| [`user_isolation.py`](src/pactown/user_isolation.py) | Linux user isolation for multi-tenant |
|
|
143
|
+
| [`sandbox_manager.py`](src/pactown/sandbox_manager.py) | Sandbox lifecycle management |
|
|
105
144
|
| [`registry/`](src/pactown/registry/) | Local artifact registry |
|
|
145
|
+
| [`deploy/`](src/pactown/deploy/) | Deployment backends (Docker, Podman, K8s, Quadlet) |
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 🎯 Examples
|
|
150
|
+
|
|
151
|
+
| Example | What it shows |
|
|
152
|
+
|---------|---------------|
|
|
153
|
+
| [`examples/saas-platform/`](examples/saas-platform/) | Complete SaaS with Web + API + Database + Gateway |
|
|
154
|
+
| [`examples/quadlet-vps/`](examples/quadlet-vps/) | VPS setup and Quadlet workflow |
|
|
155
|
+
| [`examples/email-llm-responder/`](examples/email-llm-responder/) | Email automation with LLM integration |
|
|
156
|
+
| [`examples/api-gateway-webhooks/`](examples/api-gateway-webhooks/) | API gateway / webhook handler |
|
|
157
|
+
| [`examples/realtime-notifications/`](examples/realtime-notifications/) | WebSocket + SSE real-time notifications |
|
|
158
|
+
| [`examples/microservices/`](examples/microservices/) | Multi-language microservices |
|
|
159
|
+
| [`examples/fast-start-demo/`](examples/fast-start-demo/) | **NEW:** Fast startup with dependency caching |
|
|
160
|
+
| [`examples/security-policy/`](examples/security-policy/) | **NEW:** Rate limiting and user profiles |
|
|
161
|
+
| [`examples/user-isolation/`](examples/user-isolation/) | **NEW:** Multi-tenant user isolation |
|
|
106
162
|
|
|
107
163
|
## Installation
|
|
108
164
|
|
|
@@ -145,31 +201,31 @@ services:
|
|
|
145
201
|
|
|
146
202
|
Each service is a standard markpact README:
|
|
147
203
|
|
|
148
|
-
|
|
204
|
+
````markdown
|
|
149
205
|
# API Service
|
|
150
206
|
|
|
151
207
|
REST API for the application.
|
|
152
208
|
|
|
153
209
|
---
|
|
154
210
|
|
|
155
|
-
|
|
211
|
+
```python markpact:deps
|
|
156
212
|
fastapi
|
|
157
213
|
uvicorn
|
|
158
|
-
|
|
214
|
+
```
|
|
159
215
|
|
|
160
|
-
|
|
216
|
+
```python markpact:file path=main.py
|
|
161
217
|
from fastapi import FastAPI
|
|
162
218
|
app = FastAPI()
|
|
163
219
|
|
|
164
220
|
@app.get("/health")
|
|
165
221
|
def health():
|
|
166
222
|
return {"status": "ok"}
|
|
167
|
-
|
|
223
|
+
```
|
|
168
224
|
|
|
169
|
-
|
|
225
|
+
```bash markpact:run
|
|
170
226
|
uvicorn main:app --port ${MARKPACT_PORT:-8001}
|
|
171
|
-
\`\`\`
|
|
172
227
|
```
|
|
228
|
+
````
|
|
173
229
|
|
|
174
230
|
### 3. Start the ecosystem
|
|
175
231
|
|
|
@@ -32,6 +32,7 @@ Pactown enables you to compose multiple independent markpact projects into a uni
|
|
|
32
32
|
|
|
33
33
|
## Key Features
|
|
34
34
|
|
|
35
|
+
### Core Features
|
|
35
36
|
- **🔗 Service Composition** – Combine multiple markpact READMEs into one ecosystem
|
|
36
37
|
- **📦 Local Registry** – Store and share markpact artifacts across projects
|
|
37
38
|
- **🔄 Dependency Resolution** – Automatic startup order based on service dependencies
|
|
@@ -42,14 +43,43 @@ Pactown enables you to compose multiple independent markpact projects into a uni
|
|
|
42
43
|
- **🔍 Service Discovery** – Name-based service lookup, no hardcoded URLs
|
|
43
44
|
- **⚡ Config Generator** – Auto-generate config from folder of READMEs
|
|
44
45
|
|
|
45
|
-
|
|
46
|
+
### New in v0.4.0
|
|
47
|
+
- **⚡ Fast Start** – Dependency caching for millisecond startup times ([docs](docs/FAST_START.md))
|
|
48
|
+
- **🛡️ Security Policy** – Rate limiting, user profiles, anomaly logging ([docs](docs/SECURITY_POLICY.md))
|
|
49
|
+
- **👤 User Isolation** – Linux user-based sandbox isolation for multi-tenant SaaS ([docs](docs/USER_ISOLATION.md))
|
|
50
|
+
- **📊 Detailed Logging** – Structured logs with error capture ([docs](docs/LOGGING.md))
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 📚 Documentation
|
|
55
|
+
|
|
56
|
+
### Quick Navigation
|
|
57
|
+
|
|
58
|
+
| Category | Documents |
|
|
59
|
+
|----------|-----------|
|
|
60
|
+
| **Getting Started** | [Quick Start](#quick-start) · [Installation](#installation) · [Commands](#commands) |
|
|
61
|
+
| **Core Concepts** | [Specification](docs/SPECIFICATION.md) · [Configuration](docs/CONFIGURATION.md) · [Network](docs/NETWORK.md) |
|
|
62
|
+
| **Deployment** | [Deployment Guide](docs/DEPLOYMENT.md) · [Quadlet/VPS](docs/QUADLET.md) · [Generator](docs/GENERATOR.md) |
|
|
63
|
+
| **Security** | [Security Policy](docs/SECURITY_POLICY.md) · [Quadlet Security](docs/SECURITY.md) · [User Isolation](docs/USER_ISOLATION.md) |
|
|
64
|
+
| **Performance** | [Fast Start](docs/FAST_START.md) · [Logging](docs/LOGGING.md) |
|
|
65
|
+
| **Comparisons** | [vs Cloudflare Workers](docs/CLOUDFLARE_WORKERS_COMPARISON.md) |
|
|
66
|
+
|
|
67
|
+
### All Documentation
|
|
46
68
|
|
|
47
69
|
| Document | Description |
|
|
48
70
|
|----------|-------------|
|
|
49
71
|
| [Specification](docs/SPECIFICATION.md) | Architecture and design |
|
|
50
72
|
| [Configuration](docs/CONFIGURATION.md) | YAML config reference |
|
|
73
|
+
| [Deployment](docs/DEPLOYMENT.md) | Production deployment guide (Compose/Kubernetes/Quadlet) |
|
|
51
74
|
| [Network](docs/NETWORK.md) | Dynamic ports & service discovery |
|
|
52
75
|
| [Generator](docs/GENERATOR.md) | Auto-generate configs |
|
|
76
|
+
| [Quadlet](docs/QUADLET.md) | Podman Quadlet deployment for VPS production |
|
|
77
|
+
| [Security](docs/SECURITY.md) | Quadlet security hardening and injection test suite |
|
|
78
|
+
| [Security Policy](docs/SECURITY_POLICY.md) | Rate limiting, user profiles, resource monitoring |
|
|
79
|
+
| [Fast Start](docs/FAST_START.md) | Dependency caching for fast startup |
|
|
80
|
+
| [User Isolation](docs/USER_ISOLATION.md) | Linux user-based sandbox isolation |
|
|
81
|
+
| [Logging](docs/LOGGING.md) | Structured logging and error capture |
|
|
82
|
+
| [Cloudflare Workers comparison](docs/CLOUDFLARE_WORKERS_COMPARISON.md) | When to use Pactown vs Cloudflare Workers |
|
|
53
83
|
|
|
54
84
|
### Source Code Reference
|
|
55
85
|
|
|
@@ -60,7 +90,29 @@ Pactown enables you to compose multiple independent markpact projects into a uni
|
|
|
60
90
|
| [`resolver.py`](src/pactown/resolver.py) | Dependency resolution |
|
|
61
91
|
| [`network.py`](src/pactown/network.py) | Port allocation & discovery |
|
|
62
92
|
| [`generator.py`](src/pactown/generator.py) | Config file generator |
|
|
93
|
+
| [`service_runner.py`](src/pactown/service_runner.py) | High-level service runner API |
|
|
94
|
+
| [`security.py`](src/pactown/security.py) | Security policy & rate limiting |
|
|
95
|
+
| [`fast_start.py`](src/pactown/fast_start.py) | Dependency caching & fast startup |
|
|
96
|
+
| [`user_isolation.py`](src/pactown/user_isolation.py) | Linux user isolation for multi-tenant |
|
|
97
|
+
| [`sandbox_manager.py`](src/pactown/sandbox_manager.py) | Sandbox lifecycle management |
|
|
63
98
|
| [`registry/`](src/pactown/registry/) | Local artifact registry |
|
|
99
|
+
| [`deploy/`](src/pactown/deploy/) | Deployment backends (Docker, Podman, K8s, Quadlet) |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 🎯 Examples
|
|
104
|
+
|
|
105
|
+
| Example | What it shows |
|
|
106
|
+
|---------|---------------|
|
|
107
|
+
| [`examples/saas-platform/`](examples/saas-platform/) | Complete SaaS with Web + API + Database + Gateway |
|
|
108
|
+
| [`examples/quadlet-vps/`](examples/quadlet-vps/) | VPS setup and Quadlet workflow |
|
|
109
|
+
| [`examples/email-llm-responder/`](examples/email-llm-responder/) | Email automation with LLM integration |
|
|
110
|
+
| [`examples/api-gateway-webhooks/`](examples/api-gateway-webhooks/) | API gateway / webhook handler |
|
|
111
|
+
| [`examples/realtime-notifications/`](examples/realtime-notifications/) | WebSocket + SSE real-time notifications |
|
|
112
|
+
| [`examples/microservices/`](examples/microservices/) | Multi-language microservices |
|
|
113
|
+
| [`examples/fast-start-demo/`](examples/fast-start-demo/) | **NEW:** Fast startup with dependency caching |
|
|
114
|
+
| [`examples/security-policy/`](examples/security-policy/) | **NEW:** Rate limiting and user profiles |
|
|
115
|
+
| [`examples/user-isolation/`](examples/user-isolation/) | **NEW:** Multi-tenant user isolation |
|
|
64
116
|
|
|
65
117
|
## Installation
|
|
66
118
|
|
|
@@ -103,31 +155,31 @@ services:
|
|
|
103
155
|
|
|
104
156
|
Each service is a standard markpact README:
|
|
105
157
|
|
|
106
|
-
|
|
158
|
+
````markdown
|
|
107
159
|
# API Service
|
|
108
160
|
|
|
109
161
|
REST API for the application.
|
|
110
162
|
|
|
111
163
|
---
|
|
112
164
|
|
|
113
|
-
|
|
165
|
+
```python markpact:deps
|
|
114
166
|
fastapi
|
|
115
167
|
uvicorn
|
|
116
|
-
|
|
168
|
+
```
|
|
117
169
|
|
|
118
|
-
|
|
170
|
+
```python markpact:file path=main.py
|
|
119
171
|
from fastapi import FastAPI
|
|
120
172
|
app = FastAPI()
|
|
121
173
|
|
|
122
174
|
@app.get("/health")
|
|
123
175
|
def health():
|
|
124
176
|
return {"status": "ok"}
|
|
125
|
-
|
|
177
|
+
```
|
|
126
178
|
|
|
127
|
-
|
|
179
|
+
```bash markpact:run
|
|
128
180
|
uvicorn main:app --port ${MARKPACT_PORT:-8001}
|
|
129
|
-
\`\`\`
|
|
130
181
|
```
|
|
182
|
+
````
|
|
131
183
|
|
|
132
184
|
### 3. Start the ecosystem
|
|
133
185
|
|
pactown-0.1.47/TODO.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# TODO
|
|
2
|
+
|
|
3
|
+
## Status (done)
|
|
4
|
+
|
|
5
|
+
- Pactown jako paczka Python (`pyproject.toml`, CLI, Makefile).
|
|
6
|
+
- Orchestrator (sandboxes), dependency resolution, registry + API.
|
|
7
|
+
- Podman Quadlet deployment:
|
|
8
|
+
- `pactown quadlet init / deploy / list / logs / shell / api`
|
|
9
|
+
- Traefik + TLS (Let's Encrypt)
|
|
10
|
+
- Security hardening:
|
|
11
|
+
- input sanitization w generatorze Quadlet
|
|
12
|
+
- test suite: `tests/test_quadlet_security.py`
|
|
13
|
+
- dokument: `docs/SECURITY.md`
|
|
14
|
+
- Przykłady Quadlet w `examples/*`:
|
|
15
|
+
- user edytuje tylko `README.md` (kod w markdown)
|
|
16
|
+
- reszta plików do uruchomienia jest generowana do `./sandbox`
|
|
17
|
+
|
|
18
|
+
## Next steps
|
|
19
|
+
|
|
20
|
+
### Quadlet / Sandbox generation
|
|
21
|
+
|
|
22
|
+
- Zintegrować generowanie `./sandbox` z README (code blocks `main.py`, `routes.yaml`, `requirements.txt`) bezpośrednio w flow `pactown quadlet deploy`.
|
|
23
|
+
- Dodać walidację, że README zawiera minimalny zestaw blocków wymaganych do uruchomienia.
|
|
24
|
+
- Dodać tryb `pactown quadlet generate --sandbox ./sandbox` (bez deployu) do łatwego review.
|
|
25
|
+
|
|
26
|
+
### Security (runtime)
|
|
27
|
+
|
|
28
|
+
- Dodać runtime-hardening checklist: SELinux/AppArmor, firewall, limits per tenant.
|
|
29
|
+
- Rozważyć blokowanie dodatkowych mountów (symlinki, `:Z`, `:suid`, itp.) oraz logowanie prób.
|
|
30
|
+
|
|
31
|
+
### Docs
|
|
32
|
+
|
|
33
|
+
- Uporządkować przewodnik: `docs/QUADLET.md` + `docs/SECURITY.md` + porównanie z CF.
|
|
34
|
+
- Dodać krótkie “quick examples” jak odpalić 3 przykłady na VPS.
|
|
35
|
+
|
|
36
|
+
### Packaging
|
|
37
|
+
|
|
38
|
+
- Ustalić docelowy flow dla `make dev` i `make lint` (czy zawsze venv, czy pipx fallback).
|