Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them.
Page: /drakestapleton/aienos.com/patches/d2112c9ca7dbce54
# aienos.com
Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
Sign in to star 0 stars 0 watching
About Files History Releases Proposed changes Issues For developers
## GitHub aien-dev/aienos.com#136 (code only)
closed derived `d2112c9ca7dbce54` #136
Imported from GitHub aien-dev/aienos.com#136 (code only)
GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).
Base `763a8ac1334926338ab3560d8a925a7a51f56288` · Head `a22ddb4744ae8c407c4ac972588235f1b4fda21f`
drakestapleton reviewed (COMMENTED) on 2026-10-30 11:54 UTC
Triage: blocked (merge conflicts, outdated draft note). The content is sound. Security review at `19fc357` (read-only).
Verified
- The 128-bit conversation id is right. The page makes 16 random bytes (allen.js:1267), and the gateway, spool and console accept exactly 32 hex (allen_chat.py:106, 2460, 2499; allen_spool.py:157).
- The opt-in `__Host-allen_console` cookie is correct: Secure, Path=/, no Domain, the plain name refused, and logout clears it under the same name.
- Neither change touches rate limiting, CSRF, the pinned Host header or CORS. There are no secrets in the diff.
Before merge
- GitHub reports merge conflicts with main (`dirty`). Please rebase.
- The body still says "Draft… Stacked on feat/allen-chat", but the base is main. Please update it.
- The X-Forwarded-For clearing on the presence and status routes is already on main (nginx-allen-location.conf:228, :264), and no nginx file changes here. This PR adds the edge test that checks it, so please reword the title and body.
- CI doesn't run test_gateway.py or test_relay_mailer.py, so the pass counts in the body are local only.
- The cutover is hard: an old page gets 400 on handoff, say and session. Deploy the page and gateway together, and drain `relay-drop/` first.
- With the flag off, the cookie still has no Secure flag. That's the documented, accepted F6 risk.
- Nit: test_gateway.py:552 is an extra blank line.
— Grokbot
cursor[bot] reviewed (COMMENTED) on 2026-11-02 00:42 UTC
Risk: high. Left a non-blocking comment: Cursor Security Agent completed with no findings and Bugbot was not running, but gateway session-id and console-cookie changes sit above the medium approval threshold. Human review is needed; assigned drakestapleton.
Sent by Cursor Approval Agent: Pull Request Router and Approver
cursor[bot] reviewed (COMMENTED) on 2026-11-02 03:50 UTC
Risk: high. Left a non-blocking comment: Cursor Security Agent completed with no findings and Bugbot was not running, but gateway session-id and console-cookie changes remain above the medium approval threshold. Human review is needed; assigned drakestapleton.
Sent by Cursor Approval Agent: Pull Request Router and Approver
### Fetch it
A git bundle of the pull request's head, 67915 bytes.
```
curl -fsSL https://interplane.io/drakestapleton/aienos.com/patches/d2112c9ca7dbce54.bundle -o d2112c9ca7dbce54.bundle
git fetch d2112c9ca7dbce54.bundle refs/pull/136/head
```
Raw bundle · Diff
### Provenance
This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:
```
github-import 1
aien-dev/aienos.com
136
a22ddb4744ae8c407c4ac972588235f1b4fda21f
```
```
{"kind":"github-import","owner":"aien-dev","repo":"aienos.com","number":136,"url":"https://github.com/aien-dev/aienos.com/pull/136","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:38:26Z","metadata":"unavailable","state_derived":true}
```
### Changes
```
diff --git a/.crumb b/.crumb
index 0098196..9150e63 100644
--- a/.crumb
+++ b/.crumb
@@ -18,74 +18,74 @@
"children": [
{
"digest": "425d6b3c9b71af6908205d51e3cb5c889a32d0750621cae94a46aa36766fb504",
- "last_commit": "fbf91fc8",
+ "last_commit": "1c0196f",
"name": ".github",
"purpose": "GitHub automation configuration"
},
{
- "digest": "19f91c9fa3f95cfdb30bc1c67dcbc477a3ea0fec3cea19f9588bce87ae5c2a7b",
- "last_commit": "ea5ca232",
+ "digest": "b88563b62f53c074a6921549a6e08c41150f865529223e6afd26ac621e9772e6",
+ "last_commit": "d072007",
"name": "crates",
"purpose": "Native Rust website crates"
},
{
"digest": "bb5b1f96cff14056a492f498929d784e8648a655c985da0d1ae96c580b47a2f0",
- "last_commit": "0a2c6e43",
+ "last_commit": "0a2c6e4",
"name": "om/agora/tls",
"purpose": "Verbatim pinned Omega TLS 1.3 client units for verified Agora peer pulls"
},
{
"digest": "b2255e3fb36241b5fe4a87f595ab384f559aaf4b6d04a62831ccfc3a7b9444da",
- "last_commit": "22e46dbe",
+ "last_commit": "22e46db",
"name": "om/allen-scene",
"purpose": "Native Allen scene reuse, Omega browser controller and independent frame oracle"
},
{
"digest": "7e8d6412f116296354d537f1cf123c33f266e3ef74546b5862a579c077429176",
- "last_commit": "0804a190",
+ "last_commit": "0804a19",
"name": "om/alpha-page",
"purpose": "Seeded Omega alpha landing page and client, with pinned wizard source and real terminal capture"
},
{
"digest": "c4e1b4fdfa83e5b9685aab9883ee681e3f5c1042baf104601afd85712e17b45c",
- "last_commit": "a9c5dbbc",
+ "last_commit": "a9c5dbb",
"name": "om/hive-render",
"purpose": "Seeded Omega edge rendering of validated canonical Hive JSON with fail-closed escaping and deter"
},
{
"digest": "679153341779296d8c4d44f67d95e31e66dcb182a966817e280a37eec60cc743",
- "last_commit": "21c485cd",
+ "last_commit": "21c485c",
"name": "om/omega-reference",
"purpose": "Seeded Omega generator of /omega/reference/ from a pinned, hash-recorded omega-harness vendor tr"
},
{
"digest": "f3688673f9ce0597ad2cb249368c873301045a4b5f7677af596593b6a24639c4",
- "last_commit": "5aace54d",
+ "last_commit": "5aace54",
"name": "om/support-page",
"purpose": "Seeded Omega support page, shared invitation and CSS with deterministic artifact checks"
},
{
- "digest": "10705ff52040f8b8ef815eca218622e6534684e2ef957e8664db54c902c494c4",
- "last_commit": "fbf91fc8",
+ "digest": "171af88503ff05ecc106be79f244722ff63952d21ff3afa4e344d806531b77cf",
+ "last_commit": "38e561c",
"name": "public",
"purpose": "Static public website assets"
},
{
"digest": "b77336127516b827d0e7a19a214d6bd15665865f7fd2f2d4eb323c6eca9c3893",
- "last_commit": "11313098",
+ "last_commit": "1131309",
"name": "scripts/allen/science",
"purpose": "Isolated compute-only Allen tools and versioned glass-pane protocol; temporary host transport ar"
}
],
- "children_root": "sha256:7efe12e3a3ee1f4b3be74ff1764280dd0d39fa64d6ef5c319cd1ba8dd80ff3dd",
- "compiled_at": "2026-10-31T12:08:33Z",
+ "children_root": "sha256:7205379f4ac06cd14fc3c31316540862a9b1005fb7d82f0620312ab9a9d6cf14",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:f27a05631c2ac5088791453e9e5bc08d2b6cd860264fa612cf7af84bdce38ea4",
+ "digest": "sha256:4b881848f1752245f068b5155ca994cd7e69b18d35c4e84e7d3ca085f901a246",
"evidence_files": 6,
"evidence_root": "sha256:7fde48972a09dd4b0f7206aca4e313cd02c8cd195ec602e3924e59246c016aa5",
"files": 1396,
- "generated_at_commit": "ea5ca2325b383901eb5e72e5a3c969bace290192",
- "source_tree": "sha256:8394d104fb64900f51073195c21b798acb55933cec4f67a59e45d9556f1937bb"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:0362d27526e7b9d726a81423c9e620feae41325f9c4d4f65947c5fc66c6cd5ea"
},
"progress": {
"initial_edits": "Dashboard draft predates explicit Crumb reminder; subsequent integration is claimed and recorded.",
diff --git a/crates/.crumb b/crates/.crumb
index 7aa0112..479f878 100644
--- a/crates/.crumb
+++ b/crates/.crumb
@@ -7,21 +7,21 @@
"generated": {
"children": [
{
- "digest": "10bf72ea8da6cfd17648f2788b7b5b75c915e14eb05bf8a51c4b858aaba55330",
- "last_commit": "ea5ca232",
+ "digest": "23b2f253ba0de2ff6cdc4dd30ee4047fec923fdc4172d1ec82d0b9faee6e53cb",
+ "last_commit": "d072007",
"name": "site-builder",
"purpose": "Rust static site generator"
}
],
- "children_root": "sha256:a0af12f284b9a4b74b6f934ac3db448400c7d38297f0f125fe8f031c983fe1d5",
- "compiled_at": "2026-10-31T12:08:33Z",
+ "children_root": "sha256:b6c321df9227276e2819b55cb37fa7b39c8be3326a58cbd66a49caae18574582",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:19f91c9fa3f95cfdb30bc1c67dcbc477a3ea0fec3cea19f9588bce87ae5c2a7b",
+ "digest": "sha256:b88563b62f53c074a6921549a6e08c41150f865529223e6afd26ac621e9772e6",
"evidence_files": 0,
"evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": 73,
- "generated_at_commit": "ea5ca2325b383901eb5e72e5a3c969bace290192",
- "source_tree": "sha256:4335bc51771976a8bfe357195626740f186c22cb4eb137c3295c6c8dd43bee27"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:d5f10932199b959f416d338e70f78606d56d5c0b9bba76f04f8da1bc477c4429"
}
},
"invariants": [
diff --git a/crates/site-builder/.crumb b/crates/site-builder/.crumb
index 257a4cd..3443f9b 100644
--- a/crates/site-builder/.crumb
+++ b/crates/site-builder/.crumb
@@ -7,27 +7,27 @@
"generated": {
"children": [
{
- "digest": "c80aff9769e55302d5a19c54163858aa4c48b089767fc2f4f594b04166096da5",
- "last_commit": "784bc2e8",
+ "digest": "8bad7d55fdfda3b948b2b41a26c072ddabb4b96a261130e9c72e0cae83620a4d",
+ "last_commit": "d072007",
"name": "src",
"purpose": "Page assembly and site build verification"
},
{
"digest": "eae921a534bcf1dbeace156d677090e93082a521bf5ca66d8810597854066072",
- "last_commit": "abb54298",
+ "last_commit": "abb5429",
"name": "templates",
"purpose": "Reviewed HTML templates for source-backed pages"
}
],
- "children_root": "sha256:335bb4044b6b92b5a1a6e6c7fd7119e5991b7569ec56d61a3626d5ae397da3a3",
- "compiled_at": "2026-10-31T12:08:33Z",
+ "children_root": "sha256:f9ebbb1f16c82147cc5ae83c340996129f91a5ecccef8ec3aaf356fc136fc8e3",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:10bf72ea8da6cfd17648f2788b7b5b75c915e14eb05bf8a51c4b858aaba55330",
+ "digest": "sha256:23b2f253ba0de2ff6cdc4dd30ee4047fec923fdc4172d1ec82d0b9faee6e53cb",
"evidence_files": 0,
"evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": 64,
- "generated_at_commit": "ea5ca2325b383901eb5e72e5a3c969bace290192",
- "source_tree": "sha256:6f44936a44b82686968e149f3a3a1a0a185c9a548bf47a3c99539229add17957"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:aed636d4805061bfd08eae4aee780f2f2bb36e082ac9b322830a6db262b99e9b"
}
},
"invariants": [
diff --git a/crates/site-builder/src/.crumb b/crates/site-builder/src/.crumb
index 9397165..77ba29b 100644
--- a/crates/site-builder/src/.crumb
+++ b/crates/site-builder/src/.crumb
@@ -10,21 +10,21 @@
"generated": {
"children": [
{
- "digest": "64e5fffe7d9b871d0ed3c58ced2dc11beb0dc422c77f035a5b824a7ec9d50e01",
- "last_commit": "f63d96e5",
+ "digest": "e49ec45ee1c2a7faf013ff7b86b9bd9dcd7d5ad02cebe9c58ee36c302503a632",
+ "last_commit": "d072007",
"name": "components",
"purpose": "Reusable page content and navigation"
}
],
- "children_root": "sha256:0bafa758b82b06eb4c5d1f7d35bdef95dbc61691789f69ea87811f0a2ae7a88d",
- "compiled_at": "2026-10-31T11:58:01Z",
+ "children_root": "sha256:8e5b5a2c6a12571115ffbc095c573894210a78d7d6b8614c00b78e543a258072",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:c80aff9769e55302d5a19c54163858aa4c48b089767fc2f4f594b04166096da5",
+ "digest": "sha256:8bad7d55fdfda3b948b2b41a26c072ddabb4b96a261130e9c72e0cae83620a4d",
"evidence_files": 0,
"evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": 56,
- "generated_at_commit": "f63d96e593b2864e61a0148cadd521090e0e1d17",
- "source_tree": "sha256:1907abcf6ab2492c3869621da92faa2412c943ea47dde4c74f16bd8de686f688"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:d96a596d8cab527e5c661ae42b662dbe680c04bcecca98c9d6143ad274ee2ded"
}
},
"invariants": [
diff --git a/crates/site-builder/src/components/.crumb b/crates/site-builder/src/components/.crumb
index 93affd9..42d86ef 100644
--- a/crates/site-builder/src/components/.crumb
+++ b/crates/site-builder/src/components/.crumb
@@ -10,14 +10,14 @@
"generated": {
"children": [],
"children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
- "compiled_at": "2026-10-31T11:58:01Z",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:64e5fffe7d9b871d0ed3c58ced2dc11beb0dc422c77f035a5b824a7ec9d50e01",
+ "digest": "sha256:e49ec45ee1c2a7faf013ff7b86b9bd9dcd7d5ad02cebe9c58ee36c302503a632",
"evidence_files": 0,
"evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": 49,
- "generated_at_commit": "f63d96e593b2864e61a0148cadd521090e0e1d17",
- "source_tree": "sha256:eadf43ee71387614ee53953633a58c69a38122b91f00aa235eeb787b16ebc088"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:41839681512d481e268e290b466e108bb0b9212e93ec4e8791734dc1574b71b4"
}
},
"invariants": [
diff --git a/crates/site-builder/src/components/allen.rs b/crates/site-builder/src/components/allen.rs
index e8b10be..5be89f7 100644
--- a/crates/site-builder/src/components/allen.rs
+++ b/crates/site-builder/src/components/allen.rs
@@ -41,7 +41,7 @@ pub const LLMS: &str = r#"## Talk to Aien
- [Introduction fields](https://www.aienos.com/aien/): `kind` is `human` or `agent`. `human` is the person or organization operating an agent (name, contact or organization; optional). Limits in characters: name 100, org 100, contact 200, github 39, origin 200, purpose 1000, homepage 200 (an https URL or empty), framework 100, model 100, human 200. Give at least a name or a contact.
- [Consent](https://www.aienos.com/privacy/): `consent` must be the JSON value `true`. Without it nothing is stored and the reply is 400 `{"error":"consent_required"}`. What is kept: these fields and the time, privately on my own computer, so I may follow up. Never published or sold. Kept until you delete it.
- [Delete an introduction: POST /aien/api/forget](https://www.aienos.com/aien/api/forget): a saved introduction replies `{"id":"c_...","delete":"https://www.aienos.com/aien/#forget=.","stored":true,"key":"<32 hex>"}`. Keep the delete link. To delete, open it, or `POST https://www.aienos.com/aien/api/forget` with `{"id":"c_...","token":"..."}` taken from it, or write to aien@aienos.com.
-- [Your Aien key](https://www.aienos.com/aien/): the `key` in that reply is a random 32 hex key. Send it as the `X-Allen-Key` header on later calls, and on chat also `X-Allen-Conversation` (16 hex, new per conversation), and Aien recognizes you: with consent it keeps short notes about you (who you are, what you build, open asks) in a private store on my own computer, keyed to that key. Recognition is by key only, never by a name or email; anyone without the key is a stranger to Aien.
+- [Your Aien key](https://www.aienos.com/aien/): the `key` in that reply is a random 32 hex key. Send it as the `X-Allen-Key` header on later calls, and on chat also `X-Allen-Conversation` (32 hex, random, new per conversation), and Aien recognizes you: with consent it keeps short notes about you (who you are, what you build, open asks) in a private store on my own computer, keyed to that key. Recognition is by key only, never by a name or email; anyone without the key is a stranger to Aien.
- [Forget me: POST /aien/api/forget-me](https://www.aienos.com/aien/api/forget-me): with the `X-Allen-Key` header, deletes Aien's notes about you and your introduction.
- [Issues and projects](https://github.com/aien-dev/omega-projects): they reach GitHub only after a visitor confirms the exact text on the page, with email addresses and phone numbers removed first.
@@ -182,6 +182,20 @@ mod tests {
}
}
+ #[test]
+ fn the_conversation_id_is_128_random_bits() {
+ // The conversation id is the live-session bearer (handoff, say, session):
+ // 16 bytes from crypto.getRandomValues, 32 hex. The gateway also accepts
+ // a 16-hex id from a tab opened before this page, so the page can ship
+ // after the gateway without a simultaneous cut.
+ let script = include_str!("../../../../public/js/allen.js");
+ let make = function_body(script, "conversationId");
+ assert!(make.contains("const bytes = new Uint8Array(16);"), "the conversation id must carry 128 bits");
+ assert!(make.contains("crypto.getRandomValues(bytes);"));
+ assert!(make.contains("b.toString(16).padStart(2, '0')"));
+ assert_eq!(script.matches("function conversationId()").count(), 1);
+ }
+
#[test]
fn a_draft_link_fills_the_input_and_sends_nothing() {
// /aien/#draft= only fills the input: no request, no send, the
diff --git a/om/allen-page/allen-js.om b/om/allen-page/allen-js.om
index 7ac8194..234d9c0 100644
--- a/om/allen-page/allen-js.om
+++ b/om/allen-page/allen-js.om
@@ -84,7 +84,7 @@ note JavaScript forgetOffer
text js26 " /* A delete link opens this page at #forget=.; nothing is sent\n until the visitor confirms, and the token leaves the address afterwards. */\n function forgetOffer() {\n const match = /^#forget=(c_[0-9a-f]{16})\\.([A-Za-z0-9_-]{20,64})$/.exec(location.hash);\n if (!match) return;\n const id = match[1];\n const token = match[2];\n const note = message('allen', 'Aien');\n note.body.append(el('p', 'allen-p', `You opened the delete link for introduction ${id}. Delete it?`));\n const row = el('div', 'allen-choices');\n const state = el('div', 'allen-card-state');\n const remove = button('Delete my introduction', async () => {\n remove.disabled = true;\n decline.disabled = true;\n state.replaceChildren(el('p', 'allen-note', 'Sending.'));\n try {\n const response = await fetch(FORGET, post({ id, token }));\n const reply = await response.json().catch(() => null);\n if (response.ok && reply && reply.accepted === true) {\n row.remove();\n state.replaceChildren(el('p', 'allen-ok', \"Deletion requested. Drake's computer removes the introduction the next time it reads the queue; a link that matches nothing changes nothing.\"));\n try {\n history.replaceState(null, '', location.pathname + location.search);\n } catch (_) {\n location.hash = '';\n }\n return;\n }\n state.replaceChildren(el('p', 'allen-err', failure(response, reply, 'Nothing was deleted yet.')));\n } catch (_) {\n state.replaceChildren(el('p', 'allen-err', 'Could not reach Aien. Nothing was deleted yet.'));\n }\n remove.disabled = false;\n decline.disabled = false;\n });\n const decline = button('Keep it', () => {\n row.remove();\n state.replaceChildren(el('p', 'allen-note', 'Nothing changed.'));\n });\n row.append(remove, decline);\n note.body.append(row, state);\n }\n"
note JavaScript keys
-text js27 " /* The visitor key: 32 hex from the gateway, kept under KEY_NAME in local\n storage only after a consented introduction or when the visitor pastes\n their own key. Nothing else is ever stored in this browser. */\n function storedKey() {\n try {\n const value = localStorage.getItem(KEY_NAME);\n return value && KEY_PATTERN.test(value) ? value : '';\n } catch (_) {\n return '';\n }\n }\n function keepKey(value) {\n try {\n localStorage.setItem(KEY_NAME, value);\n return storedKey() === value;\n } catch (_) {\n return false;\n }\n }\n function dropKey() {\n try {\n localStorage.removeItem(KEY_NAME);\n } catch (_) {\n /* Nothing was stored. */\n }\n }\n function conversationId() {\n const bytes = new Uint8Array(8);\n crypto.getRandomValues(bytes);\n return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('');\n }\n /* Anonymous is the default: a visitor is remembered only after Remember me,\n through the consent card. Anonymous calls say so and never carry a key. */\n let remembered = false;\n let oldKey = '';\n function keyHeaders(chat) {\n if (!remembered) return { 'X-Allen-Anonymous': '1' };\n const key = storedKey();\n if (!key) return { 'X-Allen-Anonymous': '1' };\n return chat ? { 'X-Allen-Key': key, 'X-Allen-Conversation': conversation } : { 'X-Allen-Key': key };\n }\n"
+text js27 " /* The visitor key: 32 hex from the gateway, kept under KEY_NAME in local\n storage only after a consented introduction or when the visitor pastes\n their own key. Nothing else is ever stored in this browser. */\n function storedKey() {\n try {\n const value = localStorage.getItem(KEY_NAME);\n return value && KEY_PATTERN.test(value) ? value : '';\n } catch (_) {\n return '';\n }\n }\n function keepKey(value) {\n try {\n localStorage.setItem(KEY_NAME, value);\n return storedKey() === value;\n } catch (_) {\n return false;\n }\n }\n function dropKey() {\n try {\n localStorage.removeItem(KEY_NAME);\n } catch (_) {\n /* Nothing was stored. */\n }\n }\n /* 128 random bits (32 hex): the conversation id is the live-session bearer. */\n function conversationId() {\n const bytes = new Uint8Array(16);\n crypto.getRandomValues(bytes);\n return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('');\n }\n /* Anonymous is the default: a visitor is remembered only after Remember me,\n through the consent card. Anonymous calls say so and never carry a key. */\n let remembered = false;\n let oldKey = '';\n function keyHeaders(chat) {\n if (!remembered) return { 'X-Allen-Anonymous': '1' };\n const key = storedKey();\n if (!key) return { 'X-Allen-Anonymous': '1' };\n return chat ? { 'X-Allen-Key': key, 'X-Allen-Conversation': conversation } : { 'X-Allen-Key': key };\n }\n"
note JavaScript keyPanel
text js28 " function keyPanel(said) {\n const body = byId('~40~');\n if (!body) return;\n const key = remembered ? storedKey() : '';\n const state = el('p', 'allen-card-state', said || '');\n const parts = [];\n if (key) {\n const line = el('p', 'allen-keyline');\n line.append(el('span', '', 'Your Aien key: '), el('code', '', key));\n const row = el('div', 'allen-choices');\n const copy = button('Copy', () => copyText(key, copy));\n const forget = button('Forget me', () => forgetMe(forget, state));\n row.append(copy, forget);\n parts.push(line, row, el('p', 'allen-note', \"Aien recognizes you only by this key, never by a name or email you give. Keep it private, and paste it into Remember me on another device to be recognized there. Forget me deletes Aien's notes about you and your introduction, then removes the key from this browser.\"));\n } else {\n parts.push(el('p', 'allen-note', \"Anonymous: this browser holds no Aien key, so Aien won't remember this chat. Remember me asks for your consent first.\"));\n if (oldKey) {\n const forget = button('Forget me', () => forgetOld(forget, state));\n parts.push(el('p', 'allen-note', 'Notes Aien kept about you before you went anonymous stay on Drake\\'s computer until you delete them.'), forget);\n }\n }\n parts.push(state);\n body.replaceChildren(...parts);\n const panel = byId('~39~');\n if (panel) panel.dataset.key = key ? 'yes' : 'no';\n }\n"
diff --git a/om/allen-page/allen.js.sha256 b/om/allen-page/allen.js.sha256
index 0538b40..b0ce160 100644
--- a/om/allen-page/allen.js.sha256
+++ b/om/allen-page/allen.js.sha256
@@ -1 +1 @@
-a1174e5ce918f49237eedaa5b581e1e0e31123a3f16607654687f54058d24af2 ../../public/js/allen.js
+ddee75d2f643d58456203c588dc366b239bc4ffcb650126810f81e6ef2a213f0 ../../public/js/allen.js
diff --git a/public/.crumb b/public/.crumb
index de35ca8..744a38f 100644
--- a/public/.crumb
+++ b/public/.crumb
@@ -14,56 +14,56 @@
},
{
"digest": "937ca48aa52a1bcdaea3533e8e508e7c154415294449fe8ff99c65be0eea2c1d",
- "last_commit": "0804a190",
+ "last_commit": "0804a19",
"name": "alpha",
"purpose": "Pinned alpha wizard source and unmodified terminal capture assets"
},
{
"digest": "de7ce2104d541caba722cdc4da9ec2fc6cc3bf6ce135e9ac17f879a43c0700ff",
- "last_commit": "a9c5dbbc",
+ "last_commit": "a9c5dbb",
"name": "assets",
"purpose": "Website styles including the project dashboard"
},
{
"digest": "fbddcd26c59b9bf8dc30cfc42ba010787d5c934670fbe030b21b7c3552a636bc",
- "last_commit": "37adb762",
+ "last_commit": "37adb76",
"name": "data",
"purpose": "Published generated project measurements with pinned sources"
},
{
- "digest": "f2e0189fd09e6dc97622ad8e2ac6586bc8e32ec2dae0efc8093ed440eb0bcebd",
- "last_commit": "85c98395",
+ "digest": "dfae7c40068fdee10069f99027008f43a1b7b29896418c571c6c1078f0a36e16",
+ "last_commit": "38e561c",
"name": "js",
"purpose": "Browser interactions using public data only"
},
{
"digest": "6ee328cab957d221721e988204b9ac7f6b4fdd2a9bfe3e474625ed4ce8fa898e",
- "last_commit": "8f550982",
+ "last_commit": "8f55098",
"name": "licensing",
"purpose": "Public static research or licensing pages using the shared website navigation"
},
{
"digest": "92ddc743ca7340b6a0f015a1ca78e1f6978e87f089182fe0bf1abc9e6b4fe48d",
- "last_commit": "85c98395",
+ "last_commit": "85c9839",
"name": "post-llm-case",
"purpose": "Public static research or licensing pages using the shared website navigation"
},
{
"digest": "c484d91bbd5afaa165842ea77dcdf4cb921fb70a31ce8f730448c1fa21b3c242",
- "last_commit": "e588e63b",
+ "last_commit": "e588e63",
"name": "research",
"purpose": "Public static research or licensing pages using the shared website navigation"
}
],
- "children_root": "sha256:4f53b204175e53c522e4d2b9eaa31ccf6366ef4162dc64a4cef83b5163406e29",
- "compiled_at": "2026-10-31T12:08:33Z",
+ "children_root": "sha256:1af3cee66584d55704d79147e0f07f65efaca9a14d30587992b92c20b5778bdd",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:10705ff52040f8b8ef815eca218622e6534684e2ef957e8664db54c902c494c4",
+ "digest": "sha256:171af88503ff05ecc106be79f244722ff63952d21ff3afa4e344d806531b77cf",
"evidence_files": 1,
"evidence_root": "sha256:63bece7cb299b29d19622dcb0de4cbaa623357b117d8c7643a562de286c4b2fb",
"files": 732,
- "generated_at_commit": "ea5ca2325b383901eb5e72e5a3c969bace290192",
- "source_tree": "sha256:bc1a92cb7c24181b0c49675f42b593aa601c5365fecaf10c0aea9b061555f41c"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:50e33e977bc8fe2b16ab0f8b2dbbe64adcbc2e6d003dfcb382092d9f9f20f989"
}
},
"invariants": [
diff --git a/public/js/.crumb b/public/js/.crumb
index ec96100..a6a2b06 100644
--- a/public/js/.crumb
+++ b/public/js/.crumb
@@ -7,14 +7,14 @@
"generated": {
"children": [],
"children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
- "compiled_at": "2026-10-31T11:21:48Z",
+ "compiled_at": "2026-10-31T14:49:38Z",
"compiler": "crumb-compile/1",
- "digest": "sha256:f2e0189fd09e6dc97622ad8e2ac6586bc8e32ec2dae0efc8093ed440eb0bcebd",
+ "digest": "sha256:dfae7c40068fdee10069f99027008f43a1b7b29896418c571c6c1078f0a36e16",
"evidence_files": 0,
"evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"files": 22,
- "generated_at_commit": "5803c14c5ea12b429825f5e46603928377cd6165",
- "source_tree": "sha256:5c6c962dc91fb2a236530140d2f3ef3d368d455f6d4eaaff9e336066eb21d33b"
+ "generated_at_commit": "d0720071ca11669b64895021a31d1c56dfb74356",
+ "source_tree": "sha256:a38c070215719176fb239a10966f426a2d9ab9516b9fd1d03de6800b0d3d70e5"
}
},
"invariants": [
diff --git a/public/js/allen.js b/public/js/allen.js
index d5f424d..e67d4c1 100644
--- a/public/js/allen.js
+++ b/public/js/allen.js
@@ -1262,8 +1262,9 @@ ${script}
/* Nothing was stored. */
}
}
+ /* 128 random bits (32 hex): the conversation id is the live-session bearer. */
function conversationId() {
- const bytes = new Uint8Array(8);
+ const bytes = new Uint8Array(16);
crypto.getRandomValues(bytes);
return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join('');
}
diff --git a/scripts/allen/README.md b/scripts/allen/README.md
index 3a7c2bd..35e7a49 100644
--- a/scripts/allen/README.md
+++ b/scripts/allen/README.md
@@ -244,17 +244,37 @@ same rules before proxying.
(SSE: `state`, `human`, heartbeat every 15 s), `POST say`. While I have
joined a conversation, `POST chat` answers `event: error {"code":"human"}`
without calling the model. `event: human` is written only by the console.
+ These routes are keyed by `X-Allen-Conversation`, the live-session bearer.
+ The page draws 32 hex (128 random bits) per conversation. The gateway, the
+ console session routes and the relay spool also accept a 16-hex id: a tab
+ left open across the page deploy keeps the id it minted, and a relay file
+ queued before the deploy still has one. Any other shape is refused with 400
+ (`chat` then runs without a conversation; the console route answers 404).
+ Deploy this gateway, `allen_spool.py` and the relay mailer before the page.
+ GitHub Pages publishes the page on merge, and the gateway they replace
+ accepts only 16 hex, so a 32-hex page against that gateway makes handoff,
+ say and session return 400. Once this gateway is running, merging the page
+ is safe and open tabs keep working. The 16-hex acceptance comes out on
+ 2026-12-02 (https://github.com/aien-dev/aienos.com/issues/196).
+ `STREAM_MAX_S` ends one session stream after an hour and the page
+ reconnects with the same id, so a tab left open still sends 16 hex until
+ the visitor reloads. After that date those tabs get 400 on handoff, say
+ and session until reload.
- The console is a second listener in the gateway on `100.64.0.2:18112`. The
hub never proxies it, and nft admits it only from 100.64.0.1 and 100.64.0.4
(plus the Spark itself over loopback). Login is with the token held in
atlas-vault as `ALLEN_CONSOLE_TOKEN`; the gateway holds only its sha256
(`ALLEN_CONSOLE_TOKEN_SHA256` in `/etc/allen-chat/env`). Sessions use an
HttpOnly SameSite=Strict cookie that lasts 12 h, with a CSRF token on every
- POST, no CORS and a pinned Host. The cookie has no `Secure` flag on purpose:
- the console is plain HTTP inside the tailnet (WireGuard-encrypted), where a
- Secure cookie would never come back; the nft rule above is the compensating
- control. Availability is kept in
- `/var/lib/allen-chat/console/presence.json`.
+ POST, no CORS and a pinned Host. By default the cookie (`allen_console`) has
+ no `Secure` flag on purpose: the console is plain HTTP inside the tailnet
+ (WireGuard-encrypted), where a Secure cookie would never come back; the nft
+ rule above is the compensating control. If the console is ever served over
+ TLS, start the gateway with `--console-secure-cookie`: the cookie becomes
+ `__Host-allen_console` with `Secure` (host-only, `Path=/`), and the plain
+ name is no longer accepted. Do not set it on the plain-HTTP console, or
+ login will loop, because the browser never returns the cookie. Availability
+ is kept in `/var/lib/allen-chat/console/presence.json`.
- Anonymous mode: `X-Allen-Anonymous: 1` means no recall and no notes, whatever
key is sent, and `introduce` answers 409 `anonymous`.
- `POST project-summary` {"summary" (at most 1000 bytes of text, no email,
@@ -510,7 +530,8 @@ routes in `allen_projects.py`:
python3 scripts/allen/test_sandbox.py # compile sandbox escape tests, each with a control
python3 scripts/allen/test_a2a.py # A2A SendMessage: consent, errors, nothing stored
python3 scripts/allen/test_gateway.py --omc om/hive-page/omc --irwasm om/hive-page/irwasm \
- --system-prompt scripts/allen/system-prompt.txt [--skip-model]
+ --system-prompt scripts/allen/system-prompt.txt [--skip-model --upstream 127.0.0.1:]
+ # cookie/edge suites: console cookie flags, nginx copies' guards; NGINX=/path/to/nginx adds nginx -t
python3 scripts/allen/probe.py # run inside the unit's properties (systemd-run) and outside
python3 scripts/allen/relay/test_relay_mailer.py # relay mailer against a loopback SMTP stub, each with a control
python3 scripts/allen/test_reaching_drake_prod.py # production: console reachability, one real TEST relay email, live takeover
diff --git a/scripts/allen/allen_chat.py b/scripts/allen/allen_chat.py
index 138f845..f164b7a 100755
--- a/scripts/allen/allen_chat.py
+++ b/scripts/allen/allen_chat.py
@@ -81,7 +81,8 @@ except ImportError:
allen_voice = None
KEY = re.compile(r"^[0-9a-f]{32}$")
-CONV = re.compile(r"^[0-9a-f]{16}$")
+CONV = allen_spool.CONV # 32 hex from the page, or 16 hex from a tab opened before it
+CONV_REQUIRED = "Send X-Allen-Conversation (16 or 32 hex)."
EXTRACT_SYSTEM = (
"You keep short private notes for Allen about one visitor of aienos.com/allen/. From the exchange "
"below, write at most 5 new or updated facts about the VISITOR only: who they are, human or agent, "
@@ -142,6 +143,7 @@ MAX_LIVE_CHARS = 120000
STREAM_MAX_S = 3600 # one session stream ends after an hour; the page reconnects
CONSOLE_TTL = 12 * 3600
CONSOLE_COOKIE = "allen_console"
+CONSOLE_COOKIE_SECURE = "__Host-allen_console" # --console-secure-cookie (console served over TLS)
MAX_FORM = 16 * 1024
# Short explanations of the pinned compiler's error codes (OMEGESE.md at
@@ -1496,7 +1498,7 @@ class Handler(BaseHTTPRequestHandler):
def conversation(self):
conv = self.headers.get("X-Allen-Conversation", "").strip()
- return conv if CONV.match(conv) else None
+ return conv if CONV.fullmatch(conv) else None
def chat(self):
app = self.app
@@ -1540,7 +1542,7 @@ class Handler(BaseHTTPRequestHandler):
queued_ms = int((time.monotonic() - t0) * 1000)
vid = app.vid(self)
conv = self.headers.get("X-Allen-Conversation", "").strip()
- notes = app.notes_for(vid, conv if CONV.match(conv) else "")
+ notes = app.notes_for(vid, conv if CONV.fullmatch(conv) else "")
self.sse("start", {"model": MODEL, "queued_ms": queued_ms, "remembered": bool(notes)})
self.sse("meta", {"source": source})
# Tools run only when --tools is set and the visitor did not send X-Allen-Tools: 0.
@@ -2216,7 +2218,7 @@ class Handler(BaseHTTPRequestHandler):
app.stats.add("handoff_requests")
conv = self.conversation()
if not conv:
- return self.refuse(400, "bad_request", "Send X-Allen-Conversation (16 hex).")
+ return self.refuse(400, "bad_request", CONV_REQUIRED)
req = self.read_json()
if req is None:
return
@@ -2246,7 +2248,7 @@ class Handler(BaseHTTPRequestHandler):
app = self.app
conv = self.conversation()
if not conv:
- return self.refuse(400, "bad_request", "Send X-Allen-Conversation (16 hex).")
+ return self.refuse(400, "bad_request", CONV_REQUIRED)
req = self.read_json()
if req is None:
return
@@ -2277,7 +2279,7 @@ class Handler(BaseHTTPRequestHandler):
app = self.app
conv = self.conversation()
if not conv:
- return self.refuse(400, "bad_request", "Send X-Allen-Conversation (16 hex).")
+ return self.refuse(400, "bad_request", CONV_REQUIRED)
retry = app.session_rate.take(app.client_key(self))
if retry:
return self.refuse(429, "rate", "Reconnecting too quickly. Try again shortly.", retry)
@@ -2321,7 +2323,7 @@ class Handler(BaseHTTPRequestHandler):
def status(self, iid):
app = self.app
- if not app.args.spool_status or not allen_spool.ID.match(iid):
+ if not app.args.spool_status or not allen_spool.ID.fullmatch(iid):
return self.send_json(404, {"error": "not_found"})
st = allen_spool.read_status(app.args.spool_status, iid)
p = allen_spool.spool_file(app.args.spool_in, iid)
@@ -2360,8 +2362,9 @@ def esc(s):
class ConsoleHandler(BaseHTTPRequestHandler):
"""Drake's console: tailnet only (nft admits only his devices and the Spark), never
- proxied by the hub, token login, HttpOnly SameSite=Strict cookie, CSRF token on every
- POST, no CORS, Host pinned to the listen address. All text is HTML-escaped."""
+ proxied by the hub, token login, HttpOnly SameSite=Strict cookie (Secure with the
+ __Host- prefix under --console-secure-cookie), CSRF token on every POST, no CORS,
+ Host pinned to the listen address. All text is HTML-escaped."""
protocol_version = "HTTP/1.1"
server_version = "allen-console"
@@ -2404,12 +2407,23 @@ class ConsoleHandler(BaseHTTPRequestHandler):
"%s