Sovereign 8s.is mirror of 8b-is/portail
  • Rust 89.1%
  • Shell 3.5%
  • Nix 2.6%
  • Python 2.1%
  • Nushell 1.9%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Péter Lódri e96552a226
Some checks failed
CI (Blacksmith Accelerated) / build (push) Has been cancelled
Loop-State-PM / update (push) Has been cancelled
Ralph-Loop / decide (push) Has been cancelled
Add the constellation hub to the docs footer
Link koan.vaked.dev from every docs page so portail joins the one front door
like the rest of the constellation.

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4-flash
2026-10-09 14:05:24 +09:00
.cargo v2.x: Nix-first, AWS-LC SSL, wild linker, direnv, cleanup, rustfs note 2026-06-26 22:14:36 +02:00
.deepseek/state fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
.devcontainer fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
.github ci(release): crates-io job depends on verify-tag only — publish not blocked by self-hosted binary chain 2026-08-11 20:36:46 +02:00
.harness-memory fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
.opencode feat: local inference module — mistral.rs + candle stub 2026-06-27 11:47:57 +02:00
.qwen/skills feat: add /v1/compress endpoint and fix workspace compiler errors 2026-06-29 02:59:36 +02:00
.wrangler/cache feat(showcase): add public innovation showcase page with Headroom visualizer, Ultrawhale benchmark & D3 graph 2026-08-11 03:59:03 +02:00
benches fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
crates chore(portail): align crate version bump and workspace compliance 2026-08-12 08:37:58 +02:00
docs Add the constellation hub to the docs footer 2026-10-09 14:05:24 +09:00
nix fix(nix): add litellm + mcp to portail-mcp dependencies 2026-06-29 08:24:01 +02:00
notebooks Add notebooks README with Marimo setup instructions 2026-06-26 17:01:31 +02:00
nushell fix(nushell): use try/catch tagged record in ohmy-slim write-config 2026-06-27 11:48:21 +02:00
packaging Add eBPF, io_uring, DPDK, hyper engines + GitHub native setup 2026-06-26 15:02:46 +02:00
plugins/portail-mcp Initial commit: Portail v0.1.0 — unified AI/MCP/CDN proxy 2026-06-26 12:44:45 +02:00
scripts feat(auth): add Sovereign Key Ed25519 token generator for Patreon/Web3 unlocking 2026-08-12 20:18:28 +02:00
src feat(routes): add /v1/webhooks/stripe and /v1/inference/fleet zero-trust endpoints 2026-08-15 06:41:33 +02:00
tests feat(auth): add Ed25519 Sovereign Key middleware for Lovetta Lane 2026-08-12 23:44:12 +02:00
.dockerignore Add Dockerfile + ghcr.io workflow + multi-arch cosign-signed images 2026-06-26 12:48:31 +02:00
.editorconfig Add WebGL demo, standard project files, Amber conversion 2026-06-26 17:29:19 +02:00
.env.example Add webhook secret configuration via PORTAIL_WEBHOOK_SECRET env var 2026-06-26 15:48:20 +02:00
.envrc fix: clippy derivable_impls for McpBackend 2026-06-27 11:42:09 +02:00
.envrc.example fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
.gitattributes Add WebGL demo, standard project files, Amber conversion 2026-06-26 17:29:19 +02:00
.gitignore fix(ci): remove docs/index.html from .gitignore to fix CF Pages upload 2026-08-13 06:13:28 +02:00
.ignore fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
.versions feat: add /v1/compress endpoint and fix workspace compiler errors 2026-06-29 02:59:36 +02:00
_next_task.md fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
AGENTS.md docs(agents): link OPENCODE_MUX.md from the cross-reference hub 2026-06-27 11:48:21 +02:00
build.rs v2.x: sqlx migration complete, nightly toolchain, build info, fast tests 2026-06-26 22:05:03 +02:00
Cargo.lock chore(release): bump version to 2.2.0, document Sovereign Key auth and Sentinel fleet watchdog 2026-08-15 05:36:45 +02:00
Cargo.toml chore(release): bump version to 2.2.0, document Sovereign Key auth and Sentinel fleet watchdog 2026-08-15 05:36:45 +02:00
CHANGELOG.md release: v1.4.0 — bump version, consolidate CHANGELOG 2026-06-26 20:50:17 +02:00
CODEOWNERS docs: reorganize into architecture/layers/contributors + AGENTS.md hub 2026-06-26 21:16:59 +02:00
CONTRIBUTING.md fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
deny.toml fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
Dockerfile Add Dockerfile + ghcr.io workflow + multi-arch cosign-signed images 2026-06-26 12:48:31 +02:00
flake.lock feat: v2.1.0 — orchestrator, pkg-ctx memory, fleet anchor TUI, SOTA nix flake 2026-06-27 01:27:01 +02:00
flake.nix feat(flake): export portail-mcp package for nix-base integration 2026-06-29 08:08:18 +02:00
justfile Add eBPF, io_uring, DPDK, hyper engines + GitHub native setup 2026-06-26 15:02:46 +02:00
LICENSE Add WebGL demo, standard project files, Amber conversion 2026-06-26 17:29:19 +02:00
LOOP_STATE.md feat(opencode-mux): add flake helper module 2026-06-27 11:48:21 +02:00
opencode.json feat: local inference module — mistral.rs + candle stub 2026-06-27 11:47:57 +02:00
PHILOSOPHY.md feat: v2.1.0 — orchestrator, pkg-ctx memory, fleet anchor TUI, SOTA nix flake 2026-06-27 01:27:01 +02:00
portail.example.toml feat: figment config, V4 plan, deep research agent, data structures audit 2026-06-26 23:33:45 +02:00
portail.toml.history fix: layer_tests TaskStatus → TaskState for A2A rewrite 2026-06-27 11:47:57 +02:00
README.md chore(release): bump version to 2.2.0, document Sovereign Key auth and Sentinel fleet watchdog 2026-08-15 05:36:45 +02:00
robots.txt feat: sovereign fleet updates and launch sync 2026-08-17 14:33:44 +02:00
rust-toolchain.toml v2.x: sqlx migration complete, nightly toolchain, build info, fast tests 2026-06-26 22:05:03 +02:00
SECURITY.md Add WebGL demo, standard project files, Amber conversion 2026-06-26 17:29:19 +02:00
spec.routes.toml v2.0 wire-in audit: fix 11 stub CLIs, wire dead modules, sync spec, add tests 2026-06-26 21:11:11 +02:00
START_HERE.md feat: v2.1.0 — orchestrator, pkg-ctx memory, fleet anchor TUI, SOTA nix flake 2026-06-27 01:27:01 +02:00
Taskfile.yml chore: remove rtk prefix from Taskfile cargo commands 2026-06-27 11:47:57 +02:00
TASKS.md Release prep: CHANGELOG, RELEASE.md, cargo-credential-pass 2026-06-26 13:00:53 +02:00

