@dreamforgestudiollc/emet 0.3.4 → 0.3.5

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.
package/.env.example CHANGED
@@ -94,7 +94,7 @@ EMET_SOURCE_TAGS=laptop,phone,cli
94
94
 
95
95
  # Optional. Address used by emet_error_report for the mailto draft and the
96
96
  # structured email a calling assistant can pass to its own mail tool. Unset
97
- # uses dreamforgestudio@mail.grokbot.com, the project's report inbox. Set it
97
+ # uses dreamforgestudio@mail.grokbot.com, the address in src/error-report.js. Set it
98
98
  # to your own address to keep reports in house.
99
99
  # EMET does not send mail. An empty string (a real empty environment
100
100
  # variable, not a blank line in this file) returns the report and no email.
@@ -110,6 +110,23 @@ EMET_SOURCE_TAGS=laptop,phone,cli
110
110
  # CASCADE_CLOSE_GRACE_MINUTES is still read as a deprecated fallback; EMET_ wins.
111
111
  # EMET_CLOSE_GRACE_MINUTES=5
112
112
 
113
+ # Optional. UTC date (YYYY-MM-DD) from which an HTTP write whose source is only
114
+ # a caller claim, and whose door has no grant, is refused (EMET-AUTH-040).
115
+ # Unset, or a value that is not that shape, uses 2026-12-15. Before that day
116
+ # the write is kept and the receipt warns. Stdio, a tag bound at approval, a
117
+ # sub-key, and any write that already has a grant stay open.
118
+ # EMET_CLAIMED_TAG_KILL_DATE=2026-12-15
119
+
120
+ # Optional. Minutes a refusal deep link stays valid. Default 15. A whole number
121
+ # from 1 to 60 replaces that. Any other value leaves 15. Opening the link
122
+ # does not grant a door. The owner still decides on /owner/chooser.
123
+ # EMET_DEEP_LINK_TTL_MINUTES=15
124
+
125
+ # Optional. Comma-separated source tags allowed to call restore_doc. Unset
126
+ # uses EMET_SOURCE_TAG. If both are unset, no tag can restore. A tag that is
127
+ # not in the list is refused (EMET-DOC-042).
128
+ # EMET_RESTORE_TAGS=
129
+
113
130
  # Optional. The date from which this record is held to the current rules.
114
131
  # Set it and the startup line reports gaps SINCE this date beside the lifetime
115
132
  # figure - the lifetime figure never falls once history is in the store; the
package/CHANGELOG.md CHANGED
@@ -7,18 +7,34 @@ change before 1.0.
7
7
 
8
8
  ## Unreleased
9
9
 
10
- Nothing is waiting above 0.3.4.
10
+ Nothing is waiting above 0.3.5.
11
+
12
+ ## 0.3.5 - 2026-11-10
13
+
14
+ This release brings the public docs current with the code. Stored data shapes are unchanged. The declared version is 0.3.5.
15
+
16
+ ### Upgrade
17
+ - 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, and a chooser decision. The alias is a digest, so this package does not spell the old tag.
18
+
19
+ ### Changed
20
+ - `CHARTER.md` §4 says the extension socket is built. It is `src/socket.js`. Its note is `docs/gem/README.md`. Public text no longer names an install-specific hub or host tag. Writer-approval text says the hub login. The tag that login matches is still `hub-bot`. The bound-door tag the server matches is `bound-host`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
21
+ - The site tool table counts 38 tools with sub-keys off: 15 read-only, 13 additive, and 8 that replace or hand out access, plus `retire_doc` and `emet_status`. The public site says 0.3.2 was published to npm on 2026-10-28. Owner instructions name `/owner/chooser`. `docs/ROADMAP.md` is dated 2026-11-10, marks the site and the npm package live, and names the 0.3.0 topic-page tools `emet_page`, `emet_pages`, and `emet_page_lint`. `.env.example` and `docs/DEPLOY.md` document `EMET_CLAIMED_TAG_KILL_DATE` (unset uses `2026-12-15`, then `EMET-AUTH-040`), `EMET_DEEP_LINK_TTL_MINUTES` (default 15), and `EMET_RESTORE_TAGS`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
22
+ - The README counts 38 tools with sub-keys off, 15 of them read-only, and 42 with `EMET_SUBKEYS=1`. `docs/ROADMAP.md` names the same live count, and GEM socket PR 4 is shipped in 0.2.6. `docs/SETUP.md` and `docs/DEPLOY.md` carry upgrading notes through 0.3.5. The public site has What-changed sections for 0.3.1, 0.3.2, 0.3.3, and 0.3.4. Comments no longer name the private repository or the retired account id. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
23
+ - Version 0.3.5. `package.json`, `package-lock.json`, `server.json`, `glama.json`, `.cursor-plugin/plugin.json`, and `src/version.js` agree. The README and the public site name the same version. `mcp.json` has no version. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
24
+ - The default `EMET_REPORT_EMAIL` is `dreamforgestudio@mail.grokbot.com` again. The default in 0.3.2, 0.3.3, and 0.3.4, `dreamforgestudio@mail.hubbot.com`, was wrong. The 0.3.1 line below records the address that release shipped.
11
25
 
12
26
  ## 0.3.4 - 2026-11-10
13
27
 
14
- Public pull request #26, the changes since 0.3.3. Stored data shapes are unchanged. The declared version is 0.3.4.
28
+ Public pull request #26, the changes since 0.3.3. Stored data shapes are unchanged. 0.3.4 was published to npm and the MCP Registry on 2026-11-10. The declared version is 0.3.4.
15
29
 
16
30
  ### Added
17
31
  - One instance per project. [docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md) is the public ladder. Rung A hardens one project (`EMET_SOURCE_TAGS` before a second writer, a unique `EMET_OAUTH_PASSPHRASE`, guest, member, and sub-keys off until needed, optional `EMET_SIGNING_KEY`, `PUBLIC_URL` exact, `/health` then `emet_status` probe after an environment change). Rung B is the clone recipe, including per-instance `EMET_ACTIVE_GEMS`, bot-team backup as the recommended interview answer, and Neurendipity and Lean Six Sigma as opt-in. Rung C is the inventory and the offboarding steps (a new passphrase, `rotate-all`, `revoke-member`, `emet_subkey_revoke`). Rung D, a control plane that only provisions isolated instances, stays a seed in [docs/ROADMAP.md](docs/ROADMAP.md). [SECURITY.md](SECURITY.md) points at that ladder. `CHARTER.md` is unchanged. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
18
32
 
33
+ ### Changed
34
+ - Version 0.3.4. `package.json`, `package-lock.json`, `server.json`, `glama.json`, `.cursor-plugin/plugin.json`, and `src/version.js` agree. The README and the public site name the same version. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
35
+
19
36
  ### Fixed
20
37
  - `EMET-MEM-018` runs on the append that opens the transcript, and on an append that would become the lowest stored index, whatever `exchange_index` that is. A refused exchange 1 no longer lets a higher index start the transcript. Nothing is written. With no machine table in the install notes, the check stays not enforced. [docs/BOOTSTRAP.md](docs/BOOTSTRAP.md), [docs/SETUP.md](docs/SETUP.md), [docs/GUIDED-SETUP.md](docs/GUIDED-SETUP.md), [docs/DEPLOY.md](docs/DEPLOY.md), [docs/GUARDRAILS-AND-MONORAILS.md](docs/GUARDRAILS-AND-MONORAILS.md), and [docs/features/transcripts.md](docs/features/transcripts.md) state that order and the cost of skipping it. The monorail stays enforce only. The README no longer says that npm lags the repository. That note said `npx -y @dreamforgestudiollc/emet` installed 0.3.2 until 0.3.3 was published. 0.3.3 was already the release on npm. Changing `EMET_OAUTH_PASSPHRASE` stops new owner sign-ins that use the old value. It does not, by itself, revoke tokens already issued. `rotate-all` does that. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
21
- - Version 0.3.4. `package.json`, `package-lock.json`, `server.json`, `glama.json`, `.cursor-plugin/plugin.json`, and `src/version.js` agree. The README and the public site name the same version. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
22
38
 
23
39
  ## 0.3.3 - 2026-11-03
24
40
 
