-
Notifications
You must be signed in to change notification settings - Fork 1
Contracts
Every interface that crosses a process, machine, or trust boundary. If you change anything here, change it in the contract first, then in code, then in the tests.
Source of truth in-repo: docs/CONTRACTS.md.

| Status | Meaning |
|---|---|
SPEC |
Designed, not yet verified against the real thing |
VERIFIED |
Confirmed against a running service, with a date |
| # | Boundary | Transport | Wiki page |
|---|---|---|---|
| 1 | Bridge ↔ Kiosk | ws://127.0.0.1:8777 |
Bridge ↔ Kiosk |
| 2 | Bridge ↔ Audio | ws://127.0.0.1:8778 |
Bridge ↔ Audio |
| 3 | Bridge → CodeProject.AI | HTTP :32168
|
CodeProject.AI |
| 4 | Bridge → AO via ao_reach
|
HTTP/WS | AO Reach |
| 5 | MCP tools | Hosted HTTP + tunnel | MCP Tools |
| 6 | Audio routing | Decision | ADR 0001 |
| 7 | Config schema | YAML | Configuration |
| 8 | Attention state machine | Pure logic | Attention State Machine |
| 9 | Kiosk avatar | TalkingHead / HTMLAudio | Kiosk & Avatar |
| 10 | Admin console + OAuth | HTTP :8781
|
Admin Console |
Every local WebSocket message (kiosk and audio), both directions:
{
"v": 1,
"id": "msg_01J...",
"type": "<type>",
"ts": 1754160000000,
"turn_id": "t_01J...",
"data": {}
}-
turn_idis null outside a turn. -
idis a ULID. - Unknown
typeis logged and ignored — never fatal. This is how kiosk and bridge ship independently.

During development the bridge may run on the Mac and Pi processes connect over the LAN. This binds to the LAN interface instead of loopback, which production must never do.
Three gates, all required:
COMSTAR_ENV=dev- Config file named
comstar.dev.yaml(notcomstar.yaml) - Matching non-empty
dev.lan_tokenon every connection
A T0 test asserts comstar.example.yaml ships with dev.bind_lan: false.
Always-on HTTP in the bridge. Path split: /admin/* (ops), /oauth/google/*
(Desktop OAuth, no admin token), /health → /admin/health.
LAN bind for admin is independent of the WS triple-gate
(COMSTAR_ADMIN_BIND_LAN + COMSTAR_ADMIN_TOKEN, or admin: in YAML). When
LAN-bound with a token, /admin/* needs X-Comstar-Lan-Token or ?token=
except GET /admin/health and static assets (.js/.css/.svg/…).
Ops APIs include /admin/api/road, /admin/api/network, /admin/api/ao_mtls.
AO health probe uses mTLS client material when enabled. Offline SoftAP feeds
admin.qr with hotspot / ssid (ADR 0014).
Full route table and Warpgate notes: Admin Console.
AO Reach session contract (HTTPS + mTLS): Contracts — AO Reach.
COMSTAR AI — Not a mystical AI. A tool you engineered — transparent, hackable, fast.
Home · Architecture · Admin Console · Runbook · Contracts
Apache-2.0 · Pre-alpha · Raspberry Pi 4 terminal + local AI server
COMSTAR AI
Start here
Product
Build & configure
Interfaces
- Contracts Overview
- Bridge ↔ Kiosk
- Bridge ↔ Audio
- CodeProject.AI
- AO Reach
- MCP Tools
- Attention State Machine
Features
- Speech (STT/TTS)
- Vision & Face Enrollment
- Directory Identity
- Wake Word
- MCP Topology
- Terminal Control
- Google Workspace
Decisions (ADRs)
- ADR Index
- 0001 Audio Routing
- 0002 Render Path
- 0003 Speech on Ada
- 0004 Terminal Control
- 0005 LDAP Identity
- 0006 House Presence
- 0007 Full-Duplex AEC
- 0008 TTS Engine
- 0009 Proactivity
- 0010 Text Channel
- 0011 Road VPN
- 0012 Admin Network
- 0013 AO mTLS
- 0014 Fallback Hotspot
Operate
Plan
Meta