diff --git a/Cargo.lock b/Cargo.lock
index 319114a..2d50d94 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,11 +2,246 @@
# It is not intended for manual editing.
version = 4
+[[package]]
+name = "aho-corasick"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "alkane-os"
version = "0.1.0"
dependencies = [
+ "flare-ui",
+ "maud",
"serde_json",
+ "wschema",
+]
+
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "anstyle"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
+
+[[package]]
+name = "autocfg"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+
+[[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 = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
+
+[[package]]
+name = "ciborium"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
+[[package]]
+name = "clap"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
+dependencies = [
+ "clap_builder",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
+dependencies = [
+ "anstyle",
+ "clap_lex",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "criterion"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
+dependencies = [
+ "anes",
+ "cast",
+ "ciborium",
+ "clap",
+ "criterion-plot",
+ "is-terminal",
+ "itertools",
+ "num-traits",
+ "once_cell",
+ "oorandom",
+ "regex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crunchy"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
+
+[[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 = "digest"
+version = "0.10.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[package]]
+name = "either"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
+
+[[package]]
+name = "flare-ui"
+version = "0.0.1"
+dependencies = [
+ "criterion",
+ "maud",
+ "serde_json",
+ "wschema",
+]
+
+[[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 = "half"
+version = "2.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
+dependencies = [
+ "cfg-if",
+ "crunchy",
+ "zerocopy",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284"
+
+[[package]]
+name = "is-terminal"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
]
[[package]]
@@ -15,12 +250,61 @@ version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
+[[package]]
+name = "libc"
+version = "0.2.191"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
+
+[[package]]
+name = "maud"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8156733e27020ea5c684db5beac5d1d611e1272ab17901a49466294b84fc217e"
+dependencies = [
+ "itoa",
+ "maud_macros",
+]
+
+[[package]]
+name = "maud_macros"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7261b00f3952f617899bc012e3dbd56e4f0110a038175929fa5d18e5a19913ca"
+dependencies = [
+ "proc-macro2",
+ "proc-macro2-diagnostics",
+ "quote",
+ "syn 2.0.119",
+]
+
[[package]]
name = "memchr"
version = "2.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "oorandom"
+version = "11.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
+
[[package]]
name = "proc-macro2"
version = "1.0.107"
@@ -30,6 +314,18 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "proc-macro2-diagnostics"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+ "version_check",
+]
+
[[package]]
name = "quote"
version = "1.0.47"
@@ -39,6 +335,44 @@ dependencies = [
"proc-macro2",
]
+[[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 = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
[[package]]
name = "serde"
version = "1.0.229"
@@ -46,6 +380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
dependencies = [
"serde_core",
+ "serde_derive",
]
[[package]]
@@ -65,7 +400,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.9",
]
[[package]]
@@ -81,6 +416,28 @@ dependencies = [
"zmij",
]
+[[package]]
+name = "sha2"
+version = "0.10.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[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.9"
@@ -92,12 +449,98 @@ dependencies = [
"unicode-ident",
]
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "typenum"
+version = "1.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
+
[[package]]
name = "unicode-ident"
version = "1.0.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
+[[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 = "winapi-util"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[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 = "wschema"
+version = "0.0.1"
+dependencies = [
+ "criterion",
+ "serde",
+ "serde_json",
+ "sha2",
+]
+
+[[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"
diff --git a/Cargo.toml b/Cargo.toml
index 0ee1001..1a7e294 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,6 +10,18 @@ name = "alkane_os"
[dependencies]
serde_json = { version = "=1.0.154", features = ["arbitrary_precision"] }
+flare-ui = { path = "third-party/flare-ui/crates/flare-ui" }
+wschema = { path = "third-party/flare-ui/crates/wschema" }
+maud = "0.27"
+
+[workspace]
+members = ["third-party/flare-ui/crates/flare-ui", "third-party/flare-ui/crates/wschema"]
+
+[workspace.package]
+version = "0.0.1"
+edition = "2021"
+rust-version = "1.85"
+license = "MIT"
[profile.release]
lto = true
diff --git a/ci/check-ui-size.sh b/ci/check-ui-size.sh
new file mode 100644
index 0000000..1501f8f
--- /dev/null
+++ b/ci/check-ui-size.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Report what the schema-driven UI costs in a firmware binary.
+#
+# Two binaries are built for the same target with the same profile: one renders
+# a page through flare-ui and wschema, the other renders the same shape with only
+# maud and serde_json. The difference is the marginal cost of the dependency, and
+# it is the number a release decision should be made on.
+#
+# Measured on armv7-unknown-linux-gnueabihf, release, stripped:
+# ui-baseline 323 KiB
+# ui-spike 771 KiB (marginal: ~448 KiB)
+set -eu
+ROOT=${1:-$(cd "$(dirname "$0")/.." && pwd)}
+TARGET=${ALKANE_SIZE_TARGET:-armv7-unknown-linux-gnueabihf}
+OUT=${CARGO_TARGET_DIR:-/tmp/alkane-os-target}
+STRIP=${ALKANE_STRIP:-arm-linux-gnueabihf-strip}
+
+cd "$ROOT"
+# The workspace mount drops the executable bit on build scripts, so build into
+export CARGO_TARGET_DIR="$OUT"
+CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=${ALKANE_ARM_LINKER:-arm-linux-gnueabihf-gcc} \
+ cargo build --release --offline --target "$TARGET" --bins >/dev/null
+
+sizes=""
+for bin in ui-baseline ui-spike; do
+ src="$OUT/$TARGET/release/$bin"
+ [ -f "$src" ] || { echo "ui-size: $bin was not built" >&2; exit 1; }
+ cp "$src" "/tmp/$bin.size"
+ "$STRIP" "/tmp/$bin.size" 2>/dev/null || true
+ bytes=$(wc -c < "/tmp/$bin.size")
+ sizes="$sizes $bin=$bytes"
+ printf ' %-12s %4d KiB\n' "$bin" $((bytes / 1024))
+done
+
+base=$(printf '%s' "$sizes" | sed 's/.*ui-baseline=\([0-9]*\).*/\1/')
+spike=$(printf '%s' "$sizes" | sed 's/.*ui-spike=\([0-9]*\).*/\1/')
+printf ' marginal %4d KiB\n' $(((spike - base) / 1024))
diff --git a/schema/alkane-bb.json b/schema/alkane-bb.json
new file mode 100644
index 0000000..5583f47
--- /dev/null
+++ b/schema/alkane-bb.json
@@ -0,0 +1,141 @@
+{
+ "format": 1,
+ "id": "alkane.bb",
+ "kind": "base",
+ "menus": [
+ {
+ "id": "dashboard",
+ "slug": "dashboard",
+ "title": "Dashboard",
+ "icon": "dashboard",
+ "band": 0,
+ "order": 10
+ },
+ {
+ "id": "dashboard/overview",
+ "slug": "overview",
+ "title": "Overview",
+ "order": 10,
+ "page": "dashboard.overview"
+ },
+ {
+ "id": "dashboard/alerts",
+ "slug": "alerts",
+ "title": "Alerts",
+ "order": 20,
+ "page": "dashboard.alerts"
+ },
+ {
+ "id": "mining",
+ "slug": "mining",
+ "title": "Mining",
+ "icon": "pickaxe",
+ "band": 1,
+ "order": 10
+ },
+ {
+ "id": "mining/overview",
+ "slug": "overview",
+ "title": "Overview",
+ "order": 10,
+ "page": "mining.overview"
+ },
+ {
+ "id": "mining/hashboards",
+ "slug": "hashboards",
+ "title": "Hashboards",
+ "order": 20,
+ "page": "mining.hashboards"
+ },
+ {
+ "id": "mining/power",
+ "slug": "power",
+ "title": "Power Supply",
+ "order": 30,
+ "page": "mining.power"
+ },
+ {
+ "id": "mining/fans",
+ "slug": "fans",
+ "title": "Fans",
+ "order": 40,
+ "page": "mining.fans"
+ },
+ {
+ "id": "settings",
+ "slug": "settings",
+ "title": "Settings",
+ "icon": "gear",
+ "band": 2,
+ "order": 10
+ },
+ {
+ "id": "settings/system",
+ "slug": "system",
+ "title": "System",
+ "order": 10,
+ "page": "settings.system"
+ },
+ {
+ "id": "settings/tuning",
+ "slug": "tuning",
+ "title": "Tuning",
+ "order": 20,
+ "page": "settings.tuning"
+ },
+ {
+ "id": "settings/pools",
+ "slug": "pools",
+ "title": "Pools",
+ "order": 30,
+ "page": "settings.pools"
+ },
+ {
+ "id": "settings/network",
+ "slug": "network",
+ "title": "Network",
+ "order": 40,
+ "page": "settings.network"
+ },
+ {
+ "id": "settings/security",
+ "slug": "security",
+ "title": "Security",
+ "order": 50,
+ "page": "settings.security"
+ },
+ {
+ "id": "settings/logs",
+ "slug": "logs",
+ "title": "Logs",
+ "order": 60,
+ "page": "settings.logs"
+ },
+ {
+ "id": "settings/files",
+ "slug": "files",
+ "title": "Files",
+ "order": 70,
+ "page": "settings.files"
+ },
+ {
+ "id": "settings/terminal",
+ "slug": "terminal",
+ "title": "Terminal",
+ "order": 80,
+ "page": "settings.terminal"
+ }
+ ],
+ "pages": [],
+ "settings": [],
+ "groups": [],
+ "actions": [],
+ "rules": [],
+ "maps": [],
+ "legacy_keys": [],
+ "requires": {
+ "display_api": 1,
+ "checks_api": 1
+ },
+ "vocab": []
+}
diff --git a/src/bin/ui-baseline.rs b/src/bin/ui-baseline.rs
new file mode 100644
index 0000000..5f34dd1
--- /dev/null
+++ b/src/bin/ui-baseline.rs
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: MIT
+//! Control for the size measurement: the same page shape rendered without
+//! flare-ui, so `check-ui-size.sh` reports the marginal cost of the dependency
+//! rather than the cost of a Rust binary at all.
+
+fn main() {
+ let sections = [("dashboard", "Dashboard"), ("mining", "Mining"), ("settings", "Settings")];
+ let body = maud::html! {
+ section class="bf-card" {
+ h1 class="bf-text-title" { "Alkane OS" }
+ p class="bf-text-body" { "Schema-driven page." }
+ }
+ };
+ let mut html = String::from("
");
+ for (slug, title) in sections {
+ html.push_str(&format!("{title}"));
+ }
+ html.push_str(&body.into_string());
+ html.push_str("");
+ println!("{} {}", html.len(), serde_json::json!({"sections": sections.len()}));
+}
diff --git a/src/bin/ui-spike.rs b/src/bin/ui-spike.rs
new file mode 100644
index 0000000..debbf63
--- /dev/null
+++ b/src/bin/ui-spike.rs
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: MIT
+//! Spike: render the on-box UI from a schema document through flare-ui.
+//!
+//! This is the incorporation test, not the final UI. It answers three questions
+//! with evidence rather than argument:
+//!
+//! 1. does a hand-authored Alkane schema drive the unified sidebar through
+//! `flare_ui::nav` + `flare_ui::shell`?
+//! 2. does the page render with the shared design tokens?
+//! 3. what does it cost in a firmware binary?
+//!
+//! Run it, then compare `--size` against the current hand-rolled renderer.
+
+use flare_ui::assets::PageAssets;
+use flare_ui::nav::{self, AllowAll, AppSet, CapSet};
+use flare_ui::shell::{self, Active};
+use flare_ui::url::Routes;
+use wschema::model::{Document, Surface};
+
+/// The schema is the single source of the UI: sections, tabs and their order.
+const RECIPE_SCHEMA: &str = include_str!("../../schema/alkane-bb.json");
+
+fn main() {
+ let schema = match Document::from_json(RECIPE_SCHEMA) {
+ Ok(schema) => schema,
+ Err(error) => {
+ eprintln!("schema did not parse: {error}");
+ std::process::exit(1);
+ }
+ };
+
+ // Capabilities the board actually reports decide what is visible. On a real
+ // board these come from the HAL; here they are the bb set.
+ let caps = CapSet::new(["hashboard-bm1395", "psu-apm", "pid-fan", "cgminer-api"]);
+ let routes = Routes::console();
+ let apps = AppSet::default();
+ let ctx = nav::NavContext {
+ surface: Surface::Web,
+ principal: &AllowAll,
+ caps: &caps,
+ apps: &apps,
+ routes: &routes,
+ };
+
+ let visible = nav::visible(&schema.menus, &ctx);
+ let first = visible.first_tab().map(|(section, tab)| Active { section, tab });
+ let active = first.unwrap_or(Active { section: "", tab: "" });
+
+ let body = maud::html! {
+ section class="bf-card" {
+ h1 class="bf-text-title" { "Alkane OS" }
+ p class="bf-text-body" { "Schema-driven page. Sections and tabs above come from dashboard.json." }
+ }
+ };
+ let assets = PageAssets::default();
+ let page = shell::page("Alkane OS", &assets, &visible, active, body);
+ let html = page.into_string();
+
+ if std::env::args().any(|arg| arg == "--size") {
+ println!("html_bytes {}", html.len());
+ println!("sections {}", visible.sections.len());
+ for section in &visible.sections {
+ println!("section {} ({}) tabs={}", section.slug, section.title, section.tabs.len());
+ }
+ } else {
+ println!("{html}");
+ }
+}
diff --git a/third-party/README.md b/third-party/README.md
new file mode 100644
index 0000000..3ae9b33
--- /dev/null
+++ b/third-party/README.md
@@ -0,0 +1,41 @@
+# Third-party sources
+
+Code we consume that is not on crates.io. Both entries are pinned, and both are
+vendored rather than fetched so an image build works with no network.
+
+## flare-ui
+
+`flare-ui/` is a full checkout of the `flare-ui` tag recorded in
+`flare-ui/flare-ui.lock` (repo, tag, commit). It is used as path dependencies:
+
+```
+flare-ui = { path = "third-party/flare-ui/crates/flare-ui" }
+wschema = { path = "third-party/flare-ui/crates/wschema" }
+```
+
+The whole tree is vendored, not just `crates/`, because the crate embeds assets
+from `dash-editor/` with `include_str!` and will not compile from a partial
+archive.
+
+Updating the pin:
+
+```
+git archive | tar -x -C third-party/flare-ui # from a flare-ui checkout
+cargo vendor vendor # refresh registry deps
+```
+
+`vendor/` is a cargo directory source (see `.cargo/config.toml`), so every
+registry dependency flare-ui needs - `maud`, `sha2`, `typenum`, `digest` and the
+rest - must be re-vendored or the build fails offline.
+
+## Size
+
+`ci/check-ui-size.sh` builds two binaries for armv7 with the same profile: one
+renders through flare-ui, one renders the same shape with `maud` alone. The
+difference is the marginal cost. Measured 2026-11-03, release, stripped:
+
+```
+ui-baseline 323 KiB
+ui-spike 771 KiB
+marginal 448 KiB
+```
diff --git a/third-party/flare-ui/.gitea/workflows/ci.yml b/third-party/flare-ui/.gitea/workflows/ci.yml
new file mode 100644
index 0000000..93fa490
--- /dev/null
+++ b/third-party/flare-ui/.gitea/workflows/ci.yml
@@ -0,0 +1,121 @@
+name: CI
+
+on:
+ push:
+ branches: [main, next]
+ pull_request:
+ workflow_dispatch:
+
+concurrency:
+ group: ci-${{ gitea.ref }}
+ cancel-in-progress: true
+
+env:
+ CARGO_TERM_COLOR: always
+ CARGO_INCREMENTAL: "0"
+
+jobs:
+ check:
+ name: Format, lint and test
+ runs-on: ci-small
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v7
+
+ # rust-toolchain.toml names one exact version. Install it, then require
+ # the compiler cargo will use to report that same version.
+ - name: Toolchain matches the pin
+ run: |
+ want="$(sed -n 's/^channel *= *"\(.*\)"/\1/p' rust-toolchain.toml)"
+ if command -v rustup >/dev/null 2>&1; then
+ rustup toolchain install "$want" --profile minimal --component clippy --component rustfmt
+ fi
+ got="$(rustc --version | cut -d' ' -f2)"
+ echo "pinned $want, rustc $got"
+ [ "$want" = "$got" ]
+
+ - name: Cache cargo registry
+ uses: actions/cache@v6
+ with:
+ path: |
+ ~/.cargo/registry/index
+ ~/.cargo/registry/cache
+ ~/.cargo/git/db
+ key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
+ restore-keys: ${{ runner.os }}-cargo-
+
+ - name: Format
+ run: cargo fmt --check
+
+ - name: Clippy
+ run: cargo clippy --workspace --all-targets --locked -- -D warnings
+
+ - name: Test
+ run: cargo test --workspace --locked
+
+ - name: Crate owners
+ run: scripts/check-owners.sh
+
+ - name: Vendor script self-test
+ run: scripts/vendor-selftest.sh
+
+ # The panel crates must keep building for the device target.
+ - name: Build for the panel
+ run: |
+ if command -v rustup >/dev/null 2>&1; then
+ rustup target add armv7-unknown-linux-musleabihf
+ fi
+ cargo build --locked --target armv7-unknown-linux-musleabihf \
+ -p wschema -p warden-sync -p warden-seal -p wapp-core
+
+ # The imported dashboard editor ships plain static files; its tests
+ # are Node's built-in runner, no install step.
+ - name: Dash editor tests
+ run: |
+ cd dash-editor
+ node --test tests/*.test.mjs
+
+ # The automation flowchart model, same runner as the dash editor.
+ - name: Flow builder tests
+ run: |
+ cd flow-builder
+ node --test tests/*.test.mjs
+
+ - name: UI adapter tests
+ run: node --test crates/flare-ui/tests/js/*.test.js
+
+ browser:
+ name: UI browser tests
+ runs-on: ci-small
+ timeout-minutes: 15
+ permissions:
+ contents: read
+ env:
+ PLAYWRIGHT_BROWSERS_PATH: ${{ runner.tool_cache }}/flare-ui-playwright
+ defaults:
+ run:
+ working-directory: crates/flare-ui/tests/browser
+ steps:
+ - uses: actions/checkout@v7
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '24'
+ - name: Restore browser cache
+ id: browsers
+ uses: actions/cache/restore@v6
+ with:
+ path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
+ key: ${{ runner.os }}-flare-ui-playwright-${{ hashFiles('crates/flare-ui/tests/browser/package-lock.json') }}
+ - name: Install test dependencies
+ run: npm ci --ignore-scripts
+ - name: Install headless browsers
+ run: npx playwright install --with-deps chromium firefox
+ - name: Check UI behavior
+ run: npm test
+ # Pull requests read the cache; only trusted next pushes replace it.
+ - name: Save browser cache
+ if: github.event_name == 'push' && github.ref == 'refs/heads/next' && steps.browsers.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v6
+ with:
+ path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
+ key: ${{ runner.os }}-flare-ui-playwright-${{ hashFiles('crates/flare-ui/tests/browser/package-lock.json') }}
diff --git a/third-party/flare-ui/.gitignore b/third-party/flare-ui/.gitignore
new file mode 100644
index 0000000..7a1bac0
--- /dev/null
+++ b/third-party/flare-ui/.gitignore
@@ -0,0 +1,8 @@
+/target
+**/node_modules/
+*.zip
+.env
+
+*.env
+*.pem
+*.key
diff --git a/third-party/flare-ui/Cargo.lock b/third-party/flare-ui/Cargo.lock
new file mode 100644
index 0000000..2ef719e
--- /dev/null
+++ b/third-party/flare-ui/Cargo.lock
@@ -0,0 +1,942 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "adler2"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
+
+[[package]]
+name = "aead"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
+dependencies = [
+ "crypto-common",
+ "generic-array",
+]
+
+[[package]]
+name = "aes"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "aes-gcm"
+version = "0.10.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
+dependencies = [
+ "aead",
+ "aes",
+ "cipher",
+ "ctr",
+ "ghash",
+ "subtle",
+]
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
+[[package]]
+name = "anstyle"
+version = "1.0.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
+
+[[package]]
+name = "autocfg"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+
+[[package]]
+name = "base64"
+version = "0.22.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+
+[[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 = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
+
+[[package]]
+name = "chacha20"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
+dependencies = [
+ "cfg-if",
+ "cipher",
+ "cpufeatures",
+]
+
+[[package]]
+name = "chacha20poly1305"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
+dependencies = [
+ "aead",
+ "chacha20",
+ "cipher",
+ "poly1305",
+ "zeroize",
+]
+
+[[package]]
+name = "ciborium"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
+[[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+ "zeroize",
+]
+
+[[package]]
+name = "clap"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946"
+dependencies = [
+ "clap_builder",
+]
+
+[[package]]
+name = "clap_builder"
+version = "4.6.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d"
+dependencies = [
+ "anstyle",
+ "clap_lex",
+]
+
+[[package]]
+name = "clap_lex"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "criterion"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f"
+dependencies = [
+ "anes",
+ "cast",
+ "ciborium",
+ "clap",
+ "criterion-plot",
+ "is-terminal",
+ "itertools",
+ "num-traits",
+ "once_cell",
+ "oorandom",
+ "regex",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crunchy"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
+
+[[package]]
+name = "crypto-common"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
+dependencies = [
+ "generic-array",
+ "rand_core 0.6.4",
+ "typenum",
+]
+
+[[package]]
+name = "ctr"
+version = "0.9.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
+dependencies = [
+ "cipher",
+]
+
+[[package]]
+name = "curve25519-dalek"
+version = "4.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "fiat-crypto",
+ "rustc_version",
+ "subtle",
+]
+
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "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 = "ed25519-compact"
+version = "2.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1454db4f2edb7f0e8fe0c5b375b0c978fc63244cc9f010d160e417eb10139aa8"
+
+[[package]]
+name = "either"
+version = "1.19.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
+
+[[package]]
+name = "fiat-crypto"
+version = "0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
+
+[[package]]
+name = "flare-plugin-abi"
+version = "0.0.1"
+
+[[package]]
+name = "flare-ui"
+version = "0.0.1"
+dependencies = [
+ "criterion",
+ "maud",
+ "serde_json",
+ "wschema",
+]
+
+[[package]]
+name = "flate2"
+version = "1.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[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 = "ghash"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
+dependencies = [
+ "opaque-debug",
+ "polyval",
+]
+
+[[package]]
+name = "half"
+version = "2.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
+dependencies = [
+ "cfg-if",
+ "crunchy",
+ "zerocopy",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284"
+
+[[package]]
+name = "hkdf"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
+dependencies = [
+ "hmac",
+]
+
+[[package]]
+name = "hmac"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
+dependencies = [
+ "digest",
+]
+
+[[package]]
+name = "hpke"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f65d16b699dd1a1fa2d851c970b0c971b388eeeb40f744252b8de48860980c8f"
+dependencies = [
+ "aead",
+ "aes-gcm",
+ "chacha20poly1305",
+ "digest",
+ "generic-array",
+ "hkdf",
+ "hmac",
+ "rand_core 0.9.5",
+ "sha2",
+ "subtle",
+ "x25519-dalek",
+ "zeroize",
+]
+
+[[package]]
+name = "inout"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "is-terminal"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "windows-sys",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
+
+[[package]]
+name = "libc"
+version = "0.2.190"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
+
+[[package]]
+name = "maud"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8156733e27020ea5c684db5beac5d1d611e1272ab17901a49466294b84fc217e"
+dependencies = [
+ "itoa",
+ "maud_macros",
+]
+
+[[package]]
+name = "maud_macros"
+version = "0.27.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7261b00f3952f617899bc012e3dbd56e4f0110a038175929fa5d18e5a19913ca"
+dependencies = [
+ "proc-macro2",
+ "proc-macro2-diagnostics",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "miniz_oxide"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"
+dependencies = [
+ "adler2",
+ "simd-adler32",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "oorandom"
+version = "11.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e"
+
+[[package]]
+name = "opaque-debug"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
+
+[[package]]
+name = "poly1305"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
+dependencies = [
+ "cpufeatures",
+ "opaque-debug",
+ "universal-hash",
+]
+
+[[package]]
+name = "polyval"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "opaque-debug",
+ "universal-hash",
+]
+
+[[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 = "proc-macro2-diagnostics"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+ "version_check",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.6.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
+
+[[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 = "rustc_version"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
+dependencies = [
+ "semver",
+]
+
+[[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 = "semver"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
+
+[[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.9",
+]
+
+[[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 = "sha2"
+version = "0.10.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "simd-adler32"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"
+
+[[package]]
+name = "subtle"
+version = "2.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
+
+[[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.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "typenum"
+version = "1.20.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
+
+[[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.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
+dependencies = [
+ "crypto-common",
+ "subtle",
+]
+
+[[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 = "wapp-core"
+version = "0.0.1"
+dependencies = [
+ "ed25519-compact",
+ "flate2",
+ "sha2",
+]
+
+[[package]]
+name = "wapp-pack"
+version = "0.0.1"
+dependencies = [
+ "sha2",
+ "wapp-core",
+ "wschema",
+]
+
+[[package]]
+name = "warden-seal"
+version = "0.0.1"
+dependencies = [
+ "base64",
+ "hpke",
+ "serde",
+ "serde_json",
+ "sha2",
+ "zeroize",
+]
+
+[[package]]
+name = "warden-sync"
+version = "0.0.1"
+dependencies = [
+ "criterion",
+ "serde_json",
+ "sha2",
+]
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "winapi-util"
+version = "0.1.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[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 = "wschema"
+version = "0.0.1"
+dependencies = [
+ "criterion",
+ "serde",
+ "serde_json",
+ "sha2",
+]
+
+[[package]]
+name = "wschema-cli"
+version = "0.0.1"
+dependencies = [
+ "serde_json",
+ "wschema",
+]
+
+[[package]]
+name = "wschema-gen"
+version = "0.0.1"
+dependencies = [
+ "regex",
+ "serde_json",
+ "wschema",
+]
+
+[[package]]
+name = "x25519-dalek"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277"
+dependencies = [
+ "curve25519-dalek",
+ "rand_core 0.6.4",
+]
+
+[[package]]
+name = "zerocopy"
+version = "0.8.62"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "86502bf56ac7c77571a32e2647bb2a15894565e981fb2a48d7bde2d91c965a9d"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.62"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5457206954b06561e2608c7e19cf58b1926586d999c246eebe4502f7e2039d1a"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "zeroize"
+version = "1.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
+dependencies = [
+ "zeroize_derive",
+]
+
+[[package]]
+name = "zeroize_derive"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
+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/third-party/flare-ui/Cargo.toml b/third-party/flare-ui/Cargo.toml
new file mode 100644
index 0000000..26714c3
--- /dev/null
+++ b/third-party/flare-ui/Cargo.toml
@@ -0,0 +1,9 @@
+[workspace]
+resolver = "2"
+members = ["crates/*"]
+
+[workspace.package]
+version = "0.0.1"
+edition = "2021"
+rust-version = "1.85"
+license = "MIT"
diff --git a/third-party/flare-ui/LICENSE b/third-party/flare-ui/LICENSE
new file mode 100644
index 0000000..eebb944
--- /dev/null
+++ b/third-party/flare-ui/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 FLARE contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/third-party/flare-ui/OWNERS b/third-party/flare-ui/OWNERS
new file mode 100644
index 0000000..ac36717
--- /dev/null
+++ b/third-party/flare-ui/OWNERS
@@ -0,0 +1,12 @@
+# One line per crate: . Only the owning lane edits a crate;
+# other lanes ask it through a note. Only lane LD tags (see docs/vendoring.md).
+# scripts/check-owners.sh keeps this file and crates/ in step.
+crates/flare-ui LD
+crates/flare-plugin-abi LD
+crates/wschema LB
+crates/wschema-gen LB
+crates/wschema-cli LB
+crates/warden-sync LI
+crates/warden-seal LI
+crates/wapp-core LM
+crates/wapp-pack LM
diff --git a/third-party/flare-ui/README.md b/third-party/flare-ui/README.md
new file mode 100644
index 0000000..b81b5d6
--- /dev/null
+++ b/third-party/flare-ui/README.md
@@ -0,0 +1,70 @@
+# flare-ui
+
+Shared UI and schema crates for FLARE and the Warden console. They provide
+schema forms, navigation, charts, page assets, editors and package validation.
+
+- Licence: MIT.
+- Branches: `main` and `next`, like flare. Work branches from `next`.
+- Pinning: consumers vendor a tagged commit (`vN.N.N`) and record it in
+ `flare-ui.lock`. They never pin an untagged commit, and CI jobs hold no
+ cross-repo credential.
+- Layout: worktree per branch, `flare-ui/.bare` plus one folder per branch,
+ kept in step with Gitea by `scripts/sync-worktrees.sh` (outside the repo).
+- Toolchain: `rust-toolchain.toml` pins one exact version.
+- Dash editor: `dash-editor/` holds the imported `flare-dash-editor` tree and
+ its history (lane LD owns it). Its tests: `cd dash-editor && node --test tests/*.test.mjs`.
+- Flow builder: `flow-builder/` holds the automation flowchart (model, form,
+ view). Its tests: `cd flow-builder && node --test tests/*.test.mjs`.
+- Validation corpus: `corpus/` (lane LB), described in `corpus/README.md`.
+- Crates and owners: see `OWNERS`. Vendoring and tags: `docs/vendoring.md`.
+
+## Crates
+
+| Crate | Role |
+|---|---|
+| `flare-ui` | Schema forms, navigation, chart islands, page assets and editor assets |
+| `wschema` | Schema document model, builder DSL, canonical JSON, hashes, lint L01 to L23 |
+| `wschema-cli` | `canon`, `hash`, `lint` and corpus `validate` for fragment authors and CI; `verify-lock` and `gen-lock` for consumer locks (`flare-ui.lock`, `gen.lock`) |
+| `wschema-gen` | Generators: the OpenAPI `components.schemas` of an effective schema and their splice into a template |
+| `warden-sync` | Sync stamps, HLC, windows, digest and planner (d03), and the wire and value limits both ends share, with golden limit vectors (`tests/vectors/limits-vectors.jsonl`) each end replays |
+| `warden-seal` | Per-Warden sealing (HPKE Auth): suite, `info` and `aad` builders, padding, kid, shared vectors |
+| `wapp-core` | App package format, manifests, platform checks and validation |
+| `wapp-pack` | Package creation, verification, signing, index and release guard CLI |
+| `flare-plugin-abi` | Reserved plugin ABI placeholder |
+
+`wschema` depends on `serde`, `serde_json` and `sha2` only, and builds for
+x86_64 and `armv7-unknown-linux-musleabihf`.
+
+## Checks
+
+```
+cargo fmt --check
+cargo clippy --workspace --all-targets -- -D warnings
+cargo test --workspace
+scripts/check-owners.sh
+scripts/vendor-selftest.sh
+```
+
+The [chart browser checks](crates/flare-ui/tests/browser/README.md) run on
+Chromium and Firefox over plain HTTP, with CSP and real SSE samples.
+The [live client](docs/live.md) documents typed chart props, server tier
+links, accessible latest values and named series events.
+
+The shared crates also build for the panel:
+
+```
+cargo build --locked --target armv7-unknown-linux-musleabihf \
+ -p wschema -p warden-sync -p warden-seal -p wapp-core
+```
+
+The OpenAPI emitter's sample output passes an OpenAPI 3.1 validator
+(`openapi-spec-validator`, not part of CI here; the consumer's CI runs it on
+the real document):
+
+```
+cargo run -q -p wschema-gen --example openapi_sample > sample.yaml
+openapi-spec-validator sample.yaml
+```
+
+Benchmarks for `wschema` (canonical JSON, hash, lint on a 140-setting
+document): `cargo bench -p wschema --bench canon_hash`.
diff --git a/third-party/flare-ui/corpus/README.md b/third-party/flare-ui/corpus/README.md
new file mode 100644
index 0000000..c38c18f
--- /dev/null
+++ b/third-party/flare-ui/corpus/README.md
@@ -0,0 +1,49 @@
+# Validation corpus
+
+Cases that every implementation of the settings schema must answer the same
+way: `wschema` (flared and the FLARE server) and anything that ports it. The
+format is d02 "Corpus"; the reference is the module doc of
+`crates/wschema/src/corpus.rs`.
+
+## Files
+
+| File | What it holds |
+|---|---|
+| `generic.jsonl` | One or more cases per validation stage and code: path, key, cap, scope, `write_via`, type, range, enum, length, check, the cross-field rules, permissions, resets |
+| `flare-ported.jsonl` | The leaf cases of FLARE's `flare-server/src/tests_wardencfg.rs`, each with a `note` naming its test |
+| `schema/warden-base.json` | The schema both files run against: the Warden base as flare-edge emits it (`data/schema/base.json`, commit f6bc5281) |
+
+A case's `schema` member names a base id (the base alone) or a fragment id
+(the base plus that fragment). Both files use `base`.
+
+## Differences from FLARE
+
+- An empty `system.hostname` is refused (V_LEN, d02 D25); FLARE stored it.
+- `network.interfaces.Eth0` is outside the path grammar (V_PATH), so the key
+ check never sees it; `0eth` is the key-check case (V_KEY).
+- A VPN field written alone carries the other VPN fields in `ctx.rows`, since
+ the `vpn` rules (all or none, allowed IPs once an address is set) now run.
+
+## Running
+
+```
+cargo test -p wschema --test corpus
+wschema-cli validate --schema corpus/schema/warden-base.json \
+ --corpus corpus/generic.jsonl --corpus corpus/flare-ported.jsonl
+```
+
+`validate_corpus` runs every `*.jsonl` here. It also fails when the generic
+file stops reaching a validation code the base can produce, and when any one
+flipped expectation goes unreported.
+
+## Editing
+
+Edit the JSON lines directly; one case per line, ASCII only. When flare-edge
+changes a row the cases touch, refresh `schema/warden-base.json` from its
+emitted `data/schema/base.json` and record the commit above. Each firmware
+also emits its own corpus from the `valid` and `invalid` vectors of its
+settings (`wschema::corpus::emit`). A setting that a cross-field rule
+refuses in the empty context declares a `vector_ctx` (DSL `vector_path`,
+`vector_row`): the concrete path and the stored rows its vectors run at.
+Each emitted case carries those rows in `ctx.rows`. Like the vectors, it is
+never emitted into the schema or hashed.
diff --git a/third-party/flare-ui/corpus/flare-ported.jsonl b/third-party/flare-ui/corpus/flare-ported.jsonl
new file mode 100644
index 0000000..cdfc8f5
--- /dev/null
+++ b/third-party/flare-ui/corpus/flare-ported.jsonl
@@ -0,0 +1,57 @@
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": "CA", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": "ca", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": "C", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": "CAN", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": "00", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": "C1", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": " CA", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "value": 12, "expect": {"code": "V_TYPE"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.regdomain", "value": "CA", "expect": {"code": "V_PATH"}, "note": "flare tests_wardencfg.rs wifi_country_is_two_uppercase_letters_or_unset"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "value": 101, "expect": {"code": "V_RANGE"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.sleep_minutes", "value": 2, "expect": {"code": "V_ENUM"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.theme", "value": "sepia", "expect": {"code": "V_ENUM"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "rs485.baud", "value": 9601, "expect": {"code": "V_ENUM"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "rs485.timeout_ms", "value": 60001, "expect": {"code": "V_RANGE"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.keepalive_seconds", "value": 65536, "expect": {"code": "V_RANGE"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.routing.lease", "value": "2h", "expect": {"code": "V_ENUM"}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.routing.lease", "value": "12h", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.sleep_minutes", "value": 0, "expect": {"ok": true}, "note": "flare tests_wardencfg.rs out_of_range_values_read_like_the_wardens_own_details"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.timezone", "value": "CET-1CEST,M3.5.0,M10.5.0/3", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs timezone_is_curated_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.timezone", "value": "Europe/Berlin", "expect": {"code": "V_ENUM"}, "note": "flare tests_wardencfg.rs timezone_is_curated_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "warden-07", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "", "expect": {"code": "V_LEN"}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty; d02 D25 refuses an empty hostname where FLARE stored it"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "-edge", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "edge-", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "no.dots", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.hostname", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs hostname_is_an_rfc1123_label_or_empty"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.address", "value": "10.0.0.1/24", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.address", "value": "10.0.0.1/31", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.address", "value": "", "expect": {"code": "V_LEN"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.routing.lan_address", "value": "300.1.1.1/24", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.address", "value": "10.99.0.2/33", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.vpn.peer_endpoint": "hub.example.test:51820", "network.vpn.peer_public_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "network.vpn.allowed_ips": "10.99.0.0/24"}}, "path": "network.vpn.address", "value": "10.99.0.2/32", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns; the other VPN fields set so the vpn rules hold"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.address", "value": "", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.vpn.address": "10.99.0.2/32", "network.vpn.peer_public_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "network.vpn.allowed_ips": "10.99.0.0/24"}}, "path": "network.vpn.peer_endpoint", "value": "[2001:db8::1]:51820", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns; the other VPN fields set so the vpn rules hold"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.vpn.address": "10.99.0.2/32", "network.vpn.peer_endpoint": "hub.example.test:51820", "network.vpn.allowed_ips": "10.99.0.0/24"}}, "path": "network.vpn.peer_public_key", "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns; the other VPN fields set so the vpn rules hold"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.peer_public_key", "value": "", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.proxy.pac", "value": "", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.proxy.http", "value": "proxy.example.test:3128", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.proxy.http", "value": "no-port", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.proxy.socks", "value": "spaced host:80", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.proxy.pac", "value": "http://wpad.example.test/wpad.dat", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.proxy.pac", "value": "ftp://x", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.peer_public_key", "value": "short=", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs addresses_and_endpoints_follow_the_yaml_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.allowed_ips", "value": "10.0.0.0/8, 192.168.0.0/16", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.allowed_ips", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expect": {"code": "V_LEN"}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "system.ntp.server", "value": "two\nlines", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.ssid", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.ssid", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.passphrase", "value": "1234567", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.passphrase", "value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expect": {"code": "V_LEN"}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.passphrase", "value": "snowman\u2603pass", "expect": {"code": "V_CHECK"}, "note": "flare tests_wardencfg.rs string_byte_caps_are_the_stores_own"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth0.zone", "value": "lan", "expect": {"ok": true}, "note": "flare tests_wardencfg.rs interface_names_and_app_ids_follow_their_key_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.Eth0.zone", "value": "lan", "expect": {"code": "V_PATH"}, "note": "flare tests_wardencfg.rs interface_names_and_app_ids_follow_their_key_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.0eth.zone", "value": "lan", "expect": {"code": "V_KEY"}, "note": "flare tests_wardencfg.rs interface_names_and_app_ids_follow_their_key_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth-0.zone", "value": "lan", "expect": {"code": "V_KEY"}, "note": "flare tests_wardencfg.rs interface_names_and_app_ids_follow_their_key_patterns"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.abcdefghijklmnop.zone", "value": "lan", "expect": {"code": "V_KEY"}, "note": "flare tests_wardencfg.rs interface_names_and_app_ids_follow_their_key_patterns"}
diff --git a/third-party/flare-ui/corpus/generic.jsonl b/third-party/flare-ui/corpus/generic.jsonl
new file mode 100644
index 0000000..e65362f
--- /dev/null
+++ b/third-party/flare-ui/corpus/generic.jsonl
@@ -0,0 +1,60 @@
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.regdomain", "value": "CA", "expect": {"code": "V_PATH"}, "note": "not a setting"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network..wifi", "value": "x", "expect": {"code": "V_PATH"}, "note": "malformed path"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness.extra", "value": 1, "expect": {"code": "V_PATH"}, "note": "a leaf has no children"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.country", "reset": true, "expect": {"ok": true}, "note": "a reset of a synced setting from FLARE"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "$meta.fp_key", "value": "k", "expect": {"ok": true}, "note": "meta path handled before the schema"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "$meta.unknown", "value": "k", "expect": {"code": "V_PATH"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.Eth0.zone", "value": "lan", "expect": {"code": "V_PATH"}, "note": "uppercase is outside the path grammar, so the key check never sees it"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.0eth.zone", "value": "lan", "expect": {"code": "V_KEY"}, "note": "ifname key check: starts with a letter"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "relays.8.safe_state", "value": "open", "expect": {"code": "V_KEY"}, "note": "index key above max 7"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "relays.7.safe_state", "value": "open", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.ipv4.method": "dhcp", "network.interfaces.eth1.ipv4.method": "dhcp", "network.interfaces.eth2.ipv4.method": "dhcp", "network.interfaces.eth3.ipv4.method": "dhcp", "network.interfaces.eth4.ipv4.method": "dhcp", "network.interfaces.eth5.ipv4.method": "dhcp", "network.interfaces.eth6.ipv4.method": "dhcp", "network.interfaces.eth7.ipv4.method": "dhcp", "network.interfaces.eth8.ipv4.method": "dhcp", "network.interfaces.eth9.ipv4.method": "dhcp", "network.interfaces.eth10.ipv4.method": "dhcp", "network.interfaces.eth11.ipv4.method": "dhcp", "network.interfaces.eth12.ipv4.method": "dhcp", "network.interfaces.eth13.ipv4.method": "dhcp", "network.interfaces.eth14.ipv4.method": "dhcp", "network.interfaces.eth15.ipv4.method": "dhcp"}}, "path": "network.interfaces.eth16.ipv4.method", "value": "dhcp", "expect": {"code": "V_CAP"}, "note": "17th entry of a 16-entry map"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.ipv4.method": "dhcp", "network.interfaces.eth1.ipv4.method": "dhcp", "network.interfaces.eth2.ipv4.method": "dhcp", "network.interfaces.eth3.ipv4.method": "dhcp", "network.interfaces.eth4.ipv4.method": "dhcp", "network.interfaces.eth5.ipv4.method": "dhcp", "network.interfaces.eth6.ipv4.method": "dhcp", "network.interfaces.eth7.ipv4.method": "dhcp", "network.interfaces.eth8.ipv4.method": "dhcp", "network.interfaces.eth9.ipv4.method": "dhcp", "network.interfaces.eth10.ipv4.method": "dhcp", "network.interfaces.eth11.ipv4.method": "dhcp", "network.interfaces.eth12.ipv4.method": "dhcp", "network.interfaces.eth13.ipv4.method": "dhcp", "network.interfaces.eth14.ipv4.method": "dhcp", "network.interfaces.eth15.ipv4.method": "dhcp"}}, "path": "network.interfaces.eth15.ipv4.method", "value": "dhcp", "expect": {"ok": true}, "note": "an existing entry never counts twice"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.ipv4.method": "dhcp", "network.interfaces.eth1.ipv4.method": "dhcp", "network.interfaces.eth2.ipv4.method": "dhcp", "network.interfaces.eth3.ipv4.method": "dhcp", "network.interfaces.eth4.ipv4.method": "dhcp", "network.interfaces.eth5.ipv4.method": "dhcp", "network.interfaces.eth6.ipv4.method": "dhcp", "network.interfaces.eth7.ipv4.method": "dhcp", "network.interfaces.eth8.ipv4.method": "dhcp", "network.interfaces.eth9.ipv4.method": "dhcp", "network.interfaces.eth10.ipv4.method": "dhcp", "network.interfaces.eth11.ipv4.method": "dhcp", "network.interfaces.eth12.ipv4.method": "dhcp", "network.interfaces.eth13.ipv4.method": "dhcp", "network.interfaces.eth14.ipv4.method": "dhcp", "network.interfaces.eth15.ipv4.method": "dhcp"}}, "path": "network.interfaces.eth16.ipv4.method", "reset": true, "expect": {"ok": true}, "note": "a reset never counts against the cap"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.debug_overlay", "value": true, "expect": {"code": "V_SCOPE"}, "note": "device_only from FLARE"}
+{"schema": "base", "origin": "panel", "ctx": {}, "path": "display.debug_overlay", "value": true, "expect": {"ok": true}}
+{"schema": "base", "origin": "panel", "ctx": {}, "path": "network.ap.local.password", "value": "secret12", "expect": {"code": "V_VIA"}, "note": "write_via: only the action writes it"}
+{"schema": "base", "origin": "system", "ctx": {}, "path": "network.ap.local.password", "value": "secret12", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "value": "50", "expect": {"code": "V_TYPE"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "value": null, "expect": {"code": "V_TYPE"}, "note": "null is not a value; reset is the op for that"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "value": 50.5, "expect": {"code": "V_TYPE"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "value": -1, "expect": {"code": "V_RANGE"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "value": 0, "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.theme", "value": "sepia", "expect": {"code": "V_ENUM"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.sleep_minutes", "value": 2, "expect": {"code": "V_ENUM"}, "note": "int_set"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "relays.lease_max_s", "value": 59, "expect": {"code": "V_RANGE"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "relays.lease_max_s", "value": 86400, "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth0.ipv4.dns", "value": ["1.1.1.1", "9.9.9.9"], "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth0.ipv4.dns", "value": ["1.1.1.1", "dns.example"], "expect": {"code": "V_CHECK"}, "note": "list item check"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth0.ipv4.dns", "value": ["1.1.1.1", "1.1.1.1", "1.1.1.1", "1.1.1.1", "1.1.1.1"], "expect": {"code": "V_LEN"}, "note": "max_items 4"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth0.ipv4.dns", "value": [1], "expect": {"code": "V_TYPE"}, "note": "list items are strings"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.scan_ranges", "value": ["10.0.0.0/8"], "expect": {"ok": true}, "note": "a CIDR counts once toward the expansion cap"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.scan_ranges", "value": ["10.0-255.0-1.1-255"], "expect": {"code": "V_CHECK"}, "note": "scan_expansion_cap: 512 /24 ranges"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.scan_ranges", "value": ["192.168.1.0/24"], "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.passphrase", "value": "short", "expect": {"code": "V_CHECK"}, "note": "secret kind with a check"}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.passphrase", "value": "12345678", "expect": {"ok": true}}
+{"schema": "base", "origin": "panel", "ctx": {}, "path": "display.debug_overlay", "value": "true", "expect": {"code": "V_TYPE"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "display.brightness", "reset": true, "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.wifi.nope", "reset": true, "expect": {"code": "V_PATH"}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.security", "value": "WPA2", "expect": {"code": "V_REQUIRES"}, "note": "PSK needs a passphrase"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.ap.passphrase": "12345678"}}, "path": "network.ap.security", "value": "WPA2", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.security", "value": "Open", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.interfaces.eth0.ipv4.method", "value": "manual", "expect": {"code": "V_REQUIRES"}}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.ipv4.address": "10.1.0.2/24"}}, "path": "network.interfaces.eth0.ipv4.method", "value": "manual", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.zone": "wan"}}, "path": "network.interfaces.eth1.zone", "value": "wan", "expect": {"code": "V_EXCLUSIVE"}}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.zone": "wan"}}, "path": "network.interfaces.eth1.zone", "value": "lan", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.interfaces.eth0.zone": "wan"}}, "path": "network.interfaces.eth0.zone", "value": "wan", "expect": {"ok": true}, "note": "rewriting the entry that holds the value"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.routing.lan_address": "192.168.50.1/24"}}, "path": "network.ap.address", "value": "192.168.50.1/24", "expect": {"code": "V_OVERLAP"}}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.routing.lan_address": "192.168.50.1/24"}}, "path": "network.ap.address", "value": "10.254.1.1/24", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.peer_endpoint", "value": "hub.example.test:51820", "expect": {"code": "V_ALL_OR_NONE"}, "note": "flare-ui#13: the other two hold their empty default"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.vpn.peer_endpoint": "hub.example.test:51820", "network.vpn.peer_public_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="}}, "path": "network.vpn.address", "value": "10.99.0.2/32", "expect": {"code": "V_REQUIRES"}, "note": "flare-ui#13: allowed_ips is empty"}
+{"schema": "base", "origin": "flare", "ctx": {"rows": {"network.vpn.peer_endpoint": "hub.example.test:51820", "network.vpn.peer_public_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=", "network.vpn.allowed_ips": "10.99.0.0/24"}}, "path": "network.vpn.address", "value": "10.99.0.2/32", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.vpn.address", "value": "", "expect": {"ok": true}, "note": "all three empty is the none state"}
+{"schema": "base", "origin": "flare", "ctx": {"usable_wifi_credentials": false, "rows": {"network.ap.local.enabled": false}}, "path": "network.ap.security", "value": "WPA2-Enterprise", "expect": {"code": "V_RULE"}, "note": "ap_enterprise_credentials"}
+{"schema": "base", "origin": "flare", "ctx": {"usable_wifi_credentials": false, "rows": {"network.ap.local.enabled": true}}, "path": "network.ap.security", "value": "WPA2-Enterprise", "expect": {"ok": true}}
+{"schema": "base", "origin": "flare", "ctx": {}, "path": "network.ap.security", "value": "WPA2-Enterprise", "expect": {"ok": true}, "note": "named rules without their context input are skipped"}
+{"schema": "base", "origin": "flare", "ctx": {"tls_state": "self_signed"}, "path": "network.ap.security", "value": "WPA2-Enterprise", "expect": {"code": "V_RULE"}, "note": "ap_enterprise_cert"}
+{"schema": "base", "origin": "flare", "ctx": {"tls_state": "public"}, "path": "network.ap.security", "value": "WPA2-Enterprise", "expect": {"ok": true}}
+{"schema": "base", "origin": "web", "ctx": {"perms": ["site.view"]}, "path": "display.brightness", "value": 50, "expect": {"code": "V_PERM"}}
+{"schema": "base", "origin": "web", "ctx": {"perms": ["site.manage"]}, "path": "display.brightness", "value": 50, "expect": {"ok": true}}
+{"schema": "base", "origin": "migration", "ctx": {"perms": []}, "path": "display.brightness", "value": 50, "expect": {"ok": true}, "note": "internal origins skip permissions"}
diff --git a/third-party/flare-ui/corpus/schema/warden-base.json b/third-party/flare-ui/corpus/schema/warden-base.json
new file mode 100644
index 0000000..705a571
--- /dev/null
+++ b/third-party/flare-ui/corpus/schema/warden-base.json
@@ -0,0 +1,5725 @@
+{
+ "actions": [
+ {
+ "confirm": "none",
+ "id": "acme-renew",
+ "idempotent": true,
+ "label": "Renew certificate",
+ "mode": "async",
+ "mutates": true,
+ "proof": "session",
+ "remote": true,
+ "risk": "low",
+ "surfaces": [
+ "web",
+ "flare"
+ ],
+ "timeout_s": 120,
+ "topic": "cmd/acme_renew"
+ },
+ {
+ "confirm": "arm",
+ "id": "ap-local-regenerate",
+ "idempotent": false,
+ "label": "Regenerate password",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "fresh",
+ "remote": false,
+ "risk": "high",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/ap_local_regenerate"
+ },
+ {
+ "confirm": "arm",
+ "id": "approval-decide",
+ "idempotent": false,
+ "label": "Decide approval",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "console",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "approval/req/decide"
+ },
+ {
+ "confirm": "arm",
+ "id": "bootslot",
+ "idempotent": false,
+ "label": "Switch boot slot",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "a",
+ "v": "a"
+ },
+ {
+ "label": "b",
+ "v": "b"
+ }
+ ]
+ },
+ "name": "slot"
+ }
+ ],
+ "proof": "session",
+ "remote": false,
+ "risk": "high",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/bootslot"
+ },
+ {
+ "confirm": "arm",
+ "id": "clock-reset-anchor",
+ "idempotent": false,
+ "label": "Reset clock anchor",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "session",
+ "remote": true,
+ "risk": "medium",
+ "surfaces": [
+ "panel",
+ "flare"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/clock_reset_anchor"
+ },
+ {
+ "confirm": "none",
+ "id": "enroll",
+ "idempotent": false,
+ "label": "Pair with FLARE",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "session",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 30,
+ "topic": "flared/req/pair"
+ },
+ {
+ "confirm": "typed:RESET",
+ "id": "factory-reset",
+ "idempotent": false,
+ "label": "Factory reset",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "fresh",
+ "remote": false,
+ "risk": "high",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 30,
+ "topic": "flared/req/factory_reset"
+ },
+ {
+ "confirm": "arm",
+ "id": "failsafe-ack",
+ "idempotent": false,
+ "label": "Acknowledge failsafe",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "hi": 65535,
+ "lo": 0,
+ "t": "int"
+ },
+ "name": "trips"
+ }
+ ],
+ "proof": "fresh",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 5,
+ "topic": "io/req/failsafe_ack"
+ },
+ {
+ "confirm": "arm",
+ "id": "fw-install",
+ "idempotent": false,
+ "label": "Install firmware",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "sha256"
+ },
+ {
+ "kind": {
+ "t": "bool"
+ },
+ "name": "ack_data_loss"
+ }
+ ],
+ "perm": "site.manage",
+ "proof": "fresh",
+ "remote": true,
+ "risk": "high",
+ "surfaces": [
+ "panel",
+ "web",
+ "flare"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/fw_install"
+ },
+ {
+ "confirm": "none",
+ "id": "issue-token",
+ "idempotent": false,
+ "label": "Issue API token",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "fresh",
+ "remote": false,
+ "risk": "high",
+ "surfaces": [
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/issue_token"
+ },
+ {
+ "confirm": "arm",
+ "id": "legacy-cleanup",
+ "idempotent": true,
+ "label": "Remove legacy settings",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "none",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "panel"
+ ],
+ "timeout_s": 30,
+ "topic": "flared/req/legacy_cleanup"
+ },
+ {
+ "confirm": "arm",
+ "id": "meter-reset",
+ "idempotent": false,
+ "label": "Reset data meter",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "session",
+ "remote": true,
+ "risk": "medium",
+ "surfaces": [
+ "panel",
+ "flare"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/meter_reset"
+ },
+ {
+ "confirm": "none",
+ "id": "meter-seed",
+ "idempotent": true,
+ "label": "Seed data meter",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "none",
+ "remote": true,
+ "risk": "low",
+ "surfaces": [],
+ "timeout_s": 10,
+ "topic": "cmd/meter_seed"
+ },
+ {
+ "confirm": "none",
+ "id": "profile-install",
+ "idempotent": false,
+ "label": "Install RS485 profile",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "content_b64"
+ },
+ {
+ "kind": {
+ "t": "bool"
+ },
+ "name": "replace"
+ }
+ ],
+ "proof": "fresh",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/profile_install"
+ },
+ {
+ "confirm": "none",
+ "id": "profile-remove",
+ "idempotent": false,
+ "label": "Remove RS485 profile",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "slug"
+ }
+ ],
+ "proof": "fresh",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/profile_remove"
+ },
+ {
+ "confirm": "arm",
+ "id": "reboot",
+ "idempotent": false,
+ "label": "Reboot",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "session",
+ "remote": true,
+ "risk": "medium",
+ "surfaces": [
+ "panel",
+ "web",
+ "flare"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/reboot"
+ },
+ {
+ "confirm": "none",
+ "id": "relay",
+ "idempotent": false,
+ "label": "Switch relay",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "hi": 7,
+ "lo": 0,
+ "t": "int"
+ },
+ "name": "n"
+ },
+ {
+ "kind": {
+ "t": "bool"
+ },
+ "name": "on"
+ }
+ ],
+ "proof": "session",
+ "remote": false,
+ "risk": "medium",
+ "surfaces": [
+ "panel"
+ ],
+ "timeout_s": 10,
+ "topic": "io/req/relay_set/panel"
+ },
+ {
+ "confirm": "arm",
+ "id": "relay-test",
+ "idempotent": false,
+ "label": "Test relay",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "hi": 7,
+ "lo": 0,
+ "t": "int"
+ },
+ "name": "n"
+ },
+ {
+ "kind": {
+ "t": "bool"
+ },
+ "name": "on"
+ }
+ ],
+ "proof": "session",
+ "remote": true,
+ "risk": "high",
+ "surfaces": [
+ "flare"
+ ],
+ "timeout_s": 10,
+ "topic": "io/req/relay_set/remote"
+ },
+ {
+ "confirm": "none",
+ "id": "root-password",
+ "idempotent": false,
+ "label": "Set root password",
+ "mode": "sync",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "password"
+ }
+ ],
+ "proof": "fresh",
+ "remote": false,
+ "risk": "high",
+ "surfaces": [
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/root_password"
+ },
+ {
+ "confirm": "none",
+ "id": "rs485-discover",
+ "idempotent": false,
+ "label": "Discover RS485 devices",
+ "mode": "async",
+ "mutates": true,
+ "params": [
+ {
+ "kind": {
+ "hi": 247,
+ "lo": 1,
+ "t": "int"
+ },
+ "name": "lo"
+ },
+ {
+ "kind": {
+ "hi": 247,
+ "lo": 1,
+ "t": "int"
+ },
+ "name": "hi"
+ }
+ ],
+ "proof": "session",
+ "remote": true,
+ "risk": "low",
+ "surfaces": [
+ "panel",
+ "web",
+ "flare"
+ ],
+ "timeout_s": 120,
+ "topic": "modbus/req/discover"
+ },
+ {
+ "confirm": "none",
+ "id": "rs485-discover-cancel",
+ "idempotent": true,
+ "label": "Cancel discovery",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "session",
+ "remote": true,
+ "risk": "low",
+ "surfaces": [
+ "panel",
+ "web",
+ "flare"
+ ],
+ "timeout_s": 5,
+ "topic": "modbus/req/discover_cancel"
+ },
+ {
+ "confirm": "none",
+ "id": "rs485-profile",
+ "idempotent": true,
+ "label": "Show RS485 profile",
+ "mode": "sync",
+ "mutates": false,
+ "params": [
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "source"
+ },
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "slug"
+ }
+ ],
+ "proof": "none",
+ "remote": false,
+ "risk": "low",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 5,
+ "topic": "flared/req/profile_get"
+ },
+ {
+ "confirm": "none",
+ "id": "rs485-profiles",
+ "idempotent": true,
+ "label": "List RS485 profiles",
+ "mode": "sync",
+ "mutates": false,
+ "params": [
+ {
+ "kind": {
+ "hi": 65535,
+ "lo": 0,
+ "t": "int"
+ },
+ "name": "offset"
+ },
+ {
+ "kind": {
+ "t": "str"
+ },
+ "name": "query"
+ }
+ ],
+ "proof": "none",
+ "remote": false,
+ "risk": "low",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 5,
+ "topic": "flared/req/profile_list"
+ },
+ {
+ "confirm": "none",
+ "id": "rs485-rescan",
+ "idempotent": true,
+ "label": "Rescan RS485 bus",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "session",
+ "remote": false,
+ "risk": "low",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 5,
+ "topic": "modbus/req/rescan"
+ },
+ {
+ "confirm": "arm",
+ "id": "unpair",
+ "idempotent": false,
+ "label": "Unpair from FLARE",
+ "mode": "sync",
+ "mutates": true,
+ "proof": "fresh",
+ "remote": false,
+ "risk": "high",
+ "surfaces": [
+ "panel",
+ "web"
+ ],
+ "timeout_s": 10,
+ "topic": "flared/req/unpair"
+ }
+ ],
+ "format": 1,
+ "groups": [
+ {
+ "id": "ap",
+ "label": "Access point"
+ },
+ {
+ "id": "iface",
+ "label": "Network interface"
+ },
+ {
+ "app": "mining",
+ "id": "ingress",
+ "label": "Mining ingress"
+ },
+ {
+ "app": "mining",
+ "id": "pool",
+ "label": "Mining pool"
+ },
+ {
+ "id": "proxy",
+ "label": "Proxy"
+ },
+ {
+ "app": "mikrotik",
+ "id": "router",
+ "label": "MikroTik router"
+ },
+ {
+ "id": "routing",
+ "label": "Routing"
+ },
+ {
+ "id": "rs485_port",
+ "label": "RS485 port"
+ },
+ {
+ "id": "vlans",
+ "label": "VLANs"
+ },
+ {
+ "id": "vpn",
+ "label": "VPN"
+ },
+ {
+ "id": "wifi_net",
+ "label": "Saved Wi-Fi network"
+ }
+ ],
+ "id": "base",
+ "kind": "base",
+ "legacy_keys": [
+ "mining.pool.manage",
+ "mining.pool.read"
+ ],
+ "maps": [
+ {
+ "key": {
+ "check": {
+ "max": 3,
+ "name": "index"
+ }
+ },
+ "max_entries": 4,
+ "path": "display.rings.*"
+ },
+ {
+ "group": "iface",
+ "key": {
+ "check": "ifname"
+ },
+ "max_entries": 16,
+ "path": "network.interfaces.*"
+ },
+ {
+ "group": "vlans",
+ "key": {
+ "check": "vid"
+ },
+ "max_entries": 32,
+ "path": "network.vlans.*"
+ },
+ {
+ "group": "wifi_net",
+ "key": {
+ "check": "hash_id"
+ },
+ "max_entries": 32,
+ "path": "network.wifi.networks.*"
+ },
+ {
+ "key": {
+ "check": {
+ "max": 7,
+ "name": "index"
+ }
+ },
+ "max_entries": 8,
+ "path": "relays.*"
+ },
+ {
+ "key": {
+ "check": "app_id"
+ },
+ "max_entries": 32,
+ "path": "sys.apps.*"
+ }
+ ],
+ "menus": [
+ {
+ "band": 0,
+ "icon": "dashboard",
+ "id": "dashboard",
+ "order": 10,
+ "slug": "dashboard",
+ "title": "Dashboard"
+ },
+ {
+ "id": "dashboard/metrics",
+ "order": 20,
+ "slug": "metrics",
+ "title": "Metrics"
+ },
+ {
+ "id": "dashboard/overview",
+ "order": 10,
+ "slug": "overview",
+ "title": "Dashboard"
+ },
+ {
+ "id": "dashboard/settings",
+ "order": 30,
+ "page": "dashboard.settings",
+ "slug": "settings",
+ "title": "Settings"
+ },
+ {
+ "band": 1,
+ "icon": "network",
+ "id": "network",
+ "order": 10,
+ "slug": "network",
+ "title": "Network"
+ },
+ {
+ "id": "network/devices",
+ "order": 20,
+ "slug": "devices",
+ "title": "Devices"
+ },
+ {
+ "id": "network/logs",
+ "order": 40,
+ "slug": "logs",
+ "title": "Logs"
+ },
+ {
+ "id": "network/overview",
+ "order": 10,
+ "slug": "overview",
+ "title": "Overview"
+ },
+ {
+ "id": "network/settings",
+ "order": 50,
+ "page": "network.settings",
+ "slug": "settings",
+ "title": "Settings"
+ },
+ {
+ "id": "network/traffic",
+ "order": 30,
+ "slug": "traffic",
+ "title": "Traffic"
+ },
+ {
+ "band": 1,
+ "icon": "relay",
+ "id": "relays",
+ "order": 30,
+ "slug": "relays",
+ "title": "Relays"
+ },
+ {
+ "id": "relays/metrics",
+ "order": 20,
+ "slug": "metrics",
+ "title": "Metrics"
+ },
+ {
+ "id": "relays/overview",
+ "order": 10,
+ "page": "relays.overview",
+ "slug": "overview",
+ "title": "Overview"
+ },
+ {
+ "band": 1,
+ "icon": "rs485",
+ "id": "rs485",
+ "order": 20,
+ "slug": "rs485",
+ "title": "RS485"
+ },
+ {
+ "id": "rs485/devices",
+ "order": 20,
+ "slug": "devices",
+ "title": "Devices"
+ },
+ {
+ "id": "rs485/logs",
+ "order": 40,
+ "slug": "logs",
+ "title": "Logs"
+ },
+ {
+ "id": "rs485/overview",
+ "order": 10,
+ "slug": "overview",
+ "title": "Overview"
+ },
+ {
+ "id": "rs485/profiles",
+ "order": 30,
+ "slug": "profiles",
+ "title": "Profiles"
+ },
+ {
+ "id": "rs485/settings",
+ "order": 50,
+ "page": "rs485.settings",
+ "slug": "settings",
+ "title": "Settings"
+ },
+ {
+ "band": 3,
+ "icon": "settings",
+ "id": "settings",
+ "order": 10,
+ "slug": "settings",
+ "title": "Settings"
+ },
+ {
+ "id": "settings/approvals",
+ "order": 120,
+ "slug": "approvals",
+ "title": "Approvals"
+ },
+ {
+ "id": "settings/apps",
+ "order": 30,
+ "page": "settings.apps",
+ "slug": "apps",
+ "title": "Apps"
+ },
+ {
+ "id": "settings/data",
+ "order": 130,
+ "page": "settings.data",
+ "slug": "data",
+ "title": "Data"
+ },
+ {
+ "id": "settings/display",
+ "order": 20,
+ "page": "settings.display",
+ "slug": "display",
+ "title": "Display"
+ },
+ {
+ "id": "settings/drivers",
+ "order": 50,
+ "slug": "drivers",
+ "title": "Drivers"
+ },
+ {
+ "id": "settings/files",
+ "order": 100,
+ "slug": "files",
+ "title": "Files"
+ },
+ {
+ "id": "settings/flare",
+ "order": 40,
+ "page": "settings.flare",
+ "slug": "flare",
+ "title": "FLARE"
+ },
+ {
+ "id": "settings/logs",
+ "order": 90,
+ "slug": "logs",
+ "title": "Logs"
+ },
+ {
+ "id": "settings/monitor",
+ "order": 80,
+ "slug": "monitor",
+ "title": "Monitor"
+ },
+ {
+ "id": "settings/security",
+ "order": 60,
+ "page": "settings.security",
+ "slug": "security",
+ "title": "Security"
+ },
+ {
+ "id": "settings/services",
+ "order": 70,
+ "slug": "services",
+ "title": "Services"
+ },
+ {
+ "id": "settings/system",
+ "order": 10,
+ "page": "settings.system",
+ "slug": "system",
+ "title": "System"
+ },
+ {
+ "id": "settings/terminal",
+ "order": 110,
+ "slug": "terminal",
+ "title": "Terminal"
+ }
+ ],
+ "pages": [
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "display.rings",
+ "title": "Rings"
+ }
+ ],
+ "id": "dashboard.settings"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "network",
+ "title": "Role"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "network.interfaces",
+ "title": "Interfaces"
+ },
+ {
+ "kind": "card",
+ "order": 30,
+ "section": "network.wifi",
+ "title": "Wi-Fi"
+ },
+ {
+ "kind": "card",
+ "order": 40,
+ "section": "network.wifi.networks",
+ "title": "Saved networks"
+ },
+ {
+ "kind": "card",
+ "order": 50,
+ "section": "network.ap",
+ "title": "Access point"
+ },
+ {
+ "kind": "card",
+ "order": 60,
+ "section": "network.ap.local",
+ "title": "Local Wi-Fi account"
+ },
+ {
+ "kind": "card",
+ "order": 70,
+ "section": "network.routing",
+ "title": "Routing",
+ "visible_when": {
+ "eq": [
+ "network.role",
+ "router"
+ ]
+ }
+ },
+ {
+ "kind": "card",
+ "order": 80,
+ "section": "network.vlans",
+ "title": "VLANs",
+ "visible_when": {
+ "eq": [
+ "network.role",
+ "router"
+ ]
+ }
+ },
+ {
+ "kind": "card",
+ "order": 90,
+ "section": "network.vpn",
+ "title": "VPN"
+ },
+ {
+ "kind": "card",
+ "order": 100,
+ "section": "network.proxy",
+ "title": "Proxy"
+ },
+ {
+ "kind": "card",
+ "order": 110,
+ "section": "network.scan",
+ "title": "Discovery"
+ },
+ {
+ "kind": "card",
+ "order": 120,
+ "section": "network.conntrack",
+ "title": "Firewall"
+ }
+ ],
+ "id": "network.settings"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "relays.safety",
+ "title": "Relays"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "relays.limits",
+ "title": "Limits"
+ },
+ {
+ "kind": "card",
+ "order": 30,
+ "section": "io.failsafe",
+ "title": "Fail-safe"
+ }
+ ],
+ "id": "relays.overview"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "rs485.port",
+ "title": "Port"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "rs485.role",
+ "title": "Bus"
+ }
+ ],
+ "id": "rs485.settings"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "sys.apps.policy",
+ "title": "App policy"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "sys.kpi",
+ "title": "KPIs"
+ }
+ ],
+ "id": "settings.apps"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "meter",
+ "title": "Data meter"
+ }
+ ],
+ "id": "settings.data"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "display",
+ "title": "Display"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "display.units",
+ "title": "Units"
+ }
+ ],
+ "id": "settings.display"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "link.mqtt",
+ "title": "FLARE link"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "link.tcp",
+ "title": "TCP keepalive"
+ },
+ {
+ "kind": "card",
+ "order": 30,
+ "section": "telemetry.buffer",
+ "title": "Telemetry buffer"
+ },
+ {
+ "kind": "card",
+ "order": 40,
+ "section": "telemetry.interval_s",
+ "title": "Telemetry intervals"
+ },
+ {
+ "kind": "card",
+ "order": 50,
+ "section": "sync",
+ "title": "Sync"
+ },
+ {
+ "kind": "card",
+ "order": 60,
+ "section": "clock",
+ "title": "Clock trust"
+ },
+ {
+ "kind": "card",
+ "order": 70,
+ "section": "guard",
+ "title": "Guarded changes"
+ },
+ {
+ "kind": "card",
+ "order": 80,
+ "section": "undo",
+ "title": "Undo"
+ }
+ ],
+ "id": "settings.flare"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "security",
+ "title": "Limits"
+ }
+ ],
+ "id": "settings.security"
+ },
+ {
+ "blocks": [
+ {
+ "kind": "card",
+ "order": 10,
+ "section": "system",
+ "title": "System"
+ },
+ {
+ "kind": "card",
+ "order": 20,
+ "section": "system.ntp",
+ "title": "Time"
+ },
+ {
+ "kind": "card",
+ "order": 30,
+ "section": "system.updates",
+ "title": "Updates"
+ },
+ {
+ "kind": "card",
+ "order": 40,
+ "section": "system.artifacts",
+ "title": "Downloads"
+ }
+ ],
+ "id": "settings.system"
+ }
+ ],
+ "requires": {
+ "checks_api": 1,
+ "display_api": 1
+ },
+ "rules": [
+ {
+ "id": "ap.passphrase",
+ "msg": "network.ap.passphrase is required for the PSK security values",
+ "need": [
+ "network.ap.passphrase"
+ ],
+ "rule": "requires",
+ "when": {
+ "in": [
+ "network.ap.security",
+ [
+ "WPA2",
+ "WPA3",
+ "WPA2/WPA3 mixed",
+ "WPA2 + WPA2-Enterprise"
+ ]
+ ]
+ }
+ },
+ {
+ "id": "iface.ipv4",
+ "msg": "a manual IPv4 method needs an address",
+ "need": [
+ "network.interfaces.*.ipv4.address"
+ ],
+ "rule": "requires",
+ "when": {
+ "eq": [
+ "network.interfaces.*.ipv4.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "id": "iface.ipv6",
+ "msg": "a manual IPv6 method needs an address",
+ "need": [
+ "network.interfaces.*.ipv6.address"
+ ],
+ "rule": "requires",
+ "when": {
+ "eq": [
+ "network.interfaces.*.ipv6.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "id": "subnets",
+ "msg": "the LAN, access point and VLAN subnets must not overlap",
+ "paths": [
+ "network.routing.lan_address",
+ "network.ap.address",
+ "network.vlans.*.cidr"
+ ],
+ "rule": "no_overlap"
+ },
+ {
+ "id": "vpn.allowed_ips",
+ "msg": "network.vpn.allowed_ips is required once the VPN address is set",
+ "need": [
+ "network.vpn.allowed_ips"
+ ],
+ "rule": "requires",
+ "when": {
+ "set": "network.vpn.address"
+ }
+ },
+ {
+ "id": "vpn.peer",
+ "msg": "the VPN address, peer endpoint and peer public key are set together",
+ "paths": [
+ "network.vpn.address",
+ "network.vpn.peer_endpoint",
+ "network.vpn.peer_public_key"
+ ],
+ "rule": "all_or_none"
+ },
+ {
+ "id": "zones",
+ "msg": "each zone is on one interface",
+ "path": "network.interfaces.*.zone",
+ "rule": "exclusive",
+ "values": [
+ "wan",
+ "lan"
+ ]
+ },
+ {
+ "name": "ap_enterprise_cert",
+ "rule": "named"
+ },
+ {
+ "name": "ap_enterprise_credentials",
+ "rule": "named"
+ }
+ ],
+ "settings": [
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 2000
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "A clock jump larger than this, ms, makes the clock suspect.",
+ "kind": {
+ "hi": 60000,
+ "lo": 500,
+ "t": "int",
+ "units": "ms"
+ },
+ "label": "Suspect clock step",
+ "order": 20,
+ "owner": "synced",
+ "path": "clock.suspect_step_ms",
+ "section": "clock"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 604800
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds a trusted clock stays trusted with no new sample.",
+ "kind": {
+ "hi": 2592000,
+ "lo": 3600,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Clock trust age",
+ "order": 10,
+ "owner": "synced",
+ "path": "clock.trust_max_age_s",
+ "section": "clock"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 200
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Clock drift allowed for in time windows, parts per million.",
+ "kind": {
+ "hi": 1000,
+ "lo": 50,
+ "t": "int",
+ "units": "ppm"
+ },
+ "label": "Window drift",
+ "order": 40,
+ "owner": "synced",
+ "path": "clock.window_ppm",
+ "section": "clock"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 5
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Fixed seconds added to every time window.",
+ "kind": {
+ "hi": 60,
+ "lo": 1,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Window slack",
+ "order": 30,
+ "owner": "synced",
+ "path": "clock.window_slack_fixed_s",
+ "section": "clock"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": 100
+ },
+ "display": {
+ "commit": "release",
+ "t": "slider"
+ },
+ "guarded": false,
+ "help": "Backlight level, saved when the slider is released.",
+ "kind": {
+ "hi": 100,
+ "lo": 0,
+ "t": "int",
+ "units": "%"
+ },
+ "label": "Brightness",
+ "order": 20,
+ "owner": "synced",
+ "path": "display.brightness",
+ "section": "display"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": false
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "Draws frame timing over the panel UI.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Debug overlay",
+ "order": 40,
+ "owner": "device_only",
+ "path": "display.debug_overlay",
+ "section": "display"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "sky"
+ },
+ "display": {
+ "t": "swatch"
+ },
+ "guarded": false,
+ "help": "Color of this Dashboard ring.",
+ "kind": {
+ "t": "enum",
+ "vocab": "color_token"
+ },
+ "label": "Ring color",
+ "order": 20,
+ "owner": "synced",
+ "path": "display.rings.*.color",
+ "section": "display.rings"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "Whether this Dashboard ring is drawn.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Ring shown",
+ "order": 10,
+ "owner": "synced",
+ "path": "display.rings.*.on",
+ "section": "display.rings"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "none"
+ },
+ "display": {
+ "t": "text"
+ },
+ "guarded": false,
+ "help": "none hides the ring; app: shows that purpose app's KPI against its target.",
+ "kind": {
+ "check": "ring_source",
+ "t": "str"
+ },
+ "label": "Ring source",
+ "order": 30,
+ "owner": "synced",
+ "path": "display.rings.*.source",
+ "section": "display.rings"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": 1
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "guarded": false,
+ "help": "Minutes of inactivity before the panel sleeps; 0 never sleeps.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "v": 0
+ },
+ {
+ "v": 1
+ },
+ {
+ "v": 5
+ },
+ {
+ "v": 10
+ },
+ {
+ "v": 15
+ },
+ {
+ "v": 30
+ },
+ {
+ "v": 60
+ },
+ {
+ "v": 120
+ },
+ {
+ "v": 180
+ }
+ ]
+ },
+ "label": "Sleep after",
+ "order": 30,
+ "owner": "synced",
+ "path": "display.sleep_minutes",
+ "section": "display"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "dark"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Panel color scheme; the UI rebuilds itself on change.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Dark",
+ "v": "dark"
+ },
+ {
+ "label": "Light",
+ "v": "light"
+ }
+ ]
+ },
+ "label": "Theme",
+ "order": 10,
+ "owner": "synced",
+ "path": "display.theme",
+ "section": "display"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "si"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Decimal (kB, MB, GB)",
+ "v": "si"
+ },
+ {
+ "label": "Binary (KiB, MiB, GiB)",
+ "v": "iec"
+ }
+ ]
+ },
+ "label": "Data size prefixes",
+ "order": 70,
+ "owner": "synced",
+ "path": "display.units.data",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "kWh"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Wh",
+ "v": "Wh"
+ },
+ {
+ "label": "kWh",
+ "v": "kWh"
+ },
+ {
+ "label": "MWh",
+ "v": "MWh"
+ }
+ ]
+ },
+ "label": "Energy unit",
+ "order": 40,
+ "owner": "synced",
+ "path": "display.units.energy",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "kW"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "W",
+ "v": "W"
+ },
+ {
+ "label": "kW",
+ "v": "kW"
+ },
+ {
+ "label": "MW",
+ "v": "MW"
+ }
+ ]
+ },
+ "label": "Power unit",
+ "order": 30,
+ "owner": "synced",
+ "path": "display.units.power",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "kPa"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "kPa",
+ "v": "kPa"
+ },
+ {
+ "label": "MPa",
+ "v": "MPa"
+ },
+ {
+ "label": "bar",
+ "v": "bar"
+ },
+ {
+ "label": "psi",
+ "v": "psi"
+ }
+ ]
+ },
+ "label": "Pressure unit",
+ "order": 10,
+ "owner": "synced",
+ "path": "display.units.pressure",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "degC"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "deg C",
+ "v": "degC"
+ },
+ {
+ "label": "deg F",
+ "v": "degF"
+ },
+ {
+ "label": "K",
+ "v": "K"
+ }
+ ]
+ },
+ "label": "Temperature unit",
+ "order": 20,
+ "owner": "synced",
+ "path": "display.units.temperature",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "m3"
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "m3",
+ "v": "m3"
+ },
+ {
+ "label": "e3m3",
+ "v": "e3m3"
+ },
+ {
+ "label": "L",
+ "v": "L"
+ },
+ {
+ "label": "bbl",
+ "v": "bbl"
+ },
+ {
+ "label": "US gal",
+ "v": "USgal"
+ }
+ ]
+ },
+ "label": "Volume unit",
+ "order": 60,
+ "owner": "synced",
+ "path": "display.units.volume",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:ui"
+ },
+ "consumers": [
+ "ui"
+ ],
+ "default": {
+ "value": "m3/h"
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "guarded": false,
+ "help": "Site display unit. Stored numbers stay in the canonical unit.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "m3/h",
+ "v": "m3/h"
+ },
+ {
+ "label": "m3/d",
+ "v": "m3/d"
+ },
+ {
+ "label": "e3m3/d",
+ "v": "e3m3/d"
+ },
+ {
+ "label": "L/min",
+ "v": "L/min"
+ },
+ {
+ "label": "L/s",
+ "v": "L/s"
+ },
+ {
+ "label": "bbl/d",
+ "v": "bbl/d"
+ },
+ {
+ "label": "US gpm",
+ "v": "USgpm"
+ }
+ ]
+ },
+ "label": "Flow unit",
+ "order": 50,
+ "owner": "synced",
+ "path": "display.units.volume_flow",
+ "section": "display.units"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 600
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Default seconds a guarded FLARE change has to be confirmed.",
+ "kind": {
+ "hi": 86400,
+ "lo": 180,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Revert window",
+ "order": 10,
+ "owner": "synced",
+ "path": "guard.confirm_within_s",
+ "section": "guard"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 10
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds a guarded change runs before it can be confirmed.",
+ "kind": {
+ "hi": 60,
+ "lo": 5,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Minimum soak",
+ "order": 20,
+ "owner": "synced",
+ "path": "guard.min_soak_s",
+ "section": "guard"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 15
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds allowed for services to settle after a guarded change.",
+ "kind": {
+ "hi": 60,
+ "lo": 5,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Settle time",
+ "order": 30,
+ "owner": "synced",
+ "path": "guard.settle_s",
+ "section": "guard"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "The HPMCU puts managed relays in their safe state when the heartbeat stops.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Relay fail-safe",
+ "order": 10,
+ "owner": "device_only",
+ "path": "io.failsafe.enabled",
+ "safety": true,
+ "section": "io.failsafe"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": 30
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds without a heartbeat before a managed relay fails safe.",
+ "kind": {
+ "hi": 250,
+ "lo": 5,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Heartbeat deadline",
+ "order": 20,
+ "owner": "device_only",
+ "path": "io.failsafe.relay_deadline_s",
+ "safety": true,
+ "section": "io.failsafe"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "The HPMCU watches the SoC and resets it when it stalls.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "HPMCU supervisor",
+ "order": 30,
+ "owner": "device_only",
+ "path": "io.hpmcu.supervisor",
+ "safety": true,
+ "section": "io.failsafe"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": "w0"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "W0 keeps today's watchdog outcomes; W1 also resets when flared stops reporting.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "W0",
+ "v": "w0"
+ },
+ {
+ "label": "W1",
+ "v": "w1"
+ }
+ ]
+ },
+ "label": "Watchdog stage",
+ "order": 40,
+ "owner": "device_only",
+ "path": "io.watchdog.stage",
+ "safety": true,
+ "section": "io.failsafe"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": 600
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds a deliberate stop of flared or the UI is excused before the watchdog counts it as a hang.",
+ "kind": {
+ "hi": 3600,
+ "lo": 60,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Deliberate stop window",
+ "order": 50,
+ "owner": "device_only",
+ "path": "io.watchdog.stop_window_s",
+ "safety": true,
+ "section": "io.failsafe"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 3
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Failed attempts before the next port is tried.",
+ "kind": {
+ "hi": 20,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Fallback after",
+ "order": 30,
+ "owner": "synced",
+ "path": "link.mqtt.fallback_after",
+ "section": "link.mqtt"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 443
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "WebSocket port tried when the MQTT port fails. A bad value has no automatic revert; recover with a local edit.",
+ "kind": {
+ "hi": 65535,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Fallback port",
+ "order": 20,
+ "owner": "synced",
+ "path": "link.mqtt.fallback_port",
+ "section": "link.mqtt"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 25
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between keepalive pings.",
+ "kind": {
+ "hi": 60,
+ "lo": 10,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "MQTT keepalive",
+ "order": 40,
+ "owner": "synced",
+ "path": "link.mqtt.keepalive_s",
+ "section": "link.mqtt"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 8883
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "FLARE broker TLS port. A bad value has no automatic revert; recover with a local edit.",
+ "kind": {
+ "hi": 65535,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "MQTT port",
+ "order": 10,
+ "owner": "synced",
+ "path": "link.mqtt.port",
+ "section": "link.mqtt"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 0
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds the broker keeps the session; 0 starts clean on every connect.",
+ "kind": {
+ "hi": 86400,
+ "lo": 0,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Session expiry",
+ "order": 60,
+ "owner": "synced",
+ "path": "link.mqtt.session_expiry_s",
+ "section": "link.mqtt"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 10
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds the broker waits before the offline notice; used only with a session expiry above 0.",
+ "kind": {
+ "hi": 60,
+ "lo": 0,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Will delay",
+ "order": 50,
+ "owner": "synced",
+ "path": "link.mqtt.will_delay_s",
+ "section": "link.mqtt"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 30
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Idle seconds before the first TCP keepalive probe.",
+ "kind": {
+ "hi": 120,
+ "lo": 10,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "TCP keepalive idle",
+ "order": 10,
+ "owner": "synced",
+ "path": "link.tcp.keepalive_idle_s",
+ "section": "link.tcp"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 10
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between TCP keepalive probes.",
+ "kind": {
+ "hi": 60,
+ "lo": 5,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "TCP keepalive interval",
+ "order": 20,
+ "owner": "synced",
+ "path": "link.tcp.keepalive_interval_s",
+ "section": "link.tcp"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 3
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Unanswered probes before the link is dropped.",
+ "kind": {
+ "hi": 10,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "TCP keepalive probes",
+ "order": 30,
+ "owner": "synced",
+ "path": "link.tcp.keepalive_probes",
+ "section": "link.tcp"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 0
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Decimal gigabytes; 0 means none. Report-only; while over it, automatic downloads wait.",
+ "kind": {
+ "hi": 100000,
+ "lo": 0,
+ "t": "int",
+ "units": "GB"
+ },
+ "label": "Monthly allowance",
+ "order": 40,
+ "owner": "synced",
+ "path": "meter.cap_gb",
+ "renamed_from": [
+ "meter.cap_gib"
+ ],
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 60
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between hour meter checkpoints.",
+ "kind": {
+ "hi": 600,
+ "lo": 30,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Hour meter checkpoint",
+ "order": 60,
+ "owner": "synced",
+ "path": "meter.checkpoint_s",
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 5
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Minimum seconds between event checkpoints.",
+ "kind": {
+ "hi": 60,
+ "lo": 1,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Event checkpoint gap",
+ "order": 70,
+ "owner": "synced",
+ "path": "meter.event_gap_s",
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 1
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Day of the month the data meter starts a new period.",
+ "kind": {
+ "hi": 31,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Reset day",
+ "order": 10,
+ "owner": "synced",
+ "path": "meter.reset_day",
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": "00:00"
+ },
+ "display": {
+ "t": "text"
+ },
+ "guarded": false,
+ "help": "Time of day the new period starts, 24-hour.",
+ "kind": {
+ "check": "hhmm",
+ "t": "str"
+ },
+ "label": "Reset time",
+ "order": 20,
+ "owner": "synced",
+ "path": "meter.reset_time",
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "derived": "follow:system.timezone"
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "guarded": false,
+ "help": "Time zone of the reset day and time; follows the system time zone unless set.",
+ "kind": {
+ "t": "enum",
+ "vocab": "tz"
+ },
+ "label": "Meter time zone",
+ "order": 30,
+ "owner": "synced",
+ "path": "meter.timezone",
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 80
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Percent of the allowance that raises a warning.",
+ "kind": {
+ "hi": 100,
+ "lo": 1,
+ "t": "int",
+ "units": "%"
+ },
+ "label": "Warn at",
+ "order": 50,
+ "owner": "synced",
+ "path": "meter.warn_pct",
+ "section": "meter"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "value": "10.254.1.1/24"
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "The access point's own IPv4 CIDR; its DHCP pool derives from it.",
+ "inherit": "none",
+ "kind": {
+ "check": {
+ "max": 30,
+ "min": 8,
+ "name": "ipv4_cidr"
+ },
+ "t": "str"
+ },
+ "label": "AP address",
+ "order": 60,
+ "owner": "synced",
+ "path": "network.ap.address",
+ "section": "network.ap"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "value": 0
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "2.4 GHz channel; Auto picks the least congested.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "label": "Auto",
+ "v": 0
+ },
+ {
+ "v": 1
+ },
+ {
+ "v": 2
+ },
+ {
+ "v": 3
+ },
+ {
+ "v": 4
+ },
+ {
+ "v": 5
+ },
+ {
+ "v": 6
+ },
+ {
+ "v": 7
+ },
+ {
+ "v": 8
+ },
+ {
+ "v": 9
+ },
+ {
+ "v": 10
+ },
+ {
+ "v": 11
+ },
+ {
+ "v": 12
+ },
+ {
+ "v": 13
+ }
+ ]
+ },
+ "label": "AP channel",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.ap.channel",
+ "section": "network.ap"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "value": false
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "Allow an Enterprise mode while the Warden's certificate chain is self-signed.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Allow self-signed",
+ "order": 70,
+ "owner": "synced",
+ "path": "network.ap.eap.allow_selfsigned",
+ "section": "network.ap",
+ "visible_when": {
+ "in": [
+ "network.ap.security",
+ [
+ "WPA2-Enterprise",
+ "WPA2/WPA3-Enterprise mixed",
+ "WPA3-Enterprise",
+ "WPA2 + WPA2-Enterprise"
+ ]
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "value": false
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "Broadcast a Wi-Fi network. In the client role the access point bridges to the wired uplink.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Access point",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.ap.enabled",
+ "section": "network.ap",
+ "seed": {
+ "encoding": "bool01",
+ "file": "ap_on"
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "A local account that joins the Enterprise access point with no FLARE.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Local Wi-Fi account",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.ap.local.enabled",
+ "section": "network.ap.local"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "secret"
+ },
+ "guarded": false,
+ "help": "Generated on the Warden and shown once; Regenerate makes a new one.",
+ "kind": {
+ "check": "login_cred",
+ "t": "secret"
+ },
+ "label": "Local account password",
+ "order": 30,
+ "owner": "device_only",
+ "path": "network.ap.local.password",
+ "section": "network.ap.local",
+ "write_via": "ap-local-regenerate"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "value": "warden"
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "Lower case; matched exactly.",
+ "inherit": "deployment",
+ "kind": {
+ "check": "login_cred",
+ "t": "str"
+ },
+ "label": "Local account name",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.ap.local.username",
+ "section": "network.ap.local"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "reveal": "panel",
+ "t": "secret"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "Write-only; reads report only whether one is set.",
+ "kind": {
+ "check": "passphrase",
+ "max_len": 63,
+ "t": "secret"
+ },
+ "label": "AP passphrase",
+ "order": 40,
+ "owner": "flare_only",
+ "path": "network.ap.passphrase",
+ "section": "network.ap",
+ "visible_when": {
+ "in": [
+ "network.ap.security",
+ [
+ "WPA2",
+ "WPA3",
+ "WPA2/WPA3 mixed",
+ "WPA2 + WPA2-Enterprise"
+ ]
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "derived": "ap_security"
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "Mixed modes let older stations join. Enterprise modes sign in with a FLARE login.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "WPA2",
+ "v": "WPA2"
+ },
+ {
+ "label": "WPA3",
+ "v": "WPA3"
+ },
+ {
+ "label": "WPA2/WPA3 mixed",
+ "v": "WPA2/WPA3 mixed"
+ },
+ {
+ "label": "Open",
+ "v": "Open"
+ },
+ {
+ "label": "WPA2-Enterprise",
+ "v": "WPA2-Enterprise"
+ },
+ {
+ "label": "WPA2/WPA3-Enterprise mixed",
+ "v": "WPA2/WPA3-Enterprise mixed"
+ },
+ {
+ "label": "WPA3-Enterprise",
+ "v": "WPA3-Enterprise"
+ },
+ {
+ "label": "WPA2 + WPA2-Enterprise",
+ "v": "WPA2 + WPA2-Enterprise"
+ }
+ ]
+ },
+ "label": "AP security",
+ "order": 30,
+ "owner": "synced",
+ "path": "network.ap.security",
+ "section": "network.ap"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.ap"
+ },
+ "default": {
+ "derived": "hostname"
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "ap",
+ "guard": "ap_up",
+ "guarded": true,
+ "help": "The Wi-Fi network this Warden broadcasts; unset, it is the hostname.",
+ "inherit": "deployment",
+ "kind": {
+ "check": {
+ "max_bytes": 32,
+ "name": "ssid"
+ },
+ "t": "str"
+ },
+ "label": "AP name (SSID)",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.ap.ssid",
+ "section": "network.ap"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.firewall"
+ },
+ "default": {
+ "value": 10
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds the firewall remembers an unanswered connection attempt; 120 is the kernel default.",
+ "kind": {
+ "hi": 120,
+ "lo": 1,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Unanswered SYN timeout",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.conntrack.syn_sent_timeout_s",
+ "section": "network.conntrack"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "Address and prefix for the manual method.",
+ "inherit": "none",
+ "kind": {
+ "check": {
+ "max": 32,
+ "min": 1,
+ "name": "ipv4_cidr"
+ },
+ "t": "str"
+ },
+ "label": "IPv4 address",
+ "order": 30,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv4.address",
+ "section": "network.interfaces",
+ "visible_when": {
+ "eq": [
+ "network.interfaces.*.ipv4.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "value": []
+ },
+ "display": {
+ "t": "list"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "DNS servers for the manual method, at most 4.",
+ "kind": {
+ "item": {
+ "check": "ipv4"
+ },
+ "max_items": 4,
+ "t": "list"
+ },
+ "label": "IPv4 DNS",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv4.dns",
+ "section": "network.interfaces",
+ "visible_when": {
+ "eq": [
+ "network.interfaces.*.ipv4.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "Gateway for the manual method.",
+ "inherit": "none",
+ "kind": {
+ "check": "ipv4",
+ "t": "str"
+ },
+ "label": "IPv4 gateway",
+ "order": 40,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv4.gateway",
+ "section": "network.interfaces",
+ "visible_when": {
+ "eq": [
+ "network.interfaces.*.ipv4.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "value": "dhcp"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "How the interface gets its IPv4 address.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "DHCP",
+ "v": "dhcp"
+ },
+ {
+ "label": "Manual",
+ "v": "manual"
+ },
+ {
+ "label": "Disabled",
+ "v": "disabled"
+ }
+ ]
+ },
+ "label": "IPv4",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv4.method",
+ "section": "network.interfaces"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "Address and prefix for the manual method.",
+ "inherit": "none",
+ "kind": {
+ "check": "ipv6_cidr",
+ "t": "str"
+ },
+ "label": "IPv6 address",
+ "order": 70,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv6.address",
+ "section": "network.interfaces",
+ "visible_when": {
+ "eq": [
+ "network.interfaces.*.ipv6.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "value": []
+ },
+ "display": {
+ "t": "list"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "DNS servers for the manual method, at most 4.",
+ "kind": {
+ "item": {
+ "check": "ipv6"
+ },
+ "max_items": 4,
+ "t": "list"
+ },
+ "label": "IPv6 DNS",
+ "order": 90,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv6.dns",
+ "section": "network.interfaces",
+ "visible_when": {
+ "eq": [
+ "network.interfaces.*.ipv6.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "Gateway for the manual method.",
+ "inherit": "none",
+ "kind": {
+ "check": "ipv6",
+ "t": "str"
+ },
+ "label": "IPv6 gateway",
+ "order": 80,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv6.gateway",
+ "section": "network.interfaces",
+ "visible_when": {
+ "eq": [
+ "network.interfaces.*.ipv6.method",
+ "manual"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "value": "auto"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "How the interface gets its IPv6 address.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Automatic",
+ "v": "auto"
+ },
+ {
+ "label": "Manual",
+ "v": "manual"
+ },
+ {
+ "label": "Link-local only",
+ "v": "linklocal"
+ },
+ {
+ "label": "Disabled",
+ "v": "disabled"
+ }
+ ]
+ },
+ "label": "IPv6",
+ "order": 60,
+ "owner": "synced",
+ "path": "network.interfaces.*.ipv6.method",
+ "section": "network.interfaces"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.iface"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "group": "iface",
+ "guard": "link",
+ "guarded": true,
+ "help": "WAN carries the uplink; LAN is served. Each zone is on one interface.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "WAN",
+ "v": "wan"
+ },
+ {
+ "label": "LAN",
+ "v": "lan"
+ }
+ ]
+ },
+ "label": "Zone",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.interfaces.*.zone",
+ "section": "network.interfaces",
+ "seed": {
+ "encoding": "text",
+ "file": "net_*_zone"
+ }
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.proxy"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "proxy",
+ "guard": "link",
+ "guarded": true,
+ "help": "Applies to processes started after the change.",
+ "kind": {
+ "allow_empty": true,
+ "check": "host_port",
+ "t": "str"
+ },
+ "label": "HTTP proxy",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.proxy.http",
+ "section": "network.proxy"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.proxy"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "proxy",
+ "guard": "link",
+ "guarded": true,
+ "help": "Applies to processes started after the change.",
+ "kind": {
+ "allow_empty": true,
+ "check": "host_port",
+ "t": "str"
+ },
+ "label": "HTTPS proxy",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.proxy.https",
+ "section": "network.proxy"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.proxy"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "proxy",
+ "guard": "link",
+ "guarded": true,
+ "help": "Destinations reached directly, bypassing the proxy.",
+ "kind": {
+ "allow_empty": true,
+ "check": "ignore_list",
+ "t": "str"
+ },
+ "label": "No proxy for",
+ "order": 40,
+ "owner": "synced",
+ "path": "network.proxy.ignore",
+ "section": "network.proxy"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.proxy"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "proxy",
+ "guard": "link",
+ "guarded": true,
+ "help": "Proxy auto-config URL, kept for clients that ask.",
+ "kind": {
+ "allow_empty": true,
+ "check": "http_url",
+ "t": "str"
+ },
+ "label": "PAC URL",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.proxy.pac",
+ "section": "network.proxy"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.proxy"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "proxy",
+ "guard": "link",
+ "guarded": true,
+ "help": "Applies to processes started after the change.",
+ "kind": {
+ "allow_empty": true,
+ "check": "host_port",
+ "t": "str"
+ },
+ "label": "SOCKS proxy",
+ "order": 30,
+ "owner": "synced",
+ "path": "network.proxy.socks",
+ "section": "network.proxy"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.role"
+ },
+ "default": {
+ "value": "client"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guard": "link",
+ "guarded": true,
+ "help": "Router runs the site AP, DHCP and NAT; Client joins an existing network.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Router",
+ "v": "router"
+ },
+ {
+ "label": "Client",
+ "v": "client"
+ }
+ ]
+ },
+ "label": "Network role",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.role",
+ "section": "network",
+ "seed": {
+ "encoding": "enum:router=1,client=0",
+ "file": "role"
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "routing",
+ "guard": "lan_up",
+ "guarded": true,
+ "help": "Hand out addresses on the LAN.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Serve DHCP",
+ "order": 40,
+ "owner": "synced",
+ "path": "network.routing.dhcp",
+ "section": "network.routing"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "routing",
+ "guard": "lan_up",
+ "guarded": true,
+ "help": "Answer DNS for LAN clients.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Serve DNS",
+ "order": 60,
+ "owner": "synced",
+ "path": "network.routing.dns",
+ "section": "network.routing"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "value": "192.168.50.1/24"
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "routing",
+ "guard": "lan_up",
+ "guarded": true,
+ "help": "Router-role LAN CIDR, set by FLARE at pairing.",
+ "inherit": "none",
+ "kind": {
+ "check": {
+ "max": 30,
+ "min": 8,
+ "name": "ipv4_cidr"
+ },
+ "t": "str"
+ },
+ "label": "LAN address",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.routing.lan_address",
+ "provision": "pairing",
+ "section": "network.routing"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "value": "12h"
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "routing",
+ "guarded": false,
+ "help": "How long clients keep an address.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "1 hour",
+ "v": "1h"
+ },
+ {
+ "label": "3 hours",
+ "v": "3h"
+ },
+ {
+ "label": "6 hours",
+ "v": "6h"
+ },
+ {
+ "label": "12 hours",
+ "v": "12h"
+ },
+ {
+ "label": "1 day",
+ "v": "1d"
+ },
+ {
+ "label": "3 days",
+ "v": "3d"
+ },
+ {
+ "label": "7 days",
+ "v": "7d"
+ },
+ {
+ "label": "14 days",
+ "v": "14d"
+ },
+ {
+ "label": "30 days",
+ "v": "30d"
+ }
+ ]
+ },
+ "label": "DHCP lease",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.routing.lease",
+ "section": "network.routing"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "routing",
+ "guard": "lan_up",
+ "guarded": true,
+ "help": "Masquerade LAN traffic out the WAN interface.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "NAT",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.routing.nat",
+ "section": "network.routing"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "value": 0
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "routing",
+ "guarded": false,
+ "help": "Seconds a client stays offline before its lease is reclaimed; 0 never.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "v": 0
+ },
+ {
+ "v": 5
+ },
+ {
+ "v": 15
+ },
+ {
+ "v": 30
+ },
+ {
+ "v": 60
+ },
+ {
+ "v": 300
+ },
+ {
+ "v": 900
+ },
+ {
+ "v": 3600
+ }
+ ]
+ },
+ "label": "Reclaim after",
+ "order": 30,
+ "owner": "synced",
+ "path": "network.routing.release_seconds",
+ "section": "network.routing"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "Master switch for LAN device discovery; also gates the mining scanner.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Network discovery",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.scan",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": 16
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Mining scanner: most hosts probed at the same time.",
+ "kind": {
+ "hi": 64,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Scan hosts at once",
+ "order": 40,
+ "owner": "synced",
+ "path": "network.scan_concurrency",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": 120
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "guarded": false,
+ "help": "Discovery sweep period, seconds.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "v": 30
+ },
+ {
+ "v": 60
+ },
+ {
+ "v": 120
+ },
+ {
+ "v": 300
+ },
+ {
+ "v": 600
+ }
+ ]
+ },
+ "label": "Scan every",
+ "order": 30,
+ "owner": "synced",
+ "path": "network.scan_interval_seconds",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": []
+ },
+ "display": {
+ "style": "chips",
+ "t": "list"
+ },
+ "guarded": false,
+ "help": "Mining scanner: TCP ports tried on each host, at most 4. Empty uses 80 and 4028.",
+ "kind": {
+ "item": {
+ "check": {
+ "max": 65535,
+ "name": "index"
+ }
+ },
+ "max_items": 4,
+ "t": "list"
+ },
+ "label": "Scan ports",
+ "order": 60,
+ "owner": "synced",
+ "path": "network.scan_ports",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": 4096
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Mining scanner: most probes in one sweep; a larger range resumes next sweep.",
+ "kind": {
+ "hi": 16384,
+ "lo": 1024,
+ "t": "int"
+ },
+ "label": "Scan probe budget",
+ "order": 70,
+ "owner": "synced",
+ "path": "network.scan_probe_budget",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": []
+ },
+ "display": {
+ "style": "lines",
+ "t": "list"
+ },
+ "guarded": false,
+ "help": "Discovery ranges; empty scans the local subnets. At most 256 CIDRs in all.",
+ "kind": {
+ "item": {
+ "check": "scan_range"
+ },
+ "max_items": 16,
+ "rule": "scan_expansion_cap",
+ "t": "list"
+ },
+ "label": "Scan ranges",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.scan_ranges",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hosts"
+ },
+ "default": {
+ "value": 16
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Mining scanner: most TCP probes started per second.",
+ "kind": {
+ "hi": 200,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Scan probes per second",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.scan_rate_per_second",
+ "section": "network.scan"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.routing"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "vlans",
+ "guard": "link",
+ "guarded": true,
+ "help": "Address of the VLAN subinterface; its DHCP pool derives from it.",
+ "inherit": "none",
+ "kind": {
+ "check": {
+ "max": 30,
+ "min": 8,
+ "name": "ipv4_cidr"
+ },
+ "t": "str"
+ },
+ "label": "VLAN subnet",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.vlans.*.cidr",
+ "section": "network.vlans",
+ "seed": {
+ "encoding": "pairs",
+ "file": "vlans"
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.vpn"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "vpn",
+ "guard": "wg",
+ "guarded": true,
+ "help": "This Warden's WireGuard address, set by FLARE at pairing.",
+ "inherit": "none",
+ "kind": {
+ "allow_empty": true,
+ "check": {
+ "max": 32,
+ "min": 1,
+ "name": "ipv4_cidr"
+ },
+ "t": "str"
+ },
+ "label": "VPN address",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.vpn.address",
+ "provision": "pairing",
+ "section": "network.vpn"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.vpn"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "vpn",
+ "guard": "wg",
+ "guarded": true,
+ "help": "Networks routed through the tunnel; required once an address is set.",
+ "inherit": "none",
+ "kind": {
+ "allow_empty": true,
+ "check": "cidr_list",
+ "t": "str"
+ },
+ "label": "Allowed IPs",
+ "order": 40,
+ "owner": "synced",
+ "path": "network.vpn.allowed_ips",
+ "provision": "pairing",
+ "section": "network.vpn"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.vpn"
+ },
+ "default": {
+ "value": 25
+ },
+ "display": {
+ "t": "number"
+ },
+ "group": "vpn",
+ "guard": "wg",
+ "guarded": true,
+ "help": "WireGuard persistent keepalive, seconds; 0 disables.",
+ "inherit": "none",
+ "kind": {
+ "hi": 65535,
+ "lo": 0,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Keepalive",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.vpn.keepalive_seconds",
+ "provision": "pairing",
+ "section": "network.vpn"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.vpn"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "vpn",
+ "guard": "wg",
+ "guarded": true,
+ "help": "The WireGuard peer to dial, host:port.",
+ "inherit": "none",
+ "kind": {
+ "allow_empty": true,
+ "check": "host_port",
+ "t": "str"
+ },
+ "label": "Peer endpoint",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.vpn.peer_endpoint",
+ "provision": "pairing",
+ "section": "network.vpn"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "net.vpn"
+ },
+ "default": {
+ "value": ""
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "vpn",
+ "guard": "wg",
+ "guarded": true,
+ "help": "44 characters of base64.",
+ "inherit": "none",
+ "kind": {
+ "allow_empty": true,
+ "check": "wg_key",
+ "t": "str"
+ },
+ "label": "Peer public key",
+ "order": 30,
+ "owner": "synced",
+ "path": "network.vpn.peer_public_key",
+ "provision": "pairing",
+ "section": "network.vpn"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.wifi_country"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "guard": "link",
+ "guarded": true,
+ "help": "Which Wi-Fi channels and power levels are legal here. Unset uses the world domain.",
+ "kind": {
+ "check": "country_code",
+ "t": "str"
+ },
+ "label": "Wi-Fi country",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.wifi.country",
+ "section": "network.wifi",
+ "seed": {
+ "encoding": "text",
+ "file": "wifi_country"
+ }
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.wifi_networks"
+ },
+ "default": {
+ "value": false
+ },
+ "display": {
+ "t": "switch"
+ },
+ "group": "wifi_net",
+ "guard": "link",
+ "guarded": true,
+ "help": "The network does not broadcast its name.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Hidden network",
+ "order": 40,
+ "owner": "synced",
+ "path": "network.wifi.networks.*.hidden",
+ "section": "network.wifi.networks"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.wifi_networks"
+ },
+ "default": {
+ "value": 50
+ },
+ "display": {
+ "t": "number"
+ },
+ "group": "wifi_net",
+ "guard": "link",
+ "guarded": true,
+ "help": "Higher joins first when several saved networks are in range.",
+ "kind": {
+ "hi": 100,
+ "lo": 0,
+ "t": "int"
+ },
+ "label": "Priority",
+ "order": 50,
+ "owner": "synced",
+ "path": "network.wifi.networks.*.priority",
+ "section": "network.wifi.networks"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.wifi_networks"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "secret"
+ },
+ "group": "wifi_net",
+ "guard": "link",
+ "guarded": true,
+ "help": "Write-only. A password typed on the Warden stays on the Warden.",
+ "kind": {
+ "check": "passphrase",
+ "max_len": 63,
+ "t": "secret"
+ },
+ "label": "Password",
+ "order": 30,
+ "owner": "flare_only",
+ "path": "network.wifi.networks.*.psk",
+ "section": "network.wifi.networks",
+ "visible_when": {
+ "ne": [
+ "network.wifi.networks.*.security",
+ "open"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.wifi_networks"
+ },
+ "default": {
+ "value": "wpa2"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "group": "wifi_net",
+ "guard": "link",
+ "guarded": true,
+ "help": "Security of the saved network.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Open",
+ "v": "open"
+ },
+ {
+ "label": "WPA2",
+ "v": "wpa2"
+ },
+ {
+ "label": "WPA3",
+ "v": "wpa3"
+ }
+ ]
+ },
+ "label": "Security",
+ "order": 20,
+ "owner": "synced",
+ "path": "network.wifi.networks.*.security",
+ "section": "network.wifi.networks"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.wifi_networks"
+ },
+ "default": {
+ "unset": true
+ },
+ "display": {
+ "t": "text"
+ },
+ "group": "wifi_net",
+ "guard": "link",
+ "guarded": true,
+ "help": "SSID of a saved network.",
+ "kind": {
+ "check": {
+ "max_bytes": 32,
+ "name": "ssid"
+ },
+ "t": "str"
+ },
+ "label": "Network name",
+ "order": 10,
+ "owner": "synced",
+ "path": "network.wifi.networks.*.ssid",
+ "section": "network.wifi.networks"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "The HPMCU drives only managed relays.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Managed",
+ "order": 20,
+ "owner": "device_only",
+ "path": "relays.*.managed",
+ "safety": true,
+ "section": "relays.safety"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": "hold"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Relay state on stall or lease end. closed and hold last only until a watchdog reset, which opens every relay.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Open",
+ "v": "open"
+ },
+ {
+ "label": "Closed",
+ "v": "closed"
+ },
+ {
+ "label": "Hold",
+ "v": "hold"
+ }
+ ]
+ },
+ "label": "Safe state",
+ "order": 10,
+ "owner": "synced",
+ "path": "relays.*.safe_state",
+ "safety": true,
+ "section": "relays.safety"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": 3600
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Longest relay lease an app may request, seconds.",
+ "kind": {
+ "hi": 86400,
+ "lo": 60,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Longest app lease",
+ "order": 20,
+ "owner": "synced",
+ "path": "relays.lease_max_s",
+ "safety": true,
+ "section": "relays.limits"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": 5
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds to wait before an owner-loss policy applies.",
+ "kind": {
+ "hi": 60,
+ "lo": 0,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Owner loss grace",
+ "order": 30,
+ "owner": "synced",
+ "path": "relays.loss_grace_s",
+ "safety": true,
+ "section": "relays.limits"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:io"
+ },
+ "consumers": [
+ "io"
+ ],
+ "default": {
+ "value": 900
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds a manual relay lock lasts before it expires.",
+ "kind": {
+ "hi": 86400,
+ "lo": 30,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Manual lock",
+ "order": 10,
+ "owner": "synced",
+ "path": "relays.manual_lock_s",
+ "safety": true,
+ "section": "relays.limits"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": 9600
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "rs485_port",
+ "guarded": false,
+ "help": "Bus speed. Applying reopens the port and rescans.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "v": 300
+ },
+ {
+ "v": 600
+ },
+ {
+ "v": 1200
+ },
+ {
+ "v": 2400
+ },
+ {
+ "v": 4800
+ },
+ {
+ "v": 9600
+ },
+ {
+ "v": 19200
+ },
+ {
+ "v": 38400
+ },
+ {
+ "v": 57600
+ },
+ {
+ "v": 115200
+ },
+ {
+ "v": 230400
+ }
+ ]
+ },
+ "label": "Baud",
+ "order": 10,
+ "owner": "synced",
+ "path": "rs485.baud",
+ "section": "rs485.port"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": 8
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "rs485_port",
+ "guarded": false,
+ "help": "Bits per character on the bus.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "v": 7
+ },
+ {
+ "v": 8
+ }
+ ]
+ },
+ "label": "Data bits",
+ "order": 20,
+ "owner": "synced",
+ "path": "rs485.data_bits",
+ "section": "rs485.port"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": 247
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "This Warden's own bus address while observing (Modbus 1-247).",
+ "kind": {
+ "hi": 247,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Observer address",
+ "order": 20,
+ "owner": "synced",
+ "path": "rs485.observer_address",
+ "section": "rs485.role",
+ "visible_when": {
+ "eq": [
+ "rs485.role",
+ "observer"
+ ]
+ }
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": "none"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "group": "rs485_port",
+ "guarded": false,
+ "help": "Parity bit of each character on the bus.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Even",
+ "v": "even"
+ },
+ {
+ "label": "Odd",
+ "v": "odd"
+ },
+ {
+ "label": "None",
+ "v": "none"
+ }
+ ]
+ },
+ "label": "Parity",
+ "order": 40,
+ "owner": "synced",
+ "path": "rs485.parity",
+ "section": "rs485.port"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": "observer"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Master polls and discovers; Observer never transmits and listens only.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Master",
+ "v": "master"
+ },
+ {
+ "label": "Observer",
+ "v": "observer"
+ }
+ ]
+ },
+ "label": "Bus role",
+ "order": 10,
+ "owner": "synced",
+ "path": "rs485.role",
+ "reach": true,
+ "safety": true,
+ "section": "rs485.role"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": "playing"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Playing scans the bus; Paused keeps the port open; Stopped closes it. Kept across restarts.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Playing",
+ "v": "playing"
+ },
+ {
+ "label": "Paused",
+ "v": "paused"
+ },
+ {
+ "label": "Stopped",
+ "v": "stopped"
+ }
+ ]
+ },
+ "label": "Bus scan",
+ "order": 30,
+ "owner": "synced",
+ "path": "rs485.scan",
+ "reach": true,
+ "safety": true,
+ "section": "rs485.role"
+ },
+ {
+ "apply": {
+ "class": "restart",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": 1
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "group": "rs485_port",
+ "guarded": false,
+ "help": "Stop bits per character on the bus.",
+ "kind": {
+ "t": "int_set",
+ "values": [
+ {
+ "v": 1
+ },
+ {
+ "v": 2
+ }
+ ]
+ },
+ "label": "Stop bits",
+ "order": 30,
+ "owner": "synced",
+ "path": "rs485.stop_bits",
+ "section": "rs485.port"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "daemon:modbus"
+ },
+ "consumers": [
+ "modbus"
+ ],
+ "default": {
+ "value": 1000
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Longest wait for a response, ms; 0 uses automatic baud-aware timing.",
+ "kind": {
+ "hi": 60000,
+ "lo": 0,
+ "t": "int",
+ "units": "ms"
+ },
+ "label": "Timeout",
+ "order": 50,
+ "owner": "synced",
+ "path": "rs485.timeout_ms",
+ "section": "rs485.port"
+ },
+ {
+ "ai": {
+ "write": "deny"
+ },
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 200
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Acknowledged closed approvals kept; the oldest go first.",
+ "kind": {
+ "hi": 1000,
+ "lo": 50,
+ "t": "int"
+ },
+ "label": "Closed approvals kept",
+ "order": 50,
+ "owner": "device_only",
+ "path": "security.approvals.closed_keep",
+ "section": "security"
+ },
+ {
+ "ai": {
+ "write": "deny"
+ },
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 32
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Most approvals that may wait at once.",
+ "kind": {
+ "hi": 48,
+ "lo": 4,
+ "t": "int"
+ },
+ "label": "Pending approvals cap",
+ "order": 40,
+ "owner": "device_only",
+ "path": "security.approvals.pending_cap",
+ "section": "security"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 30
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds a revealed secret stays on the panel.",
+ "kind": {
+ "hi": 120,
+ "lo": 5,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Reveal time",
+ "order": 30,
+ "owner": "device_only",
+ "path": "security.reveal_seconds",
+ "section": "security"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 32
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Live-update streams the Warden serves in all.",
+ "kind": {
+ "hi": 128,
+ "lo": 4,
+ "t": "int"
+ },
+ "label": "Live streams in all",
+ "order": 20,
+ "owner": "device_only",
+ "path": "security.sse.global",
+ "section": "security"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 4
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Live-update streams one web session may hold.",
+ "kind": {
+ "hi": 16,
+ "lo": 1,
+ "t": "int"
+ },
+ "label": "Live streams per session",
+ "order": 10,
+ "owner": "device_only",
+ "path": "security.sse.per_session",
+ "section": "security"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 200
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Milliseconds changes are gathered before one change notice.",
+ "kind": {
+ "hi": 5000,
+ "lo": 50,
+ "t": "int",
+ "units": "ms"
+ },
+ "label": "Change coalescing",
+ "order": 40,
+ "owner": "synced",
+ "path": "sync.coalesce_ms",
+ "section": "sync"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 10
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds to wait for FLARE's answer to a sync hello.",
+ "kind": {
+ "hi": 60,
+ "lo": 3,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Hello timeout",
+ "order": 30,
+ "owner": "synced",
+ "path": "sync.hello_timeout_s",
+ "section": "sync"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 300
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Largest clock difference to FLARE accepted, seconds.",
+ "kind": {
+ "hi": 3600,
+ "lo": 30,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Max clock drift",
+ "order": 10,
+ "owner": "synced",
+ "path": "sync.max_drift_s",
+ "section": "sync"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 30
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Days a reset is remembered for sync.",
+ "kind": {
+ "hi": 365,
+ "lo": 7,
+ "t": "int",
+ "units": "d"
+ },
+ "label": "Keep resets",
+ "order": 20,
+ "owner": "synced",
+ "path": "sync.tombstone_days",
+ "section": "sync"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": []
+ },
+ "display": {
+ "t": "list"
+ },
+ "guarded": false,
+ "help": "Manifest permissions granted to the app.",
+ "hidden": true,
+ "kind": {
+ "item": {
+ "check": {
+ "max_len": 160,
+ "name": "label"
+ }
+ },
+ "max_items": 64,
+ "t": "list"
+ },
+ "label": "Granted permissions",
+ "order": 10,
+ "owner": "device_only",
+ "path": "sys.apps.*.grants",
+ "section": "sys.apps.grants"
+ },
+ {
+ "ai": {
+ "write": "deny"
+ },
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "Approved catalog apps install without a person.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Automatic installs",
+ "order": 30,
+ "owner": "synced",
+ "path": "sys.apps.policy.auto_install",
+ "section": "sys.apps.policy"
+ },
+ {
+ "ai": {
+ "write": "deny"
+ },
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": false
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "Installed apps update without a person.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Automatic updates",
+ "order": 40,
+ "owner": "synced",
+ "path": "sys.apps.policy.auto_update",
+ "section": "sys.apps.policy"
+ },
+ {
+ "ai": {
+ "write": "deny"
+ },
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": "sensitive"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Highest permission class FLARE may grant an app remotely.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Normal",
+ "v": "normal"
+ },
+ {
+ "label": "Sensitive",
+ "v": "sensitive"
+ },
+ {
+ "label": "Privileged",
+ "v": "privileged"
+ }
+ ]
+ },
+ "label": "Highest remote class",
+ "order": 20,
+ "owner": "synced",
+ "path": "sys.apps.policy.max_remote_class",
+ "section": "sys.apps.policy"
+ },
+ {
+ "ai": {
+ "write": "deny"
+ },
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guarded": false,
+ "help": "Whether FLARE may install apps on this Warden.",
+ "inherit": "deployment",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "Remote installs",
+ "order": 10,
+ "owner": "synced",
+ "path": "sys.apps.policy.remote_install",
+ "section": "sys.apps.policy"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 90
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Percent of a limit metric that shows caution.",
+ "kind": {
+ "hi": 99,
+ "lo": 50,
+ "t": "int",
+ "units": "%"
+ },
+ "label": "KPI caution",
+ "order": 20,
+ "owner": "synced",
+ "path": "sys.kpi.caution_pct",
+ "section": "sys.kpi"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 300
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds a stale KPI metric keeps its last value.",
+ "kind": {
+ "hi": 3600,
+ "lo": 30,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "KPI hold",
+ "order": 10,
+ "owner": "synced",
+ "path": "sys.kpi.hold_s",
+ "section": "sys.kpi"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 7
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Days a partial download is kept for a resume.",
+ "kind": {
+ "hi": 30,
+ "lo": 1,
+ "t": "int",
+ "units": "d"
+ },
+ "label": "Keep partial downloads",
+ "order": 30,
+ "owner": "device_only",
+ "path": "system.artifacts.part_keep_days",
+ "section": "system.artifacts"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 128
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Most space downloads may use, MiB.",
+ "kind": {
+ "hi": 512,
+ "lo": 32,
+ "t": "int",
+ "units": "MiB"
+ },
+ "label": "Download quota",
+ "order": 10,
+ "owner": "device_only",
+ "path": "system.artifacts.quota_mib",
+ "section": "system.artifacts"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 0
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Download rate limit in kbit/s; 0 is unlimited.",
+ "kind": {
+ "hi": 100000,
+ "lo": 0,
+ "t": "int",
+ "units": "kbit/s"
+ },
+ "label": "Download rate limit",
+ "order": 50,
+ "owner": "device_only",
+ "path": "system.artifacts.rate_kbps",
+ "section": "system.artifacts"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 320
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Free space a download must leave on the data partition, MiB.",
+ "kind": {
+ "hi": 1024,
+ "lo": 64,
+ "t": "int",
+ "units": "MiB"
+ },
+ "label": "Free space reserve",
+ "order": 20,
+ "owner": "device_only",
+ "path": "system.artifacts.reserve_mib",
+ "section": "system.artifacts"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 300
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Longest wait between download retries, seconds.",
+ "kind": {
+ "hi": 3600,
+ "lo": 30,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Longest retry wait",
+ "order": 40,
+ "owner": "device_only",
+ "path": "system.artifacts.retry_max_s",
+ "section": "system.artifacts"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "net.hostname"
+ },
+ "default": {
+ "derived": "hostname_serial"
+ },
+ "display": {
+ "t": "text"
+ },
+ "guarded": false,
+ "help": "The device's name on the network and in FLARE. Unset, a per-unit name derived from the hardware serial applies.",
+ "inherit": "none",
+ "kind": {
+ "check": "hostname",
+ "t": "str"
+ },
+ "label": "Hostname",
+ "order": 10,
+ "owner": "synced",
+ "path": "system.hostname",
+ "section": "system"
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "time.ntp"
+ },
+ "default": {
+ "value": true
+ },
+ "display": {
+ "t": "switch"
+ },
+ "guard": "time",
+ "guarded": true,
+ "help": "Whether the built-in SNTP client keeps the clock set.",
+ "kind": {
+ "t": "bool"
+ },
+ "label": "NTP sync",
+ "order": 10,
+ "owner": "synced",
+ "path": "system.ntp.enabled",
+ "section": "system.ntp",
+ "seed": {
+ "encoding": "bool01",
+ "file": "ntp_enabled"
+ }
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "time.ntp"
+ },
+ "default": {
+ "value": "pool.ntp.org"
+ },
+ "display": {
+ "t": "text"
+ },
+ "guard": "time",
+ "guarded": true,
+ "help": "Hostname or IP address the clock syncs against; an IPv6 literal is allowed.",
+ "kind": {
+ "check": "ntp_server",
+ "t": "str"
+ },
+ "label": "NTP server",
+ "order": 20,
+ "owner": "synced",
+ "path": "system.ntp.server",
+ "section": "system.ntp",
+ "seed": {
+ "encoding": "text",
+ "file": "ntp_server"
+ }
+ },
+ {
+ "apply": {
+ "class": "live",
+ "target": "time.tz"
+ },
+ "default": {
+ "value": "UTC0"
+ },
+ "display": {
+ "t": "dropdown"
+ },
+ "guarded": false,
+ "help": "Display time zone. The system clock always runs UTC.",
+ "kind": {
+ "t": "enum",
+ "vocab": "tz"
+ },
+ "label": "Time zone",
+ "order": 20,
+ "owner": "synced",
+ "path": "system.timezone",
+ "section": "system"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": "manual"
+ },
+ "display": {
+ "t": "segmented"
+ },
+ "guarded": false,
+ "help": "Manual: updates download, verify and stage but wait for a person. Automatic: they install.",
+ "kind": {
+ "t": "enum",
+ "values": [
+ {
+ "label": "Manual",
+ "v": "manual"
+ },
+ {
+ "label": "Automatic",
+ "v": "automatic"
+ }
+ ]
+ },
+ "label": "Install updates",
+ "order": 10,
+ "owner": "synced",
+ "path": "system.updates.install",
+ "section": "system.updates"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 14
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Days unsent data is kept before the oldest is dropped.",
+ "kind": {
+ "hi": 90,
+ "lo": 1,
+ "t": "int",
+ "units": "d"
+ },
+ "label": "Keep unsent data",
+ "order": 30,
+ "owner": "synced",
+ "path": "telemetry.buffer.ceiling_days",
+ "section": "telemetry.buffer"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 60
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between buffer commits to disk.",
+ "kind": {
+ "hi": 300,
+ "lo": 30,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Buffer commit",
+ "order": 40,
+ "owner": "synced",
+ "path": "telemetry.buffer.commit_s",
+ "section": "telemetry.buffer"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 2
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Disk kept for unsent events, MiB.",
+ "kind": {
+ "hi": 64,
+ "lo": 1,
+ "t": "int",
+ "units": "MiB"
+ },
+ "label": "Event buffer",
+ "order": 20,
+ "owner": "synced",
+ "path": "telemetry.buffer.events_mib",
+ "section": "telemetry.buffer"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 16
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Disk kept for unsent samples, MiB.",
+ "kind": {
+ "hi": 512,
+ "lo": 1,
+ "t": "int",
+ "units": "MiB"
+ },
+ "label": "Sample buffer",
+ "order": 10,
+ "owner": "synced",
+ "path": "telemetry.buffer.samples_mib",
+ "section": "telemetry.buffer"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 300
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Data meter interval",
+ "order": 60,
+ "owner": "synced",
+ "path": "telemetry.interval_s.meter",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 60
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "System metrics interval",
+ "order": 10,
+ "owner": "synced",
+ "path": "telemetry.interval_s.metrics",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 60
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Miner readings interval",
+ "order": 30,
+ "owner": "synced",
+ "path": "telemetry.interval_s.miners",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 300
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Network readings interval",
+ "order": 50,
+ "owner": "synced",
+ "path": "telemetry.interval_s.net",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 300
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Relay states interval",
+ "order": 70,
+ "owner": "synced",
+ "path": "telemetry.interval_s.relays",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 60
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "RS485 readings interval",
+ "order": 20,
+ "owner": "synced",
+ "path": "telemetry.interval_s.rs485",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "reload",
+ "target": "daemon:telemetry"
+ },
+ "consumers": [
+ "telemetry"
+ ],
+ "default": {
+ "value": 60
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Seconds between samples sent to FLARE.",
+ "kind": {
+ "hi": 3600,
+ "lo": 12,
+ "t": "int",
+ "units": "s"
+ },
+ "label": "Starlink readings interval",
+ "order": 40,
+ "owner": "synced",
+ "path": "telemetry.interval_s.starlink",
+ "section": "telemetry.interval_s"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 16
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "FLARE change batches kept for undo.",
+ "kind": {
+ "hi": 64,
+ "lo": 4,
+ "t": "int"
+ },
+ "label": "Undo batches kept",
+ "order": 10,
+ "owner": "synced",
+ "path": "undo.keep_batches",
+ "section": "undo"
+ },
+ {
+ "apply": {
+ "class": "none"
+ },
+ "default": {
+ "value": 24
+ },
+ "display": {
+ "t": "number"
+ },
+ "guarded": false,
+ "help": "Hours a confirmed batch stays undoable.",
+ "kind": {
+ "hi": 168,
+ "lo": 1,
+ "t": "int",
+ "units": "h"
+ },
+ "label": "Undo kept after confirm",
+ "order": 20,
+ "owner": "synced",
+ "path": "undo.keep_hours_after_confirm",
+ "section": "undo"
+ }
+ ],
+ "vocab": [
+ {
+ "id": "color_token",
+ "values": [
+ {
+ "label": "Sky",
+ "v": "sky"
+ },
+ {
+ "label": "Teal",
+ "v": "teal"
+ },
+ {
+ "label": "Lime",
+ "v": "lime"
+ },
+ {
+ "label": "Amber",
+ "v": "amber"
+ },
+ {
+ "label": "Rose",
+ "v": "rose"
+ },
+ {
+ "label": "Violet",
+ "v": "violet"
+ },
+ {
+ "label": "Cyan",
+ "v": "cyan"
+ },
+ {
+ "label": "White",
+ "v": "white"
+ }
+ ]
+ },
+ {
+ "id": "tz",
+ "values": [
+ {
+ "label": "UTC",
+ "v": "UTC0"
+ },
+ {
+ "label": "UK (London)",
+ "v": "GMT0BST,M3.5.0/1,M10.5.0"
+ },
+ {
+ "label": "Central Europe",
+ "v": "CET-1CEST,M3.5.0,M10.5.0/3"
+ },
+ {
+ "label": "Eastern Europe",
+ "v": "EET-2EEST,M3.5.0/3,M10.5.0/4"
+ },
+ {
+ "label": "US Eastern",
+ "v": "EST5EDT,M3.2.0,M11.1.0"
+ },
+ {
+ "label": "US Central",
+ "v": "CST6CDT,M3.2.0,M11.1.0"
+ },
+ {
+ "label": "US Mountain",
+ "v": "MST7MDT,M3.2.0,M11.1.0"
+ },
+ {
+ "label": "US Arizona",
+ "v": "MST7"
+ },
+ {
+ "label": "US Pacific",
+ "v": "PST8PDT,M3.2.0,M11.1.0"
+ },
+ {
+ "label": "Alaska",
+ "v": "AKST9AKDT,M3.2.0,M11.1.0"
+ },
+ {
+ "label": "Hawaii",
+ "v": "HST10"
+ },
+ {
+ "label": "Sao Paulo",
+ "v": "<-03>3"
+ },
+ {
+ "label": "Gulf (Dubai)",
+ "v": "<+04>-4"
+ },
+ {
+ "label": "India",
+ "v": "IST-5:30"
+ },
+ {
+ "label": "China",
+ "v": "CST-8"
+ },
+ {
+ "label": "Japan",
+ "v": "JST-9"
+ },
+ {
+ "label": "Sydney",
+ "v": "AEST-10AEDT,M10.1.0,M4.1.0/3"
+ },
+ {
+ "label": "New Zealand",
+ "v": "NZST-12NZDT,M9.5.0,M4.1.0/3"
+ }
+ ]
+ }
+ ]
+}
diff --git a/third-party/flare-ui/crates/flare-plugin-abi/Cargo.toml b/third-party/flare-ui/crates/flare-plugin-abi/Cargo.toml
new file mode 100644
index 0000000..af82b5a
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-plugin-abi/Cargo.toml
@@ -0,0 +1,10 @@
+[package]
+name = "flare-plugin-abi"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+license.workspace = true
+description = "Plugin ABI shared by FLARE and the Warden console"
+publish = false
+
+[dependencies]
diff --git a/third-party/flare-ui/crates/flare-plugin-abi/src/lib.rs b/third-party/flare-ui/crates/flare-plugin-abi/src/lib.rs
new file mode 100644
index 0000000..7b55fc3
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-plugin-abi/src/lib.rs
@@ -0,0 +1,16 @@
+//! Plugin ABI shared by FLARE and the Warden console.
+//!
+//! Placeholder until its owning lane lands the real crate (see OWNERS).
+
+/// Crate name, used by consumers to check which pin they vendored.
+pub const NAME: &str = "flare-plugin-abi";
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+
+ #[test]
+ fn name_is_stable() {
+ assert_eq!(NAME, "flare-plugin-abi");
+ }
+}
diff --git a/third-party/flare-ui/crates/flare-ui/Cargo.toml b/third-party/flare-ui/crates/flare-ui/Cargo.toml
new file mode 100644
index 0000000..3433b8b
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/Cargo.toml
@@ -0,0 +1,20 @@
+[package]
+name = "flare-ui"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+license.workspace = true
+description = "Shared UI crate for FLARE and the Warden console: schema renderer, nav model, dash editor assets, LVGL table generator"
+publish = false
+
+[dependencies]
+wschema = { path = "../wschema" }
+serde_json = "1"
+maud = "0.27"
+
+[dev-dependencies]
+criterion = { version = "0.5", default-features = false }
+
+[[bench]]
+name = "chart"
+harness = false
diff --git a/third-party/flare-ui/crates/flare-ui/assets/components.css b/third-party/flare-ui/crates/flare-ui/assets/components.css
new file mode 100644
index 0000000..170d9ce
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/components.css
@@ -0,0 +1,184 @@
+/* Shared component styles. Every value comes from tokens.css. */
+.bf-btn {
+ display: inline-block;
+ padding: var(--bf-space-2) var(--bf-space-4);
+ cursor: pointer;
+}
+.bf-btn-primary {
+ font-weight: 600;
+}
+.bf-badge {
+ display: inline-block;
+ padding: 0 var(--bf-space-2);
+}
+.bf-badge-ok {
+ font-weight: 600;
+}
+.bf-badge-warn {
+ font-weight: 600;
+}
+.bf-badge-err {
+ font-weight: 700;
+}
+.bf-card {
+ padding: var(--bf-space-4);
+}
+.bf-card-title {
+ margin: 0 0 var(--bf-space-2);
+}
+.bf-table {
+ width: 100%;
+ border-collapse: collapse;
+}
+.bf-stale {
+ opacity: 0.6;
+}
+.bf-shell {
+ display: flex;
+ min-height: 100vh;
+}
+.bf-sidebar {
+ padding: var(--bf-space-4);
+}
+.bf-nav-section {
+ margin: 0 0 var(--bf-space-4);
+}
+.bf-nav-section-title {
+ margin: 0 0 var(--bf-space-2);
+}
+.bf-nav-link {
+ display: block;
+ padding: var(--bf-space-1) var(--bf-space-2);
+ text-decoration: none;
+}
+.bf-nav-active {
+ font-weight: 700;
+}
+.bf-main {
+ flex: 1;
+ padding: var(--bf-space-4);
+}
+.bf-tabs {
+ display: flex;
+ gap: var(--bf-space-2);
+ margin: 0 0 var(--bf-space-4);
+}
+.bf-field {
+ margin: 0 0 var(--bf-space-4);
+}
+.bf-field-label {
+ display: block;
+ margin: 0 0 var(--bf-space-1);
+}
+.bf-field-help {
+ margin: var(--bf-space-1) 0 0;
+}
+.bf-field-error {
+ margin: var(--bf-space-1) 0 0;
+ font-weight: 600;
+}
+.bf-input {
+ width: 100%;
+ padding: var(--bf-space-2);
+}
+.bf-segmented {
+ display: flex;
+ gap: var(--bf-space-2);
+}
+.bf-segment {
+ padding: var(--bf-space-1) var(--bf-space-2);
+ cursor: pointer;
+}
+.bf-switch {
+ display: inline-flex;
+ gap: var(--bf-space-2);
+ cursor: pointer;
+}
+.bf-kv {
+ display: flex;
+ justify-content: space-between;
+ gap: var(--bf-space-2);
+ padding: var(--bf-space-1) 0;
+}
+.bf-kv-label {
+ display: inline-block;
+}
+.bf-kv-value {
+ font-variant-numeric: tabular-nums;
+}
+.bf-gauge {
+ display: flex;
+ align-items: center;
+ gap: var(--bf-space-2);
+}
+.bf-gauge-bar {
+ flex: 1;
+}
+.bf-hero {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+}
+.bf-hero-value {
+ font-size: 3rem;
+ font-weight: 700;
+ font-variant-numeric: tabular-nums;
+}
+.bf-hero-units {
+ display: inline-block;
+}
+.bf-log {
+ margin: 0;
+ padding: 0 0 0 var(--bf-space-4);
+ font-family: monospace;
+}
+.bf-chart {
+ margin: 0;
+}
+.bf-chart-canvas {
+ width: 100%;
+ height: 12rem;
+}
+.bf-vh {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ border: 0;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ clip-path: inset(50%);
+ white-space: nowrap;
+}
+.bf-note {
+ margin: 0 0 var(--bf-space-2);
+}
+.bf-plate {
+ display: grid;
+ grid-template-columns: max-content 1fr;
+ gap: var(--bf-space-1) var(--bf-space-4);
+ margin: 0;
+}
+.bf-btn-danger {
+ background: var(--bf-color-danger);
+ color: #fff;
+}
+.bf-action {
+ display: inline-block;
+ margin: 0 var(--bf-space-2) var(--bf-space-2) 0;
+}
+.bf-action-confirm {
+ margin: 0 0 var(--bf-space-1);
+}
+.bf-approvals {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+.bf-approval {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--bf-space-2);
+ align-items: center;
+ padding: var(--bf-space-2) 0;
+}
diff --git a/third-party/flare-ui/crates/flare-ui/assets/js/boot.js b/third-party/flare-ui/crates/flare-ui/assets/js/boot.js
new file mode 100644
index 0000000..b7eeb6a
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/js/boot.js
@@ -0,0 +1,64 @@
+/* flare-ui page glue (UI-6): one call wires the live stream, stale marker,
+ * chart island, table sort and the htmx CSRF header. Reads two optional
+ * tags: bf-stream (SSE URL) and bf-csrf (token). No dependencies. */
+(function (root, factory) {
+ if (typeof module === "object" && module.exports) module.exports = factory(root);
+ else root.FlareBoot = factory(root);
+})(typeof self !== "undefined" ? self : this, function (root) {
+ "use strict";
+
+ function meta(doc, name) {
+ var m = doc.querySelector('meta[name="' + name + '"]');
+ return m ? m.getAttribute("content") : null;
+ }
+
+ /* Same-origin check on a stream URL: path-absolute, not protocol-relative. */
+ function safeStream(url) {
+ return typeof url === "string" && url.charAt(0) === "/" && url.charAt(1) !== "/" &&
+ url.indexOf("\\") < 0 && !/[\x00-\x20\x7f]/.test(url);
+ }
+
+ /* htmx:configRequest handler: adds the CSRF header to every htmx request. */
+ function csrfHeader(token) {
+ return function (evt) {
+ if (token && evt && evt.detail && evt.detail.headers) {
+ evt.detail.headers["X-CSRF-Token"] = token;
+ }
+ };
+ }
+
+ /* env: { Live, Charts, Islands, doc, loc } injected so tests need no browser. */
+ function boot(env) {
+ var doc = env.doc;
+ var result = { live: null, csrf: false };
+ var token = meta(doc, "bf-csrf");
+ if (token) {
+ doc.body.addEventListener("htmx:configRequest", csrfHeader(token));
+ result.csrf = true;
+ }
+ if (env.Islands) env.Islands.bindTableSort(doc, env.loc);
+ var url = meta(doc, "bf-stream");
+ if (url && safeStream(url) && env.Live) {
+ var live = new env.Live.Live(url);
+ env.Live.bindStaleMarker(live, doc);
+ if (env.Charts) env.Charts.bindCharts(live, doc);
+ live.start();
+ result.live = live;
+ }
+ return result;
+ }
+
+ function auto() {
+ if (typeof document === "undefined") return;
+ boot({
+ doc: document, loc: location,
+ Live: root.FlareLive, Charts: root.FlareChart, Islands: root.FlareIslands
+ });
+ }
+ if (typeof document !== "undefined") {
+ if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", auto);
+ else auto();
+ }
+
+ return { boot: boot, safeStream: safeStream, csrfHeader: csrfHeader };
+});
diff --git a/third-party/flare-ui/crates/flare-ui/assets/js/chart.js b/third-party/flare-ui/crates/flare-ui/assets/js/chart.js
new file mode 100644
index 0000000..8f6bde3
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/js/chart.js
@@ -0,0 +1,533 @@
+(function (root, factory) {
+ if (typeof module === "object" && module.exports) module.exports = factory();
+ else root.FlareChart = factory();
+})(typeof self !== "undefined" ? self : this, function () {
+ "use strict";
+
+ /* Retained Warden renderer. */
+ function createEngine(env) {
+ env = env || {};
+ var window = env.window;
+ var document = env.document || (window && window.document);
+ if (!window || !document) throw new Error("canvas engine needs a window and document");
+ var state = env.state || { chartTier: "min", prevGenMs: 0 };
+ var reduceMotion = env.reduceMotion || window.matchMedia("(prefers-reduced-motion: reduce)");
+ var now = env.now || function () { return window.performance.now(); };
+ var getComputedStyle = env.getComputedStyle || function (el) { return window.getComputedStyle(el); };
+ var paletteMemo = null; // invalidated by the binding on each new feed
+ function palette(){
+ if (paletteMemo) return paletteMemo;
+ var cs = getComputedStyle(document.documentElement);
+ function c(n){ return (cs.getPropertyValue('--'+n)||'').trim(); }
+ return (paletteMemo = { accent:c('accent')||'#3776BE', flame:c('flame')||'#F26522',
+ ok:c('ok')||'#1E8E4E', border:c('border')||'#D5DAE3',
+ muted:c('text-muted')||'#5A6577', font:c('font-body')||'sans-serif' });
+ }
+ function hexToRgba(hex, a){
+ var m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec((hex||'').trim());
+ if(!m) return hex;
+ var h = m[1]; if(h.length===3) h = h[0]+h[0]+h[1]+h[1]+h[2]+h[2];
+ return 'rgba('+parseInt(h.slice(0,2),16)+','+parseInt(h.slice(2,4),16)+','+parseInt(h.slice(4,6),16)+','+a+')';
+ }
+ function fitCanvas(cv){
+ var r = cv.getBoundingClientRect();
+ var w = Math.round(r.width), h = Math.round(r.height);
+ if(w<=0 || h<=0) return null;
+ var dpr = Math.min(2.5, window.devicePixelRatio || 1);
+ var bw = Math.round(w*dpr), bh = Math.round(h*dpr);
+ if(cv.width !== bw) cv.width = bw;
+ if(cv.height !== bh) cv.height = bh;
+ var ctx = cv.getContext('2d');
+ ctx.setTransform(dpr,0,0,dpr,0,0);
+ return { ctx:ctx, w:w, h:h, dpr:dpr };
+ }
+ var GRAPH_SUBDIV = 12;
+ function catmull(p0,p1,p2,p3,t){
+ var t2 = t*t, t3 = t2*t;
+ return 0.5*((2*p1) + (-p0+p2)*t + (2*p0-5*p1+4*p2-p3)*t2 + (-p0+3*p1-3*p2+p3)*t3);
+ }
+ function sampleAt(v,n,i){ if(i<0)i=0; if(i>n-1)i=n-1; return v[i]; }
+
+ var SLIDE_SLOTS = 9;
+ var LAG_LOW = 2.5;
+ var LAG_START = 3;
+ var LAG_OVERRUN = 3;
+ var MAX_ADVANCE = 8;
+ var MAX_HISTORY = 72;
+
+ function chartSlide(frame, ts){
+ if (!frame.vel) return frame.slide0;
+ return Math.min(frame.maxSlide, frame.slide0 + frame.vel * Math.max(0, ts - frame.feedAt));
+ }
+
+ function alignAdvance(prior, fresh, expected){
+ var best = -1, bestGap = 1e9;
+ for (var k = 0; k <= MAX_ADVANCE; k++) {
+ var ok = true, judged = 0;
+ for (var i = 0; ok && i < fresh.length; i++) {
+ var a = prior[i], b = fresh[i];
+ if (!a || !b) continue;
+ var n = Math.min(a.length, b.length - k, 30);
+ if (n < 4) continue;
+ judged++;
+ for (var j = 0; j < n; j++) {
+ var x = b[b.length - 1 - k - j], y = a[a.length - 1 - j];
+ if (Math.abs(x - y) > 1e-6 * (1 + Math.abs(y))) { ok = false; break; }
+ }
+ }
+ if (ok && judged) {
+ var gap = Math.abs(k - expected);
+ if (gap < bestGap) { best = k; bestGap = gap; }
+ }
+ }
+ return best;
+ }
+
+ function layerFor(cv, key, w, h, dpr){
+ var l = cv[key] || (cv[key] = document.createElement('canvas'));
+ var bw = Math.max(1, Math.ceil(w * dpr)), bh = Math.max(1, Math.ceil(h * dpr));
+ if (l.width !== bw) l.width = bw;
+ if (l.height !== bh) l.height = bh;
+ var c = l.getContext('2d');
+ c.setTransform(1,0,0,1,0,0); c.clearRect(0,0,bw,bh);
+ c.setTransform(dpr,0,0,dpr,0,0);
+ return { el:l, ctx:c };
+ }
+
+ function paintLines(cv, spec){
+ var generation = state.prevGenMs || 0, t = now();
+ var minute = state.chartTier === 'min';
+ var animated = minute && !reduceMotion.matches;
+ var slots = animated ? SLIDE_SLOTS : 0;
+
+ var advanced = -1, total = 0;
+ if (minute) {
+ var prior = cv.__history, fresh = spec.series.map(function(s){ return (s.data || []).slice(); });
+ if (prior) advanced = alignAdvance(prior.series, fresh, Math.round((generation - prior.gen) / 1000));
+ spec.series = spec.series.map(function(s, i){
+ var data = fresh[i], old = prior && advanced >= 0 && prior.series[i];
+ if (old) {
+ var joined = advanced > 0 ? old.concat(data.slice(-advanced)) : old;
+ if (joined.length >= data.length) data = joined;
+ }
+ return { data:data.slice(-MAX_HISTORY), color:s.color, area:s.area };
+ });
+ total = advanced >= 0 ? prior.total + advanced : 0;
+ cv.__history = { gen:generation, revision:spec.historyRevision, total:total,
+ series:spec.series.map(function(s){ return s.data.slice(); }) };
+ } else cv.__history = null;
+
+ var clk = null;
+ if (animated) {
+ clk = cv.__clock;
+ if (!clk || advanced < 0) clk = { lag:LAG_START, v:1, t:t, arrived:t, T:2 };
+ else {
+ clk.lag = Math.max(-LAG_OVERRUN, clk.lag - clk.v * (t - clk.t) / 1000); clk.t = t;
+ if (advanced > 0) {
+ clk.T = Math.min(6, Math.max(0.8, 0.6 * clk.T + 0.4 * (t - clk.arrived) / 1000));
+ clk.arrived = t;
+ clk.lag = Math.min(slots, clk.lag + advanced);
+ clk.v = Math.min(2.5, Math.max(0.5, (clk.lag - LAG_LOW) / clk.T));
+ } else if ((t - clk.arrived) / 1000 > 0.8 * clk.T) {
+ clk.v = Math.min(2.5, Math.max(0.5, (clk.lag - LAG_LOW) / clk.T));
+ }
+ }
+ cv.__clock = clk;
+ } else cv.__clock = null;
+
+ var f = fitCanvas(cv); if(!f) return;
+ var W=f.w, H=f.h, dpr=f.dpr, pal=palette();
+ var labelled = !!spec.fmtY;
+ var padL = labelled?46:10, padR=12, padT=10, padB=8;
+ var plotW = Math.max(1, W-padL-padR), plotH = Math.max(1, H-padT-padB);
+ var yMin = spec.yMin, yMax = spec.yMax; if(!(yMax>yMin)) yMax = yMin+1;
+ var baseY = padT+plotH;
+ function yPx(v){ if(vyMax)v=yMax; return padT+plotH-(v-yMin)/(yMax-yMin)*plotH; }
+
+ var maxLen=0, hasData=false;
+ spec.series.forEach(function(s){ var n=(s.data&&s.data.length)||0; if(n>maxLen)maxLen=n; if(n>0)hasData=true; });
+
+ var frame = {
+ W:W, H:H, dpr:dpr, padL:padL, padR:padR, padT:padT, plotW:plotW, plotH:plotH, baseY:baseY,
+ yMin:yMin, yMax:yMax, divs:spec.grid||4, labelled:labelled, fmtY:spec.fmtY||null,
+ gridColor:pal.border, labelColor:pal.muted, mutedColor:pal.muted, font:pal.font,
+ empty:!hasData, dx:0, slots:slots, feedAt:t, slide0:0, vel:0, maxSlide:0,
+ newestId:total, series:[],
+ slideAt:function(ts){ return chartSlide(frame, ts); }
+ };
+
+ if(hasData){
+ var N = minute ? 60 : Math.max(2, maxLen), dx = plotW/(N-1);
+ frame.dx = dx;
+ frame.maxSlide = (slots + LAG_OVERRUN)*dx;
+ frame.slide0 = clk ? (slots - clk.lag) * dx : 0;
+ frame.vel = clk ? clk.v * dx / 1000 : 0;
+ function xBase(len,j){ return padL + plotW + slots*dx - (len-1-j)*dx; }
+ spec.series.forEach(function(s){
+ var data=s.data||[], len=data.length;
+ var entry = { color:s.color, area:!!s.area, pts:[], endpoint:null };
+ if(len>=1) entry.endpoint = { x:xBase(len,len-1), y:yPx(data[len-1]) };
+ if(len>=2){
+ for(var j=0;jyMax)v=yMax; // a spline through noisy data overshoots; keep it in range
+ entry.pts.push({ x:x0 + tt*dx, y:yPx(v) });
+ }
+ }
+ entry.pts.push({ x:xBase(len,len-1), y:yPx(data[len-1]) }); // the newest sample, exactly
+ }
+ frame.series.push(entry);
+ });
+ }
+
+ var base = layerFor(cv, '__base', W, H, dpr);
+ drawBase(base.ctx, frame);
+ frame.base = base.el;
+ if (!frame.empty) {
+ var lw = W + slots*frame.dx + 2, ly = layerFor(cv, '__layer', lw, H, dpr);
+ drawSeries(ly.ctx, frame);
+ frame.layer = ly.el; frame.layerW = ly.el.width / dpr;
+ }
+ cv.__cframe = frame;
+ drawFrame(cv, frame, t);
+ }
+
+ function drawBase(ctx, frame){
+ var padL=frame.padL, padR=frame.padR, padT=frame.padT, plotW=frame.plotW, plotH=frame.plotH, W=frame.W;
+ var yMin=frame.yMin, yMax=frame.yMax, divs=frame.divs;
+ function yPx(v){ return padT+plotH-(v-yMin)/(yMax-yMin)*plotH; }
+ ctx.save();
+ ctx.lineWidth=1; ctx.strokeStyle=frame.gridColor;
+ ctx.font='11px '+frame.font; ctx.textBaseline='middle'; ctx.textAlign='right';
+ for(var g=0; g<=divs; g++){
+ var gv = yMin+(yMax-yMin)*g/divs, gy = Math.round(yPx(gv))+0.5;
+ ctx.globalAlpha=0.4; ctx.beginPath(); ctx.moveTo(padL,gy); ctx.lineTo(W-padR,gy); ctx.stroke();
+ if(frame.labelled){ ctx.globalAlpha=0.9; ctx.fillStyle=frame.labelColor; ctx.fillText(frame.fmtY(gv), padL-6, yPx(gv)); }
+ }
+ ctx.restore();
+ if(frame.empty){
+ ctx.save(); ctx.fillStyle=frame.mutedColor; ctx.font='12px '+frame.font;
+ ctx.textAlign='center'; ctx.textBaseline='middle';
+ ctx.fillText('Collecting trend data...', padL+plotW/2, padT+plotH/2); ctx.restore();
+ }
+ }
+
+ function drawSeries(ctx, frame){
+ var padT=frame.padT, baseY=frame.baseY;
+ frame.series.forEach(function(s){
+ var pts=s.pts, len=pts.length;
+ if(len>1){
+ if(s.area){
+ ctx.save(); ctx.beginPath();
+ for(var j=0;j hi) hi = s.v; });
+ var pad = lo === hi ? Math.max(1, Math.abs(lo) * 0.05) : (hi / 2 - lo / 2) * 0.1;
+ var low = lo - pad, high = hi + pad;
+ return [isFinite(low) ? low : lo, isFinite(high) ? high : hi];
+ }
+
+ /* Keep a stable scale for history; reserve spline headroom and lift subnormals. */
+ function fitSeries(series, scale) {
+ var peak = 0, values = [], floor = Number.MIN_VALUE * Math.pow(2, 52), limit = Number.MAX_VALUE / 32;
+ series.forEach(function (s) { s.data.forEach(function (v) { peak = Math.max(peak, Math.abs(v)); }); });
+ scale = scale || 1;
+ var magnitude = peak / scale;
+ if (!isFinite(magnitude) || magnitude > limit || (peak > 0 && magnitude < floor)) {
+ scale = peak > limit ? limit : peak < floor ? floor : 1;
+ }
+ var fitted = series.map(function (s) {
+ var data = s.data.map(function (v) { var n = v / scale; values.push({ t: 0, v: n }); return n; });
+ return Object.assign({}, s, { data: data });
+ });
+ return { series: fitted, range: bounds(values), scale: scale };
+ }
+
+ function plotPoints(samples, w, h) {
+ var pts = numeric(samples);
+ if (!pts.length || w <= 0 || h <= 0) return [];
+ var fitted = fitSeries([{ data: pts.map(function (s) { return s.v; }) }]);
+ var times = fitSeries([{ data: pts.map(function (s) { return s.t; }) }]).series[0].data;
+ var b = fitted.range, values = fitted.series[0].data;
+ var t0 = times[0], t1 = times[times.length - 1];
+ var span = t1 - t0;
+ return pts.map(function (s, i) {
+ var x = span > 0 ? ((times[i] - t0) / span) * w : (pts.length === 1 ? w / 2 : (i / (pts.length - 1)) * w);
+ var y = h - ((values[i] - b[0]) / (b[1] - b[0])) * h;
+ return [x, y];
+ });
+ }
+
+ function draw(ctx, samples, w, h, style) {
+ style = style || {};
+ ctx.clearRect(0, 0, w, h);
+ var p = plotPoints(samples, w, h);
+ if (!p.length) return 0;
+ ctx.strokeStyle = style.stroke || "currentColor";
+ ctx.lineWidth = style.width || 2;
+ ctx.beginPath();
+ p.forEach(function (q, i) { if (i === 0) ctx.moveTo(q[0], q[1]); else ctx.lineTo(q[0], q[1]); });
+ ctx.stroke();
+ return p.length;
+ }
+
+ function formatValue(v) {
+ if (typeof v === "number") {
+ if (!isFinite(v)) return "--";
+ return String(Number(v.toFixed(3)));
+ }
+ return typeof v === "object" ? "--" : String(v);
+ }
+
+ function withValue(text, value) {
+ var m = /^\s*\S*(\s.*)?$/.exec(String(text));
+ return value + (m && m[1] ? m[1] : "");
+ }
+
+ function applyReadings(live, doc) {
+ var els = doc.querySelectorAll("[data-live][data-key]");
+ for (var i = 0; i < els.length; i++) {
+ var el = els[i];
+ if (el.getAttribute("data-island")) continue;
+ var key = el.getAttribute("data-key");
+ var s = live.samples(key);
+ if (!s.length) continue;
+ var v = s[s.length - 1].v;
+ var txt = formatValue(v);
+ var kv = el.querySelector(".bf-kv-value");
+ if (kv) kv.textContent = withValue(kv.textContent, txt);
+ var hero = el.querySelector(".bf-hero-value");
+ if (hero) hero.textContent = txt;
+ var meter = el.querySelector("meter");
+ if (meter && typeof v === "number" && isFinite(v)) meter.value = v;
+ }
+ }
+
+ var chartBindings = new WeakMap();
+
+ function chartProps(raw) {
+ var p;
+ try { p = JSON.parse(raw); } catch (_) { return null; }
+ function text(s, max) { return typeof s === "string" && s.length > 0 && s.length <= max && !/[\x00-\x1f\x7f]/.test(s); }
+ if (!p || !text(p.id, 128) || !Array.isArray(p.series) || !p.series.length || p.series.length > 64 ||
+ !["min", "hour", "day"].includes(p.tier) || !p.tiers || !p.points || typeof p.points !== "object" || Array.isArray(p.points)) return null;
+ var keys = new Set();
+ for (var s of p.series) {
+ if (!s || !text(s.key, 256) || !text(s.label, 256) || typeof s.unit !== "string" || s.unit.length > 64 ||
+ /[\x00-\x1f\x7f]/.test(s.unit) || typeof s.color !== "string" || !/^#(?:[\da-f]{3}|[\da-f]{6})$/i.test(s.color) || keys.has(s.key)) return null;
+ keys.add(s.key);
+ }
+ for (var tier of ["min", "hour", "day"]) {
+ var t = p.tiers[tier];
+ if (!t || t.n !== 60 || !Number.isInteger(t.step_s) || t.step_s <= 0 || t.step_s > 4294967295) return null;
+ }
+ for (var key of Object.keys(p.points)) {
+ var points = p.points[key];
+ if (!keys.has(key) || !Array.isArray(points) || points.length > 60 || points.some(function (q, i) {
+ return !Array.isArray(q) || q.length !== 2 || !q.every(Number.isFinite) || (i > 0 && points[i - 1][0] >= q[0]);
+ })) return null;
+ }
+ return p;
+ }
+
+ function chartData(props, live) {
+ var all = [], latest = Object.create(null), generation = 0;
+ var series = props.series.map(function (s) {
+ var points = new Map();
+ if (Object.prototype.hasOwnProperty.call(props.points, s.key)) props.points[s.key].forEach(function (p) { points.set(p[0], p[1]); });
+ if (live.chartSamples) numeric(live.chartSamples(props.id, s.key)).forEach(function (p) { points.set(p.t, p.v); });
+ var samples = Array.from(points, function (p) { return { t: p[0], v: p[1] }; })
+ .sort(function (a, b) { return a.t - b.t; }).slice(-props.tiers[props.tier].n);
+ all = all.concat(samples);
+ var last = samples[samples.length - 1];
+ latest[s.key] = (last ? formatValue(last.v) : "--") + " " + s.unit;
+ if (last) generation = Math.max(generation, last.t);
+ return { data: samples.map(function (p) { return p.v; }), color: s.color };
+ });
+ return { series: series, range: bounds(all), latest: latest, generation: generation };
+ }
+
+ function bindCharts(live, doc) {
+ var prior = chartBindings.get(doc);
+ if (prior) prior();
+ var view = doc.defaultView;
+ if (!view) throw new Error("chart binding needs a browser document");
+ var motion = view.matchMedia("(prefers-reduced-motion: reduce)");
+ var entries = new Map(), raf = null, disposed = false;
+ function attached(canvas) { return doc.documentElement.contains(canvas); }
+ function visible(canvas) {
+ var rect = canvas.getBoundingClientRect();
+ return Math.round(rect.width) > 0 && Math.round(rect.height) > 0;
+ }
+ function prune() {
+ entries.forEach(function (_, canvas) { if (!attached(canvas)) entries.delete(canvas); });
+ }
+ function cancel() {
+ if (raf !== null) view.cancelAnimationFrame(raf);
+ raf = null;
+ }
+ function moving() {
+ if (disposed || motion.matches || doc.hidden || live.stale === true || live.closed === true) return false;
+ var result = false, stamp = view.performance.now();
+ entries.forEach(function (entry, canvas) {
+ var frame = entry.frame;
+ if (frame && frame.vel && attached(canvas) && visible(canvas) && frame.slideAt(stamp) < frame.maxSlide) result = true;
+ });
+ return result;
+ }
+ function schedule() {
+ if (!moving()) { cancel(); return; }
+ if (raf === null) raf = view.requestAnimationFrame(tick);
+ }
+ function tick(stamp) {
+ raf = null;
+ prune();
+ if (!disposed && !motion.matches && !doc.hidden && live.stale !== true && live.closed !== true) {
+ entries.forEach(function (entry, canvas) {
+ if (entry.frame && entry.frame.vel && visible(canvas)) entry.engine.drawFrame(canvas, entry.frame, stamp);
+ });
+ }
+ schedule();
+ }
+ function tierFor(figure) {
+ var tier = figure.getAttribute("data-tier") || new URLSearchParams(view.location.search).get("tier");
+ return tier === "hour" || tier === "day" ? tier : "min";
+ }
+ function redraw(initial) {
+ if (disposed) return;
+ prune();
+ var figures = doc.querySelectorAll('[data-island="chart"]');
+ for (var i = 0; i < figures.length; i++) {
+ var figure = figures[i], canvas = figure.querySelector("canvas");
+ if (!canvas || !canvas.getContext || !attached(canvas)) continue;
+ var raw = figure.getAttribute("data-chart"), key = figure.getAttribute("data-key"), tier = tierFor(figure);
+ if (initial === true && !raw) continue;
+ var entry = entries.get(canvas);
+ if (raw && entry && entry.raw === raw && entry.props) tier = entry.props.tier;
+ if (!entry || entry.key !== key || entry.tier !== tier || entry.raw !== raw) {
+ var props = raw ? chartProps(raw) : null;
+ if (raw && !props) { entries.delete(canvas); continue; }
+ if (props) tier = props.tier;
+ delete canvas.__history; delete canvas.__clock; delete canvas.__cframe;
+ var reduced = { matches: false };
+ entry = { key: key, tier: tier, raw: raw, props: props, motion: reduced, engine: createEngine({ window: view, document: doc,
+ reduceMotion: reduced, state: { chartTier: tier, prevGenMs: 0 } }) };
+ entries.set(canvas, entry);
+ }
+ if (!visible(canvas)) { entry.frame = null; continue; }
+ var data;
+ if (entry.props) {
+ data = chartData(entry.props, live);
+ var values = figure.querySelectorAll("[data-chart-value]");
+ for (var j = 0; j < values.length; j++) {
+ var valueKey = values[j].getAttribute("data-chart-value");
+ if (Object.prototype.hasOwnProperty.call(data.latest, valueKey)) values[j].textContent = data.latest[valueKey];
+ }
+ } else {
+ var samples = numeric(live.samples(key)).slice(-60);
+ data = { series: [{ data: samples.map(function (s) { return s.v; }), color: figure.getAttribute("data-color") || "#3776BE" }],
+ range: bounds(samples), generation: samples.length ? samples[samples.length - 1].t : 0 };
+ }
+ entry.engine.state.prevGenMs = data.generation;
+ entry.engine.invalidatePalette();
+ var fitted = fitSeries(data.series, entry.scale);
+ if (entry.scale && entry.scale !== fitted.scale) { delete canvas.__history; delete canvas.__clock; }
+ entry.scale = fitted.scale;
+ // Keep short seeds inside the plot.
+ entry.motion.matches = motion.matches || live.stale === true || fitted.series.some(s => s.data.length > 0 && s.data.length < 4);
+ entry.engine.paintLines(canvas, { series: fitted.series, yMin: fitted.range[0], yMax: fitted.range[1], grid: 4 });
+ entry.frame = canvas.__cframe;
+ }
+ schedule();
+ }
+ function clean(event) {
+ var element = event && event.detail && event.detail.elt;
+ if (element && element.contains) {
+ entries.forEach(function (_, canvas) { if (element.contains(canvas)) entries.delete(canvas); });
+ }
+ schedule();
+ }
+ function visibility() { if (doc.hidden) cancel(); else redraw(); }
+ var unsubscribe = live.onChange(function (what) {
+ if (disposed) return;
+ if (what === "data") { applyReadings(live, doc); redraw(); }
+ else if (what === "stale") schedule();
+ });
+ doc.addEventListener("htmx:afterSwap", redraw);
+ doc.addEventListener("htmx:beforeCleanupElement", clean);
+ doc.addEventListener("htmx:beforeCleanup", clean);
+ doc.addEventListener("visibilitychange", visibility);
+ view.addEventListener("resize", redraw);
+ motion.addEventListener("change", redraw);
+ function stop() {
+ if (disposed) return;
+ disposed = true; cancel(); entries.clear();
+ if (typeof unsubscribe === "function") unsubscribe();
+ doc.removeEventListener("htmx:afterSwap", redraw);
+ doc.removeEventListener("htmx:beforeCleanupElement", clean);
+ doc.removeEventListener("htmx:beforeCleanup", clean);
+ doc.removeEventListener("visibilitychange", visibility);
+ view.removeEventListener("resize", redraw);
+ motion.removeEventListener("change", redraw);
+ if (chartBindings.get(doc) === stop) chartBindings.delete(doc);
+ }
+ chartBindings.set(doc, stop);
+ redraw(true);
+ return stop;
+ }
+
+ return {
+ createEngine: createEngine, bounds: bounds, plotPoints: plotPoints, draw: draw, formatValue: formatValue,
+ withValue: withValue, applyReadings: applyReadings, bindCharts: bindCharts,
+ chartProps: chartProps, chartData: chartData
+ };
+});
diff --git a/third-party/flare-ui/crates/flare-ui/assets/js/islands.js b/third-party/flare-ui/crates/flare-ui/assets/js/islands.js
new file mode 100644
index 0000000..da81c8c
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/js/islands.js
@@ -0,0 +1,79 @@
+/* flare-ui islands (UI-6): table sort kept in the URL and column resize.
+ * Pure helpers are exported for Node tests; the DOM binders are thin. */
+(function (root, factory) {
+ if (typeof module === "object" && module.exports) module.exports = factory();
+ else root.FlareIslands = factory();
+})(typeof self !== "undefined" ? self : this, function () {
+ "use strict";
+
+ var MIN_COL = 40;
+ var MAX_COL = 800;
+
+ /* "?sort=name&dir=desc" -> {key, dir}; dir defaults to asc, junk -> null. */
+ function parseSort(search) {
+ var key = null, dir = "asc";
+ new URLSearchParams(search || "").forEach(function (v, k) {
+ if (k === "sort" && /^[A-Za-z0-9_.-]{1,64}$/.test(v)) key = v;
+ if (k === "dir" && (v === "asc" || v === "desc")) dir = v;
+ });
+ return key ? { key: key, dir: dir } : null;
+ }
+
+ /* Query string after clicking column `key`: toggles dir on the same key. */
+ function nextSortQuery(search, key) {
+ var cur = parseSort(search);
+ var dir = cur && cur.key === key && cur.dir === "asc" ? "desc" : "asc";
+ var params = new URLSearchParams(search || "");
+ params.delete("sort"); params.delete("dir");
+ params.append("sort", key); params.append("dir", dir);
+ return "?" + params.toString();
+ }
+
+ /* Numbers compare numerically, everything else as case-folded text. */
+ function compareCells(a, b) {
+ var na = Number(a), nb = Number(b);
+ if (a !== "" && b !== "" && isFinite(na) && isFinite(nb)) return na - nb;
+ var x = String(a).toLowerCase(), y = String(b).toLowerCase();
+ return x < y ? -1 : x > y ? 1 : 0;
+ }
+
+ /* Stable sort of rows (arrays of strings) by column index. */
+ function sortRows(rows, col, dir) {
+ var sign = dir === "desc" ? -1 : 1;
+ return rows
+ .map(function (r, i) { return { r: r, i: i }; })
+ .sort(function (p, q) {
+ return sign * compareCells(p.r[col], q.r[col]) || p.i - q.i;
+ })
+ .map(function (p) { return p.r; });
+ }
+
+ function clampWidth(px) {
+ var n = Math.round(Number(px));
+ if (!isFinite(n)) return MIN_COL;
+ return Math.max(MIN_COL, Math.min(MAX_COL, n));
+ }
+
+ /* Keep column headers semantic; native controls supply keyboard activation. */
+ function bindTableSort(doc, loc) {
+ var ths = doc.querySelectorAll("th[data-sort]");
+ for (var i = 0; i < ths.length; i++) {
+ (function (th) {
+ if (th.querySelector("a[href],button,input,select,textarea,[tabindex],[role=button],[role=link]")) return;
+ var button = doc.createElement("button");
+ button.type = "button";
+ while (th.firstChild) button.appendChild(th.firstChild);
+ th.appendChild(button);
+ button.addEventListener("click", function () {
+ loc.search = nextSortQuery(loc.search, th.getAttribute("data-sort"));
+ });
+ })(ths[i]);
+ }
+ }
+
+ return {
+ parseSort: parseSort, nextSortQuery: nextSortQuery, compareCells: compareCells,
+ sortRows: sortRows, clampWidth: clampWidth, bindTableSort: bindTableSort,
+ MIN_COL: MIN_COL, MAX_COL: MAX_COL
+ };
+});
diff --git a/third-party/flare-ui/crates/flare-ui/assets/js/live.js b/third-party/flare-ui/crates/flare-ui/assets/js/live.js
new file mode 100644
index 0000000..b29505a
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/js/live.js
@@ -0,0 +1,209 @@
+/* flare-ui live client (UI-6): SSE stream with a bounded ring, reconnect
+ * backoff and a stale marker. No dependencies; works in a browser and in
+ * Node (tests inject EventSource, timers and a clock). */
+(function (root, factory) {
+ if (typeof module === "object" && module.exports) module.exports = factory();
+ else root.FlareLive = factory();
+})(typeof self !== "undefined" ? self : this, function () {
+ "use strict";
+
+ var DEFAULTS = {
+ ringCap: 600, // samples kept per series
+ maxSeries: 64, // series tracked per stream; extra keys are dropped
+ staleAfterMs: 15000, // no event for this long marks the stream stale
+ backoffMinMs: 1000,
+ backoffMaxMs: 30000,
+ staleClass: "bf-stale"
+ };
+
+ /* Fixed-capacity ring of {t, v}; oldest sample is overwritten. */
+ function Ring(cap) {
+ this.cap = cap;
+ this.buf = [];
+ this.head = 0;
+ }
+ Ring.prototype.push = function (item) {
+ if (this.buf.length < this.cap) this.buf.push(item);
+ else {
+ this.buf[this.head] = item;
+ this.head = (this.head + 1) % this.cap;
+ }
+ };
+ Ring.prototype.toArray = function () {
+ return this.buf.slice(this.head).concat(this.buf.slice(0, this.head));
+ };
+ Ring.prototype.size = function () { return this.buf.length; };
+
+ /* Reconnect delay for attempt n (0-based): doubles, capped. */
+ function backoff(attempt, min, max) {
+ var d = min * Math.pow(2, attempt);
+ return d > max || !isFinite(d) ? max : d;
+ }
+
+ /* env: { EventSource, setTimeout, clearTimeout, now } (all optional in a browser). */
+ function Live(url, opts, env) {
+ env = env || {};
+ var o = {};
+ var k;
+ for (k in DEFAULTS) o[k] = DEFAULTS[k];
+ for (k in (opts || {})) o[k] = opts[k];
+ this.opts = o;
+ this.url = url;
+ this.ES = env.EventSource || (typeof EventSource !== "undefined" ? EventSource : null);
+ var st = env.setTimeout || setTimeout;
+ var ct = env.clearTimeout || clearTimeout;
+ /* Wrapped so the timers run unbound; browsers reject a foreign `this`. */
+ this.setT = function (fn, ms) { return st(fn, ms); };
+ this.clearT = function (id) { return ct(id); };
+ this.now = env.now || Date.now;
+ this.series = Object.create(null);
+ this.chartSeries = Object.create(null);
+ this.seriesCount = 0;
+ this.dropped = 0;
+ this.attempt = 0;
+ this.lastEventAt = null;
+ this.stale = true;
+ this.es = null;
+ this.timer = null;
+ this.staleTimer = null;
+ this.closed = false;
+ this.listeners = [];
+ }
+
+ Live.prototype.onChange = function (fn) {
+ var self = this, active = true;
+ this.listeners.push(fn);
+ return function () {
+ if (!active) return;
+ active = false;
+ var index = self.listeners.indexOf(fn);
+ if (index >= 0) self.listeners.splice(index, 1);
+ };
+ };
+ Live.prototype._emit = function (what) {
+ var listeners = this.listeners.slice();
+ for (var i = 0; i < listeners.length; i++) listeners[i](what, this);
+ };
+
+ Live.prototype.start = function () {
+ var self = this;
+ if (this.es || this.timer !== null) return;
+ if (!this.ES) throw new Error("EventSource unavailable");
+ this.closed = false;
+ var source = this.es = new this.ES(this.url);
+ function current() { return !self.closed && self.es === source; }
+ source.onopen = function () { if (current()) { self.attempt = 0; self._arm(); } };
+ source.onmessage = function (ev) { if (current()) self.ingest(ev.data); };
+ if (source.addEventListener) source.addEventListener("series", function (ev) {
+ if (current()) self.ingestSeries(ev.data);
+ });
+ source.onerror = function () {
+ if (!current()) return;
+ self._setStale(true);
+ if (self.es) { self.es.close(); self.es = null; }
+ if (self.closed) return;
+ var d = backoff(self.attempt++, self.opts.backoffMinMs, self.opts.backoffMaxMs);
+ self.timer = self.setT(function () { self.timer = null; self.start(); }, d);
+ };
+ this._arm();
+ };
+
+ Live.prototype.close = function () {
+ this.closed = true;
+ if (this.es) { this.es.close(); this.es = null; }
+ if (this.timer !== null) { this.clearT(this.timer); this.timer = null; }
+ if (this.staleTimer !== null) { this.clearT(this.staleTimer); this.staleTimer = null; }
+ };
+
+ /* Restart the stale watchdog. */
+ Live.prototype._arm = function () {
+ var self = this;
+ if (this.staleTimer !== null) this.clearT(this.staleTimer);
+ this.staleTimer = this.setT(function () {
+ self.staleTimer = null;
+ self._setStale(true);
+ }, this.opts.staleAfterMs);
+ };
+
+ Live.prototype._setStale = function (v) {
+ if (this.stale === v) return;
+ this.stale = v;
+ this._emit("stale");
+ };
+
+ /* One SSE data payload: JSON {"k": key, "v": value, "t": ms} or an array of those. */
+ Live.prototype.ingest = function (data) {
+ var msg;
+ try { msg = JSON.parse(data); } catch (e) { this.dropped++; return; }
+ var items = Array.isArray(msg) ? msg : [msg];
+ var t0 = this.now(), accepted = 0;
+ for (var i = 0; i < items.length; i++) {
+ var m = items[i];
+ if (!m || typeof m.k !== "string" || m.v === undefined) { this.dropped++; continue; }
+ if (typeof m.t === "number" && !isFinite(m.t)) { this.dropped++; continue; }
+ var r = this.series[m.k];
+ if (!r) {
+ if (this.seriesCount >= this.opts.maxSeries) { this.dropped++; continue; }
+ r = this.series[m.k] = new Ring(this.opts.ringCap);
+ this.seriesCount++;
+ }
+ r.push({ t: typeof m.t === "number" ? m.t : t0, v: m.v });
+ accepted++;
+ }
+ if (!accepted) return;
+ this.lastEventAt = t0;
+ this._arm();
+ this._setStale(false);
+ this._emit("data");
+ };
+
+ Live.prototype.samples = function (key) {
+ return this.series[key] ? this.series[key].toArray() : [];
+ };
+
+ /* Named chart events are isolated from readings and other chart ids. */
+ Live.prototype.ingestSeries = function (data) {
+ var m;
+ try { m = JSON.parse(data); } catch (e) { this.dropped++; return; }
+ if (!m || typeof m.id !== "string" || !m.id.length || m.id.length > 128 ||
+ typeof m.key !== "string" || !m.key.length || m.key.length > 256 ||
+ !Array.isArray(m.p) || m.p.length !== 2 ||
+ !m.p.every(function (v) { return typeof v === "number" && isFinite(v); })) {
+ this.dropped++; return;
+ }
+ var key = JSON.stringify([m.id, m.key]), ring = this.chartSeries[key];
+ if (!ring) {
+ if (this.seriesCount >= this.opts.maxSeries) { this.dropped++; return; }
+ ring = this.chartSeries[key] = new Ring(this.opts.ringCap);
+ this.seriesCount++;
+ }
+ ring.push({ t: m.p[0], v: m.p[1] });
+ this.lastEventAt = this.now(); this._arm(); this._setStale(false); this._emit("data");
+ };
+
+ Live.prototype.chartSamples = function (id, key) {
+ var ring = this.chartSeries[JSON.stringify([id, key])];
+ return ring ? ring.toArray() : [];
+ };
+
+ /* Toggle the stale class on every element carrying data-live. */
+ function bindStaleMarker(live, doc, cls) {
+ cls = cls || live.opts.staleClass;
+ function mark() {
+ var els = doc.querySelectorAll("[data-live]");
+ for (var i = 0; i < els.length; i++) {
+ if (live.stale) els[i].classList.add(cls);
+ else els[i].classList.remove(cls);
+ }
+ }
+ mark();
+ var unsubscribe = live.onChange(function (what) { if (what === "stale") mark(); });
+ if (doc.addEventListener) doc.addEventListener("htmx:afterSwap", mark);
+ return function () {
+ unsubscribe();
+ if (doc.removeEventListener) doc.removeEventListener("htmx:afterSwap", mark);
+ };
+ }
+
+ return { Live: Live, Ring: Ring, backoff: backoff, bindStaleMarker: bindStaleMarker, DEFAULTS: DEFAULTS };
+});
diff --git a/third-party/flare-ui/crates/flare-ui/assets/theme.css b/third-party/flare-ui/crates/flare-ui/assets/theme.css
new file mode 100644
index 0000000..8c991ec
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/theme.css
@@ -0,0 +1,74 @@
+/* Shared app theme (UI-4): the --app-* semantic layer over tokens.css.
+ * Dark is the default; light follows an explicit data-theme or, when absent,
+ * the system preference. Extracted from the FLARE portal stylesheet so FLARE
+ * and the Warden console read one palette. Embedded as flare_ui::tokens::THEME_CSS.
+ */
+
+:root {
+ --app-bg: var(--bf-bg-page); /* #070D1D */
+ --app-surface: var(--bf-bg-surface); /* #0B1020 */
+ --app-surface-alt: var(--bf-bg-surface-alt); /* #192858 */
+ --app-text: var(--bf-text-on-dark);
+ --app-text-muted: var(--bf-text-on-dark-muted);
+ --app-border: var(--bf-border-default);
+ --app-link: var(--bf-color-cyan-400);
+ --app-elevation: var(--bf-shadow-flare-soft); /* the signature flare */
+ --app-input-bg: var(--bf-bg-page);
+ --app-btn2-hover: var(--bf-action-secondary);
+ /* A whisper of the signature cyan under a hovered row - enough to say
+ "live", never enough to fight the text on it. */
+ --app-row-hover: rgba(58, 188, 248, 0.07);
+ /* The brand red is 3.22:1 on the dark surface. Lightened for dark only, so
+ destructive actions clear AA in both themes rather than one. */
+ --app-danger: #FF6B6B;
+ --app-danger-hover-tint: rgba(255, 107, 107, 0.12);
+ /* Same step-down as --app-link: --bf-border-accent is flat cyan-400 in
+ every theme, which is ~2.16:1 on light backgrounds and fails the 3:1
+ WCAG 1.4.11 floor for a focus indicator. */
+ --app-focus-ring: var(--bf-color-cyan-400);
+ color-scheme: dark;
+}
+
+:root[data-theme='light'] {
+ --app-bg: var(--bf-bg-page-light); /* #FFFFFF */
+ --app-surface: var(--bf-color-neutral-100); /* #F6F6F6 */
+ --app-surface-alt: var(--bf-color-neutral-100);
+ --app-text: var(--bf-text-on-light);
+ --app-text-muted: var(--bf-text-on-light-muted);
+ --app-border: var(--bf-border-subtle); /* #D9D9D9 hairline */
+ /* One shade darker so link text clears AA on white. */
+ --app-link: var(--bf-color-cyan-600);
+ --app-danger: #C7162B;
+ --app-danger-hover-tint: rgba(199, 22, 43, 0.12);
+ /* The flare mutes on white - never a cyan glow on a light surface. */
+ --app-elevation: var(--bf-shadow-elevation-1);
+ --app-input-bg: var(--bf-bg-page-light);
+ --app-btn2-hover: var(--bf-color-neutral-100);
+ --app-row-hover: rgba(55, 118, 190, 0.06);
+ /* One shade darker, same reasoning as --app-link above. */
+ --app-focus-ring: var(--bf-color-cyan-600);
+ color-scheme: light;
+}
+
+/* System preference, used when the user has not chosen explicitly.
+ `data-theme` is absent in that case, so this must not out-specify the
+ explicit selectors above - hence :root:not([data-theme]). */
+@media (prefers-color-scheme: light) {
+ :root:not([data-theme]) {
+ --app-bg: var(--bf-bg-page-light);
+ --app-surface: var(--bf-color-neutral-100);
+ --app-surface-alt: var(--bf-color-neutral-100);
+ --app-text: var(--bf-text-on-light);
+ --app-text-muted: var(--bf-text-on-light-muted);
+ --app-border: var(--bf-border-subtle);
+ --app-link: var(--bf-color-cyan-600);
+ --app-danger: #C7162B;
+ --app-danger-hover-tint: rgba(199, 22, 43, 0.12);
+ --app-elevation: var(--bf-shadow-elevation-1);
+ --app-input-bg: var(--bf-bg-page-light);
+ --app-btn2-hover: var(--bf-color-neutral-100);
+ --app-row-hover: rgba(55, 118, 190, 0.06);
+ --app-focus-ring: var(--bf-color-cyan-600);
+ color-scheme: light;
+ }
+}
diff --git a/third-party/flare-ui/crates/flare-ui/assets/tokens.css b/third-party/flare-ui/crates/flare-ui/assets/tokens.css
new file mode 100644
index 0000000..c29af1c
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/tokens.css
@@ -0,0 +1,176 @@
+/* FLARE portal - design tokens as CSS custom properties.
+ * Hand-written; owned by the flare-ui crate (assets/tokens.css) and embedded as flare_ui::tokens::TOKENS_CSS.
+ * Import as the root stylesheet; portal.css builds its components on these.
+ *
+ * All values are flat (resolved) - semantic tokens reference primitives.
+ */
+
+:root {
+ /* --- Color - navy -------------------------------- */
+ --bf-color-navy-50: #F6F6F6;
+ --bf-color-navy-100: #D9D9D9;
+ --bf-color-navy-200: #BABABA;
+ --bf-color-navy-300: #9A9A9A;
+ --bf-color-navy-400: #5D5D5D;
+ --bf-color-navy-500: #295399;
+ --bf-color-navy-600: #1E4E90;
+ --bf-color-navy-700: #192858; /* core brand */
+ --bf-color-navy-800: #0B1020;
+ --bf-color-navy-900: #070D1D;
+ --bf-color-navy-950: #050A16;
+
+ /* --- Color - cyan (signature flare) -------------- */
+ --bf-color-cyan-400: #3ABCF8;
+ --bf-color-cyan-500: #31A2D6;
+ --bf-color-cyan-600: #3776BE;
+
+ /* --- Color - orange (accent) --------------------- */
+ --bf-color-orange-500: #F26522;
+
+ /* --- Color - neutral ----------------------------- */
+ --bf-color-neutral-0: #FFFFFF;
+ --bf-color-neutral-100: #F6F6F6;
+ --bf-color-neutral-200: #D9D9D9;
+ --bf-color-neutral-300: #BABABA;
+ --bf-color-neutral-400: #9A9A9A;
+ --bf-color-neutral-500: #5D5D5D;
+ --bf-color-neutral-600: #484848;
+ --bf-color-neutral-700: #383838;
+ --bf-color-neutral-800: #252525;
+ --bf-color-neutral-900: #000000;
+
+ /* --- Color - feedback ---------------------------- */
+ --bf-color-danger: #FF0202;
+ --bf-color-warning: #F26522;
+ --bf-color-info: #3ABCF8;
+
+ /* --- Semantic aliases (use these in product code) - */
+ --bf-bg-page: var(--bf-color-navy-900);
+ --bf-bg-page-light: var(--bf-color-neutral-0);
+ --bf-bg-surface: var(--bf-color-navy-800);
+ --bf-bg-surface-alt: var(--bf-color-navy-700);
+ --bf-bg-surface-light: var(--bf-color-neutral-100);
+
+ --bf-text-on-dark: var(--bf-color-neutral-0);
+ --bf-text-on-dark-muted: var(--bf-color-neutral-300);
+ --bf-text-on-light: var(--bf-color-neutral-800);
+ --bf-text-on-light-muted: var(--bf-color-neutral-500);
+ --bf-text-link: var(--bf-color-cyan-400);
+ --bf-text-brand: var(--bf-color-navy-700);
+
+ --bf-border-default: var(--bf-color-navy-700);
+ --bf-border-subtle: var(--bf-color-neutral-200);
+ --bf-border-accent: var(--bf-color-cyan-400);
+ --bf-border-on-dark: var(--bf-color-neutral-0);
+
+ --bf-action-primary: var(--bf-color-cyan-400);
+ --bf-action-primary-hover: var(--bf-color-cyan-500);
+ --bf-action-primary-text: var(--bf-color-navy-900);
+ --bf-action-secondary: var(--bf-color-navy-700);
+ --bf-action-secondary-hover: var(--bf-color-navy-600);
+ --bf-action-secondary-text: var(--bf-color-neutral-0);
+ --bf-action-accent: var(--bf-color-orange-500);
+
+ /* --- Typography ----------------------------------
+ * Free-substitute stack: Sora (Google Fonts) for display, Selawik (Microsoft's
+ * open-source Segoe UI clone, SIL OFL 1.1, self-hosted from /fonts) for body.
+ * Native brand fonts (Creato Display, Segoe UI) remain first in the stack so
+ * licensed deployments don't require any token change. See fonts.md.
+ */
+ --bf-font-display: 'Creato Display', 'Sora', 'Segoe UI', 'Selawik', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
+ --bf-font-body: 'Segoe UI', 'Selawik', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
+
+ --bf-font-weight-regular: 400;
+ --bf-font-weight-semibold: 600;
+ --bf-font-weight-bold: 700;
+
+ --bf-text-xs: 12px;
+ --bf-text-sm: 14px;
+ --bf-text-base: 16px;
+ --bf-text-md: 18px;
+ --bf-text-lg: 20px;
+ --bf-text-xl: 24px;
+ --bf-text-2xl: 28px;
+ --bf-text-3xl: 40px;
+ --bf-text-4xl: 56px;
+
+ --bf-leading-tight: 1.0;
+ --bf-leading-snug: 1.15;
+ --bf-leading-normal: 1.25;
+ --bf-leading-relaxed: 1.4;
+ --bf-leading-loose: 1.6;
+ --bf-leading-display: 1.1;
+
+ --bf-tracking-normal: 0;
+ --bf-tracking-wide: 0.03em;
+ --bf-tracking-wider: 0.3em;
+
+ /* --- Spacing (4-px base, 10-px friendly) --------- */
+ --bf-space-0: 0;
+ --bf-space-1: 4px;
+ --bf-space-2: 8px;
+ --bf-space-2_5:10px;
+ --bf-space-3: 12px;
+ --bf-space-4: 16px;
+ --bf-space-5: 20px;
+ --bf-space-6: 24px;
+ --bf-space-8: 32px;
+ --bf-space-9: 36px;
+ --bf-space-10: 40px;
+ --bf-space-13: 53px;
+ --bf-space-16: 64px;
+ --bf-space-20: 80px;
+ --bf-space-24: 96px;
+
+ /* --- Layout -------------------------------------- */
+ --bf-container-max: 1280px;
+ --bf-gutter: 24px;
+ --bf-gutter-mobile: 16px;
+ --bf-section-y: 80px;
+ --bf-section-y-mobile: 53px;
+
+ /* --- Radius ----------------------------------------
+ * Square corners, everywhere (philosophy adopted 2026-07-14).
+ * All steps resolve to 0 and are retained only so existing code
+ * that references them renders square. Omit border-radius in new code.
+ */
+ --bf-radius-none: 0;
+ --bf-radius-xs: 0;
+ --bf-radius-sm: 0;
+ --bf-radius-md: 0;
+ --bf-radius-lg: 0;
+ --bf-radius-xl: 0;
+ --bf-radius-2xl: 0;
+ --bf-radius-3xl: 0;
+ --bf-radius-pill: 0;
+
+ /* --- Shadows (signature flare glow) -------------- */
+ --bf-shadow-flare-soft: 0 0 79px 0 rgba(58, 188, 248, 0.05);
+ --bf-shadow-flare-medium: 0 0 29px 0 rgba(58, 188, 248, 0.50);
+ --bf-shadow-flare-hover: 0 1px 22px 0 rgba(58, 188, 248, 0.40);
+ --bf-shadow-flare-ring: 0 0 10.3px 1px #31A2D6, 0 0 10.9px 1px #31A2D6;
+ --bf-shadow-elevation-1: 0 0 79px 0 rgba(0, 0, 0, 0.10);
+ --bf-shadow-drift: 22px 0 92px 0 rgba(58, 188, 248, 0.10);
+
+ /* --- Breakpoints (also exposed for JS readers) ---- */
+ --bf-bp-sm: 640px;
+ --bf-bp-md: 768px;
+ --bf-bp-lg: 1024px;
+ --bf-bp-xl: 1280px;
+ --bf-bp-2xl: 1536px;
+}
+
+/* --- Reusable text styles ------------------------------------------------ */
+.bf-text-display-1 { font: var(--bf-font-weight-bold) var(--bf-text-4xl)/var(--bf-leading-display) var(--bf-font-display); letter-spacing: var(--bf-tracking-normal); }
+.bf-text-display-2 { font: var(--bf-font-weight-bold) var(--bf-text-3xl)/var(--bf-leading-display) var(--bf-font-display); letter-spacing: var(--bf-tracking-normal); }
+.bf-text-h2 { font: var(--bf-font-weight-semibold) var(--bf-text-2xl)/var(--bf-leading-relaxed) var(--bf-font-body); }
+.bf-text-h3 { font: var(--bf-font-weight-bold) var(--bf-text-xl)/var(--bf-leading-snug) var(--bf-font-body); }
+.bf-text-h4 { font: var(--bf-font-weight-bold) var(--bf-text-lg)/var(--bf-leading-normal) var(--bf-font-body); }
+.bf-text-lead { font: var(--bf-font-weight-regular) var(--bf-text-md)/var(--bf-leading-loose) var(--bf-font-body); letter-spacing: var(--bf-tracking-wide); }
+.bf-text-body { font: var(--bf-font-weight-regular) var(--bf-text-base)/var(--bf-leading-normal) var(--bf-font-body); }
+.bf-text-body-loose{ font: var(--bf-font-weight-regular) var(--bf-text-base)/var(--bf-leading-loose) var(--bf-font-body); letter-spacing: var(--bf-tracking-wide); }
+.bf-text-body-sm { font: var(--bf-font-weight-regular) var(--bf-text-sm)/var(--bf-leading-normal) var(--bf-font-body); }
+.bf-text-label { font: var(--bf-font-weight-semibold) var(--bf-text-sm)/var(--bf-leading-normal) var(--bf-font-body); }
+.bf-text-button { font: var(--bf-font-weight-semibold) var(--bf-text-base)/var(--bf-leading-normal) var(--bf-font-body); }
+.bf-text-caption { font: var(--bf-font-weight-regular) var(--bf-text-xs)/var(--bf-leading-relaxed) var(--bf-font-body); }
+.bf-text-eyebrow { font: var(--bf-font-weight-bold) var(--bf-text-xs)/var(--bf-leading-tight) var(--bf-font-body); letter-spacing: var(--bf-tracking-wider); text-transform: uppercase; }
diff --git a/third-party/flare-ui/crates/flare-ui/assets/warden-compat.css b/third-party/flare-ui/crates/flare-ui/assets/warden-compat.css
new file mode 100644
index 0000000..df03333
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/assets/warden-compat.css
@@ -0,0 +1,59 @@
+/* Warden console compatibility layer (UI-4): maps the legacy app.css custom
+ * properties onto the shared theme and token names so the console can drop its
+ * own palette. Load after tokens.css and theme.css. Names with no shared
+ * equivalent (brand chips, layout widths) keep fixed values.
+ */
+
+:root {
+ --radius: var(--bf-radius-none);
+ --sp-1: var(--bf-space-1);
+ --sp-2: var(--bf-space-2);
+ --sp-3: var(--bf-space-3);
+ --sp-4: var(--bf-space-4);
+ --sp-6: var(--bf-space-6);
+ --sp-8: var(--bf-space-8);
+ --hair: 1px;
+ --font-display: var(--bf-font-display);
+ --font-body: var(--bf-font-body);
+
+ --bg: var(--app-bg);
+ --surface: var(--app-surface);
+ --surface-alt: var(--app-surface-alt);
+ --border: var(--app-border);
+ --text: var(--app-text);
+ --text-muted: var(--app-text-muted);
+ --accent: var(--app-link);
+ --accent-ink: var(--bf-action-primary-text);
+ --accent-soft: var(--app-row-hover);
+ --crit: var(--app-danger);
+ --focus: var(--app-focus-ring);
+
+ --flame: var(--bf-color-orange-500);
+ --scrim: rgba(0, 0, 0, 0.55);
+ --chip-dark: var(--bf-color-navy-800);
+ --rail-w: 76px;
+ --rail-narrow: 60px;
+ --sidebar-w: 340px;
+}
+
+/* Status colors have no shared token yet; values match the console palette. */
+:root,
+:root[data-theme='dark'] {
+ --ok: #35C26A; --warn: #F2B441;
+ --dot-ok: #35C26A; --dot-warn: #F2B441; --dot-crit: #F0555A;
+ --dot-new: #3ABCF8; --dot-off: #5A6577;
+}
+
+:root[data-theme='light'] {
+ --ok: #1E8E4E; --warn: #9A6700;
+ --dot-ok: #22B25A; --dot-warn: #E0A100; --dot-crit: #E5484D;
+ --dot-new: #3776BE; --dot-off: #9AA3B2;
+}
+
+@media (prefers-color-scheme: light) {
+ :root:not([data-theme]) {
+ --ok: #1E8E4E; --warn: #9A6700;
+ --dot-ok: #22B25A; --dot-warn: #E0A100; --dot-crit: #E5484D;
+ --dot-new: #3776BE; --dot-off: #9AA3B2;
+ }
+}
diff --git a/third-party/flare-ui/crates/flare-ui/benches/chart.rs b/third-party/flare-ui/crates/flare-ui/benches/chart.rs
new file mode 100644
index 0000000..f4ac5af
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/benches/chart.rs
@@ -0,0 +1,59 @@
+use std::collections::BTreeMap;
+use std::hint::black_box;
+
+use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
+use flare_ui::chart::{Chart, Series, Tier, TierSpec};
+
+fn fixture(count: usize) -> Chart {
+ Chart {
+ id: "traffic".into(),
+ label: "Network traffic".into(),
+ series: (0..count)
+ .map(|i| Series {
+ key: format!("interface{i}"),
+ label: format!("Interface {i}"),
+ unit: "B/s".into(),
+ color: "#3776BE".into(),
+ })
+ .collect(),
+ tiers: [
+ TierSpec { n: 60, step_s: 60 },
+ TierSpec {
+ n: 60,
+ step_s: 3600,
+ },
+ TierSpec {
+ n: 60,
+ step_s: 86400,
+ },
+ ],
+ tier: Tier::Min,
+ points: (0..count)
+ .map(|i| {
+ (
+ format!("interface{i}"),
+ (0..60)
+ .map(|j| (j as f64 * 1000.0, (i + j) as f64))
+ .collect(),
+ )
+ })
+ .collect::>(),
+ }
+}
+
+fn charts(c: &mut Criterion) {
+ let mut group = c.benchmark_group("chart_contract");
+ for count in [2, 64] {
+ let chart = fixture(count);
+ group.bench_with_input(BenchmarkId::new("props", count), &chart, |b, chart| {
+ b.iter(|| black_box(chart).props().unwrap())
+ });
+ group.bench_with_input(BenchmarkId::new("render", count), &chart, |b, chart| {
+ b.iter(|| black_box(chart).render("/network/traffic").unwrap())
+ });
+ }
+ group.finish();
+}
+
+criterion_group!(benches, charts);
+criterion_main!(benches);
diff --git a/third-party/flare-ui/crates/flare-ui/src/actions.rs b/third-party/flare-ui/crates/flare-ui/src/actions.rs
new file mode 100644
index 0000000..1a51020
--- /dev/null
+++ b/third-party/flare-ui/crates/flare-ui/src/actions.rs
@@ -0,0 +1,97 @@
+//! Action and approval block renderers (LD-06): buttons that post through htmx.
+//!
+//! Every action is a `