Skip to main content

RelayCast

Struct RelayCast 

Source
pub struct RelayCast { /* private fields */ }
Expand description

Main client for RelayCast workspace operations.

Implementations§

Source§

impl RelayCast

Source

pub fn new(options: RelayCastOptions) -> Result<Self>

Create a new RelayCast client with the given options.

Source

pub async fn create_workspace( name: &str, base_url: Option<&str>, ) -> Result<CreateWorkspaceResponse>

Create a new workspace.

Source

pub fn as_agent(&self, agent_token: impl Into<String>) -> Result<AgentClient>

Create an agent client for the given agent token.

Source

pub async fn workspace_info(&self) -> Result<Workspace>

Get workspace information.

Source

pub async fn update_workspace( &self, request: UpdateWorkspaceRequest, ) -> Result<Workspace>

Update workspace settings.

Source

pub async fn delete_workspace(&self) -> Result<()>

Delete the workspace.

Source

pub async fn workspace_stream_get(&self) -> Result<WorkspaceStreamConfig>

Get effective workspace stream configuration.

Source

pub async fn workspace_stream_set( &self, enabled: bool, ) -> Result<WorkspaceStreamConfig>

Set workspace stream override.

Source

pub async fn workspace_stream_inherit(&self) -> Result<WorkspaceStreamConfig>

Clear workspace stream override and inherit default behavior.

Source

pub async fn get_system_prompt(&self) -> Result<SystemPrompt>

Get the workspace system prompt.

Source

pub async fn set_system_prompt( &self, request: SetSystemPromptRequest, ) -> Result<SystemPrompt>

Set the workspace system prompt.

Source

pub async fn list_channels( &self, include_archived: bool, ) -> Result<Vec<Channel>>

List channels in the workspace.

Source

pub async fn get_channel(&self, name: &str) -> Result<ChannelWithMembers>

Get a channel and its members by name.

Source

pub async fn list_messages( &self, channel: &str, opts: Option<MessageListQuery>, ) -> Result<Vec<MessageWithMeta>>

List messages in a channel.

Source

pub async fn get_message(&self, id: &str) -> Result<MessageWithMeta>

Get a single message by ID.

Source

pub async fn get_thread( &self, message_id: &str, opts: Option<MessageListQuery>, ) -> Result<ThreadResponse>

Get a message thread (parent and replies).

Source

pub async fn get_message_reactions( &self, id: &str, ) -> Result<Vec<ReactionGroup>>

Get grouped reactions for a message.

Source

pub async fn register_agent( &self, request: CreateAgentRequest, ) -> Result<CreateAgentResponse>

Register a new agent.

Source

pub async fn list_agents( &self, query: Option<AgentListQuery>, ) -> Result<Vec<Agent>>

List agents.

Source

pub async fn get_agent(&self, name: &str) -> Result<Agent>

Get an agent by name.

Source

pub async fn rotate_agent_token( &self, name: &str, ) -> Result<TokenRotateResponse>

Rotate an agent’s token.

Source

pub async fn update_agent( &self, name: &str, request: UpdateAgentRequest, ) -> Result<Agent>

Update an agent.

Source

pub async fn delete_agent(&self, name: &str) -> Result<()>

Delete an agent.

Source

pub async fn agent_presence(&self) -> Result<Vec<AgentPresenceInfo>>

Get agent presence information.

Source

pub async fn register_or_get_agent( &self, request: CreateAgentRequest, ) -> Result<CreateAgentResponse>

Register an agent or get existing one (with token rotation).

Source

pub async fn spawn_agent( &self, request: SpawnAgentRequest, ) -> Result<SpawnAgentResponse>

Spawn an agent process (registering if needed).

Source

pub async fn release_agent( &self, request: ReleaseAgentRequest, ) -> Result<ReleaseAgentResponse>

Release an agent process (optionally deleting the agent).

Source

pub async fn create_webhook( &self, request: CreateWebhookRequest, ) -> Result<CreateWebhookResponse>

Create a webhook.

Source

pub async fn list_webhooks(&self) -> Result<Vec<Webhook>>

List webhooks.

Source

pub async fn delete_webhook(&self, id: &str) -> Result<()>

Delete a webhook.

Source

pub async fn trigger_webhook( &self, webhook_id: &str, request: WebhookTriggerRequest, ) -> Result<WebhookTriggerResponse>

Trigger a webhook.

Source

pub async fn create_subscription( &self, request: CreateSubscriptionRequest, ) -> Result<CreateSubscriptionResponse>

Create an event subscription.

Source

pub async fn list_subscriptions(&self) -> Result<Vec<EventSubscription>>

List event subscriptions.

Source

pub async fn get_subscription(&self, id: &str) -> Result<EventSubscription>

Get an event subscription.

Source

pub async fn delete_subscription(&self, id: &str) -> Result<()>

Delete an event subscription.

Source

pub async fn register_command( &self, request: CreateCommandRequest, ) -> Result<CreateCommandResponse>

Register a command.

Source

pub async fn list_commands(&self) -> Result<Vec<AgentCommand>>

List commands.

Source

pub async fn delete_command(&self, command: &str) -> Result<()>

Delete a command.

Source

pub async fn stats(&self) -> Result<WorkspaceStats>

Get workspace statistics.

Source

pub async fn activity(&self, limit: Option<i32>) -> Result<Vec<ActivityItem>>

Get recent activity.

Source

pub async fn all_dm_conversations(&self) -> Result<Vec<WorkspaceDmConversation>>

Get all DM conversations in the workspace.

Source

pub async fn dm_conversation_participants( &self, conversation_id: &str, ) -> Result<Vec<String>>

Resolve participants for a workspace DM conversation.

Source

pub async fn dm_messages( &self, conversation_id: &str, opts: Option<MessageListQuery>, ) -> Result<Vec<WorkspaceDmMessage>>

Get DM messages for a workspace conversation.

Trait Implementations§

Source§

impl Clone for RelayCast

Source§

fn clone(&self) -> RelayCast

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

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<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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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