soma_palette/lib.rs
1// Render per-item feature-requirement badges when rustdoc runs on nightly with
2// `--cfg docsrs` (docs.rs posture; locally via `cargo xtask doc --docsrs-cfg`).
3// Inert under the stable CI doc gate: stable rustdoc never sets `docsrs`.
4#![cfg_attr(docsrs, feature(doc_auto_cfg))]
5//! `soma-palette` — Soma's Palette product API and adapter.
6//!
7//! Owns the `/v1/palette/*` route/handler definitions ([module `router`]), the
8//! Palette DTOs shared by the HTTP server and the desktop app, the product
9//! mapping from provider `ToolSpec` Palette overlays into launcher actions,
10//! product launcher execution/auth policy, product error mapping, and
11//! product OpenAPI route metadata. Does not own Tauri window/tray/shortcut
12//! mechanics (see `soma-tauri-shell`), `tauri.conf.json`/bundle metadata, or
13//! frontend code — those stay in `apps/palette`.
14//!
15//! As of this crate's introduction (PR 17), [`router()`] is not yet mounted
16//! into `apps/soma`'s HTTP server — that wiring lands in a follow-up PR. This
17//! crate is buildable and independently tested (see `router_tests.rs`) ahead
18//! of that mount.
19//!
20//! See `soma-architecture-refactor-plan-v3.md` section 3.25 and "PR 17".
21
22pub mod auth;
23pub mod catalog;
24pub mod dto;
25pub mod error;
26pub mod execute;
27pub mod openapi;
28pub mod router;
29pub mod schema;
30pub mod search;
31pub mod state;
32
33pub use dto::{
34 LauncherCatalogEntry, LauncherCatalogResponse, LauncherExecuteRequest, LauncherExecuteResponse,
35 LauncherSchemaQuery, LauncherSchemaResponse, LauncherSearchQuery, LauncherSearchResponse,
36};
37pub use router::router;
38pub use state::PaletteState;