pub struct ProdWorkspaceFacade(pub Weak<Workspace>);Expand description
Production impl. Holds a Weak<Workspace> rather than
Arc<Workspace> so the construction sites
(Arc::new(weak) as Arc<dyn WorkspaceFacade>) don’t close the
Workspace → pool → AgentHandle → bridge → MCP → Tool → facade
→ Workspace strong cycle. Audit C7.
Every trait method starts with upgrade(). When the workspace
has been dropped (only possible if Workspace::shutdown has run
and tools are firing during teardown), each method short-circuits
to a sensible “workspace gone” fallback - typically returning a
default, an error variant, or a no-op. The recipient session is
dying anyway; the LLM call won’t have anywhere to land.
Tuple Fields§
§0: Weak<Workspace>Implementations§
Trait Implementations§
Source§impl WorkspaceFacade for ProdWorkspaceFacade
impl WorkspaceFacade for ProdWorkspaceFacade
Source§fn list_peers(&self) -> Vec<PeerStatus>
fn list_peers(&self) -> Vec<PeerStatus>
Snapshot of every configured project’s peer status, in
forge.toml declaration order. Computed fresh on each call.
Source§fn whoami(&self, caller: &SessionSlot) -> Option<PeerStatus>
fn whoami(&self, caller: &SessionSlot) -> Option<PeerStatus>
Identity of the calling session. Returns
None when caller
doesn’t resolve to any known project (defensive - the tools
closure-bind a real key at spawn time, so this should be
Some in practice).Source§fn deliver_peer_prompt(
&self,
caller: &SessionSlot,
target_project: &str,
wrapped: WrappedPrompt,
) -> Result<(), DeliverError>
fn deliver_peer_prompt( &self, caller: &SessionSlot, target_project: &str, wrapped: WrappedPrompt, ) -> Result<(), DeliverError>
Deliver a wrapped peer prompt to
target_project. Read moreSource§fn handoff(
&self,
caller: &SessionSlot,
note: String,
) -> Result<(), HandoffError>
fn handoff( &self, caller: &SessionSlot, note: String, ) -> Result<(), HandoffError>
The exit call: the note is accepted only while a handoff is running on
the caller’s own seat. A handoff starts at
/handoff or at the
automatic trigger (fill or compaction), which dispatch the command
directly; no caller starts one through here.Auto Trait Implementations§
impl !RefUnwindSafe for ProdWorkspaceFacade
impl !UnwindSafe for ProdWorkspaceFacade
impl Freeze for ProdWorkspaceFacade
impl Send for ProdWorkspaceFacade
impl Sync for ProdWorkspaceFacade
impl Unpin for ProdWorkspaceFacade
impl UnsafeUnpin for ProdWorkspaceFacade
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more