Skip to main content

SquadsApi

Struct SquadsApi 

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

Squads — multi-agent groups that run a shared brief

Implementations§

Source§

impl SquadsApi

Source

pub async fn add_squad_graph_edge( &self, squad_id: &str, body: &AddSquadGraphEdgeRequest, ) -> Result<Map<String, Value>>

Add graph edge

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

POST /api/v1/squads/{squadId}/graph/edges

Source

pub async fn add_squad_graph_node( &self, squad_id: &str, body: &AddSquadGraphNodeRequest, ) -> Result<Map<String, Value>>

Add graph node

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

POST /api/v1/squads/{squadId}/graph/nodes

Source

pub async fn cancel_squad_run( &self, squad_id: &str, team_run_id: &str, ) -> Result<CancelSquadRunResponse>

Cancel a squad run

Stops the orchestration loop first, then every non-terminal child run, and releases the chat state so the canvas does not stay locked on a run that was just killed.

Order matters and is not an implementation detail: killing children while the loop is still running makes it spawn more — two fresh child runs were measured within two minutes of a “successful” cancel.

cancelledCount is camelCase on the wire, unlike every neighbouring field. That is what the server sends.

/api/v1/squads/* is the canonical surface; /api/v1/teams/* is the same handler under the older noun.

POST /api/v1/squads/{squadId}/runs/{teamRunId}/cancel

Source

pub async fn create(&self, body: &TeamCreate) -> Result<Team>

Create a squad

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

POST /api/v1/squads

Source

pub async fn delete(&self, squad_id: &str) -> Result<DeleteSquadResponse>

Delete squad

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

DELETE /api/v1/squads/{squadId}

Source

pub async fn delete_squad_graph_edge( &self, squad_id: &str, edge_id: &str, ) -> Result<DeleteSquadGraphEdgeResponse>

Remove edge

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

DELETE /api/v1/squads/{squadId}/graph/edges/{edgeId}

Source

pub async fn delete_squad_graph_node( &self, squad_id: &str, agent_id: &str, ) -> Result<DeleteSquadGraphNodeResponse>

Remove node

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

DELETE /api/v1/squads/{squadId}/graph/nodes/{agentId}

Source

pub async fn get(&self, squad_id: &str) -> Result<Team>

Get squad

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}

Source

pub async fn get_squad_chat_history( &self, squad_id: &str, params: &GetSquadChatHistoryParams, ) -> Result<GetSquadChatHistoryResponse>

Get squad chat history

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/chat

Source

pub async fn get_squad_graph( &self, squad_id: &str, ) -> Result<GetSquadGraphResponse>

Get full squad graph

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/graph

Source

pub async fn get_squad_graph_node( &self, squad_id: &str, agent_id: &str, ) -> Result<TeamGraphNode>

Get graph node

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/graph/nodes/{agentId}

Source

pub async fn get_squad_run( &self, squad_id: &str, team_run_id: &str, ) -> Result<TeamRunDetail>

Get specific squad run

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/runs/{teamRunId}

Source

pub async fn get_squad_run_messages( &self, squad_id: &str, team_run_id: &str, ) -> Result<GetSquadRunMessagesResponse>

Get squad run messages

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/runs/{teamRunId}/messages

Source

pub async fn list(&self) -> Result<ListSquadsResponse>

List squads

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads

Source

pub async fn list_squad_graph_edges( &self, squad_id: &str, ) -> Result<ListSquadGraphEdgesResponse>

List graph edges

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/graph/edges

Source

pub async fn list_squad_graph_nodes( &self, squad_id: &str, ) -> Result<ListSquadGraphNodesResponse>

List graph nodes

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/graph/nodes

Source

pub async fn list_squad_runs( &self, squad_id: &str, ) -> Result<ListSquadRunsResponse>

List runs for a squad

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/runs

Source

pub async fn start_squad_run( &self, squad_id: &str, body: &StartSquadRunRequest, ) -> Result<StartSquadRunResponse>

Start a squad run

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

POST /api/v1/squads/{squadId}/runs

Source

pub fn stream_squad_chat_events( &self, squad_id: &str, params: &StreamSquadChatEventsParams, ) -> EventStream

SSE stream for squad chat

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/chat/events

Required scopes: events:read.

Returns a server-sent event stream.

Source

pub fn stream_squad_run_events( &self, squad_id: &str, run_id: &str, ) -> EventStream

Stream squad run events (SSE)

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

GET /api/v1/squads/{squadId}/runs/{runId}/events

Required scopes: events:read.

Returns a server-sent event stream.

Source

pub async fn update(&self, squad_id: &str, body: &TeamUpdate) -> Result<Team>

Update squad

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

PUT /api/v1/squads/{squadId}

Source

pub async fn update_squad_graph_node( &self, squad_id: &str, agent_id: &str, body: &UpdateSquadGraphNodeRequest, ) -> Result<Map<String, Value>>

Update graph node

/api/v1/squads/* is the canonical surface. /api/v1/teams/* is the same handler under the older noun: the server rewrites the leading path segment before dispatch, so the two are one endpoint and cannot drift apart.

PATCH /api/v1/squads/{squadId}/graph/nodes/{agentId}

Trait Implementations§

Source§

impl Clone for SquadsApi

Source§

fn clone(&self) -> SquadsApi

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SquadsApi

Source§

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

Formats the value using the given formatter. 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: Sized + 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: Sized + 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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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<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