Skip to content

Commit 14c03e0

Browse files
committed
Bring the public release up to date with a week of work
Ports the epistemic layer, the Tool Provider Layer, and the MCP client from the private instance, plus this week's two loop repairs. New capability · epistemic_dossier.py — GET /api/house/prove returns a receipt for a belief: who asserted it, on what evidence, who dissented and whether that was ever resolved, what would falsify it, and the asserters' calibrated record. The load-bearing field is trust_basis: UNEARNED when a belief carries a confidence figure but nobody who asserted it has ever been graded against reality. GET /api/house/self-audit says the same about the whole system, and is written to be unflattering — empty ratios return null, never a complimentary zero. · judgment_queue.py — GET /api/house/judgments separates AWAITING_HORIZON (reality has not answered) from AWAITING_HUMAN (overdue, no automatic judge, and blocking N dissents). One unanswerable claim had been silently blocking every dissent recorded in its session. Also flags MALFORMED records. · tool_providers/ + mcp_client.py — external tool sources arrive as providers rather than as edits to exec_tool. MCP is provider #1: tools are namespaced mcp__<server>__<tool> so an external server can never shadow a native tool, output is quarantined as untrusted, and the gate ESCALATES anything the server has not itself declared read-only. An absent hint is treated as dangerous, never as safe — safety is never inferred from a tool's name. · extractor.py — refuses to stake a claim nobody can read or judge. Two rows in production held a Python dict repr as the statement and a fragment of raw JSON as the invalidation, from a character-window slice taken out of serialised data. Merging, not overwriting The public tree is not a copy of the private one and the drift runs both ways. It carries fixes the private instance does not: the YELLOW health verdict, OLLAMA_BASE_URL, platform-aware discovery, per-hook kernel reporting, and the privacy-scan repairs. It is also relicensed — every module header says Apache-2.0 where the private one still says Open Cognitive License v1.0. So this is a merge. Files where the private copy is strictly newer were ported with their headers rewritten; files carrying public-only fixes were left alone; and main.py, which holds work from both sides, had only its private-only blocks lifted in by anchor. Safety mcp_servers.json is now git-ignored in the public tree as well. It holds API tokens — the shipped example has a GITHUB_PERSONAL_ACCESS_TOKEN field — and without this a user who created one would publish their own credentials. Only the .example. template ships. The ADR-0014 state tripwire has both registered deliberately, with the reasoning recorded beside them. Counts corrected against measurement, not memory: 272 routes, 91 tools (75 native + 16 arriving through the provider layer), 672 tests. Social preview regenerated to match. 672 tests pass. Privacy scan clean.
1 parent e1381b3 commit 14c03e0

25 files changed

Lines changed: 2904 additions & 13 deletions

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,8 @@ backend/skills_usage.jsonl
151151

152152
# Operator's personal profile (copy backend/prompts/USER.example.md)
153153
backend/prompts/USER.md
154+
155+
# MCP server config — holds API tokens (GITHUB_PERSONAL_ACCESS_TOKEN etc).
156+
# Copy mcp_servers.example.json to create it; the example is what ships.
157+
mcp_servers.json
158+
backend/mcp_servers.json

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@ Full provider matrix — Ollama, llama.cpp, and ten cloud APIs: **[docs/MODELS.m
139139
overconfidence-penalised).
140140
- **The House Mind** — a shared cognitive state that can answer, at any moment: *what do we know ·
141141
what don't we know · what do we believe · why · what changed our mind.*
142+
- **"Prove it"** — a receipt for any belief: who asserted it, on what evidence, who dissented and
143+
whether that was ever resolved, what would falsify it, and the calibrated track record of the
144+
asserters. The field that matters is `trust_basis`: **UNEARNED** when a belief carries a
145+
confidence figure but nobody who asserted it has ever been graded against reality. Most beliefs
146+
start there, and saying so is the point.
147+
- **Tool Provider Layer** — external tool sources reach the House as *providers*, the way runtimes
148+
reach it through drivers. **MCP servers** are provider #1: tools arrive namespaced
149+
`mcp__<server>__<tool>` so an external server can never shadow a native tool and inherit its
150+
trust, output is quarantined as untrusted, and the gate escalates anything the server has not
151+
itself declared read-only.
152+
153+
```bash
154+
curl "http://127.0.0.1:8766/api/house/prove?claim=your+claim+here"
155+
curl http://127.0.0.1:8766/api/house/self-audit # the loop's vital signs, stated against itself
156+
curl http://127.0.0.1:8766/api/house/judgments # what is open, and who it is waiting on
157+
```
142158

143159
See [`docs/`](docs/) for the architecture of each layer.
144160

@@ -235,7 +251,7 @@ badge is red, the claim that this works is not currently true.
235251

236252
```bash
237253
cd backend
238-
python -m pytest -q # 601 tests
254+
python -m pytest -q # 672 tests
239255
```
240256

241257
---

backend/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
vision_probe_cache.json
22
kernel_audit.jsonl
33
.operator_token
4+
5+
# MCP server config — holds API tokens (GITHUB_PERSONAL_ACCESS_TOKEN etc).
6+
# Copy mcp_servers.example.json to create it; the example is what ships.
7+
mcp_servers.json
8+
backend/mcp_servers.json

backend/builtin_tools.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@
112112
"parameters":{"type":"object","properties":{}}}},
113113
{"type":"function","function":{"name":"recall_archive","description":"DISCOVER FIRST: prior deliberations and similar past missions for a directive — avoid redoing solved work.",
114114
"parameters":{"type":"object","properties":{"query":{"type":"string","description":"the directive to find similar prior work for"}}}}},
115+
# ── Epistemic self-audit — check the warrant BEFORE relying on a belief ──
116+
{"type":"function","function":{"name":"prove_it","description":"CHECK WARRANT BEFORE ASSERTING: the receipt for a belief — which agent asserted it, on what evidence, who dissented and whether that was ever resolved, what would prove it wrong, whether reality has graded it, and the calibrated track record of the asserters. Returns trust_basis EARNED or UNEARNED. Use before stating anything as established, and when the operator asks 'why do you believe that' or 'ตรวจสอบว่าเชื่อได้ไหม'.",
117+
"parameters":{"type":"object","properties":{"claim":{"type":"string","description":"the claim or topic to pull the record for"},"limit":{"type":"integer","description":"max items per section (default 6)"}},"required":["claim"]}}},
118+
{"type":"function","function":{"name":"self_audit","description":"The House's epistemic vital signs stated against itself: how many dissents were ever resolved, how many staked claims were graded, how many beliefs changed because of an outcome rather than more talk, how many agents have a real track record. Reports uncomfortable findings deliberately. Use when asked how reliable the House is, or before claiming the learning loop works.",
119+
"parameters":{"type":"object","properties":{}}}},
120+
{"type":"function","function":{"name":"pending_judgments","description":"What the learning loop is still waiting on, and WHO it is waiting on — separates claims whose horizon has not elapsed (reality has not answered) from claims that are overdue with no automatic judge (a human must rule, and until they do it blocks that session's dissents). Also flags malformed records. Use when asked what is outstanding, why a dissent is unresolved, or ทำไม loop ยังไม่ปิด.",
121+
"parameters":{"type":"object","properties":{"limit":{"type":"integer","description":"max items (default 20)"}}}}},
115122
# ── Social / Integrations ──
116123
{"type":"function","function":{"name":"telegram_send","description":"Send a message via Telegram bot (requires Telegram integration)",
117124
"parameters":{"type":"object","properties":{"message":{"type":"string"},"chat_id":{"type":"string","default":""}},"required":["message"]}}},

0 commit comments

Comments
 (0)