Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/exports/RACommons.exports
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ _rac_http_download_cancel
# Connect — protocol/session policy plus the platform transport adapter ABI.
_rac_connect_client_create_hello_proto
_rac_connect_client_validate_host_proto
_rac_connect_cluster_join_proto
_rac_connect_cluster_start_proto
_rac_connect_cluster_stop_proto
_rac_connect_cluster_validate_activation_proto
_rac_connect_get_platform_policy_proto
_rac_connect_host_accept_client_proto
_rac_connect_host_close_session_proto
Expand Down
41 changes: 41 additions & 0 deletions core/include/rac/connect/rac_connect.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,47 @@ RAC_API rac_result_t rac_connect_host_validate_cancel_proto(const uint8_t* reque
size_t request_size,
rac_proto_buffer_t* out_validation);

/* ===========================================================================
* Cluster Orchestration (Issue #541: Local AI Cluster / Pipeline Sharding)
* =========================================================================== */

/**
* Start a local AI cluster coordinator session from a serialized
* runanywhere.v1.ClusterStartRequest. Validates peer assignments and returns
* the active ClusterState.
*/
RAC_API rac_result_t rac_connect_cluster_start_proto(const uint8_t* request_bytes,
size_t request_size,
rac_proto_buffer_t* out_cluster_state);

/**
* Join a cluster as a peer from a serialized runanywhere.v1.ClusterJoinRequest.
* Checks the peer appears in the cluster's layer assignments and, when it advertises
* a non-zero max_layers, that its assigned span fits within it; returns a
* ClusterStartResponse echoing the peer's capability.
*/
RAC_API rac_result_t rac_connect_cluster_join_proto(const uint8_t* request_bytes,
size_t request_size,
rac_proto_buffer_t* out_response);

/**
* Stop an active cluster coordinator session and clear peer states.
*/
RAC_API rac_result_t rac_connect_cluster_stop_proto(const uint8_t* request_bytes,
size_t request_size,
rac_proto_buffer_t* out_cluster_state);

/**
* Validate an intermediate activation tensor payload between pipeline stages.
* Accepts ClusterActivation and verifies cluster binding, tensor dimensions,
* and that from_layer is the start of a non-first stage (layer 0 is the first stage's input, not
* an inter-stage handoff). (Validation only; transport occurs out-of-band).
*/
RAC_API rac_result_t
rac_connect_cluster_validate_activation_proto(const uint8_t* request_bytes,
size_t request_size,
rac_proto_buffer_t* out_validation);

#ifdef __cplusplus
}
#endif
Expand Down
Loading
Loading