Make Gjallar the Nightwing overview compositor
This commit is contained in:
parent
bbb3b9a8e1
commit
c87a9f8a4d
13 changed files with 677 additions and 300 deletions
|
|
@ -32,22 +32,24 @@ Verse / host / device / provider inputs
|
|||
-> ingest ports
|
||||
-> normalization
|
||||
-> typed Odin records
|
||||
-> Gjallar affordance records
|
||||
-> CultMesh node
|
||||
-> CultCache .cc persistence
|
||||
-> CultNet/CultMesh document registry
|
||||
-> Eve/CultUI projection and agent affordance packets
|
||||
-> Gjallar overview composition
|
||||
-> Nightwing terminal lowering
|
||||
-> Eve/CultUI projection and compact display feeds
|
||||
```
|
||||
|
||||
The first Rust core lives in `crates/odin-core`:
|
||||
|
||||
- `documents.rs`: typed Odin records and the CultMesh document set.
|
||||
- `ports.rs`: narrow ingest traits, Gjallar affordance input, plus clock
|
||||
injection for deterministic tests.
|
||||
- `ports.rs`: narrow ingest traits plus clock injection for deterministic tests.
|
||||
- `pipeline.rs`: collection and normalization from input observations to typed
|
||||
records, including `gjallar.affordance.v1`.
|
||||
Odin records.
|
||||
- `repository.rs`: `OdinRepository` abstraction, in-memory mock repository, and
|
||||
CultMesh-backed repository.
|
||||
- `gjallar.rs`: pure overview composition from Odin records to typed Gjallar
|
||||
overview/tile records.
|
||||
|
||||
The Rust spine owns the future architecture. The CommonJS daemon remains the
|
||||
legacy operational body until each organ crosses this typed boundary.
|
||||
|
|
@ -57,10 +59,10 @@ legacy operational body until each organ crosses this typed boundary.
|
|||
Odin's executable body is split by ownership:
|
||||
|
||||
- `crates/odin-core`: Rust target core. Owns typed Odin documents, ingest
|
||||
ports, Gjallar affordance records, normalization, and CultMesh/CultCache
|
||||
repository boundaries. This is the replacement spine; JavaScript remains
|
||||
legacy runtime/probe scaffolding until each organ has crossed the typed
|
||||
boundary.
|
||||
ports, Gjallar overview records, normalization, composition, and
|
||||
CultMesh/CultCache repository boundaries. This is the replacement spine;
|
||||
JavaScript remains legacy runtime/probe scaffolding until each organ has
|
||||
crossed the typed boundary.
|
||||
- `src/odin-coordinator.cjs`: process lifecycle, refresh loop, persistence, health, and transport wiring.
|
||||
- `src/odin/config.cjs`: runtime paths, seed deck URLs, intervals, and CultLib module path setup.
|
||||
- `src/odin/documents.cjs`: CultCache/CultMesh document definitions accepted by Odin.
|
||||
|
|
@ -74,16 +76,16 @@ Odin's executable body is split by ownership:
|
|||
|
||||
The entrypoint is not allowed to grow new probe, surface, provider, layout, or renderer policy. If a new owner is needed, name the owner and its invariant before adding code.
|
||||
|
||||
Gjallar is the named herald organ for agent-context transmission. In the Rust
|
||||
spine, Gjallar has a typed `gjallar.affordance.v1` record and an injected
|
||||
affordance ingest port. Its
|
||||
current package lives in `docs/gjallar.md`, `personas/gjallar.persona_state.cc`,
|
||||
`crates/gjallar-daemon`, `assets/personas/gjallar-avatar.png`, and
|
||||
`assets/personas/gjallar-avatar-pixel-256.png`. It runs as its own Rust
|
||||
CultMesh entrypoint rather than being folded into Odin's coordinator. Gjallar
|
||||
may read Odin-owned state and emit affordance
|
||||
packets; it must not own the underlying registry, probe, provider, layout, or
|
||||
translation decisions.
|
||||
Gjallar is the named overview composition daemon for what Nightwing displays.
|
||||
In the Rust spine, Gjallar has typed `gjallar.overview.v1` and
|
||||
`gjallar.overview_tile.v1` records. Its package lives in
|
||||
`crates/gjallar-daemon` and `docs/gjallar.md`. It runs as its own Rust CultMesh
|
||||
entrypoint rather than being folded into Odin's coordinator or Nightwing's TUI.
|
||||
Gjallar may read Odin-owned state and emit a packed overview feed. During the
|
||||
CommonJS-to-Rust migration it may also read Odin's existing
|
||||
`gamecult.eve.surface_state.v1` compatibility record and wrap it as a Gjallar
|
||||
tile. It must not own the underlying registry, probe, provider truth, terminal
|
||||
glyph rendering, or translation decisions.
|
||||
|
||||
Idunn is the named keepalive organ for daemon continuity. Its current Rust
|
||||
body lives in `crates/idunn-daemon` and `crates/odin-core/src/idunn.rs`. Idunn may read
|
||||
|
|
@ -143,9 +145,10 @@ Current Rust verification:
|
|||
|
||||
- `pipeline_collects_from_injected_ports`: proves ingest ports and clock injection.
|
||||
- `memory_repository_supports_fast_unit_tests`: proves repository consumers can test without CultMesh.
|
||||
- `cultmesh_repository_round_trips_typed_records`: proves typed records,
|
||||
including Gjallar affordances, persist through CultMesh/CultCache and reload
|
||||
from `.cc`.
|
||||
- `compose_overview_orders_dashboard_tiles_for_nightwing`: proves Gjallar can
|
||||
turn Odin records into an ordered overview feed without daemon boot.
|
||||
- `cultmesh_repository_round_trips_typed_records`: proves typed Odin records
|
||||
persist through CultMesh/CultCache and reload from `.cc`.
|
||||
|
||||
## Service Architecture Contract
|
||||
|
||||
|
|
@ -185,7 +188,11 @@ Odin currently publishes service squares for:
|
|||
- Raven: SSH reachability.
|
||||
- Yggdrasil: SSH/HTTP/HTTPS reachability plus nginx, StreamPixels, Heimdall, Repixelizer, and Bifrost systemd state.
|
||||
|
||||
The compact Nightwing TUI lowers these into dense cells and fills surplus screen space with derived schema, route, owner, and probe facets from the same Odin-owned service records.
|
||||
Gjallar composes these into the compact overview feed. The Nightwing TUI lowers
|
||||
that feed into dense cells and fills surplus screen space according to
|
||||
Gjallar's tile ordering, spans, and density hints. If Nightwing starts deriving
|
||||
dashboard composition directly from Odin service records, the composition owner
|
||||
has leaked out of Gjallar.
|
||||
|
||||
## Current Interface Surface
|
||||
|
||||
|
|
|
|||
194
docs/gjallar.md
194
docs/gjallar.md
|
|
@ -1,144 +1,92 @@
|
|||
# Gjallar
|
||||
|
||||
Gjallar is the herald organ for Odin.
|
||||
Gjallar is the overview composition daemon for Odin.
|
||||
|
||||
Odin is the all-seer: it accepts Verse discovery, schema catalogs, translation
|
||||
routes, provider surfaces, and observation projections. Gjallar is the
|
||||
transmission daemon that turns that sight into agent-ready context: a fractal
|
||||
tapestry of affordances across every Verse this Odin can currently see.
|
||||
routes, provider surfaces, and observation projections. Gjallar reads that
|
||||
Odin-owned state and composes the dense overview feed that Nightwing displays.
|
||||
Nightwing should not run a bespoke dashboard brain; it should ask Gjallar what
|
||||
to draw and then lower that feed into fast terminal cells.
|
||||
|
||||
Gjallar should make the next capable agent less blind. It should not become a
|
||||
second Odin.
|
||||
Gjallar exists so Odin does not need to care how a pile of dashboards fits on
|
||||
one screen, and Nightwing does not need to know how Odin's world model is built.
|
||||
|
||||
## Authority Map
|
||||
|
||||
- Owner: Gjallar owns agent-context transmission of Odin-owned sight.
|
||||
- Inputs: Odin's accepted registry, schema index, translation map, provider
|
||||
interfaces, observation-stream summaries, layout hints, and provenance
|
||||
metadata.
|
||||
- Outputs: compact affordance packets for Codex, native CultMesh agents, repo
|
||||
Faces, Bifrost, and other agent consumers; optional Persona-facing memory
|
||||
summaries that name what Odin can see and what can be acted on.
|
||||
- Derived state: summaries, prompts, Persona projections, Bifrost speech
|
||||
requests, Discord lowerings, and handoff notes are notification-only
|
||||
projections of Odin state.
|
||||
- Forbidden writers: Gjallar does not probe hosts, decide Verse truth, mutate
|
||||
provider-owned dashboards, own renderer layout, or invent schema translation
|
||||
routes.
|
||||
- Shared paths: human dashboards, Codex context assembly, native CultMesh agent
|
||||
bootstrap, Bifrost-routed Persona speech, and compatibility MCP access must
|
||||
consume the same Odin-owned records before Gjallar speaks.
|
||||
- Deletion line: any Gjallar path that starts storing independent discovery
|
||||
truth should be cut or demoted to a cache that names Odin as source.
|
||||
- Owner: Gjallar owns overview composition for Odin sight.
|
||||
- Inputs: Odin's accepted snapshot, Verse records, service records, interface
|
||||
records, observation stream records, translation route records, and explicit
|
||||
operator/Nightwing display constraints.
|
||||
- Outputs: typed `gjallar.overview.v1` and `gjallar.overview_tile.v1` records:
|
||||
overview metadata, tile ordering, density hints, source pointers, status,
|
||||
labels, and compact detail text for Nightwing.
|
||||
- Derived state: tile priority, grouping, target rows/columns, row/column spans,
|
||||
visual emphasis hints, and compact summaries are derived from Odin state.
|
||||
- Forbidden writers: Gjallar does not probe hosts, accept Verse truth, mutate
|
||||
provider-owned dashboards, own terminal glyph rendering, or invent schema
|
||||
translation routes.
|
||||
- Shared paths: Nightwing TUI, browser previews, future compact overlays, and
|
||||
agent summaries consume the same Gjallar overview feed when they want the
|
||||
"everything Odin sees" view.
|
||||
- Deletion line: any Nightwing path that independently composes Odin dashboards
|
||||
should move into Gjallar; any Gjallar path that decides discovery truth should
|
||||
move back into Odin.
|
||||
|
||||
## Body
|
||||
|
||||
The initial local package is deliberately small:
|
||||
- `crates/gjallar-daemon` is Gjallar's Rust CultMesh daemon.
|
||||
- `crates/odin-core/src/gjallar.rs` owns the pure composition function so unit
|
||||
tests can exercise packing decisions without booting a daemon.
|
||||
- `gjallar.overview.v1` describes the feed Nightwing asks for.
|
||||
- `gjallar.overview_tile.v1` describes each drawable tile and names its Odin
|
||||
source record.
|
||||
- `assets/personas/gjallar-avatar.png` and
|
||||
`assets/personas/gjallar-avatar-pixel-256.png` remain branding assets for the
|
||||
view/persona surface.
|
||||
|
||||
- `personas/gjallar.persona_state.cc` is the canonical repo-local Persona
|
||||
state: a CultCache MessagePack store containing a `gamecult.persona_state.v0`
|
||||
document keyed as `persona:gjallar`.
|
||||
- `scripts/write-gjallar-persona-cc.mjs` mints and inspects that store from the
|
||||
canonical EpiphanyAgent schema. The script is a local writer, not Gjallar's
|
||||
runtime body.
|
||||
- `crates/gjallar-daemon` is Gjallar's Rust CultMesh organ. It requires the
|
||||
Persona `.cc` source and publishes typed `gjallar.affordance.v1` records
|
||||
through Odin's document set.
|
||||
- `assets/personas/gjallar-avatar.png` is the local avatar asset.
|
||||
- `assets/personas/gjallar-avatar-pixel-256.png` is the 256px pixel-art avatar
|
||||
variant for compact Persona surfaces.
|
||||
- This document is the organ contract for the runtime daemon.
|
||||
|
||||
Gjallar is executable as its own Rust CultMesh runtime beside Odin. Do not fold
|
||||
it into `src/odin-coordinator.cjs`. The coordinator already owns lifecycle,
|
||||
refresh, persistence, and transport for Odin. Gjallar's entrypoint owns context
|
||||
publication and no more.
|
||||
|
||||
## Persona Registration
|
||||
|
||||
VoidBot's current native Persona reader expects a JSON `personaStatePath`. That
|
||||
is a compatibility projection boundary, not the state owner and not the
|
||||
transport owner. Any registry entry must point at a generated projection or
|
||||
learn to read the CultCache record; the canonical source remains:
|
||||
|
||||
```text
|
||||
id: gjallar
|
||||
repoName: Odin
|
||||
displayName: Gjallar
|
||||
repoPath: E:\Projects\Odin
|
||||
avatarPath: E:\Projects\Odin\assets\personas\gjallar-avatar.png
|
||||
pixelAvatarPath: E:\Projects\Odin\assets\personas\gjallar-avatar-pixel-256.png
|
||||
personaStateStore: E:\Projects\Odin\personas\gjallar.persona_state.cc
|
||||
personaStateKey: persona:gjallar
|
||||
personaStateSchema: gamecult.persona_state.v0
|
||||
```
|
||||
|
||||
That compatibility registration belongs in the current Discord adapter, not
|
||||
here. This repo owns the Persona source record and avatar. Bifrost owns the
|
||||
CultMesh speech crossing when a Persona interpreter decides it wants to speak.
|
||||
Discord is then a Bifrost lowering/receipt path, with VoidBot acting only as
|
||||
legacy room cognition and compatibility delivery machinery.
|
||||
|
||||
## Transport Boundary
|
||||
|
||||
Persona speech is a bridge crossing. The interpreter may decide that a Face
|
||||
speaks, but the public transport request is a Bifrost CultMesh command or
|
||||
document, not a VoidBot-owned side effect.
|
||||
|
||||
Target shape:
|
||||
|
||||
```text
|
||||
Persona runtime / interpreter
|
||||
-> Bifrost speech request through CultMesh
|
||||
-> Bifrost policy, Heimdall claims, topic/work/context linkage
|
||||
-> Discord, GitHub, owner DM, or future public surface lowering
|
||||
-> Bifrost receipt
|
||||
```
|
||||
|
||||
VoidBot owns Discord observation, room cognition, moderation judgment, and
|
||||
compatibility delivery. Its repo search, Discord history search, and
|
||||
archive/source retrieval are required native CultCache/CultMesh services. Any
|
||||
remaining VoidBot-local or MCP-only implementation is migration debt. MCP is a
|
||||
bridge for external agentic access, not the native affordance path for GameCult
|
||||
agents that can speak CultMesh.
|
||||
|
||||
## CultMesh Runtime Body
|
||||
|
||||
Gjallar's runtime body is Rust in `crates/gjallar-daemon`:
|
||||
Run one composition pass from the repo root:
|
||||
|
||||
```powershell
|
||||
cargo run -p gjallar-daemon --
|
||||
```
|
||||
|
||||
The current Rust entrypoint requires the local `persona:gjallar` CultCache
|
||||
source and publishes a typed `gjallar.affordance.v1` packet through CultMesh.
|
||||
It does not decode Persona as JSON, does not own discovery truth, and does not
|
||||
pretend the Persona store is its runtime state.
|
||||
By default, Gjallar reads Odin's local CultMesh store at
|
||||
`scratch/odin/odin.ccmp` and writes its feed to
|
||||
`scratch/gjallar/gjallar.overview.ccmp`.
|
||||
|
||||
## Runtime Contract
|
||||
|
||||
```text
|
||||
Odin typed state
|
||||
-> Gjallar overview composition
|
||||
-> gjallar.overview / gjallar.overview_tile CultMesh records
|
||||
-> Nightwing terminal lowerer
|
||||
```
|
||||
|
||||
Nightwing owns terminal speed, key handling, glyph selection, color lowering,
|
||||
and screen refresh. Gjallar owns what should be on the overview and how densely
|
||||
it should be packed. Odin owns the facts being summarized.
|
||||
|
||||
## Current Cut
|
||||
|
||||
The current Rust daemon has two input paths:
|
||||
|
||||
- Preferred: read Rust typed Odin records such as `odin.snapshot.v1`,
|
||||
`odin.service.v1`, and `odin.interface.v1` from an Odin CultMesh store.
|
||||
- Compatibility: read Odin's current CommonJS
|
||||
`gamecult.eve.surface_state.v1` record as a raw MessagePack map, then wrap it
|
||||
as a typed Gjallar overview tile.
|
||||
|
||||
The compatibility path exists so Gjallar can talk to today's Odin without
|
||||
pretending the migration is complete. The next improvement is for Odin to
|
||||
publish a typed index/catalog document that Gjallar can read instead of carrying
|
||||
configured key lists.
|
||||
|
||||
## Invariants
|
||||
|
||||
- Gjallar is a herald, not a second source of truth.
|
||||
- Odin remains the accepted owner of all-seer state.
|
||||
- Verse owners remain owners of their local schemas, command boundaries, and
|
||||
provider surfaces.
|
||||
- Agent consumers receive provenance: what Odin saw, where it came from, and
|
||||
whether it is authoritative, stale, predicted, denied, or unavailable.
|
||||
- If Gjallar cannot name the Odin record behind a claim, the claim is not ready
|
||||
for durable transmission.
|
||||
|
||||
## First Affordance Packet Shape
|
||||
|
||||
Keep the first packet plain until the schema earns promotion:
|
||||
|
||||
```text
|
||||
source: Odin state document or Eve/CultUI provider record
|
||||
verse: Verse or provider id
|
||||
surface: service, interface, observation-stream, schema, or translation route
|
||||
affordance: what an agent can inspect, request, invoke, or lower
|
||||
authority: owner of the real decision
|
||||
status: authoritative, stale, predicted, denied, unavailable, or unknown
|
||||
provenance: endpoint, document id, timestamp, and version when available
|
||||
```
|
||||
|
||||
No regex tribunal for meaning. If natural-language interpretation is needed,
|
||||
use a capable reader and keep the accepted packet inspectable.
|
||||
- Gjallar owns overview composition, not discovery truth.
|
||||
- Nightwing owns terminal lowering, not dashboard composition.
|
||||
- Every tile names the Odin source record behind it.
|
||||
- Missing Odin records disappear from the feed rather than becoming invented
|
||||
truth.
|
||||
|
|
|
|||
Loading…
Reference in a new issue