You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #1756 (self-hosting MVP, slice 1), on the integration branch hosting-mvp.
The runtime half of slice 1. Every rule lives in gHashTag/t27#8707: the specs specs/hosting/{host,placement,proof,credit,toolchain}.t27, vendored here as wasm cards plus t27c gen-ts constants. The work is behind TRIOS_HOSTING=on, which is off by default.
Scope
Queen endpoints:
POST /hosting/hosts registers a host with an Ed25519 key, a tier claim and its slots. The tier comes from the owner's allowlist, TRIOS_HOSTING_ALLOWLIST.
POST /hosting/hosts/:id/beat
POST /hosting/lease
POST /hosting/receipts takes signed receipts.
POST /hosting/jobs accepts jobs from owner-tier hosts only.
GET /hosting/ledger is a public read.
GET /hosting/verdicts and GET /hosting/jobs/:id are also reads.
Storage is Postgres, with an in-memory twin for tests. The route-guard audit pins the new mount with its reason.
Host agenttrios-host, one self-contained binary built with bun build --compile. join does four things:
it keeps an Ed25519 key in ~/.trios-host/key with mode 0600;
it fetches and verifies the pinned toolchain, or uses one the operator names;
it registers and beats;
it leases a shard, runs t27c test-report on the pinned inputs with an environment built from nothing, and posts the normalized output hash in a signed receipt.
Demo as tests, run locally on a VirtualClock:
two honest hosts and one that tampers;
a lapsed lease that is reassigned;
a public host refused a job that declares a secret.
Benchmark: the cost per job of the verification path against one run, and the message count per job.
Done on queen, behind TRIOS_HOSTING (off by default): 8ad387a (PR #1760 into hosting-mvp), shipped to queen by PR #1776 (dfb6d97). Checked at queen 9cfb52b:
/hosting routes (hosts, beat, lease, receipts, jobs, ledger, verdicts, jobs/:id) are mounted in server.ts.
tools/trios-host/trios-host.ts builds with bun build --compile; the key lives in mode 0600 under a 0700 directory.
The demo is tests/api/hosting.test.ts (two honest hosts and one that tampers, a lapsed lease, a secret job refused on a public host); the benchmark is tests/api/hosting-bench.test.ts.
Local run, bun 1.3.6: hosting.test.ts 19 pass, 1 skip (the real t27c block; no t27c on this machine), 0 fail; hosting-bench.test.ts 1 pass, 1 skip, 0 fail.
Closed by hand: PRs into hosting-mvp and queen do not auto-close issues.
Activity
Merge pull request #1760 from gHashTag/hosting-slice1
feat(hosting): self-hosting slice 1 - /hosting endpoints, the trios-h…
dmitrii-f-t27 commentedon Oct 11, 2026
Done on
queen, behindTRIOS_HOSTING(off by default): 8ad387a (PR #1760 intohosting-mvp), shipped toqueenby PR #1776 (dfb6d97). Checked at queen 9cfb52b:/hostingroutes (hosts, beat, lease, receipts, jobs, ledger, verdicts, jobs/:id) are mounted in server.ts.tools/trios-host/trios-host.tsbuilds withbun build --compile; the key lives in mode 0600 under a 0700 directory.tests/api/hosting.test.ts(two honest hosts and one that tampers, a lapsed lease, a secret job refused on a public host); the benchmark istests/api/hosting-bench.test.ts.Closed by hand: PRs into
hosting-mvpandqueendo not auto-close issues.Dmitrii Fedorov (@dmitrii-f-t27)