@dreamforgestudiollc/emet 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.env.example +29 -0
  2. package/CHANGELOG.md +49 -11
  3. package/CHARTER.md +1 -1
  4. package/CONTRIBUTING.md +21 -0
  5. package/README.md +25 -10
  6. package/RELEASE_NOTES-0.2.6.md +43 -0
  7. package/RELEASE_NOTES-0.3.6.md +29 -0
  8. package/RELEASE_NOTES-0.3.7.md +19 -0
  9. package/SECURITY.md +13 -0
  10. package/docs/BOTS.md +4 -4
  11. package/docs/DEPLOY.md +23 -4
  12. package/docs/ERROR-CODES-SPEC.md +4 -0
  13. package/docs/ERROR-CODES.md +7 -0
  14. package/docs/GUIDED-SETUP.md +1 -1
  15. package/docs/ROADMAP.md +62 -49
  16. package/docs/SETUP.md +11 -1
  17. package/docs/SUBKEYS.md +3 -1
  18. package/docs/continuity-currency-statechart.md +34 -0
  19. package/docs/features/README.md +21 -0
  20. package/docs/features/access.md +28 -0
  21. package/docs/features/documents.md +35 -0
  22. package/docs/features/errors.md +32 -0
  23. package/docs/features/gems.md +31 -0
  24. package/docs/features/memory.md +29 -0
  25. package/docs/features/pages.md +28 -0
  26. package/docs/features/record.md +27 -0
  27. package/docs/features/search.md +27 -0
  28. package/docs/features/startup.md +29 -0
  29. package/docs/features/subkeys.md +30 -0
  30. package/docs/features/transcripts.md +33 -0
  31. package/docs/per-tag-handoff-statechart.md +147 -0
  32. package/docs/subkey-session-statechart.md +57 -0
  33. package/package.json +6 -2
  34. package/server.json +27 -2
  35. package/src/annotations.js +5 -3
  36. package/src/attribution.js +2 -2
  37. package/src/carry-forward-close.js +1 -1
  38. package/src/chooser.js +74 -3
  39. package/src/conformance.js +2 -0
  40. package/src/continuity-currency-statechart.js +139 -0
  41. package/src/continuity-currency.js +869 -0
  42. package/src/database.js +1 -1
  43. package/src/dispatch.js +1 -1
  44. package/src/error-codes.js +7 -0
  45. package/src/gem-check.js +4 -1
  46. package/src/grants.js +28 -5
  47. package/src/host-reach.js +1 -1
  48. package/src/http-remote.js +29 -5
  49. package/src/index.js +3 -2
  50. package/src/invites.js +2 -2
  51. package/src/owl.js +12 -11
  52. package/src/pages.js +15 -0
  53. package/src/per-tag-handoff-statechart.js +264 -0
  54. package/src/per-tag-handoff.js +988 -0
  55. package/src/persons.js +16 -0
  56. package/src/session-graph.js +123 -12
  57. package/src/session.js +56 -12
  58. package/src/setup.js +32 -11
  59. package/src/startup-pages.js +13 -2
  60. package/src/subkey-lifecycle.js +105 -0
  61. package/src/subkey-session-statechart.js +253 -0
  62. package/src/subkeys.js +648 -89
  63. package/src/tools.js +171 -51
  64. package/src/transcript-session.js +2 -2
  65. package/src/version.js +1 -1
  66. package/templates/INDEX.md +1 -0
  67. package/templates/SESSIONDISPOSITION.md +2 -2
  68. package/templates/TAGHANDOFF.md +45 -0
  69. package/verification/continuity-currency/ContinuityCurrency.cfg +12 -0
  70. package/verification/continuity-currency/ContinuityCurrency.tla +239 -0
  71. package/verification/continuity-currency/tlc-output.txt +32 -0
  72. package/verification/continuity-currency/view.mjs +54 -0
  73. package/verification/load-gate/load-gate.mjs +1 -1
  74. package/verification/per-tag-handoff/PerTagHandoff.cfg +10 -0
  75. package/verification/per-tag-handoff/PerTagHandoff.tla +191 -0
  76. package/verification/per-tag-handoff/StampCounter.cfg +10 -0
  77. package/verification/per-tag-handoff/out/report.md +6 -0
  78. package/verification/per-tag-handoff/out-counter/chart.mmd +30 -0
  79. package/verification/per-tag-handoff/out-counter/report.md +15 -0
  80. package/verification/per-tag-handoff/out-counter/tlc.out +130 -0
  81. package/verification/per-tag-handoff/split/PerTagConflict.cfg +6 -0
  82. package/verification/per-tag-handoff/split/PerTagConflict.tla +104 -0
  83. package/verification/per-tag-handoff/split/PerTagTime.cfg +8 -0
  84. package/verification/per-tag-handoff/split/PerTagTime.tla +100 -0
  85. package/verification/per-tag-handoff/split/conflict-chart.mmd +47 -0
  86. package/verification/per-tag-handoff/split/conflict-report.md +8 -0
  87. package/verification/per-tag-handoff/split/conflict-tlc.txt +19 -0
  88. package/verification/per-tag-handoff/split/conflict-view.mjs +34 -0
  89. package/verification/per-tag-handoff/split/time-chart.mmd +44 -0
  90. package/verification/per-tag-handoff/split/time-report.md +8 -0
  91. package/verification/per-tag-handoff/split/time-tlc.txt +19 -0
  92. package/verification/per-tag-handoff/split/time-view.mjs +33 -0
  93. package/verification/per-tag-handoff/tlc-output.txt +19 -0
  94. package/verification/per-tag-handoff/v1-draft/PerTagHandoff.cfg +5 -0
  95. package/verification/per-tag-handoff/v1-draft/PerTagHandoff.tla +94 -0
  96. package/verification/per-tag-handoff/v1-draft/out/chart.mmd +37 -0
  97. package/verification/per-tag-handoff/v1-draft/out/report.md +7 -0
  98. package/verification/per-tag-handoff/v1-draft/out/tlc.out +19 -0
  99. package/verification/per-tag-handoff/v1-draft/view.mjs +20 -0
  100. package/verification/per-tag-handoff/view.mjs +31 -0
  101. package/verification/subkey-session/SubkeySession.cfg +11 -0
  102. package/verification/subkey-session/SubkeySession.tla +254 -0
  103. package/verification/subkey-session/tlc-output.txt +13 -0
package/.env.example CHANGED
@@ -81,6 +81,14 @@ EMET_SOURCE_TAGS=laptop,phone,cli
81
81
  # How long a failed presentation counts, in milliseconds. Default 15 minutes.
82
82
  # Values below 1000 are ignored.
83
83
  # EMET_SUBKEY_FAIL_WINDOW_MS=900000
84
+ # A session handle lasts 12 hours. The last EMET_SUBKEY_RENEWAL_MINUTES
85
+ # (default 60) ask the caller to open again with the sub-key and the handle.
86
+ # After expiry, EMET_SUBKEY_HANDLE_GRACE_MINUTES (default 60) is the window
87
+ # in which that pair still renews. Past it, a periodic sweep closes the
88
+ # session. The row stays. EMET_SUBKEY_SWEEP_MINUTES (default 15) is the period.
89
+ # EMET_SUBKEY_RENEWAL_MINUTES=60
90
+ # EMET_SUBKEY_HANDLE_GRACE_MINUTES=60
91
+ # EMET_SUBKEY_SWEEP_MINUTES=15
84
92
 
85
93
  # The monorail, the server-side check on the order of a session's writes
86
94
  # (docs/GUARDRAILS-AND-MONORAILS.md), runs in enforce only and has no setting:
@@ -147,6 +155,27 @@ EMET_SOURCE_TAGS=laptop,phone,cli
147
155
  # The session handoff and the board.
148
156
  # EMET_HANDOFF_DOC=HANDOFF.md
149
157
  # EMET_STATE_DOC=STATE.md
158
+ # Continuity-currency gate. Off unless the value is 1. The owner sets the value.
159
+ # When 1, emet_initialize and emet_session_open compare the served HANDOFF to
160
+ # the material episodic tip and add continuity_currency. A lag warns and does
161
+ # not block. The server does not rewrite HANDOFF or STATE.
162
+ # EMET_CONTINUITY_CURRENCY_BLOCK is reserved and is not applied.
163
+ # EMET_CONTINUITY_CURRENCY=
164
+ # Per-tag handoffs. Off unless the value is warn or enforce. Off is the default.
165
+ # warn refuses the new HANDOFF/ prefix at once. The board-row warning and the
166
+ # gap on HANDOFF.md and another tag's bots/ folder are kept. enforce refuses
167
+ # those too. Turning the flag on with EMET_HUB_TAG unset refuses every write (EMET-CFG-015).
168
+ # A bot on the shared owner login needs its own sub-key before
169
+ # the flag leaves off. With the flag at warn or enforce, a declared session tag
170
+ # that is not the credential is refused (EMET-DOC-088). A call that declares no
171
+ # tag is kept. With the flag off that check does not run.
172
+ # EMET_HUB_TAG is the only tag that writes HANDOFF.md. Set it before the flag
173
+ # leaves off. EMET_HANDOFF_AGING_DAYS defaults to 7. EMET_STALE_OPEN_HOURS
174
+ # defaults to 24. The continuity-currency gate stays warn-only.
175
+ # EMET_TAG_HANDOFFS=off
176
+ # EMET_HUB_TAG=
177
+ # EMET_HANDOFF_AGING_DAYS=7
178
+ # EMET_STALE_OPEN_HOURS=24
150
179
  # The user's host-and-machine notes.
151
180
  # EMET_INSTALL_DOC=bootstrap/INSTALL.md
152
181
  # The character document (character and voice). When unset, the usual
package/CHANGELOG.md CHANGED
@@ -7,19 +7,57 @@ change before 1.0.
7
7
 
8
8
  ## Unreleased
9
9
 
