Expand description
GotifyFacade - the seam between the Gotify MCP tools and workspace
state. The production impl (ProdGotifyFacade) resolves the
callerโs project + durable identity and drives the direct
Workspace subscription methods; the mock records calls for tool
tests.
Re-exportsยง
use std::sync::Arc;๐use std::sync::Weak;๐use std::time::SystemTime;๐use forge_connectors::gotify::GotifyRecent;๐use forge_connectors::gotify::refresh_app_index;๐use forge_primitives::GotifySubscription;๐use uuid::Uuid;๐use crate::SessionSlot;๐use crate::gotify::SubsystemHost;๐use crate::mcp::caller_context::caller_context;๐use crate::workspace::Workspace;๐
Structsยง
- Prod
Gotify ๐Facade - Production facade over
Weak<Workspace>(weak to avoid a cycle with the MCP server the workspace owns). - Subscribe
Outcome ๐ - A created subscriptionโs effective filter, plus whether that filter can
resolve a message.
names_resolveis false only when the filter names applications and the/applicationlookup behind them failed: the subscription is live, but those names will not match until the next stream reconnect. Always true for a match-any filter, which needs no names.
Enumsยง
- Gotify
Read ๐Error - Why a read-only Gotify tool (
gotify__apps/gotify__recent) failed. - Gotify
Subscribe ๐Error - Why
gotify__subscribefailed. - Gotify
Unsubscribe ๐Error - Why
gotify__unsubscribefailed. The last two are the two cases a refusal keeps apart: an id the project holds under another session reads differently from one the project never had.
Traitsยง
- Gotify
Facade ๐ - The Gotify toolsโ view of the workspace. The subscription mutations
are synchronous state writes; the read-only
apps/recentlookups hit the serverโs REST API and are async.
Functionsยง
- durable_
identity ๐ (team_role, durable)for a callerโs worker label (None= the lead or a plain catalog session). A lead is always durable and targets itself. A worker is durable when its label holds a persisted row in the session store, since that row is what brings it back.- resolve_
identity ๐ - Resolve a caller to
(project_name, team_role, durable).team_roleis the workerโs role label (Nonetargets the lead);durableis true for the lead or a worker with a persisted row in the session store, false for a worker without one.