Build Session Zero and bounded co-op
This commit is contained in:
parent
acb7dae59e
commit
9f8be42d5c
37 changed files with 7834 additions and 1453 deletions
|
|
@ -2,9 +2,12 @@
|
|||
|
||||
## Status
|
||||
|
||||
Multiplayer is an intended post-single-player extension. It is not part of the
|
||||
current MVP acceptance promise, subscription contract, or deployed tester
|
||||
surface.
|
||||
Bounded cooperative multiplayer is implemented in the current MVP: one to
|
||||
eight authenticated players complete Session Zero and begin in one shared
|
||||
scene with sequential public actions, actor-filtered surfaces, pooled
|
||||
Persona-cell entitlements, and unanimous time, travel, and budget governance.
|
||||
The broader model in this document remains the direction for split parties,
|
||||
private play actions, simultaneous declarations, delegation, and PvP.
|
||||
|
||||
The existing simulation is already shaped around multiple bounded actors. The
|
||||
extension should expose that anatomy to multiple human controllers without
|
||||
|
|
@ -14,9 +17,8 @@ creating a second world authority or a special multiplayer simulation loop.
|
|||
|
||||
Let several human-controlled characters inhabit one persistent campaign while
|
||||
preserving the same spatial, epistemic, causal, and commit invariants as solo
|
||||
play. Players may share a scene, split across locations, keep secrets, arrive
|
||||
late, miss events, and rejoin without receiving contradictory reconstructions
|
||||
of the world.
|
||||
play. The implemented milestone keeps the party together. Split locations,
|
||||
late joining, and private in-play actions remain future governance work.
|
||||
|
||||
## Authority map
|
||||
|
||||
|
|
@ -33,9 +35,10 @@ of the world.
|
|||
- **Forbidden writers:** browsers, sessions, party leaders, Personas,
|
||||
Interpreters, narrators, initiative, and realtime transports cannot commit or
|
||||
repair campaign state.
|
||||
- **Shared path:** solo commands, multiplayer commands, waits, travel,
|
||||
simultaneous-action windows, NPC reactions, scheduler ticks, reconnects, and
|
||||
imports use the same `WorldCommand → validate → atomic commit` primitive.
|
||||
- **Shared path:** solo commands, bounded multiplayer commands, unanimous waits
|
||||
and travel, NPC reactions, scheduler ticks, and reconnects use the same
|
||||
`WorldCommand → validate → atomic commit` primitive. Future simultaneous
|
||||
windows must join this path too.
|
||||
- **Cut line:** do not add a parallel room-state store, party prompt, shared
|
||||
narrator memory, or multiplayer-only mutation path.
|
||||
|
||||
|
|
@ -80,9 +83,10 @@ initiative, or commit validation.
|
|||
- Simultaneously submitted incompatible attempts resolve from one snapshot and
|
||||
one deterministic initiative/conflict pass. Arrival order at HTTP or CultNet
|
||||
transport is not fictional initiative.
|
||||
- Player count does not multiply the background Persona-cell budget. Resolution
|
||||
policy belongs to the campaign; directly engaged player characters may create
|
||||
the same explicit mandatory-cell overage as other foreground actors.
|
||||
- Each active member contributes the allowance returned by the entitlement
|
||||
port. The campaign pool is capped by the operator ceiling of 128. Human
|
||||
actors occupy mandatory cells without Persona inference; provider request
|
||||
concurrency remains independent of the chosen cover.
|
||||
- Reconnect and replay derive the player's view from committed receipts and
|
||||
perception rules. A client cache cannot repair or override the kernel.
|
||||
- One malformed, stale, or unauthorized participant proposal cannot partially
|
||||
|
|
@ -109,11 +113,11 @@ typed, persisted, inspectable, and enforced at command admission.
|
|||
|
||||
## Product sequence
|
||||
|
||||
1. Prove the solo paid-alpha loop and multiresolution setting agency.
|
||||
2. Add campaign membership and exact actor-control assignments without changing
|
||||
world mutation.
|
||||
3. Support two cooperative players in one scene with perception-specific output.
|
||||
4. Support split locations, private communication, disconnect, and reconnect.
|
||||
1. Prove the solo loop and multiresolution setting agency. **Complete.**
|
||||
2. Add campaign membership and exact actor-control assignments. **Complete.**
|
||||
3. Support up to eight cooperative players in one scene with actor-specific
|
||||
output and unanimous group governance. **Complete in this milestone.**
|
||||
4. Support split locations, private communication, departure, and late joining.
|
||||
5. Add snapshot-bound simultaneous declaration windows.
|
||||
6. Admit adversarial actions only after consent and governance policy is typed
|
||||
and tested.
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
## Objective
|
||||
|
||||
GhostlightDungeon is a persistent single-player narrative simulation grounded
|
||||
in a source-owned worldbuilding Vault. It gives the world stable geography,
|
||||
bounded knowledge, durable actors and institutions, explicit consequence, and
|
||||
motion beyond the player's attention. The player describes attempts. The world
|
||||
decides what is possible, what is opposed, and what changes.
|
||||
GhostlightDungeon is a persistent solo and bounded-co-op narrative simulation
|
||||
grounded in a source-owned worldbuilding Vault. It gives the world stable
|
||||
geography, bounded knowledge, durable actors and institutions, explicit
|
||||
consequence, and motion beyond the players' attention. Players describe
|
||||
attempts. The world decides what is possible, what is opposed, and what changes.
|
||||
|
||||
The MVP runs as a Rust daemon on Starfire and publishes a private Eve/CultUI
|
||||
surface for two invited testers. Aetheria is the bundled setting adapter. The
|
||||
|
|
@ -17,32 +17,34 @@ evidence and regression scenarios. They do not own runtime state or commits.
|
|||
|
||||
## Implementation frontier
|
||||
|
||||
The Rust runtime now contains the first honest world-compiler seam:
|
||||
The Rust runtime contains a Session Zero-owned world-compiler seam:
|
||||
|
||||
- `VaultProvider` search results become exact, hashed evidence witnesses from
|
||||
VoidBot's live streamable MCP response shape;
|
||||
- opening generation requires exactly three distinct eras, places, and
|
||||
pressures;
|
||||
- role generation requires exactly three grounded roles;
|
||||
pressures and installs them as shared Session Zero decisions;
|
||||
- role generation requires exactly three grounded roles and installs them in
|
||||
each player's private channel;
|
||||
- custom compilation emits a bounded typed campaign, evidence receipts, gaps,
|
||||
branch assumptions, and an approval-required preview;
|
||||
- custom compilation classifies every exact witness as direct seed, setting
|
||||
background, or excluded before world generation, so a nearby story cannot
|
||||
donate its cast, incident, clocks, or institutional posture to a new branch;
|
||||
- a separate Flash-model lane uses two stable broad retrieval queries to
|
||||
compile a coarse remote agency catalog in parallel with local evidence
|
||||
classification. It admits only a proper name plus one short mandate that
|
||||
deterministic code can bind verbatim to a witness naming that institution;
|
||||
extract witnessed remote institutions in parallel with local evidence
|
||||
classification. A Pro synthesis stage turns exact supporting claims into a
|
||||
concise strategic doctrine; local verification rejects unsupported doctrine;
|
||||
- remote institutions begin with deterministic six-axis profiles: their own
|
||||
authority boundary and explicit unknown geography, ideology, economic role,
|
||||
body, and information scope. Fine resources, channels, relations, and current
|
||||
posture compile only when causal relevance supplies evidence for them;
|
||||
- deterministic seed validation rejects missing occupancy, dangling or
|
||||
zero-time routes, invalid containment, invalid clocks, and missing players;
|
||||
- approval alone submits `CreateCampaign`, which atomically stores the campaign
|
||||
and the exact Vault receipts in the campaign `.cc` store.
|
||||
- unanimous current-digest approval plus explicit host publication atomically
|
||||
stores campaign, membership, contract, DM Persona, approved brief, exact
|
||||
Vault receipts, model receipts, and approval evidence in the campaign `.cc`.
|
||||
|
||||
The hosted compiler now exposes generated openings, grounded role selection,
|
||||
The Session Zero DM exposes generated openings, grounded role selection,
|
||||
unrestricted custom starts, approval-gated material gaps, exact-document
|
||||
witnesses, on-demand destination expansion, and persistent canon candidates.
|
||||
A live custom-start acceptance run on 2026-08-16 consumed 30 VoidBot witnesses
|
||||
|
|
@ -63,7 +65,7 @@ token. Only hashed local session aliases enter `service/auth.cc`.
|
|||
|
||||
| Faculty | Owner | Body | Authority |
|
||||
| --- | --- | --- | --- |
|
||||
| Self | `WorldKernel` campaign mailbox | One campaign `.cc` store | Orders commands and owns the campaign revision |
|
||||
| Self | `SessionZeroKernel` / `WorldKernel` mailboxes | One draft `.cc` / one campaign `.cc` | Own draft negotiation or canonical world revision, never both |
|
||||
| Eyes | `VaultProvider` and actor perception slices | VoidBot MCP receipts, topology, occupancy, knowledge | Retrieves and witnesses; never commits world truth |
|
||||
| Modeling | World compiler and action assessor | Typed campaign snapshot | Proposes topology, facts, affordances, DC, stakes, and gaps |
|
||||
| Imagination | Persona and world proposal stages | Private narrative projections | Proposes speech, private deltas, reactions, and actions |
|
||||
|
|
@ -514,12 +516,13 @@ boundaries. It is not load-bearing runtime state.
|
|||
### Campaign registry and session authority
|
||||
|
||||
- **Owner:** the service `CampaignRegistry` owns the mapping from authenticated
|
||||
session hash to selected campaign ID and from campaign ID to its sole
|
||||
account hash to selected campaign ID and from campaign ID to its sole
|
||||
`CampaignRuntime` (`CampaignStore` plus `WorldKernel` mailbox).
|
||||
- **Inputs:** persisted hashed session authority, named campaign lifecycle
|
||||
commands, runtime-root inventory, and exact campaign IDs.
|
||||
- **Outputs:** one selected single-player runtime per session, isolated campaign
|
||||
`.cc` paths, lifecycle receipts, and immutable export bundles.
|
||||
- **Outputs:** one selected campaign runtime per entitled member, exact
|
||||
member-to-actor bindings, isolated campaign `.cc` paths, and lifecycle
|
||||
receipts. Group fork/reset/export remains disabled pending consent policy.
|
||||
- **Derived state:** browser selection, campaign lists, filenames, download
|
||||
responses, and operator cards are projections of registry/control state.
|
||||
- **Forbidden writers:** route handlers, invite cookies, filesystem discovery,
|
||||
|
|
@ -555,12 +558,13 @@ exact evidence receipts used by the campaign, never vectors or a rival index.
|
|||
Compilation is staged and approval-gated:
|
||||
|
||||
```text
|
||||
opening request
|
||||
Begin Session Zero
|
||||
-> retrieval plan
|
||||
-> local exact evidence receipts || stable remote-agency retrieval
|
||||
-> source-use classification || witnessed remote mandate extraction
|
||||
-> three distinct openings or custom opening
|
||||
-> three grounded roles or custom role
|
||||
-> source-use classification || witnessed remote institution extraction
|
||||
-> three distinct opening decisions or custom discussion
|
||||
-> three private role decisions or custom character negotiation
|
||||
-> typed campaign contract + private character drafts + exact approvals
|
||||
-> direct-evidence bounded region + deterministic coarse remote profiles
|
||||
-> semantic agency profiles only for locally materialized subjects
|
||||
-> coverage/gap/assumption preview
|
||||
|
|
@ -578,14 +582,12 @@ not enter the world-seed prompt; excluded evidence is likewise absent. This
|
|||
separation preserves provenance without making retrieved adjacency into
|
||||
fictional causality.
|
||||
|
||||
The remote catalog is not a back door into the local seed. Its model output may
|
||||
propose at most 32 institutions and one short mandate string for each. Local
|
||||
code locates that string in the supplied witnesses and requires the same source
|
||||
to name the institution. Unsupported entries are omitted and summarized as
|
||||
approval-preview coverage gaps; their exact rejection reasons remain in the
|
||||
private model-stage receipt. They do not become campaign canon candidates.
|
||||
This lets the campaign represent distant powers without importing another
|
||||
story's current cast or incident.
|
||||
The remote catalog is not a back door into the local seed. Extraction proposes
|
||||
named institutions plus exact supporting claims. Synthesis writes one concise
|
||||
strategic doctrine from those claims, and a separate verifier must accept it.
|
||||
Unsupported or oversized entries become approval-preview gaps rather than
|
||||
institutions. This lets the campaign represent distant powers without importing
|
||||
another story's current cast, incident, or arbitrary excerpt as behavior.
|
||||
|
||||
The coarse profile is intentionally sparse. Asking the Pro agency compiler to
|
||||
repeat six semantic axes for every remote power exhausted output tokens while
|
||||
|
|
@ -690,17 +692,18 @@ and model-stage state belongs to the authenticated operator projection only.
|
|||
Player and model strings enter the DOM through text nodes rather than HTML
|
||||
insertion, and all laboratory inputs have programmatic labels.
|
||||
|
||||
The same rule covers compiler and campaign-management routes. Opening and role
|
||||
responses contain selectable suggestions, not retrieval/model receipts. An
|
||||
approval preview contains the promised topology, public cast, institutions,
|
||||
populations, clocks, player-role ledger, evidence-use coverage, gaps, and branch
|
||||
assumptions without private goals, memories, relationships, raw evidence, or a
|
||||
serialized campaign. Approval, expansion, fission, fork, and reset return small
|
||||
public receipts; their internal command results remain inside the daemon.
|
||||
The same rule covers Session Zero and campaign-management routes. Opening and
|
||||
role suggestions are filtered typed decisions inside shared or private
|
||||
channels; raw retrieval/model receipts remain private. The review projection
|
||||
contains promised topology, institutions, populations, clocks, evidence-use
|
||||
coverage, gaps, branch assumptions, and only the current viewer's private
|
||||
character state. Publication, expansion, and fission return small public
|
||||
receipts. Group fork/reset/export is rejected until its consent policy exists.
|
||||
|
||||
The player surface includes compilation, transcript, composer, Assess/Attempt,
|
||||
roll confirmation, Wait, character ledger, current place/time/pressure, news,
|
||||
campaign management, fork/reset/export, and optional operator inspection.
|
||||
The player surface includes Session Zero channels and ledgers, transcript,
|
||||
composer, Assess/Attempt, roll confirmation, actor-specific character/news
|
||||
state, unanimous time/travel/budget proposals, Contract Review, and optional
|
||||
operator inspection.
|
||||
CultMesh state is the source of the UI projection. HTTP health is a probe over
|
||||
the same service-state document.
|
||||
|
||||
|
|
@ -769,15 +772,13 @@ Live model allocation:
|
|||
|
||||
## Hosting and security
|
||||
|
||||
The daemon serves the embedded browser bundle on TCP 8831. Firewall scope is
|
||||
Starfire's private LAN and `10.77.0.0/24`; there is no public listener or
|
||||
Yggdrasil web gateway. Provisioned single-use invites establish separate HttpOnly
|
||||
sessions. Campaigns remain single-player in the MVP. This is a product-scope
|
||||
constraint, not a WorldKernel identity: the intended post-solo extension maps
|
||||
multiple authenticated members to distinct player-controlled actors while all
|
||||
commands continue through the same campaign mailbox and atomic commit path.
|
||||
`ghostlight-dungeon-multiplayer-intention.md` owns that future authority map;
|
||||
it does not expand the current acceptance gate.
|
||||
The daemon serves the embedded browser bundle on TCP 8831. Public access is
|
||||
lowered through the existing Heimdall-authenticated `/ghostlight/` reverse
|
||||
proxy path; the application does not add a rival identity system. One to eight
|
||||
members map to distinct player-controlled actors while every command continues
|
||||
through the same campaign mailbox and atomic commit path. The bounded milestone
|
||||
keeps the party in one scene; the multiplayer-intention document owns the
|
||||
remaining split-party and social-governance work.
|
||||
|
||||
The MVP runs as a normal detached process under the Starfire operator account.
|
||||
The launcher records the PID, exact executable path, release commit, and logs;
|
||||
|
|
|
|||
146
docs/architecture/ghostlight-dungeon-session-zero.md
Normal file
146
docs/architecture/ghostlight-dungeon-session-zero.md
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
# Ghostlight Dungeon Session Zero and Bounded Co-op
|
||||
|
||||
## Status
|
||||
|
||||
This document is the authority map for campaign creation and the first bounded
|
||||
co-op runtime. Direct browser-owned compilation is not a production authority.
|
||||
Generated openings and roles are DM suggestions inside Session Zero; the typed
|
||||
draft is the only compiler input.
|
||||
|
||||
## Owners
|
||||
|
||||
### SessionZeroKernel
|
||||
|
||||
`SessionZeroKernel` owns one persistent draft mailbox and its revisions. Its
|
||||
MessagePack CultCache store contains the roster, single-use invitations,
|
||||
shared/private channels, messages, contract, private character drafts,
|
||||
boundaries, decisions, approvals, DM Persona, evidence coverage, compilation
|
||||
preview, and publication receipt.
|
||||
|
||||
Player messages are durable conversation, not campaign facts. Projector, DM
|
||||
Persona, Interpreter, retrieval, and compilation stages return proposals. Only
|
||||
the kernel may change the draft.
|
||||
|
||||
Private DM channels use character-component and channel epochs. Independent
|
||||
private turns can finish in parallel even if an unrelated private component
|
||||
commits first. Shared changes serialize through the shared epoch. No output is
|
||||
rebased.
|
||||
|
||||
### WorldKernel
|
||||
|
||||
`WorldKernel` receives nothing while Session Zero is drafting. Publication
|
||||
builds a new campaign store in a private staging directory. Campaign seed,
|
||||
membership, contract, governance, DM Persona, approved brief, approval digests,
|
||||
Vault evidence, and model receipts enter one empty CultCache batch. The
|
||||
directory becomes discoverable only after the batch succeeds.
|
||||
|
||||
Publication is idempotent by the approved seed digest. Repeating the same
|
||||
publication recovers the campaign. Reusing the campaign ID for a different
|
||||
digest is rejected.
|
||||
|
||||
## Privacy membrane
|
||||
|
||||
Shared DM inference receives the shared contract, aggregate boundary policy,
|
||||
public party cards, shared decisions, evidence coverage, and recent shared
|
||||
messages. It cannot receive raw boundaries, another player's private draft, or
|
||||
private messages.
|
||||
|
||||
Private DM inference receives the shared contract, aggregate policy, public
|
||||
party cards, that player's character draft, that player's attributed
|
||||
boundaries, visible decisions, and recent messages from that private channel.
|
||||
It cannot receive another player's private state.
|
||||
|
||||
Account hashes and invite-token hashes remain private persistence fields. They
|
||||
are absent from JSON Schemas, browser projections, CultMesh surfaces, and model
|
||||
contexts. Actor-specific campaign surfaces use random campaign member IDs and
|
||||
the exact assigned actor.
|
||||
|
||||
## Approval and publication
|
||||
|
||||
The host locks the roster before compilation. Material unresolved decisions
|
||||
block compilation. The compiler receives an `approved_campaign_brief.v1`, not
|
||||
the transcript. Private character history and secrets are withheld from world
|
||||
generation; after the grounded seed validates, Ghostlight locally replaces the
|
||||
provisional compiler player with the exact approved actors at one shared start.
|
||||
|
||||
Evidence gaps return the draft to conversation with explicit questions. A
|
||||
review preview records shared and per-character digests. Every active player
|
||||
must approve the current shared digest and their current private character
|
||||
digest. Relevant edits retire the preview and invalidate the affected
|
||||
approvals. The host has no override.
|
||||
|
||||
Accepted extraordinary bargains become typed permissions. Later assessment
|
||||
receives their exact scope, prerequisites, costs, limits, exposure, evidence,
|
||||
and effect ceiling.
|
||||
|
||||
## Bounded co-op
|
||||
|
||||
`campaign_membership.v1` binds authenticated account hashes to random member
|
||||
IDs and exact actor IDs. HTTP admission derives the acting actor from this
|
||||
record. Assessment confirmation includes that actor ID and cannot consume
|
||||
another actor's assessment.
|
||||
|
||||
The first co-op mode deliberately permits one shared scene and sequential
|
||||
public actions. It rejects player-versus-player state mutation, movement that
|
||||
would split the party, raw unilateral waits, and unilateral resolution-budget
|
||||
changes. Time, group travel, and pooled Persona-cell budget changes use
|
||||
revision-bound proposals; the final approval and campaign transition commit
|
||||
atomically. Group travel revalidates the shared origin and exact route, moves
|
||||
every assigned actor, and advances time in one world commit.
|
||||
|
||||
Every human-controlled actor has a non-simulatable agency profile. Live NPC
|
||||
appraisal, multiresolution cells, strategic outcomes, migration, scheduler
|
||||
ticks, and away-time work all exclude those actors from Persona control and
|
||||
direct mutation. Disconnection grants no proxy authority.
|
||||
|
||||
Each active member contributes their entitlement-provided cell allowance. Test
|
||||
accounts currently contribute eight. The campaign starts at the pooled total,
|
||||
capped at 128; physical provider concurrency remains independent.
|
||||
|
||||
## Realtime and interface
|
||||
|
||||
Ghostlight publishes an actor-filtered Eve surface for each Session Zero member
|
||||
and campaign member. Server-sent events contain revision notifications only.
|
||||
The browser refetches the authoritative Eve document after a notice; the
|
||||
transport owns no messages, drafts, ledgers, approvals, or world state.
|
||||
|
||||
The browser exposes keyboard-operable shared/private channel tabs, live status,
|
||||
public party cards, private ledgers and boundaries, unresolved decisions,
|
||||
evidence/preview state, roster readiness, and explicit compile/approve/publish
|
||||
actions. Privacy is labeled in text and never conveyed only by color.
|
||||
|
||||
## Inline grounded suggestions
|
||||
|
||||
Opening and role generation is no longer a browser-owned creation flow. On a
|
||||
new draft, the compiler retrieves three distinct Vault-grounded opening
|
||||
suggestions and installs them as shared typed decisions. Accepting one amends
|
||||
the draft for further discussion; it does not publish a world. Ghostlight then
|
||||
retrieves three grounded role suggestions and installs separate typed decisions
|
||||
in each player's private channel. A custom premise uses the same conversation,
|
||||
draft, approval, and compiler path.
|
||||
|
||||
## Contract Review
|
||||
|
||||
A launched campaign can enter a focused Contract Review backed by the same
|
||||
Session Zero kernel and privacy projections. The review is bound to the exact
|
||||
world revision at which it began. Any intervening world commit makes it stale.
|
||||
Every active member approves the revised shared digest and their own character
|
||||
digest before the host can publish.
|
||||
|
||||
Publication updates the existing campaign, contract, membership permissions,
|
||||
DM Persona, approved brief, governance epoch, actors' approved forward-looking
|
||||
ledger fields, event, and receipt in one CultCache batch. It cannot change
|
||||
membership custody, locations, topology, knowledge, memories, historical
|
||||
events, Vault, canon horizon, or established starting geometry. Tightened
|
||||
private boundaries publish immediately as an anonymous strictest campaign
|
||||
policy; relaxation waits for unanimous review publication. Narration, action
|
||||
assessment, resolution demand, cell Projectors, Interpreters, and semantic
|
||||
verification receive the approved contract and aggregate policy. Actor Personas
|
||||
still receive only lived narrative, not policy schemas or attributed safety
|
||||
records.
|
||||
|
||||
## Deferred governance
|
||||
|
||||
Split parties, private in-play actions, simultaneous declarations, PvP,
|
||||
delegation, late joining, permanent post-publication departure, group
|
||||
fork/reset/export, and voice remain unsupported.
|
||||
Loading…
Reference in a new issue