diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..ac102f4a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Signatures verify exact bytes; checkout must not convert signed TOML to CRLF. +/crates/core/tests/fixtures/hosted-catalog.toml -text diff --git a/.github/workflows/packaging-lint.yml b/.github/workflows/packaging-lint.yml index 276618a4..cad2115d 100644 --- a/.github/workflows/packaging-lint.yml +++ b/.github/workflows/packaging-lint.yml @@ -29,6 +29,10 @@ jobs: permissions: contents: read steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false @@ -49,6 +53,10 @@ jobs: name: Windows installation policy (no app build) runs-on: windows-latest steps: + - name: Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 033a7316..d8a3cfe7 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -63,3 +63,11 @@ licensed like those apps. Refresh them from the source path, never redraw them. |---|---|---|---|---| | `docs/brand/` (all files) | ArtCraft name, wordmark and mark | ArtCraft Team | getartcraft.com | Not open source; trademarks of the ArtCraft Team, [`docs/brand/LICENSE-brand.txt`](docs/brand/LICENSE-brand.txt) | | README app icons (linked, not copied) | Each Craft app's 64 px icon | ArtCraft Team and each app's contributors | `raw.githubusercontent.com/storytold//main/assets/app-icon/hicolor/64x64/apps/ai.storyteller..png` | MIT OR Apache-2.0 (each app's license) | + +## Hosted catalog verification + +| Path | Title | Author | Source | License | +| ---------------------------------------------------- | ----------------------------------------- | ------------- | ---------------------------------------------------- | ----------------- | +| `crates/core/assets/launcher-catalog-public-key.pem` | Launcher catalog Ed25519 verification key | ArtCraft Team | Maintainer-supplied website catalog signing keypair | MIT OR Apache-2.0 | +| `crates/core/catalog.toml` | Bundled launcher catalog | ArtCraft Team | `storytold/artcraft-services` PR #205 | MIT OR Apache-2.0 | +| `crates/core/tests/fixtures/hosted-catalog.toml.sig` | Detached catalog signature test fixture | ArtCraft Team | Signature of the bundled catalog with its pinned key | MIT OR Apache-2.0 | diff --git a/Cargo.lock b/Cargo.lock index 2d5705ab..16e0e30a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -272,7 +272,7 @@ checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" [[package]] name = "artcraft-launcher" -version = "0.19.0" +version = "0.19.1" dependencies = [ "artcraft-launcher-core", "artcraft-launcher-native", @@ -298,17 +298,21 @@ dependencies = [ [[package]] name = "artcraft-launcher-core" -version = "0.19.0" +version = "0.19.1" dependencies = [ + "base64 0.22.1", + "ed25519-dalek", "jiff", "semver", "serde", "serde_json", + "sha2", + "toml 1.1.8+spec-1.1.0", ] [[package]] name = "artcraft-launcher-native" -version = "0.19.0" +version = "0.19.1" dependencies = [ "artcraft-launcher-core", "craft-update", @@ -332,7 +336,7 @@ dependencies = [ [[package]] name = "artcraft-launcher-ui-egui" -version = "0.19.0" +version = "0.19.1" dependencies = [ "artcraft-launcher-core", "craft-ui", @@ -352,7 +356,7 @@ dependencies = [ [[package]] name = "artcraft-launcher-web" -version = "0.19.0" +version = "0.19.1" dependencies = [ "artcraft-launcher-core", "artcraft-launcher-ui-egui", @@ -360,6 +364,7 @@ dependencies = [ "egui", "js-sys", "log", + "serde_json", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -595,6 +600,12 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "bit-set" version = "0.10.0" @@ -903,6 +914,12 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "core-foundation" version = "0.9.4" @@ -1024,7 +1041,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=1b34eba41e62138fc2438d2734523b302840b45d#1b34eba41e62138fc2438d2734523b302840b45d" +source = "git+https://github.com/storytold/craft-libs?rev=6e03f65bf45181db77ba6229716e6624db9eb25b#6e03f65bf45181db77ba6229716e6624db9eb25b" dependencies = [ "chrono", "dunce", @@ -1032,6 +1049,7 @@ dependencies = [ "getrandom 0.3.4", "log", "plist", + "rustix 1.1.5", "semver", "serde", "serde_json", @@ -1110,6 +1128,33 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "data-url" version = "0.3.2" @@ -1147,6 +1192,17 @@ dependencies = [ "thiserror 2.0.21", ] +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + [[package]] name = "deranged" version = "0.5.8" @@ -1203,7 +1259,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1281,6 +1337,30 @@ dependencies = [ "serde", ] +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" +dependencies = [ + "curve25519-dalek", + "ed25519", + "serde", + "sha2", + "subtle", + "zeroize", +] + [[package]] name = "eframe" version = "0.37.0" @@ -1574,7 +1654,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1639,6 +1719,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "field-offset" version = "0.3.6" @@ -3538,7 +3624,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3601,6 +3687,15 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "peniko" version = "0.6.1" @@ -3717,6 +3812,16 @@ dependencies = [ "futures-io", ] +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.34" @@ -3970,6 +4075,15 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + [[package]] name = "range-alloc" version = "0.1.5" @@ -4225,7 +4339,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4282,7 +4396,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -4482,6 +4596,15 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "rand_core", +] + [[package]] name = "simd-adler32" version = "0.3.10" @@ -4634,6 +4757,16 @@ dependencies = [ "bitflags 2.13.2", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -4782,10 +4915,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix 1.1.5", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -5788,7 +5921,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -6222,7 +6355,7 @@ checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] name = "xtask" -version = "0.19.0" +version = "0.19.1" dependencies = [ "jiff", "semver", diff --git a/Cargo.toml b/Cargo.toml index 5430ccf0..bf23092a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ resolver = "3" members = ["crates/*", "apps/*", "xtask"] [workspace.package] -version = "0.19.0" +version = "0.19.1" edition = "2024" license = "MIT OR Apache-2.0" rust-version = "1.95" @@ -33,7 +33,7 @@ semver = { version = "1", features = ["serde"] } log = "0.4" # All date/time conversion goes through jiff (no hand-rolled calendar code beyond the 400-year range extension; AGENTS.md). jiff = "0.2" -craft-update = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "1b34eba41e62138fc2438d2734523b302840b45d" } +craft-update = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "6e03f65bf45181db77ba6229716e6624db9eb25b" } craft-ui = { version = "=0.1.0", git = "https://github.com/storytold/craft-libs", rev = "92d392cff132eaf53e13afff77f38b5c11b73aa0" } [profile.dev.package."*"] diff --git a/apps/artcraft-launcher-web/Cargo.toml b/apps/artcraft-launcher-web/Cargo.toml index 76a7b9cb..56ab76df 100644 --- a/apps/artcraft-launcher-web/Cargo.toml +++ b/apps/artcraft-launcher-web/Cargo.toml @@ -19,6 +19,7 @@ artcraft-launcher-core = { workspace = true } artcraft-launcher-ui-egui = { workspace = true } egui = { workspace = true } log = { workspace = true } +serde_json = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] # `wgpu` pulls egui-wgpu's defaults: WebGPU plus the WebGL2 fallback. @@ -26,4 +27,4 @@ eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", " wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" js-sys = "0.3" -web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlCanvasElement", "MediaQueryList", "Navigator", "Request", "RequestInit", "RequestMode", "Response", "Headers"] } +web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlCanvasElement", "MediaQueryList", "Navigator", "Request", "RequestInit", "RequestMode", "Response", "Headers", "Storage", "AbortSignal", "ReadableStream", "ReadableStreamDefaultReader", "RequestRedirect"] } diff --git a/apps/artcraft-launcher-web/src/hosted_catalog.rs b/apps/artcraft-launcher-web/src/hosted_catalog.rs new file mode 100644 index 00000000..fb97a806 --- /dev/null +++ b/apps/artcraft-launcher-web/src/hosted_catalog.rs @@ -0,0 +1,112 @@ +//! Browser startup catalog refresh. Storage failures leave the compiled fallback usable. +use std::collections::HashMap; +use std::sync::atomic::{AtomicBool, Ordering}; + +use artcraft_launcher_core::hosted_catalog::{ + CATALOG_URL, MAX_CATALOG_BYTES, MAX_ICON_BYTES, MAX_SIGNATURE_BYTES, SIGNATURE_URL, VerifiedCatalog, valid_icon, +}; +use wasm_bindgen::JsCast; +use wasm_bindgen_futures::JsFuture; + +const CACHE_KEY: &str = "artcraft-launcher.signed-catalog.v1"; +static CHECKED: AtomicBool = AtomicBool::new(false); + +pub async fn refresh_once() { + if CHECKED.swap(true, Ordering::SeqCst) { + return; + } + let storage = web_sys::window().and_then(|w| w.local_storage().ok().flatten()); + let remote = fetch_pair().await; + let catalog = match remote { + Ok((catalog, signature)) => match VerifiedCatalog::verify(&catalog, &signature) { + Ok(verified) => { + if let (Some(storage), Ok(text), Ok(sig)) = (&storage, String::from_utf8(catalog), String::from_utf8(signature)) + && let Ok(json) = serde_json::to_string(&(text, sig)) + { + let _ = storage.set_item(CACHE_KEY, &json); + } + Some(verified) + } + Err(why) => { + log::warn!("hosted catalog rejected: {why}"); + None + } + }, + Err(why) => { + log::warn!("hosted catalog unavailable: {why}"); + None + } + } + .or_else(|| { + let saved = storage.as_ref()?.get_item(CACHE_KEY).ok()??; + if saved.len() > MAX_CATALOG_BYTES * 6 + MAX_SIGNATURE_BYTES + 128 { + return None; + } + let (text, sig): (String, String) = serde_json::from_str(&saved).ok()?; + VerifiedCatalog::verify(text.as_bytes(), sig.as_bytes()).ok() + }); + if let Some(catalog) = catalog { + if catalog.rejected_entries > 0 { + log::warn!("ignored {} invalid catalog entries", catalog.rejected_entries); + } + let mut icons = HashMap::new(); + for (id, url, digest) in catalog.icons() { + if artcraft_launcher_core::catalog::app_icon_png(id).is_some_and(|b| valid_icon(b, digest)) { + continue; + } + // The browser's HTTP cache keeps content-addressed icons; hashes are checked every time. + match fetch_bytes(url, MAX_ICON_BYTES).await { + Ok(bytes) if valid_icon(&bytes, digest) => { + icons.insert(id.to_string(), bytes); + } + Ok(_) => {} + Err(_) => break, // An offline browser must not wait one timeout for every icon. + } + } + catalog.activate(icons); + } +} + +async fn fetch_pair() -> Result<(Vec, Vec), String> { + let catalog = fetch_bytes(CATALOG_URL, MAX_CATALOG_BYTES).await?; + let signature = fetch_bytes(SIGNATURE_URL, MAX_SIGNATURE_BYTES).await?; + Ok((catalog, signature)) +} + +/// Stream and cap the actual body, even if content-length is missing or dishonest. +async fn fetch_bytes(url: &str, max: usize) -> Result, String> { + let window = web_sys::window().ok_or("no browser window")?; + let init = web_sys::RequestInit::new(); + init.set_mode(web_sys::RequestMode::Cors); + init.set_redirect(web_sys::RequestRedirect::Error); + init.set_signal(Some(&web_sys::AbortSignal::timeout_with_u32(20_000))); + let request = web_sys::Request::new_with_str_and_init(url, &init).map_err(|_| "invalid catalog request")?; + let response: web_sys::Response = JsFuture::from(window.fetch_with_request(&request)) + .await + .map_err(|_| "catalog request failed")? + .dyn_into() + .map_err(|_| "invalid catalog response")?; + if response.status() != 200 { + return Err(format!("catalog server answered {}", response.status())); + } + let announced = response.headers().get("content-length").ok().flatten().and_then(|v| v.parse::().ok()); + if announced.is_some_and(|n| n > max) { + return Err("catalog response is too large".into()); + } + let reader: web_sys::ReadableStreamDefaultReader = + response.body().ok_or("catalog response has no body")?.get_reader().dyn_into().map_err(|_| "catalog response cannot be streamed")?; + let mut bytes = Vec::new(); + loop { + let chunk = JsFuture::from(reader.read()).await.map_err(|_| "catalog stream failed")?; + if js_sys::Reflect::get(&chunk, &"done".into()).ok().and_then(|v| v.as_bool()) == Some(true) { + return Ok(bytes); + } + let value = js_sys::Reflect::get(&chunk, &"value".into()).map_err(|_| "invalid catalog stream chunk")?; + let chunk = js_sys::Uint8Array::new(&value); + if chunk.length() as usize > max.saturating_sub(bytes.len()) { + let _ = reader.cancel(); + return Err("catalog response is too large".into()); + } + bytes.extend_from_slice(&chunk.to_vec()); + } +} diff --git a/apps/artcraft-launcher-web/src/main.rs b/apps/artcraft-launcher-web/src/main.rs index 76aa23e8..d708452f 100644 --- a/apps/artcraft-launcher-web/src/main.rs +++ b/apps/artcraft-launcher-web/src/main.rs @@ -6,6 +6,8 @@ #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] +#[cfg(target_arch = "wasm32")] +mod hosted_catalog; #[cfg(target_arch = "wasm32")] mod web; diff --git a/apps/artcraft-launcher-web/src/web.rs b/apps/artcraft-launcher-web/src/web.rs index 34c93f99..bb9df0cd 100644 --- a/apps/artcraft-launcher-web/src/web.rs +++ b/apps/artcraft-launcher-web/src/web.rs @@ -6,7 +6,7 @@ use std::rc::Rc; use artcraft_launcher_core::details::{AppDetails, MAX_SCREENSHOT_BYTES, looks_like_jpeg}; use artcraft_launcher_core::protocol::{Backend, Capabilities, Command, Event, LatestRelease, Origin, Source}; use artcraft_launcher_core::release::{self, Release}; -use artcraft_launcher_core::{Arch, Os, Platform, SUITE, catalog, version}; +use artcraft_launcher_core::{Arch, Os, Platform, catalog, version}; use artcraft_launcher_ui_egui::{Host, LauncherUi, Settings, i18n}; use wasm_bindgen::JsCast; use wasm_bindgen_futures::JsFuture; @@ -173,8 +173,11 @@ impl WebBackend { let pre = self.prereleases; wasm_bindgen_futures::spawn_local(async move { events.borrow_mut().push(Event::CheckStarted); + crate::hosted_catalog::refresh_once().await; + events.borrow_mut().push(Event::CatalogUpdated); + ctx.request_repaint(); let mut limited = None; - for app in &SUITE { + for app in artcraft_launcher_core::hosted_catalog::apps() { let latest = latest(app.repo, pre).await; if let Err(Some(reset)) = &latest { limited = Some(*reset); diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index c518d780..de9b083f 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -16,3 +16,13 @@ serde_json = { workspace = true } semver = { workspace = true } # Calendar conversion (jiff); see AGENTS.md. Only civil-date math is used, no time zone. jiff = { workspace = true } + +# Signed website catalog (all dependencies are on the licence allowlist). +base64 = "0.22" +ed25519-dalek = { version = "2.2", default-features = false, features = ["std", "fast", "pem"] } +sha2 = "0.10" +toml = { version = "=1.1.8", default-features = false, features = ["parse", "serde", "std"] } + +[build-dependencies] +serde = { workspace = true } +toml = { version = "=1.1.8", default-features = false, features = ["parse", "serde", "std"] } diff --git a/crates/core/assets/launcher-catalog-public-key.pem b/crates/core/assets/launcher-catalog-public-key.pem new file mode 100644 index 00000000..d4dded92 --- /dev/null +++ b/crates/core/assets/launcher-catalog-public-key.pem @@ -0,0 +1,3 @@ +-----BEGIN PUBLIC KEY----- +MCowBQYDK2VwAyEASIYrY9GbHPPdZ/URfx25unSh+FHvcQoayxfVvyga4WY= +-----END PUBLIC KEY----- diff --git a/crates/core/build.rs b/crates/core/build.rs new file mode 100644 index 00000000..e07706ae --- /dev/null +++ b/crates/core/build.rs @@ -0,0 +1,111 @@ +#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)] + +use serde::Deserialize; +use std::{env, error::Error, fmt::Write as _, fs, path::PathBuf}; + +#[derive(Deserialize)] +struct Manifest { + apps: Vec, +} +#[derive(Deserialize)] +struct App { + id: String, + name: String, + tagline: String, + color: [u8; 3], + ink_light: [u8; 3], + ink_dark: [u8; 3], + repo: String, + former_ids: Vec, + former_names: Vec, + kind: String, + publisher: String, + msi_publisher: Option, + bundle: Option, + former_bundles: Vec, + site: Option, + mac_team: Option, + mac_bundle_name: Option, + details: Option
, +} +#[derive(Deserialize)] +struct Details { + headline: String, + about: String, + platforms: String, + #[serde(default)] + features: Vec, + #[serde(default)] + shots: Vec, +} +#[derive(Deserialize)] +struct Feature { + title: String, + text: String, +} +#[derive(Deserialize)] +struct Shot { + key: String, + caption: String, +} +fn optional(s: &Option) -> String { + s.as_ref().map_or_else(|| "None".to_owned(), |v| format!("Some({v:?})")) +} +fn slice(items: &[String]) -> String { + format!("&{items:?}") +} +fn main() -> Result<(), Box> { + println!("cargo:rerun-if-changed=catalog.toml"); + let manifest: Manifest = toml::from_str(&fs::read_to_string("catalog.toml")?)?; + let mut apps = format!("pub const SUITE: [CraftApp; {}] = [\n", manifest.apps.len()); + let count = manifest.apps.iter().filter(|a| a.details.is_some()).count(); + let mut details = format!("pub const DETAILS: [AppDetails; {count}] = [\n"); + for app in &manifest.apps { + let kind = match app.kind.as_str() { + "official" => "Official", + "community" => "Community", + _ => return Err(format!("unknown app kind for {}", app.id).into()), + }; + writeln!( + apps, + "CraftApp {{ id: {:?}, name: {:?}, tagline: {:?}, color: {:?}, ink_light: {:?}, ink_dark: {:?}, repo: {:?}, former_ids: {}, former_names: {}, kind: AppKind::{kind}, publisher: {:?}, msi_publisher: {}, bundle: {}, former_bundles: {}, site: {}, mac_team: {}, mac_bundle_name: {} }},", + app.id, + app.name, + app.tagline, + app.color, + app.ink_light, + app.ink_dark, + app.repo, + slice(&app.former_ids), + slice(&app.former_names), + app.publisher, + optional(&app.msi_publisher), + optional(&app.bundle), + slice(&app.former_bundles), + optional(&app.site), + optional(&app.mac_team), + optional(&app.mac_bundle_name) + )?; + if let Some(d) = &app.details { + write!( + details, + "AppDetails {{ id: {:?}, headline: {:?}, about: {:?}, platforms: {:?}, features: &[", + app.id, d.headline, d.about, d.platforms + )?; + for f in &d.features { + write!(details, "feature({:?}, {:?}),", f.title, f.text)?; + } + write!(details, "], shots: &[")?; + for s in &d.shots { + write!(details, "shot({:?}, {:?}),", s.key, s.caption)?; + } + writeln!(details, "] }},")?; + } + } + apps.push_str("];\n"); + details.push_str("];\n"); + let out = PathBuf::from(env::var_os("OUT_DIR").ok_or("OUT_DIR missing")?); + fs::write(out.join("catalog.rs"), apps)?; + fs::write(out.join("details.rs"), details)?; + Ok(()) +} diff --git a/crates/core/catalog.toml b/crates/core/catalog.toml new file mode 100644 index 00000000..b87699ce --- /dev/null +++ b/crates/core/catalog.toml @@ -0,0 +1,1045 @@ +# ArtCraft Launcher catalog, served at https://getartcraft.com/launcher-catalog.toml. +# Source: storytold/craft-launcher at c6362817864df42d1fbfa105d3aaca9f728d434c +# Generated by scripts/sync-launcher-catalog.py; preserve the existing TOML schema. +# Verify launcher-catalog.toml.sig with the launcher's pinned Ed25519 key before use. +# Install sources must still follow the launcher's approved-source policy. + +[[apps]] +color = [47, 123, 245] +former_bundles = [] +former_ids = [] +former_names = [] +id = "photocraft" +binary = "photocraft" +flatpak_id = "ai.storyteller.photocraft" +mac_bundle_id = "ai.storyteller.photocraft" +mac_bundle_name = "PhotoCraft" +website = "https://getartcraft.com/apps/photocraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "photocraft" +rpm_package = "photocraft" +desktop_categories = ["Graphics", "2DGraphics", "RasterGraphics", "Photography"] +startup_wm_class = "photocraft" +icon_url = "https://getartcraft.com/launcher-app-icons/photocraft-f1afe9ccdb125a34089babecb6c1533f3fbf41ddffe81e0856f158c5b5fb9389.png" +icon_sha256 = "f1afe9ccdb125a34089babecb6c1533f3fbf41ddffe81e0856f158c5b5fb9389" +ink_dark = [127, 176, 255] +ink_light = [26, 91, 196] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "PhotoCraft" +publisher = "ArtCraft" +repo = "storytold/photocraft" +tagline = "Image editing" +[apps.details] +headline = "The image editor you already know how to use." +about = "Layers, masks, adjustment layers, layer styles, type, vectors and brushes in a native app. Open source, offline, and yours.\n\nPhotoCraft keeps the menus, shortcuts and panels your hands already know, so there is nothing to relearn." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "No Electron and no web view: a fast native compositor." +title = "Native GPU canvas" +[[apps.details.features]] +text = "Opens and saves layered PSD and PSB documents." +title = "Real layered files" +[[apps.details.features]] +text = "Adjustment layers, live-preview filters, smart objects and layer styles." +title = "Non-destructive editing" +[[apps.details.features]] +text = "Subject and object selection and mask refinement run locally." +title = "On-device selection" +[[apps.details.features]] +text = "8-, 16- and 32-bit RGB, CMYK, Lab and Grayscale, with ICC color management and soft proofing." +title = "Serious color" +[[apps.details.shots]] +caption = "Curves and type layers" +key = "demo" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/demo.jpg" +[[apps.details.shots]] +caption = "Levels with a live histogram" +key = "adjustments" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/adjustments.jpg" +[[apps.details.shots]] +caption = "Layer styles on live type" +key = "layer-styles" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/layer-styles.jpg" +[[apps.details.shots]] +caption = "Selections and masked adjustments" +key = "masks" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/masks.jpg" + +[[apps]] +color = [232, 87, 63] +former_bundles = [] +former_ids = [] +former_names = [] +id = "vectorcraft" +binary = "vectorcraft" +flatpak_id = "ai.storyteller.vectorcraft" +mac_bundle_id = "ai.storyteller.vectorcraft" +mac_bundle_name = "VectorCraft" +website = "https://getartcraft.com/apps/vectorcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "vectorcraft" +rpm_package = "vectorcraft" +desktop_categories = ["Graphics", "2DGraphics", "VectorGraphics"] +startup_wm_class = "ai.storyteller.vectorcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/vectorcraft-47f2061e3683ba8e7241c4783ca02207d29dfef0a7c94cd0eb8ea0a88dfc0b1e.png" +icon_sha256 = "47f2061e3683ba8e7241c4783ca02207d29dfef0a7c94cd0eb8ea0a88dfc0b1e" +ink_dark = [255, 138, 112] +ink_light = [184, 58, 36] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "VectorCraft" +publisher = "ArtCraft" +repo = "storytold/vectorcraft" +tagline = "Vector illustration" +[apps.details] +headline = "Vector illustration, with familiar tools and editable effects." +about = "A native vector illustration app with the pen, panels and shortcuts illustrators expect. Open source, and it also runs in a browser." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Pen, direct selection, shape booleans, snapping guides and an appearance panel, laid out the way you expect." +title = "The workflow you know" +[[apps.details.features]] +text = "Drawings with thousands of shapes stay responsive on a retina display." +title = "Genuinely fast" +[[apps.details.features]] +text = "Shape booleans work on the exact curves, so there is no \"cannot perform operation\", and undo is unlimited." +title = "Booleans that don't fail" +[[apps.details.features]] +text = "Blends, envelope distort, gradient mesh, repeats, glows and drop shadows all stay editable." +title = "Live, editable effects" +[[apps.details.features]] +text = "Turn raster images into clean vector paths, with presets for the common cases." +title = "Image tracing" +[[apps.details.features]] +text = "Native JSON documents, SVG and PDF import and export, and PNG, JPEG and WebP output." +title = "Open formats" +[[apps.details.shots]] +caption = "The Neon Drive poster" +key = "neon" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/neon.jpg" +[[apps.details.shots]] +caption = "Live blends" +key = "ribbons" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/ribbons.jpg" +[[apps.details.shots]] +caption = "A feature sheet and the Layers panel" +key = "sheet" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/sheet.jpg" +[[apps.details.shots]] +caption = "Pathfinder and exact booleans" +key = "bezier" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/bezier.jpg" + +[[apps]] +color = [139, 92, 246] +former_bundles = [] +former_ids = [] +former_names = [] +id = "filmcraft" +binary = "filmcraft" +flatpak_id = "ai.storyteller.filmcraft" +mac_bundle_id = "ai.storyteller.filmcraft" +mac_bundle_name = "FilmCraft" +website = "https://getartcraft.com/apps/filmcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "filmcraft" +rpm_package = "filmcraft" +desktop_categories = ["AudioVideo", "Video", "AudioVideoEditing"] +startup_wm_class = "ai.storyteller.filmcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/filmcraft-7ca8adb57a34d1f4bff8c7e976ac5fe73e69a89b4268d15b3b861c7e51c45a74.png" +icon_sha256 = "7ca8adb57a34d1f4bff8c7e976ac5fe73e69a89b4268d15b3b861c7e51c45a74" +ink_dark = [182, 156, 255] +ink_light = [106, 63, 214] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "FilmCraft" +publisher = "ArtCraft" +repo = "storytold/filmcraft" +tagline = "Video editing, color and sound" +[apps.details] +headline = "Professional video editing, rebuilt from scratch." +about = "A native video editor with source and program monitors, a real timeline and every trim mode." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Source and program monitors, three-point editing, every trim mode and J/K/L trimming." +title = "A timeline you already know" +[[apps.details.features]] +text = "An integer timebase keeps 23.976 and 29.97 drop-frame footage exact, with no drift." +title = "Frame-exact time" +[[apps.details.features]] +text = "No FFmpeg inside: native support for H.264, HEVC, ProRes, VP9, AAC and Opus." +title = "Its own codecs" +[[apps.details.features]] +text = "Curves, color wheels, HSL secondaries, LUTs and HDR and log workflows, with scopes to check the result." +title = "Color grading" +[[apps.details.features]] +text = "Video effects and transitions, keyframes with value and velocity graphs, and a linear-light GPU compositor." +title = "Effects and keyframes" +[[apps.details.features]] +text = "EBU R128 loudness meters, a mixer with automation and native audio effects." +title = "Broadcast-ready audio" +[[apps.details.shots]] +caption = "The Color workspace, with scopes" +key = "color" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/filmcraft/color.jpg" +[[apps.details.shots]] +caption = "The Assembly workspace" +key = "assembly" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/filmcraft/assembly.jpg" +[[apps.details.shots]] +caption = "Keyframes in Effect Controls" +key = "keyframes" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/filmcraft/keyframes.jpg" + +[[apps]] +color = [242, 165, 22] +former_bundles = [] +former_ids = [] +former_names = [] +id = "lightcraft" +binary = "lightcraft" +flatpak_id = "ai.storyteller.lightcraft" +mac_bundle_id = "ai.storyteller.lightcraft" +mac_bundle_name = "LightCraft" +website = "https://getartcraft.com/apps/lightcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "lightcraft" +rpm_package = "lightcraft" +desktop_categories = ["Graphics", "2DGraphics", "RasterGraphics", "Photography"] +startup_wm_class = "ai.storyteller.lightcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/lightcraft-a1fc54a714b769fa627eb44b0dcc1230e5fc3643890fd3504811b4c05c4a913a.png" +icon_sha256 = "a1fc54a714b769fa627eb44b0dcc1230e5fc3643890fd3504811b4c05c4a913a" +ink_dark = [255, 193, 77] +ink_light = [138, 88, 0] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "LightCraft" +publisher = "ArtCraft" +repo = "storytold/lightcraft" +tagline = "Photo library and raw development" +[apps.details] +headline = "Your photos. Your pixels. Your machine." +about = "A fast photo library and non-destructive raw developer. No account, no cloud, no telemetry and no subscription." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "A wide-gamut, 32-bit float pipeline that never touches your originals." +title = "Non-destructive by design" +[[apps.details.features]] +text = "Light, color, effects, tone curve, a color mixer, color grading wheels and built-in presets." +title = "Every control you reach for" +[[apps.details.features]] +text = "Brush, gradient and range masks, plus sky, subject and background masks." +title = "Precise masking" +[[apps.details.features]] +text = "Support for the main camera raw formats: DNG, CR2, ARW, NEF, RAF, RW2, PEF and ORF." +title = "Native raw decoding" +[[apps.details.features]] +text = "Albums, ratings, flags and search, with grids that stay smooth on large catalogs." +title = "A library that keeps up" +[[apps.details.features]] +text = "The GPU pipeline updates the preview as you move a slider, even on large raw files." +title = "Instant feedback" +[[apps.details.shots]] +caption = "The Edit view" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/hero.jpg" +[[apps.details.shots]] +caption = "The tone curve" +key = "curve" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/curve.jpg" +[[apps.details.shots]] +caption = "Color grading wheels" +key = "grading" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/grading.jpg" +[[apps.details.shots]] +caption = "A radial mask over a sky mask" +key = "masking" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/masking.jpg" + +[[apps]] +color = [232, 32, 79] +former_bundles = [] +former_ids = ["printcraft"] +former_names = ["PrintCraft"] +id = "pdfcraft" +binary = "pdfcraft" +flatpak_id = "ai.storyteller.pdfcraft" +mac_bundle_id = "ai.storyteller.pdfcraft" +mac_bundle_name = "PdfCraft" +website = "https://getartcraft.com/apps/pdfcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "pdfcraft" +rpm_package = "pdfcraft" +desktop_categories = ["Office", "Viewer"] +startup_wm_class = "pdfcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/pdfcraft-1933bbeaea290497facd328e917dafcc433d0c0caa9f1e207aa45ac1e430898c.png" +icon_sha256 = "1933bbeaea290497facd328e917dafcc433d0c0caa9f1e207aa45ac1e430898c" +ink_dark = [242, 58, 98] +ink_light = [183, 2, 40] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "PdfCraft" +publisher = "ArtCraft" +repo = "storytold/pdfcraft" +tagline = "Reading, organizing and protecting PDFs" +[apps.details] +headline = "The open-source PDF workbench." +about = "Read, organize, combine, split and secure PDFs in a fast, native app. No account, no telemetry and no cloud." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "World scripts, vertical Japanese, color emoji and transparency." +title = "Faithful rendering" +[[apps.details.features]] +text = "Instant find, and text selection that follows the document's real reading order." +title = "Search as you type" +[[apps.details.features]] +text = "Rotate, delete, insert and reorder pages, with deep undo behind every change." +title = "Organize like cards" +[[apps.details.features]] +text = "Assemble and break apart documents while keeping links, form fields, layers and bookmarks intact." +title = "Combine, extract, split" +[[apps.details.features]] +text = "Incremental, atomic saves with autosave and crash recovery." +title = "Fearless saves" +[[apps.details.features]] +text = "Opens files from RC4 to AES-256 encryption and honors the author's permissions." +title = "Built-in security" + +[[apps]] +color = [224, 54, 143] +former_bundles = [] +former_ids = [] +former_names = [] +id = "effectcraft" +binary = "effectcraft" +flatpak_id = "ai.storyteller.effectcraft" +mac_bundle_id = "ai.storyteller.effectcraft" +mac_bundle_name = "EffectCraft" +website = "https://getartcraft.com/apps/effectcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "effectcraft" +rpm_package = "effectcraft" +desktop_categories = ["AudioVideo", "Video", "Graphics", "2DGraphics"] +startup_wm_class = "ai.storyteller.effectcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/effectcraft-4ad7caa4f43b4cbf3bcddda0ed23e471d392efbe8d0b4ce18107b5849f20dd2d.png" +icon_sha256 = "4ad7caa4f43b4cbf3bcddda0ed23e471d392efbe8d0b4ce18107b5849f20dd2d" +ink_dark = [255, 122, 184] +ink_light = [176, 32, 108] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "EffectCraft" +publisher = "ArtCraft" +repo = "storytold/effectcraft" +tagline = "Motion graphics and visual effects" +[apps.details] +headline = "Motion graphics and visual effects." +about = "A native compositor with compositions, layers, keyframes, effects, expressions, 3D cameras and lights, and a render queue. Young, moving fast, and already usable." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Familiar panels and keyframes (linear, bezier, hold and eased), with a graph editor for value and speed curves." +title = "Animate the way you know" +[[apps.details.features]] +text = "Solids, shapes, text, footage, nested compositions, nulls and adjustment layers, with parenting, track mattes and blend modes." +title = "Layers of every kind" +[[apps.details.features]] +text = "Blur, color correction, distortion, generators, keying, particles and simulation, stylize and time effects." +title = "A large effects library" +[[apps.details.features]] +text = "3D layers with cameras, depth of field, and lights that cast soft ray-traced shadows." +title = "Real 3D" +[[apps.details.features]] +text = "JavaScript expressions with wiggle, loops and layer references, edited inline." +title = "Expressions" +[[apps.details.features]] +text = "H.264 and ProRes with alpha, PNG, TIFF and EXR sequences, GIF, and Lottie import and export." +title = "Export anywhere" +[[apps.details.shots]] +caption = "An animated composition" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/hero.jpg" +[[apps.details.shots]] +caption = "The Graph Editor" +key = "graph" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/graph.jpg" +[[apps.details.shots]] +caption = "Particles and Effect Controls" +key = "effects" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/effects.jpg" +[[apps.details.shots]] +caption = "3D layers with cameras and lights" +key = "3d" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/3d.jpg" + +[[apps]] +color = [218, 198, 4] +former_bundles = [] +former_ids = [] +former_names = [] +id = "anicraft" +binary = "anicraft" +flatpak_id = "ai.storyteller.anicraft" +mac_bundle_id = "ai.storyteller.anicraft" +mac_bundle_name = "AniCraft" +website = "https://github.com/storytold/anicraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "anicraft" +rpm_package = "anicraft" +desktop_categories = ["Graphics", "2DGraphics", "VectorGraphics", "AudioVideo"] +startup_wm_class = "anicraft" +icon_url = "https://getartcraft.com/launcher-app-icons/anicraft-e6754980d8a2a4acd429f6e3e3ba5569c4a761a45102a81d7edc0ef35210ce47.png" +icon_sha256 = "e6754980d8a2a4acd429f6e3e3ba5569c4a761a45102a81d7edc0ef35210ce47" +ink_dark = [232, 216, 74] +ink_light = [112, 101, 0] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "AniCraft" +publisher = "ArtCraft" +repo = "storytold/anicraft" +site = "https://github.com/storytold/anicraft" +tagline = "2D vector animation" +[apps.details] +headline = "Vector animation on a timeline you know." +about = "Open-source 2D vector animation, built in pure Rust." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening." +title = "Familiar by design" +[[apps.details.features]] +text = "Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another." +title = "Tweens that ease" +[[apps.details.features]] +text = "Graphic symbols and movie clips with nested timelines and loop modes, mask and guide layers, filters, blend modes and scenes." +title = "Symbols and scenes" +[[apps.details.features]] +text = "Pen, Pencil with curve fitting, shapes, text, Paint Bucket and Ink Bottle, with Bézier anchors and handles you edit point by point." +title = "Real vector tools" +[[apps.details.features]] +text = "Opens .fla and .xfl documents and imports SVG. Exports PNG sequences, GIF, SVG frames, sprite sheets, Lottie, and WebM or MP4 through your own FFmpeg." +title = "Open formats" +[[apps.details.features]] +text = "Every action is an engine command, so the CLI, a JSON-lines channel and an MCP server can draw, animate and export the way a person does." +title = "Agent-ready" + +[[apps]] +color = [123, 181, 28] +former_bundles = [] +former_ids = [] +former_names = [] +id = "designcraft" +binary = "designcraft" +flatpak_id = "ai.storyteller.designcraft" +mac_bundle_id = "ai.storyteller.designcraft" +mac_bundle_name = "DesignCraft" +website = "https://getartcraft.com/apps/designcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "designcraft" +rpm_package = "designcraft" +desktop_categories = ["Graphics", "Publishing"] +startup_wm_class = "ai.storyteller.designcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/designcraft-0895763da92947cb6b1d38a018a6c7ffcda1cbb714a58f2e9bc08e0e2a2b94b4.png" +icon_sha256 = "0895763da92947cb6b1d38a018a6c7ffcda1cbb714a58f2e9bc08e0e2a2b94b4" +ink_dark = [166, 224, 74] +ink_light = [69, 112, 8] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "DesignCraft" +publisher = "ArtCraft" +repo = "storytold/designcraft" +tagline = "Page layout and publishing" +[apps.details] +headline = "Page layout and publishing." +about = "A native layout app with spreads, parent pages, threaded stories, styles, swatches, text wrap and a paragraph composer. No subscription, no license server and no telemetry." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Spreads and parent pages, frames and threaded stories, with paragraph and character styles." +title = "The layout tools you know" +[[apps.details.features]] +text = "A Knuth–Plass paragraph composer, dictionary hyphenation, optical margin alignment and baseline grids, with line breaks that match on screen and in PDF." +title = "Beautiful type" +[[apps.details.features]] +text = "Real selectable text with embedded fonts, CMYK and spot colors, bleed, crop marks and PDF/A output." +title = "Print-ready PDF" +[[apps.details.features]] +text = "Multithreaded rendering, instant undo and cached text composition." +title = "Fast" +[[apps.details.features]] +text = "A documented native format, PNG export and layout interchange import and export." +title = "Open formats" +[[apps.details.features]] +text = "Every menu item, tool, panel and dialog can be driven over a JSON control channel and an MCP server." +title = "Built for automation" +[[apps.details.shots]] +caption = "A magazine spread with a threaded story" +key = "spread" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/designcraft/spread.jpg" + +[[apps]] +color = [2, 218, 150] +former_bundles = [] +former_ids = [] +former_names = [] +id = "figcraft" +binary = "figcraft" +flatpak_id = "ai.storyteller.figcraft" +mac_bundle_id = "ai.storyteller.figcraft" +mac_bundle_name = "FigCraft" +website = "https://getartcraft.com/apps/figcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "figcraft" +rpm_package = "figcraft" +desktop_categories = ["Graphics", "2DGraphics", "VectorGraphics", "X-Design"] +startup_wm_class = "figcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/figcraft-13d5236adb30c2bd4ff3eb7bcb7bb5a70d8de2ef36a81a5ffaf43ea171c7f51b.png" +icon_sha256 = "13d5236adb30c2bd4ff3eb7bcb7bb5a70d8de2ef36a81a5ffaf43ea171c7f51b" +ink_dark = [79, 232, 182] +ink_light = [4, 122, 86] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "FigCraft" +publisher = "ArtCraft" +repo = "storytold/figcraft" +tagline = "Interface design and prototyping" +[apps.details] +headline = "Interface design and prototyping." +about = "Design screens, components and prototypes in a native app that opens instantly and works offline, with no account and no telemetry. Early alpha." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Rows, columns, wrap and grids with padding, gaps and Hug, Fill or Fixed sizing, plus constraints and layout grids." +title = "Auto layout" +[[apps.details.features]] +text = "Instances with overrides, variants and properties, styles, and variables with modes bound to fills, strokes and effects." +title = "Components" +[[apps.details.features]] +text = "Real vector networks, the pen and pencil, the shape builder, editable booleans and variable width strokes." +title = "Vectors" +[[apps.details.features]] +text = "Connections, triggers and animated transitions, variables with conditionals, flows and a presentation view with device frames." +title = "Prototypes" +[[apps.details.features]] +text = "Inspect mode with measurements, annotations, ready-for-dev status, and code for CSS, HTML, React, SwiftUI and Compose." +title = "Hand off" +[[apps.details.features]] +text = "Plain .figcraft files on your own disk. SVG, PNG, JPEG, WebP and PDF in and out, and .fig files open, best effort." +title = "Your files" + +[[apps]] +color = [31, 165, 201] +former_bundles = [] +former_ids = [] +former_names = [] +id = "soundcraft" +binary = "soundcraft" +flatpak_id = "ai.storyteller.soundcraft" +mac_bundle_id = "ai.storyteller.soundcraft" +mac_bundle_name = "SoundCraft" +website = "https://getartcraft.com/apps/soundcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "soundcraft" +rpm_package = "soundcraft" +desktop_categories = ["AudioVideo", "Audio", "Midi", "Mixer", "Sequencer", "Recorder"] +startup_wm_class = "ai.storyteller.soundcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/soundcraft-0e7f4f83d82f5539530f62f85ccf8717dcc00c6d25a3dba57e2a65111e3b248b.png" +icon_sha256 = "0e7f4f83d82f5539530f62f85ccf8717dcc00c6d25a3dba57e2a65111e3b248b" +ink_dark = [95, 208, 238] +ink_light = [14, 114, 144] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "SoundCraft" +publisher = "ArtCraft" +repo = "storytold/soundcraft" +tagline = "Recording, editing and mixing audio" +[apps.details] +headline = "Record, edit and mix your audio." +about = "A digital audio workstation that follows the workflow audio engineers already know: an Edit window for arranging and editing, and a Mix window for balancing. Pre-alpha." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Shuffle, Slip, Spot and Grid modes, Smart, Grabber, Trim and other tools, fades and crossfades, playlists with comping lanes and clip gain." +title = "Editing" +[[apps.details.features]] +text = "Faders and pans with automation, sends, busses, aux inputs, VCA masters, routing folders and automatic plugin delay compensation." +title = "Mixing" +[[apps.details.features]] +text = "Volume, pan, mute, send and every plugin parameter, with Write, Touch, Latch and Trim passes recorded live from the faders." +title = "Automation" +[[apps.details.features]] +text = "EQ, dynamics, reverbs, modulation effects, a subtractive synth and a drum synth, all original, and CLAP plugins load too." +title = "Plugins" +[[apps.details.shots]] +caption = "The Edit window with a nine-track session" +key = "edit" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/edit.jpg" +[[apps.details.shots]] +caption = "The Mix window" +key = "mix" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/mix.jpg" +[[apps.details.shots]] +caption = "Automation and memory locations" +key = "automation" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/automation.jpg" +[[apps.details.shots]] +caption = "The Score Editor" +key = "score" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/score.jpg" + +[[apps]] +color = [63, 95, 224] +former_bundles = [] +former_ids = [] +former_names = [] +id = "wordcraft" +binary = "wordcraft" +flatpak_id = "ai.storyteller.wordcraft" +mac_bundle_id = "ai.storyteller.wordcraft" +mac_bundle_name = "WordCraft" +website = "https://getartcraft.com/apps/wordcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "wordcraft" +rpm_package = "wordcraft" +desktop_categories = ["Office", "WordProcessor"] +startup_wm_class = "ai.storyteller.wordcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/wordcraft-96505c7153c1b8a7e0cf0f90353fae669f4ed9de5524ba50ba99af79003cff43.png" +icon_sha256 = "96505c7153c1b8a7e0cf0f90353fae669f4ed9de5524ba50ba99af79003cff43" +ink_dark = [142, 162, 255] +ink_light = [42, 68, 184] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "WordCraft" +publisher = "ArtCraft" +repo = "storytold/wordcraft" +tagline = "Writing and document design" +[apps.details] +headline = "The familiar word processor, native and offline." +about = "A word processor with the ribbon, shortcuts and behavior you already know. Open source, and built from public specifications." +platforms = "macOS, Windows, Linux, BSD, web" +[[apps.details.features]] +text = "Ribbon tabs and groups, a live Styles gallery and the editing behavior you expect, from list continuation to Format Painter." +title = "Familiar" +[[apps.details.features]] +text = "Opens and saves .docx, and also .odt, .rtf, .html, .md, .tex and .txt. Opens older .doc files and exports PDF with real, selectable text." +title = "Your files" +[[apps.details.features]] +text = "Paragraph layout is cached, so typing stays responsive even in long documents." +title = "Fast" +[[apps.details.features]] +text = "Spelling, grammar and everything else work offline." +title = "Private" +[[apps.details.features]] +text = "Work on macOS, Windows, Linux, BSD and the web." +title = "Everywhere" +[[apps.details.features]] +text = "Every action is a command, driven from the ribbon, shortcuts, a command-line tool, a JSON control channel or an MCP server." +title = "Built for agents" +[[apps.details.shots]] +caption = "The Home tab and the Navigation pane" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/hero.jpg" +[[apps.details.shots]] +caption = "Track Changes and comments" +key = "review" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/review.jpg" +[[apps.details.shots]] +caption = "The Design tab" +key = "design" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/design.jpg" +[[apps.details.shots]] +caption = "The Layout tab" +key = "layout" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/layout.jpg" + +[[apps]] +color = [240, 122, 30] +former_bundles = [] +former_ids = [] +former_names = [] +id = "deckcraft" +binary = "deckcraft" +flatpak_id = "ai.storyteller.deckcraft" +mac_bundle_id = "ai.storyteller.deckcraft" +mac_bundle_name = "DeckCraft" +website = "https://getartcraft.com/apps/deckcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "deckcraft" +rpm_package = "deckcraft" +desktop_categories = ["Office", "Presentation"] +startup_wm_class = "ai.storyteller.deckcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/deckcraft-1bf98b43bb0b21cb038ce063e71b9922e7f48c10d5b99afd046aa6c30642ca69.png" +icon_sha256 = "1bf98b43bb0b21cb038ce063e71b9922e7f48c10d5b99afd046aa6c30642ca69" +ink_dark = [255, 160, 96] +ink_light = [168, 79, 10] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "DeckCraft" +publisher = "ArtCraft" +repo = "storytold/deckcraft" +tagline = "Presentations and slide shows" +[apps.details] +headline = "Create slides, tell stories and present." +about = "A presentation app with slide masters, shapes, animations and a presenter view. In alpha, heading for beta." +platforms = "macOS, Windows, Linux, BSD, web" +[[apps.details.features]] +text = "Slide masters and layouts with placeholders that inherit formatting, themes, sections, notes and comments." +title = "Make decks" +[[apps.details.features]] +text = "Preset shapes with adjust handles, connectors that stay glued to shapes, freeform tools, merged shapes, gradients, shadows and glow." +title = "Draw" +[[apps.details.features]] +text = "In-place text editing with full font and paragraph formatting, bullets and numbering, columns and autofit." +title = "Write" +[[apps.details.features]] +text = "Pictures with crop and corrections, styled tables, charts, audio and video." +title = "Add content" +[[apps.details.features]] +text = "Transitions including Morph, animations and motion paths, a full-screen slide show, presenter view and rehearsed timings." +title = "Present" +[[apps.details.features]] +text = "Opens and saves .pptx presentation files and exports PDF (slides, notes pages and handouts), PNG and JPEG." +title = "Exchange files" +[[apps.details.shots]] +caption = "Editing a slide, with sections and notes" +key = "editor" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/editor.jpg" +[[apps.details.shots]] +caption = "The Shape Format tab" +key = "shape" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/shape.jpg" +[[apps.details.shots]] +caption = "The slide sorter" +key = "sorter" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/sorter.jpg" +[[apps.details.shots]] +caption = "The Format Shape pane" +key = "format" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/format.jpg" + +[[apps]] +color = [62, 166, 232] +former_bundles = [] +former_ids = [] +former_names = [] +id = "cadcraft" +binary = "cadcraft" +flatpak_id = "ai.storyteller.cadcraft" +mac_bundle_id = "ai.storyteller.cadcraft" +mac_bundle_name = "CADCraft" +website = "https://getartcraft.com/apps/cadcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "cadcraft" +rpm_package = "cadcraft" +desktop_categories = ["Graphics", "Engineering", "VectorGraphics"] +startup_wm_class = "ai.storyteller.cadcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/cadcraft-c126ff5030d0a0f3e63f039bae81ca63ba71230da2e6fca54e08df1119ea3443.png" +icon_sha256 = "c126ff5030d0a0f3e63f039bae81ca63ba71230da2e6fca54e08df1119ea3443" +ink_dark = [124, 200, 255] +ink_light = [26, 111, 168] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "CADCraft" +publisher = "ArtCraft" +repo = "storytold/cadcraft" +tagline = "Computer-aided design and drafting" +[apps.details] +headline = "Computer-aided drafting, with a familiar workflow." +about = "A drafting app with the command line, object snaps and workflow that drafters already know. Free, with no account and no subscription. In early, fast development." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Type L, click two points, type @5<45 and press Enter. Prompts with clickable keywords, polar tracking, direct distance entry and grips work the way drafting habit expects." +title = "The workflow you know" +[[apps.details.features]] +text = "Reads and writes DXF natively (R12 through 2018) and opens and saves DWG (R13 through 2018). Exports SVG and PNG." +title = "Open files" +[[apps.details.features]] +text = "A responsive, native drafting workspace." +title = "Fast and native" +[[apps.details.features]] +text = "Draw, modify, dimension, hatch and block commands, layers with a properties manager, paper-space layouts and PDF plotting." +title = "A full drafting toolset" +[[apps.details.features]] +text = "Every menu item, tool and prompt is a command, available over MCP, a JSON control channel or the CLI." +title = "Built for agents" +[[apps.details.shots]] +caption = "An apartment floor plan" +key = "apartment" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/cadcraft/apartment.jpg" +[[apps.details.shots]] +caption = "A mechanical bracket drawing" +key = "bracket" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/cadcraft/bracket.jpg" +[[apps.details.shots]] +caption = "A layout sheet" +key = "layout" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/cadcraft/layout.jpg" + +[[apps]] +color = [31, 157, 85] +former_bundles = [] +former_ids = [] +former_names = [] +id = "gridcraft" +binary = "gridcraft" +flatpak_id = "ai.storyteller.gridcraft" +mac_bundle_id = "ai.storyteller.gridcraft" +mac_bundle_name = "GridCraft" +website = "https://getartcraft.com/apps/gridcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "gridcraft" +rpm_package = "gridcraft" +desktop_categories = ["Office", "Spreadsheet"] +startup_wm_class = "ai.storyteller.gridcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/gridcraft-01ef35442b8d466b52068fda67ab740309321c8bc813b62b9207dfc4116208e7.png" +icon_sha256 = "01ef35442b8d466b52068fda67ab740309321c8bc813b62b9207dfc4116208e7" +ink_dark = [79, 214, 138] +ink_light = [18, 112, 58] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "GridCraft" +publisher = "ArtCraft" +repo = "storytold/gridcraft" +tagline = "Spreadsheets and data" +[apps.details] +headline = "Spreadsheets you already know how to use." +about = "A spreadsheet with the ribbon, formula bar, sheet tabs and shortcuts you know. No subscription, no license server and no telemetry." +platforms = "macOS, Windows, Linux, BSD, web" +[[apps.details.features]] +text = "The ribbon, formula bar, Name Box, fill handle, point-mode formulas, Format Cells, Paste Special, conditional formatting, tables and charts." +title = "Familiar" +[[apps.details.features]] +text = "XLSX is the native format, with formulas, tables, conditional formats, charts, pivot tables and print settings round-tripping. CSV and TSV too." +title = "Compatible" +[[apps.details.features]] +text = "A dependency-graph calculation engine with dynamic arrays, LET and LAMBDA, structured table references, sort, AutoFilter and Flash Fill." +title = "Capable" +[[apps.details.features]] +text = "Copy-on-write workbooks, incremental recalculation and a grid that only lays out what is on screen." +title = "Fast" +[[apps.details.features]] +text = "Every ribbon button, menu item, dialog and keystroke is a command, available over a JSON control channel, an MCP server or the CLI." +title = "Agent-native" +[[apps.details.features]] +text = "Work on the desktop and the web." +title = "Everywhere" +[[apps.details.shots]] +caption = "A quarterly sales dashboard" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/hero.jpg" +[[apps.details.shots]] +caption = "A household budget" +key = "budget" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/budget.jpg" +[[apps.details.shots]] +caption = "A pivot table" +key = "pivot" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/pivot.jpg" +[[apps.details.shots]] +caption = "Formatting a chart" +key = "chart" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/chart.jpg" + +[[apps]] +color = [194, 103, 43] +former_bundles = [] +former_ids = [] +former_names = [] +id = "texturecraft" +binary = "texturecraft" +flatpak_id = "ai.storyteller.texturecraft" +mac_bundle_id = "ai.storyteller.texturecraft" +mac_bundle_name = "TextureCraft" +website = "https://getartcraft.com/apps/texturecraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "texturecraft" +rpm_package = "texturecraft" +desktop_categories = ["Graphics", "3DGraphics"] +startup_wm_class = "texturecraft" +icon_url = "https://getartcraft.com/launcher-app-icons/texturecraft-ac629a038a215a13d86172286142502b6efd17618869652050f291d9745346d2.png" +icon_sha256 = "ac629a038a215a13d86172286142502b6efd17618869652050f291d9745346d2" +ink_dark = [229, 138, 78] +ink_light = [156, 74, 21] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "TextureCraft" +publisher = "ArtCraft" +repo = "storytold/texturecraft" +tagline = "3D texture painting" +[apps.details] +headline = "Paint textures on 3D models." +about = "Paint materials on 3D models and export textures." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Paint materials on 3D models and export textures." +title = "Materials" +[[apps.details.features]] +text = "Bake mesh maps and use smart materials." +title = "Mesh maps" + +[[apps]] +color = [23, 138, 156] +former_bundles = [] +former_ids = [] +former_names = [] +id = "materialcraft" +binary = "materialcraft" +flatpak_id = "ai.storyteller.materialcraft" +mac_bundle_id = "ai.storyteller.materialcraft" +mac_bundle_name = "MaterialCraft" +website = "https://github.com/storytold/materialcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "materialcraft" +rpm_package = "materialcraft" +desktop_categories = ["Graphics", "3DGraphics"] +startup_wm_class = "materialcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/materialcraft-2844f2a4cf2b1d06c7eeaec8bddf13c69a0a1c3356e6767e8e97eb6b540a2c7c.png" +icon_sha256 = "2844f2a4cf2b1d06c7eeaec8bddf13c69a0a1c3356e6767e8e97eb6b540a2c7c" +ink_dark = [99, 197, 211] +ink_light = [16, 101, 115] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "MaterialCraft" +publisher = "ArtCraft" +repo = "storytold/materialcraft" +site = "https://github.com/storytold/materialcraft" +tagline = "Procedural material design" +[apps.details] +headline = "Build materials with node graphs." +about = "Create tileable PBR materials and export texture maps." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Combine noises, patterns and filters." +title = "Node graphs" +[[apps.details.features]] +text = "Preview materials in 2D and on 3D models." +title = "Live previews" + +[[apps]] +color = [78, 123, 251] +former_bundles = [] +former_ids = [] +former_names = [] +id = "craft-anything" +binary = "craft-anything" +flatpak_id = "ai.storyteller.craft-anything" +mac_bundle_id = "ai.storyteller.craft-anything" +mac_bundle_name = "Craft Anything" +website = "https://getartcraft.com/apps/craft-anything" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "craft-anything" +rpm_package = "craft-anything" +desktop_categories = ["Development", "Debugger"] +startup_wm_class = "ai.storyteller.craft-anything" +icon_url = "https://getartcraft.com/launcher-app-icons/craft-anything-ddab399079b3a0a28a6584fb2ffd209bb0407896f20a8084551b5feb3060deb1.png" +icon_sha256 = "ddab399079b3a0a28a6584fb2ffd209bb0407896f20a8084551b5feb3060deb1" +ink_dark = [116, 170, 255] +ink_light = [22, 89, 196] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "Craft Anything" +publisher = "ArtCraft" +repo = "storytold/craft-anything" +tagline = "Find out how any software works, then craft your own" +[apps.details] +headline = "See how any website, app or game works, then build your own." +about = "Point it at a target and say what you want. It studies the original with real inspection tools, has a coding agent build a new project in the stack you ask for, checks the result against the original and refines it. Open source and clean-room." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Websites, desktop apps, phone apps, games and files: find out how they're built, with the evidence behind every answer." +title = "Study anything" +[[apps.details.features]] +text = "Say what you want and a coding agent builds a new project in the language or engine you name." +title = "Build your own" +[[apps.details.features]] +text = "Every build is compared with the original, at three screen widths for a page, and refined until it's close." +title = "Checked, not guessed" +[[apps.details.features]] +text = "Every tool is a CLI command and an MCP tool, and no AI is needed just to inspect." +title = "Agent-ready" + +[[apps]] +bundle = "io.tangencylabs.solidcraft" +color = [70, 161, 251] +former_bundles = ["ai.storyteller.solidcraft", "ai.storyteller.solvecraft"] +former_ids = [] +former_names = [] +id = "solidcraft" +binary = "solidcraft" +flatpak_id = "io.tangencylabs.solidcraft" +mac_bundle_id = "io.tangencylabs.solidcraft" +mac_bundle_name = "SolidCraft" +website = "https://solidcraft.io" +windows_msi_publisher = "SolidCraft contributors" +deb_package = "solidcraft" +rpm_package = "solidcraft" +desktop_categories = ["Graphics"] +startup_wm_class = "io.tangencylabs.solidcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/solidcraft-46e019499579b2f477228021dd91b187303921da5d4cd14f1002a10976cf0475.png" +icon_sha256 = "46e019499579b2f477228021dd91b187303921da5d4cd14f1002a10976cf0475" +ink_dark = [140, 196, 255] +ink_light = [22, 83, 174] +kind = "community" +mac_team = "G5QA5U5X2S" +msi_publisher = "SolidCraft contributors" +name = "SolidCraft" +publisher = "Tangency Labs" +repo = "tangency-labs/solidcraft" +site = "https://solidcraft.io" +tagline = "Parametric 3D CAD" +[apps.details] +headline = "Parametric 3D CAD, with editable sketches and solids." +about = "A parametric solid modeller by Tangency Labs. Sketch, constrain and build solids on an editable feature timeline: change a dimension and the model rebuilds. Early, but usable for simple parts. Open source, and it can be driven by AI agents through its MCP server." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Lines, arcs, splines and text, solved by SolidCraft's own constraint solver, with parameter-driven dimensions." +title = "Sketches and constraints" +[[apps.details.features]] +text = "Extrude, revolve, sweep, loft, fillet, chamfer, shell, holes, threads and patterns on a parametric timeline." +title = "Features" +[[apps.details.features]] +text = "STEP, IGES, 3MF, STL, OBJ and glTF in and out where supported, and .sc designs." +title = "Files" +[[apps.details.features]] +text = "A desktop app, a browser app, a headless CLI and an MCP server, all running the same commands." +title = "Desktop, web and agents" + +[[apps]] +bundle = "io.github.billsecond.mailcraft" +color = [15, 104, 240] +former_bundles = [] +former_ids = [] +former_names = [] +id = "mailcraft" +binary = "mailcraft" +flatpak_id = "io.github.billsecond.mailcraft" +mac_bundle_id = "io.github.billsecond.mailcraft" +mac_bundle_name = "MailCraft" +website = "https://mailcraft.work" +windows_msi_publisher = "MailCraft contributors" +deb_package = "mailcraft" +rpm_package = "mailcraft" +desktop_categories = ["Graphics"] +startup_wm_class = "io.github.billsecond.mailcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/mailcraft-dd0e62a27b0066ae5f461d5f829cfa143b49ca6a1b9dc9b47686818edd664bf7.png" +icon_sha256 = "dd0e62a27b0066ae5f461d5f829cfa143b49ca6a1b9dc9b47686818edd664bf7" +ink_dark = [143, 191, 255] +ink_light = [6, 52, 196] +kind = "community" +msi_publisher = "MailCraft contributors" +name = "MailCraft" +publisher = "UCS Care Group" +repo = "UCS-Care-Group/mailcraft" +site = "https://mailcraft.work" +tagline = "Mail, calendar and contacts" +[apps.details] +headline = "Mail, calendar, contacts and tasks, in one native app." +about = "An open-source mail program by UCS Care Group, written from scratch in Rust: the folder pane, message list and reading pane people already know, with a calendar, people and to-dos. Works with Microsoft 365, Outlook.com and IMAP. In public beta, and it can be driven by AI agents through its MCP server." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Conversations, flags, categories, rules, search with a query language, and HTML mail shown without running anything in it." +title = "Mail" +[[apps.details.features]] +text = "Day, week and month views, recurring meetings, invitations and reminders, kept in step with Microsoft 365." +title = "Calendar" +[[apps.details.features]] +text = ".eml, .mbox, .ics and .vcf in and out, and the mail and contacts of an Outlook .pst file in." +title = "Files" +[[apps.details.features]] +text = "A desktop app, a browser app, a CLI and an MCP server, all running the same commands." +title = "Desktop, web and agents" diff --git a/crates/core/src/catalog.rs b/crates/core/src/catalog.rs index 4855bc51..02b4911c 100644 --- a/crates/core/src/catalog.rs +++ b/crates/core/src/catalog.rs @@ -1,4 +1,4 @@ -//! The Craft App Suite: the eighteen apps the launcher knows about. +//! The Craft App Suite: bundled data with a signed hosted startup snapshot. //! //! The list is data so a later version can fetch it from an API; [`SUITE`] is the built-in copy. //! @@ -114,7 +114,7 @@ impl CraftApp { } pub fn by_id(id: &str) -> Option<&'static CraftApp> { - SUITE.iter().find(|a| a.id == id) + crate::hosted_catalog::apps().iter().find(|a| a.id == id) } } @@ -146,145 +146,8 @@ const fn app( } } -/// The Craft App Suite, in display order matching getartcraft.com, then the community apps: -pub const SUITE: [CraftApp; 19] = [ - app("photocraft", "PhotoCraft", "Image editing", [[0x2f, 0x7b, 0xf5], [0x1a, 0x5b, 0xc4], [0x7f, 0xb0, 0xff]], "storytold/photocraft"), - app("vectorcraft", "VectorCraft", "Vector illustration", [[0xe8, 0x57, 0x3f], [0xb8, 0x3a, 0x24], [0xff, 0x8a, 0x70]], "storytold/vectorcraft"), - app( - "filmcraft", - "FilmCraft", - "Video editing, color and sound", - [[0x8b, 0x5c, 0xf6], [0x6a, 0x3f, 0xd6], [0xb6, 0x9c, 0xff]], - "storytold/filmcraft", - ), - app( - "lightcraft", - "LightCraft", - "Photo library and raw development", - [[0xf2, 0xa5, 0x16], [0x8a, 0x58, 0x00], [0xff, 0xc1, 0x4d]], - "storytold/lightcraft", - ), - CraftApp { - former_ids: &["printcraft"], - former_names: &["PrintCraft"], - ..app( - "pdfcraft", - "PdfCraft", - "Reading, organizing and protecting PDFs", - [[0xe8, 0x20, 0x4f], [0xb7, 0x02, 0x28], [0xf2, 0x3a, 0x62]], - "storytold/pdfcraft", - ) - }, - app( - "effectcraft", - "EffectCraft", - "Motion graphics and visual effects", - [[0xe0, 0x36, 0x8f], [0xb0, 0x20, 0x6c], [0xff, 0x7a, 0xb8]], - "storytold/effectcraft", - ), - CraftApp { - // Use the project repository until its getartcraft.com page is published. - site: Some("https://github.com/storytold/anicraft"), - ..app("anicraft", "AniCraft", "2D vector animation", [[0xda, 0xc6, 0x04], [0x70, 0x65, 0x00], [0xe8, 0xd8, 0x4a]], "storytold/anicraft") - }, - app( - "designcraft", - "DesignCraft", - "Page layout and publishing", - [[0x7b, 0xb5, 0x1c], [0x45, 0x70, 0x08], [0xa6, 0xe0, 0x4a]], - "storytold/designcraft", - ), - app( - "figcraft", - "FigCraft", - "Interface design and prototyping", - [[0x02, 0xda, 0x96], [0x04, 0x7a, 0x56], [0x4f, 0xe8, 0xb6]], - "storytold/figcraft", - ), - app("wordcraft", "WordCraft", "Writing and document design", [[0x3f, 0x5f, 0xe0], [0x2a, 0x44, 0xb8], [0x8e, 0xa2, 0xff]], "storytold/wordcraft"), - app( - "soundcraft", - "SoundCraft", - "Recording, editing and mixing audio", - [[0x1f, 0xa5, 0xc9], [0x0e, 0x72, 0x90], [0x5f, 0xd0, 0xee]], - "storytold/soundcraft", - ), - app( - "deckcraft", - "DeckCraft", - "Presentations and slide shows", - [[0xf0, 0x7a, 0x1e], [0xa8, 0x4f, 0x0a], [0xff, 0xa0, 0x60]], - "storytold/deckcraft", - ), - app( - "cadcraft", - "CADCraft", - "Computer-aided design and drafting", - [[0x3e, 0xa6, 0xe8], [0x1a, 0x6f, 0xa8], [0x7c, 0xc8, 0xff]], - "storytold/cadcraft", - ), - app("gridcraft", "GridCraft", "Spreadsheets and data", [[0x1f, 0x9d, 0x55], [0x12, 0x70, 0x3a], [0x4f, 0xd6, 0x8a]], "storytold/gridcraft"), - app( - "texturecraft", - "TextureCraft", - "3D texture painting", - [[0xc2, 0x67, 0x2b], [0x9c, 0x4a, 0x15], [0xe5, 0x8a, 0x4e]], - "storytold/texturecraft", - ), - CraftApp { - // Use the project repository until its getartcraft.com page is published. - site: Some("https://github.com/storytold/materialcraft"), - ..app( - "materialcraft", - "MaterialCraft", - "Procedural material design", - [[0x17, 0x8a, 0x9c], [0x10, 0x65, 0x73], [0x63, 0xc5, 0xd3]], - "storytold/materialcraft", - ) - }, - // The raven's tile blue, with its README's deep (#1659c4) and light (#74aaff) accents for text. - app( - "craft-anything", - "Craft Anything", - "Find out how any software works, then craft your own", - [[0x4e, 0x7b, 0xfb], [0x16, 0x59, 0xc4], [0x74, 0xaa, 0xff]], - "storytold/craft-anything", - ), - CraftApp { - kind: AppKind::Community, - publisher: "Tangency Labs", - msi_publisher: Some("SolidCraft contributors"), - bundle: Some("io.tangencylabs.solidcraft"), - former_bundles: &["ai.storyteller.solidcraft", "ai.storyteller.solvecraft"], - site: Some("https://solidcraft.io"), - // Signed by its own developer's team, not ArtCraft's (since 0.27, per its README). - mac_team: Some("G5QA5U5X2S"), - ..app( - "solidcraft", - "SolidCraft", - "Parametric 3D CAD", - [[0x46, 0xa1, 0xfb], [0x16, 0x53, 0xae], [0x8c, 0xc4, 0xff]], - "tangency-labs/solidcraft", - ) - }, - CraftApp { - kind: AppKind::Community, - publisher: "UCS Care Group", - msi_publisher: Some("MailCraft contributors"), - bundle: Some("io.github.billsecond.mailcraft"), - site: Some("https://mailcraft.work"), - // ponytail: its macOS builds are unsigned (per its README), so the launcher opens a copy - // that's there but installs nothing; set its Developer ID team here once it signs them. - mac_team: None, - ..app( - "mailcraft", - "MailCraft", - "Mail, calendar and contacts", - [[0x0f, 0x68, 0xf0], [0x06, 0x34, 0xc4], [0x8f, 0xbf, 0xff]], - "UCS-Care-Group/mailcraft", - ) - }, -]; +// The bundled suite, in website display order, then the approved community apps. +include!(concat!(env!("OUT_DIR"), "/catalog.rs")); /// The Apple Developer team that signs every official Craft App and ArtCraft Launcher (Learning /// Machines LLC): the macOS side of the Windows publisher check. @@ -330,6 +193,9 @@ pub const LAUNCHER_ID: &str = "artcraft-launcher"; /// A Craft App's 128 px icon (PNG), as copied from its repo into `assets/app-icons`: the UI /// draws it, and the Linux install puts it in the desktop menu. pub fn app_icon_png(id: &str) -> Option<&'static [u8]> { + if let Some(icon) = crate::hosted_catalog::icon(id) { + return Some(icon); + } Some(match id { "artcraft" => include_bytes!("../../../assets/app-icons/artcraft.png"), "photocraft" => include_bytes!("../../../assets/app-icons/photocraft.png"), diff --git a/crates/core/src/details.rs b/crates/core/src/details.rs index 86d091c3..128d0757 100644 --- a/crates/core/src/details.rs +++ b/crates/core/src/details.rs @@ -1,7 +1,6 @@ //! Hand-written product pages: what each app is, in the launcher's own words. //! -//! The text is compiled in, so it works offline and on the web, and nothing from the network is -//! ever shown as page copy. What changes with every release (version, date, size, notes) comes +//! Bundled text works offline and on the web; a verified hosted snapshot may replace it. What changes with every release (version, date, size, notes) comes //! from the GitHub release instead. An app without an entry here simply has no details page. //! //! The pictures are not compiled in: they are fetched when a page is opened (see @@ -136,454 +135,7 @@ pub fn screenshot_within_budget(bytes: &[u8]) -> bool { } } -/// Where every Craft App runs (getartcraft.com lists the same for each of them). -const PLATFORMS: &str = "macOS, Windows, Linux, FreeBSD, web"; - -pub const DETAILS: [AppDetails; 19] = [ - AppDetails { - id: "photocraft", - headline: "The image editor you already know how to use.", - about: "Layers, masks, adjustment layers, layer styles, type, vectors and brushes in a native app. Open source, offline, and yours.\n\n\ - PhotoCraft keeps the menus, shortcuts and panels your hands already know, so there is \ - nothing to relearn.", - features: &[ - feature("Native GPU canvas", "No Electron and no web view: a fast native compositor."), - feature("Real layered files", "Opens and saves layered PSD and PSB documents."), - feature("Non-destructive editing", "Adjustment layers, live-preview filters, smart objects and layer styles."), - feature("On-device selection", "Subject and object selection and mask refinement run locally."), - feature("Serious color", "8-, 16- and 32-bit RGB, CMYK, Lab and Grayscale, with ICC color management and soft proofing."), - ], - shots: &[ - shot("demo", "Curves and type layers"), - shot("adjustments", "Levels with a live histogram"), - shot("layer-styles", "Layer styles on live type"), - shot("masks", "Selections and masked adjustments"), - ], - platforms: PLATFORMS, - }, - AppDetails { - id: "vectorcraft", - headline: "Vector illustration, with familiar tools and editable effects.", - about: "A native vector illustration app with the pen, panels and shortcuts illustrators expect. \ - Open source, and it also runs in a browser.", - features: &[ - feature( - "The workflow you know", - "Pen, direct selection, shape booleans, snapping guides and an appearance panel, laid out the way you expect.", - ), - feature("Genuinely fast", "Drawings with thousands of shapes stay responsive on a retina display."), - feature( - "Booleans that don't fail", - "Shape booleans work on the exact curves, so there is no \"cannot perform operation\", and undo is unlimited.", - ), - feature("Live, editable effects", "Blends, envelope distort, gradient mesh, repeats, glows and drop shadows all stay editable."), - feature("Image tracing", "Turn raster images into clean vector paths, with presets for the common cases."), - feature("Open formats", "Native JSON documents, SVG and PDF import and export, and PNG, JPEG and WebP output."), - ], - shots: &[ - shot("neon", "The Neon Drive poster"), - shot("ribbons", "Live blends"), - shot("sheet", "A feature sheet and the Layers panel"), - shot("bezier", "Pathfinder and exact booleans"), - ], - platforms: PLATFORMS, - }, - AppDetails { - id: "filmcraft", - headline: "Professional video editing, rebuilt from scratch.", - about: "A native video editor with source and program monitors, a real timeline and \ - every trim mode.", - features: &[ - feature("A timeline you already know", "Source and program monitors, three-point editing, every trim mode and J/K/L trimming."), - feature("Frame-exact time", "An integer timebase keeps 23.976 and 29.97 drop-frame footage exact, with no drift."), - feature("Its own codecs", "No FFmpeg inside: native support for H.264, HEVC, ProRes, VP9, AAC and Opus."), - feature("Color grading", "Curves, color wheels, HSL secondaries, LUTs and HDR and log workflows, with scopes to check the result."), - feature( - "Effects and keyframes", - "Video effects and transitions, keyframes with value and velocity graphs, and a linear-light GPU compositor.", - ), - feature("Broadcast-ready audio", "EBU R128 loudness meters, a mixer with automation and native audio effects."), - ], - shots: &[ - shot("color", "The Color workspace, with scopes"), - shot("assembly", "The Assembly workspace"), - shot("keyframes", "Keyframes in Effect Controls"), - ], - platforms: PLATFORMS, - }, - AppDetails { - id: "lightcraft", - headline: "Your photos. Your pixels. Your machine.", - about: "A fast photo library and non-destructive raw developer. \ - No account, no cloud, no telemetry and no subscription.", - features: &[ - feature("Non-destructive by design", "A wide-gamut, 32-bit float pipeline that never touches your originals."), - feature("Every control you reach for", "Light, color, effects, tone curve, a color mixer, color grading wheels and built-in presets."), - feature("Precise masking", "Brush, gradient and range masks, plus sky, subject and background masks."), - feature("Native raw decoding", "Support for the main camera raw formats: DNG, CR2, ARW, NEF, RAF, RW2, PEF and ORF."), - feature("A library that keeps up", "Albums, ratings, flags and search, with grids that stay smooth on large catalogs."), - feature("Instant feedback", "The GPU pipeline updates the preview as you move a slider, even on large raw files."), - ], - shots: &[ - shot("hero", "The Edit view"), - shot("curve", "The tone curve"), - shot("grading", "Color grading wheels"), - shot("masking", "A radial mask over a sky mask"), - ], - platforms: PLATFORMS, - }, - AppDetails { - id: "pdfcraft", - headline: "The open-source PDF workbench.", - about: "Read, organize, combine, split and secure PDFs in a fast, native app. No account, no telemetry and no cloud.", - features: &[ - feature("Faithful rendering", "World scripts, vertical Japanese, color emoji and transparency."), - feature("Search as you type", "Instant find, and text selection that follows the document's real reading order."), - feature("Organize like cards", "Rotate, delete, insert and reorder pages, with deep undo behind every change."), - feature("Combine, extract, split", "Assemble and break apart documents while keeping links, form fields, layers and bookmarks intact."), - feature("Fearless saves", "Incremental, atomic saves with autosave and crash recovery."), - feature("Built-in security", "Opens files from RC4 to AES-256 encryption and honors the author's permissions."), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "effectcraft", - headline: "Motion graphics and visual effects.", - about: "A native compositor with compositions, layers, keyframes, effects, expressions, 3D cameras and \ - lights, and a render queue. Young, moving fast, and already usable.", - features: &[ - feature( - "Animate the way you know", - "Familiar panels and keyframes (linear, bezier, hold and eased), with a graph editor for value and speed curves.", - ), - feature( - "Layers of every kind", - "Solids, shapes, text, footage, nested compositions, nulls and adjustment layers, with parenting, track mattes and blend modes.", - ), - feature( - "A large effects library", - "Blur, color correction, distortion, generators, keying, particles and simulation, stylize and time effects.", - ), - feature("Real 3D", "3D layers with cameras, depth of field, and lights that cast soft ray-traced shadows."), - feature("Expressions", "JavaScript expressions with wiggle, loops and layer references, edited inline."), - feature("Export anywhere", "H.264 and ProRes with alpha, PNG, TIFF and EXR sequences, GIF, and Lottie import and export."), - ], - shots: &[ - shot("hero", "An animated composition"), - shot("graph", "The Graph Editor"), - shot("effects", "Particles and Effect Controls"), - shot("3d", "3D layers with cameras and lights"), - ], - platforms: PLATFORMS, - }, - AppDetails { - id: "anicraft", - headline: "Vector animation on a timeline you know.", - about: "Open-source 2D vector animation, built in pure Rust.", - features: &[ - feature( - "Familiar by design", - "Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening.", - ), - feature( - "Tweens that ease", - "Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another.", - ), - feature( - "Symbols and scenes", - "Graphic symbols and movie clips with nested timelines and loop modes, mask and guide layers, filters, blend modes and scenes.", - ), - feature( - "Real vector tools", - "Pen, Pencil with curve fitting, shapes, text, Paint Bucket and Ink Bottle, with Bézier anchors and handles you edit point by point.", - ), - feature( - "Open formats", - "Opens .fla and .xfl documents and imports SVG. Exports PNG sequences, GIF, SVG frames, sprite sheets, Lottie, and WebM or MP4 through your own FFmpeg.", - ), - feature( - "Agent-ready", - "Every action is an engine command, so the CLI, a JSON-lines channel and an MCP server can draw, animate and export the way a person does.", - ), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "designcraft", - headline: "Page layout and publishing.", - about: "A native layout app with spreads, parent pages, threaded stories, styles, swatches, text wrap and \ - a paragraph composer. No subscription, no license server and no telemetry.", - features: &[ - feature("The layout tools you know", "Spreads and parent pages, frames and threaded stories, with paragraph and character styles."), - feature( - "Beautiful type", - "A Knuth–Plass paragraph composer, dictionary hyphenation, optical margin alignment and baseline grids, with line breaks that match on screen and in PDF.", - ), - feature("Print-ready PDF", "Real selectable text with embedded fonts, CMYK and spot colors, bleed, crop marks and PDF/A output."), - feature("Fast", "Multithreaded rendering, instant undo and cached text composition."), - feature("Open formats", "A documented native format, PNG export and layout interchange import and export."), - feature("Built for automation", "Every menu item, tool, panel and dialog can be driven over a JSON control channel and an MCP server."), - ], - shots: &[shot("spread", "A magazine spread with a threaded story")], - platforms: PLATFORMS, - }, - AppDetails { - id: "wordcraft", - headline: "The familiar word processor, native and offline.", - about: "A word processor with the ribbon, shortcuts and behavior you already know. \ - Open source, and built from public specifications.", - features: &[ - feature( - "Familiar", - "Ribbon tabs and groups, a live Styles gallery and the editing behavior you expect, from list continuation to Format Painter.", - ), - feature( - "Your files", - "Opens and saves .docx, and also .odt, .rtf, .html, .md, .tex and .txt. Opens older .doc files and exports PDF with real, selectable text.", - ), - feature("Fast", "Paragraph layout is cached, so typing stays responsive even in long documents."), - feature("Private", "Spelling, grammar and everything else work offline."), - feature("Everywhere", "Work on macOS, Windows, Linux, BSD and the web."), - feature( - "Built for agents", - "Every action is a command, driven from the ribbon, shortcuts, a command-line tool, a JSON control channel or an MCP server.", - ), - ], - shots: &[ - shot("hero", "The Home tab and the Navigation pane"), - shot("review", "Track Changes and comments"), - shot("design", "The Design tab"), - shot("layout", "The Layout tab"), - ], - platforms: "macOS, Windows, Linux, BSD, web", - }, - AppDetails { - id: "deckcraft", - headline: "Create slides, tell stories and present.", - about: "A presentation app with slide masters, shapes, animations and a presenter view. \ - In alpha, heading for beta.", - features: &[ - feature("Make decks", "Slide masters and layouts with placeholders that inherit formatting, themes, sections, notes and comments."), - feature( - "Draw", - "Preset shapes with adjust handles, connectors that stay glued to shapes, freeform tools, merged shapes, gradients, shadows and glow.", - ), - feature("Write", "In-place text editing with full font and paragraph formatting, bullets and numbering, columns and autofit."), - feature("Add content", "Pictures with crop and corrections, styled tables, charts, audio and video."), - feature( - "Present", - "Transitions including Morph, animations and motion paths, a full-screen slide show, presenter view and rehearsed timings.", - ), - feature("Exchange files", "Opens and saves .pptx presentation files and exports PDF (slides, notes pages and handouts), PNG and JPEG."), - ], - shots: &[ - shot("editor", "Editing a slide, with sections and notes"), - shot("shape", "The Shape Format tab"), - shot("sorter", "The slide sorter"), - shot("format", "The Format Shape pane"), - ], - platforms: "macOS, Windows, Linux, BSD, web", - }, - AppDetails { - id: "gridcraft", - headline: "Spreadsheets you already know how to use.", - about: "A spreadsheet with the ribbon, formula bar, sheet tabs and shortcuts you know. No subscription, no license server and no telemetry.", - features: &[ - feature( - "Familiar", - "The ribbon, formula bar, Name Box, fill handle, point-mode formulas, Format Cells, Paste Special, conditional formatting, tables and charts.", - ), - feature( - "Compatible", - "XLSX is the native format, with formulas, tables, conditional formats, charts, pivot tables and print settings round-tripping. CSV and TSV too.", - ), - feature( - "Capable", - "A dependency-graph calculation engine with dynamic arrays, LET and LAMBDA, structured table references, sort, AutoFilter and Flash Fill.", - ), - feature("Fast", "Copy-on-write workbooks, incremental recalculation and a grid that only lays out what is on screen."), - feature( - "Agent-native", - "Every ribbon button, menu item, dialog and keystroke is a command, available over a JSON control channel, an MCP server or the CLI.", - ), - feature("Everywhere", "Work on the desktop and the web."), - ], - shots: &[ - shot("hero", "A quarterly sales dashboard"), - shot("budget", "A household budget"), - shot("pivot", "A pivot table"), - shot("chart", "Formatting a chart"), - ], - platforms: "macOS, Windows, Linux, BSD, web", - }, - AppDetails { - id: "cadcraft", - headline: "Computer-aided drafting, with a familiar workflow.", - about: "A drafting app with the command line, object snaps and workflow that drafters already know. Free, with no \ - account and no subscription. In early, fast development.", - features: &[ - feature( - "The workflow you know", - "Type L, click two points, type @5<45 and press Enter. Prompts with clickable keywords, polar tracking, direct distance entry and grips work the way drafting habit expects.", - ), - feature( - "Open files", - "Reads and writes DXF natively (R12 through 2018) and opens and saves DWG (R13 through 2018). Exports SVG and PNG.", - ), - feature("Fast and native", "A responsive, native drafting workspace."), - feature( - "A full drafting toolset", - "Draw, modify, dimension, hatch and block commands, layers with a properties manager, paper-space layouts and PDF plotting.", - ), - feature("Built for agents", "Every menu item, tool and prompt is a command, available over MCP, a JSON control channel or the CLI."), - ], - shots: &[shot("apartment", "An apartment floor plan"), shot("bracket", "A mechanical bracket drawing"), shot("layout", "A layout sheet")], - platforms: PLATFORMS, - }, - AppDetails { - id: "soundcraft", - headline: "Record, edit and mix your audio.", - about: "A digital audio workstation that follows the workflow audio engineers already know: an Edit window for \ - arranging and editing, and a Mix window for balancing. Pre-alpha.", - features: &[ - feature( - "Editing", - "Shuffle, Slip, Spot and Grid modes, Smart, Grabber, Trim and other tools, fades and crossfades, playlists with comping lanes and clip gain.", - ), - feature( - "Mixing", - "Faders and pans with automation, sends, busses, aux inputs, VCA masters, routing folders and automatic plugin delay compensation.", - ), - feature( - "Automation", - "Volume, pan, mute, send and every plugin parameter, with Write, Touch, Latch and Trim passes recorded live from the faders.", - ), - feature( - "Plugins", - "EQ, dynamics, reverbs, modulation effects, a subtractive synth and a drum synth, all original, and CLAP plugins load too.", - ), - ], - shots: &[ - shot("edit", "The Edit window with a nine-track session"), - shot("mix", "The Mix window"), - shot("automation", "Automation and memory locations"), - shot("score", "The Score Editor"), - ], - platforms: PLATFORMS, - }, - AppDetails { - id: "figcraft", - headline: "Interface design and prototyping.", - about: "Design screens, components and prototypes in a native app that opens instantly and works offline, \ - with no account and no telemetry. Early alpha.", - features: &[ - feature( - "Auto layout", - "Rows, columns, wrap and grids with padding, gaps and Hug, Fill or Fixed sizing, plus constraints and layout grids.", - ), - feature( - "Components", - "Instances with overrides, variants and properties, styles, and variables with modes bound to fills, strokes and effects.", - ), - feature("Vectors", "Real vector networks, the pen and pencil, the shape builder, editable booleans and variable width strokes."), - feature( - "Prototypes", - "Connections, triggers and animated transitions, variables with conditionals, flows and a presentation view with device frames.", - ), - feature( - "Hand off", - "Inspect mode with measurements, annotations, ready-for-dev status, and code for CSS, HTML, React, SwiftUI and Compose.", - ), - feature( - "Your files", - "Plain .figcraft files on your own disk. SVG, PNG, JPEG, WebP and PDF in and out, and .fig files open, best effort.", - ), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "texturecraft", - headline: "Paint textures on 3D models.", - about: "Paint materials on 3D models and export textures.", - features: &[ - feature("Materials", "Paint materials on 3D models and export textures."), - feature("Mesh maps", "Bake mesh maps and use smart materials."), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "materialcraft", - headline: "Build materials with node graphs.", - about: "Create tileable PBR materials and export texture maps.", - features: &[ - feature("Node graphs", "Combine noises, patterns and filters."), - feature("Live previews", "Preview materials in 2D and on 3D models."), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "craft-anything", - headline: "See how any website, app or game works, then build your own.", - about: "Point it at a target and say what you want. It studies the original with real inspection tools, has a \ - coding agent build a new project in the stack you ask for, checks the result against the original and \ - refines it. Open source and clean-room.", - features: &[ - feature( - "Study anything", - "Websites, desktop apps, phone apps, games and files: find out how they're built, with the evidence behind every answer.", - ), - feature("Build your own", "Say what you want and a coding agent builds a new project in the language or engine you name."), - feature( - "Checked, not guessed", - "Every build is compared with the original, at three screen widths for a page, and refined until it's close.", - ), - feature("Agent-ready", "Every tool is a CLI command and an MCP tool, and no AI is needed just to inspect."), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "solidcraft", - headline: "Parametric 3D CAD, with editable sketches and solids.", - about: "A parametric solid modeller by Tangency Labs. Sketch, constrain and build solids on an editable feature \ - timeline: change a dimension and the model rebuilds. Early, but usable for simple parts. Open source, \ - and it can be driven by AI agents through its MCP server.", - features: &[ - feature( - "Sketches and constraints", - "Lines, arcs, splines and text, solved by SolidCraft's own constraint solver, with parameter-driven dimensions.", - ), - feature("Features", "Extrude, revolve, sweep, loft, fillet, chamfer, shell, holes, threads and patterns on a parametric timeline."), - feature("Files", "STEP, IGES, 3MF, STL, OBJ and glTF in and out where supported, and .sc designs."), - feature("Desktop, web and agents", "A desktop app, a browser app, a headless CLI and an MCP server, all running the same commands."), - ], - shots: &[], - platforms: PLATFORMS, - }, - AppDetails { - id: "mailcraft", - headline: "Mail, calendar, contacts and tasks, in one native app.", - about: "An open-source mail program by UCS Care Group, written from scratch in Rust: the folder pane, message \ - list and reading pane people already know, with a calendar, people and to-dos. Works with Microsoft 365, \ - Outlook.com and IMAP. In public beta, and it can be driven by AI agents through its MCP server.", - features: &[ - feature( - "Mail", - "Conversations, flags, categories, rules, search with a query language, and HTML mail shown without running anything in it.", - ), - feature("Calendar", "Day, week and month views, recurring meetings, invitations and reminders, kept in step with Microsoft 365."), - feature("Files", ".eml, .mbox, .ics and .vcf in and out, and the mail and contacts of an Outlook .pst file in."), - feature("Desktop, web and agents", "A desktop app, a browser app, a CLI and an MCP server, all running the same commands."), - ], - shots: &[], - platforms: PLATFORMS, - }, -]; +include!(concat!(env!("OUT_DIR"), "/details.rs")); impl AppDetails { /// Where the picture `key` of this app is published, or `None` if the page has no such picture. @@ -593,7 +145,7 @@ impl AppDetails { } pub fn by_id(id: &str) -> Option<&'static AppDetails> { - DETAILS.iter().find(|d| d.id == id) + crate::hosted_catalog::details(id).or_else(|| DETAILS.iter().find(|d| d.id == id)) } pub fn paragraphs(&self) -> impl Iterator { diff --git a/crates/core/src/hosted_catalog.rs b/crates/core/src/hosted_catalog.rs new file mode 100644 index 00000000..dfb7c0b3 --- /dev/null +++ b/crates/core/src/hosted_catalog.rs @@ -0,0 +1,498 @@ +//! Signed website catalog. The bundled catalog remains available without any network. +//! +//! One bounded, immutable snapshot is activated per process. Its strings are interned only +//! inside `OnceLock::get_or_init`, preserving the existing static app handles used by jobs. +//! No repeated refresh can leak another snapshot or change a running install's identity. + +use std::collections::{HashMap, HashSet}; +use std::sync::OnceLock; + +use base64::{Engine, engine::general_purpose::STANDARD}; +use ed25519_dalek::{Signature, VerifyingKey, pkcs8::DecodePublicKey}; +use serde::Deserialize; +use sha2::{Digest, Sha256}; + +use crate::catalog::{ARTCRAFT_TEAM_ID, AppKind, CraftApp, SUITE}; +use crate::details::{AppDetails, Feature, Shot}; + +pub const CATALOG_URL: &str = "https://getartcraft.com/launcher-catalog.toml"; +pub const SIGNATURE_URL: &str = "https://getartcraft.com/launcher-catalog.toml.sig"; +pub const PUBLIC_KEY_PEM: &str = include_str!("../assets/launcher-catalog-public-key.pem"); +pub const MAX_CATALOG_BYTES: usize = 1 << 20; +pub const MAX_SIGNATURE_BYTES: usize = 128; +pub const MAX_ICON_BYTES: usize = 256 << 10; +const MAX_APPS: usize = 64; + +static ACTIVE: OnceLock = OnceLock::new(); + +struct Snapshot { + apps: Vec, + details: Vec, + metadata: HashMap, + icons: HashMap>, +} + +/// Only desktop metadata consumed by existing integration. Package identities stay pinned. +pub struct Metadata { + pub desktop_categories: String, + pub startup_wm_class: String, + pub icon_sha256: String, +} + +#[derive(Deserialize)] +struct Document { + apps: Vec, +} + +#[derive(Deserialize)] +struct Record { + id: String, + name: String, + tagline: String, + color: [u8; 3], + ink_light: [u8; 3], + ink_dark: [u8; 3], + repo: String, + #[serde(default)] + former_ids: Vec, + #[serde(default)] + former_names: Vec, + #[serde(default)] + former_bundles: Vec, + kind: String, + publisher: String, + msi_publisher: Option, + bundle: Option, + site: Option, + mac_team: Option, + mac_bundle_name: Option, + icon_url: String, + icon_sha256: String, + desktop_categories: Vec, + startup_wm_class: String, + details: Option, +} + +#[derive(Deserialize)] +struct Page { + headline: String, + about: String, + platforms: String, + #[serde(default)] + features: Vec, + #[serde(default)] + shots: Vec, +} + +#[derive(Deserialize)] +struct PageFeature { + title: String, + text: String, +} + +#[derive(Deserialize)] +struct PageShot { + key: String, + caption: String, + url: String, +} + +/// A verified, policy-checked catalog, not yet made visible to running jobs. +pub struct VerifiedCatalog { + records: Vec, + pub rejected_entries: usize, +} + +impl VerifiedCatalog { + /// Signature verification always precedes parsing; even cached bytes are reverified. + pub fn verify(bytes: &[u8], signature: &[u8]) -> Result { + let key = VerifyingKey::from_public_key_pem(PUBLIC_KEY_PEM).map_err(|_| "invalid compiled catalog key")?; + Self::verify_with_key(bytes, signature, &key) + } + + fn verify_with_key(bytes: &[u8], signature: &[u8], key: &VerifyingKey) -> Result { + if bytes.len() > MAX_CATALOG_BYTES || signature.len() > MAX_SIGNATURE_BYTES { + return Err("catalog or signature exceeds its byte limit".into()); + } + let encoded = std::str::from_utf8(signature).map_err(|_| "signature is not UTF-8")?.trim(); + let decoded = STANDARD.decode(encoded).map_err(|_| "invalid base64 catalog signature")?; + let signature = Signature::from_slice(&decoded).map_err(|_| "invalid Ed25519 signature length")?; + key.verify_strict(bytes, &signature).map_err(|_| "catalog signature does not match the pinned key")?; + Self::parse(bytes) + } + + fn parse(bytes: &[u8]) -> Result { + let text = std::str::from_utf8(bytes).map_err(|_| "catalog is not UTF-8")?; + let document: Document = toml::from_str(text).map_err(|e| format!("invalid catalog TOML: {e}"))?; + if document.apps.is_empty() || document.apps.len() > MAX_APPS { + return Err("catalog app count is outside the limit".into()); + } + let mut records = Vec::new(); + let mut seen = HashSet::new(); + let mut rejected_entries = 0; + for value in document.apps { + let record: Record = match value.try_into() { + Ok(record) => record, + Err(_) => { + rejected_entries += 1; + continue; + } + }; + if !valid_record(&record) || !seen.insert(record.id.clone()) { + rejected_entries += 1; + continue; + } + records.push(record); + } + if records.is_empty() { + return Err("catalog has no acceptable apps".into()); + } + Ok(Self { records, rejected_entries }) + } + + /// URLs/hashes are already validated. Fetchers may use a cached or bundled matching icon. + pub fn icons(&self) -> impl Iterator { + self.records.iter().map(|r| (r.id.as_str(), r.icon_url.as_str(), r.icon_sha256.as_str())) + } + + /// Publishes once per process; omitted bundled apps stay manageable after a remote removal. + pub fn activate(self, icons: HashMap>) { + ACTIVE.get_or_init(|| self.into_snapshot(icons)); + } + + fn into_snapshot(self, icons: HashMap>) -> Snapshot { + let mut apps = Vec::new(); + let mut details = Vec::new(); + let mut metadata = HashMap::new(); + let mut kept_icons = HashMap::new(); + for record in self.records { + if let Some(icon) = icons.get(&record.id).filter(|b| valid_icon(b, &record.icon_sha256)) { + kept_icons.insert(record.id.clone(), icon.clone()); + } + metadata.insert( + record.id.clone(), + Metadata { + desktop_categories: record.desktop_categories.join(";") + ";", + startup_wm_class: record.startup_wm_class.clone(), + icon_sha256: record.icon_sha256.clone(), + }, + ); + if let Some(page) = record.details { + details.push(AppDetails { + id: intern(record.id.clone()), + headline: intern(page.headline), + about: intern(page.about), + platforms: intern(page.platforms), + features: Box::leak( + page.features + .into_iter() + .map(|f| Feature { title: intern(f.title), text: intern(f.text) }) + .collect::>() + .into_boxed_slice(), + ), + shots: Box::leak( + page.shots + .into_iter() + .map(|s| Shot { key: intern(s.key), caption: intern(s.caption) }) + .collect::>() + .into_boxed_slice(), + ), + }); + } + apps.push(CraftApp { + id: intern(record.id), + name: intern(record.name), + tagline: intern(record.tagline), + color: record.color, + ink_light: record.ink_light, + ink_dark: record.ink_dark, + repo: intern(record.repo), + former_ids: intern_list(record.former_ids), + former_names: intern_list(record.former_names), + former_bundles: intern_list(record.former_bundles), + mac_bundle_name: record.mac_bundle_name.map(intern), + kind: if record.kind == "official" { AppKind::Official } else { AppKind::Community }, + publisher: intern(record.publisher), + msi_publisher: record.msi_publisher.map(intern), + bundle: record.bundle.map(intern), + site: record.site.map(intern), + mac_team: record.mac_team.map(intern), + }); + } + for app in &SUITE { + if !apps.iter().any(|a| a.id == app.id) { + apps.push(*app); + } + } + Snapshot { apps, details, metadata, icons: kept_icons } + } +} + +/// Runtime catalog, with the compiled suite as the offline/invalid-response fallback. +pub fn apps() -> &'static [CraftApp] { + ACTIVE.get().map_or(&SUITE, |s| s.apps.as_slice()) +} +pub fn details(id: &str) -> Option<&'static AppDetails> { + ACTIVE.get()?.details.iter().find(|p| p.id == id) +} +pub fn metadata(id: &str) -> Option<&'static Metadata> { + ACTIVE.get()?.metadata.get(id) +} +pub fn icon(id: &str) -> Option<&'static [u8]> { + ACTIVE.get()?.icons.get(id).map(Vec::as_slice) +} + +/// Bound decoded allocation before handing an authenticated PNG to an image loader. +pub fn valid_icon(bytes: &[u8], digest: &str) -> bool { + if bytes.len() > MAX_ICON_BYTES || bytes.get(..8) != Some(b"\x89PNG\r\n\x1a\n") || bytes.get(12..16) != Some(b"IHDR") { + return false; + } + let Some(size) = bytes.get(16..24) else { return false }; + let Ok(size) = <&[u8; 8]>::try_from(size) else { return false }; + let [a, b, c, d, e, f, g, h] = *size; + let (w, h) = (u32::from_be_bytes([a, b, c, d]), u32::from_be_bytes([e, f, g, h])); + w > 0 && h > 0 && w <= 512 && h <= 512 && format!("{:x}", Sha256::digest(bytes)) == digest +} + +fn valid_record(r: &Record) -> bool { + if !identifier(&r.id) + || r.id.as_bytes().first().is_none_or(|c| !c.is_ascii_lowercase()) + || r.id == "artcraft-launcher" + || r.name.is_empty() + || r.name.len() > 128 + || r.name.chars().any(char::is_control) + || !r.id.bytes().all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == b'-') + || r.name.contains(['/', '\\']) + || !matches!(r.kind.as_str(), "official" | "community") + { + return false; + } + let bundle = r.bundle.clone().unwrap_or_else(|| format!("ai.storyteller.{}", r.id)); + if !bundle.chars().all(|c| c.is_ascii_alphanumeric() || matches!(c, '.' | '-' | '_')) || bundle.is_empty() { + return false; + } + // A signature cannot expand the compiled community allowlist or change existing install + // identities. These checks keep native detection/uninstall and publisher verification pinned. + if let Some(pinned) = SUITE.iter().find(|a| a.id == r.id) { + if r.repo != pinned.repo + || (r.kind == "official") != (pinned.kind == AppKind::Official) + || r.publisher != pinned.publisher + || r.msi_publisher.as_deref() != pinned.msi_publisher + || bundle != pinned.bundle_id() + || r.former_ids != pinned.former_ids + || r.former_names != pinned.former_names + || r.former_bundles != pinned.former_bundles + || r.mac_team.as_deref() != pinned.mac_team + || r.mac_bundle_name.as_deref().unwrap_or(&r.name) != pinned.mac_bundle_name() + || r.name != pinned.name + { + return false; + } + } else if r.kind != "official" + || r.repo != format!("storytold/{}", r.id) + || r.publisher != "ArtCraft" + || r.msi_publisher.is_some() + || r.bundle.is_some() + || r.mac_team.as_deref() != Some(ARTCRAFT_TEAM_ID) + || !r.former_ids.is_empty() + || !r.former_names.is_empty() + || !r.former_bundles.is_empty() + || r.mac_bundle_name.as_deref().is_some_and(|name| name != r.name) + { + return false; + } + if r.desktop_categories.len() > 16 + || !r.desktop_categories.iter().all(|c| identifier(c)) + || r.startup_wm_class.is_empty() + || r.startup_wm_class.chars().any(char::is_control) + { + return false; + } + if r.site.as_ref().is_some_and(|s| !s.starts_with("https://") || s.chars().any(char::is_control)) { + return false; + } + if r.icon_sha256.len() != 64 + || !r.icon_sha256.bytes().all(|c| c.is_ascii_hexdigit()) + || r.icon_url != format!("https://getartcraft.com/launcher-app-icons/{}-{}.png", r.id, r.icon_sha256) + { + return false; + } + r.details.as_ref().is_none_or(|p| { + p.features.len() <= 16 + && p.shots.len() <= 16 + && p.shots.iter().all(|s| { + identifier(&s.key) + && s.url == format!("{}/{}/{}/{}.jpg", crate::details::SCREENSHOTS_BASE, crate::details::SCREENSHOTS_REV, r.id, s.key) + }) + }) +} + +fn identifier(value: &str) -> bool { + !value.is_empty() && value.len() <= 80 && value.bytes().all(|c| c.is_ascii_alphanumeric() || matches!(c, b'-' | b'_')) +} +fn intern(value: String) -> &'static str { + Box::leak(value.into_boxed_str()) +} +fn intern_list(values: Vec) -> &'static [&'static str] { + Box::leak(values.into_iter().map(intern).collect::>().into_boxed_slice()) +} + +#[cfg(test)] +mod tests { + use super::*; + use ed25519_dalek::{Signer, SigningKey}; + + const BUNDLED: &[u8] = include_bytes!("../catalog.toml"); + const WEBSITE: &[u8] = include_bytes!("../tests/fixtures/hosted-catalog.toml"); + const SIGNATURE: &[u8] = include_bytes!("../tests/fixtures/hosted-catalog.toml.sig"); + + fn signed(bytes: &[u8]) -> Result { + let key = SigningKey::from_bytes(&[7; 32]); + let signature = STANDARD.encode(key.sign(bytes).to_bytes()); + VerifiedCatalog::verify_with_key(bytes, signature.as_bytes(), &key.verifying_key()) + } + + fn first_record() -> Record { + let document: Document = toml::from_str(std::str::from_utf8(BUNDLED).unwrap()).unwrap(); + document.apps.into_iter().next().unwrap().try_into().unwrap() + } + + #[test] + fn website_fixture_verifies_with_the_actual_pinned_public_key() { + let catalog = VerifiedCatalog::verify(WEBSITE, SIGNATURE).unwrap(); + assert_eq!(catalog.records.len(), SUITE.len()); + assert_eq!(catalog.rejected_entries, 0); + for record in &catalog.records { + let bundled = SUITE.iter().find(|app| app.id == record.id).unwrap(); + assert_eq!(record.repo, bundled.repo); + } + } + + #[test] + fn tampered_wrong_key_missing_and_oversized_signatures_are_rejected() { + let mut tampered = WEBSITE.to_vec(); + tampered.push(b'\n'); + assert!(VerifiedCatalog::verify(&tampered, SIGNATURE).is_err()); + let wrong = STANDARD.encode(SigningKey::from_bytes(&[7; 32]).sign(WEBSITE).to_bytes()); + assert!(VerifiedCatalog::verify(WEBSITE, wrong.as_bytes()).is_err()); + for signature in [b"".as_slice(), b"not-base64", &[b'a'; MAX_SIGNATURE_BYTES + 1]] { + assert!(VerifiedCatalog::verify(BUNDLED, signature).is_err()); + } + assert!(VerifiedCatalog::verify(&vec![0; MAX_CATALOG_BYTES + 1], SIGNATURE).is_err()); + } + + #[test] + fn signed_fixture_keeps_lf_bytes_on_every_platform() { + assert!(!WEBSITE.contains(&b'\r')); + assert!(VerifiedCatalog::verify(WEBSITE, SIGNATURE).is_ok()); + let crlf = std::str::from_utf8(WEBSITE).unwrap().replace("\n", "\r\n"); + assert!(VerifiedCatalog::verify(crlf.as_bytes(), SIGNATURE).is_err()); + } + + #[test] + fn malformed_entries_and_unknown_fields_do_not_spoil_valid_apps() { + let text = std::str::from_utf8(BUNDLED).unwrap(); + let text = format!("unknown_top_level = true\n{text}\n[[apps]]\nid = 42\n"); + let verified = signed(text.as_bytes()).unwrap(); + assert_eq!(verified.records.len(), SUITE.len()); + assert_eq!(verified.rejected_entries, 1); + assert!(signed(b"not = [valid").is_err()); + assert!(signed(b"apps = []").is_err()); + } + + #[test] + fn signature_cannot_expand_community_or_change_pinned_install_identity() { + let mut r = first_record(); + r.repo = "attacker/photocraft".into(); + assert!(!valid_record(&r)); + r = first_record(); + r.mac_team = Some("OTHERTEAM1".into()); + assert!(!valid_record(&r)); + r = first_record(); + r.bundle = Some("other.bundle".into()); + assert!(!valid_record(&r)); + r = first_record(); + r.msi_publisher = Some("Other Publisher".into()); + assert!(!valid_record(&r)); + r = first_record(); + r.former_ids.push("unrelated".into()); + assert!(!valid_record(&r)); + r = first_record(); + r.name = "../other".into(); + assert!(!valid_record(&r)); + r = future_app(); + r.kind = "community".into(); + r.repo = "unapproved/examplecraft".into(); + assert!(!valid_record(&r)); + } + + fn future_app() -> Record { + let mut r = first_record(); + r.id = "examplecraft".into(); + r.name = "ExampleCraft".into(); + r.repo = "storytold/examplecraft".into(); + r.mac_bundle_name = Some(r.name.clone()); + r.startup_wm_class = "ai.storyteller.examplecraft".into(); + r.icon_url = format!("https://getartcraft.com/launcher-app-icons/{}-{}.png", r.id, r.icon_sha256); + r.details = None; + r + } + + #[test] + fn future_official_app_needs_no_launcher_release_but_stays_within_policy() { + let mut r = future_app(); + assert!(valid_record(&r)); + r.id = "../escape".into(); + assert!(!valid_record(&r)); + r = future_app(); + r.id = "-option".into(); + r.repo = "storytold/-option".into(); + r.icon_url = format!("https://getartcraft.com/launcher-app-icons/{}-{}.png", r.id, r.icon_sha256); + assert!(!valid_record(&r)); + r = future_app(); + r.icon_url = "https://other.example/icon.png".into(); + assert!(!valid_record(&r)); + r = future_app(); + r.startup_wm_class = "example\nExec=other".into(); + assert!(!valid_record(&r)); + r = future_app(); + r.desktop_categories.push("Graphics;\nExec=other".into()); + assert!(!valid_record(&r)); + r = first_record(); + r.details.as_mut().unwrap().shots[0].url = "https://other.example/shot.jpg".into(); + assert!(!valid_record(&r)); + } + + #[test] + fn icon_hashes_and_decode_dimensions_are_checked() { + let bytes = crate::catalog::app_icon_png("photocraft").unwrap(); + let digest = format!("{:x}", Sha256::digest(bytes)); + assert!(valid_icon(bytes, &digest)); + assert!(!valid_icon(bytes, &"0".repeat(64))); + assert!(!valid_icon(&bytes[..20], &digest)); + let mut huge = bytes.to_vec(); + huge[16..20].copy_from_slice(&u32::MAX.to_be_bytes()); + assert!(!valid_icon(&huge, &format!("{:x}", Sha256::digest(&huge)))); + } + #[test] + fn runtime_snapshot_adds_apps_details_icons_and_retains_omitted_bundled_apps() { + let mut record = future_app(); + record.details = Some(Page { + headline: "New app".into(), + about: "Signed copy".into(), + platforms: "Linux".into(), + features: vec![PageFeature { title: "Feature".into(), text: "Description".into() }], + shots: vec![], + }); + let icon = crate::catalog::app_icon_png("photocraft").unwrap().to_vec(); + let snapshot = + VerifiedCatalog { records: vec![record], rejected_entries: 0 }.into_snapshot(HashMap::from([("examplecraft".into(), icon.clone())])); + assert_eq!(snapshot.apps.len(), SUITE.len() + 1); + assert_eq!(snapshot.apps[0].id, "examplecraft"); + assert_eq!(snapshot.apps[0].repo, "storytold/examplecraft"); + assert_eq!(snapshot.details[0].headline, "New app"); + assert_eq!(snapshot.metadata["examplecraft"].startup_wm_class, "ai.storyteller.examplecraft"); + assert_eq!(snapshot.icons["examplecraft"], icon); + assert!(SUITE.iter().all(|app| snapshot.apps.iter().any(|a| a.id == app.id))); + } +} diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs index f1489768..76c81705 100644 --- a/crates/core/src/lib.rs +++ b/crates/core/src/lib.rs @@ -11,6 +11,7 @@ pub mod catalog; pub mod details; pub mod distro; pub mod feed; +pub mod hosted_catalog; pub mod platform; pub mod protocol; pub mod release; diff --git a/crates/core/src/protocol.rs b/crates/core/src/protocol.rs index d699f24c..b65e10ed 100644 --- a/crates/core/src/protocol.rs +++ b/crates/core/src/protocol.rs @@ -204,6 +204,8 @@ impl Source { /// Something the backend wants the UI to know. #[derive(Clone, Debug, PartialEq)] pub enum Event { + /// A signed startup catalog has replaced the bundled app list. + CatalogUpdated, Latest { app: String, latest: LatestRelease, diff --git a/crates/core/tests/fixtures/hosted-catalog.toml b/crates/core/tests/fixtures/hosted-catalog.toml new file mode 100644 index 00000000..693abed8 --- /dev/null +++ b/crates/core/tests/fixtures/hosted-catalog.toml @@ -0,0 +1,1045 @@ +# ArtCraft Launcher catalog, served at https://getartcraft.com/launcher-catalog.toml. +# Source: storytold/craft-launcher at c6362817864df42d1fbfa105d3aaca9f728d434c +# Generated by scripts/sync-launcher-catalog.py; preserve the existing TOML schema. +# Verify launcher-catalog.toml.sig with the launcher's pinned Ed25519 key before use. +# Install sources must still follow the launcher's approved-source policy. + +[[apps]] +color = [47, 123, 245] +former_bundles = [] +former_ids = [] +former_names = [] +id = "photocraft" +binary = "photocraft" +flatpak_id = "ai.storyteller.photocraft" +mac_bundle_id = "ai.storyteller.photocraft" +mac_bundle_name = "PhotoCraft" +website = "https://getartcraft.com/apps/photocraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "photocraft" +rpm_package = "photocraft" +desktop_categories = ["Graphics", "2DGraphics", "RasterGraphics", "Photography"] +startup_wm_class = "photocraft" +icon_url = "https://getartcraft.com/launcher-app-icons/photocraft-f1afe9ccdb125a34089babecb6c1533f3fbf41ddffe81e0856f158c5b5fb9389.png" +icon_sha256 = "f1afe9ccdb125a34089babecb6c1533f3fbf41ddffe81e0856f158c5b5fb9389" +ink_dark = [127, 176, 255] +ink_light = [26, 91, 196] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "PhotoCraft" +publisher = "ArtCraft" +repo = "storytold/photocraft" +tagline = "Image editing" +[apps.details] +headline = "The image editor you already know how to use." +about = "Layers, masks, adjustment layers, layer styles, type, vectors and brushes in a native app. Open source, offline, and yours.\n\nPhotoCraft keeps the menus, shortcuts and panels your hands already know, so there is nothing to relearn." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "No Electron and no web view: a fast native compositor." +title = "Native GPU canvas" +[[apps.details.features]] +text = "Opens and saves layered PSD and PSB documents." +title = "Real layered files" +[[apps.details.features]] +text = "Adjustment layers, live-preview filters, smart objects and layer styles." +title = "Non-destructive editing" +[[apps.details.features]] +text = "Subject and object selection and mask refinement run locally." +title = "On-device selection" +[[apps.details.features]] +text = "8-, 16- and 32-bit RGB, CMYK, Lab and Grayscale, with ICC color management and soft proofing." +title = "Serious color" +[[apps.details.shots]] +caption = "Curves and type layers" +key = "demo" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/demo.jpg" +[[apps.details.shots]] +caption = "Levels with a live histogram" +key = "adjustments" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/adjustments.jpg" +[[apps.details.shots]] +caption = "Layer styles on live type" +key = "layer-styles" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/layer-styles.jpg" +[[apps.details.shots]] +caption = "Selections and masked adjustments" +key = "masks" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/photocraft/masks.jpg" + +[[apps]] +color = [232, 87, 63] +former_bundles = [] +former_ids = [] +former_names = [] +id = "vectorcraft" +binary = "vectorcraft" +flatpak_id = "ai.storyteller.vectorcraft" +mac_bundle_id = "ai.storyteller.vectorcraft" +mac_bundle_name = "VectorCraft" +website = "https://getartcraft.com/apps/vectorcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "vectorcraft" +rpm_package = "vectorcraft" +desktop_categories = ["Graphics", "2DGraphics", "VectorGraphics"] +startup_wm_class = "ai.storyteller.vectorcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/vectorcraft-47f2061e3683ba8e7241c4783ca02207d29dfef0a7c94cd0eb8ea0a88dfc0b1e.png" +icon_sha256 = "47f2061e3683ba8e7241c4783ca02207d29dfef0a7c94cd0eb8ea0a88dfc0b1e" +ink_dark = [255, 138, 112] +ink_light = [184, 58, 36] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "VectorCraft" +publisher = "ArtCraft" +repo = "storytold/vectorcraft" +tagline = "Vector illustration" +[apps.details] +headline = "Vector illustration, with familiar tools and editable effects." +about = "A native vector illustration app with the pen, panels and shortcuts illustrators expect. Open source, and it also runs in a browser." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Pen, direct selection, shape booleans, snapping guides and an appearance panel, laid out the way you expect." +title = "The workflow you know" +[[apps.details.features]] +text = "Drawings with thousands of shapes stay responsive on a retina display." +title = "Genuinely fast" +[[apps.details.features]] +text = "Shape booleans work on the exact curves, so there is no \"cannot perform operation\", and undo is unlimited." +title = "Booleans that don't fail" +[[apps.details.features]] +text = "Blends, envelope distort, gradient mesh, repeats, glows and drop shadows all stay editable." +title = "Live, editable effects" +[[apps.details.features]] +text = "Turn raster images into clean vector paths, with presets for the common cases." +title = "Image tracing" +[[apps.details.features]] +text = "Native JSON documents, SVG and PDF import and export, and PNG, JPEG and WebP output." +title = "Open formats" +[[apps.details.shots]] +caption = "The Neon Drive poster" +key = "neon" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/neon.jpg" +[[apps.details.shots]] +caption = "Live blends" +key = "ribbons" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/ribbons.jpg" +[[apps.details.shots]] +caption = "A feature sheet and the Layers panel" +key = "sheet" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/sheet.jpg" +[[apps.details.shots]] +caption = "Pathfinder and exact booleans" +key = "bezier" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/vectorcraft/bezier.jpg" + +[[apps]] +color = [139, 92, 246] +former_bundles = [] +former_ids = [] +former_names = [] +id = "filmcraft" +binary = "filmcraft" +flatpak_id = "ai.storyteller.filmcraft" +mac_bundle_id = "ai.storyteller.filmcraft" +mac_bundle_name = "FilmCraft" +website = "https://getartcraft.com/apps/filmcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "filmcraft" +rpm_package = "filmcraft" +desktop_categories = ["AudioVideo", "Video", "AudioVideoEditing"] +startup_wm_class = "ai.storyteller.filmcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/filmcraft-7ca8adb57a34d1f4bff8c7e976ac5fe73e69a89b4268d15b3b861c7e51c45a74.png" +icon_sha256 = "7ca8adb57a34d1f4bff8c7e976ac5fe73e69a89b4268d15b3b861c7e51c45a74" +ink_dark = [182, 156, 255] +ink_light = [106, 63, 214] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "FilmCraft" +publisher = "ArtCraft" +repo = "storytold/filmcraft" +tagline = "Video editing, color and sound" +[apps.details] +headline = "Professional video editing, rebuilt from scratch." +about = "A native video editor with source and program monitors, a real timeline and every trim mode." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Source and program monitors, three-point editing, every trim mode and J/K/L trimming." +title = "A timeline you already know" +[[apps.details.features]] +text = "An integer timebase keeps 23.976 and 29.97 drop-frame footage exact, with no drift." +title = "Frame-exact time" +[[apps.details.features]] +text = "No FFmpeg inside: native support for H.264, HEVC, ProRes, VP9, AAC and Opus." +title = "Its own codecs" +[[apps.details.features]] +text = "Curves, color wheels, HSL secondaries, LUTs and HDR and log workflows, with scopes to check the result." +title = "Color grading" +[[apps.details.features]] +text = "Video effects and transitions, keyframes with value and velocity graphs, and a linear-light GPU compositor." +title = "Effects and keyframes" +[[apps.details.features]] +text = "EBU R128 loudness meters, a mixer with automation and native audio effects." +title = "Broadcast-ready audio" +[[apps.details.shots]] +caption = "The Color workspace, with scopes" +key = "color" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/filmcraft/color.jpg" +[[apps.details.shots]] +caption = "The Assembly workspace" +key = "assembly" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/filmcraft/assembly.jpg" +[[apps.details.shots]] +caption = "Keyframes in Effect Controls" +key = "keyframes" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/filmcraft/keyframes.jpg" + +[[apps]] +color = [242, 165, 22] +former_bundles = [] +former_ids = [] +former_names = [] +id = "lightcraft" +binary = "lightcraft" +flatpak_id = "ai.storyteller.lightcraft" +mac_bundle_id = "ai.storyteller.lightcraft" +mac_bundle_name = "LightCraft" +website = "https://getartcraft.com/apps/lightcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "lightcraft" +rpm_package = "lightcraft" +desktop_categories = ["Graphics", "2DGraphics", "RasterGraphics", "Photography"] +startup_wm_class = "ai.storyteller.lightcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/lightcraft-a1fc54a714b769fa627eb44b0dcc1230e5fc3643890fd3504811b4c05c4a913a.png" +icon_sha256 = "a1fc54a714b769fa627eb44b0dcc1230e5fc3643890fd3504811b4c05c4a913a" +ink_dark = [255, 193, 77] +ink_light = [138, 88, 0] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "LightCraft" +publisher = "ArtCraft" +repo = "storytold/lightcraft" +tagline = "Photo library and raw development" +[apps.details] +headline = "Your photos. Your pixels. Your machine." +about = "A fast photo library and non-destructive raw developer. No account, no cloud, no telemetry and no subscription." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "A wide-gamut, 32-bit float pipeline that never touches your originals." +title = "Non-destructive by design" +[[apps.details.features]] +text = "Light, color, effects, tone curve, a color mixer, color grading wheels and built-in presets." +title = "Every control you reach for" +[[apps.details.features]] +text = "Brush, gradient and range masks, plus sky, subject and background masks." +title = "Precise masking" +[[apps.details.features]] +text = "Support for the main camera raw formats: DNG, CR2, ARW, NEF, RAF, RW2, PEF and ORF." +title = "Native raw decoding" +[[apps.details.features]] +text = "Albums, ratings, flags and search, with grids that stay smooth on large catalogs." +title = "A library that keeps up" +[[apps.details.features]] +text = "The GPU pipeline updates the preview as you move a slider, even on large raw files." +title = "Instant feedback" +[[apps.details.shots]] +caption = "The Edit view" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/hero.jpg" +[[apps.details.shots]] +caption = "The tone curve" +key = "curve" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/curve.jpg" +[[apps.details.shots]] +caption = "Color grading wheels" +key = "grading" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/grading.jpg" +[[apps.details.shots]] +caption = "A radial mask over a sky mask" +key = "masking" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/lightcraft/masking.jpg" + +[[apps]] +color = [232, 32, 79] +former_bundles = [] +former_ids = ["printcraft"] +former_names = ["PrintCraft"] +id = "pdfcraft" +binary = "pdfcraft" +flatpak_id = "ai.storyteller.pdfcraft" +mac_bundle_id = "ai.storyteller.pdfcraft" +mac_bundle_name = "PdfCraft" +website = "https://getartcraft.com/apps/pdfcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "pdfcraft" +rpm_package = "pdfcraft" +desktop_categories = ["Office", "Viewer"] +startup_wm_class = "pdfcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/pdfcraft-1933bbeaea290497facd328e917dafcc433d0c0caa9f1e207aa45ac1e430898c.png" +icon_sha256 = "1933bbeaea290497facd328e917dafcc433d0c0caa9f1e207aa45ac1e430898c" +ink_dark = [242, 58, 98] +ink_light = [183, 2, 40] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "PdfCraft" +publisher = "ArtCraft" +repo = "storytold/pdfcraft" +tagline = "Reading, organizing and protecting PDFs" +[apps.details] +headline = "The open-source PDF workbench." +about = "Read, organize, combine, split and secure PDFs in a fast, native app. No account, no telemetry and no cloud." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "World scripts, vertical Japanese, color emoji and transparency." +title = "Faithful rendering" +[[apps.details.features]] +text = "Instant find, and text selection that follows the document's real reading order." +title = "Search as you type" +[[apps.details.features]] +text = "Rotate, delete, insert and reorder pages, with deep undo behind every change." +title = "Organize like cards" +[[apps.details.features]] +text = "Assemble and break apart documents while keeping links, form fields, layers and bookmarks intact." +title = "Combine, extract, split" +[[apps.details.features]] +text = "Incremental, atomic saves with autosave and crash recovery." +title = "Fearless saves" +[[apps.details.features]] +text = "Opens files from RC4 to AES-256 encryption and honors the author's permissions." +title = "Built-in security" + +[[apps]] +color = [224, 54, 143] +former_bundles = [] +former_ids = [] +former_names = [] +id = "effectcraft" +binary = "effectcraft" +flatpak_id = "ai.storyteller.effectcraft" +mac_bundle_id = "ai.storyteller.effectcraft" +mac_bundle_name = "EffectCraft" +website = "https://getartcraft.com/apps/effectcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "effectcraft" +rpm_package = "effectcraft" +desktop_categories = ["AudioVideo", "Video", "Graphics", "2DGraphics"] +startup_wm_class = "ai.storyteller.effectcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/effectcraft-4ad7caa4f43b4cbf3bcddda0ed23e471d392efbe8d0b4ce18107b5849f20dd2d.png" +icon_sha256 = "4ad7caa4f43b4cbf3bcddda0ed23e471d392efbe8d0b4ce18107b5849f20dd2d" +ink_dark = [255, 122, 184] +ink_light = [176, 32, 108] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "EffectCraft" +publisher = "ArtCraft" +repo = "storytold/effectcraft" +tagline = "Motion graphics and visual effects" +[apps.details] +headline = "Motion graphics and visual effects." +about = "A native compositor with compositions, layers, keyframes, effects, expressions, 3D cameras and lights, and a render queue. Young, moving fast, and already usable." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Familiar panels and keyframes (linear, bezier, hold and eased), with a graph editor for value and speed curves." +title = "Animate the way you know" +[[apps.details.features]] +text = "Solids, shapes, text, footage, nested compositions, nulls and adjustment layers, with parenting, track mattes and blend modes." +title = "Layers of every kind" +[[apps.details.features]] +text = "Blur, color correction, distortion, generators, keying, particles and simulation, stylize and time effects." +title = "A large effects library" +[[apps.details.features]] +text = "3D layers with cameras, depth of field, and lights that cast soft ray-traced shadows." +title = "Real 3D" +[[apps.details.features]] +text = "JavaScript expressions with wiggle, loops and layer references, edited inline." +title = "Expressions" +[[apps.details.features]] +text = "H.264 and ProRes with alpha, PNG, TIFF and EXR sequences, GIF, and Lottie import and export." +title = "Export anywhere" +[[apps.details.shots]] +caption = "An animated composition" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/hero.jpg" +[[apps.details.shots]] +caption = "The Graph Editor" +key = "graph" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/graph.jpg" +[[apps.details.shots]] +caption = "Particles and Effect Controls" +key = "effects" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/effects.jpg" +[[apps.details.shots]] +caption = "3D layers with cameras and lights" +key = "3d" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/effectcraft/3d.jpg" + +[[apps]] +color = [218, 198, 4] +former_bundles = [] +former_ids = [] +former_names = [] +id = "anicraft" +binary = "anicraft" +flatpak_id = "ai.storyteller.anicraft" +mac_bundle_id = "ai.storyteller.anicraft" +mac_bundle_name = "AniCraft" +website = "https://github.com/storytold/anicraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "anicraft" +rpm_package = "anicraft" +desktop_categories = ["Graphics", "2DGraphics", "VectorGraphics", "AudioVideo"] +startup_wm_class = "anicraft" +icon_url = "https://getartcraft.com/launcher-app-icons/anicraft-e6754980d8a2a4acd429f6e3e3ba5569c4a761a45102a81d7edc0ef35210ce47.png" +icon_sha256 = "e6754980d8a2a4acd429f6e3e3ba5569c4a761a45102a81d7edc0ef35210ce47" +ink_dark = [232, 216, 74] +ink_light = [112, 101, 0] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "AniCraft" +publisher = "ArtCraft" +repo = "storytold/anicraft" +site = "https://github.com/storytold/anicraft" +tagline = "2D vector animation" +[apps.details] +headline = "Vector animation on a timeline you know." +about = "Open-source 2D vector animation, built in pure Rust." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening." +title = "Familiar by design" +[[apps.details.features]] +text = "Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another." +title = "Tweens that ease" +[[apps.details.features]] +text = "Graphic symbols and movie clips with nested timelines and loop modes, mask and guide layers, filters, blend modes and scenes." +title = "Symbols and scenes" +[[apps.details.features]] +text = "Pen, Pencil with curve fitting, shapes, text, Paint Bucket and Ink Bottle, with Bézier anchors and handles you edit point by point." +title = "Real vector tools" +[[apps.details.features]] +text = "Opens .fla and .xfl documents and imports SVG. Exports PNG sequences, GIF, SVG frames, sprite sheets, Lottie, and WebM or MP4 through your own FFmpeg." +title = "Open formats" +[[apps.details.features]] +text = "Every action is an engine command, so the CLI, a JSON-lines channel and an MCP server can draw, animate and export the way a person does." +title = "Agent-ready" + +[[apps]] +color = [123, 181, 28] +former_bundles = [] +former_ids = [] +former_names = [] +id = "designcraft" +binary = "designcraft" +flatpak_id = "ai.storyteller.designcraft" +mac_bundle_id = "ai.storyteller.designcraft" +mac_bundle_name = "DesignCraft" +website = "https://getartcraft.com/apps/designcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "designcraft" +rpm_package = "designcraft" +desktop_categories = ["Graphics", "Publishing"] +startup_wm_class = "ai.storyteller.designcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/designcraft-0895763da92947cb6b1d38a018a6c7ffcda1cbb714a58f2e9bc08e0e2a2b94b4.png" +icon_sha256 = "0895763da92947cb6b1d38a018a6c7ffcda1cbb714a58f2e9bc08e0e2a2b94b4" +ink_dark = [166, 224, 74] +ink_light = [69, 112, 8] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "DesignCraft" +publisher = "ArtCraft" +repo = "storytold/designcraft" +tagline = "Page layout and publishing" +[apps.details] +headline = "Page layout and publishing." +about = "A native layout app with spreads, parent pages, threaded stories, styles, swatches, text wrap and a paragraph composer. No subscription, no license server and no telemetry." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Spreads and parent pages, frames and threaded stories, with paragraph and character styles." +title = "The layout tools you know" +[[apps.details.features]] +text = "A Knuth–Plass paragraph composer, dictionary hyphenation, optical margin alignment and baseline grids, with line breaks that match on screen and in PDF." +title = "Beautiful type" +[[apps.details.features]] +text = "Real selectable text with embedded fonts, CMYK and spot colors, bleed, crop marks and PDF/A output." +title = "Print-ready PDF" +[[apps.details.features]] +text = "Multithreaded rendering, instant undo and cached text composition." +title = "Fast" +[[apps.details.features]] +text = "A documented native format, PNG export and layout interchange import and export." +title = "Open formats" +[[apps.details.features]] +text = "Every menu item, tool, panel and dialog can be driven over a JSON control channel and an MCP server." +title = "Built for automation" +[[apps.details.shots]] +caption = "A magazine spread with a threaded story" +key = "spread" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/designcraft/spread.jpg" + +[[apps]] +color = [2, 218, 150] +former_bundles = [] +former_ids = [] +former_names = [] +id = "figcraft" +binary = "figcraft" +flatpak_id = "ai.storyteller.figcraft" +mac_bundle_id = "ai.storyteller.figcraft" +mac_bundle_name = "FigCraft" +website = "https://getartcraft.com/apps/figcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "figcraft" +rpm_package = "figcraft" +desktop_categories = ["Graphics", "2DGraphics", "VectorGraphics", "X-Design"] +startup_wm_class = "figcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/figcraft-13d5236adb30c2bd4ff3eb7bcb7bb5a70d8de2ef36a81a5ffaf43ea171c7f51b.png" +icon_sha256 = "13d5236adb30c2bd4ff3eb7bcb7bb5a70d8de2ef36a81a5ffaf43ea171c7f51b" +ink_dark = [79, 232, 182] +ink_light = [4, 122, 86] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "FigCraft" +publisher = "ArtCraft" +repo = "storytold/figcraft" +tagline = "Interface design and prototyping" +[apps.details] +headline = "Interface design and prototyping." +about = "Design screens, components and prototypes in a native app that opens instantly and works offline, with no account and no telemetry. Early alpha." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Rows, columns, wrap and grids with padding, gaps and Hug, Fill or Fixed sizing, plus constraints and layout grids." +title = "Auto layout" +[[apps.details.features]] +text = "Instances with overrides, variants and properties, styles, and variables with modes bound to fills, strokes and effects." +title = "Components" +[[apps.details.features]] +text = "Real vector networks, the pen and pencil, the shape builder, editable booleans and variable width strokes." +title = "Vectors" +[[apps.details.features]] +text = "Connections, triggers and animated transitions, variables with conditionals, flows and a presentation view with device frames." +title = "Prototypes" +[[apps.details.features]] +text = "Inspect mode with measurements, annotations, ready-for-dev status, and code for CSS, HTML, React, SwiftUI and Compose." +title = "Hand off" +[[apps.details.features]] +text = "Plain .figcraft files on your own disk. SVG, PNG, JPEG, WebP and PDF in and out, and .fig files open, best effort." +title = "Your files" + +[[apps]] +color = [63, 95, 224] +former_bundles = [] +former_ids = [] +former_names = [] +id = "wordcraft" +binary = "wordcraft" +flatpak_id = "ai.storyteller.wordcraft" +mac_bundle_id = "ai.storyteller.wordcraft" +mac_bundle_name = "WordCraft" +website = "https://getartcraft.com/apps/wordcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "wordcraft" +rpm_package = "wordcraft" +desktop_categories = ["Office", "WordProcessor"] +startup_wm_class = "ai.storyteller.wordcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/wordcraft-96505c7153c1b8a7e0cf0f90353fae669f4ed9de5524ba50ba99af79003cff43.png" +icon_sha256 = "96505c7153c1b8a7e0cf0f90353fae669f4ed9de5524ba50ba99af79003cff43" +ink_dark = [142, 162, 255] +ink_light = [42, 68, 184] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "WordCraft" +publisher = "ArtCraft" +repo = "storytold/wordcraft" +tagline = "Writing and document design" +[apps.details] +headline = "The familiar word processor, native and offline." +about = "A word processor with the ribbon, shortcuts and behavior you already know. Open source, and built from public specifications." +platforms = "macOS, Windows, Linux, BSD, web" +[[apps.details.features]] +text = "Ribbon tabs and groups, a live Styles gallery and the editing behavior you expect, from list continuation to Format Painter." +title = "Familiar" +[[apps.details.features]] +text = "Opens and saves .docx, and also .odt, .rtf, .html, .md, .tex and .txt. Opens older .doc files and exports PDF with real, selectable text." +title = "Your files" +[[apps.details.features]] +text = "Paragraph layout is cached, so typing stays responsive even in long documents." +title = "Fast" +[[apps.details.features]] +text = "Spelling, grammar and everything else work offline." +title = "Private" +[[apps.details.features]] +text = "Work on macOS, Windows, Linux, BSD and the web." +title = "Everywhere" +[[apps.details.features]] +text = "Every action is a command, driven from the ribbon, shortcuts, a command-line tool, a JSON control channel or an MCP server." +title = "Built for agents" +[[apps.details.shots]] +caption = "The Home tab and the Navigation pane" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/hero.jpg" +[[apps.details.shots]] +caption = "Track Changes and comments" +key = "review" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/review.jpg" +[[apps.details.shots]] +caption = "The Design tab" +key = "design" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/design.jpg" +[[apps.details.shots]] +caption = "The Layout tab" +key = "layout" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/wordcraft/layout.jpg" + +[[apps]] +color = [31, 165, 201] +former_bundles = [] +former_ids = [] +former_names = [] +id = "soundcraft" +binary = "soundcraft" +flatpak_id = "ai.storyteller.soundcraft" +mac_bundle_id = "ai.storyteller.soundcraft" +mac_bundle_name = "SoundCraft" +website = "https://getartcraft.com/apps/soundcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "soundcraft" +rpm_package = "soundcraft" +desktop_categories = ["AudioVideo", "Audio", "Midi", "Mixer", "Sequencer", "Recorder"] +startup_wm_class = "ai.storyteller.soundcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/soundcraft-0e7f4f83d82f5539530f62f85ccf8717dcc00c6d25a3dba57e2a65111e3b248b.png" +icon_sha256 = "0e7f4f83d82f5539530f62f85ccf8717dcc00c6d25a3dba57e2a65111e3b248b" +ink_dark = [95, 208, 238] +ink_light = [14, 114, 144] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "SoundCraft" +publisher = "ArtCraft" +repo = "storytold/soundcraft" +tagline = "Recording, editing and mixing audio" +[apps.details] +headline = "Record, edit and mix your audio." +about = "A digital audio workstation that follows the workflow audio engineers already know: an Edit window for arranging and editing, and a Mix window for balancing. Pre-alpha." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Shuffle, Slip, Spot and Grid modes, Smart, Grabber, Trim and other tools, fades and crossfades, playlists with comping lanes and clip gain." +title = "Editing" +[[apps.details.features]] +text = "Faders and pans with automation, sends, busses, aux inputs, VCA masters, routing folders and automatic plugin delay compensation." +title = "Mixing" +[[apps.details.features]] +text = "Volume, pan, mute, send and every plugin parameter, with Write, Touch, Latch and Trim passes recorded live from the faders." +title = "Automation" +[[apps.details.features]] +text = "EQ, dynamics, reverbs, modulation effects, a subtractive synth and a drum synth, all original, and CLAP plugins load too." +title = "Plugins" +[[apps.details.shots]] +caption = "The Edit window with a nine-track session" +key = "edit" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/edit.jpg" +[[apps.details.shots]] +caption = "The Mix window" +key = "mix" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/mix.jpg" +[[apps.details.shots]] +caption = "Automation and memory locations" +key = "automation" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/automation.jpg" +[[apps.details.shots]] +caption = "The Score Editor" +key = "score" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/soundcraft/score.jpg" + +[[apps]] +color = [240, 122, 30] +former_bundles = [] +former_ids = [] +former_names = [] +id = "deckcraft" +binary = "deckcraft" +flatpak_id = "ai.storyteller.deckcraft" +mac_bundle_id = "ai.storyteller.deckcraft" +mac_bundle_name = "DeckCraft" +website = "https://getartcraft.com/apps/deckcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "deckcraft" +rpm_package = "deckcraft" +desktop_categories = ["Office", "Presentation"] +startup_wm_class = "ai.storyteller.deckcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/deckcraft-1bf98b43bb0b21cb038ce063e71b9922e7f48c10d5b99afd046aa6c30642ca69.png" +icon_sha256 = "1bf98b43bb0b21cb038ce063e71b9922e7f48c10d5b99afd046aa6c30642ca69" +ink_dark = [255, 160, 96] +ink_light = [168, 79, 10] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "DeckCraft" +publisher = "ArtCraft" +repo = "storytold/deckcraft" +tagline = "Presentations and slide shows" +[apps.details] +headline = "Create slides, tell stories and present." +about = "A presentation app with slide masters, shapes, animations and a presenter view. In alpha, heading for beta." +platforms = "macOS, Windows, Linux, BSD, web" +[[apps.details.features]] +text = "Slide masters and layouts with placeholders that inherit formatting, themes, sections, notes and comments." +title = "Make decks" +[[apps.details.features]] +text = "Preset shapes with adjust handles, connectors that stay glued to shapes, freeform tools, merged shapes, gradients, shadows and glow." +title = "Draw" +[[apps.details.features]] +text = "In-place text editing with full font and paragraph formatting, bullets and numbering, columns and autofit." +title = "Write" +[[apps.details.features]] +text = "Pictures with crop and corrections, styled tables, charts, audio and video." +title = "Add content" +[[apps.details.features]] +text = "Transitions including Morph, animations and motion paths, a full-screen slide show, presenter view and rehearsed timings." +title = "Present" +[[apps.details.features]] +text = "Opens and saves .pptx presentation files and exports PDF (slides, notes pages and handouts), PNG and JPEG." +title = "Exchange files" +[[apps.details.shots]] +caption = "Editing a slide, with sections and notes" +key = "editor" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/editor.jpg" +[[apps.details.shots]] +caption = "The Shape Format tab" +key = "shape" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/shape.jpg" +[[apps.details.shots]] +caption = "The slide sorter" +key = "sorter" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/sorter.jpg" +[[apps.details.shots]] +caption = "The Format Shape pane" +key = "format" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/deckcraft/format.jpg" + +[[apps]] +color = [62, 166, 232] +former_bundles = [] +former_ids = [] +former_names = [] +id = "cadcraft" +binary = "cadcraft" +flatpak_id = "ai.storyteller.cadcraft" +mac_bundle_id = "ai.storyteller.cadcraft" +mac_bundle_name = "CADCraft" +website = "https://getartcraft.com/apps/cadcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "cadcraft" +rpm_package = "cadcraft" +desktop_categories = ["Graphics", "Engineering", "VectorGraphics"] +startup_wm_class = "ai.storyteller.cadcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/cadcraft-c126ff5030d0a0f3e63f039bae81ca63ba71230da2e6fca54e08df1119ea3443.png" +icon_sha256 = "c126ff5030d0a0f3e63f039bae81ca63ba71230da2e6fca54e08df1119ea3443" +ink_dark = [124, 200, 255] +ink_light = [26, 111, 168] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "CADCraft" +publisher = "ArtCraft" +repo = "storytold/cadcraft" +tagline = "Computer-aided design and drafting" +[apps.details] +headline = "Computer-aided drafting, with a familiar workflow." +about = "A drafting app with the command line, object snaps and workflow that drafters already know. Free, with no account and no subscription. In early, fast development." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Type L, click two points, type @5<45 and press Enter. Prompts with clickable keywords, polar tracking, direct distance entry and grips work the way drafting habit expects." +title = "The workflow you know" +[[apps.details.features]] +text = "Reads and writes DXF natively (R12 through 2018) and opens and saves DWG (R13 through 2018). Exports SVG and PNG." +title = "Open files" +[[apps.details.features]] +text = "A responsive, native drafting workspace." +title = "Fast and native" +[[apps.details.features]] +text = "Draw, modify, dimension, hatch and block commands, layers with a properties manager, paper-space layouts and PDF plotting." +title = "A full drafting toolset" +[[apps.details.features]] +text = "Every menu item, tool and prompt is a command, available over MCP, a JSON control channel or the CLI." +title = "Built for agents" +[[apps.details.shots]] +caption = "An apartment floor plan" +key = "apartment" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/cadcraft/apartment.jpg" +[[apps.details.shots]] +caption = "A mechanical bracket drawing" +key = "bracket" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/cadcraft/bracket.jpg" +[[apps.details.shots]] +caption = "A layout sheet" +key = "layout" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/cadcraft/layout.jpg" + +[[apps]] +color = [31, 157, 85] +former_bundles = [] +former_ids = [] +former_names = [] +id = "gridcraft" +binary = "gridcraft" +flatpak_id = "ai.storyteller.gridcraft" +mac_bundle_id = "ai.storyteller.gridcraft" +mac_bundle_name = "GridCraft" +website = "https://getartcraft.com/apps/gridcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "gridcraft" +rpm_package = "gridcraft" +desktop_categories = ["Office", "Spreadsheet"] +startup_wm_class = "ai.storyteller.gridcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/gridcraft-01ef35442b8d466b52068fda67ab740309321c8bc813b62b9207dfc4116208e7.png" +icon_sha256 = "01ef35442b8d466b52068fda67ab740309321c8bc813b62b9207dfc4116208e7" +ink_dark = [79, 214, 138] +ink_light = [18, 112, 58] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "GridCraft" +publisher = "ArtCraft" +repo = "storytold/gridcraft" +tagline = "Spreadsheets and data" +[apps.details] +headline = "Spreadsheets you already know how to use." +about = "A spreadsheet with the ribbon, formula bar, sheet tabs and shortcuts you know. No subscription, no license server and no telemetry." +platforms = "macOS, Windows, Linux, BSD, web" +[[apps.details.features]] +text = "The ribbon, formula bar, Name Box, fill handle, point-mode formulas, Format Cells, Paste Special, conditional formatting, tables and charts." +title = "Familiar" +[[apps.details.features]] +text = "XLSX is the native format, with formulas, tables, conditional formats, charts, pivot tables and print settings round-tripping. CSV and TSV too." +title = "Compatible" +[[apps.details.features]] +text = "A dependency-graph calculation engine with dynamic arrays, LET and LAMBDA, structured table references, sort, AutoFilter and Flash Fill." +title = "Capable" +[[apps.details.features]] +text = "Copy-on-write workbooks, incremental recalculation and a grid that only lays out what is on screen." +title = "Fast" +[[apps.details.features]] +text = "Every ribbon button, menu item, dialog and keystroke is a command, available over a JSON control channel, an MCP server or the CLI." +title = "Agent-native" +[[apps.details.features]] +text = "Work on the desktop and the web." +title = "Everywhere" +[[apps.details.shots]] +caption = "A quarterly sales dashboard" +key = "hero" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/hero.jpg" +[[apps.details.shots]] +caption = "A household budget" +key = "budget" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/budget.jpg" +[[apps.details.shots]] +caption = "A pivot table" +key = "pivot" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/pivot.jpg" +[[apps.details.shots]] +caption = "Formatting a chart" +key = "chart" +url = "https://raw.githubusercontent.com/storytold/craft-launcher-assets/v1/gridcraft/chart.jpg" + +[[apps]] +color = [194, 103, 43] +former_bundles = [] +former_ids = [] +former_names = [] +id = "texturecraft" +binary = "texturecraft" +flatpak_id = "ai.storyteller.texturecraft" +mac_bundle_id = "ai.storyteller.texturecraft" +mac_bundle_name = "TextureCraft" +website = "https://getartcraft.com/apps/texturecraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "texturecraft" +rpm_package = "texturecraft" +desktop_categories = ["Graphics", "3DGraphics"] +startup_wm_class = "texturecraft" +icon_url = "https://getartcraft.com/launcher-app-icons/texturecraft-ac629a038a215a13d86172286142502b6efd17618869652050f291d9745346d2.png" +icon_sha256 = "ac629a038a215a13d86172286142502b6efd17618869652050f291d9745346d2" +ink_dark = [229, 138, 78] +ink_light = [156, 74, 21] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "TextureCraft" +publisher = "ArtCraft" +repo = "storytold/texturecraft" +tagline = "3D texture painting" +[apps.details] +headline = "Paint textures on 3D models." +about = "Paint materials on 3D models and export textures." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Paint materials on 3D models and export textures." +title = "Materials" +[[apps.details.features]] +text = "Bake mesh maps and use smart materials." +title = "Mesh maps" + +[[apps]] +color = [23, 138, 156] +former_bundles = [] +former_ids = [] +former_names = [] +id = "materialcraft" +binary = "materialcraft" +flatpak_id = "ai.storyteller.materialcraft" +mac_bundle_id = "ai.storyteller.materialcraft" +mac_bundle_name = "MaterialCraft" +website = "https://github.com/storytold/materialcraft" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "materialcraft" +rpm_package = "materialcraft" +desktop_categories = ["Graphics", "3DGraphics"] +startup_wm_class = "materialcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/materialcraft-2844f2a4cf2b1d06c7eeaec8bddf13c69a0a1c3356e6767e8e97eb6b540a2c7c.png" +icon_sha256 = "2844f2a4cf2b1d06c7eeaec8bddf13c69a0a1c3356e6767e8e97eb6b540a2c7c" +ink_dark = [99, 197, 211] +ink_light = [16, 101, 115] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "MaterialCraft" +publisher = "ArtCraft" +repo = "storytold/materialcraft" +site = "https://github.com/storytold/materialcraft" +tagline = "Procedural material design" +[apps.details] +headline = "Build materials with node graphs." +about = "Create tileable PBR materials and export texture maps." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Combine noises, patterns and filters." +title = "Node graphs" +[[apps.details.features]] +text = "Preview materials in 2D and on 3D models." +title = "Live previews" + +[[apps]] +color = [78, 123, 251] +former_bundles = [] +former_ids = [] +former_names = [] +id = "craft-anything" +binary = "craft-anything" +flatpak_id = "ai.storyteller.craft-anything" +mac_bundle_id = "ai.storyteller.craft-anything" +mac_bundle_name = "Craft Anything" +website = "https://getartcraft.com/apps/craft-anything" +windows_msi_publisher = "Learning Machines LLC" +deb_package = "craft-anything" +rpm_package = "craft-anything" +desktop_categories = ["Development", "Debugger"] +startup_wm_class = "ai.storyteller.craft-anything" +icon_url = "https://getartcraft.com/launcher-app-icons/craft-anything-ddab399079b3a0a28a6584fb2ffd209bb0407896f20a8084551b5feb3060deb1.png" +icon_sha256 = "ddab399079b3a0a28a6584fb2ffd209bb0407896f20a8084551b5feb3060deb1" +ink_dark = [116, 170, 255] +ink_light = [22, 89, 196] +kind = "official" +mac_team = "DJ6XS33FX8" +name = "Craft Anything" +publisher = "ArtCraft" +repo = "storytold/craft-anything" +tagline = "Find out how any software works, then craft your own" +[apps.details] +headline = "See how any website, app or game works, then build your own." +about = "Point it at a target and say what you want. It studies the original with real inspection tools, has a coding agent build a new project in the stack you ask for, checks the result against the original and refines it. Open source and clean-room." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Websites, desktop apps, phone apps, games and files: find out how they're built, with the evidence behind every answer." +title = "Study anything" +[[apps.details.features]] +text = "Say what you want and a coding agent builds a new project in the language or engine you name." +title = "Build your own" +[[apps.details.features]] +text = "Every build is compared with the original, at three screen widths for a page, and refined until it's close." +title = "Checked, not guessed" +[[apps.details.features]] +text = "Every tool is a CLI command and an MCP tool, and no AI is needed just to inspect." +title = "Agent-ready" + +[[apps]] +bundle = "io.tangencylabs.solidcraft" +color = [70, 161, 251] +former_bundles = ["ai.storyteller.solidcraft", "ai.storyteller.solvecraft"] +former_ids = [] +former_names = [] +id = "solidcraft" +binary = "solidcraft" +flatpak_id = "io.tangencylabs.solidcraft" +mac_bundle_id = "io.tangencylabs.solidcraft" +mac_bundle_name = "SolidCraft" +website = "https://solidcraft.io" +windows_msi_publisher = "SolidCraft contributors" +deb_package = "solidcraft" +rpm_package = "solidcraft" +desktop_categories = ["Graphics"] +startup_wm_class = "io.tangencylabs.solidcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/solidcraft-46e019499579b2f477228021dd91b187303921da5d4cd14f1002a10976cf0475.png" +icon_sha256 = "46e019499579b2f477228021dd91b187303921da5d4cd14f1002a10976cf0475" +ink_dark = [140, 196, 255] +ink_light = [22, 83, 174] +kind = "community" +mac_team = "G5QA5U5X2S" +msi_publisher = "SolidCraft contributors" +name = "SolidCraft" +publisher = "Tangency Labs" +repo = "tangency-labs/solidcraft" +site = "https://solidcraft.io" +tagline = "Parametric 3D CAD" +[apps.details] +headline = "Parametric 3D CAD, with editable sketches and solids." +about = "A parametric solid modeller by Tangency Labs. Sketch, constrain and build solids on an editable feature timeline: change a dimension and the model rebuilds. Early, but usable for simple parts. Open source, and it can be driven by AI agents through its MCP server." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Lines, arcs, splines and text, solved by SolidCraft's own constraint solver, with parameter-driven dimensions." +title = "Sketches and constraints" +[[apps.details.features]] +text = "Extrude, revolve, sweep, loft, fillet, chamfer, shell, holes, threads and patterns on a parametric timeline." +title = "Features" +[[apps.details.features]] +text = "STEP, IGES, 3MF, STL, OBJ and glTF in and out where supported, and .sc designs." +title = "Files" +[[apps.details.features]] +text = "A desktop app, a browser app, a headless CLI and an MCP server, all running the same commands." +title = "Desktop, web and agents" + +[[apps]] +bundle = "io.github.billsecond.mailcraft" +color = [15, 104, 240] +former_bundles = [] +former_ids = [] +former_names = [] +id = "mailcraft" +binary = "mailcraft" +flatpak_id = "io.github.billsecond.mailcraft" +mac_bundle_id = "io.github.billsecond.mailcraft" +mac_bundle_name = "MailCraft" +website = "https://mailcraft.work" +windows_msi_publisher = "MailCraft contributors" +deb_package = "mailcraft" +rpm_package = "mailcraft" +desktop_categories = ["Graphics"] +startup_wm_class = "io.github.billsecond.mailcraft" +icon_url = "https://getartcraft.com/launcher-app-icons/mailcraft-dd0e62a27b0066ae5f461d5f829cfa143b49ca6a1b9dc9b47686818edd664bf7.png" +icon_sha256 = "dd0e62a27b0066ae5f461d5f829cfa143b49ca6a1b9dc9b47686818edd664bf7" +ink_dark = [143, 191, 255] +ink_light = [6, 52, 196] +kind = "community" +msi_publisher = "MailCraft contributors" +name = "MailCraft" +publisher = "UCS Care Group" +repo = "UCS-Care-Group/mailcraft" +site = "https://mailcraft.work" +tagline = "Mail, calendar and contacts" +[apps.details] +headline = "Mail, calendar, contacts and tasks, in one native app." +about = "An open-source mail program by UCS Care Group, written from scratch in Rust: the folder pane, message list and reading pane people already know, with a calendar, people and to-dos. Works with Microsoft 365, Outlook.com and IMAP. In public beta, and it can be driven by AI agents through its MCP server." +platforms = "macOS, Windows, Linux, FreeBSD, web" +[[apps.details.features]] +text = "Conversations, flags, categories, rules, search with a query language, and HTML mail shown without running anything in it." +title = "Mail" +[[apps.details.features]] +text = "Day, week and month views, recurring meetings, invitations and reminders, kept in step with Microsoft 365." +title = "Calendar" +[[apps.details.features]] +text = ".eml, .mbox, .ics and .vcf in and out, and the mail and contacts of an Outlook .pst file in." +title = "Files" +[[apps.details.features]] +text = "A desktop app, a browser app, a CLI and an MCP server, all running the same commands." +title = "Desktop, web and agents" diff --git a/crates/core/tests/fixtures/hosted-catalog.toml.sig b/crates/core/tests/fixtures/hosted-catalog.toml.sig new file mode 100644 index 00000000..781a4610 --- /dev/null +++ b/crates/core/tests/fixtures/hosted-catalog.toml.sig @@ -0,0 +1 @@ +jBP6IMAHVzXER9SxsJRy8NFFD8jJkG9GxLuqJxeNDIOaQFZbmLgEwaFv9PmNFRHW5z+rj4P6rixNKSKX2/NuAg== diff --git a/crates/native/src/backend.rs b/crates/native/src/backend.rs index 5da76788..2092d459 100644 --- a/crates/native/src/backend.rs +++ b/crates/native/src/backend.rs @@ -13,7 +13,7 @@ use artcraft_launcher_core::protocol::{ Source, VersionTrack, }; use artcraft_launcher_core::release::{Asset, Release}; -use artcraft_launcher_core::{CraftApp, Installed, PackageKind, SUITE, version}; +use artcraft_launcher_core::{CraftApp, Installed, PackageKind, version}; use crate::feed_throttle::{self, FeedThrottle, Outcome}; use crate::http::{self, Http, Stop}; @@ -301,7 +301,7 @@ impl NativeBackend { let pre = options.prereleases; let feed = if pre { None } else { load_feed(&self.paths) }; let now = crate::now(); - for app in SUITE.iter().filter(|a| self.platform.is_none_or(|p| a.runs_on(p.os))) { + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| self.platform.is_none_or(|p| a.runs_on(p.os))) { let answer = match feed.as_ref().map(|f| f.answer(app, now)) { Some(FeedAnswer::Fresh(Some(r))) => Some((LatestRelease::Found(r), Origin::ArtCraftApi)), Some(FeedAnswer::Fresh(None)) => Some((LatestRelease::None, Origin::ArtCraftApi)), @@ -323,7 +323,7 @@ impl NativeBackend { let paths = self.paths.clone(); let platform = self.platform; std::thread::spawn(move || { - for app in SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { report_partial(app, &shared, &paths, platform); } }); @@ -349,12 +349,12 @@ impl NativeBackend { http::clean_downloads(&paths.downloads(), Duration::from_secs(30 * 86_400), Duration::from_secs(7 * 86_400)); let snapshot = crate::detect::Snapshot::take(); let manifest = shared.manifest.lock().unwrap_or_else(PoisonError::into_inner).clone(); - for app in SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { let found = crate::detect::detect(app, &manifest, &snapshot); publish_detected(app, found, &shared, platform); } // Downloads paused (or cut off by quitting) in an earlier run. - for app in SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { report_partial(app, &shared, &paths, platform); } drop(busy); @@ -366,7 +366,9 @@ impl NativeBackend { /// day old, or no answer at all), at most once an hour per app unless `force`. fn check(&self, force: bool) { let (Some(source), Some(http)) = (self.source.clone(), self.http.clone()) else { - for app in SUITE.iter().filter(|a| self.platform.is_none_or(|p| a.runs_on(p.os))) { + crate::hosted_catalog::load_once(None, &self.paths); + self.shared.emit(Event::CatalogUpdated); + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| self.platform.is_none_or(|p| a.runs_on(p.os))) { self.shared.emit(Event::Latest { app: app.id.to_string(), latest: LatestRelease::Failed("secure connections aren't available".into()), @@ -390,24 +392,34 @@ impl NativeBackend { std::thread::spawn(move || { let busy = busy; shared.emit(Event::CheckStarted); + crate::hosted_catalog::load_once(Some(&http), &paths); + shared.emit(Event::CatalogUpdated); let (feed, fallback) = check_plan(&http, mirror.as_ref(), pre, &paths, &shared); if let Some(f) = &feed { shared.emit(Event::Notices { announcements: f.announcements.clone(), alerts: f.alerts.clone() }); } let now = crate::now(); let queue = Mutex::new( - SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))).chain(std::iter::once(&LAUNCHER)).collect::>(), + artcraft_launcher_core::hosted_catalog::apps() + .iter() + .filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) + .chain(std::iter::once(&LAUNCHER)) + .collect::>(), ); let sources = sweep(&queue, &mirror, feed.as_ref(), fallback, &source, &shared, &paths, (platform, &options), force, now); source.save(); { let answered = shared.answered.lock().unwrap_or_else(PoisonError::into_inner); - if SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))).all(|a| answered.contains(a.id)) { + if artcraft_launcher_core::hosted_catalog::apps() + .iter() + .filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) + .all(|a| answered.contains(a.id)) + { shared.loaded.store(true, Ordering::SeqCst); } } // A newer release changes which file an install would use. - for app in SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) { report_partial(app, &shared, &paths, platform); } let source_used = source_used_of(&sources); diff --git a/crates/native/src/desktop_entry.rs b/crates/native/src/desktop_entry.rs index 5819c6b9..04cb1deb 100644 --- a/crates/native/src/desktop_entry.rs +++ b/crates/native/src/desktop_entry.rs @@ -18,6 +18,9 @@ pub const MARKER: &str = "X-ArtCraft-Launcher=true"; /// The menu categories and the window class each app's own `.desktop` file declares. pub fn meta(app: &CraftApp) -> (&'static str, Option<&'static str>) { + if let Some(meta) = artcraft_launcher_core::hosted_catalog::metadata(app.id) { + return (meta.desktop_categories.as_str(), Some(meta.startup_wm_class.as_str())); + } match app.id { "artcraft" => ("Graphics;AudioVideo;2DGraphics;", Some("artcraft")), "photocraft" => ("Graphics;2DGraphics;RasterGraphics;Photography;", Some("photocraft")), diff --git a/crates/native/src/detect.rs b/crates/native/src/detect.rs index d9a6cd51..d6119941 100644 --- a/crates/native/src/detect.rs +++ b/crates/native/src/detect.rs @@ -465,7 +465,7 @@ pub mod linux { /// pacman, Flatpak). Read once per detection pass. pub fn packages() -> Vec { let ours = |name: &str| { - artcraft_launcher_core::SUITE.iter().any(|a| { + artcraft_launcher_core::hosted_catalog::apps().iter().any(|a| { [InstallSource::Deb, InstallSource::Rpm, InstallSource::Pacman, InstallSource::Flatpak] .iter() .any(|m| crate::packages::candidate_names(a, *m).iter().any(|n| n == name)) @@ -511,10 +511,9 @@ pub mod linux { user_ids.extend(flatpaks.iter().map(|(id, _, _, _)| id.clone())); } // Bundles built from a release tarball often list no version: ask Flatpak directly. - for (id, version, _, installation) in flatpaks - .iter_mut() - .filter(|(id, v, _, _)| v.is_empty() && artcraft_launcher_core::SUITE.iter().any(|a| a.bundle_ids().any(|b| b == *id))) - { + for (id, version, _, installation) in flatpaks.iter_mut().filter(|(id, v, _, _)| { + v.is_empty() && artcraft_launcher_core::hosted_catalog::apps().iter().any(|a| a.bundle_ids().any(|b| b == *id)) + }) { let scope_arg = packages::flatpak_scope(if scope.is_empty() { installation.as_deref() } else { Some("user") }); let info_args = ["info", &scope_arg, &arch, id]; if let Some(v) = crate::process::capture_flatpak(&info_args, t).as_deref().and_then(packages::parse_flatpak_info) { @@ -754,7 +753,7 @@ mod linux_tests { #[test] fn ours_filter_matches_rpm_packages() { let ours = |name: &str| { - artcraft_launcher_core::SUITE.iter().any(|a| { + artcraft_launcher_core::hosted_catalog::apps().iter().any(|a| { [InstallSource::Deb, InstallSource::Rpm, InstallSource::Pacman, InstallSource::Flatpak] .iter() .any(|m| crate::packages::candidate_names(a, *m).iter().any(|n| n == name)) diff --git a/crates/native/src/hosted_catalog.rs b/crates/native/src/hosted_catalog.rs new file mode 100644 index 00000000..d0a3a2ba --- /dev/null +++ b/crates/native/src/hosted_catalog.rs @@ -0,0 +1,154 @@ +//! Startup-only signed catalog refresh with an atomic, reverified disk fallback. +use std::collections::HashMap; +use std::io::Read; +use std::path::Path; +use std::sync::Once; + +use artcraft_launcher_core::hosted_catalog::{ + CATALOG_URL, MAX_CATALOG_BYTES, MAX_ICON_BYTES, MAX_SIGNATURE_BYTES, SIGNATURE_URL, VerifiedCatalog, valid_icon, +}; +use serde::{Deserialize, Serialize}; + +use crate::http::Http; +use crate::paths::{Paths, write_atomic}; + +static LOADED: Once = Once::new(); + +#[derive(Serialize, Deserialize)] +struct Saved { + catalog: String, + signature: String, +} + +pub fn load_once(http: Option<&Http>, paths: &Paths) { + LOADED.call_once(|| { + let cache = paths.feed_cache().with_file_name("launcher-catalog.json"); + let remote = http.ok_or_else(|| "HTTPS unavailable".to_string()).and_then(|h| { + let catalog = h.get_catalog_bytes(CATALOG_URL, MAX_CATALOG_BYTES)?.ok_or("hosted catalog is not published")?; + let signature = h.get_catalog_bytes(SIGNATURE_URL, MAX_SIGNATURE_BYTES)?.ok_or("catalog signature is not published")?; + let verified = VerifiedCatalog::verify(&catalog, &signature)?; + let saved = Saved { + catalog: String::from_utf8(catalog).map_err(|_| "catalog is not UTF-8")?, + signature: String::from_utf8(signature).map_err(|_| "signature is not UTF-8")?, + }; + Ok((verified, saved)) + }); + let catalog = match remote { + Ok((verified, saved)) => { + if let Ok(bytes) = serde_json::to_vec(&saved) + && let Err(why) = write_atomic(&cache, &bytes) + { + log::warn!("could not cache signed catalog: {why}"); + } + Some(verified) + } + Err(why) => { + log::warn!("hosted catalog unavailable: {why}; trying verified cache, then bundled catalog"); + saved_catalog(&cache) + } + }; + if let Some(catalog) = catalog { + if catalog.rejected_entries > 0 { + log::warn!("ignored {} invalid catalog entries", catalog.rejected_entries); + } + let mut icons = HashMap::new(); + let mut network_available = true; + for (id, url, digest) in catalog.icons() { + if artcraft_launcher_core::catalog::app_icon_png(id).is_some_and(|b| valid_icon(b, digest)) { + continue; + } + let saved = cache.with_file_name(format!("catalog-icon-{digest}.png")); + let icon = read_capped(&saved, MAX_ICON_BYTES).filter(|b| valid_icon(b, digest)).or_else(|| { + if !network_available { + return None; + } + let bytes = match http?.get_catalog_bytes(url, MAX_ICON_BYTES) { + Ok(bytes) => bytes?, + Err(_) => { + network_available = false; + return None; + } + }; + if !valid_icon(&bytes, digest) { + return None; + } + if let Err(why) = write_atomic(&saved, &bytes) { + log::warn!("could not cache catalog icon: {why}"); + } + Some(bytes) + }); + if let Some(icon) = icon { + icons.insert(id.to_string(), icon); + } + } + catalog.activate(icons); + } + }); +} + +fn saved_catalog(path: &Path) -> Option { + // JSON escaping can expand a signed TOML byte to six bytes. + let bytes = read_capped(path, MAX_CATALOG_BYTES * 6 + MAX_SIGNATURE_BYTES + 128)?; + let saved: Saved = serde_json::from_slice(&bytes).ok()?; + VerifiedCatalog::verify(saved.catalog.as_bytes(), saved.signature.as_bytes()).ok() +} + +fn read_capped(path: &Path, max: usize) -> Option> { + let file = std::fs::File::open(path).ok()?; + if file.metadata().ok()?.len() > max as u64 { + return None; + } + let mut bytes = Vec::new(); + file.take(max as u64 + 1).read_to_end(&mut bytes).ok()?; + (bytes.len() <= max).then_some(bytes) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + #[ignore = "requires the live signed catalog at getartcraft.com"] + fn live_catalog_is_verified_cached_and_activated() { + let dir = tempfile::tempdir().unwrap(); + let paths = Paths::under(dir.path()); + let http = Http::new().unwrap(); + load_once(Some(&http), &paths); + let cache = paths.feed_cache().with_file_name("launcher-catalog.json"); + let verified = saved_catalog(&cache).expect("live catalog must be cached and verify with the pinned key"); + assert_eq!(verified.rejected_entries, 0); + let icons: Vec<_> = verified.icons().collect(); + assert!(!icons.is_empty()); + for (id, _, digest) in icons { + assert!(artcraft_launcher_core::hosted_catalog::apps().iter().any(|app| app.id == id)); + let icon = artcraft_launcher_core::catalog::app_icon_png(id).unwrap(); + assert!(valid_icon(icon, digest), "invalid live icon for {id}"); + } + } + + #[test] + fn cached_catalog_is_reverified_and_tampered_cache_is_ignored() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("catalog.json"); + let mut saved = Saved { + catalog: include_str!("../../core/tests/fixtures/hosted-catalog.toml").into(), + signature: include_str!("../../core/tests/fixtures/hosted-catalog.toml.sig").into(), + }; + write_atomic(&path, &serde_json::to_vec(&saved).unwrap()).unwrap(); + assert!(saved_catalog(&path).is_some()); + saved.catalog.push('\n'); + write_atomic(&path, &serde_json::to_vec(&saved).unwrap()).unwrap(); + assert!(saved_catalog(&path).is_none()); + write_atomic(&path, b"not JSON").unwrap(); + assert!(saved_catalog(&path).is_none()); + } + + #[test] + fn capped_cache_reads_reject_announced_or_actual_oversize() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("cache"); + std::fs::write(&path, b"abcd").unwrap(); + assert_eq!(read_capped(&path, 4).unwrap(), b"abcd"); + assert!(read_capped(&path, 3).is_none()); + } +} diff --git a/crates/native/src/http.rs b/crates/native/src/http.rs index d27b9964..a763d15e 100644 --- a/crates/native/src/http.rs +++ b/crates/native/src/http.rs @@ -197,6 +197,18 @@ impl Http { /// on the body when the length wasn't announced or was wrong. pub fn get_bytes(&self, url: &str, max: usize) -> Result>, String> { let agent = if is_loopback(url) { &self.direct } else { &self.small }; + Self::get_bytes_with(agent, url, max) + } + + /// Catalog resources remain on the pinned HTTPS website; redirect responses are refused. + pub fn get_catalog_bytes(&self, url: &str, max: usize) -> Result>, String> { + if !url.starts_with("https://getartcraft.com/") { + return Err("catalog resources must use the pinned HTTPS website".into()); + } + Self::get_bytes_with(&self.no_redirect, url, max) + } + + fn get_bytes_with(agent: &ureq::Agent, url: &str, max: usize) -> Result>, String> { let mut resp = agent.get(url).call().map_err(|e| format!("{UNREACHABLE} {} ({e})", host(url)))?; match resp.status().as_u16() { 200 => { diff --git a/crates/native/src/lib.rs b/crates/native/src/lib.rs index 0bf0b570..135affd1 100644 --- a/crates/native/src/lib.rs +++ b/crates/native/src/lib.rs @@ -11,6 +11,7 @@ pub mod backend; pub mod desktop_entry; pub mod detect; pub mod feed_throttle; +pub mod hosted_catalog; pub mod http; pub mod install; pub mod login; diff --git a/crates/native/src/self_update.rs b/crates/native/src/self_update.rs index 255520fb..cccf0f20 100644 --- a/crates/native/src/self_update.rs +++ b/crates/native/src/self_update.rs @@ -43,6 +43,8 @@ fn to_update_release(release: &Release) -> craft_update::Release { .iter() .map(|a| craft_update::Asset { name: a.name.clone(), size: a.size, url: a.url.clone(), sha256: a.sha256.clone() }) .collect(), + // Empty: the launcher's own repository (`suite::LAUNCHER`), the only one its releases are read from. + repo: String::new(), } } diff --git a/crates/ui-egui/src/app.rs b/crates/ui-egui/src/app.rs index 5a99b68e..0f416ae0 100644 --- a/crates/ui-egui/src/app.rs +++ b/crates/ui-egui/src/app.rs @@ -7,7 +7,7 @@ use artcraft_launcher_core::protocol::{ }; use artcraft_launcher_core::release::Release; use artcraft_launcher_core::status::AppStatus; -use artcraft_launcher_core::{Arch, PackageKind, Platform, SUITE}; +use artcraft_launcher_core::{Arch, PackageKind, Platform}; use crate::i18n::set_current; use crate::model::AppEntry; @@ -111,6 +111,7 @@ pub(crate) enum UiAction { pub(crate) enum Dialog { Notes(String), ConfirmUninstall(String), + UnlockVersion { app: String, tag: String }, Install { app: String, folder: String }, Replace { app: String, path: String }, Settings, @@ -126,6 +127,7 @@ impl Dialog { match self { Dialog::Notes(id) => ("notes", id), Dialog::ConfirmUninstall(id) => ("uninstall", id), + Dialog::UnlockVersion { app, .. } => ("unlock-version", app), Dialog::Install { app, .. } => ("install", app), Dialog::Replace { app, .. } => ("replace", app), Dialog::Settings => ("settings", ""), @@ -260,7 +262,11 @@ impl LauncherUi { Self { backend, settings, - entries: SUITE.iter().filter(|a| platform.is_none_or(|p| a.runs_on(p.os))).map(AppEntry::new).collect(), + entries: artcraft_launcher_core::hosted_catalog::apps() + .iter() + .filter(|a| platform.is_none_or(|p| a.runs_on(p.os))) + .map(AppEntry::new) + .collect(), caps, platform, checking: false, @@ -554,6 +560,18 @@ impl LauncherUi { /// Returns whether app state changed. fn handle(&mut self, event: Event) -> bool { match event { + Event::CatalogUpdated => { + for app in artcraft_launcher_core::hosted_catalog::apps().iter().filter(|a| self.platform.is_none_or(|p| a.runs_on(p.os))) { + if let Some(entry) = self.entries.iter_mut().find(|e| e.app.id == app.id) { + entry.app = app; + } else { + self.entries.push(AppEntry::new(app)); + } + } + self.entries.sort_by_key(|entry| artcraft_launcher_core::hosted_catalog::apps().iter().position(|app| app.id == entry.app.id)); + self.backend.send(Command::Detect); + true + } Event::Latest { app, latest, from } => { self.on_latest(app, latest, from); true @@ -1165,6 +1183,22 @@ mod tests { sent.borrow().iter().filter(|command| matches!(command, Command::Install { .. })).count() } + #[test] + fn catalog_event_adds_entries_in_suite_order_and_keeps_current_state() { + let (mut ui, sent, _) = launcher(); + let id = ui.entries[0].app.id; + ui.entries[0].detected = true; + ui.entries.pop(); + ui.entries.reverse(); + assert!(ui.handle(Event::CatalogUpdated)); + assert_eq!( + ui.entries.iter().map(|e| e.app.id).collect::>(), + artcraft_launcher_core::hosted_catalog::apps().iter().map(|a| a.id).collect::>() + ); + assert!(ui.entry(id).unwrap().detected); + assert_eq!(sent.borrow().as_slice(), &[Command::Detect]); + } + /// A CJK preference is drawable only while that language's own face is installed: having the /// system font cached, or another script's face installed, is not enough. #[test] diff --git a/crates/ui-egui/src/details.rs b/crates/ui-egui/src/details.rs index b53c5e4f..df3574a3 100644 --- a/crates/ui-egui/src/details.rs +++ b/crates/ui-egui/src/details.rs @@ -247,7 +247,7 @@ impl LauncherUi { fn neighbour_apps(&self, id: &str) -> (Option, Option) { let mut ids: Vec<&str> = self.visible_ids().into_iter().filter(|i| AppDetails::by_id(i).is_some()).collect(); if !ids.contains(&id) { - ids = artcraft_launcher_core::SUITE + ids = artcraft_launcher_core::hosted_catalog::apps() .iter() .filter(|a| self.platform.is_none_or(|p| a.runs_on(p.os))) .map(|a| a.id) @@ -374,7 +374,10 @@ impl LauncherUi { // "Version 0.5.0 · Oct 8, 2026", or the installed-versus-latest line. let version = crate::views::version_line(entry, status); if !version.trim().is_empty() { - ui.label(RichText::new(version).size(12.5).color(t.muted)); + ui.horizontal(|ui| { + ui.label(RichText::new(version).size(12.5).color(t.muted)); + self.version_lock(ui, app.id); + }); } }); if wide { diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index ba404275..5fd5c18b 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -33,6 +33,7 @@ impl LauncherUi { let response = match &mut dialog { Dialog::Notes(id) => modal.show(ctx, |ui| close = self.notes_dialog(ui, id)), Dialog::ConfirmUninstall(id) => modal.show(ctx, |ui| close = self.uninstall_dialog(ui, id)), + Dialog::UnlockVersion { app, tag } => modal.show(ctx, |ui| close = self.unlock_version_dialog(ui, app, tag)), Dialog::Install { app, folder } => modal.show(ctx, |ui| close = self.install_dialog(ui, app, folder, host)), Dialog::Replace { app, path } => modal.show(ctx, |ui| close = self.replace_dialog(ui, app, path)), Dialog::Settings => modal.show(ctx, |ui| close = self.settings_dialog(ui, host)), @@ -45,7 +46,11 @@ impl LauncherUi { return; } if close || response.should_close() { - self.dialog = None; + self.dialog = if matches!(&dialog, Dialog::UnlockVersion { app, .. } if app == artcraft_launcher_core::catalog::LAUNCHER_ID) { + Some(Dialog::Settings) + } else { + None + }; if matches!(dialog, Dialog::Versions(_)) { // Close, Escape or a click outside: a version chosen there is dropped. self.revert_version_choice(); diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index baca1113..71ddf9e3 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -413,3 +413,7 @@ anicraft Familiar by design Navrženo tak, jak jste zvyklí anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Scéna, nástroje, časová osa, vrstvy, klíčové snímky, Vlastnosti i Knihovna jsou tam, kde je animátoři čekají, včetně cibulového pauzáku. anicraft Tweens that ease Plynulé mezilehlé pohyby (tweens) anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Klasické mezilehlé pohyby s osmi předvolbami zpomalení a vlastními křivkami, plus tvarové mezilehlé pohyby pro morphing. + Version pinned to {version}. Click to unlock. Verze je uzamčena na {version}. Kliknutím ji odemknete. + Unlock version? Odemknout verzi? + {app} is pinned to {version}. Follow the latest release instead? Aplikace {app} je uzamčena na verzi {version}. Přejít na nejnovější vydání? + Unlock Odemknout diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 2345d34f..9d3aa745 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -445,3 +445,7 @@ anicraft Familiar by design Gewohnt aufgebaut anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Bühne, Werkzeuge, Zeitleiste, Ebenen, Keyframes, Eigenschaften und Bibliothek genau dort, wo Animatoren sie erwarten, inklusive Zwiebelhaut. anicraft Tweens that ease Fließende Tweens anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Klassische Tweens mit acht Easing-Voreinstellungen und Kurven sowie Form-Tweens für Vektor-Morphing. + Version pinned to {version}. Click to unlock. Version auf {version} festgelegt. Zum Entsperren klicken. + Unlock version? Versionssperre aufheben? + {app} is pinned to {version}. Follow the latest release instead? {app} ist auf {version} festgelegt. Stattdessen der neuesten Version folgen? + Unlock Entsperren diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 678e2966..77274f00 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -426,3 +426,7 @@ anicraft Familiar by design Diseño familiar anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Escenario, herramientas, línea de tiempo, capas, fotogramas clave, Propiedades y Biblioteca donde los animadores esperan, con papel cebolla. anicraft Tweens that ease Interpolaciones suaves anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Interpolaciones clásicas con ocho preajustes de aceleración y curvas personalizadas, además de interpolación de forma. + Version pinned to {version}. Click to unlock. Versión fijada en {version}. Haz clic para desbloquear. + Unlock version? ¿Desbloquear la versión? + {app} is pinned to {version}. Follow the latest release instead? {app} está fijado en la versión {version}. ¿Usar la versión más reciente? + Unlock Desbloquear diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index af17a320..faaf0307 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -443,3 +443,7 @@ anicraft Familiar by design Conception familière anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Scène, outils, chronologie, calques, images clés, Propriétés et Bibliothèque là où les animateurs les attendent, avec pelure d'oignon. anicraft Tweens that ease Interpolations fluides anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Interpolations classiques avec huit préréglages d'accélération et courbes personnalisées, plus interpolations de forme. + Version pinned to {version}. Click to unlock. Version fixée à {version}. Cliquez pour la déverrouiller. + Unlock version? Déverrouiller la version ? + {app} is pinned to {version}. Follow the latest release instead? {app} est fixé à la version {version}. Suivre plutôt la dernière version ? + Unlock Déverrouiller diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 15619ac8..2295b80c 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -446,3 +446,7 @@ anicraft Familiar by design Ismerős kialakítás anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Színpad, eszközök, idővonal, rétegek, kulcsképkockák, Tulajdonságok és Könyvtár a megszokott helyen, hagymabőr funkcióval. anicraft Tweens that ease Finom mozgásinterpolációk anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Klasszikus mozgásinterpolációk nyolc görbe-előbeállítással és egyéni görbékkel, valamint alakos interpolációk. + Version pinned to {version}. Click to unlock. A verzió rögzítve: {version}. Kattintson a feloldáshoz. + Unlock version? Feloldja a verzió zárolását? + {app} is pinned to {version}. Follow the latest release instead? A(z) {app} a(z) {version} verzióra van rögzítve. Inkább a legújabb kiadást kövesse? + Unlock Feloldás diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 9ccad433..345de2a2 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -448,3 +448,7 @@ anicraft Familiar by design 直感的なデザイン anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. ステージ、ツール、タイムライン、レイヤー、キーフレーム、プロパティ、ライブラリが期待通りの場所に配置され、オニオンスキンも備えています。 anicraft Tweens that ease 滑らかなトゥイーン anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. 8つのイージングプリセットとカスタム曲線を持つクラシックトゥイーン、そしてシェイプトゥイーンに対応。 + Version pinned to {version}. Click to unlock. バージョンは {version} に固定されています。クリックすると固定を解除します。 + Unlock version? バージョンの固定を解除しますか? + {app} is pinned to {version}. Follow the latest release instead? {app} は {version} に固定されています。代わりに最新リリースを使用しますか? + Unlock 固定を解除 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 0e3ed8b3..2715c58d 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -444,3 +444,7 @@ anicraft Familiar by design ნაცნობი დიზაინი anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. სცენა, ხელსაწყოები, დროის ხაზი, ფენები, საკვანძო კადრები, თვისებები და ბიბლიოთეკა იქ, სადაც ანიმატორები ელიან. anicraft Tweens that ease გლუვი ანიმაცია anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. კლასიკური ანიმაციური გადასვლები რვა წინასწარ დაყენებული პარამეტრით და ფორმის გარდაქმნით. + Version pinned to {version}. Click to unlock. ვერსია ფიქსირებულია {version}-ზე. განსაბლოკად დააწკაპუნეთ. + Unlock version? განიბლოკოს ვერსია? + {app} is pinned to {version}. Follow the latest release instead? {app} ფიქსირებულია {version} ვერსიაზე. სანაცვლოდ გამოიყენოთ უახლესი გამოშვება? + Unlock განბლოკვა diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 896a2988..8f348e20 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -447,3 +447,7 @@ anicraft Familiar by design Znany i intuicyjny interfejs anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Scena, narzędzia, oś czasu, warstwy, klatki kluczowe, Właściwości i Biblioteka znajdują się tam, gdzie oczekują animatorzy, wraz z łuskami cebuli. anicraft Tweens that ease Płynne klatki pośrednie (tweens) anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Klasyczne animacje klatek pośrednich z ośmioma profilami dynamiki i własnymi krzywymi oraz przejścia kształtu. + Version pinned to {version}. Click to unlock. Wersja jest zablokowana na {version}. Kliknij, aby odblokować. + Unlock version? Odblokować wersję? + {app} is pinned to {version}. Follow the latest release instead? Aplikacja {app} jest przypięta do wersji {version}. Zamiast tego śledzić najnowsze wydanie? + Unlock Odblokuj diff --git a/crates/ui-egui/src/i18n/pt-BR.tsv b/crates/ui-egui/src/i18n/pt-BR.tsv index c54bc683..5b9a8dcf 100644 --- a/crates/ui-egui/src/i18n/pt-BR.tsv +++ b/crates/ui-egui/src/i18n/pt-BR.tsv @@ -433,3 +433,7 @@ anicraft Familiar by design Design familiar anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Palco, ferramentas, linha do tempo, camadas, quadros-chave, Propriedades e Biblioteca onde os animadores esperam, com papel vegetal. anicraft Tweens that ease Interpolações suaves anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Interpolações clássicas com oito predefinições de suavização e curvas personalizadas, além de interpolação de forma. + Version pinned to {version}. Click to unlock. Versão fixada em {version}. Clique para desbloquear. + Unlock version? Desbloquear versão? + {app} is pinned to {version}. Follow the latest release instead? {app} está fixado na versão {version}. Usar a versão mais recente? + Unlock Desbloquear diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 3f080b02..4e5b5e99 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -441,3 +441,7 @@ anicraft Familiar by design Привычный интерфейс anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. Сцена, инструменты, шкала времени, слои, ключевые кадры, Свойства и Библиотека там, где их ждут аниматоры, со шлейфом калькирования. anicraft Tweens that ease Плавные твины anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. Классические твины с восемью пресетами замедления и кривыми, а также твины формы. + Version pinned to {version}. Click to unlock. Версия закреплена на {version}. Нажмите, чтобы разблокировать. + Unlock version? Разблокировать версию? + {app} is pinned to {version}. Follow the latest release instead? Для {app} закреплена версия {version}. Перейти на последнюю версию? + Unlock Разблокировать diff --git a/crates/ui-egui/src/i18n/zh-CN.tsv b/crates/ui-egui/src/i18n/zh-CN.tsv index a9cb2ec5..a5910353 100644 --- a/crates/ui-egui/src/i18n/zh-CN.tsv +++ b/crates/ui-egui/src/i18n/zh-CN.tsv @@ -413,3 +413,7 @@ anicraft Familiar by design 布局熟悉自然 anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. 舞台、工具、时间线、图层、关键帧、“属性”和“库”均位于动画师熟悉的直观位置,并配有洋葱皮功能。 anicraft Tweens that ease 流畅补间缓动 anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. 经典补间具备八种缓动预设与自定义曲线,外加将一种矢量轮廓变换为另一种的形状补间。 + Version pinned to {version}. Click to unlock. 版本已固定为 {version}。点击解锁。 + Unlock version? 解锁版本? + {app} is pinned to {version}. Follow the latest release instead? {app} 已固定为 {version}。是否改为跟随最新版本? + Unlock 解锁 diff --git a/crates/ui-egui/src/i18n/zh-TW.tsv b/crates/ui-egui/src/i18n/zh-TW.tsv index a0ed1c8f..80a636dc 100644 --- a/crates/ui-egui/src/i18n/zh-TW.tsv +++ b/crates/ui-egui/src/i18n/zh-TW.tsv @@ -404,3 +404,7 @@ anicraft Familiar by design 設計直觀熟悉 anicraft Stage, tools, timeline, layers, keyframes, Properties and Library sit where animators expect them, with onion skinning for in-betweening. 舞台、工具、時間軸、圖層、關鍵影格、「屬性」與「元件庫」皆位於動畫師熟悉的位置,並具備洋蔥皮功能。 anicraft Tweens that ease 平滑補間緩動 anicraft Classic tweens with eight easing presets and custom ease curves, plus shape tweens that morph one vector contour into another. 傳統補間具備八種緩動預設與自訂曲線,並支援變換向量外框的形狀補間。 + Version pinned to {version}. Click to unlock. 版本已鎖定為 {version}。按一下即可解除鎖定。 + Unlock version? 解除版本鎖定? + {app} is pinned to {version}. Follow the latest release instead? {app} 已鎖定為 {version}。是否改為使用最新版本? + Unlock 解除鎖定 diff --git a/crates/ui-egui/src/icons.rs b/crates/ui-egui/src/icons.rs index 79ada9cc..65fde7a3 100644 --- a/crates/ui-egui/src/icons.rs +++ b/crates/ui-egui/src/icons.rs @@ -5,7 +5,12 @@ use egui::ImageSource; /// The 128 px icon of a Craft App ([`catalog::app_icon_png`](artcraft_launcher_core::catalog::app_icon_png)). pub fn app(id: &str) -> Option> { let png = artcraft_launcher_core::catalog::app_icon_png(id)?; - Some(ImageSource::Bytes { uri: format!("bytes://app-icons/{id}.png").into(), bytes: png.into() }) + let revision = icon_revision(id); + Some(ImageSource::Bytes { uri: format!("bytes://app-icons/{id}/{revision}.png").into(), bytes: png.into() }) +} + +fn icon_revision(id: &str) -> &'static str { + artcraft_launcher_core::hosted_catalog::metadata(id).map_or("bundled", |m| m.icon_sha256.as_str()) } /// A Craft App's icon: in colour, or in greys for an app that is not installed. The grey copy is @@ -20,7 +25,7 @@ pub fn app_image(ctx: &egui::Context, id: &str, in_colour: bool) -> Option(key)) { return Some(egui::Image::new(&texture)); } diff --git a/crates/ui-egui/src/settings_dialog.rs b/crates/ui-egui/src/settings_dialog.rs index a50c33a8..4ac740eb 100644 --- a/crates/ui-egui/src/settings_dialog.rs +++ b/crates/ui-egui/src/settings_dialog.rs @@ -199,6 +199,7 @@ impl LauncherUi { ui.checkbox(&mut self.settings.prereleases, tl!("Include pre-releases (betas and release candidates)")); row(ui, tl!("Launcher version"), 200.0, &mut |ui, label| { self.version_combo(ui, launcher_id, &artcraft_launcher_core::catalog::LAUNCHER, 200.0, label); + self.version_lock(ui, launcher_id); }); self.launcher_version_notes(ui); }); diff --git a/crates/ui-egui/src/versions.rs b/crates/ui-egui/src/versions.rs index 8b6cd273..099d210d 100644 --- a/crates/ui-egui/src/versions.rs +++ b/crates/ui-egui/src/versions.rs @@ -11,6 +11,69 @@ use crate::theme::Tokens; use crate::widgets::{self, Kind}; impl LauncherUi { + /// The exact selected version, as distinct from following stable or nightly releases. + pub(crate) fn pinned_version(&self, id: &str) -> Option<&str> { + let track = if id == LAUNCHER_ID { Some(&self.settings.launcher_version) } else { self.settings.versions.get(id) }; + match track { + Some(VersionTrack::Pinned(tag)) => Some(tag), + _ => None, + } + } + + /// A lock beside a version opens a confirmation; clicking it never changes the saved choice. + pub(crate) fn version_lock(&mut self, ui: &mut Ui, id: &str) { + let Some(tag) = self.pinned_version(id).map(str::to_string) else { return }; + let tip = crate::fmt(tl!("Version pinned to {version}. Click to unlock."), &[("version", &tag)]); + if widgets::inline_glyph_button(ui, widgets::Glyph::Lock, &tip).clicked() { + self.dialog = Some(crate::app::Dialog::UnlockVersion { app: id.to_string(), tag }); + } + } + + /// Unlock only the choice the prompt showed: a newer choice made while it was open survives. + fn unlock_version(&mut self, id: &str, tag: &str) { + if self.pinned_version(id) != Some(tag) { + return; + } + if id == LAUNCHER_ID { + self.settings.launcher_version = VersionTrack::Stable; + } else { + self.settings.versions.remove(id); + } + self.configure(); + self.check_now_from_ui(); + } + + /// Confirms returning to the latest stable release without directly installing anything. + pub(crate) fn unlock_version_dialog(&mut self, ui: &mut Ui, id: &str, tag: &str) -> bool { + let app = if id == LAUNCHER_ID { + &LAUNCHER + } else if let Some(app) = CraftApp::by_id(id) { + app + } else { + return true; + }; + ui.set_width(440.0f32.min((ui.ctx().content_rect().width() - 80.0).max(240.0))); + ui.heading(tl!("Unlock version?")); + ui.add_space(8.0); + ui.add( + egui::Label::new(crate::fmt( + tl!("{app} is pinned to {version}. Follow the latest release instead?"), + &[("app", app.name), ("version", tag)], + )) + .wrap(), + ); + ui.add_space(16.0); + let (mut cancel, mut unlock) = (false, false); + ui.horizontal(|ui| { + cancel = widgets::button(ui, tl!("Cancel"), Kind::Secondary, 100.0).clicked(); + unlock = widgets::button(ui, tl!("Unlock"), Kind::Primary, 100.0).clicked(); + }); + if unlock { + self.unlock_version(id, tag); + } + cancel || unlock + } + /// The per-app selector stays in its dialog. The launcher's selector is drawn in Settings. pub(crate) fn version_dialog(&mut self, ui: &mut Ui, id: &str) -> bool { let Some(app) = CraftApp::by_id(id) else { return true }; diff --git a/crates/ui-egui/src/views.rs b/crates/ui-egui/src/views.rs index e7c7c80c..91cd72bc 100644 --- a/crates/ui-egui/src/views.rs +++ b/crates/ui-egui/src/views.rs @@ -597,7 +597,8 @@ impl LauncherUi { ); if !version.is_empty() { let github_w = widgets::hud_galley(&strip_ui, &format!("{} ↗", tl!("GitHub")), t.muted).size().x; - let room = (strip_ui.available_width() - github_w - 16.0).max(0.0); + let lock_w = if self.pinned_version(id).is_some() { 20.0 + strip_ui.spacing().item_spacing.x } else { 0.0 }; + let room = (strip_ui.available_width() - github_w - 16.0 - lock_w).max(0.0); let highlight = if in_colour { t.app_ink(app) } else { t.muted }; let spans: Vec<(&str, egui::Color32)> = version.iter().map(|(text, lit)| (text.as_str(), if *lit { highlight } else { t.muted })).collect(); @@ -606,6 +607,7 @@ impl LauncherUi { r.on_hover_text(tip); } } + self.version_lock(&mut strip_ui, id); strip_ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| { ui.spacing_mut().item_spacing.x = 16.0; widgets::hud_link(ui, tl!("GitHub"), &app.repo_url()); @@ -915,7 +917,7 @@ impl LauncherUi { /// The version column: what is installed, with an arrow to the new one (only that in the app's /// colour) when an update waits, or a quiet note of the newer release for a version kept on /// purpose; the latest, for an app not installed yet. - fn table_version_cell(&self, ui: &mut Ui, entry: &AppEntry, status: &AppStatus, t: &Tokens) { + fn table_version_cell(&mut self, ui: &mut Ui, entry: &AppEntry, status: &AppStatus, t: &Tokens) { let mono = |text: String, color| RichText::new(text).family(egui::FontFamily::Monospace).color(color); let (first, second) = match (*status == AppStatus::UpdateAvailable).then(|| entry.installed_label().zip(entry.latest_label())).flatten() { Some((from, to)) => (mono(format!("{from} → "), t.ink), Some(mono(to, t.app_ink(entry.app)))), @@ -935,7 +937,16 @@ impl LauncherUi { for part in std::iter::once(first).chain(second) { part.append_to(&mut job, &style, egui::FontSelection::Default, egui::Align::Center); } - let r = ui.label(job); + if self.pinned_version(entry.app.id).is_some() { + job.wrap = egui::text::TextWrapping::truncate_at_width((ui.available_width() - 20.0 - ui.spacing().item_spacing.x).max(0.0)); + } + let r = ui + .horizontal(|ui| { + let response = ui.label(job); + self.version_lock(ui, entry.app.id); + response + }) + .inner; if let Some(tip) = out_of_reach_tip(self.out_of_reach(entry)) { r.on_hover_text(tip); } diff --git a/crates/ui-egui/src/widgets.rs b/crates/ui-egui/src/widgets.rs index d7b1184c..c2c7a3ff 100644 --- a/crates/ui-egui/src/widgets.rs +++ b/crates/ui-egui/src/widgets.rs @@ -658,6 +658,8 @@ pub enum Glyph { Close, Settings, Refresh, + /// An exact version is locked until the user confirms unlocking it. + Lock, /// Six-dot grip for reordering pinned apps. Grip, } @@ -716,6 +718,22 @@ fn glyph_shapes(rect: Rect, glyph: Glyph, color: Color32) -> Vec { egui::Shape::convex_polygon(vec![tip + vec2(-2.4, -0.6), tip + vec2(1.6, -3.0), tip + vec2(1.2, 1.8)], color, Stroke::NONE), ] } + Glyph::Lock => { + let stroke = Stroke::new(1.4, color); + vec![ + egui::Shape::line( + vec![m + vec2(-3.0, -1.0), m + vec2(-3.0, -5.0), m + vec2(0.0, -6.0), m + vec2(3.0, -5.0), m + vec2(3.0, -1.0)], + stroke, + ), + egui::Shape::rect_stroke( + Rect::from_min_max(m + vec2(-5.0, -1.0), m + vec2(5.0, 6.0)), + CornerRadius::ZERO, + stroke, + egui::StrokeKind::Inside, + ), + egui::Shape::line_segment([m + vec2(0.0, 1.0), m + vec2(0.0, 3.5)], stroke), + ] + } Glyph::Grip => { let mut shapes = Vec::with_capacity(6); for (dx, dy) in [(-3.0, -3.5), (3.0, -3.5), (-3.0, 0.0), (3.0, 0.0), (-3.0, 3.5), (3.0, 3.5)] { @@ -761,6 +779,18 @@ pub fn glyph_button(ui: &mut Ui, glyph: Glyph, tip: &str) -> Response { resp.on_hover_text(tip).on_hover_cursor(egui::CursorIcon::PointingHand) } +/// A small glyph beside inline text, with the same accessible name and hover help as a tool button. +pub fn inline_glyph_button(ui: &mut Ui, glyph: Glyph, tip: &str) -> Response { + let t = Tokens::get(ui.ctx()); + let (rect, resp) = ui.allocate_exact_size(vec2(20.0, 20.0), Sense::click()); + if resp.hovered() || resp.has_focus() { + ui.painter().rect_filled(rect, CornerRadius::ZERO, t.sunken); + } + paint_glyph(ui.painter(), rect, glyph, t.muted); + resp.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, true, tip)); + resp.on_hover_text(tip).on_hover_cursor(egui::CursorIcon::PointingHand) +} + /// The "…" button that opens an app's menu: an outlined square like [`glyph_button`]. The visible /// dots are not a name a screen reader can use, so the button is named after the app. pub fn more_menu(ui: &mut Ui, app_name: &str, add_contents: impl FnOnce(&mut Ui) -> R) { @@ -867,8 +897,8 @@ mod tests { /// the tool-button and header-cell sizes, or a click target would draw outside its hit rect. #[test] fn every_painter_glyph_stays_inside_its_control() { - for glyph in [Glyph::Pause, Glyph::Close, Glyph::Settings, Glyph::Refresh, Glyph::Grip] { - for side in [crate::theme::CONTROL_H, 48.0] { + for glyph in [Glyph::Pause, Glyph::Close, Glyph::Settings, Glyph::Refresh, Glyph::Grip, Glyph::Lock] { + for side in [20.0, crate::theme::CONTROL_H, 48.0] { let rect = Rect::from_min_size(egui::pos2(100.0, 200.0), egui::vec2(side, side)); let shapes = glyph_shapes(rect, glyph, Color32::WHITE); assert!(!shapes.is_empty(), "{glyph:?} draws nothing at {side} px"); @@ -974,7 +1004,7 @@ mod tests { #[test] fn each_glyph_has_its_own_shapes() { let rect = Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(crate::theme::CONTROL_H, crate::theme::CONTROL_H)); - let bounds: Vec<[u32; 4]> = [Glyph::Pause, Glyph::Close, Glyph::Settings, Glyph::Refresh, Glyph::Grip] + let bounds: Vec<[u32; 4]> = [Glyph::Pause, Glyph::Close, Glyph::Settings, Glyph::Refresh, Glyph::Grip, Glyph::Lock] .into_iter() .map(|glyph| { let union = glyph_shapes(rect, glyph, Color32::WHITE) diff --git a/crates/ui-egui/tests/ui.rs b/crates/ui-egui/tests/ui.rs index ab35d549..7ee44022 100644 --- a/crates/ui-egui/tests/ui.rs +++ b/crates/ui-egui/tests/ui.rs @@ -4319,3 +4319,95 @@ fn an_apps_page_is_a_card_in_the_middle_with_next_and_previous_arrows_and_closes h.run_steps(30); assert!(!showing(&h, "photocraft"), "a click outside did not close it"); } + +/// A version pin is distinct from a favorite: the lock names the exact tag and requires confirmation. +#[test] +fn version_padlock_confirms_before_unlocking_in_grid_and_table() { + use artcraft_launcher_core::protocol::VersionTrack; + let tip = "Version pinned to v0.4.1. Click to unlock."; + for view in [ViewMode::Grid, ViewMode::Table] { + let (mut h, sent) = harness(view, egui::Theme::Dark, true); + h.run_steps(4); + h.state_mut().as_mut().unwrap().settings.versions.insert("photocraft".into(), VersionTrack::Pinned("v0.4.1".into())); + h.run_steps(4); + sent.borrow_mut().clear(); + h.get_by_label(tip).hover(); + h.run_steps(30); + snapshot(&mut h, if view == ViewMode::Grid { "version-lock-grid" } else { "version-lock-table" }); + h.query_all_by_role_and_label(egui::accesskit::Role::Button, tip).next().unwrap().click(); + h.run_steps(4); + h.get_by_label("Unlock version?"); + h.get_by_label("PhotoCraft is pinned to v0.4.1. Follow the latest release instead?"); + assert_eq!(h.state().as_ref().unwrap().settings.versions.get("photocraft"), Some(&VersionTrack::Pinned("v0.4.1".into()))); + assert!(!sent.borrow().iter().any(|c| matches!(c, Command::CheckForUpdates { force: true }))); + snapshot(&mut h, if view == ViewMode::Grid { "version-unlock-dialog" } else { "version-unlock-table-dialog" }); + h.get_by_label("Cancel").click(); + h.run_steps(4); + assert_eq!(h.state().as_ref().unwrap().settings.versions.get("photocraft"), Some(&VersionTrack::Pinned("v0.4.1".into()))); + h.get_by_label(tip).click(); + h.run_steps(4); + h.key_press(egui::Key::Escape); + h.run_steps(4); + assert_eq!(h.state().as_ref().unwrap().settings.versions.get("photocraft"), Some(&VersionTrack::Pinned("v0.4.1".into()))); + h.get_by_label(tip).click(); + h.run_steps(4); + h.get_by_label("Unlock").click(); + h.run_steps(4); + assert!(!h.state().as_ref().unwrap().settings.versions.contains_key("photocraft")); + assert!(h.query_by_label(tip).is_none()); + assert!(sent.borrow().iter().any(|c| matches!(c, Command::Configure(options) if !options.versions.contains_key("photocraft")))); + assert!(sent.borrow().iter().any(|c| matches!(c, Command::CheckForUpdates { force: true }))); + assert!(!sent.borrow().iter().any(|c| matches!(c, Command::Install { .. }))); + } +} + +#[test] +fn a_version_padlock_does_not_unlock_a_choice_changed_after_confirmation_opened() { + use artcraft_launcher_core::protocol::VersionTrack; + let (mut h, _) = harness(ViewMode::Grid, egui::Theme::Dark, true); + h.run_steps(4); + h.state_mut().as_mut().unwrap().settings.versions.insert("photocraft".into(), VersionTrack::Pinned("v0.4.1".into())); + h.run_steps(4); + h.get_by_label("Version pinned to v0.4.1. Click to unlock.").click(); + h.run_steps(4); + h.state_mut().as_mut().unwrap().settings.versions.insert("photocraft".into(), VersionTrack::Pinned("v0.3.0".into())); + h.run_steps(4); + h.get_by_label("Unlock").click(); + h.run_steps(4); + assert_eq!(h.state().as_ref().unwrap().settings.versions.get("photocraft"), Some(&VersionTrack::Pinned("v0.3.0".into()))); +} + +#[test] +fn favorite_and_nightly_choices_do_not_show_a_version_padlock() { + use artcraft_launcher_core::protocol::VersionTrack; + let (mut h, _) = harness(ViewMode::Grid, egui::Theme::Dark, true); + h.run_steps(4); + h.state_mut().as_mut().unwrap().settings.pin_app("photocraft"); + h.run_steps(4); + assert!(h.query_by_label("Version pinned to v0.4.1. Click to unlock.").is_none()); + h.state_mut().as_mut().unwrap().settings.versions.insert("photocraft".into(), VersionTrack::Nightly); + h.run_steps(4); + assert!(h.query_by_label("Version pinned to v0.4.1. Click to unlock.").is_none()); +} + +#[test] +fn launcher_version_padlock_confirms_and_returns_to_settings() { + use artcraft_launcher_core::protocol::VersionTrack; + let (mut h, sent) = harness(ViewMode::Grid, egui::Theme::Dark, true); + h.run_steps(4); + h.state_mut().as_mut().unwrap().settings.launcher_version = VersionTrack::Pinned("v0.19.0".into()); + h.get_by_label("Settings").click(); + h.run_steps(6); + h.get_by_label("Version pinned to v0.19.0. Click to unlock.").click(); + h.run_steps(4); + h.get_by_label("Cancel").click(); + h.run_steps(4); + assert_eq!(h.state().as_ref().unwrap().settings.launcher_version, VersionTrack::Pinned("v0.19.0".into())); + h.get_by_label("Version pinned to v0.19.0. Click to unlock.").click(); + h.run_steps(4); + h.get_by_label("Unlock").click(); + h.run_steps(4); + assert_eq!(h.state().as_ref().unwrap().settings.launcher_version, VersionTrack::Stable); + h.get_by_label("Launcher version"); + assert!(sent.borrow().iter().any(|c| matches!(c, Command::Configure(options) if options.launcher_version == VersionTrack::Stable))); +} diff --git a/docs/hosted-catalog.md b/docs/hosted-catalog.md new file mode 100644 index 00000000..fcba6c18 --- /dev/null +++ b/docs/hosted-catalog.md @@ -0,0 +1,77 @@ +# Signed hosted catalog + +The launcher bundles `crates/core/catalog.toml`, containing the website's +`launcher-catalog.toml` data from storytold/artcraft-services#205 with the latest +compiled display order. The signed website fixture is kept separately under +`crates/core/tests/fixtures/` with byte-preserving Git attributes for Windows. The core build script +generates the existing static app/details types from it, keeping first launch +and offline operation independent of the website. + +On the first release check of each process, desktop and web fetch: + +- `https://getartcraft.com/launcher-catalog.toml` +- `https://getartcraft.com/launcher-catalog.toml.sig` + +The signature is base64 encoding of a 64-byte Ed25519 signature over the exact +TOML bytes, with optional surrounding whitespace. Verification uses the SPKI +PEM public key in `crates/core/assets/launcher-catalog-public-key.pem` before +parsing. The corresponding private key belongs only in the website's Cloudflare +build secret `LAUNCHER_CATALOG_SIGNING_KEY`. It is never read or bundled by the +launcher. The checked-in signature fixture is public test data, not a secret. + +Desktop stores the TOML and signature together in an atomic +`launcher-catalog.json` beside the release-feed cache. Web uses the browser's +local storage (`artcraft-launcher.signed-catalog.v1`). Every cache read verifies +the signature again. Network failures, missing signatures, invalid signatures, +invalid documents or unavailable storage preserve the verified cache, then the +bundled list. The bundled list is visible while the background check runs. + +The active catalog is immutable for the process lifetime. Existing install jobs +keep their static handles; restarting refreshes the catalog again. Only one +bounded snapshot is interned per process. This avoids accumulating leaked strings +on repeated checks. Missing bundled apps are appended to the hosted list so an +installed copy remains manageable after the hosted entry disappears. + +The signed file updates app copy, colors, details, desktop categories, window +class, icons and display order. Invalid rows are skipped, unknown fields ignored, +and a document with no valid rows is rejected. New official apps can be added +without a launcher release, within the existing source policy: a lowercase safe +ID, its matching `storytold/` repository, ArtCraft publisher/team, default +bundle ID and no legacy aliases. Existing app names, aliases, bundle IDs, +repositories, publishers and macOS signing teams stay pinned to the bundled +entry. A signature cannot add an unapproved community app or change an existing +install identity. Community onboarding and identity changes still require +maintainer review and a launcher release. + +Icons must use the website's app-ID/hash filenames and pass SHA-256 and PNG +size/dimension checks before decoding. Desktop caches them by hash; web uses +its HTTP cache. Missing icons do not block a valid catalog. Screenshots remain +JPEGs at the launcher's pinned assets tag, with existing byte/pixel checks. +The currently supported installer code still derives package/binary IDs from +app IDs; arbitrary installer identities in unknown manifest fields do not +change installation behavior. + +Limits: 1 MiB catalog, 128-byte encoded signature, 64 hosted apps, 16 features +and screenshots per app, 256 KiB/512×512 PNG icons. Desktop HTTP uses its existing +bounded reader and timeouts. Browser catalog/icon requests stream with actual +byte limits and a 20-second abort signal; redirects are refused on both platforms. + +This is a single pinned key. Rotation requires a launcher update; there is no +manifest-authorized next key, signed expiry or rollback counter in this schema. +The signature authenticates content, not freshness. The existing package checksum +and macOS/Windows publisher checks continue to apply to installations. + +Validation includes a real signed website-format fixture, wrong-key/tampering +rejection, malformed rows, install-identity restrictions, new official app policy, +icon hashes/dimensions, and reverified cache fallback. The private signing key is +not required to run any test. + +To validate the published catalog through the desktop HTTP/cache/activation path +without installing any app: + +```sh +cargo test -p artcraft-launcher-native live_catalog_is_verified_cached_and_activated -- --ignored +``` + +This opt-in network test uses temporary storage and checks the pinned signature, +all accepted entries, activation and icon hashes. Normal CI stays offline.