Portail Logo

Portail

Unified proxy/gateway: AI Gateway + MCP Gateway + CDN cache + Agent protocol + DNS + Observability

CI Status GitHub CI Blacksmith CI Crates.io License: MIT Tests

Blog · GitHub · X/Twitter · Patreon · Chat

v2.0.0 · 201 tests · 0 warnings · 7 CI agents · MIT-licensed since 2026. Read the philosophy: PHILOSOPHY.md

graph TD
    %% Abstract Architectural Concept
    subgraph Ecosystem [Constellation Mesh]
        P((Portail)):::core
        AI[AI Gateway]:::node
        MCP[MCP Socket]:::node
        CDN[Edge CDN]:::node
        A2A[A2A Swarm]:::node
        
        P -.->|streams| AI
        P -.->|executes| MCP
        P -.->|caches| CDN
        P -.->|routes| A2A
    end

    classDef core fill:#00d4ff,stroke:#0a0a0a,stroke-width:2px,color:#0a0a0a;
    classDef node fill:#111,stroke:#00d4ff,stroke-width:1px,color:#fff;
    
    style Ecosystem fill:transparent,stroke:#333,stroke-dasharray: 5 5;

Portail is a high-performance, self-hosted proxy and gateway giving you a single control plane for AI infrastructure. Built in Rust. Start in 5 minutes. Scale to fleet.

One binary. Proxy, cache, hooks, agents, DNS, observability, loop engine. Everything.

Features

  • AI Gateway — Stream proxy to LiteLLM, OpenAI, Anthropic, Ollama
  • MCP Gateway — Unix socket sidecar for MCP tool execution
  • Constellation Router — Decentralized agent routing across vaked.dev constellation surfaces (art, music, proposal, pocoo, quant-love, axiomquant)
  • CDN Cache — Two-tier (Moka in-memory + blake3 disk) with mmap zero-copy reads
  • A2A Protocol — Google Agent-to-Agent: agent cards, task lifecycle, WebSocket streaming
  • A2C Chat — Human-facing chat API with tool use, streaming, tokens
  • Hook Injection — Per-message/per-event prompt injection, CRUD API
  • Event System — Ring buffer + broadcast + SSE + NATS bridge for distributed events
  • DNS — DoH resolution, network isolation, TTL cache, fallback chain
  • Sovereign Key Auth — Offline Ed25519 cryptographic token verification (Authorization: Sovereign <TOKEN>) with signature proofs
  • Sentinel Fleet Watchdog — Real-time /v1/sentinel/fleet liveness endpoint monitoring constellation nodes with automatic HTTP latency and probe checks
  • Security — Rate limiting (token bucket, per-key/per-endpoint), JWT/API-key auth, HSTS, Sovereign Ed25519 keys
  • Self-healing — Config file watcher, auto-reload, validation, version history + rollback
  • TUI Dashboard — Live sparklines, cache ratios, config health, keyboard navigation
  • Event Store — SQLite (WAL, retention) with pluggable Turso/libSQL backend
  • 6 CI Agents — Advisory-only: complexity, drift-detect, spec-verify, fuzz-route, chore-bot, clippy
  • Type Hardened — BoundedMeta (max 16 entries, key≤128B, val≤512B) replaces FxHashMap on hot paths
  • Loop Engine — 5 building blocks (Schedule, Worktree, Skill, Plugin, Sub-agent) + Memory/State + plan→execute→evaluate→decide pipeline
  • Circuit Breaker — Auto-stop after N consecutive failures, manual reset
  • Council Decisions — Ship / Iterate / Escalate with token budget enforcement
  • Config Wizard — portail init interactive generator, zero-config startup
  • GraphQL API — Async-graphql schema, query events + publish mutations
  • Keyboards CLI — Status, events, hooks, cache, health, config — all HTTP-connected to running server

