Skip to main content

Module facade

Module facade 

Source
Expand description

CronFacade - the seam between the cron MCP tools and workspace state. The production impl (ProdCronFacade) resolves the caller’s project and drives the direct Workspace cron methods; the mock records calls for tool tests.

Cron-list mutations are direct Workspace methods (lock the crons mutex + persist), NOT Command-bus dispatches - a cron entry is workspace state, like the account-usage cache, not a session action.

Re-exportsΒ§

use std::sync::Arc; πŸ”’
use std::sync::Weak; πŸ”’
use std::time::SystemTime; πŸ”’
use forge_primitives::cron::CronEntry; πŸ”’
use forge_primitives::cron::CronId; πŸ”’
use forge_primitives::cron::CronKind; πŸ”’
use crate::SessionSlot; πŸ”’
use crate::mcp::caller_context::caller_context; πŸ”’
use crate::mcp::cron::schedule; πŸ”’
use crate::workspace::Workspace; πŸ”’

StructsΒ§

ProdCronFacade πŸ”’
Production facade over Weak<Workspace> (weak to avoid a cycle with the MCP server the workspace owns).

EnumsΒ§

CronCreateError πŸ”’
Why cron__create failed.
CronDeleteError πŸ”’
Why cron__delete failed. 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.
CronListError πŸ”’
Why cron__list failed.

TraitsΒ§

CronFacade πŸ”’
The cron tools’ view of the workspace. Sync - cron-list mutations are direct state writes with no async handler to await.