@dreamforgestudiollc/emet 0.2.4 → 0.3.0
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 +63 -0
- package/CHANGELOG.md +84 -3
- package/CHARTER.md +19 -7
- package/README.md +130 -21
- package/areas/emet.md +18 -0
- package/areas/garden.md +18 -0
- package/areas/health.md +18 -0
- package/areas/home.md +18 -0
- package/areas/learning.md +18 -0
- package/areas/state.md +18 -0
- package/docs/AUTHORSHIP.md +3 -3
- package/docs/BOTS.md +4 -0
- package/docs/COVERAGE.md +2 -2
- package/docs/DEPLOY.md +41 -5
- package/docs/ERROR-CODES-SPEC.md +43 -0
- package/docs/ERROR-CODES.md +332 -0
- package/docs/GUARDRAILS-AND-MONORAILS.md +2 -1
- package/docs/GUIDED-SETUP.md +24 -3
- package/docs/PERMISSIONS.md +13 -7
- package/docs/ROADMAP.md +18 -15
- package/docs/SETUP.md +123 -14
- package/docs/SUBKEYS.md +59 -0
- package/gems/artifact-index.json +12 -0
- package/gems/bot-team-backup/floor.json +15 -0
- package/gems/bot-team-backup/gem.json +43 -0
- package/gems/bot-team-backup/guides/BOT_TEAM_BACKUP.md +27 -0
- package/gems/bot-team-backup/guides/BOT_TEAM_RECOVERY.md +23 -0
- package/gems/fieldnote/floor.json +14 -0
- package/gems/fieldnote/gem.json +70 -0
- package/gems/fieldnote/runes/fieldnote.js +4 -0
- package/gems/lean-six-sigma/CHANGELOG.md +10 -0
- package/gems/lean-six-sigma/README.md +92 -0
- package/gems/lean-six-sigma/floor.json +31 -0
- package/gems/lean-six-sigma/gem.json +1296 -0
- package/gems/lean-six-sigma/guides/ASSUMPTIONS.md +45 -0
- package/gems/lean-six-sigma/guides/BELTS.md +52 -0
- package/gems/lean-six-sigma/guides/DMADV.md +56 -0
- package/gems/lean-six-sigma/guides/DMAIC.md +127 -0
- package/gems/lean-six-sigma/guides/FORMULAS.md +330 -0
- package/gems/lean-six-sigma/guides/LEAN.md +97 -0
- package/gems/lean-six-sigma/guides/TEMPLATES.md +279 -0
- package/gems/lean-six-sigma/runes/lss_capability.js +132 -0
- package/gems/lean-six-sigma/runes/lss_control_limits.js +240 -0
- package/gems/lean-six-sigma/runes/lss_dpmo_sigma.js +81 -0
- package/gems/lean-six-sigma/runes/lss_hypothesis.js +298 -0
- package/gems/lean-six-sigma/runes/lss_sample_size.js +81 -0
- package/gems/neurendipity/floor.json +65 -0
- package/gems/neurendipity/gem.json +42 -0
- package/gems/neurendipity/guides/AUTISTIC_BURNOUT.md +81 -0
- package/{guides → gems/neurendipity/guides}/NEURODIVERGENT_SUPPORT.md +17 -8
- package/guides/README.md +3 -0
- package/package.json +12 -5
- package/server.json +48 -4
- package/src/aleph.js +18 -12
- package/src/annotations.js +45 -5
- package/src/atlas-role.js +9 -4
- package/src/attribution.js +555 -0
- package/src/conformance.js +7 -5
- package/src/database.js +34 -17
- package/src/dispatch.js +136 -16
- package/src/env.js +54 -9
- package/src/error-codes.js +394 -0
- package/src/error-log.js +273 -0
- package/src/error-report.js +245 -0
- package/src/floor.js +84 -41
- package/src/gaps.js +41 -8
- package/src/gem-check.js +1360 -0
- package/src/guides.js +31 -4
- package/src/host-reach.js +23 -0
- package/src/http-remote.js +47 -2
- package/src/index.js +10 -2
- package/src/invites.js +6 -5
- package/src/layers.js +9 -8
- package/src/lessons-to-checks.js +3 -3
- package/src/logger.js +2 -1
- package/src/mongo-connect.js +50 -2
- package/src/oauth-provider.js +30 -29
- package/src/owner-approvals.js +281 -0
- package/src/pages.js +806 -0
- package/src/persons.js +22 -1
- package/src/provenance.js +10 -10
- package/src/redact.js +10 -4
- package/src/request-log.js +1 -1
- package/src/rune-dispatch.js +360 -0
- package/src/rune-registry.js +71 -0
- package/src/rune-scope.js +42 -0
- package/src/scopes.js +3 -0
- package/src/session-graph.js +15 -12
- package/src/session.js +10 -10
- package/src/setup.js +307 -36
- package/src/socket.js +545 -0
- package/src/startup-pages.js +26 -8
- package/src/startup-payload.js +12 -8
- package/src/subkey-store.js +358 -0
- package/src/subkeys.js +947 -0
- package/src/tools.js +518 -204
- package/src/transcript-session.js +1 -1
- package/src/validation.js +85 -52
- package/src/version.js +1 -1
- package/templates/AREA.md +35 -0
- package/templates/BOARD.md +2 -2
- package/templates/BOTHANDOFF.md +2 -2
- package/templates/CHARACTER.md +1 -1
- package/templates/HANDOFF.md +1 -1
- package/templates/IDENTITY.md +1 -1
- package/templates/INDEX.md +21 -20
- package/templates/INSTALL.md +1 -1
- package/templates/PROCEDURE.md +1 -1
- package/templates/ROSTER.md +2 -2
- package/templates/SEED.md +2 -2
- package/templates/STAGING.md +2 -2
- package/templates/STANDARD.md +5 -5
- package/templates/THREAD.md +1 -1
- package/templates/USER.md +4 -1
- package/verification/load-gate/corpus.json +1765 -0
- package/verification/load-gate/load-gate.mjs +1246 -0
package/areas/emet.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Area — EMET
|
|
2
|
+
|
|
3
|
+
## §0 RECORD CONTROL
|
|
4
|
+
- Template: `templates/AREA.md` · Area revision: the store's version governs
|
|
5
|
+
- Slug: emet
|
|
6
|
+
- Title: EMET
|
|
7
|
+
|
|
8
|
+
## §1 SELECTOR
|
|
9
|
+
- **Layers:** semantic, procedural, meta
|
|
10
|
+
- **Tags:** emet, memory, document-control
|
|
11
|
+
- **Keywords:** emet, memory
|
|
12
|
+
- **Doc id prefixes:** threads/emet
|
|
13
|
+
- **Source clients:** any
|
|
14
|
+
- **Staleness days:** 30
|
|
15
|
+
- **Item cap:** 40
|
|
16
|
+
|
|
17
|
+
## §2 SCOPE
|
|
18
|
+
Selector for the EMET topic. This document names what to look at. The page is computed when asked for.
|
package/areas/garden.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Area — Garden
|
|
2
|
+
|
|
3
|
+
## §0 RECORD CONTROL
|
|
4
|
+
- Template: `templates/AREA.md` · Area revision: the store's version governs
|
|
5
|
+
- Slug: garden
|
|
6
|
+
- Title: Garden
|
|
7
|
+
|
|
8
|
+
## §1 SELECTOR
|
|
9
|
+
- **Layers:** semantic, episodic
|
|
10
|
+
- **Tags:** garden, plants
|
|
11
|
+
- **Keywords:** garden
|
|
12
|
+
- **Doc id prefixes:** threads/garden
|
|
13
|
+
- **Source clients:** any
|
|
14
|
+
- **Staleness days:** 30
|
|
15
|
+
- **Item cap:** 40
|
|
16
|
+
|
|
17
|
+
## §2 SCOPE
|
|
18
|
+
Selector for the garden topic. This document names what to look at. The page is computed when asked for.
|
package/areas/health.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Area — Health
|
|
2
|
+
|
|
3
|
+
## §0 RECORD CONTROL
|
|
4
|
+
- Template: `templates/AREA.md` · Area revision: the store's version governs
|
|
5
|
+
- Slug: health
|
|
6
|
+
- Title: Health
|
|
7
|
+
|
|
8
|
+
## §1 SELECTOR
|
|
9
|
+
- **Layers:** semantic, procedural, episodic
|
|
10
|
+
- **Tags:** health
|
|
11
|
+
- **Keywords:** health, rest, walk
|
|
12
|
+
- **Doc id prefixes:** threads/health
|
|
13
|
+
- **Source clients:** any
|
|
14
|
+
- **Staleness days:** 30
|
|
15
|
+
- **Item cap:** 40
|
|
16
|
+
|
|
17
|
+
## §2 SCOPE
|
|
18
|
+
Selector for the health topic. This document names what to look at. The page is computed when asked for.
|
package/areas/home.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Area — Home
|
|
2
|
+
|
|
3
|
+
## §0 RECORD CONTROL
|
|
4
|
+
- Template: `templates/AREA.md` · Area revision: the store's version governs
|
|
5
|
+
- Slug: home
|
|
6
|
+
- Title: Home
|
|
7
|
+
|
|
8
|
+
## §1 SELECTOR
|
|
9
|
+
- **Layers:** semantic, episodic
|
|
10
|
+
- **Tags:** home
|
|
11
|
+
- **Keywords:** home
|
|
12
|
+
- **Doc id prefixes:** threads/home
|
|
13
|
+
- **Source clients:** any
|
|
14
|
+
- **Staleness days:** 30
|
|
15
|
+
- **Item cap:** 40
|
|
16
|
+
|
|
17
|
+
## §2 SCOPE
|
|
18
|
+
Selector for the home topic. This document names what to look at. The page is computed when asked for.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Area — Learning
|
|
2
|
+
|
|
3
|
+
## §0 RECORD CONTROL
|
|
4
|
+
- Template: `templates/AREA.md` · Area revision: the store's version governs
|
|
5
|
+
- Slug: learning
|
|
6
|
+
- Title: Learning
|
|
7
|
+
|
|
8
|
+
## §1 SELECTOR
|
|
9
|
+
- **Layers:** semantic, episodic, working
|
|
10
|
+
- **Tags:** learning
|
|
11
|
+
- **Keywords:** learning, notes, practice
|
|
12
|
+
- **Doc id prefixes:** threads/learning
|
|
13
|
+
- **Source clients:** any
|
|
14
|
+
- **Staleness days:** 30
|
|
15
|
+
- **Item cap:** 40
|
|
16
|
+
|
|
17
|
+
## §2 SCOPE
|
|
18
|
+
Selector for the learning topic. This document names what to look at. The page is computed when asked for.
|
package/areas/state.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Area — State
|
|
2
|
+
|
|
3
|
+
## §0 RECORD CONTROL
|
|
4
|
+
- Template: `templates/AREA.md` · Area revision: the store's version governs
|
|
5
|
+
- Slug: state
|
|
6
|
+
- Title: State
|
|
7
|
+
|
|
8
|
+
## §1 SELECTOR
|
|
9
|
+
- **Layers:** semantic, procedural, episodic, working
|
|
10
|
+
- **Tags:** status, decision, open
|
|
11
|
+
- **Keywords:** status, decision
|
|
12
|
+
- **Doc id prefixes:** threads/
|
|
13
|
+
- **Source clients:** any
|
|
14
|
+
- **Staleness days:** 30
|
|
15
|
+
- **Item cap:** 40
|
|
16
|
+
|
|
17
|
+
## §2 SCOPE
|
|
18
|
+
Selector for the generated state view that runs beside the hand-kept STATE.md board. STATE.md stays the board. This revision does not retire it.
|
package/docs/AUTHORSHIP.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Authorship
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Commits in this repository through `commit-40d8d2d` record the user's git identity in
|
|
4
|
+
the author field. Those changes were machine-authored — written by assistant
|
|
5
5
|
instances under the user's direction. No git user was configured in any scope,
|
|
6
6
|
so that identity was supplied per command.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
From `commit-e3cad45` the author field names the assistant and an `Approved-by` trailer
|
|
9
9
|
names the user, so what made a change and who accepted it are two separate
|
|
10
10
|
recorded facts rather than one conflated one.
|
|
11
11
|
|
package/docs/BOTS.md
CHANGED
|
@@ -27,6 +27,10 @@ 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`.
|
|
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/approvals` on this host (the same host as `/mcp`). The page is served only when `EMET_SUBKEYS=1`. It asks for the existing owner passphrase (`EMET_OAUTH_PASSPHRASE`, the same check as the OAuth consent page). A wrong passphrase on this page 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 and marked as coming from this page. 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`.
|
|
33
|
+
|
|
30
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`.
|
|
31
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).
|
|
32
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`).
|
package/docs/COVERAGE.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Code coverage
|
|
2
2
|
|
|
3
|
-
Measured 2026-10-07 22:44 UTC at
|
|
3
|
+
Measured 2026-10-07 22:44 UTC at commit `commit-08aba62`, Node v22.14.0. Regenerate with `npm run coverage`.
|
|
4
4
|
|
|
5
|
-
**An input to review, not a gate** (owner's ruling 2026-09-29). No threshold fails the build; the number is here so a reviewer or auditor can see what the suite exercises and what it does not.
|
|
5
|
+
**An input to review, not a gate** (owner's ruling 2026-09-29, procedural ref 398). No threshold fails the build; the number is here so a reviewer or auditor can see what the suite exercises and what it does not.
|
|
6
6
|
|
|
7
7
|
## Totals
|
|
8
8
|
|
package/docs/DEPLOY.md
CHANGED
|
@@ -13,6 +13,37 @@ 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.0
|
|
17
|
+
|
|
18
|
+
Error-log rotation deletes from `error_log` (10,000 entries or 90 days; daily summaries are
|
|
19
|
+
kept in `error_log_summary`). An existing custom role needs `REMOVE` on that collection only.
|
|
20
|
+
Save the role, then append the privilege. The full note
|
|
21
|
+
is [SETUP.md](SETUP.md#upgrading-to-030).
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json > role-before.json
|
|
25
|
+
atlas customDbRoles update emetRecordKeeper --privilege REMOVE@<db>.error_log --append --projectId <id>
|
|
26
|
+
atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`<db>` is `MONGODB_DB`. `<id>` is the project id from `atlas projects list`. In the JSON after
|
|
30
|
+
the change, a `REMOVE` resource has `"collection": "error_log"`. No `REMOVE` resource has an
|
|
31
|
+
empty collection, and this upgrade adds no other collection.
|
|
32
|
+
|
|
33
|
+
### Clear a stray DROP_COLLECTION
|
|
34
|
+
|
|
35
|
+
`DROP_COLLECTION` must not appear anywhere in that output.
|
|
36
|
+
An older stray `DROP_COLLECTION` on `_emet_verify` is not cleared by that append command. That append command cannot remove a privilege. Dry run first, then apply. The dry run calls the read-only `atlas customDbRoles describe emetRecordKeeper --projectId <id> --output json`. It needs Atlas auth and changes nothing. `--prefix <prefix>` is `EMET_COLLECTION_PREFIX` (default `emet_`). `--prefix` overrides `EMET_COLLECTION_PREFIX`. The effective prefix is `--prefix`, or else the env. Re-applying replaces prefixed privilege names if the effective prefix doesn't match the install.
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
node scripts/atlas-role.mjs --project <id> --db <db> --user <dbUsername> --prefix <prefix>
|
|
40
|
+
node scripts/atlas-role.mjs --project <id> --db <db> --user <dbUsername> --prefix <prefix> --apply
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or in the Atlas UI: Database Access → Custom Roles → edit the role and clear `DROP_COLLECTION`.
|
|
44
|
+
Atlas UI for the new privilege: Database Access → Custom Roles → edit the role → collection
|
|
45
|
+
`error_log`, action `REMOVE`. Leave `REMOVE` off every other collection and off the database-wide row.
|
|
46
|
+
|
|
16
47
|
## Environment variables
|
|
17
48
|
|
|
18
49
|
| Variable | Required | Purpose |
|
|
@@ -22,6 +53,9 @@ passphrase; both are required.
|
|
|
22
53
|
| `PUBLIC_URL` | yes | The public **https** base URL. This is the OAuth issuer and must match the deployed URL exactly. |
|
|
23
54
|
| `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. |
|
|
24
55
|
| `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. |
|
|
56
|
+
| `EMET_SUBKEYS` | when more than one bot shares the owner login | `1` turns on delegated client sub-keys. On this kind of host, set it in the platform's variables. Setup refuses to write a pepper into the container `.env`. Restart or redeploy so the tools and `/owner/approvals` appear together. See [SUBKEYS.md](SUBKEYS.md). |
|
|
57
|
+
| `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. |
|
|
58
|
+
| `EMET_SUBKEY_PEPPER_VERSION` | with that flag | `1` until the pepper is rotated. Set it with the other two, then redeploy. |
|
|
25
59
|
| `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. |
|
|
26
60
|
| `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`. |
|
|
27
61
|
| `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. |
|
|
@@ -32,7 +66,9 @@ passphrase; both are required.
|
|
|
32
66
|
|
|
33
67
|
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.
|
|
34
68
|
|
|
35
|
-
- **`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-
|
|
69
|
+
- **`EMET_SOURCE_TAGS` must list every real host tag**, as an exact member. Tags named in this repository's example env, docs, and live-tag checks are: `cli`, `mobile`, `desktop-cowork`, `cowork-cloud`, `grok-project`, `hub-bot` (the hub; do not also list it in `EMET_RECORD_DOCS`), `reviewer-bot`, `tester-bot`, `memory-bot`, `intake-bot`, and `research-bot`. Your install may use a shorter list. A tag that is not an exact member is refused, and the refusal does not print the list.
|
|
70
|
+
- 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.
|
|
71
|
+
- **`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.
|
|
36
72
|
- **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`.
|
|
37
73
|
- **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.
|
|
38
74
|
- **Caps already in force.** A client that used to send more is refused, and nothing is written:
|
|
@@ -99,8 +135,8 @@ pages each host fetched is kept in the server's memory for 60 minutes after its
|
|
|
99
135
|
after every deploy or restart, or a longer pause, an open with an older `load_id` is refused once
|
|
100
136
|
and told to call `emet_initialize {}` again.
|
|
101
137
|
|
|
102
|
-
There is no setting to turn the monorail's refusals off. In an emergency, redeploy
|
|
103
|
-
|
|
138
|
+
There is no setting to turn the monorail's refusals off. In an emergency, redeploy private main
|
|
139
|
+
as it stood before this release (commit-9bf9096) and check EMET_SESSION_GRAPH first: unset or report flags
|
|
104
140
|
skipped steps without blocking them (a closed session still takes no new exchanges, and a
|
|
105
141
|
session-store outage still blocks transcript writes and `emet_session_open`); enforce keeps
|
|
106
142
|
refusing; off stops consulting the graph, including the closed-session lock, so a closed session
|
|
@@ -160,7 +196,7 @@ the legacy `CASCADE_...` name as a deprecated fallback (the `EMET_` name wins wh
|
|
|
160
196
|
`EMET_SOURCE_TAG`, `EMET_SOURCE_TAGS`, `EMET_OAUTH_PASSPHRASE`, `EMET_AUDIT_LOG`, `EMET_HANDOFF_DOC`,
|
|
161
197
|
`EMET_STATE_DOC`, `EMET_INSTALL_DOC`, `EMET_CHARACTER_DOC`, `EMET_TEMPLATE_MAP`, `EMET_RECORD_DOCS`,
|
|
162
198
|
`EMET_READ_DOC_PAGE`, `EMET_SIGNING_KEY`, `EMET_GAP_BASELINE`, `EMET_CIMD`, `EMET_INVITES`,
|
|
163
|
-
`EMET_TIMEZONE` and `
|
|
199
|
+
`EMET_TIMEZONE`, `EMET_CLOSE_GRACE_MINUTES` and `EMET_ACTIVE_GEMS`. These read `process.env` directly, so **only the
|
|
164
200
|
`EMET_` name works** and a `CASCADE_` name is ignored: `EMET_COLLECTION_PREFIX`,
|
|
165
201
|
`EMET_VECTOR_INDEX`, `EMET_CORPUS_INDEX`, `EMET_CORPORA`, `EMET_CORPUS_COLLECTION`,
|
|
166
202
|
`EMET_REQUEST_LOG` and `EMET_CRASH_LOG`. (`MONGODB_URI`, `MONGODB_DB`, `PUBLIC_URL`, `PORT`, `HOST`,
|
|
@@ -222,7 +258,7 @@ you saved elsewhere. If the remote host sees what the laptop wrote, the deployme
|
|
|
222
258
|
|
|
223
259
|
## Notes
|
|
224
260
|
|
|
225
|
-
- **Release note: startup stage 1 (the
|
|
261
|
+
- **Release note: startup stage 1 (the ref 358 amendment).** Three behaviour changes take effect
|
|
226
262
|
live on deploy:
|
|
227
263
|
- **Re-running setup is refused.** `emet_setup_complete` on a store where both
|
|
228
264
|
`bootstrap/IDENTITY.md` and `bootstrap/USER.md` already exist is refused unless the call passes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Error codes and the error report
|
|
2
|
+
|
|
3
|
+
This is the behavior EMET 0.3.0 ships. The code table is generated from the registry: [ERROR-CODES.md](ERROR-CODES.md). A code’s meaning does not change. A removed code is added to the retired list, stays in that table, and its number is not reused.
|
|
4
|
+
|
|
5
|
+
## Where the code goes
|
|
6
|
+
|
|
7
|
+
Every error returned to a caller carries `error.emet_code`, shaped `EMET-<AREA>-<NNN>`. The existing `error.code` field (`VALIDATION_ERROR`, `DATABASE_ERROR`, `INTERNAL_ERROR`, and the rest) is unchanged. Message text is unchanged when a code is added.
|
|
8
|
+
|
|
9
|
+
An error that reaches the caller with no registered code is `EMET-INT-001`.
|
|
10
|
+
|
|
11
|
+
## The operational log
|
|
12
|
+
|
|
13
|
+
`error_log` is operational bookkeeping. It is not a memory, a document, or a transcript, and it is not a controlled record. No tool edits or deletes a log entry. A dated job removes a row when the log is over 10,000 entries or the row is older than 90 days, whichever comes first, and only after writing a daily summary (`day`, `emet_code`, `tool`, `version`, `count`) that is kept. The job logs how many rows it rotated.
|
|
14
|
+
|
|
15
|
+
A failed log write still returns the original error. The process log hears only the fixed line `error log write failed`.
|
|
16
|
+
|
|
17
|
+
A row stores the time, the code, the class code, the tool name, the version, the transport, the caller tag when that tag is registered, the role (`owner` or `guest`), a correlation id, and a count. It does not store argument values or names, message text, memory or document content, document ids or titles, area or page names, person names or ids, email addresses, IP addresses, tokens, passphrases, client secrets, query strings, or stack traces.
|
|
18
|
+
|
|
19
|
+
## The report
|
|
20
|
+
|
|
21
|
+
`emet_error_report` is owner-only and read-only. A local stdio session is the owner. On HTTP the signed-in person must have the owner role. Anyone else receives `EMET-AUTH-038` (“The error report is owner-only.”), not an empty report.
|
|
22
|
+
|
|
23
|
+
The tool writes nothing and sends nothing. EMET has no mail sender and opens no network connection for this tool.
|
|
24
|
+
|
|
25
|
+
Inputs are optional: `since` (default 7 days, at most 90), `codes`, `correlation_id`, and `limit` (default 50, maximum 200). A correlation id is looked up on its own, so the id the caller was given still resolves inside the log window even when `since` would exclude that day.
|
|
26
|
+
|
|
27
|
+
The result is, in order:
|
|
28
|
+
|
|
29
|
+
1. The full report, never truncated.
|
|
30
|
+
2. A `mailto:` draft, when an address is set.
|
|
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
|
+
|
|
33
|
+
`to` is `EMET_REPORT_EMAIL`. When the variable is unset, the address is `reports@example.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
|
+
|
|
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
|
+
|
|
37
|
+
## A bot may send it, after a yes
|
|
38
|
+
|
|
39
|
+
EMET itself never sends the report. A person can open the mailto draft. An assistant that has its own mailbox can send the structured email with its own email tool, addressed to the same `to`.
|
|
40
|
+
|
|
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
|
+
|
|
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.
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
# EMET error codes
|
|
2
|
+
|
|
3
|
+
Every error EMET returns carries a stable code in `error.emet_code`. The existing `error.code` field is unchanged. The same meaning keeps the same code. A code is not reused and its meaning is not changed. A retired number stays reserved in the list below and is not issued again.
|
|
4
|
+
|
|
5
|
+
Internal codes are raised inside a check that catches them before a caller sees them. If one ever reaches a caller it is still that code, not a new one.
|
|
6
|
+
|
|
7
|
+
| Code | Summary | Status |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| EMET-AUTH-001 | Could not allocate a person id | active |
|
|
10
|
+
| EMET-AUTH-002 | CIMD document is not a JSON object | active, internal |
|
|
11
|
+
| EMET-AUTH-003 | CIMD client_id does not match its URL | active, internal |
|
|
12
|
+
| EMET-AUTH-004 | CIMD redirect_uris are missing | active, internal |
|
|
13
|
+
| EMET-AUTH-005 | CIMD client is not public | active, internal |
|
|
14
|
+
| EMET-AUTH-006 | CIMD host is not a public address | active, internal |
|
|
15
|
+
| EMET-AUTH-007 | CIMD host did not resolve | active, internal |
|
|
16
|
+
| EMET-AUTH-008 | CIMD host resolves to a blocked address | active, internal |
|
|
17
|
+
| EMET-AUTH-009 | CIMD fetch rate limit | active, internal |
|
|
18
|
+
| EMET-AUTH-010 | CIMD fetch returned an HTTP error | active, internal |
|
|
19
|
+
| EMET-AUTH-011 | CIMD document exceeds the size cap | active, internal |
|
|
20
|
+
| EMET-AUTH-012 | CIMD document is not valid JSON | active, internal |
|
|
21
|
+
| EMET-AUTH-013 | Authorization code is not recognised | active |
|
|
22
|
+
| EMET-AUTH-014 | Authorization code has expired | active |
|
|
23
|
+
| EMET-AUTH-015 | Redirect URI does not match the code | active |
|
|
24
|
+
| EMET-AUTH-016 | Authorization code has already been used | active |
|
|
25
|
+
| EMET-AUTH-017 | Refresh token is not recognised | active |
|
|
26
|
+
| EMET-AUTH-018 | Refresh token has expired | active |
|
|
27
|
+
| EMET-AUTH-019 | Login has no source tag bound | active |
|
|
28
|
+
| EMET-AUTH-020 | Refresh token has already been replaced | active |
|
|
29
|
+
| EMET-AUTH-021 | Member access login can no longer be refreshed | active |
|
|
30
|
+
| EMET-AUTH-022 | Invite login can no longer be refreshed | active |
|
|
31
|
+
| EMET-AUTH-023 | A refresh cannot widen scope | active |
|
|
32
|
+
| EMET-AUTH-024 | Access token is not recognised | active |
|
|
33
|
+
| EMET-AUTH-025 | Access token has expired | active |
|
|
34
|
+
| EMET-AUTH-026 | Sub-key open lost a race | active |
|
|
35
|
+
| EMET-AUTH-027 | Sub-key store conflict | active |
|
|
36
|
+
| EMET-AUTH-028 | Sub-key refusal | active |
|
|
37
|
+
| EMET-AUTH-029 | Guest display name is required | active |
|
|
38
|
+
| EMET-AUTH-030 | Guest access is off on this install | active |
|
|
39
|
+
| EMET-AUTH-031 | A guest invite accepts only read access | active |
|
|
40
|
+
| EMET-AUTH-032 | Guest invite source is not a registered tag | active |
|
|
41
|
+
| EMET-AUTH-033 | Member display name is required | active |
|
|
42
|
+
| EMET-AUTH-034 | Member access is off on this install | active |
|
|
43
|
+
| EMET-AUTH-035 | Member code source is not a registered tag | active |
|
|
44
|
+
| EMET-AUTH-036 | Only the owner can create invites | active |
|
|
45
|
+
| EMET-AUTH-037 | Only the owner can create member access | active |
|
|
46
|
+
| EMET-AUTH-038 | The error report is owner-only | active |
|
|
47
|
+
| EMET-AUTH-039 | HTTP attribution preflight was refused | active |
|
|
48
|
+
| EMET-CFG-001 | Database name must be a plain name | active, internal |
|
|
49
|
+
| EMET-CFG-002 | Collection prefix must be a plain name | active, internal |
|
|
50
|
+
| EMET-CFG-004 | Hosted setup cannot turn sub-keys on from here | active |
|
|
51
|
+
| EMET-CFG-005 | Could not read .env | active |
|
|
52
|
+
| EMET-CFG-006 | Could not write .env | active |
|
|
53
|
+
| EMET-CFG-007 | Startup page is not a whole number | active |
|
|
54
|
+
| EMET-CFG-008 | Startup page does not exist | active |
|
|
55
|
+
| EMET-CFG-009 | First-time setup was given a bot tag | active |
|
|
56
|
+
| EMET-CFG-010 | Setup is missing required answers | active |
|
|
57
|
+
| EMET-CFG-011 | Sub-key answer must be yes or no | active |
|
|
58
|
+
| EMET-CFG-012 | Backup answer must be yes or no | active |
|
|
59
|
+
| EMET-CFG-013 | Setup requires the owner | active |
|
|
60
|
+
| EMET-CFG-014 | Store is already set up | active |
|
|
61
|
+
| EMET-DB-001 | MONGODB_URI is not set | active |
|
|
62
|
+
| EMET-DB-002 | Failed to connect to MongoDB | active |
|
|
63
|
+
| EMET-DB-003 | Query failed on a memory layer | active |
|
|
64
|
+
| EMET-DB-004 | Count failed on a memory layer | active |
|
|
65
|
+
| EMET-DB-005 | Unknown layer field | active |
|
|
66
|
+
| EMET-DB-006 | Failed to write to primary storage | active |
|
|
67
|
+
| EMET-DB-007 | Invalid memory layer | active |
|
|
68
|
+
| EMET-DB-008 | Failed to initialize a layer schema | active |
|
|
69
|
+
| EMET-DB-010 | Unknown layer in a gap query | active |
|
|
70
|
+
| EMET-DB-013 | Failed to save memory | active |
|
|
71
|
+
| EMET-DB-014 | Failed to revise memory | active |
|
|
72
|
+
| EMET-DB-015 | Failed to recall memories | active |
|
|
73
|
+
| EMET-DB-016 | Failed to query a layer | active |
|
|
74
|
+
| EMET-DB-017 | Failed to get system status | active |
|
|
75
|
+
| EMET-DB-018 | Failed to query transcripts | active |
|
|
76
|
+
| EMET-DB-019 | Failed to save a session transcript | active |
|
|
77
|
+
| EMET-DB-020 | Session open could not load unhandled drops | active |
|
|
78
|
+
| EMET-DB-021 | Session open could not check a closed session | active |
|
|
79
|
+
| EMET-DB-022 | Failed to revise a transcript | active |
|
|
80
|
+
| EMET-DB-023 | Failed to read a document | active |
|
|
81
|
+
| EMET-DB-024 | Failed to read document history | active |
|
|
82
|
+
| EMET-DB-025 | Failed to write a document | active |
|
|
83
|
+
| EMET-DB-026 | Failed to list documents | active |
|
|
84
|
+
| EMET-DB-027 | Retirement mark did not persist | active |
|
|
85
|
+
| EMET-DB-028 | Retiring altered the document | active |
|
|
86
|
+
| EMET-DB-029 | Failed to retire a document | active |
|
|
87
|
+
| EMET-DB-030 | Failed to rename a document | active |
|
|
88
|
+
| EMET-DB-031 | Failed to validate a document | active |
|
|
89
|
+
| EMET-DB-032 | Acceptance did not persist | active |
|
|
90
|
+
| EMET-DB-033 | Failed to accept a nonconformance | active |
|
|
91
|
+
| EMET-DB-034 | Failed to patch a document | active |
|
|
92
|
+
| EMET-DB-035 | Failed semantic recall | active |
|
|
93
|
+
| EMET-DB-036 | Failed corpus recall | active |
|
|
94
|
+
| EMET-DOC-001 | doc_id must be a non-empty string | active |
|
|
95
|
+
| EMET-DOC-002 | Document not found | active |
|
|
96
|
+
| EMET-DOC-003 | No retained revision | active |
|
|
97
|
+
| EMET-DOC-004 | expected_version is not a whole number | active |
|
|
98
|
+
| EMET-DOC-005 | Document changed while paging | active |
|
|
99
|
+
| EMET-DOC-006 | Version must be a positive integer | active |
|
|
100
|
+
| EMET-DOC-007 | A record is superseded, not amended | active |
|
|
101
|
+
| EMET-DOC-008 | Doc id is not stored as given | active |
|
|
102
|
+
| EMET-DOC-009 | Client approvals are kept by the server | active |
|
|
103
|
+
| EMET-DOC-010 | A declared tag wrote outside its own folder | active |
|
|
104
|
+
| EMET-DOC-011 | A bot may write only its own records | active |
|
|
105
|
+
| EMET-DOC-012 | Bot records require a registered tag | active |
|
|
106
|
+
| EMET-DOC-013 | A bot tag cannot write a main record | active |
|
|
107
|
+
| EMET-DOC-014 | Main records require a registered tag | active |
|
|
108
|
+
| EMET-DOC-015 | Content must be a non-empty string | active |
|
|
109
|
+
| EMET-DOC-016 | Content exceeds the 2MB limit | active |
|
|
110
|
+
| EMET-DOC-017 | A record revision must name what it supersedes | active |
|
|
111
|
+
| EMET-DOC-018 | supersedes does not name the revision in force | active |
|
|
112
|
+
| EMET-DOC-019 | A record revision needs a reason | active |
|
|
113
|
+
| EMET-DOC-020 | Unregistered source may write a new drop only | active |
|
|
114
|
+
| EMET-DOC-021 | Drop cap for the day is reached | active |
|
|
115
|
+
| EMET-DOC-022 | An existing working document is edited, not rewritten | active |
|
|
116
|
+
| EMET-DOC-023 | A drop id already exists | active |
|
|
117
|
+
| EMET-DOC-024 | A shipped copy is not replaced | active |
|
|
118
|
+
| EMET-DOC-025 | A write would condense a document below half | active |
|
|
119
|
+
| EMET-DOC-026 | A write would fall below half of the daily peak | active |
|
|
120
|
+
| EMET-DOC-027 | The board is never retired | active |
|
|
121
|
+
| EMET-DOC-028 | Working documents are edited, not retired | active |
|
|
122
|
+
| EMET-DOC-029 | retire_doc needs a reason | active |
|
|
123
|
+
| EMET-DOC-030 | old_id must be a non-empty string | active |
|
|
124
|
+
| EMET-DOC-031 | new_id must be a non-empty string | active |
|
|
125
|
+
| EMET-DOC-032 | old_id and new_id name the same document | active |
|
|
126
|
+
| EMET-DOC-033 | rename_doc needs a reason | active |
|
|
127
|
+
| EMET-DOC-034 | The board is never renamed | active |
|
|
128
|
+
| EMET-DOC-035 | A drop is write-once | active |
|
|
129
|
+
| EMET-DOC-036 | Rename destination already exists | active |
|
|
130
|
+
| EMET-DOC-037 | restore_doc needs a reason | active |
|
|
131
|
+
| EMET-DOC-038 | restore_doc needs a source | active |
|
|
132
|
+
| EMET-DOC-039 | A drop is never restored | active |
|
|
133
|
+
| EMET-DOC-040 | A record is not restored | active |
|
|
134
|
+
| EMET-DOC-041 | A shipped copy is not restored | active |
|
|
135
|
+
| EMET-DOC-042 | Restore source is not in EMET_RESTORE_TAGS | active |
|
|
136
|
+
| EMET-DOC-043 | Retained revision does not match its digest | active |
|
|
137
|
+
| EMET-DOC-044 | Templated revision has no conformance verdict | active |
|
|
138
|
+
| EMET-DOC-045 | Retained revision was not conforming | active |
|
|
139
|
+
| EMET-DOC-046 | validate_doc needs a document or content | active |
|
|
140
|
+
| EMET-DOC-047 | Template does not ship with this release | active |
|
|
141
|
+
| EMET-DOC-048 | An acceptance needs a written reason | active |
|
|
142
|
+
| EMET-DOC-049 | An acceptance reason is too short | active |
|
|
143
|
+
| EMET-DOC-050 | Document has no nonconformance to accept | active |
|
|
144
|
+
| EMET-DOC-051 | A required name is empty | active |
|
|
145
|
+
| EMET-DOC-052 | Document version conflict | active |
|
|
146
|
+
| EMET-DOC-053 | Patch target text was not found | active |
|
|
147
|
+
| EMET-DOC-054 | Patch target text matched more than once | active |
|
|
148
|
+
| EMET-DOC-055 | patch_doc needs a reason | active |
|
|
149
|
+
| EMET-DOC-056 | patch_doc cannot edit a drop | active |
|
|
150
|
+
| EMET-DOC-057 | old_str must be a non-empty string | active |
|
|
151
|
+
| EMET-DOC-058 | new_str must be a string | active |
|
|
152
|
+
| EMET-DOC-059 | Patch edits overlap | active |
|
|
153
|
+
| EMET-GEM-001 | Read-back found no document | active |
|
|
154
|
+
| EMET-GEM-002 | Read-back content digest differs | active |
|
|
155
|
+
| EMET-GEM-003 | Read-back version differs | active |
|
|
156
|
+
| EMET-GEM-004 | Read-back found no layer entry | active |
|
|
157
|
+
| EMET-GEM-005 | Layer sha256 column does not match content | active |
|
|
158
|
+
| EMET-GEM-006 | Read-back content differs | active |
|
|
159
|
+
| EMET-GEM-007 | Metadata digest column does not match | active |
|
|
160
|
+
| EMET-GEM-008 | Read-back metadata differs | active |
|
|
161
|
+
| EMET-GEM-009 | Unknown floor section | active |
|
|
162
|
+
| EMET-GEM-010 | Unknown GEM | active |
|
|
163
|
+
| EMET-GEM-011 | GEM is not loadable | active |
|
|
164
|
+
| EMET-GEM-012 | GEM has no floor | active |
|
|
165
|
+
| EMET-GEM-013 | GEM manifest schema id | active, internal |
|
|
166
|
+
| EMET-GEM-014 | Unexpected end of JSON | active, internal |
|
|
167
|
+
| EMET-GEM-015 | Unexpected character in JSON | active, internal |
|
|
168
|
+
| EMET-GEM-016 | Unexpected token in JSON | active, internal |
|
|
169
|
+
| EMET-GEM-017 | Bad number in JSON | active, internal |
|
|
170
|
+
| EMET-GEM-018 | Bad escape in JSON | active, internal |
|
|
171
|
+
| EMET-GEM-019 | Raw control character in a JSON string | active, internal |
|
|
172
|
+
| EMET-GEM-020 | Unterminated JSON string | active, internal |
|
|
173
|
+
| EMET-GEM-021 | Trailing comma in JSON | active, internal |
|
|
174
|
+
| EMET-GEM-022 | Expected a comma in JSON | active, internal |
|
|
175
|
+
| EMET-GEM-023 | Unterminated JSON array | active, internal |
|
|
176
|
+
| EMET-GEM-024 | Expected a JSON key | active, internal |
|
|
177
|
+
| EMET-GEM-025 | Duplicate JSON key | active, internal |
|
|
178
|
+
| EMET-GEM-026 | Forbidden JSON key | active, internal |
|
|
179
|
+
| EMET-GEM-027 | Expected a colon in JSON | active, internal |
|
|
180
|
+
| EMET-GEM-028 | Unterminated JSON object | active, internal |
|
|
181
|
+
| EMET-GEM-029 | JSON starts with a BOM | active, internal |
|
|
182
|
+
| EMET-GEM-030 | Trailing data after JSON | active, internal |
|
|
183
|
+
| EMET-GEM-031 | JSON number is not a safe integer | active, internal |
|
|
184
|
+
| EMET-GEM-032 | Unsupported JSON value | active, internal |
|
|
185
|
+
| EMET-GEM-033 | Attestation is immutable | active |
|
|
186
|
+
| EMET-GEM-034 | metadata.gem must name the active directive | active |
|
|
187
|
+
| EMET-GEM-035 | Served artifact has no hash pin | active |
|
|
188
|
+
| EMET-GEM-036 | No authenticated principal | active |
|
|
189
|
+
| EMET-GEM-037 | Serve log could not be written | active |
|
|
190
|
+
| EMET-GEM-038 | No serve event | active |
|
|
191
|
+
| EMET-GEM-039 | Client-reported sha256 is not accepted here | active |
|
|
192
|
+
| EMET-GEM-040 | Input hash or reference is required | active |
|
|
193
|
+
| EMET-GEM-041 | Served rune has no hash pin | active |
|
|
194
|
+
| EMET-GEM-042 | GEM socket failed closed | active |
|
|
195
|
+
| EMET-INT-001 | Unclassified internal error | active |
|
|
196
|
+
| EMET-MEM-001 | Unknown memory layer | active |
|
|
197
|
+
| EMET-MEM-002 | Unknown importance bucket | active |
|
|
198
|
+
| EMET-MEM-003 | Unknown importance bucket name | active |
|
|
199
|
+
| EMET-MEM-004 | Unknown importance degree | active |
|
|
200
|
+
| EMET-MEM-005 | Lesson metadata was refused | active |
|
|
201
|
+
| EMET-MEM-006 | session_id must come from emet_session_open | active |
|
|
202
|
+
| EMET-MEM-007 | Transcript positions cannot be read | active |
|
|
203
|
+
| EMET-MEM-008 | An entry must carry its source | active |
|
|
204
|
+
| EMET-MEM-009 | A correction names a missing entry | active |
|
|
205
|
+
| EMET-MEM-010 | Episodic revision is prohibited | active |
|
|
206
|
+
| EMET-MEM-011 | target_id must be a positive integer | active |
|
|
207
|
+
| EMET-MEM-012 | No entry with that id in the layer | active |
|
|
208
|
+
| EMET-MEM-013 | Entry is already superseded | active |
|
|
209
|
+
| EMET-MEM-014 | order must be latest | active |
|
|
210
|
+
| EMET-MEM-015 | Search term exceeds the maximum length | active |
|
|
211
|
+
| EMET-MEM-016 | Session slug was refused | active |
|
|
212
|
+
| EMET-MEM-017 | session_id is required | active |
|
|
213
|
+
| EMET-MEM-018 | Machine check refused the append | active |
|
|
214
|
+
| EMET-MEM-019 | A bot tag cannot retire documents | active |
|
|
215
|
+
| EMET-MEM-020 | A bot tag cannot rename documents | active |
|
|
216
|
+
| EMET-MEM-021 | The board already exists | active |
|
|
217
|
+
| EMET-MEM-022 | The board is never written with write_doc | active |
|
|
218
|
+
| EMET-MEM-023 | The board is provisioned by setup | active |
|
|
219
|
+
| EMET-MEM-024 | A board edit needs a session id | active |
|
|
220
|
+
| EMET-MEM-025 | Board edit blocked: drop list unknown | active |
|
|
221
|
+
| EMET-MEM-026 | Unhandled drops block a board restore | active |
|
|
222
|
+
| EMET-MEM-027 | Unhandled drops block a board edit | active |
|
|
223
|
+
| EMET-MEM-028 | An added board row needs origin | active |
|
|
224
|
+
| EMET-MEM-029 | The board edit is nonconforming | active |
|
|
225
|
+
| EMET-MEM-030 | Query must be a non-empty string | active |
|
|
226
|
+
| EMET-MEM-032 | Corpus name is not recognised | active |
|
|
227
|
+
| EMET-MEM-034 | Only a ready payload can be abridged | active |
|
|
228
|
+
| EMET-PAGE-001 | as_of must be an ISO date or unix seconds | active |
|
|
229
|
+
| EMET-PAGE-002 | Only the owner can create or edit an area document | active |
|
|
230
|
+
| EMET-PAGE-003 | Only the owner can read topic pages | active |
|
|
231
|
+
| EMET-PAGE-004 | Area must be a slug | active |
|
|
232
|
+
| EMET-PAGE-005 | No current area document | active |
|
|
233
|
+
| EMET-PAGE-006 | Lint found no current area document | active |
|
|
234
|
+
| EMET-PAGE-007 | Startup pages could not fit the budget | active |
|
|
235
|
+
| EMET-PROV-001 | derived_from must be an object | active |
|
|
236
|
+
| EMET-PROV-002 | derived_from has two origins | active |
|
|
237
|
+
| EMET-PROV-003 | derived_from needs a span or entries | active |
|
|
238
|
+
| EMET-PROV-004 | derived_from.entries must be a non-empty array | active |
|
|
239
|
+
| EMET-PROV-005 | Entry ids must be positive integers | active |
|
|
240
|
+
| EMET-PROV-006 | derived_from.session_id must be a non-empty string | active |
|
|
241
|
+
| EMET-PROV-007 | exchange_start must be a positive integer | active |
|
|
242
|
+
| EMET-PROV-008 | exchange_end is before exchange_start | active |
|
|
243
|
+
| EMET-PROV-009 | exchange_end must be a positive integer | active |
|
|
244
|
+
| EMET-PROV-010 | Provenance entry is required | active |
|
|
245
|
+
| EMET-RATE-001 | Rate limit exceeded | active |
|
|
246
|
+
| EMET-SESS-001 | The transcript position is not available | active |
|
|
247
|
+
| EMET-SESS-002 | Transcript timestamps must be numbers | active |
|
|
248
|
+
| EMET-SESS-003 | timestamp_start must be before timestamp_end | active |
|
|
249
|
+
| EMET-SESS-004 | session_id must be a string | active |
|
|
250
|
+
| EMET-SESS-005 | Session graph is unavailable | active |
|
|
251
|
+
| EMET-TOOL-001 | A tool has no annotation entry | active, internal |
|
|
252
|
+
| EMET-TOOL-002 | A source tag is required | active |
|
|
253
|
+
| EMET-TOOL-003 | A source tag is required and none are registered | active |
|
|
254
|
+
| EMET-TOOL-004 | Source tag is not registered | active |
|
|
255
|
+
| EMET-TOOL-005 | The call is outside the token scope | active |
|
|
256
|
+
| EMET-TOOL-006 | Exchange index was refused | active |
|
|
257
|
+
| EMET-TOOL-007 | Client approval was refused | active |
|
|
258
|
+
| EMET-TOOL-008 | Unknown tool | active |
|
|
259
|
+
| EMET-TOOL-009 | since must be an ISO date | active |
|
|
260
|
+
| EMET-TOOL-010 | since is older than 90 days | active |
|
|
261
|
+
| EMET-TOOL-011 | codes must be a list of EMET codes | active |
|
|
262
|
+
| EMET-TOOL-012 | limit must be a whole number from 1 to 200 | active |
|
|
263
|
+
| EMET-TOOL-013 | correlation_id must be 16 hex characters | active |
|
|
264
|
+
| EMET-TRN-001 | An exchange field exceeds the length cap | active |
|
|
265
|
+
| EMET-TRN-002 | Transcript request exceeds the length cap | active |
|
|
266
|
+
| EMET-TRN-003 | session_id must be a non-empty string | active |
|
|
267
|
+
| EMET-TRN-004 | session_start must be a Unix timestamp | active |
|
|
268
|
+
| EMET-TRN-005 | exchanges must be a non-empty array | active |
|
|
269
|
+
| EMET-TRN-006 | Exchange messages must be strings | active |
|
|
270
|
+
| EMET-TRN-007 | A transcript revision replaces the whole part | active |
|
|
271
|
+
| EMET-TRN-008 | A transcript correction needs a reason | active |
|
|
272
|
+
| EMET-TRN-009 | No transcript found under that session id | active |
|
|
273
|
+
| EMET-TRN-010 | exchange_index must be a whole number | active |
|
|
274
|
+
| EMET-VAL-001 | Content is required | active |
|
|
275
|
+
| EMET-VAL-002 | Content must be a string | active |
|
|
276
|
+
| EMET-VAL-003 | Content is shorter than the minimum | active |
|
|
277
|
+
| EMET-VAL-004 | Content exceeds the maximum length | active |
|
|
278
|
+
| EMET-VAL-005 | Query is required | active |
|
|
279
|
+
| EMET-VAL-006 | Query must be a string | active |
|
|
280
|
+
| EMET-VAL-007 | Query cannot be empty | active |
|
|
281
|
+
| EMET-VAL-008 | Query exceeds the maximum length | active |
|
|
282
|
+
| EMET-VAL-010 | Context must be a string | active |
|
|
283
|
+
| EMET-VAL-011 | Context exceeds the maximum length | active |
|
|
284
|
+
| EMET-VAL-012 | Layer is required | active |
|
|
285
|
+
| EMET-VAL-013 | Layer must be a string | active |
|
|
286
|
+
| EMET-VAL-014 | Invalid layer | active |
|
|
287
|
+
| EMET-VAL-015 | Value is required | active |
|
|
288
|
+
| EMET-VAL-016 | Value must be a number | active |
|
|
289
|
+
| EMET-VAL-017 | Value is outside the allowed range | active |
|
|
290
|
+
| EMET-VAL-018 | Metadata must be an object | active |
|
|
291
|
+
| EMET-VAL-019 | Metadata exceeds the maximum size | active |
|
|
292
|
+
| EMET-VAL-020 | metadata.session_id is not accepted | active |
|
|
293
|
+
| EMET-VAL-021 | expires_at disagrees with valid_until | active |
|
|
294
|
+
| EMET-VAL-022 | valid_until disagrees with expires_at | active |
|
|
295
|
+
| EMET-VAL-023 | Routing must be a plain object | active |
|
|
296
|
+
| EMET-VAL-024 | Value must be a boolean | active |
|
|
297
|
+
| EMET-VAL-025 | Invalid assertion_origin | active |
|
|
298
|
+
| EMET-VAL-026 | Value must be a string | active |
|
|
299
|
+
| EMET-VAL-027 | Custom metadata object is too large | active |
|
|
300
|
+
| EMET-VAL-028 | valid_from is after valid_until | active |
|
|
301
|
+
| EMET-VAL-029 | Value must be a positive integer | active |
|
|
302
|
+
| EMET-VAL-030 | Tags must be an array | active |
|
|
303
|
+
| EMET-VAL-031 | Too many tags | active |
|
|
304
|
+
| EMET-VAL-032 | Each tag must be a string | active |
|
|
305
|
+
| EMET-VAL-033 | Tag exceeds the maximum length | active |
|
|
306
|
+
| EMET-VAL-034 | Related ids must be an array | active |
|
|
307
|
+
| EMET-VAL-035 | Too many related ids | active |
|
|
308
|
+
| EMET-VAL-036 | Value exceeds the maximum length | active |
|
|
309
|
+
| EMET-VAL-037 | Filters must be an object | active |
|
|
310
|
+
| EMET-VAL-038 | Unknown importance bucket filter | active |
|
|
311
|
+
| EMET-VAL-039 | Content search term exceeds the maximum length | active |
|
|
312
|
+
| EMET-VAL-040 | Context search term exceeds the maximum length | active |
|
|
313
|
+
| EMET-VAL-041 | importance_min is greater than importance_max | active |
|
|
314
|
+
| EMET-VAL-042 | emotional_intensity_min is greater than the max | active |
|
|
315
|
+
| EMET-VAL-043 | timestamp_after is after timestamp_before | active |
|
|
316
|
+
| EMET-VAL-044 | Options must be an object | active |
|
|
317
|
+
| EMET-VAL-045 | order_by must be a string | active |
|
|
318
|
+
| EMET-VAL-046 | Arguments must be an object | active |
|
|
319
|
+
|
|
320
|
+
## Retired numbers
|
|
321
|
+
|
|
322
|
+
These numbers were removed from the registry. They stay reserved. A later removal is added here. The registry and the lock file do not list them.
|
|
323
|
+
|
|
324
|
+
| Code | Summary | Status |
|
|
325
|
+
|---|---|---|
|
|
326
|
+
| EMET-CFG-003 | MONGODB_URI is not set for setup | retired |
|
|
327
|
+
| EMET-DB-009 | MONGODB_URI is not set; cannot assess gaps | retired |
|
|
328
|
+
| EMET-DB-011 | MONGODB_URI is not set; cannot read topic pages | retired |
|
|
329
|
+
| EMET-DB-012 | MONGODB_URI is not set; cannot verify session artifacts | retired |
|
|
330
|
+
| EMET-MEM-031 | Query exceeds the maximum length | retired |
|
|
331
|
+
| EMET-MEM-033 | Startup pages could not fit the budget | retired |
|
|
332
|
+
| EMET-VAL-009 | Query exceeds the maximum length | retired |
|
|
@@ -79,7 +79,7 @@ The architecture needs flexibility of flow: at some points a session should go o
|
|
|
79
79
|
- **Like a transistor (an IGBT).** A switch conducts only when its gate condition is met, and it is tripped by that condition, nothing else. The condition is read from what EMET already holds: the session's state, the call being made, and what the record says. The branch it selects is where the session goes next.
|
|
80
80
|
- **Small and local.** A switch is a few lines of logic in the server's code. No hosted model, no outside API, no model call. It gives the same answer for the same inputs, every time, so it can be tested like any other gate. This is the role a fast external decision model (such as JEV) plays in other designs, done here by the track itself.
|
|
81
81
|
- **Designed per junction.** Each switch's design follows the function it serves and how information and tasking flow through that junction. There is no general-purpose router: a junction gets a switch only when a real fork exists, and the switch knows only what that fork needs (commitment 6: over-engineering is a defect).
|
|
82
|
-
- **Bounded on every branch.** Each branch leads to a guardrail space, for example a GEM once the socket exists, or a work instruction for a kind of task. The four gates still apply on every branch, so a switch can change where the session works, never whether its steps are recorded.
|
|
82
|
+
- **Bounded on every branch.** Each branch leads to a guardrail space, for example a GEM (Golem Expertise Module) once the socket exists, or a work instruction for a kind of task. The four gates still apply on every branch, so a switch can change where the session works, never whether its steps are recorded.
|
|
83
83
|
- **Recorded.** Each time a switch trips, the lab results record which way it went and why, so its conditions can be checked against real sessions before anything depends on them.
|
|
84
84
|
|
|
85
85
|
### Lab results
|
|
@@ -105,3 +105,4 @@ The server sees tool calls, never the reply text. It can confirm that exchange 8
|
|
|
105
105
|
- `src/tools.js`: `session_id` and `exchange` added to every governed schema from the graph's own tool list.
|
|
106
106
|
- `src/setup.js`: `tools_in_force` and the short instructions tell every host to pass both fields and follow `session_graph.next`.
|
|
107
107
|
- `tests/session-graph.test.js`: the gates, the next stop, and the fail-closed door when a named session cannot be read.
|
|
108
|
+
- Design record: `staging/emet-session-graph.md` in the EMET store. The framing is in semantic memory entry 297, and the decision on switches in procedural ref 402.
|