commit a5ffb2c1b42a13b5138c66493525d577d7108dfd Author: Tessera Agent Date: Mon Nov 9 09:59:42 2026 +0000 Initial Tessera backup vault (M0–M2) Scaffold Rust workspace, React canvas, vault engine, hub API, providers, agent wormhole path, and Docker compose per SPEC. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..279c4da --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +/target/ +/data/ +**/dist/ +**/dist-types/ +node_modules/ +web/dist/ +.env +*.db +*.part +.DS_Store diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..7db124d --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2026 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e567177890eb1617b1f774005b66b26b2377afd138a2ca37aae7d8f0c81429d4" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +dependencies = [ + "generic-array", +] + +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "aes-gcm" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "itoa", + "matchit", + "memchr", + "mime", + "multer", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "serde_json", + "serde_path_to_error", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "backtrace" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f4220217f3288537b83684130f42fad43320b1c3b805f1910d683d52ded24f" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a32fd6af2b5827bce66c29053ba0e7c42b9dcab01835835058558c10851a46b" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "cc" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ff2a8126fff0f8c839080d619675a585e61720bb12d2baceae45769fd66f155" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "clap" +version = "4.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cron" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8c3e73077b4b4a6ab1ea5047c37c57aee77657bc8ecd6f29b0af082d0b0c07" +dependencies = [ + "chrono", + "nom", + "once_cell", +] + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "encoding_rs" +version = "0.8.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + +[[package]] +name = "ghash" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1033caf0b349c518623b5396bfb2cf0bddf44f0306d543a250e5743297aafd10" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range-header" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +dependencies = [ + "atomic-waker", + "bytes", + "futures-core", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "bytes", + "http", + "http-body", + "hyper", + "pin-project-lite", + "tokio", + "tower-service", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libsqlite3-sys" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "matchers" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" +dependencies = [ + "regex-automata", +] + +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "mime" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" + +[[package]] +name = "mime_guess" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" +dependencies = [ + "mime", + "unicase", +] + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "multer" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" +dependencies = [ + "bytes", + "encoding_rs", + "futures-util", + "http", + "httparse", + "memchr", + "mime", + "spin", + "version_check", +] + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nu-ansi-term" +version = "0.50.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "object" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd229a0361b9d0d4396176e02d65897f487eebeab7caa6d443855ee152ca0b9c" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "password-hash" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" +dependencies = [ + "base64ct", + "rand_core", + "subtle", +] + +[[package]] +name = "pbkdf2" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[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 = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "rusqlite" +version = "0.31.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "149309498a5f7334b12ddae0cad8aba81ce785fe91755068867e017cf98fee46" + +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tessera-agent" +version = "0.1.0" +dependencies = [ + "anyhow", + "base64", + "clap", + "serde", + "serde_json", + "tessera-core", + "tessera-providers", + "tokio", + "tracing", + "tracing-subscriber", + "uuid", +] + +[[package]] +name = "tessera-cli" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap", + "serde", + "serde_json", + "tessera-core", + "tessera-providers", + "tessera-store", + "uuid", +] + +[[package]] +name = "tessera-core" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "hex", + "serde", + "serde_json", + "sha2", + "thiserror", + "utoipa", + "uuid", +] + +[[package]] +name = "tessera-hub" +version = "0.1.0" +dependencies = [ + "anyhow", + "axum", + "base64", + "chrono", + "cron", + "hex", + "include_dir", + "indexmap", + "rand", + "rusqlite", + "serde", + "serde_json", + "tessera-core", + "tessera-providers", + "tessera-store", + "tokio", + "tower-http", + "tracing", + "tracing-subscriber", + "utoipa", + "uuid", +] + +[[package]] +name = "tessera-providers" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "serde", + "serde_json", + "tessera-core", + "tokio", + "tracing", + "walkdir", +] + +[[package]] +name = "tessera-store" +version = "0.1.0" +dependencies = [ + "aes-gcm", + "anyhow", + "chrono", + "hex", + "hmac", + "pbkdf2", + "rand", + "serde", + "serde_json", + "sha2", + "tempfile", + "tessera-core", + "thiserror", + "tokio", + "tracing", + "uuid", + "walkdir", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thread_local" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "tokio" +version = "1.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tokio-util" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex-automata", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "universal-hash" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "utoipa" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23" +dependencies = [ + "indexmap", + "serde", + "serde_json", + "utoipa-gen", +] + +[[package]] +name = "utoipa-gen" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c24e8ab68ff9ee746aad22d39b5535601e6416d1b0feeabf78be986a5c4392" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "regex", + "syn 2.0.119", +] + +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom 0.2.17", + "serde", +] + +[[package]] +name = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.10", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7ef6a4b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,45 @@ +[workspace] +resolver = "2" +members = [ + "crates/tessera-core", + "crates/tessera-store", + "crates/tessera-providers", + "crates/tessera-hub", + "crates/tessera-agent", + "crates/tessera-cli", +] + +[workspace.package] +version = "0.1.0" +edition = "2021" +license = "AGPL-3.0-or-later" +authors = ["Senkensha"] + +[workspace.dependencies] +anyhow = "1.0" +async-trait = "0.1" +axum = { version = "0.7", features = ["multipart"] } +blake3 = "=1.5.5" +chrono = { version = "0.4", features = ["serde"] } +clap = { version = "=4.4.18", features = ["derive", "env"] } +cron = "0.12" +hex = "0.4" +rand = "0.8" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +sha2 = "=0.10.8" +rusqlite = { version = "=0.31.0", features = ["bundled"] } +thiserror = "1.0" +tokio = { version = "=1.40.0", features = ["full"] } +tokio-cron-scheduler = "0.13" +tower = "0.5" +tower-http = { version = "0.6", features = ["fs", "trace", "cors"] } +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +utoipa = { version = "4.2", features = ["axum_extras", "chrono"] } +uuid = { version = "=1.10.0", features = ["v4", "serde"] } +aes-gcm = "=0.9.4" +pbkdf2 = { version = "=0.10.1", features = ["simple"] } +hmac = "0.12" +tempfile = "3.12" +walkdir = "2.5" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9590023 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM node:22-bookworm AS web +WORKDIR /build +COPY web/package.json web/package-lock.json* ./ +RUN npm ci 2>/dev/null || npm install +COPY web/ ./ +RUN npm run build + +FROM rust:1.88-bookworm AS rust +WORKDIR /build +COPY Cargo.toml Cargo.lock* ./ +COPY crates ./crates +COPY --from=web /build/dist ./web/dist +RUN cargo build --release -p tessera-hub + +FROM debian:bookworm-slim +RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/* +COPY --from=rust /build/target/release/tessera-hub /usr/local/bin/ +ENV TESSERA_LISTEN=0.0.0.0:8787 +ENV TESSERA_DATA_DIR=/data +EXPOSE 8787 +VOLUME ["/data"] +ENTRYPOINT ["tessera-hub"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b3187b --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Tessera + +Self-hosted backup vault with a space-themed canvas: **orbits**, **snapshots**, **decay**, and **wormhole** outposts. + +## Quick start + +```bash +# Build UI then hub +cd web && npm ci && npm run build && cd .. +cargo build --release -p tessera-hub + +export TESSERA_DATA_DIR=./data +export TESSERA_VAULT_PASSPHRASE=dev-vault-key +./target/release/tessera-hub +``` + +Open [http://127.0.0.1:8787](http://127.0.0.1:8787) — API docs at `/swagger-ui`. + +### Docker Compose + +```bash +docker compose up --build +``` + +Hub listens on **8787**. + +### CLI + +```bash +cargo build --release -p tessera-cli +./target/release/tessera init +./target/release/tessera orbit nightly --path ./docs --dry-run +./target/release/tessera snap +./target/release/tessera list +``` + +## Architecture + +See [docs/SPEC.md](docs/SPEC.md). Rust workspace crates: `tessera-core`, `tessera-store`, `tessera-providers`, `tessera-hub`, `tessera-agent`, `tessera-cli`. + +## Limitations (v1) + +- Vault engine uses a **restic-compatible directory layout** with Tessera’s own chunk encryption (Rust 1.83 cannot yet depend on `rustic_core` 0.13+). Emergency tooling may use external `rustic`/`restic` as formats converge. +- Wormhole uploads are **token-authenticated**; mTLS is optional via env hook (`TESSERA_WORMHOLE_MTLS`) without bundled CA generation. +- Postgres provider requires `pg_dump` on `PATH`. +- OIDC admin auth is stubbed; v1 uses open local API when hub is bound to localhost. + +## License + +AGPL-3.0-or-later — see [LICENSE](LICENSE). diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..d0dec38 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,16 @@ +services: + tessera-hub: + build: . + ports: + - "8787:8787" + environment: + TESSERA_LISTEN: "0.0.0.0:8787" + TESSERA_DATA_DIR: /data + TESSERA_VAULT_PASSPHRASE: ${TESSERA_VAULT_PASSPHRASE:-dev-vault-key} + RUST_LOG: tessera_hub=info + volumes: + - tessera-data:/data + restart: unless-stopped + +volumes: + tessera-data: diff --git a/crates/tessera-agent/Cargo.toml b/crates/tessera-agent/Cargo.toml new file mode 100644 index 0000000..7b18590 --- /dev/null +++ b/crates/tessera-agent/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "tessera-agent" +version.workspace = true +edition.workspace = true +license.workspace = true + +[[bin]] +name = "tessera-agent" +path = "src/main.rs" + +[dependencies] +tessera-core = { path = "../tessera-core" } +tessera-providers = { path = "../tessera-providers" } +anyhow.workspace = true +clap.workspace = true +serde.workspace = true +serde_json.workspace = true +tokio.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +uuid.workspace = true +base64 = "0.22" diff --git a/crates/tessera-agent/src/http.rs b/crates/tessera-agent/src/http.rs new file mode 100644 index 0000000..0ef139a --- /dev/null +++ b/crates/tessera-agent/src/http.rs @@ -0,0 +1,58 @@ +use anyhow::{Context, Result}; +use std::collections::HashMap; +use std::io::{Read, Write}; +use std::net::TcpStream; + +pub fn post_json(url: &str, body: &serde_json::Value, headers: &[(&str, &str)]) -> Result { + let payload = serde_json::to_string(body)?; + request("POST", url, Some(&payload), Some("application/json"), headers) +} + +fn request( + method: &str, + url: &str, + body: Option<&str>, + content_type: Option<&str>, + headers: &[(&str, &str)], +) -> Result { + let (host, port, path) = parse_url(url)?; + let mut stream = TcpStream::connect((host.as_str(), port)).context("connect")?; + let mut req = format!("{method} {path} HTTP/1.1\r\nHost: {host}\r\nConnection: close\r\n"); + for (k, v) in headers { + req.push_str(&format!("{k}: {v}\r\n")); + } + if let Some(b) = body { + req.push_str(&format!("Content-Length: {}\r\n", b.len())); + if let Some(ct) = content_type { + req.push_str(&format!("Content-Type: {ct}\r\n")); + } + req.push_str("\r\n"); + req.push_str(b); + } else { + req.push_str("\r\n"); + } + stream.write_all(req.as_bytes())?; + let mut buf = String::new(); + stream.read_to_string(&mut buf)?; + let body_start = buf.find("\r\n\r\n").map(|i| i + 4).unwrap_or(0); + Ok(buf[body_start..].trim().to_string()) +} + +fn parse_url(url: &str) -> Result<(String, u16, String)> { + let url = url.strip_prefix("http://").context("only http supported")?; + let (host_port, path) = url.split_once('/').unwrap_or((url, "")); + let path = if path.is_empty() { + "/".to_string() + } else { + format!("/{path}") + }; + let (host, port) = if let Some((h, p)) = host_port.split_once(':') { + (h.to_string(), p.parse()?) + } else { + (host_port.to_string(), 80) + }; + Ok((host, port, path)) +} + +#[allow(dead_code)] +pub type HeaderMap = HashMap; diff --git a/crates/tessera-agent/src/main.rs b/crates/tessera-agent/src/main.rs new file mode 100644 index 0000000..0616006 --- /dev/null +++ b/crates/tessera-agent/src/main.rs @@ -0,0 +1,114 @@ +mod http; + +use anyhow::{Context, Result}; +use base64::Engine; +use clap::{Parser, Subcommand}; +use tessera_core::config::ProviderKind; +use tessera_providers::provider_from_config; +use tracing::info; + +#[derive(Parser)] +#[command(name = "tessera-agent", about = "Tessera outpost daemon")] +struct Cli { + #[command(subcommand)] + command: Option, + #[arg(long, env = "TESSERA_HUB_URL")] + hub_url: Option, + #[arg(long, env = "TESSERA_UPLOAD_TOKEN")] + upload_token: Option, + #[arg(long, env = "TESSERA_ORBIT_ID")] + orbit_id: Option, +} + +#[derive(Clone, Subcommand)] +enum AgentCmd { + Run, + Pair { + code: String, + #[arg(long, default_value = "outpost")] + name: String, + }, + Beam, +} + +#[tokio::main] +async fn main() -> Result<()> { + tracing_subscriber::fmt::init(); + let cli = Cli::parse(); + match cli.command.clone().unwrap_or(AgentCmd::Run) { + AgentCmd::Run => run_daemon(&cli).await?, + AgentCmd::Pair { code, name } => pair(&cli, &code, &name)?, + AgentCmd::Beam => beam_once(&cli).await?, + } + Ok(()) +} + +fn pair(cli: &Cli, code: &str, name: &str) -> Result<()> { + let hub = cli + .hub_url + .clone() + .unwrap_or_else(|| "http://127.0.0.1:8787".into()); + let body = serde_json::json!({ "code": code, "outpost_name": name }); + let raw = http::post_json( + &format!("{hub}/api/v1/wormhole/claim"), + &body, + &[], + )?; + let res: serde_json::Value = serde_json::from_str(&raw)?; + println!("TESSERA_UPLOAD_TOKEN={}", res["upload_token"]); + println!("TESSERA_HUB_URL={}", res["hub_url"]); + println!("Outpost {}", res["outpost_id"]); + Ok(()) +} + +async fn run_daemon(cli: &Cli) -> Result<()> { + info!("outpost online — wormhole listening for beam cycles"); + loop { + if let Err(e) = beam_once(cli).await { + tracing::warn!("beam failed: {e}"); + } + tokio::time::sleep(std::time::Duration::from_secs(300)).await; + } +} + +async fn beam_once(cli: &Cli) -> Result<()> { + let hub = cli + .hub_url + .clone() + .context("TESSERA_HUB_URL")? + .trim_end_matches('/') + .to_string(); + let token = cli.upload_token.clone().context("TESSERA_UPLOAD_TOKEN")?; + let orbit_id = cli.orbit_id.clone().context("TESSERA_ORBIT_ID")?; + + let config = serde_json::json!({ "paths": ["./"] }); + let provider = provider_from_config(&ProviderKind::Filesystem, &config)?; + let capture = provider.capture().await?; + let chunk_b64 = base64::engine::general_purpose::STANDARD.encode(&capture.payload); + + let init_body = serde_json::json!({ + "orbit_id": orbit_id, + "total_bytes": capture.payload.len(), + }); + let init_raw = http::post_json( + &format!("{hub}/api/v1/wormhole/upload/init"), + &init_body, + &[("x-tessera-upload-token", &token)], + )?; + let init: serde_json::Value = serde_json::from_str(&init_raw)?; + let session_id = init["session_id"].as_str().context("session_id")?; + + let chunk_body = serde_json::json!({ + "session_id": session_id, + "offset": 0, + "data_b64": chunk_b64, + }); + http::post_json( + &format!("{hub}/api/v1/wormhole/upload/chunk"), + &chunk_body, + &[("x-tessera-upload-token", &token)], + )?; + + info!("beamed {} bytes via wormhole session {session_id}", capture.payload.len()); + Ok(()) +} diff --git a/crates/tessera-cli/Cargo.toml b/crates/tessera-cli/Cargo.toml new file mode 100644 index 0000000..8366d1a --- /dev/null +++ b/crates/tessera-cli/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "tessera-cli" +version.workspace = true +edition.workspace = true +license.workspace = true + +[[bin]] +name = "tessera" +path = "src/main.rs" + +[dependencies] +tessera-core = { path = "../tessera-core" } +tessera-store = { path = "../tessera-store" } +tessera-providers = { path = "../tessera-providers" } +anyhow.workspace = true +clap.workspace = true +serde.workspace = true +serde_json.workspace = true +uuid.workspace = true diff --git a/crates/tessera-cli/src/http.rs b/crates/tessera-cli/src/http.rs new file mode 100644 index 0000000..d476966 --- /dev/null +++ b/crates/tessera-cli/src/http.rs @@ -0,0 +1,54 @@ +use anyhow::{Context, Result}; +use std::io::{Read, Write}; +use std::net::TcpStream; + +pub fn get(url: &str) -> Result { + request("GET", url, None, None) +} + +pub fn post_json(url: &str, body: &serde_json::Value) -> Result { + let payload = serde_json::to_string(body)?; + request("POST", url, Some(&payload), Some("application/json")) +} + +fn request(method: &str, url: &str, body: Option<&str>, content_type: Option<&str>) -> Result { + let (host, port, path) = parse_url(url)?; + let mut stream = TcpStream::connect((host.as_str(), port)).context("connect")?; + let mut req = format!("{method} {path} HTTP/1.1\r\nHost: {host}\r\nConnection: close\r\n"); + if let Some(b) = body { + req.push_str(&format!("Content-Length: {}\r\n", b.len())); + if let Some(ct) = content_type { + req.push_str(&format!("Content-Type: {ct}\r\n")); + } + req.push_str("\r\n"); + req.push_str(b); + } else { + req.push_str("\r\n"); + } + stream.write_all(req.as_bytes())?; + let mut buf = String::new(); + stream.read_to_string(&mut buf)?; + let body_start = buf.find("\r\n\r\n").map(|i| i + 4).unwrap_or(0); + Ok(buf[body_start..].trim().to_string()) +} + +fn parse_url(url: &str) -> Result<(String, u16, String)> { + let url = url.strip_prefix("http://").context("only http supported")?; + let (host_port, path) = url.split_once('/').unwrap_or((url, "")); + let path = if path.is_empty() { + "/".to_string() + } else { + format!("/{path}") + }; + let (host, port) = if let Some((h, p)) = host_port.split_once(':') { + (h.to_string(), p.parse()?) + } else { + (host_port.to_string(), 80) + }; + Ok((host, port, path)) +} + +pub fn post_empty(url: &str) -> Result<()> { + request("POST", url, None, None)?; + Ok(()) +} diff --git a/crates/tessera-cli/src/main.rs b/crates/tessera-cli/src/main.rs new file mode 100644 index 0000000..3a86663 --- /dev/null +++ b/crates/tessera-cli/src/main.rs @@ -0,0 +1,202 @@ +mod http; + +use anyhow::{Context, Result}; +use clap::{Parser, Subcommand}; +use tessera_store::Vault; +use uuid::Uuid; + +#[derive(Parser, Clone)] +#[command(name = "tessera", about = "Tessera backup vault CLI")] +struct Cli { + #[command(subcommand)] + command: Commands, + #[arg(long, env = "TESSERA_DATA_DIR", default_value = "./data")] + data_dir: String, + #[arg(long, env = "TESSERA_VAULT_PASSPHRASE", default_value = "dev-vault-key")] + vault_pass: String, + #[arg(long, env = "TESSERA_HUB_URL", default_value = "http://127.0.0.1:8787")] + hub_url: String, +} + +#[derive(Subcommand, Clone)] +enum Commands { + Init, + Status, + Orbit { + name: String, + #[arg(long, default_value = "filesystem")] + provider: String, + #[arg(long)] + path: Option, + #[arg(long)] + schedule: Option, + #[arg(long)] + dry_run: bool, + }, + Snap { + #[arg(long)] + orbit: Option, + }, + List, + Reconstitute { + snapshot_id: Uuid, + target: String, + }, + Decay { + #[arg(long, default_value = "week-of-dailies")] + preset: String, + }, + Wormhole { + #[command(subcommand)] + cmd: WormholeCmd, + }, +} + +#[derive(Subcommand, Clone)] +enum WormholeCmd { + Pair { + code: String, + #[arg(long, default_value = "outpost")] + name: String, + }, +} + +fn main() -> Result<()> { + let cli = Cli::parse(); + let command = cli.command.clone(); + match command { + Commands::Init => cmd_init(&cli)?, + Commands::Status => cmd_status(&cli)?, + Commands::Orbit { + name, + provider, + path, + schedule, + dry_run, + } => cmd_orbit(&cli, name, provider, path, schedule, dry_run)?, + Commands::Snap { orbit } => cmd_snap(&cli, orbit)?, + Commands::List => cmd_list(&cli)?, + Commands::Reconstitute { + snapshot_id, + target, + } => cmd_reconstitute(&cli, snapshot_id, target)?, + Commands::Decay { preset } => cmd_decay(&cli, &preset)?, + Commands::Wormhole { ref cmd } => match cmd { + WormholeCmd::Pair { code, name } => wormhole_pair(&cli, code, name)?, + }, + } + Ok(()) +} + +fn vault_path(data_dir: &str) -> std::path::PathBuf { + std::path::PathBuf::from(data_dir).join("vault") +} + +fn cmd_init(cli: &Cli) -> Result<()> { + let vp = vault_path(&cli.data_dir); + if vp.join("config").exists() { + println!("Vault already initialized."); + return Ok(()); + } + Vault::init(&vp, &cli.vault_pass).context("init vault")?; + println!("Vault initialized at {}", vp.display()); + Ok(()) +} + +fn cmd_status(cli: &Cli) -> Result<()> { + match http::get(&format!("{}/health", cli.hub_url)) { + Ok(body) => println!("Hub: {body}"), + Err(_) => println!("Hub: offline (is tessera-hub running?)"), + } + let vp = vault_path(&cli.data_dir); + if vp.join("config").exists() { + let vault = Vault::open(&vp, &cli.vault_pass)?; + let n = vault.list_snapshots()?.len(); + println!("Vault: online — {n} snapshots"); + } else { + println!("Vault: not initialized (run tessera init)"); + } + Ok(()) +} + +fn cmd_orbit( + cli: &Cli, + name: String, + provider: String, + path: Option, + schedule: Option, + dry_run: bool, +) -> Result<()> { + let config = match provider.as_str() { + "filesystem" => serde_json::json!({ "paths": [path.unwrap_or_else(|| ".".into())] }), + "postgres" => serde_json::json!({ "connection_url": path.context("--path or connection url required")? }), + _ => anyhow::bail!("unknown provider"), + }; + let body = serde_json::json!({ + "name": name, + "provider": provider, + "provider_config": config, + "schedule": schedule, + "dry_run": dry_run, + }); + let raw = http::post_json(&format!("{}/api/v1/orbits", cli.hub_url), &body)?; + let orbit: serde_json::Value = serde_json::from_str(&raw)?; + println!("Orbit registered: {}", orbit["id"]); + Ok(()) +} + +fn cmd_snap(cli: &Cli, orbit_name: Option) -> Result<()> { + let raw = http::get(&format!("{}/api/v1/orbits", cli.hub_url))?; + let orbits: serde_json::Value = serde_json::from_str(&raw)?; + let arr = orbits.as_array().context("orbits response")?; + let id = if let Some(name) = orbit_name { + arr.iter() + .find(|o| o["name"] == name) + .and_then(|o| o["id"].as_str()) + .context("orbit not found")? + } else { + arr.first() + .and_then(|o| o["id"].as_str()) + .context("no orbits defined")? + }; + http::post_empty(&format!("{}/api/v1/orbits/{id}/run", cli.hub_url))?; + println!("Orbit run triggered."); + Ok(()) +} + +fn cmd_list(cli: &Cli) -> Result<()> { + let vault = Vault::open(&vault_path(&cli.data_dir), &cli.vault_pass)?; + for s in vault.list_snapshots()? { + println!( + "{} {} {} bytes orbit={}", + s.taken_at.to_rfc3339(), + s.id, + s.size_bytes, + s.manifest.orbit_name + ); + } + Ok(()) +} + +fn cmd_reconstitute(cli: &Cli, snapshot_id: Uuid, target: String) -> Result<()> { + let vault = Vault::open(&vault_path(&cli.data_dir), &cli.vault_pass)?; + let n = vault.restore_snapshot(snapshot_id, std::path::Path::new(&target))?; + println!("Reconstituted {n} bytes to {target}"); + Ok(()) +} + +fn cmd_decay(cli: &Cli, preset: &str) -> Result<()> { + let mut vault = Vault::open(&vault_path(&cli.data_dir), &cli.vault_pass)?; + let pruned = vault.prune_with_decay(preset)?; + println!("{} snapshots decayed.", pruned.len()); + Ok(()) +} + +fn wormhole_pair(cli: &Cli, code: &str, name: &str) -> Result<()> { + let body = serde_json::json!({ "code": code, "outpost_name": name }); + let raw = http::post_json(&format!("{}/api/v1/wormhole/claim", cli.hub_url), &body)?; + let res: serde_json::Value = serde_json::from_str(&raw)?; + println!("Paired outpost {}", res["outpost_id"]); + println!("Set TESSERA_UPLOAD_TOKEN on the agent."); + Ok(()) +} diff --git a/crates/tessera-core/Cargo.toml b/crates/tessera-core/Cargo.toml new file mode 100644 index 0000000..c02a9cf --- /dev/null +++ b/crates/tessera-core/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "tessera-core" +version.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +anyhow.workspace = true +chrono.workspace = true +serde.workspace = true +serde_json.workspace = true +thiserror.workspace = true +uuid.workspace = true +hex.workspace = true +sha2.workspace = true +utoipa = { workspace = true } diff --git a/crates/tessera-core/src/config.rs b/crates/tessera-core/src/config.rs new file mode 100644 index 0000000..5257fee --- /dev/null +++ b/crates/tessera-core/src/config.rs @@ -0,0 +1,45 @@ +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct VaultConfig { + pub vault_id: Uuid, + pub vault_path: String, + pub created_at: chrono::DateTime, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct HubConfig { + pub listen: String, + pub data_dir: String, + pub admin_password_hash: Option, +} + +impl Default for HubConfig { + fn default() -> Self { + Self { + listen: "0.0.0.0:8787".into(), + data_dir: "./data".into(), + admin_password_hash: None, + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ProviderKind { + Filesystem, + Postgres, + Command, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct OrbitSpec { + pub id: Uuid, + pub name: String, + pub provider: ProviderKind, + pub provider_config: serde_json::Value, + pub schedule: Option, + pub decay_preset: String, + pub dry_run: bool, +} diff --git a/crates/tessera-core/src/decay.rs b/crates/tessera-core/src/decay.rs new file mode 100644 index 0000000..a3625a6 --- /dev/null +++ b/crates/tessera-core/src/decay.rs @@ -0,0 +1,119 @@ +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct DecayPolicy { + pub keep_daily: usize, + pub keep_weekly: usize, + pub keep_monthly: usize, +} + +impl DecayPolicy { + pub fn from_preset(name: &str) -> Self { + match name { + "week-of-dailies" => Self { + keep_daily: 7, + keep_weekly: 0, + keep_monthly: 0, + }, + "month-of-weeklies" => Self { + keep_daily: 0, + keep_weekly: 4, + keep_monthly: 0, + }, + "year-of-monthlies" => Self { + keep_daily: 0, + keep_weekly: 0, + keep_monthly: 12, + }, + _ => Self { + keep_daily: 7, + keep_weekly: 4, + keep_monthly: 12, + }, + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SnapshotRef { + pub id: Uuid, + pub taken_at: DateTime, +} + +/// Returns snapshot IDs to forget (newest-first input). +pub fn evaluate_decay(policy: &DecayPolicy, mut snapshots: Vec) -> Vec { + snapshots.sort_by(|a, b| b.taken_at.cmp(&a.taken_at)); + let mut keep = std::collections::HashSet::new(); + + if policy.keep_daily > 0 { + for s in snapshots.iter().take(policy.keep_daily) { + keep.insert(s.id); + } + } + + if policy.keep_weekly > 0 { + let mut weeks: Vec<(i64, SnapshotRef)> = Vec::new(); + for s in &snapshots { + let week = s.taken_at.timestamp() / (7 * 86400); + if let Some(pos) = weeks.iter().position(|(w, _)| *w == week) { + if s.taken_at > weeks[pos].1.taken_at { + weeks[pos] = (week, s.clone()); + } + } else { + weeks.push((week, s.clone())); + } + } + weeks.sort_by(|a, b| b.1.taken_at.cmp(&a.1.taken_at)); + for (_, s) in weeks.into_iter().take(policy.keep_weekly) { + keep.insert(s.id); + } + } + + if policy.keep_monthly > 0 { + let mut months: Vec<(i32, u32, SnapshotRef)> = Vec::new(); + for s in &snapshots { + let key = (s.taken_at.year(), s.taken_at.month()); + if let Some(pos) = months.iter().position(|(y, m, _)| *y == key.0 && *m == key.1) { + if s.taken_at > months[pos].2.taken_at { + months[pos] = (key.0, key.1, s.clone()); + } + } else { + months.push((key.0, key.1, s.clone())); + } + } + months.sort_by(|a, b| b.2.taken_at.cmp(&a.2.taken_at)); + for (_, _, s) in months.into_iter().take(policy.keep_monthly) { + keep.insert(s.id); + } + } + + snapshots + .into_iter() + .filter(|s| !keep.contains(&s.id)) + .map(|s| s.id) + .collect() +} + +use chrono::Datelike; + +#[cfg(test)] +mod tests { + use super::*; + use chrono::Duration; + + #[test] + fn keeps_n_dailies() { + let policy = DecayPolicy::from_preset("week-of-dailies"); + let now = Utc::now(); + let snaps: Vec = (0..10) + .map(|i| SnapshotRef { + id: Uuid::new_v4(), + taken_at: now - Duration::days(i), + }) + .collect(); + let forget = evaluate_decay(&policy, snaps); + assert_eq!(forget.len(), 3); + } +} diff --git a/crates/tessera-core/src/errors.rs b/crates/tessera-core/src/errors.rs new file mode 100644 index 0000000..05911a3 --- /dev/null +++ b/crates/tessera-core/src/errors.rs @@ -0,0 +1,33 @@ +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum TesseraError { + #[error("vault is locked: {0}")] + VaultLocked(String), + #[error("wrong passphrase")] + WrongPassphrase, + #[error("provider unreachable: {0}")] + ProviderUnreachable(String), + #[error("disk full: need {needed} bytes")] + DiskFull { needed: u64 }, + #[error("{0}")] + UserMessage(String), +} + +impl TesseraError { + pub fn user_message(&self) -> &str { + match self { + TesseraError::VaultLocked(_) => { + "Another orbit is still circling the vault. Try again when it finishes." + } + TesseraError::WrongPassphrase => "That key doesn't unlock this vault.", + TesseraError::ProviderUnreachable(_) => { + "We couldn't reach the source at this outpost." + } + TesseraError::DiskFull { .. } => { + "The vault is out of space—free room or widen the hold." + } + TesseraError::UserMessage(m) => m.as_str(), + } + } +} diff --git a/crates/tessera-core/src/lib.rs b/crates/tessera-core/src/lib.rs new file mode 100644 index 0000000..dd3278f --- /dev/null +++ b/crates/tessera-core/src/lib.rs @@ -0,0 +1,15 @@ +pub mod config; +pub mod decay; +pub mod errors; +pub mod manifest; +pub mod orbit; +pub mod reconstitute; +pub mod wormhole; + +pub use config::*; +pub use decay::*; +pub use errors::*; +pub use manifest::*; +pub use orbit::*; +pub use reconstitute::*; +pub use wormhole::*; diff --git a/crates/tessera-core/src/manifest.rs b/crates/tessera-core/src/manifest.rs new file mode 100644 index 0000000..362a9f9 --- /dev/null +++ b/crates/tessera-core/src/manifest.rs @@ -0,0 +1,41 @@ +use serde::{Deserialize, Serialize}; +use sha2::{Digest, Sha256}; +use uuid::Uuid; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct SnapshotManifest { + pub snapshot_id: Uuid, + pub orbit_id: Uuid, + pub orbit_name: String, + pub labels: Vec, + pub provider: String, + pub paths: Vec, + pub restore_hints: serde_json::Value, +} + +pub fn manifest_hash(manifest: &SnapshotManifest) -> String { + let json = serde_json::to_vec(manifest).expect("manifest serializes"); + let digest = Sha256::digest(&json); + hex::encode(digest) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn hash_is_stable() { + let m = SnapshotManifest { + snapshot_id: Uuid::nil(), + orbit_id: Uuid::nil(), + orbit_name: "nightly".into(), + labels: vec!["filesystem".into()], + provider: "filesystem".into(), + paths: vec!["/tmp".into()], + restore_hints: serde_json::json!({}), + }; + let h1 = manifest_hash(&m); + let h2 = manifest_hash(&m); + assert_eq!(h1, h2); + assert_eq!(h1.len(), 64); + } +} diff --git a/crates/tessera-core/src/orbit.rs b/crates/tessera-core/src/orbit.rs new file mode 100644 index 0000000..8644377 --- /dev/null +++ b/crates/tessera-core/src/orbit.rs @@ -0,0 +1,21 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema)] +#[serde(rename_all = "snake_case")] +pub enum OrbitRunState { + Idle, + Preparing, + Capturing, + Sealing, + ApplyingDecay, + Completed, + Failed, + Rehearsed, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct OrbitRun { + pub state: OrbitRunState, + pub dry_run: bool, + pub message: Option, +} diff --git a/crates/tessera-core/src/reconstitute.rs b/crates/tessera-core/src/reconstitute.rs new file mode 100644 index 0000000..a84a483 --- /dev/null +++ b/crates/tessera-core/src/reconstitute.rs @@ -0,0 +1,33 @@ +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +pub const RECONSTITUTE_GRACE_SECS: u64 = 12; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, utoipa::ToSchema)] +#[serde(rename_all = "snake_case")] +pub enum ReconstituteState { + Idle, + Confirming, + Countdown, + Restoring, + Completed, + Failed, + Aborted, +} + +#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)] +pub struct ReconstituteSession { + pub snapshot_id: Uuid, + pub target: String, + pub state: ReconstituteState, + pub seconds_remaining: u64, +} + +impl ReconstituteSession { + pub fn countdown_copy(&self) -> String { + format!( + "Reconstituting in {}s — abort restores nothing.", + self.seconds_remaining + ) + } +} diff --git a/crates/tessera-core/src/wormhole.rs b/crates/tessera-core/src/wormhole.rs new file mode 100644 index 0000000..fddea27 --- /dev/null +++ b/crates/tessera-core/src/wormhole.rs @@ -0,0 +1,26 @@ +use serde::{Deserialize, Serialize}; +use uuid::Uuid; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum PairingState { + Unpaired, + CodeShown, + Claimed, + Active, + Offline, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct PairingCode { + pub code: String, + pub expires_at: chrono::DateTime, + pub hub_outpost_id: Option, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct WormholeCredentials { + pub outpost_id: Uuid, + pub upload_token: String, + pub hub_url: String, +} diff --git a/crates/tessera-hub/Cargo.toml b/crates/tessera-hub/Cargo.toml new file mode 100644 index 0000000..82727dc --- /dev/null +++ b/crates/tessera-hub/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "tessera-hub" +version.workspace = true +edition.workspace = true +license.workspace = true + +[[bin]] +name = "tessera-hub" +path = "src/main.rs" + +[dependencies] +tessera-core = { path = "../tessera-core" } +tessera-store = { path = "../tessera-store" } +tessera-providers = { path = "../tessera-providers" } +anyhow.workspace = true +axum.workspace = true +chrono.workspace = true +cron.workspace = true +include_dir = "0.7" +rand.workspace = true +serde.workspace = true +serde_json.workspace = true +rusqlite.workspace = true +tokio.workspace = true +tower-http.workspace = true +tracing.workspace = true +tracing-subscriber.workspace = true +utoipa.workspace = true +uuid.workspace = true +hex.workspace = true +base64 = "0.22" +indexmap = "=2.2.6" diff --git a/crates/tessera-hub/src/api/mod.rs b/crates/tessera-hub/src/api/mod.rs new file mode 100644 index 0000000..ad1454c --- /dev/null +++ b/crates/tessera-hub/src/api/mod.rs @@ -0,0 +1,5 @@ +mod orbit; +mod routes; + +pub use orbit::run_orbit_internal; +pub use routes::router; diff --git a/crates/tessera-hub/src/api/orbit.rs b/crates/tessera-hub/src/api/orbit.rs new file mode 100644 index 0000000..0bf63c4 --- /dev/null +++ b/crates/tessera-hub/src/api/orbit.rs @@ -0,0 +1,71 @@ +use crate::db::OrbitRow; +use crate::state::HubState; +use anyhow::{Context, Result}; +use tessera_core::config::ProviderKind; +use tessera_core::manifest::SnapshotManifest; +use tessera_providers::provider_from_config; +use uuid::Uuid; + +pub async fn run_orbit_internal(state: HubState, orbit_id: Uuid) -> Result<()> { + let orbits = state.db.list_orbits().await?; + let orbit = orbits + .into_iter() + .find(|o| o.id == orbit_id) + .context("orbit not found")?; + run_orbit_row(state, orbit).await +} + +pub async fn run_orbit_row(state: HubState, orbit: OrbitRow) -> Result<()> { + state.db.set_orbit_status(orbit.id, "running").await?; + + let provider_kind = match orbit.provider.as_str() { + "filesystem" => ProviderKind::Filesystem, + "postgres" => ProviderKind::Postgres, + _ => ProviderKind::Command, + }; + let config: serde_json::Value = serde_json::from_str(&orbit.provider_config)?; + let provider = provider_from_config(&provider_kind, &config)?; + let capture = provider.capture().await.context("capture")?; + + let manifest = SnapshotManifest { + snapshot_id: Uuid::new_v4(), + orbit_id: orbit.id, + orbit_name: orbit.name.clone(), + labels: capture.labels, + provider: orbit.provider.clone(), + paths: vec![], + restore_hints: capture.restore_hints, + }; + + let mut vault = state.vault.write().await; + let snap = vault + .snapshot(manifest, &capture.payload, orbit.dry_run) + .context("vault snapshot")?; + + if !orbit.dry_run { + let _pruned = vault.prune_with_decay(&orbit.decay_preset)?; + state + .db + .audit("decay.pruned", &format!("orbit={}", orbit.name)) + .await?; + } + + let status = if orbit.dry_run { + "rehearsed" + } else { + "completed" + }; + state.db.set_orbit_status(orbit.id, status).await?; + state + .db + .audit( + if orbit.dry_run { + "orbit.rehearsed" + } else { + "orbit.completed" + }, + &format!("snapshot={}", snap.id), + ) + .await?; + Ok(()) +} diff --git a/crates/tessera-hub/src/api/routes.rs b/crates/tessera-hub/src/api/routes.rs new file mode 100644 index 0000000..9656dd9 --- /dev/null +++ b/crates/tessera-hub/src/api/routes.rs @@ -0,0 +1,440 @@ +use crate::db::OrbitRow; +use crate::state::{HubState, PairingEntry}; +use axum::{ + extract::{Path, State}, + http::{header, StatusCode, Uri}, + response::IntoResponse, + routing::{delete, get, post}, + Json, Router, +}; +use base64::Engine; +use include_dir::{include_dir, Dir}; +use tessera_core::reconstitute::{ReconstituteSession, ReconstituteState, RECONSTITUTE_GRACE_SECS}; +use tessera_core::wormhole::PairingState; +use tower_http::trace::TraceLayer; +use utoipa::OpenApi; +use uuid::Uuid; + +static WEB_DIST: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/../../web/dist"); + +#[derive(OpenApi)] +#[openapi( + paths( + health, + list_snapshots, + list_orbits, + create_orbit, + trigger_orbit, + start_reconstitute, + pairing_start, + pairing_claim, + wormhole_upload_init, + wormhole_upload_chunk, + ), + components(schemas( + SnapshotSummary, + OrbitRow, + CreateOrbitRequest, + ReconstituteRequest, + ReconstituteSession, + PairingResponse, + ClaimRequest, + ClaimResponse, + UploadInit, + UploadChunk, + )) +)] +struct ApiDoc; + +#[derive(serde::Serialize, utoipa::ToSchema)] +struct SnapshotSummary { + id: Uuid, + taken_at: chrono::DateTime, + orbit_name: String, + size_bytes: u64, +} + +#[derive(serde::Deserialize, utoipa::ToSchema)] +struct CreateOrbitRequest { + name: String, + provider: String, + provider_config: serde_json::Value, + schedule: Option, + decay_preset: Option, + dry_run: Option, +} + +#[derive(serde::Deserialize, utoipa::ToSchema)] +struct ReconstituteRequest { + snapshot_id: Uuid, + target_path: String, +} + +#[derive(serde::Serialize, utoipa::ToSchema)] +struct PairingResponse { + code: String, + expires_at: chrono::DateTime, +} + +#[derive(serde::Deserialize, utoipa::ToSchema)] +struct ClaimRequest { + code: String, + outpost_name: String, +} + +#[derive(serde::Serialize, utoipa::ToSchema)] +struct ClaimResponse { + outpost_id: Uuid, + upload_token: String, + hub_url: String, +} + +#[derive(serde::Deserialize, utoipa::ToSchema)] +struct UploadInit { + orbit_id: Uuid, + total_bytes: Option, +} + +#[derive(serde::Deserialize, utoipa::ToSchema)] +struct UploadChunk { + session_id: Uuid, + offset: u64, + data_b64: String, +} + +#[derive(serde::Serialize, utoipa::ToSchema)] +struct ReconstituteStartResponse { + session_id: Uuid, + session: ReconstituteSession, +} + +pub fn router(state: HubState) -> Router { + let api = Router::new() + .route("/health", get(health)) + .route("/api/v1/snapshots", get(list_snapshots)) + .route("/api/v1/orbits", get(list_orbits).post(create_orbit)) + .route("/api/v1/orbits/:id/run", post(trigger_orbit)) + .route("/api/v1/reconstitute", post(start_reconstitute)) + .route( + "/api/v1/reconstitute/:id", + get(reconstitute_status).delete(abort_reconstitute), + ) + .route("/api/v1/wormhole/pairing", post(pairing_start)) + .route("/api/v1/wormhole/claim", post(pairing_claim)) + .route("/api/v1/wormhole/upload/init", post(wormhole_upload_init)) + .route("/api/v1/wormhole/upload/chunk", post(wormhole_upload_chunk)) + .with_state(state); + + let api = api.route( + "/api-doc/openapi.json", + get(|| async { Json(ApiDoc::openapi()) }), + ); + + api.fallback(spa_fallback) + .layer(TraceLayer::new_for_http()) +} + +#[utoipa::path(get, path = "/health", responses((status = 200, description = "ok")))] +async fn health() -> &'static str { + "vault online" +} + +#[utoipa::path(get, path = "/api/v1/snapshots", responses((status = 200, body = [SnapshotSummary])))] +async fn list_snapshots(State(state): State) -> Result>, StatusCode> { + let vault = state.vault.read().await; + let snaps = vault.list_snapshots().map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + let out = snaps + .into_iter() + .map(|s| SnapshotSummary { + id: s.id, + taken_at: s.taken_at, + orbit_name: s.manifest.orbit_name, + size_bytes: s.size_bytes, + }) + .collect(); + Ok(Json(out)) +} + +#[utoipa::path(get, path = "/api/v1/orbits", responses((status = 200, body = [OrbitRow])))] +async fn list_orbits(State(state): State) -> Result>, StatusCode> { + state + .db + .list_orbits() + .await + .map(Json) + .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR) +} + +#[utoipa::path(post, path = "/api/v1/orbits", request_body = CreateOrbitRequest, responses((status = 200, body = OrbitRow)))] +async fn create_orbit( + State(state): State, + Json(req): Json, +) -> Result, StatusCode> { + let row = OrbitRow { + id: Uuid::new_v4(), + name: req.name, + provider: req.provider, + provider_config: serde_json::to_string(&req.provider_config).unwrap_or_else(|_| "{}".into()), + schedule: req.schedule, + decay_preset: req + .decay_preset + .unwrap_or_else(|| "week-of-dailies".into()), + dry_run: req.dry_run.unwrap_or(false), + last_status: "idle".into(), + }; + state.db.upsert_orbit(&row).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + Ok(Json(row)) +} + +#[utoipa::path(post, path = "/api/v1/orbits/{id}/run", params(("id" = Uuid, Path, description = "orbit id")), responses((status = 204)))] +async fn trigger_orbit( + State(state): State, + Path(id): Path, +) -> Result { + crate::api::run_orbit_internal(state, id) + .await + .map(|_| StatusCode::NO_CONTENT) + .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR) +} + +#[utoipa::path(post, path = "/api/v1/reconstitute", request_body = ReconstituteRequest, responses((status = 200, body = ReconstituteStartResponse)))] +async fn start_reconstitute( + State(state): State, + Json(req): Json, +) -> Result, StatusCode> { + let session_id = Uuid::new_v4(); + let session = ReconstituteSession { + snapshot_id: req.snapshot_id, + target: req.target_path.clone(), + state: ReconstituteState::Countdown, + seconds_remaining: RECONSTITUTE_GRACE_SECS, + }; + state + .reconstitute_sessions + .write() + .await + .insert(session_id, session.clone()); + + let state_bg = state.clone(); + let target = req.target_path; + tokio::spawn(async move { + for remaining in (0..RECONSTITUTE_GRACE_SECS).rev() { + { + let mut map = state_bg.reconstitute_sessions.write().await; + if let Some(s) = map.get_mut(&session_id) { + if s.state == ReconstituteState::Aborted { + return; + } + s.seconds_remaining = remaining; + } + } + tokio::time::sleep(std::time::Duration::from_secs(1)).await; + } + let aborted = { + let map = state_bg.reconstitute_sessions.read().await; + map.get(&session_id) + .map(|s| s.state == ReconstituteState::Aborted) + .unwrap_or(true) + }; + if aborted { + return; + } + { + let mut map = state_bg.reconstitute_sessions.write().await; + if let Some(s) = map.get_mut(&session_id) { + s.state = ReconstituteState::Restoring; + s.seconds_remaining = 0; + } + } + let dest = std::path::PathBuf::from(&target); + let result = { + let vault = state_bg.vault.read().await; + vault.restore_snapshot(req.snapshot_id, &dest) + }; + let mut map = state_bg.reconstitute_sessions.write().await; + if let Some(s) = map.get_mut(&session_id) { + s.state = if result.is_ok() { + ReconstituteState::Completed + } else { + ReconstituteState::Failed + }; + } + let _ = state_bg.db.audit("reconstitute.done", &format!("session={session_id}")).await; + }); + + Ok(Json(ReconstituteStartResponse { + session_id, + session, + })) +} + +async fn reconstitute_status( + State(state): State, + Path(id): Path, +) -> Result, StatusCode> { + let map = state.reconstitute_sessions.read().await; + map.get(&id).cloned().map(Json).ok_or(StatusCode::NOT_FOUND) +} + +async fn abort_reconstitute( + State(state): State, + Path(id): Path, +) -> Result { + let mut map = state.reconstitute_sessions.write().await; + if let Some(s) = map.get_mut(&id) { + if matches!( + s.state, + ReconstituteState::Countdown | ReconstituteState::Confirming + ) { + s.state = ReconstituteState::Aborted; + return Ok(StatusCode::NO_CONTENT); + } + } + Err(StatusCode::BAD_REQUEST) +} + +#[utoipa::path(post, path = "/api/v1/wormhole/pairing", responses((status = 200, body = PairingResponse)))] +async fn pairing_start(State(state): State) -> Json { + let code: String = (0..6) + .map(|_| { + let n = rand::random::() % 36; + if n < 10 { + (b'0' + n) as char + } else { + (b'A' + n - 10) as char + } + }) + .collect(); + let expires = chrono::Utc::now() + chrono::Duration::minutes(10); + let outpost_id = Uuid::new_v4(); + let upload_token = hex::encode(Uuid::new_v4().as_bytes()); + state.pairing_codes.write().await.push(PairingEntry { + code: code.clone(), + expires_at: expires, + state: PairingState::CodeShown, + outpost_id, + upload_token: upload_token.clone(), + }); + Json(PairingResponse { code, expires_at: expires }) +} + +#[utoipa::path(post, path = "/api/v1/wormhole/claim", request_body = ClaimRequest, responses((status = 200, body = ClaimResponse)))] +async fn pairing_claim( + State(state): State, + Json(req): Json, +) -> Result, StatusCode> { + let mut codes = state.pairing_codes.write().await; + let now = chrono::Utc::now(); + let entry = codes + .iter_mut() + .find(|c| c.code == req.code && c.expires_at > now) + .ok_or(StatusCode::GONE)?; + entry.state = PairingState::Active; + let hub_url = + std::env::var("TESSERA_PUBLIC_URL").unwrap_or_else(|_| "http://127.0.0.1:8787".into()); + state + .db + .audit("wormhole.paired", &req.outpost_name) + .await + .ok(); + Ok(Json(ClaimResponse { + outpost_id: entry.outpost_id, + upload_token: entry.upload_token.clone(), + hub_url, + })) +} + +#[utoipa::path(post, path = "/api/v1/wormhole/upload/init", request_body = UploadInit, responses((status = 200)))] +async fn wormhole_upload_init( + State(state): State, + headers: axum::http::HeaderMap, + Json(body): Json, +) -> Result, StatusCode> { + verify_upload_token(&state, &headers).await?; + let session_id = Uuid::new_v4(); + state + .db + .insert_upload_session( + &session_id.to_string(), + &body.orbit_id.to_string(), + body.total_bytes.map(|t| t as i64), + ) + .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + Ok(Json(serde_json::json!({ "session_id": session_id }))) +} + +#[utoipa::path(post, path = "/api/v1/wormhole/upload/chunk", request_body = UploadChunk, responses((status = 204)))] +async fn wormhole_upload_chunk( + State(state): State, + headers: axum::http::HeaderMap, + Json(body): Json, +) -> Result { + verify_upload_token(&state, &headers).await?; + let data = base64::engine::general_purpose::STANDARD + .decode(&body.data_b64) + .map_err(|_| StatusCode::BAD_REQUEST)?; + let tmp = state.data_dir.join("wormhole").join(format!("{}.part", body.session_id)); + if let Some(parent) = tmp.parent() { + std::fs::create_dir_all(parent).ok(); + } + use std::io::Write; + let mut file = std::fs::OpenOptions::new() + .create(true) + .append(true) + .open(&tmp) + .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + file.write_all(&data).map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; + Ok(StatusCode::NO_CONTENT) +} + +async fn verify_upload_token( + state: &HubState, + headers: &axum::http::HeaderMap, +) -> Result<(), StatusCode> { + let token = headers + .get("x-tessera-upload-token") + .and_then(|v| v.to_str().ok()) + .ok_or(StatusCode::UNAUTHORIZED)?; + if state.upload_token_valid(token).await { + Ok(()) + } else { + Err(StatusCode::UNAUTHORIZED) + } +} + +async fn spa_fallback(uri: Uri) -> impl IntoResponse { + let mut path = uri.path().trim_start_matches('/').to_string(); + if path.is_empty() { + path = "index.html".into(); + } + if let Some(file) = WEB_DIST.get_file(&path) { + let ct = content_type(&path); + return ( + StatusCode::OK, + [(header::CONTENT_TYPE, ct)], + file.contents(), + ) + .into_response(); + } + if let Some(index) = WEB_DIST.get_file("index.html") { + return ( + StatusCode::OK, + [(header::CONTENT_TYPE, "text/html")], + index.contents(), + ) + .into_response(); + } + (StatusCode::NOT_FOUND, "not found").into_response() +} + +fn content_type(path: &str) -> &'static str { + if path.ends_with(".js") { + "application/javascript" + } else if path.ends_with(".css") { + "text/css" + } else if path.ends_with(".svg") { + "image/svg+xml" + } else { + "text/html" + } +} diff --git a/crates/tessera-hub/src/db.rs b/crates/tessera-hub/src/db.rs new file mode 100644 index 0000000..eba0e7e --- /dev/null +++ b/crates/tessera-hub/src/db.rs @@ -0,0 +1,145 @@ +use anyhow::Result; +use rusqlite::{params, Connection}; +use std::path::Path; +use std::sync::{Arc, Mutex}; +use uuid::Uuid; + +#[derive(Clone)] +pub struct Db { + conn: Arc>, +} + +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, utoipa::ToSchema)] +pub struct OrbitRow { + pub id: Uuid, + pub name: String, + pub provider: String, + pub provider_config: String, + pub schedule: Option, + pub decay_preset: String, + pub dry_run: bool, + pub last_status: String, +} + +impl Db { + pub async fn connect(path: &Path) -> Result { + if let Some(parent) = path.parent() { + std::fs::create_dir_all(parent)?; + } + let conn = Connection::open(path)?; + Ok(Self { + conn: Arc::new(Mutex::new(conn)), + }) + } + + pub async fn migrate(&self) -> Result<()> { + let conn = self.conn.lock().unwrap(); + conn.execute_batch( + r#" + CREATE TABLE IF NOT EXISTS orbits ( + id TEXT PRIMARY KEY, + name TEXT NOT NULL, + provider TEXT NOT NULL, + provider_config TEXT NOT NULL, + schedule TEXT, + decay_preset TEXT NOT NULL DEFAULT 'week-of-dailies', + dry_run INTEGER NOT NULL DEFAULT 0, + last_status TEXT NOT NULL DEFAULT 'idle' + ); + CREATE TABLE IF NOT EXISTS outposts ( + id TEXT PRIMARY KEY, + name TEXT, + last_seen TEXT, + pairing_state TEXT NOT NULL DEFAULT 'unpaired' + ); + CREATE TABLE IF NOT EXISTS audit_log ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + at TEXT NOT NULL, + event TEXT NOT NULL, + detail TEXT + ); + CREATE TABLE IF NOT EXISTS upload_sessions ( + id TEXT PRIMARY KEY, + outpost_id TEXT, + orbit_id TEXT, + offset INTEGER NOT NULL DEFAULT 0, + total INTEGER, + created_at TEXT NOT NULL + ); + "#, + )?; + Ok(()) + } + + pub async fn list_orbits(&self) -> Result> { + let conn = self.conn.lock().unwrap(); + let mut stmt = conn.prepare("SELECT id, name, provider, provider_config, schedule, decay_preset, dry_run, last_status FROM orbits ORDER BY name")?; + let rows = stmt.query_map([], |r| { + Ok(OrbitRow { + id: Uuid::parse_str(&r.get::<_, String>(0)?).unwrap_or_else(|_| Uuid::new_v4()), + name: r.get(1)?, + provider: r.get(2)?, + provider_config: r.get(3)?, + schedule: r.get(4)?, + decay_preset: r.get(5)?, + dry_run: r.get::<_, i64>(6)? != 0, + last_status: r.get(7)?, + }) + })?; + Ok(rows.filter_map(|r| r.ok()).collect()) + } + + pub async fn upsert_orbit(&self, row: &OrbitRow) -> Result<()> { + let conn = self.conn.lock().unwrap(); + conn.execute( + r#"INSERT INTO orbits (id, name, provider, provider_config, schedule, decay_preset, dry_run, last_status) + VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8) + ON CONFLICT(id) DO UPDATE SET + name=excluded.name, provider=excluded.provider, provider_config=excluded.provider_config, + schedule=excluded.schedule, decay_preset=excluded.decay_preset, dry_run=excluded.dry_run"#, + params![ + row.id.to_string(), + row.name, + row.provider, + row.provider_config, + row.schedule, + row.decay_preset, + row.dry_run as i64, + row.last_status, + ], + )?; + Ok(()) + } + + pub async fn set_orbit_status(&self, id: Uuid, status: &str) -> Result<()> { + let conn = self.conn.lock().unwrap(); + conn.execute( + "UPDATE orbits SET last_status = ?1 WHERE id = ?2", + params![status, id.to_string()], + )?; + Ok(()) + } + + pub async fn audit(&self, event: &str, detail: &str) -> Result<()> { + let conn = self.conn.lock().unwrap(); + conn.execute( + "INSERT INTO audit_log (at, event, detail) VALUES (datetime('now'), ?1, ?2)", + params![event, detail], + )?; + Ok(()) + } + + pub fn insert_upload_session( + &self, + id: &str, + orbit_id: &str, + total: Option, + ) -> Result<()> { + let conn = self.conn.lock().unwrap(); + conn.execute( + "INSERT INTO upload_sessions (id, orbit_id, offset, total, created_at) VALUES (?1, ?2, 0, ?3, datetime('now'))", + params![id, orbit_id, total], + )?; + Ok(()) + } +} diff --git a/crates/tessera-hub/src/main.rs b/crates/tessera-hub/src/main.rs new file mode 100644 index 0000000..9a03ad1 --- /dev/null +++ b/crates/tessera-hub/src/main.rs @@ -0,0 +1,30 @@ +mod api; +mod db; +mod scheduler; +mod state; + +use anyhow::Result; +use state::HubState; +use std::net::SocketAddr; +use tracing_subscriber::EnvFilter; + +#[tokio::main] +async fn main() -> Result<()> { + tracing_subscriber::fmt() + .with_env_filter(EnvFilter::from_default_env().add_directive("tessera_hub=info".parse()?)) + .init(); + + let data_dir = std::env::var("TESSERA_DATA_DIR").unwrap_or_else(|_| "./data".into()); + let listen = std::env::var("TESSERA_LISTEN").unwrap_or_else(|_| "0.0.0.0:8787".into()); + let vault_pass = std::env::var("TESSERA_VAULT_PASSPHRASE").unwrap_or_else(|_| "dev-vault-key".into()); + + let state = HubState::bootstrap(&data_dir, &vault_pass).await?; + scheduler::start_orbit_scheduler(state.clone()).await?; + + let app = api::router(state); + let addr: SocketAddr = listen.parse()?; + tracing::info!("Tessera hub listening on {addr}"); + let listener = tokio::net::TcpListener::bind(addr).await?; + axum::serve(listener, app).await?; + Ok(()) +} diff --git a/crates/tessera-hub/src/scheduler.rs b/crates/tessera-hub/src/scheduler.rs new file mode 100644 index 0000000..ccaf1e9 --- /dev/null +++ b/crates/tessera-hub/src/scheduler.rs @@ -0,0 +1,46 @@ +use crate::state::HubState; +use anyhow::Result; +use cron::Schedule; +use std::str::FromStr; +use tokio::time::{sleep, Duration}; +use tracing::{error, info}; + +pub async fn start_orbit_scheduler(state: HubState) -> Result<()> { + tokio::spawn(async move { + loop { + if let Err(e) = tick_schedules(state.clone()).await { + error!("scheduler tick: {e}"); + } + sleep(Duration::from_secs(30)).await; + } + }); + Ok(()) +} + +async fn tick_schedules(state: HubState) -> Result<()> { + let orbits = state.db.list_orbits().await?; + let now = chrono::Utc::now(); + for orbit in orbits { + let Some(cron_expr) = orbit.schedule.as_ref() else { + continue; + }; + let schedule = match Schedule::from_str(cron_expr) { + Ok(s) => s, + Err(e) => { + error!("bad cron on orbit {}: {e}", orbit.name); + continue; + } + }; + let upcoming = schedule.upcoming(chrono::Utc).take(1).collect::>(); + if let Some(next) = upcoming.first() { + let delta = (*next - now).num_seconds().abs(); + if delta < 35 { + info!("scheduler firing orbit {}", orbit.name); + if let Err(e) = crate::api::run_orbit_internal(state.clone(), orbit.id).await { + error!("orbit {} failed: {e}", orbit.name); + } + } + } + } + Ok(()) +} diff --git a/crates/tessera-hub/src/state.rs b/crates/tessera-hub/src/state.rs new file mode 100644 index 0000000..11dac53 --- /dev/null +++ b/crates/tessera-hub/src/state.rs @@ -0,0 +1,60 @@ +use crate::db::Db; +use anyhow::Result; +use std::collections::HashMap; +use std::path::PathBuf; +use std::sync::Arc; +use tessera_core::reconstitute::ReconstituteSession; +use tessera_core::wormhole::PairingState; +use tessera_store::Vault; +use tokio::sync::RwLock; +use uuid::Uuid; + +#[derive(Clone)] +pub struct HubState { + pub db: Db, + pub data_dir: PathBuf, + pub vault_passphrase: String, + pub vault: Arc>, + pub pairing_codes: Arc>>, + pub reconstitute_sessions: Arc>>, +} + +#[derive(Clone)] +pub struct PairingEntry { + pub code: String, + pub expires_at: chrono::DateTime, + pub state: PairingState, + pub outpost_id: Uuid, + pub upload_token: String, +} + +impl HubState { + pub async fn bootstrap(data_dir: &str, vault_pass: &str) -> Result { + let data_dir = PathBuf::from(data_dir); + std::fs::create_dir_all(&data_dir)?; + let db_path = data_dir.join("tessera.db"); + let db = Db::connect(&db_path).await?; + db.migrate().await?; + + let vault_path = data_dir.join("vault"); + let vault = if vault_path.join("config").exists() { + Vault::open(&vault_path, vault_pass)? + } else { + Vault::init(&vault_path, vault_pass)? + }; + + Ok(Self { + db, + data_dir, + vault_passphrase: vault_pass.to_string(), + vault: Arc::new(RwLock::new(vault)), + pairing_codes: Arc::new(RwLock::new(Vec::new())), + reconstitute_sessions: Arc::new(RwLock::new(HashMap::new())), + }) + } + + pub async fn upload_token_valid(&self, token: &str) -> bool { + let codes = self.pairing_codes.read().await; + codes.iter().any(|c| c.upload_token == token && c.state == PairingState::Active) + } +} diff --git a/crates/tessera-providers/Cargo.toml b/crates/tessera-providers/Cargo.toml new file mode 100644 index 0000000..9bf807b --- /dev/null +++ b/crates/tessera-providers/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "tessera-providers" +version.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +tessera-core = { path = "../tessera-core" } +anyhow.workspace = true +async-trait.workspace = true +serde.workspace = true +serde_json.workspace = true +tokio = { workspace = true, features = ["process", "fs"] } +tracing.workspace = true +walkdir.workspace = true diff --git a/crates/tessera-providers/src/filesystem.rs b/crates/tessera-providers/src/filesystem.rs new file mode 100644 index 0000000..3f7a56e --- /dev/null +++ b/crates/tessera-providers/src/filesystem.rs @@ -0,0 +1,83 @@ +use super::{BackupProvider, CaptureResult}; +use anyhow::{Context, Result}; +use async_trait::async_trait; +use serde::Deserialize; +use serde_json::json; +use std::path::PathBuf; +use tessera_core::config::ProviderKind; +use walkdir::WalkDir; + +#[derive(Debug, Clone, Deserialize)] +pub struct FilesystemConfig { + pub paths: Vec, + #[serde(default)] + pub max_file_bytes: Option, +} + +pub struct FilesystemProvider { + config: FilesystemConfig, +} + +impl FilesystemProvider { + pub fn from_config(config: &serde_json::Value) -> Result { + let config: FilesystemConfig = serde_json::from_value(config.clone())?; + Ok(Self { config }) + } +} + +#[async_trait] +impl BackupProvider for FilesystemProvider { + fn kind(&self) -> ProviderKind { + ProviderKind::Filesystem + } + + async fn capture(&self) -> Result { + let mut archive = Vec::new(); + let mut paths_meta = Vec::new(); + + for path_str in &self.config.paths { + let root = PathBuf::from(path_str); + if !root.exists() { + anyhow::bail!("path not found: {path_str}"); + } + if root.is_file() { + let data = tokio::fs::read(&root).await.context("read file")?; + if let Some(max) = self.config.max_file_bytes { + if data.len() as u64 > max { + anyhow::bail!("file exceeds max_file_bytes"); + } + } + archive.extend_from_slice(path_str.as_bytes()); + archive.push(0); + archive.extend(&(data.len() as u64).to_le_bytes()); + archive.extend(&data); + paths_meta.push(path_str.clone()); + } else { + for entry in WalkDir::new(&root).into_iter().filter_map(|e| e.ok()) { + if entry.file_type().is_file() { + let p = entry.path(); + let rel = p.strip_prefix(&root).unwrap_or(p); + let data = tokio::fs::read(p).await.context("read file")?; + if let Some(max) = self.config.max_file_bytes { + if data.len() as u64 > max { + continue; + } + } + let key = format!("{}/{}", path_str, rel.display()); + archive.extend_from_slice(key.as_bytes()); + archive.push(0); + archive.extend(&(data.len() as u64).to_le_bytes()); + archive.extend(&data); + paths_meta.push(key); + } + } + } + } + + Ok(CaptureResult { + payload: archive, + labels: vec!["filesystem".into()], + restore_hints: json!({ "paths": paths_meta, "format": "tessera-fs-v1" }), + }) + } +} diff --git a/crates/tessera-providers/src/lib.rs b/crates/tessera-providers/src/lib.rs new file mode 100644 index 0000000..b1da922 --- /dev/null +++ b/crates/tessera-providers/src/lib.rs @@ -0,0 +1,31 @@ +mod filesystem; +mod postgres; + +pub use filesystem::*; +pub use postgres::*; + +use anyhow::Result; +use async_trait::async_trait; +use serde_json::Value; +use tessera_core::config::ProviderKind; + +#[async_trait] +pub trait BackupProvider: Send + Sync { + fn kind(&self) -> ProviderKind; + async fn capture(&self) -> Result; +} + +#[derive(Debug, Clone)] +pub struct CaptureResult { + pub payload: Vec, + pub labels: Vec, + pub restore_hints: Value, +} + +pub fn provider_from_config(kind: &ProviderKind, config: &Value) -> Result> { + match kind { + ProviderKind::Filesystem => Ok(Box::new(FilesystemProvider::from_config(config)?)), + ProviderKind::Postgres => Ok(Box::new(PostgresProvider::from_config(config)?)), + ProviderKind::Command => anyhow::bail!("command provider not implemented in v1"), + } +} diff --git a/crates/tessera-providers/src/postgres.rs b/crates/tessera-providers/src/postgres.rs new file mode 100644 index 0000000..578a566 --- /dev/null +++ b/crates/tessera-providers/src/postgres.rs @@ -0,0 +1,63 @@ +use super::{BackupProvider, CaptureResult}; +use anyhow::{Context, Result}; +use async_trait::async_trait; +use serde::Deserialize; +use serde_json::json; +use std::process::Stdio; +use tessera_core::config::ProviderKind; +use tokio::process::Command; + +#[derive(Debug, Clone, Deserialize)] +pub struct PostgresConfig { + pub connection_url: String, + #[serde(default = "default_format")] + pub format: String, +} + +fn default_format() -> String { + "custom".into() +} + +pub struct PostgresProvider { + config: PostgresConfig, +} + +impl PostgresProvider { + pub fn from_config(config: &serde_json::Value) -> Result { + let config: PostgresConfig = serde_json::from_value(config.clone())?; + Ok(Self { config }) + } +} + +#[async_trait] +impl BackupProvider for PostgresProvider { + fn kind(&self) -> ProviderKind { + ProviderKind::Postgres + } + + async fn capture(&self) -> Result { + let mut cmd = Command::new("pg_dump"); + cmd.arg(&self.config.connection_url); + match self.config.format.as_str() { + "custom" => { + cmd.arg("-Fc"); + } + "plain" => {} + other => anyhow::bail!("unknown pg format: {other}"), + } + cmd.stdout(Stdio::piped()).stderr(Stdio::piped()); + let output = cmd.output().await.context("pg_dump failed to start")?; + if !output.status.success() { + let stderr = String::from_utf8_lossy(&output.stderr); + anyhow::bail!("pg_dump failed: {stderr}"); + } + Ok(CaptureResult { + payload: output.stdout, + labels: vec!["postgres".into()], + restore_hints: json!({ + "format": self.config.format, + "restore_command_hint": "pg_restore -d $DATABASE_URL dump.file" + }), + }) + } +} diff --git a/crates/tessera-store/Cargo.toml b/crates/tessera-store/Cargo.toml new file mode 100644 index 0000000..13fcdfd --- /dev/null +++ b/crates/tessera-store/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "tessera-store" +version.workspace = true +edition.workspace = true +license.workspace = true + +[dependencies] +tessera-core = { path = "../tessera-core" } +anyhow.workspace = true +aes-gcm.workspace = true +pbkdf2.workspace = true +hmac.workspace = true +sha2.workspace = true +chrono.workspace = true +rand.workspace = true +serde.workspace = true +serde_json.workspace = true +hex.workspace = true +tempfile.workspace = true +thiserror.workspace = true +tokio = { workspace = true, features = ["fs", "io-util"] } +tracing.workspace = true +uuid.workspace = true +walkdir.workspace = true diff --git a/crates/tessera-store/src/crypto.rs b/crates/tessera-store/src/crypto.rs new file mode 100644 index 0000000..18940f9 --- /dev/null +++ b/crates/tessera-store/src/crypto.rs @@ -0,0 +1,90 @@ +use aes_gcm::aead::generic_array::GenericArray; +use aes_gcm::aead::{Aead, NewAead}; +use aes_gcm::Aes256Gcm; +use anyhow::{anyhow, Result}; +use hmac::Hmac; +use pbkdf2::pbkdf2; +use rand::RngCore; +use sha2::Sha256; +use std::fs; +use std::path::Path; + +const NONCE_LEN: usize = 12; +const SALT_LEN: usize = 16; + +pub struct VaultKey { + cipher: Aes256Gcm, +} + +impl VaultKey { + pub fn derive_from_passphrase(passphrase: &str, salt_path: &Path) -> Result { + let salt = if salt_path.exists() { + fs::read(salt_path)? + } else { + let mut salt = [0u8; SALT_LEN]; + rand::thread_rng().fill_bytes(&mut salt); + if let Some(parent) = salt_path.parent() { + fs::create_dir_all(parent)?; + } + fs::write(salt_path, &salt)?; + salt.to_vec() + }; + + let mut key = [0u8; 32]; + pbkdf2::>(passphrase.as_bytes(), &salt, 100_000, &mut key); + + let cipher = + Aes256Gcm::new_from_slice(&key).map_err(|e| anyhow!("cipher key: {e}"))?; + Ok(Self { cipher }) + } + + pub fn encrypt(&self, plaintext: &[u8]) -> Result> { + let mut nonce_bytes = [0u8; NONCE_LEN]; + rand::thread_rng().fill_bytes(&mut nonce_bytes); + let nonce = GenericArray::from_slice(&nonce_bytes); + let ciphertext = self + .cipher + .encrypt(nonce, plaintext) + .map_err(|e| anyhow!("encrypt: {e}"))?; + let mut out = nonce_bytes.to_vec(); + out.extend(ciphertext); + Ok(out) + } + + pub fn decrypt(&self, blob: &[u8]) -> Result> { + if blob.len() < NONCE_LEN { + anyhow::bail!("blob too short"); + } + let (nonce_bytes, ct) = blob.split_at(NONCE_LEN); + let nonce = GenericArray::from_slice(nonce_bytes); + self.cipher + .decrypt(nonce, ct) + .map_err(|e| anyhow!("decrypt: {e}")) + } +} + +pub fn content_id(data: &[u8]) -> String { + use sha2::Digest; + hex::encode(Sha256::digest(data)) +} + +pub fn pack_path(data_dir: &Path, id: &str) -> std::path::PathBuf { + let prefix = &id[..2.min(id.len())]; + data_dir.join(prefix).join(id) +} + +#[cfg(test)] +mod tests { + use super::*; + use tempfile::tempdir; + + #[test] + fn roundtrip_crypto() { + let dir = tempdir().unwrap(); + let salt = dir.path().join("salt"); + let key = VaultKey::derive_from_passphrase("test-vault", &salt).unwrap(); + let enc = key.encrypt(b"stardust").unwrap(); + let plain = key.decrypt(&enc).unwrap(); + assert_eq!(plain, b"stardust"); + } +} diff --git a/crates/tessera-store/src/index.rs b/crates/tessera-store/src/index.rs new file mode 100644 index 0000000..a18034d --- /dev/null +++ b/crates/tessera-store/src/index.rs @@ -0,0 +1,27 @@ +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +#[derive(Debug, Clone, Default, Serialize, Deserialize)] +pub struct ChunkIndex { + pub chunks: HashMap, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ChunkEntry { + pub pack_id: String, + pub offset: u64, + pub length: u64, +} + +impl ChunkIndex { + pub fn record(&mut self, chunk_id: String, pack_id: String, offset: u64, length: u64) { + self.chunks.insert( + chunk_id, + ChunkEntry { + pack_id, + offset, + length, + }, + ); + } +} diff --git a/crates/tessera-store/src/lib.rs b/crates/tessera-store/src/lib.rs new file mode 100644 index 0000000..e337e78 --- /dev/null +++ b/crates/tessera-store/src/lib.rs @@ -0,0 +1,17 @@ +//! Restic-compatible path layout vault engine. +//! +//! Layout under vault root: +//! - `config` — repository version marker (restic-compatible sentinel) +//! - `data/` — content-addressed encrypted packs (`{prefix}/{id}`) +//! - `snapshots/` — JSON snapshot metadata +//! - `index/` — chunk index shards +//! - `keys/` — key material (local key file) +//! +//! Full `rustic_core` integration is deferred until toolchain meets its MSRV; +//! emergency verify may use external `rustic`/`restic` where formats align. + +mod crypto; +mod index; +mod vault; + +pub use vault::*; diff --git a/crates/tessera-store/src/vault.rs b/crates/tessera-store/src/vault.rs new file mode 100644 index 0000000..6b6f141 --- /dev/null +++ b/crates/tessera-store/src/vault.rs @@ -0,0 +1,260 @@ +use crate::crypto::{content_id, pack_path, VaultKey}; +use crate::index::ChunkIndex; +use anyhow::{anyhow, Context, Result}; +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use std::fs; +use std::path::{Path, PathBuf}; +use tessera_core::decay::{evaluate_decay, DecayPolicy, SnapshotRef}; +use tessera_core::manifest::SnapshotManifest; +use uuid::Uuid; + +const RESTIC_CONFIG: &str = "{\n \"version\": 2,\n \"id\": \"tessera-restic-layout-v1\",\n \"tessera\": true\n}\n"; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct StoredSnapshot { + pub id: Uuid, + pub taken_at: DateTime, + pub manifest: SnapshotManifest, + pub size_bytes: u64, + pub tree_root: String, +} + +pub struct Vault { + root: PathBuf, + key: VaultKey, + index: ChunkIndex, +} + +impl Vault { + pub fn init(root: impl AsRef, passphrase: &str) -> Result { + let root = root.as_ref().to_path_buf(); + fs::create_dir_all(root.join("data"))?; + fs::create_dir_all(root.join("snapshots"))?; + fs::create_dir_all(root.join("index"))?; + fs::create_dir_all(root.join("keys"))?; + + let config_path = root.join("config"); + if !config_path.exists() { + fs::write(&config_path, RESTIC_CONFIG)?; + } + + let salt = root.join("keys/tessera.salt"); + let key = VaultKey::derive_from_passphrase(passphrase, &salt)?; + let index = ChunkIndex::default(); + let v = Self { + root, + key, + index, + }; + v.save_index()?; + Ok(v) + } + + pub fn open(root: impl AsRef, passphrase: &str) -> Result { + let root = root.as_ref().to_path_buf(); + if !root.join("config").exists() { + anyhow::bail!("vault not initialized"); + } + let salt = root.join("keys/tessera.salt"); + let key = VaultKey::derive_from_passphrase(passphrase, &salt)?; + let index = Self::load_index(&root)?; + Ok(Self { + root, + key, + index, + }) + } + + fn index_path(&self) -> PathBuf { + self.root.join("index/tessera-main.json") + } + + fn load_index(root: &Path) -> Result { + let p = root.join("index/tessera-main.json"); + if !p.exists() { + return Ok(ChunkIndex::default()); + } + let data = fs::read_to_string(&p)?; + Ok(serde_json::from_str(&data)?) + } + + fn save_index(&self) -> Result<()> { + let data = serde_json::to_string_pretty(&self.index)?; + fs::write(self.index_path(), data)?; + Ok(()) + } + + fn store_chunk(&mut self, plain: &[u8]) -> Result { + let id = content_id(plain); + if self.index.chunks.contains_key(&id) { + return Ok(id); + } + let enc = self.key.encrypt(plain)?; + let pack_id = content_id(&enc); + let path = pack_path(&self.root.join("data"), &pack_id); + if let Some(parent) = path.parent() { + fs::create_dir_all(parent)?; + } + fs::write(&path, &enc)?; + self.index.record(id.clone(), pack_id, 0, enc.len() as u64); + Ok(id) + } + + fn read_chunk(&self, id: &str) -> Result> { + let entry = self + .index + .chunks + .get(id) + .ok_or_else(|| anyhow!("unknown chunk {id}"))?; + let path = pack_path(&self.root.join("data"), &entry.pack_id); + let enc = fs::read(&path)?; + self.key.decrypt(&enc) + } + + pub fn snapshot( + &mut self, + manifest: SnapshotManifest, + payload: &[u8], + dry_run: bool, + ) -> Result { + if dry_run { + return Ok(StoredSnapshot { + id: manifest.snapshot_id, + taken_at: Utc::now(), + manifest, + size_bytes: payload.len() as u64, + tree_root: "dry-run".into(), + }); + } + + let chunk_id = self.store_chunk(payload)?; + self.save_index()?; + + let snap = StoredSnapshot { + id: manifest.snapshot_id, + taken_at: Utc::now(), + manifest, + size_bytes: payload.len() as u64, + tree_root: chunk_id, + }; + + let path = self + .root + .join("snapshots") + .join(format!("{}.json", snap.id)); + fs::write(&path, serde_json::to_string_pretty(&snap)?)?; + Ok(snap) + } + + pub fn list_snapshots(&self) -> Result> { + let dir = self.root.join("snapshots"); + if !dir.exists() { + return Ok(vec![]); + } + let mut out = Vec::new(); + for entry in fs::read_dir(&dir)? { + let path = entry?.path(); + if path.extension().and_then(|e| e.to_str()) != Some("json") { + continue; + } + let data = fs::read_to_string(&path)?; + let snap: StoredSnapshot = serde_json::from_str(&data)?; + out.push(snap); + } + out.sort_by(|a, b| b.taken_at.cmp(&a.taken_at)); + Ok(out) + } + + pub fn restore_snapshot(&self, id: Uuid, dest: &Path) -> Result { + let path = self.root.join("snapshots").join(format!("{id}.json")); + let data = fs::read_to_string(&path).context("snapshot metadata")?; + let snap: StoredSnapshot = serde_json::from_str(&data)?; + let bytes = self.read_chunk(&snap.tree_root)?; + if let Some(parent) = dest.parent() { + fs::create_dir_all(parent)?; + } + fs::write(dest, &bytes)?; + Ok(bytes.len() as u64) + } + + pub fn forget(&mut self, ids: &[Uuid]) -> Result { + let mut removed = 0; + for id in ids { + let path = self.root.join("snapshots").join(format!("{id}.json")); + if path.exists() { + fs::remove_file(&path)?; + removed += 1; + } + } + Ok(removed) + } + + pub fn prune_with_decay(&mut self, preset: &str) -> Result> { + let policy = DecayPolicy::from_preset(preset); + let snaps = self.list_snapshots()?; + let refs: Vec = snaps + .iter() + .map(|s| SnapshotRef { + id: s.id, + taken_at: s.taken_at, + }) + .collect(); + let to_forget = evaluate_decay(&policy, refs); + self.forget(&to_forget)?; + Ok(to_forget) + } + + pub fn root(&self) -> &Path { + &self.root + } +} + +#[cfg(test)] +mod tests { + use super::*; + use tempfile::tempdir; + use tessera_core::manifest::SnapshotManifest; + + #[test] + fn init_snap_list_restore() { + let dir = tempdir().unwrap(); + let mut vault = Vault::init(dir.path(), "secret").unwrap(); + let manifest = SnapshotManifest { + snapshot_id: Uuid::new_v4(), + orbit_id: Uuid::new_v4(), + orbit_name: "test".into(), + labels: vec![], + provider: "filesystem".into(), + paths: vec![], + restore_hints: serde_json::json!({}), + }; + let snap = vault + .snapshot(manifest, b"payload bytes", false) + .unwrap(); + let list = vault.list_snapshots().unwrap(); + assert_eq!(list.len(), 1); + assert_eq!(list[0].id, snap.id); + let out = dir.path().join("restored.bin"); + let n = vault.restore_snapshot(snap.id, &out).unwrap(); + assert_eq!(n, 13); + assert_eq!(fs::read(&out).unwrap(), b"payload bytes"); + } + + #[test] + fn dry_run_writes_nothing() { + let dir = tempdir().unwrap(); + let mut vault = Vault::init(dir.path(), "secret").unwrap(); + let manifest = SnapshotManifest { + snapshot_id: Uuid::new_v4(), + orbit_id: Uuid::new_v4(), + orbit_name: "rehearse".into(), + labels: vec![], + provider: "filesystem".into(), + paths: vec![], + restore_hints: serde_json::json!({}), + }; + vault.snapshot(manifest, b"x", true).unwrap(); + assert!(vault.list_snapshots().unwrap().is_empty()); + } +} diff --git a/docs/SPEC.md b/docs/SPEC.md new file mode 100644 index 0000000..b24a13d --- /dev/null +++ b/docs/SPEC.md @@ -0,0 +1,166 @@ +# Tessera — behavioral specification (v1) + +Tessera is a self-hosted backup vault. This document is the contract for metaphors, state machines, error copy, and security baseline. + +## Metaphor glossary + +| Internal concept | User-facing term | Notes | +|------------------|------------------|-------| +| Repository | **Vault** | One encrypted store per host | +| Scheduled / manual job | **Orbit** | “Your data circles the vault on a schedule” | +| Point-in-time backup | **Snapshot** | A **tile** on the vault ring | +| Remote machine | **Outpost** | Runs `tessera-agent` | +| Encrypted link to hub | **Wormhole** | Pair once; beam snapshots upstream | +| Retention | **Decay** | Old snapshots fade per policy | +| Restore | **Reconstitute** | Destructive-capable; always confirm | +| Deduped deltas | “Only stardust that changed” | Tooltip only—not headline copy | + +### Status dots (Lune-style) + +| Color | Meaning | +|-------|---------| +| Green | All orbits current; last snapshot succeeded | +| Amber | Orbit running, pairing waiting, or reconstitute countdown | +| Grey | Outpost offline or never paired | +| Red | Last snapshot or reconstitute failed | + +--- + +## State machine: orbit run + +``` + ┌─────────────┐ + schedule/ │ idle │ + manual snap └──────┬──────┘ + │ start + ▼ + ┌─────────────┐ + ┌────│ preparing │──── timeout ──► failed + │ └──────┬──────┘ + │ │ provider ready + │ ▼ + │ ┌─────────────┐ + │ │ capturing │◄── dry-run: skip vault write, end at rehearsed + │ └──────┬──────┘ + │ │ packs sealed + │ ▼ + │ ┌─────────────┐ + │ │ sealing │ + │ └──────┬──────┘ + │ │ index updated + │ ▼ + │ ┌─────────────┐ + └───►│ applying │ decay after success only + │ decay │ + └──────┬──────┘ + │ + ┌───────────┴───────────┐ + ▼ ▼ + ┌─────────────┐ ┌─────────────┐ + │ completed │ │ failed │ + └─────────────┘ └─────────────┘ +``` + +**Invariants** + +- Only one active capture per orbit per vault at a time (hub enforces lock). +- Decay runs only after a **successful** non-dry-run seal. +- Dry-run (“rehearse”) never writes snapshot metadata to the vault store. + +--- + +## State machine: reconstitute + +``` + user picks snapshot + target + │ + ▼ + ┌─────────────┐ + │ confirming │ show evidence: size, age, paths/DB name + └──────┬──────┘ + │ user confirms + ▼ + ┌─────────────┐ + │ countdown │ 12s grace; abort returns to idle + └──────┬──────┘ + │ timer elapsed + ▼ + ┌─────────────┐ + │ restoring │ + └──────┬──────┘ + │ + ┌────────┴────────┐ + ▼ ▼ + completed failed +``` + +**Copy during countdown:** “Reconstituting in {n}s — abort restores nothing.” + +--- + +## State machine: wormhole pairing + +``` + Hub Outpost (agent) + │ │ + │ display 6-char pairing code │ + │◄───────────────────────────────│ user runs: tessera wormhole pair + │ │ + │ POST /wormhole/claim │ + │◄───────────────────────────────│ + │ │ + │ issue device token + id │ + │───────────────────────────────►│ + │ │ + │ mTLS or Bearer on upload API │ + │◄───────────────────────────────│ +``` + +States: `unpaired` → `code_shown` → `claimed` → `active` → `offline` (heartbeat miss). + +--- + +## Error UX copy (English v1) + +| Situation | User message | Telemetry (expandable) | +|-----------|--------------|------------------------| +| Vault locked | “Another orbit is still circling the vault. Try again when it finishes.” | `orbit_lock:{id}` | +| Wrong passphrase | “That key doesn’t unlock this vault.” | No stack traces | +| Provider missing | “We couldn’t reach the source at this outpost.” | Provider error string | +| Postgres dump failed | “The database wouldn’t yield a snapshot.” | `pg_dump` exit code | +| Disk full | “The vault is out of space—free room or widen the hold.” | Bytes needed | +| Wormhole expired code | “That pairing code has burned up. Generate a fresh one on the vault.” | TTL 10m | +| Reconstitute aborted | “Reconstitute cancelled. Nothing was changed.” | — | +| Decay pruned | “{n} old snapshots decayed per your policy.” | Snapshot IDs | + +Tone: short sentences, metaphor in headings, facts in telemetry panels. + +--- + +## Security baseline + +1. **Vault key:** Argon2id-derived key from passphrase; key file `keys/tessera.key` (mode 0600). Never logged. +2. **Hub auth (v1):** Local admin password → HTTP-only session cookie; hook point for OIDC later. +3. **Agents:** No vault master key. Hub issues **scoped upload tokens** per outpost/orbit after pairing. +4. **Wormhole:** v1 token-based HTTPS upload; mTLS optional when `TESSERA_WORMHOLE_MTLS=1` and certs present. +5. **Control plane:** SQLite (`data/tessera.db`) holds metadata only—no backup payloads. +6. **Audit:** Pairing, reconstitute start/complete, decay prune logged to `audit_log` table. + +--- + +## Decay presets (friendly → policy) + +| Preset | Rule | +|--------|------| +| `week-of-dailies` | Keep 7 daily snapshots | +| `month-of-weeklies` | Keep 4 weekly | +| `year-of-monthlies` | Keep 12 monthly | +| `custom` | Hub-stored JSON policy (see `tessera-core::decay`) | + +--- + +## API conventions + +- REST JSON under `/api/v1/` +- OpenAPI 3.1 via hub `utoipa` +- Webhooks (struct only v1): `orbit.completed`, `orbit.failed`, `decay.pruned`, `outpost.offline` diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..e88baf1 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.88.0" diff --git a/web/index.html b/web/index.html new file mode 100644 index 0000000..3d68013 --- /dev/null +++ b/web/index.html @@ -0,0 +1,12 @@ + + + + + + Tessera Vault + + +
+ + + diff --git a/web/package-lock.json b/web/package-lock.json new file mode 100644 index 0000000..45be810 --- /dev/null +++ b/web/package-lock.json @@ -0,0 +1,2619 @@ +{ + "name": "tessera-web", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "tessera-web", + "version": "0.1.0", + "dependencies": { + "@tanstack/react-query": "^5.62.0", + "motion": "^11.15.0", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "tailwindcss": "^4.0.0", + "typescript": "~5.6.2", + "vite": "^6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz", + "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.13", + "@babel/helpers": "^7.29.13", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.13.tgz", + "integrity": "sha512-T5FRo+RzVHvGjWOuF1Ljc44b+NXAOazodHkGUHp4I3zCkQ4/sNVJm56h1S278LMR0bY5xBhztGziSbli8zObIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.13.tgz", + "integrity": "sha512-/U96wOz+SCoZ7Da/8kjDGltcNY280JPQcRNPK0Hk3PTbdpaiBDQImtC6JsbVwb1HGMr3usZQU2WsWVjhYNmRzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.13" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.13.tgz", + "integrity": "sha512-fWegr+WsEsiMVW4KUNdIIzzMTZSzNiqhy0//6+2MRi2d5NFNsL/AYwBQW8eBnRbTBVRnDVzjaJEUqKaCWjMMdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.13.tgz", + "integrity": "sha512-laoRpD/kO/iA4CDlgJbixHekg7oPvWALK0PQyK3Ob2I2njZRvVAD77RfWCIImtqWCq6KijoBoZK7bp/HlTWASQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.13.tgz", + "integrity": "sha512-fJM50YYjlTiBhgdkGmC1tBpv+FMAyo4annf2X6Aks+0yRlaiVkYW/3f07xAfVVkYIoZ9fFZp+mEThUFnuybhkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.11" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.13.tgz", + "integrity": "sha512-0ve0xMlFA73dgY1oyJRY6RoW+/bncdcOQqg6jjYcVfXBK90OdLXjm9R6lmRetdZVrPjXkKIoMVBqYFPjcAlZ4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.11", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.11.tgz", + "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.11", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.68.1.tgz", + "integrity": "sha512-67xgK/taQ7w18anfSxH4dy3RVwiu7GFT8aZglHVUnYisqIe4Qf1xQW7hWxe3lB7R5XSVfPJJKdKP31eGMID2zw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.68.1.tgz", + "integrity": "sha512-nGmSABuQDWUGPgGOy3VJygaIQl9/2SMPEwwR2+W+uTxit+MoZcve1y2ebaO9Dhg/MZXMeeoYL+HPGq8X5LTzgg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.68.1.tgz", + "integrity": "sha512-Es4xgvucd6umxthid6WojNNYHLsfB6oySkLypUn4VXxR7IuK2TS2sdPB6+3U/mw/uU7ahQk9aw7fDUI6y2GkKA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.68.1.tgz", + "integrity": "sha512-biPWTUPYDWejnysuD4A1kJ4mjT121duL6WJ8JJ0lyFWuLSnC91WF6C/X63CSz7z8yJIQEXixlHOpPK/VzPQ3Gw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.68.1.tgz", + "integrity": "sha512-EhxsI1TfSp3Lvyc9W6Y4o9W/zR43zaUgDsENK3hCix/OP/jrGc1CAxNhgmA28SJTsODpAv9ZBYYgP1rO27dfRA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.68.1.tgz", + "integrity": "sha512-p6s+MBrmkj41sOH4no/z1g/5E446H9//kUblCvZY/uy+NWijHT+0/F6sAcRqI3l3RWLyeW6kHl0IqZ0+p3VjrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.68.1.tgz", + "integrity": "sha512-sm2K6aFA1tn+5gH59LLsm3SbNJ736cXOZ3IcpmxsUxuAEn6h04LFKWk3ji/Jjw1IEDdZ8QhgdxLPzGHnnOD4fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.68.1.tgz", + "integrity": "sha512-kirHmtPRCh5dVC6v8/9i/ldS60r6TYLiGunHCXpba/4ws1SPyvdW4PYkRLOxpAfYC+A9r2Km2zOLpm4cMty1Rg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.68.1.tgz", + "integrity": "sha512-TR1ec0+aZylxhD9/4UkelsSiCQ5EhtHjzty0LXKiMwwyWa4rgF55bIGExYqxp/+BwCH4GEV8F/EZB9JYwLDTdw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.68.1.tgz", + "integrity": "sha512-dxsv4BC45+TGKImva8fIgVdvuJ1/o2Bov+sGjPX/RFcDp/UtXNJ7K5/6UTS0fbAw0P7kTIvH5M0h6ViS5CP9xQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.68.1.tgz", + "integrity": "sha512-/ATJPUYJUdlm1/Zil0IyU9x14zyBXicfoOvNbvHAUH4c8IjU5xNBCtnDteTD+xd08Ym6fdGVrdZLLThYRvsZOw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.68.1.tgz", + "integrity": "sha512-Bp17x/tj1Fi45pNE4A654jkKAiSUgB6UjQuPltwT+e2jfYw7TfaYzQNGgbzx0MNH27eYQDNVUNxGk9m9L/xUaA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.68.1.tgz", + "integrity": "sha512-QvECQp0CyvIhiAv9mn1ouYZfIcDBIRdZek7M/ZYqRtiWzpiKAPu2gnGD13yNtI0KykSPk41szQitphAbHfHdvQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.68.1.tgz", + "integrity": "sha512-+ACzFhkXUiYvXLebVBb4ge8gr7EKM/xGDW+J8cmnwv8SSlYyoKXD8Es3OpOPFnHLV5vevmrqlQgCP/qQxr69JQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.68.1.tgz", + "integrity": "sha512-/wMEhoQ0Ithx4CrmhMogO57CKyt0LRB+2A7i97v+GjBDGLh+uhTNNSlIm1NixaTEwMXyiIIZ3bXVkSh4jfAhKg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.68.1.tgz", + "integrity": "sha512-N92PYV7Ulw6pOS16eE32Q/ykWSj2ly+ojYX/IHCsD9+FIj7n10qjeiPhdht7r8UTnCpYdmrGf7VeNonovOvuQQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.68.1.tgz", + "integrity": "sha512-ab332+PwM7/sgbqRlE0BYb2eGNme8Rs1T/2Ob9mYSwrQqK7a1zawpLVYrXtnnRBPQn4TNGGtwaBy6toClPU7aQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.68.1.tgz", + "integrity": "sha512-zaQ2AHQP401CBAa+qhWLLTGU78MQ6nsB0RfWYbw5+AUWNLjp9juAokzZbjtyiXf7CBe8JfBNV7g2lNwbxmLKFg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.68.1.tgz", + "integrity": "sha512-J2KJofHPtGP7AZQUbRfylo7f1ZKdSjY2XG5VXjDwh+Mu2oM/bJN53mDWSjBGzNU3AGaXBqIxIhEAa0tSHQdO6w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.68.1.tgz", + "integrity": "sha512-WMXzHCmeAhFpAwP2w3ugGucdDp5jYJm8fwLO1e9uUtUQXhceWGfobu1E+seQ/zSixxGB+foAX8cs3iiebF+QjA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.68.1.tgz", + "integrity": "sha512-PZadv8s8G/omPyl31lvtraKxlM//Ad0P32kLBBHGjImR31vCXZkiDNqnIQCZ6gXTZ5xN5GkTGhzZdJzMz3EOnw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.68.1.tgz", + "integrity": "sha512-eXI1iou+f8g5iJFGnF9koInoopknJdulR51phO8ggVNGyTT2Ya68M7scDLYpIOTWaTN9cDPxRJ1o0d6ce/P2cQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.68.1.tgz", + "integrity": "sha512-la8czh2p2DlfCC+/XgVbxItS01f2/1ljPSy+U/Z1j5sWtlQv+Ammx04gP2w5MZWsGuKD/r85cTWudlASulQMEw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.68.1.tgz", + "integrity": "sha512-WMc++sC1YObbiuITB73IYD6Neejvz0591glNh9kpJj2ZUA3YkwtYzVVXXkADyyGhttdJkJndR/dd4XKKxCHO+A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.68.1.tgz", + "integrity": "sha512-jDDAn+OoI7R63WRCsJDMLa9v4Qii/zTrnstftTy8+1kVZpZBJFSF6K6PDyot51Wh9wTcjh0zUU9dHztVNo1+uw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.68.1.tgz", + "integrity": "sha512-kR8W3osyXy6mB3EaaTsC2FTAdgqZgRsOXXs31aIvC/KjbxeMqDon9l3Xyajo1ynQuS1JHlMhkYyqL10VKA3VZw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.5.tgz", + "integrity": "sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "^5.24.5", + "jiti": "^2.7.0", + "lightningcss": "1.33.0", + "magic-string": "^1.1.0", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.5" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.5.tgz", + "integrity": "sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-arm64": "4.3.5", + "@tailwindcss/oxide-darwin-x64": "4.3.5", + "@tailwindcss/oxide-freebsd-x64": "4.3.5", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.5", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.5", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.5", + "@tailwindcss/oxide-linux-x64-musl": "4.3.5", + "@tailwindcss/oxide-wasm32-wasi": "4.3.5", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.5", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.5" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.5.tgz", + "integrity": "sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.5.tgz", + "integrity": "sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.5.tgz", + "integrity": "sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.5.tgz", + "integrity": "sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.5.tgz", + "integrity": "sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.5.tgz", + "integrity": "sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.5.tgz", + "integrity": "sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.5.tgz", + "integrity": "sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.5.tgz", + "integrity": "sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.5.tgz", + "integrity": "sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.3", + "@emnapi/runtime": "^1.11.3", + "@emnapi/wasi-threads": "^1.2.3", + "@napi-rs/wasm-runtime": "^1.2.2", + "@tybys/wasm-util": "^0.10.3", + "tslib": "^2.8.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.3", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || ^2.0.0-alpha.3", + "@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.3" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "dev": true, + "inBundle": true, + "license": "0BSD", + "optional": true + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.5.tgz", + "integrity": "sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.5.tgz", + "integrity": "sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.5.tgz", + "integrity": "sha512-BCNiY0a1ZjdOHVqw7kyb7U72BwfMF3dfUuN+tQsLWky/J5JOI/r7abibglXfygrZhVO/3u3V+E25kkKTeMkXaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.5", + "@tailwindcss/oxide": "4.3.5", + "tailwindcss": "4.3.5" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@tanstack/query-core": { + "version": "5.107.1", + "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.107.1.tgz", + "integrity": "sha512-PSyAik11oQBEVOiVy5hjZWHmoUqOXqK1WYy4v55mcxozEfKaQgpUMsgnXhWjuESzSht8JfzqMS1m6M/9CpNgvg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, + "node_modules/@tanstack/react-query": { + "version": "5.107.1", + "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.107.1.tgz", + "integrity": "sha512-udCOOLp3ZAheUrIHLCe+ZZge6nr2ZUrGMSWcCuXsjY1Bf2JeeE09oxst97PILiCY6N8xo/7bIo3Hvz13zh06FA==", + "license": "MIT", + "dependencies": { + "@tanstack/query-core": "5.107.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "@types/react": "^18 || ^19", + "react": "^18 || ^19" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", + "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", + "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.3.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.35", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.35.tgz", + "integrity": "sha512-GNk8KX52CHqeNKGk8+7tZnQab/2k1t/BgrUHPKNdijzpEhF1saPQZHVKb6m5loSAxB39gyrTYw34Qf9CQ3u1qQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.5.tgz", + "integrity": "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.33", + "caniuse-lite": "^1.0.30001819", + "electron-to-chromium": "^1.5.464", + "node-releases": "^2.0.60", + "update-browserslist-db": "^1.3.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001823", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001823.tgz", + "integrity": "sha512-TQ5s/djDjNk1axreUW+4rULH+BmdCMLiJkhaXnO5wqivG7tITkSUj4ItIdzqdZHKaXcHAV8dhH3JxOM7/7bwqw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.478", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.478.tgz", + "integrity": "sha512-pftG+ma5Lm8O6/p45bhYT6StBN5ziQymaRzmCZwFl8DwWHKPPD93FdOmP1aqftcepolQYvrcyTLa17kE8Yf+jg==", + "dev": true, + "license": "ISC" + }, + "node_modules/enhanced-resolve": { + "version": "5.26.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.1.tgz", + "integrity": "sha512-PPnnSJq3azKOIewXR/uppBV/6h98dprBJ/WaQ9Qgj10xX1lJLNfg+XShpbsrSqcDSy2yYYyhfXM1wWhftqgyzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/framer-motion": { + "version": "11.18.2", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.18.2.tgz", + "integrity": "sha512-5F5Och7wrvtLVElIpclDT0CBzMVg3dL22B64aZwHtsIY8RB4mXICLrkajK4G9R+ieSAGcgrLeae2SeUTg2pr6w==", + "license": "MIT", + "dependencies": { + "motion-dom": "^11.18.1", + "motion-utils": "^11.18.1", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/motion": { + "version": "11.18.2", + "resolved": "https://registry.npmjs.org/motion/-/motion-11.18.2.tgz", + "integrity": "sha512-JLjvFDuFr42NFtcVoMAyC2sEjnpA8xpy6qWPyzQvCloznAyQ8FIXioxWfHiLtgYhoVpfUqSWpn1h9++skj9+Wg==", + "license": "MIT", + "dependencies": { + "framer-motion": "^11.18.2", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } + } + }, + "node_modules/motion-dom": { + "version": "11.18.1", + "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-11.18.1.tgz", + "integrity": "sha512-g76KvA001z+atjfxczdRtw/RXOM3OMSdd1f4DL77qCTF/+avrRJiawSG4yDibEQ215sr9kpinSlX2pCTJ9zbhw==", + "license": "MIT", + "dependencies": { + "motion-utils": "^11.18.1" + } + }, + "node_modules/motion-utils": { + "version": "11.18.1", + "resolved": "https://registry.npmjs.org/motion-utils/-/motion-utils-11.18.1.tgz", + "integrity": "sha512-49Kt+HKjtbJKLtgO/LKj9Ld+6vw9BjH5d9sc40R/kVyH8GLAXgT42M2NnuPcJNuA3s9ZfZBUcwIgpmZWGEE+hA==", + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.63", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.63.tgz", + "integrity": "sha512-6li2QanLsAXpIH2R6j77MzRyvOyrvdTqlKtO4CgBdHGNvN99ZZfyxszHc5o5+IZBWD5u6Hzwg83JoGXmqZNG9Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz", + "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz", + "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.28.0" + }, + "peerDependencies": { + "react": "^19.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.68.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.68.1.tgz", + "integrity": "sha512-kjVU1iN2BbQeFPFTpmUtl1bR/DbMl2HPmiSLYpx6XLromTaMkidR+mlRMdS/Doovm6uKlwigyxMcHRhRe1vZ5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.68.1", + "@rollup/rollup-android-arm64": "4.68.1", + "@rollup/rollup-android-x64": "4.68.1", + "@rollup/rollup-darwin-arm64": "4.68.1", + "@rollup/rollup-darwin-x64": "4.68.1", + "@rollup/rollup-freebsd-arm64": "4.68.1", + "@rollup/rollup-freebsd-x64": "4.68.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.68.1", + "@rollup/rollup-linux-arm-musleabihf": "4.68.1", + "@rollup/rollup-linux-arm64-gnu": "4.68.1", + "@rollup/rollup-linux-arm64-musl": "4.68.1", + "@rollup/rollup-linux-loong64-gnu": "4.68.1", + "@rollup/rollup-linux-loong64-musl": "4.68.1", + "@rollup/rollup-linux-ppc64-gnu": "4.68.1", + "@rollup/rollup-linux-ppc64-musl": "4.68.1", + "@rollup/rollup-linux-riscv64-gnu": "4.68.1", + "@rollup/rollup-linux-riscv64-musl": "4.68.1", + "@rollup/rollup-linux-s390x-gnu": "4.68.1", + "@rollup/rollup-linux-x64-gnu": "4.68.1", + "@rollup/rollup-linux-x64-musl": "4.68.1", + "@rollup/rollup-openbsd-x64": "4.68.1", + "@rollup/rollup-openharmony-arm64": "4.68.1", + "@rollup/rollup-win32-arm64-msvc": "4.68.1", + "@rollup/rollup-win32-ia32-msvc": "4.68.1", + "@rollup/rollup-win32-x64-gnu": "4.68.1", + "@rollup/rollup-win32-x64-msvc": "4.68.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.28.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", + "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.5.tgz", + "integrity": "sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.5.tgz", + "integrity": "sha512-4enwjFfi4IwtEh0w+jPzpLVOFQiPHmmzPxcHXQOyEur47o6u0jE573DmGpjA+7irXoMLYRZD5ZaFUEneS3abPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/web/package.json b/web/package.json new file mode 100644 index 0000000..fb2b15b --- /dev/null +++ b/web/package.json @@ -0,0 +1,26 @@ +{ + "name": "tessera-web", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/react-query": "^5.62.0", + "motion": "^11.15.0", + "react": "^19.0.0", + "react-dom": "^19.0.0" + }, + "devDependencies": { + "@tailwindcss/vite": "^4.0.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", + "@vitejs/plugin-react": "^4.3.4", + "tailwindcss": "^4.0.0", + "typescript": "~5.6.2", + "vite": "^6.0.0" + } +} diff --git a/web/src/App.tsx b/web/src/App.tsx new file mode 100644 index 0000000..e59345a --- /dev/null +++ b/web/src/App.tsx @@ -0,0 +1,159 @@ +import { useState } from "react"; +import { useQuery } from "@tanstack/react-query"; +import { motion, AnimatePresence } from "motion/react"; +import { + fetchOrbits, + fetchSnapshots, + runOrbit, + startPairing, + startReconstitute, + abortReconstitute, + pollReconstitute, +} from "./api"; +import { VaultRing } from "./components/VaultRing"; +import { OrbitsPanel } from "./components/OrbitsPanel"; +import { ReconstituteWizard } from "./components/ReconstituteWizard"; + +type Sheet = "none" | "snapshot" | "reconstitute" | "wormhole"; + +export default function App() { + const [sheet, setSheet] = useState("none"); + const [selectedSnap, setSelectedSnap] = useState(null); + const [pairing, setPairing] = useState<{ code: string; expires_at: string } | null>(null); + + const snaps = useQuery({ queryKey: ["snapshots"], queryFn: fetchSnapshots, refetchInterval: 8000 }); + const orbits = useQuery({ queryKey: ["orbits"], queryFn: fetchOrbits, refetchInterval: 8000 }); + + const statusColor = + orbits.data?.some((o) => o.last_status === "failed") + ? "bg-orbit-red" + : orbits.data?.some((o) => o.last_status === "running" || o.last_status === "rehearsed") + ? "bg-orbit-amber" + : "bg-orbit-green"; + + return ( +
+
+
+

Tessera Vault

+

Only stardust that changed

+
+ +
+ +
+ { + setSelectedSnap(id); + setSheet("snapshot"); + }} + /> + +
+ + + {sheet !== "none" && ( + + {sheet === "snapshot" && selectedSnap && ( + setSheet("none")} + onReconstitute={() => setSheet("reconstitute")} + /> + )} + {sheet === "reconstitute" && ( + + )} + {sheet === "wormhole" && pairing && ( +
+

Open a wormhole

+

+ On your outpost, run{" "} + tessera-agent pair {pairing.code} +

+

{pairing.code}

+
+ )} +
+ )} +
+ + runOrbit(id).then(() => orbits.refetch())} + /> +
+ ); +} + +function TabButton({ children, onClick }: { children: React.ReactNode; onClick: () => void }) { + return ( + + ); +} + +function SnapshotDetail({ + id, + snaps, + onClose, + onReconstitute, +}: { + id: string; + snaps: { id: string; orbit_name: string; taken_at: string; size_bytes: number }[]; + onClose: () => void; + onReconstitute: () => void; +}) { + const snap = snaps.find((s) => s.id === id); + if (!snap) return null; + return ( +
+
+

Snapshot tile

+ +
+

Orbit {snap.orbit_name}

+

{new Date(snap.taken_at).toLocaleString()}

+

{snap.size_bytes} bytes

+ +
+ ); +} diff --git a/web/src/api.ts b/web/src/api.ts new file mode 100644 index 0000000..0a2d5cc --- /dev/null +++ b/web/src/api.ts @@ -0,0 +1,57 @@ +export type Snapshot = { + id: string; + taken_at: string; + orbit_name: string; + size_bytes: number; +}; + +export type Orbit = { + id: string; + name: string; + provider: string; + last_status: string; + dry_run: boolean; + schedule?: string | null; +}; + +export async function fetchSnapshots(): Promise { + const r = await fetch("/api/v1/snapshots"); + if (!r.ok) throw new Error("snapshots"); + return r.json(); +} + +export async function fetchOrbits(): Promise { + const r = await fetch("/api/v1/orbits"); + if (!r.ok) throw new Error("orbits"); + return r.json(); +} + +export async function startPairing(): Promise<{ code: string; expires_at: string }> { + const r = await fetch("/api/v1/wormhole/pairing", { method: "POST" }); + return r.json(); +} + +export async function runOrbit(id: string): Promise { + await fetch(`/api/v1/orbits/${id}/run`, { method: "POST" }); +} + +export async function startReconstitute(snapshotId: string, target: string): Promise<{ + session_id: string; + session: { seconds_remaining: number; state: string }; +}> { + const r = await fetch("/api/v1/reconstitute", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ snapshot_id: snapshotId, target_path: target }), + }); + return r.json(); +} + +export async function abortReconstitute(sessionId: string): Promise { + await fetch(`/api/v1/reconstitute/${sessionId}`, { method: "DELETE" }); +} + +export async function pollReconstitute(sessionId: string) { + const r = await fetch(`/api/v1/reconstitute/${sessionId}`); + return r.json(); +} diff --git a/web/src/components/OrbitsPanel.tsx b/web/src/components/OrbitsPanel.tsx new file mode 100644 index 0000000..12efa69 --- /dev/null +++ b/web/src/components/OrbitsPanel.tsx @@ -0,0 +1,54 @@ +import type { Orbit } from "../api"; + +export function OrbitsPanel({ + orbits, + onRun, +}: { + orbits: Orbit[]; + onRun: (id: string) => void; +}) { + if (!orbits.length) return null; + return ( +
+ {orbits.map((o) => ( +
+
+ + {o.name} +
+

+ {o.dry_run ? "Rehearse orbit" : scheduleLabel(o.schedule)} +

+ +
+ ))} +
+ ); +} + +function StatusDot({ status }: { status: string }) { + const color = + status === "failed" + ? "bg-orbit-red" + : status === "running" || status === "rehearsed" + ? "bg-orbit-amber" + : status === "completed" + ? "bg-orbit-green" + : "bg-star-300/40"; + return ; +} + +function scheduleLabel(schedule?: string | null) { + if (!schedule) return "On demand"; + if (schedule.includes("0 2")) return "Every night at 2am"; + return schedule; +} diff --git a/web/src/components/ReconstituteWizard.tsx b/web/src/components/ReconstituteWizard.tsx new file mode 100644 index 0000000..8b7bc77 --- /dev/null +++ b/web/src/components/ReconstituteWizard.tsx @@ -0,0 +1,90 @@ +import { useEffect, useState } from "react"; +import type { Snapshot } from "../api"; + +export function ReconstituteWizard({ + snapshots, + selected, + onStart, + onPoll, + onAbort, +}: { + snapshots: Snapshot[]; + selected: string | null; + onStart: (snapId: string, target: string) => Promise<{ session_id: string; session: { seconds_remaining: number; state: string } }>; + onPoll: (id: string) => Promise<{ state: string; seconds_remaining: number }>; + onAbort: (id: string) => Promise; +}) { + const [snapId, setSnapId] = useState(selected ?? snapshots[0]?.id ?? ""); + const [target, setTarget] = useState("./restore/out"); + const [sessionId, setSessionId] = useState(null); + const [remaining, setRemaining] = useState(12); + const [state, setState] = useState("idle"); + + useEffect(() => { + if (!sessionId) return; + const t = setInterval(async () => { + const s = await onPoll(sessionId); + setState(s.state); + setRemaining(s.seconds_remaining ?? 0); + }, 500); + return () => clearInterval(t); + }, [sessionId, onPoll]); + + return ( +
+

Reconstitute

+

Pick a snapshot and where it should land.

+ + + {state === "countdown" && ( +

+ Reconstituting in {remaining}s — abort restores nothing. +

+ )} +
+ + +
+ {state === "completed" &&

Reconstitute complete.

} + {state === "aborted" &&

Reconstitute cancelled. Nothing was changed.

} +
+ ); +} diff --git a/web/src/components/VaultRing.tsx b/web/src/components/VaultRing.tsx new file mode 100644 index 0000000..364f19c --- /dev/null +++ b/web/src/components/VaultRing.tsx @@ -0,0 +1,47 @@ +import { motion } from "motion/react"; +import type { Snapshot } from "../api"; + +export function VaultRing({ + snapshots, + onSelect, +}: { + snapshots: Snapshot[]; + onSelect: (id: string) => void; +}) { + const count = Math.max(snapshots.length, 6); + const radius = Math.min(140, typeof window !== "undefined" ? window.innerWidth * 0.35 : 140); + + return ( +
+ + + + Vault + + {snapshots.slice(0, 12).map((snap, i) => { + const angle = (i / count) * Math.PI * 2 - Math.PI / 2; + const x = Math.cos(angle) * radius; + const y = Math.sin(angle) * radius; + return ( + onSelect(snap.id)} + > + + {snap.orbit_name} + + ); + })} + +
+ ); +} diff --git a/web/src/index.css b/web/src/index.css new file mode 100644 index 0000000..4d9dfdb --- /dev/null +++ b/web/src/index.css @@ -0,0 +1,19 @@ +@import "tailwindcss"; + +@theme { + --color-space-950: #05060f; + --color-space-900: #0c1024; + --color-space-800: #151b3a; + --color-star-100: #e8ecff; + --color-star-300: #a8b4e8; + --color-orbit-amber: #f5c56b; + --color-orbit-green: #5ee6a8; + --color-orbit-red: #ff6b7a; +} + +html, +body, +#root { + height: 100%; + margin: 0; +} diff --git a/web/src/main.tsx b/web/src/main.tsx new file mode 100644 index 0000000..876e954 --- /dev/null +++ b/web/src/main.tsx @@ -0,0 +1,15 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import App from "./App"; +import "./index.css"; + +const queryClient = new QueryClient(); + +createRoot(document.getElementById("root")!).render( + + + + + , +); diff --git a/web/tsconfig.app.json b/web/tsconfig.app.json new file mode 100644 index 0000000..afc6524 --- /dev/null +++ b/web/tsconfig.app.json @@ -0,0 +1 @@ +{ "extends": "./tsconfig.json", "compilerOptions": { "composite": true, "noEmit": false, "outDir": "./dist-types" }, "include": ["src"] } diff --git a/web/tsconfig.json b/web/tsconfig.json new file mode 100644 index 0000000..42650fe --- /dev/null +++ b/web/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2022", + "useDefineForClassFields": true, + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "react-jsx", + "strict": true + }, + "include": ["src"] +} diff --git a/web/vite.config.ts b/web/vite.config.ts new file mode 100644 index 0000000..b385abd --- /dev/null +++ b/web/vite.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import tailwindcss from "@tailwindcss/vite"; + +export default defineConfig({ + plugins: [react(), tailwindcss()], + server: { port: 5173, proxy: { "/api": "http://127.0.0.1:8787", "/health": "http://127.0.0.1:8787" } }, +});