@@ -155,7 +171,7 @@ A board fix, a public website, and the first npm package, `@dreamforgestudiollc/
155
171
  - A static website in `site/`, for search, and a GitHub Actions workflow that publishes that folder to GitHub Pages on pushes to `main`.
156
172
  - `glama.json` at the repo root names `dreamforgestudiollc` as maintainer for the Glama directory listing.
157
173
  - The README records the origin in the same words as the site: EMET was built by Dreamforge Studio LLC from a neurodivergent user’s own need for an AI assistant that remembers. The word coined for that is neurendipity: neurodivergent and serendipity.
158
- - The public-scrub suite reads the Pages workflow's deploy job `if` and requires it to be exactly `github.repository == 'dreamforgestudiollc/EMET' && github.ref == 'refs/heads/main'`. A repository name that only contains that text, such as `dreamforgestudiollc/EMET-private`, does not pass.
174
+ - The public-scrub suite reads the Pages workflow's deploy job `if` and requires it to be exactly `github.repository == 'dreamforgestudiollc/EMET' && github.ref == 'refs/heads/main'`. A repository name that only contains that text, such as `dreamforgestudiollc/EMET-fork`, does not pass.
159
175
  - The same suite requires `site/sitemap.xml`, `site/robots.txt`, `site/.nojekyll`, and every image the site HTML references to be present on the scrub and publish walk. Removing one of those files fails the suite.
160
176
  - `server.json` for the Official MCP Registry. Its name is `io.github.dreamforgestudiollc/emet`, the same value as `mcpName` in package.json. The npm package it names is the stdio server at version 0.2.4.
161
177
  - The pack test reads the text inside the tarball. On a scrubbed tree, an install-specific name in any packed file fails it. On this private tree that check waits, because the publish scrub has not rewritten those files yet.
package/CHARTER.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # EMET ARCHITECTURE CHARTER
2
2
 
3
- **Record control:** id `CHARTER.md` · revision: the store's version governs · status: IN FORCE · approved: user · 2026-09-11 · a decision record · revised with the user's approval 2026-09-15 (the consolidated revision, a decision record) · revised at the user's word 2026-09-23 (parked items named at startup; §3 commitment 8, §6 item 3; a decision record) · revised with the user's approval 2026-09-27 (pending lessons named at startup; blocked-close cap and scope at close; §6 items 3 and close; a recorded lesson) · revised with the user's approval 2026-09-29 (the aleph named as the integrity verifier; Guardrails & Monorails, with switches; the database boundary; the per-exchange transcript; the user as final authority; §1, §3 commitments 1, 2 and 9, §4, §6, §8, §10; a decision record) · revised with the user's approval 2026-09-30 (the admission test: four questions before anything is built, DMADV while in design, DMAIC once stable; §3 commitment 6; a decision record) · Tier 1 · owner: the user · decision record: a decision record · revised with the user's approval 2026-10-11 (GEM standard: the core floor is the memory minimum; the Neurendipity GEM is bundled and off unless the user asks; commitment 8, §4, §5, §6) · revised with the user's approval 2026-10-11 (the ISO document-control positioning and the repository description made standing; §7) · revised with the user's approval 2026-10-16 (client-executed RUNEs are a carve-out from commitment 1: EMET verifies the record, not the computation; §3 commitment 1, §4 Extension socket)
3
+ **Record control:** id `CHARTER.md` · revision: the store's version governs · status: IN FORCE · approved: user · 2026-09-11 · a decision record · revised with the user's approval 2026-09-15 (the consolidated revision, a decision record) · revised at the user's word 2026-09-23 (parked items named at startup; §3 commitment 8, §6 item 3; a decision record) · revised with the user's approval 2026-09-27 (pending lessons named at startup; blocked-close cap and scope at close; §6 items 3 and close; a recorded lesson) · revised with the user's approval 2026-09-29 (the aleph named as the integrity verifier; Guardrails & Monorails, with switches; the database boundary; the per-exchange transcript; the user as final authority; §1, §3 commitments 1, 2 and 9, §4, §6, §8, §10; a decision record) · revised with the user's approval 2026-09-30 (the admission test: four questions before anything is built, DMADV while in design, DMAIC once stable; §3 commitment 6; a decision record) · Tier 1 · owner: the user · decision record: a decision record · revised with the user's approval 2026-10-11 (GEM standard: the core floor is the memory minimum; the Neurendipity GEM is bundled and off unless the user asks; commitment 8, §4, §5, §6) · revised with the user's approval 2026-10-11 (the ISO document-control positioning and the repository description made standing; §7) · revised with the user's approval 2026-10-16 (client-executed RUNEs are a carve-out from commitment 1: EMET verifies the record, not the computation; §3 commitment 1, §4 Extension socket) · revised with the user's approval 2026-11-10 (the extension socket is built; §4 Extension socket)
4
4
  **Written:** 2026-09-10, session `2026-09-10_morning-mobile-init`, source `mobile`
5
5
  ⚠ **Public document once the repository is public.** The disclosure line (a decision record) must be drawn before publication. This document states structure and intent only — no implementation specifics.
6
6
  ⚠ **§1 is in the user's words (2026-09-11); attorney review pending** (claim language is on that agenda).
@@ -58,7 +58,7 @@
58
58
  | **The database boundary** | The login EMET runs under may add and update, never remove the record (2026-09-29). Commitment 2 is enforced by the database as well as by the server. | Database role, defined once in server code |
59
59
  | **The read path** | Returns entries with their integrity status, verified by the aleph. A superseded entry surfaces marked, naming what replaced it and the date it ended (decided 2026-09-13); a lookup by any id in a supersession chain also returns the live end of the chain, so a cross-reference keeps resolving after every later revision (2026-09-15). An expired entry surfaces the same way, marked with its end date. Current entries come first in every order, including time order. Retired documents stay in the document list and the startup scan, after the current documents, marked with the date and what replaced them. Recall ranks by relevance and importance. Time order is `order: 'latest'`, or a standalone latest, newest, or most recent together with other words. Retained document revisions are readable in full. | Server code |
60
60
  | **Supplementary corpus** | Optional reference material loaded by the user, separate from memory. | Server code |
61
- | **Extension socket** | **Standard specified, socket not built.** The seat for a GEM (Golem Expertise Module). A RUNED directive (Registered Utility Node Executable Directive) is a declared, registered tool built into a GEM. A RUNED GEM carries at least one. The 2026-09-08 names (Guided Engagement Module, Registered Utility Node Extension) are superseded. The standard lives in the GEM library: private repository EMET-GEMs (`https://github.com/dreamforgestudiollc/EMET-GEMs`). In this repository the text under review is `gem-library/` until that folder is moved. **Precedence:** core floor protections outrank the user's current word, which outranks active GEMs by priority. A GEM may change a modifiable default (voice, pace, how much is explained) only with the user's consent when it is activated (the 2026-09-11 decision, kept for those defaults). **Floor protection:** core floor protections are non-removable. No GEM may weaken them. A GEM may add depth that complements them. Neurodivergent engagement lives in the bundled Neurendipity GEM (`neurendipity`), which is off unless the user asks for it. The list of GEMs installed on this server, active or not, is part of `emet_initialize` and of what a bot is shown at startup. Only the user and the user's bots change the GEM standard. Anyone may author a GEM that follows it. A GEM that does not ship inside an EMET release loads only after the library's security gate and the user's acceptance. The socket enforces that (commitment 5). **Client execution, a carve-out from commitment 1 (2026-10-16):** EMET verifies the record, not the computation. Client-executed RUNE results are recorded as attested by the client; they are replayable from recorded inputs, not re-executed by EMET. The socket does not run RUNE code. | `gem-library/SPEC.md` |
61
+ | **Extension socket** | **The socket is built.** It is `src/socket.js`. Its note is `docs/gem/README.md`. The standard is specified. The seat for a GEM (Golem Expertise Module). A RUNED directive (Registered Utility Node Executable Directive) is a declared, registered tool built into a GEM. A RUNED GEM carries at least one. The 2026-09-08 names (Guided Engagement Module, Registered Utility Node Extension) are superseded. The standard lives in the GEM library: private repository EMET-GEMs (`https://github.com/dreamforgestudiollc/EMET-GEMs`). In this repository the text under review is `gem-library/` until that folder is moved. **Precedence:** core floor protections outrank the user's current word, which outranks active GEMs by priority. A GEM may change a modifiable default (voice, pace, how much is explained) only with the user's consent when it is activated (the 2026-09-11 decision, kept for those defaults). **Floor protection:** core floor protections are non-removable. No GEM may weaken them. A GEM may add depth that complements them. Neurodivergent engagement lives in the bundled Neurendipity GEM (`neurendipity`), which is off unless the user asks for it. The list of GEMs installed on this server, active or not, is part of `emet_initialize` and of what a bot is shown at startup. Only the user and the user's bots change the GEM standard. Anyone may author a GEM that follows it. A GEM that does not ship inside an EMET release loads only after the library's security gate and the user's acceptance. The socket enforces that (commitment 5). **Client execution, a carve-out from commitment 1 (2026-10-16):** EMET verifies the record, not the computation. Client-executed RUNE results are recorded as attested by the client; they are replayable from recorded inputs, not re-executed by EMET. The socket does not run RUNE code. | `src/socket.js`, `docs/gem/README.md`, `gem-library/SPEC.md` |
62
62
 
63
63
  ## §5 HIERARCHY
64
64
 
