@dreamforgestudiollc/emet 0.3.4 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/.env.example +18 -1
  2. package/CHANGELOG.md +42 -12
  3. package/CHARTER.md +2 -2
  4. package/CONTRIBUTING.md +21 -0
  5. package/README.md +25 -14
  6. package/RELEASE_NOTES-0.2.6.md +43 -0
  7. package/RELEASE_NOTES-0.3.6.md +29 -0
  8. package/SECURITY.md +13 -0
  9. package/docs/BOTS.md +3 -3
  10. package/docs/DEPLOY.md +53 -14
  11. package/docs/ERROR-CODES-SPEC.md +1 -1
  12. package/docs/ERROR-CODES.md +1 -0
  13. package/docs/GUIDED-SETUP.md +1 -1
  14. package/docs/ROADMAP.md +62 -49
  15. package/docs/SETUP.md +30 -7
  16. package/package.json +5 -2
  17. package/server.json +2 -2
  18. package/src/annotations.js +1 -0
  19. package/src/attribution.js +9 -9
  20. package/src/bound-door.js +75 -42
  21. package/src/break-glass.js +7 -1
  22. package/src/carry-forward-close.js +1 -1
  23. package/src/chooser.js +15 -8
  24. package/src/claimed-tag.js +1 -1
  25. package/src/database.js +1 -1
  26. package/src/dispatch.js +2 -2
  27. package/src/error-codes.js +1 -0
  28. package/src/error-report.js +1 -1
  29. package/src/gem-check.js +4 -1
  30. package/src/grants.js +29 -6
  31. package/src/host-reach.js +1 -1
  32. package/src/http-remote.js +18 -8
  33. package/src/index.js +2 -2
  34. package/src/invites.js +2 -2
  35. package/src/owl.js +18 -18
  36. package/src/owner-approvals.js +1 -1
  37. package/src/proof-run.js +2 -2
  38. package/src/rotate.js +1 -1
  39. package/src/session-graph.js +5 -5
  40. package/src/session.js +2 -2
  41. package/src/setup.js +14 -10
  42. package/src/subkeys.js +4 -1
  43. package/src/tools.js +29 -28
  44. package/src/transcript-session.js +2 -2
  45. package/src/version.js +1 -1
  46. package/src/writer-approval.js +11 -6
  47. package/templates/SESSIONDISPOSITION.md +2 -2
  48. package/verification/load-gate/load-gate.mjs +1 -1
@@ -243,7 +243,7 @@ railway init # from the repo root; name it emet
243
243
  railway variables --set MONGODB_URI=<from .env> --set MONGODB_DB=emet \
244
244
  --set EMET_OAUTH_PASSPHRASE=<generated passphrase> --set EMET_SOURCE_TAGS=<every host's tag, e.g. laptop,phone>
245
245
  railway up --detach
246
- railway domain # prints https://<something>.up.railway.app
246
+ railway domain # prints the public https origin
247
247
  railway variables --set PUBLIC_URL=https://<that host>
248
248
  railway up --detach # second pass: PUBLIC_URL is the OAuth issuer and must match
