From 0cd030a675b19d5cacf1a5a5c1dcadfb49ae1d8b Mon Sep 17 00:00:00 2001 From: Matt Hill <9935159+MattDHill@users.noreply.github.com> Date: Fri, 20 Nov 2026 17:25:07 -0700 Subject: [PATCH 1/8] feat(registry): install, subscription and time-series metrics for registry admins StartOS answers package.get from its synced index, and s9pks download from object storage, so a registry never saw installs. StartOS now calls the registry's new unauthenticated package.record-install with the package id and version after an install or update completes; the registry records it only for a version it lists and answers the same either way. Index subscriptions are recorded with the client's OS version. `start-registry metrics installs` and `subscriptions` are new; `users`, `downloads`, `installs` and `subscriptions` take --interval day|week|month for a UTC series (weeks start Monday), and `summary` adds both totals. `downloads` is described as what it counts: requests for a specific version that reached the registry. Refs #4774 Co-Authored-By: Claude Opus 5.5 --- .../minor-added-registry-install-report.md | 5 + projects/start-registry/ARCHITECTURE.md | 18 +- projects/start-registry/README.md | 2 +- .../changelog/minor-added-install-metrics.md | 5 + .../crates/start-core/locales/i18n.yaml | 31 +- .../crates/start-core/src/install/mod.rs | 15 +- .../crates/start-core/src/registry/context.rs | 19 +- .../crates/start-core/src/registry/db.rs | 2 + .../crates/start-core/src/registry/metrics.rs | 786 ++++++++++++------ .../start-core/src/registry/package/mod.rs | 7 + 10 files changed, 637 insertions(+), 253 deletions(-) create mode 100644 projects/start-os/changelog/minor-added-registry-install-report.md create mode 100644 projects/start-registry/changelog/minor-added-install-metrics.md diff --git a/projects/start-os/changelog/minor-added-registry-install-report.md b/projects/start-os/changelog/minor-added-registry-install-report.md new file mode 100644 index 0000000000..97f92be4d7 --- /dev/null +++ b/projects/start-os/changelog/minor-added-registry-install-report.md @@ -0,0 +1,5 @@ +--- +release-notes: false +--- + +- After installing or updating a service from a registry, StartOS tells that registry which package and version it installed, and nothing else. diff --git a/projects/start-registry/ARCHITECTURE.md b/projects/start-registry/ARCHITECTURE.md index 8174b7ba14..e282670b0b 100644 --- a/projects/start-registry/ARCHITECTURE.md +++ b/projects/start-registry/ARCHITECTURE.md @@ -46,15 +46,15 @@ Defined in `shared-libs/crates/start-core/src/registry/mod.rs`: Subcommands (same module), each available over RPC and to the `start-registry` CLI via `with_call_remote`: -| Command | Module | Purpose | -| --------- | --------------------- | ------------------------------------------------------------------------ | -| `index` | `mod::get_full_index` | full combined index (name, icon, packages, OS, signers) | -| `info` | `registry/info.rs` | set/get registry info and categories | -| `os` | `registry/os/` | OS version index + asset (image) management | -| `package` | `registry/package/` | add/get/list packages, versions, assets; manage private-package access | -| `admin` | `registry/admin.rs` | manage admins and signers | -| `db` | `registry/db.rs` | dump/inspect the registry database; subscribe to `/index` or any subpath | -| `metrics` | `registry/metrics.rs` | download/user metrics summaries (admin-only) | +| Command | Module | Purpose | +| --------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `index` | `mod::get_full_index` | full combined index (name, icon, packages, OS, signers) | +| `info` | `registry/info.rs` | set/get registry info and categories | +| `os` | `registry/os/` | OS version index + asset (image) management | +| `package` | `registry/package/` | add/get/list packages, versions, assets; manage private-package access | +| `admin` | `registry/admin.rs` | manage admins and signers | +| `db` | `registry/db.rs` | dump/inspect the registry database; subscribe to `/index` or any subpath | +| `metrics` | `registry/metrics.rs` | install, user, subscription and lookup metrics, with time series (admin-only); `package record-install` records an install | ### Registry index subscriptions diff --git a/projects/start-registry/README.md b/projects/start-registry/README.md index 14b96aadd7..340925e358 100644 --- a/projects/start-registry/README.md +++ b/projects/start-registry/README.md @@ -11,7 +11,7 @@ This directory is a thin product wrapper inside the `start-technologies` monorep - Redirects visitors at `/` to `https://marketplace.start9.com/` with the registry selected. - Exposes a JSON-RPC API over HTTP, WebSocket, and a REST continuation channel. - Tracks **admins** and package **signers**, verifies signatures on uploaded content, and proposes administrator-selected signers for Marketplace trust when users connect. -- Records anonymous **metrics** (downloads / users) for admin reporting. +- Records anonymous **metrics** for its admins: installs and updates StartOS reports (package and version only), active servers from OS update checks, index subscriptions, and package lookups, each as totals or a day/week/month series (`start-registry metrics`). ## Package trust proposals diff --git a/projects/start-registry/changelog/minor-added-install-metrics.md b/projects/start-registry/changelog/minor-added-install-metrics.md new file mode 100644 index 0000000000..1e5a66479a --- /dev/null +++ b/projects/start-registry/changelog/minor-added-install-metrics.md @@ -0,0 +1,5 @@ +--- +release-notes: false +--- + +- Registry admins can see the installs and updates StartOS reports, along with active servers, index subscriptions and package lookups, as totals or as daily, weekly or monthly counts (`start-registry metrics installs`, `users`, `subscriptions`, `downloads`). diff --git a/shared-libs/crates/start-core/locales/i18n.yaml b/shared-libs/crates/start-core/locales/i18n.yaml index 99019be290..9fa5b4384d 100644 --- a/shared-libs/crates/start-core/locales/i18n.yaml +++ b/shared-libs/crates/start-core/locales/i18n.yaml @@ -4974,6 +4974,13 @@ help.arg.metrics-before: fr_FR: "Fin de la plage temporelle (horodatage RFC 3339)" pl_PL: "Koniec zakresu czasu (znacznik czasu RFC 3339)" +help.arg.metrics-interval: + en_US: "Also count each day, week (from Monday) or month in the range, in UTC" + de_DE: "Zusätzlich jeden Tag, jede Woche (ab Montag) oder jeden Monat im Zeitraum zählen, in UTC" + es_ES: "Contar además cada día, semana (desde el lunes) o mes del rango, en UTC" + fr_FR: "Compter aussi chaque jour, semaine (à partir du lundi) ou mois de la plage, en UTC" + pl_PL: "Zlicz też każdy dzień, tydzień (od poniedziałku) lub miesiąc w zakresie, w UTC" + help.arg.metrics-pkg-id: en_US: "Filter by package ID" de_DE: "Nach Paket-ID filtern" @@ -7282,11 +7289,25 @@ about.get-listen-address-for-webserver: pl_PL: "Pobierz adres nasłuchiwania serwera internetowego" about.get-metrics-downloads: - en_US: "Count package download requests with optional filters" - de_DE: "Paket-Download-Anfragen mit optionalen Filtern zählen" - es_ES: "Contar solicitudes de descarga de paquetes con filtros opcionales" - fr_FR: "Compter les demandes de téléchargement de paquets avec filtres optionnels" - pl_PL: "Zlicz żądania pobrania pakietów z opcjonalnymi filtrami" + en_US: "Count requests for a specific package version that reached the registry, with optional filters" + de_DE: "Anfragen nach einer bestimmten Paketversion zählen, die die Registry erreicht haben, mit optionalen Filtern" + es_ES: "Contar las solicitudes de una versión concreta de un paquete que llegaron al registro, con filtros opcionales" + fr_FR: "Compter les demandes d'une version précise d'un paquet parvenues au registre, avec filtres optionnels" + pl_PL: "Zlicz żądania konkretnej wersji pakietu, które dotarły do rejestru, z opcjonalnymi filtrami" + +about.get-metrics-installs: + en_US: "Count package installs and updates reported by StartOS, with optional filters" + de_DE: "Von StartOS gemeldete Paketinstallationen und -aktualisierungen zählen, mit optionalen Filtern" + es_ES: "Contar las instalaciones y actualizaciones de paquetes notificadas por StartOS, con filtros opcionales" + fr_FR: "Compter les installations et mises à jour de paquets signalées par StartOS, avec filtres optionnels" + pl_PL: "Zlicz instalacje i aktualizacje pakietów zgłoszone przez StartOS, z opcjonalnymi filtrami" + +about.get-metrics-subscriptions: + en_US: "Count package index subscriptions by StartOS version within a time range" + de_DE: "Abonnements des Paketindex nach StartOS-Version in einem Zeitraum zählen" + es_ES: "Contar las suscripciones al índice de paquetes por versión de StartOS dentro de un rango de tiempo" + fr_FR: "Compter les abonnements à l'index des paquets par version de StartOS dans une plage temporelle" + pl_PL: "Zlicz subskrypcje indeksu pakietów według wersji StartOS w zakresie czasu" about.get-metrics-summary: en_US: "Get a summary of registry usage metrics" diff --git a/shared-libs/crates/start-core/src/install/mod.rs b/shared-libs/crates/start-core/src/install/mod.rs index 00bf82c26e..646d923973 100644 --- a/shared-libs/crates/start-core/src/install/mod.rs +++ b/shared-libs/crates/start-core/src/install/mod.rs @@ -193,12 +193,23 @@ pub async fn install( .install( ctx.clone(), || asset.deserialize_s9pk_buffered(ctx.client.get(), download_progress), - Some(registry), + Some(registry.clone()), None::, Some(progress_tracker), ) .await?; - tokio::spawn(async move { download.await?.await }); + tokio::spawn(async move { + download.await?.await?; + let _ = ctx + .call_remote_with::( + "package.record-install", + Default::default(), + json!({ "id": id, "version": version }), + RegistryUrlParams { registry }, + ) + .await; + Ok::<_, Error>(()) + }); Ok(()) } diff --git a/shared-libs/crates/start-core/src/registry/context.rs b/shared-libs/crates/start-core/src/registry/context.rs index f1d67e4eec..702ed9371c 100644 --- a/shared-libs/crates/start-core/src/registry/context.rs +++ b/shared-libs/crates/start-core/src/registry/context.rs @@ -207,7 +207,21 @@ impl RegistryContext { ); CREATE INDEX IF NOT EXISTS idx_user_activity_created_at ON user_activity(created_at); CREATE INDEX IF NOT EXISTS idx_package_request_created_at ON package_request(created_at); - CREATE INDEX IF NOT EXISTS idx_package_request_pkg_id ON package_request(pkg_id);", + CREATE INDEX IF NOT EXISTS idx_package_request_pkg_id ON package_request(pkg_id); + CREATE TABLE IF NOT EXISTS package_install ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + created_at TEXT NOT NULL, + pkg_id TEXT NOT NULL, + version TEXT NOT NULL + ); + CREATE INDEX IF NOT EXISTS idx_package_install_created_at ON package_install(created_at); + CREATE INDEX IF NOT EXISTS idx_package_install_pkg_id ON package_install(pkg_id); + CREATE TABLE IF NOT EXISTS index_subscription ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + created_at TEXT NOT NULL, + os_version TEXT + ); + CREATE INDEX IF NOT EXISTS idx_index_subscription_created_at ON index_subscription(created_at);", ) .with_kind(ErrorKind::Database)?; let metrics_db = SyncMutex::new(metrics_db); @@ -661,12 +675,13 @@ mod tests { let registry = crate::registry::registry_api::(); let server = crate::main_api::(); - let public: [&[&str]; 13] = [ + let public: [&[&str]; 14] = [ &["index"], &["info"], &["db", "subscribe"], &["package", "index"], &["package", "get"], + &["package", "record-install"], &["package", "category", "list"], &["package", "signer", "list"], &["os", "index"], diff --git a/shared-libs/crates/start-core/src/registry/db.rs b/shared-libs/crates/start-core/src/registry/db.rs index f7a1bc3228..6bc4b715eb 100644 --- a/shared-libs/crates/start-core/src/registry/db.rs +++ b/shared-libs/crates/start-core/src/registry/db.rs @@ -201,7 +201,9 @@ pub async fn subscribe( patch_db::Revision, >, ) -> Result { + let os_version = params.os_version.as_ref().map(ToString::to_string); let (mirror, dump, sub) = visible_subscription(&context, params).await?; + crate::registry::metrics::record_subscription(&context, os_version); if let Some(stream) = rpc_stream { stream_subscription(stream, mirror, sub); Ok(SubscribeIndexResult::Stream(dump)) diff --git a/shared-libs/crates/start-core/src/registry/metrics.rs b/shared-libs/crates/start-core/src/registry/metrics.rs index ac1c5f2077..b117ac45b0 100644 --- a/shared-libs/crates/start-core/src/registry/metrics.rs +++ b/shared-libs/crates/start-core/src/registry/metrics.rs @@ -1,10 +1,14 @@ -use clap::Parser; +use chrono::Utc; +use clap::{Parser, ValueEnum}; use rpc_toolkit::{Context, HandlerExt, ParentHandler, from_fn_async}; use serde::{Deserialize, Serialize}; +use tracing::warn; +use crate::PackageId; use crate::context::CliContext; use crate::prelude::*; use crate::registry::context::RegistryContext; +use crate::util::VersionString; use crate::util::serde::{HandlerExtSerde, WithIoFormat, display_serializable}; pub fn metrics_api() -> ParentHandler { @@ -36,9 +40,87 @@ pub fn metrics_api() -> ParentHandler { .with_about("about.get-metrics-downloads") .with_call_remote::(), ) + .subcommand( + "installs", + from_fn_async(get_installs) + .with_metadata("admin", Value::Bool(true)) + .with_display_serializable() + .with_custom_display_fn(|handle, result| display_installs(handle.params, result)) + .with_about("about.get-metrics-installs") + .with_call_remote::(), + ) + .subcommand( + "subscriptions", + from_fn_async(get_subscriptions) + .with_metadata("admin", Value::Bool(true)) + .with_display_serializable() + .with_custom_display_fn(|handle, result| { + display_subscriptions(handle.params, result) + }) + .with_about("about.get-metrics-subscriptions") + .with_call_remote::(), + ) } -// --- summary --- +// --- recording --- + +#[derive(Debug, Deserialize, Serialize, VisitFields)] +#[serde(rename_all = "camelCase")] +pub struct RecordInstallParams { + pub id: PackageId, + pub version: VersionString, +} + +rpc_toolkit::reflect_ts!(RecordInstallParams); +rpc_toolkit::ts_export!(RecordInstallParams, namespaces = [""]); + +/// Counts a completed install or update. Answers the same whether or not the version exists. +pub async fn record_install( + ctx: RegistryContext, + RecordInstallParams { id, version }: RecordInstallParams, +) -> Result<(), Error> { + let listed = ctx + .db + .peek() + .await + .as_index() + .as_package() + .as_packages() + .as_idx(&id) + .map_or(false, |package| { + package.as_versions().as_idx(&version).is_some() + }); + if listed { + record( + ctx, + "INSERT INTO package_install (created_at, pkg_id, version) VALUES (?1, ?2, ?3)", + vec![Some(id.to_string()), Some(version.to_string())], + ); + } + Ok(()) +} + +pub(crate) fn record_subscription(ctx: &RegistryContext, os_version: Option) { + record( + ctx.clone(), + "INSERT INTO index_subscription (created_at, os_version) VALUES (?1, ?2)", + vec![os_version], + ); +} + +/// Inserts a row stamped with the current time ahead of `values`. +fn record(ctx: RegistryContext, sql: &'static str, values: Vec>) { + tokio::task::spawn_blocking(move || { + ctx.metrics_db.mutate(|conn| { + let row = std::iter::once(Some(Utc::now().to_rfc3339())).chain(values); + if let Err(e) = conn.execute(sql, rusqlite::params_from_iter(row)) { + warn!("failed to record metric: {e}"); + } + }); + }); +} + +// --- shared --- #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] @@ -50,12 +132,226 @@ pub struct CountEntry { rpc_toolkit::reflect_ts!(CountEntry); rpc_toolkit::ts_export!(CountEntry, namespaces = [""]); +#[derive(Clone, Copy, Debug, Deserialize, Serialize, VisitVariants, ValueEnum)] +#[serde(rename_all = "kebab-case")] +pub enum MetricsInterval { + Day, + Week, + Month, +} + +rpc_toolkit::reflect_ts!(MetricsInterval); +rpc_toolkit::ts_export!(MetricsInterval, namespaces = [""]); + +impl MetricsInterval { + /// A row's period: its UTC date, the Monday starting its week, or `YYYY-MM`. + fn period(self) -> &'static str { + match self { + Self::Day => "substr(created_at, 1, 10)", + Self::Week => "date(substr(created_at, 1, 10), 'weekday 0', '-6 days')", + Self::Month => "substr(created_at, 1, 7)", + } + } +} + +#[derive(Debug, Serialize, Deserialize, VisitFields)] +#[serde(rename_all = "camelCase")] +pub struct PeriodCount { + pub period: String, + pub count: u64, +} + +rpc_toolkit::reflect_ts!(PeriodCount); +rpc_toolkit::ts_export!(PeriodCount, namespaces = [""]); + +#[derive(Debug, Serialize, Deserialize, VisitFields)] +#[serde(rename_all = "camelCase")] +pub struct PackageVersionCount { + pub pkg_id: String, + pub version: String, + pub count: u64, +} + +rpc_toolkit::reflect_ts!(PackageVersionCount); +rpc_toolkit::ts_export!(PackageVersionCount, namespaces = [""]); + +#[derive(Default)] +struct Filter { + conditions: Vec, + params: Vec, +} + +impl Filter { + fn range(after: &Option, before: &Option) -> Self { + Self::default() + .with("created_at >=", after) + .with("created_at <", before) + } + + fn with(mut self, condition: &str, value: &Option) -> Self { + if let Some(value) = value { + self.params.push(value.clone()); + self.conditions + .push(format!("{condition} ?{}", self.params.len())); + } + self + } + + fn clause(&self) -> String { + if self.conditions.is_empty() { + String::new() + } else { + format!(" WHERE {}", self.conditions.join(" AND ")) + } + } +} + +fn count(conn: &rusqlite::Connection, sql: &str, filter: &Filter) -> Result { + conn.query_row( + &format!("{sql}{}", filter.clause()), + rusqlite::params_from_iter(&filter.params), + |row| row.get(0), + ) + .with_kind(ErrorKind::Database) +} + +fn count_entries( + conn: &rusqlite::Connection, + table: &str, + label: &str, + filter: &Filter, +) -> Result, Error> { + let mut stmt = conn + .prepare(&format!( + "SELECT COALESCE({label}, 'unknown'), COUNT(*) FROM {table}{} GROUP BY 1 ORDER BY 2 DESC", + filter.clause() + )) + .with_kind(ErrorKind::Database)?; + let rows = stmt + .query_map(rusqlite::params_from_iter(&filter.params), |row| { + Ok(CountEntry { + label: row.get(0)?, + count: row.get(1)?, + }) + }) + .with_kind(ErrorKind::Database)?; + rows.map(|r| r.with_kind(ErrorKind::Database)).collect() +} + +fn package_version_counts( + conn: &rusqlite::Connection, + table: &str, + filter: &Filter, +) -> Result, Error> { + let mut stmt = conn + .prepare(&format!( + "SELECT pkg_id, COALESCE(version, 'unknown'), COUNT(*) FROM {table}{} GROUP BY pkg_id, version ORDER BY pkg_id, COUNT(*) DESC", + filter.clause() + )) + .with_kind(ErrorKind::Database)?; + let rows = stmt + .query_map(rusqlite::params_from_iter(&filter.params), |row| { + Ok(PackageVersionCount { + pkg_id: row.get(0)?, + version: row.get(1)?, + count: row.get(2)?, + }) + }) + .with_kind(ErrorKind::Database)?; + rows.map(|r| r.with_kind(ErrorKind::Database)).collect() +} + +fn series( + conn: &rusqlite::Connection, + table: &str, + filter: &Filter, + interval: Option, +) -> Result, Error> { + let Some(interval) = interval else { + return Ok(Vec::new()); + }; + let mut stmt = conn + .prepare(&format!( + "SELECT {}, COUNT(*) FROM {table}{} GROUP BY 1 ORDER BY 1", + interval.period(), + filter.clause() + )) + .with_kind(ErrorKind::Database)?; + let rows = stmt + .query_map(rusqlite::params_from_iter(&filter.params), |row| { + Ok(PeriodCount { + period: row.get(0)?, + count: row.get(1)?, + }) + }) + .with_kind(ErrorKind::Database)?; + rows.map(|r| r.with_kind(ErrorKind::Database)).collect() +} + +async fn query( + ctx: RegistryContext, + f: impl FnOnce(&rusqlite::Connection) -> Result + Send + 'static, +) -> Result { + tokio::task::spawn_blocking(move || ctx.metrics_db.peek(f)) + .await + .with_kind(ErrorKind::Unknown)? +} + +fn print_counts(heading: &str, entries: &[CountEntry]) -> Result<(), Error> { + use prettytable::*; + + if entries.is_empty() { + return Ok(()); + } + println!(); + let mut table = Table::new(); + table.add_row(row![bc => heading, "COUNT"]); + for entry in entries { + table.add_row(row![&entry.label, entry.count]); + } + print_table(&table) +} + +fn print_package_versions(entries: &[PackageVersionCount]) -> Result<(), Error> { + use prettytable::*; + + if entries.is_empty() { + return Ok(()); + } + println!(); + let mut table = Table::new(); + table.add_row(row![bc => "PACKAGE", "VERSION", "COUNT"]); + for entry in entries { + table.add_row(row![&entry.pkg_id, &entry.version, entry.count]); + } + print_table(&table) +} + +fn print_series(series: &[PeriodCount]) -> Result<(), Error> { + use prettytable::*; + + if series.is_empty() { + return Ok(()); + } + println!(); + let mut table = Table::new(); + table.add_row(row![bc => "PERIOD", "COUNT"]); + for point in series { + table.add_row(row![&point.period, point.count]); + } + print_table(&table) +} + +// --- summary --- + #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct MetricsSummary { pub total_checkins: u64, pub unique_servers: u64, pub total_package_requests: u64, + pub total_installs: u64, + pub total_subscriptions: u64, pub by_arch: Vec, pub by_os_version: Vec, } @@ -64,79 +360,37 @@ rpc_toolkit::reflect_ts!(MetricsSummary); rpc_toolkit::ts_export!(MetricsSummary, namespaces = [""]); pub async fn get_summary(ctx: RegistryContext) -> Result { - tokio::task::spawn_blocking(move || { - ctx.metrics_db.peek(|conn| { - let total_checkins: u64 = conn - .query_row("SELECT COUNT(*) FROM user_activity", [], |row| row.get(0)) - .with_kind(ErrorKind::Database)?; - - let unique_servers: u64 = conn - .query_row( - "SELECT COUNT(DISTINCT server_id) FROM user_activity", - [], - |row| row.get(0), - ) - .with_kind(ErrorKind::Database)?; - - let total_package_requests: u64 = conn - .query_row("SELECT COUNT(*) FROM package_request", [], |row| row.get(0)) - .with_kind(ErrorKind::Database)?; - - let by_arch = query_count_entries( + query(ctx, |conn| { + let all = Filter::default(); + Ok(MetricsSummary { + total_checkins: count(conn, "SELECT COUNT(*) FROM user_activity", &all)?, + unique_servers: count( conn, - "SELECT COALESCE(arch, 'unknown'), COUNT(*) FROM user_activity GROUP BY arch ORDER BY COUNT(*) DESC", - )?; - - let by_os_version = query_count_entries( - conn, - "SELECT COALESCE(os_version, 'unknown'), COUNT(*) FROM user_activity GROUP BY os_version ORDER BY COUNT(*) DESC", - )?; - - Ok(MetricsSummary { - total_checkins, - unique_servers, - total_package_requests, - by_arch, - by_os_version, - }) + "SELECT COUNT(DISTINCT server_id) FROM user_activity", + &all, + )?, + total_package_requests: count(conn, "SELECT COUNT(*) FROM package_request", &all)?, + total_installs: count(conn, "SELECT COUNT(*) FROM package_install", &all)?, + total_subscriptions: count(conn, "SELECT COUNT(*) FROM index_subscription", &all)?, + by_arch: count_entries(conn, "user_activity", "arch", &all)?, + by_os_version: count_entries(conn, "user_activity", "os_version", &all)?, }) }) .await - .with_kind(ErrorKind::Unknown)? } fn display_summary(params: WithIoFormat, summary: MetricsSummary) -> Result<(), Error> { - use prettytable::*; - if let Some(format) = params.format { return display_serializable(format, summary); } - println!("Total check-ins: {}", summary.total_checkins); - println!("Unique servers: {}", summary.unique_servers); + println!("Total check-ins: {}", summary.total_checkins); + println!("Unique servers: {}", summary.unique_servers); println!("Total package requests: {}", summary.total_package_requests); - - if !summary.by_arch.is_empty() { - println!(); - let mut table = Table::new(); - table.add_row(row![bc => "ARCHITECTURE", "COUNT"]); - for entry in &summary.by_arch { - table.add_row(row![&entry.label, entry.count]); - } - print_table(&table)?; - } - - if !summary.by_os_version.is_empty() { - println!(); - let mut table = Table::new(); - table.add_row(row![bc => "OS VERSION", "COUNT"]); - for entry in &summary.by_os_version { - table.add_row(row![&entry.label, entry.count]); - } - print_table(&table)?; - } - - Ok(()) + println!("Total installs: {}", summary.total_installs); + println!("Total subscriptions: {}", summary.total_subscriptions); + print_counts("ARCHITECTURE", &summary.by_arch)?; + print_counts("OS VERSION", &summary.by_os_version) } // --- users --- @@ -152,16 +406,33 @@ pub struct GetUsersParams { /// End of time range (RFC 3339) #[arg(long, help = "help.arg.metrics-before")] pub before: Option, + /// Also report each period in the range + #[arg(long, help = "help.arg.metrics-interval")] + #[serde(default)] + pub interval: Option, } rpc_toolkit::reflect_ts!(GetUsersParams); rpc_toolkit::ts_export!(GetUsersParams, namespaces = [""]); +#[derive(Debug, Serialize, Deserialize, VisitFields)] +#[serde(rename_all = "camelCase")] +pub struct PeriodUsers { + pub period: String, + pub unique_servers: u64, + pub checkins: u64, +} + +rpc_toolkit::reflect_ts!(PeriodUsers); +rpc_toolkit::ts_export!(PeriodUsers, namespaces = [""]); + #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct UsersResponse { pub unique_servers: u64, pub total_checkins: u64, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub series: Vec, } rpc_toolkit::reflect_ts!(UsersResponse); @@ -169,39 +440,53 @@ rpc_toolkit::ts_export!(UsersResponse, namespaces = [""]); pub async fn get_users( ctx: RegistryContext, - GetUsersParams { after, before }: GetUsersParams, + GetUsersParams { + after, + before, + interval, + }: GetUsersParams, ) -> Result { - tokio::task::spawn_blocking(move || { - ctx.metrics_db.peek(|conn| { - let (where_clause, params) = time_range_where(&after, &before); - - let unique_servers: u64 = conn - .query_row( - &format!("SELECT COUNT(DISTINCT server_id) FROM user_activity{where_clause}"), - rusqlite::params_from_iter(¶ms), - |row| row.get(0), - ) - .with_kind(ErrorKind::Database)?; - - let total_checkins: u64 = conn - .query_row( - &format!("SELECT COUNT(*) FROM user_activity{where_clause}"), - rusqlite::params_from_iter(¶ms), - |row| row.get(0), - ) - .with_kind(ErrorKind::Database)?; - - Ok(UsersResponse { - unique_servers, - total_checkins, - }) + query(ctx, move |conn| { + let filter = Filter::range(&after, &before); + let series = match interval { + None => Vec::new(), + Some(interval) => { + let mut stmt = conn + .prepare(&format!( + "SELECT {}, COUNT(DISTINCT server_id), COUNT(*) FROM user_activity{} GROUP BY 1 ORDER BY 1", + interval.period(), + filter.clause() + )) + .with_kind(ErrorKind::Database)?; + let rows = stmt + .query_map(rusqlite::params_from_iter(&filter.params), |row| { + Ok(PeriodUsers { + period: row.get(0)?, + unique_servers: row.get(1)?, + checkins: row.get(2)?, + }) + }) + .with_kind(ErrorKind::Database)?; + rows.map(|r| r.with_kind(ErrorKind::Database)) + .collect::>()? + } + }; + Ok(UsersResponse { + unique_servers: count( + conn, + "SELECT COUNT(DISTINCT server_id) FROM user_activity", + &filter, + )?, + total_checkins: count(conn, "SELECT COUNT(*) FROM user_activity", &filter)?, + series, }) }) .await - .with_kind(ErrorKind::Unknown)? } fn display_users(params: WithIoFormat, response: UsersResponse) -> Result<(), Error> { + use prettytable::*; + if let Some(format) = params.format { return display_serializable(format, response); } @@ -209,10 +494,20 @@ fn display_users(params: WithIoFormat, response: UsersResponse) -> Result< println!("Unique servers: {}", response.unique_servers); println!("Total check-ins: {}", response.total_checkins); + if !response.series.is_empty() { + println!(); + let mut table = Table::new(); + table.add_row(row![bc => "PERIOD", "UNIQUE SERVERS", "CHECK-INS"]); + for point in &response.series { + table.add_row(row![&point.period, point.unique_servers, point.checkins]); + } + print_table(&table)?; + } + Ok(()) } -// --- downloads --- +// --- downloads and installs --- #[derive(Debug, Deserialize, Serialize, Parser, VisitFields)] #[group(skip)] @@ -231,28 +526,31 @@ pub struct GetDownloadsParams { /// End of time range (RFC 3339) #[arg(long, help = "help.arg.metrics-before")] pub before: Option, + /// Also report each period in the range + #[arg(long, help = "help.arg.metrics-interval")] + #[serde(default)] + pub interval: Option, } rpc_toolkit::reflect_ts!(GetDownloadsParams); rpc_toolkit::ts_export!(GetDownloadsParams, namespaces = [""]); -#[derive(Debug, Serialize, Deserialize, VisitFields)] -#[serde(rename_all = "camelCase")] -pub struct PackageVersionCount { - pub pkg_id: String, - pub version: String, - pub count: u64, +impl GetDownloadsParams { + fn filter(&self) -> Filter { + Filter::range(&self.after, &self.before) + .with("pkg_id =", &self.pkg_id) + .with("version =", &self.version) + } } -rpc_toolkit::reflect_ts!(PackageVersionCount); -rpc_toolkit::ts_export!(PackageVersionCount, namespaces = [""]); - #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct DownloadsResponse { pub total_requests: u64, pub by_package: Vec, pub by_package_version: Vec, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub series: Vec, } rpc_toolkit::reflect_ts!(DownloadsResponse); @@ -260,175 +558,195 @@ rpc_toolkit::ts_export!(DownloadsResponse, namespaces = [""]); pub async fn get_downloads( ctx: RegistryContext, - GetDownloadsParams { - pkg_id, - version, - after, - before, - }: GetDownloadsParams, + params: GetDownloadsParams, ) -> Result { - tokio::task::spawn_blocking(move || { - ctx.metrics_db.peek(|conn| { - let (where_clause, params) = - downloads_where(&pkg_id, &version, &after, &before); - - let total_requests: u64 = conn - .query_row( - &format!("SELECT COUNT(*) FROM package_request{where_clause}"), - rusqlite::params_from_iter(¶ms), - |row| row.get(0), - ) - .with_kind(ErrorKind::Database)?; - - let by_package = query_count_entries_with_params( - conn, - &format!( - "SELECT pkg_id, COUNT(*) FROM package_request{where_clause} GROUP BY pkg_id ORDER BY COUNT(*) DESC" - ), - ¶ms, - )?; - - let by_package_version = { - let mut stmt = conn - .prepare(&format!( - "SELECT pkg_id, COALESCE(version, 'unknown'), COUNT(*) FROM package_request{where_clause} GROUP BY pkg_id, version ORDER BY pkg_id, COUNT(*) DESC" - )) - .with_kind(ErrorKind::Database)?; - let rows = stmt - .query_map(rusqlite::params_from_iter(¶ms), |row| { - Ok(PackageVersionCount { - pkg_id: row.get(0)?, - version: row.get(1)?, - count: row.get(2)?, - }) - }) - .with_kind(ErrorKind::Database)?; - rows.map(|r| r.with_kind(ErrorKind::Database)) - .collect::, _>>()? - }; - - Ok(DownloadsResponse { - total_requests, - by_package, - by_package_version, - }) + query(ctx, move |conn| { + let filter = params.filter(); + Ok(DownloadsResponse { + total_requests: count(conn, "SELECT COUNT(*) FROM package_request", &filter)?, + by_package: count_entries(conn, "package_request", "pkg_id", &filter)?, + by_package_version: package_version_counts(conn, "package_request", &filter)?, + series: series(conn, "package_request", &filter, params.interval)?, }) }) .await - .with_kind(ErrorKind::Unknown)? } fn display_downloads( params: WithIoFormat, response: DownloadsResponse, ) -> Result<(), Error> { - use prettytable::*; - if let Some(format) = params.format { return display_serializable(format, response); } println!("Total requests: {}", response.total_requests); + print_counts("PACKAGE", &response.by_package)?; + print_package_versions(&response.by_package_version)?; + print_series(&response.series) +} - if !response.by_package.is_empty() { - println!(); - let mut table = Table::new(); - table.add_row(row![bc => "PACKAGE", "COUNT"]); - for entry in &response.by_package { - table.add_row(row![&entry.label, entry.count]); - } - print_table(&table)?; - } +#[derive(Debug, Serialize, Deserialize, VisitFields)] +#[serde(rename_all = "camelCase")] +pub struct InstallsResponse { + pub total_installs: u64, + pub by_package: Vec, + pub by_package_version: Vec, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub series: Vec, +} - if !response.by_package_version.is_empty() { - println!(); - let mut table = Table::new(); - table.add_row(row![bc => "PACKAGE", "VERSION", "COUNT"]); - for entry in &response.by_package_version { - table.add_row(row![&entry.pkg_id, &entry.version, entry.count]); - } - print_table(&table)?; +rpc_toolkit::reflect_ts!(InstallsResponse); +rpc_toolkit::ts_export!(InstallsResponse, namespaces = [""]); + +pub async fn get_installs( + ctx: RegistryContext, + params: GetDownloadsParams, +) -> Result { + query(ctx, move |conn| { + let filter = params.filter(); + Ok(InstallsResponse { + total_installs: count(conn, "SELECT COUNT(*) FROM package_install", &filter)?, + by_package: count_entries(conn, "package_install", "pkg_id", &filter)?, + by_package_version: package_version_counts(conn, "package_install", &filter)?, + series: series(conn, "package_install", &filter, params.interval)?, + }) + }) + .await +} + +fn display_installs( + params: WithIoFormat, + response: InstallsResponse, +) -> Result<(), Error> { + if let Some(format) = params.format { + return display_serializable(format, response); } - Ok(()) + println!("Total installs: {}", response.total_installs); + print_counts("PACKAGE", &response.by_package)?; + print_package_versions(&response.by_package_version)?; + print_series(&response.series) } -// --- helpers --- +// --- subscriptions --- -fn query_count_entries(conn: &rusqlite::Connection, sql: &str) -> Result, Error> { - query_count_entries_with_params(conn, sql, &[]) +#[derive(Debug, Serialize, Deserialize, VisitFields)] +#[serde(rename_all = "camelCase")] +pub struct SubscriptionsResponse { + pub total_subscriptions: u64, + pub by_os_version: Vec, + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub series: Vec, } -fn query_count_entries_with_params( - conn: &rusqlite::Connection, - sql: &str, - params: &[String], -) -> Result, Error> { - let mut stmt = conn.prepare(sql).with_kind(ErrorKind::Database)?; - let rows = stmt - .query_map(rusqlite::params_from_iter(params), |row| { - Ok(CountEntry { - label: row.get(0)?, - count: row.get(1)?, - }) +rpc_toolkit::reflect_ts!(SubscriptionsResponse); +rpc_toolkit::ts_export!(SubscriptionsResponse, namespaces = [""]); + +pub async fn get_subscriptions( + ctx: RegistryContext, + GetUsersParams { + after, + before, + interval, + }: GetUsersParams, +) -> Result { + query(ctx, move |conn| { + let filter = Filter::range(&after, &before); + Ok(SubscriptionsResponse { + total_subscriptions: count(conn, "SELECT COUNT(*) FROM index_subscription", &filter)?, + by_os_version: count_entries(conn, "index_subscription", "os_version", &filter)?, + series: series(conn, "index_subscription", &filter, interval)?, }) - .with_kind(ErrorKind::Database)?; - rows.map(|r| r.with_kind(ErrorKind::Database)).collect() + }) + .await } -fn time_range_where(after: &Option, before: &Option) -> (String, Vec) { - let mut conditions = Vec::new(); - let mut params = Vec::new(); - - if let Some(a) = after { - params.push(a.clone()); - conditions.push(format!("created_at >= ?{}", params.len())); - } - if let Some(b) = before { - params.push(b.clone()); - conditions.push(format!("created_at < ?{}", params.len())); +fn display_subscriptions( + params: WithIoFormat, + response: SubscriptionsResponse, +) -> Result<(), Error> { + if let Some(format) = params.format { + return display_serializable(format, response); } - let clause = if conditions.is_empty() { - String::new() - } else { - format!(" WHERE {}", conditions.join(" AND ")) - }; - - (clause, params) + println!("Total subscriptions: {}", response.total_subscriptions); + print_counts("OS VERSION", &response.by_os_version)?; + print_series(&response.series) } -fn downloads_where( - pkg_id: &Option, - version: &Option, - after: &Option, - before: &Option, -) -> (String, Vec) { - let mut conditions = Vec::new(); - let mut params = Vec::new(); +#[cfg(test)] +mod tests { + use rusqlite::params; - if let Some(id) = pkg_id { - params.push(id.clone()); - conditions.push(format!("pkg_id = ?{}", params.len())); - } - if let Some(v) = version { - params.push(v.clone()); - conditions.push(format!("version = ?{}", params.len())); - } - if let Some(a) = after { - params.push(a.clone()); - conditions.push(format!("created_at >= ?{}", params.len())); + use super::*; + + fn db() -> rusqlite::Connection { + let conn = rusqlite::Connection::open_in_memory().unwrap(); + conn.execute_batch( + "CREATE TABLE package_install (id INTEGER PRIMARY KEY, created_at TEXT NOT NULL, pkg_id TEXT NOT NULL, version TEXT NOT NULL);", + ) + .unwrap(); + for (at, id) in [ + ("2026-11-02T23:59:59.999999999+00:00", "nextcloud"), + ("2026-11-03T00:00:00+00:00", "nextcloud"), + ("2026-11-08T23:59:59+00:00", "gitea"), + ("2026-11-09T12:00:00+00:00", "gitea"), + ("2026-12-01T00:00:00+00:00", "nextcloud"), + ] { + conn.execute( + "INSERT INTO package_install (created_at, pkg_id, version) VALUES (?1, ?2, '1.0:0')", + params![at, id], + ) + .unwrap(); + } + conn } - if let Some(b) = before { - params.push(b.clone()); - conditions.push(format!("created_at < ?{}", params.len())); + + fn periods(interval: MetricsInterval, filter: &Filter) -> Vec<(String, u64)> { + series(&db(), "package_install", filter, Some(interval)) + .unwrap() + .into_iter() + .map(|p| (p.period, p.count)) + .collect() } - let clause = if conditions.is_empty() { - String::new() - } else { - format!(" WHERE {}", conditions.join(" AND ")) - }; + #[test] + fn series_buckets_by_utc_day_monday_week_and_month() { + let all = Filter::default(); + let p = |s: &str, n| (s.to_owned(), n); + assert_eq!( + periods(MetricsInterval::Day, &all), + [ + p("2026-11-02", 1), + p("2026-11-03", 1), + p("2026-11-08", 1), + p("2026-11-09", 1), + p("2026-12-01", 1), + ] + ); + assert_eq!( + periods(MetricsInterval::Week, &all), + [p("2026-11-02", 3), p("2026-11-09", 1), p("2026-11-30", 1)] + ); + assert_eq!( + periods(MetricsInterval::Month, &all), + [p("2026-11", 4), p("2026-12", 1)] + ); + } - (clause, params) + #[test] + fn filters_combine_range_and_package() { + let filter = Filter::range(&Some("2026-11-03T00:00:00+00:00".into()), &None) + .with("pkg_id =", &Some("nextcloud".into())); + assert_eq!( + count(&db(), "SELECT COUNT(*) FROM package_install", &filter).unwrap(), + 2 + ); + assert!( + series(&db(), "package_install", &filter, None) + .unwrap() + .is_empty() + ); + } } diff --git a/shared-libs/crates/start-core/src/registry/package/mod.rs b/shared-libs/crates/start-core/src/registry/package/mod.rs index e952c0a742..87da319876 100644 --- a/shared-libs/crates/start-core/src/registry/package/mod.rs +++ b/shared-libs/crates/start-core/src/registry/package/mod.rs @@ -114,6 +114,13 @@ pub fn package_api() -> ParentHandler { "access", access::access_api::().with_about("about.commands-package-access"), ) + .subcommand( + "record-install", + from_fn_async(crate::registry::metrics::record_install) + .with_metadata("authenticated", Value::Bool(false)) + .with_metadata(crate::mcp::MCP, Value::Bool(false)) + .no_cli(), + ) .subcommand( "get", from_fn_async(get::get_package) From 9a21fd1303ba462331bfe136744bea1b33f65df2 Mon Sep 17 00:00:00 2001 From: helix-red <355572797+helix-red@users.noreply.github.com> Date: Sat, 21 Nov 2026 01:02:15 +0000 Subject: [PATCH 2/8] fix(registry): return unit from the metrics table printers print_table yields io::Result; the three helpers returned it directly where Result<(), Error> was declared, so start-core did not compile. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 --- shared-libs/crates/start-core/src/registry/metrics.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/shared-libs/crates/start-core/src/registry/metrics.rs b/shared-libs/crates/start-core/src/registry/metrics.rs index b117ac45b0..c01ed1fcd2 100644 --- a/shared-libs/crates/start-core/src/registry/metrics.rs +++ b/shared-libs/crates/start-core/src/registry/metrics.rs @@ -309,7 +309,8 @@ fn print_counts(heading: &str, entries: &[CountEntry]) -> Result<(), Error> { for entry in entries { table.add_row(row![&entry.label, entry.count]); } - print_table(&table) + print_table(&table)?; + Ok(()) } fn print_package_versions(entries: &[PackageVersionCount]) -> Result<(), Error> { @@ -324,7 +325,8 @@ fn print_package_versions(entries: &[PackageVersionCount]) -> Result<(), Error> for entry in entries { table.add_row(row![&entry.pkg_id, &entry.version, entry.count]); } - print_table(&table) + print_table(&table)?; + Ok(()) } fn print_series(series: &[PeriodCount]) -> Result<(), Error> { @@ -339,7 +341,8 @@ fn print_series(series: &[PeriodCount]) -> Result<(), Error> { for point in series { table.add_row(row![&point.period, point.count]); } - print_table(&table) + print_table(&table)?; + Ok(()) } // --- summary --- From 750521ab980780462229f52821482f619edca8f6 Mon Sep 17 00:00:00 2001 From: helix-red <355572797+helix-red@users.noreply.github.com> Date: Sat, 21 Nov 2026 01:02:15 +0000 Subject: [PATCH 3/8] chore(registry): regenerate TS bindings, MCP catalog and man pages for install metrics Helix-Harness: claude-code Helix-Model: claude-opus-5-5 --- .../start-cli-registry-metrics-downloads.1 | 21 +- .../man/start-cli-registry-metrics-installs.1 | 43 ++ ...start-cli-registry-metrics-subscriptions.1 | 37 ++ .../man/start-cli-registry-metrics-users.1 | 17 +- .../man/start-cli-registry-metrics.1 | 8 +- .../man/start-registry-metrics-downloads.1 | 21 +- .../man/start-registry-metrics-installs.1 | 43 ++ .../start-registry-metrics-subscriptions.1 | 37 ++ .../man/start-registry-metrics-users.1 | 17 +- .../man/start-registry-metrics.1 | 8 +- shared-libs/crates/start-core/mcp-tools.json | 410 ++++++++++++++++++ .../lib/osBindings/rpc/registry.schemas.ts | 328 +++++++++----- .../start-core/lib/osBindings/rpc/registry.ts | 16 +- .../lib/osBindings/rpc/start-os.schemas.ts | 337 +++++++++----- .../start-core/lib/osBindings/rpc/start-os.ts | 16 +- .../lib/osBindings/types.schemas.ts | 288 +++++++----- .../start-core/lib/osBindings/types.ts | 30 +- 17 files changed, 1364 insertions(+), 313 deletions(-) create mode 100644 projects/start-cli/man/start-cli-registry-metrics-installs.1 create mode 100644 projects/start-cli/man/start-cli-registry-metrics-subscriptions.1 create mode 100644 projects/start-registry/man/start-registry-metrics-installs.1 create mode 100644 projects/start-registry/man/start-registry-metrics-subscriptions.1 diff --git a/projects/start-cli/man/start-cli-registry-metrics-downloads.1 b/projects/start-cli/man/start-cli-registry-metrics-downloads.1 index 6088831904..62addfb750 100644 --- a/projects/start-cli/man/start-cli-registry-metrics-downloads.1 +++ b/projects/start-cli/man/start-cli-registry-metrics-downloads.1 @@ -2,11 +2,11 @@ .el .ds Aq ' .TH start-cli-registry-metrics-downloads 1 "downloads " .SH NAME -start\-cli\-registry\-metrics\-downloads \- Count package download requests with optional filters +start\-cli\-registry\-metrics\-downloads \- Count requests for a specific package version that reached the registry, with optional filters .SH SYNOPSIS -\fBstart\-cli registry metrics downloads\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-cli registry metrics downloads\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION -Count package download requests with optional filters +Count requests for a specific package version that reached the registry, with optional filters .SH OPTIONS .TP \fB\-\-pkg\-id\fR \fI\fR @@ -21,6 +21,21 @@ Start of time range (RFC 3339 timestamp) \fB\-\-before\fR \fI\fR End of time range (RFC 3339 timestamp) .TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP \fB\-\-format\fR .TP diff --git a/projects/start-cli/man/start-cli-registry-metrics-installs.1 b/projects/start-cli/man/start-cli-registry-metrics-installs.1 new file mode 100644 index 0000000000..963bc17942 --- /dev/null +++ b/projects/start-cli/man/start-cli-registry-metrics-installs.1 @@ -0,0 +1,43 @@ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.TH start-cli-registry-metrics-installs 1 "installs " +.SH NAME +start\-cli\-registry\-metrics\-installs \- Count package installs and updates reported by StartOS, with optional filters +.SH SYNOPSIS +\fBstart\-cli registry metrics installs\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +.SH DESCRIPTION +Count package installs and updates reported by StartOS, with optional filters +.SH OPTIONS +.TP +\fB\-\-pkg\-id\fR \fI\fR +Filter by package ID +.TP +\fB\-\-version\fR \fI\fR +Filter by version +.TP +\fB\-\-after\fR \fI\fR +Start of time range (RFC 3339 timestamp) +.TP +\fB\-\-before\fR \fI\fR +End of time range (RFC 3339 timestamp) +.TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP +\fB\-\-format\fR + +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/projects/start-cli/man/start-cli-registry-metrics-subscriptions.1 b/projects/start-cli/man/start-cli-registry-metrics-subscriptions.1 new file mode 100644 index 0000000000..e369571234 --- /dev/null +++ b/projects/start-cli/man/start-cli-registry-metrics-subscriptions.1 @@ -0,0 +1,37 @@ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.TH start-cli-registry-metrics-subscriptions 1 "subscriptions " +.SH NAME +start\-cli\-registry\-metrics\-subscriptions \- Count package index subscriptions by StartOS version within a time range +.SH SYNOPSIS +\fBstart\-cli registry metrics subscriptions\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +.SH DESCRIPTION +Count package index subscriptions by StartOS version within a time range +.SH OPTIONS +.TP +\fB\-\-after\fR \fI\fR +Start of time range (RFC 3339 timestamp) +.TP +\fB\-\-before\fR \fI\fR +End of time range (RFC 3339 timestamp) +.TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP +\fB\-\-format\fR + +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/projects/start-cli/man/start-cli-registry-metrics-users.1 b/projects/start-cli/man/start-cli-registry-metrics-users.1 index 2c8211549b..0a03510020 100644 --- a/projects/start-cli/man/start-cli-registry-metrics-users.1 +++ b/projects/start-cli/man/start-cli-registry-metrics-users.1 @@ -4,7 +4,7 @@ .SH NAME start\-cli\-registry\-metrics\-users \- Count unique active users within a time range .SH SYNOPSIS -\fBstart\-cli registry metrics users\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-cli registry metrics users\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Count unique active users within a time range .SH OPTIONS @@ -15,6 +15,21 @@ Start of time range (RFC 3339 timestamp) \fB\-\-before\fR \fI\fR End of time range (RFC 3339 timestamp) .TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP \fB\-\-format\fR .TP diff --git a/projects/start-cli/man/start-cli-registry-metrics.1 b/projects/start-cli/man/start-cli-registry-metrics.1 index 41640417e8..32b54fe03c 100644 --- a/projects/start-cli/man/start-cli-registry-metrics.1 +++ b/projects/start-cli/man/start-cli-registry-metrics.1 @@ -14,7 +14,13 @@ Print help .SH SUBCOMMANDS .TP start\-cli\-registry\-metrics\-downloads(1) -Count package download requests with optional filters +Count requests for a specific package version that reached the registry, with optional filters +.TP +start\-cli\-registry\-metrics\-installs(1) +Count package installs and updates reported by StartOS, with optional filters +.TP +start\-cli\-registry\-metrics\-subscriptions(1) +Count package index subscriptions by StartOS version within a time range .TP start\-cli\-registry\-metrics\-summary(1) Get a summary of registry usage metrics diff --git a/projects/start-registry/man/start-registry-metrics-downloads.1 b/projects/start-registry/man/start-registry-metrics-downloads.1 index 4349530306..59aefe7d66 100644 --- a/projects/start-registry/man/start-registry-metrics-downloads.1 +++ b/projects/start-registry/man/start-registry-metrics-downloads.1 @@ -2,11 +2,11 @@ .el .ds Aq ' .TH start-registry-metrics-downloads 1 "downloads " .SH NAME -start\-registry\-metrics\-downloads \- Count package download requests with optional filters +start\-registry\-metrics\-downloads \- Count requests for a specific package version that reached the registry, with optional filters .SH SYNOPSIS -\fBstart\-registry metrics downloads\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry metrics downloads\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION -Count package download requests with optional filters +Count requests for a specific package version that reached the registry, with optional filters .SH OPTIONS .TP \fB\-\-pkg\-id\fR \fI\fR @@ -21,6 +21,21 @@ Start of time range (RFC 3339 timestamp) \fB\-\-before\fR \fI\fR End of time range (RFC 3339 timestamp) .TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP \fB\-\-format\fR .TP diff --git a/projects/start-registry/man/start-registry-metrics-installs.1 b/projects/start-registry/man/start-registry-metrics-installs.1 new file mode 100644 index 0000000000..c555482dd0 --- /dev/null +++ b/projects/start-registry/man/start-registry-metrics-installs.1 @@ -0,0 +1,43 @@ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.TH start-registry-metrics-installs 1 "installs " +.SH NAME +start\-registry\-metrics\-installs \- Count package installs and updates reported by StartOS, with optional filters +.SH SYNOPSIS +\fBstart\-registry metrics installs\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +.SH DESCRIPTION +Count package installs and updates reported by StartOS, with optional filters +.SH OPTIONS +.TP +\fB\-\-pkg\-id\fR \fI\fR +Filter by package ID +.TP +\fB\-\-version\fR \fI\fR +Filter by version +.TP +\fB\-\-after\fR \fI\fR +Start of time range (RFC 3339 timestamp) +.TP +\fB\-\-before\fR \fI\fR +End of time range (RFC 3339 timestamp) +.TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP +\fB\-\-format\fR + +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/projects/start-registry/man/start-registry-metrics-subscriptions.1 b/projects/start-registry/man/start-registry-metrics-subscriptions.1 new file mode 100644 index 0000000000..e097d9516c --- /dev/null +++ b/projects/start-registry/man/start-registry-metrics-subscriptions.1 @@ -0,0 +1,37 @@ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.TH start-registry-metrics-subscriptions 1 "subscriptions " +.SH NAME +start\-registry\-metrics\-subscriptions \- Count package index subscriptions by StartOS version within a time range +.SH SYNOPSIS +\fBstart\-registry metrics subscriptions\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +.SH DESCRIPTION +Count package index subscriptions by StartOS version within a time range +.SH OPTIONS +.TP +\fB\-\-after\fR \fI\fR +Start of time range (RFC 3339 timestamp) +.TP +\fB\-\-before\fR \fI\fR +End of time range (RFC 3339 timestamp) +.TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP +\fB\-\-format\fR + +.TP +\fB\-h\fR, \fB\-\-help\fR +Print help diff --git a/projects/start-registry/man/start-registry-metrics-users.1 b/projects/start-registry/man/start-registry-metrics-users.1 index bd10cc7938..89a546b622 100644 --- a/projects/start-registry/man/start-registry-metrics-users.1 +++ b/projects/start-registry/man/start-registry-metrics-users.1 @@ -4,7 +4,7 @@ .SH NAME start\-registry\-metrics\-users \- Count unique active users within a time range .SH SYNOPSIS -\fBstart\-registry metrics users\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry metrics users\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Count unique active users within a time range .SH OPTIONS @@ -15,6 +15,21 @@ Start of time range (RFC 3339 timestamp) \fB\-\-before\fR \fI\fR End of time range (RFC 3339 timestamp) .TP +\fB\-\-interval\fR \fI\fR +Also count each day, week (from Monday) or month in the range, in UTC +.br + +.br +\fIPossible values:\fR +.RS 14 +.IP \(bu 2 +day +.IP \(bu 2 +week +.IP \(bu 2 +month +.RE +.TP \fB\-\-format\fR .TP diff --git a/projects/start-registry/man/start-registry-metrics.1 b/projects/start-registry/man/start-registry-metrics.1 index 6b31f09ca3..57a97e85cf 100644 --- a/projects/start-registry/man/start-registry-metrics.1 +++ b/projects/start-registry/man/start-registry-metrics.1 @@ -14,7 +14,13 @@ Print help .SH SUBCOMMANDS .TP start\-registry\-metrics\-downloads(1) -Count package download requests with optional filters +Count requests for a specific package version that reached the registry, with optional filters +.TP +start\-registry\-metrics\-installs(1) +Count package installs and updates reported by StartOS, with optional filters +.TP +start\-registry\-metrics\-subscriptions(1) +Count package index subscriptions by StartOS version within a time range .TP start\-registry\-metrics\-summary(1) Get a summary of registry usage metrics diff --git a/shared-libs/crates/start-core/mcp-tools.json b/shared-libs/crates/start-core/mcp-tools.json index 1a8afd16ab..fa6d17c1df 100644 --- a/shared-libs/crates/start-core/mcp-tools.json +++ b/shared-libs/crates/start-core/mcp-tools.json @@ -7537,9 +7537,20 @@ "before": { "description": "End of time range (RFC 3339)", "type": ["string", "null"] + }, + "interval": { + "description": "Also report each period in the range", + "anyOf": [ + { "$ref": "#/$defs/MetricsInterval" }, + { "type": "null" } + ] } }, "additionalProperties": true + }, + "MetricsInterval": { + "type": "string", + "enum": ["day", "week", "month"] } }, "type": "object" @@ -7562,6 +7573,10 @@ "byPackageVersion": { "type": "array", "items": { "$ref": "#/$defs/PackageVersionCount" } + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodCount" } } }, "required": ["totalRequests", "byPackage", "byPackageVersion"], @@ -7593,6 +7608,19 @@ }, "required": ["pkgId", "version", "count"], "additionalProperties": true + }, + "PeriodCount": { + "type": "object", + "properties": { + "period": { "type": "string" }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["period", "count"], + "additionalProperties": true } }, "type": "object", @@ -7609,12 +7637,302 @@ "byPackageVersion": { "type": "array", "items": { "$ref": "#/$defs/PackageVersionCount" } + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodCount" } } }, "required": ["totalRequests", "byPackage", "byPackageVersion"], "additionalProperties": true } }, + { + "name": "registry.metrics.installs", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "allOf": [ + { "type": "object", "properties": {}, "additionalProperties": true }, + { "$ref": "#/$defs/RegistryUrlParams" }, + { + "type": "object", + "properties": { + "format": { + "anyOf": [{ "$ref": "#/$defs/IoFormat" }, { "type": "null" }] + } + }, + "additionalProperties": true + }, + { "type": "object", "properties": {}, "additionalProperties": true }, + { "$ref": "#/$defs/GetDownloadsParams" } + ], + "$defs": { + "RegistryUrlParams": { + "type": "object", + "properties": { "registry": { "type": "string" } }, + "required": ["registry"], + "additionalProperties": true + }, + "IoFormat": { + "type": "string", + "enum": ["json", "json-pretty", "yaml", "cbor", "toml", "toml-pretty"] + }, + "GetDownloadsParams": { + "type": "object", + "properties": { + "pkgId": { + "description": "Filter by package ID", + "type": ["string", "null"] + }, + "version": { + "description": "Filter by version", + "type": ["string", "null"] + }, + "after": { + "description": "Start of time range (RFC 3339)", + "type": ["string", "null"] + }, + "before": { + "description": "End of time range (RFC 3339)", + "type": ["string", "null"] + }, + "interval": { + "description": "Also report each period in the range", + "anyOf": [ + { "$ref": "#/$defs/MetricsInterval" }, + { "type": "null" } + ] + } + }, + "additionalProperties": true + }, + "MetricsInterval": { + "type": "string", + "enum": ["day", "week", "month"] + } + }, + "type": "object" + }, + "outputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "InstallsResponse": { + "type": "object", + "properties": { + "totalInstalls": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "byPackage": { + "type": "array", + "items": { "$ref": "#/$defs/CountEntry" } + }, + "byPackageVersion": { + "type": "array", + "items": { "$ref": "#/$defs/PackageVersionCount" } + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodCount" } + } + }, + "required": ["totalInstalls", "byPackage", "byPackageVersion"], + "additionalProperties": true + }, + "CountEntry": { + "type": "object", + "properties": { + "label": { "type": "string" }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["label", "count"], + "additionalProperties": true + }, + "PackageVersionCount": { + "type": "object", + "properties": { + "pkgId": { "type": "string" }, + "version": { "type": "string" }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["pkgId", "version", "count"], + "additionalProperties": true + }, + "PeriodCount": { + "type": "object", + "properties": { + "period": { "type": "string" }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["period", "count"], + "additionalProperties": true + } + }, + "type": "object", + "properties": { + "totalInstalls": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "byPackage": { + "type": "array", + "items": { "$ref": "#/$defs/CountEntry" } + }, + "byPackageVersion": { + "type": "array", + "items": { "$ref": "#/$defs/PackageVersionCount" } + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodCount" } + } + }, + "required": ["totalInstalls", "byPackage", "byPackageVersion"], + "additionalProperties": true + } + }, + { + "name": "registry.metrics.subscriptions", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "allOf": [ + { "type": "object", "properties": {}, "additionalProperties": true }, + { "$ref": "#/$defs/RegistryUrlParams" }, + { + "type": "object", + "properties": { + "format": { + "anyOf": [{ "$ref": "#/$defs/IoFormat" }, { "type": "null" }] + } + }, + "additionalProperties": true + }, + { "type": "object", "properties": {}, "additionalProperties": true }, + { "$ref": "#/$defs/GetUsersParams" } + ], + "$defs": { + "RegistryUrlParams": { + "type": "object", + "properties": { "registry": { "type": "string" } }, + "required": ["registry"], + "additionalProperties": true + }, + "IoFormat": { + "type": "string", + "enum": ["json", "json-pretty", "yaml", "cbor", "toml", "toml-pretty"] + }, + "GetUsersParams": { + "type": "object", + "properties": { + "after": { + "description": "Start of time range (RFC 3339)", + "type": ["string", "null"] + }, + "before": { + "description": "End of time range (RFC 3339)", + "type": ["string", "null"] + }, + "interval": { + "description": "Also report each period in the range", + "anyOf": [ + { "$ref": "#/$defs/MetricsInterval" }, + { "type": "null" } + ] + } + }, + "additionalProperties": true + }, + "MetricsInterval": { + "type": "string", + "enum": ["day", "week", "month"] + } + }, + "type": "object" + }, + "outputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$defs": { + "SubscriptionsResponse": { + "type": "object", + "properties": { + "totalSubscriptions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "byOsVersion": { + "type": "array", + "items": { "$ref": "#/$defs/CountEntry" } + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodCount" } + } + }, + "required": ["totalSubscriptions", "byOsVersion"], + "additionalProperties": true + }, + "CountEntry": { + "type": "object", + "properties": { + "label": { "type": "string" }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["label", "count"], + "additionalProperties": true + }, + "PeriodCount": { + "type": "object", + "properties": { + "period": { "type": "string" }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["period", "count"], + "additionalProperties": true + } + }, + "type": "object", + "properties": { + "totalSubscriptions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "byOsVersion": { + "type": "array", + "items": { "$ref": "#/$defs/CountEntry" } + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodCount" } + } + }, + "required": ["totalSubscriptions", "byOsVersion"], + "additionalProperties": true + } + }, { "name": "registry.metrics.summary", "inputSchema": { @@ -7669,6 +7987,16 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "totalInstalls": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalSubscriptions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "byArch": { "type": "array", "items": { "$ref": "#/$defs/CountEntry" } @@ -7682,6 +8010,8 @@ "totalCheckins", "uniqueServers", "totalPackageRequests", + "totalInstalls", + "totalSubscriptions", "byArch", "byOsVersion" ], @@ -7718,6 +8048,16 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "totalInstalls": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalSubscriptions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "byArch": { "type": "array", "items": { "$ref": "#/$defs/CountEntry" } @@ -7731,6 +8071,8 @@ "totalCheckins", "uniqueServers", "totalPackageRequests", + "totalInstalls", + "totalSubscriptions", "byArch", "byOsVersion" ], @@ -7777,9 +8119,20 @@ "before": { "description": "End of time range (RFC 3339)", "type": ["string", "null"] + }, + "interval": { + "description": "Also report each period in the range", + "anyOf": [ + { "$ref": "#/$defs/MetricsInterval" }, + { "type": "null" } + ] } }, "additionalProperties": true + }, + "MetricsInterval": { + "type": "string", + "enum": ["day", "week", "month"] } }, "type": "object" @@ -7799,10 +8152,32 @@ "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodUsers" } } }, "required": ["uniqueServers", "totalCheckins"], "additionalProperties": true + }, + "PeriodUsers": { + "type": "object", + "properties": { + "period": { "type": "string" }, + "uniqueServers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "checkins": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": ["period", "uniqueServers", "checkins"], + "additionalProperties": true } }, "type": "object", @@ -7816,6 +8191,10 @@ "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + }, + "series": { + "type": "array", + "items": { "$ref": "#/$defs/PeriodUsers" } } }, "required": ["uniqueServers", "totalCheckins"], @@ -10032,6 +10411,37 @@ "additionalProperties": true } }, + { + "name": "registry.package.record-install", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "allOf": [ + { "type": "object", "properties": {}, "additionalProperties": true }, + { "$ref": "#/$defs/RegistryUrlParams" }, + { "$ref": "#/$defs/RecordInstallParams" } + ], + "$defs": { + "RegistryUrlParams": { + "type": "object", + "properties": { "registry": { "type": "string" } }, + "required": ["registry"], + "additionalProperties": true + }, + "RecordInstallParams": { + "type": "object", + "properties": { + "id": { "$ref": "#/$defs/PackageId" }, + "version": { "$ref": "#/$defs/Version" } + }, + "required": ["id", "version"], + "additionalProperties": true + }, + "PackageId": { "type": "string" }, + "Version": { "type": "string" } + }, + "type": "object" + } + }, { "name": "registry.package.remove", "inputSchema": { diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts index 449334f180..1c3544056a 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts @@ -175,63 +175,6 @@ export const DumpParams: z.ZodObject<{ }).meta({ id: 'DumpParams', }) -export const GetDownloadsParams: z.ZodObject<{ - /** - * Filter by package ID - */ - pkgId: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * Filter by version - */ - version: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * Start of time range (RFC 3339) - */ - after: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * End of time range (RFC 3339) - */ - before: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > -}> = /* @__PURE__ */ object({ - /** - * Filter by package ID - */ - pkgId: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Filter by package ID', - }), - /** - * Filter by version - */ - version: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Filter by version', - }), - /** - * Start of time range (RFC 3339) - */ - after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Start of time range (RFC 3339)', - }), - /** - * End of time range (RFC 3339) - */ - before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'End of time range (RFC 3339)', - }), -}).meta({ - id: 'GetDownloadsParams', -}) export const GetOsAssetParams: z.ZodObject<{ version: z.ZodString platform: z.ZodString @@ -265,37 +208,6 @@ export const GetOsVersionParams: z.ZodObject<{ }).meta({ id: 'GetOsVersionParams', }) -export const GetUsersParams: z.ZodObject<{ - /** - * Start of time range (RFC 3339) - */ - after: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * End of time range (RFC 3339) - */ - before: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > -}> = /* @__PURE__ */ object({ - /** - * Start of time range (RFC 3339) - */ - after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Start of time range (RFC 3339)', - }), - /** - * End of time range (RFC 3339) - */ - before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'End of time range (RFC 3339)', - }), -}).meta({ - id: 'GetUsersParams', -}) export const GitHash: typeof literal_0 = /* @__PURE__ */ literal_0.meta({ id: 'GitHash', }) @@ -422,6 +334,13 @@ export const MerkleArchiveCommitment: z.ZodIntersection< .meta({ id: 'MerkleArchiveCommitment', }) +export const MetricsInterval: z.ZodEnum<{ + day: 'day' + week: 'week' + month: 'month' +}> = /* @__PURE__ */ z.enum(['day', 'week', 'month']).meta({ + id: 'MetricsInterval', +}) /** * JSON Patch 'move' operation representation @@ -479,6 +398,23 @@ export const PackageVersionCount: z.ZodObject<{ }).meta({ id: 'PackageVersionCount', }) +export const PeriodCount: z.ZodObject<{ + period: z.ZodString + count: z.ZodInt +}> = /* @__PURE__ */ object({ period: z.string(), count: z.int() }).meta({ + id: 'PeriodCount', +}) +export const PeriodUsers: z.ZodObject<{ + period: z.ZodString + uniqueServers: z.ZodInt + checkins: z.ZodInt +}> = /* @__PURE__ */ object({ + period: z.string(), + uniqueServers: z.int(), + checkins: z.int(), +}).meta({ + id: 'PeriodUsers', +}) export const PluginId: z.ZodEnum<{ 'url-v0': 'url-v0' }> = /* @__PURE__ */ z .enum(['url-v0']) .meta({ @@ -620,15 +556,6 @@ export const TestOperation: z.ZodObject<{ id: 'TestOperation', description: "JSON Patch 'test' operation representation", }) -export const UsersResponse: z.ZodObject<{ - uniqueServers: z.ZodInt - totalCheckins: z.ZodInt -}> = /* @__PURE__ */ object({ - uniqueServers: z.int(), - totalCheckins: z.int(), -}).meta({ - id: 'UsersResponse', -}) export const Version: typeof literal_0 = /* @__PURE__ */ literal_0.meta({ id: 'Version', }) @@ -846,10 +773,12 @@ export const DownloadsResponse: z.ZodObject<{ totalRequests: z.ZodInt byPackage: z.ZodArray byPackageVersion: z.ZodArray + series: z.ZodOptional> }> = /* @__PURE__ */ object({ totalRequests: z.int(), byPackage: z.array(CountEntry), byPackageVersion: z.array(PackageVersionCount), + series: z.array(PeriodCount).optional(), }).meta({ id: 'DownloadsResponse', }) @@ -931,6 +860,79 @@ export const EditVersionParams: z.ZodObject<{ description: 'Edits an existing release; omitted fields, assets and authorized signers remain unchanged.', }) +export const GetDownloadsParams: z.ZodObject<{ + /** + * Filter by package ID + */ + pkgId: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Filter by version + */ + version: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Start of time range (RFC 3339) + */ + after: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * End of time range (RFC 3339) + */ + before: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Also report each period in the range + */ + interval: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > +}> = /* @__PURE__ */ object({ + /** + * Filter by package ID + */ + pkgId: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Filter by package ID', + }), + /** + * Filter by version + */ + version: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Filter by version', + }), + /** + * Start of time range (RFC 3339) + */ + after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Start of time range (RFC 3339)', + }), + /** + * End of time range (RFC 3339) + */ + before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'End of time range (RFC 3339)', + }), + /** + * Also report each period in the range + */ + interval: wire( + MetricsInterval.nullable().optional(), + MetricsInterval.nullable(), + ).meta({ + description: 'Also report each period in the range', + }), +}).meta({ + id: 'GetDownloadsParams', +}) export const GetPackageAccessParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'GetPackageAccessParams', @@ -976,6 +978,53 @@ export const GetPackageParams: z.ZodIntersection< .meta({ id: 'GetPackageParams', }) +export const GetUsersParams: z.ZodObject<{ + /** + * Start of time range (RFC 3339) + */ + after: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * End of time range (RFC 3339) + */ + before: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Also report each period in the range + */ + interval: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > +}> = /* @__PURE__ */ object({ + /** + * Start of time range (RFC 3339) + */ + after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Start of time range (RFC 3339)', + }), + /** + * End of time range (RFC 3339) + */ + before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'End of time range (RFC 3339)', + }), + /** + * Also report each period in the range + */ + interval: wire( + MetricsInterval.nullable().optional(), + MetricsInterval.nullable(), + ).meta({ + description: 'Also report each period in the range', + }), +}).meta({ + id: 'GetUsersParams', +}) export const HardwareRequirements: z.ZodObject<{ device: z.ZodCodec< z.ZodOptional>, @@ -999,6 +1048,19 @@ export const HardwareRequirements: z.ZodObject<{ }).meta({ id: 'HardwareRequirements', }) +export const InstallsResponse: z.ZodObject<{ + totalInstalls: z.ZodInt + byPackage: z.ZodArray + byPackageVersion: z.ZodArray + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + totalInstalls: z.int(), + byPackage: z.array(CountEntry), + byPackageVersion: z.array(PackageVersionCount), + series: z.array(PeriodCount).optional(), +}).meta({ + id: 'InstallsResponse', +}) export const ListPackageSignersParams: z.ZodIntersection< z.ZodObject<{ id: typeof PackageId }>, typeof ReaderParams @@ -1011,12 +1073,16 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.ZodInt uniqueServers: z.ZodInt totalPackageRequests: z.ZodInt + totalInstalls: z.ZodInt + totalSubscriptions: z.ZodInt byArch: z.ZodArray byOsVersion: z.ZodArray }> = /* @__PURE__ */ object({ totalCheckins: z.int(), uniqueServers: z.int(), totalPackageRequests: z.int(), + totalInstalls: z.int(), + totalSubscriptions: z.int(), byArch: z.array(CountEntry), byOsVersion: z.array(CountEntry), }).meta({ @@ -1268,6 +1334,12 @@ export const PreDownloadAlert: z.ZodObject<{ }).meta({ id: 'PreDownloadAlert', }) +export const RecordInstallParams: z.ZodObject<{ + id: typeof PackageId + version: typeof Version +}> = /* @__PURE__ */ object({ id: PackageId, version: Version }).meta({ + id: 'RecordInstallParams', +}) export const RemoveAdminParams: z.ZodObject<{ signer: typeof Guid }> = /* @__PURE__ */ object({ signer: Guid }).meta({ id: 'RemoveAdminParams', @@ -1440,6 +1512,28 @@ export const SubscribeRes: z.ZodObject<{ }> = /* @__PURE__ */ object({ dump: Dump, guid: Guid }).meta({ id: 'SubscribeRes', }) +export const SubscriptionsResponse: z.ZodObject<{ + totalSubscriptions: z.ZodInt + byOsVersion: z.ZodArray + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + totalSubscriptions: z.int(), + byOsVersion: z.array(CountEntry), + series: z.array(PeriodCount).optional(), +}).meta({ + id: 'SubscriptionsResponse', +}) +export const UsersResponse: z.ZodObject<{ + uniqueServers: z.ZodInt + totalCheckins: z.ZodInt + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + uniqueServers: z.int(), + totalCheckins: z.int(), + series: z.array(PeriodUsers).optional(), +}).meta({ + id: 'UsersResponse', +}) export const VersionSignerParams: z.ZodObject<{ version: z.ZodString signer: typeof Guid @@ -2086,6 +2180,40 @@ export const Api = { _ITEM: /* @__PURE__ */ z.never(), _FINAL: /* @__PURE__ */ z.null(), }, + installs: { + _PARAMS: /* @__PURE__ */ z.intersection( + z.intersection( + object({ + format: wire( + IoFormat.nullable().optional(), + IoFormat.nullable(), + ), + }), + empty, + ), + GetDownloadsParams, + ), + _RETURN: /* @__PURE__ */ InstallsResponse, + _ITEM: /* @__PURE__ */ z.never(), + _FINAL: /* @__PURE__ */ z.null(), + }, + subscriptions: { + _PARAMS: /* @__PURE__ */ z.intersection( + z.intersection( + object({ + format: wire( + IoFormat.nullable().optional(), + IoFormat.nullable(), + ), + }), + empty, + ), + GetUsersParams, + ), + _RETURN: /* @__PURE__ */ SubscriptionsResponse, + _ITEM: /* @__PURE__ */ z.never(), + _FINAL: /* @__PURE__ */ z.null(), + }, summary: { _PARAMS: /* @__PURE__ */ z.intersection( z.intersection( @@ -2450,6 +2578,12 @@ export const Api = { _ITEM: /* @__PURE__ */ z.never(), _FINAL: /* @__PURE__ */ z.null(), }, + 'record-install': { + _PARAMS: /* @__PURE__ */ RecordInstallParams, + _RETURN: /* @__PURE__ */ z.null(), + _ITEM: /* @__PURE__ */ z.never(), + _FINAL: /* @__PURE__ */ z.null(), + }, remove: { _PARAMS: /* @__PURE__ */ RemovePackageParams, _RETURN: /* @__PURE__ */ z.boolean(), diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts index 9beb699acf..b3cb0fcecf 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts @@ -128,10 +128,8 @@ export type DataUrlInput = z.input export type DeviceFilter = z.output export type Dump = z.output export type DumpParamsInput = z.input -export type GetDownloadsParamsInput = z.input export type GetOsAssetParamsInput = z.input export type GetOsVersionParamsInput = z.input -export type GetUsersParamsInput = z.input export type GitHash = z.output export type GitHashInput = z.input @@ -159,6 +157,7 @@ export type MerkleArchiveCommitment = z.output< export type MerkleArchiveCommitmentInput = z.input< typeof schemas.MerkleArchiveCommitment > +export type MetricsIntervalInput = z.input /** * JSON Patch 'move' operation representation @@ -167,6 +166,8 @@ export type MoveOperation = z.output export type PackageDetailLevelInput = z.input export type PackageIdInput = z.input export type PackageVersionCount = z.output +export type PeriodCount = z.output +export type PeriodUsers = z.output export type PluginId = z.output export type PreDownloadAlertWhen = z.output export type ReaderParamsInput = z.input @@ -203,7 +204,6 @@ export type SetNameParamsInput = z.input * JSON Patch 'test' operation representation */ export type TestOperation = z.output -export type UsersResponse = z.output export type Version = z.output export type VersionInput = z.input export type AddAdminParamsInput = z.input @@ -234,11 +234,14 @@ export type EditSignerParamsInput = z.input * Edits an existing release; omitted fields, assets and authorized signers remain unchanged. */ export type EditVersionParamsInput = z.input +export type GetDownloadsParamsInput = z.input export type GetPackageAccessParamsInput = z.input< typeof schemas.GetPackageAccessParams > export type GetPackageParamsInput = z.input +export type GetUsersParamsInput = z.input export type HardwareRequirements = z.output +export type InstallsResponse = z.output export type ListPackageSignersParamsInput = z.input< typeof schemas.ListPackageSignersParams > @@ -260,6 +263,9 @@ export type PackageReaderParamsInput = z.input< */ export type PatchOperation = z.output export type PreDownloadAlert = z.output +export type RecordInstallParamsInput = z.input< + typeof schemas.RecordInstallParams +> export type RemoveAdminParamsInput = z.input export type RemoveMirrorParamsInput = z.input export type RemovePackageFromCategoryParamsInput = z.input< @@ -289,6 +295,10 @@ export type SubscribeIndexParamsInput = z.input< typeof schemas.SubscribeIndexParams > export type SubscribeRes = z.output +export type SubscriptionsResponse = z.output< + typeof schemas.SubscriptionsResponse +> +export type UsersResponse = z.output export type VersionSignerParamsInput = z.input< typeof schemas.VersionSignerParams > diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.ts b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.ts index 1ea3df0ff9..6466f7a4fe 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.schemas.ts @@ -519,63 +519,6 @@ export const GenerateCertificateResponse: z.ZodObject<{ }> = /* @__PURE__ */ object({ key: z.string(), fullchain: z.string() }).meta({ id: 'GenerateCertificateResponse', }) -export const GetDownloadsParams: z.ZodObject<{ - /** - * Filter by package ID - */ - pkgId: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * Filter by version - */ - version: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * Start of time range (RFC 3339) - */ - after: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * End of time range (RFC 3339) - */ - before: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > -}> = /* @__PURE__ */ object({ - /** - * Filter by package ID - */ - pkgId: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Filter by package ID', - }), - /** - * Filter by version - */ - version: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Filter by version', - }), - /** - * Start of time range (RFC 3339) - */ - after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Start of time range (RFC 3339)', - }), - /** - * End of time range (RFC 3339) - */ - before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'End of time range (RFC 3339)', - }), -}).meta({ - id: 'GetDownloadsParams', -}) export const GetOsAssetParams: z.ZodObject<{ version: z.ZodString platform: z.ZodString @@ -609,37 +552,6 @@ export const GetOsVersionParams: z.ZodObject<{ }).meta({ id: 'GetOsVersionParams', }) -export const GetUsersParams: z.ZodObject<{ - /** - * Start of time range (RFC 3339) - */ - after: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * End of time range (RFC 3339) - */ - before: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > -}> = /* @__PURE__ */ object({ - /** - * Start of time range (RFC 3339) - */ - after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Start of time range (RFC 3339)', - }), - /** - * End of time range (RFC 3339) - */ - before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'End of time range (RFC 3339)', - }), -}).meta({ - id: 'GetUsersParams', -}) export const GigaBytes: typeof literal_6 = /* @__PURE__ */ literal_6.meta({ id: 'GigaBytes', }) @@ -931,6 +843,13 @@ export const MerkleArchiveCommitment: z.ZodIntersection< export const MetricsFollowParams: typeof empty = /* @__PURE__ */ empty.meta({ id: 'MetricsFollowParams', }) +export const MetricsInterval: z.ZodEnum<{ + day: 'day' + week: 'week' + month: 'month' +}> = /* @__PURE__ */ z.enum(['day', 'week', 'month']).meta({ + id: 'MetricsInterval', +}) export const MiB: z.ZodInt = /* @__PURE__ */ z.int().meta({ id: 'MiB', }) @@ -1173,6 +1092,23 @@ export const PackageVersionCount: z.ZodObject<{ export const Percentage: typeof literal_6 = /* @__PURE__ */ literal_6.meta({ id: 'Percentage', }) +export const PeriodCount: z.ZodObject<{ + period: z.ZodString + count: z.ZodInt +}> = /* @__PURE__ */ object({ period: z.string(), count: z.int() }).meta({ + id: 'PeriodCount', +}) +export const PeriodUsers: z.ZodObject<{ + period: z.ZodString + uniqueServers: z.ZodInt + checkins: z.ZodInt +}> = /* @__PURE__ */ object({ + period: z.string(), + uniqueServers: z.int(), + checkins: z.int(), +}).meta({ + id: 'PeriodUsers', +}) export const PluginId: z.ZodEnum<{ 'url-v0': 'url-v0' }> = /* @__PURE__ */ z .enum(['url-v0']) .meta({ @@ -1745,15 +1681,6 @@ export const UpstreamCertValidation: z.ZodUnion< description: "How the OS reverse proxy validates the container's TLS certificate when it\nrewraps SSL (`add_ssl` set AND `secure.ssl == true`, so the OS terminates\nthe client's TLS and initiates a fresh TLS connection to the container).\nAbsent (`None`) means validate against the StartOS root CA — the default.", }) -export const UsersResponse: z.ZodObject<{ - uniqueServers: z.ZodInt - totalCheckins: z.ZodInt -}> = /* @__PURE__ */ object({ - uniqueServers: z.int(), - totalCheckins: z.int(), -}).meta({ - id: 'UsersResponse', -}) export const Version: typeof literal_0 = /* @__PURE__ */ literal_0.meta({ id: 'Version', }) @@ -2610,10 +2537,12 @@ export const DownloadsResponse: z.ZodObject<{ totalRequests: z.ZodInt byPackage: z.ZodArray byPackageVersion: z.ZodArray + series: z.ZodOptional> }> = /* @__PURE__ */ object({ totalRequests: z.int(), byPackage: z.array(CountEntry), byPackageVersion: z.array(PackageVersionCount), + series: z.array(PeriodCount).optional(), }).meta({ id: 'DownloadsResponse', }) @@ -2900,6 +2829,79 @@ export const GetActionInputParams: z.ZodObject<{ }).meta({ id: 'GetActionInputParams', }) +export const GetDownloadsParams: z.ZodObject<{ + /** + * Filter by package ID + */ + pkgId: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Filter by version + */ + version: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Start of time range (RFC 3339) + */ + after: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * End of time range (RFC 3339) + */ + before: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Also report each period in the range + */ + interval: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > +}> = /* @__PURE__ */ object({ + /** + * Filter by package ID + */ + pkgId: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Filter by package ID', + }), + /** + * Filter by version + */ + version: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Filter by version', + }), + /** + * Start of time range (RFC 3339) + */ + after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Start of time range (RFC 3339)', + }), + /** + * End of time range (RFC 3339) + */ + before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'End of time range (RFC 3339)', + }), + /** + * Also report each period in the range + */ + interval: wire( + MetricsInterval.nullable().optional(), + MetricsInterval.nullable(), + ).meta({ + description: 'Also report each period in the range', + }), +}).meta({ + id: 'GetDownloadsParams', +}) export const GetPackageAccessParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'GetPackageAccessParams', @@ -2945,6 +2947,53 @@ export const GetPackageParams: z.ZodIntersection< .meta({ id: 'GetPackageParams', }) +export const GetUsersParams: z.ZodObject<{ + /** + * Start of time range (RFC 3339) + */ + after: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * End of time range (RFC 3339) + */ + before: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Also report each period in the range + */ + interval: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > +}> = /* @__PURE__ */ object({ + /** + * Start of time range (RFC 3339) + */ + after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Start of time range (RFC 3339)', + }), + /** + * End of time range (RFC 3339) + */ + before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'End of time range (RFC 3339)', + }), + /** + * Also report each period in the range + */ + interval: wire( + MetricsInterval.nullable().optional(), + MetricsInterval.nullable(), + ).meta({ + description: 'Also report each period in the range', + }), +}).meta({ + id: 'GetUsersParams', +}) export const GovernorInfo: z.ZodObject<{ current: z.ZodCodec< z.ZodOptional>, @@ -3084,6 +3133,19 @@ export const InstalledVersionParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'InstalledVersionParams', }) +export const InstallsResponse: z.ZodObject<{ + totalInstalls: z.ZodInt + byPackage: z.ZodArray + byPackageVersion: z.ZodArray + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + totalInstalls: z.int(), + byPackage: z.array(CountEntry), + byPackageVersion: z.array(PackageVersionCount), + series: z.array(PeriodCount).optional(), +}).meta({ + id: 'InstallsResponse', +}) export const IpInfo: z.ZodObject<{ name: z.ZodString scopeId: z.ZodInt @@ -3334,12 +3396,16 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.ZodInt uniqueServers: z.ZodInt totalPackageRequests: z.ZodInt + totalInstalls: z.ZodInt + totalSubscriptions: z.ZodInt byArch: z.ZodArray byOsVersion: z.ZodArray }> = /* @__PURE__ */ object({ totalCheckins: z.int(), uniqueServers: z.int(), totalPackageRequests: z.int(), + totalInstalls: z.int(), + totalSubscriptions: z.int(), byArch: z.array(CountEntry), byOsVersion: z.array(CountEntry), }).meta({ @@ -3868,6 +3934,12 @@ export const RebuildParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'RebuildParams', }) +export const RecordInstallParams: z.ZodObject<{ + id: typeof PackageId + version: typeof Version +}> = /* @__PURE__ */ object({ id: PackageId, version: Version }).meta({ + id: 'RecordInstallParams', +}) export const RegistryIdentity: z.ZodObject<{ name: z.ZodCodec< z.ZodOptional>, @@ -4499,6 +4571,17 @@ export const SubscribeRes: z.ZodObject<{ }> = /* @__PURE__ */ object({ dump: Dump, guid: Guid }).meta({ id: 'SubscribeRes', }) +export const SubscriptionsResponse: z.ZodObject<{ + totalSubscriptions: z.ZodInt + byOsVersion: z.ZodArray + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + totalSubscriptions: z.int(), + byOsVersion: z.array(CountEntry), + series: z.array(PeriodCount).optional(), +}).meta({ + id: 'SubscriptionsResponse', +}) export const TargetParams: z.ZodObject<{ id: typeof BackupTargetId }> = /* @__PURE__ */ object({ id: BackupTargetId }).meta({ id: 'TargetParams', @@ -4640,6 +4723,17 @@ export const UpdateTunnelParams: z.ZodObject<{ }> = /* @__PURE__ */ object({ id: GatewayId, config: z.string() }).meta({ id: 'UpdateTunnelParams', }) +export const UsersResponse: z.ZodObject<{ + uniqueServers: z.ZodInt + totalCheckins: z.ZodInt + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + uniqueServers: z.int(), + totalCheckins: z.int(), + series: z.array(PeriodUsers).optional(), +}).meta({ + id: 'UsersResponse', +}) export const VersionSignerParams: z.ZodObject<{ version: z.ZodString signer: typeof Guid @@ -7960,6 +8054,46 @@ export const Api = { _ITEM: /* @__PURE__ */ z.never(), _FINAL: /* @__PURE__ */ z.null(), }, + installs: { + _PARAMS: /* @__PURE__ */ z.intersection( + z.intersection(empty, RegistryUrlParams), + z.intersection( + z.intersection( + object({ + format: wire( + IoFormat.nullable().optional(), + IoFormat.nullable(), + ), + }), + empty, + ), + GetDownloadsParams, + ), + ), + _RETURN: /* @__PURE__ */ InstallsResponse, + _ITEM: /* @__PURE__ */ z.never(), + _FINAL: /* @__PURE__ */ z.null(), + }, + subscriptions: { + _PARAMS: /* @__PURE__ */ z.intersection( + z.intersection(empty, RegistryUrlParams), + z.intersection( + z.intersection( + object({ + format: wire( + IoFormat.nullable().optional(), + IoFormat.nullable(), + ), + }), + empty, + ), + GetUsersParams, + ), + ), + _RETURN: /* @__PURE__ */ SubscriptionsResponse, + _ITEM: /* @__PURE__ */ z.never(), + _FINAL: /* @__PURE__ */ z.null(), + }, summary: { _PARAMS: /* @__PURE__ */ z.intersection( z.intersection(empty, RegistryUrlParams), @@ -8444,6 +8578,15 @@ export const Api = { _ITEM: /* @__PURE__ */ z.never(), _FINAL: /* @__PURE__ */ z.null(), }, + 'record-install': { + _PARAMS: /* @__PURE__ */ z.intersection( + z.intersection(empty, RegistryUrlParams), + RecordInstallParams, + ), + _RETURN: /* @__PURE__ */ z.null(), + _ITEM: /* @__PURE__ */ z.never(), + _FINAL: /* @__PURE__ */ z.null(), + }, remove: { _PARAMS: /* @__PURE__ */ z.intersection( z.intersection(empty, RegistryUrlParams), diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.ts b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.ts index 4f89447946..01fcd44683 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/start-os.ts @@ -201,10 +201,8 @@ export type GenerateCertificateParamsInput = z.input< export type GenerateCertificateResponse = z.output< typeof schemas.GenerateCertificateResponse > -export type GetDownloadsParamsInput = z.input export type GetOsAssetParamsInput = z.input export type GetOsVersionParamsInput = z.input -export type GetUsersParamsInput = z.input export type GigaBytes = z.output export type GitHash = z.output export type GitHashInput = z.input @@ -271,6 +269,7 @@ export type MerkleArchiveCommitmentInput = z.input< export type MetricsFollowParamsInput = z.input< typeof schemas.MetricsFollowParams > +export type MetricsIntervalInput = z.input export type MiB = z.output export type ModifyNotificationBeforeParamsInput = z.input< typeof schemas.ModifyNotificationBeforeParams @@ -319,6 +318,8 @@ export type PackageId = z.output export type PackageIdInput = z.input export type PackageVersionCount = z.output export type Percentage = z.output +export type PeriodCount = z.output +export type PeriodUsers = z.output export type PluginId = z.output export type PreDownloadAlertWhen = z.output export type ProgressUnits = z.output @@ -457,7 +458,6 @@ export type UpdateTrustedKeyParamsInput = z.input< export type UpstreamCertValidation = z.output< typeof schemas.UpstreamCertValidation > -export type UsersResponse = z.output export type Version = z.output export type VersionInput = z.input export type WifiAddParamsInput = z.input @@ -572,10 +572,12 @@ export type GatewayPortMapCapabilities = z.output< export type GetActionInputParamsInput = z.input< typeof schemas.GetActionInputParams > +export type GetDownloadsParamsInput = z.input export type GetPackageAccessParamsInput = z.input< typeof schemas.GetPackageAccessParams > export type GetPackageParamsInput = z.input +export type GetUsersParamsInput = z.input export type GovernorInfo = z.output export type GovernorParamsInput = z.input export type HardwareRequirements = z.output @@ -586,6 +588,7 @@ export type InitAcmeParamsInput = z.input export type InstalledVersionParamsInput = z.input< typeof schemas.InstalledVersionParams > +export type InstallsResponse = z.output export type IpInfo = z.output export type KillParamsInput = z.input export type LegacyAlpnInfo = z.output @@ -650,6 +653,9 @@ export type PublicDomainConfig = z.output export type PushSubscription = z.output export type PushSubscriptionInput = z.input export type RebuildParamsInput = z.input +export type RecordInstallParamsInput = z.input< + typeof schemas.RecordInstallParams +> export type RegistryIdentity = z.output export type RemoveAcmeParamsInput = z.input export type RemoveAdminParamsInput = z.input @@ -733,6 +739,9 @@ export type SubscribeIndexParamsInput = z.input< > export type SubscribeParamsInput = z.input export type SubscribeRes = z.output +export type SubscriptionsResponse = z.output< + typeof schemas.SubscriptionsResponse +> export type TargetParamsInput = z.input export type TestSmtpParamsInput = z.input export type TransportWire = z.output @@ -749,6 +758,7 @@ export type UpdateCifsTargetParamsInput = z.input< > export type UpdateSystemRes = z.output export type UpdateTunnelParamsInput = z.input +export type UsersResponse = z.output export type VersionSignerParamsInput = z.input< typeof schemas.VersionSignerParams > diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts b/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts index 3357b0c93c..19344f8119 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts @@ -498,63 +498,6 @@ export const GenerateCertificateResponse: z.ZodObject<{ }> = /* @__PURE__ */ object({ key: z.string(), fullchain: z.string() }).meta({ id: 'GenerateCertificateResponse', }) -export const GetDownloadsParams: z.ZodObject<{ - /** - * Filter by package ID - */ - pkgId: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * Filter by version - */ - version: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * Start of time range (RFC 3339) - */ - after: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * End of time range (RFC 3339) - */ - before: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > -}> = /* @__PURE__ */ object({ - /** - * Filter by package ID - */ - pkgId: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Filter by package ID', - }), - /** - * Filter by version - */ - version: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Filter by version', - }), - /** - * Start of time range (RFC 3339) - */ - after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Start of time range (RFC 3339)', - }), - /** - * End of time range (RFC 3339) - */ - before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'End of time range (RFC 3339)', - }), -}).meta({ - id: 'GetDownloadsParams', -}) export const GetOsAssetParams: z.ZodObject<{ version: z.ZodString platform: z.ZodString @@ -588,37 +531,6 @@ export const GetOsVersionParams: z.ZodObject<{ }).meta({ id: 'GetOsVersionParams', }) -export const GetUsersParams: z.ZodObject<{ - /** - * Start of time range (RFC 3339) - */ - after: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > - /** - * End of time range (RFC 3339) - */ - before: z.ZodCodec< - z.ZodOptional>, - z.ZodNullable - > -}> = /* @__PURE__ */ object({ - /** - * Start of time range (RFC 3339) - */ - after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'Start of time range (RFC 3339)', - }), - /** - * End of time range (RFC 3339) - */ - before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ - description: 'End of time range (RFC 3339)', - }), -}).meta({ - id: 'GetUsersParams', -}) export const GigaBytes: typeof literal_10 = /* @__PURE__ */ literal_10.meta({ id: 'GigaBytes', }) @@ -972,6 +884,13 @@ export const MerkleArchiveCommitment: z.ZodIntersection< .meta({ id: 'MerkleArchiveCommitment', }) +export const MetricsInterval: z.ZodEnum<{ + day: 'day' + week: 'week' + month: 'month' +}> = /* @__PURE__ */ z.enum(['day', 'week', 'month']).meta({ + id: 'MetricsInterval', +}) export const ModifyNotificationBeforeParams: z.ZodObject<{ before: z.ZodInt }> = /* @__PURE__ */ object({ before: z.int() }).meta({ id: 'ModifyNotificationBeforeParams', @@ -1289,6 +1208,23 @@ export const Pem: typeof literal_0 = /* @__PURE__ */ literal_0.meta({ export const Percentage: typeof literal_10 = /* @__PURE__ */ literal_10.meta({ id: 'Percentage', }) +export const PeriodCount: z.ZodObject<{ + period: z.ZodString + count: z.ZodInt +}> = /* @__PURE__ */ object({ period: z.string(), count: z.int() }).meta({ + id: 'PeriodCount', +}) +export const PeriodUsers: z.ZodObject<{ + period: z.ZodString + uniqueServers: z.ZodInt + checkins: z.ZodInt +}> = /* @__PURE__ */ object({ + period: z.string(), + uniqueServers: z.int(), + checkins: z.int(), +}).meta({ + id: 'PeriodUsers', +}) export const PluginId: z.ZodEnum<{ 'url-v0': 'url-v0' }> = /* @__PURE__ */ z .enum(['url-v0']) .meta({ @@ -1925,15 +1861,6 @@ export const UpstreamCertValidation: z.ZodUnion< description: "How the OS reverse proxy validates the container's TLS certificate when it\nrewraps SSL (`add_ssl` set AND `secure.ssl == true`, so the OS terminates\nthe client's TLS and initiates a fresh TLS connection to the container).\nAbsent (`None`) means validate against the StartOS root CA — the default.", }) -export const UsersResponse: z.ZodObject<{ - uniqueServers: z.ZodInt - totalCheckins: z.ZodInt -}> = /* @__PURE__ */ object({ - uniqueServers: z.int(), - totalCheckins: z.int(), -}).meta({ - id: 'UsersResponse', -}) export const Version: typeof literal_0 = /* @__PURE__ */ literal_0.meta({ id: 'Version', }) @@ -2897,10 +2824,12 @@ export const DownloadsResponse: z.ZodObject<{ totalRequests: z.ZodInt byPackage: z.ZodArray byPackageVersion: z.ZodArray + series: z.ZodOptional> }> = /* @__PURE__ */ object({ totalRequests: z.int(), byPackage: z.array(CountEntry), byPackageVersion: z.array(PackageVersionCount), + series: z.array(PeriodCount).optional(), }).meta({ id: 'DownloadsResponse', }) @@ -3125,6 +3054,79 @@ export const GetContainerIpParams: z.ZodObject<{ }).meta({ id: 'GetContainerIpParams', }) +export const GetDownloadsParams: z.ZodObject<{ + /** + * Filter by package ID + */ + pkgId: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Filter by version + */ + version: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Start of time range (RFC 3339) + */ + after: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * End of time range (RFC 3339) + */ + before: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Also report each period in the range + */ + interval: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > +}> = /* @__PURE__ */ object({ + /** + * Filter by package ID + */ + pkgId: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Filter by package ID', + }), + /** + * Filter by version + */ + version: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Filter by version', + }), + /** + * Start of time range (RFC 3339) + */ + after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Start of time range (RFC 3339)', + }), + /** + * End of time range (RFC 3339) + */ + before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'End of time range (RFC 3339)', + }), + /** + * Also report each period in the range + */ + interval: wire( + MetricsInterval.nullable().optional(), + MetricsInterval.nullable(), + ).meta({ + description: 'Also report each period in the range', + }), +}).meta({ + id: 'GetDownloadsParams', +}) export const GetHostInfoParams: z.ZodObject<{ hostId: typeof HostId packageId: z.ZodCodec< @@ -3294,6 +3296,53 @@ export const GetSystemSmtpParams: z.ZodObject<{ }).meta({ id: 'GetSystemSmtpParams', }) +export const GetUsersParams: z.ZodObject<{ + /** + * Start of time range (RFC 3339) + */ + after: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * End of time range (RFC 3339) + */ + before: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > + /** + * Also report each period in the range + */ + interval: z.ZodCodec< + z.ZodOptional>, + z.ZodNullable + > +}> = /* @__PURE__ */ object({ + /** + * Start of time range (RFC 3339) + */ + after: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'Start of time range (RFC 3339)', + }), + /** + * End of time range (RFC 3339) + */ + before: wire(z.string().nullable().optional(), z.string().nullable()).meta({ + description: 'End of time range (RFC 3339)', + }), + /** + * Also report each period in the range + */ + interval: wire( + MetricsInterval.nullable().optional(), + MetricsInterval.nullable(), + ).meta({ + description: 'Also report each period in the range', + }), +}).meta({ + id: 'GetUsersParams', +}) export const GrantedSharedVolume: z.ZodObject<{ id: typeof SharedVolumeId name: z.ZodString @@ -3495,6 +3544,19 @@ export const InstalledVersionParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'InstalledVersionParams', }) +export const InstallsResponse: z.ZodObject<{ + totalInstalls: z.ZodInt + byPackage: z.ZodArray + byPackageVersion: z.ZodArray + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + totalInstalls: z.int(), + byPackage: z.array(CountEntry), + byPackageVersion: z.array(PackageVersionCount), + series: z.array(PeriodCount).optional(), +}).meta({ + id: 'InstallsResponse', +}) export const IpInfo: z.ZodObject<{ name: z.ZodString scopeId: z.ZodInt @@ -3766,12 +3828,16 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.ZodInt uniqueServers: z.ZodInt totalPackageRequests: z.ZodInt + totalInstalls: z.ZodInt + totalSubscriptions: z.ZodInt byArch: z.ZodArray byOsVersion: z.ZodArray }> = /* @__PURE__ */ object({ totalCheckins: z.int(), uniqueServers: z.int(), totalPackageRequests: z.int(), + totalInstalls: z.int(), + totalSubscriptions: z.int(), byArch: z.array(CountEntry), byOsVersion: z.array(CountEntry), }).meta({ @@ -4296,6 +4362,12 @@ export const RebuildParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'RebuildParams', }) +export const RecordInstallParams: z.ZodObject<{ + id: typeof PackageId + version: typeof Version +}> = /* @__PURE__ */ object({ id: PackageId, version: Version }).meta({ + id: 'RecordInstallParams', +}) export const RegistryIdentity: z.ZodObject<{ name: z.ZodCodec< z.ZodOptional>, @@ -4843,6 +4915,17 @@ export const StartOsRecoveryInfo: z.ZodObject<{ description: "The public view of a backup found on a target: enough to identify it, and none of\n[`BackupUnencryptedMetadata`]'s key material.", }) +export const SubscriptionsResponse: z.ZodObject<{ + totalSubscriptions: z.ZodInt + byOsVersion: z.ZodArray + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + totalSubscriptions: z.int(), + byOsVersion: z.array(CountEntry), + series: z.array(PeriodCount).optional(), +}).meta({ + id: 'SubscriptionsResponse', +}) export const TaskInput: z.ZodCodec< typeof TaskInputRepr, z.ZodIntersection< @@ -5003,6 +5086,17 @@ export const UrlPluginRegistration: z.ZodObject<{ }> = /* @__PURE__ */ object({ tableAction: ActionId }).meta({ id: 'UrlPluginRegistration', }) +export const UsersResponse: z.ZodObject<{ + uniqueServers: z.ZodInt + totalCheckins: z.ZodInt + series: z.ZodOptional> +}> = /* @__PURE__ */ object({ + uniqueServers: z.int(), + totalCheckins: z.int(), + series: z.array(PeriodUsers).optional(), +}).meta({ + id: 'UsersResponse', +}) export const VersionSignerParams: z.ZodObject<{ version: z.ZodString signer: typeof Guid diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/types.ts b/shared-libs/ts-modules/start-core/lib/osBindings/types.ts index f75b6d6ac0..b6eb086db9 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/types.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/types.ts @@ -160,14 +160,10 @@ export type GenerateCertificateResponse = z.output< export type GenerateCertificateResponseInput = z.input< typeof schemas.GenerateCertificateResponse > -export type GetDownloadsParams = z.output -export type GetDownloadsParamsInput = z.input export type GetOsAssetParams = z.output export type GetOsAssetParamsInput = z.input export type GetOsVersionParams = z.output export type GetOsVersionParamsInput = z.input -export type GetUsersParams = z.output -export type GetUsersParamsInput = z.input export type GigaBytes = z.output export type GigaBytesInput = z.input export type GitHash = z.output @@ -246,6 +242,8 @@ export type MerkleArchiveCommitment = z.output< export type MerkleArchiveCommitmentInput = z.input< typeof schemas.MerkleArchiveCommitment > +export type MetricsInterval = z.output +export type MetricsIntervalInput = z.input export type ModifyNotificationBeforeParams = z.output< typeof schemas.ModifyNotificationBeforeParams > @@ -344,6 +342,10 @@ export type Pem = z.output export type PemInput = z.input export type Percentage = z.output export type PercentageInput = z.input +export type PeriodCount = z.output +export type PeriodCountInput = z.input +export type PeriodUsers = z.output +export type PeriodUsersInput = z.input export type PluginId = z.output export type PluginIdInput = z.input export type PreDownloadAlertWhen = z.output @@ -600,8 +602,6 @@ export type UpstreamCertValidation = z.output< export type UpstreamCertValidationInput = z.input< typeof schemas.UpstreamCertValidation > -export type UsersResponse = z.output -export type UsersResponseInput = z.input export type Version = z.output export type VersionInput = z.input export type VolumeId = z.output @@ -862,6 +862,8 @@ export type GetContainerIpParams = z.output export type GetContainerIpParamsInput = z.input< typeof schemas.GetContainerIpParams > +export type GetDownloadsParams = z.output +export type GetDownloadsParamsInput = z.input export type GetHostInfoParams = z.output export type GetHostInfoParamsInput = z.input export type GetOutboundGatewayParams = z.output< @@ -910,6 +912,8 @@ export type GetSystemSmtpParams = z.output export type GetSystemSmtpParamsInput = z.input< typeof schemas.GetSystemSmtpParams > +export type GetUsersParams = z.output +export type GetUsersParamsInput = z.input export type GrantedSharedVolume = z.output export type GrantedSharedVolumeInput = z.input< typeof schemas.GrantedSharedVolume @@ -932,6 +936,8 @@ export type InstalledVersionParams = z.output< export type InstalledVersionParamsInput = z.input< typeof schemas.InstalledVersionParams > +export type InstallsResponse = z.output +export type InstallsResponseInput = z.input export type IpInfo = z.output export type IpInfoInput = z.input export type KillParams = z.output @@ -1088,6 +1094,10 @@ export type RangeServiceInterfaceInput = z.input< > export type RebuildParams = z.output export type RebuildParamsInput = z.input +export type RecordInstallParams = z.output +export type RecordInstallParamsInput = z.input< + typeof schemas.RecordInstallParams +> export type RegistryIdentity = z.output export type RegistryIdentityInput = z.input export type RemoveAcmeParams = z.output @@ -1232,6 +1242,12 @@ export type StartOsRecoveryInfo = z.output export type StartOsRecoveryInfoInput = z.input< typeof schemas.StartOsRecoveryInfo > +export type SubscriptionsResponse = z.output< + typeof schemas.SubscriptionsResponse +> +export type SubscriptionsResponseInput = z.input< + typeof schemas.SubscriptionsResponse +> export type TaskInput = z.output export type TaskInputInput = z.input export type TaskTrigger = z.output @@ -1268,6 +1284,8 @@ export type UrlPluginRegistration = z.output< export type UrlPluginRegistrationInput = z.input< typeof schemas.UrlPluginRegistration > +export type UsersResponse = z.output +export type UsersResponseInput = z.input export type VersionSignerParams = z.output export type VersionSignerParamsInput = z.input< typeof schemas.VersionSignerParams From b166c868c5d30017f1425150fb5367d8a882a1dc Mon Sep 17 00:00:00 2001 From: helix-red <355572797+helix-red@users.noreply.github.com> Date: Sat, 21 Nov 2026 01:14:24 +0000 Subject: [PATCH 4/8] fix(registry): unlinkable install reports and instant-based metric ranges Install reports went through RpcContext::call_remote, which signs with the server identity key, so a registry could correlate installs per server. They now use the shared registry transport with a fresh signing key per report, no device metadata, and a 30-second bound. Metric range bounds compared lexically against stored `+00:00` timestamps, so offsets other than UTC (and `Z`) selected the wrong rows. Filter::range now normalizes each bound to a UTC key first, for all four range callers. Adopted from the cross-review proposal, with compile fixes: the test_utils path, `to_value(&report)`, and keeping the context in the report task (ReloadableHttpClient is not Clone; the timeout bounds the task). Co-authored-by: helix-white <267227783+helix-a@users.noreply.github.com> Helix-Harness: claude-code Helix-Model: claude-opus-5-5 --- .../crates/start-core/src/install/mod.rs | 39 ++++-- .../start-core/src/install/report_tests.rs | 123 ++++++++++++++++++ .../crates/start-core/src/registry/metrics.rs | 94 +++++++++---- 3 files changed, 224 insertions(+), 32 deletions(-) create mode 100644 shared-libs/crates/start-core/src/install/report_tests.rs diff --git a/shared-libs/crates/start-core/src/install/mod.rs b/shared-libs/crates/start-core/src/install/mod.rs index 646d923973..605e7c8475 100644 --- a/shared-libs/crates/start-core/src/install/mod.rs +++ b/shared-libs/crates/start-core/src/install/mod.rs @@ -37,6 +37,8 @@ use crate::util::{FromStrParser, Never, VersionString}; #[cfg(test)] mod progress_tests; #[cfg(test)] +mod report_tests; +#[cfg(test)] mod trust_tests; pub const PKG_ARCHIVE_DIR: &str = "package-data/archive"; @@ -200,20 +202,41 @@ pub async fn install( .await?; tokio::spawn(async move { download.await?.await?; - let _ = ctx - .call_remote_with::( - "package.record-install", - Default::default(), - json!({ "id": id, "version": version }), - RegistryUrlParams { registry }, - ) - .await; + let _ = report_install( + &ctx.client, + ®istry, + crate::registry::metrics::RecordInstallParams { id, version }, + ) + .await; Ok::<_, Error>(()) }); Ok(()) } +/// Reports use a fresh signing identity and omit persistent identity and device metadata. +async fn report_install( + client: &crate::context::rpc::ReloadableHttpClient, + registry: &Url, + report: crate::registry::metrics::RecordInstallParams, +) -> Result<(), RpcError> { + let signer = crate::sign::AnySigningKey::generate().into(); + tokio::time::timeout( + Duration::from_secs(30), + crate::registry::context::call( + client, + &signer, + registry, + HeaderMap::new(), + "package.record-install", + to_value(&report)?, + ), + ) + .await + .with_kind(ErrorKind::Network)? + .map(|_| ()) +} + #[derive(Deserialize, Serialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct SideloadParams { diff --git a/shared-libs/crates/start-core/src/install/report_tests.rs b/shared-libs/crates/start-core/src/install/report_tests.rs new file mode 100644 index 0000000000..a86f7862b6 --- /dev/null +++ b/shared-libs/crates/start-core/src/install/report_tests.rs @@ -0,0 +1,123 @@ +use std::num::NonZeroUsize; + +use axum::extract::ws::{Message, WebSocketUpgrade}; +use axum::http::StatusCode; +use axum::routing::{get, post}; +use futures::{SinkExt, StreamExt}; +use tokio::sync::mpsc::{UnboundedReceiver, unbounded_channel}; + +use super::*; +use crate::middleware::auth::signature::{AUTH_SIG_HEADER, SignatureHeader}; +use crate::registry::device_info::DEVICE_INFO_HEADER; +use crate::registry::metrics::RecordInstallParams; +use crate::sign::session::Target; +use crate::sign::{AnySigningKey, AnyVerifyingKey, Signer}; +use crate::util::future::NonDetachingJoinHandle; +use crate::util::net::secure::EncryptedSocket; + +type Report = (AnyVerifyingKey, HeaderMap, serde_json::Value); + +async fn assert_unlinkable_reports(app: axum::Router, mut received: UnboundedReceiver) { + let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); + let url: Url = format!( + "http://localhost:{}/catalog/", + listener.local_addr().unwrap().port() + ) + .parse() + .unwrap(); + let _server: NonDetachingJoinHandle<()> = + tokio::spawn(async move { axum::serve(listener, app).await.unwrap() }).into(); + let (client, _proxy) = crate::registry::context::test_utils::socks_client(&url).await; + let mut identities = Vec::new(); + for _ in 0..2 { + tokio::time::timeout( + Duration::from_secs(3), + report_install( + &client, + &url, + RecordInstallParams { + id: "hello-world".parse().unwrap(), + version: "1.0.0:0".parse().unwrap(), + }, + ), + ) + .await + .unwrap() + .unwrap(); + let (identity, headers, request) = received.recv().await.unwrap(); + identities.push(identity); + assert!(!headers.contains_key(DEVICE_INFO_HEADER)); + assert!(!headers.contains_key(reqwest::header::AUTHORIZATION)); + assert_eq!(request["method"], "package.record-install"); + assert_eq!( + request["params"], + serde_json::json!({"id": "hello-world", "version": "1.0.0:0"}) + ); + } + assert_ne!(identities[0], identities[1]); +} + +#[tokio::test] +async fn encrypted_install_reports_use_per_report_identities_without_device_metadata() { + let (send, received) = unbounded_channel(); + let key: Signer = AnySigningKey::generate().into(); + let app = axum::Router::new().route( + "/catalog/rpc/v2", + get(move |headers: HeaderMap, upgrade: WebSocketUpgrade| { + let key = key.clone(); + let send = send.clone(); + async move { + assert!(!headers.contains_key(AUTH_SIG_HEADER)); + upgrade.on_upgrade(move |socket| async move { + let (peer, _, mut socket) = EncryptedSocket::accept( + Box::new(socket), + &key.into(), + &["localhost".into()], + NonZeroUsize::new(1024 * 1024).unwrap(), + &Target::Rpc, + None, + |_| async { Ok(()) }, + ) + .await + .unwrap(); + let text = socket.next().await.unwrap().unwrap().into_text().unwrap(); + let request: serde_json::Value = serde_json::from_str(&text).unwrap(); + let response = serde_json::json!({ + "jsonrpc": "2.0", "id": request["id"], "result": null + }); + send.send((peer, headers, request)).unwrap(); + socket + .send(Message::Text(response.to_string().into())) + .await + .unwrap(); + }) + } + }), + ); + assert_unlinkable_reports(app, received).await; +} + +#[tokio::test] +async fn legacy_install_reports_use_per_report_identities_without_device_metadata() { + let (send, received) = unbounded_channel(); + let app = axum::Router::new() + .route("/catalog/rpc/v2", get(|| async { StatusCode::NOT_FOUND })) + .route( + "/catalog/rpc/v0", + post( + move |headers: HeaderMap, axum::Json(request): axum::Json| { + let send = send.clone(); + async move { + let proof = + SignatureHeader::from_header(&headers[AUTH_SIG_HEADER]).unwrap(); + let response = serde_json::json!({ + "jsonrpc": "2.0", "id": request["id"], "result": null + }); + send.send((proof.signer, headers, request)).unwrap(); + axum::Json(response) + } + }, + ), + ); + assert_unlinkable_reports(app, received).await; +} diff --git a/shared-libs/crates/start-core/src/registry/metrics.rs b/shared-libs/crates/start-core/src/registry/metrics.rs index c01ed1fcd2..f03dd8ba81 100644 --- a/shared-libs/crates/start-core/src/registry/metrics.rs +++ b/shared-libs/crates/start-core/src/registry/metrics.rs @@ -62,8 +62,6 @@ pub fn metrics_api() -> ParentHandler { ) } -// --- recording --- - #[derive(Debug, Deserialize, Serialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct RecordInstallParams { @@ -108,7 +106,6 @@ pub(crate) fn record_subscription(ctx: &RegistryContext, os_version: Option>) { tokio::task::spawn_blocking(move || { ctx.metrics_db.mutate(|conn| { @@ -120,8 +117,6 @@ fn record(ctx: RegistryContext, sql: &'static str, values: Vec>) }); } -// --- shared --- - #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct CountEntry { @@ -182,10 +177,12 @@ struct Filter { } impl Filter { - fn range(after: &Option, before: &Option) -> Self { - Self::default() - .with("created_at >=", after) - .with("created_at <", before) + fn range(after: &Option, before: &Option) -> Result { + let after = after.as_deref().map(utc_range_key).transpose()?; + let before = before.as_deref().map(utc_range_key).transpose()?; + Ok(Self::default() + .with("created_at >=", &after) + .with("created_at <", &before)) } fn with(mut self, condition: &str, value: &Option) -> Self { @@ -206,6 +203,18 @@ impl Filter { } } +/// UTC prefix bounds for stored RFC 3339 timestamps ending in `+00:00`. +fn utc_range_key(value: &str) -> Result { + Ok(chrono::DateTime::parse_from_rfc3339(value) + .with_kind(ErrorKind::ParseTimestamp)? + .with_timezone(&Utc) + .format("%Y-%m-%dT%H:%M:%S%.9f") + .to_string() + .trim_end_matches('0') + .trim_end_matches('.') + .to_owned()) +} + fn count(conn: &rusqlite::Connection, sql: &str, filter: &Filter) -> Result { conn.query_row( &format!("{sql}{}", filter.clause()), @@ -345,8 +354,6 @@ fn print_series(series: &[PeriodCount]) -> Result<(), Error> { Ok(()) } -// --- summary --- - #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct MetricsSummary { @@ -396,8 +403,6 @@ fn display_summary(params: WithIoFormat, summary: MetricsSummary) -> Resul print_counts("OS VERSION", &summary.by_os_version) } -// --- users --- - #[derive(Debug, Deserialize, Serialize, Parser, VisitFields)] #[group(skip)] #[command(rename_all = "kebab-case")] @@ -450,7 +455,7 @@ pub async fn get_users( }: GetUsersParams, ) -> Result { query(ctx, move |conn| { - let filter = Filter::range(&after, &before); + let filter = Filter::range(&after, &before)?; let series = match interval { None => Vec::new(), Some(interval) => { @@ -510,8 +515,6 @@ fn display_users(params: WithIoFormat, response: UsersResponse) -> Result< Ok(()) } -// --- downloads and installs --- - #[derive(Debug, Deserialize, Serialize, Parser, VisitFields)] #[group(skip)] #[command(rename_all = "kebab-case")] @@ -539,10 +542,10 @@ rpc_toolkit::reflect_ts!(GetDownloadsParams); rpc_toolkit::ts_export!(GetDownloadsParams, namespaces = [""]); impl GetDownloadsParams { - fn filter(&self) -> Filter { - Filter::range(&self.after, &self.before) + fn filter(&self) -> Result { + Ok(Filter::range(&self.after, &self.before)? .with("pkg_id =", &self.pkg_id) - .with("version =", &self.version) + .with("version =", &self.version)) } } @@ -564,7 +567,7 @@ pub async fn get_downloads( params: GetDownloadsParams, ) -> Result { query(ctx, move |conn| { - let filter = params.filter(); + let filter = params.filter()?; Ok(DownloadsResponse { total_requests: count(conn, "SELECT COUNT(*) FROM package_request", &filter)?, by_package: count_entries(conn, "package_request", "pkg_id", &filter)?, @@ -607,7 +610,7 @@ pub async fn get_installs( params: GetDownloadsParams, ) -> Result { query(ctx, move |conn| { - let filter = params.filter(); + let filter = params.filter()?; Ok(InstallsResponse { total_installs: count(conn, "SELECT COUNT(*) FROM package_install", &filter)?, by_package: count_entries(conn, "package_install", "pkg_id", &filter)?, @@ -632,8 +635,6 @@ fn display_installs( print_series(&response.series) } -// --- subscriptions --- - #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct SubscriptionsResponse { @@ -655,7 +656,7 @@ pub async fn get_subscriptions( }: GetUsersParams, ) -> Result { query(ctx, move |conn| { - let filter = Filter::range(&after, &before); + let filter = Filter::range(&after, &before)?; Ok(SubscriptionsResponse { total_subscriptions: count(conn, "SELECT COUNT(*) FROM index_subscription", &filter)?, by_os_version: count_entries(conn, "index_subscription", "os_version", &filter)?, @@ -738,9 +739,54 @@ mod tests { ); } + #[test] + fn ranges_compare_instants_across_offsets_and_fractional_precisions() { + let conn = db(); + for (after, before, expected) in [ + (None, Some("2026-11-03T02:00:00+02:00"), 1), + (None, Some("2026-11-03T00:00:00Z"), 1), + (Some("2026-11-03T00:00:00Z"), None, 4), + (None, Some("2026-11-02T23:59:59.999999999Z"), 0), + ( + Some("2026-11-02T23:59:59.999999999Z"), + Some("2026-11-03T00:00:00Z"), + 1, + ), + ] { + let filter = + Filter::range(&after.map(str::to_owned), &before.map(str::to_owned)).unwrap(); + assert_eq!( + count(&conn, "SELECT COUNT(*) FROM package_install", &filter).unwrap(), + expected, + ); + } + for at in [ + "2026-11-03T00:00:00.123+00:00", + "2026-11-03T00:00:00.123000+00:00", + "2026-11-03T00:00:00.123000000+00:00", + ] { + conn.execute( + "INSERT INTO package_install (created_at, pkg_id, version) VALUES (?1, 'nextcloud', '1.0:0')", + params![at], + ) + .unwrap(); + } + let filter = Filter::range( + &Some("2026-11-03T00:00:00.123000Z".into()), + &Some("2026-11-03T00:00:00.123000001Z".into()), + ) + .unwrap(); + assert_eq!( + count(&conn, "SELECT COUNT(*) FROM package_install", &filter).unwrap(), + 3, + ); + assert!(Filter::range(&Some("invalid".into()), &None).is_err()); + } + #[test] fn filters_combine_range_and_package() { let filter = Filter::range(&Some("2026-11-03T00:00:00+00:00".into()), &None) + .unwrap() .with("pkg_id =", &Some("nextcloud".into())); assert_eq!( count(&db(), "SELECT COUNT(*) FROM package_install", &filter).unwrap(), From b90f6d15de29e6cd599f65831e4c6e8067d7cebd Mon Sep 17 00:00:00 2001 From: Matt Hill <9935159+MattDHill@users.noreply.github.com> Date: Sat, 21 Nov 2026 06:33:54 -0700 Subject: [PATCH 5/8] refactor(registry): drop install reporting, keep metrics the registry already sees StartOS installs never contact the registry: the index comes from the synced subscription and the s9pk from its asset URL. Counting installs would need StartOS to make an extra call for tracking alone, so remove package.record-install, the post-install report, the package_install table and `metrics installs`. Subscription metrics, --interval series and RFC 3339 range normalization are unchanged. Co-Authored-By: Claude Opus 5.5 --- .../minor-added-registry-install-report.md | 5 - projects/start-registry/ARCHITECTURE.md | 18 +-- projects/start-registry/README.md | 2 +- .../changelog/minor-added-install-metrics.md | 5 - .../changelog/minor-added-metrics-series.md | 5 + .../crates/start-core/locales/i18n.yaml | 7 - .../crates/start-core/src/install/mod.rs | 38 +----- .../start-core/src/install/report_tests.rs | 123 ----------------- .../crates/start-core/src/registry/context.rs | 11 +- .../crates/start-core/src/registry/metrics.rs | 124 ++---------------- .../start-core/src/registry/package/mod.rs | 7 - 11 files changed, 31 insertions(+), 314 deletions(-) delete mode 100644 projects/start-os/changelog/minor-added-registry-install-report.md delete mode 100644 projects/start-registry/changelog/minor-added-install-metrics.md create mode 100644 projects/start-registry/changelog/minor-added-metrics-series.md delete mode 100644 shared-libs/crates/start-core/src/install/report_tests.rs diff --git a/projects/start-os/changelog/minor-added-registry-install-report.md b/projects/start-os/changelog/minor-added-registry-install-report.md deleted file mode 100644 index 97f92be4d7..0000000000 --- a/projects/start-os/changelog/minor-added-registry-install-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -release-notes: false ---- - -- After installing or updating a service from a registry, StartOS tells that registry which package and version it installed, and nothing else. diff --git a/projects/start-registry/ARCHITECTURE.md b/projects/start-registry/ARCHITECTURE.md index cf563be5c7..726da28543 100644 --- a/projects/start-registry/ARCHITECTURE.md +++ b/projects/start-registry/ARCHITECTURE.md @@ -46,15 +46,15 @@ Defined in `shared-libs/crates/start-core/src/registry/mod.rs`: Subcommands (same module), each available over RPC and to the `start-registry` CLI via `with_call_remote`: -| Command | Module | Purpose | -| --------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| `index` | `mod::get_full_index` | full combined index (name, icon, packages, OS, signers) | -| `info` | `registry/info.rs` | set/get registry info and categories | -| `os` | `registry/os/` | OS version index + asset (image) management | -| `package` | `registry/package/` | add/get/list packages, versions, assets | -| `admin` | `registry/admin.rs` | manage admins, signers and reader keys | -| `db` | `registry/db.rs` | dump/inspect the registry database; subscribe to `/index` or any subpath | -| `metrics` | `registry/metrics.rs` | install, user, subscription and lookup metrics, with time series (admin-only); `package record-install` records an install | +| Command | Module | Purpose | +| --------- | --------------------- | ------------------------------------------------------------------------ | +| `index` | `mod::get_full_index` | full combined index (name, icon, packages, OS, signers) | +| `info` | `registry/info.rs` | set/get registry info and categories | +| `os` | `registry/os/` | OS version index + asset (image) management | +| `package` | `registry/package/` | add/get/list packages, versions, assets | +| `admin` | `registry/admin.rs` | manage admins, signers and reader keys | +| `db` | `registry/db.rs` | dump/inspect the registry database; subscribe to `/index` or any subpath | +| `metrics` | `registry/metrics.rs` | user, subscription and lookup metrics, with time series (admin-only) | ### Registry index subscriptions diff --git a/projects/start-registry/README.md b/projects/start-registry/README.md index 65b74b5d71..72e1126ba3 100644 --- a/projects/start-registry/README.md +++ b/projects/start-registry/README.md @@ -11,7 +11,7 @@ This directory is a thin product wrapper inside the `start-technologies` monorep - Redirects visitors at `/` to `https://marketplace.start9.com/` with the registry selected. - Exposes a JSON-RPC API over HTTP, WebSocket, and a REST continuation channel. - Tracks **admins** and package **signers**, verifies signatures on uploaded content, and proposes administrator-selected signers for Marketplace trust when users connect. -- Records anonymous **metrics** for its admins: installs and updates StartOS reports (package and version only), active servers from OS update checks, index subscriptions, and package lookups, each as totals or a day/week/month series (`start-registry metrics`). +- Records anonymous **metrics** for its admins: active servers from OS update checks, index subscriptions, and package lookups, each as totals or a day/week/month series (`start-registry metrics`). ## Package trust proposals diff --git a/projects/start-registry/changelog/minor-added-install-metrics.md b/projects/start-registry/changelog/minor-added-install-metrics.md deleted file mode 100644 index 1e5a66479a..0000000000 --- a/projects/start-registry/changelog/minor-added-install-metrics.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -release-notes: false ---- - -- Registry admins can see the installs and updates StartOS reports, along with active servers, index subscriptions and package lookups, as totals or as daily, weekly or monthly counts (`start-registry metrics installs`, `users`, `subscriptions`, `downloads`). diff --git a/projects/start-registry/changelog/minor-added-metrics-series.md b/projects/start-registry/changelog/minor-added-metrics-series.md new file mode 100644 index 0000000000..50463a0181 --- /dev/null +++ b/projects/start-registry/changelog/minor-added-metrics-series.md @@ -0,0 +1,5 @@ +--- +release-notes: false +--- + +- Registry admins can see index subscriptions by StartOS version (`start-registry metrics subscriptions`), and active servers, subscriptions and package lookups as daily, weekly or monthly counts (`--interval`). diff --git a/shared-libs/crates/start-core/locales/i18n.yaml b/shared-libs/crates/start-core/locales/i18n.yaml index 722e88e4e3..4bb3b6d596 100644 --- a/shared-libs/crates/start-core/locales/i18n.yaml +++ b/shared-libs/crates/start-core/locales/i18n.yaml @@ -7401,13 +7401,6 @@ about.get-metrics-downloads: fr_FR: "Compter les demandes d'une version précise d'un paquet parvenues au registre, avec filtres optionnels" pl_PL: "Zlicz żądania konkretnej wersji pakietu, które dotarły do rejestru, z opcjonalnymi filtrami" -about.get-metrics-installs: - en_US: "Count package installs and updates reported by StartOS, with optional filters" - de_DE: "Von StartOS gemeldete Paketinstallationen und -aktualisierungen zählen, mit optionalen Filtern" - es_ES: "Contar las instalaciones y actualizaciones de paquetes notificadas por StartOS, con filtros opcionales" - fr_FR: "Compter les installations et mises à jour de paquets signalées par StartOS, avec filtres optionnels" - pl_PL: "Zlicz instalacje i aktualizacje pakietów zgłoszone przez StartOS, z opcjonalnymi filtrami" - about.get-metrics-subscriptions: en_US: "Count package index subscriptions by StartOS version within a time range" de_DE: "Abonnements des Paketindex nach StartOS-Version in einem Zeitraum zählen" diff --git a/shared-libs/crates/start-core/src/install/mod.rs b/shared-libs/crates/start-core/src/install/mod.rs index a95c0433bc..6ca5bb4bd1 100644 --- a/shared-libs/crates/start-core/src/install/mod.rs +++ b/shared-libs/crates/start-core/src/install/mod.rs @@ -38,8 +38,6 @@ use crate::util::{FromStrParser, Never, VersionString}; #[cfg(test)] mod progress_tests; #[cfg(test)] -mod report_tests; -#[cfg(test)] mod trust_tests; pub const PKG_ARCHIVE_DIR: &str = "package-data/archive"; @@ -193,48 +191,16 @@ pub async fn install( .install( ctx.clone(), || asset.deserialize_s9pk_buffered(ctx.client.get(), download_progress), - Some(registry.clone()), + Some(registry), None::, Some(progress_tracker), ) .await?; - tokio::spawn(async move { - download.await?.await?; - let _ = report_install( - &ctx.client, - ®istry, - crate::registry::metrics::RecordInstallParams { id, version }, - ) - .await; - Ok::<_, Error>(()) - }); + tokio::spawn(async move { download.await?.await }); Ok(()) } -/// Reports use a fresh signing identity and omit persistent identity and device metadata. -async fn report_install( - client: &crate::context::rpc::ReloadableHttpClient, - registry: &Url, - report: crate::registry::metrics::RecordInstallParams, -) -> Result<(), RpcError> { - let signer = crate::sign::AnySigningKey::generate().into(); - tokio::time::timeout( - Duration::from_secs(30), - crate::registry::context::call( - client, - &signer, - registry, - HeaderMap::new(), - "package.record-install", - to_value(&report)?, - ), - ) - .await - .with_kind(ErrorKind::Network)? - .map(|_| ()) -} - #[derive(Deserialize, Serialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct SideloadParams { diff --git a/shared-libs/crates/start-core/src/install/report_tests.rs b/shared-libs/crates/start-core/src/install/report_tests.rs deleted file mode 100644 index a86f7862b6..0000000000 --- a/shared-libs/crates/start-core/src/install/report_tests.rs +++ /dev/null @@ -1,123 +0,0 @@ -use std::num::NonZeroUsize; - -use axum::extract::ws::{Message, WebSocketUpgrade}; -use axum::http::StatusCode; -use axum::routing::{get, post}; -use futures::{SinkExt, StreamExt}; -use tokio::sync::mpsc::{UnboundedReceiver, unbounded_channel}; - -use super::*; -use crate::middleware::auth::signature::{AUTH_SIG_HEADER, SignatureHeader}; -use crate::registry::device_info::DEVICE_INFO_HEADER; -use crate::registry::metrics::RecordInstallParams; -use crate::sign::session::Target; -use crate::sign::{AnySigningKey, AnyVerifyingKey, Signer}; -use crate::util::future::NonDetachingJoinHandle; -use crate::util::net::secure::EncryptedSocket; - -type Report = (AnyVerifyingKey, HeaderMap, serde_json::Value); - -async fn assert_unlinkable_reports(app: axum::Router, mut received: UnboundedReceiver) { - let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); - let url: Url = format!( - "http://localhost:{}/catalog/", - listener.local_addr().unwrap().port() - ) - .parse() - .unwrap(); - let _server: NonDetachingJoinHandle<()> = - tokio::spawn(async move { axum::serve(listener, app).await.unwrap() }).into(); - let (client, _proxy) = crate::registry::context::test_utils::socks_client(&url).await; - let mut identities = Vec::new(); - for _ in 0..2 { - tokio::time::timeout( - Duration::from_secs(3), - report_install( - &client, - &url, - RecordInstallParams { - id: "hello-world".parse().unwrap(), - version: "1.0.0:0".parse().unwrap(), - }, - ), - ) - .await - .unwrap() - .unwrap(); - let (identity, headers, request) = received.recv().await.unwrap(); - identities.push(identity); - assert!(!headers.contains_key(DEVICE_INFO_HEADER)); - assert!(!headers.contains_key(reqwest::header::AUTHORIZATION)); - assert_eq!(request["method"], "package.record-install"); - assert_eq!( - request["params"], - serde_json::json!({"id": "hello-world", "version": "1.0.0:0"}) - ); - } - assert_ne!(identities[0], identities[1]); -} - -#[tokio::test] -async fn encrypted_install_reports_use_per_report_identities_without_device_metadata() { - let (send, received) = unbounded_channel(); - let key: Signer = AnySigningKey::generate().into(); - let app = axum::Router::new().route( - "/catalog/rpc/v2", - get(move |headers: HeaderMap, upgrade: WebSocketUpgrade| { - let key = key.clone(); - let send = send.clone(); - async move { - assert!(!headers.contains_key(AUTH_SIG_HEADER)); - upgrade.on_upgrade(move |socket| async move { - let (peer, _, mut socket) = EncryptedSocket::accept( - Box::new(socket), - &key.into(), - &["localhost".into()], - NonZeroUsize::new(1024 * 1024).unwrap(), - &Target::Rpc, - None, - |_| async { Ok(()) }, - ) - .await - .unwrap(); - let text = socket.next().await.unwrap().unwrap().into_text().unwrap(); - let request: serde_json::Value = serde_json::from_str(&text).unwrap(); - let response = serde_json::json!({ - "jsonrpc": "2.0", "id": request["id"], "result": null - }); - send.send((peer, headers, request)).unwrap(); - socket - .send(Message::Text(response.to_string().into())) - .await - .unwrap(); - }) - } - }), - ); - assert_unlinkable_reports(app, received).await; -} - -#[tokio::test] -async fn legacy_install_reports_use_per_report_identities_without_device_metadata() { - let (send, received) = unbounded_channel(); - let app = axum::Router::new() - .route("/catalog/rpc/v2", get(|| async { StatusCode::NOT_FOUND })) - .route( - "/catalog/rpc/v0", - post( - move |headers: HeaderMap, axum::Json(request): axum::Json| { - let send = send.clone(); - async move { - let proof = - SignatureHeader::from_header(&headers[AUTH_SIG_HEADER]).unwrap(); - let response = serde_json::json!({ - "jsonrpc": "2.0", "id": request["id"], "result": null - }); - send.send((proof.signer, headers, request)).unwrap(); - axum::Json(response) - } - }, - ), - ); - assert_unlinkable_reports(app, received).await; -} diff --git a/shared-libs/crates/start-core/src/registry/context.rs b/shared-libs/crates/start-core/src/registry/context.rs index 35ba048191..e24a6f0069 100644 --- a/shared-libs/crates/start-core/src/registry/context.rs +++ b/shared-libs/crates/start-core/src/registry/context.rs @@ -207,14 +207,6 @@ impl RegistryContext { CREATE INDEX IF NOT EXISTS idx_user_activity_created_at ON user_activity(created_at); CREATE INDEX IF NOT EXISTS idx_package_request_created_at ON package_request(created_at); CREATE INDEX IF NOT EXISTS idx_package_request_pkg_id ON package_request(pkg_id); - CREATE TABLE IF NOT EXISTS package_install ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - created_at TEXT NOT NULL, - pkg_id TEXT NOT NULL, - version TEXT NOT NULL - ); - CREATE INDEX IF NOT EXISTS idx_package_install_created_at ON package_install(created_at); - CREATE INDEX IF NOT EXISTS idx_package_install_pkg_id ON package_install(pkg_id); CREATE TABLE IF NOT EXISTS index_subscription ( id INTEGER PRIMARY KEY AUTOINCREMENT, created_at TEXT NOT NULL, @@ -595,13 +587,12 @@ mod tests { use rpc_toolkit::HandlerFor; let registry = crate::registry::registry_api::(); - let public: [&[&str]; 14] = [ + let public: [&[&str]; 13] = [ &["index"], &["info"], &["db", "subscribe"], &["package", "index"], &["package", "get"], - &["package", "record-install"], &["package", "category", "list"], &["package", "signer", "list"], &["os", "index"], diff --git a/shared-libs/crates/start-core/src/registry/metrics.rs b/shared-libs/crates/start-core/src/registry/metrics.rs index f03dd8ba81..d183e07ef5 100644 --- a/shared-libs/crates/start-core/src/registry/metrics.rs +++ b/shared-libs/crates/start-core/src/registry/metrics.rs @@ -4,11 +4,9 @@ use rpc_toolkit::{Context, HandlerExt, ParentHandler, from_fn_async}; use serde::{Deserialize, Serialize}; use tracing::warn; -use crate::PackageId; use crate::context::CliContext; use crate::prelude::*; use crate::registry::context::RegistryContext; -use crate::util::VersionString; use crate::util::serde::{HandlerExtSerde, WithIoFormat, display_serializable}; pub fn metrics_api() -> ParentHandler { @@ -40,15 +38,6 @@ pub fn metrics_api() -> ParentHandler { .with_about("about.get-metrics-downloads") .with_call_remote::(), ) - .subcommand( - "installs", - from_fn_async(get_installs) - .with_metadata("admin", Value::Bool(true)) - .with_display_serializable() - .with_custom_display_fn(|handle, result| display_installs(handle.params, result)) - .with_about("about.get-metrics-installs") - .with_call_remote::(), - ) .subcommand( "subscriptions", from_fn_async(get_subscriptions) @@ -62,55 +51,14 @@ pub fn metrics_api() -> ParentHandler { ) } -#[derive(Debug, Deserialize, Serialize, VisitFields)] -#[serde(rename_all = "camelCase")] -pub struct RecordInstallParams { - pub id: PackageId, - pub version: VersionString, -} - -rpc_toolkit::reflect_ts!(RecordInstallParams); -rpc_toolkit::ts_export!(RecordInstallParams, namespaces = [""]); - -/// Counts a completed install or update. Answers the same whether or not the version exists. -pub async fn record_install( - ctx: RegistryContext, - RecordInstallParams { id, version }: RecordInstallParams, -) -> Result<(), Error> { - let listed = ctx - .db - .peek() - .await - .as_index() - .as_package() - .as_packages() - .as_idx(&id) - .map_or(false, |package| { - package.as_versions().as_idx(&version).is_some() - }); - if listed { - record( - ctx, - "INSERT INTO package_install (created_at, pkg_id, version) VALUES (?1, ?2, ?3)", - vec![Some(id.to_string()), Some(version.to_string())], - ); - } - Ok(()) -} - pub(crate) fn record_subscription(ctx: &RegistryContext, os_version: Option) { - record( - ctx.clone(), - "INSERT INTO index_subscription (created_at, os_version) VALUES (?1, ?2)", - vec![os_version], - ); -} - -fn record(ctx: RegistryContext, sql: &'static str, values: Vec>) { + let ctx = ctx.clone(); tokio::task::spawn_blocking(move || { ctx.metrics_db.mutate(|conn| { - let row = std::iter::once(Some(Utc::now().to_rfc3339())).chain(values); - if let Err(e) = conn.execute(sql, rusqlite::params_from_iter(row)) { + if let Err(e) = conn.execute( + "INSERT INTO index_subscription (created_at, os_version) VALUES (?1, ?2)", + rusqlite::params![Utc::now().to_rfc3339(), os_version], + ) { warn!("failed to record metric: {e}"); } }); @@ -360,7 +308,6 @@ pub struct MetricsSummary { pub total_checkins: u64, pub unique_servers: u64, pub total_package_requests: u64, - pub total_installs: u64, pub total_subscriptions: u64, pub by_arch: Vec, pub by_os_version: Vec, @@ -380,7 +327,6 @@ pub async fn get_summary(ctx: RegistryContext) -> Result &all, )?, total_package_requests: count(conn, "SELECT COUNT(*) FROM package_request", &all)?, - total_installs: count(conn, "SELECT COUNT(*) FROM package_install", &all)?, total_subscriptions: count(conn, "SELECT COUNT(*) FROM index_subscription", &all)?, by_arch: count_entries(conn, "user_activity", "arch", &all)?, by_os_version: count_entries(conn, "user_activity", "os_version", &all)?, @@ -397,7 +343,6 @@ fn display_summary(params: WithIoFormat, summary: MetricsSummary) -> Resul println!("Total check-ins: {}", summary.total_checkins); println!("Unique servers: {}", summary.unique_servers); println!("Total package requests: {}", summary.total_package_requests); - println!("Total installs: {}", summary.total_installs); println!("Total subscriptions: {}", summary.total_subscriptions); print_counts("ARCHITECTURE", &summary.by_arch)?; print_counts("OS VERSION", &summary.by_os_version) @@ -592,49 +537,6 @@ fn display_downloads( print_series(&response.series) } -#[derive(Debug, Serialize, Deserialize, VisitFields)] -#[serde(rename_all = "camelCase")] -pub struct InstallsResponse { - pub total_installs: u64, - pub by_package: Vec, - pub by_package_version: Vec, - #[serde(default, skip_serializing_if = "Vec::is_empty")] - pub series: Vec, -} - -rpc_toolkit::reflect_ts!(InstallsResponse); -rpc_toolkit::ts_export!(InstallsResponse, namespaces = [""]); - -pub async fn get_installs( - ctx: RegistryContext, - params: GetDownloadsParams, -) -> Result { - query(ctx, move |conn| { - let filter = params.filter()?; - Ok(InstallsResponse { - total_installs: count(conn, "SELECT COUNT(*) FROM package_install", &filter)?, - by_package: count_entries(conn, "package_install", "pkg_id", &filter)?, - by_package_version: package_version_counts(conn, "package_install", &filter)?, - series: series(conn, "package_install", &filter, params.interval)?, - }) - }) - .await -} - -fn display_installs( - params: WithIoFormat, - response: InstallsResponse, -) -> Result<(), Error> { - if let Some(format) = params.format { - return display_serializable(format, response); - } - - println!("Total installs: {}", response.total_installs); - print_counts("PACKAGE", &response.by_package)?; - print_package_versions(&response.by_package_version)?; - print_series(&response.series) -} - #[derive(Debug, Serialize, Deserialize, VisitFields)] #[serde(rename_all = "camelCase")] pub struct SubscriptionsResponse { @@ -688,7 +590,7 @@ mod tests { fn db() -> rusqlite::Connection { let conn = rusqlite::Connection::open_in_memory().unwrap(); conn.execute_batch( - "CREATE TABLE package_install (id INTEGER PRIMARY KEY, created_at TEXT NOT NULL, pkg_id TEXT NOT NULL, version TEXT NOT NULL);", + "CREATE TABLE package_request (id INTEGER PRIMARY KEY, created_at TEXT NOT NULL, pkg_id TEXT NOT NULL, version TEXT NOT NULL);", ) .unwrap(); for (at, id) in [ @@ -699,7 +601,7 @@ mod tests { ("2026-12-01T00:00:00+00:00", "nextcloud"), ] { conn.execute( - "INSERT INTO package_install (created_at, pkg_id, version) VALUES (?1, ?2, '1.0:0')", + "INSERT INTO package_request (created_at, pkg_id, version) VALUES (?1, ?2, '1.0:0')", params![at, id], ) .unwrap(); @@ -708,7 +610,7 @@ mod tests { } fn periods(interval: MetricsInterval, filter: &Filter) -> Vec<(String, u64)> { - series(&db(), "package_install", filter, Some(interval)) + series(&db(), "package_request", filter, Some(interval)) .unwrap() .into_iter() .map(|p| (p.period, p.count)) @@ -756,7 +658,7 @@ mod tests { let filter = Filter::range(&after.map(str::to_owned), &before.map(str::to_owned)).unwrap(); assert_eq!( - count(&conn, "SELECT COUNT(*) FROM package_install", &filter).unwrap(), + count(&conn, "SELECT COUNT(*) FROM package_request", &filter).unwrap(), expected, ); } @@ -766,7 +668,7 @@ mod tests { "2026-11-03T00:00:00.123000000+00:00", ] { conn.execute( - "INSERT INTO package_install (created_at, pkg_id, version) VALUES (?1, 'nextcloud', '1.0:0')", + "INSERT INTO package_request (created_at, pkg_id, version) VALUES (?1, 'nextcloud', '1.0:0')", params![at], ) .unwrap(); @@ -777,7 +679,7 @@ mod tests { ) .unwrap(); assert_eq!( - count(&conn, "SELECT COUNT(*) FROM package_install", &filter).unwrap(), + count(&conn, "SELECT COUNT(*) FROM package_request", &filter).unwrap(), 3, ); assert!(Filter::range(&Some("invalid".into()), &None).is_err()); @@ -789,11 +691,11 @@ mod tests { .unwrap() .with("pkg_id =", &Some("nextcloud".into())); assert_eq!( - count(&db(), "SELECT COUNT(*) FROM package_install", &filter).unwrap(), + count(&db(), "SELECT COUNT(*) FROM package_request", &filter).unwrap(), 2 ); assert!( - series(&db(), "package_install", &filter, None) + series(&db(), "package_request", &filter, None) .unwrap() .is_empty() ); diff --git a/shared-libs/crates/start-core/src/registry/package/mod.rs b/shared-libs/crates/start-core/src/registry/package/mod.rs index e3d8d833ae..887b82b0ab 100644 --- a/shared-libs/crates/start-core/src/registry/package/mod.rs +++ b/shared-libs/crates/start-core/src/registry/package/mod.rs @@ -114,13 +114,6 @@ pub fn package_api() -> ParentHandler { "version", version::version_api::().with_about("about.commands-package-version"), ) - .subcommand( - "record-install", - from_fn_async(crate::registry::metrics::record_install) - .with_metadata("authenticated", Value::Bool(false)) - .with_metadata(crate::mcp::MCP, Value::Bool(false)) - .no_cli(), - ) .subcommand( "get", from_fn_async(get::get_package) From 2bd905ec5a7eb12c43869877837d55929be2788e Mon Sep 17 00:00:00 2001 From: helix-white <267227783+helix-a@users.noreply.github.com> Date: Sat, 21 Nov 2026 13:36:44 +0000 Subject: [PATCH 6/8] docs(registry): state that metrics add no client requests Co-Authored-By: Claude Opus 5.5 --- shared-libs/crates/start-core/src/registry/metrics.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared-libs/crates/start-core/src/registry/metrics.rs b/shared-libs/crates/start-core/src/registry/metrics.rs index d183e07ef5..416a465d23 100644 --- a/shared-libs/crates/start-core/src/registry/metrics.rs +++ b/shared-libs/crates/start-core/src/registry/metrics.rs @@ -1,3 +1,5 @@ +//! Metric collection observes existing registry requests and adds no client requests. + use chrono::Utc; use clap::{Parser, ValueEnum}; use rpc_toolkit::{Context, HandlerExt, ParentHandler, from_fn_async}; From c613e5d014051d5624d410b5d694dc8abc5235a1 Mon Sep 17 00:00:00 2001 From: helix-red <355572797+helix-red@users.noreply.github.com> Date: Sat, 21 Nov 2026 13:53:23 +0000 Subject: [PATCH 7/8] chore(registry): regenerate TS bindings and start-cli man pages after dropping install reporting Helix-Harness: claude-code Helix-Model: claude-opus-5-5 --- .../man/start-cli-registry-metrics-installs.1 | 43 ------------------ .../man/start-cli-registry-metrics.1 | 3 -- .../lib/osBindings/rpc/registry.schemas.ts | 44 ------------------- .../start-core/lib/osBindings/rpc/registry.ts | 4 -- .../lib/osBindings/types.schemas.ts | 21 --------- .../start-core/lib/osBindings/types.ts | 6 --- 6 files changed, 121 deletions(-) delete mode 100644 projects/start-cli/man/start-cli-registry-metrics-installs.1 diff --git a/projects/start-cli/man/start-cli-registry-metrics-installs.1 b/projects/start-cli/man/start-cli-registry-metrics-installs.1 deleted file mode 100644 index 963bc17942..0000000000 --- a/projects/start-cli/man/start-cli-registry-metrics-installs.1 +++ /dev/null @@ -1,43 +0,0 @@ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.TH start-cli-registry-metrics-installs 1 "installs " -.SH NAME -start\-cli\-registry\-metrics\-installs \- Count package installs and updates reported by StartOS, with optional filters -.SH SYNOPSIS -\fBstart\-cli registry metrics installs\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] -.SH DESCRIPTION -Count package installs and updates reported by StartOS, with optional filters -.SH OPTIONS -.TP -\fB\-\-pkg\-id\fR \fI\fR -Filter by package ID -.TP -\fB\-\-version\fR \fI\fR -Filter by version -.TP -\fB\-\-after\fR \fI\fR -Start of time range (RFC 3339 timestamp) -.TP -\fB\-\-before\fR \fI\fR -End of time range (RFC 3339 timestamp) -.TP -\fB\-\-interval\fR \fI\fR -Also count each day, week (from Monday) or month in the range, in UTC -.br - -.br -\fIPossible values:\fR -.RS 14 -.IP \(bu 2 -day -.IP \(bu 2 -week -.IP \(bu 2 -month -.RE -.TP -\fB\-\-format\fR - -.TP -\fB\-h\fR, \fB\-\-help\fR -Print help diff --git a/projects/start-cli/man/start-cli-registry-metrics.1 b/projects/start-cli/man/start-cli-registry-metrics.1 index 32b54fe03c..6af03c2038 100644 --- a/projects/start-cli/man/start-cli-registry-metrics.1 +++ b/projects/start-cli/man/start-cli-registry-metrics.1 @@ -16,9 +16,6 @@ Print help start\-cli\-registry\-metrics\-downloads(1) Count requests for a specific package version that reached the registry, with optional filters .TP -start\-cli\-registry\-metrics\-installs(1) -Count package installs and updates reported by StartOS, with optional filters -.TP start\-cli\-registry\-metrics\-subscriptions(1) Count package index subscriptions by StartOS version within a time range .TP diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts index 73cec3dcab..ab8f0a3a85 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.schemas.ts @@ -1126,19 +1126,6 @@ export const HardwareRequirements: z.ZodObject<{ }).meta({ id: 'HardwareRequirements', }) -export const InstallsResponse: z.ZodObject<{ - totalInstalls: z.ZodInt - byPackage: z.ZodArray - byPackageVersion: z.ZodArray - series: z.ZodOptional> -}> = /* @__PURE__ */ object({ - totalInstalls: z.int(), - byPackage: z.array(CountEntry), - byPackageVersion: z.array(PackageVersionCount), - series: z.array(PeriodCount).optional(), -}).meta({ - id: 'InstallsResponse', -}) export const ListPackageSignersParams: z.ZodIntersection< z.ZodObject<{ id: typeof PackageId }>, typeof ReaderParams @@ -1151,7 +1138,6 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.ZodInt uniqueServers: z.ZodInt totalPackageRequests: z.ZodInt - totalInstalls: z.ZodInt totalSubscriptions: z.ZodInt byArch: z.ZodArray byOsVersion: z.ZodArray @@ -1159,7 +1145,6 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.int(), uniqueServers: z.int(), totalPackageRequests: z.int(), - totalInstalls: z.int(), totalSubscriptions: z.int(), byArch: z.array(CountEntry), byOsVersion: z.array(CountEntry), @@ -1405,12 +1390,6 @@ export const ReaderKey: z.ZodObject<{ id: 'ReaderKey', description: 'A key allowed to read the private s9pks that list it.', }) -export const RecordInstallParams: z.ZodObject<{ - id: typeof PackageId - version: typeof Version -}> = /* @__PURE__ */ object({ id: PackageId, version: Version }).meta({ - id: 'RecordInstallParams', -}) export const RemoveAdminParams: z.ZodObject<{ signer: typeof Guid }> = /* @__PURE__ */ object({ signer: Guid }).meta({ id: 'RemoveAdminParams', @@ -2365,23 +2344,6 @@ export const Api = { _ITEM: /* @__PURE__ */ z.never(), _FINAL: /* @__PURE__ */ z.null(), }, - installs: { - _PARAMS: /* @__PURE__ */ z.intersection( - z.intersection( - object({ - format: wire( - IoFormat.nullable().optional(), - IoFormat.nullable(), - ), - }), - empty, - ), - GetDownloadsParams, - ), - _RETURN: /* @__PURE__ */ InstallsResponse, - _ITEM: /* @__PURE__ */ z.never(), - _FINAL: /* @__PURE__ */ z.null(), - }, subscriptions: { _PARAMS: /* @__PURE__ */ z.intersection( z.intersection( @@ -2723,12 +2685,6 @@ export const Api = { _ITEM: /* @__PURE__ */ z.never(), _FINAL: /* @__PURE__ */ z.null(), }, - 'record-install': { - _PARAMS: /* @__PURE__ */ RecordInstallParams, - _RETURN: /* @__PURE__ */ z.null(), - _ITEM: /* @__PURE__ */ z.never(), - _FINAL: /* @__PURE__ */ z.null(), - }, remove: { _PARAMS: /* @__PURE__ */ RemovePackageParams, _RETURN: /* @__PURE__ */ z.boolean(), diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts index 951fba2950..feda7ce49e 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/rpc/registry.ts @@ -257,7 +257,6 @@ export type GetDownloadsParamsInput = z.input export type GetPackageParamsInput = z.input export type GetUsersParamsInput = z.input export type HardwareRequirements = z.output -export type InstallsResponse = z.output export type ListPackageSignersParamsInput = z.input< typeof schemas.ListPackageSignersParams > @@ -280,9 +279,6 @@ export type PreDownloadAlert = z.output * A key allowed to read the private s9pks that list it. */ export type ReaderKey = z.output -export type RecordInstallParamsInput = z.input< - typeof schemas.RecordInstallParams -> export type RemoveAdminParamsInput = z.input export type RemoveMirrorParamsInput = z.input export type RemovePackageFromCategoryParamsInput = z.input< diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts b/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts index abd1bd3680..c45acf90e0 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/types.schemas.ts @@ -3644,19 +3644,6 @@ export const InstalledVersionParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'InstalledVersionParams', }) -export const InstallsResponse: z.ZodObject<{ - totalInstalls: z.ZodInt - byPackage: z.ZodArray - byPackageVersion: z.ZodArray - series: z.ZodOptional> -}> = /* @__PURE__ */ object({ - totalInstalls: z.int(), - byPackage: z.array(CountEntry), - byPackageVersion: z.array(PackageVersionCount), - series: z.array(PeriodCount).optional(), -}).meta({ - id: 'InstallsResponse', -}) export const IpInfo: z.ZodObject<{ name: z.ZodString scopeId: z.ZodInt @@ -3913,7 +3900,6 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.ZodInt uniqueServers: z.ZodInt totalPackageRequests: z.ZodInt - totalInstalls: z.ZodInt totalSubscriptions: z.ZodInt byArch: z.ZodArray byOsVersion: z.ZodArray @@ -3921,7 +3907,6 @@ export const MetricsSummary: z.ZodObject<{ totalCheckins: z.int(), uniqueServers: z.int(), totalPackageRequests: z.int(), - totalInstalls: z.int(), totalSubscriptions: z.int(), byArch: z.array(CountEntry), byOsVersion: z.array(CountEntry), @@ -4440,12 +4425,6 @@ export const RebuildParams: z.ZodObject<{ id: typeof PackageId }> = /* @__PURE__ */ object({ id: PackageId }).meta({ id: 'RebuildParams', }) -export const RecordInstallParams: z.ZodObject<{ - id: typeof PackageId - version: typeof Version -}> = /* @__PURE__ */ object({ id: PackageId, version: Version }).meta({ - id: 'RecordInstallParams', -}) export const RegistryIdentity: z.ZodObject<{ name: z.ZodCodec< z.ZodOptional>, diff --git a/shared-libs/ts-modules/start-core/lib/osBindings/types.ts b/shared-libs/ts-modules/start-core/lib/osBindings/types.ts index e4638430e5..dd09c39e11 100644 --- a/shared-libs/ts-modules/start-core/lib/osBindings/types.ts +++ b/shared-libs/ts-modules/start-core/lib/osBindings/types.ts @@ -958,8 +958,6 @@ export type InstalledVersionParams = z.output< export type InstalledVersionParamsInput = z.input< typeof schemas.InstalledVersionParams > -export type InstallsResponse = z.output -export type InstallsResponseInput = z.input export type IpInfo = z.output export type IpInfoInput = z.input export type LegacyAlpnInfo = z.output @@ -1116,10 +1114,6 @@ export type ReaderKey = z.output export type ReaderKeyInput = z.input export type RebuildParams = z.output export type RebuildParamsInput = z.input -export type RecordInstallParams = z.output -export type RecordInstallParamsInput = z.input< - typeof schemas.RecordInstallParams -> export type RegistryIdentity = z.output export type RegistryIdentityInput = z.input export type RemoveAcmeParams = z.output From 6382dadfc4845292425b81054d12e5c9d38e408b Mon Sep 17 00:00:00 2001 From: helix-red <355572797+helix-red@users.noreply.github.com> Date: Sat, 21 Nov 2026 13:53:23 +0000 Subject: [PATCH 8/8] fix(registry): prune stale start-registry man pages on export export_manpage_start_registry called clap_mangen directly, bypassing bins::export_manpages, so pages for deleted subcommands survived and trailing whitespace was never trimmed. It now uses the shared exporter like start-cli and start-tunnel; the re-export removes start-registry-metrics-installs.1 and trims every page. Helix-Harness: claude-code Helix-Model: claude-opus-5-5 --- .../man/start-registry-admin-add.1 | 4 +- .../man/start-registry-admin-list.1 | 4 +- .../man/start-registry-admin-reader-add.1 | 4 +- .../man/start-registry-admin-reader-edit.1 | 4 +- .../man/start-registry-admin-reader-list.1 | 4 +- .../man/start-registry-admin-reader-remove.1 | 4 +- .../man/start-registry-admin-reader.1 | 2 +- .../man/start-registry-admin-remove.1 | 4 +- .../man/start-registry-admin-signer-add.1 | 4 +- .../man/start-registry-admin-signer-edit.1 | 4 +- .../man/start-registry-admin-signer-list.1 | 4 +- .../man/start-registry-admin-signer-remove.1 | 4 +- .../man/start-registry-admin-signer.1 | 2 +- .../start-registry/man/start-registry-admin.1 | 2 +- .../man/start-registry-db-apply.1 | 4 +- .../man/start-registry-db-dump.1 | 4 +- .../start-registry/man/start-registry-db.1 | 2 +- .../start-registry/man/start-registry-index.1 | 4 +- .../start-registry-info-set-default-locale.1 | 4 +- .../man/start-registry-info-set-description.1 | 4 +- .../man/start-registry-info-set-icon.1 | 4 +- .../man/start-registry-info-set-name.1 | 4 +- .../start-registry-info-set-trust-signers.1 | 4 +- .../start-registry/man/start-registry-info.1 | 2 +- .../man/start-registry-metrics-downloads.1 | 4 +- .../man/start-registry-metrics-installs.1 | 43 ------------------- .../start-registry-metrics-subscriptions.1 | 4 +- .../man/start-registry-metrics-summary.1 | 4 +- .../man/start-registry-metrics-users.1 | 4 +- .../man/start-registry-metrics.1 | 5 +-- .../man/start-registry-os-asset-add.1 | 4 +- .../man/start-registry-os-asset-get-img.1 | 4 +- .../man/start-registry-os-asset-get-iso.1 | 4 +- .../start-registry-os-asset-get-squashfs.1 | 4 +- .../man/start-registry-os-asset-get.1 | 2 +- .../man/start-registry-os-asset-remove-img.1 | 4 +- .../man/start-registry-os-asset-remove-iso.1 | 4 +- .../start-registry-os-asset-remove-squashfs.1 | 4 +- .../man/start-registry-os-asset-remove.1 | 2 +- .../man/start-registry-os-asset-sign.1 | 4 +- .../man/start-registry-os-asset.1 | 2 +- .../man/start-registry-os-index.1 | 4 +- .../man/start-registry-os-promote.1 | 4 +- .../man/start-registry-os-version-add.1 | 4 +- .../man/start-registry-os-version-edit.1 | 4 +- .../man/start-registry-os-version-get.1 | 4 +- .../man/start-registry-os-version-remove.1 | 4 +- .../start-registry-os-version-signer-add.1 | 4 +- .../start-registry-os-version-signer-list.1 | 4 +- .../start-registry-os-version-signer-remove.1 | 4 +- .../man/start-registry-os-version-signer.1 | 2 +- .../man/start-registry-os-version.1 | 2 +- .../start-registry/man/start-registry-os.1 | 2 +- .../man/start-registry-package-add-mirror.1 | 4 +- .../man/start-registry-package-add.1 | 4 +- ...rt-registry-package-category-add-package.1 | 4 +- .../man/start-registry-package-category-add.1 | 4 +- .../start-registry-package-category-list.1 | 4 +- ...registry-package-category-remove-package.1 | 4 +- .../start-registry-package-category-remove.1 | 4 +- .../man/start-registry-package-category.1 | 2 +- .../man/start-registry-package-download.1 | 4 +- .../man/start-registry-package-get.1 | 4 +- .../man/start-registry-package-index.1 | 4 +- .../man/start-registry-package-promote.1 | 4 +- .../start-registry-package-remove-mirror.1 | 4 +- .../man/start-registry-package-remove.1 | 4 +- .../man/start-registry-package-sign.1 | 4 +- .../man/start-registry-package-signer-add.1 | 4 +- .../man/start-registry-package-signer-list.1 | 4 +- .../start-registry-package-signer-remove.1 | 4 +- .../man/start-registry-package-signer.1 | 2 +- .../start-registry-package-version-export.1 | 4 +- .../man/start-registry-package-version.1 | 2 +- .../man/start-registry-package.1 | 2 +- projects/start-registry/man/start-registry.1 | 2 +- .../crates/start-core/src/bins/registry.rs | 3 +- 77 files changed, 134 insertions(+), 181 deletions(-) delete mode 100644 projects/start-registry/man/start-registry-metrics-installs.1 diff --git a/projects/start-registry/man/start-registry-admin-add.1 b/projects/start-registry/man/start-registry-admin-add.1 index 210a982c21..a5fe6bf9cf 100644 --- a/projects/start-registry/man/start-registry-admin-add.1 +++ b/projects/start-registry/man/start-registry-admin-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-add 1 "add " +.TH start-registry-admin-add 1 "add " .SH NAME start\-registry\-admin\-add \- Add admin signer .SH SYNOPSIS -\fBstart\-registry admin add\fR [\fB\-h\fR|\fB\-\-help\fR] <\fISIGNER\fR> [\fIDATABASE\fR] +\fBstart\-registry admin add\fR [\fB\-h\fR|\fB\-\-help\fR] <\fISIGNER\fR> [\fIDATABASE\fR] .SH DESCRIPTION Add admin signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-list.1 b/projects/start-registry/man/start-registry-admin-list.1 index 5d3fc668ff..9e9c73768b 100644 --- a/projects/start-registry/man/start-registry-admin-list.1 +++ b/projects/start-registry/man/start-registry-admin-list.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-list 1 "list " +.TH start-registry-admin-list 1 "list " .SH NAME start\-registry\-admin\-list \- List admin signers .SH SYNOPSIS -\fBstart\-registry admin list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry admin list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List admin signers .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-reader-add.1 b/projects/start-registry/man/start-registry-admin-reader-add.1 index 3ca2dc6889..47ada58740 100644 --- a/projects/start-registry/man/start-registry-admin-reader-add.1 +++ b/projects/start-registry/man/start-registry-admin-reader-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-reader-add 1 "add " +.TH start-registry-admin-reader-add 1 "add " .SH NAME start\-registry\-admin\-reader\-add \- Register a key that private s9pks can grant read access to .SH SYNOPSIS -\fBstart\-registry admin reader add\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fILABEL\fR> <\fIKEY\fR> +\fBstart\-registry admin reader add\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fILABEL\fR> <\fIKEY\fR> .SH DESCRIPTION Register a key that private s9pks can grant read access to .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-reader-edit.1 b/projects/start-registry/man/start-registry-admin-reader-edit.1 index 570254fc3b..ebc247b65a 100644 --- a/projects/start-registry/man/start-registry-admin-reader-edit.1 +++ b/projects/start-registry/man/start-registry-admin-reader-edit.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-reader-edit 1 "edit " +.TH start-registry-admin-reader-edit 1 "edit " .SH NAME start\-registry\-admin\-reader\-edit \- Change the label of a registry reader key .SH SYNOPSIS -\fBstart\-registry admin reader edit\fR <\fB\-\-label\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry admin reader edit\fR <\fB\-\-label\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION Change the label of a registry reader key .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-reader-list.1 b/projects/start-registry/man/start-registry-admin-reader-list.1 index 32962206ae..7e26acc33e 100644 --- a/projects/start-registry/man/start-registry-admin-reader-list.1 +++ b/projects/start-registry/man/start-registry-admin-reader-list.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-reader-list 1 "list " +.TH start-registry-admin-reader-list 1 "list " .SH NAME start\-registry\-admin\-reader\-list \- List registry reader keys .SH SYNOPSIS -\fBstart\-registry admin reader list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry admin reader list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List registry reader keys .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-reader-remove.1 b/projects/start-registry/man/start-registry-admin-reader-remove.1 index 349af8e035..1c1b7b2a4e 100644 --- a/projects/start-registry/man/start-registry-admin-reader-remove.1 +++ b/projects/start-registry/man/start-registry-admin-reader-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-reader-remove 1 "remove " +.TH start-registry-admin-reader-remove 1 "remove " .SH NAME start\-registry\-admin\-reader\-remove \- Remove a registry reader key and revoke it from every private s9pk .SH SYNOPSIS -\fBstart\-registry admin reader remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry admin reader remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION Remove a registry reader key and revoke it from every private s9pk .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-reader.1 b/projects/start-registry/man/start-registry-admin-reader.1 index 0893efb1a0..d5506eaecf 100644 --- a/projects/start-registry/man/start-registry-admin-reader.1 +++ b/projects/start-registry/man/start-registry-admin-reader.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-reader 1 "reader " +.TH start-registry-admin-reader 1 "reader " .SH NAME start\-registry\-admin\-reader \- Commands to add, list, edit, or remove registry reader keys .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-admin-remove.1 b/projects/start-registry/man/start-registry-admin-remove.1 index 4c4ac020f4..9ddb68e5d4 100644 --- a/projects/start-registry/man/start-registry-admin-remove.1 +++ b/projects/start-registry/man/start-registry-admin-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-remove 1 "remove " +.TH start-registry-admin-remove 1 "remove " .SH NAME start\-registry\-admin\-remove \- Remove admin signer .SH SYNOPSIS -\fBstart\-registry admin remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fISIGNER\fR> +\fBstart\-registry admin remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fISIGNER\fR> .SH DESCRIPTION Remove admin signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-signer-add.1 b/projects/start-registry/man/start-registry-admin-signer-add.1 index 0f76e839a7..c659f09986 100644 --- a/projects/start-registry/man/start-registry-admin-signer-add.1 +++ b/projects/start-registry/man/start-registry-admin-signer-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-signer-add 1 "add " +.TH start-registry-admin-signer-add 1 "add " .SH NAME start\-registry\-admin\-signer\-add \- Add signer .SH SYNOPSIS -\fBstart\-registry admin signer add\fR <\fB\-n\fR|\fB\-\-name\fR> [\fB\-c\fR|\fB\-\-contact\fR] [\fB\-\-key\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIDATABASE\fR] +\fBstart\-registry admin signer add\fR <\fB\-n\fR|\fB\-\-name\fR> [\fB\-c\fR|\fB\-\-contact\fR] [\fB\-\-key\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIDATABASE\fR] .SH DESCRIPTION Add signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-signer-edit.1 b/projects/start-registry/man/start-registry-admin-signer-edit.1 index 13b3fa0e1d..5fc3f642db 100644 --- a/projects/start-registry/man/start-registry-admin-signer-edit.1 +++ b/projects/start-registry/man/start-registry-admin-signer-edit.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-signer-edit 1 "edit " +.TH start-registry-admin-signer-edit 1 "edit " .SH NAME start\-registry\-admin\-signer\-edit \- Edit signer information .SH SYNOPSIS -\fBstart\-registry admin signer edit\fR [\fB\-n\fR|\fB\-\-set\-name\fR] [\fB\-c\fR|\fB\-\-add\-contact\fR] [\fB\-k\fR|\fB\-\-add\-key\fR] [\fB\-C\fR|\fB\-\-remove\-contact\fR] [\fB\-K\fR|\fB\-\-remove\-key\fR] [\fB\-\-remove\-gpg\-export\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry admin signer edit\fR [\fB\-n\fR|\fB\-\-set\-name\fR] [\fB\-c\fR|\fB\-\-add\-contact\fR] [\fB\-k\fR|\fB\-\-add\-key\fR] [\fB\-C\fR|\fB\-\-remove\-contact\fR] [\fB\-K\fR|\fB\-\-remove\-key\fR] [\fB\-\-remove\-gpg\-export\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION Edit signer information .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-signer-list.1 b/projects/start-registry/man/start-registry-admin-signer-list.1 index 7eb546a321..aad2d27278 100644 --- a/projects/start-registry/man/start-registry-admin-signer-list.1 +++ b/projects/start-registry/man/start-registry-admin-signer-list.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-signer-list 1 "list " +.TH start-registry-admin-signer-list 1 "list " .SH NAME start\-registry\-admin\-signer\-list \- List signers .SH SYNOPSIS -\fBstart\-registry admin signer list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry admin signer list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List signers .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-signer-remove.1 b/projects/start-registry/man/start-registry-admin-signer-remove.1 index 9a5e2726f3..8b8895446a 100644 --- a/projects/start-registry/man/start-registry-admin-signer-remove.1 +++ b/projects/start-registry/man/start-registry-admin-signer-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-signer-remove 1 "remove " +.TH start-registry-admin-signer-remove 1 "remove " .SH NAME start\-registry\-admin\-signer\-remove \- Remove signer and all their authorizations .SH SYNOPSIS -\fBstart\-registry admin signer remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry admin signer remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION Remove signer and all their authorizations .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-admin-signer.1 b/projects/start-registry/man/start-registry-admin-signer.1 index f7499e6953..62197bc30f 100644 --- a/projects/start-registry/man/start-registry-admin-signer.1 +++ b/projects/start-registry/man/start-registry-admin-signer.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin-signer 1 "signer " +.TH start-registry-admin-signer 1 "signer " .SH NAME start\-registry\-admin\-signer \- Commands to add or list signers .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-admin.1 b/projects/start-registry/man/start-registry-admin.1 index a6da46915c..bbf1527820 100644 --- a/projects/start-registry/man/start-registry-admin.1 +++ b/projects/start-registry/man/start-registry-admin.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-admin 1 "admin " +.TH start-registry-admin 1 "admin " .SH NAME start\-registry\-admin \- Commands to add or list admins or signers .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-db-apply.1 b/projects/start-registry/man/start-registry-db-apply.1 index d2b24cd2fe..3ed252a35c 100644 --- a/projects/start-registry/man/start-registry-db-apply.1 +++ b/projects/start-registry/man/start-registry-db-apply.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-db-apply 1 "apply " +.TH start-registry-db-apply 1 "apply " .SH NAME start\-registry\-db\-apply \- Update a database record .SH SYNOPSIS -\fBstart\-registry db apply\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIEXPR\fR> [\fIPATH\fR] +\fBstart\-registry db apply\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIEXPR\fR> [\fIPATH\fR] .SH DESCRIPTION Update a database record .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-db-dump.1 b/projects/start-registry/man/start-registry-db-dump.1 index 5a6bf11fe9..bafa098151 100644 --- a/projects/start-registry/man/start-registry-db-dump.1 +++ b/projects/start-registry/man/start-registry-db-dump.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-db-dump 1 "dump " +.TH start-registry-db-dump 1 "dump " .SH NAME start\-registry\-db\-dump \- Filter and query the database .SH SYNOPSIS -\fBstart\-registry db dump\fR [\fB\-p\fR|\fB\-\-pointer\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIPATH\fR] +\fBstart\-registry db dump\fR [\fB\-p\fR|\fB\-\-pointer\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIPATH\fR] .SH DESCRIPTION Filter and query the database .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-db.1 b/projects/start-registry/man/start-registry-db.1 index c57bd858d9..b41a3a8cc9 100644 --- a/projects/start-registry/man/start-registry-db.1 +++ b/projects/start-registry/man/start-registry-db.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-db 1 "db " +.TH start-registry-db 1 "db " .SH NAME start\-registry\-db \- Commands to interact with the db i.e. dump and apply .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-index.1 b/projects/start-registry/man/start-registry-index.1 index 379946168f..cb2e0f28e5 100644 --- a/projects/start-registry/man/start-registry-index.1 +++ b/projects/start-registry/man/start-registry-index.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-index 1 "index " +.TH start-registry-index 1 "index " .SH NAME start\-registry\-index \- List registry info and packages .SH SYNOPSIS -\fBstart\-registry index\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry index\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List registry info and packages .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-info-set-default-locale.1 b/projects/start-registry/man/start-registry-info-set-default-locale.1 index f94db642d4..249353412f 100644 --- a/projects/start-registry/man/start-registry-info-set-default-locale.1 +++ b/projects/start-registry/man/start-registry-info-set-default-locale.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-info-set-default-locale 1 "set-default-locale " +.TH start-registry-info-set-default-locale 1 "set-default-locale " .SH NAME start\-registry\-info\-set\-default\-locale \- Set the locale the registry\*(Aqs own text falls back to .SH SYNOPSIS -\fBstart\-registry info set\-default\-locale\fR [\fB\-\-clear\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIDEFAULT_LOCALE\fR] +\fBstart\-registry info set\-default\-locale\fR [\fB\-\-clear\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIDEFAULT_LOCALE\fR] .SH DESCRIPTION Set the locale the registry\*(Aqs own text falls back to .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-info-set-description.1 b/projects/start-registry/man/start-registry-info-set-description.1 index 3785df5ea0..bff16c870a 100644 --- a/projects/start-registry/man/start-registry-info-set-description.1 +++ b/projects/start-registry/man/start-registry-info-set-description.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-info-set-description 1 "set-description " +.TH start-registry-info-set-description 1 "set-description " .SH NAME start\-registry\-info\-set\-description \- Set the registry description .SH SYNOPSIS -\fBstart\-registry info set\-description\fR [\fB\-\-clear\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIDESCRIPTION\fR] +\fBstart\-registry info set\-description\fR [\fB\-\-clear\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIDESCRIPTION\fR] .SH DESCRIPTION Set the registry description .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-info-set-icon.1 b/projects/start-registry/man/start-registry-info-set-icon.1 index ab3987fbfe..c623569942 100644 --- a/projects/start-registry/man/start-registry-info-set-icon.1 +++ b/projects/start-registry/man/start-registry-info-set-icon.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-info-set-icon 1 "set-icon " +.TH start-registry-info-set-icon 1 "set-icon " .SH NAME start\-registry\-info\-set\-icon \- Set the registry icon .SH SYNOPSIS -\fBstart\-registry info set\-icon\fR [\fB\-\-clear\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIICON\fR] +\fBstart\-registry info set\-icon\fR [\fB\-\-clear\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIICON\fR] .SH DESCRIPTION Set the registry icon .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-info-set-name.1 b/projects/start-registry/man/start-registry-info-set-name.1 index b80ef698e1..8f01514e06 100644 --- a/projects/start-registry/man/start-registry-info-set-name.1 +++ b/projects/start-registry/man/start-registry-info-set-name.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-info-set-name 1 "set-name " +.TH start-registry-info-set-name 1 "set-name " .SH NAME start\-registry\-info\-set\-name \- Set the registry name .SH SYNOPSIS -\fBstart\-registry info set\-name\fR [\fB\-h\fR|\fB\-\-help\fR] <\fINAME\fR> +\fBstart\-registry info set\-name\fR [\fB\-h\fR|\fB\-\-help\fR] <\fINAME\fR> .SH DESCRIPTION Set the registry name .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-info-set-trust-signers.1 b/projects/start-registry/man/start-registry-info-set-trust-signers.1 index c2128135ea..159d4545f2 100644 --- a/projects/start-registry/man/start-registry-info-set-trust-signers.1 +++ b/projects/start-registry/man/start-registry-info-set-trust-signers.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-info-set-trust-signers 1 "set-trust-signers " +.TH start-registry-info-set-trust-signers 1 "set-trust-signers " .SH NAME start\-registry\-info\-set\-trust\-signers \- Select the signers proposed for package trust; no signers clears the selection .SH SYNOPSIS -\fBstart\-registry info set\-trust\-signers\fR [\fB\-h\fR|\fB\-\-help\fR] [\fISIGNER\fR] +\fBstart\-registry info set\-trust\-signers\fR [\fB\-h\fR|\fB\-\-help\fR] [\fISIGNER\fR] .SH DESCRIPTION Select the signers proposed for package trust; no signers clears the selection .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-info.1 b/projects/start-registry/man/start-registry-info.1 index 16f1ffca41..15382db47e 100644 --- a/projects/start-registry/man/start-registry-info.1 +++ b/projects/start-registry/man/start-registry-info.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-info 1 "info " +.TH start-registry-info 1 "info " .SH NAME start\-registry\-info \- View or edit registry information .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-metrics-downloads.1 b/projects/start-registry/man/start-registry-metrics-downloads.1 index 59aefe7d66..580d85e4fe 100644 --- a/projects/start-registry/man/start-registry-metrics-downloads.1 +++ b/projects/start-registry/man/start-registry-metrics-downloads.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-metrics-downloads 1 "downloads " +.TH start-registry-metrics-downloads 1 "downloads " .SH NAME start\-registry\-metrics\-downloads \- Count requests for a specific package version that reached the registry, with optional filters .SH SYNOPSIS -\fBstart\-registry metrics downloads\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry metrics downloads\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Count requests for a specific package version that reached the registry, with optional filters .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-metrics-installs.1 b/projects/start-registry/man/start-registry-metrics-installs.1 deleted file mode 100644 index c555482dd0..0000000000 --- a/projects/start-registry/man/start-registry-metrics-installs.1 +++ /dev/null @@ -1,43 +0,0 @@ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.TH start-registry-metrics-installs 1 "installs " -.SH NAME -start\-registry\-metrics\-installs \- Count package installs and updates reported by StartOS, with optional filters -.SH SYNOPSIS -\fBstart\-registry metrics installs\fR [\fB\-\-pkg\-id\fR] [\fB\-\-version\fR] [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] -.SH DESCRIPTION -Count package installs and updates reported by StartOS, with optional filters -.SH OPTIONS -.TP -\fB\-\-pkg\-id\fR \fI\fR -Filter by package ID -.TP -\fB\-\-version\fR \fI\fR -Filter by version -.TP -\fB\-\-after\fR \fI\fR -Start of time range (RFC 3339 timestamp) -.TP -\fB\-\-before\fR \fI\fR -End of time range (RFC 3339 timestamp) -.TP -\fB\-\-interval\fR \fI\fR -Also count each day, week (from Monday) or month in the range, in UTC -.br - -.br -\fIPossible values:\fR -.RS 14 -.IP \(bu 2 -day -.IP \(bu 2 -week -.IP \(bu 2 -month -.RE -.TP -\fB\-\-format\fR - -.TP -\fB\-h\fR, \fB\-\-help\fR -Print help diff --git a/projects/start-registry/man/start-registry-metrics-subscriptions.1 b/projects/start-registry/man/start-registry-metrics-subscriptions.1 index e097d9516c..09b263b936 100644 --- a/projects/start-registry/man/start-registry-metrics-subscriptions.1 +++ b/projects/start-registry/man/start-registry-metrics-subscriptions.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-metrics-subscriptions 1 "subscriptions " +.TH start-registry-metrics-subscriptions 1 "subscriptions " .SH NAME start\-registry\-metrics\-subscriptions \- Count package index subscriptions by StartOS version within a time range .SH SYNOPSIS -\fBstart\-registry metrics subscriptions\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry metrics subscriptions\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Count package index subscriptions by StartOS version within a time range .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-metrics-summary.1 b/projects/start-registry/man/start-registry-metrics-summary.1 index 571c3e14b4..1ed9dc7ef9 100644 --- a/projects/start-registry/man/start-registry-metrics-summary.1 +++ b/projects/start-registry/man/start-registry-metrics-summary.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-metrics-summary 1 "summary " +.TH start-registry-metrics-summary 1 "summary " .SH NAME start\-registry\-metrics\-summary \- Get a summary of registry usage metrics .SH SYNOPSIS -\fBstart\-registry metrics summary\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry metrics summary\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Get a summary of registry usage metrics .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-metrics-users.1 b/projects/start-registry/man/start-registry-metrics-users.1 index 89a546b622..956a7d0539 100644 --- a/projects/start-registry/man/start-registry-metrics-users.1 +++ b/projects/start-registry/man/start-registry-metrics-users.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-metrics-users 1 "users " +.TH start-registry-metrics-users 1 "users " .SH NAME start\-registry\-metrics\-users \- Count unique active users within a time range .SH SYNOPSIS -\fBstart\-registry metrics users\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry metrics users\fR [\fB\-\-after\fR] [\fB\-\-before\fR] [\fB\-\-interval\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Count unique active users within a time range .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-metrics.1 b/projects/start-registry/man/start-registry-metrics.1 index 57a97e85cf..25bacd24d3 100644 --- a/projects/start-registry/man/start-registry-metrics.1 +++ b/projects/start-registry/man/start-registry-metrics.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-metrics 1 "metrics " +.TH start-registry-metrics 1 "metrics " .SH NAME start\-registry\-metrics \- Query registry usage metrics .SH SYNOPSIS @@ -16,9 +16,6 @@ Print help start\-registry\-metrics\-downloads(1) Count requests for a specific package version that reached the registry, with optional filters .TP -start\-registry\-metrics\-installs(1) -Count package installs and updates reported by StartOS, with optional filters -.TP start\-registry\-metrics\-subscriptions(1) Count package index subscriptions by StartOS version within a time range .TP diff --git a/projects/start-registry/man/start-registry-os-asset-add.1 b/projects/start-registry/man/start-registry-os-asset-add.1 index 68509e04d4..13bb8f4141 100644 --- a/projects/start-registry/man/start-registry-os-asset-add.1 +++ b/projects/start-registry/man/start-registry-os-asset-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-add 1 "add " +.TH start-registry-os-asset-add 1 "add " .SH NAME start\-registry\-os\-asset\-add \- Add asset to registry .SH SYNOPSIS -\fBstart\-registry os asset add\fR <\fB\-p\fR|\fB\-\-platform\fR> <\fB\-v\fR|\fB\-\-version\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> <\fIURL\fR> +\fBstart\-registry os asset add\fR <\fB\-p\fR|\fB\-\-platform\fR> <\fB\-v\fR|\fB\-\-version\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> <\fIURL\fR> .SH DESCRIPTION Add asset to registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-get-img.1 b/projects/start-registry/man/start-registry-os-asset-get-img.1 index c37133dc0d..e056ff310d 100644 --- a/projects/start-registry/man/start-registry-os-asset-get-img.1 +++ b/projects/start-registry/man/start-registry-os-asset-get-img.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-get-img 1 "img " +.TH start-registry-os-asset-get-img 1 "img " .SH NAME start\-registry\-os\-asset\-get\-img \- Download IMG file .SH SYNOPSIS -\fBstart\-registry os asset get img\fR [\fB\-d\fR|\fB\-\-download\fR] [\fB\-r\fR|\fB\-\-reverify\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> +\fBstart\-registry os asset get img\fR [\fB\-d\fR|\fB\-\-download\fR] [\fB\-r\fR|\fB\-\-reverify\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> .SH DESCRIPTION Download IMG file .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-get-iso.1 b/projects/start-registry/man/start-registry-os-asset-get-iso.1 index 0d7b7a1e73..9a2a3dc30c 100644 --- a/projects/start-registry/man/start-registry-os-asset-get-iso.1 +++ b/projects/start-registry/man/start-registry-os-asset-get-iso.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-get-iso 1 "iso " +.TH start-registry-os-asset-get-iso 1 "iso " .SH NAME start\-registry\-os\-asset\-get\-iso \- Download ISO file .SH SYNOPSIS -\fBstart\-registry os asset get iso\fR [\fB\-d\fR|\fB\-\-download\fR] [\fB\-r\fR|\fB\-\-reverify\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> +\fBstart\-registry os asset get iso\fR [\fB\-d\fR|\fB\-\-download\fR] [\fB\-r\fR|\fB\-\-reverify\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> .SH DESCRIPTION Download ISO file .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-get-squashfs.1 b/projects/start-registry/man/start-registry-os-asset-get-squashfs.1 index b7d311e47d..0823b6bfbd 100644 --- a/projects/start-registry/man/start-registry-os-asset-get-squashfs.1 +++ b/projects/start-registry/man/start-registry-os-asset-get-squashfs.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-get-squashfs 1 "squashfs " +.TH start-registry-os-asset-get-squashfs 1 "squashfs " .SH NAME start\-registry\-os\-asset\-get\-squashfs \- Download squashfs file .SH SYNOPSIS -\fBstart\-registry os asset get squashfs\fR [\fB\-d\fR|\fB\-\-download\fR] [\fB\-r\fR|\fB\-\-reverify\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> +\fBstart\-registry os asset get squashfs\fR [\fB\-d\fR|\fB\-\-download\fR] [\fB\-r\fR|\fB\-\-reverify\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> .SH DESCRIPTION Download squashfs file .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-get.1 b/projects/start-registry/man/start-registry-os-asset-get.1 index e0cc23d1b6..cbf035e529 100644 --- a/projects/start-registry/man/start-registry-os-asset-get.1 +++ b/projects/start-registry/man/start-registry-os-asset-get.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-get 1 "get " +.TH start-registry-os-asset-get 1 "get " .SH NAME start\-registry\-os\-asset\-get \- Commands to download image, iso, or squashfs files .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-os-asset-remove-img.1 b/projects/start-registry/man/start-registry-os-asset-remove-img.1 index 33accc3003..19fe8410c8 100644 --- a/projects/start-registry/man/start-registry-os-asset-remove-img.1 +++ b/projects/start-registry/man/start-registry-os-asset-remove-img.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-remove-img 1 "img " +.TH start-registry-os-asset-remove-img 1 "img " .SH NAME start\-registry\-os\-asset\-remove\-img \- Remove IMG file from registry .SH SYNOPSIS -\fBstart\-registry os asset remove img\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> +\fBstart\-registry os asset remove img\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> .SH DESCRIPTION Remove IMG file from registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-remove-iso.1 b/projects/start-registry/man/start-registry-os-asset-remove-iso.1 index 005cc11bec..e776640dad 100644 --- a/projects/start-registry/man/start-registry-os-asset-remove-iso.1 +++ b/projects/start-registry/man/start-registry-os-asset-remove-iso.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-remove-iso 1 "iso " +.TH start-registry-os-asset-remove-iso 1 "iso " .SH NAME start\-registry\-os\-asset\-remove\-iso \- Remove ISO file from registry .SH SYNOPSIS -\fBstart\-registry os asset remove iso\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> +\fBstart\-registry os asset remove iso\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> .SH DESCRIPTION Remove ISO file from registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-remove-squashfs.1 b/projects/start-registry/man/start-registry-os-asset-remove-squashfs.1 index 7845e7c958..facabd95b0 100644 --- a/projects/start-registry/man/start-registry-os-asset-remove-squashfs.1 +++ b/projects/start-registry/man/start-registry-os-asset-remove-squashfs.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-remove-squashfs 1 "squashfs " +.TH start-registry-os-asset-remove-squashfs 1 "squashfs " .SH NAME start\-registry\-os\-asset\-remove\-squashfs \- Remove squashfs file from registry .SH SYNOPSIS -\fBstart\-registry os asset remove squashfs\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> +\fBstart\-registry os asset remove squashfs\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIPLATFORM\fR> .SH DESCRIPTION Remove squashfs file from registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset-remove.1 b/projects/start-registry/man/start-registry-os-asset-remove.1 index 34213596cf..3a7a7f6791 100644 --- a/projects/start-registry/man/start-registry-os-asset-remove.1 +++ b/projects/start-registry/man/start-registry-os-asset-remove.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-remove 1 "remove " +.TH start-registry-os-asset-remove 1 "remove " .SH NAME start\-registry\-os\-asset\-remove \- Commands to remove image, iso, or squashfs files .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-os-asset-sign.1 b/projects/start-registry/man/start-registry-os-asset-sign.1 index c092dc36b2..40613194c0 100644 --- a/projects/start-registry/man/start-registry-os-asset-sign.1 +++ b/projects/start-registry/man/start-registry-os-asset-sign.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset-sign 1 "sign " +.TH start-registry-os-asset-sign 1 "sign " .SH NAME start\-registry\-os\-asset\-sign \- Sign file and add to registry .SH SYNOPSIS -\fBstart\-registry os asset sign\fR <\fB\-p\fR|\fB\-\-platform\fR> <\fB\-v\fR|\fB\-\-version\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> +\fBstart\-registry os asset sign\fR <\fB\-p\fR|\fB\-\-platform\fR> <\fB\-v\fR|\fB\-\-version\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> .SH DESCRIPTION Sign file and add to registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-asset.1 b/projects/start-registry/man/start-registry-os-asset.1 index 5ab4840b15..b5dcb13ce8 100644 --- a/projects/start-registry/man/start-registry-os-asset.1 +++ b/projects/start-registry/man/start-registry-os-asset.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-asset 1 "asset " +.TH start-registry-os-asset 1 "asset " .SH NAME start\-registry\-os\-asset \- Commands to add, sign, remove, or get registry assets .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-os-index.1 b/projects/start-registry/man/start-registry-os-index.1 index 0a18e236e4..9fa28c571d 100644 --- a/projects/start-registry/man/start-registry-os-index.1 +++ b/projects/start-registry/man/start-registry-os-index.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-index 1 "index " +.TH start-registry-os-index 1 "index " .SH NAME start\-registry\-os\-index \- List OS versions index .SH SYNOPSIS -\fBstart\-registry os index\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry os index\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List OS versions index .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-promote.1 b/projects/start-registry/man/start-registry-os-promote.1 index 8c69afaf75..c40e93a4dc 100644 --- a/projects/start-registry/man/start-registry-os-promote.1 +++ b/projects/start-registry/man/start-registry-os-promote.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-promote 1 "promote " +.TH start-registry-os-promote 1 "promote " .SH NAME start\-registry\-os\-promote \- Promote an OS version from one registry to another .SH SYNOPSIS -\fBstart\-registry os promote\fR [\fB\-\-from\fR] [\fB\-\-to\fR] [\fB\-\-expected\-git\-hash\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> +\fBstart\-registry os promote\fR [\fB\-\-from\fR] [\fB\-\-to\fR] [\fB\-\-expected\-git\-hash\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> .SH DESCRIPTION Promote an OS version from one registry to another .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-add.1 b/projects/start-registry/man/start-registry-os-version-add.1 index def2622a9a..eeba85e950 100644 --- a/projects/start-registry/man/start-registry-os-version-add.1 +++ b/projects/start-registry/man/start-registry-os-version-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-add 1 "add " +.TH start-registry-os-version-add 1 "add " .SH NAME start\-registry\-os\-version\-add \- Add OS version .SH SYNOPSIS -\fBstart\-registry os version add\fR [\fB\-\-git\-hash\fR] [\fB\-\-expected\-git\-hash\fR] [\fB\-\-security\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIRELEASE_NOTES_OR_JSON\fR> <\fISOURCE_VERSION\fR> +\fBstart\-registry os version add\fR [\fB\-\-git\-hash\fR] [\fB\-\-expected\-git\-hash\fR] [\fB\-\-security\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fIRELEASE_NOTES_OR_JSON\fR> <\fISOURCE_VERSION\fR> .SH DESCRIPTION Add OS version .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-edit.1 b/projects/start-registry/man/start-registry-os-version-edit.1 index bcd467a8a8..e14f199e27 100644 --- a/projects/start-registry/man/start-registry-os-version-edit.1 +++ b/projects/start-registry/man/start-registry-os-version-edit.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-edit 1 "edit " +.TH start-registry-os-version-edit 1 "edit " .SH NAME start\-registry\-os\-version\-edit \- Edit OS version metadata; omitted fields remain unchanged .SH SYNOPSIS -\fBstart\-registry os version edit\fR [\fB\-\-release\-notes\fR] [\fB\-\-source\-version\fR] [\fB\-\-git\-hash\fR] [\fB\-\-expected\-git\-hash\fR] [\fB\-\-security\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> +\fBstart\-registry os version edit\fR [\fB\-\-release\-notes\fR] [\fB\-\-source\-version\fR] [\fB\-\-git\-hash\fR] [\fB\-\-expected\-git\-hash\fR] [\fB\-\-security\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> .SH DESCRIPTION Edit OS version metadata; omitted fields remain unchanged .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-get.1 b/projects/start-registry/man/start-registry-os-version-get.1 index 6b33463814..30de0d4b1d 100644 --- a/projects/start-registry/man/start-registry-os-version-get.1 +++ b/projects/start-registry/man/start-registry-os-version-get.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-get 1 "get " +.TH start-registry-os-version-get 1 "get " .SH NAME start\-registry\-os\-version\-get \- Get OS versions info .SH SYNOPSIS -\fBstart\-registry os version get\fR [\fB\-\-src\fR] [\fB\-\-target\-version\fR] [\fB\-\-id\fR] [\fB\-\-platform\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry os version get\fR [\fB\-\-src\fR] [\fB\-\-target\-version\fR] [\fB\-\-id\fR] [\fB\-\-platform\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION Get OS versions info .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-remove.1 b/projects/start-registry/man/start-registry-os-version-remove.1 index 0d4822ddec..b7698fbca7 100644 --- a/projects/start-registry/man/start-registry-os-version-remove.1 +++ b/projects/start-registry/man/start-registry-os-version-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-remove 1 "remove " +.TH start-registry-os-version-remove 1 "remove " .SH NAME start\-registry\-os\-version\-remove \- Remove OS version .SH SYNOPSIS -\fBstart\-registry os version remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> +\fBstart\-registry os version remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> .SH DESCRIPTION Remove OS version .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-signer-add.1 b/projects/start-registry/man/start-registry-os-version-signer-add.1 index d21a7ad822..96141d2ce8 100644 --- a/projects/start-registry/man/start-registry-os-version-signer-add.1 +++ b/projects/start-registry/man/start-registry-os-version-signer-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-signer-add 1 "add " +.TH start-registry-os-version-signer-add 1 "add " .SH NAME start\-registry\-os\-version\-signer\-add \- Add version signer .SH SYNOPSIS -\fBstart\-registry os version signer add\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fISIGNER\fR> +\fBstart\-registry os version signer add\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fISIGNER\fR> .SH DESCRIPTION Add version signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-signer-list.1 b/projects/start-registry/man/start-registry-os-version-signer-list.1 index fff2a296b6..39e0bd2184 100644 --- a/projects/start-registry/man/start-registry-os-version-signer-list.1 +++ b/projects/start-registry/man/start-registry-os-version-signer-list.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-signer-list 1 "list " +.TH start-registry-os-version-signer-list 1 "list " .SH NAME start\-registry\-os\-version\-signer\-list \- List version signers .SH SYNOPSIS -\fBstart\-registry os version signer list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> +\fBstart\-registry os version signer list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> .SH DESCRIPTION List version signers .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-signer-remove.1 b/projects/start-registry/man/start-registry-os-version-signer-remove.1 index 743ad2525b..7b0ea99353 100644 --- a/projects/start-registry/man/start-registry-os-version-signer-remove.1 +++ b/projects/start-registry/man/start-registry-os-version-signer-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-signer-remove 1 "remove " +.TH start-registry-os-version-signer-remove 1 "remove " .SH NAME start\-registry\-os\-version\-signer\-remove \- Remove version signer .SH SYNOPSIS -\fBstart\-registry os version signer remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fISIGNER\fR> +\fBstart\-registry os version signer remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIVERSION\fR> <\fISIGNER\fR> .SH DESCRIPTION Remove version signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-os-version-signer.1 b/projects/start-registry/man/start-registry-os-version-signer.1 index fd3561f335..3af6e42415 100644 --- a/projects/start-registry/man/start-registry-os-version-signer.1 +++ b/projects/start-registry/man/start-registry-os-version-signer.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version-signer 1 "signer " +.TH start-registry-os-version-signer 1 "signer " .SH NAME start\-registry\-os\-version\-signer \- Add, remove, and list version signers .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-os-version.1 b/projects/start-registry/man/start-registry-os-version.1 index 7d727a09b7..ba5a2f2f74 100644 --- a/projects/start-registry/man/start-registry-os-version.1 +++ b/projects/start-registry/man/start-registry-os-version.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os-version 1 "version " +.TH start-registry-os-version 1 "version " .SH NAME start\-registry\-os\-version \- Commands to add, remove, or list versions or version signers .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-os.1 b/projects/start-registry/man/start-registry-os.1 index 9b9e6c3973..a47a5a08ee 100644 --- a/projects/start-registry/man/start-registry-os.1 +++ b/projects/start-registry/man/start-registry-os.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-os 1 "os " +.TH start-registry-os 1 "os " .SH NAME start\-registry\-os \- Commands related to OS assets and versions .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-package-add-mirror.1 b/projects/start-registry/man/start-registry-package-add-mirror.1 index fd4bf6ff52..81ad1ff4d8 100644 --- a/projects/start-registry/man/start-registry-package-add-mirror.1 +++ b/projects/start-registry/man/start-registry-package-add-mirror.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-add-mirror 1 "add-mirror " +.TH start-registry-package-add-mirror 1 "add-mirror " .SH NAME start\-registry\-package\-add\-mirror \- Add a mirror for an s9pk .SH SYNOPSIS -\fBstart\-registry package add\-mirror\fR [\fB\-\-no\-verify\fR] [\fB\-\-private\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> <\fIURL\fR> +\fBstart\-registry package add\-mirror\fR [\fB\-\-no\-verify\fR] [\fB\-\-private\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> <\fIURL\fR> .SH DESCRIPTION Add a mirror for an s9pk .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-add.1 b/projects/start-registry/man/start-registry-package-add.1 index b81288fe30..8cebf991aa 100644 --- a/projects/start-registry/man/start-registry-package-add.1 +++ b/projects/start-registry/man/start-registry-package-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-add 1 "add " +.TH start-registry-package-add 1 "add " .SH NAME start\-registry\-package\-add \- Add package to registry index .SH SYNOPSIS -\fBstart\-registry package add\fR [\fB\-\-url\fR] [\fB\-\-no\-verify\fR] [\fB\-\-private\fR] [\fB\-\-reader\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> +\fBstart\-registry package add\fR [\fB\-\-url\fR] [\fB\-\-no\-verify\fR] [\fB\-\-private\fR] [\fB\-\-reader\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIFILE\fR> .SH DESCRIPTION Add package to registry index .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-category-add-package.1 b/projects/start-registry/man/start-registry-package-category-add-package.1 index c2befe25da..6c7a6925df 100644 --- a/projects/start-registry/man/start-registry-package-category-add-package.1 +++ b/projects/start-registry/man/start-registry-package-category-add-package.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-category-add-package 1 "add-package " +.TH start-registry-package-category-add-package 1 "add-package " .SH NAME start\-registry\-package\-category\-add\-package \- Add a package to a category .SH SYNOPSIS -\fBstart\-registry package category add\-package\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIPACKAGE\fR> +\fBstart\-registry package category add\-package\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIPACKAGE\fR> .SH DESCRIPTION Add a package to a category .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-category-add.1 b/projects/start-registry/man/start-registry-package-category-add.1 index b78bd3c20b..69947e5b3a 100644 --- a/projects/start-registry/man/start-registry-package-category-add.1 +++ b/projects/start-registry/man/start-registry-package-category-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-category-add 1 "add " +.TH start-registry-package-category-add 1 "add " .SH NAME start\-registry\-package\-category\-add \- Add a category to the registry .SH SYNOPSIS -\fBstart\-registry package category add\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fINAME\fR> +\fBstart\-registry package category add\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fINAME\fR> .SH DESCRIPTION Add a category to the registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-category-list.1 b/projects/start-registry/man/start-registry-package-category-list.1 index 7666779230..304578c53b 100644 --- a/projects/start-registry/man/start-registry-package-category-list.1 +++ b/projects/start-registry/man/start-registry-package-category-list.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-category-list 1 "list " +.TH start-registry-package-category-list 1 "list " .SH NAME start\-registry\-package\-category\-list \- List registry categories .SH SYNOPSIS -\fBstart\-registry package category list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry package category list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List registry categories .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-category-remove-package.1 b/projects/start-registry/man/start-registry-package-category-remove-package.1 index c625d06e12..ae935a6a2a 100644 --- a/projects/start-registry/man/start-registry-package-category-remove-package.1 +++ b/projects/start-registry/man/start-registry-package-category-remove-package.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-category-remove-package 1 "remove-package " +.TH start-registry-package-category-remove-package 1 "remove-package " .SH NAME start\-registry\-package\-category\-remove\-package \- Remove package from category .SH SYNOPSIS -\fBstart\-registry package category remove\-package\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIPACKAGE\fR> +\fBstart\-registry package category remove\-package\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIPACKAGE\fR> .SH DESCRIPTION Remove package from category .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-category-remove.1 b/projects/start-registry/man/start-registry-package-category-remove.1 index cc30479924..949fdafe8c 100644 --- a/projects/start-registry/man/start-registry-package-category-remove.1 +++ b/projects/start-registry/man/start-registry-package-category-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-category-remove 1 "remove " +.TH start-registry-package-category-remove 1 "remove " .SH NAME start\-registry\-package\-category\-remove \- Remove category from registry .SH SYNOPSIS -\fBstart\-registry package category remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry package category remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION Remove category from registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-category.1 b/projects/start-registry/man/start-registry-package-category.1 index f4dfcc557b..288badf9a6 100644 --- a/projects/start-registry/man/start-registry-package-category.1 +++ b/projects/start-registry/man/start-registry-package-category.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-category 1 "category " +.TH start-registry-package-category 1 "category " .SH NAME start\-registry\-package\-category \- Update categories in registry .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-package-download.1 b/projects/start-registry/man/start-registry-package-download.1 index a00870dc89..b6fcd28a36 100644 --- a/projects/start-registry/man/start-registry-package-download.1 +++ b/projects/start-registry/man/start-registry-package-download.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-download 1 "download " +.TH start-registry-package-download 1 "download " .SH NAME start\-registry\-package\-download \- Download s9pk package .SH SYNOPSIS -\fBstart\-registry package download\fR [\fB\-v\fR|\fB\-\-target\-version\fR] [\fB\-d\fR|\fB\-\-dest\fR] [\fB\-a\fR|\fB\-\-arch\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry package download\fR [\fB\-v\fR|\fB\-\-target\-version\fR] [\fB\-d\fR|\fB\-\-dest\fR] [\fB\-a\fR|\fB\-\-arch\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION Download s9pk package .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-get.1 b/projects/start-registry/man/start-registry-package-get.1 index e6224fefe9..bc90a193c6 100644 --- a/projects/start-registry/man/start-registry-package-get.1 +++ b/projects/start-registry/man/start-registry-package-get.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-get 1 "get " +.TH start-registry-package-get 1 "get " .SH NAME start\-registry\-package\-get \- List installation candidates .SH SYNOPSIS -\fBstart\-registry package get\fR [\fB\-v\fR|\fB\-\-target\-version\fR] [\fB\-\-source\-version\fR] [\fB\-\-all\-revisions\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIID\fR] [\fIOTHER_VERSIONS\fR] +\fBstart\-registry package get\fR [\fB\-v\fR|\fB\-\-target\-version\fR] [\fB\-\-source\-version\fR] [\fB\-\-all\-revisions\fR] [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIID\fR] [\fIOTHER_VERSIONS\fR] .SH DESCRIPTION List installation candidates .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-index.1 b/projects/start-registry/man/start-registry-package-index.1 index 0f86e66d2b..61b8c7747d 100644 --- a/projects/start-registry/man/start-registry-package-index.1 +++ b/projects/start-registry/man/start-registry-package-index.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-index 1 "index " +.TH start-registry-package-index 1 "index " .SH NAME start\-registry\-package\-index \- List packages and categories .SH SYNOPSIS -\fBstart\-registry package index\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] +\fBstart\-registry package index\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] .SH DESCRIPTION List packages and categories .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-promote.1 b/projects/start-registry/man/start-registry-package-promote.1 index b1b020d7df..ed6e870643 100644 --- a/projects/start-registry/man/start-registry-package-promote.1 +++ b/projects/start-registry/man/start-registry-package-promote.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-promote 1 "promote " +.TH start-registry-package-promote 1 "promote " .SH NAME start\-registry\-package\-promote \- Promote a package from one registry to another .SH SYNOPSIS -\fBstart\-registry package promote\fR [\fB\-\-from\fR] [\fB\-\-to\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIVERSION\fR> +\fBstart\-registry package promote\fR [\fB\-\-from\fR] [\fB\-\-to\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIVERSION\fR> .SH DESCRIPTION Promote a package from one registry to another .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-remove-mirror.1 b/projects/start-registry/man/start-registry-package-remove-mirror.1 index fd8bee2e3b..6f3ddfbb9d 100644 --- a/projects/start-registry/man/start-registry-package-remove-mirror.1 +++ b/projects/start-registry/man/start-registry-package-remove-mirror.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-remove-mirror 1 "remove-mirror " +.TH start-registry-package-remove-mirror 1 "remove-mirror " .SH NAME start\-registry\-package\-remove\-mirror \- Remove mirror package .SH SYNOPSIS -\fBstart\-registry package remove\-mirror\fR <\fB\-\-url\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIVERSION\fR> +\fBstart\-registry package remove\-mirror\fR <\fB\-\-url\fR> [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIVERSION\fR> .SH DESCRIPTION Remove mirror package .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-remove.1 b/projects/start-registry/man/start-registry-package-remove.1 index 86e0198a5a..68d0248335 100644 --- a/projects/start-registry/man/start-registry-package-remove.1 +++ b/projects/start-registry/man/start-registry-package-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-remove 1 "remove " +.TH start-registry-package-remove 1 "remove " .SH NAME start\-registry\-package\-remove \- Remove package from registry .SH SYNOPSIS -\fBstart\-registry package remove\fR [\fB\-\-sighash\fR] [\fB\-\-force\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> [\fIVERSION\fR] +\fBstart\-registry package remove\fR [\fB\-\-sighash\fR] [\fB\-\-force\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> [\fIVERSION\fR] .SH DESCRIPTION Remove package from registry .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-sign.1 b/projects/start-registry/man/start-registry-package-sign.1 index c7241dca3e..50b4556efd 100644 --- a/projects/start-registry/man/start-registry-package-sign.1 +++ b/projects/start-registry/man/start-registry-package-sign.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-sign 1 "sign " +.TH start-registry-package-sign 1 "sign " .SH NAME start\-registry\-package\-sign \- Add your signature to a package in the registry index .SH SYNOPSIS -\fBstart\-registry package sign\fR [\fB\-\-no\-verify\fR] [\fB\-\-id\fR] [\fB\-\-version\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIFILE\fR] +\fBstart\-registry package sign\fR [\fB\-\-no\-verify\fR] [\fB\-\-id\fR] [\fB\-\-version\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fIFILE\fR] .SH DESCRIPTION Add your signature to a package in the registry index .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-signer-add.1 b/projects/start-registry/man/start-registry-package-signer-add.1 index 73c8077491..73f226d071 100644 --- a/projects/start-registry/man/start-registry-package-signer-add.1 +++ b/projects/start-registry/man/start-registry-package-signer-add.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-signer-add 1 "add " +.TH start-registry-package-signer-add 1 "add " .SH NAME start\-registry\-package\-signer\-add \- Add package signer .SH SYNOPSIS -\fBstart\-registry package signer add\fR [\fB\-\-versions\fR] [\fB\-\-merge\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fISIGNER\fR> +\fBstart\-registry package signer add\fR [\fB\-\-versions\fR] [\fB\-\-merge\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fISIGNER\fR> .SH DESCRIPTION Add package signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-signer-list.1 b/projects/start-registry/man/start-registry-package-signer-list.1 index 4ccb7b1441..8e58d88f59 100644 --- a/projects/start-registry/man/start-registry-package-signer-list.1 +++ b/projects/start-registry/man/start-registry-package-signer-list.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-signer-list 1 "list " +.TH start-registry-package-signer-list 1 "list " .SH NAME start\-registry\-package\-signer\-list \- List package signers .SH SYNOPSIS -\fBstart\-registry package signer list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> +\fBstart\-registry package signer list\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> .SH DESCRIPTION List package signers .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-signer-remove.1 b/projects/start-registry/man/start-registry-package-signer-remove.1 index b8b6519cde..bf55988316 100644 --- a/projects/start-registry/man/start-registry-package-signer-remove.1 +++ b/projects/start-registry/man/start-registry-package-signer-remove.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-signer-remove 1 "remove " +.TH start-registry-package-signer-remove 1 "remove " .SH NAME start\-registry\-package\-signer\-remove \- Remove package signer .SH SYNOPSIS -\fBstart\-registry package signer remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fISIGNER\fR> +\fBstart\-registry package signer remove\fR [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fISIGNER\fR> .SH DESCRIPTION Remove package signer .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-signer.1 b/projects/start-registry/man/start-registry-package-signer.1 index 6efffbe1f7..4ad15617a2 100644 --- a/projects/start-registry/man/start-registry-package-signer.1 +++ b/projects/start-registry/man/start-registry-package-signer.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-signer 1 "signer " +.TH start-registry-package-signer 1 "signer " .SH NAME start\-registry\-package\-signer \- Add, remove, and list package signers .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-package-version-export.1 b/projects/start-registry/man/start-registry-package-version-export.1 index 53ae9d9008..c63706fc96 100644 --- a/projects/start-registry/man/start-registry-package-version-export.1 +++ b/projects/start-registry/man/start-registry-package-version-export.1 @@ -1,10 +1,10 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-version-export 1 "export " +.TH start-registry-package-version-export 1 "export " .SH NAME start\-registry\-package\-version\-export \- Export a package version as stored, with its private keystreams and reader keys, for promotion .SH SYNOPSIS -\fBstart\-registry package version export\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIVERSION\fR> +\fBstart\-registry package version export\fR [\fB\-\-format\fR] [\fB\-h\fR|\fB\-\-help\fR] <\fIID\fR> <\fIVERSION\fR> .SH DESCRIPTION Export a package version as stored, with its private keystreams and reader keys, for promotion .SH OPTIONS diff --git a/projects/start-registry/man/start-registry-package-version.1 b/projects/start-registry/man/start-registry-package-version.1 index 5ee558e493..5418e4c7d6 100644 --- a/projects/start-registry/man/start-registry-package-version.1 +++ b/projects/start-registry/man/start-registry-package-version.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package-version 1 "version " +.TH start-registry-package-version 1 "version " .SH NAME start\-registry\-package\-version \- Commands for a single version of a package .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry-package.1 b/projects/start-registry/man/start-registry-package.1 index 35c41e3a92..8b167a3fa6 100644 --- a/projects/start-registry/man/start-registry-package.1 +++ b/projects/start-registry/man/start-registry-package.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry-package 1 "package " +.TH start-registry-package 1 "package " .SH NAME start\-registry\-package \- Commands to index, add, or get packages .SH SYNOPSIS diff --git a/projects/start-registry/man/start-registry.1 b/projects/start-registry/man/start-registry.1 index 76de40be1c..d78fe95419 100644 --- a/projects/start-registry/man/start-registry.1 +++ b/projects/start-registry/man/start-registry.1 @@ -1,6 +1,6 @@ .ie \n(.g .ds Aq \(aq .el .ds Aq ' -.TH start-registry 1 "start-registry 1.7.0" +.TH start-registry 1 "start-registry 1.7.0" .SH NAME start\-registry .SH SYNOPSIS diff --git a/shared-libs/crates/start-core/src/bins/registry.rs b/shared-libs/crates/start-core/src/bins/registry.rs index 5dc5b80d0a..9f08174e66 100644 --- a/shared-libs/crates/start-core/src/bins/registry.rs +++ b/shared-libs/crates/start-core/src/bins/registry.rs @@ -135,10 +135,9 @@ fn export_manpage_start_registry() { env!("CARGO_MANIFEST_DIR"), "/../../../projects/start-registry/man" ); - std::fs::create_dir_all(dir).unwrap(); let command = super::with_manifest_version( app().into_command(), std::path::Path::new(dir).parent().unwrap(), ); - clap_mangen::generate_to(command, dir).unwrap(); + super::export_manpages(command, dir); }