TRUST OS · GENESIS SEALED · GATEWAY · CHECKING… 9 invariants · hash-chained passports · schema v5 HUMAN = JUDGE · MACHINES WRITE CODE

TRUST OS
The Courtroom
for Code…

Every other AI gateway asks you to trust the model. Trust OS asks the model to stand trial. Code changes arrive as defendants: an independent Executor — not an LLM — inspects the evidence, a Risk engine prices the danger, and a passport is sealed into a hash chain. Humans no longer write code here. Humans write laws — and sit as judge.

Genesis block_hash a23e99cdbf247093a8880712f4f2887c423a71fd972e1a3320b7be8046453588
SEAL INTACT · prev_hash = 0×64
9
Sealed invariants · constitution
3
Genesis sacrifices · −100 each
10
New capabilities in v6.0.0
—
Gateway uptime · live from /health
01

The Five Layers

one attestation line — nothing skips a station, no change reaches production unexamined

The attestation line
1
BUILDER — the AI that writes codedeclares a Proof Plan before touching anything: which invariants it promises to keep
untrusted
2
INVARIANTS.py — 9 sealed lawsINV-AUTH-01 · INV-AUTH-02 · INV-SCHEMA-01 · INV-SCHEMA-02 · INV-VALID-01 · INV-SEC-01 · INV-RATE-01 · INV-DATA-01 · INV-FUZZ-01
9/9 SEALED
3
EXECUTOR — independent inspector, not an LLMdeterministic checks · evidence hashed at every stage · unknown ≠ safe (defaults to MEDIUM)
deterministic
4
RISK + PASSPORT — priced, then sealedRiskScore = blast × sensitivity × history × diff-size × semantic spread · passports hash-chained, Merkle-anchored since v5.1
hash chain
5
HUMAN JUDGE — the only signature that countsratifies laws, signs HIGH-risk verdicts, owns the constitution (invariants.py + intent.md are the only human-writable files)
final word
Why a courtroom?

Little's Law runs your review queue

L = λ × W

Review backlog (L) grows with arrival rate (λ) and time-per-review (W). You cannot hire your way out — you shrink λ with risk pricing (only dangerous changes reach a human) and shrink W with passports (the judge reads evidence, not diffs). Trust OS is that equation, implemented.

escape rate = north star5% random audit of auto-merged LOWdiff > 150 lines ⇒ never auto-mergeblacklist exit = 50 clean changes
Semantic tripwire

One change, three unrelated concepts?

A diff touching ≥3 unrelated concepts (say: auth + billing + rendering) gets its risk multiplied ×3 and can never be graded LOW — no matter how green the tests look. Coherence is priced, not assumed. Since v5.1 the concept map is learned from your codebase itself.

02

Genesis Ceremony

25/10/2026 · before the seal, the system had to prove it could bleed — three mutants were released against the three most important laws, in a sealed chamber

GENESIS.json · Block 0 · git tag “genesis” + “v5.0.0”

All three ceremony records are marked simulated: true — the mutants were built for the ceremony and executed against the real Executor. The ceremony fails if any mutant escapes, and it is idempotent: it can be re-run, never re-written.

03

Trust Capital Ledger

reputation is earned per module, never transferred, never bought — clean change +2 · failed audit −25 · incident −100 · at ≤ −50 every price triples

Ledger — live truth, genesis state

These are the only entries in the real ledger: the three sacrificial genesis modules, each at −100 and blacklisted (risk ×3) after the ceremony. New modules enter at 0 and earn their standing change by change. No illustrative balances are shown here — if a module is not listed, it has no history yet.

Drift radar

Intent vs reality

intent.md is the second human-owned file: what the system is for, in human words. The drift engine fingerprints real traffic (shape only — never content) and replays invariants against it. Probes planted in the store must never surface in responses; foreign content in a response is drift, and drift pages the judge.

DRIFT-PROBE-01 · store markersDRIFT-CONTENT-01 · foreign contentDRIFT-SHADOW-01 · shape drift (v5.1)
Incident → law

Pain becomes legislation

An incident can only be closed two ways at once: −100 trust capital applied and a draft regression law forged from its fingerprint. Drafts wait in the Law Forge (section 04) — the forge proposes, it never edits the constitution. Only the human judge ratifies.

04

Law Forge

3 draft laws forged by the Genesis incidents — status: PROPOSED, awaiting ratification by the human judge

LawForge NL — v6.3 · describe a law in plain words

The model drafts a STRUCTURED proposal (id · trigger · rejection criteria · modules). It is stored as PROPOSED only — ratification stays a human decision. Needs the admin token from section 06 and a real provider (mock cannot draft).

05

v6.0.0 — Ten New Capabilities

the gateway grows from “chat with a queue” into a full developer platform — every capability below is a live endpoint on the active link

06

Live Operations

v6.1.0 · the invariants, watched as they run — plus the evidence-first kill-switch. Real data from the active link; nothing on this panel is simulated.

