1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
//! Rust client for a **hosted** boxxkite control-plane -- create sandboxes,
//! run commands, edit files, stream the audit log, take over a session's
//! shell, over HTTP/WebSocket. Not the `boxxkite` package itself (the
//! self-hosted Python core that embeds `SandboxManager` against your own
//! Kubernetes cluster) -- use this to talk to *someone else's* running
//! control-plane, hosted or self-hosted, over its `/v1/*` REST API. See
//! `docs/API.md` in the [boxxkite repository](https://github.com/EvAlssment/boxxkite)
//! for the full route/schema reference this crate wraps.
//!
//! # Quickstart
//!
//! ```no_run
//! use boxxkite_client::{Client, CreateSandboxOptions, ExecOptions};
//!
//! # async fn example() -> Result<(), boxxkite_client::BoxxkiteError> {
//! let client = Client::new("https://your-control-plane.example.com", "bxk_live_...")?;
//!
//! let sandbox = client
//! .create_sandbox(CreateSandboxOptions::new().label("demo"))
//! .await?;
//!
//! let result = client.exec(&sandbox.id, "python3 -c 'print(1 + 1)'", ExecOptions::new()).await?;
//! println!("{}", result.stdout); // "2\n"
//!
//! client.destroy_sandbox(&sandbox.id).await?;
//! # Ok(())
//! # }
//! ```
//!
//! # Error handling
//!
//! Every fallible call returns `Result<T, BoxxkiteError>`. A non-2xx
//! response becomes [`BoxxkiteError::Api`] (`.status()`/`.code()`); a
//! transport-level failure becomes [`BoxxkiteError::Connection`]. See
//! [`BoxxkiteError`] for the full set of variants.
//!
//! # Scope
//!
//! This crate wraps the same `/v1/*` API surface `sdk-python`/`sdk-js`/
//! `sdk-go` wrap: sandbox lifecycle, exec/file operations, the
//! `http_request` secrets-broker proxy, background processes
//! (`start_process`/`list_processes`/`get_process_output`/
//! `send_process_input`/`stop_process`), the audit log (`get_log`/`watch`),
//! human/desktop takeover, network-ingress preview URLs
//! (`create_preview_url`/`revoke_preview_url`), agent-invokable LSP
//! completions (`lsp_start`/`lsp_open`/`lsp_completion`/`lsp_stop`),
//! account/usage introspection, dashboard auth-flow helpers (password
//! reset/verify/resend/refresh/logout), the per-account command allowlist
//! (`get_allowed_commands`/`set_allowed_commands`/`clear_allowed_commands`),
//! the [`SandboxSession`]/[`Client::with_sandbox`] convenience helper, and
//! CRUD for images/volumes/outbound-MCP connections/webhooks/secrets.
//!
//! Deliberately **not** included (see `sdk-rust/README.md`'s "Scope"
//! section for the full disclosure): a LangChain-style tool-factory wrapper
//! (no dominant Rust agent-framework tool-spec convention exists yet to
//! mirror), a synchronous/blocking client variant (this crate is
//! async-first via `tokio`, matching Rust's ecosystem convention), and the
//! control-plane's filesystem-snapshot routes (a real endpoint, but not
//! wrapped by `sdk-python`/`sdk-js`/`sdk-go` either as of this writing).
//!
//! # Retries
//!
//! Automatic retry with exponential backoff + jitter is opt-in via
//! [`ClientBuilder::max_retries`]/[`ClientBuilder::retry`]; see
//! [`RetryConfig`] for exactly which failures are retried (and which never
//! are). Off by default.
pub use ;
pub use ;
pub use ;
pub use DesktopStream;
pub use BoxxkiteError;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use SandboxSession;
pub use TakeoverStream;
pub use ;
pub use ;