@dreamforgestudiollc/emet 0.3.3 → 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 +18 -1
- package/CHANGELOG.md +30 -3
- package/CHARTER.md +2 -2
- package/README.md +24 -16
- package/docs/BOOTSTRAP.md +33 -36
- package/docs/DEPLOY.md +61 -14
- package/docs/ERROR-CODES-SPEC.md +1 -1
- package/docs/ERROR-CODES.md +1 -0
- package/docs/GUARDRAILS-AND-MONORAILS.md +2 -0
- package/docs/GUIDED-SETUP.md +4 -8
- package/docs/ROADMAP.md +7 -6
- package/docs/SECURITY-AT-SCALE.md +71 -0
- package/docs/SETUP.md +43 -14
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/attribution.js +8 -8
- package/src/bound-door.js +75 -42
- package/src/break-glass.js +7 -1
- package/src/chooser.js +15 -8
- package/src/claimed-tag.js +1 -1
- package/src/dispatch.js +2 -2
- package/src/error-codes.js +1 -0
- package/src/error-report.js +1 -1
- package/src/grants.js +1 -1
- package/src/http-remote.js +16 -7
- package/src/lessons-to-checks.js +29 -6
- package/src/owl.js +6 -7
- package/src/owner-approvals.js +1 -1
- package/src/proof-run.js +2 -2
- package/src/rotate.js +1 -1
- package/src/setup.js +4 -0
- package/src/subkeys.js +4 -1
- package/src/tools.js +74 -25
- package/src/version.js +1 -1
- package/src/writer-approval.js +11 -6
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
|
|
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,11 +7,38 @@ change before 1.0.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
-
Nothing is waiting above 0.3.
|
|
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.
|
|
25
|
+
|
|
26
|
+
## 0.3.4 - 2026-11-10
|
|
27
|
+
|
|
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.
|
|
29
|
+
|
|
30
|
+
### Added
|
|
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.
|
|
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
|
+
|
|
36
|
+
### Fixed
|
|
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.
|
|
11
38
|
|
|
12
39
|
## 0.3.3 - 2026-11-03
|
|
13
40
|
|
|
14
|
-
Listing text from public pull request #24, plus the public parts of private #97 and #98. Private #95 (session disposition) and #96 (the 0.3.2 public sync) are already in 0.3.2. Stored data shapes are unchanged.
|
|
41
|
+
Listing text from public pull request #24, plus the public parts of private #97 and #98. Private #95 (session disposition) and #96 (the 0.3.2 public sync) are already in 0.3.2. Stored data shapes are unchanged. 0.3.3 was published to npm on 2026-11-03. Filled disposition inventories stay in the private repository.
|
|
15
42
|
|
|
16
43
|
### Added
|
|
17
44
|
- Carry-forward close. `emet_session_close` takes `carry_forward` with `disposition_doc`, `disposition_version`, and `citations` when a later session already advanced HANDOFF or STATE. The owner door, or the credential that wrote the session, cites a current conforming session disposition (`CARRIED_FORWARD`, `SUPERSEDED_BY_LATER_SESSION`, or `ABANDONED_NO_TRANSCRIPT`) and those later versions. `RETAINED_OPEN_CRITICAL` stays open. A declared source is not authority. Transcripts stay. A refused call is not counted. A receipt close blocked only because a later session holds HANDOFF or STATE stays blocked and is not counted. From private #97. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
@@ -144,7 +171,7 @@ A board fix, a public website, and the first npm package, `@dreamforgestudiollc/
|
|
|
144
171
|
- A static website in `site/`, for search, and a GitHub Actions workflow that publishes that folder to GitHub Pages on pushes to `main`.
|
|
145
172
|
- `glama.json` at the repo root names `dreamforgestudiollc` as maintainer for the Glama directory listing.
|
|
146
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.
|
|
147
|
-
- 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-
|
|
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.
|
|
148
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.
|
|
149
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.
|
|
150
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** | **
|
|
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
|
@@ -10,7 +10,7 @@ EMET is an MCP (Model Context Protocol) memory server, persistent shared memory
|
|
|
10
10
|
|
|
11
11
|
**Website:** <https://dreamforgestudiollc.github.io/EMET/>
|
|
12
12
|
|
|
13
|
-
See also: [CHANGELOG](CHANGELOG.md) · [CONTRIBUTING](CONTRIBUTING.md) · [SECURITY](SECURITY.md) · [Charter](CHARTER.md) · [Feature map](docs/features/README.md) · [Development practices](docs/DEVELOPMENT-PRACTICES.md)
|
|
13
|
+
See also: [CHANGELOG](CHANGELOG.md) · [CONTRIBUTING](CONTRIBUTING.md) · [SECURITY](SECURITY.md) · [Charter](CHARTER.md) · [One instance per project](docs/SECURITY-AT-SCALE.md) · [Feature map](docs/features/README.md) · [Development practices](docs/DEVELOPMENT-PRACTICES.md)
|
|
14
14
|
|
|
15
15
|
## What it does
|
|
16
16
|
|
|
@@ -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.
|
|
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.
|
|
@@ -49,10 +49,6 @@ EMET is built for document control in environments that work under ISO 9001 and
|
|
|
49
49
|
- **Setup:** [docs/SETUP.md](docs/SETUP.md) — the manual walkthrough: MongoDB, both transports, and the first-run interview.
|
|
50
50
|
- **Deploy:** [docs/DEPLOY.md](docs/DEPLOY.md) — remote HTTP with OAuth, so a phone, a browser, or another vendor's agent reaches the same store.
|
|
51
51
|
|
|
52
|
-
> **npm lags the repo.** `npx -y @dreamforgestudiollc/emet` installs 0.3.2 until 0.3.3 is
|
|
53
|
-
> published. For 0.3.3, clone this repo and run `npm ci && npm start`, or deploy the
|
|
54
|
-
> repository itself.
|
|
55
|
-
|
|
56
52
|
> **Status: 0.x. The stored document shapes are not frozen yet.** Breaking changes to the
|
|
57
53
|
> schema may land before 1.0. Pin a version if you depend on it.
|
|
58
54
|
|
|
@@ -209,7 +205,12 @@ host known to read long results whole. Pass the `load_id` from those pages to
|
|
|
209
205
|
`emet_session_open`. An open with no `load_id`, with a page missing, or with a `load_id` the
|
|
210
206
|
server has no record of (one from before a restart, or 60 minutes past its last page) is
|
|
211
207
|
refused, and the reply says what to call. The page check runs on your own startup, and a
|
|
212
|
-
skipped page is refused before anything is written.
|
|
208
|
+
skipped page is refused before anything is written. After every reply, append that one
|
|
209
|
+
exchange. The first successful append must carry the measured machine line, or the words
|
|
210
|
+
`no local shell MCP`. A refused exchange 1 does not let a higher index open the transcript.
|
|
211
|
+
At the end, follow `session_close_protocol` and call `emet_session_close`. Say the session
|
|
212
|
+
is saved only when the state is `complete`. A skipped step is refused and nothing is written.
|
|
213
|
+
There is no off switch. See [docs/BOOTSTRAP.md](docs/BOOTSTRAP.md)
|
|
213
214
|
and [docs/BOTS.md](docs/BOTS.md).
|
|
214
215
|
|
|
215
216
|
**Set the source-tag list before more than one host or bot writes.** The guards that refuse
|
|
@@ -436,7 +437,7 @@ assistant learned survives unless it was written to the store, and the moment to
|
|
|
436
437
|
arrives without warning — a closed tab, a context limit, a phone call. So every session has
|
|
437
438
|
one word at the start and one at the end.
|
|
438
439
|
|
|
439
|
-
**Start: say "initialize".** Your assistant calls `emet_initialize`,
|
|
440
|
+
**Start: say "initialize".** Your assistant calls `emet_initialize`, fetches every startup page, opens the session with that startup's `load_id`, and returns who it is,
|
|
440
441
|
who you are, where things were left and the operating disciplines, and picks up from there.
|
|
441
442
|
Before it asks you anything, it names your items from the handoff and state documents: anything
|
|
442
443
|
left half-finished, what is dated in the next seven days, each open item you own with its next
|
|
@@ -447,11 +448,14 @@ you actually came to ask. A session that skips it is a session that answers from
|
|
|
447
448
|
and saves nothing.
|
|
448
449
|
|
|
449
450
|
**End: say "wrap up"** (or goodbye, or that you are opening a new session). Your assistant
|
|
450
|
-
|
|
451
|
-
|
|
451
|
+
appends each exchange as the session runs. The first successful append carries the measured
|
|
452
|
+
machine line, or the words `no local shell MCP`. It then follows `session_close_protocol`
|
|
453
|
+
(working documents, the episodic entry, the board, the transcript already appended, and the
|
|
454
|
+
handoff last) and calls `emet_session_close`, which checks that each one
|
|
452
455
|
actually landed and returns `state: "complete"`. **Wait for that word before you close the
|
|
453
456
|
window.** If it comes back anything else, something did not save, and the assistant will say
|
|
454
|
-
which.
|
|
457
|
+
which. A skipped step is refused. Nothing is written for that step. The next session cannot
|
|
458
|
+
see work that never landed.
|
|
455
459
|
|
|
456
460
|
Why both, every time: the layers are curated meaning and the transcript is the word-for-word
|
|
457
461
|
record; the next session reads the first and can reach into the second by timestamp. Close
|
|
@@ -689,7 +693,7 @@ are in [`docs/GUARDRAILS-AND-MONORAILS.md`](docs/GUARDRAILS-AND-MONORAILS.md).
|
|
|
689
693
|
|
|
690
694
|
## Tools
|
|
691
695
|
|
|
692
|
-
Thirty-
|
|
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.
|
|
693
697
|
|
|
694
698
|
<!-- emet-tools -->
|
|
695
699
|
```
|
|
@@ -782,7 +786,7 @@ at session *start*, which is the only moment early enough to matter.
|
|
|
782
786
|
|
|
783
787
|
Every tool declares MCP annotations — `readOnlyHint`, `destructiveHint`, `idempotentHint`,
|
|
784
788
|
`openWorldHint` — in one table in `src/annotations.js`, which is also the complete statement of
|
|
785
|
-
what EMET does to a store. **15 of the
|
|
789
|
+
what EMET does to a store. **15 of the 38 tools cannot modify anything**; five can replace the
|
|
786
790
|
visible content of a document; `openWorldHint` is false everywhere. The tools reach this
|
|
787
791
|
server's own database and nothing else: no filesystem and no shell. The sign-in server fetches
|
|
788
792
|
a client's metadata document, and only from a public address it has already checked.
|
|
@@ -799,7 +803,7 @@ enforcement: what is actually auto-approved is a host-side setting. See
|
|
|
799
803
|
|
|
800
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.
|
|
801
805
|
|
|
802
|
-
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
|
|
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.
|
|
803
807
|
|
|
804
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).
|
|
805
809
|
|
|
@@ -890,8 +894,12 @@ Honest list, because the point of this project is that it behaves predictably:
|
|
|
890
894
|
- `save_transcript`'s description does not state that it stores content verbatim; the
|
|
891
895
|
implementation does.
|
|
892
896
|
- No export / import / restore-and-compare yet.
|
|
893
|
-
-
|
|
894
|
-
|
|
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
|
|
902
|
+
[docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md).
|
|
895
903
|
- Dynamic Client Registration is still served beside Client ID Metadata Documents; the MCP
|
|
896
904
|
specification's deprecation window closes around 2027-07. It is scheduled to come off on
|
|
897
905
|
2027-06-01.
|
package/docs/BOOTSTRAP.md
CHANGED
|
@@ -32,44 +32,41 @@ Paste this into your project's custom instructions, system prompt, or equivalent
|
|
|
32
32
|
|
|
33
33
|
You have persistent memory through EMET.
|
|
34
34
|
|
|
35
|
-
Call `emet_initialize`
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
not
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
Before answering anything that might have prior context - a decision, a preference,
|
|
55
|
-
a configuration, a name, a past conversation - search memory first with `recall`,
|
|
56
|
-
`semantic_recall` or `query_layer`. Do not answer from what seems likely when the
|
|
57
|
-
store would have told you.
|
|
58
|
-
|
|
59
|
-
tools_in_force from initialize are calls, not reading. After every reply, append
|
|
60
|
-
that exchange to the transcript. Save as you go, not at the end: decisions with their
|
|
61
|
-
reasoning, problems solved, preferences stated, corrections made. Read every write
|
|
62
|
-
back before reporting it saved. Use all six layers - `emet_initialize` returns what belongs in each, and
|
|
63
|
-
routing everything into the two or three that feel obvious is how a layer goes
|
|
64
|
-
unused for a year without anyone noticing.
|
|
65
|
-
|
|
66
|
-
When the session ends - the user says goodbye or thanks you, asks to wrap up,
|
|
67
|
-
mentions restarting or opening a new session, or you are running out of room -
|
|
68
|
-
work through the `session_close_protocol` that `emet_initialize` returned, in its
|
|
69
|
-
order, then call `emet_session_close` to confirm it landed. Do not tell the user
|
|
70
|
-
the session is saved until it returns state "complete".
|
|
35
|
+
Call `emet_initialize` first, before anything else, at the start of every session, and whenever the user opens with "initialize", "start", "begin", or similar. It returns who you are, who you are serving, where things were left, and the operating disciplines.
|
|
36
|
+
|
|
37
|
+
Fetch every startup page it names. Each page gives the call for the next page. On a host that reads a long result whole, call it with page "all" instead. Keep `startup_page.load_id`.
|
|
38
|
+
|
|
39
|
+
Call `emet_session_open` with that `load_id`. An open with no `load_id`, with a page still unfetched, or with a `load_id` this process does not have, is refused. Nothing is opened.
|
|
40
|
+
|
|
41
|
+
Adopt identity, character, and floor. Do not recite those three back. Read HANDOFF and the board. Name the board in plain words: half-state, dated items, open items with the next action, and anything left undecided. Then name parked items, one line each, with what brings them back. Then the counts as a check. Then the tools actually present. Then a question. Never a question alone. Never letter-number codes.
|
|
42
|
+
|
|
43
|
+
If a local shell MCP is present, measure the computer name and that machine's clock before the host line. Put the raw return on the first transcript append. If none is present, do not invent the line. Say that system status and time were not measured because no local shell MCP is connected, and that adding one enables that function.
|
|
44
|
+
|
|
45
|
+
The first successful `emet_transcript_append` must carry that measured line, or the words `no local shell MCP`. The check is on the append that opens the transcript, or that becomes the lowest stored index, whatever `exchange_index` it uses. A refused exchange 1 does not let a higher index start the transcript. Nothing is written until the line is present.
|
|
46
|
+
|
|
47
|
+
Before answering anything that might have prior context, search memory first with `recall`, `semantic_recall`, or `query_layer`. Do not answer from what seems likely when the store would have told you.
|
|
48
|
+
|
|
49
|
+
`tools_in_force` from initialize are calls, not reading. After every reply, append that one exchange with `emet_transcript_append`. Pass `session_id` and `exchange` on every write. Follow `session_graph.next`. A governed write with no open session is refused, and nothing is written.
|
|
50
|
+
|
|
51
|
+
Save as you go, not at the end. Save decisions with their reasoning, problems solved, preferences stated, and corrections made. Read every write back before you report it saved. Use all six layers. `emet_initialize` returns what belongs in each. Routing everything into the two or three that feel obvious is how a layer goes unused for a year without anyone noticing.
|
|
52
|
+
|
|
53
|
+
When the session ends, the user says goodbye or thanks you, asks to wrap up, mentions restarting or opening a new session, or you are running out of room. Work through the `session_close_protocol` that `emet_initialize` returned, in its order, then call `emet_session_close`. Do not tell the user the session is saved until it returns state "complete".
|
|
71
54
|
```
|
|
72
55
|
|
|
56
|
+
## What a skipped step costs
|
|
57
|
+
|
|
58
|
+
The monorail is enforce only. `EMET_SESSION_GRAPH` is not read. There is no report mode and no off switch. A refusal happens before the tool runs, when the gate is on the session graph. Nothing is written. The reply says how to pass. The gates are in [GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md).
|
|
59
|
+
|
|
60
|
+
- Skip `emet_initialize`. You have no `load_id`. `emet_session_open` is refused.
|
|
61
|
+
- Skip a startup page. `emet_session_open` is refused. The gate is `startup_pages`.
|
|
62
|
+
- Skip `emet_session_open`. A governed write is refused. The gate is `no_session` or `not_open`.
|
|
63
|
+
- Skip an exchange. The next index is refused until that exchange is appended. The gate is `turn_skipped`.
|
|
64
|
+
- Open the transcript without the measured machine line, or without the words `no local shell MCP`. `emet_transcript_append` is refused with `EMET-MEM-018`. A higher `exchange_index` does not get past that check. A refused exchange 1 leaves the transcript empty, so the next index is still the first successful append. `save_transcript` does not run this check. Use `emet_transcript_append` when the host can append one exchange at a time.
|
|
65
|
+
- Write the handoff before the board, the episodic record, and the transcript. The write is refused. The gate is `handoff_early`.
|
|
66
|
+
- Call `emet_session_close` before those steps land. The result is not `complete`. Do not tell the user the session is saved. The next session cannot see work that was never written. `emet_gaps` counts the holes that did land.
|
|
67
|
+
|
|
68
|
+
A host that skips the track can still talk. The store does not keep the work. One project is one instance. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
|
|
69
|
+
|
|
73
70
|
That is the whole thing. The disciplines it alludes to arrive in full from
|
|
74
71
|
`emet_initialize`; repeating them here would create two copies to keep in agreement.
|
|
75
72
|
|
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/
|
|
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`, `
|
|
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.**
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
`
|
|
204
|
-
`
|
|
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.
|
|
@@ -262,6 +295,17 @@ URL `https://<host>/mcp` → connect → you are sent to a passphrase page → e
|
|
|
262
295
|
Then verify from that device: `emet_status` with `probe: true`, followed by a `recall` of something
|
|
263
296
|
you saved elsewhere. If the remote host sees what the laptop wrote, the deployment is real.
|
|
264
297
|
|
|
298
|
+
Paste the block from [BOOTSTRAP.md](BOOTSTRAP.md) into the project instructions before the first real session. The server enforces this order. There is no off switch.
|
|
299
|
+
|
|
300
|
+
1. `emet_initialize`, then every startup page, keeping `startup_page.load_id`.
|
|
301
|
+
2. `emet_session_open` with that `load_id`.
|
|
302
|
+
3. `emet_transcript_append` after every reply. The first successful append carries the measured machine line, or the words `no local shell MCP`. A higher index does not open the transcript without that line.
|
|
303
|
+
4. `session_close_protocol`, then `emet_session_close`. Say the session is saved only when the state is `complete`.
|
|
304
|
+
|
|
305
|
+
A skipped step is refused and nothing is written. The next session cannot see work that never landed. After a deploy or a restart, fetch the startup again. The page record lives in this one process for 60 minutes. See [GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md).
|
|
306
|
+
|
|
307
|
+
One project is one instance. A second project is a new database, a new deploy, and a new passphrase. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
|
|
308
|
+
|
|
265
309
|
## Notes
|
|
266
310
|
|
|
267
311
|
- **Release note: startup stage 1 (the ref 358 amendment).** Three behaviour changes take effect
|
|
@@ -284,5 +328,8 @@ you saved elsewhere. If the remote host sees what the laptop wrote, the deployme
|
|
|
284
328
|
host: phone, desktop, CLI, anything else. This is the last-mile step people forget.
|
|
285
329
|
- **Costs.** A small Atlas cluster plus a hobby-tier host runs in the low tens of dollars a
|
|
286
330
|
month. Both have free tiers adequate for a single user.
|
|
287
|
-
- **The passphrase is the whole perimeter.** There is no second factor.
|
|
288
|
-
|
|
331
|
+
- **The passphrase is the whole perimeter.** There is no second factor. Set a new
|
|
332
|
+
`EMET_OAUTH_PASSPHRASE` and redeploy to stop new owner sign-ins that use the old one.
|
|
333
|
+
Tokens already issued keep working until you revoke them. End every grant and every
|
|
334
|
+
sub-key from `/owner/break-glass` with the exact confirm `rotate-all`. Rows are
|
|
335
|
+
superseded, retired, and retained. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
|
package/docs/ERROR-CODES-SPEC.md
CHANGED
|
@@ -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.
|
|
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
|
|
package/docs/ERROR-CODES.md
CHANGED
|
@@ -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 |
|
|
@@ -56,6 +56,8 @@ Every governed write (`save_to_layer`, `revise_memory`, `write_doc`, `patch_doc`
|
|
|
56
56
|
| `startup_pages` | `emet_session_open` is called without a `load_id`; with a `load_id` this server has no record of (made up, not served by this process, expired 60 minutes after its last page, or from before a restart), since its pages cannot be checked; or while pages of that load were never fetched (never checked against another host's load) | pass `load_id` from your startup (`startup_page.load_id`, carried by every `emet_initialize` result: each page, `page: "all"`, a one-result startup and a store not set up yet); for a load with no record, call `emet_initialize {}`, fetch every page and open with the `load_id` it returns; for missing pages, the call comes first: the exact `emet_initialize {"page": N, "load_id": ...}` for the first missing page, the missing pages once as ranges (`2-40`), then open again with that `load_id` |
|
|
57
57
|
| `closed` | a write arrives after a complete close - except the one closing exchange inside the grace window, and a transcript correction | nothing in this session: the work belongs in the next session opened the usual way (never one opened just for it) |
|
|
58
58
|
|
|
59
|
+
**The first successful transcript append** is checked inside `emet_transcript_append`, before anything is written. The assistant message must carry the measured machine line (a known machine name from the install notes, plus a date or a clock), or the words `no local shell MCP`. The check 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 does not let a higher index start the transcript. The code is `EMET-MEM-018`. With no machine table in the install notes, the check is reported as not enforced, so a store that has not named its machines is not blocked. `save_transcript` does not run this check. It is the batch fallback for a host that cannot append one exchange at a time. A host that can append uses `emet_transcript_append`. `turn_skipped` is a separate gate. It refuses exchange n when n−1 was never appended. It does not replace the machine-line check. The paste block in [BOOTSTRAP.md](BOOTSTRAP.md) tells a new host to follow this order.
|
|
60
|
+
|
|
59
61
|
Every refusal is made before the tool runs, so nothing is written, and its reply carries the pass instruction above (each fits inside the 500-character error-message cap). The same holds for the source-tag refusals on transcript writes, which lead with `pass "source"`: a missing or unregistered tag is told to pass a registered tag, and the refusal does not list the registered tags. Only an exact member of `EMET_SOURCE_TAGS` counts. A `cloud-scheduled-` prefix does not. Any id or tag the caller sent is echoed at most 64 characters, so no refusal is cut before its instruction.
|
|
60
62
|
|
|
61
63
|
Every governed result carries a `session_graph` block: `{mode, verdict, gate, reason, next}`. `next` is the stop after this one, taken from the state, so the AI never has to work out where it is. After a successful call, the server records the stop. A governed write that names a session fails closed when the graph cannot be read: nothing is written, and the reply says the session graph is unavailable. A write that names no session is refused by the `no_session` gate before the graph is read. (The closed-session checks on the transcript doors and `emet_session_open` fail safe instead, below.)
|
package/docs/GUIDED-SETUP.md
CHANGED
|
@@ -66,12 +66,9 @@ Your AI will hand you a **passphrase** and a **URL** at the end. Keep both somew
|
|
|
66
66
|
|
|
67
67
|
### Every conversation from now on: two words
|
|
68
68
|
|
|
69
|
-
**"initialize"** as your first message
|
|
70
|
-
|
|
71
|
-
the
|
|
72
|
-
Wait for it to say **complete** before you close the window. Skip the first and it answers from
|
|
73
|
-
guesswork; skip the second and the next session inherits a hole. The README's *Every session
|
|
74
|
-
after that* section says why.
|
|
69
|
+
**"initialize"** as your first message. Your AI calls `emet_initialize`, fetches every startup page, and opens the session with that startup's `load_id`. **"wrap up"** as your last. It appends each exchange as you go, then follows the close order and calls `emet_session_close`. Wait for it to say **complete** before you close the window.
|
|
70
|
+
|
|
71
|
+
Skip initialize and the session open is refused, so later writes are refused too. Skip a page and the open is refused. Skip the machine line on the first successful transcript append and that append is refused, including a higher exchange index. Skip the close, or close before the steps land, and the result is not complete. The next session cannot see work that was never written. The block to paste is [BOOTSTRAP.md](BOOTSTRAP.md). The gates are [GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md).
|
|
75
72
|
|
|
76
73
|
---
|
|
77
74
|
|
|
@@ -300,8 +297,7 @@ into their project instructions, so future sessions consult the memory without b
|
|
|
300
297
|
Tell the person, in plain words:
|
|
301
298
|
|
|
302
299
|
- what was set up (local server, remote server, or both) and where the code lives on disk;
|
|
303
|
-
- the connector URL and that the passphrase is the whole perimeter
|
|
304
|
-
`EMET_OAUTH_PASSPHRASE` on Railway and redeploying, which invalidates every device;
|
|
300
|
+
- the connector URL and that the passphrase is the whole perimeter. A new `EMET_OAUTH_PASSPHRASE`, then a redeploy, stops new owner sign-ins that use the old one. Tokens already issued keep working until the owner confirms `rotate-all` at `/owner/break-glass`. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md);
|
|
305
301
|
- that every host has its own source tag (a local entry's `EMET_SOURCE_TAG`; on the shared
|
|
306
302
|
remote server, the `source` each host passes, registered in `EMET_SOURCE_TAGS`), and what
|
|
307
303
|
this one's is;
|
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
|
|
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:**
|
|
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 (
|
|
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.)
|
|
@@ -45,14 +45,15 @@ Status as of 2026-10-11 (last full report: [status/2026-09-29-state-of-the-syste
|
|
|
45
45
|
- **Composite retrieval scoring.** Live as of this revision: recall ranks by how many query words match, then by importance. Current entries come first in every order, including time order. Time order is `order: 'latest'`, or a standalone latest, newest, or most recent together with other words. That phrase only reorders rows that already match. Nothing fades or is down-weighted for age. A superseded or expired entry stays in the result, marked with its end date and what replaced it. `history: true` reads the ended entries when current ones fill the limit. A recall or layer query ranks matching rows in the store (current before ended, then keyword hits and importance, or time when you asked for the latest) and then keeps a bounded window (at least 200 rows, or 20 times the page), not the whole layer. A blank sort value comes first when ascending and last when descending.
|
|
46
46
|
- **Export, import, restore-and-compare.** Not built; listed in the README's known gaps.
|
|
47
47
|
- **Organizational use.** Many private EMETs and a document gateway between them. Nothing built before a named customer.
|
|
48
|
+
- **Instance control plane (future, not built).** An operator tool that only provisions an isolated instance: a new MongoDB database, a new deploy, and a new passphrase. It does not add a tenant to an existing database. It does not share `EMET_OAUTH_PASSPHRASE`, `EMET_SIGNING_KEY`, `EMET_SUBKEY_PEPPER`, or `EMET_ACTIVE_GEMS`. Charter commitment 6 is not answered, so nothing is built. The supported model today is [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
|
|
48
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.
|
|
49
|
-
- **Compiled topic pages, pilot (
|
|
50
|
-
- **Lint pass over the semantic layer (
|
|
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.
|
|
51
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.
|
|
52
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.
|
|
53
54
|
- **Stranger install.** A clean-machine install by someone who has never seen EMET, to find first-run friction.
|
|
54
55
|
- **Remove Dynamic Client Registration** by 2027-06-01, as MCP moves to client ID metadata documents.
|
|
55
|
-
- **Public landing page (
|
|
56
|
+
- **Public landing page and npm package (live).** The site in `site/` is published to GitHub Pages, and `@dreamforgestudiollc/emet` is on npm.
|
|
56
57
|
|
|
57
58
|
## Design commitments these must keep
|
|
58
59
|
|