Admin token (kept only in this browser)

Without an admin token the panel shows the public /status feed only. Stage runs and kill-switch controls call the admin API on the ACTIVE link — the token never leaves this browser except as a request header to that link.

Kill-switch — state unknown
Webhook tester
Shadow radar— latest stage vs the baseline passport public status page ↗
07

Bring Your Own Account

since v5.2 · the public gateway never touches your session — execution happens on your own machine, under your own login

The split architecture
☁
PUBLIC GATEWAY — api.dotech.blogOpenAI-compatible API · keys, quotas, jobs, passports · holds NO browser sessions and NO credentials
⇅
JOB QUEUE — outbound-only pollingthe worker pulls jobs over HTTPS (claim → lease 1200s → heartbeat → complete/fail) · nothing ever connects INTO your machine
⌂
LOCAL WORKER — your machine, your loginruns the browser/web provider against a profile YOU logged into by hand · one isolated profile per user · serial queue per profile
The BYO contract

Your account stays yours

Each user signs in with their own account, in their own browser, on their own machine. The worker only automates the UI of that already-logged-in session.

no passwords collected — ever no token / cookie extraction no Cloudflare / PoW bypass no account pooling or resale
Run a worker
# on the machine where you are logged in python scripts/worker.py \ --gateway https://api.dotech.blog \ --provider muse

Then submit a remote job — POST /v1/remote-jobs — and poll it like any other job. Honest caveat, printed in the repo since day one: web providers answer in minutes, not milliseconds. Use jobs, not held connections.

09

Get Started · Bắt Đầu Code Ở Đâu?

câu trả lời ngắn: cài gì cũng được — gateway nói tiếng OpenAI · 4 bước từ số 0 tới lời gọi đầu tiên, rồi cắm thẳng vào IDE / Cursor / VS Code

1

Chọn một link kết nối (mục 07)

Production dùng https://api.dotech.blog/v1. Chạy thử trên máy mình thì gateway local ở http://127.0.0.1:8787/v1 (máy này) hoặc :8790 trên VPS. Link ACTIVE hiện tại:

—
2

Lấy API key

Tạo demo key ở mục 07 để thử ngay, hoặc key thật từ trang /admin của gateway. Key chỉ hiện một lần — lưu vào biến môi trường DoAPI_KEY, đừng hard-code vào repo.

3

Gọi API như gọi OpenAI — chỉ đổi đúng 2 dòng

4

Thử ngay trong playground

Gửi một tin nhắn tới link đang ACTIVE bằng demo key đầu tiên trong danh sách. Nếu gateway khôngreachable từ trình duyệt này, playground hiện sample response và ghi rõ là sample.

// request & response sẽ hiện ở đây…
Cắm vào IDE — MCP config (Cursor / VS Code / Claude Code)

Gateway có sẵn MCP server tại POST /mcp (tools: chat · summarize · search_codebase · usage) — hoặc mở Web IDE tích hợp ngay trong gateway tại /ide.

Repo map — code nằm ở đâu
doapi/ ├─ doapi/ gateway package (stdlib, 0 deps) │ ├─ server.py routes · OpenAI-compatible API │ ├─ invariants.py ⚖ constitution — human-owned │ ├─ executor.py independent inspector + evidence │ ├─ risk.py · passport.py · merkle.py │ ├─ genesis.py · lawforge.py · drift.py │ └─ remote.py BYO worker job queue (v5.2) ├─ intent.md ⚖ purpose — human-owned ├─ TRUST-SPEC.md the full design contract ├─ GENESIS.json block 0 · sealed ├─ ide/ web IDE + VS Code extension └─ scripts/worker.py local worker for BYO accounts
10

Release Line

mỗi bản đều deploy lên VPS ngay khi phát hành — luật bất di bất dịch của dự án

v5.0.0
Trust OS Genesis
Genesis Ceremony + Law Forge · repo locked · 81/81 tests · genesis block sealed & tagged
v5.1.0
Second Season
Merkle-anchored passports · shadow mode full · red-team bounty market · learned concepts · ghost-text tier
v5.2.0
Remote Worker
BYO-account execution: public gateway queues jobs, your own logged-in machine runs them · public E2E passed
v6.3.0
Smart + Handy
LawForge NL drafting · RedTeam Simulator v2 · session share links · webhook tester · prompt gallery + IDE tab · copy-as snippets
v6.2.0
Deep Verification
HMAC approvals for HIGH passports · Merkle plan anchoring + proofs · scope-lock · signed migrations · append-only ledgers
v6.1.0
Operational Safety
evidence-first kill-switch · live invariants dashboard + shadow radar · deploy preflight gate · public /status + badge
v6.0.0
Developer Platform
SSE events · tool calling · structured outputs · batch · embeddings · rerank · guardrails · prompts · sessions · scoped keys + signed webhooks