package/README.md CHANGED
@@ -26,7 +26,7 @@ See also: [CHANGELOG](CHANGELOG.md) · [CONTRIBUTING](CONTRIBUTING.md) · [SECUR
26
26
  - **Per-client attribution and approvals.** Every write is attributed to the client that made it. A new client is read-limited until it is approved. The approval is recorded.
27
27
  - **Error codes and problem reports.** Every error carries a stable `EMET-<AREA>-<NNN>` code. An operational error log keeps 10,000 entries or 90 days, plus daily summaries. The owner-only `emet_error_report` returns the report and an email draft that you send yourself. See [Reporting a problem](#reporting-a-problem).
28
28
  - **verify-emet and the feature map.** `npm run verify` runs `scripts/verify-emet.mjs` from a checkout. It starts EMET in a temporary directory on the in-memory test database, with no `.env`, and drives every registered tool. A tool that needs a service a plain install does not have is reported as a gap. A run whose only problems are gaps exits 3. A failed tool exits 1. The map is [docs/features/README.md](docs/features/README.md).
29
- - **MIT.** Version 0.3.4. EMET is still 0.x: stored document shapes may change before 1.0. Pin a version if you depend on them.
29
+ - **MIT.** Version 0.3.5. EMET is still 0.x: stored document shapes may change before 1.0. Pin a version if you depend on them.
30
30
 
31
31
  The store has one owner, and other people can join only through the optional Guest
32
32
  (read-only) and Member (read and write) access, both off by default.
@@ -693,7 +693,7 @@ are in [`docs/GUARDRAILS-AND-MONORAILS.md`](docs/GUARDRAILS-AND-MONORAILS.md).
693
693
 
694
694
  ## Tools
695
695
 
696
- Thirty-four tools are registered with sub-keys off. With `EMET_SUBKEYS=1`, four more (`emet_subkey_request`, `emet_subkey_claim`, `emet_subkey_revoke`, `emet_subkey_end_session`) and the `subkey` and `session_handle` arguments. The names below are every tool the registry registers, both sets together.
696
+ Thirty-eight tools are registered with sub-keys off. With `EMET_SUBKEYS=1`, four more (`emet_subkey_request`, `emet_subkey_claim`, `emet_subkey_revoke`, `emet_subkey_end_session`) and the `subkey` and `session_handle` arguments. The names below are every tool the registry registers, both sets together.
697
697
 
698
698
  <!-- emet-tools -->
699
699
  ```
@@ -786,7 +786,7 @@ at session *start*, which is the only moment early enough to matter.
786
786
 
787
787
  Every tool declares MCP annotations — `readOnlyHint`, `destructiveHint`, `idempotentHint`,
788
788
  `openWorldHint` — in one table in `src/annotations.js`, which is also the complete statement of
789
- what EMET does to a store. **15 of the 34 tools cannot modify anything**; four can replace the
789
+ what EMET does to a store. **15 of the 38 tools cannot modify anything**; five can replace the
790
790
  visible content of a document; `openWorldHint` is false everywhere. The tools reach this
791
791
  server's own database and nothing else: no filesystem and no shell. The sign-in server fetches
792
792
  a client's metadata document, and only from a public address it has already checked.
@@ -803,7 +803,7 @@ enforcement: what is actually auto-approved is a host-side setting. See
803
803
 
804
804
  `emet_error_report` is owner-only and read-only. It reads the operational error log and returns the full report, a `mailto:` draft, and a structured email `{to, subject, body_text, short_id, version}`. EMET does not send mail and does not open a network connection for this tool.
805
805
 
806
- Read the report first. The draft is addressed to `EMET_REPORT_EMAIL`. When that variable is unset, the address is `dreamforgestudio@mail.grokbot.com`, the project's report inbox. Set it to your own address to keep reports in house. Set it to an empty string, or to anything other than one plain address, and the tool returns the report and no email.
806
+ Read the report first. The draft is addressed to `EMET_REPORT_EMAIL`. When that variable is unset, the address is `dreamforgestudio@mail.grokbot.com`, the address in `src/error-report.js`. Set it to your own address to keep reports in house. Set it to an empty string, or to anything other than one plain address, and the tool returns the report and no email.
807
807
 
808
808
  A calling assistant that has its own email address may pass that structured email to its own email tool. The calling assistant may send this report only after showing the report to its user and getting their OK. EMET will not send it. The code table is [docs/ERROR-CODES.md](docs/ERROR-CODES.md), and the behavior is written up in [docs/ERROR-CODES-SPEC.md](docs/ERROR-CODES-SPEC.md).
809
809
 
@@ -894,9 +894,11 @@ Honest list, because the point of this project is that it behaves predictably:
894
894
  - `save_transcript`'s description does not state that it stores content verbatim; the
895
895
  implementation does.
896
896
  - No export / import / restore-and-compare yet.
897
- - The document store is not prefixed, so one database holds one instance's identity. Run
898
- separate databases rather than separate prefixes if you want separate memories. One
899
- collaborative project is one instance (one database, one deploy, one passphrase). See
897
+ - These collections are not prefixed: `documents`, `documents_history`, `transcripts`,
898
+ `exchanges`, `persons`, `invites`, `close_attempts`, `error_log`, `error_log_summary`,
899
+ and `_emet_verify`. One database holds one instance. Run separate databases rather than
900
+ separate prefixes if you want separate memories. One collaborative project is one
901
+ instance (one database, one deploy, one passphrase). See
900
902
  [docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md).
901
903
  - Dynamic Client Registration is still served beside Client ID Metadata Documents; the MCP
902
904
  specification's deprecation window closes around 2027-07. It is scheduled to come off on
package/docs/DEPLOY.md CHANGED
@@ -13,6 +13,18 @@ scoped user, and Atlas Network Access set to `0.0.0.0/0` — a hosted platform's
13
13
  dynamic, so it cannot be allowlisted. Security rests on the scoped user plus the OAuth
14
14
  passphrase; both are required.
15
15
 
16
+ ## Upgrading to 0.3.5
17
+
18
+ 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, and a chooser decision.
19
+
20
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
21
+
22
+ ## Upgrading to 0.3.4
23
+
24
+ 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. 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.
25
+
26
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
27
+
16
28
  ## Upgrading to 0.3.2
17
29
 
18
30
  0.3.2 adds door grants, the owner chooser, household rotation, and writer approval. Records already stored stay. After the deploy, reconnect each host so it loads the staged-write tools. The owner approves a new writer on `/owner/chooser`. An AI does not grant a writer. When `EMET_SUBKEYS=1`, a bot that shares the owner login uses its own key, `emet_session_open` returns `session_handle` once, and every later write in that session passes `session_handle`. A missing or different handle is refused, and nothing is written.
@@ -59,12 +71,38 @@ Atlas UI for the new privilege: Database Access → Custom Roles → edit the ro
59
71
  | `PUBLIC_URL` | yes | The public **https** base URL. This is the OAuth issuer and must match the deployed URL exactly. |
60
72
  | `EMET_OAUTH_PASSPHRASE` | yes | Typed once per device to authorize it. Make it strong — it is the only thing between the internet and your memory. |
61
73
  | `EMET_SOURCE_TAG` | optional | Default tag for a write that passes no `source`. Leave it unset on a server several hosts share (see below); set it only when one host uses this deployment. |
62
- | `EMET_SUBKEYS` | when more than one bot shares the owner login | `1` turns on delegated client sub-keys. On this kind of host, set it in the platform's variables. Setup refuses to write a pepper into the container `.env`. Restart or redeploy so the tools and `/owner/approvals` appear together. See [SUBKEYS.md](SUBKEYS.md). |
74
+ | `EMET_SUBKEYS` | when more than one bot shares the owner login | `1` turns on delegated client sub-keys. On this kind of host, set it in the platform's variables. Setup refuses to write a pepper into the container `.env`. Restart or redeploy so the tools and `/owner/chooser` appear together. See [SUBKEYS.md](SUBKEYS.md). |
63
75
  | `EMET_SUBKEY_PEPPER` | with that flag | Server secret, at least 32 bytes, generated by the owner on a hosted deploy (`openssl rand -hex 32`). Not stored in the database. |
64
76
  | `EMET_SUBKEY_PEPPER_VERSION` | with that flag | `1` until the pepper is rotated. Set it with the other two, then redeploy. |
65
77
  | `EMET_TIMEZONE` | optional | IANA time zone that session ids are dated in, e.g. `America/Chicago`. Default `America/New_York`. An unknown name falls back to the default and `emet_session_open` says so. |
66
78
  | `EMET_CLOSE_GRACE_MINUTES` | optional | Minutes after a complete close in which a session still takes its one closing exchange (the reply sent after the close). Default `5`; `0` turns the window off; at most `60` (a larger value is capped at 60). A negative or non-numeric value is not used: the server logs a warning and uses `5`. |
67
79
  | `EMET_GAP_BASELINE` | optional | ISO date (or Unix seconds) from which the record is held to the current rules. The startup line then reports gaps since that date beside the lifetime figure. |
80
+ | `EMET_SOURCE_TAGS` | optional | Comma-separated registered tags. Unset accepts any tag and turns the bot guards off. |
81
+ | `EMET_SIGNING_KEY` | optional | HMAC key for signed digests. Unset saves entries unsigned. |
82
+ | `EMET_INVITES` | optional | `1` turns guest codes on. Unset leaves that door shut. |
83
+ | `EMET_MEMBER_ACCESS` | optional | `1` turns member codes on. Unset leaves that door shut. |
84
+ | `EMET_STRICT_LOGIN_TAG` | optional | `1` makes a login's bound tag final. Off unless set to `1`. |
85
+ | `EMET_CIMD` | optional | Client ID Metadata Documents stay on unless this is `0`. |
86
+ | `EMET_CLAIMED_TAG_KILL_DATE` | optional | `YYYY-MM-DD` in UTC. Unset, or a value that is not that shape, uses `2026-12-15`. On that day and after, an HTTP write whose source is only a caller claim and whose door has no grant is refused (`EMET-AUTH-040`). Before that day the write is kept and the receipt warns. |
87
+ | `EMET_DEEP_LINK_TTL_MINUTES` | optional | Lifetime of a refusal link, in minutes. Default 15. A whole number from 1 to 60 replaces it. Any other value leaves 15. Opening the link grants nothing. |
88
+ | `EMET_RESTORE_TAGS` | optional | Comma-separated tags allowed to `restore_doc`. Unset uses `EMET_SOURCE_TAG`. If both are unset, no tag can restore. |
89
+ | `EMET_COS_TAG` | optional | Chief-of-staff tag that may review new clients. Unset: the owner reviews them. |
90
+ | `EMET_ACTIVE_GEMS` | optional | Comma-separated GEM ids to turn on. Unset leaves a bundled GEM off unless its manifest says `defaultOn`. |
91
+ | `EMET_SUBKEY_PEPPER_PREV` | optional | Previous pepper, still accepted during rotation. |
92
+ | `EMET_SUBKEY_PEPPER_PREV_VERSION` | optional | Version number of that previous pepper. |
93
+ | `EMET_SUBKEY_TTL_DAYS` | optional | Key lifetime in days. Default 30, at most 90. |
94
+ | `EMET_SUBKEY_GRACE_MINUTES` | optional | How long a replaced key stays valid. Default 10. `0` revokes it at once. |
95
+ | `EMET_SUBKEY_FAIL_MAX` | optional | Failed presentations before lockout. Default 5. |
96
+ | `EMET_SUBKEY_FAIL_WINDOW_MS` | optional | How long a failed presentation counts, in milliseconds. Default 900000. A value below 1000 is ignored. |
97
+ | `EMET_AUDIT_LOG` | optional | Path for the audit log. Unset leaves it off. |
98
+ | `EMET_REPORT_EMAIL` | optional | Address for the error-report draft. Unset uses `dreamforgestudio@mail.grokbot.com`. An empty string returns the report and no email. |
99
+ | `EMET_HANDOFF_DOC` | optional | Handoff document id. Default `HANDOFF.md`. |
100
+ | `EMET_STATE_DOC` | optional | Board document id. Default `STATE.md`. |
101
+ | `EMET_INSTALL_DOC` | optional | Install-notes document id. Default `bootstrap/INSTALL.md`. |
102
+ | `EMET_CHARACTER_DOC` | optional | Character document. Unset tries `bootstrap/CHARACTER.md`, then `bootstrap/SOUL.md`, then `bootstrap/PERSONALITY.md`. |
103
+ | `EMET_RECORD_DOCS` | optional | Extra record document ids, comma-separated. |
104
+ | `EMET_TEMPLATE_MAP` | optional | Extra `id=template` pairs for `validate_doc`. An entry that would change a built-in mapping is ignored. |
105
+ | `EMET_READ_DOC_PAGE` | optional | `read_doc` page limit in bytes as the host receives it. Default 18000. |
68
106
  | `PORT` | auto | Injected by the platform. |
69
107
  | `TRUST_PROXY` | not read | The server trusts exactly one proxy hop (Railway's edge). TRUST_PROXY is not read. The `/mcp` body limit is 256kb. |
70
108
 
@@ -72,7 +110,7 @@ Atlas UI for the new privilege: Database Access → Custom Roles → edit the ro
72
110
 
73
111
  Read this before you deploy the release that follows 0.2.2. It does not change a version number. It is the list of settings and client habits that will start failing if you leave them as they were.
74
112
 
75
- - **`EMET_SOURCE_TAGS` must list every real host tag**, as an exact member. Tags named in this repository's example env, docs, and live-tag checks are: `cli`, `mobile`, `desktop-cowork`, `cowork-cloud`, `grok-project`, `hub-bot` (the hub; do not also list it in `EMET_RECORD_DOCS`), `reviewer-bot`, `tester-bot`, `memory-bot`, `intake-bot`, and `research-bot`. Your install may use a shorter list. A tag that is not an exact member is refused, and the refusal does not print the list.
113
+ - **`EMET_SOURCE_TAGS` must list every real host tag**, as an exact member. Tags named in this repository's example env, docs, and live-tag checks are: `cli`, `mobile`, `desktop-cowork`, `cowork-cloud`, `hub-bot` (the hub; do not also list it in `EMET_RECORD_DOCS`), `reviewer-bot`, `tester-bot`, `memory-bot`, `intake-bot`, and `research-bot`. Your install may use a shorter list. A tag that is not an exact member is refused, and the refusal does not print the list.
76
114
  - When a new bot joins the roster, append its tag to the end of `EMET_SOURCE_TAGS` and keep every existing tag in order, before its first write. The standing rule, including `EMET_RECORD_DOCS` and the `/health` and `emet_status` check after the redeploy, is [BOTS.md](BOTS.md) §4.
77
115
  - **`EMET_STRICT_LOGIN_TAG=1`** (off by default) makes a login's bound tag final: a write that declares a different `source` is refused, and so are `emet_setup_complete` and `emet_initialize` with a mismatched tag. Leave it off while bots share one login, because with it on every bot except the login's own would be refused. Turn it on only once each bot has its own login, for example a Member Access code bound to its tag.
78
116
  - **A scheduled job that still sends a `cloud-scheduled-` prefix must switch to an exact registered tag.** `cloud-scheduled-intake` was retired on 2026-10-02. A prefix is not a tag. The weekly intake runs under `intake-bot`.
@@ -197,16 +235,11 @@ guards, so it can still write the main records and any bot's folder. To fence a
197
235
  variables in one change. **With `EMET_SOURCE_TAGS` unset, both guards are opt-in and off:** any
198
236
  caller can write the main records and every bot folder, so set the registry on any shared install.
199
237
 
200
- **Legacy `CASCADE_` names.** Only the settings read through `setting()` in `src/env.js` also accept
201
- the legacy `CASCADE_...` name as a deprecated fallback (the `EMET_` name wins when both are set):
202
- `EMET_SOURCE_TAG`, `EMET_SOURCE_TAGS`, `EMET_OAUTH_PASSPHRASE`, `EMET_AUDIT_LOG`, `EMET_HANDOFF_DOC`,
203
- `EMET_STATE_DOC`, `EMET_INSTALL_DOC`, `EMET_CHARACTER_DOC`, `EMET_TEMPLATE_MAP`, `EMET_RECORD_DOCS`,
204
- `EMET_READ_DOC_PAGE`, `EMET_SIGNING_KEY`, `EMET_GAP_BASELINE`, `EMET_CIMD`, `EMET_INVITES`,
205
- `EMET_TIMEZONE`, `EMET_CLOSE_GRACE_MINUTES` and `EMET_ACTIVE_GEMS`. These read `process.env` directly, so **only the
206
- `EMET_` name works** and a `CASCADE_` name is ignored: `EMET_COLLECTION_PREFIX`,
207
- `EMET_VECTOR_INDEX`, `EMET_CORPUS_INDEX`, `EMET_CORPORA`, `EMET_CORPUS_COLLECTION`,
208
- `EMET_REQUEST_LOG` and `EMET_CRASH_LOG`. (`MONGODB_URI`, `MONGODB_DB`, `PUBLIC_URL`, `PORT`, `HOST`,
209
- `LOG_LEVEL`, `LOG_FORMAT` and `DEBUG` have no prefix. `TRUST_PROXY` is not read: the server trusts exactly one proxy hop (Railway's edge).) Use the `EMET_` names.
238
+ **Legacy `CASCADE_` names.** A setting read through `setting()` also accepts the legacy `CASCADE_` name. The `EMET_` name wins when both are set. The complete list is:
239
+ `EMET_ACTIVE_GEMS`, `EMET_AUDIT_LOG`, `EMET_CHARACTER_DOC`, `EMET_CIMD`, `EMET_CLAIMED_TAG_KILL_DATE`, `EMET_CLOSE_GRACE_MINUTES`, `EMET_COS_TAG`, `EMET_DEEP_LINK_TTL_MINUTES`, `EMET_GAP_BASELINE`, `EMET_HANDOFF_DOC`, `EMET_INSTALL_DOC`, `EMET_INVITES`, `EMET_MEMBER_ACCESS`, `EMET_OAUTH_PASSPHRASE`, `EMET_READ_DOC_PAGE`, `EMET_RECORD_DOCS`, `EMET_RESTORE_TAGS`, `EMET_SIGNING_KEY`, `EMET_SOURCE_TAG`, `EMET_SOURCE_TAGS`, `EMET_STATE_DOC`, `EMET_STRICT_LOGIN_TAG`, `EMET_SUBKEY_FAIL_MAX`, `EMET_SUBKEY_FAIL_WINDOW_MS`, `EMET_SUBKEY_GRACE_MINUTES`, `EMET_SUBKEY_PEPPER`, `EMET_SUBKEY_PEPPER_PREV`, `EMET_SUBKEY_PEPPER_PREV_VERSION`, `EMET_SUBKEY_PEPPER_VERSION`, `EMET_SUBKEY_TTL_DAYS`, `EMET_SUBKEYS`, `EMET_TEMPLATE_MAP`, `EMET_TIMEZONE`.
240
+ These read `process.env` directly, so a `CASCADE_` name is ignored. The complete list is:
241
+ `EMET_COLLECTION_PREFIX`, `EMET_CORPORA`, `EMET_CORPUS_COLLECTION`, `EMET_CORPUS_INDEX`, `EMET_CRASH_LOG`, `EMET_DROP_LIST_TIMEOUT_MS`, `EMET_HTTP_LISTEN`, `EMET_INIT_PAGE_BYTES`, `EMET_REPORT_EMAIL`, `EMET_REQUEST_LOG`, `EMET_VECTOR_INDEX`.
242
+ (`MONGODB_URI`, `MONGODB_DB`, `PUBLIC_URL`, `PORT`, `HOST`, `LOG_LEVEL`, `LOG_FORMAT` and `DEBUG` have no prefix. `TRUST_PROXY` is not read: the server trusts exactly one proxy hop (Railway's edge).) Use the `EMET_` names.
210
243
 
211
244
  **The two-pass deploy is not optional.** `PUBLIC_URL` is the OAuth issuer; until it matches
212
245
  the real URL, authorization fails in ways that look like a client problem.
@@ -30,7 +30,7 @@ The result is, in order:
30
30
  2. A `mailto:` draft, when an address is set.
31
31
  3. A structured email `{to, subject, body_text, short_id, version}`, plus the mailto link, so a calling assistant can pass it to its own email tool.
32
32
 
33
- `to` is `EMET_REPORT_EMAIL`. When the variable is unset, the address is `dreamforgestudio@mail.hubbot.com`. An empty string means no email: the tool returns the report and `email: null`. Any other value is treated the same way unless it is one plain address: exactly one `@`, a local part of letters, digits, and `. _ + -` that does not start or end with a dot and does not contain `..`, and a domain of at least two labels separated by dots. A label is letters, digits, and `-`, does not start or end with `-`, and is not empty.
33
+ `to` is `EMET_REPORT_EMAIL`. When the variable is unset, the address is `dreamforgestudio@mail.grokbot.com`. An empty string means no email: the tool returns the report and `email: null`. Any other value is treated the same way unless it is one plain address: exactly one `@`, a local part of letters, digits, and `. _ + -` that does not start or end with a dot and does not contain `..`, and a domain of at least two labels separated by dots. A label is letters, digits, and `-`, does not start or end with `-`, and is not empty.
34
34
 
35
35
  The subject is `EMET error report <version> <6 hex characters>`. `body_text` is the full report shown above. The mailto body is that same text when it fits, and a shorter draft when it does not. The link is at most 1,800 characters. Totals stay when they fit. Recent lines are cut to the newest that fit, and the draft says so. The report in the tool output stays complete.
36
36
 
@@ -50,6 +50,7 @@ Internal codes are raised inside a check that catches them before a caller sees
50
50
  | EMET-AUTH-042 | A retired owl credential was refused | active |
51
51
  | EMET-AUTH-043 | A writer approval step was refused | active |
52
52
  | EMET-AUTH-044 | A bound login cannot stamp another tag | active |
53
+ | EMET-AUTH-045 | The previous bound-door spelling is refused for a new choice | active |
53
54
  | EMET-CFG-001 | Database name must be a plain name | active, internal |
54
55
  | EMET-CFG-002 | Collection prefix must be a plain name | active, internal |
55
56
  | EMET-CFG-004 | Hosted setup cannot turn sub-keys on from here | active |
package/docs/ROADMAP.md CHANGED
@@ -1,10 +1,10 @@
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-10 (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.
4
4
 
5
5
  ## Where things stand
6
6
 
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.
7
+ - **Live:** the public site and the npm package `@dreamforgestudiollc/emet` are published. 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 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
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
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
10
  - **The database** login runs under the least-privilege role `emetRecordKeeper`: it can insert and update, never remove the record.
@@ -37,7 +37,7 @@ Status as of 2026-10-11 (last full report: [status/2026-09-29-state-of-the-syste
37
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
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
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.
40
+ - PR 4 (shipped in 0.2.6): 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
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
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
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.)
@@ -47,13 +47,13 @@ Status as of 2026-10-11 (last full report: [status/2026-09-29-state-of-the-syste
47
47
  - **Organizational use.** Many private EMETs and a document gateway between them. Nothing built before a named customer.
48
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
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.
50
+ - **Compiled topic pages, pilot (2026-09-30).** Topic pages shipped in 0.3.0 as `emet_page`, `emet_pages`, and `emet_page_lint`: a view computed on each request, not a stored compiled page. The compiled-page pilot is still proposed. 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 (2026-09-30).** `emet_page_lint` shipped in 0.3.0 and flags a topic page. It does not edit. The scheduled semantic sweep is still proposed: a 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
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
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.
54
54
  - **Stranger install.** A clean-machine install by someone who has never seen EMET, to find first-run friction.
55
55
  - **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.
56
+ - **Public landing page and npm package (live).** The site in `site/` is published to GitHub Pages, and `@dreamforgestudiollc/emet` is on npm.
57
57
 
58
58
  ## Design commitments these must keep
59
59
 
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,20 @@ 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.5
255
+
256
+ 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, and a chooser decision.
257
+
258
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
259
+
260
+ ## Upgrading to 0.3.4
261
+
262
+ 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.
263
+
264
+ 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.
265
+
266
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
267
+
251
268
  ## Upgrading to 0.3.2
252
269
 
253
270
  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.5",
4
+ "description": "ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control memory for AI agents. Nothing is deleted. EMET 0.3.5 — 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",
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.5",
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.5",
26
26
  "transport": {
27
27
  "type": "stdio"
28
28
  },
@@ -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
  *
@@ -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') {
package/src/chooser.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * Pending sub-keys from the retired /owner/approvals path are listed here.
10
10
  * Their records stay in the sub-key store.
11
11
  *
12
- * Prepared writer requests are listed here too. Master Hub prepares.
12
+ * Prepared writer requests are listed here too. The hub login prepares.
13
13
  * The server validates. This owner session decides. The request row stays.
14
14
  */
15
15
 
@@ -25,6 +25,7 @@ import {
25
25
  esc, sendHtml, loginForm, ownerPageActor, ownerMayGrant, mountOwnerLogin, readCookie, createOwnerGate
26
26
  } from './owner-session.js';
27
27
  import { rotationForms } from './rotate.js';
28
+ import { boundHostListingAfterWriterIssue, isBoundHostTag, isLegacyBoundHostSpelling, CLAIM_TAG } from './bound-door.js';
28
29
 
29
30
  const CHOOSER_COOKIE = 'emet_chooser';
30
31
  const REASON_MAX = 500;
@@ -83,7 +84,7 @@ function writerSection(session, writers) {
83
84
  return `<tr><td>${esc(row.claimed_tag)}</td><td>${esc(row.door)}</td><td>${esc(row.status)}</td><td>${esc(row.preparer)}</td><td>${esc(row.validator)}</td><td>${esc(row.correlation_id)}</td><td>${buttons}</td></tr>`;
84
85
  }).join('\n');
85
86
  return `<h2>Writer requests</h2>
86
- <p>Master Hub prepares. The server validates. Only this owner session decides.</p>
87
+ <p>The hub login prepares. The server validates. Only this owner session decides.</p>
87
88
  <table><thead><tr><th>Tag</th><th>Door</th><th>Status</th><th>Preparer</th><th>Validator</th><th>Correlation</th><th></th></tr></thead><tbody>${body}</tbody></table>`;
88
89
  }
89
90
 
@@ -362,6 +363,11 @@ export function mountChooser(app, options = {}) {
362
363
  sendHtml(res, 400, '<p>A tag is required for member or guest. Nothing was granted.</p>', 'EMET chooser');
363
364
  return;
364
365
  }
366
+ if (isLegacyBoundHostSpelling(tag)) {
367
+ res.locals.reason = 'legacy_bound_tag';
368
+ sendHtml(res, 400, '<p>use bound-host (EMET-AUTH-045). Nothing was granted.</p>', 'EMET chooser');
369
+ return;
370
+ }
365
371
  let db = null;
366
372
  try { db = dbOf() || null; } catch { db = null; }
367
373
  const issued = await issueDoor(db, decision, tag === 'unknown' ? 'owner' : tag, personId);
@@ -527,16 +533,17 @@ export function mountChooser(app, options = {}) {
527
533
  const bits = [`Recorded ${decision} for ${recorded.claimed_tag}.`];
528
534
  if (issued.note) bits.push(issued.note);
529
535
  if (issued.invite && issued.invite.code) bits.push(`Invite code, shown once: ${issued.invite.code}`);
530
- if (issued.issued && recorded.claimed_tag === 'grok-project') {
531
- let sophiaNote = 'The BOUND door listing was not written. The invite code above is still the door.';
536
+ // A request already stored under the previous spelling still lists the door.
537
+ // prepareWriterRequest refuses that spelling when it is newly chosen.
538
+ if (issued.issued && isBoundHostTag(recorded.claimed_tag)) {
539
+ let boundHostNote = 'The BOUND door listing was not written. The invite code above is still the door.';
532
540
  try {
533
- const { sophiaListingAfterWriterIssue } = await import('./bound-door.js');
534
- const listing = await sophiaListingAfterWriterIssue({
541
+ const listing = await boundHostListingAfterWriterIssue({
535
542
  recorded, issued, deps: depsOf(), by: personId, now: new Date(now())
536
543
  });
537
- if (listing.written) sophiaNote = 'Listed grok-project as its own door.';
544
+ if (listing.written) boundHostNote = `Listed ${CLAIM_TAG} as its own door.`;
538
545
  } catch { /* the invite still stands */ }
539
- bits.push(sophiaNote);
546
+ bits.push(boundHostNote);
540
547
  }
541
548
  await render(req, res, bits.join(' '));
542
549
  }
@@ -9,7 +9,7 @@
9
9
  * the write is kept and the receipt warns. On that day and after, the write
10
10
  * is refused. Unset uses PROPOSED_CLAIMED_TAG_KILL_DATE.
11
11
  *
12
- * The traffic counter is this process. Railway EMET is one long-lived process.
12
+ * The traffic counter is this process. A hosted deployment is one long-lived process.
13
13
  * It is not a backfill of older rows.
14
14
  */
15
15
 
package/src/dispatch.js CHANGED
@@ -33,7 +33,7 @@ import {
33
33
  resolvedSourceTag,
34
34
  TOOLS
35
35
  } from './tools.js';
36
- import { refuseSophiaDoor, sophiaActor } from './bound-door.js';
36
+ import { refuseBoundHostDoor, boundHostActor } from './bound-door.js';
37
37
  import { beginStagedDoc, appendStagedChunk, commitStagedDoc, abortStagedDoc } from './staged-write.js';
38
38
  import { reserveToolNames } from './rune-registry.js';
39
39
  import { applyCheckpoint, checkpointOnError, checkpointStatus } from './checkpoint.js';
@@ -59,7 +59,7 @@ export function sourceOf(args) {
59
59
  // Stdio still reads the argument, and requireRegisteredSource checks the registry.
60
60
  const caller = args.source ?? args.updated_by ?? args.retired_by ?? args.accepted_by ?? args.channel ?? null;
61
61
  const decision = resolvedSourceTag(caller);
62
- if (decision.from === 'bound-door') refuseSophiaDoor(sophiaActor());
62
+ if (decision.from === 'bound-door') refuseBoundHostDoor(boundHostActor());
63
63
  return decision.tag;
64
64
  }
65
65
 
@@ -79,6 +79,7 @@ export const ERROR_CODES = Object.freeze({
79
79
  'EMET-AUTH-042': Object.freeze({ area: 'AUTH', summary: "A retired owl credential was refused", status: 'active', internal: false }),
80
80
  'EMET-AUTH-043': Object.freeze({ area: 'AUTH', summary: "A writer approval step was refused", status: 'active', internal: false }),
81
81
  'EMET-AUTH-044': Object.freeze({ area: 'AUTH', summary: "A bound login cannot stamp another tag", status: 'active', internal: false }),
82
+ 'EMET-AUTH-045': Object.freeze({ area: 'AUTH', summary: "The previous bound-door spelling is refused for a new choice", status: 'active', internal: false }),
82
83
  'EMET-CFG-001': Object.freeze({ area: 'CFG', summary: "Database name must be a plain name", status: 'active', internal: true }),
83
84
  'EMET-CFG-002': Object.freeze({ area: 'CFG', summary: "Collection prefix must be a plain name", status: 'active', internal: true }),
84
85
  'EMET-CFG-004': Object.freeze({ area: 'CFG', summary: "Hosted setup cannot turn sub-keys on from here", status: 'active', internal: false }),
@@ -14,7 +14,7 @@ import { logClientId, logDoor, logGrantId } from './grants.js';
14
14
  import { queryErrorLog, logSessionId } from './error-log.js';
15
15
 
16
16
  export const SEND_INSTRUCTION = 'The calling assistant may send this report only after showing the report to its user and getting their OK.';
17
- export const DEFAULT_REPORT_EMAIL = 'dreamforgestudio@mail.hubbot.com';
17
+ export const DEFAULT_REPORT_EMAIL = 'dreamforgestudio@mail.grokbot.com';
18
18
  export const MAILTO_MAX = 1800;
19
19
 
20
20
  /**
package/src/grants.js CHANGED
@@ -146,7 +146,7 @@ export const OWL_ACCOUNT = 'user-EMET--owl';
146
146
  /**
147
147
  * R6. The owl MCP clone account was a second OAuth client used only to get a
148
148
  * different client_id. R6 retires it. the owner decides a new writer on the
149
- * chooser. Master Hub prepares. The server validates. Rows stay.
149
+ * chooser. The hub login prepares. The server validates. Rows stay.
150
150
  * delete_wiring stays false: the name and the historical grants are retained.
151
151
  */
152
152
  export const OWL_KILL = Object.freeze({
@@ -254,6 +254,11 @@ app.post('/oauth/approve', express.urlencoded({ extended: false }), async (req,
254
254
  res.locals.reason = 'bad_source';
255
255
  return res.status(400).end('source tag is not registered');
256
256
  }
257
+ const { isLegacyBoundHostSpelling } = await import('./bound-door.js');
258
+ if (isLegacyBoundHostSpelling(requested)) {
259
+ res.locals.reason = 'legacy_bound_tag';
260
+ return res.status(400).end('use bound-host (EMET-AUTH-045)');
261
+ }
257
262
  sourceTag = requested || null;
258
263
  }
259
264
  const { isOwlIdentity } = await import('./owl.js');
@@ -291,13 +296,17 @@ app.post('/oauth/approve', express.urlencoded({ extended: false }), async (req,
291
296
  issued_via: inviteSubject ? (inviteDoor === 'member' ? 'member' : 'invite') : 'owner',
292
297
  source_tag: sourceTag,
293
298
  });
294
- if (sourceTag === 'grok-project') {
295
- try {
296
- const { recordSophiaCredential } = await import('./bound-door.js');
297
- const door = inviteSubject ? (inviteDoor === 'member' ? 'member' : 'guest') : 'owner';
298
- await recordSophiaCredential(t.approvalsDeps, { client_id, door, grant_id: null, by: 'consent' });
299
- } catch {
300
- console.error('[emet] bound door listing was not written');
299
+ if (sourceTag) {
300
+ const { recordBoundHostCredential, CLAIM_TAG } = await import('./bound-door.js');
301
+ // A new consent lists the door only for the current tag. The previous
302
+ // spelling is refused above, before a token is issued.
303
+ if (sourceTag === CLAIM_TAG) {
304
+ try {
305
+ const door = inviteSubject ? (inviteDoor === 'member' ? 'member' : 'guest') : 'owner';
306
+ await recordBoundHostCredential(t.approvalsDeps, { client_id, door, grant_id: null, by: 'consent' });
307
+ } catch {
308
+ console.error('[emet] bound door listing was not written');
309
+ }
301
310
  }
302
311
  }
303
312
  const u = new URL(redirect_uri);
package/src/owl.js CHANGED
@@ -1,18 +1,17 @@
1
1
  /**
2
2
  * Owl MCP clone account (R6).
3
3
  *
4
- * The account `user-EMET--owl` was a second OAuth client so an approval
5
- * queued by one grant could be decided by another client_id. R6 retires
6
- * that role. the owner decides a new writer on /owner/chooser. Master Hub
7
- * prepares the request. The server validates it. This account does not
8
- * approve.
4
+ * A second OAuth client account (the owl clone) let an approval queued by
5
+ * one grant be decided by another client_id. R6 retires that role. The
6
+ * owner decides a new writer on /owner/chooser. The request is prepared.
7
+ * The server validates it. This account does not approve.
9
8
  *
10
9
  * ISO 9001 7.5.3 / ISO 13485 4.2.5: supersede, retire, retain. Rows are
11
10
  * not deleted. A startup check fails loudly (stderr and the owl
12
11
  * retirement metric; the process does not exit) when an owl grant is
13
12
  * active again. Rotate-all (R5) already revokes every grant; the invite step
14
13
  * skips this account so a rotation does not hand it a fresh code. This
15
- * module does not call Railway EMET and does not run a rotation.
14
+ * module does not call a hosted deployment and does not run a rotation.
16
15
  */
17
16
 
18
17
  import { COLLECTION_PREFIX } from './database.js';
@@ -20,7 +19,7 @@ import { assignCode, newCorrelationId } from './error-codes.js';
20
19
  import { OWL_ACCOUNT, doorFromIssuedVia, grantIdFromFamily, logClientId, logDoor, logGrantId } from './grants.js';
21
20
  import { InvalidGrantError, InvalidTokenError } from '@modelcontextprotocol/sdk/server/auth/errors.js';
22
21
 
23
- const POINTER = 'this owl MCP clone account was retired by R6. A new writer is prepared by Master Hub, validated on the server, and decided by the owner at /owner/chooser. This account cannot approve. Records are retained.';
22
+ const POINTER = 'this owl MCP clone account was retired by R6. A new writer is prepared by the hub login, validated on the server, and decided by the owner at /owner/chooser. This account cannot approve. Records are retained.';
24
23
  const MARKER_ID = 'owl-mcp-clone';
25
24
 
26
25
  const metric = {
@@ -29,7 +29,7 @@ function retired(req, res) {
29
29
 
30
30
  /**
31
31
  * @param {import('express').Express} app
32
- * @param {object} [_options] kept so the Railway EMET mount stays the same call.
32
+ * @param {object} [_options] kept so a hosted deployment mount stays the same call.
33
33
  */
34
34
  export function mountOwnerApprovals(app, _options = {}) {
35
35
  app.get('/owner/approvals', retired);
package/src/proof-run.js CHANGED
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Operational metric for this process, in the same family as the owl
5
5
  * retirement and rotate-all lines. The controlled record is the proof pack
6
- * under docs/proof/R7/ in the EMET-private repo. This module does not write
6
+ * under docs/proof/R7/ in the private operator repository. This module does not write
7
7
  * the memory store, does not mint a grant, and does not rotate credentials.
8
- * A fresh process reports not_run. Railway EMET therefore reports not_run
8
+ * A fresh process reports not_run. A hosted deployment therefore reports not_run
9
9
  * until a harness run is recorded in that process.
10
10
  *
11
11
  * ISO 9001 7.5.3 / ISO 13485 4.2.5: a later run does not delete an earlier
package/src/rotate.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * inside this generation or marked superseded. Fresh invites are new rows.
10
10
  * An old grant is never made live again.
11
11
  *
12
- * Railway EMET checks the generation on the next token request. This module
12
+ * A hosted deployment checks the generation on the next token request. This module
13
13
  * does not call a deploy target.
14
14
  */
15
15
 
package/src/setup.js CHANGED
@@ -1365,6 +1365,7 @@ export async function setupComplete(answers = {}, logger = null, options = {}) {
1365
1365
  // write the identity documents as the bot. The tag that would be written
1366
1366
  // (with its service-wide fallback) is checked too.
1367
1367
  const { isBotTag } = await import('./session-graph.js');
1368
+ const { isLegacyBoundHostSpelling } = await import('./bound-door.js');
1368
1369
  // ONE tag, used for this check and for every write below (setup's own
1369
1370
  // records name it), so the checked tag and the written tag cannot differ.
1370
1371
  const tag = String(answers.source_tag || options.source || setting('SOURCE_TAG') || 'setup').trim();
@@ -1376,6 +1377,9 @@ export async function setupComplete(answers = {}, logger = null, options = {}) {
1376
1377
  `First-time setup is the owner's: ${declared} is a bot tag. Stop and tell the user. Nothing was written.`
1377
1378
  , { code: 'EMET-CFG-009' });
1378
1379
  }
