feat: Implement Spatial Graphs as Signal Processing Layer

This commit is contained in:
2026-04-12 11:55:25 +05:30
parent 079fe3ff22
commit 3902999f60
6 changed files with 814 additions and 7 deletions

223
demo.json
View File

@@ -57,7 +57,11 @@
"player"
]
}
]
],
"metadata": {
"location": "gate_post",
"spatial_descriptor": "Standing at the gate post, watching the village entrance"
}
},
{
"id": "player",
@@ -68,7 +72,11 @@
"stats": {},
"voice_sample": "Voice: 'Direct and concise.'",
"current_mood": "Neutral",
"memories": []
"memories": [],
"metadata": {
"location": "gate_post",
"spatial_descriptor": "Approaching the gate"
}
},
{
"id": "sybil",
@@ -146,7 +154,216 @@
"player"
]
}
],
"metadata": {
"location": "alley_depths",
"spatial_descriptor": "Sitting in the deep shadows"
}
}
],
"spatial_graph": {
"world": {
"id": "kingdom",
"name": "The Kingdom",
"description": "A vast realm with villages and trade routes.",
"regions": [
{
"id": "village_region",
"name": "The Village",
"description": "A small trading settlement.",
"locations": [
{
"id": "village_gate",
"name": "Village Gate",
"description": "The main entrance to the village, well-lit and guarded.",
"pois": [
{
"id": "gate_post",
"name": "Gate Post",
"description": "Where the guard watches.",
"connections": [
{
"target": "square_center",
"portal": "open_path",
"portal_state_descriptor": "open",
"vision_prop": 8,
"sound_prop": 8,
"bidirectional": true
},
{
"target": "alley_entrance",
"portal": "narrow_street",
"portal_state_descriptor": "open",
"vision_prop": 4,
"sound_prop": 5,
"bidirectional": true
}
]
}
]
},
{
"id": "village_square",
"name": "Village Square",
"description": "The bustling center of the village.",
"pois": [
{
"id": "square_center",
"name": "Square Center",
"description": "Central plaza.",
"connections": [
{
"target": "gate_post",
"portal": "open_path",
"portal_state_descriptor": "open",
"vision_prop": 8,
"sound_prop": 8,
"bidirectional": true
},
{
"target": "blue_tavern_entrance",
"portal": "tavern_door",
"portal_state_descriptor": "closed",
"vision_prop": 1,
"sound_prop": 3,
"bidirectional": true
},
{
"target": "alley_entrance",
"portal": "narrow_street",
"portal_state_descriptor": "open",
"vision_prop": 5,
"sound_prop": 6,
"bidirectional": true
}
]
}
]
},
{
"id": "shadowed_alley",
"name": "Shadowed Alley",
"description": "A quiet, dimly lit passage between buildings.",
"pois": [
{
"id": "alley_entrance",
"name": "Alley Entrance",
"description": "Where the alley opens to the village.",
"connections": [
{
"target": "gate_post",
"portal": "narrow_street",
"portal_state_descriptor": "open",
"vision_prop": 4,
"sound_prop": 5,
"bidirectional": true
},
{
"target": "square_center",
"portal": "narrow_street",
"portal_state_descriptor": "open",
"vision_prop": 5,
"sound_prop": 6,
"bidirectional": true
},
{
"target": "alley_depths",
"portal": "deeper_alley",
"portal_state_descriptor": "open",
"vision_prop": 3,
"sound_prop": 7,
"bidirectional": true
}
]
},
{
"id": "alley_depths",
"name": "Alley Depths",
"description": "Deep in the shadows, very private.",
"connections": [
{
"target": "alley_entrance",
"portal": "deeper_alley",
"portal_state_descriptor": "open",
"vision_prop": 3,
"sound_prop": 7,
"bidirectional": true
}
]
}
]
},
{
"id": "blue_tavern",
"name": "The Blue Tavern",
"description": "A welcoming establishment with warm lighting and the smell of ale.",
"pois": [
{
"id": "blue_tavern_entrance",
"name": "Tavern Entrance",
"description": "The front door of the tavern.",
"connections": [
{
"target": "square_center",
"portal": "tavern_door",
"portal_state_descriptor": "closed",
"vision_prop": 1,
"sound_prop": 3,
"bidirectional": true
},
{
"target": "tavern_bar",
"portal": "interior_arch",
"portal_state_descriptor": "open",
"vision_prop": 7,
"sound_prop": 8,
"bidirectional": true
}
]
},
{
"id": "tavern_bar",
"name": "Tavern Bar",
"description": "The main bar area, crowded and lively.",
"connections": [
{
"target": "blue_tavern_entrance",
"portal": "interior_arch",
"portal_state_descriptor": "open",
"vision_prop": 7,
"sound_prop": 8,
"bidirectional": true
},
{
"target": "tavern_corner",
"portal": "archway",
"portal_state_descriptor": "open",
"vision_prop": 6,
"sound_prop": 7,
"bidirectional": true
}
]
},
{
"id": "tavern_corner",
"name": "Tavern Corner",
"description": "A shadowy corner booth, perfect for private conversation.",
"connections": [
{
"target": "tavern_bar",
"portal": "archway",
"portal_state_descriptor": "open",
"vision_prop": 6,
"sound_prop": 7,
"bidirectional": true
}
]
}
]
}
]
}
]
}
]
}
}