Expand description
The Slack seam on Workspace: one client per configured workspace,
the subscription records sessions create, and the boot verification
that proves each token.
Everything here stays on Workspace as a second impl block, the
way crate::gotify does, so the boot path and the mcp::slack
facade keep their paths. The client itself lives in
forge_connectors::slack; this module holds the workspace state.
Re-exportsΒ§
use std::collections::BTreeMap;πuse std::sync::Arc;πuse std::time::Duration;πuse forge_connectors::slack::AuthTest;πuse forge_connectors::slack::MENTION_CURSOR;πuse forge_connectors::slack::SlackApi;πuse forge_connectors::slack::SlackClient;πuse forge_connectors::slack::SlackHost;πuse forge_primitives::slack::DEFAULT_DM_POLL_SECONDS;πuse forge_primitives::slack::DEFAULT_POLL_SECONDS;πuse forge_primitives::slack::DEFAULT_STALE_AFTER_HOURS;πuse forge_primitives::slack::DEFAULT_THREAD_IDLE_DAYS;πuse forge_primitives::slack::MIN_DM_POLL_SECONDS;πuse forge_primitives::slack::SlackConfig;πuse forge_primitives::slack::SlackDraft;πuse forge_primitives::slack::SlackDraftAnswer;πuse forge_primitives::slack::SlackDraftEnding;πuse forge_primitives::slack::SlackFollowedThread;πuse forge_primitives::slack::SlackMessage;πuse forge_primitives::slack::SlackSubscription;πuse forge_primitives::slack::SlackSubscriptionTarget;πuse forge_primitives::slack::SlackThreadOwner;πuse forge_primitives::slack::SlackThreadRecord;πuse forge_primitives::slack::SlackWatchMode;πuse uuid::Uuid;πuse crate::SessionSlot;πuse crate::workspace::Workspace;π
StructsΒ§
- Slack
Post πInFlight - Clears one callβs in-flight stamp however it ends, a failed call or a panic included. It removes only its own stamp, never a later callβs.
- Slack
Post πStamp - One live post call in a conversation: its identity, when it started, and whether the stall line has been said for it.
- Slack
Subsystem πHost - The
SlackHostone pump drives: aWeak<Workspace>behind the port, so the workspace can drop while a pump runs and every port call then degrades to a no-op. - Slack
Workspaces - One client per configured workspace, keyed by its label.
EnumsΒ§
- Draft
Resolution π - What ended a held draft, as the registry resolves it: the readerβs answer, or nothing at all when the asking session went away.
ConstantsΒ§
- DELIVERY_
REMEMBER π - How long a delivered message stays remembered. Long enough to cover a sweep that re-runs after a 429 or a restart, short enough that the map stays small.
- SECONDS_
PER_ πDAY
StaticsΒ§
- NEXT_
POST_ πSTAMP - Stamps are identified by a process-wide counter, so a guardβs
Dropremoves its own stamp even after its entry was expired and its key taken again by a later post.
FunctionsΒ§
- projects_
of π - The distinct projects a set of subscriptions belongs to, in the order the subscriptions carry them: one announcement per project a write moved.
- thread_
idle_ πdays - The age of a Slack
tsin whole days, read from its seconds prefix. The fraction is cursor precision, not calendar precision; the coarse prefix is all the idle check needs. An unparseable cursor reads as ancient and drops the row. - validate_
configs π - The semantic checks a
[[slack]]list must pass. Shared by the bootβs client build and the config loader, so a reload refuses what a restart refuses.