@dreamforgestudiollc/emet 0.3.2 → 0.3.4
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/CHANGELOG.md +23 -1
- package/README.md +18 -12
- package/docs/BOOTSTRAP.md +33 -36
- package/docs/DEPLOY.md +16 -2
- package/docs/GUARDRAILS-AND-MONORAILS.md +2 -0
- package/docs/GUIDED-SETUP.md +4 -8
- package/docs/ROADMAP.md +1 -0
- package/docs/SECURITY-AT-SCALE.md +71 -0
- package/docs/SETUP.md +19 -7
- package/package.json +2 -2
- package/server.json +3 -3
- package/src/carry-forward-close.js +386 -0
- package/src/lessons-to-checks.js +29 -6
- package/src/owner-session.js +63 -2
- package/src/session.js +49 -6
- package/src/tools.js +79 -17
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,29 @@ 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.4.
|
|
11
|
+
|
|
12
|
+
## 0.3.4 - 2026-11-10
|
|
13
|
+
|
|
14
|
+
Public pull request #26, the changes since 0.3.3. Stored data shapes are unchanged. The declared version is 0.3.4.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- 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
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- `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
|
+
|
|
23
|
+
## 0.3.3 - 2026-11-03
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- 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.
|
|
29
|
+
- Owner page portrait. `/owner/chooser` and `/owner/break-glass` use `site/assets/portrait.webp` as the page background, served at `/owner/assets/portrait.webp`. The sheet is a scrim. A missing file leaves the page without a portrait and does not stop startup. The npm package does not ship `site/`. The deploy image copies the portrait. From private #98. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
- Version 0.3.3. `server.json`, `package.json`, and `glama.json` descriptions lead with ISO 9001 7.5.3 / ISO 13485 4.2.5 document control. The registry description stays within 100 characters. It says "Nothing is deleted.", which is `CHARTER.md` §3 commitment 2. `.cursor-plugin/plugin.json` leads with the same line. The wording landed in public pull request #24 at version 0.3.2 and was not published. `CHARTER.md` §7, `templates/STANDARD.md`, and the README document-control section are unchanged. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
11
33
|
|
|
12
34
|
## 0.3.2 - 2026-10-28
|
|
13
35
|
|
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.4. 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.1 until 0.3.2 is
|
|
53
|
-
> published. For 0.3.2, 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
|
|
@@ -891,7 +895,9 @@ Honest list, because the point of this project is that it behaves predictably:
|
|
|
891
895
|
implementation does.
|
|
892
896
|
- No export / import / restore-and-compare yet.
|
|
893
897
|
- The document store is not prefixed, so one database holds one instance's identity. Run
|
|
894
|
-
separate databases rather than separate prefixes if you want separate memories.
|
|
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
|
|
900
|
+
[docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md).
|
|
895
901
|
- Dynamic Client Registration is still served beside Client ID Metadata Documents; the MCP
|
|
896
902
|
specification's deprecation window closes around 2027-07. It is scheduled to come off on
|
|
897
903
|
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
|
@@ -262,6 +262,17 @@ URL `https://<host>/mcp` → connect → you are sent to a passphrase page → e
|
|
|
262
262
|
Then verify from that device: `emet_status` with `probe: true`, followed by a `recall` of something
|
|
263
263
|
you saved elsewhere. If the remote host sees what the laptop wrote, the deployment is real.
|
|
264
264
|
|
|
265
|
+
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.
|
|
266
|
+
|
|
267
|
+
1. `emet_initialize`, then every startup page, keeping `startup_page.load_id`.
|
|
268
|
+
2. `emet_session_open` with that `load_id`.
|
|
269
|
+
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.
|
|
270
|
+
4. `session_close_protocol`, then `emet_session_close`. Say the session is saved only when the state is `complete`.
|
|
271
|
+
|
|
272
|
+
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).
|
|
273
|
+
|
|
274
|
+
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).
|
|
275
|
+
|
|
265
276
|
## Notes
|
|
266
277
|
|
|
267
278
|
- **Release note: startup stage 1 (the ref 358 amendment).** Three behaviour changes take effect
|
|
@@ -284,5 +295,8 @@ you saved elsewhere. If the remote host sees what the laptop wrote, the deployme
|
|
|
284
295
|
host: phone, desktop, CLI, anything else. This is the last-mile step people forget.
|
|
285
296
|
- **Costs.** A small Atlas cluster plus a hobby-tier host runs in the low tens of dollars a
|
|
286
297
|
month. Both have free tiers adequate for a single user.
|
|
287
|
-
- **The passphrase is the whole perimeter.** There is no second factor.
|
|
288
|
-
|
|
298
|
+
- **The passphrase is the whole perimeter.** There is no second factor. Set a new
|
|
299
|
+
`EMET_OAUTH_PASSPHRASE` and redeploy to stop new owner sign-ins that use the old one.
|
|
300
|
+
Tokens already issued keep working until you revoke them. End every grant and every
|
|
301
|
+
sub-key from `/owner/break-glass` with the exact confirm `rotate-all`. Rows are
|
|
302
|
+
superseded, retired, and retained. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
|
|
@@ -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
|
@@ -45,6 +45,7 @@ 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
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.
|
|
50
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.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Run one EMET instance per project
|
|
2
|
+
|
|
3
|
+
One collaborative project uses one EMET instance. An instance is one MongoDB database, one running server, and one `EMET_OAUTH_PASSPHRASE`. EMET is not multi-tenant on one database.
|
|
4
|
+
|
|
5
|
+
The document store has no prefix. One database holds one identity. A second `EMET_COLLECTION_PREFIX` in the same database does not make a second memory. When the configured prefix sees no memories and the same database holds data under another prefix, `emet_initialize` returns `state: "misconfigured"` and refuses the setup interview. That refusal is what stops a second identity from being written beside the first.
|
|
6
|
+
|
|
7
|
+
Guest access and member access are doors into this one store. They stay off until you set `EMET_INVITES=1` or `EMET_MEMBER_ACCESS=1`. They are not a second project.
|
|
8
|
+
|
|
9
|
+
ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged. EMET holds no certification and claims no conformity. Nothing is deleted. Records are superseded, retired, and retained. The standing text is `CHARTER.md` §7 and `templates/STANDARD.md`.
|
|
10
|
+
|
|
11
|
+
Run one process per instance. The record of which startup pages a host fetched lives in that process for 60 minutes after the last page. A second replica does not have it, so `emet_session_open` refuses a `load_id` whose pages were fetched elsewhere. See [GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md).
|
|
12
|
+
|
|
13
|
+
EMET is still 0.x. Stored document shapes may change before 1.0. Pin a version if you depend on them.
|
|
14
|
+
|
|
15
|
+
## Harden one project
|
|
16
|
+
|
|
17
|
+
Do this before a second host or bot writes.
|
|
18
|
+
|
|
19
|
+
1. Set `EMET_SOURCE_TAGS` to every host tag and every bot tag this project will use. With the list unset, an unregistered tag is accepted, and the guards on the main records and on `bots/` are off.
|
|
20
|
+
2. Set a unique strong `EMET_OAUTH_PASSPHRASE` for this instance. Do not reuse it on another instance. While it is unset, the HTTP server refuses every authorization.
|
|
21
|
+
3. Leave guest access, member access, and sub-keys off until you need them. Leave `EMET_INVITES`, `EMET_MEMBER_ACCESS`, and `EMET_SUBKEYS` unset.
|
|
22
|
+
4. Optional. Set `EMET_SIGNING_KEY` to 32 random bytes, generated on this host. Keep it only on this host. Do not commit it. Do not store it in MongoDB or in a document. Unset means rows are saved unsigned. A new instance gets its own key. A different key makes an old signature read as not matching. Leave the key stable on a live store.
|
|
23
|
+
5. Set `PUBLIC_URL` to the deployed https origin, with no path. It is the OAuth issuer. It must match the live URL exactly. Redeploy after you set it.
|
|
24
|
+
6. After any environment change, request `https://<host>/health`. The JSON includes `"ok":true`. Then call `emet_status` with `{"probe": true}`. A read alone does not prove the write path.
|
|
25
|
+
|
|
26
|
+
Leave `EMET_SOURCE_TAG` unset when several hosts share this server. A default tag makes every host look the same. Over HTTP, document, transcript, and memory writes use the tag bound at approval. A local stdio host still passes an exact tag from `EMET_SOURCE_TAGS` as `source`.
|
|
27
|
+
|
|
28
|
+
## Clone a project instance
|
|
29
|
+
|
|
30
|
+
A new project is a new instance. Do not point it at the first project's database.
|
|
31
|
+
|
|
32
|
+
1. Create a new MongoDB database. Set a new `MONGODB_DB`. Give that database the same least-privilege role as [SETUP.md](SETUP.md). Do not copy the first database into this one when you want an empty project. Copying the database copies its identity, its transcripts, and its grants.
|
|
33
|
+
2. Deploy a new service. Use a new `EMET_OAUTH_PASSPHRASE`, a new `PUBLIC_URL`, and a new `EMET_SIGNING_KEY` if you sign. If you turn sub-keys on, generate a new `EMET_SUBKEY_PEPPER`. Do not copy secrets from the other instance.
|
|
34
|
+
3. Set `EMET_SOURCE_TAGS` to the hosts of this project only.
|
|
35
|
+
4. Request `/health`, then call `emet_status` with `probe: true`.
|
|
36
|
+
5. Say initialize. The interview runs on this empty store. `emet_setup_complete` writes this store's identity. It does not read another instance.
|
|
37
|
+
|
|
38
|
+
GEMs stay on the instance that names them.
|
|
39
|
+
|
|
40
|
+
- `EMET_ACTIVE_GEMS` is the comma-separated list of GEM ids for this process. It is not shared with another instance. Set it on the new service only when this project wants those GEMs. Restart, then read `emet_status` and confirm `gems`.
|
|
41
|
+
- Bundled GEMs ship with `defaultOn` false. An unset `EMET_ACTIVE_GEMS` leaves them off.
|
|
42
|
+
- At the interview, yes is the recommended answer for bot-team backup. Yes records that choice in this store's `bootstrap/USER.md`. The assistant then follows `gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md`. EMET does not copy prompts or settings. Secret values are never stored. No, or leaving the question out, leaves the practice off. The GEM id `bot-team-backup` stays out of `EMET_ACTIVE_GEMS` unless you also want its floor text seated. Seating it does not replace the interview answer.
|
|
43
|
+
- Neurendipity and Lean Six Sigma are opt-in. Set `EMET_ACTIVE_GEMS` to `neurendipity`, to `lean-six-sigma`, or to both separated by a comma, only on the instance that should use them.
|
|
44
|
+
- Fieldnote is a developer case-study. Leave it off.
|
|
45
|
+
- Do not weaken the floor. No GEM can remove a protected floor line. Do not edit the floor to match a project. Read a GEM's floor with `emet_floor` and `gem` set to that id. That read does not turn the GEM on.
|
|
46
|
+
|
|
47
|
+
## Keep an inventory and offboard
|
|
48
|
+
|
|
49
|
+
Keep an inventory outside the stores. One line per instance is enough. Record the project name, the public URL, the database name, whether guest access, member access, or sub-keys are on, and which GEM ids are active.
|
|
50
|
+
|
|
51
|
+
Do not put passphrases, connection strings, peppers, or signing keys in the inventory. Do not write those values into any EMET document.
|
|
52
|
+
|
|
53
|
+
To stop new owner sign-ins that use the old passphrase, set a new `EMET_OAUTH_PASSPHRASE` and redeploy. The passphrase is checked when a device consents and on the owner pages. Tokens already issued keep working until you revoke them. Changing the variable does not, by itself, end those tokens.
|
|
54
|
+
|
|
55
|
+
To end every grant and every sub-key, open `/owner/break-glass` in your own browser. Sign in with the owner passphrase. Confirm with the exact text `rotate-all`. There is no MCP tool for this, and there is no grace window. Access tokens, refresh tokens, authorization codes, sub-keys, live session handles, and unused invites are superseded, retired, and retained. Rows are not deleted. Devices sign in again with the current passphrase.
|
|
56
|
+
|
|
57
|
+
To end one member or one bot and leave the rest working, open `/owner/break-glass/revoke-member`. Name that one tag. Confirm with the exact text `revoke-member`. This does not rotate the household.
|
|
58
|
+
|
|
59
|
+
To end one sub-key and leave the login, call `emet_subkey_revoke` from the owner login. Pass the tag or the key id, and a reason. Later writes that present that session handle are refused. Earlier writes stay as written.
|
|
60
|
+
|
|
61
|
+
To take an instance out of service, revoke as above, then stop the process. Keep the database. EMET has no tool that drops the record. Pausing the cluster is the database host's control.
|
|
62
|
+
|
|
63
|
+
## A control plane is future work
|
|
64
|
+
|
|
65
|
+
A later operator tool could provision an isolated instance. It would create a new database, a new deploy, and a new passphrase. It would not add a tenant to an existing database. It would not share `EMET_OAUTH_PASSPHRASE`, `EMET_SIGNING_KEY`, `EMET_SUBKEY_PEPPER`, or `EMET_ACTIVE_GEMS` across projects.
|
|
66
|
+
|
|
67
|
+
That tool is not built. Charter commitment 6 says nothing is built until it names the failure it fixes, what it replaces, how we will know it worked, and what holds it once it works. Those four answers are not on record. The item stays a seed in [ROADMAP.md](ROADMAP.md).
|
|
68
|
+
|
|
69
|
+
## Every instance uses the same session order
|
|
70
|
+
|
|
71
|
+
Connecting the server does not make a host follow the session. The server refuses a skipped step. There is no report mode and no off switch. Paste the block in [BOOTSTRAP.md](BOOTSTRAP.md). The gates are in [GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md).
|
package/docs/SETUP.md
CHANGED
|
@@ -335,17 +335,29 @@ host, `emet_status` with `probe: true` still passes.
|
|
|
335
335
|
|
|
336
336
|
## Stage 4 — tell your assistant to use it
|
|
337
337
|
|
|
338
|
-
Setup gives the store an identity. It does not tell your assistant to consult it.
|
|
339
|
-
|
|
340
|
-
|
|
338
|
+
Setup gives the store an identity. It does not tell your assistant to consult it. Paste the block from **[BOOTSTRAP.md](BOOTSTRAP.md)** into the project instructions. On a host with no instructions field, paste that block as the first message.
|
|
339
|
+
|
|
340
|
+
The path the server enforces, on every host:
|
|
341
|
+
|
|
342
|
+
1. Call `emet_initialize` and fetch every startup page. Keep `startup_page.load_id`.
|
|
343
|
+
2. Call `emet_session_open` with that `load_id`.
|
|
344
|
+
3. After every reply, call `emet_transcript_append` for that one exchange. The first successful append must carry the measured machine line, or the words `no local shell MCP`. A refused exchange 1 does not let a higher index open the transcript.
|
|
345
|
+
4. At the end, follow `session_close_protocol`, then call `emet_session_close`. Tell the user the session is saved only when the state is `complete`.
|
|
346
|
+
|
|
347
|
+
The monorail is enforce only. A skipped step is refused and nothing is written. There is no off switch. The cost of each skip is in [BOOTSTRAP.md](BOOTSTRAP.md). The gates are in [GUARDRAILS-AND-MONORAILS.md](GUARDRAILS-AND-MONORAILS.md).
|
|
348
|
+
|
|
349
|
+
One project is one instance: one database, one deploy, and one passphrase. See [SECURITY-AT-SCALE.md](SECURITY-AT-SCALE.md).
|
|
341
350
|
|
|
342
351
|
## Verifying it worked
|
|
343
352
|
|
|
344
353
|
```
|
|
345
|
-
|
|
346
|
-
emet_status
|
|
347
|
-
|
|
348
|
-
|
|
354
|
+
emet_initialize → fetch every page, keep startup_page.load_id
|
|
355
|
+
emet_status → initialized: true (false until the setup interview is done)
|
|
356
|
+
emet_status probe:true → every probe check passed
|
|
357
|
+
emet_session_open → pass that load_id, get a session_id
|
|
358
|
+
emet_transcript_append → exchange 1 carries the machine line, or the words no local shell MCP
|
|
359
|
+
save_to_layer → with that session_id, then recall it from a different device
|
|
360
|
+
emet_session_close → state "complete" only after the close steps landed
|
|
349
361
|
```
|
|
350
362
|
|
|
351
363
|
Ask your assistant to remember something and it makes these calls. A `semantic` or
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dreamforgestudiollc/emet",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "EMET 0.3.
|
|
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.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-memory",
|
|
7
7
|
"ai-agents",
|
package/server.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.dreamforgestudiollc/emet",
|
|
4
4
|
"title": "EMET",
|
|
5
|
-
"description": "
|
|
6
|
-
"version": "0.3.
|
|
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",
|
|
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.
|
|
25
|
+
"version": "0.3.4",
|
|
26
26
|
"transport": {
|
|
27
27
|
"type": "stdio"
|
|
28
28
|
},
|