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
//! Rust SDK for the [Synthia](https://github.com/SynthiaResearch/synthia-sdk) API.
//!
//! Synthia interviews your agent to model its users, generates a calibrated
//! dataset of adversarial scenarios, plays each one in a deterministic
//! simulator, and judges every rollout. Your agent runs on your infrastructure;
//! only replies and traced tool calls cross the wire.
//!
//! This SDK mirrors the JavaScript and Python SDKs — same methods, same request
//! bodies, same server contract, `snake_case` names. `docs/reference/js-api.md`
//! is the long-form reference; the Rust-specific divergences (async, `Result`,
//! options structs) are listed in `docs/reference/rust-api.md`.
//!
//! Every SDK publishes as `synthiaresearch` — npm, PyPI, and crates.io.
// Server payload shapes, generated from packages/api-contract/openapi.json by
// scripts/generate-sdk-types.sh. Never hand-edit; fix the FastAPI response
// model and regenerate.
pub use crate;
pub use crate;
pub use crate;
/// The SDK version reported to the server on the session handshake.
///
/// Derived from Cargo rather than duplicated in a constant: the JS SDK keeps a
/// hand-written `SDK_VERSION` in step with its package.json and it drifted
/// once. Python derives its version the same way, from installed package
/// metadata.
pub const SDK_VERSION: &str = env!;
/// Default base URL for the hosted API. Override with `SYNTHIA_BASE_URL`.
pub const DEFAULT_BASE_URL: &str = "https://synthia-research--synthia-api-web.modal.run";
// Hand-written types own the bare names (the local sandbox surface); the
// server payload shapes take an `Api` prefix where they would collide. Mirrors
// client.ts:20 (`export type ApiToolCall = Api<"ToolCall">`) and client.py:32
// (`ToolCall as ApiToolCall`). The prefix is applied HERE, at the consumption
// boundary — never in the generator, so adding a colliding hand-written type
// never means touching codegen.
pub use crate;