Expand description
Stateless client for Silicon Commit, the work manager for Carbons and Silicons.
Two parts:
Client: the Commit HTTP API (/api/v1): todos, notes, notification rules, projects, diaries, tasks, versions, email settings, bug reports, the Silicon allow-list. Authenticate with a Silicon Accounts access token issued to Commit (Client::with_bearer), or, from another app acting for an account, with a User verification proof (Client::with_proof).auth::AccountsAuth: sign-in for Commit’s own tools at Silicon Accounts, with no app secret: the device flow for Carbons, short-lived token exchange for Silicons, refresh and revocation.
Nothing is stored: callers own tokens and decide where they live. Keep a Mutation
across retries of one logical write.
use silicon_commit_client::{Client, Mutation};
let commit = Client::new("https://api.commit.teamofsilicons.com")?.with_bearer(access_token);
let mine = commit.list_todos(&[("view", "assigned_to_me")]).await?;
let create = commit.with_mutation(Mutation::new());
create
.create_todo(&serde_json::json!({"title": "Review the release", "assigned_to": "si:builder"}))
.await?;Modules§
- auth
- Silicon Accounts sign-in for Commit’s own tools.
Structs§
- ApiError
- The Commit API’s error envelope plus transport metadata.
- Client
- The Commit API client. Holds configuration and a connection pool, never sessions.
- Mutation
- A logical mutation: reuse the same value after an uncertain response so the API
applies the write once (
Idempotency-Key), optionally withIf-Match.
Enums§
- Error
- Everything that can go wrong in this crate.
Constants§
- CONTRACT_
VERSION - The API contract this client speaks (
X-Commit-API-Version). - DEFAULT_
API_ URL - The production Commit API origin.
Traits§
- Expose
Secret - Token wrappers used by
auth::SignIn(tokens are redacted fromDebugoutput). Expose a reference to an inner secret
Functions§
- is_
loopback - True for
localhost,*.localhost,127.0.0.0/8and::1.
Type Aliases§
- Secret
String - Token wrappers used by
auth::SignIn(tokens are redacted fromDebugoutput). Secret string type.