rightkit-tauri-shell 0.4.0

Shared Tauri desktop shell for Right Suite apps: webview hardening, window state, native menu, tray, single instance, deep links, autostart, rich clipboard, watchdog and engine wiring.
Documentation
//! Real NDJSON child for shell policy integration tests.
use serde_json::{json, Value};
use std::io::{self, BufRead, Write};

fn emit(value: Value) {
    println!("{value}");
    io::stdout().flush().unwrap();
}
fn main() {
    emit(
        json!({"type": "hello", "engine": "shell-fixture", "contract_version": 1, "pid": std::process::id()}),
    );
    for line in io::stdin().lock().lines() {
        let request: Value = serde_json::from_str(&line.unwrap()).unwrap();
        let id = request["id"].clone();
        match request["method"].as_str().unwrap() {
            "crash" => std::process::exit(7),
            "shutdown" => {
                emit(json!({"type": "response", "ok": true, "id": id, "result": {}}));
                break;
            }
            "notify" => emit(json!({"type": "event", "event": {"notice": "unsolicited"}})),
            "slow" => std::thread::sleep(std::time::Duration::from_millis(150)),
            _ => {}
        }
        emit(json!({"type": "event", "id": id, "event": {"stage": "progress"}}));
        emit(json!({"type": "response", "ok": true, "id": id, "result": request["params"]}));
    }
}