Quick Start

# Install
cargo install portail

# Generate config (optional — works without it)
portail init

# Start server (zero config)
portail serve

# Interactive dashboard
portail

# Check health
portail health
curl http://localhost:8787/dashboard | jq

Installation

Method Command
Cargo cargo install portail
Nix nix profile install github:peterlodri-sec/portail
Docker docker run -p 8787:8787 ghcr.io/peterlodri-sec/portail:latest
Quick script curl -fsSL https://raw.githubusercontent.com/peterlodri-sec/portail/main/scripts/install.sh | bash
From source git clone && cargo build --release

API Endpoints

Endpoint Method Description
/healthz GET Health check
/readyz GET Readiness (dependencies)
/dashboard GET Health snapshot: config, rate, auth, CDN
/metrics GET Prometheus metrics
/v1/chat/completions POST OpenAI-compatible chat
/v1/messages POST Anthropic-compatible messages
/.well-known/agent.json GET A2A agent card
/a2a/tasks POST Create A2A task
/a2a/tasks/{id} GET Get A2A task
/a2a/ws WebSocket A2A real-time streaming
/a2c/chat POST Agent-to-Consumer chat
/events GET/POST Recent events / publish
/events/stream GET SSE event stream
/hooks GET/POST List / create hooks
/hooks/{id} DELETE Delete hook
/graphql POST/GET GraphQL API
/sessions GET Session list
/sessions/{id} GET Session detail
/supervisor/status GET Background task status
/file-cache/{key} PUT/GET/DELETE Content-addressable file cache
/file-cache/stats GET File cache stats
/cdn/{*path} * CDN cache proxy
/mcp/{*path} * MCP sidecar proxy

CLI

portail                    # Interactive TUI dashboard
portail serve              # Start server (zero config)
portail init               # Interactive config wizard
portail status             # Version, config, server check
portail events             # Recent events (from running server)
portail hooks list         # List hooks
portail hooks add          # Add hook via JSON
portail health             # Health check
portail config show        # Show config (TOML)
portail config validate    # Validate config file
portail config rollback    # Rollback to previous version
portail complexity         # Big-O complexity analysis
portail docs               # Generate docs, open in browser
portail learn <topic>      # Learn networking concepts
portail setup              # Domain + TLS certificate setup
portail loop run <sched>   # Run loop iterations
portail loop prompt        # Generate _next-prompt.md for handoff
portail loop council <id>  # Manual council override
portail loop config        # Show loop engine configuration
portail loop schedules     # List registered schedules

Hardware Optimizations

  • mimalloc — Global allocator, 2-3x alloc throughput
  • blake3 — Native SIMD (SSE2/AVX2/NEON) for cache keys
  • AHash — DoS-resistant HashMap with per-process random seed
  • UPX — Compressed release binary (<10MB)
  • LTO + PGO — fat-LTO, codegen-units=1, strip symbols
  • io_uring / DPDK — Feature-gated high-performance I/O engines

CI & Agents

7 CI agents run on every push/PR:

Agent Blocks CI? Status
complexity ❌ advisory only ✅
drift-detect ❌ advisory only ✅
spec-verify ❌ advisory only ✅
fuzz-route ⚠️ only on crash ✅
chore-bot ❌ advisory only ✅
clippy ✅ always ✅
test ✅ always (174 passing) ✅

All advisory agents post comments, never fail the build.

Development

task c              # cargo check (fast)
task t              # cargo test (174 passing)
task lint           # clippy + fmt check
task counts         # test + warning counts
task chore-check    # auto-fixable issues
task bench          # criterion benchmarks
task docs           # generate + open docs

Explore: AGENTS.md — codebase cross-reference hub.
Philosophy: PHILOSOPHY.md — project values and principles.
Product: docs/architecture/PRODUCT.md — strategy + positioning.
Architecture: docs/architecture/DESIGN.md + NETWORK_DESIGN.md.
Roadmap: LOOP_STATE.md — current state + next milestones.
Loop Engine: crates/loopeng/src/lib.rs — 5 building blocks + 4-phase pipeline + circuit breaker.
Contribute: docs/contributors/CONTRIBUTING.md.

License

MIT