No description
  • Rust 98.4%
  • TypeScript 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens e1c54c8f28 Fix runtime-bundle gid check and strengthen the recipe-drift test (Soul pass 2)
S1 (critical): require_runtime_bundle and require_root_read_only_file required
gid 0 on the Idunn runtime bundle directory and its documents. Idunn creates
the bundle inside runtime_root, which is setgid to the workload's own group
(so the process write-lease record beside it can share that gid,
Idunn/src/drivers.rs), and hardens only uid 0 + mode (0555 dir, 0444 files) —
never gid. The bundle inherits a real workload group, never 0: the live Odin
bundle is root:odin and Odin accepts it. Every managed daemon on Yggdrasil
would fail this exact check at Warming.

Extracted the rule into two pure functions over (uid, gid, mode) —
is_root_service_read_only_directory and is_root_read_only_file — so it is
testable without a Linux filesystem instead of sitting unexercised behind
#[cfg(target_os = "linux")] the way the real check always has (nothing in
this crate built a chowned/chmodded fixture for it before). gid is accepted
as a parameter but never checked, with a comment saying why. Also routed
require_root_controlled_directory_chain's existing check (which never
required gid 0) through the same directory predicate, for one owner of the
rule instead of two copies of it.

Added root_read_only_accepts_any_gid_and_refuses_group_or_other_write,
covering: any gid accepted, owner-write allowed on directories (0o022 never
checked it), group/other-write refused on both files and directories, wrong
uid refused. Mutation: restored `&& gid == 0` in
is_root_service_read_only_directory, confirmed the any-gid assertions fail,
reverted (diff-clean).

