Skip to main content

DBL Gateway

Project description

DBL Gateway

Authoritative DBL and KL gateway. This service is the single writer for append-only trails, applies policy via dbl-policy, and executes via kl-kernel-logic. UI and boundary services consume its snapshots and emit INTENT only.

This release stabilizes the 0.3.x stackline and does not introduce new wire contracts.

Compatible stack versions:

  • dbl-core==0.3.2
  • dbl-policy==0.2.2
  • dbl-main==0.3.1
  • kl-kernel-logic==0.5.0

Quickstart (PowerShell)

py -3.11 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"

Run the gateway:

dbl-gateway serve --db .\data\trail.sqlite --host 127.0.0.1 --port 8010

Run with uvicorn:

$env:DBL_GATEWAY_DB=".\data\trail.sqlite"
py -3.11 -m uvicorn dbl_gateway.app:app --host 127.0.0.1 --port 8010

Local API docs (OpenAPI)

When the gateway is running, the interactive API docs are available at:

  • Swagger UI: http://127.0.0.1:8010/docs
  • OpenAPI JSON: http://127.0.0.1:8010/openapi.json

Quick verification:

  • Health: http://127.0.0.1:8010/healthz
  • Capabilities: http://127.0.0.1:8010/capabilities
  • Snapshot (first page): http://127.0.0.1:8010/snapshot?offset=0&limit=50&stream_id=default

Quick probes (PowerShell)

Health:

curl -s "http://127.0.0.1:8010/healthz"

Capabilities:

curl -s "http://127.0.0.1:8010/capabilities"

Snapshot (page through the trail):

curl -s "http://127.0.0.1:8010/snapshot?offset=0&limit=50&stream_id=default"
curl -s "http://127.0.0.1:8010/snapshot?offset=50&limit=50&stream_id=default"

Tail (SSE stream):

curl -N "http://127.0.0.1:8010/tail?since=0&stream_id=default"

Emit an INTENT (example):

$body = @{
  interface_version = 1
  correlation_id = [guid]::NewGuid().ToString()
  payload = @{
    stream_id = "default"
    lane = "ui"
    actor = "dev"
    intent_type = "ui.ping"
    payload = @{ text = "hello" }
  }
} | ConvertTo-Json -Depth 8

curl -s -X POST "http://127.0.0.1:8010/ingress/intent" `
  -H "content-type: application/json" `
  -d $body

Endpoints

Write:

  • POST /ingress/intent

Read:

  • GET /snapshot
  • GET /capabilities
  • GET /healthz

Environment contract

See docs/env_contract.md.

Validation against dbl-reference

See docs/validation_workflow.md.

Notes

  • The gateway is the only component that performs governance and execution.
  • All stabilization is expressed explicitly via DECISION events.
  • Boundary and UI clients do not import dbl-core or dbl-policy.
  • The gateway uses dbl-core for canonicalization and digest computation.

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

dbl_gateway-0.3.5.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

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

dbl_gateway-0.3.5-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file dbl_gateway-0.3.5.tar.gz.

File metadata

  • Download URL: dbl_gateway-0.3.5.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for dbl_gateway-0.3.5.tar.gz
Algorithm Hash digest
SHA256 f6bad16f1c140574e2bb63d723b743e015151db28a7c9a5cec328eb7cb1332f1
MD5 01d1c850632d13ecb3cb1d39c0e0c148
BLAKE2b-256 7be5a28f618e844bafe990cd2215fb2e4018aa9b3112baed82bad64d2a5a7bdb

See more details on using hashes here.

File details

Details for the file dbl_gateway-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: dbl_gateway-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.8

File hashes

Hashes for dbl_gateway-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 59b7734fb2eb0b013be1a90f090d6d0a96b04dcb7ac9eae3a6026339ece4660f
MD5 bfa3a48229de2c2c0b1a23ea62e4b8dc
BLAKE2b-256 b79207f4edaf97558c256cd8f16e06173f3055a83f6c0562c9261245c7e02f9e

See more details on using hashes here.

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