Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/agent/kimi/hook.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Luvus Kimi Code integration for Windows. Kimi Code runs each hook command
# through cmd.exe and passes one hook JSON payload on stdin; the Luvus binary
# reports the session or lifecycle event to the pane running it
# (`luvus integration hook kimi`), so the hook needs neither python3 nor a
# POSIX shell.

if ($env:LUVUS_ENV -ne "1" -or [string]::IsNullOrWhiteSpace($env:LUVUS_SOCKET_PATH)) {
exit 0
}

$luvus = $env:LUVUS_BIN_PATH
if ([string]::IsNullOrWhiteSpace($luvus) -or -not (Test-Path -LiteralPath $luvus -PathType Leaf)) {
$luvus = "luvus"
}
try {
& $luvus integration hook kimi *> $null
} catch {
# Hooks are optional telemetry into the local Luvus server. Never interrupt
# Kimi Code when the server or installed binary is unavailable.
}
exit 0
Loading
Loading