Skip to content

Commit 5c50c53

Browse files
author
Michael Eichelbeck
committed
feat(v2): add native cloud controller
1 parent bf56d4d commit 5c50c53

32 files changed

Lines changed: 6797 additions & 283 deletions

File tree

AGENTS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ Destructive commands (need permission): `zeroshot kill`, `zeroshot clear`, `zero
104104
| Native product construction | `zeroshot-rust/` |
105105
| Native foreground agents | `zeroshot-rust/src/native_execution/{agent,pi}/`, `native_execution/program/foreground.rs` |
106106
| Native admission composition | `zeroshot-rust/src/native_admission.rs`, `zeroshot-rust/src/main.rs` |
107+
| Native v2 cloud controller/OECP backend | `zeroshot-rust/src/native_v2_cloud.rs`, `native_v2_cloud/` |
108+
| Native v2 private capsule runner | `zeroshot-rust/src/native_v2_capsule.rs`, `native_v2_capsule/` |
107109
| Native release targets | `distribution/zeroshot-rust-targets.json` |
108110
| Native npm binary shim | `npm/zeroshot-rust/` |
109111
| Native distribution tooling | `scripts/rust-distribution.js` |
@@ -146,6 +148,9 @@ Destructive commands (need permission): `zeroshot kill`, `zeroshot clear`, `zero
146148
| Watch observation port | `crates/openengine-cluster-server/src/watch/ports.rs` |
147149
| Watch minimal test fixture | `crates/openengine-cluster-server/src/watch/fixtures.rs` |
148150
| Watch wire types/framing | `crates/openengine-cluster-protocol/src/watch.rs` |
151+
| Native v2 run method wire values | `crates/openengine-cluster-protocol/src/native_v2_{run,observation}.rs` |
152+
| Native v2 server routes/stream seam | `crates/openengine-cluster-server/src/native_v2.rs`, `connection/native_v2.rs` |
153+
| Native v2 typed protocol client | `crates/openengine-cluster-client/src/native_v2.rs` |
149154
| Client watch/reconnect | `crates/openengine-cluster-client/src/watch.rs` |
150155
| NDJSON stdio binding | `crates/openengine-cluster-server/src/stdio.rs` |
151156
| NDJSON watch client | `crates/openengine-cluster-client/src/ndjson_watch.rs` |

crates/openengine-cluster-client/src/lib.rs

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mod ndjson_subscription;
66

77
pub mod agent_attach;
88
pub mod logs;
9+
pub mod native_v2;
910
pub mod ndjson_agent_attach;
1011
pub mod ndjson_logs;
1112
pub mod ndjson_watch;
@@ -16,6 +17,7 @@ pub use logs::*;
1617
pub use ndjson_agent_attach::*;
1718
pub use ndjson_logs::*;
1819
pub use ndjson_watch::*;
20+
pub use native_v2::*;
1921
pub use watch::*;
2022
pub use websocket::*;
2123

@@ -29,8 +31,10 @@ use openengine_cluster_protocol::{
2931
ApplyParams, ApplyResult, DeleteParams, DeleteResult, GetParams, GetResult, InitializeParams,
3032
InitializeResult, JsonRpcError, JsonRpcErrorResponse, JsonRpcRequest, JsonRpcSuccess,
3133
PlanParams, PlanResult, RequestId, ResubmitParams, ResubmitResult, RetryParams, RetryResult,
32-
StopParams, StopResult, SubscriptionId, UpdateParams, UpdateResult, JSON_RPC_VERSION,
33-
PROTOCOL_VERSION,
34+
RunForceParams, RunForceResult, RunListParams, RunListResult, RunStatusParams, RunStatusResult,
35+
RunSubmitParams, RunSubmitResult, StopParams, StopResult, SubscriptionId, UpdateParams,
36+
UpdateResult, JSON_RPC_VERSION, PROTOCOL_VERSION, RUN_FORCE_METHOD, RUN_LIST_METHOD,
37+
RUN_STATUS_METHOD, RUN_SUBMIT_METHOD,
3438
};
3539
use openengine_cluster_server::{ClusterBackend, Dispatcher};
3640
use serde::de::DeserializeOwned;
@@ -337,6 +341,28 @@ where
337341
self.call("delete", params).await
338342
}
339343

344+
pub async fn run_submit(
345+
&self,
346+
params: RunSubmitParams,
347+
) -> Result<RunSubmitResult, ClientError> {
348+
self.call(RUN_SUBMIT_METHOD, params).await
349+
}
350+
351+
pub async fn run_list(&self, params: RunListParams) -> Result<RunListResult, ClientError> {
352+
self.call(RUN_LIST_METHOD, params).await
353+
}
354+
355+
pub async fn run_status(
356+
&self,
357+
params: RunStatusParams,
358+
) -> Result<RunStatusResult, ClientError> {
359+
self.call(RUN_STATUS_METHOD, params).await
360+
}
361+
362+
pub async fn run_force(&self, params: RunForceParams) -> Result<RunForceResult, ClientError> {
363+
self.call(RUN_FORCE_METHOD, params).await
364+
}
365+
340366
async fn call<P, R>(&self, method: &str, params: P) -> Result<R, ClientError>
341367
where
342368
P: Serialize + Send,

0 commit comments

Comments
 (0)