1380
+ if (declared && isLegacyBoundHostSpelling(declared)) {
1381
+ throw new ValidationError(field, 'use bound-host. Nothing was written.', { code: 'EMET-AUTH-045' });
1382
+ }
1379
1383
  }
1380
1384
  const missing = SETUP_INTERVIEW.filter(q => q.required && !String(answers[q.key] || '').trim())
1381
1385
  .map(q => q.key);
package/src/subkeys.js CHANGED
@@ -21,6 +21,8 @@ import {
21
21
  } from './attribution.js';
22
22
  import { isOwlIdentity } from './owl.js';
23
23
  import { isMasterBlasterActor } from './writer-approval.js';
24
+ import { isLegacyBoundHostSpelling } from './bound-door.js';
25
+ import { assignCode } from './error-codes.js';
24
26
  import { parseReceipts } from './session.js';
25
27
  import { storeFor, sweepFlagOffLiveSessions } from './subkey-store.js';
26
28
 
@@ -384,6 +386,7 @@ export async function requestSubkey(deps, actor, { tag } = {}, registry = [], no
384
386
  const list = registryOf(registry);
385
387
  const t = tagAllowed(tag, list);
386
388
  if (!t) throw refusal('emet_subkey_request: "tag" must be an exact member of EMET_SOURCE_TAGS. Nothing was changed.');
389
+ if (isLegacyBoundHostSpelling(t)) throw assignCode(refusal('emet_subkey_request: use bound-host. Nothing was changed.'), 'EMET-AUTH-045');
387
390
  const nonce = `${NONCE_PREFIX}${b64(32)}`;
388
391
  const key_id = hexId();
389
392
  let created = null;
@@ -432,7 +435,7 @@ export async function decideSubkeyIfPending(deps, actor, ownerId, { tag, decisio
432
435
  if (!(ownerOk || cosOk)) throw refusal(`emet_client_approve: only the owner${cosTag() ? ` or the chief of staff (${cosTag()})` : ''} may decide a sub-key. Nothing was changed.`);
433
436
  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.');
434
437
  if (decision === 'approve' && (cosOk || isMasterBlasterActor(actor)) && actor.sourceTag !== 'owner') {
435
- 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.');
438
+ 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.');
436
439
  }
437
440
  const why = typeof reason === 'string' ? reason.trim() : '';
438
441
  const channel = typeof via === 'string' ? via.trim() : '';
package/src/tools.js CHANGED
@@ -20,7 +20,7 @@ import { replacedByOf } from './setup.js';
20
20
  import { currentActor, rawActor, writerStamp, boundSourceTag, declaredAttribution, LOCAL_SUBJECT } from './persons.js';
21
21
  import { guardClaimedTag } from './claimed-tag.js';
22
22
  import { approvedTags, APPROVALS_DOC } from './attribution.js';
23
- import { refuseSophiaDoor, sophiaActor, sophiaCredentialOverrides, sophiaClaimOnSharedLogin, CLAIM_TAG } from './bound-door.js';
23
+ import { refuseBoundHostDoor, boundHostActor, boundHostCredentialOverrides, boundHostClaimOnSharedLogin, isBoundHostTag, isLegacyBoundHostSpelling, CLAIM_TAG } from './bound-door.js';
24
24
  import { sealAttestation, frozenAttestation } from './rune-dispatch.js';
25
25
 
26
26
  /** Approvals record io for attribution.js (server-kept doc, written as emet-server). */
@@ -558,7 +558,7 @@ export async function saveMemory(dbManager, content, layer = null, metadata = {}
558
558
  // stored (no bound tag) may use the caller's tag only when that tag is an
559
559
  // exact member of EMET_SOURCE_TAGS. The shared default is not applied there.
560
560
  const sourceDecision = resolvedSourceTag(validatedMetadata.source);
561
- if (sourceDecision.from === 'bound-door') refuseSophiaDoor(sophiaActor());
561
+ if (sourceDecision.from === 'bound-door') refuseBoundHostDoor(boundHostActor());
562
562
  if (sourceDecision.from === 'caller') {
563
563
  const defaultTag = setting('SOURCE_TAG');
564
564
  if (sourceDecision.tag) {
@@ -2850,9 +2850,9 @@ export function resolvedSourceTag(caller) {
2850
2850
  const bound = boundSourceTag();
2851
2851
  const tag = typeof caller === 'string' ? caller.trim() : '';
2852
2852
  if (bound === undefined) return { tag: tag || null, from: 'caller' };
2853
- const actor = sophiaActor();
2854
- if (sophiaCredentialOverrides(actor, tag)) {
2855
- const sub = actor.subkeySession === true && actor.subkeyTag === CLAIM_TAG;
2853
+ const actor = boundHostActor();
2854
+ if (boundHostCredentialOverrides(actor, tag)) {
2855
+ const sub = actor.subkeySession === true && isBoundHostTag(actor.subkeyTag);
2856
2856
  return {
2857
2857
  tag: CLAIM_TAG,
2858
2858
  from: sub ? 'subkey' : 'credential',
@@ -2860,7 +2860,7 @@ export function resolvedSourceTag(caller) {
2860
2860
  ...(sub && actor.subkeyId ? { key_id: actor.subkeyId } : {})
2861
2861
  };
2862
2862
  }
2863
- if (sophiaClaimOnSharedLogin(actor, tag)) return { tag: null, from: 'bound-door', login: bound || null };
2863
+ if (boundHostClaimOnSharedLogin(actor, tag)) return { tag: null, from: 'bound-door', login: bound || null };
2864
2864
  // Attribution v2: the per-request tag decided by attribution.preflight is the
2865
2865
  // stamp (declared, or generated for a login with none). Rights stay the
2866
2866
  // login's: see rightsTags().
@@ -2873,10 +2873,10 @@ export function resolvedSourceTag(caller) {
2873
2873
  return { tag: null, from: 'legacy' };
2874
2874
  }
2875
2875
 
2876
- /** A BOUND credential stamp replaces a forged Master Hub string. A door claim throws. */
2876
+ /** A BOUND credential stamp replaces a forged hub-login string. A door claim throws. */
2877
2877
  function stampedSource(decision, fallback) {
2878
- if (decision && decision.from === 'bound-door') refuseSophiaDoor(sophiaActor());
2879
- if (decision && (decision.from === 'credential' || (decision.from === 'subkey' && decision.tag === CLAIM_TAG))) return decision.tag;
2878
+ if (decision && decision.from === 'bound-door') refuseBoundHostDoor(boundHostActor());
2879
+ if (decision && (decision.from === 'credential' || (decision.from === 'subkey' && isBoundHostTag(decision.tag)))) return decision.tag;
2880
2880
  return fallback;
2881
2881
  }
2882
2882
 
@@ -3983,6 +3983,9 @@ export async function inviteCreate(dbManager, { display_name, scopes, days, sour
3983
3983
  if (registry.length && tag && !registry.includes(tag)) {
3984
3984
  throw new ValidationError('source', 'A guest invite source must be a registered tag. Nothing was created.', { code: 'EMET-AUTH-032' });
3985
3985
  }
3986
+ if (isLegacyBoundHostSpelling(tag)) {
3987
+ throw new ValidationError('source', 'use bound-host. Nothing was created.', { code: 'EMET-AUTH-045' });
3988
+ }
3986
3989
  const out = await createInvite(dbManager.db, {
3987
3990
  created_by: actor,
3988
3991
  display_name,
@@ -4021,6 +4024,9 @@ export async function memberAccessCreate(dbManager, { display_name, days, source
4021
4024
  if (registry.length && tag && !registry.includes(tag)) {
4022
4025
  throw new ValidationError('source', 'A member code source must be a registered tag. Nothing was created.', { code: 'EMET-AUTH-035' });
4023
4026
  }
4027
+ if (isLegacyBoundHostSpelling(tag)) {
4028
+ throw new ValidationError('source', 'use bound-host. Nothing was created.', { code: 'EMET-AUTH-045' });
4029
+ }
4024
4030
  const out = await createMemberAccess(dbManager.db, { created_by: actor, display_name, days: days || 14, source_tag: tag || null });
4025
4031
  logger?.info?.('EMET Member Access created', { display_name: out.display_name });
4026
4032
  return {
@@ -4597,7 +4603,7 @@ const TOOL_DEFINITIONS = [
4597
4603
  },
4598
4604
  {
4599
4605
  name: "emet_client_approve",
4600
- description: "Approve or deny a pending client tag, or prepare a new writer. decision prepare drafts a writer request: client, claimed tag, door (member or guest), reason, and correlation_id. Master Hub prepares that draft. The server validates it. Validation is a check and is not approval. Alex decides a new writer on /owner/chooser with the owner session. No AI grants a writer, including Master Hub and the retired owl account. The owner login may still approve or deny a pending client tag. Pending client tags are listed in emet_initialize and emet_status as client_approvals.",
4606
+ description: "Approve or deny a pending client tag, or prepare a new writer. decision prepare drafts a writer request: client, claimed tag, door (member or guest), reason, and correlation_id. The hub login prepares that draft. The server validates it. Validation is a check and is not approval. Alex decides a new writer on /owner/chooser with the owner session. No AI grants a writer, including the hub login and the retired owl account. The owner login may still approve or deny a pending client tag. Pending client tags are listed in emet_initialize and emet_status as client_approvals.",
4601
4607
  inputSchema: {
4602
4608
  type: "object",
4603
4609
  properties: {
package/src/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The server's version, in one place. tests/version.test.js keeps it equal to package.json. */
2
- export const EMET_VERSION = '0.3.4';
2
+ export const EMET_VERSION = '0.3.5';
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * Writer approval (R6a).
3
3
  *
4
- * Master Hub prepares a request: client, claimed tag, door, reason,
4
+ * The hub login prepares a request: client, claimed tag, door, reason,
5
5
  * correlation_id. The server validates that draft. Validation is a check.
6
6
  * It does not approve. the owner decides on /owner/chooser with the owner
7
- * passphrase session. No AI grants a writer, including Master Hub and
7
+ * passphrase session. No AI grants a writer, including the hub login and
8
8
  * the retired owl account.
9
9
  *
10
10
  * The validator that runs is the server. the owner can later name another
@@ -17,6 +17,8 @@ import crypto from 'node:crypto';
17
17
  import { COLLECTION_PREFIX } from './database.js';
18
18
  import { logClientId, logGrantId } from './grants.js';
19
19
  import { isOwlIdentity } from './owl.js';
20
+ import { isLegacyBoundHostSpelling } from './bound-door.js';
21
+ import { assignCode } from './error-codes.js';
20
22
 
21
23
  export const MB_TAG = 'hub-bot';
22
24
  export const SERVER_VALIDATOR = 'server';
@@ -68,7 +70,7 @@ export function writerApprovalMetric() {
68
70
  };
69
71
  }
70
72
 
71
- /** Login or sub-key for Master Hub. A declared tag is a claim, not this credential. */
73
+ /** Login or sub-key for the hub login. A declared tag is a claim, not this credential. */
72
74
  export function mbCredential(actor) {
73
75
  if (!actor || actor.transport !== 'http' || actor.authenticated !== true) return false;
74
76
  if (isOwlIdentity(actor)) return false;
@@ -80,7 +82,7 @@ export function mbCredential(actor) {
80
82
  return typeof tag === 'string' && tag.trim() === MB_TAG;
81
83
  }
82
84
 
83
- /** Master Hub, including a declared copy. Used to refuse approval, not to authorize preparation. */
85
+ /** The hub login, including a declared copy. Used to refuse approval, not to authorize preparation. */
84
86
  export function isMasterBlasterActor(actor) {
85
87
  if (!actor || typeof actor !== 'object') return false;
86
88
  return [actor.effectiveTag, actor.sourceTag, actor.declaredTag].some((tag) => typeof tag === 'string' && tag.trim() === MB_TAG);
@@ -164,14 +166,17 @@ export async function prepareWriterRequest(db, prefix = COLLECTION_PREFIX, actor
164
166
  throw refusal('emet_client_approve: the owl MCP clone account was retired by R6 and cannot prepare or approve. the owner decides a new writer on /owner/chooser. Nothing was changed.');
165
167
  }
166
168
  if (!mbCredential(actor)) {
167
- throw refusal('emet_client_approve: only Master Hub, on its own login or sub-key, prepares a writer request. A declared tag does not. Nothing was changed.');
169
+ throw refusal('emet_client_approve: only the hub login, on its own login or sub-key, prepares a writer request. A declared tag does not. Nothing was changed.');
168
170
  }
169
171
  if (fields.decision && fields.decision !== 'prepare') {
170
- throw refusal('emet_client_approve: Master Hub prepares a writer request and cannot approve it. the owner decides it on /owner/chooser. Nothing was changed.');
172
+ throw refusal('emet_client_approve: The hub login prepares a writer request and cannot approve it. the owner decides it on /owner/chooser. Nothing was changed.');
171
173
  }
172
174
  await hydrateWriterApprovals(db, prefix);
173
175
  const at = now instanceof Date ? now.toISOString() : new Date(now).toISOString();
174
176
  const checked = validateWriterDraft(fields, actor);
177
+ if (isLegacyBoundHostSpelling(checked.claimed_tag)) {
178
+ throw assignCode(refusal('emet_client_approve: use bound-host. Nothing was changed.'), 'EMET-AUTH-045');
179
+ }
175
180
  const prior = [...memory.values()].find((row) => row && row.correlation_id === checked.correlation_id && checked.correlation_id !== 'none');
176
181
  if (prior) {
177
182
  logStep({