S3: recipe_matches_the_daemon_it_deploys previously matched anywhere in the
recipe text, so it passed with Odin's and Heimdall's dependency kinds
swapped, passed when only [[provides]]'s schema was wrong (the world slot's
own copy was still right), was blind to the world/mesh slot schemas
specifically, and never checked STATE_CONTRACT_SHA256 at all. Added
recipe_blocks/find_block to anchor every assertion to its own table (by id
for state slots, by capability for provides/dependencies), and pinned
EXPECTED_STATE_AND_SLOTS_TEXT beside STATE_CONTRACT_SHA256 — the exact
[state]+[[state.slots]] source text the hash was computed from (LF, matching
the committed git blob, not a Windows checkout's autocrlf) — with a comment
that both constants change together. No TOML parser or msgpack encoder is in
this workspace, so the test cannot recompute the hash itself; pinning the
source text it was computed from is the cheapest honest proxy.

Verified all four of Soul's named mutations now fail correctly and were
reverted (recipe.toml is git-diff-clean after): provides schema changed alone
(world slot untouched) -> fails on the provides block; Odin/Heimdall
dependency kinds swapped -> fails on the Odin block; world slot schema alone
-> fails on the world block (previously the blind spot); an app-sessions
writer/recovery edit -> fails on the STATE_CONTRACT_SHA256 text pin.

Found and fixed one collateral break: my new doc comment for
EXPECTED_STATE_AND_SLOTS_TEXT named `StateDeclaration`, which matched the
existing play::tests::soul_no_forbidden_writer_name_appears_in_dungeons_own_source
pin (it scans non-test production source, including doc comments outside a
`#[cfg(test)]` line, and it forbids the substring "Declaration"). Reworded to
"the recipe's own parsed `[state]` struct" — no functional change.

Verification: cargo test -p ghostlight-dungeon --bin ghostlight-dungeon ->
186 passed, 0 failed, 4 ignored (185 -> 186, +1 for the new pure-predicate
test). cargo test -p ghostlight --lib controllers:: -> 131 passed, 0 failed,
1 ignored, unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 16:25:12 +02:00
acceptance Rebuild qualified world elaboration 2026-09-01 09:54:04 +02:00
assets/newspaper/woodcuts Build seeded TeX newspaper press 2026-08-30 18:30:56 +02:00
crates Fix runtime-bundle gid check and strengthen the recipe-drift test (Soul pass 2) 2026-09-23 16:25:12 +02:00
deployment Cut CodexConnector out of managed admission; fix Heimdall's dependency kind and recipe/binary drift 2026-09-23 15:59:09 +02:00
docs Record PA.f197: Heimdall documents read as a schema, not as a consumer 2026-09-23 14:39:57 +02:00
examples Keep the world elaboration record and first-generation world fixtures in Ghostlight 2026-09-13 16:35:03 +02:00
experiments Keep the world elaboration record and first-generation world fixtures in Ghostlight 2026-09-13 16:35:03 +02:00
notes Place the acceptance fixture's subjects so the gate can pass 2026-09-23 15:22:25 +02:00
output Separate newspaper house style from issue flow 2026-08-30 19:34:37 +02:00
prompts Keep the world elaboration record and first-generation world fixtures in Ghostlight 2026-09-13 16:35:03 +02:00
schemas Add initiative scheduler artifact seam 2026-05-04 23:58:07 +01:00
scripts Correct re-entry steering after the fan-out 2026-09-04 15:58:55 +02:00
sidecar/claude-sdk Add granting and revoking affordances to the world kernel (play agent Cut 5, PA-Q10) 2026-09-22 04:54:35 +02:00
state Swap the real cognition acceptance test to the local Bonsai transport 2026-09-23 15:13:45 +02:00
tools Refuse to type into a disabled control in the Eve client bridge (PA.f174) 2026-09-23 02:28:01 +02:00
vendor Replace vendor/cultcache-py submodule with published PyPI dependency 2026-09-13 16:08:19 +02:00
web Cut 15: subscribe to revisions after any sign-in, not only the redirect flow, and keep a poll fallback (PA.f191) 2026-09-23 05:32:17 +02:00
.gitignore Add the Claude SDK sidecar: framing, the closed schema converter, the query 2026-09-06 02:10:33 +02:00
.gitmodules Replace vendor/cultcache-py submodule with published PyPI dependency 2026-09-13 16:08:19 +02:00
AGENTS.md Replace vendor/cultcache-py submodule with published PyPI dependency 2026-09-13 16:08:19 +02:00
Cargo.lock Use UAX #29 word boundaries in SourceSpan::locate (PA.f78) 2026-09-22 16:25:32 +02:00
Cargo.toml Use UAX #29 word boundaries in SourceSpan::locate (PA.f78) 2026-09-22 16:25:32 +02:00
CLAUDE.md Wire AGENTS.md into Claude Code memory 2026-09-03 22:22:51 +02:00
package-lock.json Adopt Ink for branching scenes 2026-05-01 23:52:15 +01:00
package.json Replace vendor/cultcache-py submodule with published PyPI dependency 2026-09-13 16:08:19 +02:00
README.md Give the world library a sealed public boundary 2026-09-16 02:06:07 +02:00

Ghostlight

Ghostlight builds persistent generative people and worlds. Its active product is Ghostlight Dungeon: a Vault-grounded narrative simulation in which places, knowledge, relationships, institutions, clocks, and consequences survive beyond the model's current context.

The project began as a research and fixture pipeline for socially persistent Aetheria agents. That material remains useful regression evidence. The live machine is now a Rust runtime with typed campaign state, one canonical world authority, bounded Persona projection, fiction-first action resolution, and a multiresolution agency graph for keeping large settings active at finite cost.

What Ghostlight Owns

  • WorldKernel is the sole owner of committed campaign state and revisions.
  • Every player command, NPC action, strategic tick, wait, import, and reload enters the same validated campaign mailbox and atomic CultCache commit path.
  • Foreground actions, NPC reactions, strategic Gestalt activity, waits, travel, and population fission lower into one closed semantic world-mutation algebra. Means and intended effects remain proposals; only an admitted mutation batch can change canonical components. There is no model-authored JSON Patch path.
  • Vault evidence constrains world compilation without pretending every playable route, procedure, or local institution is already written down. The compiler synthesizes the smallest compatible branch elaboration, exposes it for approval, and keeps it distinct from canon. Details that must not vary belong in the Vault.
  • Hosted lore Vaults are planned as Git-synchronized, Obsidian-compatible Markdown hierarchies. The Vault service owns their indexes; campaigns retain only manifest bindings and exact evidence receipts.
  • Projector → Persona → Interpreter turns produce proposals. Models never commit world state.
  • Knowledge, perception, capability, location, custody, and authority are validated against the exact actor proposing an action.
  • Fiction-first d20 resolution treats player text as an attempt rather than an accomplished fact.
  • Multiresolution Gestalts keep people, institutions, and factions active under a bounded Persona-cell budget without merging rivals into one mind or erasing named individuals.
  • Away-time simulation advances clocks and remote agency without puppeting or directly harming an absent player character.
  • CultMesh publishes typed service and Eve/CultUI state; the browser lowers that surface and does not become a second state authority.
  • Odin receives Ghostlight's advertised boundary schemas and typed projections over ACK-bounded RUDP publication. Internal runtime schemas are not treated as discovery contracts merely because Ghostlight owns them.

Eve-native interface

Ghostlight publishes one stable logical surface, ghostlight.play, for anonymous entry, Session Zero, Contract Review, and campaign play. The browser contains Eve's canonical provider host and lowering package plus Heimdall's access-plugin adapter. It does not contain Ghostlight-specific screen renderers or domain API routing.

Editable Eve bindings are the input model. Text, number, and choice controls bind either provider-owned typed state or renderer-local draft state; an operation captures named bindings and submits one canonical Eve command. Rejected or stale commands preserve local drafts, while an accepted receipt may clear named bindings before the host refetches the authoritative surface. A browser may lower this interaction to an HTML form for accessibility, but forms are not part of Eve's state or command ontology.

Heimdall authentication is composed as the required gamecult.heimdall.access Eve plugin. Heimdall owns OAuth attempts, provider callbacks, claims, entitlements, and single-use completion redemption. Ghostlight owns only its hashed HttpOnly app session and derives campaign authority from canonical membership. The browser sees an opaque attempt handle, never a claim, refresh credential, account hash, member ID, or actor authority. See docs/architecture/ghostlight-eve-native-interface.md.

Current Status

Ghostlight Dungeon is implemented and deployed as a native Yggdrasil, Heimdall-gated playtest harness. Idunn owns daemon continuity, Odin owns Verse discovery, and the application remains the sole owner of campaign truth. Authentication commands resolve Heimdall's redacted private boundary through Odin; no direct route is browser- or unit-owned, and valid local sessions do not phone home on routine commands. The current acceptance surface covers:

  • persistent DM-led Session Zero with shared/private channels, typed contracts, private boundaries, character bargains, digest-bound unanimous approval, and atomic publication;
  • source-constrained world compilation from an approved brief: canon evidence pins what must remain true, compatible game-scale connective tissue becomes disclosed branch-local state, and genuine premise conflicts return to negotiation instead of borrowing a nearby story;
  • selectable Aetheria and Kalsa Vaults, with Kalsa's player-safe Public and GM-only Spoilers evidence lanes preserved through exact receipts;
  • persistent campaigns, forks, resets, exports, and Heimdall-account-isolated sessions;
  • parallel affected-character Projector/Persona/Interpreter waves;
  • impossible-action refusal, assessed stakes, server-side rolls, and receipted commits;
  • strategic clocks, away-time catch-up, institution activity, migration, and information-channel-aware news;
  • bounded shared-scene co-op for up to eight Heimdall members, with exact member→actor authority, actor-filtered surfaces, unanimous time/budget governance, and no player puppeting or PvP mutation;
  • connected cohesive and arena simulation covers at budgets from 1 to 128;
  • Gestalt materialisation, folding, member deltas, migration, and later rematerialisation of the same person;
  • atomic rejection of malformed, stale, or semantically invalid model waves;
  • one kernel-owned mutation reducer for foreground, reaction, strategic, time, travel, population-fission, and bounded region-expansion consequences, with exact component versions and mutation proof receipts;
  • provider, token, cache, latency, validation, state-version, and build receipts;
  • provider-neutral inference through either direct DeepSeek/OpenRouter boundaries or the independent CodexConnector daemon's encrypted loopback CultNet boundary, while every prompt, schema, retry, interpretation, and world commit remains Ghostlight's;
  • exact-build deployment, state migration, public cutover, and restart verification on Yggdrasil.

Initial compiler seed publication is a bounded empty-store creation transaction. Named-person materialisation and folding are resolution transactions that preserve individual deltas without rewriting their Gestalt. The remaining forge gates are expansion and review of the agency corpus beyond its current candidate seed, removal of legacy model effect schemas, multi-account human pressure testing of Session Zero privacy/publication and bounded co-op, and continued multiresolution Gestalt agency pressure. The public site is provisional; checkout is not live.

Bounded Co-op

Campaign creation now supports one to eight authenticated players. One SessionZeroKernel owns negotiation; after unanimous approval, one WorldKernel owns the shared campaign. Membership binds each account to one exact actor, and every player receives an actor-filtered Eve projection.

This milestone is intentionally one shared scene with sequential public actions. PvP, split parties, private in-play actions, delegation, late joining, and simultaneous declarations remain closed until their consent and governance contracts exist. See docs/architecture/ghostlight-dungeon-session-zero.md and the longer-term multiplayer intention.

Lore Vault Product Intention

The hosted product will accept ordinary Obsidian-compatible lore Vaults synced through Git. Contributor and Private plans provision one active custom Vault; their Plus variants provision three, subject to combined indexed-source and import allowances. The entitlement, accounting rules, authority boundary, and security gates are recorded in docs/product/lore-vault-entitlements.md. Custom tenant import is not yet part of the deployed tester harness.

Architecture

The shortest reliable re-entry path is:

Repository Shape

  • crates/ghostlight/: the library crate — world kernel, ontology and reducer, journal, mailbox, controllers, elaboration, cover, clock, consumer admission, inference ports, and evidence sources;
  • crates/ghostlight-dungeon/: Rust daemon consuming that library — HTTP routes, Eve projection/command ingress, Heimdall and app sessions, CultMesh publication, Idunn health, and acceptance harnesses;
  • crates/ghostlight-persona-projection/: generalized projection membrane owned by Ghostlight and consumed by Epiphany;
  • docs/architecture/: durable contracts and authority maps;
  • docs/articles/: accessible public explanations;
  • notes/: implementation planning, handoff, and current-system maps;
  • schemas/: published JSON Schemas for typed boundary documents;
  • examples/: earlier fixtures and regression material;
  • state/: human-readable project memory plus older research-pipeline state;
  • tools/: state, validation, and fixture helpers.
  • web/: thin Eve browser host, Ghostlight transport, and Heimdall plugin adapter; product state and product-specific rendering remain server-owned.

Runtime documents and campaign exports use MessagePack-backed CultCache .cc. JSON exists at schema publication, browser, MCP, model-provider, and diagnostic boundaries; it is not the canonical hosted state store.

Useful Commands

cargo test --workspace
npm run state:status
npm run state:prepare-compaction
npm run schema:validate

For Codex-driven work, read AGENTS.md before changing the repository. It owns the persistence, grounding, verification, and handoff discipline.