pub struct Client { /* private fields */ }Expand description
Client for Compose Manowar
Canonical contract for Compose manowar loops: agents, workflows, workspace indexing, and MCP/onchain connector execution.
Version: 0.8.6
Implementations§
Source§impl Client
impl Client
Sourcepub fn new(baseurl: &str) -> Self
pub fn new(baseurl: &str) -> Self
Create a new client.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Sourcepub fn new_with_client(baseurl: &str, client: Client) -> Self
pub fn new_with_client(baseurl: &str, client: Client) -> Self
Construct a new client with an existing reqwest::Client,
allowing more control over its configuration.
baseurl is the base URL provided to the internal
reqwest::Client, and should include a scheme and hostname,
as well as port and a path stem if applicable.
Source§impl Client
impl Client
Sourcepub fn responses_create(&self) -> ResponsesCreate<'_>
pub fn responses_create(&self) -> ResponsesCreate<'_>
Sends a POST request to /agent/{walletAddress}/responses
let response = client.responses_create()
.wallet_address(wallet_address)
.body(body)
.send()
.await;Sourcepub fn runs_state_get(&self) -> RunsStateGet<'_>
pub fn runs_state_get(&self) -> RunsStateGet<'_>
Sends a GET request to /agent/{walletAddress}/runs/{runId}/state
let response = client.runs_state_get()
.wallet_address(wallet_address)
.run_id(run_id)
.thread_id(thread_id)
.send()
.await;Sourcepub fn stream_create(&self) -> StreamCreate<'_>
pub fn stream_create(&self) -> StreamCreate<'_>
Sends a POST request to /agent/{walletAddress}/stream
let response = client.stream_create()
.wallet_address(wallet_address)
.x_session_active(x_session_active)
.x_session_budget_remaining(x_session_budget_remaining)
.x_session_user_address(x_session_user_address)
.body(body)
.send()
.await;Sourcepub fn index(&self) -> Index<'_>
pub fn index(&self) -> Index<'_>
Sends a POST request to /api/workspace/index
let response = client.index()
.x_session_active(x_session_active)
.x_session_user_address(x_session_user_address)
.body(body)
.send()
.await;Sourcepub fn search(&self) -> Search<'_>
pub fn search(&self) -> Search<'_>
Sends a POST request to /api/workspace/search
let response = client.search()
.x_session_active(x_session_active)
.x_session_user_address(x_session_user_address)
.body(body)
.send()
.await;Sourcepub fn mcp_list(&self) -> McpList<'_>
pub fn mcp_list(&self) -> McpList<'_>
Sends a GET request to /mcps
let response = client.mcp_list()
.category(category)
.limit(limit)
.offset(offset)
.status(status)
.send()
.await;Sourcepub fn mcp_categories_list(&self) -> McpCategoriesList<'_>
pub fn mcp_categories_list(&self) -> McpCategoriesList<'_>
Sends a GET request to /mcps/categories
let response = client.mcp_categories_list()
.send()
.await;Sourcepub fn mcp_meta_get(&self) -> McpMetaGet<'_>
pub fn mcp_meta_get(&self) -> McpMetaGet<'_>
Sends a GET request to /mcps/meta
let response = client.mcp_meta_get()
.send()
.await;Sourcepub fn mcp_search(&self) -> McpSearch<'_>
pub fn mcp_search(&self) -> McpSearch<'_>
Sends a GET request to /mcps/search
let response = client.mcp_search()
.limit(limit)
.q(q)
.send()
.await;Sends a GET request to /mcps/tags
let response = client.mcp_tags_list()
.send()
.await;Sourcepub fn mcp_get(&self) -> McpGet<'_>
pub fn mcp_get(&self) -> McpGet<'_>
Sends a GET request to /mcps/{serverId}
let response = client.mcp_get()
.server_id(server_id)
.send()
.await;Sourcepub fn mcp_actions_list(&self) -> McpActionsList<'_>
pub fn mcp_actions_list(&self) -> McpActionsList<'_>
Sends a GET request to /mcps/{serverId}/actions
let response = client.mcp_actions_list()
.server_id(server_id)
.send()
.await;Sourcepub fn mcp_action_execute(&self) -> McpActionExecute<'_>
pub fn mcp_action_execute(&self) -> McpActionExecute<'_>
Sends a POST request to /mcps/{serverId}/execute/{command}
let response = client.mcp_action_execute()
.server_id(server_id)
.command(command)
.body(body)
.send()
.await;Sourcepub fn mcp_inspect(&self) -> McpInspect<'_>
pub fn mcp_inspect(&self) -> McpInspect<'_>
Sends a POST request to /mcps/{serverId}/inspect
let response = client.mcp_inspect()
.server_id(server_id)
.body(body)
.send()
.await;Sourcepub fn mcp_spawn_get(&self) -> McpSpawnGet<'_>
pub fn mcp_spawn_get(&self) -> McpSpawnGet<'_>
Sends a GET request to /mcps/{serverId}/spawn
let response = client.mcp_spawn_get()
.server_id(server_id)
.send()
.await;Sourcepub fn onchain_list(&self) -> OnchainList<'_>
pub fn onchain_list(&self) -> OnchainList<'_>
Sends a GET request to /onchain
let response = client.onchain_list()
.send()
.await;Sourcepub fn onchain_get(&self) -> OnchainGet<'_>
pub fn onchain_get(&self) -> OnchainGet<'_>
Sends a GET request to /onchain/{connectorId}
let response = client.onchain_get()
.connector_id(connector_id)
.send()
.await;Sourcepub fn onchain_action_get(&self) -> OnchainActionGet<'_>
pub fn onchain_action_get(&self) -> OnchainActionGet<'_>
Sends a GET request to /onchain/{connectorId}/actions/{command}
let response = client.onchain_action_get()
.connector_id(connector_id)
.command(command)
.send()
.await;Sourcepub fn onchain_action_execute(&self) -> OnchainActionExecute<'_>
pub fn onchain_action_execute(&self) -> OnchainActionExecute<'_>
Sends a POST request to /onchain/{connectorId}/execute/{command}
let response = client.onchain_action_execute()
.connector_id(connector_id)
.command(command)
.body(body)
.send()
.await;Sourcepub fn execute(&self) -> Execute<'_>
pub fn execute(&self) -> Execute<'_>
Sends a POST request to /workflow/execute
let response = client.execute()
.x_session_active(x_session_active)
.x_session_budget_remaining(x_session_budget_remaining)
.x_session_user_address(x_session_user_address)
.body(body)
.send()
.await;Sourcepub fn run_alias(&self) -> RunAlias<'_>
pub fn run_alias(&self) -> RunAlias<'_>
Sends a POST request to /workflow/{id}/run
let response = client.run_alias()
.id(id)
.body(body)
.send()
.await;Sourcepub fn runs_approval_signal(&self) -> RunsApprovalSignal<'_>
pub fn runs_approval_signal(&self) -> RunsApprovalSignal<'_>
Sends a POST request to /workflow/{walletAddress}/runs/{runId}/approval
let response = client.runs_approval_signal()
.wallet_address(wallet_address)
.run_id(run_id)
.body(body)
.send()
.await;Sourcepub fn workflow_runs_state_get(&self) -> WorkflowRunsStateGet<'_>
pub fn workflow_runs_state_get(&self) -> WorkflowRunsStateGet<'_>
Sends a GET request to /workflow/{walletAddress}/runs/{runId}/state
let response = client.workflow_runs_state_get()
.wallet_address(wallet_address)
.run_id(run_id)
.send()
.await;Sourcepub fn stop(&self) -> Stop<'_>
pub fn stop(&self) -> Stop<'_>
Sends a POST request to /workflow/{walletAddress}/stop
let response = client.stop()
.wallet_address(wallet_address)
.body(body)
.send()
.await;Sourcepub fn workflow_stream_create(&self) -> WorkflowStreamCreate<'_>
pub fn workflow_stream_create(&self) -> WorkflowStreamCreate<'_>
Sends a POST request to /workflow/{walletAddress}/stream
let response = client.workflow_stream_create()
.wallet_address(wallet_address)
.x_session_active(x_session_active)
.x_session_budget_remaining(x_session_budget_remaining)
.x_session_user_address(x_session_user_address)
.body(body)
.send()
.await;