Skip to main content

Command

Enum Command 

Source
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

Fields

§four_words: String
§display_name: String
§device_name: String
§storage_dir: String
§

UpdateDisplayName

Update the user’s display name

Fields

§display_name: String
§

StartNetworking

Start P2P networking with gossip overlay

Fields

§preferred_port: Option<u16>
§

StopNetworking

Stop P2P networking gracefully

§

ConnectToPeer

Connect to a peer by their four-word identity

Fields

§peer_four_words: String
§

RequestExternalAddress

Request external address discovery via NAT reflection

§

CreateEntity

Create a new entity (organization, group, channel, project)

Fields

§name: String
§entity_type: EntityType
§description: Option<String>
§initial_members: Vec<String>
§

CreateLocalEntity

Create a local-only entity (not yet linked to network)

Fields

§name: String
§entity_type: EntityType
§description: Option<String>
§

LinkEntityToNetwork

Link a local entity to a network identity

Fields

§entity_id: String
§four_words: String
§

MarkEntitySynced

Mark an entity as synced with network

Fields

§entity_id: String
§

SetParentOrganization

Set parent organization for a child entity

Fields

§entity_id: String
§parent_org_id: String
§

UpdateEntity

Fields

§entity_type: EntityType
§entity_id: String
§description: Option<Option<String>>
§

DeleteEntity

Fields

§entity_type: EntityType
§entity_id: String
§

AddMember

Add a member to an entity

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§role: String
§

RemoveMember

Remove a member from an entity

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§

RemoveOrganizationMember

Remove a member from organization and all child entities (cascade)

Fields

§org_id: String
§member_id: String
§

SetMemberRole

Set a member’s role

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§new_role: String
§

SetPermissionOverride

Set a permission override for a member

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§resource_type: String
§access_level: String
§

RemovePermissionOverride

Remove a permission override for a member

Fields

§entity_type: EntityType
§entity_id: String
§member_id: String
§resource_type: String
§

SendMessage

Send a message to an entity

Fields

§entity_id: String
§entity_type: EntityType
§text: String
§author: String
§reply_to_id: Option<String>
§attachments: Option<Vec<String>>
§

SendDirectMessage

Send a direct message to one or more recipients

Fields

§recipients: Vec<String>
§text: String
§author: String
§

DeleteMessage

Fields

§entity_id: String
§entity_type: EntityType
§message_id: String
§

EditMessage

Edit a message’s text content

Fields

§entity_id: String
§entity_type: EntityType
§message_id: String
§new_text: String
§

AddReaction

Add a reaction to a message

Fields

§entity_id: String
§entity_type: EntityType
§message_id: String
§emoji: String
§

RemoveReaction

Remove a reaction from a message

Fields

§entity_id: String
§entity_type: EntityType
§message_id: String
§emoji: String
§

CreateInvite

Create an invite for someone to join an entity

Fields

§recipient_id: String
§entity_type: EntityType
§entity_id: String
§role: String
§message: Option<String>
§expires_in_hours: Option<u32>
§

AcceptInvite

Accept an invite

Fields

§invite_id: String
§

RejectInvite

Reject an invite

Fields

§invite_id: String
§

RevokeInvite

Revoke an invite

Fields

§invite_id: String
§

WriteFile

Write a file to an entity’s virtual disk

Fields

§entity_id: String
§disk_type: DiskTypeArg
§path: String
§data: Vec<u8>
§

DeleteFile

Delete a file from an entity’s virtual disk

Fields

§entity_id: String
§disk_type: DiskTypeArg
§path: String
§

CreateDirectory

Create a directory in an entity’s virtual disk

Fields

§entity_id: String
§disk_type: DiskTypeArg
§path: String
§

CreateKanbanBoard

Create a new Kanban board

Fields

§entity_id: String
§board_name: String
§description: Option<String>
§

CreateKanbanColumn

Create a column in a Kanban board

Fields

§board_id: String
§column_name: String
§position: Option<u32>
§

CreateKanbanCard

Create a card in a Kanban column

Fields

§board_id: String
§column_id: String
§title: String
§description: Option<String>
§assignee: Option<String>
§

MoveKanbanCard

Move a Kanban card to a different column

Fields

§board_id: String
§card_id: String
§target_column_id: String
§position: Option<u32>
§

UpdateKanbanCard

Update a Kanban card

Fields

§board_id: String
§card_id: String
§description: Option<String>
§assignee: Option<String>
§

DeleteKanbanCard

Delete a Kanban card

Fields

§board_id: String
§card_id: String
§

UpdateKanbanBoard

Update a Kanban board’s name or description

Fields

§board_id: String
§description: Option<Option<String>>
§

DeleteKanbanBoard

Delete a Kanban board and all its columns and cards

Fields

§board_id: String
§

StartCall

Start a voice/video call

Fields

§entity_id: String
§video_enabled: bool
§

JoinCall

Join an existing call

Fields

§call_id: String
§

LeaveCall

Leave a call

Fields

§call_id: String
§

ToggleVideo

Toggle video in a call

Fields

§call_id: String
§enabled: bool
§

ToggleAudio

Toggle audio in a call

Fields

§call_id: String
§enabled: bool
§

StartScreenShare

Start screen sharing

Fields

§call_id: String
§

StopScreenShare

Stop screen sharing

Fields

§call_id: String
§

CreateContact

Create a new contact (local-only or network-linked)

Fields

§display_name: String
§four_words: Option<String>
§is_favourite: bool
§

UpdateContact

Update a contact’s display name

Fields

§contact_id: String
§display_name: Option<String>
§is_favourite: Option<bool>
§

DeleteContact

Delete a contact

Fields

§contact_id: String
§

LinkContact

Link a local-only contact to a network identity

Fields

§contact_id: String
§four_words: String
§

SetFavouriteContact

Set a contact as favourite

Fields

§four_words: String
§

RemoveFavouriteContact

Remove a contact from favourites

Fields

§four_words: String
§

CreateWebsite

Create/publish a website for an entity

Fields

§entity_id: String
§html: String
§metadata: Option<String>
§

UpdateWebsite

Update an existing website

Fields

§entity_id: String
§metadata: Option<String>
§

DeleteWebsite

Delete a website

Fields

§entity_id: String

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Command

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Command

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Command

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,