kit 6.5.0
Added
kit memory installnow wires Codex lifecycle hooks, not only Claude Code.
It non-destructively mergesUserPromptSubmit,SessionStart, andSessionEnd
into~/.codex/hooks.json, preserves unrelated hooks and metadata, backs up an
existing file, and removes only kit-owned handlers on uninstall. New Codex
command hooks remain inactive until reviewed through/hooks, matching Codex's
trust boundary. The CodexSessionEndhandler carries its harness through the
detached worker so it indexes the just-ended rollout immediately; it does not
silently take the old Claude-only fast path. Separate durable markers extend
kit check/kit doctorliveness detection across both harnesses.
Fixed
-
A guard shim could ping-pong with another shim manager's shim and never run the
tool. (#461)
The shim resolved the real tool by scanningPATHand skipping exactly one
directory: its own. On a machine where the nextPATHentry belongs to another
shim manager (mise, asdf, rtx, pyenv, rbenv), that manager applies the same rule —
and when it has no version active for the current directory it falls through to a
PATHlookup, which lands back in kit's shim, which hands off again. Four
~/.kit/shims/npmprocesses were found alive on a dev machine, two of them 5 and
7.5 hours old, each burning ~20% CPU and re-spawningkit guard-observeabout once
a second, with the wrapped command never run and no output at all.sh -xnamed
the hand-off; the discriminating test was that mise's shim answers immediately once
~/.kit/shimsleavesPATH.KIT_GUARD_BYPASS=1did not help — it skips the
observation, not the hand-off — so the guard's core promise ("never blocks; kit
unavailable ⇒ unchanged behavior") was inverted into an indefinite block.A hand-off into a shims directory now removes kit's own directory from the
exportedPATHfirst — every occurrence, trailing slash tolerated — so the
receiving manager cannot resolve back into us, and marks the hand-off in a
per-tool variable (KIT_GUARD_ACTIVE_NPM); if the shim is re-entered anyway it
resolves past every shims directory instead of spinning. A hand-off to a real
binary is unchanged:PATHand the environment are left alone, so what the tool
spawns is still observed. The version manager keeps choosing the binary — kit hands
off through it, never past it, which a test pins with a decoynpmfurther down
PATH. Measured on the reporting machine with its real mise shims and mise in
fall-through mode: the old shim was killed after 8s having printed nothing, the new
one answers11.11.0; with mise owning node for the directory, both resolve the
same10.9.8. Six of the guard tests now execute the generatedshfor real, so
this class of hang fails a test instead of hanging a machine. -
An upgraded kit next to an old shim was still a broken machine. Shims are files
on disk, written once bykit guard install, and nobody re-runs that after an
upgrade — so the fix above would have reached only new installs.kit guard-observe
now rewrites the shim that called it when that file does not match the running kit
version, andkit guard statusnames any shim that predates it. Shim writes became
a rename onto the path instead of a truncate in place:shreads a script as it
executes it, so rewriting a shim mid-run would splice the file under the running
shell — the rename leaves that process on the old inode. Foreign files at a shim
path are still never touched.
Full changelog: https://github.com/sandstream/kit/blob/v6.5.0/CHANGELOG.md
Verify this release:
git tag -v v6.5.0
npm audit signatures