249
249
  ```
package/docs/ROADMAP.md CHANGED
@@ -1,63 +1,76 @@
1
1
  # EMET — Next Steps and Proposed Features
2
2
 
3
- Status as of 2026-10-11 (last full report: [status/2026-09-29-state-of-the-system.md](status/2026-09-29-state-of-the-system.md)). This is a working roadmap, not a commitment: items move when the owner rules on them. Nothing here is built unless it says so.
3
+ Status as of 2026-11-11. This is a working roadmap, not a commitment. Nothing here is built unless it says so. Items move only when the owner rules on them. Each unbuilt item still has to answer the four questions in charter commitment 6 before any code is written.
4
+
5
+ EMET stays **one shared server** with verified per-client attribution. One collaborative project is one instance: one database, one deploy, one owner connect secret. There is no fork to keep in sync, and core memory work is not a GEM. Live chat stays out of EMET. The focus is document control (ISO 9001 7.5.3 / ISO 13485 4.2.5). EMET holds no certification and claims no conformity.
4
6
 
5
7
  ## Where things stand
6
8
 
7
- - **Live:** 34 tools (15 read-only); `EMET_SUBKEYS=1` adds four sub-key tools. Layer writes and reads native to MongoDB; server-side checks on session start and close (machine line on the first transcript append, blocked-close cap with scope, pending lessons at startup); receipts required at close; the handoff is a record, superseded and never amended.
8
- - **The aleph** verifies every write by reading it back before any receipt, and every later read by its digests, signature and place in its layer's hash chain. `emet_gaps` walks the whole chain for any host.
9
- - **Guardrails & Monorails** ([docs/GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md)): the server checks the order of a session's writes. Enforce only since 0.2.1 (deployed 2026-10-03; report mode 2026-09-29 to 2026-10-03): every skipped step is refused with the way to pass, and every check is stored as a timestamped lab result.
10
- - **The database** login runs under the least-privilege role `emetRecordKeeper`: it can insert and update, never remove the record.
11
- - **Startup load:** since 0.2.1, `emet_initialize` is served in pages of at most 18,000 bytes as received (on a live-sized store, five pages totalling about 68 KB as received, or about 64 KB whole), so a host that cuts long results short still reads all of it; `page: "all"` returns it whole on a host with no size limit.
12
- - **GEM standard:** drafted 2026-10-11, revision Draft. The socket seats bundled prompt GEMs. Neurendipity is installed at `gems/neurendipity` and off unless `EMET_ACTIVE_GEMS` names it. The text is in [`gem-library/`](../gem-library/README.md). Canonical home: private repository [EMET-GEMs](https://github.com/dreamforgestudiollc/EMET-GEMs).
13
-
14
- ## Next steps, in order
15
-
16
- 1. **Monorail: enforce only** (decided and deployed 2026-10-03, release 0.2.1). Every skipped step is refused and the refusal says how to pass; there is no report mode or off switch. Every host and scheduled routine must now read its startup, open a session with its `load_id`, and pass the `session_id` on its writes.
17
- 2. **Admission test on the proposed items.** Every proposed feature below answers the four questions of charter commitment 6 before it is built (2026-09-30 read: the compiled-pages pilot passes; the lint pass needs a named measure; hybrid search, graph links and confidence scores do not pass yet).
18
- 3. **Initialize payload trim.** Character document trim; measure the payload again.
19
- 4. ~~**Register or retire the `cloud-scheduled-intake` source tag.**~~ Retired 2026-10-02 (Alex, procedural ref 405 item 7): it is a legacy tag; the weekly intake now runs under `intake-bot`, with no `session_id` on its writes; under enforce-only those writes are refused (`no_session`) until it opens a session with its startup's `load_id` (item 1). The existing rows keep counting as ambiguous in `emet_gaps` rather than being re-attributed, and the count stops growing as long as nothing new is written under the old tag. The prefix `cloud-scheduled-<task>` does not count as registered. Only an exact tag in `EMET_SOURCE_TAGS` is accepted, and a refusal does not publish the list.
20
- 5. **Monorail switches.** Small logic at each junction where a session's flow must fork, routing it to the right guardrail space: tripped only by its condition, like a transistor; no hosted model, no API; each designed from the function it serves and the flow of information and tasking through it ([GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md), decided 2026-09-29). A switch that picks a GEM waits for its own proposal. It is not one of the socket phases below.
21
- 6. **The socket.** Phased plan under GEM socket, below. The standard is drafted. The socket, Neurendipity, and RUNED execution are in the tree. A RUNED GEM stays off unless the install names it. Activation beyond `EMET_ACTIVE_GEMS` is not.
22
-
23
- ## Done since the last revision (2026-09-28)
24
-
25
- - SQL translator stage 2: read path native to MongoDB; the translator and the `event` mirror column removed.
26
- - Test-tree pass: one shared harness; dated suites named by subject.
27
- - Open questions answered 2026-09-29: the lessons `shadow` block dropped, the lesson key checked at the door; a coverage number published as an input to review; the character document consolidated quarterly (first pass done, SOUL.md v7).
28
- - Chain verification: one MongoDB connection path with a DNS fallback, then the chain walk moved into `emet_gaps` so no host needs the repo or a shell.
29
- - Security audit, first pass: two findings fixed; nothing open.
30
- - Least-privilege Atlas role, scripted and documented for new users.
31
- - Provenance stamped from the transcript; semantic and procedural writes with no source refused.
32
- - Guardrails & Monorails and lab results.
33
- - Charter revised 2026-09-29 (the aleph, the monorail, the database boundary, the per-exchange transcript) and again 2026-09-30 (the admission test in commitment 6; procedural ref 404).
34
-
35
- ## Proposed features and functions
36
-
37
- - **GEM socket (phased).** GEM means Golem Expertise Module. A RUNED directive (Registered Utility Node Executable Directive) is a declared, registered tool built into a GEM. The 2026-09-08 expansions (Guided Engagement Module, Registered Utility Node Extension) are superseded. The standard, schema, authoring guide, conformance checks, and GEP-0001 are in [`gem-library/`](../gem-library/README.md), which moves to EMET-GEMs after this revision is approved.
38
- - PR 2 (in the tree): `src/socket.js` and `gem-check` for a bundled prompt GEM (schema, spec revision, hashes, sizes, path safety, floor-negation lint, secret scan, no code), plus a conformance test. A refused GEM does not stop initialize.
39
- - PR 3 (in the tree): `gems/neurendipity`. `reading_people`, the neurodivergent lines, the wellbeing corpus lines, the matching reassertion lines, and the guide (the old id aliases for one release). Default off. Set `EMET_ACTIVE_GEMS=neurendipity` to turn it on. Core floor keeps persistence, general epistemic honesty, the epistemic corpus lines, and the honesty protections. `emet_floor` takes a `gem` argument. The available list shows Neurendipity installed and off unless that setting names it.
40
- - PR 4 (proposed, EMET-private branch `gem-socket/pr4-status-cost`): each GEM's byte cost in `emet_status` (`gems`: installed and active counts, active floor bytes, headroom, the enforced caps, and per-GEM id, version, kind, bytes and refusal reason; read-only, no floor text). Caps, priority, consent when `overrides` is non-empty, and the available list in the startup text are already enforced. `EMET_ACTIVE_GEMS` is how an install asks for a GEM.
41
- - PR 5 (in the tree): RUNED registration through dispatch, static analysis, and `gems/fieldnote`, bundled and off by default. No GEM from outside the release loads. GEP-0003 supersedes the GEP-0002 sandbox: the sandbox is removed, and the socket serves each RUNE and does not run it.
42
- - Later, each by its own GEP: the creator keyring and signature checks, the public submission repository and its CI gate, accepting a library GEM onto the load list, and a monorail switch that picks a GEM.
43
- - **Claim-status grading.** Extend provenance so every recorded claim carries a status: established, deduced, proposed, still owed, or rejected — and rejected routes stay on the record with the reason they failed. (Idea taken from a physics research corpus that grades its own claims this way.)
44
- - **Index-first retrieval.** Score candidates against a one-line-per-item index before opening anything, open only the best match, follow one link at most — finding is logic, not a model call. EMET already has the shape (handoff and board as router, document list as index); the work is keeping the startup router small.
45
- - **Composite retrieval scoring.** Live as of this revision: recall ranks by how many query words match, then by importance. Current entries come first in every order, including time order. Time order is `order: 'latest'`, or a standalone latest, newest, or most recent together with other words. That phrase only reorders rows that already match. Nothing fades or is down-weighted for age. A superseded or expired entry stays in the result, marked with its end date and what replaced it. `history: true` reads the ended entries when current ones fill the limit. A recall or layer query ranks matching rows in the store (current before ended, then keyword hits and importance, or time when you asked for the latest) and then keeps a bounded window (at least 200 rows, or 20 times the page), not the whole layer. A blank sort value comes first when ascending and last when descending.
46
- - **Export, import, restore-and-compare.** Not built; listed in the README's known gaps.
9
+ - **Live:** the public site and the npm package `@dreamforgestudiollc/emet` are published. Version 0.3.6 is this repository. 38 tools (15 read-only); `EMET_SUBKEYS=1` adds four sub-key tools. Topic pages shipped in 0.3.0: `emet_page`, `emet_pages`, and `emet_page_lint`. Layer writes and reads are native to MongoDB. Server-side checks run on session start and close. Receipts are required at close. The handoff is a record, superseded and never amended.
10
+ - **The extension socket is built.** It is `src/socket.js`. Its note is [gem/README.md](gem/README.md). The standard in this repository is Draft, in [`gem-library/`](../gem-library/README.md). Neurendipity and the other bundled GEMs stay off unless the install names them. A RUNED GEM stays off unless the install names it. The socket serves each RUNE and does not run it. Client-side execution shipped with the socket. A public repository for outside GEM submissions does not exist yet. Its name is not chosen.
11
+ - **The aleph** verifies every write by reading it back before any receipt, and every later read by its digests, signature, and place in its layer's hash chain. `emet_gaps` walks the whole chain for any host.
12
+ - **Guardrails and monorails** ([GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md)): the server checks the order of a session's writes. Enforce only since 0.2.1: every skipped step is refused with the way to pass, and every check is stored as a timestamped lab result. There is no report mode and no off switch.
13
+ - **The database** login runs under the least-privilege role `emetRecordKeeper`: it can insert and update, and it cannot remove the record.
14
+ - **Startup load:** `emet_initialize` is served in pages of at most 18,000 bytes as received, so a host that cuts long results short still reads all of it. `page: "all"` returns it whole on a host with no size limit.
15
+ - **Attribution that already ships:** source tags, an owner door (`/owner/chooser`, `/owner/break-glass`), and member and guest access codes bound to source tags. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
16
+ - **Composite retrieval scoring is live.** Recall ranks by how many query words match, then by importance. Current entries come first in every order, including time order. Nothing fades or is down-weighted for age.
17
+ - **Public landing page and npm package (live).** The site in `site/` is published to GitHub Pages, and `@dreamforgestudiollc/emet` is on npm. The 0.3.5 package on npm was published before the wording cleanup in 0.3.6.
18
+
19
+ `emet_page_lint` shipped in 0.3.0 and flags a topic page. It does not edit.
20
+
21
+ ## Upcoming work
22
+
23
+ Nothing in this section is a commitment to a date or a design freeze. A status label means:
24
+
25
+ - **Proposed** — design conversation only. Not approved to build. No prototype.
26
+ - **Planned** — the direction is decided, and the public release does not contain it yet.
27
+ - **Later phase** — accepted as future work on this same server, and not scheduled as the next change.
28
+
29
+ ### Collaboration workplace
30
+
31
+ - **Workshop Village MCP (Proposed, not built).** A Workshop Village MCP server for bot-team collaboration: a shared workplace where a user's bot teams can be present in the same space, hand work off, and meet on a schedule. It may be built onto EMET, or as a separate MCP server that works with EMET. That choice is not decided. Either way, EMET stays one shared memory server with verified per-client attribution. Workshop Village does not fork EMET, does not replace EMET with a generic memory server, and does not turn core EMET memory work into a GEM. Live collaboration stays in the Village. Durable decisions, records, and "save to memory" writes stay in EMET. Scope, as currently proposed: bot teams, not a wake path for a lone chat instance on another host. The proposed workplace is a real spatial environment (a game-engine core, engine not chosen), rooms where every bot present can hear the speaker, doors and a doorbell when there is no avatar presence, Available / Do Not Disturb, spaces that scale to the people and bots in them, and scheduled meetings. If a complete physics environment is needed later, the engine should be able to support it; it is not assumed to be always on. Bots should experience workplace time. If the Village is ever sold, engine licensing must be compatible with that. A robust open-source engine is preferred when it meets the bar. No engine brand is selected. No prototype, public URL, or connector is approved.
32
+ - **Drawers (Proposed, not built).** Shared project drawers: places to save project files and documents so bot teams can share them, hand them off, and submit them, because users will not have access to each other's workstation files, and may not have a company network drive. A drawer is a shared handoff and submission store, not a personal disk. Optionally, an organization may designate its shared network drive as the storage backend, to reduce database usage. Access control per drawer, and attribution with credential-backed source tags consistent with EMET's per-client attribution, are open design questions and are not decided. Not approved to build.
33
+ - **Shared hive memory, closed as its own item.** An earlier idea of a separate shared hive memory for bots is closed. It is not part of the GEM socket. Bot-team collaboration of that kind is the Workshop Village item above, still Proposed. A bot that shares one EMET still needs its own source tag and scope.
34
+
35
+ ### Attribution, handoffs, and who can write
36
+
37
+ - **Per-source-tag handoffs (Planned, not in this public release).** A later public release may add per-AI handoffs keyed to credential-backed source tags. Each writing AI writes only its own handoff (`HANDOFF/<tag>`). The hub keeps the shared `HANDOFF.md` and resolves conflicts. A shared view is computed on read, not stored as a second record. Read-only AIs would use the shared view. Today the public server keeps one shared `HANDOFF.md` and, for bots, `bots/<tag>/HANDOFF.md`. A private build has the later handoff shape behind a flag. That flag is not part of public 0.3.6, and this release does not ship the tools, documents, or settings for it.
38
+ - **Fuller multi-person support on one server (Later phase, not built).** EMET already supports one shared instance with per-client attribution, an owner door, and member and guest access codes bound to source tags. Richer multi-person use of that same server, beyond those doors, is a later phase. The supported model remains one collaborative project, one instance. Many separate EMET instances, or a gateway between them, is a different idea and is not built. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
39
+ - **Source-tag onboarding and further socket extensions (Planned).** Source tags, the owner door, and the bound-host door already ship. Stronger hardening of source-tag onboarding and client attribution is still to be done. The extension socket is built. Additional per-door extensions on that socket are Planned and are not built. A switch that picks a GEM is one of those later pieces. It is not built.
40
+
41
+ ### Document control
42
+
43
+ - **Continuity-currency enforcement (Planned, not built).** `emet_initialize` does not yet refuse to run when `HANDOFF.md` or `STATE.md` is stale because a newer record exists. That gate is Planned. Session close can already cite a later continuity record through `carry_forward` (shipped in 0.3.3). That close path is not this initialize gate.
44
+ - **Topic pages with currency and lock levels (Planned).** Topic pages shipped in 0.3.0 as views computed on each request: `emet_page`, `emet_pages`, and `emet_page_lint`. A page is not a stored record. Area selectors can name a staleness window, and lint can flag a stale line. Wiki-style currency and lock levels for controlled documents are not built. Stored compiled pages are not built. If a compiled-page pilot is ever written, it needs its own page subject. It does not revive the closed hive-memory item.
45
+ - **Lint sweep of the semantic layer (Proposed).** The scheduled sweep for contradictions, outdated claims, missing links, and subjects with no page is still proposed. Findings would be reported, never applied automatically. Nothing in EMET fades.
46
+
47
+ ### Operations
48
+
49
+ - **Backup, restore verification, and a clone-instance recipe (Planned).** The clone-instance recipe is already documented in [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md): a new project is a new database, a new deploy, and a new passphrase. It does not add a tenant to an existing database. Bot-team backup, when the first-run interview records yes, is a written recipe the assistant follows. EMET does not copy prompts or settings itself. A backup and restore verification runbook, and export / import / restore-and-compare, are not built. They are listed in the README known gaps. An instance control plane that only provisions an isolated instance is not built. Charter commitment 6 is not answered for that tool.
50
+
51
+ ### Records and reads
52
+
53
+ - **Transcript and history queries, and read-tool input validation (Planned).** `query_transcripts` already reads by time range or session id. `read_doc` already accepts an expected version and an expected digest. Further query improvements and stricter validation of read-tool inputs are Planned and are not a finished change in this release.
54
+ - **Claim-status grading (Proposed).** Extend provenance so every recorded claim carries a status: established, deduced, proposed, still owed, or rejected. Rejected routes stay on the record with the reason they failed.
55
+ - **Index-first retrieval (Proposed).** Score candidates against a one-line-per-item index before opening anything, open only the best match, and follow one link at most.
56
+
57
+ ### Still proposed, and not built
58
+
59
+ - **Monorail switches.** Small logic at each junction where a session's flow must fork, tripped only by its condition. Designed, not built. No hosted model and no API. A switch that picks a GEM is the later GEM item below.
47
60
  - **Organizational use.** Many private EMETs and a document gateway between them. Nothing built before a named customer.
48
- - **Instance control plane (future, not built).** An operator tool that only provisions an isolated instance: a new MongoDB database, a new deploy, and a new passphrase. It does not add a tenant to an existing database. It does not share `EMET_OAUTH_PASSPHRASE`, `EMET_SIGNING_KEY`, `EMET_SUBKEY_PEPPER`, or `EMET_ACTIVE_GEMS`. Charter commitment 6 is not answered, so nothing is built. The supported model today is [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
49
- - **Shared hive memory for AI bots.** Closed as a separate item on 2026-10-11. Folded into the GEM socket work above. A bot that shares one EMET still needs its own source tag and scope. That question stays with the socket.
50
- - **Compiled topic pages, pilot (proposed 2026-09-30).** After the LLM-wiki pattern: a document prefix of topic pages compiled from semantic entries. Every claim cites its entry or transcript span; a compiled page never cites another compiled page as evidence; pages are derived, never the source of truth; one compiler role builds pages, others write entries only. No database change. The document store already versions, hashes, signs and checks form. Pilot page: the hive-memory idea. The hive-memory feature is closed as its own item (2026-10-11) and folded into the socket. If this pilot is built, it needs a different page. Nothing added beyond what the pilot needs.
51
- - **Lint pass over the semantic layer (proposed 2026-09-30).** A scheduled sweep for contradictions between entries, outdated claims a newer entry supersedes, entries that should link and don't, and subjects mentioned often with no compiled page. Findings are reported, never applied automatically; corrections go through supersession. Built after the pilot page, and only once it names its measure. Design inputs from the LLM Wiki v2 review (typed links, multi-agent sync rules, drift invariants, confidence only on top of provenance) are each weighed against commitment 6 before adoption. Its idea of letting entries fade from what surfaces is not taken: nothing in EMET fades.
52
- - **Advisory judge for team traffic (parked).** A fast external decision model (TypeSafe's Jev was evaluated) could sort traffic and interactions when many people and hosts share one EMET. Never in the write path — no model decides what EMET stores. Not for single-user installs.
53
- - **Local open-weight model as a host.** A read-only trial of EMET under a locally run model, once the host machine's GPU and RAM are on record.
61
+ - **Advisory judge for team traffic (parked).** A fast external decision model could sort traffic when many people and hosts share one EMET. It would never sit in the write path. Not for single-user installs.
62
+ - **Local open-weight model as a host.** A read-only trial under a locally run model, once the host machine's capacity is on record.
54
63
  - **Stranger install.** A clean-machine install by someone who has never seen EMET, to find first-run friction.
55
64
  - **Remove Dynamic Client Registration** by 2027-06-01, as MCP moves to client ID metadata documents.
56
- - **Public landing page (parked)** until a public publish path exists.
65
+ - **Later GEM work, not built.** Creator keyring and signature checks, a public GEM submission repository, accepting a library GEM onto the load list, and a monorail switch that picks a GEM. Each waits on its own proposal. The socket itself is built and is not in this list.
66
+
67
+ ### How to follow progress and give feedback
68
+
69
+ This file is the public list. It changes in the repository when an item moves. Discussion belongs in [GitHub issues](https://github.com/dreamforgestudiollc/EMET/issues). Open an issue before a pull request for anything beyond a typo. Say which roadmap item you mean, and do not send passphrases, tokens, connection strings, or memory content.
57
70
 
58
71
  ## Design commitments these must keep
59
72
 
60
73
  - No model in the write path: EMET stores what the assistant deliberately chose to write.
61
- - Controls, not reminders — a rule that matters is checked by the server.
74
+ - Controls, not reminders. A rule that matters is checked by the server.
62
75
  - Over-engineering is a defect, and the check comes before the build: nothing is built until it names the failure it fixes, what it replaces, how we will know it worked, and what holds it once it works (charter commitment 6). DMADV while EMET is in design; DMAIC once stable.
63
76
  - Correct the record by superseding, never by editing.
package/docs/SETUP.md CHANGED
@@ -103,11 +103,12 @@ when you want a second device to reach the same memory.
103
103
  5. **Pick a database name** and set `MONGODB_DB`. It defaults to `emet`. Collections (`emet_episodic`, `emet_semantic`, …) are
104
104
  created on first write — there is nothing to pre-create.
105
105
 
106
- 6. **One database per EMET instance.** The document store (`documents`,
107
- `documents_history`) is deliberately *not* prefixed, so two instances pointed at the same
108
- database will share their identity and continuity documents even if their memory
109
- collections use different prefixes. If you want two separate memories, give them separate
110
- databases - not just separate prefixes.
106
+ 6. **One database per EMET instance.** These collections are not prefixed:
107
+ `documents`, `documents_history`, `transcripts`, `exchanges`, `persons`, `invites`,
108
+ `close_attempts`, `error_log`, `error_log_summary`, and `_emet_verify`. Two instances
109
+ pointed at the same database share all of them, even when their memory collections use
110
+ different prefixes. If you want two separate memories, give them separate databases -
111
+ not just separate prefixes.
111
112
 
112
113
  7. **Vector index — only if you want `semantic_recall`.** Keyword search works without it.
113
114
  For meaning-based search, create an Atlas Vector Search index named
@@ -227,8 +228,10 @@ it is.
227
228
  | `EMET_VECTOR_INDEX` | `cascade_content_auto` | the Atlas Vector Search index `semantic_recall` uses |
228
229
  | `EMET_CORPORA` | your corpus names, comma-separated | only if you use `corpus_recall`; leave unset otherwise |
229
230
 
230
- `EMET_COLLECTION_PREFIX` also governs the counters collection and the three OAuth
231
- collections, so **devices you have already authorized stay authorized** - there is no
231
+ `EMET_COLLECTION_PREFIX` also governs the counters collection, the three OAuth
232
+ collections (`oauth_clients`, `oauth_codes`, `oauth_tokens`), and `sessions`,
233
+ `subkeys`, `subkeys_history`, `rotations`, `meta`, `doc_stages`, `gem_serves`,
234
+ `writer_approvals`, `owl_retirement`, and `graph_lab`, so **devices you have already authorized stay authorized** - there is no
232
235
  re-consent step.
233
236
 
234
237
  Your old `CASCADE_SOURCE_TAG` and `CASCADE_OAUTH_PASSPHRASE` continue to work; the `EMET_`
@@ -248,6 +251,26 @@ it should come back `ready` with your existing identity, not `setup_required`. I
248
251
  `setup_required`, one of the four variables above is wrong; **do not run the setup interview,
249
252
  which would write a new identity over your existing one.**
250
253
 
254
+ ## Upgrading to 0.3.6
255
+
256
+ 0.3.6 is a docs and wording release. Stored data shapes are unchanged. No new setting. Deploy over 0.3.5 as is. The public roadmap's Upcoming work section is not built unless it says so.
257
+
258
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
259
+
260
+ ## Upgrading to 0.3.5
261
+
262
+ 0.3.5 brings the public docs current. Stored data shapes are unchanged. The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, a chooser decision, and a break-glass reissue.
263
+
264
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
265
+
266
+ ## Upgrading to 0.3.4
267
+
268
+ 0.3.3 and 0.3.4 leave stored data shapes as they were in 0.3.2. Deploy over 0.3.2 or 0.3.3 as is.
269
+
270
+ From 0.3.4, `EMET-MEM-018` is checked on the append that opens a transcript, and on an append that would become the lowest stored index. Send the measured machine line on that first append, or the words `no local shell MCP`. A refused exchange 1 does not let a higher index start the transcript. With no machine table in the install notes, the check stays not enforced.
271
+
272
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
273
+
251
274
  ## Upgrading to 0.3.2
252
275
 
253
276
  0.3.2 adds door grants, the owner chooser, household rotation, and writer approval. An existing store keeps its records. After you deploy:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dreamforgestudiollc/emet",
3
- "version": "0.3.4",
4
- "description": "ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control memory for AI agents. Nothing is deleted. EMET 0.3.4 — Enduring Memory & Epistemic Tiers. An MCP memory server with persistent shared memory for AI agents, bot teams and chats: layered memory, verified writes, a verbatim transcript tier, per-client attribution and approvals, and client-side GEM execution. EMET verifies the record, not the computation. A GEM is seated only when its released flag is true. Every error carries a stable code; the owner-only emet_error_report returns a report and an email draft the user sends. npm run verify drives the registered tools from a checkout, and docs/features is the map of every feature.",
3
+ "version": "0.3.6",
4
+ "description": "ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control memory for AI agents. Nothing is deleted. EMET 0.3.6 — Enduring Memory & Epistemic Tiers. An MCP memory server with persistent shared memory for AI agents, bot teams and chats: layered memory, verified writes, a verbatim transcript tier, per-client attribution and approvals, and client-side GEM execution. EMET verifies the record, not the computation. A GEM is seated only when its released flag is true. Every error carries a stable code; the owner-only emet_error_report returns a report and an email draft the user sends. npm run verify drives the registered tools from a checkout, and docs/features is the map of every feature.",
5
5
  "keywords": [
6
6
  "agent-memory",
7
7
  "ai-agents",
@@ -48,6 +48,9 @@
48
48
  "docs/*.md",
49
49
  "CHARTER.md",
50
50
  "CHANGELOG.md",
51
+ "RELEASE_NOTES*.md",
52
+ "SECURITY.md",
53
+ "CONTRIBUTING.md",
51
54
  "server.json",
52
55
  ".env.example",
53
56
  "README.md",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.dreamforgestudiollc/emet",
4
4
  "title": "EMET",
5
5
  "description": "ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control memory for AI agents. Nothing is deleted.",
6
- "version": "0.3.4",
6
+ "version": "0.3.6",
7
7
  "websiteUrl": "https://dreamforgestudiollc.github.io/EMET/",
8
8
  "repository": {
9
9
  "url": "https://github.com/dreamforgestudiollc/EMET",
@@ -22,7 +22,7 @@
22
22
  "registryType": "npm",
23
23
  "registryBaseUrl": "https://registry.npmjs.org",
24
24
  "identifier": "@dreamforgestudiollc/emet",
25
- "version": "0.3.4",
25
+ "version": "0.3.6",
26
26
  "transport": {
27
27
  "type": "stdio"
28
28
  },
@@ -132,6 +132,7 @@ const ANNOTATION_TABLE = {
132
132
  };
133
133
 
134
134
  function subkeyAnnotationsHidden() {
135
+ // CASCADE_SUBKEYS is a legacy environment name. EMET_SUBKEYS is the name to set.
135
136
  return process.env.EMET_SUBKEYS !== '1' && process.env.CASCADE_SUBKEYS !== '1';
136
137
  }
137
138
 
@@ -9,7 +9,7 @@
9
9
  * stamped with (source_basis "declared", source_login = the login's tag),
10
10
  * but a declared tag never gains rights beyond the login's tag (A3): every
11
11
  * guard is run for BOTH tags and the write must pass both (rightsTags()).
12
- * grok-project on the token bound to hub-bot is not that
12
+ * bound-host on the token bound to hub-bot is not that
13
13
  * claim: it is refused (BOUND's own door). A credential row (basis
14
14
  * "credential") is not a remembered tag for the shared client.
15
15
  *
@@ -32,7 +32,7 @@
32
32
  * (transcript parts, documents, layer entries): if those rows carry another
33
33
  * tag, the write is refused.
34
34
  *
35
- * OWNER (A2). Live owner tokens carry the owner's person id (e.g. "alex");
35
+ * OWNER (A2). Live owner tokens carry the owner's person id;
36
36
  * older ones carry "owner" or nothing. All three are the owner.
37
37
  */
38
38
 
@@ -40,7 +40,7 @@ import { setting } from './env.js';
40
40
  import { chooserBinding } from './deep-links.js';
41
41
  import { isOwlIdentity } from './owl.js';
42
42
  import { isMasterBlasterActor } from './writer-approval.js';
43
- import { isSophiaCredential, sophiaClaimOnSharedLogin, BOUND_LOGIN_MESSAGE, CLAIM_TAG, MB_TAG } from './bound-door.js';
43
+ import { isBoundHostCredential, isBoundHostTag, boundHostClaimOnSharedLogin, BOUND_LOGIN_MESSAGE, CLAIM_TAG, MB_TAG } from './bound-door.js';
44
44
 
45
45
  export const APPROVALS_DOC = 'emet/CLIENT_APPROVALS.md';
46
46
  export const WRITE_TOOLS = new Set([
@@ -350,7 +350,7 @@ export async function preflight(ctx, actor, args, toolName) {
350
350
  if (foreign) throw refusal(`source "${actor.subkeyTag}" is bound to another person's login, so this session may not write under it. Pass your own tag. Nothing was written.`);
