AbstractGateway: deployable Run Gateway host for AbstractRuntime (commands + ledger).
Project description
AbstractGateway
AbstractGateway is the deployable Run Gateway host for AbstractRuntime runs:
- durable command inbox
- ledger replay/stream
- security baseline (token + origin + limits)
This decouples the gateway service from any specific UI (AbstractFlow, AbstractCode, web/PWA thin clients).
What it does (contract)
- Clients act by submitting durable commands:
start,resume,pause,cancel,emit_event - Clients render by replaying/streaming the durable ledger (cursor-based, replay-first)
Endpoints:
POST /api/gateway/runs/startGET /api/gateway/runs/{run_id}GET /api/gateway/runs/{run_id}/ledgerGET /api/gateway/runs/{run_id}/ledger/stream(SSE)POST /api/gateway/commands
Install
Default (bundle mode)
pip install abstractgateway
Bundle mode executes WorkflowBundles (.flow) via WorkflowArtifacts without importing abstractflow.
Optional (compatibility): VisualFlow JSON
pip install "abstractgateway[visualflow]"
This mode depends on the AbstractFlow compiler library (abstractflow) to interpret VisualFlow JSON (it does not require the AbstractFlow web UI/app).
Run
export ABSTRACTGATEWAY_DATA_DIR="./runtime"
export ABSTRACTGATEWAY_FLOWS_DIR="/path/to/bundles-or-flow"
# Security (recommended)
export ABSTRACTGATEWAY_AUTH_TOKEN="your-token"
export ABSTRACTGATEWAY_ALLOWED_ORIGINS="*"
abstractgateway serve --host 127.0.0.1 --port 8080
Notes:
ABSTRACTGATEWAY_WORKFLOW_SOURCEdefaults tobundle. Valid values:bundle(default):ABSTRACTGATEWAY_FLOWS_DIRpoints to a directory containing*.flowbundles (or a single.flowfile)visualflow(compat):ABSTRACTGATEWAY_FLOWS_DIRpoints to a directory containing*.jsonVisualFlow files
- For production, run behind HTTPS (reverse proxy) and set exact allowed origins.
Creating a .flow bundle (authoring)
Use AbstractFlow to pack a bundle:
abstractflow bundle pack /path/to/root.json --out /path/to/bundles/my.flow --flows-dir /path/to/flows
Starting a run (bundle mode)
The stable way is to pass bundle_id + flow_id:
curl -sS -X POST "http://localhost:8080/api/gateway/runs/start" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-token" \
-d '{"bundle_id":"my-bundle","flow_id":"ac-echo","input_data":{}}'
For backwards-compatible clients, you can also pass a namespaced id as flow_id ("my-bundle:ac-echo").
Docs
- Architecture:
docs/architecture.md(framework) andabstractgateway/docs/architecture.md(this package) - Deployment:
docs/guide/deployment.md
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file abstractgateway-0.1.0.tar.gz.
File metadata
- Download URL: abstractgateway-0.1.0.tar.gz
- Upload date:
- Size: 33.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e77579693f180157a0950ea6913223f9af2a119356e19a71f5188570ddfd9d9
|
|
| MD5 |
1253b533082f9900bc13573e10f71672
|
|
| BLAKE2b-256 |
4d500034a2745bc371473af7e10545eec538393d31508ce37a897cfcbd6e9b1a
|
File details
Details for the file abstractgateway-0.1.0-py3-none-any.whl.
File metadata
- Download URL: abstractgateway-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0da604796d2ff63a5913601d5e79cb22bc180c526d12b6edef397ccd7378ba32
|
|
| MD5 |
20faaa5858e3254a7642027664684474
|
|
| BLAKE2b-256 |
e07de981ae7ee6da6f486a5d8ddfc87023a7e6840c1eba826ac6c8fa6611d8fc
|