The workspace members, the path dependencies, the include_str! and test
fixture paths, the recorder's indexed source keys, and the Nix source
filter and path literals follow the new layout. Cargo.lock is unchanged.
Every package of the workspace now takes its version from [workspace.package]
(version.workspace = true) instead of its own number. The numbers before were
0.1.42 (Windows libraries and packages), 0.1.0 (KDE, the macOS version crate,
komorebi-shortcuts and the e2e guest crates) and 0.1.1 (macOS libraries); the
unified release is 0.2.0 for all of them.
Cargo.lock only changes the version of the workspace's own packages.
Not changed here: the version text in schema doc comments and the generated
schemas (next revision), and the shim packages, which are deleted later and
only pick up the number meanwhile.
Verified: cargo metadata --offline --locked succeeds.
Pure formatting by the same nightly rustfmt invocation the nix fmt check uses (tools/format-all, edition 2024, the tree's rustfmt.toml). No code change. Applied last on the candidate because it touches many files other agents were editing. Verified: tools/format-all --check --tree windows passes afterwards; light gates (fast-check) after all three.
Pure formatting, no other change: taplo fmt (default configuration, taplo
0.10.0) over the manifests that the kfm toml-fmt check reported as not
properly formatted: crates/komorebi-bar-core, crates/komorebi-protocol,
komorebi-client, komorebi-daemon, komorebi-for-mac/komorebi and
komorebi-for-mac/komorebic. The other 19 files that check lists were
already clean.
Effect on other platforms: the first four are Windows manifests and
komorebi-protocol is also in the KDE closure. crane's dependency derivation
contains the manifests, so the Windows and KDE dependency derivations and
checks change once with this revision (one cold rebuild of the
dependencies, then stable again).
Verified: taplo fmt --check over the 25 files of the check passes after it
(it failed on exactly these six before).
Delete the Windows SocketMessage, its as_bytes and FromStr (now in the crate) and re-export komorebi_protocol::message::SocketMessage from core, so komorebi::SocketMessage and komorebi_client::SocketMessage keep working. process_command stays an exhaustive match: the two KDE-only variants (ReloadHotkeys, HotkeysState) get one explicit arm that writes the 'not supported on this platform' reply (SocketMessage::not_supported_reply) and returns before anything else happens, so subscribers are not notified either. Behaviour change: those two used to fail to parse on Windows and now parse and are answered that way.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes. Windows unit tests and e2e not run (cannot on Linux).
message.rs holds the one SocketMessage with the 197 variants of the three trees: the Windows enum verbatim (195 variants, in its order, with ApplyState(StateBlob) and DebugWindow(i64) as converged in the previous revisions) plus the two KDE-only variants (ReloadHotkeys, HotkeysState) at the end, as_bytes and FromStr. platforms.rs has Platform, Platforms and SocketMessage::platforms(), one exhaustive match generated from tests/golden/variants-table.tsv (155 on all three, 33 Windows only, 6 Windows and KDE, 1 Windows and macOS, 2 KDE only). No tree uses it yet.
The golden test now runs the real enum: every golden instance of each platform is accepted with identical wire text (path-expansion instances only with STRICT_PATHS=1, which is meaningful on the target platform only; ApplyState on Windows by tag), every variant of every platform is in the unified schema and every generated instance round-trips, and platforms() matches each platform's variant list both ways.
Verified: native cargo test -p komorebi-protocol: 5 unit + 6 golden + 2 doctests passed, 0 failed. Not run: STRICT_PATHS=1 (fails on Linux for the Windows goldens by design).
A transparent wrapper of serde_json::Value with a hand written schema (an object, named State), so that SocketMessage can carry ApplyState without the crate knowing the daemon's State type (D15/D16). On the wire it is exactly the state JSON.
Verified: native cargo test -p komorebi-protocol: 5 unit + 3 golden + 1 doctest passed, 0 failed.
StackbarMode, StackbarLabel, BorderStyle, BorderImplementation, HidingBehaviour and FocusFollowsMouseImplementation move verbatim from core/mod.rs to the end of crates/komorebi-protocol/src/types.rs, because the unified SocketMessage (stage 2e) carries them; they keep their platform-only status in the support table. The crate allows the deprecated HidingBehaviour::Hide that the derives touch. core re-exports all six.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes.
KDE's SubscribeOptions carried a doctest that used SocketMessage; it was dropped from the shared text so the three trees could converge before the move. The crate now has a doctest that checks the wire form of the options ({"filter_state_changes":true}) and the default. The SocketMessage example returns when SocketMessage moves (2e).
Verified: native cargo test -p komorebi-protocol: 4 + 3 passed, doctest 1 passed, 0 failed.
SubscribeOptions, StateQuery, WindowKind, ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour (text identical in the three trees after the converge revisions, checked with a per-item cmp) move from core/mod.rs to crates/komorebi-protocol/src/types.rs; core re-exports them, so komorebi::core::X and komorebi::X paths are unchanged. The five Windows-only payload enums and FocusFollowsMouseImplementation stay until SocketMessage moves (stage 2e).
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes.
The converged core/animation.rs and animation/prefix.rs (identical in the three trees apart from KDE's QtCurve trait) become crates/komorebi-protocol/src/animation.rs and animation/prefix.rs; the Windows files keep their paths as one-line re-exports, so komorebi::core::AnimationStyle and komorebi::animation::prefix::AnimationPrefix are unchanged. The three serde unit tests now run in the protocol crate.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol: 4 + 3 passed, 0 failed.
Delete komorebi-for-kde/komorebi/src/core/pathext.rs (identical to the crate's copy) and re-export komorebi_protocol::pathext from core, so every existing path keeps working. komorebi-protocol becomes a workspace dependency of komorebi-for-kde (schemars feature on); the crate no longer lists dirs (unused until the client moves), so the root Cargo.lock loses that edge. KDE's Cargo.lock gains komorebi-protocol and cargo re-resolved one windows-sys entry.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors; cargo test -p komorebi --lib --test schemas: 305 + 5 passed, 0 failed. Full KDE workspace test run is done at the end of the stage.
Pure move of the converged pathext.rs (identical in all three trees, cmp checked) to crates/komorebi-protocol/src/pathext.rs. The Windows daemon depends on the crate (schemars feature forwarded) and re-exports it as komorebi::core::pathext, so every existing path keeps working. Cargo.lock gains the dependency edge.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol: 4 passed 0 failed, including the moved pathext unit test (unix branch). The Windows branch of that test cannot run on Linux (not verified).
Add tests/golden/{windows,kde,macos}/{variants.json,schema-variants.txt} (taken from each daemon's own SocketMessage before it moves, oracle D14), the support table variants-table.tsv (197 variants x windows/kde/macos) and the schema-driven generator tests/common/golden_gen.rs.
tests/golden.rs checks, until SocketMessage moves (stage 2e): every golden wire text parses to its golden value; each platform's golden variant set equals its column of the support table; the generator runs on a stand-in enum. Stage 2e swaps in the real enum and compares wire text and schema branches (subset check).
Verified: native cargo test -p komorebi-protocol, 3 passed 0 failed; Windows clippy --workspace --locked --all-targets -D warnings clean.
Add crates/komorebi-protocol (edition 2024, member of the root workspace) with empty modules message, platforms, types, animation and pathext. The client transport stays out of the crate (D16). Cargo.lock gains the new package only.
Verified: native cargo build -p komorebi-protocol succeeds. Windows, KDE and macOS gates not run for this revision (no tree depends on the crate yet).