⬆️ build(deps): niyam's sessions run sarathi and kavach 0.8.9
Moves @veda-hq/sarathi from 0.8.2 to 0.8.9. sarathi 0.8.9 depends on exactly @veda-hq/kavach 0.8.9, so kavach moves from 0.7.19 (what sarathi 0.8.2 carried) to 0.8.9 with it. Only package.json's sarathi line and the two packages' lockfile entries change; niyam's own version and every other pin stay.
What reaches niyam's sessions
From git log v0.8.2..v0.8.9 -- packages/sarathi packages/kavach in veda, plus v0.7.19..v0.8.2 -- packages/kavach (only python/tests/ changes there) for kavach's longer range:
- kavach 0.8.3 (https://github.com/veda-hq/veda/pull/406):
git logandgit showwith search and display options (-i,-E,--all-match,--committer…) pass, and so doespnpm --dir <pkg> pack. Newly refused: a second folder-moving option afterpnpm --dir, such aspnpm --dir docs exec --dir . touch …, which 0.7.19 let through. - kavach 0.8.7 (https://github.com/veda-hq/veda/pull/439):
git configreads under-Cpass, wherever-Cpoints. Writes under-Cstay refused. - kavach 0.8.9 (https://github.com/veda-hq/veda/pull/594): for
other-sessions-worktree, a failed scan of the desktop app's session records logs ascan-failedrow and lets the write through, instead of reading silently as "no owner". - sarathi 0.8.9 (https://github.com/veda-hq/veda/pull/587): a new
sarathi wheresubcommand. It does nothing here until.claude/sarathi.jsongives it awhereconfig. - Does not reach niyam: sarathi 0.8.6's hooks-path handler fix (https://github.com/veda-hq/veda/pull/434), since
.claude/sarathi.jsondoes not runworktree-hooks-path.sh. The rest of the range is mutation sweeps and CI. The sweeps also tidy source that sarathi's hook runner loads (cli.ts,config.ts,run.ts,merge.ts,worktree/settings.ts), each stated as removing checks no input can tell apart, so behaviour-preserving;pnpm hooks:checkand the probe below run that code.
other-sessions-worktree stays at warn
The rule has warned in niyam since kavach 0.7.19 (https://github.com/veda-hq/veda/pull/377), because .claude/kavach.json does not name it under rules. This PR does not add "other-sessions-worktree": "refuse". 0.8.9's fail-open scan-failed row is now available here, and veda set the rule to refuse with it in place (https://github.com/veda-hq/veda/issues/363). Setting it to refuse in niyam is a separate decision for Alok.
Checks, run locally on this commit
- Lockfile integrities match
npm view(2026-11-26): sarathi 0.8.9sha512-4OFJVCvt…NBNaDGw==, kavach 0.8.9sha512-tIFg2iUR…M9pUIVaA==.npm view @veda-hq/sarathi@0.8.9 dependenciesis{ '@veda-hq/kavach': '0.8.9' }. pnpm checkpasses: 2799 and 138 tests, 0 failures.pinspasses, andprovenancereports@veda-hq/kavach@0.8.9and@veda-hq/sarathi@0.8.9built and signed by veda'srelease.yml.pnpm hooks:check:.claude/sarathi.json is valid (SessionStart 1, PreToolUse 4, PostToolUse 1, Stop 1)..claude/kavach.jsonloads under kavach 0.8.9. A script under.tmp/ran.claude/hooks/sarathi.sh PreToolUseon Bash events, withCLAUDE_PROJECT_DIRset to the main checkout (sarathi 0.8.2), then to this branch:
main passed (exit 0) cat package.json
main refused (exit 2) git log --oneline --grep=sarathi -i -n 3
main refused (exit 2) git -C /Users/alok/code/athya/veda config --get-all core.hooksPath
main passed (exit 0) niyam propose 1
main passed (exit 0) niyam state 1 --title 'probe'
main passed (exit 0) pnpm --dir docs exec --dir . touch .githooks/pre-push
branch passed (exit 0) cat package.json
branch passed (exit 0) git log --oneline --grep=sarathi -i -n 3
branch passed (exit 0) git -C /Users/alok/code/athya/veda config --get-all core.hooksPath
branch passed (exit 0) niyam propose 1
branch passed (exit 0) niyam state 1 --title 'probe'
branch refused (exit 2) pnpm --dir docs exec --dir . touch .githooks/pre-push
BLOCKED: mutation targets could not be resolved: this command uses `pnpm` with a folder the guard cannot place: one named before the subcommand and moved again after it (`--dir`, …
git push --no-verify origin HEAD was refused under both, but by the worktree guard for a remote it cannot place from the probe's event, not for the flag, so it shows nothing about the bypass rule.
After merge
Hooks load sarathi from the main checkout's node_modules at the pinned version, so /Users/alok/code/athya/niyam needs git pull and pnpm install run together. Between the two, .claude/hooks/sarathi.sh refuses every PreToolUse call in sessions already running, until a session start (or resume) installs the pin or pnpm install runs. That step is the owner's.
Auto-merge is on: an existing dependency's pin moving is none of CLAUDE.md's exceptions. Approval: Alok's 👍 (2026-11-26T02:52Z) on https://github.com/veda-hq/niyam/issues/678#issuecomment-7175474838 (proposal page: https://claude.ai/artifact/5H6Z2vphZZkJXWbkLhUzj9).
Slice: #678
🤖 Generated with Claude Code
Summary by cubic
Moves @veda-hq/sarathi from 0.8.2 to 0.8.9, pulling @veda-hq/kavach from 0.7.19 to 0.8.9 with it since sarathi 0.8.9 pins kavach to exactly that version. Only the package.json sarathi line and the lockfile entries change.
Session behavior changes
git logandgit showsearch and display options now pass; a second folder-moving flag afterpnpm --diris now refused.git configreads under-Cnow pass anywhere-Cpoints.- A failed scan of the app's session records logs a
scan-failedrow and lets the write through instead of reading as "no owner". - The new
sarathi wheresubcommand is unused here until it gets config. other-sessions-worktreestill warns; promoting it to refuse is a separate decision.
After merge, run git pull and pnpm install together on the main checkout — between them, hooks refuse every PreToolUse call.