jevhooks.git / mise.toml

The toolchain and the tasks of this repository: the one place every tool version lives. Nothing here needs nix or root:

mise trust && mise install      the toolchain (a C compiler and git must exist)
mise tasks                      what can be run
mise run check                  tests, the mod's JavaScript, the daemon, plugin validation

tools/check-versions.sh (part of mise run check) fails when a version written elsewhere (hk.pkl's hk release) differs from the one here. The nix flake only wraps this file; it holds no version of its own.

11min_version = "2026.10.0"
13[tools]

The daemon natively, and the mod's routing for wasm32.

15rust = { version = "1.99.0", profile = "minimal", components = "rustfmt,clippy", targets = "wasm32-unknown-unknown" }

wasm-opt and wasm2js, which turn the mod's wasm into the plugin's JavaScript (a mod's runtime has no WebAssembly). plugin/hooks/jevhooks.js is committed output of this release: moving it rewrites that file.

19"github:WebAssembly/binaryen" = "version_132"

The jdx tools: git hooks and secrets.

22hk = "2.5.0"
23pkl = "0.32.1"
24fnox = "1.36.0"
26[env]

hk runs its hooks through mise, so a hook finds hk, pkl and cargo whatever the shell of the commit.

28HK_MISE = "1"

What the tasks read, all optional. No secret is ever put in this file. TYPESAFE_API_KEY Jev's key, for mise run serve: from the environment, or from fnox (see fnox.toml) CLAUDE the Claude Code binary plugin:validate and plugin:test run (default: claude)

Setup

35[tasks.submodules]
36description = "Fetch the git submodule (third-party/jevcrates)"
37run = "git submodule update --init --recursive"
39[tasks."hooks:install"]
40description = "Install the git hooks (hk.pkl): clippy before a commit, the tests before a push"
41run = "hk install"

Build

44[tasks.mod]
45description = "Compile the mod's Rust to wasm, shrink it, and translate it to plugin/hooks/jevhooks.js"
46run = [
47  "cargo build --release --target wasm32-unknown-unknown -p jevhooks-mod",
48  "wasm-opt -Oz target/wasm32-unknown-unknown/release/jevhooks_mod.wasm -o target/jevhooks_mod.opt.wasm",
49  "wasm2js -O2 target/jevhooks_mod.opt.wasm -o plugin/hooks/jevhooks.js",
50]
52[tasks.daemon]
53description = "Build the jevhooks binary into plugin/bin, where the plugin's .mcp.json starts it"
54run = [
55  "cargo build --release -p jevhooks-daemon",
56  "mkdir -p plugin/bin",
57  "cp target/release/jevhooks plugin/bin/jevhooks.new",
58  "mv -f plugin/bin/jevhooks.new plugin/bin/jevhooks",
59]

Checks

62[tasks."check-versions"]
63description = "Fail if a version written outside mise.toml differs from it"
64run = "tools/check-versions.sh"
66[tasks.clippy]
67description = "cargo clippy over the workspace (an error-level lint fails; warnings are shown)"
68run = "cargo clippy --workspace"
69
70[tasks.test]
71description = "The Rust workspace's tests (no network, no key, no daemon)"
72run = "cargo test --workspace"
73
74[tasks."test:live"]
75description = "Asks the real Jev the questions as worded today (needs the key and the network; about $0.0003)"
76run = "tools/with-secrets.sh cargo test -p jevhooks-daemon -- --ignored live_jev"
77
78[tasks."plugin:validate"]
79description = "Check the plugin the way Claude Code will read it"
80run = '"${CLAUDE:-claude}" plugin validate plugin'
81
82[tasks."plugin:test"]
83description = "The plugin's tests, against a stand-in daemon (needs only Claude Code)"
84run = '"${CLAUDE:-claude}" plugin test plugin'
85
86[tasks.check]
87description = "Versions, the Rust tests, the mod's JavaScript, the daemon, and plugin validation"
88depends = ["check-versions", "test", "mod", "daemon"]
89run = '"${CLAUDE:-claude}" plugin validate plugin'

The daemon

92[tasks.serve]
93description = "Run the daemon in the foreground (the key from fnox when it is set up, else the environment)"
94run = "tools/with-secrets.sh plugin/bin/jevhooks serve"
96[tasks.status]
97description = "Print the running daemon's status"
98run = "plugin/bin/jevhooks status"