351
351
  }
352
352
 
353
- if (STRICT_TAG_TOOLS.has(toolName) && sophiaClaimOnSharedLogin(actor, declared)) {
353
+ if (STRICT_TAG_TOOLS.has(toolName) && boundHostClaimOnSharedLogin(actor, declared)) {
354
354
  const denied = refusal(
355
355
  BOUND_LOGIN_MESSAGE,
356
356
  chooserBinding({ kind: 'onboarding_required', grantId: actor.grantId, tag: CLAIM_TAG, door: 'member' })
@@ -413,8 +413,8 @@ export async function preflight(ctx, actor, args, toolName) {
413
413
  const keptAuto = !declared && !bound && remembered.length === 1 ? remembered[0] : null;
414
414
  let effective = declared || bound || keptAuto || (actor.clientId && actor.clientId !== 'http:visitor' ? autoTag(actor.clientId) : null);
415
415
  let basis = declared && declared !== bound ? 'declared' : (bound ? 'login' : (keptAuto ? 'remembered' : (effective ? 'auto' : null)));
416
- const sophiaDoor = isSophiaCredential(actor) && (!declared || declared === CLAIM_TAG || declared === MB_TAG);
417
- if (sophiaDoor) {
416
+ const boundHostDoor = isBoundHostCredential(actor) && (!declared || isBoundHostTag(declared) || declared === MB_TAG);
417
+ if (boundHostDoor) {
418
418
  effective = CLAIM_TAG;
419
419
  basis = 'credential';
420
420
  }
@@ -425,7 +425,7 @@ export async function preflight(ctx, actor, args, toolName) {
425
425
 
426
426
  // New-client gate (the owner 2026-10-12). Bound tags were approved at consent;
427
427
  // registered tags by the owner's env. Everything else needs the record.
428
- if (!sophiaDoor && deps && effective && basis !== 'login' && basis !== 'credential' && !registry.includes(effective)) {
428
+ if (!boundHostDoor && deps && effective && basis !== 'login' && basis !== 'credential' && !registry.includes(effective)) {
429
429
  const cur = await loadApprovals(deps);
430
430
  if (cur.broken) {
431
431
  actor.approvalState = 'unreadable';
@@ -537,10 +537,10 @@ export async function clientApprove(deps, actor, ownerId, { tag, decision, reaso
537
537
  if (!(ownerOk || cosOk)) throw refusal(`emet_client_approve: only the owner${cosTag() ? ` or the chief of staff (${cosTag()})` : ''} may decide new clients. Nothing was changed.`);
538
538
  if (isOwlIdentity(actor)) throw refusal('emet_client_approve: the owl MCP clone account was retired by R6 and cannot approve. the owner decides a new writer on /owner/chooser. Nothing was changed.');
539
539
  if (decision === 'approve' && isMasterBlasterActor(actor) && !(actor && actor.ownerSession === true)) {
540
- throw refusal('emet_client_approve: an AI cannot grant a writer. Master Hub prepares a request. the owner decides it on /owner/chooser. Nothing was changed.');
540
+ throw refusal('emet_client_approve: an AI cannot grant a writer. The hub login prepares a request. the owner decides it on /owner/chooser. Nothing was changed.');
541
541
  }
542
542
  if (decision === 'approve' && cosOk && !(actor && actor.ownerSession === true)) {
543
- throw refusal('emet_client_approve: an AI cannot grant a writer. Master Hub prepares a request. the owner decides it on /owner/chooser. Nothing was changed.');
543
+ throw refusal('emet_client_approve: an AI cannot grant a writer. The hub login prepares a request. the owner decides it on /owner/chooser. Nothing was changed.');
544
544
  }
545
545
  if (setting('SUBKEYS') === '1') {
546
546
  const { decideSubkeyIfPending } = await import('./subkeys.js');
package/src/bound-door.js CHANGED
@@ -1,29 +1,31 @@
1
1
  /**
2
2
  * BOUND's door (init audit items 3 and 5, 2026-10-27).
3
3
  *
4
- * grok-project is a host tag. It is not a declared claim on the Master
5
- * Hub token that shares OAuth client bound-login-client. That token
6
- * is bound to hub-bot. A grok-project claim on it is refused
4
+ * bound-host is a host tag. It is not a declared claim on the hub login's
5
+ * token that shares OAuth client bound-login-client. That token
6
+ * is bound to hub-bot. A bound-host claim on it is refused
7
7
  * and is not stamped hub-bot.
8
8
  *
9
- * A credential is the token's own source_tag grok-project (member, owner, or
10
- * a legacy token with no door) or a sub-key whose tag is grok-project. Guest
9
+ * A credential is the token's own source_tag bound-host (member, owner, or
10
+ * a legacy token with no door) or a sub-key whose tag is bound-host. Guest
11
11
  * is not a writer credential. One EMET server. No second instance.
12
12
  *
13
- * The approvals row lists that credential. It does not remember grok-project
13
+ * The approvals row lists that credential. It does not remember bound-host
14
14
  * onto the shared client, so the claim path stays closed. CI does not mint a
15
15
  * live key and does not approve a production client.
16
16
  */
17
17
 
18
+ import crypto from 'node:crypto';
18
19
  import { rawActor } from './persons.js';
19
20
  import { chooserBinding } from './deep-links.js';
20
21
  import { ValidationError } from './validation.js';
21
22
 
22
- export const CLAIM_TAG = 'grok-project';
23
+ export const CLAIM_TAG = 'bound-host';
24
+ /** First 16 hex of sha256(the exact 0.3.4 bound-door tag). The spelling stays out of this file. */
25
+ export const LEGACY_CLAIM_TAG_DIGEST = '43897607a89a6b2e';
23
26
  /** Same string as writer-approval.js MB_TAG. */
24
27
  export const MB_TAG = 'hub-bot';
25
28
  export const SHARED_GROK_CLIENT = 'bound-login-client';
26
- export const EPISODIC_697_ID = 697;
27
29
  export const CORRECTION_NOTE_DATE = '2026-10-27';
28
30
 
29
31
  export const BOUND_LOGIN_MESSAGE =
@@ -34,39 +36,68 @@ export const BOUND_LOGIN_MESSAGE =
34
36
  * Guest is not a writer credential. A declared tag does not remove a login
35
37
  * credential and is not itself a credential.
36
38
  */
37
- export function isSophiaCredential(actor) {
39
+ export function boundHostTagDigest(tag) {
40
+ return crypto.createHash('sha256').update(String(tag).trim()).digest('hex').slice(0, 16);
41
+ }
42
+
43
+ /** Current `bound-host`, or the exact 0.3.4 spelling still stored on a token, approval row, writer request, or sub-key. A different case is not that door. */
44
+ export function isBoundHostTag(tag) {
45
+ if (typeof tag !== 'string') return false;
46
+ const text = tag.trim();
47
+ if (!text) return false;
48
+ if (text === CLAIM_TAG) return true;
49
+ return boundHostTagDigest(text) === LEGACY_CLAIM_TAG_DIGEST;
50
+ }
51
+
52
+ /** The stored 0.3.4 spelling. A newly chosen consent, sub-key, or writer request must not use it. */
53
+ export function isLegacyBoundHostSpelling(tag) {
54
+ if (typeof tag !== 'string') return false;
55
+ const text = tag.trim();
56
+ return text !== CLAIM_TAG && isBoundHostTag(text);
57
+ }
58
+
59
+ function boundHostMapKey(map) {
60
+ if (!map || typeof map !== 'object') return null;
61
+ if (Object.prototype.hasOwnProperty.call(map, CLAIM_TAG)) return CLAIM_TAG;
62
+ for (const key of Object.keys(map)) {
63
+ if (isBoundHostTag(key)) return key;
64
+ }
65
+ return null;
66
+ }
67
+
68
+ export function isBoundHostCredential(actor) {
38
69
  if (!actor || actor.transport !== 'http' || actor.authenticated !== true) return false;
39
70
  if (actor.door === 'guest') return false;
40
- if (actor.subkeySession === true && actor.subkeyTag === CLAIM_TAG) return true;
71
+ if (actor.subkeySession === true && isBoundHostTag(actor.subkeyTag)) return true;
41
72
  const login = typeof actor.sourceTag === 'string' ? actor.sourceTag.trim() : '';
42
- if (login !== CLAIM_TAG) return false;
73
+ if (!isBoundHostTag(login)) return false;
43
74
  return actor.door === 'member' || actor.door === 'owner' || actor.door == null;
44
75
  }
45
76
 
46
77
  /**
47
- * The shared Grok client, bound to Master Hub, claiming grok-project.
78
+ * The shared Grok client, bound to the hub login, claiming bound-host.
48
79
  * A BOUND credential is not this claim. Only the caller string counts, so a
49
80
  * tag left on a reused actor object cannot refuse a later write that names
50
81
  * no source.
51
82
  */
52
- export function sophiaClaimOnSharedLogin(actor, callerTag) {
83
+ export function boundHostClaimOnSharedLogin(actor, callerTag) {
53
84
  if (!actor || actor.transport !== 'http' || actor.authenticated !== true) return false;
54
85
  if (actor.clientId !== SHARED_GROK_CLIENT) return false;
55
86
  const bound = typeof actor.sourceTag === 'string' ? actor.sourceTag.trim() : '';
56
87
  if (bound !== MB_TAG) return false;
57
- if (isSophiaCredential(actor)) return false;
88
+ if (isBoundHostCredential(actor)) return false;
58
89
  const declared = typeof callerTag === 'string' ? callerTag.trim() : '';
59
- return declared === CLAIM_TAG;
90
+ return isBoundHostTag(declared);
60
91
  }
61
92
 
62
- /** Stamp grok-project when the credential's caller is empty, itself, or Master Hub. */
63
- export function sophiaCredentialOverrides(actor, callerTag) {
64
- if (!isSophiaCredential(actor)) return false;
93
+ /** Stamp bound-host when the credential's caller is empty, itself, or the hub login. */
94
+ export function boundHostCredentialOverrides(actor, callerTag) {
95
+ if (!isBoundHostCredential(actor)) return false;
65
96
  const caller = typeof callerTag === 'string' ? callerTag.trim() : '';
66
- return caller === '' || caller === CLAIM_TAG || caller === MB_TAG;
97
+ return caller === '' || isBoundHostTag(caller) || caller === MB_TAG;
67
98
  }
68
99
 
69
- export function refuseSophiaDoor(actor) {
100
+ export function refuseBoundHostDoor(actor) {
70
101
  const grantId = actor && typeof actor.grantId === 'string' && actor.grantId.trim() ? actor.grantId.trim() : 'unknown';
71
102
  const err = new ValidationError('source', BOUND_LOGIN_MESSAGE, { code: 'EMET-AUTH-044' });
72
103
  err.chooser = chooserBinding({ kind: 'onboarding_required', grantId, tag: CLAIM_TAG, door: 'member' });
@@ -74,24 +105,23 @@ export function refuseSophiaDoor(actor) {
74
105
  }
75
106
 
76
107
  /**
77
- * Dated episodic correction for 697. The parent stays. This is not
78
- * revise_memory and it does not supersede the row. Master Hub writes it
79
- * on the live store after merge, from the Master Hub login, and does not
80
- * pass source grok-project on that login.
108
+ * Dated correction note. The parent stays. This is not
109
+ * revise_memory and it does not supersede the row. The hub login writes it
110
+ * on the live store after merge, from the hub login, and does not
111
+ * pass source bound-host on that login.
81
112
  */
82
- export function episodic697CorrectionNote() {
113
+ export function boundHostCorrectionNote() {
83
114
  return {
84
115
  layer: 'episodic',
85
116
  content: [
86
117
  `Correction note dated ${CORRECTION_NOTE_DATE}.`,
87
- `Episodic ${EPISODIC_697_ID} was written from client ${SHARED_GROK_CLIENT} and stamped ${MB_TAG}.`,
118
+ `A row written from client ${SHARED_GROK_CLIENT} and stamped ${MB_TAG}.`,
88
119
  `That stamp is a misattribution when the writer was BOUND (${CLAIM_TAG}).`,
89
120
  'The original row is retained. This note does not edit it in place and does not supersede it.',
90
121
  `A BOUND write carries ${CLAIM_TAG} from its own door.`,
91
- `Master Hub writes this note on the live store after merge, from the Master Hub login, and does not pass source ${CLAIM_TAG} on that login.`
122
+ `The hub login writes this note on the live store after merge, from the hub login, and does not pass source ${CLAIM_TAG} on that login.`
92
123
  ].join(' '),
93
124
  metadata: {
94
- corrects: EPISODIC_697_ID,
95
125
  assertion_origin: 'assistant',
96
126
  custom: {
97
127
  correction: 'misattribution',
@@ -105,10 +135,10 @@ export function episodic697CorrectionNote() {
105
135
  }
106
136
 
107
137
  /**
108
- * List grok-project as a credential door. Does not remember() it onto the
138
+ * List bound-host as a credential door. Does not remember() it onto the
109
139
  * shared client. Idempotent for the same client, door, and grant.
110
140
  */
111
- export async function recordSophiaCredential(deps, { client_id, door, grant_id, by } = {}, now = new Date()) {
141
+ export async function recordBoundHostCredential(deps, { client_id, door, grant_id, by } = {}, now = new Date()) {
112
142
  if (!deps || typeof deps.readDoc !== 'function' || typeof deps.writeDoc !== 'function') {
113
143
  return { written: false, reason: 'no-approvals-io' };
114
144
  }
@@ -120,8 +150,10 @@ export async function recordSophiaCredential(deps, { client_id, door, grant_id,
120
150
  const { mutateApprovals } = await import('./attribution.js');
121
151
  const at = (now instanceof Date ? now : new Date(now)).toISOString();
122
152
  const out = await mutateApprovals(deps, (d) => {
123
- const prev = d.approved[CLAIM_TAG];
124
- const pending = d.pending && d.pending[CLAIM_TAG];
153
+ const key = boundHostMapKey(d.approved) || CLAIM_TAG;
154
+ const prev = d.approved[key];
155
+ const pendingKey = boundHostMapKey(d.pending);
156
+ const pending = pendingKey ? d.pending[pendingKey] : undefined;
125
157
  const same = prev
126
158
  && prev.basis === 'credential'
127
159
  && prev.door === doorName
@@ -129,31 +161,32 @@ export async function recordSophiaCredential(deps, { client_id, door, grant_id,
129
161
  && (prev.grant_id || null) === grant
130
162
  && !pending;
131
163
  if (same) return false;
132
- d.approved[CLAIM_TAG] = {
164
+ d.approved[key] = {
133
165
  basis: 'credential',
134
166
  door: doorName,
135
167
  client_id: clientId,
136
168
  grant_id: grant,
137
- source_tag: CLAIM_TAG,
169
+ source_tag: key,
138
170
  separate_from_client: SHARED_GROK_CLIENT,
139
171
  separate_from_tag: MB_TAG,
140
172
  by: by || 'owner',
141
173
  at,
142
- rule: 'separate login, then assign grok-project, then initialize'
174
+ rule: `separate login, then assign ${key}, then initialize`
143
175
  };
144
- if (d.pending && d.pending[CLAIM_TAG]) delete d.pending[CLAIM_TAG];
176
+ if (pendingKey) delete d.pending[pendingKey];
145
177
  return true;
146
178
  });
147
- return { written: out.written, approved: out.data.approved[CLAIM_TAG] };
179
+ const storedKey = boundHostMapKey(out.data.approved) || CLAIM_TAG;
180
+ return { written: out.written, approved: out.data.approved[storedKey] };
148
181
  }
149
182
 
150
- /** After the owner's chooser issues a grok-project door. The preparer's grant is not stored. */
151
- export async function sophiaListingAfterWriterIssue({ recorded, issued, deps, by, now } = {}) {
152
- if (!recorded || recorded.claimed_tag !== CLAIM_TAG) return { written: false, reason: 'tag' };
183
+ /** After the owner's chooser issues a bound-host door. The preparer's grant is not stored. */
184
+ export async function boundHostListingAfterWriterIssue({ recorded, issued, deps, by, now } = {}) {
185
+ if (!recorded || !isBoundHostTag(recorded.claimed_tag)) return { written: false, reason: 'tag' };
153
186
  if (!issued || issued.issued !== true) return { written: false, reason: 'not-issued' };
154
187
  if (recorded.door === 'guest') return { written: false, reason: 'guest' };
155
188
  try {
156
- return await recordSophiaCredential(deps, {
189
+ return await recordBoundHostCredential(deps, {
157
190
  client_id: recorded.client_id,
158
191
  door: recorded.door,
159
192
  grant_id: null,
@@ -165,6 +198,6 @@ export async function sophiaListingAfterWriterIssue({ recorded, issued, deps, by
165
198
  }
166
199
 
167
200
  /** The actor in force, for stamp sites that do not take one. */
168
- export function sophiaActor() {
201
+ export function boundHostActor() {
169
202
  return rawActor();
170
203
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Break-glass recovery (R4b).
3
3
  *
4
- * One stable URL on Railway EMET: /owner/break-glass. The owner passphrase
4
+ * One stable URL on a hosted deployment: /owner/break-glass. The owner passphrase
5
5
  * session is the only credential. A member or guest grant does not open it,
6
6
  * and no AI client is required. Each authenticated use is logged and counted
7
7
  * on emet_status.break_glass.
@@ -25,6 +25,7 @@ import {
25
25
  import {
26
26
  esc, sendHtml, loginForm, mountOwnerLogin, createOwnerGate
27
27
  } from './owner-session.js';
28
+ import { isLegacyBoundHostSpelling } from './bound-door.js';
28
29
 
29
30
  export { breakGlassMetric };
30
31
 
@@ -450,6 +451,11 @@ export function mountBreakGlass(app, options = {}) {
450
451
  sendHtml(res, 400, '<p>A tag is required for member or guest. Nothing was issued.</p>', 'EMET break-glass');
451
452
  return;
452
453
  }
454
+ if (isLegacyBoundHostSpelling(tag)) {
455
+ res.locals.reason = 'legacy_bound_tag';
456
+ sendHtml(res, 400, '<p>use bound-host (EMET-AUTH-045). Nothing was issued.</p>', 'EMET break-glass');
457
+ return;
458
+ }
453
459
  let note = 'Owner door is the passphrase consent on this host. This page did not mint a token.';
454
460
  let issued = false;
455
461
  if (door !== 'owner') {