Stigmem reference node — single-host production implementation
Project description
Stigmem Reference Node
Single-host reference implementation of the Stigmem protocol. The modular protocol
specs live under ../spec/specs/, with the generated protocol
composition at ../spec/PROTOCOL.md.
Quick start
# install
pip install .
# run (auth disabled, local db)
stigmem-node
# run with auth
STIGMEM_AUTH_REQUIRED=true STIGMEM_DB_PATH=./data/stigmem.db stigmem-node
Default port: 8765. Override with STIGMEM_PORT.
Configuration
All settings via environment variables (prefix STIGMEM_):
| Variable | Default | Description |
|---|---|---|
STIGMEM_DB_PATH |
stigmem.db |
SQLite file path |
STIGMEM_HOST |
0.0.0.0 |
Bind host |
STIGMEM_PORT |
8765 |
Bind port |
STIGMEM_NODE_URL |
http://localhost:8765 |
Canonical URL for /.well-known/stigmem |
STIGMEM_AUTH_REQUIRED |
false |
Enforce API-key auth |
STIGMEM_LOG_LEVEL |
info |
uvicorn log level |
CORS
The Stigmem node ships with CORS disabled by default. Enable it only for the deployment shape you operate.
Local development (any localhost port)
STIGMEM_CORS_DEV_LOCALHOST=1
Accepts any Origin matching
^https?://(localhost|127\.0\.0\.1)(:\d+)?$. Use this when the UI and API run
on separate, dynamically chosen localhost ports.
Production with a known UI origin
STIGMEM_CORS_ALLOWED_ORIGINS=https://stigmem-ui.example.com
Production with multiple UI origins
STIGMEM_CORS_ALLOWED_ORIGINS=https://a.example.com,https://b.example.com
Self-managed regex (advanced)
STIGMEM_CORS_ALLOWED_ORIGIN_REGEX=^https://[a-z0-9-]+\.example\.com$
Credentials
STIGMEM_CORS_ALLOW_CREDENTIALS defaults to true and controls whether
browsers may send cookies or Authorization headers cross-origin. Set it to
false only when the deployment does not use credentialed browser requests.
Security note
Do not combine STIGMEM_CORS_DEV_LOCALHOST=1 with a production deployment. The
dev-localhost regex is intentionally permissive and must only run on
maintainer-controlled machines.
API
| Route | Description |
|---|---|
POST /v1/facts |
Assert a fact (Spec-03-HTTP-API) |
GET /v1/facts |
Query facts (Spec-03-HTTP-API) |
GET /.well-known/stigmem |
Node metadata (Spec-03-HTTP-API) |
GET /healthz |
Health check |
GET /docs |
OpenAPI UI |
Running tests
cd stigmem/node
pip install ".[dev]"
pytest
Docker
docker build -t stigmem-node .
docker run -p 8765:8765 -v $(pwd)/data:/data stigmem-node
Project details
Release history Release notifications | RSS feed
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 stigmem_node-0.9.0a6.tar.gz.
File metadata
- Download URL: stigmem_node-0.9.0a6.tar.gz
- Upload date:
- Size: 529.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cf47fccd03054a96638cca47f6df9fd7ed5fadd0329ed5d2fc6773d0677d6a4
|
|
| MD5 |
974b9403575e75d326e78baf5ac2d0d1
|
|
| BLAKE2b-256 |
8e528e51262e19d680893ce799475b718f90b876dc94ceac7e167794d3caa4c9
|
Provenance
The following attestation bundles were made for stigmem_node-0.9.0a6.tar.gz:
Publisher:
publish.yml on eidetic-labs/stigmem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stigmem_node-0.9.0a6.tar.gz -
Subject digest:
9cf47fccd03054a96638cca47f6df9fd7ed5fadd0329ed5d2fc6773d0677d6a4 - Sigstore transparency entry: 1613825192
- Sigstore integration time:
-
Permalink:
eidetic-labs/stigmem@703d30eaa6ed0041d001cd66dadba73a3901e995 -
Branch / Tag:
refs/tags/v0.9.0a6 - Owner: https://github.com/eidetic-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@703d30eaa6ed0041d001cd66dadba73a3901e995 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stigmem_node-0.9.0a6-py3-none-any.whl.
File metadata
- Download URL: stigmem_node-0.9.0a6-py3-none-any.whl
- Upload date:
- Size: 360.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cb941d63747f02efc14cfc8968085fc33ed118d955f24247b0a1e54bf963f7d
|
|
| MD5 |
f97f8e96dcbb3ec27a45e903d7538c25
|
|
| BLAKE2b-256 |
10f126577e5e6cb0b0e6d94a52dbd36194a046ebb1a2de840ed1f60b8f70f0c8
|
Provenance
The following attestation bundles were made for stigmem_node-0.9.0a6-py3-none-any.whl:
Publisher:
publish.yml on eidetic-labs/stigmem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stigmem_node-0.9.0a6-py3-none-any.whl -
Subject digest:
2cb941d63747f02efc14cfc8968085fc33ed118d955f24247b0a1e54bf963f7d - Sigstore transparency entry: 1613825285
- Sigstore integration time:
-
Permalink:
eidetic-labs/stigmem@703d30eaa6ed0041d001cd66dadba73a3901e995 -
Branch / Tag:
refs/tags/v0.9.0a6 - Owner: https://github.com/eidetic-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@703d30eaa6ed0041d001cd66dadba73a3901e995 -
Trigger Event:
push
-
Statement type: