Skip to content
Français

KimiHook

import type { KimiHook } from "@elie-laloum/outpost/core";
  • kindRequired
    "native-hook"
    Factory discriminator identifying a native CLI hook.
  • agentRequired
    "kimi"
    CLI protocol owning this hook; another CLI harness refuses it.
  • onRequired
    Phase
    Native event name; determines the event payload and permitted response.
  • nameRequired
    string
    Optional diagnostic name; defaults to the native event name.
  • timeoutMsRequired
    number
    Positive callback or command deadline in milliseconds; defaults to 30000, at most 600000. Native event time limits still apply.
  • commandOptional
    HookCommand | undefined
    Executable invoked inside the sandbox with native JSON on stdin. Stdout, stderr and exit status retain the CLI’s native meaning. Mutually exclusive with run.
  • matcherOptional
    string | undefined
    Native matcher, interpreted by the selected CLI. Omit it to receive every occurrence supported by that event.
  • runRequired
    (event: unknown, context: AgentHookContext) => Promise<string>
    Host callback receiving the native event, a borrowed sandbox and cancellation signal. Return nothing to preserve native behavior; return only decisions supported by this event. Mutually exclusive with command.
export type KimiHook<Phase extends KimiHookPhase = KimiHookPhase> = NativeHook<
  "kimi",
  Phase
>;