Palace¶
The Palace is the agent-accessible metadata layer — a navigational index over the vault.
Structure¶
Wings → high-level domains (projects, people, topics)
Rooms → sub-topics within a wing
Drawers → vault file references
Halls → typed fact stores (facts, events, discoveries, preferences)
Tunnels → cross-wing connections
Import¶
Constructor¶
Wings¶
palace.create_wing("Orion", type="project", keywords=["auth", "api"])
wings: list[dict] = palace.list_wings()
stats: dict = palace.stats()
# {"wing_count": 5, "room_count": 12, "drawer_count": 48, ...}
Rooms and drawers¶
palace.create_room("Orion", "auth-migration")
palace.link_drawer("Orion", "auth-migration", "work/active/auth-plan.md")
rooms: list[str] = palace.list_rooms("Orion")
drawers: list[str] = palace.get_drawers("Orion", "auth-migration")
Tunnels (cross-wing connections)¶
palace.create_tunnel("Kai", "Orion", "auth-migration")
tunnels: list[dict] = palace.find_tunnels("Kai", "Orion")
traversal = palace.traverse("Kai", "auth-migration")
Auto-build from vault¶
count: int = palace.auto_build_from_vault("./workspace")
# Scans vault structure and creates wings/rooms from folder hierarchy
ompa.palace.Palace
¶
Manages the palace metadata layer (wings/rooms/closets/drawers/halls/tunnels).
The palace is a structured overlay on top of the vault. It does NOT store the actual content — that lives in the vault. The palace stores metadata that makes retrieval faster.
Storage: JSON file at .palace/palace.json
Source code in ompa/palace.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
add_hall(wing, room, hall_type, content)
¶
Add content to a hall within a room.
Source code in ompa/palace.py
auto_build_from_vault(vault_path)
¶
Auto-detect wings and rooms from vault folder structure.
Source code in ompa/palace.py
create_room(wing, room_name)
¶
Create a new room in a wing.
Source code in ompa/palace.py
create_tunnel(wing_a, wing_b, room, hall_a='hall_events', hall_b='hall_facts')
¶
Create a tunnel (cross-wing connection) via a shared room.
Source code in ompa/palace.py
create_wing(name, type='project', keywords=None)
¶
Create a new wing.
Source code in ompa/palace.py
find_tunnels(wing_a, wing_b)
¶
Find all tunnels between two wings.
Source code in ompa/palace.py
find_tunnels_by_room(room)
¶
get_drawers(wing, room)
¶
get_hall(wing, room, hall_type)
¶
get_room(wing, room_name)
¶
get_wing(name)
¶
link_drawer(wing, room, file_path)
¶
Link a vault file as a drawer in a room.
Source code in ompa/palace.py
list_rooms(wing)
¶
list_wings()
¶
stats()
¶
Get palace statistics.
Source code in ompa/palace.py
traverse(wing, room)
¶
Walk the palace from a room across all connected wings via tunnels.