10
- Nothing is waiting above 0.3.5.
10
+ Nothing is waiting above 0.3.7.
11
+
12
+ ## 0.3.7 - 2026-11-21
13
+
14
+ Per-tag handoffs and sub-key session renewal. Stored data shapes are unchanged. Stored rows are not rewritten. The declared version is 0.3.7. This revision is not published from this change. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
15
+
16
+ ### Added
17
+ - Per-tag handoffs ship off by default. `EMET_TAG_HANDOFFS` stays off unless the owner sets `warn` or `enforce`. Each write tag's handoff is `HANDOFF/<tag>.md`. The hub tag keeps `HANDOFF.md`. The shared view is computed on read and is not a record. `EMET-DOC-088` runs only while `EMET_TAG_HANDOFFS` is `warn` or `enforce`. A call that declares no tag is kept. A bot on the shared owner login needs its own sub-key before the flag leaves off.
18
+ - When per-tag handoffs are on, material episodic rows written before `2026-09-27T00:00:00.000Z` with no registered source are listed as legacy (`legacy_pre_attribution`, cutoff basis `after_last_unsourced_episodic`). Those rows do not make the overall check warn. A row at or after the cutoff with no registered source still warns.
19
+ - Continuity currency (`EMET_CONTINUITY_CURRENCY`) compares the served handoff with the live material episodic tip on `emet_initialize` and `emet_session_open`. It defaults off. Set it to `1` to turn it on. A lag warns and does not block. The server does not rewrite HANDOFF or STATE. `EMET_CONTINUITY_CURRENCY_BLOCK` is reserved and is not applied.
20
+ - Sub-key sessions renew in the handle's last hour (`EMET_SUBKEY_RENEWAL_MINUTES`, default 60) and for up to one hour after expiry (`EMET_SUBKEY_HANDLE_GRACE_MINUTES`, default 60). An open that presents the key and the current handle closes the old session into the new one. The old row stays. The default handle length stays 12 hours.
21
+ - A server sweep (`EMET_SUBKEY_SWEEP_MINUTES`, default 15) marks a stranded session `auto_closed` after the grace window. Nothing is deleted. The row and the transcript stay.
22
+ - `emet_subkey_set_kind` sets `client_kind` to `bot` or `chat` on an approved key. A key with no kind stored is a bot. A chat key whose previous turn left no wrap-up is reported unwrapped on the next open.
23
+ - The npm package includes `docs/features/`.
24
+ - [RELEASE_NOTES-0.3.7.md](RELEASE_NOTES-0.3.7.md).
25
+
26
+ ### Changed
27
+ - `emet_status` does not write. A status read of a stranded session is not refused and does not record `handle_expired`.
28
+ - Listings gain `emet_subkey_set_kind`. With `EMET_SUBKEYS=1` the server registers 43 tools. With sub-keys off the list stays 38.
29
+
30
+ ### Fixed
31
+ - `docs/features/` is part of the published package. A relative link from the README to that directory is in the tarball.
32
+
33
+ ### Upgrade
34
+ - No stored-data migration. No new required setting. Deploy over 0.3.6 as is. Optional settings keep their defaults. Listings gain `emet_subkey_set_kind`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
35
+
36
+ ## 0.3.6 - 2026-11-11
37
+
38
+ 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.
39
+
40
+ ### Added
41
+ - [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.
42
+ - [RELEASE_NOTES-0.3.6.md](RELEASE_NOTES-0.3.6.md).
43
+
44
+ ### Changed
45
+ - 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.
46
+
47
+ ### Upgrade
48
+ - 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.
11
49
 
12
50
  ## 0.3.5 - 2026-11-10
13
51
 
14
52
  This release brings the public docs current with the code. Stored data shapes are unchanged. The declared version is 0.3.5.
15
53
 
16
54
  ### Upgrade
17
- - The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, and a chooser decision. The alias is a digest, so this package does not spell the old tag.
55
+ - 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.
18
56
 
19
57
  ### Changed
20
58
  - `CHARTER.md` §4 says the extension socket is built. It is `src/socket.js`. Its note is `docs/gem/README.md`. Public text no longer names an install-specific hub or host tag. Writer-approval text says the hub login. The tag that login matches is still `hub-bot`. The bound-door tag the server matches is `bound-host`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
21
59
  - The site tool table counts 38 tools with sub-keys off: 15 read-only, 13 additive, and 8 that replace or hand out access, plus `retire_doc` and `emet_status`. The public site says 0.3.2 was published to npm on 2026-10-28. Owner instructions name `/owner/chooser`. `docs/ROADMAP.md` is dated 2026-11-10, marks the site and the npm package live, and names the 0.3.0 topic-page tools `emet_page`, `emet_pages`, and `emet_page_lint`. `.env.example` and `docs/DEPLOY.md` document `EMET_CLAIMED_TAG_KILL_DATE` (unset uses `2026-12-15`, then `EMET-AUTH-040`), `EMET_DEEP_LINK_TTL_MINUTES` (default 15), and `EMET_RESTORE_TAGS`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
22
- - The README counts 38 tools with sub-keys off, 15 of them read-only, and 42 with `EMET_SUBKEYS=1`. `docs/ROADMAP.md` names the same live count, and GEM socket PR 4 is shipped in 0.2.6. `docs/SETUP.md` and `docs/DEPLOY.md` carry upgrading notes through 0.3.5. The public site has What-changed sections for 0.3.1, 0.3.2, 0.3.3, and 0.3.4. Comments no longer name the private repository or the retired account id. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
60
+ - 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.
23
61
  - Version 0.3.5. `package.json`, `package-lock.json`, `server.json`, `glama.json`, `.cursor-plugin/plugin.json`, and `src/version.js` agree. The README and the public site name the same version. `mcp.json` has no version. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
24
62
  - The default `EMET_REPORT_EMAIL` is `dreamforgestudio@mail.grokbot.com` again. The default in 0.3.2, 0.3.3, and 0.3.4, `dreamforgestudio@mail.hubbot.com`, was wrong. The 0.3.1 line below records the address that release shipped.
25
63
 
@@ -38,18 +76,18 @@ Public pull request #26, the changes since 0.3.3. Stored data shapes are unchang
38
76
 
39
77
  ## 0.3.3 - 2026-11-03
40
78
 
41
- Listing text from public pull request #24, plus the public parts of private #97 and #98. Private #95 (session disposition) and #96 (the 0.3.2 public sync) are already in 0.3.2. Stored data shapes are unchanged. 0.3.3 was published to npm on 2026-11-03. Filled disposition inventories stay in the private repository.
79
+ 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.
42
80
 
43
81
  ### Added
44
- - Carry-forward close. `emet_session_close` takes `carry_forward` with `disposition_doc`, `disposition_version`, and `citations` when a later session already advanced HANDOFF or STATE. The owner door, or the credential that wrote the session, cites a current conforming session disposition (`CARRIED_FORWARD`, `SUPERSEDED_BY_LATER_SESSION`, or `ABANDONED_NO_TRANSCRIPT`) and those later versions. `RETAINED_OPEN_CRITICAL` stays open. A declared source is not authority. Transcripts stay. A refused call is not counted. A receipt close blocked only because a later session holds HANDOFF or STATE stays blocked and is not counted. From private #97. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
45
- - 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.
82
+ - 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.
83
+ - 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.
46
84
 
47
85
  ### Fixed
48
86
  - 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.
49
87
 
50
88
  ## 0.3.2 - 2026-10-28
51
89
 
52
- Release notes for the access ladder and the work after 0.3.1. npm is not published from this change. 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.
90
+ 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.
53
91
 
54
92
  ### Added
55
93
  - 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.
@@ -117,10 +155,10 @@ Release notes for the access ladder and the work after 0.3.1. npm is not publish
117
155
  - 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.
118
156
  - 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`.
119
157
  - 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.
120
- - The GC-19 load gate is an allowlist (`verification/load-gate/load-gate.mjs`, the file EMET-GEMs vendors 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.
158
+ - 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.
121
159
  - The per-RUNE description and served response wrap the `metadata.gem` value in backticks, so the sentence period is not copied with the value.
122
160
  - 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>'`.
123
- - 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`). Alex 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.
161
+ - 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.
124
162
  - 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.
125
163
  - Bot-team backup references name `gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md`, the file on disk.
126
164
 
@@ -130,7 +168,7 @@ Release notes for the access ladder and the work after 0.3.1. npm is not publish
130
168
  - 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.
131
169
 
132
170
  ### Docs
133
- - Client-side execution of RUNED directives (GEP-0003, accepted by Alex 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.
171
+ - 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.
134
172
 
135
173
  ## 0.2.5 - 2026-10-14
136
174
 
@@ -159,7 +197,7 @@ Per-session attribution with client approval, the GEM socket with the bundled Ne
159
197
  ### Docs
160
198
 
161
199
  - 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).
162
- - GEM standard, Draft revision 2026-10-11, in `gem-library/` (canonical home: the private repository EMET-GEMs). 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.
200
+ - 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.
163
201
  - 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`.
164
202
 
165
203
  ## 0.2.4 - 2026-10-08
package/CHARTER.md CHANGED
@@ -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** | **The socket is built.** It is `src/socket.js`. Its note is `docs/gem/README.md`. The standard is specified. The seat for a GEM (Golem Expertise Module). A RUNED directive (Registered Utility Node Executable Directive) is a declared, registered tool built into a GEM. A RUNED GEM carries at least one. The 2026-09-08 names (Guided Engagement Module, Registered Utility Node Extension) are superseded. The standard lives in the GEM library: private repository EMET-GEMs (`https://github.com/dreamforgestudiollc/EMET-GEMs`). In this repository the text under review is `gem-library/` until that folder is moved. **Precedence:** core floor protections outrank the user's current word, which outranks active GEMs by priority. A GEM may change a modifiable default (voice, pace, how much is explained) only with the user's consent when it is activated (the 2026-09-11 decision, kept for those defaults). **Floor protection:** core floor protections are non-removable. No GEM may weaken them. A GEM may add depth that complements them. Neurodivergent engagement lives in the bundled Neurendipity GEM (`neurendipity`), which is off unless the user asks for it. The list of GEMs installed on this server, active or not, is part of `emet_initialize` and of what a bot is shown at startup. Only the user and the user's bots change the GEM standard. Anyone may author a GEM that follows it. A GEM that does not ship inside an EMET release loads only after the library's security gate and the user's acceptance. The socket enforces that (commitment 5). **Client execution, a carve-out from commitment 1 (2026-10-16):** EMET verifies the record, not the computation. Client-executed RUNE results are recorded as attested by the client; they are replayable from recorded inputs, not re-executed by EMET. The socket does not run RUNE code. | `src/socket.js`, `docs/gem/README.md`, `gem-library/SPEC.md` |
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
 
@@ -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.5. EMET is still 0.x: stored document shapes may change before 1.0. Pin a version if you depend on them.
29
+ - **MIT.** Version 0.3.7. 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
- ## 30-second start
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.
@@ -98,7 +108,7 @@ Member (read and write) access, both off by default.
98
108
 
99
109
  ## Two ways in
100
110
 
101
- A session that has not initialized can read everything and can write only a new drop (`drops/<date>-<slug>.md`): its items, wrap-up and handoff. A session with a registered source and the full startup has full access. Every initialized session sees unhandled drops first. A board edit is refused only for a drop that was listed at that session's boot. New drops are capped at 20 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. Drops are never deleted.
111
+ A session that has not initialized can read everything and can write only a new drop (`drops/<date>-<slug>.md`): its items, wrap-up and handoff. A session with a registered source and the full startup has full access. With `EMET_TAG_HANDOFFS` off, the default, one hub handoff is what initialize serves. With it `warn` or `enforce`, initialize serves `handoff_view` for every tag. A write tag also receives its own handoff. A read-only tag receives the view only. The write is checked against the credential, not a declared tag. With `EMET_TAG_HANDOFFS` off, an HTTP save may still name `metadata.source`. With the flag at `warn` or `enforce`, the session tag on HTTP is the credential. A declared tag that differs, and a claimed tag naming a session, are refused (`EMET-DOC-088`). A call that declares no tag is kept. A bot on the shared owner login needs its own sub-key before that flag leaves off. On stdio the declared tag stands. Every initialized session sees unhandled drops first. A board edit is refused only for a drop that was listed at that session's boot. New drops are capped at 20 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. Drops are never deleted.
102
112
 
103
113
  ## Editing working state
104
114
 
@@ -257,6 +267,9 @@ same page. The bot presents the key once at `emet_session_open`. See
257
267
  **Pass `session_handle` on every write in a sub-key session.** `emet_session_open` returns
258
268
  `session_handle` once. Later writes in that session pass `session_handle`. A write that names
259
269
  the session and omits the handle, or sends a different one, is refused, and nothing is written.
270
+ The handle lasts 12 hours. In the last hour, and for one hour after it expires, an open that
271
+ presents the sub-key and the handle closes the old session into the new one. The server closes
272
+ a session that is past that grace on its own. A status read of a stranded session is not refused.
260
273
  The handle is not a receipt and is not written into a document. With sub-keys off, the field is
261
274
  absent. See [docs/SUBKEYS.md](docs/SUBKEYS.md) and [docs/PERMISSIONS.md](docs/PERMISSIONS.md).
262
275
 
@@ -693,7 +706,7 @@ are in [`docs/GUARDRAILS-AND-MONORAILS.md`](docs/GUARDRAILS-AND-MONORAILS.md).
693
706
 
694
707
  ## Tools
695
708
 
696
- Thirty-eight tools are registered with sub-keys off. With `EMET_SUBKEYS=1`, four more (`emet_subkey_request`, `emet_subkey_claim`, `emet_subkey_revoke`, `emet_subkey_end_session`) and the `subkey` and `session_handle` arguments. The names below are every tool the registry registers, both sets together.
709
+ Thirty-eight tools are registered with sub-keys off. With `EMET_SUBKEYS=1`, five more (`emet_subkey_request`, `emet_subkey_claim`, `emet_subkey_revoke`, `emet_subkey_end_session`, `emet_subkey_set_kind`) and the `subkey` and `session_handle` arguments. The names below are every tool the registry registers, both sets together.
697
710
 
698
711
  <!-- emet-tools -->
699
712
  ```
@@ -717,6 +730,7 @@ emet_subkey_claim
717
730
  emet_subkey_end_session
718
731
  emet_subkey_request
719
732
  emet_subkey_revoke
733
+ emet_subkey_set_kind
720
734
  emet_transcript_append
721
735
  list_docs
722
736
  patch_doc
@@ -769,6 +783,8 @@ After a complete close a session takes exactly one more append, its closing exch
769
783
  part, and is then locked; a retry of it writes nothing. Corrections with `revise_transcript` stay
770
784
  allowed but must keep exactly the same exchange numbers.
771
785
 
786
+ **Continuity currency** — `EMET_CONTINUITY_CURRENCY` is off unless it is `1`. With it on, initialize and session open add `continuity_currency`. A lag warns and does not block. The server does not rewrite HANDOFF or STATE. When `EMET_TAG_HANDOFFS` is `warn` or `enforce`, that reading also carries `handoff_view`, `own_handoff`, and `stale_open`. An open session with material work is an in-progress line. It is not a lag. `EMET_HANDOFF_AGING_DAYS` defaults to 7. `EMET_STALE_OPEN_HOURS` defaults to 24. Material episodic rows written before `2026-09-27T00:00:00.000Z` with no registered source are `legacy_pre_attribution` and do not make the overall check warn. A newer untagged row still warns. A stamp that is not the view in force says to re-read the handoff view. `EMET-CFG-015` is the per-tag flag on with `EMET_HUB_TAG` unset. Nothing is refused because a handoff is stale.
787
+
772
788
  **During the session** — `emet_transcript_append` after every reply, one exchange at a time.
773
789
  Every write tool also takes `session_id` and `exchange`, and returns `session_graph.next`, the
774
790
  next stop on the monorail ([Guardrails & Monorails](docs/GUARDRAILS-AND-MONORAILS.md)).
@@ -885,12 +901,11 @@ Honest list, because the point of this project is that it behaves predictably:
885
901
  - The monorail (session graph) refuses every skipped step (enforce only since 2026-10-03; there
886
902
  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
903
  the reply text. See [Guardrails & Monorails](docs/GUARDRAILS-AND-MONORAILS.md).
888
- - The scheduled weekly intake writes without opening a session, so the session-order check
889
- refuses those writes (gate `no_session`) until the routine opens a session with its startup's
890
- `load_id` and passes the `session_id`. Its old source tag, `cloud-scheduled-intake`, was retired on
891
- 2026-10-02. A `cloud-scheduled-` prefix is not a registered tag, and those writes are refused.
892
- The weekly intake runs under `intake-bot`. `emet_gaps` keeps counting the rows already written
893
- under the old tag as ambiguous attribution instead of rewriting history.
904
+ - A scheduled job that writes without opening a session is refused by the session-order check
905
+ (gate `no_session`) until it opens a session with its startup's `load_id` and passes the
906
+ `session_id`. A `cloud-scheduled-` prefix is not a registered tag. Only an exact tag in
907
+ `EMET_SOURCE_TAGS` is accepted. `emet_gaps` keeps counting rows already written under an old
908
+ tag as ambiguous attribution instead of rewriting history.
894
909
  - `save_transcript`'s description does not state that it stores content verbatim; the
895
910
  implementation does.
896
911
  - No export / import / restore-and-compare yet.
@@ -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.7. 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.
@@ -0,0 +1,19 @@
1
+ # EMET 0.3.7
2
+
3
+ EMET is an MCP server for document control (ISO 9001 7.5.3 / ISO 13485 4.2.5): persistent shared memory for AI agents, bot teams, and chats. Version 0.3.7. EMET holds no certification and claims no conformity. The stored document shapes are not frozen. Pin a version if you depend on them. Stored rows are not rewritten. No new setting is required. This revision is not published from this file. See [CHANGELOG.md](CHANGELOG.md).
4
+
5
+ ## What changed
6
+
7
+ Per-tag handoffs ship off unless the owner sets `EMET_TAG_HANDOFFS` to `warn` or `enforce`. Each write tag keeps `HANDOFF/<tag>.md`. The hub tag keeps `HANDOFF.md`. The shared view is computed on read and is not a record. A call that declares no tag is kept. A stale handoff does not refuse a call.
8
+
9
+ When that flag is on, material episodic rows written before `2026-09-27T00:00:00.000Z` with no registered source are listed as legacy pre-attribution. They do not make the overall check warn. A newer untagged row still warns.
10
+
11
+ Continuity currency (`EMET_CONTINUITY_CURRENCY`) compares the served handoff with the live material episodic tip on `emet_initialize` and `emet_session_open`. It defaults off. Set it to `1` to turn it on. A lag warns and does not block. The server does not rewrite HANDOFF or STATE. `EMET_CONTINUITY_CURRENCY_BLOCK` is reserved and is not applied.
12
+
13
+ A sub-key handle still lasts 12 hours. In the last hour, and for one hour after expiry, an open with the key and the current handle renews the session. After that, a sweep marks a stranded session `auto_closed`. Nothing is deleted. The row and the transcript stay. A chat key with no wrap-up is reported unwrapped on the next open. `emet_subkey_set_kind` stores `bot` or `chat`. A key with no kind stored is a bot. `emet_status` does not write.
14
+
15
+ The npm package includes `docs/features/`.
16
+
17
+ ## Upgrade
18
+
19
+ No stored-data migration. No new required setting. Deploy over 0.3.6 as is. Listings gain `emet_subkey_set_kind`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
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: DRAFT, for the user's review · 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)
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.
@@ -27,16 +27,16 @@ If one agent talks to you on behalf of the others — relays their reports up an
27
27
 
28
28
  Do these in order. Each step names what to read back. Steps 2 and 3 are **one change**: set `EMET_SOURCE_TAGS` and `EMET_RECORD_DOCS` together, in one deployment. A tag registered as a source but not yet listed as a bot is treated as a host in between.
29
29
 
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`.
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`. A bot that shares the owner login needs its own sub-key before `EMET_TAG_HANDOFFS` leaves off. With that flag at `warn` or `enforce`, an HTTP session tag comes from the credential. A declared tag that differs, and a claimed tag naming a session, are refused (`EMET-DOC-088`). A call that declares no tag is kept. With the flag off, that check does not run. On stdio the declared tag stands. In enforce, nobody writes inside another tag's `bots/<tag>/` folder, the hub included.
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. Production did not run that build. See `docs/proposals/EMET-0001-delegated-client-sub-keys.md`.
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,9 +13,19 @@ 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.7
17
+
18
+ 0.3.7 adds per-tag handoffs, off unless the owner sets `EMET_TAG_HANDOFFS` to `warn` or `enforce`, and sub-key session renewal. Stored rows are not rewritten. No new setting is required. A bot on the shared owner login needs its own sub-key before that flag leaves off. With the flag at `warn` or `enforce`, a declared session tag that is not the credential is refused (`EMET-DOC-088`). A call that declares no tag is kept. With the flag off that check does not run. `EMET_SUBKEY_RENEWAL_MINUTES`, `EMET_SUBKEY_HANDLE_GRACE_MINUTES`, and `EMET_SUBKEY_SWEEP_MINUTES` default to 60, 60, and 15. The handle length stays 12 hours. Listings gain `emet_subkey_set_kind`. ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
19
+
20
+ ## Upgrading to 0.3.6
21
+
22
+ 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.
23
+
24
+ ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
25
+
16
26
  ## Upgrading to 0.3.5
17
27
 
18
- 0.3.5 brings the public docs current. Stored data shapes are unchanged. The bound door's tag is `bound-host`. Writes from a stored legacy token or sub-key are stamped `bound-host`. The alias covers stored data only. The previous spelling is refused for a new consent, a new sub-key request, a new writer request, a new member or guest code, a new setup source, and a chooser decision.
28
+ 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.
19
29
 
20
30
  ISO 9001 7.5.3 / ISO 13485 4.2.5 document-control wording is unchanged.
21
31
 
@@ -98,6 +108,15 @@ Atlas UI for the new privilege: Database Access → Custom Roles → edit the ro
98
108
  | `EMET_REPORT_EMAIL` | optional | Address for the error-report draft. Unset uses `dreamforgestudio@mail.grokbot.com`. An empty string returns the report and no email. |
99
109
  | `EMET_HANDOFF_DOC` | optional | Handoff document id. Default `HANDOFF.md`. |
100
110
  | `EMET_STATE_DOC` | optional | Board document id. Default `STATE.md`. |
111
+ | `EMET_SUBKEY_RENEWAL_MINUTES` | optional | Last stretch of a 12-hour sub-key handle, in minutes, during which an open with the key and the current handle renews. Default 60. |
112
+ | `EMET_SUBKEY_HANDLE_GRACE_MINUTES` | optional | Minutes after handle expiry during which the key and the current handle still renew. Default 60. After that, the sweep may mark the session `auto_closed`. The row and the transcript stay. |
113
+ | `EMET_SUBKEY_SWEEP_MINUTES` | optional | How often the server looks for stranded sub-key sessions. Default 15. |
114
+ | `EMET_CONTINUITY_CURRENCY` | optional | `1` adds a warn-only continuity reading on initialize and session open. Unset is off. A lag does not block, and the server does not rewrite HANDOFF or STATE. |
115
+ | `EMET_CONTINUITY_CURRENCY_BLOCK` | optional | Reserved. It is not applied. The reading stays warn-only. |
116
+ | `EMET_TAG_HANDOFFS` | optional | Off unless the value is `warn` or `enforce`. Off is the default. A bot on the shared owner login needs its own sub-key before the flag leaves off. With the flag at `warn` or `enforce`, a declared session tag that is not the credential is refused (`EMET-DOC-088`). A call that declares no tag is kept. With the flag off that check does not run. |
117
+ | `EMET_HUB_TAG` | optional | The only tag that writes `HANDOFF.md` when per-tag handoffs are on. Unset while the flag is `warn` or `enforce` refuses every write (`EMET-CFG-015`). |
118
+ | `EMET_HANDOFF_AGING_DAYS` | optional | Days before a handoff line in the computed view is aging. Default 7. |
119
+ | `EMET_STALE_OPEN_HOURS` | optional | Hours before an open session with material work is marked stale-open. Default 24. |
101
120
  | `EMET_INSTALL_DOC` | optional | Install-notes document id. Default `bootstrap/INSTALL.md`. |
102
121
  | `EMET_CHARACTER_DOC` | optional | Character document. Unset tries `bootstrap/CHARACTER.md`, then `bootstrap/SOUL.md`, then `bootstrap/PERSONALITY.md`. |
103
122
  | `EMET_RECORD_DOCS` | optional | Extra record document ids, comma-separated. |
@@ -113,7 +132,7 @@ Read this before you deploy the release that follows 0.2.2. It does not change a
113
132
  - **`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.
114
133
  - 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.
115
134
  - **`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.
116
- - **A scheduled job that still sends a `cloud-scheduled-` prefix must switch to an exact registered tag.** `cloud-scheduled-intake` was retired on 2026-10-02. A prefix is not a tag. The weekly intake runs under `intake-bot`.
135
+ - **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.
117
136
  - **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.
118
137
  - **Caps already in force.** A client that used to send more is refused, and nothing is written:
119
138
  - 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.
@@ -150,7 +169,7 @@ railway up
150
169
  railway variables --set MONGODB_URI=... --set MONGODB_DB=emet \
151
170
  --set EMET_OAUTH_PASSPHRASE=... --set EMET_SOURCE_TAGS=mobile,desktop,cli
152
171
  railway domain # get the public URL
153
- railway variables --set PUBLIC_URL=https://<app>.up.railway.app
172
+ railway variables --set PUBLIC_URL=https://<public-host>
154
173
  railway up # redeploy so PUBLIC_URL matches the live URL
155
174
  ```
156
175
 
@@ -236,7 +255,7 @@ variables in one change. **With `EMET_SOURCE_TAGS` unset, both guards are opt-in
236
255
  caller can write the main records and every bot folder, so set the registry on any shared install.
237
256
 
238
257
  **Legacy `CASCADE_` names.** A setting read through `setting()` also accepts the legacy `CASCADE_` name. The `EMET_` name wins when both are set. The complete list is:
239
- `EMET_ACTIVE_GEMS`, `EMET_AUDIT_LOG`, `EMET_CHARACTER_DOC`, `EMET_CIMD`, `EMET_CLAIMED_TAG_KILL_DATE`, `EMET_CLOSE_GRACE_MINUTES`, `EMET_COS_TAG`, `EMET_DEEP_LINK_TTL_MINUTES`, `EMET_GAP_BASELINE`, `EMET_HANDOFF_DOC`, `EMET_INSTALL_DOC`, `EMET_INVITES`, `EMET_MEMBER_ACCESS`, `EMET_OAUTH_PASSPHRASE`, `EMET_READ_DOC_PAGE`, `EMET_RECORD_DOCS`, `EMET_RESTORE_TAGS`, `EMET_SIGNING_KEY`, `EMET_SOURCE_TAG`, `EMET_SOURCE_TAGS`, `EMET_STATE_DOC`, `EMET_STRICT_LOGIN_TAG`, `EMET_SUBKEY_FAIL_MAX`, `EMET_SUBKEY_FAIL_WINDOW_MS`, `EMET_SUBKEY_GRACE_MINUTES`, `EMET_SUBKEY_PEPPER`, `EMET_SUBKEY_PEPPER_PREV`, `EMET_SUBKEY_PEPPER_PREV_VERSION`, `EMET_SUBKEY_PEPPER_VERSION`, `EMET_SUBKEY_TTL_DAYS`, `EMET_SUBKEYS`, `EMET_TEMPLATE_MAP`, `EMET_TIMEZONE`.
258
+ `EMET_ACTIVE_GEMS`, `EMET_AUDIT_LOG`, `EMET_CHARACTER_DOC`, `EMET_CIMD`, `EMET_CLAIMED_TAG_KILL_DATE`, `EMET_CLOSE_GRACE_MINUTES`, `EMET_CONTINUITY_CURRENCY`, `EMET_CONTINUITY_CURRENCY_BLOCK`, `EMET_COS_TAG`, `EMET_DEEP_LINK_TTL_MINUTES`, `EMET_GAP_BASELINE`, `EMET_HANDOFF_AGING_DAYS`, `EMET_HANDOFF_DOC`, `EMET_HUB_TAG`, `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_STALE_OPEN_HOURS`, `EMET_STATE_DOC`, `EMET_STRICT_LOGIN_TAG`, `EMET_SUBKEY_FAIL_MAX`, `EMET_SUBKEY_FAIL_WINDOW_MS`, `EMET_SUBKEY_GRACE_MINUTES`, `EMET_SUBKEY_HANDLE_GRACE_MINUTES`, `EMET_SUBKEY_PEPPER`, `EMET_SUBKEY_PEPPER_PREV`, `EMET_SUBKEY_PEPPER_PREV_VERSION`, `EMET_SUBKEY_PEPPER_VERSION`, `EMET_SUBKEY_RENEWAL_MINUTES`, `EMET_SUBKEY_SWEEP_MINUTES`, `EMET_SUBKEY_TTL_DAYS`, `EMET_SUBKEYS`, `EMET_TAG_HANDOFFS`, `EMET_TEMPLATE_MAP`, `EMET_TIMEZONE`.
240
259
  These read `process.env` directly, so a `CASCADE_` name is ignored. The complete list is:
241
260
  `EMET_COLLECTION_PREFIX`, `EMET_CORPORA`, `EMET_CORPUS_COLLECTION`, `EMET_CORPUS_INDEX`, `EMET_CRASH_LOG`, `EMET_DROP_LIST_TIMEOUT_MS`, `EMET_HTTP_LISTEN`, `EMET_INIT_PAGE_BYTES`, `EMET_REPORT_EMAIL`, `EMET_REQUEST_LOG`, `EMET_VECTOR_INDEX`.
242
261
  (`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.
@@ -41,3 +41,7 @@ EMET itself never sends the report. A person can open the mailto draft. An assis
41
41
  The calling assistant may send this report only after showing the report to its user and getting their OK. That sentence is in the tool description and in the tool output. It is not part of the report body, so the text the recipient reads stays the report.
42
42
 
43
43
  This is an owner decision added after the report was specified as a draft the person sends. The server stays free of SMTP and of any network call on this path.
44
+
45
+ ## Handoff refusals
46
+
47
+ `EMET-DOC-084` is another tag's handoff, or the hub handoff written by a tag that is not the hub, or the draft id `handoffs/<tag>.md`, or an unregistered credential, or a file in another tag's `bots/<tag>/` folder. `EMET-DOC-085` is a board row the credential did not open, including a deleted row, a restore, a row already on the board with no opener, and a hub write that is not resolving a marked conflict. A hub resolve whose stamp is no longer the view in force is the same code: the message says the stamp is not the view in force and to re-read the handoff view. That includes a stamp whose open sessions, aging, stale-open hours, or registry no longer match, so a hub whose own session becomes tagged after initialize re-reads before the resolve. `EMET-DOC-086` is a reserved two-segment handoff id, a tag equal to a person id, a malformed id, or a tag whose characters the id does not allow. `EMET-DOC-087` is a claimed tag writing under `HANDOFF/`. `EMET-DOC-088` is a declared session tag that is not the HTTP credential, including a claimed tag naming a session. It applies only while `EMET_TAG_HANDOFFS` is `warn` or `enforce`, and only when the call declares a tag. A call that declares no tag is kept. With the flag off the check does not run, and the declared tag is kept. `EMET-CFG-015` is the per-tag flag on with `EMET_HUB_TAG` unset. The registry table is [ERROR-CODES.md](ERROR-CODES.md).
@@ -64,6 +64,7 @@ Internal codes are raised inside a check that catches them before a caller sees
64
64
  | EMET-CFG-012 | Backup answer must be yes or no | active |
65
65
  | EMET-CFG-013 | Setup requires the owner | active |
66
66
  | EMET-CFG-014 | Store is already set up | active |
67
+ | EMET-CFG-015 | Per-tag handoffs are on and the hub tag is unset | active |
67
68
  | EMET-DB-001 | MONGODB_URI is not set | active |
68
69
  | EMET-DB-002 | Failed to connect to MongoDB | active |
69
70
  | EMET-DB-003 | Query failed on a memory layer | active |
@@ -178,6 +179,11 @@ Internal codes are raised inside a check that catches them before a caller sees
178
179
  | EMET-DOC-078 | Commit reason does not match the stage | active |
179
180
  | EMET-DOC-079 | This call's source does not match the stage | active |
180
181
  | EMET-DOC-080 | This call's session does not match the stage | active |
182
+ | EMET-DOC-084 | Another tag's handoff, folder, or an unregistered credential | active |
183
+ | EMET-DOC-085 | A credential changed a board row it did not open | active |
184
+ | EMET-DOC-086 | A reserved, malformed, or person-equal handoff id | active |
185
+ | EMET-DOC-087 | A claimed tag cannot write a handoff | active |
186
+ | EMET-DOC-088 | A declared session tag is not the credential | active |
181
187
  | EMET-GEM-001 | Read-back found no document | active |
182
188
  | EMET-GEM-002 | Read-back content digest differs | active |
183
189
  | EMET-GEM-003 | Read-back version differs | active |
@@ -278,6 +284,7 @@ Internal codes are raised inside a check that catches them before a caller sees
278
284
  | EMET-SESS-005 | Session graph is unavailable | active |
279
285
  | EMET-SESS-006 | Session close was blocked | active |
280
286
  | EMET-SESS-007 | Session close escalated | active |
287
+ | EMET-SESS-014 | A stranded sub-key session needs a new open | active |
281
288
  | EMET-TOOL-001 | A tool has no annotation entry | active, internal |
282
289
  | EMET-TOOL-002 | A source tag is required | active |
283
290
  | EMET-TOOL-003 | A source tag is required and none are registered | active |