pub enum Command {
Show 56 variants
Initialize {
four_words: String,
display_name: String,
device_name: String,
storage_dir: String,
},
UpdateDisplayName {
display_name: String,
},
StartNetworking {
preferred_port: Option<u16>,
},
StopNetworking,
ConnectToPeer {
peer_four_words: String,
},
RequestExternalAddress,
CreateEntity {
name: String,
entity_type: EntityType,
description: Option<String>,
initial_members: Vec<String>,
},
CreateLocalEntity {
name: String,
entity_type: EntityType,
description: Option<String>,
},
LinkEntityToNetwork {
entity_id: String,
four_words: String,
},
MarkEntitySynced {
entity_id: String,
},
SetParentOrganization {
entity_id: String,
parent_org_id: String,
},
UpdateEntity {
entity_type: EntityType,
entity_id: String,
name: Option<String>,
description: Option<Option<String>>,
},
DeleteEntity {
entity_type: EntityType,
entity_id: String,
},
AddMember {
entity_type: EntityType,
entity_id: String,
member_id: String,
role: String,
},
RemoveMember {
entity_type: EntityType,
entity_id: String,
member_id: String,
},
RemoveOrganizationMember {
org_id: String,
member_id: String,
},
SetMemberRole {
entity_type: EntityType,
entity_id: String,
member_id: String,
new_role: String,
},
SetPermissionOverride {
entity_type: EntityType,
entity_id: String,
member_id: String,
resource_type: String,
access_level: String,
},
RemovePermissionOverride {
entity_type: EntityType,
entity_id: String,
member_id: String,
resource_type: String,
},
SendMessage {
entity_id: String,
entity_type: EntityType,
text: String,
author: String,
reply_to_id: Option<String>,
attachments: Option<Vec<String>>,
},
SendDirectMessage {
recipients: Vec<String>,
text: String,
author: String,
},
DeleteMessage {
entity_id: String,
entity_type: EntityType,
message_id: String,
},
EditMessage {
entity_id: String,
entity_type: EntityType,
message_id: String,
new_text: String,
},
AddReaction {
entity_id: String,
entity_type: EntityType,
message_id: String,
emoji: String,
},
RemoveReaction {
entity_id: String,
entity_type: EntityType,
message_id: String,
emoji: String,
},
CreateInvite {
recipient_id: String,
entity_type: EntityType,
entity_id: String,
role: String,
message: Option<String>,
expires_in_hours: Option<u32>,
},
AcceptInvite {
invite_id: String,
},
RejectInvite {
invite_id: String,
},
RevokeInvite {
invite_id: String,
},
WriteFile {
entity_id: String,
disk_type: DiskTypeArg,
path: String,
data: Vec<u8>,
},
DeleteFile {
entity_id: String,
disk_type: DiskTypeArg,
path: String,
},
CreateDirectory {
entity_id: String,
disk_type: DiskTypeArg,
path: String,
},
CreateKanbanBoard {
entity_id: String,
board_name: String,
description: Option<String>,
},
CreateKanbanColumn {
board_id: String,
column_name: String,
position: Option<u32>,
},
CreateKanbanCard {
board_id: String,
column_id: String,
title: String,
description: Option<String>,
assignee: Option<String>,
},
MoveKanbanCard {
board_id: String,
card_id: String,
target_column_id: String,
position: Option<u32>,
},
UpdateKanbanCard {
board_id: String,
card_id: String,
title: Option<String>,
description: Option<String>,
assignee: Option<String>,
},
DeleteKanbanCard {
board_id: String,
card_id: String,
},
UpdateKanbanBoard {
board_id: String,
name: Option<String>,
description: Option<Option<String>>,
},
DeleteKanbanBoard {
board_id: String,
},
StartCall {
entity_id: String,
video_enabled: bool,
},
JoinCall {
call_id: String,
},
LeaveCall {
call_id: String,
},
ToggleVideo {
call_id: String,
enabled: bool,
},
ToggleAudio {
call_id: String,
enabled: bool,
},
StartScreenShare {
call_id: String,
},
StopScreenShare {
call_id: String,
},
CreateContact {
display_name: String,
four_words: Option<String>,
is_favourite: bool,
},
UpdateContact {
contact_id: String,
display_name: Option<String>,
is_favourite: Option<bool>,
},
DeleteContact {
contact_id: String,
},
LinkContact {
contact_id: String,
four_words: String,
},
SetFavouriteContact {
four_words: String,
},
RemoveFavouriteContact {
four_words: String,
},
CreateWebsite {
entity_id: String,
html: String,
css: Option<String>,
js: Option<String>,
metadata: Option<String>,
},
UpdateWebsite {
entity_id: String,
html: Option<String>,
css: Option<String>,
js: Option<String>,
metadata: Option<String>,
},
DeleteWebsite {
entity_id: String,
},
}Expand description
Commands represent all possible mutations to the application state.
Every action that modifies state MUST go through a command. This ensures:
- Consistent validation across all adapters
- Event sourcing capability (commands produce events)
- MCP server can expose all application functionality
- Test harnesses can verify behavior
Variants§
Initialize
Initialize the application with a new or existing identity
UpdateDisplayName
Update the user’s display name
StartNetworking
Start P2P networking with gossip overlay
StopNetworking
Stop P2P networking gracefully
ConnectToPeer
Connect to a peer by their four-word identity
RequestExternalAddress
Request external address discovery via NAT reflection
CreateEntity
Create a new entity (organization, group, channel, project)
Fields
entity_type: EntityTypeCreateLocalEntity
Create a local-only entity (not yet linked to network)
LinkEntityToNetwork
Link a local entity to a network identity
MarkEntitySynced
Mark an entity as synced with network
SetParentOrganization
Set parent organization for a child entity
UpdateEntity
Fields
entity_type: EntityTypeDeleteEntity
AddMember
Add a member to an entity
RemoveMember
Remove a member from an entity
RemoveOrganizationMember
Remove a member from organization and all child entities (cascade)
SetMemberRole
Set a member’s role
SetPermissionOverride
Set a permission override for a member
Fields
entity_type: EntityTypeRemovePermissionOverride
Remove a permission override for a member
SendMessage
Send a message to an entity
SendDirectMessage
Send a direct message to one or more recipients
DeleteMessage
EditMessage
Edit a message’s text content
AddReaction
Add a reaction to a message
RemoveReaction
Remove a reaction from a message
CreateInvite
Create an invite for someone to join an entity
Fields
entity_type: EntityTypeAcceptInvite
Accept an invite
RejectInvite
Reject an invite
RevokeInvite
Revoke an invite
WriteFile
Write a file to an entity’s virtual disk
DeleteFile
Delete a file from an entity’s virtual disk
CreateDirectory
Create a directory in an entity’s virtual disk
CreateKanbanBoard
Create a new Kanban board
CreateKanbanColumn
Create a column in a Kanban board
CreateKanbanCard
Create a card in a Kanban column
Fields
MoveKanbanCard
Move a Kanban card to a different column
UpdateKanbanCard
Update a Kanban card
Fields
DeleteKanbanCard
Delete a Kanban card
UpdateKanbanBoard
Update a Kanban board’s name or description
DeleteKanbanBoard
Delete a Kanban board and all its columns and cards
StartCall
Start a voice/video call
JoinCall
Join an existing call
LeaveCall
Leave a call
ToggleVideo
Toggle video in a call
ToggleAudio
Toggle audio in a call
Start screen sharing
Stop screen sharing
CreateContact
Create a new contact (local-only or network-linked)
UpdateContact
Update a contact’s display name
DeleteContact
Delete a contact
LinkContact
Link a local-only contact to a network identity
SetFavouriteContact
Set a contact as favourite
RemoveFavouriteContact
Remove a contact from favourites
CreateWebsite
Create/publish a website for an entity
Fields
UpdateWebsite
Update an existing website
Fields
DeleteWebsite
Delete a website