Expand description
TasksFacade - the seam between the task MCP tools and workspace
state. The production impl (ProdTasksFacade) resolves the callerβs
project and drives the direct Workspace task methods; the mock
records calls for tool tests.
Task-list mutations are direct Workspace methods (lock the tasks
mutex + persist), NOT Command-bus dispatches - a task is workspace
state, like the cron list beside it, not a session action.
Re-exportsΒ§
use std::sync::Arc;πuse std::sync::Weak;πuse std::time::SystemTime;πuse forge_primitives::tasks::By;πuse forge_primitives::tasks::Estimate;πuse forge_primitives::tasks::LinkKind;πuse forge_primitives::tasks::Task;πuse forge_primitives::tasks::TaskId;πuse forge_primitives::tasks::TaskLink;πuse forge_primitives::tasks::TaskStatus;πuse forge_primitives::tasks::WaitingKind;πuse crate::SessionSlot;πuse crate::mcp::caller_context::caller_context;πuse crate::tasks::ClaimError;πuse crate::tasks::IdError;πuse crate::tasks::MoveError;πuse crate::workspace::Workspace;π
StructsΒ§
- Prod
Tasks πFacade - Production facade over
Weak<Workspace>(weak to avoid a cycle with the MCP server the workspace owns). - Removed
Task πTree - The tree a
tasks__deleteremoved: the named task as it stood, and how many descendants went with it. - Task
Draft π - A task as
tasks__createstates it: the fields the caller supplies, before the project, the id and the timestamps are stamped on. - Task
Link πDraft - One link as a caller states it: the kind is derived from the targetβs shape when it is not given.
- Task
Patch π - The fields
tasks__updatemay change. An absent field is left alone.
EnumsΒ§
- Tasks
Error π - Why a
tasks__*call failed.
TraitsΒ§
- Tasks
Facade π - The task toolsβ view of the workspace. Sync - task-list mutations are direct state writes with no async handler to await.
FunctionsΒ§
- missing_
task_ πerror - The refusal for a stated id that names nothing in the callerβs project: an id another project owns is named as such, so a caller cannot read βno such taskβ as proof the row was never there.
- narrow_
rows π - The listβs narrowing, one definition for the real path and the mock:
ownerby label,parentby id,statusby state,readyby the boardβs own mark. - resolve_
parent π - The parent a write stores: the row a stated id names when it lands on one, the words as stated when it names nothing (a child may point at a row that is gone), and a refusal naming the rows when it names several.