Expand description
Shared “who’s calling, and what’s their project context?” helper consumed by both the cross-project and the in-project facades.
Before this helper the two facades each carried their own walk over
list_projects() and disagreed: one required the caller to be the
project’s lead session, the other walked both live_workers and
the catalog. The stricter walk was the buggy one (#298 Cause 1) -
a worker could not resolve its own identity. This helper
consolidates the lookup so both facades see the same answer.
Re-exports§
use std::path::PathBuf;🔒use crate::SessionSlot;🔒use crate::target::ProjectKey;🔒use crate::views::ProjectView;🔒use crate::workspace::Workspace;🔒
Structs§
- Caller
Context 🔒 - Resolved context for an incoming MCP caller.
Functions§
- caller_
context 🔒 - Resolve a caller’s project context: the project the caller’s slot
names, when
list_projectsstill declares it. A caller whose slot names no declared project resolves to nothing (a project dropped fromforge.tomlsince the session spawned). - caller_
context_ 🔒in_ view - Per-view resolution. File-private so the test mod can exercise it
against hand-constructed
ProjectViews without going through the catalog-drivenWorkspace::list_projectspath.