@dreamforgestudiollc/emet 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +18 -1
- package/CHANGELOG.md +42 -12
- package/CHARTER.md +2 -2
- package/CONTRIBUTING.md +21 -0
- package/README.md +25 -14
- package/RELEASE_NOTES-0.2.6.md +43 -0
- package/RELEASE_NOTES-0.3.6.md +29 -0
- package/SECURITY.md +13 -0
- package/docs/BOTS.md +3 -3
- package/docs/DEPLOY.md +53 -14
- package/docs/ERROR-CODES-SPEC.md +1 -1
- package/docs/ERROR-CODES.md +1 -0
- package/docs/GUIDED-SETUP.md +1 -1
- package/docs/ROADMAP.md +62 -49
- package/docs/SETUP.md +30 -7
- package/package.json +5 -2
- package/server.json +2 -2
- package/src/annotations.js +1 -0
- package/src/attribution.js +9 -9
- package/src/bound-door.js +75 -42
- package/src/break-glass.js +7 -1
- package/src/carry-forward-close.js +1 -1
- package/src/chooser.js +15 -8
- package/src/claimed-tag.js +1 -1
- package/src/database.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/gem-check.js +4 -1
- package/src/grants.js +29 -6
- package/src/host-reach.js +1 -1
- package/src/http-remote.js +18 -8
- package/src/index.js +2 -2
- package/src/invites.js +2 -2
- package/src/owl.js +18 -18
- package/src/owner-approvals.js +1 -1
- package/src/proof-run.js +2 -2
- package/src/rotate.js +1 -1
- package/src/session-graph.js +5 -5
- package/src/session.js +2 -2
- package/src/setup.js +14 -10
- package/src/subkeys.js +4 -1
- package/src/tools.js +29 -28
- package/src/transcript-session.js +2 -2
- package/src/version.js +1 -1
- package/src/writer-approval.js +11 -6
- package/templates/SESSIONDISPOSITION.md +2 -2
- package/verification/load-gate/load-gate.mjs +1 -1
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,33 +7,63 @@ 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.6.
|
|
11
|
+
|
|
12
|
+
## 0.3.6 - 2026-11-11
|
|
13
|
+
|
|
14
|
+
Docs and a public-wording scrub. Stored data shapes are unchanged. Tool behavior is unchanged. The declared version is 0.3.6. This revision is not published from this change. The 0.3.5 package on npm was published before this cleanup, so that tarball still predates it.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- [docs/ROADMAP.md](docs/ROADMAP.md) has an Upcoming work section. Workshop Village MCP and shared project drawers are Proposed and not built. Per-source-tag handoffs are Planned and are not in this public release. Fuller multi-person use of the one server is a later phase and is not built. Continuity-currency enforcement on initialize is Planned. Backup and restore verification is Planned. The clone-instance recipe is already documented in [docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md). Stronger source-tag onboarding and further per-door extensions are Planned. The extension socket itself is built. Topic-page currency and lock levels are Planned. Topic views already shipped in 0.3.0. Transcript query improvements and stricter read-tool input validation are Planned. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
18
|
+
- [RELEASE_NOTES-0.3.6.md](RELEASE_NOTES-0.3.6.md).
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Public wording no longer names an install-specific retired account in source comments, log lines, or the test that carried a live host. The retirement check still matches that account by digest. The GEM schema id is an in-repo identifier, `emet:gem-library/gem.schema.json`, the same string the checker expects. The extension socket is described as built, matching `CHARTER.md` and `src/socket.js`. Historical release notes for 0.2.6 are marked historical. The 0.3.5 sentence that said comments had already dropped the retired account is corrected below. `EMET-AUTH-045` is refused at a new consent, a sub-key request, a writer request, a member or guest code, a setup source, a chooser decision, and a break-glass reissue. The npm package also ships `RELEASE_NOTES*.md`, `SECURITY.md`, and `CONTRIBUTING.md`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
22
|
+
|
|
23
|
+
### Upgrade
|
|
24
|
+
- No stored-data migration. No new setting. Deploy over 0.3.5 as is. The retirement marker on a new database stores a public label. An existing marker is left as it was. Matching still uses the digest of the retired account id.
|
|
25
|
+
|
|
26
|
+
## 0.3.5 - 2026-11-10
|
|
27
|
+
|
|
28
|
+
This release brings the public docs current with the code. Stored data shapes are unchanged. The declared version is 0.3.5.
|
|
29
|
+
|
|
30
|
+
### Upgrade
|
|
31
|
+
- The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, a chooser decision, and a break-glass reissue. The alias is a digest, so this package does not spell the old tag.
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- `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.
|
|
35
|
+
- 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.
|
|
36
|
+
- 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 the GEM socket's fourth phase 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. Source comments in the published 0.3.5 package still named a retired account. That scrub is recorded under 0.3.6. The 0.3.5 npm tarball predates it. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
37
|
+
- 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.
|
|
38
|
+
- The default `EMET_REPORT_EMAIL` is `dreamforgestudio@mail.grokbot.com` again. The default in 0.3.2, 0.3.3, and 0.3.4, `dreamforgestudio@mail.hubbot.com`, was wrong. The 0.3.1 line below records the address that release shipped.
|
|
11
39
|
|
|
12
40
|
## 0.3.4 - 2026-11-10
|
|
13
41
|
|
|
14
|
-
Public pull request #26, the changes since 0.3.3. Stored data shapes are unchanged. The declared version is 0.3.4.
|
|
42
|
+
Public pull request #26, the changes since 0.3.3. Stored data shapes are unchanged. 0.3.4 was published to npm and the MCP Registry on 2026-11-10. The declared version is 0.3.4.
|
|
15
43
|
|
|
16
44
|
### Added
|
|
17
45
|
- 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
46
|
|
|
47
|
+
### Changed
|
|
48
|
+
- 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.
|
|
49
|
+
|
|
19
50
|
### Fixed
|
|
20
51
|
- `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
52
|
|
|
23
53
|
## 0.3.3 - 2026-11-03
|
|
24
54
|
|
|
25
|
-
Listing text from public pull request #24, plus
|
|
55
|
+
Listing text from public pull request #24, plus internal changes that landed in this public release. Session disposition and 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 out of this public listing.
|
|
26
56
|
|
|
27
57
|
### 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.
|
|
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.
|
|
58
|
+
- 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. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
59
|
+
- 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. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
30
60
|
|
|
31
61
|
### Fixed
|
|
32
62
|
- 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.
|
|
33
63
|
|
|
34
64
|
## 0.3.2 - 2026-10-28
|
|
35
65
|
|
|
36
|
-
Release notes for the access ladder and the work after 0.3.1.
|
|
66
|
+
Release notes for the access ladder and the work after 0.3.1. This section was written before 0.3.2 was published. 0.3.2 later shipped to npm on 2026-10-28. Older release sections below are historical and are not rewritten. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
37
67
|
|
|
38
68
|
### Added
|
|
39
69
|
- Door grants. The grant id is the OAuth token family minted at consent. `verifyAccessToken` returns that id and the door (`owner`, `member`, or `guest`). A new passphrase consent stores `issued_via: owner`. A legacy token with no marker stays unmarked, and its door on the stamp is null, not a guessed owner. A legacy member token stays a member for freeze checks, and that stamp still records door null. New writes stamp `grant_id` and `door` from the login. A caller-supplied grant id or door is not stored. Stdio stamps `grant_id: null` and `door: stdio`. An error with no transport stores door `unknown`. `emet_initialize` and `emet_status` return `grant_id` and `door` beside the effective tag and basis. Tag memory stays keyed by `client_id`. The error log, the owner error report, and the tool-call audit store `client_id`, `grant_id`, and `door`. A grant id longer than a family, including a bearer, is stored as `none`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
@@ -101,10 +131,10 @@ Release notes for the access ladder and the work after 0.3.1. npm is not publish
|
|
|
101
131
|
- A RUNE may import only a file under the same GEM's `runes/`. A relative import that normalizes outside `runes/`, such as `../lib/h.js`, is refused even when that file is listed. A resolved real path outside `runes/` is refused, so a symlink that leaves `runes/` cannot be imported. A symlinked GEM directory fails GC-01 (`symlink`), and that refusal is not reused for the real directory. A symlinked file under `runes/` fails GC-04 (`symlink`) and is not followed. The socket records that refusal instead of omitting the entry. A `.JS` file under `runes/` is scanned. `.cjs` is not treated as a JavaScript module.
|
|
102
132
|
- The deploy image and the npm package include `verification/`. `src/host-reach.js` imports the RUNE load gate from there. A release that omitted the directory crashed at startup with `ERR_MODULE_NOT_FOUND`.
|
|
103
133
|
- RUNE import specifiers are checked in the vendored load gate (`runeSpecifierReason`). A bare package, `node:`, a URL, `emet/rune`, a path that normalizes outside the GEM, `../` with no file list, and a relative import that is not in the passed file list are refused. gem-check calls the same function. GC-16 still allows `emet/rune`; GC-19 still names that failure. A file under `runes/` that is not `.js` or `.mjs` fails GC-16 (`rune extension`) instead of being skipped.
|
|
104
|
-
- The GC-19 load gate is an allowlist (`verification/load-gate/load-gate.mjs`, the file
|
|
134
|
+
- The GC-19 load gate is an allowlist (`verification/load-gate/load-gate.mjs`, the file a library checkout can vendor with `corpus.json`). acorn 8.19.0, fail closed, no second scan. Only listed AST nodes are admitted. No `var`, and no binding may reuse a top-level name. `Math` is only a direct read or call of a listed member, never `random`, and the Math object is never stored, passed, or returned. A computed key is a literal, a `const` bound directly to a primitive literal, or a read of a top-level `Object.freeze({ __proto__: null, … })` table inside a recognized `Object.hasOwn` guard. The guarded key is one `const` that is a primitive before the guard (`const n = String(input.n)` or `Number(...)`, or a recognized `typeof` check for `'string'` or `'number'`). A const object is refused: `toString` or `Symbol.toPrimitive` can return one own key at the check and another at the read. A member, a `let`, or a parameter does not qualify. The guard's non-own-key safety rests on the table being frozen with a null prototype. `.freeze` counts only on the unbound `Object` identifier. There is no loop-index exception. Tables are not passed, spread, or returned. A member write is admitted only on an object or array born in that function. `prototype`, `Array.prototype`, `Error.prepareStackTrace`, and `RegExp.$1` fail. `toLocaleString`, `localeCompare`, `toLocaleDateString`, and `toLocaleTimeString` fail (`intl`). `Buffer`, including `Buffer.allocUnsafe`, fails (`memory`). A `for (const k of …)` key still needs `String`/`Number` or a `typeof` check. `toLocaleUpperCase`, `toLocaleLowerCase`, and a destructured locale name fail (`intl`). A computed key in a binding or assignment pattern must be a string or number literal, including nested patterns, parameters, defaults, `catch`, and `for-of`. Concatenation, a member, and a const used as that key fail. `m['call']` fails with `.call`. The checker accepts spec `2026-10-12` and optional `changelog`, `update`, `knowledge`, and `coverage`. A `coverage` list holds at most 256 entries.
|
|
105
135
|
- The per-RUNE description and served response wrap the `metadata.gem` value in backticks, so the sentence period is not copied with the value.
|
|
106
136
|
- A per-RUNE tool states the exact `metadata.gem` value (`<gem>@<version>`, for example `fieldnote@1.0.1`) in its description and in the served response. A save that does not use that form says `metadata.gem` must be `'<gem>@<version>'`.
|
|
107
|
-
- The serve log file `logs/gem-serves.json` keeps the latest `SERVE_CAP` (200) rows for each principal, so one caller cannot evict another. This release creates the new collection `<prefix>gem_serves` (`SERVE_COLLECTION`).
|
|
137
|
+
- The serve log file `logs/gem-serves.json` keeps the latest `SERVE_CAP` (200) rows for each principal, so one caller cannot evict another. This release creates the new collection `<prefix>gem_serves` (`SERVE_COLLECTION`). the owner approved it as an append-only write site on the write-path allow-list. The collection keeps every row. Nothing is deleted. A redeploy that drops the file can still seal a result. Concurrent serves write distinct temp files, and one process records one serve at a time. Tests point the file at a temp path. The guard and the GC-19 load gate reject `vm`, `new Function`, and a computed `import()` path. When the store is not connected, the file is the only copy and a redeploy drops it. Fieldnote is off by default. See SPEC.md §10.
|
|
108
138
|
- Error text again replaces a stack frame with `[stack-frame]`. The publish workflow runs only on a published release. Public text no longer carries a private path, a private branch name, or an install-specific display name.
|
|
109
139
|
- Bot-team backup references name `gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md`, the file on disk.
|
|
110
140
|
|
|
@@ -114,7 +144,7 @@ Release notes for the access ladder and the work after 0.3.1. npm is not publish
|
|
|
114
144
|
- Version 0.2.6. Charter commitment 1 again states the client-executed RUNE carve-out: EMET verifies the record, not the computation. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
115
145
|
|
|
116
146
|
### Docs
|
|
117
|
-
- Client-side execution of RUNED directives (GEP-0003, accepted by
|
|
147
|
+
- Client-side execution of RUNED directives (GEP-0003, accepted by the owner on 2026-10-16). Supersedes GEP-0002, which is kept. The socket must not run RUNE code. One read-only tool per RUNE serves that RUNE's code, inputs, outputs, description, and served hash. SPEC.md §10–12, CONFORMANCE.md GC-19, the charter commitment 1 carve-out (EMET verifies the record, not the computation) and the Extension-socket row, and `docs/gem/README.md`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged. No code change in this revision.
|
|
118
148
|
|
|
119
149
|
## 0.2.5 - 2026-10-14
|
|
120
150
|
|
|
@@ -143,7 +173,7 @@ Per-session attribution with client approval, the GEM socket with the bundled Ne
|
|
|
143
173
|
### Docs
|
|
144
174
|
|
|
145
175
|
- README and website: version 0.2.5; a GEM socket fact; the website gains a Document control (ISO 9001 7.5.3 / ISO 13485 4.2.5) fact in the README's words; the tool count is 30 with `emet_client_approve` (docs/PERMISSIONS.md lists it with the tools that can replace or hand out access).
|
|
146
|
-
- GEM standard, Draft revision 2026-10-11, in `gem-library/` (
|
|
176
|
+
- GEM standard, Draft revision 2026-10-11, in `gem-library/` (the text is `gem-library/` in this repository, Draft). The charter's extension socket, commitment 8, and the core-floor row are revised: EMET is a memory resource, core floor protections stay non-removable, and neurodivergent engagement is the bundled Neurendipity GEM, off unless the user asks.
|
|
147
177
|
- Registering a bot (`docs/BOTS.md` §4, with a pointer in `docs/DEPLOY.md`): every bot writes under its own source tag, `<prefix>-<bot>`. When a bot joins the roster, append its tag to the end of `EMET_SOURCE_TAGS`, keep every existing tag in order, and add `bots/<tag>/HANDOFF.md` to `EMET_RECORD_DOCS` before its first write. Setting either variable redeploys the server; afterwards, check `/health` and `emet_status`.
|
|
148
178
|
|
|
149
179
|
## 0.2.4 - 2026-10-08
|
|
@@ -155,7 +185,7 @@ A board fix, a public website, and the first npm package, `@dreamforgestudiollc/
|
|
|
155
185
|
- A static website in `site/`, for search, and a GitHub Actions workflow that publishes that folder to GitHub Pages on pushes to `main`.
|
|
156
186
|
- `glama.json` at the repo root names `dreamforgestudiollc` as maintainer for the Glama directory listing.
|
|
157
187
|
- The README records the origin in the same words as the site: EMET was built by Dreamforge Studio LLC from a neurodivergent user’s own need for an AI assistant that remembers. The word coined for that is neurendipity: neurodivergent and serendipity.
|
|
158
|
-
- The public-scrub suite reads the Pages workflow's deploy job `if` and requires it to be exactly `github.repository == 'dreamforgestudiollc/EMET' && github.ref == 'refs/heads/main'`. A repository name that only contains that text, such as `dreamforgestudiollc/EMET-
|
|
188
|
+
- The public-scrub suite reads the Pages workflow's deploy job `if` and requires it to be exactly `github.repository == 'dreamforgestudiollc/EMET' && github.ref == 'refs/heads/main'`. A repository name that only contains that text, such as `dreamforgestudiollc/EMET-fork`, does not pass.
|
|
159
189
|
- The same suite requires `site/sitemap.xml`, `site/robots.txt`, `site/.nojekyll`, and every image the site HTML references to be present on the scrub and publish walk. Removing one of those files fails the suite.
|
|
160
190
|
- `server.json` for the Official MCP Registry. Its name is `io.github.dreamforgestudiollc/emet`, the same value as `mcpName` in package.json. The npm package it names is the stdio server at version 0.2.4.
|
|
161
191
|
- 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 in this repository is Draft, in `gem-library/` (`gem-library/SPEC.md`). A public submission repository for outside GEMs does not exist yet. Its name is not chosen. **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/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
## Before you open a pull request
|
|
4
|
+
|
|
5
|
+
- Open an issue first for anything beyond a typo. The feature template asks the four questions EMET asks of every change it builds ([CHARTER.md](CHARTER.md)).
|
|
6
|
+
- Run the tests: `npm ci && npm test`.
|
|
7
|
+
- Keep the write path additive. No change may add a delete or a remove on any store. `write-path.test.js` and `atlas-role.test.js` enforce this.
|
|
8
|
+
|
|
9
|
+
## Set by the maintainer
|
|
10
|
+
|
|
11
|
+
These change only by the maintainer's decision:
|
|
12
|
+
|
|
13
|
+
- [CHARTER.md](CHARTER.md).
|
|
14
|
+
- The core floor (`src/floor.js`) and its protected lines.
|
|
15
|
+
- The README's document-control section (ISO 9001 7.5.3 / ISO 13485 4.2.5).
|
|
16
|
+
- Attribution: source tags, session and load ids, client approval.
|
|
17
|
+
- The GEM standard, schema and socket rules in [`gem-library/`](gem-library/). Anyone may author a GEM; see [gem-library/AUTHORING.md](gem-library/AUTHORING.md).
|
|
18
|
+
|
|
19
|
+
## Security
|
|
20
|
+
|
|
21
|
+
See [SECURITY.md](SECURITY.md).
|
package/README.md
CHANGED
|
@@ -26,7 +26,8 @@ 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.6. EMET is still 0.x: stored document shapes may change before 1.0. Pin a version if you depend on them.
|
|
30
|
+
- **Roadmap.** What is proposed, planned, or a later phase is [docs/ROADMAP.md](docs/ROADMAP.md). An item there is not built unless it says so. Upcoming work is labeled Proposed, Planned, or Later phase. Discussion is in [GitHub issues](https://github.com/dreamforgestudiollc/EMET/issues).
|
|
30
31
|
|
|
31
32
|
The store has one owner, and other people can join only through the optional Guest
|
|
32
33
|
(read-only) and Member (read and write) access, both off by default.
|
|
@@ -43,11 +44,20 @@ EMET is built for document control in environments that work under ISO 9001 and
|
|
|
43
44
|
- **Templates are controlled documents.** Base templates ship with the release, and the shipped copy governs. Every templated write is checked against its template, and a write that fails is kept and marked for review, never silently accepted or discarded.
|
|
44
45
|
- **A test holds the line.** `write-path.test.js` fails if anything in `src/` removes from a layer, document or transcript collection, and `atlas-role.test.js` fails if the database role grants remove.
|
|
45
46
|
|
|
46
|
-
##
|
|
47
|
+
## Start here
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
npm install
|
|
51
|
+
cp .env.example .env
|
|
52
|
+
npm start
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Node.js 22 or newer. Fill in `MONGODB_URI` and `MONGODB_DB`. `.env` is gitignored.
|
|
47
56
|
|
|
48
57
|
- **Guided setup:** [docs/GUIDED-SETUP.md](docs/GUIDED-SETUP.md) — never deployed anything. Your assistant installs, configures, deploys, and verifies. You sign in when asked and paste the connector URL.
|
|
49
58
|
- **Setup:** [docs/SETUP.md](docs/SETUP.md) — the manual walkthrough: MongoDB, both transports, and the first-run interview.
|
|
50
59
|
- **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.
|
|
60
|
+
- **What is next:** [docs/ROADMAP.md](docs/ROADMAP.md) — Upcoming work is labeled Proposed, Planned, or Later phase, and it is not built unless the page says so.
|
|
51
61
|
|
|
52
62
|
> **Status: 0.x. The stored document shapes are not frozen yet.** Breaking changes to the
|
|
53
63
|
> schema may land before 1.0. Pin a version if you depend on it.
|
|
@@ -693,7 +703,7 @@ are in [`docs/GUARDRAILS-AND-MONORAILS.md`](docs/GUARDRAILS-AND-MONORAILS.md).
|
|
|
693
703
|
|
|
694
704
|
## Tools
|
|
695
705
|
|
|
696
|
-
Thirty-
|
|
706
|
+
Thirty-eight tools are registered with sub-keys off. With `EMET_SUBKEYS=1`, four more (`emet_subkey_request`, `emet_subkey_claim`, `emet_subkey_revoke`, `emet_subkey_end_session`) and the `subkey` and `session_handle` arguments. The names below are every tool the registry registers, both sets together.
|
|
697
707
|
|
|
698
708
|
<!-- emet-tools -->
|
|
699
709
|
```
|
|
@@ -786,7 +796,7 @@ at session *start*, which is the only moment early enough to matter.
|
|
|
786
796
|
|
|
787
797
|
Every tool declares MCP annotations — `readOnlyHint`, `destructiveHint`, `idempotentHint`,
|
|
788
798
|
`openWorldHint` — in one table in `src/annotations.js`, which is also the complete statement of
|
|
789
|
-
what EMET does to a store. **15 of the
|
|
799
|
+
what EMET does to a store. **15 of the 38 tools cannot modify anything**; five can replace the
|
|
790
800
|
visible content of a document; `openWorldHint` is false everywhere. The tools reach this
|
|
791
801
|
server's own database and nothing else: no filesystem and no shell. The sign-in server fetches
|
|
792
802
|
a client's metadata document, and only from a public address it has already checked.
|
|
@@ -803,7 +813,7 @@ enforcement: what is actually auto-approved is a host-side setting. See
|
|
|
803
813
|
|
|
804
814
|
`emet_error_report` is owner-only and read-only. It reads the operational error log and returns the full report, a `mailto:` draft, and a structured email `{to, subject, body_text, short_id, version}`. EMET does not send mail and does not open a network connection for this tool.
|
|
805
815
|
|
|
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
|
|
816
|
+
Read the report first. The draft is addressed to `EMET_REPORT_EMAIL`. When that variable is unset, the address is `dreamforgestudio@mail.grokbot.com`, the address in `src/error-report.js`. Set it to your own address to keep reports in house. Set it to an empty string, or to anything other than one plain address, and the tool returns the report and no email.
|
|
807
817
|
|
|
808
818
|
A calling assistant that has its own email address may pass that structured email to its own email tool. The calling assistant may send this report only after showing the report to its user and getting their OK. EMET will not send it. The code table is [docs/ERROR-CODES.md](docs/ERROR-CODES.md), and the behavior is written up in [docs/ERROR-CODES-SPEC.md](docs/ERROR-CODES-SPEC.md).
|
|
809
819
|
|
|
@@ -885,18 +895,19 @@ Honest list, because the point of this project is that it behaves predictably:
|
|
|
885
895
|
- The monorail (session graph) refuses every skipped step (enforce only since 2026-10-03; there
|
|
886
896
|
is no report mode or off switch). Its turn coverage is only as strong as the exchange numbers hosts report, and it never sees
|
|
887
897
|
the reply text. See [Guardrails & Monorails](docs/GUARDRAILS-AND-MONORAILS.md).
|
|
888
|
-
-
|
|
889
|
-
|
|
890
|
-
`
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
under the old tag as ambiguous attribution instead of rewriting history.
|
|
898
|
+
- A scheduled job that writes without opening a session is refused by the session-order check
|
|
899
|
+
(gate `no_session`) until it opens a session with its startup's `load_id` and passes the
|
|
900
|
+
`session_id`. A `cloud-scheduled-` prefix is not a registered tag. Only an exact tag in
|
|
901
|
+
`EMET_SOURCE_TAGS` is accepted. `emet_gaps` keeps counting rows already written under an old
|
|
902
|
+
tag as ambiguous attribution instead of rewriting history.
|
|
894
903
|
- `save_transcript`'s description does not state that it stores content verbatim; the
|
|
895
904
|
implementation does.
|
|
896
905
|
- No export / import / restore-and-compare yet.
|
|
897
|
-
-
|
|
898
|
-
|
|
899
|
-
|
|
906
|
+
- These collections are not prefixed: `documents`, `documents_history`, `transcripts`,
|
|
907
|
+
`exchanges`, `persons`, `invites`, `close_attempts`, `error_log`, `error_log_summary`,
|
|
908
|
+
and `_emet_verify`. One database holds one instance. Run separate databases rather than
|
|
909
|
+
separate prefixes if you want separate memories. One collaborative project is one
|
|
910
|
+
instance (one database, one deploy, one passphrase). See
|
|
900
911
|
[docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md).
|
|
901
912
|
- Dynamic Client Registration is still served beside Client ID Metadata Documents; the MCP
|
|
902
913
|
specification's deprecation window closes around 2027-07. It is scheduled to come off on
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# EMET 0.2.6
|
|
2
|
+
|
|
3
|
+
Historical notes for 0.2.6. The current release in this repository is 0.3.6. See [CHANGELOG.md](CHANGELOG.md). The sentence that used to say the npm package was still 0.2.4 is withdrawn. 0.2.6, and later versions through 0.3.5, were published. 0.3.6 is not published from this revision.
|
|
4
|
+
|
|
5
|
+
EMET is an MCP memory server: persistent shared memory for AI agents, bot teams, and chats. Version 0.2.6. The stored document shapes are not frozen. Pin a version if you depend on them.
|
|
6
|
+
|
|
7
|
+
EMET holds no certification and claims no conformity. The document-control wording is unchanged: ISO 9001 7.5.3 / ISO 13485 4.2.5.
|
|
8
|
+
|
|
9
|
+
## Record
|
|
10
|
+
|
|
11
|
+
Nothing is deleted, on any store, by design. A memory entry is superseded by a new revision. A document is revised or retired, and retired means obsolete, not gone. Prior versions stay, and a retained revision can be read back and checked against its stored digest. Templates are controlled documents. A write that fails its template check is kept and marked, not discarded.
|
|
12
|
+
|
|
13
|
+
Every write is read back and compared before it is reported as saved.
|
|
14
|
+
|
|
15
|
+
## Attribution and approvals
|
|
16
|
+
|
|
17
|
+
Every write is attributed to the client that made it. A declared source tag does not gain rights beyond the login it is bound to. A new client is read-limited until it is approved. The approval is recorded. On a fresh store, the first solo client is approved as the owner's primary. Pending clients are reported to the owner, or to the chief-of-staff tag when that is set.
|
|
18
|
+
|
|
19
|
+
## GEM socket
|
|
20
|
+
|
|
21
|
+
Add-on behavior ships as GEMs (Golem Expertise Modules). A GEM ranks below the core floor and below the user's current word. It cannot remove a protected floor line. Neurendipity and Lean Six Sigma are work-in-progress examples and stay off unless the install turns one on. Neurendipity is support material, not counseling or treatment. Fieldnote is a developer case-study of a runed GEM. It is not a user-facing GEM, and it is off by default.
|
|
22
|
+
|
|
23
|
+
## Client-side GEM execution
|
|
24
|
+
|
|
25
|
+
A GEM may declare a tool. EMET does not run that computation. EMET verifies the record, not the computation. The client runs the tool. What gets written back is checked the same way as any other write: attributed, read back, and kept.
|
|
26
|
+
|
|
27
|
+
## Released flag
|
|
28
|
+
|
|
29
|
+
A GEM is seated only when its released flag is the boolean true. Any other value is refused. A missing flag is refused except for a legacy manifest the release pins by id, version, and file digests. The check runs on startup. A GEM that fails the check is listed and does not stop the server.
|
|
30
|
+
|
|
31
|
+
## Bot-team backup
|
|
32
|
+
|
|
33
|
+
Optional, and off unless the first-run interview records yes. Yes is the recommended choice. The recipe and the recovery template ship with the release. EMET does not copy prompts or settings itself. Secret values are never stored.
|
|
34
|
+
|
|
35
|
+
## Floor lines in this version
|
|
36
|
+
|
|
37
|
+
`goal_check`: before multi-step work, on an ambiguous request, or when the conversation turns, state the person's goal and the problem under it in one sentence, marked as your read, and confirm.
|
|
38
|
+
|
|
39
|
+
`no_rapport_mirroring`: no echoing, flattery, or agreement used to build rapport or seem attuned. Agreement is earned by substance.
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
MongoDB, stdio, and remote HTTP with OAuth are unchanged. Set `EMET_SOURCE_TAGS` before more than one host or bot writes. With it unset, any caller can write under any tag.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# EMET 0.3.6
|
|
2
|
+
|
|
3
|
+
Historical note: these are the notes for 0.3.6. This revision is not published from this file. The 0.3.5 package on npm was published before this cleanup. See [CHANGELOG.md](CHANGELOG.md).
|
|
4
|
+
|
|
5
|
+
EMET is an MCP memory server: persistent shared memory for AI agents, bot teams, and chats. Version 0.3.6. The stored document shapes are not frozen. Pin a version if you depend on them. Stored data shapes are unchanged from 0.3.5. Tool behavior is unchanged.
|
|
6
|
+
|
|
7
|
+
EMET holds no certification and claims no conformity. The document-control wording is unchanged: ISO 9001 7.5.3 / ISO 13485 4.2.5. EMET stays one shared server with verified per-client attribution. It is not a generic memory server, and it is not forked per client.
|
|
8
|
+
|
|
9
|
+
## Roadmap
|
|
10
|
+
|
|
11
|
+
[docs/ROADMAP.md](docs/ROADMAP.md) is the public list of what ships and what does not. Upcoming work is labeled Proposed, Planned, or Later phase. Nothing in that section is built unless it says so.
|
|
12
|
+
|
|
13
|
+
Proposed, and not built: a Workshop Village MCP server for bot-team collaboration, built onto EMET or independent of it, and shared project drawers for files handed off between bot teams. An organization may later designate a shared network drive as the drawer store. That choice is not decided, and it is not approved to build.
|
|
14
|
+
|
|
15
|
+
Planned, and not in this public release: per-source-tag handoffs, where each writing AI writes only its own handoff and a shared view is computed on read. A private build has that shape behind a flag. The flag is not in this release. Also planned: continuity-currency enforcement so initialize cannot run on a stale handoff or board when a newer record exists; backup and restore verification runbooks (the clone-instance recipe is already documented); stronger source-tag onboarding and further per-door extensions (the extension socket itself is built); currency and lock levels on topic pages (the 0.3.0 topic views already ship); and transcript query and read-tool validation improvements.
|
|
16
|
+
|
|
17
|
+
Later phase, and not built: fuller multi-person use of the one server, beyond the member and guest doors that already ship.
|
|
18
|
+
|
|
19
|
+
Discussion is in [GitHub issues](https://github.com/dreamforgestudiollc/EMET/issues).
|
|
20
|
+
|
|
21
|
+
## Public wording
|
|
22
|
+
|
|
23
|
+
Source comments, log lines, and a test host no longer spell an install-specific retired account or a live private host. The retirement check still matches that account by digest. The GEM standard a reviewer can read is `gem-library/` in this repository. It is Draft. A public submission repository for outside GEMs does not exist yet. `EMET-AUTH-045` is also refused on a break-glass reissue. The npm package includes these release notes, `SECURITY.md`, and `CONTRIBUTING.md`.
|
|
24
|
+
|
|
25
|
+
## Record
|
|
26
|
+
|
|
27
|
+
Nothing is deleted, on any store, by design. A memory entry is superseded by a new revision. A document is revised or retired, and retired means obsolete, not gone. Prior versions stay.
|
|
28
|
+
|
|
29
|
+
Every write is read back and compared before it is reported as saved.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
## Reporting a vulnerability
|
|
4
|
+
|
|
5
|
+
Report privately through [GitHub security advisories](https://github.com/dreamforgestudiollc/EMET/security/advisories/new). Do not open a public issue. Include the EMET version, the transport (stdio or remote HTTP), and steps to reproduce. Do not include real passphrases, tokens, connection strings or memory content.
|
|
6
|
+
|
|
7
|
+
## Supported versions
|
|
8
|
+
|
|
9
|
+
EMET is 0.x. Only the latest release ([releases](https://github.com/dreamforgestudiollc/EMET/releases)) receives fixes.
|
|
10
|
+
|
|
11
|
+
## Scope
|
|
12
|
+
|
|
13
|
+
EMET runs on infrastructure you control: your host, your MongoDB, your `EMET_OAUTH_PASSPHRASE`. Securing that deployment is yours. One collaborative project is one instance. The steps are [docs/SECURITY-AT-SCALE.md](docs/SECURITY-AT-SCALE.md). Reports about EMET's own code are in scope, including OAuth, source-tag guards (`EMET_SOURCE_TAGS`), access grants, the no-delete write path, and the GEM socket and `gem-check`.
|
package/docs/BOTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Running bots alongside your assistant
|
|
2
2
|
|
|
3
|
-
**Document control:** id `docs/BOTS.md` · tier 3, work instruction and reference (`templates/INDEX.md` hierarchy) · revision: the repository's history governs · status:
|
|
3
|
+
**Document control:** id `docs/BOTS.md` · tier 3, work instruction and reference (`templates/INDEX.md` hierarchy) · revision: the repository's history governs · status: current public guide · owner: EMET (base) · forms it points to: `templates/ROSTER.md`, `templates/BOTHANDOFF.md` (both DRAFT) · rules it points to: `docs/DEPLOY.md` (bot records), `docs/GUARDRAILS-AND-MONORAILS.md` (bot sessions)
|
|
4
4
|
**Failure it prevents:** a bot set up by hand that the server did not treat as a bot, because its handoff id was never listed, found only when a live check's refusal came from the wrong rule (a live check of per-bot close records, 2026-10-01); and a bot close that could not finish because the bot never saved a session record with its session id, or saved one and never appended the exchange it was stamped with.
|
|
5
5
|
|
|
6
6
|
This is the reference for adding a bot — a separate agent with its own job, such as a reviewer, a tester or a scheduled intake run — to an EMET install that already serves you and your assistant. It states how a bot is registered and how a bot session runs. The rules themselves live in server code and in the documents named above; this page points to them and restates none of them as new rules.
|
|
@@ -29,14 +29,14 @@ Do these in order. Each step names what to read back. Steps 2 and 3 are **one ch
|
|
|
29
29
|
|
|
30
30
|
**Standing rule.** Every bot on the roster writes under its own source tag, `<prefix>-<bot>` (e.g. `bot-reviewer`). When a new bot joins the roster, register its tag in `EMET_SOURCE_TAGS` at the same time, before its first write. Append it to the end of the comma-separated list and keep every existing tag in order. Also add `bots/<tag>/HANDOFF.md` to `EMET_RECORD_DOCS` so the server treats it as a bot. Setting either variable redeploys the server; afterwards, check `/health` and `emet_status`.
|
|
31
31
|
|
|
32
|
-
When `EMET_SUBKEYS=1`, bots that share the owner's login each hold a sub-key as a local secret. First use, in plain language, is [SUBKEYS.md](SUBKEYS.md). The key is never stored in an EMET document. The bot presents it at `emet_session_open` and passes the returned session handle on later writes in that session. The server stamps the key's tag. The owner approves a pending sub-key at `/owner/chooser` on this host (the same host as `/mcp`). `/owner/approvals` was retired by R4: it answers with a pointer to the chooser, and the sub-key records stay listed there. The chooser asks for the existing owner passphrase (`EMET_OAUTH_PASSPHRASE`, the same check as the OAuth consent page). A wrong passphrase counts toward the same per-address lockout as `/oauth/approve`. A correct passphrase opens a session that lasts 15 minutes. The page lists each pending request by tag, key id prefix and requested time. Approve or Deny may include a reason; the decision is recorded as the owner. Break-glass recovery, with no AI client, is `/owner/break-glass`. Revoke stays on the owner's own login. A key expires after 30 days; the owner can reissue it. Sub-key records live in their own collection; `read_doc` cannot return them, and only the owner and the chief of staff can read the list or its history. Turning `EMET_SUBKEYS` off ends every live sub-key session once, in the background at startup, when that collection already exists. The history event is written before the status change, and the row is kept. If the collection does not exist, startup does not create it. The sweep tries once, then a few times with backoff. With the flag off, a write that presents an `emh_` handle is refused without opening the store. A write that names a sub-key session is refused the same way only when that session was live at this process's sweep. That refusal lasts until the next restart, by which time those sessions are already ended. A store that ran the first build, which kept these rows in `emet/CLIENT_APPROVALS.md`, still has them in that document's history.
|
|
32
|
+
When `EMET_SUBKEYS=1`, bots that share the owner's login each hold a sub-key as a local secret. First use, in plain language, is [SUBKEYS.md](SUBKEYS.md). The key is never stored in an EMET document. The bot presents it at `emet_session_open` and passes the returned session handle on later writes in that session. The server stamps the key's tag. The owner approves a pending sub-key at `/owner/chooser` on this host (the same host as `/mcp`). `/owner/approvals` was retired by R4: it answers with a pointer to the chooser, and the sub-key records stay listed there. The chooser asks for the existing owner passphrase (`EMET_OAUTH_PASSPHRASE`, the same check as the OAuth consent page). A wrong passphrase counts toward the same per-address lockout as `/oauth/approve`. A correct passphrase opens a session that lasts 15 minutes. The page lists each pending request by tag, key id prefix and requested time. Approve or Deny may include a reason; the decision is recorded as the owner. Break-glass recovery, with no AI client, is `/owner/break-glass`. Revoke stays on the owner's own login. A key expires after 30 days; the owner can reissue it. Sub-key records live in their own collection; `read_doc` cannot return them, and only the owner and the chief of staff can read the list or its history. Turning `EMET_SUBKEYS` off ends every live sub-key session once, in the background at startup, when that collection already exists. The history event is written before the status change, and the row is kept. If the collection does not exist, startup does not create it. The sweep tries once, then a few times with backoff. With the flag off, a write that presents an `emh_` handle is refused without opening the store. A write that names a sub-key session is refused the same way only when that session was live at this process's sweep. That refusal lasts until the next restart, by which time those sessions are already ended. A store that ran the first build, which kept these rows in `emet/CLIENT_APPROVALS.md`, still has them in that document's history. See `docs/proposals/EMET-0001-delegated-client-sub-keys.md`.
|
|
33
33
|
|
|
34
34
|
1. **Roster row.** Add the bot to `bots/ROSTER.md`, filled from `templates/ROSTER.md`: tag, name, role, host, machine, handoff doc, tool profile, owner, status. The hub keeps the roster. Read back: `read_doc bots/ROSTER.md`.
|
|
35
35
|
2. **Register the tag as a source.** Append the tag to `EMET_SOURCE_TAGS` (comma list) on the deployment. Without it, the bot's transcript appends are refused (`src/dispatch.js` `requireRegisteredSource`). The operator reads the variable back from the deployment (a bot cannot read deployment settings from a session).
|
|
36
36
|
3. **Make the tag a bot tag.** Append `bots/<tag>/HANDOFF.md` to `EMET_RECORD_DOCS` (comma list). This one id is the only switch: nothing else — not the tag's prefix, not `EMET_SOURCE_TAGS`, not the roster — tells the server a tag is a bot (`src/session-graph.js` `isBotTag`; `docs/DEPLOY.md`).
|
|
37
37
|
- **Setting the variable replaces its value.** Keep every entry already there and append.
|
|
38
38
|
- The id must match exactly: the tag's exact case, no leading `./`. A typo silently leaves the tag on host rules.
|
|
39
|
-
- If your install still uses the legacy `CASCADE_RECORD_DOCS`, edit that one, or move its entries into `EMET_RECORD_DOCS`: once the `EMET_` name is set, the `CASCADE_` one is ignored.
|
|
39
|
+
- If your install still uses the legacy `CASCADE_RECORD_DOCS`, edit that one, or move its entries into `EMET_RECORD_DOCS`: once the `EMET_` name is set, the `CASCADE_` one is ignored. `CASCADE_` names are legacy environment names so an older install still starts. They are not a second product.
|
|
40
40
|
- The ids are a deploy setting rather than code defaults on purpose: they name your bots, which differ per install, and removing one id puts that tag back on host rules without a release.
|
|
41
41
|
- Changing a variable redeploys the service. Note the new deployment id.
|
|
42
42
|
4. **Owner approval and the bot's own key.** When more than one bot shares the owner login and `EMET_SUBKEYS=1` is on, the owner approves the bot's own key at `/owner/chooser`. An AI does not grant a writer and does not approve that key. The bot presents the `emk_` key once at `emet_session_open` and keeps the returned `session_handle` for later writes. Read back: the chooser lists the request before the decision, and the bot's first successful open returns `session_handle`. With sub-keys off, skip this step. See [SUBKEYS.md](SUBKEYS.md).
|
package/docs/DEPLOY.md
CHANGED
|
@@ -13,6 +13,24 @@ 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.6
|
|
17
|
+
|
|
18
|
+
0.3.6 is a docs and wording release. Stored data shapes are unchanged. No new setting. Deploy over 0.3.5 as is. The public roadmap's Upcoming work section is not built unless it says so.
|
|
19
|
+
|
|
20
|
+
ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
21
|
+
|
|
22
|
+
## Upgrading to 0.3.5
|
|
23
|
+
|
|
24
|
+
0.3.5 brings the public docs current. Stored data shapes are unchanged. The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, a chooser decision, and a break-glass reissue.
|
|
25
|
+
|
|
26
|
+
ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
27
|
+
|
|
28
|
+
## Upgrading to 0.3.4
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
|
|
33
|
+
|
|
16
34
|
## Upgrading to 0.3.2
|
|
17
35
|
|
|
18
36
|
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 +77,38 @@ Atlas UI for the new privilege: Database Access → Custom Roles → edit the ro
|
|
|
59
77
|
| `PUBLIC_URL` | yes | The public **https** base URL. This is the OAuth issuer and must match the deployed URL exactly. |
|
|
60
78
|
| `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
79
|
| `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/
|
|
80
|
+
| `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
81
|
| `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
82
|
| `EMET_SUBKEY_PEPPER_VERSION` | with that flag | `1` until the pepper is rotated. Set it with the other two, then redeploy. |
|
|
65
83
|
| `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
84
|
| `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
85
|
| `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. |
|
|
86
|
+
| `EMET_SOURCE_TAGS` | optional | Comma-separated registered tags. Unset accepts any tag and turns the bot guards off. |
|
|
87
|
+
| `EMET_SIGNING_KEY` | optional | HMAC key for signed digests. Unset saves entries unsigned. |
|
|
88
|
+
| `EMET_INVITES` | optional | `1` turns guest codes on. Unset leaves that door shut. |
|
|
89
|
+
| `EMET_MEMBER_ACCESS` | optional | `1` turns member codes on. Unset leaves that door shut. |
|
|
90
|
+
| `EMET_STRICT_LOGIN_TAG` | optional | `1` makes a login's bound tag final. Off unless set to `1`. |
|
|
91
|
+
| `EMET_CIMD` | optional | Client ID Metadata Documents stay on unless this is `0`. |
|
|
92
|
+
| `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. |
|
|
93
|
+
| `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. |
|
|
94
|
+
| `EMET_RESTORE_TAGS` | optional | Comma-separated tags allowed to `restore_doc`. Unset uses `EMET_SOURCE_TAG`. If both are unset, no tag can restore. |
|
|
95
|
+
| `EMET_COS_TAG` | optional | Chief-of-staff tag that may review new clients. Unset: the owner reviews them. |
|
|
96
|
+
| `EMET_ACTIVE_GEMS` | optional | Comma-separated GEM ids to turn on. Unset leaves a bundled GEM off unless its manifest says `defaultOn`. |
|
|
97
|
+
| `EMET_SUBKEY_PEPPER_PREV` | optional | Previous pepper, still accepted during rotation. |
|
|
98
|
+
| `EMET_SUBKEY_PEPPER_PREV_VERSION` | optional | Version number of that previous pepper. |
|
|
99
|
+
| `EMET_SUBKEY_TTL_DAYS` | optional | Key lifetime in days. Default 30, at most 90. |
|
|
100
|
+
| `EMET_SUBKEY_GRACE_MINUTES` | optional | How long a replaced key stays valid. Default 10. `0` revokes it at once. |
|
|
101
|
+
| `EMET_SUBKEY_FAIL_MAX` | optional | Failed presentations before lockout. Default 5. |
|
|
102
|
+
| `EMET_SUBKEY_FAIL_WINDOW_MS` | optional | How long a failed presentation counts, in milliseconds. Default 900000. A value below 1000 is ignored. |
|
|
103
|
+
| `EMET_AUDIT_LOG` | optional | Path for the audit log. Unset leaves it off. |
|
|
104
|
+
| `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. |
|
|
105
|
+
| `EMET_HANDOFF_DOC` | optional | Handoff document id. Default `HANDOFF.md`. |
|
|
106
|
+
| `EMET_STATE_DOC` | optional | Board document id. Default `STATE.md`. |
|
|
107
|
+
| `EMET_INSTALL_DOC` | optional | Install-notes document id. Default `bootstrap/INSTALL.md`. |
|
|
108
|
+
| `EMET_CHARACTER_DOC` | optional | Character document. Unset tries `bootstrap/CHARACTER.md`, then `bootstrap/SOUL.md`, then `bootstrap/PERSONALITY.md`. |
|
|
109
|
+
| `EMET_RECORD_DOCS` | optional | Extra record document ids, comma-separated. |
|
|
110
|
+
| `EMET_TEMPLATE_MAP` | optional | Extra `id=template` pairs for `validate_doc`. An entry that would change a built-in mapping is ignored. |
|
|
111
|
+
| `EMET_READ_DOC_PAGE` | optional | `read_doc` page limit in bytes as the host receives it. Default 18000. |
|
|
68
112
|
| `PORT` | auto | Injected by the platform. |
|
|
69
113
|
| `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
114
|
|
|
@@ -72,10 +116,10 @@ Atlas UI for the new privilege: Database Access → Custom Roles → edit the ro
|
|
|
72
116
|
|
|
73
117
|
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
118
|
|
|
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`, `
|
|
119
|
+
- **`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
120
|
- 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
121
|
- **`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
|
-
- **A scheduled job that still sends a `cloud-scheduled-` prefix must switch to an exact registered tag.**
|
|
122
|
+
- **A scheduled job that still sends a `cloud-scheduled-` prefix must switch to an exact registered tag.** A prefix is not a tag. Only an exact tag in `EMET_SOURCE_TAGS` is accepted.
|
|
79
123
|
- **An HTTP client whose stored token has no source tag must sign in again.** Refresh of that token is refused. The new consent binds a registered tag. An empty registry has no members.
|
|
80
124
|
- **Caps already in force.** A client that used to send more is refused, and nothing is written:
|
|
81
125
|
- 20 new drops per New York day, in one bucket: the whole local process on stdio, one shared visitor bucket for HTTP with no signed-in client, the source tag bound at approval when there is one, or that OAuth client otherwise. A source the caller types does not move the bucket.
|
|
@@ -112,7 +156,7 @@ railway up
|
|
|
112
156
|
railway variables --set MONGODB_URI=... --set MONGODB_DB=emet \
|
|
113
157
|
--set EMET_OAUTH_PASSPHRASE=... --set EMET_SOURCE_TAGS=mobile,desktop,cli
|
|
114
158
|
railway domain # get the public URL
|
|
115
|
-
railway variables --set PUBLIC_URL=https://<
|
|
159
|
+
railway variables --set PUBLIC_URL=https://<public-host>
|
|
116
160
|
railway up # redeploy so PUBLIC_URL matches the live URL
|
|
117
161
|
```
|
|
118
162
|
|
|
@@ -197,16 +241,11 @@ guards, so it can still write the main records and any bot's folder. To fence a
|
|
|
197
241
|
variables in one change. **With `EMET_SOURCE_TAGS` unset, both guards are opt-in and off:** any
|
|
198
242
|
caller can write the main records and every bot folder, so set the registry on any shared install.
|
|
199
243
|
|
|
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.
|
|
244
|
+
**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:
|
|
245
|
+
`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`.
|
|
246
|
+
These read `process.env` directly, so a `CASCADE_` name is ignored. The complete list is:
|
|
247
|
+
`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`.
|
|
248
|
+
(`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
249
|
|
|
211
250
|
**The two-pass deploy is not optional.** `PUBLIC_URL` is the OAuth issuer; until it matches
|
|
212
251
|
the real URL, authorization fails in ways that look like a client problem.
|
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 |
|