[GH-ISSUE #80] [Feature]: Add authoritative Hierarchical Maps context to connected Conversations #42

Closed
opened 2026-10-20 17:23:46 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @thetopham on GitHub (Jul 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/80

Originally assigned to: @thetopham on GitHub.

What problem does this solve?

Marinara already lets a Conversation link bidirectionally to a Roleplay or Game chat, so users reasonably expect the Conversation to know the linked story's current Hierarchical Maps location. The current connection path does not provide that guarantee:

  • a connected Roleplay contributes recent messages but no authoritative spatial breadcrumb; and
  • a connected Game may contribute its ordinary Game-state location, but it does not resolve the current Hierarchical Maps snapshot or reduced Maps projection.

As a result, a Conversation may infer location from recent prose or legacy Game state even when Hierarchical Maps owns the authoritative story location.

Proposed package or change

Add a package-owned, read-only Hierarchical Maps projection to existing connected Conversations:

  • reuse the current Conversation to Roleplay/Game link rather than creating another relationship model;
  • resolve the linked owner chat at Conversation generation time and read its authoritative current spatial state through the Maps capability contract;
  • include only the linked story name, owner mode, public breadcrumb, and bounded awarenessSummary or public-description excerpt;
  • use conservative Roleplay wording such as The linked story's current scene is... unless authoritative state proves a character is present;
  • permit Game presence wording only from committed presentCharacters or an equivalent authoritative source;
  • expose a small read-only Linked story location disclosure in Conversation so users can inspect the source and understand that it cannot move or edit the map;
  • preserve the existing recent-message, session-state, influence, note, OOC, and DM connection behavior;
  • fail safely for unlink, relink, deleted owner, malformed reciprocal links, cycles, disabled or missing Maps, stale state, and concluded stories; and
  • keep the projection bounded and generated from an explicit allowlist so future Maps fields remain excluded by default.

The Conversation must never receive private model memory, internal location IDs, hidden destinations, the complete hierarchy, location-attached lore IDs or content, location visual-identity notes, gallery IDs, image paths or bytes, usage notes, or any map mutation capability.

Maps owns the reduced spatial projection and privacy allowlist. Engine currently owns connected-Conversation prompt assembly, so implementation may require a paired generic host integration that requests the projection without importing Maps internals or duplicating Maps formatting rules.

Why should this be optional?

Authoritative spatial context is supplied by the downloadable Hierarchical Maps package. Connected Conversations should continue using their existing non-spatial context behavior when Maps is absent or disabled.

Alternatives considered

  • Inferring location from recent Roleplay messages can be stale, ambiguous, or contradicted by the accepted spatial snapshot.
  • Treating ordinary Game-state location as equivalent to the Hierarchical Maps world location can reintroduce two competing spatial authorities.
  • Copying the full map into Conversation would waste context and expose private creator data.
  • Reimplementing Conversation linking inside Maps would duplicate an existing Engine relationship and command system.
  • Waiting for every future visual-reference field before designing the projection is unnecessary if the projection uses a strict public allowlist and negative tests.

Additional context

This is the remaining Package G spatial slice from the Hierarchical Maps V3 planning documents. The underlying Conversation link, recent Roleplay/Game context, influences, durable notes, OOC messages, and DM behavior already exist. This request does not rebuild those systems.

Current source behavior is implemented in packages/server/src/routes/generate/conversation-connected-context.ts: connected Roleplay reads recent messages, while connected Game reads ordinary committed Game state including its location field. Neither branch invokes the Hierarchical Maps spatial resolver.

Acceptance gate:

  • a connected Conversation can inspect the linked story's authoritative public location context;
  • Roleplay and Game wording does not invent character presence;
  • unlink, relink, deletion, cycles, and concluded-story cases fail safely; and
  • private, visual, lore, hidden, and mutation-capable Maps data never enters the Conversation prompt.

Planning status: future feature. Filing this request does not schedule it ahead of the current Maps backlog.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @thetopham on GitHub (Jul 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/80 Originally assigned to: @thetopham on GitHub. ## What problem does this solve? Marinara already lets a Conversation link bidirectionally to a Roleplay or Game chat, so users reasonably expect the Conversation to know the linked story's current Hierarchical Maps location. The current connection path does not provide that guarantee: - a connected Roleplay contributes recent messages but no authoritative spatial breadcrumb; and - a connected Game may contribute its ordinary Game-state location, but it does not resolve the current Hierarchical Maps snapshot or reduced Maps projection. As a result, a Conversation may infer location from recent prose or legacy Game state even when Hierarchical Maps owns the authoritative story location. ## Proposed package or change Add a package-owned, read-only Hierarchical Maps projection to existing connected Conversations: - reuse the current Conversation to Roleplay/Game link rather than creating another relationship model; - resolve the linked owner chat at Conversation generation time and read its authoritative current spatial state through the Maps capability contract; - include only the linked story name, owner mode, public breadcrumb, and bounded `awarenessSummary` or public-description excerpt; - use conservative Roleplay wording such as `The linked story's current scene is...` unless authoritative state proves a character is present; - permit Game presence wording only from committed `presentCharacters` or an equivalent authoritative source; - expose a small read-only **Linked story location** disclosure in Conversation so users can inspect the source and understand that it cannot move or edit the map; - preserve the existing recent-message, session-state, influence, note, OOC, and DM connection behavior; - fail safely for unlink, relink, deleted owner, malformed reciprocal links, cycles, disabled or missing Maps, stale state, and concluded stories; and - keep the projection bounded and generated from an explicit allowlist so future Maps fields remain excluded by default. The Conversation must never receive private model memory, internal location IDs, hidden destinations, the complete hierarchy, location-attached lore IDs or content, location visual-identity notes, gallery IDs, image paths or bytes, usage notes, or any map mutation capability. Maps owns the reduced spatial projection and privacy allowlist. Engine currently owns connected-Conversation prompt assembly, so implementation may require a paired generic host integration that requests the projection without importing Maps internals or duplicating Maps formatting rules. ## Why should this be optional? Authoritative spatial context is supplied by the downloadable Hierarchical Maps package. Connected Conversations should continue using their existing non-spatial context behavior when Maps is absent or disabled. ## Alternatives considered - Inferring location from recent Roleplay messages can be stale, ambiguous, or contradicted by the accepted spatial snapshot. - Treating ordinary Game-state location as equivalent to the Hierarchical Maps world location can reintroduce two competing spatial authorities. - Copying the full map into Conversation would waste context and expose private creator data. - Reimplementing Conversation linking inside Maps would duplicate an existing Engine relationship and command system. - Waiting for every future visual-reference field before designing the projection is unnecessary if the projection uses a strict public allowlist and negative tests. ## Additional context This is the remaining Package G spatial slice from the Hierarchical Maps V3 planning documents. The underlying Conversation link, recent Roleplay/Game context, influences, durable notes, OOC messages, and DM behavior already exist. This request does not rebuild those systems. Current source behavior is implemented in `packages/server/src/routes/generate/conversation-connected-context.ts`: connected Roleplay reads recent messages, while connected Game reads ordinary committed Game state including its `location` field. Neither branch invokes the Hierarchical Maps spatial resolver. Acceptance gate: - a connected Conversation can inspect the linked story's authoritative public location context; - Roleplay and Game wording does not invent character presence; - unlink, relink, deletion, cycles, and concluded-story cases fail safely; and - private, visual, lore, hidden, and mutation-capable Maps data never enters the Conversation prompt. Planning status: future feature. Filing this request does not schedule it ahead of the current Maps backlog. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@thetopham commented on GitHub (Jul 28, 2026):

conversations is already aware previous message context so doesnt need this also

<!-- gh-comment-id:5109397429 --> @thetopham commented on GitHub (Jul 28, 2026): conversations is already aware previous message context so doesnt need this also
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#42
No description provided.