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
//! Bridge wire-format models.
//!
//! Types in this module are the on-the-wire shapes shared between the
//! gateway HTTP server (which serves `/v1/bridge/*` endpoints from
//! `crates/entry/api`) and the desktop bridge client (which lives at
//! `bin/bridge` and consumes those endpoints). Keeping a single typed
//! definition here prevents the two sides from drifting — the API
//! handler emits exactly what the bridge deserialises.
//!
//! # Modules
//!
//! - [`manifest`] — the signed manifest envelope and its sub-entries (plugins,
//! skills, agents, managed MCP servers, user info).
//! - [`cowork_artifact`] — Cowork's native projections of a manifest artifact
//! (the staged library record and the bundle install manifest).
//! - [`plugin_bundle`] — the `.claude-plugin/plugin.json` manifest shape and
//! the well-formedness predicate shared by every plugin-bundle
//! producer/consumer.
//! - [`manifest_version`] — the parsed `<rfc3339>-<hex>` version identifier
//! carried inside every manifest.
//! - [`gateway`] — the whoami, device self-enrolment, session PAT and release
//! feed bodies.
//! - [`host`] — [`host::HostKind`], the closed set of host applications the
//! bridge integrates with.
//! - [`ids`] — typed newtypes for manifest-scoped identifiers (plugin id,
//! sha256 digest, signature, tool policy, …) so wire fields carry their
//! semantics through every layer.
//! - [`profile`] — the `/v1/bridge/profile` payload (gateway base url, auth
//! scheme, advertised models, per-provider health).
//! - [`update_policy`] — [`update_policy::AutoUpdatePolicy`], the self-update
//! rule carried in the manifest.
//!
//! Signing, signature verification, and manifest construction
//! (builders) deliberately live in the bridge crate alongside the
//! gateway client — they pull in `ed25519-dalek` and `serde_jcs` which
//! are not appropriate dependencies for this foundation crate.
//!
//! Copyright (c) systemprompt.io — Business Source License 1.1.
//! See <https://systemprompt.io> for licensing details.