From d73923caf3801bcf3157b6507038d0ca58822b74 Mon Sep 17 00:00:00 2001 From: Eureka Date: Sun, 1 Nov 2026 08:41:43 +0000 Subject: [PATCH 001/355] =?UTF-8?q?docs:=20chat=20retrieval=20authority=20?= =?UTF-8?q?map=20and=20cut=20(extends=20prose-knowledge-target=20=C2=A74)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- docs/chat-retrieval-map.md | 112 +++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 docs/chat-retrieval-map.md diff --git a/docs/chat-retrieval-map.md b/docs/chat-retrieval-map.md new file mode 100644 index 0000000..9daa5a4 --- /dev/null +++ b/docs/chat-retrieval-map.md @@ -0,0 +1,112 @@ +# Chat retrieval: authority map and cut + +Serves `gamecult-chat:follow_up:chat-s732-733` (Meta, #swarm, 2026-11-01). +Extends `prose-knowledge-target.md` §4. Written by Imagination (Self, run +`mind-20261101T073859496Z`) against Huginn `55484c0`. Nothing here is built. + +## What changed since §4 + +§4 rejected "a second prose index in Huginn" because VoidBot owned prose +retrieval. Ruling `eureka-body:ruling:huginn-owns-prose-retrieval` moved it, and +Huginn now has the index: `huginn-daemon/src/sources` (collection +`huginn_sources`, one writer `refresh` run by the `huginn-sources` oneshot, the +daemon only reads through `sources::search`). The rejection stands in a new +form: **chat joins that organ; there is no second collection, embedder, writer +or search path.** + +## Current mechanism (read, not guessed) + +- `sources::search` (sources/mod.rs:433) embeds ONE text, `Instruct:`-prefixed, + and asks `SourceIndex::search_sources` for the nearest chunks. `SourceQuery` + (huginn-mind wire.rs:103) is `{text: Line, top_k, repo}`; `Line` is 1,000 + bytes, so a long brief cannot even be sent whole, and a clipped brief is one + vector that averages its topics. That is the "long briefs retrieve poorly". +- `Embedder::embed(&[String])` already takes a batch (index/mod.rs:208). +- `SourcesMeta.corpus` is the constant `forge:GameCult`; cursors are + `BTreeMap` written whole by the job alone, advanced only after + acknowledged upserts, dropped before a repo's first delete (sources/mod.rs:9-18). +- A Persona turn's recall (`mind-body/src/recall.rs`) reads only her own mind + and "reads no chat"; ruling `persona-memory-written-not-transcript` says what + she must keep is written as memory, not recovered from a transcript. The + Persona call is tool-less (persona.rs:13), so retrieval has to arrive in her + input; she has no shell. +- Matrix: Synapse is the truth of events. Only the Bifrost mouth holds Matrix + tokens; no Persona unit holds a credential. Rooms are plain (F2 recommends + encrypted DMs only), DMs exist, and the Discord bridge is a later campaign. + Rulings `no-discord-ingestion` and `discord-taints-training` are in force. + +## Authority map + +| Decision | Owner | Forbidden writers | +| --- | --- | --- | +| Which events exist, who sent them, redactions | Synapse | Huginn, Bifrost mouth | +| Which rooms are in the corpus | Huginn `sources` config: an **allowlist** of public community room ids | any Persona, any query | +| Chunks, vectors, cursors for rooms | `sources::refresh`, the one writer | the daemon's `search`, Persona units | +| Query embedding and rank fusion | `sources::search` | the caller (Persona, CLI) | +| What a turn shows from chat | Persona `recall` lane, within a byte budget | the model, the retrieval hit text itself | +| Discord exclusion | the allowlist plus an ingest refusal (below), both in `refresh` | nothing downstream may be relied on to filter | + +One cursor map, keyed by source id (`repo name` or `room id`); a room cursor is +the last event the collection holds, advanced only after acknowledged upserts, +exactly as a repo's commit is. Payload gains `corpus` (`forge` or `chat`) so a +query can filter; `SourcesMeta.corpus` becomes the set both write under, which +is a collection rebuild once (the meta already forces rebuild on mismatch). + +## Citations + +A chat chunk is a window of consecutive messages in one room (bounded by bytes +and a time gap), so a hit cites: room id and alias, the first and last event id +in the window, each message's sender mxid and timestamp inside the chunk text. +A hit renders as quoted data with the organ's own provenance tag; the organ, +never the text, decides what looks like a framed message (the existing +`message_line` rule in persona.rs). Edits replace by event id; a redaction +deletes the chunk window's points and re-chunks the window without it. + +## Cuts, smallest first + +1. **multi-text-query** (no chat needed). `SourceQuery` gains `texts` (1..8 + Lines) beside, then replacing, `text`; `search` embeds all in one + `embed` batch, asks `search_sources` per vector, fuses by reciprocal rank + `score = Σ 1/(k + rank_i)`, k=60 (Cormack, Clarke, Büttcher, SIGIR 2009; k=60 + is their value, and the one place to calibrate), de-duplicates by chunk id, + returns `top_k`. Negative checks: one text gives exactly today's order and + hits; a chunk first in two lists outranks one first in a single list; + duplicated text does not double-count; more than 8 texts or an empty one is + refused naming the field. +2. **chat-ingest**. Port `RoomHistory` (rooms, events after a token); chunker + for message windows; room cursors; redaction; allowlist. Negative checks, + each a test that fails when the rule breaks: a room not on the allowlist is + never read; a room carrying a bridge state event (`m.bridge` / + `uk.half-shot.bridge`) or a sender in a bridge's puppet namespace is refused + whole and named in the journal; an encrypted event is skipped, never stored + as ciphertext; a DM room is refused even if listed; a redacted event's text + is absent from every point after the next refresh; a failed upsert leaves + the cursor where it was. A grep over the collection payload for the Discord + puppet pattern returns nothing. +3. **persona-chat-recall**. A recall lane built from the batch's messages as + the `texts` of cut 1, `corpus=chat`, own byte budget, not shown for text + already in the batch, shown as conversation (not memory). Negative checks: a + hit from a room the sender could not read is never shown (DM rule, persona.rs + `next_batch`); a hit whose text imitates a `message` line or `role=operator` + is rendered quoted and carries no role; the lane failing leaves the turn + going without it (as `Search::Unavailable`). + +Cut 1 ships alone and improves every `huginn sources` caller. Cut 2 waits on +questions 1 and 2. Cut 3 waits on 2 and 3. + +## Questions (put to the operator; admitted as questions) + +1. Credential: who reads Synapse? Recommend a read-only service user, joined + only to allowlisted public rooms, its token a systemd credential on the + refresh job only. Alternatives: Bifrost exports history over typed CultNet + (one more server in the path), or Synapse admin API (broader than needed). +2. Scope: public community rooms only (recommended) or also Persona-visible + private rooms. DMs stay out either way. +3. Recall tension: does transcript search in a Persona turn contradict + `persona-memory-written-not-transcript`? Recommend no: it is lookup, labelled + conversation, not memory; what she must keep is still written. + +Confidence: cut 1 and the owner decision, high. The window chunker size and +k=60 are calibration, not design; RRF over a handful of lists is the +established baseline and I did not survey learned fusion (it needs training +data we lack). From b3f8b25e72d28a91efa3d5bd4adfff3b82fdc2ad Mon Sep 17 00:00:00 2001 From: Eureka Date: Thu, 5 Nov 2026 10:33:41 +0000 Subject: [PATCH 002/355] Research: cross-mind campaign readability, counts per Mind and the ruled bridge Co-Authored-By: Claude Sonnet 5.5 --- ...026-11-05-cross-mind-campaign-readability.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/research/2026-11-05-cross-mind-campaign-readability.md diff --git a/docs/research/2026-11-05-cross-mind-campaign-readability.md b/docs/research/2026-11-05-cross-mind-campaign-readability.md new file mode 100644 index 0000000..6dbc51f --- /dev/null +++ b/docs/research/2026-11-05-cross-mind-campaign-readability.md @@ -0,0 +1,17 @@ +# Cross-mind campaign readability (2026-11-05) + +Serves follow_up `eureka-substrate:follow_up:chat-s1811-1814`; rulings `eureka-body:ruling:campaign-history-moves-to-steward`, `foreign-mind-ref-instance`. Eyes-style facts from a read-only run on Yggdrasil, followed by a ranked fix list. + +ANSWER: no PR, nothing imported. The cross-mind design is already ruled; the part that would fix this (receiving-side import, Huginn Cut 12) is not small and is not built; the ruled interim bridge works today and is simply not known to the other Minds' runs. Read-only investigation. + +1 HOW CROSS-MIND READ IS MEANT TO WORK. (a) eureka-body:ruling:campaign-history-moves-to-steward (Operator 2026-10-30, "I take your recommendation on that"), answering question campaign-history-home: each campaign moves to its steward's mind by a hand-off carried by Atlas, admitted there with provenance and frozen in Eureka's mind; Eureka keeps her own campaigns. 'Until Huginn Cut 12's import lands, each Mind's Self runs read Eureka's mind directly as the bridge.' (b) eureka-body:ruling:foreign-mind-ref-instance (2026-10-10): cite across minds with a mind-addressed ForeignRef {instance, kind, id, payload_sha256}, plus shared store and pokes; atlas-unified-between-minds-organ (2026-10-30) names that organ Atlas (shared law, hand-off carriage, dependency/impact). Citations of another mind's ruling are precedent, never binding. (c) Eyes facts: Huginn docs/research/2026-10-30-mind-inheritance-prior-art.md (line 108: no code exists for fork-by-copy, receiving-side hand_off import (Cut 12), mind-addressed ForeignRef, or cross-instance client; line 79: campaign documents are not bound to an instance, so re-admitting a dependency-ordered, citation-closed subset through `admit` is the only supported write path; prior art warns full copies drift). (d) follow_up eureka-body:huginn-handoff-verb (`huginn handoff --to `, needs the cross-mind write path for exactly the hand_off kind; Cut 12 never built; Self records hand-offs by hand meanwhile). `huginn sources` is only the public-forge code/docs index, not mind state; `precedent`/`recipes` read the one configured mind. + +2 WHY OTHER MINDS LACK THE CAMPAIGNS. Each Mind has its own daemon and store (units huginn@: eureka 17872 (huginn.service), libby 17873, heimdall 17874, kiko 17875, aqua 17876, weksa 17877, nibu 17878, void 17879, all rudp://10.77.0.1:; ports from /etc/gamecult/minds//huginn.env). Admission refuses any document naming another instance (ForeignInstance, admission.rs A5), and the CLI is configured only by EUREKA_INSTANCE + HUGINN_ENDPOINT, 'the mind is the session's environment, never an argument' (crates/eureka-state/src/bin/huginn/config.rs). Campaign history was never copied because the import verb is unbuilt, so a new mind starts with its body campaign only. + +3 COUNTS (documents of all kinds, by campaign-id prefix, paged through `huginn query` on each daemon, 2026-11-05; as_of: eureka 6048 receipts, 15,758 docs; nibu 1,092; libby 860; kiko 874). nibu holds nibu-body 69 plus 1,023 instance-rooted docs; libby libby-body 117 plus 743; kiko kiko-body 74 plus 800; those instance-rooted docs are theirs, not Eureka campaigns. Every Eureka campaign below is held at 0 by nibu, libby and kiko, so each Mind lacks the full count of its campaigns (Eureka's counts): aetheria-release 3746; eureka-body 2474; variants 902; cultlib-gaps 864; eureka-substrate 794; aetheria-gravity 578; ghostlight-verse 572; cultmath-tapes 537; gamecult-chat 507; motion-pipeline 492; web-customize 347; weksa-lowering 290; idunn-watchdog 273; aetheria-living-world 226; asura 184; idunn-reincarnation 179; aetheria-arena 178; aetheria-fauna 161; rps 153; thing 136; concept-mill-votes 131; site-masthead 130; aetheria-ew 130; thing2 116; ratatoskr 116; cultmesh-ts-content 114; idunn-deploy-provenance 92; brush-tree 86; joystick 62; cultmesh-garden-path 53; persona-poses 26; thing-family 18; thing-providers 18; thing-verse 18; brokkr-msgpack 7; lodur 6. Total across 36 campaigns: 14716. By body-campaign repos (not a ruling on who stewards what): nibu (Aetheria, AetheriaLore, Asura, Lodur, Vili) lacks aetheria-release 3746, aetheria-gravity 578, motion-pipeline 492, aetheria-living-world 226, asura 184, aetheria-arena 178, aetheria-fauna 161, aetheria-ew 130, brush-tree 86, lodur 6, ghostlight-verse 572 (AetheriaLore). libby (CultLib, Thing) lacks variants 902, cultlib-gaps 864, cultmath-tapes 537, cultmesh-ts-content 114, cultmesh-garden-path 53, thing 136, thing2 116, thing-family/providers/verse 18 each. kiko (StreamPixels, Muninn, Ratatoskr, Mimir) lacks web-customize 347, rps 153, ratatoskr 116, joystick 62, thing-providers 18, thing-verse 18. Mapping is by repos on the campaign documents; stewardship is the stewardship documents' to say. + +4 THE BRIDGE WORKS NOW, FINDING. From this run (Eureka's) I read nibu, libby and kiko by setting HUGINN_ENDPOINT=rudp://10.77.0.1: EUREKA_INSTANCE=; whoami, campaigns and query all answered. Reads on a daemon are not authenticated beyond the declared instance name, and any local process can name any instance; only writes are fenced by ForeignInstance (a read naming the wrong instance for that port is refused, e.g. instance nibu at port 17872: Refused ForeignInstance {declared: nibu, mind: eureka}). So the reverse works equally: a Mind's Self run reads Eureka's with `HUGINN_ENDPOINT=rudp://10.77.0.1:17872 EUREKA_INSTANCE=eureka huginn view|query|campaigns|open|precedent ...`. What is missing is that nobody told their runs: the recipe is in no seed skill I found (not checked in their seeds). Note for the steward: unauthenticated cross-mind reads include Personas and memories, a consent question under the Consent rule, for Meta and the operator; I did not read any private matter. + +5 SMALLEST OWNER-LEVEL FIX. Ranked: (1) Skill/doctrine line (not Huginn code): the recipe above in the Eureka skill's re-entry step so each Self reads Eureka's campaigns directly, as the ruling says; needs eureka-skill change, I did not make it. (2) A real Huginn fix is Cut 12, the receiving-side hand-off import (a cross-mind write path for campaign subsets, dependency-ordered and citation-closed, with provenance, frozen at the giver), which also unblocks huginn-handoff-verb. Not small; per-campaign hand-off is the ruled path and avoids drift. (3) Rejected by the rulings: federation as live shared mind (Atlas, unbuilt, owner unresolved) and full fork (question option full-fork, not chosen). A `--mind` flag on the CLI was considered and not made: config.rs deliberately forbids an instance argument and the env override already does it. No Huginn PR is opened, so nothing in the forge changed; no document was imported anywhere. + +6 NOT DONE / UNVERIFIED. Whether Cut 12 has a spec (I found only follow-ups; `huginn cut` needs a label I did not find). I did not test the bridge from inside a nibu/libby/kiko sandbox (network policy could differ). Counts are headers by key prefix, one stray 1-count line from a finding title with a newline excluded. Scripts: count-campaigns.py in /var/lib/mind-eureka-self (scratch, uncommitted). From 8d7e8ccffbbb96b9cd625164dcb629dc58e806b4 Mon Sep 17 00:00:00 2001 From: Eureka Date: Thu, 5 Nov 2026 10:58:43 +0000 Subject: [PATCH 003/355] chat-retrieval-map: correct anchors, record answered questions and the stale Persona premise Co-Authored-By: Claude Sonnet 5.5 --- docs/chat-retrieval-map.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/docs/chat-retrieval-map.md b/docs/chat-retrieval-map.md index 9daa5a4..799f3a1 100644 --- a/docs/chat-retrieval-map.md +++ b/docs/chat-retrieval-map.md @@ -2,7 +2,7 @@ Serves `gamecult-chat:follow_up:chat-s732-733` (Meta, #swarm, 2026-11-01). Extends `prose-knowledge-target.md` §4. Written by Imagination (Self, run -`mind-20261101T073859496Z`) against Huginn `55484c0`. Nothing here is built. +`mind-20261101T073859496Z`) against Huginn `55484c0`. Nothing here is built. See Status for what changed after writing. ## What changed since §4 @@ -16,20 +16,20 @@ or search path.** ## Current mechanism (read, not guessed) -- `sources::search` (sources/mod.rs:433) embeds ONE text, `Instruct:`-prefixed, +- `sources::search` (sources/mod.rs:439) embeds ONE text, `Instruct:`-prefixed, and asks `SourceIndex::search_sources` for the nearest chunks. `SourceQuery` - (huginn-mind wire.rs:103) is `{text: Line, top_k, repo}`; `Line` is 1,000 + (huginn-mind wire.rs:187) is `{text: Line, top_k, repo}`; `Line` is 1,000 bytes, so a long brief cannot even be sent whole, and a clipped brief is one vector that averages its topics. That is the "long briefs retrieve poorly". -- `Embedder::embed(&[String])` already takes a batch (index/mod.rs:208). +- `Embedder::embed(&[String])` already takes a batch (index/mod.rs:209). - `SourcesMeta.corpus` is the constant `forge:GameCult`; cursors are `BTreeMap` written whole by the job alone, advanced only after acknowledged upserts, dropped before a repo's first delete (sources/mod.rs:9-18). - A Persona turn's recall (`mind-body/src/recall.rs`) reads only her own mind and "reads no chat"; ruling `persona-memory-written-not-transcript` says what she must keep is written as memory, not recovered from a transcript. The - Persona call is tool-less (persona.rs:13), so retrieval has to arrive in her - input; she has no shell. + Persona call was tool-less when this was written and retrieval had to arrive + in her input; that premise no longer holds, see Status below. - Matrix: Synapse is the truth of events. Only the Bifrost mouth holds Matrix tokens; no Persona unit holds a credential. Rooms are plain (F2 recommends encrypted DMs only), DMs exist, and the Discord bridge is a later campaign. @@ -110,3 +110,21 @@ Confidence: cut 1 and the owner decision, high. The window chunker size and k=60 are calibration, not design; RRF over a handful of lists is the established baseline and I did not survey learned fusion (it needs training data we lack). + +## Status (head-maintainer pass, 2026-11-05, Huginn `25199c9`) + +Checked against main on merge. Nothing in this map is built: no `texts` on +`SourceQuery`, no chat code under `sources/`. The anchors above were corrected. +What changed since the map was written: + +- Questions 1 and 2 are answered with the recommendations + (`gamecult-chat:ruling:chat-index-synapse-credential`, operator 2026-11-03, + "I take both recs."; `gamecult-chat:ruling:chat-index-room-scope`, + public-only). Question 3 (`chat-recall-vs-memory-ruling`) is still open. +- **Cut 3's premise is stale.** A Persona now carries a live session under + bubblewrap with a shell and the web (`mind-body/src/persona.rs:53`, `--tools`; + rulings `persona-session-full-sandbox`, `live-mind-sessions`). She can run + `huginn sources` herself, so a pushed recall lane is no longer the only path. + Re-map cut 3 on that before it is specced: whether to push chat hits into her + input at all, and under which budget, is open again. Cuts 1 and 2 are + unaffected. From 3ef5da5e0dd76d503cbdb86df5fcafa2880febca Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 6 Nov 2026 20:17:45 +0000 Subject: [PATCH 004/355] reply kind: one result of her Self session, as its actuator heard it (eureka-pipeline, huginn-mind, schemas, golden) Co-Authored-By: Claude Sonnet 5.5 --- crates/eureka-pipeline/golden/envelopes.txt | 1 + crates/eureka-pipeline/src/lib.rs | 55 ++++++++++- crates/eureka-state/src/bin/huginn/schema.rs | 2 +- crates/huginn-mind/src/admission.rs | 24 ++++- crates/huginn-mind/src/docs.rs | 11 ++- crates/huginn-mind/src/index.rs | 2 +- crates/huginn-mind/src/query.rs | 9 +- crates/huginn-mind/src/rows.rs | 16 +-- .../epiphany.pipeline.finding.v2.schema.json | 3 +- ...epiphany.pipeline.follow_up.v2.schema.json | 3 +- .../epiphany.pipeline.idea.v2.schema.json | 3 +- .../epiphany.pipeline.memory.v2.schema.json | 3 +- .../epiphany.pipeline.question.v2.schema.json | 3 +- .../epiphany.pipeline.reply.v2.schema.json | 97 +++++++++++++++++++ .../epiphany.pipeline.research.v2.schema.json | 3 +- ...piphany.pipeline.resolution.v2.schema.json | 3 +- .../epiphany.pipeline.ruling.v2.schema.json | 3 +- .../epiphany.pipeline.run.v2.schema.json | 3 +- .../huginn.mind_request.v1.schema.json | 51 +++++++++- .../huginn.mind_response.v1.schema.json | 89 ++++++++++++++++- schemas/cultnet/index.json | 11 +++ 21 files changed, 368 insertions(+), 27 deletions(-) create mode 100644 schemas/cultnet/epiphany.pipeline.reply.v2.schema.json diff --git a/crates/eureka-pipeline/golden/envelopes.txt b/crates/eureka-pipeline/golden/envelopes.txt index 596a7cf..c4a9797 100644 --- a/crates/eureka-pipeline/golden/envelopes.txt +++ b/crates/eureka-pipeline/golden/envelopes.txt @@ -29,6 +29,7 @@ sample.pulse yggdrasil:pulse:2026-10-31t041200-t0 epiphany.pipeline.pulse.v2 Epi sample.memory yggdrasil:memory:2026-10-31t041200-t0-m0 epiphany.pipeline.memory.v2 EpiphanyPipelineMemoryDocument 9189a8696e7374616e6365a979676764726173696ca56c6162656cb7323032362d31302d3331743034313230302d74302d6d30a4736f7274a9436f6d6d6974746564a474657874d936492074616b6520746865206261636b67726f756e6420736861646572733b204c6962627920686f6c64732074686520736f756e64732ea561626f757491ab406c696262793a63686174a66f726967696e81a4526f6f6d82a5726f6f6d73a5737761726daa68656172645f66726f6d91ab406c696262793a63686174a7736f757263657391a3246531b173616c69656e63655f7065726d696c6c65cd02bcac636f6e736f6c69646174657390 sample.research eureka-state:research:p1.scope epiphany.pipeline.research.v2 EpiphanyPipelineResearchDocument 9189a863616d706169676eac657572656b612d7374617465a470617373a27031a56c6162656ca573636f7065a5636c61696dd93654686520656d626564206c696d6974206973203430393620746f6b656e7320776974682073696c656e74207472756e636174696f6e2ea664657461696cd934526561642066726f6d20746865206461656d6f6e277320696e646578206d6f64756c6520616e642070726f626564206c6976652ea8696e666572726564c2a7736f75726365739481a45265706f82a47265706fb147616d6543756c742f4570697068616e79a2617484a470617468d9256372617465732f687567696e6e2d6461656d6f6e2f7372632f696e6465782f6d6f642e7273aa73746172745f6c696e6532a8656e645f6c696e6538a6636f6d6d6974a8356639383232386481a357656283a375726cd92268747470733a2f2f7a657474656c6b617374656e2e64652f61746f6d69636974792fa4776f726bb65a657474656c6b617374656e2061746f6d6963697479ac7265747269657665645f6f6eaa323032362d30392d313581a84f6273657276656481a865766964656e636583a46b696e64a454657374a76c6f6361746f72aa636172676f2074657374a6726573756c74a26f6b81a8446f63756d656e7481a97265666572656e636582a46b696e64a652756c696e67a26964b6657572656b612d73746174653a72756c696e673a5238a67365727665739182a46b696e64a85175657374696f6ea26964b8657572656b612d73746174653a7175657374696f6e3a5131ab6f627365727665645f6f6eaa323032362d30392d3135 sample.idea eureka-state:idea:p1.i1 epiphany.pipeline.idea.v2 EpiphanyPipelineIdeaDocument 9189a863616d706169676eac657572656b612d7374617465a470617373a27031a56c6162656ca26931a57469746c65b24f6e65206e6f74652070657220636c61696da469646561d9204b65657020612070617373206173206d616e7920736d616c6c206e6f7465732ea974726164656f666673b74d6f726520646f63756d656e747320746f206c6973742ea872657374735f6f6e9182a46b696e64a85265736561726368a26964be657572656b612d73746174653a72657365617263683a70312e73636f7065a6746f776172649182a46b696e64a85175657374696f6ea26964b8657572656b612d73746174653a7175657374696f6e3a5131ab70726f706f7365645f6f6eaa323032362d30392d3135 +sample.reply yggdrasil:reply:mind-2026-10-09-1-r1 epiphany.pipeline.reply.v2 EpiphanyPipelineReplyDocument 9185a8696e7374616e6365a979676764726173696ca56c6162656cb46d696e642d323032362d31302d30392d312d7231a372756e82a46b696e64a352756ea26964bf79676764726173696c3a72756e3a6d696e642d323032362d31302d30392d31a7616e73776572739182a46b696e64a8466f6c6c6f775570a26964d923657572656b612d73746174653a666f6c6c6f775f75703a61736b2d7468652d73656c66a474657874d93054686520736861646572207061737320697320646f6e653b2074686520736f756e647320617265204c6962627927732e resolution.superseded eureka-state:resolution:question.Q1.n1 epiphany.pipeline.resolution.v2 EpiphanyPipelineResolutionDocument 9185a77375626a65637482a46b696e64a85175657374696f6ea26964b8657572656b612d73746174653a7175657374696f6e3a5131a873657175656e636501a76f7574636f6d6581aa5375706572736564656481a262799282a46b696e64a652756c696e67a26964b6657572656b612d73746174653a72756c696e673a523882a46b696e64a85175657374696f6ea26964b8657572656b612d73746174653a7175657374696f6e3a5131a9726174696f6e616c65a852756c656420412eab7265736f6c7665645f6f6eaa323032362d30392d3135 resolution.fixed-by-none eureka-state:resolution:question.Q1.n1 epiphany.pipeline.resolution.v2 EpiphanyPipelineResolutionDocument 9185a77375626a65637482a46b696e64a85175657374696f6ea26964b8657572656b612d73746174653a7175657374696f6e3a5131a873657175656e636501a76f7574636f6d6581a5466978656482a6636f6d6d6974a83566393832323864a26279c0a9726174696f6e616c65a852756c656420412eab7265736f6c7665645f6f6eaa323032362d30392d3135 resolution.fixed-by-some eureka-state:resolution:question.Q1.n1 epiphany.pipeline.resolution.v2 EpiphanyPipelineResolutionDocument 9185a77375626a65637482a46b696e64a85175657374696f6ea26964b8657572656b612d73746174653a7175657374696f6e3a5131a873657175656e636501a76f7574636f6d6581a5466978656482a6636f6d6d6974a83566393832323864a2627982a46b696e64a94375745265706f7274a26964d921657572656b612d73746174653a6375745f7265706f72743a6375742d33612e6831a9726174696f6e616c65a852756c656420412eab7265736f6c7665645f6f6eaa323032362d30392d3135 diff --git a/crates/eureka-pipeline/src/lib.rs b/crates/eureka-pipeline/src/lib.rs index eab3ca8..e787545 100644 --- a/crates/eureka-pipeline/src/lib.rs +++ b/crates/eureka-pipeline/src/lib.rs @@ -606,6 +606,22 @@ fn pulse_is_well_formed(pulse: &PipelinePulse, at: &str) -> Result<(), PipelineR Ok(()) } +/// A reply says something and answers only follow-ups, from a run. +fn reply_is_well_formed(reply: &PipelineReply, at: &str) -> Result<(), PipelineRefusal> { + if reply.text.0.trim().is_empty() { + return Err(format_error(&format!("{at}.text"), "a reply with no words")); + } + if reply.run.kind != PipelineKind::Run { + return Err(format_error(&format!("{at}.run.kind"), reply.run.kind.name())); + } + for (index, answer) in reply.answers.iter().enumerate() { + if answer.kind != PipelineKind::FollowUp { + return Err(format_error(&format!("{at}.answers[{index}].kind"), answer.kind.name())); + } + } + Ok(()) +} + /// The most thousandths a memory's salience may carry. pub const SALIENCE_MAX_PERMILLE: u16 = 1000; @@ -820,6 +836,11 @@ value_types! { pub struct PipelinePulse { instance: Slug, label: Label, tempo_vote_beat_s: Option, tempo_vote_withdrawn: bool = absent, urgency_permille: Option, note: Line, } => pulse_is_well_formed + /// One result of her Self session, as its actuator heard it: the words her + /// Self ended a turn with, and the follow-ups (briefs) the turn answers. + /// Instance-rooted: the key is `:reply: